"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[4273],{22523:(e,t,s)=>{s.d(t,{DateAndPriceBaseProperties:()=>f,allPropertiesStateKeysBase:()=>y,nonThemedFactoryDefaultsBase:()=>m,themedFactoryDefaultsBase:()=>h});var i=s(50151),r=s(58978),o=s(24633),l=s(65045),a=s(52859),n=s(37293),u=s(43337),c=s(88636);const d=(0,r.getHexColorByName)("color-tv-blue-500"),m={linewidth:2,fontsize:12,fillLabelBackground:!0,fillBackground:!0,backgroundTransparency:60,showVolume:!0,intervalsVisibilities:{...n.intervalsVisibilitiesDefaults},customText:{visible:!1,fontsize:12,bold:!1,italic:!1}},h=new Map([[o.StdTheme.Light,{textcolor:(0,r.getHexColorByName)("color-black"),labelBackgroundColor:(0,r.getHexColorByName)("color-white"),linecolor:d,backgroundColor:(0,a.generateColor)(d,85),shadow:"rgba(0, 0, 0, 0.2)",customText:{color:d}}],[o.StdTheme.Dark,{textcolor:(0,r.getHexColorByName)("color-white"),labelBackgroundColor:(0,r.getHexColorByName)("color-cold-gray-800"),linecolor:d,backgroundColor:(0,a.generateColor)(d,85),shadow:"rgba(0, 0, 0, 0.4)",customText:{color:d}}]]),y=["customText.text"];function p(e){const{showVolume:t=!0,...s}=e;return{...s,showVolume:t}}class f extends c.LineDataSourceProperty{constructor({nonThemedDefaultsKeys:e,themedDefaultsKeys:t,state:s,...r}){super({nonThemedDefaultsKeys:e,themedDefaultsKeys:t,templateKeys:[...e??[],...t??[],...y],state:s?p(s):void 0,...r});const o=s?.customText;this._textProperty=new u.Property(o?.text??""),this.childs().customText?.addChild("text",this._textProperty),this.addChild("textsColors",new l.LineToolColorsProperty([(0,i.ensureDefined)(this.childs().customText?.child("color"))]))}template(){const e=super.template();return e.customText.text=this._textProperty.value(),e}}},65096:(e,t,s)=>{s.r(t),s.d(t,{LineToolDateRange:()=>b});var i=s(50151),r=s(41414),o=s(19233),l=s(24633),a=s(78176),n=s(70031),u=s(22523),c=s(31558);const d={...u.nonThemedFactoryDefaultsBase,extendTop:!1,extendBottom:!1,showBarsRange:!0,showDateTimeRange:!0},m=u.themedFactoryDefaultsBase,h=(0,a.extractThemedColors)((0,i.ensureDefined)(m.get(l.StdTheme.Light)),(0,i.ensureDefined)(m.get(l.StdTheme.Dark))),y=(0,a.extractAllPropertiesKeys)((0,i.ensureDefined)(m.get(l.StdTheme.Light))),p=(0,a.extractAllPropertiesKeys)(d),f=[...new Set([...y,...p,...c.commonLineToolPropertiesStateKeys,...u.allPropertiesStateKeysBase])];class v extends u.DateAndPriceBaseProperties{static create(e,t){return new this({defaultName:"linetooldaterange",factoryDefaultsSupplier:()=>(0,n.factoryDefaultsForCurrentTheme)(d,m),nonThemedDefaultsKeys:p,themedDefaultsKeys:y,allStateKeys:f,themedColors:h,replaceThemedColorsOnThemeChange:!0,state:t,theme:e})}}class b extends r.LineDataSource{constructor(e,t,i,r){super(e,t??b.createProperties(e.backgroundTheme().spawnOwnership()),i,r),this._volumeCalculator=null,Promise.all([s.e(6290),s.e(986),s.e(6668),s.e(1583)]).then(s.bind(s,76280)).then((e=>{this._setPaneViews([new e.DateRangePaneView(this,this._model)])}))}destroy(){super.destroy(),
null!==this._volumeCalculator&&this._volumeCalculator.destroy()}pointsCount(){return 2}name(){return"Date Range"}template(){return this._properties.template()}volume(){if(null===this._volumeCalculator)return NaN;const e=this.points();return this._volumeCalculator.volume(e[0].index,e[1].index)}setOwnerSource(e){e===this._model.mainSeries()&&((0,i.assert)(null===this._volumeCalculator),this._volumeCalculator=new o.SeriesTimeRangeVolumeCalculator(this._model.mainSeries())),super.setOwnerSource(e)}static createProperties(e,t){const s=v.create(e,t);return this._configureProperties(s),s}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([s.e(3198),s.e(5410),s.e(2745),s.e(8823),s.e(8537)]).then(s.bind(s,86763))).GeneralDatePriceRangeDefinitionsViewModel}}},31558:(e,t,s)=>{s.d(t,{commonLineToolPropertiesStateKeys:()=>i});const i=["symbolStateVersion","zOrderVersion","frozen","title","interval","symbol","currencyId","unitId","visible","intervalsVisibilities.ticks","intervalsVisibilities.seconds","intervalsVisibilities.secondsFrom","intervalsVisibilities.secondsTo","intervalsVisibilities.minutes","intervalsVisibilities.minutesFrom","intervalsVisibilities.minutesTo","intervalsVisibilities.hours","intervalsVisibilities.hoursFrom","intervalsVisibilities.hoursTo","intervalsVisibilities.days","intervalsVisibilities.daysFrom","intervalsVisibilities.daysTo","intervalsVisibilities.weeks","intervalsVisibilities.weeksFrom","intervalsVisibilities.weeksTo","intervalsVisibilities.months","intervalsVisibilities.monthsFrom","intervalsVisibilities.monthsTo","intervalsVisibilities.ranges"];var r,o,l;!function(e){e[e.NotShared=0]="NotShared",e[e.SharedInLayout=1]="SharedInLayout",e[e.GloballyShared=2]="GloballyShared"}(r||(r={})),function(e){e.BeforeAllAction="BeforeAll",e.CustomAction="CustomAction"}(o||(o={})),function(e){e.FloatingToolbarButton="FloatingToolbarButton",e.Default="Default"}(l||(l={}))},88636:(e,t,s)=>{s.d(t,{LineDataSourceProperty:()=>a});var i=s(90054),r=s(16738),o=s(50151),l=s(78176);class a extends l.DefaultProperty{constructor({templateKeys:e,...t}){super({ignoreAllowSavingDefaults:!0,saveNonDefaultUserPreferencesOnly:!0,...t}),this._templateKeys=(0,o.ensureDefined)(e||this._allDefaultsKeys)}template(){return(0,l.extractState)(this.state(),this._templateKeys,[])}applyTemplate(e){this.mergeAndFire((0,l.extractState)((0,r.default)((0,i.default)(this._factoryDefaultsSupplier()),e),this._templateKeys))}}},70031:(e,t,s)=>{s.d(t,{factoryDefaultsForCurrentTheme:()=>n});var i=s(16738),r=s(90054),o=s(50151),l=s(45345),a=s(24633);function n(e,t){const s=l.watchedTheme.value()??a.StdTheme.Light,n=(0,r.default)(e);return(0,i.default)(n,(0,o.ensureDefined)(t.get(s))),n}}}]);