(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[3596],{19350:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ChartPropertyDefinitionsViewModel:()=>wi});var r=i(50151),n=i(11542),o=i(37103),l=(i(86572),i(49470),i(22613)),a=i(95338),s=i(60567),c=i(23714),d=i(61786),h=i(28450),u=i(37903),p=i(87911),v=i(95804),g=i(95059),y=i(17161),P=i(67455),f=i(22455),b=i(48943);const w=new v.TranslatedString("change symbol description visibility",n.t(null,void 0,i(88167))),m=new v.TranslatedString("change symbol legend format",n.t(null,void 0,i(902))),D=new v.TranslatedString("change open market status visibility",n.t(null,void 0,i(96227))),S=new v.TranslatedString("change chart values visibility",n.t(null,void 0,i(79637))),T=new v.TranslatedString("change last day change visibility",n.t(null,void 0,i(66307))),k=new v.TranslatedString("change bar change visibility",n.t(null,void 0,i(27426))),_=new v.TranslatedString("change indicator inputs visibility",n.t(null,void 0,i(75663))),C=new v.TranslatedString("change indicator titles visibility",n.t(null,void 0,i(63050))),L=new v.TranslatedString("change indicator values visibility",n.t(null,void 0,i(49583))),V=new v.TranslatedString("change legend background visibility",n.t(null,void 0,i(14246))),W=new v.TranslatedString("change legend background transparency",n.t(null,void 0,i(91873))),O=new v.TranslatedString("change volume values visibility",n.t(null,void 0,i(96201))),x=new v.TranslatedString("change symbol field visibility",n.t(null,void 0,i(12050))),M=n.t(null,void 0,i(14876)),R=n.t(null,void 0,i(70198)),G=n.t(null,void 0,i(45639)),F=n.t(null,void 0,i(72423)),A=n.t(null,void 0,i(10842)),H=n.t(null,void 0,i(37644)),Z=n.t(null,void 0,i(29854)),E=n.t(null,void 0,i(21429)),N=n.t(null,void 0,i(60092)),B=n.t(null,void 0,i(79468)),j=n.t(null,void 0,i(25765)),z=n.t(null,void 0,i(84684)),U=o.enabled("symbol_info_price_source"),I=o.enabled("show_symbol_logos")&&o.enabled("show_symbol_logo_in_legend");var q=i(97902),J=i(45838),K=i(33718),Q=i(91106),X=i(25246);const Y=new v.TranslatedString("change symbol labels visibility",n.t(null,void 0,i(73357))),$=new v.TranslatedString("change symbol last value visibility",n.t(null,void 0,i(67453))),ee=new v.TranslatedString("change symbol last value mode",n.t(null,void 0,i(46066))),te=(new v.TranslatedString("change bid and ask labels visibility",n.t(null,void 0,i(69362))),new v.TranslatedString("change bid and ask lines visibility",n.t(null,void 0,i(52919))),new v.TranslatedString("change bid line color",n.t(null,void 0,i(17919))),new v.TranslatedString("change ask line color",n.t(null,void 0,i(98407))),new v.TranslatedString("change pre/post market price label visibility",n.t(null,void 0,i(30870))),new v.TranslatedString("change pre/post market price lines visibility",n.t(null,void 0,i(91978))),new v.TranslatedString("change pre market line color",n.t(null,void 0,i(96114))),new v.TranslatedString("change post market line color",n.t(null,void 0,i(28075))),
new v.TranslatedString("change high and low price labels visibility",n.t(null,void 0,i(24226)))),ie=new v.TranslatedString("change high and low price lines visibility",n.t(null,void 0,i(80692))),re=new v.TranslatedString("change high and low price line color",n.t(null,void 0,i(61407))),ne=new v.TranslatedString("change high and low price line width",n.t(null,void 0,i(39581))),oe=(new v.TranslatedString("change indicators and financials name labels visibility",n.t(null,void 0,i(35111))),new v.TranslatedString("change indicators name labels visibility",n.t(null,void 0,i(24893)))),le=(new v.TranslatedString("change indicators and financials value labels visibility",n.t(null,void 0,i(71161))),new v.TranslatedString("change indicators value labels visibility",n.t(null,void 0,i(64729)))),ae=new v.TranslatedString("change no overlapping labels",n.t(null,void 0,i(61557))),se=new v.TranslatedString("change countdown to bar close visibility",n.t(null,void 0,i(39383))),ce=new v.TranslatedString("change currency label visibility",n.t(null,void 0,i(64003))),de=new v.TranslatedString("change scale modes buttons visibility",n.t(null,void 0,i(69023))),he=new v.TranslatedString("change unit label visibility",n.t(null,void 0,i(51250))),ue=new v.TranslatedString("change currency and unit labels visibility",n.t(null,void 0,i(63119))),pe=new v.TranslatedString("change plus button visibility",n.t(null,void 0,i(96379))),ve=new v.TranslatedString("toggle lock scale",n.t(null,void 0,i(49695))),ge=new v.TranslatedString("change price to bar ratio",n.t(null,void 0,i(2509))),ye=new v.TranslatedString("change date format",n.t(null,void 0,i(43109))),Pe=new v.TranslatedString("change time hours format",n.t(null,void 0,i(39754))),fe=new v.TranslatedString("change day of week on labels",n.t(null,void 0,i(30418))),be=new v.TranslatedString("change save chart left edge position when changing interval",n.t(null,void 0,i(77408))),we=new v.TranslatedString("change price line visibility",n.t(null,void 0,i(8662))),me=new v.TranslatedString("change price line color",n.t(null,void 0,i(87861))),De=new v.TranslatedString("change price line width",n.t(null,void 0,i(29353))),Se=new v.TranslatedString("change average close price label visibility",n.t(null,void 0,i(76852))),Te=new v.TranslatedString("change average close price line visibility",n.t(null,void 0,i(1022))),ke=new v.TranslatedString("change average close price line color",n.t(null,void 0,i(47026))),_e=new v.TranslatedString("change average close price line width",n.t(null,void 0,i(43231))),Ce=(new v.TranslatedString("change previous close price line visibility",n.t(null,void 0,i(58419))),new v.TranslatedString("change previous close price line color",n.t(null,void 0,i(69814))),new v.TranslatedString("change previous close price line width",n.t(null,void 0,i(13660))),new v.TranslatedString("change symbol previous close value visibility",n.t(null,void 0,i(4729))),
n.t(null,void 0,i(99709))),Le=n.t(null,void 0,i(51514)),Ve=n.t(null,void 0,i(3554)),We=n.t(null,void 0,i(58589)),Oe=n.t(null,void 0,i(62142)),xe=n.t(null,void 0,i(95481)),Me=n.t(null,void 0,i(68650)),Re=(n.t(null,void 0,i(83811)),n.t(null,void 0,i(78082))),Ge=(n.t(null,void 0,i(60904)),n.t(null,void 0,i(14180))),Fe=(n.t(null,void 0,i(76473)),n.t(null,void 0,i(83140))),Ae=n.t(null,void 0,i(81849)),He=n.t(null,void 0,i(26204)),Ze=n.t(null,void 0,i(33564)),Ee=n.t(null,void 0,i(3015)),Ne=n.t(null,void 0,i(71566)),Be=n.t(null,void 0,i(30042)),je=n.t(null,void 0,i(14017)),ze=n.t(null,void 0,i(35082)),Ue=n.t(null,void 0,i(84838)),Ie=n.t(null,void 0,i(5591)),qe=n.t(null,void 0,i(93965)),Je=n.t(null,void 0,i(42357)),Ke=n.t(null,void 0,i(8852)),Qe=o.enabled("show_average_close_price_line_and_label"),Xe=[{value:q.PriceAxisLastValueMode.LastPriceAndPercentageValue,title:n.t(null,void 0,i(27632))},{value:q.PriceAxisLastValueMode.LastValueAccordingToScale,title:n.t(null,void 0,i(31218))}];var Ye=i(87465),$e=i(89959),et=i(5149),tt=i(98583);const it=new v.TranslatedString("change sessions breaks visibility",n.t(null,void 0,i(60067))),rt=new v.TranslatedString("change sessions breaks color",n.t(null,void 0,i(33895))),nt=new v.TranslatedString("change sessions breaks width",n.t(null,void 0,i(28175))),ot=new v.TranslatedString("change sessions breaks style",n.t(null,void 0,i(21641))),lt=n.t(null,void 0,i(66707));var at=i(35106);const st=new v.TranslatedString("change chart background color",n.t(null,void 0,i(42803))),ct=new v.TranslatedString("change chart background type",n.t(null,void 0,i(41382))),dt=new v.TranslatedString("change vert grid lines color",n.t(null,void 0,i(71805))),ht=new v.TranslatedString("change horz grid lines color",n.t(null,void 0,i(21133))),ut=new v.TranslatedString("change grid lines visibility",n.t(null,void 0,i(73844))),pt=new v.TranslatedString("change scales text color",n.t(null,void 0,i(76131))),vt=new v.TranslatedString("change scales font size",n.t(null,void 0,i(27792))),gt=new v.TranslatedString("change scales lines color",n.t(null,void 0,i(94997))),yt=new v.TranslatedString("change pane separators color",n.t(null,void 0,i(52203))),Pt=new v.TranslatedString("change crosshair color",n.t(null,void 0,i(92885))),ft=new v.TranslatedString("change crosshair width",n.t(null,void 0,i(50544))),bt=new v.TranslatedString("change crosshair style",n.t(null,void 0,i(68418))),wt=new v.TranslatedString("change symbol watermark visibility",n.t(null,void 0,i(73227))),mt=new v.TranslatedString("change symbol ticker watermark visibility",n.t(null,void 0,i(18099))),Dt=new v.TranslatedString("change interval watermark visibility",n.t(null,void 0,i(451))),St=new v.TranslatedString("change symbol description watermark visibility",n.t(null,void 0,i(65838))),Tt=(new v.TranslatedString("change replay watermark visibility",n.t(null,void 0,i(66021))),
new v.TranslatedString("change symbol watermark color",n.t(null,void 0,i(78995)))),kt=new v.TranslatedString("change navigation buttons visibility",n.t(null,void 0,i(3311))),_t=new v.TranslatedString("change pane buttons visibility",n.t(null,void 0,i(18378))),Ct=new v.TranslatedString("change top margin",n.t(null,void 0,i(74883))),Lt=new v.TranslatedString("change bottom margin",n.t(null,void 0,i(32094))),Vt=new v.TranslatedString("change right margin",n.t(null,void 0,i(82946))),Wt=new v.TranslatedString("change right margin percentage",n.t(null,void 0,i(79545))),Ot=n.t(null,void 0,i(79468)),xt=n.t(null,void 0,i(83594)),Mt=n.t(null,void 0,i(8402)),Rt=n.t(null,void 0,i(61900)),Gt=n.t(null,void 0,i(60798)),Ft=n.t(null,void 0,i(68662)),At=n.t(null,void 0,i(70320)),Ht=n.t(null,void 0,i(56982)),Zt=n.t(null,void 0,i(82894)),Et=n.t(null,void 0,i(74622)),Nt=n.t(null,void 0,i(41571)),Bt=n.t(null,void 0,i(51019)),jt=n.t(null,void 0,i(53263)),zt=n.t(null,void 0,i(97118)),Ut=n.t(null,void 0,i(27567)),It=n.t(null,void 0,i(50421)),qt=n.t(null,void 0,i(86235)),Jt=n.t(null,void 0,i(27377)),Kt=n.t(null,{context:"unit"},i(80587));async function Qt(e,t,r,s,c,d,h,u,p,v){const g=[],y=[],f=[],w=[],m=[],D=(0,a.createColorPropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,t.background,null,st),gradientColor1:(0,a.getColorDefinitionProperty)(e,t.backgroundGradientStartColor,null,st),gradientColor2:(0,a.getColorDefinitionProperty)(e,t.backgroundGradientEndColor,null,st),type:(0,a.convertToDefinitionProperty)(e,t.backgroundType,ct)},{id:"chartBackground",title:Ot,noAlpha:!0}),S=t.vertGridProperties.childs(),T=t.horzGridProperties.childs(),k=(0,a.createOptionalTwoColorsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,t.gridLinesMode,ut),color1:(0,a.getColorDefinitionProperty)(e,S.color,null,dt),color2:(0,a.getColorDefinitionProperty)(e,T.color,null,ht)},{id:"gridLines",title:Ft,options:new l.WatchedValue([{title:xt,value:"both"},{title:Mt,value:"vert"},{title:Rt,value:"horz"},{title:Gt,value:"none"}]),color1Visible:v.vertLinesVisible,color2Visible:v.horzLinesVisible}),_=(0,P.createWVFromGetterAndSubscription)((()=>1!==e.model().panes().length),e.model().panesCollectionChanged()),C=(0,a.createLinePropertyDefinition)({visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(_.ownership()),color:(0,a.getColorDefinitionProperty)(e,t.separatorColor,null,yt)},{id:"paneSeparators",title:Zt}),L=t.crossHairProperties.childs(),V=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,L.color,L.transparency,Pt),width:(0,a.convertToDefinitionProperty)(e,L.width,ft),style:(0,a.convertToDefinitionProperty)(e,L.style,bt)},{id:"crossHair",title:Et});g.push(D,k);{const t=function(e){const t=e.model().sessions().properties().childs().sessionHighlight.childs().vertlines.childs().sessBreaks.childs(),i=(0,$e.combineProperty)((e=>!e),e.mainSeries().isDWMProperty().weakReference());return(0,tt.createLinePropertyDefinition)({visible:(0,et.makeProxyDefinitionProperty)(i.ownership()),checked:(0,
a.convertToDefinitionProperty)(e,t.visible,it),color:(0,a.getColorDefinitionProperty)(e,t.color,null,rt),width:(0,a.convertToDefinitionProperty)(e,t.width,nt),style:(0,a.convertToDefinitionProperty)(e,t.style,ot)},{id:"sessionBeaks",title:lt})}(e);g.push(t)}if(g.push(C,V),null!==r){const t=(0,b.combine)((e=>null===e),e.model().watermarkContentProvider().weakReference()),o=[(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,r.ticker,mt)},{id:"watermarkTicker",title:n.t(null,void 0,i(5791)),notFormatedTitle:!0}),(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,r.interval,Dt)},{id:"watermarkInterval",title:n.t(null,void 0,i(17854)),notFormatedTitle:!0}),(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,r.description,St)},{id:"watermarkDescription",title:n.t(null,void 0,i(78734)),notFormatedTitle:!0}),null].filter(Ye.notNull),l=(0,a.createPropertyDefinitionsCheckableListOptionsGroup)(o,void 0,[(0,a.createColorPropertyDefinition)({color:(0,at.getStdColorDefinitionProperty)(e,r.color,e.model().backgroundTheme().weakReference(),Tt)},{id:"watermarkColor"})],"watermark",Nt,t);g.push(l);const s=(0,b.combine)((e=>null!==e),e.model().watermarkContentProvider().weakReference()),c=(0,a.createColorPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,r.custom,wt),color:(0,at.getStdColorDefinitionProperty)(e,r.color,e.model().backgroundTheme().weakReference(),Tt),visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(s.ownership())},{id:"customWatermark",title:Nt});g.push(c)}const W=(0,a.createTextPropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,s.textColor,null,pt),size:(0,a.convertToDefinitionProperty)(e,s.fontSize,vt)},{id:"scalesText",title:At}),O=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,s.lineColor,null,gt)},{id:"scalesLine",title:Ht});y.push(W,O);const x=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,d.property,kt)},{id:"navButtons",title:Bt,options:new l.WatchedValue(d.values)}),M=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,h.property,_t)},{id:"paneButtons",title:jt,options:new l.WatchedValue(h.values)});f.push(x,M);const R=(0,a.createNumberPropertyDefinition)({value:(0,a.convertToDefinitionProperty)(e,t.topMargin,Ct,[J.floor])},{type:0,id:"paneTopMargin",title:zt,min:new l.WatchedValue(0),max:new l.WatchedValue(25),step:new l.WatchedValue(1),unit:new l.WatchedValue("%")}),G=(0,a.createNumberPropertyDefinition)({value:(0,a.convertToDefinitionProperty)(e,t.bottomMargin,Lt,[J.floor])},{type:0,id:"paneBottomMargin",title:Ut,min:new l.WatchedValue(0),max:new l.WatchedValue(25),step:new l.WatchedValue(1),unit:new l.WatchedValue("%")});if(w.push(R,G),o.enabled("chart_property_page_right_margin_editor")){const t={value:(0,a.convertFromWVToDefinitionProperty)(e,c.value,Vt,[J.floor])},i={type:0,id:"paneRightMargin",title:It,min:c.min,max:c.max,step:new l.WatchedValue(1),unit:new l.WatchedValue(Kt)}
;if(o.enabled("show_percent_option_for_right_margin")){const r=(0,a.createNumberPropertyDefinition)({...t,checked:(0,a.convertFromWVToDefinitionProperty)(e,p,Wt,[e=>!e,e=>!e])},{...i,title:Jt}),n=(0,a.createNumberPropertyDefinition)({checked:(0,a.convertFromWVToDefinitionProperty)(e,p,Wt),value:(0,a.convertFromWVToDefinitionProperty)(e,u,Wt,[J.floor])},{type:0,id:"paneRightMarginPercentage",title:qt,min:new l.WatchedValue(0),max:new l.WatchedValue(99),step:new l.WatchedValue(1),unit:new l.WatchedValue("%")});m.push(r),m.push(n)}else{const e=(0,a.createNumberPropertyDefinition)(t,i);w.push(e)}}const F=[(0,a.createPropertyDefinitionsGeneralGroup)(g,"chartBasicStylesAppearanceGroup",n.t(null,void 0,i(15153))),(0,a.createPropertyDefinitionsGeneralGroup)(y,"scalesAppearanceGroup",n.t(null,void 0,i(93968))),(0,a.createPropertyDefinitionsGeneralGroup)(f,"buttonsAppearanceGroup",n.t(null,void 0,i(32744))),(0,a.createPropertyDefinitionsGeneralGroup)(w,"marginsAppearanceGroup",n.t(null,void 0,i(70937)))];return m.length>0&&F.push((0,a.createPropertyDefinitionsGeneralGroup)(m,"rightMarginsAppearanceGroup",n.t(null,void 0,i(62532)))),{definitions:F}}var Xt=i(40153),Yt=i(10718),$t=i(97363),ei=i(60336),ti=i(3190),ii=i(10845),ri=i(53078),ni=i(82038),oi=i(84806),li=i(87717),ai=i(7621),si=i(8021),ci=i(60339),di=i(75709),hi=i(20037);const ui={symbol:{bold:si,default:ri},legend:{bold:ci,default:ni},scales:{bold:di,default:oi},canvas:{bold:i(97660),default:ai},trading:{bold:hi,default:li}};const pi=n.t(null,void 0,i(95481)),vi=n.t(null,void 0,i(28715)),gi=n.t(null,void 0,i(90275)),yi=n.t(null,void 0,i(23739)),Pi=(n.t(null,void 0,i(69808)),n.t(null,void 0,i(76495)),n.t(null,void 0,i(36620)),n.t(null,void 0,i(8249)),n.t(null,void 0,i(94408)),n.t(null,void 0,i(24821)),!1);function fi(e=!1){const t=new Date(Date.UTC(1997,8,29));return Yt.availableDateFormats.map((i=>({value:i,title:new ei.DateFormatter(i,e).format(t)})))}const bi=[{id:"symbol-text-source-description",value:"description",title:n.t(null,void 0,i(78734))},{id:"symbol-text-source-ticker",value:"ticker",title:n.t(null,void 0,i(5791))},{id:"symbol-text-source-ticker-and-description",value:"ticker-and-description",title:n.t(null,void 0,i(16816))}];o.enabled("symbol_info_long_description")&&bi.push({id:"symbol-text-source-long-description",value:"long-description",title:n.t(null,void 0,i(89315))});class wi{constructor(e,t,i){this._propertyPages=null,this._maxRightOffsetPropertyObject=null,this._defaultRightOffsetPercentageWatchedValue=null,this._useRightOffsetPercentageWatchedValue=null,this._profitLossOptions=null,this._isDestroyed=!1,this._availableDateFormatValues=null,this._undoModel=e,this._model=this._undoModel.model(),this._series=this._model.mainSeries(),this._chartWidgetProperties=t,this._options=i,this._seriesPropertyDefinitionViewModel=this._createSeriesViewModel();const r=this._chartWidgetProperties.childs().paneProperties.childs(),n=(0,P.createWVFromProperty)(r.gridLinesMode);this._gridColorsVisibilities={gridLinesMode:n,vertLinesVisible:(0,
b.combine)((e=>"both"===e||"vert"===e),n.weakReference()),horzLinesVisible:(0,b.combine)((e=>"both"===e||"horz"===e),n.weakReference())},this._legendPropertyPage=this._createLegendPropertyPage(),this._scalesPropertyPage=this._createScalesPropertyPage(),this._appearancePropertyPage=this._createAppearancePropertyPage(),this._tradingPropertyPage=this._createTradingPropertyPage(),this._eventsPropertyPage=this._createEventsPropertyPage(),this._alertsPropertyPage=this._createAlertsPropertyPage(),this._series.onStyleChanged().subscribe(this,this._updateDefinitions),this._series.priceScaleChanged().subscribe(this,this._updateDefinitions)}destroy(){null!==this._propertyPages&&this._propertyPages.filter(((e,t)=>0!==t)).forEach((e=>{(0,a.destroyDefinitions)(e.definitions.value())})),this._seriesPropertyDefinitionViewModel.destroy(),this._pipValueTypeSubscription?.unsubscribe(),this._availableDateFormatValues?.destroy(),this._series.onStyleChanged().unsubscribe(this,this._updateDefinitions),this._series.priceScaleChanged().unsubscribe(this,this._updateDefinitions);(0,r.ensureNotNull)(this._model.timeScale()).maxRightOffsetChanged().unsubscribeAll(this),this._gridColorsVisibilities.vertLinesVisible.destroy(),this._gridColorsVisibilities.horzLinesVisible.destroy(),this._gridColorsVisibilities.gridLinesMode.destroy(),this._isDestroyed=!0}async propertyPages(){if(null===this._propertyPages){const e=await this._seriesPropertyDefinitionViewModel.propertyPages();if(this._isDestroyed)throw new Error("ChartPropertyDefinitionsViewModel already destroyed");if(null===this._propertyPages){this._propertyPages=[...e],this._propertyPages.push(this._legendPropertyPage,this._scalesPropertyPage,await this._appearancePropertyPage),null!==this._tradingPropertyPage&&this._propertyPages.push(this._tradingPropertyPage);const t=await this._alertsPropertyPage;t&&this._propertyPages.push(t);const i=await this._eventsPropertyPage;i&&this._propertyPages.push(i)}return this._propertyPages}return Promise.resolve(this._propertyPages)}_updatePlDisplayOptions(e){(0,r.ensureNotNull)(this._profitLossOptions).setValue([])}_updateDefinitions(){(0,a.destroyDefinitions)(this._scalesPropertyPage.definitions.value());const e=this._createScalesDefinitions();this._scalesPropertyPage.definitions.setValue(e.definitions)}_createSeriesViewModel(){const e={property:this._model.properties().childs().timezone,values:ii.availableTimezones.map((e=>({value:e.id,title:e.title})))};return new u.SeriesPropertyDefinitionsViewModel(this._series,this._undoModel,"symbol",pi,(0,r.ensureDefined)(ui.symbol),e)}_createLegendPropertyPage(){const e=this._chartWidgetProperties.childs().paneProperties.childs().legendProperties.childs(),t={property:this._series.properties().childs().statusViewStyle.childs().symbolTextSource,values:bi},o=function(e,t,r,o){const s=[],c=[];if(I){const i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showLogo,D)},{id:"showLogo",title:M});c.push(i)}const d=(0,a.createOptionsPropertyDefinition)({checked:(0,
a.convertToDefinitionProperty)(e,t.showSeriesTitle,w),option:(0,a.convertToDefinitionProperty)(e,r.property,m)},{id:"symbolTextSource",title:R,options:new l.WatchedValue(r.values)});if(c.push(d),null!==o){const t=(0,b.combineWithFilteredUpdate)(((t,i)=>"market"===t&&!(0,g.isEconomicSymbol)(e.mainSeries().symbolInfo())),((e,t)=>null!==e),e.mainSeries().marketStatusModel().status().weakReference(),e.mainSeries().symbolResolvingActive().weakReference()),i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,o,D),visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(t.ownership())},{id:"showOpenMarketStatus",title:j});c.push(i)}const h=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showSeriesOHLC,S)},{id:"ohlcTitle",title:G});if(c.push(h),!y.alwaysShowLastPriceAndLastDayChange){const i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showBarChange,k),visible:(0,a.makeProxyDefinitionProperty)((0,P.combineProperty)((e=>12!==e&&20!==e),e.mainSeries().properties().childs().style.weakReference()).ownership())},{id:"barChange",title:A});c.push(i)}if(c.push((0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showVolume,O),visible:(0,a.makeProxyDefinitionProperty)((0,P.combineProperty)((e=>20!==e),e.mainSeries().properties().childs().style.weakReference()).ownership())},{id:"barVolume",title:H})),y.lastDayChangeAvailable||y.alwaysShowLastPriceAndLastDayChange){const i=y.alwaysShowLastPriceAndLastDayChange?t.showBarChange:t.showLastDayChange,r=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i,T),visible:(0,a.makeProxyDefinitionProperty)((0,P.combineProperty)((e=>12!==e&&20!==e),e.mainSeries().properties().childs().style.weakReference()).ownership())},{id:"lastDayChange",title:F});c.push(r)}if(U){const i=(0,b.combineWithFilteredUpdate)(((t,i)=>e.model().symbolSources().some((e=>void 0!==e.symbolInfo()?.price_source_id))),((e,t)=>!e),e.model().symbolSourceResolvingActive().weakReference(),(0,P.createWVFromGetterAndSubscription)((()=>e.model().symbolSources().length),e.model().symbolSourceCollectionChanged()).ownership());c.push((0,a.createCheckablePropertyDefinition)({disabled:(0,a.convertFromReadonlyWVToDefinitionProperty)(e.model().symbolSourceResolvingActive().weakReference()),checked:(0,a.convertToDefinitionProperty)(e,t.showPriceSource,x),visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(i.ownership())},{id:"priceSource",title:z}))}s.push((0,a.createPropertyDefinitionsGeneralGroup)(c,"seriesLegendVisibilityGroup",n.t(null,void 0,i(95481))));const u=[],p=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showStudyArguments,_)},{id:"studyArguments",title:E}),v=(0,a.createCheckableSetPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showStudyTitles,C)},{id:"studyTitles",title:Z},[p]),q=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showStudyValues,L)
},{id:"studyValues",title:N}),J=(0,P.createWVFromGetterAndSubscription)((()=>e.model().priceDataSources().some((e=>!(0,f.isActingAsSymbolSource)(e)&&e.showInObjectTree()))),e.model().dataSourceCollectionChanged());u.push(v,q),s.push((0,a.createPropertyDefinitionsGeneralGroup)(u,"studiesLegendVisibilityGroup",n.t(null,void 0,i(84549)),J));const K=[],Q=(0,a.createTransparencyPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showBackground,V),transparency:(0,a.convertToDefinitionProperty)(e,t.backgroundTransparency,W)},{id:"legendBgTransparency",title:B});return K.push(Q),s.push((0,a.createPropertyDefinitionsGeneralGroup)(K,"generalLegendGroup")),{definitions:s}}(this._undoModel,e,t,this._options.marketStatusWidgetEnabled?p.showMarketOpenStatusProperty:null);return(0,s.createPropertyPage)(o,"legend",vi,(0,r.ensureDefined)(ui.legend))}_createScalesPropertyPage(){const e=this._createScalesDefinitions();return(0,s.createPropertyPage)(e,"scales",gi,(0,r.ensureDefined)(ui.scales))}_createScalesDefinitions(){const e=this._chartWidgetProperties.childs().scalesProperties.childs(),t={property:this._model.properties().childs().priceScaleSelectionStrategyName,values:(0,h.allPriceScaleSelectionStrategyInfo)().map((e=>({value:e.name,title:e.title})))};this._model.onWidget()?null===this._availableDateFormatValues&&(this._availableDateFormatValues=new l.WatchedValue(fi()).spawn()):null===this._availableDateFormatValues&&(this._availableDateFormatValues=(0,b.combine)((e=>fi(e)),(0,P.createWVFromProperty)(Xt.withWeekdayProperty).ownership()));const r={property:ti.timeHoursFormatProperty,values:[{value:"24-hours",title:n.t(null,void 0,i(5797))},{value:"12-hours",title:n.t(null,void 0,i(31882))}]},s=this._model.mainSeriesScaleRatioProperty();return function(e,t,i,r){const n=r.seriesPriceScale.properties().childs(),s=[],c=[];if(r.currencyConversionEnabled||r.unitConversionEnabled){const t=r.currencyConversionEnabled&&r.unitConversionEnabled?Ee:r.currencyConversionEnabled?Ae:Ze,i=r.currencyConversionEnabled&&r.unitConversionEnabled?ue:r.currencyConversionEnabled?ce:he,n=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,(0,Q.currencyUnitVisibilityProperty)(),i)},{id:"scalesCurrencyUnit",title:t,options:new l.WatchedValue((0,Q.currencyUnitVisibilityOptions)())});c.push(n)}const d=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,(0,X.autoLogButtonsVisibilityProperty)(),de)},{id:"autoLogButtonsVisibility",title:He,options:new l.WatchedValue((0,X.autoLogButtonsVisibilityOptions)())});c.push(d);const h=(0,a.createNumberPropertyDefinition)({checked:(0,a.getLockPriceScaleDefinitionProperty)(e,n.lockScale,r.seriesPriceScale,ve),value:(0,a.getScaleRatioDefinitionProperty)(e,r.mainSeriesScaleRatioProperty,ge,[(0,J.limitedPrecision)(7),e=>e])},{id:"lockScale",title:je,min:new l.WatchedValue(r.mainSeriesScaleRatioProperty.getMinValue()),max:new l.WatchedValue(r.mainSeriesScaleRatioProperty.getMaxValue()),
step:new l.WatchedValue(r.mainSeriesScaleRatioProperty.getStepChangeValue())}),u=(0,a.createOptionsPropertyDefinition)({option:(0,a.getPriceScaleSelectionStrategyDefinitionProperty)(e,r.scalesPlacementPropertyObj.property)},{id:"scalesPlacement",title:Be,options:new l.WatchedValue(r.scalesPlacementPropertyObj.values)});c.push(h,u),s.push((0,a.createPropertyDefinitionsGeneralGroup)(c,"scalesPriceScaleGroup",ze));const p=[],v=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,n.alignLabels,ae)},{id:"noOverlappingLabels",title:We});if(p.push(v),e.crosshairSource().isMenuEnabled()){const t=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,K.addPlusButtonProperty,pe)},{id:"addPlusButton",title:Ne,solutionId:void 0});p.push(t)}if(r.countdownEnabled){const i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showCountdown,se)},{id:"countdown",title:Fe});p.push(i)}if(r.seriesHasClosePrice){const r=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showSymbolLabels,Y)},{id:"symbolNameLabel",title:Ce}),n=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showSeriesLastValue,$)},{id:"symbolValueLabel",title:Le}),o=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showPriceLine,we)},{id:"symbolLine",title:Ve}),s=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,t.priceLineColor,null,me),width:(0,a.convertToDefinitionProperty)(e,t.priceLineWidth,De)},{id:"SymbolLastValuePriceLine",title:""}),c=(0,a.createOptionsPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showSeriesLastValue,$),option:(0,a.convertToDefinitionProperty)(e,i.seriesLastValueMode,ee)},{id:"symbolLastValueLabel",title:Le,options:new l.WatchedValue(Xe)});p.push((0,a.createPropertyDefinitionsCheckableListOptionsGroup)([r,n,o],void 0,[s,c],"symbolCheckableListGroup",xe))}if(Qe){const i=t.highLowAvgPrice.childs(),r=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.averageClosePriceLabelVisible,Se)},{id:"averageClosePriceLabel",title:Le}),n=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.averageClosePriceLineVisible,Te)},{id:"averageCloseLine",title:Ve}),o=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,i.averagePriceLineColor,null,ke),width:(0,a.convertToDefinitionProperty)(e,i.averagePriceLineWidth,_e)},{id:"averageClosePriceLine",title:""});p.push((0,a.createPropertyDefinitionsCheckableListOptionsGroup)([r,n],void 0,[o],"avgCloseCheckableListGroup",Me))}let g,y;g=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showStudyPlotLabels,oe)},{id:"studyNameLabel",title:Ce}),y=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showStudyLastValue,le)},{id:"studyLastValueLabel",title:Le});const b=(0,
P.createWVFromGetterAndSubscription)((()=>e.model().priceDataSources().some((e=>!(0,f.isActingAsSymbolSource)(e)&&e.showInObjectTree()))),e.model().dataSourceCollectionChanged());p.push((0,a.createPropertyDefinitionsCheckableListOptionsGroup)([g,y],void 0,[],"studiesCheckableListGroup",Re,b));const w=t.highLowAvgPrice.childs(),m=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,w.highLowPriceLabelsVisible,te)},{id:"highLowPriceLabels",title:Le}),D=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,w.highLowPriceLinesVisible,ie)},{id:"highLowPriceLine",title:Ve}),S=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,w.highLowPriceLinesColor,null,re),width:(0,a.convertToDefinitionProperty)(e,w.highLowPriceLinesWidth,ne)},{id:"highLowLineColors",title:""});p.push((0,a.createPropertyDefinitionsCheckableListOptionsGroup)([m,D],void 0,[S],"hiLowCheckableListGroup",Ge)),s.push((0,a.createPropertyDefinitionsGeneralGroup)(p,"scalesLabelsLineGroup",Oe));const T=[];if(r.withWeekdayProperty){const t=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,r.withWeekdayProperty,fe)},{id:"showWeekdayOnTimeScaleLabels",title:Je});T.push(t)}if(o.enabled("scales_date_format")){const t=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,r.dateFormatPropertyObj.property,ye)},{id:"dateFormat",title:Ue,options:r.dateFormatPropertyObj.values});T.push(t)}if(o.enabled("scales_time_hours_format")){const t=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,r.timeHoursFormatPropertyObj.property,Pe)},{id:"timeHoursFormat",title:Ie,options:new l.WatchedValue(r.timeHoursFormatPropertyObj.values)});T.push(t)}{const t=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,r.saveLeftEdgeProperty,be)},{id:"saveLeftChartEdge",title:Ke});T.push(t)}return T.length>0&&s.push((0,a.createPropertyDefinitionsGeneralGroup)(T,"scalesTimeScaleGroup",qe)),{definitions:s}}(this._undoModel,this._series.properties().childs(),e,{disableSeriesPrevCloseValueProperty:this._series.isDWMProperty(),seriesHasClosePrice:this._series.hasClosePrice(),seriesPriceScale:this._series.priceScale(),mainSeriesScaleRatioProperty:s,scalesPlacementPropertyObj:t,dateFormatPropertyObj:{property:$t.dateFormatProperty,values:this._availableDateFormatValues},timeHoursFormatPropertyObj:r,currencyConversionEnabled:this._options.currencyConversionEnabled,unitConversionEnabled:this._options.unitConversionEnabled,countdownEnabled:this._options.countdownEnabled,withWeekdayProperty:this._model.onWidget()?void 0:Xt.withWeekdayProperty,saveLeftEdgeProperty:e.saveLeftEdge})}_createMaxOffsetPropertyObject(){const e=(0,r.ensureNotNull)(this._model.timeScale()),t=new l.WatchedValue(Math.floor(e.maxRightOffset()));e.maxRightOffsetChanged().subscribe(this,(e=>{t.setValue(Math.floor(e))})),this._maxRightOffsetPropertyObject={value:e.defaultRightOffset(),min:new l.WatchedValue(0),max:t}}
_createDefaultRightOffsetPercentageWatchedValue(){const e=(0,r.ensureNotNull)(this._model.timeScale());this._defaultRightOffsetPercentageWatchedValue=e.defaultRightOffsetPercentage()}_createUseRightOffsetPercentageWatchedValue(){const e=(0,r.ensureNotNull)(this._model.timeScale());this._useRightOffsetPercentageWatchedValue=e.usePercentageRightOffset()}async _createAppearancePropertyPage(){const e=this._chartWidgetProperties.childs(),t=e.paneProperties.childs(),i=e.scalesProperties.childs(),n=this._model.watermarkSource();let o=null;null!==n&&(o=n.properties().childs());const l={property:c.property(),values:c.availableValues()},a={property:d.property(),values:d.availableValues()};null===this._maxRightOffsetPropertyObject&&this._createMaxOffsetPropertyObject(),null===this._defaultRightOffsetPercentageWatchedValue&&this._createDefaultRightOffsetPercentageWatchedValue(),null===this._useRightOffsetPercentageWatchedValue&&this._createUseRightOffsetPercentageWatchedValue();const h=(0,r.ensureNotNull)(this._maxRightOffsetPropertyObject),u=(0,r.ensureNotNull)(this._defaultRightOffsetPercentageWatchedValue),p=(0,r.ensureNotNull)(this._useRightOffsetPercentageWatchedValue),v=await Qt(this._undoModel,t,o,i,h,l,a,u,p,this._gridColorsVisibilities);return(0,s.createPropertyPage)(v,"canvas",yi,(0,r.ensureDefined)(ui.canvas))}_createTradingPropertyPage(){return null}async _createEventsPropertyPage(){return null}_createAlertsPropertyPage(){return null}}},8021:e=>{e.exports=''},97660:e=>{e.exports=''},75709:e=>{e.exports=''},60339:e=>{e.exports=''},20037:e=>{
e.exports=''},53078:e=>{e.exports=''},7621:e=>{e.exports=''},84806:e=>{e.exports=''},82038:e=>{e.exports=''},87717:e=>{
e.exports=''}}]);