cosmos-explorer/public/charting_library/bundles/library.3afef79a8ae8c7a5618e.js
2021-11-21 09:42:01 +08:00

721 lines
2.1 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(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'<span class="'+b["common-tooltip__hotkey-button"]+'">'+e+"</span>"}));a.innerHTML=(t=l.text).format.apply(t,c).replace(/\s\+\s/g,'<span class="'+b["common-tooltip__plus-sign"]+'">+</span>'),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<h;e.classList.toggle(b["common-tooltip--direction_reversed"],u),e.classList.toggle(b["common-tooltip--direction_normal"],!u),c=n.getBoundingClientRect().top<10?"below":"above",c=t.above?"above":c,c=t.below?"below":c,l.classList.toggle(b["common-tooltip__ear-holder--above"],"above"===c),l.classList.toggle(b["common-tooltip__ear-holder--below"],"below"===c),"below"===c&&(e.style.bottom="auto",e.style.top=x(i.y+i.h));var m=function(e){return e.querySelector("."+b["common-tooltip__button-container"])}(e),v=n.getBoundingClientRect().left,g=Math.trunc(i.x+i.w/2-(v+n.clientWidth/2));e.style.left=x(f+g),e.style.width=x(n.clientWidth+m.clientWidth),g=u?Math.max(0,g):Math.min(0,g),m.style.left=x(-g),n.style.left=x(-g)}}}function C(e){e.classList.toggle(b["common-tooltip--hidden"],!0)}function x(e){return Math.floor(e)+"px"}var T='\n\t<div id="common-tooltip-wrapper" class="'+b["common-tooltip"]+'">\n\t\t<div class="'+b["common-tooltip__ear-holder"]+'" >\n\t\t\t<div class="'+b["common-tooltip__body"]+' js-tooltip-body"></div>\n\t\t</div>\n\t\t<div class="'+b["common-tooltip__button-container"]+'"></div>\n\t</div>\n',I='\n\t<div class="'+b["common-tooltip__hotkey-block"]+'"></div>\n',M='\n\t<div class="'+b["common-tooltip__hotkey-text"]+'"></div>\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<s.length;o++){var a=s[o];if("break"===r(a))break}}),!0);var R=new MutationObserver((function(){if(D&&D.options.target){
("isConnected"in D.options.target?D.options.target.isConnected:document.body.contains(D.options.target))||W()}})),N=function(e,t){void 0===t&&(t={});var i=z(t),r=i.content,o=Object(n.__rest)(i,["content"]),s=function(e){var t=S(e),i=e.getBoundingClientRect(),n={h:i.height,w:i.width,x:i.left,y:i.top},r=e.getAttribute("data-color-theme")||"",o=e.classList.contains("common-tooltip-html"),s=parseInt(e.getAttribute("data-tooltip-delay")||""),a={type:"none"};return t&&(a={type:o?"html":"text",data:t}),{above:e.classList.contains("common-tooltip-above"),below:e.classList.contains("common-tooltip-below"),otl:e.classList.contains("common-tooltip-otl"),otr:e.classList.contains("common-tooltip-otr"),vertical:e.classList.contains("common-tooltip-vertical"),hotkey:e.getAttribute("data-tooltip-hotkey"),narrow:e.classList.contains("common-tooltip-narrow"),colorTheme:r,tooltipDelay:s,rect:n,content:a,target:e}}(e),a=Object.assign(s,o);return"none"!==r.type&&(a.content=r),!("none"===a.content.type&&!a.hotkey)&&(a.target=e,F(a),!0)},F=function(e){var t,i,n,o=z(e),s=w(o);D={options:o,element:s},t=s,h(),l&&l.appendChild(t),a(),V?H(s):(C(s),i=function(){return H(s)},n=function(e){return"number"!=typeof e.tooltipDelay||isNaN(e.tooltipDelay)?500:e.tooltipDelay}(o),r=setTimeout(i,n))},j=function(e){return S(e)};var W=function(){if(a(),R.disconnect(),V&&D){var e,t,i=D.element,n=D.options,r=function(){i.removeEventListener("mouseleave",r),C(i),s=setTimeout((function(){h(),V=!1,D=null}),250)};n.tooltipHideDelay?(e=function(){i.querySelector(":hover")?i.addEventListener("mouseleave",r):r()},t=n.tooltipHideDelay,o=setTimeout(e,t)):r()}};function H(e){var t=Object(d.ensureNotNull)(D).options;if(P(e,t),function(e){e.classList.toggle(b["common-tooltip--hidden"],!1)}(e),R.observe(document,{childList:!0,subtree:!0}),V=!0,t.forceHideOnMove){var i=function(){document.removeEventListener("mousemove",i),W()};document.addEventListener("mousemove",i)}}function z(e){if(function(e){return"content"in e}(e))return e;var t=e.inner,i=e.html,r=e.text,o=Object(n.__rest)(e,["inner","html","text"]),s={type:"none"};return t&&(s={type:"element",data:t}),r&&(s={type:i?"html":"text",data:r}),Object(n.__assign)({content:s},o)}},"+6ja":function(e,t,i){"use strict";i.r(t),i.d(t,"availableTimezones",(function(){return u})),i.d(t,"timezoneIsAvailable",(function(){return h}));i("YFKU");for(var n=i("/+9u"),r=[{id:"Etc/UTC",title:window.t("UTC")},{id:"exchange",title:window.t("Exchange")}],o=[{id:"Africa/Cairo",title:window.t("Cairo"),offset:0},{id:"Africa/Johannesburg",title:window.t("Johannesburg"),offset:0},{id:"Africa/Lagos",title:window.t("Lagos"),offset:0},{id:"America/Argentina/Buenos_Aires",title:window.t("Buenos Aires"),offset:0},{id:"America/Bogota",title:window.t("Bogota"),offset:0},{id:"America/Caracas",title:window.t("Caracas"),offset:0},{id:"America/Chicago",title:window.t("Chicago"),offset:0},{id:"America/El_Salvador",title:window.t("San Salvador"),offset:0},{id:"America/Juneau",title:window.t("Juneau"),offset:0},{id:"America/Lima",title:window.t("Lima"),offset:0
},{id:"America/Los_Angeles",title:window.t("Los Angeles"),offset:0},{id:"America/Mexico_City",title:window.t("Mexico City"),offset:0},{id:"America/New_York",title:window.t("New York"),offset:0},{id:"America/Phoenix",title:window.t("Phoenix"),offset:0},{id:"America/Santiago",title:window.t("Santiago"),offset:0},{id:"America/Sao_Paulo",title:window.t("Sao Paulo"),offset:0},{id:"America/Toronto",title:window.t("Toronto"),offset:0},{id:"America/Vancouver",title:window.t("Vancouver"),offset:0},{id:"US/Mountain",title:window.t("Denver"),offset:0},{id:"Asia/Almaty",title:window.t("Almaty"),offset:0},{id:"Asia/Ashkhabad",title:window.t("Ashkhabad"),offset:0},{id:"Asia/Bahrain",title:window.t("Bahrain"),offset:0},{id:"Asia/Bangkok",title:window.t("Bangkok"),offset:0},{id:"Asia/Chongqing",title:window.t("Chongqing"),offset:0},{id:"Asia/Dubai",title:window.t("Dubai"),offset:0},{id:"Asia/Ho_Chi_Minh",title:window.t("Ho Chi Minh"),offset:0},{id:"Asia/Hong_Kong",title:window.t("Hong Kong"),offset:0},{id:"Asia/Jakarta",title:window.t("Jakarta"),offset:0},{id:"Asia/Jerusalem",title:window.t("Jerusalem"),offset:0},{id:"Asia/Kolkata",title:window.t("Kolkata"),offset:0},{id:"Asia/Kuwait",title:window.t("Kuwait"),offset:0},{id:"Asia/Muscat",title:window.t("Muscat"),offset:0},{id:"Asia/Qatar",title:window.t("Qatar"),offset:0},{id:"Asia/Riyadh",title:window.t("Riyadh"),offset:0},{id:"Asia/Seoul",title:window.t("Seoul"),offset:0},{id:"Asia/Shanghai",title:window.t("Shanghai"),offset:0},{id:"Asia/Singapore",title:window.t("Singapore"),offset:0},{id:"Asia/Taipei",title:window.t("Taipei"),offset:0},{id:"Asia/Tehran",title:window.t("Tehran"),offset:0},{id:"Asia/Tokyo",title:window.t("Tokyo"),offset:0},{id:"Atlantic/Reykjavik",title:window.t("Reykjavik"),offset:0},{id:"Australia/Adelaide",title:window.t("Adelaide"),offset:0},{id:"Australia/Brisbane",title:window.t("Brisbane"),offset:0},{id:"Australia/Perth",title:window.t("Perth"),offset:0},{id:"Australia/Sydney",title:window.t("Sydney"),offset:0},{id:"Europe/Amsterdam",title:window.t("Amsterdam"),offset:0},{id:"Europe/Athens",title:window.t("Athens"),offset:0},{id:"Europe/Belgrade",title:window.t("Belgrade"),offset:0},{id:"Europe/Berlin",title:window.t("Berlin"),offset:0},{id:"Europe/Brussels",title:window.t("Brussels"),offset:0},{id:"Europe/Copenhagen",title:window.t("Copenhagen"),offset:0},{id:"Europe/Dublin",title:window.t("Dublin"),offset:0},{id:"Europe/Helsinki",title:window.t("Helsinki"),offset:0},{id:"Europe/Istanbul",title:window.t("Istanbul"),offset:0},{id:"Europe/Lisbon",title:window.t("Lisbon"),offset:0},{id:"Europe/London",title:window.t("London"),offset:0},{id:"Europe/Luxembourg",title:window.t("Luxembourg"),offset:0},{id:"Europe/Madrid",title:window.t("Madrid"),offset:0},{id:"Europe/Malta",title:window.t("Malta"),offset:0},{id:"Europe/Moscow",title:window.t("Moscow"),offset:0},{id:"Europe/Oslo",title:window.t("Oslo"),offset:0},{id:"Europe/Paris",title:window.t("Paris"),offset:0},{id:"Europe/Riga",title:window.t("Riga"),offset:0},{id:"Europe/Rome",title:window.t("Rome"),offset:0
},{id:"Europe/Stockholm",title:window.t("Stockholm"),offset:0},{id:"Europe/Tallinn",title:window.t("Tallinn"),offset:0},{id:"Europe/Vilnius",title:window.t("Vilnius"),offset:0},{id:"Europe/Warsaw",title:window.t("Warsaw"),offset:0},{id:"Europe/Zurich",title:window.t("Zurich"),offset:0},{id:"Pacific/Auckland",title:window.t("New Zealand"),offset:0},{id:"Pacific/Chatham",title:window.t("Chatham Islands"),offset:0},{id:"Pacific/Fakaofo",title:window.t("Tokelau"),offset:0},{id:"Pacific/Honolulu",title:window.t("Honolulu"),offset:0},{id:"Pacific/Norfolk",title:window.t("Norfolk Island"),offset:0}],s=0,a=o;s<a.length;s++){var l=a[s],c=Object(n.a)(l.id);l.title="("+c.string+") "+l.title,l.offset=c.offset}o.sort((function(e,t){var i=e.offset-t.offset;return 0!==i?i:e.title.localeCompare(t.title)}));var u=r.concat(o);function h(e){for(var t=0;t<u.length;t++)if(e===u[t].id)return!0;return!1}},"+DwS":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("hY0g"),r=i.n(n);function o(e,t){var i=new r.a(e()),n={};t.subscribe(n,(function(){i.setValue(e())}));return i.readonly().spawn((function(){return t.unsubscribeAll(n)}))}},"+GxX":function(e,t,i){"use strict";var n=i("VVxS").TVLocalStorage;i("qFKp"),TradingView.FeatureToggle={force_prefix:"forcefeaturetoggle.",enableFeature:function(e){n.setItem(this.force_prefix+e,"true")},disableFeature:function(e){n.setItem(this.force_prefix+e,"false")},resetFeature:function(e){n.removeItem(this.force_prefix+e)}},TradingView.isFeatureEnabled=function(e){function t(e){try{var t=murmur32(e+function(){if(window.user&&window.user.id)return window.user.id;var e=n.getItem("featuretoggle_seed");return null!==e||(e=Math.floor(1e6*Math.random()),n.setItem("featuretoggle_seed",e)),e}());return new DataView(t).getUint32(0,!0)/4294967296}catch(i){return.5}}return function(i){return!("local"!==window.environment||!function(e){return-1===["black_friday_mainpage","black_friday_popup","black_friday","broker_ALOR_dev","broker_TRADESTATION_coming_soon","broker_TRADESTATION","broker_TRADESTATION_V3","broker_TRADESTATION_V3_dev","datawindow","hide-copy-readonly","chart_sharing","trading-fast-renew-oauth-token","switching_trial_year_to_month_disabled","switching_year_to_month_disabled","default_year_billing_cycle_switcher","marketing-analytics","trial_verify_phone","disable_obs_streaming","broker_FXCM_token_v2","google-ads","visible_address_fields_by_default","slow-support-warning","support-other-category","hide-trading-floating-toolbar","tvcoins_donations","details_disable_bid_ask","vat_disabled","pro_plan_upgrades_disabled","broker_FXCM_dev","new_date_range","video-ideas-new-api","standalone_screener_show_icons","chart_screener_show_icons"].indexOf(e)&&-1===e.indexOf("-maintenance")
}(i))||(!e[i]||-1!==e[i])&&(!!("true"===n.getItem(TradingView.FeatureToggle.force_prefix+i)||window.is_authenticated&&"undefined"!=typeof user&&user.settings&&"true"===user.settings[TradingView.FeatureToggle.force_prefix+i])||!("false"===n.getItem(TradingView.FeatureToggle.force_prefix+i)||window.is_authenticated&&"undefined"!=typeof user&&user.settings&&"false"===user.settings[TradingView.FeatureToggle.force_prefix+i])&&(!!e[i]&&(1===e[i]||t(i)<=e[i])))}}(window.featureToggleState||{}),t.FeatureToggle=TradingView.FeatureToggle,t.isFeatureEnabled=TradingView.isFeatureEnabled},"+cnz":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 7 5" width="7" height="5" fill="none"><path stroke="currentColor" stroke-width="1.2" d="M1 1.5l2.5 2 2.5-2"/></svg>'},"+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);s<a.length;s++){var l=a[s];i?(this._chartModel.detachSource(l),t.addDataSource(l,n,!1)):t.move(l,n)}i?(this._sourcePaneRemoved=this._chartModel.detachSource(o),t.addDataSource(o,n,!1)):t.move(o,n);var c=t.priceScalePosition(n);t.movePriceScale(n,c,this._targetPriceScaleIndex(o)),this._chartModel.fullUpdate()},t.prototype.undo=function(){this._sourcePaneRemoved&&this._chartModel.createPane(this._initialPaneIndex);var e=this._chartModel.panes()[this._initialPaneIndex],t=e!==this._chartModel.panes()[this._targetPaneIndex],i=Object(r.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),n=e.getPriceScaleById(this._initialPriceScaleId);null===n&&(n=e.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex));for(var o=0,s=this._chartModel.children(i,!0);o<s.length;o++){var a=s[o];t?(this._chartModel.detachSource(a),e.addDataSource(a,n,!1)):e.move(a,n)}t?(this._chartModel.detachSource(i),e.addDataSource(i,n,!1)):e.move(i,n),this._chartModel.fullUpdate()},t}(i("3u3j").a),s=function(e){function t(t,i,n,o,s){var a=e.call(this,t,i,n,s)||this;return a._targetPriceScalePosition=o,a._sourceScaleState=Object(r.ensureNotNull)(i.priceScale()).state(),delete a._sourceScaleState.m_isLockScale,delete a._sourceScaleState.id,a}return Object(n.__extends)(t,e),t.prototype._targetPriceScale=function(e){var t=e.createPriceScaleAtPosition(this._targetPriceScalePosition);return t.restoreState(this._sourceScaleState),t},t.prototype._targetPriceScaleIndex=function(e){return e===this._chartModel.mainSeries()?0:void 0},t}(o),a=function(e){function t(t,i,n,r,o){var s=e.call(this,t,i,n,o)||this;return s._targetPriceScaleId=r.id(),s}return Object(n.__extends)(t,e),t.prototype._targetPriceScale=function(e){return Object(r.ensureNotNull)(e.getPriceScaleById(this._targetPriceScaleId))},t.prototype._targetPriceScaleIndex=function(e){},t}(o)},"/Y2c":function(e,t,i){"use strict";(function(t){var n=i("Eyy1").assert,r=i("e3/o").randomHash,o=i("VNzU").layouts,s=i("Zo2/"),a=i("qFKp").supportTouch,l=i("qFKp").isIE,c=i("qFKp").isEdge,u=i("x8jL").createUndoHistory,h=i("mMWL"),d=i("lxNp"),p=i("/3z9"),_=i("FQhm"),f=i("l7mP"),m=i("Kxc7"),v=i("ijBy").SetChartLayoutCommand,y=i("hY0g"),g=i("HySD").ResizerDetacherState,b=i("HV/F").delegateToPromise,S=i("sEk5"),w=i("lJvs"),P=i("txPx").getLogger("Chart.ChartWidgetCollection"),C=(i("JWMC").trackEvent,i("wamh").ChangeToolBarsThemeUndoCommand),x=i("EsvI").getCurrentTheme,T=i("ULlu").unwrap,I=i("dfhE"),M=i("ufwo").rangesAreEqual,L=i("NSoL").clientSnapshot,O=i("E3Wt"),k=O.applyIndicatorsToAllChartsImpl,A=O.applyIndicatorToAllChartsImpl,E={saveChartEnabled:!0,takeScreenshotEnabled:!0};e.exports=function(e){
var O=this,V=Object.assign({},E,e),D=1,B=2,R=0,N=0,F=new y,j=V.readOnly||!1,W=[],H=0,z=new y,U=new y,G=null,Y="s",q=new y,K=[],Z=!1,J=!1,X=!1,Q=new y(!1),ee=new y(!1),te=new y(!1),ie=new y(TVSettings.getBool("chart.syncCrosshair",!0)),ne=d.createGroup({desc:"Layout"}),re=ie.value();ie.subscribe((function(e){re=e=!!e,TVSettings.setValue("chart.syncCrosshair",e);for(var t=0;t<W.length;++t){var i=W[t].chartWidget.model();i&&i.model().lightUpdate()}}));var oe=new y(Y),se=V.resizerBridge.width,ae=V.resizerBridge.height,le=null;"padding"in V&&(B=V.padding),"topOffset"in V&&(D=V.topOffset),"edge"in V&&(R=V.edge),"border"in V&&(N=V.border);var ce=V.widgetOptions||{},ue=V.metaInfo||{},he={id:new y(ue.id||null),name:new y(ue.name),description:new y(ue.description),username:new y(ue.username),uid:new y(ue.uid),lastModified:new y(ue.lastModified)},de=u();de.onChange().subscribe(null,(function(e){_.emit("undo_redo_state_changed",e)}));var pe=$(V.resizerBridge.container.value()).eq(0),_e=$.Deferred(),fe=new t,me=new t;function ve(){W.forEach((function(e){e.chartWidget.onZoom().unsubscribeAll(this)}))}var ye,ge=null,be=null,Se=null,we=null;function Pe(){return{undoHistory:de,chartWidgetsDefs:W}}function Ce(){var e=R+N,t=ge?ge.offsetHeight:0;return{width:se.value()-2*e,height:ae.value()-D-t-e,top:D,left:e}}function xe(){return Te()}function Te(){return o[Y].count}function Ie(e,t,i,n){if(e<W.length){var r=W[e].chartWidget;return e<Te()||r.shouldBeSavedEvenIfHidden()?r.state(t,i,n):null}return K[e-W.length].content}function Me(){return Promise.resolve(null)}function Le(){var e;e=le?[le]:W.slice(0,G.count).filter((function(e){return!e.hiddenInLayout.value()}));for(var t=0;t<e.length;t++)Oe(e[t],t,e.length)}function Oe(e,t,i){var n=G.sizer(Ce(),t,i,B+N);n.width=Math.max(Math.round(n.width),0),n.height=Math.max(Math.round(n.height),0),n.top=Math.round(n.top),n.left=Math.round(n.left),e.metrics=n,$(e.container.value()).css(n),e.width.setValue(n.width),e.height.setValue(n.height)}function ke(e){return e.rdState.owner.value()!==e}function Ae(e){var t;e=Object.assign({chartWidgetCollection:O,isActive:0===W.length,barsMarksContainersFactory:Ee,undoHistory:de,readOnly:j,initialLoading:X,getToasts:Me},e||{}),void 0!==et&&(e.customLegendWidgetFactories=new Map(et));var i=$(document.createElement("div")).addClass("chart-container").appendTo(pe).css({position:"absolute",overflow:"hidden"});(l||c)&&i.css({"touch-action":"none","-ms-touch-action":"none"}),V.className&&i.addClass(V.className);var n={alive:new y(!0),container:new y(T(i)),width:new y,height:new y,hiddenInLayout:new y(!1),visible:new y,rdState:new g,requestFullscreen:function(){z.value()&&(Ve(n),F.setValue(n.chartWidget))},exitFullscreen:function(){F.value()===n.chartWidget&&Ve(null)},detachable:z,fullscreenable:z,fullscreen:new y};function r(){n.visible.setValue(!n.hiddenInLayout.value()&&V.resizerBridge.visible.value())}n.rdState.pushOwner(n),W.push(n),n.hiddenInLayout.subscribe(r),V.resizerBridge.visible.subscribe(r),r(),function(e){for(var t=0,i=0,n=0;n<G.count;n++){
W[n]&&ke(W[n])||(W[n]===e&&(i=t),t++)}Oe(e,i,t)}(n),Object.assign(e,n.rdState.bridge());var o=e.content?e.content.chartId:Be(De);return n.chartWidget=t=new s.ChartWidget(e,o,he.uid.value()),e.containsData?t.finishInitWithoutConnect():t.connect(),t.withModel(null,(function(){var e=t.model().model();$e.forEach((function(t,i){e.addCustomSource(i,t)}))})),Ne(),Fe(),fe.fire(t),t}function Ee(e){var t=[];if(m.enabled("charting_library_base")){var i=new S(e);t.push(i);var n=new w(e);t.push(n)}else;return t}function Ve(e){le!==e&&(le=e,Re(Y))}function De(e){return W.some((function(t){return t.chartWidget&&t.chartWidget.id()===e}))}function Be(e){for(var t=r();e(t);)t=r();return t}function Re(e){function t(){W.every((function(e){return null!==e.chartWidget.model()}))&&(Ne(),_.emit("layout_changed"))}function i(){t()}function n(e){var t=e.state();return t.chartId=Be(De),t.shouldBeSavedEvenIfHidden=!1,t}function r(e){e.hiddenInLayout.setValue(!0),$(e.container.value()).detach(),e.fullscreen.setValue(!1)}e in o||(e="s"),ve();var s,a=Y,l=o[e].count;_.emit("layout_about_to_be_changed",e),Y=e,G=o[e];for(var c=l;c<W.length;c++){ke(u=W[c])&&u.rdState.bridge().attach()}a!==e&&le&&(le=null),le&&F.setValue(le.chartWidget);for(c=0;c<l||c<W.length;c++){var u=W[c];if(le?le===u:c<l&&(!u||!ke(u))){if(u){if(pe.append($(u.container.value())),u.hiddenInLayout.setValue(!1),J){var h=K.shift();h&&(Z=!0,u.chartWidget.loadContent(h.content,X),Z=!1)}}else s=c,Ae(Object.assign({},ce,K.shift()||(F.value()?{content:n(F.value())}:null)||{},0===s||Q.value()?{}:{defSymbol:null})).modelCreated().subscribe(null,i,!0),u=W[c];$(u.container.value()).toggleClass("multiple",l>1),u.fullscreen.setValue(le===u)}else u&&r(u)}Le(),Ne(),function(){for(var e=G.count,t=e,i=0;i<e;i++)W[i]&&ke(W[i])&&t--;U.setValue(t),z.setValue(t>1)}(),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<W.length;i++){var n=W[i].chartWidget,r=n.model();r&&(r.mainSeries().properties().symbol.value()!==e&&(t||(de.beginUndoMacro("Change Symbol"),t=!0),n.setSymbol(e)))}t&&de.endUndoMacro()}F.subscribe((function(e){if(e){for(var t,i=W.length;i--;)if(W[i].chartWidget===e){t=i;break}if(!isFinite(t))throw new Error("Cannot make detached ChartWidget active");if(H!==t){le&&(ke(W[t])||(le=W[t])),H=t,Fe();for(i=W.length;i--;)W[i].chartWidget!==e&&W[i].chartWidget.setActive(!1);nt(),e.setActive(!0)}!function(e){if(Ue!==e){if(Ue){Ue.modelCreated().unsubscribe(null,Ge);var t=Ue.model();if(t)t.mainSeries().properties().style.unsubscribe(null,Ye),t.model().onSelectedSourceChanged().unsubscribe(null,qe),Ue=null}if(e){Ue=e;var i=e.model();i?Ge(i):e.modelCreated().subscribe(null,Ge)}}}(e)}}),{callWithLast:!0});var Ze=!1;function Je(e){var t=Math.max(1,window.devicePixelRatio||1);if(e&&e.onlyActiveChart||le)return{layout:"s",hidpiRatio:t,theme:x().name,charts:[F.value().images()]};for(var i=[],n=G.count,r={showCollapsedLegend:(e=e||{}).showCollapsedLegend,status:e.status},o=0;o<W.length&&o<n;o++)i.push(W[o].chartWidget.images(r));return{layout:Y,hidpiRatio:t,theme:x().name,charts:i}}function Xe(){var e={snapshotUrl:V.snapshotUrl};(m.enabled("show_dialog_on_snapshot_ready")?f.getImageOfChart:f.getImageOfChartSilently)(O,e,(function(e){_.emit("onScreenshotReady",e)}))}function Qe(e){if(0!==W.length){for(var t=W.length;t--;)W[t].chartWidget.setActive(!1);W[H].chartWidget.setActive(e)}}j||(ne.add({desc:"Switch active chart",hotkey:9,handler:function(){}}),ne.add({desc:"Switch active chart",hotkey:p.Modifiers.Shift+9,handler:function(){}})),V.takeScreenshotEnabled&&ne.add({desc:"Screenshot",hotkey:p.Modifiers.Alt+83,handler:Xe}),V.saveChartEnabled&&ne.add({desc:"Save Chart Layout",hotkey:p.Modifiers.Mod+83,handler:function(){We.fire()}});var $e=new Map,et=new Map;function tt(e){if(m.enabled("charting_library_base"))return e;if("s"===e||ce.containsData||j||isProductFeatureEnabled(ProductFeatures.MULTIPLE_CHARTS)&&getProductFeatureConfig(ProductFeatures.MULTIPLE_CHARTS).limit>=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;n<e.charts.length;n++){var r=e.charts[n];K.push({content:r})}e.symbolLock&&Q.setValue(!0),e.intervalLock&&ee.setValue(!0),
e.trackTimeLock&&te.setValue(!0)}oe.setValue(Y),Re(Y),h.init(),h.tool.subscribe(rt),h.tool.subscribe(nt),J=!1,X=!1}function nt(){var e=F.value();W.forEach((function(t){t.chartWidget!==e&&t.chartWidget.updateCrossHairPositionIfNeeded()})),e&&e.updateCrossHairPositionIfNeeded()}function rt(){W.forEach((function(e){e.chartWidget.onToolChanged()}))}Object.assign(this,{createChartWidget:Ae,getAll:function(){return W.map((function(e){return e.chartWidget}))},destroy:function(){Qe(!1),null!==Se&&(Se(),Se=null),ve(),W.forEach((function(e){void 0!==e.timingsMeter&&e.timingsMeter.destroy(),e.chartWidget.destroy()})),V.resizerBridge.remove(),$(window).off("resize",Le),$(document).off("onUpdate",Le),h.tool.unsubscribe(nt),h.tool.unsubscribe(rt),_e.resolve(),pe.remove(),$e.clear(),et.clear(),ne.destroy()},layout:oe,activeChartWidget:F,viewMode:q,activeChartStyle:He.readonly(),trySetChartStyleToActiveWidget:function(e){var t=F.value();return!!t&&t.trySetChartStyle(e)},selectedSources:ze.readonly(),metaInfo:he,state:function(e,t,i){for(var n=[],r=xe(),o=0;o<r;o++){var s=Ie(o,e,t,i);s&&n.push(s)}var a={name:O.metaInfo.name.value(),layout:Y,charts:n};return Q.value()&&(a.symbolLock=1),ee.value()&&(a.intervalLock=1),te.value()&&(a.trackTimeLock=1),a},lineToolsAndGroupsDTOs:function(){for(var e=new Map,t=0;t<W.length;t++){var i=W[t].chartWidget;if(i){var n=i.id(),r=i.lineToolsAndGroupsDTO();e.set(n,r)}}return e},resetLineToolsInvalidated:function(){for(var e=0;e<W.length;e++){var t=W[e].chartWidget;t&&t.resetLineToolsInvalidated()}},asyncState:function(){for(var e,t=[],i=xe(),n=0;n<i;n++)t.push((e=n)<W.length?W[e].chartWidget.asyncState():Promise.resolve({}));return Promise.all(t).then((function(e){for(var t={charts:[]},i=0;i<e.length;i++)t.charts.push(e[i]);return t}))},readOnly:function(){return j},onZoom:function(){return me},lock:{symbol:Q,setSymbolLockWithUndo:function(e){if(e!==Q.value()){if(de.beginUndoMacro("Symbol Lock"),e)for(var t=F.value(),i=t.getSymbol(),n=0;n<W.length;n++){var r=W[n].chartWidget;r!==t&&(r.getSymbol()!==i&&r.setSymbol(i))}de.setWatchedValue(Q,e,"Symbol Lock"),de.endUndoMacro()}},interval:ee,setIntervalLockWithUndo:function(e){if(e!==ee.value()){if(de.beginUndoMacro("Interval Lock"),e)for(var t=F.value(),i=t.getResolution(),n=0;n<W.length;n++){var r=W[n].chartWidget;r!==t&&(r.getResolution()!==i&&r.setResolution(i))}de.setWatchedValue(ee,e,"Resolution Lock"),de.endUndoMacro()}},crosshair:ie,trackTime:te,setTrackTimeWithUndo:function(e){te.value()!==e&&de.setWatchedValue(te,e,"Track Time")}},setSymbol:function(e){Q.value()?Ke(e):F.value().setSymbol(e)},setResolution:function(e){if(!Z&&!Ze)if(ee.value()){for(var t=!1,i=0;i<W.length;i++){var n=W[i].chartWidget;n.model().mainSeries().properties().interval.value()!==e&&(t||(de.beginUndoMacro("Change Resolution"),t=!0),n.setResolution(e))}t&&de.endUndoMacro()}else F.value().setResolution(e)},setTimeFrame:function(e){if(!Z&&!Ze){if(Ze=!0,ee.value())for(var t=0;t<W.length;t++){var i,n=W[t].chartWidget
;null!==(i=n.model().appliedTimeFrame().value())&&M(i,e)||n.loadRange(e)}else null!==(i=F.value().model().appliedTimeFrame().value())&&M(i,e)||F.value().loadRange(e);Ze=!1}},updateLayout:Le,setChartLayoutWithUndo:function(e){return e=tt(e),oe.value()!==e&&(de.pushUndoCommand(new v(O,e)),!0)},images:Je,clientSnapshot:function(e){{const t={hideResolution:e&&e.hideResolution},i=e&&e.hideResolution;return L(Je({showCollapsedLegend:!0,status:t,hideResolution:i}),e)}},tags:function(){for(var e=[],t=0;t<W.length&&t<G.count;t++)e=e.concat(W[t].chartWidget.tags());return e=$.unique(e),e=$.map(e,(function(e){return e.toLowerCase().replace(/\W+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}))},syncCrosshair:function(e,t,i,n){if(i||re)for(var r=G.count,o=0;o<W.length&&o<r;o++){var s=W[o].chartWidget;if(s!==t&&W[o].rdState.bridge().visible.value()){var a=s.model();a&&a.model().setExternalPosition(e,n)}}},syncScroll:function(e,t){if(te.value()){var i=G.count;de.beginUndoMacro("Sync Time");for(var n=0;n<W.length&&n<i;n++){var r=W[n].chartWidget.model();if(r){var o=r.model();if(o===t)continue;o.syncTimeWithModel(t,e)}}de.endUndoMacro()}},setSymbolAll:Ke,clearChartMetaInfo:function(){he.id.setValue(null),he.uid.setValue(void 0),he.name.setValue(void 0)},takeScreenshot:Xe,loadContent:it,purgeUnusedWidgets:function(){for(var e=o[Y].count;e<W.length;e++)W[e].chartWidget.destroy();W.splice(o[Y].count)},applyOverrides:function(e){for(var t=0;t<W.length;t++)W[t].chartWidget.applyOverrides(e)},applyStudiesOverrides:function(e){for(var t=0;t<W.length;t++)W[t].chartWidget.applyStudiesOverrides(e)},switchChart:je,startFullscreen:function(){V.resizerBridge.requestFullscreen()},exitFullscreen:function(){V.resizerBridge.exitFullscreen()},destroyPromise:function(){return _e.promise()},chartWidgetCreated:function(){return fe},saveKeysPressed:function(){return We},getContainer:function(){return pe},onWidget:ce.onWidget,applyTheme:function(e,t,i,n,r,o,s){void 0===o&&(o=!0);var a=x().name,l=t?[{chartWidget:F.value()}]:W;s?(r&&new C(a,n,o).redo(),l.forEach((function(t){t.chartWidget._model.model().restoreTheme(e,i,s)}))):(de.beginUndoMacro("Apply Chart Theme"),r&&de.pushUndoCommand(new C(a,n,o)),l.forEach((function(t){t.chartWidget._model.model().restoreTheme(e,i)})),de.endUndoMacro())},applyIndicatorsToAllCharts:function(e){k(Pe(),e)},applyIndicatorsToAllChartsAvailable:function(){return!j&&Te()>1},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;e<W.length;e++)W[e].rdState.bridge().attach()},chartMarketStatuses:function(){return W.map((function(e){return"-"}))},chartSeriesStatuses:function(){return W.map((function(e){var t=e.chartWidget.model(),i=t?t.mainSeries().status():null;return(null===i?"":I.SERIES_STATUS_TEXT[i])+" ("+i+")"}))},undoHistory:de,toggleAddCompareDialog:function(){if(null!==we)return we.isOpened()?(we.hide(),Promise.resolve(null)):Promise.resolve(we.show());var e=this
;return Promise.all([i.e("dialogs-core"),i.e(55),i.e(62),i.e(76),i.e(0),i.e(15),i.e("create-dialog"),i.e("add-compare-dialog")]).then(i.t.bind(null,"tkV1",7)).then((function(t){return null===we&&(we=new t.AddCompareDialog(e)),we.isOpened()?null:we.show()}))},applyPreferencesToAllCharts:function(e){},getToasts:Me,addCustomSource:function(e,t){n(!$e.has(e),"Cannot create the same custom source multiple times"),$e.set(e,t);for(var i=0;i<W.length;++i){var r=W[i].chartWidget.model();r&&r.model().addCustomSource(e,t)}},removeCustomSource:function(e){n($e.has(e),"Cannot remove not created custom source"),$e.delete(e);for(var t=0;t<W.length;++t){var i=W[t].chartWidget.model();i&&i.model().removeCustomSource(e)}},addCustomWidgetToLegend:function(e,t){n(!et.has(e),"Cannot create the same custom widget in legend multiple times"),et.set(e,t);for(var i=0;i<W.length;++i)W[i].chartWidget.addCustomWidgetToLegend(e,t)},setViewMode:function(e){q.setValue(e)},moveActiveChartWithUndo:function(e){},activeChartCanBeMoved:function(){return!1},generalPropertiesDefinitions:function(){return F.value().generalPropertiesDefinitions()},reconnectChartApi:function(e){reconnectChartApiHelper(e)}}),it(V.content,!0),oe.subscribe((function(e){Fe(),Re(e)})),oe.hook=function(e){return e===this.value()?e:tt(e)},j&&(oe.writeLock=!0),$(window).on("resize",Le),$(document).on("onUpdate",Le),m.enabled("datasource_copypaste")&&V.globalEvents&&(ne.add({desc:"Paste sources",hotkey:d.Modifiers.Mod+86,handler:function(){F.value().onAppClipboardPaste()}}),ne.add({desc:"Copy sources",hotkey:d.Modifiers.Mod+67,handler:function(){F.value().onAppClipboardCopy()}}),ne.add({desc:"Cut sources",hotkey:d.Modifiers.Mod+88,handler:function(){F.value().onAppClipboardCut()}}),p.isMacKeyboard||(ne.add({desc:"Paste sources",hotkey:d.Modifiers.Shift+45,handler:function(){F.value().onAppClipboardPaste()}}),ne.add({desc:"Copy sources",hotkey:d.Modifiers.Mod+45,handler:function(){F.value().onAppClipboardCopy()}}),ne.add({desc:"Cut sources",hotkey:d.Modifiers.Shift+46,handler:function(){F.value().onAppClipboardCut()}})));var ot=0;function st(){0===--ot&&_.emitOnce("onChartReady")}if(W.forEach((function(e){if(e){ot++;var t=e.chartWidget;t.withModel(null,(function(){V.metaInfo&&t.model().model().setChartSaveTime(1e3*V.metaInfo.lastModified);var e=t.model().mainSeries();if(e.bars().size()>0||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='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 13" width="22" height="13"><path fill="#37A6EF" fill-rule="nonzero" d="M19.354 4.932c.379.55.611 1.207.642 1.918A3.007 3.007 0 0 1 22 9.686a3.003 3.003 0 0 1-3 3.006H4a3.983 3.983 0 0 1-2.814-1.16l6.363-5.048a1.657 1.657 0 0 0 1.495.037l3.034 2.66a1.672 1.672 0 0 0 1.589 2.175 1.668 1.668 0 0 0 1.552-2.28l4.135-4.144zm-.942-.945L14.276 8.13a1.66 1.66 0 0 0-1.32.044l-3.034-2.66A1.672 1.672 0 0 0 8.333 3.34a1.668 1.668 0 0 0-1.611 2.097l-6.316 5.01A3.999 3.999 0 0 1 0 8.683a4.004 4.004 0 0 1 4.041-4.008A5.338 5.338 0 0 1 9.333 0a5.337 5.337 0 0 1 5.124 3.857 3.644 3.644 0 0 1 1.876-.517c.772 0 1.488.239 2.079.647z"/></svg>'},"/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.x<t[0].time-i)return null;if(e.x>t[t.length-1].time+i)return null;for(var n=null,o=0,a=t;o<a.length;o++){var l=a[o];if(e.x<=l.time+i){n=l;break}}if(null===n)return null;var c=Object(s.selectionTolerance)(this._barBorderWidth),u=Math.min(n.high,n.low),h=Math.max(n.high,n.low);return u-c<=e.y&&e.y<=h+c?this._hittest||new r.HitTestResult(r.HitTestResult.REGULAR):null},e.prototype.draw=function(e,t){if(0!==this._bars.length){var i=t.pixelRatio;if(this._barWidth=Object(s.optimalCandlestickWidth)(this._barSpacing,i),this._barWidth>=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;l<c.length;l++){
var u=c[l],h=u.wickColor?u.wickColor:Object(n.ensureDefined)(this._wickColor);h!==r&&(e.fillStyle=h,r=h);var d=Math.round(Math.min(u.open,u.close)*t),p=Math.round(Math.max(u.open,u.close)*t),_=Math.round(u.high*t),f=Math.round(u.low*t),m=Math.round(t*u.time)-s,v=m+o-1;null!==a&&(m=Math.max(a+1,m),m=Math.min(m,v));var y=v-m+1;e.fillRect(m,_,y,d-_),e.fillRect(m,p+1,y,f-p),a=v}},e.prototype._calculateBorderWidth=function(e){var t=Math.floor(1*e);this._barWidth<=2*t&&(t=Math.floor(.5*(this._barWidth-1)));var i=Math.max(Math.floor(e),t);return this._barWidth<=2*i?Math.max(Math.floor(e),Math.floor(1*e)):i},e.prototype._drawBorder=function(e,t){for(var i="",r=this._calculateBorderWidth(t),s=null,a=0,l=this._bars;a<l.length;a++){var c=l[a];if(c.borderColor!==i&&(e.fillStyle=c.borderColor?c.borderColor:Object(n.ensureDefined)(this._borderColor),i=c.borderColor),!this._bodyVisible||!c.hollow){var u=Math.round(c.time*t)-Math.floor(.5*this._barWidth),h=u+this._barWidth-1,d=Math.round(Math.min(c.open,c.close)*t),p=Math.round(Math.max(c.open,c.close)*t);if(null!==s&&(u=Math.max(s+1,u),u=Math.min(u,h)),this._barSpacing*t>2*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;r<s.length;r++){var a=s[r];if(!(this._borderVisible&&this._barWidth<=2*n)||a.hollow){var l=Math.round(Math.min(a.open,a.close)*t),c=Math.round(Math.max(a.open,a.close)*t),u=Math.round(a.time*t)-Math.floor(.5*this._barWidth),h=u+this._barWidth-1;if(a.color!==i){var d=a.color;e.fillStyle=d,i=d}if(a.hollow)e.fillStyle=a.color,Object(o.fillRectInnerBorder)(e,u,l,h-u+1,c-l+1,n);else{if(this._borderVisible&&(u+=n,l+=n,h-=n,c-=n),l>c)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='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" transform="translate(4 5)"><path fill="currentColor" d="M3 1h1v13.5H3z"/><circle stroke="currentColor" cx="3.5" cy="16.5" r="2"/><path fill="currentColor" d="M5.5 16H18v1H5.5z"/><path stroke="currentColor" d="M0 4L3.5.5 7 4m8 9l3.5 3.5L15 20"/></g></svg>'},"/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;i<e.length;++i){var n=e[i];if(s.isSourceInput(n)&&"string"==typeof t[n.id]){var r=t[n.id];return~r.indexOf("$")&&(r=r.split("$")[0]),r}}return null},s.getSourceInputIds=function(e){for(var t=[],i=e.inputs,n=0;n<i.length;++n){var r=i[n];s.isSourceInput(r)&&t.push(r.id)}return t},s.setChildStudyMetaInfoPropertiesSourceId=function(t,i,n){for(var r=0;r<t.inputs.length;++r){var o=t.inputs[r];if(s.isSourceInput(o)&&(n instanceof e&&n.inputs&&n.inputs[o.id])){var a=n.inputs[o.id].value();if(a.indexOf("$")>0){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;t<this.inputs.length;t++)e.push(this.inputs[t].defval);return e},s.prototype.state=function(e){var t={};for(var i in this)this.hasOwnProperty(i)&&(t[i]=this[i],!0!==e&&"id"===i&&(t[i]+="-"+this.version));return t},s.prototype.symbolInputId=function(){var e=this.inputs.filter((function(e){return"symbol"===e.type}));return e.length>0?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;i<e.length;++i)if(e[i].description.toLowerCase()===t.toLowerCase())return e[i];throw new Error("unexpected study id:"+t)}throw new Error("There is no studies metainfo")},s.isParentSourceId=function(e){return"string"==typeof e&&/^[^\$]+\$\d+$/.test(e)},s.isSourceInput=function(e){return e.id&&(("source"===e.id||"src"===e.id)&&("text"===e.type||"source"===e.type)||"source"===e.type)},s.getChildSourceInputTitles=function(e,t,i){var n={};if(t.plots&&t.plots.length&&e.options&&e.options.length)for(var r,o,a,l=0;l<e.options.length;++l)o=(r=e.options[l])&&+r.split("$")[1],(a=isFinite(o)&&t.plots[o])&&~s.CHILD_STUDY_ALLOWED_PLOT_TYPES.indexOf(a.type)&&(n[r]=t.styles&&t.styles[a.id]&&t.styles[a.id].title||a.id,
i&&(n[r]=i+":"+n[r]));return n};var a=new Map([["AnchoredVWAP@tv-basicstudies","linetoolanchoredvwap"],["RegressionTrend@tv-basicstudies","linetoolregressiontrend"]]);s.getStudyPropertyRootName=function(e){var t=a.get(e.id);if(void 0!==t)return t;var i="study_"+e.id;return e.pine&&e.pine.version&&(i+="_"+e.pine.version.replace(".","_")),i},s.getStudyPropertyRootNameById=function(e){var t=a.get(e);return void 0!==t?t:"study_"+e},s.overrideDefaults=function(e){null!==o&&0!==e.length&&r(o,e,(function(e){return TradingView.defaultProperties[s.getStudyPropertyRootName(e)]||null}))},s.setDefaultsOverrides=function(e){o=e},s.isScriptStrategy=function(e){if(e.extra&&e.extra.kind)return e.extra.kind===TVScript.Kinds.STRATEGY;if(!0===e.isTVScriptStrategy)return!0;var t=e.TVScriptSourceCode||e.scriptSource;return!!t&&TVScript.isStrategy(t)},s.getOrderedInputIds=function(e){for(var t=[],i=e.inputs,n=0;n<i.length;++n){var r=i[n];t.push(r.id)}return t},s.canBeChild=function(e){if(e&&"string"==typeof e)return!0;if(!e||e.extra&&!s.isAllowedSourceInputsCount(e.extra.sourceInputsCount)||!0===e.canNotBeChild||!1===e.canBeChild||~s.CHILD_STUDY_EXCLUDE_IDS.indexOf(e.id))return!1;for(var t=e.inputs,i=0,n=0;n<t.length;++n)s.isSourceInput(t[n])&&++i;return s.isAllowedSourceInputsCount(i)},s.isAllowedSourceInputsCount=function(e){return 1===e},s.canHaveChildren=function(e){if(e){if(e.isTVScriptStrategy||e.TVScriptSourceCode&&TVScript.isStrategy(e.TVScriptSourceCode))return!1;if(e.id&&!~s.CHILD_STUDY_PARENT_EXCLUDE_IDS.indexOf(e.id)&&Array.isArray(e.plots))for(var t=0;t<e.plots.length;++t)if(~s.CHILD_STUDY_ALLOWED_PLOT_TYPES.indexOf(e.plots[t].type))return!0}return!1},TradingView.StudyMetaInfo=s,t&&t.exports&&(t.exports=s)}).call(this,i("tc+8"),i("YuTi")(e))},"0gbU":function(e,t,i){"use strict";(function(e){var n=i("GVHu").Study,r=i("2Fqk").CompareLegendView,o=i("TrvT").CompareDataWindowView,s=i("vzYV").CompareValuesProvider,a=i("qgcC").CompareStatusProvider,l=i("Kxc7"),c=i("8aff").CompareStudyPriceAxisView,u=i("2kV1").StudyStatusView,h=i("n5al").createSeriesFormatter,d=i("n5al").seriesCurrency,p=!l.enabled("hide_study_compare_legend_item"),_=l.enabled("study_overlay_compare_legend_option"),f=l.enabled("force_exchange_as_title"),m=l.enabled("uppercase_instrument_names");function v(t,i,r,o){i.hasChild("currencyId")||i.addChild("currencyId",new e(null)),n.call(this,t,i,r,o);var s=this;this._properties.minTick.listeners().subscribe(null,(function(){s._recreatePriceFormattingDependencies()})),this.properties().minTick.listeners().subscribe(null,(function(){s._model.fullUpdate()})),this.properties().currencyId.subscribe(this,this._onCurrencyChanged),this._properties.merge({skipHistogramBaseOnAutoScale:!0})}inherit(v,n),v.prototype.createPriceAxisView=function(e){return new c(this,{plotIndex:"compare"})},v.prototype._showLastValueOnPriceScale=function(){return this._model.properties().scalesProperties.showSeriesLastValue.value()},v.prototype.createViews=function(){this._legendView||(this._legendView=new r(this,this._model)),
this._dataWindowView||(this._dataWindowView=new o(this,this._model)),this._statusView||(this._statusView=new u(this)),n.prototype.createViews.call(this)},v.prototype._tryCreateFormatter=function(){var e=this.symbolInfo();return h(e,this.properties().minTick.value())},v.prototype._onSymbolResolved=function(e){n.prototype._onSymbolResolved.call(this,e),this._recreatePriceFormattingDependencies();var t=this.symbolInfo();t&&this.setCurrency(d(t))},v.prototype.symbol=function(){var e,t=this.properties().inputs.symbol.value(),i=this.symbolInfo(),n=i&&i.exchange&&0!==i.exchange.length;return e=f&&n?i.exchange:i?i.name:t,m?e.toUpperCase():e},v.prototype.symbolResolved=function(){return this.symbolsResolved()},v.prototype.currency=function(){return this._properties.currencyId.value()||null},v.prototype.setCurrency=function(e){this._properties.currencyId.setValue(e)},v.prototype.symbolSource=function(){return this},v.prototype.title=function(e,t,i,n){var r=this._titleInParts(e,t,i,n).join(", ");return m?r.toUpperCase():r},v.prototype.titleInParts=function(e,t,i,n){var r=this._titleInParts(e,t,i,n).join(", ");return[m?r.toUpperCase():r]},v.prototype._titleInParts=function(e,t,i,n){var r=this.properties().inputs.symbol.value(),o=this.symbolInfo(),s=o&&o.exchange&&0!==o.exchange.length,a=[];if(f&&s)a.push(o.exchange);else if(o){if(_){var l=this._model.mainSeries().properties().statusViewStyle.symbolTextSource.value();a.push("description"===l?o.description:o.name)}else a.push(o.name);s&&!n&&a.push([o.exchange])}else a.push(r);return a},v.prototype.symbolInfo=function(){if(!this._resolvedSymbols)return null;var e=this._properties.inputs.symbol.value();return e&&this._resolvedSymbols[this._resolvedSymbolKey(e)]||null},v.prototype.lastPriceLabelFixedCoordinate=function(){return this._priceAxisViews[0]._fixedCoordinate},v.prototype.tags=function(){var e=this.symbol();return e?[e]:[]},v.prototype.statusView=function(){return p?n.prototype.statusView.call(this):null},v.prototype.guiPlotName=function(e){return this.properties().inputs.symbol.value()},v.prototype.canOverrideMinTick=function(){return!0},v.prototype._onCurrencyChanged=function(){this.isStarted()&&this._tryChangeInputs(),this._currencyChanged.fire()},v.prototype._getSymbolObject=function(e){var t=n.prototype._getSymbolObject.call(this,e),i=this.currency();return null!==i&&(t.currencyCode=i),t},v.prototype._resolvedSymbolKey=function(e){var t=this.currency();return e+(null===t?"":"_#_"+t)},v.prototype.valuesProvider=function(){return new s(this,this.model())},v.prototype.statusProvider=function(e){return new a(this,this.model())},t.study_Compare=v}).call(this,i("tc+8"))},"1AAW":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("hY0g"),r=i.n(n);function o(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];for(var n=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return e.apply(void 0,t.map((function(e){return e.value()})))},o=new r.a(n.apply(void 0,t)),s=function(){return o.setValue(n.apply(void 0,t))},a=t.map((function(e){
return e.spawn()})),l=0,c=a;l<c.length;l++){var u=c[l];u.subscribe(s)}var h=function(){return a.forEach((function(e){return e.destroy()}))};return o.readonly().spawn(h)}},"1IXQ":function(e,t,i){"use strict";i("jJ9X");var n=i("aO4+").Point,r=i("/3z9"),o=i("qFKp").CheckMobile,s=i("7KDR"),a=s.Action,l=s.Separator,c=i("5VQP").ContextMenuManager,u=i("H0vP").InvalidationLevel,h=i("ikwP"),d=h.getContext2D,p=h.hardResizeCanvas,_=h.clearRect,f=i("gAom").clearRectWithGradient,m=h.fillRect,v=i("S8xo").MouseEventHandler,y=i("JWMC").trackEvent,g=i("YmeR").ActionBinder,b=i("txPx").getLogger("Chart.PriceAxisWidget"),S=i("T6Of").LimitedPrecisionNumericFormatter,w=i("CW80").isLineTool,P=i("HZKX").createLinesAction,C=i("4vW/").ColorType,x=i("EsvI").themes,T=i("3/8U").axesHighlightColor,I=i("xzdg").PriceAxisWidgetBase,M=i("Kxc7"),L=window.t("Merge All Scales Into One");function O(e,t,i,n,r,o,s,a){I.call(this,e,t,i,o,n),this._isLeft=O.isLeft(r),this._axisInfo=s,this._backgroundBasedTheme=a,this._offset=0,this.restoreDefaultCursor(),this.update(),this._mouseEventHandler=new v(this._topCanvasBinding.canvas,this,{treatVertTouchDragAsPageScroll:!1,treatHorzTouchDragAsPageScroll:!0}),this.contextMenu=null,this.actions=null,this._highlighted=!1}function k(e){var t=new S(e);return function(e,i){return isNumber(i)&&!e.isLog()?t.format(i):""}}inherit(O,I),O.LHS="left",O.RHS="right",O.isLeft=function(e){return e===O.LHS||(e===O.RHS||b.logDebug("PriceAxisWidget.isLeft: wrong side"),!1)},O.prototype.destroy=function(){null!==this.actions&&this.actions.reset&&this.actions.reset.destroy(),this._mouseEventHandler.destroy(),this._tickmarksCache.destroy(),this._tickmarksCache=null,I.prototype.destroy.call(this)},O.prototype.dataSourceAtPoint=function(e,t){var i=this._grouppedSources(),r=i.sources.concat(Array.from(i.topLevelSources)).concat(this._pane.state().customSources()),o=null,s=null;if(!this._priceScale)return null;function a(e,t){var i=s?s.result():0;e.result()>i&&(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;l<a.length;l++)n.isOverlay(a[l])&&i.push(a[l]);return{sources:i,topLevelSources:o}},O.prototype.backLabels=function(e){var t=[],i=this._grouppedSources(),n=function(n){for(var r=0;r<n.length;++r){var o=n[r];if(e||!i.topLevelSources.has(o)){var s=o.priceAxisViews(this._pane.state(),this.priceScale());if(s)for(var a=0;a<s.length;a++)t.push(s[a])}}}.bind(this);return n(i.sources),n(this._pane.state().customSources()),t},O.prototype.setSizeAndOffset=function(e,t){if(e.w<0||e.h<0)throw new Error("Try to set invalid size to PriceAxisWidget "+JSON.stringify(e));null!==this._size&&this._size.equals(e)||(this._size=e,this._canvasBinding.resizeCanvas({width:e.w,height:e.h}),this._topCanvasBinding.resizeCanvas({width:e.w,height:e.h}),this._cell.style.width=e.w+"px",this._cell.style.height=e.h+"px",this._cell.style.minWidth=e.w+"px"),this._offset!==t&&(this._offset=t,this._cell.style.left=t+"px")},O.prototype.getWidth=function(){return this._size.w},O.prototype.update=function(){},O.prototype._hightlightBackground=function(e,t,i,n){if(i){for(var r=t[0].price,o=t[0].price,s=1;s<t.length;s++)r=Math.min(r,t[s].price),o=Math.max(o,t[s].price);var a=i.firstValue(),l=Math.floor(this.priceScale().priceToCoordinate(r,a)*n),c=Math.ceil(this.priceScale().priceToCoordinate(o,a)*n),u=this._backgroundBasedTheme.value(),h=T(u);m(e,Math.floor(n),l,Math.ceil((this._size.w-1)*n)+1,c-l,h)}},O.prototype.drawBackground=function(e,t){var i=Math.ceil(this._size.w*t),n=Math.ceil(this._size.h*t),r=this._pane.state().model().properties().paneProperties;if(r.backgroundType.value()===C.Solid?_(e,0,0,i+1,n+1,this.backgroundColor()):f(e,0,0,i+1,n+1,r.backgroundGradientStartColor.value(),r.backgroundGradientEndColor.value()),this._highlighted){e.globalAlpha=.5;var o=x[this._backgroundBasedTheme.value()].getThemedColor("color-price-axis-highlight");m(e,0,0,i+1,n+1,o),e.globalAlpha=1}var s=this._pane.chart().model(),a=this.priceScale(),l=s.model().selection().sources().filter((function(e){return e.priceScale()===a})).filter((function(e){return w(e)})).reduce((function(e,t){var i=t.axisPoints();return 0===i.length?e:e.concat(i)}),[]);l.length>0&&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||t<h)}),this);e.fillStyle=this.lineColor(),e.beginPath();for(var p=i.length;p--;)d[p]&&e.rect(r,Math.round(i[p].coord*t)-c,a,l);e.fill(),e.fillStyle=this.textColor();for(p=i.length;p--;)d[p]&&this._tickmarksCache.paintTo(e,i[p].label,o,Math.round(i[p].coord*t),s);e.restore()},O.prototype._alignLabels=function(){var e=this._size.h/2,t=[],i=this.priceScale(),n=i.orderedSources().slice(),r=this._pane.state(),o=this.rendererOptions();if(i===r.defaultPriceScale())for(var s=this._pane.state().dataSources(),a=0;a<s.length;a++)r.isOverlay(s[a])&&n.push(s[a]);var l=this._pane.chart().model().model(),c=i.mainSource(),u=l.selection().sources(),h=new Set;function d(n){for(var o=0;o<n.length;++o){var s=n[o],a=s.priceAxisViews(r,i);if(h.has(s)&&a&&a.forEach((function(e){e.setFixedCoordinate(null)})),a){for(var l=0;l<a.length;l++){var u=a[l];u.isVisible()&&t.push(u)}c===s&&a.length>0&&(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;a<f;a++){(v=t[a]).setFixedCoordinate(v.coordinate())}var m=this.priceScale().properties();if(m.alignLabels&&m.alignLabels.value()){for(a=1;a<p.length;a++){var v=p[a],y=(w=p[a-1]).height(o,!1),g=v.coordinate(),b=w.getFixedCoordinate();(g||b)&&g>b-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<b+y&&v.setFixedCoordinate(b+y)}}},O.prototype.drawBackLabels=function(e,t){e.save();for(var i=this.backLabels(),n=this.rendererOptions(),r=this._isLeft?"right":"left",o=0;o<i.length;o++){var s=i[o];s.isAxisLabelVisible()&&(e.save(),s.renderer().draw(e,n,this._widthCache,this._size.w,r,t),e.restore())}e.restore()},O.prototype._minMaxViews=function(e){var t=this._pane.state(),i=this.priceScale(),n=[],r={value:null,view:null},o={value:null,view:null};return e.forEach((function(e){var n=e.priceAxisViews(t,i);if(n&&n.length)for(var s=0;s<n.length;s++){var a=n[s],l=a.coordinate();(null===r.value||r.value<=l)&&(r={value:l,view:a}),(null===o.value||o.value>=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;l<e.length;l++)e[l].y=m(e[l].y,t);if(this.isIndexedTo100())for(l=0;l<e.length;l++)e[l].y=g(e[l].y,t);if(this.isLog())for(l=0;l<e.length;l++)e[l].y=this.priceToLogical(e[l].y);for(l=0;l<e.length;l++){var c=e[l].y;if(!TradingView.isNaN(c)&&null!=c){var u=i+a*(c-n),h=s?u:this.m_height-1-u;e[l].y=h}}},x.prototype.pricesArrayToCoordinates=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;l<e.length;l++)e[l]=m(e[l],t);if(this.isIndexedTo100())for(l=0;l<e.length;l++)e[l]=g(e[l],t);if(this.isLog())for(l=0;l<e.length;l++)e[l]=this.priceToLogical(e[l]);for(l=0;l<e.length;l++){var c=e[l];if(null!=c){var u=i+a*(c-n),h=s?u:this.m_height-1-u;e[l]=h}}},
x.prototype.barPricesToCoordinates=function(e,t){this.makeSureItIsValid();var i=e,n=this.bottomPixelMargin(),r=this.priceRange().minValue(),o=this.priceRange().maxValue(),s=this.internalHeight()-1,a=null;if(this.isPercentage()?a=m:this.isIndexedTo100()?a=g:this.isLog()&&(a=function(e){return e?w(e):e}),null!==a)for(var l=0;l<i.length;l++)i[l]&&(i[l].open=a(i[l].open,t),i[l].high=a(i[l].high,t),i[l].low=a(i[l].low,t),i[l].close=a(i[l].close,t),void 0!==i[l].additionalPrice&&(i[l].additionalPrice=a(i[l].additionalPrice,t)));var c=s/(o-r),u=this.isInverted();for(l=0;l<i.length;l++){var h=i[l];if(h){var d=n+c*(h.open-r),p=u?d:this.m_height-1-d;h.open=p;d=n+c*(h.high-r);var _=u?d:this.m_height-1-d;h.high=_;d=n+c*(h.low-r);var f=u?d:this.m_height-1-d;h.low=f;d=n+c*(h.close-r);var v=u?d:this.m_height-1-d;if(h.close=v,void 0!==h.additionalPrice){d=n+c*(h.additionalPrice-r);var y=u?d:this.m_height-1-d;h.additionalPrice=y}}}},x.prototype._coordinateToLogical=function(e,t){if(this.makeSureItIsValid(),this.isEmpty())return 0;var i=this.invertedCoordinate(e),n=this.priceRange().minValue()+(this.priceRange().maxValue()-this.priceRange().minValue())*((i-this.bottomPixelMargin())/(this.internalHeight()-1));return this.logicalToPrice(n)},x.prototype.coordinateToPrice=function(e,t){var i=this._coordinateToLogical(e,t);return this.isPercentage()?i=f(i,t):this.isIndexedTo100()&&(i=y(i,t)),i},x.prototype.orderedSources=function(){if(this._cachedOrderedSoruces)return this._cachedOrderedSoruces;for(var e=[],t=0;t<this.m_dataSources.length;t++){var i=this.m_dataSources[t];0,null==i.zorder()&&i.setZorder(t+1),e.push(i)}return e=h(e),this._cachedOrderedSoruces=e,this._cachedOrderedSoruces},x.prototype.invalidateSourcesCache=function(){this._cachedOrderedSoruces=null},x.prototype.startScale=function(e){this.isPercentage()||this.isIndexedTo100()||null===this.m_scaleStartPoint&&null===this.m_priceRangeSnapshot&&(this.isEmpty()||(this.m_scaleStartPoint=this.m_height-e,this.m_priceRangeSnapshot=this.priceRange().clone()))},x.prototype.marks=function(){return this._marksCache||(this.m_markBuilder.rebuildTickMarks(),this._marksCache=this.m_markBuilder.marks(),this._onMarksChanged.fire()),this._marksCache},x.prototype.setMaxPriceRange=function(e){this.m_maxPriceRange=e},x.prototype.setMinPriceRange=function(e){this.m_minPriceRange=e},x.prototype.scaleTo=function(e){if(!this.isPercentage()&&!this.isIndexedTo100()&&null!==this.m_scaleStartPoint){this.setMode({autoScale:!1}),(e=this.m_height-e)<0&&(e=0);var t=(this.m_scaleStartPoint+.2*(this.m_height-1))/(e+.2*(this.m_height-1)),i=this.m_priceRangeSnapshot.clone();t=Math.max(t,.1),i.scaleAroundCenter(t),this.setPriceRange(i)}},x.prototype.endScale=function(){this.isPercentage()||this.isIndexedTo100()||null!==this.m_scaleStartPoint&&(this.m_scaleStartPoint=null,this.m_priceRangeSnapshot=null)},x.prototype.startScroll=function(e){this.isAutoScale()||null===this.m_scrollStartPoint&&null===this.m_priceRangeSnapshot&&(this.isEmpty()||(this.m_scrollStartPoint=e,
this.m_priceRangeSnapshot=this.priceRange().clone()))},x.prototype.scrollTo=function(e){if(!this.isAutoScale()&&null!==this.m_scrollStartPoint){var t=this.priceRange().length()/(this.internalHeight()-1),i=e-this.m_scrollStartPoint;this.isInverted()&&(i*=-1);var n=i*t,r=this.m_priceRangeSnapshot.clone();r.shift(n),this.setPriceRange(r,!0),this._marksCache=null}},x.prototype.endScroll=function(){this.isAutoScale()||null!==this.m_scrollStartPoint&&(this.m_scrollStartPoint=null,this.m_priceRangeSnapshot=null)},x.prototype.state=function(){var e={};return e.id=this._id,e.m_priceRange=!this.priceRange()||this.isPercentage()||this.isIndexedTo100()?null:this.priceRange().serialize(),e.m_isAutoScale=this.isAutoScale(),e.m_isPercentage=this._properties.percentage.value(),e.m_isIndexedTo100=this._properties.indexedTo100.value(),e.m_isLog=this._properties.log.value(),e.m_isLockScale=this.isLockScale(),e.m_isInverted=this.isInverted(),e.m_height=this.m_height,e.m_topMargin=this.m_topMargin,e.m_bottomMargin=this.m_bottomMargin,e.alignLabels=this._properties.alignLabels.value(),e},x.prototype.restoreState=function(e){var t=e.m_priceRange;if(void 0===t)throw new TypeError("invalid state");if(void 0===e.m_isAutoScale)throw new TypeError("invalid state");void 0!==e.id&&(this._id=e.id);var i={autoScale:e.m_isAutoScale};void 0!==e.m_isPercentage&&(i.percentage=e.m_isPercentage),void 0!==e.m_isIndexedTo100&&(i.indexedTo100=e.m_isIndexedTo100),void 0!==e.m_isLog&&(i.log=e.m_isLog),void 0!==e.m_isLockScale&&(i.lockScale=e.m_isLockScale),void 0!==e.m_isInverted&&this._properties.isInverted.setValue(e.m_isInverted),void 0!==e.m_height&&this.setHeight(Math.max(0,e.m_height)),this.setMode(i),t?(t instanceof c||(t=new c(t)),this.setPriceRange(t,!0)):this.m_priceRange=null,void 0!==e.m_topMargin&&(this.m_topMargin=e.m_topMargin),void 0!==e.m_bottomMargin&&(this.m_bottomMargin=e.m_bottomMargin),void 0!==e.alignLabels&&this._properties.alignLabels.setValue(e.alignLabels),this._mainSource=void 0,this._scaleSeriesOnly=!1},x.prototype.mainSource=function(){if(void 0!==this._mainSource)return this._mainSource;for(var e=void 0,t=0;t<this.m_dataSources.length;t++){if(TradingView.isInherited(this.m_dataSources[t].constructor,s)){e=this.m_dataSources[t];break}!e&&this.m_dataSources[t]instanceof o&&(e=this.m_dataSources[t])}return this._mainSource=e,this._mainSource||null},x.prototype.formatter=function(){return this._formatter||this.updateFormatter(),this._formatter},x.prototype.formatPrice=function(e,t){return this.isPercentage()?e=m(e,t):this.isIndexedTo100()&&(e=g(e,t)),this.formatter().format(e)},x.prototype.formatPriceAbsolute=function(e){return this._mainSourceFormatter().format(e)},x.prototype.formatPricePercentage=function(e,t){return e=m(e,t),P.format(e)},x.prototype.updateFormatter=function(){this._marksCache=null;var e=this.mainSource(),t=100;e&&(t=e.base()),this._formatter=null,this.isPercentage()?(this._formatter=P,t=100):this.isIndexedTo100()?(this._formatter=new a(100,1),t=100):this._formatter=e?e.formatter():C,
this.m_markBuilder=new p(this,t,this._coordinateToLogicalFunc,this._logicalToCoordinateFunc),this.m_markBuilder.rebuildTickMarks()},x.prototype._onIsInvertedChanged=function(){this._marksCache=null,this.m_markBuilder.rebuildTickMarks()},x.prototype._mainSourceFormatter=function(){return this.mainSource().formatter()||C},x.prototype.sourcesForAutoscale=function(){return this._mainSource&&this._scaleSeriesOnly!==this._scalesProperties.scaleSeriesOnly.value()&&(this._sourcesForAutoscale=null),this._sourcesForAutoscale||this._recalculateSourcesForAutoscale(),this._sourcesForAutoscale},x.prototype.recalculatePriceRange=function(e){this._invalidatedForRange={visibleBars:e,isValid:!1}},x.prototype.makeSureItIsValid=function(){this._invalidatedForRange.isValid||(this._invalidatedForRange.isValid=!0,this.recalculatePriceRangeImpl())},x.prototype.recalculatePriceRangeImpl=function(){var e=this._invalidatedForRange.visibleBars;if(null!==e){for(var t=null,i=this.sourcesForAutoscale(),n=this.isPercentage(),r=this.isIndexedTo100(),o=0,s=0,a=0;a<i.length;a++){var l=i[a];if(l.properties().visible.value()){var u=e.firstBar(),h=e.lastBar(),d=l.autoScaleInfo(u,h),p=d.range;p&&(n?p=v(p,l.firstValue()):r&&(p=b(p,l.firstValue())),t=null===t?p:t.merge(p)),void 0!==d.topPixelMargin&&(o=Math.max(o,d.topPixelMargin)),void 0!==d.bottomPixelMargin&&(s=Math.max(s,d.bottomPixelMargin))}}(Math.abs(o-this._topPixelMargin)>0||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<this.m_dataSources.length;e++){var t=this.m_dataSources[e];TradingView.isInherited(t.constructor,r)&&!t.isActualSymbol()||this._sourcesToUpdateViews.push(t)}}return this._sourcesToUpdateViews},x.prototype.updatePaneViews=function(){for(var e=this.sourcesToUpdateViews(),t=0;t<e.length;t++)e[t].updateAllViews()},x.prototype.canDetachSource=function(e){return this.m_dataSources.some((function(t){return t!==e&&t instanceof o&&!(d(t)&&t.isLinkedToSeries())}))},t.PriceScale=x}).call(this,i("aIyQ"))},"1pHB":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" transform="translate(4 5)"><circle stroke="currentColor" cx="9.5" cy="9.5" r="9"/><path stroke="currentColor" d="M7 14.5h2.5v-5H7"/><path stroke="currentColor" stroke-linecap="square" d="M9.5 14.5h2"/><path fill="currentColor" d="M9.5 7a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z"/></g></svg>'},"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.length<r)return f.logError("merge: 'values' does not contain enough time points to fill in the new items. 'index': "+e.toString()+", previous 'zoffset': "+this._zoffset.toString()+", new 'zoffset': "+t.toString()+", 'values.length': "+i.length),[];this._items=new Array(r).concat(this._items),this._zoffset=t;for(var o=0;o<i.length;++o)this._items[e+o+t]=i[o];return[{change:"rebuild",index:this._validOffsetToIndex(0)}]}
for(var s=[],a=n;a<this._items.length&&a-n<i.length;++a)this._items[a]=i[a-n],s.push({change:"update",index:this._validOffsetToIndex(a),value:i[a-n]});var l=n+i.length;if(l>this._items.length){r=l-this._items.length;for(var c=a;c<a+r;++c){var u=this._items.length;this._items.push(i[c-n]),s.push({change:"append",index:this._validOffsetToIndex(u),value:i[c-n]})}}return this._zoffset=t,s},e.prototype.addTail=function(e,t){for(var i=t?1:0;i<e.length;i++)this._items.push(e[i])},e.prototype.remove=function(e){var t=this._indexToOffset(e);if(null===t)return[];for(var i=this._items.splice(t),n=[],r=0;r<i.length;r++)n.push({change:"remove",index:e+r,value:i[r]});return n},e.prototype.valueAt=function(e){var t=this._indexToOffset(e);return null!==t?this._items[t]:null},e.prototype.indexOf=function(e,t){if(this._items.length<1)return null;if(e>this._items[this._items.length-1])return t?this._validOffsetToIndex(this._items.length-1):null;for(var i=0;i<this._items.length;++i){if(e===this._items[i])return this._validOffsetToIndex(i);if(e<this._items[i])return t?this._validOffsetToIndex(i):null}return null},e.prototype.state=function(){return{items:this._items,zoffset:this._zoffset}},e.prototype.restoreState=function(e){null!==e&&(this._items=e.items,this._zoffset=e.zoffset)},e.prototype.roughTime=function(e,t){void 0===t&&(t=null);var i=this.valueAt(e);if(null!==i)return i;var n=this._items;if(!n.length||n.length<2)return null;var r=n.length-1,o=this._validOffsetToIndex(0),s=this._validOffsetToIndex(r),a=n[0],l=n[r],c=(l-a)/(s-o);if(e<o)return a-(u=o-e)*c;var u;return e>s?(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(e<s){var c=s-e;return r-(u=Math.round(c/l))}if(e>a){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(e<r)return null;if(e===r)return this._validOffsetToIndex(n);for(;i>n+1;){var o=n+i>>1,s=t[o];if(s>e)i=o;else{if(!(s<e))return s===e?this._validOffsetToIndex(o):null;n=o}}return this._validOffsetToIndex(n)},e.prototype._validOffsetToIndex=function(e){return e-this._zoffset},e.prototype._offsetToIndex=function(e){return 0<=e&&e<this.size()?this._validOffsetToIndex(e):null},e.prototype._indexToOffset=function(e){var t=e+this._zoffset;return 0<=t&&t<this.size()?t:null},e}(),v=i("tc+8"),y=i.n(v),g=new Map([[0,.1],[11,.1],[1,.35],[9,.35],[12,.35],[8,.35]]),b=function(){function e(e,t){this._styleSpecificRanges=new Map,this._logicalRange=e,this._defaultStyle=t}return e.prototype.strictRange=function(e){if(null===this._logicalRange)return null;void 0===e&&(e=this._defaultStyle)
;var t=this._styleSpecificRanges.get(e);if(void 0===t){var i=(g.get(e)||0)/2;t=new p.BarsRange(Math.ceil(this._logicalRange.left()+i),Math.ceil(this._logicalRange.right()-i)),this._styleSpecificRanges.set(e,t)}return t},e.prototype.logicalRange=function(){return this._logicalRange},e.prototype.isValid=function(){return null!==this._logicalRange},e.invalid=function(){return new e(null,1)},e}(),S=i("Ocx9"),w=i("GhVi"),P=i("8OdW"),C=function(){function e(e,t){void 0===t&&(t=50),this._actualSize=0,this._usageTick=1,this._oldestTick=1,this._cache=new Map,this._tick2Labels=new Map,this._format=e,this._maxSize=t}return e.prototype.format=function(e){var t=this._cache.get(e.valueOf());if(void 0!==t)return t.string;if(this._actualSize===this._maxSize){var i=this._tick2Labels.get(this._oldestTick);this._tick2Labels.delete(this._oldestTick),this._cache.delete(Object(r.ensureDefined)(i)),this._oldestTick++,this._actualSize--}var n=this._format(e);return this._cache.set(e.valueOf(),{string:n,tick:this._usageTick}),this._tick2Labels.set(this._usageTick,e.valueOf()),this._actualSize++,this._usageTick++,n},e}(),x=i("kcTO");i.d(t,"TimeScale",(function(){return E}));var T,I={preserveBarSpacing:!1,lockVisibleTimeRangeOnResize:!1,rightBarStaysOnScroll:!0},M=u.enabled("low_density_bars"),L=u.enabled("high_density_bars")?.025:.5,O=M?1:5,k=Object(s.getLogger)("Chart.TimeScale"),A=new Map([[0,.9],[11,.9],[1,.8],[9,.8],[12,.8],[8,.8]]);var E=function(){function e(e,t){var i=this;this._width=0,this._widthChanged=new c.a,this._rightOffset=10,this._maxRightOffsetChanged=new c.a,this._defaultRightOffsetProperty=new y.a(10),this._baseIndex=null,this._leftEdgeIndex=null,this._barSpacingChanged=new c.a,this._barSpacing=6,this._visibleBars=b.invalid(),this._visibleBarsInvalidated=!0,this._visibleBarsChanged=new c.a,this._logicalRangeChanged=new c.a,this._points=new m,this._tickMarks=new w.Tickmarks,this._onScroll=new c.a,this._resetDelegate=new c.a,this._scrollStartPoint=null,this._scaleStartPoint=null,this._commonTransitionStartState=null,this._formattedBySpan=new Map,this._options=Object(n.__assign)(Object(n.__assign)({},I),t),this._model=e,this._scalesProperties=e.properties().scalesProperties,this._defaultRightOffsetProperty.listeners().subscribe(this,(function(e){i.setRightOffset(e.value())})),this._options.preserveBarSpacing&&(this._barSpacing=this._scalesProperties.childs().barSpacing.value()||6),this._model.mainSeries().onStyleChanged().subscribe(this,this._invalidateVisibleBars),this._barSpacingChanged.subscribe(this,this._maxRightOffsetOnChanged),this._widthChanged.subscribe(this,this._maxRightOffsetOnChanged)}return e.prototype.destroy=function(){this._model.mainSeries().onStyleChanged().unsubscribe(this,this._invalidateVisibleBars),this._barSpacingChanged.destroy(),this._widthChanged.destroy()},e.prototype.isEmpty=function(){return 0===this._width||0===this._points.size()},e.prototype.update=function(e,t,i,n){this._visibleBarsInvalidated=!0,i.length>0&&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;s<n.marks.length;s++)n.marks[s].index=o+s;this._tickMarks.addTail(n.marks),this._points.addTail(n.changes,i),this._rightOffset-=n.changes.length},e.prototype.state=function(e){var t={m_barSpacing:this.barSpacing(),m_rightOffset:e?this._rightOffset:this._defaultRightOffsetProperty.value()};return e&&(t.points=this._points.state(),t.tickmarks=this._tickMarks.state(),t.width=this._width),t},e.prototype.restoreState=function(e,t){if(void 0!==e.m_barSpacing)if(void 0!==e.m_rightOffset){var i=e.m_barSpacing,n=e.m_rightOffset<0&&!t?this.rightOffsetDefaultValue():e.m_rightOffset,r=n<0?this.rightOffsetDefaultValue():Math.round(n);this._defaultRightOffsetProperty.setValue(r),this._rightOffset=n,t&&(this._points.restoreState(e.points||null),this._tickMarks.restoreState(e.tickmarks||null),e.width&&this._width>0&&(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<c.length;l++){var u=c[l];if(o<=u.index&&u.index<=s){var h=this._tickMarks.indexToTime(u.index);null!==h&&a.push({coord:this.indexToCoordinate(u.index),label:this.formatLabel(h,u.span),span:u.span,major:u.label>=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;i<n.length;i++){var r=n[i],o=r.time,s=t+this._rightOffset-o,a=this._width-(s+.5)*this._barSpacing;r.time=a,r.exactTime=a}},e.prototype.indexesToCoordinates=function(e){for(var t=this.baseIndex()+this._rightOffset,i=this._width-t*this._barSpacing-.5*this._barSpacing,n=0,r=e;n<r.length;n++){var o=r[n],s=i+o.x*this._barSpacing;o.x=s}},e.prototype.rightOffsetForTimePoint=function(e){var t=this.timeToCoordinate(e);return null===t?null:this._rightOffsetForCoordinate(t)},e.prototype.scrollToRealtime=function(e,t){var i=this,n=this._defaultRightOffsetProperty.value();if(n<0&&(n=this.rightOffsetDefaultValue()),e){var r=this._rightOffset,s=this.maxRightOffset();s>0&&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()),e<this.minBarSpacing()?this.minBarSpacing():e>this.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 e<o?(t=Object(r.ensureNotNull)(this._points.valueAt(o)),i=e-o):e>n?(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()<this.maxBarSpacing()},e.prototype.canZoomOut=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()<this.width()/this.barSpacing()&&(this.setRightOffset(this._defaultRightOffsetProperty.value()),this.setBarSpacing(this.width()/(this.points().size()+this.rightOffset())))},e.prototype.logicalRange=function(){return this._visibleBarsInvalidated&&(this._visibleBarsInvalidated=!1,this._updateVisibleBars()),this._visibleBars.logicalRange()},e.prototype.restoreDefault=function(){this._visibleBarsInvalidated=!0,this.setBarSpacing(6),this.resetRightOffset()},e.prototype.restoreRightOffsetPropertyToDefault=function(){this._defaultRightOffsetProperty.setValue(this.rightOffsetDefaultValue())},e.prototype.startScale=function(e){this._scrollStartPoint&&this.endScroll(),null===this._scaleStartPoint&&null===this._commonTransitionStartState&&(this.isEmpty()||(this._scaleStartPoint=e,this._saveCommonTransitionsStartState()))},e.prototype.scaleTo=function(e){if(null!==this._commonTransitionStartState){var t=Object(h.clamp)(this._width-e,0,this._width),i=Object(h.clamp)(this._width-Object(r.ensureNotNull)(this._scaleStartPoint),0,this._width);0!==t&&0!==i&&this.setBarSpacing(this._commonTransitionStartState.barSpacing*t/i)}},e.prototype.endScale=function(){null!==this._scaleStartPoint&&(this._scaleStartPoint=null,this._clearCommonTransitionsStartState())},e.prototype.startScroll=function(e){null===this._scrollStartPoint&&null===this._commonTransitionStartState&&(this.isEmpty()||(this._scrollStartPoint=e,this._saveCommonTransitionsStartState()))},e.prototype.scrollTo=function(e){if(this._visibleBarsInvalidated=!0,null!==this._scrollStartPoint){var t=(this._scrollStartPoint-e)/this.barSpacing();this._rightOffset=Object(r.ensureNotNull)(this._commonTransitionStartState).rightOffset+t,this._correctOffset(),this._onScroll.fire()}},e.prototype.endScroll=function(){null!==this._scrollStartPoint&&(this._scrollStartPoint=null,this._clearCommonTransitionsStartState())},e.prototype.formatLabel=function(e,t){var i=this,n=this._formattedBySpan.get(t);return void 0===n&&(n=new C((function(e){return i.formatLabelImpl(e,t)})),this._formattedBySpan.set(t,n)),n.format(new Date(e))},e.prototype.formatLabelImpl=function(e,t){if(!(e&&e instanceof Date))return"incorrect time";var i=this._model.mainSeries().isDWM()
;return t<P.MINUTE_SPAN&&!i?Object(x.numberToStringWithLeadingZero)(e.getUTCHours(),2)+":"+Object(x.numberToStringWithLeadingZero)(e.getUTCMinutes(),2)+":"+Object(x.numberToStringWithLeadingZero)(e.getUTCSeconds(),2):t<P.DAY_SPAN&&!i?Object(x.numberToStringWithLeadingZero)(e.getUTCHours(),2)+":"+Object(x.numberToStringWithLeadingZero)(e.getUTCMinutes(),2):t<P.WEEK_SPAN||t<P.MONTH_SPAN?e.getUTCDate().toString():t<P.YEAR_SPAN?(void 0===T&&(T=[window.t("Jan"),window.t("Feb"),window.t("Mar"),window.t("Apr"),window.t("May"),window.t("Jun"),window.t("Jul"),window.t("Aug"),window.t("Sep"),window.t("Oct"),window.t("Nov"),window.t("Dec")]),T)[e.getUTCMonth()]:e.getUTCFullYear().toString()},e.prototype.onScroll=function(){return this._onScroll},e.prototype._updateVisibleBars=function(){var e=this._visibleBars;if(this.isEmpty())this._visibleBars.isValid()&&(this._visibleBars=b.invalid(),this._visibleBarsChanged.fire(null,e.strictRange()),this._logicalRangeChanged.fire(null,e.logicalRange()));else{var t=this.baseIndex(),i=this.width()/this._barSpacing,n=this._rightOffset+t,r=n-i;Number.isFinite(r)&&Number.isFinite(n)?(this._visibleBars=new b(new _(r,n),this._model.mainSeries().style()),p.BarsRange.compare(e.strictRange(),this._visibleBars.strictRange())||this._visibleBarsChanged.fire(this._visibleBars.strictRange(),e.strictRange()),_.compare(e.logicalRange(),this._visibleBars.logicalRange())||this._logicalRangeChanged.fire(this._visibleBars.logicalRange(),e.logicalRange())):k.logWarn("updateVisibleBars error: baseIndex: "+t+", barSpacing: "+this._barSpacing+", rightOffset: "+this._rightOffset)}},e.prototype._rightOffsetForCoordinate=function(e){return(this._width+1-e)/this._barSpacing},e.prototype._invalidateVisibleBars=function(){this._visibleBarsInvalidated=!0},e.prototype._correctOffset=function(){var e=this.maxRightOffset();this._rightOffset>e&&(this._rightOffset=e,this._visibleBarsInvalidated=!0);var t=this.minRightOffset();null!==t&&this._rightOffset<t&&(this._rightOffset=t,this._visibleBarsInvalidated=!0)},e.prototype._tryToUpdateBarSpacing=function(e,t){return e!==t&&(this._visibleBarsInvalidated=!0,this._barSpacing=t,this._barSpacingChanged.fire(e,t),!0)},e.prototype._coordinateToFloatIndex=function(e){var t=this._rightOffsetForCoordinate(e),i=this.baseIndex()+this.rightOffset()-t;return Math.round(1e6*i)/1e6},e.prototype._saveCommonTransitionsStartState=function(){this._commonTransitionStartState={barSpacing:this.barSpacing(),rightOffset:this.rightOffset()}},e.prototype._clearCommonTransitionsStartState=function(){this._commonTransitionStartState=null},e.prototype._maxRightOffsetOnChanged=function(){this._maxRightOffsetChanged.fire(this.maxRightOffset())},e}()},"23IT":function(e,t,i){"use strict";var n,r;function o(e){return"line"===e.type}function s(e){return"shapes"===e.type}function a(e){return"chars"===e.type}function l(e){return"arrows"===e.type}function c(e){return"dataoffset"===e.type}function u(e){return"ohlc_open"===e.type}function h(e){return"ohlc_high"===e.type}function d(e){return"ohlc_low"===e.type}
function p(e){return"ohlc_close"===e.type}function _(e){return u(e)||h(e)||d(e)||p(e)}function f(e){return"colorer"===e.type}function m(e){return"bar_colorer"===e.type}function v(e){return"bg_colorer"===e.type}function y(e){return"text_colorer"===e.type}function g(e){return"ohlc_colorer"===e.type}function b(e){return"alertcondition"===e.type}function S(e){return"Plot"!==e}function w(e){return"ohlc_bars"===e.plottype}function P(e){return"ohlc_candles"===e.plottype}i.r(t),i.d(t,"LineStudyPlotStyle",(function(){return n})),i.d(t,"isLinePlot",(function(){return o})),i.d(t,"isShapesPlot",(function(){return s})),i.d(t,"isCharsPlot",(function(){return a})),i.d(t,"isArrowsPlot",(function(){return l})),i.d(t,"isDataOffsetPlot",(function(){return c})),i.d(t,"isOhlcOpenPlot",(function(){return u})),i.d(t,"isOhlcHighPlot",(function(){return h})),i.d(t,"isOhlcLowPlot",(function(){return d})),i.d(t,"isOhlcClosePlot",(function(){return p})),i.d(t,"isOhlcPlot",(function(){return _})),i.d(t,"isColorerPlot",(function(){return f})),i.d(t,"isBarColorerPlot",(function(){return m})),i.d(t,"isBgColorerPlot",(function(){return v})),i.d(t,"isTextColorerPlot",(function(){return y})),i.d(t,"isOhlcColorerPlot",(function(){return g})),i.d(t,"isAlertConditionPlot",(function(){return b})),i.d(t,"isPlotTitleDefined",(function(){return S})),i.d(t,"isOhlcPlotStyleBars",(function(){return w})),i.d(t,"isOhlcPlotStyleCandles",(function(){return P})),i.d(t,"PlotSymbolSize",(function(){return r})),function(e){e[e.Line=0]="Line",e[e.Histogram=1]="Histogram",e[e.Cross=3]="Cross",e[e.Area=4]="Area",e[e.Columns=5]="Columns",e[e.Circles=6]="Circles",e[e.LineWithBreaks=7]="LineWithBreaks",e[e.AreaWithBreaks=8]="AreaWithBreaks",e[e.StepLine=9]="StepLine"}(n||(n={})),function(e){e.Auto="auto",e.Tiny="tiny",e.Small="small",e.Normal="normal",e.Large="large",e.Huge="huge"}(r||(r={}))},"29fS":function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererBars",(function(){return o}));var n=i("VdBB"),r=i("Zp/P"),o=function(){function e(e){this._bars=e.bars,this._barSpacing=e.barSpacing,this._dontDrawOpen=e.dontDrawOpen,this._thinBars=e.thinBars}return e.prototype.hitTest=function(e){var t=this._bars,i=.5*this._barSpacing;if(0===t.length)return null;if(e.x<t[0].time-i)return null;if(e.x>t[t.length-1].time+i)return null;for(var o=null,s=0,a=t;s<a.length;s++){var l=a[s];if(e.x<=l.time+i){o=l;break}}if(null===o)return null;var c=this._calcBarWidth(1),u=this._thinBars?Math.min(c,1):c,h=Object(r.selectionTolerance)(u),d=Math.min(o.high,o.low),p=Math.max(o.high,o.low);return d-h<=e.y&&e.y<=p+h?new n.HitTestResult(n.HitTestResult.REGULAR):null},e.prototype.draw=function(e,t){e.save();var i=t.pixelRatio;(this._barWidth=this._calcBarWidth(i),this._barWidth>=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;o<s.length;o++){var a=s[o]
;n!==a.color&&(e.fillStyle=a.color,n=a.color);var l=Math.floor(.5*this._barLineWidth),c=Math.round(a.time*i),u=c-l,h=this._barLineWidth,d=u+h-1,p=Math.min(a.high,a.low),_=Math.max(a.high,a.low),f=Math.round(p*i)-l,m=Math.round(_*i)+l,v=Math.max(m-f,this._barLineWidth);e.fillRect(u,f,h,v);var y=Math.ceil(1.5*this._barWidth);if(r){if(!this._dontDrawOpen){var g=c-y,b=Math.max(f,Math.round(a.open*i)-l),S=b+h-1;S>f+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;c<this._prices.length;c++)if(t=this._prices[c],i=e[c],o=void 0,s=void 0,s=void 0===i,((o=void 0===t)||s)&&o!==s||Object(r.ensureDefined)(t).formatted!==Object(r.ensureDefined)(i).formatted){l=!0;break}if(l){var u=this._labelWidth+6,h=this._renderParams.fontSize,d=Math.max(e.length,22)*(h+8);this._recreateCanvasAndContext(new n.Size(u,d)),this._prices=e,this._cache.save(),Object(n.drawScaled)(this._cache,this._paneRenderParams.pixelRatio,(function(){a._cache.translate(.5,.5),a._cache.font=a._renderParams.fontSize+"px "+a._renderParams.font,a._cache.textBaseline="middle";for(var e=0;e<a._prices.length;e++)if(a._prices[e]){var t=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"][e];a._cache.fillStyle=a._renderParams.backColors[e],a._cache.fillText(t,0,a._centerByIndex(e)),a._cache.fillText("/",0,a._centerByIndex(e+11))}})),this._cache.restore(),this._prices=e}},e.prototype._recreateCanvasAndContext=function(e){this._canvas=document.createElement("canvas"),this._canvas.width=e.w*this._paneRenderParams.pixelRatio,this._canvas.height=e.h*this._paneRenderParams.pixelRatio,this._cache=Object(r.ensureNotNull)(this._canvas.getContext("2d"))},e.prototype._centerByIndex=function(e){
return Math.round((e+.5)*(this._renderParams.fontSize+8))},e.prototype._topByIndex=function(e){return Math.round(e*(this._renderParams.fontSize+8))},e}()},"2Fqk":function(e,t,i){"use strict";i.r(t),i.d(t,"CompareLegendView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._additional=null,n._showStudyValues=i.properties().paneProperties.legendProperties.showStudyValues,n._showStudyValues.subscribe(n,n.update),n}return Object(n.__extends)(t,e),t.prototype.isValuesVisible=function(){return this._showStudyValues.value()},t.prototype.destroy=function(){this._showStudyValues.unsubscribeAll(this)},t.prototype.additional=function(){return this._additional},t.prototype._updateImpl=function(){e.prototype._updateImpl.call(this)},t}(i("TrvT").CompareDataWindowView)},"2OVc":function(e,t,i){"use strict";i.r(t),i.d(t,"InsertStudyCommand",(function(){return a}));var n=i("mrSG"),r=i("Eyy1"),o=i("RDU5"),s=i("JWMC"),a=function(e){function t(t,i,n,r,o,s,a,l,c,u,h){var d=e.call(this,h)||this;return d._studyId=null,d._chartModel=t,d._studyMetaInfo=i,d._props=r,d._addAsOverlay=o,d._parentId=null==s?null:s.id(),d._inputs=n,d._targetZOrder=u,d._preferredPriceScale=a,d._allowChangeCurrency=l,d._paneSize=c,d}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=null===this._parentId?void 0:this._chartModel.dataSourceForId(this._parentId),t=this._chartModel.insertStudyWithParams(this._studyMetaInfo,this._inputs,this._targetZOrder,this._props,this._addAsOverlay,e,this._preferredPriceScale,this._allowChangeCurrency,this._paneSize,null===this._studyId?void 0:this._studyId);this._studyId=t.id(),t.childStudyByRebind().subscribe(null,(function(){return Object(s.trackEvent)("SOS","Apply SOS","Rebind SOS")})),this._chartModel.setShouldBeSavedEvenIfHidden(!0)},t.prototype.undo=function(){var e=Object(r.ensureNotNull)(this._chartModel.dataSourceForId(Object(r.ensureNotNull)(this._studyId)));this._chartModel.removeSource(e)},t.prototype.insertedStudy=function(){return this._chartModel.dataSourceForId(Object(r.ensureNotNull)(this._studyId))},t}(o.UndoCommand)},"2S76":function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("Eyy1"),o=i("hY0g"),s=i.n(o),a=i("+DwS"),l=i("dfhE"),c=i("8woN"),u=i.n(c),h=["DJ","CBOE"];function d(e){return Object(n.__awaiter)(this,void 0,void 0,(function(){var t,i,r;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:return[3,2];case 1:return n.sent(),i=t.getProduct(function(e){return"exchange-"+e.pro_perm}(e)),(r=function(e){0;return null}(i.exchange))&&"cme-full"===r.exchange?[2,i]:[2,r||i];case 2:return[2,null]}}))}))}var p=i("txPx"),_=i("Cf1E");i.d(t,"DataUpdatedModeModel",(function(){return v}));var f=Object(p.getLogger)("Chart.Definitions.Series");function m(e,t){var i,n=[];return void 0!==(i=e.delay)&&i>0?(!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;n<r.length;n++){var o=r[n];if(o){var l=this._calcBoundingBox(o);if(l&&Object(s.pointInBox)(e,l)){var c={tooltip:this._getTooltip(o,l)};i=new a.HitTestResult(t,c)}}}return i},e.prototype.setData=function(e,t){this._setBaseData(e,t)},e.prototype._calcBoundingBox=function(e){var t=e.vertOffset,i=this._getTextCache(e);if(i){var n=i.textImageWidth,r=i.textImageHeight,s=n/2,a=e.y+t+e.textVertOffset,l=t>0?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;i<o.length;i++){
var s=o[i],a=void 0===s.width?Object(r.ensureDefined)(this._width):s.width,l=void 0===s.height?Object(r.ensureDefined)(this._height):s.height,c=void 0===s.vertOffset?this._vertOffset:s.vertOffset,u=c>0?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;s<a.length;s++){(u=a[s]).style&&void 0!==u.style.color?(i=u.style.color,n=u.style.borderColor):(i=this._color,n=this._borderColor),r!==i&&(r=i,o&&this._endPath(e),this._startPath(e,t,i,n)),this._drawItemShape(e,t,u),o=!0}o&&this._endPath(e);for(var l=0,c=this._items;l<c.length;l++){var u=c[l];this._drawItemText(e,t,u)}},e.prototype._drawWithoutOptimizations=function(e,t){for(var i,n,o=0,s=this._items;o<s.length;o++){var a=s[o],l=Object(r.ensureDefined)(a.style);i=Object(r.ensureDefined)(l.color),n=l.borderColor,this._startPath(e,t,i,n),this._drawItemShape(e,t,a),this._endPath(e),this._drawItemText(e,t,a)}},e.prototype._drawItemShape=function(e,t,i){var n=this;Object(f.drawScaled)(e,t.pixelRatio,(function(){return n._drawItemShapeUsingCSSPixels(e,i)}))},e.prototype._drawItemShapeUsingCSSPixels=function(e,t){},e.prototype._preDrawInit=function(){},e.prototype._startPath=function(e,t,i,n){},e.prototype._endPath=function(e){},e.prototype._getTextCache=function(e){var t=e.text||this._text,i=e.fontSize||this._fontSize,n=e.textAlign||this._textAlign;return this._textCache.get({text:t,bold:!1,italic:!1,font:_.CHART_FONT_FAMILY,fontSize:i,align:n})},e}(),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._startPath=function(e,t,i,n){e.beginPath(),e.lineWidth=this._lineWidth(t),e.lineCap="butt",e.strokeStyle=i},t.prototype._endPath=function(e){e.stroke()},t.prototype._lineWidth=function(e){return Math.max(1,Math.floor(2*e.pixelRatio))},t}(m),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._startPath=function(e,t,i,n){e.beginPath(),e.lineWidth=this._lineWidth(t),e.lineCap="butt",e.fillStyle=i,e.strokeStyle=n},t.prototype._endPath=function(e){e.fill(),e.stroke()},t.prototype._lineWidth=function(e){return Math.max(1,Math.floor(e.pixelRatio))},t}(m)},"2bPF":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("7KDR").Action,o=i("Ocx9").DefaultProperty,s=i("k9/m").PlotRowSearchMode,a=i("Ye2/").LineToolBarsPatternMode,l=window.t("Bars Pattern");function c(e,t){var r=t||c.createProperties();n.call(this,e,r),r.mirrored.listeners().subscribe(this,c.prototype.mirror),r.flipped.listeners().subscribe(this,c.prototype.flip),this._scaleCoeff=1,this.version=c.version,this._pattern=[],
this._properties.mode.listeners().subscribe(this,c.prototype.onModeChanged),i.e("lt-pane-views").then(function(e){var t=i("c6sA").BarsPatternPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(c,n),c.version=2,c.prototype.isSynchronizable=function(){return!1},c.prototype.onModeChanged=function(){var e=this.patternPriceDiff();e*=this._pressCoeff,this._points[1].price=this._timePoint[1].price=this._points[0].price+e},c.prototype.additionalActions=function(e){var t=this;return[new r({checked:this.properties().mirrored.value(),checkable:!0,label:window.t("Mirrored"),payload:{target:this},onExecute:function(t){var i=t.getPayload().target;e.setProperty(i.properties().mirrored,!i.properties().mirrored.value(),"Bats Pattern Mirroring"),i.updateAllViews(),i._model.updateSource(i)}}),new r({checked:this.properties().flipped.value(),checkable:!0,label:window.t("Flipped"),payload:{target:this},onExecute:function(t){var i=t.getPayload().target;e.setProperty(i.properties().flipped,!i.properties().flipped.value(),"Bats Pattern Flipping"),i.updateAllViews(),i._model.updateSource(i)}}),new r({checkable:!0,label:window.t("Restore Size"),onExecute:function(i){var n=t.points()[0],r=t.patternPriceDiff(),o=n.price+r,s=n.index+t._pattern.length-1;e.startChangingLinetool(t,{price:o,index:s},1,{}),e.changeLinePoint({price:o,index:s},{}),e.endChangingLinetool()}})]},c.prototype.pointsCount=function(){return 2},c.prototype.state=function(e){var t=n.prototype.state.call(this,e);return t.pattern=this._pattern,t},c.prototype.restoreData=function(e){e.pattern&&(this._pattern=e.pattern)},c.prototype.translatedType=function(){return l},c.prototype.name=function(){return"Bars Pattern"},c.prototype.hasEditableCoordinates=function(){return!1},c.prototype.cloneData=function(e){this._pattern=TradingView.clone(e._pattern)},c.prototype.mirror=function(){for(var e=this._pattern,t=e[0][TradingView.HIGH_PLOT],i=Math.min(e[0][TradingView.LOW_PLOT],e[0][TradingView.HIGH_PLOT]),n=Math.max(e[0][TradingView.LOW_PLOT],e[0][TradingView.HIGH_PLOT]),r=1;r<e.length;r++)i=Math.min(i,e[r][TradingView.LOW_PLOT]),n=Math.max(n,e[r][TradingView.HIGH_PLOT]);if(i<n){var o=(i+n)/2,s=function(e){return o-(e-o)};for(r=0;r<e.length;r++)e[r][TradingView.HIGH_PLOT]=s(e[r][TradingView.HIGH_PLOT]),e[r][TradingView.LOW_PLOT]=s(e[r][TradingView.LOW_PLOT]),e[r][TradingView.OPEN_PLOT]=s(e[r][TradingView.OPEN_PLOT]),e[r][TradingView.CLOSE_PLOT]=s(e[r][TradingView.CLOSE_PLOT])}var a=e[0][TradingView.HIGH_PLOT]-t,l=e[e.length-1][TradingView.LOW_PLOT]-e[0][TradingView.HIGH_PLOT];this._points[0].price+=a,this._points[1].price=this._points[0].price+l,this.updateAllViews()},c.prototype.flip=function(){this._points[0].price=this._points[1].price;for(var e=0;e<this._pattern.length/2;e++){var t=this._pattern[e];this._pattern[e]=this._pattern[this._pattern.length-e-1],this._pattern[this._pattern.length-e-1]=t}var i=this._pattern[this._pattern.length-1][TradingView.LOW_PLOT]-this._pattern[0][TradingView.HIGH_PLOT]
;this._points[1].price=this._points[0].price+i,this.updateAllViews()},c.prototype.firstPatternPrice=function(){var e=parseInt(this.properties().mode.value(),10);if(e===a.LineHL2)return(this._pattern[0][TradingView.HIGH_PLOT]+this._pattern[0][TradingView.LOW_PLOT])/2;var t={0:TradingView.HIGH_PLOT,1:TradingView.CLOSE_PLOT,2:TradingView.OPEN_PLOT,3:TradingView.OPEN_PLOT,4:TradingView.HIGH_PLOT,5:TradingView.LOW_PLOT}[e];return this._pattern[0][t]},c.prototype.lastPatternPrice=function(){var e=parseInt(this.properties().mode.value(),10);if(e===a.LineHL2)return(this._pattern[this._pattern.length-1][TradingView.HIGH_PLOT]+this._pattern[this._pattern.length-1][TradingView.LOW_PLOT])/2;var t={0:TradingView.LOW_PLOT,1:TradingView.CLOSE_PLOT,2:TradingView.CLOSE_PLOT,3:TradingView.OPEN_PLOT,4:TradingView.HIGH_PLOT,5:TradingView.LOW_PLOT}[e];return this._pattern[this._pattern.length-1][t]},c.prototype.patternPriceDiff=function(){return this.lastPatternPrice()-this.firstPatternPrice()},c.prototype.pressCoeff=function(){var e=this.patternPriceDiff(),t=this.points()[0].price,i=(this.points()[1].price-t)/e;return this._pressCoeff=i,i},c.prototype.addPoint=function(e,t){var i=this._model.mainSeries(),r=i.nearestIndex(e.index,s.NearestRight);this.properties().mode.value()===a.Bars?e.price=i.bars().valueAt(r)[TradingView.HIGH_PLOT]:e.price=i.bars().valueAt(r)[TradingView.CLOSE_PLOT];var o=this.priceScale(),l=this.ownerSource().firstValue(),c=.05*o.height(),u=o.priceToCoordinate(e.price,l)-c;e.price=o.coordinateToPrice(u,l);var h=n.prototype.addPoint.call(this,e,t,!0);if(h){var d=Math.min(this.points()[0].index,this.points()[1].index),p=Math.max(this.points()[0].index,this.points()[1].index),_=(r=this._model.mainSeries().nearestIndex(d,s.NearestRight),this._model.mainSeries().nearestIndex(p,s.NearestLeft));this.points()[0].index>this.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;l<this.period;l++)s+=l+1,a+=o.get(l);i=s/this.period,r=a/this.period;var c=0,u=0,h=0;for(l=0;l<this.period;l++)h+=Math.pow(r-o.get(l),2),u+=(i-l-1)*(r-o.get(l)),c+=Math.pow(i-l-1,2);return u=Math.pow(u,2),[Math.sqrt((h-u/c)/(this.period-2))]}}},{name:"Standard Error Bands",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Standard Error Bands@tv-basicstudies-1",scriptIdPart:"",name:"Standard Error Bands",description:"Standard Error Bands",shortDescription:"Standard Error Bands",plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,transparency:0,trackPrice:!1,color:"#138484"},plot_1:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#741B47"},plot_2:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#138484"}},filledAreasStyle:{fill_0:{color:"#FFD966",transparency:84,visible:!0}},precision:4,inputs:{periods:21,errors:2,method:"Simple",averagePeriods:3}},styles:{plot_0:{title:"Plot 1"},plot_1:{title:"Plot 2"},plot_2:{title:"Plot 3"}},filledAreas:[{id:"fill_0",objAId:"plot_0",objBId:"plot_2",type:"plot_plot",title:"Background"}],inputs:[{id:"periods",type:"integer",name:"Periods"},{id:"errors",type:"float",name:"Standard Errors"},{id:"method",name:"Method",type:"text",defval:"Simple",options:["Simple","Exponential","Weighted"]},{id:"averagePeriods",type:"integer",name:"Averaging Periods"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.errorDeviation=this._input(1),this.maMethod=this._input(2),this.averagePeriod=this._input(3)},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;l<this.period;l++)s+=l+1,a+=o.get(l);i=s/this.period,r=a/this.period;var c=0,u=0,h=0;for(l=0;l<this.period;l++)h+=Math.pow(r-o.get(l),2),u+=(i-l-1)*(r-o.get(l)),c+=Math.pow(i-l-1,2);u=Math.pow(u,2);var d,p,_,f=Math.sqrt((h-u/c)/(this.period-2)),m=n.Std.linreg(o,this.period,0),v=this._context.new_var(m+this.errorDeviation*f),y=this._context.new_var(m),g=this._context.new_var(m-this.errorDeviation*f);return"Simple"===this.maMethod?(d=n.Std.sma(v,this.averagePeriod,this._context),p=n.Std.sma(y,this.averagePeriod,this._context),_=n.Std.sma(g,this.averagePeriod,this._context)):"Exponential"===this.maMethod?(d=n.Std.ema(v,this.averagePeriod,this._context),
p=n.Std.ema(y,this.averagePeriod,this._context),_=n.Std.ema(g,this.averagePeriod,this._context)):(d=n.Std.wma(v,this.averagePeriod,this._context),p=n.Std.wma(y,this.averagePeriod,this._context),_=n.Std.wma(g,this.averagePeriod,this._context)),[d,p,_]}}},{name:"Fisher Transform",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"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF7F00"}},precision:4,bands:[{color:"#FF7F00",linestyle:2,linewidth:1,visible:!0,value:1.5},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:.75},{color:"#FF7F00",linestyle:2,linewidth:1,visible:!0,value:0},{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:-.75},{color:"#FF7F00",linestyle:2,linewidth:1,visible:!0,value:-1.5}],inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Fisher",histogramBase:0,joinPoints:!1,isHidden:!1},plot_1:{title:"Trigger",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Fisher Transform",shortDescription:"Fisher",is_price_study:!1,bands:[{id:"hline_0",name:"Level",isHidden:!1},{id:"hline_1",name:"Level",isHidden:!1},{id:"hline_2",name:"Level",isHidden:!1},{id:"hline_3",name:"Level",isHidden:!1},{id:"hline_4",name:"Level",isHidden:!1}],inputs:[{id:"in_0",name:"Length",defval:9,type:"integer",min:1,max:1e12}],id:"fisher_transform@tv-basicstudies-1",scriptIdPart:"",name:"Fisher Transform"},constructor:function(){this.f_0=function(e){var t=n.Std.lt(e,-.99)?-.999:e;return[n.Std.gt(e,.99)?.999:t]},this.f_1=function(){var e=this._input(0),t=this._context.new_var(n.Std.hl2(this._context)),i=n.Std.highest(t,e,this._context),r=this._context.new_var(n.Std.hl2(this._context)),o=n.Std.lowest(r,e,this._context),s=this._context.new_var(),a=this.f_0(.66*((n.Std.hl2(this._context)-o)/n.Std.max(i-o,.001)-.5)+.67*n.Std.nz(s.get(1)));s.set(a[0]);var l=this._context.new_var();l.set(.5*n.Std.log((1+s.get(0))/n.Std.max(1-s.get(0),.001))+.5*n.Std.nz(l.get(1)));var c=l.get(1);return[l.get(0),c]},this.main=function(e,t){return this._context=e,this._input=t,this.f_1()}}},{name:"Historical Volatility",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,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Historical Volatility",shortDescription:"HV",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:10,type:"integer",min:1,max:1e12}],id:"historical_volatility@tv-basicstudies-1",scriptIdPart:"",name:"Historical Volatility"},constructor:function(){this.f_0=function(){
var e=this._input(0),t=n.Std.or(n.Std.isintraday(this._context),n.Std.and(n.Std.isdaily(this._context),n.Std.eq(n.Std.interval(this._context),1)))?1:7,i=this._context.new_var(n.Std.close(this._context)),r=this._context.new_var(n.Std.log(n.Std.close(this._context)/i.get(1)));return[100*n.Std.stdev(r,e,this._context)*n.Std.sqrt(365/t)]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Hull MA",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}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Hull Moving Average",shortDescription:"HMA",is_price_study:!0,inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e4}],id:"Hull MA@tv-basicstudies-1",scriptIdPart:"",name:"Hull MA"},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=n.Std.close(this._context),r=this._input(0),o=r/2,s=this._context.new_var(i),a=n.Std.wma(s,o,this._context),l=this._context.new_var(i),c=n.Std.wma(l,r,this._context),u=this.f_0(a,c),h=n.Std.sqrt(r),d=n.Std.round(h),p=this._context.new_var(u);return[n.Std.wma(p,d,this._context)]}}},{name:"Ichimoku Cloud",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#0496ff"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#991515"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#459915"},plot_3:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"},plot_4:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#FF0000"}},precision:4,palettes:{palette_0:{colors:{0:{color:"#008000",width:1,style:0},1:{color:"#FF0000",width:1,style:0}}}},filledAreasStyle:{fill_0:{color:"#000080",transparency:90,visible:!0}},inputs:{in_0:9,in_1:26,in_2:52,in_3:26}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"},{id:"plot_3",type:"line"},{id:"plot_4",type:"line"},{id:"plot_5",palette:"palette_0",target:"fill_0",type:"colorer"}],styles:{plot_0:{title:"Conversion Line",histogramBase:0,joinPoints:!1,isHidden:!1},plot_1:{title:"Base Line",histogramBase:0,joinPoints:!1,isHidden:!1},plot_2:{title:"Lagging Span",histogramBase:0,joinPoints:!1,isHidden:!1},plot_3:{title:"Lead 1",histogramBase:0,joinPoints:!1,isHidden:!1},plot_4:{title:"Lead 2",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Ichimoku Cloud",shortDescription:"Ichimoku",is_price_study:!0,is_hidden_study:!1,id:"Ichimoku Cloud@tv-basicstudies-1",palettes:{palette_0:{colors:{0:{name:"Color 0"},1:{name:"Color 1"}},valToIndex:{0:0,1:1}}},filledAreas:[{id:"fill_0",objAId:"plot_3",objBId:"plot_4",type:"plot_plot",
title:"Plots Background",isHidden:!1,palette:"palette_0"}],inputs:[{id:"in_0",name:"Conversion Line Periods",defval:9,type:"integer",min:1,max:1e12},{id:"in_1",name:"Base Line Periods",defval:26,type:"integer",min:1,max:1e12},{id:"in_2",name:"Lagging Span 2 Periods",defval:52,type:"integer",min:1,max:1e12},{id:"in_3",name:"Displacement",defval:26,type:"integer",min:1,max:1e12}],scriptIdPart:"",name:"Ichimoku Cloud"},constructor:function(){this.donchian=function(e){var t=this._context.new_var(n.Std.low(this._context)),i=this._context.new_var(n.Std.high(this._context));return n.Std.avg(n.Std.lowest(t,e,this._context),n.Std.highest(i,e,this._context))},this.f_1=function(){var e=this._input(0),t=this._input(1),i=this._input(2),r=this._input(3),o=this.donchian(e),s=this.donchian(t),a=n.Std.avg(o,s),l=this.donchian(i);return[o,s,n.Std.close(this._context),a,l,1-r,r-1,r-1,n.Std.gt(a,l)?0:1]},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_1();return[i[0],i[1],{value:i[2],offset:i[5]},{value:i[3],offset:i[6]},{value:i[4],offset:i[7]},i[8]]}}},{name:"Keltner 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:"#0000FF"}},precision:4,filledAreasStyle:{fill_0:{color:"#0000FF",transparency:90,visible:!0}},inputs:{in_0:!0,in_1:20,in_2:1}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Upper",histogramBase:0,joinPoints:!1},plot_1:{title:"Middle",histogramBase:0,joinPoints:!1},plot_2:{title:"Lower",histogramBase:0,joinPoints:!1}},description:"Keltner Channels",shortDescription:"KC",is_price_study:!0,filledAreas:[{id:"fill_0",objAId:"plot_0",objBId:"plot_2",type:"plot_plot",title:"Plots Background"}],inputs:[{id:"in_0",name:"useTrueRange",defval:!0,type:"bool"},{id:"in_1",name:"length",defval:20,type:"integer",min:1,max:2e3},{id:"in_2",name:"mult",defval:1,type:"float",min:-1e12,max:1e12}],id:"Keltner Channels@tv-basicstudies-1",scriptIdPart:"",name:"Keltner Channels"},constructor:function(){this.f_0=function(e,t,i,n){return e?t:i-n},this.f_1=function(e,t,i){return e+t*i},this.f_2=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._input(2),a=this._context.new_var(i),l=n.Std.ema(a,o,this._context),c=this.f_0(r,n.Std.tr(this._context),n.Std.high(this._context),n.Std.low(this._context)),u=this._context.new_var(c),h=n.Std.ema(u,o,this._context);return[this.f_1(l,h,s),l,this.f_2(l,h,s)]}}},{name:"Klinger 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"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1}},description:"Klinger Oscillator",shortDescription:"Klinger Oscillator",is_price_study:!1,inputs:[],id:"Klinger Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Klinger Oscillator"},constructor:function(){this.f_0=function(e,t){return n.Std.ge(e,0)?t:-t},this.f_1=function(e,t){return e-t},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.hlc3(this._context),r=this._context.new_var(i),o=n.Std.change(r),s=this.f_0(o,n.Std.volume(this._context)),a=this._context.new_var(s),l=n.Std.ema(a,34,this._context),c=this._context.new_var(s),u=n.Std.ema(c,55,this._context),h=this.f_1(l,u),d=this._context.new_var(h);return[h,n.Std.ema(d,13,this._context)]}}},{name:"Know Sure Thing",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,bands:[{color:"#808080",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:10,in_1:15,in_2:20,in_3:30,in_4:10,in_5:10,in_6:10,in_7:15,in_8:9}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"KST",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1}},description:"Know Sure Thing",shortDescription:"KST",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"roclen1",defval:10,type:"integer",min:1,max:2e3},{id:"in_1",name:"roclen2",defval:15,type:"integer",min:1,max:2e3},{id:"in_2",name:"roclen3",defval:20,type:"integer",min:1,max:2e3},{id:"in_3",name:"roclen4",defval:30,type:"integer",min:1,max:2e3},{id:"in_4",name:"smalen1",defval:10,type:"integer",min:1,max:2e3},{id:"in_5",name:"smalen2",defval:10,type:"integer",min:1,max:2e3},{id:"in_6",name:"smalen3",defval:10,type:"integer",min:1,max:2e3},{id:"in_7",name:"smalen4",defval:15,type:"integer",min:1,max:2e3},{id:"in_8",name:"siglen",defval:9,type:"integer",min:1,max:2e3}],id:"Know Sure Thing@tv-basicstudies-1",scriptIdPart:"",name:"Know Sure Thing"},constructor:function(){this.f_0=function(e,t,i,n){return e+2*t+3*i+4*n},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=this._input(3),a=this._input(4),l=this._input(5),c=this._input(6),u=this._input(7),h=this._input(8),d=n.Std.close(this._context),p=i,_=this._context.new_var(d),f=n.Std.roc(_,p),m=a,v=this._context.new_var(f),y=n.Std.sma(v,m,this._context),g=r,b=this._context.new_var(d),S=n.Std.roc(b,g),w=l,P=this._context.new_var(S),C=n.Std.sma(P,w,this._context),x=o,T=this._context.new_var(d),I=n.Std.roc(T,x),M=c,L=this._context.new_var(I),O=n.Std.sma(L,M,this._context),k=s,A=this._context.new_var(d),E=n.Std.roc(A,k),V=u,D=this._context.new_var(E),B=n.Std.sma(D,V,this._context),R=this.f_0(y,C,O,B),N=this._context.new_var(R);return[R,n.Std.sma(N,h,this._context)]}}},{name:"Least Squares 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:25,in_1:0}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Least Squares Moving Average",shortDescription:"LSMA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:25,type:"integer",min:1,max:1e12},{id:"in_1",name:"Offset",defval:0,type:"integer",min:-1e12,max:1e12}],id:"Least Squares Moving Average@tv-basicstudies-1",scriptIdPart:"",name:"Least Squares Moving Average"},constructor:function(){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);return[n.Std.linreg(s,i,r)]}}},{name:"Linear Regression 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:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Linear Regression Curve",shortDescription:"LRC",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:9,type:"integer",min:1,max:2e3}],id:"Linear Regression Curve@tv-basicstudies-1",scriptIdPart:"",name:"Linear Regression Curve"},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.linreg(o,r,0)]}}},{name:"Linear Regression Slope",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Linear Regression Slope@tv-basicstudies-1",scriptIdPart:"",name:"Linear Regression Slope",description:"Linear Regression Slope",shortDescription:"Linear Regression Slope",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#FF0000"}},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.linregSlope=function(e,t,i){var n,r,o,s=0,a=0,l=0,c=0;for(n=0;n<t;++n)s+=o=t-1-n+1,a+=r=e.get(n),l+=o*o,c+=r*o;return(t*c-s*a)/(t*l-s*s)},this.main=function(e,t){this._context=e,this._input=t;var i=this._context.new_var(n.Std.close(this._context));return[this.linregSlope(i,this.period,0)]}}},{name:"MA 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:"MA Cross",shortDescription:"MA 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:"MA Cross@tv-basicstudies-1",scriptIdPart:"",name:"MA 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.sma(s,i,this._context),l=this._context.new_var(o),c=n.Std.sma(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:"MA with 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:10,in_1:10}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"MA",histogramBase:0,joinPoints:!1},plot_1:{title:"EMA",histogramBase:0,joinPoints:!1},plot_2:{title:"Crosses",histogramBase:0,joinPoints:!1}},description:"MA with EMA Cross",shortDescription:"MA/EMA Cross",is_price_study:!0,inputs:[{id:"in_0",name:"Length MA",defval:10,type:"integer",min:1,max:2e3},{id:"in_1",name:"Length EMA",defval:10,type:"integer",min:1,max:2e3}],id:"MA with EMA Cross@tv-basicstudies-1",scriptIdPart:"",name:"MA with 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.sma(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:"Mass 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:"#000080"}},precision:4,inputs:{in_0:10}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Mass Index",shortDescription:"Mass Index",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:10,type:"integer",min:1,max:2e3}],id:"Mass Index@tv-basicstudies-1",scriptIdPart:"",name:"Mass 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.high(this._context),n.Std.low(this._context)),o=this._context.new_var(r),s=n.Std.ema(o,9,this._context),a=this._context.new_var(s),l=n.Std.ema(a,9,this._context),c=this.f_1(s,l),u=this._context.new_var(c);return[n.Std.sum(u,i,this._context)]}}},{name:"McGinley Dynamic",metainfo:{_metainfoVersion:42,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"}},precision:4,inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"McGinley Dynamic",shortDescription:"McGinley Dynamic",is_price_study:!0,is_hidden_study:!1,id:"mcginley_dynamic@tv-basicstudies-1",inputs:[{id:"in_0",name:"length",defval:14,type:"integer",min:1,max:1e12}],scriptIdPart:"",name:"McGinley Dynamic"},constructor:function(){this.f_0=function(){var e=this._input(0),t=n.Std.close(this._context),i=this._context.new_var(t),r=n.Std.ema(i,e,this._context),o=this._context.new_var(),s=o.get(1)+(t-o.get(1))/(e*n.Std.pow(t/o.get(1),4));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:"Median Price",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"Median Price@tv-basicstudies-1",scriptIdPart:"",name:"Median Price",description:"Median Price",shortDescription:"Median 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.hl2(this._context)]}}},{name:"Momentum",metainfo:{_metainfoVersion:30,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:10,in_1:"close"}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Mom",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Momentum",shortDescription:"Mom",is_price_study:!1,inputs:[{id:"in_0",name:"Length",defval:10,type:"integer",min:1,max:2e3},{
id:"in_1",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]}],id:"Momentum@tv-basicstudies-1",scriptIdPart:"",name:"Momentum"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std[this._input(1)](this._context),o=this._context.new_var(r).get(i);return[o?r-o:null]}}},{name:"Money Flow 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:"#459915"}},precision:4,bands:[{color:"#c0c0c0",linestyle:2,linewidth:1,visible:!0,value:80},{color:"#c0c0c0",linestyle:2,linewidth:1,visible:!0,value:20}],filledAreasStyle:{fill_0:{color:"#9915ff",transparency:90,visible:!0}},inputs:{in_0:14}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Money Flow Index",shortDescription:"MFI",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:"Money Flow@tv-basicstudies-1",scriptIdPart:"",name:"Money Flow Index"},constructor:function(){this.f_0=function(e,t,i){return e*(n.Std.le(t,0)?0:i)},this.f_1=function(e,t,i){return e*(n.Std.ge(t,0)?0:i)},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),r=n.Std.hlc3(this._context),o=this._context.new_var(r),s=n.Std.change(o),a=this.f_0(n.Std.volume(this._context),s,r),l=this._context.new_var(a),c=n.Std.sum(l,i,this._context),u=this.f_1(n.Std.volume(this._context),s,r),h=this._context.new_var(u),d=n.Std.sum(h,i,this._context);return[n.Std.rsi(c,d)]}}},{name:"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:"#0000FF"}},precision:4,inputs:{in_0:9,in_1:"close",in_2:0}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Moving Average",shortDescription:"MA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:9,type:"integer",min:1,max:1e4},{id:"in_1",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]},{id:"in_2",name:"Offset",defval:0,type:"integer",min:-1e4,max:1e4}],id:"Moving Average@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=n.Std[this._input(1)](this._context),r=this._input(0),o=this._input(2),s=this._context.new_var(i);return[{value:n.Std.sma(s,r,this._context),offset:o}]}}},{name:"Moving Average 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:"#0000FF"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#CC0000"}},precision:4,filledAreasStyle:{fill_0:{color:"#A2C4C9",transparency:90,visible:!0}},inputs:{in_0:20,in_1:20,in_2:0,in_3:0}},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}},filledAreas:[{id:"fill_0",objAId:"plot_0",objBId:"plot_1",type:"plot_plot",title:"Plots Background"}],description:"Moving Average Channel",shortDescription:"MAC",is_price_study:!0,inputs:[{id:"in_0",name:"Upper Length",defval:20,type:"integer",min:1,max:1e4},{id:"in_1",name:"Lower Length",defval:20,type:"integer",min:1,max:1e4},{id:"in_2",name:"Upper Offset",defval:0,type:"integer",min:-1e4,max:1e4},{id:"in_3",name:"Lower Offset",defval:0,type:"integer",min:-1e4,max:1e4}],id:"Moving Average Channel@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Channel"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.high(this._context),r=n.Std.low(this._context),o=this._input(0),s=this._input(1),a=this._input(2),l=this._input(3),c=this._context.new_var(i),u=this._context.new_var(r);return[{value:n.Std.sma(c,o,this._context),offset:a},{value:n.Std.sma(u,s,this._context),offset:l}]}}},{name:"Moving Average Convergence/Divergence",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:"#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:"#FF0000"}},precision:4,inputs:{in_0:12,in_1:26,in_3:"close",in_2:9}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Histogram",histogramBase:0,joinPoints:!1},plot_1:{title:"MACD",histogramBase:0,joinPoints:!1},plot_2:{title:"Signal",histogramBase:0,joinPoints:!1}},description:"MACD",shortDescription:"MACD",is_price_study:!1,inputs:[{id:"in_0",name:"fastLength",defval:12,type:"integer",min:1,max:2e3},{id:"in_1",name:"slowLength",defval:26,type:"integer",min:1,max:2e3},{id:"in_3",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]},{id:"in_2",name:"signalLength",defval:9,type:"integer",min:1,max:50}],id:"Moving Average Convergence/Divergence@tv-basicstudies-1",scriptIdPart:"",name:"MACD"},constructor:function(){this.f_0=function(e,t){return e-t},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std[this._input(2)](this._context),r=this._input(0),o=this._input(1),s=this._input(3),a=this._context.new_var(i),l=n.Std.ema(a,r,this._context),c=this._context.new_var(i),u=n.Std.ema(c,o,this._context),h=this.f_0(l,u),d=this._context.new_var(h),p=n.Std.ema(d,s,this._context);return[this.f_0(h,p),h,p]}}},{name:"Moving Average Exponential",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:9,in_1:"close",in_2:0}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Moving Average Exponential",shortDescription:"EMA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:9,type:"integer",min:1,max:1e4},{id:"in_1",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]},{id:"in_2",name:"Offset",defval:0,type:"integer",min:-1e4,max:1e4}],id:"Moving Average Exponential@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Exponential"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=n.Std[this._input(1)](this._context),r=this._input(0),o=this._input(2),s=this._context.new_var(i);return[{value:n.Std.ema(s,r,this._context),offset:o}]}}},{name:"Moving Average Weighted",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:9,in_1:"close",in_2:0}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Moving Average Weighted",shortDescription:"WMA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:9,type:"integer",min:1,max:2e3},{id:"in_1",name:"Source",defval:"close",type:"source",options:["open","high","low","close","hl2","hlc3","ohlc4"]},{id:"in_2",name:"Offset",defval:0,type:"integer",min:-1e4,max:1e4}],id:"Moving Average Weighted@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Weighted"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=n.Std[this._input(1)](this._context),r=this._input(0),o=this._input(2),s=this._context.new_var(i);return[{value:n.Std.wma(s,r,this._context),offset:o}]}}},{name:"Moving Average Double",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,id:"Moving Average Double@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Double",description:"Moving Average Double",shortDescription:"Moving Average Double",is_price_study:!0,plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#85200C"},plot_1:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#1155CC"}},precision:4,inputs:{firstPeriods:14,secondPeriods:21,method:"Simple"}},styles:{plot_0:{title:"Plot 1"},plot_1:{title:"Plot 2"}},inputs:[{id:"firstPeriods",name:"1st Period",type:"integer",defval:14,min:1,max:1e4},{id:"secondPeriods",name:"2nd Period",type:"integer",defval:21,min:1,max:1e4},{id:"method",name:"Method",type:"text",defval:"Simple",options:["Simple","Exponential","Weighted"]}]},constructor:function(){this.main=function(e,t){
this._context=e,this._input=t;var i,r,o=this._context.new_var(n.Std.close(this._context));return"Exponential"===this._input(2)?(i=n.Std.ema(o,this._input(0),this._context),r=n.Std.ema(o,this._input(1),this._context)):"Weighted"===this._input(2)?(i=n.Std.wma(o,this._input(0),this._context),r=n.Std.wma(o,this._input(1),this._context)):(i=n.Std.sma(o,this._input(0),this._context),r=n.Std.sma(o,this._input(1),this._context)),[i,r]}}},{name:"Moving Average Triple",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Moving Average Triple@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Triple",description:"Moving Average Triple",shortDescription:"Moving Average Triple",plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,transparency:0,trackPrice:!1,color:"#85200C"},plot_1:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#1155CC"},plot_2:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#F1C232"}},precision:4,inputs:{firstPeriods:14,secondPeriods:21,thirdPeriods:35,method:"Simple"}},styles:{plot_0:{title:"Plot 1"},plot_1:{title:"Plot 2"},plot_2:{title:"Plot 3"}},inputs:[{id:"firstPeriods",name:"1st Period",type:"integer",defval:14,min:1,max:1e4},{id:"secondPeriods",name:"2nd Period",type:"integer",defval:21,min:1,max:1e4},{id:"thirdPeriods",name:"3rd Period",type:"integer",defval:35,min:1,max:1e4},{id:"method",name:"Method",type:"text",defval:"Simple",options:["Simple","Exponential","Weighted"]}]},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i,r,o,s=this._context.new_var(n.Std.close(this._context));return"Exponential"===this._input(3)?(i=n.Std.ema(s,this._input(0),this._context),r=n.Std.ema(s,this._input(1),this._context),o=n.Std.ema(s,this._input(2),this._context)):"Weighted"===this._input(3)?(i=n.Std.wma(s,this._input(0),this._context),r=n.Std.wma(s,this._input(1),this._context),o=n.Std.wma(s,this._input(2),this._context)):(i=n.Std.sma(s,this._input(0),this._context),r=n.Std.sma(s,this._input(1),this._context),o=n.Std.sma(s,this._input(2),this._context)),[i,r,o]}}},{name:"Moving Average Modified",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Moving Average Modified@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Modified",description:"Moving Average Modified",shortDescription:"Moving Average Modified",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,transparency:0,trackPrice:!1,color:"#85200C"}},precision:4,inputs:{periods:10}},styles:{plot_0:{title:"Plot 1"}},inputs:[{id:"periods",name:"Period",type:"integer",defval:10,min:1,max:1e4}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.periods=this._input(0),this.mmaPrev=NaN},this.mma=function(e){var t=this.periods,i=NaN
;return i=isNaN(this.mmaPrev)?n.Std.sma(e,t,this._context):(this.mmaPrev*(t-1)+e.get())/t,this.mmaPrev=i,i},this.main=function(e,t){this._context=e,this._input=t;var i=this._context.new_var(n.Std.close(this._context));return[this.mma(i,0),this.mma(i,1),this.mma(i,2)]}}},{name:"Moving Average Adaptive",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Moving Average Adaptive@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Adaptive",description:"Moving Average Adaptive",shortDescription:"Moving Average Adaptive",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,transparency:0,trackPrice:!1,color:"#85200C"}},precision:4,inputs:{periods:10}},styles:{plot_0:{title:"Plot 1"}},inputs:[{id:"periods",name:"Period",type:"integer",defval:10,min:1,max:1e4}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.periods=this._input(0),this.amaPrev=NaN},this.ama=function(e,t){var i=this.periods,r=e.get(),o=n.Std.stdev(t,i,this._context),s=n.Std.log(r/e.get(i))/(o*Math.sqrt(i)),a=.1*Math.abs(s),l=(r-this.amaPrev)*a+this.amaPrev;return this.amaPrev=isNaN(l)?r:l,l},this.main=function(e,t){this._context=e,this._input=t;var i=this._context.new_var(n.Std.close(this._context)),r=this._context.new_var(n.Std.log(i.get()/i.get(1)));return[this.ama(i,r)]}}},{name:"Moving Average Hamming",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Moving Average Hamming@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Hamming",description:"Moving Average Hamming",shortDescription:"Moving Average Hamming",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,transparency:0,trackPrice:!1,color:"#85200C"}},precision:4,inputs:{periods:10}},styles:{plot_0:{title:"Plot 1"}},inputs:[{id:"periods",name:"Period",type:"integer",defval:10,min:1,max:1e4}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.periods=this._input(0);for(var i=[],n=0,r=1;r<=this.periods;++r){var o=Math.sin((1+r)/this.periods*Math.PI/2);i.unshift(o),n+=o}this.hmaFactors=i,this.hmaFactorsSum=n},this.hma=function(e){for(var t=this.periods,i=0,n=0;n<t;++n)i+=e.get(t-n-1)*this.hmaFactors[n];return i/=this.hmaFactorsSum},this.main=function(e,t){this._context=e,this._input=t;var i=this._context.new_var(n.Std.close(this._context));return[this.hma(i)]}}},{name:"Moving Average Multiple",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!0,id:"Moving Average Multiple@tv-basicstudies-1",scriptIdPart:"",name:"Moving Average Multiple",description:"Moving Average Multiple",shortDescription:"Moving Average Multiple",plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"},{id:"plot_3",type:"line"},{id:"plot_4",type:"line"},{id:"plot_5",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,transparency:0,
trackPrice:!1,color:"#512DA8"},plot_1:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#F57C00"},plot_2:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#26A69A"},plot_3:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#FBC02D"},plot_4:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#EC407A"},plot_5:{linestyle:0,visible:!0,linewidth:1,transparency:0,plottype:0,trackPrice:!1,color:"#5A54FF"}},precision:4,inputs:{firstPeriods:14,secondPeriods:21,thirdPeriods:35,fourthPeriods:50,fifthPeriods:100,sixthPeriods:200,method:"Simple"}},styles:{plot_0:{title:"Plot 1"},plot_1:{title:"Plot 2"},plot_2:{title:"Plot 3"},plot_3:{title:"Plot 4"},plot_4:{title:"Plot 5"},plot_5:{title:"Plot 6"}},inputs:[{id:"firstPeriods",name:"1st Period",type:"integer",defval:14,min:1,max:1e4},{id:"secondPeriods",name:"2nd Period",type:"integer",defval:21,min:1,max:1e4},{id:"thirdPeriods",name:"3rd Period",type:"integer",defval:35,min:1,max:1e4},{id:"fourthPeriods",name:"4th Period",type:"integer",defval:50,min:1,max:1e4},{id:"fifthPeriods",name:"5th Period",type:"integer",defval:100,min:1,max:1e4},{id:"sixthPeriods",name:"6th Period",type:"integer",defval:200,min:1,max:1e4},{id:"method",name:"Method",type:"text",defval:"Simple",options:["Simple","Exponential","Weighted"]}]},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i,r,o,s,a,l,c=this._context.new_var(n.Std.close(this._context));return"Exponential"===this._input(6)?(i=n.Std.ema(c,this._input(0),this._context),r=n.Std.ema(c,this._input(1),this._context),o=n.Std.ema(c,this._input(2),this._context),s=n.Std.ema(c,this._input(3),this._context),a=n.Std.ema(c,this._input(4),this._context),l=n.Std.ema(c,this._input(5),this._context)):"Weighted"===this._input(6)?(i=n.Std.wma(c,this._input(0),this._context),r=n.Std.wma(c,this._input(1),this._context),o=n.Std.wma(c,this._input(2),this._context),s=n.Std.wma(c,this._input(3),this._context),a=n.Std.wma(c,this._input(4),this._context),l=n.Std.wma(c,this._input(5),this._context)):(i=n.Std.sma(c,this._input(0),this._context),r=n.Std.sma(c,this._input(1),this._context),o=n.Std.sma(c,this._input(2),this._context),s=n.Std.sma(c,this._input(3),this._context),a=n.Std.sma(c,this._input(4),this._context),l=n.Std.sma(c,this._input(5),this._context)),[i,r,o,s,a,l]}}},{name:"Majority Rule",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Majority Rule@tv-basicstudies-1",scriptIdPart:"",name:"Majority Rule",description:"Majority Rule",shortDescription:"Majority Rule",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:{rollingPeriod:14}},styles:{plot_0:{title:"Majority Rule"}},inputs:[{id:"rollingPeriod",type:"integer",name:"Rolling Period"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,
this.rollingPeriod=this._input(0)},this.main=function(e,t){this._context=e,this._input=t;var i,r=n.Std.close(this._context);return i=r>this._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;o<this.period;o++){var s=e.get(o);r+=(this.period-1-o)*s,i+=s*s}var a=r-this.invertedPeriod*this.sumX*t,l=(this.sumXX-this.invertedPeriodSumXSumX)*(i-this.invertedPeriod*t*t);return l<0?0==a?0:a>0?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;n<i;n++)o+=(r=e.get(n)-t)*r;return o/(i-1)},this.standardHistVol=function(){var e=this._context.new_var(n.Std.close(this._context)),t=this._context.new_var(n.Std.log(e.get()/e.get(1)));return 100*this.stdev(t,this.period,this._context)*n.Std.sqrt(this.daysPerYear)},this.main=function(e,t){return this._context=e,this._input=t,[this.standardHistVol()]}}},{name:"Volatility Zero Trend Close-to-Close",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Volatility Zero Trend Close-to-Close@tv-basicstudies-1",scriptIdPart:"",name:"Volatility Zero Trend Close-to-Close",description:"Volatility Zero Trend Close-to-Close",shortDescription:"Volatility Zero Trend 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",min:0,max:1e4},{id:"daysPerYear",name:"Days Per Year",type:"integer"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.daysPerYear=this._input(1),this.currTime=NaN,this.prevTime=NaN},this.volatliityZTCTC=function(){var e=this._context.new_var(n.Std.close(this._context));this.prevTime=this.currTime,this.currTime=e.symbol.time
;for(var t=Math.sqrt((this.currTime-this.prevTime)/864e5/this.daysPerYear),i=Math.log(n.Std.close(this._context)/e.get(1)),r=this._context.new_var(i/t),o=this._context.new_var(Math.pow(r,2)),s=0,a=0;a<this.period;a++)s+=o.get(a);return 100*Math.sqrt(s/this.period)},this.main=function(e,t){return this._context=e,this._input=t,[this.volatliityZTCTC()]}}},{name:"Volatility O-H-L-C",metainfo:{_metainfoVersion:41,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Volatility O-H-L-C@tv-basicstudies-1",scriptIdPart:"",name:"Volatility O-H-L-C",description:"Volatility O-H-L-C",shortDescription:"Volatility O-H-L-C",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:10,marketClosedPercentage:0,daysPerYear:252}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",type:"integer",name:"Periods"},{id:"marketClosedPercentage",type:"float",name:"Market Closed Percentage",min:0,max:.999},{id:"daysPerYear",type:"integer",name:"Days Per Year"}]},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0),this.marketClosedPercentage=this._input(1),this.daysPerYear=this._input(2),this.secondsPerYear=86400*this.daysPerYear,this.currTime=NaN,this.prevTime=NaN},this.square=function(e){return e*e},this.volatilityOHLC=function(){var e=this._context.new_var(Math.log(n.Std.open(this._context))),t=this._context.new_var(Math.log(n.Std.high(this._context))),i=this._context.new_var(Math.log(n.Std.low(this._context))),r=this._context.new_var(Math.log(n.Std.close(this._context))),o=this._context.new_var(n.Std.close(this._context));this.prevTime=this.currTime,this.currTime=o.symbol.time;var s=(this.currTime-this.prevTime)/1e3,a=.5*this.square(t.get()-i.get());a-=(Math.log(4)-1)*this.square(r.get()-e.get()),this.marketClosedPercentage>0&&(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;r<this.bars.length;r++)this.bars[r]>n&&(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.count<this.period){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);this.atr+=Math.max(e,t,i),n.Std.close(this._context)>this.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="SHORT",this.sic=n.Std.close(this._context),this.nextsar=this.sic+this.computeATR()):(this.position="LONG",this.sic=Math.max(n.Std.close(this._context),this.sic),this.nextsar=this.sic-this.computeATR()):"SHORT"===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;i<this.backColorers.length;i++)t=Math.min(t,this.backColorers[i].firstColoredBar(e));var n=this.getOffset(this._plotIndex);t=Math.min(t,e+n);var r=this.getBars().firstIndex();return Math.max(t,r)},s.prototype.getOffset=function(){var e=this._study.metaInfo().plots[this._plotIndex];return this._study.offset(e.id)},s.prototype.applyBarStyle=function(e,t,i){if(i||(i={}),t)return i;var n=this._study.properties();if(!n.visible.value())return i;var r=this._study.metaInfo(),o=this._study.data();if(!o||0===o.size())return i;var s=r.plots[this._plotIndex],a=this.getOffset();if(this._study.getMinFirstBarIndexForPlot(s.id)>e+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<t.length;e++)if(t[e].isShown())return t[e];return null}}(n||(n={}))},"5ZUI":function(e,t,i){"use strict";var n=i("WPQD").LineToolTrendLine,r=i("Ocx9").DefaultProperty,o=window.t("Ray");function s(e,t){var i=t||s.createProperties();n.call(this,e,i)}inherit(s,n),s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Ray"},s.createProperties=function(e){var t=new r("linetoolray",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolRay=s},"5fI3":function(e,t,i){"use strict";function n(e){return"="+JSON.stringify(e)}i.r(t),i.d(t,"encodeExtendedSymbol",(function(){return n}))},"5mo2":function(e,t,i){"use strict";i.r(t);var n=i("jCNj"),r=i("Y7w9"),o=i("txPx"),s=i("OBgQ"),a=Object(o.getLogger)("Chart.Model.SessionSpec");function l(e){return 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;n<r.length;n++){var o=r[n];this.entries.push(e._createSessionEntry(o,0,0,0,0))}else{
for(var s=!1,l=new Map,c=0,d=i.split("|");c<d.length;c++){var _=d[c],f=_.split(":");if(1===f.length||2===f.length){var m=1===f.length;if(m){if(s){a.logError("Duplicated default section: "+_);continue}s=!0}for(var v=0,y=m?u:e._parseWorkingDays(f[1]);v<y.length;v++){var g=y[v];m&&l.has(g)||l.set(g,f[0])}}else a.logError("Bad session section: "+_)}for(var b=0,S=h;b<S.length;b++){g=S[b];var w=l.get(g);if(void 0!==w)for(var P=0,C=w.split(",");P<C.length;P++){var x=C[P];this.entries.push(e._parseSessionEntry(g,x))}}}this.entries.sort(p);for(var T=new Set,I=0,M=this.entries;I<M.length;I++){var L=M[I];T.add(L.dayOfWeek())}this.weekEndsCount=7-T.size},e.parseHolidaysAndCorrections=function(e,t,i){var r=this,o=new Map,s=new Map,a=function(e){var t=r._parseDay(e),i=t.toString(),n=s.get(i);return void 0!==n?n:(s.set(i,t),t)};if(""!==t)for(var l=[],c=0,u=t.split(",");c<u.length;c++){if(8!==(S=u[c]).length)throw new Error("bad holiday date: "+S);var h=a(S);o.set(h,l)}if(""===i)return o;for(var d=n.get_timezone("Etc/UTC"),p=0,f=i.split(";");p<f.length;p++){var m=f[p],v=m.split(":");if(2!==v.length)throw new Error("bad correction section: "+m);var y=[];if("dayoff"!==v[0])for(var g=0,b=v[0].split(",");g<b.length;g++){var S=b[g];y.push(this._parseSessionEntry(1,S))}for(var w=0,P=v[1].split(",");w<P.length;w++){if(8!==(S=P[w]).length)throw new Error("bad correction date: "+S);h=a(S);for(var C=n.get_day_of_week(n.get_cal(d,h.year,h.month-1,h.day)),x=[],T=0,I=y;T<I.length;T++){var M=I[T];x.push(new _(C,M.startOffset(),M.length()))}o.set(h,x)}}return o},e.prototype._clear=function(){this.entries=[],this.timezone="",this.firstDayOfWeek=n.MONDAY,this.weekEndsCount=-1},e.prototype._parseFirstDayOfWeek=function(e){var t=e.split(";");if(t.length>2)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])),r<n.SUNDAY||r>n.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;i<e.length;i++){var n=+e[i];-1===t.indexOf(n)&&t.push(n)}return t},e._minutesFromHHMM=function(e){return n.get_minutes_from_hhmm(e)},e._createSessionEntry=function(e,t,i,r,o){
return 0===i&&(i=n.minutesPerDay),r===o&&i<=t&&(r+=1),r>0&&(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 e<n.SUNDAY&&(e+=7),e},e.prototype.length=function(){return this._length},e.prototype.weight=function(){return this._dayOfWeek*n.minutesPerDay+this._start},e.prototype.compareTo=function(e){var t=this.weight(),i=t+this._length,n=e.weight(),r=n+e._length;return t<=n&&n<i||n<=t&&t<r?0:t>n?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&&r<this._start+this._length},e}(),f=function(){function e(e,t,i){this.weekIndex=e,this.entryIndex=t,this.entries=i}return e.prototype.getEntry=function(){return this.entries[this.entryIndex]},e}();function m(e,t){var i=Object(r.lowerbound)(e,t,(function(e,t){return-1===e.day.compareTo(t)}));return i===e.length?null:e[i]}var v=function(){function e(e,t,i,r){var o=this;void 0===e&&(e="Etc/UTC"),void 0===t&&(t="0000-0000"),void 0===i&&(i=""),void 0===r&&(r=""),this._entries=[],this._firstDayOfWeek=n.MONDAY,this._entriesHash=new Map,this._holidayAndCorrectionMap=new Map,this._holidaySessions=[];var s=new c;s.parseSessions(e,t),this._entries=s.entries,this._timezone=s.timezone,this._firstDayOfWeek=s.firstDayOfWeek,this._weekEndsCount=s.weekEndsCount;var a=c.parseHolidaysAndCorrections(e,i,r),l=n.get_timezone(e);this._isThereCorrections=""!==i||""!==r,a.forEach((function(e,t){o._holidayAndCorrectionMap.set(t.toString(),e),o._holidaySessions.push({day:t,sessions:e});var i=o.getWeekIndex(t.toCalendar(l));o._entriesHash.set(i,null)})),this._holidaySessions.sort((function(e,t){return e.day.compareTo(t.day)}))}return e.prototype.entries=function(){return this._entries},e.prototype.timezone=function(){return this._timezone},e.prototype.firstDayOfWeek=function(){return this._firstDayOfWeek},
e.prototype.addSessionEntry=function(e,t,i,r,o){0===i&&(i=n.minutesPerDay),r===o&&i<=t&&(r+=1),r>0&&(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;i<n.length;i++){n[i].sessions.forEach((function(t){e=Math.max(e,t.length())}))}return this._entries.forEach((function(e){t=Math.max(t,e.length())})),Math.max(e,t)},e.prototype.isWeekEnd=function(e){var t=Object(r.lowerbound)(this._entries,new _(e,0,0),(function(e,t){return e.dayOfWeek()<t.dayOfWeek()}));return t>this._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;l<a.length;l++){var c=a[l].day.toCalendar(t);this.isWeekEnd(n.get_day_of_week(c))?o+=0===a[l].sessions.length?0:-1:o+=0===a[l].sessions.length?1:0}return o},e.prototype.intradayCanBeBuiltFrom24x7=function(e){return this._entries.every((function(t){return t.start()%e==0&&t.length()%e==0}))},e.prototype.indexOfSession=function(e,t,i){var o=this._getEntriesForWeek(e),s=Object(r.lowerbound)(o,new _(t,i,0),d);if(s!==o.length)return new f(e,s,o);var a=e,l=7-t+this._firstDayOfWeek-1;for(i=-(n.minutesPerDay-i+l*n.minutesPerDay);;){a++;var c=this._getEntriesForWeek(a);if(0!==c.length)return s=Object(r.lowerbound)(c,new _(this._firstDayOfWeek,i,0),d),new f(a,s,c)}},e.prototype.findSession=function(e,t,i,n){void 0===n&&(n=0);var r=this.indexOfSession(e,t,i),o=r.entries,s=r.entryIndex;if(0!==n)for(var a=o[s].dayOfWeek(),l=n>0?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;s<t;){for(var a=this._getEntriesForWeek(i),l=0,c=r;c<=n.SATURDAY;c++){o++;for(var u=!0;l<a.length&&!(a[l].dayOfWeek()>c);)a[l].dayOfWeek()<c||u&&(u=!1,s++),l++;if(s>=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;o<t;){for(var a=this._getEntriesForWeek(i),l=0,c=r;c<=n.SATURDAY;c++){o++;for(var u=!0;l<a.length&&!(a[l].dayOfWeek()>c);)a[l].dayOfWeek()<c||u&&(u=!1,s++),l++;if(o>=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);u<h.length;u++){c(h[u])}return t.sort(p),this._entriesHash.set(e,t),t},e.prototype._selectHolidays=function(e,t){for(var i=[],n=e;;){var r=m(this._holidaySessions,n);if(null===r)return i;if(!r.day.before(t))return i;i.push(r),n=r.day.addDays(1)}},e.prototype._weekIndexToCalendar=function(e){var t=1e3*(86400*e*7+86400)-621672192e5,i=n.get_cal_from_unix_timestamp_ms(n.get_timezone("Etc/UTC"),t),r=n.get_timezone("Etc/UTC");return n.get_cal(r,n.get_year(i),n.get_month(i),n.get_day_of_month(i))},e.prototype._alignToNearestSessionValue=function(e,t,i){var r=n.get_day_of_week(e),o=60*n.get_hours(e)+n.get_minutes(e),s=this.getWeekIndex(e),a=this.findSession(s,r,o);if(a.getEntry().contains(e)&&s===a.weekIndex||1===t)return i(a,n.clone(e),t);var l=a.entryIndex-1;if(l<0){for(var c=a.weekIndex,u=a.entries;l<0;)c--,l+=(u=this._getEntriesForWeek(c)).length;a=new f(c,l,u)}else a=new f(a.weekIndex,l,a.entries);return i(a,n.clone(e),t)},e.prototype._entrySessionStart=function(e,t,i){return this._entrySessionValue(e,t,i,(function(e){return 60*e.start()}))},e.prototype._entrySessionEnd=function(e,t,i){return this._entrySessionValue(e,t,i,(function(e){return 60*(e.start()+e.length())-1}))},
e.prototype._entrySessionValue=function(e,t,i,r){var o=n.get_day_of_week(t),s=e.getEntry(),a=s.dayOfWeek()-s.sessionStartDaysOffset(),l=this.getWeekIndex(t),c=e.weekIndex-l,u=!1;if(a<n.SUNDAY&&(c<=0?u=!0:c--,a+=7),(c>0&&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<this._exclusions.length;++i)t.addExclusion(this._exclusions[i]);return t},s.prototype.merge=function(e,i){var n=t.prototype.merge.call(this,this.unpackLevels(e),i);return this.updateCollectibleProperty(),n},s.prototype._map={prefixes:[""],range:[0,0],names:["coeff","color","visible","linestyle","linewidth"],typecheck:{pack:Object,unpack:Array}},s.prototype._packLvlTpl=function(){return[]},s.prototype._unpackLvlTpl=function(){return{}},s.prototype._packLvlFill=function(e,t,i,n){return n.push(i[t]),n},s.prototype._unpackLvlFill=function(e,t,i,n){return n[t]=i[e],n},s.prototype._iterateLevels=function(e,t){for(var i in this._map.prefixes)for(var r=(this._map.prefixes[i]||"")+"level",o=this._map.range[0];o<=this._map.range[1];o++)if(e[r+o]&&n(e[r+o],t.typecheck())){var s=t.tpl();for(var a in this._map.names)s=t.fill(a,this._map.names[a],e[r+o],s);e[r+o]=s}return e},s.prototype.packLevels=function(e){return this._iterateLevels(e,{tpl:this._packLvlTpl,fill:this._packLvlFill,typecheck:this._map.typecheck.pack})},s.prototype.unpackLevels=function(e){return this._iterateLevels(e,{tpl:this._unpackLvlTpl,fill:this._unpackLvlFill,typecheck:this._map.typecheck.unpack})},s.prototype.saveDefaults=function(){TradingView.saveDefaults(this._defaultName,this.state(this._exclusions,!0))},s.prototype.updateCollectibleProperty=function(){if(this.__collectibleLines){var e=this,t=[];this.__collectibleLines._childs.forEach((function(i){for(var n=e.__collectibleLines[i].value().split("."),r=e[n[0]],o=1;o<n.length&&r;++o)r=r[n[o]];r&&t.push({property:r.color,defaultValue:r.color.value()})})),
this.collectibleColors?this.collectibleColors.reloadProperties(t):this.collectibleColors=new o(t)}},e.exports=s}).call(this,i("tc+8"))},"68at":function(e,t,i){"use strict";var n=i("5rJj"),r=i("9QkW").LineToolFibWedge,o=i("xUGI"),s=i("Ss5c").LineDataSource,a=window.t("Projection");function l(){o.call(this)}function c(e,t){var n=t||c.createProperties();s.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("jlk4").ProjectionLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(l,o),l.prototype.levelsCount=function(){return 1},inherit(c,r),c.prototype.levelsCount=function(){return 1},c.prototype.translatedType=function(){return a},c.prototype.name=function(){return"Projection"},c.prototype.hasEditableCoordinates=function(){return!1},c.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("LzAw").ProjectionDefinitionsViewModel}.bind(null,i)).catch(i.oe)},c.createProperties=function(e){var t=new n("linetoolprojection",e,!1,{range:[1,1]});return c._configureProperties(t),t},c._configureProperties=function(e){r._configureProperties(e)},t.LineToolProjection=c},"6Fc/":function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererArrowsUpDownItem",(function(){return a})),i.d(t,"calculateVerticalOffset",(function(){return l})),i.d(t,"calculateMinHeight",(function(){return c})),i.d(t,"PaneRendererArrowsUpDown",(function(){return h}));var n=i("mrSG"),r=i("aO4+"),o=i("VdBB"),s=i("Hr11"),a=function(e){function t(t,i,n,r){var o=e.call(this,t,i)||this;return o.height=n,o.isUp=r,o}return Object(n.__extends)(t,e),t}(r.Point);function l(e){return Math.round(e/4)}function c(e){return u(e)}function u(e){return Math.round(e/2)}var h=function(){function e(e){this._data=e}return e.prototype.draw=function(e,t){var i=t.pixelRatio,n=this._data,r=u(n.barSpacing),o=l(n.barSpacing),a=r<4,c=Math.max(r/2,1),h=Object(s.ceiledEven)(r*i),d=h/2,p=Math.round(r*i);e.lineCap="butt",e.lineWidth=Math.max(1,Math.floor(i));for(var _=e.lineWidth%2?.5:0,f=0,m=n.items;f<m.length;f++){var v=m[f],y=v.isUp?-1:1,g=Math.round(Math.abs(v.height)*i),b=Math.round(v.x*i)+_,S=Math.round((v.y-y*o)*i)+_;e.beginPath(),e.translate(b,S),a?(e.moveTo(0,0),e.lineTo(-d,-d*y),e.moveTo(0,0),e.lineTo(d,-d*y),e.moveTo(0,0),e.lineTo(0,-g*y),e.moveTo(-d,-g*y),e.lineTo(d,-g*y),e.lineWidth=c,e.strokeStyle=v.isUp?n.colorup:n.colordown,e.stroke()):(e.moveTo(0,0),g<p?(e.lineTo(h,-g*y),e.lineTo(-h,-g*y)):(e.lineTo(h,-p*y),e.lineTo(d,-p*y),e.lineTo(d,-g*y),e.lineTo(-d,-g*y),e.lineTo(-d,-p*y),e.lineTo(-h,-p*y)),e.lineTo(0,0),e.strokeStyle=v.isUp?n.colorBorderUp:n.colorBorderDown,e.stroke(),e.fillStyle=v.isUp?n.colorup:n.colordown,e.fill()),e.translate(-b,-S)}},e.prototype.hitTest=function(e){for(var t=this._data,i=u(t.barSpacing),n=Math.round(i/2),r=Math.round(i),s=l(t.barSpacing),a=0,c=t.items;a<c.length;a++){var h=c[a];if(h&&(Number.isFinite(h.x)&&Number.isFinite(h.y))){
var d=Math.abs(h.height),p=h.isUp?-1:1,_=d+r,f=h.y-p*s,m=f-p*_,v=h.x-n,y=h.x+n;if(v<e.x&&e.x<y&&(h.isUp?f<e.y&&e.y<m:m<e.y&&e.y<f))return new o.HitTestResult(o.HitTestResult.REGULAR)}}return null},e}()},"6I19":function(e,t,i){"use strict";i.d(t,"a",(function(){return P}));var n=i("mrSG"),r=i("Eyy1"),o=i("ivNn"),s=i("eJTA"),a=i("YFKU"),l=i("qFKp"),c=i("Tmoa"),u=i("Ialn"),h=i("k9/m"),d=i("CW80"),p=i("mMWL"),_=i("GH0z"),f=i("38az"),m=i("7qT/"),v=l.CheckMobile.any(),y=v&&!0,g=new _.PercentageFormatter,b=window.t("n/a"),S=b+" ("+b+"%)";function w(e,t){var i=Object(s.parseRgb)(t),n=Object(s.parseRgb)(e);return Object(s.distanceRgb)(i,n)<70?Object(s.rgbToHexString)(Object(s.invertRgb)(i)):t}var P=function(){function e(e,t){this._series=e,this._model=t,this._emptyValues=[{title:Object(a.t)("Open"),visible:!1,value:"",index:0,id:""},{title:Object(a.t)("High"),visible:!1,value:"",index:1,id:""},{title:Object(a.t)("Low"),visible:!1,value:"",index:2,id:""},{title:Object(a.t)("Close"),visible:!1,value:"",index:3,id:""},{title:"",visible:!1,value:"",index:4,id:""},{title:"",visible:!1,value:"",index:5,id:""},{title:Object(a.t)("Change"),visible:!1,value:"",index:6,id:""}]}return e.prototype.getItems=function(){return this._emptyValues},e.prototype.getValues=function(e){for(var t=this._emptyValues.map((function(e){return Object(n.__assign)({},e)})),i=this._showLastPriceAndChangeOnly(),s=0,a=t;s<a.length;s++){a[s].visible=!i}t[0].value=b,t[1].value=b,t[2].value=b,t[3].value=b,t[6].value=S,t[5].visible=!1;var l=t[4];if(l.value=b,l.visible=!1,this._model.timeScale().isEmpty()||0===this._series.bars().size()||this._series.priceScale().isEmpty())return t;Object(o.isNumber)(e)||(e=Object(r.ensureNotNull)(this._series.data().last()).index);var d=this._series.nearestIndex(e,h.PlotRowSearchMode.NearestLeft);if(void 0===d)return t;var p=this._series.data().valueAt(d),_=function(e){if(null===e)return null;var t=e.properties().child("background");return void 0===t?null:t.value()}(this._series.model().paneForSource(this._series));if(null===p||null===_)return t;var m=p[1],v=p[2],P=p[3],C=p[4];if(null==m||null==v||null==P||null==C)return t;var x=this._series.formatter(),T=S,I=this._changesData(C,d,i);void 0!==I.values&&(T=Object(u.forceLTRStr)(x.format(I.values.change,!0)+" ("+g.format(I.values.percentChange,!0)+")")),t[6].value=T,i?(t[5].value=x.format(C),t[5].visible=!0,t[6].visible=!0):(t[0].value=x.format(m),t[1].value=x.format(v),t[2].value=x.format(P),t[3].value=x.format(C),t[4].value=x.format(this._series.barFunction()(p)));var M=null;if(i&&!y)M=void 0===I.values||I.values.change>=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<k.length;O++){k[O].color=M}return t},e.prototype._showLastPriceAndChangeOnly=function(){
return v&&(null===this._model.crossHairSource().pane||Object(d.isLineToolName)(p.tool.value())||null!==this._model.lineBeingEdited())},e.prototype._changesData=function(e,t,i){if(i&&!y){var n=this._series.quotes();if(null!==n)return{values:{change:n.change,percentChange:n.change_percent}}}else{var r=this._series.data().valueAt(t-1),o=r&&r[4]||null;if(null!==o)return{values:{change:e-o,percentChange:Object(m.a)(o,e)}}}return{}},e}()},"6ctS":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" stroke="currentColor" transform="translate(3 6)"><path d="M.964 8C3 4 6.679.5 11 .5 15.32.5 19 4 21.036 8 19 12 15.32 15.5 11 15.5 6.679 15.5 3 12 .964 8z"/><circle cx="11" cy="8" r="3.5"/></g></svg>'},"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<r.length;t++)if(r[t].name===e)return t;return-1}function a(e){if(!o)for(var t=r.length-1;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;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();i("oWyD");var r=i("Ialn"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i("ULlu")),s=i("ZZnO"),a=i("MbIA");function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){var i=new Date(e+t),n=s.dateFormatProperty.value();return new a.DateTimeFormatter({dateFormat:n,timeFormat:"%h:%m",dateTimeSeparator:" "}).format(i)}function u(e){return"string"==typeof e&&0!==e.trim().length}function h(e){if(!e||0===e.length)return!0;for(var t=0;t<e.length;t++){if(u(e[t])||e[t].id||u(e[t].title))return!1;if(e[t].lines)for(var i=e[t].lines,n=i.length,r=0;r<n;r++){var o=i[r];if(u(o)||u(o.line))return!1}}return!0}function d(e,t){var i=arguments.length>2&&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;a<e.lines.length;a++){var l=e.lines[a];if(l.hasOwnProperty("line"))if(0===a){if(!l.line.isEmpty){var u=document.createElement("h2");void 0!==l.options&&Boolean(l.options.noWrap)&&(u.style.whiteSpace="nowrap"),o.html(u,l.line),t.appendChild(u)}}else p(l.line,t);else l.hasOwnProperty("link")&&_(l.link,t)}else{if(e.hasOwnProperty("indicator")){var h=document.createElement("h2");o.html(h,e.indicator),t.appendChild(h)}if(e.hasOwnProperty("timestamp")){var d=document.createElement("dl");d.classList.add("tv-chart-events-tooltip-date");var f=document.createElement("dd");o.html(f,c(e.timestamp,i)||"—"),d.appendChild(f),t.appendChild(d)}
var m=document.createElement("table");m.classList.add("tv-chart-events-table");var v=document.createElement("tr"),y=document.createElement("tr");m.appendChild(v),m.appendChild(y);var g=document.createElement("th");g.textContent=window.t("Actual"),v.appendChild(g);var b=document.createElement("th");b.textContent=window.t("Forecast"),v.appendChild(b);var S=document.createElement("th");S.textContent=window.t("Previous"),v.appendChild(S);var w=document.createElement("td"),P=e.actual&&(0,r.forceLTRStr)(e.actual);o.html(w,P||"—"),y.appendChild(w);var C=document.createElement("td"),x=e.forecast&&(0,r.forceLTRStr)(e.forecast);o.html(C,x||"—"),y.appendChild(C);var T=document.createElement("td"),I=e.previous&&(0,r.forceLTRStr)(e.previous);o.html(T,I||"—"),y.appendChild(T),t.appendChild(m)}}t.Tooltip=function(){function e(){var t=arguments.length>0&&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<i.length;++n){var r=i[n];if(r._adapter&&void 0!==r._adapter._index){var o=t._cachedByBarIndexOrderedExecutions[r._adapter._index];t._cachedByBarIndexOrderedExecutions[r._adapter._index]=o||[],t._cachedByBarIndexOrderedExecutions[r._adapter._index].push(r)}}},l.clearOrderedByBarsSourcesCache=function(){l.prototype._cachedByBarIndexOrderedExecutions={}},l.prototype.getXYCoordinate=function(e,t,i){var n=0,r=e.getDirection(),o="buy"===r,a=this._pane.model().mainSeries();if(a.bars){var l=o?10:-10,c=a.bars().search(i,s.NearestLeft);if(null!==c){i=c.index;var h=o?c.value[TradingView.LOW_PLOT]:c.value[TradingView.HIGH_PLOT],d=a.priceScale(),p=a.firstValue();n=d.priceToCoordinate(h,p)+l}}e._index=i;var _=t.visibleBarsStrictRange();if(!isFinite(i)||null===_||i>_.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.x<a.x?1:-1,u=s.y<a.y?1:-1;switch(l*=c,e){case 4:var h=a.y-u*l/2,d=this.screenPointToPoint(new o.Point(a.x,h));this._points[1].price=d.price;var p=this.screenPointToPoint(new o.Point(s.x+c*l,s.y+u*l/2));this._points[0].price=p.price,this._points[0].index=p.index;break;case 5:var _=s.y-u*l/2;p=this.screenPointToPoint(new o.Point(s.x,_));this._points[0].price=p.price;d=this.screenPointToPoint(new o.Point(a.x+c*l,a.y+u*l/2));this._points[1].price=d.price,this._points[1].index=d.index}}},t.prototype._correctTopBottomMiddlePoint=function(e,t,i){var n=this.m_priceScale,r=this.ownerSource();if(null!==n&&null!==r){var s=this._model.timeScale(),a=r.firstValue();if(null!==a){var l=this.pointToScreenPoint(t)[0],c=this.pointToScreenPoint(i)[0],u=this.pointToScreenPoint(this._points[0])[0],h=this.pointToScreenPoint(this._points[1])[0],d=l.y-c.y,p=d<0?-1:1,_=u.x<h.x?1:-1,f=u.y<h.y?1:-1;switch(e){case 6:var m=Math.floor(h.x-_*d/2),v=this.screenPointToPoint(new o.Point(m,h.y)),y=Math.abs(this._points[1].index-v.index)
;if(0===(b=_*f*p*Math.ceil(y/2)))return;this._points[1].index=this._points[1].index-b;var g=p*Math.abs(s.indexToCoordinate(this._points[1].index)-h.x);this._points[0].price=n.coordinateToPrice(u.y+g,a),this._points[0].index=this._points[0].index+b;break;case 7:var b,S=Math.floor(u.x-_*d/2),w=this.screenPointToPoint(new o.Point(S,u.y));y=Math.abs(this._points[0].index-w.index);if(0===(b=_*f*p*Math.ceil(y/2)))return;this._points[0].index=this._points[0].index-b;g=p*Math.abs(s.indexToCoordinate(this._points[0].index)-u.x);this._points[1].price=n.coordinateToPrice(h.y+g,a),this._points[1].index=this._points[1].index+b}}}},t._configureProperties=function(e){c.LineDataSource._configureProperties(e),e.hasChild("text")||e.addChild("text",new l.a("")),e.addExclusion("text")},t.prototype._getAnchorPointForIndex=function(e){var t=this.points(),i=t[0],n=t[1],r=0,o=0;switch(e){case 0:r=n.price,o=n.index;break;case 1:r=i.price,o=i.index;break;case 2:r=i.price,o=n.index;break;case 3:r=n.price,o=i.index;break;case 4:r=(n.price+i.price)/2,o=i.index;break;case 5:r=(n.price+i.price)/2,o=n.index;break;case 6:r=i.price,o=(n.index+i.index)/2;break;case 7:r=n.price,o=(n.index+i.index)/2}return{index:o,price:r}},t}(c.LineDataSource)},"7qT/":function(e,t,i){"use strict";function n(e,t){return 100*(t-e)/Math.abs(e)}i.d(t,"a",(function(){return n}))},"8C8C":function(e,t,i){"use strict";i.r(t),i.d(t,"RestoreFactoryDefaultsUndoCommand",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i,n){void 0===n&&(n="Restore Defaults");var r=e.call(this,n)||this;return r._chartModel=t,r._defaultProperty=i,r._state=i.state(),r}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._chartModel.restoreFactoryDefaults(this._defaultProperty)},t.prototype.undo=function(){this._defaultProperty.mergeAndFire(this._state),this._chartModel.mainSeries().onChartStyleChanged()},t}(i("RDU5").UndoCommand)},"8OdW":function(e,t,i){"use strict";i.r(t),i.d(t,"MINUTE_SPAN",(function(){return n})),i.d(t,"HOUR_SPAN",(function(){return r})),i.d(t,"DAY_SPAN",(function(){return o})),i.d(t,"WEEK_SPAN",(function(){return s})),i.d(t,"MONTH_SPAN",(function(){return a})),i.d(t,"YEAR_SPAN",(function(){return l})),i.d(t,"DEFAULT_BAR_SPACING",(function(){return c}));var n=20,r=30,o=40,s=50,a=60,l=70,c=6},"8Uy/":function(e,t,i){"use strict";i.r(t),i.d(t,"LINESTYLE_SOLID",(function(){return n})),i.d(t,"LINESTYLE_DOTTED",(function(){return r})),i.d(t,"LINESTYLE_DASHED",(function(){return o})),i.d(t,"LINESTYLE_LARGE_DASHED",(function(){return s})),i.d(t,"LINESTYLE_SPARSE_DOTTED",(function(){return a})),i.d(t,"LINESTYLE_SMALL_DASHED",(function(){return l}));var n=0,r=1,o=2,s=3,a=4,l=5},"8aff":function(e,t,i){"use strict";i.r(t),i.d(t,"CompareStudyPriceAxisView",(function(){return o}));var n=i("mrSG"),r=i("oXaB"),o=function(e){function t(t,i){var n=e.call(this)||this;return n._studyCompare=t,n._data=i,n}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var n=this._studyCompare.lastValueData(this._data.plotIndex,!1)
;if(!n.noData){i.background=n.color,i.color=this.generateTextColor(n.color),i.coordinate=n.coordinate,i.floatCoordinate=n.floatCoordinate;var o=this._studyCompare.model().properties().scalesProperties;o.showSeriesLastValue.value()&&(e.text=this._axisText(n),e.visible=!0),t.text="",(o.showSymbolLabels.value()||o.seriesLastValueMode.value()===r.PriceAxisLastValueMode.LastPriceAndPercentageValue)&&(t.text=this._paneText(n),t.visible=t.text.length>0)}},t.prototype._paneText=function(e){var t="",i=this._studyCompare.model().properties().scalesProperties;i.showSymbolLabels.value()&&(t+=this._studyCompare.symbol()+" ");var 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<e.length;i++){var n=e[i],r=this.cache[n];this.cache[n]=null,r.stop()}this.removeUnused()}},u.prototype.rebuildFrom=function(e,t,i){var n=s.parsePeriod(e),r=s.parsePeriod(t);if(""!==n.resolution&&!n.isSeconds){if(i.has_weekly_and_monthly)return n.resolution;if(void 0===i.has_daily||i.has_daily)return"D";""!==r.resolution&&(r.resolution="",
r.interval=i.intraday_multipliers?i.intraday_multipliers[0]:1)}if(n.isIntraday&&void 0!==i.has_intraday&&!i.has_intraday)return"";if(n.isSeconds&&!i.has_seconds)return"";var o=""!==n.resolution?r.interval:""===r.resolution?Math.min(n.interval,r.interval):n.interval,a=n.isIntraday?i.intraday_multipliers:i.seconds_multipliers;if(a&&-1===a.indexOf(o)){for(var l=a.length-1;l>=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<o.length;s++){var a=t[9],l=o[s],u={time:l,open:a,high:a,low:a,close:a,volume:0,updatetime:l};this.barset.add(u,!0),this.isRecalculated&&this.listeners.fire(this.barset)}this.barset.add(n,r),this.barset.isBarClosed=r,this.isRecalculated&&this.listeners.fire(this.barset)}};var v=function(){this.listeners=[]};return v.prototype.listenersCount=function(){return this.listeners.reduce((function(e,t){return e+(t?1:0)}),0)},v.prototype.addListener=function(e,t){this.listeners.push({dataListener:e,onErrorCallback:t}),this.barset&&e(this.barset),this.errorMsg&&t(this.errorMsg)},v.prototype.removeListener=function(e){var t=this.listeners.filter((function(t){return t.dataListener===e}));if(0!==t.length){var i=this.listeners.indexOf(t[0]);delete this.listeners[i]}},v.prototype.onError=function(e){this.errorMsg=e||"unspecified error";for(var t=this.listeners,i=t.length,n=0;n<i;n++){var r=t[n];r&&r.onErrorCallback&&r.onErrorCallback(e)}},v.prototype.fire=function(e,t){t||(this.barset=e);for(var i=this.listeners,n=i.length,r=0;r<n;r++){var o=i[r];o&&o.dataListener(e)}},{isSymbolEncoded:p,setupFeed:function(t){u.instance=new u(t),e.setupFeed(u.instance)},parseSymbol:_,unsubscribeUnused:function(){u.instance.removeUnused()}}}();e.exports=o}).call(this,i("jCNj"))},"8pII":function(e){
e.exports=JSON.parse('{"content":{"chartProperties":{"scalesProperties":{"textColor":"#B2B5BE","lineColor":"#2A2E39","backgroundColor":"#ffffff"},"paneProperties":{"vertGridProperties":{"color":"#1E222D"},"horzGridProperties":{"color":"#1E222D"},"background":"#131722","backgroundGradientStartColor":"#131722","backgroundGradientEndColor":"#131722"}},"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":"#5d606b","candleStyle":{"borderColor":"#378658","upColor":"#26a69a","wickColor":"#B5B5B8","wickUpColor":"#26a69a","wickDownColor":"#ef5350","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350"},"haStyle":{"borderColor":"#378658","upColor":"#26a69a","wickColor":"#B5B5B8","wickUpColor":"#26a69a","wickDownColor":"#ef5350","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350"},"barStyle":{"downColor":"#ef5350","upColor":"#26a69a"},"pnfStyle":{"downColor":"#ef5350","upColor":"#26a69a","upColorProjection":"#336854","downColorProjection":"#7f323f"},"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":"#336854","downColorProjection":"#7f323f","borderUpColorProjection":"#336854","borderDownColorProjection":"#7f323f","wickUpColor":"#26a69a","wickDownColor":"#ef5350"},"lineStyle":{"color":"#2196f3","linewidth":2,"linestyle":0},"kagiStyle":{"downColor":"#ef5350","upColor":"#26a69a","upColorProjection":"#336854","downColorProjection":"#7f323f"},"pbStyle":{"upColor":"#26a69a","downColor":"#ef5350","borderUpColor":"#26a69a","borderDownColor":"#ef5350","upColorProjection":"#336854","downColorProjection":"#7f323f","borderUpColorProjection":"#336854","borderDownColorProjection":"#7f323f"},"rangeStyle":{"upColor":"#26a69a","downColor":"#ef5350","upColorProjection":"#336854","downColorProjection":"#7f323f"}}}}')},"8qoI":function(e,t,i){"use strict";i.r(t),i.d(t,"StudyLegendView",(function(){return s}));var n=i("mrSG"),r=i("it7y"),o=i("e1Hy"),s=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._showStudyValues=i.properties().paneProperties.legendProperties.showStudyValues,n._showStudyValues.subscribe(n,n.update),n}return Object(n.__extends)(t,e),t.prototype.isValuesVisible=function(){return this._showStudyValues.value()},t.prototype.additional=function(){return null},t.prototype.destroy=function(){
this._showStudyValues.unsubscribeAll(this)},t.prototype._createValuesProvider=function(e,t){return new o.a(e,t)},t}(r.StudyDataWindowView)},"8sOK":function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("2kV1"),o=i("7ktv"),s=i("kcTO"),a=i("aIyQ"),l=i.n(a),c=i("tc+8"),u=i.n(c),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.text=function(){return this._source.title()+" "+this._source.status()},t}(i("ww0J").a);i.d(t,"StudyStub",(function(){return p}));var d=function(){function e(){}return e.prototype.getItems=function(){return[]},e.prototype.getValues=function(e){return[]},e}(),p=function(e){function t(t,i,n){var o=e.call(this,t)||this;o._priceStep=.01,o._status=window.t("compiling..."),o._statusChanged=new l.a,o._formatter=new s.PriceFormatter(100),o._failed=!1,o._loading=!0,o._origState=i,o._title=n;return o._properties=new u.a({visible:!0}),o._statusView=new r.StudyStatusView(o),o}return Object(n.__extends)(t,e),t.prototype.properties=function(){return this._properties},t.prototype.statusView=function(){return this._statusView},t.prototype.legendView=function(){return null},t.prototype.state=function(e){return this._origState},t.prototype.setStatus=function(e){this._status=e,this._statusChanged.fire()},t.prototype.formatter=function(){return this._formatter},t.prototype.title=function(){return this._title},t.prototype.titleInParts=function(){return[this._title,void 0]},t.prototype.isFailed=function(){return this._failed},t.prototype.isLoading=function(){return this._loading},t.prototype.setFailed=function(e){this._failed=e,this._failed&&(this._loading=!1)},t.prototype.isSymbolInvalid=function(){return!1},t.prototype.start=function(){},t.prototype.status=function(){return this._status},t.prototype.onStatusChanged=function(){return this._statusChanged},t.prototype.firstValue=function(){return null},t.prototype.currency=function(){return null},t.prototype.symbolSource=function(){return this._model.mainSeries()},t.prototype.valuesProvider=function(){return new d},t.prototype.statusProvider=function(e){return new h(this,this._model.properties().scalesProperties.textColor)},t}(o.PriceDataSource)},"8woN":function(e,t,i){"use strict";(function(t){var i=[{d:"E-Mini S&P 500",t:"ES"},{d:"E-Mini Nasdaq 100",t:"NQ"},{d:"Gold",t:"GC"},{d:"Silver",t:"SI"},{d:"Crude Oil WTI",t:"CL"},{d:"Natural Gas",t:"NG"},{d:"Australian Dollar",t:"6A"},{d:"Australian Dollar (Floor)",t:"AD"},{d:"Euro FX",t:"6E"},{d:"Euro FX (Floor)",t:"EC"},{d:"Corn",t:"ZC"},{d:"Corn (Floor)",t:"C"},{d:"Eurodollar",t:"GE"},{d:"Eurodollar (Floor)",t:"ED"}],n=function(){var e=[{pattern:"(",ctor:s},{pattern:")",ctor:a},{pattern:"+",ctor:c},{pattern:"-",ctor:u},{pattern:"*",ctor:h},{pattern:"/",ctor:d},{pattern:"^",ctor:p},{pattern:/\d+(?:\.\d*|(?![a-zA-Z0-9_!:.&]))|\.\d+/,ctor:v},{pattern:/\./,ctor:b},{
pattern:t.enabled("charting_library_base")?/[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF^][a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!:.&]*|'.+?'/:/[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF][a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!|:.&]*|'.+?'/,ctor:m},{pattern:/'[^']*/,ctor:g},{pattern:/[\0-\x20\s]+/,ctor:o}];function n(e,t){var i=function(){};return i.prototype=t.prototype,e.prototype=new i,e}function r(){}function o(e){this.value=e}function s(){}function a(){}function l(){}function c(){}function u(){}function h(){}function d(){}function p(){}r.prototype.toString=function(){return this.value},n(o,r),n(s,r),s.prototype.value="(",n(a,r),a.prototype.value=")",n(l,r),n(c,l),c.prototype.value="+",c.prototype.precedence=0,c.prototype.commutative=!0,n(u,l),u.prototype.value="-",u.prototype.precedence=0,u.prototype.commutative=!1,n(h,l),h.prototype.value="*",h.prototype.precedence=1,h.prototype.commutative=!0,n(d,l),d.prototype.value="/",d.prototype.precedence=1,d.prototype.commutative=!1,n(p,l),p.prototype.value="^",p.prototype.precedence=2,p.prototype.commutative=!1;var _=/^'?(?:([A-Z0-9_]+):)?(.*?)'?$/i,f=/[+\-/*]/;function m(e){this.value=e}function v(e){this.value=e}function y(e){this.value=e}function g(){m.apply(this,arguments)}function b(){v.apply(this,arguments)}n(m,r),m.prototype.toString=function(){if(this.hasOwnProperty("_ticker")){var e=f.test(this._ticker)?"'":"";return e+(this._exchange?this._exchange+":":"")+this._ticker+e}return this.value},m.prototype.parse=function(){var e=_.exec(this.value);e[1]&&(this._exchange=e[1]),this._ticker=e[2]},m.prototype.parseAsFutures=function(){this.hasOwnProperty("_ticker")||this.parse();for(var e=function(e){return i.some((function(t){return t.t===e}))},t=2;t>=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;i<e.length;i++)e[i]instanceof o||t.push(e[i]);return t}function C(e){e=P(e);for(var t,i=[],n=[],r=0;r<e.length;r++){var o=e[r];if(o instanceof l)n.length&&n[n.length-1].minPrecedence>o.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.precedence<t.minPrecedence||c.precedence===t.minPrecedence&&c.commutative)||(i.unshift(t.openBraceIndex),i.push(r),n.length&&n[n.length-1].minPrecedence>t.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;c<e.length;c++){if(!((h=e[c])instanceof o)){if(delete n.isEmpty,h.isIncomplete){var u={status:"incomplete",reason:"incomplete_token",offset:h._offset,token:h};if(h.incompleteSuggest&&(u.recover={append:h.incompleteSuggest()}),n.warnings.push(u),c!==e.length-1){u.status="error";continue}}if(h instanceof m||h instanceof v){if("var"===i){n.errors.push({status:"error",reason:"unexpected_token",offset:h._offset,token:h});continue}i="var"}else if(h instanceof l){if("var"!==i){n.errors.push({status:"error",reason:"unexpected_token",offset:h._offset,token:h});continue}i="operator"}else if(h instanceof s){if("var"===i){n.errors.push({status:"error",reason:"unexpected_token",offset:h._offset,token:h});continue}r.push(h),i="init"}else if(h instanceof a){if("var"!==i){n.errors.push({status:"error",reason:"unexpected_token",offset:h._offset,token:h});continue}r.pop()||n.errors.push({status:"error",reason:"unbalanced_brace",offset:h._offset,token:h,recover:{prepend:new s}}),i="var"
}else h instanceof y&&n.errors.push({status:"error",reason:"unparsed_entity",offset:h._offset,token:h})}}for(n.braceBalance=r.length,"var"!==i&&n.warnings.push({status:"incomplete"});r.length;){var h;u={status:"incomplete",reason:"unbalanced_brace",offset:(h=r.pop())._offset,token:h};"var"===i&&(u.recover={append:new a}),n.warnings.push(u)}return n.currentState=i,0===n.warnings.length&&delete n.warnings,0===n.errors.length&&delete n.errors,n},factorOutBraces:C,normalizeTokens:function(e){for(var t=0;t<e.length;t++)e[t].parse&&e[t].parse();return e},flip:function(e){var t=function(e){for(var t,i=0,n=0,r=0;r<e.length;r++){var c=e[r];if(!(c instanceof o))switch(i){case 0:if(!(c instanceof v&&1==+c.value))return!1;i=1;break;case 1:if(!(1===i&&c instanceof d))return!1;i=2,t=r+1;break;case 2:if(c instanceof s)i=3,n=1;else if(c instanceof l)return!1;break;case 3:c instanceof s?n++:c instanceof a&&--n<=0&&(i=2)}}return e.slice(t)}(e);return C(t||[new v("1"),new d,new s].concat(e).concat(new a))},hasBatsSymbols:function(e){return I(e,["BATS"])},hasEodSymbols:function(e){return(e=T(e))&&-1!==e.toUpperCase().indexOf("_EOD")},hasChxjpySymbols:function(e){return I(e,["CHXJPY"])},hasFreeDelaySymbols:function(e){return I(e,pro.getProductsByType(pro.PRODUCT_TYPES.exchange).map((function(e){return e.exchange.toUpperCase()+"_DLY"})))},getExchange:T,isExchange:function(e,t){return!!(e=T(e))&&e.substr(0,t.length)===t},SymbolToken:m,IncompleteSymbolToken:g,NumberToken:v,BinaryOperatorToken:l,OpenBraceToken:s,CloseBraceToken:a,ticker:function(e){return new m(e).ticker()},shortName:function(e){if("string"!=typeof e)throw new TypeError("expression must be a string");var t=C(P(w(e)));return t.forEach((function(e){e instanceof m&&e.exchange(null)})),M(t)},normalize:function(e){if("string"!=typeof e)throw new TypeError("expression must be a string");return M(C(P(w(e))))}}}();e.exports=n}).call(this,i("Kxc7"))},"96Yh":function(e,t,i){"use strict";i.r(t),i.d(t,"lineToolEntityInfo",(function(){return s})),i.d(t,"studyEntityInfo",(function(){return a})),i.d(t,"seriesEntityInfo",(function(){return l})),i.d(t,"entityForDataSource",(function(){return c}));var n=i("3ClC"),r=i("2jXJ"),o=i("CW80");function s(e){return{id:e.id(),name:(t=e.toolname,Object.keys(r.supportedLineTools).find((function(e){return r.supportedLineTools[e].name===t}))||null)};var t}function a(e){return{id:e.id(),name:e.metaInfo().description}}function l(e){return{id:e.id(),name:"Main Series"}}function c(e,t){return t===e.mainSeries()?l(e.mainSeries()):Object(n.isStudy)(t)?a(t):Object(o.isLineTool)(t)?s(t):null}},"972a":function(e,t,i){"use strict";var n,r,o,s;i.r(t),i.d(t,"MarkLocation",(function(){return n})),i.d(t,"HAlign",(function(){return r})),i.d(t,"VAlign",(function(){return o})),i.d(t,"LineStyle",(function(){return s})),function(e){e.AboveBar="AboveBar",e.BelowBar="BelowBar",e.Top="Top",e.Bottom="Bottom",e.Right="Right",e.Left="Left",e.Absolute="Absolute",e.AbsoluteUp="AbsoluteUp",e.AbsoluteDown="AbsoluteDown"}(n||(n={})),function(e){e.Left="left",e.Center="center",
e.Right="right"}(r||(r={})),function(e){e.Top="top",e.Middle="middle",e.Bottom="bottom"}(o||(o={})),function(e){e[e.Solid=0]="Solid",e[e.Dotted=1]="Dotted",e[e.Dashed=2]="Dashed"}(s||(s={}))},"9Jkk":function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("Eyy1"),o=i("XlJ7"),s=i("x0JF"),a=i("Y7w9"),l=i("Zp/P"),c=i("VdBB"),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._data=null,t._barWidth=null,t}return Object(n.__extends)(t,e),t.prototype.setData=function(e){this._data=e,this._barWidth=Math.max(1,Math.round(Object(l.optimalHiLoWidth)(e.barSpacing)))},t.prototype.hitTest=function(e){if(null===this._data||null===this._barWidth)return null;var t=this._data.bars,i=.5*this._data.barSpacing;if(0===t.length)return null;if(e.x<t[0].time-i)return null;if(e.x>t[t.length-1].time+i)return null;var n=t[Object(a.lowerbound)(t,e.x-i,(function(e,t){return e.time<t}))];if(e.x<n.time-i||e.x>n.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;n<t.length;++n){var r=t[n],s=Math.min(r.high,r.low),a=Math.max(r.high,r.low);e.fillText(i?r.lowLabel:r.highLabel,r.time,s-this._data.labelsPadding),e.fillText(i?r.highLabel:r.lowLabel,r.time,a+this._data.labelsPadding+this._data.fontSize)}e.restore()}},t}(i("cPgM").ScaledPaneRenderer),h=i("/hKg"),d=i("Zy3/"),p=i("vq8G"),_=i("u+0B"),f=i("zDbI");function m(e){return null!=e}i.d(t,"SeriesHiLoPaneView",(function(){return v}));var v=function(e){function t(t,i){var n=e.call(this,t,i)||this;n._widthsCache=new _.TextWidthCache,n._labelsRenderer=new u,n._candlesRenderer=new h.PaneRendererCandles,n._canvas=document.createElement("canvas"),n._context=Object(r.ensureNotNull)(n._canvas.getContext("2d"));var s=t.properties();return n._context.font=Object(o.makeFont)(s.hiloStyle.fontSize.value(),f.CHART_FONT_FAMILY),n}return Object(n.__extends)(t,e),t.prototype.renderer=function(e,t,i){if(this._invalidated){var n=this._series().formatter(),r=this._needLabels();this._updateImpl(this._barUpdater.bind(this,n,r)),this._invalidated=!1}var o=this._series().properties().hiloStyle,s=this._model().timeScale().barSpacing(),a=this._needLabels()&&this._bars().every((function(e){return e.highLabelWidth<=s&&e.lowLabelWidth<=s})),c={bars:this._bars(),wickVisible:!1,bodyVisible:o.drawBody.value(),barSpacing:s,borderVisible:o.showBorders.value(),barWidth:Object(l.optimalHiLoWidth)(s),font:f.CHART_FONT_FAMILY,fontSize:o.fontSize.value(),labelColor:o.labelColor.value(),inverted:this._series().priceScale().isInverted(),labelsPadding:3},u=new d.CompositeRenderer;return this._candlesRenderer.setData(c),u.append(this._candlesRenderer),
a&&(this._labelsRenderer.setData(c),u.append(this._labelsRenderer)),this._model().selection().isSelected(this._series())&&this._isMarkersEnabled&&u.append(new p.SelectionRenderer(this._selectionData)),u},t.prototype.topPixelMargin=function(){return this._margin()},t.prototype.bottomPixelMargin=function(){return this._margin()},t.prototype._margin=function(){var e=this._series().properties().hiloStyle;return e.showLabels.value()?e.fontSize.value()+6:0},t.prototype._barUpdater=function(e,t,i,n){var r=i[2],o=i[3];return!(!m(r)||!m(o))&&(n.high=n.open=r,n.low=n.close=o,t&&(n.highLabel=e.format(r),n.highLabelWidth=this._getLabelWidth(n.highLabel),n.lowLabel=e.format(o),n.lowLabelWidth=this._getLabelWidth(n.lowLabel)),!0)},t.prototype._needLabels=function(){var e=this._model().timeScale().barSpacing();return this._series().properties().hiloStyle.showLabels.value()&&e>5},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='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" stroke="currentColor"><path d="M5 11l9-7 9 7-9 7z"/><path d="M23 14l-9 7-9-7"/><path d="M23 17l-9 7-9-7"/></g></svg>'},"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;n<r.length;n++){var o=r[n];if(Object(s.isColorerPlot)(o)&&void 0!==t.palettes){var a=t.palettes[o.palette];if(o.target===i&&void 0!==a)return a}}return null}(e,i,n),n,r.length>1?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<o.length;r++){var s=o[r];if(null==n||!n.hasOwnProperty(s))break;n=n[s]}var a=t[t.length-1];null!=n&&n.hasOwnProperty(a)?n[a]=i:l.logWarn("Study does not have property "+t.join("."))}}}(n||(n={})),function(e){e.getInputByName=function(e,t){if(void 0===e.inputs)return null;t=t.toLowerCase();for(var i=0,n=e.inputs;i<n.length;i++){var r=n[i];if(r.name.toLowerCase()===t)return r.id}return null},e.getPlotIdByTitle=function(e,t){if(void 0===e.styles)return null;for(var i in t=t.toLowerCase(),e.styles){var n=e.styles[i];if((void 0!==n&&void 0!==n.title?n.title:i).toLowerCase()===t)return i}return null},e.getFilledAreaIdByTitle=function(e,t){if(void 0===e.filledAreas)return null;t=t.toLowerCase();for(var i=0,n=e.filledAreas;i<n.length;i++){var r=n[i];if(r.title.toLowerCase()===t)return r.id}return null},e.getBandIndexByName=function(e,t){if(void 0===e.bands)return null;t=t.toLowerCase();for(var i=0;i<e.bands.length;++i)if(e.bands[i].name.toLowerCase()===t)return i;return null},e.getMetaInfoByDescription=function(e,t){t=t.toLowerCase();for(var i=0,n=e;i<n.length;i++){var r=n[i]
;if(r.description.toLowerCase()===t||r.shortDescription.toLowerCase()===t)return r}return null}}(r||(r={}))},"9nLJ":function(e,t,i){"use strict";(function(t,n){var r=i("PT1i").linking,o=i("Q19o"),s=i("VNzU").layouts,a=i("FQhm"),l=i("5VQP").ContextMenuManager,c=i("mMWL"),u=i("pPtI"),h=i("zUrt").backend,d=i("txPx"),p=i("brCa").createNoticeDialog,_=i("oNDq").createConfirmDialog,f=i("2jXJ"),m=i("sJA2").ThemesApi,v=i("pZll").symbolSearchUIService,y=i("ZjKI").CLOSE_POPUPS_AND_DIALOGS_COMMAND,g=i("LxhU").Interval;function b(e,i,n,r,o){this._chartWidgetCollection=e,this._chartApiInstance=i,this._saveChartService=n,this._loadChartService=r,this._alertsDispatcher=o,this._proxyWatchListChangedDelegate=null,this._lockDrawingsWatchedValue=null,this._hideDrawingsWatchedValue=null,this._magnetEnabledWatchedValue=null,this._magnetModeWatchedValue=null,this._replayApi=null,this._getDataSourceHub=function(){return e.activeChartWidget.value().model().model()},this._chartWidgetCollection.getResizerDetacher=function(){return e.activeChartWidget.value().getResizerDetacher()},this._alertService=this._alertsDispatcher?new AlertService(this._alertsDispatcher,this._getDataSourceHub):null,this._activeChangedChangedDelegate=new t,this._chartWidgetCollection.activeChartWidget.subscribe(function(){this._activeChangedChangedDelegate.fire()}.bind(this)),this._chartWidgets=new WeakMap,this._activateChart=function(t){e.activeChartWidget.setValue(t)}}b.prototype.subscribe=function(e,t){a.subscribe(e,t)},b.prototype.unsubscribe=function(e,t){a.unsubscribe(e,t)},b.prototype.onContextMenu=function(e){a.subscribe("onContextMenu",(function(t){t.callback(e(t.unixtime,t.price))}))},b.prototype.onGrayedObjectClicked=function(e){a.subscribe("onGrayedObjectClicked",e)},b.prototype.activeChart=function(){return this._getChartWidgetApi(this._chartWidgetCollection.activeChartWidget.value())},b.prototype._getChartWidgetApi=function(e){var t=this._chartWidgets.get(e);return void 0===t&&(t=new o(e,this._activateChart.bind(null,e)),this._chartWidgets.set(e,t)),t},b.prototype.onActiveChartChanged=function(){return this._activeChangedChangedDelegate},b.prototype.changeSymbol=function(e,t,i){r.interval.setValue(g.normalize(t)),r.symbol.setValue(e),i&&this.activeChart().onDataLoaded().subscribe(null,i,!0)},b.prototype.setLayout=function(e){this._chartWidgetCollection.layout.setValue(e)},b.prototype.layout=function(){return this._chartWidgetCollection.layout.value()},b.prototype.layoutName=function(){return this._chartWidgetCollection.metaInfo.name.value()},b.prototype.layoutSettingsDrawer=function(){throw new Error("not implemented")},b.prototype.chartsCount=function(){return s[this.layout()].count},b.prototype.viewMode=function(){throw new Error("not implemented")},b.prototype.setForceFullscreenMode=function(){throw new Error("not implemented")},b.prototype.setMultichartMode=function(){throw new Error("not implemented")},b.prototype.setActiveChart=function(e){throw new Error("not implemented")},b.prototype.chart=function(e){if(void 0===e&&(e=0),
e<0||e>=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;t<e.length;t++)e[t].click();var n=i.c.KHon;n&&n.exports.closeAllDialogs(),l.hideAll(),a.emit(y)},b.prototype.selectLineTool=function(e){f.supportedLineTools[e]&&(e=f.supportedLineTools[e].name,c.tool.value()!==e&&c.tool.setValue(e))},b.prototype.selectedLineTool=function(){for(var e=Object.keys(f.supportedLineTools),t=c.tool.value(),i=0;i<e.length;++i)if(f.supportedLineTools[e[i]].name===t)return e[i];return""},b.prototype.lockAllDrawingTools=function(){return null===this._lockDrawingsWatchedValue&&(this._lockDrawingsWatchedValue=new n(c.lockDrawings().value()),this._lockDrawingsWatchedValue.subscribe((function(e){c.lockDrawings().setValue(e)})),c.lockDrawings().subscribe(this,(function(){this._lockDrawingsWatchedValue.setValue(c.lockDrawings().value())}))),this._lockDrawingsWatchedValue},b.prototype.hideAllDrawingTools=function(){return null===this._hideDrawingsWatchedValue&&(this._hideDrawingsWatchedValue=new n(c.hideAllDrawings().value()),this._hideDrawingsWatchedValue.subscribe((function(e){c.hideAllDrawings().setValue(e)})),c.hideAllDrawings().subscribe(this,(function(){this._hideDrawingsWatchedValue.setValue(c.hideAllDrawings().value())}))),this._hideDrawingsWatchedValue},b.prototype.magnetEnabled=function(){return null===this._magnetEnabledWatchedValue&&(this._magnetEnabledWatchedValue=new n(c.properties().magnet.value()),
this._magnetEnabledWatchedValue.subscribe((function(e){c.properties().magnet.setValue(e)})),c.properties().magnet.subscribe(this,(function(){this._magnetEnabledWatchedValue.setValue(c.properties().magnet.value())}))),this._magnetEnabledWatchedValue},b.prototype.magnetMode=function(){return null===this._magnetModeWatchedValue&&(this._magnetModeWatchedValue=new n(c.properties().magnetMode.value()),this._magnetModeWatchedValue.subscribe((function(e){c.properties().magnetMode.setValue(e)})),c.properties().magnetMode.subscribe(this,(function(){this._magnetModeWatchedValue.setValue(c.properties().magnetMode.value())}))),this._magnetModeWatchedValue},b.prototype.mainSeriesPriceFormatter=function(){return this._chartWidgetCollection.activeChartWidget.value().model().mainSeries().priceScale().formatter()},b.prototype.showNoticeDialog=function(e){var t=(e=e||{}).callback;function i(){t&&(t(),t=null)}p({title:e.title,content:e.body||""}).then((function(e){e.on("action:ok",i),e.on("afterClose",i),e.open()}))},b.prototype.showConfirmDialog=function(e){if(!(e=e||{}).callback)throw Error("callback must be exist");var t=e.callback;function i(e){t&&(t(e),t=null)}_({title:e.title,content:e.body||""}).then((function(e){e.on("action:yes",(function(){e.close(),i(!0)})),e.on("action:no",i.bind(null,!1)),e.on("afterClose",i.bind(null,!1)),e.open()}))},b.prototype.logs=function(){return{getLogHistory:d.getLogHistory,enable:d.loggingOn,disable:d.loggingOff}},b.prototype.watchlist=function(){throw new Error("not implemented")},b.prototype.setWatchlistApi=function(e){throw new Error("not implemented")},b.prototype.showLoadChartDialog=function(){var e=this._loadChartService;e&&e.showLoadDialog()},b.prototype.showSaveAsChartDialog=function(){var e=this._saveChartService;e&&window.runOrSignIn((function(){e.saveChartAs()}),{source:"Save as chart dialogue"})},b.prototype.drawOnAllCharts=function(e){return c.drawOnAllCharts().setValue(e)},b.prototype.themes=function(){return new m({chartWidgetCollection:this._chartWidgetCollection})},b.prototype.undoRedoState=function(){return this._chartWidgetCollection.undoHistory.state()},b.prototype.clearUndoHistory=function(){return this._chartWidgetCollection.undoHistory.clearStack()},b.prototype.undo=function(){return this._chartWidgetCollection.undoHistory.undo()},b.prototype.redo=function(){return this._chartWidgetCollection.undoHistory.redo()},b.prototype.takeScreenshot=function(){this._chartWidgetCollection.takeScreenshot()},b.prototype.setSymbolSearchUI=function(e){v().setSymbolGetter(e)},b.prototype.setIntervalLinkingEnabled=function(e){this._chartWidgetCollection.lock.interval.setValue(e)},b.prototype.setTimeFrame=function(e){this._chartWidgetCollection.setTimeFrame(e)},b.prototype.symbolSync=function(){return this._chartWidgetCollection.lock.symbol},b.prototype.intervalSync=function(){return this._chartWidgetCollection.lock.interval},b.prototype.crosshairSync=function(){return this._chartWidgetCollection.lock.crosshair},b.prototype.timeSync=function(){return this._chartWidgetCollection.lock.trackTime
},b.prototype.startFullscreen=function(){return this._chartWidgetCollection.startFullscreen()},b.prototype.exitFullscreen=function(){return this._chartWidgetCollection.exitFullscreen()},b.prototype.takeClientScreenshot=function(e){return this._chartWidgetCollection.clientSnapshot(e)},e.exports=b}).call(this,i("aIyQ"),i("hY0g"))},"9uLv":function(e,t,i){"use strict";i.r(t);var n=i("K9GE");for(var r in n)"default"!==r&&function(e){i.d(t,e,(function(){return n[e]}))}(r)},"9zVu":function(e,t,i){"use strict";i.r(t),i.d(t,"DrawingToolbarBootloader",(function(){return l}));var n=i("mrSG"),r=i("OiSa"),o=i("7RN7"),s=i("cZRT"),a=i("YuHv"),l=function(e){function t(t){var i=e.call(this)||this;return i._opts=t,r.isDrawingToolbarVisible.value()&&(i._opts.resizerBridge.negotiateWidth(o.b),i._opts.resizerBridge.container.value().appendChild(Object(a.a)())),i}return Object(n.__extends)(t,e),t.prototype._startLoading=function(){var e=this;return Promise.all([i.e("react"),i.e(1),i.e(4),i.e(7),i.e(9),i.e(24),i.e(26),i.e(33),i.e(67),i.e(72),i.e(0),i.e(2),i.e(12),i.e(14),i.e(18),i.e(47),i.e("drawing-toolbar")]).then(i.bind(null,"5f7t")).then((function(t){return new t.DrawingToolbarRenderer(e._opts.resizerBridge.container.value(),Object(n.__assign)({},e._opts))}))},t}(s.a)},AE9l:function(e,t,i){},"AWC/":function(e,t,i){e.exports={container:"container-2BvS3Fpg",inner:"inner-3YzQuyJx","border-left":"border-left-LYAXTdyL","border-right":"border-right-OzIcepiV","border-top":"border-top-193CSDqN","border-bottom":"border-bottom-2lZASSTD","top-right-radius":"top-right-radius-FE25nrPp","top-left-radius":"top-left-radius-1ELOZlIb","bottom-right-radius":"bottom-right-radius-7zqIiaLN","bottom-left-radius":"bottom-left-radius-xCxQ998i"}},AXy7:function(e,t,i){"use strict";var n=i("Eyy1").assert,r=i("aO4+").Point,o=i("Hr11").clamp,s=i("l4sv").HorizontalLineRenderer,a=i("0YCj"),l=i("Tmoa"),c=i("cPgM").ScaledPaneRenderer;function u(e,t){this._source=t,this._properties=e,this._points=[new r(-1,-1)],this._invalidated=!0,this._lineRenderer=new s}function h(){c.call(this),this._data=null}function d(e){this._source=e,this._points=[],this._bandBgRenderer=new h}function p(e,t,i){this._source=e,this._points=[],n(t.type===a.FilledArea.TYPE_HLINES,"Wrong filledArea type: "+t.type),this._initBandIndexes(t.objAId,t.objBId),this._fillStyleProps=i,this._bandBgRenderer=new h}u.prototype.update=function(){this._invalidated=!0},u.prototype.updateImpl=function(){var e=this._source.priceScale();if(e&&!e.isEmpty()){var t=this._properties.value.value();if(isNumber(t)){var i=this._source.firstValue();this._points[0]=new r(-1,e.priceToCoordinate(t,i))}else this._points[0]=new r(-1,NaN)}else this._points[0]=new r(-1,-1)},u.prototype.renderer=function(){this._invalidated&&(this.updateImpl(),this._invalidated=!1);var e={};return e.width=this._source.model().timeScale().width(),e.height=this._source.priceScale().height(),e.y=this._points[0].y,e.color=this._properties.color.value(),e.linewidth=this._properties.linewidth.value(),e.linestyle=this._properties.linestyle.value(),
this._lineRenderer.setData(e),this._lineRenderer},inherit(h,c),h.prototype.setData=function(e){this._data=e},h.prototype._drawImpl=function(e){if(null!==this._data&&0!==this._data.points.length){var t=e.canvas.width;e.fillStyle=l.generateColor(this._data.backcolor,this._data.transparency);var i=Math.min(this._data.points[0],this._data.points[1]),n=Math.max(this._data.points[0],this._data.points[1]);e.fillRect(0,i,t,n-i)}},h.prototype.hitTest=function(e){return null},d.prototype.update=function(){if(this._points=[],this._source.properties().bandsBackground.fillBackground.value()){var e=this._source.properties().bands[0],t=this._source.properties().bands[1],i=this._source.priceScale();if(i&&!i.isEmpty()){var n=this._source.firstValue();this._points.push(i.priceToCoordinate(e.value.value(),n)),this._points.push(i.priceToCoordinate(t.value.value(),n))}}},d.prototype.renderer=function(){var e={};return e.points=this._points,e.backcolor=this._source.properties().bandsBackground.backgroundColor.value(),e.transparency=this._source.properties().bandsBackground.transparency.value(),this._bandBgRenderer.setData(e),this._bandBgRenderer},p.prototype._initBandIndexes=function(e,t){this._bandAKey=null,this._bandBKey=null;for(var i=0;i<this._source.metaInfo().bands.length;++i){var n=this._source.metaInfo().bands[i];null===this._bandAKey&&n.id===e&&(this._bandAKey=i),null===this._bandBKey&&n.id===t&&(this._bandBKey=i)}},p.prototype.update=function(){if(this._points=[],this._fillStyleProps.visible.value()){var e=this._source.properties().bands[this._bandAKey],t=this._source.properties().bands[this._bandBKey],i=this._source.priceScale();if(i&&!i.isEmpty()){var n=this._source.firstValue();this._points.push(i.priceToCoordinate(e.value.value(),n)),this._points.push(i.priceToCoordinate(t.value.value(),n))}}},p.prototype.renderer=function(){var e=this._fillStyleProps.transparency.value();e=o(e,0,100);var t={};return t.points=this._points,t.backcolor=l.generateColor(this._fillStyleProps.color.value(),e),t.transparency=this._fillStyleProps.transparency.value(),this._bandBgRenderer.setData(t),this._bandBgRenderer},t.BandPaneView=u,t.BandBackgroundPaneView=d,t.HlineFillPaneView=p},"Aba+":function(e,t,i){},ApcL:function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("ogJP"),o=i("vTIA"),s=i("txPx"),a=i("oXaB"),l=i("wZIs"),c=i("KUek"),u=i("FIi8"),h=i("4vW/");i.d(t,"gridPreferencesDefault",(function(){return p})),i.d(t,"crossHairPreferencesDefault",(function(){return _})),i.d(t,"legendPreferencesDefault",(function(){return f})),i.d(t,"panePreferencesDefault",(function(){return m})),i.d(t,"scalesPreferencesBaseDefault",(function(){return v})),i.d(t,"scalesPreferencesToApplyDefault",(function(){return y})),i.d(t,"chartEventsSourceBreaksPreferencesDefault",(function(){return g})),i.d(t,"chartEventsSourcePreferencesDefault",(function(){return b})),i.d(t,"timeScalePreferencesDefault",(function(){return S})),i.d(t,"priceScalePreferencesDefault",(function(){return w})),i.d(t,"statusViewPreferencesDefault",(function(){return P})),
i.d(t,"mainSeriesPreferencesDefault",(function(){return C})),i.d(t,"chartPreferencesBaseDefault",(function(){return x})),i.d(t,"chartPreferencesToApplyDefault",(function(){return T})),i.d(t,"chartPreferencesToRestoreDefault",(function(){return I})),i.d(t,"createPreferencesObject",(function(){return M})),i.d(t,"preferencesByWhiteList",(function(){return L})),i.d(t,"defaultsPreferencesByWhiteList",(function(){return O}));var d=Object(s.getLogger)("Chart.ApplyPreferencesToAllCharts"),p={color:"",style:0},_={color:"",style:0,transparency:0,width:0},f={showStudyArguments:!1,showStudyTitles:!1,showStudyValues:!1,showSeriesTitle:!1,showSeriesOHLC:!1,showLegend:!1,showBarChange:!0,showBackground:!0,backgroundTransparency:0,wrapText:!1},m={backgroundType:h.ColorType.Solid,background:"",backgroundGradientStartColor:"",backgroundGradientEndColor:"",topMargin:0,bottomMargin:0,rightOffset:0,horzGridProperties:Object(u.deepExtend)({},p),vertGridProperties:Object(u.deepExtend)({},p),crossHairProperties:Object(u.deepExtend)({},_),legendProperties:Object(u.deepExtend)({},f)},v={lineColor:"",textColor:"",fontSize:0,scaleSeriesOnly:!1,showSeriesLastValue:!1,seriesLastValueMode:a.PriceAxisLastValueMode.LastValueAccordingToScale,showSeriesPrevCloseValue:!1,showStudyLastValue:!1,showSymbolLabels:!1,showStudyPlotLabels:!1,showBidAskLabels:!1,showPrePostMarketPriceLabel:!0,showFundamentalLastValue:!1,showFundamentalNameLabel:!1,showCurrency:!0},y=Object(n.__assign)({},v),g={color:"",visible:!1,style:0,width:0},b={visible:!1,futureOnly:!1,breaks:Object(u.deepExtend)({},g)},S={defaultRightOffset:0},w={autoScale:!1,autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,log:!1,logDisabled:!1,alignLabels:!1,isInverted:!1,indexedTo100:!1},P={fontSize:16,showExchange:!0,showInterval:!0,symbolTextSource:"description"},C={style:0,minTick:0,showPriceLine:!1,priceLineWidth:0,priceLineColor:"",showPrevClosePriceLine:!1,showCountdown:!0,prevClosePriceLineWidth:0,extendedHours:!1,prevClosePriceLineColor:"",esdShowDividends:!1,esdShowSplits:!1,esdShowEarnings:!1,esdShowBreaks:!1,dividendsAdjustment:!1,statusViewStyle:Object(u.deepExtend)({},P),priceAxisProperties:Object(u.deepExtend)({},w),esdBreaksStyle:Object(u.deepExtend)({},{color:"",style:0,width:0}),candleStyle:Object(u.deepExtend)({},{upColor:"",downColor:"",drawWick:!1,drawBorder:!1,drawBody:!0,borderColor:"",borderUpColor:"",borderDownColor:"",wickColor:"",wickUpColor:"",wickDownColor:"",barColorsOnPrevClose:!1}),hollowCandleStyle:Object(u.deepExtend)({},{upColor:"",downColor:"",drawWick:!1,drawBorder:!1,drawBody:!0,borderColor:"",borderUpColor:"",borderDownColor:"",wickColor:"",wickUpColor:"",wickDownColor:""}),barStyle:Object(u.deepExtend)({},{upColor:"",downColor:"",barColorsOnPrevClose:!1,dontDrawOpen:!1,thinBars:!0}),lineStyle:Object(u.deepExtend)({},{color:"",linestyle:0,linewidth:0,styleType:0}),areaStyle:Object(u.deepExtend)({},{color1:"",color2:"",linecolor:"",linestyle:0,linewidth:0,transparency:0}),baselineStyle:Object(u.deepExtend)({},{topFillColor1:"",topFillColor2:"",
bottomFillColor1:"",bottomFillColor2:"",topLineColor:"",bottomLineColor:"",topLineWidth:0,bottomLineWidth:0,transparency:0,baseLevelPercentage:0}),hiloStyle:Object(u.deepExtend)({},{color:"",showBorders:!1,borderColor:"",showLabels:!1,labelColor:"",fontSize:0,drawBody:!0}),haStyle:Object(u.deepExtend)({},{upColor:"",downColor:"",drawWick:!1,drawBorder:!1,drawBody:!0,borderColor:"",borderUpColor:"",borderDownColor:"",wickColor:"",wickUpColor:"",wickDownColor:"",showRealLastPrice:!1,barColorsOnPrevClose:!1,inputs:{}}),renkoStyle:Object(u.deepExtend)({},{upColor:"",downColor:"",borderUpColor:"",borderDownColor:"",upColorProjection:"",downColorProjection:"",borderUpColorProjection:"",borderDownColorProjection:"",wickUpColor:"",wickDownColor:"",inputs:{boxSize:0,style:"",atrLength:0,wicks:!1,sources:"",source:""}}),pbStyle:Object(u.deepExtend)({},{upColor:"",downColor:"",borderUpColor:"",borderDownColor:"",upColorProjection:"",downColorProjection:"",borderUpColorProjection:"",borderDownColorProjection:"",inputs:{source:"",lb:0}}),kagiStyle:Object(u.deepExtend)({},{upColor:"",downColor:"",upColorProjection:"",downColorProjection:"",inputs:{style:"",atrLength:0,reversalAmount:0}}),pnfStyle:Object(u.deepExtend)({},{upColor:"",downColor:"",upColorProjection:"",downColorProjection:"",inputs:{reversalAmount:0,boxSize:0,style:"",atrLength:0}}),rangeStyle:Object(u.deepExtend)({},{upColor:"",downColor:"",upColorProjection:"",downColorProjection:"",thinBars:!1,inputs:{range:0,phantomBars:!1}})},x={priceScaleSelectionStrategyName:"auto",timeScale:Object(u.deepExtend)({},S),mainSeries:Object(u.deepExtend)({},C),sessions:Object(u.deepExtend)({},c.sessionsPreferencesDefault),paneProperties:Object(u.deepExtend)({},m),chartEventsSourceProperties:Object(u.deepExtend)({},b),tradingProperties:Object(u.deepExtend)({},o.b)},T=Object(n.__assign)({timezone:"",scalesProperties:Object(u.deepExtend)({},y)},x),I=Object(n.__assign)({scalesProperties:Object(u.deepExtend)({},v)},x);function M(e,t,i,n,o){if(void 0===o&&(o=!0),void 0===t[e])return d.logDebug("We haven't had this property "+n+"."+e+" yet, please, remove it from whiteList"),null;if(Object(r.isObject)(i[e])){var s=Object.keys(i[e]),a="";return s.map((function(r){var s;return(s={})[r]=M(r,t[e],i[e],n+"."+e,o),s})).reduce((function(e,t){return e[a=Object.keys(t)[0]]=t[a],e}),{})}return o?t[e].value():t[e]}function L(e,t,i){void 0===i&&(i=T);var n={timezone:"",priceScaleSelectionStrategyName:"auto",timeScale:{defaultRightOffset:e.timeScale().defaultRightOffsetProperty().value()},mainSeries:{},sessions:{},paneProperties:{},scalesProperties:{},chartEventsSourceProperties:{},tradingProperties:{}},r=["timeScale","mainSeries","sessions"],o=i.mainSeries,s=Object.keys(i),a=Object.keys(o),l=t.properties(),c=e.properties(),u=i.sessions,h=Object.keys(u),d=e.sessions().properties();return a.forEach((function(e){n.mainSeries[e]=M(e,l,o,"mainSeries")})),h.forEach((function(e){n.sessions[e]=M(e,d,u,"sessions")})),s.forEach((function(e){r.includes(e)||(n[e]=M(e,c,i,"preferences"))})),n}function O(e,t,i){
void 0===i&&(i=I);var n={timeScale:{defaultRightOffset:e.timeScale().rightOffsetDefaultValue()},mainSeries:{},sessions:Object(u.deepExtend)({},c.sessionsPreferencesDefault),paneProperties:{},scalesProperties:{},chartEventsSourceProperties:{},tradingProperties:{},priceScaleSelectionStrategyName:"auto"},r=["timeScale","mainSeries","sessions"],o=i.mainSeries,s=Object.keys(i),a=Object.keys(o),h=Object(l.factoryDefaults)("chartproperties.mainSeriesProperties"),d=Object(l.factoryDefaults)("chartproperties");return a.forEach((function(e){n.mainSeries[e]=M(e,h,o,"mainSeries",!1)})),s.forEach((function(e){r.includes(e)||(n[e]=M(e,d,i,"preferences",!1))})),n}},Az04: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("Rotated Rectangle");function l(e,t){var n=t||l.createProperties();o.call(this,e,n),i.e("lt-pane-views").then(function(e){var t=i("lZ9F").RotatedRectanglePaneView;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._paneViews[0],n=i._points[0],s=i._points[1],a=i._points[2];this._distance=r(n,s,a).distance}},l.prototype.setPoint=function(e,t,i){if(o.prototype.setPoint.call(this,e,t,i),0===e||1===e){var r=this._paneViews[0];r.update();var s=r._points[0],a=r._points[1].subtract(s),l=new n(a.y,-a.x).normalized().scaled(this._distance),c=s.add(l),u=this.screenPointToPoint(c);this._points[2]=u}},l.prototype.endChanging=function(e,t){delete this._distance,o.prototype.endChanging.call(this,e,t)},l.prototype.pointsCount=function(){return 3},l.prototype.translatedType=function(){return a},l.prototype.name=function(){return"Rotated Rectangle"},l.prototype.hasEditableCoordinates=function(){return!1},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("linetoolrotatedrectangle",e);return l._configureProperties(t),t},l._configureProperties=function(e){o._configureProperties(e)},t.LineToolRotatedRectangle=l},"B4/o":function(e,t,i){"use strict";(function(e){var n=i("QIuV"),r=i("4TVt").LineToolPriceAxisView,o=i("jkoZ"),s=i("Ss5c").LineDataSource,a=i("Ocx9").DefaultProperty,l=i("s1Gx").sortSourcesPreOrdered.LineToolOrder;function c(e){this._line=e,this._data={bodyText:"order",quantityText:"0"},this._editable=!0,this._cancellable=!0,this._mode="",this._direction="buy",this._active=!0}function u(e){return null==e?e="":e+="",e}function h(e,t){this._adapter=new c(this);var r=t||h.createProperties();n.call(this,e,r),this.customization.disableSelection=!1,i.e("lt-pane-views").then(function(e){var t=i("LMGK").OrderPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}c.prototype.setMode=function(e){return this._mode=e,
this._line.updateAllViewsAndRedraw(),this},c.prototype.setDirection=function(e){return this._direction=e,this._line.updateAllViewsAndRedraw(),this},c.prototype.setActive=function(e){return this._active=e,this._line.updateAllViewsAndRedraw(),this},c.prototype.setEditable=function(e){return this._editable=e,this._line.updateAllViewsAndRedraw(),this},c.prototype.setCancellable=function(e){return this._cancellable=e,this._line.updateAllViewsAndRedraw(),this},c.prototype.hasMoveCallback=function(){return this.isFunction(this._onMoveCallback)},c.prototype.hasModifyCallback=function(){return this.isFunction(this._onModifyCallback)},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){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='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="none" fill-rule="evenodd" stroke="currentColor" stroke-linecap="square" d="M6.145 11.968L14 5.5l7.855 6.468a.3.3 0 0 1-.191.532H6.336a.3.3 0 0 1-.19-.532zm0 4.064L14 22.5l7.855-6.468a.3.3 0 0 0-.191-.532H6.336a.3.3 0 0 0-.19.532z"/></svg>'},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;t<this._plates.length;t++)if(this._plates[t].highlightByAuthor){this._highlightByAuthor=!0;break}this._plates.forEach(this._drawItem.bind(this,e)),this._tooltip.draw(this._plates.map(function(e){return this._plateTransform(e)}.bind(this)),e),this._tooltip.endDraw(),e.restore()},c.prototype._drawItem=function(e,t){e.save(),this._highlightByAuthor&&!t.highlightByAuthor&&(e.globalAlpha=.4);var i=this._dotTransform(t);i.mine?this._drawTriangle(e,i):this._drawDot(e,i),e.restore()},c.prototype._commonTransform=function(e){var t=Math.max(1.4*e.minSize,this._barWidth+4),i={up:-1,down:1}[e.direction]*(e.yInverted?-1:1)*(t*(e.order+.6)+.25*t),n=e.y+i,r=TradingView.clone(e.overridedTheme||this.themes[e.theme]);return r.dotBorderWidth=e.hovered||e.highlightByAuthor?4:2,{id:e.id,theme:r,themeName:e.theme,x:Math.round(e.x+1),y:Math.round(n),yInverted:e.yInverted,pinned:e.pinned,hovered:e.hovered}},c.prototype._dotTransform=function(e){var t=this._commonTransform(e);return t.radius=Math.max(e.minSize/2,.4*this._barWidth),t.label=e.label,t.labelFontColor=e.labelFontColor,t.labelFontSize=Math.ceil(Math.max(10,Math.min(t.radius,20))),this._model.updateDotData(e,t)},c.prototype._plateTransform=function(e){var t=this._commonTransform(e);return this._model.updatePlateData(e,t)},c.THEMES=["green","red","neutral","yellow","blue"],c.prototype.themes={green:{border:"#78C143",background:"#8DDD54"},red:{border:"#CC4545",background:"#ED5A5A"},neutral:{border:"#EAC300",background:"#FFD400"},yellow:{border:"#EAC300",background:"#FFD400"},blue:{border:"#047ACE",background:"#0496FF"}},c.prototype._drawTriangle=function(e,t){e.strokeStyle=t.theme.border,e.fillStyle=t.theme.background,e.lineWidth=t.theme.dotBorderWidth;var i=t,n=t.radius,r=Math.cos(Math.PI/6)*n,o=Math.sin(Math.PI/6)*n;e.translate(i.x,i.y),"up"===t.direction!==t.yInverted&&e.rotate(Math.PI),t.public||(e.lineWidth/=2),e.beginPath(),e.moveTo(0,-n),e.lineTo(r,o),e.lineTo(-r,o),e.lineTo(0,-n),e.closePath(),e.stroke(),
t.public&&e.fill()},c.prototype._drawDot=function(e,t){e.strokeStyle=t.theme.border,e.fillStyle=t.theme.background,e.lineWidth=t.theme.dotBorderWidth,e.beginPath(),e.arc(t.x,t.y,t.radius,0,2*Math.PI,!0),e.closePath(),e.stroke(),e.fill(),t.label&&t.radius>6&&(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()<this._plateArrowSize,s=r.width-e.x+Math.round(e.barWidth/2+n);o&&(s-=this._layout.outerWidth()+2*this._plateArrowSize);var a=r.height;this._layout.toggleClass("right",o),this._layout.css({top:Math.min(Math.max(e.y,20),a-this._layout.outerHeight()-10),right:s,fontSize:n+"px",display:"block"})},u.prototype._removeLayout=function(){this.tooltipHovered||(this._layout.stop(!0),this._layout.remove())},u.prototype._toggleLayout=function(e){this._layout.toggle(e)},u.prototype.hide=function(e){this.tooltipHovered?this._layout.stop(!0).fadeTo(0,1):this._layout.fadeOut(400,(function(){$(this).remove(),e()}))},u.prototype.setSource=function(e){this.source=e},t.BarsMarksContainerPaneView=l,t.BarsMarksContainerRenderer=c,t.BarMarkTooltip=u},Bt3k:function(e,t,i){"use strict";function n(e,t){this.tooltips={},this.tooltipFactory=e,this.source=t}function r(e,t){this.renderer=e,this._tooltip=t,this.visible=!1}n.prototype.findOrCreateTooltip=function(e){var t=this.tooltips[e.id];return null==t&&(e.hovered||e.pinned)&&(t=this._createTooltip(),this.tooltips[e.id]=t),t},n.prototype.showPlate=function(e,t){var i=this.findOrCreateTooltip(e);null!=i&&(i._drawPlate(e,t),i.plateData=e)},n.prototype.draw=function(e,t){this.hoveredId=null;for(var i=0;i<e.length;i++)e[i].hovered&&(this.hoveredId=e[i].id);e.forEach(function(e){this.showPlate(e,t)}.bind(this))},n.prototype.endDraw=function(){for(var e in this.tooltips)if(this.tooltips.hasOwnProperty(e)){var t=this.tooltips[e];t.toggleVisibility(),
this.hoveredId&&t.plateData.id!==this.hoveredId&&!t.plateData.pinned&&(t.remove(),delete this.tooltips[e])}},n.prototype.removeAll=function(){for(var e in this.tooltips){if(this.tooltips.hasOwnProperty(e))this.tooltips[e].remove()}this.tooltips={}},n.prototype.removeTooltip=function(e){delete this.tooltips[e]},n.prototype._createTooltip=function(){return new r(this,this.tooltipFactory())},r.prototype._drawPlate=function(e,t){var i=this;this.visible=!0,this._tooltip.setSource(this.renderer.source),this._tooltip.showPlate(e,t),e.hovered||e.pinned||this._tooltip.hide((function(){i.renderer.removeTooltip(e.id)}))},r.prototype.remove=function(){this._tooltip._removeLayout()},r.prototype.toggleVisibility=function(){this._tooltip._toggleLayout(this.visible),this.visible=!1},t.TooltipRenderer=n},BxxN:function(e,t,i){"use strict";function n(e){return decodeURIComponent(e.replace(/\+/g," ")).replace(/<\/?[^>]+(>|$)/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<t.key?-1:0})).map((function(e){return e.pair})).join("&")}(e);return 0===t.length&&0===r.length||(n=n+"?"+t+r),n}},"C2K+":function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i("mrSG"),r=i("YFKU"),o=i("6I19"),s=i("n5al"),a={open:Object(r.t)("O",{context:"in_legend"}),high:Object(r.t)("H",{context:"in_legend"}),low:Object(r.t)("L",{context:"in_legend"}),close:Object(r.t)("C",{context:"in_legend"}),hl2:Object(r.t)("HL2",{context:"in_legend"}),hlc3:Object(r.t)("HLC3",{context:"in_legend"}),ohlc4:Object(r.t)("OHLC4",{context:"in_legend"})},l=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._emptyValues[0].title=a.open,n._emptyValues[1].title=a.high,n._emptyValues[2].title=a.low,n._emptyValues[3].title=a.close,n._emptyValues[6].title="",n._emptyValues[4].title="",n}return Object(n.__extends)(t,e),t.prototype.getValues=function(t){var i=e.prototype.getValues.call(this,t),n=this._showSeriesOHLC.value(),r=this._showBarChange.value(),o=12===this._series.style(),a=i[6];if(a.visible=a.visible&&r&&!o,this._showLastPriceAndChangeOnly()){var l=i[5];return l.visible=l.visible&&n,i}var c=Object(s.isPriceSourceStyle)(this._seriesStyle.value()),u=n&&!c,h=n&&c;return i[0].visible=u&&!o,
i[1].visible=u,i[2].visible=u,i[3].visible=u&&!o,i[4].visible=h,i},t}(o.a)},CHw2:function(e,t,i){"use strict";var n=i("WPQD").LineToolTrendLine,r=i("Ocx9").DefaultProperty,o=window.t("Extended Line");function s(e,t){var i=t||s.createProperties();n.call(this,e,i)}inherit(s,n),s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Extended Line"},s.createProperties=function(e){var t=new r("linetoolextended",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolExtended=s},CJIV: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 Ray");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("1oDZ").HorzRayPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(l,n),l.prototype.pointsCount=function(){return 1},l.prototype.translatedType=function(){return a},l.prototype.name=function(){return"Horizontal Ray"},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(){var e=this._points[0],t={index:e.index+1,price:e.price};return[this._linePointsToAlertPlot([e,t],null,!1,!0)]},l.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("e0H+").HorizontalRayDefinitionsViewModel}.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("linetoolhorzray",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.LineToolHorzRay=l},CLNU:function(e,t,i){(function(e){TradingView.cleanButAmpersand=function(e,t){var i=t?["&amp;"]:["&"];return TradingView.clean(e,t,i)},TradingView.strip_tags=function(e){return e&&e.replace?e.replace(/(<([^>]+)>)/gi,""):e},TradingView.encodeSpread=function(e){return encodeURIComponent(e)},TradingView.clean=function(e,t,i){var n=[["&","&amp;"],["<","&lt;"],[">","&gt;"],['"',"&quot;"],["'","&#039;"],["'","&#39;"]],r=e;if(!e||!e.replace)return r;for(var o=0;o<n.length;o++){var s=n[o][0],a=n[o][1];i&&i.indexOf&&-1!==i.indexOf(t?a:s)||(r=t?r.replace(new RegExp(a,"g"),s):r.replace(new RegExp(s,"g"),a))}return r},e&&e.exports&&(e.exports={clean:TradingView.clean,
cleanButAmpersand:TradingView.cleanButAmpersand,stripTags:TradingView.strip_tags})}).call(this,i("YuTi")(e))},CPmC:function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return o}));var n=new WeakMap;function r(e,t){var i=n.get(e);return i instanceof Function?i(t):i&&i[t]}function o(e,t,i){if(i instanceof Function)n.set(e,i);else{var r=n.get(e),o=void 0===r||r instanceof Function?{}:r;o[t]=i,n.set(e,o)}}},CW80:function(e,t,i){"use strict";i.r(t),i.d(t,"createLineTool",(function(){return c})),i.d(t,"createLineToolProperties",(function(){return u})),i.d(t,"createStudyLineToolProperties",(function(){return h})),i.d(t,"isLineTool",(function(){return d})),i.d(t,"isStudyLineTool",(function(){return p})),i.d(t,"tryFindStudyLineToolNameByStudyId",(function(){return _})),i.d(t,"lineToolClassName",(function(){return f})),i.d(t,"shiftLineToolOnClone",(function(){return m})),i.d(t,"cloneLineTool",(function(){return v})),i.d(t,"isMTPredictionTool",(function(){return y}));var n=i("mrSG"),r=i("Eyy1"),o=i("aO4+"),s=i("Ss5c"),a=i("OH2X"),l=i("e92V");function c(e,t,i,n,o){var s;return Object(r.assert)(Object(l.a)(e),"Unknown line tool: "+e),(s=new(Object(r.ensureDefined)(a[e]))(t,i,o)).toolname=e,s}function u(e,t){return Object(r.assert)(Object(l.a)(e),e+" should be name of the line tool"),Object(r.ensureDefined)(a[e]).createProperties(t)}function h(e,t,i,n,o){throw Object(r.assert)(Object(l.b)(e),e+" should be name of the study line tool"),new Error("Property creation is not implemented for study line tool "+e)}function d(e){return e instanceof s.LineDataSource}function p(e){return!1}function _(e){return null}function f(e){for(var t in a)if(a[t]===e)return t;if(e===LineToolVbPFixed)return"LineToolVbPFixed";if(e===LineToolRegressionTrend)return"LineToolRegressionTrend";if(e===LineToolAnchoredVWAP)return"LineToolAnchoredVWAP";for(var i in mtpredictorlinetoolset)if(mtpredictorlinetoolset[i]===e)return i;return Object(r.assert)(!1,"Trying to get classname of unknown line tool"),null}function m(e,t){var i=Object(r.ensureNotNull)(t.priceScale()),o=Object(r.ensureNotNull)(t.firstValue());return e.map((function(e){var t=e.price,r=i.priceToCoordinate(t,o)-40,s=i.coordinateToPrice(r,o);return Object(n.__assign)(Object(n.__assign)({},e),{price:s})}))}function v(e,t,i,n){var s=Object(r.ensureNotNull)(f(t.constructor)),a=t.properties().clone();a.visible.setValue(!0);var l=Object(r.ensureNotNull)(t.ownerSource()),u=c(s,e,a);void 0!==n&&u.setId(n),u.setOwnerSource(l);var h=t.fixedPoints();(i?h.map((function(e){return e.add(new o.Point(20,20))})):h).forEach((function(e){return u.addFixedPoint(e)}));var d=t.normalizedPoints(),p=i?m(d,l):d,_=t.points();return u.restorePoints(p,_),u.cloneData&&u.cloneData(t),u.checkAlert&&u.checkAlert(),u}function y(e){return!1}i.d(t,"isLineToolName",(function(){return l.a})),i.d(t,"isStudyLineToolName",(function(){return l.b})),function(e){for(var t=0,i=Object.keys(e);t<i.length;t++){var n=i[t];TradingView[n]=e[n]}}(a)},Cf1E:function(e,t,i){"use strict";function n(e){
if(void 0===e)return"";if(e instanceof Error){var t=e.message;return e.stack&&(t+=" "+e.stack),t}return"string"==typeof e?e.toString():JSON.stringify(e)}i.d(t,"a",(function(){return n}))},CwKc:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" stroke="currentColor"><path stroke-linecap="square" d="M11.5 21.5v-7m3 7v-5m3 5v-3m-9 3v-5"/><path d="M5.5 22v-3"/><path stroke-linecap="square" d="M5.5 13.5l4.297-4.297a2.406 2.406 0 0 1 3.406 0l2.594 2.594c.94.94 2.463.943 3.406 0L23.5 7.5M22.5 12.5v6m-3-3h6"/></g></svg>'},CxTi:function(e,t,i){e.exports={css_value_currency_label_top:"6",css_value_currency_label_radius:"4",css_value_border_color_light:"#D1D4DC",css_value_border_color_dark:"#363A45","price-axis-currency-label-wrapper":"price-axis-currency-label-wrapper-opoVZ91E","price-axis-currency-label":"price-axis-currency-label-1aGvtcW9",readonly:"readonly-OYsh-rpT","price-axis-currency-label-text":"price-axis-currency-label-text-1o_xgUrU","price-axis-currency-label-arrow-down":"price-axis-currency-label-arrow-down-243KKK5C"}},DYI2:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" stroke="currentColor" transform="translate(3 5)"><path d="M.964 9C3 5 6.679 1.5 11 1.5c4.32 0 8 3.5 10.036 7.5C19 13 15.32 16.5 11 16.5 6.679 16.5 3 13 .964 9z"/><circle cx="11" cy="9" r="3.5"/><path stroke-linecap="square" d="M2.5 17.5l17-17"/></g></svg>'},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<i.length?i[t]:"")}},Dq3s:function(e){e.exports=JSON.parse('{"4":["v",["h",0,2],["h",1,3]],"6":["v",["h",0,2,4],["h",1,3,5]],"8":["v",["h",0,2,4,6],["h",1,3,5,7]],"2h":["h",0,1],"2v":["v",0,1],"2-1":["v",["h",0,2],1],"3s":["h",0,["v",1,2]],"3h":["h",0,1,2],"3v":["v",0,1,2],"1-2":["v",0,["h",1,2]],"3r":["h",["v",0,1],2],"4h":["h",0,1,2,3],"4v":["v",0,1,2,3],"4s":["h",0,["v",1,2,3]],"1-3":["v",0,["h",1,2,3]],"2-2":["v",["h",0,1],["v",2,3]],"1-4":["v",0,["h",1,2,3,4]],"5s":["h",0,["v",1,2,3,4]],"6c":["v",["h",0,1],["h",2,3],["h",4,5]],"8c":["v",["h",0,1],["h",2,3],["h",4,5],["h",6,7]],"s":0}')},DsEq:function(e,t,i){"use strict";i.r(t),i.d(t,"DataProblemModel",(function(){return o}));var n=i("QfUd"),r=i("ogJP"),o=function(){function e(e,t){this._dataProblem=new n.a(null),this._quotesProvider=e,this._quotesProvider.quotesUpdate().subscribe(this,this._update.bind(this)),this._resetSubscription=t,this._resetSubscription.subscribe(this,this._resetStatus)}return e.prototype.destroy=function(){this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._resetSubscription.unsubscribeAll(this)},e.prototype.status=function(){return this._dataProblem},e.prototype._resetStatus=function(){this._dataProblem.setValue(null)},e.prototype._update=function(e){
void 0===e.values||void 0===e.values.data_problem?this._resetStatus():this._dataProblem.setValue(Object(r.clone)(e.values.data_problem))},e}()},E3Wt:function(e,t,i){"use strict";i.r(t),i.d(t,"applyIndicatorsToAllChartsImpl",(function(){return r})),i.d(t,"applyIndicatorToAllChartsImpl",(function(){return o}));var n=i("Eyy1");function r(e,t){var i=t.model().model().studyTemplate();e.undoHistory.beginUndoMacro("Apply Indicators to Entire Layout");for(var n=0;n<e.chartWidgetsDefs.length;n++){var r=e.chartWidgetsDefs[n].chartWidget;if(r!==t){var o=r.model();o&&o.applyStudyTemplate(i,"")}}e.undoHistory.endUndoMacro()}function o(e,t,i,r,o){e.undoHistory.beginUndoMacro(o);for(var s=0;s<e.chartWidgetsDefs.length;s++){var a=e.chartWidgetsDefs[s].chartWidget;if(a!==t){var l=a.model();if(l){var c=r.isOnMainPane?Object(n.ensureNotNull)(l.model().paneForSource(a.model().model().mainSeries())):l.model().createPane(r.paneIndex),u=l.pasteSourceFromClip(c,i,!0);if(u&&1===u.length){var h=u[0];if(r.asCompare){var d=Object(n.ensureNotNull)(l.mainSeries().priceScale());l.moveToScale(h,Object(n.ensureDefined)(c),d,o),l.setPriceScaleMode({percentage:!0},d,"")}}l.model().lightUpdate()}}}e.undoHistory.endUndoMacro()}},E6p6:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"SessionStage",(function(){return n})),function(e){e[e.PRE_SESSION=-1]="PRE_SESSION",e[e.POST_SESSION=-2]="POST_SESSION",e[e.LASTBAR_SESSION=-3]="LASTBAR_SESSION"}(n||(n={}))},EJcV:function(e,t,i){"use strict";(function(t){var n=i("rQHv"),r=i("ocLq"),o=i("8gnj"),s=i("Ofm5"),a=i("uXw/"),l=i("IiTo"),c=i("LxhU").Interval,u=i("FQhm"),h=i("TlGQ").visitObject,d=i("ogJP").isObject;i("2cgs"),i("MrEN");var p=i("WIS0").DatafeedRequestsCachedProcessor,_=i("+6ja").timezoneIsAvailable;function f(e){var t=e.findIndex((function(e){return-5e6!==e.index}));return 0===t?e:e.slice(t)}var m=function(e){var t=this;this._studiesCache={},this._sessionsLastDataCache={},this._metainfoCache=[],this._barsCoefficientsCache={},this._extrapolationManager=s,this._externalDatafeed=e,this._datafeedConfiguration=null,this._marketStatusWatchers={},this._resolveRequests={},this._callbacks={},this._serverTimeOffset=0,t._logMessage("Datafeed settings received: {0}".format(JSON.stringify(window.configurationData))),t._datafeedConfiguration=t._adoptConfigurationData(window.configurationData),t._fireEvent("configuration_received"),t._externalDatafeed.getServerTime&&t._externalDatafeed.getServerTime((function(e){t._serverTimeOffset=e-(new Date).valueOf()/1e3})),this._pointsetsManager=a,this._pointsetsManager.pointsetsCreated().subscribe(this,this._onPointsetsCreated),this._rangeExtensionData={},this._quotesInfo=[],this._depthInfo=[],this._endOfData={},this._computeStudyCounter=0,this._cachedDatafeed=new p(e,m.createDWMAligner),this._extendedRange=function(e){return t._rangeExtensionData[e]&&t._rangeExtensionData[e].summary},this._extendedRangeForStudy=function(e){var i=t._rangeExtensionData[e];return i?(i.summary||0)+(i.realtimeBarsCount||0):0},this._extendedTime=function(e){
return t._rangeExtensionData[e]&&t._rangeExtensionData[e].time},o.setupFeed({resolve:function(e,i,n,r){t._resolveSymbolByName(e,i,n,r)},subscribe:function(e,i,n,o,s){return t._cachedDatafeed.subscribe(e,i,n,function(e,i,n){var o=new l.SessionInfo(e.timezone,e.session,e.holidays,e.corrections),s=r.Symbol.newBarBuilder(i,o,o);return function(e){if(e&&e.count()){var i=1e3*t.getCurrentUTCTime();s.moveTo(i),s.indexOfBar(i)>=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<i;++o){for(var s=e[o];r<n&&t[r].value[0]<s;)++r;r>=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;r<n.length;++r)n[r](t);i||(this._callbacks[e]=[])}},m.prototype._adoptConfigurationData=function(e){var t=TradingView.merge({},e),i=t.supported_resolutions;if(!i||0===i.length)return t.supported_resolutions=void 0,t;for(var n=[],r=0;r<i.length;r++){var o=i[r];if(-1!==n.indexOf(o))throw new Error("Duplicating resolution `"+o+"`");n.push(o)}return t.supported_resolutions=n,t},m.prototype.supportedResolutions=function(){return this._datafeedConfiguration.supported_resolutions},m.prototype.supportedCurrencies=function(){return this._datafeedConfiguration.currency_codes||[]},m.prototype.supportedSymbolsTypes=function(){return this._datafeedConfiguration.symbols_types||[]},
m.prototype.supportedExchangesList=function(){return this._datafeedConfiguration.exchanges||[]},m.prototype.symbolsGrouping=function(){return this._datafeedConfiguration.symbols_grouping||{futures:/$a/}},m.prototype._findStudyObject=function(e){var t=e.split("@")[0],i=JSServer.studyLibrary.filter((function(i){return i.metainfo.id===e||i.metainfo.shortDescription===t}));if(0===i.length)throw Error("Study `"+e+"` not found");return i[0]},m.prototype.getMarks=function(e,t,i,n,r){var o={red:6,green:5,blue:4,yellow:3};if(this._externalDatafeed.getMarks&&this._datafeedConfiguration.supports_marks){this._logMessage("Requesting bars marks: symbol {0}, resolution {1}, range [{2} ... {3}]".format(e.full_name,r,new Date(1e3*t).toUTCString(),new Date(1e3*i).toUTCString()));var s=this;this._externalDatafeed.getMarks(e,t,i,(function(t){var i=t.map((function(e){return e.time=parseInt(e.time),e}));s._logMessage("Received bars marks: symbol {0}, resolution {1}, marks {2}".format(e.full_name,r,JSON.stringify(i)));var a=m.createDWMAligner(r,e),l=i.map((function(e){return e.tickmark=null!==a?a.tradingDayToSessionStart(1e3*e.time)/1e3:e.time,e.direction=o[e.color],e.onClicked=function(){u.emit("onMarkClick",e.id)},e.label=!!e.label&&e.label[0],e}));n(l)}),r)}},m.prototype.getTimescaleMarks=function(e,t,i,n,r){if(this._externalDatafeed.getTimescaleMarks&&this._datafeedConfiguration.supports_timescale_marks){this._logMessage("Requesting timescale marks: symbol {0}, resolution {1}, range [{2} ... {3}]".format(e.full_name,r,new Date(1e3*t).toUTCString(),new Date(1e3*i).toUTCString()));var o=this;this._externalDatafeed.getTimescaleMarks(e,t,i,(function(t){o._logMessage("Received timescale marks: symbol {0}, resolution {1}, marks {2}".format(e.full_name,r,JSON.stringify(t)));var i=m.createDWMAligner(r,e),s=t.map((function(e){return e.tickmark=null!==i?i.tradingDayToSessionStart(1e3*e.time)/1e3:e.time,e}));n(s)}),r)}},m.prototype._computeStudy=function(e,t,i,n,o,s,a,l,c,u,h,d){var p=!0,_=this._computeStudyCounter++;function f(e){if(e<l())return-5e6;var t=m.length;if(0===t)return 0;var i=m[t-1].index;return-5e6===i?0:i+1}var m=[],v={},y=0,g=!1,b=this,S=function(l){if(!r.Symbol.parsePeriod(n).isIntraday||l.has_intraday)try{var _=new r.StudyEngine({tickerid:i,symbolInfo:l,period:n,body:t,sessionId:e,onErrorCallback:h,rangeExtension:a,input:function(e){return s[e]},out:function(e,t){!function(e,t,i){for(var n=e.time,r="number"==typeof t?[t]:t,o=0;o<r.length;++o){var s=r[o];s&&"object"==typeof s&&(v["plot_"+o]=s.offset,s=s.value,y++),"number"==typeof s&&isNaN(s)&&(s=void 0),r[o]=s}var a=m.length-1,l=a<0||n>m[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;o<i.length;o++)t[o]=e[i[o].id];return t}(s),TradingView.ChartapiMessagerInstances[n].onStudyLoading(r,o);var c=null,u=!1;a._computeStudy(n,i,e,t,r,s,{getRangeExtensionCount:a._extendedRangeForStudy.bind(this,n),getRangeExtensionTime:a._extendedTime.bind(this,n)},(function(){if(null===c){var e=a._sessionsLastDataCache[n][0];if(void 0===e)return 1/0;c=e.value[0]}return c}),(function(e,t,i){u&&0===e.length||l(e,t?{data:{offsets:t}}:null,i)}),(function(i,s,l,c,u){i=f(i);var h=c?{data:{offsets:c}}:null;TradingView.ChartapiMessagerInstances[n].onDataUpdate(r,o,a._convertBarsTimeToUnix(i),h,u,a._extendedRange(e,t))}),(function(e){TradingView.ChartapiMessagerInstances[n].onStudyError(r,o,e)}),function(e,t){switch(u=!0,e.type){case"projection":this._updateProjectionData(n,r,o,e);break;case"study_graphics":!function(e,t){if(null!==t&&0!==t.length){var i={};v(e.data,(function(e){i[e.time]=!0})),y(e.data,(function(e){i[e.startTime]=!0,i[e.endTime]=!0}));var n=Object.keys(i).map(Number).sort((function(e,t){return e-t}));n.forEach((function(e,t){i[e]=t})),v(e.data,(function(e){e.index=i[e.time]})),y(e.data,(function(e){e.startIndex=i[e.startTime],e.endIndex=i[e.endTime]})),g(n,t),e.indexes=n}}(i={data:e.data,indexes:[]},a._sessionsLastDataCache[n]),l([],i,t);break;case"non_series_data":var i;!function(e,t){if(null!==t&&0!==t.length){var i={};h(e,(function(e){d(e)&&Object.keys(e).forEach((function(t){t.endsWith("__t")&&(i[e[t]]=!0)}))}),{visitInstances:!0});var n=Object.keys(i).map(Number).sort((function(e,t){return e-t}));n.forEach((function(e,t){i[e]=t})),Object.assign(e,h(e,(function(e){return d(e)&&Object.keys(e).forEach((function(t){t.endsWith("__t")&&(e[t.slice(0,-3)]=i[e[t]])})),e}),{visitInstances:!0})),g(n,t),e.indexes=n}}(i={data:e.data,indexes:[]},a._sessionsLastDataCache[n]),l([],i,t);break;default:console.warn("unsupported non-series data type for study "+e.type)}}.bind(this))},m.prototype.stopSources=function(e){for(var t in this._studiesCache[e]){var i=this._studiesCache[e][t];i&&(i.engine&&i.engine.stop(),i.activeResolve=-1)}o.unsubscribeUnused()},m.prototype.recreateSources=function(e,t,i,n){for(var r in this.stopSources(i),this._studiesCache[i]){(o=this._studiesCache[i][r])&&(o.symbol=e,o.resolution=t,"series"===o.type&&this.createSeries(e,t,i,r,o.turnaround,n))}for(var r in this._studiesCache[i]){var o
;(o=this._studiesCache[i][r])&&"study"===o.type&&this._createStudy(e,t,o.studyObject,i,r,o.turnaround,o.inputs)}},m.prototype.removeStudy=function(e,t){this._studiesCache[e]&&this._studiesCache[e][t]&&this._studiesCache[e][t].engine&&(this._studiesCache[e][t].engine.stop(),o.unsubscribeUnused()),this._studiesCache[e][t]=null},m.prototype.removeSeries=function(e,t){this.removeStudy(e,t)},m.prototype.recomputeStudy=function(e,t,i,n){var r=this._studiesCache[i][e];if(!r)throw Error("This should never happen");r.inputs=t,r.turnaround=n,r.engine&&(r.engine.stop(),o.unsubscribeUnused()),this._createStudy(r.symbol,r.resolution,r.studyObject,i,e,n,t)},m.prototype._convertBarsTimeToUnix=function(e){for(var t=[],i=0;i<e.length;++i){var n={index:e[i].index,value:[].concat(e[i].value)};n.value[0]/=1e3,t.push(n)}return t.endOfData=e.endOfData,t},m.prototype.createStudy=function(e,t,i,n,r,o,s){var a=this._findStudyObject(o),l=new a.constructor;this._studiesCache[i]=this._studiesCache[i]||{},this._studiesCache[i][n]={studyObject:l,symbol:e,resolution:t,guid:n,type:"study",inputs:s,metainfo:a.metainfo,turnaround:r},this._createStudy(e,t,l,i,n,r,s)},m.prototype.purgeRangeExtensionData=function(e){e?this._rangeExtensionData[e]={summary:0,realtimeBarsCount:0}:this._rangeExtensionData={}},m.prototype.isExtendedTo=function(e,t,i){if(!this._studiesCache[t][e])throw Error("This should never happen");var n=this._extendedTime(t);return void 0!==n&&n<=i},m.prototype.ensureExtendedTo=function(e,t,i){var n=this._studiesCache[t][e];if(!n)throw Error("This should never happen");var r=this._extendedTime(t);if(!(void 0!==r&&r<=i)){this.purgeRangeExtensionData(t),this._rangeExtensionData[t]||(this._rangeExtensionData[t]={}),this._rangeExtensionData[t].time=i;var o=this;setTimeout((function(){o.recreateSources(n.symbol,n.resolution,t,!0)}),0)}},m.prototype.extendSeriesRange=function(e,t,i){var n=this._studiesCache[t][e];if(!n)throw Error("This should never happen");if(this._isEndOfData(t,e,n.turnaround)){var r=n.engine.runner.host.symbolInfo.data_status;setTimeout((function(){TradingView.ChartapiMessagerInstances[t].onSeriesCompleted(e,n.turnaround,r)}),0)}else this._requestMoreData(e,t,i+10)},m.prototype._requestMoreData=function(e,t,i){var n=this._studiesCache[t][e];if(!n)throw Error("This should never happen");var r=this._barsCoefficients(n.symbol,n.resolution),o=r.barsCoefficient||1;this._extendRange(t,i*o),r.barsCoefficient||(r.expectedBarsCount=this._extendedRange(t));var s=this;setTimeout((function(){s.recreateSources(n.symbol,n.resolution,t,!0)}),0)},m.prototype._updateProjectionData=function(e,t,i,n){var r=n.barsetSize?this._convertBarsTimeToUnix([{index:n.barsetSize-1,exTime:n.lastBar?n.lastBar[0]/1e3:0,value:n.lastBar}]):null;TradingView.ChartapiMessagerInstances[e].onProjectionUpdate(t,i,n,r)},m.prototype.updateSeriesTurnaround=function(e,t,i){this._studiesCache[e]||(this._studiesCache[e]={}),this._studiesCache[e][t]||(this._studiesCache[e][t]={}),this._studiesCache[e][t].type="series",this._studiesCache[e][t].turnaround=i},
m.prototype.seriesTurnaround=function(e,t){return this._studiesCache[e]&&this._studiesCache[e][t]&&this._studiesCache[e][t].turnaround},m.prototype.createSeries=function(e,i,n,o,s,a){var l=e,c=new r.OHLCV;this._studiesCache[n]=this._studiesCache[n]||{},this._sessionsLastDataCache[n]=null,this._studiesCache[n][o]={symbol:e,resolution:i,studyObject:c,guid:o,type:"series",turnaround:s,symbolInfo:null},TradingView.ChartapiMessagerInstances[n].onSeriesLoading(o,s);var u=this;function h(e,t,r){u._extrapolationManager.storage(n,e.full_name,i).setLastBarTime(t,r)}this._computeStudy(n,c,l,i,o,[],{getRangeExtensionCount:u._extendedRange.bind(this,n),getRangeExtensionTime:u._extendedTime.bind(this,n)},(function(){return-1/0}),(function(t,r,l,c){var d=u._studiesCache[n][o];if(!d)throw Error("This should never happen");u._sessionsLastDataCache[n]=t,d.symbolInfo=l;var p=u._convertBarsTimeToUnix(t),_=p.length>0?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;t<e.supported_resolutions.length;t++){var i=c.parse(e.supported_resolutions[t]);i.isValid()&&(e.supported_resolutions[t]=i.value())}}(i),function(e){function i(e){console.warn("SymbolInfo validation: "+e)}if(e.has_empty_bars&&t.enabled("disable_resolution_rebuild")&&i('both has_empty_bars field and featureset "disable_resolution_rebuild" are enabled and may cause data issues (see #3329)'),(void 0===e.minmov||e.minmov<=0)&&i("minmov must be positive"),(void 0===e.pricescale||e.pricescale<=0)&&i("pricescale must be positive"),void 0!==e.name&&0!==e.name.length||i("name must be non-empty string"),void 0!==e.session&&0!==e.session.length||i("session must be non-empty string"),void 0===e.timezone||0===e.timezone.length?i("timezone must be non-empty string"):"exchange"!==e.timezone&&_(e.timezone)||"UTC"!==e.timezone&&i('unsupported timezone "{0}"'.format(e.timezone)),void 0!==e.intraday_multipliers){var n=e.intraday_multipliers;if(Array.isArray(n))for(var r=0;r<n.length;++r)"string"!=typeof n[r]&&i('intraday_multipliers[{0}] = "{1}" must be string (now: {2})'.format(r+1,n[r],typeof n[r]));else i("intraday_multipliers must be array")}(e.supported_resolutions||[]).filter((function(e){return!c.isValid(e)})).forEach((function(e){i("supported_resolutions field contains invalid value: "+e)}))}(i),n._logMessage("Symbol info after post-processing: `{0}`, SymbolInfo {1}".format(e,JSON.stringify(i))),r(i)}),(function(t){n._logMessage("Symbol resolve failed: `{0}`, reason: `{1}`".format(e,t)),o(t)}),{currencyCode:i}),s=!1}.bind(this))},m.prototype._createMarketStatusWatchers=function(e,t){void 0===this._marketStatusWatchers[e]&&(this._marketStatusWatchers[e]={});var i=this;t.forEach((function(t){void 0===i._marketStatusWatchers[e][t]&&(i._marketStatusWatchers[e][t]=new n(i._resolveSymbolByName.bind(i),e,t))}))},m.prototype._removeMarketStatusWatchers=function(e){var t=this;Object.keys(this._marketStatusWatchers[e]||{}).forEach((function(i){t._marketStatusWatchers[e][i].stop()})),this._marketStatusWatchers[e]={}},m.prototype._stopQuotesSubscription=function(e){this._quotesInfo[e].listenerGUID&&(this._externalDatafeed.unsubscribeQuotes(this._quotesInfo[e].listenerGUID),this._quotesInfo[e].listenerGUID=void 0),this._removeMarketStatusWatchers(e)},m.prototype._startQuotesSubscription=function(e){var i={},n=this;function r(t,i){
var r=n._marketStatusWatchers[e][t.n];t.symbolname=t.n,t.status=t.s,t.values=t.v,t.values.change=t.v.ch,t.values.last_price=t.v.lp,t.values.change_percent=t.v.chp,t.values.current_session=t.v.cs||r&&r.marketStatus(),t.values.pricescale=i.pricescale,t.values.minmov=i.minmov,t.values.minmove2=i.minmove2||0,t.values.fractional=i.fractional||!1,r&&t.v.cs&&r.stop(),TradingView.ChartapiMessagerInstances[e].onQuotesData([e].concat([t]))}function o(e){e.forEach((function(e){void 0!==i[e.n]?null!==i[e.n]&&r(e,i[e.n]):n._resolveSymbolByName(e.n,null,(function(t){i[e.n]=t,r(e,t)}),(function(){i[e.n]=null}))}))}var s=this._quotesInfo[e].symbols;0!==s.length&&(this._externalDatafeed.getQuotes&&!t.enabled("charting_library")?this._externalDatafeed.getQuotes(s,(function(t){n._quotesInfo[e]&&(o(t),n._quotesInfo[e].listenerGUID=e,n._externalDatafeed.subscribeQuotes(s,n._quotesInfo[e].fastSymbols,o,n._quotesInfo[e].listenerGUID))}),(function(e){})):!this._externalDatafeed.getQuotes&&t.enabled("trading_terminal")&&setTimeout((function(){o(s.map((function(e){return{n:e,s:"ok",v:{}}})))})),this._createMarketStatusWatchers(e,s))},m.prototype._restartQuotesSubscription=function(e){this._stopQuotesSubscription(e),this._startQuotesSubscription(e)},m.prototype.quoteCreateSession=function(e){this._quotesInfo[e]={symbols:[],fastSymbols:[],listenerGUID:void 0}},m.prototype.quoteDeleteSession=function(e){this._stopQuotesSubscription(e),this._quotesInfo[e]=null},m.prototype.quoteSetFields=function(e,t){},m.prototype.quoteAddSymbols=function(e,t){this._quotesInfo[e].symbols=this._filteredSymbols(this._quotesInfo[e].symbols.concat(t)),this._restartQuotesSubscription(e)},m.prototype.quoteRemoveSymbols=function(e,t){this._quotesInfo[e].symbols=this._quotesInfo[e].symbols.filter((function(e){return t.indexOf(e)<0})),this._restartQuotesSubscription(e)},m.prototype.quoteFastSymbols=function(e,t){this._quotesInfo[e].fastSymbols=this._filteredSymbols(t),this._restartQuotesSubscription(e)},m.prototype.quoteHibernateAll=function(e){},m.prototype._stopDepthSubscription=function(e){this._depthInfo[e].listenerGUID&&(this._externalDatafeed.unsubscribeDepth(this._depthInfo[e].listenerGUID),this._depthInfo[e].listenerGUID=void 0)},m.prototype._startDepthSubscription=function(e){var t=this,i=this._depthInfo[e].symbol;function n(e){return e.map((function(e){return{p:e.price,v:e.volume}}))}function r(e){var t={};return t.s=i,t.bids=n(e.bids),t.asks=n(e.asks),t}i&&this._externalDatafeed.subscribeDepth&&(t._depthInfo[e].listenerGUID=this._externalDatafeed.subscribeDepth(i,(function(i){var n;t._depthInfo[e]&&((n=i).snapshot?TradingView.ChartapiMessagerInstances[e].onDepthData([e].concat([r(n)])):TradingView.ChartapiMessagerInstances[e].onDepthUpdate([e].concat([r(n)])))})))},m.prototype._restartDepthSubscription=function(e){this._stopDepthSubscription(e),this._startDepthSubscription(e)},m.prototype.depthCreateSession=function(e){this._depthInfo[e]={symbol:null,listenerGUID:void 0}},m.prototype.depthDeleteSession=function(e){this._depthInfo[e].symbol=null,
this._stopDepthSubscription(e),delete this._depthInfo[e]},m.prototype.depthSetSymbol=function(e,t){this._depthInfo[e].symbol=t,this._restartDepthSubscription(e)},m.prototype._filteredSymbols=function(e){var t=[];return e.forEach((function(e){e instanceof Object||t.indexOf(e)<0&&t.push(e)})),t},m.prototype._isEndOfData=function(e,t,i){var n=e+"!"+t+"@"+i;return!!this._endOfData[n]},m.prototype._setEndOfData=function(e,t,i){var n=e+"!"+t+"@"+i;this._endOfData[n]=!0},m.prototype.alignTimePoint=function(e,t,i){var n=l.createAligner(t,i);return null===n?e:n.alignTimeIfPossible(1e3*e)/1e3},m.prototype.serverTimeOffset=function(){return this._serverTimeOffset},m.prototype.getCurrentUTCTime=function(){return(new Date).valueOf()/1e3+this._serverTimeOffset},m.prototype._onPointsetsCreated=function(e){var t=e.session,i=e.symbolInfo,n=this._studiesCache[t],r=this._sessionsLastDataCache[t];if(null!=n&&null!=r)for(var o in n){var s=n[o];if("series"===s.type&&null!==s.symbolInfo&&s.symbolInfo.full_name===i.full_name){var a=this._extrapolationManager.storage(t,i.full_name,s.resolution);return void this._pointsetsManager.broadcastPointsetsUpdates(i.full_name,s.resolution,r,a,i,(function(e,n){TradingView.ChartapiMessagerInstances[t].onPointsetDataUpdate(e,null,n,i)}))}}},e.exports=m}).call(this,i("Kxc7"))},ESp1:function(e,t,i){"use strict";i.r(t),i.d(t,"HeikenAshi",(function(){return r}));var n=i("ocLq"),r=function(){function e(){}return e.prototype.main=function(e){var t=e.new_var(n.Std.open(e)),i=e.new_var(n.Std.close(e)),r=t.get(1),o=i.get(1),s=n.Std.ohlc4(e),a=n.Std.na(t.get(1))?(n.Std.open(e)+n.Std.close(e))/2:(r+o)/2;t.set(a),i.set(s);var l=n.Std.max(n.Std.high(e),n.Std.max(a,s)),c=n.Std.min(n.Std.low(e),n.Std.min(a,s)),u=n.Std.volume(e),h=e.symbol;return[h.time,a,l,c,s,u,h.updatetime,h.isBarClosed]},e}()},EX27:function(e,t,i){"use strict";var n=i("XPit").TimePointIndexSearchMode,r=i("IiTo"),o=i("ocLq"),s=i("EJcV"),a=i("MrEN"),l=i("XzZr"),c=l.ChartApiInterface,u=l.HandlerInfo,h=i("ogJP").requireFullInterfaceImplementation,d=i("txPx").getLogger("Chart.ChartApiLocal");function p(e,t,i){if(e[t])if(void 0!==i)e[t][i]&&(clearTimeout(e[t][i]),delete e[t][i]);else{for(var n in e[t])e[t].hasOwnProperty(n)&&p(e,t,n);delete e[t]}}function _(e,t,i,n){p(e,t,i),e[t]||(e[t]={}),e[t][i]=n}TradingView.STUDY_COUNT_LIMIT=210,JSServer.ChartApi=function(e){this._notificationHandlers={},this._sessions={},this.studyCounter=0,this._seriesTimers={},this._studyTimers={},this._connected=!1,this._enabled=!1,this._studyEngine=new s(e),this._callbacks={},this._symbolIdCache={},this._seriesIdCache={},this._recentSeriesId={},this._enableLogging=!1,this._enabledMoreBarsRequest=!0,this._serverTimeOffset=0;var t=this;this._studyEngine.on("configuration_received",(function(){t._fireEvent("configuration_received")})),this._studyEngine.on("realtime_tick",(function(e){var i={time:e.value[0]/1e3,open:e.value[1],high:e.value[2],low:e.value[3],close:e.value[4],volume:e.value[5]};t._fireEvent("realtime_tick",i,!0)})),this._setVisibleRangeTimeout={}},
JSServer.ChartApi.prototype._makeSymbolKey=function(e,t){if(!e||!t)throw Error("incorrect identifiers");return e+"_"+t},JSServer.ChartApi.prototype._makeSeriesKey=function(e,t){if(!e||!t)throw Error("incorrect identifiers");return e+"_"+t},JSServer.ChartApi.prototype.destroy=function(){this._studyEngine.destroy(),this._studyEngine=null},JSServer.ChartApi.prototype.purgeCache=function(e){this._studyEngine.purgeCache(),this._studyEngine.purgeRangeExtensionData(),this._studyEngine.purgeDataCache(),this._symbolIdCache={},this._seriesIdCache={},this._recentSeriesId={}},JSServer.ChartApi.prototype.setAdditionalBarsRequestEnabled=function(e){this._enabledMoreBarsRequest=e},JSServer.ChartApi.prototype.defaultWatchlistSymbols=function(){return this._watchlistSettings.default_symbols},JSServer.ChartApi.prototype.defaultResolutions=function(){return this._studyEngine.supportedResolutions()||["1","3","5","15","30","45","60","120","180","240","1D","1W","1M"]},JSServer.ChartApi.prototype.availableCurrencies=function(){return Promise.resolve(this._studyEngine.supportedCurrencies())},JSServer.ChartApi.prototype.supportedSymbolsTypes=function(){return this._studyEngine.supportedSymbolsTypes()},JSServer.ChartApi.prototype.supportedExchangesList=function(){return this._studyEngine.supportedExchangesList()},JSServer.ChartApi.prototype.symbolsGrouping=function(){return this._studyEngine.symbolsGrouping()},JSServer.ChartApi.prototype.start=function(){this._enabled=!0,this._fireEvent("start_enabled")},JSServer.ChartApi.prototype._logMessage=function(e){this._enableLogging&&console.log(e)},JSServer.ChartApi.prototype.unsubscribe=function(e,t){var i=this._callbacks[e];i&&i.splice(i.indexOf(t),1)},JSServer.ChartApi.prototype.on=function(e,t){return this._callbacks.hasOwnProperty(e)||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},JSServer.ChartApi.prototype._fireEvent=function(e,t,i){if(this._callbacks.hasOwnProperty(e)){var n=this._callbacks[e].slice(0);i||(this._callbacks[e]=[]);for(var r=0;r<n.length;++r)n[r](t)}},JSServer.ChartApi.prototype.chartCreateSession=function(e,t){},JSServer.ChartApi.prototype.chartDeleteSession=function(e){},JSServer.ChartApi.prototype.createSession=function(e,t){TradingView.ChartapiMessagerInstances[e]=new a(this,e),this._sessions[e]=t,this._notificationHandlers[e]={},this.connected()&&t.onMessage({method:"connected",params:[]})},JSServer.ChartApi.prototype.removeSession=function(e){delete this._sessions[e],delete this._notificationHandlers[e],this._studyEngine.stopSources(e),p(this._seriesTimers,e),p(this._studyTimers,e)},JSServer.ChartApi.prototype.connected=function(){return this._connected},JSServer.ChartApi.prototype.connect=function(){if(this._enabled)this.connected()||(this._connected=!0,this.sessionid="dummy session id",this._notifySessions({method:"connected",params:[]}));else{var e=this;this.on("start_enabled",(function(){e.connect()}))}},JSServer.ChartApi.prototype.disconnect=function(){this._connected=!1,this._notifySessions({method:"disconnected",params:[]}),this.purgeCache(),
this.studyCounter=0},JSServer.ChartApi.prototype.switchTimezone=function(e,t){if(TradingView.ChartapiMessagerInstances[e].timezone()!==t&&(TradingView.ChartapiMessagerInstances[e].setTimezone(t),this._recentSeriesId[e])){var i=this;this._doWhenSeriesSymbolIdIsReady(e,this._recentSeriesId[e],(function(t){var n=i._seriesIdCache[i._makeSeriesKey(e,i._recentSeriesId[e])].resolution;i._studyEngine.recreateSources(t.name,n,e,!0),i._doWhenSeriesDataReceived(e,(function(){var n=i._seriesIdCache[i._makeSeriesKey(e,i._recentSeriesId[e])].resolution,r=TradingView.ChartapiMessagerInstances[e].lastBarTime(i._recentSeriesId[e]);r&&i._studyEngine.rebuildExtrapolatedData(e,t.name,n,t.info,1e3*r)}))}))}},JSServer.ChartApi.prototype.receiveLocalResponse=function(e){this._logMessage("< "+e.method),this._dispathNotification(e),this._fireEvent("message_"+e.method,void 0,!0)},JSServer.ChartApi.prototype.getMarks=function(e,t,i,n,r){this._studyEngine.getMarks(e,t,i,n,r)},JSServer.ChartApi.prototype.getTimescaleMarks=function(e,t,i,n,r){this._studyEngine.getTimescaleMarks(e,t,i,n,r)},JSServer.ChartApi.prototype.resolveSymbol=function(e,t,i,n,r){this._notificationHandlers[e][t]=new u(n,t),this._symbolIdCache[this._makeSymbolKey(e,t)]=null;var o=this;function s(t,n){Object.keys(o._seriesIdCache).some((function(e){return o._seriesIdCache[e].symbolId===t}))&&TradingView.ChartapiMessagerInstances[e].onSeriesClearData(0,""),TradingView.ChartapiMessagerInstances[e].onSymbolError(t,n),o._symbolIdCache[o._makeSymbolKey(e,t)]={name:i,status:"invalid_symbol"},o._fireEvent("resolve_fail",{session:e,symbolId:t},!0),o._fireEvent(o._makeSymbolKey(e,t)+"_resolve_fail")}this._studyEngine.resolveSymbol(i,(function(n){n.errmsg?s(t,n.errmsg):(o._symbolIdCache[o._makeSymbolKey(e,t)]={name:i,info:n,status:"ok"},o._fireEvent("symbol_resolved",{symbolInfo:n,symbolId:t,session:e},!0),o._fireEvent(o._makeSymbolKey(e,t)+"_resolved",n),TradingView.ChartapiMessagerInstances[e].onSymbolResolved(t,n))}),(function(e){s(t,e)}))},JSServer.ChartApi.prototype._doWhenSymbolIdIsReady=function(e,t,i){var n=this,r=!0;function o(){r&&(i({name:n._symbolIdCache[n._makeSymbolKey(e,t)].name,info:n._symbolIdCache[n._makeSymbolKey(e,t)].info}),r=!1,n.unsubscribe(n._makeSymbolKey(e,t)+"_resolved",o),n.unsubscribe(n._makeSymbolKey(e,t)+"_resolve_fail",o))}this._symbolIdCache[this._makeSymbolKey(e,t)]?o():(this.on(this._makeSymbolKey(e,t)+"_resolved",o),this.on(this._makeSymbolKey(e,t)+"_resolve_fail",o))},JSServer.ChartApi.prototype._doWhenSeriesDataReceived=function(e,t){TradingView.ChartapiMessagerInstances[e].seriesCompleted.subscribe(null,t,!0)},JSServer.ChartApi.prototype._doWhenSeriesSymbolIdIsReady=function(e,t,i,n){var r=this,o=this._seriesIdCache[e+"_"+t].symbolId;function s(){var t;i({name:(t=r._symbolIdCache[r._makeSymbolKey(e,o)]).name,info:t.info})}function a(){r.unsubscribe("symbol_resolved",c),r.unsubscribe("resolve_fail",l)}function l(t){t.symbolId===o&&t.session===e&&(a(),n&&n())}function c(t){t.symbolId===o&&t.session===e&&(a(),s())}
this._symbolIdCache[this._makeSymbolKey(e,o)]?s():(this.on("symbol_resolved",c),this.on("resolve_fail",l))},JSServer.ChartApi.prototype.createSeries=function(e,t,i,n,r,s,a,l){i=i||"",null!==a&&"period-back"===a.type&&(r+=","+a.value);var c=this;this._notificationHandlers[e][t]=new u((function(s){if("series_completed"===s.method){var a=o.Symbol.parsePeriod(r);a.range&&c._applyRange(e,n,t,i,a.range)}l(s)}),t),this._recentSeriesId[e]=t,TradingView.ChartapiMessagerInstances[e].setResolution(o.Symbol.parsePeriod(r).pureResolution),this._seriesIdCache[e+"_"+t]={symbolId:n,resolution:r,turnaround:i},this._studyEngine.updateSeriesTurnaround(e,t,i),this._doWhenSeriesSymbolIdIsReady(e,t,(function(n){c._studyEngine.seriesTurnaround(e,t)===i&&c._studyEngine.createSeries(n.name,r,e,t,i)}))},JSServer.ChartApi.prototype.removeSeries=function(e,t,i){this._notificationHandlers[e][t]=new u(i,t),this._studyEngine.removeSeries(e,t),p(this._seriesTimers,e,t)},JSServer.ChartApi.prototype.setVisibleTimeRange=function(e,t,i,r,o,s){var a=e.data().bars().first(),l=null!==a&&a.value[0]<=i,c=this._recentSeriesId[t],u=this._seriesIdCache[t+"_"+c].turnaround;function h(){var a=e.data(),l=a.plotValueToTimePointIndex(i,TradingView.TIME_PLOT,n.FromLeft),h=a.plotValueToTimePointIndex(r,TradingView.TIME_PLOT,n.FromRight);if(!(l>h)){var d=0,p=a.valueAt(h)[TradingView.TIME_PLOT];if(p<r&&e.syncModel()){var _=e.syncModel().distance(p,r);_.success&&(h+=d=_.result)}var f=a.last().value[TradingView.TIME_PLOT];!o||p===f&&0===d||(o.applyDefaultRightMargin=!1,o.percentRightMargin=0),TradingView.ChartapiMessagerInstances[t].onSeriesTimeframeUpdate(c,u,l,h,o),e.requestMoreData(),s&&s()}}if(l||this._studyEngine.isExtendedTo(c,t,i))h();else{var d=TradingView.ChartapiMessagerInstances[t].seriesCompleted,p=TradingView.ChartapiMessagerInstances[t].seriesError;void 0!==this._setVisibleRangeTimeout[t]&&clearTimeout(this._setVisibleRangeTimeout[t]),this._setVisibleRangeTimeout[t]=setTimeout(function(){delete this._setVisibleRangeTimeout[t],d.subscribe(null,_,!0),p.subscribe(null,f,!0),this._studyEngine.ensureExtendedTo(c,t,i)}.bind(this),0)}function _(e,t){e===c&&t===u&&(d.unsubscribe(null,_),p.unsubscribe(null,f),h())}function f(e,t){e===c&&t===u&&d.unsubscribe(null,_)}},JSServer.ChartApi.prototype._applyRange=function(e,t,i,n,o){var s=TradingView.ChartapiMessagerInstances[e].lastBarTime(i);if(s){var a=this._symbolIdCache[this._makeSymbolKey(e,t)].info,l=r.alignPeriodsBack(a.session,a.holidays,a.corrections,o.resolution,o.interval,1,1e3*s),c=chartWidget.model().mainSeries();this.setVisibleTimeRange(c,e,l/1e3,s,{applyDefaultRightMargin:!0})}},JSServer.ChartApi.prototype.modifySeries=function(e,t,i,n,r,s,a,l){i=i||"",null!==s&&"period-back"===s.type&&(r+=","+s.value);var c=this._seriesIdCache[e+"_"+t]?this._seriesIdCache[e+"_"+t].resolution:void 0;TradingView.ChartapiMessagerInstances[e].setResolution(o.Symbol.parsePeriod(r).pureResolution);var h=this;this._notificationHandlers[e][t]=new u((function(s){if("series_completed"===s.method){
var l=o.Symbol.parsePeriod(c),u=o.Symbol.parsePeriod(r);u.range&&l.range!==u.range&&h._applyRange(e,n,t,i,u.range)}a(s)}),t),this._recentSeriesId[e]=t,this._studyEngine.updateSeriesTurnaround(e,t,i),l&&(this._seriesIdCache[this._makeSeriesKey(e,l)]=null),this._seriesIdCache[this._makeSymbolKey(e,t)]={symbolId:n,resolution:r,turnaround:i},this._doWhenSeriesSymbolIdIsReady(e,t,(function(t){h._studyEngine.purgeRangeExtensionData(e),h._studyEngine.recreateSources(t.name,r,e,!0)}))},JSServer.ChartApi.prototype.requestMoreData=function(e,t,i,n){if(this._enabledMoreBarsRequest){var r=this,o=setTimeout((function(){r._notificationHandlers[e][t]=new u(n,t),r._studyEngine.extendSeriesRange(t,e,i)}),0);_(this._seriesTimers,e,t,o)}},JSServer.ChartApi.prototype.setStudiesAccessController=function(e){this.studiesAccessController=e},JSServer.ChartApi.prototype.setWatchlistSettings=function(e){this._watchlistSettings=e},JSServer.ChartApi.prototype.allStudiesMetadata=function(){return this._studyEngine.studiesMetadata()},JSServer.ChartApi.prototype.requestMetadata=function(e,t,i){this._notificationHandlers[e][t]=new u(i,t);var n=this.studiesAccessController.getEnabledTools();TradingView.ChartapiMessagerInstances[e].onRequestMetadata(t,n)},JSServer.ChartApi.prototype.isCanCreateStudy=function(){return this.studyCounter<TradingView.STUDY_COUNT_LIMIT},JSServer.ChartApi.prototype.createStudy=function(e,t,i,n,r,o,s){if(!this.isCanCreateStudy())throw Error("Exceeded the limit of studies");var a=this;i=i||"",this._notificationHandlers[e][t]=new u(s,t);var l=this._seriesIdCache[this._makeSeriesKey(e,n)].symbolId,c=this._seriesIdCache[this._makeSeriesKey(e,n)].resolution;this._doWhenSymbolIdIsReady(e,l,(function(n){a._studyEngine.createStudy(n.name,c,e,t,i,r,o),a.studyCounter++}))},JSServer.ChartApi.prototype.rebindStudy=function(e,t,i,n,r,o,s,a){throw new Error("Not implemented")},JSServer.ChartApi.prototype.removeStudy=function(e,t){this._notificationHandlers[e][t]=null,this._studyEngine.removeStudy(e,t),this.studyCounter--,p(this._studyTimers,e,t)},JSServer.ChartApi.prototype.modifyStudy=function(e,t,i,n,r){var o=this,s=setTimeout((function(){i=i||"",o._notificationHandlers[e][t]=new u(r,t),o._studyEngine.recomputeStudy(t,n,e,i)}),0);_(this._studyTimers,e,t,s)},JSServer.ChartApi.prototype.createPointset=function(e,t,i,n,r,o,s){i=i||"",this._notificationHandlers[e][t]=new u(s,t);var a=this;this._doWhenSymbolIdIsReady(e,n,(function(i){a._studyEngine.createPointset(e,t,i.info.full_name,i.info,r,o)}))},JSServer.ChartApi.prototype.modifyPointset=function(e,t,i,n,r){throw Error("This call is not implemented")},JSServer.ChartApi.prototype.removePointset=function(e,t,i){this._notificationHandlers[e][t]=null,this._studyEngine.removePointset(t)},JSServer.ChartApi.prototype.requestMoreTickmarks=function(e,t,i,n){this._notificationHandlers[e][t]=new u(n,t);var r=this;this._doWhenSeriesSymbolIdIsReady(e,t,(function(n){var o=r._seriesIdCache[r._makeSeriesKey(e,t)].resolution;r._studyEngine.onMoreTickmarksRequested(e,n.name,n.info,o,i)}))},
JSServer.ChartApi.prototype.requestFirstBarTime=function(e,t,i,n){this._notificationHandlers[e][t]=new u(n,t)},JSServer.ChartApi.prototype._invokeHandler=function(e,t){e&&e(t)},JSServer.ChartApi.prototype._sendRequest=function(e,t){throw Error("This method is not implemented")},JSServer.ChartApi.prototype._onMessage=function(e){throw Error("This method is not implemented")},JSServer.ChartApi.prototype._convertTimescaleResponse=function(e){for(var t=e.marks,i=0;i<t.length;++i)t[i]={span:t[i][0],time:t[i][1],index:t[i][2]};return e},JSServer.ChartApi.prototype._dispathNotification=function(e){var t=e.params.shift();if(this._notificationHandlers[t])switch(e.method){case"timescale_update":var i=e.params[0],n=e.params[1],r=this._convertTimescaleResponse(n);for(var o in r.clear=0===n.changes.length&&0===n.marks.length,this._sessions[t].onMessage({method:"timescale_update",params:r}),i){(a={}).customId=o,a.plots=i[o].series,i[o].ns&&(a.nonseries=i[o].ns),a.turnaround=i[o].turnaround;var s={method:"data_update",params:a};this._invokeNotificationHandler(t,o,s)}break;case"tickmark_update":(r=this._convertTimescaleResponse(e.params[0])).changes=[],this._sessions[t].onMessage({method:"timescale_update",params:r});break;case"data_update":for(var o in e.params[0]){var a,l=e.params[0][o];(a={}).customId=o,a.plots=l.series?l.series:l.plots,a.turnaround=l.turnaround,"s"in l&&"ns"in l&&(a.plots=l.s,a.nonseries=l.ns);for(var c=0;c<a.plots.length;c++)for(var u in a.plots[c].value)1e100===a.plots[c].value[u]&&(a.plots[c].value[u]=void 0);s={method:"data_update",params:a};this._invokeNotificationHandler(t,o,s)}break;case"index_update":for(var o in e.params[0]){s={method:"index_update",params:e.params[0][o]};this._invokeNotificationHandler(t,o,s)}break;case"critical_error":d.logNormal(new Date+" critical_error session:"+this.sessionid+" reason:"+e.params[0]),this._sessions[t].onMessage({method:"critical_error",params:e.params});break;case"quote_symbol_data":case"quote_list_fields":case"depth_symbol_error":case"depth_symbol_success":case"dd":case"dpu":case"depth_bar_last_value":this._sessions[t].onMessage({method:e.method,params:e.params});break;default:var h=e.params[0];this._invokeNotificationHandler(t,h,e)}},JSServer.ChartApi.prototype._invokeNotificationHandler=function(e,t,i){if(void 0!==t){var n=this._notificationHandlers[e][t];void 0!==n&&n&&this._invokeHandler(n.handler,i),"series_deleted"!==i.method&&"study_deleted"!==i.method||delete this._notificationHandlers[e][t]}},JSServer.ChartApi.prototype.searchSymbols=function(e,t,i,n,r,o,s,a,l,c){0===e.length&&0===t.length&&0===i.length&&c([]),this._studyEngine.searchSymbols(e,t,i,c)},JSServer.ChartApi.prototype._notifySessions=function(e){for(var t in this._sessions){if(!this._sessions.hasOwnProperty(t))return;var i=this._sessions[t];"function"==typeof i.onMessage&&i.onMessage(e)}},JSServer.ChartApi.prototype.unpack=function(e){throw Error("This method is not implemented")},JSServer.ChartApi.prototype.quoteCreateSession=function(e){return this._studyEngine.quoteCreateSession(e)},
JSServer.ChartApi.prototype.quoteDeleteSession=function(e){return this._studyEngine.quoteDeleteSession(e)},JSServer.ChartApi.prototype.quoteSetFields=function(e,t){return this._studyEngine.quoteSetFields(e,t)},JSServer.ChartApi.prototype.quoteAddSymbols=function(e,t){return-1!==t.indexOf(void 0)&&(console.warn("Got undefined in quoteAddSymbols"),t=t.filter((function(e){return!!e}))),this._studyEngine.quoteAddSymbols(e,t)},JSServer.ChartApi.prototype.quoteRemoveSymbols=function(e,t){return this._studyEngine.quoteRemoveSymbols(e,t)},JSServer.ChartApi.prototype.quoteFastSymbols=function(e,t){return this._studyEngine.quoteFastSymbols(e,t)},JSServer.ChartApi.prototype.quoteHibernateAll=function(e){return this._studyEngine.quoteHibernateAll(e)},JSServer.ChartApi.prototype.depthCreateSession=function(e){return this._studyEngine.depthCreateSession(e)},JSServer.ChartApi.prototype.depthDeleteSession=function(e){return this._studyEngine.depthDeleteSession(e)},JSServer.ChartApi.prototype.depthSetSymbol=function(e,t){return this._studyEngine.depthSetSymbol(e,t)},JSServer.ChartApi.prototype.depthClearSymbol=function(e){},JSServer.ChartApi.prototype.depthSetScale=function(e,t){},JSServer.ChartApi.prototype.createStudiesAccessController=function(e,t,i){return new this.StudiesAccessController(this._studyEngine,e&&JSON.parse(e)||{type:"black",tools:[]})},JSServer.ChartApi.prototype.StudiesAccessController=function(e,t){this._studyEngine=e,this._studiesAccess=t},JSServer.ChartApi.prototype.StudiesAccessController.prototype._findTool=function(e){for(var t=null,i=0;i<this._studiesAccess.tools.length;++i){var n=this._studiesAccess.tools[i];if(n.name===e||n===e){t=n;break}}return t},JSServer.ChartApi.prototype.StudiesAccessController.prototype.getEnabledTools=function(){return this._studyEngine.studiesMetadata().filter((function(e){return this.isToolEnabled(e.description)||e.is_hidden_study}),this)},JSServer.ChartApi.prototype.StudiesAccessController.prototype.isToolEnabled=function(e){var t=this._findTool(e);return"black"===this._studiesAccess.type?!t||t.grayed:!!t},JSServer.ChartApi.prototype.StudiesAccessController.prototype.isToolGrayed=function(e){var t=this._findTool(e);return t&&t.grayed},JSServer.ChartApi.prototype.serverTimeOffset=function(){return this._studyEngine.serverTimeOffset()},JSServer.ChartApi.prototype.alignTimePoint=function(e,t,i){return this._studyEngine.alignTimePoint(e,t,i)},JSServer.ChartApi.prototype.disconnectCount=function(){return 0},h(JSServer.ChartApi,"JSServer.ChartApi",c,"ChartApiInterface"),e.exports=JSServer.ChartApi},EYFt:function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));var n=i("mrSG"),r=i("ivNn"),o=i("YFKU"),s=i("qFKp"),a=i("Tmoa"),l=i("Kxc7"),c=i("k9/m"),u=i("CW80"),h=i("mMWL"),d=i("23IT"),p=s.CheckMobile.any(),_=Object(o.t)("n/a"),f=l.enabled("hide_last_na_study_output"),m=function(){function e(e,t){this._emptyValues=[],this._study=e,this._model=t;var i=e.metaInfo().plots
;if(i)for(var n=0;n<i.length;++n)if(!(this._study.isSelfColorerPlot(n)||this._study.isBarColorerPlot(n)||this._study.isBgColorerPlot(n)||this._study.isDataOffsetPlot(n)||this._study.isOHLCColorerPlot(n)||this._study.isAlertConditionPlot(n))){var r=i[n].id;this._emptyValues.push({id:r,index:n,title:this._study.guiPlotName(r),value:"",visible:!1})}}return e.prototype.getItems=function(){return this._emptyValues},e.prototype.getValues=function(e){null===e&&(e=this._study.data().lastIndex());for(var t=this._emptyValues.map((function(e){return Object(n.__assign)({},e)})),i=this._hideValues(),o=this._study.isVisible()&&!i?_:"",s=0,l=t;s<l.length;s++){l[s].value=o}if(i)return t;f&&t.length&&(t[t.length-1].value="");var u=this._study.priceScale();if(!this._study.isVisible()||null===e||null===u||u.isEmpty()||this._model.timeScale().isEmpty())return t;var h=this._study.metaInfo().plots,p={},m=this._study.metaInfo().palettes;if(h&&void 0!==m)for(var v=0;v<h.length;v++){var y=h[v];if(Object(d.isColorerPlot)(y)||Object(d.isOhlcColorerPlot)(y))p[y.target]={index:v,palette:m[y.palette],paletterProps:this._study.properties().palettes[y.palette]}}for(var g=this._study.formatter(),b={},S=0,w=t;S<w.length;S++){var P=w[S],C=P.id,x=this._study.properties().styles[C].visible.value();if(P.visible=x,x){var T=P.index,I=e-this._study.offset(C),M=this._study.data().lastIndex(),L=null!==M&&I>M?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<this._migrs.length;n++){var r=this._migrs[n];r.fromVers.isLess(e)||r.fromVers.isLessOrEqual(i)&&(i=r.fromVers,t=n)}return t<0?null:this._migrs[t]},o.prototype._applyMigration=function(e,t){for(var i=e,n=0;n<t.rules.length;n++){var r=t.rules[n];i=this._getApplyRuleFun(r.type)(i,r)}return i},
o.prototype._getApplyRuleFun=function(e){if("inputRemoved"===e)return o._applyInputRemovedRule;if("inputChangedType"===e)return o._applyInputChangedTypeRule;if("inputChangedMinMax"===e)return o._applyInputChangedMinMaxRule;if("inputChangedOptions"===e)return o._applyInputChangedOptionsRule;throw new Error("Unknown migration rule type: "+e)},o._applyInputRemovedRule=function(e,t){if(!(t.inputId in e))return e;if("removeVal"!==t.action)throw new Error("Unexpected rule.action="+t.action+" in rule.type="+t.type);var i=e[t.inputId];return delete e[t.inputId],r.logNormal("Input "+t.inputId+"="+i+" removed"),e},o._applyInputChangedTypeRule=function(e,t){var i=e[t.inputId];if("resetToDefVal"===t.action)return e[t.inputId]=t.defVal,r.logNormal("Input "+t.inputId+"="+i+" reset to default value "+t.defVal),e;if("convertVal"===t.action){if(null==i)return e;if("float"===t.inputTypeFrom&&"integer"===t.inputType)return e[t.inputId]=Math.round(e[t.inputId]),r.logNormal("Input "+t.inputId+"="+i+" converted to value "+e[t.inputId]),e;if("integer"===t.inputTypeFrom&&"float"===t.inputType)return e;if("text"===t.inputTypeFrom&&"source"===t.inputType)return o._isValidSource(i,t.options)||(e[t.inputId]=t.defVal),e;throw new Error("Cannot convertVal from "+t.inputTypeFrom+" to "+t.inputType)}throw new Error("Unknown action "+t.action+" for rule with type "+t.type)},o._isValidSource=function(e,t){return e.indexOf("$")>=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 i<t.minVal?e[t.inputId]=t.minVal:i>t.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;n<o.TVLocalStorage.length;n++){(c=o.TVLocalStorage.key(n)).startsWith(i)&&e.push(c)}for(var r=o.TVLocalStorage.length,a=0,l=e;a<l.length;a++){var c=l[a];o.TVLocalStorage.removeItem(c)}var u=performance.now()-t;s.logNormal("Total keys amount in local storage on operation start: "+r),s.logNormal("Keys amount in local storage to be deleted: "+e.length),s.logNormal("Keys to be deleted from local storage: "+JSON.stringify(e)),s.logNormal("Removing keys from local storage took "+u+" ms")}()):window.addEventListener("storage",(function(e){var t=e.newValue,r=e.key;if(null===t||!r||!r.startsWith(i))return;var s=r.substr(i.length);n[s]&&n[s].forEach((function(t){t(e.newValue)}));o.TVLocalStorage.removeItem(r)})),e.on=function(e,t){n[e]||(n[e]=[]),n[e].push(t)},e.off=function(e,t){if(n[e]){var i=n[e].indexOf(t);-1!==i&&(1===n[e].length?delete n[e]:n[e].splice(i,1))}},e.emit=function(e,n){void 0===n&&(n=Date.now());try{t?t.postMessage({event:e,value:n}):o.TVLocalStorage.setItem(i+e,n.toString())}catch(r){s.logError(r.message)}}}(n||(n={}))},FDyI:function(e,t,i){"use strict";i.r(t);var n=i("Eyy1"),r=i("LxhU"),o=i("IiTo"),s=i("/bs+"),a=function(){function e(e){this._timeScale=e}return e.prototype.coordinateToTime=function(e){var t=this._timeScale.coordinateToIndex(e);return this._timeScale.indexToTimePoint(t)},e}();i.d(t,"ChartWidgetApiBase",(function(){return l}));var l=function(){function e(e){this._ranges=null,this._chartWidget=e}return e.prototype.whenChartReady=function(e){this._chartWidget.withModel(this,e)},e.prototype.exportData=function(e){var t=this
;return i.e("export-data").then(i.bind(null,"SIoL")).then((function(i){return i.exportData(t._chartWidget.model().model(),e)}))},e.prototype.barTimeToEndOfPeriod=function(e){var t=this._prepareEndOfPeriodArgs();return Object(s.barTimeToEndOfPeriod)(t.barBuilder,t.session,e,t.intervalObj)},e.prototype.endOfPeriodToBarTime=function(e){var t=this._prepareEndOfPeriodArgs();return Object(s.endOfPeriodToBarTime)(t.barBuilder,t.session,e,t.intervalObj)},e.prototype.properties=function(){return this._chartWidget.properties()},e.prototype.setBarSpacing=function(e){this._chartWidget.model().timeScale().setBarSpacing(e)},e.prototype.scrollChartByBar=function(e){this._chartWidget.model().scrollChartByBar(e)},e.prototype.ranges=function(){throw new Error("not implemented")},e.prototype.getTimeScale=function(){return new a(this._chartWidget.model().timeScale())},e.prototype._prepareEndOfPeriodArgs=function(){var e=this._chartWidget.model().model(),t=e.timezone(),i=Object(n.ensureNotNull)(e.mainSeries().symbolInfo()),s=e.mainSeries().interval(),a=new o.SessionInfo(t,i.session,i.holidays,i.corrections),l=Object(o.newBarBuilder)(s,a,a),c=r.Interval.parse(s);return{barBuilder:l,session:a.spec,intervalObj:c}},e}()},FIi8:function(e,t,i){"use strict";function n(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];return e&&"object"==typeof e?(0===t.length||t.forEach((function(t){null!=t&&"object"==typeof t&&Object.keys(t).forEach((function(i){var o=e[i],s=t[i];if(!(s===e)){var a=Array.isArray(s);if(s&&(r(s)||a)){var l=void 0;l=a?o&&Array.isArray(o)?o:[]:o&&r(o)?o:{},e[i]=n(l,s)}else void 0!==s&&(e[i]=s)}}))})),e):e}function r(e){if(!e||"[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);if(!t)return!0;var i=Object.hasOwnProperty.toString,n=t.hasOwnProperty("constructor")&&t.constructor;return"function"==typeof n&&i.call(n)===i.call(Object)}i.r(t),i.d(t,"deepExtend",(function(){return n}))},FKaq:function(e,t,i){"use strict";i.r(t),i.d(t,"SetPriceScaleSelectionStrategyCommand",(function(){return l}));var n=i("mrSG"),r=i("Eyy1"),o=i("RDU5"),s=i("MWAT"),a=function(){function e(e){this._leftScales=e.leftPriceScales().map((function(e){return e.id()})),this._rightScales=e.rightPriceScales().map((function(e){return e.id()}))}return e.prototype.restorePane=function(e){this._leftScales.reverse().map((function(t){return Object(r.ensureNotNull)(e.getPriceScaleById(t))})).forEach((function(t){return e.movePriceScale(t,"left")})),this._rightScales.reverse().map((function(t){return Object(r.ensureNotNull)(e.getPriceScaleById(t))})).forEach((function(t){return e.movePriceScale(t,"right")}))},e}(),l=function(e){function t(t,i,n){var r=e.call(this,n)||this;return r._chartModel=t,r._targetStrategy=Object(s.createPriceScaleSelectionStrategy)(i),r._initialState=t.panes().map((function(e){return new a(e)})),r}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this;this._chartModel.panes().forEach((function(t){return t.setPriceScaleSelectionStrategy(e._targetStrategy)})),
this._chartModel.fullUpdate()},t.prototype.undo=function(){for(var e=this._chartModel.panes(),t=0;t<e.length;t++)this._initialState[t].restorePane(e[t]);this._chartModel.fullUpdate()},t}(o.UndoCommand)},FQhm:function(e,t,i){"use strict";i.r(t),i.d(t,"unsubscribe",(function(){return l})),i.d(t,"on",(function(){return c})),i.d(t,"subscribe",(function(){return u})),i.d(t,"subscribeToAll",(function(){return h})),i.d(t,"emit",(function(){return d})),i.d(t,"emitOnce",(function(){return p}));var n=i("aIyQ"),r=i.n(n),o={},s=[],a={};function l(e,t,i){o[e].unsubscribe(i,t)}function c(e,t,i){u(e,t,i)}function u(e,t,i,n){o.hasOwnProperty(e)||(o[e]=new r.a),a[e]?t.call(i):o[e].subscribe(i,t,n)}function h(e){s.push(e)}function d(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var n=[e].concat(t);s.forEach((function(e){e.apply(null,n)})),o.hasOwnProperty(e)&&o[e].fire.apply(o[e],t)}function p(e){a[e]&&console.warn("Something went wrong: emitOnce called multiple times with same event ("+e+")"),a[e]=!0,d.apply(null,arguments)}},FaJS:function(e,t,i){"use strict";i.r(t),i.d(t,"scaleRatio",(function(){return r})),i.d(t,"priceRangeByScaleRatio",(function(){return o})),i.d(t,"barSpacingByScaleRatio",(function(){return s}));var n=i("Qb4w");function r(e,t){if(t.isLog()||e.isEmpty()||t.isEmpty())return null;var i=function(e){if(e.isEmpty())return null;var t=e.priceRange();if(null===t)return null;var i=t.length();return e.internalHeight()/i}(t);return null===i?null:e.getValidBarSpacing()/Math.max(1e-10,i)}function o(e,t,i){if(e.isLog()||null===i||e.isEmpty())return null;var r=e.priceRange();if(null===r||r.isEmpty())return null;var o=e.internalHeight()/(t/i),s=r.length();if(o===s)return r;var a=(o-s)/2;return new n.PriceRange(r.minValue()-a,r.maxValue()+a)}function s(e,t){if(e.isLog()||null===t||e.isEmpty())return null;var i=e.priceRange();if(null===i)return null;var n=i.length();return e.internalHeight()/n*t}},Fdrt:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererStandardPivotLabel",(function(){return r}));var n=i("VdBB"),r=function(){function e(e,t,i){this._drawRects=[],this._cacheProvider=e,this._point=t,this._label=i}return e.prototype.draw=function(e,t){var i=this,n=this._cacheProvider(t);e.save(),e.setTransform(1,0,0,1,0,0);var r=t.pixelRatio;this._drawRects=[];for(var o=function(t){var o=n.labelRectByIndex(t),s={left:Math.round(i._point.x-o.width+a),top:Math.round(i._point.y-o.height/2),width:o.width,height:o.height};return e.drawImage(n.canvas(),Math.round(o.left*r),Math.round(o.top*r),o.width*r,o.height*r,Math.round(s.left*r),Math.round(s.top*r),s.width*r,s.height*r),i._drawRects.push(s),o.width},s=this._label.split("/"),a=0,l=0;l<s.length;l++){var c=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"].indexOf(s[l]);l>0&&(a+=o(c+11)/2),a+=o(c)/2}e.restore()},e.prototype.hitTest=function(e){for(var t=0,i=this._drawRects;t<i.length;t++){var r=i[t];if(e.x>=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<arguments.length;r++)n[r]=arguments[r];var o=""+(t?t.apply(null,n):n[0]);if(!i.has(o)){var s=e.apply(this,n);return i.set(o,s),s}return i.get(o)}}i.r(t),i.d(t,"memoize",(function(){return n}))},GEp6:function(e,t,i){"use strict";function n(e,t,i){var n=t.subtract(e),r=i.subtract(e).dotProduct(n)/n.dotProduct(n);return{coeff:r,distance:e.addScaled(n,r).subtract(i).length()}}Object.defineProperty(t,"__esModule",{value:!0}),t.distanceToLine=n,t.distanceToSegment=function(e,t,i){var r=n(e,t,i);if(0<=r.coeff&&r.coeff<=1)return r;var o=e.subtract(i).length(),s=t.subtract(i).length();return o<s?{coeff:0,distance:o}:{coeff:1,distance:s}}},GH0z:function(e,t,i){"use strict";i.r(t),i.d(t,"PercentageFormatter",(function(){return s}));var n=i("mrSG"),r=i("kcTO"),o=i("Ialn"),s=function(e){function t(t){void 0===t&&(t=100);var i=e.call(this,t)||this;return i.type="percentage",i}return Object(n.__extends)(t,e),t.prototype.state=function(){var e=r.PriceFormatter.prototype.state.call(this);return e.percent=!0,e
},t.prototype.parse=function(t){return t=t.replace("%",""),e.prototype.parse.call(this,t)},t.prototype.format=function(t,i,n,r,s){void 0===s&&(s=!0);var a=e.prototype.format.call(this,t,i,n,r,!1)+"%";return s?Object(o.forceLTRStr)(a):a},t.serialize=function(e){return e.state()},t.deserialize=function(e){return new t(e.priceScale)},t}(r.PriceFormatter)},GK7n:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Branding=void 0;var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(l){r=!0,o=l}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return i}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),o=i("aO4+"),s=i("f6yo"),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i("Kxc7")),l=i("VdBB"),c=i("9uLv"),u=i("Tmoa"),h=i("//lZ"),d=i("jFln"),p=i("ikwP"),_=i("eJTA");function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var m=i("JOqt").debounce,v=i("/b+7"),y=i("zDbI").CHART_FONT_FAMILY,g=a.enabled("adaptive_logo"),b=a.enabled("small_no_display"),S=a.enabled("38914"),w="Ch{0}ar{1}t{2}by{3}{4}".format("",""," "," ","TradingView"),P="po{0}wer{1}ed{2}by{3}{4}".format("",""," "," ","TradingView"),C="by{3}{4}".format("",""," "," ","TradingView"),x=S?C:P,T=navigator.userAgent.toLowerCase().indexOf("firefox")>-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._animatedWidth<this._brandCircleSize+20?0:this._animatedWidth/this.maximizedAnimationWidth(),r=(0,_.parseRgb)(this._brandCircleColor),o=n(r,3),s=o[0],a=o[1],l=o[2],c=(0,_.parseRgb)(this._fillColor),u=n(c,3),h=u[0],d=u[1],p=u[2],f=(0,_.parseRgb)(this._strokeColor),m=n(f,3),v=m[0],y=m[1],g=m[2];this._animatedColorBg=(0,_.rgbaToString)((0,_.blendRgba)([s,a,l,(0,_.normalizeAlphaComponent)(1)],[h,d,p,(0,_.normalizeAlphaComponent)(i)])),this._animatedColorText=(0,_.rgbaToString)((0,_.blendRgba)([h,d,p,(0,_.normalizeAlphaComponent)(1)],[v,y,g,(0,_.normalizeAlphaComponent)(i)])),this._animatedOpacity=i}},{key:"draw",value:function(e,t){if(this.showAnimatedBranding){if(this._needDisplayImage&&this._imageReady){e.save();var i=(this._brandCircleSize-this._imageWidth)/2,n=(this._brandCircleSize-this._imageHeight)/2;e.translate(-i,-n),this._drawFillRectWithRoundedCorner(e,0,0,this._animatedWidth,this._brandCircleSize,this._brandCircleSize/2,this._animatedColorBg),e.translate(i,n),this._drawImageWithColor(e);var r=12+(M?-.5:0),o=this._imageWidth+r;this._animatedWidth>o&&(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;r<e.inputs.length;++r){var o=e.inputs[r];o.isHidden&&(n.addExclusion("inputs."+r.toString()),n.addExclusion("inputs."+o.id))}return n}function ue(e,t){if(t.plots)for(var i=0;i<t.plots.length;i++){var n=t.plots[i],r=n.id;if(!X.isColorerPlot(n)){var o={visible:!0,color:"#0496FF",linestyle:CanvasEx.LINESTYLE_SOLID,linewidth:2,plottype:Q.Line,histogramBase:0,transparency:50,trackPrice:!1,joinPoints:!1};X.isBarColorerPlot(n)&&(o.transparency=0),o.plottype=n.type,o.title=r,e.styles&&r in e.styles&&TradingView.merge(o,e.styles[r]),e.styles[r]=o}}}function he(e,t,i,r){this._titleStrCache={},this._titleInPartsCache={},this._resolvedSymbols={},this._priceAxisViewsBase=[],this._graphicsPriceAxisViews=[],this._priceLinesAxisViews=[],this._hlinesPriceAsisViews=[],this._horizlinesPriceAsisViews=[],oe.call(this,e,t,i,r),this._chartApi=e._chartApi,this._numericFormatter=new H,this._properties.listeners().subscribe(this,this._onPropertiesChanged),this._properties.visible.listeners().subscribe(this,this.visibleChanged),this._properties.visible.listeners().subscribe(this,this.processHibernate);for(var o=0;o<this._metaInfo.plots.length;o++){var s=this._metaInfo.plots[o].id,a=this.properties().styles[s];null!=a&&null!=a.visible&&a.visible.listeners().subscribe(this,this.processHibernate)}for(var l in this._metaInfo.graphics)for(var c in this._metaInfo.graphics[l]){var u=this._properties.graphics[l][c]
;u.visible&&u.visible.listeners().subscribe(this,this.processHibernate)}this._showStudyArgumentsProperty=this.model().properties().paneProperties.legendProperties.showStudyArguments,this._turnaroundCounter=0,this._turnaround="st"+this._turnaroundCounter,this._plotFields=[];var h=this.metaInfo().plots;if(h){o=0;for(var d=h.length;o<d;o++){c=h[o].id;this._plotFields.push(c)}}this._invalidateLastNonEmptyPlotRowCache(),this.m_data=new G(te(this._metaInfo),ie),this._graphics=new D,this._plotOffsets={},this._plotOffsetsMetaInfoOverride={},this._studyModified=!1,this._tagsChanged=new n,this._labelPaneViews=[],this.createViews();var p=this;this._handler=function(e){p.onData(e)},this._handler.isTVScriptStrategy=this._metaInfo.isTVScriptStrategy,this._recreatePriceFormattingDependencies();p=this;this._properties.precision.listeners().subscribe(this,this._precisionChanged),this._showStudyArgumentsProperty.listeners().subscribe(this,this.invalidateTitleCache),this._properties.description.listeners().subscribe(this,this.invalidateTitleCache),this._properties.inputs.listeners().subscribe(this,this.invalidateTitleCache),this._properties.shortDescription&&this._properties.shortDescription.listeners().subscribe(this,this.invalidateTitleCache),re.enabled("update_study_formatter_on_symbol_resolve")&&e.mainSeries().dataEvents().symbolResolved().subscribe(this,this._recreatePriceFormattingDependencies),e.mainSeries().dataEvents().symbolResolved().subscribe(this,this.invalidateTitleCache);p=this;var _={};this._simplePlotsCount=r.plots.filter((function(e,t){if(p.isLinePlot(t))return!0;if(p.isOHLCSeriesPlot(t)){var i=p.metaInfo().plots[t].target;return!_[i]&&(_[i]=i,!0)}return!1})).length,this._properties.showInDataWindow.listeners().subscribe(e,e.fullUpdate),this.hasBarColorer()&&this._properties.visible.listeners().subscribe(e.mainSeries(),e.mainSeries().invalidateBarStylesCache),this._childStudyByRebind=new n,this._formatterChanged=new n,this._priceStepChanged=new n,this.parentSource().formatterChanged().subscribe(this,this._onSourceFormatterChanged),this.parentSource().priceStepChanged().subscribe(this,this._onSourcePriceStepChanged),this._ongoingDataUpdate=Promise.resolve(),this._isDestroyed=!1,this._definitionsViewModel=null}function de(e,t){return e&&e[t]&&e[t].hasOwnProperty("showLast")?e[t].showLast.value():null}inherit(he,oe),TradingView.Study=he,he.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 r=this._model.timeScale().visibleBarsStrictRange();if(null===r)return n;if(!this.properties().visible.value())return n;var o,s,a=this.properties().styles,l=this.properties().ohlcPlots;if(a&&a[e]&&(o=a[e]),l&&l[e]&&(o=l[e]),!o||!o.visible.value())return n;var c=this.metaInfo().plots;for(s=0;s<c.length&&!(c[s].id===e||this.isOHLCClosePlot(s)&&c[s].target===e);s++);var u=s+1,h=this.offset(e),d=this.nearestIndex(r.lastBar()-h,Y.NearestLeft,u);if(null==d)return n
;var p=this._lastNonEmptyPlotRow(u),_=null!==p&&r.contains(p.index),f=null!==p?p.value:null,m=t||_?f:this.data().valueAt(d);if(!m||!isNumber(m[u]))return n;for(var v,y={noData:!1},g=null,b=null,S=0;S<c.length;S++)c[S].target===e&&(this.isSelfColorerPlot(S)||this.isOHLCColorerPlot(S))&&(g=S,b=this.metaInfo().palettes[c[S].palette],v=this.properties().palettes[c[S].palette]);var w=m[u];i&&(y.price=w);var P=this.firstValue(!0);if(!isNumber(P))return n;y.text=this.priceScale().formatPrice(w,P),y.formattedPriceAbsolute=this.priceScale().formatPriceAbsolute(w),y.formattedPricePercentage=this.priceScale().formatPricePercentage(w,P);var C=o.color.value();if(g&&m.length>g+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<this._metaInfo.inputs.length;n++)if("bar_time"===this._metaInfo.inputs[n].type){var r=this._metaInfo.inputs[n].id,o=i.state.inputs[r];if(o<0){var s=this._rightOffsetToUnixTime(-o);i.state.inputs[r]=s&&s>=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;e<this._metaInfo.inputs.length;e++)if("bar_time"===this._metaInfo.inputs[e].type)return!1;return!0},he.prototype.restoreData=function(e){this._invalidateLastNonEmptyPlotRowCache(),this.m_data.restoreState(e),this._resolvedSymbols=e.symbols,this._graphics=e.graphics?E(e.graphics):A(),this._postProcessGraphics(),this._plotOffsets=e.plotOffsets,this._loading=!1},he.prototype.restart=function(e){this._restarting=!0,this.clearData(),(e||re.enabled("stop_study_on_restart"))&&this.stop(),setTimeout(this.start.bind(this),0)},he.prototype.stop=function(e){if(!0===e&&this._children)for(var t=0;t<this._children.length;++t)this._children[t].stop(!0);this._chartApi&&this._chartApi.connected()&&this._studyId&&this._chartApi.removeStudy(this._studyId,this._handler,this._isChildStudy),this._studyId=null,this.clearData(),this._unsubscribeExtendedHours(),this.recalculate()},he.prototype.resolvedSymbolInfoBySymbol=function(e){return this._resolvedSymbols&&e&&this._resolvedSymbols[this._resolvedSymbolKey(e)]||null},he.prototype._allInputsAreValid=function(){for(var e=0;e<this._metaInfo.inputs.length;e++)if("bar_time"===this._metaInfo.inputs[e].type){var t=this._metaInfo.inputs[e].id,i=this._properties.inputs[t].value();if(void 0===i||null==i)return!1}return!0},he.prototype.sourceId=function(){return this._studyId},he.prototype.parentSource=function(){return this._source||this._series},he.prototype.symbolSource=function(){return this.parentSource().symbolSource()},he.prototype.source=function(){return this.parentSource()},he.prototype.ownerSource=function(){return this._isChildStudy?this._source:oe.prototype.ownerSource.call(this)},he.prototype.getAllOwnerSources=function(){for(var e=[],t=this.ownerSource();null!=t;)e.push(t),t=t.ownerSource();return e},he.prototype.isChildStudy=function(){return!!this._isChildStudy},he.prototype.setChild=function(e){e instanceof he&&e.source()===this&&(this._children||(this._children=[]),
-1===this._children.indexOf(e)&&this._children.push(e))},he.prototype.unsetChild=function(e){if(e instanceof he&&e.source()===this&&this._children){var t=this._children.indexOf(e);~t&&this._children.splice(t,1)}},he.prototype.hasChildren=function(){return!(!this._children||!this._children.length)},he.prototype.getAllChildren=function(){if(!Array.isArray(this._children))return[];for(var e=this._children.slice(),t=0;t<e.length;++t)for(var i=e[t].getAllChildren(),n=0;n<i.length;++n)~e.indexOf(i[n])||e.push(i[n]);return e},he.prototype._debugId=function(){var e=[];return this._studyId&&e.push(this._studyId),e.push(this._metaInfo.fullId),e.push(this._metaInfo.description),JSON.stringify({study:e})},he.prototype.isStarted=function(){return!!this._studyId},he.prototype._isStopped=function(){return!this.isStarted()},he.prototype.isRestarting=function(){return!!this._restarting},he.prototype.isVisible=function(){if(!this.properties().visible.value())return!1;if(this._metaInfo.plots.length>0)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<this._children.length;++n)this._children[n].start(!0,t)}}},he.prototype._rightOffsetToUnixTime=function(e){var t=null;if(this._series.bars().size()>=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<this._metaInfo.inputs.length;i++){var n=this._metaInfo.inputs[i];if((!n.isFake||!e.skipFakeInputs)&&!(n.isMTFResolution&&e.noResolution||n.isHidden&&e.skipHiddenInputs||"bool"===n.type&&e.skipHiddenInputs&&e.skipBooleanInputs||-1!==e.skippedGroups.indexOf(n.groupId)||void 0!==e.skippedInputs&&-1!==e.skippedInputs.indexOf(n.id))){var r=this._prepareInput(n,e);t[n.id]=TradingView.clone(r)}}return t},he.prototype._prepareInput=function(e,t){var i=this._prepareInputValue(e,t);return!e.isFake||t.fakeInputsForDisplay||t.onlyAtomValues?i:{v:i,f:!0,t:e.type}},he.prototype._prepareInputValue=function(e,t){var i=e.id;if("symbol"===e.type){var n=this._properties.inputs[i].value(),r=this._resolvedSymbols&&this._resolvedSymbols[this._resolvedSymbolKey(n)];if(""===n&&e.optional){if(t&&t.keepOptionalSymbolsEmpty)return n;n=this._model.mainSeries().symbol(),r=this._model.mainSeries().symbolInfo()}if(t&&t.symbolsForDisplay){if(r){var o=r.exchange;n=r.name,o&&!t.noExchanges&&(n+=", "+o)}}else r&&(n=r.ticker||r.full_name),!this.isPine()&&t&&t.symbolsForChartApi&&(n=this.getSymbolString(n));return n}if("bar_time"===e.type){var s=this._properties.inputs[i].value();if(s<0){var a=this._rightOffsetToUnixTime(-s);s=a&&a>=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;a<s.length;++a)if(s[a]instanceof he&&s[a].sourceId()===r){i=s[a];break}if(i!==this.source()){if(!this._rebindToSource(i,e)&&n)for(var l in t)if(t.hasOwnProperty(l)&&t[l]!==e[l]&&0===e[l].indexOf(r)){var c=this._properties.inputs[l],u=t[l];c.setValue(u),o=!1;break}}else this._incrementTurnaround(),this._chartApi.modifyStudy(this._studyId,this._turnaround,e,this._handler);this.invalidateTitleCache(),o&&(this._studyModified=o)},he.prototype._incrementTurnaround=function(){this._turnaround="st"+ ++this._turnaroundCounter},he.prototype._tryChangeInputs=function(){var e=TradingView.clone(this._inputs);this.isStarted()&&this._chartApi.connected()?this._allInputsAreValid()?this._allSymbolsAreResolved().then(function(){if(!this._isStopped()){var t=this.inputs({keepOptionalSymbolsEmpty:!0});JSON.stringify(t)!==JSON.stringify(this._inputs)&&(this._changeInputsImpl(t,e),
this._inputs=t)}}.bind(this)).catch(function(e){se.logError("ERROR: "+this._debugId()+" _tryChangeInputs: cannot modify study, "+e)}.bind(this)):this.stop():(this.stop(!0),this.start(!0)),this._tagsChanged.fire()},he.prototype.testInputValue=function(e,t){if(!Z.canBeChild(this._metaInfo)||!Z.isSourceInput(e))return!0;var i=this._properties.inputs&&this._properties.inputs[e.id];if(!i)return!0;var n=he.getInputRebindType(e,i.value(),t);return!!this._canCreateStudyWithRebindType(n)},he.prototype._canCreateStudyWithRebindType=function(e){return e!==N.REBIND_STUDY_STANDALONE_TO_CHILD||this._chartApi.isCanCreateStudy(!0)},he.prototype.changeStyles=function(){var e=void 0!==this._metaInfo.inputs.find((function(e){return"symbol"===e.type}));!this.isStarted()&&!e||this._restarting||(this._inputs?this._tryChangeInputs():this._chartApi&&this._chartApi.connected()&&this.restart(),this.hasBarColorer()&&this._model.mainSeries().invalidateBarStylesCache(),this.createViews(),this.recalculate(!0),this.updateAllViews())},he.prototype._onPropertiesChanged=function(){this.changeStyles(),J.emit("study_properties_changed",this._id)},he.prototype._isModifiedStudyInputs=function(e){if(void 0===this._oldStudyInputs)return this._oldStudyInputs=e,!0;var t=Object.keys(this._oldStudyInputs);return s(t.length===Object.keys(e).length,"keys quantity should be equal"),t.forEach((function(t){s(e.hasOwnProperty(t),"key '"+t+"' should existing in studyInputs"),this._oldStudyInputs[t]!==e[t]&&(this._oldStudyInputs=e)}),this),this._oldStudyInputs===e},he.prototype.visibleChanged=function(){this._series instanceof TradingView.Series&&this._series.invalidateBarColorerCache()},he.prototype.processHibernate=function(){this.isHibernateAllowed()&&(!this._studyId&&this.isVisible()&&this.start(),this._studyId&&!this.isVisible()&&this.stop())},he.prototype.isHibernated=function(){return!this.isVisible()&&!this._studyId},he.prototype.isHibernateAllowed=function(){return!this.hasChildren()},he.prototype.lastPriceLabelFixedCoordinate=function(e){return this._priceAxisViewsCache[e]._fixedCoordinate},he.prototype.priceLabelText=function(e){var t,i=this._metaInfo.styles,n=this._metaInfo.ohlcPlots;i&&i[e]&&(t=i[e]),n&&n[e]&&(t=n[e]);var r=t.title;return 1!==this._simplePlotsCount||X.isPlotTitleDefined(r)?this._metaInfo.is_price_study&&r!==this._metaInfo.shortDescription?""===r?this._metaInfo.shortDescription:this._metaInfo.shortDescription+":"+r:r:this._metaInfo.shortDescription},he.prototype.createPriceAxisView=function(e){return new f(this,{plotIndex:e})},he.prototype.createPriceLineAxisView=function(e){return new ee(this,e)},he.prototype.createViews=function(){this._priceAxisViewsBase=[],this._priceLinesAxisViews=[],this._paneViews=[],this._labelPaneViews=[];var e={};if(this._priceAxisViewsCache={},this.metaInfo().plots)for(var t=0;t<this.metaInfo().plots.length;t++)if(!(this.isSelfColorerPlot(t)||this.isTextColorerPlot(t)||this.isBarColorerPlot(t)||this.isOHLCColorerPlot(t)||this.isAlertConditionPlot(t))){var i=this.metaInfo().plots[t].id
;if(this.isBgColorerPlot(t))this._paneViews.push(new g(this,this._series,this._model,i));else if(this.isPlotShapesPlot(t))this._paneViews.push(new b(this,this._series,this._model,i));else if(this.isPlotCharsPlot(t))this._paneViews.push(new S(this,this._series,this._model,i));else if(this.isPlotArrowsPlot(t))this._paneViews.push(new w(this,this._series,this._model,i));else if(this.isOHLCSeriesPlot(t)){var n=this.metaInfo().plots[t].target;if(e[n])continue;e[n]=n,this.isOHLCBarsPlot(t)?this._paneViews.push(new P(this,this._series,this._model,n)):this.isOHLCCandlesPlot(t)&&this._paneViews.push(new C(this,this._series,this._model,n));var r=this.createPriceAxisView(n);this._priceAxisViewsCache[n]=r,this._priceAxisViewsBase.push(r),this._labelPaneViews.push(new m(r,this,this._model))}else{r=this.createPriceAxisView(i);this._priceAxisViewsCache[i]=r,this._priceAxisViewsBase.push(r),this._priceLinesAxisViews.push(this.createPriceLineAxisView(i)),this._paneViews.push(new y(this,this._series,this._model,i)),this.properties().styles[i].trackPrice.value()&&this._paneViews.push(new u(this,i)),this._labelPaneViews.push(new m(r,this,this._model))}}if(this._properties.bands)for(t=0;t<this._properties.bands.childCount();t++)this._properties.bands[t].visible.value()&&this._paneViews.push(new d(this._properties.bands[t],this));this._properties.bandsBackground&&this._paneViews.push(new p(this));var o=this._paneViews;if(B(this,this.model()).then(function(e){for(var t=0;t<e.length;t++)o.push(e[t]);this._model.lightUpdate()}.bind(this)),this._properties.areaBackground&&this._paneViews.push(new I(this)),this._properties.filledAreas&&this._metaInfo.filledAreas)for(t=0;t<this._metaInfo.filledAreas.length;++t){var s=this._metaInfo.filledAreas[t],a=this._properties.filledAreasStyle[s.id];s.type===Z.FilledArea.TYPE_PLOTS||s.palette?this._paneViews.push(new T(this,s,a)):s.type===Z.FilledArea.TYPE_HLINES?this._paneViews.push(new _(this,s,a)):se.logWarn("Unsupported filledArea type: "+s.type)}this._dataWindowView||(this._dataWindowView=new M(this,this._model)),this._legendView||(this._legendView=new L(this,this._model)),this._statusView||(this._statusView=new O(this,this._model.properties().scalesProperties.textColor)),this._concatPriceAxisViews()},he.prototype._concatPriceAxisViews=function(){this._priceAxisViews=[].concat(this._priceAxisViewsBase,this._graphicsPriceAxisViews,this._hlinesPriceAsisViews,this._horizlinesPriceAsisViews)},he.prototype.recalculate=function(e){var t=this._model.paneForSource(this);this._model.recalculatePane(t,e),this._model.updateSource(this)},he.prototype.data=function(){return this.m_data},he.prototype.metaInfo=function(){return this._metaInfo},he.prototype.graphicsInfo=function(){return this._metaInfo.graphics},he.prototype.status=function(){return this._status},he.prototype.title=function(e,t,i,n){i=void 0===i?!this._showStudyArgumentsProperty.value():i;var r=JSON.stringify([e,t,i,n]);if(this._titleStrCache[r])return this._titleStrCache[r]
;if(this._titleInPartsCache[r])return this._joinTitlesParts(this._titleInPartsCache[r]);var o=this._title(e,t,i,n);return this._titleStrCache[r]=o,o},he.prototype.titleInParts=function(e,t,i,n){i=void 0===i?!this._showStudyArgumentsProperty.value():i;var r=JSON.stringify([e,t,i,n]);if(this._titleInPartsCache[r])return this._titleInPartsCache[r];var o=this._titleInParts(e,t,i,n);return this._titleInPartsCache[r]=o,o},he.prototype._title=function(e,t,i,n){var r=this._titleInParts(e,t,i,n);return this._joinTitlesParts(r)},he.prototype._joinTitlesParts=function(e){var t=e[1]?e[1].join(", "):"";return e[0]+(t.length>0?" ("+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<this._metaInfo.inputs.length;++c){var u=this._metaInfo.inputs[c];if(Z.isSourceInput(u)){var h=u.id,d=this._properties.inputs[h].value();if(d.indexOf("$")>=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;e<this._metaInfo.inputs.length;e++){var t=this._metaInfo.inputs[e];if(t.isMTFResolution)return this._properties.inputs[t.id].value()}return null},he.prototype.invalidateTitleCache=function(e){if(this._titleStrCache={},this._titleInPartsCache={},!0===e&&this._children)for(var t=0;t<this._children.length;++t)this._children[t].invalidateTitleCache(e)},he.prototype.graphics=function(){return this._graphics},he.prototype.turnaround=function(e){return!0===e?this.source().turnaround(!0)+"_"+this._turnaround:this._turnaround},he.prototype._checkTurnaround=function(e){return e===this._turnaround||e===this._model.mainSeries().turnaround()||e===this.turnaround(!0)},he.prototype._getStatusTextOnStudyError=function(e){var t=e.split(":",2)[0];return t.length>0?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<s.length;++n)if(!o.isSelfColorerPlot(n)){var a=i[n+1];if(null!=a){var l=s[n].id,c=o.properties().styles[l];if(c.visible&&c.visible.value()&&!(e&&Math.abs(a)<1e-10))return r=a,!0}}return!1})),this._nonPriceFirstValue=r,r}if(this._isChildStudy){var a=this._getNonPriceParent();if(a&&this.priceScale()===a.priceScale())return void 0!==a._nonPriceFirstValue?a._nonPriceFirstValue:a.firstValue()}return this._series.firstValue()},he.offset=function(e,t){var i=0;return e._plotOffsets&&void 0!==e._plotOffsets[t]&&(i+=e._plotOffsets[t]),void 0!==e._plotOffsetsMetaInfoOverride[t]?i+=e._plotOffsetsMetaInfoOverride[t]:e.properties().offsets&&void 0!==e.properties().offsets[t]&&(i+=e.properties().offsets[t].val.value()),e.properties().offset&&(i+=e.properties().offset.val.value()),i},he.prototype.offset=function(e){return he.offset(this,e)},he.prototype.priceRange=function(e,t){if(TradingView.isInteger(e)){if(TradingView.isInteger(t)){for(var i,n,o=null,s=this._metaInfo,a=[],l=null,c=0;c<s.plots.length;++c)if(!(this.isSelfColorerPlot(c)||this.isTextColorerPlot(c)||this.isBarColorerPlot(c)||this.isBgColorerPlot(c)||this.isOHLCColorerPlot(c)||this.isAlertConditionPlot(c))){var u,h=s.plots[c].id;if(this.isOHLCSeriesPlot(c)){var d=s.plots[c].target;u=this.properties().ohlcPlots[d]}else u=this.properties().styles[h];if(u.visible.value()){if(n=null,u.location&&(n=u.location.value()),!i){var p=[K.Absolute,K.Top,K.Bottom].indexOf(n)<0;i=(this.isPlotShapesPlot(c)||this.isPlotCharsPlot(c))&&p||this.isPlotArrowsPlot(c)}if(this.isLinePlot(c)||(this.isPlotShapesPlot(c)||this.isPlotCharsPlot(c))&&u.location.value()===K.Absolute||this.isOHLCSeriesPlot(c)){var _={name:h,offset:this.offset(h)},f=this.properties().styles[h].plottype.value();if(!this.properties().skipHistogramBaseOnAutoScale&&[Q.Histogram,Q.Columns,Q.Area].indexOf(f)>=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<s.bands.length;c++)if(this.properties().bands[c].visible.value()){m=this.properties().bands[c].value.value();if(!isNumber(m))continue;o?o.apply(m,m):o=new r(m,m)}return this._postProcessPriceRange(o)}se.logDebug("priceRange: incorrect endBar")}else se.logDebug("priceRange: incorrect startBar")},he.prototype._postProcessPriceRange=function(e){if(e&&e.minValue()===e.maxValue()&&!this.metaInfo().is_price_study){var t=.005*e.minValue();e=new r(e.minValue()-t,e.maxValue()+t)}var i=this.priceScale()
;return i&&i.isLog()&&e?new r(this.priceScale().priceToLogical(e.minValue()),this.priceScale().priceToLogical(e.maxValue())):e},he.prototype.paneViews=function(){return this.properties().visible.value()?this._paneViews:null},he.prototype.labelPaneViews=function(){return this.properties().visible.value()?this._labelPaneViews:null},he.prototype.dataWindowView=function(){return this._dataWindowView},he.prototype.legendView=function(){return this._legendView},he.prototype.statusView=function(){return this._statusView},he.prototype.priceAxisViews=function(e,t){return this.properties().oldShowLastValue&&!this.properties().oldShowLastValue.value()?null:e.findTargetPriceAxisViews(this,t,this._priceAxisViews,this._priceLinesAxisViews)},he.prototype._showLastValueOnPriceScale=function(){return this._model.properties().scalesProperties.showStudyLastValue.value()},he.prototype.isLinePlot=function(e){var t=this._metaInfo.plots[e];return X.isLinePlot(t)},he.prototype.isSelfColorerPlot=function(e){var t=this._metaInfo.plots[e];return X.isColorerPlot(t)},he.prototype.isTextColorerPlot=function(e){var t=this._metaInfo.plots[e];return X.isTextColorerPlot(t)},he.prototype.isBarColorerPlot=function(e){var t=this._metaInfo.plots[e];return X.isBarColorerPlot(t)},he.prototype.isBgColorerPlot=function(e){var t=this._metaInfo.plots[e];return X.isBgColorerPlot(t)},he.prototype.isPlotShapesPlot=function(e){var t=this._metaInfo.plots[e];return X.isShapesPlot(t)},he.prototype.isPlotCharsPlot=function(e){var t=this._metaInfo.plots[e];return X.isCharsPlot(t)},he.prototype.isPlotArrowsPlot=function(e){var t=this._metaInfo.plots[e];return X.isArrowsPlot(t)},he.prototype.isOHLCBarsPlot=function(e){var t=this._metaInfo.plots[e].target,i=this.metaInfo().defaults.ohlcPlots[t];return i&&this.isOHLCSeriesPlot(e)&&X.isOhlcPlotStyleBars(i)},he.prototype.isOHLCCandlesPlot=function(e){var t=this._metaInfo.plots[e].target,i=this.metaInfo().defaults.ohlcPlots[t];return i&&this.isOHLCSeriesPlot(e)&&X.isOhlcPlotStyleCandles(i)},he.prototype.isOHLCSeriesPlot=function(e){var t=this._metaInfo.plots[e];return X.isOhlcPlot(t)},he.prototype.isOHLCOpenPlot=function(e){var t=this._metaInfo.plots[e];return X.isOhlcOpenPlot(t)},he.prototype.isOHLCHighPlot=function(e){var t=this._metaInfo.plots[e];return X.isOhlcHighPlot(t)},he.prototype.isOHLCLowPlot=function(e){var t=this._metaInfo.plots[e];return X.isOhlcLowPlot(t)},he.prototype.isOHLCClosePlot=function(e){var t=this._metaInfo.plots[e];return X.isOhlcClosePlot(t)},he.prototype.isOHLCColorerPlot=function(e){var t=this._metaInfo.plots[e];return X.isOhlcColorerPlot(t)},he.prototype.isDataOffsetPlot=function(e){var t=this._metaInfo.plots[e];return X.isDataOffsetPlot(t)},he.prototype.isAlertConditionPlot=function(e){var t=this._metaInfo.plots[e];return X.isAlertConditionPlot(t)},he.prototype.hasBarColorer=function(){for(var e=0;e<this._metaInfo.plots.length;++e)if(this.isBarColorerPlot(e))return!0;return!1},he.prototype.barColorer=function(){for(var e=null,t=0;t<this._metaInfo.plots.length;++t)if(this.isBarColorerPlot(t)){
var i=new c(this,t);null==e?e=i:e.pushBackBarColorer(i)}if(null==e)throw new Error("Cannot create BarColorer: study doesn't have a bar_colorer plot!");return e},he.prototype.base=function(){return 0},he.prototype._priceScaleByProperties=function(){if("default"===this.properties().precision.value())return null;var e=parseInt(this.properties().precision.value());return isFinite(e)?Math.pow(10,e):null},he.prototype._formatterByProperties=function(){var e=this._priceScaleByProperties();return null!==e?new j(e):null},he.prototype._priceScaleByMetaInfo=function(){var e=this.metaInfo().format,t=isNumber(e.precision)?Math.pow(10,e.precision):void 0;if("price"===e.type||"percent"===e.type)return t||100;if("volume"===e.type){if(void 0===e.precision){var i=this.series().symbolInfo();if(null!==i&&isNumber(i.volume_precision))return Math.pow(10,i.volume_precision)}return 1}return"inherit"===e.type||se.logWarn("Unsupported format type: "+e.type),null},he.prototype._formatterByMetaInfo=function(){var e=this.metaInfo().format,t=isNumber(e.precision)?Math.pow(10,e.precision):void 0;switch(e.type){case"price":return new j(t);case"volume":var i=e.precision;if(void 0===i){var n=this.series().symbolInfo();i=n&&isNumber(n.volume_precision)?n.volume_precision:0}return new W(i);case"percent":return new z(t);case"inherit":return null;default:return se.logWarn("Unsupported format type: "+e.type),null}},he.prototype._onSourceFormatterChanged=function(){null===this._formatter&&(null!==this.priceScale()&&this.priceScale().updateFormatter(),this._formatterChanged.fire())},he.prototype._onSourcePriceStepChanged=function(){null===this._priceStep&&this._priceStepChanged.fire()},he.prototype._precisionChanged=function(){this._recreatePriceFormattingDependencies()},he.prototype._recreatePriceFormattingDependencies=function(){this._recreateFormatter(),this._recreatePriceStep()},he.prototype._recreateFormatter=function(){this._formatter=this._tryCreateFormatter(),this._formatterChanged.fire(),null!==this.priceScale()&&this.priceScale().updateFormatter(),this._model.fullUpdate()},he.prototype._recreatePriceStep=function(){var e=null,t=this._tryToGetPriceScale();null!==t&&(e=1/t),this._priceStep!==e&&(this._priceStep=e,this._priceStepChanged.fire())},he.prototype._tryToGetPriceScale=function(){var e=this._priceScaleByProperties();return null===e&&(e=this._priceScaleByMetaInfo()),e},he.prototype._tryCreateFormatter=function(){var e=this._formatterByProperties();return null===e&&(e=this._formatterByMetaInfo()),e},he.prototype.formatter=function(){return this._formatter||this.parentSource().formatter(!1)},he.prototype.priceStep=function(){return this._priceStep||this.parentSource().priceStep(!1)},he.prototype.setOwnerSource=function(e){oe.prototype.setOwnerSource.call(this,e),this._recreatePriceFormattingDependencies()},he.prototype.nearestIndex=function(e,t,i){if(TradingView.isInteger(e)){var n=this.data().search(e,t,i);return null!==n?n.index:void 0}se.logDebug("nearestIndex: incorrect logicalPoint")},he.prototype._lastNonEmptyPlotRow=function(e){
if(!TradingView.isInteger(e))return se.logDebug("_lastNonEmptyPlotRow: incorrect plotIndex"),null;if(void 0!==this._lastNonEmptyPlotRowCache[e])return this._lastNonEmptyPlotRowCache[e];var t=this.data().findLast((function(t,i){return void 0!==i[e]}),1e3);return null===t?null:(this._lastNonEmptyPlotRowCache[e]=t,this._lastNonEmptyPlotRowCache[e])},he.prototype.updateAllViews=function(){for(var e=0;e<this._paneViews.length;e++)this._paneViews[e].update();for(e=0;e<this._labelPaneViews.length;e++)this._labelPaneViews[e].update();this._dataWindowView.update(),null!==this._legendView&&this._legendView.update(),this._statusView.update();for(e=0;e<this._priceAxisViews.length;e++)this._priceAxisViews[e].update();this._priceLinesAxisViews.forEach((function(e){e.update()}))},he.prototype.tags=function(){return!this._metaInfo||!this._metaInfo.description||this._metaInfo.isTVScriptStub||this._metaInfo.is_hidden_study||this._metaInfo.isTVScript&&"tv-scripting"===this._metaInfo.productId?[]:[this._metaInfo.description]},he.prototype.onExtendedHoursChanged=function(){this.restart(!0)},he.prototype.hasSymbolInputs=function(){for(var e=this._metaInfo.inputs.length;e--;)if("symbol"===this._metaInfo.inputs[e].type)return!0;return!1},he.prototype.canOverrideMinTick=function(){return!1},he.prototype._subscribeExtendedHours=function(){!this._isSubscribedToExtendedHours&&this.hasSymbolInputs()&&(this._series.onExtendedHoursChanged().subscribe(this,this.onExtendedHoursChanged),this._isSubscribedToExtendedHours=!0)},he.prototype._unsubscribeExtendedHours=function(){this._isSubscribedToExtendedHours&&(this._series.onExtendedHoursChanged().unsubscribe(this,this.onExtendedHoursChanged),delete this._isSubscribedToExtendedHours)},he.prototype.removeByRemoveAllStudies=function(){return!0},he.prototype.canHaveChildren=function(){return void 0===this._canHaveChildren&&(this._canHaveChildren=!!Z.canHaveChildren(this._metaInfo)),this._canHaveChildren},he.getInputRebindType=function(e,t,i){var n=Z.isSourceInput(e);return n&&!~t.indexOf("$")&&~i.indexOf("$")?N.REBIND_STUDY_STANDALONE_TO_CHILD:n&&~t.indexOf("$")&&!~i.indexOf("$")?N.REBIND_STUDY_CHILD_TO_STANDALONE:0},he.prototype.getPlotFields=function(){return this._plotFields},he.prototype.getMinFirstBarIndexForPlot=function(e){var t=de(this._properties.styles,e)||de(this._properties.ohlcPlots,e)||de(this._properties.filledAreasStyle,e);if(null===t)return-1/0;var i=this.data().lastIndex();return null===i?-1/0:i-t+1},he.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.resolve(null)},he.prototype.getPropertyDefinitionsViewModel=function(){if(null===this._definitionsViewModel){var e=this;return e._getPropertyDefinitionsViewModelClass().then((function(t){return null===t||e._isDestroyed?null:(null===e._definitionsViewModel&&(e._definitionsViewModel=new t(e._model.undoModel(),e)),e._definitionsViewModel)}))}return Promise.resolve(this._definitionsViewModel)},he.prototype.getInputsPropertyPage=function(){return $.StudyInputsPropertyPage},he.prototype.getStylesPropertyPage=function(){
return $.StudyStylesPropertyPage},he.prototype.getDisplayPropertyPage=function(){return $.StudyDisplayPropertyPage},he.prototype.isPine=function(){return void 0!==this._metaInfo.pine},he.prototype.isStandardPine=function(){return this.isPine()&&Z.isStandardPine(this._metaInfo.id)},he.prototype.isLinkedToSeries=function(){return!0===this._metaInfo.linkedToSeries},he.prototype._getTelemetryObjectName=function(){return"study"},he.prototype._getTelemetryAdditionalData=function(){var e="";return this._metaInfo.pine&&this._metaInfo.pine.version&&this._metaInfo.shortId.indexOf("USER")>=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<this._metaInfo.plots.length;e++){var t=this._metaInfo.plots[e].id,i=this.properties().styles[t];null!=i&&null!=i.visible&&i.visible.listeners().unsubscribe(this,this.processHibernate)}for(var n in this._metaInfo.graphics)for(var r in this._metaInfo.graphics[n]){var o=this._properties.graphics[n][r];o.visible&&o.visible.listeners().unsubscribe(this,this.processHibernate)}this._properties.precision.listeners().unsubscribe(this,this._precisionChanged),this._showStudyArgumentsProperty.listeners().unsubscribe(this,this.invalidateTitleCache),this._properties.description.listeners().unsubscribe(this,this.invalidateTitleCache),this._properties.shortDescription&&this._properties.shortDescription.listeners().unsubscribe(this,this.invalidateTitleCache),this._model.mainSeries().dataEvents().symbolResolved().unsubscribeAll(this),this._properties.showInDataWindow.listeners().unsubscribe(this._model,this._model.fullUpdate),this.hasBarColorer()&&this._properties.visible.listeners().unsubscribe(this._model.mainSeries(),this._model.mainSeries().invalidateBarStylesCache),this._model.mainSeries().dataEvents().symbolResolved().unsubscribe(this,this._recreatePriceFormattingDependencies),oe.prototype.destroy.call(this)},he.prototype.desiredPriceScalePosition=function(){
return this.metaInfo().isTVScriptStub?"overlay":this.metaInfo().linkedToSeries?"as-series":void 0===this.metaInfo().priceScale?null:["right","left","overlay"][this.metaInfo().priceScale]},he.prototype.guiPlotName=function(e){var t=this.properties().styles;return t&&t[e]&&t[e].title?t[e].title.value():this.title()},he.prototype.defaultPlotIdForAlert=function(){return this._metaInfo.plots.length?this._metaInfo.plots[0].id:null},he.prototype.formatterChanged=function(){return this._formatterChanged},he.prototype.copiable=function(){return ae&&!this.isChildStudy()},he.prototype.setPriceScale=function(e){oe.prototype.setPriceScale.call(this,e),J.emit("study_event",this.id(),"price_scale_changed")},he.prototype.disconnect=function(){this._studyId=null},t.Study=he,t.studyLoadingStatus=le,t.prepareStudyProperties=function(t,n,r,o,a){return function(t,n,r,o,a,l){var c=function(t,n,r,o){var a=i("K4L1");if(Z.versionOf(t)<1)throw new Error("This function cannot work with metainfo of the old format version. Required format version >= 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<e.length;n++){var r=e[n],o=r.index,s=r.span,a=this._marksByIndex[r.index];if(a){if(a.index===r.index&&a.span===r.span){a.time=r.time;continue}this._removeTickmark(a)}this._marksByIndex[o]=r,this.minIndex<=o||(this.minIndex=o),this.maxIndex>=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.maxIndex<this.minIndex&&(delete this.minIndex,delete this.maxIndex);var i=this._marksBySpan[e.span],n=i.indexOf(e);-1!==n&&i.splice(n,1)}},i.prototype._sortByIndexAsc=function(e,t){return e.index-t.index},i.prototype.removeTail=function(e){var t={};for(var i in this.maxIndex=0,this._marksByIndex)this._marksByIndex[i].time<e&&(t[i]=this._marksByIndex[i],this.maxIndex=Math.max(this.maxIndex,i));this._marksByIndex=t},i.prototype.addTail=function(e){for(var t=0;t<e.length;t++)e[t].index=this.maxIndex+t+1;this.merge(e)},i.prototype.indexToTime=function(e){var t=this._marksByIndex[e];return t?new Date(1e3*t.time):null},i.prototype.density=function(){var e=this.maxIndex-this.minIndex
;if(0!==e)return 1e3*(this._marksByIndex[this.maxIndex].time-this._marksByIndex[this.minIndex].time)/e},i.prototype.estimateLeft=function(e){var t=this.density();if(t)return(1e3*this._marksByIndex[this.minIndex].time-e)/t},i.prototype.nearestIndex=function(e){for(var t=this.minIndex,i=this.maxIndex;i-t>2;){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<c;d++){for(var p=l[d],_=p.index;a<s;){var f=o[a],m=f.index;if(!(m<_)){u=m;break}a++,n.push(f),h=m,u=1/0}u-_>=i&&_-h>=i&&(n.push(p),h=_)}for(;a<s;a++)n.push(o[a])}return this._cache=n,this._cache},i.prototype.state=function(){for(var e=[],t=this._marksBySpan.length;t--;)this._marksBySpan[t]&&(e=e.concat(this._marksBySpan[t]));return{marks:e=e.map((function(e){return[e.span,e.time,e.index]})),version:2}},i.prototype.restoreState=function(e){if(this._marksByIndex={},this._marksBySpan=[],delete this.maxIndex,delete this.minIndex,e&&e.marks&&e.marks.length)if(2===e.version){var t=e.marks.map((function(e){return{span:e[0],time:e[1],index:e[2]}}));this.merge(t)}else this.merge(e.marks)},e.exports.Tickmarks=i}).call(this,i("aIyQ"))},GmZZ:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolVertLineTimeAxisView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t){return e.call(this,t,0)||this}return Object(n.__extends)(t,e),t.prototype._getBgColor=function(){return this._source.properties().linecolor.value()},t.prototype._getIndex=function(){var e=this._source.points();return 0===e.length?null:e[0].index},t}(i("fJhV").LineDataSourceTimeAxisView)},H0vP:function(e,t,i){"use strict";i.r(t);var n,r=i("mrSG"),o=i("Eyy1"),s=function(){function e(e){void 0===e&&(e=a),this._paneInvalidationLevel=a,this._leftPriceScalesInvalidationMap=new Map,this._rightPriceScalesInvalidationMap=new Map,this._invalidationLevel=e}return e.prototype.fullInvalidation=function(){return this._invalidationLevel},e.prototype.invalidateAll=function(e){this._invalidationLevel=Math.max(this._invalidationLevel,e)},e.prototype.invalidatePane=function(e){this._paneInvalidationLevel=Math.max(this._invalidationLevel,e)},e.prototype.invalidatePriceScale=function(e,t,i){var n="left"===e?this._leftPriceScalesInvalidationMap:this._rightPriceScalesInvalidationMap,r=n.get(t)||a;n.set(t,Math.max(r,i))},e.prototype.invalidationLevelForPane=function(){return Math.max(this._paneInvalidationLevel,this._invalidationLevel)},e.prototype.getterForPriceScaleInvalidationLevelBySide=function(e){var t=this,i="left"===e?this._leftPriceScalesInvalidationMap:this._rightPriceScalesInvalidationMap;return function(e){return Math.max(i.get(e)||a,t._invalidationLevel)}},e.prototype.priceScaleSideMaxLevel=function(e){
var t="left"===e?this._leftPriceScalesInvalidationMap:this._rightPriceScalesInvalidationMap,i=this._invalidationLevel;return t.size>0&&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)<i}function u(e){return e<=0?NaN:Math.log(e)/Math.log(10)}function h(e,t){return e<t?-1:e>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;n<e.length;++n)t(e[n],i)<0&&(i=e[n]);return i}function p(e,t){if(void 0===t&&(t=h),e.length<1)throw Error("array is empty");for(var i=e[0],n=0;n<e.length;++n)t(e[n],i)>0&&(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<i.length;t++){var n=i[t];this._unsubscribeOwner(n)}var r={owner:e};this._ownersStack.push(r),this._subscribeOwner(r)}},e.prototype._subscribeOwner=function(e){var t=this,i=e.owner;if(e.deathWatcher||(this._alive.setValue(!0),e.deathWatcher=i.alive.spawn(),e.deathWatcher.subscribe((function(i){i||t._deadHandler(e)}))),this._owner.setValue(i),!e.subscriptions){var n=e.subscriptions=[];this._visible.setValue(!1);var r=function(e,t){if(e){var i=e.spawn();n.push(i),i.subscribe((function(e){t.setValue(e)}),{callWithLast:!0})}else t.deleteValue()};r(i.container,this._container),r(i.width,this._width),r(i.height,this._height),r(i.fullscreen,this._fullscreen),r(i.detachable,this._detachable),r(i.fullscreenable,this._fullscreenable),r(i.availWidth,this._availWidth),r(i.availHeight,this._availHeight),r(i.visible,this._visible)}},e.prototype._unsubscribeOwner=function(e,t){if(e.subscriptions){for(var i=0,n=e.subscriptions;i<n.length;i++){n[i].unsubscribe()}e.subscriptions=null}t&&e.deathWatcher&&(e.deathWatcher.unsubscribe(),e.deathWatcher=null)},e.prototype._deadHandler=function(e){var t=this._ownersStack.indexOf(e);Object(n.assert)(-1!==t,"sanitized owner should be in stack");for(var i=this._ownersStack.length-1;i>=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<r.length;o++)r[o].id===this._plotName&&(this._plotIndex=o),this.m_study.isSelfColorerPlot(o)&&r[o].target===this._plotName&&(this._colorer=o,this._palette=this.m_study.metaInfo().palettes[r[o].palette],this._paletterProps=this.m_study.properties().palettes[r[o].palette])}function J(e,t,i,r){this._study=e,this._series=t,this._model=i,this._plotName=r,this._items=[],this._invalidated=!0,this._isMarkersEnabled=N.enabled("source_selection_markers");for(var o=this._study.metaInfo().plots,s=0;s<o.length;s++)o[s].id===this._plotName&&(this._plotIndex=s,n(this._study.isBgColorerPlot(s),"Plot '"+this._plotName+"' is not a background colorer!"))}function X(e,t,i,n){this.m_study=e,this.m_series=t,this.m_model=i,this.m_plotName=n,this.m_items=[],this.m_invalidated=!0,this.m_renderer=null,this._isMarkersEnabled=N.enabled("source_selection_markers"),this.m_selectionData=null,this.m_plotIndex=null;for(var r=this.m_study.metaInfo().plots,o=0;o<r.length;o++)if(r[o].id===this.m_plotName){this.m_plotIndex=o;break}r=this.m_study.metaInfo().plots;this._colorer=null,this._textColorer=null,this._palette=null,this._textPalette=null,this._paletterProps=null,this._textPaletterProps=null,this._plotIndex=0
;for(o=0;o<r.length;o++)r[o].id===this.m_plotName&&(this._plotIndex=o),this.m_study.isSelfColorerPlot(o)&&r[o].target===this.m_plotName&&(this._colorer=o,this._palette=this.m_study.metaInfo().palettes[r[o].palette],this._paletterProps=this.m_study.properties().palettes[r[o].palette]),this.m_study.isTextColorerPlot(o)&&r[o].target===this.m_plotName&&(this._textColorer=o,this._textPalette=this.m_study.metaInfo().palettes[r[o].palette],this._textPaletterProps=this.m_study.properties().palettes[r[o].palette])}function Q(e,t,i,n){X.call(this,e,t,i,n)}function $(e,t,i,n){Q.call(this,e,t,i,n)}function ee(e,t,i,n){X.call(this,e,t,i,n),this._maxAbsValue=0}function te(e,t,i,n){this.m_study=e,this.m_series=t,this.m_model=i,this.m_plotName=n,this.m_bars=[],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._ohlcPlotIndexes={};for(var o=0;o<r.length;o++)r[o].target===this.m_plotName&&(this.m_study.isOHLCOpenPlot(o)&&(this._ohlcPlotIndexes[TradingView.OPEN_PLOT]=o),this.m_study.isOHLCHighPlot(o)&&(this._ohlcPlotIndexes[TradingView.HIGH_PLOT]=o),this.m_study.isOHLCLowPlot(o)&&(this._ohlcPlotIndexes[TradingView.LOW_PLOT]=o),this.m_study.isOHLCClosePlot(o)&&(this._ohlcPlotIndexes[TradingView.CLOSE_PLOT]=o),this.m_study.isOHLCColorerPlot(o)&&(this._colorer=o,this._palette=this.m_study.metaInfo().palettes[r[o].palette],this._paletterProps=this.m_study.properties().palettes[r[o].palette]))}function ie(e,t,i,n){te.call(this,e,t,i,n)}function ne(e,t,i,n){te.call(this,e,t,i,n)}TradingView.PaneRendererArrowUp=j.PaneRendererArrowUp,TradingView.PaneRendererArrowDown=j.PaneRendererArrowDown,TradingView.PaneRendererCircleShape=W.PaneRendererCircleShape,TradingView.PaneRendererCrossShape=H.PaneRendererCrossShape,TradingView.PaneRendererDiamond=z.PaneRendererDiamond,TradingView.PaneRendererFlagShape=U.PaneRendererFlagShape,TradingView.PaneRendererLabelUp=G.PaneRendererLabelUp,TradingView.PaneRendererLabelDown=G.PaneRendererLabelDown,TradingView.PaneRendererSquare=Y.PaneRendererSquare,TradingView.PaneRendererTriangleApexUp=q.PaneRendererTriangleApexUp,TradingView.PaneRendererTriangleApexDown=q.PaneRendererTriangleApexDown,TradingView.PaneRendererXCross=K.PaneRendererXCross,Z.isIndexValid=function(e,t){return null!==e&&e>=0&&e<t._length()},Z.prototype.items=function(){return this.m_items},Z.prototype.update=function(){this._invalidated=!0},Z.prototype._updateImpl=function(){if(this._histogramBase=null,this.m_items=[],!this.m_model.timeScale().isEmpty()&&!this.m_study.priceScale().isEmpty()){var e=this.m_model.timeScale().visibleBarsStrictRange();if(null!==e){var t=this.m_series.nearestIndex(e.firstBar(),R.NearestRight),i=this.m_series.nearestIndex(e.lastBar(),R.NearestLeft),n=this.m_study.offset(this._plotName);n>0?(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;S<g.length;S++){var w=g[S],P=this.m_study.data().valueAt(w);if(w+=n,null!==P){var C=P[this._plotIndex+1],x=this.m_model.timeScale().indexToCoordinate(Math.floor(w)),T=this.m_study.priceScale().priceToCoordinate(C,u);this._selectionData.points.push(new r(x,T)),this._selectionData.bgColors.push(this.m_model.backgroundColorAtYPercentFromTop(T/b))}}}var I=s;this._lineColor=B.generateColor(I.color.value(),m),this._lineWidth=I.linewidth.value();var O=I.color.value();if(this._colorer)null!=(C=this._paletterProps.colors[0])&&(O=C.color.value(),this._lineWidth=C.width.value(),this._lineColor=B.generateColor(C.color.value(),m));this._color2=B.generateColor(O,m),this._color1=B.generateColor(Z.addHueForColor(O),m)}}}},Z.addHueForColor=D((function(e){var t=s(c(e)),i=t[0]+.05;return t[0]=i-Math.floor(i),l(a(t))})),Z.prototype._getTranspValue=function(){var e=this.m_study.properties(),t=e.styles[this._plotName],i=0,n=this.m_study.metaInfo();return"Volume@tv-basicstudies"===n.id&&n.version<=46&&"transparency"in e?(i=e.transparency.value(),i=isNumber(i)?i:0):(t.transparency&&(i=t.transparency.value(),i=isNumber(i)?i:0),i)},Z.prototype.renderer=function(){var e=this.m_study.properties().styles[this._plotName];if(!e.visible.value())return null
;if(!this.m_study.priceScale())return null;this._invalidated&&(this._updateImpl(),this._invalidated=!1);var t={};t.barSpacing=this.m_model.timeScale().barSpacing(),t.items=this.m_items,t.histogramBase=this._histogramBase?this._histogramBase:this.m_study.priceScale().height(),t.lineIndex=0,t.lineStyle=e.linestyle.value(),t.lineColor=this._lineColor,t.lineWidth=this._lineWidth,t.lineWidth=isNumber(t.lineWidth)?t.lineWidth:1,t.color1=this._color1,t.color2=this._color2,t.bottom=t.histogramBase,this._colorer||(t.simpleMode=!0);var i=new I,n=!!e.joinPoints&&e.joinPoints.value();switch(e.plottype.value()){case A.Line:case A.LineWithBreaks:i.append(new m(t));break;case A.Area:case A.AreaWithBreaks:i.append(new v(t));break;case A.Histogram:i.append(new _(t));break;case A.Columns:i.append(new f(t));break;case A.Cross:if(i.append(new g(t)),n)(r=TradingView.merge({},t)).lineWidth=1,r.forceLineWidth=!0,i.append(new m(r));break;case A.Circles:var r;if(i.append(new b(t)),n)(r=TradingView.merge({},t)).lineWidth=1,r.ignorePaletteLineWidth=!0,i.append(new m(r));break;case A.StepLine:var o=new T;o.setData(t),i.append(o);break;default:i.append(new m(t))}return this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&i.append(new d(this._selectionData)),i},J.prototype.items=function(){return this._items},J.prototype.update=function(){this._invalidated=!0},J.prototype._scalesReady=function(){var e=this._model.timeScale(),t=this._study.priceScale();return e&&t&&!e.isEmpty()&&!t.isEmpty()},J.prototype._getTranspValue=function(){var e=this._study.properties().styles[this._plotName],t=0;return e.transparency&&(t=e.transparency.value(),t=isNumber(t)?t:40),t},J.prototype._updateImpl=function(){this._items=[],n(this._scalesReady(),"Scales must be ready!");var e=this._model.timeScale().visibleBarsStrictRange();if(null!==e){var t=this._study.metaInfo().plots[this._plotIndex].palette,i=this._study.properties().palettes[t].colors,o=this._study.metaInfo().palettes[t],s=this._getTranspValue(),a=this._series.nearestIndex(e.firstBar(),R.NearestRight),l=this._series.nearestIndex(e.lastBar(),R.NearestLeft),c=this._study.offset(this._plotName);c>0?(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;a<s.length;a++){var l=s[a],c=Math.abs(l.height);l.height=c*o+i}},te.prototype.update=function(){this._invalidated=!0},te.prototype._updateImpl=function(){if(this.m_bars.length=0,!this.m_model.timeScale().isEmpty()&&!this.m_study.priceScale().isEmpty()){var e=this.m_model.timeScale().visibleBarsStrictRange();if(null!==e){var t=this.m_series.nearestIndex(e.firstBar(),R.NearestRight),i=this.m_series.nearestIndex(e.lastBar(),R.NearestLeft),n=this.m_study.getMinFirstBarIndexForPlot(this.m_plotName);if(!(n>i)){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;p<u.length;p++){var _=u[p],f=this.m_study.data().valueAt(_);if(null!==f){var m=f[this._plotIndex+1],v=this.m_model.timeScale().indexToCoordinate(Math.floor(_)),y=this.m_study.priceScale().priceToCoordinate(m,s);this._selectionData.points.push(new r(v,y)),this._selectionData.bgColors.push(this.m_model.backgroundColorAtYPercentFromTop(y/d))}}}}}}},te.prototype.items=function(){return this.m_bars},te.prototype._plotValueToPaletteColor=function(e){var t=this._palette.valToIndex?this._palette.valToIndex[e]:e;return this._paletterProps.colors[t].color.value()},inherit(ie,te),ie.prototype.renderer=function(){if(this.m_study.properties().ohlcPlots[this.m_plotName].visible.value()){this._invalidated&&(this._updateImpl(),this._invalidated=!1);var e={};e.bars=this.m_bars,e.barSpacing=this.m_model.timeScale().barSpacing(),e.dontDrawOpen=this.m_series.properties().barStyle.dontDrawOpen.value();var t=new I;return t.append(new p(e)),
this.m_model.selection().isSelected(this.m_study)&&this._isMarkersEnabled&&t.append(new d(this._selectionData)),t}},inherit(ne,te),ne.prototype.renderer=function(){var e=this.m_study.properties().ohlcPlots[this.m_plotName];if(e.visible.value()){this._invalidated&&(this._updateImpl(),this._invalidated=!1);var t={};t.bars=this.m_bars,t.barSpacing=this.m_model.timeScale().barSpacing(),t.wickVisible=e.drawWick.value(),t.bodyVisible=!0,t.borderVisible=e.drawBorder.value(),t.barWidth=F.optimalBarWidth(t.barSpacing),t.borderColor=e.borderColor.value(),t.wickColor=e.wickColor.value();var i=new I;return i.append(new y(t)),this.m_model.selection().isSelected(this.m_series)&&this._isMarkersEnabled&&i.append(new d(this._selectionData)),i}},t.StudyPaneView=Z,t.StudyBackgroundPaneView=J,t.StudyPlotShapesPaneView=Q,t.StudyPlotCharsPaneView=$,t.StudyPlotArrowsPaneView=ee,t.StudyPlotCandlesPaneView=ne,t.StudyPlotBarsPaneView=ie},IDnv:function(e,t,i){"use strict";i.r(t),i.d(t,"extrapolateBarsFrontToTime",(function(){return r})),i.d(t,"extrapolateBarsFrontByCount",(function(){return o})),i.d(t,"extrapolateBarsFrontByCountAllPoints",(function(){return s})),i.d(t,"extrapolateBars",(function(){return a}));var n=i("E6p6");function r(e,t,i,n,o){if(void 0===o&&(o=!1),t>i){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<n.length;i++){var r=n[i],o=r.height;r.stepX=Math.round(o/2*.65)+.5,r.stepY=r.stepX;var s=r.stepX/2,a=this._getTextCache(r);if(null!==a){var l=a.textImageWidth,c=a.textImageHeight;r.shapeWidth=l+2*r.stepX,r.shapeHeight=c+2*s+r.stepY,r.vertOffset=this._calcVertOffset(r),r.textHorizOffset=this._getHorizontalTextOffset(r),r.textVertOffset=this._getVerticalTextOffset(r)}else r.shapeWidth=2*r.stepX,r.shapeHeight=2.5*r.stepY,r.vertOffset=this._calcVertOffset(r)}},t.prototype._calcVertOffset=function(e){return e.vertOffset},t.prototype._drawCorner=function(e,t,i,n,r){var o=Math.max(1,Math.floor(2*r));e.lineTo(t-o*n.prevPointSignX,i-o*n.prevPointSignY),e.arcTo(t,i,t+o*n.nextPointSignX,i+o*n.nextPointSignY,o)},t.prototype._getArrowSize=function(e){return e.stepX},t.prototype._getHorizontalTextOffset=function(e){return 0},t.prototype._getVerticalTextOffset=function(e){return 0},t.prototype._hasText=function(e){return Boolean(e.text)||Boolean(this._text)},t.prototype._drawItemText=function(e,t,i){var n,r=this._getTextCache(i);if(null!==r){var o=i.textHorizOffset||0,a=i.x+o,c=i.vertOffset,u=i.y+c+i.textVertOffset,h=(null===(n=i.style)||void 0===n?void 0:n.textColor)||this._textColor;r.paintTo(e,t,Object(s.ensureDefined)(h),a,u,l.a.Center,l.c.Middle)}},t}(a.a),u=function(e,t,i,n){this.prevPointSignX=e,this.prevPointSignY=t,this.nextPointSignX=i,this.nextPointSignY=n};!function(e){e.rightUp=new u(1,0,0,1),e.rightDown=new u(0,1,-1,0),e.leftDown=new u(-1,0,0,-1),e.leftUp=new u(0,-1,1,0)}(n||(n={})),i.d(t,"PaneRendererLabelUp",(function(){return h})),i.d(t,"PaneRendererLabelDown",(function(){return d})),i.d(t,"PaneRendererLabelLeft",(function(){return p})),i.d(t,"PaneRendererLabelRight",(function(){return _})),i.d(t,"PaneRendererLabelCenter",(function(){return f}));var h=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.vertOffset,r=e.y+e.shapeHeight+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(f,p),this._drawCorner(e,f,m,n.rightDown,r),this._drawCorner(e,v,m,n.leftDown,r),e.lineTo(v,p)):(this._drawCorner(e,f,p,n.rightUp,r),this._drawCorner(e,f,m,n.rightDown,r),
this._drawCorner(e,v,m,n.leftDown,r),this._drawCorner(e,v,p,n.leftUp,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),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<i.inputs.length;n++)if("symbol"===i.inputs[n].type){var r=i.inputs[n].id,o=this._properties.inputs[r].value();if(""!==o&&!this._resolvedSymbols[this._resolvedSymbolKey(o)]){var s=this._resolveSymbol(o);t.push(s)}}return 0===t.length?Promise.resolve():Promise.all(t).catch((function(t){return e._setStatus(p),e.stop(!0),e._model.updateSource(e),Promise.reject("Invalid symbol, "+t)})).then((function(){null!==e._studyId&&e.stop(!0),e.start(!0),e._symbolsResolved.fire()}))},t.prototype._resolveSymbol=function(e){var t=this;if(""===e)return Promise.resolve(e);var i=e;return new Promise((function(n,r){t._chartApi.resolveSymbol(Object(l.makeNextSymbolId)(),t.getSymbolString(i),(function(i){switch(i.method){case"symbol_resolved":t._loading=!1,t._failed=!1,t._resolvedSymbols[t._resolvedSymbolKey(e)]=i.params[1],t._onSymbolResolved(e),t.invalidateTitleCache(!0),n(e);break;case"symbol_error":if(t._loading=!1,t._failed=!0,
i.params[1]===c.permissionDenied&&i.params[2])switch(i.params[2]){case c.SymbolErrorPermissionDeniedReason.ExtendedHours:break;case c.SymbolErrorPermissionDeniedReason.Symbol:if(i.params[3])return void t._resolveSymbol(i.params[3]).then(n);break;default:return void t._resolveSymbol(i.params[2]).then(n)}0,r(e)}}))}))},t.prototype._getSymbolObject=function(e){var t={symbol:e};return this._series&&this._series.extendedHours.value()&&(t.session="extended"),t},t.prototype._onSymbolResolved=function(e){},t.prototype._resolvedSymbolKey=function(e){return e},t.prototype._setStatus=function(e){this._status=e,this._statusView&&this._statusView.update(),this._model.updateSource(this),this._statusChanged.fire()},t.prototype._onSourceCurrencyChanged=function(){Object(u.isSymbolSource)(this)||this._currencyChanged.fire()},t}(s.PriceDataSource)},IiTo:function(e,t,i){"use strict";i.r(t);var n=i("jCNj"),r=i("Kxc7"),o=i("LxhU");function s(e,t){return t-function(e,t){var i=new Date(t);return function(e,t){var i=t.multiplier()||0;switch(t.kind()){case o.ResolutionKind.Months:!function(e,t){a(e,Math.floor(t/12));var i=e.getUTCMonth()-t%12;i<0&&(a(e,1),i+=12);e.setUTCMonth(i);for(;e.getUTCMonth()!==i;)l(e,1)}(e,i);break;case o.ResolutionKind.Weeks:!function(e,t){l(e,7*t)}(e,i);break;case o.ResolutionKind.Days:l(e,i);break;default:throw new Error("Unsupported resolution type")}}(i,e),i.getTime()}(e,t)}function a(e,t){var i=e.getUTCMonth();e.setUTCFullYear(e.getUTCFullYear()-t),e.getUTCMonth()!==i&&l(e,1)}function l(e,t){e.setTime(e.getTime()-864e5*t)}var c=i("mrSG"),u=i("E6p6"),h=i("5mo2");function d(e){return 0|e}var p=function(){function e(e,t,i,n){this.init(e,t,i,n)}return e.prototype.init=function(e,t,i,r){this.timezone=n.get_timezone(e),this.spec=new h.SessionSpec(e,t,i,r)},e}(),_=function(){function e(){}return e.prototype.alignTime=function(e){if(isNaN(e))return NaN;var t=this.indexOfBar(e);return t===u.SessionStage.POST_SESSION&&(this.moveTo(e),t=this.indexOfBar(e)),t<0?NaN:this.startOfBar(t)},e}(),f=function(e){function t(t,i){var n=e.call(this)||this;return n._sessionStartMs=Number.MIN_VALUE,n._sessionEndMs=Number.MIN_VALUE,n._periodSec=t,n._session=i,n}return Object(c.__extends)(t,e),t.prototype.alignTimeIfPossible=function(e){var t=this.alignTime(e);return isNaN(t)?e:t},t.prototype.indexOfBar=function(e){return e<this._sessionStartMs?u.SessionStage.PRE_SESSION:e>=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._periodStart?u.SessionStage.PRE_SESSION: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._periodStart||this._periodLastBarStart===this._periodEnd)&&(this._periodLastBarStart=this._periodStart)},t.prototype.endOfBar=function(e){
if(0!==e)throw new Error("index should be 0");return this._periodEnd},t.prototype.isLastBar=function(e,t){if(0!==e)throw new Error("index should be 0");return t>=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<n.get_year(s)?(s=this._builder.startOfPeriod(o,r-1,i),a=v(this._sessionTgt.spec,s),{index:(r-1)/this._period,time:a}):{index:r/this._period,time:a}},t.prototype._indexOfPeriodInYear=function(e){var t=this._builder.indexOfPeriod(e),i=d(t/this._period)*this._period;return-1===t&&(i=-this._period),i},t}(_);function g(e,t){var i=n.get_day_of_week(t)-e.firstDayOfWeek();return i<0?i+7:i}function b(e,t){var i=n.get_day_of_year(t)-1,r=g(e,t)-i%7;return 0===r?d(i/7):(r>=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 r<n.get_year(a)&&(u+=l),e.prototype.startOfPeriod.call(this,t,u,r)},t}(S),P=function(){function e(e){this._builder=null,this._initialized=!1,this._session=e}return e.prototype.indexOfPeriod=function(e){return this._getBuilder().indexOfPeriod(e)},e.prototype.startOfPeriod=function(e,t,i){return this._getBuilder().startOfPeriod(e,t,i)},e.prototype._getBuilder=function(){return null!==this._builder&&this._initialized||(this._builder=this._session.spec.hasWeekEnds()?new w(this._session.spec):new S,this._initialized=!0),this._builder},e}(),C=function(){function e(e){this._session=e}return e.prototype.indexOfPeriod=function(e){var t=b(this._session.spec,e);if(0===t){var i=n.get_timezone(this._session.spec.timezone());e<this.startOfPeriod(i,0,n.get_year(e))&&(t=-1)}return t},e.prototype.startOfPeriod=function(e,t,i){
var r=n.get_cal(n.get_timezone("Etc/UTC"),i,n.JANUARY,1),o=g(this._session.spec,r),s=0===o?7*t:7*(t+1)-o;return s>n.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 a<m?l-864e5*(a/f):l-6048e5*(a/m)}i.d(t,"newBarBuilder",(function(){return T})),i.d(t,"alignPeriodsBack",(function(){return I})),i.d(t,"createDWMAligner",(function(){return L})),i.d(t,"alignExchangeTimeToSessionStartAndReturnUTC",(function(){return O})),i.d(t,"isTradingNow",(function(){return k})),i.d(t,"createAligner",(function(){return A})),i.d(t,"SessionInfo",(function(){return p}));var M=new p("Etc/UTC","0000-0000:1234567");function L(e,t){return!r.enabled("disable_resolution_rebuild")&&o.Interval.isDWM(e)?T(e,t,M):null}function O(e,t){var i=n.clone(t);return e.alignToSessionStart(i),n.cal_to_utc(n.get_timezone(e.timezone()),i)}function k(e,t){var i=n.utc_to_cal(t.timezone,+e),r=n.get_day_of_week(i),o=n.get_minutes_from_midnight(i),s=t.spec.findSession(t.spec.getWeekIndex(i),r,o).getEntry();return s.isOvernight()&&o>s.startOffset()+s.length()&&r===s.dayOfWeek()-1&&(r++,o-=1440),r===s.dayOfWeek()&&o>=s.startOffset()&&o<s.startOffset()+s.length()}function A(e,t,i){if(void 0===i&&(i=!1),!r.enabled("disable_resolution_rebuild")){var n=new p(t.timezone,t.session,t.holidays,t.corrections);return T(e,n,i?M:n)}if(t.has_empty_bars)throw new Error('Flag "has_emtpy_bars" cannot be used if "disable_resolution_rebuild" is enabled.');return null}},IjC5:function(e,t,i){"use strict";i.r(t),i.d(t,"RectangleRenderer",(function(){return h}));var n=i("Eyy1"),r=i("aO4+"),o=i("f6yo"),s=i("GEp6"),a=i("VdBB"),l=i("Tmoa"),c=i("jFln"),u=i("8Uy/"),h=function(){function e(e,t,i){this._data=null,this._hitTestResult=e||new a.HitTestResult(a.HitTestResult.MOVEPOINT),this._backHitTestResult=t||new a.HitTestResult(a.HitTestResult.MOVEPOINT_BACKGROUND),this._forceOverrideTransparency=Boolean(i)}return e.prototype.setData=function(e){this._data=e},e.prototype.hitTest=function(e,t){if(null===this._data||this._data.points.length<2||this._data.nohittest)return null
;var i=this._getPointsInPhysicalSpace(t),n=i[0],o=i[1],a=new r.Point(o.x,n.y),l=new r.Point(n.x,o.y),c=new r.Point(e.x*t.pixelRatio,e.y*t.pixelRatio),u=this._extendAndHitTestLineSegment(c,n,a,t);if(null!==u)return u;var h=this._extendAndHitTestLineSegment(c,l,o,t);if(null!==h)return h;var d=Object(s.distanceToSegment)(a,o,c);return d.distance<=3||(d=Object(s.distanceToSegment)(n,l,c)).distance<=3?this._hitTestResult:this._data.fillBackground?this._hitTestBackground(c,n,o,t):null},e.prototype.getColor=function(){var e=Object(n.ensure)(this._data);return void 0===e.transparency?e.backcolor:Object(l.generateColor)(e.backcolor,e.transparency,this._forceOverrideTransparency)},e.prototype.draw=function(e,t){if(!(null===this._data||this._data.points.length<2||this._data.linewidth<=0&&!this._data.fillBackground)){var i=Math.max(1,Math.floor(this._data.linewidth*t.pixelRatio)),n=i%2?.5:0,o=this._getPointsInPhysicalSpace(t,n),s=o[0],a=o[1],l=new r.Point(a.x,s.y),h=new r.Point(s.x,a.y);e.save(),this._data.fillBackground&&this._drawBackground(e,s,a,t),this._data.linewidth>0&&(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<a.length;o++){var s=t.match(a[o]);if(s&&3===s.length){t=s[1],r=s[2];break}}Object(n.emit)(t.toLowerCase().replace(" ","_"),{category:e,label:i,value:r})}(e,t,i);else{var o=(e?e+":":"")+t;i&&(o+=" "+i),s.logNormal(o),r.enabled("widget")||!window._UNIT_TESTS&&window.gtag&&window.gtag("event",t,{event_category:e,event_label:i})}};"undefined"!=typeof window&&(window.TradingView=window.TradingView||{},window.TradingView.trackEvent=l)},JcHK:function(e,t,i){"use strict";function n(e){return e.getAll().some((function(e){return e.isInitialized()}))}function r(e,t){var i=e.getAll(),n=function(){t(),i.forEach((function(e){e.chartWidgetInitialized.unsubscribe(null,n)}))};i.forEach((function(e){e.chartWidgetInitialized.subscribe(null,n,!0)}))}i.r(t),i.d(t,"isAnyChartWidgetInitialized",(function(){return n})),i.d(t,"waitAnyChartWidgetInitialized",(function(){return r}))},JjUe:function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayDataWindowView",(function(){return h}));var n=i("mrSG"),r=i("ivNn"),o=i("4miz"),s=i("qFKp"),a=i("e92V"),l=i("mMWL"),c=i("e1Hy"),u=s.CheckMobile.any(),h=function(e){function t(t,i){var n=e.call(this)||this;return n._invalidated=!0,n._study=t,n._model=i,n._valueProvider=n._createValuesProvider(t,i),n._items=n._valueProvider.getItems().map((function(e){return new o.a(e.title,"")})),n.update(),n}return Object(n.__extends)(t,e),t.prototype.items=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items},t.prototype.update=function(){this._invalidated=!0},t.prototype._updateImpl=function(){var e;this._header=this._study.title(),this._showLastPriceAndChangeOnly()?e=this._study.data().lastIndex():(e=this._model.crossHairSource().appliedIndex(),Object(r.isNumber)(e)||(e=this._study.data().lastIndex()));for(var t=this._valueProvider.getValues(e),i=0;i<t.length;++i){var n=t[i],o=this._items[i];o.setValue(n.value),o.setVisible(n.visible),o.setColor(n.color)}},
t.prototype._showLastPriceAndChangeOnly=function(){return u&&(null===this._model.crossHairSource().pane||Object(a.a)(l.tool.value())||null!==this._model.lineBeingEdited())},t.prototype._createValuesProvider=function(e,t){return new c.a(e,t)},t}(o.b)},JmuD:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObject=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)},t.hasProperty=function(e,t){return t in e}},K4L1:function(e,t,i){"use strict";var n=i("Eyy1").assert,r=i("lCO3").Version,o=i("txPx").getLogger("Chart.Study.Versioning"),s=i("Wt0y"),a=i("0YCj"),l=i("TcSq").extractPineId,c=i("Si3H").migrateMetaInfoAndPropState;function u(e,t){if(!e)throw new Error("No studies metainfo");var n=i("EyEd");if(this._studiesMetainfo=e,!t)throw new Error("No studies migrations");this._studiesMigrations=t,this._migrations={};for(var r=0;r<this._studiesMigrations.length;r++)for(var s=this._studiesMigrations[r],a=s.versFrom,l=s.versTo,c=0;c<s.studyMigrations.length;c++){var u=s.studyMigrations[c],h=u.studyId;if(0!==u.rules.length){var d=h in this._migrations?this._migrations[h]:new n(h);d.addMigration(a,l,u.rules),this._migrations[h]=d}else o.logError("Study Migration should have at least one convertion rule")}this._clientMigrations=[function(e,t){if(0===this._studiesMetainfo.length||!e.isTVScript||e.version>=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<i.length;r++)if(i[r].id===e.id){t=i[r];break}return TradingView.clone(t)},u.prototype.updateMetaInfoAsync=function(e){if(!e)return{sync:!1,result:Promise.reject("No old metaInfo was given")};new a(e),a.versionOf(e);for(var t=null,i=this._studiesMetainfo,n=0;n<i.length;n++)if(i[n].id===e.id){t=i[n];break}return{sync:!0,result:t?TradingView.clone(t):null}},u.prototype.lastVersionOfStudy=function(e){return this._studiesMetainfo.find((function(t){return t.id===e})).version},u.prototype.updateStudyInputs=function(e,t,i,n,s){var a=TradingView.clone(n);if(e in this._migrations){var l,c=r.parse(t);if("last"===i){var u=this.lastVersionOfStudy(e);l=r.parse(u)}else l=r.parse(i);a=this._migrations[e].updateInputs(c,l,a)}if(null==s)return a;for(var h in s)h in a||(a[h]=s[h]);for(var h in a)if(!(h in s)){var d=a[h];o.logWarn("Extra input detected, studyId="+e+", versionFrom="+t+", inputId="+h+", inputValue="+d+", removing it and continue..."),delete a[h]}return a},u.prototype.updateStudyState=function(e,t,i){if(null==e||null==t||null==i)return e;if(e=TradingView.clone(e),!(t.isTVScript||!!t.pine)&&t.version!==i.version){var n=i&&i.defaults.inputs,r=this.updateStudyInputs(t.id,t.version,i.version,e.inputs,n);e.inputs=r}for(var s=0;s<this._clientMigrations.length;++s){r=this._clientMigrations[s].call(this,t,e.inputs)
;Object.keys(r).length===Object.keys(e.inputs).length?e.inputs=r:o.logWarn("StudyVersioning._clientMigrations application returned bad result. Skipping it...")}var l=a.versionOf(t);if(t.isTVScript&&t.TVScriptSourceCode&&l>=12&&l<=26){var c={};for(s=0;s<t.plots.length;++s){var u=t.plots[s],h=i.plots[s];c[u.id]=h.id}var d=Object.keys(e.styles);for(s=0;s<d.length;++s){var p=d[s],_=e.styles[p];delete e.styles[p];var f=c[p];e.styles[f]=_}var m=Object.keys(e.plots);for(s=0;s<m.length;++s){var v=m[s];p=e.plots[v].id;e.plots[v].id=c[p]}}return e},u.prototype.patchPointsBasedStudyState=function(e){return u._fixInputsMaxValue(e.state,e.metaInfo),e},u.prototype.patchPointsBasedStudyData=function(e,t){if(!s.isProd())return t;if(!e||!t)return t;var i=TradingView.clone(t);return"VbPFixed@tv-volumebyprice"===e.id&&e.version&&e.version<=4&&u._patchOldVolumeProfiles(0,i),i},u.prototype.patchStudyData=function(e,t,i,n){if(!s.isProd())return{data:t,nsData:i,indexes:n};var r=TradingView.clone(t),o=TradingView.clone(i),l=TradingView.clone(n);"VbPVisible@tv-volumebyprice"===e.id&&e.version&&e.version<=4&&u._patchOldVolumeProfiles(0,r.graphics),"VbPSessions@tv-volumebyprice"===e.id&&e.version&&e.version<=4&&u._patchOldVolumeProfiles(0,r.graphics);var c=a.versionOf(e);if(e.isTVScript&&e.TVScriptSourceCode&&c>=12&&c<=26){var h=r.columns;r.columns=[];for(var d=0;d<h.length;++d){var p="plot_"+d;r.columns.push(p)}}return{data:r,nsData:o,indexes:l}},u._patchOldVolumeProfiles=function(e,t){var i=t.hhists[e].data,n=[];for(var r in i)n=n.concat(i[r]);t.hhists[0].data=n},u._fixInputsOrder=function(e,t){for(var i=a.getOrderedInputIds(t),n=u.splitInputs(e.inputs),r=n.arr,o=n.obj,s=TradingView.merge({},o),l=0;l<i.length;++l){var c=i[l],h=u.findInputKeyById(r,c);if(null!==h){var d=r[h];s[l]=d}}e.inputs=s},u.INPUT_MAX_VALUE=1e12,u._verifyInputsMaxValue=function(e){var t=u.INPUT_MAX_VALUE;if(e.inputs)for(var i=0;i<e.inputs.length;i++){var n=e.inputs[i];"integer"===n.type&&(n.max&&n.max>t&&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;n<t.inputs.length;n++){"integer"===(a=t.inputs[n]).type&&(a.max&&a.max>i&&(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);r<a.METAINFO_FORMAT_VERSION_SOS_V2&&t.isChildStudy&&(e.isChildStudy=t.isChildStudy);if(t.isTVScript&&t.version<60&&("Script$TV_EARNINGS@tv-scripting"!==t.id&&"Script$TV_DIVIDENDS@tv-scripting"!==t.id&&"Script$TV_SPLITS@tv-scripting"!==t.id||delete t.TVScriptSourceCode),"Volume"!==t.id&&"Volume@tv-basicstudies"!==t.id||0!==t.inputs.length||(t.inputs=[{id:"length",type:"integer",defval:20,min:1,
max:1e3}],t.plots.push({id:"vol_ma",type:"line"})),"Volume@tv-basicstudies"===t.id&&t.version&&t.version<=46&&(e.styles.vol.transparency=e.transparency||87),"PivotPointsStandard@tv-basicstudies"===t.id&&(0===t.inputs.length?(e.inputs={kind:"Traditional",showHistoricalPivots:!0},t.inputs=[{defval:"Traditional",id:"kind",type:"text",options:["Traditional","Fibonacci","Woodie","Classic","DeMark","Camarilla"]},{id:"showHistoricalPivots",type:"bool",defval:!0}]):1===t.inputs.length&&(e.inputs={kind:"Traditional"},t.inputs=[{defval:"Traditional",id:"kind",type:"text",options:["Traditional","Fibonacci","Woodie","Classic","DeMark","Camarilla"]},{id:"showHistoricalPivots",type:"bool",defval:!0}]),void 0===e._hardCodedDefaultsVersion)){e._hardCodedDefaultsVersion=1;var o=e.color;delete e.color,e.levelsStyle={colors:{P:o,"S1/R1":o,"S2/R2":o,"S3/R3":o,"S4/R4":o,"S5/R5":o}}}"CMF"===t.shortId&&2===t.inputs.length&&(e.inputs={length:e.inputs["length fast"]},t.inputs=t.inputs.splice(0,1),t.inputs[0].id="length"),t.defaults&&void 0===t.defaults.precision&&r<a.VERSION_NEW_STUDY_PRECISION_FORMAT&&(-1!==["Volume@tv-basicstudies","VbPVisible@tv-volumebyprice","VbPSessions@tv-volumebyprice"].indexOf(t.id)?t.defaults.precision=0:t.defaults.precision=4);if(t.version<60)for(var s=["TV_DIVIDENDS","TV_SPLITS","TV_EARNINGS"],h="Script".length,d=0;d<s.length;d++)t.id.startsWith("Script$"+s[d]+"@tv-scripting")&&(t.fullId="ESD"+t.fullId.substring(h),t.id="ESD"+t.id.substring(h),t.name="ESD"+t.name.substring(h),t.shortId="ESD"+t.shortId.substring(h),t.productId="ESD"+t.productId.substring(h));if(r<a.VERSION_PINE_PROTECT_TV_4164){var p={"StrategyScript$STD;Consecutive%1Ups/Downs%1Strategy":{pineId:"STD;Consecutive%1Ups%1Downs%1Strategy",className:"StrategyScript"},Script$EDGR_NET_INCOME_FROM_CONTINUING_OPERATIONS_APPLICABLE_TO_COMMON_V2:{pineId:"Script$EDGR_NET_INCOME_FROM_CONTINUING_OPS_APPLICABLE_TO_COMMON_V2",className:"Script"}};if(t.shortId in p){var _=p[t.shortId].className+"$"+p[t.shortId].pineId,f={scriptIdPart:p[t.shortId].pineId,fullId:t.fullId.replace(t.shortId,_),id:t.id.replace(t.shortId,_),name:t.name.replace(t.shortId,_),shortId:_};TradingView.merge(t,f),TradingView.merge(e,f)}var m=l(t.fullId),v=m&&m.match(/^(USER)(_\d+)(;)(.*)$/);if(v){var y=v[0],g=v[1]+v[3]+v[2]+v[4];f={scriptIdPart:g,fullId:t.fullId.replace(y,g),id:t.id.replace(y,g),name:t.name.replace(y,g),shortId:t.shortId.replace(y,g)};TradingView.merge(t,f),TradingView.merge(e,f)}}if("MA"===t.id){var b=new a({id:"MAExp",properties:[{id:"is_price_study",type:"bool",value:"true"}],inputs:[{id:"length",type:"integer",defval:20,min:1,max:500},{id:"source",type:"text",defval:"close",options:["open","high","low","close"]}],plots:[{id:"MovAvgExp",type:"line"}],palettes:{}}),S=new a({id:"MASimple",properties:[{id:"is_price_study",type:"bool",value:"true"}],inputs:[{id:"length",type:"integer",defval:20,min:1,max:500},{id:"source",type:"text",defval:"close",options:["open","high","low","close"]}],plots:[{id:"MovAvgSimple",type:"line"}],palettes:{}}),w=new a({id:"MAVolumeWeighted",
properties:[{id:"is_price_study",type:"bool",value:"true"}],inputs:[{id:"length",type:"integer",defval:20,min:1,max:500},{id:"source",type:"text",defval:"close",options:["open","high","low","close"]}],plots:[{id:"MovAvgVolumeWeighted",type:"line"}],palettes:{}}),P=new a({id:"MAWeighted",properties:[{id:"is_price_study",type:"bool",value:"true"}],inputs:[{id:"length",type:"integer",defval:20,min:1,max:500},{id:"source",type:"text",defval:"close",options:["open","high","low","close"]}],plots:[{id:"MovAvgWeighted",type:"line"}],palettes:{}});switch(e.inputs.type){case"exp":t=b;break;case"simple":t=S;break;case"weighted":t=P;break;case"volume weighted":t=w}e.styles[t.plots[0].id]=e.styles.MovAvg,delete e.styles.MovAvg,delete e.inputs.type}return i.oldShowStudyLastValueProperty&&(e.oldShowLastValue=e.showLastValue),delete e.showLastValue,delete e.showStudyArguments,c(t,e),{propsState:e,metaInfo:t}},u.mergeInputs=function(e,t){u.mergeInputsArrPart(e,t),u.mergeInputsObjPart(e,t)},u.mergeInputsArrPart=function(e,t){var i=u.splitInputs(t);for(var n in i.arr){var r=u.findInputKeyById(e,i.arr[n].id);r?TradingView.merge(e[r],i.arr[n]):u.appendInputInfoToArr(e,i.arr[n])}},u.mergeInputsObjPart=function(e,t){var i=u.splitInputs(t);TradingView.merge(e,i.obj)},u.appendInputInfoToArr=function(e,t){var i=-1;for(var n in e){var r=parseInt(n,10);isNumber(r)&&(r>i&&(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='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" stroke="currentColor"><path d="M13.111 18.5H10.5a1 1 0 0 1-1-1v-11a1 1 0 0 1 1-1h11a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1h-8.389z"/><path d="M18.5 20v1.5a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1v-11a1 1 0 0 1 1-1H8"/></g></svg>'},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),f<m?(e.lineTo(p,-f*o),e.lineTo(-p,-f*o)):(e.lineTo(p,-m*o),e.lineTo(_,-m*o),e.lineTo(_,-f*o),e.lineTo(-_,-f*o),e.lineTo(-_,-m*o),e.lineTo(-p,-m*o)),e.lineTo(0,0)),e.translate(-u,-d)},t.prototype._preDrawInit=function(){var e=this._calculateWidth();this._arrowWidth=e,this._sign=this._isUp()?-1:1,this._thinArrow=e<4,this._thinArrowLineWidth=Math.max(e/2,1),this._headHeight=Math.round(e)},t.prototype._startPath=function(e,t,i,n){e.beginPath(),e.fillStyle=i,e.strokeStyle=n,e.lineWidth=this._lineWidth(t)},t.prototype._lineWidth=function(t){return this._thinArrow?this._thinArrowLineWidth:e.prototype._lineWidth.call(this,t)},t.prototype._calcBoundingBox=function(t){
var i=t.vertOffset,n=this._sign,r=this._arrowWidth,s=this._headHeight,a=Math.abs(t.height),l=t.x-r,c=l+2*r,u=t.y+i+n*Math.round(a/2),h=u+(-a-s)*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.prototype._calculateWidth=function(){return Math.round(this._barSpacing/4)},t}(r.a),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._isUp=function(){return!0},t}(a),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._isUp=function(){return!1},t}(a)},KnF9:function(e,t,i){"use strict";i.r(t),i.d(t,"EnvironmentState",(function(){return r}));var n=i("qFKp"),r=function(){function e(e){this._shift=!1,this._control=!1,this._alt=!1,void 0!==e&&(this._shift=Boolean(e.shiftKey),this._control=Boolean(Object(n.isMac)()?e.metaKey:e.ctrlKey),this._alt=Boolean(e.altKey))}return e.prototype.shift=function(){return this._shift},e.prototype.control=function(){return this._control},e.prototype.alt=function(){return this._alt},e.prototype.shiftOnly=function(){return this._shift&&!this._control&&!this._alt},e.prototype.controlOnly=function(){return this._control&&!this._shift&&!this._alt},e.prototype.altOnly=function(){return this._alt&&!this._shift&&!this._control},e.prototype.controlShift=function(){return this._shift&&this._control&&!this._alt},e.create=function(t,i,n){return void 0===t&&(t=!1),void 0===i&&(i=!1),void 0===n&&(n=!1),new e({shiftKey:t,ctrlKey:i,metaKey:i,altKey:n})},e}()},KtbP:function(e,t,i){"use strict";i.r(t),i.d(t,"PanePriceAxisView",(function(){return o}));var n=i("u+0B"),r=function(){function e(e){this._priceAxisViewRenderer=null,this._rendererOptions=null,this._align="right",this._width=0,this._textWidthCache=e}return e.prototype.setParams=function(e,t,i,n){this._priceAxisViewRenderer=e,this._rendererOptions=t,this._width=i,this._align=n},e.prototype.draw=function(e,t){null!==this._rendererOptions&&null!==this._priceAxisViewRenderer&&this._priceAxisViewRenderer.draw(e,this._rendererOptions,this._textWidthCache,this._width,this._align,t.pixelRatio)},e.prototype.hitTest=function(e){var t,i;return void 0===(null===(t=this._priceAxisViewRenderer)||void 0===t?void 0:t.hitTest)?null:null===(i=this._priceAxisViewRenderer)||void 0===i?void 0:i.hitTest(e)},e}(),o=function(){function e(e,t,i){this._renderer=null,this._invalidated=!0,this._priceAxisView=e,this._textWidthCache=new n.TextWidthCache(50),this._dataSource=t,this._chartModel=i,this._fontSize=-1,this._panePriceAxisViewRenderer=new r(this._textWidthCache)}return e.prototype.update=function(){this._invalidated=!0},e.prototype.renderer=function(e,t){return this._invalidated&&this._updateImpl(e,t),this._renderer},e.prototype._updateImpl=function(e,t){this._priceAxisView.update(),this._renderer=null;var i=this._chartModel.crossHairSource(),n=this._dataSource===i?i.pane:this._chartModel.paneForSource(this._dataSource);if(null!==n){
var r=this._priceScale();if(null!==r){var o=n.priceScalePosition(r);if("overlay"===o&&(o=n.priceScalePosition(n.defaultPriceScale())),"overlay"!==o){var s=this._chartModel.priceAxisRendererOptions();s.fontSize!==this._fontSize&&(this._fontSize=s.fontSize,this._textWidthCache.reset()),this._panePriceAxisViewRenderer.setParams(this._priceAxisView.paneRenderer(),s,t,o),this._renderer=this._panePriceAxisViewRenderer,this._invalidated=!1}}}},e.prototype._priceScale=function(){return this._dataSource.priceScale()},e}()},"L/Ed":function(e,t,i){"use strict";var n;i.r(t),i.d(t,"ToolboxType",(function(){return n})),function(e){e[e.Delete=0]="Delete"}(n||(n={}))},LAp3:function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var n=i("mrSG"),r=i("ogJP"),o=i("5rJj"),s=function(e){function t(t,i){return e.call(this,t,i,!1,{names:["width","color","visible"]})||this}return Object(n.__extends)(t,e),t.prototype._iterateLevels=function(e,t){for(var i in e.levels)if(e.levels[i]&&Object(r.isSameType)(e.levels[i],t.typecheck())){var n=t.tpl();for(var o in this._map.names)this._map.names.hasOwnProperty(o)&&(n=t.fill(o,this._map.names[o],e.levels[i],n));e.levels[i]=n}return e},t}(i.n(o).a);function a(e,t){return new s(e,t)}},LdoW:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" stroke="currentColor"><path d="M6.5 15A8.5 8.5 0 1 0 15 6.5H8.5"/><path d="M12 10L8.5 6.5 12 3"/></g></svg>'},Ltzl:function(e,t,i){"use strict";i.r(t),i.d(t,"SaveLineToolStateUndoCommand",(function(){return o}));var n=i("mrSG"),r=i("Eyy1"),o=function(e){function t(t,i,n,r){void 0===r&&(r=!0);var o=e.call(this,n,r)||this;return o._newStates=[],o._model=t,o._savedStates=i.map((function(e){return e.state(!1)})),o}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._applyState(this._newStates)},t.prototype.undo=function(){0===this._newStates.length&&this.saveNewState(),this._applyState(this._savedStates)},t.prototype.saveNewState=function(){var e=this,t=this._savedStates.map((function(t){return Object(r.ensureNotNull)(e._model.dataSourceForId(t.id))}));this._newStates=t.map((function(e){return e.state(!1)}))},t.prototype._applyState=function(e){for(var t=0,i=e;t<i.length;t++){var n=i[t],o=Object(r.ensureNotNull)(this._model.dataSourceForId(n.id));this._model.restoreLineToolState(o,n)}},t}(i("RDU5").UndoCommand)},LxhU:function(e,t,i){"use strict";i.r(t),i.d(t,"ResolutionKind",(function(){return n})),i.d(t,"SpecialResolutionKind",(function(){return r})),i.d(t,"Interval",(function(){return u})),i.d(t,"isHour",(function(){return d}));var n,r,o=/^(\d*)([SHDWMR])$/,s=/^(\d+)$/;!function(e){e.Seconds="seconds",e.Minutes="minutes",e.Days="days",e.Weeks="weeks",e.Months="months",e.Range="range",e.Invalid="invalid"}(n||(n={})),function(e){e.Hours="hours"}(r||(r={}));var a={};a[n.Seconds]=1e3,a[n.Minutes]=60*a[n.Seconds],a[n.Days]=1440*a[n.Minutes],a[n.Weeks]=7*a[n.Days];var l={S:n.Seconds,D:n.Days,W:n.Weeks,M:n.Months,R:n.Range},c=new Set([n.Seconds,n.Minutes]),u=function(){function e(e,t){
this._kind=n.Invalid,this._multiplier=0,e!==n.Invalid&&t>0&&(this._kind=e,this._multiplier=t)}return e.prototype.kind=function(){return this._kind},e.prototype.multiplier=function(){return this._multiplier},e.prototype.isValid=function(){return this.kind()!==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<e.length;l++){var c=e[l],u=e[l+1]||{};if(Object(a.coordinateIsValid)(c.y))c.y<=t&&i.push(c),c.y>=t&&n.push(c),s=c;else{if(null===s)continue;c=s}if(Object(a.coordinateIsValid)(u.y)&&(c.y>t&&u.y<t||c.y<t&&u.y>t))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<h;d++){var p=t[d],_=t[d+1]||{};if(Object(a.coordinateIsValid)(p.y)){if(0===n){if(o&&o.y>=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()<t.zorder()}));this._items.splice(t,0,e),this._set.add(e)},e.prototype.canBeAddedToSelection=function(e){return 0===this._items.length||Object(r.isLineTool)(this._items[0])&&Object(r.isLineTool)(e)},e.prototype.isSelected=function(e){return this._set.has(e)},e.prototype.sources=function(){return this._items.slice(0)},e.prototype.checkLineToolSelection=function(){this._items.forEach((function(e){return Object(r.isLineTool)(e)&&e.calcIsActualSymbol()})),this._items=this._items.filter((function(e){
return!Object(r.isLineTool)(e)||e.isActualSymbol()}))},e.prototype.remove=function(e){this._items=this._items.filter((function(t){return t!==e})),this._set.delete(e)},e.prototype.clear=function(){this._items=[],this._set.clear()},e.prototype.notFixedSources=function(){return this._items.filter((function(e){return!Object(r.isLineTool)(e)||!e.isFixed()}))},e}()},MWAT:function(e,t,i){"use strict";i.r(t),i.d(t,"PriceScaleSelectionStrategyEvenly",(function(){return a})),i.d(t,"PriceScaleSelectionStrategyAllRight",(function(){return l})),i.d(t,"PriceScaleSelectionStrategyAllLeft",(function(){return c})),i.d(t,"createPriceScaleSelectionStrategy",(function(){return h})),i.d(t,"allPriceScaleSelectionStrategyInfo",(function(){return d}));var n=i("mrSG"),r=i("Eyy1"),o=i("3ClC"),s=function(){function e(e){this._priceScalesLimit=8,this._metaInfo=e}return e.prototype.metaInfo=function(){return this._metaInfo},e.prototype.findSuitableScale=function(e,t,i,n){if(void 0!==n)return this._tryToGetDesiredPriceScale(e,t,n,i);if(Object(o.isStudy)(t)){var r=t.metaInfo();if("Volume@tv-basicstudies"===r.id)return(l=e.createPriceScaleAtPosition("overlay")).setTopMargin(.75),l.setBottomMargin(0),l;var s=t.desiredPriceScalePosition();if(null!==s)return this._tryToGetDesiredPriceScale(e,t,s,i);if(void 0!==i&&(Object(o.isStudy)(i)||e.isMainPane())&&r.is_price_study)return this._getPriceScaleTheSameAsForSource(i,e)}var a=!1;if(Object(o.isStudy)(t)){var l,c=t.metaInfo().groupingKey;if(void 0!==c)if(null!==(l=e.model().findNonOverlayStudyWithGroupingKey(c,e)))return this._getPriceScaleTheSameAsForSource(l.study,l.pane);a=Boolean(t.metaInfo().is_price_study)}else t===e.model().mainSeries()&&(a=!0);if(a&&null!==(l=this._findFirstScaleForPriceStudy(e)))return l;return this.createNewPriceScaleIfPossible(e)},e.prototype.canCreateNewPriceScale=function(e){return e.leftPriceScales().length+e.rightPriceScales().length<this._priceScalesLimit},e.prototype._getPriceScaleTheSameAsForSource=function(e,t){return t.isOverlay(e)?t.createPriceScaleAtPosition("overlay"):Object(r.ensureNotNull)(e.priceScale())},e.prototype._priceScaleIsPrice=function(e,t){var i=e.mainSource();return!!i&&(i===t.mainSeries()||!!Object(o.isStudy)(i)&&Boolean(i.metaInfo().is_price_study))},e.prototype._findFirstScaleForPriceStudy=function(e){for(var t=e.model(),i=0;i<this._priceScalesLimit;i++){if(e.rightPriceScales().length>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<e.rightPriceScales().length?"left":"right";return e.createPriceScaleAtPosition(t)},t}(s),l=function(e){function t(t){return e.call(this,t)||this}return Object(n.__extends)(t,e),t.prototype.apply=function(e){var t=this,i=e.model();e.leftPriceScales().slice(0).forEach((function(n){return e.movePriceScale(n,"right",t._targetPriceScaleIndex(n,i))}))},t.prototype.createNewPriceScaleIfPossible=function(e){return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("right"):e.createPriceScaleAtPosition("overlay")},t}(s),c=function(e){function t(t){return e.call(this,t)||this}return Object(n.__extends)(t,e),t.prototype.apply=function(e){var t=this,i=e.model();e.rightPriceScales().slice(0).forEach((function(n){return e.movePriceScale(n,"left",t._targetPriceScaleIndex(n,i))}))},t.prototype.createNewPriceScaleIfPossible=function(e){return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("left"):e.createPriceScaleAtPosition("overlay")},t}(s),u=[{name:"left",title:window.t("Stack On The Left"),ctor:c},{name:"right",title:window.t("Stack On The Right"),ctor:l},{name:"auto",title:window.t("Auto"),ctor:a}];function h(e){var t=Object(r.ensureDefined)(u.find((function(t){return t.name===e})));return new t.ctor(t)}function d(){return u}},MXV9:function(e,t){
e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" stroke="currentColor" transform="translate(4 4)"><path d="M.5 10.992c0 .287.226.508.505.508H2.65c.19.93.55 1.82 1.09 2.63L2.577 15.3a.5.5 0 0 0-.007.71l1.42 1.42a.5.5 0 0 0 .71-.007l1.17-1.163c.81.54 1.71.9 2.63 1.09v1.645c0 .284.227.505.508.505h1.984c.28 0 .508-.221.508-.505V17.35a7.46 7.46 0 0 0 2.63-1.09l1.17 1.163a.5.5 0 0 0 .71.007l1.42-1.42a.5.5 0 0 0-.007-.71l-1.163-1.17c.54-.81.9-1.7 1.09-2.63h1.645a.502.502 0 0 0 .505-.508V9.008a.503.503 0 0 0-.505-.508H17.35c-.19-.93-.55-1.82-1.09-2.63l1.163-1.17a.5.5 0 0 0 .007-.71l-1.42-1.42a.5.5 0 0 0-.71.007L14.13 3.74a7.46 7.46 0 0 0-2.63-1.09V1.005A.504.504 0 0 0 10.992.5H9.008a.504.504 0 0 0-.508.505V2.65c-.92.19-1.82.55-2.63 1.09L4.7 2.577a.5.5 0 0 0-.71-.007L2.57 3.99a.5.5 0 0 0 .007.71L3.74 5.87c-.54.81-.9 1.7-1.09 2.63H1.005a.503.503 0 0 0-.505.508v1.984z"/><circle cx="10" cy="10" r="2.5"/></g></svg>'},MY2c:function(e,t,i){"use strict";i.r(t),i.d(t,"UndoStack",(function(){return l}));var n=i("RDU5"),r=i("aIyQ"),o=i.n(r),s=i("txPx"),a=Object(s.getLogger)("Common.UndoStack"),l=function(){function e(){this._commands=[],this._onChange=new o.a}return e.prototype.onChange=function(){return this._onChange},e.prototype.isEmpty=function(){return 0===this._commands.length},e.prototype.clear=function(){this.isEmpty()||(this._commands.length=0,this._onChange.fire())},e.prototype.push=function(e){if(!(e instanceof n.UndoCommand))throw new TypeError("argument must be an instance of UndoCommand");this._commands.push(e),this._onChange.fire(e)},e.prototype.pop=function(){if(!this.isEmpty()){var e=this._commands.pop();return this._onChange.fire(e),e}a.logDebug("pop: undo stack is empty")},e.prototype.head=function(){if(!this.isEmpty())return this._commands[this._commands.length-1]},e}()},MbIA:function(e,t,i){"use strict";i.r(t),i.d(t,"DateTimeFormatter",(function(){return s}));var n=i("4kQX"),r=i("gQ5K"),o={dateFormat:"yyyy-MM-dd",timeFormat:"%h:%m:%s",dateTimeSeparator:" "},s=function(){function e(e){void 0===e&&(e={});var t=Object.assign({},o,e);this._dateFormatter=new r.DateFormatter(t.dateFormat),this._timeFormatter=new n.TimeFormatter(t.timeFormat),this._separator=t.dateTimeSeparator}return e.prototype.format=function(e){return""+this._dateFormatter.format(e)+this._separator+this._timeFormatter.format(e)},e.prototype.formatLocal=function(e){return""+this._dateFormatter.formatLocal(e)+this._separator+this._timeFormatter.formatLocal(e)},e}()},MrEN:function(e,t,i){"use strict";(function(t){var n=i("IiTo"),r=i("LxhU").Interval,o=i("aIyQ"),s=i("Kxc7"),a=i("/bs+").barTimeToEndOfPeriod,l=function(e,t){this._server=e,this._session=t,this._timezone=null,this._timezoneId="",this._isDWM=!1,this._resolution=null,this.seriesCompleted=new o,this.seriesError=new o,this._lastBarTimes={}};function c(e){return 12*e*30*24*60*60*1e3}function u(e){return 30*e*24*60*60*1e3}function h(e){return 7*e*24*60*60*1e3}function d(e){return 24*e*60*60*1e3}function p(e){return 60*e*60*1e3}
function _(e){return 60*e*1e3}l.prototype.lastBarTime=function(e){return this._lastBarTimes[e]},l.prototype._userTimezone=function(){return this._timezone},l.prototype.setTimezone=function(e){this._timezone="exchange"===e?"exchange":t.get_timezone(e),this._timezoneId=e},l.prototype.timezone=function(){return this._timezoneId},l.prototype.setResolution=function(e){this._isDWM=r.isDWM(e),this._resolution=e},l.prototype.onRequestMetadata=function(e,t){this._server.receiveLocalResponse({method:"studies_metadata",params:[this._session,e,{errors:[],hash:"",metainfo:t,migrations:[]}]})},l.prototype.onSymbolResolved=function(e,t){this._server.receiveLocalResponse({method:"symbol_resolved",params:[this._session,e,t]})},l.prototype.onSymbolError=function(e,t){this._server.receiveLocalResponse({method:"symbol_error",params:[this._session,e,t]})},l.prototype.onStudyError=function(e,t,i){this._server.receiveLocalResponse({method:"study_error",params:[this._session,e,t,i]})},l.prototype.onSeriesLoading=function(e,t){this._server.receiveLocalResponse({method:"series_loading",params:[this._session,e,t]})},l.prototype.onSeriesCompleted=function(e,t,i){this._server.receiveLocalResponse({method:"series_completed",params:[this._session,e,i,t]}),this.seriesCompleted.fire(e,t)},l.prototype.onSeriesError=function(e,t){this._server.receiveLocalResponse({method:"series_error",params:[this._session,e,t]}),this.seriesError.fire(e,t)},l.prototype.onSeriesClearData=function(e,t){var i={};i[e]={series:[],turnaround:t},this._server.receiveLocalResponse({method:"timescale_update",params:[this._session,i,{index:0,zoffset:0,changes:[],marks:[],index_diff:[]}]})},l.prototype.onStudyCompleted=function(e,t){this._server.receiveLocalResponse({method:"study_completed",params:[this._session,e,t]})},l.prototype.onStudyLoading=function(e,t){this._server.receiveLocalResponse({method:"study_loading",params:[this._session,e,t]})},l.prototype._calcMarksTime=function(e,i,o,l){for(var c=t.get_timezone(i.timezone),u=new n.SessionInfo(i.timezone,i.session,i.holidays,i.corrections),h=n.newBarBuilder(this._resolution,u,u),d=this._isDWM&&!s.enabled("disable_resolution_rebuild"),p=s.enabled("end_of_period_timescale_marks"),_=!this._isDWM,f=r.parse(this._resolution),m=0;m<e.length;m++){var v=o(e[m]);if(p&&(v=a(h,u.spec,v,f)),d){var y=t.utc_to_cal(c,1e3*v);y=u.spec.correctTradingDay(y),t.set_hms(y,0,0,0,0,c),v=parseInt(y.valueOf()/1e3)}_&&(v=this.timeInTimezone(v,c)),e[m]=l(e[m],v)}},l.prototype.onTickmarksUpdated=function(e,t,i,n){if(r.isEqual(n,this._resolution)){var o=t.slice(0);this._calcMarksTime(o,i,(function(e){return e}),(function(e,t){return t}));for(var s,a=[],l=[],c=0;c<o.length;++c){var u=o[c];a.push([this._spanByTime(u,s),u,e+c]),l.push(u),s=u}var h={method:"tickmark_update",params:[this._session,{index:e,zoffset:0,changes:l,marks:a,index_diff:[]}]};this._server.receiveLocalResponse(h)}},l.prototype.onTimescaleUpdate=function(e,t,i,n,r,o){var s=o&&o.slice(0);this._lastBarTimes[e]=s?s&&s[s.length-1]:i&&i[i.length-1].value[0],
this._calcMarksTime(i,n,(function(e){return e.value[0]}),(function(e,t){return e.exTime=t,e})),s&&this._calcMarksTime(s,n,(function(e){return e}),(function(e,t){return{markTime:t,time:e}}));var a={};a[e]={series:i,turnaround:t};var l,c=[],u=[],h=i.map((function(e){return{markTime:e.exTime,time:e.value[0]}}));s&&(h=h.concat(s));for(var d=0;d<h.length;++d){var p=h[d].markTime;c.push([this._spanByTime(p,l),p,r+d]),u.push(h[d].time),l=p}var _={method:"timescale_update",params:[this._session,a,{index:r,zoffset:0,changes:u,marks:c,index_diff:[]}]};this._server.receiveLocalResponse(_)},l.prototype.onSeriesTimeframeUpdate=function(e,t,i,n,r){var o={method:"series_timeframe",params:[this._session,e,t,i,n,"",!0,r]};this._server.receiveLocalResponse(o)},l.prototype.onPointsetDataUpdate=function(e,t,i,n){this._onDataUpdate(e,t,i,null,n,1)},l.prototype.onDataUpdate=function(e,t,i,n,r){this._onDataUpdate(e,t,i,n,r,0)},l.prototype._onDataUpdate=function(e,t,i,n,r,o){var s={},a="",l=[];null!==n&&(a=JSON.stringify(n.data),l=n.indexes||[]),s[e]={s:i,ns:{d:a,indexes:l},turnaround:t};var c={method:"data_update",params:[this._session,s]};this._server.receiveLocalResponse(c)},l.prototype.onQuotesData=function(e){this._server.receiveLocalResponse({method:"quote_symbol_data",params:e})},l.prototype.onDepthData=function(e){this._server.receiveLocalResponse({method:"dd",params:e})},l.prototype.onDepthUpdate=function(e){this._server.receiveLocalResponse({method:"dpu",params:e})},l.prototype.onProjectionUpdate=function(e,t,i,n){var r=i.data,o=r[r.length-1],s={data:{reversalAmount:i.reversalAmount,boxSize:i.boxSize,price:o?o[4]:i.price,bars:r.map((function(e,t){return{time:t,open:e[1],high:e[2],low:e[3],close:e[4],volume:e[5],factor:e[6],additionalPrice:e[6]}}))}},a={};a[e]={s:n||[],ns:{d:JSON.stringify(s),indexes:r.map((function(e,t){return i.barsetSize+(e[0]||0)}))},turnaround:t};var l={method:"data_update",params:[this._session,a]};this._server.receiveLocalResponse(l)},l.prototype.timeInTimezone=function(e,i){return"exchange"===this._userTimezone()?parseInt(t.utc_to_cal(i,1e3*e).valueOf()/1e3):parseInt(t.utc_to_cal(this._userTimezone(),1e3*e).valueOf()/1e3)},l.prototype._spanByTime=function(e,i){var n,r=[{divisor:(n=1,1e3*n),span:10},{divisor:_(1),span:20},{divisor:_(5),span:21},{divisor:_(30),span:22},{divisor:p(1),span:30},{divisor:p(3),span:31},{divisor:p(6),span:32},{divisor:p(12),span:33},{divisor:d(1),span:40},{divisor:h(1),span:50},{divisor:u(1),span:60},{divisor:c(1),span:70}];if(!i)return 20;var o=new Date(1e3*i),s=new Date(1e3*e);if(s.getUTCFullYear()!==o.getUTCFullYear())return 70;if(s.getUTCMonth()!==o.getUTCMonth())return 60;if(t.get_week_of_year(s)!==t.get_week_of_year(o))return 50;if(s.getUTCDate()!==o.getUTCDate())return 40;for(var a=r.length-1;a>=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;r<o.length;r++){i(o[r])}},e.prototype.mergeUp=function(){this._model.isMergeUpAvailableForSource(this._study)&&new c.c(this._model,this._study,"").redo()},e.prototype.mergeDown=function(){
this._model.isMergeDownAvailableForSource(this._study)&&new c.a(this._model,this._study,"").redo()},e.prototype.unmergeUp=function(){this._model.isUnmergeAvailableForSource(this._study)&&new l.c(this._model,this._study,"").redo()},e.prototype.unmergeDown=function(){this._model.isUnmergeAvailableForSource(this._study)&&new l.a(this._model,this._study,"").redo()},e.prototype.mergeUpWithUndo=function(){this._model.isMergeUpAvailableForSource(this._study)&&this._undoModel.mergeSourceUp(this._study)},e.prototype.mergeDownWithUndo=function(){this._model.isMergeDownAvailableForSource(this._study)&&this._undoModel.mergeSourceDown(this._study)},e.prototype.unmergeUpWithUndo=function(){this._model.isUnmergeAvailableForSource(this._study)&&this._undoModel.unmergeSourceUp(this._study)},e.prototype.unmergeDownWithUndo=function(){this._model.isUnmergeAvailableForSource(this._study)&&this._undoModel.unmergeSourceDown(this._study)},e.prototype.changePriceScale=function(e){var t=Object(r.ensureNotNull)(this._model.paneForSource(this._model.mainSeries())),i=Object(r.ensureNotNull)(this._model.paneForSource(this._study));switch(e){case"no-scale":Object(r.assert)(i.actionNoScaleIsEnabled(this._study),"Unable to leave a pane without any non-overlay price scale"),new u.b(this._model,this._study,i,"overlay","").redo();break;case"as-series":Object(r.assert)(i===t,"Study should be on the main pane"),new u.a(this._model,this._study,i,this._model.mainSeries().priceScale(),"").redo();break;case"new-left":new u.b(this._model,this._study,i,"left","").redo();break;case"new-right":new u.b(this._model,this._study,i,"right","").redo();break;default:var n=this._model.dataSourceForId(e);if(null===n)throw new Error("There is no study with entityId='"+e+"'");var o=i===this._model.paneForSource(n);Object(r.assert)(o,"Both studies should be on the same pane");var l=Object(r.ensureNotNull)(n.priceScale()),c=Object(a.sourceNewCurrencyOnPinningToPriceScale)(this._study,l,this._model);new u.a(this._model,this._study,i,l,"").redo(),null!==c&&new s.a(l,c,this._undoModel.chartWidget(),"").redo()}},e.prototype.isVisible=function(){return this._study.properties().visible.value()},e.prototype.setVisible=function(e){this._study.properties().visible.setValue(e)},e.prototype.bringToFront=function(){this._model.bringToFront([this._study])},e.prototype.sendToBack=function(){this._model.sendToBack([this._study])},e.prototype.applyOverrides=function(e){Object(o.applyOverridesToStudy)(this._study,e)},e.prototype.dataLength=function(){return this._study.data().size()},e.prototype.applyToEntireLayout=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[4,new h.ActionsProvider(this._chartWidget).contextMenuActionsForSources([this._study])];case 1:return e=i.sent(),(t=e.find((function(e){return"applyStudyToEntireLayout"===e.id})))&&t.execute(),[2]}}))}))},e}()},N22A:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("eqEH"),r={id:"TradingService"}
;function o(){return Object(n.a)(r)?Object(n.c)(r):null}},NJRZ:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("XABCD Pattern");function s(e,t){this._constructor="LineTool5PointsPattern";var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("6MfG").Pattern5PaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 5},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"XABCD 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("linetool5pointspattern",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineTool5PointsPattern=s},NSoL:function(e,t,i){"use strict";i.r(t),i.d(t,"clientSnapshot",(function(){return w}));var n=i("mrSG"),r=i("aO4+"),o=i("eJTA"),s=i("zM7N"),a=i("Y7w9"),l=i("ikwP"),c=i("zDbI"),u=i("XlJ7"),h=i("EsvI"),d=i("Dq3s"),p=i("Kxc7"),_=i("tzRX"),f=!p.enabled("widget_logo");function m(e,t,i){var r;void 0===t&&(t=null),void 0===i&&(i=null);var o={};if("number"==typeof e)return{relativePositions:(r={},r[e]={l:t,t:i},r),nextElementLeft:e,nextElementTop:e};var s=e[0],a=e.slice(1);if("v"===s){for(var l=null,c=0,u=a;c<u.length;c++){var h=m(u[c],t,i);o=Object(n.__assign)(Object(n.__assign)({},o),h.relativePositions),i=h.nextElementTop,l=h.nextElementLeft}t=l}if("h"===s){for(var d=null,p=0,_=a;p<_.length;p++){h=m(_[p],t,i);o=Object(n.__assign)(Object(n.__assign)({},o),h.relativePositions),t=h.nextElementLeft,d=h.nextElementTop}i=d}return{relativePositions:o,nextElementTop:i,nextElementLeft:t}}var v=function(e){for(var t={},i=0,n=Object.keys(e);i<n.length;i++){var r=n[i],o=m(e[r]).relativePositions;t[r]=o}return t}(d);var y=URL.createObjectURL(new Blob([_],{type:"image/svg+xml"}));function g(e,t,i,n){return Object(l.drawScaled)(e,n,(function(){e.fillText(i,t.x/n,t.y/n)})),e.measureText(i).width*n}function b(e){return e.map((function(e){return Object(n.__assign)(Object(n.__assign)({},e),{title:""})}))}var S=function(){function e(e,t){var i=this;this._logoTextColor=null,this._snapshotData=e,t=t||{},this._options=Object(n.__assign)({backgroundColor:h.themes[e.theme].getThemedColor("color-bg-primary"),font:c.CHART_FONT_FAMILY,fontSize:12,legendMode:"vertical",hideResolution:!1},t);var r=v[e.layout],a=e.charts.map((function(e){return function(e){for(var t=e.panes[0],i=t.canvas.width+t.leftAxis.canvas.width+t.rightAxis.canvas.width,n=0,r=0,o=e.panes;r<o.length;r++){n+=o[r].canvas.height}return void 0!==e.timeAxis&&(n+=e.timeAxis.canvas.height),new l.Size(i,n)}(e)}));if(this._pixelRatio=e.hidpiRatio,this._chartsGeometry=e.charts.map((function(e,t){return function e(t,i,n,r){var o=Math.round(10*r),s=Math.round(10*r),a=n[t];if(null!==a.l){
var l=e(a.l,i,n,r);o=l.x+l.width+Math.round(5*r)}if(null!==a.t){var c=e(a.t,i,n,r);s=c.y+c.height+Math.round(5*r)}var u=i[t];return{x:o,y:s,width:u.w,height:u.h}}(t,a,r,i._pixelRatio)})),!f){var u=e.theme;void 0!==t.backgroundColor&&(u="black"===Object(o.rgbToBlackWhiteString)(Object(o.parseRgb)(t.backgroundColor),150)?s.a.Dark:s.a.Light),this._logoTextColor=h.themes[u].getThemedColor("color-text-primary")}}return e.prototype.getImage=function(){return Object(n.__awaiter)(this,void 0,void 0,(function(){var e,t,i,r,o,s,a,h,d,p,_,m,v,g;return Object(n.__generator)(this,(function(n){switch(n.label){case 0:for(e=0,t=0,i=0,r=this._chartsGeometry;i<r.length;i++)m=r[i],e=Math.max(e,m.x+m.width),t=Math.max(t,m.y+m.height);for(o=this._pixelRatio,e+=Math.round(10*o),s=f?Math.round(10*o):Math.round(35*o),a=t,t+=s,h=Object(l.createDisconnectedCanvas)(document,new l.Size(e,t),1),(d=Object(l.getContext2D)(h)).font=Object(u.makeFont)(this._options.fontSize,this._options.font),d.textBaseline="top",d.fillStyle=this._options.backgroundColor,d.fillRect(0,0,e,t),p=0;p<this._snapshotData.charts.length;++p)_=this._snapshotData.charts[p],m=this._chartsGeometry[p],this._drawChart(_,m,d);return null===this._logoTextColor?[3,2]:[4,(b=Math.round(26*o),S=Math.round(15*o),new Promise((function(e){var t=new Image;t.width=b,t.height=S,t.onload=function(){e({image:t,width:b,height:S})},t.src=y})))];case 1:v=n.sent(),d.fillStyle=this._logoTextColor,d.font=Object(u.makeFont)(13,c.CHART_FONT_FAMILY),g=a+Math.round(s/2-v.height/2),function(e,t,i,n,r){e.save(),e.drawImage(n.image,t,i,n.width,n.height),e.textBaseline="bottom";var o=(t+n.width)/r+3,s=(i+n.height)/r;Object(l.drawScaled)(e,r,(function(){e.fillText("TradingView",o,s)})),e.restore()}(d,Math.round(10*o),g,v,o),n.label=2;case 2:return[2,h]}var b,S}))}))},e.prototype._drawChart=function(e,t,i){i.save(),i.translate(t.x,t.y);for(var n=0,o=0,s=e.panes;o<s.length;o++){var a=s[o],l=0,c=a.leftAxis.canvas.width+Math.round(8*this._pixelRatio),u=n,h=n+Math.round(10*this._pixelRatio);a.leftAxis.contentWidth>0&&(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+s<n+e.canvas.height){var c=this._drawLegendLine(t,new r.Point(a,l),e.contentWidth*this._pixelRatio,e.mainSeriesText,e.mainSeriesValues,!0);"horizontal"!==this._options.legendMode?l+=s:(a=c+1.4*this._options.fontSize*this._pixelRatio,o=!1)}
for(var u=0;u<e.studies.length;++u)if(l+s<n+e.canvas.height){var h=e.studies[u],d=e.studiesValues[u];for(c=null;null===c;)c=this._drawLegendLine(t,new r.Point(a,l),e.contentWidth*this._pixelRatio,h,b(d),o),"horizontal"!==this._options.legendMode?l+=s:null===c?(o=!0,a=i.x,l+=s):(a=c+1.4*this._options.fontSize*this._pixelRatio,o=!1)}},e.prototype._drawLegendLine=function(e,t,i,n,o,s){for(var l=[{text:n.trim()}],c=0,u=o;c<u.length;c++){var h=u[c];h.visible&&(""!==l[l.length-1].text&&l.push({text:" "}),h.title&&l.push({text:h.title}),l.push({text:h.value,color:h.color}))}var d=l.map((function(e){return e.text})).join(""),p=t.x,_=function(e,t,i,n){if(e.measureText(t).width*n<=i)return{text:t,elided:!1};for(var r=e.measureText("...").width*n,o=[],s=0;s<t.length;++s)o.push(s);var l=Object(a.upperbound)(o,i,(function(o,s){return e.measureText(t.slice(0,s+1)).width*n+r>i}));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<y.length;v++){if(m+(P=y[v]).text.length>_.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;S<w.length;S++){var P;if(m+(P=w[S]).text.length>b)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<this._data.items.length;a++){var l=this._data.items[a],c=this._precalculatedCache[a],u=Math.round(l.y*i),h=l.style?l.style.color:s;e.fillStyle=h;var d=void 0,p=void 0;u<=r?(d=u,p=o):(d=r,p=u-Math.floor(n/2)+n),e.fillRect(c.left,d,c.right-c.left+1,p-d)}}},e.prototype.hitTest=function(e){if(null===this._data)return null;for(var t=.5*this._data.barSpacing,i=e.x-t,r=e.x+t,o=0,s=this._data.items;o<s.length;o++){var a=s[o],l=a.x;if(l>=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;n<this._data.items.length;n++){
var r,o=this._data.items[n],s=Math.round(o.x*e),a=void 0,l=void 0;if(i%2)a=s-(r=(i-1)/2),l=s+r;else a=s-(r=i/2),l=s+r-1;this._precalculatedCache[n]={left:a,right:l,roundedCenter:s,center:o.x*e,time:o.timePointIndex}}for(n=1;n<this._data.items.length;n++){var c=this._precalculatedCache[n],u=this._precalculatedCache[n-1];c.time===u.time+1&&(c.left-u.right!==t+1&&(u.roundedCenter>u.center?u.right=c.left-t-1:c.left=u.right+t+1))}var h=Math.ceil(this._data.barSpacing*e);for(n=0;n<this._data.items.length;n++){(c=this._precalculatedCache[n]).right<c.left&&(c.right=c.left);var d=c.right-c.left+1;h=Math.min(d,h)}if(t>0&&h<4)for(n=0;n<this._data.items.length;n++){(d=(c=this._precalculatedCache[n]).right-c.left+1)>h&&(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;n<r.length;n++){var o=r[n],s=o.min,a=o.max;if(!(e<s||a<s)){var l=Math.min(e,a);if(e===(i=Math.max(i,l)))break}}return i}function a(e){var t=[];if(void 0===e)return[];Array.isArray(e)||(e=[e]);for(var i=0,n=e;i<n.length;i++){var r=n[i],o=void 0,s=void 0;isFinite(r)?o=s=Number(r):(o=+r.min,s=+r.max),(o<0||isNaN(o))&&(o=0),isNaN(s)&&(s=1/0),o<=s&&s>0&&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;t<this._availableAreas.length;t++){var i=this._availableAreas[t],n=this._areas[i];n&&(e&&this._affectsLayout(i)?n.visible.setValue(!0):n.visible.setValue(!1))}},e.prototype._onParentFullscreenChange=function(){this._bridge.fullscreen.value()||(this._fullscreenArea=void 0,this._updateFullscreen())},e.prototype._updateFullscreen=function(){for(var e=void 0!==this._fullscreenArea,t=0;t<this._availableAreas.length;t++){var i=this._availableAreas[t],n=this._areas[i];if(n)if(i!==this._fullscreenArea){
var r=n.container.value();r&&r.classList.toggle("js-hidden",e&&!p(i))}else n.fullscreen.setValue(!0)}this._updateVisibility(),this.recalculate()},e.prototype._createDOM=function(e){var t=document.createElement("div");return t.classList.add("layout__area--"+e),t.style.position="absolute","bottom"===e?t.style.bottom="0":t.style.top="0","right"===e||"tradingpanel"===e?t.style.right="0":t.style.left="0",t},e}();function p(e){var t=u.enabled("side_toolbar_in_fullscreen_mode"),i=u.enabled("header_in_fullscreen_mode");return"center"===e||"left"===e&&t||"top"===e&&i}},Nu4p:function(e,t,i){"use strict";i.r(t),i.d(t,"plotShapesData",(function(){return n}));i("YFKU");var n={shape_arrow_down:{guiName:window.t("Arrow Down"),id:"shape_arrow_down",paneRendererClass:"PaneRendererArrowDown",pineName:"shape.arrowdown",icon:"arrow_down"},shape_arrow_up:{guiName:window.t("Arrow Up"),id:"shape_arrow_up",paneRendererClass:"PaneRendererArrowUp",pineName:"shape.arrowup",icon:"arrow_up"},shape_circle:{guiName:window.t("Circle"),id:"shape_circle",paneRendererClass:"PaneRendererCircleShape",pineName:"shape.circle",icon:"circle"},shape_cross:{guiName:window.t("Cross"),id:"shape_cross",paneRendererClass:"PaneRendererCrossShape",pineName:"shape.cross",icon:"cross"},shape_diamond:{guiName:window.t("Diamond"),id:"shape_diamond",paneRendererClass:"PaneRendererDiamond",pineName:"shape.diamond",icon:"diamond"},shape_flag:{guiName:window.t("Flag"),id:"shape_flag",paneRendererClass:"PaneRendererFlagShape",pineName:"shape.flag",icon:"flag"},shape_label_down:{guiName:window.t("Label Down"),id:"shape_label_down",paneRendererClass:"PaneRendererLabelDown",pineName:"shape.labeldown",icon:"label_down"},shape_label_up:{guiName:window.t("Label Up"),id:"shape_label_up",paneRendererClass:"PaneRendererLabelUp",pineName:"shape.labelup",icon:"label_up"},shape_square:{guiName:window.t("Square"),id:"shape_square",paneRendererClass:"PaneRendererSquare",pineName:"shape.square",icon:"square"},shape_triangle_down:{guiName:window.t("Triangle Down"),id:"shape_triangle_down",paneRendererClass:"PaneRendererTriangleApexDown",pineName:"shape.triangledown",icon:"triangle_down"},shape_triangle_up:{guiName:window.t("Triangle Up"),id:"shape_triangle_up",paneRendererClass:"PaneRendererTriangleApexUp",pineName:"shape.triangleup",icon:"triangle_up"},shape_xcross:{guiName:window.t("X Cross"),id:"shape_xcross",paneRendererClass:"PaneRendererXCross",pineName:"shape.xcross",icon:"x_cross"}}},OBgQ:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("jCNj"),r=function(){function e(e,t,i){this.year=e,this.month=t,this.day=i}return e.prototype.toString=function(){return this.year+"-"+this.month+"-"+this.day},e.prototype.compareTo=function(e){return this.year>e.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;r<this.panes().length;r++)n.panes.push(this.panes()[r].state(!0,e,!1,t,i));n.timeScale=this._timeScale.state(e);var o=null,s=this.properties();return n.chartProperties={paneProperties:s.paneProperties.state(),scalesProperties:s.scalesProperties.state(),publishedChartsTimelineProperties:o?o.state(e):void 0,chartEventsSourceProperties:s.chartEventsSourceProperties.state(),priceScaleSelectionStrategyName:s.priceScaleSelectionStrategyName.value()},
s.chartEventsSourceProperties&&(n.chartProperties.chartEventsSourceProperties=s.chartEventsSourceProperties.state()),n.lineToolsGroups=this.lineToolsGroupModel().state(t),n.version=c.version,n.timezone=this.timezone(),n.sessions=this.sessions().state(e),n.shouldBeSavedEvenIfHidden=this._shouldBeSavedEvenIfHidden,n},c.prototype.chartPropertiesTransparencyMigrate=function(e){var t,i,n;e.chartProperties.paneProperties.crossHairProperties&&(n=e.chartProperties.paneProperties.crossHairProperties,N.isHexColor(n.color)&&(i=n.transparency/100,t=a(n.color),n.color=s(o(t,i)))),e.chartProperties.paneProperties.dataWindowProperties&&(n=e.chartProperties.paneProperties.dataWindowProperties,N.isHexColor(n.color)&&(i=n.transparency/100,t=a(n.color),n.color=s(o(t,i))))},c.prototype.resetDeferredStudies=function(){new H(this).reset()},c.prototype._getExceedingChildStudies=function(e){for(var t=[],i=0;i<e.length;++i)t=t.concat(e[i].sources||[]);var n=0;for(var r=[],o={},s=0,a=1e6;t.length&&--a;){var l=t[s];(l.ownerSource&&o[l.ownerSource]||!l.ownerSource)&&(o[l.id]=l,t.splice(t.indexOf(l),1),l.ownerSource&&"Study"===l.type&&l.state&&l.state.isChildStudy&&++n>1&&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;s<e.panes.length;s++){var h,d=e.panes[s];if(0!==d.sources.length)(h=this.panes()[u]||this.createPane()).restoreState(d,t,e.version,n,i,!0),h.mainDataSource()?u+=1:this.removePane(h);else k.logWarn("Empty pane detected - restoring is skipped. idx="+s+", state="+JSON.stringify(d))}this._invalidateBarColorerCaches();var p=this.dataSources(),_=0;for(s=0;s<p.length;s++){var f=p[s];TradingView.isInherited(f.constructor,y)&&(_++,f.calcIsActualSymbol())}this._version=e.version,this.updateTimeScaleBaseIndex(),this.recalculateAllPanes(),this.fullUpdate(),this.syncESD();var m=TVLocalStorage.getItem("linetools_limit")||1e3;return window.is_authenticated&&window.user&&window.user.settings&&(m=window.user.settings.linetools_limit||m),e.sessions&&this.sessions().restoreState(e.sessions,t),e.lineToolsGroups&&(this._lineToolsGroupModel=W.fromState(this,e.lineToolsGroups)),_>m&&_%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;l<this.m_dataSources.length;l++){var c=a(this.m_dataSources[l]);null!==c&&o.sources.push(c)}}function u(e){return null!==s.get(e)}o.leftAxisesState=this._leftPriceScales.map((function(e){var t={};return t.state=e.state(),t.sources=e.dataSources().filter(u).map((function(e){return e.id()})),t})),o.rightAxisesState=this._rightPriceScales.map((function(e){var t={};return t.state=e.state(),t.sources=e.dataSources().filter(u).map((function(e){return e.id()})),t})),o.overlayPriceScales={};for(l=0;l<this.m_dataSources.length;l++){var h=this.m_dataSources[l];this.isOverlay(h)&&h.isSavedInChart(t)&&(o.overlayPriceScales[h.id()]=h.priceScale().state())}return o.stretchFactor=this._stretchFactor,this.m_mainDataSource&&(o.mainSourceId=this.m_mainDataSource.id()),o.priceScaleRatio=this._currentPriceScaleRatio,o},R.prototype.sourceById=function(e){for(var t=0;t<this.m_dataSources.length;t++)if(this.m_dataSources[t].id()===e)return this.m_dataSources[t];return null},R.prototype.isESDStudy=function(e){return"Script$TV_EARNINGS@tv-scripting"===e.id||"Script$TV_DIVIDENDS@tv-scripting"===e.id||"Script$TV_SPLITS@tv-scripting"===e.id||"ESD$TV_EARNINGS@tv-scripting"===e.id||"ESD$TV_DIVIDENDS@tv-scripting"===e.id||"ESD$TV_SPLITS@tv-scripting"===e.id},R.prototype.isStudyToSkip=function(e){return!!this.isESDStudy(e)},R.prototype.restoreState=function(e,t,i,n,r,o){
n=n||{},e.stretchFactor&&(this._stretchFactor=e.stretchFactor);var s={};if(e.sources){var a=e.sources.filter((function(e){return!!e&&("MainSeries"===e.type||(!e.points||!e.points.some((function(e){return null===e.time_t||!isFinite(e.time_t)}))||(k.logNormal("Dropped invalid "+e.type+". Reason: non-numeric point time"),!1)))}),this),l=-1!==this.m_dataSources.indexOf(this._model.mainSeries());this.clearSeries(o),this.m_mainDataSource=null,l&&this._addSourceToCollections(this._model.mainSeries(),o);var c=this.getZOrderMinMax(),h=c.minZOrder,d=c.maxZOrder;!function(){var t=a.find((function(t){return t.id===e.mainSourceId}));if(void 0!==t)if(TradingView[t.type]&&TradingView.isInherited(TradingView[t.type],y)){for(var i=null,n=0;n<a.length;n++){var r=a[n];if(!TradingView[t.type]||!TradingView.isInherited(TradingView[r.type],y)){if(null!==i)return void k.logWarn("Pane contains more than 1 possibly main sources - auto fix cannot be applied");i=r}}if(null!==i){var o=e.mainSourceId,s=0;e.mainSourceId=i.id,a.forEach((function(e){e.ownerSource===o&&(e.ownerSource=i.id,s+=1)})),k.logNormal("Auto fix broken pane is applied, changed line tools="+s+", changed from="+o+" to="+i.id)}else k.logWarn("Pane contains only line tools - possible we need to remove this pane?")}else k.logNormal("The type of main source is not line tool - fix is unnecessary");else k.logWarn("There is no main source with id "+e.mainSourceId+", total sources="+a.length)}();for(var p=0;p<a.length;p++){if("study_Sessions"===(f=(_=a[p]).type)){this.model().sessions().restoreOldState(_,t);break}}for(p=0;p<a.length;p++){var _,f;if("study_Sessions"!==(f=(_=a[p]).type)){if(Math.abs(_.zorder)>1e200){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<this.m_dataSources.length;p++){var M=this.m_dataSources[p];if(!S.has(M)){var L=new u(this._model.properties().scalesProperties);if(L.setHeight(this.m_height),L.addDataSource(M),e.overlayPriceScales&&e.overlayPriceScales[M.id()]){var O=e.overlayPriceScales[M.id()];O.m_isAutoScale=!0,O.m_isLog=!1,O.m_isPercentage=!1,O.m_isLockScale=!1,L.restoreState(O)}M.setPriceScale(L)}}for(var v in s){var A=s[v];if(A)(M=this.dataSourceForId(v))&&this.dataSourceForId(v).setOwnerSource(this.dataSourceForId(A))}if(e.mainSourceId&&!this.containsMainSeries()&&(this.m_mainDataSource=this.dataSourceForId(e.mainSourceId)),!this.m_mainDataSource)for(p=0;p<this.m_dataSources.length;p++){M=this.m_dataSources[p];if(TradingView.isInherited(M.constructor,B)){this.m_mainDataSource=M;break}}for(p=0;p<this.m_dataSources.length;p++){M=this.m_dataSources[p];if(TradingView.isInherited(M.constructor,y))M.ownerSource()||M.setOwnerSource(this.mainDataSource()),M.isFixed()&&M.restoreFixedPoints(),M.fixAfterRestorePriceAxis&&M.fixAfterRestorePriceAxis();else if(TradingView.isInherited(M.constructor,P)){var E=M.properties();E.linkedToSeries&&E.linkedToSeries.value()&&(M.ownerSource()||M.setOwnerSource(this.model().mainSeries()))}}this._updateMargins(),this._cachedOrderedSoruces=null,this._cachedHitTestSources=null},R.prototype._restoreMainSeries=function(e,t,i,n,r,o){var s=e.id,a=e.state,c=e.zorder;if(a&&r&&(a.style=r.style||a.style,a.interval=r.interval||a.interval,a.symbol=r.symbol||a.symbol),a&&a.style===I.STYLE_HILO&&!l("chart_style_hilo")&&(a.style=I.STYLE_CANDLES),a&&["candleStyle","hollowCandleStyle","haStyle"].forEach((function(e){a[e]&&(a[e].wickUpColor=a[e].wickUpColor||a[e].wickColor,a[e].wickDownColor=a[e].wickDownColor||a[e].wickColor)})),a&&(a.statusViewStyle=a.statusViewStyle||{},!a.statusViewStyle.symbolTextSource)){var u=!!a.statusViewStyle.showSymbolAsDescription;a.statusViewStyle.symbolTextSource=u?"ticker":"description"}if(!i){var h=this._model.mainSeries();this._model.paneForSource(h).removeDataSource(h,!1,o),this._addSourceToCollections(h,o)}if(this.m_mainDataSource=this._model.mainSeries(),
(v=a&&a.style?a.style:void 0)===T.STYLE_PNF&&"ATR"===this._model.mainSeries().properties().pnfStyle.inputs.style.value()?this._model.mainSeries().properties().pnfStyle.inputs.style._value="Traditional":v===T.STYLE_RENKO&&"ATR"===this._model.mainSeries().properties().renkoStyle.inputs.style.value()&&(this._model.mainSeries().properties().renkoStyle.inputs.style._value="Traditional"),a&&!a.hasOwnProperty("showSessions")&&(a.showSessions=!1),a&&!a.extendedHours&&(a.extendedHours=!1),a&&t&&(a.showCountdown=!1),a&&(t&&!("showSeriesLastValueProperty"in n)&&"showLastValue"in a&&this._model.properties().scalesProperties.showSeriesLastValue.setValue(a.showLastValue),delete a.showLastValue),a)for(var d={haStyle:M.chartStyleStudyId(T.STYLE_HEIKEN_ASHI,!0),renkoStyle:M.chartStyleStudyId(T.STYLE_RENKO,!0),pbStyle:M.chartStyleStudyId(T.STYLE_PB,!0),kagiStyle:M.chartStyleStudyId(T.STYLE_KAGI,!0),pnfStyle:M.chartStyleStudyId(T.STYLE_PNF,!0),rangeStyle:M.chartStyleStudyId(T.STYLE_RANGE,!0)},p=this._model.studyVersioning(),_=this._model.mainSeries().styleStudyInfos(),f=Object.keys(I.SYMBOL_STRING_DATA),m=0;m<f.length;m++){var v=f[m],y=I.STYLE_SHORT_NAMES[v]+"Style",g=y in e?e[y].studyId:d[y];if(null!=(v=a[y])){var b=v.inputs,S=L.parseIdString(g),w=_[y].studyId,P=L.parseIdString(w),C=p.updateStudyInputs(S.id,S.version,P.version,b,null);v.inputs=C}}this._model.mainSeries().restoreState(e,t),this._sourcesById.delete(this._model.mainSeries().id()),this._model.mainSeries().setId(s),this._sourcesById.set(s,this._model.mainSeries()),void 0!==c&&this._model.mainSeries().setZorder(c),this._model.mainSeries().properties().extendedHours.listeners().fire(this._model.mainSeries().properties().extendedHours),this._model.mainSeries().symbolInfo()&&this._model.mainSeries().dataEvents().fireSymbolResolved(this._model.mainSeries().symbolInfo())},R.prototype.restoreStudy=function(e,t,i,n){if(t&&void 0===e.data&&void 0===e.nonSeriesData&&void 0===e.indexes)k.logError("Cannot restore (skipping) study without data "+e.id+", "+e.metaInfo.id);else{var r=e.id,o=e.state,s=e.zorder,a=e.ownerSource,l=TradingView.clone(e.metaInfo);if(Object.assign(l,L.parseIdString(l.id)),!this.isStudyToSkip(l)||t){var c=o,u=this._model.studyVersioning(),d=u.patchPropsStateAndMetaInfo(c,l,{oldShowStudyLastValueProperty:t&&!i.showStudyLastValueProperty});c=d.propsState,l=d.metaInfo;var p=new h(this._model,e,l.shortDescription);p.setId(r);var _=this;if(t)m(null);else{var f=u.updateMetaInfoAsync(l);f.sync?m(f.result):f.result.then((function(e){m(e)})).catch((function(e){p.setStatus("error: "+e),p.setFailed(!0)}))}return p&&(this._addSourceToCollections(p,n),this._processMainSourceChange()),delete this._cachedOrderedSoruces,delete this._cachedHitTestSources,p&&void 0!==s&&p.setZorder(s),p}k.logNormal("Skipping study "+l.id)}function m(i){p.setStatus("");var n=i||new L(l),o=new H(_._model);function s(s){var a=C(l,i,c,null,u,s),h=x(_._model,a,s||_._model.mainSeries(),n);if(h.setId(r),t){var d=u.patchStudyData(l,e.data,e.nonSeriesData,e.indexes);h.restoreData(d.data,d.nsData,d.indexes)}
_._model.replaceStudyStub(p,h)||(p=h),o.add(r,h)}a&&e.state.isChildStudy?o.get(a).then(s):s()}},R.prototype.restoreLineTool=function(e,t,i,r){i=void 0===i||i,D.migrateState(e),S.migrateState(e);var o=e.type,s=e.id,a=e.state,l=i?e.zorder:this._newZOrderForLineTool();n(m(o),"invalid data source type:"+o+" (expected to be a Line Tool)");var c,u,d=null;if(v(o)){var y=(e=(d=this._model.studyVersioning()).patchPointsBasedStudyState(e)).metaInfo;if(Object.assign(y,L.parseIdString(y.fullId)),!t){var w=y.productId;if(!pro.hasPackage(w)){var P=new h(this._model,e,y.shortDescription);return P.setId(s),this._addSourceToCollections(P,r),void 0!==l&&P.setZorder(l),P.setStatus(window.t("not authorized")),void P.setFailed(!0)}}var C=d.updateMetaInfo(y)||y;u=f(o,y,C,a,d),t?u.merge({fixedSize:!1}):u.merge({fixedSize:!0}),c=p(o,this._model,u,C,!0)}else u=_(o,a),t?u.merge({fixedSize:!1}):u.merge({fixedSize:!0}),c=p(o,this._model,u,null,!0);c.setId(s),c.linkKey=e.linkKey;var x=e.alertId;x&&c.canHasAlert()&&"function"==typeof c.setAlert&&O.enabled("alerts")&&!this._model.readOnly()&&!this._model.isJustClonedChart()&&c.setAlert(x,{noChartSave:!0});var T=e.indexes?e.indexes:[];if(T=T.slice(0,e.points.length),c.isFixed()?c.restorePositionPercents(e.positionPercents):c.restorePoints(e.points,T,t),c instanceof g||c instanceof b||c instanceof E||c instanceof V||c instanceof A)c.restoreData(e);else if(t&&c.restoreData){var I=e;d&&(I.graphics=d.patchPointsBasedStudyData(I.metaInfo,I.graphics)),c.restoreData(I)}var M=null==e.version?1:e.version,k=null==c.version?1:c.version;return M!==k&&"function"==typeof c.migrateVersion&&c.migrateVersion(M,k,{pane:this,model:this._model,properties:u}),this._addSourceToCollections(c,r),delete this._cachedOrderedSoruces,delete this._cachedHitTestSources,void 0!==l&&c.setZorder(l),c},R.prototype._restoreSpecialSource=function(e,t,i){var n=TradingView[e.type];if(n&&n.createFromState){var r=n.createFromState(e,t,this._model);r&&(r.setId(e.id),this._addSourceToCollections(r,i),r.zorder&&r.setZorder(r.zorder))}},c.prototype.studyTemplate=function(e,t){for(var i={panes:[]},n=0;n<this.panes().length;n++){i.panes.push(this.panes()[n].state(!0,!1,!0))}return e&&(i.symbol=this.mainSeries().symbol()),t&&(i.interval=this.mainSeries().interval()),i.version=c.version,i},c.prototype.theme=function(){var e={};return e.chartProperties={paneProperties:this.properties().paneProperties.state(),scalesProperties:this.properties().scalesProperties.state()},e.mainSourceProperties=this.mainSeries().state().state,delete e.mainSourceProperties.symbol,delete e.mainSourceProperties.interval,delete e.chartProperties.paneProperties.topMargin,delete e.chartProperties.paneProperties.bottomMargin,e.version=c.version,e},c.prototype.restoreTheme=function(e,t,i){var n={hollowCandle:{related:"candle"}};for(var r in n)if(!e.mainSourceProperties[r+"Style"]){var o=e.mainSourceProperties[n[r].related+"Style"];e.mainSourceProperties[r+"Style"]=TradingView.clone(o)}this._undoModel.chartLoadTheme(this,e,t,i)},c.prototype.preferences=function(){
return j(this,this.mainSeries())};var H=function(){var e=[],t=[];function i(n){var r=e.indexOf(n);return~r?t[r]:this instanceof i?(this._source=n,this._studies={},this._deferreds={},e.push(n),void t.push(this)):new i(n)}return i.prototype.add=function(e,t){this._deferreds[e]&&(this._deferreds[e].resolve(t),delete this._deferreds[e]),this._studies[e]=t},i.prototype.get=function(e){return this._studies[e]?Promise.resolve(this._studies[e]):(this._deferreds[e]||(this._deferreds[e]=F()),this._deferreds[e].promise)},i.prototype.reset=function(){var i=e.indexOf(this._source);~i&&(e.splice(i,1),t.splice(i,1))},i}();e.exports=c},OYox:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererCircles",(function(){return a}));var n=i("aO4+"),r=i("ogJP"),o=i("Zp/P"),s=i("VdBB"),a=function(){function e(e){this._data=e}return e.prototype.draw=function(e,t){for(var i=this._data,n=t.pixelRatio,o=Math.max(1,Math.floor(n))%2?.5:0,s=i.vertOffset||0,a=i.lineColor||i.color,l=i.lineWidth||i.height/2,c="",u=!1,h=0,d=i.items;h<d.length;h++){var p=d[h],_=p.x,f=p.y+s;if(!Object(r.isNaN)(_)&&!Object(r.isNaN)(f)){var m=void 0,v=void 0;null!=p.style?(m=p.style.color,v=p.style.width):(m=a,v=l),m!==c&&(c=m,u&&e.fill(),e.beginPath(),e.fillStyle=m);var y=Math.round(_*n)+o,g=Math.round(f*n)+o,b=Math.round(v*n)+o;e.moveTo(y+b,g),e.arc(y,g,b,0,2*Math.PI,!1),u=!0}}u&&e.fill()},e.prototype.hitTest=function(e){for(var t=this._data,i=t.lineWidth||t.height/2,r=2*i,a=t.vertOffset||0,l=Object(o.selectionTolerance)(r),c=0,u=t.items;c<u.length;c++){var h=u[c];if(h)if(new n.Point(h.x,h.y+a).subtract(e).length()+i<=l)return new s.HitTestResult(s.HitTestResult.REGULAR)}return null},e}()},Ocx9:function(e,t,i){"use strict";(function(e){var n=i("wZIs"),r=i("tc+8");function o(e,t,i,r){var o=e?n.defaults:n.factoryDefaults,a=t.startsWith("study_")?TradingView.clone(o("study")):{},l=TradingView.clone(o(t,r));return t.startsWith("study_")&&l.inputs&&delete l.inputs.symbol,"linetoolicon"===t&&e&&(l.icon=n.defaults(t).icon),l=s(l,i),TradingView.merge(a,l),a}function s(e,t){var i={};for(var n in e)t.indexOf(n)<0&&(i[n]=e[n]);return i}function a(t,i,n,s){var l;void 0===s&&(s=!0),this._defaultName=t,n?l=i:(l=o(s,t,[],null),i&&TradingView.merge(l,i)),r.call(this,l),this._defaultName=t,this._useUserPreferences=s,this.listeners().subscribe(this,a.prototype.onPropertyChanged),this._exclusions=[],this._restoreFactoryDefaultsEvent=new e}inherit(a,r),a._saveDefaults=!1,a.prototype.preferences=function(){return this.state(this._exclusions)},a.prototype.mergePreferences=function(e){this.mergeAndFire(s(e,this._exclusions))},a.prototype.addExclusion=function(e){this._exclusions.indexOf(e)<0&&this._exclusions.push(e)},a.prototype.restoreFactoryDefaults=function(){var e=o(!1,this._defaultName,this._exclusions,null);this.mergeAndFire(e),this._defaultName.startsWith("study_")||this.saveDefaults(),this._restoreFactoryDefaultsEvent.fire()},a.prototype.onRestoreFactoryDefaults=function(){return this._restoreFactoryDefaultsEvent},a.prototype.onPropertyChanged=function(){
a._saveDefaults&&!this._defaultName.startsWith("study_")&&this.saveDefaults()},a.prototype.saveDefaults=function(){this._useUserPreferences&&n.saveDefaults(this._defaultName,this.preferences())},a.prototype.clone=function(e){for(var t=new a(this._defaultName,this.state(),e&&e.replaceByState,this._useUserPreferences),i=0;i<this._exclusions.length;++i)t.addExclusion(this._exclusions[i]);return t},t.DefaultProperty=a,t.saveDefaultProperties=function(e){a._saveDefaults=e}}).call(this,i("aIyQ"))},Ofm5:function(e,t,i){"use strict";var n=function(){var e={},t=i("ocLq"),n=i("IDnv").extrapolateBarsFrontByCount,r=i("IDnv").extrapolateBarsFrontToTime,o=i("Y7w9").lowerbound_int,s=function(e,t,i){this._chartApiMessager=e,this._lastRealBarTime=null,this._lastRealBarIndex=null,this._resolution=t,this._extrapolatedBarsCache=[],this._onReadyCallbacks=[],this._requestedAmountOfBars=0,this._maxDepth=i||100};function a(e,t,i){return e+","+t+","+i}return s.prototype.ready=function(){return null!==this._lastRealBarIndex},s.prototype.rebuild=function(e,t){this._lastRealBarTime=e;var i=Math.max(this._extrapolatedBarsCache.length,this._requestedAmountOfBars);this._extrapolatedBarsCache=[],this.ensureExtrapolatedToBar(t,i)},s.prototype.historyExtrapolator=function(){return void 0===this._historyExtrapolator&&(this._historyExtrapolator=new s(null,this._resolution,Math.max(this._maxDepth,1500))),this._historyExtrapolator},s.prototype.getPointTimeUTC=function(e,t,i){if(0===t)return e;if(!this.ready()||e<this._lastRealBarTime/1e3)return this.historyExtrapolator().setLastBarTime(0,1e3*e),this.historyExtrapolator().getPointTimeUTC(e,t,i);var n=this.getOffsetSinceLastRealBar(i,e,t);return this.ensureExtrapolatedToBar(i,n+1),this._extrapolatedBarsCache[n]},s.prototype.findDistanceInBars=function(e,t,i){return e===t?0:(this.historyExtrapolator().setLastBarTime(0,1e3*e),this.historyExtrapolator().indexOfBar(t,i))},s.prototype.indexOfBar=function(e,t){this._ensureExtrapolatedToTime(t,1e3*e);var i=o(this._extrapolatedBarsCache,e);return i===this._extrapolatedBarsCache.length?-1:this._lastRealBarIndex+i+1},s.prototype._extrapolateData=function(e,t){if(!this._lastRealBarTime)throw Error("No real bars known, so cannot extrapolate anything");var i=t(this._lastRealBarTime);if(i&&0!==i.length){for(var n=0;n<i.length;++n)i[n]=i[n]/1e3;i[0]===this._lastRealBarTime/1e3&&(i=i.slice(1)),this._extrapolatedBarsCache=i;var r=i.slice(0);r.sort();for(n=0;n<r.length-1;++n)r[n]===r[n+1]&&console.error("Duplicating extrapolated bars: duplicated "+new Date(1e3*r[n]));null!==this._lastRealBarIndex&&null!==this._chartApiMessager&&this._chartApiMessager.onTickmarksUpdated(this._lastRealBarIndex+1,i,e,this._resolution)}},s.prototype.onTickmarksNeeded=function(e,t){if(this.ready())this.ensureExtrapolatedToBar(e,t);else{var i=this;this._onReadyCallbacks.push((function(){i.ensureExtrapolatedToBar(e,t)}))}},s.prototype.ensureExtrapolatedTo=function(e,t,i){this.ensureExtrapolatedToBar(e,this.getOffsetSinceLastRealBar(e,t,i)+1)},s.prototype.getOffsetSinceLastRealBar=function(e,t,i){
return(0===this._extrapolatedBarsCache.length||t===this._lastRealBarTime/1e3?-1:this.indexOfBar(t,e)-this._lastRealBarIndex-1)+i},s.prototype.ensureExtrapolatedToBar=function(e,t){var i=this;return this._requestedAmountOfBars=t,this._extrapolateData(e,(function(r){return i._extrapolatedBarsCache.length>=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]<t&&console.warn("Extrapolation error: not enough data created"),o.times}))},s.prototype.newBarBuilder=function(e){var i=t.Symbol.newSession(e);return t.Symbol.newBarBuilder(this._resolution,i)},s.prototype._shouldExtrapolateMore=function(){return this._extrapolatedBarsCache.length<this._maxDepth},s.prototype.setLastBarTime=function(e,t){(null===this._lastRealBarIndex||this._lastRealBarIndex===e&&this._lastRealBarTime!==t)&&(this._extrapolatedBarsCache=[]),this._extrapolatedBarsCache&&this._extrapolatedBarsCache.length&&this._lastRealBarIndex!==e&&(this._lastRealBarIndex>e?this._extrapolatedBarsCache=[]:this._lastRealBarTime!==t&&this._extrapolatedBarsCache.shift(e-this._lastRealBarIndex)),this._lastRealBarIndex=e,this._lastRealBarTime=t;for(var i=0;i<this._onReadyCallbacks.length;++i)this._onReadyCallbacks[i]();this._onReadyCallbacks=[]},{remove:function(t,i,n){delete e[a(t,i,n)]},storage:function(i,n,r){var o=t.Symbol.parsePeriod(r),l=a(i,n,o.pureResolution);return e[l]?e[l]:function(t){return"undefined"!=typeof TradingView&&TradingView.ChartapiMessagerInstances?e[t]=new s(TradingView.ChartapiMessagerInstances[i],o.pureResolution):e[t]=new s(null,o.pureResolution),e[t]}(l)}}}();e.exports=n},OiSa:function(e,t,i){"use strict";i.r(t),i.d(t,"isDrawingToolbarVisible",(function(){return c}));var n=i("Vdly"),r=i("Kxc7"),o=i("hY0g"),s=i.n(o),a=!r.enabled("hide_left_toolbar_by_default"),l=n.getBool("ChartDrawingToolbarWidget.visible",a),c=new s.a(l)},OsWk:function(e,t){
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 15" width="15" height="15" fill="none"><path d="M3.00004 7.50008C3.00004 6.25729 3.50318 5.13298 4.31807 4.31809L3.61097 3.61098C2.6162 4.60574 2.00004 5.98143 2.00004 7.50008H3.00004ZM4.31807 4.31809C5.13296 3.50321 6.25727 3.00008 7.50004 3.00008V2.00008C5.98141 2.00008 4.60572 2.61623 3.61097 3.61098L4.31807 4.31809ZM4.31808 3.61098L2.55033 1.84323L1.84322 2.55033L3.61097 4.31809L4.31808 3.61098ZM7.50004 3.00008C8.74283 3.00008 9.86715 3.50321 10.682 4.31811L11.3891 3.611C10.3944 2.61624 9.01869 2.00008 7.50004 2.00008V3.00008ZM10.682 4.31811C11.4969 5.13299 12 6.2573 12 7.50008H13C13 5.98144 12.3839 4.60576 11.3891 3.611L10.682 4.31811ZM11.3891 4.31811L13.1569 2.55033L12.4498 1.84322L10.682 3.611L11.3891 4.31811ZM12 7.50008C12 8.74285 11.4969 9.86716 10.682 10.682L11.3891 11.3892C12.3839 10.3944 13 9.01872 13 7.50008H12ZM10.682 10.682C9.86715 11.4969 8.74283 12.0001 7.50004 12.0001V13.0001C9.01869 13.0001 10.3944 12.3839 11.3891 11.3892L10.682 10.682ZM10.682 11.3892L12.4498 13.1569L13.1569 12.4498L11.3891 10.682L10.682 11.3892ZM7.50004 12.0001C6.25727 12.0001 5.13296 11.497 4.31807 10.6821L3.61097 11.3892C4.60572 12.3839 5.98141 13.0001 7.50004 13.0001V12.0001ZM4.31807 10.6821C3.50318 9.86718 3.00004 8.74286 3.00004 7.50008H2.00004C2.00004 9.01873 2.6162 10.3944 3.61097 11.3892L4.31807 10.6821ZM2.55033 13.1569L4.31808 11.3892L3.61097 10.6821L1.84322 12.4498L2.55033 13.1569ZM8.00004 2.50007L8 -8.77353e-06L7 8.77353e-06L7.00004 2.50009L8.00004 2.50007ZM12.5001 8.00008L15 8L15 7L12.5 7.00008L12.5001 8.00008ZM2.50006 7.00008L1.564e-05 7L-1.564e-05 8L2.50003 8.00008L2.50006 7.00008ZM7.00004 12.5001L7 15L8 15L8.00004 12.5001L7.00004 12.5001Z"/></svg>'},OwDf:function(e,t,i){"use strict";i.r(t),i.d(t,"PivotPointsStandardLastPricesView",(function(){return s}));var n=i("k9/m"),r=["p","s1","r1","s2","r2","s3","r3","s4","r4","s5","r5"],o={P:"P",S1:"S1/R1",S2:"S2/R2",S3:"S3/R3",S4:"S4/R4",S5:"S5/R5",R1:"S1/R1",R2:"S2/R2",R3:"S3/R3",R4:"S4/R4",R5:"S5/R5"},s=function(){function e(e){this._visiblePivots=new Set,this._invidated=!0,this._prices=[],this._source=e}return e.prototype.visiblePivots=function(){return this._visiblePivots},e.prototype.update=function(){this._invidated=!0},e.prototype.prices=function(){return this._invidated&&(this._updateImpl(),this._invidated=!1),this._prices},e.prototype._updateImpl=function(){this._visiblePivots.clear();var e=this._source.model(),t=this._source.priceScale();if(null!==t&&!e.timeScale().isEmpty()&&!t.isEmpty()){var i=e.timeScale().visibleBarsStrictRange();if(null!==i&&this._source.customData()&&this._source.customData().pivots){var s=e.mainSeries().bars().search(i.lastBar(),n.PlotRowSearchMode.NearestLeft);if(null!==s)for(var a=s.index,l=this._source.customData().pivots,c=this._source.indexes(),u=this._source.properties(),h=this._source.firstValue(),d=0;d<l.length;d++)if(l[d]){var p=c[l[d].startIndex],_=c[l[d].endIndex],f=u.inputs.showHistoricalPivots.value();if(p<=a&&(_>=a||f)){this._visiblePivots.add(l[d]),
this._prices=[];for(var m=0;m<r.length;m++){var v=r[m],y=l[d][v];if(void 0!==y&&null!==h){var g=t.priceToCoordinate(y,h),b=v.toUpperCase(),S=o[b],w=u.levelsStyle.colors[S].value();this._prices.push({formatted:t.formatPrice(y,h),price:y,coordinate:g,color:w})}}}}}}},e}()},Owlf:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var n="large"},"P+Pi":function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererFlagShape",(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=n/2,o=(i-3)/3,s=t.x-i/2,a=t.vertOffset,l=t.y-r+a;e.moveTo(s,l),e.lineTo(s+3,l),e.bezierCurveTo(s+o,l-o,s+2*o,l+o,s+i,l),e.lineTo(s+i,l+r),e.bezierCurveTo(s+i-o,l+r+o,s+i-2*o,l+r-o,s+3,l+r),e.lineTo(s+3,l+n),e.lineTo(s,l+n),e.lineTo(s,l)},t.prototype._calcBoundingBox=function(t){var i=t.width,n=t.height,r=n/2,s=t.x-i/2,a=t.vertOffset,l=t.y-r+a,c=s,u=s+i,h=l,d=l+n,p=new o.Point(c,h),_=new o.Point(u,d),f=Object(o.box)(p,_),m=e.prototype._calcBoundingBox.call(this,t);return m&&(f=this._unionBox(f,m)),f},t}(r.a)},PAcw:function(e,t,i){"use strict";i.r(t),i.d(t,"GridRenderer",(function(){return o}));var n=i("jFln"),r=i("gAom"),o=function(){function e(){this._data=null}return e.prototype.setData=function(e){this._data=e},e.prototype.draw=function(e,t){if(null!==this._data){var i=t.pixelRatio,o=Math.max(1,Math.floor(i));e.lineWidth=o;var s=Math.ceil(this._data.h*i),a=Math.ceil(this._data.w*i);if(e.save(),e.lineCap="butt",this._data.vertLinesVisible){e.strokeStyle=this._data.vertLinesColor,Object(n.setLineStyle)(e,this._data.vertLineStyle),e.beginPath();for(var l=0,c=this._data.timeMarks;l<c.length;l++){var u=c[l],h=Math.round(u.coord*i);Object(r.drawVerticalLine)(e,h,0,s)}e.stroke()}if(this._data.horzLinesVisible){e.strokeStyle=this._data.horzLinesColor,Object(n.setLineStyle)(e,this._data.horzLineStyle),e.beginPath();for(var d=0,p=this._data.priceMarks;d<p.length;d++){var _=p[d],f=Math.round(_.coord*i);Object(r.drawHorizontalLine)(e,f,0,a)}e.stroke()}e.restore()}},e.prototype.hitTest=function(e){return null},e}()},PF2b:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererTriangleApexUp",(function(){return a})),i.d(t,"PaneRendererTriangleApexDown",(function(){return l}));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._calcBoundingBox=function(t){var i=t.width,n=t.height,r=i/2,s=Math.round(n/3),a=t.x,l=t.vertOffset-2*s,c=t.y+l,u=a-r,h=a+r,d=c,p=c+n,_=new o.Point(u,d),f=new o.Point(h,p),m=Object(o.box)(_,f),v=e.prototype._calcBoundingBox.call(this,t);return v&&(m=this._unionBox(m,v)),m},t}(r.a),a=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=Math.round(r/3),s=i.vertOffset-2*o,a=t.pixelRatio,l=this._lineWidth(t)%2?.5:0,c=Math.max(1,Math.floor(a)),u=c%2?.5:0,h=Math.round(n*a);h%2!=c%2&&(h+=1);var d=Math.round(i.x*a)+u,p=Math.round((i.y+s)*a),_=d+h/2,f=Math.round((i.y+s+r)*a)+l,m=d-h/2;e.moveTo(d,p),e.lineTo(_,f),e.lineTo(m,f),e.lineTo(d,p)},t}(s),l=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=Math.round(r/3),s=i.vertOffset-o,a=t.pixelRatio,l=this._lineWidth(t)%2?.5:0,c=Math.max(1,Math.floor(a)),u=c%2?.5:0,h=Math.round(n*a);h%2!=c%2&&(h+=1);var d=Math.round(i.x*a)+u,p=Math.round((i.y+s)*a)+l,_=d+h/2,f=Math.round((i.y+s+r)*a),m=d-h/2;e.moveTo(m,p),e.lineTo(_,p),e.lineTo(d,f),e.lineTo(m,p)},t}(s)},PL0c:function(e,t,i){"use strict";(function(e){var n=i("aO4+").Point,r=i("2kV1").StudyStatusView,o=i("it7y").StudyDataWindowView,s=i("Qq0B").NonSeriesStudy,a=i("UHyS").StandardPivotPointsPriceAxisView,l=i("KtbP").PanePriceAxisView,c=i("VdBB").HitTestResult,u=i("Zy3/").CompositeRenderer,h=i("c44N").areEqualPaneRenderParams,d=i("2EnG").StandardPivotPointsImageCache,p=i("OwDf").PivotPointsStandardLastPricesView,_=i("Fdrt").PaneRendererStandardPivotLabel,f=i("l4sv").HorizontalLineRenderer;function m(e,t){this._model=e,this._source=t,this._pivots=[],this._textCache={}}function v(e,t,i,n){s.call(this,e,t,i,n);for(var r=["P","S1/R1","S2/R2","S3/R3","S4/R4","S5/R5"],o=this.properties().levelsStyle.visibility,a=0;a<r.length;a++)o[r[a]].listeners().subscribe(this,TradingView.Study.prototype.processHibernate);this._cacheDrawParams=null,this._cache=null}m.prototype.setCache=function(e){this._cache=e},m.prototype.priceAxisViews=function(e,t){return this._priceAxisViews},m.prototype.mergeLabel=function(e,t,i){var n=""+t;void 0===e[n]?(e[n]={},e[n].text=i,e[n].ids=[this.complete(i)]):(e[n].text+="/"+i,e[n].ids.push(this.complete(i)))},m.prototype.complete=function(e){return"P"===e?e:"S"+e[1]+"/R"+e[1]},m.prototype.update=function(){this._invalidated=!0},m.prototype._updateImpl=function(){if(this._source.pricesView().prices(),this._pivots=[],this._source.customData()&&this._source.customData().pivots&&this._source.properties().visible.value()){var e=this._source.customData().pivots,t=this._source._indexes,i=this._model.timeScale(),n=this._source.priceScale();if(n&&!n.isEmpty()&&!i.isEmpty()&&e){var r=i.visibleBarsStrictRange(),o=r.firstBar(),s=r.lastBar();if(this._source.ownerSource())for(var a=this._source.ownerSource().firstValue(),l=0;l<e.length;l++)if(e[l]){var c=t[e[l].startIndex],u=t[e[l].endIndex];if(!(u<o||c>s)){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;o<this._pivots.length;o++){var s=this._pivots[o];if(r.has(s.src)){var a={width:this._model.timeScale().width(),height:this._source.priceScale().height(),color:t[s.labelIds[0]].value(),linewidth:i[s.labelIds[0]].value(),linestyle:CanvasEx.LINESTYLE_SOLID,y:s.y,left:s.x1,right:s.x2},l=new f;if(l.setData(a),l.setHitTest(new c(c.REGULAR)),e.append(l),this._source.properties().levelsStyle.showLabels.value()){var h=function(e){return this._source.getCache(e)}.bind(this);e.append(new _(h,new n(s.x1,s.y),s.label))}}}return e},inherit(v,s),v.prototype.indexes=function(){return this._indexes},v.prototype.getCache=function(e){return this.createCacheIfRequred(e),this._cache},v.prototype.createCacheIfRequred=function(e){if(null===this._cache||null==this._cacheDrawParams||!h(e,this._cacheDrawParams)){this._cache&&this._cache.destroy();var t=this._getActualCacheParams();this._cache=new d(e,t.font,t.fontSize,t.backColors),this._cache.setPrices(this._pricesView.prices()),this._cacheDrawParams=e,this._cacheInvalidated=!1,this._cache.reset(t),this._cache.setPrices(this._pricesView.prices())}},v.prototype.lastValueData=function(e,t,i){var n=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"].indexOf(e.toUpperCase()),r=this._pricesView.prices()[n];return null!=r?r:{noData:!0}},v.prototype.lastPriceLabelFixedCoordinate=function(e){var t=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"].indexOf(e.toUpperCase());return this._priceAxisViews[t]._fixedCoordinate},v.prototype.priceLabelText=function(e){return this._metaInfo.shortDescription+":"+e.toUpperCase()},v.prototype.pricesView=function(){return this._pricesView},v.prototype._getActualCacheParams=function(){var e={};return e.font=this.properties().font.value(),e.fontSize=this.properties().fontsize.value(),e.backColors=[this.properties().levelsStyle.colors.P.value(),this.properties().levelsStyle.colors["S1/R1"].value(),this.properties().levelsStyle.colors["S1/R1"].value(),this.properties().levelsStyle.colors["S2/R2"].value(),this.properties().levelsStyle.colors["S2/R2"].value(),this.properties().levelsStyle.colors["S3/R3"].value(),this.properties().levelsStyle.colors["S3/R3"].value(),this.properties().levelsStyle.colors["S4/R4"].value(),this.properties().levelsStyle.colors["S4/R4"].value(),this.properties().levelsStyle.colors["S5/R5"].value(),this.properties().levelsStyle.colors["S5/R5"].value()],e},v.prototype.updateAllViews=function(){s.prototype.updateAllViews.call(this),this._pricesView.update()},
v.prototype.createViews=function(){this._cache&&(this._cache.destroy(),this._cache=null),this._priceAxisViews=[];var e=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"];this._paneViews.length=0,this._labelPaneViews=[];var t=new m(this._model,this);t.setCache(this._cache),this._paneViews.push(t),this._mainPaneView=t;for(var i=0;i<e.length;i++){var n=new a(this,{name:e[i],cache:this._cache});this._priceAxisViews.push(n),this._labelPaneViews.push(new l(n,this,this._model))}this._dataWindowView||(this._dataWindowView=new o(this,this._model)),this._statusView||(this._statusView=new r(this,this._model.properties().scalesProperties.textColor)),this._legendView=null,this._pricesView=new p(this)},v.prototype.visiblePivots=function(){return this._pricesView.visiblePivots()},v.prototype._postProcessGraphics=function(){},v.prototype.isVisible=function(){if(!this.properties().visible.value())return!1;for(var e=["P","S1/R1","S2/R2","S3/R3","S4/R4","S5/R5"],t=this.properties().levelsStyle.visibility,i=0;i<e.length;i++)if(t[e[i]].value())return!0;return!1},v.prototype.stop=function(){TradingView.Study.prototype.stop.call(this),this._cache&&(this._cache.destroy(),this._cache=null)},v.prototype.priceRange=function(t,i){if(!this.customData()||!this.customData().pivots||!this._indexes)return null;if(!this.priceScale())return null;for(var n=this.customData().pivots,r=this._indexes,o=null,s=0;s<n.length;s++)if(n[s]){var a=r[n[s].startIndex];if(!(r[n[s].endIndex]<t||a>i)){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;u<l.length;u++)l[u]&&(null===o?o=new e(l[u],l[u]):o.apply(l[u],l[u]))}}return this.priceScale().isLog()&&o?new e(this.priceScale().priceToLogical(o.minValue()),this.priceScale().priceToLogical(o.maxValue())):o},t.study_PivotPointsStandard=v}).call(this,i("Qb4w").PriceRange)},PT1i:function(e,t,i){"use strict";i.r(t),i.d(t,"Linking",(function(){return u})),i.d(t,"linking",(function(){return h}));var n,r=i("hY0g"),o=i.n(r),s=i("Kxc7"),a=i("JOqt"),l=i("txPx"),c=Object(l.getLogger)("Linking");!function(e){e[e.NotBound=0]="NotBound",e[e.BoundToWidget=1]="BoundToWidget",e[e.BoundToModel=2]="BoundToModel"}(n||(n={}));var u=function(){function e(){this._watchedSymbol=new o.a,this._seriesShortSymbol=new o.a,this._proSymbol=new o.a,this._watchedInterval=new o.a,this._watchedIntraday=new o.a,this._watchedSupportedResolutions=new o.a,this._symbolNamesList=new o.a,this._chartWidgetBindingState=n.NotBound,this._activeChartWidget=null,this._watchedSymbolListenerBound=this._watchedSymbolListener.bind(this),this._watchedIntervalListenerBound=this._watchedIntervalListener.bind(this),this._onSymbolLinkBound=this._onSymbolLink.bind(this),this._searchCharts=null,this._searchChartsLoadDebounced=null,this._selfEmit=!1,this._preventFeedBySymbol=!1,this._feedBySymbolDebounceCounter=0}
return Object.defineProperty(e.prototype,"symbol",{get:function(){return this._watchedSymbol},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"proSymbol",{get:function(){return this._proSymbol},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"symbolNamesList",{get:function(){return this._symbolNamesList},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seriesShortSymbol",{get:function(){return this._seriesShortSymbol.readonly()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"interval",{get:function(){return this._watchedInterval},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"intraday",{get:function(){return this._watchedIntraday.readonly()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"supportedResolutions",{get:function(){return this._watchedSupportedResolutions.readonly()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"preventFeedBySymbol",{get:function(){return this._preventFeedBySymbol},enumerable:!1,configurable:!0}),e.prototype.bindToChartWidget=function(e){this.unbindFromChartWidget(),this._activeChartWidget=e;var t=e.model();if(t)this._onChartModelCreated(t);else{e.modelCreated().subscribe(this,this._onChartModelCreated),this._chartWidgetBindingState=n.BoundToWidget;var i=e.properties().childs().mainSeriesProperties.childs();this._watchedSymbol.setValue(i.symbol.value()),this._watchedInterval.setValue(i.interval.value())}},e.prototype.unbindFromChartWidget=function(){switch(this._chartWidgetBindingState){case n.BoundToWidget:if(!this._activeChartWidget)throw new Error("ChartWidget is undefined");this._activeChartWidget.modelCreated().unsubscribe(this,this._onChartModelCreated);break;case n.BoundToModel:this._symbolProperty().unsubscribe(this,this._onSymbolPropertyChange),this._watchedSymbol.unsubscribe(this._watchedSymbolListenerBound),this._mainSeries().dataEvents().symbolResolved().unsubscribe(this,this._updateSeriesSymbolInfo),this._mainSeries().dataEvents().symbolError().unsubscribe(this,this._updateSeriesSymbolInfo),this._intervalProperty().unsubscribe(this,this._onIntervalPropertyChange),this._watchedInterval.unsubscribe(this._watchedIntervalListenerBound),delete this._watchedSymbol.hook,delete this._watchedSymbol.writeLock}this._activeChartWidget=null,this._chartWidgetBindingState=n.NotBound},e.prototype.getChartWidget=function(){return this._activeChartWidget},e.prototype.bindToChartWidgetCollection=function(e){var t=this;this._chartWidgetCollection=e,this.unbindFromChartWidget(),e.activeChartWidget.subscribe((function(e){t.unbindFromChartWidget(),t.bindToChartWidget(e)}),{callWithLast:!0})},e.prototype.bindToSearchCharts=function(e){var t=this;this.unbindFromSearchCharts(),this._searchCharts=e,e.onSearchBySymbol.subscribe(this,this._onSearchBySymbol),e.loadingSymbol.subscribe((function(e){!1===e&&(t._feedBySymbolDebounceCounter=0)})),this._watchedSymbol.subscribe(this._onSymbolLinkBound)},e.prototype.unbindFromSearchCharts=function(){
this._searchCharts&&(this._searchCharts.onSearchBySymbol.unsubscribe(this,this._onSearchBySymbol),this._watchedSymbol.unsubscribe(this._onSymbolLinkBound),this._searchCharts=null)},e.prototype.setPreventFeedBySymbol=function(e){this._preventFeedBySymbol=e},e.prototype._onSearchBySymbol=function(e){if(!e.resolved_symbol)throw new Error("no resolved_symbol");this._selfEmit=!0,this._watchedSymbol.setValue(e.resolved_symbol),this._selfEmit=!1},e.prototype._onSymbolLink=function(e){if(!this._selfEmit){if(!this._searchCharts){var t="No search charts defined";throw c.logError(t),new Error(t)}this._preventFeedBySymbol||this._loadSearchCharts(e)}},e.prototype._loadSearchCharts=function(e){var t=this;if(!this._searchCharts){var i="No search charts defined";throw c.logError(i),new Error(i)}if(this._searchChartsLoadDebounced)this._feedBySymbolDebounceCounter<100&&(this._feedBySymbolDebounceCounter++,this._searchChartsLoadDebounced(e));else{var n=function(e){return t._searchCharts?(!0===t._searchCharts.loadingSymbol.value()?t._feedBySymbolDebounceCounter<100&&(t._feedBySymbolDebounceCounter++,t._searchChartsLoadDebounced=Object(a.debounce)(n,2e3),t._searchChartsLoadDebounced(e)):t._searchChartsLoadDebounced=null,t._searchCharts.feedBySymbol.call(t._searchCharts,e)):function(){}};!0===this._searchCharts.loadingSymbol.value()?this._feedBySymbolDebounceCounter<100&&(this._feedBySymbolDebounceCounter++,this._searchChartsLoadDebounced=Object(a.debounce)(n,2e3),this._searchChartsLoadDebounced(e)):this._searchCharts.feedBySymbol(e)}},e.prototype._mainSeries=function(){if(!this._activeChartWidget)throw new Error("ChartWidget is undefined");return this._activeChartWidget.model().mainSeries()},e.prototype._properties=function(){return this._mainSeries().properties()},e.prototype._symbolProperty=function(){return this._properties().symbol},e.prototype._intervalProperty=function(){return this._properties().interval},e.prototype._watchedSymbolListener=function(e){this._symbolProperty().value()!==e&&this._chartWidgetCollection.setSymbol(e)},e.prototype._sendSnowplowAnalytics=function(){if(!window.user.do_not_track)throw new Error("unsupported")},e.prototype._onSymbolPropertyChange=function(){var e=this._symbolProperty().value()!==this._watchedSymbol.value();this._watchedSymbol.setValue(this._symbolProperty().value()),e&&this._chartWidgetCollection.setSymbol(this._symbolProperty().value())},e.prototype._onSymbolResolved=function(e){var t=this._mainSeries().symbolInfo();t&&this._applyValuesFromSymbolInfo(t)},e.prototype._applyValuesFromSymbolInfo=function(e){var t=e.pro_name||s.enabled("trading_terminal")&&(e.full_name||e.name)||"";this._proSymbol.setValue(t),e.aliases&&this._symbolNamesList.setValue(e.aliases)},e.prototype._updateSeriesSymbolInfo=function(){this._seriesShortSymbol.setValue(this._properties().shortName.value());var e=this._mainSeries().symbolInfo();e?(this._applyValuesFromSymbolInfo(e),
e.hasOwnProperty("supported_resolutions")?this._watchedSupportedResolutions.setValue(e.supported_resolutions):this._watchedSupportedResolutions.setValue(void 0),this._watchedIntraday.setValue(!!e.has_intraday)):(this._watchedIntraday.deleteValue(),this._proSymbol.deleteValue())},e.prototype._watchedIntervalListener=function(e){this._intervalProperty().value()!==e&&this._chartWidgetCollection.setResolution(e)},e.prototype._onIntervalPropertyChange=function(){var e=this._intervalProperty().value()!==this._watchedInterval.value();this._watchedInterval.setValue(this._intervalProperty().value()),e&&this._chartWidgetCollection.setResolution(this._intervalProperty().value())},e.prototype._onChartModelCreated=function(e){if(!this._activeChartWidget)throw new Error("ChartWidget is undefined");this._chartWidgetBindingState=n.BoundToModel,this._activeChartWidget.modelCreated().unsubscribe(this,this._onChartModelCreated);var t=this._symbolProperty();t.subscribe(this,this._onSymbolPropertyChange),this._watchedSymbol.setValue(t.value()),this._watchedSymbol.subscribe(this._watchedSymbolListenerBound);var i=this._mainSeries();i.dataEvents().symbolResolved().subscribe(this,this._onSymbolResolved),this._watchedSymbol.hook=function(e){return i.symbolSameAsCurrent(e)&&(e=i.symbol()),e},i.dataEvents().symbolResolved().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().symbolError().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().symbolNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().symbolGroupNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().extendedHoursNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),this._updateSeriesSymbolInfo();var r=this._intervalProperty();r.subscribe(this,this._onIntervalPropertyChange),this._watchedInterval.setValue(r.value()),this._watchedInterval.subscribe(this._watchedIntervalListenerBound),this._activeChartWidget.readOnly()&&(this._watchedSymbol.writeLock=!0)},e}();window.TradingView=window.TradingView||{};var h=new u;window.TradingView.Linking=h},PYn8:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Three Drives Pattern");function s(e,t){this._constructor="LineToolThreeDrivers";var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("S6aM").LineToolThreeDrivesPaneView;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"Three Drives 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("linetoolthreedrivers",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolThreeDrivers=s},
PgQx:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd"><path stroke="currentColor" d="M7.5 8.5h12v12a3 3 0 0 1-3 3h-6a3 3 0 0 1-3-3v-12z"/><path fill="currentColor" d="M17 6l-1-1h-5l-1 1H7v1h13V6z"/><path stroke="currentColor" stroke-linecap="square" d="M10.5 11.5v8m3-8v8m3-8v8"/></g></svg>'},PoSe:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,i){var n,r,o,s=null,a=0;i=i||{};var l=function(){a=!1===i.leading?0:Date.now(),s=null,o=e.apply(n,r),s||(n=r=null)};return function(){var c=Date.now();a||!1!==i.leading||(a=c);var u=t-(c-a);return n=this,r=arguments,u<=0||u>t?(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;c<e.length;c++){var u=e[c];l.push(a(s[c],u.price,u.channel))}return l},k.prototype.createMultipointShape=function(e,t,i){var n=t.disableUndo?this._chartWidget.model().model():this._chartWidget.model(),r=this._chartWidget.model().model(),o=r.mainSeries();if(!r.timeScale().isEmpty()){var s=r.dataSourceForId(t.ownerStudyId)||o,a=r.paneForSource(s),l=this._convertUserPointsToDataSource(e),c=y[t.shape]||y.flag;if(c.onlySelectable)throw new Error('Cannot create "'+t.shape+'" shape');if("LineToolPolyline"===c.name||"LineToolPath"===c.name||"LineToolGhostFeed"===c.name)l[0].price===l[l.length-1].price&&l[0].index===l[l.length-1].index||l.push(l[0]);else if("LineToolIcon"===c.name){if(t.icon=t.icon||t.overrides&&t.overrides.icon,!t.hasOwnProperty("icon"))throw new Error("icon must be specified in options");t.overrides=t.overrides||{},t.overrides.icon=t.icon}var h=P(c.name);if(h.currencyId.setValue(s.symbolSource().currency()),t.overrides)for(var d in t.overrides)h[d]?h[d].setValue(t.overrides[d]):u(c.name)&&-1!==["profitLevel","stopLevel"].indexOf(d)&&h.addProperty(d,t.overrides[d]);void 0!==h.text&&t.text&&h.text.setValue(t.text);var p=n.createLineTool(a,l[0],c.name,h,void 0,s);if(u(c.name)){if(l.length>2)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;m<l.length&&this._chartWidget.model().lineBeingCreated();m++)n.continueCreatingLine(l[m],null,m<l.length-1||f);f&&(n.finishLineTool(p),n.continueCreatingLine(l[l.length-1],null,!1))}if(t.lock&&p.setUserEditEnabled(!1),t.disableSelection&&(p.customization.disableSelection=!0),t.disableSave&&(p.customization.disableSave=!0),t.hasOwnProperty("showInObjectsTree")&&(p.customization.showInObjectsTree=t.showInObjectsTree),t.zOrder){var v=this._chartWidget.model().availableZOrderOperations([p]);"top"===t.zOrder&&v.bringToFrontEnabled?n.bringToFront([p]):"bottom"===t.zOrder&&v.sendToBackEnabled&&n.sendToBack([p])}return p.id()}},k.prototype.getShapeById=function(e){var t=this._chartWidget.model().model().getLineToolById(e);if(null===t)throw new Error("There is no such shape");return this._getLineDataSourceApi(t)},k.prototype.createStudy=function(e,t,i,n,r,l){if("function"==typeof r)return console.warn('"createStudy" does not take "callback" parameter anymore'),Promise.resolve(null);if((l=l||{}).checkLimit&&!this._chartWidget.model().canCreateStudy())return g(),Promise.resolve(null);e=e.toLowerCase();var c=l.disableUndo?this._chartWidget.model().model():this._chartWidget.model(),u=a.findStudyMetaInfoByDescription(c.studiesMetaData(),e).id,h=c.createStudyInserter({type:"java",studyId:u});return h.setForceOverlay(t),l.priceScale&&h.setPreferredPriceScale(function(e){switch(e){case"no-scale":return"overlay";case"as-series":return"as-series";case"new-left":return"left";case"new-right":return"right";default:throw new Error('The pricescale "'+e+'" is invalid, the only valid options are "no-scale", "as-series", "new-left" and "new-right".')}}(l.priceScale)),l.allowChangeCurrency&&h.setAllowChangeCurrency(l.allowChangeCurrency),n&&(n=o.getStudyRecordFromArray([e].concat(n),this._chartWidget).inputs),h.insert((function(){return Promise.resolve(n||{})})).then((function(e){return r&&s(e,r),i&&e.setUserEditEnabled(!1),e.id()}))},k.prototype.getStudyById=function(e){var t=this._chartWidget.model().model().getStudyById(e);if(null===t)throw new Error("There is no such study");return this._getStudyApi(t)},k.prototype.getSeries=function(){var e=this._chartWidget.model().model(),t=e.mainSeries();return new d(t,e)},k.prototype.chartType=function(){return this._chartWidget.model().mainSeries().properties().style.value()},k.prototype.setChartType=function(e){this._chartWidget.model().mainSeries().properties().style.setValue(e)},k.prototype.priceFormatter=function(){return this._chartWidget.model().mainSeries().priceScale().formatter()},k.prototype.onDataLoaded=function(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().dataEvents().completed())},k.prototype.onSymbolChanged=function(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().dataEvents().symbolResolved())},k.prototype.onIntervalChanged=function(){
return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().onIntervalChanged())},k.prototype.onVisibleRangeChanged=function(){return this._makeSubscriptionFromDelegate(this._visibleBarsChanged)},k.prototype.dataReady=function(e){var t=!this._chartWidget.model()||!this._chartWidget.model().mainSeries()||this._chartWidget.model().mainSeries().data().isEmpty();return e&&(t?this.onDataLoaded().subscribe(null,e,!0):e()),!t},k.prototype.crossHairMoved=function(e){this._makeSubscriptionFromDelegate(this._chartWidget.model().chartModel().crossHairMoved()).subscribe(null,e)},k.prototype._onVisibleBarsChanged=function(){var e=this._chartWidget.model().mainSeries(),t=e.data().isEmpty();null!==this._chartWidget.model().timeScale().visibleBarsStrictRange()&&t?e.dataEvents().completed().subscribe(this,this._onVisibleBarsChanged,!0):this._visibleBarsChanged.fire(this.getVisibleRange())},k.prototype._destroy=function(){var e=this._chartWidget.model();null!==e&&e.timeScale().visibleBarsStrictRangeChanged().unsubscribe(this,this._onVisibleBarsChanged)},k.prototype.setTimezone=function(e){this._chartWidget.setTimezone(e)},k.prototype.getTimezone=function(){return this._chartWidget.getTimezone()},k.prototype.getPanes=function(){return this._chartWidget.model().chartModel().panes().map((function(e){return this._getPaneApi(e)}),this)},k.prototype.canZoomOut=function(){return!this._chartWidget.model().zoomStack().isEmpty()},k.prototype.zoomOut=function(){this.canZoomOut()&&this._chartWidget.model().zoomFromViewport()},k.prototype.sessions=function(){return this._chartWidget.model().model().sessions()},k.prototype.shapesGroupController=function(){return new I(this._chartWidget.model().lineToolsGroupController(),this._chartWidget.model())},k.prototype.mergeAllScales=function(e){this._chartWidget.model().mergeAllScales(e)},k.prototype.isSelectBarRequested=function(){return this._chartWidget.selectBarMode().value()},k.prototype.requestSelectBar=function(){if(this.isSelectBarRequested())return Promise.reject("already requested");var e=this;return new Promise((function(t,i){e._chartWidget.onBarSelected().subscribe(e,(function(i){m.isDWM(e._chartWidget.model().mainSeries().interval())&&(i=E(i,this._getSession())),t(i)}),!0),e._chartWidget.toggleSelectBarMode(),e._chartWidget.selectBarMode().subscribe((function(){setTimeout((function(){e._chartWidget.onBarSelected().unsubscribeAll(e),i("cancelled")}))}),{once:!0})}))},k.prototype.cancelSelectBar=function(){this.isSelectBarRequested()&&this._chartWidget.toggleSelectBarMode()},e.exports=k}).call(this,i("aIyQ"),i("jCNj"))},QCyK:function(e,t,i){"use strict";i.r(t),i.d(t,"spreadStudyItem",(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:"Spread",metainfo:{_metainfoVersion:15,defaults:r.b,plots:r.d,styles:r.e,description:"Spread",shortDescription:"Spread",is_price_study:!1,inputs:r.c,
id:"Spread@tv-basicstudies-1"},constructor:o}},QIuV:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("ivNn").fixComputationError;function o(e,t){this.customization={forcePriceAxisLabel:!0,disableSelection:!0,disableErasing:!0},n.call(this,e,t)}inherit(o,n),o.prototype.isSynchronizable=function(){return!1},o.POINTS_COUNT=1,o.prototype.pointsCount=function(){return o.POINTS_COUNT},o.prototype.hasContextMenu=function(){return!1},o.prototype.state=function(){return null},o.prototype.startMoving=function(){n.prototype.startMoving.apply(this,arguments),this._cursorMoved=!1},o.prototype.endMoving=function(){n.prototype.endMoving.apply(this,arguments),this._cursorMoved=!1},o.prototype.correctPoints=function(e){this._currentMovingPoint&&this._startMovingPoint?this._currentMovingPoint.price-this._startMovingPoint.price&&(this._cursorMoved=!0):this._cursorMoved=!1;for(var t=1/this.priceScale().mainSource().base(),i=0;i<e.length;i++){var n=e[i];this._cursorMoved&&(n.price=this._currentMovingPoint.price),n.price=r(t*Math.round(n.price/t)),e[i]=n}},o.prototype.userEditEnabled=function(){return!0},o.prototype.movable=function(){return!1},o.prototype.canBeHidden=function(){return!1},o.prototype.isUserDeletable=function(){return!1},o.prototype.showInObjectTree=function(){return!1},o.prototype.doesMovingAffectsUndo=function(){return!1},o.prototype.isAvailableInFloatingWidget=function(){return!1},o.prototype.timeAxisViews=function(){return null},o.prototype.cloneable=function(){return!1},o.prototype.copiable=function(){return!1},o._configureProperties=function(e){n._configureProperties(e)},e.exports=o},QQu0:function(e,t,i){"use strict";var n=i("WPQD").LineToolTrendLine,r=i("Ocx9").DefaultProperty,o=window.t("Arrow");function s(e,t){var i=t||s.createProperties();n.call(this,e,i)}inherit(s,n),s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Arrow"},s.createProperties=function(e){var t=new r("linetoolarrow",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolArrow=s},QTwd:function(e,t,i){"use strict";i.r(t),i.d(t,"RestoreDefaultsPreferencesUndoCommand",(function(){return u}));var n=i("mrSG"),r=i("Eyy1"),o=i("RDU5"),s=i("ApcL"),a=i("ZZnO"),l=i("x2L+"),c=i("N22A"),u=function(e){function t(t){var i=e.call(this,"Apply All Chart Properties")||this;i._trading=null,i._oldShowSellBuyButtons=null,i._oldNoConfirmEnabled=null,i._oldShowOnlyRejectionNotifications=null,i._oldShowPricesWithZeroVolume=null,i._oldShowPricesWithSpread=null,i._oldOrderExecutedSoundEnabled=null,i._prevWatermarkPreferences=null,i._model=t,i._trading=Object(c.a)(),null!==i._trading&&(i._oldShowSellBuyButtons=i._trading.showSellBuyButtons.value(),i._oldNoConfirmEnabled=i._trading.noConfirmEnabled.value(),i._oldShowOnlyRejectionNotifications=i._trading.showOnlyRejectionNotifications.value(),i._oldShowPricesWithZeroVolume=i._trading.showPricesWith().zeroVolume.value(),i._oldShowPricesWithSpread=i._trading.showPricesWith().spread.value(),
i._oldOrderExecutedSoundEnabled=i._trading.orderExecutedSoundParams.enabled.value()),i._defaultsPreferences=Object(s.defaultsPreferencesByWhiteList)(i._model,i._model.mainSeries()),i._oldPreferences=t.preferences(),i._prevDateFormat=a.dateFormatProperty.value(),i._prevShowOpenMarkerStatus=l.b.value();var n=i._model.watermarkSource();return null!==n&&(i._prevWatermarkPreferences=n.properties().state()),i}return Object(n.__extends)(t,e),t.prototype.redo=function(){null!==this._trading&&(this._trading.showSellBuyButtons.setValue(!0),this._trading.noConfirmEnabled.setValue(!1),this._trading.showOnlyRejectionNotifications.setValue(!1),this._trading.showPricesWith().zeroVolume.setValue(!0),this._trading.showPricesWith().spread.setValue(!0),this._trading.orderExecutedSoundParams.enabled.setValue(!1)),this._model.applyPreferences(this._defaultsPreferences),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),Object(a.removeSettingsValue)(),Object(l.a)();var e=this._model.watermarkSource();null!==e&&e.restorePropertiesDefaults()},t.prototype.undo=function(){null!==this._trading&&(this._trading.showSellBuyButtons.setValue(Object(r.ensureNotNull)(this._oldShowSellBuyButtons)),this._trading.noConfirmEnabled.setValue(Object(r.ensureNotNull)(this._oldNoConfirmEnabled)),this._trading.showOnlyRejectionNotifications.setValue(Object(r.ensureNotNull)(this._oldShowOnlyRejectionNotifications)),this._trading.showPricesWith().zeroVolume.setValue(Object(r.ensureNotNull)(this._oldShowPricesWithZeroVolume)),this._trading.showPricesWith().spread.setValue(Object(r.ensureNotNull)(this._oldShowPricesWithSpread)),this._trading.orderExecutedSoundParams.enabled.setValue(Object(r.ensureNotNull)(this._oldOrderExecutedSoundEnabled))),this._model.applyPreferences(this._oldPreferences),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),a.dateFormatProperty.setValue(this._prevDateFormat),l.b.setValue(this._prevShowOpenMarkerStatus);var e=this._model.watermarkSource();null!==e&&null!==this._prevWatermarkPreferences&&e.properties().mergeAndFire(this._prevWatermarkPreferences)},t}(o.UndoCommand)},Qb4w:function(e,t,i){"use strict";i.r(t),i.d(t,"PriceRange",(function(){return s}));var n=i("ogJP"),r=i("txPx"),o=Object(r.getLogger)("Chart.PriceRange"),s=function(){function e(e,t){if(null!==e&&"object"==typeof e){var i=e;this._minValue=i.m_minValue,this._maxValue=i.m_maxValue}else{var n=e;this._minValue=n,void 0!==t&&(this._maxValue=t)}}return e.prototype.equals=function(e){return this._minValue===e._minValue&&this._maxValue===e._maxValue},e.prototype.clone=function(){return new e(this._minValue,this._maxValue)},e.prototype.minValue=function(){return this._minValue},e.prototype.setMinValue=function(e){this._minValue=e},e.prototype.maxValue=function(){return this._maxValue},e.prototype.setMaxValue=function(e){this._maxValue=e},e.prototype.length=function(){return this._maxValue-this._minValue},e.prototype.isEmpty=function(){
return this._maxValue===this._minValue||this._maxValue!=this._maxValue||this._minValue!=this._minValue},e.prototype.serialize=function(){return{m_maxValue:this._maxValue,m_minValue:this._minValue}},e.prototype.state=function(){return{max:this._maxValue,min:this._minValue}},e.prototype.merge=function(t){return new e(Math.min(this.minValue(),t.minValue()),Math.max(this.maxValue(),t.maxValue()))},e.prototype.apply=function(e,t){this._minValue=Math.min(this._minValue,e),this._maxValue=Math.max(this._maxValue,t)},e.prototype.set=function(e,t){this._minValue=e,this._maxValue=t},e.prototype.scaleAroundCenter=function(e){if(Object(n.isNumber)(e)){if(0!==this._maxValue-this._minValue){var t=.5*(this._maxValue+this._minValue),i=this._maxValue-t,r=this._minValue-t;i*=e,r*=e,this._maxValue=t+i,this._minValue=t+r}}else o.logDebug("PriceRange.scaleAroundCenter: invalid coeff")},e.prototype.shift=function(e){Object(n.isNumber)(e)?(this._maxValue+=e,this._minValue+=e):o.logDebug("PriceRange.shift: invalid coeff")},e.prototype.containsStrictly=function(e){return e.minValue()>this._minValue&&e.maxValue()<this._maxValue},e}()},QfUd:function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i("mrSG"),r=i("hY0g"),o=i.n(r),s=i("ogJP");function a(e,t){return Object(s.deepEquals)(e,t)[0]}var l=function(e){function t(t,i){void 0===i&&(i=a);var n=e.call(this,t)||this;return n._comparator=i,n}return Object(n.__extends)(t,e),t.prototype.setValue=function(t,i){!1===this._comparator(this.value(),t)&&e.prototype.setValue.call(this,t,i)},t}(o.a)},QloM:function(e,t,i){"use strict";var n,r,o;i.r(t),i.d(t,"TabPriority",(function(){return n})),i.d(t,"TabNames",(function(){return r})),i.d(t,"TabOpenFrom",(function(){return o})),function(e){e[e.Coordinates=100]="Coordinates",e[e.Display=100]="Display",e[e.Style=200]="Style",e[e.Inputs=300]="Inputs",e[e.Properties=250]="Properties"}(n||(n={})),function(e){e.background="Background",e.coordinates="Coordinates",e.drawings="Drawings",e.events="Events",e.eventsAndAlerts="Events & Alerts",e.inputs="Inputs",e.properties="Properties",e.scales="Scales",e.legend="Legend",e.sourceCode="Source Code",e.style="Style",e.timezoneSessions="Timezone/Sessions",e.trading="Trading",e.visibility="Visibility",e.text="Text"}(r||(r={})),function(e){e[e.Default=100]="Default",e[e.UserSave=200]="UserSave",e[e.Override=300]="Override"}(o||(o={}))},Qq0B:function(e,t,i){"use strict";i.r(t),i.d(t,"NonSeriesStudy",(function(){return s}));var n=i("mrSG"),r=i("Eyy1"),o=i("GVHu"),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.clearData=function(){this._customData=null,this._indexes=null},t.prototype.restoreData=function(e,t,i){o.Study.prototype.restoreData.call(this,e),this._customData=t,this._indexes=i},t.prototype.state=function(t){var i=e.prototype.state.call(this,t);return t&&(i.nonSeriesData=this._customData,i.indexes=this._indexes),i},t.prototype.customData=function(){return this._customData},t.prototype._setPaneViews=function(e){this._paneViews=e,
this.model().lightUpdate()},t.prototype._onDataUpdated=function(t,i,n){null!==i&&(i.indexes_replace?(Object(r.assert)("nochange"!==n),this._indexes=n):(this._customData=i.data,"nochange"!==n&&(this._indexes=n))),e.prototype._onDataUpdated.call(this,t,i,n)},t}(o.Study)},QrSB:function(e,t,i){"use strict";function n(e,t){var i=e.dataSourceForId(t);if(null===i)throw new Error('Chart has no study or shape with id "'+t+'"');return i}i.r(t),i.d(t,"SelectionApi",(function(){return r}));var r=function(){function e(e){this._model=e}return e.prototype.add=function(e){var t=this;Array.isArray(e)?this._model.selectionMacro((function(i){e.map(n.bind(null,t._model)).forEach((function(e){return i.addSourceToSelection(e)}))})):this.add([e])},e.prototype.canBeAddedToSelection=function(e){var t=n(this._model,e);return this._model.selection().canBeAddedToSelection(t)},e.prototype.set=function(e){var t=this;Array.isArray(e)?this._model.selectionMacro((function(i){i.clearSelection(),e.map(n.bind(null,t._model)).forEach((function(e){return i.addSourceToSelection(e)}))})):this.set([e])},e.prototype.remove=function(e){var t=this;Array.isArray(e)?this._model.selectionMacro((function(i){e.map(n.bind(null,t._model)).forEach((function(e){return i.removeSourceFromSelection(e)}))})):this.remove([e])},e.prototype.contains=function(e){var t=n(this._model,e);return this._model.selection().isSelected(t)},e.prototype.allSources=function(){return this._model.selection().sources().map((function(e){return e.id()}))},e.prototype.isEmpty=function(){return this._model.selection().isEmpty()},e.prototype.clear=function(){this._model.selectionMacro((function(e){e.clearSelection()}))},e.prototype.onChanged=function(){return this._model.onSelectedSourceChanged()},e}()},Qtjj:function(e,t,i){"use strict";i.r(t),i.d(t,"TimeSynchronizer",(function(){return l}));var n=i("LxhU"),r=i("jCNj"),o=i.n(r),s=i("IiTo"),a=null;var l=function(){function e(e,t){var i,r;this._sourceTargetBarBuilder=null,this._cache=new Map,this._source=e,this._target=t,this._isResolutionTheSame=n.Interval.isEqual(e.getResolution(),t.getResolution()),this._isSessionTheSame=(i=e.getSymbolInfo(),r=t.getSymbolInfo(),i.timezone===r.timezone&&i.session===r.session),this._shouldCorrectTradingDay=n.Interval.isDWM(e.getResolution())&&!this._isSessionTheSame}return e.prototype.sourceTimeToTargetTime=function(e){if(this._isSessionTheSame&&this._isResolutionTheSame)return e;if(!this._source.isValid()||!this._target.isValid())return e;var t=this._cache.get(e);if(void 0===t){var i=1e3*e;if(this._shouldCorrectTradingDay){var n=o.a.utc_to_cal(this._source.getSession().timezone,i);n=this._source.getSession().spec.correctTradingDay(n);var r=new Date(n);o.a.set_hms(r,0,0,0,0,this._source.getSession().timezone),i=r.valueOf()}var s=this._sourceTargetBuilder();s.moveTo(i);var a=s.indexOfBar(i);t=s.startOfBar(Math.max(0,a))/1e3,this._cache.set(e,t)}return t},e.prototype._sourceTargetBuilder=function(){if(null===this._sourceTargetBarBuilder){
var e=this._isSessionTheSame?this._target.getSession():(null===a&&(a=new s.SessionInfo("Etc/UTC","24x7")),a);this._sourceTargetBarBuilder=Object(s.newBarBuilder)(this._target.getResolution(),this._target.getSession(),e)}return this._sourceTargetBarBuilder},e}()},RDDl:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Price 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("VghZ").PriceRangePaneView;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"Price Range"},s.createProperties=function(e){var t=new r("linetoolpricerange",e);return s._configureProperties(t),t},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._configureProperties=function(e){n._configureProperties(e)},t.LineToolPriceRange=s},RDU5:function(e,t,i){"use strict";i.r(t),i.d(t,"UndoCommand",(function(){return n}));var n=function(){function e(e,t){void 0===t&&(t=!0),this._customFlags={},this._text=e,this._executeOnPush=t}return e.prototype.text=function(){return this._text},e.prototype.executeOnPush=function(){return this._executeOnPush},e.prototype.customFlag=function(e){return this._customFlags[e]},e.prototype.setCustomFlag=function(e,t){this._customFlags[e]=t},e.prototype.canMerge=function(e){return!1},e.prototype.merge=function(e){throw new Error("Should be re-implemented in child classes")},e}()},RTYN:function(e,t,i){"use strict";i.r(t),i.d(t,"PositionAveragePriceAxisView",(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._formatPrice=function(e,t){return this._source.formatter().format(e)},t}(i("4TVt").LineToolPriceAxisView)},RXmj:function(e,t,i){"use strict";(function(e){var n=i("FIi8").deepExtend,r=i("ogJP").deepEquals,o=i("zUrt").backend,s=window.t("The publication preview could not be loaded. Please disable your browser extensions and try again.");function a(t){this._chartWidgetCollection=t,this._chartAboutToBeSavedDelegate=new e,this._chartSavedDelegate=new e,this._prevChartState=null,this._chartHasBeenModified=new e,this._chartSizeLimitExceededDelegate=new e}function l(e,t){e.content=JSON.stringify(t)}a.prototype.chartHasBeenModified=function(){return this._chartHasBeenModified},a.prototype.chartSizeLimitExceeded=function(){return this._chartSizeLimitExceededDelegate},a.prototype.chartAboutToBeSaved=function(){return this._chartAboutToBeSavedDelegate},a.prototype.chartSaved=function(){return this._chartSavedDelegate},a.prototype.whenReadyToSave=function(e){var t=this._chartWidgetCollection.activeChartWidget.value().model().mainSeries()
;if(t.symbolInfo()&&!t.hasDelayedSymbolIntervalChange())e();else{var i,n=null;i=function(){t.dataEvents().symbolError().unsubscribe(null,n,!0),e()},n=function(){t.dataEvents().symbolResolved().unsubscribe(null,i,!0)},t.dataEvents().symbolResolved().subscribe(null,i,!0),t.dataEvents().symbolError().subscribe(null,n,!0)}},a.prototype.saveToJSON=function(){var e=this._getCommonSavingInfo(!1);return l(e,this._getChartWidgetCollectionState(!1,!0)),e},a.prototype._fillAsyncInfo=function(e,t){var i=JSON.parse(e.content),r=this._chartWidgetCollection;return(t?r.asyncState():r.activeChartWidget.value().asyncState()).then((function(t){return e.content=JSON.stringify(n(i,t)),e}))},a.prototype._getChartWidgetCollectionState=function(e,t,i,n){return e||(t=!0,n=!1),t?this._chartWidgetCollection.state(!!e,i,n):this._chartWidgetCollection.activeChartWidget.value().state(!!e,i,n)},a.prototype._getCommonSavingInfo=function(e){var t={publish_request_id:Math.random().toString(36).substring(2)},i=this._chartWidgetCollection,n=i.activeChartWidget.value(),r=i.metaInfo,o=n.model().mainSeries(),s=o.properties(),a=o.symbolInfo();if(r.id.value()&&(t.id=r.id.value()),t.name=r.name.value()||"",t.description=r.description.value()||"",t.resolution=o.properties().interval.value(),t.symbol_type=null!==a&&a.type||"",t.exchange=null!==a&&a.exchange||"",t.listed_exchange=null!==a&&a.listed_exchange||"",null!==a&&o.isSpread()){var l=a.legs[0],c=a.base_name[0];c=c.split(":")[1],t.symbol=l,t.short_name=c,t.expression=a.full_name}else t.symbol=null!==a&&a.ticker||s.symbol.value(),t.short_name=s.shortName.value();if(null!==a){for(var u=[],h=0,d=a.legs.length;h<d;h++)u.push({symbol:a.legs[h],pro_symbol:a.base_name[h]});t.legs=JSON.stringify(u)}else t.legs=JSON.stringify([]);return t.is_realtime=e?"0":"1",t},a.prototype.publishChart=function(e){},a.prototype.publishScript=function(e,t,i){var n=this;if(n._scriptPublisher)n._scriptPublisher.openPublication(e,t);else{var r=i.ScriptPublisher,o=i.ScriptsProvider,a=i.CategoriesProvider,l=new o({publish:function(e){return new Promise((function(t,i){var r={closeForm:function(){if(e&&e.scriptPublication&&e.scriptPublication.updateScriptIdPart){var i=e.scriptPublication.updateScriptIdPart;publishedScripts.invalidateCache([i]),window.studyMarket&&window.studyMarket.resetAllPages()}t()},showError:function(e){i(e)}};try{n.onPublish(e,r)}catch(o){i(s)}}))}});n._scriptPublisher=new r({scriptsProvider:l,categoriesProvider:new a}),n._scriptPublisher.openPublication(e,t)}},a.prototype.onPublish=function(e,t){var i=this;if(!i.publishInProgress){var n=t&&t.publishAllLayout,r=i._getCommonSavingInfo(!0);0,l(r,this._getChartWidgetCollectionState(!0,n,!0,!1)),r.image=JSON.stringify(this._chartWidgetCollection.images({onlyActiveChart:!n})),i._fillAsyncInfo(r,t&&t.publishAllLayout).then((function(t){var i=e.scriptPublication,n=!(!i||!i.updateScriptIdPart),r=new Promise((function(e,t){var r;i?(n?(window.addEventListener("beforeunload",o),
r=ScriptLib.publishNext(i.scriptSource,i.updateScriptIdPart)):r=ScriptLib.publishNew(i.scriptSource,i.scriptProtection),r.done((function(t){e(t.publishedstudyscript_id)})).fail(t)):e()}));n?r.then((function(i){var n={publishedstudyscript_id:i,description:e.description,tags:e.tags};$.ajax({url:"/script-update/",type:"post",dataType:"text",data:$.extend({},t,n),complete:s})}),s):r.then((function(i){i&&(e.publishedstudyscript_id=i),$.ajax({url:"/publishchart/",type:"post",dataType:"text",data:$.extend({},t,e),complete:s})}),s)})),i.publishInProgress=!0,t.onWidget||""!==e.name&&""!==e.description&&e.description.length<=7e4&&e.name.length<=64&&($.cookie("publish_request_id",r.publish_request_id,{path:"/"}),i.hWnd=window.open("/loading/","_blank"))}function o(e){return e.returnValue=window.t("Script may be not updated if you leave the page."),e.returnValue}function s(n){window.removeEventListener("beforeunload",o),i.publishInProgress=!1;var r=n.responseText||n;if("ok:"===r.substr(0,3)){var s=!1;if(t.savePrivacySetting){s=!e.is_public;TVSettings.setValue("publishchart.private",s)}var a=r.substr(3),l=JSON.parse(a);i._chartWidgetCollection.metaInfo.id.value()||i._chartWidgetCollection.metaInfo.id.setValue(l.id),t.closeForm&&t.closeForm(),t.onPublishUrl&&t.onPublishUrl(l.publishUrl,l.uuid),i._lastPublishUrl=l.publishUrl,i.hWnd&&(i.hWnd.location=l.publishUrl)}else{(413===n.status||/^[\d\s]*request.+large/i.test(r.trim()))&&(r=window.t("This Chart Layout has a lot of objects and can't be published. Please remove the unused objects (drawings/indicators) through the Object Tree to continue publishing."));var c=r||window.t("Error occurred while publishing");t.showError&&t.showError(c,{html:!0}),t.onPublishError&&t.onPublishError(c),i.hWnd&&(i.hWnd.close(),i.hWnd=null)}}},a.prototype._saveLineToolsToStorage=function(){},a.prototype._saveChart=function(e,t,i,n,r){this._saveLineToolsToStorage();var s=i,a=n;return s=function(e){t.id.value()||(t.id.setValue(e),t.uid.setValue(e)),"function"==typeof i&&i()},o.saveChart(e.name,e.short_name,e.resolution,e,t,s.bind(this),a.bind(this))},a.prototype.saveChartSilently=function(e,t,i){var n=this._getChartWidgetCollectionState(!1),o=this._chartWidgetCollection.metaInfo;if(r(this._prevChartState,n)[0]&&null!=o.id.value())return this._chartSavedDelegate.fire(!0),void(e&&e(o));var s=this._getCommonSavingInfo(!1);l(s,n),(i=i||{}).chartName&&(s.name=i.chartName),s.name&&0!==s.name.length||!i.defaultChartName||(s.name=i.defaultChartName),s.name?(i.autoSave&&(s.autoSave=!0),$(window).on("beforeunload.savechart",(function(){return window.t("Your chart is being saved, please wait a moment before you leave this page.")})),this._isSaveInProcess=!0,this._chartAboutToBeSavedDelegate.fire(),this._saveChart(s,o,function(){this._chartWidgetCollection.metaInfo.name.setValue(s.name),this._prevChartState=n,this._chartSavedDelegate.fire(!0),this._isSaveInProcess=!1,e&&e(o)}.bind(this),function(){this._chartSavedDelegate.fire(!1),this._isSaveInProcess=!1,t&&t.apply(null,arguments)}.bind(this),i),
$(window).off("beforeunload.savechart")):console.warn("Saving chart with empty name is not allowed")},a.prototype.isSaveInProcess=function(){return this._isSaveInProcess},t.ChartSaver=a}).call(this,i("aIyQ"))},S8xo:function(e,t,i){"use strict";i.r(t),i.d(t,"MouseEventHandler",(function(){return l}));i("EsMY");var n=i("qFKp"),r=i("Eyy1"),o=i("GUQs"),s=i("VaSN"),a=n.isSafari?"click":"auxclick",l=function(){function e(e,t,i){var n=this;this._clickCount=0,this._clickTimeoutId=null,this._clickPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._tapCount=0,this._tapTimeoutId=null,this._tapPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._longTapTimeoutId=null,this._longTapActive=!1,this._mouseMoveStartPosition=null,this._touchMoveStartPosition=null,this._touchMoveExceededManhattanDistance=!1,this._cancelClick=!1,this._cancelTap=!1,this._unsubscribeOutsideMouseEvents=null,this._unsubscribeOutsideTouchEvents=null,this._unsubscribeMobileSafariEvents=null,this._unsubscribeMousemove=null,this._unsubscribeRootMouseEvents=null,this._unsubscribeRootTouchEvents=null,this._startPinchMiddlePoint=null,this._startPinchDistance=0,this._pinchPrevented=!1,this._preventTouchDragProcess=!1,this._mousePressed=!1,this._lastTouchEventTimeStamp=0,this._onFirefoxOutsideMouseUp=function(e){n._mouseUpHandler(e)},this._onMobileSafariDoubleClick=function(e){if(n._firesTouchEvents(e)){var t=n._makeCompatEvent(e);if(++n._tapCount,n._tapTimeoutId&&n._tapCount>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)<this._lastTouchEventTimeStamp+500},e.prototype._processTouchEvent=function(e,t){Object(s.setLastEventIsTouch)(!0),t&&t.call(this._handler,e)},e.prototype._processMouseEvent=function(e,t){"mouseleave"!==e.srcType&&Object(s.setLastEventIsTouch)(!1),t&&t.call(this._handler,e)},e.prototype._makeCompatEvent=function(e){var t=c(e),i=this._target.getBoundingClientRect()||{left:0,top:0};return{clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY,localX:t.clientX-i.left,localY:t.clientY-i.top,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,isTouch:!e.type.startsWith("mouse")&&"contextmenu"!==e.type&&"click"!==e.type,srcType:e.type,target:t.target,view:e.view,preventDefault:function(){"touchstart"!==e.type&&Object(o.a)(e)}}},e}();function c(e){return"touches"in e&&e.touches.length?e.touches[0]:"changedTouches"in e&&e.changedTouches.length?e.changedTouches[0]:e}function u(e){var t=c(e);return{x:t.pageX,y:t.pageY}}function h(e,t){var i=e.clientX-t.clientX,n=e.clientY-t.clientY;return Math.sqrt(i*i+n*n)}function d(e){return e.timeStamp||performance.now()}},Si3H:function(e,t,i){"use strict";i.r(t);var n=i("Eyy1"),r=i("0YCj"),o=i.n(r),s=i("ogJP"),a=function(){function e(){}return e.prototype.targetMetaInfoVersion=function(){return 47},e.prototype.migrateMetaInfo=function(e){var t=e,i=e;if(i._metainfoVersion=47,t.defaults&&void 0!==t.defaults.precision){var n=t.defaults&&t.defaults.precision,r=Object(s.isNumber)(n)?n:parseInt(n);0===r?i.format={type:"volume"}:isFinite(r)?i.format={type:"price",precision:r}:i.format={type:"inherit"},delete t.defaults.precision}else i.format={type:"inherit"}},e.prototype.migratePropState=function(e){},e}(),l=i("mrSG"),c=function(){function e(){}return e.prototype.targetMetaInfoVersion=function(){return 50},e.prototype.migrateMetaInfo=function(e){var t=e,i=e;if(i._metainfoVersion=50,void 0!==t.defaults&&void 0!==t.defaults.ohlcPlots&&void 0!==t.ohlcPlots)for(var r=t.ohlcPlots,o=t.defaults.ohlcPlots,s=Object(n.ensureDefined)(Object(n.ensureDefined)(i.defaults).ohlcPlots),a=0,c=Object.keys(o);a<c.length;a++){var u=c[a],h=o[u];if("ohlc_candles"===h.plottype){var d=!1,p=r[u];void 0!==p&&(d=!!p.drawBorder,delete p.drawBorder),s[u]=Object(l.__assign)({borderColor:"#000000",drawBorder:d},h)}}},e.prototype.migratePropState=function(e){},e}();i.d(t,"migrateMetaInfoAndPropState",(function(){return h}));var u=[new a,new c];function h(e,t){var i=o.a.versionOf(e),r=e;void 0===r._serverMetaInfoVersion&&(r._serverMetaInfoVersion=i),u.forEach((function(r){i<0||i>=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<this.pointsCount();n++)this.m_priceAxisViews.push(this.createPriceAxisView(n)),this.m_timeAxisViews.push(new s(this,n));this._properties.visible.listeners().subscribe(this,(function(e){var t=!1===a.hideAllDrawings().value();e.value()?e.value()&&t&&p.emit("drawing_event",this._id,"show"):(i._model.selection().isSelected(this)&&i._model.selectionMacro((function(e){e.removeSourceFromSelection(i)})),t&&p.emit("drawing_event",this._id,"hide")),i._onSourceHiddenMayChange()})),a.hideAllDrawings().subscribe(this,this._onSourceHiddenMayChange),this.customization=this.customization||{forcePriceAxisLabel:!1,disableSelection:!1,disableErasing:!1,disableSave:!1,showInObjectsTree:!0},this._syncStateExclusions=[],this._definitionsViewModel=null,this._isDestroyed=!1,this._properties.hasChild("linewidth")?this._widthsProperty=new g([this._properties.child("linewidth")]):this._widthsProperty=null,this._syncLineStyleMuted=!1}inherit(w,S),w.prototype.widthsProperty=function(){return this._widthsProperty},w.prototype.pointAdded=function(){return this._pointAdded},w.prototype.pointChanged=function(){return this._pointChanged},
w.PointPriceProperty=function(e,t){f.call(this),this._lineSource=e,this._pointIndex=t,e.pointAdded().subscribe(this,(function(e){this._pointIndex===e&&this._listeners.fire(this)})),e.pointChanged().subscribe(this,(function(e){this._pointIndex===e&&this._listeners.fire(this)}))},inherit(w.PointPriceProperty,f),w.PointPriceProperty.prototype.value=function(){var e=this._lineSource.points()[this._pointIndex].price,t=this._lineSource.ownerSource().formatter();return t.parse(t.format(e)).value},w.PointPriceProperty.prototype.setValue=function(e){var t=this._lineSource.points()[this._pointIndex];t.price=parseFloat(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.enableCurrentIntervalVisibility=function(){var e=c.parse(this._model.mainSeries().interval());if(e.isSeconds())if(e.multiplier()<60){this.properties().intervalsVisibilities.seconds.setValue(!0);var t=Math.min(this.properties().intervalsVisibilities.secondsFrom.value(),e.multiplier());this.properties().intervalsVisibilities.secondsFrom.setValue(t);var i=Math.max(this.properties().intervalsVisibilities.secondsTo.value(),e.multiplier());this.properties().intervalsVisibilities.secondsTo.setValue(i)}else e=new c(u.Minutes,e.multiplier()/60);if(e.isMinutes())if(e.multiplier()<60){this.properties().intervalsVisibilities.minutes.setValue(!0);t=Math.min(this.properties().intervalsVisibilities.minutesFrom.value(),e.multiplier());this.properties().intervalsVisibilities.minutesFrom.setValue(t);i=Math.max(this.properties().intervalsVisibilities.minutesTo.value(),e.multiplier());this.properties().intervalsVisibilities.minutesTo.setValue(i)}else{var n=Math.floor(e.multiplier()/60);this.properties().intervalsVisibilities.hours.setValue(!0);var r=Math.min(this.properties().intervalsVisibilities.hoursFrom.value(),n);this.properties().intervalsVisibilities.hoursFrom.setValue(r);var o=Math.max(this.properties().intervalsVisibilities.hoursTo.value(),n);this.properties().intervalsVisibilities.hoursTo.setValue(o)}if(e.isDays()){this.properties().intervalsVisibilities.days.setValue(!0);var s=Math.min(this.properties().intervalsVisibilities.daysFrom.value(),e.multiplier());this.properties().intervalsVisibilities.daysFrom.setValue(s);var a=Math.max(this.properties().intervalsVisibilities.daysTo.value(),e.multiplier());this.properties().intervalsVisibilities.daysTo.setValue(a)}e.isWeeks()&&this.properties().intervalsVisibilities.weeks.setValue(!0),e.isMonths()&&this.properties().intervalsVisibilities.months.setValue(!0)},w.prototype.getType=function(){return TradingView.className(this.constructor)},w.prototype.isActualSymbol=function(){return this._isActualSymbol},w.prototype.isActualCurrency=function(){return this._isActualCurrency},w.prototype.isActualInterval=function(){return this._isActualInterval},w.prototype.onIsActualIntervalChange=function(){
return this._onIsActualIntervalChange},w.prototype.isSavedInChart=function(e){return!this.customization.disableSave},w.prototype.setSavingInChartEnabled=function(e){this.customization.disableSave=!e},w.prototype.showInObjectTree=function(){return this.customization.showInObjectsTree},w.prototype.isAvailableInFloatingWidget=function(){return!0},w.prototype.setShowInObjectsTreeEnabled=function(e){this.customization.showInObjectsTree=e},w.prototype.isSelectionEnabled=function(){return!this.customization.disableSelection},w.prototype.setSelectionEnabled=function(e){this.customization.disableSelection=!e},w.prototype.visibilityKeyByInterval=function(e){var t,i=c.parse(e);return w.IntervalsVisibilities.forEach((function(e){e.kind===i.kind()&&e.from<=i.multiplier()&&e.to>=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;e<this.pointsCount();e++)this._createPointProperty(e)},w.prototype.priceScale=function(){return this._ownerSource?this._ownerSource.m_priceScale:null},w.prototype.symbol=function(){return this._properties.symbol.value()},w.prototype.properties=function(){return this._properties},w.prototype.isSavedInStudyTemplates=function(){return!1},w.prototype.state=function(e){var t={type:TradingView.className(this.constructor),id:this.id(),state:this.properties().state(this._propertiesStateExclusions()),points:this._timePoint,zorder:this.zorder(),linkKey:this.linkKey};return delete t.state.points,e&&(t.indexes=this._points),this.ownerSource()&&(t.ownerSource=this.ownerSource().id()),this.isFixed()&&(t.positionPercents=this._positionPercents||this.calcPositionPercents()),"version"in this&&1!==this.version&&(t.version=this.version),this.hasAlert.value()&&(t.alertId=this._alertId),t},w.prototype._propertiesStateExclusions=function(){return null},w.prototype.template=function(){return this.properties().preferences()},w.prototype.applyTemplate=function(e){this._onTemplateApplying.fire(e),this._applyTemplateImpl(e),this.calcIsActualSymbol(),this.updateAllViews(),this.model().lightUpdate(),this._onTemplateApplied.fire()},w.prototype._applyTemplateImpl=function(e){var t=this.properties();t.mergePreferences(e),t.saveDefaults(),this.propertiesChanged()},w.prototype.clearData=function(){this._points=[]},w.prototype.currentPointsetId=function(){return"pointset_"+this._currentPointsetId},w.prototype.stop=function(){this.clearServerPoints()},w.prototype.isStarted=function(){return null!==this._currentPointsetId},w.prototype.restart=function(){this.isFixed()||(this._currentPointsetId=null,
this.createServerPoints())},w.prototype.finsih=function(){},w.prototype.tryCreateServerPoints=function(){this.isFixed()||this.isSourceHidden()||null===this._currentPointsetId&&this.createServerPoints()},w.prototype.denormalizeTimePoints=function(){for(var e=[],t=0;t<this._timePoint.length;t++){var i=this._model.timeScale().denormalizeTimePoint(this._timePoint[t]);if(void 0===i){e=[];break}e.push({index:i,price:this._timePoint[t].price})}e.length>0&&(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<this._points.length;t++){var i=this._points[t];e.push({index:i.index,price:i.price,time:i.time})}return this._lastPoint&&e.push({index:this._lastPoint.index,price:this._lastPoint.price,time:this._lastPoint.time}),this._currentMovingPoint&&this._startMovingPoint&&this.correctPoints(e),e},w.prototype.normalizedPoints=function(){return this._timePoint},w.prototype.axisPoints=function(){return this.points()},w.prototype.fixedPoints=function(){var e=[];if(this._positionPercents&&!this.priceScale().isEmpty())for(var t=0;t<this._positionPercents.length;t++){var i=this._positionPercents[t],n=this._model.timeScale().width()*i.x,o=this.priceScale().height()*i.y;e.push(new r(n,o))}else for(t=0;t<this._fixedPoints.length;t++)e.push(this._fixedPoints[t].clone());return this._lastPoint&&e.push(this._lastPoint.clone()),this._currentMovingPoint&&this._startMovingPoint&&this.correctFixedPoints(e),e},w.prototype._preparePoint=function(e,t){var i=e;return t&&t.shift()&&this.points().length>=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<this._fixedPoints.length;e++){var t=this._fixedPoints[e],i=t.x/this._model.timeScale().width(),n=t.y/this.priceScale().height();this._positionPercents.push({x:i,y:n})}return this._positionPercents},w.prototype.calcMiddlePoint=function(e,t){return new r((e.x+t.x)/2,(e.y+t.y)/2)},w.prototype.getPointByPosition=function(e,t,i,n){return[t,i,n][e]},w.prototype.restoreFixedPoints=function(){this._fixedPoints=this.fixedPoints()},w.prototype.onData=function(e){e.params.customId===this.currentPointsetId()&&this._onPointsetUpdated(e.params.plots)},w.prototype._onPointsetUpdated=function(e){if(0!==e.length){for(var t=0;t<e.length;t++){var i=e[t],n=this._timePoint[i.index],r={index:i.value[0],time:new Date(1e3*i.value[1]),price:n.price};this._points.length<=i.index?(this._points.push(r),this._pointAdded.fire(this._points.length-1)):(this._points[i.index]=r,this._pointChanged.fire(i.index))}this.checkAlert&&this.checkAlert(),this.updateAllViewsAndRedraw()}},w.prototype.startChanging=function(e,t){e<this.m_priceAxisViews.length&&this.m_priceAxisViews[e].setActive(!0),e<this.m_timeAxisViews.length&&this.m_timeAxisViews[e].setActive(!0),this._properties.lastUpdateTime.setValue((new Date).valueOf())},w.prototype.setPoint=function(e,t,i){if(i&&i.shift()&&this._properties.snapTo45Degrees){var n=0===e?1:e-1;this._snapPoint45Degree(t,this.points()[n])}this._points[e]=t,this._pointChanged.fire(e),this.normalizePoints()},w.prototype.startMoving=function(e,t,i){this.isFixed()&&this.restoreFixedPoints(),this._startMovingPoint=this.isFixed()?e.screen:e.logical,this._properties.lastUpdateTime.setValue((new Date).valueOf())},w.prototype.move=function(e,t,i){var n;n=i&&(i.shiftOnly()||i.controlShift())?this.isFixed()?this._alignScreenPointHorizontallyOrVertically(e.screen):this._alignPointHorizontallyOrVertically(e.logical):this.isFixed()?e.screen:e.logical,this._currentMovingPoint=n,this.updateAllViews()},w.prototype._alignPointHorizontallyOrVertically=function(e){var t=this.pointToScreenPoint(e)[1],i=this.pointToScreenPoint(this._startMovingPoint)[1],n=Math.abs(i.x-t.x),r=Math.abs(i.y-t.y);return n<10&&r<10?e:{index:n<r?this._startMovingPoint.index:e.index,price:n<r?e.price:this._startMovingPoint.price}},w.prototype._alignScreenPointHorizontallyOrVertically=function(e){var t=Math.abs(this._startMovingPoint.x-e.x),i=Math.abs(this._startMovingPoint.y-e.y);return t<10&&i<10?e:t<i?new r(this._startMovingPoint.x,e.y):new r(e.x,this._startMovingPoint.y)},w.prototype.startMovingPoint=function(){return this._startMovingPoint?TradingView.clone(this._startMovingPoint):null},w.prototype.currentMovingPoint=function(){
return this._currentMovingPoint?TradingView.clone(this._currentMovingPoint):null},w.prototype.correctPoints=function(e){var t=this._currentMovingPoint.index-this._startMovingPoint.index,i=this._currentMovingPoint.price-this._startMovingPoint.price;if(0===t&&0===i)return!1;for(var n=0;n<e.length;n++){var r=e[n];r.index+=t,r.price+=i,e[n]=r}return!0},w.prototype.correctFixedPoints=function(e){for(var t=this._currentMovingPoint.subtract(this._startMovingPoint),i=0;i<e.length;i++)e[i]=e[i].add(t)},w.prototype.endMoving=function(e){this._properties.interval.setValue(this._model.mainSeries().interval());var t=!1,i=!1;if(this._currentMovingPoint&&this._startMovingPoint){if(t=this._currentMovingPoint.index!==this._startMovingPoint.index,i=this._currentMovingPoint.price!==this._startMovingPoint.price,this.isFixed())this.correctFixedPoints(this._fixedPoints);else if(this.correctPoints(this._points)){p.emit("drawing_event",this._id,"move");for(var n=0;n<this._points.length;n++)this._pointChanged.fire(n)}this._startMovingPoint=null,this._currentMovingPoint=null}if(this.isFixed())return this.calcPositionPercents(),void this.updateAllViews();this.normalizePoints(),this.updateAllViews(),t&&!e&&this.createServerPoints(),(i||t)&&this.synchronizeAlert(!this._alertUndoMode)},w.prototype.endChanging=function(e,t){this._properties.interval.setValue(this._model.mainSeries().interval()),t||(this.normalizePoints(),this.createServerPoints());for(var i=0;i<this.m_priceAxisViews.length;i++)this.m_priceAxisViews[i].setActive(!1);for(i=0;i<this.m_timeAxisViews.length;i++)this.m_timeAxisViews[i].setActive(!1);this.synchronizeAlert(!e)},w.prototype.paneViews=function(){if(this.isSourceHidden())return null;if(1===this._paneViews.length)return[this._paneViews[0]];for(var e=[],t=this._paneViews.length-1;t>=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&&i<this.m_priceAxisViews.length){var n=this.m_priceAxisViews.slice(),r=n[i];return n.splice(i,1),n.push(r),n}return this.m_priceAxisViews}return this.m_priceAxisViews},w.prototype.timeAxisViews=function(){if(this.isSourceHidden())return null;if(this._model.lineBeingEdited()===this){var e=this._model.linePointBeingEdited();if(null!==e&&e<this.m_timeAxisViews.length){var t=this.m_timeAxisViews.slice(),i=t[e];return t.splice(e,1),t.push(i),t}return this.m_timeAxisViews}return this.m_timeAxisViews},w.prototype.updateAllViews=function(){if(!this._isActualSymbol||!this._isActualCurrency)return null;if(!this._properties.visible.value())return null;var e=this.paneViews();if(null!==e)for(var t=e,i=0;i<t.length;i++)t[i].update();for(t=this.m_priceAxisViews,i=0;i<t.length;i++)t[i].update();for(t=this.m_timeAxisViews,i=0;i<t.length;i++)t[i].update()},w.prototype.setLastPoint=function(e,t){this._lastPoint=this._preparePoint(e,t),this.updateAllViews()},w.prototype.lastPoint=function(){return this._lastPoint},w.prototype.setLastFixedPoint=function(e){this._lastFixedPoint=e,this.updateAllViews()},w.prototype.title=function(){return this.translatedType()},w.prototype.translatedType=function(){return"Line Tool"},w.prototype.name=function(){return"Line Tool"},w._pointSetId=1,w.prototype.start=function(){this.createServerPoints()},w.prototype.createServerPoints=function(){if(!this._recursiveGuard&&this._isActualSymbol&&this._model.chartApi().connected()&&(this.clearServerPoints(),!this._model.timeScale().isEmpty()&&(0===this._timePoint.length&&this.normalizePoints(),0!==this._timePoint.length))){this._currentPointsetId=++w._pointSetId;for(var e=this._model.mainSeries().symbolId(),t=[],i=0;i<this._timePoint.length;i++){var n=this._timePoint[i];t.push([n.time_t,n.offset])}var r=h(this.properties().interval.value()),o=this;this._model.chartApi().createPointset(this.currentPointsetId(),"turnaround",e,r,t,(function(e){o.onData(e)}))}},w.prototype.clearServerPoints=function(){null!==this._currentPointsetId&&(this._model.chartApi().removePointset(this.currentPointsetId()),this._currentPointsetId=null)},w.prototype.isBeingEdited=function(){return this===this._model.lineBeingEdited()||this===this._model.sourceBeingMoved},w.prototype.isFixed=function(){return!1},w.prototype.isLocked=w.prototype.isFrozen=function(){return this.properties().frozen&&this.properties().frozen.value()},w.prototype.pointToScreenPoint=function(e){var t=this._model.timeScale(),i=this.priceScale(),n=this.ownerSource().firstValue();if(!i||i.isEmpty()||t.isEmpty()||null==n)return[new r(0,0),new r(0,0)];var o=t.indexToCoordinate(e.index,!0),s=e.price,a=i.priceToCoordinate(s,n),l=new r(o,a);o=t.indexToCoordinate(e.index,!1),a=i.priceToCoordinate(s,n);return[l,new r(o,a)]},w.prototype.screenPointToPoint=function(e){var t=this._model.timeScale(),i=this.priceScale(),n=t.coordinateToIndex(e.x),r=this.ownerSource().firstValue();if(null!==r&&isFinite(r))return{
price:i.coordinateToPrice(e.y,r),index:n}},w.prototype.tags=function(){return[this.toolname]},w.prototype._snapPoint45Degree=function(e,t,i){var n=this._model.timeScale(),r=n.indexToCoordinate(t.index),o=n.indexToCoordinate(e.index)-r,s=this.m_priceScale,a=t.price,l=e.price,c=this.ownerSource().firstValue(),u=s.priceToCoordinate(a,c),h=s.priceToCoordinate(l,c)-u,d=Math.round(Math.atan2(o,h)/Math.PI*4);if(2===Math.abs(d))i||(e.price=a);else if(0===Math.abs(d)||4===Math.abs(d))i||(e.index=t.index);else{var p=Math.sqrt(o*o+h*h),_=o<0?-1:1,f=h<0?-1:1,m=Math.max(Math.abs(h),Math.abs(o));m/=m*Math.sqrt(2)/p;var v=Math.round(n.coordinateToIndex(r+m*_)),y=Math.abs(n.indexToCoordinate(v)-r),g=s.coordinateToPrice(u+y*f,c);e.index=v,e.price=g}},w.prototype.createPriceAxisView=function(e){return new o(this,{pointIndex:e})},w.prototype.version=1,w.prototype.alertId=function(){return this._alertId},w.prototype.setAlert=function(e,t){throw new Error("not implemented")},w.prototype.removeAlert=function(){delete this._alertId,delete this._alert,this.hasAlert.setValue(!1)},w.prototype._processAlertHandlers=function(e){var t,i,n=this;if("unsubscribe"!==(e="subscribe"===e?"subscribe":"unsubscribe")||n._alertCallbacks){i="subscribe"===e?"on":"off",t=n.properties();var r=n._alertCallbacks||{remove:n.removeAlert.bind(n),hovered:function(e,t){var i=n._model.hoveredSource()===n;t&&!i?n._model.setHoveredSource(n):!t&&i&&n._model.setHoveredSource(null)},selected:function(e,t){t&&n._model.selectionMacro((function(e){e.addSourceToSelection(n)}))},synchronizeSilently:function(e){n.synchronizeAlert(!1)}};n._alertCallbacks||(n._alertCallbacks=r),n.getAlert().then((function(o){o&&(o[i]("destroy",r.remove),o[i]("change:hovered",r.hovered),o[i]("change:selected",r.selected),t.extendLeft&&t.extendLeft[e](n,r.synchronizeSilently),t.extendRight&&t.extendRight[e](n,r.synchronizeSilently))}))}},w.prototype.editAlert=function(e){},w.prototype.getAlert=function(){throw new Error("not implemented")},w.prototype.getAlertSync=function(){return null},w.prototype.synchronizeAlert=function(e){},w.prototype._getUndoHistory=function(){return this._model._undoModel.undoHistory()},w.prototype.stateForAlert=function(){if(!this.canHasAlert())return null;var e=this.state();e.id=this.idForAlert(),e.uniqueId=this.idForAlert(),e.title=this.title(),e.interval=this._model.mainSeries().interval();var t=this._getAlertPlots();return t&&(e.plots=t),e},w.prototype._getAlertPlots=function(){return null},w.prototype._linePointsToAlertPlot=function(e,t,i,n){if(2!==e.length)return d.logError("[Drawing Alert] Wrong points"),null;var r=this._model.timeScale();return!r||r.isEmpty()?null:{type:"LinePlot",title:t||this.title(),timestamp:r.indexToTimePoint(0),offset1:e[0].index,offset2:e[1].index,price1:e[0].price,price2:e[1].price,extendBackward:i||!1,extendForward:n||!1}},w.prototype.getAlertIsActive=function(){return!1},w.prototype.geometry=function(){var e=this;return this.points().map((function(t){return function(t){var i=t.x/e._model.timeScale().width(),n=t.y/e.priceScale().height()
;return new r(i,n)}(e.pointToScreenPoint(t)[0])}))},w.prototype.onlyYMoving=function(){return!1},w.prototype.model=function(){return this._model},w.prototype.isForcedDrawPriceAxisLabel=function(){return this.customization.forcePriceAxisLabel},w.prototype.getInputsPropertyPage=function(){return m.LineToolInputsPropertyPage},w.prototype.getVisibilitiesPropertyPage=function(){return m.LineToolVisibilitiesPropertyPage},w.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.resolve(null)},w.prototype.getPropertyDefinitionsViewModel=function(){if(null===this._definitionsViewModel){var e=this;return e._getPropertyDefinitionsViewModelClass().then((function(t){return null===t||e._isDestroyed?null:(null===e._definitionsViewModel&&(e._definitionsViewModel=new t(e._model.undoModel(),e)),e._definitionsViewModel)}))}return Promise.resolve(this._definitionsViewModel)},w.prototype.hasEditableCoordinates=function(){return!0},w.prototype.getSourceIcon=function(){return{type:"loadSvg",svgId:"linetool."+this.getType()}},w.prototype.destroy=function(){this.stop(),this._paneViews.forEach((function(e){e.destroy&&e.destroy()})),null!==this._definitionsViewModel&&(this._definitionsViewModel.destroy(),this._definitionsViewModel=null),null!==this._ownerSource&&this.ownerSource().currencyChanged().unsubscribeAll(this),null!==this._sourceHiddenChangedTimeoutId&&clearTimeout(this._sourceHiddenChangedTimeoutId),a.hideAllDrawings().unsubscribeAll(this),this._isDestroyed=!0},w.prototype.setOwnerSource=function(e){null!==this._ownerSource&&this._ownerSource.currencyChanged().unsubscribeAll(this),S.prototype.setOwnerSource.call(this,e),e&&(this.setPriceScale(e.priceScale()),e.currencyChanged().subscribe(this,this.calcIsActualCurrency),this.calcIsActualCurrency())},w.prototype.getOrderTemplate=function(){return null},w.prototype.copiable=function(){return b},w.prototype.cloneable=function(){return null!==this._ownerSource&&null!==this._ownerSource.firstValue()},w.prototype.movable=function(){return!0};var P={frozen:!1,visible:!0,intervalsVisibilities:{seconds:!0,secondsFrom:1,secondsTo:59,minutes:!0,minutesFrom:1,minutesTo:59,hours:!0,hoursFrom:1,hoursTo:24,days:!0,daysFrom:1,daysTo:366,weeks:!0,months:!0,ranges:!0}};w._configureProperties=function(e){if(e.hasChild("visible")||e.addChild("visible",new f(P.visible)),e.hasChild("frozen")||e.addChild("frozen",new f(P.frozen)),e.hasChild("currencyId")||e.addChild("currencyId",new f(null)),e.addExclusion&&(e.addExclusion("visible"),e.addExclusion("frozen"),e.addExclusion("currencyId")),e.hasChild("intervalsVisibilities")){var t=n(e.child("intervalsVisibilities"));for(var i in P.intervalsVisibilities)t.hasChild(i)||t.addChild(i,new f(P.intervalsVisibilities[i]))}else e.addChild("intervalsVisibilities",new f(P.intervalsVisibilities));e.hasChild("title")||e.addChild("title",new f("")),e.addExclusion&&(e.addExclusion("symbol"),e.addExclusion("symbolInfo"),e.addExclusion("points"),e.addExclusion("interval"),e.addExclusion("title")),
e.hasChild("lastUpdateTime")||(e.addChild("lastUpdateTime",new f(0)),e.addExclusion&&e.addExclusion("lastUpdateTime")),e.hasChild("singleChartOnly")&&e.removeProperty("singleChartOnly")},t.LineToolPriceAxisView=o,t.LineDataSource=w},SzKR:function(e,t,i){},T6Of:function(e,t,i){"use strict";i.r(t),i.d(t,"LimitedPrecisionNumericFormatter",(function(){return r}));var n=i("ogJP"),r=function(){function e(e){void 0===e&&(e=1),this._precision=e}return e.prototype.format=function(e){Object(n.isNumber)(e)||(e=parseFloat(e));var t=e.toFixed(this._precision),i=Math.pow(10,-this._precision);return Math.max(parseFloat(t),i)+""},e.prototype.parse=function(e){var t=parseFloat(e);return isNaN(t)?{res:!1}:{res:!0,value:t,suggest:this.format(t)}},e}()},TBaH:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolGannFixed",(function(){return c}));var n=i("mrSG"),r=i("aO4+"),o=i("Ss5c"),s=i("LAp3"),a=i("ytGH"),l=window.t("Gann Square Fixed"),c=function(e){function t(n,r){var o=e.call(this,n,r||t.createProperties())||this;i.e("lt-pane-views").then(function(e){var t=i("wdUH").GannFixedPaneView;o._setPaneViews([new t(o,o.model())])}.bind(null,i)).catch(void 0),o.properties().childs().reverse.subscribe(o,o._reversePoints);for(var s=[],l=o.properties().childs(),c=l.levels.childCount(),u=0;u<c;u++){var h=l.levels.childs()[u].childs();s.push(h.width)}for(c=l.fanlines.childCount(),u=0;u<c;u++){h=l.fanlines.childs()[u].childs();s.push(h.width)}for(c=l.arcs.childCount(),u=0;u<c;u++){h=l.arcs.childs()[u].childs();s.push(h.width)}return o._widthsProperty=new a.LineToolWidthsProperty(s),o}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return 2},t.prototype.translatedType=function(){return l},t.prototype.name=function(){return"Gann Square Fixed"},t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.axisPoints=function(){var e=this.points(),t=this.getScreenPoints();return e.length<2||t.length<2?[]:[e[0],this.screenPointToPoint(t[1])]},t.prototype.getScreenPoints=function(){var e=this.points();if(e.length<2)return[];var t=this._calcAngle();if(null===t)return[];var i=e[0],n=e[1],o=this.pointToScreenPoint(i)[0],s=this.pointToScreenPoint(n)[0],a=Math.sqrt(Math.pow(o.x-s.x,2)+Math.pow(o.y-s.y,2)),l=new r.Point(Math.cos(t),-Math.sin(t)),c=l.normalized(),u=c.x<0?-1:1,h=c.y<0?-1:1;return[o.addScaled(l,a),o.add(new r.Point(5*a*u,5*a*h))]},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;n<i;n++){var r=t.levels.childs()[n].childs();e.push({index:n,visible:r.visible.value(),color:r.color.value(),width:r.width.value()})}return e},t.prototype.fanLinesCount=function(){return this.properties().childs().fanlines.childCount()},t.prototype.fanLines=function(){for(var e=[],t=this.properties().childs(),i=t.fanlines.childCount(),n=0;n<i;n++){var r=t.fanlines.childs()[n].childs();e.push({index:n,visible:r.visible.value(),x:r.x.value(),y:r.y.value(),color:r.color.value(),
width:r.width.value()})}return e},t.prototype.arcsCount=function(){return this.properties().childs().arcs.childCount()},t.prototype.arcs=function(){for(var e=[],t=this.properties().childs(),i=t.arcs.childCount(),n=0;n<i;n++){var r=t.arcs.childs()[n].childs();e.push({index:n,visible:r.visible.value(),x:r.x.value(),y:r.y.value(),color:r.color.value(),width:r.width.value()})}return e},t.prototype.arcsBackgroundTransparency=function(){return this.properties().childs().arcsBackground.childs().transparency.value()},t.prototype.isArcsBackgroundFilled=function(){return this.properties().childs().arcsBackground.childs().fillBackground.value()},t.createProperties=function(e){var i=Object(s.a)("linetoolgannfixed",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,"WfUZ")).then((function(e){return e.GannComplexAndFixedDefinitionsViewModel}))},t._configureProperties=function(e){o.LineDataSource._configureProperties(e)},t.prototype._calcAngle=function(){var e=this.points();if(e.length<2)return null;var t=e[0],i=e[1],n=this.pointToScreenPoint(t)[0],r=this.pointToScreenPoint(i)[0].subtract(n);if(r.length()<=0)return null;r=r.normalized();var o=Math.acos(r.x);return r.y>0&&(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;t<i.length;t++){var n=i[t];h(n),d(this._javaStudiesMetaInfo,n)}this._javaStudiesMetaInfo=this._javaStudiesMetaInfo.sort((function(e,t){var i=e.description_localized||e.description,n=t.description_localized||t.description;return i>n?1:i<n?-1:0})),o.a.overrideDefaults(this._javaStudiesMetaInfo)},e.prototype._requestStarted=function(){this._isReady=!1,this._javaStudiesMetaInfo=[],this._pineMetaInfoCache=[],this._studiesMigrations=[],this._rawStudiesMetaInfo=[]},e.prototype._requestFinished=function(){this._isReady=!0,this._processPendingMetaInfoQueries(),this._processPendingFullMetaInfoQueries()},e.prototype._enqueueMetaInfoQuery=function(e){var t=this;return new Promise((function(i){t._metaInfoQueryQueue.push({studyDescriptor:e,resolver:i})}))},e.prototype._enqueueJavaMetaInfoQuery=function(){var e=this;return new Promise((function(t){e._javaMetaInfoQueryQueue.push({resolver:t})}))},e.prototype._processPendingMetaInfoQueries=function(){for(;this._metaInfoQueryQueue.length;){var e=this._metaInfoQueryQueue.shift();this.findById(e.studyDescriptor).then(e.resolver)}},e.prototype._processPendingFullMetaInfoQueries=function(){for(;this._javaMetaInfoQueryQueue.length;){this._javaMetaInfoQueryQueue.shift().resolver(this._javaStudiesMetaInfo)}},e.prototype._findStudyMetaInfo=function(e){return"java"===e.type?this._javaStudiesMetaInfo.find((function(t){return t.id===e.studyId}))||null:this._pineMetaInfoCache.find((function(t){return t.scriptIdPart===e.pineId&&(void 0===e.pineVersion||Object(n.ensureDefined)(t.pine).version===e.pineVersion)}))||null},e.prototype._makeNextRequestId=function(){return"metadata_"+this._nextRequestNumber++},e.prototype._compilePine=function(e){throw new Error("unsupported")},e}();function h(e){e.description_localized=window.t(e.description,{context:"study"})}function d(e,t){var i=new o.a(t);Object(s.migrateMetaInfoAndPropState)(i)
;var n=!0,r=e.findIndex((function(e){return e.id===i.id}));if(-1===r)e.push(i);else{var l=e[r],c=void 0!==l.pine?a.Version.parse(l.pine.version):null,u=void 0!==i.pine?a.Version.parse(i.pine.version):null;null===u||null===c||u.isGreaterOrEqual(c)?(l.removeDefaults(),e[r]=i):n=!1}return n&&i.createDefaults(),i}},UCMi:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Date and Price 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("UcQu").DateAndPriceRangePaneView;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 and Price Range"},s.createProperties=function(e){var t=new r("linetooldateandpricerange",e);return s._configureProperties(t),t},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._configureProperties=function(e){n._configureProperties(e)},t.LineToolDateAndPriceRange=s},UCjq:function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("Eyy1"),o=i("aO4+"),s=i("qFKp"),a=i("VaSN"),l=i("FQhm"),c=i("ogJP"),u=i("FIi8"),h=i("VdBB"),d=i("vTIA"),p=i("KnF9"),_=i("3ClC"),f=i("CW80"),m=i("mMWL"),v=i("bOGh"),y=i("fTGZ"),g=i("ikwP"),b=i("gAom"),S=i("mE5r"),w=i("1IXQ");function P(e,t){return e.position-t.position}function C(e,t,i){var n=(e.position-t.position)/(e.time-t.time);return Math.sign(n)*Math.min(Math.abs(n),i)}var x=function(){function e(e,t,i,n){this._position1=null,this._position2=null,this._position3=null,this._position4=null,this._animationStartPosition=null,this._duration=0,this._speed=0,this._terminated=!1,this._minSpeed=e,this._maxSpeed=t,this._acceleration=i,this._minMove=n}return e.prototype.addPosition=function(e,t){if(null!==this._position1){if(this._position1.time===t)return void(this._position1.position=e);if(Math.abs(this._position1.position-e)<this._minMove)return}this._position4=this._position3,this._position3=this._position2,this._position2=this._position1,this._position1={time:t,position:e}},e.prototype.start=function(e,t){if(null!==this._position1&&null!==this._position2&&!(t-this._position1.time>50)){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;_<o.length;++_)p+=s[_]/i*o[_];if(!(Math.abs(p)<this._minSpeed))this._animationStartPosition={position:e,time:t},this._speed=p,
this._duration=(h=p,d=this._acceleration,Math.abs(h/d))}},e.prototype.getPosition=function(e){var t,i,n;return Object(r.ensureNotNull)(this._animationStartPosition).position+(t=this._speed,i=this._progressDuration(e),n=this._acceleration,Math.sign(t)*(Math.abs(t*i)+.5*n*(i*i)))},e.prototype.finished=function(e){return null===this._animationStartPosition||this._progressDuration(e)===this._duration},e.prototype.terminated=function(){return this._terminated},e.prototype.terminate=function(){this._terminated=!0},e.prototype._progressDuration=function(e){var t=e-Object(r.ensureNotNull)(this._animationStartPosition).time;return Math.min(t,this._duration)},e}(),T=i("hY0g"),I=i.n(T),M=i("1AAW"),L=i("XcdR"),O=i("dDSx"),k=i("HZKX"),A=i("5VQP"),E=i("7ktv"),V=i("Fixu"),D=i("e92V"),B=i("QloM"),R=i("Kxc7"),N=i("//lt"),F=i("JWMC"),j=i("7KDR"),W=i("ZBiT"),H=i("zL3Q"),z=i("lxNp"),U=i("H0vP"),G=i("4vW/");i.d(t,"customizationSelectionEnabled",(function(){return Z})),i.d(t,"PaneWidgetBase",(function(){return oe}));var Y=parseInt(W["css-value-pane-controls-padding-left"]),q=parseInt(W["css-value-pane-controls-padding-right"]),K=["LineToolOrder","AlertLabel"];function Z(e){return!e||!e.customization||!e.customization.disableSelection}function J(e){return!(null===e||!Object(_.isStudy)(e))&&"Volume@tv-basicstudies"===e.metaInfo().id}function X(e,t,i){e.drawBackground&&e.drawBackground(t,i)}function Q(e,t,i){e.draw(t,i)}function $(e,t){return e.paneViews(t)}function ee(e,t){return e.labelPaneViews(t)}function te(e,t){var i=e.strategyOrdersPaneView();return null===i?null:[i]}var ie={contextMenuEnabled:!0,contextMenu:{general:!0,studies:!0,fundamentals:!0,publishedCharts:!0,ordersAndPositions:!0,lineTools:!0,esdStudies:!0,alerts:!0,chartEvents:!0,mainSeries:!0,mainSeriesTrade:!1,objectTree:!0},priceScaleContextMenuEnabled:!0,legendWidgetEnabled:!0,controlsEnabled:!0,propertyPagesEnabled:!0,sourceSelectionEnabled:!0},ne=s.CheckMobile.any(),re=!R.enabled("display_legend_on_all_charts");var oe=function(){function e(e,t,i){var n=this;this._legendWidget=null,this._paneControls=null,this._isDestroyed=!1,this._trackCrosshairOnlyAfterLongTap=Object(a.lastEventIsTouch)(),this._startTrackPoint=null,this._exitTrackingModeOnNextTry=!1,this._startMoveLineToolParams=null,this._startChangeLineToolParams=null,this._preventSourceChange=!1,this._clonningAtMoveLineTools=null,this._startCloningPoint=null,this._size=new g.Size(0,0),this._themedTopColor=null,this._themedBottomColor=null,this._initCrossHairPosition=null,this._firstZoomPoint=null,this._editDialog=null,this._processing=!1,this._touchMove=!1,this._startTouchPoint=null,this._isSelecting=!1,this._prevHoveredHittest=null,this._contextMenuX=0,this._contextMenuY=0,this._startScrollingPos=null,this._isScrolling=!1,this._scrollPriceScale=null,this._scrollXAnimation=null,this._scrollYAnimation=null,this._prevPinchScale=1,this._pinching=!1,this._wasPinched=!1,this._longTap=!1,this._contextMenuOpenedOnLastTap=!1,this._paneControlsResizeObserver=null,this._hideNotMainSourcesInLegendSpawn=null,
this._lastClickedSource=null,this._customLegendWidgetsFactoryMap=new Map,this._initialCrosshairPositionBeforeAlign=null,this._onMagnetStateChangedListener=this._onMagnetStateChanged.bind(this),this._onShiftKeyStateChangedListener=this._onShiftKeyStateChanged.bind(this),this._currentCursorClassName="",this._lastFinishedToolId=null,this._canvasConfiguredHandler=function(){return n._state&&n._chartModel().lightUpdate()},this._topCanvasConfiguredHandler=function(){return n._state&&n._chartModel().lightUpdate()},this._chart=e,this._state=t,this._options=Object(c.merge)(Object(c.clone)(ie),i),this._state&&(this._state.onDestroyed().subscribe(this,this._onStateDestroyed,!0),this._state.dataSourcesCollectionChanged().subscribe(this,this._onDataSourcesCollectionChanged));var r={contextMenuEnabled:this._options.priceScaleContextMenuEnabled,pressedMouseMoveScale:this._options.handleScale.axisPressedMouseMove,currencyLabelEnabled:this._options.currencyLabelEnabled,croppedTickMarks:this._options.croppedTickMarks};void 0!==this._options.priceScaleContextMenu&&(r.contextMenu=this._options.priceScaleContextMenu);var o=function(e,t,i,o,s){return new w.PriceAxisWidget(n,n._chartUndoModel(),i,t,e,r,o,s)},s=e.properties().childs().scalesProperties,l=this._chartModel().rendererOptionsProvider(),u={backgroundBasedTheme:e.backgroundBasedTheme(),rendererOptionsProvider:l,getBackgroundTopColor:function(){return n._chartModel().backgroundTopColor().value()},getBackgroundBottomColor:function(){return n._chartModel().backgroundColor().value()}},h={showLabels:!1};this._lhsPriceAxisesContainer=new S.PriceAxisesContainer(s,"left",o,u,h),this._rhsPriceAxisesContainer=new S.PriceAxisesContainer(s,"right",o,u,h),this._paneCell=document.createElement("td"),this._paneCell.classList.add("chart-markup-table","pane"),this._div=document.createElement("div"),this._div.classList.add("chart-gui-wrapper"),this._paneCell.appendChild(this._div),this._canvasBinding=Object(g.createBoundCanvas)(this._div,new g.Size(16,16)),this._canvasBinding.subscribeCanvasConfigured(this._canvasConfiguredHandler);var d=this._canvasBinding.canvas;d.style.position="absolute",d.style.left="0",d.style.top="0",this._topCanvasBinding=Object(g.createBoundCanvas)(this._div,new g.Size(16,16)),this._topCanvasBinding.subscribeCanvasConfigured(this._topCanvasConfiguredHandler);var p=this._topCanvasBinding.canvas;p.style.position="absolute",p.style.left="0",p.style.top="0",this._rowElement=document.createElement("tr"),this._rowElement.appendChild(this._lhsPriceAxisesContainer.getElement()),this._rowElement.appendChild(this._paneCell),this._rowElement.appendChild(this._rhsPriceAxisesContainer.getElement()),this._options.legendWidgetEnabled&&(this._options.customLegendWidgetFactories&&(this._customLegendWidgetsFactoryMap=this._options.customLegendWidgetFactories),this._loadAndCreateLegendWidget()),this._state&&!this._chart.readOnly()&&this._options.controlsEnabled&&this._loadAndCreatePaneControlsWidget(),Object(H.a)().subscribe(this._onMagnetStateChangedListener),
z.pressedKeys.subscribe(this._onShiftKeyStateChangedListener)}return e.prototype.destroy=function(){this._customLegendWidgetsFactoryMap.clear(),this._topCanvasBinding.unsubscribeCanvasConfigured(this._topCanvasConfiguredHandler),this._topCanvasBinding.destroy(),this._canvasBinding.unsubscribeCanvasConfigured(this._canvasConfiguredHandler),this._canvasBinding.destroy(),null!==this._hideNotMainSourcesInLegendSpawn&&this._hideNotMainSourcesInLegendSpawn.destroy(),this._legendWidget&&(this._legendWidget.destroy(),this._legendWidget=null),null!==this._paneControlsResizeObserver&&this._paneControlsResizeObserver.disconnect(),null!==this._paneControls&&(this._paneControls.destroy(),this._paneControls=null),this._lhsPriceAxisesContainer.destroy(),this._rhsPriceAxisesContainer.destroy(),this.hasState()&&(this.state().onDestroyed().unsubscribeAll(this),this.state().dataSourcesCollectionChanged().unsubscribeAll(this)),Object(H.a)().unsubscribe(this._onMagnetStateChangedListener),z.pressedKeys.unsubscribe(this._onShiftKeyStateChangedListener)},e.prototype.size=function(){return this._size},e.prototype.setSize=function(e){Object(r.assert)(e.w>=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;a<l.length;a++){var c=l[a],u=c.statusView();Object(_.isStudy)(c)?c.properties().visible.value()&&u&&s.showStudyTitles.value()&&(i.push(c.statusProvider((null==e?void 0:e.status)||{}).text()),n.push(c.valuesProvider().getValues(null))):c===this._chartModel().mainSeries()&&u&&s.showSeriesTitle.value()&&(t=c.statusProvider((null==e?void 0:e.status)||{}).text(),r=c.valuesProvider().getValues(null))}return{type:"pane",leftAxis:this._lhsPriceAxisesContainer.getScreenshotData(),rightAxis:this._rhsPriceAxisesContainer.getScreenshotData(),content:this._canvasBinding.canvas.toDataURL(),canvas:this._canvasBinding.canvas,contentWidth:this._size.w,contentHeight:this._size.h,studies:i,studiesValues:n,containsMainSeries:this.containsMainSeries(),mainSeriesText:t,mainSeriesValues:r}},e.prototype.hardResetCanvas=function(){this._size.equals(new g.Size(0,0))||(Object(g.hardResizeCanvas)(this._canvasBinding,this._size),Object(g.hardResizeCanvas)(this._topCanvasBinding,this._size),
this._lhsPriceAxisesContainer.hardResetCanvas(),this._rhsPriceAxisesContainer.hardResetCanvas())},e.prototype.updatePriceAxisWidgets=function(){if(this.hasState()){var e=this._chartModel(),t=e.paneForSource(e.mainSeries());if(t){var i=e.priceScaleSlotsCount(),n=this.state(),r=n.visibleLeftPriceScales(),o=n.visibleRightPriceScales();this._lhsPriceAxisesContainer.setScales(r,i.left,t.leftPriceScales().length,i.left+i.right),this._rhsPriceAxisesContainer.setScales(o,i.right,t.rightPriceScales().length,i.left+i.right)}}},e.prototype.update=function(){this.hasState()&&(this._lhsPriceAxisesContainer.update(),this._rhsPriceAxisesContainer.update(),null!==this._legendWidget&&this._legendWidget.update(),this.updateControls())},e.prototype.updateStatusWidget=function(e){void 0===e&&(e=U.InvalidationLevel.None),this.hasState()&&null!==this._legendWidget&&(e===U.InvalidationLevel.Full?this._legendWidget.updateLayout():this._legendWidget.update())},e.prototype.updateControls=function(){this.hasState()&&null!==this._paneControls&&this._paneControls.update()},e.prototype.updateThemedColors=function(e,t){this._themedTopColor=e,this._themedBottomColor=t,this._updateByThemedColors()},e.prototype.statusWidget=function(){return this._legendWidget},e.prototype.getElement=function(){return this._rowElement},e.prototype.canvasElement=function(){return this._canvasBinding.canvas},e.prototype.hasCanvas=function(e){return this._canvasBinding.canvas===e||this._topCanvasBinding.canvas===e},e.prototype.pinchStartEvent=function(){this._onTouchEvent(),this._options.handleScale.pinch&&(this._terminateActiveAnimations(),this._prevPinchScale=1,this._pinching=!0,this._wasPinched=!0)},e.prototype.pinchEvent=function(e,t){if(this._onTouchEvent(),this._options.handleScale.pinch){var i=5*(t-this._prevPinchScale);this._prevPinchScale=t,this._chartModel().zoomTime(e.x,i,!0),this._prevPinchScale=t}},e.prototype.pinchEndEvent=function(){this._onTouchEvent(),this._pinching=!1},e.prototype.mouseClickEvent=function(e){this._onMouseEvent(),this._mouseClickOrTapEvent(e)},e.prototype.tapEvent=function(e){this._onTouchEvent(),this._mouseClickOrTapEvent(e)},e.prototype.mouseDownEvent=function(e){this._onMouseEvent(),this._mouseDownOrTouchStartEvent(e)},e.prototype.touchStartEvent=function(e){this._onTouchEvent(),this.hasState()&&(this._chart.setActivePaneWidget(this),this._mouseDownOrTouchStartEvent(e),this._mouseOrTouchMoveEvent(e))},e.prototype.mouseUpEvent=function(e){this._onMouseEvent(),this._mouseUpOrTouchEndEvent(e)},e.prototype.touchEndEvent=function(e){this._onTouchEvent(),this._mouseOrTouchLeaveEvent(e),this._mouseUpOrTouchEndEvent(e)},e.prototype.mouseMoveEvent=function(e){this._onMouseEvent(),this._mouseOrTouchMoveEvent(e)},e.prototype.pressedMouseMoveEvent=function(e){this._onMouseEvent(),this._pressedMouseOrTouchMoveEvent(e)},e.prototype.touchMoveEvent=function(e){this._onTouchEvent(),this._pressedMouseOrTouchMoveEvent(e)},e.prototype.mouseLeaveEvent=function(e){this._onMouseEvent(),this._mouseOrTouchLeaveEvent(e)},
e.prototype.mouseDoubleClickEvent=function(e){this._onMouseEvent(),this._mouseDoubleClickOrDoubleTapEvent(e)},e.prototype.wheelClickEvent=function(e){var t,i;if(!this._chart.readOnly()){var n=this._dataSourceAtPoint(e.localX,e.localY);if(!(null===n||n.isCustom||null===n.source||((null===(t=n.hittest)||void 0===t?void 0:t.result())||0)<=h.HitTestResult.MOVEPOINT_BACKGROUND)){var o=new p.EnvironmentState(e),s=null===(i=n.hittest)||void 0===i?void 0:i.eraseMarker();if(o.control()&&void 0!==s&&n.source.processErase)n.source.processErase(this._chartUndoModel(),s);else{var a=this._chartUndoModel();a.selection().isSelected(n.source)||a.selectionMacro((function(e){e.clearSelection(),e.addSourceToSelection(Object(r.ensureNotNull)(n.source))})),this._chart.removeSelectedSources()}}}},e.prototype.doubleTapEvent=function(e){this._onTouchEvent(),this._mouseDoubleClickOrDoubleTapEvent(e)},e.prototype.longTapEvent=function(e){this._onTouchEvent(),this._longTap=!0,null===this._startTrackPoint&&this._trackingModeShouldBeActive()&&this.startTrackingMode(new o.Point(e.localX,e.localY),new o.Point(e.localX,e.localY),new p.EnvironmentState(e))},e.prototype.mouseEnterEvent=function(e){this._onMouseEvent(),this.hasState()&&(this._chart.setActivePaneWidget(this),this._setCursorPosition(e.localX,e.localY,new p.EnvironmentState(e)))},e.prototype.contextMenuEvent=function(e){this._onMouseEvent(),this._contextMenuEvent(e)},e.prototype.touchContextMenuEvent=function(e){this._onTouchEvent(),this._contextMenuEvent(e)},e.prototype.mouseDownOutsideEvent=function(){this._processOutsideClick({hittest:null,isCustom:!1,renderer:null,source:null})},e.prototype.cancelZoom=function(){this._chartModel().crossHairSource().clearSelection(),this._firstZoomPoint=null,this._preventCrossHairMove()&&this._clearCursorPosition()},e.prototype.startTrackingMode=function(e,t,i){this._startChangeLineToolParams=null,this._startMoveLineToolParams=null,this._chartUndoModel().selectionMacro((function(e){return e.clearSelection()})),this._startTrackPoint=e,this._exitTrackingModeOnNextTry=!1,this._setCursorPosition(t.x,t.y,i),this._initCrossHairPosition=this._chartModel().crossHairSource().currentPoint()},e.prototype.setDragToAnotherPaneCursor=function(){this._setCursorClassName("grabbing")},e.prototype.cloneLineTools=function(e,t){return this._chartUndoModel().cloneLineTools(e,t)},e.prototype.exitTrackingMode=function(){null!==this._state&&null!==this._startTrackPoint&&(this._exitTrackingModeOnNextTry=!0,this._tryExitTrackingMode())},e.prototype.trackingModeEnabled=function(){return null!==this._state&&null!==this._startTrackPoint},e.prototype.addCustomWidgetToLegend=function(e,t){this._options.legendWidgetEnabled&&(this._customLegendWidgetsFactoryMap.set(e,t),null!==this._legendWidget&&this._legendWidget.addCustomWidgetToLegend(e,t))},e.prototype.containsMainSeries=function(){return!!this.hasState()&&this.state().containsMainSeries()},e.prototype.paint=function(e,t){if(this._chartUndoModel()&&this.hasState()){
this._state&&(e.priceScaleSideMaxLevel("left")>U.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;c<u.length;c++){var h=u[c],d=n.dataSourceForId(h);null!==d&&l.push(d)}if(0===l.length)return!1;if(a>8){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<m--;){var v=(P=_[m]).paneViews();if(null!==v)for(var y=v.length;0<y--;){if((x=v[y].renderer(a,l))&&x.hitTest)null!==(S=x.hitTest(p,h))&&u(S,P,x,!1)}}var g=f.crossHairSource(),b=g.paneViews(s)||[];for(y=b.length-1;y>=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<w.length;++m){var P,C=(P=w[m]).paneViews()||[],x=void 0,T=void 0;for(y=0;y<C.length;y++)if(null!==(x=C[y].renderer(a,l))&&(T=x.hitTest(p,h))){r=T,i=P,n=x,c=!1;break}}var I=f.activeStrategySource().value(),M=I&&I.strategyOrdersPaneView();if(null!==M){var L=M.renderer(a,l),O=L&&L.hitTest(p,h);O&&(r=O,i=I,n=L,c=!1)}}return null===i&&this._hitTestCustomSources(h,s.customSources(d.a.Background),p,u),null===i&&null!==this._legendWidget&&(i=this._legendWidget.dataSourceAtPoint(e,t)),{source:i,hittest:r,renderer:n,isCustom:c}},e.prototype._hitTestCustomSources=function(e,t,i,n){for(var o=Object(r.ensureNotNull)(this._state),s=o.height(),a=o.width(),l=t.length-1;l>=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<e.index?t:e})).index,n=e.currentMovingPoint()||e.startMovingPoint(),r=i+(l-n.index);r<0&&(l-=r)}}})),a.model().sourcesBeingMoved().forEach((function(e){var c,u=Object(r.ensureNotNull)(e.priceScale());if(!u.isEmpty()){var h=e.ownerSource(),d=Object(r.ensure)(null===(c=h||s.state().mainDataSource())||void 0===c?void 0:c.firstValue()),p=u.coordinateToPrice(i,d);s.setCursorForTool(),a.moveSources({screen:new o.Point(t,i),logical:{index:l,price:p}},n)}}))},e.prototype._drawBackground=function(e,t){var i=this._chartModel().properties().paneProperties,n=Math.ceil(t.pixelRatio*this._size.w),r=Math.ceil(t.pixelRatio*this._size.h);i.backgroundType.value()===G.ColorType.Solid?Object(g.clearRect)(e,0,0,n+1,r+1,this.backgroundColor()):Object(b.clearRectWithGradient)(e,0,0,n+1,r+1,i.backgroundGradientStartColor.value(),i.backgroundGradientEndColor.value())},
e.prototype._drawWatermark=function(e,t){var i=this._chartModel().watermarkSource();if(null!==i){var n=this.state();if(n.containsMainSeries())for(var r=i.paneViews(),o=n.height(),s=n.width(),a=0,l=r;a<l.length;a++){var c=l[a];e.save();var u=c.renderer(o,s);u&&u.draw(e,t),e.restore()}}},e.prototype._drawCrossHair=function(e,t){var i=this._chartUndoModel().crossHairSource();i.linesShouldBeHidden()||(!i.visible&&Object(m.lockTimeAxis)().value()&&(i.setLockedPosition(Object(r.ensureNotNull)(this._state)),i.updateAllViews()),this._drawSourceImpl(i,e,t,$,Q))},e.prototype._drawActiveLineTools=function(e,t){for(var i=this._chartModel(),r=0,o=Object(n.__spreadArrays)([i.lineBeingCreated(),i.lineBeingEdited()],i.sourcesBeingMoved()).filter((function(e){return!!e}));r<o.length;r++){var s=o[r];i.paneForSource(s)===this.state()&&this._drawSourceImpl(s,e,t,$,Q)}},e.prototype._drawSources=function(e,t){for(var i=this.state(),r=i.model(),o=i.orderedSources(),s=i.customSources(d.a.Foreground),a=i.customSources(d.a.Background),l=(j=r.panes()).length-1;l>=0;l--)j[l].createDrawingsCaches();this._drawSourceImpl(r.gridSource(),e,t,$,Q),this._drawWatermark(e,t);for(var c=0,u=a;c<u.length;c++){var h=u[c];this._drawSourceImpl(h,e,t,$,X)}for(var p=0,_=o;p<_.length;p++){h=_[p];this._drawSourceImpl(h,e,t,$,X)}for(var f=0,m=s;f<m.length;f++){h=m[f];this._drawSourceImpl(h,e,t,$,X)}var v=Object(n.__spreadArrays)([r.lineBeingCreated(),r.lineBeingEdited()],r.sourcesBeingMoved()),y=r.hoveredSource();(J(y)||!o.includes(y)&&!s.includes(y))&&(y=null);for(var g=[],b=r.selection().sources().filter((function(e){return!J(e)})),S=[],w=0,P=o;w<P.length;w++){var C=(h=P[w])===y;v.includes(h)?C&&(y=null):b.includes(h)?(S.push(h),C&&(y=null)):C||g.push(h)}for(var x=0,T=a;x<T.length;x++){h=T[x];this._drawSourceImpl(h,e,t,$,Q)}for(var I=0,M=g;I<M.length;I++){h=M[I];this._drawSourceImpl(h,e,t,$,Q)}for(var L=0,O=s;L<O.length;L++){(h=O[L])!==y&&this._drawSourceImpl(h,e,t,$,Q)}for(var k=0,A=S;k<A.length;k++){h=A[k];this._drawSourceImpl(h,e,t,$,Q)}y&&this._drawSourceImpl(y,e,t,$,Q);var E=r.activeStrategySource().value();E&&this.containsMainSeries()&&this._drawSourceImpl(E,e,t,te,Q);for(var V=0,D=g;V<D.length;V++){h=D[V];this._drawSourceImpl(h,e,t,ee,Q)}for(var B=0,R=s;B<R.length;B++){(h=R[B])!==y&&this._drawSourceImpl(h,e,t,ee,Q)}for(var N=0,F=S;N<F.length;N++){h=F[N];this._drawSourceImpl(h,e,t,ee,Q)}y&&this._drawSourceImpl(y,e,t,ee,Q);var j;for(l=(j=r.panes()).length-1;l>=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<u.length;c++){var h=u[c].renderer(s,a);h&&(t.save(),r(h,t,i),t.restore())}},e.prototype._drawBarsMarks=function(e,t,i){if(this.containsMainSeries()&&!i)for(var n=0,r=this._chartUndoModel().barsMarksSources();n<r.length;n++){var o=r[n];this._drawSourceImpl(o,e,t,$,Q)}},e.prototype._updateByThemedColors=function(){null!==this._legendWidget&&this._legendWidget.updateThemedColors(this._themedTopColor),
null!==this._paneControls&&this._paneControls.updateThemedColors(this._themedTopColor)},e.prototype._scrollUndoCommandInStack=function(){var e=this._chartUndoModel().undoHistory().undoStack();if(e.isEmpty())return!1;var t=e.head();if(!(t instanceof v.a))return!1;if(t.isEmpty())return!1;var i=t.commands()[0];return i instanceof O.PriceScaleChangeUndoCommand||i instanceof L.a},e.prototype._onStateDestroyed=function(){this.setState(null)},e.prototype._getHideNotMainSourcesValue=function(){return re&&!this._chart.isActive()&&!this._chart.crossHairSyncEnabled()},e.prototype._onDataSourcesCollectionChanged=function(){this._startMoveLineToolParams=null},e.prototype._processMouseMoveForCustomHandler=function(e,t){var i=e.hittest&&e.hittest.result()===h.HitTestResult.CUSTOM;if(i&&(null===this._prevHoveredHittest||this._prevHoveredHittest.renderer!==e.renderer)){var n=e.hittest&&e.hittest.data();Object(h.tryCallCustomHandler)(t,null==n?void 0:n.mouseEnterHandler),this._prevHoveredHittest=e}if(i){n=e.hittest&&e.hittest.data();Object(h.tryCallCustomHandler)(t,null==n?void 0:n.pressedMouseMoveHandler,null==n?void 0:n.touchMoveHandler)}if(!t.isTouch&&null!==this._prevHoveredHittest&&this._prevHoveredHittest.renderer!==e.renderer){n=this._prevHoveredHittest.hittest&&this._prevHoveredHittest.hittest.data();Object(h.tryCallCustomHandler)(t,null==n?void 0:n.mouseLeaveHandler),this._prevHoveredHittest=null}},e.prototype._startChangeOrMoveLineToolIfNeeded=function(){if(null!==this._startChangeLineToolParams){var e=this._startChangeLineToolParams;this._chartUndoModel().startChangingLinetool(e.source,e.startPoint,e.pointIndex,e.envState)}if(null!==this._startMoveLineToolParams){e=this._startMoveLineToolParams;this._chartUndoModel().startMovingSources(e.source,e.startPoint,e.itemIndex,e.envState)}this._startMoveLineToolParams=null,this._startChangeLineToolParams=null},e.prototype._trackingModeShouldBeActive=function(){return!(!this._trackCrosshairOnlyAfterLongTap||this._contextMenuOpenedOnLastTap||this._crossHairShouldBeVisible())&&this._longTap},e.prototype._processOutsideClick=function(e){var t=null,i=this._chartModel();if(e.source&&(t=e.isCustom?i.customSourceName(e.source):e.source.id()),null!==this._lastClickedSource&&this._lastClickedSource.id!==t){var n=this._lastClickedSource.id,r=this._lastClickedSource.isCustom?i.customSourceForName(n):i.dataSourceForId(n);null!==r&&r.onClickOutside&&(r.onClickOutside(),this._chartModel().updateSource(r))}this._lastClickedSource=null!==t?{id:t,isCustom:e.isCustom}:null},e.prototype._mouseClickOrTapEvent=function(e){if(this.hasState()){var t=this._dataSourceAtPoint(e.localX,e.localY),i=t&&t.source,n=this._chartUndoModel();if(this._processOutsideClick(Object(r.ensureNotNull)(t)),!this._isSelectBarModeEnabled()||e.isTouch&&this.trackingModeEnabled()&&!this._exitTrackingModeOnNextTry||n.crossHairSource().trySelectCurrentBar(),t&&t.hittest&&t.hittest.result()===h.HitTestResult.CUSTOM){var o=t.hittest.data()
;Object(h.tryCallCustomHandler)(e,null==o?void 0:o.clickHandler,null==o?void 0:o.tapHandler)&&n.model().updateSource(Object(r.ensureNotNull)(i))}!e.isTouch||this._isSelectBarModeEnabled()||t&&t.source===n.crossHairSource()||this._tryExitTrackingMode(),i instanceof y.BarsMarksContainer&&t&&t.hittest&&t.hittest.data()&&i.onClicked(Object(r.ensureNotNull)(t.hittest).data()),i&&Object(f.isLineTool)(i)&&Object(l.emit)("drawing_event",i.id(),"click")}},e.prototype._mouseDownOrTouchStartEvent=function(e){if(e.isTouch&&(this._longTap=!1,this._exitTrackingModeOnNextTry=null!==this._startTrackPoint),this._contextMenuOpenedOnLastTap=!1,this._lastFinishedToolId=null,this.hasState()){if(this._terminateActiveAnimations(),e.isTouch&&this._switchTrackingModeFromAnotherPaneIfNeeded(e),document.activeElement!==document.body&&document.activeElement!==document.documentElement)document.activeElement&&document.activeElement.blur?document.activeElement.blur():document.body.focus();else{var t=document.getSelection();null!==t&&t.removeAllRanges()}Object(l.emit)("mouse_down",{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}),this._updateCommonTooltip(null);var i=this._chartUndoModel(),n=new p.EnvironmentState(e);i.mainSeries().clearGotoDateResult(),this.hideInplaceEditor();var s=this.state().defaultPriceScale();if(!s.isEmpty()&&!i.timeScale().isEmpty()){var c=i.crossHairSource();if(!e.isTouch&&"LineToolBrush"!==m.tool.value()){var u=i.lineBeingCreated(),d=null!==u?i.model().paneForSource(u):null;null!==d&&d!==this._state?this._setCursorPositionOnExternalPane(d,e.localX,e.localY,n):this._setCursorPosition(e.localX,e.localY,n)}e.isTouch&&Object(f.isLineToolName)(m.tool.value())&&("LineToolBrush"!==m.tool.value()&&null===c.pane?this._chart.updateCrossHairPositionIfNeeded():"LineToolBrush"===m.tool.value()&&this._clearCursorPosition());var _=Object(r.ensureNotNull)(this.state().mainDataSource()).firstValue(),v=s.coordinateToPrice(e.localY,Object(r.ensureNotNull)(_)),y=this._chartModel().timeScale().coordinateToIndex(e.localX);if(c.startMeasurePoint()&&c.endMeasurePoint()&&c.clearMeasure(),n.shift()&&Object(m.toolIsCursor)(m.tool.value())&&i.selection().isEmpty()&&m.tool.setValue("measure"),(e.isTouch||!this._tryStartMeasure(e,c,n,v,y))&&(e.isTouch||!this._tryFinishMeasure(e,c))&&!this._tryFinishZoom(e)&&!this._tryStartZoom(e,v,y,n)){e.isTouch&&null!==this._startTrackPoint&&(this._initCrossHairPosition=c.currentPoint(),this._startTrackPoint=new o.Point(e.localX,e.localY));var g,b=Object(r.ensureNotNull)(this._dataSourceAtPoint(e.localX,e.localY));if(!b.isCustom&&e.isTouch&&(this._preventSourceChange=null===b.source||!i.selection().isSelected(b.source)),!this._isSelectBarModeEnabled()&&!this._isScrolling){if(e.isTouch&&(Object(m.toolIsMeasure)(m.tool.value())||null!==c.measurePane()))return void this._initToolCreationModeParams(e);if(Object(f.isLineToolName)(m.tool.value())||i.lineBeingCreated())return void((!R.enabled("charting_library_base")||y>=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.localX<this._size.w;if((!L||L.source!==_)&&O){var k=u.timeScale().coordinateToIndex(e.localX);d.onSyncScrollNeeded(k)}}var A=this._isScrolling,E=this._endScroll(e);if(this._chart.draggingSource){var D=e.target,B=this._chart.paneByCanvas(D);if(B&&B!==this&&this._chart.draggingSource&&(E&&u.undoHistory().undo(),u.mergeToPane(this._chart.draggingSource,B.state())),this._chart.timeAxisByCanvas(D))if(d.isUnmergeAvailableForSource(this._chart.draggingSource))E&&u.undoHistory().undo(),u.unmergeToNewBottomPane(this._chart.draggingSource);else{var R=d.panes(),N=Object(r.ensureNotNull)(d.paneForSource(this._chart.draggingSource)),j=R.indexOf(N);j!==R.length-1&&(E&&u.undoHistory().undo(),N.isMaximized()&&this._chart.toggleMaximizePane(),u.movePane(j,R.length-1))}this._chart.draggingSource=null;var W=this._chart.getTimeScale();W&&W.restoreDefaultCursor();L=this._dataSourceAtPoint(e.localX,e.localY);for(var H=this._chart.paneWidgets(),z=0;z<H.length;z++){var G=H[z];G===this&&L&&!L.isCustom?G.setCursorForTool(L.source||void 0):G.setCursorForTool(),G.leftPriceAxisesContainer().restoreDefaultCursor(),G.rightPriceAxisesContainer().restoreDefaultCursor()}}if(!(s||g.control()||A||c)){var Y=Object(r.ensureNotNull)(this._dataSourceAtPoint(e.localX,e.localY));Y.source&&Y.source&&!Y.isCustom&&(Y.hittest&&Y.hittest.result()>h.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;t<n.length;t++){var i=n[t];if(i instanceof j.Action&&i.getLabel()===e){n.splice(t,1);break}}}));for(var r=i.top.concat(n).concat(i.bottom),o=r.length-1;o>0;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());a<l.length;a++){var c=l[a];e._legendWidget.addCustomWidgetToLegend(c,Object(r.ensureDefined)(e._customLegendWidgetsFactoryMap.get(c)))}}}))},e.prototype._loadAndCreatePaneControlsWidget=function(){var e=this;Promise.all([Promise.all([i.e(70),i.e(12),i.e("chart-widget-gui")]).then(i.bind(null,"lvAK")),Promise.all([i.e(70),i.e(12),i.e("chart-widget-gui")]).then(i.bind(null,"bdgK"))]).then((function(t){var i=t[0],n=t[1];if(!e._isDestroyed){var r=i.PaneControlsWidget;e._paneControls=new r(e._chartUndoModel(),e,{backgroundThemeName:e._chart.backgroundBasedTheme()},{
toggleMaximizePane:e._chart.toggleMaximizePane.bind(e._chart)},e._div),e._paneControls.updateWidgetModeByWidth(e._size.w),e._paneControls.updateThemedColors(e._themedTopColor),e._paneControlsResizeObserver=new n.default(e._handleRestrictLegendWidth.bind(e)),e._paneControlsResizeObserver.observe(e._paneControls.getElement())}}))},e.prototype._handleRestrictLegendWidth=function(e){if(null!==this._legendWidget&&null!==this._paneControls){var t=this._legendWidget.getElement(),i=e[e.length-1].contentRect.width;t.style.maxWidth=0!==i?"calc(100% - "+(i+Y+q)+"px)":""}},e.prototype._onMagnetStateChanged=function(){if(this._chart.isActive()){var e=this._chartModel().crossHairSource();if(!e.visible)return;var t=e.x,i=e.y;if(Object(H.a)().value())this._initialCrosshairPositionBeforeAlign=new o.Point(t,i);else{if(null===this._initialCrosshairPositionBeforeAlign)return;t=this._initialCrosshairPositionBeforeAlign.x,i=this._initialCrosshairPositionBeforeAlign.y,this._initialCrosshairPositionBeforeAlign=null}this._updateLineToolUsingMangetOrShift(t,i)}},e.prototype._onShiftKeyStateChanged=function(){if(this._chart.isActive()){var e=z.pressedKeys.value(),t=this._chartModel().crossHairSource();if(!t.visible)return;var i=t.x,n=t.y;if(16===e){if(null===this._initialCrosshairPositionBeforeAlign)return;i=this._initialCrosshairPositionBeforeAlign.x,n=this._initialCrosshairPositionBeforeAlign.y,this._initialCrosshairPositionBeforeAlign=null,this._updateLineToolUsingMangetOrShift(i,n,p.EnvironmentState.create(!1))}else 16==(255&e)&&(this._initialCrosshairPositionBeforeAlign=new o.Point(i,n),this._updateLineToolUsingMangetOrShift(i,n,p.EnvironmentState.create(!0)))}},e.prototype._updateLineToolUsingMangetOrShift=function(e,t,i){var n=this._chartModel(),r=n.lineBeingCreated();if(null!==r){null!==(a=n.paneForSource(r))&&a===this._state&&this._setCursorPosition(e,t,i)}else{var s=n.lineBeingEdited();if(null!==s){null!==(a=n.paneForSource(s))&&a===this._state&&n.changeLinePoint(new o.Point(e,t),i)}else{var a,l=n.sourcesBeingMoved();if(0!==l.length)null!==(a=n.paneForSource(l[0]))&&a===this._state&&this._alignSourcesThatBeingMoved(l,e,t,i)}}},e.prototype._showEditDialogForSource=function(e){var t=this;!this._options.propertyPagesEnabled||e.userEditEnabled&&!e.userEditEnabled()||(e===this._chartUndoModel().mainSeries()?this._chart.showGeneralChartProperties(B.TabNames.style):(Object(f.isLineTool)(e)||Object(_.isStudy)(e))&&this._chart.showChartPropertiesForSource(e).then((function(e){t._editDialog=e})))},e.prototype._initToolCreationModeParams=function(e){this._startTouchPoint=new o.Point(e.pageX,e.pageY),this._initCrossHairPosition=this._chartModel().crossHairSource().currentPoint()},e.prototype._updateCrosshairPositionInToolCreationMode=function(e,t){if(t!==this._state){var i=this._chart.paneByState(t);return i._startTouchPoint=this._startTouchPoint,i._initCrossHairPosition=this._initCrossHairPosition,void i._updateCrosshairPositionInToolCreationMode(e,t)}var n=this._chartModel().crossHairSource()
;this._chart.justActivated()&&(this._initCrossHairPosition=n.currentPoint());var s=e.pageX,a=e.pageY,l=Object(r.ensureNotNull)(this._initCrossHairPosition),c=new o.Point(s,a).subtract(Object(r.ensureNotNull)(this._startTouchPoint)),u=l.add(c);this._setCursorPosition(u.x,u.y,new p.EnvironmentState(e))},e}()},UHyS:function(e,t,i){"use strict";i.r(t),i.d(t,"StandardPivotPointsPriceAxisView",(function(){return s}));var n=i("mrSG"),r=i("KcY8"),o=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"],s=function(e){function t(t,i){var n=e.call(this)||this;n._source=t,n._data=i;var r=i.name;return n._completeName="P"===r.toUpperCase()?"P":"S"+r[1]+"/R"+r[1],n}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var n=this._source.properties();if(n.visible.value()){var r=this._completeName,s=n.levelsStyle.visibility;if(s[r]&&s[r].value()){var a=this._source.model().timeScale(),l=this._source.priceScale();if(!(a.isEmpty()||null===a.visibleBarsStrictRange()||null!==l&&l.isEmpty())){var c=this._source.customData();if(c&&c.pivots){var u=this._source.pricesView().prices()[o.indexOf(this._data.name.toUpperCase())];if(u){i.background=u.color,i.color=this.generateTextColor(u.color),i.coordinate=u.coordinate,i.floatCoordinate=u.floatCoordinate;var h=this._source.model().properties().scalesProperties;h.showStudyLastValue.value()&&(e.text=u.formatted,e.visible=!0),h.showStudyPlotLabels.value()&&(t.text=this._source.priceLabelText(this._data.name),t.visible=!0)}}}}}},t}(r.a)},UJLt:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SaveRenameDialog=void 0;var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();i("/mDy");var r=i("oNDq");function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s="yes",a="close";t.SaveRenameDialog=function(){function e(){var t=arguments.length>0&&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:'<div class="tv-dialog__section tv-dialog__section--actions i-align_right tv-dialog__section--no-border">',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;r<o.length;r++){var s=o[r],a=t.dataSourceForId(s)
;null!==a&&n.push(a)}return n.length>0?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;e<this.localStorage.length;e++){const t=this.key(e);i.push({key:t,length:String(this.getItem(t)).length})}i.sort((e,t)=>t.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<v.length;++t)if(v[t].exec(e))return!0;return!1}function T(e){m={};for(var t=0===Object.keys(e).length,i=f+".",n=r.length;n--;){var o=r.key(n);if(o&&o.substring(0,i.length)===i){if(t)b(o.substring(i.length),r.getItem(o));r.removeItem(o)}}Object.keys(e).forEach((function(t){m[t]=e[t]+""}))}n.on("settings",(function(e){var t=JSON.parse(e)
;null==t.value?delete m[t.key]:m[t.key]=t.value}));var I=new o;return document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState||document.hidden})),window.addEventListener("beforeunload",(function(){})),{loaded:!1,loadedModel:!1,getValue:g,getJSON:function(e,t){var i=g(e,void 0);if(null==i)return t;try{return JSON.parse(i)}catch(n){return S(e),t}},getBool:function(e,t){var i=g(e);return null==i?t:!(!i||"false"===i||0==+i)},getFloat:function(e,t,i){var n=g(e,void 0);if(null==n)return t;var r=parseFloat(n);if(!isFinite(r))throw new TypeError('"'+n+'" is not float (key: "'+e+'")');return r},getInt:function(e,t,i){var n=g(e,void 0);if(null==n)return t;var r=parseInt(n,10);if(!isFinite(r))throw new TypeError('"'+n+'" is not int (key: "'+e+'")');return r},setValue:b,setJSON:function(e,t,i){return b(e,JSON.stringify(t),i),c},remove:S,keys:C,keysMask:function(e,i){for(var n=C(),r=[],o=(e=new RegExp("^"+t(e).replace(/\\\*\\\*/gi,".+").replace(/\\\*/gi,"[^.]+")+"$","gi"),n.length-1);o>=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||n<this._leftDate){var r=(o.Interval.parse(this._resolution).inMilliseconds(Date.now())||0)/1e3,s=!this._leftDate,a=!s&&!!this._cache.bars.length&&this._cache.bars[0].time/1e3-n<r;if((s||!a)&&!this._endOfData)return void this._ensureRequestedTo(n)}this._pendingSubscribers=[],t.forEach((function(t){var i=e._moveSubscriberToRealtime(t);e._returnHistoryDataToSubscriber(t,i)})),this._subscribeRealtimeIfNeeded()}},e.prototype._moveSubscriberToRealtime=function(e){var t={key:e.key,onHistoryCallback:e.onHistoryCallback,barset:null};return this._subscribers.push(t),t},e.prototype._subscribeRealtimeIfNeeded=function(){!this._subscribers.length||this._realtimeOn||this._symbolInfo.expired||this._symbolInfo.expiration_date||this._subscribeRealtime()},e.prototype._subscribeRealtime=function(){var e=this;if(!this._symbolInfo.expired&&!this._realtimeOn){this._realtimeOn=!0,this._datafeed.subscribeBars(this._symbolInfo,this._resolution,(function(t){e._dwmAligner&&(t.time=e._dwmAligner.tradingDayToSessionStart(t.time)),e._putToCacheNewBar(t),e._subscribers.forEach((function(e){var i=e.barset;if(null===i)throw new Error("subscirber.barset is null");i.add(t),e.onHistoryCallback(i)}))}),c(this._symbolInfo,this._resolution),(function(){e._unsubscribeRealtime();var t=e._leftDate;e._purgeCache(),t&&e._ensureRequestedTo(t)})),this._logMessage("Subscribed to realtime")}},e.prototype._unsubscribeRealtime=function(){!this._symbolInfo.expired&&this._realtimeOn&&(this._datafeed.unsubscribeBars(c(this._symbolInfo,this._resolution)),this._logMessage("Unsubscribed from realtime"),this._realtimeOn=!1)},e.prototype._returnHistoryDataToSubscriber=function(e,t){var i=e.range,n=this._createBarset(i.from);n.count()>0?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.time<t}));return new a.BarSet(this._symbolInfo,this._cache.bars.slice(t))},e.prototype._ensureRequestedTo=function(t){var i=this;if(this._requesting&&this._logMessage("Internal error: trying to call getBars while the previous request is active",!0),
this._leftDate&&this._leftDate<t)this._processPendingSubscribers();else{var n=!this._leftDate;this._requesting=!0;var r=t,o=this._leftDate?this._leftDate-1:this._symbolInfo.expiration_date||Math.floor(e._now()/1e3);this._leftDate=t;var s=" ["+u(1e3*r)+" ... "+u(1e3*o)+"]";this._logMessage("Requesting data: "+s);var a=!1;this._datafeed.getBars(this._symbolInfo,this._resolution,r,o,(function(e,t){if(!i._destroyed)if(a)i._logMessage("getBars callback is already called before",!0);else{if(a=!0,e.length>0){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.from<e&&t.to>e}));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<e.length;r++)i(r)},e.prototype._putToCache=function(e){if(0===e.length)return!0;if(this._cache.bars.length===e.length&&this._cache.bars[0].time===e[0].time&&this._cache.bars[this._cache.bars.length-1].time===e[e.length-1].time)return this._logMessage("Time range of received data is the same as cached one. Skip the update."),!0;if(0!==this._cache.bars.length&&e[e.length-1].time===this._cache.bars[0].time&&this._cache.bars.splice(0,1),0!==this._cache.bars.length&&e[e.length-1].time>=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<i?this._cache.bars.push(e):n===i?this._cache.bars[t-1]=e:console.error("putToCacheNewBar: time violation, previous bar time: "+u(n)+" should be less or equal to new time: "+u(i))},e.prototype._alignBarsTime=function(e){if(this._dwmAligner)for(var t=0;t<e.length;t++)e[t].time=this._dwmAligner.tradingDayToSessionStart(e[t].time)},e._now=function(){return Date.now()+6e4},e}(),d=function(){function e(e,t){this._threads={},this._datafeed=e,this._dwmAlignerCreator=t}return e.prototype.destroy=function(){this._forEachThread((function(e,t){return t.destroy()})),this._threads={},delete this._datafeed},e.prototype.purgeCache=function(){this._forEachThread((function(e,t){return t.destroy()})),this._threads={}},e.prototype.subscribe=function(e,t,i,n,r){var o=c(e,t);return this._threads[o]||(this._threads[o]=this._createThread(e,t)),o+'"'+this._threads[o].addSubscription(i,n,r)},e.prototype.unsubscribe=function(e){var t=e.split('"');if(2===t.length){var i=t[0],n=parseInt(t[1]);this._threads.hasOwnProperty(i)?this._threads[i].removeSubscription(n):console.warn("Data thread doesnt exist: "+e)}else console.warn("Wrong guid format")},e.prototype._createThread=function(e,t){var i=this._dwmAlignerCreator(t,e);return new h(this._datafeed,e,t,i)},e.prototype._forEachThread=function(e){var t=this;Object.keys(this._threads).forEach((function(i){return e(i,t._threads[i])}))},e}()},WPIy:function(e,t,i){"use strict";var n=i("mrSG"),r=i("hOqT"),o=i("X0WL"),s=(i("Eyy1"),i("xDuj"));function a(e){var t="QUANDL"===(e=e||{}).exchange,i={symbolDescription:"",interval:"",exchange:"",chartStyle:"",extended:"",provider:""}
;e.description&&t?2===e.description.split("/").length?i.symbolDescription=e.description.split("/")[1]:e.description.split("'").filter((function(e){return e.length})).forEach((function(e){var t=[];t=e&&("/"===e[0]||/\d+\/\(?/.test(e))?[e]:e.split("/").filter((function(e){return e.length})),i.symbolDescription+=t[2===t.length?1:0]})):e.description?i.symbolDescription=e.description:i.symbolDescription=e.symbol;if(e.interval&&(i.interval=Object(s.translatedIntervalString)(e.interval)),t&&e.description){var n=/[\w_]+\/[\w_]+/.exec(e.description);n&&n[0]?i.provider=n[0].split("/")[0]:i.provider=e.description.split("/")[0]}return e.exchange&&(i.exchange=e.exchange),i.chartStyle=function(e){return e.inputs,8===e.style?window.t("Heikin Ashi"):""}(e),e.extended&&(i.extended=window.t("ext",{context:"shorthand_for_extended_session"})),i}i.d(t,"a",(function(){return l}));var l=function(e){function t(t,i,n,r){var o=e.call(this,i)||this;return o._series=t,o._statusViewProperties=n,o._options=r||{},o}return Object(n.__extends)(t,e),t.prototype.text=function(){return e=this._getTitleGenerationOptions(),((t=a(e)).symbolDescription+(t.interval?", "+t.interval:"")+function(e,t){return void 0===t&&(t=", "),(e.provider?""+t+e.provider:"")+(e.exchange?""+t+e.exchange:"")+(e.chartStyle?""+t+e.chartStyle:"")+(e.extended?""+t+e.extended:"")}(t)).replace(/'/g,"");var e,t},t.prototype.getSplitTitle=function(){return e=this._getTitleGenerationOptions(),t=a(e),i=t.symbolDescription.replace(/'/g,""),r=function(e){var t=[];return e.provider&&t.push(e.provider),e.exchange&&t.push(e.exchange),e.chartStyle&&t.push(e.chartStyle),e.extended&&t.push(e.extended),t}(t).map((function(e){return e.replace(/'/g,"")})),Object(n.__spreadArrays)([i,t.interval||""],r);var e,t,i,r},t.prototype.bold=function(){return!1},t.prototype.size=function(){return this._statusViewProperties.childs().fontSize.value()+"px"},t.prototype._getTitleGenerationOptions=function(){var e=this._series.symbolInfo();return{description:"ticker"===this._statusViewProperties.childs().symbolTextSource.value()?e&&e.name||void 0:Object(r.getTranslatedSymbolDescription)({pro_name:e&&e.pro_name||void 0,short_name:e&&e.name||void 0,description:e&&e.description||void 0,short_description:e&&e.short_description||void 0,local_description:e&&e.local_description||void 0,language:e&&e.language||void 0}),exchange:this._statusViewProperties.childs().showExchange.value()&&e&&e.exchange||void 0,symbol:this._series.symbol(),interval:this._statusViewProperties.childs().showInterval.value()&&!this._options.hideResolution?this._series.interval():void 0,style:this._series.properties().childs().style.value(),inputs:this._series.getInputsProperties().state(),boxSize:this._series.data().boxSize,reversalAmount:this._series.data().reversalAmount}},t}(o.a)},WPQD:function(e,t,i){"use strict";(function(e){var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Trend 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("ocVb").TrendLinePaneView
;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.stop=function(){n.prototype.stop.call(this)},s.prototype.pointsCount=function(){return 2},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Trend Line"},s.prototype.canHasAlert=function(){return!0},s.prototype._getAlertPlots=function(){return[this._linePointsToAlertPlot(this._points,null,this.properties().extendLeft.value(),this.properties().extendRight.value())]},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("auWl").TrendLineDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.prototype.template=function(){var e=n.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},s.prototype._applyTemplateImpl=function(e){n.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text||"")},s.createProperties=function(e){var t=new r("linetooltrendline",e);return s._configureProperties(t),t},s._configureProperties=function(t){n._configureProperties(t),t.hasChild("text")||t.addChild("text",new e("")),t.addExclusion("text")},t.LineToolTrendLine=s}).call(this,i("tc+8"))},"Wh/T":function(e,t,i){"use strict";var n=i("Kxc7");window.onload=function(){location.hostname.indexOf(".")>=0&&!function(){try{return/^(192|172|10)\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]/.test(location.hostname)||/^.*((?:\.local)|localhost)$/.test(location.hostname)}catch(e){return!1}}()&&setTimeout((function(){try{var e=function(){var e=0;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(e<this._bars.length)this._bars.splice(e,this._bars.length-e);else for(;this._bars.length<e;)this._bars.push(this.createBar())},inherit(l,r),l.prototype.isSynchronizable=function(){return!1},l.prototype._handleRestoringFactoryDefaults=function(){var e=Math.round(this.calculateATR());this.properties().averageHL.setValue(e)},l.prototype.destroy=function(){this.properties().onRestoreFactoryDefaults().unsubscribe(this,this._handleRestoringFactoryDefaults),r.prototype.destroy.call(this)},l.prototype.regenerate=function(){this._currentAverageHL=this._properties.averageHL.value(),this._currentVariance=this._properties.variance.value(),this._segments.forEach((function(e){e.generate()})),this.updateAllViews(),this._model.updateSource(this)},l.prototype.propertiesChanged=function(){r.prototype.propertiesChanged.call(this),this._currentAverageHL===this._properties.averageHL.value()&&this._currentVariance===this._properties.variance.value()||this.regenerate()},l.prototype.pointsCount=function(){return-1},l.prototype.translatedType=function(){return s},l.prototype.name=function(){return"Ghost Feed"},l.prototype.segmentBars=function(e){return this._segments[e].bars()},l.prototype.segments=function(){return this._segments},l.prototype.generateBars=function(e){this._segments.length<=e&&this._segments.push(new a(this,e)),this._segments[e].generate()},l.prototype.addPoint=function(e){if(this._points.length>0&&this._points[this._points.length-1].index===e.index){this._lastPoint=null,this.normalizePoints(),this.createServerPoints();for(var t=0;t<this._points.length;t++)this._createPointProperty(t);return!0}var i=r.prototype.addPoint.call(this,e);return this._finished&&(this._lastPoint=null),this._points.length>1&&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<this.points().length-1){o=this.points()[e+1].index-t.index;this._segments[e].setSize(Math.abs(o))}},l.prototype.state=function(e){var t=r.prototype.state.call(this,e);return t.segments=this._segments.map((function(e){return{bars:e.bars()}})),t},l.prototype.restoreData=function(e){var t=this;e.segments&&(this._segments=e.segments.map((function(e,i){return new a(t,i,[].concat(e.bars))}))),this._currentAverageHL=this._properties.averageHL.value(),this._currentVariance=this._properties.variance.value()},l.prototype.onData=function(e){if(r.prototype.onData.call(this,e),0===this.pointsProperty().childs().points._childs.length)for(var t=0;t<this._points.length;t++)this._createPointProperty(t);this._currentInterval!==this._model.mainSeries().interval()&&(this.regenerate(),this._currentInterval=this._model.mainSeries().interval())},l.prototype.cloneData=function(e){var t=this;this._segments=e._segments.map((function(e){return e.clone(t)}))},l.prototype.calculateATR=function(e){
var t=(void 0!==e?e:this._model).mainSeries(),i=[];t.bars().each((function(e,t){i.push(t[TradingView.HIGH_PLOT]-t[TradingView.LOW_PLOT])}));var n=0===i.length?0:i.reduce((function(e,t){return e+t}),0)/i.length;return n*=t.base()},l.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("fIc+").GhostFeedDefinitionsViewModel}.bind(null,i)).catch(i.oe)},l.createProperties=function(e){var t=new o("linetoolghostfeed",e);return l._configureProperties(t),t},l._configureProperties=function(e){r._configureProperties(e)},t.LineToolGhostFeed=l},XcdR:function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var n=i("mrSG"),r=i("txPx"),o=i("RDU5"),s=Object(r.getLogger)("Chart.ChartUndoModel"),a=function(e){function t(t,i,n){var r=e.call(this,n,!1)||this;return r._newRightOffsetAndBarSpacing=null,r.setCustomFlag("doesnt_affect_save",!0),r._model=t,r._rightOffsetAndBarSpacing=i,r}return Object(n.__extends)(t,e),t.prototype.undo=function(){if(null===this._newRightOffsetAndBarSpacing){var e=this._model.timeScale();this._newRightOffsetAndBarSpacing={barSpacing:e.barSpacing(),rightOffset:e.rightOffset()},e.setBarSpacing(this._rightOffsetAndBarSpacing.barSpacing),e.setRightOffset(this._rightOffsetAndBarSpacing.rightOffset)}else s.logDebug("TimeScaleChangeUndoCommand.undo: Command is already undone")},t.prototype.redo=function(){if(null!==this._newRightOffsetAndBarSpacing){var e=this._model.timeScale();e.setBarSpacing(this._newRightOffsetAndBarSpacing.barSpacing),e.setRightOffset(this._newRightOffsetAndBarSpacing.rightOffset),this._newRightOffsetAndBarSpacing=null}else s.logDebug("TimeScaleChangeUndoCommand.redo: Command is not undone")},t}(o.UndoCommand)},XlJ7:function(e,t,i){"use strict";function n(e,t,i,n){return(n?n+" ":"")+(i?i+" ":"")+e+"px "+t}i.r(t),i.d(t,"makeFont",(function(){return n})),i.d(t,"parseFont",(function(){return o}));var r=/(bold )?(italic )?(\d+)(px|pt) (.*)$/;function o(e){var t=r.exec(e);return null===t?null:{family:t[5],size:parseInt(t[3])*("pt"===t[4]?.75:1),bold:Boolean(t[1]),italic:Boolean(t[2])}}},Xyly:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Curve");function s(e,t){this._constructor="LineToolBezierQuadro";var r=t||s.createProperties();n.call(this,e,r),i.e("lt-pane-views").then(function(e){var t=i("4Ptp").BezierQuadroPaneView;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"Curve"},s.prototype.controlPoint=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(.5).add(i);return this.screenPointToPoint(n)},s.prototype.setLastPoint=function(e,t){n.prototype.setLastPoint.call(this,e,t),this._controlPoint=this.controlPoint()},
s.prototype.addPoint=function(e,t,i){var r=n.prototype.addPoint.call(this,e,t,!0);if(r){var o=this.controlPoint();this._points.push(o),delete this._controlPoint,i||(this.normalizePoints(),this.createServerPoints()),this._createPointProperty(2)}return r},s.prototype.restorePoints=function(e,t,i){n.prototype.restorePoints.call(this,e,t,i),this._createPointProperty(2)},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("linetoolbezierquadro",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolBezierQuadro=s},XzZr:function(e,t,i){"use strict";var n=i("ogJP").declareClassAsPureInterface;function r(){}TradingView.WEB_SOCKET_WAS_CONNECTED=!1,r.REBIND_STUDY_STANDALONE_TO_CHILD=1,r.REBIND_STUDY_CHILD_TO_STANDALONE=2,r.prototype.defaultWatchlistSymbols=function(){},r.prototype.defaultResolutions=function(){},r.prototype.availableCurrencies=function(){},r.prototype.supportedSymbolsTypes=function(){},r.prototype.supportedExchangesList=function(){},r.prototype.symbolsGrouping=function(){},r.prototype.quoteCreateSession=function(e){},r.prototype.quoteDeleteSession=function(e){},r.prototype.quoteSetFields=function(e,t){},r.prototype.quoteAddSymbols=function(e,t){},r.prototype.quoteRemoveSymbols=function(e,t){},r.prototype.quoteFastSymbols=function(e,t){},r.prototype.depthCreateSession=function(e,t,i){},r.prototype.depthDeleteSession=function(e){},r.prototype.depthSetSymbol=function(e,t){},r.prototype.depthClearSymbol=function(e){},r.prototype.depthSetScale=function(e,t){},r.prototype.chartCreateSession=function(e,t){},r.prototype.chartDeleteSession=function(e){},r.prototype.createSession=function(e,t){},r.prototype.removeSession=function(e){},r.prototype.connected=function(){},r.prototype.connect=function(){},r.prototype.disconnect=function(){},r.prototype.switchTimezone=function(e,t){},r.prototype.resolveSymbol=function(e,t,i,n,r){},r.prototype.createSeries=function(e,t,i,n,r,o,s,a){},r.prototype.removeSeries=function(e,t,i){},r.prototype.modifySeries=function(e,t,i,n,r,o,s){},r.prototype.requestMoreData=function(e,t,i,n){},r.prototype.requestMetadata=function(e,t,i){},r.prototype.isCanCreateStudy=function(e,t){},r.prototype.createStudy=function(e,t,i,n,r,o,s){},r.prototype.rebindStudy=function(e,t,i,n,r,o,s,a){},r.prototype.removeStudy=function(e,t,i){},r.prototype.modifyStudy=function(e,t,i,n,r){},r.prototype.createPointset=function(e,t,i,n,r,o,s){},r.prototype.modifyPointset=function(e,t,i,n,r){},r.prototype.removePointset=function(e,t,i){},r.prototype.requestMoreTickmarks=function(e,t,i,n){},r.prototype.requestFirstBarTime=function(e,t,i,n){},r.prototype._invokeHandler=function(e,t){},r.prototype._sendRequest=function(e,t){},r.prototype._onMessage=function(e){},r.prototype._convertTimescaleResponse=function(e){},
r.prototype._dispathNotification=function(e){},r.prototype._invokeNotificationHandler=function(e,t,i){},r.prototype._notifySessions=function(e){},r.prototype.unpack=function(e){},r.prototype.searchSymbols=function(e,t,i,n,r,o,s,a,l,c){},r.prototype.serverTimeOffset=function(){},r.prototype.getMarks=function(e,t,i,n,r){},r.prototype.getTimescaleMarks=function(e,t,i,n,r){},n(r,"ChartApiInterface"),e.exports.HandlerInfo=function(e,t){this.handler=e,this.customId=t},e.exports.ChartApiInterface=r},Y5iK:function(e,t,i){"use strict";i.r(t),i.d(t,"MainSeriesScaleRatioProperty",(function(){return o}));var n=i("aIyQ"),r=i.n(n),o=function(){function e(e){this._changed=new r.a,this._model=e}return e.prototype.getStepChangeValue=function(){return.1},e.prototype.getMinValue=function(){return 1e-7},e.prototype.getMaxValue=function(){return 99999999},e.prototype.value=function(){return this._model.mainSeriesScaleRatio()},e.prototype.setValue=function(e,t){(e!==this.value()||t)&&(this._model.setMainSeriesScaleRatio(e),this._onChanged())},e.prototype.state=function(){return null},e.prototype.clone=function(){return new e(this._model)},e.prototype.listeners=function(){return this._changed},e.prototype.subscribe=function(e,t){this._changed.subscribe(e,t)},e.prototype.unsubscribe=function(e,t){this._changed.unsubscribe(e,t)},e.prototype.unsubscribeAll=function(e){this._changed.unsubscribeAll(e)},e.prototype._onChanged=function(){this._changed.fire(this)},e}()},Y7w9:function(e,t,i){"use strict";i.r(t),i.d(t,"lowerbound",(function(){return o})),i.d(t,"lowerbound_int",(function(){return s})),i.d(t,"upperbound",(function(){return a})),i.d(t,"upperbound_int",(function(){return l})),i.d(t,"subtract",(function(){return c})),i.d(t,"moveToHead",(function(){return u})),i.d(t,"moveAfter",(function(){return h})),i.d(t,"moveBefore",(function(){return d}));var n=i("mrSG");function r(e,t){return e<t}function o(e,t,i,n,r){void 0===n&&(n=0),void 0===r&&(r=e.length);for(var o=r-n;0<o;){var s=o>>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<o;){var s=o>>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))})),i<e.length-1&&(i=s(a,i+1)),o.splice.apply(o,Object(n.__spreadArrays)([i,0],t)),o}function d(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))})),i<=e.length-1&&(i=s(a,i)),o.splice.apply(o,Object(n.__spreadArrays)([i,0],t)),o}},YCFM:function(e,t,i){},YTCC:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHexColorByName=t.colorsPalette=void 0
;var n=i("W3MX"),r=i("f+Sq"),o={},s=Object.keys(n).length,a=/^#[0-9A-F]{6}$/i;Object.keys(n).forEach((function(e){var t=function e(t,i){void 0===i&&(i=[]);var r=n[t];if(!r)return null;if(a.test(r))return r;var o=r;return i.push(t),-1!==i.indexOf(o)?(console.warn("Colors definitions cycled"),r):i.length>s?(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;u<h.length;u++){var d=h[u];if(d.isVisible()){var p=d.symbolInfo();if(null===p){t=null;break}Object(n.assert)(void 0!==p.original_currency_code,d.symbol()+": symbol info should have original_currency_code");var _=Object(n.ensureDefined)(p.original_currency_code);if(null===(g=d.currency())){t=null;break}a=a&&_===g,r.add(g),i.add(_),void 0===s?s=g:null!==s&&s!==g&&(s=null),e.has(g)||(o=!0),l+=1}}if(null!==t)for(var f=0,m=this._priceDataSources;f<m.length;f++){var v=m[f];if(!this._seriesLikeSourcesSet.has(v)){var y=v;if(y.isCurrencySource()&&y.isVisible()){var g;if(null===(g=y.currency())){t=null;break}r.add(g),c+=1,e.has(g)||(o=!0);var b=Object(n.ensureNotNull)(y.symbolSource());if(!this._seriesLikeSourcesSet.has(b)||!b.isVisible()){if(l>0)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 e<t?-1:e>t?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<n*o||r*o<s;)s<n*o?o*=.1:r*o<s&&(o*=10);for(var l=r*o,c=a.length-2;c>=0&&!(a[c]*o<s);--c)l=a[c]*o;return e.price=t.price+(i>=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]<i);--n);return n+=i>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=$('<div class="chart-widget"/>',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;t<this._paneWidgets.length;t++)if(this._paneWidgets[t].hasCanvas(e))return this._paneWidgets[t];return null},we.prototype.paneByState=function(e){for(var t=0;t<this._paneWidgets.length;t++)if(this._paneWidgets[t].state()===e)return this._paneWidgets[t];return null},we.prototype.timeAxisByCanvas=function(e){return this._timeAxisWidget.hasCanvas(e)?this._timeAxisWidget:null},we.prototype.properties=function(){return this._properties},we.prototype.emulateCriticalError=function(){this._chartSession.removeSeries("-1",null)},we.prototype.readOnly=function(){return this._readOnly},we.prototype.onDisconnected=function(){return this._disconnected},we.prototype.onReconnectBailout=function(){return this._reconnectBailout},we.prototype.onConnected=function(){return this._connected},we.prototype.onRedraw=function(){return this._redraw},we.prototype.onScroll=function(){return this._onScroll},we.prototype.modelCreated=function(){return this._modelCreated},we.prototype.setResolution=function(e){if(this._model){
var t=this._model.mainSeries().properties(),i=window.t("Change Resolution");this._model.setResolutionProperty(t.interval,e,this,i)}else this._properties.mainSeriesProperties.merge({interval:e})},we.prototype.getResolution=function(){return this._model?this._model.mainSeries().properties().interval.value():this._properties.mainSeriesProperties.interval.value()},we.prototype.addOverlayStudy=function(e,t){var i=this.model();return this._options.isSymbolAvailable(e).then((function(n){if(!n)return null;var r=i.createStudyInserter({type:"java",studyId:"Overlay@tv-basicstudies"});if(d.enabled("use_overrides_for_overlay")){var o=re.factoryDefaults("study_Overlay@tv-basicstudies.style");r.setPropertiesState({style:o})}return r.setForceOverlay(t),r.insert((function(){return Promise.resolve({symbol:e})}))}))},we.prototype.addCompareStudy=function(e){var t=this.model();return this._options.isSymbolAvailable(e).then((function(i){return i?t.createStudyInserter({type:"java",studyId:"Compare@tv-basicstudies"}).insert((function(){return Promise.resolve({symbol:e})})):null}))},we.prototype.updateActions=function(){for(var e=this.actions(),t=this._model.dataSources(),i=!1,n=!1,r=0,o=t.length;r<o;r++){var s=t[r];TradingView.isInherited(s.constructor,C)&&s.isUserDeletable()&&(i=!0),TradingView.isInherited(s.constructor,S)&&s.removeByRemoveAllStudies()&&(n=!0),TradingView.isInherited(s.constructor,w)&&(n=!0)}this._readOnly||(e.paneRemoveAllStudies&&e.paneRemoveAllStudies.update({disabled:!n}),e.paneRemoveAllDrawingTools&&e.paneRemoveAllDrawingTools.update({disabled:!i}),e.paneRemoveAllStudiesDrawingTools&&e.paneRemoveAllStudiesDrawingTools.update({disabled:!n&&!i}));var a=this,l=[],c=function(e){return e.id===a.model().model().properties().timezone.value()};Z.forEach((function(e){if(!e.separator){var t=new L({label:e.title,checkable:!0,checked:c(e),statName:"SetTimeZone",onExecute:function(){a.model().setProperty(a.model().model().properties().timezone,e.id,"Changed Time Zone")}});l.push(t)}}),this),e.applyTimeZone.update({subItems:l}),e.addToWatchlist&&e.addToWatchlist.update({label:window.t("Add to Watchlist {0}").format(this.getSymbol(!0))}),e.addToTextNotes&&e.addToTextNotes.update({label:window.t("Add Text Note for {0}").format(this.getSymbol(!0))})},we.prototype.applyTheme=function(e){var t=this;Promise.resolve().then(function(n){var r=i("EsvI");e=e||r.getCurrentTheme().name,r.loadTheme(e,!0,!0,t._chartWidgetCollection)}.bind(null,i)).catch(i.oe)},we.prototype.actions=function(){return null===this._actions&&this._setActions(),this._actions},we.prototype._setActions=function(){var e,t=this,n=[];if(!this._readOnly){n=[new L({label:window.t("Eraser"),payload:"eraser",statName:"Eraser"}),new O,new L({label:window.t("Trend Line"),payload:"LineToolTrendLine",statName:"LineToolTrendLine"}),new L({label:window.t("Horizontal Line"),payload:"LineToolHorzLine",statName:"LineToolHorzLine"}),new L({label:window.t("Vertical Line"),payload:"LineToolVertLine",statName:"LineToolVertLine"}),new L({label:window.t("Arrow"),payload:"LineToolArrow",
statName:"LineToolArrow"}),new L({label:window.t("Ray"),payload:"LineToolRay",statName:"LineToolRay"}),new L({label:window.t("Extended"),payload:"LineToolExtended",statName:"LineToolExtended"}),new L({label:window.t("Parallel Channel"),payload:"LineToolParallelChannel",statName:"LineToolParallelChannel"}),new O,new L({label:window.t("Pitchfork"),payload:"LineToolPitchfork",statName:"LineToolPitchfork"}),new L({label:window.t("Schiff Pitchfork"),payload:"LineToolSchiffPitchfork",statName:"LineToolSchiffPitchfork"}),new L({label:window.t("Pitchfan"),payload:"LineToolPitchfan",statName:"LineToolPitchfan"}),new L({label:window.t("Gann Square"),payload:"LineToolGannSquare",statName:"LineToolGannSquare"}),new L({label:window.t("Gann Fan"),payload:"LineToolGannFan",statName:"LineToolGannFan"}),new L({label:window.t("Fib Retracement"),payload:"LineToolFibRetracement",statName:"LineToolFibRetracement"}),new L({label:window.t("Trend-Based Fib Extension"),payload:"LineToolTrendBasedFibExtension",statName:"LineToolTrendBasedFibExtension"}),new L({label:window.t("Fib Speed Resistance Fan"),payload:"LineToolFibSpeedResistanceFan",statName:"LineToolFibSpeedResistanceFan"}),new L({label:window.t("Fib Time Zone"),payload:"LineToolFibTimeZone",statName:"LineToolFibTimeZone"}),new L({label:window.t("Circle Lines"),payload:"LineToolCircleLines",statName:"LineToolCircleLines"}),new L({label:window.t("Fib Circles"),payload:"LineToolFibCircles",statName:"LineToolFibCircles"}),new L({label:window.t("Fib Speed Resistance Arcs"),payload:"LineToolFibSpeedResistanceArcs",statName:"LineToolFibSpeedResistanceArcs"}),new O,new L({label:window.t("Rectangle"),payload:"LineToolRectangle",statName:"LineToolRectangle"}),new L({label:window.t("Ellipse"),payload:"LineToolEllipse",statName:"LineToolEllipse"}),new L({label:window.t("Triangle"),payload:"LineToolTriangle",statName:"LineToolTriangle"}),new L({label:window.t("Polyline"),payload:"LineToolPolyline",statName:"LineToolPolyline"}),new L({label:window.t("Path"),payload:"LineToolPath",statName:"LineToolPath"}),new L({label:window.t("Arc"),payload:"LineToolArc",statName:"LineToolArc"}),new O,new L({label:window.t("Text",{context:"tool"}),payload:"LineToolText",statName:"LineToolText"}),new L({label:window.t("Anchored Text"),payload:"LineToolTextAbsolute",statName:"LineToolTextAbsolute"}),new L({label:window.t("Balloon"),payload:"LineToolBalloon",statName:"LineToolBalloon"}),new L({label:window.t("Price Label"),payload:"LineToolPriceLabel",statName:"LineToolPriceLabel"}),new O,new L({label:window.t("Elliott Wave Subminuette"),payload:"LineToolElliottSubminuette",statName:"LineToolElliottSubminuette"}),new L({label:window.t("Elliott Wave Minor"),payload:"LineToolElliottMinor",statName:"LineToolElliottMinor"}),new L({label:window.t("Elliott Wave Circle"),payload:"LineToolElliottCircle",statName:"LineToolElliottCircle"}),new L({label:window.t("Elliott Minor Retracement"),payload:"LineToolElliottMinorRetr",statName:"LineToolElliottMinorRetr"}),new L({label:window.t("Elliott Major Retracement"),
payload:"LineToolElliottMajorRetr",statName:"LineToolElliottMajorRetr"}),new O,new L({label:window.t("Brush"),payload:"LineToolBrush",statName:"LineToolBrush"}),new O,new L({label:window.t("Forecast"),payload:"LineToolPrediction",statName:"LineToolPrediction"})];for(var r=function(e){k.tool.setValue(e.getPayload())},o=0;o<n.length;o++)n[o]instanceof L&&n[o].update({onExecute:r});e=new L({label:window.t("Settings..."),icon:i("MXV9"),statName:"ScalesProperties",onExecute:function(){t.showGeneralChartProperties(m.scales)}})}this._hotkeys.add({desc:"Maximize",hotkey:g.Modifiers.Alt+13,handler:function(){t.toggleFullscreen()},isDisabled:function(){return!t._options.fullscreenable.value()}}),this._hotkeys.add({desc:"Cancel selection",hotkey:27,handler:function(){t._model.selectionMacro((function(e){t._cancelCreatingLine(),e.clearSelection()}))},isDisabled:function(){var e=0===t._model.selection().sources().length,i=null===t._model.crossHairSource().measurePane(),n=e&&i;return!t._model||n}}),t.withModel(null,(function(){var e=function(){t._hotkeys.promote()};t._model.onSelectedSourceChanged().subscribe(null,e),t._model.crossHairSource().measuringStarted().subscribe(null,e)}));var s=new L({label:window.t("Reset Chart"),icon:i("LdoW"),statName:"ResetChart",onExecute:this.GUIResetScales.bind(this),hotkeyGroup:this._hotkeys,hotkeyHash:g.Modifiers.Alt+82}),a=new L({label:window.t("Invert Scale"),statName:"Invert Scale",checkable:!0,onExecute:function(){t._model.invertPriceScale(t._model.mainSeries().priceScale())},hotkeyGroup:this._hotkeys,hotkeyHash:g.Modifiers.Alt+73}),l=new L({label:window.t("Auto (Fits Data To Screen)"),checkable:!0,onExecute:function(){var e=t._model.mainSeries().priceScale();t._model.togglePriceScaleAutoScaleMode(e),l.update({checked:e.isAutoScale()})}}),c=new L({label:window.t("Lock Price To Bar Ratio"),checkable:!0,statName:"ToggleLockScale",onExecute:function(){t._model.togglePriceScaleLockScaleMode(t._model.mainSeries().priceScale())}}),u=new L({label:window.t("Regular"),checkable:!0,statName:"ToggleRegularScale",onExecute:function(){var e=t._model.mainSeries().priceScale();t._model.setPriceScaleRegularScaleMode(e),u.update({checked:e.isRegular()})}}),h=new L({label:window.t("Percent"),checkable:!0,statName:"TogglePercantage",onExecute:function(){t._model.togglePriceScalePercentageScaleMode(t._model.mainSeries().priceScale())},hotkeyGroup:this._hotkeys,hotkeyHash:g.Modifiers.Alt+80}),_=new L({label:window.t("Indexed to 100"),checkable:!0,statName:"ToggleIndexedTo100",onExecute:function(){t._model.togglePriceScaleIndexedTo100ScaleMode(t._model.mainSeries().priceScale())}}),b=new L({label:window.t("Logarithmic"),statName:"ToggleLogScale",checkable:!0,onExecute:function(){t._model.togglePriceScaleLogScaleMode(t._model.mainSeries().priceScale())},hotkeyGroup:this._hotkeys,hotkeyHash:g.Modifiers.Alt+76}),S=new L({label:window.t("Undo"),onExecute:function(){te("GUI","Undo"),t._model.undoHistory().undo()},disabled:!0,hotkeyGroup:this._hotkeys,hotkeyHash:g.Modifiers.Mod+90}),w=new L({label:window.t("Redo"),
onExecute:function(){te("GUI","Redo"),t._model.undoHistory().redo()},disabled:!0,hotkeyGroup:this._hotkeys,hotkeyHash:g.Modifiers.Mod+89});t.withModel(null,(function(){t._model.undoHistory().undoStack().onChange().subscribe(t,t.updateUndoRedo),t._model.undoHistory().redoStack().onChange().subscribe(t,t.updateUndoRedo)}));var P=[new L({label:window.t("Loading")})],C=new L({name:"apply-color-theme",label:window.t("Color Theme"),icon:i("opke"),subItems:P,statName:"ColorTheme"}),x=new L({label:window.t("Time Zone"),statName:"TimeZone"}),T=function(e,t){z.symbol.setValue(e),t&&(V(t),z.interval.setValue(t))},I=new L({label:window.t("Change Symbol..."),statName:"ChangeSymbol",onExecute:function(){G({callback:T,ownerDocument:t._jqParent.prop("ownerDocument")})}});!d.enabled("symbol_search_hot_key")||this.readOnly()||this._hideSymbolSearch||_e((function(){G({callback:T,ownerDocument:t._jqParent.prop("ownerDocument")})})),f("symboledit.dialog_last_entry","");var M={label:window.t("Change Interval..."),statName:"ChangeInterval",onExecute:function(){U({callback:function(e){V(e),z.interval.setValue(e)},ownerDocument:t._jqParent.prop("ownerDocument")})}};var A,E,D=new L(M);TradingView.onWidget()||(this._options.addToWatchlistEnabled&&(A=new L({label:window.t("Add To Watchlist"),icon:i("a9Kt"),statName:"AddToWatchlist",onExecute:function(){if(window.widgetbar){for(var e,i=window.widgetbar.setPage("base"),n=0;n<i.widgets.length;n++)if("watchlist"===i.widgets[n].type){e=i.widgets[n].widgetObject;break}if(!e)return;e.addSymbols([t.getSymbol()])}},hotkeyGroup:this._hotkeys,hotkeyHash:g.Modifiers.Alt+87})),E=new L({label:window.t("Add To Text Notes"),statName:"AddToTextNotes",onExecute:function(){runOrSignIn((function(){TradingView.bottomWidgetBar&&(TradingView.bottomWidgetBar.toggleWidget("text_notes",!0),TradingView.bottomWidgetBar._widgets.text_notes.addNote(null,t.getSymbol(!0),t.getSymbol()))}),{source:"Add text note in chart context menu"})},hotkeyGroup:this._hotkeys,hotkeyHash:g.Modifiers.Alt+78}));var B=new L({label:window.t("Reset Time Scale"),icon:i("LdoW"),statName:"ResetScale",onExecute:function(){t.model().resetTimeScale()},hotkeyGroup:this._hotkeys,hotkeyHash:g.Modifiers.Mod+g.Modifiers.Alt+81}),R=new L({label:window.t("Insert Drawing Tool"),subItems:n,statName:"InsertDravingTool"}),N=new L({label:window.t("Remove Indicators"),statName:"RemoveAllIndicators",onExecute:this.removeAllStudies.bind(this)}),W=new L({label:window.t("Remove Drawings"),statName:"RemoveAllDrawingTools",onExecute:this.removeAllDrawingTools.bind(this)}),H=new L({label:window.t("All Indicators And Drawing Tools"),statName:"RemoveAllIndicatorsAndDrawingTools",onExecute:this.removeAllStudiesDrawingTools.bind(this)}),Y=this.chartWidgetCollection(),q=new L({label:window.t("Apply these Indicators to Entire Layout"),statName:"ApplyIndicatorsToAllCharts",onExecute:function(){Y.applyIndicatorsToAllCharts(t)}}),K=new L({label:window.t("Insert Indicator..."),statName:"InsertIndicator",onExecute:function(){t.showIndicators()},hotkeyGroup:this._hotkeys,
hotkeyHash:191});new L({label:window.t("Insert Indicator..."),statName:"InsertIndicator",onExecute:function(){t.showIndicators()},hotkeyGroup:this._hotkeys,hotkeyHash:111});var Z,J=new L({label:window.t("Compare or Add Symbol..."),statName:"CompareOrAddSymbol",onExecute:this.toggleCompareOrAdd.bind(this)}),X=new L({label:window.t("Compare..."),statName:"Compare",onExecute:this.toggleCompareOrAdd.bind(this)}),Q=(new L({label:window.t("Object Tree..."),statName:"ObjectsTree",onExecute:this.showObjectsTreePanelOrDialog.bind(this)}),new L({label:window.t("Settings..."),icon:i("MXV9"),statName:"ChartProperties",onExecute:function(){t.showGeneralChartProperties()}})),$=new L({label:window.t("Settings..."),icon:i("MXV9"),statName:"MainSeriesProperties",onExecute:function(){t.showGeneralChartProperties(m.style)}}),ee=new L({label:window.t("Lock/Unlock"),statName:"ToggleLockSelectedObject",onExecute:this.toggleLockSelectedObject.bind(this)}),ie=new L({label:window.t("Hide"),icon:i("DYI2"),statName:"HideSelectedObject",onExecute:this.hideSelectedObject.bind(this)});d.enabled("property_pages")&&(Z=new L({label:window.t("Settings..."),icon:i("MXV9"),statName:"EditSelectedObject",onExecute:function(){t.showSelectedSourceProperties()}})),this.withModel(null,(function(){t.model().mainSeries().properties().priceAxisProperties.subscribe(t,t._updateScalesActions)}));var ne=new L({label:window.t("Scale Price Chart Only"),checkable:!0,statName:"ScalePriceChartOnly"});ne.binder=new p(ne,this._properties.scalesProperties.scaleSeriesOnly,this.model(),window.t("Scale Price Chart Only"));var re=this.model().model();this._properties.scalesProperties.scaleSeriesOnly.listeners().subscribe(null,(function(){re.recalculateAllPanes(),re.invalidate(j.full())}));var oe=new L({label:window.t("Drawings Toolbar"),checkable:!0,statName:"ToggleDrawingToolbar"}),se=this._options.isDrawingToolbarVisible;se&&(se.subscribe((function(e){oe.update({checked:e})}),{callWithLast:!0}),oe.update({onExecute:function(){se.setValue(!se.value())}}));var ae=new L({label:window.t("Stay in Drawing Mode"),checkable:!0,statName:"ToggleStayInDrawingMode"});ae.binder=new p(ae,k.properties().stayInDrawingMode,this.model(),window.t("Stay In Drawing Mode"));var le=new L({label:window.t("Sync drawings to all charts"),checkable:!0,statName:"ToggleSyncDrawings"});le.binder=new p(le,k.properties().drawOnAllCharts,this.model(),"SyncDrawings");var ce=new L({label:window.t("Lock All Drawing Tools"),checkable:!0,statName:"ToggleLockDrawings"});ce.binder=new p(ce,k.lockDrawings(),this.model(),window.t("Lock drawings"),(function(){k.lockDrawings().setValue(this.value())}));var ue=new L({label:window.t("Hide All Drawing Tools"),checkable:!0,statName:"ToggleHideAllDrawingTools",hotkeyHash:g.Modifiers.Mod+g.Modifiers.Alt+72,hotkeyGroup:this._hotkeys});ue.binder=new p(ue,k.hideAllDrawings(),this.model(),window.t("Hide All Drawing Tools"),(function(){k.hideAllDrawings().setValue(this.value())}));var he=new L({label:window.t("Hide Marks On Bars"),checkable:!0,statName:"ToggleHideMarksOnBars"})
;he.binder=new p(he,k.hideMarksOnBars(),this.model(),window.t("Hide Marks On Bars"),(function(){k.hideMarksOnBars().setValue(this.value())}));var de=new L({label:window.t("Extended Trading Hours"),checkable:!0,statName:"ToggleExtendedHours"});de.binder=new p(de,this.model().mainSeries().properties().extendedHours,this.model(),window.t("Change Extended Hours"));var pe=new L({label:window.t("Symbol Last Price Label"),checkable:!0,checked:!1,statName:"ToggleSymbolLastValue"});pe.binder=new p(pe,this.properties().scalesProperties.showSeriesLastValue,this.model(),window.t("Show Symbol Last Value"));var fe=new L({label:window.t("Symbol Name Label"),checkable:!0,checked:!1,statName:"ToggleSymbolLabels"});fe.binding=new p(fe,this.properties().scalesProperties.showSymbolLabels,this.model(),"Undo Show Symbol Labels");var me=new L({label:window.t("Indicator Last Value Label"),checkable:!0,checked:!1,statName:"ToggleStudyLastValue"});me.binder=new p(me,this.properties().scalesProperties.showStudyLastValue,this.model(),window.t("Show Indicator Last Value"));var Se=new L({label:window.t("Indicator Name Label"),checkable:!0,checked:!1,statName:"ToggleIndicatorsLabels"});Se.binding=new p(Se,this.properties().scalesProperties.showStudyPlotLabels,this.model(),"Undo Show Indicator Labels");var we=new L({label:window.t("Financials Last Value Label"),checkable:!0,checked:!1,statName:"ToggleFundamentalsLastValue"});we.binder=new p(we,this.properties().scalesProperties.showFundamentalLastValue,this.model(),"Show Financials Last Value");var Pe=new L({label:window.t("Financials Name Label"),checkable:!0,checked:!1,statName:"ToggleFundamentalsLabels"});Pe.binding=new p(Pe,this.properties().scalesProperties.showFundamentalNameLabel,this.model(),"Show Financials Name Label");var Ce=new L({label:window.t("Countdown To Bar Close"),checkable:!0,checked:!1,statName:"ToggleCountdown"});Ce.binder=new p(Ce,this.model().mainSeries().properties().showCountdown,this.model(),Ce.getLabel());var xe=new L({label:window.t("Currency"),checkable:!0,checked:!0,statName:"ToggleScalesCurrency"});xe.binder=new p(xe,this.properties().scalesProperties.showCurrency,this.model(),"Change Currency Label Visibility");var Te=null;this._options.goToDateEnabled&&(Te=new L({label:window.t("Go to Date..."),statName:"GoToDate",onExecute:function(){var e=t._chartWidgetCollection.activeChartWidget.value();v(e.model())},hotkeyGroup:this._hotkeys,hotkeyHash:g.Modifiers.Alt+71}));var Ie=new L({label:window.t("Symbol Info..."),icon:i("1pHB"),checkable:!1,statName:"SymbolInfo",onExecute:function(){var e=t.model().mainSeries().symbol(),i=t.model().mainSeries().symbolInfo();F(e,{symbolInfo:i})}}),Me=new L({label:ve,statName:"MergeAllScalesToLeft",onExecute:function(){t.model().mergeAllScales("left")}}),Le=new L({label:ye,statName:"MergeAllScalesToRight",onExecute:function(){t.model().mergeAllScales("right")}}),Oe=new L({label:ge,statName:"MoveScaleToLeft",onExecute:function(){t.model().mergeAllScales("left")}}),ke=new L({label:be,statName:"MoveScaleToRight",onExecute:function(){
t.model().mergeAllScales("right")}});if(this._actions={chartProperties:Q,mainSeriesPropertiesAction:$,timeScaleReset:B,chartReset:s,invertSeriesScale:a,logSeriesScale:b,autoSeriesScale:l,lockSeriesScale:c,regularSeriesScale:u,percentSeriesScale:h,indexedTo100SeriesScale:_,compareOrAdd:J,compare:X,paneObjectTree:void 0,insertIndicator:K,insertDrawingTool:R,applyColorTheme:C,symbolSearch:I,showSymbolInfoDialog:Ie,changeInterval:D,seriesHide:ie,studyHide:ie,lineToggleLock:ee,lineHide:ie,scaleSeriesOnly:ne,drawingToolbarAction:oe,stayInDrawingModeAction:ae,syncModeAction:le,lockDrawingsAction:ce,hideAllDrawingsAction:ue,hideAllMarks:he,applyTimeZone:x,extendedHours:de,showCountdown:Ce,showCurrency:xe,showSeriesLastValue:pe,showSymbolLabelsAction:fe,showStudyLastValue:me,showStudyPlotNamesAction:Se,showFundamentalsLastValueAction:we,showFundamentalNamesAction:Pe,undo:S,redo:w,mergeLeftScalesAction:Me,mergeRightScalesAction:Le,moveScaleToLeft:Oe,moveScaleToRight:ke,moveChartAction:void 0},e&&(this._actions.scalesProperties=e),A&&(this._actions.addToWatchlist=A),d.enabled("show_source_code")&&(this._actions.viewSourceCode=new L({label:window.t("Source Code..."),statName:"OpenSelectedObjectSource",onExecute:this.openSelectedObjectSource.bind(this)})),!TradingView.onWidget()&&d.enabled("text_notes")&&(this._actions.addToTextNotes=E),null!==Te&&(this._actions.gotoDate=Te),this.createSessionBreaksActions(),!this.readOnly()){var Ae=new L({label:window.t("Remove"),icon:i("PgQx"),statName:"RemoveSelectedObject",onExecute:function(){var e;this._chartWidgetCollection&&(e=this._chartWidgetCollection.activeChartWidget.value()),e||(e=this),e.removeSelectedSources()}.bind(this),hotkeyGroup:this._hotkeys,hotkeyHash:y.isMacKeyboard?8:46});this._hotkeys.add({handler:function(){this.removeSelectedSources()}.bind(this),desc:"Remove selected source",hotkey:y.isMacKeyboard?46:8}),this._actions.insertDrawingTool=R,this._actions.paneRemoveAllStudies=N,this._actions.paneRemoveAllDrawingTools=W,this._actions.paneRemoveAllStudiesDrawingTools=H,this._actions.applyStudiesToAllCharts=q,this._actions.seriesRemove=Ae,this._actions.studyRemove=Ae,this._actions.lineRemove=Ae,d.enabled("property_pages")&&(this._actions.format=Z),this._actions.lockDrawingsAction=ce,this._actions.hideAllDrawingsAction=ue,this._actions.hideAllMarks=he}this._actions.showPriceLine=new L({label:window.t("Price Line"),checkable:!0,statName:"TogglePriceLine"}),this._actions.showPriceLine.binding=new p(this._actions.showPriceLine,this.model().mainSeries().properties().showPriceLine,this.model(),"Undo Toggle Price Line"),this.readOnly()||(this._actions.horzLineRightThere=new L({label:window.t("Draw Horizontal Line Here"),onExecute:function(){t.activePaneWidget&&t.activePaneWidget.drawRightThere("LineToolHorzLine")},hotkeyGroup:this._hotkeys,hotkeyHash:g.Modifiers.Alt+72}),this._actions.vertLineRightThere=new L({label:window.t("Draw Vertical Line Here"),onExecute:function(){t.activePaneWidget&&t.activePaneWidget.drawRightThere("LineToolVertLine")},hotkeyGroup:this._hotkeys,
hotkeyHash:g.Modifiers.Alt+86}),this._actions.crossLineRightThere=new L({label:window.t("Draw Cross Line Here"),onExecute:function(){t.activePaneWidget&&t.activePaneWidget.drawRightThere("LineToolCrossLine")},hotkeyGroup:this._hotkeys,hotkeyHash:g.Modifiers.Alt+67}),this._actions.trendLine=new L({label:window.t("Draw Trend Line"),onExecute:function(){t.activePaneWidget&&k.tool.setValue("LineToolTrendLine")},hotkeyGroup:this._hotkeys,hotkeyHash:g.Modifiers.Alt+84}),this._actions.FibRetracement=new L({label:window.t("Draw Fib Retracement"),onExecute:function(){t.activePaneWidget&&k.tool.setValue("LineToolFibRetracement")},hotkeyGroup:this._hotkeys,hotkeyHash:g.Modifiers.Alt+70})),this._updateScalesActions()},we.prototype.executeActionById=function(e){if("takeScreenshot"===e)return console.warn('Action "takeScreenshot" is deprecated. Use method "takeScreenshot" instead'),void this._chartWidgetCollection.takeScreenshot();"lockDrawingsAction"===e&&console.warn('Action "lockDrawingsAction" is deprecated. Use method "lockAllDrawingTools" instead'),"hideAllDrawingsAction"===e&&console.warn('Action "hideAllDrawingsAction" is deprecated. Use method "hideAllDrawingTools" instead'),e in this._actions?this._actions[e]instanceof L&&this._actions[e].execute():console.warn("Unknown action id: "+e)},we.prototype.getCheckableActionState=function(e){if("lockDrawingsAction"===e)return console.warn('Action "lockDrawingsAction" is deprecated. Use method "lockAllDrawingTools" instead'),null;if("hideAllDrawingsAction"===e)return console.warn('Action "hideAllDrawingsAction" is deprecated. Use method "hideAllDrawingTools" instead'),null;if(e in this._actions){var t=this._actions[e];if(t instanceof L&&t.isCheckable())return t.isChecked();console.warn("Action "+e+" has no state")}else console.warn("Unknown action id: "+e);return null},we.prototype._updateScalesActions=function(){if(null!==this._actions){var e=this.model().mainSeries(),t=e.priceScale(),i=e.properties(),n=t.isLockScale(),r=i.style.value()===h.STYLE_PNF;this._actions.percentSeriesScale.update({disabled:n||r,checked:t.isPercentage()}),this._actions.logSeriesScale.update({disabled:n||r,checked:t.isLog()}),this._actions.regularSeriesScale.update({disabled:n||r,checked:t.isRegular()}),this._actions.indexedTo100SeriesScale.update({disabled:n||r,checked:t.isIndexedTo100()}),this._actions.invertSeriesScale.update({checked:t.isInverted()}),this._actions.lockSeriesScale.update({checked:t.isLockScale()}),this._actions.autoSeriesScale.update({checked:t.isAutoScale(),disabled:t.properties().autoScaleDisabled.value()})}},we.prototype.removeAllStudies=function(){this._model.removeAllStudies()},we.prototype.removeAllDrawingTools=function(){this._model.removeAllDrawingTools()},we.prototype.removeAllStudiesDrawingTools=function(){this._model.removeAllStudiesAndDrawingTools()},we.prototype.model=function(){return this._model},we.prototype.defaultSymbol=function(){return this._defSymbol},we.prototype.connect=function(){this._handler=function(e){this._onData(e)}.bind(this),
this._boundOnChartSessionIsConnectedChanged=this._onChartSessionIsConnectedChanged.bind(this),this._chartSession.isConnected().subscribe(this._boundOnChartSessionIsConnectedChanged),this._chartSession.criticalError().subscribe(this,this._onChartSessionCriticalError),this._chartSession.connect(this._handler)},we.prototype.finishInitWithoutConnect=function(){this._chartSession.disable(),this._init(),this.chartWidgetInitialized.fire()},we.prototype.reconnect=function(){this._chartSession.disconnect(),this._chartSession.connect()},we.prototype.update=function(){if(this._model){for(var e=0;e<this._paneWidgets.length;e++)this._paneWidgets[e].update();this._timeAxisWidget&&this._timeAxisWidget.update()}},we.prototype.paint=function(e){e||(e=j.full());for(var t=0;t<this._paneWidgets.length;t++)this._paneWidgets[t].paint(e.invalidateForPane(t),!1);this._timeAxisWidget&&this._timeAxisWidget.paint(e.invalidateForTimeScale()),this._redraw.fire()},we.prototype._makeDefaultGui=function(){this._makeChartWidget(),this._makeLoadingScreen(),this._model&&(this._makeTimeAxisWidget(),this._makePaneWidgetsAndSeparators()),this.adjustSize(),this._updateScalesActions(),$(this._elMainTable).selectable(!1),this.update(),this.paint()},we.prototype.widget=function(){return this._jqMainDiv},we.prototype.restoreState=function(e,t,i){this.adjustSize();this._model.restoreState(this._content,t,i);this._setActions()},we.prototype._onBackgroundColorChanged=function(){for(var e=0;e<this._paneWidgets.length;e++)this._paneWidgets[e].setCursorForTool();this.update(),this.model().model().fullUpdate()},we.prototype.setScaleLineColor=function(e){this.scaleLineColor=e.value(),this._paneSeparators.forEach((function(e){e.update()})),this.update(),this.paint()},we.prototype.setScaleTextColor=function(e){this.scaleTextColor=e.value(),this.update(),this.paint()},we.prototype.setTimingsMeter=function(e){this._timingsMeter=e,this._updateTimingsMeterState()},we.prototype._updateTimingsMeterState=function(){var e=this._options.visible.value();null!==this._timingsMeter&&(e?this._timingsMeter.startCollect():this._timingsMeter.stopCollect())},we.prototype._update=function(e){var t=e?e.fullInvalidation():W.Full;if(null!==this._timingsMeter&&this._timingsMeter.startDraw(t),t===W.Full&&(this._model?this._updateGui():this.adjustSize()),e.invalidateForTimeScale()>W.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._paneWidgets.length;n++)this._paneWidgets[n].updateStatusWidget(e.invalidateForPane(n).fullInvalidation());this.paint(e),null!==this._timingsMeter&&this._timingsMeter.stopDraw(),e&&e.panesOrderInvalidated()&&ue.emit("panes_order_changed")},we.prototype._createVolumeIfNeeded=function(){var e=d.enabled("create_volume_indicator_by_default")&&this._options.addVolume,t=!this._content,i=d.enabled("charting_library_base"),n=d.enabled("create_volume_indicator_by_default_once"),r=this._content&&!this._content.loading
;e&&(t||i&&r&&!n)&&this._model.mainSeries().dataEvents().symbolResolved().subscribe(this,(function(){var e=this;setTimeout((function(){var t=e._model.model().mainSeries().symbolInfo();if(t){var i=!t.has_no_volume;if(!e.containsVolume()&&i){var n=re.factoryDefaults("chartproperties.volumePaneSize"),r=e._model.model().createStudyInserter({type:"java",studyId:"Volume@tv-basicstudies"});r.setForceOverlay(d.enabled("volume_force_overlay")),r.setPaneSize(n),d.enabled("hide_volume_ma")&&r.setPropertiesState({styles:{vol_ma:{visible:!1}}}),r.insert()}else if(!i&&e.containsVolume()){var o=e.model().dataSources().filter((function(e){return e instanceof S&&"Volume"===e.metaInfo().shortId}))[0];e._model.model().removeSource(o)}}}),0)}),n)},we.prototype._createSessions=function(e){var t=this.showGeneralChartProperties.bind(this,m.timezoneSessions);e.createSessions(t)},we.prototype._createPrePostMarket=function(e){},we.prototype._makeDefaultModel=function(){var e=this;if(this._content&&this._content.timeScale.points)var t={startDate:this._content.timeScale.points.items[0]};if(!this._metaInfoRepository.getInternalMetaInfoArray())throw new Error("Cannot create chart model: studies metainfo is absent");function i(){var i={readOnly:e.readOnly(),isSnapshot:!!e._containsData,timeScale:e._options.timeScale,crossHair:e._options.crossHair,esdEnabled:e._options.esdEnabled,currencyLabelEnabled:e._options.currencyLabelEnabled};void 0!==e._options.watermarkEnabled&&(i.watermarkEnabled=e._options.watermarkEnabled),void 0!==e._options.shiftVisibleRangeOnNewBar&&(i.shiftVisibleRangeOnNewBar=e._options.shiftVisibleRangeOnNewBar);var r=a(e._chartSession,(function(t){if(!(t instanceof j))throw new Error("Invalid mask");e._invalidationMask?e._invalidationMask.merge(t):e._invalidationMask=t,e._draw_planned||(e._draw_planned=!0,e._options.visible.when((function(){var t=!document.hidden,i=e.screen&&e.screen.isShown();null!==e._timingsMeter&&t&&!i&&e._timingsMeter.startWaitingDraw(),e._drawRafId=e._jqParent.prop("ownerDocument").defaultView.requestAnimationFrame(n)})))}),e._properties,t,e._metaInfoRepository,e,e._options.undoHistory,e._options.barsMarksContainersFactory,i);return e._createSessions(r.chartModel()),r}function n(){e._draw_planned=!1,e._drawRafId=0,e._inLoadingState||e._invalidationMask&&(e._invalidationMask=e._update(e._invalidationMask))}d.enabled("lean_chart_load")?this._model=this._model||i():this._model=i(),this._createVolumeIfNeeded();var r,o=function(){this._model.onTagsChanged().subscribe(this,we.prototype.onModelTagsChanged),this._initBackgroundColor(),this._updateGui(),this._modelCreated.fire(this._model),this._tagsChanged.fire();var t=this._model.mainSeries();this._defTimeframe&&t.setDefaultTimeframe(this._defTimeframe),this._model.lineCancelled().subscribe(this,this.onLineCancelled),t.dataEvents().symbolNotPermitted().subscribe(null,(function(e){t.properties().symbol.setValue(e)})),t.properties().style.unsubscribe(this,this._onChartStyleChanged),t.properties().style.subscribe(this,this._onChartStyleChanged),
t.dataEvents().completed().subscribe(this,(function(){this._addPerfMark("SeriesCompleted")}),!0),t.dataEvents().barReceived().subscribe(this,(function(){this._addPerfMark("SeriesFirstDataReceived")}),!0),this._options.handleSessionErrors&&(t.dataEvents().chartTypeNotPermitted().subscribe(null,(function(){t.properties().interval.setValue("D")})),t.dataEvents().intradaySpreadNotPermitted().subscribe(null,(function(){t.properties().interval.setValue("D")})),t.dataEvents().customIntervalNotPermitted().subscribe(null,(function(){t.properties().interval.setValue(D(R(t.properties().style.value())))})),t.dataEvents().intradayExchangeNotPermitted().subscribe(null,(function(){t.properties().interval.setValue("D")}))),this._options.handleSessionErrors&&(t.requestingIntradayWhenNotSupported.subscribe(null,(function(){t.properties().interval.setValue("D"),e._options.muteSessionErrors})),t.requestingResolutionWhenNotSupported.subscribe(null,(function(e){t.properties().interval.setValue(e)})))}.bind(this);this._content?(Se&&this._initialLoading&&(r={symbol:this._defSymbol,interval:this._defInterval,style:this._defStyle}),this.restoreState(this._content,this._containsData,r),Se&&this._defSymbol&&this.model().model().setPriceAutoScaleForAllMainSources()):this._setActions();return o()},we.prototype._onChartStyleChanged=function(){te("Chart","Chart Style "+this._model.mainSeries().getStyleShortName().toUpperCase())},we.prototype._updateGui=function(){this._model&&(this._makeTimeAxisWidget(),this._makePaneWidgetsAndSeparators(),$(this._elMainTable).selectable(!1),this.adjustSize())},we.prototype.setVisibleTimeRange=function(e,t,i,n){this._chartSession.setVisibleTimeRange(this._model.mainSeries(),e,t,i||{},n)},we.prototype._makeChartWidget=function(){},we.prototype._makeLoadingScreen=function(){if(d.enabled("lean_chart_load")){if(this.screen)return;this.screen=new we.LoadingScreen(this,this._jqParent)}else this.screen=new we.LoadingScreen(this,this._jqMainDiv)},we.prototype._setSymbol=function(e,t){if(this._model){var i=this._model.mainSeries();if(!t&&i.symbolSameAsCurrent(e))return;this._model.selectionMacro((function(e){e.clearSelection()})),this._model.setMainSeriesSymbol(e)}else this._properties.mainSeriesProperties.merge({symbol:e})},we.prototype.setSymbol=function(e,t){return this._setSymbol.apply(this,arguments)},we.prototype.loadRange=function(e){this._model&&(this.screen.show(),this._model.loadRange(e))},we.prototype.getSymbol=function(e){var t;return(t=this._model?this._model.mainSeries().properties():this._properties.mainSeriesProperties)?e&&t.shortName&&t.shortName.value()?t.shortName.value():t.symbol.value():""},we.LoadingScreen=function(e,t){this._cw=e,this.$element=$('<div class="chart-loading-screen">'),this.$shield=$('<div class="chart-loading-screen-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;n<i;n++){(a=this._paneWidgets.pop()).destroy(),(l=this._paneSeparators.pop())&&l.destroy()}for(n=i;n<t;n++){var r={contextMenuEnabled:this._options.paneContextMenuEnabled,currencyLabelEnabled:this._options.currencyLabelEnabled,handleScale:this._options.handleScale,handleScroll:this._options.handleScroll,priceScaleContextMenuEnabled:this._options.priceScaleContextMenuEnabled,symbolMarkerEnabled:this._options.symbolMarkerEnabled,legendWidgetEnabled:this._options.legendWidgetEnabled,sourceStatusesWidgetEnabled:!this._containsData,sourceStatusesWidget:this._options.sourceStatusesWidget,marketStatusWidgetEnabled:this._options.marketStatusWidgetEnabled&&!this._containsData,marketStatusWidget:this._options.marketStatusWidget,chartWarningWidgetEnabled:this._options.chartWarningWidgetEnabled&&!this._containsData,chartWarningWidget:this._options.chartWarningWidget,dataProblemWidgetEnabled:this._options.dataProblemWidgetEnabled&&!this._containsData,legendWidget:this._options.legendWidget,propertyPagesEnabled:this._options.propertyPagesEnabled,sourceSelectionEnabled:this._options.sourceSelectionEnabled,controlsEnabled:this._options.paneControlsEnabled,croppedTickMarks:this._options.croppedTickMarks,customLegendWidgetFactories:new Map(this._customLegendWidgetsFactoryMap)};void 0!==this._options.paneContextMenu&&(r.contextMenu=this._options.paneContextMenu),
void 0!==this._options.priceScaleContextMenu&&(r.priceScaleContextMenu=this._options.priceScaleContextMenu);var a=new o(this,e[n],r);if(this._paneWidgets.push(a),n>0){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;n<t;n++){var c=e[n];(a=this._paneWidgets[n]).hasState()&&a.state()===c?a.updatePriceAxisWidgets():a.setState(c)}for(n=t;n--;)this._paneWidgets[n].updateControls();this._updateThemedColor()},we.prototype._titlesProvider=function(e,t){var i=this.model(),n=this._maximizedPaneWidget?this._maximizedPaneWidget.state():i.paneForSource(i.mainSeries()),o="right"===e?n.rightPriceScales():n.leftPriceScales();if(o.length<t+1)return[];var s=o[t].orderedSources().filter((function(e){return e===i.mainSeries()||e instanceof S}));return s.reverse(),(s=r(s,i.mainSeries())).map((function(e){return e.title(!0,void 0,!1)}))},we.prototype._menuItemsProvider=function(e,t){var i=this.model(),n=this._maximizedPaneWidget?this._maximizedPaneWidget.state():i.paneForSource(i.mainSeries()),r="right"===e?n.visibleRightPriceScales():n.visibleLeftPriceScales();if(r.length<t+1)return[];var o=r[t],s=i.panes().indexOf(n),a=this._paneWidgets[s];return("right"===e?a.rightPriceAxisesContainer():a.leftPriceAxisesContainer()).findAxisWidgetForScale(o).getContextMenuActions()},we.prototype._makeTimeAxisWidget=function(){if(this._timeAxisWidget)this._timeAxisWidget.updatePriceAxisStubs();else{var e=this.model();this._timeAxisWidget=new c(this,this._options.timeScaleWidget,this._titlesProvider.bind(this),this._menuItemsProvider.bind(this),this._backgroundBasedTheme),this._elMainTable.appendChild(this._timeAxisWidget.getElement()),this._timeAxisWidget.updatePriceAxisStubs(),this._timeAxisWidget.onLabelHovered().subscribe(this,(function(t,i){var n=this._maximizedPaneWidget?this._maximizedPaneWidget.state():e.paneForSource(e.mainSeries());this.paneByState(n).highlightedPriceAxis().setValue(i?t:null),this.model().model().lightUpdate()}))}},we.prototype.insertStudy=function(e,t,i,n){var r=this;return new Promise((function(o){t?window.runOrSignIn((function(){o(r._insertStudy(e,t,i,n))}),{source:"study on study"}):o(r._insertStudy(e,t,i,n))})).catch((function(){}))},we.prototype._insertStudy=function(e,t,i,n){var r=this._model.createStudyInserter(e,t,i);r.setForceOverlay("java"===e.type&&"Volume@tv-basicstudies"===e.studyId&&d.enabled("volume_force_overlay"));var o=this,s=r.insert((function(e,t,i){return new Promise((function(r,s){n?r(n(e,t,i)):o.isSymbolicStudy(i)?(te("GUI","Confirmation dialogs","Symbol confirmation dialog"),
b(i,o.model(),r,s,"symbol")):o.hasConfirmInputs(t)?(te("GUI","Confirmation dialogs","Inputs confirmation dialog"),b(i,o.model(),r,s)):r({})}))}));return s.catch((function(e){})),s},we.prototype.hasConfirmInputs=function(e){if(void 0===e)return!1;for(var t=0;t<e.length;++t){var i=e[t];if(void 0!==i.confirm&&i.confirm)return!0}return!1},we.prototype.isSymbolicStudy=function(e){switch(e.id){case"Overlay@tv-basicstudies":case"CorrelationCoefficient@tv-basicstudies":case"Correlation Coeff@tv-basicstudies":case"Correlation - Log@tv-basicstudies-1":case"Spread@tv-basicstudies":case"Ratio@tv-basicstudies":return!0;default:return!1}},we.prototype.getPriceAxisMaxWidthByName=function(e){return"left"===e?this.maxLhsPriceAxisWidth:this.maxRhsPriceAxisWidth},we.prototype.getPriceAxisWidthChangedByName=function(e){return"left"===e?this.lhsPriceAxisWidthChanged:this.rhsPriceAxisWidthChanged},we.prototype.adjustSize=function(){var e=0,t=null===this._model?null:this._model.model().priceScaleSlotsCount(),i=new Uint32Array(null===t?0:t.left),n=new Uint32Array(null===t?0:t.right),r=pe(document.body);function o(e,t){return e+t}function a(e,t){t.forEach((function(t,i){e[i]=Math.max(e[i],t)}))}this._paneWidgets.forEach((function(t){if(!this._maximizedPaneWidget||this._maximizedPaneWidget===t){var r=t.leftPriceAxisesContainer().optimalWidths(),o=t.rightPriceAxisesContainer().optimalWidths();a(i,r),a(n,o),e+=t.stretchFactor()}}),this);var c=this._lhsAxesWidth=i.reduce(o,0),u=this._rhsAxesWidth=n.reduce(o,0),h=this._width(),d=this._height(),p=Math.max(h-c-u,0),_=this._paneSeparators.length,f=s.height(),m=this.isMaximizedPane()?0:f*_,v=null!==this._timeAxisWidget?this._timeAxisWidget.optimalHeight():0;v%2&&(v+=1);var y=m+v,g=d<y?0:d-y,b=g/e,S=0,w=!1;this._paneWidgets.forEach((function(e,t){this._model&&e.setState(this._model.panes()[t]);var o=0;if(this.isMaximizedPane())o=this._maximizedPaneWidget===e?g:0;else{var s=0;s=t===this._paneWidgets.length-1?Math.ceil((g-S)*r)/r:Math.round(e.stretchFactor()*b*r)/r,o=Math.max(s,2),S+=o}e.setPriceAxisSizes(l.LHS,o,i),e.setPriceAxisSizes(l.RHS,o,n),w=w||o!==e.height(),e.setSize(new ne(p,o)),this._model&&e.state()&&this._model.setPaneHeight(e.state(),o)}),this),null!==this._timeAxisWidget&&this._timeAxisWidget.setSizes(new ne(p,v),i,n),this._model&&this._model.setWidth(p),this._controlBarNavigation&&this._controlBarNavigation.updatePosition(),this.maxLhsPriceAxisWidth!==c&&(this.maxLhsPriceAxisWidth=c,this.lhsPriceAxisWidthChanged.fire(c)),this.maxRhsPriceAxisWidth!==u&&(this.maxRhsPriceAxisWidth=u,this.rhsPriceAxisWidthChanged.fire(u)),w&&ue.emit("panes_height_changed")},we.prototype._onChartSessionIsConnectedChanged=function(e){e?this._onConnection():this._onDisconnect()},we.prototype._onChartSessionCriticalError=function(e,t){this._disconnected.fire(!0)},we.prototype._onData=function(e){switch(e.method){case"reconnect_bailout":this._reconnectBailout.fire();break;default:this._model.onData(e)}},we.prototype._onConnection=function(){this._online=!0,this._model?(this._model.restart(),this._updateGui(),
this.update(),this.paint(),this._connected.fire()):this.requestMetadata()},we.prototype._onDisconnect=function(){this._model&&this._model.disconnect(),this._online=!1,this.update(),this.paint(),this._disconnected.fire()},we.prototype._applyStudiesOverrides=function(){Q.overrideDefaults(this._metaInfoRepository.getInternalMetaInfoArray())},we.prototype.requestMetadata=function(){this._addPerfMark("RequestMetadataStart"),this._metaInfoRepository.requestMetaInfo().then(function(){this._addPerfMark("RequestMetadataEnd"),this._inited?this.model().model().setStudiesMetaData(this._metaInfoRepository.getInternalMetaInfoArray(),this._metaInfoRepository.getMigrations()):(this._init(),this.chartWidgetInitialized.fire(),d.enabled("charting_library_base")||oe.logDebug("initialized"))}.bind(this))},we.prototype.studiesMetaData=function(){return this._model.studiesMetaData()},we.prototype.getTimeScale=function(){return this._timeAxisWidget},we.prototype.chartWidgetCollection=function(){return this._chartWidgetCollection},we.prototype.setSeriesStyle=function(e,t){this._model.setProperty(e.properties().style,t)},we.prototype.showObjectsTreePanelOrDialog=function(){throw new Error("Not implemented")},we.prototype._showChartProperties=function(e,t,i,n){t&&(f("properties_dialog.active_tab.chart",t),i.tabName=t);var r=this;return new Promise((function(t){_(e,r._model,i,r._chartWidgetCollection,n).then((function(e){t(null!==e&&e.isVisible()?e:null)}))}))},we.prototype.showGeneralChartProperties=function(e){if(!d.enabled("show_chart_property_page"))return Promise.resolve(null);var t=this;return this._showChartProperties(this._model.mainSeries(),e,{doNotCloseOnBgClick:!0,onResetToDefault:function(){t._model.restorePreferences(t._model),t.applyTheme(t)}}).then((function(e){if(null===e)return null;var i=function(){e.hide(),t._chartWidgetCollection.activeChartWidget.unsubscribe(i)};return t._chartWidgetCollection.activeChartWidget.subscribe(i),e}))},we.prototype.showChartPropertiesForSource=function(e,t,i,n){return d.enabled("property_pages")?e===this._model.model().mainSeries()?this.showGeneralChartProperties(t):((i=i||{}).onResetToDefault=this._model.restorePropertiesForSource.bind(this._model,e),this._showChartProperties(e,t,i,n)):Promise.resolve(null)},we.prototype.generalPropertiesDefinitions=function(){return this._getChartPropertyDefinitionsViewModel().then((function(e){return e.propertyPages()}))},we.prototype.propertiesDefinitionsForSource=function(e){return T(e)||P(e)||I(e)?e.getPropertyDefinitionsViewModel().then((function(e){return null===e?null:e.propertyPages()})).catch((function(e){return oe.logWarn(e),null})):Promise.resolve(null)},we.prototype.toggleCompareOrAdd=function(){this._chartWidgetCollection.toggleAddCompareDialog()},we.prototype.showIndicators=function(e){if(window.studyMarket)return window.studyMarket.isVisible()?void window.studyMarket.hide():(window.studyMarket.show(e),window.studyMarket)},we.prototype.showFundamentals=function(e){if(window.fundamentalsDialog){if(!window.fundamentalsDialog.isVisible()){
var t,i=void 0!==e?e.title(!0):void 0;if(void 0!==e){var n=e.symbolInfo();t=null===n?e.symbol():n.ticker||n.full_name}return window.fundamentalsDialog.show(t,i),window.fundamentalsDialog}window.fundamentalsDialog.hide()}},we.prototype.removeSelectedSources=function(){this.removeDataSources(this._model.selection().sources())},we.prototype.removeDataSources=function(e){var t=e.filter(function(e){return e!==this._model.mainSeries()&&e!==this._model.lineBeingCreated()&&!(e instanceof u)}.bind(this));if(0!==t.length){var i=null;P(t[0])&&(n(1===t.length,"Cannot remove several studies (no multi select for studies)"),i=t[0]);t.find((function(e){return e.hasAlert.value()&&e.isUserDeletable()}));i&&i.hasChildren()?showDeleteStudyTreeConfirm(this._model.removeSelectedSources.bind(this._model)):this._model.removeSelectedSources()}},we.prototype.unlinkSelectedLine=function(){var e=this._model,t=e.selection().sources().filter((function(e){return T(e)}));e.unlinkLines(t)},we.prototype.copyLineToOtherCharts=function(){var e=this._model,t=e.selection().sources().filter((function(e){return T(e)&&e.isSynchronizable()}));e.copyToOtherCharts(t)},we.prototype.hideSelectedObject=function(){this.hideDataSources(this._model.selection().sources())},we.prototype.hideDataSources=function(e){if(e.length){var t=e.map((function(e){return e.properties().visible})),i=e.map((function(){return!1}));this._model.setProperties(t,i,"Hide "+e[0].title())}},we.prototype.toggleLockSelectedObject=function(){var e=this._model;e.selection().sources().forEach((function(t){var i=t.properties().frozen.value();e.setProperty(t.properties().frozen,!i,(i?window.t("Unlock"):window.t("Lock"))+" "+t.title())}))},we.prototype.showSelectedSourceProperties=function(){var e=this._model.selection().sources()[0];e&&this.showSourceProperties(e)},we.prototype.showSourceProperties=function(e){var t=null;e===this._model.mainSeries()&&(t=m.style),this.showChartPropertiesForSource(e,t)},we.prototype.openSelectedObjectSource=function(e){},we.prototype.setTimeAxisVisible=function(e){this._timeAxisWidget.setVisible(e),this.adjustSize()},we.prototype.tags=function(){return this._model?this._model.calculateDefaultTags():[]},we.prototype.state=function(e,t,i){var n=this._model.state(e,t,i);return n.chartId=this.id(),n},we.prototype.asyncState=function(){return this._model.asyncState()},we.prototype.metaInfo=function(){var e=this._metaInfo;return this._model&&(e.systemTags=this._model.calculateDefaultTags()),e},we.prototype.onTagsChanged=function(){return this._tagsChanged},we.prototype.onModelTagsChanged=function(){this._tagsChanged.fire()},we.prototype.onAboutToBeDestroyed=function(){return this._aboutToBeDestroyed},we.prototype.destroy=function(){this._aboutToBeDestroyed.fire(),null!==this._removeMaximizeHotkey&&(this._removeMaximizeHotkey(),this._removeMaximizeHotkey=null),0!==this._drawRafId&&this._jqParent.prop("ownerDocument").defaultView.cancelAnimationFrame(this._drawRafId),null!==this._backgroundTopColorSpawn&&this._backgroundTopColorSpawn.destroy(),
null!==this._backgroundBottomColorSpawn&&this._backgroundBottomColorSpawn.destroy(),null!==this._timingsMeter&&(this._timingsMeter.stopCollect(),this._timingsMeter=null);for(var e=0;e<this._paneWidgets.length;e++)this._paneWidgets[e].destroy();this._paneWidgets.length=0;for(e=0;e<this._paneSeparators.length;e++)this._paneSeparators[e].destroy();for(var t in this._paneSeparators.length=0,this._controlBarNavigation&&(this._controlBarNavigation.destroy(),this._controlBarNavigation=void 0),$(window).off("visibilitychange:chart_"+this._id),$(window).off("keydown:chart_"+this._id),this._jqMainDiv&&this._jqMainDiv.remove(),this._actions){var i=this._actions[t];i instanceof L&&(i.destroy(),i.binder&&i.binder.destroy())}null!==this._timeAxisWidget&&(this._timeAxisWidget.destroy(),this._timeAxisWidget=null),null!==this._definitionsViewModel&&this._definitionsViewModel.destroy(),this._hotkeys&&(this._hotkeys.destroy(),this._hotkeys=null),this._jqMainDiv[0].removeEventListener("wheel",this._onWheelBound),he.prototype.destroy.call(this),this._chartSession.criticalError().unsubscribe(this,this._onChartSessionCriticalError),this._chartSession.isConnected().unsubscribe(this._boundOnChartSessionIsConnectedChanged),this._chartSession.destroy()},we.prototype.title=function(){return window.t("Chart Properties")},we.prototype.symbolProperty=function(){return this._model.mainSeries().properties().shortName?this._model.mainSeries().properties().shortName:this._model.mainSeries().properties().symbol},we.prototype.loadContent=function(e,t){this.screen.show();this.isMaximizedPane()&&this.toggleMaximizePane();for(var i,n=this._model.model().dataSources(),r=0;r<n.length;r++){var o=n[r];o!==this._model.mainSeries()&&this._model.model().removeSource(o,!0)}this._model.disconnect(),this.activePaneWidget=!1,this._model.mainSeries().purgeSymbolInfo(),e.loading=!0,this._content=e,this._initialLoading=Boolean(t);for(r=0;r<e.panes.length;++r)for(var s=0;s<e.panes[r].sources.length;++s)if(e.panes[r].sources[s].state.symbol){i=e.panes[r].sources[s].state;break}if(!i)throw Error("An error occured while determining main series ion the chart");this._properties.mainSeriesProperties.merge({visible:!0,symbol:i.symbol,timeframe:"",onWidget:this._onWidget,interval:i.interval||"D",style:i.style}),this._init(),z.interval.setValue(i.interval),this._model.undoHistory().clearStack()},we.prototype._contentSeriesProperties=function(){if(this._content)for(var e=this._content.panes.length;e-- >0;)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<d;p++){var _=i[p],f=i[p+1];if(f){var m=Math.round((_.x+f.x)/2),v=new o.Point(m,_.y),y=new o.Point(m,f.y);if(Math.min(Object(n.distanceToSegment)(_,v,e).distance,Object(n.distanceToSegment)(v,y,e).distance,Object(n.distanceToSegment)(y,f,e).distance)<=c)return new r.HitTestResult(r.HitTestResult.REGULAR)}}return null},e.prototype.draw=function(e,t){var i,n,r,o,a,l,c,u,h,d,p,_;if(null!==this._data&&0!==this._data.items.length){var f=this._data,m=f.lineWidth,v=f.lineStyle,y=f.lineColor,g=f.items,b=t.pixelRatio,S=Math.max(Math.floor(null!==(n=null===(i=g[0].style)||void 0===i?void 0:i.width)&&void 0!==n?n:m*b)),w=S%2?.5:0;e.save(),e.lineCap="butt",void 0!==v&&Object(s.setLineStyle)(e,v),e.beginPath(),e.moveTo(Math.round(g[0].x*b)+w,Math.round(g[0].y*b)+w);var P=g.length;e.strokeStyle=null!==(o=null===(r=g[0].style)||void 0===r?void 0:r.color)&&void 0!==o?o:y,e.lineWidth=S;for(var C=0;C<P;C++){var x=g[C],T=g[C+1],I=Math.round(x.x*b)+w,M=Math.round(x.y*b)+w;if(e.lineTo(I,M),T){var L=Math.round((x.x+T.x)/2*b)+w,O=Math.round(T.y*b)+w;e.lineTo(L,M),e.lineTo(L,O);var k=null!==(l=null===(a=x.style)||void 0===a?void 0:a.color)&&void 0!==l?l:y,A=null!==(u=null===(c=x.style)||void 0===c?void 0:c.width)&&void 0!==u?u:m,E=null!==(d=null===(h=T.style)||void 0===h?void 0:h.color)&&void 0!==d?d:y,V=null!==(_=null===(p=T.style)||void 0===p?void 0:p.width)&&void 0!==_?_:m,D=k!==E,B=A!==V;(D||B)&&(e.stroke(),D&&(e.strokeStyle=E),B&&(w=(S=Math.max(1,Math.floor(V*b)))%2?.5:0,e.lineWidth=S),e.beginPath(),e.moveTo(L,O))}}e.stroke(),e.restore()}},e}()},ZsYR:function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayStatusProvider",(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)},ZtA1:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("ytGH").LineToolWidthsProperty,s=window.t("Trend-Based Fib Extension");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("6sSH").TrendBasedFibExtensionPaneView;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,n),a.version=2,a.LevelsCount=24,a.prototype.levelsCount=function(){return a.LevelsCount},a.prototype.pointsCount=function(){return 3},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Trend-Based Fib Extension"},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.createProperties=function(e){var t=new r("linetooltrendbasedfibextension",e,!1,{range:[0,8]});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("17v9").FibDrawingsWith24LevelsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a._configureProperties=function(e){n._configureProperties(e)},a.prototype.fibLevelsBasedOnLogScale=function(){return this.properties().fibLevelsBasedOnLogScale.value()&&this.priceScale().isLog()},t.LineToolTrendBasedFibExtension=a},"Zy3/":function(e,t,i){"use strict";i.r(t),i.d(t,"CompositeRenderer",(function(){return n}));var n=function(){function e(){this._renderers=[],this._globalAlpha=1}return e.prototype.setGlobalAlpha=function(e){this._globalAlpha=e},e.prototype.append=function(e){this._renderers.push(e)},e.prototype.insert=function(e,t){this._renderers.splice(t,0,e)},e.prototype.clear=function(){this._renderers.length=0},e.prototype.draw=function(e,t){for(var i=0;i<this._renderers.length;i++)e.save(),e.globalAlpha=this._globalAlpha,this._renderers[i].draw(e,t),e.restore()},e.prototype.drawBackground=function(e,t){e.save(),e.globalAlpha=this._globalAlpha;for(var i=0;i<this._renderers.length;i++){var n=this._renderers[i];n.drawBackground&&n.drawBackground(e,t)}e.restore()},e.prototype.hitTest=function(e,t){for(var i=null,n=this._renderers.length-1;n>=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='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd"><path stroke="currentColor" d="M13 22.5H5.5a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2V14"/><path stroke="currentColor" stroke-linecap="square" d="M18.5 15.5v8m-4-4h8"/><path fill="currentColor" d="M7 8h11v1H7zm0 4h11v1H7zm0 4h5v1H7z"/></g></svg>'},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<this._listeners.length;++i){var n=this._listeners[i];if(n.object===e&&n.member===t){this._listeners.splice(i,1);break}}},n.prototype.unsubscribeAll=function(e){for(var t=this._listeners.length-1;t>=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;n<i;++n){var o=e[n];try{o.member.apply(o.object||null,arguments)}catch(s){t.logError(s.stack||s.message)}}},"undefined"!=typeof window&&(window.Delegate=n),e&&e.exports&&(e.exports=n)}).call(this,i("YuTi")(e))},aKms:function(e,t,i){
"use strict";i.r(t),i.d(t,"MarketStatusModel",(function(){return s}));var n=i("hY0g"),r=i.n(n),o=i("x2L+"),s=function(){function e(e,t){var i=this;this._marketStatus=new r.a(null),this._lastMarketStatus=null,o.b.subscribe(this,(function(){return i._update()})),this._quotesProvider=e,this._quotesProvider.quotesUpdate().subscribe(this,this._update.bind(this)),this._resetSubscription=t,this._resetSubscription.subscribe(this,this._resetStatus)}return e.prototype.destroy=function(){o.b.unsubscribeAll(this),this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._resetSubscription.unsubscribeAll(this)},e.prototype.status=function(){return this._marketStatus},e.prototype._resetStatus=function(){this._marketStatus.setValue(null)},e.prototype._update=function(e){void 0===e&&(e={}),void 0!==e.values&&(this._lastMarketStatus=e.values.current_session),"market"!==this._lastMarketStatus||o.b.value()?this._marketStatus.setValue(this._lastMarketStatus):this._resetStatus()},e}()},"aO4+":function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.x=e,this.y=t}return e.prototype.add=function(t){return new e(this.x+t.x,this.y+t.y)},e.prototype.addScaled=function(t,i){return new e(this.x+i*t.x,this.y+i*t.y)},e.prototype.subtract=function(t){return new e(this.x-t.x,this.y-t.y)},e.prototype.dotProduct=function(e){return this.x*e.x+this.y*e.y},e.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.scaled=function(t){return new e(this.x*t,this.y*t)},e.prototype.normalized=function(){return this.scaled(1/this.length())},e.prototype.transposed=function(){return new e(-this.y,this.x)},e.prototype.clone=function(){return new e(this.x,this.y)},e}();function r(e,t){return new n(e,t)}function o(e,t){return e.x===t.x&&e.y===t.y}function s(e,t,i){if(0===e&&0===t)throw new Error("A and B can not be both equal to zero.");return{A:e,B:t,C:i}}function a(e,t){return{edge:e,isPositive:t}}t.Point=n,t.point=r,t.equalPoints=o,t.line=s,t.lineThroughPoints=function(e,t){if(o(e,t))throw new Error("Points should be distinct");return s(e.y-t.y,t.x-e.x,e.x*t.y-t.x*e.y)},t.lineSegment=function(e,t){if(o(e,t))throw new Error("Points of a segment should be distinct");return[e,t]},t.halfplane=a,t.halfplaneThroughPoint=function(e,t){return a(e,e.A*t.x+e.B*t.y+e.C>0)},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<this._subcommands.length;e++)this._subcommands[e].redo()},t.prototype.undo=function(){for(var e=this._subcommands.length-1;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:'<div class="tv-dialog__section tv-dialog__section--no-border"><div class="tv-text"><p></p></div></div>',actionsWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--actions tv-dialog__section--no-border">',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<div class="tv-spinner" role="progressbar">\n\t\t\t<div class="tv-spinner__spinner-layer">\n\t\t\t\t<div class="tv-spinner__background tv-spinner__width_element"></div>\n\t\t\t\t<div class="tv-spinner__circle-clipper tv-spinner__width_element tv-spinner__circle-clipper--left"></div>\x3c!--\n\t\t\t\t--\x3e<div class="tv-spinner__circle-clipper tv-spinner__width_element tv-spinner__circle-clipper--right"></div>\n\t\t\t</div>\n\t\t</div>\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.coordinate<y?f.baselineStyle.topLineColor.value():f.baselineStyle.bottomLineColor.value()}return p},W.prototype.firstValue=function(){var e=this._model.timeScale().visibleBarsStrictRange();if(null===e)return null;var t=e.firstBar();if(0===this.data().size())return null;var i=this.data().search(t,s.NearestRight,TradingView.OPEN_PLOT);return null!==i?this._barFunction(i.value):null},W.prototype.barFunction=function(){return this._barFunction},W.prototype._updateBarFunction=function(){var e=this.priceSource()||"close";this._barFunction=I(e)},W.prototype.priceSource=function(){switch(this._properties.style.value()){case r.STYLE_LINE:return this._properties.lineStyle.priceSource.value();case r.STYLE_AREA:return this._properties.areaStyle.priceSource.value();case r.STYLE_BASELINE:return this._properties.baselineStyle.priceSource.value()}return null},W.prototype.priceRange=function(e,t){if(TradingView.isInteger(e)){if(TradingView.isInteger(t)){if(0===this.m_data.size())return null;var i,n=this.priceSource(),r=null!==(i=null!==n?this.m_data.minMaxOnRangeCached(e,t,[{name:n,offset:0}]):this.m_data.minMaxOnRangeCached(e,t,[{name:"low",offset:0},{name:"high",offset:0}]))?new T(i.min,i.max):null;return this._postProcessPriceRange(r)}R.logDebug("priceRange: incorrect endBar")
}else R.logDebug("priceRange: incorrect startBar")},W.prototype.createViews=function(){this._priceAxisViews=[];var e=new a(this);this._priceAxisViewsBase=[e];var t=new x(this);this._priceLinesAxisViews=[t],this._paneViews=[],this._labelPaneViews=[];var i=null;switch(this._properties.style.value()){case r.STYLE_BARS:i=new _(this,this._model);break;case r.STYLE_CANDLES:i=new p(this,this._model);break;case r.STYLE_HOLLOW_CANDLES:i=new d(this,this._model);break;case r.STYLE_LINE:i=new h(this,this._model);break;case r.STYLE_AREA:i=new u(this,this._model);break;case r.STYLE_BASELINE:i=new f(this,this._model),this._waterlineView=new m(this)}i&&this._paneViews.push(i),null!==this._waterlineView&&this._paneViews.push(this._waterlineView),this._paneViews.push(new F(this,this._model)),this._dataWindowView||(this._dataWindowView=new y(this,this._model)),this._legendView||(this._legendView=new g(this,this._model)),this._statusView||(this._statusView=new v(this)),this._priceAxisViews=[].concat(this._priceAxisViewsBase,this._hlinesPriceAsisViews,this._horizlinesPriceAsisViews),this._labelPaneViews.push(new l(e,this,this._model))},W.prototype.barColorer=function(){return new w(this)},W.prototype.start=function(e){this._formatter=null,o.prototype.start.apply(this,arguments),this.priceScale()&&this.priceScale().updateFormatter(),V&&this._setQuotesSymbol(this.symbol())},W.prototype._tryCreateFormatter=function(){return O(this.symbolInfo(),this.properties().minTick.value())},W.prototype.formatter=function(){return this._formatter||this._recreateFormatter(),this._formatter},W.prototype._tryChangeInputs=function(){o.prototype._tryChangeInputs.call(this),this.m_formatter=null,this.priceScale().updateFormatter()},W.prototype.title=function(e,t,i,n){var r=this._titleInParts(e,t,i,n).join(", ");return B?r.toUpperCase():r},W.prototype.titleInParts=function(e,t,i,n){var r=this._titleInParts(e,t,i,n).join(", ");return[B?r.toUpperCase():r]},W.prototype._titleInParts=function(e,t,i,n){var r=this.properties().inputs.symbol.value(),o=this.symbolInfo(),s=[];if(o){if(N){var a=this._model.mainSeries().properties().statusViewStyle.symbolTextSource.value();s.push("description"===a?o.description:o.name)}else s.push(o.name);!n&&o.exchange&&0!==o.exchange.length&&s.push([o.exchange])}else s.push(r);return s},W.prototype.bars=function(){return this.m_data},W.prototype.open=function(e){return this.bars().valueAt(e)[TradingView.OPEN_PLOT]},W.prototype.high=function(e){return this.bars().valueAt(e)[TradingView.HIGH_PLOT]},W.prototype.low=function(e){return this.bars().valueAt(e)[TradingView.LOW_PLOT]},W.prototype.close=function(e){return this.bars().valueAt(e)[TradingView.CLOSE_PLOT]},W.prototype.hl2=function(e){return(this.high(e)+this.low(e))/2},W.prototype.hlc3=function(e){return(this.high(e)+this.low(e)+this.close(e))/3},W.prototype.ohlc4=function(e){return(this.open(e)+this.high(e)+this.low(e)+this.close(e))/4},W.prototype.symbolInfo=function(){if(!this._resolvedSymbols)return null;var e=this._properties.inputs.symbol.value()
;return e&&this._resolvedSymbols[this._resolvedSymbolKey(e)]||null},W.prototype.symbolResolved=function(){return this.symbolsResolved()},W.prototype._onSymbolResolved=function(e){o.prototype._onSymbolResolved.call(this,e),V&&this._setQuotesSymbol(e);var t=this.symbolInfo();t&&this.setCurrency(k(t))},W.prototype._setQuotesSymbol=function(e){var t=this.symbolInfo(),i=A(t,e);this._quotesProvider.setQuotesSessionSymbol(i)},W.prototype.stop=function(e){o.prototype.stop.call(this,e),this._quotesProvider.setQuotesSessionSymbol(null)},W.prototype.quotes=function(){return this._quotesProvider.quotes()},W.prototype._onQuotesUpdate=function(e,t){!this._legendView||void 0===t.values.change&&void 0===t.values.change_percent||(this._legendView.update(),this._model.updateSource(this))},W.prototype.destroy=function(){this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._quotesProvider.destroy(),o.prototype.destroy.call(this)},W.prototype.lastPriceLabelFixedCoordinate=function(){return this._priceAxisViews[0]._fixedCoordinate},W.prototype.tags=function(){var e=[],t=this.symbolInfo();return t?e.push(t.name):this._properties.inputs.symbol.value()&&e.push(this._properties.inputs.symbol.value()),e},W.prototype.statusView=function(){return D?o.prototype.statusView.call(this):null},W.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e(54),i.e("study-property-pages-with-definitions")]).then(function(e){return i("WUYT").StudyOverlayDefinitionsViewModel}.bind(null,i)).catch(i.oe)},W.prototype.defaultPlotIdForAlert=function(){return""},W.prototype.changeStyles=function(){this.m_data.each((function(e,t){t[TradingView.STYLE_PLOT]=null})),o.prototype.changeStyles.call(this)},W.prototype._onCurrencyChanged=function(){this.isStarted()&&this._tryChangeInputs(),this._currencyChanged.fire()},W.prototype._getSymbolObject=function(e){var t=o.prototype._getSymbolObject.call(this,e),i=this.currency();return null!==i&&(t.currencyCode=i),t},W.prototype._resolvedSymbolKey=function(e){var t=this.currency();return e+(null===t?"":"_#_"+t)},W.prototype.valuesProvider=function(){return new b(this,this.model())},W.prototype.statusProvider=function(e){return new S(this,this.model())},t.study_Overlay=W}).call(this,i("tc+8"))},cO0S:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneRendererHistogram",(function(){return l}));var n=i("Eyy1"),r=i("aO4+"),o=i("GEp6"),s=i("Zp/P"),a=i("VdBB"),l=function(){function e(e){this._data=e}return e.prototype.draw=function(e,t){if(0!==this._data.items.length){var i=t.pixelRatio;e.fillStyle=this._data.lineColor;for(var n=Math.max(1,Math.floor(this._data.lineWidth*i)),r=n/2,o=Math.max(1,Math.floor(i)),s=Math.round(this._data.histogramBase*i)-Math.floor(o/2),a=s+o,l=0,c=this._data.items;l<c.length;l++){var u=c[l],h=n,d=r;u.style?(e.fillStyle=u.style.color,d=(h=Math.max(1,Math.floor(u.style.width*i)))/2):e.fillStyle=this._data.lineColor;var p=h%2?.5:0,_=Math.round(u.x*i)+p,f=Math.round(u.y*i),m=void 0,v=void 0;f<=s?(m=f,v=a):(m=s,v=f-Math.floor(o/2)+o),e.fillRect(Math.floor(_-d),m,h,v-m)}}},
e.prototype.hitTest=function(e){for(var t=Object(s.selectionTolerance)(this._data.lineWidth),i=new Map,l=0,c=this._data.items;l<c.length;l++){var u=c[l],h=u.x,d=u.y,p=t;if(u.style&&(i.has(u.style.width)?p=Object(n.ensureDefined)(i.get(u.style.width)):(p=Object(s.selectionTolerance)(this._data.lineWidth),i.set(this._data.lineWidth,p))),Object(o.distanceToSegment)(new r.Point(h,d),new r.Point(h,this._data.histogramBase),new r.Point(e.x,e.y)).distance<=p)return new a.HitTestResult(a.HitTestResult.REGULAR)}return null},e}()},cPgM:function(e,t,i){"use strict";i.r(t),i.d(t,"ScaledPaneRenderer",(function(){return r})),i.d(t,"ScaledPaneRendererWrapper",(function(){return o}));var n=i("mrSG"),r=function(){function e(){}return e.prototype.draw=function(e,t){e.save(),e.scale(t.pixelRatio,t.pixelRatio),e.translate(.5,.5),this._drawImpl(e,Object(n.__assign)(Object(n.__assign)({},t),{pixelRatio:1})),e.restore()},e.prototype.drawBackground=function(e,t){e.save(),e.scale(t.pixelRatio,t.pixelRatio),e.translate(.5,.5),this._drawBackgroundImpl(e,Object(n.__assign)(Object(n.__assign)({},t),{pixelRatio:1})),e.restore()},e.prototype._drawBackgroundImpl=function(e,t){},e}(),o=function(){function e(e){this._base=e}return e.prototype.hitTest=function(e,t){return this._base.hitTest(e,t)},e.prototype.draw=function(e,t){e.save(),e.scale(t.pixelRatio,t.pixelRatio),e.translate(.5,.5),this._base.draw(e,Object(n.__assign)(Object(n.__assign)({},t),{pixelRatio:1})),e.restore()},e.prototype.drawBackground=function(e,t){e.save(),e.scale(t.pixelRatio,t.pixelRatio),e.translate(.5,.5),this._base.drawBackground&&this._base.drawBackground(e,Object(n.__assign)(Object(n.__assign)({},t),{pixelRatio:1})),e.restore()},e}()},cWHH:function(e,t,i){"use strict";(function(t,n,r){var o=i("Eyy1").ensureNotNull,s=i("aO4+").Point,a=i("eJTA"),l=i("gP14").ChartModelBase,c=a.parseRgb,u=a.rgbToBlackWhiteString,h=i("CW80"),d=h.createLineTool,p=h.createLineToolProperties,_=h.isLineToolName,f=h.isLineTool,m=h.isStudyLineTool,v=i("2+aH").CrossHair,y=i("rY0k").Watermark,g=i("hY3j").Grid,b=i("/jjs").Magnet,S=i("22xp").TimeScale,w=i("fTGZ").BarsMarksContainer,P=i("qFKp").CheckMobile,C=i("H0vP").InvalidationMask,x=i("H0vP").InvalidationLevel,T=i("GVHu"),I=T.Study,M=i("Qq0B").NonSeriesStudy,L=i("3ClC"),O=L.createStudy,k=L.isStudy,A=L.isFundamentalStudy,E=T.prepareStudyProperties,V=i("K4L1"),D=i("qJq3").Series,B=i("mMWL"),R=i("wZIs").defaults,N=i("Ocx9").DefaultProperty,F=i("Qtjj").TimeSynchronizer,j=i("e3/o"),W=i("txPx").getLogger("Chart.ChartModel"),H=i("Y5iK").MainSeriesScaleRatioProperty,z=i("FaJS").scaleRatio,U=i("MROS").ModelSelection,G=i("Y7w9").subtract,Y=i("VgjZ").PriceAxisRendererOptionsProvider,q=i("KnF9").EnvironmentState,K=i("/YGI").StudyInserter,Z=i("JWMC").trackEvent,J=i("ZZnO").dateFormatProperty,X=i("/tGj").isSymbolSource,Q=i("gaBL").sourceNewCurrencyOnPinningToPriceScale,ee=i("FQhm"),te=i("jCNj"),ie=i("i126").StudyColorRotatorFactory,ne=i("Kxc7");function re(e,i,r,o,s,a,c,u){l.call(this,a,r,u),this._version=re.version,this._studiesMetaInfoRepository=s,
this._modelIntervals=[],this._rendererOptionsProvider=new Y(this),this._lastBackgroundColor=void 0,this._lastOriginalColor=void 0,this.setStudiesMetaData(this._studiesMetaInfoRepository.getInternalMetaInfoArray(),this._studiesMetaInfoRepository.getMigrations()),this._lineBeingCreated=null,this._lineBeingEdited=null,this._linePointBeingEdited=null,B.init();var h=this;this._panes=[],this.m_gridSource=new g;var d=this._readOnly?new t(R("chartproperties.paneProperties.crossHairProperties")):this._properties.paneProperties.crossHairProperties;this.m_crossHairSource=new v(this,d,this._options.crossHair),this.m_crossHairSource.selectBarMode().subscribe((function(e){if(e&&h.lineBeingCreated()){var t=B.tool.value();h.cancelCreatingLine(),B.tool.setValue(t)}})),this.m_width=0,this._tagsChanged=new n,this._lineCancelled=new n,this._magnet=new b;var p=new N("chartproperties.mainSeriesProperties");p.addExclusion("minTick"),p.addExclusion("priceAxisProperties.lockScale"),p.addExclusion("priceAxisProperties.percentage"),p.addExclusion("priceAxisProperties.indexedTo100"),p.addExclusion("priceAxisProperties.isInverted"),p.addExclusion("priceAxisProperties.log"),p.addExclusion("priceAxisProperties.logDisabled"),p.addExclusion("priceAxisProperties.percentageDisabled"),p.addExclusion("priceAxisProperties.autoScaleDisabled"),this._chartApi=e,this._invalidateHandler=i,p.merge(r.mainSeriesProperties.state()),this.m_mainSeries=new D(this,p,o),this._timeScale=new S(this,this._options.timeScale),this.createPane(void 0,{axisProperties:p.priceAxisProperties.state(["autoScale"])});var _=this._panes[0];_.setStretchFactor(2*_.stretchFactor()),_._isMainPane=!0,this._selection=new U,this._selectedSourceChanged=new n,this._properties.listeners().subscribe(this,re.prototype.propertyChangeHandler),this._properties.timezone.listeners().subscribe(null,(function(){h._chartApi&&h._chartApi.connected()&&h._chartApi.switchTimezone(h.timezone())})),this._timeScale.defaultRightOffsetProperty().listeners().subscribe(null,(function(){h.recalculateAllPanes()})),_.addDataSource(this.m_mainSeries,this._panes[0].findSuitableScale(this.m_mainSeries)),this._mainSeriesScaleRatioProperty=new H(this),this.m_mainSeries.dataEvents().completed().subscribe(this,function(){if(this.crossHairSource().update(),this._scrollingState&&this.gotoTime(),ne.enabled("fix_left_edge")&&this.m_mainSeries.endOfData()){var e=this.m_mainSeries.bars().first();null!==e&&this._timeScale.setLeftEdgeFix(e.index)}}.bind(this)),this.m_mainSeries.onIntervalChanged().subscribe(this,(function(){this._oldStartVisibleIndex=-1,this._oldEndVisibleIndex=-1})),this.m_mainSeries.dataEvents().barReceived().subscribe(this,re.prototype.updateTimeScaleBaseIndex),this.m_mainSeries.properties().symbol.listeners().subscribe(this,this.setPriceAutoScaleForAllMainSources),this._readOnly||(p.addChild("priceAxisProperties",this.m_mainSeries.m_priceScale.properties()),this._properties.paneProperties.legendProperties.showStudyTitles.listeners().subscribe(this,(function(e){
e.value()||h._properties.paneProperties.legendProperties.showStudyArguments.setValue(!1)}))),this._barsMarksSources=c(this);for(var f=0;f<this._barsMarksSources.length;f++)this._barsMarksSources[f].setOwnerSource(this.m_mainSeries);this._syncPointCache={},this._watermarkSource=this._options.watermarkEnabled?new y(this,this.m_mainSeries):null,this._oldStartVisibleIndex=-1,this._oldEndVisibleIndex=-1,B.hideAllDrawings().subscribe(this,this._onDrawingsVisibilityChanged),this._properties.scalesProperties.listeners().subscribe(this,re.prototype.fullUpdate),this._studyInserted=new n,this._chartThemeLoaded=new n,this._resetScales=new n,this._studyShiftColorStartOffset=void 0,this._linePointBeingEdited=null,this._lineBeingEdited=null,this._lineBeingCreated=null,J.subscribe(this,this._updateDateTimeFormatter),this.mainSeries().properties().interval.subscribe(this,this._updateDateTimeFormatter),this._updateDateTimeFormatter(),this._studyColorRotatorFactory=new ie(this),this._dataSourceCollectionChanged.subscribe(this,this._updateShowLegendProperty.bind(this)),this._properties.paneProperties.legendProperties.showLegend.subscribe(this,this._updateShowLegendProperty)}function oe(){this._selection.clear()}function se(e){this._selection.remove(e)}function ae(e,t){var i=this._selection.isSelected(e);i&&this._lastHittestData===t||e&&e.customization&&e.customization.disableSelection||(this._lastHittestData=t,i||this._selection.add(e))}inherit(re,l),re.prototype.applyPreferences=function(e){for(var t in e)void 0!==this._properties[t]&&"m_mainSeries"!==this._properties[t]&&this._properties[t].mergeAndFire(e[t]);void 0!==e.timeScale&&this._timeScale.defaultRightOffsetProperty().setValue(e.timeScale.defaultRightOffset),this._properties.saveDefaults(),this.m_mainSeries.applyPreferences(e.mainSeries),this.sessions().applyPreferences(e.sessions),this.recalculateAllPanes(),this.fullUpdate()},re.prototype.setStudiesMetaData=function(e,t){this._studiesMetaData=e,this._studyVersioning=new V(this._studiesMetaData,t)},re.prototype.isSnapshot=function(){return this._isSnapshot},re.prototype.timezone=function(){return this._properties.timezone.value()},re.prototype.version=function(){return this._version},re.prototype.setVersion=function(e){this._version=e},re.prototype.initConnection=function(){this._chartApi.switchTimezone(this.timezone())},re.prototype.updatePane=function(e){var t=this._paneInvalidationMask(e);this.invalidate(t)},re.prototype.fullUpdate=function(){this.invalidate(C.full())},re.prototype.lightUpdate=function(){this.invalidate(C.light())},re.prototype.studiesMetaData=function(){return this._studiesMetaData},re.prototype.studyVersioning=function(){return this._studyVersioning},re.prototype.disconnect=function(){this.sessions().stop();for(var e,t=this.dataSources(),i=0;i<t.length;i++)(e=t[i]).disconnect&&e.disconnect()},re.prototype.restart=function(){this.initConnection(),this._timeScale.reset(),this.m_mainSeries.restart();for(var e,t=this.dataSources(),i=0;i<t.length;i++)(e=t[i]).restart&&e!==this.m_mainSeries&&e.restart()
;this.sessions().restart()},re.prototype.startNotStartedStudies=function(){if(!this.m_mainSeries.isStarted())throw new Error("Cannot start studies: main series is not started");for(var e=this.dataSources(),t=0;t<e.length;t++)k(e[t])&&!e[t].isStarted()&&e[t].restart&&e[t]!==this.m_mainSeries&&e[t].restart()},re.prototype.updateLineTools=function(){for(var e=this.dataSources(),t=0;t<e.length;t++)if(f(e[t])){var i=e[t];i.tryCreateServerPoints(),i.checkAlert&&i.checkAlert()}},re.prototype.realignLineTools=function(){for(var e=0;e<this._panes.length;e++)this._panes[e].realignLineTools()},re.prototype.readOnly=function(){return this._readOnly},re.prototype.properties=function(){return this._properties},re.prototype.lineCancelled=function(){return this._lineCancelled},re.prototype.crossHairMoved=function(){return this.m_crossHairSource.moved()},re.prototype.chartApi=function(){return this._chartApi},re.prototype.propertyChangeHandler=function(){this.lightUpdate()},re.prototype._onDrawingsVisibilityChanged=function(e){for(var t=!1===e.value(),i=this.dataSources(),n=0;n<i.length;n++){var r=i[n],o=f(r)&&r.properties().visible.value();t&&o?ee.emit("drawing_event",r.id(),"show"):!t&&o&&ee.emit("drawing_event",r.id(),"hide")}this.selectionMacro((function(e){e.clearSelection()}))},re.prototype.updateAllPaneViews=function(){for(var e=0;e<this._panes.length;e++){this._panes[e].updateAllViews()}},re.prototype.mainSeries=function(){return this.m_mainSeries},re.prototype.timeScale=function(){return this._timeScale},re.prototype.gridSource=function(){return this.m_gridSource},re.prototype.watermarkSource=function(){return this._watermarkSource},re.prototype.crossHairSource=function(){return this.m_crossHairSource},re.prototype.publishedChartsTimelineSource=function(){return null},re.prototype.barsMarksSources=function(){return this._barsMarksSources},re.prototype.width=function(){return this.m_width},re.prototype.setPaneHeight=function(e,t){e.setHeight(t),this.recalculateAllPanes(),this.lightUpdate()},re.prototype.setWidth=function(e){this.m_width=e,this._timeScale.setWidth(this.m_width);for(var t=0;t<this._panes.length;++t){this._panes[t].setWidth(e)}this.recalculateAllPanes(),this.recalcVisibleRangeStudies()},re.prototype.priceScaleSlotsCount=function(){var e=0,t=0;this._panes.forEach((function(i){e=Math.max(i.leftPriceScales().length,e),t=Math.max(i.rightPriceScales().length,t)}));var i=e+t;if(P.any()){var n=this.paneForSource(this.mainSeries()),r=n.priceScalePosition(this.mainSeries().priceScale()),o="right"===r;return"overlay"===r&&(o=n.rightPriceScales().length>0),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;t<this._panes.length;++t)for(var i=this._panes[t].dataSources(),n=0;n<i.length;n++)e.push(i[n]);return e},re.prototype.orderedDataSources=function(e){var t=[];t.push(this.m_crossHairSource);for(var i=0;i<this._panes.length;i++){var n=this._panes[i].orderedSources().slice();e&&n.reverse(),t=t.concat(n)}return t},re.prototype.dataSourceForId=function(e){for(var t,i=0;i<this._panes.length;++i)if(t=this._panes[i].dataSourceForId(e))return t;return null},re.prototype.children=function(e,t){return this.dataSources().filter((function(i){return(!0!==t||!k(i)||!i.isChildStudy())&&i.ownerSource()===e}))},re.prototype.setAndSaveCurrentPosition=function(e,t,i,n){this.m_crossHairSource.saveOriginCoord(e,t),this.setCurrentPosition(e,t,i,n)},re.prototype.setCurrentPosition=function(e,t,i,n){var r=NaN,o=Math.round(this._timeScale.coordinateToIndex(e));if(i){var s=i.defaultPriceScale();if(!s.isEmpty()){var a=i.mainDataSource().firstValue();r=s.coordinateToPrice(t,a)}}if(this._isSettingsExternalPosition||!this._lineBeingCreated&&!_(this.currentTool())||(r=this._magnet.align(r,o,i)),this._isTimeScrolling)this.m_crossHairSource.setPosition(this.m_crossHairSource.index,r,i);else{this.m_crossHairSource.setOnHoveredChartWidget(!0),this.m_crossHairSource.setPosition(o,r,i),this.m_crossHairSource.dataWindowView().update();for(var l=this._panes,c=l.length;c--;)for(var u=l[c].dataSources(),h=u.length;h--;){var d=u[h].dataWindowView();d&&d.update();var p=u[h].legendView();p&&p.update()}if(this._lineBeingCreated){if(!this._isSettingsExternalPosition){this._lineBeingCreated.setLastPoint({index:o,price:r},n),this._lineBeingCreated.updateAllViews();var f=this._lineBeingCreated.lastPoint();f.price===r&&f.index===o||this.m_crossHairSource.setPosition(f.index,f.price,i),this.lightUpdate();var m=this.mainSeries().syncModel(),v=this._timeScale.points().roughTime(f.index,m.projectTime.bind(m));B.setLineToolLastPoint({model:this,linkKey:this._lineBeingCreated.linkKey,symbol:this.mainSeries().symbol(),point:{timeStamp:v,price:f.price}})}
}else this.crossHairSource().startMeasurePoint()?this.lightUpdate():this.invalidate(C.cursor());if(!this._isSettingsExternalPosition){var y=this._undoModel._chartWidget;if(y._chartWidgetCollection)if(m=this.mainSeries().syncModel()){var g={timeStamp:v=this._timeScale.points().roughTime(o,m.projectTime.bind(m))},b=i.mainDataSource();b instanceof D&&(g.price=r,g.symbol=b.symbol()),g.syncModel=m;var S=this._lineBeingCreated||null!==this._linePointBeingEdited||this._sourcesBeingMoved.length;S=S&&B.drawOnAllCharts().value(),y._chartWidgetCollection.syncCrosshair(g,y,S,n)}}}},re.prototype.clearCurrentPosition=function(){var e=this.crossHairSource();e.clearPosition(),e.dataWindowView().update();for(var t=this._panes,i=t.length;i--;)for(var n=t[i].dataSources(),r=n.length;r--;){var o=n[r].dataWindowView();o&&o.update();var s=n[r].legendView();s&&s.update()}this.invalidate(C.cursor());var a=this._undoModel._chartWidget;a._chartWidgetCollection&&a._chartWidgetCollection.syncCrosshair(NaN,a)},re.prototype.onSyncScrollNeeded=function(e){var t=this._undoModel._chartWidget;if(t._chartWidgetCollection){var i=this.mainSeries().syncModel();if(i){var n=1e3*this._timeScale.points().roughTime(e,i.projectTime.bind(i));t._chartWidgetCollection.syncScroll(n,this)}}},re.prototype.syncTimeWithModel=function(e,t){var i=this.mainSeries().syncModel();if(null!==i){var n=1e3*this.createSyncPoint(e.mainSeries().syncModel(),i).sourceTimeToTargetTime(t/1e3),r=te.get_timezone(this.timezone()),o=te.utc_to_cal(r,n).getTime();this._gotoTimeImpl(o,{centerIfVisible:!1})}},re.prototype.gotoTime=function(e){return this._gotoTimeImpl(e,{centerIfVisible:!0})},re.prototype._gotoTimeImpl=function(e,t){var i,n=this.timeScale(),r=this.mainSeries();if(void 0!==e)this._scrollingState&&this._scrollingState.deferred.reject(),i=$.Deferred(),this._scrollingState={targetDate:e,deferred:i,centerIfVisible:t.centerIfVisible};else{if(!this._scrollingState)return W.logError("scrollTo called without an argument"),$.Deferred().reject().promise();e=this._scrollingState.targetDate,i=this._scrollingState.deferred}var s=function(t){if(n.tickMarks().indexToTime(n.tickMarks().minIndex).valueOf()-e<0){var i=n.tickMarks().nearestIndex(e),s=o(r.bars().lastIndex());i=Math.min(i,s);for(var a=n.tickMarks().indexToTime(i).valueOf();a<e&&i<s;)i++,a=n.tickMarks().indexToTime(i).valueOf();var l=n.visibleBarsStrictRange(),c=l.lastBar()-l.firstBar();return!t&&l.contains(i)||(n.zoomToBarsRange(i-c/2,i+c/2),r.requestMoreData()),{timestamp:n.indexToTimePoint(i)}}}(this._scrollingState.centerIfVisible);if(!s){var a=n.tickMarks().minIndex,l=n.visibleBarsStrictRange(),c=l.lastBar()-l.firstBar();if(r.endOfData())n.zoomToBarsRange(a-c/2,a+c/2),s={timestamp:n.indexToTimePoint(a),eod:!0};else{var u=this.timeScale().tickMarks().estimateLeft(e);r.requestMoreData(Math.ceil(u+c/2))}}return s&&(this.fullUpdate(),this._scrollingState=null,i.resolve(s)),i.promise()},re.prototype.createSyncPoint=function(e,t){var i=this._syncPointCache[e.uniqueId()];if(i){var n=i[t.uniqueId()];if(n)return n
}else this._syncPointCache[e.uniqueId()]={};var r=new F(e,t);return this._syncPointCache[e.uniqueId()][t.uniqueId()]=r,r},re.prototype.setExternalPosition=function(e,t){var i,n=this.crossHairSource();if(n.setOnHoveredChartWidget(!1),!Number.isNaN(e)&&isNumber(e.timeStamp)){var r=this.mainSeries().syncModel();if(r){var o=this.createSyncPoint(e.syncModel,r).sourceTimeToTargetTime(e.timeStamp);i=this._timeScale.points().roughIndex(o,r.distance.bind(r))}}if(isFinite(i)&&isFinite(e.price)){this._isSettingsExternalPosition=!0;var s=this.paneForSource(this.mainSeries()),a=this._timeScale.indexToCoordinate(i),l=s.mainDataSource().firstValue(),c=this.mainSeries().priceScale().priceToCoordinate(e.price,l);return this.setCurrentPosition(a,c,s,t||new q),n.setOnHoveredChartWidget(!1),void delete this._isSettingsExternalPosition}isFinite(i)?n.setPosition(i,NaN,null):(n.clearPosition(),n.dataWindowView().update());for(var u=this.dataSources(),h=u.length;h--;){var d=u[h].dataWindowView();d&&d.update();var p=u[h].legendView();p&&p.update()}this.invalidate(C.cursor())},re.prototype.updateCrossHair=function(){this.m_crossHairSource.update()},re.prototype.updateTimeScale=function(e,t,i,n,r,o){if(o){this._timeScale.reset();for(var s=this.dataSources(),a=0;a<s.length;a++)s[a].clearData&&s[a].clearData()}if(n.length>0)for(s=this.dataSources(),a=0;a<s.length;a++)s[a].moveData&&s[a].moveData(n);this._timeScale.update(e,t,i,r);var l="ChartModel.prototype.updateTimeScale("+e+","+t+","+i.length+","+n.length+","+r.length+","+o+")";l+="TimeScale: {first:"+this._timeScale.points().firstIndex()+",last:"+this._timeScale.points().lastIndex()+"}",W.logDebug(l),this.recalculateAllPanes(),this.lightUpdate()},re.prototype.updateTimeScaleBaseIndex=function(e){var t=this.mainSeries().bars();if(!t.isEmpty()){var i=this.timeScale(),n=i.baseIndex(),r=o(t.lastIndex()),s=i.visibleBarsStrictRange(),a=i.logicalRange();if(null!==a){var l=a.contains(n);if(e&&e.index>0){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;e<this._panes.length;++e)this._panes[e].recalculate();this.updateAllPaneViews(),this.crossHairSource().updateAllViews()},re.prototype._invalidateBarColorerCaches=function(){for(var e=this.dataSources(),t=0;t<e.length;++t){var i=e[t];i instanceof D&&i.invalidateBarColorerCache()}},re.prototype.createStudyInserter=function(e){return new K(e,this._studiesMetaInfoRepository,{createStudy:this.insertStudyWithParams.bind(this)})},re.prototype.insertStudyWithParams=function(e,t,i,n,r,o,s,a,l,c){
null==o&&(o=this.mainSeries());var u=null;if(!r&&void 0!==e.groupingKey){var h=this.findNonOverlayStudyWithGroupingKey(e.groupingKey);null!==h&&(u=h.pane)}null===u&&(r||e.is_price_study?u=this.paneForSource(o):(u=this.createPane(),void 0!==l&&u.setPaneSize(l))),"Compare@tv-basicstudies"===e.id&&this.m_mainSeries.priceScale().setMode({log:!1,percentage:!0});var d=Object.assign({},n,{inputs:t}),p=E(e,d,u,this.studyVersioning(),o),_=O(this,p,o,e,c);this.recalcVisibleRangeStudies(!0,[_]);var f=u.findSuitableScale(_,o,s);if(a&&f===this.mainSeries().priceScale()&&X(_)){var m=Q(_,f,this,!0);null!==m&&_.setCurrency(m)}return _.start(),null!==i&&u.id()===i.paneId?u.insertDataSource(_,f,i.zorder):u.addDataSource(_,f),_.properties().linkedToSeries&&_.properties().linkedToSeries.value()&&_.setOwnerSource(this.mainSeries()),this.recalculatePane(u),this.fullUpdate(),this._invalidateBarColorerCaches(),this.recalcVisibleRangeStudies(!0),this._studyInserted.fire(_),_},re.prototype.studyInserted=function(){return this._studyInserted},re.prototype.detachSource=function(e,t){var i=this.paneForSource(e);if(i)return i.removeDataSource(e),i.isEmpty()?(this._lineBeingCreated&&i===this._paneBeingCreatedLineOn&&this.cancelCreatingLine(),this.removePane(i,t),!0):(this.fullUpdate(),!1)},re.prototype.removeSource=function(e,t){this.selectionMacro((function(t){t.removeSourceFromSelection(e)})),this._sourcesBeingMoved.includes(e)&&(this._sourcesBeingMoved=this._sourcesBeingMoved.filter((function(t){return t!==e})),this._sourcesBeingMoved.length||(this._lineItemBeingMoved=null)),e===this._lineBeingEdited&&(this._lineBeingEdited=null,B.isToolEditingNow.setValue(!1)),e===this._lineBeingCreated&&(this._lineBeingCreated=null),e.stop&&e.stop();var i=this.detachSource(e,t);if(e.metaInfo&&e.metaInfo()&&"Compare@tv-basicstudies"===e.metaInfo().id){for(var n=this.paneForSource(this.m_mainSeries).dataSources(),r=0;r<n.length;r++)if(n[r].metaInfo&&"Compare@tv-basicstudies"===n[r].metaInfo().id)return;this.m_mainSeries.priceScale().setMode({percentage:!1})}return this.fullUpdate(),this._invalidateBarColorerCaches(),k(e)&&(ee.emit("study_event",e.id(),"remove"),e.isChildStudy()&&e.source().unsetChild(e)),e.destroy&&e.destroy(),f(e)&&ee.emit("drawing_event",e.id(),"remove"),i},re.prototype._unmergeAvailable=function(e){return e===this.m_mainSeries||TradingView.isInherited(e.constructor,I)&&!e.isLinkedToSeries()&&!TradingView.isInherited(e.constructor,M)&&e.showInObjectTree()},re.prototype.isMergeUpAvailableForSource=function(e){return!!this._unmergeAvailable(e)&&this.paneForSource(e)!==this.panes()[0]},re.prototype.isMergeDownAvailableForSource=function(e){if(!this._unmergeAvailable(e))return!1;var t=this.paneForSource(e),i=this.panes();return t!==i[i.length-1]},re.prototype.isUnmergeAvailableForSource=function(e){return!!this._unmergeAvailable(e)&&this.paneForSource(e).dataSources().filter(this._unmergeAvailable,this).length>1},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<t.length;i++){var n=t[i];n.tags&&(e=e.concat(n.tags()))}return e},re.prototype.changeZOrder=function(e,t){this.paneForSource(e).changeZOrder(e,t),this.fullUpdate()},re.prototype._sendTo=function(e,t){var i={},n=this;for(var r in e.forEach((function(e){var t=n.paneForSource(e),r=n._panes.indexOf(t);i[r]||(i[r]=[]),i[r].push(e)})),i){t(n._panes[r],i[r])}this.fullUpdate()},re.prototype.sendToBack=function(e){this._sendTo(e,(function(e,t){e.sendToBack(t)}))},re.prototype.bringToFront=function(e){this._sendTo(e,(function(e,t){e.bringToFront(t)}))},re.prototype.setTimeViewport=function(e,t){this.timeScale().zoomToBarsRange(e,t),this.recalculateAllPanes(),this.recalcVisibleRangeStudies(),this.lightUpdate()},re.prototype.zoomToViewport=function(e,t,i,n,o){this.setTimeViewport(e,t);var s=Math.min(i,n),a=Math.max(i,n),l=o.defaultPriceScale();l.isPercentage()||l.setMode({autoScale:!1}),l.isLog()&&(s=l.priceToLogical(s),a=l.priceToLogical(a)),l.setPriceRange(new r(s,a)),this.recalculateAllPanes(),this.invalidate(this._paneInvalidationMask(o,x.Light)),this._setScalesResetAvailable(!0)},re.prototype.clearAllStudies=function(){for(var e=this.dataSources(),t=0;t<e.length;t++)e[t].clearData&&e[t].clearData()},re.prototype.allStudies=function(){return this._getAllSources((function(e){return k(e)}))},re.prototype.allLineTools=function(){return this._getAllSources(f)},re.prototype.getStudyById=function(e){var t=this.dataSourceForId(e);return null!==t&&k(t)?t:null},re.prototype.getLineToolById=function(e){var t=this.dataSourceForId(e);return null!==t&&f(t)?t:null},re.prototype._getAllSources=function(e){for(var t=[],i=this._panes,n=i.length,r=0;r<n;++r)for(var o=i[r].orderedSources(),s=o.length,a=0;a<s;++a){var l=o[a];e(l)&&t.push(l)}return t},re.prototype.getStudyById=function(e){var t=this.dataSourceForId(e);return t instanceof I?t:null},re.prototype.backgroundCounterColor=function(){var e=this.backgroundColor().value();if(void 0===this._lastBackgroundColor||void 0===this._lastOriginalColor||e!==this._lastBackgroundColor){var t=u(c(e),150);this._lastBackgroundColor=e,this._lastOriginalColor="black"===t?"white":"black"}return this._lastOriginalColor},re.prototype.isDark=function(){return"white"===this.backgroundCounterColor()},re.prototype.getAlertsList=function(){return Promise.resolve(null)},re.prototype.resetAlertList=function(){},re.prototype.setInterval=function(e,t){var i=setInterval(e,t);return this._modelIntervals.push(i),i},re.prototype.clearInterval=function(e){clearInterval(e);var t=this._modelIntervals.indexOf(e);t>-1&&this._modelIntervals.splice(t,1)},re.prototype.clearIntervals=function(){
for(var e=0;e<this._modelIntervals.length;e++)clearInterval(this._modelIntervals[e]);this._modelIntervals=[]},re.prototype.destroy=function(){for(var e=0;e<this._barsMarksSources.length;e++)this._barsMarksSources[e].destroy();this.clearIntervals(),B.hideAllDrawings().unsubscribe(this,this._onDrawingsVisibilityChanged),this.resetDeferredStudies();for(e=0;e<this._barsMarksSources.length;e++)this._barsMarksSources[e].destroy();for(e=0;e<this._panes.length;e++)this._panes[e].destroy();this._panes.length=0,this._sessions=null,this._timeScale.destroy(),J.unsubscribe(this,this._updateDateTimeFormatter),this.mainSeries().properties().interval.unsubscribe(this,this._updateDateTimeFormatter),this._trendLineStatsCache&&this._trendLineStatsCache.destroy(),this._fibRetracementLabelsCache&&this._fibRetracementLabelsCache.destroy(),this._properties.paneProperties.legendProperties.showLegend.unsubscribeAll(this),this._dataSourceCollectionChanged.unsubscribeAll(this),l.prototype.destroy.call(this)},re.prototype.countUserStudies=function(e){var t=0;e=e||{};for(var i=0;i<this._panes.length;i++)for(var n=this._panes[i].dataSources(),r=0;r<n.length;r++){var o=n[r];if(k(o)&&!A(o)&&o.showInObjectTree()){var s=o.metaInfo&&o.metaInfo();if(s){var a=s.id;if(e.dontCountVolume&&"Volume@tv-basicstudies"===a)continue;if(e.dontCountCompare&&"Compare@tv-basicstudies"===a)continue;if(e.dontCountOverlay&&"Overlay@tv-basicstudies"===a)continue}t++}}return t},re.prototype.isJustClonedChart=function(){return this._undoModel.isJustClonedChart()},re.prototype.restoreSource=function(e,t,i,n,r){var o,s;o=e?this.createPane(t):this.panes()[t],s=n.type.toLowerCase().startsWith("study")?o.restoreStudy(n):o.restoreLineTool(n);var a=null;n.ownerSource&&(a=o.dataSourceForId(n.ownerSource)),s.setOwnerSource(a);var l=null;if(r?l=o.getPriceScaleById(r.id):s.ownerSource()&&(l=s.ownerSource().priceScale()),l)s.setPriceScale(l),l.addDataSource(s);else{l=o.createPriceScaleAtPosition(r.position,r.priceScaleIndex);r&&r.id&&l.setId(r.id),s.setPriceScale(l),l.addDataSource(s),"overlay"===r.position&&s.metaInfo&&"Volume@tv-basicstudies"===s.metaInfo().id&&(l.setTopMargin(.75),l.setBottomMargin(0))}return s.start(),s.restore&&s.restore(),e&&o.restoreState(i),this.recalculateAllPanes(),this.mainSeries().invalidateBarColorerCache(),this.fullUpdate(),s},re.prototype.restoreLineToolState=function(e,t){e.restorePoints(t.points,t.indexes||[]),e.properties().merge(t.state),e.restoreData&&e.restoreData(t),e.createServerPoints(),this.fullUpdate(),e.linkKey&&B.restoreLineToolState({model:this,linkKey:e.linkKey,state:t})},re.prototype.onChartThemeLoaded=function(){return this._chartThemeLoaded},re.prototype.chartThemeLoaded=function(){this._chartThemeLoaded.fire()},re.prototype.selectBarMode=function(){return this.m_crossHairSource.selectBarMode()},re.prototype.toggleSelectBarMode=function(){this.m_crossHairSource.toggleSelectBarMode()},re.prototype.onBarSelected=function(){return this.m_crossHairSource.onBarSelected()},re.prototype.isSeriesStyleSupported=function(e){
return this.m_mainSeries.isStyleSupported(e)},re.prototype.getStudyShiftColorStartOffset=function(){return this._studyShiftColorStartOffset},re.prototype.setStudyShiftColorStartOffset=function(e){this._studyShiftColorStartOffset=e},re.prototype.setPriceAutoScaleForAllMainSources=function(){for(var e=0;e<this._panes.length;++e){var t=this._panes[e].mainDataSource();null===t||t.priceScale().isLockScale()||t.priceScale().setMode({autoScale:!0})}},re.prototype.isInReplay=function(){return this.m_mainSeries.isInReplay()},re.prototype.onInReplayStateChanged=function(){return new n},re.prototype.switchToReplay=function(e,t){0},re.prototype.switchToRealtime=function(){0},re.prototype.rendererOptionsProvider=function(){return this._rendererOptionsProvider},re.prototype.priceAxisRendererOptions=function(){return this._rendererOptionsProvider.options()},re.prototype.magnet=function(){return this._magnet},re.prototype.isPriceScaleVisible=function(e){var t=this.paneForSource(e.mainSource()),i=t.priceScalePosition(e);if("overlay"===i)return!0;var n=this.priceScaleSlotsCount();return t.priceScaleIndex(e,i)<n[i]},re.prototype.studyMetaInfoRepository=function(){return this._studiesMetaInfoRepository},re.prototype.studiesColorRotatorFactory=function(){return this._studyColorRotatorFactory},e.exports=re}).call(this,i("tc+8"),i("aIyQ"),i("Qb4w").PriceRange)},cXAR:function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesDataWindowView",(function(){return h}));var n=i("mrSG"),r=i("4miz"),o=i("xDuj"),s=i("qFKp"),a=i("mMWL"),l=i("6I19"),c=i("CW80"),u=s.CheckMobile.any(),h=function(e){function t(t,i){var n=e.call(this)||this;return n._invalidated=!0,n._series=t,n._model=i,n._valuesProvider=n._createValuesProvider(t,i),n._items=n._valuesProvider.getItems().map((function(e){return new r.a(e.title,"")})),n.update(),n}return Object(n.__extends)(t,e),t.prototype.update=function(){this._invalidated=!0},t.prototype.items=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items},t.prototype._updateImpl=function(){var e=this._series.symbolInfo();e?(this._header=[e.name,Object(o.translatedIntervalString)(this._series.interval()),e.exchange].join(", "),this._title=e.description):this._header=this._series.symbol();for(var t=this._model.crossHairSource().appliedIndex(),i=this._valuesProvider.getValues(t),n=0;n<i.length;++n){var r=i[n],s=this._items[n];s.setValue(r.value),s.setVisible(r.visible),s.setColor(r.color)}},t.prototype._createValuesProvider=function(e,t){return new l.a(e,t)},t.prototype._showLastPriceAndChangeOnly=function(){return u&&(null===this._model.crossHairSource().pane||Object(c.isLineToolName)(a.tool.value())||null!==this._model.lineBeingEdited())},t}(r.b)},cZRT:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var n=function(){function e(){var e=this;this._retries=5,this._cache=null,this._tryLoad=function(t){e._retries=e._retries-1;e._startLoading().then(t,0!==e._retries?function(){return setTimeout((function(){return e._tryLoad(t)}),3e3)}:void 0)}}return e.prototype.load=function(){
return this._cache||(this._cache=new Promise(this._tryLoad)),this._cache},e}()},cdbK:function(e,t,i){"use strict";function n(e){Promise.all([i.e("react"),i.e(1),i.e(3),i.e(6),i.e(23),i.e(25),i.e(37),i.e(41),i.e(61),i.e(71),i.e(0),i.e(5),i.e(20),i.e(34),i.e(51),i.e("go-to-date-dialog-impl")]).then(function(t){i("uUY/").showGoToDateDialog(e)}.bind(null,i)).catch(void 0)}i.r(t),i.d(t,"showGoToDateDialog",(function(){return n}))},cgFQ:function(e,t,i){"use strict";var n=i("Tmoa"),r=i("ikwP"),o=/[1-9]/g,s=function(){function e(){this._data=null}return e.prototype.setData=function(e){this._data=e},e.prototype.draw=function(e,t,i){if(null!==this._data&&this._data.visible&&0!==this._data.text.length){var n=this._data;e.font=t.font;var s=Math.round(t.widthCache.measureText(e,n.text,o));if(!(s<=0)){e.save();var a=t.paddingHorizontal,l=s+2*a,c=l/2,u=n.width,h=n.coordinate,d=Math.floor(h-c)+.5;d<0?(h+=Math.abs(0-d),d=Math.floor(h-c)+.5):d+l>u&&(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;u<h.length;u++){var d=h[u];if(!Object(o.isNaN)(d.x)&&!Object(o.isNaN)(d.y)){var p=null!==(n=null===(i=d.style)||void 0===i?void 0:i.color)&&void 0!==n?n:this._data.lineColor,_=Math.max(1,Math.floor((null!==(s=null===(r=d.style)||void 0===r?void 0:r.width)&&void 0!==s?s:this._data.lineWidth)*a));p!==l&&(l=p,c&&e.fill(),e.beginPath(),e.fillStyle=p);var f=3*_;f%2!=_%2&&(f+=1);var m=Math.round(Math.round(d.x*a)-f/2),v=Math.round(Math.round(d.y*a)-f/2),y=m+Math.floor(f/2-_/2),g=v+Math.floor(f/2-_/2);e.rect(m,g,f,_),e.rect(y,v,_,f),c=!0}}c&&e.fill()},e.prototype.hitTest=function(e){for(var t,i,o,l,c=Object(s.selectionTolerance)(this._data.lineWidth),u=1;u<this._data.items.length;++u){if(t=this._data.items[u-1],i=this._data.items[u],o=t.x,l=i.x,Object(r.distanceToSegment)(new n.Point(o,t.y),new n.Point(l,i.y),new n.Point(e.x,e.y)).distance<=c)return new a.HitTestResult(a.HitTestResult.REGULAR)}return null},e}()},dDSx:function(e,t,i){"use strict";(function(e){
var n=i("CW80").isLineTool,r=i("Ss5c").LineDataSource,o=i("FIi8").deepExtend,s=i("OK+B"),a=i("//lZ").doAnimate,l=i("onDC").ChartUndoModelBase,c=i("Ocx9").saveDefaultProperties,u=i("GVHu").Study,h=i("8sOK").StudyStub,d=i("7MZv").showTooManyStudiesNotice,p=i("MY2c").UndoStack,_=i("RDU5").UndoCommand,f=i("Ltzl").SaveLineToolStateUndoCommand,m=i("YlKu").ApplyLineToolTemplateUndoCommand,v=i("s9sR").SetResolutionUndoCommand,y=i("8C8C").RestoreFactoryDefaultsUndoCommand,g=i("2OVc").InsertStudyCommand,b=i("FKaq").SetPriceScaleSelectionStrategyCommand,S=i("/YGI").StudyInserter,w=i("JWMC").trackEvent,P=i("txPx").getLogger("Chart.ChartUndoModel"),C=i("QTwd").RestoreDefaultsPreferencesUndoCommand,x=i("bJYc").SetPropertyUndoCommand,T=i("jeZR").AppliedTimeFrame;function I(t,i,n,r,o,a,c,u,h){l.call(this,c),this._chartWidget=a,this.m_model=new s(t,i,n,r,o,this,u,h),this.m_zoomStack=new p,this._onSimpleZoomIn=new e,this._onSimpleZoomOut=new e,this._appliedTimeFrame=new T(this.m_model),this.mainSeries().onTimeFrameApplied().subscribe(this,(function(e){var t=null!==e?{res:this.mainSeries().interval(),val:e}:null;this.appliedTimeFrame().setValue(t)})),this.beginUndoMacro=c.beginUndoMacro.bind(c),this.endUndoMacro=c.endUndoMacro.bind(c),this.createUndoCheckpoint=c.createUndoCheckpoint.bind(c),this.undoToCheckpoint=c.undoToCheckpoint.bind(c)}function M(e,t,i,n){_.call(this,i),this._priceScale=t,this._newMode=e,this._model=n}function L(e,t,i,n){_.call(this,i),this._property=e,this._newValue=t,this._model=n,this._priceScale=this._model.mainSeries().priceScale()}function O(e,t,i,n){_.call(this,"scale price",!1),this.m_model=e,this.m_pane=t,this.m_priceScale=i,this.m_state=n,this.m_newPriceScaleState=null}function k(e,t,i,n){this._model=e,this._series=t,this._oldSymbol=t.symbol(),this._oldInterval=t.interval(),this._symbol=i,this._interval=n}function A(e,t,i){_.call(this,"Move "+t[0].title()+" "+(i>0?"Forward":"Backward")),this._model=e,this._sourcesIds=t.map((function(e){return e.id()})),this._shift=i}function 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;r<e.length;r++)n.setProperty(e[r],t[r],i)})),this.endUndoMacro()},I.prototype.setPriceScaleMode=function(e,t,i){for(var n=Object.keys(e),r=t.mode(),o=!1,s=0;s<n.length;s++)if(r[n[s]]!==e[n[s]]){o=!0;break}if(o){var a=new M(e,t,i,this.m_model);this.pushUndoCommand(a)}},I.prototype.setPriceScaleSelectionStrategy=function(e){if(this.m_model.properties().priceScaleSelectionStrategyName.value()!==e){w("Chart","Change PriceScale Selection Strategy");var t="Set Price Scale Selection Stretegy to "+e;this.beginUndoMacro(t),this.setProperty(this.m_model.properties().priceScaleSelectionStrategyName,e,t);var i=new b(this.m_model,e,t);this.pushUndoCommand(i),this.endUndoMacro()}},I.prototype.setScaleRatioProperty=function(e,t,i){if(e.value()!==t){var n=new L(e,t,i,this.m_model);this.pushUndoCommand(n)}},I.prototype.setResolutionProperty=function(e,t,i,n){if(e.value()!==t){var r=new v(e,t,i,n);this.pushUndoCommand(r)}},I.prototype.lineBeingCreated=function(){return this.m_model.lineBeingCreated()},I.prototype.paneBeingCreatedLineOn=function(){return this.m_model.paneBeingCreatedLineOn()},I.prototype.cancelCreatingLine=function(){this.m_model.cancelCreatingLine()},I.prototype.lineCancelled=function(){return this.m_model.lineCancelled()},I.prototype.lineBeingEdited=function(){return this.m_model.lineBeingEdited()},I.prototype.sourcesBeingMoved=function(){return this.m_model.sourcesBeingMoved()},I.prototype.dataSources=function(){return this.m_model.dataSources()},I.prototype.orderedDataSources=function(e){return this.m_model.orderedDataSources(e)},I.prototype.dataSourceForId=function(e){
return this.m_model.dataSourceForId(e)},I.prototype.state=function(e,t,i){return this.m_model.state(e,t,i)},I.prototype.asyncState=function(){return this.m_model.asyncState()},I.prototype.restoreState=function(e,t,i){return this.m_model.restoreState(e,t,i)},I.prototype.calculateDefaultTags=function(){return this.m_model.calculateDefaultTags()},I.prototype.onTagsChanged=function(){return this.m_model.onTagsChanged()},I.prototype.changeZOrder=function(e,t){var i=new A(this.m_model,e,t);this.pushUndoCommand(i),this.emitEvent("changeZOrder",[e,t])},I.prototype._removeAllStudiesImpl=function(){for(var e=this.m_model.dataSources(),t=0;t<e.length;t++){var i=e[t];(TradingView.isInherited(i.constructor,u)&&!i.isChildStudy()&&i.removeByRemoveAllStudies()||TradingView.isInherited(i.constructor,h))&&this.removeSource(i)}},I.prototype.removeAllStudies=function(){this.beginUndoMacro(window.t("Remove all studies")),this._removeAllStudiesImpl(),this.endUndoMacro()},I.prototype._removeAllDrawingToolsImpl=function(e){var t=this;this.selectionMacro((function(){t.lineBeingCreated()&&t.cancelCreatingLine();for(var i=t.dataSources(),n=0;n<i.length;n++){var o=i[n];TradingView.isInherited(o.constructor,r)&&o.isActualSymbol()&&o.isUserDeletable()&&(e&&e!==o.toolname||t.removeSource(o))}}))},I.prototype.removeAllDrawingTools=function(e){this.beginUndoMacro(window.t("Remove Drawings")),this._removeAllDrawingToolsImpl(),this.endUndoMacro()},I.prototype.removeAllStudiesAndDrawingTools=function(){this.beginUndoMacro(window.t("Remove all studies and drawing tools")),this._removeAllDrawingToolsImpl(),this._removeAllStudiesImpl(),this.endUndoMacro()},I.prototype.unlinkLines=function(e){this.beginUndoMacro("Stop syncing line tool(s)");var t=this.m_model,i=this;e.forEach((function(e){var n=new B(t,e);i.pushUndoCommand(n)})),this.endUndoMacro()},I.prototype.moveLeft=function(){try{this.beginUndoMacro("Move Left")}catch(i){return}var e=this.m_model.timeScale().width(),t=this;a({to:e/5,onStep:function(e){t.startScrollTime(e),t.scrollTimeTo(0),t.endScrollTime()},onComplete:function(){t.endUndoMacro()}})},I.prototype.moveRight=function(){try{this.beginUndoMacro("Move Right")}catch(i){return}var e=this.m_model.timeScale().width(),t=this;a({to:e/5,onStep:function(e){t.startScrollTime(0),t.scrollTimeTo(e),t.endScrollTime()},onComplete:function(){t.endUndoMacro()}})},I.prototype.scrollChart=function(e){this.m_model.scrollEnabled()&&(this.startScrollTime(0),this.scrollTimeTo(e),this.endScrollTime())},I.prototype.scrollChartByBar=function(e){if(this.m_model.scrollEnabled()){var t=e*this.m_model.timeScale().barSpacing();this.startScrollTime(0),this.scrollTimeTo(t),this.endScrollTime()}},I.prototype.resetScales=function(){this.beginUndoMacro("Reset scales"),this.resetTimeScale(),this.panes().forEach((function(e){e.leftPriceScales().forEach((function(t){this.resetPriceScale(e,t)}),this),e.rightPriceScales().forEach((function(t){this.resetPriceScale(e,t)}),this)}),this),this.endUndoMacro(),this.m_model.recalculateAllPanes()},
I.prototype.zoomToViewport=function(e,t,i,n,r){var o=new V(new E(this.m_model,e,t,i,n,r),this.m_zoomStack,!0);this.pushUndoCommand(o)},I.prototype.zoomFromViewport=function(){var e=new V(this.m_zoomStack.head(),this.m_zoomStack,!1);this.pushUndoCommand(e)},I.prototype.zoomStack=function(){return this.m_zoomStack},I.prototype._restoreFactoryDefaults=function(e){var t=new y(this.m_model,e);this.pushUndoCommand(t)},I.prototype._restoreLineToolFactoryDefaults=function(e){var t="Load default drawing template";this.beginUndoMacro(t),this.saveLineToolState(e,t);var i=new y(this.m_model,e.properties(),t);this.pushUndoCommand(i),this.saveLineToolState(e,t),this.endUndoMacro(),this.model().updateSource(e)},I.prototype.restorePropertiesForSource=function(e){n(e)?this._restoreLineToolFactoryDefaults(e):this._restoreFactoryDefaults(e.properties())},I.prototype.restorePreferences=function(){var e=new C(this.model());this.pushUndoCommand(e)},I.prototype.chartLoadTheme=function(e,t,i,n){var r=new D(e,t,i);n?r.redo():this.pushUndoCommand(r)},I.prototype.applyLineToolTemplate=function(e,t,i){this.beginUndoMacro(i),this.saveLineToolState(e,i);var n=new m(e,t,i);this.pushUndoCommand(n),this.saveLineToolState(e,i),this.endUndoMacro(),this.model().updateSource(e)},I.prototype.onSimpleZoomIn=function(){return this._onSimpleZoomIn},I.prototype.onSimpleZoomOut=function(){return this._onSimpleZoomOut},I.prototype.getAlertsList=function(){return this.m_model.getAlertsList()},I.prototype.isJustClonedChart=function(){return this._chartWidget.isJustClonedChart()},I.prototype.cutSourcesToClip=function(e){if(!this.copySourcesToClip(e))return!1;var t=1===e.length?"Cut "+e[0].title:"Cut sources";this.beginUndoMacro(t);var i=this;this.m_model.selectionMacro((function(){e.forEach((function(e){i.removeSource(e)}))})),this.endUndoMacro()},I.prototype.trackTime=function(){return this._chartWidget.trackTime()},I.prototype.isInReplay=function(){return this.m_model.isInReplay()},I.prototype.switchToReplay=function(e,t){},I.prototype.switchToRealtime=function(){},I.prototype.saveLineToolState=function(e,t){this.pushUndoCommand(new f(this.m_model,[e],t))},I.prototype.togglePriceScaleAutoScaleMode=function(e){var t={autoScale:!e.isAutoScale()};this.setPriceScaleMode(t,e,"Auto Scale")},I.prototype.togglePriceScaleLockScaleMode=function(e){var t={lockScale:!e.isLockScale()};this.setPriceScaleMode(t,e,"Lock Scale")},I.prototype.setPriceScaleRegularScaleMode=function(e){this.setPriceScaleMode({log:!1,percentage:!1,indexedTo100:!1},e,"Regular")},I.prototype.togglePriceScaleIndexedTo100ScaleMode=function(e){var t={indexedTo100:!e.isIndexedTo100()};this.setPriceScaleMode(t,e,"Indexed to 100")},I.prototype.togglePriceScalePercentageScaleMode=function(e){var t={percentage:!e.isPercentage()};this.setPriceScaleMode(t,e,"Percent")},I.prototype.togglePriceScaleLogScaleMode=function(e){var t={log:!e.isLog()};this.setPriceScaleMode(t,e,"Logarithmic")},I.prototype.invertPriceScale=function(e){var t=e.properties().isInverted;this.setProperty(t,!t.value(),"Invert Scale")},
I.prototype.destroy=function(){this.mainSeries().onTimeFrameApplied().unsubscribeAll(this),this._appliedTimeFrame.destroy(),this.model().destroy()},inherit(M,_),M.prototype.redo=function(){this._oldMode=this._priceScale.mode(),c(!0),this._priceScale.setMode(this._newMode),c(!1),this._model&&(this._model.recalculateAllPanes(),this._model.lightUpdate())},M.prototype.undo=function(){c(!0),this._priceScale.setMode(this._oldMode),c(!1),this._oldMode=null,this._model&&(this._model.recalculateAllPanes(),this._model.lightUpdate())},inherit(L,_),L.prototype.redo=function(){this._oldValue=this._property.value(),this._oldMode=this._priceScale.mode(),c(!0),this._priceScale.setMode({autoScale:!1,percentage:!1,log:!1}),this._property.setValue(this._newValue),c(!1),this._model&&(this._model.recalculateAllPanes(),this._model.lightUpdate())},L.prototype.undo=function(){c(!0),this._property.setValue(this._oldValue),this._priceScale.setMode(this._oldMode),c(!1),this._oldMode=null,this._model&&(this._model.recalculateAllPanes(),this._model.lightUpdate())},inherit(O,_),O.prototype.undo=function(){null===this.m_newPriceScaleState?(this.m_newPriceScaleState=this.m_priceScale.state(),this.m_model.restorePriceScaleState(this.m_pane,this.m_priceScale,this.m_state)):P.logDebug("PriceScaleChangeUndoCommand.undo: Command is already undone")},O.prototype.redo=function(){null!==this.m_newPriceScaleState?(this.m_model.restorePriceScaleState(this.m_pane,this.m_priceScale,this.m_newPriceScaleState),this.m_newPriceScaleState=null):P.logDebug("PriceScaleChangeUndoCommand.redo: Command is not undone")},inherit(k,_),k.prototype.redo=function(){this._model.modifySeries(this._series,this._symbol,this._interval)},k.prototype.undo=function(){this._model.modifySeries(this._series,this._oldSymbol,this._oldInterval)},inherit(A,_),A.prototype.undo=function(){var e=this,t=this._sourcesIds.map((function(t){return e._model.dataSourceForId(t)}));this._shift<0&&t.reverse(),t.forEach((function(t){e._model.changeZOrder(t,-e._shift)}))},A.prototype.redo=function(){var e=this,t=this._sourcesIds.map((function(t){return e._model.dataSourceForId(t)}));this._shift>0&&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;r<o.length;r++){var s=o[r];s.visible=s.visible&&n}return i},t}(i("EYFt").a)},e1ZQ:function(e,t,i){"use strict";i.d(t,"b",(function(){return p})),i.d(t,"a",(function(){return _})),i.d(t,"c",(function(){return f}));var n=i("YFKU"),r=i("kcTO"),o={1:n.t("Jan"),2:n.t("Feb"),3:n.t("Mar"),4:n.t("Apr"),5:n.t("May"),6:n.t("Jun"),7:n.t("Jul"),8:n.t("Aug"),9:n.t("Sep"),10:n.t("Oct"),11:n.t("Nov"),12:n.t("Dec")},s=function(e,t){return(t?e.getMonth():e.getUTCMonth())+1},a=function(e,t){return t?e.getFullYear():e.getUTCFullYear()},l=function(e,t){return Object(r.numberToStringWithLeadingZero)(function(e,t){return t?e.getDate():e.getUTCDate()}(e,t),2)
},c=function(e,t){return o[s(e,t)]},u=function(e,t){return Object(r.numberToStringWithLeadingZero)(s(e,t),2)},h=function(e,t){return Object(r.numberToStringWithLeadingZero)(a(e,t)%100,2)},d=function(e,t){return Object(r.numberToStringWithLeadingZero)(a(e,t),4)},p={"dd MMM 'yy":function(e,t){return l(e,t)+" "+c(e,t)+" '"+h(e,t)},"MMM dd":function(e,t){return c(e,t)+" "+l(e,t)},"yyyy-MM-dd":function(e,t){return d(e,t)+"-"+u(e,t)+"-"+l(e,t)},"yy-MM-dd":function(e,t){return h(e,t)+"-"+u(e,t)+"-"+l(e,t)},"yy/MM/dd":function(e,t){return h(e,t)+"/"+u(e,t)+"/"+l(e,t)},"yyyy/MM/dd":function(e,t){return d(e,t)+"/"+u(e,t)+"/"+l(e,t)},"dd-MM-yyyy":function(e,t){return l(e,t)+"-"+u(e,t)+"-"+d(e,t)},"dd-MM-yy":function(e,t){return l(e,t)+"-"+u(e,t)+"-"+h(e,t)},"dd/MM/yy":function(e,t){return l(e,t)+"/"+u(e,t)+"/"+h(e,t)},"dd/MM/yyyy":function(e,t){return l(e,t)+"/"+u(e,t)+"/"+d(e,t)},"MM/dd/yy":function(e,t){return u(e,t)+"/"+l(e,t)+"/"+h(e,t)},"MM/dd/yyyy":function(e,t){return u(e,t)+"/"+l(e,t)+"/"+d(e,t)}},_=Object.keys(p),f=function(){return-1!==["ja","ko","zh","zh_TW"].indexOf(window.language||"")?"yyyy-MM-dd":"dd MMM 'yy"}},"e3/o":function(e,t,i){"use strict";i.r(t),i.d(t,"guid",(function(){return r})),i.d(t,"randomHash",(function(){return o})),i.d(t,"randomHashN",(function(){return s}));var n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function r(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function o(){return s(12)}function s(e){for(var t="",i=0;i<e;++i){var r=Math.floor(Math.random()*n.length);t+=n[r]}return t}},e92V:function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"a",(function(){return o})),i.d(t,"c",(function(){return s}));var n=i("OH2X");new Set([]);function r(e){return!1}function o(e){return e in n||!1}function s(e){switch(e){case"LineToolBalloon":case"LineToolText":case"LineToolTextAbsolute":case"LineToolCallout":case"LineToolNote":case"LineToolNoteAbsolute":return!0}return!1}},eJTA:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("ivNn");function r(e,t,i){return n.isNaN(t)||t<e?e:t>i?i:Math.round(t)}function o(e,t,i){return n.isNaN(t)||t<e?e:t>i?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+(i<n?6:0))/6;break;case i:s=((n-t)/c+2)/6;break;case n:s=((t-i)/c+4)/6}}return[s,a,l]}function m(e,t,i){return i<0&&(i+=1),i>1&&(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+(o<s?6:0))/6;break;case i:u=((s-r)/c+2)/6;break;case n:u=((r-o)/c+4)/6}return[u,h,d]},t.hsvToRgb=function(e){var t=e[0],i=e[1],n=e[2],r=Math.floor(6*t),o=6*t-r,c=n*(1-i),u=n*(1-o*i),h=n*(1-(1-o)*i),d=0,p=0,_=0;switch(r%6){case 0:d=n,p=h,_=c;break;case 1:d=u,p=n,_=c;break;case 2:d=c,p=n,_=h;break;case 3:d=c,p=u,_=n;break;case 4:d=h,p=c,_=n;break;case 5:d=n,p=c,_=u}return[s(255*d),a(255*p),l(255*_)]};var y=[.199,.687,.114];function g(e){return y[0]*e[0]+y[1]*e[1]+y[2]*e[2]}function b(e,t,i){void 0===i&&(i=.05);var n=f(e),r=n[0]+t*i;return n[0]=u(r-Math.floor(r)),v(n)}function S(e,t,i){void 0===i&&(i=.05);var n=e[0],r=e[1],o=e[2],s=e[3],a=b([n,r,o],t,i);return[a[0],a[1],a[2],s]}t.rgbToGrayscale=g,t.distanceRgb=function(e,t){var i=e[0],n=e[1],r=e[2],o=t[0]-i,s=t[1]-n,a=t[2]-r;return Math.sqrt(o*o+s*s+a*a)},t.invertRgb=function(e){return[255-e[0],255-e[1],255-e[2]]},t.darkenRgb=function(e,t){var i=f(e);return v([i[0],i[1],p(i[2]-t/100)])},t.blendRgba=function(e,t){var i=e[0],n=e[1],r=e[2],o=e[3],u=t[0],h=t[1],d=t[2],p=t[3],_=c(1-(1-p)*(1-o));return[s(u*p/_+i*o*(1-p)/_),a(h*p/_+n*o*(1-p)/_),l(d*p/_+r*o*(1-p)/_),_]},t.shiftRgb=b,t.shiftRgba=S,t.shiftColor=function(e,t,i){return void 0===i&&(i=.05),A(S(D(e),t,i))};var w,P,C,x,T={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",
deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",feldspar:"#d19275",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslateblue:"#8470ff",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",violetred:"#d02090",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function I(e,t){return t in e}function M(e){var t=w.re.exec(e);return null!==t?w.parse(t):null}function L(e){var t=P.re.exec(e);return null!==t?P.parse(t):null}function O(e){var t=C.re.exec(e);return null!==t?C.parse(t):null}function k(e){var t=x.re.exec(e);return null!==t?x.parse(t):null}function A(e){return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function E(e){if(e=e.toLowerCase(),I(T,e)){var t=L(T[e]);if(null!==t)return t;throw new Error("Invalid named color definition")}var i=M(e);if(null!==i)return i;var n=L(e);if(null!==n)return n;var r=O(e);if(null!==r)return r;var o=k(e);return null!==o?[o[0],o[1],o[2]]:null}function V(e){if(e=e.toLowerCase(),I(T,e)){var t=L(T[e]);if(null!==t)return[t[0],t[1],t[2],1];throw new Error("Invalid named color definition")}var i=M(e);if(null!==i)return[i[0],i[1],i[2],1];var n=L(e);if(null!==n)return[n[0],n[1],n[2],1];var r=O(e);if(null!==r)return[r[0],r[1],r[2],1];var o=k(e);return null!==o?o:null}function D(e){var t=V(e)
;if(null!==t)return t;throw new Error("Passed color string does not match any of the known color representations")}!function(e){e.re=/^rgb\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*\)$/,e.parse=function(e){return[s(parseInt(e[1],10)),a(parseInt(e[2],10)),l(parseInt(e[3],10))]}}(w||(w={})),t.rgbToString=function(e){return"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},function(e){e.re=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,e.parse=function(e){return[s(parseInt(e[1],16)),a(parseInt(e[2],16)),l(parseInt(e[3],16))]}}(P||(P={})),t.rgbToHexString=function(e){var t=e[0],i=e[1],n=e[2],r=t.toString(16),o=i.toString(16),s=n.toString(16);return"#"+(1===r.length?"0":"")+r+(1===o.length?"0":"")+o+(1===s.length?"0":"")+s},function(e){e.re=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])$/,e.parse=function(e){return[s(parseInt(e[1]+e[1],16)),a(parseInt(e[2]+e[2],16)),l(parseInt(e[3]+e[3],16))]}}(C||(C={})),function(e){e.re=/^rgba\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?[\d]{0,10}(?:\.\d+)?)\s*\)$/,e.parse=function(e){return[s(parseInt(e[1],10)),a(parseInt(e[2],10)),l(parseInt(e[3],10)),c(parseFloat(e[4]))]}}(x||(x={})),t.rgbaToString=A,t.rgbToBlackWhiteString=function(e,t){if(t<0||t>255)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;i<n.length;i++){var r=n[i];if(new a.Point(r.x,r.y+r.vertOffset).subtract(e).length()<=t)return new c.HitTestResult(c.HitTestResult.REGULAR)}return null},t.prototype._drawItemShape=function(e,t,i){var n,r=i.x,o=i.vertOffset>0?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<t.length;s++){var a=t[s],l=t[i];(a.y<o&&l.y>=o||l.y<o&&a.y>=o)&&a.x+(o-a.y)/(l.y-a.y)*(l.x-a.x)<r&&(n=!n),i=s}return n},t.pointInCircle=function(e,t,i){return(e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y)<=i*i}},fFKx:function(e,t,i){"use strict";i.d(t,"b",(function(){return a})),i.d(t,"a",(function(){return l}));var n=i("mrSG"),r=i("Eyy1"),o=i("tqok"),s=i("hsV8");function a(e,t){if(e.startIndex>=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()<this.timeScale().points().lastIndex()?(e=t.lastBar()<this.timeScale().points().lastIndex()?this.timeScale().indexToTimePoint(t.lastBar()):this._maxDate,{start:(t={start:this.timeScale().indexToTimePoint(Math.max(t.firstBar(),this.timeScale().points().firstIndex())),end:e
}).start?t.start:void 0,end:t.end?t.end:void 0}):{start:0,end:0}},p.prototype.getVisibleRangePlates=function(){var e=[],t=this.getVisibleTickMarksRange(),i=this.getIntervalInTicks();return Object.keys(this._marks).forEach((function(n){var r=this._marks[n],o=r.tickmark;o>=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;a<i.length;a++)null!=s[0]&&i[a].user__id===s[0].user__id&&(i[a].highlightByAuthor=!0);return i.sort((function(e,t){return e.hovered&&!t.hovered?1:0})),i},p.prototype._getBar=function(e){return this._model.mainSeries().data().valueAt(e)},p.prototype.paneViews=function(){var e=this;return this._properties.visible.value()?[new a(this,(function(t){return new l(t.getViewData(),e)}))]:[]},
p.prototype.dataWindowView=function(){return null},p.prototype.priceAxisViews=function(){return null},p.prototype.statusView=function(){return null},p.prototype.updateAllViews=function(){},p.prototype.pointsCount=function(){return 0},p.prototype.properties=function(){return this._properties},p.prototype._rangeDifference=function(e){return e=Object.assign({},e),this._loadedRange&&(e.start<this._loadedRange.start?e.end=this._loadedRange.start:e.end>this._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='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" stroke="currentColor" transform="translate(6 4)"><rect width="15" height="12" rx="2" x=".5" y="7.5"/><path stroke-linecap="round" stroke-width="2" d="M8 14v2"/><path d="M11.5 7.5V4a3.5 3.5 0 0 0-7 0v3.5"/></g></svg>'},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;d<p.length;d++){var _=p[d],f=u.measureText(_).width;h=Math.max(h,f)}this.textImageWidth=h+1,this.textImageHeight=this._lines.length*r+this._verticalPadding}return e.prototype.paintTo=function(e,t,i,n,r,o,s){var a=this,c=this._getTextImage(i,t);if(0!==c.width&&0!==c.height){var u=function(e,t,i){var n=e;switch(t){case"left":break;case"right":n-=i;break;case"center":n-=i/2}return Math.round(n)}(n,o,this.textImageWidth),h=function(e,t,i){var n=e;switch(t){case"top":break;case"bottom":n-=i;break;case"middle":n-=i/2}return Math.round(n)}(r,s,this.textImageHeight);Object(l.drawScaled)(e,t.pixelRatio,(function(){e.drawImage(c,u,h,a.textImageWidth,a.textImageHeight)}))}},e.prototype._getTextImage=function(e,t){var i=this;if(null!==this._cacheRenderParams&&Object(a.areEqualPaneRenderParams)(this._cacheRenderParams,t)||(this._canvasesMap={},this._cacheRenderParams=t),this._canvasesMap[e])return this._canvasesMap[e];var n,r=Object(l.createDisconnectedCanvas)(document,new l.Size(this.textImageWidth,this.textImageHeight),this._cacheRenderParams.pixelRatio),s=Object(o.ensureNotNull)(r.getContext("2d"));switch(s.textBaseline="top",s.font=this._font,s.fillStyle=e,this._textAlign){case"left":n=0,s.textAlign="left";break;case"right":n=this.textImageWidth-1,s.textAlign="right";break;default:n=this.textImageWidth/2,s.textAlign="center"}var c=this._verticalPadding;return Object(l.drawScaled)(s,this._cacheRenderParams.pixelRatio,(function(){for(var e=0,t=i._lines;e<t.length;e++){var r=t[e];s.fillText(r,n,c),c+=i._fontSize}})),this._canvasesMap[e]=r,r},e}()},gLxC:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("tc+8"),o=i("Ocx9").DefaultProperty,s=window.t("Note");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("Dz+H").NotePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}function l(e,t){var i=t||l.createProperties();a.call(this,e,i)}inherit(a,n),a.TOOLTIP_WIDTH=300,a.TOOLTIP_PADDING=10,a.TOOLTIP_LINESPACING=5,a.version=1,a.prototype.pointsCount=function(){return 1},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Note"},a.prototype.getTooltipWidth=function(){return a.TOOLTIP_WIDTH},a.prototype.getTooltipPadding=function(){return a.TOOLTIP_PADDING},a.prototype.getTooltipLineSpacing=function(){return a.TOOLTIP_LINESPACING},a.prototype.template=function(){
var e=n.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},a.prototype._applyTemplateImpl=function(e){n.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},a.createProperties=function(e){void 0!==e&&void 0!==e.markerColor&&void 0===e.borderColor&&(e.borderColor=e.markerColor);var t=new o("linetoolnote",e);return a._configureProperties(t),t},a._configureProperties=function(e){n._configureProperties(e),e.hasChild("text")||e.addChild("text",new r(window.t("Text"))),e.addExclusion("text")},inherit(l,a),l.prototype.title=function(){return window.t("Anchored Note")},l.prototype.name=function(){return"Anchored Note"},l.prototype.isFixed=function(){return!0},l.prototype.hasEditableCoordinates=function(){return!1},l.createProperties=function(e){var t=new o("linetoolnoteabsolute",e);return l._configureProperties(t),t},l._configureProperties=function(e){a._configureProperties(e)},a.prototype.state=function(e){var t=n.prototype.state.call(this,e);return e&&(t.state.fixedSize=!1),t},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("74nv").NoteDefinitionsViewModel}.bind(null,i)).catch(i.oe)},t.LineToolNote=a,t.LineToolNoteAbsolute=l},gMtF:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolRiskRewardPriceAxisView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i){var n=e.call(this)||this;return n._source=t,n._data=i,n}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){if(e.visible=!1,this._showAxisLabel()){var n=this._source.priceScale();if(0!==this._source.points().length&&null!==n&&!n.isEmpty()){var r=this._source.ownerSource(),o=null!==r?r.firstValue():null;if(null!==o){var s=this._data.priceProperty.value(),a=this._data.colorProperty.value();i.background=a,i.color=this.generateTextColor(a),i.coordinate=n.priceToCoordinate(s,o),e.text=n.formatPrice(s,o),e.visible=!0}}}},t.prototype._showAxisLabel=function(){return this._source.properties().childs().showPriceLabels.value()},t}(i("KcY8").a)},gP14:function(e,t,i){"use strict";i.r(t),i.d(t,"ChartModelBase",(function(){return B}));var n=i("Eyy1"),r=i("aO4+"),o=i("oiZD"),s=i("vTIA"),a=i("8sOK"),l=i("LxhU"),c=i("tc+8"),u=i.n(c),h=i("KUek"),d=i("3ClC"),p=i("aIyQ"),_=i.n(p),f=i("hY0g"),m=i.n(f),v=i("H0vP"),y=i("Kxc7"),g=i("iDOr"),b=i("MbIA"),S=i("gQ5K"),w=i("ZZnO"),P=i("4kQX"),C=i("mPvX"),x=i("mMWL"),T=i("txPx"),I=i("CW80"),M=i("e3/o"),L=i("ogJP"),O=i("Tmoa"),k=i("4vW/"),A=i("k9/m"),E=Object(T.getLogger)("Chart.ChartModel");function V(e,t){var i=e.indexOf(t);return-1!==i&&(e.splice(i,1),!0)}var D={isSnapshot:!1,readOnly:!1,watermarkEnabled:!0,shiftVisibleRangeOnNewBar:!0,currencyLabelEnabled:!1},B=function(){function e(e,t,i){this._onRearrangePanes=new _.a,this._lineToolsGroupModel=new C.LineToolsGroupModel,this._sourcesBeingMoved=[],this._lineItemBeingMoved=null,this._dataSourceCollectionChanged=new _.a,this._sourceProperitesChanged=new _.a,
this._sessions=null,this._currentTool="",this._oldStartVisibleIndex=-1,this._oldEndVisibleIndex=-1,this._destroyed=!1,this._panes=[],this._tagsChanged=new _.a,this._strategySources=[],this._strategySourcesChange=new _.a,this._activeStrategySource=new m.a(null),this._panesCollectionChanged=new _.a,this._scrollEnabled=y.enabled("chart_scroll"),this._zoomEnabled=y.enabled("chart_zoom"),this._isScalesResetAvailableChanged=new _.a,this._isScalesResetAvailable=!1,this._esdWatcher=null,this._alertsWatcher=null,this._hoveredSource=null,this._hoveredSourceChanged=new _.a,this._lastHittestData=null,this._fgCustomSources=[],this._bgCustomSources=[],this._allCustomSources=[],this._customSourcesMap=new Map,this._showLegendProperty=new u.a,this._id=Object(M.guid)(),this._chartSaveTime=null,this._availableCurrencies=null,this._availableCurrenciesSet=new Set,this._shouldBeSavedEvenIfHidden=!1,this._watchedThemeSpawn=o.watchedTheme.spawn(),this._gradientColorsCache=null,this._recalcVRStudiesParams={timerId:null,force:!1},this._undoModel=e,this._properties=t,this._options=Object(L.merge)(Object(L.clone)(D),i),this._readOnly=this._options.readOnly,this._isSnapshot=this._options.isSnapshot,this._chartSaveTime=(new Date).valueOf(),this._backgroundColor=new m.a(this._getBackgroundColor()),this._backgroundTopColor=new m.a(this._getBackgroundColor(!0)),this._properties.childs().paneProperties.childs().background.subscribe(this,this._updateBackgroundColor),this._properties.childs().paneProperties.childs().backgroundType.subscribe(this,this._updateBackgroundColor),this._properties.childs().paneProperties.childs().backgroundGradientStartColor.subscribe(this,this._updateBackgroundColor),this._properties.childs().paneProperties.childs().backgroundGradientEndColor.subscribe(this,this._updateBackgroundColor),this._watchedThemeSpawn.subscribe(this._updateBackgroundColor.bind(this))}return e.prototype.chartSaveTime=function(){return this._chartSaveTime},e.prototype.setChartSaveTime=function(e){this._chartSaveTime=e},e.prototype.destroy=function(){this._hoveredSourceChanged.destroy(),null!==this._watermarkSource&&(this._watermarkSource.destroy(),this._watermarkSource=null),Array.from(this._customSourcesMap.keys()).forEach(this._removeCustomSource,this),Object(n.assert)(0===this._fgCustomSources.length),Object(n.assert)(0===this._bgCustomSources.length),Object(n.assert)(0===this._allCustomSources.length),Object(n.assert)(0===this._customSourcesMap.size),null!==this._esdWatcher&&(this._esdWatcher.destroy(),this._esdWatcher=null),null!==this._alertsWatcher&&(this._alertsWatcher.destroy(),this._alertsWatcher=null),this._properties.childs().paneProperties.childs().background.unsubscribeAll(this),this._properties.childs().paneProperties.childs().backgroundType.unsubscribeAll(this),this._properties.childs().paneProperties.childs().backgroundGradientEndColor.unsubscribeAll(this),this._properties.childs().paneProperties.childs().backgroundGradientStartColor.unsubscribeAll(this),this._watchedThemeSpawn.destroy(),this._destroyed=!0},
e.prototype.undoModel=function(){return this._undoModel},e.prototype.addStrategySource=function(e){-1===this._strategySources.indexOf(e)&&(this._strategySources.push(e),this._strategySourcesChange.fire(),this.setActiveStrategySource(e))},e.prototype.removeStrategySource=function(e){var t=this._strategySources.indexOf(e);if(-1!==t){if(this._strategySources.splice(t,1)[0]===this._activeStrategySource.value()&&this.unsetActiveStrategySource(),this._strategySources.length>0){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<r.length;n++){var o=i(r[n]);if("object"==typeof o)return o.value}return null},e.prototype.movePaneUp=function(e){this.movePane(e,e-1)},e.prototype.movePaneDown=function(e){this.movePane(e,e+1)},e.prototype.movePane=function(e,t){var i=this._panes[e];this._panes.splice(e,1),this._panes.splice(t,0,i),this._panesCollectionChanged.fire(this._panes),this._onRearrangePanes.fire(),this.invalidate(v.InvalidationMask.panesOrder())},e.prototype.backgroundColor=function(){return this._backgroundColor},e.prototype.backgroundTopColor=function(){return this._backgroundTopColor},e.prototype.backgroundColorAtYPercentFromTop=function(e){var t=this.backgroundColor().value(),i=this.backgroundTopColor().value();if(t===i)return t;if(e=Math.max(0,Math.min(100,Math.round(100*e))),null===this._gradientColorsCache||this._gradientColorsCache.topColor!==i||this._gradientColorsCache.bottomColor!==t)this._gradientColorsCache={topColor:i,bottomColor:t,colors:new Map};else{var n=this._gradientColorsCache.colors.get(e);if(void 0!==n)return n}var r=Object(O.gradientColorAtPercent)(i,t,e/100);return this._gradientColorsCache.colors.set(e,r),r},e.prototype.defaultResolutions=function(){return this.chartApi().defaultResolutions()},e.prototype.availableCurrenciesSet=function(){var e=this._getAvailableCurrencies()
;return e.length!==this._availableCurrenciesSet.size&&(this._availableCurrenciesSet=new Set(e)),this._availableCurrenciesSet},e.prototype.currencyLabelEnabled=function(){return this._options.currencyLabelEnabled},e.prototype.startMovingSources=function(e,t,i,r,o,s){var a=this;if(this._sourcesBeingMoved=e,this._lineItemBeingMoved=i,this._sourcesBeingMoved.forEach((function(e){var s=Object(n.ensureNotNull)(a.paneForSource(e));if(Object(I.isLineTool)(e)&&e.isFixed()&&e.linkKey&&r.has(e.linkKey)){var l=Object(n.ensureDefined)(r.get(e.linkKey)),c={screen:a._percentPositionToPoint(l,s)};e.startMoving(c,i,o)}else e.startMoving(t,i,o);var u=a._paneInvalidationMask(s,v.InvalidationLevel.Light);a.invalidate(u)})),!s){var l=e.filter((function(e){return e.linkKey&&e.isSynchronizable()})).map((function(e){return e.linkKey}));if(l.length&&t.logical){var c=this.externalTimeStamp(t.logical.index),u={linkKeys:l,model:this,symbol:this.mainSeries().symbol(),point:{price:t.logical.price,timeStamp:c},envState:o,pointPositionPercents:new Map};e.forEach((function(e){if(e.linkKey&&e.isSynchronizable()&&e.isFixed()){var i=Object(n.ensureNotNull)(a.paneForSource(e));u.pointPositionPercents.set(e.linkKey,a._pointToPercentPosition(Object(n.ensureDefined)(t.screen),i))}})),Object(x.startMovingLineTool)(u)}}},e.prototype.moveSources=function(e,t,i,r){var o=this;if(this._sourcesBeingMoved.filter((function(e){return!e.isLocked||!e.isLocked()})).forEach((function(r){if(r.linkKey&&t.has(r.linkKey)){var s=Object(n.ensureNotNull)(o.paneForSource(r)),a=Object(n.ensureDefined)(t.get(r.linkKey)),l={screen:o._percentPositionToPoint(a,s)};r.move(l,o._lineItemBeingMoved,i)}else r.move(e,o._lineItemBeingMoved,i)})),this.lightUpdate(),!r&&e.logical){var s=this._sourcesBeingMoved.filter((function(e){return e.isSynchronizable()&&!!e.linkKey})).map((function(e){return e.linkKey})),a=this.externalTimeStamp(e.logical.index),l={linkKeys:s,model:this,point:{price:e.logical.price,timeStamp:a},envState:i,pointPositionPercents:new Map};this._sourcesBeingMoved.forEach((function(t){if(t.linkKey&&t.isSynchronizable()&&t.isFixed()){var i=Object(n.ensureNotNull)(o.paneForSource(t));l.pointPositionPercents.set(t.linkKey,o._pointToPercentPosition(Object(n.ensureDefined)(e.screen),i))}})),Object(x.moveLineTool)(l)}},e.prototype.endMovingSources=function(e,t){var i=this;this._sourcesBeingMoved.forEach((function(t){var r=Object(n.ensureNotNull)(i.paneForSource(t));t.endMoving(e);var o=i._paneInvalidationMask(r,v.InvalidationLevel.Light);o.invalidateAll(v.InvalidationLevel.Light),i.invalidate(o)}));var r=this._sourcesBeingMoved.filter((function(e){return e.isSynchronizable()&&!!e.linkKey})).map((function(e){return e.linkKey})),o=this._sourcesBeingMoved.filter((function(e){return e.isSynchronizable()&&!!e.linkKey})).map((function(e){var t={points:e.normalizedPoints(),interval:i.mainSeries().interval()};return e.isFixed()&&(t.pointPositionPercents=e.calcPositionPercents()),t}));r.length&&Object(x.finishMovingLineTool)({linkKeys:r,model:this,finalStates:o}),
this._sourcesBeingMoved=[],this._lineItemBeingMoved=null},e.prototype.sourcesBeingMoved=function(){return this._sourcesBeingMoved},e.prototype.isScalesResetAvailableChanged=function(){return this._isScalesResetAvailableChanged},e.prototype.isScalesResetAvailable=function(){return this._isScalesResetAvailable},e.prototype.panes=function(){return this._panes},e.prototype.paneForId=function(e){return this._panes.find((function(t){return t.id()===e}))||null},e.prototype.createPane=function(t,i){var n=this,r=this._undoModel.chartWidget();r.isMaximizedPane()&&r.toggleMaximizePane();var o=this._properties.childs().paneProperties;i&&o.merge(i);var s=new g.Pane(this._timeScale,o,this);return void 0!==t?this._panes.splice(t,0,s):this._panes.push(s),s.onTagsChanged().subscribe(this,e.prototype.onPaneTagsChanged),s.dataSourcesCollectionChanged().subscribe(this,(function(){return n._dataSourceCollectionChanged.fire(s)})),s.sourcePropertiesChanged().subscribe(this,(function(e){return n._sourceProperitesChanged.fire(s,e)})),this._panesCollectionChanged.fire(this._panes),this.invalidate(v.InvalidationMask.panesOrder()),s},e.prototype.removePane=function(e){var t=this._undoModel.chartWidget();t.isMaximizedPane()&&t.toggleMaximizePane();var i=e;i.destroy();var n=this._panes.indexOf(i);-1!==n&&(this._panes.splice(n,1),e.dataSourcesCollectionChanged().unsubscribeAll(this),e.sourcePropertiesChanged().unsubscribeAll(this),e.onTagsChanged().unsubscribeAll(this)),this.crossHairSource().pane===e&&this.clearCurrentPosition(),this._panesCollectionChanged.fire(this._panes),this.invalidate(v.InvalidationMask.panesOrder())},e.prototype.changePanesHeight=function(e,t){if(!(this._panes.length<2)){Object(n.assert)(e>=0&&e<this._panes.length,"Invalid pane index");var i=this._panes[e],r=this._panes.reduce((function(e,t){return e+t.stretchFactor()}),0),o=this._panes.reduce((function(e,t){return e+t.height()}),0),s=o-30*(this._panes.length-1);t=Math.min(s,Math.max(30,t));var a=r/o,l=i.height();i.setStretchFactor(t*a);for(var c=t-l,u=this._panes.length-1,h=0,d=this._panes;h<d.length;h++){var p=d[h];if(p!==i){var _=Math.min(s,Math.max(30,p.height()-c/u));c-=p.height()-_,u-=1;var f=_*a;p.setStretchFactor(f)}}this.fullUpdate()}},e.prototype.currentTool=function(){return this._currentTool},e.prototype.setCurrentTool=function(e){this._currentTool=e},e.prototype.onRearrangePanes=function(){return this._onRearrangePanes},e.prototype.changeLinePoints=function(e,t,i){e.setPoints(t),e.updateAllViews(),this.lightUpdate(),!i&&e.linkKey&&e.isSynchronizable()&&Object(x.changeLineTool)({linkKey:e.linkKey,model:this,symbol:this.mainSeries().symbol(),points:e.normalizedPoints()})},e.prototype.addCustomSource=function(e,t,i){void 0===i&&(i=s.a.Foreground),this._customSourcesMap.has(e)&&E.logWarn('Attempt to add the same custom source multiple time "'+e+'"'),E.logNormal('Adding custom source "'+e+'"');var n=t(this);(i===s.a.Background?this._bgCustomSources:this._fgCustomSources).push(n),this._allCustomSources.push(n),this._customSourcesMap.set(e,n),this.lightUpdate()},
e.prototype.removeCustomSource=function(e){this._removeCustomSource(e),this.lightUpdate()},e.prototype.hasCustomSource=function(e){return this._customSourcesMap.has(e)},e.prototype.customSourceForName=function(e){return this._customSourcesMap.get(e)||null},e.prototype.customSourceName=function(e){var t=null;return this._customSourcesMap.forEach((function(i,n){i===e&&(t=n)})),t},e.prototype.customSources=function(e){switch(e){case s.a.Background:return this._bgCustomSources;case s.a.Foreground:return this._fgCustomSources;default:return this._allCustomSources}},e.prototype.dateTimeFormatter=function(){return this._dateTimeFormatter},e.prototype.dateFormatter=function(){return this._dateFormatter},e.prototype.timeFormatter=function(){return this._timeFormatter},e.prototype.sessions=function(){return Object(n.ensureNotNull)(this._sessions)},e.prototype.createSessions=function(e){var t=this;Object(n.assert)(null===this._sessions,"Sessions are already created"),this.addCustomSource("sessions",(function(i){return t._sessions=new h.Sessions(i,e),t._sessions.start(),t._sessions}),s.a.Background)},e.prototype.createPrePostMarket=function(e){this.addCustomSource("prePostMarket",(function(t){return new PrePostMarket(t,e)}))},e.prototype.shouldBeSavedEvenIfHidden=function(){return this._shouldBeSavedEvenIfHidden},e.prototype.setShouldBeSavedEvenIfHidden=function(e){this._shouldBeSavedEvenIfHidden=e},e.prototype.externalTimeStamp=function(e){var t=this.mainSeries().syncModel();return this.timeScale().points().roughTime(e,t&&t.projectTime.bind(t))},e.prototype.syncESD=function(){null!==this._esdWatcher&&this._esdWatcher.syncESDStudies()},e.prototype.recalcVisibleRangeStudies=function(e,t){var i=this;null!==this._recalcVRStudiesParams.timerId&&clearTimeout(this._recalcVRStudiesParams.timerId),this._recalcVRStudiesParams.force=this._recalcVRStudiesParams.force||Boolean(e),null!==this._recalcVRStudiesParams.studies&&(void 0===this._recalcVRStudiesParams.studies?this._recalcVRStudiesParams.studies=t||null:void 0!==t&&(this._recalcVRStudiesParams.studies=Array.from(new Set(this._recalcVRStudiesParams.studies.concat(t))))),this._recalcVRStudiesParams.timerId=setTimeout((function(){return i._recalcVisibleRangeStudiesImpl()}),500)},e.prototype.alertsWatcher=function(){return this._alertsWatcher},e.prototype.showLegend=function(){return this._showLegendProperty},e.prototype.id=function(){return this._id},e.prototype._createESDWatcher=function(){},e.prototype._updateDateTimeFormatter=function(){var e=w.dateFormatProperty.value(),t=new S.DateFormatter(e);if(this._dateFormatter=t,this.mainSeries().isDWM())this._dateTimeFormatter=t,this._timeFormatter=new P.TimeFormatter("%h:%m");else{var i=l.Interval.parse(this.mainSeries().interval()).isSeconds()?"%h:%m:%s":"%h:%m";this._dateTimeFormatter=new b.DateTimeFormatter({dateFormat:e,timeFormat:i,dateTimeSeparator:" "}),this._timeFormatter=new P.TimeFormatter(i)}},e.prototype._setScalesResetAvailable=function(e){this._isScalesResetAvailable!==e&&(this._isScalesResetAvailable=e,
this._isScalesResetAvailableChanged.fire())},e.prototype._invalidationMaskForSource=function(e,t){if(void 0===t&&(t=v.InvalidationLevel.Light),e===this.crossHairSource())return v.InvalidationMask.cursor();if(this._watermarkSource===e)return this._paneInvalidationMask(Object(n.ensureNotNull)(this.paneForSource(this.mainSeries())),t);if(-1!==this._allCustomSources.indexOf(e)){var i=new v.InvalidationMask;return i.invalidateAll(t),i}var r=this.paneForSource(e);return null!==r?this._paneInvalidationMask(r,t):null},e.prototype._paneInvalidationMask=function(e,t){void 0===t&&(t=v.InvalidationLevel.Light);var i=new v.InvalidationMask,n=this._panes.indexOf(e);return i.invalidateAllPane(n,t),i},e.prototype._invalidationMaskForSourcePriceScale=function(e,t){void 0===t&&(t=v.InvalidationLevel.Light);var i=this.paneForSource(e);if(null===i)return null;var n=e.priceScale();if(null===n)return null;var r=this._panes.indexOf(i),o=i.priceScalePosition(n);if("overlay"===o){var s=this._panes[r].defaultPriceScale();n=s,o=i.priceScalePosition(s)}var a=i.priceScaleIndex(n,o);if(void 0===a)return null;var l=new v.InvalidationMask;return l.invalidatePriceScale(r,o,a,t),l},e.prototype._removeCustomSource=function(e){var t=this._customSourcesMap.get(e);if(void 0!==t){E.logNormal('Removing custom source "'+e+'"');var i=V(this._fgCustomSources,t)!==V(this._bgCustomSources,t),r=V(this._allCustomSources,t);Object(n.assert)(i,"Source should be presented in one of the layers"),Object(n.assert)(r,"Source should be presented in the array"),this._customSourcesMap.delete(e),t.destroy()}else E.logWarn('Attempt to remove custom source which does not exist in the model - "'+e+'"')},e.prototype._updateShowLegendProperty=function(){var e=this._properties.childs().paneProperties.childs().legendProperties.childs().showLegend,t=this._showLegendProperty;if(e.value())t.setValue(!0);else{for(var i=0,n=this._panes;i<n.length;i++)for(var r=0,o=0,s=n[i].dataSources();o<s.length;o++){var a=s[o];if(a!==this.mainSeries()&&null!==a.statusView()&&++r>1)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;u<h.length;u++){var p=h[u];if(Object(d.isStudy)(p)){for(var _=[],f=0,m=p.metaInfo().inputs;f<m.length;f++){var v=m[f];l.hasOwnProperty(v.id)&&_.push(v.id)}for(var y=p.properties().inputs,g=0,b=_;g<b.length;g++){var S=b[g];y[S].setValueSilently(l[S])}_.length>0&&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;r<i.items.length;++r){
var o=i.items[r];if(null!=o.color){e.fillStyle=o.color;var s=Math.round(o.x*n),a=r===i.items.length-1?Math.round(i.w*n):Math.round(i.items[r+1].x*n)-s;e.fillRect(s,Math.round(i.y*n),a,Math.round(i.h*n))}}e.restore()},e.prototype.hitTest=function(e){return null},e}()},gWck:function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesLegendView",(function(){return a}));var n=i("mrSG"),r=i("cXAR"),o=i("C2K+"),s=window.t("At close"),a=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._showBarChange.subscribe(n,n.update),n._showSeriesOHLC.subscribe(n,n.update),n}return Object(n.__extends)(t,e),t.prototype.isValuesVisible=function(){return this._showSeriesOHLC.value()||this._showBarChange.value()},t.prototype.additional=function(){return null},t.prototype.marketTitle=function(){var e=this._series.marketStatusModel().status().value();return this._showLastPriceAndChangeOnly()&&("pre_market"===e||"post_market"===e)?s+":":""},t.prototype.destroy=function(){this._showBarChange.unsubscribeAll(this),this._showSeriesOHLC.unsubscribeAll(this)},t.prototype._createValuesProvider=function(e,t){return new o.a(e,t)},t}(r.SeriesDataWindowView)},gWrr:function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return o}));var n=new WeakMap;function r(e,t){var i,r;return i=null==t?document.documentElement:9===t.nodeType?t.documentElement:t,n&&(r=n.get(i)),r||((r=i.ownerDocument.createRange()).selectNodeContents(i),n&&n.set(i,r)),r.createContextualFragment(e)}function o(e,t){var i,n=r(e,t);if("firstElementChild"in n)i=n.firstElementChild;else{i=null;for(var o=0;o<n.childNodes.length;o++){var s=n.childNodes[o];if(1===s.nodeType){i=s;break}}}return null!==i&&n.removeChild(i),i}},"ga+R":function(e,t,i){"use strict";e.exports=function(e,t){var i=e%10;i&&(e=e-i+10);for(var n=[];e<=t;e+=10)n.push(e);return n}},gaBL:function(e,t,i){"use strict";i.r(t),i.d(t,"sourceNewCurrencyOnPinningToPriceScale",(function(){return r}));var n=i("/tGj");function r(e,t,i,r){var o=null;if(i.currencyLabelEnabled()&&Object(n.isSymbolSource)(e)){var s=i.availableCurrenciesSet(),a=t.currency(s),l=e.currency();null!==a&&null!==a.selectedCurrency&&!a.allCurrenciesAreOriginal&&a.selectedCurrency!==l&&(r&&null===l||null!==l&&s.has(l))&&(o=a.selectedCurrency)}return o}},gyZD:function(e,t,i){"use strict";var n=i("aO4+").Point,r=i("GEp6").distanceToSegment,o=i("Zp/P"),s=i("VdBB").HitTestResult,a=i("cPgM").ScaledPaneRenderer;function l(e){this.items=e.items,this._simpleMode=e.simpleMode,this.barSpacing=e.barSpacing,this.lineColor=e.lineColor,this.lineWidth=e.lineWidth,this.lineStyle=e.lineStyle,this.withMarkers=e.withMarkers,this.hittest=e.hittest,this.ignorePaletteLineWidth=e.ignorePaletteLineWidth,this.forceLineColor=!!e.forceLineColor}inherit(l,a),l.prototype._drawImpl=function(e){e.lineCap="square",e.lineJoin=this.withMarkers?"round":"miter",e.strokeStyle=this.lineColor,
e.fillStyle=this.lineColor,e.lineWidth=this.lineWidth,e.lineStyle=this.lineStyle,o.setValidLineStyle(e,this.lineStyle),this._simpleMode?this._drawSimpleMode(e):this._drawLines(e)},l.prototype._drawSimpleMode=function(e){if(e.beginPath(),this.walkLine(e,this.items),e.stroke(),this.withMarkers){var t,i=this.lineWidth+2,n=2*Math.PI;e.beginPath();for(var r=this.items.length;r--;)(t=this.items[r])&&(e.moveTo(t.x,t.y),e.arc(t.x,t.y,i,0,n));e.fill()}},l.prototype.walkLine=function(e,t,i,n){if(t){for(var r,s,a,l,c,u=.25*this.barSpacing,h=o.coordinateIsValid,d=0,p=t.length;d<p;d++){var _=t[d];if(h(_.y)){s=_,r=d;break}}if(void 0!==r&&s)for(d=r,p=t.length;d<p;d++){if(l=t[d],c=t[d+1]||{},h(l.y))if(a&&h(a.y))e.lineTo(l.x,l.y),i&&!h(c.y)&&e.lineTo(l.x,n);else if(c&&h(c.y))i?(d!==r&&e.lineTo(l.x,n),e.lineTo(l.x,l.y)):e.moveTo(l.x,l.y);else if(i){if(0===d)continue;d!==r&&e.lineTo(l.x-u,n),e.lineTo(l.x-u,l.y),e.lineTo(l.x+u,l.y),e.lineTo(l.x+u,n)}else e.moveTo(l.x-u,l.y),e.lineTo(l.x+u,l.y);a=l}}},l.prototype._drawLines=function(e){if(this.items.length){var t,i,n,r=.25*this.barSpacing,s=o.coordinateIsValid;e.beginPath();var a=this.items[0];a&&e.moveTo(a.x,a.y);for(var l=e.strokeStyle,c=e.lineWidth,u=e.lineStyle,h=1;h<this.items.length;++h){var d,p,_;t=this.items[h-1],i=this.items[h],n=this.items[h+1],i.style&&!this.forceLineColor?(d=i.style.color,p=i.style.width,_=i.style.style):(d=this.lineColor,p=this.lineWidth,_=this.lineStyle),this.ignorePaletteLineWidth&&(p=this.lineWidth),(d!==l||p!==c||_!==u)&&(l=d,c=p,u=_,e.stroke(),e.beginPath(),e.strokeStyle=d,e.lineWidth=p,o.setValidLineStyle(e,_),e.moveTo(t.x,t.y)),f(t,i,n)}e.stroke()}function f(t,i,n){s(i.y)&&(s(t.y)?e.lineTo(i.x,i.y):n&&s(n.y)?e.moveTo(i.x,i.y):(e.moveTo(i.x-r,i.y),e.lineTo(i.x+r,i.y)))}},l.prototype.hitTest=function(e){for(var t,i,a,l,c=o.selectionTolerance(this.lineWidth),u=0,h=this.items.length-1;h-u>2;){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;i<n.length;i++){var o=n[i];if(r.equalPoints(o,t))return!1}return e.push(t),!0}function u(e,t){return!(e.length>0&&r.equalPoints(e[e.length-1],t))&&(e.push(t),!0)}function h(e,t){for(var i=[],n=0;n<e.length;++n){var o=e[n],l=e[(n+1)%e.length],c=r.lineThroughPoints(o,l);if(s.pointInHalfplane(o,t)){if(u(i,o),!s.pointInHalfplane(l,t))null!==(h=a(c,t.edge))&&u(i,h)}else if(s.pointInHalfplane(l,t)){var h;null!==(h=a(c,t.edge))&&u(i,h)}}return i.length>=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 e<i?s|=1:e>r&&(s|=2),t<n?s|=4:t>o&&(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;n<t.length&&null!==i;++n){var o=t[n],s=t[(n+1)%t.length],a=t[(n+2)%t.length],l=r.lineThroughPoints(o,s);i=h(i,r.halfplaneThroughPoint(l,a))}return i}},hGf4:function(e,t,i){"use strict";(function(e,t){var n,r=i("kcTO").PriceFormatter,o=i("JOqt").debounce,s=i("PoSe"),a=i("IVMC"),l=i("e3/o"),c=i("i/Bj").parseUpdateMode,u=i("FIi8").deepExtend;function h(t,i){this.options=Object.assign({throttleTimeout:125},i),this._connected=!1,this._symbol_data={},this._subscriptions={},this.onConnect=new e,this.onDisconnect=new e,this._quoteApi=new n(window.ChartApiInstance),this._type=t||"full",this._delayUpdateFastSymbols=o(this._updateFastSymbols,250),this._throttledSymbolData={},this._formatterValuesCache={},this._waitingForFormatters={},this._snapshotValuesCache={},this._waitingForSnapshot={},this.connect()}n=i("wi9r"),h.prototype.destroy=function(){this._quoteApi.destroy(),this._quoteApi=null,this._connected=!1,this.onDisconnect.fire()},h.prototype.typeFields={},h.prototype.typeFields.simple=["ch","chp","current_session","description","local_description","language","exchange","fractional","is_tradable","lp","lp_time","minmov","minmove2","original_name","pricescale","pro_name","short_name","type","update_mode","volume","currency_code","logoid","currency-logoid","base-currency-logoid"],h.prototype.typeFields.simpleDetailed=[].concat(h.prototype.typeFields.simple,["ask","bid","fundamentals","high_price","is_tradable","low_price","open_price","prev_close_price","rch","rchp","rtc","rtc_time","status","basic_eps_net_income","beta_1_year","earnings_per_share_basic_ttm","industry","market_cap_basic","price_earnings_ttm","sector","volume","dividends_yield","timezone"]),h.prototype.typeFields.full=[],h.prototype.typeFields.watchlist=[].concat(h.prototype.typeFields.simple,["rchp","rtc"]),h.prototype.connect=function(e){this._quoteApi.connect(this.quoteHandler.bind(this))},h.prototype.quoteHandler=function(e){var t=e.method,i=e.params;switch(t){case"connected":this._connected||(this._connected=!0,this.onConnected());break;case"quote_list_fields":break;case"quote_symbol_data":this._connected&&this.onSymbolData(i[0]);break;case"quote_completed":this._connected&&this.onSymbolData({symbolname:i[0],complete:performance.now(),values:{}});break;case"disconnected":this._connected&&(this._connected=!1,this.onDisconnect.fire())}
},h.prototype.onConnected=function(){this.setFields();var e=Object.keys(this._symbol_data);e.length&&(this._quoteApi.quoteAddSymbols(e,{forcePermission:!0}),this._delayUpdateFastSymbols()),this.onConnect.fire()},h.prototype.setFields=function(){var e=h.prototype.typeFields[this._type];e&&e.length&&this._quoteApi.quoteSetFields(e)},h.prototype.onSymbolData=function(e){var t=e.symbolname,i=this._throttledSymbolData[t];i||(i=this._throttledSymbolData[t]={fnDispatch:s(this.dipatchSymbolData.bind(this),this.options.throttleTimeout)}),i.cache?u(i.cache,e):i.cache=e,i.fnDispatch(t)},h.prototype._parseUpdateMode=function(e){var t=c(e.update_mode);null!==t&&(e.update_mode=t.mode,e.update_mode_seconds=t.interval)},h.prototype.dipatchSymbolData=function(e){var t=this._symbol_data[e],i=this._throttledSymbolData[e].cache;if(delete this._throttledSymbolData[e].cache,this._symbol_data[e])for(var n in u(t,i),t.values&&this._parseUpdateMode(t.values),this._subscriptions){var r=this._subscriptions[n];r.has(e)&&r.get(e).forEach((function(e){e(t,i)}))}},h.prototype.subscribe=function(e,t,i){this._subscriptions[e]=this._subscriptions[e]||new Map;var n=this._subscriptions[e];t=[].concat(t);var r=[];t.forEach((function(e){this._symbol_data[e]?n&&n.has(e)||this._symbol_data[e].subscribers_count++:(this._symbol_data[e]={subscribers_count:1},r.push(e)),n.has(e)||n.set(e,[]),n.get(e).push(i),n.get(e).fast=!0,this._symbol_data[e]&&this._symbol_data[e].values&&i(this._symbol_data[e],this._symbol_data[e])}),this),r.length&&this._connected&&(this._quoteApi.quoteAddSymbols(r,{forcePermission:!0}),this._delayUpdateFastSymbols())},h.prototype.unsubscribe=function(e,t,i){t=[].concat(t);for(var n=this._subscriptions[e],r=[],o=0;o<t.length;o++){var s=t[o];if(n)if(n.has(s)&&i){var a=n.get(s).indexOf(i);~a&&n.get(s).splice(a,1),n.get(s).length||n.delete(s)}else n.delete(s);n&&0===n.size&&delete this._subscriptions[e],this._symbol_data.hasOwnProperty(s)&&(n&&!n.has(s)&&this._symbol_data[s].subscribers_count--,this._symbol_data[s].subscribers_count||(delete this._symbol_data[s],r.push(s)))}r.length&&this._connected&&(this._quoteApi.quoteRemoveSymbols(r),this._delayUpdateFastSymbols())},h.prototype.setFastSymbols=function(e,t){if(this._subscriptions[e])for(var i=this._subscriptions[e],n=Array.from(i.keys()),r=0;r<n.length;++r){var o=n[r];i.get(o).fast=-1!==t.indexOf(o)}this._delayUpdateFastSymbols()},h.prototype._updateFastSymbols=function(){if(this._connected){var e=this._fastSymbols();0===e.length?this._quoteApi.quoteHibernateAll():this._quoteApi.quoteFastSymbols(e)}},h.prototype._delayUpdateFastSymbols=h.prototype._updateFastSymbols,h.prototype._fastSymbols=function(){var e=[];for(var t in this._subscriptions)for(var i=this._subscriptions[t],n=Array.from(i.keys()),r=0;r<n.length;++r){var o=n[r];i.get(o).fast&&e.push(o)}return e=a(e)},h.prototype.formatter=function(e,t){var i=this;if(this._waitingForFormatters[e])return this._waitingForFormatters[e];function n(e){var i=t&&!e.fractional?1:e.minmov;return new r(e.pricescale,i,e.fractional,e.minmove2)}
var o=new Promise((function(t,r){if(i._formatterValuesCache[e])t(n(i._formatterValuesCache[e]));else{var o=l.guid();i.subscribe(o,[e],(function(s){"error"===s.status&&(i._waitingForFormatters[e]=null,r("Quotes snapshot is not received")),function(e){return e&&null!=e.pricescale&&null!=e.minmov}(s.values)&&(i._waitingForFormatters[e]=null,i._formatterValuesCache[e]=s.values,t(n(s.values)),i.unsubscribe(o,e))}))}}));return this._waitingForFormatters[e]=o,o},h.prototype.snapshot=function(e){var t=this;if(this._waitingForSnapshot[e])return this._waitingForSnapshot[e];var i=new Promise((function(i,n){if(t._snapshotValuesCache[e])i(t._snapshotValuesCache[e]);else{var r=l.guid();t.subscribe(r,[e],(function(o){"error"===o.status&&(t._waitingForSnapshot[e]=null,n("Quotes snapshot is not received"));var s=o.values;s&&s.minmov&&s.pricescale&&s.description&&(t._waitingForSnapshot[e]=null,t._snapshotValuesCache[e]=s,i(s),t.unsubscribe(r,e))}))}}));return this._waitingForSnapshot[e]=i,i},TradingView.QuoteSessionMultiplexer=h,t&&t.exports&&(t.exports=h)}).call(this,i("aIyQ"),i("YuTi")(e))},hOqT:function(e,t,i){"use strict";i.r(t),i.d(t,"getTranslatedSymbolDescription",(function(){return n}));i("YFKU");function n(e){return e.description||""}},hP9j:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolPolyline",(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)("Polyline"),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,"C2CE")).then((function(e){o._setPaneViews([new e.PolylinePaneView(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"Polyline"},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;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<r.length;s++){r[s].once&&(n._listeners.splice(s-o,1),o++);try{r[s].cb(e)}catch(a){t.logError(a.stack||a.message)}}return e},r.prototype.deleteValue=function(){var e=this._owner?this._owner:this;if(e.hasOwnProperty("_value")){if(e.writeLock)return e._value;delete e._value;for(var i=e._listeners.slice(),n=0,r=0;r<i.length;r++){i[r].once&&(e._listeners.splice(r-n,1),n++);try{i[r].cb()}catch(o){t.logError(o.stack||o.message)}}}},r.prototype.subscribe=function(e,i){if("function"!=typeof e)throw new TypeError("callback must be a function");var n=!!i&&!!i.once,r=!!i&&!!i.callWithLast,o=this._owner?this._owner:this;if(r&&o.hasOwnProperty("_value")){try{e(o._value)}catch(s){t.logError(s.stack||s.message)}if(n)return}o._listeners.push({cb:e,owner:this,once:!!i&&!!i.once})},r.prototype.unsubscribe=function(e){var t=this._owner?this._owner:this;void 0===e&&(e=null);for(var i=t._listeners,n=i.length;n--;)i[n].owner!==this&&t!==this||i[n].cb!==e&&null!==e||i.splice(n,1)},r.prototype.listeners=function(){return(this._owner?this._owner:this)._listeners},r.prototype.readonly=function(){if(this._readonlyInstance)return this._readonlyInstance;var e=this._readonlyInstance=new n;return e.subscribe=this.subscribe.bind(this),e.unsubscribe=this.unsubscribe.bind(this),e.value=this.value.bind(this),e.when=this.when.bind(this),e.spawn=function(){return this.spawn().readonly()}.bind(this),this.destroy&&(e.destroy=this.destroy.bind(this)),e},r.prototype.spawn=function(e){var i=new r;return delete i._listeners,i._owner=this._owner||this,i.destroy=function(){if("function"==typeof e)try{e()}catch(i){
t.logError(i.stack||i.message)}this.unsubscribe(),delete this._owner},i},r.prototype.when=function(e){var i=this;if(this.value())try{e()}catch(r){t.logError(r.stack||r.message)}else{var n=function(t){t&&(i.unsubscribe(n),e())};i.subscribe(n)}},r.prototype.opposite=function(){if(!this._opposite){var e=this,t=new r(!this.value());this.subscribe((function(e){t.setValue(!e)})),t.subscribe((function(t){e.setValue(!t)})),this._opposite=t}return this._opposite},"undefined"!=typeof window&&(window.WatchedValue=r),e&&e.exports&&(e.exports=r)}).call(this,i("YuTi")(e))},hY3j:function(e,t,i){"use strict";var n=i("PAcw").GridRenderer;function r(){this.visible=!0,this.horzLinesVisible=!0,this.horzLinesColor="white",this.horzLinesStyle="",this.vertLinesVisible=!0,this.vertLinesColor="white",this.vertLinesStyle=""}function o(e,t){this.source=e,this.pane=t,this._renderer=new n}r.prototype.paneViews=function(e){return[new o(this,e)]},o.prototype.update=function(){},o.prototype.renderer=function(){var e={};return this.pane.defaultPriceScale().isEmpty()||this.pane.timeScale().isEmpty()?null:(e.horzLinesVisible=!0,e.vertLinesVisible=!0,e.horzLinesColor=this.pane._model.properties().paneProperties.horzGridProperties.color.value(),e.vertLinesColor=this.pane._model.properties().paneProperties.vertGridProperties.color.value(),e.horzLineStyle=this.pane._model.properties().paneProperties.horzGridProperties.style.value(),e.vertLineStyle=this.pane._model.properties().paneProperties.vertGridProperties.style.value(),e.priceMarks=this.pane.defaultPriceScale().marks(),e.timeMarks=this.pane.timeScale().marks(),e.w=this.pane.width(),e.h=this.pane.height(),this._renderer.setData(e),this._renderer)},t.Grid=r},hayr:function(e,t,i){"use strict";var n=i("txPx").getLogger("Chart.DataSourcePropertyPages"),r=i("mpWx").retries;t.propertyPages={};var o=t.propertyPages,s=null;function a(e,t){Promise.all([i.e(31),i.e(32),i.e(39),i.e(82),i.e(30),i.e(35),i.e("ds-property-pages")]).then(function(t){o.LineToolInputsPropertyPage=i("n3Kh"),o.LineToolVisibilitiesPropertyPage=i("RTm2"),o.StudyDisplayPropertyPage=i("o6hY").StudyDisplayPropertyPage,o.StudyInputsPropertyPage=i("L9lC").StudyInputsPropertyPage,o.StudyLineDataSourcePropertyPage=i("ICcj"),o.StudyStylesPropertyPage=i("o6hY").StudyStylesPropertyPage,n.logNormal("Property pages loaded"),e()}.bind(null,i)).catch(t)}t.loadPropertyPages=function(){return null!==s?s:(n.logNormal("Start loading property pages"),s=r((function(){return new Promise(a)}),2))}},hezA:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyPriceAxisView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i){var n=e.call(this)||this;return n._model=t.model(),n._source=t,n._data=i,n}return Object(n.__extends)(t,e),t.prototype._updateRendererData=function(e,t,i){e.visible=!1,t.visible=!1;var n=this._source.model(),r=this._source.priceScale();if(null!==r&&n.isPriceScaleVisible(r)){var o=this._source.lastValueData(this._data.plotIndex,!1);o.noData||(i.background=o.color,i.color=this.generateTextColor(o.color),i.coordinate=o.coordinate,
i.floatCoordinate=o.floatCoordinate,this._showAxisLabel()&&(e.text=o.text,e.visible=!0),this._updatePaneRendererData(t))}},t.prototype._showPaneLabel=function(){return this._model.properties().scalesProperties.showStudyPlotLabels.value()},t.prototype._showAxisLabel=function(){return this._model.properties().scalesProperties.showStudyLastValue.value()},t.prototype._updatePaneRendererData=function(e){e.text="",this._showPaneLabel()&&(e.text=this._source.priceLabelText(this._data.plotIndex),e.visible=!0)},t}(i("KcY8").a)},hfHJ:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i("aO4+");t.identityMatrix=function(){return[[1,0,0],[0,1,0],[0,0,1]]},t.multiplyMatrices=function(e,t){for(var i=[[0,0,0],[0,0,0],[0,0,0]],n=0;n<3;n++)for(var r=0;r<3;r++)for(var o=0;o<3;o++)i[n][r]+=e[n][o]*t[o][r];return i},t.rotationMatrix=function(e){var t=Math.cos(e),i=Math.sin(e);return[[t,-i,0],[i,t,0],[0,0,1]]},t.scalingMatrix=function(e,t){return[[e,0,0],[0,t,0],[0,0,1]]},t.translationMatrix=function(e,t){return[[1,0,e],[0,1,t],[0,0,1]]},t.transformPoint=function(e,t){for(var i=[t.x,t.y,1],r=[0,0,0],o=0;o<3;o++)for(var s=0;s<3;s++)r[o]+=i[s]*e[o][s];return new n.Point(r[0],r[1])}},hkLy:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();t.InputField=function(){function e(t){var i=t.label,n=t.name,r=t.maxLength,o=t.error,s=void 0===o?"":o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._name=n,this._field=document.createElement("label"),this._field.classList.add("tv-rename-chart-dialog__field");var a=document.createElement("span");a.classList.add("tv-rename-chart-dialog__label"),a.innerHTML=i,this._inputElement=document.createElement("input"),this._inputElement.classList.add("tv-control-input"),this._inputElement.setAttribute("type","text"),this._inputElement.setAttribute("name",n),this._inputElement.setAttribute("maxlength",r),this._field.appendChild(a),this._field.appendChild(this._inputElement),this._error=s}return n(e,[{key:"appendTo",value:function(e){e.appendChild(this._field)}},{key:"focus",value:function(){this._inputElement.focus()}},{key:"select",value:function(){this.focus(),this._inputElement.select()}},{key:"value",set:function(e){this._inputElement.value=e},get:function(){return this._inputElement.value}},{key:"name",get:function(){return this._name}},{key:"valid",get:function(){return!!this._inputElement.value.trim()}},{key:"error",set:function(e){this._error=e},get:function(){return this._error}}]),e}()},hsV8:function(e,t,i){"use strict";i.r(t),i.d(t,"ensureTimePointIndexIndex",(function(){return o})),i.d(t,"unpackNonSeriesData",(function(){return s}));var n=i("JmuD"),r=i("qySK");function o(e){
if(e<0)throw new Error("TimePointIndexIndex should be non-negative integer");return e}function s(e){if(""===e)return Promise.resolve(null);var t=JSON.parse(e);if(!Object(n.isObject)(t)||"function"==typeof t)return Promise.reject(new Error("Non-object content in the non-series envelope"));if(Object(n.hasProperty)(t,"indexes_replace"))return Promise.resolve({indexes_replace:!0});var i={indexes_replace:!1};if(Object(n.hasProperty)(t,"offsets")&&(i.offsets=t.offsets),Object(n.hasProperty)(t,"isUpdate")){if("boolean"!=typeof t.isUpdate)return Promise.reject(new Error('Invalid type of "isUpdate" field'));i.isUpdate=t.isUpdate}return Object(n.hasProperty)(t,"data")&&(i.data=t.data),Object(n.hasProperty)(t,"graphicsCmds")&&(i.graphicsCmds=Object(r.b)(t.graphicsCmds)),Promise.resolve(i)}},htUT:function(e,t,i){"use strict";i.r(t),i.d(t,"ChartChangesWatcher",(function(){return o}));var n=i("aIyQ"),r=i.n(n),o=function(){function e(e,t,i){this._hasChanges=!1,this._undoHistory=e,this._chartSaver=t,this._globalEvents=i,this._onValueChanged=new r.a,this._subscribe()}return e.prototype.destroy=function(){this._unsubscribe(),this._onValueChanged.destroy()},e.prototype.hasChanges=function(){return this._hasChanges},e.prototype.getOnChange=function(){return this._onValueChanged},e.prototype._subscribe=function(){this._globalEvents.subscribe("chart_loaded",this._handleChartLoaded,this),this._undoHistory.undoStack().onChange().subscribe(this,this._handleChangeUndoStack),this._chartSaver.chartSaved().subscribe(this,this._handleChartSaved)},e.prototype._unsubscribe=function(){this._globalEvents.unsubscribe("chart_loaded",this._handleChartLoaded,this),this._undoHistory.undoStack().onChange().unsubscribe(this,this._handleChangeUndoStack),this._chartSaver.chartSaved().unsubscribe(this,this._handleChartSaved)},e.prototype._setChanges=function(e){this._hasChanges!==e&&(this._hasChanges=e,this._onValueChanged.fire(e))},e.prototype._handleChartLoaded=function(){this._setChanges(!1)},e.prototype._handleChangeUndoStack=function(e){e&&!e.customFlag("doesnt_affect_save")&&this._setChanges(!0)},e.prototype._handleChartSaved=function(e){e&&this._setChanges(!1)},e}()},"hyq/":function(e,t,i){"use strict";i.r(t),i.d(t,"pivotPointsStandardStudyItem",(function(){return u}));var n=i("ocLq"),r=i("LxhU"),o=function(){return function(){this.p=NaN,this.r1=NaN,this.s1=NaN,this.r2=NaN,this.s2=NaN,this.r3=NaN,this.s3=NaN,this.r4=NaN,this.s4=NaN,this.r5=NaN,this.s5=NaN,this.startIndex__t=NaN,this.endIndex__t=NaN}}(),s=function(){this.pivots=[]};function a(e,t){e.setUTCMonth(e.getUTCMonth()+t)}function l(e,t){if(n.Std.ismonthly(e)){var i=new Date(t);return i.getUTCDay()<function(e,t){return new Date(t,e,0).getDate()}(i.getUTCMonth(),i.getUTCFullYear())?(a(i,n.Std.interval(e)),i=n.Std.add_days_considering_dst("Etc/UTC",i,1-i.getUTCDay())):a(i=n.Std.add_days_considering_dst("Etc/UTC",i,1),n.Std.interval(e)),i.valueOf()}return t+r.Interval.parse(e.symbol.resolution).inMilliseconds(t)}function c(e,t){switch(t){case"Auto":return function(e){
if(n.Std.isweekly(e)||n.Std.ismonthly(e))return"12M";if(n.Std.isdaily(e))return"1M";if(n.Std.isintraday(e)){var t=n.Std.interval(e);return t>=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;e<this.m_dataSources.length;e++){var t=this.m_dataSources[e];t.destroy&&t.destroy()}this._destroyed.fire()},g.prototype._defaultBottomMargin=function(){return.01*this._properties.bottomMargin.value()},g.prototype._defaultTopMargin=function(){return.01*this._properties.topMargin.value()},g.prototype._updateMargins=function(){var e=this._defaultTopMargin(),t=this._defaultBottomMargin();this._leftPriceScales.forEach((function(i){i.setTopMargin(e),i.setBottomMargin(t)})),this._rightPriceScales.forEach((function(i){i.setTopMargin(e),i.setBottomMargin(t)}));for(var i=0;i<this.m_dataSources.length;i++){var n=this.m_dataSources[i];n instanceof TradingView.Study&&this.isOverlay(n)&&"Volume"!==n.metaInfo().shortId&&(!n.priceScale()||this._leftPriceScales.includes(n.priceScale())||this._rightPriceScales.includes(n.priceScale())||(n.priceScale().setTopMargin(e),n.priceScale().setBottomMargin(t),this.recalculatePriceScale(n.priceScale())))}this._leftPriceScales.forEach((function(e){this.recalculatePriceScale(e)}),this),this._rightPriceScales.forEach((function(e){this.recalculatePriceScale(e)}),this),this.updateAllViews()},g.prototype.model=function(){return this._model},g.prototype.width=function(){return this.m_width},g.prototype.height=function(){return this.m_height},g.prototype.setWidth=function(e){this.m_width=e,this.updateAllViews()},g.prototype.setHeight=function(e){this.m_height=e,this._leftPriceScales.forEach((function(t){t.setHeight(e)})),this._rightPriceScales.forEach((function(t){t.setHeight(e)}));for(var t=0;t<this.m_dataSources.length;t++){var i=this.m_dataSources[t];this.isOverlay(i)&&i.priceScale()&&i.priceScale().setHeight(e)}this.updateAllViews()},g.prototype.leftPriceScales=function(){return this._leftPriceScales},g.prototype.rightPriceScales=function(){return this._rightPriceScales},g.prototype.visibleLeftPriceScales=function(){var e=this._model.priceScaleSlotsCount();if(this._leftPriceScales.length>e.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;t<this.m_dataSources.length;t++){if((n=this.m_dataSources[t])instanceof l&&!this.isOverlay(n)&&(!n.properties().linkedToSeries||!n.properties().linkedToSeries.value())){this.m_mainDataSource=n,e=!0;break}}if(this.m_mainDataSource&&e){var i=[];for(t=0;t<this.m_dataSources.length;t++){(n=this.m_dataSources[t])instanceof s&&i.push(n)}i=y(i);for(t=0;t<i.length;t++)this.move(i[t],this.m_mainDataSource.priceScale(),!0)}else if(!this.m_mainDataSource||this.isOverlay(this.m_mainDataSource)&&0===this.nonOverlayPricesSourcesCount())for(t=0;t<this.m_dataSources.length;t++){var n;if((n=this.m_dataSources[t])instanceof l&&this.isOverlay(n)&&n.showInObjectTree()){this.m_mainDataSource=n;var r=this._priceScaleSelectionStrategy.createNewPriceScaleIfPossible(this);this.move(n,r,!0),this.recalculatePriceScale(n.priceScale());break}}},g.prototype._newZOrderForLineTool=function(){for(var e=null,t=0;t<this.m_dataSources.length;++t){var i=this.m_dataSources[t];if(u(i)&&!h(i)){var n=i.zorder();(null===e||n>e)&&(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;e<this.m_dataSources.length;e++)this.m_dataSources[e].updateAllViews();this._model.customSources().forEach(this._updateCustomSourceAllViews,this)},
g.prototype.defaultPriceScale=function(){var e=this.m_mainDataSource?this.m_mainDataSource.priceScale():null;return null===e&&(e=new d(this._model.properties().scalesProperties)),e},g.prototype._priceScaleIsPrice=function(e){var t=e.mainSource();return!!t&&(!!TradingView.isInherited(t.constructor,TradingView.Series)||!!TradingView.isInherited(t.constructor,TradingView.Study)&&t.metaInfo().is_price_study)},g.prototype.findSuitableScale=function(e,t,i){return this._priceScaleSelectionStrategy.findSuitableScale(this,e,t,i)},g.prototype.createNewPriceScaleIfPossible=function(){return this._priceScaleSelectionStrategy.createNewPriceScaleIfPossible(this)},g.prototype.canCreateNewPriceScale=function(){return this._priceScaleSelectionStrategy.canCreateNewPriceScale(this)},g.prototype.mainDataSource=function(){return this.m_mainDataSource},g.prototype.recalculatePriceScale=function(e){if(e){var t=e.sourcesForAutoscale();if(e.isAutoScale()&&t&&t.length>0&&!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;e<this.m_dataSources.length;e++){var t=this.m_dataSources[e];this.isOverlay(t)&&!u(t)&&this.recalculatePriceScale(t.priceScale())}this.updateAllViews(),this._model.updatePane(this)},g.prototype.isEmpty=function(){return null===this.m_mainDataSource},g.prototype.move=function(e,t,i){this.removeDataSource(e,!0),this.addDataSource(e,t,i),this._processMainSourceChange(),this._invalidateSourcesCache(),this._onPriceScalesChanged.fire()},g.prototype.hitTestSources=function(){if(this._cachedHitTestSources)return this._cachedHitTestSources;for(var e=this.orderedSources(),t=[],i=[],n=0;n<e.length;n++){var r=e[n];TradingView.isInherited(r.constructor,s)?t.push(r):i.push(r)}return this._cachedHitTestSources=i.concat(t),this._cachedHitTestSources},g.prototype.allOrderedSources=function(){return this._cachedAllOrderedSources||(this._cachedAllOrderedSources=y(this.m_dataSources)),this._cachedAllOrderedSources},g.prototype.orderedSources=function(e){var t=function(){return void 0===e?this._cachedOrderedSoruces.all:(this._cachedOrderedSoruces[e]||(this._cachedOrderedSoruces[e]=this._cachedOrderedSoruces.all.filter((function(t){return this.priceScalePosition(t.priceScale())===e}),this)),this._cachedOrderedSoruces[e])}.bind(this);if(this._cachedOrderedSoruces)return t();for(var i=[],n=0,r=this.m_dataSources.length;n<r;n++){var o=this.m_dataSources[n];(!TradingView.isInherited(o.constructor,s)||o.isActualSymbol()&&o.isActualCurrency())&&i.push(o)}return i=y(i),this._cachedOrderedSoruces={all:i},t()},g.prototype.customSources=function(e){return this._model.customSources(e)},g.prototype.createDrawingsCaches=function(){
o.recreateOrderedByBarsSourcesCache(this)},g.prototype.clearDrawingCaches=function(){o.clearOrderedByBarsSourcesCache()},g.prototype._invalidateSourcesCache=function(){this._cachedOrderedSoruces=null,this._cachedHitTestSources=null,this._cachedAllOrderedSources=null,this._leftPriceScales.forEach((function(e){e.invalidateSourcesCache()})),this._rightPriceScales.forEach((function(e){e.invalidateSourcesCache()}))},g.prototype.getZOrderMinMax=function(){var e=this.orderedSources();if(0===e.length)return{minZOrder:0,maxZOrder:0};for(var t=e[0].zorder(),i=e[0].zorder(),n=1;n<e.length;n++){var r=e[n];r.zorder()<t&&(t=r.zorder()),r.zorder()>i&&(i=r.zorder())}return{minZOrder:t,maxZOrder:i}},g.prototype.isZOrderAvailable=function(e){for(var t=0;t<this.m_dataSources.length;t++){if(this.m_dataSources[t].zorder()===e)return!1}return!0},g.prototype.changeZOrder=function(e,t){for(var i=this.orderedSources().filter((function(e){return e.showInObjectTree()})),n=0,r=0,o=i.length;r<o;r++)if(i[r]===e){n=r;break}if(n>0&&t<0){var s=i[n-1].zorder(),a=e.zorder();i[n-1].setZorder(a),e.setZorder(s)}else if(n<i.length-1&&t>0){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;e<this.m_dataSources.length;e++){var t=this.m_dataSources[e];u(t)&&t.calcIsActualSymbol()}this._invalidateSourcesCache()},t.Pane=g}).call(this,i("aIyQ"))},icPo:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Icon");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("8GeE").IconPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe);var o=this;document.fonts&&document.fonts.check&&document.fonts.load&&!document.fonts.check("12px FontAwesome")&&document.fonts.load("12px FontAwesome","☺").then((function(){o._isDestroyed||e.updateSource(o)}))}inherit(s,n),s.version=1,s.anchorLimit=80,s.prototype.getAnchorLimit=function(){return s.anchorLimit},s.prototype.pointsCount=function(){return 1},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Icon"},s.prototype.hasEditableCoordinates=function(){return!1},s.prototype.applyTemplate=function(e){delete e.icon,n.prototype.applyTemplate.call(this,e)},s.prototype.startChanging=function(e,t){n.prototype.startChanging.call(this,e,t);var i=this.properties(),r=65536*i.icon.value()+i.size.value();this._startChangeWidth=this._paneViews[0]._cache[r],i.size.value()<s.anchorLimit?this._sizeScale=i.size.value()/s.anchorLimit:this._sizeScale=1,this._origScale=i.scale.value(),this._startChangeWidth*this._origScale<s.anchorLimit?this._resizeRatio=this._startChangeWidth/s.anchorLimit:this._resizeRatio=1},s.prototype.endChanging=function(e,t){n.prototype.endChanging.call(this),delete this._startChangeWidth,delete this._sizeScale,delete this._resizeRatio},s.prototype.setPoint=function(e,t,i){var n=Object.assign({},t)
;i&&i.shift()&&this._properties.snapTo45Degrees&&this._snapPoint45Degree(n,this.points()[0]);var r=this.pointToScreenPoint(this.points()[0])[1],o=this.pointToScreenPoint(n)[1];if(0===e||1===e){var a=o.subtract(r).normalized(),l=2*o.subtract(r).length();l*=this._sizeScale,this._properties.size.setValue(l);var c=-a.x,u=Math.acos(c);Math.asin(a.y)>0&&(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*h<s.anchorLimit){var p=s.anchorLimit/2;this._properties.scale.setValue(this._origScale*d/p)}else{p=h/2;this._properties.scale.setValue(d/p)}}},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("XCOO").IconsDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.prototype.getSourceIcon=function(){return{type:"text",text:String.fromCharCode(this.properties().icon.value())}},s.createProperties=function(e){var t=new r("linetoolicon",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e),e.addExclusion("angle"),e.addExclusion("scale")},t.LineToolIcon=s},ijBy:function(e,t,i){"use strict";i.r(t),i.d(t,"SetChartLayoutCommand",(function(){return s}));var n=i("mrSG"),r=i("RDU5"),o=i("VNzU"),s=function(e){function t(t,i){var n=this,r="Change Chart Layout to "+o.layouts[i].title;return(n=e.call(this,r)||this)._chartWidgetCollection=t,n._newLayoutType=i,n._oldLayoutType=t.layout.value(),n}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._chartWidgetCollection.layout.setValue(this._newLayoutType)},t.prototype.undo=function(){this._chartWidgetCollection.layout.setValue(this._oldLayoutType)},t}(r.UndoCommand)},ikwP:function(e,t,i){"use strict";i.r(t),i.d(t,"Size",(function(){return s})),i.d(t,"getCanvasDevicePixelRatio",(function(){return a})),i.d(t,"getContext2D",(function(){return l})),i.d(t,"getPrescaledContext2D",(function(){return c})),i.d(t,"getPretransformedContext2D",(function(){return u})),i.d(t,"hardResizeCanvas",(function(){return h})),i.d(t,"resizeCanvasPreservingContent",(function(){return d})),i.d(t,"fillRect",(function(){return p})),i.d(t,"clearRect",(function(){return _})),i.d(t,"drawScaled",(function(){return f})),i.d(t,"createDisconnectedCanvas",(function(){return m})),i.d(t,"createDisconnectedBoundCanvas",(function(){return v})),i.d(t,"createBoundCanvas",(function(){return g})),i.d(t,"calcTextHorizontalShift",(function(){return b}));var n=i("f2KN"),r=i("Eyy1"),o=i("Ialn"),s=function(){function e(e,t){this.w=e,this.h=t}return e.prototype.equals=function(e){return this.w===e.w&&this.h===e.h},e}();function a(e){var t,i;return Math.max(1,(null===(i=null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView)||void 0===i?void 0:i.devicePixelRatio)||1)}function l(e){var t=Object(r.ensureNotNull)(e.getContext("2d"));return t.setTransform(1,0,0,1,0,0),t}function c(e){var t=Object(r.ensureNotNull)(e.getContext("2d")),i=a(e);return t.setTransform(i,0,0,i,0,0),t}
function u(e){var t=Object(r.ensureNotNull)(e.canvas.getContext("2d"));return t.setTransform(e.pixelRatio,0,0,e.pixelRatio,0,0),t.translate(.5,.5),t}function h(e,t){e.resizeCanvas({width:0,height:0}),e.resizeCanvas({width:t.w,height:t.h})}function d(e,t){var i=v(document,t),n=c(i.canvas);return n.save(),n.setTransform(1,0,0,1,0,0),n.drawImage(e.canvas,0,0,e.canvasSize.width*e.pixelRatio,e.canvasSize.height*e.pixelRatio),n.restore(),i}function p(e,t,i,n,r,o){e.save(),e.translate(-.5,-.5),e.fillStyle=o,e.fillRect(t,i,n,r),e.restore()}function _(e,t,i,n,r,o){e.save(),e.translate(-.5,-.5),e.globalCompositeOperation="copy",e.fillStyle=o,e.fillRect(t,i,n,r),e.restore()}function f(e,t,i){e.save(),e.scale(t,t),i(),e.restore()}function m(e,t,i){var n=y(e);return void 0===i&&(i=a(n)),n.width=t.w*i,n.height=t.h*i,n}function v(e,t){var i=y(e),r=Object(n.a)(i,{allowDownsampling:!1});return r.resizeCanvas({width:t.w,height:t.h}),r}function y(e){var t=e.createElement("canvas");return function(e){e.style.userSelect="none",e.style.webkitUserSelect="none",e.style.msUserSelect="none",e.style.MozUserSelect="none",e.style.webkitTapHighlightColor="transparent"}(t),t}function g(e,t){var i=y(Object(r.ensureNotNull)(e.ownerDocument));e.appendChild(i);var o=Object(n.a)(i,{allowDownsampling:!1});return o.resizeCanvas({width:t.w,height:t.h}),o}function b(e,t){return"center"===e.textAlign?0:Object(o.isRtl)()?"start"===e.textAlign||"right"===e.textAlign?t:0:"start"===e.textAlign||"left"===e.textAlign?0:t}},isVH:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Triangle");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("D4q4").TrianglePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(s,n),s.prototype.pointsCount=function(){return 3},s.prototype.translatedType=function(){return o},s.prototype.name=function(){return"Triangle"},s.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)},s.createProperties=function(e){var t=new r("linetooltriangle",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolTriangle=s},it7y:function(e,t,i){"use strict";i.r(t),i.d(t,"StudyDataWindowView",(function(){return a}));var n=i("mrSG"),r=i("ivNn"),o=i("4miz"),s=i("EYFt"),a=function(e){function t(t,i){var n=e.call(this)||this;return n._invalidated=!0,n._study=t,n._model=i,n._valueProvider=n._createValuesProvider(t,i),n._items=n._valueProvider.getItems().map((function(e){return new o.a(e.title,"")})),n.update(),n}return Object(n.__extends)(t,e),t.prototype.update=function(){this._invalidated=!0},t.prototype.items=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items},t.prototype._updateImpl=function(){this._header=this._study.title(!0),
this._title=this._study.title();var e=this._currentIndex();if(null!==e&&Object(r.isNumber)(e))for(var t=this._valueProvider.getValues(e),i=0;i<t.length;++i){var n=t[i],o=this._items[i];o.setValue(n.value),o.setVisible(n.visible),o.setColor(n.color)}},t.prototype._currentIndex=function(){var e=this._model.crossHairSource().lockedIndex;return void 0!==e?e:null!==this._model.crossHairSource().pane?this._model.crossHairSource().appliedIndex():this._study.data().lastIndex()},t.prototype._createValuesProvider=function(e,t){return new s.a(e,t)},t}(o.b)},ivNn:function(e,t,i){"use strict";function n(e){return Math.round(1e10*e)/1e10}Object.defineProperty(t,"__esModule",{value:!0}),t.isNumber=function(e){return"number"==typeof e&&isFinite(e)},t.isInteger=function(e){return"number"==typeof e&&e%1==0},t.isNaN=function(e){return!(e<=0||e>0)},t.fixComputationError=n,t.alignTo=function(e,t){var i=e/t,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;n<e.length;++n)if(e[n].description.toLowerCase()===i||e[n].shortDescription.toLowerCase()===i)return e[n];throw new Error("Can't find metainfo for `"+t+"`")}throw new Error("There is no studies metainfo at all")}function n(e){return e.inputs.map((function(e){return{id:e.id,type:e.type,name:e.name}}))}var r={bool:function(e){return!!e},integer:function(e){return parseInt(e)},float:function(e){return parseFloat(e)},string:function(e){return e}};return e.getStudyRecordFromArray=function(e,o){return function(e,o){var s;if(!Array.isArray(e))return{id:(s=i(o.model().studiesMetaData(),e)).id,overlay:t(s)};for(var a,l=e.slice(0),c=l[0],u=t(s=i(o.model().studiesMetaData(),c)),h=n(s),d=l.splice(1),p=0;p<d.length;++p){a||(a={});var _=r[h[p].type]||r.string;a[h[p].id]=_(d[p])}return{id:s.id,name:c,overlay:u,inputs:a}}(e,o=o||chartWidget)},e.getStudyRecordFromObject=function(e,t,r){return function(e,t,r){var o,s=n(o=i(r.model().studiesMetaData(),e)),a={};function l(e){return e.name.toLowerCase()===u}for(var c in t){var u=c.toLowerCase(),h=s.filter(l);0!==h.length?a[(h=h[0]).id]=t[c]:console.warn("Uknown input `"+c+"` of `"+e+"`")}return{id:o.id,name:e,inputs:a}}(e,t,r=r||chartWidget)},e}();e.exports=n},jCNj:function(e,t,i){"use strict";var n=i("3UA0").tzData;function r(e){this._name=e;var t=n[e];if(t||(t={time:[],offset:[]},this._invalid=!0),t.time.length!==t.offset.length&&(t={time:[],offset:[]},this._invalid=!0),!t.time_utc){for(var i=t.time,r=t.offset,o=i.length,s=new Array(o),a=0;a<o;a++)i[a]*=1e3,r[a]*=1e3,s[a]=i[a]-r[a];t.time_utc=s}this.tz=t}function o(e,t){var i=e.length;if(0===i)return-1;if(isNaN(t))throw Error("Key is NaN");for(var n=0,r=i-1,o=s((n+r)/2);;){if(e[o]>t){if((r=o-1)<n)return o}else if(r<(n=o+1))return o<i-1?o+1:-1;o=s((n+r)/2)}}r.prototype.offset_utc=function(e){return r._offset(this.tz.time_utc,this.tz.offset,e)},r.prototype.offset_loc=function(e){return r._offset(this.tz.time,this.tz.offset,e)},
r.prototype.correction_loc=function(e){var t=this.tz.time,i=this.tz.offset,n=o(t,e);if(n<1)return 0;var r=i[n]-i[n-1];if(r>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;n<t.length;n++){var r=t[n];e.lineTo(r.x,r.y)}e.closePath(),e.stroke(),i&&e.fill()},s.drawRoundRect=function(e,t,i,n,r,o){e.beginPath(),e.moveTo(t+o,i),e.lineTo(t+n-o,i),e.arcTo(t+n,i,t+n,i+o,o),e.lineTo(t+n,i+r-o),e.arcTo(t+n,i+r,t+n-o,i+r,o),e.lineTo(t+o,i+r),e.arcTo(t,i+r,t,i+r-o,o),e.lineTo(t,i+o),e.arcTo(t,i,t+o,i,o)},s.drawDashedLine=function(e,t,i,n,r){e.save();var o=s.computeDashPattern(e);if(e.beginPath(),"function"==typeof e.setLineDash)e.setLineDash(o);else if(void 0!==e.mozDash)e.mozDash=o;else{if(void 0===e.webkitLineDash)return s.dashedLineTo(e,t,i,n,r,o),e.stroke(),void e.restore();e.webkitLineDash=o}e.moveTo(t,i),e.lineTo(n,r),e.stroke(),e.restore()},s.drawDashedLineHorizontal=function(e,t,i,n){e.save();var r=s.computeDashPattern(e),o=0,a=e.lineWidth,l=a/2;e.translate(-l,-l);for(var c=!0,u=t+n;t<u;){var h=r[o];c&&e.fillRect(t,i,h,a),c=!c,t+=h,o=o===r.length-1?0:o+1}e.restore()},s.drawDashedLineVertical=function(e,t,i,n){e.save();var r=s.computeDashPattern(e),o=0,a=e.lineWidth,l=a/2;e.translate(-l,-l);for(var c=!0,u=i+n;i<u;){var h=r[o];c&&e.fillRect(t,i,a,h),c=!c,i+=h,o=o===r.length-1?0:o+1}e.restore()},s.dashedLineTo=function(e,t,i,n,s,a){var l={thereYet:r,cap:Math.min},c={thereYet:r,cap:Math.min};i-s>0&&(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;r<o.length;r++){n(o[r])}return i}},jkoZ:function(e,t,i){"use strict";var n=i("XlJ7").makeFont,r=i("XlJ7").parseFont,o=(0,i("txPx").getLogger)("Model.ChartTradingUtils"),s={_fontHeightCache:{},_parsedColorCache:{},_parseColor:function(e){if(this._parsedColorCache[e])return this._parsedColorCache[e];var t=document.createElement("div");t.style.color=e;var i=t.style.color.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i)||t.style.color.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d*\.?\d+)\s*\)$/i),n={r:i[1],g:i[2],b:i[3],a:i[4]||"1"};return this._parsedColorCache[e]=n,n},getColorFromProperties:function(e,t){var i=1-t.value()/100,n=this._parseColor(e.value());return"rgba("+n.r+","+n.g+","+n.b+","+i+")"},setColorToProperties:function(e,t,i){var n=this._parseColor(e);t.setValue("rgb("+n.r+","+n.g+","+n.b+")");var r=100*(1-n.a);i.setValue(Math.max(0,Math.min(r,100)))},getFontFromProperties:function(e,t,i,r){return n(t.value(),e.value(),r.value()?"italic":"",i.value()?"bold":"")},setFontToProperties:function(e,t,i,n,s){var a=r(e);null!==a?(a.family.length>0&&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<this._end;++n){i=e(this._indexAt(n),this._valueAt(n),i)}return i},e.prototype.findFirst=function(e,t){for(var i=void 0!==t&&Math.min(this._start+t,this._end)||this._end,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.findLast=function(e,t){for(var i=void 0!==t&&Math.max(this._end-t,this._start)||this._start,n=this._end-1;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;t<this._end;++t){if(e(this._indexAt(t),this._valueAt(t)))break}},e.prototype.reduce=function(e,t){for(var i=t,n=this._start;n<this._end;++n){i=e(i,this._indexAt(n),this._valueAt(n))}return i},e.prototype.range=function(t,i){var n=new e(this._plotFunctions,this._emptyValuePredicate);return n._items=this._items,n._start=this._lowerbound(t),n._end=this._upperbound(i),n._shareRead=!0,n},e.prototype.minMaxOnRangeCached=function(e,t,i){if(this.isEmpty())return null;for(var n=null,r=0,o=i;r<o.length;r++){var s=o[r];n=u(n,this._minMaxOnRangeCachedImpl(e-s.offset,t-s.offset,s.name))}return n},e.prototype.minMaxOnRange=function(e,t,i){if(this.isEmpty())return null;for(var n=null,r=0,o=i;r<o.length;r++){var s=o[r];n=u(n,this._minMaxOnRange(e-s.offset,t-s.offset,s.name))}return n},e.prototype.merge=function(e){return this._shareRead?(l.logDebug("merge: readonly collection modification attempt"),null):0===e.length?null:this.isEmpty()||e[e.length-1].index<this._items[0].index?this._prepend(e):e[0].index>this._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;n<e.length;++n){var r=e[n],o=this.lastIndex();if(null===o){l.logError("Can't add tail to the empty plotlist");break}this.add(o+1,r.value)}this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear()},e.prototype.move=function(e){if(this._shareRead)l.logDebug("move: readonly collection modification attempt");else if(0!==e.length){for(var t=this._items.slice(),i=0,n=e;i<n.length;i++){var r=n[i],o=this._bsearch(r.old);if(null!==o&&void 0!==t[o])if(r.new===s.a)t[o]=void 0;else{t[o]={index:r.new,value:t[o].value};var a=this._bsearch(r.new);if(null!==a){var c=t[a];void 0!==c&&c.index===r.new&&(t[a]=void 0)}}}this._items=t.filter((function(e){return void 0!==e})).sort((function(e,t){return e.index-t.index})),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),this._minMaxCache.clear(),this._start=0,this._end=this._items.length}},e.prototype.remove=function(e){if(this._shareRead)return l.logDebug("remove: readonly collection modification attempt"),null;var t=this._search(e,n.NearestRight)
;if(null===t)return null;var i=this._items.splice(t);return this._end=this._items.length,this._minMaxCache.clear(),this._rowSearchCache.clear(),this._rowSearchCacheWithoutEmptyValues.clear(),i.length>0?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._end&&i(this._valueAt(e),n);)e+=1;return e===this._end?null:e},e.prototype._nonEmptyNearestLeft=function(e,t){for(var i=Object(r.ensureNotNull)(this._emptyValuePredicate),n=Object(r.ensure)(t);e>=this._start&&i(this._valueAt(e),n);)e-=1;return e<this._start?null:e},e.prototype._searchNearestLeft=function(e,t){var i=this._lowerbound(e);i>this._start&&(i-=1);var n=i!==this._end&&this._indexAt(i)<e?i:null;return void 0!==t&&null!==n?this._nonEmptyNearestLeft(n,t):n},e.prototype._searchNearestRight=function(e,t){var i=this._upperbound(e),n=i!==this._end&&e<this._indexAt(i)?i:null;return void 0!==t&&null!==n?this._nonEmptyNearestRight(n,t):n},e.prototype._bsearch=function(e){var t=this._lowerbound(e);return t===this._end||e<this._items[t].index?null:t},e.prototype._lowerbound=function(e){return Object(o.lowerbound)(this._items,e,(function(e,t){return e.index<t}),this._start,this._end)},e.prototype._upperbound=function(e){return Object(o.upperbound)(this._items,e,(function(e,t){return t.index>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;o<t;o++){var s=r(this._items[o].value);null==s||Number.isNaN(s)||(null===n?n={min:s,max:s}:(s<n.min&&(n.min=s),s>n.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);p<h;p+=30){var _=Math.floor(p/30),f=d.get(_);if(void 0===f){var m=30*_,v=30*(_+1)-1;f=this._minMaxOnRange(m,v,i),d.set(_,f)}n=u(n,f)}return n=u(n,this._minMaxOnRange(h,l,i))},e.prototype._minMaxOnRange=function(e,t,i){return this._plotMinMax(this._lowerbound(e),this._upperbound(t),i)},e}();function u(e,t){return null===e?t:null===t?e:{min:Math.min(e.min,t.min),max:Math.max(e.max,t.max)}}function h(e,t){for(var i=function(e,t){var i=e.length,n=t.length,r=i+n,o=0,s=0;for(;o<i&&s<n;)e[o].index<t[s].index?o++:e[o].index>t[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;r<s&&o<a;)e[r].index<t[o].index?(n[l]=e[r],r++):e[r].index>t[o].index?(n[l]=t[o],o++):(n[l]=t[o],r++,o++),l++;for(;r<s;)n[l]=e[r],r++,l++;for(;o<a;)n[l]=t[o],o++,l++;return n}},kIXa:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=window.t("Time Cycles");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("am+t").TimeCyclesPaneView;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"Time Cycles"},s.prototype.setPoint=function(e,t,i){var n=Object.assign({},t),r=this._points[0],o=this._points[1];r.price=n.price,o.price=n.price,this._points[e]=n,this.normalizePoints()},
s.prototype.addPoint=function(e,t,i){var r=n.prototype.addPoint.call(this,e,t,!0);if(r){var o=this._points[0];this._points[1].price=o.price,i||(this.normalizePoints(),this.createServerPoints())}return r},s.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("BABJ").TimeCyclesPatternDefinitionsViewModel}.bind(null,i)).catch(i.oe)},s.createProperties=function(e){var t=new r("linetooltimecycles",e);return s._configureProperties(t),t},s._configureProperties=function(e){n._configureProperties(e)},t.LineToolTimeCycles=s},kcTO:function(e,t,i){"use strict";i.r(t),i.d(t,"customFormatters",(function(){return l})),i.d(t,"formatterOptions",(function(){return c})),i.d(t,"numberToStringWithLeadingZero",(function(){return u})),i.d(t,"isFormatterHasForexAdditionalPrecision",(function(){return h})),i.d(t,"PriceFormatter",(function(){return d}));var n=i("YFKU"),r=i("ogJP"),o=i("Ialn"),s=i("txPx"),a=Object(s.getLogger)("Chart.PriceFormatter"),l={dateFormatter:null,timeFormatter:null},c={decimalSign:".",decimalSignFractional:"'"};function u(e,t){if(!Object(r.isNumber)(e))return"n/a";if(!Object(r.isInteger)(t))throw new TypeError("invalid length");if(t<0||t>16)throw new TypeError("invalid length");if(0===t)return e.toString();return("0000000000000000"+e.toString()).slice(-t)}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<t&&"0"===e[e.length-1];i++)e=e.substr(0,e.length-1);return e},e.prototype._parseAsDecimal=function(e){var t,i=new RegExp(/^(-?)[0-9]+$/).exec(e);return i?{value:t=parseFloat(e),res:!0,suggest:this.format(t)}:(i=new RegExp("^(-?)[0-9]+\\"+c.decimalSign+"[0-9]*$").exec(e))?{value:t=parseFloat(e.replace(c.decimalSign,".")),res:!0,suggest:this.format(t)}:{error:this._formatterErrors.custom,res:!1}},e.prototype._patchFractPart=function(e,t){var i={0:0,5:1},n={0:0,2:1,5:2,7:3};return 2===t?void 0===i[e]?-1:i[e]:4===t?void 0===n[e]?-1:n[e]:e},e.prototype._parseAsSingleFractional=function(e){var t=new RegExp(/^(-?)[0-9]+$/).exec(e);if(t)return{value:s=parseFloat(e),res:!0,suggest:this.format(s)};if(t=new RegExp("^(-?)([0-9]+)\\"+c.decimalSignFractional+"([0-9]+)$").exec(e)){var i=!!t[1],n=parseInt(t[2]),r=this._priceScale,o=this._patchFractPart(parseInt(t[3]),r);if(o>=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._major<e._major?-1:this._major>e._major?1:this._minor<e._minor?-1:this._minor>e._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),e<t)throw new Error("high < low");var n=this._priceScale.height(),o=(e-t)*this._tickMarkHeight()/n,s=new r(this._base,[2,2.5,2]),a=new r(this._base,[2,2,2.5]),l=new r(this._base,[2.5,2,2]),c=0,u=s.tickSpan(e,t,o);u>i&&(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)<this._tickMarkHeight()||(this._marks.push({coord:f,label:d.format(_)}),h=f,e.isLog()&&(l=this.tickSpan(_*u,a)))}}}}},e.prototype.marks=function(){return this._marks},e.prototype._fontHeight=function(){return this._priceScale.fontSize()},e.prototype._tickMarkHeight=function(){return Math.ceil(2.5*this._fontHeight())},e}()},lUQk:function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("7ktv"),o=i("tc+8"),s=i.n(o),a=i("n5al"),l=i("kcTO"),c=i("wOSo"),u=i("Eyy1"),h=i("LxhU"),d=i("KcY8"),p=i("Kxc7"),_=i("oXaB");function f(e){return e<10?"0"+e:e.toString()}var m=p.enabled("countdown"),v=[0,1,2,3,9,8,10],y=p.enabled("force_exchange_as_title"),g={alwaysShowGlobalLast:!1,visibleOnHistoryOnly:!1,showCountdown:!0,showSymbolLabel:!0},b=function(e){function t(t,i,r){var o=e.call(this)||this;return o._previousCountdown="",o._source=t,o._model=i,o._options=Object(n.__assign)(Object(n.__assign)({},g),r),o}return Object(n.__extends)(t,e),t.prototype.updateCountdown=function(){this._countdownText()!==this._previousCountdown&&(this.update(),this._model.updateSourcePriceScale(this._source))},t.prototype._getSource=function(){return this._source},t.prototype._getModel=function(){return this._model},t.prototype._isCountdownEnabled=function(){return m},t.prototype._countdownText=function(){var e=h.Interval.parse(this._source.interval());if(e.isDWM()||e.isSeconds()&&1===e.multiplier())return"";var t=this._source.data().bars().last();if(null===t)return"";var i=1e3*Object(u.ensure)(t.value[0]),n=h.Interval.parse(this._source.interval()).inMilliseconds(),r=i.valueOf()+n,o=Math.round((r-this._currentTime())/1e3);if(o<=0)return"";var s=null;(o=Math.min(o,n/1e3))>=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;i<e.length;i++){var n=e[i];if(n in t._document){t.isFullscreen.setValue(!!t._document[n]);break}}};i();for(var n=0,o=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"];n<o.length;n++){var s=o[n];e.addEventListener(s,i,!1)}}return e.prototype.enter=function(){for(var e=this._document.documentElement,t=0,i=["requestFullscreen","mozRequestFullScreen","webkitRequestFullscreen","msRequestFullscreen"];t<i.length;t++){var n=i[t]
;if("function"==typeof e[n]){e[n]();break}}this.isFullscreen.setValue(!0)},e.prototype.exit=function(){for(var e=this._document,t=0,i=["exitFullscreen","mozCancelFullScreen","mozExitFullscreen","webkitExitFullscreen","msExitFullscreen"];t<i.length;t++){var n=i[t];if("function"==typeof e[n]){e[n]();break}}this.isFullscreen.setValue(!1)},e}(),a=function(){return function(e){var t,i=this;this.isVisible=new r.a(!0);for(var n=null,o=function(r){var o=r?r+"Hidden":"hidden";if(o in e)return t=r+"visibilitychange",(n=function(){i.isVisible.setValue(!e[o])})(),e.addEventListener(t,n,!1),"break"},s=0,a=["","moz","ms","webkit"];s<a.length;s++){if("break"===o(a[s]))break}this.destroy=function(){n&&(e.removeEventListener(t,n,!1),n=null)}}}(),l=i("mNbo"),c=i("Eyy1");i.d(t,"Root",(function(){return u}));var u=function(){function e(e){var t=this;this._updateDocumentHeight=function(e){"visual"===t._viewportType&&t._window.document.documentElement.style.setProperty("height",e+"px","important")},this._window=e,this._fullscreenApi=new s(e.document),this._viewportType=!Object(l.a)("any")&&this._window.visualViewport?"visual":"quirks","visual"===this._viewportType?this._viewport=Object(c.ensureDefined)(this._window.visualViewport):this._viewport=this._window;var i=this._layoutSizeSensor=this._window.document.createElement("div");i.id="layout-size-sensor",i.style.position="fixed",i.style.top="0",i.style.left="0",i.style.right="0",i.style.bottom="0",i.style.pointerEvents="none",i.style.visibility="hidden",this._initFullscreen()}return e.prototype.allocate=function(){var e=this;this.free();var t=this._window.document,i=t.createElement("div");i.classList.add("js-rootresizer__contents"),i.style.position="relative",i.style.width="100%",i.style.height="100%",t.body.insertAdjacentElement("afterbegin",i),t.body.insertAdjacentElement("afterbegin",this._layoutSizeSensor),this._visibilityApi=new a(this._window.document);var n={alive:new r.a(!0),fullscreenable:new r.a(!0),container:new r.a(i),width:new r.a,height:new r.a,availWidth:new r.a,availHeight:new r.a,visible:this._visibilityApi.isVisible,fullscreen:this._fullscreenApi.isFullscreen,remove:function(){n.alive.setValue(!1)},attach:function(){n.alive.setValue(!1),e._window.close()},requestFullscreen:function(){e._requestFullscreen()},exitFullscreen:function(){e._exitFullscreen()}};return n.alive.subscribe((function(t){t||n!==e._area||e.free()})),this._area=n,this._resizeHandler=function(){var t=e._width(n)||800,i=e._height(n)||600;n.availHeight.setValue(i),n.availWidth.setValue(t),n.height.setValue(i),n.width.setValue(t)},this._area.height.subscribe(this._updateDocumentHeight,{callWithLast:!0}),this._resizeHandler(),this._viewport.addEventListener("resize",this._resizeHandler),new o.ResizerDetacherState(n).bridge()},e.prototype.free=function(){if(this._resizeHandler&&(this._viewport.removeEventListener("resize",this._resizeHandler),this._resizeHandler=void 0),this._visibilityApi&&(this._visibilityApi.destroy(),this._visibilityApi=void 0),this._area){var e=this._area;this._area=void 0,
e.height.unsubscribe(this._updateDocumentHeight),e.alive.setValue(!1);var t=e.container.value(),i=null==t?void 0:t.parentElement;i&&(i.removeChild(t),i.removeChild(this._layoutSizeSensor))}},e.prototype._height=function(e){return"visual"===this._viewportType?this._layoutSizeSensor.clientHeight:e.container.value().clientHeight},e.prototype._width=function(e){return e.container.value().clientWidth},e.prototype._requestFullscreen=function(){this._fullscreenApi.enter()},e.prototype._exitFullscreen=function(){this._fullscreenApi.exit()},e.prototype._initFullscreen=function(){var e=this;this._fullscreenApi.isFullscreen.subscribe((function(t){e._resizeHandler&&e._resizeHandler()}))},e}()},ltKl:function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesApi",(function(){return a}));var n=i("Eyy1"),r=i("jRfx"),o=i("HGup"),s=i("/ToI"),a=function(){function e(e,t){this._series=e,this._model=t}return e.prototype.isUserEditEnabled=function(){return this._series.userEditEnabled()},e.prototype.setUserEditEnabled=function(e){this._series.setUserEditEnabled(e)},e.prototype.mergeUp=function(){this._model.isMergeUpAvailableForSource(this._series)&&new r.c(this._model,this._series,"").redo()},e.prototype.mergeDown=function(){this._model.isMergeDownAvailableForSource(this._series)&&new r.a(this._model,this._series,"").redo()},e.prototype.unmergeUp=function(){this._model.isUnmergeAvailableForSource(this._series)&&new o.c(this._model,this._series,"").redo()},e.prototype.unmergeDown=function(){this._model.isUnmergeAvailableForSource(this._series)&&new o.a(this._model,this._series,"").redo()},e.prototype.detachToRight=function(){new s.b(this._model,this._series,this._pane(),"right","").redo()},e.prototype.detachToLeft=function(){new s.b(this._model,this._series,this._pane(),"left","").redo()},e.prototype.detachNoScale=function(){new s.b(this._model,this._series,this._pane(),"overlay","").redo()},e.prototype.changePriceScale=function(e){var t=Object(n.ensureNotNull)(this._model.paneForSource(this._series));switch(e){case"new-left":new s.b(this._model,this._series,t,"left","").redo();break;case"new-right":new s.b(this._model,this._series,t,"right","").redo();break;case"no-scale":Object(n.assert)(t.actionNoScaleIsEnabled(this._series),"Unable to leave a pane without any non-overlay price scale"),new s.b(this._model,this._series,t,"overlay","").redo();break;default:var i=this._model.dataSourceForId(e);if(null===i)throw new Error("There is no study with entityId='"+e+"'");var r=this._model.paneForSource(i)===t;Object(n.assert)(r,"Study should be on the main pane");var o=Object(n.ensureNotNull)(i.priceScale());new s.a(this._model,this._series,t,o,"").redo()}},e.prototype.isVisible=function(){return this._series.properties().visible.value()},e.prototype.setVisible=function(e){this._series.properties().visible.setValue(e)},e.prototype.bringToFront=function(){this._model.bringToFront([this._series])},e.prototype.sendToBack=function(){this._model.sendToBack([this._series])},e.prototype.entityId=function(){return this._series.id()},
e.prototype.chartStyleProperties=function(e){return this._series.properties().child(l(e)).state(["inputs","inputsInfo"])},e.prototype.setChartStyleProperties=function(e,t){this._series.properties().child(l(e)).mergeAndFire(t)},e.prototype.barsCount=function(){return this._series.bars().size()},e.prototype.isLoading=function(){return this._series.isLoading()},e.prototype._pane=function(){return Object(n.ensureNotNull)(this._model.paneForSource(this._series))},e}();function l(e){switch(e){case 0:return"barStyle";case 1:return"candleStyle";case 2:return"lineStyle";case 3:return"areaStyle";case 4:return"renkoStyle";case 5:return"kagiStyle";case 6:return"pnfStyle";case 7:return"pbStyle";case 8:return"haStyle";case 9:return"hollowCandleStyle";case 10:return"baselineStyle";case 11:return"rangeStyle";case 12:return"hiloStyle";default:Object(n.ensureNever)(e)}throw new Error("unsupported chart style: "+e)}},lxNp:function(e,t,i){"use strict";i.r(t);var n=i("/3z9"),r=i("d700"),o=i("hY0g"),s=i.n(o),a=function(){function e(){var e=this;this._groups=[],this._pressedKeys=new s.a(0),this._keyDownListener=function(t){if(!t.defaultPrevented){var i=Object(n.hashFromEvent)(t);if(e._pressedKeys.setValue(i),!Object(r.a)(i,t.target))for(var o=e._groups.length;o-- >0;){var s=e._groups[o];if(!s.isDisabled()){if(s.handleHotkey(i,t))return;if(s.modal)return}}}},this._keyUpListener=function(t){var i=Object(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((!(e<a.InvalidationLevel.Full)||this._invalidated)&&0!==this._size.w&&0!==this._size.h){this._invalidated=!1;var t=Object(o.getContext2D)(this._canvasBinding.canvas);this._drawBackground(t,this._canvasBinding.pixelRatio),this._drawBorder(t,this._canvasBinding.pixelRatio)}},e.prototype.hardResetCanvas=function(){Object(o.hardResizeCanvas)(this._canvasBinding,this._size)},e.prototype.getWidth=function(){return this._size.w},e.prototype.getImage=function(){var e=Object(o.createDisconnectedCanvas)(document,this._size),t=Object(o.getPrescaledContext2D)(e),i=this._getBackgroundTopColor(),n=this._getBackgroundBottomColor();return i===n?Object(o.clearRect)(t,0,0,this._size.w,this._size.h,i):Object(s.clearRectWithGradient)(t,0,0,this._size.w,this._size.h,i,n),t.drawImage(this._canvasBinding.canvas,0,0,this._size.w,this._size.h),null!==this._label&&this._label.drawLabelForScreenshot(t,{offset:0,width:this._size.w,height:this._size.h,fontSize:this._properties.fontSize.value(),theme:this._backgroundBasedTheme.value()}),e},e.prototype.setLabelMode=function(e){e!==this._labelMode&&(this._labelMode=e,null!==this._label&&this._label.setMode(e),this._cell.classList.toggle(d["fixed-gear"],"gear"===e),this._cell.classList.toggle(d["fixed-symbol"],"symbol"===e),this._cell.classList.toggle("apply-common-tooltip","symbol"!==e&&this._labelOptions.enableTooltip))},e.prototype._setHighlighted=function(e){this._labelOptions.enableHighlight&&(this._onLabelHovered.fire(e),this._highlighted!==e&&(this._highlighted=e,this._invalidated=!0))},e.prototype._onPropertyChanged=function(){this._invalidated=!0},e.prototype._drawBorder=function(e,t){var i=this._size.w;e.save(),e.fillStyle=this._properties.lineColor.value();var n=Math.max(1,Math.floor(this._rendererOptionsProvider.options().borderSize*t)),r=this._isLeft?Math.floor(i*t)-n:0,o=Math.ceil(this._size.h*t);e.fillRect(r,0,n,o+1),e.restore()},e.prototype._drawBackground=function(e,t){var i=Math.ceil(t*this._size.w),n=Math.ceil(t*this._size.h),r=this._getBackgroundTopColor(),a=this._getBackgroundBottomColor();if(r===a?Object(o.clearRect)(e,0,0,i+1,n+1,r):Object(s.clearRectWithGradient)(e,0,0,i+1,n+1,r,a),this._highlighted){var l=u.themes[this._backgroundBasedTheme.value()].getThemedColor("color-price-axis-highlight");Object(o.fillRect)(e,0,0,i+1,n+1,l),e.globalAlpha=1}},e.prototype._tooltipContent=function(){return this._sourcesTitlesProvider().join("\n")},e.prototype._mouseOrTouchEnterEvent=function(e){null!==this._label&&"symbol"!==this._labelMode&&this._labelOptions.enableHighlight&&this._setHighlighted(!0)},e.prototype._mouseOrTouchLeaveEvent=function(e){
"symbol"!==this._labelMode&&this._setHighlighted(!1)},e.prototype._mouseClickOrTapEvent=function(e){var t=this;e.preventDefault(),null===this._fixedLabelMode&&"symbol"!==this._labelMode&&this._labelOptions.enableMenu&&this._labelOptions.showLabels?(this._fixedLabelMode=this._labelMode,this.setLabelMode("gear"),S.ContextMenuManager.createMenu(this._contextMenuItemsProvider(),{statName:"PriceScaleLabelContextMenu"},(function(){t.setLabelMode(Object(r.ensureNotNull)(t._fixedLabelMode)),t._fixedLabelMode=null})).then((function(e){return e.show((function(e,i){var n=t._cell.getBoundingClientRect();return{clientX:t._isLeft?n.left:n.right-e,clientY:n.top-Math.min(i,n.top),overrideHeight:n.top<i?n.top:void 0}}),t.getElement(),!0)}))):S.ContextMenuManager.hideAll()},e}(),x=i("Daqx");i.d(t,"PriceAxisesContainer",(function(){return T}));var T=function(){function e(e,t,i,r,s){this._axises=[],this._stubs=[],this._size=new o.Size(0,0),this._onLabelHovered=new g.a,this._scalesProperties=e,this._priceAxisWidgetFactory=i,this._rendererOptionsProvider=r.rendererOptionsProvider,this._titlesProvider=r.titlesProvider,this._stubContextMenuProvider=r.stubContextMenuProvider,this._backgroundBasedTheme=r.backgroundBasedTheme,this._getBackgroundTopColor=r.getBackgroundTopColor,this._getBackgroundBottomColor=r.getBackgroundBottomColor,this._labelsOptions=Object(n.__assign)(Object(n.__assign)({},P),s);var a=this._scalesProperties.childs();this._stubProperties={lineColor:a.lineColor,fontSize:a.fontSize},this._side=t,this._cell=document.createElement("td"),this._cell.classList.add("chart-markup-table","price-axis-container"),this._cell.style.width="25px",this._cell.style.position="relative"}return e.prototype.destroy=function(){this.setScales([],0,0,0)},e.prototype.onLabelHovered=function(){return this._onLabelHovered},e.prototype.setScales=function(e,t,i,n){for(var o=this;e.length>this._axises.length&&this._axises.length<t;){var s=Object(x.a)(this._side,this._axises.length),a=this._priceAxisWidgetFactory(this._side,this._rendererOptionsProvider,this._scalesProperties,s,this._backgroundBasedTheme);this._axises.push(a),this._cell.appendChild(a.getElement())}for(;e.length<this._axises.length;){a=Object(r.ensureDefined)(this._axises.pop());this._cell.removeChild(a.getElement()),a.destroy()}for(var l=0;l<this._axises.length;++l)this._axises[l].setPriceScale(e[l]);for(var c=t-e.length,u=Math.max(0,c);this._stubs.length>u;){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<c;)d();var _=this._labelsOptions.enableMenu
;1===n?this._stubs.forEach((function(e,t){return e.setLabelMode(_?"gear":"symbol")})):this._stubs.forEach((function(e,t){return e.setLabelMode(t<i&&_?"auto":"symbol")}))},e.prototype.getElement=function(){return this._cell},e.prototype.optimalWidths=function(){return this._axises.map((function(e){return e.optimalWidth()}))},e.prototype.setSizes=function(e,t){this._size=new o.Size(t.reduce((function(e,t){return e+t}),0),e),this._cell.style.width=this._size.w+"px",this._cell.style.minWidth=this._size.w+"px",this._cell.style.height=this._size.h+"px",t.length!==this._axises.length+this._stubs.length&&Object(r.assert)(t.length===this._axises.length+this._stubs.length,"Widgets count should be the same as widths one");var i=0;this._forEachWidgetFromLeft((function(n,r){var s=t[r];n.setSizeAndOffset(new o.Size(s,e),i),i+=s}))},e.prototype.update=function(){this._axises.forEach((function(e){return e.update()})),this._stubs.forEach((function(e){return e.update()}))},e.prototype.paint=function(e){this._axises.forEach((function(t,i){return t.paint(e(i))})),this._stubs.forEach((function(t,i){return t.paint(e(i))}))},e.prototype.paintStubs=function(e){this._stubs.forEach((function(t){return t.paint(e)}))},e.prototype.hardResetCanvas=function(){this._axises.forEach((function(e){return e.hardResetCanvas()})),this._stubs.forEach((function(e){return e.hardResetCanvas()}))},e.prototype.restoreDefaultCursor=function(){this._axises.forEach((function(e){return e.restoreDefaultCursor()}))},e.prototype.getWidth=function(){return this._size.w},e.prototype.findAxisWidgetForScale=function(e){var t=this._axises.find((function(t){return t.priceScale()===e}));return void 0===t?null:t},e.prototype.getScreenshotData=function(){var e=this._getImage();return{content:e.toDataURL(),canvas:e,contentHeight:this._size.h,contentWidth:this._size.w}},e.prototype.getImage=function(){return this._getImage()},e.prototype.slotsCount=function(){return this._axises.length+this._stubs.length},e.prototype.highlightPriceAxisByLabel=function(e){this._axises.forEach((function(t){var i=t.axisInfo();t.setHighlighted(null!==i&&i.equals(e))}))},e.prototype._stubParams=function(e){var t=this;return{rendererOptionsProvider:this._rendererOptionsProvider,backgroundBasedTheme:this._backgroundBasedTheme,sourcesTitlesProvider:function(){return t._titlesProvider(t._side,e)},contextMenuItemsProvider:function(){return t._stubContextMenuProvider(t._side,e)},getBackgroundTopColor:this._getBackgroundTopColor,getBackgroundBottomColor:this._getBackgroundBottomColor}},e.prototype._getImage=function(){var e=this,t=Object(o.createDisconnectedCanvas)(document,this._size),i=Object(o.getPrescaledContext2D)(t),n=0;return this._forEachWidgetFromLeft((function(t,r){var o=t.getWidth();0!==o&&(i.drawImage(t.getImage(),n,0,o,e._size.h),n+=o)})),t},e.prototype._forEachWidgetFromLeft=function(e){for(var t=Object(n.__spreadArrays)(this._axises,this._stubs),i="left"===this._side,r=i?t.length-1:0,o=i?-1:t.length,s=i?-1:1,a=r;a!==o;a+=s)e(t[a],a,t)},e}()},"mKT+":function(e,t,i){"use strict";i.r(t)
;var n=i("mrSG"),r=i("hayr"),o=i("mpWx");function s(e,t,n,s){var a=Object(r.loadPropertyPages)(),l=function(r,o){Promise.all([i.e(31),i.e(32),i.e(39),i.e(42),i.e(62),i.e(63),i.e(88),i.e(15),i.e(30),i.e(35),i.e(36),i.e(57),i.e("editobjectdialog")]).then(function(o){a.then((function(){var o=new(0,i("Kqsj").EditObjectDialog)(e,t,s);o.show(n),r(o)}))}.bind(null,i)).catch(o)};return Object(o.retries)((function(e){return new Promise(l)}),2)}var a=i("QloM");function l(e,t,n,r,o){return 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(26),i.e(29),i.e(40),i.e(44),i.e(45),i.e(56),i.e(58),i.e(59),i.e(79),i.e(0),i.e(2),i.e(5),i.e(12),i.e(11),i.e(14),i.e(17),i.e(18),i.e(20),i.e(28),i.e(38),i.e(49),i.e(53),i.e("new-edit-object-dialog")]).then(i.bind(null,"Y5hB")).then((function(i){var n=new(0,i.EditObjectDialogRenderer)(e,t,r,o);return n.show(),n}))}var c=i("3ClC"),u=i("W5mg"),h=null;var d=i("Kxc7"),p=null;var _,f=i("CW80");i.d(t,"resolveAndShowEditObjectDialog",(function(){return v}));var m=((_={})[a.TabNames.style]="symbol",_[a.TabNames.legend]="legend",_[a.TabNames.scales]="scales",_[a.TabNames.trading]="trading",_[a.TabNames.events]="events",_[a.TabNames.text]="text",_);function v(e,t,r,o,a){return void 0===r&&(r={}),Object(n.__awaiter)(this,void 0,void 0,(function(){var _,v;return Object(n.__generator)(this,(function(n){return _=o.activeChartWidget.value(),(v=d.enabled("test_force_old_properties_dialog"))&&(r.doNotCloseOnBgClick=!0),v||Object(c.isStudy)(e)&&function(e){return e.metaInfo().inputs.filter(u.a).some((function(e){return"bar_time"===e.type}))}(e)||Object(f.isLineTool)(e)&&Object(f.isMTPredictionTool)(e)?[2,s(e,t,r,a)]:(Object(f.isStudyLineTool)(e),Object(c.isStudy)(e)&&function(e){return"Overlay"===e.metaInfo().shortId}(e)||Object(f.isLineTool)(e)?[2,_.propertiesDefinitionsForSource(e).then((function(n){if(null!==n){var o=r.tabName,s=o&&m[o];return function(e){return Promise.all([i.e("redux"),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(27),i.e(29),i.e(40),i.e(44),i.e(45),i.e(50),i.e(58),i.e(85),i.e(0),i.e(2),i.e(5),i.e(12),i.e(11),i.e(14),i.e(17),i.e(21),i.e(20),i.e(28),i.e(38),i.e(48),i.e(53),i.e("source-properties-editor")]).then(i.bind(null,"CbZh")).then((function(t){var i=new(0,t.SourcePropertiesEditorRenderer)(e);return null!==p&&p.hide(),i.show(),p=i,i}))}({propertyPages:n,model:t,source:e,activePageId:s})}return null}))]:Object(c.isStudy)(e)&&!Object(c.isESDStudy)(e)?[2,l(e,t,0,a)]:[2,_.generalPropertiesDefinitions().then((function(t){var n=r.tabName,s=Object(c.isESDStudy)(e)?"events":n&&m[n];return function(e){return 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(26),i.e(27),i.e(29),i.e(40),i.e(50),i.e(66),i.e(84),i.e(0),i.e(2),i.e(5),i.e(11),i.e(17),i.e(21),i.e(18),i.e(20),i.e(28),i.e(48),i.e("general-chart-properties-dialog")]).then(i.bind(null,"PI1I")).then((function(t){
var i=new(0,t.GeneralChartPropertiesDialogRenderer)(e);return null!==h&&h.hide(),i.show(),h=i,i}))}({chartWidgetCollection:o,propertyPages:t,activePageId:s,model:_.model()})}))])}))}))}},mMWL:function(e,t,i){"use strict";i.r(t),i.d(t,"toolIsCursor",(function(){return d})),i.d(t,"toolIsMeasure",(function(){return p})),i.d(t,"resetToCursor",(function(){return _})),i.d(t,"lockTimeAxisTime",(function(){return b})),i.d(t,"tool",(function(){return S})),i.d(t,"cursorTool",(function(){return w})),i.d(t,"isToolEditingNow",(function(){return P})),i.d(t,"createdLineTool",(function(){return C})),i.d(t,"continuedLineTool",(function(){return x})),i.d(t,"cancelledLineTool",(function(){return T})),i.d(t,"beenSetLineToolLastPoint",(function(){return I})),i.d(t,"startedMovingLineTool",(function(){return M})),i.d(t,"movedLineTool",(function(){return L})),i.d(t,"finishedMovingLineTool",(function(){return O})),i.d(t,"startedChangingLineTool",(function(){return k})),i.d(t,"changedLineTool",(function(){return A})),i.d(t,"finishedChangingLineTool",(function(){return E})),i.d(t,"removedLineTool",(function(){return V})),i.d(t,"finishedLineTool",(function(){return D})),i.d(t,"changedLineStyle",(function(){return B})),i.d(t,"copiedLineTool",(function(){return R})),i.d(t,"restoredLineTool",(function(){return N})),i.d(t,"restoredLineToolState",(function(){return F})),i.d(t,"createLineTool",(function(){return W})),i.d(t,"continueLineTool",(function(){return H})),i.d(t,"cancelLineTool",(function(){return z})),i.d(t,"setLineToolLastPoint",(function(){return U})),i.d(t,"startMovingLineTool",(function(){return G})),i.d(t,"moveLineTool",(function(){return Y})),i.d(t,"finishMovingLineTool",(function(){return q})),i.d(t,"startChangingLineTool",(function(){return K})),i.d(t,"changeLineTool",(function(){return Z})),i.d(t,"finishChangingLineTool",(function(){return J})),i.d(t,"removeLineTool",(function(){return X})),i.d(t,"finishLineTool",(function(){return Q})),i.d(t,"changeLineStyle",(function(){return ee})),i.d(t,"copyLineTool",(function(){return te})),i.d(t,"restoreLineTool",(function(){return ie})),i.d(t,"restoreLineToolState",(function(){return ne})),i.d(t,"init",(function(){return se})),i.d(t,"runOnDrawingStateReady",(function(){return ae})),i.d(t,"properties",(function(){return le})),i.d(t,"hideAllDrawings",(function(){return ce})),i.d(t,"lockDrawings",(function(){return ue})),i.d(t,"hideMarksOnBars",(function(){return he})),i.d(t,"drawOnAllCharts",(function(){return de})),i.d(t,"lockTimeAxis",(function(){return pe}));var n=i("Eyy1"),r=i("m/cY"),o=i("Ocx9"),s=i("hY0g"),a=i.n(s),l=i("aIyQ"),c=i.n(l),u=i("Vdly"),h=i("FQhm");function d(e){return"cursor"===e||"arrow"===e||"dot"===e}function p(e){return"measure"===e}function _(e){if((void 0===e&&(e=!1),!e&&f)&&f.childs().stayInDrawingMode.value())return;S.setValue(w.value())}
var f=null,m=null,v=null,y=null,g=null,b=new a.a,S=new a.a,w=new a.a,P=new a.a(!1),C=new c.a,x=new c.a,T=new c.a,I=new c.a,M=new c.a,L=new c.a,O=new c.a,k=new c.a,A=new c.a,E=new c.a,V=new c.a,D=new c.a,B=new c.a,R=new c.a,N=new c.a,F=new c.a;function j(e,t){var i=t||{value:!1};return function(t){i.value||(i.value=!0,e.fire(t),i.value=!1)}}var W=j(C),H=j(x),z=j(T),U=j(I),G=j(M),Y=j(L),q=j(O),K=j(k),Z=j(A),J=j(E),X=j(V),Q=j(D),$={value:!1},ee=j(B,$),te=j(R,$),ie=j(N),ne=j(F),re=!1,oe=[];function se(){re||(S.setValue(u.getValue("chart.cursorPreference","cursor")),S.subscribe((function(e){return d(e)&&w.setValue(e)}),{callWithLast:!0}),w.subscribe((function(e){e&&u.setValue("chart.cursorPreference",e)})),f=new o.DefaultProperty("drawings"),m=Object(r.a)(),v=Object(r.a)(),y=Object(r.a)(),g=Object(r.a)(),m.setValue(!1),v.setValue(!1),y.setValue(!1),g.setValue(!1),S.subscribe((function(){Object(h.emit)("onSelectedLineToolChanged")})),re=!0,oe.forEach((function(e){return e()})),oe=[])}function ae(e){re?e():oe.push(e)}function le(){return Object(n.ensureNotNull)(f)}function ce(){return Object(n.ensureNotNull)(m)}function ue(){return Object(n.ensureNotNull)(v)}function he(){return Object(n.ensureNotNull)(y)}function de(){return le().childs().drawOnAllCharts}function pe(){return Object(n.ensureNotNull)(g)}},mNEU:function(e,t,i){"use strict";e.exports=function(e,t,n,r,o,s,a,l,c){var u=new(0,i("dDSx").ChartUndoModel)(e,t,n,r,o,s,a,l,c);return u.model().fullUpdate(),u}},mNbo:function(e,t,i){"use strict";function n(e){return!1}i.d(t,"a",(function(){return n}))},mPvX:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolsGroupModel",(function(){return s}));var n=i("aIyQ"),r=i.n(n),o=i("UqOQ"),s=function(){function e(e){var t=this;this._onChanged=new r.a,this._groups=[],this._groups=e||[],this._groups.forEach((function(e){e.onChanged().subscribe(null,(function(i){return t._onChanged.fire(e.id,i)}))}))}return e.prototype.groups=function(){return this._groups.filter((function(e){return e.isActualSymbol()}))},e.prototype.createGroup=function(e,t,i){var n=this;t=t||this._generateNextName();var r=new o.a(e,t,i);this._groups.push(r),r.onChanged().subscribe(null,(function(){return n._onChanged.fire(r.id)}));var s={visibilityChanged:!1,lockedChanged:!1,titleChanged:!1,isActualIntervalChanged:!1,affectedLineTools:e.map((function(e){return e.id()}))};return this._onChanged.fire(r.id,s),r},e.prototype.addGroup=function(e){var t=this;this._groups.push(e),e.onChanged().subscribe(null,(function(i){return t._onChanged.fire(e.id,i)})),this._onChanged.fire(e.id)},e.prototype.removeGroup=function(e){var t=this._groups.findIndex((function(t){return t.id===e.id}));this._groups.splice(t,1),this._onChanged.fire(e.id)},e.prototype.groupForId=function(e){return this._groups.find((function(t){return t.id===e}))||null},e.prototype.groupForLineTool=function(e){return this._groups.find((function(t){return t.containsLineTool(e)}))||null},e.prototype.removeLineTools=function(e){var t=this;this._groups.forEach((function(t){return t.excludeLineTools(e)})),
this._groups.filter((function(e){return 0===e.lineTools().length})).forEach((function(e){return t.removeGroup(e)}))},e.prototype.state=function(e){return{groups:(e?this._groups.filter((function(e){return e.isActualSymbol()})):this._groups).map((function(e){return e.state()}))}},e.prototype.onChanged=function(){return this._onChanged},e.fromState=function(t,i){for(var n=[],r=0,s=i.groups;r<s.length;r++){var a=s[r],l=o.a.fromState(t,a);null!==l&&n.push(l)}return new e(n)},e.prototype._generateNextName=function(){for(var e=new Set(this.groups().map((function(e){return e.name()}))),t=1;;t++){var i="Group "+t,n="Group_"+t;if(!e.has(i)&&!e.has(n))return i}},e}()},mYjs:function(e,t,i){"use strict";function n(e,t){Promise.all([i.e(31),i.e(42),i.e(15),i.e(36),i.e("change-interval-dialog")]).then(i.t.bind(null,"MuC6",7)).then((function(i){new i.ChangeIntervalDialog(e).show(t)}))}i.r(t),i.d(t,"showChangeIntervalDialog",(function(){return n}))},mZrn:function(e,t,i){"use strict";i.r(t);var n=i("FBuY"),r=i("JWMC"),o=i("+6II"),s=i("qocr"),a=/\b(msie|trident)\b/i.test(navigator.userAgent)?1:0;function l(e){return e.offsetWidth+a<e.scrollWidth}Object(s.a)((function(){document.addEventListener("mouseenter",(function(e){var t,i=e.target;i instanceof HTMLElement&&i.matches(".apply-overflow-title")&&((t=i).getAttribute("title")||t.offsetWidth+a>=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;r<n.length;r++){var s=n[r];if(s instanceof HTMLElement&&l(s)){i=!0;break}}if(!i)return}else if(!l(t))return;var a="";a=t.matches&&t.matches(".apply-overflow-tooltip--allow-text")?t.textContent||"":Array.from(t.childNodes).reduce((function(e,t){return t.nodeType===Node.TEXT_NODE&&e.push(t.textContent||""),e}),[]).join("").trim(),Object(o.showOnElement)(t,{text:a});var c=function(){Object(o.hide)(),["mouseleave","mousedown"].forEach((function(e){return t.removeEventListener(e,c)}))};["mouseleave","mousedown"].forEach((function(e){return t.addEventListener(e,c)}))}}),!0)}));i("YFKU");var c=i("qFKp");if(Object(c.isMac)()&&c.isSafari&&!c.CheckMobile.iOS()&&!Object(c.haveEverReceivedTouchEvent)()){var u=function(){Object(c.markAsReceivedTouch)(),document.removeEventListener("touchstart",u)};document.addEventListener("touchstart",u,!1)}var h,d,p=i("aIyQ"),_=i.n(p),f=i("VVxS"),m=i("FIi8");i("ULlu");function v(e){window.iframeAuthWidget&&!1===window.user.profile_data_filled&&(window.iframeAuthWidget.preventClose=!0);var t=window.user.available_offers||{};(window.TVSettings&&window.TVSettings.sync(window.user.settings),window.is_authenticated)?!1===window.user.profile_data_filled&&(Object(r.trackEvent)("Conversion","First login"),delete window.user.profile_data_filled):(Object.keys(t).forEach((function(e){delete t[e]})),window.user={username:"Guest",following:"0",followers:"0",ignore_list:{},available_offers:t},
f.TVLocalStorage.removeItem("trial_availiable"))}(h=window.loginStateChange?window.loginStateChange:window.loginStateChange=new _.a).subscribe(null,v),n.TVXWindowEvents.on("loginStateChange",(function(e){var t=JSON.parse(e);window.user=t.user,window.is_authenticated=!!t.is_authenticated,h.fire()})),n.TVXWindowEvents.on("signOut",(function(){!function(){if(window.initData.lfs){var e=document.getElementsByClassName("js-admin-warning")[0];document.body.removeChild(e)}var t=!0;[/^\/chart\//,/^\/share-your-love\//].forEach((function(e){e.test(window.location.pathname)&&(t=!1)})),t&&window.location.reload()}()})),d={},window.crossTabSyncUserAttr=function(e){var t={};e instanceof Array?e.forEach((function(e){t[e]=window.user[e]})):t[e]=window.user[e],n.TVXWindowEvents.emit("user-obj-changed",JSON.stringify(t))},n.TVXWindowEvents.on("user-obj-changed",(function(e){var t,i=JSON.parse(e);for(t in i)i.hasOwnProperty(t)&&(window.user[t]=i[t],(d[t]||[]).forEach((function(e){e.fire(i[t])})))})),window.TradingView.changeLoginState=function(e){window.is_authenticated=!!e,n.TVXWindowEvents.emit("loginStateChange",JSON.stringify({is_authenticated:window.is_authenticated,user:window.user})),h.fire()},window.loginUser=function(e,t){window.TVDialogs&&window.TVDialogs.signModal&&window.TVDialogs.signModal.close(),window.user=Object(m.deepExtend)({},e),window.TradingView.changeLoginState(!0),"function"==typeof t&&window.TVDialogs&&window.TVDialogs.signModal?window.TVDialogs.signModal.on("signinSuccess",(function(){t()})):"function"==typeof t&&t()},window.loginRequiredDelegate=new _.a,window.runOrSignIn=function(e,t){t||(t={}),e()},window.onLoginStateChange=v,window.TradingView.setTrialAvailiable=function(e){f.TVLocalStorage.setItem("trial_availiable",e?"1":"0")},window.TradingView.notificationsChanged=new _.a},me8f:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("tc+8"),o=i("Ocx9").DefaultProperty,s=window.t("Balloon");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("Hyqq").BalloonPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,n),a.prototype.pointsCount=function(){return 1},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Balloon"},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("RhWr").BalloonDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.prototype.template=function(){var e=n.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},a.prototype._applyTemplateImpl=function(e){n.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text)},a.createProperties=function(e){var t=new o("linetoolballoon",e);return a._configureProperties(t),t},a._configureProperties=function(e){n._configureProperties(e),e.hasChild("text")||e.addChild("text",new r(window.t("Comment"))),e.addExclusion("text")},t.LineToolBalloon=a
},mf9N:function(e,t,i){"use strict";i.r(t);var n=i("Eyy1"),r=function(){function e(e,t){this._chartUndoModel=e,this._chartModel=e.model(),this._priceScale=t}return e.prototype.getMode=function(){var e=this._priceScale.properties().childs();return e.percentage.value()?2:e.indexedTo100.value()?3:e.log.value()?1:0},e.prototype.setMode=function(e){this._priceScale.setMode({percentage:2===e,log:1===e,indexedTo100:3===e})},e.prototype.isInverted=function(){return this._priceScale.isInverted()},e.prototype.setInverted=function(e){this._priceScale.properties().childs().isInverted.setValue(e)},e.prototype.getVisiblePriceRange=function(){return this._priceScale.priceRangeInPrice()},e.prototype.setVisiblePriceRange=function(e){this._priceScale.setPriceRangeInPrice(e),this._chartModel.lightUpdate()},e.prototype.hasMainSeries=function(){return this._priceScale.hasMainSeries()},e.prototype.getStudies=function(){return this._priceScale.getStudies().map((function(e){return e.id()}))},e.prototype.currency=function(){var e=this._priceScale.currency(this._chartModel.availableCurrenciesSet());return null===e?null:{selectedCurrency:e.selectedCurrency,readOnly:e.readOnly}},e.prototype.setCurrency=function(e){this._chartUndoModel.setPriceScaleCurrency(this._priceScale,e)},e}(),o=i("96Yh"),s=i("ogJP"),a=i("mrSG"),l=function(e){function t(t,i,n){var r=e.call(this,"Change Pane Height")||this;return r._model=t,r._paneIndex=i,r._paneHeight=n,r._prevStretchFactors=r._model.panes().map((function(e){return e.stretchFactor()})),r}return Object(a.__extends)(t,e),t.prototype.redo=function(){this._model.changePanesHeight(this._paneIndex,this._paneHeight)},t.prototype.undo=function(){for(var e=this._model.panes(),t=0;t<e.length;++t)e[t].setStretchFactor(Object(n.ensureDefined)(this._prevStretchFactors[t]));this._model.fullUpdate()},t}(i("RDU5").UndoCommand);i.d(t,"PaneApi",(function(){return c}));var c=function(){function e(e,t){this._priceScales=new WeakMap,this._pane=e,this._chartWidget=t}return e.prototype.hasMainSeries=function(){return this._pane.containsMainSeries()},e.prototype.getLeftPriceScales=function(){return this._pane.leftPriceScales().map(this._getPriceScaleApi,this)},e.prototype.getRightPriceScales=function(){return this._pane.rightPriceScales().map(this._getPriceScaleApi,this)},e.prototype.getMainSourcePriceScale=function(){var e=this._pane.mainDataSource();if(null===e)return null;var t=e.priceScale();return null===t||this._pane.isOverlay(e)?null:this._getPriceScaleApi(t)},e.prototype.setMaximized=function(e){if(this._pane.isMaximized()!==e)for(var t=0,i=this._chartWidget.paneWidgets();t<i.length;t++){var n=i[t];if(n.state()===this._pane){this._chartWidget.toggleMaximizePane(n);break}}},e.prototype.getAllEntities=function(){var e=this._pane.model();return this._pane.allOrderedSources().map((function(t){return Object(o.entityForDataSource)(e,t)})).filter(s.notNull).filter((function(e){return null!==e.name}))},e.prototype.getHeight=function(){return this._pane.height()},e.prototype.setHeight=function(e){
var t=this._chartWidget.model().model(),i=t.panes();Object(n.assert)(i.length>1,"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&&e<this._chartWidget.paneWidgets().length,"Invalid pane index"),this._chartWidget.model().movePane(t,e))},e.prototype.paneIndex=function(){return this._chartWidget.model().model().panes().indexOf(this._pane)},e.prototype._getPriceScaleApi=function(e){var t=this._priceScales.get(e);return void 0===t&&(t=new r(this._chartWidget.model(),e),this._priceScales.set(e,t)),t},e}()},mkn5:function(e,t,i){"use strict";(function(t,n){i("AE9l"),i("YFKU");var r=i("UCjq").PaneWidgetBase,o=i("1IXQ").PriceAxisWidget,s=i("1IXQ").scaleRatioForContextMenuTransformer(7),a=i("Ss5c").LineDataSource,l=i("CW80").isLineToolName,c=i("YmeR").ActionBinder,u=i("Eyy1").ensureNotNull,h=i("HZKX"),d=(h.createActionAddAlert,h.createActionTrade,h.createMTPredictorActions),p=h.createLinesAction,_=i("7KDR"),f=_.Action,m=_.Separator,v=i("/3z9"),y=i("mMWL"),g=i("FQhm"),b=i("S8xo").MouseEventHandler,S=i("GVQo"),w=i("+6II");function P(e,i,n){r.call(this,e,i,n),this.setCursorForTool(),this._mouseEventHandler=new b(this._topCanvasBinding.canvas,this,{treatVertTouchDragAsPageScroll:!this._options.handleScroll.vertTouchDrag,treatHorzTouchDragAsPageScroll:!this._options.handleScroll.horzTouchDrag}),this.actions=[],this.readonlyActions=[],this._overlays={},this._prevHoveredHittest=null,this._chart.withModel(this,(function(){var e=this._chartUndoModel();e.onSimpleZoomIn().subscribe(this,this._updateCrosshairOnZoom),e.onSimpleZoomOut().subscribe(this,this._updateCrosshairOnZoom)})),this._highlightedPriceAxis=new t(null),this._highlightedPriceAxis.subscribe(function(e){this._highlightPriceAxisByLabel(e)}.bind(this)),this._prevPinchScale=0,this._isDestroyed=!1}inherit(P,r),P.prototype.destroy=function(){for(var e in r.prototype.destroy.call(this),this._prevHoveredHittest=null,this._mouseEventHandler.destroy(),this._rowElement.parentElement.removeChild(this._rowElement),this)delete this[e];this._isDestroyed=!0},P.prototype._highlightPriceAxisByLabel=function(e){this._lhsPriceAxisesContainer.highlightPriceAxisByLabel(e),this._rhsPriceAxisesContainer.highlightPriceAxisByLabel(e)},P.prototype.chart=function(){return this._chart},P.prototype.stretchFactor=function(){return this._state?this._state._stretchFactor:0},P.prototype.setStretchFactor=function(e){this.hasState()&&(this._state._stretchFactor=e)},P.prototype.hideInplaceEditor=function(){return!!this._inplaceEditor&&(this._inplaceEditor.remove(),this._inplaceEditor=void 0,!0)},P.prototype._finishZoom=function(e){var t=this.state(),i=t.defaultPriceScale(),n=t.mainDataSource().firstValue(),r=i.coordinateToPrice(e.localY,n),o=this._chartUndoModel(),s=Math.round(o.timeScale().coordinateToIndex(e.localX))
;s!==this._firstZoomPoint.index&&o.zoomToViewport(this._firstZoomPoint.index,s,this._firstZoomPoint.price,r,t),this._chartModel().crossHairSource().clearSelection(),this._firstZoomPoint=null,y.resetToCursor(),this._preventCrossHairMove()&&this._clearCursorPosition()},P.prototype.drawRightThere=function(e){if(l(e)){var t=this._chartUndoModel(),i=t.crossHairSource(),n=t.model().magnet().align(i.price,i.index,this._state);t.createLineTool(this.state(),{index:i.index,price:n},e)}},P.prototype._equalsCursorCache=function(e,t){return y.toolIsCursor(e.tool)?e.tool===t.tool&&e.theme===t.theme&&e.crosshair===t.crosshair:e.tool===t.tool&&e.theme===t.theme},P.prototype._updateCommonTooltip=function(e){var t=this._lastCommonTooltipData,i=null;if(e&&e.hittest){var n=e.hittest.data();n&&(i=n.tooltip||null)}if(null!=t||null!=i){if(null==i||""===i.text)return this._lastCommonTooltipData=null,void w.hide();if(!t||i.text!==t.text||i.rect.x!==t.rect.x||i.rect.y!==t.rect.y||i.rect.w!==t.rect.w||i.rect.h!==t.rect.h){this._lastCommonTooltipData=i;var r=TradingView.clone(i),o=this._paneCell.getBoundingClientRect();r.rect.x+=o.left,r.rect.y+=o.top,w.show(r)}}},P.prototype.createRemoveMenu=function(){var e=this._chart.actions();return new f({label:window.t("Remove"),statName:"Remove",subItems:[e.paneRemoveAllStudies,e.paneRemoveAllDrawingTools,e.paneRemoveAllStudiesDrawingTools]})},P.prototype._initActions=function(e){var t=this,i=this._chart.actions(),r=[];if(n.enabled("datasource_copypaste")&&!this.state().isEmpty()){var o=S.get(),s=((o||{}).sources||[]).filter((function(e){return"study"===e.type||"drawing"===e.type}));if(s.some((function(e){return"drawing"!==e.type||null!==t.state().clipboardLineToolOwnerSource(e.source.id)}))&&o&&s.length){var a=new f({label:window.t("Paste %s").replace("%s",window.t(o.title||o.type)),shortcutHint:v.humanReadableHash(v.Modifiers.Mod+86),statName:"Paste",onExecute:function(){t._chart.onAppClipboardPaste(t.state())}});r.push(a)}}return r.length&&r.push(new m),r.push(i.chartReset),r.push(new m),r[r.length-1]instanceof m||r.push(new m),window.widgetbar&&(!window.widgetbar._customization||window.widgetbar._customization.watchlist)&&i.addToWatchlist&&r.push(i.addToWatchlist),n.enabled("text_notes")&&r.push(i.addToTextNotes),r[r.length-1]instanceof m||r.push(new m),r.push(this._createLockTimeAxisAction(e)),r.push(new m),r.push(p(this._chart)),n.enabled("charting_library_base")||r.push(i.applyColorTheme),r[r.length-1]instanceof m||r.push(new m),this._chart.applyIndicatorsToAllChartsAvailable()&&(r.push(i.applyStudiesToAllCharts),r.push(new m)),r.push(i.paneRemoveAllDrawingTools),r.push(i.paneRemoveAllStudies),r.push(new m),pro.hasPackage("mtp-mtpredictor")&&this.state().containsMainSeries()&&r.push(d(this._chart,this._state,this._contextMenuX,this._contextMenuY),new m),r.push(i.hideAllMarks),r.push(new m),n.enabled("show_chart_property_page")&&r.push(i.chartProperties),r[r.length-1]instanceof m&&r.pop(),r},P.prototype._customActions=function(){var e={top:[],bottom:[],remove:[]
},t=this._chartUndoModel().timeScale(),i=this._state&&this._state.defaultPriceScale();if(!n.enabled("custom_items_in_context_menu"))return e;var r,o=t.isEmpty()?void 0:t.indexToUserTime(t.coordinateToIndex(this._contextMenuX));if(i&&!i.isEmpty()){var s=this._state.mainDataSource().firstValue();r=i.coordinateToPrice(this._contextMenuY,s)}return g.emit("onContextMenu",{unixtime:o?o/1e3:void 0,price:r,callback:function(t){[].concat(t).forEach((function(t){var i;t.text&&(t.text.length>1&&"-"===t.text[0]?e.remove.push(t.text.slice(1)):(i="-"===t.text?new 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;i<t.length;++i){var n=t[i];e.isOverlay(n)&&(n instanceof a||e.recalculatePriceScale(n.priceScale()),n.updateAllViews())}},P.prototype._priceAxisesContainer=function(e){return o.isLeft(e)?this._lhsPriceAxisesContainer:this._rhsPriceAxisesContainer},P.prototype.createActionLockScale=function(e){if(!(e instanceof TradingView.Series))return null;var t=s(e.priceScale(),this._chartUndoModel().model().mainSeriesScaleRatio()),i=new f({
checkable:e.priceScale().isLockScale(),label:window.t("Lock Scale")+" "+t,statName:"LockScale"});return i._binding=new c(i,e.priceScale().properties().lockScale,this._chartUndoModel(),"Lock Scale",(function(){var t={lockScale:this.value()};this._undoModel.setPriceScaleMode(t,e.priceScale(),this._undoText)})),i},P.prototype._updateCrosshairOnZoom=function(){if(y.lockTimeAxis().value()){var e=this._chartUndoModel().crossHairSource();e.setPosition(e.index,e.price,this.state())}},P.prototype.highlightedPriceAxis=function(){return this._highlightedPriceAxis},e.exports.PaneWidget=P}).call(this,i("hY0g"),i("Kxc7"))},mpWx:function(e,t,i){"use strict";function n(e,t){for(var i=Promise.reject(),n=0;n<t;++n)i=i.catch(e);return i}i.r(t),i.d(t,"retries",(function(){return n}))},n0Bl:function(e,t,i){"use strict";i.r(t),i.d(t,"migrateShortcut",(function(){return r}));var n=i("/3z9");function r(e){for(var t=e.split("+"),i=t.pop().toUpperCase().charCodeAt(0),r=0;r<t.length;r++){var o=t[r].toLowerCase();"ctrl"===o?i|=n.Modifiers.Control:"shift"===o?i|=n.Modifiers.Shift:"alt"===o&&(i|=n.Modifiers.Alt)}return i}},n40Z:function(e,t,i){"use strict";(function(e){var n=i("Ss5c").LineDataSource,r=i("Ocx9").DefaultProperty,o=i("GmZZ").LineToolVertLineTimeAxisView,s=window.t("Vertical Line");function a(e,t){this._constructor="LineToolVertLine";var r=t||a.createProperties();n.call(this,e,r),this._timeAxisView=new o(this),i.e("lt-pane-views").then(function(e){var t=i("BSCN").VertLinePaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}inherit(a,n),a.prototype.pointsCount=function(){return 1},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Vertical Line"},a.prototype.timeAxisViews=function(){return this.isSourceHidden()?null:this.properties().showTime.value()?[this._timeAxisView]:null},a.prototype.updateAllViews=function(){n.prototype.updateAllViews.call(this),this._timeAxisView.update()},a.prototype.canHasAlert=function(){return!0},a.prototype._getAlertPlots=function(){var e=this._points[0],t={index:e.index,price:e.price+1};return[this._linePointsToAlertPlot([e,t],null,!0,!0)]},a.prototype._getPropertyDefinitionsViewModelClass=function(){return Promise.all([i.e(21),i.e("lt-property-pages-with-definitions")]).then(function(e){return i("FkpW").VerticalLineDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.prototype.template=function(){var e=n.prototype.template.call(this);return e.text=this.properties().childs().text.value(),e},a.prototype._applyTemplateImpl=function(e){n.prototype._applyTemplateImpl.call(this,e),this.properties().childs().text.setValue(e.text||"")},a.createProperties=function(e){void 0!==e&&void 0===e.textOrientation&&(e.textOrientation="horizontal");var t=new r("linetoolvertline",e);return a._configureProperties(t),t},a._configureProperties=function(t){n._configureProperties(t),t.hasChild("text")||t.addChild("text",new e("")),t.addExclusion("text")},t.LineToolVertLine=a}).call(this,i("tc+8"))},n5al:function(e,t,i){"use strict";i.r(t),
i.d(t,"isRequiringRestartSeriesStyles",(function(){return p})),i.d(t,"isRangeBasedStyle",(function(){return _})),i.d(t,"isRangeStyle",(function(){return f})),i.d(t,"isTimeBasedStyle",(function(){return m})),i.d(t,"isValidStyle",(function(){return v})),i.d(t,"setLastUsedStyle",(function(){return y})),i.d(t,"getLastUsedStyle",(function(){return g})),i.d(t,"getDefaultStyle",(function(){return b})),i.d(t,"getChartStyleByResolution",(function(){return S})),i.d(t,"chartStyleStudyId",(function(){return w})),i.d(t,"preparePriceAxisProperties",(function(){return P})),i.d(t,"hasProjection",(function(){return x})),i.d(t,"isPriceSourceStyle",(function(){return T})),i.d(t,"getSeriesPriceFormattingState",(function(){return I})),i.d(t,"createSeriesFormatter",(function(){return M})),i.d(t,"seriesCurrency",(function(){return L})),i.d(t,"extractSymbolNameFromSymbolInfo",(function(){return O}));var n=i("Vdly"),r=i("dfhE"),o=i("LxhU"),s=i("kcTO"),a=i("Kxc7"),l=i("nEwK"),c=[4,5,6,7,8],u=[4,5,6,7,8,11],h=[0,1,9,2,3,10],d=[2,10,3];function p(e){return-1!==c.indexOf(e)}function _(e){return-1!==u.indexOf(e)}function f(e){return 11===e}function m(e){return-1!==h.indexOf(e)}function v(e){return _(e)||m(e)}function y(e){v(e)&&11!==e&&n.setValue("chart.lastUsedStyle",e)}function g(){var e=n.getInt("chart.lastUsedStyle");return void 0===e?1:e}function b(e){return e?11:1}function S(e,t){var i=f(t),n=o.Interval.isRange(e);return!i&&n?b(!0):i&&!n?b(!1):t}function w(e,t){var i=r.SYMBOL_STRING_DATA[e];return void 0===i?null:t?i.type+"-"+i.basicStudyVersion:i.type}function P(e){var t=e.priceAxisProperties,i=t.lockScale.value(),n=6===e.style.value();(n||i)&&(t.log.setValue(!1),t.percentage.setValue(!1)),t.logDisabled.setValue(!(!n&&!i)),t.percentageDisabled.setValue(!(!n&&!i))}var C=[4,7,5,6];function x(e){return-1!==C.indexOf(e)}function T(e){return d.includes(e)}function I(e,t,i){void 0===t&&(t="default"),void 0===i&&(i=!1);var n,r,o=100,s=1;if("default"===t)null!=e&&(o=e.pricescale,s=e.minmov,n=e.fractional,r=e.minmove2);else{var a=t.split(",");3!==a.length&&(a=["100","1","false"]),o=parseInt(a[0]),s=parseInt(a[1]),n="true"===a[2]}return i&&(s=1),{priceScale:o,minMove:s,fractional:n,minMove2:r}}function M(e,t,i){if(void 0===i&&(i=!1),"default"===t&&null!=e&&("volume"===e.formatter||"volume"===e.format))return new l.VolumeFormatter(2);var n=I(e,t,i),r=n.priceScale,o=n.minMove,a=n.fractional,c=n.minMove2;return new s.PriceFormatter(r,o,a,c)}function L(e){return null===e||void 0===e.currency_code||""===e.currency_code||"spread"===e.type?null:e.currency_code}function O(e,t){var i=e&&(e.pro_name||e.full_name||e.name);return a.enabled("charting_library_single_symbol_request")&&t?i=t:a.enabled("use_ticker_on_symbol_info_update")&&e&&e.ticker&&(i=e.ticker),i}},nBJD:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var n=function(){function e(e){this._text="",this._color="",this._size="13px",this._bold=!1,this._statusProvider=e}return e.prototype.text=function(){return this._text},e.prototype.getSplitTitle=function(){return[this._text]},
e.prototype.color=function(){return this._statusProvider.color()},e.prototype.bold=function(){return this._bold},e.prototype.size=function(){return this._size},e}()},nEwK:function(e,t,i){"use strict";i.r(t),i.d(t,"PLACE_HOLDER",(function(){return a})),i.d(t,"VolumeFormatter",(function(){return l}));var n=i("YFKU"),r=i("zXvd"),o=i("ogJP"),s=i("ivNn"),a="---",l=function(){function e(e){this.type="volume",this._numericFormatter=new r.NumericFormatter,this._fractionalValues=void 0!==e&&e>0,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<h;d++){var p=c.levels.childs()[d].childs();l.push(p.width)}
for(h=c.fanlines.childCount(),d=0;d<h;d++){p=c.fanlines.childs()[d].childs();l.push(p.width)}for(h=c.arcs.childCount(),d=0;d<h;d++){p=c.arcs.childs()[d].childs();l.push(p.width)}return o._widthsProperty=new u.LineToolWidthsProperty(l),o}return Object(n.__extends)(t,e),t.prototype.properties=function(){return e.prototype.properties.call(this)},t.prototype.migrateVersion=function(e,t,i){var n=this;1===e&&(this._points.length>=this.pointsCount()?setTimeout((function(){return n._migratePoint()})):this._timePoint.length>=this.pointsCount()&&this._pointAdded.subscribe(this,this._migratePoint))},t.prototype.destroy=function(){var e=this.properties();e.unsubscribe(this,this._adjustScaleRatio),e.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;n<i;n++){var r=t.levels.childs()[n].childs();e.push({index:n,visible:r.visible.value(),color:r.color.value(),width:r.width.value()})}return e},t.prototype.fanLinesCount=function(){return this.properties().childs().fanlines.childCount()},t.prototype.fanLines=function(){for(var e=[],t=this.properties().childs(),i=t.fanlines.childCount(),n=0;n<i;n++){var r=t.fanlines.childs()[n].childs();e.push({index:n,visible:r.visible.value(),x:r.x.value(),y:r.y.value(),color:r.color.value(),width:r.width.value()})}return e},t.prototype.arcsCount=function(){return this.properties().childs().arcs.childCount()},t.prototype.arcs=function(){for(var e=[],t=this.properties().childs(),i=t.arcs.childCount(),n=0;n<i;n++){var r=t.arcs.childs()[n].childs();e.push({index:n,visible:r.visible.value(),x:r.x.value(),y:r.y.value(),color:r.color.value(),width:r.width.value()})}return e},t.prototype.arcsBackgroundTransparency=function(){return this.properties().childs().arcsBackground.childs().transparency.value()},t.prototype.isArcsBackgroundFilled=function(){
return this.properties().childs().arcsBackground.childs().fillBackground.value()},t.prototype.isLabelsVisible=function(){return this.properties().childs().showLabels.value()},t.prototype.getLabelsStyle=function(){var e=this.properties().childs(),t=e.labelsStyle.childs(),i=t.font,n=t.fontSize,r=t.bold,o=t.italic,s=e.levels.childCount();return{textColor:e.levels.childs()[s-1].childs().color.value(),font:i.value(),fontSize:n.value(),bold:r.value(),italic:o.value()}},t.prototype.getScaleRatioStep=function(){return 1e-7},t.prototype.getScaleRatioFormatter=function(){return this._scaleRatioFormatter},t.prototype.getPriceDiff=function(){var e=this.points();if(e.length<2)return null;var t=e[0];return e[1].price-t.price},t.prototype.getIndexDiff=function(){var e=this.points();if(e.length<2)return null;var t=e[0];return e[1].index-t.index},t.prototype.getScaleRatio=function(){var e=this.getPriceDiff(),t=this.getIndexDiff();return null!==e&&null!==t&&0!==t?Math.abs(e/t):null},t.createProperties=function(e){var i=Object(c.a)("linetoolganncomplex",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,"WfUZ")).then((function(e){return e.GannComplexAndFixedDefinitionsViewModel}))},t._configureProperties=function(e){a.LineDataSource._configureProperties(e)},t.prototype._correctScaleRatio=function(){var e=this.properties().childs(),t=this.getScaleRatio();e.scaleRatio.setValue(t)},t.prototype._getAdjustedScaleRatio=function(){var e=this.model().mainSeries().priceScale(),t=this.model().timeScale();return Object(l.scaleRatio)(t,e)},t.prototype._adjustScaleRatio=function(e){var t=e.scaleRatio.value();""!==t&&null!==t||e.scaleRatio.setValue(this._getAdjustedScaleRatio())},t.prototype._correctPoint=function(e){if(!(this._points.length<2)){var t=this.getIndexDiff();if(null!==t){var i=this.properties().childs().scaleRatio.value();if(null!==i){var n=this._points[e],r=0===e?this._points[1]:this._points[0],o=n.price-r.price>0,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().length<this.pointsCount())){var e=this._getScreenPoints();if(null!==e){var t=this.screenPointToPoint(e[1]);this.setPoint(1,t),this._pointAdded.unsubscribe(this,this._migratePoint)}}},t.prototype._getScreenPoints=function(){var e,t=this._calcAngle();if(null===t)return null;var i=this.points(),n=i[0],o=i[1];this.isReversed()&&(n=(e=[o,n])[0],o=e[1])
;var s=this.pointToScreenPoint(n)[0],a=this.pointToScreenPoint(o)[0],l=Math.sqrt(Math.pow(s.x-a.x,2)+Math.pow(s.y-a.y,2)),c=new r.Point(Math.cos(t),-Math.sin(t)),u=c.normalized(),h=u.x<0?-1:1,d=u.y<0?-1:1;return[s.addScaled(c,l),s.add(new r.Point(5*l*h,5*l*d))]},t.prototype._calcAngle=function(){var e=this.points(),t=e[0],i=e[1],n=this.pointToScreenPoint(t)[0],r=this.pointToScreenPoint(i)[0].subtract(n);if(r.length()>0){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;e<this._points.length;e++)if(void 0!==this._points[e].index){var t=this.normalizePoint(this._points[e]);if(!t.time_t){this._timePoint=[];break}this._timePoint.push(t)}this._normalizedPointsChanged.fire()},t}(r.DataSource)},nqXy:function(e,t,i){"use strict";i.r(t),i.d(t,"MouseWheelHelper",(function(){return n}));var n=function(){function e(){this._totalDeltaX=0,this._totalDeltaY=0,this._prevWheelTime=0}return e.prototype.processWheel=function(e){e.timeStamp-this._prevWheelTime>100&&this._reset(),this._totalDeltaX+=e.deltaX,this._totalDeltaY+=e.deltaY,this._prevWheelTime=e.timeStamp;var t={deltaX:e.deltaX,deltaY:e.deltaY};return 0===this._totalDeltaX||0===this._totalDeltaY||(Math.abs(this._totalDeltaX)>=Math.abs(3*this._totalDeltaY)&&(t.deltaY=0),Math.abs(this._totalDeltaY)>=Math.abs(3*this._totalDeltaX)&&(t.deltaX=0)),t},e.prototype._reset=function(){this._totalDeltaX=0,this._totalDeltaY=0},e}()},oIoN:function(e,t,i){"use strict";var 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:'<div class="tv-dialog__section tv-dialog__section--actions tv-dialog__section--no-border">',content:window.t("Are you sure?"),contentWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--no-border"><div class="tv-text"><p></p></div></div>',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;a<t;++a)n(e.get(a),o)&&(s=a,o=e.get(a));return{index:s,value:o}}function d(e,t,i,n,r){this._areaRight=e,this._areaLeft=t,this._pivotType=i,this._series=n,this._currentIndex=r.new_var(0),this._currentValue=r.new_var(NaN),this._pivotIndex=r.new_var(-1),this._index=u.n(r),this._isNewBar=r.symbol.isNewBar;var o=this._currentIndex.get(1),s=this._currentValue.get(1),a=this._pivotIndex.get(1);this._index>1&&(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)&&e<t},u.le=function(e,t){return u.isZero(e-t)||e<t},u.and=function(e,t){return isNaN(e)||isNaN(t)?NaN:u.isZero(e)||u.isZero(t)?0:1},u.or=function(e,t){return isNaN(e)||isNaN(t)?NaN:u.isZero(e)&&u.isZero(t)?0:1},u.not=function(e){return isNaN(e)?NaN:u.isZero(e)?1:0},u.greaterOrEqual=function(e,t){return t-e<1e-10},u.lessOrEqual=function(e,t){return e-t<1e-10},u.equal=function(e,t){return Math.abs(e-t)<1e-10},u.greater=function(e,t){return e-t>1e-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<arguments.length;a++)s+=arguments[a];return s/arguments.length},u.open=function(e){return e.symbol.open},u.high=function(e){return e.symbol.high},u.low=function(e){return e.symbol.low},u.close=function(e){return e.symbol.close},u.hl2=function(e){return(e.symbol.high+e.symbol.low)/2},u.hlc3=function(e){return(e.symbol.high+e.symbol.low+e.symbol.close)/3},u.ohlc4=function(e){return(e.symbol.open+e.symbol.high+e.symbol.low+e.symbol.close)/4},u.volume=function(e){return e.symbol.volume},u.updatetime=function(e){return e.symbol.updatetime},u.time=function(e,t,i){return e.symbol.bartime(t,i)},u.period=function(e){return e.symbol.period},u.tickerid=function(e){return e.symbol.tickerid},u.currencyCode=function(e){return e.symbol.currencyCode},u.ticker=function(e){return e.symbol.ticker},u.interval=function(e){return e.symbol.interval},u.isdwm=function(e){return e.symbol.isdwm()},u.isintraday=function(e){return!e.symbol.isdwm()},u.isdaily=function(e){return"D"===e.symbol.resolution},u.isweekly=function(e){return"W"===e.symbol.resolution},u.ismonthly=function(e){return"M"===e.symbol.resolution},u.year=function(e){return u.timepart(e.symbol,a.YEAR,arguments[1])},u.month=function(e){return u.timepart(e.symbol,a.MONTH,arguments[1])},u.weekofyear=function(e){return u.timepart(e.symbol,a.WEEK_OF_YEAR,arguments[1])},u.dayofmonth=function(e){return u.timepart(e.symbol,a.DAY_OF_MONTH,arguments[1])},u.dayofweek=function(e){return u.timepart(e.symbol,a.DAY_OF_WEEK,arguments[1])},u.hour=function(e){return u.timepart(e.symbol,a.HOUR_OF_DAY,arguments[1])},u.minute=function(e){return u.timepart(e.symbol,a.MINUTE,arguments[1])},u.second=function(e){return u.timepart(e.symbol,a.SECOND,arguments[1])},u.add_days_considering_dst=function(e,t,i){
return a.add_days_considering_dst(a.get_timezone(e),t,i)},u.selectSessionBreaks=function(e,t){if(u.isdwm(e)||void 0===e.symbol.session.timezone)return[];var i=v.newBarBuilder(e.symbol.period,e.symbol.session),n=[],r=t.length;if(i.moveTo(t[r-1]),1===r&&i.startOfBar(0)===t[0])n.push(t[0]);else{for(var o=r-2;o>=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;i<t+1;++i)if(e.get(i)>e.get(0))return 0;return 1},u.falling=function(e,t){for(var i=1;i<t+1;++i)if(e.get(i)<e.get(0))return 0;return 1},u.timepart=function(e,t,i){var n=a.utc_to_cal(e.timezone,i||e.bartime());return a.get_part(n,t)},u.rsi=function(e,t){return u.isZero(t)?100:u.isZero(e)?0:100-100/(1+e/t)},u.sum=function(e,t,i){var n=i.new_var(),r=u.nz(e.get())+u.nz(n.get(1))-u.nz(e.get(t));return n.set(r),r},u.sma=function(e,t,i){var n=u.sum(e,t,i);return u.na(e.get(t-1))?NaN:n/t},u.rma=function(e,t,i){var n=u.sum(e,t,i),r=t-1,o=e.get(r),s=i.new_var(),a=s.get(1),l=e.get(),c=u.na(o)?NaN:u.na(a)?n/t:(l+a*r)/t;return s.set(c),c},u.fixnan=function(e,t){var i=t.new_var();return isNaN(e)?i.get(1):(i.set(e),e)},u.tr=function(e,t){1===arguments.length&&(t=e,e=void 0);var i=void 0!==e&&!!e,n=t.new_var(u.close(t)),r=n.get(1);return i&&isNaN(r)&&(r=u.close(t)),u.max(u.max(u.high(t)-u.low(t),u.abs(u.high(t)-r)),u.abs(u.low(t)-r))},u.atr=function(e,t){var i=t.new_var(u.tr(t));return u.sma(i,e,t)},u.ema=function(e,t,i){var n=u.sum(e,t,i),r=i.new_var(),o=e.get(0),s=e.get(t-1),a=r.get(1),l=u.na(s)?NaN:u.na(a)?n/t:2*(o-a)/(t+1)+a;return r.set(l),l},u.wma=function(e,t,i){for(var n=0,r=t=Math.round(t);r>=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;a<t;++a){var l=e.get(a),c=t-1-a+1;n+=c,r+=l,o+=c*c,s+=l*c}var u=(t*s-n*r)/(t*o-n*n);return r/t-u*n/t+u+u*(t-1-i)},u.sar=function(e,t,i,n){var r=u.high(n),o=u.low(n),s=u.close(n),a=n.new_var(r),l=n.new_var(o),c=n.new_var(s).get(1),h=l.get(1),d=a.get(1),p=n.new_var(),_=n.new_var(),f=n.new_var(),m=n.new_var(),v=m.get(1);if(isNaN(c))return NaN;function y(t,i){var n=p.get();return _.set(t),p.set(i),f.set(e),m.set(n),n}if(isNaN(v)&&(u.ge(s,c)?(_.set(1),p.set(Math.max(r,d)),v=Math.min(o,h)):(_.set(-1),v=Math.max(r,d),p.set(Math.min(o,h))),f.set(e)),1===_.get()){if(u.gt(r,p.get())&&(p.set(r),f.set(Math.min(f.get()+t,i))),u.le(o,v))return y(-1,o)}else if(u.lt(o,p.get())&&(p.set(o),f.set(Math.min(f.get()+t,i))),u.ge(r,v))return y(1,r);var g=v+f.get()*(p.get()-v);return 1===_.get()?u.ge(g,o)&&(g=o):u.le(g,r)&&(g=r),m.set(g),g},u.alma=function(e,t,i,n){for(var r=Math.floor(i*(t-1)),o=t/n*(t/n),s=[],a=0,l=0;l<t;++l){var c=Math.exp(-1*Math.pow(l-r,2)/(2*o));a+=c,s.push(c)}for(l=0;l<t;++l)s[l]/=a;var u=0;for(l=0;l<t;++l)u+=s[l]*e.get(t-l-1);return u},u.wvap=function(e,t){return e.get()-e.get(1)},u.change=function(e){return e.get()-e.get(1)},u.roc=function(e,t){var i=e.get(t);return 100*(e.get()-i)/i},u.dev=function(e,t,i){var n=u.sma(e,t,i);return u.dev2(e,t,n)},u.dev2=function(e,t,i){for(var n=0,r=0;r<t;r++){var o=e.get(r);n+=u.abs(o-i)}return n/t},u.stdev=function(e,t,i){var n=u.variance(e,t,i);return u.sqrt(n)},u.variance=function(e,t,i){var n=u.sma(e,t,i);return u.variance2(e,n,t)},u.variance2=function(e,t,i){for(var n=0,r=0;r<i;r++){var o=e.get(r),s=u.abs(o-t);n+=s*s}return n/i},u.percentrank=function(e,t){if(u.na(e.get(t-1)))return NaN;for(var i=0,n=e.get(),r=1;r<t;r++){var o=e.get(r);u.ge(n,o)&&i++}return 100*i/t},u.createNewSessionCheck=function(e){if(void 0===e.symbol.session.timezone)return function(){return!1};var t=v.newBarBuilder(e.symbol.period,e.symbol.session);return function(e){return t.indexOfBar(e)===s.POST_SESSION&&(t.moveTo(e),!0)}},u.error=function(e){throw new n(e)},d.LOW=0,d.HIGH=1,d.prototype.isPivotFound=function(){return-1!==this._pivotIndex.get()},d.prototype.pivotIndex=function(){return this._pivotIndex.get()},d.prototype.currentValue=function(){return this._currentValue.get()},d.prototype.pivotType=function(){return this._pivotType},d.prototype.reset=function(){this._currentValue.set(NaN),this._currentIndex.set(0),this._pivotIndex.set(-1)},d.prototype.isRightSideOk=function(e){return e-this._currentIndex.get()===this._areaRight},d.prototype.isViolate=function(e,t){if(e<1||isNaN(this._currentValue.get()))return!0;var i=this._series.get(this._index-e);return!!isNaN(i)||(i===this._currentValue.get()?t:this._pivotType===d.HIGH?i>this._currentValue.get():i<this._currentValue.get())},d.prototype.processPoint=function(e){this.isViolate(e,!1)&&(this._currentValue.set(this._series.get()),this._currentIndex.set(e))},d.prototype.isRestartNeeded=function(e){
return e-this._currentIndex.get()>this._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;t<this._areaLeft;++t)if(this.isViolate(this._currentIndex.get()-1-t,!0)){e=!1;break}e&&this._pivotIndex.set(this._currentIndex.get())}}else-1!==this._pivotIndex.get()&&this._pivotIndex.set(-1);if(this.isRestartNeeded(this._index)){this.reset();for(t=0;t<=this._areaRight;++t)this.processPoint(this._index-this._areaRight+t)}},p.prototype.addPivot=function(e,t,i){this._lastIndex.set(e),this._lastVal.set(t),this._lastType.set(i)},p.prototype.updatePivot=function(e,t){this._lastIndex.set(e),this._lastVal.set(t)},p.prototype.lastPrice=function(){return this._lastVal.get()},p.prototype.lastIndex=function(){return this._lastIndex.get()},p.prototype.addPoint=function(e,t,i){if(isNaN(this._lastVal.get()))this.addPivot(e,t,i);else{var n=this._lastVal.get();if(this._lastType.get()!==i)Math.abs(n-t)/t>this._deviation&&this.addPivot(e,t,i);else(i===d.HIGH?t>n:t<n)&&this.updatePivot(e,t)}},p.prototype.processPivot=function(e){e.update(),this._isBarClosed&&e.isPivotFound()&&this.addPoint(e.pivotIndex(),e.currentValue(),e.pivotType())},u.zigzag=function(e,t,i){return new p(e,t,i).lastPrice()},u.zigzagbars=function(e,t,i){var n=new p(e,t,i);return-1===n.lastIndex()?NaN:n.lastIndex()-u.n(i)},_.prototype.new_sym=function(e,t,i,n,r){return this.symbol.script.add_sym(e,r,t,i,void 0,n)},_.prototype.select_sym=function(e){this.symbol=this.symbol.script.get_sym(e)},_.prototype.new_var=function(e){var t=this.vars;t.length<=this.vars_index&&t.push(new f(this.symbol));var i=t[this.vars_index++];return arguments.length>0&&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;t<this.vars.length;t++)this.vars[t].prepare(e);for(var i=0;i<this.ctx.length;i++)this.ctx[i].prepare(e)},_.prototype.maxAdditionalDepth=function(){for(var e=0,t=0;t<this.vars.length;t++){var i=this.vars[t].mindepth;!isNaN(i)&&i>e&&(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<e;i++)t[i]=NaN;this.hist=t,this.hist_pos=-1}this.hist_pos=Math.min(this.hist_pos+1,this.hist.length),this.hist_pos===this.hist.length&&(this.hist_pos=this.hist.length-1,this.hist.shift(),this.hist.push(NaN)),this.hist[this.hist_pos]=this.original},f.prototype.adopt=function(e,t,i){this.hist||(this.mindepth=NaN);var n=t.get(),r=e.indexOf(n);if(0!==i){var o=t.get(1);if(!u.na(o))r=r===e.indexOf(o)?-1:r}return r<0?NaN:this._get(r)},f.prototype.indexOf=function(e){if(!this.hist)return this.mindepth=NaN,-1;if(u.na(e))return-1;var t=this.hist.length,i=this.symbol.index+1,n=Math.min(t,i),o=r.upperbound_int(this.hist,e,0,n);return 0===o?-1:n-o},o(m,f),m.prototype.add_hist=function(){if(this.hist_pos=this.hist_pos+1,this.hist_pos===this.hist.length){var e=new Float64Array(2*this.hist.length);e.set(this.hist),this.hist=e}this.hist[this.hist_pos]=this.original},v.parseTicker=function(e){var t=e.indexOf(":");return-1===t?e:e.substr(t+1)},v.parsePeriod=function(e){var t,i=(e+="").slice(0);if(i.indexOf(",")>=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<n.length;s++)o(n[s],s);this.subscription=i},g.prototype.stop=function(){var e=this.subscription;if(e||this._script){for(var t=0;t<e.length;t++)g.feed.unsubscribe(e[t]);this.subscription=null,this._script.stop(),this._script=null,this.symbols=null}else console.warn("Recurring script engine stop happened.")},g.prototype.update=function(e,t){if(t){var i=this.symbols[e];if(this.isRecalculated){var n=t.bar(t.count()-1);n.isBarClosed=t.isLastBarClosed(),n.isLastBar=!0,i.lastbar(n)}else this.barsets[e]||(this.barsets[e]=t,i.set_symbolinfo(t.symbolinfo()),this.recalc())}else console.error("Unexpected barset = null")},g.prototype.recalc=function(){for(var e=this.symbols,t=0;t<e.length;t++)if(!this.barsets[t])return;for(var i=e.length-1;i>=0;i--)for(var n=e[i],r=this.barsets[i],o=r.count(),s=0;s<o;s++){var a=r.bar(s);a.isLastBar=s===o-1,a.isBarClosed=!a.isLastBar||r.isLastBarClosed(),n.lastbar(a)}
this.isRecalculated=!0,this.barsets[0]&&this.barsets[0].endOfData&&this.host.setNoMoreData(),this.host.recalc(this,{endOfData:this.barsets[0].endOfData,nextTime:this.barsets[0].nextTime})},g.feed={subscribe:function(e,t,i,n){console.error("must be initialized with setupFeed")},unsubscribe:function(e){console.error("must be initialized with setupFeed")}},b.prototype.stop=function(){this.runner.stop()},S.prototype.symbolinfo=function(){return this.info},S.prototype.isLastBarClosed=function(){return this.isBarClosed},S.prototype.setLastBarClosed=function(e){this.isBarClosed=e},S.prototype.bar=function(e){return this.bars[e]},S.prototype.count=function(){return this.bars.length},S.prototype.add=function(e,t){var i=e,n=this.bars,r=n.length,o=i.time,s=0===r?NaN:n[r-1].time;0===r||s<o?n.push(i):s===o?n[r-1]=i:console.error("time order violation, prev: "+new Date(s).toUTCString()+", cur: "+new Date(o).toUTCString()),this.isBarClosed=!!t},w.prototype.init=function(e){this.bb=v.newBarBuilder(this.period,e.symbol.session),this.bbEmptyBars=this.generateEmptyBars?v.newBarBuilder(this.period,e.symbol.session):void 0},w.prototype.extrapolate=function(e,t){return isNaN(e)||isNaN(t)?void 0:c(this.bbEmptyBars,e,t,Number.MAX_SAFE_INTEGER,!0).times},w.prototype.main=function(e){var t=e.symbol.time,i=this.bb.alignTime(t),n=e.new_var(i),r=u.na(i),o=n.get(1),s=u.na(o)?1:u.neq(i,o),a=e.new_var(),l=e.new_var(),c=e.new_var(),h=e.new_var(),d=a.get(1),p=l.get(1),_=c.get(1),f=h.get(1),m=r?NaN:s?u.open(e):d,v=r?NaN:s?u.high(e):u.max(u.high(e),p),y=r?NaN:s?u.low(e):u.min(u.low(e),_),g=r?NaN:u.close(e),b=r?NaN:s?u.volume(e):u.volume(e)+f,S=r?NaN:t,w=e.symbol.isBarClosed&&this.bb.isLastBar(0,t),P=this.generateEmptyBars&&s?this.extrapolate(o,i):void 0,C=e.new_var(u.close(e)).get(1),x=P instanceof Array?C:NaN;return a.set(m),l.set(v),c.set(y),h.set(b),[i,m,v,y,g,b,S,w,P,x]},P.prototype.main=function(e){return[u.open(e),u.high(e),u.low(e),u.close(e),u.volume(e),u.updatetime(e)]},{Std:u,Series:f,Symbol:v,SymbolInfo:function(e,t){this.timezone=e||"America/New_York",this.session=t||"0000-0000"},StudyEngine:b,BarSet:S,OHLCV:P,BarBuilder:w,setupFeed:function(e){g.feed=e}}}();e.exports=a}).call(this,i("yLpj"))},ocrj:function(e,t,i){"use strict";i.r(t),i.d(t,"RemoveSourcesCommand",(function(){return h}));var n=i("mrSG"),r=i("Eyy1"),o=i("RDU5"),s=i("CW80"),a=i("txPx"),l=i("pQ+n"),c=(i("GVHu"),i("jpZi")),u=Object(a.getLogger)("Chart.RemoveSourcesCommand"),h=function(e){function t(t,i,n){var r=e.call(this,n)||this;return r._excludeLineToolsUndoCommands=[],r._chartModel=t,r._sourceIds=Object(l.a)(t,i).map((function(e){return e.id()})),r._sourceStates=[],r._paneIndexes=[],r._priceScalePositionIds=[],r._paneStates=[],r._restorePanes=[],r}return Object(n.__extends)(t,e),t.prototype.removedIds=function(){return this._sourceIds},t.prototype.redo=function(){var e=this,t=(this._chartModel.panes().length,this._sourceIds.map((function(t){return Object(r.ensureNotNull)(e._chartModel.dataSourceForId(t))})));this._sourceStates=t.map((function(e){
return Object(r.ensureNotNull)(e.state(!1))}));var i=t.map((function(t){return Object(r.ensureNotNull)(e._chartModel.paneForSource(t))}));this._paneIndexes=i.map((function(t){return e._chartModel.panes().indexOf(t)}));var n=this._chartModel.lineToolsGroupModel(),o=new Map;t.forEach((function(e){if(Object(s.isLineTool)(e)){var t=n.groupForLineTool(e);if(null!==t){var i=o.get(t)||[];i.push(e),o.set(t,i)}}})),o.forEach((function(t,i){var n=new c.a(e._chartModel,i,t);n.redo(),e._excludeLineToolsUndoCommands.push(n)})),this._priceScalePositionIds=t.map((function(e,t){if(Object(s.isLineTool)(e))return null;var n=Object(r.ensureNotNull)(e.priceScale()),o=i[t].priceScalePosition(n);return{id:n.id(),position:o,priceScaleIndex:i[t].priceScaleIndex(n,o)}}));var a=new Set;t.forEach((function(t,i){Object(s.isLineTool)(t)||a.add(e._paneIndexes[i])})),this._paneStates=t.map((function(t,n){var r=e._paneIndexes[n];return a.has(r)?i[n].state():null})),this._restorePanes=t.map((function(t){return e._chartModel.removeSource(t)}))},t.prototype.undo=function(){for(var e=this,t=[],i=this._sourceStates.length-1;i>=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);r<o.length;r++){var s=o[r];s.startsWith("theme-")&&s!==i&&n.remove(s)}n.add(i)}(e,window)}))},okVO:function(e,t,i){"use strict";i.r(t),i.d(t,"SyncModel",(function(){return s}));var n=i("IiTo"),r=i("IDnv"),o=0,s=function(){function e(e,t){this._extrapolatedData=[],this._cacheForFuture=!1,this._modelId=o++,this._builderCache=null,this._resolution=t,this._symbolInfo=e,
this._valid=Boolean(e.timezone)&&Boolean(e.session),this._session=new n.SessionInfo(e.timezone,e.session,e.holidays,e.corrections)}return e.prototype.getSymbolInfo=function(){return this._symbolInfo},e.prototype.getSession=function(){return this._session},e.prototype.getResolution=function(){return this._resolution},e.prototype.uniqueId=function(){return this._modelId},e.prototype.distance=function(e,t){if(!this.isValid())return{success:!1};if(e>t)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=e<t;if(1e3*e===n&&this._cacheForFuture===s||(this._extrapolatedData=[1e3*e],i=1,n=null,o=null),null===n||null!==o&&1e3*t>o){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 i<a?e:this._extrapolatedData[a]/1e3},e.prototype.isValid=function(){return this._valid},e.prototype.dataSize=function(){return this._extrapolatedData.length},e.prototype._barBuilder=function(){return null===this._builderCache&&(this._builderCache=Object(n.newBarBuilder)(this._resolution,this._session,this._session)),this._builderCache},e}()},onDC:function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("Eyy1"),o=i("7MZv"),s=i("4O8T"),a=i.n(s),l=i("0YCj"),c=i.n(l),u=i("txPx"),h=window.t("Move All Scales To Left"),d=window.t("Move All Scales To Right"),p=Object(u.getLogger)("Chart.MergeAllScales");var _=i("RDU5"),f=function(e){function t(t,i,n,r,o,s){var a=e.call(this,s)||this;return a._model=t,a._paneIndex=t.panes().indexOf(i),a._targetPosition=r,a._targetIndex=o,a._scaleId=n.id(),a._sourcePosition=i.priceScalePosition(n),"overlay"!==a._sourcePosition&&(a._sourceIndex=i.priceScaleIndex(n,a._sourcePosition)),a}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this._model.panes()[this._paneIndex],t=Object(r.ensureNotNull)(e.getPriceScaleById(this._scaleId));e.movePriceScale(t,this._targetPosition,this._targetIndex),this._model.fullUpdate()},t.prototype.undo=function(){var e=this._model.panes()[this._paneIndex],t=Object(r.ensureNotNull)(e.getPriceScaleById(this._scaleId));e.movePriceScale(t,this._sourcePosition,this._sourceIndex),this._model.fullUpdate()},t
}(_.UndoCommand),m=i("CW80"),v=function(e){function t(t,i,n,r){var o=e.call(this,r)||this;return o._createdIds=[],o._model=t,o._withoutShift=n,o._origStates=i.map((function(e){return e.state(!0)})),o}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this,t=this._origStates.map((function(t,i){var n=Object(r.ensureNotNull)(e._model.dataSourceForId(t.id)),o=0===e._createdIds.length?void 0:Object(r.ensureDefined)(e._createdIds[i]),s=Object(m.cloneLineTool)(e._model,n,!e._withoutShift,o),a=Object(r.ensureNotNull)(n.priceScale());return Object(r.ensureNotNull)(e._model.paneForSource(n)).addDataSource(s,a,!1),e._model.updateSource(s),s}));0===this._createdIds.length&&(this._createdIds=t.map((function(e){return e.id()}))),this._model.setShouldBeSavedEvenIfHidden(!0)},t.prototype.undo=function(){var e=this;this._createdIds.forEach((function(t){var i=Object(r.ensureNotNull)(e._model.dataSourceForId(t));e._model.removeSource(i)}))},t.prototype.newIds=function(){return this._createdIds},t}(_.UndoCommand),y=i("ocrj"),g=i("jpZi"),b=i("Ltzl"),S=i("HGup"),w=i("jRfx"),P=i("s1Gx"),C=function(e){function t(t,i,n,r,o){void 0===o&&(o=!0);var s=e.call(this,"Create line "+n,!1)||this;return s._lineId=null,s._lineState=null,s._model=t,s._paneIndex=t.panes().indexOf(i),s._lineTool=n,s._ownerSourceId=r.id(),s._needCopyToOtherCharts=o,s}return Object(n.__extends)(t,e),t.prototype.startCreatingLine=function(e,t,i){var n=this._model.panes()[this._paneIndex],r=this._model.dataSourceForId(this._ownerSourceId),o=this._model.createLineTool(n,e,this._lineTool,t,i,r);return this._lineId=o.id(),!this._model.lineBeingCreated()},t.prototype.continueCreatingLine=function(e,t,i,n){var r=this._model.continueCreatingLine(e,t,i,n);return r&&this._model.setShouldBeSavedEvenIfHidden(!0),r},t.prototype.line=function(){return null===this._lineId?null:this._model.dataSourceForId(this._lineId)},t.prototype.undo=function(){var e=Object(r.ensureNotNull)(this.line());this._lineState=e.state(!1),this._model.removeSource(e),this._lineId=null},t.prototype.redo=function(){var e=this._model.restoreSource(!1,this._paneIndex,null,Object(r.ensureNotNull)(this._lineState),null);this._lineId=e.id(),this._lineState=null},t.prototype.needCopyToOtherCharts=function(){return this._needCopyToOtherCharts},t}(_.UndoCommand),x=i("GVQo"),T=function(e){function t(t,i,n){var o=e.call(this,n)||this;return o._sourcesByPanes=new Map,o._originalState=new Map,o._model=t,i.forEach((function(e){var i=Object(r.ensureNotNull)(t.paneForSource(e)),n=t.panes().indexOf(i),s=o._sourcesByPanes.get(n)||[];s.push(e.id()),o._sourcesByPanes.set(n,s)})),Array.from(o._sourcesByPanes.keys()).forEach((function(e){var i=t.panes()[e],n=new Map;i.allOrderedSources().forEach((function(e){n.set(e.id(),e.zorder())})),o._originalState.set(e,n)})),o}return Object(n.__extends)(t,e),t.prototype.undo=function(){var e=this;this._originalState.forEach((function(t,i){var n=e._model.panes()[i],o=new Map;t.forEach((function(e,t){var i=Object(r.ensureNotNull)(n.dataSourceForId(t));o.set(i,e)})),n.setZOrders(o)
}))},t.prototype.redo=function(){var e=this;this._sourcesByPanes.forEach((function(t,i){var n=e._model.panes()[i],o=t.map((function(e){return Object(r.ensureNotNull)(n.dataSourceForId(e))}));e._paneOperation(n,o)}))},t}(_.UndoCommand),I=function(e){function t(t,i){return e.call(this,t,i,"Bring "+i[0].title()+" to front")||this}return Object(n.__extends)(t,e),t.prototype._paneOperation=function(e,t){e.bringToFront(t)},t}(T),M=function(e){function t(t,i){return e.call(this,t,i,"Send "+i[0].title()+" to back")||this}return Object(n.__extends)(t,e),t.prototype._paneOperation=function(e,t){e.sendToBack(t)},t}(T),L=function(e){function t(t,i,n,r){var o=e.call(this,t,i,r)||this;return o._targetSource=n,o}return Object(n.__extends)(t,e),t.prototype._paneOperation=function(e,t){e.insertAfter(t,this._targetSource)},t}(T),O=function(e){function t(t,i,n){return e.call(this,t,i,n,"Insert "+i[0].title()+" after "+n.title())||this}return Object(n.__extends)(t,e),t}(L),k=function(e){function t(t,i,n,r){var o=e.call(this,t,i,r)||this;return o._targetSource=n,o}return Object(n.__extends)(t,e),t.prototype._paneOperation=function(e,t){e.insertBefore(t,this._targetSource)},t}(T),A=function(e){function t(t,i,n){return e.call(this,t,i,n,"Insert "+i[0].title()+" before "+n.title())||this}return Object(n.__extends)(t,e),t}(k);function E(e,t){var i=t[0],n=e.orderedSources().filter((function(e){return e.zorder()<i.zorder()}));if(0===n.length)throw new Error("Cannot move backward source that alreadt on back");var r=n[n.length-1];if(Object(m.isLineTool)(r)){var o=e.model().lineToolsGroupModel().groupForLineTool(r);null!==o&&(r=o.lineTools()[0])}return r}var V=function(e){function t(t,i,n){return e.call(this,t,n,E(i,n),"Send "+n[0].title()+" backward")||this}return Object(n.__extends)(t,e),t}(k);function D(e,t){var i=t[t.length-1],n=e.allOrderedSourcesWithoutSpecial().filter((function(e){return e.zorder()>i.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<e&&this._dstIndex>=0&&this._dstIndex<e},t}(_.UndoCommand),H=i("XcdR"),z=i("Fixu"),U=i("Ocx9"),G=i("n5al"),Y=i("PT1i"),q=i("pPtI"),K=function(e){function t(t,i,n,r,o,s){var a=e.call(this,r)||this;return a._prevPriceAxisProps={},a._property=t,a._mainSeries=n,a._value=i,a._model=o,a._chartWidget=s,a}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this._mainSeries,t=e.properties();t.style===this._property&&e.isNeedRestart(this._value)&&this._chartWidget.screen.show(),this._prevResolution=t.interval.value(),this._prevValue=this._property.value(),this._storePriceAxisProps(),Object(U.saveDefaultProperties)(!0);var i=t.interval.value(),n=this._model.defaultResolutions(),r=Object(q.getResolutionByChartStyle)(this._value,i,n);Y.linking.interval.setValue(r),e.setChartStyleWithIntervalIfNeeded(this._value,r),Object(G.setLastUsedStyle)(this._value),Object(G.preparePriceAxisProperties)(t),Object(U.saveDefaultProperties)(!1),this._invalidateModel()},t.prototype.undo=function(){var e=this._mainSeries;e.properties().style===this._property&&e.isNeedRestart(this._value)&&this._chartWidget.screen.show(),Object(U.saveDefaultProperties)(!0),e.setChartStyleWithIntervalIfNeeded(this._prevValue,this._prevResolution),this._restorePriceAxisProps(),Y.linking.interval.setValue(this._prevResolution),Object(U.saveDefaultProperties)(!1),this._invalidateModel()},t.prototype._storePriceAxisProps=function(){var e=this._mainSeries.priceScale();this._prevPriceAxisProps=e.mode()},t.prototype._restorePriceAxisProps=function(){this._mainSeries.priceScale().setMode(this._prevPriceAxisProps)},t.prototype._invalidateModel=function(){this._model&&(this._model.recalculateAllPanes(),this._model.lightUpdate())},t}(_.UndoCommand),Z=i("ufwo"),J=function(e){function t(t,i){var n=e.call(this,"Change date range")||this;return n._modelsData=[],n._rangeOptions=i,n._modelsData.push({model:t,prevResolution:t.mainSeries().properties().interval.value(),barSpacing:t.timeScale().barSpacing(),rightOffset:t.timeScale().rightOffset(),rangeOptions:t.undoModel().appliedTimeFrame().value()}),n}return Object(n.__extends)(t,e),t.prototype.redo=function(){for(var e=[],t=0,i=this._modelsData;t<i.length;t++){var n=i[t].model.mainSeries(),r=n.properties().interval;this._rangeOptions.res!==r.value()?(e.push(r),n.setDefaultTimeframe(this._rangeOptions.val),r.setValueSilently(this._rangeOptions.res)):n.loadDataTo(this._rangeOptions.val)}for(var o=0,s=e;o<s.length;o++){(r=s[o]).listeners().fire(r)}},t.prototype.undo=function(){for(var e=[],t=0,i=this._modelsData;t<i.length;t++){var n=i[t],r=n.model.mainSeries(),o=r.properties().interval;n.prevResolution!==o.value()?(e.push(o),null!==n.rangeOptions&&r.setDefaultTimeframe(n.rangeOptions.val),o.setValueSilently(n.prevResolution)):null!==n.rangeOptions&&r.loadDataTo(n.rangeOptions.val);var s=n.model.timeScale()
;s.setBarSpacing(n.barSpacing),s.setRightOffset(n.rightOffset)}for(var a=0,l=e;a<l.length;a++){(o=l[a]).listeners().fire(o)}},t.prototype.canMerge=function(e){return e instanceof t&&Object(Z.rangesAreEqual)(e._rangeOptions,this._rangeOptions)},t.prototype.merge=function(e){if(!(e instanceof t))throw new Error("Invalid command to merge");this._modelsData=this._modelsData.concat(e._modelsData)},t}(_.UndoCommand),X=i("//lZ"),Q=i("UqOQ"),$=(i("YFKU"),i("HbRj"),function(e){function t(t,i,n){var r=e.call(this,n)||this;return r._model=t,r._groupId=i.id,r._groupName=i.name(),r._lineToolsIds=i.lineTools().map((function(e){return e.id()})),r}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=Object(r.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId));this._model.lineToolsGroupModel().removeGroup(e)},t.prototype.undo=function(){var e=this,t=this._lineToolsIds.map((function(t){return e._model.dataSourceForId(t)})),i=new Q.a(t,this._groupName,this._groupId);this._model.lineToolsGroupModel().addGroup(i)},t}(_.UndoCommand)),ee=window.t("Create line tools group"),te=function(e){function t(t,i){var n=e.call(this,ee)||this;return n._groupId=null,n._model=t,n._sourcesIds=i.map((function(e){return e.id()})),n}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this,t=this._sourcesIds.map((function(t){return e._model.dataSourceForId(t)})),i=null===this._groupId?void 0:this._groupId;this._groupId=this._model.lineToolsGroupModel().createGroup(t,this._title,i).id},t.prototype.undo=function(){var e=Object(r.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(Object(r.ensureNotNull)(this._groupId)));this._model.lineToolsGroupModel().removeGroup(e)},t.prototype.createdGroupId=function(){return this._groupId},t}(_.UndoCommand),ie=window.t("Add line tool(s) {lineTool} to group {group}"),ne=function(e){function t(t,i,n){var r=e.call(this,ie.format({group:i.name()}))||this;return r._model=t,r._groupId=i.id,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.addLineTools(i)},t.prototype.undo=function(){var e=this,t=this._lineToolsIds.map((function(t){return e._model.dataSourceForId(t)}));Object(r.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId)).excludeLineTools(t)},t}(_.UndoCommand),re=i("bJYc"),oe=function(e){function t(t,i,n,r){var o=e.call(this,r)||this;return o._chartModel=t,o._groupId=i.id,o._oldName=i.name(),o._newName=n,o}return Object(n.__extends)(t,e),t.prototype.redo=function(){Object(r.ensureNotNull)(this._chartModel.lineToolsGroupModel().groupForId(this._groupId)).setName(this._newName)},t.prototype.undo=function(){Object(r.ensureNotNull)(this._chartModel.lineToolsGroupModel().groupForId(this._groupId)).setName(this._oldName)},t
}(_.UndoCommand),se=i("mMWL"),ae=window.t("Create line tools group from selection"),le=window.t("Removing line tools group {name}"),ce=window.t("Add line tool {lineTool} to group {name}"),ue=window.t("Make group {group} visible"),he=window.t("Make group {group} invisible"),de=window.t("Lock group {group}"),pe=window.t("Unlock group {group}"),_e=window.t("Rename group {group} to {newName}"),fe=function(){function e(e){this._environment=e}return e.prototype.createGroupFromSelection=function(){var e=this,t=this._environment.model();Object(r.assert)(!t.selection().isEmpty(),"Cannot create group from empty selection");var i=Object(P.sortSources)(t.selection().sources());Object(r.assert)(i.every((function(e){return Object(m.isLineTool)(e)})),"A group could contain line tools only");var n=i.reduce((function(e,t){return e.zorder()>t.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;h<u.length;++h)t.removeSource(u[h]);var d=e.panes;for(s=0;s<d.length;s++){var p=!1,_=d[s];for(l=0;l<_.sources.length;l++){"MainSeries"===(c=_.sources[l]).type&&(delete c.state,p=!0)}var f;if((f=p?r[s]:t.createPane(s)).restoreState(d[s],!1,e.version),null!==f.mainDataSource()){if(p){var v=t.mainSeries(),y=v.priceScale(),g=f.orderedSources();for(h=0;h<g.length;h++){var c=g[h];Object(m.isLineTool)(c)&&c.ownerSource()===v&&(c.setPriceScale(y),y.addDataSource(c))}}}else t.removePane(f)}return t.syncESD(),i.priceScale().setMode({autoScale:!0}),t.setVersion(e.version),t.startNotStartedStudies(),t.recalculateAllPanes(),t.fullUpdate(),u},t}(_.UndoCommand),be=i("aO4+"),Se=i("e3/o"),we=i("/tGj"),Pe=Object(u.getLogger)("Chart.ChartUndoModel"),Ce=function(e){function t(t,i,n){var o=e.call(this,"Paste Drawing")||this;return o._needCopyToOtherCharts=!1,o._sourceState=null,o._model=t,o._clipboardData=i,o._paneIndex=o._model.panes().indexOf(n||Object(r.ensureNotNull)(o._model.paneForSource(o._model.mainSeries()))),o}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this._model.panes()[this._paneIndex],t=Object(r.ensureNotNull)(e.clipboardLineToolOwnerSource(this._clipboardData.source.id));null===this._sourceState&&(this._sourceState=this._getSourceState(t));var i=e.restoreLineTool(this._sourceState,!1,!1),n=Object(r.ensureNotNull)(t.priceScale());i.setOwnerSource(t),i.setPriceScale(n),n.addDataSource(i),i.restoreFixedPoints(),i.calcIsActualSymbol(),i.createServerPoints();var o=Object(we.isSymbolSource)(t)||t.metaInfo().is_price_study;this._needCopyToOtherCharts=Boolean(o&&(Object(se.drawOnAllCharts)().value()||i.linkKey&&i.isSynchronizable())),this._model.setShouldBeSavedEvenIfHidden(!0)},t.prototype.undo=function(){if(this._sourceState){var e=this.source();this._model.removeSource(e)}else Pe.logError("This command was never executed - nothing to undo")},t.prototype.source=function(){return Object(r.ensureNotNull)(this._model.dataSourceForId(Object(r.ensureNotNull)(this._sourceState).id))},t.prototype.needCopyToOtherCharts=function(){return this._needCopyToOtherCharts},t.prototype._getSourceState=function(e){var t=Object(j.clone)(this._clipboardData.source);delete t.state.symbol,null!=t.linkKey&&(t.linkKey=Object(Se.randomHash)());var i=Object(r.ensureNotNull)(e.priceScale()),n=this._model,o=!1
;this._clipboardData.source.state.symbol===Object(r.ensureNotNull)(e.symbolSource()).symbol()&&(Object(we.isSymbolSource)(e)?o=!0:Object(me.isStudy)(e)&&(o=Boolean(e.metaInfo().is_price_study)));var s,a,l,c=Object(r.ensureNotNull)(e.firstValue());if(this._model.id()===this._clipboardData.modelId||!o)for(var u=0;u<this._clipboardData.geometry.length;++u){var h=(s=this._clipboardData.geometry[u],a=void 0,l=void 0,a=s.x*n.timeScale().width(),l=s.y*i.height()-40,new be.Point(a,l)),d=n.timeScale().coordinateToIndex(h.x),p=n.timeScale().normalizeBarIndex(d);if(o){var _=i.priceToCoordinate(t.points[u].price,c)+-40;p.price=i.coordinateToPrice(_,c)}else p.price=i.coordinateToPrice(h.y,c);t.points[u]=p}return t.id=Object(Se.guid)(),t},t}(_.UndoCommand),xe=i("xo8u"),Te=i("/ToI"),Ie=function(e){function t(t,i,n){var r=e.call(this,"Change Symbol")||this;r._newSymbol=t;var o=i.model().mainSeries();return r._prevSymbol=o.symbol(),r._prevCurrency=n?o.currency():null,r._chartWidget=i,r._changeCurrencyToOriginal=n,r}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._chartWidget.screen.show(),this._changeCurrencyToOriginal&&this._currencyProperty().setValue(null),this._symbolProperty().setValue(this._newSymbol,!1)},t.prototype.undo=function(){this._chartWidget.screen.show(),this._changeCurrencyToOriginal&&this._currencyProperty().setValue(this._prevCurrency),this._symbolProperty().setValue(this._prevSymbol,!1)},t.prototype._symbolProperty=function(){return this._mainSeries().properties().symbol},t.prototype._currencyProperty=function(){return this._mainSeries().properties().currencyId},t.prototype._mainSeries=function(){return this._chartWidget.model().mainSeries()},t}(_.UndoCommand),Me=i("JWMC"),Le=i("gaBL"),Oe=Object(u.getLogger)("Chart.ChartUndoModel"),ke=function(e){function t(t,i,n){var r=e.call(this,"Paste Indicator")||this;return r._sourceState=null,r._model=t,r._clipboardData=i,r._paneId=n,r}return Object(n.__extends)(t,e),t.prototype.redo=function(){if(!this._sourceState){var e=Object(j.clone)(this._clipboardData.source);e.id=Object(Se.guid)(),this._sourceState=e}var t,i,n=!(t=this._paneId?Object(r.ensureNotNull)(this._model.paneForId(this._paneId)):this._sourceState.metaInfo.is_price_study?Object(r.ensureNotNull)(this._model.paneForSource(this._model.mainSeries())):this._model.createPane()).mainDataSource(),o=t.restoreStudy(this._sourceState);o.metaInfo().linkedToSeries&&o.setOwnerSource(this._model.mainSeries()),n||(i=this._sourceState.metaInfo.is_price_study?i=this._model.mainSeries().priceScale():this._paneId?t.findSuitableScale(o):t.defaultPriceScale())!==o.priceScale()&&t.move(o,i),o.start()},t.prototype.undo=function(){if(null!==this._sourceState){var e=Object(r.ensureNotNull)(this._model.dataSourceForId(this._sourceState.id));this._model.removeSource(e)}else Oe.logError("This command was never executed - nothing to undo")},t.prototype.state=function(){return this._sourceState},t}(_.UndoCommand),Ae=function(e){function t(t,i,n,r,o){var s=e.call(this,"",!1)||this;return s._model=t,s._paneA=i,s._paneB=n,
s._prevStretchA=r,s._currStretchA=o,s}return Object(n.__extends)(t,e),t.prototype.redo=function(){var e=this._paneA.stretchFactor()+this._paneB.stretchFactor();this._paneA.setStretchFactor(this._currStretchA),this._paneB.setStretchFactor(e-this._currStretchA),this._model.fullUpdate()},t.prototype.undo=function(){var e=this._paneA.stretchFactor()+this._paneB.stretchFactor();this._paneA.setStretchFactor(this._prevStretchA),this._paneB.setStretchFactor(e-this._prevStretchA),this._model.fullUpdate()},t}(_.UndoCommand),Ee=i("KnF9"),Ve=function(e){function t(t,i,n,r){var o=e.call(this,"Move",!1)||this;return o._endEvent=null,o._model=t,o._sourceId=i.id(),o._itemIndex=n,o._startEvent=r,o}return Object(n.__extends)(t,e),t.prototype.move=function(e){this._endEvent=e,this._move(e)},t.prototype.hasChanges=function(){return null!==this._endEvent},t.prototype.undo=function(){this._move(this._startEvent)},t.prototype.redo=function(){this._move(Object(r.ensureNotNull)(this._endEvent))},t.prototype._move=function(e){var t=Object(r.ensureNotNull)(this._model.dataSourceForId(this._sourceId));Object(r.assert)(void 0!==t.moveItem,'The method "moveItem" is not defined'),t.moveItem&&t.moveItem(new be.Point(e.localX,e.localY),this._itemIndex,new Ee.EnvironmentState(e))},t}(_.UndoCommand);i.d(t,"ChartUndoModelBase",(function(){return We}));var De=window.t("Send {title} backward"),Be=window.t("Bring {title} forward"),Re=window.t("Insert {title} after {target}"),Ne=window.t("Insert {title} before {target}"),Fe=window.t("Create {name} line tool");function je(e,t){return{bringForwardEnabled:e.bringForwardEnabled||t.bringForwardEnabled,bringToFrontEnabled:e.bringToFrontEnabled||t.bringToFrontEnabled,sendBackwardEnabled:e.sendBackwardEnabled||t.sendBackwardEnabled,sendToBackEnabled:e.sendToBackEnabled||t.sendToBackEnabled}}var We=function(e){function t(t){var i=e.call(this)||this;return i._createLineCommand=null,i._initialTimeScrollState=null,i._initialTimeScrollPos=null,i._currentLineMoveCommand=null,i._currentLineChangeCommand=null,i._currentCustomMoveCommand=null,i._undoHistory=t,i._lineToolsGroupController=new fe({model:i._model.bind(i),pushUndoCommand:i._pushUndoCommand.bind(i),beginUndoMacro:i._undoHistory.beginUndoMacro.bind(i._undoHistory),endUndoMacro:i._undoHistory.endUndoMacro.bind(i._undoHistory),emitEvent:i.emitEvent.bind(i)}),i}return Object(n.__extends)(t,e),t.prototype.undoHistory=function(){return this._undoHistory},t.prototype.lineToolsGroupController=function(){return this._lineToolsGroupController},t.prototype.mergeAllScales=function(e){!function(e,t){e.beginUndoMacro("left"===t?h:d),e.model().panes().forEach((function(i){var n="left"===t?i.rightPriceScales():i.leftPriceScales(),r=("left"===t?i.leftPriceScales():i.rightPriceScales()).concat(n),o="overlay"===i.priceScalePosition(i.defaultPriceScale())?r[0]:i.defaultPriceScale();e.movePriceScale(i,o,t,0),r.forEach((function(t){if(t!==o)for(var n=t.mainSource();null!==n;){e.moveToScale(n,i,o,"",!0);var r=t.mainSource();if(r===n){
p.logError("Loop detected while trying to merge scales");break}n=r}}))})),e.endUndoMacro(),e.model().fullUpdate()}(this,e)},t.prototype.movePriceScale=function(e,t,i,n){var r=new f(this._model(),e,t,i,n,window.t("Move scale"));this._pushUndoCommand(r)},t.prototype.createLineTool=function(e,t,i,n,s,a,l){var c=Fe.format({name:i});if(("LineToolRegressionTrend"===i||"LineToolAnchoredVWAP"===i)&&!this.canCreateStudy())return Object(o.showTooManyStudiesNotice)(),null;this.beginUndoMacro(c);var u=!l;this._createLineCommand=new C(this._model(),e,i,a||Object(r.ensureNotNull)(e.mainDataSource()),u);var h=this._createLineCommand.startCreatingLine(t,n,s||null),d=Object(r.ensureNotNull)(this._createLineCommand.line()),p=null;if(h&&(u&&this.finishLineTool(d),this._pushUndoCommand(this._createLineCommand),this._createLineCommand=null,p={points:d.normalizedPoints(),interval:this.mainSeries().interval()}),u&&void 0===s&&Object(se.drawOnAllCharts)().value()&&d.isSynchronizable()){var _=Object(r.ensureNotNull)(this.model().externalTimeStamp(t.index)),f={point:{price:t.price,timeStamp:_},linetool:i,properties:d.properties(),symbol:this.mainSeries().symbol(),model:this.model(),linkKey:Object(r.ensureNotNull)(d.getLinkKey()),finalState:p};d.isFixed()&&(f.pointPositionPercents=d.calcPositionPercents()[0]),Object(se.createLineTool)(f)}return this.endUndoMacro(),d},t.prototype.continueCreatingLine=function(e,t,i,n){var o=Object(r.ensureNotNull)(this._createLineCommand);this.beginUndoMacro(o.text());var s=Object(r.ensureNotNull)(this._model().lineBeingCreated()),a=o.continueCreatingLine(e,t,i,n),l=null;if(a&&(this.finishLineTool(s),this._pushUndoCommand(o),this._createLineCommand=null,l={points:s.normalizedPoints(),interval:this.mainSeries().interval()}),o.needCopyToOtherCharts()&&Object(se.drawOnAllCharts)().value()&&s.isSynchronizable()){var c=Object(r.ensureNotNull)(this._model().externalTimeStamp(e.index));Object(se.continueLineTool)({point:{price:e.price,timeStamp:c},envState:t,finalState:l,model:this._model()})}return this.endUndoMacro(),a},t.prototype.continueExternalLine=function(e,t,i){var n=Object(r.ensureNotNull)(this._createLineCommand),o=n.continueCreatingLine(e,t,i);return o&&(this._pushUndoCommand(n),this._createLineCommand=null),o},t.prototype.finishLineTool=function(e){this._model().finishLineTool(e)},t.prototype.loadRange=function(e){this._pushUndoCommand(new J(this._model(),e))},t.prototype.withMacro=function(e,t){var i=this.beginUndoMacro(e);try{t()}finally{this.endUndoMacro()}return i},t.prototype.canZoomIn=function(){return this.model().canZoomIn()},t.prototype.canZoomOut=function(){return this.model().canZoomOut()},t.prototype.zoomOut=function(){var e=this,t=this.timeScale().width();if(this.canZoomOut()){try{this.beginUndoMacro("Zoom Out")}catch(i){return}Object(X.doAnimate)({to:t/5,onStep:function(t){e.startScaleTime(0),e.scaleTimeTo(t),e.endScaleTime()},onComplete:function(){return e.endUndoMacro()}})}},t.prototype.zoomIn=function(){var e=this,t=this.timeScale().width();if(this.canZoomIn()){try{
this.beginUndoMacro("Zoom In")}catch(i){return}Object(X.doAnimate)({to:t/5,onStep:function(t){e.startScaleTime(t),e.scaleTimeTo(0),e.endScaleTime()},onComplete:function(){return e.endUndoMacro()}})}},t.prototype.startMovingSources=function(e,t,i,n){e.filter((function(e){return e.doesMovingAffectsUndo()})).length&&(this._currentLineMoveCommand=new b.SaveLineToolStateUndoCommand(this.model(),e,"Move Drawing(s)",!1)),this.model().startMovingSources(e,t,i,new Map,n)},t.prototype.moveSources=function(e,t){this.model().moveSources(e,new Map,t)},t.prototype.endMovingSource=function(e){this.model().endMovingSources(e),null!==this._currentLineMoveCommand&&(this._currentLineMoveCommand.saveNewState(),this._pushUndoCommand(this._currentLineMoveCommand)),this._currentLineMoveCommand=null},t.prototype.startChangingLinetool=function(e,t,i,n,r){this._currentLineChangeCommand=new b.SaveLineToolStateUndoCommand(this.model(),[e],"Change "+i+"point",!1),this.model().startChangingLinetool(e,t,i,n,r)},t.prototype.changeLinePoint=function(e,t){this.model().changeLinePoint(e,t)},t.prototype.endChangingLinetool=function(e){this.model().endChangingLinetool(e),null!==this._currentLineChangeCommand&&(this._currentLineChangeCommand.saveNewState(),this._pushUndoCommand(this._currentLineChangeCommand)),this._currentLineChangeCommand=null},t.prototype.setChartStyleProperty=function(e,t,i){if(e.value()!==t){var n=new K(e,t,this.mainSeries(),i,this.model(),this.chartWidget());this._pushUndoCommand(n),this.emitEvent("setChartStyleProperty"),Object(z.a)(e.value())}},t.prototype.copySourcesToClip=function(e){var t=Object(x.clipboardDataForSources)(this._model().id(),e);return null!==t&&(Object(x.set)(t),!0)},t.prototype.applyStudyTemplate=function(e,t){var i=new ge(this._model(),e,t);this._pushUndoCommand(i)},t.prototype.startCustomMoving=function(e,t,i){this._currentCustomMoveCommand=new Ve(this.model(),e,t,i)},t.prototype.customMoveBeingProcessed=function(){return null!==this._currentCustomMoveCommand},t.prototype.processCustomMove=function(e){Object(r.ensureNotNull)(this._currentCustomMoveCommand).move(e)},t.prototype.endCustomMoving=function(){null!==this._currentCustomMoveCommand&&this._currentCustomMoveCommand.hasChanges()&&(this._pushUndoCommand(this._currentCustomMoveCommand),this._currentCustomMoveCommand=null)},t.prototype.cloneLineTools=function(e,t){for(var i=this,n=0;n<Math.min(5,e.length);++n)Object(z.b)(e[n]);this.beginUndoMacro(window.t("Clone line tools"));var o=new v(this._model(),e,t,window.t("Clone line tools"));if(this._pushUndoCommand(o),Object(se.drawOnAllCharts)().value()){var s=o.newIds().map((function(e){return Object(r.ensureNotNull)(i.model().dataSourceForId(e))}));this.copyToOtherCharts(s)}return this.endUndoMacro(),this.emitEvent("cloneLineTools"),o.newIds()},t.prototype.removeSource=function(e,t,i){if(this.lineBeingCreated()!==e){var n="Remove "+e.title();this.removeSources([e],t,n,i)}else this.cancelCreatingLine()},t.prototype.removeSelectedSources=function(){var e=this._model().selection().sources();if(e.length){
var t=e.length>1?"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);u<h.length;u++){l(h[u])}return s},t.prototype.sendToBack=function(e){if(!this.availableZOrderOperations(e).sendToBackEnabled)throw new Error("Send to back operation is unavailable");var t=null,i=e[0];if(Object(m.isLineTool)(i)){var n=this._model().lineToolsGroupModel().groupForLineTool(i);if(null!==n){var r=n.lineTools();t=new A(this.model(),Object(P.sortSources)(e),r[0])}}null===t&&(t=new M(this.model(),Object(P.sortSources)(e))),
this._pushUndoCommand(t),this.emitEvent("changeZOrder",[e])},t.prototype.bringToFront=function(e){if(!this.availableZOrderOperations(e).bringToFrontEnabled)throw new Error("Bring to front operation is unavailable");var t=null,i=e[0];if(Object(m.isLineTool)(i)){var n=this._model().lineToolsGroupModel().groupForLineTool(i);if(null!==n){var r=n.lineTools();t=new O(this.model(),Object(P.sortSources)(e),r[r.length-1])}}null===t&&(t=new I(this.model(),Object(P.sortSources)(e))),this._pushUndoCommand(t),this.emitEvent("changeZOrder",[e])},t.prototype.sendBackward=function(e){var t=this;if(!this.availableZOrderOperations(e).sendBackwardEnabled)throw new Error("Send backward operation is unavailable");var i=De.format({title:e[0].title()});this._sendBackOrBringForward(i,Object(P.sortSources)(e),(function(e,i){return new V(t.model(),e,i)}))},t.prototype.bringForward=function(e){var t=this;if(!this.availableZOrderOperations(e).bringForwardEnabled)throw new Error("Bring forward operation is unavailable");var i=Be.format({title:e[0].title()});this._sendBackOrBringForward(i,Object(P.sortSources)(e),(function(e,i){return new B(t.model(),e,i)}))},t.prototype.insertAfter=function(e,t){var i=this;e=Object(P.sortSources)(e);var n=Re.format({title:e[0].title(),target:t.title()});this._insertAfterOrBefore(n,e,t,(function(){return new O(i.model(),e,t)}))},t.prototype.insertBefore=function(e,t){var i=this;e=Object(P.sortSources)(e);var n=Ne.format({title:e[0].title(),target:t.title()});this._insertAfterOrBefore(n,e,t,(function(){return new A(i.model(),e,t)}))},t.prototype.detachToRight=function(e,t){Object(Me.trackEvent)("Chart","Move to new right scale");var i=window.t("Move {title} To New Price Scale").format({title:e.title()}),n=new Te.b(this.model(),e,t,"right",i);this._pushUndoCommand(n),this.emitEvent("moveSource",[e])},t.prototype.detachToLeft=function(e,t){Object(Me.trackEvent)("Chart","Move to new left scale");var i=window.t("Move {title} To New Left Scale").format({title:e.title()}),n=new Te.b(this.model(),e,t,"left",i);this._pushUndoCommand(n),this.emitEvent("moveSource",[e])},t.prototype.detachNoScale=function(e,t){Object(Me.trackEvent)("Chart","Make source no scale");var i=window.t("Make {title} No Scale (Full Screen)").format({title:e.title()}),n=new Te.b(this.model(),e,t,"overlay",i);this._pushUndoCommand(n),this.emitEvent("moveSource",[e])},t.prototype.moveToScale=function(e,t,i,n,r){Object(Me.trackEvent)("Chart","Move source to target scale"),this.beginUndoMacro(n);var o=new Te.a(this.model(),e,t,i,n),s=r?null:Object(Le.sourceNewCurrencyOnPinningToPriceScale)(e,i,this._model());this._pushUndoCommand(o),null!==s&&this.setPriceScaleCurrency(i,s),this.endUndoMacro(),this.emitEvent("moveSource",[e])},t.prototype.startScrollTime=function(e){var t=this.timeScale();this._initialTimeScrollState={rightOffset:t.rightOffset(),barSpacing:t.barSpacing()},this._initialTimeScrollPos=e,this.model().startScrollTime(e)},t.prototype.scrollTimeTo=function(e){var t=!1
;return null!==this._initialTimeScrollPos&&null!==this._initialTimeScrollState&&Math.abs(e-this._initialTimeScrollPos)>20&&(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<u.length;l++){var h=u[l];if("drawing"===h.type&&null!==o.clipboardLineToolOwnerSource(h.source.id)){var d=this.pasteLineTool(o,h);s<5&&(Object(z.d)(d),s+=1),a.push(d)}else"study"===h.type&&h.source&&h.source.metaInfo&&this.checkIfFeatureAvailable(new c.a(h.source.metaInfo))&&a.push(this.pasteStudy(h,i?e:void 0))}return this.endUndoMacro(),a},t.prototype.pasteLineTool=function(e,t){var i=new Ce(this.model(),t,e);this._pushUndoCommand(i);var n=i.source();return i.needCopyToOtherCharts()&&this.copyToOtherCharts([n]),n},t.prototype.pasteStudy=function(e,t){var i=new ke(this.model(),e,null==t?void 0:t.id());this._pushUndoCommand(i);var n=Object(r.ensureNotNull)(i.state()).id;return Object(r.ensureNotNull)(this._model().dataSourceForId(n))},t.prototype.setPriceScaleCurrency=function(e,t){var i=new xe.a(e,t,this.chartWidget(),"Change currency");this._pushUndoCommand(i)},t.prototype.setMainSeriesSymbol=function(e){if(this.mainSeries().symbol()!==e){var t=!1;if(this._model().currencyLabelEnabled()&&null!==this.mainSeries().currency()){var i=this._model().availableCurrenciesSet(),n=this.mainSeries().priceScale().currency(i);t=null===n||!n.readOnly&&(null===n.selectedCurrency||n.allCurrenciesAreOriginal||1===n.symbolSourceCount)}this._pushUndoCommand(new Ie(e,this.chartWidget(),t))}},t.prototype.copyToOtherCharts=function(e){var t=this,i=this.mainSeries(),o=i.syncModel(),s=this.timeScale();if(o)for(var a=0,l=e;a<l.length;a++){
var c=l[a],u=c.linkKey||Object(Se.randomHash)();c.linkKey=u;var h=c.state(!1),d=c.normalizedPoints().map((function(e){var i=Object(r.ensureNotNull)(s.timePointToIndex(e.time_t))+e.offset;return{price:e.price,timeStamp:Object(r.ensureNotNull)(t.model().externalTimeStamp(i))}})),p=Object(n.__assign)(Object(n.__assign)({},h),{linkKey:u,points:d,linetool:c.getType(),model:this.model(),symbol:i.symbol(),finalState:{points:c.normalizedPoints(),interval:i.interval()}});c.isFixed()&&(p.pointPositionPercents=c.calcPositionPercents()),Object(se.copyLineTool)(p)}},t.prototype.addPaneStretchFactorUndoCommand=function(e,t,i,n){var r=new Ae(this.model(),e,t,i,n);this._pushUndoCommand(r)},t.prototype.appliedTimeFrame=function(){return this._appliedTimeFrame.appliedTimeFrame()},t.prototype._mergeUnmergeSource=function(e,t){var i=this;this.beginUndoMacro(t.text());var n=Object(r.ensureNotNull)(this._model().paneForSource(e)),o=new Set(n.orderedSources().filter((function(t){return Object(m.isLineTool)(t)&&t.ownerSource()===e})));this._model().lineToolsGroupModel().groups().filter((function(e){var t=e.lineTools().some((function(e){return o.has(e)})),i=e.lineTools().some((function(e){return!o.has(e)}));return t&&i})).forEach((function(e){i._pushUndoCommand(new g.a(i._model(),e,e.lineTools()))})),this._pushUndoCommand(t),this.endUndoMacro()},t.prototype._insertAfterOrBefore=function(e,t,i,n){var o=this,s=Object(r.ensureNotNull)(this._model().paneForSource(i));if(t.some((function(e){return Object(m.isLineTool)(e)&&o._model().paneForSource(e)!==s})))throw new Error("Cannot insert line tool after target on another pane");this.beginUndoMacro(e),t.forEach((function(e){Object(r.ensureNotNull)(o.model().paneForSource(e))!==s&&o.mergeToPane(e,s)}));var a=n();this._pushUndoCommand(a),this.emitEvent("changeZOrder",[t]),this.endUndoMacro()},t.prototype._sendBackOrBringForward=function(e,t,i){var n=this,o=new Map;t.forEach((function(e){var t=Object(r.ensureNotNull)(n._model().paneForSource(e)),i=o.get(t)||[];i.push(e),o.set(t,i)})),this.beginUndoMacro(e),o.forEach((function(e,t){n._pushUndoCommand(i(t,e))})),this.endUndoMacro(),this.emitEvent("changeZOrder",[t])},t}(a.a)},opke:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentcolor" d="m13.5 5a1 1 0 0 0 0 19 1 1 0 0 0 0-19m0 1a1 1 0 0 1 0 17 1 1 0 0 1 0-17zm2.31-.6A9.5 9.5 0 0 0 9 14.5a9.5 9.5 0 0 0 6.81 9.1l.99-.78A8.5 8.5 0 0 1 10 14.5a8.5 8.5 0 0 1 6.8-8.32"/></svg>'},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;s<o.length;++s){var a=o[s][0],u=o[s][1];Object(l.drawLine)(i,a.x*r,a.y*r,u.x*r,u.y*r)}}var p=function(){function e(){this._data=null,this._hittest=new a.HitTestResult(a.HitTestResult.MOVEPOINT)}return e.prototype.setData=function(e){this._data=e},e.prototype.setHitTest=function(e){this._hittest=e},e.prototype.draw=function(e,t){var i=this._data;if(null!==i&&!("points"in i&&i.points.length<2||"floatPoints"in i&&i.floatPoints.length<2)){var n=t.pixelRatio;e.lineCap="butt",e.strokeStyle=i.color,e.lineWidth=Math.max(1,Math.floor(i.linewidth*n)),Object(l.setLineStyle)(e,i.linestyle);var r="floatPoints"in i?i.floatPoints:i.points,o=r[0],s=r[1],a=[];i.overlayLineEndings?a=[o.clone(),s.clone()]:this._drawEnds(e,[o,s],i.linewidth,n);var c=this._extendAndClipLineSegment(o,s,t);null!==c&&i.linewidth>0&&(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;n<r.length;n++){var o=r[n],a=s.Interval.parse(o);if(a.isRange()){var c=a.value();if("100R"===c)return c;i=c}}return i}function b(e){var t=l.getValue("chart.lastUsedTimeBasedResolution");if(void 0!==t&&s.Interval.isTimeBased(t))return t;for(var i="1D",n=0,r=e;n<r.length;n++){var o=r[n],a=s.Interval.parse(o);if(a.isTimeBased()){var c=a.value();if("1D"===c)return c;i=c}}return i}function S(e){return e?"100R":"1D"}function w(e,t,i){var n=a.isRangeStyle(e),r=s.Interval.isRange(t);return!n&&r?b(i):n&&!r?g(i):t}function P(e){return s.Interval.isRange(e)?"1":e}function C(e){var t=s.Interval.parse(e),i=x(t.kind()),n=t.multiplier();return t.isValid()&&n<=i}function x(e){var t=p[e];return Number.isNaN(t)?1:t}function T(e){return x(s.Interval.kind(e))}function I(e){var t=M(l.getJSON(e,[]));return h()(t.filter(C).map(m))}function M(e){return Array.isArray(e)?e:Object.keys(e).map(s.Interval.normalize).filter(d.notNull)}function L(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=(e=[]).concat.apply(e,t);return O(n=h()(n.filter(C).map(m)))}function O(e){return e.sort(A)}function k(e){var t=s.Interval.parse(e),i=t.multiplier()||1;return t.isMinuteHours()?[s.SpecialResolutionKind.Hours,i/60]:[t.kind(),i]}function A(e,t){var i=k(e),n=i[0],r=i[1],o=k(t),s=o[0],a=o[1];return n!==s?_[n]-_[s]:r-a}function E(){return[]}function V(e){var t=D(e);return""+t.multiplier+t.shortKind}function D(e,t){var i=s.Interval.parse(e),n=i.multiplier(),r=i.kind();if(!i.isValid()){if(t)return null;throw new TypeError("Can't translate invalid interval")}return i.isMinuteHours()&&(n=Math.floor(n/60),r=s.SpecialResolutionKind.Hours),{multiplier:n.toString(),shortKind:B(r),hint:n+" "+B(r,n),mayOmitMultiplier:i.isDWM()&&1===n,mayOmitShortKind:i.isMinutes()&&!i.isMinuteHours()}}function B(e,t){if(!t)return f[e];switch(e){case s.ResolutionKind.Days:return window.t("day",{plural:"days",count:t});case s.ResolutionKind.Weeks:return window.t("week",{plural:"weeks",count:t});case s.ResolutionKind.Months:return window.t("month",{plural:"months",count:t});case s.ResolutionKind.Seconds:return window.t("second",{plural:"seconds",count:t});case s.ResolutionKind.Minutes:return window.t("minute",{plural:"minutes",count:t});case s.SpecialResolutionKind.Hours:return window.t("hour",{plural:"hours",count:t});case s.ResolutionKind.Range:return window.t("range",{plural:"ranges",count:t});default:return e}}},"pQ+n":function(e,t,i){"use strict";function n(e,t){var i=new Set,n=function(t){e.children(t,!1).forEach((function(e){i.has(e)||(i.add(e),n(e))}))};return t.forEach(n),t.filter((function(e){return!i.has(e)})).map((function(t){return function e(t,i){for(var n=[],r=t.children(i,!1),o=0;o<r.length;o++)n=n.concat(e(t,r[o]));return n.push(i),n}(e,t)})).reduce((function(e,t){return e.concat(t)
}),[])}i.d(t,"a",(function(){return n}))},pZll:function(e,t,i){"use strict";i.r(t);var n=i("eqEH"),r={id:"SymbolSearchUIService"},o=i("u5Q5"),s=function(){function e(){}return e.prototype.bindToInput=function(e,t){return Object(o.bindToInput)(e,t)},e}(),a=i("PT1i"),l=i("h24c"),c=function(){function e(){this._symbolGetter=null,this._deferredItems=[],this._symbolSearchActive=!1}return e.prototype.setSymbolGetter=function(e){var t=this;this._symbolGetter=e,this._deferredItems.forEach((function(i){t._bindToInputImpl(e,i.input,i.options)})),this._deferredItems=[]},e.prototype.bindToInput=function(e,t){return null===this._symbolGetter?this._deferredItems.push({input:e,options:t}):this._bindToInputImpl(this._symbolGetter,e,t),Promise.resolve({destroy:function(){},acceptTypeIn:function(){}})},e.prototype._bindToInputImpl=function(e,t,i){var n=this,r=$(t),o=function(e,t){},s=function(){r.blur(),n._symbolSearchActive||(n._symbolSearchActive=!0,i.currentSymbol=r.val(),e.getSymbol(i).then((function(e){r.blur(),r.trigger("accept-symbol",[e.symbol]),i.callback&&i.callback(e.symbol,e.interval),i.syncWithChartWidget&&!Object(l.skipAccept)(e.symbol,e.interval)&&o(e.symbol,e.interval),!0===i.clearAfterAccept?r.val(""):(""===r.val()&&i.onEmptyApply&&i.onEmptyApply(),r.val(e.symbol)),n._symbolSearchActive=!1})).catch((function(){r.blur(),n._symbolSearchActive=!1})))},c=function(e){e.preventDefault(),s()};if(i.syncWithChartWidget){Object(l.syncSymbolSearch)(r,!0),a.linking.seriesShortSymbol.subscribe((function(){Object(l.syncSymbolSearch)(r,!0)}));var u=!1;o=function(e,t){u=!(e||t),e&&a.linking.symbol.setValue(e),t&&Object(l.setLinkingResolution)(t)},i.syncOnBlur&&r.on("blur",(function(){u&&(Object(l.syncSymbolSearch)(r,!0),u=!1)}))}r.focus(s),r.keypress(c),r.keydown(c)},e}();function u(){return Object(n.c)(r)}i.d(t,"symbolSearchUIService",(function(){return u})),Object(n.a)(r)||(window.initData&&window.initData.is_mobile_new?Object(n.b)(r,new c):Object(n.b)(r,new s))},pvsv:function(e,t,i){"use strict";function n(e,t){Promise.all([i.e("react"),i.e(1),i.e(3),i.e(6),i.e(37),i.e(86),i.e(0),i.e(5),i.e(34),i.e("symbol-info-dialog-impl")]).then(function(n){i("1Z/g").showSymbolInfoDialog(e,t)}.bind(null,i)).catch(void 0)}i.r(t),i.d(t,"showSymbolInfoDialog",(function(){return n}))},qE4g:function(e,t,i){"use strict";i.r(t),i.d(t,"addBrandingSource",(function(){return r}));var n=i("GK7n");function r(e,t){function i(t){var i=e.getAll();if(1===i.length)return!0;var n=i[0].model();return n&&n.model()===t}e.addCustomSource("branding",(function(e){return new n.Branding(e,i.bind(null,e),t)}))}},qJq3:function(e,t,i){"use strict";(function(e,n,r){TradingView.DEFAULT_BAR_COUNT=300,TradingView.TIME_PLOT=0,TradingView.OPEN_PLOT=1,TradingView.HIGH_PLOT=2,TradingView.LOW_PLOT=3,TradingView.CLOSE_PLOT=4,TradingView.ADT_PLOT=6,TradingView.STYLE_PLOT=7
;var o=i("Eyy1").ensureNotNull,s=i("lUQk").SeriesBase,a=i("tBG4").SeriesStatusView,l=i("cXAR").SeriesDataWindowView,c=i("gWck").SeriesLegendView,u=i("x0JF"),h=u.SeriesAreaPaneView,d=u.SeriesLinePaneView,p=u.SeriesHollowCandlesPaneView,_=u.SeriesCandlesPaneView,f=u.SeriesBarsPaneView,m=u.SeriesHeikenAshiPaneView,v=u.SeriesBaselinePaneView,y=i("9Jkk").SeriesHiLoPaneView,g=i("biIa").SeriesWaterlinePaneView,b=i("Kxc7"),S=i("ZJKN").BarsRange,w=i("38az").SeriesBarColorer,P=i("XPit").SeriesData,C=i("XPit").barFunction,x=i("XPit").seriesPlotFunctionMap,T=i("k9/m"),I=T.PlotList,M=T.PlotRowSearchMode,L=T.mergeMinMax,O=i("hsV8").unpackNonSeriesData,k=i("okVO").SyncModel,A=i("JWMC").trackEvent,E=i("xDuj").translatedIntervalString,V=i("txPx"),D=V.getLogger("Chart.Series"),B=V.getLogger("Chart.Series.Updates",{highRate:!0}),R=i("dfhE"),N=i("n5al"),F=i("pPtI"),j=F.getServerInterval,W=F.getResolutionByChartStyle,H=i("LxhU").Interval,z=i("WkOR").areEqualSymbols,U=i("WkOR").includesEqualSymbol,G=i("z+Sa").SeriesHorizontalBaseLinePaneView,Y=i("Z8aO").SeriesPriceLinePaneView,q=i("ZAbA").SeriesDataEvents,K=i("FIi8").deepExtend,Z=i("5fI3").encodeExtendedSymbol,J=i("FQhm"),X=(i("qFKp").CheckMobile.any(),i("YWnQ").SymbolErrorPermissionDeniedReason),Q=i("YWnQ").permissionDenied,$=!b.enabled("hide_series_legend_item"),ee=(Number(window.TELEMETRY_SERVER_TIME_DIFF_THRESHOLD),i("aKms").MarketStatusModel),te=i("2S76").DataUpdatedModeModel,ie=i("DsEq").DataProblemModel;var ne=b.enabled("display_data_mode");function re(t,n,r){var o=i("OK+B");s.call(this,t),this._dataEvents=new q,this._boxSizeChanged=new e,this._tagsChanged=new e,this._symbolIntervalChanged=new e,this._intervalChanged=new e,this._extendedHoursChanged=new e,this.chartWidgetInitialized=new e,this._onStyleChanged=new e,this._onStatusChanged=new e,this._onRestarted=new e,this.requestingIntradayWhenNotSupported=new e,this.requestingResolutionWhenNotSupported=new e,this._priceScaleChanged=new e,this._onInReplayStateChanged=new e,this._replayExitedDueUnsupportedInterval=new e,this._replayExitedDueUnavailableForUserInterval=new e,this._onTimeFrameApplied=new e,this._requestOptions=r||{count:TradingView.DEFAULT_BAR_COUNT},this.m_model=t,this._chartApi=t._chartApi,this.m_data=new P,this.setProperties(n),this._prevChartStyle=n.style.value(),this.createPaneView(),this._dataWindowView=new l(this,t),this._legendView=new c(this,t),this._statusView=new a(this,this._model.properties().scalesProperties.textColor,this.properties().statusViewStyle),this._symbolInfo=null,this._prevSymbolInfo=null,this._status=re.STATUS_OFFLINE,this._syncModel=null,this._replaySubscriber=null,this._isReplayResolutionAvailableForUser=null;var u=this;this._turnaroundCounter=1,this._turnaround="s"+this._turnaroundCounter,this._handler=function(e){u.onData(e)},this._haStyle={studyId:N.chartStyleStudyId(re.STYLE_HEIKEN_ASHI,!0)},this._renkoStyle={studyId:N.chartStyleStudyId(re.STYLE_RENKO,!0)},this._pbStyle={studyId:N.chartStyleStudyId(re.STYLE_PB,!0)},this._kagiStyle={studyId:N.chartStyleStudyId(re.STYLE_KAGI,!0)},
this._pnfStyle={studyId:N.chartStyleStudyId(re.STYLE_PNF,!0)},this._rangeStyle={studyId:N.chartStyleStudyId(re.STYLE_RANGE,!0)},this._properties.addExclusion&&this._properties.addExclusion("visible"),this._predictBars=0,this._futureBarsPaneView=null,this._properties.showInDataWindow.listeners().subscribe(t,o.prototype.fullUpdate),this._loading=!0,this._seriesLoaded=!1,this.properties().minTick.listeners().subscribe(this,re.prototype._recreateFormatter);u=this;this.properties().minTick.listeners().subscribe(null,(function(){u.m_model.fullUpdate()})),this._priceLineView=null,this._baseHorizontalLineView=new G(this),this._gotoDateResultCleared=!1,this._gotoDateView=null,this.bindStyleChange(),this.bindJapChartsInputs(),this._createIsDWMProperty(),this.createExtendedHoursProperty(),this.extendedHours.listeners().subscribe(this,(function(e){this._extendedHoursChanged.fire(e),this.restart()})),this._dataEvents.extendedHoursNotPermitted().subscribe(this,(function(){this._properties.extendedHours.setValue(!1)})),this._symbolIntervalChanged.subscribe(this,this.checkInterval),this.properties().showCountdown.listeners().subscribe(this,re.prototype._onChangeShowCountdown),this._onChangeShowCountdown(this.properties().showCountdown),this._recreatePriceFormattingDependencies(),this._isDWMCached=null,this.properties().lineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().areaStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().baselineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this._updateBarFunction(),this._marketStatusModel=new ee(this._quotesProvider,this._properties.symbol.listeners()),this._dataUpdatedModeModel=ne?new te({getter:this.symbolInfo.bind(this),onChange:this._dataEvents.symbolResolved()},{getter:this.status.bind(this),onChange:this._onStatusChanged},this._properties.symbol.listeners()):null,this._dataProblemModel=new ie(this._quotesProvider,this._properties.symbol.listeners())}inherit(re,s),re.prototype.isLoading=function(){return this._loading},re.prototype.isSymbolInvalid=function(){return this._status===re.STATUS_INVALID_SYMBOL},re.prototype.styleStudyInfos=function(){return{haStyle:this._haStyle,renkoStyle:this._renkoStyle,pbStyle:this._pbStyle,kagiStyle:this._kagiStyle,pnfStyle:this._pnfStyle,rangeStyle:this._rangeStyle}},re.prototype.styleStudyInfo=function(e){return this.styleStudyInfos()[e]},re.prototype.priceLineColor=function(e){return this.properties().priceLineColor.value()||e},re.prototype.endOfData=function(){return this._endOfData},re.prototype.serverTimeOffset=function(){return this._chartApi.serverTimeOffset()},re.prototype._onChangeShowCountdown=function(e){var t=this;e.value()?this._countdownUpdateTimer=this.m_model.setInterval((function(){t._priceAxisView.updateCountdown()}),500):(this.m_model.clearInterval(this._countdownUpdateTimer),delete this._countdownUpdateTimer)},re.prototype.lastValueData=function(e,t,i){var n={noData:!0}
;if(this.m_model.timeScale().isEmpty()||this.priceScale().isEmpty()||this.data().isEmpty())return n;var r,o,s=this.m_model.timeScale().visibleBarsStrictRange();if(null===s)return n;if(t){var a=this.data().bars().last();if(null===a)return n;r=a.value,o=a.index}else{var l=this.data().bars().search(s.lastBar(),M.NearestLeft);if(null===l)return n;r=this.data().bars().valueAt(l.index),o=l.index}var c={noData:!1},u=void 0!==e?r[e]:this._barFunction(r);i&&(c.price=u);var h=this.firstValue();c.text=this.priceScale().formatPrice(u,h),c.formattedPriceAbsolute=this.priceScale().formatPriceAbsolute(u),c.formattedPricePercentage=this.priceScale().formatPricePercentage(u,h);var d=this.barColorer().barStyle(o,!1);return c.color=d.barColor,c.floatCoordinate=this.priceScale().priceToCoordinate(u,h),c.coordinate=c.floatCoordinate,c.index=o,c},re.prototype.prevClose=function(){if(this.priceScale().isEmpty()||this.data().isEmpty()||!this.quotes())return null;var e=this.quotes().prev_close_price;if(null==e)return null;var t=this.firstValue();return{coordinate:this.priceScale().priceToCoordinate(e,t),floatCoordinate:this.priceScale().priceToCoordinate(e,t),text:this.priceScale().formatPrice(e,t)}},re.prototype.quotes=function(){return this.data().isEmpty()?null:this._quotesProvider.quotes()},re.prototype._createIsDWMProperty=function(){this._isDWMProperty=new n(this.isDWM()),this._onRestarted.subscribe(this,(function(){this._isDWMProperty.setValue(this.isDWM())}))},re.prototype.isDWMProperty=function(){return this._isDWMProperty},re.prototype._prepareChartApiParams=function(){return this._requestOptions.startDate?!this._requestOptions.startDate||this._requestOptions.endDate||this._requestOptions.count?this._requestOptions.startDate&&this._requestOptions.endDate?["from_to",this._requestOptions.startDate,this._requestOptions.endDate]:["from_to",this._requestOptions.startDate,this._requestOptions.count]:["from_to",this._requestOptions.startDate]:this._requestOptions.count||TradingView.DEFAULT_BAR_COUNT},re.prototype._nextSymbolId=1,re.prototype._nextSeriesId=1,Object.assign(re,R),re.prototype.model=function(){return this.m_model},re.prototype.fixLastBar=function(e){0},re.prototype.clearData=function(){this.data().clear()},re.prototype.data=function(){return this.m_data},re.prototype.symbolId=function(){return this._symbolId},re.prototype.seriesId=function(){return this._seriesId},re.prototype.isPulse=function(){return this._symbolInfo&&this._symbolInfo.resolutions.length>0},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()<i?n.renkoStyle.inputs.merge({boxSize:i}):n.style.value()===re.STYLE_PNF&&n.pnfStyle.inputs.boxSize.value()<i?n.pnfStyle.inputs.merge({boxSize:i}):n.style.value()===re.STYLE_KAGI&&n.kagiStyle.inputs.reversalAmount.value()<i&&n.kagiStyle.inputs.merge({reversalAmount:i});break;case"symbol_error":if(e.params[0]!==this._symbolId){D.logNormal("command for old symbol. Expected:"+this._symbolId+", actual"+e.params[0]);break}if(this._setStatus(re.STATUS_INVALID_SYMBOL),this._loading=!1,this._properties.shortName.setValue(this._properties.symbol.value()),this.m_model.clearAllStudies(),this.updateAllViews(),this.m_model.updateSource(this),(d=e.params[1])===Q)switch(e.params[2]){case X.ExtendedHours:this._dataEvents.fireExtendedHoursNotPermitted();break;case X.Symbol:this._dataEvents.fireSymbolNotPermitted(e.params[3]);break;case X.GroupPermission:this._dataEvents.fireSymbolGroupNotPermitted(e.params[3]);break;default:this._dataEvents.fireSymbolNotPermitted(e.params[2])}else this.m_model.resetTimeScale(),this._dataEvents.fireSymbolError(e);this.m_model.realignLineTools();break;case"series_timeframe":if(e.params[1]!==this._turnaround)break;var r=e.params[2],s=e.params[3],a=e.params[6],l=this.m_model.timeScale(),c=s;if(void 0===a)c+=l.defaultRightOffsetProperty().value();else if(a.applyDefaultRightMargin)c+=l.defaultRightOffsetProperty().value();else if(a.percentRightMargin){var u=s-r+1,h=Math.max(0,Math.min(.99,a.percentRightMargin/100));c+=h*u/(1-h)}this.m_model.setTimeViewport(r,c);break;case"series_error":var d=e.params[2];if(this._loading=!1,delete this._loadingStartTime,b.enabled("charting_library_debug_mode")&&D.logNormal("Error reason: "+d),this._setStatus(b.enabled("no_bars_status")&&this._symbolInfo?re.STATUS_NO_BARS:re.STATUS_INVALID_SYMBOL),"string"==typeof d)if(d.startsWith("study_not_auth:")){var p=d.split(":",2)[1].split("@",2)[0];p in{BarSetRenko:!0,BarSetPriceBreak:!0,BarSetKagi:!0,BarSetPnF:!0}?this._dataEvents.fireChartTypeNotPermitted(p):"BarSetSpread"===p?this._dataEvents.fireIntradaySpreadNotPermitted():"BarSetRange"===p&&this._dataEvents.fireCustomIntervalNotPermitted()}else"resolution_not_entitled"===d?this._dataEvents.fireIntradayExchangeNotPermitted():"custom_resolution"===d?this._dataEvents.fireCustomIntervalNotPermitted():"seconds_not_entitled"===d&&isFeatureEnabled("seconds_bars")&&this._dataEvents.fireSecondsIntervalNotPermitted();this._seriesLoaded=!0,this._dataEvents.fireSeriesError(e);break;case"series_loading":if(e.params[1]!==this._turnaround)break;if(e.params[0]!==this._seriesId){D.logNormal("command for old series. Expected:"+this._seriesId+", actual"+e.params.customId);break}
this._loading=!0,this._setStatus(re.STATUS_LOADING),t._loadingStartTime=(new Date).getTime();break;case"series_completed":if(e.params[2]!==this._turnaround)break;if(e.params[0]!==this._seriesId){D.logNormal("command for old series. Expected:"+this._seriesId+", actual"+e.params.customId);break}if(this._setSymbolIntervalDelay){if(this._willSymbolIntervalCurrencyChanged())return void D.logNormal("command comes during symbol/interval changing");D.logNormal("series_completed comes when symbol interval delay present but symbol/interval should not be changed")}var _="chartSession:"+t._chartApi._sessionid,f=(new Date).getTime()-this._loadingStartTime;D.logDebug(_+", Series loading took "+f+" ms, eod:"+this._endOfData),this._loading=!1,delete this._loadingStartTime;var m=e.params[1];switch("pulsed"===m&&(m="delayed"),m){case"streaming":this._setStatus(re.STATUS_READY);break;case"endofday":this._setStatus(re.STATUS_EOD);break;case"delayed":this._setStatus(re.STATUS_DELAYED);break;case"pulsed":this._setStatus(re.STATUS_PULSE);break;case"replay":this._setStatus(re.STATUS_REPLAY)}m.match(/delayed_streaming/)&&this._setStatus(re.STATUS_DELAYED_STREAMING);var v=this.m_model.paneForSource(this);v.recalculatePriceScale(this.priceScale()),this.m_model.fullUpdate(),this.m_data.size()&&this._dataEvents.fireTickMarksRangeChanged({start:o(this.data().first()).value[TradingView.TIME_PLOT],end:o(this.data().last()).value[TradingView.TIME_PLOT]}),this.model().recalcVisibleRangeStudies(!0),this.model().recalcStudyBasedLineTools(),!this.m_priceScale.isLockScale()||this.model().timeScale().isEmpty()||this._seriesLoaded||(this.model().timeScale()._correctOffset(),this.model().timeScale().correctBarSpacing(),this.model().resetPriceScale(v,this.priceScale())),this._seriesLoaded=!0,this._dataEvents.fireCompleted(),this.requestMoreData();break;case"series_deleted":break;case"data_update":if(e.params.customId!==this._seriesId){D.logNormal("command for old series. Expected:"+this._seriesId+", actual"+e.params.customId);break}if(e.params.turnaround!==this._turnaround){D.logNormal("command for old series turnaround. Expected:"+this._turnaround+", actual"+e.params.turnaround);break}if(this._setSymbolIntervalDelay){if(this._willSymbolIntervalCurrencyChanged())return void D.logNormal("command comes during symbol/interval changing");D.logNormal("data_update comes when symbol interval delay present but symbol/interval should not be changed")}if(this.status()===re.STATUS_INVALID_SYMBOL)break;if(e.params.plots.length){var y=this.m_data.bars().size(),g=this.m_data.bars().firstIndex(),S=this.m_data.bars().merge(e.params.plots);(null===g||S.index<g)&&(this._endOfData=!1);var w="Merge bars. earliestRow:"+S.index+"} ";w+="bars state:{firstBar:"+o(this.m_data.bars().firstIndex())+",lastBar:"+o(this.m_data.bars().lastIndex())+",size:"+this.m_data.bars().size()+"}",B.logDebug(w),y!==this.bars().size()&&(this._dataEvents.fireBarReceived(S),this.model().recalcVisibleRangeStudies(!0))}else this.m_data.clear()
;e.params.lastBar?this._lastBarCloseTime=e.params.lastBar.closeTime||null:this._lastBarCloseTime=null,new Promise((function(i){var n=t.properties().style.value();e.params.nonseries&&"nochange"!==e.params.nonseries.indexes&&N.isRangeBasedStyle(n)?t.parseJapProjBars(e.params.nonseries).then((function(e){t.m_data.m_nsBars=e.nsBars,t.m_data.lastProjectionPrice=e.lastPrice;var n=t.m_data.boxSize!==e.boxSize;t.m_data.boxSize=e.boxSize,t.m_data.reversalAmount=e.reversalAmount,n&&t._boxSizeChanged.fire(t.m_data.boxSize),i()})):(e.params.nonseries||(t.m_data.m_nsBars.clear(),t.m_data.lastProjectionPrice=void 0),i(),i())})).then((function(){t._statusView.update();var e=t.m_model.paneForSource(t);t.m_model.recalculatePane(e),t.m_model.updateSource(t),t.m_model.updateLineTools(),t.m_model.updateCrossHair()}))}this._dataEvents.fireMessageReceived(e)},re.prototype.parseJapProjBars=function(e){var t,i,n,r=new I(x()),o=this.model().timeScale(),s=this.properties().style.value();return new Promise((function(a){e.d&&""!==e.d?O(e.d).then((function(l){var c=l.data;t=c.price,i=c.boxSize,n=c.reversalAmount;for(var u=c.bars,h=0;u&&h<u.length;h++){var d=[],p=e.indexes[u[h].time];d.push(o.points().valueAt(p)),d.push(u[h].open),d.push(u[h].high),d.push(u[h].low),d.push(u[h].close),d.push(u[h].volume),s===re.STYLE_KAGI?d.push(u[h].additionalPrice):s===re.STYLE_PNF&&d.push(u[h].factor),r.add(p,d)}a({nsBars:r,lastPrice:t,boxSize:i,reversalAmount:n})})):a({nsBars:r,lastPrice:t,boxSize:i,reversalAmount:n})}))},re.prototype.disconnect=function(){this._seriesId&&this._chartApi.removeSeries(this._seriesId),this._symbolId=null,this._seriesId=null,this.m_symbol=void 0,this._predictBars=0,this._status=re.STATUS_OFFLINE},re.prototype.isStarted=function(){return!!this._symbolId},re.prototype.restart=function(){if(this._status!==re.STATUS_SNAPSHOT){this._loading=!0,this._onRestarted.fire(),this._setStatus(re.STATUS_RESOLVING),this.m_data=new P,this.updateSymbolInfo(null,!0),this._prevSymbolId=this._symbolId,this._symbolId=this._makeNextSymbolId();var e=this._properties.interval.value();this._checkIntervalWillChanged(e)&&this._notifyIntervalChanged(e);var t=null;if(this._pendingTimeRange&&(t=this._pendingTimeRange,delete this._pendingTimeRange),this._onBeforeModifySeries(this.getSymbolString(),e),this._onTimeFrameApplied.fire(t),e=j(e),this._chartApi.resolveSymbol(this._symbolId,this._getResolvingSymbolString(),this._handler),this._seriesId)this._turnaround="s"+ ++this._turnaroundCounter,this._chartApi.modifySeries(this._seriesId,this._turnaround,this._symbolId,e,t,this._handler,this._prevSymbolId);else this._seriesId=this._makeNextSeriesId(),!1===this._chartApi.createSeries(this._seriesId,this._turnaround,this._symbolId,e,this._prepareChartApiParams(),t,this._handler)&&(this._seriesId=void 0);this.m_symbol=this._properties.symbol.value(),this._currency=this._properties.currencyId.value(),this.m_interval=this._properties.interval.value()}},re.prototype.hasDelayedSymbolIntervalChange=function(){return!!this._setSymbolIntervalDelay},
re.prototype.setSymbolIntervalCurrencyDelayed=function(){this._isDWMCached=null,this._willSymbolIntervalCurrencyChanged()&&(this._setSymbolIntervalDelay&&(D.logNormal("Clear timeout to change symbol/interval #"+this._setSymbolIntervalDelay),clearTimeout(this._setSymbolIntervalDelay)),this._setSymbolIntervalDelay=setTimeout(function(){D.logNormal("Timeout #"+this._setSymbolIntervalDelay+' fired, new symbol will be "'+this._properties.symbol.value()+'"'),delete this._setSymbolIntervalDelay,this._setSymbolInterval(this._properties.symbol.value(),this._properties.interval.value(),this._properties.currencyId.value())}.bind(this),30),D.logNormal("Started timeout #"+this._setSymbolIntervalDelay+' to change symbol/interval from "'+this.m_symbol+'" to "'+this._properties.symbol.value()+'"'))},re.prototype._willSymbolIntervalCurrencyChanged=function(){var e=this._checkIntervalWillChanged(this._properties.interval.value()),t=this._checkSymbolWillChanged(this._properties.symbol.value()),i=this._checkCurrencyWillChanged(this._properties.currencyId.value());return t||e||i},re.prototype._checkSymbolWillChanged=function(e){return!this.symbolSameAsCurrent(e)},re.prototype._checkIntervalWillChanged=function(e){return this.m_interval!==e},re.prototype._checkCurrencyWillChanged=function(e){return this._currency!==e},re.prototype.rerequestData=function(){this._setSymbolInterval(this.m_symbol,this.m_interval,this._currency,!0)},re.prototype._notifyIntervalChanged=function(e){var t={timeframe:this._pendingTimeRange};this._intervalChanged.fire(e,t),this._pendingTimeRange=t.timeframe},re.prototype._setSymbolInterval=function(e,t,i,n){this.clearGotoDateResult();var r=H.isRange(t);r&&this._properties.rangeStyle.inputs.range.setValue(H.parse(t).multiplier());var o=this._checkSymbolWillChanged(e),s=this._checkIntervalWillChanged(t),a=this._checkIntervalWillChanged(i);if((o||s||a||n)&&((r||H.isRange(this.m_interval))&&(this._symbolId=null),this._syncModel=null,this.m_symbol=e,this.m_interval=t,this._currency=i,(!this._symbolId||o||a)&&this.updateSymbolInfo(null,!o&&a),this.m_model.realignLineTools(),this._status!==re.STATUS_SNAPSHOT)){if(this._loading=!0,this._setStatus(re.STATUS_RESOLVING),this._symbolIntervalChanged.fire(),s&&this._notifyIntervalChanged(this.m_interval),this._onRestarted.fire(),this._seriesLoaded=!1,this._chartApi&&this._chartApi.connected()){(!this._symbolId||o||a)&&(this._prevSymbolId=this._symbolId,this._symbolId=this._makeNextSymbolId(),this._chartApi.resolveSymbol(this._symbolId,this._getResolvingSymbolString(),this._handler));var l=null;this._pendingTimeRange&&(l=this._pendingTimeRange,delete this._pendingTimeRange),this._onTimeFrameApplied.fire(l),this._seriesId?(this._onBeforeModifySeries(this.getSymbolString(),t),this._turnaround="s"+ ++this._turnaroundCounter,this._predictBars=0,t=j(t),this._chartApi.modifySeries(this._seriesId,this._turnaround,this._symbolId,t,l,this._handler,this._prevSymbolId)):(this._onBeforeModifySeries(this.getSymbolString(),t),this._seriesId=this._makeNextSeriesId(),t=j(t),
this._chartApi.createSeries(this._seriesId,this._turnaround,this._symbolId,t,this._prepareChartApiParams(),l,this._handler))}0}},re.prototype.setDefaultTimeframe=function(e){this._pendingTimeRange=e},re.prototype.actualSymbol=function(){return this.symbolInfo()?this.symbolInfo().full_name:this.symbol()},re.prototype.proSymbol=function(){return this.symbolInfo()?this.symbolInfo().pro_name:this.symbol()},re.prototype.symbol=function(){return this.properties().symbol.value()},re.prototype.interval=function(){return this.properties().interval.value()},re.prototype.bars=function(){return this.m_data.m_bars},re.prototype.nsBars=function(){return this.m_data.m_nsBars},re.prototype.hl2=function(e){return(this.high(e)+this.low(e))/2},re.prototype.hlc3=function(e){return(this.high(e)+this.low(e)+this.close(e))/3},re.prototype.ohlc4=function(e){return(this.open(e)+this.high(e)+this.low(e)+this.close(e))/4},re.prototype.priceRange=function(e,t){if(!TradingView.isInteger(e))return D.logDebug("Series.priceRange: incorrect startBar"),null;if(!TradingView.isInteger(t))return D.logDebug("Series.priceRange: incorrect endBar"),null;if(this.data().isEmpty())return null;if(this.m_priceScale.isLockScale()){var i=this._model.mainSeriesScaleRatio();if(null!==i){var n=this.priceScale().internalHeight()/(this.model().timeScale().barSpacing()/i),o=this.data().search(t,M.NearestLeft),s=(o.value[TradingView.HIGH_PLOT]+o.value[TradingView.LOW_PLOT])/2;return new r(s-.5*n,s+.5*n)}}var a=this.priceSource();if(null!==a)var l=this.data().bars().minMaxOnRangeCached(e,t,[{name:a,offset:0}]),c=this.data().nsBars().minMaxOnRangeCached(e,t,[{name:a,offset:0}]);else l=this.data().bars().minMaxOnRangeCached(e,t,[{name:"low",offset:0},{name:"high",offset:0}]),c=this.data().nsBars().minMaxOnRange(e,t,[{name:"low",offset:0},{name:"high",offset:0}]);var u=null!==(l=L(l,c))?l.min===l.max?new r(l.min-.5,l.max+.5):new r(l.min,l.max):new r(-.5,.5);return this.priceScale().isLog()?new r(this.priceScale().priceToLogical(u.minValue()),this.priceScale().priceToLogical(u.maxValue())):u},re.prototype.nearestData=function(e,t){if(TradingView.isInteger(e)){var i=this.data().search(e,t);return null!==i?i:void 0}D.logDebug("Series.nearestData: incorrect logicalPoint")},re.prototype.nearestIndex=function(e,t){var i=this.nearestData(e,t);return i?i.index:void 0},re.prototype.paneViews=function(){if(!this.properties().visible.value())return null;var e=[this._baseHorizontalLineView,this._paneView];return this._futureBarsPaneView&&e.push(this._futureBarsPaneView),this._projectionBarsPaneView&&e.push(this._projectionBarsPaneView),null!==this._waterlineView&&e.push(this._waterlineView),null!==this._priceLineView&&e.push(this._priceLineView),null!==this._gotoDateView&&e.push(this._gotoDateView),e},re.prototype.dataWindowView=function(){return this._dataWindowView},re.prototype.legendView=function(){return this._legendView},re.prototype.statusView=function(){return $?this._statusView:null},re.prototype.marketStatusModel=function(){return this._marketStatusModel},
re.prototype.dataUpdatedModeModel=function(){return this._dataUpdatedModeModel},re.prototype.dataProblemModel=function(){return this._dataProblemModel},re.prototype.priceAxisViews=function(e,t){return e.findTargetPriceAxisViews(this,t,this._priceAxisViews,[this._priceLinePriceAxisView])},re.prototype.purgeSymbolInfo=function(){this._symbolInfo=null,this._isDWMCached=null},re.prototype.updateSymbolInfo=function(e,t){var i=N.extractSymbolNameFromSymbolInfo(e,this.m_symbol);if(this._prevSymbolInfo=t?this._symbolInfo:null,this._symbolInfo=e,e){this._properties.shortName.setValue(e.name);var n=this._properties.symbol.value(),r=i;b.enabled("uppercase_instrument_names")&&(n=n.toUpperCase(),r=r.toUpperCase()),i&&n!==r&&this._properties.symbol.setValue(i),this._currency=N.seriesCurrency(e),this._properties.currencyId.setValue(this._currency)}this._base=e?e.pricescale/e.minmov:100,this._pointValue=e&&e.pointvalue||1,this._recreatePriceFormattingDependencies(),this._statusView.update(),this.priceScale().updateFormatter(),this._quotesProvider.setQuotesSessionSymbol(this._getSymbolForApi()),this.checkInterval()},re.prototype._onQuotesUpdate=function(e,t){},re.prototype.dataPoweredBy=function(){return null},re.prototype.symbolSameAsCurrent=function(e){if(z(this.m_symbol,e))return!0;var t=this._symbolInfo;if(t){if(z(t.full_name,e)||z(t.pro_name,e))return!0;if(z(t.ticker,e))return!0;if(t.aliases&&U(t.aliases,e))return!0;if(t.alternatives&&U(t.alternatives,e))return!0;if(0===e.indexOf("FRA:")&&z(t.pro_name,e.replace("FRA:","FWB:")))return!0}return!1},re.prototype.updateAllViews=function(){this._paneView.update(),this._dataWindowView.update(),this._legendView.update(),this._statusView.update();for(var e=this._priceAxisViews.length,t=0;t<e;t++)this._priceAxisViews[t].update();this._priceLinePriceAxisView.update(),this._futureBarsPaneView&&this._futureBarsPaneView.update(),this._projectionBarsPaneView&&this._projectionBarsPaneView.update(),null!==this._waterlineView&&this._waterlineView.update(),null!==this._priceLineView&&this._priceLineView.update(),null!==this._gotoDateView&&this._gotoDateView.update(),this._baseHorizontalLineView.update();var i=this._model.activeStrategySource().value();null!==i&&i.updateAllViews()},re.prototype._setStatus=function(e){this._status=e,this._statusView.update(),this.m_model.updateSource(this),this._onStatusChanged.fire()},re.prototype.requestMoreData=function(e){if((this._status===re.STATUS_READY||this._status===re.STATUS_PULSE||this._status===re.STATUS_DELAYED||this._status===re.STATUS_DELAYED_STREAMING||this._status===re.STATUS_EOD||this._status===re.STATUS_REPLAY)&&!this.m_model.timeScale().isEmpty()){var t=this.m_model.timeScale().visibleBarsStrictRange();if(null!==t&&0!==this.bars().size()){var i=t.lastBar()-o(this.data().last()).index;if(this._predictBars<i&&(this._predictBars=i,this._chartApi&&this._chartApi.connected()&&this._chartApi.requestMoreTickmarks(this._seriesId,i,this._handler)),!this._endOfData){var n=o(this.bars().firstIndex()),r=e||n-t.firstBar()
;r<=0||(Number.isFinite(r)?(this._endOfData=!0,this._loading=!0,this._chartApi&&this._chartApi.connected()&&(this._chartApi.requestMoreData(this._seriesId,r,this._handler),b.enabled("charting_library_base")&&(this._predictBars=0)),this._setStatus(re.STATUS_LOADING)):D.logWarn("requestMoreData: invalid bar count: "+r+", visible bars: ["+t.firstBar()+", "+t.lastBar()+"], last index: "+o(this.data().last()).index+", predicted bars: "+this._predictBars+", required bars:"+e))}}}},re.prototype.bindStyleChange=function(){var e=this;Object.keys(re.STYLE_SHORT_NAMES).map((function(e){return re.STYLE_SHORT_NAMES[e]+"Style"})).forEach((function(t){e._properties[t].listeners().subscribe(e,re.prototype.invalidateBarStylesCache)}))},re.prototype.bindJapChartsInputs=function(){this._properties.style.listeners().subscribe(this,this.onChartStyleChanged),this._properties.renkoStyle.inputs.boxSize.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.wicks.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.sources.listeners().subscribe(this,this.onInputChanged),this._properties.pbStyle.inputs.lb.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.reversalAmount.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.boxSize.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.reversalAmount.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.sources.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.oneStepBackBuilding.listeners().subscribe(this,this.onInputChanged),this._properties.rangeStyle.inputs.phantomBars.listeners().subscribe(this,this.onInputChanged)},re.prototype.createExtendedHoursProperty=function(){var e=this;function t(){var t=e.model().readOnly(),i=e._properties.extendedHours.value(),n=b.enabled("widget");!i||n||t||(e._dataEvents.fireExtendedHoursNotPermitted(),i=!1),e.extendedHours.setValue(i)}e._properties.extendedHours.listeners().subscribe(null,t),e._properties.interval.listeners().subscribe(null,t),e.chartWidgetInitialized.subscribe(null,t),t()},re.prototype.dividendsAdjustmentProperty=function(){return null},re.prototype.setChartStyleWithIntervalIfNeeded=function(e,t){var i=t;void 0===t&&(i=W(e,this._properties.interval.value(),this._model.defaultResolutions())),H.isEqual(i,this._properties.interval.value())||this._properties.interval.setValue(i),this._properties.style.setValue(e)},
re.prototype.isNeedRestart=function(e){return this._status!==re.STATUS_SNAPSHOT&&(void 0===e&&(e=this.properties().style.value()),!N.isRangeStyle(this._prevChartStyle)&&!N.isRangeStyle(e)&&!(this._prevChartStyle===e||!N.isRequiringRestartSeriesStyles(this._prevChartStyle)&&!N.isRequiringRestartSeriesStyles(e)))},re.prototype.onChartStyleChanged=function(){this._updateBarFunction(),this.isNeedRestart()&&(this.data().clear(),this.model().timeScale().scrollToRealtime(!1),this.restart()),this._prevChartStyle=this.properties().style.value(),this._onStyleChanged.fire(this.properties().style.value()),this.invalidateBarStylesCache()},re.prototype.applyPreferences=function(e){var t=K({},e);this.m_priceScale.setMode({autoScale:t.priceAxisProperties.autoScale,percentage:t.priceAxisProperties.percentage,log:t.priceAxisProperties.log,lockScale:t.priceAxisProperties.lockScale}),this.setChartStyleWithIntervalIfNeeded(t.style),delete t.style,delete t.interval,this._properties.mergePreferences(t),this._properties.saveDefaults(),this.createPaneView(),this.invalidateBarStylesCache()},re.prototype.barFunction=function(){return this._barFunction},re.prototype.priceSource=function(){var e=null;switch(this._properties.style.value()){case re.STYLE_LINE:e=this._properties.lineStyle.priceSource.value();break;case re.STYLE_AREA:e=this._properties.areaStyle.priceSource.value();break;case re.STYLE_BASELINE:e=this._properties.baselineStyle.priceSource.value()}return e},re.prototype._updateBarFunction=function(){if(this._properties.style.value()===re.STYLE_HILO)this._barFunction=C("low");else{var e=this.priceSource()||"close";this._barFunction=C(e)}},re.prototype.style=function(){return this.properties().style.value()},re.prototype.isRangeBasedStyle=function(){return N.isRangeBasedStyle(this.style())},re.prototype.onInputChanged=function(){this.restart()},re.prototype.onExtendedHoursChanged=function(){return this._extendedHoursChanged},re.prototype._getSymbolForApi=function(){if(b.enabled("pay_attention_to_ticker_not_symbol")){var e=this._symbolInfo||this._prevSymbolInfo;return e?e.ticker:this.actualSymbol()}return this.actualSymbol()},re.prototype._getSymbolObject=function(){var e={symbol:this._getSymbolForApi()};(null!==this.currency()&&(e.currencyCode=this.currency()),this.extendedHours.value()&&(e.session="extended"),re.SYMBOL_STRING_DATA.hasOwnProperty(this._properties.style.value()))&&(e={symbol:e,type:this.styleStudyInfo(this.getStyleShortName()+"Style").studyId+"!",inputs:this.getInputsProperties().state()});return e},re.prototype.getSymbolString=function(){return Z(this._getSymbolObject())},re.prototype._getResolvingSymbolString=function(){var e=this._getSymbolObject();return Z(e)},re.prototype.getStyleShortName=function(){var e=this._properties.style.value();if(re.STYLE_SHORT_NAMES.hasOwnProperty(e))return re.STYLE_SHORT_NAMES[e];throw new Error("Missed short name for style "+e)},re.prototype.getStyleProperties=function(){return this._properties[this.getStyleShortName()+"Style"]},re.prototype.getInputsProperties=function(){
return this.getStyleProperties().inputs||new n},re.prototype.getInputsInfoProperties=function(){return this.getStyleProperties().inputInfo||new n},re.prototype.getRealVisibleRange=function(){var e=this.model().timeScale().visibleBarsStrictRange();if(null===e)return null;var t=this.data().search(e.firstBar(),M.NearestRight),i=this.data().search(e.lastBar(),M.NearestLeft);return null===t||null===i?null:new S(t.index,i.index)},re.prototype.firstValue=function(){var e=this.firstBar();return null===e?null:this._barFunction(e)},re.prototype.firstBar=function(){var e=this.model().timeScale().visibleBarsStrictRange();if(null===e)return null;var t=e.firstBar(),i=this.data().search(t,M.NearestRight);return null!==i?i.value:null},re.prototype.isSpread=function(){return null!==this._symbolInfo&&"spread"===this._symbolInfo.type},re.prototype.getSymbolName=function(){return this._symbolInfo?this._symbolInfo.name:""},re.prototype.loadDataTo=function(e){this._turnaround="s"+ ++this._turnaroundCounter;var t=this._properties.interval.value();this._onTimeFrameApplied.fire(e),this._chartApi.modifySeries(this._seriesId,this._turnaround,this._symbolId,t,e,this._handler)},re.prototype.checkInterval=function(){if(this._symbolInfo&&(H.isIntraday(this.interval())&&!this._symbolInfo.has_intraday&&this.requestingIntradayWhenNotSupported.fire(),this._symbolInfo.hasOwnProperty("supported_resolutions"))){var e=H.normalize(this._properties.interval.value());-1===this._symbolInfo.supported_resolutions.indexOf(e)&&this.requestingResolutionWhenNotSupported.fire(this._symbolInfo.supported_resolutions[0])}},re.prototype.priceScale=function(){return this.m_priceScale},re.prototype.setPriceScale=function(e){this.m_priceScale!==e&&(this.m_priceScale=e,this._priceScaleChanged.fire(e),this._properties.removeProperty("priceAxisProperties"),this._properties.addChild("priceAxisProperties",e.properties()),this._properties.priceAxisProperties.childChanged(),J.emit("series_event","price_scale_changed"))},re.prototype.priceScaleChanged=function(){return this._priceScaleChanged},re.prototype.setGotoDateResult=function(e){this._gotoDateResultCleared=!1,i.e("series-pane-views").then(function(t){if(!this._gotoDateResultCleared){var n=i("+weX").GotoDateView;this._gotoDateView=new n(this,e),this.m_model.updateSource(this)}}.bind(this).bind(null,i)).catch(i.oe)},re.prototype.clearGotoDateResult=function(e){this._gotoDateView=null,this._gotoDateResultCleared=!0},re.prototype.syncModel=function(){if(!this._syncModel){var e=this.symbolInfo(),t=this.interval();if(!e||!t)return null;this._syncModel=new k(e,t)}return this._syncModel},re.prototype.turnaround=function(){return this._turnaround},re.prototype.getSourceIcon=function(){return{type:"loadSvg",svgId:"series."+this.properties().style.value()}},re.prototype.isStyleSupported=function(e){return!0},re.prototype.isIntervalSupported=function(e){return!0},re.prototype.isStyleSupportedForReplay=function(e){return N.isTimeBasedStyle(e)},re.prototype.isInReplay=function(){return null!==this._replaySubscriber},
re.prototype.onTimeFrameApplied=function(){return this._onTimeFrameApplied},re.prototype._onBeforeModifySeries=function(e,t){0},re.prototype._getTelemetryAdditionalData=function(e,t){t=void 0===t||t;var i={symbol:this.actualSymbol()};return t&&(i.resolution=this.interval()),void 0!==e&&(i.reason=e),i},re.prototype._sendTelemetryReport=function(e,t,i){void 0===i&&(i=this._getTelemetryAdditionalData());var n=Object.assign(t,{additional:i});telemetry.sendChartReport(e,n)},re.prototype._sendTelemetryCounter=function(e,t){this._sendTelemetryReport(e,{count:1},t)},re.prototype._sendTelemetryTiming=function(e,t,i){this._sendTelemetryReport(e,{value:t},i)},re.prototype.destroy=function(){this._replayExitedDueUnsupportedInterval.destroy(),this._replayExitedDueUnavailableForUserInterval.destroy(),this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._quotesProvider.destroy(),this.clearGotoDateResult(),this._legendView.destroy(),this._marketStatusModel.destroy(),null!==this._dataUpdatedModeModel&&this._dataUpdatedModeModel.destroy(),this._dataProblemModel.destroy(),this._paneView&&this._paneView.destroy&&this._paneView.destroy(),this._onTimeFrameApplied.destroy(),s.prototype.destroy.call(this)},re.prototype.dataEvents=function(){return this._dataEvents},TradingView.Series=re,t.Series=re}).call(this,i("aIyQ"),i("tc+8"),i("Qb4w").PriceRange)},qXYw:function(e,t,i){"use strict";i.r(t);var n=i("mrSG"),r=i("n5al"),o=i("ivNn"),s=i("YFKU"),a=i("qFKp"),l=i("Tmoa"),c=i("Ialn"),u=i("GH0z"),h=i("k9/m"),d=i("CW80"),p=i("mMWL"),_=i("7qT/"),f=i("38az"),m=a.CheckMobile.any(),v=m&&!0,y=new u.PercentageFormatter,g=Object(s.t)("n/a"),b=g+" ("+g+"%)",S=function(){function e(e,t){this._study=e,this._model=t,this._emptyValues=[{title:Object(s.t)("Open"),visible:!1,value:"",index:0,id:""},{title:Object(s.t)("High"),visible:!1,value:"",index:1,id:""},{title:Object(s.t)("Low"),visible:!1,value:"",index:2,id:""},{title:Object(s.t)("Close"),visible:!1,value:"",index:3,id:""},{title:"",visible:!1,value:"",index:4,id:""},{title:"",visible:!1,value:"",index:5,id:""},{title:Object(s.t)("Change"),visible:!1,value:"",index:6,id:""}]}return e.prototype.getItems=function(){return this._emptyValues},e.prototype.getValues=function(e){var t=this._emptyValues.map((function(e){return Object(n.__assign)({},e)}));if(this._model.timeScale().isEmpty())return t;if(0===this._study.data().size())return t;var i=this._showLastPriceAndChangeOnly();if(Object(o.isNumber)(e)||(i?e=this._study.data().lastIndex():(e=this._model.crossHairSource().appliedIndex(),Object(o.isNumber)(e)||(e=this._study.data().lastIndex()))),null===e||!Object(o.isNumber)(e))return t;var r=this._study.data().search(e,h.PlotRowSearchMode.NearestLeft,1);if(null===r)return t;var s=r.index,a=r.value,l=a[1],u=a[2],d=a[3],p=a[4];if(null==l||null==u||null==d||null==p)return t;t[0].value=g,t[1].value=g,t[2].value=g,t[3].value=g,t[6].value=b;for(var _=0,f=t;_<f.length;_++){f[_].visible=!i}var m=t[4];m.visible=!1;var v=this._study.formatter(),S=this._changesData(p,l,s,i);if(void 0!==S.values){
var w=Object(c.forceLTRStr)(v.format(S.values.change,!0)+" ("+y.format(S.values.percentChange,!0)+")");t[6].value=w}i?(t[5].value=v.format(p),t[5].visible=!0,t[6].visible=!0):(t[0].value=v.format(l),t[1].value=v.format(u),t[2].value=v.format(d),t[3].value=v.format(p),m.value=v.format(this._study.barFunction()(a)),t[5].visible=!1);for(var P=this._color(s,S,i),C=0,x=t;C<x.length;C++){x[C].color=P}return t},e.prototype._showLastPriceAndChangeOnly=function(){return m&&(null===this._model.crossHairSource().pane||Object(d.isLineToolName)(p.tool.value())||null!==this._model.lineBeingEdited())},e.prototype._changesData=function(e,t,i,n){if(n&&!v){var r=this._study.quotes();if(null!==r)return{values:{change:r.change,percentChange:r.change_percent},priceDirection:{basedOnCurrentBar:r.change>=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='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><g fill="none" fill-rule="evenodd" stroke="currentColor" transform="translate(6 3)"><rect width="15" height="12" rx="2" x=".5" y="8.5"/><path stroke-linecap="round" stroke-width="2" d="M8 15v2"/><path d="M11.5 4a3.5 3.5 0 0 0-7 0v4.5"/></g></svg>'},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;s<r.length;s++){var a=r[s],l=n.measureText(a).width;if(l<=i)o.push(a);else for(var c=a.split(/([-)\]},.!?:;])|(\s+)/),u=0;c.length;){var d=~~(i/l*(c.length+2)/3);if(d<=0||n.measureText(c.slice(0,3*d-1).join("")).width<=i)for(;n.measureText(c.slice(0,3*(d+1)-1).join("")).width<=i;)d++;else for(;d>0&&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;i<e.points.length;++i)if(n=e.points[i],r=t.points[i],n.x!==r.x||n.y!==r.y)return!1}var n,r;return e.text===t.text&&e.vertAlign===t.vertAlign&&e.horzAlign===t.horzAlign&&e.font===t.font&&e.offsetX===t.offsetX&&e.offsetY===t.offsetY&&e.bold===t.bold&&e.italic===t.italic&&e.fontsize===t.fontsize&&e.fontSize===t.fontSize&&e.backgroundRoundRect===t.backgroundRoundRect&&e.forceTextAlign===t.forceTextAlign&&e.wordWrapWidth===t.wordWrapWidth&&e.padding===t.padding&&e.scaleY===t.scaleY&&e.scaleX===t.scaleX&&e.highlightBorder===t.highlightBorder&&e.backgroundHorzInflate===t.backgroundHorzInflate&&e.backgroundVertInflate===t.backgroundVertInflate&&e.boxPadding===t.boxPadding&&e.boxPaddingVert===t.boxPaddingVert&&e.boxPaddingHorz===t.boxPaddingHorz&&e.angle===t.angle&&e.maxHeight===t.maxHeight}(this._data,e)?(this._data=e,this._internalData=null,this._boxSize=null,this._linesInfo=null,this._fontInfo=null):this._data=e},e.prototype.hitTest=function(e){if(null===this._data||void 0===this._data.points||0===this._data.points.length)return null;var t,i,n,s=this._data.angle||0,a=this._getInternalData(),l=a.boxLeft,c=a.boxTop,u=a.boxWidth,h=a.boxHeight,d=this._getRotationPoint();u>h?(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;w<P.length;w++){S(P[w])}e.restore()}},e.prototype._getLinesMaxWidth=function(e){if(n||f(),n.textBaseline="alphabetic",n.font=this.fontStyle(),null!==this._data&&this._data.wordWrapWidth)return this._data.wordWrapWidth*I(this._data);for(var t=0,i=0,r=e;i<r.length;i++){var o=r[i];t=Math.max(t,n.measureText(o).width)}return t},e.prototype._getInternalData=function(){if(null!==this._internalData)return this._internalData;var e=Object(s.ensureNotNull)(this._data),t=this._getBoxSize(),i=t.boxWidth,n=t.boxHeight,r=Object(s.ensureDefined)(e.points)[0],o=r.y;switch(e.vertAlign){case"bottom":o-=n+e.offsetY;break;case"middle":o-=n/2;break;case"top":o+=e.offsetY}var a,c,u=r.x,h=S(e),d=b(e),p=P(e)+h,_=o+(w(e)+d)+x(e)/2;switch(e.horzAlign){case"left":c="start",a=(u+=e.offsetX)+p,Object(l.isRtl)()&&(e.forceTextAlign?c="left":(a=u+i-p,c="right"));break;case"center":c="center",a=u,u-=i/2;break;case"right":c="end",a=(u-=i+e.offsetX)+i-p,Object(l.isRtl)()&&e.forceTextAlign&&(c="right")}return{boxLeft:u,boxTop:o,boxWidth:i,boxHeight:n,textStart:a-u,textTop:_-o,textAlign:c,textBaseLine:"middle"}},
e.prototype._getLinesInfo=function(){if(null===this._linesInfo){var e=Object(s.ensureNotNull)(this._data),t=this.wordWrap(e.text,e.wordWrapWidth);if(void 0!==e.maxHeight){var i=function(e){var t=Object(s.ensureDefined)(e.maxHeight),i=x(e),n=C(e);return Math.floor((t+n)/(i+n))}(e);t.length>i&&(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;i<o.length;i++){var s=o[i];if(!Object(r.isObject)(s)||!Object(r.hasProperty)(s,"action"))throw new Error("Command should be an object with 'action' property");Object(n.assert)("all"===s.action||"one"===s.action,"Erase command action should be 'all' or 'one'")}}return e}var u=function(){function e(){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,this._hhistsByTimePointIndex=new Map}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.prototype.clear=function(){this._indexes=[],this._clearPrimitives()},e.prototype.extract=function(){var e=function(e){return e.extract()},t={indexes:this._indexes,horizlines:d(this._horizlines,e),vertlines:d(this._vertlines,e),lines:d(this._lines,e),hlines:d(this._hlines,e),textmarks:d(this._textmarks,e),shapemarks:d(this._shapemarks,e),backgrounds:d(this._backgrounds,e),polygons:d(this._polygons,e),trendchannels:d(this._trendchannels,e),hhists:d(this._hhists,e),dwglabels:d(this._dwglabels,e),dwglines:d(this._dwglines,e)};return this._hhistsByTimePointIndex=new Map,new l.a("data",t)},e.prototype.replaceIndexesTo=function(e){var t=this;this._indexes=e;var i=function(e){return e.replaceIndexesTo(t._indexes)};this._horizlines.forEach(i),this._vertlines.forEach(i),this._lines.forEach(i),this._hlines.forEach(i),this._textmarks.forEach(i),this._shapemarks.forEach(i),this._backgrounds.forEach(i),this._polygons.forEach(i),this._trendchannels.forEach(i),this._hhists.forEach(i),this._dwglabels.forEach(i),this._dwglines.forEach(i),this._hhistsByTimePointIndex=Object(a.b)(this._hhists)},e.prototype.processCommands=function(e,t){void 0!==e.erase&&this._processEraseCommands(e.erase),void 0!==e.create&&this._processCreateCommands(e.create,t)},e.prototype._processCreateCommands=function(e,t){for(var i in e)if(e.hasOwnProperty(i)){var r=i;switch(Object(n.assert)(r in t,"There is a '"+r+"' in study response, but it doesn't present in graphics info!"),r){case"horizlines":p(this._horizlines,e[r],t[r],this._indexes,o.b);break;case"vertlines":p(this._vertlines,e[r],t[r],this._indexes,s.b)}}this._hhistsByTimePointIndex=Object(a.b)(this._hhists)},e.prototype._processEraseCommands=function(e){for(var t=function(e){if("all"===e.action)i._clearPrimitives();else{var t=function(t){return t.deleteById(e.id)};switch(e.type){case"horizlines":i._horizlines.forEach(t);break;case"vertlines":i._vertlines.forEach(t);break;case"lines":i._lines.forEach(t);break;case"hlines":i._hlines.forEach(t);break;case"textmarks":i._textmarks.forEach(t);break;case"shapemarks":i._shapemarks.forEach(t);break;case"backgrounds":i._backgrounds.forEach(t);break;case"polygons":i._polygons.forEach(t);break;case"trendchannels":i._trendchannels.forEach(t);break;case"hhists":i._hhists.forEach(t);break;case"dwglabels":i._dwglabels.forEach(t);break;case"dwglines":i._dwglines.forEach(t)}}},i=this,n=0,r=e;n<r.length;n++){t(r[n])}this._hhistsByTimePointIndex=Object(a.b)(this._hhists)},e.prototype._clearPrimitives=function(){this._horizlines.clear(),this._vertlines.clear(),this._lines.clear(),this._hlines.clear(),this._textmarks.clear(),this._shapemarks.clear(),this._backgrounds.clear(),
this._polygons.clear(),this._trendchannels.clear(),this._hhists.clear(),this._dwglabels.clear(),this._dwglines.clear(),this._hhistsByTimePointIndex=new Map},e}(),h=function(){function e(e,t){this._primitivesDataById=new Map,this._primitiveById=new Map,this._materializePrimitive=e,this._indexes=t}return e.prototype.forEach=function(e,t){var i=this;this._primitiveById.forEach((function(n){e.call(t,n,n,i)}))},e.prototype.has=function(e){var t=!1;return this._primitiveById.forEach((function(i){t=t||i===e})),t},Object.defineProperty(e.prototype,"size",{get:function(){return this._primitiveById.size},enumerable:!1,configurable:!0}),e.prototype[Symbol.iterator]=function(){throw new Error("Not implemented")},e.prototype.entries=function(){throw new Error("Not implemented")},e.prototype.keys=function(){throw new Error("Not implemented")},e.prototype.values=function(){throw new Error("Not implemented")},e.prototype.hasId=function(e){return this._primitiveById.has(e)},e.prototype.addData=function(e){this._primitivesDataById.set(e.id,e),this._tryMaterialize(e)},e.prototype.deleteById=function(e){this._primitiveById.delete(e),this._primitivesDataById.delete(e)},e.prototype.clear=function(){this._primitivesDataById.clear(),this._primitiveById.clear()},e.prototype.replaceIndexesTo=function(e){this._indexes=e,this._primitiveById.clear(),this._primitivesDataById.forEach(this._tryMaterialize,this)},e.prototype.extract=function(){var e=new Set(this._primitivesDataById.values());return this._primitivesDataById=new Map,this._primitiveById.clear(),e},e.prototype._tryMaterialize=function(e){var t=this._materializePrimitive(e,this._indexes);null!==t&&(Object(n.assert)(!this._primitiveById.has(e.id),"primitive with specified id should not exist"),this._primitiveById.set(e.id,t))},e}();function d(e,t){var i=new Map;return e.forEach((function(e,n){return i.set(n,t(e))})),i}function p(e,t,i,r,o){if(void 0!==t)for(var s=0,a=t;s<a.length;s++){var l=a[s],c=l.styleId;void 0!==i&&Object(n.assert)(c in i,"Every style used by graphics primitive should be declared in study metainfo");var u=e.get(c);void 0===u&&(u=new h(o,r),e.set(c,u)),l.data.forEach(u.addData.bind(u))}}},rCHB:function(e,t,i){"use strict";var n;i.r(t),i.d(t,"LineToolPitchforkStyle",(function(){return n})),function(e){e[e.Original=0]="Original",e[e.Schiff=1]="Schiff",e[e.Inside=2]="Inside",e[e.Schiff2=3]="Schiff2"}(n||(n={}))},rL76:function(e,t,i){e.exports={labelwidth:"19px",labelheight:"19px",bordersize:"2px",bottommargin:"5px",gearheight:"15px",gearwidth:"15px","price-axis-stub":"price-axis-stub-3MoqVLRB",wrapper:"wrapper-1tN_aWXZ",label:"label-NpaJWak6",symbol:"symbol-2JyFiLZ_",gear:"gear-3B_8TAjc","fixed-gear":"fixed-gear-IiZPkpoQ","fixed-symbol":"fixed-symbol-2A_FZK26"}},rQHv:function(e,t,i){"use strict";var n=i("IiTo"),r={};e.exports=function(e,t,i){var o,s,a={},l=r[i]||"out_of_session",c=!1,u=i,h=t,d=null;function p(){var e={};e.symbolname=u,e.status="ok",e.values={},e.values.current_session=l,r[u]=l,TradingView.ChartapiMessagerInstances[h].onQuotesData([h].concat([e]))}
function _(){if(o)if(s)l="out_of_session";else{var e=n.isTradingNow((new Date).getTime(),o)?"market":"out_of_session";e!==l&&(l=e,p())}}return e(i,null,(function(e){c||function(e){o=new n.SessionInfo(e.timezone,e.session,e.holidays,e.corrections),s=e.expired,d=setInterval(_,6e4),_(),p()}(e)}),(function(){})),a.stop=function(){c=!0,d&&clearInterval(d)},a.marketStatus=function(){return l},a}},rY0k:function(e,t,i){"use strict";var n=i("xDuj").translatedIntervalString,r=i("hOqT").getTranslatedSymbolDescription,o=i("zDbI").CHART_FONT_FAMILY,s=i("di4O"),a=s.watermarkProperty,l=s.restoreWatermarkPropertyDefaults,c=i("ikwP").drawScaled;t.Watermark=function(e,t){var i={},s=a();function u(e,t){var n=e.font;return i.hasOwnProperty(n)||(i[n]={}),i[n].hasOwnProperty(t)||(i[n][t]=e.measureText(t).width),i[n][t]}s.listeners().subscribe(this,(function(){e.updateSource(this)})),this.destroy=function(){s.listeners().unsubscribeAll(this)},this.properties=function(){return s},this.restorePropertiesDefaults=function(){l()};var h={renderer:function(e,i){return{draw:function(a,l){c(a,l.pixelRatio,(function(){var l=t.symbolInfo();a.fillStyle=s.color.value();var c,h=l.name;/QUANDL/.test(l.exchange)&&((c=h.split(/\//)).length&&(h=c[c.length-1]));for(var d={description:l.description,short_description:l.short_description,pro_name:l.pro_name,short_name:l.name,local_description:l.local_description,language:l.language},p=[{text:h?h+", "+n(t.interval()):"",font:"96px "+o,lineHeight:117,vertOffset:0},{text:r(d)||"",font:"48px "+o,lineHeight:58,vertOffset:5}],_=0,f=0;f<p.length;f++){if((y=p[f]).text){a.font=y.font;var m=u(a,y.text);y.zoom=m>i?i/m:1,_+=y.lineHeight*y.zoom}}var v=Math.max((e-_)/2,0);for(f=0;f<p.length;f++){var y;(y=p[f]).text&&(a.save(),a.translate(i/2,v),a.textBaseline="top",a.textAlign="center",a.font=y.font,a.scale(y.zoom,y.zoom),a.fillText(y.text,0,y.vertOffset),a.restore(),v+=y.lineHeight*y.zoom)}}))}}},update:function(){}};this.paneViews=function(){return t.symbolInfo()&&s.visibility.value()?[h]:[]}}},s1Gx:function(e,t,i){"use strict";i.r(t),i.d(t,"specialZOrderBase",(function(){return r})),i.d(t,"sortSourcesPreOrdered",(function(){return o})),i.d(t,"sortSources",(function(){return s})),i.d(t,"isSpeciallyZOrderedSource",(function(){return a}));var n=i("mrSG"),r=1e7,o={ChartEventsSource:r+1,Dividends:r+2,Splits:r+3,Earnings:r+4,LineToolOrder:r+5,LineToolPosition:r+6,LineToolExecution:r+7,AlertLabel:r+8};function s(e){return Object(n.__spreadArrays)(e).sort((function(e,t){return e.zorder()-t.zorder()}))}function a(e){return e.zorder()>=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=$('<div class="bar-mark-tooltip"></div>'),this._layout_text=$('<div class="text"></div>').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<e?null:{closePrice:r.price,index:Math.min(t,r.index)}}var o=i[c.Close];if(o.index<e)return null;var s=Math.min(t,o.index);return{closePrice:n(this._model.mainSeries().bars().valueAt(s))[TradingView.CLOSE_PLOT],index:s}},p.prototype.migrateVersion=function(e,t,i){if(1===e&&this._points.length>=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;r<e.length;r++)if(this[r]){var o=this[r].merge(e[r],t);t&&(i=i.concat(o))}else this.addProperty(r,e[r]),t&&i.push(this[r]);else for(var s in e)if(this[s]){o=this[s].merge(e[s],t);t&&(i=i.concat(o))}else this.addProperty(s,e[s]),t&&i.push(this[s]);return t&&i.length>n&&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<this._childs.length;i++){var r=this._childs[i];if(!e||-1===e.indexOf(r))if(e){for(var o=[],s=0;s<e.length;s++){var a=e[s];a.startsWith(r+".")&&o.push(a.substr(r.length+1))}t[r]=this[r].state(o)}else t[r]=this[r].state()}return t},r.prototype.clone=function(e){return new r(this.state())},r.prototype.isPrimitiveType=function(e){return null===e||(!!isNumber(e)||(!!new TradingView.TypeValidator(String).check(e)||TradingView.isBoolean(e)))},r.prototype.value=function(){return this._value},r.prototype.listeners=function(){return this._listeners},r.prototype.childCount=function(){return this._childs.length},r.prototype.childNames=function(){return this._childs},r.prototype.child=function(e){return this[e]},r.prototype.setValue=function(e,t){(this._value!==e||t)&&(this._value=e,this._listeners.fire(this))},r.prototype.setValueSilently=function(e){this._value=e},r.prototype.addProperty=function(e,t){var i=new r(t);this[e]=i,this._childs.push(e),i.listeners().subscribe(this,r.prototype.childChanged)},r.prototype.removeProperty=function(e){this[e].listeners().unsubscribe(this,r.prototype.childChanged),delete this[e],this._childs=this._childs.filter((function(t){return t!==e}))},r.prototype.hasChild=function(e){return this._childs.indexOf(e)>=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='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 19" width="33" height="19"><path fill="#2196F3" d="M29.032 7.382a5.47 5.47 0 0 1 .963 2.872A4.502 4.502 0 0 1 28.5 19H6a5.98 5.98 0 0 1-4.222-1.737l9.546-7.556c.35.187.75.293 1.176.293a2.49 2.49 0 0 0 1.066-.238l4.55 3.981a2.5 2.5 0 1 0 4.711-.157l6.205-6.204zm-1.414-1.414l-6.204 6.204A2.494 2.494 0 0 0 20.5 12a2.49 2.49 0 0 0-1.066.238l-4.55-3.981a2.5 2.5 0 1 0-4.801-.118L.608 15.638A6 6 0 0 1 6.061 7a8.001 8.001 0 0 1 15.625-1.227A5.474 5.474 0 0 1 24.5 5c1.157 0 2.231.358 3.118.968z"/></svg>'},"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<this.items.length&&!n(this.items[t].y);)t++;for(var i=this.items.length-1;i>=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,a<i&&s[a+1].style){var c=s[a+1].style.color;if(h!==c){var u=o[c]||[]
;u.push(l),o[c]=u}}(d=o[h]||[]).push(l),o[h]=d}for(var h in o){var d=o[h];e.beginPath();var p=0;for(a=0;a<d.length;a++)d[a].style&&d[a].style.color!==h&&(e.moveTo(d[p].x,this.bottom),this.walkLine(e,d.slice(p,a),!0,this.bottom),p=a);if(e.moveTo(d[p].x,this.bottom),this.walkLine(e,d.slice(p,d.length),!0,this.bottom),e.closePath(),this.isSeries){var _=e.createLinearGradient(0,0,0,this.bottom);_.addColorStop(0,this.color1),_.addColorStop(1,this.color2),e.fillStyle=_,this._simpleMode=!0}else e.fillStyle=h;e.fill()}e.lineWidth=this.lineWidth,r.prototype._drawImpl.call(this,e)}}},t.PaneRendererArea=TradingView.PaneRendererArea=o},u5Q5:function(e,t,i){"use strict";i.r(t),i.d(t,"bindToInput",(function(){return h})),i.d(t,"activateKeyPressHandler",(function(){return _})),i.d(t,"showDialog",(function(){return f})),i.d(t,"setSearchRequestDelay",(function(){return m}));var n=i("6et/"),r=i("h24c"),o=i("Kxc7"),s=i("mYjs"),a=i("pPtI"),l=i("PT1i"),c=i("JWMC");function u(){return new Promise((function(e){Promise.all([i.e(31),i.e(32),i.e(42),i.e(87),i.e(15),i.e(30),i.e(36),i.e("symbolsearch")]).then(function(t){e(i("m5UM"))}.bind(null,i)).catch(void 0)}))}function h(e,t){return u().then((function(i){return i.bindToInput(e,t)}))}function d(e){Object(a.setLastUsedResolution)(e),l.linking.interval.setValue(e)}function p(e){if(!Object(r.globalKeypressMatches)(e))return!1;e.preventDefault();var t=String.fromCharCode(e.charCode);return function(e){return/[\d,]/.test(e)}(t)&&o.enabled("show_interval_dialog_on_key_press")?Object(s.showChangeIntervalDialog)({callback:d,ownerDocument:e.target&&e.target.ownerDocument},t):o.enabled("symbol_search_hot_key")&&u().then((function(i){Object(c.trackEvent)("GUI","SS","hotkey"),i.showDialog({initialValue:t,callback:function(e,t){l.linking.symbol.setValue(e),t&&d(t)},ownerDocument:e.target&&e.target.ownerDocument})})),!0}function _(){n.pushBackListener("symbolEdit",p)}function f(e){return u().then((function(t){return t.showDialog(e)}))}function m(e){return u().then((function(t){return t.setSearchRequestDelay(e)}))}},uDHo:function(e,t,i){"use strict";var n,r;i.r(t),i.d(t,"Helpers",(function(){return n})),i.d(t,"TIMEFRAMETYPE",(function(){return r})),function(e){e.extractErrorReason=function(e){return e.params[1]}}(n||(n={})),function(e){e.PeriodBack="period-back",e.TimeRange="time-range"}(r||(r={}))},uPb3:function(e,t,i){"use strict";(function(e,n){i("xrEm");var r=i("u+0B").TextWidthCache,o=i("7KDR").Separator,s=i("5VQP").ContextMenuManager,a=i("H0vP").InvalidationLevel,l=i("ikwP"),c=l.createBoundCanvas,u=l.getContext2D,h=l.drawScaled,d=l.hardResizeCanvas,p=l.clearRect,_=l.fillRect,f=l.Size,m=i("S8xo").MouseEventHandler,v=i("JWMC").trackEvent,y=i("XlJ7").makeFont,g=i("8OdW"),b=i("CW80").isLineTool,S=i("mE5r").PriceAxisesContainer,w=i("1IXQ").PriceAxisWidget,P=i("3/8U").axesHighlightColor,C=i("zDbI").CHART_FONT_FAMILY,x={contextMenuEnabled:!0,timezoneMenuEnabled:!0,pressedMouseMoveScale:!0};function T(t,i,n,r,s){this._options=Object.assign({},x,i),this.chart=t,
this._properties=t.properties().scalesProperties,this.contextMenu=null,this._element=document.createElement("tr"),this._backgroundBasedTheme=s;var a=t.model().model().rendererOptionsProvider(),l=this.backgroundColor.bind(this);function u(){throw new Error("Time axis does not support real price scales")}var h=this;var d={titlesProvider:n,stubContextMenuProvider:function(e,t){var i=h.getContextMenuActions(!0),n=r(e,t);return n[n.length-1]===h.chart.actions().scalesProperties?Array.prototype.splice.apply(n,[n.length-2,0,new o].concat(i)):(n.push(new o),n=n.concat(i)),n},backgroundBasedTheme:s,rendererOptionsProvider:a,getBackgroundTopColor:l,getBackgroundBottomColor:l};this._onLabelHovered=new e,this._lhsStubContainer=new S(this._properties,w.LHS,u,d,this._options.priceAxisLabelsOptions),this._lhsStubContainer.onLabelHovered().subscribe(this,function(e,t){this._onLabelHovered.fire(e,t)}.bind(this)),this._rhsStubContainer=new S(this._properties,w.RHS,u,d,this._options.priceAxisLabelsOptions),this._rhsStubContainer.onLabelHovered().subscribe(this,function(e,t){this._onLabelHovered.fire(e,t)}.bind(this)),this._element.appendChild(this._lhsStubContainer.getElement()),this._cell=document.createElement("td"),this._element.appendChild(this._cell),this._cell.classList.add("chart-markup-table","time-axis"),this._cell.style.height="25px",this._dv=document.createElement("div"),this._dv.style.width="100%",this._dv.style.height="100%",this._dv.style.position="relative",this._dv.style.overflow="hidden",this._cell.appendChild(this._dv),this._canvasConfiguredHandler=function(){this.chart.model().model().lightUpdate()}.bind(this),this._canvasBinding=c(this._dv,new f(16,16)),this._canvasBinding.subscribeCanvasConfigured(this._canvasConfiguredHandler);var p=this._canvasBinding.canvas;p.style.position="absolute",p.style.zIndex="1",p.style.left="0",p.style.top="0",this._topCanvasConfiguredHandler=function(){this.chart.model().model().lightUpdate()}.bind(this),this._topCanvasBinding=c(this._dv,new f(16,16)),this._topCanvasBinding.subscribeCanvasConfigured(this._topCanvasConfiguredHandler);var _=this._topCanvasBinding.canvas;_.style.position="absolute",_.style.zIndex="2",_.style.left="0",_.style.top="0",this._element.appendChild(this._rhsStubContainer.getElement()),this.restoreDefaultCursor(),this.update(),this._minVisibleSpan=g.MINUTE_SPAN,this._mouseEventHandler=new m(this._topCanvasBinding.canvas,this,{treatVertTouchDragAsPageScroll:!0,treatHorzTouchDragAsPageScroll:!1}),this.size=new f(0,0)}T.prototype.destroy=function(){this._mouseEventHandler.destroy(),this._topCanvasBinding.unsubscribeCanvasConfigured(this._topCanvasConfiguredHandler),this._topCanvasBinding.destroy(),this._canvasBinding.unsubscribeCanvasConfigured(this._canvasConfiguredHandler),this._canvasBinding.destroy(),this._rhsStubContainer.onLabelHovered().unsubscribeAll(this),this._lhsStubContainer.onLabelHovered().unsubscribeAll(this),this._lhsStubContainer.destroy(),this._rhsStubContainer.destroy(),this.chart.properties().paneProperties.background.unsubscribeAll(this)},
T.prototype.getElement=function(){return this._element},T.prototype.hasCanvas=function(e){return this._canvasBinding.canvas===e||this._topCanvasBinding.canvas===e},T.prototype._BORDER_SIZE=1,T.prototype._OFFSET_SIZE=1,T.prototype._TICK_LENGTH=3,T.prototype.onLabelHovered=function(){return this._onLabelHovered},T.prototype.backgroundColor=function(){return this.chart.model().model().backgroundColor().value()},T.prototype.lineColor=function(){return this._properties.lineColor.value()},T.prototype.textColor=function(){return this._properties.textColor.value()},T.prototype.fontSize=function(){return this._properties.fontSize.value()},T.prototype.baseFont=function(){return y(this.fontSize(),C)},T.prototype.baseBoldFont=function(){return y(this.fontSize(),C,"","bold")},T.prototype.rendererOptions=function(){this._rendererOptions||(this._rendererOptions={borderSize:this._BORDER_SIZE,offsetSize:this._OFFSET_SIZE,tickLength:this._TICK_LENGTH,fontSize:NaN,font:"",widthCache:new r});var e=this._rendererOptions;if(e.fontSize!==this.fontSize()){var t=this.fontSize();e.fontSize=t,e.font=this.baseFont(),e.font=y(this.fontSize(),C,""),e.paddingTop=Math.ceil(t/2.5),e.paddingBottom=e.paddingTop,e.paddingHorizontal=Math.ceil(t/2),e.baselineOffset=Math.round(this.fontSize()/5),e.widthCache.reset()}return this._rendererOptions},T.prototype._zoomAvailable=function(){return!this.chart.model().timeScale().isEmpty()&&this.chart.model().model().zoomEnabled()&&this._options.pressedMouseMoveScale},T.prototype._mouseDownOrTouchStartEvent=function(e){if(this._mousedown||!this._zoomAvailable())return!0;this._mousedown=!0;var t=this.chart.model();t.timeScale().isEmpty()||t.startScaleTime(e.localX)},T.prototype.mouseDownEvent=function(e){this._mouseDownOrTouchStartEvent(e)},T.prototype.touchStartEvent=function(e){this._mouseOrTouchEnterEvent(e),this._mouseDownOrTouchStartEvent(e)},T.prototype.mouseDownOutsideEvent=function(e){this._zoomAvailable()&&this._mousedown&&(this._mousedown=!1,this.chart.model().endScaleTime(),this.restoreDefaultCursor())},T.prototype._pressedMouseOrTouchMoveEvent=function(e){this._zoomAvailable()&&this.chart.model().scaleTimeTo(e.localX)},T.prototype.pressedMouseMoveEvent=function(e){this._pressedMouseOrTouchMoveEvent(e)},T.prototype.touchMoveEvent=function(e){this._pressedMouseOrTouchMoveEvent(e)},T.prototype._mouseUpOrTouchEndEvent=function(e){this._zoomAvailable()&&(this._mousedown=!1,this.chart.model().endScaleTime(),this.restoreDefaultCursor())},T.prototype.mouseUpEvent=function(e){this._mouseUpOrTouchEndEvent(e)},T.prototype.touchEndEvent=function(e){this._mouseUpOrTouchEndEvent(e),this._mouseOrTouchLeaveEvent(e)},T.prototype._contextMenuOrTouchContextMenuEvent=function(e){this._options.contextMenuEnabled&&this._createContextMenu().then((function(t){t.show(e)}))},T.prototype.contextMenuEvent=function(e){this._contextMenuOrTouchContextMenuEvent(e)},T.prototype.touchContextMenuEvent=function(e){this._contextMenuOrTouchContextMenuEvent(e)},T.prototype._mouseOrTouchEnterEvent=function(e){
this.chart.model().model().zoomEnabled()&&this.setCursor("ew-resize")},T.prototype.mouseEnterEvent=function(e){this._mouseOrTouchEnterEvent(e)},T.prototype._mouseOrTouchLeaveEvent=function(e){this.restoreDefaultCursor()},T.prototype.mouseLeaveEvent=function(e){this._mouseOrTouchLeaveEvent(e)},T.prototype._createContextMenu=function(){return s.createMenu(this.getContextMenuActions(),{statName:"TimeScaleContextMenu"})},T.prototype.getContextMenuActions=function(e){var t=this.chart;t.updateActions();var i=t.actions(),r=[];return e||r.push(i.timeScaleReset,new o),this._options.timezoneMenuEnabled&&r.push(i.applyTimeZone),r.push(i.sessionBreaks),n.enabled("charting_library_base")||r.push(i.extendedHours),r},T.prototype._mouseDoubleClickOrDoubleTapEvent=function(e){v("GUI","Double click time scale"),this.chart.model().resetTimeScale()},T.prototype.mouseDoubleClickEvent=function(e){this._mouseDoubleClickOrDoubleTapEvent(e)},T.prototype.doubleTapEvent=function(e){this._mouseDoubleClickOrDoubleTapEvent(e)},T.prototype.optimalHeight=function(){var e=this.rendererOptions();return Math.ceil(e.offsetSize+e.borderSize+e.tickLength+e.fontSize+e.paddingTop+e.paddingBottom)},T.prototype.setSizes=function(e,t,i){this.size&&this.size.equals(e)||(this.size=e,this._canvasBinding.resizeCanvas({width:e.w,height:e.h}),this._topCanvasBinding.resizeCanvas({width:e.w,height:e.h}),this._cell.style.width=e.w+"px",this._cell.style.height=e.h+"px"),this._lhsStubContainer.setSizes(e.h,t),this._rhsStubContainer.setSizes(e.h,i)},T.prototype._spanIndex=function(e){for(var t=[g.MINUTE_SPAN,g.HOUR_SPAN,g.DAY_SPAN,g.MONTH_SPAN,g.YEAR_SPAN],i=t.length-1;i>0;){if(t[i]<=e)return i;i--}return i},T.prototype._spanOffset=function(e,t){if(t<e)throw new Error("actual span cuold not be less then base");return this._spanIndex(t)-this._spanIndex(e)},T.prototype.update=function(){if(this.chart.model()){var e=this.chart.model().timeScale().marks();if(e){var t=this;this._minVisibleSpan=g.YEAR_SPAN,e.forEach((function(e){t._minVisibleSpan=Math.min(e.span,t._minVisibleSpan)}))}}},T.prototype._hightlightBackground=function(e,t,i){for(var n=this.chart.model().timeScale(),r=t[0].index,o=t[0].index,s=1;s<t.length;s++)r=Math.min(r,t[s].index),o=Math.max(o,t[s].index);var a=Math.floor(n.indexToCoordinate(r)*i),l=Math.ceil(n.indexToCoordinate(o)*i),c=this._backgroundBasedTheme.value(),u=P(c);_(e,a,0,l-a,Math.ceil(this.size.h*i)+1,u)},T.prototype.drawBackground=function(e,t){p(e,0,0,Math.ceil(this.size.w*t)+1,Math.ceil(this.size.h*t)+1,this.backgroundColor());var i=this.chart.model();if(i){if(!i.timeScale().isEmpty()){var n=i.model().selection().sources().filter((function(e){return b(e)})).reduce((function(e,t){var i=t.axisPoints();return 0===i.length?e:e.concat(i)}),[]);n.length>0&&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<i.length;t++){(r=i[t]).span<n&&e.fillText(r.label,r.coord,o)}e.font=d.baseBoldFont();for(t=0;t<i.length;t++){var r;(r=i[t]).span>=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<r.length;a++){var l=r[a];if(!i.has(l)&&l.timeAxisViews){var c=l.timeAxisViews();if(c)for(var u=0;u<c.length;u++)c[u].renderer().draw(e,s,t)}}e.restore()},T.prototype._minMaxViews=function(e){var t=[],i={value:null,view:null},n={value:null,view:null};return e.forEach((function(e){if(e.timeAxisViews){var t=e.timeAxisViews();if(t&&t.length)for(var r=0;r<t.length;r++){var o=t[r],s=o.coordinate();(null===i.value||i.value<=s)&&(i={value:s,view:o}),(null===n.value||n.value>=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;o<i.length;o++)for(var s=i[o].points,a=0;a<s.length;a++){var l=s[a];if(l[1]>0){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.length;l++){for(var u=o[l].points,h=[],d=0;d<u.length;++d)if(u[d][1]<0&&(u[d][1]=0),0!==u[d][1]){var p=i.getPointTimeUTC(u[d][0],u[d][1],r);h.push(p)}else u[d][0]&&h.push(u[d][0]);var _={guid:o[l].guid,points:h};e[s].push(_)}c.fire({symbolInfo:r,session:t.session})})),a.clear(),l=null}function p(e,t,i,n,r){for(var o=[],s=0;s<e.points.length;++s){var a=e.points[s];if(null==a)return null;var l=_(t,a,i,n,r);if(null===l)return null;o.push({index:s,value:[l,a]})}return o}function _(e,t,i,s,a){if(1e3*(t=m([t],a,s)[0])<e[0].value[0])return-function(e,t,i,o,s){var a=r.parse(t),l=m([i,o],t,e);if(i=l[0],o=l[1],i>=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]<t}));if(l!==e.length&&t<e[e.length-1].value[0])return e[l].value[0]/1e3!==t&&0!==l&&l--,e[l].index;var c=i.indexOfBar(t,s);return-1===c?null:c}function f(e,t,i,n,r){var o,s,a,l,c;if(t.isMonths())s=r,l=new Date(1e3*n),c=new Date(1e3*s),a=12*(c.getFullYear()-l.getFullYear()),a-=l.getMonth()+1,
o=((a+=c.getMonth())<=0?0:a)/t.multiplier();else if(t.isWeeks()){var u=Math.ceil((r-n)/604800);o=Math.ceil(u/t.multiplier())}else{var d,p=h.utc_to_cal(i.timezone,+new Date(1e3*n)),_=h.utc_to_cal(i.timezone,+new Date(1e3*r)),f=(r-n)/86400;if(f>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;o<r.length;o++)if(r[o].guid===t)return r.splice(o,1),void(0===r.length&&i.push(n))}));for(var n=0;n<i.length;n++)a.delete(i[n]);for(var r in e){var o=e[r];for(n=0;n<o.length;++n)if(o[n].guid===t)return void o.splice(n,1)}},broadcastPointsetsUpdates:function(t,i,n,r,o,s){var a=t;if(e.hasOwnProperty(a))for(var l=e[a].length,c=0;c<l;++c){var u=e[a][c],h=p(u,n,r,o,i);null!==h&&s(u.guid,h)}},pointsetsCreated:function(){return c},tests:{approxBarsInterval:f,indexOfTime:_}}}();e.exports=a}).call(this,i("yLpj"))},ufwo:function(e,t,i){"use strict";i.r(t),i.d(t,"rangesAreEqual",(function(){return r}));var n=i("LxhU");function r(e,t){return!(!n.Interval.isEqual(e.res,t.res)||e.val.type!==t.val.type)&&("period-back"===e.val.type&&"period-back"===t.val.type?e.val.value===t.val.value:"time-range"===e.val.type&&"time-range"===t.val.type&&(e.val.to===t.val.to&&e.val.from===t.val.from))}},ulZB:function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return a}));var n=i("mrSG"),r=i("aIyQ"),o=i.n(r),s=function(){function e(e,t,i,n,r){var s=this;this._onChange=new o.a,this._handleChange=function(){s._onChange.fire(s.get())},this._crossTabEvents=e,this._jsonKeyValueStore=t,this.CROSSTAB_EVENT_NAME=i,this.JSON_STORE_KEY=n,this.defaultStoreValue=this._serialize(r),this._subscribe()}return e.prototype.get=function(){var e=this._jsonKeyValueStore.getJSON(this.JSON_STORE_KEY,this.defaultStoreValue);return this._deserialize(e)},e.prototype.set=function(e,t){var i=this._serialize(e);this._jsonKeyValueStore.setJSON(this.JSON_STORE_KEY,i,t),this._crossTabEvents.emit(this.CROSSTAB_EVENT_NAME),this._onChange.fire(e)},
e.prototype.getOnChange=function(){return this._onChange},e.prototype.destroy=function(){this._unsubscribe(),this._onChange.destroy(),delete this._onChange},e.prototype._subscribe=function(){this._crossTabEvents.on(this.CROSSTAB_EVENT_NAME,this._handleChange),this._jsonKeyValueStore.onSync.subscribe(this,this._handleChange)},e.prototype._unsubscribe=function(){this._crossTabEvents.off(this.CROSSTAB_EVENT_NAME,this._handleChange),this._jsonKeyValueStore.onSync.unsubscribe(this,this._handleChange)},e}(),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype._serialize=function(e){return e},t.prototype._deserialize=function(e){return e},t}(s)},v5F8:function(e,t,i){"use strict";var n=i("5rJj"),r=i("aDyP").LineToolPitchfork,o=window.t("Modified 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"Modified Schiff Pitchfork"},s.createProperties=function(e){var t=new n("linetoolschiffpitchfork",e,!1,{range:[0,8]});return s._configureProperties(t),t},s._configureProperties=function(e){r._configureProperties(e)},t.LineToolSchiffPitchfork=s},vADo:function(e,t,i){"use strict";(function(t){function i(e){t.call(this,""),this.subscribe(this,i.prototype.checkSelfColor),this.reloadProperties(e)}inherit(i,t),i.prototype.reloadProperties=function(e){for(;this._childs.length>0;)this.removeProperty(this._childs[0]);this._initValues=[];for(var t=0;t<e.length;++t)this._initValues.push(e[t].defaultValue),this.addChild(t,e[t].property);this.checkSelfColor()},i.prototype.setValue=function(e,i){if(this._value!==e||i){var n=this;this._childs.forEach((function(t){n[t].setValueSilently(e||n._initValues[t])})),t.prototype.setValue.call(this,e,i)}},i.prototype.checkSelfColor=function(){for(var e=!0,i=0;i<this._initValues.length;++i)if(this[i].value()!==this[0].value()){e=!1;break}t.prototype.setValue.call(this,e?this[0].value():"")},e.exports=i}).call(this,i("tc+8"))},vAx0:function(e,t,i){"use strict";var n=i("aO4+").Point,r=i("f6yo").pointInCircle,o=i("VdBB").HitTestResult,s=i("Zy3/").CompositeRenderer,a=i("6xeX").Tooltip,l=(i("GH0z").PercentageFormatter,i("55Xp").roundToFirstValuable,i("LxhU").Interval,i("jCNj").utc_to_cal),c=i("jCNj").get_timezone,u=i("ZZnO").dateFormatProperty,h=i("gQ5K").DateFormatter,d=i("ikwP"),p=d.Size,_=d.createDisconnectedCanvas,f=d.getPrescaledContext2D,m=i("cPgM").ScaledPaneRenderer,v=i("z+cS").VerticalLineRenderer,y=i("zDbI").CHART_FONT_FAMILY;function g(e,t,i,n){this._lastClickedId=null,this._model=e,this._study=t,this._lollipops={},this._textCache={},this.templatesCache={},this._invalidated=!0,this._hideLollipops=!1,this.defaultStyle=i,this.hoveredStyle=n,this._templatesSize=new p(300,150),this.templatesCache.hovered=void 0!==this.hoveredStyle?this.createTemplate(this.hoveredStyle):null,this.templatesCache.default=void 0!==this.defaultStyle?this.createTemplate(this.defaultStyle):null,
this._onPaneBgChangeBound=this.onPaneBgChange.bind(this),e.backgroundColor().subscribe(this._onPaneBgChangeBound),e.mainSeries().onSymbolIntervalChanged().subscribe(this,this._onSymbolOrIntervalChanged)}function b(e){m.call(this),this.data=e,this._hittest=new o(o.CUSTOM,e)}function S(e,t){m.call(this),this._data=e,this._paneView=t,this.textRenderer=new S.TextRenderer(e.style.lollipop.importance)}g.prototype.destroy=function(){this._model.backgroundColor().unsubscribe(this._onPaneBgChangeBound),this._model.mainSeries().onSymbolIntervalChanged().unsubscribeAll(this)},g.prototype.onPaneBgChange=function(){void 0!==this.defaultStyle&&(this.defaultStyle.lollipop.fillStyle=this._model.backgroundColor().value(),this._stylesCache=null,Object.keys(this.templatesCache).forEach((function(e){0===e.indexOf("default")&&(this.templatesCache[e]=null)}),this))},g.prototype.onClickOutside=function(){this.clearLastClicked()},g.prototype.clearLastClicked=function(){this._lastClickedId=null},g.prototype.closeTooltips=function(){for(var e in this._lollipops)if(this._lollipops.hasOwnProperty(e)){var t=this._lollipops[e];t.visible&&(t.tooltip.isOpened()&&t.tooltip.hide(),t.visible=!1)}},g.prototype.getLastClickedLollipopId=function(){return this._lastClickedId},g.prototype._setStackStudies=function(){this._stackStudies=[]},g.prototype._getY=function(){for(var e=0,t=this._model.panes(),i=t.length;i--;){var n=t[i];n.containsMainSeries()&&(e+=n.height())}return e},g.prototype.update=function(){this._invalidated=!0},g.prototype.updateImpl=function(){this._setStackStudies();var e=this,t=this._study.data(),i=this._model.timeScale(),n=i.visibleBarsStrictRange(),r=this._model.mainSeries().bars(),o=this._study.priceScale(),s=this._model.mainSeries().firstBar();if(o&&!o.isEmpty()&&!i.isEmpty()&&s&&t){0,this._hideLollipops=!1,this.closeTooltips();var a=this._getY(),l=n.firstBar(),c=n.lastBar();t.range(l,c).each((function(t,n){for(var s=0,u=0;u<e._stackStudies.length;++u)e._stackStudies[u].data().contains(t)&&++s;t>l&&t<c&&e.addLollipop(a,r,i,o,t,n,s)})),this.afterUpdate(a,r,i,o)}},g.prototype.addLollipop=function(e,t,i,r,o,s,l){var c=s[0],u=this._model.mainSeries().symbolInfo();if(u){var h=u.name,d=null,p=this._study.metaInfo().id+"_"+c+"_"+h,_=this._model.lastHittestData(),f=_&&_.id===p;if(f){var m=t.valueAt(o);if(null!==m){var v=m[TradingView.LOW_PLOT],y=this._model.mainSeries().firstValue();d=r.priceToCoordinate(v,y)}}this._lollipops[p]=Object.assign({id:p,visible:!0,basePoint:new n(i.indexToCoordinate(o),e),hovered:f||p===this.getLastClickedLollipopId(),barY:d,stack:l,tooltip:this._lollipops.hasOwnProperty(p)?this._lollipops[p].tooltip:new a({width:240})},this.extraData(s))}},g.prototype.afterUpdate=function(e,t,i){},g.prototype.extraData=function(e){throw new Error("Not Implemented")},g.prototype.createText=function(e,t){throw new Error("Not Implemented")},g.prototype.showBarLine=function(){return!0},g.prototype.getStyle=function(e,t){var i=e;if(t.stack&&(i+="_stack:"+t.stack),"hovered"===i)return this.hoveredStyle
;if("default"===i)return this.defaultStyle;if(this._stylesCache||(this._stylesCache={}),!this._stylesCache[i]){var n=TradingView.clone("hovered"===e?this.hoveredStyle:this.defaultStyle);t.stack&&(n.lollipop.incHeight=24*t.stack),this._stylesCache[i]=n}return this._stylesCache[i]},g.prototype.hasTooltip=function(e){return!0},g.prototype.renderer=function(e,t){if(this._invalidated&&(this.updateImpl(),this._invalidated=!1),this._hideLollipops)return null;var i=new s;for(var r in this._lollipops)if(this._lollipops.hasOwnProperty(r)){var o=this._lollipops[r],a=this.getStyle(o.hovered?"hovered":"default",o);if(o.visible){var l=Object.assign({tooltipPoint:new n(o.basePoint.x,o.basePoint.y-a.lollipop.circleHeight-15-(a.lollipop.incHeight||0)),style:a,createText:this.createText.bind(this)},o),c=this.getTemplate(o.hovered?"hovered":"default",o),u={circlePoint:new n(o.basePoint.x,o.basePoint.y-a.lollipop.circleHeight-(a.lollipop.incHeight||0)),style:a,template:c,templateSize:this._templatesSize,basePoint:o.basePoint,id:o.id,clickHandler:this._lollipopMouseClickHandler.bind(this,o.id),tapHandler:this._lollipopMouseClickHandler.bind(this,o.id)};if(i.append(new b(u)),o.hovered&&this.hasTooltip(o)&&o.barY&&this.showBarLine()){var h={width:t,height:e,color:a.strokeStyle,linestyle:a.barLine.lineStyle,linewidth:a.lineWidth,x:o.basePoint.x,top:0,bottom:o.basePoint.y-a.lollipop.circleHeight},d=new v;d.setData(h),i.insert(d)}i.append(new S(l,this))}}return i},g.prototype.getTemplate=function(e,t){var i=e;return t.stack&&(i+="_stack:"+t.stack),this.templatesCache[i]||(this.templatesCache[i]=this.createTemplate(this.getStyle(e,t))),this.templatesCache[i]},g.prototype.createTemplate=function(e){var t=_(document,this._templatesSize),i=f(t),r=new n(e.lollipop.width/2,e.lollipop.height-e.lollipop.circleHeight-(e.lollipop.incHeight||0));return this.drawCircle(i,e,r),this.drawLabel(i,e,r),t},g.prototype.drawCircle=function(e,t,i){e.strokeStyle=t.strokeStyle,e.fillStyle=t.lollipop.fillStyle,e.lineWidth=t.lollipop.lineWidth,CanvasEx.setLineStyle(e,CanvasEx.LINESTYLE_SOLID),e.beginPath(),e.arc(i.x,i.y,t.lollipop.radius,0,2*Math.PI,!1),e.closePath(),e.stroke(),t.lollipop.fillCircle&&e.fill()},g.prototype.drawLabel=function(e,t,i){e.textAlign="center",e.textBaseline="middle",e.fillStyle=t.lollipop.text.strokeStyle,e.font=t.lollipop.text.font,e.fillText(t.lollipop.text.label,i.x,i.y)},g.prototype._lollipopMouseClickHandler=function(e){this._lastClickedId=this._lastClickedId===e?null:e},g.prototype._formatDate=function(e){var t=c(this._model.properties().timezone.value()),i=l(t,e);return new h(u.value()).format(i)},g.prototype._onSymbolOrIntervalChanged=function(){this.clearLastClicked(),this.closeTooltips()},inherit(b,m),b.prototype.hitTest=function(e){return r(e,this.data.circlePoint,this.data.style.lollipop.radius)?this._hittest:null},b.prototype._drawImpl=function(e){var t=this.data.template
;e.drawImage(t,this.data.basePoint.x-(.5+this.data.style.lollipop.width/2<<0)+.5,this.data.basePoint.y-this.data.style.lollipop.height+.5,this.data.templateSize.w,this.data.templateSize.h)},inherit(S,m),S.prototype._drawImpl=function(e){this._data.createText(this._data,this.textRenderer),this._paneView.getLastClickedLollipopId()===this._data.id?this._data.tooltip.show({items:[this.textRenderer],x:this._data.basePoint.x,y:this._data.basePoint.y-this._data.style.lollipop.circleHeight-10-2*this._data.style.lollipop.radius*(this._data.stack?this._data.stack:0),wrapElement:e.canvas.parentNode,leftBorderColor:this._data.color}):this._data.tooltip.hide()},S.prototype.hitTest=function(e){return null},S.TextRenderer=function(e){this.lines=[],this.fontHeight=12,this.font=this.fontHeight+"px "+y,this.lineSpacing=8,this.fillStyle="black",e&&(this.importance=e)},S.TextRenderer.prototype.draw=function(e,t){for(var i=t.y,n=0;n<this.lines.length;n++){var r=this.lines[n];e.font=this.font,r.options.fontWeight&&(e.font=r.options.fontWeight+" "+this.font),e.fillStyle=this.fillStyle,r.renderer(e,r.line,{x:t.x,y:i}),i+=this.lineSpacing+this.fontHeight}},S.TextRenderer.prototype.measure=function(){return this.lines.length*(this.fontHeight+this.lineSpacing)-this.lineSpacing},S.TextRenderer.prototype.basicRenderer=function(e,t,i){e.fillText(t,i.x,i.y)},S.TextRenderer.prototype.addMulticolorTextLine=function(e,t){this.addTextLine(e,t,this.multicolorRenderer)},S.TextRenderer.prototype.addTextLine=function(e,t,i){i||(i=this.basicRenderer),t||(t={}),this.lines.push({line:e,renderer:i,options:t})},S.TextRenderer.prototype.multicolorRenderer=function(e,t,i){for(var n=i.x,r=0;r<t.length;++r){var o=t[r];e.fillStyle=o.color,e.fillText(o.text,n,i.y),n+=e.measureText(o.text).width}},t.ESDPaneView=g},vIQA:function(e,t,i){"use strict";var n=i("ocLq");i("2cgs");var r=i("hyq/").pivotPointsStandardStudyItem,o=i("QCyK").spreadStudyItem,s=i("teHb").ratioStudyItem;JSServer.studyLibrary=JSServer.studyLibrary.concat([{name:"Compare",metainfo:{_metainfoVersion:15,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!0,defaults:{styles:{compare:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#800080"}},precision:4,inputs:{source:"close",symbol:""}},plots:[{id:"compare",type:"line"}],styles:{compare:{title:"Plot",histogramBase:0}},description:"Compare",shortDescription:"Compare",is_price_study:!0,inputs:[{defval:"close",id:"source",name:"Source",options:["open","high","low","close","hl2","hlc3","ohlc4"],type:"text"},{id:"symbol",name:"Symbol",type:"symbol",isHidden:!0}],id:"Compare@tv-basicstudies-1"},constructor:function(){this.init=function(e,t){this._context=e,this._context.new_sym(t(1),n.Std.period(this._context),n.Std.period(this._context))},this.main=function(e,t){this._context=e;var i=this._context.new_unlimited_var(this._context.symbol.time);this._context.select_sym(1);var r=this._context.new_unlimited_var(this._context.symbol.time),o=n.Std[t(0)](this._context),s=this._context.new_unlimited_var(o)
;return this._context.select_sym(0),[s.adopt(r,i,0)]}}},{name:"Overlay",metainfo:{_metainfoVersion:15,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!0,defaults:{styles:{},precision:4,inputs:{symbol:""}},plots:[{id:"open",type:"line"},{id:"high",type:"line"},{id:"low",type:"line"},{id:"close",type:"line"}],styles:{open:{title:"Open"},high:{title:"High"},low:{title:"Low"},close:{title:"Close"}},description:"Overlay",shortDescription:"Overlay",is_price_study:!1,inputs:[{id:"symbol",name:"symbol",defval:"",type:"symbol",isHidden:!0}],id:"Overlay@tv-basicstudies-1"},constructor:function(){this.init=function(e,t){this._context=e,this._context.new_sym(t(0),n.Std.period(this._context),n.Std.period(this._context))},this.main=function(e,t){this._context=e;var i=this._context.new_unlimited_var(this._context.symbol.time);this._context.select_sym(1);var r=this._context.new_unlimited_var(this._context.symbol.time),o=this._context.new_unlimited_var(n.Std.open(this._context)),s=this._context.new_unlimited_var(n.Std.high(this._context)),a=this._context.new_unlimited_var(n.Std.low(this._context)),l=this._context.new_unlimited_var(n.Std.close(this._context));return this._context.select_sym(0),[o.adopt(r,i,1),s.adopt(r,i,1),a.adopt(r,i,1),l.adopt(r,i,1)]}}},{name:"Volume",metainfo:{_metainfoVersion:15,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,transparency:65,defaults:{styles:{vol:{linestyle:0,linewidth:1,plottype:5,trackPrice:!1,transparency:65,visible:!0,color:"#000080"},vol_ma:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:65,visible:!1,color:"#0496FF"}},precision:0,palettes:{volumePalette:{colors:{0:{color:"#eb4d5c",width:1,style:0},1:{color:"#53b987",width:1,style:0}}}},inputs:{showMA:!1,length:20,col_prev_close:!1}},plots:[{id:"vol",type:"line"},{id:"volumePalette",palette:"volumePalette",target:"vol",type:"colorer"},{id:"vol_ma",type:"line"}],styles:{vol:{title:"Volume",histogramBase:0},vol_ma:{title:"Volume MA",histogramBase:0}},description:"Volume",shortDescription:"Volume",is_price_study:!1,palettes:{volumePalette:{colors:{0:{name:"Falling"},1:{name:"Growing"}}}},inputs:[{id:"showMA",name:"show MA",defval:!1,type:"bool",isHidden:!0},{id:"length",name:"MA Length",defval:20,type:"integer",min:1,max:2e3},{defval:!1,id:"col_prev_close",name:"Color based on previous close",type:"bool"}],id:"Volume@tv-basicstudies-1"},constructor:function(){this.f_0=function(e,t){return n.Std.gt(e,t)?0:1},this.main=function(e,t){this._context=e,this._input=t;var i=n.Std.volume(this._context),r=n.Std.volume(this._context),o=this._context.new_var(r),s=n.Std.sma(o,this._input(1),this._context),a=this._context.new_var(n.Std.close(this._context));return[i,a.get(1)&&this._input(2)?this.f_0(a.get(1),n.Std.close(this._context)):this.f_0(n.Std.open(this._context),n.Std.close(this._context)),s]}}},{name:"ZigZag",metainfo:{_metainfoVersion:23,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#008000"}},precision:4,inputs:{
in_0:5,in_1:10}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",target:"plot_0",type:"dataoffset"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Zig Zag",shortDescription:"ZigZag",is_price_study:!0,classId:"ScriptWithDataOffset",inputs:[{id:"in_0",name:"deviation",defval:5,type:"float",min:.001,max:100},{id:"in_1",name:"depth",defval:10,type:"integer",min:2,max:1e3}],id:"ZigZag@tv-basicstudies-1"},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0)/100,r=this._input(1)/2;return[n.Std.zigzag(i,r,this._context),n.Std.zigzagbars(i,r,this._context)]}}},{name:"Sessions",metainfo:{_metainfoVersion:44,defaults:{graphics:{vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}},linkedToSeries:!0,precision:4},description:"Sessions",graphics:{vertlines:{sessBreaks:{name:"Session Break"}}},id:"Sessions@tv-basicstudies-1",inputs:[],is_hidden_study:!0,is_price_study:!0,name:"Sessions@tv-basicstudies",palettes:{},plots:[],shortDescription:"Sessions"},constructor:function(){function e(e,t){return{id:e,time:e,extendBottom:!0,extendTop:!0}}this.init=function(){this._times=[]},this._getVerticalLineData=function(t){return n.Std.selectSessionBreaks(t,this._times).map(e)},this.main=function(e,t){if(n.Std.isdwm(e))return null;var i=n.Std.time(e);if(isNaN(i))return null;var r=this._times.length;if(0!==r&&this._times[r-1]===i||this._times.push(i),!e.symbol.isLastBar||!e.symbol.isNewBar)return null;var o=this._getVerticalLineData(e);return 0===o.length?null:{nonseries:!0,type:"study_graphics",data:{graphicsCmds:{create:{vertlines:[{styleId:"sessBreaks",data:o}]},erase:[{action:"all"}]}}}}}},{name:"SuperTrend",metainfo:{_metainfoVersion:39,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:3,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"},plot_2:{linestyle:0,linewidth:3,plottype:"shape_arrow_up",trackPrice:!1,location:"BelowBar",transparency:35,visible:!0,color:"#00FF00"},plot_3:{linestyle:0,linewidth:3,plottype:"shape_arrow_down",trackPrice:!1,location:"AboveBar",transparency:35,visible:!0,color:"#FF0000"}},precision:4,palettes:{palette_0:{colors:{0:{color:"#008000",width:3,style:0},1:{color:"#800000",width:3,style:0}}}},inputs:{in_0:10,in_1:3}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",palette:"palette_0",target:"plot_0",type:"colorer"},{id:"plot_2",type:"shapes"},{id:"plot_3",type:"shapes"}],styles:{plot_0:{title:"SuperTrend",histogramBase:0,joinPoints:!1,isHidden:!1},plot_2:{title:"Up Arrow",histogramBase:0,joinPoints:!1,isHidden:!1},plot_3:{title:"Down Arrow",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"SuperTrend",shortDescription:"SuperTrend",is_price_study:!0,palettes:{palette_0:{colors:{0:{name:"Color 0"},1:{name:"Color 1"}},valToIndex:{0:0,1:1}}},inputs:[{id:"in_0",name:"Length",defval:10,type:"integer",min:1,max:100},{id:"in_1",name:"Factor",defval:3,type:"float",min:1,max:100}],id:"SuperTrend@tv-basicstudies-1",scriptIdPart:"",name:"SuperTrend",
isCustomIndicator:!0},constructor:function(){this.f_0=function(){var e=this._input(0),t=this._input(1),i=n.Std.atr(e,this._context),r=(e=n.Std.hl2(this._context)+i*t,i=n.Std.hl2(this._context)-i*t,this._context.new_var(n.Std.close(this._context))),o=(t=this._context.new_var(),n.Std.max(i,t.get(1)));return t.set(n.Std.gt(r.get(1),t.get(1))?o:i),i=this._context.new_var(),o=n.Std.min(e,i.get(1)),i.set(n.Std.lt(r.get(1),i.get(1))?o:e),e=this._context.new_var(),r=n.Std.nz(e.get(1),1),r=n.Std.lt(n.Std.close(this._context),t.get(1))?-1:r,e.set(n.Std.gt(n.Std.close(this._context),i.get(1))?1:r),[t=n.Std.eq(e.get(0),1)?t.get(0):i.get(0),n.Std.eq(e.get(0),1)?0:1,1===e.get(0)&&-1===e.get(1),-1===e.get(0)&&1===e.get(1)]},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_0();return[i[0],i[1],i[2],i[3]]}}},r,o,s])},vTIA:function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"a",(function(){return n}));var n,r={showPositions:!1,showOrders:!1,showExecutions:!1,extendLeft:!1,lineLength:0,lineWidth:0,lineStyle:0};!function(e){e[e.Background=0]="Background",e[e.Foreground=1]="Foreground"}(n||(n={}))},vdSZ:function(e,t,i){"use strict";i.r(t),i.d(t,"CrosshairDataWindowView",(function(){return a}));var n=i("mrSG"),r=i("ivNn"),o=i("4miz"),s=window.t("n/a"),a=function(e){function t(t){var i=e.call(this)||this;return i._invalidated=!0,i._dateItem=new o.a(window.t("Date"),""),i._timeItem=new o.a(window.t("Time"),""),i._model=t,i._items.push(i._dateItem),i._items.push(i._timeItem),i}return Object(n.__extends)(t,e),t.prototype.update=function(){this._invalidated=!0},t.prototype.items=function(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items},t.prototype._updateImpl=function(){var e=this._model.mainSeries().isDWM();if(this._timeItem.setVisible(!e),this._timeItem.setValue(s),this._dateItem.setValue(s),!this._model.timeScale().isEmpty()){var t=this._model.crossHairSource().appliedIndex();if(!Object(r.isNumber)(t)){var i=this._model.mainSeries().data().last();if(null===i)return;t=i.index}var n=this._model.timeScale().indexToUserTime(t);null!==n&&(this._dateItem.setValue(this._model.dateFormatter().format(n)),e||this._timeItem.setValue(this._model.timeFormatter().format(n)))}},t}(o.b)},vq8G:function(e,t,i){"use strict";i.r(t),i.d(t,"SelectionRenderer",(function(){return s}));var n=i("VdBB"),r=i("//lt"),o=i("f6yo");var s=function(){function e(e){this._data=e||null}return e.prototype.setData=function(e){this._data=e},e.prototype.draw=function(e,t){if(null!==this._data&&this._data.visible){var i=t.pixelRatio;e.strokeStyle=void 0!==this._data.color?this._data.color:"#1E88E5",e.lineCap="butt";var n=Math.max(1,Math.floor(i));e.lineWidth=n;for(var r,o=this._data.vertOffset||0,s=0;s<this._data.points.length;++s){var a=this._data.points[s];(r=a,Number.isFinite(r.x)&&Number.isFinite(r.y))&&(e.fillStyle=this._data.bgColors[s],this._drawMarker(e,a,o,n,i))}}},e.prototype.hitTest=function(e){if(!this._data||!this._data.visible)return null;for(var t=0;t<this._data.points.length;t++){
var i=this._data.points[t];if(i.subtract(e).length()<=5.5){var o=void 0!==this._data.pointsCursorType?this._data.pointsCursorType[t]:r.PaneCursorType.Default;return new n.HitTestResult(this._data.hittestResult,{pointIndex:i.data,cursorType:o})}}return null},e.prototype.doesIntersectWithBox=function(e){return!!this._data&&this._data.points.some((function(t){return Object(o.pointInBox)(t,e)}))},e.prototype._drawMarker=function(e,t,i,n,r){var o=Math.round(3.5*r*2);o%2!=n%2&&(o+=1);var s=Math.round(o+2*(.5*n+.75*r));s%2!=n%2&&(s+=1);var a=Math.round(t.x*r),l=Math.round((t.y+i)*r),c=n%2/2;e.beginPath(),e.arc(a+c,l+c,s/2,0,2*Math.PI,!0),e.closePath(),e.fill(),e.beginPath(),e.arc(a+c,l+c,o/2,0,2*Math.PI,!0),e.closePath(),e.stroke()},e}()},vu5c:function(e,t,i){"use strict";function n(e,t){var i=function(){e.completed().unsubscribe(null,n),t(!1)},n=function(){e.error().unsubscribe(null,i),t(!0)};e.completed().subscribe(null,i,!0),e.error().subscribe(null,n,!0)}i.r(t),i.d(t,"onSeriesCompletedOrErrorReceived",(function(){return n}))},vzYV:function(e,t,i){"use strict";i.r(t),i.d(t,"CompareValuesProvider",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._emptyValues[0].title=t.guiPlotName(""),n}return Object(n.__extends)(t,e),t.prototype._hideValues=function(){return!1},t}(i("EYFt").a)},w4Ji:function(e,t,i){"use strict";function n(e){var t=new Map;return e.plots.forEach((function(e,i){t.set(e.id,(function(e){return e[i+1]}))})),t}function r(e,t){return null==e[t]}i.r(t),i.d(t,"studyPlotFunctionMap",(function(){return n})),i.d(t,"studyEmptyPlotValuePredicate",(function(){return r}))},w9cH:function(e,t,i){"use strict";function n(e){if(e instanceof Error)return e.stack||e.message;try{return e.outerHTML.slice(0,1024)}catch(t){}try{if(void 0!==e)return JSON.stringify(e).slice(0,1024)}catch(i){}return String(e)}function r(){window.__tv_js_errors||(window.__tv_js_errors=[]),window.addEventListener("error",(function(e){var t=(new Date).toISOString();window.__tv_js_errors.push(t+" "+(e.message||"JS error")+". "+(e.filename||"<unknown url>")+", 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||"<unknown url>")+", 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;x<P.length;x++)C&&(C=C[P[x]]);return null!=C?TradingView.clone(C):{}};function v(e,t,i,n,r){if(n)for(var o in n){var s=o.split("."),a=c(s[0]),l=void 0!==r&&r===s[0];0!==s.length&&l&&(a=c((s=s.slice(1))[0])),0!==s.length&&e.hasOwnProperty(a)?u(e,s,n[o])||h(o):l&&h(o)}function c(e){return t&&t[e]?t[e]:e}function u(e,t,i,n){var r=c(t[0]);return!!e.hasOwnProperty(r)&&(t.length>1?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;c<this._paneWidgets.length;++c){var u=this._paneWidgets[c];s.push(o(u,l.InvalidationMask.light().invalidateForPane(c))),c<this._paneWidgets.length-1&&s.push(this._paneSeparators[c].image())}this._timeAxisWidget&&(s.push(Object(r.ensureNotNull)(this._timeAxisSeparator).image()),this._timeAxisWidget.paint(l.InvalidationLevel.Light),n=this._timeAxisWidget.getScreenshotData()),window.TradingView.printing=!1,this.model().selectionMacro((function(e){i.forEach((function(t){e.addSourceToSelection(t)}))})),this.model().model().lightUpdate();var h=this.mainSeriesQuotesAndMetainfo();return{panes:s,timeAxis:n,colors:{text:this.properties().childs().scalesProperties.childs().textColor.value(),bg:this.properties().childs().paneProperties.childs().background.value(),scales:this.properties().childs().scalesProperties.childs().lineColor.value()},meta:h.meta,ohlc:h.ohlc,quotes:h.quotes}},e.prototype.mainSeriesQuotesAndMetainfo=function(){var e,t,i,n,r=this._model&&this._model.mainSeries();if(r){var o=function(e){return null==e?"":r.formatter().format(e,void 0,void 0,!0,!1)+""};e={resolution:r.interval(),symbol:r.symbol()};var s=r.symbolInfo();s&&(e.symbol=s.full_name,e.description=s.description,e.exchange=s.exchange);var a=r.bars().last();null!==a&&(t=a.value.slice(1,5).map(o));var l=r.quotes();l&&(i={change:o(l.change),changePercent:(n=l.change_percent,null==n?"":n+""),last:o(l.last_price)})}return{meta:e,ohlc:t,quotes:i}},e.prototype.updateCrossHairPositionIfNeeded=function(){
if(this._model){var e=c.tool.value();if(this._model.model().setCurrentTool(e),Object(h.lastEventIsTouch)()){var t=this._maximizedPaneWidget||this._paneWidgets[0];if(t.hasState()&&(this._isLineToolModeExceptBrush()||this.selectBarMode().value()||Object(c.toolIsMeasure)(c.tool.value()))){var i=t.state(),n=.5*this._model.model().timeScale().width(),r=.5*i.defaultPriceScale().height();this._model.model().setAndSaveCurrentPosition(n,r,i)}}this._model&&Object(h.lastEventIsTouch)()&&this._model.model().crossHairSource().updateAllViews()}},e.prototype.trackingModePaneWidget=function(){if(!Object(h.lastEventIsTouch)())return null;for(var e=0,t=this.paneWidgets();e<t.length;e++){var i=t[e];if(i.trackingModeEnabled())return i}return null},e.prototype.startTrackingMode=function(){if(Object(h.lastEventIsTouch)()){this.exitTrackingMode(),this.updateCrossHairPositionIfNeeded();var e=this._maximizedPaneWidget||this._paneWidgets[0],t=this.model().model().crossHairSource().currentPoint();e.startTrackingMode(t,t)}},e.prototype.exitTrackingMode=function(){Object(h.lastEventIsTouch)()&&this.paneWidgets().some((function(e){return e.trackingModeEnabled()}))&&(this.paneWidgets().forEach((function(e){return e.exitTrackingMode()})),this.model().model().clearCurrentPosition())},e.prototype.onToolChanged=function(){this.selectBarMode().value()&&this.toggleSelectBarMode(),this.exitTrackingMode()},e.prototype.maximizedPaneWidget=function(){return this._maximizedPaneWidget},e.prototype.isMaximizedPane=function(){return null!==this._maximizedPaneWidget},e.prototype.backgroundBasedTheme=function(){return this._backgroundBasedTheme.readonly()},e.prototype.lineToolsAndGroupsDTO=function(){return Object(r.ensureNotNull)(this._lineToolsSynchronizer).prepareDTO()},e.prototype.resetLineToolsInvalidated=function(){Object(r.ensureNotNull)(this._lineToolsSynchronizer).resetInvalidated()},e.prototype.shouldBeSavedEvenIfHidden=function(){return this.model().model().shouldBeSavedEvenIfHidden()},e.prototype.showObjectsTreeDialog=function(){throw new Error("not implemented")},e.prototype.addCustomWidgetToLegend=function(e,t){this._customLegendWidgetsFactoryMap.set(e,t);for(var i=0,n=this.paneWidgets();i<n.length;i++){n[i].addCustomWidgetToLegend(e,t)}},e.prototype.applyIndicatorsToAllChartsAvailable=function(){if(!this.chartWidgetCollection().applyIndicatorsToAllChartsAvailable())return!1;for(var e=0,t=this.model().model().panes();e<t.length;e++){if(t[e].orderedSources().some((function(e){return Object(a.isStudy)(e)&&!Object(a.isESDStudy)(e)})))return!0}return!1},e.prototype._updateThemedColor=function(){var e=this.model().model(),t=e.backgroundColorAtYPercentFromTop(.5),i=e.backgroundTopColor().value(),n=e.backgroundColor().value(),r=Object(m.isColorDark)(t),o=Object(m.isColorDark)(i),s=Object(m.isColorDark)(n);this.widget().toggleClass("chart-widget--themed-dark",r),this.widget().toggleClass("chart-widget--themed-light",!r),this.widget().toggleClass("chart-widget__top--themed-dark",o),this.widget().toggleClass("chart-widget__top--themed-light",!o),
this.widget().toggleClass("chart-widget__bottom--themed-dark",s),this.widget().toggleClass("chart-widget__bottom--themed-light",!s),this._backgroundBasedTheme.setValue(r?"dark":"light"),i===n&&Object(v.isStdThemedDefaultValue)("chartProperties.paneProperties.background",i,this._backgroundBasedTheme.value())&&(i=null,n=null);for(var a=0,l=this._paneWidgets;a<l.length;a++){l[a].updateThemedColors(i,n)}},e.prototype._isLineToolModeExceptBrush=function(){var e=c.tool.value();return Object(s.isLineToolName)(e)&&"LineToolBrush"!==e&&!this.selectBarMode().value()},e.prototype._cancelCreatingLine=function(){var e=Object(r.ensureNotNull)(this._model).model(),t=e.lineBeingCreated();if(null!==t){var i=Object(r.ensureNotNull)(e.paneForSource(t));Object(r.ensureNotNull)(this.paneByState(i)).cancelCreatingLineTool()}var n=e.crossHairSource().measurePane();null!==n&&Object(r.ensureNotNull)(this.paneByState(n)).cancelMeasuring()},e.prototype._subscribeToDrawingState=function(){var e=this;if(!this._options.readOnly){Object(c.init)();var t=function(t,i){if(null!==e._model){var n=e._model.model();t.model!==n&&i(n,e._model)}},i=function(e,t){return e.dataSources().find((function(e){return Object(s.isLineTool)(e)&&e.getLinkKey()===t}))||null};c.createdLineTool.subscribe(null,(function(i){t(i,(function(t,n){var o,s=Object(r.ensureNotNull)(t.paneForSource(t.mainSeries())),a=null;if(void 0===i.pointPositionPercents){if(null===(a=g(t,i.model,i.point.timeStamp)))return;o=i.point.price}else{var l=i.pointPositionPercents.x*t.timeScale().width(),c=t.mainSeries().priceScale(),u=i.pointPositionPercents.y*c.height(),h=t.mainSeries().firstValue();if(null===h)return;a=t.timeScale().coordinateToIndex(l),o=c.coordinateToPrice(u,h)}var d={index:Object(r.ensureNotNull)(a),price:o},p=n.createLineTool(s,d,i.linetool,i.properties,i.linkKey,t.mainSeries(),!0);null!==p&&!Boolean(e.model().lineBeingCreated())&&i.finalState&&p.restoreExternalPoints(i.finalState)}))})),c.continuedLineTool.subscribe(null,(function(e){t(e,(function(t,i){var n=g(t,e.model,e.point.timeStamp);if(null!==n){var r={index:n,price:e.point.price},o=t.lineBeingCreated();if(null!==o)i.continueExternalLine(r,null===e.envState?void 0:e.envState,!!e.finalState)&&e.finalState&&o.restoreExternalPoints(e.finalState)}}))})),c.cancelledLineTool.subscribe(null,(function(e){t(e,(function(e,t){e.cancelCreatingLine()}))})),c.beenSetLineToolLastPoint.subscribe(null,(function(e){t(e,(function(t,i){var n=t.lineBeingCreated();if(null!==n&&n.getLinkKey()===e.linkKey){var r=g(t,e.model,e.point.timeStamp);if(null!==r){var o={index:r,price:e.point.price};n.setLastPoint(o),n.updateAllViews(),t.lightUpdate()}}}))})),c.startedMovingLineTool.subscribe(null,(function(e){t(e,(function(t,n){var r=e.linkKeys.map(i.bind(null,t)).filter(o.notNull);if(r.length){var s=g(t,e.model,e.point.timeStamp);if(null===s)return;var a={index:s,price:e.point.price};t.startMovingSources(r,{logical:a},null,e.pointPositionPercents,null===e.envState?void 0:e.envState,!0)}}))})),c.movedLineTool.subscribe(null,(function(e){
t(e,(function(t,i){if(t.sourcesBeingMoved().filter((function(t){return function(t){return e.linkKeys.some((function(e){return t.getLinkKey()===e}))}(t)})).length){var n=g(t,e.model,e.point.timeStamp);if(null!==n){var r={index:n,price:e.point.price};t.moveSources({logical:r},e.pointPositionPercents,null===e.envState?void 0:e.envState,!0)}}}))})),c.finishedMovingLineTool.subscribe(null,(function(e){t(e,(function(t,i){var n=t.sourcesBeingMoved();if(0!==n.length){n.forEach((function(i){var n=function(t){for(var i=0;i<e.linkKeys.length;i++)if(e.linkKeys[i]===t.getLinkKey())return e.finalStates[i];return null}(i);t.endMovingSources(null!==n,!0),null!==n&&(i.restoreExternalPoints(n),n.pointPositionPercents&&i.restorePositionPercents(n.pointPositionPercents))}))}}))})),c.startedChangingLineTool.subscribe(null,(function(e){t(e,(function(t,n){var r=i(t,e.linkKey);null!==r&&r.isActualSymbol()&&r.isActualCurrency()&&t.startChangingLinetool(r,void 0,void 0,void 0,!0)}))})),c.changedLineTool.subscribe(null,(function(e){t(e,(function(t,i){var n=t.lineBeingEdited();if(null!==n&&n.getLinkKey()===e.linkKey&&n.isActualSymbol()&&n.isActualCurrency()){for(var r=[],o=0;o<e.points.length;o++){var s=g(t,e.model,e.points[o].time_t,e.points[o].offset);if(null===s)return;r.push({index:s,price:e.points[o].price})}t.changeLinePoints(n,r,!0)}}))})),c.finishedChangingLineTool.subscribe(null,(function(e){t(e,(function(t,n){var r=i(t,e.linkKey);null!==r&&r.isActualSymbol()&&r.isActualCurrency()&&null!==t.lineBeingEdited()&&t.endChangingLinetool(!!e.finalState,!0),null!==r&&e.finalState&&r.restoreExternalPoints(e.finalState)}))})),c.removedLineTool.subscribe(null,(function(e){t(e,(function(t,n){var r=i(t,e.linkKey);null!==r&&n.removeSource(r,!1)}))})),c.finishedLineTool.subscribe(null,(function(e){t(e,(function(t,n){var r=i(t,e.linkKey);null!==r&&"LineToolBrush"===r.toolname&&r.finish()}))})),c.changedLineStyle.subscribe(null,(function(e){t(e,(function(t,n){var r=i(t,e.linkKey);null!==r&&(r.restoreExternalState(e.state),r.propertiesChanged(!0))}))})),c.restoredLineToolState.subscribe(null,(function(e){t(e,(function(t,r){var o=i(t,e.linkKey);if(null!==o){var s=Object(n.__assign)({},e.state);s.indexes=e.state.points.map((function(i){return{index:g(t,e.model,i.time_t),price:i.price}})),t.restoreLineToolState(o,s)}}))})),c.restoredLineTool.subscribe(null,(function(e){t(e,(function(t,i){t.restoreSource(e.state.restorePane,e.state.paneIndex,e.state.paneState,e.state.sourceState,null)}))})),c.copiedLineTool.subscribe(null,(function(e){t(e,(function(t,i){var n,o=Object(r.ensureNotNull)(t.paneForSource(t.mainSeries()));if(e.pointPositionPercents){if(null===(n=i.createLineTool(o,{index:0,price:0},e.linetool,null,e.linkKey,void 0,!0)))return;n.restorePositionPercents(Object(r.ensureDefined)(e.pointPositionPercents))}else{var s=e.points.map((function(i){return{index:Object(r.ensureNotNull)(g(t,e.model,i.timeStamp)),price:i.price}})),a=s[0];if(null===(n=i.createLineTool(o,a,e.linetool,null,e.linkKey,void 0,!0)))return
;if(t.lineBeingCreated())for(var l=1;l<s.length;l++)l!==s.length-1||"LineToolBrush"!==e.linetool&&"LineToolGhostFeed"!==e.linetool||n.finish(),i.continueCreatingLine(s[l],new u.EnvironmentState(void 0),l<s.length-1,!0)}n.properties().interval.setValue(e.state.interval),n.restoreExternalState(e.state),n.restoreData&&n.restoreData(e),n.propertiesChanged(!0),e.finalState&&(n.calcIsActualSymbol(),n.restoreExternalPoints(e.finalState))}))}))}},e}()},ww0J:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("mrSG"),r=i("X0WL"),o={NONE:"Default"},s=function(e){function t(t,i){var n=e.call(this,i)||this;return n._source=t,n}return Object(n.__extends)(t,e),t.prototype.getSplitTitle=function(){return this._source.titleInParts(!0,o,void 0,!1)},t.prototype.text=function(){return this._source.isFailed()?this._source.title(!0,o,void 0,!1)+": "+this._source.status():this._source.title(!0,o,void 0,!1)+" "+this._source.status()},t}(r.a)},x0JF:function(e,t,i){"use strict";var n=i("aO4+").Point,r=i("vq8G").SelectionRenderer,o=i("VdBB").HitTestResult,s=i("29fS").PaneRendererBars,a=i("gyZD").PaneRendererLine,l=i("Zp8I").PaneRendererStepLine,c=i("u0yd").PaneRendererArea,u=i("/hKg").PaneRendererCandles,h=i("M7/j").PaneRendererBaseline,d=i("Zy3/").CompositeRenderer,p=i("ga+R"),_=i("Tmoa"),f=i("k9/m").PlotRowSearchMode,m=i("Kxc7"),v=i("Zp/P");function y(e,t){this.m_series=e,this.m_model=t,this.m_bars=[],this._invalidated=!0,this._isMarkersEnabled=m.enabled("source_selection_markers"),this._selectionData=null}function g(e,t){return void 0!==e[TradingView.OPEN_PLOT]&&void 0!==e[TradingView.HIGH_PLOT]&&void 0!==e[TradingView.LOW_PLOT]&&void 0!==e[TradingView.CLOSE_PLOT]&&(t.open=e[TradingView.OPEN_PLOT],t.high=e[TradingView.HIGH_PLOT],t.low=e[TradingView.LOW_PLOT],t.close=e[TradingView.CLOSE_PLOT],!0)}function b(e,t){y.call(this,e,t)}function S(e,t){y.call(this,e,t)}function w(e,t){y.call(this,e,t)}function P(e,t){y.call(this,e,t)}function C(e,t){this.m_series=e,this.m_model=t,this.m_items=[],this._isMarkersEnabled=m.enabled("source_selection_markers")}function x(e,t){C.call(this,e,t),this._invaidated=!0}function T(e,t){C.call(this,e,t),this._invaidated=!0}function I(e,t){C.call(this,e,t),this._invaidated=!0,this._renderer=new h}y.prototype._series=function(){return this.m_series},y.prototype._model=function(){return this.m_model},y.prototype._bars=function(){return this.m_bars},y.prototype.update=function(){this._invalidated=!0},y.prototype._updateImpl=function(e){var t=this;if((e=e||g,this.m_bars=[],!this.m_model.timeScale().isEmpty()&&!this.m_series.priceScale().isEmpty())&&(null!==(a=this.m_model.timeScale().visibleBarsStrictRange())&&0!==this.m_series.bars().size())){for(var i=this.m_series.nearestIndex(a.firstBar(),f.NearestRight),r=this.m_series.nearestIndex(a.lastBar(),f.NearestLeft);i<=r;i++){if(null!==this.m_series.bars().valueAt(i))break}if(!(i>r)){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;_<h.length;_++){var m=h[_],v=this.m_series.bars().valueAt(m);if(null!==v){var y=.5*(v[TradingView.OPEN_PLOT]+v[TradingView.CLOSE_PLOT]),b=this.m_model.timeScale().indexToCoordinate(m),S=this.m_series.priceScale().priceToCoordinate(y,s);this._selectionData.points.push(new n(b,S)),this._selectionData.bgColors.push(this.m_model.backgroundColorAtYPercentFromTop(S/d))}}}}}},y.prototype.items=function(){return this.m_bars},inherit(b,y),b.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);var e={};e.bars=this.m_bars,e.barSpacing=this.m_model.timeScale().barSpacing();var t=this.m_series.properties();e.dontDrawOpen=t.barStyle.dontDrawOpen.value(),e.thinBars=t.style.value()===TradingView.Series.STYLE_RANGE?t.rangeStyle.thinBars.value():t.barStyle.thinBars.value();var i=new d;return i.append(new s(e)),this.m_model.selection().isSelected(this.m_series)&&this._isMarkersEnabled&&i.append(new r(this._selectionData)),i},inherit(S,y),S.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);var e={};e.bars=this.m_bars,e.barSpacing=this.m_model.timeScale().barSpacing(),e.wickVisible=this.m_series.properties().candleStyle.drawWick.value(),e.bodyVisible=this.m_series.properties().candleStyle.drawBody.value(),e.borderVisible=this.m_series.properties().candleStyle.drawBorder.value(),e.borderColor=this.m_series.properties().candleStyle.borderColor.value(),e.wickColor=this.m_series.properties().candleStyle.wickColor.value(),e.barWidth=v.optimalBarWidth(e.barSpacing);var t=new d;return t.append(new u(e)),this.m_model.selection().isSelected(this.m_series)&&this._isMarkersEnabled&&t.append(new r(this._selectionData)),t},inherit(w,y),w.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);var e={};e.bars=this.m_bars,e.barSpacing=this.m_model.timeScale().barSpacing(),e.wickVisible=this.m_series.properties().haStyle.drawWick.value(),e.bodyVisible=this.m_series.properties().haStyle.drawBody.value(),e.borderVisible=this.m_series.properties().haStyle.drawBorder.value(),e.borderColor=this.m_series.properties().haStyle.borderColor.value(),e.wickColor=this.m_series.properties().haStyle.wickColor.value(),e.barWidth=v.optimalBarWidth(e.barSpacing);var t=new d;return t.append(new u(e)),this.m_model.selection().isSelected(this.m_series)&&this._isMarkersEnabled&&t.append(new r(this._selectionData)),t},
inherit(P,y),P.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);var e={};e.bars=this.m_bars,e.barSpacing=this.m_model.timeScale().barSpacing(),e.wickVisible=this.m_series.properties().hollowCandleStyle.drawWick.value(),e.bodyVisible=this.m_series.properties().hollowCandleStyle.drawBody.value(),e.borderVisible=this.m_series.properties().hollowCandleStyle.drawBorder.value(),e.borderColor=this.m_series.properties().hollowCandleStyle.borderColor.value(),e.wickColor=this.m_series.properties().hollowCandleStyle.wickColor.value(),e.barWidth=v.optimalBarWidth(e.barSpacing);var t=new d;return t.append(new u(e)),this.m_model.selection().isSelected(this.m_series)&&this._isMarkersEnabled&&t.append(new r(this._selectionData)),t},C.prototype.update=function(){if(this.m_items=[],!this.m_model.timeScale().isEmpty()&&this.m_series.priceScale()&&!this.m_series.priceScale().isEmpty()){var e=this.m_model.timeScale().visibleBarsStrictRange();if(null!==e&&0!==this.m_series.bars().size()){var t,i=this.m_series.nearestIndex(e.firstBar(),f.NearestRight),r=this.m_series.nearestIndex(e.lastBar(),f.NearestLeft);e=this.m_series.bars().range(i,r);var s=this.m_series.priceScale(),a={color:this.m_series.properties().lineStyle.color.value()},l=this.m_series.barFunction();if(e.each(function(e,i){var r=l(i);if(null==r)return!1;void 0===t&&(t=r);var o=new n(e,r);return o.style=a,this.m_items.push(o),!1}.bind(this)),s.pointsArrayToCoordinates(this.m_items,t),this.m_model.timeScale().indexesToCoordinates(this.m_items),this.m_model.selection().isSelected(this.m_series)){var c=p(i,r);this._selectionData={points:[],isDark:this.m_model.isDark(),bgColors:[],visible:!0};var u=this.m_model.paneForSource(this.m_series).height();this._selectionData.hittestResult=o.REGULAR;for(var h=0;h<c.length;h++){var d=c[h],_=this.m_series.data().valueAt(d);if(null!==_){var m=l(_),v=this.m_model.timeScale().indexToCoordinate(d),y=this.m_series.priceScale().priceToCoordinate(m,t);this._selectionData.points.push(new n(v,y)),this._selectionData.bgColors.push(this.m_model.backgroundColorAtYPercentFromTop(y/u))}}}}}},inherit(x,C),x.prototype.update=function(){this._invalidated=!0},x.prototype.renderer=function(){this._invalidated&&(C.prototype.update.call(this),this._invalidated=!1);var e,t,i=this.m_series.properties().lineStyle,n={barSpacing:this.m_model.timeScale().barSpacing(),items:this.m_items,lineColor:i.color.value(),lineStyle:i.linestyle.value(),withMarkers:i.styleType.value()===TradingView.Series.STYLE_LINE_TYPE_MARKERS,lineWidth:i.linewidth.value(),simpleMode:!0};return i.styleType.value()===TradingView.Series.STYLE_LINE_TYPE_STEP?(e=new l).setData(n):e=new a(n),this.m_model.selection().isSelected(this.m_series)?((t=new d).append(e),this._isMarkersEnabled&&t.append(new r(this._selectionData))):t=e,t},inherit(T,C),T.prototype.update=function(){this._invalidated=!0},T.prototype.renderer=function(){this._invalidated&&(C.prototype.update.call(this),this._invalidated=!1);var e={simpleMode:!1}
;e.barSpacing=this.m_model.timeScale().barSpacing(),e.items=this.m_items,e.lineColor=this.m_series.properties().areaStyle.linecolor.value(),e.lineStyle=this.m_series.properties().areaStyle.linestyle.value(),e.lineWidth=this.m_series.properties().areaStyle.linewidth.value();var t=this.m_series.properties().areaStyle.transparency.value();e.isSeries=!0,e.color1=_.generateColor(this.m_series.properties().areaStyle.color1.value(),t),e.color2=_.generateColor(this.m_series.properties().areaStyle.color2.value(),t),e.bottom=this.m_series.priceScale().height();var i=new d;return i.append(new c(e)),this.m_model.selection().isSelected(this.m_series)&&this._isMarkersEnabled&&i.append(new r(this._selectionData)),i},inherit(I,C),I.prototype.update=function(){this._invalidated=!0},I.prototype._updateImpl=function(){C.prototype.update.call(this);var e=this.m_series.properties().baselineStyle,t=e.transparency.value();this._topFillColor1=_.generateColor(e.topFillColor1.value(),t),this._topFillColor2=_.generateColor(e.topFillColor2.value(),t),this._bottomFillColor1=_.generateColor(e.bottomFillColor1.value(),t),this._bottomFillColor2=_.generateColor(e.bottomFillColor2.value(),t),this._topLineColor=e.topLineColor.value(),this._bottomLineColor=e.bottomLineColor.value(),this._topLineWidth=e.topLineWidth.value(),this._bottomLineWidth=e.bottomLineWidth.value(),this._barSpacing=this.m_model.timeScale().barSpacing(),this._bottom=this.m_series.priceScale().height(),this._baseLevelCoordinate=Math.round(this._bottom*(Math.abs(100-e.baseLevelPercentage.value())/100))},I.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer.setData({items:this.m_items,topFillColor1:this._topFillColor1,topFillColor2:this._topFillColor2,bottomFillColor1:this._bottomFillColor1,bottomFillColor2:this._bottomFillColor2,topLineColor:this._topLineColor,bottomLineColor:this._bottomLineColor,topLineWidth:this._topLineWidth,bottomLineWidth:this._bottomLineWidth,lineStyle:CanvasEx.LINESTYLE_SOLID,barSpacing:this._barSpacing,baseLevelCoordinate:this._baseLevelCoordinate,bottom:this._bottom});var e=new d;return e.append(this._renderer),this.m_model.selection().isSelected(this.m_series)&&e.append(new r(this._selectionData)),e},t.SeriesBarsPaneView=b,t.SeriesCandlesPaneView=S,t.SeriesHollowCandlesPaneView=P,t.SeriesLinePaneView=x,t.SeriesAreaPaneView=T,t.SeriesHeikenAshiPaneView=w,t.SeriesBaselinePaneView=I,t.SeriesBarCandlesPaneView=y},"x2L+":function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return a}));var n=i("m/cY"),r=i("Vdly");function o(){return r.getBool("Chart.ShowMarketOpenStatus",!0)}var s=Object(n.a)(o());function a(){s.setValue(!0),r.remove("Chart.ShowMarketOpenStatus")}r.onSync.subscribe(null,(function(){return s.setValue(o())})),s.subscribe(null,(function(){return r.setValue("Chart.ShowMarketOpenStatus",s.value())}))},"x40+":function(e,t,i){"use strict"
;var n=i("Eyy1").assert,r=i("VdBB").HitTestResult,o=i("Zp/P").coordinateIsValid,s=i("0YCj"),a=i("Tmoa"),l=i("Hr11").clamp,c=i("k9/m").PlotRowSearchMode,u=i("cPgM").ScaledPaneRenderer;function h(){u.call(this),this._data=null}function d(e){this._source=e,this._points1=[],this._points2=[],this._timePoints=[],this._getBarSpacing=e.model().timeScale().barSpacing.bind(e.model().timeScale()),this._invalidated=!0,this._areaRenderer=new h,this._plIndex1=null,this._plIndex2=null}function p(e){d.call(this,e)}function _(e,t,i){d.call(this,e),this._isHlineFill=t.type===s.FilledArea.TYPE_HLINES,n(this._isHlineFill||t.type===s.FilledArea.TYPE_PLOTS,"Wrong filledArea type: "+t.type),this._isHlineFill&&this._initBandIndexes(t.objAId,t.objBId),this._fillMetaInfo=t,this._fillStyleProps=i;var r=e._metaInfo;if(t.palette)for(var o in r.plots)if(r.plots[o].palette===t.palette){this._colorPlotOffset=parseInt(o),this._colorsMap=r.palettes[t.palette].valToIndex,this._colorValues=e.properties().palettes[t.palette].colors;break}}inherit(h,u),h.prototype.setData=function(e){this._data=e},h.prototype.hitTest=function(e){if(null===this._data)return null;for(var t,i,n=1;n<this._data.points1.length;++n)if(t=this._data.points1[n],i=this._data.points2[n],this._data.timePoints[n]===e.x&&(e.y>=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;p<this._data.timePoints.length;p++){var _={point1:t?this._data.level1:n[p],point2:t?this._data.level2:r[p],timePoint:i[p]},f=o(_.point1)&&o(_.point2);if(f&&(c=s?s[p]:this._data.backcolor,h.push(_)),p===this._data.timePoints.length-1||s&&c!==s[p+1]||!f){if(h.length>0&&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<y.length;g++){var b=y[g],S=b[0].timePoint,w=b[0].point1;if(e.moveTo(S,w),1!==b.length){for(var P=1;P<b.length;P++)e.lineTo(b[P].timePoint,b[P].point1);for(P=b.length-1;P>=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&&h<g&&(y=g+f),f<0&&h<=g+f&&(y=h);for(var b=m<u||m>h?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;i<this._source.metaInfo().bands.length;++i){var n=this._source.metaInfo().bands[i];null!==this._bandAKey||n.id!==e?null!==this._bandBKey||n.id!==t||(this._bandBKey=i):this._bandAKey=i}},_.prototype._plotAId=function(){return this._fillMetaInfo.objAId},_.prototype._plotBId=function(){return this._fillMetaInfo.objBId},_.prototype._color=function(){return this._fillStyleProps.color.value()},_.prototype._transparency=function(){return this._fillStyleProps.transparency.value()},_.prototype._visible=function(){return this._fillStyleProps.visible.value()},_.prototype._correctStartBarIndex=function(e){var t=this._source.getMinFirstBarIndexForPlot(this._fillMetaInfo.id);return Math.max(t,e)},t.PlotFillPaneView=_,t.AreaBackgroundPaneView=p},x5Tw:function(e,t,i){"use strict";i.r(t),i.d(t,"setupChartEventHint",(function(){return u}));var n=i("Eyy1"),r=(i("YFKU"),i("Vdly")),o=i("mMWL"),s=i("e92V"),a=i("qFKp"),l=i("/3z9"),c=i("Kxc7");function u(e,t){if(void 0===t&&(t=!1),c.enabled("popup_hints")){var u,h,d,p,_=e.getContainer()[0],f=null,m=null;o.tool.subscribe((function(){if(Boolean(r.getBool("hint.touchPainting")))return;var e=o.tool.value();Object(s.b)(e)&&"LineToolRegressionTrend"!==e&&!a.CheckMobile.any()?v(window.t("Click to set a point"),"hint.touchPainting"):a.CheckMobile.any()&&"LineToolBrush"!==e&&Object(s.a)(e)?v(window.t("Move the point to position the anchor then tap to place"),"hint.touchPainting"):f&&f.hide()})),o.createdLineTool.subscribe(null,(function(){var e=o.tool.value();"LineToolPath"!==e||Boolean(r.getBool("hint.finishBuildPathByDblClick"))?"LineToolPolyline"!==e||Boolean(r.getBool("hint.finishBuildPolylineByDblClick"))||v(window.t("Double-click to finish Polyline"),"hint.finishBuildPolylineByDblClick"):v(window.t("Double-click to finish Path"),"hint.finishBuildPathByDblClick")})),o.finishedLineTool.subscribe(null,(function(){if(f){var e=o.tool.value();"LineToolPath"===e?y("hint.finishBuildPathByDblClick"):"LineToolPolyline"===e&&y("hint.finishBuildPolylineByDblClick")}})),t||a.CheckMobile.any()||Boolean(r.getBool("hint.startFocusedZoom"))||(h=function(e){if(!Boolean(r.getBool("hint.startFocusedZoom")))if(e)f&&(m=null,y("hint.startFocusedZoom"));else{var t=l.isMacKeyboard?"⌘":"Ctrl";v(window.t("Press and hold {0} while zooming to maintain the chart position").format(t),"hint.startFocusedZoom")}},d=!1,p=function(e){e?(d&&h(e),u.onZoom().unsubscribe(null,p)):d||(h(e),d=!0)},(u=e).onZoom().subscribe(null,p),m=function(){return u.onZoom().unsubscribe(null,p)})}function v(e,t,r){if(f)f.show(e,r?void 0:y.bind(null,t));else{var s=o.tool.value();Promise.all([i.e("react"),i.e(83),i.e("chart-event-hint")]).then(i.bind(null,"PN5r")).then((function(i){f=new i.ChartEventHintRenderer(Object(n.ensureNotNull)(_)),s===o.tool.value()&&f.show(e,r?void 0:y.bind(null,t))}))}}function y(e){r.setValue(e,!0,{forceFlush:!0}),Object(n.ensureNotNull)(f).destroy(),null!==m&&m(),f=null}}},x8jL:function(e,t,i){"use strict";i.r(t);var n=i("Eyy1"),r=i("MY2c"),o=i("bOGh"),s=i("mrSG"),a=function(e){
function t(t,i,n){var r=e.call(this,n)||this;return r._wv=t,r._newValue=i,r._oldValue=t.value(),r}return Object(s.__extends)(t,e),t.prototype.redo=function(){this._wv.setValue(this._newValue)},t.prototype.undo=function(){this._wv.setValue(this._oldValue)},t}(i("RDU5").UndoCommand),l=i("txPx"),c=i("aIyQ"),u=i.n(c);i.d(t,"createUndoHistory",(function(){return d}));var h=Object(l.getLogger)("Common.UndoHistory");function d(){var e=[],t=new r.UndoStack,i=new r.UndoStack,s=new u.a;function l(n){if(e.length>0)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;i<e.cells.length;i++){var r=e.cells[i];this._cache.fillStyle=t.items[i].color,this._cache.fillText(r.text,r.left,n)}}.bind(this))},l.prototype.removeSource=function(e){if(this._sourcesToRow[e]){var t=this._sourcesToRow[e].row;a(this._cache,this._pixelRatio,(function(){this._cache.clearRect(0,this.topByRow(t),this._actualWidth,l.ROW_HEIGHT)})),delete this._sourcesToRow[e],delete this._rowsToSources[t]}},l.prototype._effectiveStatesEquals=function(e,t){var i,n,r,o,s=function(e,t){return!(!e&&!t)&&(!(!e||t)||(!(e||!t)||(e.index!==t.index||e.price!==t.price)))};if(e&&!t)return!1;if(!e&&t)return!1;if(e.showPrices!==t.showPrices)return!1;if(e.coeffsAsPercents!==t.coeffsAsPercents)return!1;if(e.showCoeffs!==t.showCoeffs)return!1;if(e.reverse!==t.reverse)return!1;if(e.logLevels!==t.logLevels)return!1;if(i=e.formatter,n=t.formatter,(i||n)&&(i&&!n||!i&&n||i.minMove!==n.minMove||i.minMove2!==n.minMove2||i.fractional!==n.fractional||i.fractionalLength!==n.fractionalLength))return!1;if(s(e.p1,t.p1))return!1;if(s(e.p2,t.p2))return!1;if(s(e.p3,t.p3))return!1;if(e.items.length!==t.items.length)return!1;for(var a=0;a<e.items.length;a++)if(r=e.items[a],o=t.items[a],r.coeff!==o.coeff||r.color!==o.color)return!1;return!0},l.prototype.updateSource=function(e){var t=e.properties().symbol.value();if(this._currentSymbol!==t&&(this._currentSymbol=t,this._sourcesToRow={},this._rowsToSources={}),!this._sourcesToRow[e.id()]){var i=this._findEmptyRow(e.id());this._sourcesToRow[e.id()]={effectiveState:null,row:i}}var n=this._sourcesToRow[e.id()].effectiveState,r=this._effectiveState(e);if(!this._effectiveStatesEquals(n,r)){var o=this._calculateWidth(e);if(o){this._sourcesToRow[e.id()].effectiveState=r,o.totalWidth>this._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;o<s.length;o++){r(s[o])}return n}function u(e,t,i,n){var r=[];return e.forEach((function(e,o){e.forEach((function(e){!function(e,t,i){for(var n=null,r=0,o=e;r<o.length;r++){var s=o[r];s.styleId===t&&(n=s)}null===n&&(n={styleId:t,data:[]},e.push(n)),n.data.push(i)}(r,o,n(e,++t.currentId,i))}))})),r.length>0?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();l<c.length;l++){var u=c[l];if(u.isVisible()){var h=i||Object(r.ensureDefined)(Object(r.ensureNotNull)(u.symbolInfo()).original_currency_code);s._newSourcesCurrencies.set(u.id(),h),s._oldSourcesCurrencies.set(u.id(),u.currency()),s._showFade=s._showFade||u===a&&u.currency()!==h}}return s}return Object(n.__extends)(t,e),t.prototype.redo=function(){this._applyCurrencies(this._newSourcesCurrencies)},t.prototype.undo=function(){this._applyCurrencies(this._oldSourcesCurrencies)},t.prototype._applyCurrencies=function(e){this._showFade&&this._chartWidget.screen.show();var t=this._chartWidget.model().model();e.forEach((function(e,i){Object(r.ensureNotNull)(t.dataSourceForId(i)).setCurrency(e)})),this._chartWidget.model().selectionMacro((function(e){e.clearSelection()}))},t}(i("RDU5").UndoCommand)},xrEm:function(e,t,i){},"xz+e":function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("7KDR").Action,o=i("Ocx9").DefaultProperty,s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],a=window.t("Elliott Impulse Wave (12345)"),l=window.t("Elliott Triangle Wave (ABCDE)"),c=window.t("Elliott Triple Combo Wave (WXYXZ)"),u=window.t("Elliott Correction Wave (ABC)"),h=window.t("Elliott Double Combo Wave (WXY)"),d=[{value:s[0],title:window.t("Supermillennium")},{value:s[1],title:window.t("Millennium")},{value:s[2],title:window.t("Submillennium")},{value:s[3],title:window.t("Grand Supercycle")},{value:s[4],title:window.t("Supercycle")},{value:s[5],title:window.t("Cycle")},{value:s[6],title:window.t("Primary")},{value:s[7],title:window.t("Intermediate")},{value:s[8],title:window.t("Minor",{context:"wave"})},{value:s[9],title:window.t("Minute",{context:"wave"})},{value:s[10],
title:window.t("Minuette")},{value:s[11],title:window.t("Subminuette")},{value:s[12],title:window.t("Micro")},{value:s[13],title:window.t("Submicro")},{value:s[14],title:window.t("Minuscule")}];function p(e,t){var r=t||p.createProperties();n.call(this,e,r),this.version=p.version,i.e("lt-pane-views").then(function(e){var t=i("Ht/7").ElliottLabelsPaneView;this._setPaneViews([new t(this,this._model)])}.bind(this).bind(null,i)).catch(i.oe)}function _(e,t){p.call(this,e,t)}function f(e,t){var i=t||f.createProperties();_.call(this,e,i)}function m(e,t){var i=t||m.createProperties();_.call(this,e,i)}function v(e,t){var i=t||v.createProperties();_.call(this,e,i)}function y(e,t){p.call(this,e,t)}function g(e,t){var i=t||g.createProperties();y.call(this,e,i)}function b(e,t){var i=t||b.createProperties();y.call(this,e,i)}inherit(p,n),p.version=4,p.migrateState=function(e){var t={0:11,1:10,2:9,3:8,4:7,5:6,6:5,7:4,8:3},i={0:11,1:8};"LineToolElliottSubminuette"===e.type&&(e.type="LineToolElliottImpulse",e.state.degree=t[e.state.wavesize]),"LineToolElliottMinor"===e.type&&(e.type="LineToolElliottImpulse",e.state.degree=t[e.state.wavesize]),"LineToolElliottCircle"===e.type&&(e.type="LineToolElliottImpulse",e.state.degree=t[e.state.wavesize]),"LineToolElliottMinorRetr"===e.type&&(e.type="LineToolElliottCorrection",e.state.degree=i[e.state.wavesize]),"LineToolElliottMajorRetr"===e.type&&(e.type="LineToolElliottCorrection",e.state.degree=i[e.state.wavesize])},p.prototype.migrateVersion=function(e,t,i){if(i.properties.hasChild("background")&&i.properties.removeProperty("background"),i.properties.hasChild("backgroundColor")&&i.properties.removeProperty("backgroundColor"),i.properties.hasChild("showBackground")&&i.properties.removeProperty("showBackground"),1===e){var n=Object.assign({},this._timePoint[0]);this._timePoint.unshift(n),this._points.length>0&&(n=Object.assign({},this._points[0]),this._points.unshift(n))}},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._prevOptimalWidth<t&&null===this._updateTimeout&&(this._updateTimeout=setTimeout((function(){e._undoModel.model().fullUpdate(),e._updateTimeout=null}),100)),this._prevOptimalWidth=t},e.prototype.optimalWidth=function(){if(!this.isVisible())return 0;var e=32,t=this.rendererOptions();if(this._pane.hasState()){var i=Object(s.getContext2D)(this._canvasBinding.canvas),r=this.priceScale().marks();Object(l.setFont)(i,this.baseFont()),r.length>0&&(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;_<f.length;_++){p(f[_])}(null!==a||d.length>0)&&i.push(new o.Separator);var m=h.filter((function(e){return e!==a&&!l.has(e)}));m.sort();for(var v=function(n){i.push(s(n,t.selectedCurrency===n,(function(){return e._undoModel.setPriceScaleCurrency(e.priceScale(),n)}),n))},y=0,g=m;y<g.length;y++){v(g[y])}return i},e.prototype._showCurrenciesContextMenu=function(e){var t=this;if(null!==this._currencyMenu&&this._currencyMenu.isOpened())return this._currencyMenu.close(),void(this._currencyMenu=null);Object(h.trackEvent)("GUI","Currency conversion"),function(e,t,n){return Object(b.__awaiter)(this,void 0,void 0,(function(){return Object(b.__generator)(this,(function(r){switch(r.label){case 0:return[4,Promise.all([i.e("react"),i.e(1),i.e(4),i.e(9),i.e(90),i.e(2),i.e("currency-label-menu")]).then(i.bind(null,"FO7Z"))];case 1:return[2,r.sent().showCurrencyLabelMenu(e,t,n)]}}))}))}(this._currenciesActions(),(function(){if(!t._currencyLabel)return{x:0,y:0};var e=t._currencyLabel.labelElement().getBoundingClientRect();return{x:e.left,y:e.bottom,forbidCorrectYCoord:!0}}),Object(n.ensureNotNull)(this._currencyLabel).labelElement()).then((function(e){t._destroyed?e.close():t._currencyMenu=e}))},e.prototype._onFontSizeChanged=function(){this._currencyLabelWidth=null,this._updateCurrencyLabelFont(),this.onOptimalWidthNeedToBeRecalculated()},e}()},yMne:function(e,t,i){"use strict";i.r(t),i.d(t,"HEADER_TOOLBAR_HEIGHT_EXPANDED",(function(){return r})),i.d(t,"HEADER_TOOLBAR_HEIGHT_COLLAPSED",(function(){return o}));var n=i("J2xC"),r=parseInt(n["css-value-header-toolbar-height"]),o=3},yUly:function(e,t,i){"use strict";var n=i("Ss5c").LineDataSource,r=i("5rJj"),o=i("ytGH").LineToolWidthsProperty,s=window.t("Trend-Based Fib Time");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("SvjA").TrendBasedFibTimePaneView;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.version=1,a.prototype.pointsCount=function(){return 3},a.prototype.translatedType=function(){return s},a.prototype.name=function(){return"Trend-Based Fib Time"},a.prototype.migrateVersion=function(e,t,i){},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("u52p").TrendBasedFibTimeDefinitionsViewModel}.bind(null,i)).catch(i.oe)},a.createProperties=function(e){var t=new r("linetooltrendbasedfibtime",e,!1,{range:[1,11]});return a._configureProperties(t),t},a._configureProperties=function(e){n._configureProperties(e)},t.LineToolTrendBasedFibTime=a},yfAl:function(e,t,i){"use strict";i.r(t),i.d(t,"PaneBase",(function(){return p}));var n=i("aO4+"),r=i("Eyy1"),o=i("aIyQ"),s=i.n(o),a=i("e3/o"),l=i("Y7w9"),c=i("7ktv"),u=i("MWAT"),h=i("s1Gx"),d=i("CW80"),p=function(){function e(e,t,i){this._id=Object(a.randomHashN)(6),this.m_dataSources=[],this._sourcesById=new Map,this._dataSourcesCollectionChanged=new s.a,this._sourcePropertiesChanged=new s.a,this._tagsChanged=new s.a,this._stretchFactor=1e3,this._priceScaleSelectionStrategy=Object(u.createPriceScaleSelectionStrategy)(i.properties().priceScaleSelectionStrategyName.value())}return e.prototype.id=function(){return this._id},e.prototype.dataSourceForId=function(e){return this._sourcesById.get(e)||null},e.prototype.replaceSource=function(e,t,i){var n=e.zorder();this.insertDataSource(t,i,n),this.removeDataSource(e),this._sourcesById.set(t.id(),t)},e.prototype.setZOrder=function(e,t){e.setZorder(t),this._invalidateSourcesCache(),this._dataSourcesCollectionChanged.fire()},e.prototype.setZOrders=function(e){e.forEach((function(e,t){t.setZorder(e)})),this._invalidateSourcesCache(),this._dataSourcesCollectionChanged.fire(),this.model().lightUpdate()},e.prototype.containsMainSeries=function(){return this._sourcesById.has(this.model().mainSeries().id())},e.prototype.sendToBack=function(e){this._batchReorder(e,0,l.moveBefore)},e.prototype.bringToFront=function(e){var t=this.allOrderedSourcesWithoutSpecial().length-1;this._batchReorder(e,t,l.moveAfter)},e.prototype.sendBackward=function(e){var t=this.allOrderedSources(),i=t.indexOf(e[0]);if(0===i)this.bringToFront(e);else{var n=t[i-1];this.insertBefore(e,n)}},e.prototype.bringForward=function(e){var t=this.allOrderedSourcesWithoutSpecial(),i=t.indexOf(e[e.length-1]);if(i===t.length-1)this.sendToBack(e);else{var n=t[i+1];this.insertAfter(e,n)}},e.prototype.insertAfter=function(e,t){var i=this.allOrderedSources().indexOf(t);this._batchReorder(e,i,l.moveAfter)},e.prototype.insertBefore=function(e,t){
var i=this.allOrderedSources().indexOf(t);this._batchReorder(e,i,l.moveBefore)},e.prototype.priceScaleSelectionStrategy=function(){return this._priceScaleSelectionStrategy},e.prototype.findTargetPriceAxisViews=function(e,t,i,n,r){if(!r&&this.model().paneForSource(e)!==this)return[];var o=e.priceScale();if(t===o)return i;if(null===o)return[];if("overlay"===this.priceScalePosition(o))return t===this.defaultPriceScale()?i:[];var s=this.priceScalePosition(t);if(s!==this.priceScalePosition(o))return[];var a="left"===s?this.leftPriceScales():this.rightPriceScales();return a.indexOf(t)<a.indexOf(o)?n:[]},e.prototype.setPaneSize=function(e){var t;switch(e){case"large":t=1;break;case"medium":t=.6;break;case"small":t=.3;break;case"tiny":t=.15;break;default:throw new Error("Unknown size enum value: "+e)}this._stretchFactor=1e3*t},e.prototype.stretchFactor=function(){return this._stretchFactor},e.prototype.setStretchFactor=function(e){this._stretchFactor=e},e.prototype.onTagsChanged=function(){return this._tagsChanged},e.prototype.dataSourcesCollectionChanged=function(){return this._dataSourcesCollectionChanged},e.prototype.sourcePropertiesChanged=function(){return this._sourcePropertiesChanged},e.prototype.allOrderedSourcesWithoutSpecial=function(){return this.allOrderedSources().filter((function(e){return e.zorder()<h.specialZOrderBase}))},e.prototype.logicalRectToPixels=function(e){var t=this.defaultPriceScale(),i=this.timeScale(),o=Object(r.ensureNotNull)(Object(r.ensureNotNull)(t.mainSource()).firstValue()),s=t.priceToCoordinate(e.p1.price,o),a=i.indexToCoordinate(e.p1.index),l=t.priceToCoordinate(e.p2.price,o),c=i.indexToCoordinate(e.p2.index),u=new n.Point(Math.min(a,c),Math.min(s,l)),h=new n.Point(Math.max(a,c),Math.max(s,l));return Object(n.box)(u,h)},e.prototype.clipboardLineToolOwnerSource=function(e){var t=this.dataSourceForId(e);if(null!==t){var i=t.ownerSource();if(null!==i&&null!==i.firstValue())return i}var n=this.mainDataSource();if(null!==n&&null!==n.firstValue())return n;for(var r=0,o=this.dataSources();r<o.length;r++){var s=o[r];if(s instanceof c.PriceDataSource&&null!==s.firstValue())return s}return null},e.prototype._addSourceToCollections=function(e,t){var i=this;this.m_dataSources.push(e),this._sourcesById.set(e.id(),e),this._invalidateSourcesCache(),t||this._dataSourcesCollectionChanged.fire();var n=function(){i._sourcePropertiesChanged.fire(e)};e.properties().listeners().subscribe(this,n),Object(d.isLineTool)(e)&&e.normalizedPointsChanged().subscribe(this,n),e instanceof c.PriceDataSource&&e.currencyChanged().subscribe(this,(function(){return i._invalidateSourcesCache()}))},e.prototype._removeSourceFromCollections=function(e,t){var i=this.m_dataSources[e];i.properties().listeners().unsubscribeAll(this),this.m_dataSources.splice(e,1),this._sourcesById.delete(i.id()),this._invalidateSourcesCache(),t||this._dataSourcesCollectionChanged.fire(),i instanceof c.PriceDataSource&&i.currencyChanged().unsubscribeAll(this)},e.prototype._batchReorder=function(e,t,i){
i(this.allOrderedSources(),e,t).forEach((function(e,t){return e.setZorder(t+1)})),this._invalidateSourcesCache(),this._dataSourcesCollectionChanged.fire(),this.model().fullUpdate()},e}()},yi8X:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolInfoLine",(function(){return a}));var n=i("mrSG"),r=i("Ocx9"),o=i("WPQD"),s=window.t("Info Line"),a=function(e){function t(i,n){return e.call(this,i,n||t.createProperties())||this}return Object(n.__extends)(t,e),t.prototype.pointsCount=function(){return 2},t.prototype.translatedType=function(){return s},t.prototype.name=function(){return"Info Line"},t.createProperties=function(e){var i=new r.DefaultProperty("linetoolinfoline",e);return t._configureProperties(i),i},t._configureProperties=function(e){o.LineToolTrendLine._configureProperties(e)},t}(o.LineToolTrendLine)},ytGH:function(e,t,i){"use strict";i.r(t),i.d(t,"LineToolWidthsPropertyBaseImpl",(function(){return l})),i.d(t,"LineToolWidthsProperty",(function(){return c})),i.d(t,"MultipleLineWidthsProperty",(function(){return u}));var n=i("mrSG"),r=i("txPx"),o=i("aIyQ"),s=i.n(o),a=Object(r.getLogger)("Chart.LineToolWidthsProperty"),l=function(){function e(e){var t=this;this._onChange=new s.a,this._properties=e,e.forEach((function(e){return e.subscribe(t,(function(){t._onChange.fire(t)}))}))}return e.prototype.value=function(){if(0===this._properties.length)return a.logError("Incorrect call, should not request value of 0 properties"),"mixed";var e=this._properties[0].value();return 1===this._properties.length||this._properties.every((function(t){return t.value()===e}))?e:"mixed"},e.prototype.destroy=function(){var e=this;this._properties.forEach((function(t){return t.unsubscribeAll(e)}))},e.prototype.subscribe=function(e,t){this._onChange.subscribe(e,t)},e.prototype.unsubscribe=function(e,t){this._onChange.unsubscribe(e,t)},e.prototype.unsubscribeAll=function(e){this._onChange.unsubscribeAll(e)},e}(),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.setValue=function(e,t){"mixed"!==e&&this._properties.forEach((function(i){return t.applyValue(i,e)}))},t}(l),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(n.__extends)(t,e),t.prototype.setValue=function(e,t){"mixed"!==e&&this._properties.forEach((function(i){return i.setValue(e,t)}))},t.canCreateForSources=function(e){return e.some((function(e){return null!==e.widthsProperty()}))},t}(l)},"z+Sa":function(e,t,i){"use strict";i.r(t),i.d(t,"SeriesHorizontalBaseLinePaneView",(function(){return r}));var n=i("mrSG"),r=function(e){function t(t){return e.call(this,t)||this}return Object(n.__extends)(t,e),t.prototype._updateImpl=function(){this._lineRendererData.visible=!1;var e=this._series.priceScale().mode();if(e.percentage||e.indexedTo100){var t=this._series.firstValue();null!==t&&(this._lineRendererData.visible=!0,this._lineRendererData.y=this._series.priceScale().priceToCoordinate(t,t),this._lineRendererData.color=this._series.properties().baseLineColor.value())}},t}(i("k4w6").a)
},"z+cS":function(e,t,i){"use strict";i.r(t),i.d(t,"VerticalLineRenderer",(function(){return s}));var n=i("VdBB"),r=i("jFln"),o=i("gAom"),s=function(){function e(){this._data=null,this._hitTest=null}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)return null;var t=this._hitTest||new n.HitTestResult(n.HitTestResult.MOVEPOINT),i=Math.abs(e.x-this._data.x)<=3+this._data.linewidth/2,r=void 0===this._data.top||this._data.top-e.y<=3,o=void 0===this._data.bottom||e.y-this._data.bottom<=3;return i&&r&&o?t:null},e.prototype.draw=function(e,t){if(null!==this._data&&!(this._data.linewidth<=0||this._data.x<-this._data.linewidth/2||this._data.x>t.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<a.length;s++){var l=a[s],u=l.internalID;n[u]=l,f.hasOwnProperty(u)||p.logWarn("Unknown strategy input internal id "+u+" in "+t.fullId)}return Object(c.clone)((e=n,
Object.values(e).forEach(o.ensureDefined),e))},e}(),f=((n={}).currency=void 0,n.backtest_fill_limits_assumption=void 0,n.calc_on_every_tick=void 0,n.calc_on_order_fills=void 0,n.commission_value=void 0,n.commission_type=void 0,n.initial_capital=void 0,n.pyramiding=void 0,n.slippage=void 0,n.default_qty_type=void 0,n.default_qty_value=void 0,n);function m(e){return"strategy_props"===e.groupId}},"z8/4":function(e,t,i){"use strict";i.r(t),i.d(t,"OverlayLegendView",(function(){return s}));var n=i("mrSG"),r=i("JjUe"),o=i("qXYw"),s=function(e){function t(t,i){var n=e.call(this,t,i)||this;return n._additional=null,n._showBarChange=i.properties().paneProperties.legendProperties.showBarChange,n._showSeriesOHLC=i.properties().paneProperties.legendProperties.showSeriesOHLC,n._studyOverlay=t,n._showBarChange.subscribe(n,n.update),n._showSeriesOHLC.subscribe(n,n.update),n}return Object(n.__extends)(t,e),t.prototype.isValuesVisible=function(){return this._showSeriesOHLC.value()||this._showBarChange.value()},t.prototype.additional=function(){return this._additional},t.prototype.destroy=function(){this._showBarChange.unsubscribeAll(this),this._showSeriesOHLC.unsubscribeAll(this)},t.prototype._updateImpl=function(){e.prototype._updateImpl.call(this)},t.prototype._createValuesProvider=function(e,t){return new o.OverlayLegendValuesProvider(e,t)},t}(r.OverlayDataWindowView)},zDbI:function(e,t,i){"use strict";i.r(t),i.d(t,"CHART_FONT_FAMILY",(function(){return r}));var n=i("mNbo");var r=Object(n.a)("old")?"system-ui, -apple-system":"'Trebuchet MS', Roboto, Ubuntu, sans-serif"},zL3Q:function(e,t,i){"use strict";i.d(t,"a",(function(){return d})),i.d(t,"b",(function(){return p}));var n=i("lxNp"),r=i("hY0g"),o=i.n(r),s=i("4o++"),a=i("mMWL"),l=i("CW80"),c=new o.a(!1),u=new o.a(s.MagnetMode.WeakMagnet);function h(){var e=n.pressedKeys.value(),t=255&e,i=Boolean(e&n.Modifiers.Mod)&&(17===t||91===t),r=a.tool.value(),o=i&&(Object(l.isLineToolName)(r)||a.isToolEditingNow.value()||Object(a.toolIsMeasure)(r)),h=Object(a.properties)().childs().magnet.value();u.setValue(!h&&o?s.MagnetMode.StrongMagnet:Object(a.properties)().childs().magnetMode.value()),c.setValue(o?!h:h)}function d(){return c}function p(){return u}Object(a.runOnDrawingStateReady)((function(){Object(a.properties)().childs().magnet.subscribe(null,h),Object(a.properties)().childs().magnetMode.subscribe(null,h),n.pressedKeys.subscribe(h),a.tool.subscribe(h),a.isToolEditingNow.subscribe(h),h()}))},zM7N:function(e,t,i){"use strict";var n,r=i("YFKU"),o=i("eJTA"),s=i("/McG"),a=i("8pII");function l(){var e;return(e={})[n.Light]=JSON.parse(JSON.stringify(s)),e[n.Dark]=JSON.parse(JSON.stringify(a)),e}function c(){return[n.Light,n.Dark]}function u(e){return l()[e]}function h(e){var t;return((t={})[n.Light]=r.t("Light",{context:"colorThemeName"}),t[n.Dark]=r.t("Dark",{context:"colorThemeName"}),t)[e]||e}function d(e){var t=l();return c().some((function(i){return p(t[i],e)}))}function p(e,t){var i=e.content===t.content;return function(e,t){void 0===e&&(e={});try{!function e(t,i,n){
for(var r in t)if(t.hasOwnProperty(r)){var o=i.concat(r);if("object"==typeof t[r])e(t[r],o,n);else if(n(o,t[r]))throw new Error("exit")}}(e,[],t)}catch(i){return}}(e.content,(function(e,n){var r=function(e,t){void 0===t&&(t={});for(var i=t,n=0;n<e.length;n++){if(!i||"object"!=typeof i)return;i=i[e[n]]}if("string"==typeof i||"number"==typeof i)return i;return}(e,t.content);return!(i=function(e,t){if("string"==typeof e&&"string"==typeof t)try{return Object(o.areEqualRgb)(Object(o.parseRgb)(e),Object(o.parseRgb)(t))}catch(i){return e===t}return e===t}(n,r))})),i}!function(e){e.Light="light",e.Dark="dark"}(n||(n={})),i.d(t,"c",(function(){return c})),i.d(t,"b",(function(){return u})),i.d(t,"e",(function(){return h})),i.d(t,"d",(function(){return d})),i.d(t,"a",(function(){return n}))},zRdu:function(e,t,i){"use strict";var n;i.d(t,"a",(function(){return n})),function(e){e[e.Separator=0]="Separator",e[e.Action=1]="Action",e[e.ActionAsync=2]="ActionAsync"}(n||(n={}))},zUrt:function(e,t,i){"use strict";i.r(t),i.d(t,"backend",(function(){return n}));var n=i("Ery9")},zXvd:function(e,t,i){"use strict";i.r(t),i.d(t,"NumericFormatter",(function(){return r}));var n=i("kcTO"),r=function(){function e(e){this._precision=e}return e.prototype.format=function(t){return(void 0!==this._precision?t.toFixed(this._precision):e.formatNoE(t)).replace(".",n.formatterOptions.decimalSign)},e.prototype.parse=function(e){var t=e.replace(n.formatterOptions.decimalSign,"."),i=parseFloat(t);return this._precision&&(i=+i.toFixed(this._precision)),i},e.formatNoE=function(e){return e>=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<u.bottom+t?u.top-t:u.bottom}}))}))}))},
t.prototype._mainDataSourceOnPane=function(){var e=this._crosshair.pane;return null!==e?e.mainDataSource():null},t}(f.PanePriceAxisView),b=i("Tmoa"),S=i("8Uy/"),w=i("VaSN"),P=i("jFln"),C=i("VdBB"),x=i("gAom"),T=function(){function e(e){this._data=e}return e.prototype.hitTest=function(e){return void 0===this._data.clickHandler?null:new C.HitTestResult(C.HitTestResult.CUSTOM,{clickHandler:this._data.clickHandler,tapHandler:this._data.clickHandler})},e.prototype.draw=function(e,t){var i=t.pixelRatio,n=this._data.vertLinesVisible,r=this._data.horzLinesVisible;if(n||r){e.save(),e.lineWidth=Math.max(1,Math.floor(this._data.lineWidth*i)),e.strokeStyle=this._data.color,e.fillStyle=this._data.color,e.lineCap="butt",Object(P.setLineStyle)(e,this._data.lineStyle);var o=Math.round(this._data.x*i),s=Math.round(this._data.y*i),a=Math.ceil(this._data.w*i),l=Math.ceil(this._data.h*i);n&&o>=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<s?"rgba(239,83,80,0.2)":"rgba(30,136,229,0.2)",O=a<s?"#EF5350":"#1E88E5",V=a<s?"#EF5350":"#2196F3",D={points:[this._p1,this._p2],linewidth:0,fillBackground:!0,color:L,backcolor:L,extendLeft:!1,extendRight:!1};this._bgRenderer.setData(D);var R=this._p1.add(this._p2).scaled(.5),H=Math.round(R.y),z={points:[U=new o.Point(this._p1.x,H),G=new o.Point(this._p2.x,H)],color:O,linewidth:1,linestyle:S.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:N.LineEnd.Normal,rightend:Math.abs(U.x-G.x)>=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"]]]);