"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[3314],{67725:(e,t,i)=>{i.d(t,{createLineStyleDefinition:()=>y});var r=i(11542),n=i(95804),s=i(95338),o=i(91682);const l=new n.TranslatedString("change {toolName} line visibility",r.t(null,void 0,i(24550))),a=new n.TranslatedString("change {toolName} line width",r.t(null,void 0,i(19541))),d=new n.TranslatedString("change {toolName} line style",r.t(null,void 0,i(66429))),c=new n.TranslatedString("change {toolName} line color",r.t(null,void 0,i(24059))),h=new n.TranslatedString("change {toolName} line extending left",r.t(null,void 0,i(18773))),u=new n.TranslatedString("change {toolName} line left end",r.t(null,void 0,i(21474))),p=new n.TranslatedString("change {toolName} line extending right",r.t(null,void 0,i(43823))),_=new n.TranslatedString("change {toolName} line right end",r.t(null,void 0,i(54827))),f=r.t(null,void 0,i(3554)),g=r.t(null,void 0,i(61856)),v=r.t(null,void 0,i(87430));function y(e,t,i,r,n){const y={},P={id:`${(0,o.removeSpaces)(i.originalText())}${r}`,title:n&&n.line||f};return void 0!==t.showLine&&(y.checked=(0,s.convertToDefinitionProperty)(e,t.showLine,l.format({toolName:i}))),void 0!==t.lineWidth&&(y.width=(0,s.convertToDefinitionProperty)(e,t.lineWidth,a.format({toolName:i}))),void 0!==t.lineStyle&&(y.style=(0,s.convertToDefinitionProperty)(e,t.lineStyle,d.format({toolName:i}))),void 0!==t.lineColor&&(y.color=(0,s.getColorDefinitionProperty)(e,t.lineColor,null,c.format({toolName:i}))),void 0!==t.extendLeft&&(y.extendLeft=(0,s.convertToDefinitionProperty)(e,t.extendLeft,h.format({toolName:i})),P.extendLeftTitle=n&&n.extendLeftTitle||g),void 0!==t.leftEnd&&(y.leftEnd=(0,s.convertToDefinitionProperty)(e,t.leftEnd,u.format({toolName:i}))),void 0!==t.extendRight&&(y.extendRight=(0,s.convertToDefinitionProperty)(e,t.extendRight,p.format({toolName:i})),P.extendRightTitle=n&&n.extendRightTitle||v),void 0!==t.rightEnd&&(y.rightEnd=(0,s.convertToDefinitionProperty)(e,t.rightEnd,_.format({toolName:i}))),(0,s.createLinePropertyDefinition)(y,P)}},14472:(e,t,i)=>{i.r(t),i.d(t,{LineDataSourceDefinitionsViewModel:()=>b,LineDataSourceTabTypes:()=>r,pointPriceBarTitle:()=>P});var r,n=i(50151),s=i(11542),o=i(95804),l=(i(40167),i(95338)),a=i(60567),d=i(22613),c=i(73863),h=i(97578),u=i(81634),p=i(36313);!function(e){e.Visibility="visibility",e.Coordinates="coordinates",e.Style="style",e.Text="text",e.Inputs="inputs"}(r||(r={}));const _=s.t(null,void 0,i(40091)),f=s.t(null,void 0,i(78930)),g=s.t(null,void 0,i(92516)),v=s.t(null,void 0,i(70320)),y=s.t(null,void 0,i(21429)),P=s.t(null,{context:"linetool point"},i(80166));class b{constructor(e,t){this._yCoordinateStepWV=null,this._propertyPages=[],this._source=t,this._undoModel=e,this._ownerSource=(0,n.ensureNotNull)(this._source.ownerSource()),this._propertyApplier=new u.PropertyApplierWithoutSavingChart((()=>e)),this._createPropertyRages()}destroy(){null!==this._yCoordinateStepWV&&(this._source.ownerSourceChanged().unsubscribeAll(this), this._ownerSource.priceStepChanged().unsubscribeAll(this)),this._source.pointAdded().unsubscribeAll(this),this._propertyPages.forEach((e=>{(0,l.destroyDefinitions)(e.definitions.value())}))}propertyPages(){return Promise.resolve(this._propertyPages)}_createPropertyRages(){this._propertyPages=[];const e=this._createInputsPropertyPage();null!==e&&this._propertyPages.push(e);const t=this._createStylePropertyPage();null!==t&&this._propertyPages.push(t);const i=this._createTextPropertyPage();null!==i&&this._propertyPages.push(i);const r=this._createCoordinatesPropertyPage();null!==r&&(r.visible=this._source.hasEditableCoordinates(),this._propertyPages.push(r));const n=this._createVisibilitiesPropertyPage();this._propertyPages.push(n)}_createVisibilitiesPropertyPage(){const e=this._source.properties().childs().intervalsVisibilities.childs();return(0,a.createPropertyPage)((0,c.getIntervalsVisibilitiesPropertiesDefinitions)(this._propertyApplier,e,new o.TranslatedString(this._source.name(),this._source.title(p.TitleDisplayTarget.StatusLine,!0))),"visibility",_)}_createCoordinatesPropertyPage(){const e=this._coordinatesPropertyDefinitions();return null!==e?(e.definitions.lengththis._updateYCoordinateStep())),this._source.ownerSourceChanged().subscribe(this,(()=>{this._ownerSource.priceStepChanged().unsubscribeAll(this),this._ownerSource=(0,n.ensureNotNull)(this._source.ownerSource()),this._ownerSource.priceStepChanged().subscribe(this,(()=>this._updateYCoordinateStep()))}))),this._yCoordinateStepWV}_coordinatesPropertyDefinitions(){const e=this._source.points(),t=this._source.pointsProperty().childs().points,i=[],r=this._getYCoordinateStepWV();return e.forEach(((e,n)=>{const s=t[n].childs();s&&i.push((0,h.getCoordinatesPropertiesDefinitions)(this._propertyApplier,s,e,r,P.format({count:(n+1).toString()}),this._source.name()))})),{definitions:i}}_createStylePropertyPage(){const e=this._stylePropertyDefinitions();return null!==e?(0,a.createPropertyPage)(e,"style",g):null}_stylePropertyDefinitions(){return null}_createTextPropertyPage(){const e=this._textPropertyDefinitions();return null!==e?(0,a.createPropertyPage)(e,"text",v):null}_textPropertyDefinitions(){return null}_createInputsPropertyPage(){const e=this._inputsPropertyDefinitions();return null!==e?(0,a.createPropertyPage)(e,"inputs",y):null}_inputsPropertyDefinitions(){return null}_updateYCoordinateStep(){const e=this._ownerSource.priceStep();this._getYCoordinateStepWV().setValue(e||1)}_updateCoordinatesPropertyDefinitons(){const e=this._coordinatesPropertyDefinitions();if(null!==e){(0, n.ensureDefined)(this._propertyPages.find((e=>"coordinates"===e.id))).definitions.setValue(e.definitions),this._source.points().length===this._source.pointsCount()&&this._source.pointAdded().unsubscribeAll(this)}}}},40226:(e,t,i)=>{i.d(t,{LevelsProperty:()=>f});var r=i(90054),n=i(16738),s=i(87465),o=i(78176),l=i(60973);const a={prefixes:[""],range:[0,0],names:["coeff","color","visible","linestyle","linewidth"],typecheck:{pack:()=>Object(),unpack:()=>[]}};function d(e,t,i,r){return r.push(i[t]),r}function c(e,t,i,r){return r[t]=i[e],r}function h(){return[]}function u(){return{}}function p(e,t,i){return i.prefixes.forEach((r=>{const n=r+"level";for(let r=i.range[0];r<=i.range[1];r++)if(e[n+r]&&(0,s.isSameType)(e[n+r],t.typecheck())){let s=t.tpl();i.names.forEach(((i,o)=>{s=t.fill(""+o,i,e[n+r],s)})),e[n+r]=s}})),e}function _(e,t,i){return i(e,{tpl:u,fill:c,typecheck:t.typecheck.unpack},t)}class f extends o.DefaultProperty{constructor(e){const{levelsIterator:t=p,map:i={},...r}=e,n={...a,...i};r.state&&(r.state=_(r.state,n,t)),super(r),this._map=n,this._levelsIterator=t}state(e,t,i){const r=super.state(e,t);return i?r:(n=r,s=this._map,(0,this._levelsIterator)(n,{tpl:h,fill:d,typecheck:s.typecheck.pack},s));var n,s}preferences(){return(0,o.extractState)(this.state(this._excludedDefaultsKeys,void 0,!0),this._allDefaultsKeys)}applyTemplate(e,t){this.mergeAndFire((0,o.extractState)((0,n.default)((0,r.default)(t),_(e,this._map,this._levelsIterator)),this._allStateKeys,this._excludedTemplateKeys))}saveDefaults(){this._useUserPreferences&&(0,l.saveDefaults)(this._defaultName,this.preferences())}clone(){return new f(this._options())}merge(e,t){return super.merge(this._map?_(e,this._map,this._levelsIterator):e,t)}_options(){return{...super._options(),map:{...this._map},levelsIterator:this._levelsIterator}}}},44005:(e,t,i)=>{i.d(t,{CollectibleColorPropertyDirectWrapper:()=>l,CollectibleColorPropertyUndoWrapper:()=>o});var r=i(50151),n=i(43337);class s extends n.Property{constructor(e){super(),this._listenersMappers=[],this._isProcess=!1,this._baseProperty=e}destroy(){this._baseProperty.destroy(),super.destroy()}value(){const e=this._baseProperty.value();return"mixed"===e?"":e}visible(){return this._baseProperty.visible()}setValue(e){this._isProcess=!0,this._baseProperty.setValue(""===e?"mixed":e,void 0,{applyValue:this._applyValue.bind(this)}),this._isProcess=!1,this._listenersMappers.forEach((e=>{e.method.call(e.obj,this,"")}))}subscribe(e,t){const i=i=>{this._isProcess||t.call(e,this,"")},r={obj:e,method:t,callback:i};this._listenersMappers.push(r),this._baseProperty.subscribe(e,i)}unsubscribe(e,t){const i=(0,r.ensureDefined)(this._listenersMappers.find((i=>i.obj===e&&i.method===t))?.callback);this._baseProperty.unsubscribe(e,i)}unsubscribeAll(e){this._baseProperty.unsubscribeAll(e)}}class o extends s{constructor(e,t,i){super(e),this._propertyApplier=t,this._undoText=i}_applyValue(e,t){this._propertyApplier.setProperty(e,t,this._undoText)}}class l extends s{_applyValue(e,t){e.setValue(t)}}},76806:(e,t,i)=>{i.d(t,{ LineToolPaneViewFibWithLabels:()=>h,labelEdgeOffset:()=>c});var r=i(50151),n=i(4753),s=i(2383),o=i(56265),l=i(84617),a=i(2268),d=i(24961);const c=4;class h extends a.InplaceTextLineSourcePaneView{constructor(e,t,i,l){super(e,t,i,l),this._labelsRenderers={},this._numericFormatter=(0,o.getNumericFormatter)(),this._percentageFormatter=(0,o.getPercentageFormatter)(),this._textRenderers={},this._inplaceEditLevelIndex=1;for(let t=1;t<=e.levelsCount();t++)this._labelsRenderers[t]=new n.TextRenderer(void 0,new s.HitTestResult(s.HitTarget.MovePoint,{activeItem:t}));if(i&&l){for(let t=1;t<=e.levelsCount();t++){const e=new s.HitTestResult(s.HitTarget.MovePoint,{...(0,a.inplaceEditHandlers)(this._tryActivateEditMode.bind(this,t)),activeItem:t});this._textRenderers[t]=new d.LineToolTextRenderer(void 0,e)}this._source.setAdditionalCursorData((()=>{const e=(0,r.ensureDefined)(this._textRenderers[this._inplaceEditLevelIndex]);return{color:this._source.editableTextStyle().cursorColor,...e.getTextInfo()}}),(e=>(0,r.ensureDefined)(this._textRenderers[this._inplaceEditLevelIndex]).positionToCoordinate(e)))}}_tryActivateEditMode(e,t){this._inplaceEditLevelIndex=e,super._tryActivateEditMode(e,t)}_activateEditMode(e){const t=(0,r.ensureDefined)(this._textRenderers[this._inplaceEditLevelIndex]);this._updateInplaceText(t.getTextInfo()),super._activateEditMode(e)}_updateLabelForLevel(e){const t=this._labelsRenderers[e.levelIndex];if(void 0===t)return null;const i=this._source.priceScale();if(!i)return null;const r=this._source.ownerSource()?.firstValue();if(null==r)return null;const n=this._source.properties(),s=Boolean(n.showCoeffs?.value()),o=Boolean(n.showPrices?.value());if(!s&&!o)return null;const l=n["level"+e.levelIndex].coeff.value();let a="";if(s){a+=n.coeffsAsPercents?.value()??!1?this._percentageFormatter.format(100*l,{signPositive:!1,tailSize:2}):this._numericFormatter.format(l)}return o&&(a+=" ("+i.formatPrice(e.price,r)+")"),this._updateRendererLabel(e,t,a),t}_updateRendererLabel(e,t,i){if(!i&&void 0===e.decorator)return null;const{leftPoint:r,rightPoint:s,horzAlign:o,extendLeft:a,extendRight:d,...h}=e,u=this._source.properties(),[p,_]=(0,n.getTextAlignInBox)({horzAlign:o,extendLeft:a,extendRight:d,width:this._model.timeScale().width(),leftPoint:r,rightPoint:s});return t.setData({points:[p],text:i,horzAlign:_,offsetX:c,offsetY:0,font:l.CHART_FONT_FAMILY,fontSize:u.labelFontSize?.value()??12,...h}),t}}},69878:(e,t,i)=>{i.d(t,{LineToolFibWedgeBase:()=>l});var r=i(50151),n=i(10555),s=i(63117),o=i(22613);class l extends s.InplaceTextLineDataSource{constructor(){super(...arguments),this._hasEditableCoordinates=new o.WatchedValue(!1)}pointsCount(){return 3}setPoint(e,t){if(super.setPoint(e,t),!this._recursiveGuard)try{if(this._recursiveGuard=!0,2===e){const e=(0,r.ensureNotNull)(this.pointToScreenPoint(this._points[0]));let t=(0,r.ensureNotNull)(this.pointToScreenPoint(this._points[1]));const i=(0,r.ensureNotNull)(this.pointToScreenPoint(this._points[2])).subtract(e).length();let s=t.subtract(e);s.length()<=0&&(s=new n.Point(1,0)), t=e.add(s.normalized().scaled(i));const o=(0,r.ensureNotNull)(this.screenPointToPoint(t)),l=this._pointsProperty.childs().points[1];l.childs().price.setValue(o.price),l.childs().bar.setValue(o.index)}else{const e=(0,r.ensureNotNull)(this.pointToScreenPoint(this._points[0])),t=(0,r.ensureNotNull)(this.pointToScreenPoint(this._points[1]));let i=(0,r.ensureNotNull)(this.pointToScreenPoint(this._points[2]));const s=t.subtract(e).length();let o=i.subtract(e);o.length()<=0&&(o=new n.Point(1,0)),i=e.add(o.normalized().scaled(s));const l=(0,r.ensureNotNull)(this.screenPointToPoint(i)),a=this._pointsProperty.childs().points[2];a.childs().price.setValue(l.price),a.childs().bar.setValue(l.index)}}finally{this._recursiveGuard=!1}}addPoint(e){if(2===this._points.length){const t=(0,r.ensureNotNull)(this.pointToScreenPoint(this._points[0])),i=(0,r.ensureNotNull)(this.pointToScreenPoint(this._points[1]));let n=(0,r.ensureNotNull)(this.pointToScreenPoint(e));const s=i.subtract(t).length(),o=n.subtract(t).normalized();n=t.add(o.scaled(s));const l=(0,r.ensureNotNull)(this.ownerSource()),a=(0,r.ensureNotNull)(l.firstValue()),d=(0,r.ensureNotNull)(this.priceScale()).coordinateToPrice(n.y,a);e={index:Math.round(this._model.timeScale().coordinateToIndex(n.x)),price:d}}return super.addPoint(e)}editableTextProperties(){(0,r.assert)(!1,"unexpected method call")}}},24745:(e,t,i)=>{i.d(t,{FibWedgePaneView:()=>p});var r=i(50151),n=i(10555),s=i(50605),o=i(76806),l=i(80819),a=i(2383),d=i(94602),c=i(11795),h=i(25672),u=i(73914);class p extends o.LineToolPaneViewFibWithLabels{constructor(){super(...arguments),this._renderer=null,this._levels=[],this._baseTrendRenderer=new l.TrendLineRenderer,this._edgeTrendRenderer=new l.TrendLineRenderer}renderer(e){return this._invalidated&&this._updateImpl(e),this._renderer}_updateImpl(e){if(super._updateImpl(e),this._renderer=null,this._levels=[],this._points.length<3)return void this._updateRenderer();const[t,i,s]=this._points,o=i.subtract(t).normalized(),l=s.subtract(t).normalized(),a=new n.Point(1,0),d=new n.Point(0,1);let c=Math.acos(o.dotProduct(a));o.dotProduct(d)<0&&(c=2*Math.PI-c);let h=Math.acos(l.dotProduct(a));if(l.dotProduct(d)<0&&(h=2*Math.PI-h),hMath.PI){const e=Math.min(c,h);c=Math.max(c,h),h=e+2*Math.PI}const u=this._source.properties();for(let e=1;e<=this._source.levelsCount();e++){const n="level"+e,s=(0,r.ensureDefined)(u.child(n));if(!s.childs().visible.value())continue;const a=s.childs().coeff.value(),d=s.childs().color.value(),c=Math.abs(i.subtract(t).length()*a),h=o.add(l).scaled(.5).normalized().scaled(c),p=t.add(h);this._levels.push({coeff:a,color:d,radius:c,labelPoint:p,p1:t.add(o.scaled(c)),p2:t.add(l.scaled(c)),linewidth:s.childs().linewidth.value(),linestyle:s.childs().linestyle.value(),index:e})}this._points.length<2||this._updateRenderer(c,h)}_updateRenderer(e=NaN,t=NaN){if(this._points.length<2)return ;const i=new d.CompositeRenderer,r=this._source.properties().childs(),[n,o]=this._points,l=r.trendline.childs().visible.value()?r.trendline.childs().linewidth.value():0,p=r.trendline.childs().linestyle.value();if(this._baseTrendRenderer.setData({points:[n,o],color:r.trendline.childs().color.value(),linewidth:l,linestyle:p,extendleft:!1,extendright:!1,leftend:h.LineEnd.Normal,rightend:h.LineEnd.Normal}),i.append(this._baseTrendRenderer),this._points.length<3)return this.addAnchors(i),void(this._renderer=i);let _=this._points[2];const f=_.pointIndex,g=o.subtract(n).length(),v=_.subtract(n).normalized();_=n.add(v.scaled(g)),_.pointIndex=f,this._edgeTrendRenderer.setData({points:[n,_],color:r.trendline.childs().color.value(),linewidth:l,linestyle:p,extendleft:!1,extendright:!1,leftend:h.LineEnd.Normal,rightend:h.LineEnd.Normal}),i.append(this._edgeTrendRenderer);for(let n=this._levels.length-1;n>=0;n--){const o=this._levels[n],l=new c.ArcWedgeRenderer;l.setData({center:this._points[0],radius:o.radius,prevRadius:n>0?this._levels[n-1].radius:0,color:o.color,linewidth:o.linewidth,angle1:e,angle2:t,p1:o.p1,p2:o.p2,fillBackground:r.fillBackground.value(),transparency:r.transparency.value(),color1:"",color2:""}),l.setHitTest(new a.HitTestResult(a.HitTarget.MovePoint,void 0,o.index)),i.append(l);const d=this._updateLabelForLevel({levelIndex:o.index,color:o.color,leftPoint:o.labelPoint,rightPoint:o.labelPoint,price:0,horzAlign:s.HorizontalAlign.Left,vertAlign:s.VerticalAlign.Middle});null!==d&&i.append(d)}const y=[n,o];this._model.lineBeingCreated()!==this._source&&y.push(_),i.append(this.createLineAnchor({points:y.map(u.mapLineSourcePaneViewPointToLineAnchorPoint)},0)),this._renderer=i}}},39653:(e,t,i)=>{i.r(t),i.d(t,{LineToolFibWedge:()=>A});var r=i(50151),n=i(11542),s=i(95804),o=i(69878),l=i(40226),a=i(65045),d=i(13896),c=i(67725),h=i(95338),u=i(14472),p=i(91682),_=i(44005);const f=new s.TranslatedString("change {title} level {index} line visibility",n.t(null,void 0,i(51403))),g=new s.TranslatedString("change {title} levels visibility",n.t(null,void 0,i(54517))),v=new s.TranslatedString("change {title} level {index} line color",n.t(null,void 0,i(664))),y=new s.TranslatedString("change {title} level {index} line width",n.t(null,void 0,i(97870))),P=new s.TranslatedString("change {title} level {index} line coeff",n.t(null,void 0,i(27154))),b=new s.TranslatedString("change {title} all lines color",n.t(null,void 0,i(59577))),T=new s.TranslatedString("change {title} background visibility",n.t(null,void 0,i(30839))),m=new s.TranslatedString("change {title} background transparency",n.t(null,void 0,i(13783))),x=n.t(null,void 0,i(51574)),w=n.t(null,void 0,i(28683)),S=n.t(null,void 0,i(79468)),C=n.t(null,void 0,i(79650));class D extends u.LineDataSourceDefinitionsViewModel{_stylePropertyDefinitions(){const e=[],t=this._source.properties().childs(),i=this._source.name(),n=(0,p.removeSpaces)(i),o=new s.TranslatedString(i,this._source.translatedType()),l=t.trendline.childs(),a=(0,c.createLineStyleDefinition)(this._propertyApplier,{ showLine:l.visible,lineColor:l.color,lineWidth:l.linewidth},o,"TrendLine",{line:x});e.push(a);const d=this._source.levelsCount();for(let i=1;i<=d;i++){const r=t[`level${i}`].childs(),s=(0,h.createLeveledLinePropertyDefinition)({checked:(0,h.convertToDefinitionProperty)(this._propertyApplier,r.visible,f.format({title:o,index:i})),color:(0,h.getColorDefinitionProperty)(this._propertyApplier,r.color,null,v.format({title:o,index:i})),width:(0,h.convertToDefinitionProperty)(this._propertyApplier,r.linewidth,y.format({title:o,index:i})),level:(0,h.convertToDefinitionProperty)(this._propertyApplier,r.coeff,P.format({title:o,index:i}))},{id:`${n}LineLevel${i}`});e.push(s)}const u=(0,h.createColorPropertyDefinition)({color:(0,h.getColorDefinitionProperty)(this._propertyApplier,new _.CollectibleColorPropertyUndoWrapper((0,r.ensureNotNull)(this._source.lineColorsProperty()),this._propertyApplier,null),null,b.format({title:o}),!0)},{id:`${n}AllLineColor`,title:w});e.push(u);const D=(0,h.createTransparencyPropertyDefinition)({checked:(0,h.convertToDefinitionProperty)(this._propertyApplier,t.fillBackground,T.format({title:o})),transparency:(0,h.convertToDefinitionProperty)(this._propertyApplier,t.transparency,m.format({title:o}))},{id:`${n}Background`,title:S});e.push(D);const L=(0,h.createCheckablePropertyDefinition)({checked:(0,h.convertToDefinitionProperty)(this._propertyApplier,t.showCoeffs,g.format({title:o}))},{id:`${n}Levels`,title:C});return e.push(L),{definitions:e}}}var L=i(24745);const N=new s.TranslatedString("erase level line",n.t(null,void 0,i(77114)));var R;!function(e){e[e.LevelsCount=11]="LevelsCount"}(R||(R={}));class A extends o.LineToolFibWedgeBase{constructor(e,t,i,r){super(e,t??A.createProperties(e.backgroundTheme().spawnOwnership()),i,r),this._setPaneViews([new L.FibWedgePaneView(this,this._model)])}levelsCount(){return 11}isSynchronizable(){return!1}name(){return"Fib Wedge"}processErase(e,t){const i=`level${t}`,n=(0,r.ensureDefined)(this.properties().child(i)).childs().visible;e.setProperty(n,!1,N,d.lineToolsDoNotAffectChartInvalidation)}static createProperties(e,t){const i=new l.LevelsProperty({defaultName:"linetoolfibwedge",state:t,map:{range:[1,11]},theme:e});return this._configureProperties(i),i}async _getPropertyDefinitionsViewModelClass(){return D}static _configureProperties(e){super._configureProperties(e);const t=[e.childs().trendline.childs().linewidth],i=[e.childs().trendline.childs().color];for(let n=1;n<=11;n++){const s=(0,r.ensureDefined)(e.child(`level${n}`));t.push(s.childs().linewidth),i.push(s.childs().color)}e.addChild("linesColors",new a.LineToolColorsProperty(i)),e.addChild("linesWidths",new a.LineToolWidthsProperty(t))}}},24961:(e,t,i)=>{i.d(t,{LineToolTextRenderer:()=>n});var r=i(4753);class n extends r.TextRenderer{getTextInfo(){const e=this._getInternalData(),t=this.fontStyle(),i=this._getFontInfo();return{...e,lineHeight:this.lineHeight(),lineSpacing:this.lineSpacing(),font:t,fontSize:i.fontSize,centerRotation:this.centerTextRotation()??void 0}}setCursorType(e){ this._hitTest.data()?.cursorType!==e&&this._hitTest.mergeData({cursorType:e})}}},11795:(e,t,i)=>{i.d(t,{ArcWedgeRenderer:()=>l});var r,n=i(2383),s=i(52859),o=i(20820);!function(e){e[e.HitTestTolerance=4]="HitTestTolerance"}(r||(r={}));class l extends o.MediaCoordinatesPaneRenderer{constructor(){super(...arguments),this._data=null,this._hitTest=new n.HitTestResult(n.HitTarget.MovePoint),this._backHitTest=new n.HitTestResult(n.HitTarget.MovePointBackground)}setData(e){this._data=e}setHitTest(e){this._hitTest=e}hitTest(e){if(null===this._data)return null;const t=e.subtract(this._data.center),i=t.length();if(Math.abs(i-this._data.radius)<=4){const t=e.subtract(this._data.p1).length(),i=e.subtract(this._data.p2).length();if(Math.max(t,i)<=this._data.p1.subtract(this._data.p2).length())return this._hitTest}if(this._data.fillBackground&&i<=this._data.radius){const e=this._data.p1.subtract(this._data.center).normalized(),i=this._data.p2.subtract(this._data.center).normalized(),r=t.normalized(),n=e.dotProduct(i),s=r.dotProduct(e),o=r.dotProduct(i);if(s>=n&&o>=n)return this._backHitTest}return null}_drawImpl(e){if(null===this._data)return;const t=e.context;if(t.strokeStyle=this._data.color,t.lineWidth=this._data.linewidth,t.beginPath(),t.arc(this._data.center.x,this._data.center.y,this._data.radius,this._data.angle1,this._data.angle2),t.stroke(),this._data.fillBackground){if(t.arc(this._data.center.x,this._data.center.y,this._data.prevRadius,this._data.angle2,this._data.angle1,!0),this._data.gradient){const e=t.createRadialGradient(this._data.center.x,this._data.center.y,this._data.prevRadius,this._data.center.x,this._data.center.y,this._data.radius);e.addColorStop(0,(0,s.generateColor)(this._data.color1,this._data.transparency)),e.addColorStop(1,(0,s.generateColor)(this._data.color2,this._data.transparency)),t.fillStyle=e}else t.fillStyle=(0,s.generateColor)(this._data.color,this._data.transparency,!0);t.fill()}}}}}]);