File Manager

Path: /home/liffinac1/domains/fxinvestcapital.us/private_html/db_files/a_data/

Viewing File: study-pane-views.js

(window.webpackJsonp=window.webpackJsonp||[]).push([["study-pane-views"],{"0HiO":function(t,e,i){"use strict";i.r(e),i.d(e,"TrendChannelPaneView",(function(){return h}));var r=i("Eyy1"),a=i("aO4+"),n=i("hBTJ"),o=i("VdBB"),s=i("Zy3/"),l=i("8Uy/"),c=i("BCbF"),h=function(){function t(t,e,i){this._data=[],this._invalidated=!0,this._provider=t,this._model=e,this._data=[],this._hitTestResult=void 0!==i?new o.HitTestResult(o.HitTestResult.CUSTOM,i):new o.HitTestResult(o.HitTestResult.REGULAR)}return t.prototype.update=function(){this._invalidated=!0},t.prototype.renderer=function(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);for(var t=new s.CompositeRenderer,e=0,i=this._data;e<i.length;e++){var r=i[e],a=new c.PolygonRenderer(this._hitTestResult);a.setData(r),t.append(a)}return t},t.prototype._updateViewInternal=function(){var t=this;this._data=[];var e=this._provider.priceScale(),i=this._model.timeScale();if(e&&!e.isEmpty()&&!i.isEmpty()){var n=this._provider.graphics().trendchannels();if(0!==n.size){var o=this._model.timeScale().visibleBarsStrictRange();if(null!==o){var s=this._provider.firstValue();if(null!==s){var c=o.firstBar(),h=o.lastBar();n.forEach((function(n,o){var u=t._provider.properties().graphics.trendchannels[o];n.forEach((function(n){var o=n.startIndex,p=n.endIndex;if(!(Math.max(o,p)<c&&!n.extendRight||Math.min(o,p)>h&&!n.extendLeft)){var f=e.priceToCoordinate(Object(r.ensureDefined)(n.startHighPrice),s),v=e.priceToCoordinate(Object(r.ensureDefined)(n.startLowPrice),s),_=e.priceToCoordinate(Object(r.ensureDefined)(n.endHighPrice),s),y=_-(f-v),g=i.indexToCoordinate(o),w=i.indexToCoordinate(p),x=d(new a.Point(g,f),new a.Point(w,_),i.width(),e.height(),n.extendLeft,n.extendRight),b=x[0],m=x[1],T=d(new a.Point(g,v),new a.Point(w,y),i.width(),e.height(),n.extendLeft,n.extendRight),R=T[0],P=T[1];t._data.push({points:[b,R,P,m],color:u.color.value(),backcolor:u.color.value(),linewidth:void 0!==u.borderWidth?u.borderWidth.value():0,linestyle:l.LINESTYLE_SOLID,filled:!0,fillBackground:!0,transparency:n.transparency?Math.min(n.transparency+u.transparency.value(),100):u.transparency.value(),mouseTouchable:!0})}}))}))}}}}},t}();function d(t,e,i,r,o,s){if(Object(a.equalPoints)(t,e))return[t,e];var l=new a.Point(0,0),c=new a.Point(i,r);if(o){var h=t.subtract(e);(d=Object(n.intersectRayAndBox)(t,t.add(h),Object(a.box)(l,c)))?t=d:e=new a.Point(i,e.y)}if(s){h=e.subtract(t);var d=Object(n.intersectRayAndBox)(e,e.add(h),Object(a.box)(l,c));e=d||new a.Point(i,e.y)}return[t,e]}},"1sos":function(t,e,i){"use strict";i.r(e),i.d(e,"HorizLinePaneView",(function(){return s}));var r=i("Eyy1"),a=i("VdBB"),n=i("Zy3/"),o=i("l4sv"),s=function(){function t(t,e,i){this._data=[],this._invalidated=!0,this._provider=t,this._model=e,this._hitTestResult=void 0!==i?new a.HitTestResult(a.HitTestResult.CUSTOM,i):new a.HitTestResult(a.HitTestResult.REGULAR)}return t.prototype.update=function(){this._invalidated=!0},t.prototype.renderer=function(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1)
;for(var t=new n.CompositeRenderer,e=0,i=this._data;e<i.length;e++){var r=i[e],a=new o.HorizontalLineRenderer;a.setData(r),a.setHitTest(this._hitTestResult),t.append(a)}return t},t.prototype._updateViewInternal=function(){var t=this;this._data=[];var e=this._provider.priceScale(),i=this._model.timeScale();if(e&&!e.isEmpty()&&!i.isEmpty()){var a=this._provider.graphics().horizlines();if(0!==a.size){var n=this._model.timeScale().visibleBarsStrictRange();if(null!==n){var o=this._provider.firstValue();if(null!==o){var s=n.firstBar(),l=n.lastBar();a.forEach((function(a,n){var c=t._provider.properties().graphics.horizlines[n];c.visible.value()&&a.forEach((function(a){var n=a.startIndex,h=a.endIndex;!a.extendRight&&Math.max(n,h)<s||!a.extendLeft&&Math.min(n,h)>l||t._data.push({y:e.priceToCoordinate(Object(r.ensureDefined)(a.level),o),left:a.extendLeft?void 0:i.indexToCoordinate(n),right:a.extendRight?void 0:i.indexToCoordinate(h),color:c.color.value(),linewidth:c.width.value(),linestyle:c.style.value()})}))}))}}}}},t}()},"292E":function(t,e,i){"use strict";i.r(e);var r=i("mrSG"),a=i("Eyy1"),n=i("aO4+"),o=i("972a"),s=i("nInm"),l=i("Zy3/"),c=i("f6yo"),h=i("VdBB"),d=i("ikwP"),u=i("Ialn"),p=function(){function t(t,e){this._data=t,this._textCache=e}return t.prototype.draw=function(t,e){var i=this;if(this._data){var r=f(this._data.direction),a=this._data.point.x;"left"===this._data.halign?a-=this._data.size:"right"===this._data.halign&&(a+=this._data.size);var n=this._data.point.y;t.font=this._fontStyle();var o=t.measureText(this._data.text).width;this._textCache.textWidth=o;var s=this._data.fontSize;t.textAlign=Object(u.isRtl)()?"right":"left";var l=Object(d.calcTextHorizontalShift)(t,o),c=.65*s,h=1*s;Object(d.drawScaled)(t,e.pixelRatio,(function(){t.translate(a,n),t.beginPath(),t.moveTo(0,0),t.lineTo(c,h*r),t.lineTo(.5*o+c,h*r),t.lineTo(.5*o+c,(h+1.75*s)*r),t.lineTo(.5*-o-c,(h+1.75*s)*r),t.lineTo(.5*-o-c,h*r),t.lineTo(-c,h*r),t.lineTo(0,0),t.strokeStyle=i._data.borderColor,t.stroke(),t.fillStyle=i._data.color,t.fill(),t.fillStyle=i._data.fontColor,t.fillText(i._data.text,.5*-o+l,r<0?r*h-.5*s:h+1.25*s)}))}},t.prototype.hitTest=function(t){var e=this._textCache.textWidth||0,i=this._data.fontSize,r=f(this._data.direction),a=.65*i,o=1*i,s=this._data.point.x;"left"===this._data.halign?s-=this._data.size:"right"===this._data.halign&&(s+=this._data.size);var l=this._data.point.y,d=s-.5*e-a,u=s+.5*e+a,p=l+o*r,v=l+(o+1.75*i)*r;if(v<p){var _=p;p=v,v=_}if(Object(c.pointInBox)(t,Object(n.box)(new n.Point(d,p),new n.Point(u,v))))return new h.HitTestResult(h.HitTestResult.REGULAR);var y=[new n.Point(this._data.point.x,this._data.point.y),new n.Point(this._data.point.x+.65*i,this._data.point.y+i*r),new n.Point(this._data.point.x-.65*i,this._data.point.y+i*r)],g=(t.x-y[0].x)*(y[1].y-y[0].y)-(t.y-y[0].y)*(y[1].x-y[0].x);return((t.x-y[1].x)*(y[2].y-y[1].y)-(t.y-y[1].y)*(y[2].x-y[1].x))*g>0&&((t.x-y[2].x)*(y[0].y-y[2].y)-(t.y-y[2].y)*(y[0].x-y[2].x))*g>0?new h.HitTestResult(h.HitTestResult.REGULAR):null},t.prototype._fontStyle=function(){
return(this._data.bold?"bold ":"")+(this._data.italic?"italic ":"")+this._data.fontSize+"px "+this._data.font},t}();function f(t){if("up"===t)return 1;if("down"===t)return-1;throw new Error(t+" is not supported by TriangleTextMarkRenderer")}var v=function(){function t(t,e){this._data=t,this._textCache=e}return t.prototype.draw=function(t,e){var i=this,r=this._data.point.x,a=this._data.point.y;t.font=this._fontStyle();var n=t.measureText(this._data.text).width;this._textCache.textWidth=n,Object(d.drawScaled)(t,e.pixelRatio,(function(){switch(t.translate(r,a),t.beginPath(),t.moveTo(0,0),t.textAlign=i._data.halign,i._data.valign){case"middle":t.textBaseline="middle";break;case"top":t.textBaseline="bottom";break;case"bottom":t.textBaseline="hanging"}t.fillStyle=i._data.fontColor,t.fillText(i._data.text,0,0)}))},t.prototype.hitTest=function(t){var e=this._data.point.x,i=this._data.point.y,r=this._textCache.textWidth||0,a=this._data.fontSize;switch(this._data.halign){case"right":e-=r;break;case"center":e-=r/2}switch(this._data.valign){case"middle":i-=a/2;break;case"bottom":i-=a}var o=new n.Point(e,i),s=new n.Point(e+r,i+a);return Object(c.pointInBox)(t,Object(n.box)(o,s))?new h.HitTestResult(h.HitTestResult.REGULAR):null},t.prototype._fontStyle=function(){return(this._data.bold?"bold ":"")+(this._data.italic?"italic ":"")+this._data.fontSize+"px "+this._data.font},t}(),_=i("tSCe"),y=i.n(_),g=i("Tmoa");i.d(e,"TextMarkPaneView",(function(){return w}));var w=function(t){function e(e,i,r){var a=t.call(this)||this;return a._data=[],a._textCache=[],a._invalidated=!0,a._provider=e,a._model=i,a._data=[],a._textCache=[],a}return Object(r.c)(e,t),e.prototype.update=function(){this._invalidated=!0},e.prototype.renderer=function(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);for(var t=new l.CompositeRenderer,e=0;e<this._data.length;e++){var i=this._data[e],r=this._textCache[e];switch(i.shape){case"triangle":t.append(new p(i,r));break;case"rectangle":t.append(new v(i,r))}}return t},e.prototype._updateViewInternal=function(){var t=this;this._data=[];var e=this._provider.priceScale(),i=this._model.timeScale();if(e&&!e.isEmpty()&&!i.isEmpty()){var a=this._provider.graphics().textmarks();if(0!==a.size){var o=this._model.timeScale().visibleBarsStrictRange();if(null!==o){var l=this._provider.firstValue();if(null!==l){var c=o.firstBar(),h=o.lastBar();a.forEach((function(a,o){var d=t._provider.properties().graphics.textmarks[o];d.visible.value()&&a.forEach((function(a){var o=a.time;if(!(o<c||h<o)&&null!==t._provider.series().bars().valueAt(o)){o=a.time+(a.offset||0);var u={text:a.text?a.text:"",bold:d.fontBold.value(),italic:d.fontItalic.value(),font:d.fontFamily.value(),fontColor:Object(g.generateColor)(d.fontColor.value(),d.transparency.value()),fontSize:d.fontSize.value()},p=d.location.value(),f=d.shape.value();switch(f){case s.a.Triangle:var v=t._calcCoordsForTriangleShape(p,o,50,a.price,l,e,i),_=v.x,y=v.y,w=v.direction;t._data.push(Object(r.a)({shape:f,
color:Object(g.generateColor)(d.color.value(),d.transparency.value()),borderColor:"rgb(0, 0, 0)",direction:w,point:new n.Point(_,y),halign:d.halign.value(),size:.5*i.barSpacing()},u));break;case s.a.Rectangle:var x=t._calcCoordsForRectangleShape(p,o,a.price,l,e,i);_=x.x,y=x.y;t._data.push(Object(r.a)({shape:f,point:new n.Point(_,y),halign:d.halign.value(),valign:void 0!==d.valign?d.valign.value():"middle"},u))}t._textCache.push({})}}))}))}}}}},e.prototype._calcCoordsForTriangleShape=function(t,e,i,r,n,s,l){var c=Math.round(l.indexToCoordinate(e));switch(t){case o.MarkLocation.Top:return{x:c,y:s.height()-i,direction:"down"};case o.MarkLocation.Bottom:return{x:c,y:i,direction:"up"};case o.MarkLocation.AbsoluteDown:return{x:c,y:s.priceToCoordinate(Object(a.ensureDefined)(r),n),direction:"down"};case o.MarkLocation.AbsoluteUp:return{x:c,y:s.priceToCoordinate(Object(a.ensureDefined)(r),n),direction:"up"};case o.MarkLocation.AboveBar:return{x:c,y:this._locationToY(t,e),direction:"down"};case o.MarkLocation.BelowBar:default:return{x:c,y:this._locationToY(t,e),direction:"up"}}},e.prototype._calcCoordsForRectangleShape=function(t,e,i,r,n,s){var l=Math.round(s.indexToCoordinate(e));switch(t){case o.MarkLocation.AbsoluteDown:case o.MarkLocation.AbsoluteUp:case o.MarkLocation.Absolute:return{x:l,y:n.priceToCoordinate(Object(a.ensureDefined)(i),r)};case o.MarkLocation.AboveBar:case o.MarkLocation.BelowBar:return{x:l,y:this._locationToY(t,e)};case o.MarkLocation.Right:case o.MarkLocation.Left:return{x:s.width(),y:n.priceToCoordinate(Object(a.ensureDefined)(i),r)};default:return{x:l,y:this._locationToY(t,e)}}},e}(y.a)},"3zbQ":function(t,e,i){"use strict";i.r(e),i.d(e,"LevelPaneView",(function(){return d}));var r=i("Eyy1"),a=i("aO4+"),n=i("VdBB"),o=i("VSsv"),s=i("Zy3/"),l=i("l4sv"),c=i("qgcf"),h=i("zDbI"),d=function(){function t(t,e,i){this._data=[],this._textData=[],this._invalidated=!0,this._provider=t,this._model=e}return t.prototype.update=function(){this._invalidated=!0},t.prototype.renderer=function(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);for(var t=new s.CompositeRenderer,e=0,i=this._data;e<i.length;e++){var r=i[e],a=new l.HorizontalLineRenderer;a.setData(r),t.append(a)}for(var o=0,h=this._textData;o<h.length;o++){var d=h[o];t.append(new c.TextRenderer(d,new n.HitTestResult(n.HitTestResult.REGULAR)))}return t},t.prototype._updateViewInternal=function(){this._calcHorzLinesData(),this._calcTextData()},t.prototype._calcTextData=function(){var t=this;this._textData=[];var e=this._provider.priceScale(),i=this._model.timeScale();if(e&&!e.isEmpty()&&!i.isEmpty()){var n=this._provider.graphics().hlines();if(0!==n.size){var s=this._provider.firstValue();null!==s&&n.forEach((function(n,l){var c=t._provider.properties().graphics.hlines[l];c.enableText.value()&&c.showText.value()&&n.forEach((function(n){var l=e.priceToCoordinate(Object(r.ensureDefined)(n.level),s),d=c.textPos.value(),u=function(t,e){if(t===o.a.TopLeft||t===o.a.MiddleLeft||t===o.a.BottomLeft)return["left",4]
;if(t===o.a.TopCenter||t===o.a.MiddleCenter||t===o.a.BottomCenter)return["center",e/2];if(t===o.a.TopRight||t===o.a.MiddleRight||t===o.a.BottomRight)return["right",e];throw new Error("Unsupported TextPos value")}(d,i.width()),p=u[0],f=u[1],v=function(t,e){if(t===o.a.TopLeft||t===o.a.TopCenter||t===o.a.TopRight)return["bottom",e-4];if(t===o.a.MiddleLeft||t===o.a.MiddleCenter||t===o.a.MiddleRight)return["middle",e-2];if(t===o.a.BottomLeft||t===o.a.BottomCenter||t===o.a.BottomRight)return["top",e];throw new Error("Unsupported TextPos value")}(d,l),_=v[0],y=v[1];t._textData.push({points:[new a.Point(f,y)],offsetX:0,offsetY:0,text:n.text||"",color:c.color.value(),font:h.CHART_FONT_FAMILY,fontsize:c.fontSize.value(),horzAlign:p,vertAlign:_})}))}))}}},t.prototype._calcHorzLinesData=function(){var t=this;this._data=[];var e=this._provider.priceScale(),i=this._model.timeScale();if(e&&!e.isEmpty()&&!i.isEmpty()){var a=this._provider.graphics().hlines();if(0!==a.size){var n=this._provider.firstValue();null!==n&&a.forEach((function(i,a){var o=t._provider.properties().graphics.hlines[a];o.visible.value()&&i.forEach((function(i){var a=e.priceToCoordinate(Object(r.ensureDefined)(i.level),n);t._data.push({visible:!0,y:a,color:o.color.value(),linewidth:o.width.value(),linestyle:o.style.value()})}))}))}}},t}()},BJvp:function(t,e,i){"use strict";i.r(e),i.d(e,"PolygonPaneView",(function(){return c}));var r=i("Eyy1"),a=i("aO4+"),n=i("VdBB"),o=i("Zy3/"),s=i("8Uy/"),l=i("BCbF"),c=function(){function t(t,e,i){this._data=[],this._invalidated=!0,this._provider=t,this._model=e,this._hitTestResult=void 0!==i?new n.HitTestResult(n.HitTestResult.CUSTOM,i):new n.HitTestResult(n.HitTestResult.REGULAR)}return t.prototype.update=function(){this._invalidated=!0},t.prototype.renderer=function(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);for(var t=new o.CompositeRenderer,e=0,i=this._data;e<i.length;e++){var r=i[e],a=new l.PolygonRenderer(this._hitTestResult);a.setData(r),t.append(a)}return t},t.prototype._updateViewInternal=function(){var t=this;this._data=[];var e=this._provider.priceScale(),i=this._model.timeScale();if(e&&!e.isEmpty()&&!i.isEmpty()){var n=this._provider.graphics().polygons();if(0!==n.size){var o=this._model.timeScale().visibleBarsStrictRange();if(null!==o){var l=this._provider.firstValue();if(null!==l){var c=o.firstBar(),h=o.lastBar();n.forEach((function(n,o){var d=t._provider.properties().graphics.polygons[o];100!==d.transparency.value()&&n.forEach((function(n){for(var o=1/0,u=-1/0,p=0,f=n.points;p<f.length;p++){var v=f[p],_=v.index+(v.offset||0);o=Math.min(o,_),u=Math.max(u,_)}if(!(u<c||h<o)){var y=n.points.map((function(t){var n=i.indexToCoordinate(t.index+(t.offset||0)),o=e.priceToCoordinate(Object(r.ensureDefined)(t.level),l);return new a.Point(n,o)}));t._data.push({points:y,color:d.color.value(),backcolor:d.color.value(),linewidth:void 0!==d.showBorder&&d.showBorder.value()?1:0,linestyle:s.LINESTYLE_SOLID,filled:!0,fillBackground:!0,transparency:d.transparency.value(),
mouseTouchable:d.mouseTouchable.value()})}}))}))}}}}},t}()},Gj0v:function(t,e,i){"use strict";i.r(e);var r=i("mrSG"),a=i("Eyy1"),n=i("VdBB"),o=i("Zy3/"),s=i("qgcf"),l=i("aO4+"),c=i("eJTA"),h=i("ikwP"),d=i("KG+6"),u=i("nEwK"),p=i("zDbI");function f(t,e){return{min:Math.min(t,e),max:Math.max(t,e)}}function v(t){return t.max-t.min}var _=function(){function t(t){this._data=t}return t.prototype.hitTest=function(t,e){for(var i=this._data,r=function(r){if(r.xRange.min>=t.x||t.x>=r.xRange.max||r.yRange.min>=t.y||t.y>=r.yRange.max)return"continue";var a=r.yRange.min,o=0;r.bars.forEach((function(t){var e=t.subBarValues.reduce((function(t,e){return t+e}));o=Math.max(o,e)}));for(var s=v(r.xRange),l=0,c=r.bars;l<c.length;l++){var h=c[l],d=i.styles[h.styleId];if(!d.visible)return{value:null};var u=y(r.xRange,d,e.cssWidth),p=u.xBasePoint,_=u.sign,g=f(a,a+h.height);a+=h.height;for(var w=Math.max(d.percentWidth*s/100-h.subBarValues.length,0),x=0;x<h.subBarValues.length;x++){var b=g.min,m=g.max,T=0===x?p:p+_*(w*h.subBarValues[x-1]/o),R=T+_*(w*h.subBarValues[x]/o);if((t.x>=T&&t.x<=R||t.x>=R&&t.x<=T)&&t.y>=b&&t.y<=m)return{value:new n.HitTestResult(n.HitTestResult.REGULAR)}}}},a=0,o=i.histograms;a<o.length;a++){var s=r(o[a]);if("object"==typeof s)return s.value}return null},t.prototype.draw=function(t,e){var i=this._data;t.save(),i.histograms.forEach((function(r){var a=[],n=r.yRange.min,o=0,s=0;r.bars.forEach((function(t){var e=t.subBarValues.reduce((function(t,e){return t+e}));o=Math.max(o,e),s+=t.height}));var l,h,d=s/r.bars.length,u=(l=d,h=e.pixelRatio,Math.floor(l*h)>=1*h?Math.floor(h):0),p=v(r.xRange),_=[];if(r.bars.forEach((function(s){var l=i.styles[s.styleId];if(l.visible){if(l.showValues)for(var c=0;c<s.subBarValues.length;c++)a[c]=(a[c]||0)+s.subBarValues[c];var h=y(r.xRange,l,e.cssWidth),d=h.xBasePoint,v=h.sign,x=f(n,n+s.height);if(n+=s.height,!(x.min>e.cssHeight||x.max<0)){var b=Math.max(l.percentWidth*p/100-s.subBarValues.length,0);for(c=0;c<s.subBarValues.length;c++){var m=x.min,T=x.max,R=0===c?d:d+v*(b*s.subBarValues[c-1]/o),P=R+v*(b*s.subBarValues[c]/o);if(!(Math.abs(P-R)<.5)){t.fillStyle=l.colors[c],t.beginPath();var S=Math.round(R*e.pixelRatio),C=Math.round(m*e.pixelRatio),O=Math.round(P*e.pixelRatio),L=Math.round(T*e.pixelRatio),B=O-S,M=Math.max(L-C-u,1);t.rect(S,C,B,M),t.fill()}}if(l.showValues){var E=g(s.subBarValues,l.direction),H=w(p,x,h,l,E);_.push(H)}}}})),_.length>0){var b=i.styles[r.bars[0].styleId],m=y(r.xRange,b,e.cssWidth),T=f(n,n+d),R=g(a,b.direction),P=w(p,T,m,b,R);P.color=Object(c.shiftColor)(P.color,1.5),_.push(P)}var S=Math.min.apply(Math,_.map((function(t){return t.fontSize})));if(S>=7.5)for(var C=0,O=_;C<O.length;C++){var L=O[C];L.fontSize=S,x(t,e,L)}})),t.restore()},t}();function y(t,e,i){var r,a,n=e.location===d.b.Absolute,o=e.location===d.b.Relative,s=e.direction===d.a.LeftToRight,l=e.direction===d.a.RightToLeft;if(n&&s)r=t.min,a=1;else if(n&&l)r=t.max,a=-1;else if(o&&s)r=0,a=1;else{if(!o||!l)throw new Error("Unknown location/direction values: "+e.location+"/"+e.direction);r=i,a=-1}return{
xBasePoint:r,sign:a}}function g(t,e){e===d.a.RightToLeft&&(t=t.slice()).reverse();var i=new u.VolumeFormatter;return t.map((function(t){return i.format(t)})).join("x")}function w(t,e,i,r,a){var n=Math.min(Math.round(1.7*t/a.length),Math.round(.6*v(e))),o=r.direction===d.a.LeftToRight?"left":"right",s=i.xBasePoint+3*i.sign,c=e.min+.7*v(e);return{text:a,color:r.valuesColor,fontSize:n,align:o,point:new l.Point(s,c)}}function x(t,e,i){var r=i.text,a=i.color,n=i.fontSize,o=i.align,s=i.point;t.font=n+"px "+p.CHART_FONT_FAMILY,t.fillStyle=a,t.textAlign=o,Object(h.drawScaled)(t,e.pixelRatio,(function(){return t.fillText(r,s.x,s.y)}))}var b=i("Tmoa");i.d(e,"HHistPaneView",(function(){return m}));var m=function(){function t(t,e,i){this._invalidated=!0,this._provider=t,this._model=e,this._rendererData={histograms:[],styles:{}},this._textData=[],this._hhistRenderer=new _(this._rendererData)}return t.prototype.update=function(){this._invalidated=!0},t.prototype.renderer=function(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);var t=new o.CompositeRenderer;t.append(this._hhistRenderer);for(var e=0,i=this._textData;e<i.length;e++){var r=i[e];t.append(new s.TextRenderer(r,new n.HitTestResult(n.HitTestResult.REGULAR)))}return t},t.prototype._resetRenderersData=function(){this._rendererData.histograms=[],this._textData=[]},t.prototype._prepareStyles=function(){var t=Object.keys(Object(a.ensureDefined)(this._provider.graphicsInfo().hhists)),e=this._provider.properties().graphics.hhists;this._rendererData.styles={};for(var i=0,r=t;i<r.length;i++){var n=r[i],o=Object(a.ensureDefined)(e.child(n)),s=Object(b.generateColor)(o.colors[0].value(),o.transparencies[0].value()),l=o.colors[1]?Object(b.generateColor)(o.colors[1].value(),o.transparencies[1].value()):s;this._rendererData.styles[n]={colors:[s,l],visible:o.visible.value(),percentWidth:o.percentWidth.value(),location:o.location.value(),direction:o.direction.value(),showValues:o.showValues.value(),valuesColor:o.valuesColor.value()}}},t.prototype._updateViewInternal=function(){var t=this;this._resetRenderersData();var e=this._provider.priceScale(),i=this._model.timeScale();if(e&&!e.isEmpty()&&!i.isEmpty()&&null!==this._provider.firstValue()){var r=this._provider.graphics().hhistsByTimePointIndex();if(0!==r.size){var n=i.visibleBarsStrictRange();if(null!==n){var o=n.firstBar(),s=n.lastBar();this._prepareStyles(),Object(a.ensureDefined)(r).forEach((function(r,a){var n=1/0,l=-1/0;r.forEach((function(t){n=Math.min(n,t.firstBarTime),l=Math.max(l,t.lastBarTime)})),l<o||n>s||t._updateDataForRenderers(r,e,i)}))}}}},t.prototype._updateDataForRenderers=function(t,e,i){var n=this;if(!(t.size<=0)){var o=null;if(t.forEach((function(t){o=o||t})),null!==o){var s=o;t.forEach((function(t){t.priceLow<s.priceLow&&(s=t)}));var l=function(t,e){return f(e.indexToCoordinate(t.firstBarTime),e.indexToCoordinate(t.lastBarTime))}(o,i),c=[];t.forEach((function(t){null==t.rate[t.rate.length-1]&&t.rate.splice(-1,1);var i=function(t,e,i){
return f(e.priceToCoordinate(t.priceHigh,i),e.priceToCoordinate(t.priceLow,i))}(t,e,Object(a.ensureNotNull)(n._provider.firstValue()));c.push({yRange:i,subBarValues:t.rate,styleId:t.styleId})})),c.sort((function(t,e){return t.yRange.min-e.yRange.min}));for(var h=[],d=c[0].yRange.min,u=0,p=c;u<p.length;u++){var v=p[u],_=v.yRange.max-d;h.push(Object(r.a)({height:_},v)),d=v.yRange.max}this._rendererData.histograms.push({xRange:l,yRange:f(c[0].yRange.min,d),bars:h})}}},t}()},IMGS:function(t,e,i){"use strict";var r=i("aB9a").LineSourcePaneView,a=i("rvCT").LinearRegressionPaneView,n=i("NN6M").ParallelChannelRenderer,o=i("qgcf").TextRenderer,s=i("pJOz").TrendLineRenderer,l=i("vq8G").SelectionRenderer,c=i("VdBB").HitTestResult,h=i("Zy3/").CompositeRenderer,d=i("Tmoa");function u(t,e){r.call(this,t,e),this._calc=null,this._lines=[],this._pearsons=null,this._pearsonsLabelRenderer=new o,this._renderer=null}inherit(u,r),u.prototype.getTransparencyResetLines=function(){return this._lines.map((function(t){var e=$.extend({},t);return e.color=d.resetTransparency(e.color),e}))},u.prototype.renderer=function(t,e){return this._invalidated&&this._updateImpl(),this._renderer},u.prototype._updateImpl=function(){r.prototype._updateImpl.call(this),a.prototype._updateImpl.call(this),this._renderer=null;for(var t=new h,e=[],i=[this._lines[1],this._lines[0],this._lines[2]],o=[],u=0;u<i.length;u++)i[u]&&o.push(i[u]);for(u=1;u<o.length;u++){var p={};p.points=[i[u].floatPoints[0],i[u].floatPoints[1],i[u-1].floatPoints[0],i[u-1].floatPoints[1]],p.color=i[u].color,p.width=this._model.timeScale().width(),p.height=this._source.priceScale().height(),p.linewidth=i[u].linewidth,p.linestyle=i[u].linestyle,p.extendleft=!1,p.extendright=i[u].extendright,p.backcolor=p.color,p.transparency=this._source.properties().styles.transparency.value(),p.skipLines=!0,p.fillBackground=!0,(v=new n(new c(c.REGULAR))).setData(p),t.append(v)}var f=this.getTransparencyResetLines();for(u=0;u<o.length;u++){var v;(v=new s).setData(f[u]),v.setHitTest(new c(c.REGULAR)),t.append(v),0!==u&&(e=e.concat(this._lines[u].floatPoints))}if(this._pearsons&&(this._pearsons.color=d.resetTransparency(this._pearsons.color),this._pearsonsLabelRenderer.setData(this._pearsons),t.append(this._pearsonsLabelRenderer)),this._lines&&this._lines.length>=1){t.append(new l({points:e,bgColors:this._lineAnchorColors(e),visible:this.areAnchorsVisible()}));var _=this._lines[0].floatPoints;_[0].data=0,_[1].data=1,t.append(this.createLineAnchor({points:_}))}this._renderer=t},e.RegressionTrendPaneView=u},IyRz:function(t,e,i){"use strict";i.r(e);var r=i("Eyy1"),a=i("Zy3/"),n=i("ikwP"),o=i("Tmoa"),s=function(){function t(t){this._data=t}return t.prototype.hitTest=function(t){return null},t.prototype.draw=function(t,e){},t.prototype.drawBackground=function(t,e){var i=this._data,r=Object(o.generateColor)(this._data.color,this._data.transparency),a=e.pixelRatio,s=Math.round(i.x1*a),l=Math.round(i.x2*a);Object(n.fillRect)(t,s,0,l-s,e.physicalHeight,r)},t}();i.d(e,"BackgroundPaneView",(function(){return l}))
;var l=function(){function t(t,e,i){this._data=[],this._invalidated=!0,this._provider=t,this._model=e,this._data=[]}return t.prototype.update=function(){this._invalidated=!0},t.prototype.renderer=function(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);for(var t=new a.CompositeRenderer,e=0,i=this._data;e<i.length;e++){var r=i[e];t.append(new s(r))}return t},t.prototype._updateViewInternal=function(){var t=this;this._data=[];var e=this._provider.priceScale(),i=this._model.timeScale();if(e&&!e.isEmpty()&&!i.isEmpty()){var a=this._provider.graphics().backgrounds();if(0!==a.size){var n=this._model.timeScale().visibleBarsStrictRange();if(null!==n){var o=n.firstBar(),s=n.lastBar();a.forEach((function(e,a){var n,l,c=t._provider.properties().graphics.backgrounds[a];c.visible.value()&&e.forEach((function(e){var a=null!==e.start?e.start:Object(r.ensureNotNull)(i.points().firstIndex()),h=e.stop;if(!(h<o||s<a)){var d=i.indexToCoordinate(a)-.5*i.barSpacing(),u=i.indexToCoordinate(h)+.5*i.barSpacing();l===a-1&&(d=n||d),n=u,l=h,d<0&&u<0||d>i.width()&&u>i.width()||t._data.push({x1:d,x2:u,color:c.color.value(),transparency:c.transparency.value()})}}))}))}}}},t}()},K3ps:function(t,e,i){"use strict";i.r(e);var r,a=i("Zy3/"),n=i("PF2b"),o=i("Kmdw"),s=i("akof"),l=i("+q2u"),c=i("fxzW"),h=i("P+Pi"),d=i("IOzl"),u=i("mrSG"),p=i("aO4+"),f=i("jlDR"),v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.c)(e,t),e.prototype._calcBoundingBox=function(t){var e=t.x,i=t.x+t.shapeWidth,r=t.y-t.shapeHeight+t.vertOffset,a=t.y+t.vertOffset,n=new p.Point(e,r),o=new p.Point(i,a);return Object(p.box)(n,o)},e.prototype._drawItemShape=function(t,e,i){var r=e.pixelRatio,a=this._lineWidth(e)%2?.5:0,n=this._getArrowSize(i),o=Math.round(i.x*r)+a,s=Math.round((i.y+i.vertOffset)*r)+a,l=Math.round((i.x+n)*r)+a,c=Math.round((i.y+i.vertOffset-n)*r)+a,h=Math.round((i.y+i.vertOffset-2*n)*r)+a;t.moveTo(l,c),t.lineTo(o,s),t.lineTo(l,h);var d=Math.round((i.y+i.vertOffset-i.shapeHeight)*r)+a,u=Math.round((i.x+i.shapeWidth)*r)+a;this._drawCorner(t,l,d,f.a.leftUp,r),this._drawCorner(t,u,d,f.a.rightUp,r),this._drawCorner(t,u,c,f.a.rightDown,r),t.lineTo(l,c)},e.prototype._getArrowSize=function(t){return t.stepX/Math.sqrt(2)},e.prototype._getHorizontalTextOffset=function(t){return t.shapeWidth/2+this._getArrowSize(t)/2},e.prototype._getVerticalTextOffset=function(t){return-t.shapeHeight/2-this._getArrowSize(t)/2},e}(f.b),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.c)(e,t),e.prototype._calcBoundingBox=function(t){var e=t.x,i=t.x+t.shapeWidth,r=t.y+t.vertOffset,a=t.y+t.shapeHeight+t.vertOffset,n=new p.Point(e,r),o=new p.Point(i,a);return Object(p.box)(n,o)},e.prototype._drawItemShape=function(t,e,i){
var r=e.pixelRatio,a=this._lineWidth(e)%2?.5:0,n=this._getArrowSize(i),o=Math.round(i.x*r)+a,s=Math.round((i.y+i.vertOffset)*r)+a,l=Math.round((i.x+n)*r)+a,c=Math.round((i.y+i.vertOffset+2*n)*r)+a,h=Math.round((i.y+i.vertOffset+n)*r)+a,d=Math.round((i.x+i.shapeWidth)*r)+a,u=Math.round((i.y+i.vertOffset+i.shapeHeight)*r)+a;t.moveTo(l,c),t.lineTo(o,s),t.lineTo(l,h),this._drawCorner(t,d,h,f.a.rightUp,r),this._drawCorner(t,d,u,f.a.rightDown,r),this._drawCorner(t,l,u,f.a.leftDown,r),t.lineTo(l,c)},e.prototype._getArrowSize=function(t){return t.stepX/Math.sqrt(2)},e.prototype._getHorizontalTextOffset=function(t){return t.shapeWidth/2+this._getArrowSize(t)/2},e.prototype._getVerticalTextOffset=function(t){return t.shapeHeight/2+this._getArrowSize(t)/2},e}(f.b),y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.c)(e,t),e.prototype._calcBoundingBox=function(t){var e=t.x-t.shapeWidth,i=t.x,r=t.y-t.shapeHeight+t.vertOffset,a=t.y+t.vertOffset,n=new p.Point(e,r),o=new p.Point(i,a);return Object(p.box)(n,o)},e.prototype._drawItemShape=function(t,e,i){var r=e.pixelRatio,a=this._lineWidth(e)%2?.5:0,n=this._getArrowSize(i),o=Math.round(i.x*r)+a,s=Math.round((i.y+i.vertOffset)*r)+a,l=Math.round((i.x-n)*r)+a,c=Math.round((i.y+i.vertOffset-2*n)*r)+a,h=Math.round((i.y+i.vertOffset-n)*r)+a,d=Math.round((i.x-i.shapeWidth)*r)+a,u=Math.round((i.y+i.vertOffset-i.shapeHeight)*r)+a;t.moveTo(l,c),t.lineTo(o,s),t.lineTo(l,h),this._drawCorner(t,d,h,f.a.leftDown,r),this._drawCorner(t,d,u,f.a.leftUp,r),this._drawCorner(t,l,u,f.a.rightUp,r),t.lineTo(l,c)},e.prototype._getArrowSize=function(t){return t.stepX/Math.sqrt(2)},e.prototype._getVerticalTextOffset=function(t){return-t.shapeHeight/2-this._getArrowSize(t)/2},e.prototype._getHorizontalTextOffset=function(t){return-t.shapeWidth/2-this._getArrowSize(t)/2},e}(f.b),g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(u.c)(e,t),e.prototype._calcBoundingBox=function(t){var e=t.x-t.shapeWidth,i=t.x,r=t.y+t.vertOffset,a=t.y+t.shapeHeight+t.vertOffset,n=new p.Point(e,r),o=new p.Point(i,a);return Object(p.box)(n,o)},e.prototype._drawItemShape=function(t,e,i){var r=e.pixelRatio,a=this._lineWidth(e)%2?.5:0,n=this._getArrowSize(i),o=Math.round(i.x*r)+a,s=Math.round((i.y+i.vertOffset)*r)+a,l=Math.round((i.x-n)*r)+a,c=Math.round((i.y+i.vertOffset+n)*r)+a,h=Math.round((i.y+i.vertOffset+2*n)*r)+a,d=Math.round((i.x-i.shapeWidth)*r)+a,u=Math.round((i.y+i.vertOffset+i.shapeHeight)*r)+a;t.moveTo(l,c),t.lineTo(o,s),t.lineTo(l,h),this._drawCorner(t,l,u,f.a.rightDown,r),this._drawCorner(t,d,u,f.a.leftDown,r),this._drawCorner(t,d,c,f.a.leftUp,r),t.lineTo(l,c)},e.prototype._getArrowSize=function(t){return t.stepX/Math.sqrt(2)},e.prototype._getHorizontalTextOffset=function(t){return-t.shapeWidth/2-this._getArrowSize(t)/2},e.prototype._getVerticalTextOffset=function(t){return t.shapeHeight/2+this._getArrowSize(t)/2},e}(f.b),w=i("6ptY"),x=i("V0al"),b=i("2WC2"),m=i("gBDZ"),T=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}
return Object(u.c)(e,t),e.prototype.setData=function(t,e){this._setBaseData(t,e);for(var i=0,r=this._items;i<r.length;i++){var a=r[i];0===a.vertOffset&&(a.textVertOffset=0)}},e.prototype._drawItemText=function(t,e,i){var r,a=this._getTextCache(i);if(null!==a){var n=i.x,o=i.y+i.textVertOffset,s=(null===(r=i.style)||void 0===r?void 0:r.textColor)||this._textColor,l=i.vertOffset;a.paintTo(t,e,s,n,o,m.a.Center,l>0?m.c.Top:m.c.Bottom)}},e.prototype._calcBoundingBox=function(t){var e=t.vertOffset,i=this._getTextCache(t);if(i){var r=i.textImageWidth,a=i.textImageHeight,n=r/2,o=t.y+t.textVertOffset,s=e>0?0:-a,l=e>0?a:0,c=new p.Point(t.x-n,o+s),h=new p.Point(t.x+n,o+l);return Object(p.box)(c,h)}},e}(b.a),R=i("vaiT"),P=i("23IT"),S=i("tS10"),C=i("Eyy1");i.d(e,"DwgLabelPaneView",(function(){return B}));var O,L=((r={})[R.b.Left]="left",r[R.b.Center]="center",r[R.b.Right]="right",r);!function(t){t.NORMAL_SIZE=50,t.AUTO_SIZE_MULT=1,t.SHAPE_HEIGHT_MULT=.5,t.SHAPE_WIDTH_MULT=.6,t.FONT_SIZE_MULT=.24}(O||(O={}));var B=function(){function t(t,e,i){this._rendererTypeByStyle=new Map([[R.a.Arrowdown,o.PaneRendererArrowDown],[R.a.Arrowup,o.PaneRendererArrowUp],[R.a.Circle,s.PaneRendererCircleShape],[R.a.Cross,l.PaneRendererCrossShape],[R.a.Diamond,c.PaneRendererDiamond],[R.a.Flag,h.PaneRendererFlagShape],[R.a.LabelDown,d.PaneRendererLabelDown],[R.a.LabelUp,d.PaneRendererLabelUp],[R.a.LabelLeft,d.PaneRendererLabelLeft],[R.a.LabelRight,d.PaneRendererLabelRight],[R.a.LabelCenter,d.PaneRendererLabelCenter],[R.a.LabelLeftUp,_],[R.a.LabelLeftDown,v],[R.a.LabelRightUp,g],[R.a.LabelRightDown,y],[R.a.Square,w.PaneRendererSquare],[R.a.Triangleup,n.PaneRendererTriangleApexUp],[R.a.Triangledown,n.PaneRendererTriangleApexDown],[R.a.Xcross,x.PaneRendererXCross],[R.a.None,T]]),this._invalidated=!0,this._graphicsProvider=t,this._model=e,this._renderer=new a.CompositeRenderer,this._textCache=new S.a(5e3)}return t.prototype.update=function(){this._invalidated=!0},t.prototype.renderer=function(){return this._invalidated&&(this._invalidated=!1,this._updateViewInternal(this._model.timeScale().barSpacing())),this._renderer},t.prototype._updateViewInternal=function(t){var e=this;this._renderer.clear();var i=this._graphicsProvider.priceScale(),r=this._model.timeScale();if(i&&!i.isEmpty()&&!r.isEmpty()){var a=this._graphicsProvider.graphics().dwglabels(),n=r.visibleBarsStrictRange(),o=this._graphicsProvider.firstValue();if(0!==a.size&&null!==n&&null!==o){var s=n.firstBar(),l=n.lastBar(),c=Math.round(t*O.AUTO_SIZE_MULT),h=null,d=[];a.forEach((function(t,r){e._graphicsProvider.properties().graphics.dwglabels[r].visible.value()&&t.forEach((function(t){var r=t.x;if(!(r<s||l<r)){var a=e._graphicsProvider.properties().palettes;if(void 0!==a&&void 0!==a.palette_common){var n=a.palette_common,u=null===t.colorIndex?null:n.colors[t.colorIndex],p=null===t.textColorIndex?null:n.colors[t.textColorIndex];if(void 0!==u&&void 0!==p){var f=null===u?void 0:u.color.value(),v=null===p?void 0:p.color.value();if(void 0!==f||void 0!==v){
var _,y=t.size,g=t.style,w=e._calculateLabelHeight(O.NORMAL_SIZE,y,c),x=e._getInvertedYloc(t.yloc,i.isInverted()),b=void 0===v?"":t.text,m=L[t.textAlign],T=t.tooltip,R=e._getLocationData({index:r,price:t.y,yloc:x,size:w,style:g,firstValue:o,hideShape:void 0===f}),P={x:R.x0,y:R.y0,width:R.shapeWidth,height:R.shapeHeight,vertOffset:R.vertOffset,text:b,fontSize:R.fontSize,style:{color:f,borderColor:f,textColor:v},textAlign:m,tooltip:T};R.style!==h?(_={items:[],style:R.style},d.push(_),h=R.style):_=d[d.length-1],_.items.push(P)}}}}}))})),d.forEach((function(i){var r=new(Object(C.ensureDefined)(e._rendererTypeByStyle.get(i.style)))({items:i.items,barSpacing:t},{textCache:e._textCache,skipRenderingOptimizations:!0});e._renderer.append(r)}))}}},t.prototype._getLocationData=function(t){var e=O,i=t.size*e.FONT_SIZE_MULT,r=this._model.timeScale(),a=this._graphicsProvider.priceScale(),n=r.indexToCoordinate(t.index),o=NaN;if(t.yloc===R.c.Price)o=a.priceToCoordinate(t.price,t.firstValue);else{var s=t.yloc===R.c.AboveBar?2:3,l=this._graphicsProvider.series().bars().valueAt(t.index);if(null!==l){var c=l[s];null!=c&&(o=a.priceToCoordinate(c,t.firstValue))}}var h=t.size*e.SHAPE_WIDTH_MULT,d=t.size*e.SHAPE_HEIGHT_MULT;return{x0:n,y0:o,shapeWidth:h,shapeHeight:d,vertOffset:-1.5*d*this._getYLocSign(t.yloc),fontSize:i,style:t.hideShape?R.a.None:t.style}},t.prototype._getYLocSign=function(t){return t===R.c.Price?0:t===R.c.AboveBar?1:-1},t.prototype._getInvertedYloc=function(t,e){if(e){if(t===R.c.AboveBar)return R.c.BelowBar;if(t===R.c.BelowBar)return R.c.AboveBar}return t},t.prototype._calculateLabelHeight=function(t,e,i){var r=i;switch(e){case P.PlotSymbolSize.Tiny:r=.6*t;break;case P.PlotSymbolSize.Small:r=.8*t;break;case P.PlotSymbolSize.Normal:r=t;break;case P.PlotSymbolSize.Large:r=1.5*t;break;case P.PlotSymbolSize.Huge:r=2*t}return r},t}()},Kt0C:function(t,e,i){"use strict";i.r(e),i.d(e,"LinePaneView",(function(){return c}));var r=i("Eyy1"),a=i("aO4+"),n=i("VdBB"),o=i("Zy3/"),s=i("a7Ha"),l=i("pJOz"),c=function(){function t(t,e,i){this._data=[],this._invalidated=!0,this._provider=t,this._model=e,this._hitTestResult=void 0!==i?new n.HitTestResult(n.HitTestResult.CUSTOM,i):new n.HitTestResult(n.HitTestResult.REGULAR)}return t.prototype.update=function(){this._invalidated=!0},t.prototype.renderer=function(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);for(var t=new o.CompositeRenderer,e=0,i=this._data;e<i.length;e++){var r=i[e],a=new l.TrendLineRenderer;a.setData(r),a.setHitTest(this._hitTestResult),t.append(a)}return t},t.prototype._updateViewInternal=function(){var t=this;this._data=[];var e=this._provider.priceScale(),i=this._model.timeScale();if(e&&!e.isEmpty()&&!i.isEmpty()){var n=this._provider.graphics().lines();if(0!==n.size){var o=this._model.timeScale().visibleBarsStrictRange();if(null!==o){var l=this._provider.firstValue();if(null!==l){var c=o.firstBar(),h=o.lastBar();n.forEach((function(n,o){var d=t._provider.properties().graphics.lines[o];d.visible.value()&&n.forEach((function(n){
var o=n.startIndex+(n.startOffset||0),u=n.endIndex+(n.endOffset||0);if(!(Math.max(o,u)<c||Math.min(o,u)>h)){var p=i.indexToCoordinate(o),f=i.indexToCoordinate(u),v=e.priceToCoordinate(Object(r.ensureDefined)(n.startPrice),l),_=e.priceToCoordinate(Object(r.ensureDefined)(n.endPrice),l),y=new a.Point(p,v),g=new a.Point(f,_);t._data.push({points:[y,g],extendleft:!1,extendright:!1,leftend:s.LineEnd.Normal,rightend:s.LineEnd.Normal,color:d.color.value(),linewidth:d.width.value(),linestyle:d.style.value()})}}))}))}}}}},t}()},PztT:function(t,e,i){"use strict";i.r(e);var r=i("mrSG"),a=i("aO4+"),n=i("tSCe"),o=i.n(n),s=i("2tp3"),l=i("GEp6"),c=i("VdBB"),h=i("jFln"),d=i("Zp/P"),u=i("ikwP");function p(t){return t*this.width}var f=function(){function t(t){this._locs=t}return t.prototype.draw=function(t,e){var i=this;t.lineCap="butt",Object(u.drawScaled)(t,e.pixelRatio,(function(){i._locs.forEach((function(e){var r=e.style,a=r.type.dashPattern.map(p,r);t.strokeStyle=r.color,t.lineWidth=r.width,Object(h.setLineDash)(t,a),t.beginPath(),i._drawShape(t,e),t.stroke()}))}))},t.prototype.hitTest=function(t){for(var e=0,i=this._locs;e<i.length;e++){var r=i[e],a=r.style.width/2;if(Object(l.distanceToSegment)(r.extP1,r.extP2,t).distance<=a)return new c.HitTestResult(c.HitTestResult.REGULAR)}return null},t.prototype._drawShape=function(t,e){t.moveTo(e.extP1.x,e.extP1.y),t.lineTo(e.extP2.x,e.extP2.y);var i=e.style.width;e.style.type.drawLeftArrow&&this._drawArrow(t,e.p2,e.p1,i),e.style.type.drawRightArrow&&this._drawArrow(t,e.p1,e.p2,i)},t.prototype._drawArrow=function(t,e,i,r){if(!(i.subtract(e).length()<1))for(var a=0,n=Object(d.getArrowPoints)(e,i,r,!0);a<n.length;a++){var o=n[a];t.moveTo(o[0].x,o[0].y),t.lineTo(o[1].x,o[1].y)}},t}(),v=i("hBTJ");function _(t,e,i){var r=function(t,e,i){var r=e.subtract(t);return i.subtract(t).dotProduct(r)/r.dotProduct(r)}(t.extP1,t.extP2,e),a=t.extP1.add(t.extP2.subtract(t.extP1).scaled(r));r<0&&i.left?t.extP1=a:r>1&&i.right&&(t.extP2=a)}i.d(e,"DwgLinePaneView",(function(){return y}));var y=function(t){function e(e,i,r){var a=t.call(this)||this;return a._invalidated=!0,a._graphicsProvider=e,a._model=i,a._renderer=null,a}return Object(r.c)(e,t),e.prototype.update=function(){this._invalidated=!0},e.prototype.renderer=function(){return this._invalidated&&(this._renderer=null,this._invalidated=!1,this._updateRenderer()),this._renderer},e.prototype._updateRenderer=function(){var t=this,e=this._graphicsProvider.priceScale(),i=this._model.timeScale();if(e&&!e.isEmpty()&&!i.isEmpty()){var r=this._graphicsProvider.graphics().dwglines();if(0!==r.size)if(null!==this._model.timeScale().visibleBarsStrictRange()){var n=this._graphicsProvider.properties().palettes;if(void 0!==n&&void 0!==n.palette_common){var o=n.palette_common,l=this._graphicsProvider.firstValue();if(null!==l){var c=i.width(),h=e.height(),d=[];r.forEach((function(r,n){t._graphicsProvider.properties().graphics.dwglines[n].visible.value()&&r.forEach((function(r){if(null!==r.colorIndex){var n=o.colors[r.colorIndex];if(void 0!==n){
var u=i.indexToCoordinate(r.x1),p=e.priceToCoordinate(r.y1,l),f=i.indexToCoordinate(r.x2),v=e.priceToCoordinate(r.y2,l),_={width:r.width>0?r.width:1,color:n.color.value(),type:Object(s.c)(r.style)},y=t._getLocationData(new a.Point(u,p),new a.Point(f,v),r.extend,c,h,_);null!==y&&d.push(y)}}}))})),this._renderer=new f(d)}}}}},e.prototype._getLocationData=function(t,e,i,r,n,o){var l=function(t){return{left:t===s.a.Both||t===s.a.Left,right:t===s.a.Both||t===s.a.Right}}(i),c={p1:t,p2:e,extP1:t,extP2:e,style:o};l.left&&!l.right&&(c.extP1=e,c.extP2=t,l.left=!1,l.right=!0);var h=[new a.Point(0,0),new a.Point(0,n),new a.Point(r,n),new a.Point(r,0)];!function(t,e,i){for(var r=0,a=e;r<a.length;r++){_(t,a[r],i)}}(c,h,l);var d=function(t,e,i){var r=.5*i,a=e.subtract(t).normalized().transposed().scaled(r),n=t.add(a),o=e.add(a),s=t.subtract(a);return[n,o,e.subtract(a),s]}(c.extP1,c.extP2,o.width);return null===Object(v.intersectPolygons)(h,d)?null:c},e}(o.a)},aS5C:function(t,e,i){"use strict";i.r(e);var r=i("Zy3/"),a=i("Eyy1"),n=i("aO4+"),o=i("zDbI"),s=i("VdBB"),l=i("IjC5"),c=i("qgcf"),h=i("u+0B"),d=i("XlJ7"),u=i("23IT"),p=new Map;function f(t,e,i,r){var s=new c.TextRenderer;e.cells.forEach((function(e){var l=i.position.x+i.columnsOffsets[e.cell.column],c=i.position.y+i.rowsOffsets[e.cell.row],h=function(t,e,i,r,s){var l=t,c="left";"center"===s.cell.horizontalTextAlignment?(c="center",l+=i/2):"right"===s.cell.horizontalTextAlignment&&(c="right",l+=i-1);var h=e,d="top";return"center"===s.cell.verticalTextAlignment?(d="middle",h+=r/2):"bottom"===s.cell.verticalTextAlignment&&(d="bottom",h+=r-1),{points:[new n.Point(l,h)],text:s.cell.text,color:s.style.textColor,vertAlign:d,horzAlign:c,font:o.CHART_FONT_FAMILY,fontSize:Object(a.ensureDefined)(p.get(s.cell.fontSize)),offsetX:0,offsetY:0}}(l/r.pixelRatio,c/r.pixelRatio,i.columnsWidths[e.cell.column]/r.pixelRatio,i.rowsHeights[e.cell.row]/r.pixelRatio,e);t.save();var d=new Path2D;d.rect(l,c,i.columnsWidths[e.cell.column],i.rowsHeights[e.cell.row]),t.clip(d,"evenodd"),s.setData(h),s.draw(t,r),t.restore()}))}p.set(u.PlotSymbolSize.Auto,14),p.set(u.PlotSymbolSize.Tiny,8),p.set(u.PlotSymbolSize.Small,10),p.set(u.PlotSymbolSize.Normal,14),p.set(u.PlotSymbolSize.Large,20),p.set(u.PlotSymbolSize.Huge,36);var v=function(){function t(t){this._data=null,this._widthsCaches=new Map,this._precalculated=null,this._hittestRendererData=null,this.setData(t),this._measureCanvas=document.createElement("canvas"),this._measureCtx=Object(a.ensureNotNull)(this._measureCanvas.getContext("2d")),this._hittestRenderer=new l.RectangleRenderer(new s.HitTestResult(s.HitTestResult.REGULAR),new s.HitTestResult(s.HitTestResult.REGULAR))}return t.prototype.setData=function(t){this._data=t,this._precalculated=null},t.prototype.draw=function(t,e){var i;if(null!==this._data){var r=null!==(i=this._precalculated)&&void 0!==i?i:this._precalculate(e),o=Object(a.ensureNotNull)(this._data);!function(t,e,i){t.fillStyle=e.style.backgroundColor,t.fillRect(i.position.x,i.position.y,i.totalWidth,i.totalHeight)}(t,o,r),function(t,e,i){
e.cells.forEach((function(e){var r=i.position.x+i.columnsOffsets[e.cell.column],a=i.position.y+i.rowsOffsets[e.cell.row],n=i.columnsWidths[e.cell.column],o=i.rowsHeights[e.cell.row];t.fillStyle=e.style.backgroundColor,t.fillRect(r,a,n,o)}))}(t,o,r),f(t,o,r,e),function(t,e,i,r){if(e.table.borderWidth>0){var a=Math.max(1,Math.round(e.table.borderWidth*r.pixelRatio));t.fillStyle=e.style.borderColor;for(var n=0;n<e.table.columns-1;n++){var o=i.columnsWidths[n];if(0!==o){var s=i.position.x+i.columnsOffsets[n]+o;t.fillRect(s,i.position.y,a,i.totalHeight)}}for(var l=0;l<e.table.rows-1;l++){var c=i.rowsHeights[l];if(0!==c){var h=i.position.y+i.rowsOffsets[l]+c;t.fillRect(i.position.x,h,i.totalWidth,a)}}}}(t,o,r,e),function(t,e,i,r){if(e.table.frameWidth>0){var a=Math.max(1,Math.round(e.table.frameWidth*r.pixelRatio));t.fillStyle=e.style.frameColor,t.fillRect(i.position.x-a,i.position.y-a,i.totalWidth+2*a,a),t.fillRect(i.position.x-a,i.position.y+i.totalHeight,i.totalWidth+2*a,a),t.fillRect(i.position.x-a,i.position.y-a+a,a,i.totalHeight),t.fillRect(i.position.x+i.totalWidth,i.position.y,a,i.totalHeight)}}(t,o,r,e);var s=r.position.x/e.pixelRatio,l=r.position.y/e.pixelRatio,c=r.totalWidth/e.pixelRatio,h=r.totalHeight/e.pixelRatio;this._hittestRendererData={backcolor:o.style.backgroundColor,color:o.style.borderColor,fillBackground:!0,linewidth:o.table.borderWidth,extendLeft:!1,extendRight:!1,points:[new n.Point(s,l),new n.Point(s+c,l+h)]},this._hittestRenderer.setData(this._hittestRendererData)}},t.prototype.hitTest=function(t,e){return this._hittestRenderer.hitTest(t,e)},t.prototype._precalculate=function(t){var e=this,i=Object(a.ensureNotNull)(this._data),r=Array.from({length:i.table.columns},(function(){return 0})),o=Array.from({length:i.table.rows},(function(){return 0})),s=[],l=[];i.cells.forEach((function(a){var n=Math.ceil(e._cellWidth(t,a,i)*t.pixelRatio),s=Math.ceil(e._cellHeight(t,a,i)*t.pixelRatio);r[a.cell.column]=Math.max(r[a.cell.column],n),o[a.cell.row]=Math.max(o[a.cell.row],s)}));for(var c=r.filter((function(t){return t>0})).length,h=o.filter((function(t){return t>0})).length,d=0===i.table.borderWidth?0:Math.max(1,Math.round(i.table.borderWidth*t.pixelRatio)),u=r.reduce((function(t,e){return t+e}),0)+d*(c-1),p=o.reduce((function(t,e){return t+e}),0)+d*(h-1),f=0,v=0;v<i.table.columns;v++){var _=r[v];s.push(f),f+=_?_+d:0}for(var y=0,g=0;g<i.table.rows;g++){var w=o[g];l.push(y),y+=w?w+d:0}var x=function(t,e,i,r){var a=Math.round(10*e.pixelRatio),o=0;t.table.position.startsWith("top_")?o=a:t.table.position.startsWith("middle_")?o=Math.round((e.physicalHeight-r)/2):t.table.position.startsWith("bottom_")&&(o=e.physicalHeight-a-r);var s=0;return t.table.position.endsWith("left")?s=a:t.table.position.endsWith("center")?s=Math.round((e.physicalWidth-i)/2):t.table.position.endsWith("right")&&(s=e.physicalWidth-i-a),new n.Point(s,o)}(i,t,u,p);return this._precalculated={columnsWidths:r,rowsHeights:o,rowsOffsets:l,columnsOffsets:s,position:x,totalWidth:u,totalHeight:p},this._precalculated},
t.prototype._cellWidth=function(t,e,i){var r,n=this;if(""===e.cell.text&&0===e.cell.widthInPercentsOfPaneWidth)return 0;if(e.cell.widthInPercentsOfPaneWidth)return(t.cssWidth-20)*e.cell.widthInPercentsOfPaneWidth/100;var s=e.cell.text.split("\n"),l=Object(a.ensureDefined)(p.get(e.cell.fontSize)),c=null!==(r=this._widthsCaches.get(l))&&void 0!==r?r:new h.a;this._widthsCaches.set(l,c),this._measureCtx.font=Object(d.makeFont)(l,o.CHART_FONT_FAMILY);var u=s.map((function(t){return c.measureText(n._measureCtx,t)}));return Math.max.apply(Math,u)+2*i.table.borderWidth+2*l/3},t.prototype._cellHeight=function(t,e,i){if(""===e.cell.text&&0===e.cell.heightInPercentOfPaneHeight)return 0;if(e.cell.heightInPercentOfPaneHeight)return(t.cssHeight-20)*e.cell.heightInPercentOfPaneHeight/100;var r=e.cell.text.split("\n").length,n=Object(a.ensureDefined)(p.get(e.cell.fontSize));return n*r+n*(2/3)+2*i.table.borderWidth},t}();i.d(e,"DwgTablePaneView",(function(){return _}));var _=function(){function t(t,e,i){this._invalidated=!0,this._data=[],this._renderers=[],this._source=t}return t.prototype.renderer=function(){var t=this;this._invalidated&&(this._invalidated=!1,this._updateViewInternal());var e=new r.CompositeRenderer;return this._data.forEach((function(i,r){t._renderers.length<=r?t._renderers.push(new v(i)):t._renderers[r].setData(i),e.append(t._renderers[r])})),this._renderers.splice(this._data.length),e},t.prototype.update=function(){this._invalidated=!0},t.prototype._updateViewInternal=function(){var t=this;this._data=[];var e=this._source.properties().palettes;if(void 0!==e&&void 0!==e.palette_common){var i=e.palette_common,r=this._source.graphics().dwgtables(),a=this._source.graphics().dwgtablecells(),n=new Map;a.forEach((function(t,e){t.forEach((function(t){var e=n.get(t.tableId)||[],r=i.colors[t.backgroundColorIndex],a=i.colors[t.textColorIndex];if(a){var o=r?r.color.value():"transparent",s=a.color.value();e.push({cell:t,style:{backgroundColor:o,textColor:s}}),n.set(t.tableId,e)}}))})),r.forEach((function(e,r){t._source.properties().graphics.dwgtables[r].visible.value()&&e.forEach((function(e){var r=i.colors[e.backgroundColorIndex],a=i.colors[e.borderColorIndex],o=i.colors[e.frameColorIndex],s=r?r.color.value():"transparent",l=a?a.color.value():"transparent",c=o?o.color.value():"transparent";t._data.push({table:e,style:{backgroundColor:s,borderColor:l,frameColor:c},cells:n.get(e.id)||[]})}))}))}},t}()},psYU:function(t,e,i){"use strict";i.r(e),i.d(e,"VertLinePaneView",(function(){return l}));var r=i("Eyy1"),a=i("VdBB"),n=i("972a"),o=i("Zy3/"),s=i("z+cS"),l=function(){function t(t,e,i){this._data=[],this._invalidated=!0,this._provider=t,this._model=e,this._hitTestResult=void 0!==i?new a.HitTestResult(a.HitTestResult.CUSTOM,i):new a.HitTestResult(a.HitTestResult.REGULAR)}return t.prototype.update=function(){this._invalidated=!0},t.prototype.renderer=function(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);for(var t=new o.CompositeRenderer,e=0,i=this._data;e<i.length;e++){
var r=i[e],a=new s.VerticalLineRenderer;a.setData(r),a.setHitTest(this._hitTestResult),t.append(a)}return t},t.prototype._updateViewInternal=function(){var t=this;this._data=[];var e=this._provider.priceScale(),i=this._model.timeScale();if(e&&!e.isEmpty()&&!i.isEmpty()){var a=this._provider.graphicsInfo().vertlines,o=this._provider.graphics().vertlines();if(0!==o.size&&void 0!==a){var s=this._model.timeScale().visibleBarsStrictRange();if(null!==s){var l=this._provider.firstValue();if(null!==l){var c=s.firstBar(),h=s.lastBar();o.forEach((function(o,s){var d=t._provider.properties().graphics.vertlines[s];if(d.visible.value()){var u=0;switch(Object(r.ensureDefined)(a[s]).halign){case n.HAlign.Left:u=-i.barSpacing()/2;break;case n.HAlign.Right:u=i.barSpacing()/2}o.forEach((function(a){var n=a.index;n<c||h<n||t._data.push({x:i.indexToCoordinate(n)+u,top:a.extendTop?void 0:e.priceToCoordinate(Object(r.ensureDefined)(a.endPrice),l),bottom:a.extendBottom?void 0:e.priceToCoordinate(Object(r.ensureDefined)(a.startPrice),l),color:d.color.value(),linewidth:d.width.value(),linestyle:d.style.value()})}))}}))}}}}},t}()},qVqd:function(t,e,i){"use strict";i.r(e);var r=i("mrSG"),a=i("Eyy1"),n=i("aO4+"),o=i("972a"),s=i("Zy3/"),l=i("f6yo"),c=i("VdBB"),h=i("ikwP"),d=function(){function t(t){this._data=t}return t.prototype.draw=function(t,e){var i=this,r="down"===this._data.direction?1:"up"===this._data.direction?-1:0,a=this._data.point.x,n=this._data.point.y;Object(h.drawScaled)(t,e.pixelRatio,(function(){t.fillStyle=i._data.color,t.beginPath(),t.arc(a+1,n+2*i._data.size*r,i._data.size,0,2*Math.PI),t.closePath(),t.fill(),t.stroke()}))},t.prototype.hitTest=function(t){var e="down"===this._data.direction?1:"up"===this._data.direction?-1:0,i=new n.Point(this._data.point.x+.5,this._data.point.y+.5+2*this._data.size*e);return Object(l.pointInCircle)(t,i,this._data.size)?new c.HitTestResult(c.HitTestResult.REGULAR):null},t}(),u=function(){function t(t){this._data=t}return t.prototype.draw=function(t,e){var i="down"===this._data.direction?1:"up"===this._data.direction?-1:0,r=this._data.size,a=new n.Point(this._data.point.x-r/2,this._data.point.y-r/2+i*r),o=new n.Point(this._data.point.x+r/2,this._data.point.y+r/2+i*r).subtract(a),s=e.pixelRatio,l=Math.max(1,Math.floor(s)),c=l/2,h=l%2?.5:0,d=Math.round(a.x*s)+h,u=Math.round((a.x+o.x)*s)+h,p=Math.round(a.y*s)+h,f=Math.round((a.y+o.y)*s)+h;t.beginPath(),t.fillStyle=this._data.color,t.rect(d+c,p+c,u-d-l,f-p-l),t.fill(),t.lineWidth=l,t.beginPath(),t.rect(d,p,u-d,f-p),t.stroke()},t.prototype.hitTest=function(t){var e="down"===this._data.direction?1:"up"===this._data.direction?-1:0,i=this._data.size,r=new n.Point(this._data.point.x-i/2,this._data.point.y-i/2+e*i),a=new n.Point(this._data.point.x+i/2,this._data.point.y+i/2+e*i);return Object(l.pointInBox)(t,Object(n.box)(r,a))?new c.HitTestResult(c.HitTestResult.REGULAR):null},t}(),p=function(){function t(t,e){this._data=t,this._arrowDirection=e}return t.prototype.draw=function(t,e){
var i=this._arrowDirection,r=this._data.size,a=this._data.color,n=this._data.point.x+1,o=this._data.point.y,s=1.1*r;switch(i){case"up":o-=s;break;case"down":o+=s}var l=r/6,c=r/4,d=r/3,u=r/2,p=.6666666*r;Object(h.drawScaled)(t,e.pixelRatio,(function(){switch(t.fillStyle=a,t.beginPath(),i){case"up":t.moveTo(n,o),t.lineTo(n-u,o+p),t.lineTo(n-c,o+p),t.lineTo(n,o+d),t.lineTo(n+c,o+p),t.lineTo(n+u,o+p),t.lineTo(n,o);break;case"down":t.moveTo(n,o+r),t.lineTo(n-u,o+d),t.lineTo(n-c,o+d),t.lineTo(n,o+p),t.lineTo(n+c,o+d),t.lineTo(n+u,o+d),t.lineTo(n,o+r);break;case"right":t.moveTo(n+l,o),t.lineTo(n-l,o-c),t.lineTo(n-l,o+c),t.lineTo(n+l,o);break;case"left":t.moveTo(n-l,o),t.lineTo(n+l,o-c),t.lineTo(n+l,o+c),t.lineTo(n-l,o)}t.closePath(),t.fill(),t.stroke()}))},t.prototype.hitTest=function(t){var e=this._hitTriangle(),i=e[0],r=e[1],a=e[2];return Object(l.pointInTriangle)(t,i,r,a)?new c.HitTestResult(c.HitTestResult.REGULAR):null},t.prototype._hitTriangle=function(){var t=this._data.point.x,e=this._data.point.y,i=this._arrowDirection,r=this._data.size,a=1.1*r;switch(i){case"up":e-=a;break;case"down":e+=a}var o=r/6,s=r/4,l=r/3,c=r/2,h=.6666666*r;switch(i){case"up":return[new n.Point(t,e),new n.Point(t+c,e+h),new n.Point(t-c,e+h)];case"down":return[new n.Point(t,e+r),new n.Point(t+c,e+l),new n.Point(t-c,e+l)];case"right":return[new n.Point(t+o,e),new n.Point(t-o,e-s),new n.Point(t-o,e+s)];case"left":return[new n.Point(t-o,e),new n.Point(t+o,e-s),new n.Point(t+o,e+s)]}},t}(),f=i("tSCe"),v=i.n(f),_=i("Tmoa"),y=i("txPx");i.d(e,"ShapeMarkPaneView",(function(){return w}));var g=Object(y.getLogger)("Chart.ShapeMarkPaneView"),w=function(t){function e(e,i,r){var a=t.call(this)||this;return a._data=[],a._invalidated=!0,a._provider=e,a._model=i,a._data=[],a}return Object(r.c)(e,t),e.prototype.update=function(){this._invalidated=!0},e.prototype.renderer=function(){this._invalidated&&(this._updateViewInternal(),this._invalidated=!1);for(var t=new s.CompositeRenderer,e=0,i=this._data;e<i.length;e++){var r=i[e];switch(r.shape){case"circle":t.append(new d(r));break;case"square":t.append(new u(r));break;case"arrowUp":t.append(new p(r,"up"));break;case"arrowDown":t.append(new p(r,"down"));break;case"arrowRight":t.append(new p(r,"right"));break;case"arrowLeft":t.append(new p(r,"left"))}}return t},e.prototype._updateViewInternal=function(){var t=this;this._data=[];var e=this._provider.priceScale(),i=this._model.timeScale();if(e&&!e.isEmpty()&&!i.isEmpty()){var r=this._provider.graphics().shapemarks();if(0!==r.size){var a=this._model.timeScale().visibleBarsStrictRange();if(null!==a){var o=this._provider.firstValue();if(null!==o){var s=a.firstBar(),l=a.lastBar();r.forEach((function(r,a){var c=t._provider.properties().graphics.shapemarks[a];c.visible.value()&&r.forEach((function(r){var a=r.time;if(!(a<s||l<a)&&null!==t._provider.series().bars().valueAt(a)){
var h="left"===c.halign.value()?-(i.barSpacing()/2+1):"right"===c.halign.value()?i.barSpacing()/2+1:0,d=c.location.value(),u=c.shape.value(),p=parseInt(c.size.value()),f=Object(_.generateColor)(c.color.value(),c.transparency.value()),v=t._calcCoordsForShape(d,a,p,r.price,o,e,i),y=v.x,g=v.y,w=v.direction;switch(u){case"circle":case"square":t._data.push({shape:u,color:f,direction:w,point:new n.Point(y+h,g),size:p});break;case"arrowUp":case"arrowDown":case"arrowRight":case"arrowLeft":t._data.push({shape:u,color:f,point:new n.Point(y+h,g),size:p})}}}))}))}}}}},e.prototype._calcCoordsForShape=function(t,e,i,r,n,s,l){var c=Math.round(l.indexToCoordinate(e));switch(t){case o.MarkLocation.Absolute:return{x:c,y:s.priceToCoordinate(Object(a.ensureDefined)(r),n),direction:""};case o.MarkLocation.AbsoluteDown:return{x:c,y:s.priceToCoordinate(Object(a.ensureDefined)(r),n),direction:"down"};case o.MarkLocation.AbsoluteUp:return{x:c,y:s.priceToCoordinate(Object(a.ensureDefined)(r),n),direction:"up"};case o.MarkLocation.AboveBar:return{x:c,y:this._locationToY(t,e,Math.floor(2*i/l.barSpacing())+1),direction:"up"};case o.MarkLocation.BelowBar:return{x:c,y:this._locationToY(t,e,Math.floor(2*i/l.barSpacing())+1),direction:"down"};default:return g.logWarn("Bad location value: "+t),{x:c,y:this._locationToY(o.MarkLocation.AbsoluteUp,e),direction:"up"}}},e}(v.a)},rvCT:function(t,e,i){"use strict";i.r(e),i.d(e,"LinearRegressionPaneView",(function(){return f}));var r=i("mrSG"),a=i("Eyy1"),n=i("aO4+"),o=i("VdBB"),s=i("Tmoa"),l=i("Zy3/"),c=i("NN6M"),h=i("pJOz"),d=i("qgcf"),u=i("a7Ha"),p=i("zDbI"),f=function(){function t(t,e){this._invalidated=!0,this._lines=[],this._pearsonsTextRenderer=new d.TextRenderer,this._pearsons=null,this._model=t,this._source=e}return t.prototype.update=function(){this._invalidated=!0},t.prototype.renderer=function(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);for(var t=new l.CompositeRenderer,e=[this._lines[1],this._lines[0],this._lines[2]],i=[],a=0,n=e;a<n.length;a++){var d=n[a];d&&i.push(d)}for(var u=1;u<i.length;u++){var p={points:[e[u].floatPoints[0],e[u].floatPoints[1],e[u-1].floatPoints[0],e[u-1].floatPoints[1]],color:e[u].color,linewidth:e[u].linewidth,linestyle:e[u].linestyle,extendleft:!1,extendright:e[u].extendright,backcolor:e[u].color,transparency:this._source.properties().styles.transparency.value(),skipLines:!0,fillBackground:!0,showMidline:!1};(_=new c.ParallelChannelRenderer(new o.HitTestResult(o.HitTestResult.REGULAR),new o.HitTestResult(o.HitTestResult.REGULAR))).setData(p),t.append(_)}for(var f=0,v=function(t){return t.map((function(t){var e=Object(r.a)({},t);return e.color=Object(s.resetTransparency)(e.color),e}))}(this._lines);f<v.length;f++){var _,y=v[f];(_=new h.TrendLineRenderer).setData(y),_.setHitTest(new o.HitTestResult(o.HitTestResult.REGULAR)),t.append(_)}return this._pearsons&&(this._pearsons.color=Object(s.resetTransparency)(this._pearsons.color),this._pearsonsTextRenderer.setData(this._pearsons),t.append(this._pearsonsTextRenderer)),t},
t.prototype._updateImpl=function(){if(this._lines=[],this._pearsons=null,this._source.properties().visible.value()){var t=this._model.timeScale(),e=this._source.priceScale(),i=this._model.mainSeries().firstBar();if(e&&!e.isEmpty()&&!t.isEmpty()&&i){var r=this._source.startIndex(),o=this._source.endIndex();if(null!==r&&null!==o){for(var s=[this._source.baseLine(),this._source.downLine(),this._source.upLine()],l=Math.round(t.indexToCoordinate(r)),c=Math.round(t.indexToCoordinate(o)),h=this._source.properties(),d=[h.styles.baseLine,h.styles.downLine,h.styles.upLine],f=i[TradingView.CLOSE_PLOT],v=0;v<s.length;v++)if(d[v].visible.value()){var _=Object(a.ensureNotNull)(s[v]).startPrice,y=Object(a.ensureNotNull)(s[v]).endPrice;if(void 0!==_&&void 0!==y){var g=e.priceToCoordinate(_,f),w=e.priceToCoordinate(y,f),x=new n.Point(l,g),b=new n.Point(c,w),m=d[v].color.value(),T=d[v].linewidth.value(),R=d[v].linestyle.value(),P={floatPoints:[x,b],width:this._model.timeScale().width(),height:Object(a.ensureNotNull)(this._source.priceScale()).height(),color:m,linewidth:T,linestyle:R,extendleft:!1,extendright:h.styles.extendLines.value(),leftend:u.LineEnd.Normal,rightend:u.LineEnd.Normal};this._lines.push(P)}}var S=Object(a.ensureNotNull)(this._source.downLine());if(h.styles.showPearsons.value()&&void 0!==S.startPrice){var C=e.priceToCoordinate(S.startPrice,f),O=new n.Point(l,C);this._pearsons={points:[O],text:""+this._source.pearsons(),color:h.styles.downLine.color.value(),vertAlign:"top",horzAlign:"center",font:p.CHART_FONT_FAMILY,offsetX:0,offsetY:4,fontsize:12}}}}}},t}()},tSCe:function(t,e,i){"use strict";var r=i("Hr11"),a=r.min,n=r.max,o=i("972a").MarkLocation;function s(){}s.prototype._locationToY=function(t,e,i){i||(i=0);var r,s=[],l=this._provider.priceScale();switch(t){case o.AboveBar:r=TradingView.HIGH_PLOT;break;case o.BelowBar:r=TradingView.LOW_PLOT}var c=this._provider.firstValue();i>=1&&(i-=1);for(var h=-i;h<=i;h++){var d=this._provider.series().bars().valueAt(e+h);if(null!==d){var u=d[r];s.push(l.priceToCoordinate(u,c))}}switch(t){case o.AboveBar:return a(s)-15;case o.BelowBar:return n(s)+15}},t.exports=s}}]);