(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[3596],{73023:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ChartPropertyDefinitionsViewModel:()=>ti});var o=i(50151),r=i(11542),n=i(14483),l=(i(67980),i(40493),i(97145)),a=i(295),s=i(73955),c=i(78159),d=i(3228),h=i(49535),u=i(73986),p=i(98425),v=i(36298),g=i(42960),y=i(32818),P=i(49152),f=i(18611),b=i(97906);const m=new v.TranslatedString("change symbol description visibility",r.t(null,void 0,i(26717))),w=new v.TranslatedString("change symbol legend format",r.t(null,void 0,i(95071))),S=new v.TranslatedString("change open market status visibility",r.t(null,void 0,i(18644))),D=new v.TranslatedString("change OHLC values visibility",r.t(null,void 0,i(57889))),_=new v.TranslatedString("change last day change visibility",r.t(null,void 0,i(50058))),V=new v.TranslatedString("change bar change visibility",r.t(null,void 0,i(45110))),T=new v.TranslatedString("change indicator arguments visibility",r.t(null,void 0,i(96162))),C=new v.TranslatedString("change indicator titles visibility",r.t(null,void 0,i(31325))),k=new v.TranslatedString("change indicator values visibility",r.t(null,void 0,i(99774))),L=new v.TranslatedString("change legend background visibility",r.t(null,void 0,i(61061))),x=new v.TranslatedString("change legend background transparency",r.t(null,void 0,i(97956))),W=new v.TranslatedString("change volume values visibility",r.t(null,void 0,i(9455))),M=new v.TranslatedString("change symbol field visibility",r.t(null,void 0,i(6091))),O=r.t(null,void 0,i(15474)),R=r.t(null,void 0,i(67369)),A=r.t(null,void 0,i(99487)),G=r.t(null,void 0,i(37274)),H=r.t(null,void 0,i(22519)),F=r.t(null,void 0,i(1111)),Z=r.t(null,void 0,i(31326)),B=r.t(null,void 0,i(68791)),N=r.t(null,void 0,i(91322)),E=r.t(null,void 0,i(27331)),j=r.t(null,void 0,i(75991)),z=r.t(null,void 0,i(24248)),U=n.enabled("symbol_info_price_source"),I=n.enabled("show_symbol_logos")&&n.enabled("show_symbol_logo_in_legend");var q=i(74304),J=i(20345),K=i(11095),Q=i(42226),X=i(39875);const Y=n.enabled("show_average_close_price_line_and_label"),$=new v.TranslatedString("change symbol labels visibility",r.t(null,void 0,i(9402))),ee=new v.TranslatedString("change symbol last value visibility",r.t(null,void 0,i(53150))),te=new v.TranslatedString("change symbol last value mode",r.t(null,void 0,i(28741))),ie=(new v.TranslatedString("change symbol previous close value visibility",r.t(null,void 0,i(12707))),new v.TranslatedString("change bid and ask labels visibility",r.t(null,void 0,i(5100))),new v.TranslatedString("change pre/post market price label visibility",r.t(null,void 0,i(49889))),new v.TranslatedString("change high and low price labels visibility",r.t(null,void 0,i(66805)))),oe=new v.TranslatedString("change average close price label visibility",r.t(null,void 0,i(39402))),re=(new v.TranslatedString("change indicators and financials name labels visibility",r.t(null,void 0,i(59820))), new v.TranslatedString("change indicators name labels visibility",r.t(null,void 0,i(87027)))),ne=(new v.TranslatedString("change indicators and financials value labels visibility",r.t(null,void 0,i(90512))),new v.TranslatedString("change indicators value labels visibility",r.t(null,void 0,i(14922)))),le=new v.TranslatedString("change no overlapping labels",r.t(null,void 0,i(83935))),ae=new v.TranslatedString("change countdown to bar close visibility",r.t(null,void 0,i(58108))),se=new v.TranslatedString("change currency label visibility",r.t(null,void 0,i(84060))),ce=new v.TranslatedString("change scale modes buttons visibility",r.t(null,void 0,i(47361))),de=new v.TranslatedString("change unit label visibility",r.t(null,void 0,i(7011))),he=new v.TranslatedString("change currency and unit labels visibility",r.t(null,void 0,i(88161))),ue=new v.TranslatedString("change plus button visibility",r.t(null,void 0,i(50190))),pe=new v.TranslatedString("toggle lock scale",r.t(null,void 0,i(21203))),ve=new v.TranslatedString("change price to bar ratio",r.t(null,void 0,i(69510))),ge=new v.TranslatedString("change date format",r.t(null,void 0,i(50457))),ye=new v.TranslatedString("change time hours format",r.t(null,void 0,i(76991))),Pe=(new v.TranslatedString("change day of week on labels",r.t(null,void 0,i(7104))),r.t(null,void 0,i(35383))),fe=r.t(null,void 0,i(27767)),be=(r.t(null,void 0,i(40847)),r.t(null,void 0,i(25084)),r.t(null,void 0,i(9654))),me=(r.t(null,void 0,i(29687)),r.t(null,void 0,i(34905))),we=(r.t(null,void 0,i(47586)),r.t(null,void 0,i(74823)),r.t(null,void 0,i(95036))),Se=r.t(null,void 0,i(60971)),De=r.t(null,void 0,i(42502)),_e=r.t(null,void 0,i(78905)),Ve=r.t(null,void 0,i(94370)),Te=r.t(null,void 0,i(50985)),Ce=r.t(null,void 0,i(77534)),ke=r.t(null,void 0,i(17319)),Le=r.t(null,void 0,i(47926)),xe=r.t(null,void 0,i(97378)),We=r.t(null,void 0,i(53224)),Me=r.t(null,void 0,i(18219)),Oe=r.t(null,void 0,i(64859)),Re=r.t(null,void 0,i(25209)),Ae=r.t(null,void 0,i(97316)),Ge=r.t(null,void 0,i(43637)),He=(r.t(null,void 0,i(55090)),[{value:q.PriceAxisLastValueMode.LastPriceAndPercentageValue,title:r.t(null,void 0,i(76523))},{value:q.PriceAxisLastValueMode.LastValueAccordingToScale,title:r.t(null,void 0,i(80170))}]);var Fe=i(48686),Ze=i(3347),Be=i(43715);const Ne=new v.TranslatedString("change sessions breaks visibility",r.t(null,void 0,i(71589))),Ee=new v.TranslatedString("change sessions breaks color",r.t(null,void 0,i(1579))),je=new v.TranslatedString("change sessions breaks width",r.t(null,void 0,i(15035))),ze=new v.TranslatedString("change sessions breaks style",r.t(null,void 0,i(21460))),Ue=r.t(null,void 0,i(59827)) ;const Ie=new v.TranslatedString("change chart background color",r.t(null,void 0,i(99011))),qe=new v.TranslatedString("change chart background type",r.t(null,void 0,i(72458))),Je=new v.TranslatedString("change vert grid lines color",r.t(null,void 0,i(22722))),Ke=new v.TranslatedString("change horz grid lines color",r.t(null,void 0,i(88096))),Qe=new v.TranslatedString("change grid lines visibility",r.t(null,void 0,i(27764))),Xe=new v.TranslatedString("change scales text color",r.t(null,void 0,i(35065))),Ye=new v.TranslatedString("change scales font size",r.t(null,void 0,i(84382))),$e=new v.TranslatedString("change scales lines color",r.t(null,void 0,i(12468))),et=new v.TranslatedString("change pane separators color",r.t(null,void 0,i(89032))),tt=new v.TranslatedString("change crosshair color",r.t(null,void 0,i(29951))),it=new v.TranslatedString("change crosshair width",r.t(null,void 0,i(37034))),ot=new v.TranslatedString("change crosshair style",r.t(null,void 0,i(92027))),rt=new v.TranslatedString("change symbol watermark visibility",r.t(null,void 0,i(87159))),nt=new v.TranslatedString("change symbol watermark color",r.t(null,void 0,i(25616))),lt=new v.TranslatedString("change navigation buttons visibility",r.t(null,void 0,i(35646))),at=new v.TranslatedString("change pane buttons visibility",r.t(null,void 0,i(37730))),st=new v.TranslatedString("change top margin",r.t(null,void 0,i(98905))),ct=new v.TranslatedString("change bottom margin",r.t(null,void 0,i(10349))),dt=new v.TranslatedString("change right margin",r.t(null,void 0,i(35636))),ht=new v.TranslatedString("change right margin percentage",r.t(null,void 0,i(66601))),ut=r.t(null,void 0,i(27331)),pt=r.t(null,void 0,i(37174)),vt=r.t(null,void 0,i(36426)),gt=r.t(null,void 0,i(34403)),yt=r.t(null,void 0,i(49199)),Pt=r.t(null,void 0,i(39392)),ft=r.t(null,void 0,i(37229)),bt=r.t(null,void 0,i(83182)),mt=r.t(null,void 0,i(73908)),wt=r.t(null,void 0,i(46720)),St=r.t(null,void 0,i(77705)),Dt=r.t(null,void 0,i(74343)),_t=r.t(null,void 0,i(50446)),Vt=r.t(null,void 0,i(65994)),Tt=r.t(null,void 0,i(91757)),Ct=r.t(null,void 0,i(21141)),kt=r.t(null,void 0,i(36014)),Lt=r.t(null,void 0,i(16812)),xt=r.t(null,{context:"unit"},i(50831));function Wt(e,t,o,s,c,d,h,u,p,v){const g=[],y=[],f=[],b=[],m=[],w=(0,a.createColorPropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,t.background,null,Ie),gradientColor1:(0,a.getColorDefinitionProperty)(e,t.backgroundGradientStartColor,null,Ie),gradientColor2:(0,a.getColorDefinitionProperty)(e,t.backgroundGradientEndColor,null,Ie),type:(0,a.convertToDefinitionProperty)(e,t.backgroundType,qe)},{id:"chartBackground",title:ut,noAlpha:!0}),S=t.vertGridProperties.childs(),D=t.horzGridProperties.childs(),_=(0,a.createOptionalTwoColorsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,t.gridLinesMode,Qe),color1:(0,a.getColorDefinitionProperty)(e,S.color,null,Je),color2:(0,a.getColorDefinitionProperty)(e,D.color,null,Ke)},{id:"gridLines",title:Pt,options:new l.WatchedValue([{title:pt,value:"both"},{title:vt,value:"vert"},{title:gt, value:"horz"},{title:yt,value:"none"}]),color1Visible:v.vertLinesVisible,color2Visible:v.horzLinesVisible}),V=(0,P.createWVFromGetterAndSubscription)((()=>1!==e.model().panes().length),e.model().panesCollectionChanged()),T=(0,a.createLinePropertyDefinition)({visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(V.ownership()),color:(0,a.getColorDefinitionProperty)(e,t.separatorColor,null,et)},{id:"paneSeparators",title:mt}),C=t.crossHairProperties.childs(),k=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,C.color,C.transparency,tt),width:(0,a.convertToDefinitionProperty)(e,C.width,it),style:(0,a.convertToDefinitionProperty)(e,C.style,ot)},{id:"crossHair",title:wt});g.push(w,_);{const t=function(e){const t=e.model().sessions().properties().childs().graphics.childs().vertlines.childs().sessBreaks.childs(),i=(0,Fe.combineProperty)((e=>!e),e.mainSeries().isDWMProperty().weakReference());return(0,Be.createLinePropertyDefinition)({visible:(0,Ze.makeProxyDefinitionProperty)(i.ownership()),checked:(0,a.convertToDefinitionProperty)(e,t.visible,Ne),color:(0,a.getColorDefinitionProperty)(e,t.color,null,Ee),width:(0,a.convertToDefinitionProperty)(e,t.width,je),style:(0,a.convertToDefinitionProperty)(e,t.style,ze)},{id:"sessionBeaks",title:Ue})}(e);g.push(t)}if(g.push(T,k),null!==o){const t=(0,a.createColorPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,o.visibility,rt),color:(0,a.getColorDefinitionProperty)(e,o.color,null,nt)},{id:"watermark",title:St});g.push(t)}const L=(0,a.createTextPropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,s.textColor,null,Xe),size:(0,a.convertToDefinitionProperty)(e,s.fontSize,Ye)},{id:"scalesText",title:ft}),x=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,s.lineColor,null,$e)},{id:"scalesLine",title:bt});y.push(L,x);const W=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,d.property,lt)},{id:"navButtons",title:Dt,options:new l.WatchedValue(d.values)}),M=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,h.property,at)},{id:"paneButtons",title:_t,options:new l.WatchedValue(h.values)});f.push(W,M);const O=(0,a.createNumberPropertyDefinition)({value:(0,a.convertToDefinitionProperty)(e,t.topMargin,st,[J.floor])},{type:0,id:"paneTopMargin",title:Vt,min:new l.WatchedValue(0),max:new l.WatchedValue(25),step:new l.WatchedValue(1),unit:new l.WatchedValue("%")}),R=(0,a.createNumberPropertyDefinition)({value:(0,a.convertToDefinitionProperty)(e,t.bottomMargin,ct,[J.floor])},{type:0,id:"paneBottomMargin",title:Tt,min:new l.WatchedValue(0),max:new l.WatchedValue(25),step:new l.WatchedValue(1),unit:new l.WatchedValue("%")});if(b.push(O,R),n.enabled("chart_property_page_right_margin_editor")){const t={value:(0,a.convertFromWVToDefinitionProperty)(e,c.value,dt,[J.floor])},i={type:0,id:"paneRightMargin",title:Ct,min:c.min,max:c.max,step:new l.WatchedValue(1),unit:new l.WatchedValue(xt)};if(n.enabled("show_percent_option_for_right_margin")){const o=(0, a.createNumberPropertyDefinition)({...t,checked:(0,a.convertFromWVToDefinitionProperty)(e,p,ht,[e=>!e,e=>!e])},{...i,title:Lt}),r=(0,a.createNumberPropertyDefinition)({checked:(0,a.convertFromWVToDefinitionProperty)(e,p,ht),value:(0,a.convertFromWVToDefinitionProperty)(e,u,ht,[J.floor])},{type:0,id:"paneRightMarginPercentage",title:kt,min:new l.WatchedValue(0),max:new l.WatchedValue(99),step:new l.WatchedValue(1),unit:new l.WatchedValue("%")});m.push(o),m.push(r)}else{const e=(0,a.createNumberPropertyDefinition)(t,i);b.push(e)}}const A=[(0,a.createPropertyDefinitionsGeneralGroup)(g,"chartBasicStylesAppearanceGroup",r.t(null,void 0,i(88364))),(0,a.createPropertyDefinitionsGeneralGroup)(y,"scalesAppearanceGroup",r.t(null,void 0,i(43115))),(0,a.createPropertyDefinitionsGeneralGroup)(f,"buttonsAppearanceGroup",r.t(null,void 0,i(87845))),(0,a.createPropertyDefinitionsGeneralGroup)(b,"marginsAppearanceGroup",r.t(null,void 0,i(66653)))];return m.length>0&&A.push((0,a.createPropertyDefinitionsGeneralGroup)(m,"rightMarginsAppearanceGroup",r.t(null,void 0,i(40187)))),{definitions:A}}var Mt=i(15879),Ot=i(83407),Rt=i(53741),At=i(16164),Gt=i(38618),Ht=i(53078),Ft=i(82038),Zt=i(84806),Bt=i(87717),Nt=i(5666),Et=i(7621),jt=i(8021),zt=i(60339),Ut=i(75709),It=i(99165),qt=i(84504);const Jt={symbol:{active:jt,default:Ht},legend:{active:zt,default:Ft},scales:{active:Ut,default:Zt},canvas:{active:i(97660),default:Et},events:{active:qt,default:Nt},trading:{active:It,default:Bt}},Kt=r.t(null,void 0,i(89053)),Qt=r.t(null,void 0,i(79194)),Xt=r.t(null,void 0,i(43115)),Yt=r.t(null,void 0,i(23238)),$t=(r.t(null,void 0,i(26897)),r.t(null,void 0,i(90801)),r.t(null,void 0,i(70500)),r.t(null,void 0,i(78621)),r.t(null,void 0,i(30973)),!1);const ei=[{id:"symbol-text-source-description",value:"description",title:r.t(null,void 0,i(29601))},{id:"symbol-text-source-ticker",value:"ticker",title:r.t(null,void 0,i(23097))},{id:"symbol-text-source-ticker-and-description",value:"ticker-and-description",title:r.t(null,void 0,i(82168))}];n.enabled("symbol_info_long_description")&&ei.push({id:"symbol-text-source-long-description",value:"long-description",title:r.t(null,void 0,i(96073))});class ti{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 o=this._chartWidgetProperties.childs().paneProperties.childs(),r=(0,P.createWVFromProperty)(o.gridLinesMode);this._gridColorsVisibilities={gridLinesMode:r,vertLinesVisible:(0,b.combine)((e=>"both"===e||"vert"===e),r.weakReference()),horzLinesVisible:(0,b.combine)((e=>"both"===e||"horz"===e),r.weakReference())},this._legendPropertyPage=this._createLegendPropertyPage(), this._scalesPropertyPage=this._createScalesPropertyPage(),this._appearancePropertyPage=this._createAppearancePropertyPage(),this._tradingPropertyPage=this._createTradingPropertyPage(),this._eventsPropertyPage=this._createEventsPropertyPage(),this._series.onStyleChanged().subscribe(this,this._updateDefinitions),this._series.priceScaleChanged().subscribe(this,this._updateDefinitions)}destroy(){var e,t;null!==this._propertyPages&&this._propertyPages.filter(((e,t)=>0!==t)).forEach((e=>{(0,a.destroyDefinitions)(e.definitions.value())})),this._seriesPropertyDefinitionViewModel.destroy(),null===(e=this._pipValueTypeSubscription)||void 0===e||e.unsubscribe(),null===(t=this._availableDateFormatValues)||void 0===t||t.destroy(),this._series.onStyleChanged().unsubscribe(this,this._updateDefinitions),this._series.priceScaleChanged().unsubscribe(this,this._updateDefinitions);(0,o.ensureNotNull)(this._model.timeScale()).maxRightOffsetChanged().unsubscribeAll(this),this._gridColorsVisibilities.vertLinesVisible.destroy(),this._gridColorsVisibilities.horzLinesVisible.destroy(),this._gridColorsVisibilities.gridLinesMode.destroy(),this._isDestroyed=!0}propertyPages(){return null===this._propertyPages?this._seriesPropertyDefinitionViewModel.propertyPages().then((e=>{if(this._isDestroyed)throw new Error("ChartPropertyDefinitionsViewModel already destroyed");return null===this._propertyPages&&(this._propertyPages=[...e],this._propertyPages.push(this._legendPropertyPage,this._scalesPropertyPage,this._appearancePropertyPage),null!==this._tradingPropertyPage&&this._propertyPages.push(this._tradingPropertyPage),null!==this._eventsPropertyPage&&this._propertyPages.push(this._eventsPropertyPage)),this._propertyPages})):Promise.resolve(this._propertyPages)}_updatePlDisplayOptions(e){(0,o.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:Gt.availableTimezones.map((e=>({value:e.id,title:e.title})))};return new u.SeriesPropertyDefinitionsViewModel(this._series,this._undoModel,"symbol",Kt,Jt.symbol,e)}_createLegendPropertyPage(){const e=this._chartWidgetProperties.childs().paneProperties.childs().legendProperties.childs(),t={property:this._series.properties().childs().statusViewStyle.childs().symbolTextSource,values:ei},o=function(e,t,o,n,s){const c=[],d=[];if(I){const i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showLogo,S)},{id:"showLogo",title:O});d.push(i)}const h=(0,a.createOptionsPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showSeriesTitle,m),option:(0,a.convertToDefinitionProperty)(e,o.property,w)},{id:"symbolTextSource",title:R,options:new l.WatchedValue(o.values)});if(d.push(h),null!==n){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,n,S),visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(t.ownership())},{id:"showOpenMarketStatus",title:j});d.push(i)}const u=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showSeriesOHLC,D)},{id:"ohlcTitle",title:A});if(d.push(u),!y.alwaysShowLastPriceAndLastDayChange){const i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showBarChange,V),visible:(0,a.makeProxyDefinitionProperty)((0,P.combineProperty)((e=>12!==e),e.mainSeries().properties().childs().style.weakReference()).ownership())},{id:"barChange",title:H});d.push(i)}if(d.push((0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showVolume,W)},{id:"barVolume",title:F})),y.lastDayChangeAvailable||y.alwaysShowLastPriceAndLastDayChange){const i=y.alwaysShowLastPriceAndLastDayChange?t.showBarChange:t.showLastDayChange,o=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i,_),visible:(0,a.makeProxyDefinitionProperty)((0,P.combineProperty)((e=>12!==e),e.mainSeries().properties().childs().style.weakReference()).ownership())},{id:"lastDayChange",title:G});d.push(o)}if(U){const i=(0,b.combineWithFilteredUpdate)((()=>e.model().symbolSources().some((e=>{var t;return void 0!==(null===(t=e.symbolInfo())||void 0===t?void 0:t.price_source_id)}))),(e=>!e),e.model().symbolSourceResolvingActive().weakReference(),(0,P.createWVFromGetterAndSubscription)((()=>e.model().symbolSources().length),e.model().symbolSourceCollectionChanged()).ownership());d.push((0,a.createCheckablePropertyDefinition)({disabled:(0,a.convertFromReadonlyWVToDefinitionProperty)(e.model().symbolSourceResolvingActive().weakReference()),checked:(0,a.convertToDefinitionProperty)(e,t.showPriceSource,M),visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(i.ownership())},{id:"priceSource",title:z}))}c.push((0,a.createPropertyDefinitionsGeneralGroup)(d,"seriesLegendVisibilityGroup",r.t(null,void 0,i(89053))));const p=[],v=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showStudyArguments,T)},{id:"studyArguments",title:B}),q=(0,a.createCheckableSetPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showStudyTitles,C)},{id:"studyTitles",title:Z},[v]),J=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showStudyValues,k)},{id:"studyValues",title:N}),K=(0,P.createWVFromGetterAndSubscription)((()=>e.model().priceDataSources().some((e=>!(0,f.isActingAsSymbolSource)(e)&&e.showInObjectTree()))),e.model().dataSourceCollectionChanged());p.push(q,J),c.push((0,a.createPropertyDefinitionsGeneralGroup)(p,"studiesLegendVisibilityGroup",r.t(null,void 0,i(61142)),K));const Q=[],X=(0,a.createTransparencyPropertyDefinition)({ checked:(0,a.convertToDefinitionProperty)(e,t.showBackground,L),transparency:(0,a.convertToDefinitionProperty)(e,t.backgroundTransparency,x)},{id:"legendBgTransparency",title:E});return Q.push(X),c.push((0,a.createPropertyDefinitionsGeneralGroup)(Q,"generalLegendGroup")),{definitions:c}}(this._undoModel,e,t,this._options.marketStatusWidgetEnabled?p.showMarketOpenStatusProperty:null);return(0,s.createPropertyPage)(o,"legend",Qt,Jt.legend)}_createScalesPropertyPage(){const e=this._createScalesDefinitions();return(0,s.createPropertyPage)(e,"scales",Xt,Jt.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})))};null===this._availableDateFormatValues&&(this._availableDateFormatValues=new l.WatchedValue(function(e=!1){const t=new Date(Date.UTC(1997,8,29));return Mt.availableDateFormats.map((i=>({value:i,title:new Rt.DateFormatter(i,e).format(t)})))}()).spawn());const o={property:Ot.dateFormatProperty,values:this._availableDateFormatValues},s={property:At.timeHoursFormatProperty,values:[{value:"24-hours",title:r.t(null,void 0,i(55838))},{value:"12-hours",title:r.t(null,void 0,i(19648))}]},c=this._model.mainSeriesScaleRatioProperty();return function(e,t,i,o){const r=o.seriesPriceScale.properties().childs(),s=[],c=[],d=[],h=[];if(o.seriesHasClosePrice){const t=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showSymbolLabels,$)},{id:"symbolNameLabel",title:Pe}),o=(0,a.createOptionsPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showSeriesLastValue,ee),option:(0,a.convertToDefinitionProperty)(e,i.seriesLastValueMode,te)},{id:"symbolLastValueLabel",title:fe,options:new l.WatchedValue(He)});c.push(t,o)}const u=t.highLowAvgPrice.childs(),p=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,u.highLowPriceLabelsVisible,ie)},{id:"highLowPriceLabels",title:Se});if(c.push(p),Y){const t=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,u.averageClosePriceLabelVisible,oe)},{id:"averageClosePriceLabel",title:we});c.push(t)}{const t=(0,a.createCheckablePropertyDefinition)({visible:(0,a.convertFromReadonlyWVToDefinitionProperty)((0,P.createWVFromGetterAndSubscription)((()=>e.model().priceDataSources().some((e=>!(0,f.isActingAsSymbolSource)(e)&&e.showInObjectTree()))),e.model().dataSourceCollectionChanged()).ownership()),checked:(0,a.convertToDefinitionProperty)(e,i.showStudyPlotLabels,re)},{id:"studyNameLabel",title:be});c.push(t)}{const t=(0,a.createCheckablePropertyDefinition)({visible:(0,a.convertFromReadonlyWVToDefinitionProperty)((0,P.createWVFromGetterAndSubscription)((()=>e.model().priceDataSources().some((e=>!(0,f.isActingAsSymbolSource)(e)&&e.showInObjectTree()))),e.model().dataSourceCollectionChanged()).ownership()),checked:(0,a.convertToDefinitionProperty)(e,i.showStudyLastValue,ne)},{ id:"studyLastValueLabel",title:me});c.push(t)}const v=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,r.alignLabels,le)},{id:"noOverlappingLabels",title:De});if(c.push(v),s.push((0,a.createPropertyDefinitionsGeneralGroup)(c,"scalesLabelsGroup",_e)),o.countdownEnabled){const i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showCountdown,ae)},{id:"countdown",title:Ve});d.push(i)}if(e.crossHairSource().isMenuEnabled()){const t=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,K.addPlusButtonProperty,ue)},{id:"addPlusButton",title:xe,solutionId:void 0});d.push(t)}if(o.currencyConversionEnabled||o.unitConversionEnabled){const t=o.currencyConversionEnabled&&o.unitConversionEnabled?ke:o.currencyConversionEnabled?Te:Ce,i=o.currencyConversionEnabled&&o.unitConversionEnabled?he:o.currencyConversionEnabled?se:de,r=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,(0,Q.currencyUnitVisibilityProperty)(),i)},{id:"scalesCurrencyUnit",title:t,options:new l.WatchedValue((0,Q.currencyUnitVisibilityOptions)())});d.push(r)}const g=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,(0,X.autoLogButtonsVisibilityProperty)(),ce)},{id:"autoLogButtonsVisibility",title:Le,options:new l.WatchedValue((0,X.autoLogButtonsVisibilityOptions)())}),y=(0,a.createNumberPropertyDefinition)({checked:(0,a.getLockPriceScaleDefinitionProperty)(e,r.lockScale,o.seriesPriceScale,pe),value:(0,a.getScaleRatioDefinitionProperty)(e,o.mainSeriesScaleRatioProperty,ve,[(0,J.limitedPrecision)(7),e=>e])},{id:"lockScale",title:Me,min:new l.WatchedValue(o.mainSeriesScaleRatioProperty.getMinValue()),max:new l.WatchedValue(o.mainSeriesScaleRatioProperty.getMaxValue()),step:new l.WatchedValue(o.mainSeriesScaleRatioProperty.getStepChangeValue())}),b=(0,a.createOptionsPropertyDefinition)({option:(0,a.getPriceScaleSelectionStrategyDefinitionProperty)(e,o.scalesPlacementPropertyObj.property)},{id:"scalesPlacement",title:We,options:new l.WatchedValue(o.scalesPlacementPropertyObj.values)});if(d.push(g,y,b),s.push((0,a.createPropertyDefinitionsGeneralGroup)(d,"scalesPriceScaleGroup",Oe)),n.enabled("scales_date_format")){const t=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,o.dateFormatPropertyObj.property,ge)},{id:"dateFormat",title:Re,options:o.dateFormatPropertyObj.values});h.push(t)}if(n.enabled("scales_time_hours_format")){const t=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,o.timeHoursFormatPropertyObj.property,ye)},{id:"timeHoursFormat",title:Ae,options:new l.WatchedValue(o.timeHoursFormatPropertyObj.values)});h.push(t)}return h.length>0&&s.push((0,a.createPropertyDefinitionsGeneralGroup)(h,"scalesTimeScaleGroup",Ge)),{definitions:s}}(this._undoModel,this._series.properties().childs(),e,{disableSeriesPrevCloseValueProperty:this._series.isDWMProperty(),seriesHasClosePrice:this._series.hasClosePrice(), seriesPriceScale:this._series.priceScale(),mainSeriesScaleRatioProperty:c,scalesPlacementPropertyObj:t,dateFormatPropertyObj:o,timeHoursFormatPropertyObj:s,currencyConversionEnabled:this._options.currencyConversionEnabled,unitConversionEnabled:this._options.unitConversionEnabled,countdownEnabled:this._options.countdownEnabled,withWeekdayProperty:void 0})}_createMaxOffsetPropertyObject(){const e=(0,o.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,o.ensureNotNull)(this._model.timeScale());this._defaultRightOffsetPercentageWatchedValue=e.defaultRightOffsetPercentage()}_createUseRightOffsetPercentageWatchedValue(){const e=(0,o.ensureNotNull)(this._model.timeScale());this._useRightOffsetPercentageWatchedValue=e.usePercentageRightOffset()}_createAppearancePropertyPage(){const e=this._chartWidgetProperties.childs(),t=e.paneProperties.childs(),i=e.scalesProperties.childs(),r=this._model.watermarkSource();let n=null;null!==r&&(n=r.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,o.ensureNotNull)(this._maxRightOffsetPropertyObject),u=(0,o.ensureNotNull)(this._defaultRightOffsetPercentageWatchedValue),p=(0,o.ensureNotNull)(this._useRightOffsetPercentageWatchedValue),v=Wt(this._undoModel,t,n,i,h,l,a,u,p,this._gridColorsVisibilities);return(0,s.createPropertyPage)(v,"canvas",Yt,Jt.canvas)}_createTradingPropertyPage(){return null}_createEventsPropertyPage(){return null}}},84504:e=>{e.exports=''},8021:e=>{e.exports=''},97660:e=>{ e.exports=''},75709:e=>{e.exports=''},60339:e=>{e.exports=''},99165:e=>{e.exports=''},5666:e=>{e.exports=''},53078:e=>{e.exports=''},7621:e=>{e.exports=''},84806:e=>{ e.exports=''},82038:e=>{e.exports=''},87717:e=>{e.exports=''}}]);