"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7203],{9431:(e,i,r)=>{r.r(i),r.d(i,{LineToolCrossLine:()=>l});var t=r(78176),s=r(94512),n=r(84998),o=r(41414);class l extends o.LineDataSource{constructor(e,i,t,o){super(e,i??l.createProperties(e.backgroundTheme().spawnOwnership()),t,o),this._priceAxisView=new s.LineToolHorzLinePriceAxisView(this),this._timeAxisView=new n.LineToolVertLineTimeAxisView(this),Promise.all([r.e(6290),r.e(986),r.e(6668),r.e(1583)]).then(r.bind(r,79727)).then((({CrossLinePaneView:e})=>{this._setPaneViews([new e(this,this._model)])}))}pointsCount(){return 1}name(){return"Cross Line"}priceAxisViews(e,i){return this.isSourceHidden()?null:i===this.priceScale()&&this.properties().childs().showPrice.value()&&this._model.paneForSource(this)===e?[this._priceAxisView]:null}timeAxisViews(){return this.isSourceHidden()?null:this.properties().childs().showTime.value()?[this._timeAxisView]:null}updateAllViews(e){super.updateAllViews(e),this._priceAxisView.update(e),this._timeAxisView.update()}canHasAlert(){return!1}lineColor(){return this.properties().childs().linecolor.value()}lineWidth(){return this.properties().childs().linewidth.value()}lineStyle(){return this.properties().childs().linestyle.value()}static createProperties(e,i){const r=new t.DefaultProperty({defaultName:"linetoolcrossline",state:i,theme:e});return this._configureProperties(r),r}_normalizePoint(e,i){return super._normalizePointWithoutOffset(e)??super._normalizePoint(e,i)}_getPropertyDefinitionsViewModelClass(){return Promise.all([r.e(3198),r.e(5410),r.e(2745),r.e(8823),r.e(8537)]).then(r.bind(r,87979)).then((e=>e.CrossLineDefinitionsViewModel))}}},94512:(e,i,r)=>{r.d(i,{LineToolHorzLinePriceAxisView:()=>n});var t=r(36281),s=r(52859);class n extends t.PriceAxisView{constructor(e){super(),this._source=e}_updateRendererData(e,i,r){e.visible=!1;const t=this._source.points(),n=this._source.priceScale();if(0===t.length||null===n||n.isEmpty())return;const o=t[0];if(!isFinite(o.price))return;const l=this._source.ownerSource(),u=null!==l?l.firstValue():null;if(null===u)return;const c=(0,s.resetTransparency)(this._source.properties().linecolor.value());r.background=c,r.textColor=this.generateTextColor(c),r.coordinate=n.priceToCoordinate(o.price,u),e.text=n.formatPrice(o.price,u),e.visible=!0}}},84998:(e,i,r)=>{r.d(i,{LineToolVertLineTimeAxisView:()=>s});var t=r(79740);class s extends t.LineDataSourceTimeAxisView{constructor(e){super(e,0)}_getBgColor(){return this._source.properties().linecolor.value()}_getAlwaysInViewPort(){return!1}_getIndex(){const e=this._source.points();return 0===e.length?null:e[0].index}}}}]);