diff --git a/changelog.md b/changelog.md new file mode 100644 index 00000000..c062bfcb --- /dev/null +++ b/changelog.md @@ -0,0 +1,162 @@ + +ℹ️ You can check the Charting Library version by executing `TradingView.version()` in a browser console. + + + + + +## Version 24.003 + +*Date: Tue Apr 11 2023* + +**New Features** + +- **Images within bar marks.** Bar marks now support the rendering of images as the background by specifying the `imageUrl` property. Please see the [Mark](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.Mark) interface for more details. +- **Price Source and Long Description symbol info fields.** Add support for displaying the price source and long description fields from the symbol info. + - To enable the price source first add `symbol_info_price_source` to the list of enabled features. Then it will be shown in the legend, if available. It can be hidden through the legend context menu and the series property dialog. + - To enable the long description first add `symbol_info_long_description` to the list of enabled features. Then it will be shown in the legend, if available. It can be hidden through the legend context menu and the series property dialog. + +**Improvements** + +- **Added more styling options for bar marks.** The styling options for bar marks has been expanded to include options for styling the border. + - Border color can be set using the `border` property within `color` of the Mark interface. See [MarkCustomColor](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.MarkCustomColor) + - Border width can be set using `borderWidth` and `hoveredBorderWidth`. See [Mark](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.Mark) +- **Drawing tools favorites can now be defined within widget constructor.** Drawing tools can now be defined as favorites using the [`favorites`](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.ChartingLibraryWidgetOptions#favorites) property of the widget constructor options. See [Favorites.drawingTools](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.Favorites#drawingtools) for more information. +- **Context menu API can now be used within the Watchlist.** `watchlist_context_menu` featureset is enabled by default. See [onContextMenu](https://www.tradingview.com/charting-library-docs/latest/api/interfaces/Charting_Library.IChartingLibraryWidget#oncontextmenu) for more details. +- **Improved typings within package.json.** The `package.json` bundled with the library has been improved to support newer versions of node, and offer improved typings. See [NPM](https://www.tradingview.com/charting-library-docs/latest/getting_started/NPM) for more details. +- **Price scale now supports numbers with more than 10 decimal points.** +- **Timezone data has been updated.** + +**Bug Fixes** + +- **Chart type won't change when restoring default options.** The chart type will no longer change when restoring the default options within the chart settings dialog. +- **Last visible bar value in legend for overlay studies.** When `use_last_visible_bar_value_in_legend` featureset is enabled, overlay studies will display the value for the last visible item on the chart. This now matches the behavior for the main series. +- **Fixed zoom behavior for percentage right margin option.** Incorrect zooming behavior has been fixed for zoom buttons appearing on the chart, and the keyboard shortcuts. See `show_percent_option_for_right_margin` [featureset](https://www.tradingview.com/charting-library-docs/latest/customization/Featuresets) for more information. + +**Documentation** + +- **Add FAQ about unsubscribeBars delay.** Added [a new FAQ](https://www.tradingview.com/charting-library-docs/latest/getting_started/Frequently-Asked-Questions) about [`unsubscribeBars`](https://www.tradingview.com/charting-library-docs/latest/connecting_data/Datafeed-API#unsubscribebars) being called with a delay. + +**Other** + +- **Added symbol information to datafeed error messages.** Added symbol information to realtime subscription error messages to improve the developer experience. +- **Updated localisation list.** The [list of support localisations](https://www.tradingview.com/charting-library-docs/latest/core_concepts/Localization) has been updated. Additionally, the chart will now fallback to english (with a console warning) if an unsupported locale is specified in the widget constructor options. + +## Version 24.002 + +**New Features** + +- **Added support for specifying custom timezones.** + - Additional custom timezones can now be specified for use within the library. Please see the [Adding Custom Timezones](../ui_elements/timezones#adding-custom-timezones) section within the Timezones page. +- **Images within timescale marks.** + - Timescale marks now support the rendering of images within the circular shape by specifying the `imageUrl` property. Please see the [TimescaleMark](../api/interfaces/Charting_Library.TimescaleMark) interface for more details. +- **Support different margin rates for different order types.** [6607](https://github.com/tradingview/charting_library/issues/6607) + - `marginRate` has been deprecated + - A [`supportLeverageButton`](../api/interfaces/Broker.BrokerConfigFlags#supportleveragebutton) flag that displays a leverage button has been added to the Broker configuration. + - The [`supportLeverage`](../api/interfaces/Broker.BrokerConfigFlags#supportleverage) flag enables leverage calculation by getting information from `leverageInfo`. + +**Enhancements** + +- Add horizontal line at 0 for Momentum study. + +**Bug fixes** + +- [`setUserEditEnabled`](../api/interfaces/Charting_Library.IStudyApi#setusereditenabled) does not hide 3 dots in Legend. [6765](https://github.com/tradingview/charting_library/issues/6765) | [6165](https://github.com/tradingview/charting_library/issues/6165) + + widget.activeChart().getAllStudies().forEach(({ id }) => { + console.log(id); + tvWidget.activeChart().getStudyById(id).setUserEditEnabled(false); + }); + + - setUserEditEnabled(false) should mask all icons except the "eye". + - setUserEditEnabled(true) should restore all the icons. +- `priceFormatter` could previously only be used for main series. `priceFormatter` now applies to secondary series as well. +- `right_toolbar` featureset didn't have a default `on` value. +- Empty time frames at the bottom toolbar if `data_status: endofday` +- Export data doesn’t include projected data. + - Projected data can be included by setting [`includeOffsetStudyValues`](../api/interfaces/Charting_Library.ExportDataOptions#includeoffsetstudyvalues) to `true`. + - `await widget.activeChart().exportData({ includeOffsetStudyValues: true });` +- Highest PineJS.Std function doesn’t work correctly with negative numbers. +- Missing types in bundled definition file. [7445](https://github.com/tradingview/charting_library/issues/7445) | [7446](https://github.com/tradingview/charting_library/issues/7446) +- Exposing `icon` prop in `CreateShapeOptionsBase`. [6723](https://github.com/tradingview/charting_library/issues/6723) +- Wrong extended session background color [7443](https://github.com/tradingview/charting_library/issues/7443) + +**Documentation** + +- Added [migration guide](../trading_terminal/#how-to-migrate-from-charting-library) from TAC to CTP. +- Added additional documentation for [Drawings](../ui_elements/drawings/). +- Missing overrides in documentation. [7457](https://github.com/tradingview/charting_library/issues/7457) +- Updated documentation for [Marks](../ui_elements/Marks). +- Align ChartMetaInfo & ChartData. + +**Other** + +- Removed `Australia/ACT` from the list of [timezones](../ui_elements/timezones) within our documentation. Please use either the Sydney timezone or [specify your own custom timezone](../ui_elements/timezones#adding-custom-timezones). + +## Version 24.001 + +**New Features** + +- **Adding originalText as an additional field to UndoRedoState.** Event should mention the name of the action in plain English in addition to also being translated to the corresponding language. [UndoRedoState](@api/interfaces/Charting_Library.UndoRedoState#originalundotext) +- **Add the ability to change X-Axis margin % from Chart Properties.** A new [featureset](@docs/customization/Featuresets) has been added `show_percent_option_for_right_margin` that adds additional percentage option to the right margin section of the chart settings dialog. +- **Display rightmost visible value when in percent mode.** A new [featureset](@docs/customization/Featuresets) has been added `use_last_visible_bar_value_in_legend` to show the most recent “global” bar value. When this feature is enabled the rightmost bar in the visible range is used instead. +- **Ability to change on the fly the Currency and Unit label setting.** [currencyAndUnitVisibility API](@api/interfaces/Charting_Library.IChartingLibraryWidget#currencyandunitvisibility) +- **Add simple SSR support.** Allow the library to be imported within a NodeJS context. This improves support for frameworks such as Remix. +- **Added [`clearUndoHistory`](@api/interfaces/Charting_Library.IChartingLibraryWidget#clearundohistory).** + +**Improvements** + +- **Name to be used instead of ticker.** Allow a human friendly name to be returned from [`symbol_search_complete`](@api/interfaces/Charting_Library.ChartingLibraryWidgetOptions#symbol_search_complete). + +**Bug Fixes** + +- **Incomplete indicators when using Heikin-Ashi.** Indicator line should draw to all the visible data points. +- **Compare study doesn’t save and restore ticker name correctly.** The compare study should work for custom ticker names just like it does for ticker names which match our format (with the colon). +- **VPFR: Right point is automatically moving when dragging start point.** When drawing the VPFR, or moving one of the anchor points, it is expected that the right anchor point should not move one bar further to the right. +- **Selecting Apply Defaults option within chart settings doesn’t work.** Some Settings even if not validated are not restored to their original values when Apply Defaults is selected. +- **Decentralised app browser loading error.** Chart fails to load in wallet apps like MetaMask, Trust & Phantom. Enable the `iframe_loading_compatibility_mode` [featureset](@docs/customization/Featuresets) to enable compatibility with these browsers. +- **When disabled, widget bar still present a significant margin.** Even when there aren't any pages or widget in the right toolbar and IF right_toolbar is disabled, contrary to the drawing toolbar that vanishes the widget bar stays there with the pill button to expand it whereas there isn't anything to expand. +- **Can’t enable header_compare feature without header_symbol_search.** + - Disabling header_symbol_search should only hide the search button + - Disabling header_compare should only hide the compare button +- **Removed section of PostCSS syntax in bundled css files.** + +**Other** + +- **New Documentation site.** 🎉 +- **Add `shape` to TimeScale.** Shape property is described in [TimescaleMark interface](@api/interfaces/Charting_Library.TimescaleMark#shape). +- **Remove magnet icon near cursor.** + +## Version 24 + +- `preset` Widget-Constructor parameter has been removed. Users can still use some featuresets to mimic the same behavior by disabling the following list: + - `'left_toolbar', 'header_widget', 'timeframes_toolbar', 'edit_buttons_in_legend', 'context_menus', 'control_bar', 'border_around_the_chart'` +- `chart_style_hilo` featureset is now enabled by default. This adds the High-low option to chart style controls dropdown. This featureset has been available since 1.15 but was previously disabled by default. +- Added typings for custom indicators. Typescript equivalents of our existing examples are available here: [Custom Studies Typescript Examples](../custom_studies/Custom-Studies-Examples). +- [`symbol_search_complete`](../api/interfaces/Charting_Library.ChartingLibraryWidgetOptions#symbol_search_complete) has changed. The function now takes an additional search result object parameter, and returns an additional human-friendly symbol name. + +**UI changes** + +- With this version you will notice that the top toolbar has been redesigned with the following changes: + + - Button padding & separator size have been reduced + - Compare button has shifted next to Symbol + - Drawing icon is now more prominent + - New fullscreen icon + - Save button style better highlights when there's a change + - Top toolbar now extends to left & right edges + - UI font changes to a default system one + - Undo/redo buttons are now relocated next to the save button + +**Trading Terminal** + +- Default formatter `textNoWrap` has been removed. +- `columnId` field of [SortingParameters](../api/interfaces/Broker.SortingParameters) has been renamed to `property`. +- Required `id` field has been added to [column description](../api/interfaces/Broker.AccountManagerColumnBase#id). +- Type of `formatter` field in [column description](../api/interfaces/Broker.AccountManagerColumnBase#formatter) has been changed to [StandardFormatterName | FormatterName](../api/enums/Charting_Library.StandardFormatterName). +- `property` field has been removed from `column description`. Use [dataFields](../api/interfaces/Broker.AccountManagerColumnBase#datafields) field instead. +- Type of `formatter` field in [SummaryField](../api/interfaces/Broker.AccountManagerSummaryField) has been changed to [StandardFormatterName](../api/enums/Charting_Library.StandardFormatterName). + +## Older Versions + +For breaking changes on older versions of the library please consult this page: [Breaking Changes](https://github.com/tradingview/charting_library/wiki/Breaking-Changes) diff --git a/charting_library/bundles/2182.e89f57afaf29667aec87.js b/charting_library/bundles/2182.585826b4a9a58eaa7e4a.js similarity index 64% rename from charting_library/bundles/2182.e89f57afaf29667aec87.js rename to charting_library/bundles/2182.585826b4a9a58eaa7e4a.js index 9e391b26..7228292e 100644 --- a/charting_library/bundles/2182.e89f57afaf29667aec87.js +++ b/charting_library/bundles/2182.585826b4a9a58eaa7e4a.js @@ -4,11 +4,11 @@ text:i.t(null,void 0,l(40234))},m={keys:[r],text:i.t(null,void 0,l(68125))},h={k localizedName:s.lineToolsLocalizedNames.LineToolElliottTriangle},LineToolElliottTripleCombo:{icon:a.lineToolsIcons.LineToolElliottTripleCombo,localizedName:s.lineToolsLocalizedNames.LineToolElliottTripleCombo},LineToolEllipse:{icon:a.lineToolsIcons.LineToolEllipse,localizedName:s.lineToolsLocalizedNames.LineToolEllipse,hotKey:(0,n.hotKeySerialize)(m)},LineToolExtended:{icon:a.lineToolsIcons.LineToolExtended,localizedName:s.lineToolsLocalizedNames.LineToolExtended},LineToolFibChannel:{icon:a.lineToolsIcons.LineToolFibChannel,localizedName:s.lineToolsLocalizedNames.LineToolFibChannel},LineToolFibCircles:{icon:a.lineToolsIcons.LineToolFibCircles,localizedName:s.lineToolsLocalizedNames.LineToolFibCircles,hotKey:(0,n.hotKeySerialize)(m)},LineToolFibRetracement:{icon:a.lineToolsIcons.LineToolFibRetracement,localizedName:s.lineToolsLocalizedNames.LineToolFibRetracement},LineToolFibSpeedResistanceArcs:{icon:a.lineToolsIcons.LineToolFibSpeedResistanceArcs,localizedName:s.lineToolsLocalizedNames.LineToolFibSpeedResistanceArcs},LineToolFibSpeedResistanceFan:{icon:a.lineToolsIcons.LineToolFibSpeedResistanceFan,localizedName:s.lineToolsLocalizedNames.LineToolFibSpeedResistanceFan,hotKey:(0,n.hotKeySerialize)(h)},LineToolFibSpiral:{icon:a.lineToolsIcons.LineToolFibSpiral,localizedName:s.lineToolsLocalizedNames.LineToolFibSpiral},LineToolFibTimeZone:{icon:a.lineToolsIcons.LineToolFibTimeZone,localizedName:s.lineToolsLocalizedNames.LineToolFibTimeZone},LineToolFibWedge:{icon:a.lineToolsIcons.LineToolFibWedge,localizedName:s.lineToolsLocalizedNames.LineToolFibWedge},LineToolFlagMark:{icon:a.lineToolsIcons.LineToolFlagMark,localizedName:s.lineToolsLocalizedNames.LineToolFlagMark},LineToolImage:{icon:a.lineToolsIcons.LineToolImage,localizedName:s.lineToolsLocalizedNames.LineToolImage},LineToolFlatBottom:{icon:a.lineToolsIcons.LineToolFlatBottom,localizedName:s.lineToolsLocalizedNames.LineToolFlatBottom,hotKey:(0,n.hotKeySerialize)(L)},LineToolAnchoredVWAP:{icon:a.lineToolsIcons.LineToolAnchoredVWAP,localizedName:s.lineToolsLocalizedNames.LineToolAnchoredVWAP},LineToolGannComplex:{icon:a.lineToolsIcons.LineToolGannComplex,localizedName:s.lineToolsLocalizedNames.LineToolGannComplex},LineToolGannFixed:{icon:a.lineToolsIcons.LineToolGannFixed,localizedName:s.lineToolsLocalizedNames.LineToolGannFixed},LineToolGannFan:{icon:a.lineToolsIcons.LineToolGannFan,localizedName:s.lineToolsLocalizedNames.LineToolGannFan},LineToolGannSquare:{icon:a.lineToolsIcons.LineToolGannSquare,localizedName:s.lineToolsLocalizedNames.LineToolGannSquare,hotKey:(0,n.hotKeySerialize)({keys:[r],text:i.t(null,void 0,l(10289))})},LineToolHeadAndShoulders:{icon:a.lineToolsIcons.LineToolHeadAndShoulders,localizedName:s.lineToolsLocalizedNames.LineToolHeadAndShoulders},LineToolHorzLine:{icon:a.lineToolsIcons.LineToolHorzLine,localizedName:s.lineToolsLocalizedNames.LineToolHorzLine,hotKey:(0,n.hotKeySerialize)({keys:[d,"H"],text:"{0} + {1}"})},LineToolHorzRay:{icon:a.lineToolsIcons.LineToolHorzRay,localizedName:s.lineToolsLocalizedNames.LineToolHorzRay},LineToolIcon:{ icon:a.lineToolsIcons.LineToolIcon,localizedName:s.lineToolsLocalizedNames.LineToolIcon},LineToolEmoji:{icon:a.lineToolsIcons.LineToolEmoji,localizedName:s.lineToolsLocalizedNames.LineToolEmoji},LineToolInsidePitchfork:{icon:a.lineToolsIcons.LineToolInsidePitchfork,localizedName:s.lineToolsLocalizedNames.LineToolInsidePitchfork},LineToolNote:{icon:a.lineToolsIcons.LineToolNote,localizedName:s.lineToolsLocalizedNames.LineToolNote},LineToolNoteAbsolute:{icon:a.lineToolsIcons.LineToolNoteAbsolute,localizedName:s.lineToolsLocalizedNames.LineToolNoteAbsolute},LineToolSignpost:{icon:a.lineToolsIcons.LineToolSignpost,localizedName:s.lineToolsLocalizedNames.LineToolSignpost},LineToolParallelChannel:{icon:a.lineToolsIcons.LineToolParallelChannel,localizedName:s.lineToolsLocalizedNames.LineToolParallelChannel,hotKey:(0,n.hotKeySerialize)(L)},LineToolPitchfan:{icon:a.lineToolsIcons.LineToolPitchfan,localizedName:s.lineToolsLocalizedNames.LineToolPitchfan},LineToolPitchfork:{icon:a.lineToolsIcons.LineToolPitchfork,localizedName:s.lineToolsLocalizedNames.LineToolPitchfork},LineToolPolyline:{icon:a.lineToolsIcons.LineToolPolyline,localizedName:s.lineToolsLocalizedNames.LineToolPolyline},LineToolPath:{icon:a.lineToolsIcons.LineToolPath,localizedName:s.lineToolsLocalizedNames.LineToolPath},LineToolPrediction:{icon:a.lineToolsIcons.LineToolPrediction,localizedName:s.lineToolsLocalizedNames.LineToolPrediction},LineToolPriceLabel:{icon:a.lineToolsIcons.LineToolPriceLabel,localizedName:s.lineToolsLocalizedNames.LineToolPriceLabel},LineToolPriceNote:{icon:a.lineToolsIcons.LineToolPriceNote,localizedName:s.lineToolsLocalizedNames.LineToolPriceNote,hotKey:(0,n.hotKeySerialize)(L)},LineToolArrowMarker:{icon:a.lineToolsIcons.LineToolArrowMarker,localizedName:s.lineToolsLocalizedNames.LineToolArrowMarker},LineToolPriceRange:{icon:a.lineToolsIcons.LineToolPriceRange,localizedName:s.lineToolsLocalizedNames.LineToolPriceRange},LineToolProjection:{icon:a.lineToolsIcons.LineToolProjection,localizedName:s.lineToolsLocalizedNames.LineToolProjection},LineToolRay:{icon:a.lineToolsIcons.LineToolRay,localizedName:s.lineToolsLocalizedNames.LineToolRay},LineToolRectangle:{icon:a.lineToolsIcons.LineToolRectangle,localizedName:s.lineToolsLocalizedNames.LineToolRectangle,hotKey:(0,n.hotKeySerialize)({keys:[r],text:i.t(null,void 0,l(81591))})},LineToolCircle:{icon:a.lineToolsIcons.LineToolCircle,localizedName:s.lineToolsLocalizedNames.LineToolCircle},LineToolRegressionTrend:{icon:a.lineToolsIcons.LineToolRegressionTrend,localizedName:s.lineToolsLocalizedNames.LineToolRegressionTrend},LineToolRiskRewardLong:{icon:a.lineToolsIcons.LineToolRiskRewardLong,localizedName:s.lineToolsLocalizedNames.LineToolRiskRewardLong},LineToolRiskRewardShort:{icon:a.lineToolsIcons.LineToolRiskRewardShort,localizedName:s.lineToolsLocalizedNames.LineToolRiskRewardShort},LineToolFixedRangeVolumeProfile:{icon:a.lineToolsIcons.LineToolFixedRangeVolumeProfile,localizedName:s.lineToolsLocalizedNames.LineToolFixedRangeVolumeProfile},LineToolRotatedRectangle:{ icon:a.lineToolsIcons.LineToolRotatedRectangle,localizedName:s.lineToolsLocalizedNames.LineToolRotatedRectangle,hotKey:(0,n.hotKeySerialize)(L)},LineToolSchiffPitchfork:{icon:a.lineToolsIcons.LineToolSchiffPitchfork,localizedName:s.lineToolsLocalizedNames.LineToolSchiffPitchfork},LineToolSchiffPitchfork2:{icon:a.lineToolsIcons.LineToolSchiffPitchfork2,localizedName:s.lineToolsLocalizedNames.LineToolSchiffPitchfork2},LineToolSineLine:{icon:a.lineToolsIcons.LineToolSineLine,localizedName:s.lineToolsLocalizedNames.LineToolSineLine},LineToolText:{icon:a.lineToolsIcons.LineToolText,localizedName:s.lineToolsLocalizedNames.LineToolText},LineToolTextAbsolute:{icon:a.lineToolsIcons.LineToolTextAbsolute,localizedName:s.lineToolsLocalizedNames.LineToolTextAbsolute},LineToolThreeDrivers:{icon:a.lineToolsIcons.LineToolThreeDrivers,localizedName:s.lineToolsLocalizedNames.LineToolThreeDrivers},LineToolTimeCycles:{icon:a.lineToolsIcons.LineToolTimeCycles,localizedName:s.lineToolsLocalizedNames.LineToolTimeCycles},LineToolTrendAngle:{icon:a.lineToolsIcons.LineToolTrendAngle,localizedName:s.lineToolsLocalizedNames.LineToolTrendAngle,hotKey:(0,n.hotKeySerialize)(L)},LineToolTrendBasedFibExtension:{icon:a.lineToolsIcons.LineToolTrendBasedFibExtension,localizedName:s.lineToolsLocalizedNames.LineToolTrendBasedFibExtension},LineToolTrendBasedFibTime:{icon:a.lineToolsIcons.LineToolTrendBasedFibTime,localizedName:s.lineToolsLocalizedNames.LineToolTrendBasedFibTime},LineToolTrendLine:{icon:a.lineToolsIcons.LineToolTrendLine,localizedName:s.lineToolsLocalizedNames.LineToolTrendLine,hotKey:(0,n.hotKeySerialize)(L)},LineToolInfoLine:{icon:a.lineToolsIcons.LineToolInfoLine,localizedName:s.lineToolsLocalizedNames.LineToolInfoLine},LineToolTriangle:{icon:a.lineToolsIcons.LineToolTriangle,localizedName:s.lineToolsLocalizedNames.LineToolTriangle},LineToolTrianglePattern:{icon:a.lineToolsIcons.LineToolTrianglePattern,localizedName:s.lineToolsLocalizedNames.LineToolTrianglePattern},LineToolVertLine:{icon:a.lineToolsIcons.LineToolVertLine,localizedName:s.lineToolsLocalizedNames.LineToolVertLine,hotKey:(0,n.hotKeySerialize)({keys:[d,"V"],text:"{0} + {1}"})},LineToolCrossLine:{icon:a.lineToolsIcons.LineToolCrossLine,localizedName:s.lineToolsLocalizedNames.LineToolCrossLine},LineToolHighlighter:{icon:a.lineToolsIcons.LineToolHighlighter,localizedName:s.lineToolsLocalizedNames.LineToolHighlighter},SyncDrawing:{icon:t.drawingToolsIcons.SyncDrawing,iconActive:t.drawingToolsIcons.SyncDrawingActive,localizedName:i.t(null,void 0,l(36551))},arrow:{icon:t.drawingToolsIcons.arrow,localizedName:i.t(null,void 0,l(96237))},cursor:{icon:t.drawingToolsIcons.cursor,localizedName:i.t(null,void 0,l(29908))},dot:{icon:t.drawingToolsIcons.dot,localizedName:i.t(null,void 0,l(60925))},drawginmode:{icon:t.drawingToolsIcons.drawginmode,iconActive:t.drawingToolsIcons.drawginmodeActive,localizedName:i.t(null,void 0,l(49421))},eraser:{icon:t.drawingToolsIcons.eraser,localizedName:i.t(null,void 0,l(99289))},group:{icon:t.drawingToolsIcons.group, -localizedName:i.t(null,void 0,l(91977))},hideAllDrawings:{icon:t.drawingToolsIcons.hideAllDrawings,iconActive:t.drawingToolsIcons.hideAllDrawingsActive,localizedName:i.t(null,void 0,l(17517)),hotKey:(0,n.hotKeySerialize)({keys:[T,d,"H"],text:"{0} + {1} + {2}"})},lockAllDrawings:{icon:t.drawingToolsIcons.lockAllDrawings,iconActive:t.drawingToolsIcons.lockAllDrawingsActive,localizedName:i.t(null,void 0,l(37057))},magnet:{icon:t.drawingToolsIcons.magnet,localizedName:i.t(null,void 0,l(37140)),hotKey:(0,n.hotKeySerialize)({keys:[T],text:"{0}"})},measure:{icon:t.drawingToolsIcons.measure,localizedName:i.t(null,void 0,l(59607)),hotKey:(0,n.hotKeySerialize)({keys:[r],text:i.t(null,void 0,l(32868))})},removeAllDrawingTools:{icon:t.drawingToolsIcons.removeAllDrawingTools,localizedName:i.t(null,void 0,l(76091))},showObjectsTree:{icon:t.drawingToolsIcons.showObjectTree,localizedName:i.t(null,void 0,l(51072))},zoom:{icon:t.drawingToolsIcons.zoom,localizedName:i.t(null,void 0,l(38925))},"zoom-out":{icon:t.drawingToolsIcons["zoom-out"],localizedName:i.t(null,void 0,l(49895))}};v.LineToolGhostFeed={icon:a.lineToolsIcons.LineToolGhostFeed,localizedName:s.lineToolsLocalizedNames.LineToolGhostFeed}},65383:(o,e,l)=>{"use strict";l.d(e,{LinetoolsFavoritesStore:()=>c});var i=l(26867),n=l.n(i),a=l(56840);const t=["LineToolBalloon"];var s,c;!function(o){function e(){o.favorites=[];let e=!1;(0,a.getJSON)("chart.favoriteDrawings",[]).forEach(((i,n)=>{const a=i.tool||i;l(a)?t.includes(a)?e=!0:o.favorites.push(a):"LineToolTweet"===a&&(o.tweetToolPosition=n)})),e&&i(),o.favoritesSynced.fire()}function l(o){return"string"==typeof o&&""!==o&&!0}function i(e){const l=o.favorites.slice();null!==o.tweetToolPosition&&l.splice(o.tweetToolPosition,0,"LineToolTweet"),(0,a.setJSON)("chart.favoriteDrawings",l,e)}o.favorites=[],o.favoritesSynced=new(n()),o.tweetToolPosition=null,o.favoriteIndex=function(e){return o.favorites.indexOf(e)},o.isValidLineToolName=l,o.saveFavorites=i,e(),a.onSync.subscribe(null,e)}(s||(s={})),function(o){function e(o){return s.isValidLineToolName(o)}function l(){return s.favorites.length}function i(o){return-1!==s.favoriteIndex(o)}o.favoriteAdded=new(n()),o.favoriteRemoved=new(n()),o.favoriteMoved=new(n()),o.favoritesSynced=s.favoritesSynced,o.favorites=function(){return s.favorites.slice()},o.isValidLineToolName=e,o.favoritesCount=l,o.favorite=function(o){return o<0||o>=l()?"":s.favorites[o]},o.addFavorite=function(l,n){return!(i(l)||!e(l))&&(s.favorites.push(l),s.saveFavorites(n),o.favoriteAdded.fire(l),!0)},o.removeFavorite=function(e,l){const i=s.favoriteIndex(e);if(-1===i)return!1;s.favorites.splice(i,1);const n=s.tweetToolPosition;return null!==n&&n>i&&(s.tweetToolPosition=n-1),s.saveFavorites(l),o.favoriteRemoved.fire(e),!0},o.isFavorite=i,o.moveFavorite=function(i,n,a){if(n<0||n>=l()||!e(i))return!1;const t=s.favoriteIndex(i);if(-1===t||n===t)return!1;let c=s.tweetToolPosition;return null!==c&&(tc?c--:nc&&c++,s.tweetToolPosition=c),s.favorites.splice(t,1),s.favorites.splice(n,0,i),s.saveFavorites(a), -o.favoriteMoved.fire(i,t,n),!0}}(c||(c={}))},19799:o=>{o.exports=''},63743:o=>{o.exports=''},18953:o=>{o.exports=''},72196:o=>{o.exports=''},1532:o=>{o.exports=''},53950:o=>{o.exports=''},27999:o=>{ -o.exports=''},10862:o=>{o.exports=''},68385:o=>{o.exports=''},88518:o=>{o.exports=''},36515:o=>{o.exports=''},7636:o=>{o.exports=''},46049:o=>{ -o.exports=''},99088:o=>{o.exports=''},42650:o=>{o.exports=''},75895:o=>{ -o.exports=''},65162:o=>{o.exports=''},65186:o=>{ -o.exports=''},91244:o=>{o.exports=''},45820:o=>{o.exports=''},93756:o=>{ +localizedName:i.t(null,void 0,l(91977))},hideAllDrawings:{icon:t.drawingToolsIcons.hideAllDrawings,iconActive:t.drawingToolsIcons.hideAllDrawingsActive,localizedName:i.t(null,void 0,l(17517)),hotKey:(0,n.hotKeySerialize)({keys:[T,d,"H"],text:"{0} + {1} + {2}"})},lockAllDrawings:{icon:t.drawingToolsIcons.lockAllDrawings,iconActive:t.drawingToolsIcons.lockAllDrawingsActive,localizedName:i.t(null,void 0,l(37057))},magnet:{icon:t.drawingToolsIcons.magnet,localizedName:i.t(null,void 0,l(37140)),hotKey:(0,n.hotKeySerialize)({keys:[T],text:"{0}"})},measure:{icon:t.drawingToolsIcons.measure,localizedName:i.t(null,void 0,l(59607)),hotKey:(0,n.hotKeySerialize)({keys:[r],text:i.t(null,void 0,l(32868))})},removeAllDrawingTools:{icon:t.drawingToolsIcons.removeAllDrawingTools,localizedName:i.t(null,void 0,l(76091))},showObjectsTree:{icon:t.drawingToolsIcons.showObjectTree,localizedName:i.t(null,void 0,l(51072))},zoom:{icon:t.drawingToolsIcons.zoom,localizedName:i.t(null,void 0,l(38925))},"zoom-out":{icon:t.drawingToolsIcons["zoom-out"],localizedName:i.t(null,void 0,l(49895))}};v.LineToolGhostFeed={icon:a.lineToolsIcons.LineToolGhostFeed,localizedName:s.lineToolsLocalizedNames.LineToolGhostFeed}},65383:(o,e,l)=>{"use strict";l.d(e,{LinetoolsFavoritesStore:()=>c});var i=l(26867),n=l.n(i),a=l(56840);const t=["LineToolBalloon"];var s,c;!function(o){function e(){var e,n;o.favorites=[];let s=!1;const c=Boolean(void 0===(0,a.getValue)("chart.favoriteDrawings")),r=(0,a.getJSON)("chart.favoriteDrawings",[]);if(0===r.length&&c&&"undefined"!=typeof window){const o=JSON.parse(null!==(n=null===(e=window.urlParams)||void 0===e?void 0:e.favorites)&&void 0!==n?n:"{}").drawingTools;o&&Array.isArray(o)&&r.push(...o)}r.forEach(((e,i)=>{const n=e.tool||e;l(n)?t.includes(n)?s=!0:o.favorites.push(n):"LineToolTweet"===n&&(o.tweetToolPosition=i)})),s&&i(),o.favoritesSynced.fire()}function l(o){return"string"==typeof o&&""!==o&&!0}function i(e){const l=o.favorites.slice();null!==o.tweetToolPosition&&l.splice(o.tweetToolPosition,0,"LineToolTweet"),(0,a.setJSON)("chart.favoriteDrawings",l,e)}o.favorites=[],o.favoritesSynced=new(n()),o.tweetToolPosition=null,o.favoriteIndex=function(e){return o.favorites.indexOf(e)},o.isValidLineToolName=l,o.saveFavorites=i,e(),a.onSync.subscribe(null,e)}(s||(s={})),function(o){function e(o){return s.isValidLineToolName(o)}function l(){return s.favorites.length}function i(o){return-1!==s.favoriteIndex(o)}o.favoriteAdded=new(n()),o.favoriteRemoved=new(n()),o.favoriteMoved=new(n()),o.favoritesSynced=s.favoritesSynced,o.favorites=function(){return s.favorites.slice()},o.isValidLineToolName=e,o.favoritesCount=l,o.favorite=function(o){return o<0||o>=l()?"":s.favorites[o]},o.addFavorite=function(l,n){return!(i(l)||!e(l))&&(s.favorites.push(l),s.saveFavorites(n),o.favoriteAdded.fire(l),!0)},o.removeFavorite=function(e,l){const i=s.favoriteIndex(e);if(-1===i)return!1;s.favorites.splice(i,1);const n=s.tweetToolPosition;return null!==n&&n>i&&(s.tweetToolPosition=n-1),s.saveFavorites(l),o.favoriteRemoved.fire(e),!0},o.isFavorite=i, +o.moveFavorite=function(i,n,a){if(n<0||n>=l()||!e(i))return!1;const t=s.favoriteIndex(i);if(-1===t||n===t)return!1;let c=s.tweetToolPosition;return null!==c&&(tc?c--:nc&&c++,s.tweetToolPosition=c),s.favorites.splice(t,1),s.favorites.splice(n,0,i),s.saveFavorites(a),o.favoriteMoved.fire(i,t,n),!0}}(c||(c={}))},19799:o=>{o.exports=''},63743:o=>{o.exports=''},18953:o=>{o.exports=''},72196:o=>{o.exports=''},1532:o=>{o.exports=''},53950:o=>{ +o.exports=''},27999:o=>{o.exports=''},10862:o=>{o.exports=''},68385:o=>{o.exports=''},88518:o=>{o.exports=''},36515:o=>{ +o.exports=''},7636:o=>{o.exports=''},46049:o=>{o.exports=''},99088:o=>{o.exports=''},42650:o=>{ +o.exports=''},75895:o=>{o.exports=''},65162:o=>{ +o.exports=''},65186:o=>{o.exports=''},91244:o=>{o.exports=''},45820:o=>{o.exports=''},93756:o=>{ o.exports=''},42321:o=>{o.exports=''},57313:o=>{ o.exports=''},6894:o=>{o.exports=''},45360:o=>{o.exports=''},14665:o=>{o.exports=''},39146:o=>{o.exports=''},48010:o=>{o.exports=''}}]); \ No newline at end of file diff --git a/charting_library/bundles/4618.21b8783f87efce82d094.js b/charting_library/bundles/4618.e46ad0a894862e22afb5.js similarity index 94% rename from charting_library/bundles/4618.21b8783f87efce82d094.js rename to charting_library/bundles/4618.e46ad0a894862e22afb5.js index ad4505fe..d68c238c 100644 --- a/charting_library/bundles/4618.21b8783f87efce82d094.js +++ b/charting_library/bundles/4618.e46ad0a894862e22afb5.js @@ -20,7 +20,7 @@ return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},77973:(e,t,n)=>{"u null==(e=i(e,t))||delete e[(0,a.default)(u(t))]};const c=function(e,t){return null==e||s(e,t)}},64531:(e,t)=>{"use strict";var n,r=!("undefined"==typeof window||!window.document||!window.document.createElement);function u(){if(n)return n;if(!r||!window.document.body)return"indeterminate";var e=window.document.createElement("div");return e.appendChild(document.createTextNode("ABCD")),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),n="reverse",e.scrollLeft>0?n="default":(e.scrollLeft=1,0===e.scrollLeft&&(n="negative")),document.body.removeChild(e),n}t.detectScrollType=u,t.getNormalizedScrollLeft=function(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;var r=u();if("indeterminate"===r)return Number.NaN;switch(r){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n}return n}},32563:(e,t,n)=>{"use strict";n.d(t,{mobiletouch:()=>u,touch:()=>o,setClasses:()=>d});var r=n(5325);const u=r.mobiletouch,o=r.touch;function d(){document.documentElement.classList.add(r.touch?"feature-touch":"feature-no-touch",r.mobiletouch?"feature-mobiletouch":"feature-no-mobiletouch")}},49483:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isMac:()=>o,isWindows:()=>d,isLinux:()=>i,isDesktopApp:()=>a,desktopAppVersion:()=>s,appVersion:()=>c,CheckMobile:()=>f,onWidget:()=>l,supportTouch:()=>_,checkPageType:()=>h,isChrome:()=>p,isFF:()=>b,isEdge:()=>v,isSafari:()=>g,className:()=>m,onOrder:()=>y,onGoPro:()=>w,onMainPage:()=>x});var r=n(5325);const u=window.TradingView=window.TradingView||{};function o(){return r.isMac}function d(){return r.isWindows}function i(){return r.isLinux}function a(){return/TVDesktop/i.test(navigator.userAgent)}function s(){const e=navigator.userAgent.match(/TVDesktop\/([^\s]+)/);return e&&e[1]}function c(){const e=navigator.userAgent.match(/TradingView\/([^\s]+)/);return e&&e[1]}const f={Android:()=>r.isAndroid,BlackBerry:()=>r.isBlackBerry,iOS:()=>r.isIOS,Opera:()=>r.isOperaMini,isIPad:()=>r.isIPad,any:()=>r.isAnyMobile};function l(){ const e=["^widgetembed/?$","^cmewidgetembed/?$","^([0-9a-zA-Z-]+)/widgetembed/?$","^([0-9a-zA-Z-]+)/widgetstatic/?$","^([0-9a-zA-Z-]+)?/?miniwidgetembed/?$","^([0-9a-zA-Z-]+)?/?mediumwidgetembed/?$","^twitter-chart/?$","^embed(-static)?/([0-9a-zA-Z]{8})/?$","^widgetpopup/?$","^extension/?$","^chatwidgetembed/?$","^ideaswidgetembed/?$","^ideas-widget/?$","^view-idea-widget/([0-9a-zA-Z]{8})/?$","^idea-popup/?$","^hotlistswidgetembed/?$","^([0-9a-zA-Z-]+)/hotlistswidgetembed/?$","^marketoverviewwidgetembed/?$","^([0-9a-zA-Z-]+)/marketoverviewwidgetembed/?$","^eventswidgetembed/?$","^tickerswidgetembed/?$","^forexcrossrateswidgetembed/?$","^forexheatmapwidgetembed/?$","^marketquoteswidgetembed/?$","^screenerwidget/?$","^cryptomktscreenerwidget/?$","^([0-9a-zA-Z-]+)/cryptomktscreenerwidget/?$","^([0-9a-zA-Z-]+)/marketquoteswidgetembed/?$","^technical-analysis-widget-embed/$","^singlequotewidgetembed/?$","^([0-9a-zA-Z-]+)/singlequotewidgetembed/?$","^embed-widget/([0-9a-zA-Z-]+)/(([0-9a-zA-Z-]+)/)?$"],t=window.location.pathname.replace(/^\//,"");let n;for(let r=e.length-1;r>=0;r--)if(n=new RegExp(e[r]),n.test(t))return!0;return!1}function _(){return r.mobiletouch||r.touch||r.isAnyMobile}function h(e){return new URLSearchParams(window.location.search).get("page_type")===e}u.isMobile=f,u.onWidget=l;const p=r.isChrome,b=r.isFF,v=r.isEdge,g=r.isSafari;function m(e){for(const[t,n]of Object.entries(u))if(n===e)return t;return null}function y(){return"/order/"===window.location.pathname}function w(){return"/gopro/"===window.location.pathname}function x(){return"/"===window.location.pathname}u.className=m},28865:(e,t,n)=>{"use strict";n.d(t,{getIsoLanguageCodeFromLanguage:()=>u});const r={ar_AE:"ar",br:"pt",de_DE:"de",ca_ES:"ca",he_IL:"he",id_ID:"id",in:"en",kr:"ko",ms_MY:"ms",sv_SE:"sv",th_TH:"th",uk:"en",vi_VN:"vi",zh_CN:"zh-Hans",zh_TW:"zh-Hant",zh:"zh-Hans"};function u(e){return r[e]||e}},87795:e=>{"use strict";const t=55296,n=127995,r=127999,u=[776,2359,2359,2367,2367,2984,3007,3021,3633,3635,3648,3657,4352,4449,4520];function o(e){if("string"!=typeof e)throw new Error("string cannot be undefined or null");const t=[];let n=0,r=0;for(;n=t&&e<=n}e.exports=o,e.exports.substr=function(e,t,n){const r=o(e);if(void 0===t)return e;if(t>=r.length)return"";const u=r.length-t ;let d=t+(void 0===n?u:n);return d>t+u&&(d=void 0),r.slice(t,d).join("")}},2484:(e,t,n)=>{"use strict";n.r(t),n.d(t,{disable:()=>f,enable:()=>c,enabled:()=>a,getAllFeatures:()=>l,setEnabled:()=>s}) -;const r=JSON.parse('{"14851":{},"custom_items_in_context_menu":{},"countdown":{},"symbol_search_parser_mixin":{},"pay_attention_to_ticker_not_symbol":{},"graying_disabled_tools_enabled":{},"update_study_formatter_on_symbol_resolve":{},"constraint_dialogs_movement":{},"phone_verification":{},"show_trading_notifications_history":{},"show_interval_dialog_on_key_press":{},"header_interval_dialog_button":{"subsets":["show_interval_dialog_on_key_press"]},"header_fullscreen_button":{},"header_symbol_search":{},"symbol_search_hot_key":{},"header_resolutions":{"subsets":["header_interval_dialog_button"]},"header_chart_type":{},"header_settings":{},"header_indicators":{},"header_compare":{},"header_undo_redo":{},"header_screenshot":{},"header_saveload":{},"study_on_study":{},"scales_date_format":{},"scales_time_hours_format":{},"header_widget":{"subsets":["header_widget_dom_node","header_symbol_search","header_resolutions","header_chart_type","header_settings","header_indicators","header_compare","header_undo_redo","header_fullscreen_button","compare_symbol","header_screenshot"]},"legend_widget":{},"compare_symbol":{"subsets":["header_compare"]},"property_pages":{"subsets":["show_chart_property_page","chart_property_page"]},"show_chart_property_page":{},"chart_property_page":{"subsets":["chart_property_page_scales","chart_property_page_trading","chart_property_page_right_margin_editor"]},"left_toolbar":{},"right_toolbar":{},"hide_left_toolbar_by_default":{},"control_bar":{},"widget_logo":{},"timeframes_toolbar":{},"edit_buttons_in_legend":{"subsets":["show_hide_button_in_legend","format_button_in_legend","study_buttons_in_legend","delete_button_in_legend"]},"show_hide_button_in_legend":{},"object_tree_legend_mode":{},"format_button_in_legend":{},"study_buttons_in_legend":{},"delete_button_in_legend":{},"broker_button":{},"buy_sell_buttons":{"subsets":["broker_button"]},"pane_context_menu":{},"scales_context_menu":{},"legend_context_menu":{},"context_menus":{"subsets":["pane_context_menu","scales_context_menu","legend_context_menu","objects_tree_context_menu"]},"items_favoriting":{},"save_chart_properties_to_local_storage":{},"use_localstorage_for_settings":{"subsets":["items_favoriting","save_chart_properties_to_local_storage"]},"handle_scale":{"subsets":["mouse_wheel_scale","pinch_scale","axis_pressed_mouse_move_scale"]},"handle_scroll":{"subsets":["mouse_wheel_scroll","pressed_mouse_move_scroll","horz_touch_drag_scroll","vert_touch_drag_scroll"]},"plain_studymarket":{},"disable_resolution_rebuild":{},"border_around_the_chart":{},"charting_library_debug_mode":{},"saveload_requires_authentication":{},"saveload_storage_customization":{},"volume_force_overlay":{},"create_volume_indicator_by_default":{},"create_volume_indicator_by_default_once":{},"saved_charts_count_restriction":{},"lean_chart_load":{},"stop_study_on_restart":{},"star_some_intervals_by_default":{},"move_logo_to_main_pane":{},"show_animated_logo":{},"link_to_tradingview":{},"logo_without_link":{},"logo_always_maximized":{},"right_bar_stays_on_scroll":{},"chart_content_overrides_by_defaults":{},"snapshot_trading_drawings":{},"allow_supported_resolutions_set_only":{},"widgetbar_tabs":{"subsets":["right_toolbar"]},"show_object_tree":{"subsets":["right_toolbar"]},"dom_widget":{"subsets":["right_toolbar"]},"collapsible_header":{},"study_templates":{},"side_toolbar_in_fullscreen_mode":{},"header_in_fullscreen_mode":{},"remove_library_container_border":{},"whotrades_auth_only":{},"support_multicharts":{},"display_market_status":{},"display_data_mode":{},"datasource_copypaste":{},"drawing_templates":{"subsets":["linetoolpropertieswidget_template_button"]},"expand_symbolsearch_items":{},"symbol_search_three_columns_exchanges":{},"symbol_search_flags":{},"symbol_search_limited_exchanges":{},"bugreport_button":{"subsets":["right_toolbar"]},"footer_publish_idea_button":{},"text_notes":{},"show_source_code":{},"symbol_info":{},"no_bars_status":{},"clear_bars_on_series_error":{},"hide_loading_screen_on_series_error":{},"seconds_resolution":{},"dont_show_boolean_study_arguments":{},"hide_last_na_study_output":{},"price_scale_always_last_bar_value":{},"study_dialog_fundamentals_economy_addons":{},"uppercase_instrument_names":{},"trading_notifications":{},"chart_crosshair_menu":{},"japanese_chart_styles":{},"hide_series_legend_item":{},"hide_study_overlay_legend_item":{},"hide_study_compare_legend_item":{},"linetoolpropertieswidget_template_button":{},"use_overrides_for_overlay":{},"timezone_menu":{},"main_series_scale_menu":{},"show_login_dialog":{},"remove_img_from_rss":{},"bars_marks":{},"chart_scroll":{},"chart_zoom":{},"source_selection_markers":{},"low_density_bars":{},"end_of_period_timescale_marks":{},"open_account_manager":{},"show_order_panel_on_start":{},"order_panel":{"subsets":["order_panel_close_button","order_panel_undock","right_toolbar","order_info"]},"multiple_watchlists":{},"watchlist_import_export":{},"study_overlay_compare_legend_option":{},"custom_resolutions":{},"referral_program_for_widget_owners":{},"mobile_trading":{},"real_brokers":{},"no_min_chart_width":{},"lock_visible_time_range_on_resize":{},"pricescale_currency":{},"cropped_tick_marks":{},"trading_account_manager":{},"disable_sameinterval_aligning":{},"display_legend_on_all_charts":{},"chart_style_hilo":{},"chart_style_hilo_last_price":{},"pricescale_unit":{},"show_spread_operators":{},"hide_exponentiation_spread_operator":{},"hide_reciprocal_spread_operator":{},"compare_symbol_search_spread_operators":{},"studies_symbol_search_spread_operators":{},"hide_resolution_in_legend":{},"hide_unresolved_symbols_in_legend":{},"fix_left_edge":{},"study_symbol_ticker_description":{},"two_character_bar_marks_labels":{},"tick_resolution":{},"secondary_series_extend_time_scale":{},"hide_volume_ma":{},"small_no_display":{},"charting_library_single_symbol_request":{},"use_ticker_on_symbol_info_update":{},"show_zoom_and_move_buttons_on_touch":{},"hide_main_series_symbol_from_indicator_legend":{},"chart_hide_close_position_button":{},"chart_hide_close_order_button":{},"hide_price_scale_global_last_bar_value":{"subsets":["use_last_visible_bar_value_in_legend"]},"keep_object_tree_widget_in_right_toolbar":{},"show_average_close_price_line_and_label":{},"hide_image_invalid_symbol":{},"hide_object_tree_and_price_scale_exchange_label":{},"confirm_overwrite_if_chart_layout_with_name_exists":{},"determine_first_data_request_size_using_visible_range":{},"use_na_string_for_not_available_values":{},"show_last_price_and_change_only_in_series_legend":{},"show_context_menu_in_crosshair_if_only_one_item":{},"iframe_loading_compatibility_mode":{},"show_percent_option_for_right_margin":{},"tv_production":{"subsets":["auto_enable_symbol_labels","symbol_search_parser_mixin","header_fullscreen_button","header_widget","dont_show_boolean_study_arguments","left_toolbar","right_toolbar","buy_sell_buttons","control_bar","symbol_search_hot_key","context_menus","edit_buttons_in_legend","object_tree_legend_mode","uppercase_instrument_names","use_localstorage_for_settings","saveload_requires_authentication","volume_force_overlay","saved_charts_count_restriction","create_volume_indicator_by_default","create_volume_indicator_by_default_once","charts_auto_save","save_old_chart_before_save_as","chart_content_overrides_by_defaults","alerts","header_saveload","header_layouttoggle","datasource_copypaste","show_saved_watchlists","watchlists_from_to_file","add_to_watchlist","property_pages","support_multicharts","display_market_status","display_data_mode","show_chart_warn_message","support_manage_drawings","widgetbar_tabs","study_templates","collapsible_header","drawing_templates","footer_publish_idea_button","text_notes","show_source_code","symbol_info","linetoolpropertieswidget_template_button","trading_notifications","symbol_search_three_columns_exchanges","symbol_search_flags","symbol_search_limited_exchanges","phone_verification","custom_resolutions","compare_symbol","study_on_study","japanese_chart_styles","show_login_dialog","dom_widget","bars_marks","chart_scroll","chart_zoom","show_trading_notifications_history","source_selection_markers","study_dialog_fundamentals_economy_addons","multiple_watchlists","marked_symbols","order_panel","pricescale_currency","show_animated_logo","pricescale_currency","show_object_tree","watchlist_import_export","scales_date_format","scales_time_hours_format","popup_hints","show_right_widgets_panel_by_default","compare_recent_symbols_enabled","adaptive_trading_sources","chart_style_hilo_last_price"]},"widget":{"subsets":["auto_enable_symbol_labels","symbol_search_parser_mixin","uppercase_instrument_names","left_toolbar","right_toolbar","control_bar","symbol_search_hot_key","context_menus","edit_buttons_in_legend","object_tree_legend_mode","use_localstorage_for_settings","saveload_requires_authentication","volume_force_overlay","create_volume_indicator_by_default","create_volume_indicator_by_default_once","dont_show_boolean_study_arguments","header_widget_dom_node","header_symbol_search","header_resolutions","header_chart_type","header_compare","header_indicators","star_some_intervals_by_default","display_market_status","display_data_mode","show_chart_warn_message","symbol_info","linetoolpropertieswidget_template_button","symbol_search_three_columns_exchanges","symbol_search_flags","symbol_search_limited_exchanges","widgetbar_tabs","compare_symbol","show_login_dialog","plain_studymarket","japanese_chart_styles","bars_marks","chart_scroll","chart_zoom","source_selection_markers","property_pages","show_right_widgets_panel_by_default","chart_style_hilo_last_price"]},"bovespa_widget":{"subsets":["widget","header_settings","linetoolpropertieswidget_template_button","compare_recent_symbols_enabled"]},"charting_library_base":{"subsets":["14851","allow_supported_resolutions_set_only","auto_enable_symbol_labels","border_around_the_chart","collapsible_header","constraint_dialogs_movement","context_menus","control_bar","create_volume_indicator_by_default","custom_items_in_context_menu","datasource_copypaste","uppercase_instrument_names","display_market_status","edit_buttons_in_legend","object_tree_legend_mode","graying_disabled_tools_enabled","header_widget","legend_widget","header_saveload","dont_show_boolean_study_arguments","lean_chart_load","left_toolbar","right_toolbar","link_to_tradingview","pay_attention_to_ticker_not_symbol","plain_studymarket","refresh_saved_charts_list_on_dialog_show","right_bar_stays_on_scroll","saveload_storage_customization","stop_study_on_restart","timeframes_toolbar","symbol_search_hot_key","update_study_formatter_on_symbol_resolve","update_timeframes_set_on_symbol_resolve","use_localstorage_for_settings","volume_force_overlay","widget_logo","countdown","use_overrides_for_overlay","trading_notifications","compare_symbol","symbol_info","timezone_menu","main_series_scale_menu","create_volume_indicator_by_default_once","bars_marks","chart_scroll","chart_zoom","source_selection_markers","property_pages","go_to_date","adaptive_logo","show_animated_logo","handle_scale","handle_scroll","shift_visible_range_on_new_bar","chart_content_overrides_by_defaults","cropped_tick_marks","scales_date_format","scales_time_hours_format","popup_hints","save_shortcut","show_right_widgets_panel_by_default","show_object_tree","insert_indicator_dialog_shortcut","compare_recent_symbols_enabled","hide_main_series_symbol_from_indicator_legend","chart_style_hilo"]},"charting_library":{"subsets":["charting_library_base"]},"static_charts_service":{"subsets":["charting_library","disable_resolution_rebuild"]},"trading_terminal":{"subsets":["charting_library_base","support_multicharts","header_layouttoggle","japanese_chart_styles","chart_property_page_trading","add_to_watchlist","open_account_manager","show_dom_first_time","order_panel","buy_sell_buttons","multiple_watchlists","show_trading_notifications_history","always_pass_called_order_to_modify","show_object_tree","watchlist_import_export","drawing_templates","trading_account_manager","chart_crosshair_menu","compare_recent_symbols_enabled","adaptive_trading_sources"]}}') +;const r=JSON.parse('{"14851":{},"custom_items_in_context_menu":{},"countdown":{},"symbol_search_parser_mixin":{},"pay_attention_to_ticker_not_symbol":{},"graying_disabled_tools_enabled":{},"update_study_formatter_on_symbol_resolve":{},"constraint_dialogs_movement":{},"phone_verification":{},"show_trading_notifications_history":{},"show_interval_dialog_on_key_press":{},"header_interval_dialog_button":{"subsets":["show_interval_dialog_on_key_press"]},"header_fullscreen_button":{},"header_symbol_search":{},"symbol_search_hot_key":{},"header_resolutions":{"subsets":["header_interval_dialog_button"]},"header_chart_type":{},"header_settings":{},"header_indicators":{},"header_compare":{},"header_undo_redo":{},"header_screenshot":{},"header_saveload":{},"study_on_study":{},"scales_date_format":{},"scales_time_hours_format":{},"header_widget":{"subsets":["header_widget_dom_node","header_symbol_search","header_resolutions","header_chart_type","header_settings","header_indicators","header_compare","header_undo_redo","header_fullscreen_button","compare_symbol","header_screenshot"]},"legend_widget":{},"compare_symbol":{"subsets":["header_compare"]},"property_pages":{"subsets":["show_chart_property_page","chart_property_page"]},"show_chart_property_page":{},"chart_property_page":{"subsets":["chart_property_page_scales","chart_property_page_trading","chart_property_page_right_margin_editor"]},"left_toolbar":{},"right_toolbar":{},"hide_left_toolbar_by_default":{},"control_bar":{},"widget_logo":{},"timeframes_toolbar":{},"edit_buttons_in_legend":{"subsets":["show_hide_button_in_legend","format_button_in_legend","study_buttons_in_legend","delete_button_in_legend"]},"show_hide_button_in_legend":{},"object_tree_legend_mode":{},"format_button_in_legend":{},"study_buttons_in_legend":{},"delete_button_in_legend":{},"broker_button":{},"buy_sell_buttons":{"subsets":["broker_button"]},"pane_context_menu":{},"scales_context_menu":{},"legend_context_menu":{},"context_menus":{"subsets":["pane_context_menu","scales_context_menu","legend_context_menu","objects_tree_context_menu"]},"items_favoriting":{},"save_chart_properties_to_local_storage":{},"use_localstorage_for_settings":{"subsets":["items_favoriting","save_chart_properties_to_local_storage"]},"handle_scale":{"subsets":["mouse_wheel_scale","pinch_scale","axis_pressed_mouse_move_scale"]},"handle_scroll":{"subsets":["mouse_wheel_scroll","pressed_mouse_move_scroll","horz_touch_drag_scroll","vert_touch_drag_scroll"]},"plain_studymarket":{},"disable_resolution_rebuild":{},"border_around_the_chart":{},"charting_library_debug_mode":{},"saveload_requires_authentication":{},"saveload_storage_customization":{},"volume_force_overlay":{},"create_volume_indicator_by_default":{},"create_volume_indicator_by_default_once":{},"saved_charts_count_restriction":{},"lean_chart_load":{},"stop_study_on_restart":{},"star_some_intervals_by_default":{},"move_logo_to_main_pane":{},"show_animated_logo":{},"link_to_tradingview":{},"logo_without_link":{},"logo_always_maximized":{},"right_bar_stays_on_scroll":{},"chart_content_overrides_by_defaults":{},"snapshot_trading_drawings":{},"allow_supported_resolutions_set_only":{},"widgetbar_tabs":{"subsets":["right_toolbar"]},"show_object_tree":{"subsets":["right_toolbar"]},"dom_widget":{"subsets":["right_toolbar"]},"collapsible_header":{},"study_templates":{},"side_toolbar_in_fullscreen_mode":{},"header_in_fullscreen_mode":{},"remove_library_container_border":{},"whotrades_auth_only":{},"support_multicharts":{},"display_market_status":{},"display_data_mode":{},"datasource_copypaste":{},"drawing_templates":{"subsets":["linetoolpropertieswidget_template_button"]},"expand_symbolsearch_items":{},"symbol_search_three_columns_exchanges":{},"symbol_search_flags":{},"symbol_search_limited_exchanges":{},"bugreport_button":{"subsets":["right_toolbar"]},"footer_publish_idea_button":{},"text_notes":{},"show_source_code":{},"symbol_info":{},"no_bars_status":{},"clear_bars_on_series_error":{},"hide_loading_screen_on_series_error":{},"seconds_resolution":{},"dont_show_boolean_study_arguments":{},"hide_last_na_study_output":{},"price_scale_always_last_bar_value":{},"study_dialog_fundamentals_economy_addons":{},"uppercase_instrument_names":{},"trading_notifications":{},"chart_crosshair_menu":{},"japanese_chart_styles":{},"hide_series_legend_item":{},"hide_study_overlay_legend_item":{},"hide_study_compare_legend_item":{},"linetoolpropertieswidget_template_button":{},"use_overrides_for_overlay":{},"timezone_menu":{},"main_series_scale_menu":{},"show_login_dialog":{},"remove_img_from_rss":{},"bars_marks":{},"chart_scroll":{},"chart_zoom":{},"source_selection_markers":{},"low_density_bars":{},"end_of_period_timescale_marks":{},"open_account_manager":{},"show_order_panel_on_start":{},"order_panel":{"subsets":["order_panel_close_button","order_panel_undock","right_toolbar","order_info"]},"multiple_watchlists":{},"watchlist_import_export":{},"study_overlay_compare_legend_option":{},"custom_resolutions":{},"referral_program_for_widget_owners":{},"mobile_trading":{},"real_brokers":{},"no_min_chart_width":{},"lock_visible_time_range_on_resize":{},"pricescale_currency":{},"cropped_tick_marks":{},"trading_account_manager":{},"disable_sameinterval_aligning":{},"display_legend_on_all_charts":{},"chart_style_hilo":{},"chart_style_hilo_last_price":{},"pricescale_unit":{},"show_spread_operators":{},"hide_exponentiation_spread_operator":{},"hide_reciprocal_spread_operator":{},"compare_symbol_search_spread_operators":{},"studies_symbol_search_spread_operators":{},"hide_resolution_in_legend":{},"hide_unresolved_symbols_in_legend":{},"fix_left_edge":{},"study_symbol_ticker_description":{},"two_character_bar_marks_labels":{},"tick_resolution":{},"secondary_series_extend_time_scale":{},"hide_volume_ma":{},"small_no_display":{},"charting_library_single_symbol_request":{},"use_ticker_on_symbol_info_update":{},"show_zoom_and_move_buttons_on_touch":{},"hide_main_series_symbol_from_indicator_legend":{},"chart_hide_close_position_button":{},"chart_hide_close_order_button":{},"hide_price_scale_global_last_bar_value":{"subsets":["use_last_visible_bar_value_in_legend"]},"keep_object_tree_widget_in_right_toolbar":{},"show_average_close_price_line_and_label":{},"hide_image_invalid_symbol":{},"hide_object_tree_and_price_scale_exchange_label":{},"confirm_overwrite_if_chart_layout_with_name_exists":{},"determine_first_data_request_size_using_visible_range":{},"use_na_string_for_not_available_values":{},"show_last_price_and_change_only_in_series_legend":{},"show_context_menu_in_crosshair_if_only_one_item":{},"iframe_loading_compatibility_mode":{},"show_percent_option_for_right_margin":{},"watchlist_context_menu":{},"tv_production":{"subsets":["auto_enable_symbol_labels","symbol_search_parser_mixin","header_fullscreen_button","header_widget","dont_show_boolean_study_arguments","left_toolbar","right_toolbar","buy_sell_buttons","control_bar","symbol_search_hot_key","context_menus","edit_buttons_in_legend","object_tree_legend_mode","uppercase_instrument_names","use_localstorage_for_settings","saveload_requires_authentication","volume_force_overlay","saved_charts_count_restriction","create_volume_indicator_by_default","create_volume_indicator_by_default_once","charts_auto_save","save_old_chart_before_save_as","chart_content_overrides_by_defaults","alerts","header_saveload","header_layouttoggle","datasource_copypaste","show_saved_watchlists","watchlists_from_to_file","add_to_watchlist","property_pages","support_multicharts","display_market_status","display_data_mode","show_chart_warn_message","support_manage_drawings","widgetbar_tabs","study_templates","collapsible_header","drawing_templates","footer_publish_idea_button","text_notes","show_source_code","symbol_info","linetoolpropertieswidget_template_button","trading_notifications","symbol_search_three_columns_exchanges","symbol_search_flags","symbol_search_limited_exchanges","phone_verification","custom_resolutions","compare_symbol","study_on_study","japanese_chart_styles","show_login_dialog","dom_widget","bars_marks","chart_scroll","chart_zoom","show_trading_notifications_history","source_selection_markers","study_dialog_fundamentals_economy_addons","multiple_watchlists","marked_symbols","order_panel","pricescale_currency","show_animated_logo","pricescale_currency","show_object_tree","watchlist_import_export","scales_date_format","scales_time_hours_format","popup_hints","show_right_widgets_panel_by_default","compare_recent_symbols_enabled","adaptive_trading_sources","chart_style_hilo_last_price"]},"widget":{"subsets":["auto_enable_symbol_labels","symbol_search_parser_mixin","uppercase_instrument_names","left_toolbar","right_toolbar","control_bar","symbol_search_hot_key","context_menus","edit_buttons_in_legend","object_tree_legend_mode","use_localstorage_for_settings","saveload_requires_authentication","volume_force_overlay","create_volume_indicator_by_default","create_volume_indicator_by_default_once","dont_show_boolean_study_arguments","header_widget_dom_node","header_symbol_search","header_resolutions","header_chart_type","header_compare","header_indicators","star_some_intervals_by_default","display_market_status","display_data_mode","show_chart_warn_message","symbol_info","linetoolpropertieswidget_template_button","symbol_search_three_columns_exchanges","symbol_search_flags","symbol_search_limited_exchanges","widgetbar_tabs","compare_symbol","show_login_dialog","plain_studymarket","japanese_chart_styles","bars_marks","chart_scroll","chart_zoom","source_selection_markers","property_pages","show_right_widgets_panel_by_default","chart_style_hilo_last_price"]},"bovespa_widget":{"subsets":["widget","header_settings","linetoolpropertieswidget_template_button","compare_recent_symbols_enabled"]},"charting_library_base":{"subsets":["14851","allow_supported_resolutions_set_only","auto_enable_symbol_labels","border_around_the_chart","collapsible_header","constraint_dialogs_movement","context_menus","control_bar","create_volume_indicator_by_default","custom_items_in_context_menu","datasource_copypaste","uppercase_instrument_names","display_market_status","edit_buttons_in_legend","object_tree_legend_mode","graying_disabled_tools_enabled","header_widget","legend_widget","header_saveload","dont_show_boolean_study_arguments","lean_chart_load","left_toolbar","right_toolbar","link_to_tradingview","pay_attention_to_ticker_not_symbol","plain_studymarket","refresh_saved_charts_list_on_dialog_show","right_bar_stays_on_scroll","saveload_storage_customization","stop_study_on_restart","timeframes_toolbar","symbol_search_hot_key","update_study_formatter_on_symbol_resolve","update_timeframes_set_on_symbol_resolve","use_localstorage_for_settings","volume_force_overlay","widget_logo","countdown","use_overrides_for_overlay","trading_notifications","compare_symbol","symbol_info","timezone_menu","main_series_scale_menu","create_volume_indicator_by_default_once","bars_marks","chart_scroll","chart_zoom","source_selection_markers","property_pages","go_to_date","adaptive_logo","show_animated_logo","handle_scale","handle_scroll","shift_visible_range_on_new_bar","chart_content_overrides_by_defaults","cropped_tick_marks","scales_date_format","scales_time_hours_format","popup_hints","save_shortcut","show_right_widgets_panel_by_default","show_object_tree","insert_indicator_dialog_shortcut","compare_recent_symbols_enabled","hide_main_series_symbol_from_indicator_legend","chart_style_hilo"]},"charting_library":{"subsets":["charting_library_base"]},"static_charts_service":{"subsets":["charting_library","disable_resolution_rebuild"]},"trading_terminal":{"subsets":["charting_library_base","support_multicharts","header_layouttoggle","japanese_chart_styles","chart_property_page_trading","add_to_watchlist","open_account_manager","show_dom_first_time","order_panel","buy_sell_buttons","multiple_watchlists","show_trading_notifications_history","always_pass_called_order_to_modify","show_object_tree","watchlist_import_export","drawing_templates","trading_account_manager","chart_crosshair_menu","compare_recent_symbols_enabled","adaptive_trading_sources","watchlist_context_menu"]}}') ;var u=n.t(r,2);const o=new Map,d=new Map,i=new Set;function a(e){const t=o.get(e);if(void 0!==t)return t;const n=d.get(e);return!!n&&n.some(a)}function s(e,t){o.set(String(e),Boolean(t))}function c(e){s(e,!0)}function f(e){s(e,!1)}function l(){const e=Object.create(null);for(const t of i)e[t]=a(t);return e}!function(){for(const[e,t]of Object.entries(u))if(i.add(e),"subsets"in t)for(const n of t.subsets){i.add(n);let t=d.get(n);void 0===t&&(t=[],d.set(n,t)),t.push(e)}"object"==typeof __initialDisabledFeaturesets&&Array.isArray(__initialDisabledFeaturesets)&&__initialDisabledFeaturesets.forEach(f),"object"==typeof __initialEnabledFeaturesets&&Array.isArray(__initialEnabledFeaturesets)&&__initialEnabledFeaturesets.forEach(c)}()},65665:function(e,t,n){var r;e=n.nmd(e);var u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=function(e){return"object"==typeof e&&null!==e};function d(e){return"number"==typeof e&&isFinite(e)}function i(e){return null!=e&&e.constructor===Function}function a(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}"undefined"!=typeof window?(r=window.TradingView=window.TradingView||{},window.isNumber=d,window.isFunction=i,window.inherit=a,window.isArray=u):r=this.TradingView=this.TradingView||{},r.isNaN=function(e){return!(e<=0||e>0)},r.isAbsent=function(e){return null==e},r.isExistent=function(e){return null!=e},Number.isNaN=Number.isNaN||function(e){return e!=e},r.isSameType=function(e,t){return Number.isNaN(e)||Number.isNaN(t)?Number.isNaN(e)===Number.isNaN(t):{}.toString.call(e)==={}.toString.call(t)},r.isInteger=function(e){return"number"==typeof e&&e%1==0},r.isString=function(e){return null!=e&&e.constructor===String},r.isInherited=function(e,t){if(null==e||null==e.prototype)throw new TypeError("isInherited: child should be a constructor function");if(null==t||null==t.prototype)throw new TypeError("isInherited: parent should be a constructor function");return e.prototype instanceof t||e.prototype===t.prototype},r.clone=function(e){if(!e||"object"!=typeof e)return e;var t,n,u;for(n in t="function"==typeof e.pop?[]:{},e)e.hasOwnProperty(n)&&(u=e[n],t[n]=u&&"object"==typeof u?r.clone(u):u);return t},r.deepEquals=function(e,t,n){if(n||(n=""),e===t)return[!0,n];if(i(e)&&(e=void 0),i(t)&&(t=void 0),void 0===e&&void 0!==t)return[!1,n];if(void 0===t&&void 0!==e)return[!1,n];if(null===e&&null!==t)return[!1,n];if(null===t&&null!==e)return[!1,n];if("object"!=typeof e&&"object"!=typeof t)return[e===t,n];if(Array.isArray(e)&&Array.isArray(t)){var o=e.length;if(o!==t.length)return[!1,n];for(var d=0;d{"use strict";n.r(t);var r=n(65665);const u=/{(\w+)}/g,o=/{(\d+)}/g;String.prototype.format=function(...e){const t=(0,r.isObject)(e[0]),n=t?u:o,d=t?(t,n)=>{const r=e[0];return void 0!==r[n]?r[n]:t}:(t,n)=>{const r=parseInt(n,10),u=e[r];return void 0!==u?u:t};return this.replace(n,d)}},32020:()=>{"use strict";var e,t,n,r,u,o;window.parent!==window&&window.CanvasRenderingContext2D&&window.TextMetrics&&(t=window.CanvasRenderingContext2D.prototype)&&t.hasOwnProperty("font")&&t.hasOwnProperty("mozTextStyle")&&"function"==typeof t.__lookupSetter__&&(n=t.__lookupSetter__("font"))&&(t.__defineSetter__("font",(function(e){try{return n.call(this,e)}catch(e){if("NS_ERROR_FAILURE"!==e.name)throw e}})),r=t.measureText,e=function(){this.width=0,this.isFake=!0,this.__proto__=window.TextMetrics.prototype},t.measureText=function(t){try{return r.apply(this,arguments)}catch(t){if("NS_ERROR_FAILURE"!==t.name)throw t;return new e}},u=t.fillText,t.fillText=function(e,t,n,r){try{u.apply(this,arguments)}catch(e){if("NS_ERROR_FAILURE"!==e.name)throw e}},o=t.strokeText,t.strokeText=function(e,t,n,r){try{o.apply(this,arguments)}catch(e){if("NS_ERROR_FAILURE"!==e.name)throw e}})},18438:(e,t,n)=>{"use strict";n.d(t,{default:()=>r});const r=function(){var e={base:"https://twemoji.maxcdn.com/v/13.0.1/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(e){var t="string"==typeof e?parseInt(e,16):e;if(t<65536)return i(t);return i(55296+((t-=65536)>>10),56320+(1023&t))},toCodePoint:v},onerror:function(){this.parentNode&&this.parentNode.replaceChild(a(this.alt,!1),this)},parse:function(t,n){n&&"function"!=typeof n||(n={callback:n});return("string"==typeof t?_:l)(t,{callback:n.callback||s,attributes:"function"==typeof n.attributes?n.attributes:p,base:"string"==typeof n.base?n.base:e.base,ext:n.ext||e.ext,size:n.folder||(r=n.size||e.size,"number"==typeof r?r+"x"+r:r),className:n.className||e.className,onerror:n.onerror||e.onerror});var r},replace:b,test:function(e){n.lastIndex=0;var t=n.test(e) ;return n.lastIndex=0,t}},t={"&":"&","<":"<",">":">","'":"'",'"':""" diff --git a/charting_library/bundles/8622.e7572c9eef1d02164f46.js b/charting_library/bundles/8622.00d0a8d0102afc963fc9.js similarity index 73% rename from charting_library/bundles/8622.e7572c9eef1d02164f46.js rename to charting_library/bundles/8622.00d0a8d0102afc963fc9.js index f53c3299..802aafea 100644 --- a/charting_library/bundles/8622.e7572c9eef1d02164f46.js +++ b/charting_library/bundles/8622.00d0a8d0102afc963fc9.js @@ -1,9 +1,9 @@ -"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[8622],{36134:(e,i,t)=>{t.d(i,{getSeriesStylePropertiesDefinitions:()=>be});var n=t(44352),o=t(47539),r=t(65279),l=t(40549),s=t.n(l),a=t(2484),c=t(52865),d=t(34440),u=t(10381);const p=new o.TranslatedString("change color bars based on previous close",n.t(null,void 0,t(29353))),h=new o.TranslatedString("change HLC bars",n.t(null,void 0,t(55740))),y=new o.TranslatedString("change bar up color",n.t(null,void 0,t(76804))),v=new o.TranslatedString("change bar down color",n.t(null,void 0,t(71816))),g=new o.TranslatedString("change thin bars",n.t(null,void 0,t(72886))),f=new o.TranslatedString("change line price source",n.t(null,void 0,t(17119))),S=new o.TranslatedString("change line type",n.t(null,void 0,t(70054))),w=new o.TranslatedString("change line color",n.t(null,void 0,t(87828))),b=new o.TranslatedString("change line width",n.t(null,void 0,t(69125))),P=new o.TranslatedString("change area price source",n.t(null,void 0,t(1316))),T=new o.TranslatedString("change area line color",n.t(null,void 0,t(661))),m=new o.TranslatedString("change area line width",n.t(null,void 0,t(6610))),_=new o.TranslatedString("change area fill color",n.t(null,void 0,t(97008))),D=new o.TranslatedString("change baseline price source",n.t(null,void 0,t(56819))),C=new o.TranslatedString("change baseline top line color",n.t(null,void 0,t(68621))),M=new o.TranslatedString("change baseline top line width",n.t(null,void 0,t(35339))),k=new o.TranslatedString("change baseline bottom line color",n.t(null,void 0,t(4164))),L=new o.TranslatedString("change baseline bottom line width",n.t(null,void 0,t(38990))),$=new o.TranslatedString("change baseline fill top area color",n.t(null,void 0,t(12673))),I=new o.TranslatedString("change baseline fill bottom area color",n.t(null,void 0,t(73163))),O=new o.TranslatedString("change base level",n.t(null,void 0,t(31547))),V=new o.TranslatedString("change high-low body visibility",n.t(null,void 0,t(30033))),W=new o.TranslatedString("change high-low body color",n.t(null,void 0,t(81080))),E=new o.TranslatedString("change high-low borders visibility",n.t(null,void 0,t(79236))),B=new o.TranslatedString("change high-low border color",n.t(null,void 0,t(76885))),x=new o.TranslatedString("change high-low labels visibility",n.t(null,void 0,t(42981))),N=new o.TranslatedString("change high-low labels color",n.t(null,void 0,t(31937))),A=(new o.TranslatedString("change renko wick visibility",n.t(null,void 0,t(9473))),new o.TranslatedString("change renko wick up color",n.t(null,void 0,t(7747))),new o.TranslatedString("change renko wick down color",n.t(null,void 0,t(75986))),new o.TranslatedString("change the display of real prices on price scale (instead of Heiken-Ashi price)",n.t(null,void 0,t(39783))),new o.TranslatedString("change range thin bars",n.t(null,void 0,t(28143))), +"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[8622],{36134:(e,i,t)=>{t.d(i,{getSeriesStylePropertiesDefinitions:()=>be});var n=t(44352),o=t(47539),r=t(65279),l=t(40549),s=t.n(l),a=t(2484),c=t(52865),d=t(34440),u=t(10381);const p=new o.TranslatedString("change color bars based on previous close",n.t(null,void 0,t(29353))),h=new o.TranslatedString("change HLC bars",n.t(null,void 0,t(55740))),y=new o.TranslatedString("change bar up color",n.t(null,void 0,t(76804))),v=new o.TranslatedString("change bar down color",n.t(null,void 0,t(71816))),g=new o.TranslatedString("change thin bars",n.t(null,void 0,t(72886))),f=new o.TranslatedString("change line price source",n.t(null,void 0,t(17119))),S=new o.TranslatedString("change line type",n.t(null,void 0,t(70054))),w=new o.TranslatedString("change line color",n.t(null,void 0,t(87828))),b=new o.TranslatedString("change line width",n.t(null,void 0,t(69125))),P=new o.TranslatedString("change area price source",n.t(null,void 0,t(1316))),T=new o.TranslatedString("change area line color",n.t(null,void 0,t(661))),m=new o.TranslatedString("change area line width",n.t(null,void 0,t(6610))),_=new o.TranslatedString("change area fill color",n.t(null,void 0,t(97008))),D=new o.TranslatedString("change baseline price source",n.t(null,void 0,t(56819))),C=new o.TranslatedString("change baseline top line color",n.t(null,void 0,t(68621))),k=new o.TranslatedString("change baseline top line width",n.t(null,void 0,t(35339))),M=new o.TranslatedString("change baseline bottom line color",n.t(null,void 0,t(4164))),L=new o.TranslatedString("change baseline bottom line width",n.t(null,void 0,t(38990))),$=new o.TranslatedString("change baseline fill top area color",n.t(null,void 0,t(12673))),I=new o.TranslatedString("change baseline fill bottom area color",n.t(null,void 0,t(73163))),O=new o.TranslatedString("change base level",n.t(null,void 0,t(31547))),V=new o.TranslatedString("change high-low body visibility",n.t(null,void 0,t(30033))),W=new o.TranslatedString("change high-low body color",n.t(null,void 0,t(81080))),E=new o.TranslatedString("change high-low borders visibility",n.t(null,void 0,t(79236))),B=new o.TranslatedString("change high-low border color",n.t(null,void 0,t(76885))),x=new o.TranslatedString("change high-low labels visibility",n.t(null,void 0,t(42981))),N=new o.TranslatedString("change high-low labels color",n.t(null,void 0,t(31937))),A=(new o.TranslatedString("change renko wick visibility",n.t(null,void 0,t(9473))),new o.TranslatedString("change renko wick up color",n.t(null,void 0,t(7747))),new o.TranslatedString("change renko wick down color",n.t(null,void 0,t(75986))),new o.TranslatedString("change the display of real prices on price scale (instead of Heiken-Ashi price)",n.t(null,void 0,t(39783))),new o.TranslatedString("change range thin bars",n.t(null,void 0,t(28143))), new o.TranslatedString("change {candleType} body visibility",n.t(null,void 0,t(47202)))),F=new o.TranslatedString("change {candleType} up color",n.t(null,void 0,t(61118))),R=new o.TranslatedString("change {candleType} down color",n.t(null,void 0,t(36320))),j=new o.TranslatedString("change {candleType} border visibility",n.t(null,void 0,t(23986))),U=new o.TranslatedString("change {candleType} up border color",n.t(null,void 0,t(5464))),G=new o.TranslatedString("change {candleType} down border color",n.t(null,void 0,t(92330))),H=new o.TranslatedString("change {candleType} wick visibility",n.t(null,void 0,t(39987))),z=new o.TranslatedString("change {candleType} wick up color",n.t(null,void 0,t(45543))),Y=new o.TranslatedString("change {candleType} wick down color",n.t(null,void 0,t(60164))),J=(new o.TranslatedString("change {chartType} up color",n.t(null,void 0,t(59414))),new o.TranslatedString("change {chartType} down color",n.t(null,void 0,t(85503))),new o.TranslatedString("change {chartType} projection bar up color",n.t(null,void 0,t(50453))),new o.TranslatedString("change {chartType} projection bar down color",n.t(null,void 0,t(18465))),new o.TranslatedString("change {chartType} border bar up color",n.t(null,void 0,t(11107))),new o.TranslatedString("change {chartType} border bar down color",n.t(null,void 0,t(79088))),new o.TranslatedString("change {chartType} projection border bar up color",n.t(null,void 0,t(61250))),new o.TranslatedString("change {chartType} projection border bar up color",n.t(null,void 0,t(61250))),new o.TranslatedString("change column up color",n.t(null,void 0,t(85709)))),K=new o.TranslatedString("change column down color",n.t(null,void 0,t(12155))),q=new o.TranslatedString("change column price source",n.t(null,void 0,t(66890))),Q=n.t(null,void 0,t(63243)),X=n.t(null,void 0,t(86953)),Z=n.t(null,void 0,t(5536)),ee=n.t(null,void 0,t(87151)),ie=n.t(null,void 0,t(55314)),te=n.t(null,void 0,t(83760)),ne=n.t(null,void 0,t(72269)),oe=n.t(null,void 0,t(26458)),re=n.t(null,void 0,t(24248)),le=n.t(null,void 0,t(58416)),se=n.t(null,void 0,t(1277)),ae=n.t(null,void 0,t(57417)),ce=n.t(null,void 0,t(50430)),de=n.t(null,void 0,t(86846)),ue=n.t(null,void 0,t(58747)),pe=n.t(null,void 0,t(11157)),he=(n.t(null,void 0,t(83610)),n.t(null,void 0,t(39667)),n.t(null,void 0,t(94089)),n.t(null,void 0,t(5704)),n.t(null,void 0,t(29881)),n.t(null,void 0,t(7445))),ye=n.t(null,void 0,t(83760)),ve=n.t(null,void 0,t(72269)),ge=n.t(null,void 0,t(94420));function fe(e,i,t,n){return(0,r.createCheckablePropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.barColorsOnPrevClose,p)},{id:`${t}${n}`,title:Q})}function Se(e,i,t,n,o,l){const a=(0,c.createWVFromGetterAndSubscription)((()=>e.model().isInReplay.bind(e.model())()&&false),e.model().onInReplayStateChanged());return(0,r.createOptionsPropertyDefinition)({disabled:(0,r.convertFromReadonlyWVToDefinitionProperty)(a),option:(0,r.convertToDefinitionProperty)(e,i.priceSource,l)},{id:`${n}${o}`,title:re,options:new(s())(t)})}function we(e,i,t,n){const o=(0, u.removeSpaces)(t.originalText());return[(0,r.createTwoColorsPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.drawBody,A.format({candleType:t})),color1:(0,r.getColorDefinitionProperty)(e,i.upColor,null,F.format({candleType:t})),color2:(0,r.getColorDefinitionProperty)(e,i.downColor,null,R.format({candleType:t}))},{id:`${n}Symbol${o}CandlesColor`,title:te}),(0,r.createTwoColorsPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.drawBorder,j.format({candleType:t})),color1:(0,r.getColorDefinitionProperty)(e,i.borderUpColor,null,U.format({candleType:t})),color2:(0,r.getColorDefinitionProperty)(e,i.borderDownColor,null,G.format({candleType:t}))},{id:`${n}Symbol${o}BordersColor`,title:ne}),(0,r.createTwoColorsPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.drawWick,H.format({candleType:t})),color1:(0,r.getColorDefinitionProperty)(e,i.wickUpColor,null,z.format({candleType:t})),color2:(0,r.getColorDefinitionProperty)(e,i.wickDownColor,null,Y.format({candleType:t}))},{id:`${n}Symbol${o}WickColors`,title:oe})]}function be(e,i,l,c,u){switch(l){case 0:return function(e,i,t){return[fe(e,i,t,"SymbolBarStyleBarColorsOnPrevClose"),(0,r.createCheckablePropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.dontDrawOpen,h)},{id:`${t}SymbolDontDrawOpen`,title:X}),(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.upColor,null,y)},{id:`${t}SymbolUpColor`,title:Z}),(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.downColor,null,v)},{id:`${t}SymbolDownColor`,title:ee}),(0,r.createCheckablePropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.thinBars,g)},{id:`${t}SymbolBarThinBars`,title:ie})]}(e,i.barStyle.childs(),u);case 1:return function(e,i,r){return[fe(e,i,r,"SymbolCandleStyleBarColorsOnPrevClose"),...we(e,i,new o.TranslatedString("candle",n.t(null,void 0,t(30792))),r)]}(e,i.candleStyle.childs(),u);case 2:return function(e,i,t,n,o){return[Se(e,i,t,o,"SymbolLinePriceSource",f),(0,r.createOptionsPropertyDefinition)({option:(0,r.convertToDefinitionProperty)(e,i.styleType,S)},{id:`${o}SymbolStyleType`,title:le,options:new(s())(n)}),(0,r.createLinePropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.color,null,w),width:(0,r.convertToDefinitionProperty)(e,i.linewidth,b)},{id:`${o}SymbolLineStyle`,title:se})]}(e,i.lineStyle.childs(),c.seriesPriceSources,c.lineStyleTypes,u);case 3:return function(e,i,t,n){return[Se(e,i,t,n,"SymbolAreaPriceSource",P),(0,r.createLinePropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.linecolor,null,T),width:(0,r.convertToDefinitionProperty)(e,i.linewidth,m)},{id:`${n}SymbolAreaLineStyle`,title:se}),(0,r.createTwoColorsPropertyDefinition)({color1:(0,r.getColorDefinitionProperty)(e,i.color1,i.transparency,_),color2:(0,r.getColorDefinitionProperty)(e,i.color2,i.transparency,_)},{id:`${n}SymbolAreaFills`,title:de})]}(e,i.areaStyle.childs(),c.seriesPriceSources,u);case 9: -return we(e,i.hollowCandleStyle.childs(),new o.TranslatedString("hollow candles",n.t(null,void 0,t(75165))),u);case 10:return function(e,i,t,n){return[Se(e,i,t,n,"SymbolBaseLinePriceSource",D),(0,r.createLinePropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.topLineColor,null,C),width:(0,r.convertToDefinitionProperty)(e,i.topLineWidth,M)},{id:`${n}SymbolBaseLineTopLine`,title:ae}),(0,r.createLinePropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.bottomLineColor,null,k),width:(0,r.convertToDefinitionProperty)(e,i.bottomLineWidth,L)},{id:`${n}SymbolBaseLineBottomLine`,title:ce}),(0,r.createTwoColorsPropertyDefinition)({color1:(0,r.getColorDefinitionProperty)(e,i.topFillColor1,null,$),color2:(0,r.getColorDefinitionProperty)(e,i.topFillColor2,null,$)},{id:`${n}SymbolBaseLineTopFills`,title:ue}),(0,r.createTwoColorsPropertyDefinition)({color1:(0,r.getColorDefinitionProperty)(e,i.bottomFillColor1,null,I),color2:(0,r.getColorDefinitionProperty)(e,i.bottomFillColor2,null,I)},{id:`${n}SymbolBaseLineBottomFills`,title:pe}),(0,r.createNumberPropertyDefinition)({value:(0,r.convertToDefinitionProperty)(e,i.baseLevelPercentage,O,[d.floor])},{id:`${n}SymbolBaseLevelPercentage`,title:he,type:0,min:new(s())(0),max:new(s())(100),step:new(s())(1),unit:new(s())("%")})]}(e,i.baselineStyle.childs(),c.seriesPriceSources,u);case 13:return function(e,i,t,n){return[Se(e,i,t,n,"SymbolColumnPriceSource",q),fe(e,i,n,"SymbolColumnStyleColumnColorsOnPrevClose"),(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.upColor,null,J)},{id:`${n}SymbolUpColor`,title:Z}),(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.downColor,null,K)},{id:`${n}SymbolDownColor`,title:ee})]}(e,i.columnStyle.childs(),c.seriesPriceSources,u)}if(12===l&&a.enabled("chart_style_hilo")){return function(e,i,t){return[(0,r.createColorPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.drawBody,V),color:(0,r.getColorDefinitionProperty)(e,i.color,null,W)},{id:`${t}SymbolBodiesColor`,title:ye}),(0,r.createColorPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.showBorders,E),color:(0,r.getColorDefinitionProperty)(e,i.borderColor,null,B)},{id:`${t}SymbolBorderColor`,title:ve}),(0,r.createTextPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.showLabels,x),color:(0,r.getColorDefinitionProperty)(e,i.labelColor,null,N)},{id:`${t}SymbolLabels`,title:ge,isEditable:!1,isMultiLine:!1})]}(e,i.hiloStyle.childs(),u)}if(!i.hasOwnProperty("haStyle"))return[];if(c.isJapaneseChartsAvailable&&8===l){return function(e,i,r){const l=[];return l.push(fe(e,i,r,"SymbolHAStyleBarColorsOnPrevClose"),...we(e,i,new o.TranslatedString("Heikin Ashi",n.t(null,void 0,t(40530))),r)),l}(e,i.haStyle.childs(),u)}return c.isJapaneseChartsAvailable&&a.enabled("japanese_chart_styles"),[]}},68622:(e,i,t)=>{t.d(i,{SeriesPropertyDefinitionsViewModel:()=>ae,basePriceSources:()=>re,lineStyleTypes:()=>le,seriesPrecisionValues:()=>se}) -;var n=t(50151),o=t(44352),r=t(47539),l=t(2484),s=t(65279),a=(t(79807),t(40549)),c=t.n(a),d=t(1930),u=t(77906),p=t(36134),h=t(34440);const y=new r.TranslatedString("change {inputName} property",o.t(null,void 0,t(21547)));function v(e){return e.map((e=>({value:e,title:o.t(e,{context:"input"},t(88601))})))}function g(e,i,l,a,u,p,g){const f=[];return l.forEach((l=>{if(!function(e,i){return!e.isHidden&&(void 0===e.visible||function(e,i){if(!e)return!0;const t=e.split("==");return!(t.length<2)&&i[t[0]].value()===t[1]}(e.visible,i))}(l,a))return;const S=l.id;if(!a.hasOwnProperty(S))return;const w=a[S],b=function(e,i){return"style"===e.id?"Box size assignment method":"boxSize"===e.id?"Box size":i.childs().name.value()}(l,u[S]),P=function(e){return o.t(e,{context:"input"},t(88601))}(b),T=new r.TranslatedString(b,P);if("options"in l){const i=(0,n.ensure)(l.options);f.push((0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(e,w,y.format({inputName:T}))},{id:`${g}${l.name}`,title:P,options:new(c())(v(i))}))}else if("integer"!==l.type){if("float"===l.type){let t;return t=function(e,i){return!((i===(0,d.chartStyleStudyId)(4)||i===(0,d.chartStyleStudyId)(6))&&"boxSize"===e||i===(0,d.chartStyleStudyId)(5)&&"reversalAmount"===e)}(S,i)||null===p.value()?new(c())(l.min):p,void f.push((0,s.createNumberPropertyDefinition)({value:(0,s.convertToDefinitionProperty)(e,w,y.format({inputName:T}))},{id:`${g}${l.name}`,title:P,type:1,min:t,max:new(c())(l.max),defval:l.defval}))}"text"!==l.type?"bool"!==l.type||f.push((0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,w,y.format({inputName:T}))},{id:`${g}${l.name}`,title:P})):f.push((0,s.createTextPropertyDefinition)({text:(0,s.convertToDefinitionProperty)(e,w,y.format({inputName:T}))},{id:`${g}${l.name}`,title:P,isEditable:!0,isMultiLine:!1}))}else f.push((0,s.createNumberPropertyDefinition)({value:(0,s.convertToDefinitionProperty)(e,w,y.format({inputName:T}),[h.floor])},{id:`${g}${l.name}`,title:P,type:0,min:new(c())(l.min),max:new(c())(l.max),defval:l.defval}))})),f}var f=t(98351),S=t(33972),w=t(52865),b=t(7019),P=t(12272);const T=(0,f.getLogger)("Chart.Definitions.Series"),m=l.enabled("show_average_close_price_line_and_label"),_=l.enabled("pre_post_market_sessions"),D=new r.TranslatedString("change decimal places",o.t(null,void 0,t(71809))),C=new r.TranslatedString("change timezone",o.t(null,void 0,t(20505))),M=(new r.TranslatedString("adjust data for dividends",o.t(null,void 0,t(42390))),new r.TranslatedString("use settlement as close on daily interval",o.t(null,void 0,t(98402))),new r.TranslatedString("adjust for contract changes",o.t(null,void 0,t(99511))), -new r.TranslatedString("change session",o.t(null,void 0,t(65303)))),k=new r.TranslatedString("change extended hours color",o.t(null,void 0,t(31317))),L=new r.TranslatedString("change pre market color",o.t(null,void 0,t(46257))),$=new r.TranslatedString("change post market color",o.t(null,void 0,t(49973))),I=new r.TranslatedString("change price line visibility",o.t(null,void 0,t(67761))),O=new r.TranslatedString("change price line color",o.t(null,void 0,t(77640))),V=new r.TranslatedString("change price line width",o.t(null,void 0,t(97322))),W=(new r.TranslatedString("change previous close price line visibility",o.t(null,void 0,t(59883))),new r.TranslatedString("change previous close price line color",o.t(null,void 0,t(91183))),new r.TranslatedString("change previous close price line width",o.t(null,void 0,t(87631))),new r.TranslatedString("change pre/post market price lines visibility",o.t(null,void 0,t(50393))),new r.TranslatedString("change pre market line color",o.t(null,void 0,t(60852))),new r.TranslatedString("change post market line color",o.t(null,void 0,t(5969))),new r.TranslatedString("change bid and ask lines visibility",o.t(null,void 0,t(32311))),new r.TranslatedString("change bid line color",o.t(null,void 0,t(36703))),new r.TranslatedString("change ask line color",o.t(null,void 0,t(29180))),new r.TranslatedString("change high and low price lines visibility",o.t(null,void 0,t(92556)))),E=new r.TranslatedString("change high and low price line color",o.t(null,void 0,t(60944))),B=new r.TranslatedString("change high and low price line width",o.t(null,void 0,t(83708))),x=new r.TranslatedString("change average close price line visibility",o.t(null,void 0,t(98866))),N=new r.TranslatedString("change average close price line color",o.t(null,void 0,t(30385))),A=new r.TranslatedString("change average close price line width",o.t(null,void 0,t(90168))),F=(o.t(null,void 0,t(9994)),o.t(null,void 0,t(25866))),R=(o.t(null,void 0,t(10989)),o.t(null,void 0,t(23500)),o.t(null,void 0,t(62521))),j=o.t(null,void 0,t(15107)),U=(o.t(null,void 0,t(8094)),o.t(null,void 0,t(47586)),o.t(null,void 0,t(6350)),o.t(null,void 0,t(73947))),G=o.t(null,void 0,t(87492)),H=o.t(null,void 0,t(39280)),z=o.t(null,void 0,t(30777)),Y=o.t(null,void 0,t(8136)),J=o.t(null,void 0,t(31691)),K=o.t(null,void 0,t(10591)),q=o.t(null,void 0,t(94884)),Q=o.t(null,void 0,t(22353)),X=o.t(null,void 0,t(27879)),Z=o.t(null,void 0,t(44673)),ee=o.t(null,void 0,t(2391)),ie=o.t(null,void 0,t(4329)),te=o.t(null,void 0,t(39292)),ne=o.t(null,void 0,t(70816)),oe=[{priceScale:1,minMove:1,frac:!1},{priceScale:10,minMove:1,frac:!1},{priceScale:100,minMove:1,frac:!1},{priceScale:1e3,minMove:1,frac:!1},{priceScale:1e4,minMove:1,frac:!1},{priceScale:1e5,minMove:1,frac:!1},{priceScale:1e6,minMove:1,frac:!1},{priceScale:1e7,minMove:1,frac:!1},{priceScale:1e8,minMove:1,frac:!1},{priceScale:1e9,minMove:1,frac:!1},{priceScale:1e10,minMove:1,frac:!1},{priceScale:2,minMove:1,frac:!0},{priceScale:4,minMove:1,frac:!0},{priceScale:8,minMove:1,frac:!0},{priceScale:16,minMove:1,frac:!0},{ -priceScale:32,minMove:1,frac:!0},{priceScale:64,minMove:1,frac:!0},{priceScale:128,minMove:1,frac:!0},{priceScale:320,minMove:1,frac:!0}],re=[{title:H,value:"open",id:"price-source-open"},{title:z,value:"high",id:"price-source-high"},{title:Y,value:"low",id:"price-source-low"},{title:J,value:"close",id:"price-source-close"},{title:K,value:"hl2",id:"price-source-hl2"},{title:q,value:"hlc3",id:"price-source-hlc3"},{title:Q,value:"ohlc4",id:"price-source-ohlc4"}],le=[{title:X,value:u.STYLE_LINE_TYPE_SIMPLE},{title:Z,value:u.STYLE_LINE_TYPE_MARKERS},{title:ee,value:u.STYLE_LINE_TYPE_STEP}];function se(){const e=[{title:ie,value:"default"}];for(let i=0;i{(0,s.destroyDefinitions)(e.definitions.value())})),this._series.onStyleChanged().unsubscribe(this,this._updateDefinitions),this._series.dataEvents().symbolResolved().unsubscribeAll(this),this._unsubscribeInputsUpdate(),this._isDestroyed=!0}propertyPages(){return null===this._propertyPages?this._getDefinitions().then((e=>{var i;if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");return null===this._propertyPages&&(this._propertyPages=[{id:this._propertyPageId,title:this._propertyPageName,icon:this._propertyPageIcon,definitions:new(c())(e.definitions),visible:null!==(i=e.visible)&&void 0!==i?i:new(c())(!0).readonly()}]),this._propertyPages})):Promise.resolve(this._propertyPages)}_seriesMinTick(){const e=this._series.symbolInfo();return null!==e?e.minmov/e.pricescale:null}_updateSeriesMinTickWV(){null===this._seriesMinTickWV?this._seriesMinTickWV=new(c())(this._seriesMinTick()):this._seriesMinTickWV.setValue(this._seriesMinTick())}_updateSessionIdOptionsWV(){if(!_)return;const e=this._series.symbolInfo();if(null===e)return;const i=(e.subsessions||[]).filter((e=>!e.private)).map((e=>({title:(0,P.translateSessionDescription)(e.description),value:e.id})));this._sessionIdOptionsWV.setValue(i)}_updateDefinitions(){null!==this._definitions&&(0,s.destroyDefinitions)(this._definitions.definitions),this._definitions=null,this._unsubscribeInputsUpdate(),this._createSeriesDefinitions().then((e=>{ -if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");(0,n.ensureNotNull)(this._propertyPages)[0].definitions.setValue(e.definitions)}))}_getDefinitions(){return null===this._definitions?this._createSeriesDefinitions():Promise.resolve(this._definitions)}_unsubscribeInputsUpdate(){null!==this._inputsSubscriptions&&(this._inputsSubscriptions.forEach((e=>{e.unsubscribeAll(this)})),this._inputsSubscriptions=null)}_subscribeInputsUpdate(e,i){const t=[];e.forEach((e=>{if(void 0!==e.visible){const n=e.visible.split("==");if(2===n.length){const e=i[n[0]];-1===t.indexOf(e)&&(e.subscribe(this,this._updateDefinitions),t.push(e))}}})),t.length>0?this._inputsSubscriptions=t:this._inputsSubscriptions=null}_createSeriesDefinitions(){const e=this._series.properties().childs(),i=this._series.getInputsProperties(),r=this._series.getInputsInfoProperties(),l=e.style.value(),a=this._series.getStyleShortName();return new Promise((e=>{const t=(0,d.chartStyleStudyId)(l);null!==t?this._model.studyMetaInfoRepository().findById({type:"java",studyId:t}).then((t=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");if(null!==this._definitions)return void e(null);const o=(0,n.ensureNotNull)(this._seriesMinTickWV),l=g(this._undoModel,t.id,t.inputs,i,r,o,a);this._subscribeInputsUpdate(t.inputs,i),e(l)})).catch((i=>{T.logWarn(`Find meta info for create series definitions with error - ${(0,S.errorToString)(i)}`),e(null)})):e(null)})).then((i=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");if(null!==this._definitions)return this._definitions;const n=(0,p.getSeriesStylePropertiesDefinitions)(this._undoModel,e,l,{seriesPriceSources:re,lineStyleTypes:le,isJapaneseChartsAvailable:true},"mainSeries");null!==i&&n.push(...i);const r=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(this._undoModel,e.minTick,D)},{id:`${a}SymbolMinTick`,title:U,options:new(c())(se())}),u=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(this._undoModel,this._timezonePropertyObj.property,C)},{id:`${a}SymbolTimezone`,title:G,options:new(c())(this._timezonePropertyObj.values)});return this._definitions={definitions:[(0,s.createPropertyDefinitionsGeneralGroup)(n,"generalSymbolStylesGroup",(0,d.getTranslatedChartStyleName)(l)),(0,s.createPropertyDefinitionsGeneralGroup)(this._seriesPriceLinesDefinitions(a),"priceLinesGroup",o.t(null,void 0,t(77986))),(0,s.createPropertyDefinitionsGeneralGroup)([...this._seriesDataDefinitions(a),r,u],"dataModififcationGroup",o.t(null,void 0,t(81285)))]},this._definitions}))}_seriesDataDefinitions(e){const i=[];if(_){const t=this._series.sessionIdProxyProperty(),n=(0,b.combineWithFilteredUpdate)(((e,i)=>!i&&(0,d.symbolHasSeveralSessions)(this._series.symbolInfo())),((e,i)=>i||!e),this._series.symbolResolvingActive(),(0,w.createWVFromProperty)(this._series.isDWMProperty())),o=(0,s.createOptionsPropertyDefinition)({option:(0, -s.convertToDefinitionProperty)(this._undoModel,t,M),visible:(0,s.convertFromReadonlyWVToDefinitionProperty)(n)},{id:"sessionId",title:F,options:this._sessionIdOptionsWV});i.push(o);const r=this._model.sessions().graphicsInfo();let l=!1;r.backgrounds&&(l=void 0!==r.backgrounds.outOfSession);const a=l?this._createOutOfSessionDefinition(e):this._createPrePostMarketDefinition(e);i.push(a)}return i}_createOutOfSessionDefinition(e){const i=this._model.sessions().properties().childs().graphics.childs().backgrounds.childs().outOfSession.childs();return(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._undoModel,i.color,i.transparency,k)},{id:`${e}SymbolExtendedHoursColors`,title:R})}_createPrePostMarketDefinition(e){const i=(0,b.combineWithFilteredUpdate)(((e,i)=>!i&&(0,d.symbolHasPreOrPostMarket)(this._series.symbolInfo())&&!(0,d.isRegularSessionId)(this._series.sessionIdProxyProperty().value())),((e,i)=>i||!e),this._series.symbolResolvingActive(),(0,w.createWVFromProperty)(this._series.isDWMProperty())),t=this._model.sessions(),n=t.properties().childs().graphics.childs().backgrounds.childs().preMarket.childs(),o=t.properties().childs().graphics.childs().backgrounds.childs().postMarket.childs();return(0,s.createTwoColorsPropertyDefinition)({color1:(0,s.getColorDefinitionProperty)(this._undoModel,n.color,n.transparency,L),color2:(0,s.getColorDefinitionProperty)(this._undoModel,o.color,o.transparency,$),visible:(0,s.convertFromReadonlyWVToDefinitionProperty)(i)},{id:`${e}SymbolExtendedHoursColors`,title:R})}_seriesPriceLinesDefinitions(e){const i=[],t=this._series.properties().childs();if(this._series.hasClosePrice()){const n=(0,s.createLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._undoModel,t.showPriceLine,I),color:(0,s.getColorDefinitionProperty)(this._undoModel,t.priceLineColor,null,O),width:(0,s.convertToDefinitionProperty)(this._undoModel,t.priceLineWidth,V)},{id:`${e}SymbolLastValuePriceLine`,title:j});i.push(n)}this._series.hasClosePrice();const n=t.highLowAvgPrice.childs(),o=(0,s.createLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._undoModel,n.highLowPriceLinesVisible,W),color:(0,s.getColorDefinitionProperty)(this._undoModel,n.highLowPriceLinesColor,null,E),width:(0,s.convertToDefinitionProperty)(this._undoModel,n.highLowPriceLinesWidth,B)},{id:`${e}SymbolHighLowPriceLines`,title:te});if(i.push(o),m){const t=(0,s.createLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._undoModel,n.averageClosePriceLineVisible,x),color:(0,s.getColorDefinitionProperty)(this._undoModel,n.averagePriceLineColor,null,N),width:(0,s.convertToDefinitionProperty)(this._undoModel,n.averagePriceLineWidth,A)},{id:`${e}SymbolAverageClosePriceLine`,title:ne});i.push(t)}return i}}}}]); \ No newline at end of file +return we(e,i.hollowCandleStyle.childs(),new o.TranslatedString("hollow candles",n.t(null,void 0,t(75165))),u);case 10:return function(e,i,t,n){return[Se(e,i,t,n,"SymbolBaseLinePriceSource",D),(0,r.createLinePropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.topLineColor,null,C),width:(0,r.convertToDefinitionProperty)(e,i.topLineWidth,k)},{id:`${n}SymbolBaseLineTopLine`,title:ae}),(0,r.createLinePropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.bottomLineColor,null,M),width:(0,r.convertToDefinitionProperty)(e,i.bottomLineWidth,L)},{id:`${n}SymbolBaseLineBottomLine`,title:ce}),(0,r.createTwoColorsPropertyDefinition)({color1:(0,r.getColorDefinitionProperty)(e,i.topFillColor1,null,$),color2:(0,r.getColorDefinitionProperty)(e,i.topFillColor2,null,$)},{id:`${n}SymbolBaseLineTopFills`,title:ue}),(0,r.createTwoColorsPropertyDefinition)({color1:(0,r.getColorDefinitionProperty)(e,i.bottomFillColor1,null,I),color2:(0,r.getColorDefinitionProperty)(e,i.bottomFillColor2,null,I)},{id:`${n}SymbolBaseLineBottomFills`,title:pe}),(0,r.createNumberPropertyDefinition)({value:(0,r.convertToDefinitionProperty)(e,i.baseLevelPercentage,O,[d.floor])},{id:`${n}SymbolBaseLevelPercentage`,title:he,type:0,min:new(s())(0),max:new(s())(100),step:new(s())(1),unit:new(s())("%")})]}(e,i.baselineStyle.childs(),c.seriesPriceSources,u);case 13:return function(e,i,t,n){return[Se(e,i,t,n,"SymbolColumnPriceSource",q),fe(e,i,n,"SymbolColumnStyleColumnColorsOnPrevClose"),(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.upColor,null,J)},{id:`${n}SymbolUpColor`,title:Z}),(0,r.createColorPropertyDefinition)({color:(0,r.getColorDefinitionProperty)(e,i.downColor,null,K)},{id:`${n}SymbolDownColor`,title:ee})]}(e,i.columnStyle.childs(),c.seriesPriceSources,u)}if(12===l&&a.enabled("chart_style_hilo")){return function(e,i,t){return[(0,r.createColorPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.drawBody,V),color:(0,r.getColorDefinitionProperty)(e,i.color,null,W)},{id:`${t}SymbolBodiesColor`,title:ye}),(0,r.createColorPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.showBorders,E),color:(0,r.getColorDefinitionProperty)(e,i.borderColor,null,B)},{id:`${t}SymbolBorderColor`,title:ve}),(0,r.createTextPropertyDefinition)({checked:(0,r.convertToDefinitionProperty)(e,i.showLabels,x),color:(0,r.getColorDefinitionProperty)(e,i.labelColor,null,N)},{id:`${t}SymbolLabels`,title:ge,isEditable:!1,isMultiLine:!1})]}(e,i.hiloStyle.childs(),u)}if(!i.hasOwnProperty("haStyle"))return[];if(c.isJapaneseChartsAvailable&&8===l){return function(e,i,r){const l=[];return l.push(fe(e,i,r,"SymbolHAStyleBarColorsOnPrevClose"),...we(e,i,new o.TranslatedString("Heikin Ashi",n.t(null,void 0,t(40530))),r)),l}(e,i.haStyle.childs(),u)}return c.isJapaneseChartsAvailable&&a.enabled("japanese_chart_styles"),[]}},68622:(e,i,t)=>{t.d(i,{SeriesPropertyDefinitionsViewModel:()=>ae,basePriceSources:()=>re,lineStyleTypes:()=>le,seriesPrecisionValues:()=>se}) +;var n=t(50151),o=t(44352),r=t(47539),l=t(2484),s=t(65279),a=(t(79807),t(40549)),c=t.n(a),d=t(1930),u=t(77906),p=t(36134),h=t(34440);const y=new r.TranslatedString("change {inputName} property",o.t(null,void 0,t(21547)));function v(e){return e.map((e=>({value:e,title:o.t(e,{context:"input"},t(88601))})))}function g(e,i,l,a,u,p,g){const f=[];return l.forEach((l=>{if(!function(e,i){return!e.isHidden&&(void 0===e.visible||function(e,i){if(!e)return!0;const t=e.split("==");return!(t.length<2)&&i[t[0]].value()===t[1]}(e.visible,i))}(l,a))return;const S=l.id;if(!a.hasOwnProperty(S))return;const w=a[S],b=function(e,i){return"style"===e.id?"Box size assignment method":"boxSize"===e.id?"Box size":i.childs().name.value()}(l,u[S]),P=function(e){return o.t(e,{context:"input"},t(88601))}(b),T=new r.TranslatedString(b,P);if("options"in l){const i=(0,n.ensure)(l.options);f.push((0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(e,w,y.format({inputName:T}))},{id:`${g}${l.name}`,title:P,options:new(c())(v(i))}))}else if("integer"!==l.type){if("float"===l.type){let t;return t=function(e,i){return!((i===(0,d.chartStyleStudyId)(4)||i===(0,d.chartStyleStudyId)(6))&&"boxSize"===e||i===(0,d.chartStyleStudyId)(5)&&"reversalAmount"===e)}(S,i)||null===p.value()?new(c())(l.min):p,void f.push((0,s.createNumberPropertyDefinition)({value:(0,s.convertToDefinitionProperty)(e,w,y.format({inputName:T}))},{id:`${g}${l.name}`,title:P,type:1,min:t,max:new(c())(l.max),defval:l.defval}))}"text"!==l.type?"bool"!==l.type||f.push((0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,w,y.format({inputName:T}))},{id:`${g}${l.name}`,title:P})):f.push((0,s.createTextPropertyDefinition)({text:(0,s.convertToDefinitionProperty)(e,w,y.format({inputName:T}))},{id:`${g}${l.name}`,title:P,isEditable:!0,isMultiLine:!1}))}else f.push((0,s.createNumberPropertyDefinition)({value:(0,s.convertToDefinitionProperty)(e,w,y.format({inputName:T}),[h.floor])},{id:`${g}${l.name}`,title:P,type:0,min:new(c())(l.min),max:new(c())(l.max),defval:l.defval}))})),f}var f=t(98351),S=t(33972),w=t(52865),b=t(7019),P=t(12272);const T=(0,f.getLogger)("Chart.Definitions.Series"),m=l.enabled("show_average_close_price_line_and_label"),_=l.enabled("pre_post_market_sessions"),D=new r.TranslatedString("change decimal places",o.t(null,void 0,t(71809))),C=new r.TranslatedString("change timezone",o.t(null,void 0,t(20505))),k=(new r.TranslatedString("adjust data for dividends",o.t(null,void 0,t(42390))),new r.TranslatedString("use settlement as close on daily interval",o.t(null,void 0,t(98402))),new r.TranslatedString("adjust for contract changes",o.t(null,void 0,t(99511))), +new r.TranslatedString("change session",o.t(null,void 0,t(65303)))),M=new r.TranslatedString("change extended hours color",o.t(null,void 0,t(31317))),L=new r.TranslatedString("change pre market color",o.t(null,void 0,t(46257))),$=new r.TranslatedString("change post market color",o.t(null,void 0,t(49973))),I=new r.TranslatedString("change price line visibility",o.t(null,void 0,t(67761))),O=new r.TranslatedString("change price line color",o.t(null,void 0,t(77640))),V=new r.TranslatedString("change price line width",o.t(null,void 0,t(97322))),W=(new r.TranslatedString("change previous close price line visibility",o.t(null,void 0,t(59883))),new r.TranslatedString("change previous close price line color",o.t(null,void 0,t(91183))),new r.TranslatedString("change previous close price line width",o.t(null,void 0,t(87631))),new r.TranslatedString("change pre/post market price lines visibility",o.t(null,void 0,t(50393))),new r.TranslatedString("change pre market line color",o.t(null,void 0,t(60852))),new r.TranslatedString("change post market line color",o.t(null,void 0,t(5969))),new r.TranslatedString("change bid and ask lines visibility",o.t(null,void 0,t(32311))),new r.TranslatedString("change bid line color",o.t(null,void 0,t(36703))),new r.TranslatedString("change ask line color",o.t(null,void 0,t(29180))),new r.TranslatedString("change high and low price lines visibility",o.t(null,void 0,t(92556)))),E=new r.TranslatedString("change high and low price line color",o.t(null,void 0,t(60944))),B=new r.TranslatedString("change high and low price line width",o.t(null,void 0,t(83708))),x=new r.TranslatedString("change average close price line visibility",o.t(null,void 0,t(98866))),N=new r.TranslatedString("change average close price line color",o.t(null,void 0,t(30385))),A=new r.TranslatedString("change average close price line width",o.t(null,void 0,t(90168))),F=(o.t(null,void 0,t(9994)),o.t(null,void 0,t(25866))),R=(o.t(null,void 0,t(10989)),o.t(null,void 0,t(23500)),o.t(null,void 0,t(62521))),j=o.t(null,void 0,t(15107)),U=(o.t(null,void 0,t(8094)),o.t(null,void 0,t(47586)),o.t(null,void 0,t(6350)),o.t(null,void 0,t(73947))),G=o.t(null,void 0,t(87492)),H=o.t(null,void 0,t(39280)),z=o.t(null,void 0,t(30777)),Y=o.t(null,void 0,t(8136)),J=o.t(null,void 0,t(31691)),K=o.t(null,void 0,t(10591)),q=o.t(null,void 0,t(94884)),Q=o.t(null,void 0,t(22353)),X=o.t(null,void 0,t(27879)),Z=o.t(null,void 0,t(44673)),ee=o.t(null,void 0,t(2391)),ie=o.t(null,void 0,t(4329)),te=o.t(null,void 0,t(39292)),ne=o.t(null,void 0,t(70816)),oe=[...function(e=15){const i=[];for(let t=0;t<=e;t++)i.push({priceScale:Math.pow(10,t),minMove:1,frac:!1});return i}(),{priceScale:2,minMove:1,frac:!0},{priceScale:4,minMove:1,frac:!0},{priceScale:8,minMove:1,frac:!0},{priceScale:16,minMove:1,frac:!0},{priceScale:32,minMove:1,frac:!0},{priceScale:64,minMove:1,frac:!0},{priceScale:128,minMove:1,frac:!0},{priceScale:320,minMove:1,frac:!0}],re=[{title:H,value:"open",id:"price-source-open"},{title:z,value:"high",id:"price-source-high"},{title:Y,value:"low", +id:"price-source-low"},{title:J,value:"close",id:"price-source-close"},{title:K,value:"hl2",id:"price-source-hl2"},{title:q,value:"hlc3",id:"price-source-hlc3"},{title:Q,value:"ohlc4",id:"price-source-ohlc4"}],le=[{title:X,value:u.STYLE_LINE_TYPE_SIMPLE},{title:Z,value:u.STYLE_LINE_TYPE_MARKERS},{title:ee,value:u.STYLE_LINE_TYPE_STEP}];function se(){const e=[{title:ie,value:"default"}];for(let i=0;i{(0,s.destroyDefinitions)(e.definitions.value())})),this._series.onStyleChanged().unsubscribe(this,this._updateDefinitions),this._series.dataEvents().symbolResolved().unsubscribeAll(this),this._unsubscribeInputsUpdate(),this._isDestroyed=!0}propertyPages(){return null===this._propertyPages?this._getDefinitions().then((e=>{var i;if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");return null===this._propertyPages&&(this._propertyPages=[{id:this._propertyPageId,title:this._propertyPageName,icon:this._propertyPageIcon,definitions:new(c())(e.definitions),visible:null!==(i=e.visible)&&void 0!==i?i:new(c())(!0).readonly()}]),this._propertyPages})):Promise.resolve(this._propertyPages)}_seriesMinTick(){const e=this._series.symbolInfo();return null!==e?e.minmov/e.pricescale:null}_updateSeriesMinTickWV(){null===this._seriesMinTickWV?this._seriesMinTickWV=new(c())(this._seriesMinTick()):this._seriesMinTickWV.setValue(this._seriesMinTick())}_updateSessionIdOptionsWV(){if(!_)return;const e=this._series.symbolInfo();if(null===e)return;const i=(e.subsessions||[]).filter((e=>!e.private)).map((e=>({title:(0,P.translateSessionDescription)(e.description),value:e.id})));this._sessionIdOptionsWV.setValue(i)}_updateDefinitions(){null!==this._definitions&&(0,s.destroyDefinitions)(this._definitions.definitions),this._definitions=null,this._unsubscribeInputsUpdate(),this._createSeriesDefinitions().then((e=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");(0,n.ensureNotNull)(this._propertyPages)[0].definitions.setValue(e.definitions)}))}_getDefinitions(){return null===this._definitions?this._createSeriesDefinitions():Promise.resolve(this._definitions)}_unsubscribeInputsUpdate(){ +null!==this._inputsSubscriptions&&(this._inputsSubscriptions.forEach((e=>{e.unsubscribeAll(this)})),this._inputsSubscriptions=null)}_subscribeInputsUpdate(e,i){const t=[];e.forEach((e=>{if(void 0!==e.visible){const n=e.visible.split("==");if(2===n.length){const e=i[n[0]];-1===t.indexOf(e)&&(e.subscribe(this,this._updateDefinitions),t.push(e))}}})),t.length>0?this._inputsSubscriptions=t:this._inputsSubscriptions=null}_createSeriesDefinitions(){const e=this._series.properties().childs(),i=this._series.getInputsProperties(),r=this._series.getInputsInfoProperties(),l=e.style.value(),a=this._series.getStyleShortName();return new Promise((e=>{const t=(0,d.chartStyleStudyId)(l);null!==t?this._model.studyMetaInfoRepository().findById({type:"java",studyId:t}).then((t=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");if(null!==this._definitions)return void e(null);const o=(0,n.ensureNotNull)(this._seriesMinTickWV),l=g(this._undoModel,t.id,t.inputs,i,r,o,a);this._subscribeInputsUpdate(t.inputs,i),e(l)})).catch((i=>{T.logWarn(`Find meta info for create series definitions with error - ${(0,S.errorToString)(i)}`),e(null)})):e(null)})).then((i=>{if(this._isDestroyed)throw new Error("SeriesPropertyDefinitionsViewModel already destroyed");if(null!==this._definitions)return this._definitions;const n=(0,p.getSeriesStylePropertiesDefinitions)(this._undoModel,e,l,{seriesPriceSources:re,lineStyleTypes:le,isJapaneseChartsAvailable:true},"mainSeries");null!==i&&n.push(...i);const r=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(this._undoModel,e.minTick,D)},{id:`${a}SymbolMinTick`,title:U,options:new(c())(se())}),u=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(this._undoModel,this._timezonePropertyObj.property,C)},{id:`${a}SymbolTimezone`,title:G,options:new(c())(this._timezonePropertyObj.values)});return this._definitions={definitions:[(0,s.createPropertyDefinitionsGeneralGroup)(n,"generalSymbolStylesGroup",(0,d.getTranslatedChartStyleName)(l)),(0,s.createPropertyDefinitionsGeneralGroup)(this._seriesPriceLinesDefinitions(a),"priceLinesGroup",o.t(null,void 0,t(77986))),(0,s.createPropertyDefinitionsGeneralGroup)([...this._seriesDataDefinitions(a),r,u],"dataModififcationGroup",o.t(null,void 0,t(81285)))]},this._definitions}))}_seriesDataDefinitions(e){const i=[];if(_){const t=this._series.sessionIdProxyProperty(),n=(0,b.combineWithFilteredUpdate)(((e,i)=>!i&&(0,d.symbolHasSeveralSessions)(this._series.symbolInfo())),((e,i)=>i||!e),this._series.symbolResolvingActive(),(0,w.createWVFromProperty)(this._series.isDWMProperty())),o=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(this._undoModel,t,k),visible:(0,s.convertFromReadonlyWVToDefinitionProperty)(n)},{id:"sessionId",title:F,options:this._sessionIdOptionsWV});i.push(o);const r=this._model.sessions().graphicsInfo();let l=!1;r.backgrounds&&(l=void 0!==r.backgrounds.outOfSession) +;const a=l?this._createOutOfSessionDefinition(e):this._createPrePostMarketDefinition(e);i.push(a)}return i}_createOutOfSessionDefinition(e){const i=this._model.sessions().properties().childs().graphics.childs().backgrounds.childs().outOfSession.childs();return(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(this._undoModel,i.color,i.transparency,M)},{id:`${e}SymbolExtendedHoursColors`,title:R})}_createPrePostMarketDefinition(e){const i=(0,b.combineWithFilteredUpdate)(((e,i)=>!i&&(0,d.symbolHasPreOrPostMarket)(this._series.symbolInfo())&&!(0,d.isRegularSessionId)(this._series.sessionIdProxyProperty().value())),((e,i)=>i||!e),this._series.symbolResolvingActive(),(0,w.createWVFromProperty)(this._series.isDWMProperty())),t=this._model.sessions(),n=t.properties().childs().graphics.childs().backgrounds.childs().preMarket.childs(),o=t.properties().childs().graphics.childs().backgrounds.childs().postMarket.childs();return(0,s.createTwoColorsPropertyDefinition)({color1:(0,s.getColorDefinitionProperty)(this._undoModel,n.color,n.transparency,L),color2:(0,s.getColorDefinitionProperty)(this._undoModel,o.color,o.transparency,$),visible:(0,s.convertFromReadonlyWVToDefinitionProperty)(i)},{id:`${e}SymbolExtendedHoursColors`,title:R})}_seriesPriceLinesDefinitions(e){const i=[],t=this._series.properties().childs();if(this._series.hasClosePrice()){const n=(0,s.createLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._undoModel,t.showPriceLine,I),color:(0,s.getColorDefinitionProperty)(this._undoModel,t.priceLineColor,null,O),width:(0,s.convertToDefinitionProperty)(this._undoModel,t.priceLineWidth,V)},{id:`${e}SymbolLastValuePriceLine`,title:j});i.push(n)}this._series.hasClosePrice();const n=t.highLowAvgPrice.childs(),o=(0,s.createLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._undoModel,n.highLowPriceLinesVisible,W),color:(0,s.getColorDefinitionProperty)(this._undoModel,n.highLowPriceLinesColor,null,E),width:(0,s.convertToDefinitionProperty)(this._undoModel,n.highLowPriceLinesWidth,B)},{id:`${e}SymbolHighLowPriceLines`,title:te});if(i.push(o),m){const t=(0,s.createLinePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(this._undoModel,n.averageClosePriceLineVisible,x),color:(0,s.getColorDefinitionProperty)(this._undoModel,n.averagePriceLineColor,null,N),width:(0,s.convertToDefinitionProperty)(this._undoModel,n.averagePriceLineWidth,A)},{id:`${e}SymbolAverageClosePriceLine`,title:ne});i.push(t)}return i}}}}]); \ No newline at end of file diff --git a/charting_library/bundles/ar.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/ar.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index b56472d2..00000000 --- a/charting_library/bundles/ar.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports=["الأعمدة البيانية"]},19648:e=>{e.exports=["‎ ‎ 12 ساعة"]},55838:e=>{e.exports=["24 ساعة"]},88364:e=>{e.exports=["أنماط الرسم البياني الأساسية"]},46720:e=>{e.exports=["مؤشر التقاطع"]},50985:e=>{e.exports=["عملة"]},17319:e=>{e.exports=["العملة والوحدة"]},19481:e=>{e.exports=["المظهر"]},68791:e=>{e.exports=["مدخلات"]},95036:e=>{e.exports=["متوسط سعر الإغلاق"]},27331:e=>{e.exports=["الخلفية"]},22519:e=>{e.exports=["قيمة التغير للعمود"]},87845:e=>{e.exports=["أزرار"]},25209:e=>{e.exports=["تنسيق التاريخ"]},55090:e=>{e.exports=["يوم الأسبوع على الملصقات"]},29601:e=>{e.exports=["الوصف"]},26897:e=>{e.exports=["أحداث"]},95338:e=>{e.exports=["خطوط شبكية أفقية"]},60971:e=>{e.exports=["أعلى وأدنى سعر"]},61142:e=>{e.exports=["مؤشرات"]},34905:e=>{e.exports=["قيمة المؤشرات"]},29687:e=>{e.exports=["قيم المؤشرات والبيانات المالية"]},25084:e=>{e.exports=["اسم المؤشرات والبيانات المالية"]},9654:e=>{e.exports=["اسم المؤشرات"]},99487:e=>{e.exports=["قيم الافتتاح والإغلاق وأعلى وأدنى قيمة (OHLC)"]},75991:e=>{e.exports=["حالة الأسواق المفتوحة"]},70500:e=>{e.exports=["أموال"]},66653:e=>{e.exports=["هوامش"]},42502:e=>{e.exports=["لا تداخل"]},74343:e=>{e.exports=["تنقل"]},43115:e=>{e.exports=["المقاييس"]},53224:e=>{e.exports=["وضع المقاييس"]},79194:e=>{e.exports=["خط الحالة"]},89053:e=>{e.exports=["رمز"]},35383:e=>{e.exports=["اسم الرمز"]},27767:e=>{e.exports=["آخر سعر للرمز"]},40847:e=>{e.exports=["سعر إغلاق اليوم السابق للرمز"]},50446:e=>{e.exports=["جزء"]},73908:e=>{e.exports=["فواصل الأجزاء"]},36014:e=>{e.exports=["نسبة مئوية"]},78621:e=>{e.exports=["نقاط"]},74823:e=>{e.exports=["سعر ما قبل/بعد الجلسة"]},64859:e=>{e.exports=["مقياس الأسعار"]},76523:e=>{e.exports=["السعر وقيمة النسبة المئوية"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["علامة مائية"]},67369:e=>{e.exports=["عنوان"]},31326:e=>{e.exports=["العناوين"]},23097:e=>{e.exports=["الرمز"]},82168:e=>{e.exports=["الرمز والوصف"]},43637:e=>{e.exports=["مقياس الوقت"]},97316:e=>{e.exports=["تنسيق الساعات"]},90801:e=>{e.exports=["تداول"]},77534:e=>{e.exports=["وحدة"]},1111:e=>{e.exports=["حجم التداول"]},80170:e=>{e.exports=["القيمة حسب المقياس"]},91322:e=>{e.exports=["القِيم"]},70353:e=>{e.exports=["خطوط شبكية رأسية"]},57889:e=>{e.exports=["تغيير وضوح قيم OHLC"]},35646:e=>{e.exports=["تغيير وضوح أزرار التنقل"]},18644:e=>{e.exports=["تغيير وضوح حالة السوق المفتوحة"]},45110:e=>{e.exports=["تغيير وضوح تغييرات الأعمدة"]},10349:e=>{e.exports=["تغيير الهامش السفلي"]},88161:e=>{e.exports=["تغيير وضوح وحدات الملصقات والعملة"]},79570:e=>{e.exports=["تغيير وضوح ملصقات العملة"]},99011:e=>{e.exports=["تغيير لون خلفية الرسم البياني"]},72458:e=>{e.exports=["تغيير نوع خلفية الرسم البياني"]},37034:e=>{e.exports=["تغيير عرض التقاطع"]},29951:e=>{e.exports=["تغيير لون التقاطع"]},92027:e=>{e.exports=["تغيير نمط التقاطع"]},50457:e=>{e.exports=["تغيير تنسيق التاريخ"]},7104:e=>{e.exports=["يوم التغير من الأسبوع على الملصقات"]},88096:e=>{e.exports=["تغيير لون خطوط الشبكة الأفقية"]},2523:e=>{ -e.exports=["تغيير نمط خطوط الشبكة الأفقية"]},31325:e=>{e.exports=["تغيير وضوح عناوين المؤشر"]},99774:e=>{e.exports=["تغيير وضوح قيم المؤشر"]},96162:e=>{e.exports=["تغيير وضوح مدخلات المؤشر"]},59820:e=>{e.exports=["وضوح ملصقات تغير المؤشرات وأسماء البيانات المالية"]},90512:e=>{e.exports=["وضوح ملصقات تغير المؤشرات والبيانات المالية"]},97956:e=>{e.exports=["تغيير شفافية خلفية المفتاح التوضيحي"]},61061:e=>{e.exports=["تغيير وضوح خلفية المفتاح التوضيحي"]},37730:e=>{e.exports=["تغيير وضوح أزرار الجزء"]},89032:e=>{e.exports=["تغيير لون فواصل الجزء"]},35636:e=>{e.exports=["تغيير الهامش الأيمن"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["تغيير لون علامة الرمز"]},87159:e=>{e.exports=["تغيير وضوح علامة الرمز"]},26717:e=>{e.exports=["تغيير وضوح وصف رمز"]},28741:e=>{e.exports=["تغيير وضع آخر قيمة للرمز"]},95071:e=>{e.exports=["تغيير تنسيق مفتاح التوضيح الرمز"]},35065:e=>{e.exports=["تغيير لون نص المقاييس"]},84382:e=>{e.exports=["تغيير حجم خط المقاييس"]},12468:e=>{e.exports=["تغيير لون خطوط المقاييس"]},71589:e=>{e.exports=["تغيير وضوح فواصل الجلسات"]},15035:e=>{e.exports=["تغيير عرض فواصل الجلسات"]},1579:e=>{e.exports=["تغيير وضوح لون فواصل الجلسات"]},21460:e=>{e.exports=["تغيير نمط فواصل الجلسات"]},76991:e=>{e.exports=["تغيير تنسيق الساعات"]},98905:e=>{e.exports=["تغيير الهامش العلوي"]},7011:e=>{e.exports=["تغيير وضوح ملصقات الوحدة"]},22722:e=>{e.exports=["تغيير لون خطوط الشبكة العمودية"]},22867:e=>{e.exports=["تغيير نمط خطوط الشبكة العمودية"]},9455:e=>{e.exports=["تغيير وضوح قيم الحجم"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ar.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/ar.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..632698cd --- /dev/null +++ b/charting_library/bundles/ar.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports=["الأعمدة البيانية"]},19648:e=>{e.exports=["‎ ‎ 12 ساعة"]},55838:e=>{e.exports=["24 ساعة"]},88364:e=>{e.exports=["أنماط الرسم البياني الأساسية"]},46720:e=>{e.exports=["مؤشر التقاطع"]},50985:e=>{e.exports=["عملة"]},17319:e=>{e.exports=["العملة والوحدة"]},19481:e=>{e.exports=["المظهر"]},68791:e=>{e.exports=["مدخلات"]},95036:e=>{e.exports=["متوسط سعر الإغلاق"]},27331:e=>{e.exports=["الخلفية"]},22519:e=>{e.exports=["قيمة التغير للعمود"]},87845:e=>{e.exports=["أزرار"]},25209:e=>{e.exports=["تنسيق التاريخ"]},55090:e=>{e.exports=["يوم الأسبوع على الملصقات"]},29601:e=>{e.exports=["الوصف"]},26897:e=>{e.exports=["أحداث"]},95338:e=>{e.exports=["خطوط شبكية أفقية"]},60971:e=>{e.exports=["أعلى وأدنى سعر"]},61142:e=>{e.exports=["مؤشرات"]},34905:e=>{e.exports=["قيمة المؤشرات"]},29687:e=>{e.exports=["قيم المؤشرات والبيانات المالية"]},25084:e=>{e.exports=["اسم المؤشرات والبيانات المالية"]},9654:e=>{e.exports=["اسم المؤشرات"]},99487:e=>{e.exports=["قيم الافتتاح والإغلاق وأعلى وأدنى قيمة (OHLC)"]},75991:e=>{e.exports=["حالة الأسواق المفتوحة"]},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports=["أموال"]},66653:e=>{e.exports=["هوامش"]},42502:e=>{e.exports=["لا تداخل"]},74343:e=>{e.exports=["تنقل"]},43115:e=>{e.exports=["المقاييس"]},53224:e=>{e.exports=["وضع المقاييس"]},79194:e=>{e.exports=["خط الحالة"]},89053:e=>{e.exports=["رمز"]},35383:e=>{e.exports=["اسم الرمز"]},27767:e=>{e.exports=["آخر سعر للرمز"]},40847:e=>{e.exports=["سعر إغلاق اليوم السابق للرمز"]},50446:e=>{e.exports=["جزء"]},73908:e=>{e.exports=["فواصل الأجزاء"]},36014:e=>{e.exports=["نسبة مئوية"]},78621:e=>{e.exports=["نقاط"]},74823:e=>{e.exports=["سعر ما قبل/بعد الجلسة"]},64859:e=>{e.exports=["مقياس الأسعار"]},76523:e=>{e.exports=["السعر وقيمة النسبة المئوية"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["علامة مائية"]},67369:e=>{e.exports=["عنوان"]},31326:e=>{e.exports=["العناوين"]},23097:e=>{e.exports=["الرمز"]},82168:e=>{e.exports=["الرمز والوصف"]},43637:e=>{e.exports=["مقياس الوقت"]},97316:e=>{e.exports=["تنسيق الساعات"]},90801:e=>{e.exports=["تداول"]},77534:e=>{e.exports=["وحدة"]},1111:e=>{e.exports=["حجم التداول"]},80170:e=>{e.exports=["القيمة حسب المقياس"]},91322:e=>{e.exports=["القِيم"]},70353:e=>{e.exports=["خطوط شبكية رأسية"]},57889:e=>{e.exports=["تغيير وضوح قيم OHLC"]},35646:e=>{e.exports=["تغيير وضوح أزرار التنقل"]},18644:e=>{e.exports=["تغيير وضوح حالة السوق المفتوحة"]},45110:e=>{e.exports=["تغيير وضوح تغييرات الأعمدة"]},10349:e=>{e.exports=["تغيير الهامش السفلي"]},88161:e=>{e.exports=["تغيير وضوح وحدات الملصقات والعملة"]},79570:e=>{e.exports=["تغيير وضوح ملصقات العملة"]},99011:e=>{e.exports=["تغيير لون خلفية الرسم البياني"]},72458:e=>{e.exports=["تغيير نوع خلفية الرسم البياني"]},37034:e=>{e.exports=["تغيير عرض التقاطع"]},29951:e=>{e.exports=["تغيير لون التقاطع"]},92027:e=>{e.exports=["تغيير نمط التقاطع"]},50457:e=>{e.exports=["تغيير تنسيق التاريخ"]},7104:e=>{e.exports=["يوم التغير من الأسبوع على الملصقات"]},88096:e=>{ +e.exports=["تغيير لون خطوط الشبكة الأفقية"]},2523:e=>{e.exports=["تغيير نمط خطوط الشبكة الأفقية"]},31325:e=>{e.exports=["تغيير وضوح عناوين المؤشر"]},99774:e=>{e.exports=["تغيير وضوح قيم المؤشر"]},96162:e=>{e.exports=["تغيير وضوح مدخلات المؤشر"]},59820:e=>{e.exports=["وضوح ملصقات تغير المؤشرات وأسماء البيانات المالية"]},90512:e=>{e.exports=["وضوح ملصقات تغير المؤشرات والبيانات المالية"]},97956:e=>{e.exports=["تغيير شفافية خلفية المفتاح التوضيحي"]},61061:e=>{e.exports=["تغيير وضوح خلفية المفتاح التوضيحي"]},37730:e=>{e.exports=["تغيير وضوح أزرار الجزء"]},89032:e=>{e.exports=["تغيير لون فواصل الجزء"]},35636:e=>{e.exports=["تغيير الهامش الأيمن"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["تغيير لون علامة الرمز"]},87159:e=>{e.exports=["تغيير وضوح علامة الرمز"]},26717:e=>{e.exports=["تغيير وضوح وصف رمز"]},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports=["تغيير وضع آخر قيمة للرمز"]},95071:e=>{e.exports=["تغيير تنسيق مفتاح التوضيح الرمز"]},35065:e=>{e.exports=["تغيير لون نص المقاييس"]},84382:e=>{e.exports=["تغيير حجم خط المقاييس"]},12468:e=>{e.exports=["تغيير لون خطوط المقاييس"]},71589:e=>{e.exports=["تغيير وضوح فواصل الجلسات"]},15035:e=>{e.exports=["تغيير عرض فواصل الجلسات"]},1579:e=>{e.exports=["تغيير وضوح لون فواصل الجلسات"]},21460:e=>{e.exports=["تغيير نمط فواصل الجلسات"]},76991:e=>{e.exports=["تغيير تنسيق الساعات"]},98905:e=>{e.exports=["تغيير الهامش العلوي"]},7011:e=>{e.exports=["تغيير وضوح ملصقات الوحدة"]},22722:e=>{e.exports=["تغيير لون خطوط الشبكة العمودية"]},22867:e=>{e.exports=["تغيير نمط خطوط الشبكة العمودية"]},9455:e=>{e.exports=["تغيير وضوح قيم الحجم"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ar.6847.490ee46270bef6a878dd.js b/charting_library/bundles/ar.7257.089fbbc28bead9558b87.js similarity index 71% rename from charting_library/bundles/ar.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/ar.7257.089fbbc28bead9558b87.js index 80038993..f11056ee 100644 --- a/charting_library/bundles/ar.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/ar.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports=["الجمعة"]},11268:e=>{e.exports=["الاثنين"]},63331:e=>{e.exports=["السبت"]},85954:e=>{e.exports=["الأحد"]},26230:e=>{e.exports=["الأربعاء"]},24793:e=>{e.exports=["الخميس"]},31533:e=>{e.exports=["الثلاثاء"]},89790:e=>{e.exports=["لا يمكن ايجاد مصدر الكود البرمجي باين."]},39589:e=>{e.exports=["طي الجزء"]},38154:e=>{e.exports=["تأكيد إزالة نتائج الدراسة"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["أنشئ حساباً مجاناً"]},69419:e=>{e.exports=["كل شيء على ما يرام - السوق مفتوح."]},97637:e=>{e.exports=["أبريل"]},86797:e=>{e.exports=["أغسطس"]},22519:e=>{e.exports=["قيمة التغير للعمود"]},52003:e=>{e.exports=["هل تريد فعلا مسح هذه الدراسة وكل محتوياتها؟"]},68854:e=>{e.exports=["نقرتين متتاليتين"]},97325:e=>{e.exports=["مشكلة في البيانات"]},52916:e=>{e.exports=["يتم تحديث البيانات مرة واحدة في اليوم."]},25978:e=>{e.exports=["لا يتم تحديث البيانات أكثر من مرة واحدة في الثانية، حتى لو كانت هناك عدة تحديثات في السوق."]},57310:e=>{e.exports=["البيانات متأخرة"]},49321:e=>{e.exports=["البيانات المقدمة على العضويات المجانية لا يتم تحديثها أكثر من مرة واحدة كل ثانية، حتى لو كانت هناك عدة تحديثات في السوق."]},55669:e=>{e.exports=["ديسمبر"]},83498:e=>{e.exports=["حذف جزء"]},59315:e=>{e.exports=["بيانات نهاية اليوم"]},82751:e=>{e.exports=["خطأ"]},40519:e=>{e.exports=["السوق مفتوح حاليًا للتداول ما بعد الجلسة."]},80227:e=>{e.exports=["المنطقة الزمنية للبورصة"]},16467:e=>{e.exports=["فبراير"]},25046:e=>{e.exports=["ملء اتفاقية البورصة"]},93666:e=>{e.exports=["وضع علامة على الرمز"]},564:e=>{e.exports=["الجمعة"]},72970:e=>{e.exports=["الجمعة"]},88958:e=>{e.exports=["عطلة"]},21686:e=>{e.exports=["إخفاء وسيلة إيضاح المؤشر"]},26935:e=>{e.exports=["مدخلات المؤشر"]},26315:e=>{e.exports=["عناوين المؤشر"]},84098:e=>{e.exports=["قيم المؤشر"]},91459:e=>{e.exports=["إذا كنت ترغب في الحصول على بيانات ‎{listedExchange}‎ اللحظية، فستحتاج إلى ملء اتفاقية البورصة. لا تقلق، لا يتطلب الأمر سوى بضع نقرات."]},50634:e=>{e.exports=["ستنتقل إلى التداول فيما بعد الجلسة في {remainingTime}."]},74537:e=>{e.exports=["سيتم فتحه للتداول ما قبل الافتتاح في {remainingTime}."]},26910:e=>{e.exports=["يناير"]},23230:e=>{e.exports=["يوليو"]},49385:e=>{e.exports=["يونيو"]},99487:e=>{e.exports=["قيم الافتتاح والإغلاق وأعلى وأدنى قيمة (OHLC)"]},15815:e=>{e.exports=["تحديث واحد لكل ثانية"]},90784:e=>{e.exports=["أكتوبر"]},75991:e=>{e.exports=["حالة الأسواق المفتوحة"]},18429:e=>{e.exports=["تعرف على المزيد"]},39899:e=>{e.exports=["تحريك جزء لأسفل"]},70343:e=>{e.exports=["تحريك جزء لأعلى"]},83085:e=>{e.exports=["يوم الاثنين"]},61199:e=>{e.exports=["الاثنين"]},41610:e=>{e.exports=["المزيد"]},1653:e=>{e.exports=["السوق مفتوح حاليًا للتداول ما قبل الجلسة."]},56470:e=>{e.exports=["تكبير الرسم البياني"]},19603:e=>{e.exports=["تكبير جزء"]},68327:e=>{e.exports=["مايو"]},35732:e=>{e.exports=["إدارة العناصر"]},84675:e=>{e.exports=["مارس"]},83949:e=>{e.exports=["السوق مفتوح"]},35701:e=>{e.exports=["يفتح السوق في {remainingTime}."]},95814:e=>{e.exports=["السوق مغلق"]},98105:e=>{ -e.exports=["يغلق السوق في {remainingTime}."]},87202:e=>{e.exports=["السوق في عطلة حالياً. من حسن حظهم!"]},71194:e=>{e.exports=["نوفمبر"]},66324:e=>{e.exports=["كود المصدر"]},36835:e=>{e.exports=["السبت"]},1144:e=>{e.exports=["السبت"]},40653:e=>{e.exports=["التمرير إلى اليسار"]},26721:e=>{e.exports=["التمرير إلى أخر عمود"]},35809:e=>{e.exports=["التمرير إلى اليمين"]},61132:e=>{e.exports=["سبتمبر"]},28705:e=>{e.exports=["عرض وسيلة إيضاح المؤشر"]},51072:e=>{e.exports=["إظهار عناصر الرسم البياني"]},37809:e=>{e.exports=["إظهار إعدادات النطاق الزمني"]},39045:e=>{e.exports=["خطأ في الدراسة"]},86577:e=>{e.exports=["الأحد"]},72149:e=>{e.exports=["الأحد"]},39339:e=>{e.exports=["عنوان الرمز"]},29985:e=>{e.exports=["ما بعد الجلسة"]},28412:e=>{e.exports=["تتمتع العضويات المدفوعة بتحديثات أسرع للبيانات."]},56042:e=>{e.exports=["ما قبل الجلسة"]},36015:e=>{e.exports=["البيانات اللحظية لـ ‎{description}‎ غير مدعومة في الوقت الحالي، قد تكون متاحة مستقبلاً."]},6667:e=>{e.exports=["البيانات اللحظية لـ ‎{symbolName}‎ مقدمة من بورصة ‎.{exchange}‎"]},48293:e=>{e.exports=["استعادة الرسم البياني"]},91029:e=>{e.exports=["استعادة جزء"]},75094:e=>{e.exports=["الأربعاء"]},7147:e=>{e.exports=["الأربعاء"]},52984:e=>{e.exports=["للحصول على البيانات اللحظية لـ ‎{description}‎، يرجى شراء حزمة البيانات اللحظية."]},9787:e=>{e.exports=["الخميس"]},7951:e=>{e.exports=["الخميس"]},57918:e=>{e.exports=["هذه البيانات هي بيانات لحظية، ولكنها تختلف قليلاً عن نظيرتها الرسمية من السوق الرئيسي."]},68025:e=>{e.exports=["هذه البيانات لحظية، لكنها تختلف قليلاً عن نظيرتها الرسمية الواردة من {exchange}."]},73717:e=>{e.exports=["لا يوجد هذا الرمز. يرجى اختيار رمز آخر."]},57048:e=>{e.exports=["حان وقت المغادرة - هذا السوق مغلق."]},94316:e=>{e.exports=["الثلاثاء"]},44979:e=>{e.exports=["الثلاثاء"]},8209:e=>{e.exports=["إزالة العلامة من الرمز"]},1111:e=>{e.exports=["حجم التداول"]},61311:e=>{e.exports=["تكبير"]},47602:e=>{e.exports=["تصغير"]},57889:e=>{e.exports=["تغيير وضوح قيم OHLC"]},18644:e=>{e.exports=["تغيير وضوح حالة السوق المفتوحة"]},45110:e=>{e.exports=["تغيير وضوح تغييرات الأعمدة"]},31325:e=>{e.exports=["تغيير وضوح عناوين المؤشر"]},99774:e=>{e.exports=["تغيير وضوح قيم المؤشر"]},96162:e=>{e.exports=["تغيير وضوح مدخلات المؤشر"]},26717:e=>{e.exports=["تغيير وضوح وصف رمز"]},9455:e=>{e.exports=["تغيير وضوح قيم الحجم"]},39348:e=>{e.exports=["أقل من دقيقة واحدة"]},87358:e=>{e.exports=["عرض ‎{title}‎"]},7827:e=>{e.exports=["{days} و{hours}"]},7435:e=>{e.exports=["‎{exchange}‎ من ‎{originalExchange}‎"]},19830:e=>{e.exports=["{hours} و{minutes}"]},1084:e=>{e.exports=["بيانات ‎{listedExchange}‎ اللحظية متاحة مجانًا للمستخدمين المسجلين."]},11155:e=>{e.exports=["‎بيانات {symbolName}‎ متأخرة بـ ‎{time}‎ دقيقة"]},77033:e=>{ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports=["الجمعة"]},11268:e=>{e.exports=["الاثنين"]},63331:e=>{e.exports=["السبت"]},85954:e=>{e.exports=["الأحد"]},26230:e=>{e.exports=["الأربعاء"]},24793:e=>{e.exports=["الخميس"]},31533:e=>{e.exports=["الثلاثاء"]},89790:e=>{e.exports=["لا يمكن ايجاد مصدر الكود البرمجي باين."]},39589:e=>{e.exports=["طي الجزء"]},38154:e=>{e.exports=["تأكيد إزالة نتائج الدراسة"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["أنشئ حساباً مجاناً"]},69419:e=>{e.exports=["كل شيء على ما يرام - السوق مفتوح."]},97637:e=>{e.exports=["أبريل"]},86797:e=>{e.exports=["أغسطس"]},22519:e=>{e.exports=["قيمة التغير للعمود"]},52003:e=>{e.exports=["هل تريد فعلا مسح هذه الدراسة وكل محتوياتها؟"]},68854:e=>{e.exports=["نقرتين متتاليتين"]},97325:e=>{e.exports=["مشكلة في البيانات"]},52916:e=>{e.exports=["يتم تحديث البيانات مرة واحدة في اليوم."]},25978:e=>{e.exports=["لا يتم تحديث البيانات أكثر من مرة واحدة في الثانية، حتى لو كانت هناك عدة تحديثات في السوق."]},57310:e=>{e.exports=["البيانات متأخرة"]},49321:e=>{e.exports=["البيانات المقدمة على العضويات المجانية لا يتم تحديثها أكثر من مرة واحدة كل ثانية، حتى لو كانت هناك عدة تحديثات في السوق."]},55669:e=>{e.exports=["ديسمبر"]},83498:e=>{e.exports=["حذف جزء"]},59315:e=>{e.exports=["بيانات نهاية اليوم"]},82751:e=>{e.exports=["خطأ"]},40519:e=>{e.exports=["السوق مفتوح حاليًا للتداول ما بعد الجلسة."]},80227:e=>{e.exports=["المنطقة الزمنية للبورصة"]},16467:e=>{e.exports=["فبراير"]},25046:e=>{e.exports=["ملء اتفاقية البورصة"]},93666:e=>{e.exports=["وضع علامة على الرمز"]},564:e=>{e.exports=["الجمعة"]},72970:e=>{e.exports=["الجمعة"]},88958:e=>{e.exports=["عطلة"]},21686:e=>{e.exports=["إخفاء وسيلة إيضاح المؤشر"]},26935:e=>{e.exports=["مدخلات المؤشر"]},26315:e=>{e.exports=["عناوين المؤشر"]},84098:e=>{e.exports=["قيم المؤشر"]},91459:e=>{e.exports=["إذا كنت ترغب في الحصول على بيانات ‎{listedExchange}‎ اللحظية، فستحتاج إلى ملء اتفاقية البورصة. لا تقلق، لا يتطلب الأمر سوى بضع نقرات."]},50634:e=>{e.exports=["ستنتقل إلى التداول فيما بعد الجلسة في {remainingTime}."]},74537:e=>{e.exports=["سيتم فتحه للتداول ما قبل الافتتاح في {remainingTime}."]},26910:e=>{e.exports=["يناير"]},23230:e=>{e.exports=["يوليو"]},49385:e=>{e.exports=["يونيو"]},99487:e=>{e.exports=["قيم الافتتاح والإغلاق وأعلى وأدنى قيمة (OHLC)"]},15815:e=>{e.exports=["تحديث واحد لكل ثانية"]},90784:e=>{e.exports=["أكتوبر"]},75991:e=>{e.exports=["حالة الأسواق المفتوحة"]},18429:e=>{e.exports=["تعرف على المزيد"]},39899:e=>{e.exports=["تحريك جزء لأسفل"]},70343:e=>{e.exports=["تحريك جزء لأعلى"]},83085:e=>{e.exports=["يوم الاثنين"]},61199:e=>{e.exports=["الاثنين"]},41610:e=>{e.exports=["المزيد"]},1653:e=>{e.exports=["السوق مفتوح حاليًا للتداول ما قبل الجلسة."]},56470:e=>{e.exports=["تكبير الرسم البياني"]},19603:e=>{e.exports=["تكبير جزء"]},68327:e=>{e.exports=["مايو"]},35732:e=>{e.exports=["إدارة العناصر"]},84675:e=>{e.exports=["مارس"]},83949:e=>{e.exports=["السوق مفتوح"]},35701:e=>{e.exports=["يفتح السوق في {remainingTime}."]},95814:e=>{e.exports=["السوق مغلق"]},98105:e=>{ +e.exports=["يغلق السوق في {remainingTime}."]},87202:e=>{e.exports=["السوق في عطلة حالياً. من حسن حظهم!"]},71194:e=>{e.exports=["نوفمبر"]},66324:e=>{e.exports=["كود المصدر"]},36835:e=>{e.exports=["السبت"]},1144:e=>{e.exports=["السبت"]},40653:e=>{e.exports=["التمرير إلى اليسار"]},26721:e=>{e.exports=["التمرير إلى أخر عمود"]},35809:e=>{e.exports=["التمرير إلى اليمين"]},61132:e=>{e.exports=["سبتمبر"]},28705:e=>{e.exports=["عرض وسيلة إيضاح المؤشر"]},51072:e=>{e.exports=["إظهار عناصر الرسم البياني"]},37809:e=>{e.exports=["إظهار إعدادات النطاق الزمني"]},39045:e=>{e.exports=["خطأ في الدراسة"]},86577:e=>{e.exports=["الأحد"]},72149:e=>{e.exports=["الأحد"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["عنوان الرمز"]},29985:e=>{e.exports=["ما بعد الجلسة"]},28412:e=>{e.exports=["تتمتع العضويات المدفوعة بتحديثات أسرع للبيانات."]},56042:e=>{e.exports=["ما قبل الجلسة"]},36015:e=>{e.exports=["البيانات اللحظية لـ ‎{description}‎ غير مدعومة في الوقت الحالي، قد تكون متاحة مستقبلاً."]},6667:e=>{e.exports=["البيانات اللحظية لـ ‎{symbolName}‎ مقدمة من بورصة ‎.{exchange}‎"]},48293:e=>{e.exports=["استعادة الرسم البياني"]},91029:e=>{e.exports=["استعادة جزء"]},75094:e=>{e.exports=["الأربعاء"]},7147:e=>{e.exports=["الأربعاء"]},52984:e=>{e.exports=["للحصول على البيانات اللحظية لـ ‎{description}‎، يرجى شراء حزمة البيانات اللحظية."]},9787:e=>{e.exports=["الخميس"]},7951:e=>{e.exports=["الخميس"]},57918:e=>{e.exports=["هذه البيانات هي بيانات لحظية، ولكنها تختلف قليلاً عن نظيرتها الرسمية من السوق الرئيسي."]},68025:e=>{e.exports=["هذه البيانات لحظية، لكنها تختلف قليلاً عن نظيرتها الرسمية الواردة من {exchange}."]},73717:e=>{e.exports=["لا يوجد هذا الرمز. يرجى اختيار رمز آخر."]},57048:e=>{e.exports=["حان وقت المغادرة - هذا السوق مغلق."]},94316:e=>{e.exports=["الثلاثاء"]},44979:e=>{e.exports=["الثلاثاء"]},8209:e=>{e.exports=["إزالة العلامة من الرمز"]},1111:e=>{e.exports=["حجم التداول"]},61311:e=>{e.exports=["تكبير"]},47602:e=>{e.exports=["تصغير"]},57889:e=>{e.exports=["تغيير وضوح قيم OHLC"]},18644:e=>{e.exports=["تغيير وضوح حالة السوق المفتوحة"]},45110:e=>{e.exports=["تغيير وضوح تغييرات الأعمدة"]},31325:e=>{e.exports=["تغيير وضوح عناوين المؤشر"]},99774:e=>{e.exports=["تغيير وضوح قيم المؤشر"]},96162:e=>{e.exports=["تغيير وضوح مدخلات المؤشر"]},26717:e=>{e.exports=["تغيير وضوح وصف رمز"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["تغيير وضوح قيم الحجم"]},39348:e=>{e.exports=["أقل من دقيقة واحدة"]},87358:e=>{e.exports=["عرض ‎{title}‎"]},7827:e=>{e.exports=["{days} و{hours}"]},7435:e=>{e.exports=["‎{exchange}‎ من ‎{originalExchange}‎"]},19830:e=>{e.exports=["{hours} و{minutes}"]},1084:e=>{e.exports=["بيانات ‎{listedExchange}‎ اللحظية متاحة مجانًا للمستخدمين المسجلين."]},11155:e=>{e.exports=["‎بيانات {symbolName}‎ متأخرة بـ ‎{time}‎ دقيقة"]},77033:e=>{ e.exports=["يتم تحديث البيانات كل {amount} ثانية، حتى إذا كان هناك عدة تحديثات في السوق.","يتم تحديث البيانات كل {amount} ثانية، حتى إذا كان هناك عدة تحديثات في السوق.","يتم تحديث البيانات كل {amount} ثانية، حتى إذا كان هناك عدة تحديثات في السوق.","يتم تحديث البيانات كل {amount} ثانية، حتى إذا كان هناك عدة تحديثات في السوق.","يتم تحديث البيانات كل {amount} ثانية، حتى إذا كان هناك عدة تحديثات في السوق.","يتم تحديث البيانات كل {amount} ثانية، حتى إذا كان هناك عدة تحديثات في السوق."]},2121:e=>{e.exports=["يتم تحديث البيانات الموجودة في الاشتراك المجاني مرة كل {amount} ثانية، حتى إذا كان هناك عدة تحديثات في السوق.","يتم تحديث البيانات الموجودة في الاشتراك المجاني مرة كل {amount} ثانية، حتى إذا كان هناك عدة تحديثات في السوق.","يتم تحديث البيانات الموجودة في الاشتراك المجاني مرة كل {amount} ثانية، حتى إذا كان هناك عدة تحديثات في السوق.","يتم تحديث البيانات الموجودة في الاشتراك المجاني مرة كل {amount} ثانية، حتى إذا كان هناك عدة تحديثات في السوق.","يتم تحديث البيانات الموجودة في الاشتراك المجاني مرة كل {amount} ثانية، حتى إذا كان هناك عدة تحديثات في السوق.","يتم تحديث البيانات الموجودة في الاشتراك المجاني مرة كل {amount} ثانية، حتى إذا كان هناك عدة تحديثات في السوق."]},5223:e=>{e.exports=["تحديث واحد كل {amount} ثانية","تحديث واحد كل {amount} ثانية","تحديث واحد كل {amount} ثانية","تحديث واحد كل {amount} ثانية","تحديث واحد كل {amount} ثانية","تحديث واحد كل {amount} ثانية"]},58609:e=>{e.exports=["{number} يوم","{number} يوم","{number} يوم","{number} أيام","{number} يوم","{number} يوم"]},24430:e=>{e.exports=["{number} ساعة","{number} ساعة","{number} ساعة","{number} ساعات","{number} ساعة","{number} ساعة"]},67151:e=>{e.exports=["{number} دقيقة","{number} دقيقة","{number} دقيقة","{number} دقائق","{number} دقيقة","{number} دقيقة"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ca_ES.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/ca_ES.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 1f542f10..00000000 --- a/charting_library/bundles/ca_ES.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports=["barres"]},19648:e=>{e.exports=["12 hores"]},55838:e=>{e.exports=["24 hores"]},88364:e=>{e.exports=["Estils bàsics del gràfic"]},46720:e=>{e.exports=["Retícula"]},50985:e=>{e.exports=["Divisa"]},17319:e=>{e.exports=["Divisa i unitat"]},19481:e=>{e.exports=["Aparença"]},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports=["Preu mitjà de tancament"]},27331:e=>{e.exports=["Fons"]},22519:e=>{e.exports=["Valors dels canvis a la barra"]},87845:e=>{e.exports=["Botons"]},25209:e=>{e.exports=["Format de data"]},55090:e=>{e.exports=["Dia de la setmana a les etiquetes"]},29601:e=>{e.exports=["Descripció"]},26897:e=>{e.exports=["Esdeveniments"]},95338:e=>{e.exports=["Línies horitzontals a les quadrícules"]},60971:e=>{e.exports=["Preu màxim i mínim"]},61142:e=>{e.exports=["Indicadors"]},34905:e=>{e.exports=["Valor dels indicadors"]},29687:e=>{e.exports=["Valors dels indicadors i de la informació financera"]},25084:e=>{e.exports=["Nom dels indicadors i de la informació financera"]},9654:e=>{e.exports=["Nom dels indicadors"]},99487:e=>{e.exports=["Valors OHLC"]},75991:e=>{e.exports=["Estat del mercat obert"]},70500:e=>{e.exports="Money"},66653:e=>{e.exports=["Marges"]},42502:e=>{e.exports=["Sense superposició"]},74343:e=>{e.exports=["Navegació"]},43115:e=>{e.exports=["Escales"]},53224:e=>{e.exports=["Col·locació d'escales"]},79194:e=>{e.exports=["Línia d'estat"]},89053:e=>{e.exports=["Símbol"]},35383:e=>{e.exports=["Nom del símbol"]},27767:e=>{e.exports=["Últim preu del símbol"]},40847:e=>{e.exports=["Preu de tancament del dia anterior del símbol"]},50446:e=>{e.exports=["Quadre"]},73908:e=>{e.exports=["Separadors del quadre"]},36014:e=>{e.exports=["Percentatge"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports=["Preu pre/post mercat"]},64859:e=>{e.exports=["Escala de preus"]},76523:e=>{e.exports=["Preu i valor percentual"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Marca d'aigua"]},67369:e=>{e.exports=["Títol"]},31326:e=>{e.exports=["Títols"]},23097:e=>{e.exports=["Tíquer"]},82168:e=>{e.exports=["Tíquer i descripció"]},43637:e=>{e.exports=["Escala de temps"]},97316:e=>{e.exports=["Format de les hores"]},90801:e=>{e.exports="Trading"},77534:e=>{e.exports=["Unitat"]},1111:e=>{e.exports=["Volum"]},80170:e=>{e.exports=["Valor conforme a l'escala"]},91322:e=>{e.exports=["Valors"]},70353:e=>{e.exports=["Línies verticals a les quadrícules"]},57889:e=>{e.exports=["canvia la visibilitat dels valors OHLC"]},35646:e=>{e.exports=["canvia la visibilitat dels botons de navegació"]},18644:e=>{e.exports=["canvia la visibilitat de l'estat de mercat obert"]},45110:e=>{e.exports=["canvia la visibilitat del canvi de barra"]},10349:e=>{e.exports=["canvia el marge inferior"]},88161:e=>{e.exports=["canvia la visibilitat de les etiquetes de divises i unitats"]},79570:e=>{e.exports=["canvia la visibilitat de l'etiqueta de divises"]},99011:e=>{e.exports=["canvia el color de fons del gràfic"]},72458:e=>{ -e.exports=["canvia el tipus de fons del gràfic"]},37034:e=>{e.exports=["canvia l'ample de la retícula"]},29951:e=>{e.exports=["canvia el color de la retícula"]},92027:e=>{e.exports=["canvia l'estil de la retícula"]},50457:e=>{e.exports=["canviar el format de data"]},7104:e=>{e.exports=["canvia dia de la setmana a les etiquetes"]},88096:e=>{e.exports=["canvia el color de les línies de la quadrícula horitzontal"]},2523:e=>{e.exports=["canvia l'estil de les línies de la quadrícula horitzontal"]},31325:e=>{e.exports=["canvia la visibilitat dels títols dels indicadors"]},99774:e=>{e.exports=["canvia la visibilitat dels valors dels indicadors"]},96162:e=>{e.exports=["canvia la visibilitat dels arguments dels indicadors"]},59820:e=>{e.exports=["canvia la visibilitat de les etiquetes amb el nom dels indicadors i de la informació financera"]},90512:e=>{e.exports=["canvia la visibilitat de les etiquetes amb el valor dels indicadors i la informació financera"]},97956:e=>{e.exports=["canvia la transparència del fons de la llegenda"]},61061:e=>{e.exports=["canvia la visibilitat del fons de la llegenda"]},37730:e=>{e.exports=["canvia la visibilitat dels botons del quadre"]},89032:e=>{e.exports=["Canvia el color dels separadors de quadres"]},35636:e=>{e.exports=["canvia el marge dret"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["canvia el color de la marca d'aigua del símbol"]},87159:e=>{e.exports=["canvia la visibilitat de la marca d'aigua del símbol"]},26717:e=>{e.exports=["canvia la visibilitat de la descripció del símbol"]},28741:e=>{e.exports=["canvia el mode de l'últim valor del símbol"]},95071:e=>{e.exports=["canvia el format de la llegenda del símbol"]},35065:e=>{e.exports=["canvia el color del text de l'escala"]},84382:e=>{e.exports=["canvia la mida de la font de l'escala"]},12468:e=>{e.exports=["canvia el color de la línia de l'escala"]},71589:e=>{e.exports=["canvia la visibilitat dels trencaments de les sessions"]},15035:e=>{e.exports=["canvia l'ample dels trencaments de les sessions"]},1579:e=>{e.exports=["canvia el color del trencament de les sessions"]},21460:e=>{e.exports=["canvia l'estil dels trencaments de les sessions"]},76991:e=>{e.exports=["canvia el format de les hores"]},98905:e=>{e.exports=["canvia el marge superior"]},7011:e=>{e.exports=["canvia la visibilitat de l'etiqueta d'unitats"]},22722:e=>{e.exports=["canvia el color de les línies de la quadrícula vertical"]},22867:e=>{e.exports=["canvia l'estil de les línies de la quadrícula vertical"]},9455:e=>{e.exports=["canvia la visibilitat dels valors de volum"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ca_ES.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/ca_ES.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..2b374155 --- /dev/null +++ b/charting_library/bundles/ca_ES.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports=["barres"]},19648:e=>{e.exports=["12 hores"]},55838:e=>{e.exports=["24 hores"]},88364:e=>{e.exports=["Estils bàsics del gràfic"]},46720:e=>{e.exports=["Retícula"]},50985:e=>{e.exports=["Divisa"]},17319:e=>{e.exports=["Divisa i unitat"]},19481:e=>{e.exports=["Aparença"]},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports=["Preu mitjà de tancament"]},27331:e=>{e.exports=["Fons"]},22519:e=>{e.exports=["Valors dels canvis a la barra"]},87845:e=>{e.exports=["Botons"]},25209:e=>{e.exports=["Format de data"]},55090:e=>{e.exports=["Dia de la setmana a les etiquetes"]},29601:e=>{e.exports=["Descripció"]},26897:e=>{e.exports=["Esdeveniments"]},95338:e=>{e.exports=["Línies horitzontals a les quadrícules"]},60971:e=>{e.exports=["Preu màxim i mínim"]},61142:e=>{e.exports=["Indicadors"]},34905:e=>{e.exports=["Valor dels indicadors"]},29687:e=>{e.exports=["Valors dels indicadors i de la informació financera"]},25084:e=>{e.exports=["Nom dels indicadors i de la informació financera"]},9654:e=>{e.exports=["Nom dels indicadors"]},99487:e=>{e.exports=["Valors OHLC"]},75991:e=>{e.exports=["Estat del mercat obert"]},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports="Money"},66653:e=>{e.exports=["Marges"]},42502:e=>{e.exports=["Sense superposició"]},74343:e=>{e.exports=["Navegació"]},43115:e=>{e.exports=["Escales"]},53224:e=>{e.exports=["Col·locació d'escales"]},79194:e=>{e.exports=["Línia d'estat"]},89053:e=>{e.exports=["Símbol"]},35383:e=>{e.exports=["Nom del símbol"]},27767:e=>{e.exports=["Últim preu del símbol"]},40847:e=>{e.exports=["Preu de tancament del dia anterior del símbol"]},50446:e=>{e.exports=["Quadre"]},73908:e=>{e.exports=["Separadors del quadre"]},36014:e=>{e.exports=["Percentatge"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports=["Preu pre/post mercat"]},64859:e=>{e.exports=["Escala de preus"]},76523:e=>{e.exports=["Preu i valor percentual"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Marca d'aigua"]},67369:e=>{e.exports=["Títol"]},31326:e=>{e.exports=["Títols"]},23097:e=>{e.exports=["Tíquer"]},82168:e=>{e.exports=["Tíquer i descripció"]},43637:e=>{e.exports=["Escala de temps"]},97316:e=>{e.exports=["Format de les hores"]},90801:e=>{e.exports="Trading"},77534:e=>{e.exports=["Unitat"]},1111:e=>{e.exports=["Volum"]},80170:e=>{e.exports=["Valor conforme a l'escala"]},91322:e=>{e.exports=["Valors"]},70353:e=>{e.exports=["Línies verticals a les quadrícules"]},57889:e=>{e.exports=["canvia la visibilitat dels valors OHLC"]},35646:e=>{e.exports=["canvia la visibilitat dels botons de navegació"]},18644:e=>{e.exports=["canvia la visibilitat de l'estat de mercat obert"]},45110:e=>{e.exports=["canvia la visibilitat del canvi de barra"]},10349:e=>{e.exports=["canvia el marge inferior"]},88161:e=>{e.exports=["canvia la visibilitat de les etiquetes de divises i unitats"]},79570:e=>{e.exports=["canvia la visibilitat de l'etiqueta de divises"]},99011:e=>{e.exports=["canvia el color de fons del gràfic"]},72458:e=>{ +e.exports=["canvia el tipus de fons del gràfic"]},37034:e=>{e.exports=["canvia l'ample de la retícula"]},29951:e=>{e.exports=["canvia el color de la retícula"]},92027:e=>{e.exports=["canvia l'estil de la retícula"]},50457:e=>{e.exports=["canviar el format de data"]},7104:e=>{e.exports=["canvia dia de la setmana a les etiquetes"]},88096:e=>{e.exports=["canvia el color de les línies de la quadrícula horitzontal"]},2523:e=>{e.exports=["canvia l'estil de les línies de la quadrícula horitzontal"]},31325:e=>{e.exports=["canvia la visibilitat dels títols dels indicadors"]},99774:e=>{e.exports=["canvia la visibilitat dels valors dels indicadors"]},96162:e=>{e.exports=["canvia la visibilitat dels arguments dels indicadors"]},59820:e=>{e.exports=["canvia la visibilitat de les etiquetes amb el nom dels indicadors i de la informació financera"]},90512:e=>{e.exports=["canvia la visibilitat de les etiquetes amb el valor dels indicadors i la informació financera"]},97956:e=>{e.exports=["canvia la transparència del fons de la llegenda"]},61061:e=>{e.exports=["canvia la visibilitat del fons de la llegenda"]},37730:e=>{e.exports=["canvia la visibilitat dels botons del quadre"]},89032:e=>{e.exports=["Canvia el color dels separadors de quadres"]},35636:e=>{e.exports=["canvia el marge dret"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["canvia el color de la marca d'aigua del símbol"]},87159:e=>{e.exports=["canvia la visibilitat de la marca d'aigua del símbol"]},26717:e=>{e.exports=["canvia la visibilitat de la descripció del símbol"]},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports=["canvia el mode de l'últim valor del símbol"]},95071:e=>{e.exports=["canvia el format de la llegenda del símbol"]},35065:e=>{e.exports=["canvia el color del text de l'escala"]},84382:e=>{e.exports=["canvia la mida de la font de l'escala"]},12468:e=>{e.exports=["canvia el color de la línia de l'escala"]},71589:e=>{e.exports=["canvia la visibilitat dels trencaments de les sessions"]},15035:e=>{e.exports=["canvia l'ample dels trencaments de les sessions"]},1579:e=>{e.exports=["canvia el color del trencament de les sessions"]},21460:e=>{e.exports=["canvia l'estil dels trencaments de les sessions"]},76991:e=>{e.exports=["canvia el format de les hores"]},98905:e=>{e.exports=["canvia el marge superior"]},7011:e=>{e.exports=["canvia la visibilitat de l'etiqueta d'unitats"]},22722:e=>{e.exports=["canvia el color de les línies de la quadrícula vertical"]},22867:e=>{e.exports=["canvia l'estil de les línies de la quadrícula vertical"]},9455:e=>{e.exports=["canvia la visibilitat dels valors de volum"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ca_ES.6847.490ee46270bef6a878dd.js b/charting_library/bundles/ca_ES.7257.089fbbc28bead9558b87.js similarity index 55% rename from charting_library/bundles/ca_ES.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/ca_ES.7257.089fbbc28bead9558b87.js index a1eb905b..992affa4 100644 --- a/charting_library/bundles/ca_ES.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/ca_ES.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports=["Dv"]},11268:e=>{e.exports=["Dl"]},63331:e=>{e.exports=["Ds"]},85954:e=>{e.exports=["Dg"]},26230:e=>{e.exports=["Dc"]},24793:e=>{e.exports=["Dj"]},31533:e=>{e.exports=["Ma"]},89790:e=>{e.exports=["No s'ha pogut obtenir el codi font Pine."]},39589:e=>{e.exports=["Col·lapsa quadre"]},38154:e=>{e.exports=["Confirma Treure arbre d'estudi"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Creeu un compte gratuït"]},69419:e=>{e.exports=["Tot va bé: el mercat està obert."]},97637:e=>{e.exports=["Abril"]},86797:e=>{e.exports=["Agost"]},22519:e=>{e.exports=["Valors dels canvis a la barra"]},52003:e=>{e.exports=["De debò que voleu eliminar l'estudi i tots els fills?"]},68854:e=>{e.exports=["Feu doble clic"]},97325:e=>{e.exports=["Error a les dades"]},52916:e=>{e.exports=["Les dades s'actualitzen un cop al dia."]},25978:e=>{e.exports=["Les dades s'actualitzen una vegada per segon, encara que mentrestant hi hagi més actualitzacions al mercat."]},57310:e=>{e.exports=["Les dades es retarden"]},49321:e=>{e.exports=["Les dades que es proporcionen en el pla bàsic s'actualitzen una vegada per segon, encara que mentrestant hi hagi més actualitzacions al mercat."]},55669:e=>{e.exports=["Desembre"]},83498:e=>{e.exports=["Elimina quadre"]},59315:e=>{e.exports=["Dades de tancament diari"]},82751:e=>{e.exports="Error"},40519:e=>{e.exports=["Bona tarda. El mercat està obert per al trading postmercat."]},80227:e=>{e.exports=["Zona horària del mercat de valors"]},16467:e=>{e.exports=["Febrer"]},25046:e=>{e.exports=["Completeu els acords dels mercats de valors"]},93666:e=>{e.exports=["Marca el símbol"]},564:e=>{e.exports=["Dv"]},72970:e=>{e.exports=["Divendres"]},88958:e=>{e.exports=["Festiu"]},21686:e=>{e.exports=["Oculta la llegenda de l'indicador"]},26935:e=>{e.exports=["Arguments dels indicadors"]},26315:e=>{e.exports=["Títols dels indicadors"]},84098:e=>{e.exports=["Valors dels indicadors"]},91459:e=>{e.exports=["Si voleu obtenir dades en temps real de {listedExchange}, haureu d'emplenar un Acord del mercat de valors. No us amoïneu, no trigareu gaire."]},50634:e=>{e.exports=["La sessió de trading postmercat començarà d'aquí a {remainingTime}"]},74537:e=>{e.exports=["El trading premercat començarà d'aquí a {remainingTime}"]},26910:e=>{e.exports=["Gener"]},23230:e=>{e.exports=["Juliol"]},49385:e=>{e.exports=["Juny"]},99487:e=>{e.exports=["Valors OHLC"]},15815:e=>{e.exports=["Una actualització per segon"]},90784:e=>{e.exports=["Octubre"]},75991:e=>{e.exports=["Estat del mercat obert"]},18429:e=>{e.exports=["Més informació"]},39899:e=>{e.exports=["Moure quadre cap avall"]},70343:e=>{e.exports=["Moure quadre cap amunt"]},83085:e=>{e.exports=["Dl"]},61199:e=>{e.exports=["Dilluns"]},41610:e=>{e.exports=["Més"]},1653:e=>{e.exports=["Bon dia. El mercat està obert només per a sessions de negociació premercat."]},56470:e=>{e.exports=["Maximitza gràfic"]},19603:e=>{e.exports=["Maximitzar quadre"]},68327:e=>{e.exports=["Maig"]},35732:e=>{ -e.exports=["Gestiona quadres"]},84675:e=>{e.exports=["Març"]},83949:e=>{e.exports=["Mercat obert"]},35701:e=>{e.exports=["El mercat obre d'aquí a {remainingTime}"]},95814:e=>{e.exports=["Mercat tancat"]},98105:e=>{e.exports=["El mercat tanca d'aquí a {remainingTime}"]},87202:e=>{e.exports=["El mercat està de vacances ara. Quina sort!"]},71194:e=>{e.exports=["Novembre"]},66324:e=>{e.exports=["Codi font"]},36835:e=>{e.exports=["Ds"]},1144:e=>{e.exports=["Dissabte"]},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports=["Setembre"]},28705:e=>{e.exports=["Mostra la llegenda de l'indicador"]},51072:e=>{e.exports=["Mostra arbre d'objectes"]},37809:e=>{e.exports=["Mostra la configuració dels intervals"]},39045:e=>{e.exports=["Error d'estudi"]},86577:e=>{e.exports=["Dg"]},72149:e=>{e.exports=["Diumenge"]},39339:e=>{e.exports=["Títol del símbol"]},29985:e=>{e.exports=["Postmercat"]},28412:e=>{e.exports=["Les actualitzacions de dades dels plans de pagament són més ràpides."]},56042:e=>{e.exports=["Premercat"]},36015:e=>{e.exports=["Ara no estan disponibles les dades en temps real per a {description}. Amb tot, és possible que es pugui accedir a aquestes dades en el futur."]},6667:e=>{e.exports=["{exchange} proporciona dades en temps real per a {symbolName}"]},48293:e=>{e.exports=["Restaura gràfic"]},91029:e=>{e.exports=["Restaura quadre"]},75094:e=>{e.exports=["Dc"]},7147:e=>{e.exports=["Dimecres"]},52984:e=>{e.exports=["Si voleu obtenir dades en temps real per a {description}, compreu el paquet de dades en temps real."]},9787:e=>{e.exports=["Dj"]},7951:e=>{e.exports=["Dijous"]},57918:e=>{e.exports=["Aquestes dades es mostren en temps real, encara que canvien una mica respecte a les de la contrapart oficials dels principals mercats de valors."]},68025:e=>{e.exports=["Aquestes dades es mostren en temps real, però són una mica diferents respecte als de la contrapart oficial rebudes de {exchange}"]},73717:e=>{e.exports=["Aquest símbol no existeix. Si us plau, escolliu-ne un altre."]},57048:e=>{e.exports=["És hora de fer un tomb: aquest mercat està tancat."]},94316:e=>{e.exports=["Març"]},44979:e=>{e.exports=["Dimarts"]},8209:e=>{e.exports=["Desmarca el símbol"]},1111:e=>{e.exports=["Volum"]},61311:e=>{e.exports=["Augmenta"]},47602:e=>{e.exports=["Allunya"]},57889:e=>{e.exports=["canvia la visibilitat dels valors OHLC"]},18644:e=>{e.exports=["canvia la visibilitat de l'estat de mercat obert"]},45110:e=>{e.exports=["canvia la visibilitat del canvi de barra"]},31325:e=>{e.exports=["canvia la visibilitat dels títols dels indicadors"]},99774:e=>{e.exports=["canvia la visibilitat dels valors dels indicadors"]},96162:e=>{e.exports=["canvia la visibilitat dels arguments dels indicadors"]},26717:e=>{e.exports=["canvia la visibilitat de la descripció del símbol"]},9455:e=>{e.exports=["canvia la visibilitat dels valors de volum"]},39348:e=>{e.exports=["menys d'un minut"]},87358:e=>{e.exports=["mostra {title}"]},7827:e=>{ -e.exports=["{days} i {hours}"]},7435:e=>{e.exports=["{exchange} per {originalExchange}"]},19830:e=>{e.exports=["{hours} i {minutes}"]},1084:e=>{e.exports=["Els usuaris registrats tenen disponibles, de franc, les dades en temps real de {listedExchange}"]},11155:e=>{e.exports=["Les dades de {symbolName} es retarden {time} minuts"]},77033:e=>{e.exports="Data is updated once every {amount} second, even if there are more updates on the market."},2121:e=>{e.exports="Data on our Basic plan is updated once every {amount} second, even if there are more updates on the market."},5223:e=>{e.exports="One update every {amount} second"},58609:e=>{e.exports=["{number} dia","{number} dies"]},24430:e=>{e.exports=["{number} hora","{number} hores"]},67151:e=>{e.exports=["{number} minut","{number} minuts"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports=["Dv"]},11268:e=>{e.exports=["Dl"]},63331:e=>{e.exports=["Ds"]},85954:e=>{e.exports=["Dg"]},26230:e=>{e.exports=["Dc"]},24793:e=>{e.exports=["Dj"]},31533:e=>{e.exports=["Ma"]},89790:e=>{e.exports=["No s'ha pogut obtenir el codi font Pine."]},39589:e=>{e.exports=["Col·lapsa quadre"]},38154:e=>{e.exports=["Confirma Treure arbre d'estudi"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Creeu un compte gratuït"]},69419:e=>{e.exports=["Tot va bé: el mercat està obert."]},97637:e=>{e.exports=["Abril"]},86797:e=>{e.exports=["Agost"]},22519:e=>{e.exports=["Valors dels canvis a la barra"]},52003:e=>{e.exports=["De debò que voleu eliminar l'estudi i tots els fills?"]},68854:e=>{e.exports=["Feu doble clic"]},97325:e=>{e.exports=["Error a les dades"]},52916:e=>{e.exports=["Les dades s'actualitzen un cop al dia."]},25978:e=>{e.exports=["Les dades s'actualitzen una vegada per segon, encara que mentrestant hi hagi més actualitzacions al mercat."]},57310:e=>{e.exports=["Les dades es retarden"]},49321:e=>{e.exports=["Les dades que es proporcionen en el pla bàsic s'actualitzen una vegada per segon, encara que mentrestant hi hagi més actualitzacions al mercat."]},55669:e=>{e.exports=["Desembre"]},83498:e=>{e.exports=["Elimina quadre"]},59315:e=>{e.exports=["Dades de tancament diari"]},82751:e=>{e.exports="Error"},40519:e=>{e.exports=["Bona tarda. El mercat està obert per al trading postmercat."]},80227:e=>{e.exports=["Zona horària del mercat de valors"]},16467:e=>{e.exports=["Febrer"]},25046:e=>{e.exports=["Completeu els acords dels mercats de valors"]},93666:e=>{e.exports=["Marca el símbol"]},564:e=>{e.exports=["Dv"]},72970:e=>{e.exports=["Divendres"]},88958:e=>{e.exports=["Festiu"]},21686:e=>{e.exports=["Oculta la llegenda de l'indicador"]},26935:e=>{e.exports=["Arguments dels indicadors"]},26315:e=>{e.exports=["Títols dels indicadors"]},84098:e=>{e.exports=["Valors dels indicadors"]},91459:e=>{e.exports=["Si voleu obtenir dades en temps real de {listedExchange}, haureu d'emplenar un Acord del mercat de valors. No us amoïneu, no trigareu gaire."]},50634:e=>{e.exports=["La sessió de trading postmercat començarà d'aquí a {remainingTime}"]},74537:e=>{e.exports=["El trading premercat començarà d'aquí a {remainingTime}"]},26910:e=>{e.exports=["Gener"]},23230:e=>{e.exports=["Juliol"]},49385:e=>{e.exports=["Juny"]},99487:e=>{e.exports=["Valors OHLC"]},15815:e=>{e.exports=["Una actualització per segon"]},90784:e=>{e.exports=["Octubre"]},75991:e=>{e.exports=["Estat del mercat obert"]},18429:e=>{e.exports=["Més informació"]},39899:e=>{e.exports=["Moure quadre cap avall"]},70343:e=>{e.exports=["Moure quadre cap amunt"]},83085:e=>{e.exports=["Dl"]},61199:e=>{e.exports=["Dilluns"]},41610:e=>{e.exports=["Més"]},1653:e=>{e.exports=["Bon dia. El mercat està obert només per a sessions de negociació premercat."]},56470:e=>{e.exports=["Maximitza gràfic"]},19603:e=>{e.exports=["Maximitzar quadre"]},68327:e=>{e.exports=["Maig"]},35732:e=>{ +e.exports=["Gestiona quadres"]},84675:e=>{e.exports=["Març"]},83949:e=>{e.exports=["Mercat obert"]},35701:e=>{e.exports=["El mercat obre d'aquí a {remainingTime}"]},95814:e=>{e.exports=["Mercat tancat"]},98105:e=>{e.exports=["El mercat tanca d'aquí a {remainingTime}"]},87202:e=>{e.exports=["El mercat està de vacances ara. Quina sort!"]},71194:e=>{e.exports=["Novembre"]},66324:e=>{e.exports=["Codi font"]},36835:e=>{e.exports=["Ds"]},1144:e=>{e.exports=["Dissabte"]},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports=["Setembre"]},28705:e=>{e.exports=["Mostra la llegenda de l'indicador"]},51072:e=>{e.exports=["Mostra arbre d'objectes"]},37809:e=>{e.exports=["Mostra la configuració dels intervals"]},39045:e=>{e.exports=["Error d'estudi"]},86577:e=>{e.exports=["Dg"]},72149:e=>{e.exports=["Diumenge"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["Títol del símbol"]},29985:e=>{e.exports=["Postmercat"]},28412:e=>{e.exports=["Les actualitzacions de dades dels plans de pagament són més ràpides."]},56042:e=>{e.exports=["Premercat"]},36015:e=>{e.exports=["Ara no estan disponibles les dades en temps real per a {description}. Amb tot, és possible que es pugui accedir a aquestes dades en el futur."]},6667:e=>{e.exports=["{exchange} proporciona dades en temps real per a {symbolName}"]},48293:e=>{e.exports=["Restaura gràfic"]},91029:e=>{e.exports=["Restaura quadre"]},75094:e=>{e.exports=["Dc"]},7147:e=>{e.exports=["Dimecres"]},52984:e=>{e.exports=["Si voleu obtenir dades en temps real per a {description}, compreu el paquet de dades en temps real."]},9787:e=>{e.exports=["Dj"]},7951:e=>{e.exports=["Dijous"]},57918:e=>{e.exports=["Aquestes dades es mostren en temps real, encara que canvien una mica respecte a les de la contrapart oficials dels principals mercats de valors."]},68025:e=>{e.exports=["Aquestes dades es mostren en temps real, però són una mica diferents respecte als de la contrapart oficial rebudes de {exchange}"]},73717:e=>{e.exports=["Aquest símbol no existeix. Si us plau, escolliu-ne un altre."]},57048:e=>{e.exports=["És hora de fer un tomb: aquest mercat està tancat."]},94316:e=>{e.exports=["Març"]},44979:e=>{e.exports=["Dimarts"]},8209:e=>{e.exports=["Desmarca el símbol"]},1111:e=>{e.exports=["Volum"]},61311:e=>{e.exports=["Augmenta"]},47602:e=>{e.exports=["Allunya"]},57889:e=>{e.exports=["canvia la visibilitat dels valors OHLC"]},18644:e=>{e.exports=["canvia la visibilitat de l'estat de mercat obert"]},45110:e=>{e.exports=["canvia la visibilitat del canvi de barra"]},31325:e=>{e.exports=["canvia la visibilitat dels títols dels indicadors"]},99774:e=>{e.exports=["canvia la visibilitat dels valors dels indicadors"]},96162:e=>{e.exports=["canvia la visibilitat dels arguments dels indicadors"]},26717:e=>{e.exports=["canvia la visibilitat de la descripció del símbol"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["canvia la visibilitat dels valors de volum"]},39348:e=>{ +e.exports=["menys d'un minut"]},87358:e=>{e.exports=["mostra {title}"]},7827:e=>{e.exports=["{days} i {hours}"]},7435:e=>{e.exports=["{exchange} per {originalExchange}"]},19830:e=>{e.exports=["{hours} i {minutes}"]},1084:e=>{e.exports=["Els usuaris registrats tenen disponibles, de franc, les dades en temps real de {listedExchange}"]},11155:e=>{e.exports=["Les dades de {symbolName} es retarden {time} minuts"]},77033:e=>{e.exports="Data is updated once every {amount} second, even if there are more updates on the market."},2121:e=>{e.exports="Data on our Basic plan is updated once every {amount} second, even if there are more updates on the market."},5223:e=>{e.exports="One update every {amount} second"},58609:e=>{e.exports=["{number} dia","{number} dies"]},24430:e=>{e.exports=["{number} hora","{number} hores"]},67151:e=>{e.exports=["{number} minut","{number} minuts"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/chart-widget-gui.fa57ee9476d112fd631e.js b/charting_library/bundles/chart-widget-gui.c57c742ff21ef41b19be.js similarity index 53% rename from charting_library/bundles/chart-widget-gui.fa57ee9476d112fd631e.js rename to charting_library/bundles/chart-widget-gui.c57c742ff21ef41b19be.js index 45b02c94..818d3e7c 100644 --- a/charting_library/bundles/chart-widget-gui.fa57ee9476d112fd631e.js +++ b/charting_library/bundles/chart-widget-gui.c57c742ff21ef41b19be.js @@ -1,54 +1,54 @@ (self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[5093],{39640:(e,t,i)=>{"use strict";function s(e,t,i,s,l){function o(l){if(e>l.timeStamp)return;const o=l.target;void 0!==i&&null!==t&&null!==o&&o.ownerDocument===s&&(t.contains(o)||i(l))}return l.click&&s.addEventListener("click",o,!1),l.mouseDown&&s.addEventListener("mousedown",o,!1),l.touchEnd&&s.addEventListener("touchend",o,!1),l.touchStart&&s.addEventListener("touchstart",o,!1),()=>{s.removeEventListener("click",o,!1),s.removeEventListener("mousedown",o,!1),s.removeEventListener("touchend",o,!1),s.removeEventListener("touchstart",o,!1)}}i.d(t,{addOutsideEventListener:()=>s})},967:(e,t,i)=>{"use strict";i.d(t,{weekDaysShortNames:()=>o,weekDaysMiniNames:()=>n});var s=i(44352),l=i(84917);l.Months.JANUARY,s.t(null,void 0,i(26910)),l.Months.FEBRUARY,s.t(null,void 0,i(16467)),l.Months.MARCH,s.t(null,void 0,i(84675)),l.Months.APRIL,s.t(null,void 0,i(97637)),l.Months.MAY,s.t(null,void 0,i(68327)),l.Months.JUNE,s.t(null,void 0,i(49385)),l.Months.JULY,s.t(null,void 0,i(23230)),l.Months.AUGUST,s.t(null,void 0,i(86797)),l.Months.SEPTEMBER,s.t(null,void 0,i(61132)),l.Months.OCTOBER,s.t(null,void 0,i(90784)),l.Months.NOVEMBER,s.t(null,void 0,i(71194)),l.Months.DECEMBER,s.t(null,void 0,i(55669)),l.Months.JANUARY,s.t(null,void 0,i(95425)),l.Months.FEBRUARY,s.t(null,void 0,i(35050)),l.Months.MARCH,s.t(null,void 0,i(51369)),l.Months.APRIL,s.t(null,void 0,i(42762)),l.Months.MAY,s.t(null,{context:"short"},i(27991)),l.Months.JUNE,s.t(null,void 0,i(15224)),l.Months.JULY,s.t(null,void 0,i(6215)),l.Months.AUGUST,s.t(null,void 0,i(38465)),l.Months.SEPTEMBER,s.t(null,void 0,i(57902)),l.Months.OCTOBER,s.t(null,void 0,i(73546)),l.Months.NOVEMBER,s.t(null,void 0,i(71230)),l.Months.DECEMBER,s.t(null,void 0,i(92203)),l.WeekDays.SUNDAY,s.t(null,void 0,i(72149)),l.WeekDays.MONDAY,s.t(null,void 0,i(61199)),l.WeekDays.TUESDAY,s.t(null,void 0,i(44979)),l.WeekDays.WEDNESDAY,s.t(null,void 0,i(7147)),l.WeekDays.THURSDAY,s.t(null,void 0,i(7951)),l.WeekDays.FRIDAY,s.t(null,void 0,i(72970)),l.WeekDays.SATURDAY,s.t(null,void 0,i(1144));const o={[l.WeekDays.SUNDAY]:s.t(null,void 0,i(86577)),[l.WeekDays.MONDAY]:s.t(null,void 0,i(83085)),[l.WeekDays.TUESDAY]:s.t(null,void 0,i(94316)),[l.WeekDays.WEDNESDAY]:s.t(null,void 0,i(75094)),[l.WeekDays.THURSDAY]:s.t(null,void 0,i(9787)),[l.WeekDays.FRIDAY]:s.t(null,void 0,i(564)),[l.WeekDays.SATURDAY]:s.t(null,void 0,i(36835))},n={[l.WeekDays.SUNDAY]:s.t(null,{context:"day_of_week"},i(85954)),[l.WeekDays.MONDAY]:s.t(null,{context:"day_of_week"},i(11268)),[l.WeekDays.TUESDAY]:s.t(null,{context:"day_of_week"},i(31533)),[l.WeekDays.WEDNESDAY]:s.t(null,{context:"day_of_week"},i(26230)),[l.WeekDays.THURSDAY]:s.t(null,{context:"day_of_week"},i(24793)),[l.WeekDays.FRIDAY]:s.t(null,{context:"day_of_week"},i(19801)),[l.WeekDays.SATURDAY]:s.t(null,{context:"day_of_week"},i(63331))}},77975:(e,t,i)=>{"use strict";i.d(t,{useWatchedValueReadonly:()=>l});var s=i(50959);const l=(e,t=!1)=>{ const i="watchedValue"in e?e.watchedValue:void 0,l="defaultValue"in e?e.defaultValue:e.watchedValue.value(),[o,n]=(0,s.useState)(i?i.value():l);return(t?s.useLayoutEffect:s.useEffect)((()=>{if(i){n(i.value());const e=e=>n(e);return i.subscribe(e),()=>i.unsubscribe(e)}return()=>{}}),[i]),o}},49021:e=>{e.exports={"animation-minimize-corner-left-top":"animation-minimize-corner-left-top-qWid4aZU","animation-minimize-corner-right-top":"animation-minimize-corner-right-top-qWid4aZU","animation-minimize-corner-right-bottom":"animation-minimize-corner-right-bottom-qWid4aZU","animation-minimize-corner-left-bottom":"animation-minimize-corner-left-bottom-qWid4aZU","animation-maximize-corner-left-top":"animation-maximize-corner-left-top-qWid4aZU","animation-maximize-corner-right-top":"animation-maximize-corner-right-top-qWid4aZU","animation-maximize-corner-right-bottom":"animation-maximize-corner-right-bottom-qWid4aZU","animation-maximize-corner-left-bottom":"animation-maximize-corner-left-bottom-qWid4aZU"}},1720:e=>{e.exports={wrapper:"wrapper-iSWHgsXm",timezone:"timezone-iSWHgsXm",sessionDayWrapper:"sessionDayWrapper-iSWHgsXm",nowWrapper:"nowWrapper-iSWHgsXm",now:"now-iSWHgsXm",sessionDay:"sessionDay-iSWHgsXm",weekDay:"weekDay-iSWHgsXm",sessionDaySegments:"sessionDaySegments-iSWHgsXm",timeMarkWrapper:"timeMarkWrapper-iSWHgsXm",timeMarkSegment:"timeMarkSegment-iSWHgsXm",timeMark:"timeMark-iSWHgsXm",timeMarkSegmentAlignByEnds:"timeMarkSegmentAlignByEnds-iSWHgsXm",segment:"segment-iSWHgsXm",small:"small-iSWHgsXm",start:"start-iSWHgsXm",end:"end-iSWHgsXm",active:"active-iSWHgsXm",green:"green-iSWHgsXm",orange:"orange-iSWHgsXm",blue:"blue-iSWHgsXm",gray:"gray-iSWHgsXm",tooltip:"tooltip-iSWHgsXm",time:"time-iSWHgsXm"}},39653:e=>{e.exports={marginlegendhoriz:"4px",legend:"legend-G1_Pfvwd",item:"item-G1_Pfvwd",withAction:"withAction-G1_Pfvwd",selected:"selected-G1_Pfvwd",last:"last-G1_Pfvwd",text:"text-G1_Pfvwd",noWrapWrapper:"noWrapWrapper-G1_Pfvwd",noWrap:"noWrap-G1_Pfvwd",series:"series-G1_Pfvwd",valuesAdditionalWrapper:"valuesAdditionalWrapper-G1_Pfvwd",valueItem:"valueItem-G1_Pfvwd",valueTitle:"valueTitle-G1_Pfvwd",valueValue:"valueValue-G1_Pfvwd",hideUniportantValueItems:"hideUniportantValueItems-G1_Pfvwd",unimportant:"unimportant-G1_Pfvwd",valuesWrapper:"valuesWrapper-G1_Pfvwd",wrappable:"wrappable-G1_Pfvwd",directionColumn:"directionColumn-G1_Pfvwd",titleWrapper:"titleWrapper-G1_Pfvwd",button:"button-G1_Pfvwd",statusesWrapper:"statusesWrapper-G1_Pfvwd",buttonsWrapper:"buttonsWrapper-G1_Pfvwd",buttons:"buttons-G1_Pfvwd",noActions:"noActions-G1_Pfvwd",title:"title-G1_Pfvwd",intervalTitle:"intervalTitle-G1_Pfvwd",disabled:"disabled-G1_Pfvwd",disabledOnInterval:"disabledOnInterval-G1_Pfvwd",withDot:"withDot-G1_Pfvwd",withCustomTextColor:"withCustomTextColor-G1_Pfvwd",study:"study-G1_Pfvwd",mainTitle:"mainTitle-G1_Pfvwd",descTitle:"descTitle-G1_Pfvwd",hideValues:"hideValues-G1_Pfvwd",has5Buttons:"has5Buttons-G1_Pfvwd",stayInHoveredMode:"stayInHoveredMode-G1_Pfvwd",withTail:"withTail-G1_Pfvwd",loading:"loading-G1_Pfvwd", loader:"loader-G1_Pfvwd",providerTitle:"providerTitle-G1_Pfvwd",exchangeTitle:"exchangeTitle-G1_Pfvwd",styleTitle:"styleTitle-G1_Pfvwd",minHideIntervalTitle:"minHideIntervalTitle-G1_Pfvwd",microHideIntervalTitle:"microHideIntervalTitle-G1_Pfvwd",hideExchangeProviderTitles:"hideExchangeProviderTitles-G1_Pfvwd",flagged:"flagged-G1_Pfvwd",medium:"medium-G1_Pfvwd",minimized:"minimized-G1_Pfvwd",micro:"micro-G1_Pfvwd",onlyOneButtonCanBeStick:"onlyOneButtonCanBeStick-G1_Pfvwd",touchMode:"touchMode-G1_Pfvwd",buttonIcon:"buttonIcon-G1_Pfvwd",flag:"flag-G1_Pfvwd",invisibleHover:"invisibleHover-G1_Pfvwd",eye:"eye-G1_Pfvwd",eyeLoading:"eyeLoading-G1_Pfvwd","eye-animation":"eye-animation-G1_Pfvwd",intervalEye:"intervalEye-G1_Pfvwd",markerContainer:"markerContainer-G1_Pfvwd",flagWrapper:"flagWrapper-G1_Pfvwd",sourcesWrapper:"sourcesWrapper-G1_Pfvwd",legendMainSourceWrapper:"legendMainSourceWrapper-G1_Pfvwd",sources:"sources-G1_Pfvwd",toggler:"toggler-G1_Pfvwd pane-button-Cky0LHBF",onlyOneSourceShown:"onlyOneSourceShown-G1_Pfvwd",counter:"counter-G1_Pfvwd",iconArrow:"iconArrow-G1_Pfvwd",objectTree:"objectTree-G1_Pfvwd",closed:"closed-G1_Pfvwd",objectsTreeCanBeShown:"objectsTreeCanBeShown-G1_Pfvwd"}},18940:e=>{e.exports={loader:"loader-vqx5DqPL",loaderItem:"loaderItem-vqx5DqPL","loader-animation":"loader-animation-vqx5DqPL",touchMode:"touchMode-vqx5DqPL"}},58064:e=>{e.exports={"css-value-pane-controls-padding-left":"1px","css-value-pane-controls-padding-right":"5px",css_value_pane_controls_margin_top:"6",css_value_pane_controls_button_size:"19",css_value_pane_controls_button_touch_size:"19",paneControls:"paneControls-dKqC8zmq",hidden:"hidden-dKqC8zmq",forceHidden:"forceHidden-dKqC8zmq",button:"button-dKqC8zmq pane-button-Cky0LHBF",buttonIcon:"buttonIcon-dKqC8zmq",minimize:"minimize-dKqC8zmq",restore:"restore-dKqC8zmq",newButton:"newButton-dKqC8zmq",touchMode:"touchMode-dKqC8zmq",maximize:"maximize-dKqC8zmq",collapse:"collapse-dKqC8zmq","maximize-animation-up-bracket":"maximize-animation-up-bracket-dKqC8zmq","maximize-animation-down-bracket":"maximize-animation-down-bracket-dKqC8zmq","minimize-animation-up-bracket":"minimize-animation-up-bracket-dKqC8zmq","minimize-animation-down-bracket":"minimize-animation-down-bracket-dKqC8zmq",up:"up-dKqC8zmq","up-animation":"up-animation-dKqC8zmq",down:"down-dKqC8zmq","down-animation":"down-animation-dKqC8zmq",buttonsWrapper:"buttonsWrapper-dKqC8zmq"}},62927:e=>{e.exports={blockHidden:"blockHidden-Cky0LHBF","pane-button":"pane-button-Cky0LHBF"}},98532:e=>{e.exports={"css-value-small-size":"18px","css-value-medium-size":"22px","css-value-large-size":"28px","css-value-border-radius-small-size":"9px","css-value-border-radius-medium-size":"11px","css-value-border-radius-large-size":"8px",statuses:"statuses-sRKQyF_z",statusItem:"statusItem-sRKQyF_z",small:"small-sRKQyF_z",medium:"medium-sRKQyF_z",large:"large-sRKQyF_z",blinking:"blinking-sRKQyF_z",oneWidgetsVisible:"oneWidgetsVisible-sRKQyF_z",twoWidgetsVisible:"twoWidgetsVisible-sRKQyF_z",threeWidgetsVisible:"threeWidgetsVisible-sRKQyF_z", -"blinking-animation":"blinking-animation-sRKQyF_z",marketStatusOpen:"marketStatusOpen-sRKQyF_z",marketStatusClose:"marketStatusClose-sRKQyF_z",marketStatusPre:"marketStatusPre-sRKQyF_z",marketStatusPost:"marketStatusPost-sRKQyF_z",marketStatusHoliday:"marketStatusHoliday-sRKQyF_z",marketStatusExpired:"marketStatusExpired-sRKQyF_z",invalidSymbol:"invalidSymbol-sRKQyF_z",replayModeAutoPlay:"replayModeAutoPlay-sRKQyF_z",replayModePause:"replayModePause-sRKQyF_z",replayModePointSelect:"replayModePointSelect-sRKQyF_z","blinking-animation-custom":"blinking-animation-custom-sRKQyF_z",notAccurate:"notAccurate-sRKQyF_z",delay:"delay-sRKQyF_z",eod:"eod-sRKQyF_z",dataProblemHigh:"dataProblemHigh-sRKQyF_z",dataProblemLow:"dataProblemLow-sRKQyF_z"}},3791:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ControlBarNavigation:()=>K});var s=i(50151),l=i(44352),o=i(32563),n=i(2484),a=i(11954),r=i(80142),d=i(66032),u=i(61814),h=i(49483),c=i(68335),_=(i(51768),i(47424)),p=i(94881),m=i(15741),g=i(88398),v=i(70340),b=i(45697),w=i(50119),y=i(62884),S=i(50662),M=i(42205),f=i(3106),C=i(78360);i(49021);const E=(0,c.humanReadableModifiers)(c.Modifiers.Alt,!1),k=(0,c.humanReadableModifiers)(c.Modifiers.Shift,!1),V=(0,c.humanReadableModifiers)(c.Modifiers.Mod,!1),x=(0,u.hotKeySerialize)({keys:[E,"R"],text:"{0} + {1}"}),W=(0,u.hotKeySerialize)({keys:[E,"Click",E,"Enter"],text:"{0} + {1}, {2} + {3}"}),T=(0,u.hotKeySerialize)({keys:[w],text:"{0}"}),L=(0,u.hotKeySerialize)({keys:[y],text:"{0}"}),A=(0,u.hotKeySerialize)({keys:[V,S],text:"{0} + {1}"}),H=(0,u.hotKeySerialize)({keys:[V,M],text:"{0} + {1}"}),P=(0,u.hotKeySerialize)({keys:[E,k,y],text:"{0} + {1} + {2}" -}),D=l.t(null,void 0,i(47602)),B=l.t(null,void 0,i(61311)),z=l.t(null,void 0,i(56470)),I=l.t(null,void 0,i(48293)),N=l.t(null,void 0,i(40653)),O=l.t(null,void 0,i(35809)),R=l.t(null,void 0,i(34301)),F=l.t(null,void 0,i(26721)),G=`
\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t${p}\n\t\t\t
\n\t\t\t
\n\t\t\t\t${g}\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t${f}\n\t\t\t
\n\t\t\t
\n\t\t\t\t${C}\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t${_}\n\t\t\t
\n\t\t\t
\n\t\t\t\t${v}\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t${m}\n\t\t\t
\n\t\t
\n\t
\n
`,U=`
\n\t${b}\n
`,j=h.CheckMobile.any(),$="control-bar__btn--btn-hidden",q={zoomInOut:!0,maximize:!0,scrollLeftRight:!0,resetScale:!0,goToRealtime:!0};class K{constructor(e,t,i){this._widget=(0,s.ensureNotNull)((0,d.parseHtml)(G).querySelector(".control-bar-wrapper")),this._controlBar=(0,s.ensureNotNull)(this._widget.querySelector(".control-bar")),this._back=(0,s.ensureNotNull)((0,d.parseHtml)(U).querySelector(".control-bar__btn--back-present")),this._btnGroups=Array.from(this._controlBar.querySelectorAll(".js-btn-group")),this._backButtonVisible=!1,this._boundMouseHandler=null,this._chartModel=null,this._checkIntervalId=0,this._controlBarVisible=!1,this._priceAxisChanged=null,this._resetAvailabilityChanged=null,this._priceAxisName="right",this._rafId=0,this._visibilityTypeProperty=null,this._boundUpdateMaximizeButtonsVisibility=this._updateMaximizeButtonsVisibility.bind(this),this._boundToggleFullscreenButtons=this._toggleFullscreenButtons.bind(this),this._paneWidth=0,this._leftPriceScaleWidth=0,this._rightPriceScaleWidth=0,this._chart=e,this._parent=t, +"blinking-animation":"blinking-animation-sRKQyF_z",marketStatusOpen:"marketStatusOpen-sRKQyF_z",marketStatusClose:"marketStatusClose-sRKQyF_z",marketStatusPre:"marketStatusPre-sRKQyF_z",marketStatusPost:"marketStatusPost-sRKQyF_z",marketStatusHoliday:"marketStatusHoliday-sRKQyF_z",marketStatusExpired:"marketStatusExpired-sRKQyF_z",invalidSymbol:"invalidSymbol-sRKQyF_z",replayModeAutoPlay:"replayModeAutoPlay-sRKQyF_z",replayModePause:"replayModePause-sRKQyF_z",replayModePointSelect:"replayModePointSelect-sRKQyF_z","blinking-animation-custom":"blinking-animation-custom-sRKQyF_z",notAccurate:"notAccurate-sRKQyF_z",delay:"delay-sRKQyF_z",eod:"eod-sRKQyF_z",dataProblemHigh:"dataProblemHigh-sRKQyF_z",dataProblemLow:"dataProblemLow-sRKQyF_z"}},3791:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ControlBarNavigation:()=>K});var s=i(50151),l=i(44352),o=i(32563),n=i(2484),a=i(11954),r=i(80142),d=i(66032),u=i(61814),h=i(49483),c=i(68335),_=(i(51768),i(47424)),p=i(94881),m=i(15741),g=i(88398),v=i(70340),b=i(45697),w=i(50119),y=i(62884),S=i(50662),M=i(42205),f=i(3106),C=i(78360);i(49021);const E=(0,c.humanReadableModifiers)(c.Modifiers.Alt,!1),k=(0,c.humanReadableModifiers)(c.Modifiers.Shift,!1),V=(0,c.humanReadableModifiers)(c.Modifiers.Mod,!1),x=(0,u.hotKeySerialize)({keys:[E,"R"],text:"{0} + {1}"}),T=(0,u.hotKeySerialize)({keys:[E,"Click",E,"Enter"],text:"{0} + {1}, {2} + {3}"}),W=(0,u.hotKeySerialize)({keys:[w],text:"{0}"}),L=(0,u.hotKeySerialize)({keys:[y],text:"{0}"}),A=(0,u.hotKeySerialize)({keys:[V,S],text:"{0} + {1}"}),H=(0,u.hotKeySerialize)({keys:[V,M],text:"{0} + {1}"}),P=(0,u.hotKeySerialize)({keys:[E,k,y],text:"{0} + {1} + {2}" +}),D=l.t(null,void 0,i(47602)),B=l.t(null,void 0,i(61311)),z=l.t(null,void 0,i(56470)),I=l.t(null,void 0,i(48293)),N=l.t(null,void 0,i(40653)),O=l.t(null,void 0,i(35809)),R=l.t(null,void 0,i(34301)),F=l.t(null,void 0,i(26721)),G=`
\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t${p}\n\t\t\t
\n\t\t\t
\n\t\t\t\t${g}\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t${f}\n\t\t\t
\n\t\t\t
\n\t\t\t\t${C}\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t${_}\n\t\t\t
\n\t\t\t
\n\t\t\t\t${v}\n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t${m}\n\t\t\t
\n\t\t
\n\t
\n
`,U=`
\n\t${b}\n
`,j=h.CheckMobile.any(),$="control-bar__btn--btn-hidden",q={zoomInOut:!0,maximize:!0,scrollLeftRight:!0,resetScale:!0,goToRealtime:!0};class K{constructor(e,t,i){this._widget=(0,s.ensureNotNull)((0,d.parseHtml)(G).querySelector(".control-bar-wrapper")),this._controlBar=(0,s.ensureNotNull)(this._widget.querySelector(".control-bar")),this._back=(0,s.ensureNotNull)((0,d.parseHtml)(U).querySelector(".control-bar__btn--back-present")),this._btnGroups=Array.from(this._controlBar.querySelectorAll(".js-btn-group")),this._backButtonVisible=!1,this._boundMouseHandler=null,this._chartModel=null,this._checkIntervalId=0,this._controlBarVisible=!1,this._priceAxisChanged=null,this._resetAvailabilityChanged=null,this._priceAxisName="right",this._rafId=0,this._visibilityTypeProperty=null,this._boundUpdateMaximizeButtonsVisibility=this._updateMaximizeButtonsVisibility.bind(this),this._boundToggleFullscreenButtons=this._toggleFullscreenButtons.bind(this),this._paneWidth=0,this._leftPriceScaleWidth=0,this._rightPriceScaleWidth=0,this._chart=e,this._parent=t, this._options=Object.assign({},q,i),this._visibilityPrioritizedGroups=this._initGroupDescriptions(),this._init(),this._initHandlers(),this.updatePosition()}destroy(){if(null!==this._visibilityTypeProperty&&(this._visibilityTypeProperty.unsubscribe(this,this._onVisibilityTypeChange),this._visibilityTypeProperty=null),null!==this._boundMouseHandler&&(this._parent.removeEventListener("mousemove",this._boundMouseHandler,!1),this._parent.removeEventListener("mouseleave",this._boundMouseHandler,!1),this._boundMouseHandler=null),null!==this._priceAxisChanged&&(this._priceAxisChanged.unsubscribe(this,this._updateBackBtnPosition),this._priceAxisChanged=null),clearInterval(this._checkIntervalId),null!==this._resetAvailabilityChanged){this._resetAvailabilityChanged.unsubscribe(this,this._updateResetScalesButtonVisibility);const e=this._chart.getResizerDetacher();e.fullscreenable.unsubscribe(this._boundUpdateMaximizeButtonsVisibility),e.fullscreen.unsubscribe(this._boundToggleFullscreenButtons),this._resetAvailabilityChanged=null}this._chart=null}updatePosition(){const e=this._chart.paneWidgets();if(0===e.length)return;this._paneWidth=e[0].width(),this._leftPriceScaleWidth=this._chart.getPriceAxisMaxWidthByName("left"),this._rightPriceScaleWidth=this._chart.getPriceAxisMaxWidthByName("right");const t=this._chart.timeAxisHeight()+this._bottomMargin();this._widget.style.bottom=`${t}px`,this._back.style.bottom=`${t}px`,this._updateBtnGroupVisibility()}_bottomMargin(){var e;const t=this._chart.paneWidgets();return(null!==(e=this._chart.maximizedPaneWidget())&&void 0!==e?e:t[t.length-1]).containsMainSeries()?32:5}_init(){if(h.CheckMobile.any())for(const e of this._btnGroups)e.classList.add("js-hidden");this._buttons={zoomIn:this._widget.querySelector(".control-bar__btn--zoom-in"),zoomOut:this._widget.querySelector(".control-bar__btn--zoom-out"),moveLeft:this._widget.querySelector(".control-bar__btn--move-left"),moveRight:this._widget.querySelector(".control-bar__btn--move-right"),turn:this._widget.querySelector(".control-bar__btn--turn-button"),maximize:this._widget.querySelector(".control-bar__btn--maximize"),minimize:this._widget.querySelector(".control-bar__btn--minimize")},this._initVisibility(),this._parent.appendChild(this._widget),this._parent.appendChild(this._back),this._backButtonVisible=!1,this._priceAxisName=(0,r.isRtl)()?"left":"right",this._chart.withModel(this,(()=>{this._chartModel=this._chart.model(),this._priceAxisChanged=this._chart.getPriceAxisWidthChangedByName(this._priceAxisName),this._resetAvailabilityChanged=this._chartModel.model().isScalesResetAvailableChanged(),this._priceAxisChanged.subscribe(this,this._updateBackBtnPosition),this._resetAvailabilityChanged.subscribe(this,this._updateResetScalesButtonVisibility);const e=this._chart.getResizerDetacher();e.fullscreenable.subscribe(this._boundUpdateMaximizeButtonsVisibility),e.fullscreen.subscribe(this._boundToggleFullscreenButtons),this._updateMaximizeButtonsVisibility(),this._updateBackBtnPosition(),this._back.addEventListener("click",(()=>{ null!==this._chartModel&&this._chartModel.timeScale().scrollToRealtime(!0)})),this._checkIntervalId=setInterval((()=>this._check()),1e3)}))}_initHandlers(){const e=o.mobiletouch?"touchstart":"mousedown",t=o.mobiletouch?["touchend"]:["mouseup","mouseout"];this._buttons.moveLeft.addEventListener(e,(e=>{e.preventDefault(),this._chart.scrollHelper().moveByBar(1),this._trackEvent("Move Left")})),this._buttons.moveRight.addEventListener(e,(e=>{e.preventDefault(),this._chart.scrollHelper().moveByBar(-1),this._trackEvent("Move Right")}));for(const e of t)this._buttons.moveLeft.addEventListener(e,(()=>this._chart.scrollHelper().stopMoveByBar())),this._buttons.moveRight.addEventListener(e,(()=>this._chart.scrollHelper().stopMoveByBar()));this._buttons.turn.addEventListener("click",(e=>{e.preventDefault(),this._chart.GUIResetScales(),this._trackEvent("Reset to Default Settings")})),this._buttons.zoomOut.addEventListener("click",(e=>{e.preventDefault(),null!==this._chartModel&&this._chartModel.zoomOut(),this._trackEvent("Zoom Out")})),this._buttons.zoomIn.addEventListener("click",(e=>{e.preventDefault(),null!==this._chartModel&&this._chartModel.zoomIn(),this._trackEvent("Zoom In")})),this._buttons.maximize.addEventListener("click",(e=>{e.preventDefault(),this._chart.setActive(!0),this._chart.getResizerDetacher().requestFullscreen(),this._trackEvent(" Maximize Chart")})),this._buttons.minimize.addEventListener("click",(e=>{e.preventDefault(),this._chart.getResizerDetacher().exitFullscreen(),this._trackEvent(" Restore Chart")}));const i=e=>e.addEventListener("contextmenu",(e=>e.preventDefault()));i(this._buttons.moveLeft),i(this._buttons.moveRight),i(this._buttons.turn),i(this._buttons.zoomOut),i(this._buttons.zoomIn),i(this._buttons.minimize),i(this._buttons.maximize)}_initGroupDescriptions(){return[{shouldBeHiddenOnMobile:!1,available:this._isMaximizeButtonAvailable.bind(this),className:"js-btn-group-maximize",element:this._getBtnGroup("js-btn-group-maximize"),totalWidth:50},{shouldBeHiddenOnMobile:!1,available:()=>this._options.resetScale,className:"js-btn-group-reset-scale",element:this._getBtnGroup("js-btn-group-reset-scale"),totalWidth:50},{shouldBeHiddenOnMobile:!n.enabled("show_zoom_and_move_buttons_on_touch"),available:()=>this._options.zoomInOut,className:"js-btn-group-zoom",element:this._getBtnGroup("js-btn-group-zoom"),totalWidth:86},{shouldBeHiddenOnMobile:!n.enabled("show_zoom_and_move_buttons_on_touch"),available:()=>this._options.scrollLeftRight,className:"js-btn-group-scroll",element:this._getBtnGroup("js-btn-group-scroll"),totalWidth:86}]}_check(){if(null===this._chartModel||!this._options.goToRealtime)return;const e=this._chartModel.timeScale().rightOffset()<0;e!==this._backButtonVisible&&(this._backButtonVisible=e,this._back.classList.toggle($,!this._backButtonVisible))}_initVisibility(){this._visibilityTypeProperty=(0,a.actualBehavior)(),this._visibilityTypeProperty.subscribe(this,this._onVisibilityTypeChange),this._onVisibilityTypeChange()}_onVisibilityTypeChange(){ -if(null===this._visibilityTypeProperty)return;const e=this._visibilityTypeProperty.value();"alwaysOn"===e||"alwaysOff"===e?(this._controlBarVisible="alwaysOn"===e,null!==this._boundMouseHandler&&(this._parent.removeEventListener("mousemove",this._boundMouseHandler,!1),this._parent.removeEventListener("mouseleave",this._boundMouseHandler,!1),this._boundMouseHandler=null)):(this._controlBarVisible=!1,this._boundMouseHandler||(this._boundMouseHandler=this._visibilityMouseHandler.bind(this),this._parent.addEventListener("mousemove",this._boundMouseHandler),this._parent.addEventListener("mouseleave",this._boundMouseHandler))),this._updateControlBarVisibility()}_visibilityMouseHandler(e){if(e.buttons)return;if(null!==this._chartModel&&this._chartModel.lineBeingCreated())return;let t="mouseleave"!==e.type;if("mousemove"===e.type){const i=this._widget.getBoundingClientRect(),s=100-this._bottomMargin();t=e.clientX>=i.left-100&&e.clientX<=i.right+100&&e.clientY>=i.top-s&&e.clientY<=i.bottom+100}this._controlBarVisible!==t&&(this._controlBarVisible=t,null===this._rafId&&(this._rafId=this._controlBar.ownerDocument.defaultView.requestAnimationFrame(this._updateControlBarVisibility.bind(this))))}_updateControlBarVisibility(){this._rafId=null,this._controlBar.classList.toggle("control-bar--hidden",!this._controlBarVisible)}_updateBackBtnPosition(){if("left"===this._priceAxisName||"right"===this._priceAxisName){const e=this._chart.getPriceAxisMaxWidthByName(this._priceAxisName)+14;e&&(this._back.style.marginRight=`${e}px`)}}_updateBtnGroupVisibility(){const e=this._leftPriceScaleWidth+this._paneWidth,t=(e+this._rightPriceScaleWidth)/2;let i=2*Math.min(e-t,t-this._leftPriceScaleWidth)-50-50,s=!1;for(const e of this._visibilityPrioritizedGroups){e.enoughSpaceForGroup=!1;e.available()&&(!j||!e.shouldBeHiddenOnMobile)&&(i-=e.totalWidth,e.enoughSpaceForGroup=i>=0&&!s,s=s||!e.enoughSpaceForGroup),!e.enoughSpaceForGroup!==e.element.classList.contains("js-hidden")&&e.element.classList.toggle("js-hidden",!e.enoughSpaceForGroup)}this._updateControlBarPosition()}_getBtnGroup(e){return(0,s.ensureDefined)(this._btnGroups.find((t=>t.classList.contains(e))))}_updateControlBarPosition(){const e=this._visibilityPrioritizedGroups.reduce(((e,t)=>e+(t.enoughSpaceForGroup?t.totalWidth:0)),0),t=(this._paneWidth+this._leftPriceScaleWidth+this._rightPriceScaleWidth)/2-Math.ceil(e/2);this._widget.style.left=`${t}px`}_updateResetScalesButtonVisibility(){if(null===this._chartModel)return;const e=this._chartModel.model().isScalesResetAvailable();this._buttons.turn.classList.toggle($,!e)}_updateMaximizeButtonsVisibility(){this._updateBtnGroupVisibility()}_toggleFullscreenButtons(){const e=this._chart.getResizerDetacher().fullscreen.value();this._buttons.maximize.classList.toggle("js-hidden",e),this._buttons.minimize.classList.toggle("js-hidden",!e)}_isMaximizeButtonAvailable(){return this._options.maximize,!1}_trackEvent(e){0}}},19401:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LegendWidget:()=>Ks}) +if(null===this._visibilityTypeProperty)return;const e=this._visibilityTypeProperty.value();"alwaysOn"===e||"alwaysOff"===e?(this._controlBarVisible="alwaysOn"===e,null!==this._boundMouseHandler&&(this._parent.removeEventListener("mousemove",this._boundMouseHandler,!1),this._parent.removeEventListener("mouseleave",this._boundMouseHandler,!1),this._boundMouseHandler=null)):(this._controlBarVisible=!1,this._boundMouseHandler||(this._boundMouseHandler=this._visibilityMouseHandler.bind(this),this._parent.addEventListener("mousemove",this._boundMouseHandler),this._parent.addEventListener("mouseleave",this._boundMouseHandler))),this._updateControlBarVisibility()}_visibilityMouseHandler(e){if(e.buttons)return;if(null!==this._chartModel&&this._chartModel.lineBeingCreated())return;let t="mouseleave"!==e.type;if("mousemove"===e.type){const i=this._widget.getBoundingClientRect(),s=100-this._bottomMargin();t=e.clientX>=i.left-100&&e.clientX<=i.right+100&&e.clientY>=i.top-s&&e.clientY<=i.bottom+100}this._controlBarVisible!==t&&(this._controlBarVisible=t,null===this._rafId&&(this._rafId=this._controlBar.ownerDocument.defaultView.requestAnimationFrame(this._updateControlBarVisibility.bind(this))))}_updateControlBarVisibility(){this._rafId=null,this._controlBar.classList.toggle("control-bar--hidden",!this._controlBarVisible)}_updateBackBtnPosition(){if("left"===this._priceAxisName||"right"===this._priceAxisName){const e=this._chart.getPriceAxisMaxWidthByName(this._priceAxisName)+14;e&&(this._back.style.marginRight=`${e}px`)}}_updateBtnGroupVisibility(){const e=this._leftPriceScaleWidth+this._paneWidth,t=(e+this._rightPriceScaleWidth)/2;let i=2*Math.min(e-t,t-this._leftPriceScaleWidth)-50-50,s=!1;for(const e of this._visibilityPrioritizedGroups){e.enoughSpaceForGroup=!1;e.available()&&(!j||!e.shouldBeHiddenOnMobile)&&(i-=e.totalWidth,e.enoughSpaceForGroup=i>=0&&!s,s=s||!e.enoughSpaceForGroup),!e.enoughSpaceForGroup!==e.element.classList.contains("js-hidden")&&e.element.classList.toggle("js-hidden",!e.enoughSpaceForGroup)}this._updateControlBarPosition()}_getBtnGroup(e){return(0,s.ensureDefined)(this._btnGroups.find((t=>t.classList.contains(e))))}_updateControlBarPosition(){const e=this._visibilityPrioritizedGroups.reduce(((e,t)=>e+(t.enoughSpaceForGroup?t.totalWidth:0)),0),t=(this._paneWidth+this._leftPriceScaleWidth+this._rightPriceScaleWidth)/2-Math.ceil(e/2);this._widget.style.left=`${t}px`}_updateResetScalesButtonVisibility(){if(null===this._chartModel)return;const e=this._chartModel.model().isScalesResetAvailable();this._buttons.turn.classList.toggle($,!e)}_updateMaximizeButtonsVisibility(){this._updateBtnGroupVisibility()}_toggleFullscreenButtons(){const e=this._chart.getResizerDetacher().fullscreen.value();this._buttons.maximize.classList.toggle("js-hidden",e),this._buttons.minimize.classList.toggle("js-hidden",!e)}_isMaximizeButtonAvailable(){return this._options.maximize,!1}_trackEvent(e){0}}},19401:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LegendWidget:()=>Zs}) ;var s=i(27714),l=i(50151),o=i(40549),n=i.n(o),a=i(65665),r=i(24377),d=i(2484),u=i(49483),h=i(76289),c=i(59255),_=i(78029),p=i(35861),m=i(80007),g=i(62927);var v=i(18940);class b extends class{constructor(e,t={}){this._loadingEl=document.createElement("span"),this._renderLoading(t),this.toggleVisibility(!1),e.appendChild(this._loadingEl)}toggleVisibility(e){this._loadingEl.classList.toggle(g.blockHidden,!e)}_renderLoading(e){const{className:t}=e;t&&this._loadingEl.classList.add(t)}}{_renderLoading(e){super._renderLoading(e),this._loadingEl.innerHTML=`\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t`,this._loadingEl.classList.add(v.loader)}}function w(e,t){null===e.firstChild?e.textContent=t:e.firstChild.nodeValue=t}var y=i(39653);const S=u.CheckMobile.any();class M{constructor(e,t,i){this._el=null,this._firstBlockWrapper=null,this._titleParentEl=null,this._titleElements=[],this._valuesParentEl=null,this._valuesAdditionalWrapperEl=null,this._valuesElements=[],this._actionsParentEl=null,this._actionAdditionalWrapperEl=null,this._stayInHoveredMode=!1,this._mode=4,this._statusesWrapper=null,this._resizeObserver=null,this._hideInvisibleHover=null,this._hideValues=null,this._allButtonsWidth=null,this._lastStatusesWrapperWidth=null,this._lastActionsWrapperWidth=null,this._showActionsHandler=null,this._hideActionsHandler=null,this._selectedSourceHandler=null,this._mouseEventHandlers=[],this._disableTimeout=null,this._loader=null,this._updateDisabledState=(e=this._disabled.value())=>{null!==this._el&&(this._el.classList.toggle(y.disabled,e),this._updateLoadingState(),this._updateStatusWidgetVisibility(e),this._updateTitleMaxWidth())},this._updateLoadingState=(e=this._loading.value())=>{if(null!==this._el){const t=this._el.classList;t.toggle(y.eyeLoading,e&&!this._disabled.value()),t.toggle(y.loading,e)}null!==this._loader&&this._loader.toggleVisibility(e)},this._model=e,this._parentEl=t,this._disabled=this._model.disabled().spawn(),this._disabled.subscribe(this._updateDisabledState),this._disabledOnInterval=this._model.disabledOnInterval().spawn(),this._disabledOnInterval.subscribe(this._updateDisabledOnIntervalState.bind(this)),this._selected=this._model.selected().spawn(),this._selected.subscribe(this._updateSelectedState.bind(this)),this._loading=this._model.loading().spawn(),this._loading.subscribe(function(e,t){let i=0;return s=>{clearTimeout(i),s?e():i=setTimeout(e,t)}}(this._updateLoadingState,700)),this._isTitleHidden=this._model.isTitleHidden().spawn(),this._isValuesHidden=this._model.isValuesHidden().spawn(),this._isRowHidden=this._model.isRowHidden().spawn(),this._isTitleHidden.subscribe(this._updateShowTitles.bind(this)),this._isValuesHidden.subscribe(this._updateShowValues.bind(this)),this._isRowHidden.subscribe(this._updateShowLine.bind(this)),this._createTitlesSpawns();for(let e=0;e({visible:e.visible.spawn(),title:void 0===e.title?null:e.title.spawn()})));for(let e=0;e{e.preventDefault(),e.stopPropagation()}))))}destroy(){var e,t;this._disabled.destroy(),this._disabledOnInterval.destroy(),this._selected.destroy(),this._loading.destroy(),this._isTitleHidden.destroy(),this._isValuesHidden.destroy(),this._isRowHidden.destroy(),this._customTextColor.destroy(),null!==this._disableTimeout&&clearTimeout(this._disableTimeout);for(const e of this._titlesSpawns)e.title.destroy();if(null!==this._titleParentEl){for(const e of this._mouseEventHandlers)e.destroy();this._titleElements=[],this._withActions&&null!==this._selectedSourceHandler&&null!==this._showActionsHandler&&null!==this._hideActionsHandler&&(this._titleParentEl.removeEventListener("touchend",this._selectedSourceHandler),this._titleParentEl.removeEventListener("mousedown",this._selectedSourceHandler),S||(this._titleParentEl.removeEventListener("mouseenter",this._showActionsHandler),this._titleParentEl.removeEventListener("mouseleave",this._hideActionsHandler))),this._titleParentEl=null} for(const e of this._actionsSpawnArray){e.visible.destroy();const t=e.title;null!==t&&t.destroy()}if(null!==this._actionAdditionalWrapperEl&&(this._withActions&&null!==this._showActionsHandler&&null!==this._hideActionsHandler&&!S&&(this._actionAdditionalWrapperEl.removeEventListener("mouseenter",this._showActionsHandler),this._actionAdditionalWrapperEl.removeEventListener("mouseleave",this._hideActionsHandler)),this._actionAdditionalWrapperEl=null),this._actionsParentEl=null,this._removeValuesSpawnsSubscriptions(),this._values.destroy(),null!==this._valuesParentEl&&(this._valuesElements=[],this._valuesParentEl=null),null===(e=this._hideInvisibleHover)||void 0===e||e.destroy(),null===(t=this._hideValues)||void 0===t||t.destroy(),null!==this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),null!==this._el){(0,l.ensureNotNull)(this._el.parentNode).removeChild(this._el),this._el=null}}getHeight(){return null===this._el?null:24}updateMode(e){this._mode===e&&null!==this._allButtonsWidth||(this._mode=e,this._updateAllButtonsWidth())}_render(){this._renderTitle(),this._renderActions(),this._renderValues(),this._el=document.createElement("div"),this._firstBlockWrapper=document.createElement("div"),this._firstBlockWrapper.classList.add(y.noWrapWrapper),this._firstBlockWrapper.appendChild((0,l.ensureNotNull)(this._titleParentEl)),null!==this._actionsParentEl&&this._firstBlockWrapper.appendChild(this._actionsParentEl),this._el.appendChild(this._firstBlockWrapper),this._el.appendChild((0,l.ensureNotNull)(this._valuesParentEl)),this._parentEl.append(this._el)}_renderTitle(){null===this._titleParentEl&&(this._titleParentEl=document.createElement("div"),this._titleParentEl.classList.add(y.titleWrapper));const e=this._titleParentEl;for(let t=0;t0?(l.appendChild(document.createTextNode(i)),l.classList.add(y.withDot)):l.classList.add(g.blockHidden),e.appendChild(l),this._titleElements.push(l)}}_renderActions(){if(!this._withActions)return;null===this._actionsParentEl&&(this._actionsParentEl=document.createElement("div"),this._actionsParentEl.classList.add(y.buttonsWrapper),this._parentEl.append(this._actionsParentEl),this._actionAdditionalWrapperEl=document.createElement("div"),this._actionAdditionalWrapperEl.classList.add(y.buttons),this._actionsParentEl.appendChild(this._actionAdditionalWrapperEl));const e=(0,l.ensureNotNull)(this._actionAdditionalWrapperEl),t=h.trackingModeIsAvailable?"large":"small";for(const i of this._model.actions()){const s=(0,_.createActionElement)(i,y.button,y.buttonIcon,g.blockHidden,t);e.appendChild(s)}}_isWidthButtonsMode(){return null!==this._el&&(this._el.classList.contains(y.withAction)||this._disabled.value()||this._selected.value()||this._stayInHoveredMode)}_updateTitlesHandler(e,t){const i=(0, l.ensureNotNull)(this._titleElements[e]),s=0===t.length;i.classList.toggle(g.blockHidden,s),i.classList.toggle(y.withDot,!s),w(i,t)}_updateStates(e){this._updateDisabledState(),this._updateDisabledOnIntervalState(),this._updateSelectedState(),this._updateLoadingState(),e&&this._clearDisableState()}_updateValuesHTMLElHandler(e,t){w((0,l.ensure)(this._valuesElements[e].value),t),this._updateShowValues()}_updateValueColorHandler(e,t=""){(0,l.ensure)(this._valuesElements[e].value).style.color=t}_updateValueVisibleHandler(e,t){const i=(0,l.ensure)(this._valuesElements[e].value).closest(`.${y.valueItem}`);null!==i&&i.classList.toggle(g.blockHidden,!t)}_updateShowLine(){null!==this._el&&this._el.classList.toggle(g.blockHidden,this._isRowHidden.value())}_createValuesSpawns(){this._valuesSpawnArray=this._values.value().map((e=>({value:e.value.spawn(),color:e.color.spawn(),visible:e.visible.spawn(),title:e.title.spawn()})))}_removeValuesSpawnsSubscriptions(){for(const e of this._valuesSpawnArray)e.value.destroy(),e.color.destroy(),e.visible.destroy(),e.title.destroy();this._valuesSpawnArray=[]}_addValuesSpawnsSubscriptions(){for(let e=0;ee.value.value().length>0))}_addStatusesWidget(e,t,i){this._statusesWrapper=document.createElement("div"),this._statusesWrapper.classList.add(y.statusesWrapper),this._statusesWrapper.appendChild(e),(0,l.ensureNotNull)(this._firstBlockWrapper).appendChild(this._statusesWrapper),this._hideInvisibleHover=t.spawn(),this._hideInvisibleHover.subscribe(this._updateInvisibleHoverMode.bind(this),{callWithLast:!0}),this._hideValues=i.spawn(),this._hideValues.subscribe(this._updateHideValuesMode.bind(this),{callWithLast:!0}),this._updateStatusWidgetVisibility(this._disabled.value()),this._resizeObserver=new c.default(this._handlerRestrictTitleWidth.bind(this)),null!==this._actionsParentEl&&this._resizeObserver.observe(this._actionsParentEl),this._resizeObserver.observe(this._statusesWrapper)}_updateTitleMaxWidth(){if(null===this._firstBlockWrapper)return;const e=this._allButtonsWidth||0,t=(this._lastActionsWrapperWidth||0)+(this._lastStatusesWrapperWidth||0);this._isWidthButtonsMode()?this._firstBlockWrapper.style.maxWidth=`calc(100% - ${Math.max(e,t)}px)`:this._firstBlockWrapper.style.maxWidth=t>0?`calc(100% - ${t}px)`:""}_updateAllButtonsWidth(){this._allButtonsWidth=this._getButtonsCount()*O+1,this._updateTitleMaxWidth()}_updateInvisibleHoverMode(e){null!==this._el&&this._el.classList.toggle(y.invisibleHover,!e)}_updateHideValuesMode(e){ null!==this._el&&this._el.classList.toggle(y.hideValues,e)}_showActions(){if(null===this._el||!this._withActions)return;this._el.classList.add(y.withAction);const e=null!==this._valuesParentEl&&null!==this._titleParentEl&&this._valuesParentEl.offsetTop===this._titleParentEl.offsetTop;this._el.classList.toggle(y.withTail,e),this._updateTitleMaxWidth()}_hideActions(){null!==this._el&&this._withActions&&!this._stayInHoveredMode&&(this._el.classList.remove(y.withAction),null!==this._valuesParentEl&&this._valuesParentEl.classList.remove(y.withTail),this._updateTitleMaxWidth())}_handlerRestrictTitleWidth(e){if(null===this._actionsParentEl||null===this._firstBlockWrapper)return;let t=null,i=null;for(const s of e)s.target===this._statusesWrapper&&(t=s.contentRect.width),s.target===this._actionsParentEl&&(i=s.contentRect.width);t===this._lastStatusesWrapperWidth&&i===this._lastActionsWrapperWidth||(null!==t&&(this._lastStatusesWrapperWidth=t),null!==i&&(this._lastActionsWrapperWidth=i),this._updateTitleMaxWidth())}_clearDisableState(){null!==this._el&&(this._el.classList.remove(y.eyeLoading),this._el.classList.remove(y.disabled),this._updateStatusWidgetVisibility(this._disabled.value()),this._updateTitleMaxWidth())}_updateDisabledOnIntervalState(){var e;null===(e=this._el)||void 0===e||e.classList.toggle(y.disabledOnInterval,this._disabledOnInterval.value())}_updateSelectedState(){null!==this._el&&this._withActions&&this._el.classList.toggle(y.selected,this._selected.value())}_updateShowTitles(){null!==this._titleParentEl&&(this._titleParentEl.classList.toggle(g.blockHidden,this._isTitleHidden.value()),null!==this._actionsParentEl&&this._actionsParentEl.classList.toggle(g.blockHidden,this._isTitleHidden.value()))}_updateValues(){this._removeValuesSpawnsSubscriptions(),this._createValuesSpawns(),null!==this._valuesParentEl&&null!==this._valuesAdditionalWrapperEl&&(this._valuesElements=[],this._valuesAdditionalWrapperEl.innerHTML=""),this._renderValues(),this._addValuesSpawnsSubscriptions(),this._updateShowValues()}_updateActionVisibilities(e){null!==this._actionsParentEl&&this._actionsParentEl.querySelectorAll(`.${y.button}`)[e].classList.toggle(g.blockHidden,!this._actionsSpawnArray[e].visible.value())}_updateActionTitle(e){const t=this._actionsSpawnArray[e].title;null!==this._actionsParentEl&&null!==t&&this._actionsParentEl.querySelectorAll(`.${y.button}`)[e].setAttribute("title",t.value())}_updateCustomTextColor(){const e=this._customTextColor.value()||"";for(const t of this._titleElements)null!==t&&(t.style.color=e);const t=(0,l.ensureNotNull)(this._valuesParentEl).querySelectorAll(`.${y.valueTitle}`);for(let i=0;ie.value.value().length>0||(e.title.value()||"").length>0))}_updateValuesTitleHTMLElHandler(e,t=""){const i=(0,l.ensure)(this._valuesElements[e].title);w(i,t),i.classList.toggle(g.blockHidden,0===t.length),this._updateShowValues()}_isWidthButtonsMode(){return null!==this._el&&(void 0!==this._flagged&&Boolean(this._flagged.value())||super._isWidthButtonsMode())}_updateFlaggedState(){if(void 0===this._flagged)return;(0,l.ensureNotNull)(this._el).classList.toggle(y.flagged,Boolean(this._flagged.value())),this._updateTitleMaxWidth()}}const C=u.isSafari?"click":"auxclick";class E extends M{constructor(e,t,i){super(e,t,i),this._wheelClickHandler=null,this._canUpdateRowVisibility=!0,this._globalRowVisibility=this._model.globalVisibility().spawn(),this._globalRowVisibility.subscribe(this._updateShowLine.bind(this),{ -callWithLast:!0}),this._has5Buttons=this._model.isPineScriptDataSource().spawn(),this._has5Buttons.subscribe(this._update5ButtonsStyles.bind(this)),this._updateStates(!this._disabled.value()),i.statusWidgetEl&&this._addStatusesWidget(i.statusWidgetEl,i.hideInvisibleHover,i.hideValues),this._selected.subscribe(this._updateTitleMaxWidth.bind(this)),i.withActions&&(this._wheelClickHandler=this._onWheelClicked.bind(this),null!==this._titleParentEl&&this._titleParentEl.addEventListener(C,this._wheelClickHandler))}destroy(){super.destroy(),this._has5Buttons.destroy(),this._globalRowVisibility&&this._globalRowVisibility.destroy(),null!==this._wheelClickHandler&&null!==this._titleParentEl&&this._titleParentEl.removeEventListener(C,this._wheelClickHandler)}_updateShowLine(){if(null===this._el||!this._canUpdateRowVisibility)return;const e=!this._globalRowVisibility.value();e?this._el.classList.toggle(g.blockHidden,e):super._updateShowLine()}_getButtonsCount(){switch(this._mode){case 4:return this._has5Buttons.value()?5:4;case 3:return 3;default:return 2}}_render(){super._render();const e=(0,l.ensureNotNull)(this._el);e.classList.add(y.item,y.study),e.dataset.name="legend-source-item"}_createTitlesSpawns(){const e=this._model.titles();this._titlesSpawns=[{title:e.title.spawn(),class:y.mainTitle},{title:e.args.spawn(),class:y.descTitle}]}_renderValues(){null===this._valuesParentEl&&(this._valuesParentEl=document.createElement("div"),this._valuesParentEl.classList.add(y.valuesWrapper),this._valuesAdditionalWrapperEl=document.createElement("div"),this._valuesAdditionalWrapperEl.classList.add(y.valuesAdditionalWrapper),this._valuesParentEl.appendChild(this._valuesAdditionalWrapperEl));const e=(0,l.ensureNotNull)(this._valuesAdditionalWrapperEl),t=this._values.value();for(const i of t){const t=document.createElement("div");t.classList.add(y.valueItem),t.classList.toggle(g.blockHidden,!i.visible.value());const s=document.createElement("div");s.classList.add(y.valueValue),s.style.color=i.color.value()||"",s.appendChild(document.createTextNode(i.value.value()));const l=i.title.value();void 0!==l&&(s.classList.add("apply-common-tooltip"),s.title=l),t.appendChild(s),this._valuesElements.push({value:s}),e.appendChild(t)}}_updateValuesTitleHTMLElHandler(e,t=""){const i=(0,l.ensure)(this._valuesElements[e].value);i.classList.toggle("apply-common-tooltip",0!==t.length),i.title=t}_update5ButtonsStyles(e){null!==this._el&&(this._el.classList.toggle(y.has5Buttons,e),this._updateAllButtonsWidth())}_onWheelClicked(e){1===e.button&&this._model.onRemoveSource()}}var k=i(44352),V=i(51768);function x(e){(0,V.trackEvent)("GUI","Legend action",e)}var W=i(47036),T=i(62920),L=i(65300),A=i(36885);const H=k.t(null,void 0,i(21686)),P=k.t(null,void 0,i(28705)),D=k.t(null,void 0,i(51072));class B{constructor(e,t,i){this._el=null,this._counterEl=null,this._arrowIconEL=null,this._objectTreeEl=null,this._mode=0,this._parentEl=e,this._themedColor=t.spawn(),this._themedColor.subscribe(this._updateThemedColor.bind(this)), -this._sourceCount=i.visibleDataSourceCount.spawn(),this._sourceCount.subscribe(this._updateSourceCount.bind(this)),this._isStateOpen=i.isDataSourcesCollapsed.spawn(),this._isStateOpen.subscribe(this._updateState.bind(this)),this._showObjectsTree=i.showObjectsTree.spawn(),this._showObjectsTree.subscribe(this._updateObjectTreeVisibility.bind(this)),this._render(),this._updateState(),this._updateThemedColor(this._themedColor.value()),this._updateObjectTreeVisibility(this._showObjectsTree.value()),this._toggleStateHandler=(0,m.wrapHandlerWithPreventEvent)(i.onCollapseDataSources),this._showObjectTreeHandler=(0,m.wrapHandlerWithPreventEvent)(i.onShowObjectsTreeDialog),null!==this._el&&(this._el.addEventListener("touchend",this._toggleStateHandler),this._el.addEventListener("click",this._toggleStateHandler),this._el.addEventListener("contextmenu",(e=>{e.preventDefault(),e.stopPropagation()}))),null!==this._objectTreeEl&&(this._objectTreeEl.addEventListener("touchend",this._showObjectTreeHandler),this._objectTreeEl.addEventListener("click",this._showObjectTreeHandler))}destroy(){this._sourceCount.destroy(),this._isStateOpen.destroy(),null!==this._objectTreeEl&&(this._objectTreeEl.removeEventListener("touchend",this._showObjectTreeHandler),this._objectTreeEl.removeEventListener("click",this._showObjectTreeHandler),this._objectTreeEl=null),this._arrowIconEL=null,this._counterEl=null,null!==this._el&&(this._el.removeEventListener("touchend",this._toggleStateHandler),this._el.removeEventListener("click",this._toggleStateHandler),this._el.innerHTML="",this._el=null)}setMode(e){this._mode=e?1:0,this._updateTooltip()}_render(){this._el=document.createElement("div"),this._el.className=`${y.toggler} apply-common-tooltip`,this._arrowIconEL=document.createElement("div"),this._arrowIconEL.classList.add(y.iconArrow),this._arrowIconEL.innerHTML=h.trackingModeIsAvailable?T:W,this._el.appendChild(this._arrowIconEL),this._objectTreeEl=document.createElement("div"),this._objectTreeEl.classList.add(y.objectTree),this._objectTreeEl.innerHTML=h.trackingModeIsAvailable?A:L,this._el.appendChild(this._objectTreeEl),this._counterEl=document.createElement("div"),this._counterEl.classList.add(y.counter),this._counterEl.appendChild(document.createTextNode(String(this._sourceCount.value()))),this._el.appendChild(this._counterEl),this._parentEl.appendChild(this._el)}_updateThemedColor(e){if(null!==this._el)if(e.length>0){const[t,i,s]=(0,r.parseRgb)(e);this._el.style.backgroundColor=(0,r.rgbaToString)([t,i,s,(0,r.normalizeAlphaComponent)(.8)])}else this._el.style.removeProperty("background-color")}_updateSourceCount(e){w((0,l.ensureNotNull)(this._counterEl),String(e));const t=(0,l.ensureNotNull)(this._el),i=e<1;t.classList.toggle(g.blockHidden,i);const s=1===e;t.classList.toggle(y.onlyOneSourceShown,s)}_updateState(){const e=!this._isStateOpen.value();this._parentEl.classList.toggle(y.closed,e),this._updateTooltip(),x((e?"Hide":"Show")+" not main sources")}_tooltip(){return 1===this._mode?D:this._isStateOpen.value()?H:P}_updateTooltip(){ -null!==this._el&&this._el.setAttribute("title",this._tooltip())}_updateObjectTreeVisibility(e){(0,l.ensureNotNull)(this._el).classList.toggle(y.objectsTreeCanBeShown,e)}}var z=i(38780),I=i(39640);function N(e,t){const i=new(n())(t(e.value()));e.subscribe((e=>{i.setValue(t(e))}));return i.readonly().spawn((()=>e.unsubscribe()))}const O=h.trackingModeIsAvailable?44:28,R=d.enabled("object_tree_legend_mode");class F{constructor(e,t){this._renderToggler=null,this._mainDataSourceRenderer=null,this._dataSourceRenderers=[],this._parentEl=document.createElement("div"),this._mainDataSourceEl=null,this._dataSourcesEl=null,this._dataSourcesAdditionalWrapperEl=null,this._collapsedDataSourcesWrapperEl=null,this._collapsedDataSourcesEl=null,this._outsideEventForCollapsedTooltip=null,this._options=e,this._togglerOptions=t,this._isStudiesLegendHidden=e.isStudiesLegendHidden.spawn(),this._isStudiesLegendHidden.subscribe(this._updateLegendVisibility.bind(this)),this._isAllLegendHidden=e.isAllLegendHidden.spawn(),this._isAllLegendHidden.subscribe(this._updateLegendVisibility.bind(this)),this._updateLegendVisibility(),this._hideAllExceptFirstLine=e.hideAllExceptFirstLine.spawn(),this._hideAllExceptFirstLine.subscribe(this._updateAllHiddenExeptFirstLine.bind(this)),this._themedColor=e.themedColor.spawn(),this._themedColor.subscribe(this._setCustomBg.bind(this)),this._showBackground=e.showBackground.spawn(),this._showBackground.subscribe(this._setCustomBg.bind(this)),this._backgroundTransparency=e.backgroundTransparency.spawn(),this._backgroundTransparency.subscribe(this._setCustomBg.bind(this)),this._collapsedDataSourcesCountSpawn=e.collapsedDataSourcesCount.spawn(),this._collapsedDataSourcesCountSpawn.subscribe(this._updateCollapsedSourcesCount.bind(this)),this._showCollapsedDataSourcesTooltipHandler=this._showCollapsedDataSourcesTooltip.bind(this),this._parentEl.classList.add(y.legend),this._parentEl.classList.toggle(y.noWrap,!h.trackingModeIsAvailable),this._parentEl.classList.toggle(y.noActions,!this._options.withActions),this._parentEl.classList.toggle(y.touchMode,h.trackingModeIsAvailable),this._parentEl.classList.toggle(y.wrappable,!this._hideAllExceptFirstLine.value()),this._parentEl.dataset.name="legend",this._parentEl.style.setProperty("--legend-source-item-button-width",`${O}px`);const i=t=>{t.preventDefault(),e.showLegendWidgetContextMenu(t)};this._mouseEventHandler=new p.MouseEventHandler(this._parentEl,{contextMenuEvent:i,touchContextMenuEvent:i})}destroy(){if(this._isStudiesLegendHidden.destroy(),this._isAllLegendHidden.destroy(),this._hideAllExceptFirstLine.destroy(),this._themedColor.destroy(),this._showBackground.destroy(),this._backgroundTransparency.destroy(),this._collapsedDataSourcesCountSpawn.destroy(),h.trackingModeIsAvailable&&null!==this._collapsedDataSourcesWrapperEl&&this._collapsedDataSourcesWrapperEl.removeEventListener("touchend",this._showCollapsedDataSourcesTooltipHandler),this._outsideEventForCollapsedTooltip&&this._outsideEventForCollapsedTooltip(), -null!==this._dataSourcesAdditionalWrapperEl&&(this._dataSourcesAdditionalWrapperEl.innerHTML="",this._dataSourcesAdditionalWrapperEl=null),null!==this._dataSourcesEl&&(this._dataSourcesEl.innerHTML="",this._dataSourcesEl=null),null!==this._renderToggler&&(this._renderToggler.destroy(),this._renderToggler=null),null!==this._mainDataSourceRenderer&&(this._mainDataSourceRenderer.destroy(),this._mainDataSourceRenderer=null),0!==this._dataSourceRenderers.length){for(const e of this._dataSourceRenderers)e.destroy();this._dataSourceRenderers=[]}this._mouseEventHandler.destroy(),this._parentEl.innerHTML="",delete this._parentEl}addMainDataSource(e,t){this._renderMainDataSourceEl(),this._mainDataSourceRenderer=new f(e,(0,l.ensureNotNull)(this._mainDataSourceEl),{withActions:this._options.withActions,customTextColor:this._options.customTextColor,statusWidgetEl:t.getElement(),hideInvisibleHover:N(t.visibleWidgetsCount,(e=>Boolean(e))),hideValues:t.errorWidgetIsShown}),this._updateLegendVisibility(),e.onDestroy().subscribe(this,(()=>{null!==this._mainDataSourceRenderer&&(this._mainDataSourceRenderer.destroy(),this._mainDataSourceRenderer=null)}),!0)}addDataSources(e,t){this._renderDataSourcesEl();const i=(0,l.ensureNotNull)(this._dataSourcesAdditionalWrapperEl);for(let s=0;sBoolean(e))),hideValues:t[s].errorWidgetIsShown});this._dataSourceRenderers.push(o),this._updateLegendVisibility(),l.onDestroy().subscribe(this,(()=>{const e=this._dataSourceRenderers.indexOf(o);-1!==e&&(this._dataSourceRenderers[e].destroy(),this._dataSourceRenderers.splice(e,1))}),!0)}}addCustomWidget(e,t){if(0===t.block){this._renderMainDataSourceEl();const i=(0,l.ensureNotNull)(this._mainDataSourceEl);1===t.position&&e.renderTo(i,i.firstChild),0===t.position&&e.renderTo(i)}if(1===t.block){this._renderDataSourcesEl();const i=(0,l.ensureNotNull)(this._dataSourcesAdditionalWrapperEl);1===t.position&&e.renderTo(i,i.firstChild),0===t.position&&e.renderTo(i)}}firstTitle(){return this._parentEl.firstElementChild}getElement(){return this._parentEl}updateMode(e){const t=R&&e<133?1:e<205?2:e<222?3:4;null!==this._mainDataSourceRenderer&&this._mainDataSourceRenderer.updateMode(t);for(const e of this._dataSourceRenderers)e.updateMode(t);this._parentEl.classList.toggle(y.medium,3===t),this._parentEl.classList.toggle(y.minimized,2===t),this._parentEl.classList.toggle(y.micro,1===t),null!==this._renderToggler&&this._renderToggler.setMode(1===t);const i=!this._hideAllExceptFirstLine.value()&&(h.trackingModeIsAvailable||e<542);this._parentEl.classList.toggle(y.directionColumn,i),this._parentEl.classList.toggle(y.hideUniportantValueItems,!u.CheckMobile.any()&&e<=272)}getMainSourceHeight(){return null===this._mainDataSourceRenderer?0:this._mainDataSourceRenderer.getHeight()}getDataSourceHeight(){ -return 0===this._dataSourceRenderers.length?0:this._dataSourceRenderers[0].getHeight()}_renderMainDataSourceEl(){null===this._mainDataSourceEl&&(this._mainDataSourceEl=document.createElement("div"),this._mainDataSourceEl.classList.add(y.legendMainSourceWrapper),this._parentEl.insertBefore(this._mainDataSourceEl,this._dataSourcesEl))}_renderDataSourcesEl(){null===this._dataSourcesEl&&(this._dataSourcesEl=document.createElement("div"),this._dataSourcesEl.classList.add(y.sourcesWrapper),this._renderToggle(this._dataSourcesEl),this._dataSourcesAdditionalWrapperEl=document.createElement("div"),this._dataSourcesAdditionalWrapperEl.classList.add(y.sources),this._dataSourcesEl.appendChild(this._dataSourcesAdditionalWrapperEl),this._renderCollapsedCounter(this._dataSourcesAdditionalWrapperEl),this._parentEl.appendChild(this._dataSourcesEl))}_renderToggle(e){this._options.showToggleButton&&(this._renderToggler=new B(e,this._options.themedColor,this._togglerOptions))}_renderCollapsedCounter(e){this._collapsedDataSourcesWrapperEl=document.createElement("div"),this._collapsedDataSourcesWrapperEl.className=`${y.item} ${y.last}`,this._collapsedDataSourcesEl=document.createElement("span"),this._collapsedDataSourcesEl.className=`${y.text} apply-common-tooltip`,this._collapsedDataSourcesWrapperEl.append(this._collapsedDataSourcesEl),e.append(this._collapsedDataSourcesWrapperEl),h.trackingModeIsAvailable&&this._collapsedDataSourcesWrapperEl.addEventListener("touchend",this._showCollapsedDataSourcesTooltipHandler),this._updateCollapsedSourcesCount(this._collapsedDataSourcesCountSpawn.value())}_showCollapsedDataSourcesTooltip(){(0,z.showOnElement)(this._collapsedDataSourcesEl,{text:this._options.collapsedDataSourcesTitle.value()}),this._addOutsideEventForHideTooltip()}_addOutsideEventForHideTooltip(){null!==this._outsideEventForCollapsedTooltip&&this._outsideEventForCollapsedTooltip(),this._outsideEventForCollapsedTooltip=(0,I.addOutsideEventListener)(new CustomEvent("timestamp").timeStamp,this._collapsedDataSourcesWrapperEl,(()=>{null!==this._outsideEventForCollapsedTooltip&&this._outsideEventForCollapsedTooltip(),(0,z.hide)()}),window.document,{touchEnd:!0})}_updateCollapsedSourcesCount(e){if(null===this._collapsedDataSourcesWrapperEl||null===this._collapsedDataSourcesEl)return;const t=0===e;this._collapsedDataSourcesWrapperEl.classList.toggle(g.blockHidden,t),t||(w(this._collapsedDataSourcesEl,`+${e}`),this._collapsedDataSourcesEl.setAttribute("title",this._options.collapsedDataSourcesTitle.value()))}_updateLegendVisibility(){this._parentEl.classList.toggle(g.blockHidden,this._isAllLegendHidden.value()),null!==this._dataSourcesEl&&this._dataSourcesEl.classList.toggle(g.blockHidden,this._isStudiesLegendHidden.value())}_updateAllHiddenExeptFirstLine(){this._parentEl.classList.toggle(y.wrappable,!this._hideAllExceptFirstLine.value())}_setCustomBg(){const e=this._showBackground.value(),t=this._themedColor.value(),i=this._backgroundTransparency.value();let s="";if(e){const[e,l,o]=(0,r.parseRgb)(t);s=(0,r.rgbaToString)([e,l,o,(0, -r.normalizeAlphaComponent)(1-i/100)])}this._parentEl.style.color=s}}var G=i(11536),U=i(52865),j=i(38031),$=i(47539),q=i(26867),K=i.n(q),Y=i(80142),X=i(7019);function Z(e){return void 0!==e?j.resetTransparency(e):e}const Q=new $.TranslatedString("show {title}",k.t(null,void 0,i(87358))),J=new $.TranslatedString("hide {title}",k.t(null,void 0,i(70301))),ee=k.t(null,void 0,i(81428)),te=k.t(null,void 0,i(31971));class ie{constructor(e,t,i,s,l){this._values=new(n())([]),this._actions=[],this._onDestroy=new(K()),this._loading=new(n())(!1),this._moreActionCM=null,this._updateLoadingStatus=()=>{this._loading.setValue(this._source.isLoading())},this._model=e,this._source=t,this._options=i,this._callbacks=s,this._contextMenuOptions=l,this._disabled=new(n())(this._getDisabledState()),this._disabledOnInterval=new(n())(this._getDisabledOnIntervalState()),this._selected=new(n())(!1),this._isTitleHidden=new(n())(this._getTitleHiddenValue()),this._isValuesHidden=new(n())(this._getValuesHiddenValue()),this._isRowHidden=new(n())(this._getRowHiddenValue()),this._isEditable=new(n())(this._getIsEditable()),(0,X.combine)((()=>({})),this._isTitleHidden,this._isValuesHidden,this._disabled).subscribe(this._updateRowVisibilities.bind(this)),this._values.subscribe((()=>{this._isValuesHidden.setValue(this._getValuesHiddenValue())}))}destroy(){}onDestroy(){return this._onDestroy}titles(){return this._titles}values(){return this._values.readonly()}actions(){return this._actions}disabled(){return this._disabled.readonly()}disabledOnInterval(){return this._disabledOnInterval.readonly()}selected(){return this._selected.readonly()}loading(){return this._loading.readonly()}isTitleHidden(){return this._isTitleHidden.readonly()}isValuesHidden(){return this._isValuesHidden.readonly()}isRowHidden(){return this._isRowHidden.readonly()}isEditable(){return this._isEditable.readonly()}update(){this._updateTitles(),this._updateValues(),this._updateStates()}updateSource(e){this._source!==e&&(this._source=e,this.update(),this._isTitleHidden.setValue(this._getTitleHiddenValue()),this._isValuesHidden.setValue(this._getValuesHiddenValue()))}onToggleDisabled(){const e=this._source.properties().childs().visible,t=!e.value();this._model.setProperty(e,t,(t?Q:J).format({title:new $.TranslatedString(this._source.name(),this._source.title())})),x((t?"Show":"Hide")+" source")}onShowSettings(e){this._source.userEditEnabled()&&(this.setSourceSelected(),this._callbacks.showChartPropertiesForSource(this._source,e),x("Settings for source"))}onShowMoreActions(e){return this._options.readOnlyMode?Promise.resolve(null):(this._callbacks.updateActions(),x("Show source context menu"),this._callbacks.showContextMenuForSources([this._source],this._calcNewPosition(e),this._contextMenuOptions))}setSourceSelected(){this._model.selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection(this._source)}))}_moreActionHandler(e){e.preventDefault(),null!==this._moreActionCM&&this._moreActionCM.isShown()?this._moreActionCM=null:(this.setSourceSelected(),this.onShowMoreActions(e).then((e=>{ -this._moreActionCM=e})))}_updateStates(){this._disabled.setValue(this._getDisabledState()),this._disabledOnInterval.setValue(this._getDisabledOnIntervalState()),this._selected.setValue(this._model.selection().isSelected(this._source)),this._isEditable.setValue(this._getIsEditable()),this._updateLoadingStatus()}_hasValues(){return this._values.value().length>0}_getEyeTitle(){return this._disabled.value()?ee:te}_getIsEditable(){return this._source.userEditEnabled()}_getDisabledState(){return!this._source.properties().visible.value()}_updateRowVisibilities(){this._isRowHidden.setValue(this._getRowHiddenValue())}_getRowHiddenValue(){return this._options.readOnlyMode&&this._disabled.value()||this._isTitleHidden.value()&&(this._isValuesHidden.value()||this._disabled.value())}_calcNewPosition(e){let t={};if(e.hasOwnProperty("touches")&&e.touches.length>0)t={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY};else if(null!==e.target){const i=e.target.getBoundingClientRect();t={clientX:(0,Y.isRtl)()?i.right:i.left,clientY:i.top+i.height+3}}else{const i=e;t={clientX:i.clientX,clientY:i.clientY}}return t}}var se=i(35936),le=i(3792),oe=i(41674),ne=i(87258),ae=i(45534);const re=k.t(null,void 0,i(41610)),de=k.t(null,void 0,i(93666)),ue=k.t(null,void 0,i(8209)),he=d.enabled("show_hide_button_in_legend"),ce=d.enabled("hide_resolution_in_legend");class _e extends ie{constructor(e,t,i,s,l){super(e,t,i,s,l),this._titles={title:new(n())(""),description:new(n())(""),interval:new(n())(""),provider:new(n())(""),exchange:new(n())(""),chartStyle:new(n())("")},this._symbolMarker=null,this._symbolMarkerIcon=null,this._flagged=new(n())(null),this._symbolAction=null,this._symbol=null,this._isOneButtonCanBeStick=!1,this._createActions(),this._updateSymbolMarker();const o=this._model.model().properties().childs().paneProperties.childs().legendProperties.childs();o.showSeriesTitle.subscribe(this,(()=>{this._isTitleHidden.setValue(this._getTitleHiddenValue())})),this._valuesVisibleProperty=(0,U.combineProperty)(((e,t,i)=>e||t||i),o.showSeriesOHLC,o.showBarChange,o.showVolume),this._valuesVisibleProperty.subscribe(null,(()=>{this._isValuesHidden.setValue(this._getValuesHiddenValue())})),this.update(),this._source.onStatusChanged().subscribe(this,this._updateLoadingStatus)}destroy(){super.destroy(),this._model.model().properties().childs().paneProperties.childs().legendProperties.childs().showSeriesTitle.unsubscribeAll(this),this._source.onStatusChanged().unsubscribeAll(this),this._valuesVisibleProperty.destroy(),this._onDestroy.fire()}flagged(){return this._flagged.readonly()}onShowSettings(){this._source.userEditEnabled()&&this._callbacks.showGeneralChartProperties(se.TabNames.symbol)}isOneButtonCanBeStick(){return this._isOneButtonCanBeStick}_updateTitles(){const e=(0,l.ensureNotNull)(this._source.statusView()).getSplitTitle();this._titles.title.setValue((0,G.clean)(e.title,!0)),this._titles.description.setValue((0,G.clean)(e.description,!0)),ce||this._titles.interval.setValue((0,G.clean)(e.interval,!0)),this._titles.provider.setValue((0, -G.clean)(e.provider,!0)),this._titles.exchange.setValue((0,G.clean)(e.exchange,!0)),this._titles.chartStyle.setValue((0,G.clean)(e.chartStyle,!0))}_updateValues(){const e=this._source.legendView(),t=this._values.value(),i=e.marketTitle(),s=e.marketTitle().length>0;if(0===t.length){const t={value:new(n())(""),color:new(n())(""),visible:new(n())(s),title:new(n())(i),unimportant:new(n())(!1)},l=e.items().map((e=>({value:new(n())(e.value()),color:new(n())(Z(e.color())),visible:new(n())(e.visible()),title:new(n())(e.title()),unimportant:new(n())(e.unimportant())})));this._values.setValue([t].concat(l))}else{t[0].title.setValue(i),t[0].visible.setValue(s);const l=e.items();for(let e=0;e{e.title.setValue(this._getEyeTitle())}))}this._actions.push({iconMap:new Map([["large",ae],["small",ne]]),action:this._moreActionHandler.bind(this),visible:new(n())(!0),title:new(n())(re),dataset:{name:"legend-more-action"}})}_getMarkerTitle(){return null!==this._symbolMarker?this._symbolMarker.isMarked()?ue:de:""}_symbolActionHandler(){null!==this._symbolMarker&&(this._updateSymbolMarker(),x("Change flag state"))}_updateSymbolMarker(){this._isOneButtonCanBeStick=!0}}var pe=i(89215),me=i(3615);var ge=i(46069),ve=i(98351),be=i(83637),we=i(34882),ye=i(88658),Se=i(52506),Me=i(89895),fe=i(83956);(0,ve.getLogger)("Chart.LegendWidget");const Ce=k.t(null,void 0,i(89517)),Ee=k.t(null,void 0,i(66324)),ke=k.t(null,void 0,i(34596)),Ve=k.t(null,void 0,i(41610)),xe=(k.t(null,void 0,i(82751)),k.t(null,void 0,i(89790)),k.t(null,void 0,i(37809))),We=(d.enabled("study_buttons_in_legend"),d.enabled("show_hide_button_in_legend")),Te=d.enabled("property_pages"),Le=d.enabled("format_button_in_legend"),Ae=d.enabled("delete_button_in_legend");class He extends ie{constructor(e,t,i,s,l){super(e,t,i,s,l),this._titles={title:new(n())(""),args:new(n())("")},this._error=new(n())(!1),this._isPineScriptDataSource=new(n())(!1),this._pineAction=null,this._globalVisibility=new(n())(!0),this._createActions();const o=this._model.model().properties().childs().paneProperties.childs().legendProperties.childs(),a=[o.showSeriesTitle,o.showStudyTitles];for(const e of a)e.subscribe(this,(()=>{this._isTitleHidden.setValue(this._getTitleHiddenValue())})) -;const r=[o.showSeriesOHLC,o.showBarChange,o.showStudyValues];for(const e of r)e.subscribe(this,(()=>{this._isValuesHidden.setValue(this._getValuesHiddenValue())}));this.update()}destroy(){super.destroy();const e=this._model.model().properties().childs().paneProperties.childs().legendProperties.childs();e.showSeriesTitle.unsubscribeAll(this),e.showStudyTitles.unsubscribeAll(this),e.showSeriesOHLC.unsubscribeAll(this),e.showBarChange.unsubscribeAll(this),e.showStudyValues.unsubscribeAll(this),this._onDestroy.fire()}error(){return this._error.readonly()}isPineScriptDataSource(){return this._isPineScriptDataSource.readonly()}updateSource(e){this._source!==e&&(this._values.setValue([]),super.updateSource(e),this._updateAbleShowSourceCode())}onRemoveSource(){var e;this._source.isUserDeletable()&&(this._source.hasChildren()?(e=this._model.removeSource.bind(this._model,this._source,!1),(0,me.showConfirm)({title:k.t(null,void 0,i(38154)),text:k.t(null,void 0,i(52003)),onConfirm:({dialogClose:t})=>{e(),t()}})):this._model.removeSource(this._source,!1),x("Remove sources"))}onShowSourceCode(){0}setGlobalVisibility(e){this._globalVisibility.setValue(e)}globalVisibility(){return this._globalVisibility.readonly()}getFullTitle(){return[this._titles.title,this._titles.args].map((e=>e.value())).join(" ")}_updateTitles(){const e=(0,l.ensureNotNull)(this._source.statusView()).getSplitTitle();this._titles.title.setValue((0,G.clean)(e[0],!0));const t=Array.isArray(e[1])?e[1].join(" "):e[1]||"";this._titles.args.setValue((0,G.clean)(t,!0))}_updateValues(){const e=this._source.legendView();if(null===e)return;if(0===e.items().length)return;const t=this._values.value();if(0===t.length){const t=e.items().map((e=>({value:new(n())(e.value()),color:new(n())(Z(e.color())),visible:new(n())(e.visible()),unimportant:new(n())(e.unimportant()),title:new(n())(e.title())})));this._values.setValue(t)}else{const i=e.items();for(let e=0;e{e.title.setValue(this._getEyeTitle())}));const t={iconMap:new Map([["large",oe],["small",le]]),action:(0,m.wrapHandlerWithPreventEvent)(this.onShowSettings.bind(this,se.TabNames.visibility)),visible:new(n())(this._getDisabledOnIntervalState()),className:y.intervalEye,title:new(n())(xe),dataset:{name:"legend-interval-show-hide-action"}};this._actions.push(t),this._disabledOnInterval.subscribe((i=>{t.visible.setValue(i),e.visible.setValue(!i)}))}if(Te&&Le&&(!(0,pe.isStudy)(this._source)||new ge.MetaInfoHelper(this._source.metaInfo()).hasUserEditableOptions())){const e={iconMap:new Map([["large",be],["small",be]]),action:(0,m.wrapHandlerWithPreventEvent)(this.onShowSettings.bind(this)),visible:new(n())(this._getIsEditable()),title:new(n())(Ce),dataset:{name:"legend-settings-action"}};this._actions.push(e),this._isEditable.subscribe((t=>{e.visible.setValue(t)}))}if(Ae){const e={iconMap:new Map([["large",Se],["small",ye]]),action:(0,m.wrapHandlerWithPreventEvent)(this.onRemoveSource.bind(this)),visible:new(n())(this._getIsEditable()),title:new(n())(ke),dataset:{name:"legend-delete-action"}};this._actions.push(e),this._isEditable.subscribe((t=>{e.visible.setValue(t)}))}const e={iconMap:new Map([["large",ae],["small",ne]]),action:this._moreActionHandler.bind(this),visible:new(n())(this._getIsEditable()),title:new(n())(Ve),dataset:{name:"legend-more-action"}};this._actions.push(e),this._isEditable.subscribe((t=>{e.visible.setValue(t)}))}}var Pe=i(43986),De=i(60223),Be=i(1930),ze=i(35663),Ie=i(86339),Ne=i(21580),Oe=i(51983);function Re(e,t,i){e.setProperty(t,!t.value(),i)} -const Fe=new $.TranslatedString("change symbol description visibility",k.t(null,void 0,i(26717))),Ge=new $.TranslatedString("change open market status visibility",k.t(null,void 0,i(18644))),Ue=new $.TranslatedString("change OHLC values visibility",k.t(null,void 0,i(57889))),je=new $.TranslatedString("change bar change visibility",k.t(null,void 0,i(45110))),$e=new $.TranslatedString("change indicator titles visibility",k.t(null,void 0,i(31325))),qe=new $.TranslatedString("change indicator arguments visibility",k.t(null,void 0,i(96162))),Ke=new $.TranslatedString("change indicator values visibility",k.t(null,void 0,i(99774))),Ye=new $.TranslatedString("change volume values visibility",k.t(null,void 0,i(9455))),Xe=k.t(null,void 0,i(39339)),Ze=k.t(null,void 0,i(75991)),Qe=k.t(null,void 0,i(99487)),Je=k.t(null,void 0,i(22519)),et=k.t(null,void 0,i(1111)),tt=k.t(null,void 0,i(26315)),it=k.t(null,void 0,i(26935)),st=k.t(null,void 0,i(84098)),lt=(0,Ie.appendEllipsis)(k.t(null,void 0,i(89517)));var ot=i(93975),nt=i(20364),at=i(74599),rt=i(967),dt=i(84917),ut=i(32769),ht=i(21169);function ct(e){return e===dt.WeekDays.SUNDAY?dt.WeekDays.SATURDAY:e-1}function _t(e){return e===dt.WeekDays.SATURDAY?dt.WeekDays.SUNDAY:e+1}function pt(e,t){const i=ct(t);return 0===e[i].entries.length?pt(e,i):{dayIndex:i,entries:e[i].entries}}function mt(e,t){const i=_t(t);return 0===e[i].entries.length?mt(e,i):{dayIndex:i,entries:e[i].entries}}function gt(e){for(;e>ut.minutesPerDay;)e-=ut.minutesPerDay;const t=e%60,i=(e-t)/60;return(0,at.numberToStringWithLeadingZero)(i,2)+":"+(0,at.numberToStringWithLeadingZero)(t,2)}const vt={[dt.WeekDays.MONDAY]:{title:rt.weekDaysShortNames[dt.WeekDays.MONDAY],isActive:!1,entries:[]},[dt.WeekDays.TUESDAY]:{title:rt.weekDaysShortNames[dt.WeekDays.TUESDAY],isActive:!1,entries:[]},[dt.WeekDays.WEDNESDAY]:{title:rt.weekDaysShortNames[dt.WeekDays.WEDNESDAY],isActive:!1,entries:[]},[dt.WeekDays.THURSDAY]:{title:rt.weekDaysShortNames[dt.WeekDays.THURSDAY],isActive:!1,entries:[]},[dt.WeekDays.FRIDAY]:{title:rt.weekDaysShortNames[dt.WeekDays.FRIDAY],isActive:!1,entries:[]},[dt.WeekDays.SATURDAY]:{title:rt.weekDaysShortNames[dt.WeekDays.SATURDAY],isActive:!1,entries:[]},[dt.WeekDays.SUNDAY]:{title:rt.weekDaysShortNames[dt.WeekDays.SUNDAY],isActive:!1,entries:[]}};function bt(e,t){return e.start.value===t.start.value&&e.end.value===t.end.value}function wt(e,t){return bt(e[0],t[0])}function yt(e){const t=e.start(),i=e.length(),s=e.sessionStartDayOfWeek(),l=e.sessionEndDayOfWeek(),o=gt(t),n=gt(t+i);return i>ut.minutesPerDay?`${rt.weekDaysShortNames[s]} ${o} — ${rt.weekDaysShortNames[l]} ${n}`:`${o} — ${n}`}function St(e,t,i,s){return Math.abs(s-i)>1?`${rt.weekDaysShortNames[i]} ${e.title} — ${rt.weekDaysShortNames[s]} ${t.title}`:`${e.title} — ${t.title}`}function Mt(e,t,i){for(const s of t){let t=s.sessionStartDayOfWeek();const l=s.start(),o=s.length(),n=l+o,a=[];if(n<=ut.minutesPerDay)a.push([l,n]);else{const e=Math.min(ut.minutesPerDay-l,o);a.push([l,l+e]),a.push([0,o-e])}for(let l=0;le.start.value0?a[e-1]:null,o=0===e;if(0===i.start.value||0===i.start.value&&1===i.end.value||null!==s&&i.start.value===s.end.value){m++;continue}const r=o?c.entries[c.entries.length-1]:(0,l.ensureNotNull)(s),d={start:{value:o?0:a[e-1].end.value,title:o?t:a[e-1].end.title,isFirstOrLastPoint:!(o&&u.length>0)||1===u[u.length-1].end.value},end:{value:i.start.value,title:i.start.title,isFirstOrLastPoint:!0},type:3,tooltip:St(r.end,i.start,c.dayIndex,n),showStartForLastEntry:!1,showEndForFirstEntry:!1};a.splice(m,0,d),m=e+2}const g=a[a.length-1];1!==g.end.value&&a.push({start:{value:g.end.value,title:g.end.title,isFirstOrLastPoint:!0},end:{value:1,title:gt(ut.minutesPerDay),isFirstOrLastPoint:!(h.length>0)||0===h[0].start.value},type:3,tooltip:St(g.end,_.entries[0].start,n,_.dayIndex),showStartForLastEntry:!1,showEndForFirstEntry:!1})}}(n),function(e){for(const s of Object.keys(e)){const l=parseInt(s),o=e[l].entries;if(1===o.length)continue;const n=ct(l),a=_t(l),r=o[0],d=o[o.length-1];r.start.isFirstOrLastPoint||(r.showStartForLastEntry=(t=o,i=e[n].entries,bt(t[t.length-1],i[i.length-1]))),d.end.isFirstOrLastPoint||(d.showEndForFirstEntry=wt(o,e[a].entries))}var t,i}(n),this.sessionsDays.setValue(n),this.todaySession.setValue(n[s])} -_createSubSessionSpecs(e){if(null===e)return new Map;if(void 0===e.subsessions)return new Map([[0,new ht.SessionSpec(e.timezone,e.session,e.session_holidays,e.corrections)]]);const t="regular",i="premarket",s="postmarket",l=[t,i,s],o=new Map;for(const n of l){let l=null;switch(n){case t:l=0;break;case i:l=1;break;case s:l=2}if(null!==l){const t=e.subsessions.find((e=>e.id===n));void 0!==t&&o.set(l,new ht.SessionSpec(e.timezone,t["session-display"]||t.session,e.session_holidays,t["session-correction"]))}}return o}_updateTodayWithOffsets(e){if(null===e)return void(this._todayInExchangeTime=null);const t=1e3*window.ChartApiInstance.serverTimeOffset();this._todayInExchangeTime=ut.get_cal_from_unix_timestamp_ms(ut.get_timezone(e.timezone),Date.now()+t)}}var Ct=i(50959),Et=i(97754),kt=i(77975),Vt=i(68671),xt=i(1720);const Wt=new WeakMap;function Tt(e){return Wt.has(e)||Wt.set(e,(0,Vt.randomHash)()),(0,l.ensureDefined)(Wt.get(e))}const Lt=new Map([[0,xt.green],[1,xt.orange],[2,xt.blue],[3,xt.gray]]),At=new Map([[0,k.t(null,void 0,i(83949))],[1,k.t(null,void 0,i(56042))],[2,k.t(null,void 0,i(29985))],[3,k.t(null,void 0,i(95814))]]),Ht=k.t(null,void 0,i(80227));function Pt(e){const{segment:t,forceStart:i,forceEnd:s}=e,l=t.end.value-t.start.value,o=l<.03,n={left:100*t.start.value+"%",width:`calc(${100*l}% + ${o?2:0}px)`},a=Et(xt.segment,Lt.get(t.type),(i||t.start.isFirstOrLastPoint)&&xt.start,(s||t.end.isFirstOrLastPoint)&&xt.end,o&&xt.small,"common-tooltip-html","apply-common-tooltip"),r=function(e,t){return`
\n\t\t${At.get(t)}\n\t\t${e}\n\t
`}(t.tooltip,t.type);return Ct.createElement("div",{className:a,style:n,"data-tooltip":r})}function Dt(e){const{sessionDay:t}=e,i=t.entries.map(((e,i)=>Ct.createElement(Pt,{key:`${Tt(e)}Segment`,segment:e,forceStart:0===i&&3===e.type,forceEnd:i===t.entries.length-1&&3===e.type}))),s=Et(xt.sessionDay,t.isActive&&xt.active);return Ct.createElement("div",{className:s},Ct.createElement("div",{className:xt.weekDay},t.title),Ct.createElement("div",{className:xt.sessionDaySegments},i))}function Bt(e){const{sessionDays:t,currentTimeMark:i}=e,s=[],l=parseInt(Object.keys(t).filter((e=>t[parseInt(e)].isActive))[0]),o=t[l],n=o.entries.filter((e=>e.start.value<=i&&e.end.value>=i))[0];!n.start.isFirstOrLastPoint&&n.showStartForLastEntry?s.push(o.entries[o.entries.length-1].start):s.push(n.start);const a=!n.end.isFirstOrLastPoint&&n.showEndForFirstEntry?o.entries[0].end:n.end;if(s[0].value!==a.value&&s.push(a),0===s.length)return null;s.sort(((e,t)=>e.value-t.value));const r=s.map((e=>Ct.createElement("div",{key:Tt(e),className:xt.timeMark},e.title))),d=100*(2===s.length?s[1].value-s[0].value:0),u=Et(d>12&&xt.timeMarkSegmentAlignByEnds,xt.timeMarkSegment);return Ct.createElement("div",{className:xt.sessionDay},Ct.createElement("div",{className:xt.weekDay}),Ct.createElement("div",{className:xt.timeMarkWrapper},Ct.createElement("div",{className:u,style:{left:100*s[0].value+"%",width:`${d}%`}},r)))}class zt{ -constructor(e){this._source=e,this._fullSessionScheduleViewModel=new ft(e)}destroy(){this._fullSessionScheduleViewModel.destroy()}renderer(e,t){var i,s;return(null===(s=null===(i=this._source.marketStatusModel())||void 0===i?void 0:i.futuresContractExpirationTime())||void 0===s?void 0:s.expired().value())?null:function(e){const{key:t,className:i,now:s,timezone:l}=e,o=(0,kt.useWatchedValueReadonly)({watchedValue:e.sessionDays}),n=Object.values(o).filter((e=>e.isActive))[0],a=Et(i,xt.wrapper);return Ct.createElement("div",{key:t,className:a},Ct.createElement("div",{className:xt.sessionDayWrapper},Ct.createElement(Dt,{sessionDay:n}),Ct.createElement("div",{className:xt.nowWrapper},Ct.createElement("div",{className:xt.now,style:{left:100*s+"%"}}))),Ct.createElement(Bt,{sessionDays:o,currentTimeMark:s}),Ct.createElement("div",{className:xt.timezone},`${Ht}: ${l}`))}({key:e,className:t,sessionDays:this._fullSessionScheduleViewModel.sessionsDays,now:this._fullSessionScheduleViewModel.currentTimeValue(),timezone:this._fullSessionScheduleViewModel.timezone()})}updateSource(e){}}var It=i(7394),Nt=i(10381),Ot=i(98532);class Rt{constructor(e){this.isBlinkingMode=new(n())(!1),this._status=new(n())(null),this._fullTooltip=new(n())(null),this._iconClassNames=new(n())(null),this._visible=new(n())(!1),this._tooltip=new(n())(null),this._icon=new(n())(null),this._className=new(n())(null),this._infoMaps=e,this._size=e.size||"small",this._status.subscribe(this._updateByStatus.bind(this),{callWithLast:!0}),this._className.subscribe(this._updateIconClassName.bind(this))}turnOffBlinkingMode(){}status(){return this._status}tooltip(){return this._tooltip}icon(){return this._icon}className(){return this._className}visible(){return this._visible}size(){return this._size}fullInfo(){return this._fullTooltip}_getTooltip(e){var t,i;return null!==(i=null===(t=this._infoMaps.tooltipMap)||void 0===t?void 0:t.get(e))&&void 0!==i?i:null}_getIcon(e){let t;const i=this._infoMaps.iconMap.get(e);return void 0!==i&&(t=i.get(this._size)),t||null}_getClassName(e){return this._infoMaps.classNameMap.get(e)||null}_getTitle(e){var t,i;return null!==(i=null===(t=this._infoMaps.titleMap)||void 0===t?void 0:t.get(e))&&void 0!==i?i:null}_getTitleColor(e){var t,i;return null!==(i=null===(t=this._infoMaps.titleColorMap)||void 0===t?void 0:t.get(e))&&void 0!==i?i:null}async _getHtml(e){var t,i,s;return null!==(s=null===(i=null===(t=this._infoMaps.htmlMap)||void 0===t?void 0:t.get(e))||void 0===i?void 0:i.map(Nt.htmlEscape))&&void 0!==s?s:null}_getAction(e){var t,i;return null!==(i=null===(t=this._infoMaps.actionMap)||void 0===t?void 0:t.get(e))&&void 0!==i?i:null}async _updateFullTooltipByStatus(e){const t=await this._getHtml(e);this._status.value()===e&&this._fullTooltip.setValue([{icon:this._icon.value(),iconClassName:this._iconClassNames.value(),title:this._getTitle(e),titleColor:this._getTitleColor(e),html:t,size:this._size,action:this._getAction(e)}])}_updateByStatus(e){if(null===e||this._shouldBeHiddenByStatus(e))return this._icon.setValue(null), -this._tooltip.setValue(null),void this._visible.setValue(!1);this._icon.setValue(this._getIcon(e)),this._className.setValue(this._getClassName(e)),this._tooltip.setValue(this._getTooltip(e)),this._visible.setValue(!0),this._updateFullTooltipByStatus(e)}_shouldBeHiddenByStatus(e){return!1}_updateIconClassName(e){null!==e?this._iconClassNames.setValue([Ot.statusItem,e]):this._iconClassNames.setValue(null)}}var Ft=i(56840);const Gt="tv.alreadyBlinkedStatuses",Ut=[];function jt(){return Ft.getJSON(Gt,Ut)}const $t=new(n())(jt());function qt(e){const t=Ft.getJSON(Gt,Ut);t.includes(e)||(t.push(e),Ft.setJSON(Gt,t),$t.setValue(jt()))}Ft.onSync.subscribe(null,(()=>$t.setValue(jt())));const Kt=$t;var Yt=i(33972),Xt=i(67189),Zt=i(57524),Qt=i(67957),Jt=i(76948),ei=i(58189),ti=i(56201);const ii=(0, -ve.getLogger)("Chart.LegendWidget"),si=["TFEXDelayForGuest","MOEXDelayForGuest","CHIXAuDelayForGuest","MILDelayForGuest","NGMDelayForGuest","DEForGuest","ICESGDelayForGuest","ADXDelayForGuest","TRADEGATEDelayForGuest"],li=new Map([["DelayToRealtime",new Map([["small",Xt],["medium",Zt],["large",Zt]])],["DelayNoRealtime",new Map([["small",Xt],["medium",Zt],["large",Zt]])],["TFEXDelayForGuest",new Map([["small",Xt],["medium",Zt],["large",Zt]])],["MOEXDelayForGuest",new Map([["small",Xt],["medium",Zt],["large",Zt]])],["CHIXAuDelayForGuest",new Map([["small",Xt],["medium",Zt],["large",Zt]])],["MILDelayForGuest",new Map([["small",Xt],["medium",Zt],["large",Zt]])],["NGMDelayForGuest",new Map([["small",Xt],["medium",Zt],["large",Zt]])],["ICESGDelayForGuest",new Map([["small",Xt],["medium",Zt],["large",Zt]])],["ADXDelayForGuest",new Map([["small",Xt],["medium",Zt],["large",Zt]])],["TRADEGATEDelayForGuest",new Map([["small",Xt],["medium",Zt],["large",Zt]])],["DEForGuest",new Map([["small",Xt],["medium",Zt],["large",Zt]])],["EOD",new Map([["small",Qt],["medium",Jt],["large",Jt]])],["TickByTick",new Map([["small",ei],["medium",ti],["large",ti]])],["BATSToRealtime",new Map([["small",ei],["medium",ti],["large",ti]])],["DelayWithoutMarketAgreement",new Map([["small",Xt],["medium",Zt],["large",Zt]])]]),oi=new Map([["DelayToRealtime",Ot.delay],["DelayNoRealtime",Ot.delay],["TFEXDelayForGuest",Ot.delay],["MOEXDelayForGuest",Ot.delay],["CHIXAuDelayForGuest",Ot.delay],["MILDelayForGuest",Ot.delay],["NGMDelayForGuest",Ot.delay],["ICESGDelayForGuest",Ot.delay],["ADXDelayForGuest",Ot.delay],["TRADEGATEDelayForGuest",Ot.delay],["DEForGuest",Ot.delay],["EOD",Ot.eod],["TickByTick",Ot.notAccurate],["BATSToRealtime",Ot.notAccurate],["DelayWithoutMarketAgreement",Ot.delay]]),ni=new Map([["DelayToRealtime",It.colorsPalette["color-delay-mode"]],["DelayNoRealtime",It.colorsPalette["color-delay-mode"]],["TFEXDelayForGuest",It.colorsPalette["color-delay-mode"]],["MOEXDelayForGuest",It.colorsPalette["color-delay-mode"]],["CHIXAuDelayForGuest",It.colorsPalette["color-delay-mode"]],["MILDelayForGuest",It.colorsPalette["color-delay-mode"]],["NGMDelayForGuest",It.colorsPalette["color-delay-mode"]],["ICESGDelayForGuest",It.colorsPalette["color-delay-mode"]],["ADXDelayForGuest",It.colorsPalette["color-delay-mode"]],["TRADEGATEDelayForGuest",It.colorsPalette["color-delay-mode"]],["DEForGuest",It.colorsPalette["color-delay-mode"]],["EOD",It.colorsPalette["color-eod-mode"]],["TickByTick",It.colorsPalette["color-notaccurate-mode"]],["BATSToRealtime",It.colorsPalette["color-notaccurate-mode"]],["DelayWithoutMarketAgreement",It.colorsPalette["color-delay-mode"]]]),ai=k.t(null,void 0,i(57310)),ri=k.t(null,void 0,i(59315)),di=k.t(null,void 0,i(15815)),ui=k.t(null,void 0,i(65636)),hi=k.t(null,void 0,i(7435)),ci=(0,Nt.htmlEscape)(k.t(null,void 0,i(11155))),_i=(0,Nt.htmlEscape)(k.t(null,void 0,i(1084))),pi=(0,Nt.htmlEscape)(k.t(null,void 0,i(52984))),mi=(0,Nt.htmlEscape)(k.t(null,void 0,i(36015))),gi=(0,Nt.htmlEscape)(k.t(null,void 0,i(52916))),vi=(0, -Nt.htmlEscape)(k.t(null,void 0,i(49321))),bi=(0,Nt.htmlEscape)(k.t(null,void 0,i(25978))),wi=(0,Nt.htmlEscape)(k.t(null,void 0,i(28412))),yi=(0,Nt.htmlEscape)(k.t(null,void 0,i(6667))),Si=(0,Nt.htmlEscape)(k.t(null,void 0,i(57918))),Mi=(0,Nt.htmlEscape)(k.t(null,void 0,i(68025))),fi=(0,Nt.htmlEscape)(k.t(null,void 0,i(91459)));k.t(null,void 0,i(36004)),k.t(null,void 0,i(18429)),(0,Nt.htmlEscape)(k.t(null,void 0,i(25046)));class Ci extends Rt{constructor(e,t,i){super({iconMap:li,classNameMap:oi,titleColorMap:ni,size:t}),this._dataUpdatedInfo=new(n())(null).spawn(),this._options=i,this._model=e,this._dataModeBlinkingStatuses=Kt.spawn(),this._dataModeBlinkingStatuses.subscribe(this._updateBlinkingMode.bind(this)),this.turnOffBlinkingMode=this._turnOffBlinking.bind(this),this.setModel(e)}destroy(){this._dataUpdatedInfo.destroy(),this._dataModeBlinkingStatuses.destroy()}setModel(e){if(this._dataUpdatedInfo.destroy(),null===e)return this._model=e,void(this._dataUpdatedInfo=new(n())(null).spawn());this._dataUpdatedInfo=e.status().spawn(),this._dataUpdatedInfo.subscribe(this._updateStatus.bind(this),{callWithLast:!0})}_shouldBeHiddenByStatus(e){var t;return!!(null===(t=this._options.shouldBeHiddenRegardlessOfStatus)||void 0===t?void 0:t.value())||super._shouldBeHiddenByStatus(e)}_getTooltip(){const e=this._getShortTexts();return null===e?null:Object.values(e).join(" · ")}async _updateFullTooltipByStatus(){const e=this._dataUpdatedInfo.value();if(null===e)return void this._fullTooltip.setValue(null);const t=this._getShortTexts(),i=await this._getHtmls(),s=await this._getActions();if(e!==this._dataUpdatedInfo.value())return;const l=[];for(const o of e){const e=o.mode;l.push({icon:this._getIcon(e),iconClassName:this._iconClassNames.value(),title:t&&t[e],titleColor:this._getTitleColor(e),html:i&&i[e],size:this._size,action:s&&s[e]})}this._fullTooltip.setValue(l)}_updateStatus(e){var t;const i=null!==e?e[0]:null;super._updateByStatus(null!==(t=null==i?void 0:i.mode)&&void 0!==t?t:null),this._updateBlinkingMode()}async _getHtmls(){var e,t;const s=this._dataUpdatedInfo.value();if(null===s||null===this._model)return Promise.resolve(null);const l={},o=this._model.symbolName();let n=null,a=null;try{n=await this._model.description(),a=this._model.exchange()}catch(e){ii.logError(`Can't get exchange description, reason: ${(0,Yt.errorToString)(e)}`)}for(const r of s){const s=r.mode;if(l[s]=[],["DelayToRealtime","DelayNoRealtime","DelayWithoutMarketAgreement",...si].includes(s)&&(l[s].push(ci.format({symbolName:o,time:this._model.time().toString()})),this._options.subscriptionFullInfo&&null!==n&&"DelayToRealtime"===s&&l[s].push(pi.format({description:`${n}`})),null!==n&&"DelayNoRealtime"===s&&l[s].push(mi.format({description:`${n}`})),"DelayWithoutMarketAgreement"===s&&l[s].push(fi.format({listedExchange:this._model.listedExchange()})),this._options.subscriptionFullInfo&&si.includes(s)&&l[s].push(_i.format({listedExchange:this._model.listedExchange()}))),"EOD"===s&&(l[s]=[gi]),"TickByTick"===s){ -const o=void 0===r.updatePeriod?vi:(0,Nt.htmlEscape)(k.t(null,{count:r.updatePeriod,replace:{amount:(null!==(e=r.updatePeriod)&&void 0!==e?e:1).toString()},plural:"Data on our Basic plan is updated once every {amount} seconds, even if there are more updates on the market."},i(2121))),n=void 0===r.updatePeriod?bi:(0,Nt.htmlEscape)(k.t(null,{count:r.updatePeriod,replace:{amount:(null!==(t=r.updatePeriod)&&void 0!==t?t:1).toString()},plural:"Data is updated once every {amount} seconds, even if there are more updates on the market."},i(77033)));l[s].push(this._options.subscriptionFullInfo?o:n),this._options.subscriptionFullInfo&&l[s].push(wi)}if(null!==a&&"BATSToRealtime"===s){let e=this._model.listedExchange();0,l[s].push(yi.format({symbolName:o,exchange:a}),""!==e?Mi.format({exchange:e}):Si)}}return Object.keys(l).length>0?l:null}async _getActions(){if(null===this._dataUpdatedInfo.value()||null===this._model)return null;const e={};return Object.keys(e).length>0?e:null}_getShortTexts(){var e,t;const s=this._dataUpdatedInfo.value();if(null===s||null===this._model)return null;const l={};for(const o of s){const s=o.mode;if(["DelayToRealtime","DelayNoRealtime",...si,"DelayWithoutMarketAgreement"].includes(s)&&(l[s]=ai),"EOD"===s&&(l[s]=ri),"TickByTick"===s){const t=void 0===o.updatePeriod?di:(0,Nt.htmlEscape)(k.t(null,{plural:"One update every {amount} seconds",count:o.updatePeriod,replace:{amount:(null!==(e=o.updatePeriod)&&void 0!==e?e:1).toString()}},i(5223)));l[s]=t}if("BATSToRealtime"===s){let e=null!==(t=this._model.firstReplacedByBatsExchange())&&void 0!==t?t:"";0,l[s]=""!==e?hi.format({exchange:e,originalExchange:ui}):ui}}return Object.keys(l).length>0?l:null}_updateBlinkingMode(){const e=this._dataUpdatedInfo.value();if(null===e)return;const t=this._dataModeBlinkingStatuses.value();for(const i of e)if(!t.includes(i.mode))return void this.isBlinkingMode.setValue(!0);this.isBlinkingMode.setValue(!1)}_turnOffBlinking(){const e=this._dataUpdatedInfo.value();if(null!==e)for(const t of e)qt(t.mode)}}var Ei=i(27486),ki=i(8767);const Vi=k.t(null,void 0,i(39045)),xi=new Map([[!0,new Map([["small",Ei],["medium",ki],["large",ki]])],[!1,new Map([["small",""],["medium",""],["large",""]])]]),Wi=new Map([[!0,Ot.dataProblemLow],[!1,null]]),Ti=new Map([[!0,Vi],[!1,null]]),Li=new Map([[!0,Vi],[!1,null]]),Ai=new Map([[!0,It.colorsPalette["color-data-problem"]],[!1,null]]);class Hi extends Rt{constructor(e,t,i){super({iconMap:xi,classNameMap:Wi,tooltipMap:Ti,titleMap:Li,titleColorMap:Ai,size:t}),this._dataSourceErrorStatus=new(n())(null).spawn(),this._lastError=null,this._options=i,this.setSource(e)}destroy(){this._dataSourceErrorStatus.destroy()}setSource(e){this._dataSourceErrorStatus.destroy(),this._dataSourceErrorStatus=e.errorStatus().spawn(),this._dataSourceErrorStatus.subscribe(this._updateStatus.bind(this),{callWithLast:!0})}_getTooltip(e){var t;return null!==(t=e?this._getDataSourceErrorStatusCustomTitle():null)&&void 0!==t?t:super._getTooltip(e)}_getTitle(e){var t -;return null!==(t=e?this._getDataSourceErrorStatusCustomTitle():null)&&void 0!==t?t:super._getTitle(e)}async _getHtml(e){const t=this._dataSourceErrorStatus.value();return null!==t?[(0,Nt.htmlEscape)(t.error)]:null}_getAction(e){return null}_updateStatus(e){const t=this._status.value();null!==e?(this._status.setValue(!0),t&&this._lastError!==e.error&&this._updateByStatus(!0),this._lastError=e.error):(this._status.setValue(null),this._lastError=null)}_getDataSourceErrorStatusCustomTitle(){var e;return(null===(e=this._dataSourceErrorStatus.value())||void 0===e?void 0:e.title)||null}}const Pi=k.t(null,void 0,i(97325)),Di=new Map([["high",new Map([["small",Ei],["medium",ki],["large",ki]])],["low",new Map([["small",Ei],["medium",ki],["large",ki]])]]),Bi=new Map([["high",Ot.dataProblemHigh],["low",Ot.dataProblemLow]]),zi=new Map([["high",Pi],["low",Pi]]),Ii=new Map([["high",It.colorsPalette["color-data-problem"]],["low",It.colorsPalette["color-data-problem"]]]);class Ni extends Rt{constructor(e,t){super({tooltipMap:zi,iconMap:Di,classNameMap:Bi,titleMap:zi,titleColorMap:Ii,size:t}),this._dataProblem=new(n())(null).spawn(),this._isDataProblemCritical=new(n())(!1),this.setModel(e)}destroy(){this._dataProblem.destroy()}isDataProblemCritical(){return this._isDataProblemCritical}setModel(e){this._dataProblem.destroy(),null!==e?(this._dataProblem=e.status().spawn(),this._dataProblem.subscribe(this._updateStatus.bind(this),{callWithLast:!0})):this._dataProblem=new(n())(null).spawn()}async _getHtml(e){const t=this._dataProblem.value();return null===t?null:[(0,Nt.htmlEscape)(t.text)]}_getTooltip(e){var t;return null!==(t=this._getDataProblemCustomTitle())&&void 0!==t?t:super._getTooltip(e)}_getTitle(e){var t;return null!==(t=this._getDataProblemCustomTitle())&&void 0!==t?t:super._getTitle(e)}_updateStatus(e){var t;const i=null!==(t=null==e?void 0:e.severity)&&void 0!==t?t:null;this._status.setValue(i),this._isDataProblemCritical.setValue(function(e){return"high"===e}(i))}_getDataProblemCustomTitle(){var e;return(null===(e=this._dataProblem.value())||void 0===e?void 0:e.title)||null}}class Oi extends Rt{constructor(e,t){super(t),this._booleanStatus=new(n())(!1).spawn(),this.updateStatus(e)}destroy(){this._booleanStatus.destroy()}updateStatus(e){this._booleanStatus.destroy(),this._booleanStatus=e.spawn(),this._booleanStatus.subscribe(this._updateStatus.bind(this),{callWithLast:!0})}_updateStatus(e){e?this._status.setValue(!0):this._status.setValue(null)}}var Ri=i(79639),Fi=i(4696);const Gi=k.t(null,void 0,i(14177)),Ui=k.t(null,void 0,i(73717)),ji=new Map([[!0,new Map([["small",Ri],["medium",Fi],["large",Fi]])],[!1,new Map([["small",""],["medium",""],["large",""]])]]),$i=new Map([[!0,Ot.invalidSymbol],[!1,null]]),qi=new Map([[!0,Gi],[!1,null]]),Ki=new Map([[!0,Gi],[!1,null]]),Yi=new Map([[!0,It.colorsPalette["color-invalid-symbol"]],[!1,null]]),Xi=new Map([[!0,[Ui]],[!1,null]]),Zi=new Map([[!0,null],[!1,null]]);class Qi{constructor(e){this._el=document.createElement("div"),this._prevCustomClass=null,this._icon=e.icon.spawn(), -this._icon.subscribe(this._updateIcon.bind(this),{callWithLast:!0}),this._className=e.className.spawn(),this._className.subscribe(this._updateClassName.bind(this),{callWithLast:!0}),this._visible=e.visible.spawn(),this._visible.subscribe(this._updateVisibility.bind(this),{callWithLast:!0}),this._size=e.size||"small",this._render(e.parentEl),e.isBlinking&&(this._isBlinking=e.isBlinking.spawn(),this._isBlinking.subscribe(this._updateBlinkingMode.bind(this),{callWithLast:!0}),this._turnOffBlinking=e.turnOffBlinking)}destroy(){this._visible.destroy(),this._icon.destroy(),this._isBlinking&&this._isBlinking.destroy(),this._el.remove()}onClick(){this._turnOffBlinking&&this._turnOffBlinking()}visible(){return this._visible}_render(e){this._el.classList.add(Ot.statusItem,Ot[this._size]),e.appendChild(this._el)}_updateVisibility(e){this._el.classList.toggle("js-hidden",!e)}_updateIcon(e){this._el.innerHTML=e||""}_updateClassName(e){this._prevCustomClass!==e&&(null!==this._prevCustomClass&&this._el.classList.remove(this._prevCustomClass),null!==e&&this._el.classList.add(e),this._prevCustomClass=e)}_updateBlinkingMode(e){this._el.classList.toggle(Ot.blinking,e)}}class Ji{constructor(e,t,i,s){this.element=document.createElement("div"),this._blinkingSpawns=[],this._iconsRenderers=[];const l=[Ot.statuses,"apply-common-tooltip","common-tooltip-wide"];h.trackingModeIsAvailable&&l.push(Ot.touchMode),this.element.classList.add(...l,Ot[e]),this._visibleWidgetsCount=t.spawn(),this._visibleWidgetsCount.subscribe(this._updateSpecialClassAndTooltip.bind(this)),this._tooltips=i.spawn(),this._tooltips.subscribe(this._updateTooltip.bind(this)),this._onClickCallback=s.onClick,this._onClickHandler=this._onClick.bind(this),this.element.addEventListener("click",this._onClickHandler)}destroy(){for(const e of this._iconsRenderers)e.destroy();for(const e of this._blinkingSpawns)e.destroy();this._visibleWidgetsCount.destroy(),this._tooltips.destroy(),this.element.removeEventListener("click",this._onClickHandler),this.element.remove()}addStatusModel(e){this._iconsRenderers.push(new Qi({visible:e.visible,icon:e.model.icon(),className:e.model.className(),size:e.model.size(),parentEl:this.element,isBlinking:e.model.isBlinkingMode,turnOffBlinking:e.model.turnOffBlinkingMode}));const t=e.model.isBlinkingMode.spawn();t.subscribe(this._updateBlinkingMode.bind(this)),this._blinkingSpawns.push(t),this._updateBlinkingMode()}_onClick(e){e.preventDefault();const t=this._iconsRenderers.filter((e=>e.visible().value()));for(const e of t)e.onClick();let i=14;t.length>1&&(i-=2);const s=this.element.getBoundingClientRect(),l={x:s.left-i,y:s.bottom+4};this._onClickCallback(l)}_updateTooltip(){this.element.setAttribute("title",this._tooltips.value().join(" · "))}_updateSpecialClassAndTooltip(){const e=this._visibleWidgetsCount.value();this.element.classList.toggle(Ot.oneWidgetsVisible,1===e),this.element.classList.toggle(Ot.twoWidgetsVisible,2===e),this.element.classList.toggle(Ot.threeWidgetsVisible,3===e),this._updateTooltip()}_updateBlinkingMode(){ -const e=this._blinkingSpawns.some((e=>e.value()));this.element.classList.toggle(Ot.blinking,e)}}var es=i(21035),ts=i(20983),is=i(16030),ss=i(34074),ls=i(27086),os=i(20123),ns=i(23373),as=i(72074);const rs=k.t(null,void 0,i(83949)),ds=k.t(null,void 0,i(56042)),us=k.t(null,void 0,i(29985)),hs=k.t(null,void 0,i(95814)),cs=k.t(null,void 0,i(88958)),_s=k.t(null,void 0,i(69419)),ps=k.t(null,void 0,i(1653)),ms=k.t(null,void 0,i(40519)),gs=k.t(null,void 0,i(57048)),vs=k.t(null,void 0,i(87202)),bs=k.t(null,void 0,i(39348)),ws=k.t(null,void 0,i(7827)),ys=k.t(null,void 0,i(19830)),Ss=k.t(null,void 0,i(35701)),Ms=k.t(null,void 0,i(98105)),fs=k.t(null,void 0,i(50634)),Cs=k.t(null,void 0,i(74537)),Es=new Map([["market",new Map([["small",ts],["medium",is],["large",is]])],["pre_market",new Map([["small",ns],["medium",as],["large",as]])],["post_market",new Map([["small",ls],["medium",os],["large",os]])],["out_of_session",new Map([["small",es],["medium",es],["large",es]])],["holiday",new Map([["small",ss],["medium",ss],["large",ss]])]]),ks=new Map([["market",Ot.marketStatusOpen],["pre_market",Ot.marketStatusPre],["post_market",Ot.marketStatusPost],["out_of_session",Ot.marketStatusClose],["holiday",Ot.marketStatusHoliday]]),Vs=new Map([["market",rs],["pre_market",ds],["post_market",us],["out_of_session",hs],["holiday",cs]]),xs=new Map([["market",rs],["pre_market",ds],["post_market",us],["out_of_session",hs],["holiday",cs]]),Ws=new Map([["market",It.colorsPalette["color-market-open"]],["pre_market",It.colorsPalette["color-pre-market"]],["post_market",It.colorsPalette["color-post-market"]],["out_of_session",It.colorsPalette["color-market-closed"]],["holiday",It.colorsPalette["color-market-holiday"]]]),Ts={market:_s,pre_market:ps,post_market:ms,out_of_session:gs,holiday:vs};function Ls(e){return k.t(null,{plural:"{number} minutes",count:e},i(67151)).format({number:e.toString()})}function As(e){return k.t(null,{plural:"{number} hours",count:e},i(24430)).format({number:e.toString()})}function Hs(e){const t=Math.floor(e/86400),s=Math.floor((e-86400*t)/3600),l=Math.floor((e-86400*t-3600*s)/60);return 0===t&&0===s&&0===l?bs:t>0?ws.format({days:(o=t,k.t(null,{plural:"{number} days",count:o},i(58609)).format({number:o.toString()})),hours:As(s)}):s>0?ys.format({hours:As(s),minutes:Ls(l)}):Ls(l);var o}const Ps={market:e=>("post_market"===e.status?fs:Ms).format({remainingTime:Hs(e.remainingSeconds)}),pre_market:e=>Ss.format({remainingTime:Hs(e.remainingSeconds)}),post_market:e=>Ms.format({remainingTime:Hs(e.remainingSeconds)}),out_of_session:e=>("pre_market"===e.status?Cs:Ss).format({remainingTime:Hs(e.remainingSeconds)}),holiday:e=>("pre_market"===e.status?Cs:Ss).format({remainingTime:Hs(e.remainingSeconds)})},Ds=new Map([["market",null],["pre_market",null],["post_market",null],["out_of_session",null],["holiday",null]]);class Bs extends Rt{constructor(e,t){super({tooltipMap:Vs,iconMap:Es,classNameMap:ks,titleMap:xs,titleColorMap:Ws,actionMap:Ds,size:t}),this._model=null,this._expiredStatus=null,this._marketStatus=new(n())(null).spawn(), -this._sessionEdge=new(n())(null).spawn(),this.setModel(e),ze.showMarketOpenStatusProperty.subscribe(this,this._showMarketOpenStatusPropertyChanged)}destroy(){this._marketStatus.destroy(),this._sessionEdge.destroy(),this._model=null,ze.showMarketOpenStatusProperty.unsubscribeAll(this)}setModel(e){var t;if(this._marketStatus.destroy(),this._sessionEdge.destroy(),null===(t=this._expiredStatus)||void 0===t||t.destroy(),null===e)return this._marketStatus=new(n())(null).spawn(),this._sessionEdge=new(n())(null).spawn(),void(this._expiredStatus=null);this._model=e;const i=e.futuresContractExpirationTime();i&&(this._expiredStatus=i.expired().spawn(),this._expiredStatus.subscribe((e=>{e&&this._updateByStatus(this._marketStatus.value())}))),this._marketStatus=e.status().spawn(),this._marketStatus.subscribe(this._updateStatus.bind(this),{callWithLast:!0}),this._sessionEdge=e.nextSessionEdge().spawn(),this._sessionEdge.subscribe(this._updateTooltip.bind(this)),this._updateTooltip()}async _getHtml(e){if(this._isExpiredFutures())return[(0,Nt.htmlEscape)(expiredHtml)];const t=[(0,Nt.htmlEscape)(Ts[e])],i=this._marketStatus.value();if(null!==this._model&&null!==i){const i=this._model.nextSessionEdge().value();null!==i&&t.push({text:Ps[e](i),bold:!0})}return t}_shouldBeHiddenByStatus(e){return!ze.showMarketOpenStatusProperty.value()&&"market"===e}_getTooltip(e){return this._isExpiredFutures()?expiredTooltip:super._getTooltip(e)}_getIcon(e){return this._isExpiredFutures()?expiredIconMap.get(this._size)||null:super._getIcon(e)}_getClassName(e){return this._isExpiredFutures()?expiredClassName:super._getClassName(e)}_getTitle(e){return this._isExpiredFutures()?expiredTitle:super._getTitle(e)}_getTitleColor(e){return this._isExpiredFutures()?expiredTitleColor:super._getTitleColor(e)}_isExpiredFutures(){var e,t,i;return null!==(i=null===(t=null===(e=this._model)||void 0===e?void 0:e.futuresContractExpirationTime())||void 0===t?void 0:t.expired().value())&&void 0!==i&&i}_updateStatus(e){this._status.setValue(e)}_updateTooltip(){const e=this._status.value();null!==e&&this._updateFullTooltipByStatus(e)}_showMarketOpenStatusPropertyChanged(){this._updateByStatus(this._status.value())}}class zs{constructor(e,t){var i,s;this.visibleWidgetsCount=new(n())(0),this.errorWidgetIsShown=new(n())(!1),this._size=h.trackingModeIsAvailable?"medium":"small",this._tooltips=new(n())([]),this._visibilitySpawns=[],this._tooltipSpawns=[],this._statusWidgetInfos=[],this._renderer=new Ji(this._size,this.visibleWidgetsCount,this._tooltips,{onClick:this._handleToggleDropdown.bind(this)}),this._symbolInvalidViewModel=null,this._dataSourceErrorStatusViewModel=null,this._marketStatusViewModel=null,this._dataUpdatedModeViewModel=null,this._dataProblemViewModel=null,this._sessionWidget=null,this._dataSourceHasErrorVisible=null,this._dataSourceErrorCanBeShown=new(n())(!1),this._marketStatusCanBeShown=new(n())(!1),this._dataUpdatedModeCanBeShown=new(n())(!1),this._dataProblemCanBeShown=new(n())(!1),this._isDataProblemCritical=null, +this._updateStates(),i.statusWidgetEl&&this._addStatusesWidget(i.statusWidgetEl,i.hideInvisibleHover,i.hideValues),this._selected.subscribe(this._updateTitleMaxWidth.bind(this))}destroy(){super.destroy(),void 0!==this._flagged&&this._flagged.destroy()}getHeight(){return null===this._el?null:(null===this._clientHeight&&(this._clientHeight=this._el.clientHeight,0===this._clientHeight&&(this._clientHeight=null)),this._clientHeight)}_getButtonsCount(){return 1===this._mode?1:3}_render(){super._render();const e=(0,l.ensureNotNull)(this._el);e.classList.add(y.item,y.series),e.classList.toggle(y.onlyOneButtonCanBeStick,this._model.isOneButtonCanBeStick()),e.dataset.name="legend-series-item"}_updateStates(){super._updateStates(),this._updateFlaggedState()}_renderValues(){null===this._valuesParentEl&&(this._valuesParentEl=document.createElement("div"),this._valuesParentEl.classList.add(y.valuesWrapper),this._valuesAdditionalWrapperEl=document.createElement("div"),this._valuesAdditionalWrapperEl.classList.add(y.valuesAdditionalWrapper),this._valuesParentEl.appendChild(this._valuesAdditionalWrapperEl));const e=(0,l.ensureNotNull)(this._valuesAdditionalWrapperEl),t=this._values.value();for(const i of t){const t=document.createElement("div");t.classList.add(y.valueItem),t.classList.toggle(g.blockHidden,!i.visible.value()),t.classList.toggle(y.unimportant,i.unimportant.value());const s=document.createElement("div"),l=i.title.value()||"";s.classList.add(y.valueTitle),s.classList.toggle(g.blockHidden,0===l.length),s.appendChild(document.createTextNode(l)),t.appendChild(s);const o=document.createElement("div");o.classList.add(y.valueValue),o.style.color=i.color.value()||"",o.appendChild(document.createTextNode(i.value.value())),t.appendChild(o),this._valuesElements.push({title:s,value:o}),e.appendChild(t)}}_createTitlesSpawns(){const e=this._model.titles();this._titlesSpawns=[{title:e.title.spawn(),class:y.mainTitle},{title:e.description.spawn(),class:y.descTitle},{title:e.interval.spawn(),class:y.intervalTitle},{title:e.provider.spawn(),class:y.providerTitle},{title:e.exchange.spawn(),class:y.exchangeTitle},{title:e.chartStyle.spawn(),class:y.styleTitle},{title:e.priceSource.spawn(),class:y.styleTitle}]}_isValuesShouldBeHidden(){return!this._valuesSpawnArray.some((e=>e.value.value().length>0||(e.title.value()||"").length>0))}_updateValuesTitleHTMLElHandler(e,t=""){const i=(0,l.ensure)(this._valuesElements[e].title);w(i,t),i.classList.toggle(g.blockHidden,0===t.length),this._updateShowValues()}_isWidthButtonsMode(){return null!==this._el&&(void 0!==this._flagged&&Boolean(this._flagged.value())||super._isWidthButtonsMode())}_updateFlaggedState(){if(void 0===this._flagged)return;(0,l.ensureNotNull)(this._el).classList.toggle(y.flagged,Boolean(this._flagged.value())),this._updateTitleMaxWidth()}}const C=u.isSafari?"click":"auxclick";class E extends M{constructor(e,t,i){super(e,t,i),this._wheelClickHandler=null,this._canUpdateRowVisibility=!0,this._globalRowVisibility=this._model.globalVisibility().spawn(), +this._globalRowVisibility.subscribe(this._updateShowLine.bind(this),{callWithLast:!0}),this._has5Buttons=this._model.isPineScriptDataSource().spawn(),this._has5Buttons.subscribe(this._update5ButtonsStyles.bind(this)),this._updateStates(!this._disabled.value()),i.statusWidgetEl&&this._addStatusesWidget(i.statusWidgetEl,i.hideInvisibleHover,i.hideValues),this._selected.subscribe(this._updateTitleMaxWidth.bind(this)),i.withActions&&(this._wheelClickHandler=this._onWheelClicked.bind(this),null!==this._titleParentEl&&this._titleParentEl.addEventListener(C,this._wheelClickHandler))}destroy(){super.destroy(),this._has5Buttons.destroy(),this._globalRowVisibility&&this._globalRowVisibility.destroy(),null!==this._wheelClickHandler&&null!==this._titleParentEl&&this._titleParentEl.removeEventListener(C,this._wheelClickHandler)}_updateShowLine(){if(null===this._el||!this._canUpdateRowVisibility)return;const e=!this._globalRowVisibility.value();e?this._el.classList.toggle(g.blockHidden,e):super._updateShowLine()}_getButtonsCount(){switch(this._mode){case 4:return this._has5Buttons.value()?5:4;case 3:return 3;default:return 2}}_render(){super._render();const e=(0,l.ensureNotNull)(this._el);e.classList.add(y.item,y.study),e.dataset.name="legend-source-item"}_createTitlesSpawns(){const e=this._model.titles();this._titlesSpawns=[{title:e.title.spawn(),class:y.mainTitle},{title:e.args.spawn(),class:y.descTitle}]}_renderValues(){null===this._valuesParentEl&&(this._valuesParentEl=document.createElement("div"),this._valuesParentEl.classList.add(y.valuesWrapper),this._valuesAdditionalWrapperEl=document.createElement("div"),this._valuesAdditionalWrapperEl.classList.add(y.valuesAdditionalWrapper),this._valuesParentEl.appendChild(this._valuesAdditionalWrapperEl));const e=(0,l.ensureNotNull)(this._valuesAdditionalWrapperEl),t=this._values.value();for(const i of t){const t=document.createElement("div");t.classList.add(y.valueItem),t.classList.toggle(g.blockHidden,!i.visible.value());const s=document.createElement("div");s.classList.add(y.valueValue),s.style.color=i.color.value()||"",s.appendChild(document.createTextNode(i.value.value()));const l=i.title.value();void 0!==l&&(s.classList.add("apply-common-tooltip"),s.title=l),t.appendChild(s),this._valuesElements.push({value:s}),e.appendChild(t)}}_updateValuesTitleHTMLElHandler(e,t=""){const i=(0,l.ensure)(this._valuesElements[e].value);i.classList.toggle("apply-common-tooltip",0!==t.length),i.title=t}_update5ButtonsStyles(e){null!==this._el&&(this._el.classList.toggle(y.has5Buttons,e),this._updateAllButtonsWidth())}_onWheelClicked(e){1===e.button&&this._model.onRemoveSource()}}var k=i(44352),V=i(51768);function x(e){(0,V.trackEvent)("GUI","Legend action",e)}var T=i(47036),W=i(62920),L=i(65300),A=i(36885);const H=k.t(null,void 0,i(21686)),P=k.t(null,void 0,i(28705)),D=k.t(null,void 0,i(51072));class B{constructor(e,t,i){this._el=null,this._counterEl=null,this._arrowIconEL=null,this._objectTreeEl=null,this._mode=0,this._parentEl=e,this._themedColor=t.spawn(), +this._themedColor.subscribe(this._updateThemedColor.bind(this)),this._sourceCount=i.visibleDataSourceCount.spawn(),this._sourceCount.subscribe(this._updateSourceCount.bind(this)),this._isStateOpen=i.isDataSourcesCollapsed.spawn(),this._isStateOpen.subscribe(this._updateState.bind(this)),this._showObjectsTree=i.showObjectsTree.spawn(),this._showObjectsTree.subscribe(this._updateObjectTreeVisibility.bind(this)),this._render(),this._updateState(),this._updateThemedColor(this._themedColor.value()),this._updateObjectTreeVisibility(this._showObjectsTree.value()),this._toggleStateHandler=(0,m.wrapHandlerWithPreventEvent)(i.onCollapseDataSources),this._showObjectTreeHandler=(0,m.wrapHandlerWithPreventEvent)(i.onShowObjectsTreeDialog),null!==this._el&&(this._el.addEventListener("touchend",this._toggleStateHandler),this._el.addEventListener("click",this._toggleStateHandler),this._el.addEventListener("contextmenu",(e=>{e.preventDefault(),e.stopPropagation()}))),null!==this._objectTreeEl&&(this._objectTreeEl.addEventListener("touchend",this._showObjectTreeHandler),this._objectTreeEl.addEventListener("click",this._showObjectTreeHandler))}destroy(){this._sourceCount.destroy(),this._isStateOpen.destroy(),null!==this._objectTreeEl&&(this._objectTreeEl.removeEventListener("touchend",this._showObjectTreeHandler),this._objectTreeEl.removeEventListener("click",this._showObjectTreeHandler),this._objectTreeEl=null),this._arrowIconEL=null,this._counterEl=null,null!==this._el&&(this._el.removeEventListener("touchend",this._toggleStateHandler),this._el.removeEventListener("click",this._toggleStateHandler),this._el.innerHTML="",this._el=null)}setMode(e){this._mode=e?1:0,this._updateTooltip()}_render(){this._el=document.createElement("div"),this._el.className=`${y.toggler} apply-common-tooltip`,this._arrowIconEL=document.createElement("div"),this._arrowIconEL.classList.add(y.iconArrow),this._arrowIconEL.innerHTML=h.trackingModeIsAvailable?W:T,this._el.appendChild(this._arrowIconEL),this._objectTreeEl=document.createElement("div"),this._objectTreeEl.classList.add(y.objectTree),this._objectTreeEl.innerHTML=h.trackingModeIsAvailable?A:L,this._el.appendChild(this._objectTreeEl),this._counterEl=document.createElement("div"),this._counterEl.classList.add(y.counter),this._counterEl.appendChild(document.createTextNode(String(this._sourceCount.value()))),this._el.appendChild(this._counterEl),this._parentEl.appendChild(this._el)}_updateThemedColor(e){if(null!==this._el)if(e.length>0){const[t,i,s]=(0,r.parseRgb)(e);this._el.style.backgroundColor=(0,r.rgbaToString)([t,i,s,(0,r.normalizeAlphaComponent)(.8)])}else this._el.style.removeProperty("background-color")}_updateSourceCount(e){w((0,l.ensureNotNull)(this._counterEl),String(e));const t=(0,l.ensureNotNull)(this._el),i=e<1;t.classList.toggle(g.blockHidden,i);const s=1===e;t.classList.toggle(y.onlyOneSourceShown,s)}_updateState(){const e=!this._isStateOpen.value();this._parentEl.classList.toggle(y.closed,e),this._updateTooltip(),x((e?"Hide":"Show")+" not main sources")}_tooltip(){ +return 1===this._mode?D:this._isStateOpen.value()?H:P}_updateTooltip(){null!==this._el&&this._el.setAttribute("title",this._tooltip())}_updateObjectTreeVisibility(e){(0,l.ensureNotNull)(this._el).classList.toggle(y.objectsTreeCanBeShown,e)}}var z=i(38780),I=i(39640);function N(e,t){const i=new(n())(t(e.value()));e.subscribe((e=>{i.setValue(t(e))}));return i.readonly().spawn((()=>e.unsubscribe()))}const O=h.trackingModeIsAvailable?44:28,R=d.enabled("object_tree_legend_mode");class F{constructor(e,t){this._renderToggler=null,this._mainDataSourceRenderer=null,this._dataSourceRenderers=[],this._parentEl=document.createElement("div"),this._mainDataSourceEl=null,this._dataSourcesEl=null,this._dataSourcesAdditionalWrapperEl=null,this._collapsedDataSourcesWrapperEl=null,this._collapsedDataSourcesEl=null,this._outsideEventForCollapsedTooltip=null,this._options=e,this._togglerOptions=t,this._isStudiesLegendHidden=e.isStudiesLegendHidden.spawn(),this._isStudiesLegendHidden.subscribe(this._updateLegendVisibility.bind(this)),this._isAllLegendHidden=e.isAllLegendHidden.spawn(),this._isAllLegendHidden.subscribe(this._updateLegendVisibility.bind(this)),this._updateLegendVisibility(),this._hideAllExceptFirstLine=e.hideAllExceptFirstLine.spawn(),this._hideAllExceptFirstLine.subscribe(this._updateAllHiddenExeptFirstLine.bind(this)),this._themedColor=e.themedColor.spawn(),this._themedColor.subscribe(this._setCustomBg.bind(this)),this._showBackground=e.showBackground.spawn(),this._showBackground.subscribe(this._setCustomBg.bind(this)),this._backgroundTransparency=e.backgroundTransparency.spawn(),this._backgroundTransparency.subscribe(this._setCustomBg.bind(this)),this._collapsedDataSourcesCountSpawn=e.collapsedDataSourcesCount.spawn(),this._collapsedDataSourcesCountSpawn.subscribe(this._updateCollapsedSourcesCount.bind(this)),this._showCollapsedDataSourcesTooltipHandler=this._showCollapsedDataSourcesTooltip.bind(this),this._parentEl.classList.add(y.legend),this._parentEl.classList.toggle(y.noWrap,!h.trackingModeIsAvailable),this._parentEl.classList.toggle(y.noActions,!this._options.withActions),this._parentEl.classList.toggle(y.touchMode,h.trackingModeIsAvailable),this._parentEl.classList.toggle(y.wrappable,!this._hideAllExceptFirstLine.value()),this._parentEl.dataset.name="legend",this._parentEl.style.setProperty("--legend-source-item-button-width",`${O}px`);const i=t=>{t.preventDefault(),e.showLegendWidgetContextMenu(t)};this._mouseEventHandler=new p.MouseEventHandler(this._parentEl,{contextMenuEvent:i,touchContextMenuEvent:i})}destroy(){if(this._isStudiesLegendHidden.destroy(),this._isAllLegendHidden.destroy(),this._hideAllExceptFirstLine.destroy(),this._themedColor.destroy(),this._showBackground.destroy(),this._backgroundTransparency.destroy(),this._collapsedDataSourcesCountSpawn.destroy(),h.trackingModeIsAvailable&&null!==this._collapsedDataSourcesWrapperEl&&this._collapsedDataSourcesWrapperEl.removeEventListener("touchend",this._showCollapsedDataSourcesTooltipHandler), +this._outsideEventForCollapsedTooltip&&this._outsideEventForCollapsedTooltip(),null!==this._dataSourcesAdditionalWrapperEl&&(this._dataSourcesAdditionalWrapperEl.innerHTML="",this._dataSourcesAdditionalWrapperEl=null),null!==this._dataSourcesEl&&(this._dataSourcesEl.innerHTML="",this._dataSourcesEl=null),null!==this._renderToggler&&(this._renderToggler.destroy(),this._renderToggler=null),null!==this._mainDataSourceRenderer&&(this._mainDataSourceRenderer.destroy(),this._mainDataSourceRenderer=null),0!==this._dataSourceRenderers.length){for(const e of this._dataSourceRenderers)e.destroy();this._dataSourceRenderers=[]}this._mouseEventHandler.destroy(),this._parentEl.innerHTML="",delete this._parentEl}addMainDataSource(e,t){this._renderMainDataSourceEl(),this._mainDataSourceRenderer=new f(e,(0,l.ensureNotNull)(this._mainDataSourceEl),{withActions:this._options.withActions,customTextColor:this._options.customTextColor,statusWidgetEl:t.getElement(),hideInvisibleHover:N(t.visibleWidgetsCount,(e=>Boolean(e))),hideValues:t.errorWidgetIsShown}),this._updateLegendVisibility(),e.onDestroy().subscribe(this,(()=>{null!==this._mainDataSourceRenderer&&(this._mainDataSourceRenderer.destroy(),this._mainDataSourceRenderer=null)}),!0)}addDataSources(e,t){this._renderDataSourcesEl();const i=(0,l.ensureNotNull)(this._dataSourcesAdditionalWrapperEl);for(let s=0;sBoolean(e))),hideValues:t[s].errorWidgetIsShown});this._dataSourceRenderers.push(o),this._updateLegendVisibility(),l.onDestroy().subscribe(this,(()=>{const e=this._dataSourceRenderers.indexOf(o);-1!==e&&(this._dataSourceRenderers[e].destroy(),this._dataSourceRenderers.splice(e,1))}),!0)}}addCustomWidget(e,t){if(0===t.block){this._renderMainDataSourceEl();const i=(0,l.ensureNotNull)(this._mainDataSourceEl);1===t.position&&e.renderTo(i,i.firstChild),0===t.position&&e.renderTo(i)}if(1===t.block){this._renderDataSourcesEl();const i=(0,l.ensureNotNull)(this._dataSourcesAdditionalWrapperEl);1===t.position&&e.renderTo(i,i.firstChild),0===t.position&&e.renderTo(i)}}firstTitle(){return this._parentEl.firstElementChild}getElement(){return this._parentEl}updateMode(e){const t=R&&e<133?1:e<205?2:e<222?3:4;null!==this._mainDataSourceRenderer&&this._mainDataSourceRenderer.updateMode(t);for(const e of this._dataSourceRenderers)e.updateMode(t);this._parentEl.classList.toggle(y.medium,3===t),this._parentEl.classList.toggle(y.minimized,2===t),this._parentEl.classList.toggle(y.micro,1===t),null!==this._renderToggler&&this._renderToggler.setMode(1===t);const i=!this._hideAllExceptFirstLine.value()&&(h.trackingModeIsAvailable||e<542);this._parentEl.classList.toggle(y.directionColumn,i),this._parentEl.classList.toggle(y.hideUniportantValueItems,!u.CheckMobile.any()&&e<=272)}getMainSourceHeight(){return null===this._mainDataSourceRenderer?0:this._mainDataSourceRenderer.getHeight()} +getDataSourceHeight(){return 0===this._dataSourceRenderers.length?0:this._dataSourceRenderers[0].getHeight()}_renderMainDataSourceEl(){null===this._mainDataSourceEl&&(this._mainDataSourceEl=document.createElement("div"),this._mainDataSourceEl.classList.add(y.legendMainSourceWrapper),this._parentEl.insertBefore(this._mainDataSourceEl,this._dataSourcesEl))}_renderDataSourcesEl(){null===this._dataSourcesEl&&(this._dataSourcesEl=document.createElement("div"),this._dataSourcesEl.classList.add(y.sourcesWrapper),this._renderToggle(this._dataSourcesEl),this._dataSourcesAdditionalWrapperEl=document.createElement("div"),this._dataSourcesAdditionalWrapperEl.classList.add(y.sources),this._dataSourcesEl.appendChild(this._dataSourcesAdditionalWrapperEl),this._renderCollapsedCounter(this._dataSourcesAdditionalWrapperEl),this._parentEl.appendChild(this._dataSourcesEl))}_renderToggle(e){this._options.showToggleButton&&(this._renderToggler=new B(e,this._options.themedColor,this._togglerOptions))}_renderCollapsedCounter(e){this._collapsedDataSourcesWrapperEl=document.createElement("div"),this._collapsedDataSourcesWrapperEl.className=`${y.item} ${y.last}`,this._collapsedDataSourcesEl=document.createElement("span"),this._collapsedDataSourcesEl.className=`${y.text} apply-common-tooltip`,this._collapsedDataSourcesWrapperEl.append(this._collapsedDataSourcesEl),e.append(this._collapsedDataSourcesWrapperEl),h.trackingModeIsAvailable&&this._collapsedDataSourcesWrapperEl.addEventListener("touchend",this._showCollapsedDataSourcesTooltipHandler),this._updateCollapsedSourcesCount(this._collapsedDataSourcesCountSpawn.value())}_showCollapsedDataSourcesTooltip(){(0,z.showOnElement)(this._collapsedDataSourcesEl,{text:this._options.collapsedDataSourcesTitle.value()}),this._addOutsideEventForHideTooltip()}_addOutsideEventForHideTooltip(){null!==this._outsideEventForCollapsedTooltip&&this._outsideEventForCollapsedTooltip(),this._outsideEventForCollapsedTooltip=(0,I.addOutsideEventListener)(new CustomEvent("timestamp").timeStamp,this._collapsedDataSourcesWrapperEl,(()=>{null!==this._outsideEventForCollapsedTooltip&&this._outsideEventForCollapsedTooltip(),(0,z.hide)()}),window.document,{touchEnd:!0})}_updateCollapsedSourcesCount(e){if(null===this._collapsedDataSourcesWrapperEl||null===this._collapsedDataSourcesEl)return;const t=0===e;this._collapsedDataSourcesWrapperEl.classList.toggle(g.blockHidden,t),t||(w(this._collapsedDataSourcesEl,`+${e}`),this._collapsedDataSourcesEl.setAttribute("title",this._options.collapsedDataSourcesTitle.value()))}_updateLegendVisibility(){this._parentEl.classList.toggle(g.blockHidden,this._isAllLegendHidden.value()),null!==this._dataSourcesEl&&this._dataSourcesEl.classList.toggle(g.blockHidden,this._isStudiesLegendHidden.value())}_updateAllHiddenExeptFirstLine(){this._parentEl.classList.toggle(y.wrappable,!this._hideAllExceptFirstLine.value())}_setCustomBg(){const e=this._showBackground.value(),t=this._themedColor.value(),i=this._backgroundTransparency.value();let s="";if(e){const[e,l,o]=(0,r.parseRgb)(t);s=(0, +r.rgbaToString)([e,l,o,(0,r.normalizeAlphaComponent)(1-i/100)])}this._parentEl.style.color=s}}var G=i(11536),U=i(52865),j=i(38031),$=i(47539),q=i(26867),K=i.n(q),Y=i(80142),X=i(7019);function Z(e){return void 0!==e?j.resetTransparency(e):e}const Q=new $.TranslatedString("show {title}",k.t(null,void 0,i(87358))),J=new $.TranslatedString("hide {title}",k.t(null,void 0,i(70301))),ee=k.t(null,void 0,i(81428)),te=k.t(null,void 0,i(31971));class ie{constructor(e,t,i,s,l){this._values=new(n())([]),this._actions=[],this._onDestroy=new(K()),this._loading=new(n())(!1),this._moreActionCM=null,this._updateLoadingStatus=()=>{this._loading.setValue(this._source.isLoading())},this._model=e,this._source=t,this._options=i,this._callbacks=s,this._contextMenuOptions=l,this._disabled=new(n())(this._getDisabledState()),this._disabledOnInterval=new(n())(this._getDisabledOnIntervalState()),this._selected=new(n())(!1),this._isTitleHidden=new(n())(this._getTitleHiddenValue()),this._isValuesHidden=new(n())(this._getValuesHiddenValue()),this._isRowHidden=new(n())(this._getRowHiddenValue()),this._isEditable=new(n())(this._getIsEditable()),(0,X.combine)((()=>({})),this._isTitleHidden,this._isValuesHidden,this._disabled).subscribe(this._updateRowVisibilities.bind(this)),this._values.subscribe((()=>{this._isValuesHidden.setValue(this._getValuesHiddenValue())}))}destroy(){}onDestroy(){return this._onDestroy}titles(){return this._titles}values(){return this._values.readonly()}actions(){return this._actions}disabled(){return this._disabled.readonly()}disabledOnInterval(){return this._disabledOnInterval.readonly()}selected(){return this._selected.readonly()}loading(){return this._loading.readonly()}isTitleHidden(){return this._isTitleHidden.readonly()}isValuesHidden(){return this._isValuesHidden.readonly()}isRowHidden(){return this._isRowHidden.readonly()}isEditable(){return this._isEditable.readonly()}update(){this._updateTitles(),this._updateValues(),this._updateStates()}updateSource(e){this._source!==e&&(this._source=e,this.update(),this._isTitleHidden.setValue(this._getTitleHiddenValue()),this._isValuesHidden.setValue(this._getValuesHiddenValue()))}onToggleDisabled(){const e=this._source.properties().childs().visible,t=!e.value();this._model.setProperty(e,t,(t?Q:J).format({title:new $.TranslatedString(this._source.name(),this._source.title())})),x((t?"Show":"Hide")+" source")}onShowSettings(e){this._source.userEditEnabled()&&(this.setSourceSelected(),this._callbacks.showChartPropertiesForSource(this._source,e),x("Settings for source"))}onShowMoreActions(e){return this._options.readOnlyMode?Promise.resolve(null):(this._callbacks.updateActions(),x("Show source context menu"),this._callbacks.showContextMenuForSources([this._source],this._calcNewPosition(e),this._contextMenuOptions))}setSourceSelected(){this._model.selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection(this._source)}))}_moreActionHandler(e){e.preventDefault(),null!==this._moreActionCM&&this._moreActionCM.isShown()?this._moreActionCM=null:(this.setSourceSelected(), +this.onShowMoreActions(e).then((e=>{this._moreActionCM=e})))}_updateStates(){this._disabled.setValue(this._getDisabledState()),this._disabledOnInterval.setValue(this._getDisabledOnIntervalState()),this._selected.setValue(this._model.selection().isSelected(this._source)),this._isEditable.setValue(this._getIsEditable()),this._updateLoadingStatus()}_hasValues(){return this._values.value().length>0}_getEyeTitle(){return this._disabled.value()?ee:te}_getIsEditable(){return this._source.userEditEnabled()}_getDisabledState(){return!this._source.properties().visible.value()}_updateRowVisibilities(){this._isRowHidden.setValue(this._getRowHiddenValue())}_getRowHiddenValue(){return this._options.readOnlyMode&&this._disabled.value()||this._isTitleHidden.value()&&(this._isValuesHidden.value()||this._disabled.value())}_calcNewPosition(e){let t={};if(e.hasOwnProperty("touches")&&e.touches.length>0)t={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY};else if(null!==e.target){const i=e.target.getBoundingClientRect();t={clientX:(0,Y.isRtl)()?i.right:i.left,clientY:i.top+i.height+3}}else{const i=e;t={clientX:i.clientX,clientY:i.clientY}}return t}}var se=i(35936),le=i(3792),oe=i(41674),ne=i(87258),ae=i(45534);const re=k.t(null,void 0,i(41610)),de=k.t(null,void 0,i(93666)),ue=k.t(null,void 0,i(8209)),he=d.enabled("show_hide_button_in_legend"),ce=d.enabled("hide_resolution_in_legend");class _e extends ie{constructor(e,t,i,s,l){super(e,t,i,s,l),this._titles={title:new(n())(""),description:new(n())(""),interval:new(n())(""),provider:new(n())(""),exchange:new(n())(""),chartStyle:new(n())(""),priceSource:new(n())("")},this._symbolMarker=null,this._symbolMarkerIcon=null,this._flagged=new(n())(null),this._symbolAction=null,this._symbol=null,this._isOneButtonCanBeStick=!1,this._createActions(),this._updateSymbolMarker();const o=this._model.model().properties().childs().paneProperties.childs().legendProperties.childs();o.showSeriesTitle.subscribe(this,(()=>{this._isTitleHidden.setValue(this._getTitleHiddenValue())})),this._isPriceSourceHidden=(0,U.createWVFromGetterAndSubscription)((()=>!o.showPriceSource.value()),o.showPriceSource),this._valuesVisibleProperty=(0,U.combineProperty)(((e,t,i)=>e||t||i),o.showSeriesOHLC,o.showBarChange,o.showVolume),this._valuesVisibleProperty.subscribe(null,(()=>{this._isValuesHidden.setValue(this._getValuesHiddenValue())})),this.update(),this._source.onStatusChanged().subscribe(this,this._updateLoadingStatus)}destroy(){super.destroy(),this._model.model().properties().childs().paneProperties.childs().legendProperties.childs().showSeriesTitle.unsubscribeAll(this),this._source.onStatusChanged().unsubscribeAll(this),this._valuesVisibleProperty.destroy(),this._isPriceSourceHidden.destroy(),this._onDestroy.fire()}flagged(){return this._flagged.readonly()}onShowSettings(){this._source.userEditEnabled()&&this._callbacks.showGeneralChartProperties(se.TabNames.symbol)}isOneButtonCanBeStick(){return this._isOneButtonCanBeStick}_updateTitles(){const e=(0,l.ensureNotNull)(this._source.statusView()).getSplitTitle() +;this._titles.title.setValue((0,G.clean)(e.title,!0)),this._titles.description.setValue((0,G.clean)(e.description,!0)),ce||this._titles.interval.setValue((0,G.clean)(e.interval,!0)),this._titles.provider.setValue((0,G.clean)(e.provider,!0)),this._titles.exchange.setValue((0,G.clean)(e.exchange,!0)),this._titles.chartStyle.setValue((0,G.clean)(e.chartStyle,!0)),this._titles.priceSource.setValue((0,G.clean)(this._isPriceSourceHidden.value()?"":e.priceSource,!0))}_updateValues(){const e=this._source.legendView(),t=this._values.value(),i=e.marketTitle(),s=e.marketTitle().length>0;if(0===t.length){const t={value:new(n())(""),color:new(n())(""),visible:new(n())(s),title:new(n())(i),unimportant:new(n())(!1)},l=e.items().map((e=>({value:new(n())(e.value()),color:new(n())(Z(e.color())),visible:new(n())(e.visible()),title:new(n())(e.title()),unimportant:new(n())(e.unimportant())})));this._values.setValue([t].concat(l))}else{t[0].title.setValue(i),t[0].visible.setValue(s);const l=e.items();for(let e=0;e{e.title.setValue(this._getEyeTitle())}))}this._actions.push({iconMap:new Map([["large",ae],["small",ne]]),action:this._moreActionHandler.bind(this),visible:new(n())(!0),title:new(n())(re),dataset:{name:"legend-more-action"}})}_getMarkerTitle(){return null!==this._symbolMarker?this._symbolMarker.isMarked()?ue:de:""}_symbolActionHandler(){null!==this._symbolMarker&&(this._updateSymbolMarker(),x("Change flag state"))}_updateSymbolMarker(){this._isOneButtonCanBeStick=!0}}var pe=i(89215),me=i(3615);var ge=i(46069),ve=i(98351),be=i(83637),we=i(34882),ye=i(88658),Se=i(52506),Me=i(89895),fe=i(83956);(0,ve.getLogger)("Chart.LegendWidget");const Ce=k.t(null,void 0,i(89517)),Ee=k.t(null,void 0,i(66324)),ke=k.t(null,void 0,i(34596)),Ve=k.t(null,void 0,i(41610)),xe=(k.t(null,void 0,i(82751)),k.t(null,void 0,i(89790)),k.t(null,void 0,i(37809))),Te=(d.enabled("study_buttons_in_legend"),d.enabled("show_hide_button_in_legend")),We=d.enabled("property_pages"),Le=d.enabled("format_button_in_legend"),Ae=d.enabled("delete_button_in_legend");class He extends ie{constructor(e,t,i,s,l){super(e,t,i,s,l),this._titles={title:new(n())(""),args:new(n())("")},this._error=new(n())(!1),this._isPineScriptDataSource=new(n())(!1),this._pineAction=null, +this._globalVisibility=new(n())(!0),this._createActions();const o=this._model.model().properties().childs().paneProperties.childs().legendProperties.childs(),a=[o.showSeriesTitle,o.showStudyTitles];for(const e of a)e.subscribe(this,(()=>{this._isTitleHidden.setValue(this._getTitleHiddenValue())}));const r=[o.showSeriesOHLC,o.showBarChange,o.showStudyValues];for(const e of r)e.subscribe(this,(()=>{this._isValuesHidden.setValue(this._getValuesHiddenValue())}));this.update()}destroy(){super.destroy();const e=this._model.model().properties().childs().paneProperties.childs().legendProperties.childs();e.showSeriesTitle.unsubscribeAll(this),e.showStudyTitles.unsubscribeAll(this),e.showSeriesOHLC.unsubscribeAll(this),e.showBarChange.unsubscribeAll(this),e.showStudyValues.unsubscribeAll(this),this._onDestroy.fire()}error(){return this._error.readonly()}isPineScriptDataSource(){return this._isPineScriptDataSource.readonly()}updateSource(e){this._source!==e&&(this._values.setValue([]),super.updateSource(e),this._updateAbleShowSourceCode())}onRemoveSource(){var e;this._source.isUserDeletable()&&(this._source.hasChildren()?(e=this._model.removeSource.bind(this._model,this._source,!1),(0,me.showConfirm)({title:k.t(null,void 0,i(38154)),text:k.t(null,void 0,i(52003)),onConfirm:({dialogClose:t})=>{e(),t()}})):this._model.removeSource(this._source,!1),x("Remove sources"))}onShowSourceCode(){0}setGlobalVisibility(e){this._globalVisibility.setValue(e)}globalVisibility(){return this._globalVisibility.readonly()}getFullTitle(){return[this._titles.title,this._titles.args].map((e=>e.value())).join(" ")}_updateTitles(){const e=(0,l.ensureNotNull)(this._source.statusView()).getSplitTitle();this._titles.title.setValue((0,G.clean)(e[0],!0));const t=Array.isArray(e[1])?e[1].join(" "):e[1]||"";this._titles.args.setValue((0,G.clean)(t,!0))}_updateValues(){const e=this._source.legendView();if(null===e)return;if(0===e.items().length)return;const t=this._values.value();if(0===t.length){const t=e.items().map((e=>({value:new(n())(e.value()),color:new(n())(Z(e.color())),visible:new(n())(e.visible()),unimportant:new(n())(e.unimportant()),title:new(n())(e.title())})));this._values.setValue(t)}else{const i=e.items();for(let e=0;e{e.title.setValue(this._getEyeTitle())}));const t={iconMap:new Map([["large",oe],["small",le]]),action:(0,m.wrapHandlerWithPreventEvent)(this.onShowSettings.bind(this,se.TabNames.visibility)),visible:new(n())(this._getDisabledOnIntervalState()),className:y.intervalEye,title:new(n())(xe),dataset:{name:"legend-interval-show-hide-action"}};this._actions.push(t),this._disabledOnInterval.subscribe((i=>{t.visible.setValue(i),e.visible.setValue(!i)}))}if(We&&Le&&(!(0,pe.isStudy)(this._source)||new ge.MetaInfoHelper(this._source.metaInfo()).hasUserEditableOptions())){const e={iconMap:new Map([["large",be],["small",be]]),action:(0,m.wrapHandlerWithPreventEvent)(this.onShowSettings.bind(this)),visible:new(n())(this._getIsEditable()),title:new(n())(Ce),dataset:{name:"legend-settings-action"}};this._actions.push(e),this._isEditable.subscribe((t=>{e.visible.setValue(t)}))}if(Ae){const e={iconMap:new Map([["large",Se],["small",ye]]),action:(0,m.wrapHandlerWithPreventEvent)(this.onRemoveSource.bind(this)),visible:new(n())(this._getIsEditable()),title:new(n())(ke),dataset:{name:"legend-delete-action"}};this._actions.push(e),this._isEditable.subscribe((t=>{e.visible.setValue(t)}))}const e={iconMap:new Map([["large",ae],["small",ne]]),action:this._moreActionHandler.bind(this),visible:new(n())(this._getIsEditable()),title:new(n())(Ve),dataset:{name:"legend-more-action"}};this._actions.push(e),this._isEditable.subscribe((t=>{e.visible.setValue(t)}))}}var Pe=i(43986),De=i(60223),Be=i(1930),ze=i(35663),Ie=i(86339),Ne=i(21580),Oe=i(51983);function Re(e,t,i){e.setProperty(t,!t.value(),i)} +const Fe=new $.TranslatedString("change symbol description visibility",k.t(null,void 0,i(26717))),Ge=new $.TranslatedString("change open market status visibility",k.t(null,void 0,i(18644))),Ue=new $.TranslatedString("change OHLC values visibility",k.t(null,void 0,i(57889))),je=new $.TranslatedString("change bar change visibility",k.t(null,void 0,i(45110))),$e=new $.TranslatedString("change indicator titles visibility",k.t(null,void 0,i(31325))),qe=new $.TranslatedString("change indicator arguments visibility",k.t(null,void 0,i(96162))),Ke=new $.TranslatedString("change indicator values visibility",k.t(null,void 0,i(99774))),Ye=new $.TranslatedString("change volume values visibility",k.t(null,void 0,i(9455))),Xe=new $.TranslatedString("change symbol field visibility",k.t(null,void 0,i(6091))),Ze=k.t(null,void 0,i(39339)),Qe=k.t(null,void 0,i(75991)),Je=k.t(null,void 0,i(99487)),et=k.t(null,void 0,i(22519)),tt=k.t(null,void 0,i(1111)),it=k.t(null,void 0,i(26315)),st=k.t(null,void 0,i(26935)),lt=k.t(null,void 0,i(84098)),ot=k.t(null,void 0,i(46041)),nt=(0,Ie.appendEllipsis)(k.t(null,void 0,i(89517))),at=d.enabled("symbol_info_price_source");var rt=i(93975),dt=i(20364),ut=i(74599),ht=i(967),ct=i(84917),_t=i(32769),pt=i(21169);function mt(e){return e===ct.WeekDays.SUNDAY?ct.WeekDays.SATURDAY:e-1}function gt(e){return e===ct.WeekDays.SATURDAY?ct.WeekDays.SUNDAY:e+1}function vt(e,t){const i=mt(t);return 0===e[i].entries.length?vt(e,i):{dayIndex:i,entries:e[i].entries}}function bt(e,t){const i=gt(t);return 0===e[i].entries.length?bt(e,i):{dayIndex:i,entries:e[i].entries}}function wt(e){for(;e>_t.minutesPerDay;)e-=_t.minutesPerDay;const t=e%60,i=(e-t)/60;return(0,ut.numberToStringWithLeadingZero)(i,2)+":"+(0,ut.numberToStringWithLeadingZero)(t,2)}const yt={[ct.WeekDays.MONDAY]:{title:ht.weekDaysShortNames[ct.WeekDays.MONDAY],isActive:!1,entries:[]},[ct.WeekDays.TUESDAY]:{title:ht.weekDaysShortNames[ct.WeekDays.TUESDAY],isActive:!1,entries:[]},[ct.WeekDays.WEDNESDAY]:{title:ht.weekDaysShortNames[ct.WeekDays.WEDNESDAY],isActive:!1,entries:[]},[ct.WeekDays.THURSDAY]:{title:ht.weekDaysShortNames[ct.WeekDays.THURSDAY],isActive:!1,entries:[]},[ct.WeekDays.FRIDAY]:{title:ht.weekDaysShortNames[ct.WeekDays.FRIDAY],isActive:!1,entries:[]},[ct.WeekDays.SATURDAY]:{title:ht.weekDaysShortNames[ct.WeekDays.SATURDAY],isActive:!1,entries:[]},[ct.WeekDays.SUNDAY]:{title:ht.weekDaysShortNames[ct.WeekDays.SUNDAY],isActive:!1,entries:[]}};function St(e,t){return e.start.value===t.start.value&&e.end.value===t.end.value}function Mt(e,t){return St(e[0],t[0])}function ft(e){const t=e.start(),i=e.length(),s=e.sessionStartDayOfWeek(),l=e.sessionEndDayOfWeek(),o=wt(t),n=wt(t+i);return i>_t.minutesPerDay?`${ht.weekDaysShortNames[s]} ${o} — ${ht.weekDaysShortNames[l]} ${n}`:`${o} — ${n}`}function Ct(e,t,i,s){return Math.abs(s-i)>1?`${ht.weekDaysShortNames[i]} ${e.title} — ${ht.weekDaysShortNames[s]} ${t.title}`:`${e.title} — ${t.title}`}function Et(e,t,i){for(const s of t){let t=s.sessionStartDayOfWeek();const l=s.start(),o=s.length(),n=l+o,a=[] +;if(n<=_t.minutesPerDay)a.push([l,n]);else{const e=Math.min(_t.minutesPerDay-l,o);a.push([l,l+e]),a.push([0,o-e])}for(let l=0;le.start.value0?a[e-1]:null,o=0===e;if(0===i.start.value||0===i.start.value&&1===i.end.value||null!==s&&i.start.value===s.end.value){m++;continue}const r=o?c.entries[c.entries.length-1]:(0,l.ensureNotNull)(s),d={start:{value:o?0:a[e-1].end.value,title:o?t:a[e-1].end.title,isFirstOrLastPoint:!(o&&u.length>0)||1===u[u.length-1].end.value},end:{value:i.start.value,title:i.start.title,isFirstOrLastPoint:!0},type:3,tooltip:Ct(r.end,i.start,c.dayIndex,n),showStartForLastEntry:!1,showEndForFirstEntry:!1};a.splice(m,0,d),m=e+2}const g=a[a.length-1];1!==g.end.value&&a.push({start:{value:g.end.value,title:g.end.title,isFirstOrLastPoint:!0},end:{value:1,title:wt(_t.minutesPerDay),isFirstOrLastPoint:!(h.length>0)||0===h[0].start.value},type:3,tooltip:Ct(g.end,_.entries[0].start,n,_.dayIndex),showStartForLastEntry:!1,showEndForFirstEntry:!1})}}(n),function(e){for(const s of Object.keys(e)){const l=parseInt(s),o=e[l].entries;if(1===o.length)continue;const n=mt(l),a=gt(l),r=o[0],d=o[o.length-1];r.start.isFirstOrLastPoint||(r.showStartForLastEntry=(t=o,i=e[n].entries,St(t[t.length-1],i[i.length-1]))), +d.end.isFirstOrLastPoint||(d.showEndForFirstEntry=Mt(o,e[a].entries))}var t,i}(n),this.sessionsDays.setValue(n),this.todaySession.setValue(n[s])}_createSubSessionSpecs(e){if(null===e)return new Map;if(void 0===e.subsessions)return new Map([[0,new pt.SessionSpec(e.timezone,e.session,e.session_holidays,e.corrections)]]);const t="regular",i="premarket",s="postmarket",l=[t,i,s],o=new Map;for(const n of l){let l=null;switch(n){case t:l=0;break;case i:l=1;break;case s:l=2}if(null!==l){const t=e.subsessions.find((e=>e.id===n));void 0!==t&&o.set(l,new pt.SessionSpec(e.timezone,t["session-display"]||t.session,e.session_holidays,t["session-correction"]))}}return o}_updateTodayWithOffsets(e){if(null===e)return void(this._todayInExchangeTime=null);const t=1e3*window.ChartApiInstance.serverTimeOffset();this._todayInExchangeTime=_t.get_cal_from_unix_timestamp_ms(_t.get_timezone(e.timezone),Date.now()+t)}}var Vt=i(50959),xt=i(97754),Tt=i(77975),Wt=i(68671),Lt=i(1720);const At=new WeakMap;function Ht(e){return At.has(e)||At.set(e,(0,Wt.randomHash)()),(0,l.ensureDefined)(At.get(e))}const Pt=new Map([[0,Lt.green],[1,Lt.orange],[2,Lt.blue],[3,Lt.gray]]),Dt=new Map([[0,k.t(null,void 0,i(83949))],[1,k.t(null,void 0,i(56042))],[2,k.t(null,void 0,i(29985))],[3,k.t(null,void 0,i(95814))]]),Bt=k.t(null,void 0,i(80227));function zt(e){const{segment:t,forceStart:i,forceEnd:s}=e,l=t.end.value-t.start.value,o=l<.03,n={left:100*t.start.value+"%",width:`calc(${100*l}% + ${o?2:0}px)`},a=xt(Lt.segment,Pt.get(t.type),(i||t.start.isFirstOrLastPoint)&&Lt.start,(s||t.end.isFirstOrLastPoint)&&Lt.end,o&&Lt.small,"common-tooltip-html","apply-common-tooltip"),r=function(e,t){return`
\n\t\t${Dt.get(t)}\n\t\t${e}\n\t
`}(t.tooltip,t.type);return Vt.createElement("div",{className:a,style:n,"data-tooltip":r})}function It(e){const{sessionDay:t}=e,i=t.entries.map(((e,i)=>Vt.createElement(zt,{key:`${Ht(e)}Segment`,segment:e,forceStart:0===i&&3===e.type,forceEnd:i===t.entries.length-1&&3===e.type}))),s=xt(Lt.sessionDay,t.isActive&&Lt.active);return Vt.createElement("div",{className:s},Vt.createElement("div",{className:Lt.weekDay},t.title),Vt.createElement("div",{className:Lt.sessionDaySegments},i))}function Nt(e){const{sessionDays:t,currentTimeMark:i}=e,s=[],l=parseInt(Object.keys(t).filter((e=>t[parseInt(e)].isActive))[0]),o=t[l],n=o.entries.filter((e=>e.start.value<=i&&e.end.value>=i))[0];!n.start.isFirstOrLastPoint&&n.showStartForLastEntry?s.push(o.entries[o.entries.length-1].start):s.push(n.start);const a=!n.end.isFirstOrLastPoint&&n.showEndForFirstEntry?o.entries[0].end:n.end;if(s[0].value!==a.value&&s.push(a),0===s.length)return null;s.sort(((e,t)=>e.value-t.value));const r=s.map((e=>Vt.createElement("div",{key:Ht(e),className:Lt.timeMark},e.title))),d=100*(2===s.length?s[1].value-s[0].value:0),u=xt(d>12&&Lt.timeMarkSegmentAlignByEnds,Lt.timeMarkSegment);return Vt.createElement("div",{className:Lt.sessionDay},Vt.createElement("div",{className:Lt.weekDay +}),Vt.createElement("div",{className:Lt.timeMarkWrapper},Vt.createElement("div",{className:u,style:{left:100*s[0].value+"%",width:`${d}%`}},r)))}class Ot{constructor(e){this._source=e,this._fullSessionScheduleViewModel=new kt(e)}destroy(){this._fullSessionScheduleViewModel.destroy()}renderer(e,t){var i,s;return(null===(s=null===(i=this._source.marketStatusModel())||void 0===i?void 0:i.futuresContractExpirationTime())||void 0===s?void 0:s.expired().value())?null:function(e){const{key:t,className:i,now:s,timezone:l}=e,o=(0,Tt.useWatchedValueReadonly)({watchedValue:e.sessionDays}),n=Object.values(o).filter((e=>e.isActive))[0],a=xt(i,Lt.wrapper);return Vt.createElement("div",{key:t,className:a},Vt.createElement("div",{className:Lt.sessionDayWrapper},Vt.createElement(It,{sessionDay:n}),Vt.createElement("div",{className:Lt.nowWrapper},Vt.createElement("div",{className:Lt.now,style:{left:100*s+"%"}}))),Vt.createElement(Nt,{sessionDays:o,currentTimeMark:s}),Vt.createElement("div",{className:Lt.timezone},`${Bt}: ${l}`))}({key:e,className:t,sessionDays:this._fullSessionScheduleViewModel.sessionsDays,now:this._fullSessionScheduleViewModel.currentTimeValue(),timezone:this._fullSessionScheduleViewModel.timezone()})}updateSource(e){}}var Rt=i(7394),Ft=i(10381),Gt=i(98532);class Ut{constructor(e){this.isBlinkingMode=new(n())(!1),this._status=new(n())(null),this._fullTooltip=new(n())(null),this._iconClassNames=new(n())(null),this._visible=new(n())(!1),this._tooltip=new(n())(null),this._icon=new(n())(null),this._className=new(n())(null),this._infoMaps=e,this._size=e.size||"small",this._status.subscribe(this._updateByStatus.bind(this),{callWithLast:!0}),this._className.subscribe(this._updateIconClassName.bind(this))}turnOffBlinkingMode(){}status(){return this._status}tooltip(){return this._tooltip}icon(){return this._icon}className(){return this._className}visible(){return this._visible}size(){return this._size}fullInfo(){return this._fullTooltip}_getTooltip(e){var t,i;return null!==(i=null===(t=this._infoMaps.tooltipMap)||void 0===t?void 0:t.get(e))&&void 0!==i?i:null}_getIcon(e){let t;const i=this._infoMaps.iconMap.get(e);return void 0!==i&&(t=i.get(this._size)),t||null}_getClassName(e){return this._infoMaps.classNameMap.get(e)||null}_getTitle(e){var t,i;return null!==(i=null===(t=this._infoMaps.titleMap)||void 0===t?void 0:t.get(e))&&void 0!==i?i:null}_getTitleColor(e){var t,i;return null!==(i=null===(t=this._infoMaps.titleColorMap)||void 0===t?void 0:t.get(e))&&void 0!==i?i:null}async _getHtml(e){var t,i,s;return null!==(s=null===(i=null===(t=this._infoMaps.htmlMap)||void 0===t?void 0:t.get(e))||void 0===i?void 0:i.map(Ft.htmlEscape))&&void 0!==s?s:null}_getAction(e){var t,i;return null!==(i=null===(t=this._infoMaps.actionMap)||void 0===t?void 0:t.get(e))&&void 0!==i?i:null}async _updateFullTooltipByStatus(e){const t=await this._getHtml(e);this._status.value()===e&&this._fullTooltip.setValue([{icon:this._icon.value(),iconClassName:this._iconClassNames.value(),title:this._getTitle(e),titleColor:this._getTitleColor(e),html:t, +size:this._size,action:this._getAction(e)}])}_updateByStatus(e){if(null===e||this._shouldBeHiddenByStatus(e))return this._icon.setValue(null),this._tooltip.setValue(null),void this._visible.setValue(!1);this._icon.setValue(this._getIcon(e)),this._className.setValue(this._getClassName(e)),this._tooltip.setValue(this._getTooltip(e)),this._visible.setValue(!0),this._updateFullTooltipByStatus(e)}_shouldBeHiddenByStatus(e){return!1}_updateIconClassName(e){null!==e?this._iconClassNames.setValue([Gt.statusItem,e]):this._iconClassNames.setValue(null)}}var jt=i(56840);const $t="tv.alreadyBlinkedStatuses",qt=[];function Kt(){return jt.getJSON($t,qt)}const Yt=new(n())(Kt());function Xt(e){const t=jt.getJSON($t,qt);t.includes(e)||(t.push(e),jt.setJSON($t,t),Yt.setValue(Kt()))}jt.onSync.subscribe(null,(()=>Yt.setValue(Kt())));const Zt=Yt;var Qt=i(33972),Jt=i(67189),ei=i(57524),ti=i(67957),ii=i(76948),si=i(58189),li=i(56201);const oi=(0, +ve.getLogger)("Chart.LegendWidget"),ni=["TFEXDelayForGuest","MOEXDelayForGuest","CHIXAuDelayForGuest","MILDelayForGuest","NGMDelayForGuest","DEForGuest","ICESGDelayForGuest","ADXDelayForGuest","TRADEGATEDelayForGuest"],ai=new Map([["DelayToRealtime",new Map([["small",Jt],["medium",ei],["large",ei]])],["DelayNoRealtime",new Map([["small",Jt],["medium",ei],["large",ei]])],["TFEXDelayForGuest",new Map([["small",Jt],["medium",ei],["large",ei]])],["MOEXDelayForGuest",new Map([["small",Jt],["medium",ei],["large",ei]])],["CHIXAuDelayForGuest",new Map([["small",Jt],["medium",ei],["large",ei]])],["MILDelayForGuest",new Map([["small",Jt],["medium",ei],["large",ei]])],["NGMDelayForGuest",new Map([["small",Jt],["medium",ei],["large",ei]])],["ICESGDelayForGuest",new Map([["small",Jt],["medium",ei],["large",ei]])],["ADXDelayForGuest",new Map([["small",Jt],["medium",ei],["large",ei]])],["TRADEGATEDelayForGuest",new Map([["small",Jt],["medium",ei],["large",ei]])],["DEForGuest",new Map([["small",Jt],["medium",ei],["large",ei]])],["EOD",new Map([["small",ti],["medium",ii],["large",ii]])],["TickByTick",new Map([["small",si],["medium",li],["large",li]])],["BATSToRealtime",new Map([["small",si],["medium",li],["large",li]])],["DelayWithoutMarketAgreement",new Map([["small",Jt],["medium",ei],["large",ei]])]]),ri=new Map([["DelayToRealtime",Gt.delay],["DelayNoRealtime",Gt.delay],["TFEXDelayForGuest",Gt.delay],["MOEXDelayForGuest",Gt.delay],["CHIXAuDelayForGuest",Gt.delay],["MILDelayForGuest",Gt.delay],["NGMDelayForGuest",Gt.delay],["ICESGDelayForGuest",Gt.delay],["ADXDelayForGuest",Gt.delay],["TRADEGATEDelayForGuest",Gt.delay],["DEForGuest",Gt.delay],["EOD",Gt.eod],["TickByTick",Gt.notAccurate],["BATSToRealtime",Gt.notAccurate],["DelayWithoutMarketAgreement",Gt.delay]]),di=new Map([["DelayToRealtime",Rt.colorsPalette["color-delay-mode"]],["DelayNoRealtime",Rt.colorsPalette["color-delay-mode"]],["TFEXDelayForGuest",Rt.colorsPalette["color-delay-mode"]],["MOEXDelayForGuest",Rt.colorsPalette["color-delay-mode"]],["CHIXAuDelayForGuest",Rt.colorsPalette["color-delay-mode"]],["MILDelayForGuest",Rt.colorsPalette["color-delay-mode"]],["NGMDelayForGuest",Rt.colorsPalette["color-delay-mode"]],["ICESGDelayForGuest",Rt.colorsPalette["color-delay-mode"]],["ADXDelayForGuest",Rt.colorsPalette["color-delay-mode"]],["TRADEGATEDelayForGuest",Rt.colorsPalette["color-delay-mode"]],["DEForGuest",Rt.colorsPalette["color-delay-mode"]],["EOD",Rt.colorsPalette["color-eod-mode"]],["TickByTick",Rt.colorsPalette["color-notaccurate-mode"]],["BATSToRealtime",Rt.colorsPalette["color-notaccurate-mode"]],["DelayWithoutMarketAgreement",Rt.colorsPalette["color-delay-mode"]]]),ui=k.t(null,void 0,i(57310)),hi=k.t(null,void 0,i(59315)),ci=k.t(null,void 0,i(15815)),_i=k.t(null,void 0,i(65636)),pi=k.t(null,void 0,i(7435)),mi=(0,Ft.htmlEscape)(k.t(null,void 0,i(11155))),gi=(0,Ft.htmlEscape)(k.t(null,void 0,i(1084))),vi=(0,Ft.htmlEscape)(k.t(null,void 0,i(52984))),bi=(0,Ft.htmlEscape)(k.t(null,void 0,i(36015))),wi=(0,Ft.htmlEscape)(k.t(null,void 0,i(52916))),yi=(0, +Ft.htmlEscape)(k.t(null,void 0,i(49321))),Si=(0,Ft.htmlEscape)(k.t(null,void 0,i(25978))),Mi=(0,Ft.htmlEscape)(k.t(null,void 0,i(28412))),fi=(0,Ft.htmlEscape)(k.t(null,void 0,i(6667))),Ci=(0,Ft.htmlEscape)(k.t(null,void 0,i(57918))),Ei=(0,Ft.htmlEscape)(k.t(null,void 0,i(68025))),ki=(0,Ft.htmlEscape)(k.t(null,void 0,i(91459)));k.t(null,void 0,i(36004)),k.t(null,void 0,i(18429)),(0,Ft.htmlEscape)(k.t(null,void 0,i(25046)));class Vi extends Ut{constructor(e,t,i){super({iconMap:ai,classNameMap:ri,titleColorMap:di,size:t}),this._dataUpdatedInfo=new(n())(null).spawn(),this._options=i,this._model=e,this._dataModeBlinkingStatuses=Zt.spawn(),this._dataModeBlinkingStatuses.subscribe(this._updateBlinkingMode.bind(this)),this.turnOffBlinkingMode=this._turnOffBlinking.bind(this),this.setModel(e)}destroy(){this._dataUpdatedInfo.destroy(),this._dataModeBlinkingStatuses.destroy()}setModel(e){if(this._dataUpdatedInfo.destroy(),null===e)return this._model=e,void(this._dataUpdatedInfo=new(n())(null).spawn());this._dataUpdatedInfo=e.status().spawn(),this._dataUpdatedInfo.subscribe(this._updateStatus.bind(this),{callWithLast:!0})}_shouldBeHiddenByStatus(e){var t;return!!(null===(t=this._options.shouldBeHiddenRegardlessOfStatus)||void 0===t?void 0:t.value())||super._shouldBeHiddenByStatus(e)}_getTooltip(){const e=this._getShortTexts();return null===e?null:Object.values(e).join(" · ")}async _updateFullTooltipByStatus(){const e=this._dataUpdatedInfo.value();if(null===e)return void this._fullTooltip.setValue(null);const t=this._getShortTexts(),i=await this._getHtmls(),s=await this._getActions();if(e!==this._dataUpdatedInfo.value())return;const l=[];for(const o of e){const e=o.mode;l.push({icon:this._getIcon(e),iconClassName:this._iconClassNames.value(),title:t&&t[e],titleColor:this._getTitleColor(e),html:i&&i[e],size:this._size,action:s&&s[e]})}this._fullTooltip.setValue(l)}_updateStatus(e){var t;const i=null!==e?e[0]:null;super._updateByStatus(null!==(t=null==i?void 0:i.mode)&&void 0!==t?t:null),this._updateBlinkingMode()}async _getHtmls(){var e,t;const s=this._dataUpdatedInfo.value();if(null===s||null===this._model)return Promise.resolve(null);const l={},o=this._model.symbolName();let n=null,a=null;try{n=await this._model.description(),a=this._model.exchange()}catch(e){oi.logError(`Can't get exchange description, reason: ${(0,Qt.errorToString)(e)}`)}for(const r of s){const s=r.mode;if(l[s]=[],["DelayToRealtime","DelayNoRealtime","DelayWithoutMarketAgreement",...ni].includes(s)&&(l[s].push(mi.format({symbolName:o,time:this._model.time().toString()})),this._options.subscriptionFullInfo&&null!==n&&"DelayToRealtime"===s&&l[s].push(vi.format({description:`${n}`})),null!==n&&"DelayNoRealtime"===s&&l[s].push(bi.format({description:`${n}`})),"DelayWithoutMarketAgreement"===s&&l[s].push(ki.format({listedExchange:this._model.listedExchange()})),this._options.subscriptionFullInfo&&ni.includes(s)&&l[s].push(gi.format({listedExchange:this._model.listedExchange()}))),"EOD"===s&&(l[s]=[wi]),"TickByTick"===s){ +const o=void 0===r.updatePeriod?yi:(0,Ft.htmlEscape)(k.t(null,{count:r.updatePeriod,replace:{amount:(null!==(e=r.updatePeriod)&&void 0!==e?e:1).toString()},plural:"Data on our Basic plan is updated once every {amount} seconds, even if there are more updates on the market."},i(2121))),n=void 0===r.updatePeriod?Si:(0,Ft.htmlEscape)(k.t(null,{count:r.updatePeriod,replace:{amount:(null!==(t=r.updatePeriod)&&void 0!==t?t:1).toString()},plural:"Data is updated once every {amount} seconds, even if there are more updates on the market."},i(77033)));l[s].push(this._options.subscriptionFullInfo?o:n),this._options.subscriptionFullInfo&&l[s].push(Mi)}if(null!==a&&"BATSToRealtime"===s){let e=this._model.listedExchange();0,l[s].push(fi.format({symbolName:o,exchange:a}),""!==e?Ei.format({exchange:e}):Ci)}}return Object.keys(l).length>0?l:null}async _getActions(){if(null===this._dataUpdatedInfo.value()||null===this._model)return null;const e={};return Object.keys(e).length>0?e:null}_getShortTexts(){var e,t;const s=this._dataUpdatedInfo.value();if(null===s||null===this._model)return null;const l={};for(const o of s){const s=o.mode;if(["DelayToRealtime","DelayNoRealtime",...ni,"DelayWithoutMarketAgreement"].includes(s)&&(l[s]=ui),"EOD"===s&&(l[s]=hi),"TickByTick"===s){const t=void 0===o.updatePeriod?ci:(0,Ft.htmlEscape)(k.t(null,{plural:"One update every {amount} seconds",count:o.updatePeriod,replace:{amount:(null!==(e=o.updatePeriod)&&void 0!==e?e:1).toString()}},i(5223)));l[s]=t}if("BATSToRealtime"===s){let e=null!==(t=this._model.firstReplacedByBatsExchange())&&void 0!==t?t:"";0,l[s]=""!==e?pi.format({exchange:e,originalExchange:_i}):_i}}return Object.keys(l).length>0?l:null}_updateBlinkingMode(){const e=this._dataUpdatedInfo.value();if(null===e)return;const t=this._dataModeBlinkingStatuses.value();for(const i of e)if(!t.includes(i.mode))return void this.isBlinkingMode.setValue(!0);this.isBlinkingMode.setValue(!1)}_turnOffBlinking(){const e=this._dataUpdatedInfo.value();if(null!==e)for(const t of e)Xt(t.mode)}}var xi=i(27486),Ti=i(8767);const Wi=k.t(null,void 0,i(39045)),Li=new Map([[!0,new Map([["small",xi],["medium",Ti],["large",Ti]])],[!1,new Map([["small",""],["medium",""],["large",""]])]]),Ai=new Map([[!0,Gt.dataProblemLow],[!1,null]]),Hi=new Map([[!0,Wi],[!1,null]]),Pi=new Map([[!0,Wi],[!1,null]]),Di=new Map([[!0,Rt.colorsPalette["color-data-problem"]],[!1,null]]);class Bi extends Ut{constructor(e,t,i){super({iconMap:Li,classNameMap:Ai,tooltipMap:Hi,titleMap:Pi,titleColorMap:Di,size:t}),this._dataSourceErrorStatus=new(n())(null).spawn(),this._lastError=null,this._options=i,this.setSource(e)}destroy(){this._dataSourceErrorStatus.destroy()}setSource(e){this._dataSourceErrorStatus.destroy(),this._dataSourceErrorStatus=e.errorStatus().spawn(),this._dataSourceErrorStatus.subscribe(this._updateStatus.bind(this),{callWithLast:!0})}_getTooltip(e){var t;return null!==(t=e?this._getDataSourceErrorStatusCustomTitle():null)&&void 0!==t?t:super._getTooltip(e)}_getTitle(e){var t +;return null!==(t=e?this._getDataSourceErrorStatusCustomTitle():null)&&void 0!==t?t:super._getTitle(e)}async _getHtml(e){const t=this._dataSourceErrorStatus.value();return null!==t?[(0,Ft.htmlEscape)(t.error)]:null}_getAction(e){return null}_updateStatus(e){const t=this._status.value();null!==e?(this._status.setValue(!0),t&&this._lastError!==e.error&&this._updateByStatus(!0),this._lastError=e.error):(this._status.setValue(null),this._lastError=null)}_getDataSourceErrorStatusCustomTitle(){var e;return(null===(e=this._dataSourceErrorStatus.value())||void 0===e?void 0:e.title)||null}}const zi=k.t(null,void 0,i(97325)),Ii=new Map([["high",new Map([["small",xi],["medium",Ti],["large",Ti]])],["low",new Map([["small",xi],["medium",Ti],["large",Ti]])]]),Ni=new Map([["high",Gt.dataProblemHigh],["low",Gt.dataProblemLow]]),Oi=new Map([["high",zi],["low",zi]]),Ri=new Map([["high",Rt.colorsPalette["color-data-problem"]],["low",Rt.colorsPalette["color-data-problem"]]]);class Fi extends Ut{constructor(e,t){super({tooltipMap:Oi,iconMap:Ii,classNameMap:Ni,titleMap:Oi,titleColorMap:Ri,size:t}),this._dataProblem=new(n())(null).spawn(),this._isDataProblemCritical=new(n())(!1),this.setModel(e)}destroy(){this._dataProblem.destroy()}isDataProblemCritical(){return this._isDataProblemCritical}setModel(e){this._dataProblem.destroy(),null!==e?(this._dataProblem=e.status().spawn(),this._dataProblem.subscribe(this._updateStatus.bind(this),{callWithLast:!0})):this._dataProblem=new(n())(null).spawn()}async _getHtml(e){const t=this._dataProblem.value();return null===t?null:[(0,Ft.htmlEscape)(t.text)]}_getTooltip(e){var t;return null!==(t=this._getDataProblemCustomTitle())&&void 0!==t?t:super._getTooltip(e)}_getTitle(e){var t;return null!==(t=this._getDataProblemCustomTitle())&&void 0!==t?t:super._getTitle(e)}_updateStatus(e){var t;const i=null!==(t=null==e?void 0:e.severity)&&void 0!==t?t:null;this._status.setValue(i),this._isDataProblemCritical.setValue(function(e){return"high"===e}(i))}_getDataProblemCustomTitle(){var e;return(null===(e=this._dataProblem.value())||void 0===e?void 0:e.title)||null}}class Gi extends Ut{constructor(e,t){super(t),this._booleanStatus=new(n())(!1).spawn(),this.updateStatus(e)}destroy(){this._booleanStatus.destroy()}updateStatus(e){this._booleanStatus.destroy(),this._booleanStatus=e.spawn(),this._booleanStatus.subscribe(this._updateStatus.bind(this),{callWithLast:!0})}_updateStatus(e){e?this._status.setValue(!0):this._status.setValue(null)}}var Ui=i(79639),ji=i(4696);const $i=k.t(null,void 0,i(14177)),qi=k.t(null,void 0,i(73717)),Ki=new Map([[!0,new Map([["small",Ui],["medium",ji],["large",ji]])],[!1,new Map([["small",""],["medium",""],["large",""]])]]),Yi=new Map([[!0,Gt.invalidSymbol],[!1,null]]),Xi=new Map([[!0,$i],[!1,null]]),Zi=new Map([[!0,$i],[!1,null]]),Qi=new Map([[!0,Rt.colorsPalette["color-invalid-symbol"]],[!1,null]]),Ji=new Map([[!0,[qi]],[!1,null]]),es=new Map([[!0,null],[!1,null]]);class ts{constructor(e){this._el=document.createElement("div"),this._prevCustomClass=null,this._icon=e.icon.spawn(), +this._icon.subscribe(this._updateIcon.bind(this),{callWithLast:!0}),this._className=e.className.spawn(),this._className.subscribe(this._updateClassName.bind(this),{callWithLast:!0}),this._visible=e.visible.spawn(),this._visible.subscribe(this._updateVisibility.bind(this),{callWithLast:!0}),this._size=e.size||"small",this._render(e.parentEl),e.isBlinking&&(this._isBlinking=e.isBlinking.spawn(),this._isBlinking.subscribe(this._updateBlinkingMode.bind(this),{callWithLast:!0}),this._turnOffBlinking=e.turnOffBlinking)}destroy(){this._visible.destroy(),this._icon.destroy(),this._isBlinking&&this._isBlinking.destroy(),this._el.remove()}onClick(){this._turnOffBlinking&&this._turnOffBlinking()}visible(){return this._visible}_render(e){this._el.classList.add(Gt.statusItem,Gt[this._size]),e.appendChild(this._el)}_updateVisibility(e){this._el.classList.toggle("js-hidden",!e)}_updateIcon(e){this._el.innerHTML=e||""}_updateClassName(e){this._prevCustomClass!==e&&(null!==this._prevCustomClass&&this._el.classList.remove(this._prevCustomClass),null!==e&&this._el.classList.add(e),this._prevCustomClass=e)}_updateBlinkingMode(e){this._el.classList.toggle(Gt.blinking,e)}}class is{constructor(e,t,i,s){this.element=document.createElement("div"),this._blinkingSpawns=[],this._iconsRenderers=[];const l=[Gt.statuses,"apply-common-tooltip","common-tooltip-wide"];h.trackingModeIsAvailable&&l.push(Gt.touchMode),this.element.classList.add(...l,Gt[e]),this._visibleWidgetsCount=t.spawn(),this._visibleWidgetsCount.subscribe(this._updateSpecialClassAndTooltip.bind(this)),this._tooltips=i.spawn(),this._tooltips.subscribe(this._updateTooltip.bind(this)),this._onClickCallback=s.onClick,this._onClickHandler=this._onClick.bind(this),this.element.addEventListener("click",this._onClickHandler)}destroy(){for(const e of this._iconsRenderers)e.destroy();for(const e of this._blinkingSpawns)e.destroy();this._visibleWidgetsCount.destroy(),this._tooltips.destroy(),this.element.removeEventListener("click",this._onClickHandler),this.element.remove()}addStatusModel(e){this._iconsRenderers.push(new ts({visible:e.visible,icon:e.model.icon(),className:e.model.className(),size:e.model.size(),parentEl:this.element,isBlinking:e.model.isBlinkingMode,turnOffBlinking:e.model.turnOffBlinkingMode}));const t=e.model.isBlinkingMode.spawn();t.subscribe(this._updateBlinkingMode.bind(this)),this._blinkingSpawns.push(t),this._updateBlinkingMode()}_onClick(e){e.preventDefault();const t=this._iconsRenderers.filter((e=>e.visible().value()));for(const e of t)e.onClick();let i=14;t.length>1&&(i-=2);const s=this.element.getBoundingClientRect(),l={x:s.left-i,y:s.bottom+4};this._onClickCallback(l)}_updateTooltip(){this.element.setAttribute("title",this._tooltips.value().join(" · "))}_updateSpecialClassAndTooltip(){const e=this._visibleWidgetsCount.value();this.element.classList.toggle(Gt.oneWidgetsVisible,1===e),this.element.classList.toggle(Gt.twoWidgetsVisible,2===e),this.element.classList.toggle(Gt.threeWidgetsVisible,3===e),this._updateTooltip()}_updateBlinkingMode(){ +const e=this._blinkingSpawns.some((e=>e.value()));this.element.classList.toggle(Gt.blinking,e)}}var ss=i(21035),ls=i(20983),os=i(16030),ns=i(34074),as=i(27086),rs=i(20123),ds=i(23373),us=i(72074);const hs=k.t(null,void 0,i(83949)),cs=k.t(null,void 0,i(56042)),_s=k.t(null,void 0,i(29985)),ps=k.t(null,void 0,i(95814)),ms=k.t(null,void 0,i(88958)),gs=k.t(null,void 0,i(69419)),vs=k.t(null,void 0,i(1653)),bs=k.t(null,void 0,i(40519)),ws=k.t(null,void 0,i(57048)),ys=k.t(null,void 0,i(87202)),Ss=k.t(null,void 0,i(39348)),Ms=k.t(null,void 0,i(7827)),fs=k.t(null,void 0,i(19830)),Cs=k.t(null,void 0,i(35701)),Es=k.t(null,void 0,i(98105)),ks=k.t(null,void 0,i(50634)),Vs=k.t(null,void 0,i(74537)),xs=new Map([["market",new Map([["small",ls],["medium",os],["large",os]])],["pre_market",new Map([["small",ds],["medium",us],["large",us]])],["post_market",new Map([["small",as],["medium",rs],["large",rs]])],["out_of_session",new Map([["small",ss],["medium",ss],["large",ss]])],["holiday",new Map([["small",ns],["medium",ns],["large",ns]])]]),Ts=new Map([["market",Gt.marketStatusOpen],["pre_market",Gt.marketStatusPre],["post_market",Gt.marketStatusPost],["out_of_session",Gt.marketStatusClose],["holiday",Gt.marketStatusHoliday]]),Ws=new Map([["market",hs],["pre_market",cs],["post_market",_s],["out_of_session",ps],["holiday",ms]]),Ls=new Map([["market",hs],["pre_market",cs],["post_market",_s],["out_of_session",ps],["holiday",ms]]),As=new Map([["market",Rt.colorsPalette["color-market-open"]],["pre_market",Rt.colorsPalette["color-pre-market"]],["post_market",Rt.colorsPalette["color-post-market"]],["out_of_session",Rt.colorsPalette["color-market-closed"]],["holiday",Rt.colorsPalette["color-market-holiday"]]]),Hs={market:gs,pre_market:vs,post_market:bs,out_of_session:ws,holiday:ys};function Ps(e){return k.t(null,{plural:"{number} minutes",count:e},i(67151)).format({number:e.toString()})}function Ds(e){return k.t(null,{plural:"{number} hours",count:e},i(24430)).format({number:e.toString()})}function Bs(e){const t=Math.floor(e/86400),s=Math.floor((e-86400*t)/3600),l=Math.floor((e-86400*t-3600*s)/60);return 0===t&&0===s&&0===l?Ss:t>0?Ms.format({days:(o=t,k.t(null,{plural:"{number} days",count:o},i(58609)).format({number:o.toString()})),hours:Ds(s)}):s>0?fs.format({hours:Ds(s),minutes:Ps(l)}):Ps(l);var o}const zs={market:e=>("post_market"===e.status?ks:Es).format({remainingTime:Bs(e.remainingSeconds)}),pre_market:e=>Cs.format({remainingTime:Bs(e.remainingSeconds)}),post_market:e=>Es.format({remainingTime:Bs(e.remainingSeconds)}),out_of_session:e=>("pre_market"===e.status?Vs:Cs).format({remainingTime:Bs(e.remainingSeconds)}),holiday:e=>("pre_market"===e.status?Vs:Cs).format({remainingTime:Bs(e.remainingSeconds)})},Is=new Map([["market",null],["pre_market",null],["post_market",null],["out_of_session",null],["holiday",null]]);class Ns extends Ut{constructor(e,t){super({tooltipMap:Ws,iconMap:xs,classNameMap:Ts,titleMap:Ls,titleColorMap:As,actionMap:Is,size:t}),this._model=null,this._expiredStatus=null,this._marketStatus=new(n())(null).spawn(), +this._sessionEdge=new(n())(null).spawn(),this.setModel(e),ze.showMarketOpenStatusProperty.subscribe(this,this._showMarketOpenStatusPropertyChanged)}destroy(){this._marketStatus.destroy(),this._sessionEdge.destroy(),this._model=null,ze.showMarketOpenStatusProperty.unsubscribeAll(this)}setModel(e){var t;if(this._marketStatus.destroy(),this._sessionEdge.destroy(),null===(t=this._expiredStatus)||void 0===t||t.destroy(),null===e)return this._marketStatus=new(n())(null).spawn(),this._sessionEdge=new(n())(null).spawn(),void(this._expiredStatus=null);this._model=e;const i=e.futuresContractExpirationTime();i&&(this._expiredStatus=i.expired().spawn(),this._expiredStatus.subscribe((e=>{e&&this._updateByStatus(this._marketStatus.value())}))),this._marketStatus=e.status().spawn(),this._marketStatus.subscribe(this._updateStatus.bind(this),{callWithLast:!0}),this._sessionEdge=e.nextSessionEdge().spawn(),this._sessionEdge.subscribe(this._updateTooltip.bind(this)),this._updateTooltip()}async _getHtml(e){if(this._isExpiredFutures())return[(0,Ft.htmlEscape)(expiredHtml)];const t=[(0,Ft.htmlEscape)(Hs[e])],i=this._marketStatus.value();if(null!==this._model&&null!==i){const i=this._model.nextSessionEdge().value();null!==i&&t.push({text:zs[e](i),bold:!0})}return t}_shouldBeHiddenByStatus(e){return!ze.showMarketOpenStatusProperty.value()&&"market"===e}_getTooltip(e){return this._isExpiredFutures()?expiredTooltip:super._getTooltip(e)}_getIcon(e){return this._isExpiredFutures()?expiredIconMap.get(this._size)||null:super._getIcon(e)}_getClassName(e){return this._isExpiredFutures()?expiredClassName:super._getClassName(e)}_getTitle(e){return this._isExpiredFutures()?expiredTitle:super._getTitle(e)}_getTitleColor(e){return this._isExpiredFutures()?expiredTitleColor:super._getTitleColor(e)}_isExpiredFutures(){var e,t,i;return null!==(i=null===(t=null===(e=this._model)||void 0===e?void 0:e.futuresContractExpirationTime())||void 0===t?void 0:t.expired().value())&&void 0!==i&&i}_updateStatus(e){this._status.setValue(e)}_updateTooltip(){const e=this._status.value();null!==e&&this._updateFullTooltipByStatus(e)}_showMarketOpenStatusPropertyChanged(){this._updateByStatus(this._status.value())}}class Os{constructor(e,t){var i,s;this.visibleWidgetsCount=new(n())(0),this.errorWidgetIsShown=new(n())(!1),this._size=h.trackingModeIsAvailable?"medium":"small",this._tooltips=new(n())([]),this._visibilitySpawns=[],this._tooltipSpawns=[],this._statusWidgetInfos=[],this._renderer=new is(this._size,this.visibleWidgetsCount,this._tooltips,{onClick:this._handleToggleDropdown.bind(this)}),this._symbolInvalidViewModel=null,this._dataSourceErrorStatusViewModel=null,this._marketStatusViewModel=null,this._dataUpdatedModeViewModel=null,this._dataProblemViewModel=null,this._sessionWidget=null,this._dataSourceHasErrorVisible=null,this._dataSourceErrorCanBeShown=new(n())(!1),this._marketStatusCanBeShown=new(n())(!1),this._dataUpdatedModeCanBeShown=new(n())(!1),this._dataProblemCanBeShown=new(n())(!1),this._isDataProblemCritical=null, this._container=document.createElement("div"),this._menuOpened=!1,this._menuPosition=null,this._handleDropdownMenuClose=()=>{var e;this._menuOpened=!1,null===(e=this._source.symbol())||void 0===e||e.unsubscribe(this._handleDropdownMenuClose),this._updateDropdownMenu()},this._source=e,this._symbol=null!==(s=null===(i=e.symbol())||void 0===i?void 0:i.spawn())&&void 0!==s?s:null,this._options=t,this._recreateWidgets(),this._addSubscriptionForSymbolInvalid(),null!==this._dataSourceHasErrorVisible&&(this._dataSourceHasErrorVisible.subscribe(this._updateStatusWidgetsVisibilities.bind(this)),this._dataSourceHasErrorVisible.subscribe(this._updateErrorWidgetIsShown.bind(this))),this._options.dataProblemEnabled&&null!==this._isDataProblemCritical&&this._isDataProblemCritical.subscribe(this._updateStatusWidgetsVisibilities.bind(this));for(const e of this._tooltipSpawns)e.subscribe(this._updateTooltips.bind(this));for(const e of this._visibilitySpawns)e.subscribe(this._updateVisibleWidgetsCount.bind(this)),e.subscribe(this._updateTooltips.bind(this));this._updateErrorWidgetIsShown(),this._updateStatusWidgetsVisibilities(),this._updateVisibleWidgetsCount(),this._updateTooltips()}destroy(){var e,t;this._source.destroy(),null===(e=this._symbol)||void 0===e||e.destroy(),null===(t=this._isDataProblemCritical)||void 0===t||t.destroy();for(const e of this._tooltipSpawns)e.destroy();for(const e of this._visibilitySpawns)e.destroy();this.visibleWidgetsCount.unsubscribe();for(const e of this._statusWidgetInfos)e.model.destroy();this._renderer.destroy()}getElement(){return this._renderer.element}updateSource(e){var t,i,s;this._source!==e&&(null===(t=this._symbol)||void 0===t||t.destroy(),this._source.destroy(),this._source=e,this._symbol=null!==(s=null===(i=e.symbol())||void 0===i?void 0:i.spawn())&&void 0!==s?s:null,this._recreateWidgets(),this._updateStatusWidgetsVisibilities(),this._updateErrorWidgetIsShown(),this._updateVisibleWidgetsCount(),this._updateTooltips())}_updateStatusWidgetsVisibilities(){const e=this._isForceStatusActive();this._dataSourceErrorCanBeShown.setValue(!e),this._marketStatusCanBeShown.setValue(!e),this._dataUpdatedModeCanBeShown.setValue(!e),this._dataProblemCanBeShown.setValue(!this._isPrimaryWidgetShown())}_isPrimaryWidgetShown(){var e,t;return null!==(t=null===(e=this._source.isSymbolInvalid())||void 0===e?void 0:e.value())&&void 0!==t&&t}_isForceStatusActive(){var e,t;return this._isPrimaryWidgetShown()||null!==(t=null===(e=this._isDataProblemCritical)||void 0===e?void 0:e.value())&&void 0!==t&&t}_updateVisibleWidgetsCount(){const e=this._statusWidgetInfos.filter((e=>e.visible.value()));this.visibleWidgetsCount.setValue(e.length)}_updateTooltips(){const e=[];for(let t=0;t0&&e.push(i)}this._tooltips.setValue(e)}_recreateWidgets(){var e,t,i;if(this._options.sourceStatusesEnabled){const e=this._source.isSymbolInvalid();if(null!==e)if(null===this._symbolInvalidViewModel){ -this._symbolInvalidViewModel=new Oi(e,{tooltipMap:qi,iconMap:ji,classNameMap:$i,titleMap:Ki,titleColorMap:Yi,htmlMap:Xi,actionMap:Zi,size:this._size});const t=this._symbolInvalidViewModel.visible().spawn();this._visibilitySpawns.push(t),this._tooltipSpawns.push(this._symbolInvalidViewModel.tooltip().spawn());const i={visible:t,model:this._symbolInvalidViewModel};this._statusWidgetInfos.push(i),this._renderer.addStatusModel(i)}else this._symbolInvalidViewModel.updateStatus(e),this._addSubscriptionForSymbolInvalid();if(null===this._dataSourceErrorStatusViewModel){this._dataSourceErrorStatusViewModel=new Hi(this._source,this._size,this._options.sourceStatuses),this._dataSourceHasErrorVisible=(0,X.combine)((()=>this._dataSourceErrorCanBeShown.value()&&(0,l.ensureNotNull)(this._dataSourceErrorStatusViewModel).visible().value()),this._dataSourceErrorCanBeShown,this._dataSourceErrorStatusViewModel.visible()),this._visibilitySpawns.push(this._dataSourceHasErrorVisible),this._tooltipSpawns.push(this._dataSourceErrorStatusViewModel.tooltip().spawn());const e={visible:this._dataSourceHasErrorVisible,model:this._dataSourceErrorStatusViewModel};this._statusWidgetInfos.push(e),this._renderer.addStatusModel(e)}else this._dataSourceErrorStatusViewModel.setSource(this._source)}if(this._options.marketStatusEnabled){const t=this._source.marketStatusModel();if(null===this._marketStatusViewModel){this._marketStatusViewModel=new Bs(t,this._size);const e=(0,X.combine)((()=>this._marketStatusCanBeShown.value()&&(0,l.ensureNotNull)(this._marketStatusViewModel).visible().value()&&!(0,Be.isEconomicSymbol)(this._source.symbolInfo().value())),this._marketStatusCanBeShown,this._marketStatusViewModel.visible(),this._source.symbolInfo());this._visibilitySpawns.push(e),this._tooltipSpawns.push(this._marketStatusViewModel.tooltip().spawn());const i={visible:e,model:this._marketStatusViewModel};null!==t&&(this._sessionWidget=new zt(this._source),i.additionalWidgets=[this._sessionWidget]),this._statusWidgetInfos.push(i),this._renderer.addStatusModel(i)}else this._marketStatusViewModel.setModel(t),null===(e=this._sessionWidget)||void 0===e||e.updateSource(this._source)}if(this._options.dataUpdateModeEnabled){const e=this._source.dataUpdatedModeModel();if(null===this._dataUpdatedModeViewModel){const s={...this._options.dataUpdateMode,shouldBeHiddenRegardlessOfStatus:null===(i=null===(t=this._source.marketStatusModel())||void 0===t?void 0:t.futuresContractExpirationTime())||void 0===i?void 0:i.expired()};this._dataUpdatedModeViewModel=new Ci(e,this._size,s);const o=(0,X.combine)((()=>this._dataUpdatedModeCanBeShown.value()&&(0,l.ensureNotNull)(this._dataUpdatedModeViewModel).visible().value()&&!(0,Be.isEconomicSymbol)(this._source.symbolInfo().value())),this._dataUpdatedModeCanBeShown,this._dataUpdatedModeViewModel.visible(),this._source.symbolInfo());this._visibilitySpawns.push(o),this._tooltipSpawns.push(this._dataUpdatedModeViewModel.tooltip().spawn());const n={visible:o,model:this._dataUpdatedModeViewModel};this._statusWidgetInfos.push(n), -this._renderer.addStatusModel(n)}else this._dataUpdatedModeViewModel.setModel(e)}if(this._options.dataProblemEnabled){const e=this._source.dataProblemModel();if(null===this._dataProblemViewModel){this._dataProblemViewModel=new Ni(e,this._size),this._isDataProblemCritical=this._dataProblemViewModel.isDataProblemCritical().spawn();const t=(0,X.combine)((()=>this._dataProblemCanBeShown.value()&&(0,l.ensureNotNull)(this._dataProblemViewModel).visible().value()),this._dataProblemCanBeShown,this._dataProblemViewModel.visible());this._visibilitySpawns.push(t),this._tooltipSpawns.push(this._dataProblemViewModel.tooltip().spawn());const i={visible:t,model:this._dataProblemViewModel};this._statusWidgetInfos.push(i),this._renderer.addStatusModel(i)}else this._dataProblemViewModel.setModel(e)}}_addSubscriptionForSymbolInvalid(){const e=this._source.isSymbolInvalid();this._options.sourceStatusesEnabled&&null!==e&&(e.subscribe(this._updateStatusWidgetsVisibilities.bind(this)),e.subscribe(this._updateErrorWidgetIsShown.bind(this),{callWithLast:!0}))}_updateErrorWidgetIsShown(){var e,t,i,s;const l=null!==(t=null===(e=this._source.isSymbolInvalid())||void 0===e?void 0:e.value())&&void 0!==t&&t,o=null!==(s=null===(i=this._dataSourceHasErrorVisible)||void 0===i?void 0:i.value())&&void 0!==s&&s;this.errorWidgetIsShown.setValue(l||o)}_handleToggleDropdown(e){var t,i;this._menuPosition=e,this._menuOpened=!this._menuOpened,this._menuOpened&&(null===(t=this._source.symbol())||void 0===t||t.subscribe(this._handleDropdownMenuClose),i=`Open full tooltip for statuses: ${this._tooltips.value().join(", ")}`,(0,V.trackEvent)("GUI","Statuses widget's action",i)),this._updateDropdownMenu()}_updateDropdownMenu(){Promise.all([i.e(7624),i.e(6092),i.e(2397),i.e(962),i.e(1075),i.e(8643)]).then(i.bind(i,35814)).then((e=>{e.render(this._menuOpened,this._container,this._renderer.element,this._statusWidgetInfos,this._handleDropdownMenuClose,(0,l.ensureNotNull)(this._menuPosition))}))}}var Is=i(65407),Ns=i(6250);class Os{constructor(e,t){this._symbol=null,this._isSymbolInvalid=null,this._symbolInfo=new(n())(null).spawn(),this._source=e,e.properties().hasChild("symbol")&&(this._symbol=(0,U.createWVFromGetterAndSubscription)((()=>e.properties().symbol.value()),e.properties().symbol.listeners()));const i=[];if((0,Ns.isStudyLineTool)(e))i.push(e.onStatusChanged());else if((0,pe.isStudy)(e)||(0,pe.isStudyStub)(e))this._isSymbolInvalid=(0,Is.createWVFromGetterAndSubscriptions)((()=>e.isSymbolInvalid()&&e.isActualInterval()),i),i.push(e.onStatusChanged(),e.onIsActualIntervalChange());else{(0,l.assert)(e===t.mainSeries());const s=t.mainSeries();this._isSymbolInvalid=(0,U.createWVFromGetterAndSubscription)((()=>s.isSymbolInvalid()),s.onStatusChanged()),i.push(s.onStatusChanged()),this._symbolInfo=(0,U.createWVFromGetterAndSubscription)(s.symbolInfo.bind(s),s.dataEvents().symbolResolved())}this._dataSourceErrorStatus=(0,Is.createWVFromGetterAndSubscriptions)((()=>this._source.statusProvider({}).errorStatus()),i)}destroy(){var e,t -;null===(e=this._symbol)||void 0===e||e.destroy(),null===(t=this._isSymbolInvalid)||void 0===t||t.destroy(),this._dataSourceErrorStatus.destroy(),this._symbolInfo.destroy()}symbol(){return this._symbol}isSymbolInvalid(){return this._isSymbolInvalid}errorStatus(){return this._dataSourceErrorStatus}symbolInfo(){return this._symbolInfo}marketStatusModel(){return this._source.marketStatusModel()}dataProblemModel(){return this._source.dataProblemModel()}dataUpdatedModeModel(){return this._source.dataUpdatedModeModel()}}class Rs extends zs{constructor(e,t,i){super(new Os(e,t),i),this._isInReplay=new(n())(!1).readonly().spawn(),this._isInReplayCanBeShown=null,this._inited=!1}destroy(){super.destroy()}_updateStatusWidgetsVisibilities(){super._updateStatusWidgetsVisibilities()}_isPrimaryWidgetShown(){var e,t;return super._isPrimaryWidgetShown()||null!==(t=null===(e=this._isInReplay)||void 0===e?void 0:e.value())&&void 0!==t&&t}}var Fs=i(8840),Gs=i(43370);const Us={readOnlyMode:!1,contextMenu:{settings:!0,mainSeries:!0,studies:!0,showOpenMarketStatus:!1},symbolMarkerEnabled:!1,showToggleButton:!0,canShowSourceCode:!1,statusesWidgets:{sourceStatusesEnabled:!1,sourceStatuses:{errorSolution:!0},marketStatusEnabled:!1,marketStatus:{preMarketSolution:!0,postMarketSolution:!0},dataUpdateModeEnabled:!1,dataUpdateMode:{subscriptionFullInfo:!0},dataProblemEnabled:!1}},js=(d.enabled("hide_legend_by_default"),d.enabled("fundamental_widget")),$s=d.enabled("legend_context_menu"),qs=2*parseInt(y.marginlegendhoriz);class Ks{constructor(e,t,i,s,l,o,r,d){this._mainSeriesViewModel=null,this._dataSourceViewModels=[],this._visibleDataSourceCount=new(n())(0),this._themedColor=new(n())(""),this._mainSeriesRowHidden=null,this._dataSourceRowsHidden=[],this._customWidgetsVisibilities=[],this._allLegendHidden=new(n())(!1),this._studiesLegendHidden=new(n())(!1),this._customWidgetsHeights=[],this._onLegendVisibilityToggled=null,this._availableHeight=0,this._collapsedDataSourcesCount=new(n())(0),this._collapsedDataSourcesTitle=new(n())(""),this._mainSeriesStatusWidget=null,this._dataSourcesStatusesWidgets=[],this._size=null,this._customLegendWidgetsFactoriesMap=new Map,this._customLegendWidgetsMap=new Map,this._margin=0,this._model=e,this._paneWidget=t,this._options=(0,a.merge)((0,a.clone)(Us),r),this._callbacks=d,this._mainSeriesViewModelsOptions={readOnlyMode:this._options.readOnlyMode,symbolMarkerEnabled:this._options.symbolMarkerEnabled},this._dataSourceViewModelsOptions={...this._mainSeriesViewModelsOptions,canShowSourceCode:this._options.canShowSourceCode},this._backgroundThemeName=i;const u=this._showLegendCalculatedProperty();this._isDataSourcesCollapsed=new(n())(u.value()),u.subscribe(this,(()=>{this._isDataSourcesCollapsed.setValue(u.value())}));const h=new(n())(this._getCustomTextColorValue()),c=this._model.model().properties().childs();c.scalesProperties.childs().textColor.subscribe(this,(()=>{h.setValue(this._getCustomTextColorValue())}));const _=c.paneProperties.childs().legendProperties.childs().showBackground,p=new(n())(_.value()) -;_.subscribe(this,(()=>{p.setValue(_.value())}));const m=c.paneProperties.childs().legendProperties.childs().backgroundTransparency,g=new(n())(m.value());m.subscribe(this,(()=>{g.setValue(m.value())})),this._hideNotMainSources=s,this._hideNotMainSources.subscribe(this._updateLegendVisibilities.bind(this)),this._hideAllExceptFirstLine=l,this._hideAllExceptFirstLine.subscribe(this._updateCollapsedSourcesMode.bind(this)),this._hideWholeLegend=o,this._hideWholeLegend.subscribe(this._updateLegendVisibilities.bind(this)),this._isPaneMain=new(n())(this._getIsPaneMainValue()),this._updateCollapsedSourcesModeThrottle=(0,Gs.default)(this._updateCollapsedSourcesMode.bind(this),100),this._renderer=new F({withActions:!this._options.readOnlyMode,showToggleButton:this._options.showToggleButton,isStudiesLegendHidden:this._studiesLegendHidden.readonly(),isAllLegendHidden:this._allLegendHidden.readonly(),customTextColor:h.readonly(),themedColor:this._themedColor.readonly(),showBackground:p.readonly(),backgroundTransparency:g.readonly(),collapsedDataSourcesCount:this._collapsedDataSourcesCount.readonly(),collapsedDataSourcesTitle:this._collapsedDataSourcesTitle.readonly(),showLegendWidgetContextMenu:this.onShowLegendWidgetContextMenu.bind(this),hideAllExceptFirstLine:this._hideAllExceptFirstLine},{visibleDataSourceCount:this._visibleDataSourceCount.readonly(),isDataSourcesCollapsed:this._isDataSourcesCollapsed.readonly(),showObjectsTree:this._isPaneMain.readonly(),onCollapseDataSources:this.onCollapseDataSources.bind(this),onShowObjectsTreeDialog:this._callbacks.showObjectsTreeDialog})}destroy(){this._backgroundThemeName.destroy(),this._hideNotMainSources.destroy(),this._hideAllExceptFirstLine.destroy(),this._hideWholeLegend.destroy(),null!==this._mainSeriesViewModel&&this._destroyMainDataSource();for(const e of this._dataSourceViewModels)e.destroy();for(const e of this._dataSourcesStatusesWidgets)e.destroy();this._clearSubscriptions();for(const e of Array.from(this._customLegendWidgetsMap.keys()))this._destroyCustomWidgetFromLayerBlock(e);this._customLegendWidgetsMap.clear(),this._renderer.destroy(),delete this._renderer,this._showLegendCalculatedProperty().unsubscribeAll(this),this._showLegendOriginalProperty().unsubscribeAll(this);const e=this._model.model().properties().childs();e.scalesProperties.childs().textColor.unsubscribeAll(this),e.paneProperties.childs().legendProperties.childs().showBackground.unsubscribeAll(this),e.paneProperties.childs().legendProperties.childs().backgroundTransparency.unsubscribeAll(this)}addCustomWidgetToLegend(e,t){const i=this._customLegendWidgetsFactoriesMap.get(t.block)||new Map,s=i.get(t.position)||[];s.push(e),i.set(t.position,s),this._customLegendWidgetsFactoriesMap.set(t.block,i),this.updateLayout(),this._updateCustomWidgetModeBySize()}onShowLegendWidgetContextMenu(e,t){if(this._options.readOnlyMode||!$s)return Promise.resolve();x("Show legend context menu");const i=new Map;for(const e of Array.from(this._customLegendWidgetsMap.keys())){const t=(0, -l.ensureDefined)(this._customLegendWidgetsMap.get(e)),s=new Map;for(const e of Array.from(t.keys())){const i=(0,l.ensureDefined)(t.get(e)),o=s.get(e)||[];for(const e of i)o.push(...e.contextMenuActions());s.set(e,o)}i.set(e,s)}return function(e,t,i,s,l,o){const n=[],a=s.get(0);if(void 0!==a){const e=a.get(1);void 0!==e&&e.length>0&&(n.push(...e),n.push(new Pe.Separator))}const r=e.model().properties().childs().paneProperties.childs().legendProperties.childs();if(n.push(new Pe.Action({actionId:"Chart.Legend.ToggleSymbolVisibility",checkable:!0,checked:r.showSeriesTitle.value(),label:Xe,statName:"Show Symbol",onExecute:()=>Re(e,r.showSeriesTitle,Fe)})),t.showOpenMarketStatus&&"market"===e.mainSeries().marketStatusModel().status().value()&&!(0,Be.isEconomicSymbol)(e.mainSeries().symbolInfo())&&n.push(new Pe.Action({actionId:"Chart.Legend.ToggleOpenMarketStatusVisibility",checkable:!0,checked:ze.showMarketOpenStatusProperty.value(),label:Ze,statName:"Show Open market status",onExecute:()=>Re(e,ze.showMarketOpenStatusProperty,Ge)})),n.push(new Pe.Action({actionId:"Chart.Legend.ToggleOhlcValuesVisibility",checkable:!0,checked:r.showSeriesOHLC.value(),label:Qe,statName:"Show OHLC Values",onExecute:()=>Re(e,r.showSeriesOHLC,Ue)})),n.push(new Pe.Action({actionId:"Chart.Legend.ToggleBarChangeValuesVisibility",checkable:!0,checked:r.showBarChange.value(),label:Je,statName:"Show Bar Change Values",onExecute:()=>Re(e,r.showBarChange,je)})),n.push(new Pe.Action({actionId:"Chart.Legend.ToggleVolumeVisibility",checkable:!0,checked:r.showVolume.value(),label:et,statName:"Show Volume",onExecute:()=>Re(e,r.showVolume,Ye)})),n.push(new Pe.Separator),void 0!==a){const e=a.get(0);void 0!==e&&e.length>0&&(n.push(...e),n.push(new Pe.Separator))}const d=s.get(1);if(void 0!==d){const e=d.get(1);void 0!==e&&e.length>0&&(n.push(...e),n.push(new Pe.Separator))}if(e.model().priceDataSources().some((e=>!(0,Ne.isActingAsSymbolSource)(e)&&e.showInObjectTree()))&&(n.push(new Pe.Action({actionId:"Chart.Legend.ToggleIndicatorTitlesVisibility",checkable:!0,checked:r.showStudyTitles.value(),label:tt,statName:"Show Indicator Titles",onExecute:()=>Re(e,r.showStudyTitles,$e)})),n.push(new Pe.Action({actionId:"Chart.Legend.ToggleIndicatorArgumentsVisibility",checkable:!0,checked:r.showStudyArguments.value(),label:it,statName:"Show Indicator Arguments",onExecute:()=>Re(e,r.showStudyArguments,qe)})),n.push(new Pe.Action({actionId:"Chart.Legend.ToggleIndicatorValuesVisibility",checkable:!0,checked:r.showStudyValues.value(),label:st,statName:"Show Indicator Values",onExecute:()=>Re(e,r.showStudyValues,Ke)}))),void 0!==d){const e=d.get(0);void 0!==e&&e.length>0&&(n.push(...e),n.push(new Pe.Separator))}return t.settings&&(n[n.length-1]instanceof Pe.Separator||n.push(new Pe.Separator),n.push(new Pe.Action({actionId:"Chart.Dialogs.ShowGeneralSettings.LegendTab",label:lt,icon:Oe,statName:"Settings...",onExecute:()=>i(se.TabNames.legend)}))),De.ContextMenuManager.showMenu(n,l,void 0,{menuName:"LegendPropertiesContextMenu"},o) -}(this._model,this._options.contextMenu,this._callbacks.showGeneralChartProperties,i,e,t)}onCollapseDataSources(){const e=this._showLegendOriginalProperty();e.setValue(!e.value())}updateLayout(){const e=this._paneWidget.state().sourcesByGroup().legendViewSources().filter((e=>null!==e.statusView()&&e.isDisplayedInLegend()));if(0===e.length)return;const t=this._model.mainSeries(),i=e.indexOf(t);i>-1?(e.splice(i,1),js||null!==this._mainSeriesViewModel||(this._mainSeriesViewModel=new _e(this._model,t,this._mainSeriesViewModelsOptions,this._callbacks,this._options.contextMenu),this._mainSeriesStatusWidget=new Rs(t,this._model.model(),this._options.statusesWidgets),this._renderer.addMainDataSource(this._mainSeriesViewModel,this._mainSeriesStatusWidget)),this._addCustomWidgetForLayerBlock(0)):null!==this._mainSeriesViewModel&&(this._destroyMainDataSource(),this._destroyCustomWidgetFromLayerBlock(0));const s=[],o=[],n=this._dataSourceViewModels.length;if(0===n)for(let t=e.length-1;t>=0;t--){const i=e[t];s.push(new He(this._model,i,this._dataSourceViewModelsOptions,this._callbacks,this._options.contextMenu)),o.push(new zs(new Os(i,this._model.model()),this._options.statusesWidgets))}else{let t=0;for(let i=e.length-1;i>=0;i--){const l=e[i];this._dataSourceViewModels[t]?(this._dataSourceViewModels[t].updateSource(l),this._dataSourcesStatusesWidgets[t].updateSource(new Os(l,this._model.model()))):(s.push(new He(this._model,l,this._dataSourceViewModelsOptions,this._callbacks,this._options.contextMenu)),o.push(new zs(new Os(e[i],this._model.model()),this._options.statusesWidgets))),t++}for(;this._dataSourceViewModels.length>t;)(0,l.ensureDefined)(this._dataSourceViewModels.pop()).destroy();for(;this._dataSourcesStatusesWidgets.length>t;)(0,l.ensureDefined)(this._dataSourcesStatusesWidgets.pop()).destroy()}0!==s.length&&(this._renderer.addDataSources(s,o),this._dataSourceViewModels.push(...s),this._dataSourcesStatusesWidgets.push(...o)),n!==this._dataSourceViewModels.length&&this._updateCollapsedSourcesMode(),this._dataSourceViewModels.length>0?this._addCustomWidgetForLayerBlock(1):this._destroyCustomWidgetFromLayerBlock(1),this._recreateSubscriptions(),this._isPaneMain.setValue(this._getIsPaneMainValue()),this.update(),this._updateWidgetModeByWidth()}update(){null!==this._mainSeriesViewModel&&this._mainSeriesViewModel.update();for(const e of this._dataSourceViewModels)e.update()}updateThemedColors(e){null===e&&(e=(0,Fs.getStdThemedValue)("chartProperties.paneProperties.background",this._backgroundThemeName.value())),this._themedColor.setValue(e||"")}firstTitle(){return this._renderer.firstTitle()}getElement(){return this._renderer.getElement()}addMargin(e){if(this._margin===e)return;this._margin=e;this._renderer.getElement().style.maxWidth=0===this._margin?"":`calc(100% - ${this._margin+qs}px)`,this._updateWidgetModeBySize()}updateWidgetModeBySize(e){this._size=e,this._updateWidgetModeBySize()}_updateWidgetModeBySize(){this._updateWidgetModeByWidth(),this._updateWidgetModeByHeight(),this._updateCustomWidgetModeBySize()} -_updateWidgetModeByWidth(){if(null===this._size)return;const e=this._availableWidth();this._renderer.updateMode(e),this._paneWidget.hasState()&&this._paneWidget.state().containsMainSeries()&&this._model.mainSeries().setTextSourceIsAlwaysTickerRestrictionEnabled(e<=132)}_updateWidgetModeByHeight(){null!==this._size&&(this._availableHeight=.8*this._size.height,this._updateCollapsedSourcesModeThrottle())}_updateCustomWidgetModeBySize(){if(null===this._size)return;const e=(0,s.size)({width:this._availableWidth(),height:this._size.height});for(const t of Array.from(this._customLegendWidgetsMap.values()))for(const i of Array.from(t.values()))for(const t of i)t.updateWidgetModeBySize(e)}_destroyMainDataSource(){(0,l.ensureNotNull)(this._mainSeriesStatusWidget).destroy(),this._mainSeriesStatusWidget=null,(0,l.ensureNotNull)(this._mainSeriesViewModel).destroy(),this._mainSeriesViewModel=null}_updateCollapsedSourcesMode(){const e=this._dataSourceViewModels.length,t=this._hideAllExceptFirstLine.value();if(this._availableHeight>0&&e>2){const i=Number(this._renderer.getMainSourceHeight()),s=this._renderer.getDataSourceHeight(),l=this._getCustomWidgetsHeight();if(null!==s){const o=Math.floor((this._availableHeight-i-l)/s),n=Math.max(o,2)-1;if(e>n+1){let i="";for(let s=0;se.value())),t=this._hideNotMainSources.value()||e;this._studiesLegendHidden.setValue(t);const i=null===this._mainSeriesRowHidden||this._mainSeriesRowHidden.value(),s=this._customWidgetsVisibilities.some((e=>e.value()));this._allLegendHidden.setValue(e&&i&&!s)}_updateVisibleDataSourceCount(){const e=this._dataSourceRowsHidden.filter((e=>!e.value())).length;this._visibleDataSourceCount.setValue(e)}_setLegendVisibilityToggled(){0}_getIsPaneMainValue(){return this._paneWidget.containsMainSeries()}_showLegendCalculatedProperty(){return this._model.model().showLegend()}_showLegendOriginalProperty(){return this._model.model().properties().childs().paneProperties.childs().legendProperties.childs().showLegend}_addCustomWidgetForLayerBlock(e){const t=this._customLegendWidgetsFactoriesMap.get(e);if(void 0===t)return;const i=this._customLegendWidgetsMap.get(e)||new Map;let s=!1;for(const l of Array.from(t.keys())){const o=i.get(l)||[],n=t.get(l)||[];for(let t=o.length;t!e&&!t),this._hideNotMainSources,this._hideAllExceptFirstLine)),o.push(i),this._renderer.addCustomWidget(i,{block:e,position:l}),s=!0}s&&i.set(l,o)}s&&this._customLegendWidgetsMap.set(e,i)}_destroyCustomWidgetFromLayerBlock(e){const t=this._customLegendWidgetsMap.get(e);if(void 0!==t){for(const e of Array.from(t.values()))for(const t of e)t.destroy();t.clear(),this._customLegendWidgetsMap.delete(e)}}_availableWidth(){return null===this._size?0:this._size.width-this._margin-qs}}},28756:(e,t,i)=>{"use strict";i.r(t),i.d(t,{PaneControlsWidget:()=>Z});var s=i(32563),l=i(51768),o=i(44352),n=i(68335),a=i(43074),r=i(89215),d=i(50151),u=i(24377),h=i(76289),c=i(78029),_=i(58064),p=i(62927);class m{constructor(e,t,i){this._parentEl=document.createElement("div"),this._listActionsWrapperEl=null,this._listActionsElements={},this._actionsSpawns={},this._onMouseEnterLeaveEventHandler=null,this._mouseOverWidget=!1,this._width=null,this._wrapEl=e,this._onMouseEnterLeaveEventHandler=this._onMouseEnterLeaveEvent.bind(this),this._wrapEl.addEventListener("mouseenter",this._onMouseEnterLeaveEventHandler),this._wrapEl.addEventListener("mouseleave",this._onMouseEnterLeaveEventHandler),this._actions=t,this._globalVisibility=i.globalVisibility.spawn(),this._globalVisibility.subscribe(this._updatePaneControlsWidgetVisibility.bind(this)),this._visibilityType=i.visibilityType.spawn(), -this._visibilityType.subscribe(this._updatePaneControlsWidgetVisibility.bind(this)),this._doNotSwitchToContextMenuMode=i.doNotSwitchToContextMenuMode,this._forceContextMenuMode=i.forceContextMenuMode.spawn(),this._forceContextMenuMode.subscribe(this._updateWidgetMode.bind(this)),this._themedColor=i.themedColor.spawn(),this._themedColor.subscribe(this._updateThemedColor.bind(this));for(const[e,t]of Object.entries(this._actions)){const i=e;this._actionsSpawns[i]={visible:t.visible.spawn(),title:void 0===t.title?null:t.title.spawn()},this._actionsSpawns[i].visible.subscribe(this._updateActionVisibilities.bind(this,i));const s=this._actionsSpawns[i].title;null!==s&&s.subscribe(this._updateActionTitle.bind(this,i))}this._render(),this._updatePaneControlsWidgetVisibility(),this._updateThemedColor(this._themedColor.value()),this._parentEl.classList.toggle(_.touchMode,h.trackingModeIsAvailable),this._parentEl.addEventListener("contextmenu",(e=>e.preventDefault()))}destroy(){this._visibilityType.destroy(),this._forceContextMenuMode.destroy(),this._themedColor.destroy();for(const e of Object.keys(this._actionsSpawns)){const t=e;this._actionsSpawns[t].visible.destroy();const i=this._actionsSpawns[t].title;null!==i&&i.destroy()}null!==this._onMouseEnterLeaveEventHandler&&(this._wrapEl.removeEventListener("mouseenter",this._onMouseEnterLeaveEventHandler),this._wrapEl.removeEventListener("mouseleave",this._onMouseEnterLeaveEventHandler),this._onMouseEnterLeaveEventHandler=null),this._parentEl.innerHTML="",delete this._parentEl}getElement(){return this._parentEl}bottomWithMargin(){const e=this._parentEl.classList.contains(_.touchMode)?Number(_.css_value_pane_controls_button_touch_size):Number(_.css_value_pane_controls_button_size);return 2*Number(_.css_value_pane_controls_margin_top)+e}updateWidgetModeByWidth(e){this._width=e,this._updateWidgetMode()}_updateWidgetMode(){if(null===this._width)return;const e=!this._doNotSwitchToContextMenuMode.value()&&this._width<356,t=!this._doNotSwitchToContextMenuMode.value()&&(this._forceContextMenuMode.value()||this._width<666.65),i=(0,d.ensureNotNull)(this._listActionsWrapperEl),s=(0,d.ensureNotNull)(this._listActionsElements.more);i.classList.toggle(p.blockHidden,e||t),s.classList.toggle(p.blockHidden,e||!t||!this._actions.more.visible.value())}_render(){this._renderActions(),this._parentEl.classList.add(_.paneControls),this._wrapEl.append(this._parentEl)}_renderActions(){null===this._listActionsWrapperEl&&(this._listActionsWrapperEl=document.createElement("div"),this._listActionsWrapperEl.classList.add(_.buttonsWrapper),this._parentEl.append(this._listActionsWrapperEl));const e=h.trackingModeIsAvailable?"large":"small";this._listActionsElements.up=(0,c.createActionElement)(this._actions.up,_.button,_.buttonIcon,p.blockHidden,e),this._listActionsElements.down=(0,c.createActionElement)(this._actions.down,_.button,_.buttonIcon,p.blockHidden,e),this._listActionsElements.collapse=(0,c.createActionElement)(this._actions.collapse,_.button,_.buttonIcon,p.blockHidden,e), -this._listActionsElements.restore=(0,c.createActionElement)(this._actions.restore,_.button,_.buttonIcon,p.blockHidden,e),this._listActionsElements.close=(0,c.createActionElement)(this._actions.close,_.button,_.buttonIcon,p.blockHidden,e),this._listActionsElements.maximize=(0,c.createActionElement)(this._actions.maximize,_.button,_.buttonIcon,p.blockHidden,e),this._listActionsElements.minimize=(0,c.createActionElement)(this._actions.minimize,_.button,_.buttonIcon,p.blockHidden,e),this._listActionsWrapperEl.append(this._listActionsElements.up,this._listActionsElements.down,this._listActionsElements.close,this._listActionsElements.collapse,this._listActionsElements.restore,this._listActionsElements.maximize,this._listActionsElements.minimize),this._listActionsElements.more=(0,c.createActionElement)(this._actions.more,_.button,_.buttonIcon,p.blockHidden,e);for(const e of Object.keys(this._listActionsElements))(0,d.ensureNotNull)(this._listActionsElements[e]).classList.add(_.newButton);this._parentEl.append(this._listActionsElements.more)}_updateActionVisibilities(e,t){(0,d.ensureNotNull)(this._listActionsElements[e]).classList.toggle(p.blockHidden,!t)}_updateActionTitle(e,t){(0,d.ensureNotNull)(this._listActionsElements[e]).setAttribute("title",t)}_onMouseEnterLeaveEvent(e){this._mouseOverWidget="mouseenter"===e.type,"visibleOnMouseOver"===this._visibilityType.value()&&this._updatePaneControlsWidgetVisibility()}_updatePaneControlsWidgetVisibility(){let e,t=!1;switch(this._visibilityType.value()){case"alwaysOff":e=!1,t=!0;break;case"alwaysOn":e=this._globalVisibility.value();break;case"visibleOnMouseOver":e=this._globalVisibility.value()&&this._mouseOverWidget}this._parentEl.classList.toggle(_.hidden,!e),this._parentEl.classList.toggle(_.forceHidden,!this._globalVisibility.value()||t)}_updateThemedColor(e){if(e.length>0){const[t,i,s]=(0,u.parseRgb)(e);this._parentEl.style.color=(0,u.rgbaToString)([t,i,s,(0,u.normalizeAlphaComponent)(.8)])}else this._parentEl.style.removeProperty("color")}}var g=i(43986),v=i(60223),b=i(36016),w=i(72899),y=i(48344),S=i(99539),M=i(20465),f=i(34763);const C=o.t(null,void 0,i(68854)),E=C,k=(0,n.humanReadableModifiers)(n.Modifiers.Mod)+C;var V=i(40549),x=i.n(V),W=i(8840),T=i(61814),L=i(72237),A=i(81020),H=i(3515),P=i(79526),D=i(82847),B=i(7859),z=i(70471),I=i(71402),N=i(42930);const O=s.mobiletouch,R=o.t(null,void 0,i(83498)),F=o.t(null,void 0,i(70343)),G=o.t(null,void 0,i(39899)),U=o.t(null,void 0,i(19603)),j=o.t(null,void 0,i(91029)),$=o.t(null,void 0,i(39589)),q=o.t(null,void 0,i(35732)),K=o.t(null,void 0,i(68854)),Y=(0,T.hotKeySerialize)({keys:[""],text:K}),X=(0,T.hotKeySerialize)({keys:[(0,n.humanReadableModifiers)(n.Modifiers.Mod,!1)],text:`{0} + ${K}`});class Z{constructor(e,t,i,s,l){this._actions={},this._moreCMShown=!1,this._themedColor=new(x())(""),this._connectedToBroker=new(x())(!1),this._isDestroyed=!1,this._model=e,this._paneWidget=t,this._callbacks=s,this._closeButtonVisibility=new(x())(this._getCloseButtonVisibility()), -this._upButtonVisibility=new(x())(this._getUpButtonVisibility()),this._downButtonVisibility=new(x())(this._getDownButtonVisibility()),this._maximizeButtonVisibility=new(x())(this._getMaximizeButtonVisibility()),this._minimizeButtonVisibility=new(x())(this._getMinimizeButtonVisibility()),this._collapseButtonVisibility=new(x())(this._getCollapseButtonVisibility()),this._restoreButtonVisibility=new(x())(this._getRestoreButtonVisibility()),this._createActions(),this._visibilityTypeProperty=(0,a.actualBehavior)(),this._visibilityTypeProperty.subscribe(this,(e=>{this._visibilityType.setValue(e.value())})),this._visibilityType=new(x())(this._visibilityTypeProperty.value()),this._isPaneMaximize=new(x())(this._getIsPaneMaximizeValue()),this._isWidgetShow=new(x())(this._getIsWidgetShow()),this._backgroundThemeName=i.backgroundThemeName,this._renderer=new m(l,this._actions,{visibilityType:this._visibilityType.readonly(),globalVisibility:this._isWidgetShow.readonly(),doNotSwitchToContextMenuMode:this._isPaneMaximize.readonly(),forceContextMenuMode:this._connectedToBroker.readonly(),themedColor:this._themedColor.readonly()})}destroy(){this._visibilityTypeProperty.unsubscribeAll(this),this._renderer.destroy(),this._isDestroyed=!0}getElement(){return this._renderer.getElement()}bottomWithMargin(){return this._renderer.bottomWithMargin()}action(){return this._actions}update(){this._updateButtonsVisibility(),this._isPaneMaximize.setValue(this._getIsPaneMaximizeValue()),this._isWidgetShow.setValue(this._getIsWidgetShow())}updateWidgetModeByWidth(e){this._renderer.updateWidgetModeByWidth(e)}updateThemedColors(e){null===e&&(e=(0,W.getStdThemedValue)("chartProperties.paneProperties.background",this._backgroundThemeName.value())),this._themedColor.setValue(e||"")}async _subscribeOnConnectedToBroker(){const e=await waitTradingService();this._isDestroyed||(e.onConnectionStatusChange.subscribe(this,this._updateConnectedToBroker.bind(this)),this._updateConnectedToBroker(e.connectStatus()))}_updateConnectedToBroker(e){this._connectedToBroker.setValue(1===e)}_updateButtonsVisibility(){this._closeButtonVisibility.setValue(this._getCloseButtonVisibility()),this._upButtonVisibility.setValue(this._getUpButtonVisibility()),this._downButtonVisibility.setValue(this._getDownButtonVisibility()),this._maximizeButtonVisibility.setValue(this._getMaximizeButtonVisibility()),this._minimizeButtonVisibility.setValue(this._getMinimizeButtonVisibility()),this._collapseButtonVisibility.setValue(this._getCollapseButtonVisibility()),this._restoreButtonVisibility.setValue(this._getRestoreButtonVisibility())}_createActions(){this._actions.up={iconMap:new Map([["large",A],["small",A]]),action:this._onUpDownButton.bind(this,"up"),visible:this._upButtonVisibility,title:new(x())(F),className:_.up,dataset:{name:"pane-button-up"}},this._actions.down={iconMap:new Map([["large",H],["small",H]]),action:this._onUpDownButton.bind(this,"down"),visible:this._downButtonVisibility,title:new(x())(G),className:_.down,dataset:{name:"pane-button-down"}},this._actions.close={ -iconMap:new Map([["large",L],["small",L]]),action:this._onCloseButton.bind(this),visible:this._closeButtonVisibility,title:new(x())(R),dataset:{name:"pane-button-close"}},this._actions.maximize={iconMap:new Map([["large",B],["small",P]]),action:this._onToggleMaximizeButton.bind(this,"Maximize pane"),visible:this._maximizeButtonVisibility,title:new(x())(U),hotKeyTitle:Y,className:_.maximize,dataset:{name:"pane-button-maximize"}},this._actions.minimize={iconMap:new Map([["large",B],["small",P]]),action:this._onToggleMaximizeButton.bind(this,"Minimize pane"),visible:this._minimizeButtonVisibility,title:new(x())(j),hotKeyTitle:Y,className:_.minimize,dataset:{name:"pane-button-minimize"}},this._actions.collapse={iconMap:new Map([["large",I],["small",I]]),action:this._onToggleCollapseButton.bind(this,"Collapse pane"),visible:this._collapseButtonVisibility,title:new(x())($),hotKeyTitle:X,className:_.collapse,dataset:{name:"pane-button-collapse"}},this._actions.restore={iconMap:new Map([["large",N],["small",N]]),action:this._onToggleCollapseButton.bind(this,"Restore pane"),visible:this._restoreButtonVisibility,title:new(x())(j),hotKeyTitle:X,className:_.restore,dataset:{name:"pane-button-restore"}},this._actions.more={iconMap:new Map([["large",z],["small",D]]),action:this._showButtonsInContextMenu.bind(this),visible:new(x())(!O),title:new(x())(q),dataset:{name:"pane-button-more"}}}_getCloseButtonVisibility(){const e=this._paneWidget.state();let t=!1;return e.containsMainSeries()||e.maximized().value()||O||(t=e.dataSources().some((e=>(0,r.isStudy)(e)))),t}_onCloseButton(){this._trackEvent("Delete pane");const e=this._model.model().panes().indexOf(this._paneWidget.state());this._model.removePane(e)}_getUpButtonVisibility(){const e=this._paneWidget.state();return this._model.model().panes().indexOf(e)>0&&!e.maximized().value()&&!O}_getDownButtonVisibility(){const e=this._paneWidget.state(),t=this._model.model().panes();return t.indexOf(e)1&&!e.maximized().value()&&!O}_getMinimizeButtonVisibility(){const e=this._paneWidget.state();return this._model.model().panes().length>1&&e.maximized().value()}_getCollapseButtonVisibility(){if(O)return!1;const e=this._paneWidget.state();return!e.maximized().value()&&!e.collapsed().value()&&this._model.model().paneCollapsingAvailable().value()}_getRestoreButtonVisibility(){const e=this._paneWidget.state();return!e.maximized().value()&&e.collapsed().value()}_onToggleMaximizeButton(e){this._trackEvent(e),this._callbacks.toggleMaximizePane(this._paneWidget)}_onToggleCollapseButton(e){this._trackEvent(e),this._callbacks.toggleCollapsedPane(this._paneWidget)}_showButtonsInContextMenu(e){e.preventDefault(),this._moreCMShown||function(e,t,i){const s=[];if(e.maximize.visible.value()){const t=(0, -d.ensure)(e.maximize.title),i=(0,d.ensureNotNull)(e.maximize.action);s.push(new g.Action({actionId:"Chart.PaneControls.MaximizePane",icon:S,label:t.value(),statName:"Maximize Pane",shortcutHint:E,onExecute:()=>i()}))}else if(e.minimize.visible.value()){const t=(0,d.ensure)(e.minimize.title),i=(0,d.ensureNotNull)(e.minimize.action);s.push(new g.Action({actionId:"Chart.PaneControls.MinimizePane",icon:S,label:t.value(),statName:"Minimize Pane",shortcutHint:E,onExecute:()=>i()}))}if(e.collapse.visible.value()){const t=(0,d.ensure)(e.collapse.title),i=(0,d.ensureNotNull)(e.collapse.action);s.push(new g.Action({actionId:"Chart.PaneControls.CollapsePane",icon:M,label:t.value(),statName:"Collapse pane",shortcutHint:k,onExecute:()=>i()}))}if(e.restore.visible.value()){const t=(0,d.ensure)(e.restore.title),i=(0,d.ensureNotNull)(e.restore.action);s.push(new g.Action({actionId:"Chart.PaneControls.RestorePane",icon:f,label:t.value(),statName:"Restore pane",shortcutHint:k,onExecute:()=>i()}))}if(e.up.visible.value()){const t=(0,d.ensure)(e.up.title),i=(0,d.ensureNotNull)(e.up.action);s.push(new g.Action({actionId:"Chart.PaneControls.MovePaneUp",icon:w,label:t.value(),statName:"Move pane up",onExecute:()=>i()}))}if(e.down.visible.value()){const t=(0,d.ensure)(e.down.title),i=(0,d.ensureNotNull)(e.down.action);s.push(new g.Action({actionId:"Chart.PaneControls.MovePaneDown",icon:y,label:t.value(),statName:"Move pane down",onExecute:()=>i()}))}if(e.close.visible.value()){const t=(0,d.ensure)(e.close.title),i=(0,d.ensureNotNull)(e.close.action);s.push(new g.Action({actionId:"Chart.PaneControls.DeletePane",icon:b,label:t.value(),statName:"Delete pane",onExecute:()=>i()}))}const l=(0,d.ensureNotNull)(t.target).getBoundingClientRect();return v.ContextMenuManager.showMenu(s,{clientX:l.right,clientY:l.top+l.height+3,attachToXBy:"right"},void 0,void 0,i)}(this._actions,e,(()=>{this._moreCMShown=!1})).then((()=>{this._moreCMShown=!0}))}_getIsPaneMaximizeValue(){return this._paneWidget.state().maximized().value()}_getIsWidgetShow(){return this._model.model().panes().length>1}_trackEvent(e){(0,l.trackEvent)("GUI","Pane action",e)}}},78029:(e,t,i)=>{"use strict";i.d(t,{createActionElement:()=>l});var s=i(65665);function l(e,t,i,l,o){const n=document.createElement("div");n.className=t,n.classList.toggle(l,!e.visible.value()),Object.assign(n.dataset,e.dataset),void 0!==e.className&&n.classList.add(e.className),void 0!==e.title&&(n.classList.add("apply-common-tooltip"),n.setAttribute("title",e.title.value()),void 0!==e.hotKeyTitle&&(n.dataset.tooltipHotkey=e.hotKeyTitle)),n.addEventListener("touchend",e.action),n.addEventListener("mousedown",(t=>{0===t.button&&e.action(t)}));const a=document.createElement("div");a.classList.add(i);const r=e.iconMap.get(o)||"";return(0,s.isString)(r)?a.innerHTML=r:a.appendChild(r),n.appendChild(a),n}},76289:(e,t,i)=>{"use strict";i.d(t,{trackingModeIsAvailable:()=>s});const s=i(49483).CheckMobile.any()},52506:e=>{ -e.exports=''},88658:e=>{e.exports=''},41674:e=>{e.exports=''},3792:e=>{ +this._symbolInvalidViewModel=new Gi(e,{tooltipMap:Xi,iconMap:Ki,classNameMap:Yi,titleMap:Zi,titleColorMap:Qi,htmlMap:Ji,actionMap:es,size:this._size});const t=this._symbolInvalidViewModel.visible().spawn();this._visibilitySpawns.push(t),this._tooltipSpawns.push(this._symbolInvalidViewModel.tooltip().spawn());const i={visible:t,model:this._symbolInvalidViewModel};this._statusWidgetInfos.push(i),this._renderer.addStatusModel(i)}else this._symbolInvalidViewModel.updateStatus(e),this._addSubscriptionForSymbolInvalid();if(null===this._dataSourceErrorStatusViewModel){this._dataSourceErrorStatusViewModel=new Bi(this._source,this._size,this._options.sourceStatuses),this._dataSourceHasErrorVisible=(0,X.combine)((()=>this._dataSourceErrorCanBeShown.value()&&(0,l.ensureNotNull)(this._dataSourceErrorStatusViewModel).visible().value()),this._dataSourceErrorCanBeShown,this._dataSourceErrorStatusViewModel.visible()),this._visibilitySpawns.push(this._dataSourceHasErrorVisible),this._tooltipSpawns.push(this._dataSourceErrorStatusViewModel.tooltip().spawn());const e={visible:this._dataSourceHasErrorVisible,model:this._dataSourceErrorStatusViewModel};this._statusWidgetInfos.push(e),this._renderer.addStatusModel(e)}else this._dataSourceErrorStatusViewModel.setSource(this._source)}if(this._options.marketStatusEnabled){const t=this._source.marketStatusModel();if(null===this._marketStatusViewModel){this._marketStatusViewModel=new Ns(t,this._size);const e=(0,X.combine)((()=>this._marketStatusCanBeShown.value()&&(0,l.ensureNotNull)(this._marketStatusViewModel).visible().value()&&!(0,Be.isEconomicSymbol)(this._source.symbolInfo().value())),this._marketStatusCanBeShown,this._marketStatusViewModel.visible(),this._source.symbolInfo());this._visibilitySpawns.push(e),this._tooltipSpawns.push(this._marketStatusViewModel.tooltip().spawn());const i={visible:e,model:this._marketStatusViewModel};null!==t&&(this._sessionWidget=new Ot(this._source),i.additionalWidgets=[this._sessionWidget]),this._statusWidgetInfos.push(i),this._renderer.addStatusModel(i)}else this._marketStatusViewModel.setModel(t),null===(e=this._sessionWidget)||void 0===e||e.updateSource(this._source)}if(this._options.dataUpdateModeEnabled){const e=this._source.dataUpdatedModeModel();if(null===this._dataUpdatedModeViewModel){const s={...this._options.dataUpdateMode,shouldBeHiddenRegardlessOfStatus:null===(i=null===(t=this._source.marketStatusModel())||void 0===t?void 0:t.futuresContractExpirationTime())||void 0===i?void 0:i.expired()};this._dataUpdatedModeViewModel=new Vi(e,this._size,s);const o=(0,X.combine)((()=>this._dataUpdatedModeCanBeShown.value()&&(0,l.ensureNotNull)(this._dataUpdatedModeViewModel).visible().value()&&!(0,Be.isEconomicSymbol)(this._source.symbolInfo().value())),this._dataUpdatedModeCanBeShown,this._dataUpdatedModeViewModel.visible(),this._source.symbolInfo());this._visibilitySpawns.push(o),this._tooltipSpawns.push(this._dataUpdatedModeViewModel.tooltip().spawn());const n={visible:o,model:this._dataUpdatedModeViewModel};this._statusWidgetInfos.push(n), +this._renderer.addStatusModel(n)}else this._dataUpdatedModeViewModel.setModel(e)}if(this._options.dataProblemEnabled){const e=this._source.dataProblemModel();if(null===this._dataProblemViewModel){this._dataProblemViewModel=new Fi(e,this._size),this._isDataProblemCritical=this._dataProblemViewModel.isDataProblemCritical().spawn();const t=(0,X.combine)((()=>this._dataProblemCanBeShown.value()&&(0,l.ensureNotNull)(this._dataProblemViewModel).visible().value()),this._dataProblemCanBeShown,this._dataProblemViewModel.visible());this._visibilitySpawns.push(t),this._tooltipSpawns.push(this._dataProblemViewModel.tooltip().spawn());const i={visible:t,model:this._dataProblemViewModel};this._statusWidgetInfos.push(i),this._renderer.addStatusModel(i)}else this._dataProblemViewModel.setModel(e)}}_addSubscriptionForSymbolInvalid(){const e=this._source.isSymbolInvalid();this._options.sourceStatusesEnabled&&null!==e&&(e.subscribe(this._updateStatusWidgetsVisibilities.bind(this)),e.subscribe(this._updateErrorWidgetIsShown.bind(this),{callWithLast:!0}))}_updateErrorWidgetIsShown(){var e,t,i,s;const l=null!==(t=null===(e=this._source.isSymbolInvalid())||void 0===e?void 0:e.value())&&void 0!==t&&t,o=null!==(s=null===(i=this._dataSourceHasErrorVisible)||void 0===i?void 0:i.value())&&void 0!==s&&s;this.errorWidgetIsShown.setValue(l||o)}_handleToggleDropdown(e){var t,i;this._menuPosition=e,this._menuOpened=!this._menuOpened,this._menuOpened&&(null===(t=this._source.symbol())||void 0===t||t.subscribe(this._handleDropdownMenuClose),i=`Open full tooltip for statuses: ${this._tooltips.value().join(", ")}`,(0,V.trackEvent)("GUI","Statuses widget's action",i)),this._updateDropdownMenu()}_updateDropdownMenu(){Promise.all([i.e(7624),i.e(6092),i.e(2397),i.e(962),i.e(1075),i.e(8643)]).then(i.bind(i,35814)).then((e=>{e.render(this._menuOpened,this._container,this._renderer.element,this._statusWidgetInfos,this._handleDropdownMenuClose,(0,l.ensureNotNull)(this._menuPosition))}))}}var Rs=i(65407),Fs=i(6250);class Gs{constructor(e,t){this._symbol=null,this._isSymbolInvalid=null,this._symbolInfo=new(n())(null).spawn(),this._source=e,e.properties().hasChild("symbol")&&(this._symbol=(0,U.createWVFromGetterAndSubscription)((()=>e.properties().symbol.value()),e.properties().symbol.listeners()));const i=[];if((0,Fs.isStudyLineTool)(e))i.push(e.onStatusChanged());else if((0,pe.isStudy)(e)||(0,pe.isStudyStub)(e))this._isSymbolInvalid=(0,Rs.createWVFromGetterAndSubscriptions)((()=>e.isSymbolInvalid()&&e.isActualInterval()),i),i.push(e.onStatusChanged(),e.onIsActualIntervalChange());else{(0,l.assert)(e===t.mainSeries());const s=t.mainSeries();this._isSymbolInvalid=(0,U.createWVFromGetterAndSubscription)((()=>s.isSymbolInvalid()),s.onStatusChanged()),i.push(s.onStatusChanged()),this._symbolInfo=(0,U.createWVFromGetterAndSubscription)(s.symbolInfo.bind(s),s.dataEvents().symbolResolved())}this._dataSourceErrorStatus=(0,Rs.createWVFromGetterAndSubscriptions)((()=>this._source.statusProvider({}).errorStatus()),i)}destroy(){var e,t +;null===(e=this._symbol)||void 0===e||e.destroy(),null===(t=this._isSymbolInvalid)||void 0===t||t.destroy(),this._dataSourceErrorStatus.destroy(),this._symbolInfo.destroy()}symbol(){return this._symbol}isSymbolInvalid(){return this._isSymbolInvalid}errorStatus(){return this._dataSourceErrorStatus}symbolInfo(){return this._symbolInfo}marketStatusModel(){return this._source.marketStatusModel()}dataProblemModel(){return this._source.dataProblemModel()}dataUpdatedModeModel(){return this._source.dataUpdatedModeModel()}}class Us extends Os{constructor(e,t,i){super(new Gs(e,t),i),this._isInReplay=new(n())(!1).readonly().spawn(),this._isInReplayCanBeShown=null,this._inited=!1}destroy(){super.destroy()}_updateStatusWidgetsVisibilities(){super._updateStatusWidgetsVisibilities()}_isPrimaryWidgetShown(){var e,t;return super._isPrimaryWidgetShown()||null!==(t=null===(e=this._isInReplay)||void 0===e?void 0:e.value())&&void 0!==t&&t}}var js=i(8840),$s=i(43370);const qs={readOnlyMode:!1,contextMenu:{settings:!0,mainSeries:!0,studies:!0,showOpenMarketStatus:!1},symbolMarkerEnabled:!1,showToggleButton:!0,canShowSourceCode:!1,statusesWidgets:{sourceStatusesEnabled:!1,sourceStatuses:{errorSolution:!0},marketStatusEnabled:!1,marketStatus:{preMarketSolution:!0,postMarketSolution:!0},dataUpdateModeEnabled:!1,dataUpdateMode:{subscriptionFullInfo:!0},dataProblemEnabled:!1}},Ks=(d.enabled("hide_legend_by_default"),d.enabled("fundamental_widget")),Ys=d.enabled("legend_context_menu"),Xs=2*parseInt(y.marginlegendhoriz);class Zs{constructor(e,t,i,s,l,o,r,d){this._mainSeriesViewModel=null,this._dataSourceViewModels=[],this._visibleDataSourceCount=new(n())(0),this._themedColor=new(n())(""),this._mainSeriesRowHidden=null,this._dataSourceRowsHidden=[],this._customWidgetsVisibilities=[],this._allLegendHidden=new(n())(!1),this._studiesLegendHidden=new(n())(!1),this._customWidgetsHeights=[],this._onLegendVisibilityToggled=null,this._availableHeight=0,this._collapsedDataSourcesCount=new(n())(0),this._collapsedDataSourcesTitle=new(n())(""),this._mainSeriesStatusWidget=null,this._dataSourcesStatusesWidgets=[],this._size=null,this._customLegendWidgetsFactoriesMap=new Map,this._customLegendWidgetsMap=new Map,this._margin=0,this._model=e,this._paneWidget=t,this._options=(0,a.merge)((0,a.clone)(qs),r),this._callbacks=d,this._mainSeriesViewModelsOptions={readOnlyMode:this._options.readOnlyMode,symbolMarkerEnabled:this._options.symbolMarkerEnabled},this._dataSourceViewModelsOptions={...this._mainSeriesViewModelsOptions,canShowSourceCode:this._options.canShowSourceCode},this._backgroundThemeName=i;const u=this._showLegendCalculatedProperty();this._isDataSourcesCollapsed=new(n())(u.value()),u.subscribe(this,(()=>{this._isDataSourcesCollapsed.setValue(u.value())}));const h=new(n())(this._getCustomTextColorValue()),c=this._model.model().properties().childs();c.scalesProperties.childs().textColor.subscribe(this,(()=>{h.setValue(this._getCustomTextColorValue())}));const _=c.paneProperties.childs().legendProperties.childs().showBackground,p=new(n())(_.value()) +;_.subscribe(this,(()=>{p.setValue(_.value())}));const m=c.paneProperties.childs().legendProperties.childs().backgroundTransparency,g=new(n())(m.value());m.subscribe(this,(()=>{g.setValue(m.value())})),this._hideNotMainSources=s,this._hideNotMainSources.subscribe(this._updateLegendVisibilities.bind(this)),this._hideAllExceptFirstLine=l,this._hideAllExceptFirstLine.subscribe(this._updateCollapsedSourcesMode.bind(this)),this._hideWholeLegend=o,this._hideWholeLegend.subscribe(this._updateLegendVisibilities.bind(this)),this._isPaneMain=new(n())(this._getIsPaneMainValue()),this._updateCollapsedSourcesModeThrottle=(0,$s.default)(this._updateCollapsedSourcesMode.bind(this),100),this._renderer=new F({withActions:!this._options.readOnlyMode,showToggleButton:this._options.showToggleButton,isStudiesLegendHidden:this._studiesLegendHidden.readonly(),isAllLegendHidden:this._allLegendHidden.readonly(),customTextColor:h.readonly(),themedColor:this._themedColor.readonly(),showBackground:p.readonly(),backgroundTransparency:g.readonly(),collapsedDataSourcesCount:this._collapsedDataSourcesCount.readonly(),collapsedDataSourcesTitle:this._collapsedDataSourcesTitle.readonly(),showLegendWidgetContextMenu:this.onShowLegendWidgetContextMenu.bind(this),hideAllExceptFirstLine:this._hideAllExceptFirstLine},{visibleDataSourceCount:this._visibleDataSourceCount.readonly(),isDataSourcesCollapsed:this._isDataSourcesCollapsed.readonly(),showObjectsTree:this._isPaneMain.readonly(),onCollapseDataSources:this.onCollapseDataSources.bind(this),onShowObjectsTreeDialog:this._callbacks.showObjectsTreeDialog})}destroy(){this._backgroundThemeName.destroy(),this._hideNotMainSources.destroy(),this._hideAllExceptFirstLine.destroy(),this._hideWholeLegend.destroy(),null!==this._mainSeriesViewModel&&this._destroyMainDataSource();for(const e of this._dataSourceViewModels)e.destroy();for(const e of this._dataSourcesStatusesWidgets)e.destroy();this._clearSubscriptions();for(const e of Array.from(this._customLegendWidgetsMap.keys()))this._destroyCustomWidgetFromLayerBlock(e);this._customLegendWidgetsMap.clear(),this._renderer.destroy(),delete this._renderer,this._showLegendCalculatedProperty().unsubscribeAll(this),this._showLegendOriginalProperty().unsubscribeAll(this);const e=this._model.model().properties().childs();e.scalesProperties.childs().textColor.unsubscribeAll(this),e.paneProperties.childs().legendProperties.childs().showBackground.unsubscribeAll(this),e.paneProperties.childs().legendProperties.childs().backgroundTransparency.unsubscribeAll(this)}addCustomWidgetToLegend(e,t){const i=this._customLegendWidgetsFactoriesMap.get(t.block)||new Map,s=i.get(t.position)||[];s.push(e),i.set(t.position,s),this._customLegendWidgetsFactoriesMap.set(t.block,i),this.updateLayout(),this._updateCustomWidgetModeBySize()}onShowLegendWidgetContextMenu(e,t){if(this._options.readOnlyMode||!Ys)return Promise.resolve();x("Show legend context menu");const i=new Map;for(const e of Array.from(this._customLegendWidgetsMap.keys())){const t=(0, +l.ensureDefined)(this._customLegendWidgetsMap.get(e)),s=new Map;for(const e of Array.from(t.keys())){const i=(0,l.ensureDefined)(t.get(e)),o=s.get(e)||[];for(const e of i)o.push(...e.contextMenuActions());s.set(e,o)}i.set(e,s)}return function(e,t,i,s,l,o){const n=[],a=s.get(0);if(void 0!==a){const e=a.get(1);void 0!==e&&e.length>0&&(n.push(...e),n.push(new Pe.Separator))}const r=e.model().properties().childs().paneProperties.childs().legendProperties.childs(),d=at&&e.model().symbolSources().some((e=>{var t;return void 0!==(null===(t=e.symbolInfo())||void 0===t?void 0:t.price_source_id)}));if(n.push(new Pe.Action({actionId:"Chart.Legend.ToggleSymbolVisibility",checkable:!0,checked:r.showSeriesTitle.value(),label:Ze,statName:"Show Symbol",onExecute:()=>Re(e,r.showSeriesTitle,Fe)})),t.showOpenMarketStatus&&"market"===e.mainSeries().marketStatusModel().status().value()&&!(0,Be.isEconomicSymbol)(e.mainSeries().symbolInfo())&&n.push(new Pe.Action({actionId:"Chart.Legend.ToggleOpenMarketStatusVisibility",checkable:!0,checked:ze.showMarketOpenStatusProperty.value(),label:Qe,statName:"Show Open market status",onExecute:()=>Re(e,ze.showMarketOpenStatusProperty,Ge)})),n.push(new Pe.Action({actionId:"Chart.Legend.ToggleOhlcValuesVisibility",checkable:!0,checked:r.showSeriesOHLC.value(),label:Je,statName:"Show OHLC Values",onExecute:()=>Re(e,r.showSeriesOHLC,Ue)})),n.push(new Pe.Action({actionId:"Chart.Legend.ToggleBarChangeValuesVisibility",checkable:!0,checked:r.showBarChange.value(),label:et,statName:"Show Bar Change Values",onExecute:()=>Re(e,r.showBarChange,je)})),n.push(new Pe.Action({actionId:"Chart.Legend.ToggleVolumeVisibility",checkable:!0,checked:r.showVolume.value(),label:tt,statName:"Show Volume",onExecute:()=>Re(e,r.showVolume,Ye)})),d&&n.push(new Pe.Action({actionId:"Chart.Legend.TogglePriceSourceVisibility",checkable:!0,checked:r.showPriceSource.value(),label:ot,statName:"Show Price Source",onExecute:()=>Re(e,r.showPriceSource,Xe)})),n.push(new Pe.Separator),void 0!==a){const e=a.get(0);void 0!==e&&e.length>0&&(n.push(...e),n.push(new Pe.Separator))}const u=s.get(1);if(void 0!==u){const e=u.get(1);void 0!==e&&e.length>0&&(n.push(...e),n.push(new Pe.Separator))}if(e.model().priceDataSources().some((e=>!(0,Ne.isActingAsSymbolSource)(e)&&e.showInObjectTree()))&&(n.push(new Pe.Action({actionId:"Chart.Legend.ToggleIndicatorTitlesVisibility",checkable:!0,checked:r.showStudyTitles.value(),label:it,statName:"Show Indicator Titles",onExecute:()=>Re(e,r.showStudyTitles,$e)})),n.push(new Pe.Action({actionId:"Chart.Legend.ToggleIndicatorArgumentsVisibility",checkable:!0,checked:r.showStudyArguments.value(),label:st,statName:"Show Indicator Arguments",onExecute:()=>Re(e,r.showStudyArguments,qe)})),n.push(new Pe.Action({actionId:"Chart.Legend.ToggleIndicatorValuesVisibility",checkable:!0,checked:r.showStudyValues.value(),label:lt,statName:"Show Indicator Values",onExecute:()=>Re(e,r.showStudyValues,Ke)}))),void 0!==u){const e=u.get(0);void 0!==e&&e.length>0&&(n.push(...e),n.push(new Pe.Separator))} +return t.settings&&(n[n.length-1]instanceof Pe.Separator||n.push(new Pe.Separator),n.push(new Pe.Action({actionId:"Chart.Dialogs.ShowGeneralSettings.LegendTab",label:nt,icon:Oe,statName:"Settings...",onExecute:()=>i(se.TabNames.legend)}))),De.ContextMenuManager.showMenu(n,l,void 0,{menuName:"LegendPropertiesContextMenu"},o)}(this._model,this._options.contextMenu,this._callbacks.showGeneralChartProperties,i,e,t)}onCollapseDataSources(){const e=this._showLegendOriginalProperty();e.setValue(!e.value())}updateLayout(){const e=this._paneWidget.state().sourcesByGroup().legendViewSources().filter((e=>null!==e.statusView()&&e.isDisplayedInLegend()));if(0===e.length)return;const t=this._model.mainSeries(),i=e.indexOf(t);i>-1?(e.splice(i,1),Ks||null!==this._mainSeriesViewModel||(this._mainSeriesViewModel=new _e(this._model,t,this._mainSeriesViewModelsOptions,this._callbacks,this._options.contextMenu),this._mainSeriesStatusWidget=new Us(t,this._model.model(),this._options.statusesWidgets),this._renderer.addMainDataSource(this._mainSeriesViewModel,this._mainSeriesStatusWidget)),this._addCustomWidgetForLayerBlock(0)):null!==this._mainSeriesViewModel&&(this._destroyMainDataSource(),this._destroyCustomWidgetFromLayerBlock(0));const s=[],o=[],n=this._dataSourceViewModels.length;if(0===n)for(let t=e.length-1;t>=0;t--){const i=e[t];s.push(new He(this._model,i,this._dataSourceViewModelsOptions,this._callbacks,this._options.contextMenu)),o.push(new Os(new Gs(i,this._model.model()),this._options.statusesWidgets))}else{let t=0;for(let i=e.length-1;i>=0;i--){const l=e[i];this._dataSourceViewModels[t]?(this._dataSourceViewModels[t].updateSource(l),this._dataSourcesStatusesWidgets[t].updateSource(new Gs(l,this._model.model()))):(s.push(new He(this._model,l,this._dataSourceViewModelsOptions,this._callbacks,this._options.contextMenu)),o.push(new Os(new Gs(e[i],this._model.model()),this._options.statusesWidgets))),t++}for(;this._dataSourceViewModels.length>t;)(0,l.ensureDefined)(this._dataSourceViewModels.pop()).destroy();for(;this._dataSourcesStatusesWidgets.length>t;)(0,l.ensureDefined)(this._dataSourcesStatusesWidgets.pop()).destroy()}0!==s.length&&(this._renderer.addDataSources(s,o),this._dataSourceViewModels.push(...s),this._dataSourcesStatusesWidgets.push(...o)),n!==this._dataSourceViewModels.length&&this._updateCollapsedSourcesMode(),this._dataSourceViewModels.length>0?this._addCustomWidgetForLayerBlock(1):this._destroyCustomWidgetFromLayerBlock(1),this._recreateSubscriptions(),this._isPaneMain.setValue(this._getIsPaneMainValue()),this.update(),this._updateWidgetModeByWidth()}update(){null!==this._mainSeriesViewModel&&this._mainSeriesViewModel.update();for(const e of this._dataSourceViewModels)e.update()}updateThemedColors(e){null===e&&(e=(0,js.getStdThemedValue)("chartProperties.paneProperties.background",this._backgroundThemeName.value())),this._themedColor.setValue(e||"")}firstTitle(){return this._renderer.firstTitle()}getElement(){return this._renderer.getElement()}addMargin(e){if(this._margin===e)return;this._margin=e +;this._renderer.getElement().style.maxWidth=0===this._margin?"":`calc(100% - ${this._margin+Xs}px)`,this._updateWidgetModeBySize()}updateWidgetModeBySize(e){this._size=e,this._updateWidgetModeBySize()}_updateWidgetModeBySize(){this._updateWidgetModeByWidth(),this._updateWidgetModeByHeight(),this._updateCustomWidgetModeBySize()}_updateWidgetModeByWidth(){if(null===this._size)return;const e=this._availableWidth();this._renderer.updateMode(e),this._paneWidget.hasState()&&this._paneWidget.state().containsMainSeries()&&this._model.mainSeries().setTextSourceIsAlwaysTickerRestrictionEnabled(e<=132)}_updateWidgetModeByHeight(){null!==this._size&&(this._availableHeight=.8*this._size.height,this._updateCollapsedSourcesModeThrottle())}_updateCustomWidgetModeBySize(){if(null===this._size)return;const e=(0,s.size)({width:this._availableWidth(),height:this._size.height});for(const t of Array.from(this._customLegendWidgetsMap.values()))for(const i of Array.from(t.values()))for(const t of i)t.updateWidgetModeBySize(e)}_destroyMainDataSource(){(0,l.ensureNotNull)(this._mainSeriesStatusWidget).destroy(),this._mainSeriesStatusWidget=null,(0,l.ensureNotNull)(this._mainSeriesViewModel).destroy(),this._mainSeriesViewModel=null}_updateCollapsedSourcesMode(){const e=this._dataSourceViewModels.length,t=this._hideAllExceptFirstLine.value();if(this._availableHeight>0&&e>2){const i=Number(this._renderer.getMainSourceHeight()),s=this._renderer.getDataSourceHeight(),l=this._getCustomWidgetsHeight();if(null!==s){const o=Math.floor((this._availableHeight-i-l)/s),n=Math.max(o,2)-1;if(e>n+1){let i="";for(let s=0;se.value())),t=this._hideNotMainSources.value()||e;this._studiesLegendHidden.setValue(t);const i=null===this._mainSeriesRowHidden||this._mainSeriesRowHidden.value(),s=this._customWidgetsVisibilities.some((e=>e.value()));this._allLegendHidden.setValue(e&&i&&!s)}_updateVisibleDataSourceCount(){const e=this._dataSourceRowsHidden.filter((e=>!e.value())).length;this._visibleDataSourceCount.setValue(e)}_setLegendVisibilityToggled(){0}_getIsPaneMainValue(){return this._paneWidget.containsMainSeries()}_showLegendCalculatedProperty(){return this._model.model().showLegend()}_showLegendOriginalProperty(){return this._model.model().properties().childs().paneProperties.childs().legendProperties.childs().showLegend}_addCustomWidgetForLayerBlock(e){const t=this._customLegendWidgetsFactoriesMap.get(e);if(void 0===t)return;const i=this._customLegendWidgetsMap.get(e)||new Map;let s=!1;for(const l of Array.from(t.keys())){const o=i.get(l)||[],n=t.get(l)||[];for(let t=o.length;t!e&&!t),this._hideNotMainSources,this._hideAllExceptFirstLine)),o.push(i),this._renderer.addCustomWidget(i,{block:e,position:l}),s=!0}s&&i.set(l,o)}s&&this._customLegendWidgetsMap.set(e,i)}_destroyCustomWidgetFromLayerBlock(e){const t=this._customLegendWidgetsMap.get(e);if(void 0!==t){for(const e of Array.from(t.values()))for(const t of e)t.destroy();t.clear(),this._customLegendWidgetsMap.delete(e)}}_availableWidth(){return null===this._size?0:this._size.width-this._margin-Xs}}},28756:(e,t,i)=>{"use strict";i.r(t),i.d(t,{PaneControlsWidget:()=>Z});var s=i(32563),l=i(51768),o=i(44352),n=i(68335),a=i(43074),r=i(89215),d=i(50151),u=i(24377),h=i(76289),c=i(78029),_=i(58064),p=i(62927);class m{constructor(e,t,i){this._parentEl=document.createElement("div"),this._listActionsWrapperEl=null,this._listActionsElements={},this._actionsSpawns={},this._onMouseEnterLeaveEventHandler=null,this._mouseOverWidget=!1,this._width=null,this._wrapEl=e,this._onMouseEnterLeaveEventHandler=this._onMouseEnterLeaveEvent.bind(this), +this._wrapEl.addEventListener("mouseenter",this._onMouseEnterLeaveEventHandler),this._wrapEl.addEventListener("mouseleave",this._onMouseEnterLeaveEventHandler),this._actions=t,this._globalVisibility=i.globalVisibility.spawn(),this._globalVisibility.subscribe(this._updatePaneControlsWidgetVisibility.bind(this)),this._visibilityType=i.visibilityType.spawn(),this._visibilityType.subscribe(this._updatePaneControlsWidgetVisibility.bind(this)),this._doNotSwitchToContextMenuMode=i.doNotSwitchToContextMenuMode,this._forceContextMenuMode=i.forceContextMenuMode.spawn(),this._forceContextMenuMode.subscribe(this._updateWidgetMode.bind(this)),this._themedColor=i.themedColor.spawn(),this._themedColor.subscribe(this._updateThemedColor.bind(this));for(const[e,t]of Object.entries(this._actions)){const i=e;this._actionsSpawns[i]={visible:t.visible.spawn(),title:void 0===t.title?null:t.title.spawn()},this._actionsSpawns[i].visible.subscribe(this._updateActionVisibilities.bind(this,i));const s=this._actionsSpawns[i].title;null!==s&&s.subscribe(this._updateActionTitle.bind(this,i))}this._render(),this._updatePaneControlsWidgetVisibility(),this._updateThemedColor(this._themedColor.value()),this._parentEl.classList.toggle(_.touchMode,h.trackingModeIsAvailable),this._parentEl.addEventListener("contextmenu",(e=>e.preventDefault()))}destroy(){this._visibilityType.destroy(),this._forceContextMenuMode.destroy(),this._themedColor.destroy();for(const e of Object.keys(this._actionsSpawns)){const t=e;this._actionsSpawns[t].visible.destroy();const i=this._actionsSpawns[t].title;null!==i&&i.destroy()}null!==this._onMouseEnterLeaveEventHandler&&(this._wrapEl.removeEventListener("mouseenter",this._onMouseEnterLeaveEventHandler),this._wrapEl.removeEventListener("mouseleave",this._onMouseEnterLeaveEventHandler),this._onMouseEnterLeaveEventHandler=null),this._parentEl.innerHTML="",delete this._parentEl}getElement(){return this._parentEl}bottomWithMargin(){const e=this._parentEl.classList.contains(_.touchMode)?Number(_.css_value_pane_controls_button_touch_size):Number(_.css_value_pane_controls_button_size);return 2*Number(_.css_value_pane_controls_margin_top)+e}updateWidgetModeByWidth(e){this._width=e,this._updateWidgetMode()}_updateWidgetMode(){if(null===this._width)return;const e=!this._doNotSwitchToContextMenuMode.value()&&this._width<356,t=!this._doNotSwitchToContextMenuMode.value()&&(this._forceContextMenuMode.value()||this._width<666.65),i=(0,d.ensureNotNull)(this._listActionsWrapperEl),s=(0,d.ensureNotNull)(this._listActionsElements.more);i.classList.toggle(p.blockHidden,e||t),s.classList.toggle(p.blockHidden,e||!t||!this._actions.more.visible.value())}_render(){this._renderActions(),this._parentEl.classList.add(_.paneControls),this._wrapEl.append(this._parentEl)}_renderActions(){null===this._listActionsWrapperEl&&(this._listActionsWrapperEl=document.createElement("div"),this._listActionsWrapperEl.classList.add(_.buttonsWrapper),this._parentEl.append(this._listActionsWrapperEl));const e=h.trackingModeIsAvailable?"large":"small" +;this._listActionsElements.up=(0,c.createActionElement)(this._actions.up,_.button,_.buttonIcon,p.blockHidden,e),this._listActionsElements.down=(0,c.createActionElement)(this._actions.down,_.button,_.buttonIcon,p.blockHidden,e),this._listActionsElements.collapse=(0,c.createActionElement)(this._actions.collapse,_.button,_.buttonIcon,p.blockHidden,e),this._listActionsElements.restore=(0,c.createActionElement)(this._actions.restore,_.button,_.buttonIcon,p.blockHidden,e),this._listActionsElements.close=(0,c.createActionElement)(this._actions.close,_.button,_.buttonIcon,p.blockHidden,e),this._listActionsElements.maximize=(0,c.createActionElement)(this._actions.maximize,_.button,_.buttonIcon,p.blockHidden,e),this._listActionsElements.minimize=(0,c.createActionElement)(this._actions.minimize,_.button,_.buttonIcon,p.blockHidden,e),this._listActionsWrapperEl.append(this._listActionsElements.up,this._listActionsElements.down,this._listActionsElements.close,this._listActionsElements.collapse,this._listActionsElements.restore,this._listActionsElements.maximize,this._listActionsElements.minimize),this._listActionsElements.more=(0,c.createActionElement)(this._actions.more,_.button,_.buttonIcon,p.blockHidden,e);for(const e of Object.keys(this._listActionsElements))(0,d.ensureNotNull)(this._listActionsElements[e]).classList.add(_.newButton);this._parentEl.append(this._listActionsElements.more)}_updateActionVisibilities(e,t){(0,d.ensureNotNull)(this._listActionsElements[e]).classList.toggle(p.blockHidden,!t)}_updateActionTitle(e,t){(0,d.ensureNotNull)(this._listActionsElements[e]).setAttribute("title",t)}_onMouseEnterLeaveEvent(e){this._mouseOverWidget="mouseenter"===e.type,"visibleOnMouseOver"===this._visibilityType.value()&&this._updatePaneControlsWidgetVisibility()}_updatePaneControlsWidgetVisibility(){let e,t=!1;switch(this._visibilityType.value()){case"alwaysOff":e=!1,t=!0;break;case"alwaysOn":e=this._globalVisibility.value();break;case"visibleOnMouseOver":e=this._globalVisibility.value()&&this._mouseOverWidget}this._parentEl.classList.toggle(_.hidden,!e),this._parentEl.classList.toggle(_.forceHidden,!this._globalVisibility.value()||t)}_updateThemedColor(e){if(e.length>0){const[t,i,s]=(0,u.parseRgb)(e);this._parentEl.style.color=(0,u.rgbaToString)([t,i,s,(0,u.normalizeAlphaComponent)(.8)])}else this._parentEl.style.removeProperty("color")}}var g=i(43986),v=i(60223),b=i(36016),w=i(72899),y=i(48344),S=i(99539),M=i(20465),f=i(34763);const C=o.t(null,void 0,i(68854)),E=C,k=(0,n.humanReadableModifiers)(n.Modifiers.Mod)+C;var V=i(40549),x=i.n(V),T=i(8840),W=i(61814),L=i(72237),A=i(81020),H=i(3515),P=i(79526),D=i(82847),B=i(7859),z=i(70471),I=i(71402),N=i(42930);const O=s.mobiletouch,R=o.t(null,void 0,i(83498)),F=o.t(null,void 0,i(70343)),G=o.t(null,void 0,i(39899)),U=o.t(null,void 0,i(19603)),j=o.t(null,void 0,i(91029)),$=o.t(null,void 0,i(39589)),q=o.t(null,void 0,i(35732)),K=o.t(null,void 0,i(68854)),Y=(0,W.hotKeySerialize)({keys:[""],text:K}),X=(0,W.hotKeySerialize)({keys:[(0,n.humanReadableModifiers)(n.Modifiers.Mod,!1)], +text:`{0} + ${K}`});class Z{constructor(e,t,i,s,l){this._actions={},this._moreCMShown=!1,this._themedColor=new(x())(""),this._connectedToBroker=new(x())(!1),this._isDestroyed=!1,this._model=e,this._paneWidget=t,this._callbacks=s,this._closeButtonVisibility=new(x())(this._getCloseButtonVisibility()),this._upButtonVisibility=new(x())(this._getUpButtonVisibility()),this._downButtonVisibility=new(x())(this._getDownButtonVisibility()),this._maximizeButtonVisibility=new(x())(this._getMaximizeButtonVisibility()),this._minimizeButtonVisibility=new(x())(this._getMinimizeButtonVisibility()),this._collapseButtonVisibility=new(x())(this._getCollapseButtonVisibility()),this._restoreButtonVisibility=new(x())(this._getRestoreButtonVisibility()),this._createActions(),this._visibilityTypeProperty=(0,a.actualBehavior)(),this._visibilityTypeProperty.subscribe(this,(e=>{this._visibilityType.setValue(e.value())})),this._visibilityType=new(x())(this._visibilityTypeProperty.value()),this._isPaneMaximize=new(x())(this._getIsPaneMaximizeValue()),this._isWidgetShow=new(x())(this._getIsWidgetShow()),this._backgroundThemeName=i.backgroundThemeName,this._renderer=new m(l,this._actions,{visibilityType:this._visibilityType.readonly(),globalVisibility:this._isWidgetShow.readonly(),doNotSwitchToContextMenuMode:this._isPaneMaximize.readonly(),forceContextMenuMode:this._connectedToBroker.readonly(),themedColor:this._themedColor.readonly()})}destroy(){this._visibilityTypeProperty.unsubscribeAll(this),this._renderer.destroy(),this._isDestroyed=!0}getElement(){return this._renderer.getElement()}bottomWithMargin(){return this._renderer.bottomWithMargin()}action(){return this._actions}update(){this._updateButtonsVisibility(),this._isPaneMaximize.setValue(this._getIsPaneMaximizeValue()),this._isWidgetShow.setValue(this._getIsWidgetShow())}updateWidgetModeByWidth(e){this._renderer.updateWidgetModeByWidth(e)}updateThemedColors(e){null===e&&(e=(0,T.getStdThemedValue)("chartProperties.paneProperties.background",this._backgroundThemeName.value())),this._themedColor.setValue(e||"")}async _subscribeOnConnectedToBroker(){const e=await waitTradingService();this._isDestroyed||(e.onConnectionStatusChange.subscribe(this,this._updateConnectedToBroker.bind(this)),this._updateConnectedToBroker(e.connectStatus()))}_updateConnectedToBroker(e){this._connectedToBroker.setValue(1===e)}_updateButtonsVisibility(){this._closeButtonVisibility.setValue(this._getCloseButtonVisibility()),this._upButtonVisibility.setValue(this._getUpButtonVisibility()),this._downButtonVisibility.setValue(this._getDownButtonVisibility()),this._maximizeButtonVisibility.setValue(this._getMaximizeButtonVisibility()),this._minimizeButtonVisibility.setValue(this._getMinimizeButtonVisibility()),this._collapseButtonVisibility.setValue(this._getCollapseButtonVisibility()),this._restoreButtonVisibility.setValue(this._getRestoreButtonVisibility())}_createActions(){this._actions.up={iconMap:new Map([["large",A],["small",A]]),action:this._onUpDownButton.bind(this,"up"),visible:this._upButtonVisibility, +title:new(x())(F),className:_.up,dataset:{name:"pane-button-up"}},this._actions.down={iconMap:new Map([["large",H],["small",H]]),action:this._onUpDownButton.bind(this,"down"),visible:this._downButtonVisibility,title:new(x())(G),className:_.down,dataset:{name:"pane-button-down"}},this._actions.close={iconMap:new Map([["large",L],["small",L]]),action:this._onCloseButton.bind(this),visible:this._closeButtonVisibility,title:new(x())(R),dataset:{name:"pane-button-close"}},this._actions.maximize={iconMap:new Map([["large",B],["small",P]]),action:this._onToggleMaximizeButton.bind(this,"Maximize pane"),visible:this._maximizeButtonVisibility,title:new(x())(U),hotKeyTitle:Y,className:_.maximize,dataset:{name:"pane-button-maximize"}},this._actions.minimize={iconMap:new Map([["large",B],["small",P]]),action:this._onToggleMaximizeButton.bind(this,"Minimize pane"),visible:this._minimizeButtonVisibility,title:new(x())(j),hotKeyTitle:Y,className:_.minimize,dataset:{name:"pane-button-minimize"}},this._actions.collapse={iconMap:new Map([["large",I],["small",I]]),action:this._onToggleCollapseButton.bind(this,"Collapse pane"),visible:this._collapseButtonVisibility,title:new(x())($),hotKeyTitle:X,className:_.collapse,dataset:{name:"pane-button-collapse"}},this._actions.restore={iconMap:new Map([["large",N],["small",N]]),action:this._onToggleCollapseButton.bind(this,"Restore pane"),visible:this._restoreButtonVisibility,title:new(x())(j),hotKeyTitle:X,className:_.restore,dataset:{name:"pane-button-restore"}},this._actions.more={iconMap:new Map([["large",z],["small",D]]),action:this._showButtonsInContextMenu.bind(this),visible:new(x())(!O),title:new(x())(q),dataset:{name:"pane-button-more"}}}_getCloseButtonVisibility(){const e=this._paneWidget.state();let t=!1;return e.containsMainSeries()||e.maximized().value()||O||(t=e.dataSources().some((e=>(0,r.isStudy)(e)))),t}_onCloseButton(){this._trackEvent("Delete pane");const e=this._model.model().panes().indexOf(this._paneWidget.state());this._model.removePane(e)}_getUpButtonVisibility(){const e=this._paneWidget.state();return this._model.model().panes().indexOf(e)>0&&!e.maximized().value()&&!O}_getDownButtonVisibility(){const e=this._paneWidget.state(),t=this._model.model().panes();return t.indexOf(e)1&&!e.maximized().value()&&!O}_getMinimizeButtonVisibility(){const e=this._paneWidget.state();return this._model.model().panes().length>1&&e.maximized().value()}_getCollapseButtonVisibility(){if(O)return!1;const e=this._paneWidget.state();return!e.maximized().value()&&!e.collapsed().value()&&this._model.model().paneCollapsingAvailable().value()}_getRestoreButtonVisibility(){const e=this._paneWidget.state();return!e.maximized().value()&&e.collapsed().value()}_onToggleMaximizeButton(e){ +this._trackEvent(e),this._callbacks.toggleMaximizePane(this._paneWidget)}_onToggleCollapseButton(e){this._trackEvent(e),this._callbacks.toggleCollapsedPane(this._paneWidget)}_showButtonsInContextMenu(e){e.preventDefault(),this._moreCMShown||function(e,t,i){const s=[];if(e.maximize.visible.value()){const t=(0,d.ensure)(e.maximize.title),i=(0,d.ensureNotNull)(e.maximize.action);s.push(new g.Action({actionId:"Chart.PaneControls.MaximizePane",icon:S,label:t.value(),statName:"Maximize Pane",shortcutHint:E,onExecute:()=>i()}))}else if(e.minimize.visible.value()){const t=(0,d.ensure)(e.minimize.title),i=(0,d.ensureNotNull)(e.minimize.action);s.push(new g.Action({actionId:"Chart.PaneControls.MinimizePane",icon:S,label:t.value(),statName:"Minimize Pane",shortcutHint:E,onExecute:()=>i()}))}if(e.collapse.visible.value()){const t=(0,d.ensure)(e.collapse.title),i=(0,d.ensureNotNull)(e.collapse.action);s.push(new g.Action({actionId:"Chart.PaneControls.CollapsePane",icon:M,label:t.value(),statName:"Collapse pane",shortcutHint:k,onExecute:()=>i()}))}if(e.restore.visible.value()){const t=(0,d.ensure)(e.restore.title),i=(0,d.ensureNotNull)(e.restore.action);s.push(new g.Action({actionId:"Chart.PaneControls.RestorePane",icon:f,label:t.value(),statName:"Restore pane",shortcutHint:k,onExecute:()=>i()}))}if(e.up.visible.value()){const t=(0,d.ensure)(e.up.title),i=(0,d.ensureNotNull)(e.up.action);s.push(new g.Action({actionId:"Chart.PaneControls.MovePaneUp",icon:w,label:t.value(),statName:"Move pane up",onExecute:()=>i()}))}if(e.down.visible.value()){const t=(0,d.ensure)(e.down.title),i=(0,d.ensureNotNull)(e.down.action);s.push(new g.Action({actionId:"Chart.PaneControls.MovePaneDown",icon:y,label:t.value(),statName:"Move pane down",onExecute:()=>i()}))}if(e.close.visible.value()){const t=(0,d.ensure)(e.close.title),i=(0,d.ensureNotNull)(e.close.action);s.push(new g.Action({actionId:"Chart.PaneControls.DeletePane",icon:b,label:t.value(),statName:"Delete pane",onExecute:()=>i()}))}const l=(0,d.ensureNotNull)(t.target).getBoundingClientRect();return v.ContextMenuManager.showMenu(s,{clientX:l.right,clientY:l.top+l.height+3,attachToXBy:"right"},void 0,void 0,i)}(this._actions,e,(()=>{this._moreCMShown=!1})).then((()=>{this._moreCMShown=!0}))}_getIsPaneMaximizeValue(){return this._paneWidget.state().maximized().value()}_getIsWidgetShow(){return this._model.model().panes().length>1}_trackEvent(e){(0,l.trackEvent)("GUI","Pane action",e)}}},78029:(e,t,i)=>{"use strict";i.d(t,{createActionElement:()=>l});var s=i(65665);function l(e,t,i,l,o){const n=document.createElement("div");n.className=t,n.classList.toggle(l,!e.visible.value()),Object.assign(n.dataset,e.dataset),void 0!==e.className&&n.classList.add(e.className),void 0!==e.title&&(n.classList.add("apply-common-tooltip"),n.setAttribute("title",e.title.value()),void 0!==e.hotKeyTitle&&(n.dataset.tooltipHotkey=e.hotKeyTitle)),n.addEventListener("touchend",e.action),n.addEventListener("mousedown",(t=>{0===t.button&&e.action(t)}));const a=document.createElement("div");a.classList.add(i) +;const r=e.iconMap.get(o)||"";return(0,s.isString)(r)?a.innerHTML=r:a.appendChild(r),n.appendChild(a),n}},76289:(e,t,i)=>{"use strict";i.d(t,{trackingModeIsAvailable:()=>s});const s=i(49483).CheckMobile.any()},52506:e=>{e.exports=''},88658:e=>{e.exports=''},41674:e=>{e.exports=''},3792:e=>{ e.exports='' },45534:e=>{e.exports=''},87258:e=>{e.exports=''},36885:e=>{e.exports=''},65300:e=>{e.exports=''},34882:e=>{e.exports=''},83637:e=>{ e.exports=''},72237:e=>{e.exports=''},71402:e=>{e.exports=''},36016:e=>{e.exports=''},20465:e=>{e.exports=''},48344:e=>{e.exports=''},99539:e=>{e.exports=''},34763:e=>{ diff --git a/charting_library/bundles/cs.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/cs.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 091cc3f6..00000000 --- a/charting_library/bundles/cs.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports="bars"},19648:e=>{e.exports="12-hours"},55838:e=>{e.exports="24-hours"},88364:e=>{e.exports="Chart basic styles"},46720:e=>{e.exports=["Nitkový kříž"]},50985:e=>{e.exports=["Měna"]},17319:e=>{e.exports="Currency and Unit"},19481:e=>{e.exports="Appearance"},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports="Average close price"},27331:e=>{e.exports=["Pozadí"]},22519:e=>{e.exports=["Bar Change Values"]},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports=["Date Format"]},55090:e=>{e.exports="Day of week on labels"},29601:e=>{e.exports=["Popis"]},26897:e=>{e.exports=["Akce"]},95338:e=>{e.exports=["Horz Grid Lines"]},60971:e=>{e.exports="High and low price"},61142:e=>{e.exports=["Indikátory"]},34905:e=>{e.exports="Indicators value"},29687:e=>{e.exports="Indicators and financials value"},25084:e=>{e.exports="Indicators and financials name"},9654:e=>{e.exports="Indicators name"},99487:e=>{e.exports=["OHLC Values"]},75991:e=>{e.exports="Open market status"},70500:e=>{e.exports="Money"},66653:e=>{e.exports="Margins"},42502:e=>{e.exports="No overlapping"},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports=["Stupnice"]},53224:e=>{e.exports="Scales placement"},79194:e=>{e.exports="Status line"},89053:e=>{e.exports="Symbol"},35383:e=>{e.exports=["Symbol Name"]},27767:e=>{e.exports="Symbol last price"},40847:e=>{e.exports="Symbol previous day close price"},50446:e=>{e.exports="Pane"},73908:e=>{e.exports="Pane separators"},36014:e=>{e.exports=["Procenta"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports="Pre/post market price"},64859:e=>{e.exports="Price Scale"},76523:e=>{e.exports="Price and percentage value"},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Vodoznak"]},67369:e=>{e.exports="Title"},31326:e=>{e.exports="Titles"},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports="Ticker and description"},43637:e=>{e.exports="Time Scale"},97316:e=>{e.exports="Time hours format"},90801:e=>{e.exports="Trading"},77534:e=>{e.exports="Unit"},1111:e=>{e.exports=["Objem"]},80170:e=>{e.exports="Value according to scale"},91322:e=>{e.exports="Values"},70353:e=>{e.exports=["Vert Grid Lines"]},57889:e=>{e.exports="change OHLC values visibility"},35646:e=>{e.exports="change navigation buttons visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},10349:e=>{e.exports="change bottom margin"},88161:e=>{e.exports="change currency and unit labels visibility"},79570:e=>{e.exports="change currency label visibility"},99011:e=>{e.exports="change chart background color"},72458:e=>{e.exports="change chart background type"},37034:e=>{e.exports="change crosshair width"},29951:e=>{e.exports="change crosshair color"},92027:e=>{e.exports="change crosshair style"},50457:e=>{e.exports="change date format"},7104:e=>{e.exports="change day of week on labels"},88096:e=>{e.exports="change horz grid lines color"},2523:e=>{e.exports="change horz grid lines style"},31325:e=>{ -e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},59820:e=>{e.exports="change indicators and financials name labels visibility"},90512:e=>{e.exports="change indicators and financials value labels visibility"},97956:e=>{e.exports="change legend background transparency"},61061:e=>{e.exports="change legend background visibility"},37730:e=>{e.exports="change pane buttons visibility"},89032:e=>{e.exports="change pane separators color"},35636:e=>{e.exports="change right margin"},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports="change symbol watermark color"},87159:e=>{e.exports="change symbol watermark visibility"},26717:e=>{e.exports="change symbol description visibility"},28741:e=>{e.exports="change symbol last value mode"},95071:e=>{e.exports="change symbol legend format"},35065:e=>{e.exports="change scales text color"},84382:e=>{e.exports="change scales font size"},12468:e=>{e.exports="change scales lines color"},71589:e=>{e.exports="change sessions breaks visibility"},15035:e=>{e.exports="change sessions breaks width"},1579:e=>{e.exports="change sessions breaks color"},21460:e=>{e.exports="change sessions breaks style"},76991:e=>{e.exports="change time hours format"},98905:e=>{e.exports="change top margin"},7011:e=>{e.exports="change unit label visibility"},22722:e=>{e.exports="change vert grid lines color"},22867:e=>{e.exports="change vert grid lines style"},9455:e=>{e.exports="change volume values visibility"}}]); \ No newline at end of file diff --git a/charting_library/bundles/cs.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/cs.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..65ee27e3 --- /dev/null +++ b/charting_library/bundles/cs.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports="bars"},19648:e=>{e.exports="12-hours"},55838:e=>{e.exports="24-hours"},88364:e=>{e.exports="Chart basic styles"},46720:e=>{e.exports=["Nitkový kříž"]},50985:e=>{e.exports=["Měna"]},17319:e=>{e.exports="Currency and Unit"},19481:e=>{e.exports="Appearance"},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports="Average close price"},27331:e=>{e.exports=["Pozadí"]},22519:e=>{e.exports=["Bar Change Values"]},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports=["Date Format"]},55090:e=>{e.exports="Day of week on labels"},29601:e=>{e.exports=["Popis"]},26897:e=>{e.exports=["Akce"]},95338:e=>{e.exports=["Horz Grid Lines"]},60971:e=>{e.exports="High and low price"},61142:e=>{e.exports=["Indikátory"]},34905:e=>{e.exports="Indicators value"},29687:e=>{e.exports="Indicators and financials value"},25084:e=>{e.exports="Indicators and financials name"},9654:e=>{e.exports="Indicators name"},99487:e=>{e.exports=["OHLC Values"]},75991:e=>{e.exports="Open market status"},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports="Money"},66653:e=>{e.exports="Margins"},42502:e=>{e.exports="No overlapping"},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports=["Stupnice"]},53224:e=>{e.exports="Scales placement"},79194:e=>{e.exports="Status line"},89053:e=>{e.exports="Symbol"},35383:e=>{e.exports=["Symbol Name"]},27767:e=>{e.exports="Symbol last price"},40847:e=>{e.exports="Symbol previous day close price"},50446:e=>{e.exports="Pane"},73908:e=>{e.exports="Pane separators"},36014:e=>{e.exports=["Procenta"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports="Pre/post market price"},64859:e=>{e.exports="Price Scale"},76523:e=>{e.exports="Price and percentage value"},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Vodoznak"]},67369:e=>{e.exports="Title"},31326:e=>{e.exports="Titles"},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports="Ticker and description"},43637:e=>{e.exports="Time Scale"},97316:e=>{e.exports="Time hours format"},90801:e=>{e.exports="Trading"},77534:e=>{e.exports="Unit"},1111:e=>{e.exports=["Objem"]},80170:e=>{e.exports="Value according to scale"},91322:e=>{e.exports="Values"},70353:e=>{e.exports=["Vert Grid Lines"]},57889:e=>{e.exports="change OHLC values visibility"},35646:e=>{e.exports="change navigation buttons visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},10349:e=>{e.exports="change bottom margin"},88161:e=>{e.exports="change currency and unit labels visibility"},79570:e=>{e.exports="change currency label visibility"},99011:e=>{e.exports="change chart background color"},72458:e=>{e.exports="change chart background type"},37034:e=>{e.exports="change crosshair width"},29951:e=>{e.exports="change crosshair color"},92027:e=>{e.exports="change crosshair style"},50457:e=>{e.exports="change date format"},7104:e=>{e.exports="change day of week on labels"},88096:e=>{e.exports="change horz grid lines color"},2523:e=>{ +e.exports="change horz grid lines style"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},59820:e=>{e.exports="change indicators and financials name labels visibility"},90512:e=>{e.exports="change indicators and financials value labels visibility"},97956:e=>{e.exports="change legend background transparency"},61061:e=>{e.exports="change legend background visibility"},37730:e=>{e.exports="change pane buttons visibility"},89032:e=>{e.exports="change pane separators color"},35636:e=>{e.exports="change right margin"},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports="change symbol watermark color"},87159:e=>{e.exports="change symbol watermark visibility"},26717:e=>{e.exports="change symbol description visibility"},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports="change symbol last value mode"},95071:e=>{e.exports="change symbol legend format"},35065:e=>{e.exports="change scales text color"},84382:e=>{e.exports="change scales font size"},12468:e=>{e.exports="change scales lines color"},71589:e=>{e.exports="change sessions breaks visibility"},15035:e=>{e.exports="change sessions breaks width"},1579:e=>{e.exports="change sessions breaks color"},21460:e=>{e.exports="change sessions breaks style"},76991:e=>{e.exports="change time hours format"},98905:e=>{e.exports="change top margin"},7011:e=>{e.exports="change unit label visibility"},22722:e=>{e.exports="change vert grid lines color"},22867:e=>{e.exports="change vert grid lines style"},9455:e=>{e.exports="change volume values visibility"}}]); \ No newline at end of file diff --git a/charting_library/bundles/cs.6847.490ee46270bef6a878dd.js b/charting_library/bundles/cs.7257.089fbbc28bead9558b87.js similarity index 55% rename from charting_library/bundles/cs.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/cs.7257.089fbbc28bead9558b87.js index 23ac9e6d..36bdff6d 100644 --- a/charting_library/bundles/cs.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/cs.7257.089fbbc28bead9558b87.js @@ -1,2 +1,2 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports="Could not get Pine source code."},39589:e=>{e.exports="Collapse pane"},38154:e=>{e.exports="Confirm Remove Study Tree"},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports="Create a free account"},69419:e=>{e.exports="All's well — Market is open."},97637:e=>{e.exports="April"},86797:e=>{e.exports="August"},22519:e=>{e.exports=["Bar Change Values"]},52003:e=>{e.exports="Do you really want to delete study and all of it's children?"},68854:e=>{e.exports="Double click"},97325:e=>{e.exports="Data error"},52916:e=>{e.exports="Data is updated once a day."},25978:e=>{e.exports="Data is updated once per second, even if there are more updates on the market."},57310:e=>{e.exports="Data is delayed"},49321:e=>{e.exports="Data on our Basic plan is updated once per second, even if there are more updates on the market."},55669:e=>{e.exports="December"},83498:e=>{e.exports="Delete pane"},59315:e=>{e.exports="End of day data"},82751:e=>{e.exports=["Chyba"]},40519:e=>{e.exports="Evening. Market is open for post-market trading."},80227:e=>{e.exports="Exchange timezone"},16467:e=>{e.exports="February"},25046:e=>{e.exports="Fill out Exchange Agreements"},93666:e=>{e.exports="Flag Symbol"},564:e=>{e.exports="Fri"},72970:e=>{e.exports="Friday"},88958:e=>{e.exports="Holiday"},21686:e=>{e.exports="Hide Indicator Legend"},26935:e=>{e.exports=["Indicator Arguments"]},26315:e=>{e.exports=["Indicator Titles"]},84098:e=>{e.exports=["Indicator Values"]},91459:e=>{e.exports="If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"},50634:e=>{e.exports="It'll go to post-market trading in {remainingTime}."},74537:e=>{e.exports="It'll open for pre-market trading in {remainingTime}."},26910:e=>{e.exports="January"},23230:e=>{e.exports="July"},49385:e=>{e.exports="June"},99487:e=>{e.exports=["OHLC Values"]},15815:e=>{e.exports="One update per second"},90784:e=>{e.exports="October"},75991:e=>{e.exports="Open market status"},18429:e=>{e.exports=["Přečtěte si více"]},39899:e=>{e.exports="Move pane down"},70343:e=>{e.exports="Move pane up"},83085:e=>{e.exports="Mon"},61199:e=>{e.exports="Monday"},41610:e=>{e.exports=["Více"]},1653:e=>{e.exports="Morning. Market is open for pre-market trading."},56470:e=>{e.exports="Maximize chart"},19603:e=>{e.exports="Maximize pane"},68327:e=>{e.exports=["Květen"]},35732:e=>{e.exports="Manage panes"},84675:e=>{e.exports="March"},83949:e=>{e.exports="Market open"},35701:e=>{e.exports="Market opens in {remainingTime}."},95814:e=>{e.exports="Market closed"},98105:e=>{e.exports="Market closes in {remainingTime}."},87202:e=>{e.exports="Market is currently on holiday. Lucky them."},71194:e=>{e.exports="November"},66324:e=>{e.exports="Source code"},36835:e=>{e.exports="Sat"}, -1144:e=>{e.exports="Saturday"},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports="September"},28705:e=>{e.exports="Show Indicator Legend"},51072:e=>{e.exports="Show Object Tree"},37809:e=>{e.exports="Show interval settings"},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports="Sun"},72149:e=>{e.exports="Sunday"},39339:e=>{e.exports="Symbol title"},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports="Paid plans feature faster data updates."},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports="Real-time data for {description} is not supported right now. We may support it in the future."},6667:e=>{e.exports="Real-time data for {symbolName} is provided by {exchange} exchange."},48293:e=>{e.exports="Restore chart"},91029:e=>{e.exports="Restore pane"},75094:e=>{e.exports="Wed"},7147:e=>{e.exports="Wednesday"},52984:e=>{e.exports="To get real-time data for {description}, please buy the real-time data package."},9787:e=>{e.exports="Thu"},7951:e=>{e.exports="Thursday"},57918:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges."},68025:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}."},73717:e=>{e.exports="This symbol doesn't exist, please pick another one."},57048:e=>{e.exports="Time for a walk — this market is closed."},94316:e=>{e.exports="Tue"},44979:e=>{e.exports="Tuesday"},8209:e=>{e.exports="Unflag Symbol"},1111:e=>{e.exports=["Objem"]},61311:e=>{e.exports=["Přiblížit"]},47602:e=>{e.exports=["Oddálit"]},57889:e=>{e.exports="change OHLC values visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},26717:e=>{e.exports="change symbol description visibility"},9455:e=>{e.exports="change volume values visibility"},39348:e=>{e.exports="less than 1 minute"},87358:e=>{e.exports="show {title}"},7827:e=>{e.exports="{days} and {hours}"},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports="{hours} and {minutes}"},1084:e=>{e.exports="{listedExchange} real-time data is available for free to registered users."},11155:e=>{e.exports="{symbolName} data is delayed by {time} minutes."},77033:e=>{e.exports="Data is updated once every {amount} second, even if there are more updates on the market."},2121:e=>{e.exports="Data on our Basic plan is updated once every {amount} second, even if there are more updates on the market."},5223:e=>{e.exports="One update every {amount} second"},58609:e=>{e.exports="{number} day"},24430:e=>{e.exports="{number} hour"},67151:e=>{e.exports="{number} minute"}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports="Could not get Pine source code."},39589:e=>{e.exports="Collapse pane"},38154:e=>{e.exports="Confirm Remove Study Tree"},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports="Create a free account"},69419:e=>{e.exports="All's well — Market is open."},97637:e=>{e.exports="April"},86797:e=>{e.exports="August"},22519:e=>{e.exports=["Bar Change Values"]},52003:e=>{e.exports="Do you really want to delete study and all of it's children?"},68854:e=>{e.exports="Double click"},97325:e=>{e.exports="Data error"},52916:e=>{e.exports="Data is updated once a day."},25978:e=>{e.exports="Data is updated once per second, even if there are more updates on the market."},57310:e=>{e.exports="Data is delayed"},49321:e=>{e.exports="Data on our Basic plan is updated once per second, even if there are more updates on the market."},55669:e=>{e.exports="December"},83498:e=>{e.exports="Delete pane"},59315:e=>{e.exports="End of day data"},82751:e=>{e.exports=["Chyba"]},40519:e=>{e.exports="Evening. Market is open for post-market trading."},80227:e=>{e.exports="Exchange timezone"},16467:e=>{e.exports="February"},25046:e=>{e.exports="Fill out Exchange Agreements"},93666:e=>{e.exports="Flag Symbol"},564:e=>{e.exports="Fri"},72970:e=>{e.exports="Friday"},88958:e=>{e.exports="Holiday"},21686:e=>{e.exports="Hide Indicator Legend"},26935:e=>{e.exports=["Indicator Arguments"]},26315:e=>{e.exports=["Indicator Titles"]},84098:e=>{e.exports=["Indicator Values"]},91459:e=>{e.exports="If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"},50634:e=>{e.exports="It'll go to post-market trading in {remainingTime}."},74537:e=>{e.exports="It'll open for pre-market trading in {remainingTime}."},26910:e=>{e.exports="January"},23230:e=>{e.exports="July"},49385:e=>{e.exports="June"},99487:e=>{e.exports=["OHLC Values"]},15815:e=>{e.exports="One update per second"},90784:e=>{e.exports="October"},75991:e=>{e.exports="Open market status"},18429:e=>{e.exports=["Přečtěte si více"]},39899:e=>{e.exports="Move pane down"},70343:e=>{e.exports="Move pane up"},83085:e=>{e.exports="Mon"},61199:e=>{e.exports="Monday"},41610:e=>{e.exports=["Více"]},1653:e=>{e.exports="Morning. Market is open for pre-market trading."},56470:e=>{e.exports="Maximize chart"},19603:e=>{e.exports="Maximize pane"},68327:e=>{e.exports=["Květen"]},35732:e=>{e.exports="Manage panes"},84675:e=>{e.exports="March"},83949:e=>{e.exports="Market open"},35701:e=>{e.exports="Market opens in {remainingTime}."},95814:e=>{e.exports="Market closed"},98105:e=>{e.exports="Market closes in {remainingTime}."},87202:e=>{e.exports="Market is currently on holiday. Lucky them."},71194:e=>{e.exports="November"},66324:e=>{e.exports="Source code"},36835:e=>{e.exports="Sat"}, +1144:e=>{e.exports="Saturday"},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports="September"},28705:e=>{e.exports="Show Indicator Legend"},51072:e=>{e.exports="Show Object Tree"},37809:e=>{e.exports="Show interval settings"},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports="Sun"},72149:e=>{e.exports="Sunday"},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports="Symbol title"},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports="Paid plans feature faster data updates."},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports="Real-time data for {description} is not supported right now. We may support it in the future."},6667:e=>{e.exports="Real-time data for {symbolName} is provided by {exchange} exchange."},48293:e=>{e.exports="Restore chart"},91029:e=>{e.exports="Restore pane"},75094:e=>{e.exports="Wed"},7147:e=>{e.exports="Wednesday"},52984:e=>{e.exports="To get real-time data for {description}, please buy the real-time data package."},9787:e=>{e.exports="Thu"},7951:e=>{e.exports="Thursday"},57918:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges."},68025:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}."},73717:e=>{e.exports="This symbol doesn't exist, please pick another one."},57048:e=>{e.exports="Time for a walk — this market is closed."},94316:e=>{e.exports="Tue"},44979:e=>{e.exports="Tuesday"},8209:e=>{e.exports="Unflag Symbol"},1111:e=>{e.exports=["Objem"]},61311:e=>{e.exports=["Přiblížit"]},47602:e=>{e.exports=["Oddálit"]},57889:e=>{e.exports="change OHLC values visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},26717:e=>{e.exports="change symbol description visibility"},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports="change volume values visibility"},39348:e=>{e.exports="less than 1 minute"},87358:e=>{e.exports="show {title}"},7827:e=>{e.exports="{days} and {hours}"},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports="{hours} and {minutes}"},1084:e=>{e.exports="{listedExchange} real-time data is available for free to registered users."},11155:e=>{e.exports="{symbolName} data is delayed by {time} minutes."},77033:e=>{e.exports="Data is updated once every {amount} second, even if there are more updates on the market."},2121:e=>{e.exports="Data on our Basic plan is updated once every {amount} second, even if there are more updates on the market."},5223:e=>{e.exports="One update every {amount} second"},58609:e=>{e.exports="{number} day"},24430:e=>{e.exports="{number} hour"},67151:e=>{e.exports="{number} minute"}}]); \ No newline at end of file diff --git a/charting_library/bundles/de.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/de.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 70a92623..00000000 --- a/charting_library/bundles/de.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports=["Balken"]},19648:e=>{e.exports=["12-Stunden"]},55838:e=>{e.exports=["24-Stunden"]},88364:e=>{e.exports=["Grundtypen von Charts"]},46720:e=>{e.exports=["Fadenkreuz"]},50985:e=>{e.exports=["Währung"]},17319:e=>{e.exports=["Währung und Einheit"]},19481:e=>{e.exports=["Erscheinung"]},68791:e=>{e.exports=["Argumente"]},95036:e=>{e.exports=["Durchschnittlicher Schlusskurs"]},27331:e=>{e.exports=["Hintergrund"]},22519:e=>{e.exports=["Balken Änderungswerte"]},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports=["Datumsformat"]},55090:e=>{e.exports=["Wochentag auf den Labels"]},29601:e=>{e.exports=["Beschreibung"]},26897:e=>{e.exports=["Ereignisse"]},95338:e=>{e.exports=["Horizontale Gitterlinien"]},60971:e=>{e.exports=["Höchst- und Tiefstpreis"]},61142:e=>{e.exports=["Indikatoren"]},34905:e=>{e.exports=["Wert der Indikatoren"]},29687:e=>{e.exports=["Indikatoren und Finanzdaten"]},25084:e=>{e.exports=["Bezeichnung der Indikatoren und Finanzdaten"]},9654:e=>{e.exports=["Name des Indikators"]},99487:e=>{e.exports=["OHLC Werte"]},75991:e=>{e.exports=["Markt-Öffnungs-Status anzeigen"]},70500:e=>{e.exports=["Kapital"]},66653:e=>{e.exports="Margins"},42502:e=>{e.exports=["Keine Überschneidungen"]},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports=["Skalierungen"]},53224:e=>{e.exports=["Skalen Platzierung"]},79194:e=>{e.exports=["Status Zeile"]},89053:e=>{e.exports="Symbol"},35383:e=>{e.exports=["Symbolname"]},27767:e=>{e.exports=["Symbol letzter Preis"]},40847:e=>{e.exports=["Symbol Schlusskurs des Vortages"]},50446:e=>{e.exports=["Bereich"]},73908:e=>{e.exports=["Trennstreifen zwischen den Fenstern"]},36014:e=>{e.exports=["Prozentsatz"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports=["Preis vor/nach dem Handelstag"]},64859:e=>{e.exports=["Preis-Skala"]},76523:e=>{e.exports=["Preis und Prozentwert"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Wasserzeichen"]},67369:e=>{e.exports=["Titel"]},31326:e=>{e.exports=["Titel"]},23097:e=>{e.exports=["Ticker, Name"]},82168:e=>{e.exports=["Ticker und Beschreibung"]},43637:e=>{e.exports=["Zeit-Skala"]},97316:e=>{e.exports=["Format der Uhrzeit"]},90801:e=>{e.exports="Trading"},77534:e=>{e.exports=["Einheit"]},1111:e=>{e.exports=["Volumen"]},80170:e=>{e.exports=["Wert laut Skala"]},91322:e=>{e.exports=["Werte"]},70353:e=>{e.exports=["Vertikale Gitterlinien"]},57889:e=>{e.exports=["Sichtbarkeit der OHLC-Werte ändern"]},35646:e=>{e.exports=["Sichtbarkeit der Navigationsschaltflächen ändern"]},18644:e=>{e.exports=["Sichtbarkeit des Marktstatus ändern"]},45110:e=>{e.exports=["Sichtbarkeit des Countdowns bei Balkenschluss ändern"]},10349:e=>{e.exports=["unteren Rand ändern"]},88161:e=>{e.exports=["Sichtbarkeit von Währungs- und Einheitenbeschriftungen ändern"]},79570:e=>{e.exports=["Sichtbarkeit des Währungslabels ändern"]},99011:e=>{e.exports=["Hintergrundfarbe der Chart ändern"]},72458:e=>{e.exports=["Chart-Hintergrundtyp ändern"]},37034:e=>{e.exports=["Fadenkreuzbreite ändern"]}, -29951:e=>{e.exports=["Farbe des Fadenkreuzes ändern"]},92027:e=>{e.exports=["Fadenkreuzstil ändern"]},50457:e=>{e.exports=["Datumsformat ändern"]},7104:e=>{e.exports=["Wochentag auf den Labels ändern"]},88096:e=>{e.exports=["Farbe der horizontalen Gitterlinien ändern"]},2523:e=>{e.exports=["Stil der horizontalen Gitterlinien ändern"]},31325:e=>{e.exports=["Sichtbarkeit der Indikatortitel ändern"]},99774:e=>{e.exports=["Sichtbarkeit der Indikatorwerte ändern"]},96162:e=>{e.exports=["Sichtbarkeit der Indikatorargumente ändern"]},59820:e=>{e.exports=["Sichtbarkeit von Indikatoren- und Finanzdaten-Labels ändern"]},90512:e=>{e.exports=["Ändert die Sichtbarkeit des Labels für Werte der Indikatoren und Finanzkennzahlen"]},97956:e=>{e.exports=["Hintergrundtransparenz der Legende ändern"]},61061:e=>{e.exports=["Hintergrundsichtbarkeit der Legende ändern"]},37730:e=>{e.exports=["Sichtbarkeit der Schaltflächen des Fensters ändern"]},89032:e=>{e.exports=["Farbe der Trennstreifen im Fenster ändern"]},35636:e=>{e.exports=["unteren Rand ändern"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["Farbe des Symbol-Wasserzeichens ändern"]},87159:e=>{e.exports=["Sichtbarkeit des Symbolwasserzeichens ändern"]},26717:e=>{e.exports=["Sichtbarkeit der Symbolbeschreibung ändern"]},28741:e=>{e.exports=["Anzeigemodus des letzten Wertes ändern"]},95071:e=>{e.exports=["Format der Symbollegende ändern"]},35065:e=>{e.exports=["Textfarbe der Skalen ändern"]},84382:e=>{e.exports=["Schriftgröße der Skalen ändern"]},12468:e=>{e.exports=["Farbe der Skalenlinien ändern"]},71589:e=>{e.exports=["Sichtbarkeit der Session-Übergänge ändern"]},15035:e=>{e.exports=["Linienbreite der Sitzungs-Übergänge ändern"]},1579:e=>{e.exports=["Farbe der Sitzungs-Übergänge ändern"]},21460:e=>{e.exports=["Stil der Session-Übergänge ändern"]},76991:e=>{e.exports=["Format der Uhrzeit ändern"]},98905:e=>{e.exports=["oberen Rand ändern"]},7011:e=>{e.exports=["Sichtbarkeit des Einheitenlabels ändern"]},22722:e=>{e.exports=["Farbe der vertikalen Gitterlinien ändern"]},22867:e=>{e.exports=["Stil der vertikalen Gitterlinien ändern"]},9455:e=>{e.exports=["Sichtbarkeit der Volumenwerte ändern"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/de.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/de.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..c3200679 --- /dev/null +++ b/charting_library/bundles/de.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports=["Balken"]},19648:e=>{e.exports=["12-Stunden"]},55838:e=>{e.exports=["24-Stunden"]},88364:e=>{e.exports=["Grundtypen von Charts"]},46720:e=>{e.exports=["Fadenkreuz"]},50985:e=>{e.exports=["Währung"]},17319:e=>{e.exports=["Währung und Einheit"]},19481:e=>{e.exports=["Erscheinung"]},68791:e=>{e.exports=["Argumente"]},95036:e=>{e.exports=["Durchschnittlicher Schlusskurs"]},27331:e=>{e.exports=["Hintergrund"]},22519:e=>{e.exports=["Balken Änderungswerte"]},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports=["Datumsformat"]},55090:e=>{e.exports=["Wochentag auf den Labels"]},29601:e=>{e.exports=["Beschreibung"]},26897:e=>{e.exports=["Ereignisse"]},95338:e=>{e.exports=["Horizontale Gitterlinien"]},60971:e=>{e.exports=["Höchst- und Tiefstpreis"]},61142:e=>{e.exports=["Indikatoren"]},34905:e=>{e.exports=["Wert der Indikatoren"]},29687:e=>{e.exports=["Indikatoren und Finanzdaten"]},25084:e=>{e.exports=["Bezeichnung der Indikatoren und Finanzdaten"]},9654:e=>{e.exports=["Name des Indikators"]},99487:e=>{e.exports=["OHLC Werte"]},75991:e=>{e.exports=["Markt-Öffnungs-Status anzeigen"]},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports=["Kapital"]},66653:e=>{e.exports="Margins"},42502:e=>{e.exports=["Keine Überschneidungen"]},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports=["Skalierungen"]},53224:e=>{e.exports=["Skalen Platzierung"]},79194:e=>{e.exports=["Status Zeile"]},89053:e=>{e.exports="Symbol"},35383:e=>{e.exports=["Symbolname"]},27767:e=>{e.exports=["Symbol letzter Preis"]},40847:e=>{e.exports=["Symbol Schlusskurs des Vortages"]},50446:e=>{e.exports=["Bereich"]},73908:e=>{e.exports=["Trennstreifen zwischen den Fenstern"]},36014:e=>{e.exports=["Prozentsatz"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports=["Preis vor/nach dem Handelstag"]},64859:e=>{e.exports=["Preis-Skala"]},76523:e=>{e.exports=["Preis und Prozentwert"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Wasserzeichen"]},67369:e=>{e.exports=["Titel"]},31326:e=>{e.exports=["Titel"]},23097:e=>{e.exports=["Ticker, Name"]},82168:e=>{e.exports=["Ticker und Beschreibung"]},43637:e=>{e.exports=["Zeit-Skala"]},97316:e=>{e.exports=["Format der Uhrzeit"]},90801:e=>{e.exports="Trading"},77534:e=>{e.exports=["Einheit"]},1111:e=>{e.exports=["Volumen"]},80170:e=>{e.exports=["Wert laut Skala"]},91322:e=>{e.exports=["Werte"]},70353:e=>{e.exports=["Vertikale Gitterlinien"]},57889:e=>{e.exports=["Sichtbarkeit der OHLC-Werte ändern"]},35646:e=>{e.exports=["Sichtbarkeit der Navigationsschaltflächen ändern"]},18644:e=>{e.exports=["Sichtbarkeit des Marktstatus ändern"]},45110:e=>{e.exports=["Sichtbarkeit des Countdowns bei Balkenschluss ändern"]},10349:e=>{e.exports=["unteren Rand ändern"]},88161:e=>{e.exports=["Sichtbarkeit von Währungs- und Einheitenbeschriftungen ändern"]},79570:e=>{e.exports=["Sichtbarkeit des Währungslabels ändern"]},99011:e=>{e.exports=["Hintergrundfarbe der Chart ändern"]},72458:e=>{e.exports=["Chart-Hintergrundtyp ändern"]},37034:e=>{ +e.exports=["Fadenkreuzbreite ändern"]},29951:e=>{e.exports=["Farbe des Fadenkreuzes ändern"]},92027:e=>{e.exports=["Fadenkreuzstil ändern"]},50457:e=>{e.exports=["Datumsformat ändern"]},7104:e=>{e.exports=["Wochentag auf den Labels ändern"]},88096:e=>{e.exports=["Farbe der horizontalen Gitterlinien ändern"]},2523:e=>{e.exports=["Stil der horizontalen Gitterlinien ändern"]},31325:e=>{e.exports=["Sichtbarkeit der Indikatortitel ändern"]},99774:e=>{e.exports=["Sichtbarkeit der Indikatorwerte ändern"]},96162:e=>{e.exports=["Sichtbarkeit der Indikatorargumente ändern"]},59820:e=>{e.exports=["Sichtbarkeit von Indikatoren- und Finanzdaten-Labels ändern"]},90512:e=>{e.exports=["Ändert die Sichtbarkeit des Labels für Werte der Indikatoren und Finanzkennzahlen"]},97956:e=>{e.exports=["Hintergrundtransparenz der Legende ändern"]},61061:e=>{e.exports=["Hintergrundsichtbarkeit der Legende ändern"]},37730:e=>{e.exports=["Sichtbarkeit der Schaltflächen des Fensters ändern"]},89032:e=>{e.exports=["Farbe der Trennstreifen im Fenster ändern"]},35636:e=>{e.exports=["unteren Rand ändern"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["Farbe des Symbol-Wasserzeichens ändern"]},87159:e=>{e.exports=["Sichtbarkeit des Symbolwasserzeichens ändern"]},26717:e=>{e.exports=["Sichtbarkeit der Symbolbeschreibung ändern"]},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports=["Anzeigemodus des letzten Wertes ändern"]},95071:e=>{e.exports=["Format der Symbollegende ändern"]},35065:e=>{e.exports=["Textfarbe der Skalen ändern"]},84382:e=>{e.exports=["Schriftgröße der Skalen ändern"]},12468:e=>{e.exports=["Farbe der Skalenlinien ändern"]},71589:e=>{e.exports=["Sichtbarkeit der Session-Übergänge ändern"]},15035:e=>{e.exports=["Linienbreite der Sitzungs-Übergänge ändern"]},1579:e=>{e.exports=["Farbe der Sitzungs-Übergänge ändern"]},21460:e=>{e.exports=["Stil der Session-Übergänge ändern"]},76991:e=>{e.exports=["Format der Uhrzeit ändern"]},98905:e=>{e.exports=["oberen Rand ändern"]},7011:e=>{e.exports=["Sichtbarkeit des Einheitenlabels ändern"]},22722:e=>{e.exports=["Farbe der vertikalen Gitterlinien ändern"]},22867:e=>{e.exports=["Stil der vertikalen Gitterlinien ändern"]},9455:e=>{e.exports=["Sichtbarkeit der Volumenwerte ändern"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/de.6847.490ee46270bef6a878dd.js b/charting_library/bundles/de.7257.089fbbc28bead9558b87.js similarity index 52% rename from charting_library/bundles/de.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/de.7257.089fbbc28bead9558b87.js index 44ecf657..119e681f 100644 --- a/charting_library/bundles/de.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/de.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports=["Pine Quellcode konnte nicht geladen werden"]},39589:e=>{e.exports=["Fenster zuklappen"]},38154:e=>{e.exports=["Bestätigen Sie das Löschen des gesamten Studienbaums"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Erstellen Sie einen kostenlosen Account"]},69419:e=>{e.exports=["Alles ist gut — Markt ist geöffnet."]},97637:e=>{e.exports="April"},86797:e=>{e.exports="August"},22519:e=>{e.exports=["Balken Änderungswerte"]},52003:e=>{e.exports=["Möchten Sie wirklich diese Studie und ihre Ableger löschen?"]},68854:e=>{e.exports=["Doppelklick"]},97325:e=>{e.exports=["Daten Problem"]},52916:e=>{e.exports=["Daten werden einmal täglich aktualisiert."]},25978:e=>{e.exports=["Daten werden nur einmal pro Sekunde aktualisiert, auch wenn es mehr Änderungen am Markt gibt."]},57310:e=>{e.exports=["Daten sind verzögert"]},49321:e=>{e.exports=["Daten für Free-User werden nur ein mal pro Sekunde aktualisiert, auch wenn mehr Änderungen im Markt geschehen."]},55669:e=>{e.exports=["Dezember"]},83498:e=>{e.exports=["Bereich Löschen"]},59315:e=>{e.exports=["End of Day Daten"]},82751:e=>{e.exports=["Fehler"]},40519:e=>{e.exports=["Guten Abend. Der Markt befindet sich im nachbörslichen Handel."]},80227:e=>{e.exports=["Zeitzone wechseln"]},16467:e=>{e.exports=["Februar"]},25046:e=>{e.exports=["Börsen-Vereinbarungen ausfüllen"]},93666:e=>{e.exports=["Symbol markieren"]},564:e=>{e.exports=["Fr"]},72970:e=>{e.exports=["Freitag"]},88958:e=>{e.exports=["Urlaub / Feiertag"]},21686:e=>{e.exports=["Indikator-Legende verbergen"]},26935:e=>{e.exports=["Funktionsargument des Indikators"]},26315:e=>{e.exports=["Titel des Indikators"]},84098:e=>{e.exports=["Werte des Indikators"]},91459:e=>{e.exports=["Wenn Sie Echtzeitdaten von {listedExchange} wünschen, müssen Sie eine Börsenvereinbarung ausfüllen. Keine Sorge, es dauert nur ein paar Klicks"]},50634:e=>{e.exports=["Der nachbörsliche Handel beginnt in {remainingTime}."]},74537:e=>{e.exports=["Der vorbörsliche Handel beginnt in {remainingTime}."]},26910:e=>{e.exports=["Januar"]},23230:e=>{e.exports=["Juli"]},49385:e=>{e.exports=["Juni"]},99487:e=>{e.exports=["OHLC Werte"]},15815:e=>{e.exports=["Ein Update pro Sekunde"]},90784:e=>{e.exports="October"},75991:e=>{e.exports=["Markt-Öffnungs-Status anzeigen"]},18429:e=>{e.exports=["Mehr erfahren"]},39899:e=>{e.exports=["Bereich nach unten bewegen"]},70343:e=>{e.exports=["Bereich nach oben bewegen"]},83085:e=>{e.exports="Mon"},61199:e=>{e.exports=["Montag"]},41610:e=>{e.exports=["Mehr"]},1653:e=>{e.exports=["Guten Morgen. Markt befindet sich im vorbörslichen Handel."]},56470:e=>{e.exports=["Chart maximieren"]},19603:e=>{e.exports=["Bereich Maximieren"]},68327:e=>{e.exports=["Mai"]},35732:e=>{e.exports=["Bereiche Verwalten"]},84675:e=>{e.exports=["März"]},83949:e=>{ -e.exports=["Markt ist geöffnet"]},35701:e=>{e.exports=["Markt öffnet in {remainingTime}."]},95814:e=>{e.exports=["Markt ist geschlossen"]},98105:e=>{e.exports=["Markt schließt in {remainingTime}."]},87202:e=>{e.exports=["Der Markt ist derzeit im Urlaub. Was für ein Leben."]},71194:e=>{e.exports="November"},66324:e=>{e.exports="Source code"},36835:e=>{e.exports=["Sa"]},1144:e=>{e.exports=["Samstag"]},40653:e=>{e.exports=["Nach links scrollen"]},26721:e=>{e.exports=["Zum neuesten Balken scrollen"]},35809:e=>{e.exports=["Nach rechts scrollen"]},61132:e=>{e.exports="September"},28705:e=>{e.exports=["Indikator-Legende anzeigen"]},51072:e=>{e.exports=["Objektbaum anzeigen"]},37809:e=>{e.exports=["Intervalleinstellungen anzeigen"]},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports=["Son"]},72149:e=>{e.exports=["Sonntag"]},39339:e=>{e.exports=["Titel des Symbols"]},29985:e=>{e.exports=["Nachbörslich"]},28412:e=>{e.exports=["Kostenpflichtige Abos enthalten schnellere Daten-Updates"]},56042:e=>{e.exports=["Vorbörslich"]},36015:e=>{e.exports=["Echtzeitdaten für {description} werden derzeit nicht unterstützt. Wir werden diese evtl. künftig unterstützen."]},6667:e=>{e.exports=["Echtzeit Daten für {symbolName} werden von der {exchange} Börse bereitgestellt."]},48293:e=>{e.exports=["Chart wiederherstellen"]},91029:e=>{e.exports=["Bereich wiederherstellen"]},75094:e=>{e.exports=["Mi"]},7147:e=>{e.exports=["Mittwoch"]},52984:e=>{e.exports=["Um Echtzeit Daten für {description} zu erhalten, kaufen Sie bitte das Echtzeit Datenpaket."]},9787:e=>{e.exports=["Do"]},7951:e=>{e.exports=["Donnerstag"]},57918:e=>{e.exports=["Diese Daten sind in Echtzeit, können sich jedoch leicht von deren offiziellen Handelsplätzen, primären Börsen, unterscheiden."]},68025:e=>{e.exports=["Diese Daten sind Echtzeitdaten, jedoch unterscheiden sie sich leicht von ihrem offiziellen Gegenstück, das von {exchange} kommt."]},73717:e=>{e.exports=["Dieses Symbol existiert nicht. Bitte wählen Sie ein anderes Symbol."]},57048:e=>{e.exports=["Zeit für einen Spaziergang — Dieser Markt ist geschlossen."]},94316:e=>{e.exports=["Die"]},44979:e=>{e.exports=["Dienstag"]},8209:e=>{e.exports=["Markierung aufheben"]},1111:e=>{e.exports=["Volumen"]},61311:e=>{e.exports=["Vergrößern"]},47602:e=>{e.exports=["Verkleinern"]},57889:e=>{e.exports=["Sichtbarkeit der OHLC-Werte ändern"]},18644:e=>{e.exports=["Sichtbarkeit des Marktstatus ändern"]},45110:e=>{e.exports=["Sichtbarkeit des Countdowns bei Balkenschluss ändern"]},31325:e=>{e.exports=["Sichtbarkeit der Indikatortitel ändern"]},99774:e=>{e.exports=["Sichtbarkeit der Indikatorwerte ändern"]},96162:e=>{e.exports=["Sichtbarkeit der Indikatorargumente ändern"]},26717:e=>{e.exports=["Sichtbarkeit der Symbolbeschreibung ändern"]},9455:e=>{e.exports=["Sichtbarkeit der Volumenwerte ändern"]},39348:e=>{e.exports=["weniger als 1 Minute"]},87358:e=>{e.exports=["{title} anzeigen"]},7827:e=>{e.exports=["{days} und {hours}"]},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports=["{hours} und {minutes}"]},1084:e=>{ -e.exports=["{listedExchange} Echtzeit Daten sind für registrierte User kostenlos verfügbar."]},11155:e=>{e.exports=["{symbolName} Daten sind um {time} Minuten verzögert."]},77033:e=>{e.exports=["Die Daten werden einmal pro {amount} Sekunde aktualisiert, selbst wenn es mehr Updates auf dem Markt gibt.","Die Daten werden einmal alle {amount} Sekunden aktualisiert, selbst wenn es mehr Updates auf dem Markt gibt."]},2121:e=>{e.exports=["Die Daten bei unseren Basis-Abonnements werden einmal pro {amount} Sekunde aktualisiert, selbst wenn es mehr Updates auf dem Markt gibt.","Die Daten bei unseren Basis-Abonnements werden einmal alle {amount} Sekunden aktualisiert, selbst wenn es mehr Updates auf dem Markt gibt."]},5223:e=>{e.exports=["Ein Update jede {amount} Sekunde","Ein Update alle {amount} Sekunden"]},58609:e=>{e.exports=["{number} Tag","{number} Tagen"]},24430:e=>{e.exports=["{number} Stunde","{number} Stunden"]},67151:e=>{e.exports=["{number} Minute","{number} Minuten"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports=["Pine Quellcode konnte nicht geladen werden"]},39589:e=>{e.exports=["Fenster zuklappen"]},38154:e=>{e.exports=["Bestätigen Sie das Löschen des gesamten Studienbaums"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Erstellen Sie einen kostenlosen Account"]},69419:e=>{e.exports=["Alles ist gut — Markt ist geöffnet."]},97637:e=>{e.exports="April"},86797:e=>{e.exports="August"},22519:e=>{e.exports=["Balken Änderungswerte"]},52003:e=>{e.exports=["Möchten Sie wirklich diese Studie und ihre Ableger löschen?"]},68854:e=>{e.exports=["Doppelklick"]},97325:e=>{e.exports=["Daten Problem"]},52916:e=>{e.exports=["Daten werden einmal täglich aktualisiert."]},25978:e=>{e.exports=["Daten werden nur einmal pro Sekunde aktualisiert, auch wenn es mehr Änderungen am Markt gibt."]},57310:e=>{e.exports=["Daten sind verzögert"]},49321:e=>{e.exports=["Daten für Free-User werden nur ein mal pro Sekunde aktualisiert, auch wenn mehr Änderungen im Markt geschehen."]},55669:e=>{e.exports=["Dezember"]},83498:e=>{e.exports=["Bereich Löschen"]},59315:e=>{e.exports=["End of Day Daten"]},82751:e=>{e.exports=["Fehler"]},40519:e=>{e.exports=["Guten Abend. Der Markt befindet sich im nachbörslichen Handel."]},80227:e=>{e.exports=["Zeitzone wechseln"]},16467:e=>{e.exports=["Februar"]},25046:e=>{e.exports=["Börsen-Vereinbarungen ausfüllen"]},93666:e=>{e.exports=["Symbol markieren"]},564:e=>{e.exports=["Fr"]},72970:e=>{e.exports=["Freitag"]},88958:e=>{e.exports=["Urlaub / Feiertag"]},21686:e=>{e.exports=["Indikator-Legende verbergen"]},26935:e=>{e.exports=["Funktionsargument des Indikators"]},26315:e=>{e.exports=["Titel des Indikators"]},84098:e=>{e.exports=["Werte des Indikators"]},91459:e=>{e.exports=["Wenn Sie Echtzeitdaten von {listedExchange} wünschen, müssen Sie eine Börsenvereinbarung ausfüllen. Keine Sorge, es dauert nur ein paar Klicks"]},50634:e=>{e.exports=["Der nachbörsliche Handel beginnt in {remainingTime}."]},74537:e=>{e.exports=["Der vorbörsliche Handel beginnt in {remainingTime}."]},26910:e=>{e.exports=["Januar"]},23230:e=>{e.exports=["Juli"]},49385:e=>{e.exports=["Juni"]},99487:e=>{e.exports=["OHLC Werte"]},15815:e=>{e.exports=["Ein Update pro Sekunde"]},90784:e=>{e.exports="October"},75991:e=>{e.exports=["Markt-Öffnungs-Status anzeigen"]},18429:e=>{e.exports=["Mehr erfahren"]},39899:e=>{e.exports=["Bereich nach unten bewegen"]},70343:e=>{e.exports=["Bereich nach oben bewegen"]},83085:e=>{e.exports="Mon"},61199:e=>{e.exports=["Montag"]},41610:e=>{e.exports=["Mehr"]},1653:e=>{e.exports=["Guten Morgen. Markt befindet sich im vorbörslichen Handel."]},56470:e=>{e.exports=["Chart maximieren"]},19603:e=>{e.exports=["Bereich Maximieren"]},68327:e=>{e.exports=["Mai"]},35732:e=>{e.exports=["Bereiche Verwalten"]},84675:e=>{e.exports=["März"]},83949:e=>{ +e.exports=["Markt ist geöffnet"]},35701:e=>{e.exports=["Markt öffnet in {remainingTime}."]},95814:e=>{e.exports=["Markt ist geschlossen"]},98105:e=>{e.exports=["Markt schließt in {remainingTime}."]},87202:e=>{e.exports=["Der Markt ist derzeit im Urlaub. Was für ein Leben."]},71194:e=>{e.exports="November"},66324:e=>{e.exports="Source code"},36835:e=>{e.exports=["Sa"]},1144:e=>{e.exports=["Samstag"]},40653:e=>{e.exports=["Nach links scrollen"]},26721:e=>{e.exports=["Zum neuesten Balken scrollen"]},35809:e=>{e.exports=["Nach rechts scrollen"]},61132:e=>{e.exports="September"},28705:e=>{e.exports=["Indikator-Legende anzeigen"]},51072:e=>{e.exports=["Objektbaum anzeigen"]},37809:e=>{e.exports=["Intervalleinstellungen anzeigen"]},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports=["Son"]},72149:e=>{e.exports=["Sonntag"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["Titel des Symbols"]},29985:e=>{e.exports=["Nachbörslich"]},28412:e=>{e.exports=["Kostenpflichtige Abos enthalten schnellere Daten-Updates"]},56042:e=>{e.exports=["Vorbörslich"]},36015:e=>{e.exports=["Echtzeitdaten für {description} werden derzeit nicht unterstützt. Wir werden diese evtl. künftig unterstützen."]},6667:e=>{e.exports=["Echtzeit Daten für {symbolName} werden von der {exchange} Börse bereitgestellt."]},48293:e=>{e.exports=["Chart wiederherstellen"]},91029:e=>{e.exports=["Bereich wiederherstellen"]},75094:e=>{e.exports=["Mi"]},7147:e=>{e.exports=["Mittwoch"]},52984:e=>{e.exports=["Um Echtzeit Daten für {description} zu erhalten, kaufen Sie bitte das Echtzeit Datenpaket."]},9787:e=>{e.exports=["Do"]},7951:e=>{e.exports=["Donnerstag"]},57918:e=>{e.exports=["Diese Daten sind in Echtzeit, können sich jedoch leicht von deren offiziellen Handelsplätzen, primären Börsen, unterscheiden."]},68025:e=>{e.exports=["Diese Daten sind Echtzeitdaten, jedoch unterscheiden sie sich leicht von ihrem offiziellen Gegenstück, das von {exchange} kommt."]},73717:e=>{e.exports=["Dieses Symbol existiert nicht. Bitte wählen Sie ein anderes Symbol."]},57048:e=>{e.exports=["Zeit für einen Spaziergang — Dieser Markt ist geschlossen."]},94316:e=>{e.exports=["Die"]},44979:e=>{e.exports=["Dienstag"]},8209:e=>{e.exports=["Markierung aufheben"]},1111:e=>{e.exports=["Volumen"]},61311:e=>{e.exports=["Vergrößern"]},47602:e=>{e.exports=["Verkleinern"]},57889:e=>{e.exports=["Sichtbarkeit der OHLC-Werte ändern"]},18644:e=>{e.exports=["Sichtbarkeit des Marktstatus ändern"]},45110:e=>{e.exports=["Sichtbarkeit des Countdowns bei Balkenschluss ändern"]},31325:e=>{e.exports=["Sichtbarkeit der Indikatortitel ändern"]},99774:e=>{e.exports=["Sichtbarkeit der Indikatorwerte ändern"]},96162:e=>{e.exports=["Sichtbarkeit der Indikatorargumente ändern"]},26717:e=>{e.exports=["Sichtbarkeit der Symbolbeschreibung ändern"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["Sichtbarkeit der Volumenwerte ändern"]},39348:e=>{e.exports=["weniger als 1 Minute"]},87358:e=>{e.exports=["{title} anzeigen"]},7827:e=>{e.exports=["{days} und {hours}"]},7435:e=>{ +e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports=["{hours} und {minutes}"]},1084:e=>{e.exports=["{listedExchange} Echtzeit Daten sind für registrierte User kostenlos verfügbar."]},11155:e=>{e.exports=["{symbolName} Daten sind um {time} Minuten verzögert."]},77033:e=>{e.exports=["Die Daten werden einmal pro {amount} Sekunde aktualisiert, selbst wenn es mehr Updates auf dem Markt gibt.","Die Daten werden einmal alle {amount} Sekunden aktualisiert, selbst wenn es mehr Updates auf dem Markt gibt."]},2121:e=>{e.exports=["Die Daten bei unseren Basis-Abonnements werden einmal pro {amount} Sekunde aktualisiert, selbst wenn es mehr Updates auf dem Markt gibt.","Die Daten bei unseren Basis-Abonnements werden einmal alle {amount} Sekunden aktualisiert, selbst wenn es mehr Updates auf dem Markt gibt."]},5223:e=>{e.exports=["Ein Update jede {amount} Sekunde","Ein Update alle {amount} Sekunden"]},58609:e=>{e.exports=["{number} Tag","{number} Tagen"]},24430:e=>{e.exports=["{number} Stunde","{number} Stunden"]},67151:e=>{e.exports=["{number} Minute","{number} Minuten"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/el.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/el.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index c19df696..00000000 --- a/charting_library/bundles/el.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports="bars"},19648:e=>{e.exports="12-hours"},55838:e=>{e.exports="24-hours"},88364:e=>{e.exports="Chart basic styles"},46720:e=>{e.exports="Crosshair"},50985:e=>{e.exports="Currency"},17319:e=>{e.exports="Currency and Unit"},19481:e=>{e.exports="Appearance"},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports="Average close price"},27331:e=>{e.exports=["Υπόβαθρο"]},22519:e=>{e.exports=["Bar Change Values"]},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports=["Date Format"]},55090:e=>{e.exports="Day of week on labels"},29601:e=>{e.exports="Description"},26897:e=>{e.exports=["Γεγονότα"]},95338:e=>{e.exports=["Horz Grid Lines"]},60971:e=>{e.exports="High and low price"},61142:e=>{e.exports=["Τέχν. Δείκτες"]},34905:e=>{e.exports="Indicators value"},29687:e=>{e.exports="Indicators and financials value"},25084:e=>{e.exports="Indicators and financials name"},9654:e=>{e.exports="Indicators name"},99487:e=>{e.exports=["OHLC Values"]},75991:e=>{e.exports="Open market status"},70500:e=>{e.exports="Money"},66653:e=>{e.exports="Margins"},42502:e=>{e.exports="No overlapping"},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports=["Κλίμακες"]},53224:e=>{e.exports="Scales placement"},79194:e=>{e.exports="Status line"},89053:e=>{e.exports=["Σύμβολο"]},35383:e=>{e.exports=["Symbol Name"]},27767:e=>{e.exports="Symbol last price"},40847:e=>{e.exports="Symbol previous day close price"},50446:e=>{e.exports="Pane"},73908:e=>{e.exports="Pane separators"},36014:e=>{e.exports=["Ποσοστό"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports="Pre/post market price"},64859:e=>{e.exports="Price Scale"},76523:e=>{e.exports="Price and percentage value"},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports="Watermark"},67369:e=>{e.exports="Title"},31326:e=>{e.exports="Titles"},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports="Ticker and description"},43637:e=>{e.exports="Time Scale"},97316:e=>{e.exports="Time hours format"},90801:e=>{e.exports="Trading"},77534:e=>{e.exports="Unit"},1111:e=>{e.exports=["Όγκος"]},80170:e=>{e.exports="Value according to scale"},91322:e=>{e.exports="Values"},70353:e=>{e.exports=["Vert Grid Lines"]},57889:e=>{e.exports="change OHLC values visibility"},35646:e=>{e.exports="change navigation buttons visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},10349:e=>{e.exports="change bottom margin"},88161:e=>{e.exports="change currency and unit labels visibility"},79570:e=>{e.exports="change currency label visibility"},99011:e=>{e.exports="change chart background color"},72458:e=>{e.exports="change chart background type"},37034:e=>{e.exports="change crosshair width"},29951:e=>{e.exports="change crosshair color"},92027:e=>{e.exports="change crosshair style"},50457:e=>{e.exports="change date format"},7104:e=>{e.exports="change day of week on labels"},88096:e=>{e.exports="change horz grid lines color"},2523:e=>{e.exports="change horz grid lines style"},31325:e=>{ -e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},59820:e=>{e.exports="change indicators and financials name labels visibility"},90512:e=>{e.exports="change indicators and financials value labels visibility"},97956:e=>{e.exports="change legend background transparency"},61061:e=>{e.exports="change legend background visibility"},37730:e=>{e.exports="change pane buttons visibility"},89032:e=>{e.exports="change pane separators color"},35636:e=>{e.exports="change right margin"},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports="change symbol watermark color"},87159:e=>{e.exports="change symbol watermark visibility"},26717:e=>{e.exports="change symbol description visibility"},28741:e=>{e.exports="change symbol last value mode"},95071:e=>{e.exports="change symbol legend format"},35065:e=>{e.exports="change scales text color"},84382:e=>{e.exports="change scales font size"},12468:e=>{e.exports="change scales lines color"},71589:e=>{e.exports="change sessions breaks visibility"},15035:e=>{e.exports="change sessions breaks width"},1579:e=>{e.exports="change sessions breaks color"},21460:e=>{e.exports="change sessions breaks style"},76991:e=>{e.exports="change time hours format"},98905:e=>{e.exports="change top margin"},7011:e=>{e.exports="change unit label visibility"},22722:e=>{e.exports="change vert grid lines color"},22867:e=>{e.exports="change vert grid lines style"},9455:e=>{e.exports="change volume values visibility"}}]); \ No newline at end of file diff --git a/charting_library/bundles/el.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/el.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..916ce339 --- /dev/null +++ b/charting_library/bundles/el.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports="bars"},19648:e=>{e.exports="12-hours"},55838:e=>{e.exports="24-hours"},88364:e=>{e.exports="Chart basic styles"},46720:e=>{e.exports="Crosshair"},50985:e=>{e.exports="Currency"},17319:e=>{e.exports="Currency and Unit"},19481:e=>{e.exports="Appearance"},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports="Average close price"},27331:e=>{e.exports=["Υπόβαθρο"]},22519:e=>{e.exports=["Bar Change Values"]},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports=["Date Format"]},55090:e=>{e.exports="Day of week on labels"},29601:e=>{e.exports="Description"},26897:e=>{e.exports=["Γεγονότα"]},95338:e=>{e.exports=["Horz Grid Lines"]},60971:e=>{e.exports="High and low price"},61142:e=>{e.exports=["Τέχν. Δείκτες"]},34905:e=>{e.exports="Indicators value"},29687:e=>{e.exports="Indicators and financials value"},25084:e=>{e.exports="Indicators and financials name"},9654:e=>{e.exports="Indicators name"},99487:e=>{e.exports=["OHLC Values"]},75991:e=>{e.exports="Open market status"},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports="Money"},66653:e=>{e.exports="Margins"},42502:e=>{e.exports="No overlapping"},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports=["Κλίμακες"]},53224:e=>{e.exports="Scales placement"},79194:e=>{e.exports="Status line"},89053:e=>{e.exports=["Σύμβολο"]},35383:e=>{e.exports=["Symbol Name"]},27767:e=>{e.exports="Symbol last price"},40847:e=>{e.exports="Symbol previous day close price"},50446:e=>{e.exports="Pane"},73908:e=>{e.exports="Pane separators"},36014:e=>{e.exports=["Ποσοστό"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports="Pre/post market price"},64859:e=>{e.exports="Price Scale"},76523:e=>{e.exports="Price and percentage value"},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports="Watermark"},67369:e=>{e.exports="Title"},31326:e=>{e.exports="Titles"},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports="Ticker and description"},43637:e=>{e.exports="Time Scale"},97316:e=>{e.exports="Time hours format"},90801:e=>{e.exports="Trading"},77534:e=>{e.exports="Unit"},1111:e=>{e.exports=["Όγκος"]},80170:e=>{e.exports="Value according to scale"},91322:e=>{e.exports="Values"},70353:e=>{e.exports=["Vert Grid Lines"]},57889:e=>{e.exports="change OHLC values visibility"},35646:e=>{e.exports="change navigation buttons visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},10349:e=>{e.exports="change bottom margin"},88161:e=>{e.exports="change currency and unit labels visibility"},79570:e=>{e.exports="change currency label visibility"},99011:e=>{e.exports="change chart background color"},72458:e=>{e.exports="change chart background type"},37034:e=>{e.exports="change crosshair width"},29951:e=>{e.exports="change crosshair color"},92027:e=>{e.exports="change crosshair style"},50457:e=>{e.exports="change date format"},7104:e=>{e.exports="change day of week on labels"},88096:e=>{e.exports="change horz grid lines color"},2523:e=>{ +e.exports="change horz grid lines style"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},59820:e=>{e.exports="change indicators and financials name labels visibility"},90512:e=>{e.exports="change indicators and financials value labels visibility"},97956:e=>{e.exports="change legend background transparency"},61061:e=>{e.exports="change legend background visibility"},37730:e=>{e.exports="change pane buttons visibility"},89032:e=>{e.exports="change pane separators color"},35636:e=>{e.exports="change right margin"},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports="change symbol watermark color"},87159:e=>{e.exports="change symbol watermark visibility"},26717:e=>{e.exports="change symbol description visibility"},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports="change symbol last value mode"},95071:e=>{e.exports="change symbol legend format"},35065:e=>{e.exports="change scales text color"},84382:e=>{e.exports="change scales font size"},12468:e=>{e.exports="change scales lines color"},71589:e=>{e.exports="change sessions breaks visibility"},15035:e=>{e.exports="change sessions breaks width"},1579:e=>{e.exports="change sessions breaks color"},21460:e=>{e.exports="change sessions breaks style"},76991:e=>{e.exports="change time hours format"},98905:e=>{e.exports="change top margin"},7011:e=>{e.exports="change unit label visibility"},22722:e=>{e.exports="change vert grid lines color"},22867:e=>{e.exports="change vert grid lines style"},9455:e=>{e.exports="change volume values visibility"}}]); \ No newline at end of file diff --git a/charting_library/bundles/el.6847.490ee46270bef6a878dd.js b/charting_library/bundles/el.7257.089fbbc28bead9558b87.js similarity index 55% rename from charting_library/bundles/el.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/el.7257.089fbbc28bead9558b87.js index 547d525a..bb30310a 100644 --- a/charting_library/bundles/el.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/el.7257.089fbbc28bead9558b87.js @@ -1,2 +1,2 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports="Could not get Pine source code."},39589:e=>{e.exports="Collapse pane"},38154:e=>{e.exports="Confirm Remove Study Tree"},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports="Create a free account"},69419:e=>{e.exports="All's well — Market is open."},97637:e=>{e.exports="April"},86797:e=>{e.exports="August"},22519:e=>{e.exports=["Bar Change Values"]},52003:e=>{e.exports="Do you really want to delete study and all of it's children?"},68854:e=>{e.exports="Double click"},97325:e=>{e.exports="Data error"},52916:e=>{e.exports="Data is updated once a day."},25978:e=>{e.exports="Data is updated once per second, even if there are more updates on the market."},57310:e=>{e.exports="Data is delayed"},49321:e=>{e.exports="Data on our Basic plan is updated once per second, even if there are more updates on the market."},55669:e=>{e.exports="December"},83498:e=>{e.exports="Delete pane"},59315:e=>{e.exports="End of day data"},82751:e=>{e.exports="Error"},40519:e=>{e.exports="Evening. Market is open for post-market trading."},80227:e=>{e.exports="Exchange timezone"},16467:e=>{e.exports="February"},25046:e=>{e.exports="Fill out Exchange Agreements"},93666:e=>{e.exports="Flag Symbol"},564:e=>{e.exports="Fri"},72970:e=>{e.exports="Friday"},88958:e=>{e.exports="Holiday"},21686:e=>{e.exports="Hide Indicator Legend"},26935:e=>{e.exports=["Indicator Arguments"]},26315:e=>{e.exports=["Indicator Titles"]},84098:e=>{e.exports=["Indicator Values"]},91459:e=>{e.exports="If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"},50634:e=>{e.exports="It'll go to post-market trading in {remainingTime}."},74537:e=>{e.exports="It'll open for pre-market trading in {remainingTime}."},26910:e=>{e.exports="January"},23230:e=>{e.exports="July"},49385:e=>{e.exports="June"},99487:e=>{e.exports=["OHLC Values"]},15815:e=>{e.exports="One update per second"},90784:e=>{e.exports="October"},75991:e=>{e.exports="Open market status"},18429:e=>{e.exports="Learn more"},39899:e=>{e.exports="Move pane down"},70343:e=>{e.exports="Move pane up"},83085:e=>{e.exports="Mon"},61199:e=>{e.exports="Monday"},41610:e=>{e.exports="More"},1653:e=>{e.exports="Morning. Market is open for pre-market trading."},56470:e=>{e.exports="Maximize chart"},19603:e=>{e.exports="Maximize pane"},68327:e=>{e.exports=["Μαι"]},35732:e=>{e.exports="Manage panes"},84675:e=>{e.exports="March"},83949:e=>{e.exports="Market open"},35701:e=>{e.exports="Market opens in {remainingTime}."},95814:e=>{e.exports="Market closed"},98105:e=>{e.exports="Market closes in {remainingTime}."},87202:e=>{e.exports="Market is currently on holiday. Lucky them."},71194:e=>{e.exports="November"},66324:e=>{e.exports="Source code"},36835:e=>{e.exports="Sat"},1144:e=>{ -e.exports="Saturday"},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports="September"},28705:e=>{e.exports="Show Indicator Legend"},51072:e=>{e.exports="Show Object Tree"},37809:e=>{e.exports="Show interval settings"},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports="Sun"},72149:e=>{e.exports="Sunday"},39339:e=>{e.exports="Symbol title"},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports="Paid plans feature faster data updates."},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports="Real-time data for {description} is not supported right now. We may support it in the future."},6667:e=>{e.exports="Real-time data for {symbolName} is provided by {exchange} exchange."},48293:e=>{e.exports="Restore chart"},91029:e=>{e.exports="Restore pane"},75094:e=>{e.exports="Wed"},7147:e=>{e.exports="Wednesday"},52984:e=>{e.exports="To get real-time data for {description}, please buy the real-time data package."},9787:e=>{e.exports="Thu"},7951:e=>{e.exports="Thursday"},57918:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges."},68025:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}."},73717:e=>{e.exports="This symbol doesn't exist, please pick another one."},57048:e=>{e.exports="Time for a walk — this market is closed."},94316:e=>{e.exports="Tue"},44979:e=>{e.exports="Tuesday"},8209:e=>{e.exports="Unflag Symbol"},1111:e=>{e.exports=["Όγκος"]},61311:e=>{e.exports=["Μεγέθυνση"]},47602:e=>{e.exports=["Σμίκρυνση"]},57889:e=>{e.exports="change OHLC values visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},26717:e=>{e.exports="change symbol description visibility"},9455:e=>{e.exports="change volume values visibility"},39348:e=>{e.exports="less than 1 minute"},87358:e=>{e.exports="show {title}"},7827:e=>{e.exports="{days} and {hours}"},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports="{hours} and {minutes}"},1084:e=>{e.exports="{listedExchange} real-time data is available for free to registered users."},11155:e=>{e.exports="{symbolName} data is delayed by {time} minutes."},77033:e=>{e.exports="Data is updated once every {amount} second, even if there are more updates on the market."},2121:e=>{e.exports="Data on our Basic plan is updated once every {amount} second, even if there are more updates on the market."},5223:e=>{e.exports="One update every {amount} second"},58609:e=>{e.exports="{number} day"},24430:e=>{e.exports="{number} hour"},67151:e=>{e.exports="{number} minute"}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports="Could not get Pine source code."},39589:e=>{e.exports="Collapse pane"},38154:e=>{e.exports="Confirm Remove Study Tree"},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports="Create a free account"},69419:e=>{e.exports="All's well — Market is open."},97637:e=>{e.exports="April"},86797:e=>{e.exports="August"},22519:e=>{e.exports=["Bar Change Values"]},52003:e=>{e.exports="Do you really want to delete study and all of it's children?"},68854:e=>{e.exports="Double click"},97325:e=>{e.exports="Data error"},52916:e=>{e.exports="Data is updated once a day."},25978:e=>{e.exports="Data is updated once per second, even if there are more updates on the market."},57310:e=>{e.exports="Data is delayed"},49321:e=>{e.exports="Data on our Basic plan is updated once per second, even if there are more updates on the market."},55669:e=>{e.exports="December"},83498:e=>{e.exports="Delete pane"},59315:e=>{e.exports="End of day data"},82751:e=>{e.exports="Error"},40519:e=>{e.exports="Evening. Market is open for post-market trading."},80227:e=>{e.exports="Exchange timezone"},16467:e=>{e.exports="February"},25046:e=>{e.exports="Fill out Exchange Agreements"},93666:e=>{e.exports="Flag Symbol"},564:e=>{e.exports="Fri"},72970:e=>{e.exports="Friday"},88958:e=>{e.exports="Holiday"},21686:e=>{e.exports="Hide Indicator Legend"},26935:e=>{e.exports=["Indicator Arguments"]},26315:e=>{e.exports=["Indicator Titles"]},84098:e=>{e.exports=["Indicator Values"]},91459:e=>{e.exports="If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"},50634:e=>{e.exports="It'll go to post-market trading in {remainingTime}."},74537:e=>{e.exports="It'll open for pre-market trading in {remainingTime}."},26910:e=>{e.exports="January"},23230:e=>{e.exports="July"},49385:e=>{e.exports="June"},99487:e=>{e.exports=["OHLC Values"]},15815:e=>{e.exports="One update per second"},90784:e=>{e.exports="October"},75991:e=>{e.exports="Open market status"},18429:e=>{e.exports="Learn more"},39899:e=>{e.exports="Move pane down"},70343:e=>{e.exports="Move pane up"},83085:e=>{e.exports="Mon"},61199:e=>{e.exports="Monday"},41610:e=>{e.exports="More"},1653:e=>{e.exports="Morning. Market is open for pre-market trading."},56470:e=>{e.exports="Maximize chart"},19603:e=>{e.exports="Maximize pane"},68327:e=>{e.exports=["Μαι"]},35732:e=>{e.exports="Manage panes"},84675:e=>{e.exports="March"},83949:e=>{e.exports="Market open"},35701:e=>{e.exports="Market opens in {remainingTime}."},95814:e=>{e.exports="Market closed"},98105:e=>{e.exports="Market closes in {remainingTime}."},87202:e=>{e.exports="Market is currently on holiday. Lucky them."},71194:e=>{e.exports="November"},66324:e=>{e.exports="Source code"},36835:e=>{e.exports="Sat"},1144:e=>{ +e.exports="Saturday"},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports="September"},28705:e=>{e.exports="Show Indicator Legend"},51072:e=>{e.exports="Show Object Tree"},37809:e=>{e.exports="Show interval settings"},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports="Sun"},72149:e=>{e.exports="Sunday"},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports="Symbol title"},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports="Paid plans feature faster data updates."},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports="Real-time data for {description} is not supported right now. We may support it in the future."},6667:e=>{e.exports="Real-time data for {symbolName} is provided by {exchange} exchange."},48293:e=>{e.exports="Restore chart"},91029:e=>{e.exports="Restore pane"},75094:e=>{e.exports="Wed"},7147:e=>{e.exports="Wednesday"},52984:e=>{e.exports="To get real-time data for {description}, please buy the real-time data package."},9787:e=>{e.exports="Thu"},7951:e=>{e.exports="Thursday"},57918:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges."},68025:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}."},73717:e=>{e.exports="This symbol doesn't exist, please pick another one."},57048:e=>{e.exports="Time for a walk — this market is closed."},94316:e=>{e.exports="Tue"},44979:e=>{e.exports="Tuesday"},8209:e=>{e.exports="Unflag Symbol"},1111:e=>{e.exports=["Όγκος"]},61311:e=>{e.exports=["Μεγέθυνση"]},47602:e=>{e.exports=["Σμίκρυνση"]},57889:e=>{e.exports="change OHLC values visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},26717:e=>{e.exports="change symbol description visibility"},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports="change volume values visibility"},39348:e=>{e.exports="less than 1 minute"},87358:e=>{e.exports="show {title}"},7827:e=>{e.exports="{days} and {hours}"},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports="{hours} and {minutes}"},1084:e=>{e.exports="{listedExchange} real-time data is available for free to registered users."},11155:e=>{e.exports="{symbolName} data is delayed by {time} minutes."},77033:e=>{e.exports="Data is updated once every {amount} second, even if there are more updates on the market."},2121:e=>{e.exports="Data on our Basic plan is updated once every {amount} second, even if there are more updates on the market."},5223:e=>{e.exports="One update every {amount} second"},58609:e=>{e.exports="{number} day"},24430:e=>{e.exports="{number} hour"},67151:e=>{e.exports="{number} minute"}}]); \ No newline at end of file diff --git a/charting_library/bundles/en.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/en.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 69d2624d..00000000 --- a/charting_library/bundles/en.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports="bars"},19648:e=>{e.exports="12-hours"},55838:e=>{e.exports="24-hours"},88364:e=>{e.exports="Chart basic styles"},46720:e=>{e.exports="Crosshair"},50985:e=>{e.exports="Currency"},17319:e=>{e.exports="Currency and Unit"},19481:e=>{e.exports="Appearance"},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports="Average close price"},27331:e=>{e.exports="Background"},22519:e=>{e.exports="Bar change values"},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports="Date format"},55090:e=>{e.exports="Day of week on labels"},29601:e=>{e.exports="Description"},26897:e=>{e.exports="Events"},95338:e=>{e.exports="Horz grid lines"},60971:e=>{e.exports="High and low price"},61142:e=>{e.exports="Indicators"},34905:e=>{e.exports="Indicators value"},29687:e=>{e.exports="Indicators and financials value"},25084:e=>{e.exports="Indicators and financials name"},9654:e=>{e.exports="Indicators name"},99487:e=>{e.exports="OHLC values"},75991:e=>{e.exports="Open market status"},70500:e=>{e.exports="Money"},66653:e=>{e.exports="Margins"},42502:e=>{e.exports="No overlapping"},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports="Scales"},53224:e=>{e.exports="Scales placement"},79194:e=>{e.exports="Status line"},89053:e=>{e.exports="Symbol"},35383:e=>{e.exports="Symbol name"},27767:e=>{e.exports="Symbol last price"},40847:e=>{e.exports="Symbol previous day close price"},50446:e=>{e.exports="Pane"},73908:e=>{e.exports="Pane separators"},36014:e=>{e.exports="Percentage"},78621:e=>{e.exports="Pips"},74823:e=>{e.exports="Pre/post market price"},64859:e=>{e.exports="Price Scale"},76523:e=>{e.exports="Price and percentage value"},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports="Watermark"},67369:e=>{e.exports="Title"},31326:e=>{e.exports="Titles"},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports="Ticker and description"},43637:e=>{e.exports="Time Scale"},97316:e=>{e.exports="Time hours format"},90801:e=>{e.exports="Trading"},77534:e=>{e.exports="Unit"},1111:e=>{e.exports="Volume"},80170:e=>{e.exports="Value according to scale"},91322:e=>{e.exports="Values"},70353:e=>{e.exports="Vert grid lines"},57889:e=>{e.exports="change OHLC values visibility"},35646:e=>{e.exports="change navigation buttons visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},10349:e=>{e.exports="change bottom margin"},88161:e=>{e.exports="change currency and unit labels visibility"},79570:e=>{e.exports="change currency label visibility"},99011:e=>{e.exports="change chart background color"},72458:e=>{e.exports="change chart background type"},37034:e=>{e.exports="change crosshair width"},29951:e=>{e.exports="change crosshair color"},92027:e=>{e.exports="change crosshair style"},50457:e=>{e.exports="change date format"},7104:e=>{e.exports="change day of week on labels"},88096:e=>{e.exports="change horz grid lines color"},2523:e=>{e.exports="change horz grid lines style"},31325:e=>{ -e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},59820:e=>{e.exports="change indicators and financials name labels visibility"},90512:e=>{e.exports="change indicators and financials value labels visibility"},97956:e=>{e.exports="change legend background transparency"},61061:e=>{e.exports="change legend background visibility"},37730:e=>{e.exports="change pane buttons visibility"},89032:e=>{e.exports="change pane separators color"},35636:e=>{e.exports="change right margin"},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports="change symbol watermark color"},87159:e=>{e.exports="change symbol watermark visibility"},26717:e=>{e.exports="change symbol description visibility"},28741:e=>{e.exports="change symbol last value mode"},95071:e=>{e.exports="change symbol legend format"},35065:e=>{e.exports="change scales text color"},84382:e=>{e.exports="change scales font size"},12468:e=>{e.exports="change scales lines color"},71589:e=>{e.exports="change sessions breaks visibility"},15035:e=>{e.exports="change sessions breaks width"},1579:e=>{e.exports="change sessions breaks color"},21460:e=>{e.exports="change sessions breaks style"},76991:e=>{e.exports="change time hours format"},98905:e=>{e.exports="change top margin"},7011:e=>{e.exports="change unit label visibility"},22722:e=>{e.exports="change vert grid lines color"},22867:e=>{e.exports="change vert grid lines style"},9455:e=>{e.exports="change volume values visibility"}}]); \ No newline at end of file diff --git a/charting_library/bundles/en.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/en.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..c7c769f7 --- /dev/null +++ b/charting_library/bundles/en.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports="bars"},19648:e=>{e.exports="12-hours"},55838:e=>{e.exports="24-hours"},88364:e=>{e.exports="Chart basic styles"},46720:e=>{e.exports="Crosshair"},50985:e=>{e.exports="Currency"},17319:e=>{e.exports="Currency and Unit"},19481:e=>{e.exports="Appearance"},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports="Average close price"},27331:e=>{e.exports="Background"},22519:e=>{e.exports="Bar change values"},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports="Date format"},55090:e=>{e.exports="Day of week on labels"},29601:e=>{e.exports="Description"},26897:e=>{e.exports="Events"},95338:e=>{e.exports="Horz grid lines"},60971:e=>{e.exports="High and low price"},61142:e=>{e.exports="Indicators"},34905:e=>{e.exports="Indicators value"},29687:e=>{e.exports="Indicators and financials value"},25084:e=>{e.exports="Indicators and financials name"},9654:e=>{e.exports="Indicators name"},99487:e=>{e.exports="OHLC values"},75991:e=>{e.exports="Open market status"},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports="Money"},66653:e=>{e.exports="Margins"},42502:e=>{e.exports="No overlapping"},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports="Scales"},53224:e=>{e.exports="Scales placement"},79194:e=>{e.exports="Status line"},89053:e=>{e.exports="Symbol"},35383:e=>{e.exports="Symbol name"},27767:e=>{e.exports="Symbol last price"},40847:e=>{e.exports="Symbol previous day close price"},50446:e=>{e.exports="Pane"},73908:e=>{e.exports="Pane separators"},36014:e=>{e.exports="Percentage"},78621:e=>{e.exports="Pips"},74823:e=>{e.exports="Pre/post market price"},64859:e=>{e.exports="Price Scale"},76523:e=>{e.exports="Price and percentage value"},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports="Watermark"},67369:e=>{e.exports="Title"},31326:e=>{e.exports="Titles"},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports="Ticker and description"},43637:e=>{e.exports="Time Scale"},97316:e=>{e.exports="Time hours format"},90801:e=>{e.exports="Trading"},77534:e=>{e.exports="Unit"},1111:e=>{e.exports="Volume"},80170:e=>{e.exports="Value according to scale"},91322:e=>{e.exports="Values"},70353:e=>{e.exports="Vert grid lines"},57889:e=>{e.exports="change OHLC values visibility"},35646:e=>{e.exports="change navigation buttons visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},10349:e=>{e.exports="change bottom margin"},88161:e=>{e.exports="change currency and unit labels visibility"},79570:e=>{e.exports="change currency label visibility"},99011:e=>{e.exports="change chart background color"},72458:e=>{e.exports="change chart background type"},37034:e=>{e.exports="change crosshair width"},29951:e=>{e.exports="change crosshair color"},92027:e=>{e.exports="change crosshair style"},50457:e=>{e.exports="change date format"},7104:e=>{e.exports="change day of week on labels"},88096:e=>{e.exports="change horz grid lines color"},2523:e=>{e.exports="change horz grid lines style"}, +31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},59820:e=>{e.exports="change indicators and financials name labels visibility"},90512:e=>{e.exports="change indicators and financials value labels visibility"},97956:e=>{e.exports="change legend background transparency"},61061:e=>{e.exports="change legend background visibility"},37730:e=>{e.exports="change pane buttons visibility"},89032:e=>{e.exports="change pane separators color"},35636:e=>{e.exports="change right margin"},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports="change symbol watermark color"},87159:e=>{e.exports="change symbol watermark visibility"},26717:e=>{e.exports="change symbol description visibility"},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports="change symbol last value mode"},95071:e=>{e.exports="change symbol legend format"},35065:e=>{e.exports="change scales text color"},84382:e=>{e.exports="change scales font size"},12468:e=>{e.exports="change scales lines color"},71589:e=>{e.exports="change sessions breaks visibility"},15035:e=>{e.exports="change sessions breaks width"},1579:e=>{e.exports="change sessions breaks color"},21460:e=>{e.exports="change sessions breaks style"},76991:e=>{e.exports="change time hours format"},98905:e=>{e.exports="change top margin"},7011:e=>{e.exports="change unit label visibility"},22722:e=>{e.exports="change vert grid lines color"},22867:e=>{e.exports="change vert grid lines style"},9455:e=>{e.exports="change volume values visibility"}}]); \ No newline at end of file diff --git a/charting_library/bundles/en.6847.490ee46270bef6a878dd.js b/charting_library/bundles/en.7257.089fbbc28bead9558b87.js similarity index 55% rename from charting_library/bundles/en.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/en.7257.089fbbc28bead9558b87.js index 4fdbacf8..b0f3223b 100644 --- a/charting_library/bundles/en.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/en.7257.089fbbc28bead9558b87.js @@ -1,2 +1,2 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports="Could not get Pine source code."},39589:e=>{e.exports="Collapse pane"},38154:e=>{e.exports="Confirm Remove Study Tree"},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports="Create a free account"},69419:e=>{e.exports="All's well — Market is open."},97637:e=>{e.exports="April"},86797:e=>{e.exports="August"},22519:e=>{e.exports="Bar change values"},52003:e=>{e.exports="Do you really want to delete study and all of it's children?"},68854:e=>{e.exports="Double click"},97325:e=>{e.exports="Data error"},52916:e=>{e.exports="Data is updated once a day."},25978:e=>{e.exports="Data is updated once per second, even if there are more updates on the market."},57310:e=>{e.exports="Data is delayed"},49321:e=>{e.exports="Data on our Basic plan is updated once per second, even if there are more updates on the market."},55669:e=>{e.exports="December"},83498:e=>{e.exports="Delete pane"},59315:e=>{e.exports="End of day data"},82751:e=>{e.exports="Error"},40519:e=>{e.exports="Evening. Market is open for post-market trading."},80227:e=>{e.exports="Exchange timezone"},16467:e=>{e.exports="February"},25046:e=>{e.exports="Fill out Exchange Agreements"},93666:e=>{e.exports="Flag Symbol"},564:e=>{e.exports="Fri"},72970:e=>{e.exports="Friday"},88958:e=>{e.exports="Holiday"},21686:e=>{e.exports="Hide Indicator Legend"},26935:e=>{e.exports="Indicator arguments"},26315:e=>{e.exports="Indicator titles"},84098:e=>{e.exports="Indicator values"},91459:e=>{e.exports="If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"},50634:e=>{e.exports="It'll go to post-market trading in {remainingTime}."},74537:e=>{e.exports="It'll open for pre-market trading in {remainingTime}."},26910:e=>{e.exports="January"},23230:e=>{e.exports="July"},49385:e=>{e.exports="June"},99487:e=>{e.exports="OHLC values"},15815:e=>{e.exports="One update per second"},90784:e=>{e.exports="October"},75991:e=>{e.exports="Open market status"},18429:e=>{e.exports="Learn more"},39899:e=>{e.exports="Move pane down"},70343:e=>{e.exports="Move pane up"},83085:e=>{e.exports="Mon"},61199:e=>{e.exports="Monday"},41610:e=>{e.exports="More"},1653:e=>{e.exports="Morning. Market is open for pre-market trading."},56470:e=>{e.exports="Maximize chart"},19603:e=>{e.exports="Maximize pane"},68327:e=>{e.exports="May"},35732:e=>{e.exports="Manage panes"},84675:e=>{e.exports="March"},83949:e=>{e.exports="Market open"},35701:e=>{e.exports="Market opens in {remainingTime}."},95814:e=>{e.exports="Market closed"},98105:e=>{e.exports="Market closes in {remainingTime}."},87202:e=>{e.exports="Market is currently on holiday. Lucky them."},71194:e=>{e.exports="November"},66324:e=>{e.exports="Source code"},36835:e=>{e.exports="Sat"},1144:e=>{e.exports="Saturday"}, -40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports="September"},28705:e=>{e.exports="Show Indicator Legend"},51072:e=>{e.exports="Show Object Tree"},37809:e=>{e.exports="Show interval settings"},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports="Sun"},72149:e=>{e.exports="Sunday"},39339:e=>{e.exports="Symbol title"},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports="Paid plans feature faster data updates."},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports="Real-time data for {description} is not supported right now. We may support it in the future."},6667:e=>{e.exports="Real-time data for {symbolName} is provided by {exchange} exchange."},48293:e=>{e.exports="Restore chart"},91029:e=>{e.exports="Restore pane"},75094:e=>{e.exports="Wed"},7147:e=>{e.exports="Wednesday"},52984:e=>{e.exports="To get real-time data for {description}, please buy the real-time data package."},9787:e=>{e.exports="Thu"},7951:e=>{e.exports="Thursday"},57918:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges."},68025:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}."},73717:e=>{e.exports="This symbol doesn't exist, please pick another one."},57048:e=>{e.exports="Time for a walk — this market is closed."},94316:e=>{e.exports="Tue"},44979:e=>{e.exports="Tuesday"},8209:e=>{e.exports="Unflag Symbol"},1111:e=>{e.exports="Volume"},61311:e=>{e.exports="Zoom in"},47602:e=>{e.exports="Zoom out"},57889:e=>{e.exports="change OHLC values visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},26717:e=>{e.exports="change symbol description visibility"},9455:e=>{e.exports="change volume values visibility"},39348:e=>{e.exports="less than 1 minute"},87358:e=>{e.exports="show {title}"},7827:e=>{e.exports="{days} and {hours}"},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports="{hours} and {minutes}"},1084:e=>{e.exports="{listedExchange} real-time data is available for free to registered users."},11155:e=>{e.exports="{symbolName} data is delayed by {time} minutes."},77033:e=>{e.exports="Data is updated once every {amount} second, even if there are more updates on the market."},2121:e=>{e.exports="Data on our Basic plan is updated once every {amount} second, even if there are more updates on the market."},5223:e=>{e.exports="One update every {amount} second"},58609:e=>{e.exports="{number} day"},24430:e=>{e.exports="{number} hour"},67151:e=>{e.exports="{number} minute"}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports="Could not get Pine source code."},39589:e=>{e.exports="Collapse pane"},38154:e=>{e.exports="Confirm Remove Study Tree"},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports="Create a free account"},69419:e=>{e.exports="All's well — Market is open."},97637:e=>{e.exports="April"},86797:e=>{e.exports="August"},22519:e=>{e.exports="Bar change values"},52003:e=>{e.exports="Do you really want to delete study and all of it's children?"},68854:e=>{e.exports="Double click"},97325:e=>{e.exports="Data error"},52916:e=>{e.exports="Data is updated once a day."},25978:e=>{e.exports="Data is updated once per second, even if there are more updates on the market."},57310:e=>{e.exports="Data is delayed"},49321:e=>{e.exports="Data on our Basic plan is updated once per second, even if there are more updates on the market."},55669:e=>{e.exports="December"},83498:e=>{e.exports="Delete pane"},59315:e=>{e.exports="End of day data"},82751:e=>{e.exports="Error"},40519:e=>{e.exports="Evening. Market is open for post-market trading."},80227:e=>{e.exports="Exchange timezone"},16467:e=>{e.exports="February"},25046:e=>{e.exports="Fill out Exchange Agreements"},93666:e=>{e.exports="Flag Symbol"},564:e=>{e.exports="Fri"},72970:e=>{e.exports="Friday"},88958:e=>{e.exports="Holiday"},21686:e=>{e.exports="Hide Indicator Legend"},26935:e=>{e.exports="Indicator arguments"},26315:e=>{e.exports="Indicator titles"},84098:e=>{e.exports="Indicator values"},91459:e=>{e.exports="If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"},50634:e=>{e.exports="It'll go to post-market trading in {remainingTime}."},74537:e=>{e.exports="It'll open for pre-market trading in {remainingTime}."},26910:e=>{e.exports="January"},23230:e=>{e.exports="July"},49385:e=>{e.exports="June"},99487:e=>{e.exports="OHLC values"},15815:e=>{e.exports="One update per second"},90784:e=>{e.exports="October"},75991:e=>{e.exports="Open market status"},18429:e=>{e.exports="Learn more"},39899:e=>{e.exports="Move pane down"},70343:e=>{e.exports="Move pane up"},83085:e=>{e.exports="Mon"},61199:e=>{e.exports="Monday"},41610:e=>{e.exports="More"},1653:e=>{e.exports="Morning. Market is open for pre-market trading."},56470:e=>{e.exports="Maximize chart"},19603:e=>{e.exports="Maximize pane"},68327:e=>{e.exports="May"},35732:e=>{e.exports="Manage panes"},84675:e=>{e.exports="March"},83949:e=>{e.exports="Market open"},35701:e=>{e.exports="Market opens in {remainingTime}."},95814:e=>{e.exports="Market closed"},98105:e=>{e.exports="Market closes in {remainingTime}."},87202:e=>{e.exports="Market is currently on holiday. Lucky them."},71194:e=>{e.exports="November"},66324:e=>{e.exports="Source code"},36835:e=>{e.exports="Sat"},1144:e=>{e.exports="Saturday"}, +40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports="September"},28705:e=>{e.exports="Show Indicator Legend"},51072:e=>{e.exports="Show Object Tree"},37809:e=>{e.exports="Show interval settings"},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports="Sun"},72149:e=>{e.exports="Sunday"},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports="Symbol title"},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports="Paid plans feature faster data updates."},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports="Real-time data for {description} is not supported right now. We may support it in the future."},6667:e=>{e.exports="Real-time data for {symbolName} is provided by {exchange} exchange."},48293:e=>{e.exports="Restore chart"},91029:e=>{e.exports="Restore pane"},75094:e=>{e.exports="Wed"},7147:e=>{e.exports="Wednesday"},52984:e=>{e.exports="To get real-time data for {description}, please buy the real-time data package."},9787:e=>{e.exports="Thu"},7951:e=>{e.exports="Thursday"},57918:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges."},68025:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}."},73717:e=>{e.exports="This symbol doesn't exist, please pick another one."},57048:e=>{e.exports="Time for a walk — this market is closed."},94316:e=>{e.exports="Tue"},44979:e=>{e.exports="Tuesday"},8209:e=>{e.exports="Unflag Symbol"},1111:e=>{e.exports="Volume"},61311:e=>{e.exports="Zoom in"},47602:e=>{e.exports="Zoom out"},57889:e=>{e.exports="change OHLC values visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},26717:e=>{e.exports="change symbol description visibility"},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports="change volume values visibility"},39348:e=>{e.exports="less than 1 minute"},87358:e=>{e.exports="show {title}"},7827:e=>{e.exports="{days} and {hours}"},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports="{hours} and {minutes}"},1084:e=>{e.exports="{listedExchange} real-time data is available for free to registered users."},11155:e=>{e.exports="{symbolName} data is delayed by {time} minutes."},77033:e=>{e.exports="Data is updated once every {amount} second, even if there are more updates on the market."},2121:e=>{e.exports="Data on our Basic plan is updated once every {amount} second, even if there are more updates on the market."},5223:e=>{e.exports="One update every {amount} second"},58609:e=>{e.exports="{number} day"},24430:e=>{e.exports="{number} hour"},67151:e=>{e.exports="{number} minute"}}]); \ No newline at end of file diff --git a/charting_library/bundles/es.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/es.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 88b68059..00000000 --- a/charting_library/bundles/es.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports=["barras"]},19648:e=>{e.exports=["12 horas"]},55838:e=>{e.exports=["24 horas"]},88364:e=>{e.exports=["Estilos básicos del gráfico"]},46720:e=>{e.exports=["Retícula"]},50985:e=>{e.exports=["Divisa"]},17319:e=>{e.exports=["Divisa y unidad"]},19481:e=>{e.exports=["Apariencia"]},68791:e=>{e.exports=["Argumentos"]},95036:e=>{e.exports=["Precio medio de cierre"]},27331:e=>{e.exports=["Fondo"]},22519:e=>{e.exports=["Valores de los cambios en la barra"]},87845:e=>{e.exports=["Botones"]},25209:e=>{e.exports=["Formato de fecha"]},55090:e=>{e.exports=["Día de la semana en las etiquetas"]},29601:e=>{e.exports=["Descripción"]},26897:e=>{e.exports=["Eventos"]},95338:e=>{e.exports=["Líneas horizontales en las cuadrículas"]},60971:e=>{e.exports=["Precio máximo y mínimo"]},61142:e=>{e.exports=["Indicadores"]},34905:e=>{e.exports=["Valor de los indicadores"]},29687:e=>{e.exports=["Valores de los indicadores y de la información financiera"]},25084:e=>{e.exports=["Nombre de los indicadores y de la información financiera"]},9654:e=>{e.exports=["Nombre de los indicadores"]},99487:e=>{e.exports=["Valores OHLC"]},75991:e=>{e.exports=["Situación de la apertura del mercado"]},70500:e=>{e.exports=["Dinero"]},66653:e=>{e.exports=["Márgenes"]},42502:e=>{e.exports=["Sin superposición"]},74343:e=>{e.exports=["Navegación"]},43115:e=>{e.exports=["Escalas"]},53224:e=>{e.exports=["Colocación de escalas"]},79194:e=>{e.exports=["Linea de estado"]},89053:e=>{e.exports=["Símbolo"]},35383:e=>{e.exports=["Nombre del símbolo"]},27767:e=>{e.exports=["Último precio del símbolo"]},40847:e=>{e.exports=["Precio de cierre del día anterior del símbolo"]},50446:e=>{e.exports=["Panel"]},73908:e=>{e.exports=["Separadores del panel"]},36014:e=>{e.exports=["Porcentaje"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports=["Precio pre/pos mercado"]},64859:e=>{e.exports=["Escala de precios"]},76523:e=>{e.exports=["Precio y valor porcentual"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Marca de agua"]},67369:e=>{e.exports=["Título"]},31326:e=>{e.exports=["Títulos"]},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports=["Ticker y descripción"]},43637:e=>{e.exports=["Escala de tiempo"]},97316:e=>{e.exports=["Formato de las horas"]},90801:e=>{e.exports="Trading"},77534:e=>{e.exports=["Unidad"]},1111:e=>{e.exports=["Volumen"]},80170:e=>{e.exports=["Valor conforme a la escala"]},91322:e=>{e.exports=["Valores"]},70353:e=>{e.exports=["Líneas verticales en las cuadrículas"]},57889:e=>{e.exports=["cambiar la visibilidad de los valores OHLC"]},35646:e=>{e.exports=["cambiar la visibilidad de los botones de navegación"]},18644:e=>{e.exports=["cambiar visibilidad de la situación de la apertura del mercado"]},45110:e=>{e.exports=["cambiar la visibilidad del cambio de barra"]},10349:e=>{e.exports=["cambiar el margen inferior"]},88161:e=>{e.exports=["cambiar la visibilidad de las etiquetas de divisas y unidades"]},79570:e=>{ -e.exports=["cambiar la visibilidad de la etiqueta de divisas"]},99011:e=>{e.exports=["cambiar el color de fondo del gráfico"]},72458:e=>{e.exports=["cambiar el tipo de fondo del gráfico"]},37034:e=>{e.exports=["cambiar el ancho de la retícula"]},29951:e=>{e.exports=["cambiar el color de la retícula"]},92027:e=>{e.exports=["cambiar el estilo de la retícula"]},50457:e=>{e.exports=["cambiar el formato de fecha"]},7104:e=>{e.exports=["cambiar día de la semana en las etiquetas"]},88096:e=>{e.exports=["cambiar el color de las líneas de la cuadrícula horizontal"]},2523:e=>{e.exports=["cambiar el estilo de las líneas de la cuadrícula de horizontal"]},31325:e=>{e.exports=["cambiar la visibilidad de los títulos de los indicadores"]},99774:e=>{e.exports=["cambiar la visibilidad de los valores de los indicadores"]},96162:e=>{e.exports=["cambiar la visibilidad de los argumentos de los indicadores"]},59820:e=>{e.exports=["cambiar la visibilidad de las etiquetas con el nombre de los indicadores y de la información financiera"]},90512:e=>{e.exports=["cambiar la visibilidad de las etiquetas con el valor de los indicadores y la información financiera"]},97956:e=>{e.exports=["cambiar la transparencia del fondo de la leyenda"]},61061:e=>{e.exports=["cambiar la visibilidad del fondo de la leyenda"]},37730:e=>{e.exports=["cambiar la visibilidad de los botones del panel"]},89032:e=>{e.exports=["Cambiar el color de los separadores de paneles"]},35636:e=>{e.exports=["cambiar el margen derecho"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["cambiar el color de la marca de agua del símbolo"]},87159:e=>{e.exports=["cambiar la visibilidad de la marca de agua del símbolo"]},26717:e=>{e.exports=["cambiar la visibilidad de la descripción del símbolo"]},28741:e=>{e.exports=["cambiar el modo del último valor del símbolo"]},95071:e=>{e.exports=["cambiar el formato de la leyenda del símbolo"]},35065:e=>{e.exports=["cambiar el color del texto de la escala"]},84382:e=>{e.exports=["cambiar tamaño de la fuente de la escala"]},12468:e=>{e.exports=["cambiar el color de la línea de la escala"]},71589:e=>{e.exports=["cambiar la visibilidad de las rupturas de las sesiones"]},15035:e=>{e.exports=["cambiar el ancho de las rupturas de las sesiones"]},1579:e=>{e.exports=["cambiar el color de las rupturas de las sesiones"]},21460:e=>{e.exports=["cambiar el estilo de las rupturas de las sesiones"]},76991:e=>{e.exports=["cambiar el formato de las horas"]},98905:e=>{e.exports=["cambiar el margen superior"]},7011:e=>{e.exports=["cambiar la visibilidad de la etiqueta de unidades"]},22722:e=>{e.exports=["cambiar el color de las líneas de la cuadrícula vertical"]},22867:e=>{e.exports=["cambiar el estilo de las líneas de la cuadrícula vertical"]},9455:e=>{e.exports=["cambiar la visibilidad de los valores de volumen"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/es.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/es.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..7946354e --- /dev/null +++ b/charting_library/bundles/es.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports=["barras"]},19648:e=>{e.exports=["12 horas"]},55838:e=>{e.exports=["24 horas"]},88364:e=>{e.exports=["Estilos básicos del gráfico"]},46720:e=>{e.exports=["Retícula"]},50985:e=>{e.exports=["Divisa"]},17319:e=>{e.exports=["Divisa y unidad"]},19481:e=>{e.exports=["Apariencia"]},68791:e=>{e.exports=["Argumentos"]},95036:e=>{e.exports=["Precio medio de cierre"]},27331:e=>{e.exports=["Fondo"]},22519:e=>{e.exports=["Valores de los cambios en la barra"]},87845:e=>{e.exports=["Botones"]},25209:e=>{e.exports=["Formato de fecha"]},55090:e=>{e.exports=["Día de la semana en las etiquetas"]},29601:e=>{e.exports=["Descripción"]},26897:e=>{e.exports=["Eventos"]},95338:e=>{e.exports=["Líneas horizontales en las cuadrículas"]},60971:e=>{e.exports=["Precio máximo y mínimo"]},61142:e=>{e.exports=["Indicadores"]},34905:e=>{e.exports=["Valor de los indicadores"]},29687:e=>{e.exports=["Valores de los indicadores y de la información financiera"]},25084:e=>{e.exports=["Nombre de los indicadores y de la información financiera"]},9654:e=>{e.exports=["Nombre de los indicadores"]},99487:e=>{e.exports=["Valores OHLC"]},75991:e=>{e.exports=["Situación de la apertura del mercado"]},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports=["Dinero"]},66653:e=>{e.exports=["Márgenes"]},42502:e=>{e.exports=["Sin superposición"]},74343:e=>{e.exports=["Navegación"]},43115:e=>{e.exports=["Escalas"]},53224:e=>{e.exports=["Colocación de escalas"]},79194:e=>{e.exports=["Linea de estado"]},89053:e=>{e.exports=["Símbolo"]},35383:e=>{e.exports=["Nombre del símbolo"]},27767:e=>{e.exports=["Último precio del símbolo"]},40847:e=>{e.exports=["Precio de cierre del día anterior del símbolo"]},50446:e=>{e.exports=["Panel"]},73908:e=>{e.exports=["Separadores del panel"]},36014:e=>{e.exports=["Porcentaje"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports=["Precio pre/pos mercado"]},64859:e=>{e.exports=["Escala de precios"]},76523:e=>{e.exports=["Precio y valor porcentual"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Marca de agua"]},67369:e=>{e.exports=["Título"]},31326:e=>{e.exports=["Títulos"]},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports=["Ticker y descripción"]},43637:e=>{e.exports=["Escala de tiempo"]},97316:e=>{e.exports=["Formato de las horas"]},90801:e=>{e.exports="Trading"},77534:e=>{e.exports=["Unidad"]},1111:e=>{e.exports=["Volumen"]},80170:e=>{e.exports=["Valor conforme a la escala"]},91322:e=>{e.exports=["Valores"]},70353:e=>{e.exports=["Líneas verticales en las cuadrículas"]},57889:e=>{e.exports=["cambiar la visibilidad de los valores OHLC"]},35646:e=>{e.exports=["cambiar la visibilidad de los botones de navegación"]},18644:e=>{e.exports=["cambiar visibilidad de la situación de la apertura del mercado"]},45110:e=>{e.exports=["cambiar la visibilidad del cambio de barra"]},10349:e=>{e.exports=["cambiar el margen inferior"]},88161:e=>{e.exports=["cambiar la visibilidad de las etiquetas de divisas y unidades"]},79570:e=>{ +e.exports=["cambiar la visibilidad de la etiqueta de divisas"]},99011:e=>{e.exports=["cambiar el color de fondo del gráfico"]},72458:e=>{e.exports=["cambiar el tipo de fondo del gráfico"]},37034:e=>{e.exports=["cambiar el ancho de la retícula"]},29951:e=>{e.exports=["cambiar el color de la retícula"]},92027:e=>{e.exports=["cambiar el estilo de la retícula"]},50457:e=>{e.exports=["cambiar el formato de fecha"]},7104:e=>{e.exports=["cambiar día de la semana en las etiquetas"]},88096:e=>{e.exports=["cambiar el color de las líneas de la cuadrícula horizontal"]},2523:e=>{e.exports=["cambiar el estilo de las líneas de la cuadrícula de horizontal"]},31325:e=>{e.exports=["cambiar la visibilidad de los títulos de los indicadores"]},99774:e=>{e.exports=["cambiar la visibilidad de los valores de los indicadores"]},96162:e=>{e.exports=["cambiar la visibilidad de los argumentos de los indicadores"]},59820:e=>{e.exports=["cambiar la visibilidad de las etiquetas con el nombre de los indicadores y de la información financiera"]},90512:e=>{e.exports=["cambiar la visibilidad de las etiquetas con el valor de los indicadores y la información financiera"]},97956:e=>{e.exports=["cambiar la transparencia del fondo de la leyenda"]},61061:e=>{e.exports=["cambiar la visibilidad del fondo de la leyenda"]},37730:e=>{e.exports=["cambiar la visibilidad de los botones del panel"]},89032:e=>{e.exports=["Cambiar el color de los separadores de paneles"]},35636:e=>{e.exports=["cambiar el margen derecho"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["cambiar el color de la marca de agua del símbolo"]},87159:e=>{e.exports=["cambiar la visibilidad de la marca de agua del símbolo"]},26717:e=>{e.exports=["cambiar la visibilidad de la descripción del símbolo"]},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports=["cambiar el modo del último valor del símbolo"]},95071:e=>{e.exports=["cambiar el formato de la leyenda del símbolo"]},35065:e=>{e.exports=["cambiar el color del texto de la escala"]},84382:e=>{e.exports=["cambiar tamaño de la fuente de la escala"]},12468:e=>{e.exports=["cambiar el color de la línea de la escala"]},71589:e=>{e.exports=["cambiar la visibilidad de las rupturas de las sesiones"]},15035:e=>{e.exports=["cambiar el ancho de las rupturas de las sesiones"]},1579:e=>{e.exports=["cambiar el color de las rupturas de las sesiones"]},21460:e=>{e.exports=["cambiar el estilo de las rupturas de las sesiones"]},76991:e=>{e.exports=["cambiar el formato de las horas"]},98905:e=>{e.exports=["cambiar el margen superior"]},7011:e=>{e.exports=["cambiar la visibilidad de la etiqueta de unidades"]},22722:e=>{e.exports=["cambiar el color de las líneas de la cuadrícula vertical"]},22867:e=>{e.exports=["cambiar el estilo de las líneas de la cuadrícula vertical"]},9455:e=>{e.exports=["cambiar la visibilidad de los valores de volumen"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/es.6847.490ee46270bef6a878dd.js b/charting_library/bundles/es.7257.089fbbc28bead9558b87.js similarity index 52% rename from charting_library/bundles/es.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/es.7257.089fbbc28bead9558b87.js index c41c85eb..2b04baa7 100644 --- a/charting_library/bundles/es.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/es.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports=["V"]},11268:e=>{e.exports=["L"]},63331:e=>{e.exports=["Sáb"]},85954:e=>{e.exports=["Do"]},26230:e=>{e.exports=["X"]},24793:e=>{e.exports=["Ju"]},31533:e=>{e.exports=["Ma"]},89790:e=>{e.exports=["No se pudo obtener el código fuente Pine."]},39589:e=>{e.exports=["Colapsar panel"]},38154:e=>{e.exports=["Confirmar Quitar árbol de estudio"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Crea una cuenta gratuita"]},69419:e=>{e.exports=["Todo va bien: el mercado está abierto."]},97637:e=>{e.exports=["Abril"]},86797:e=>{e.exports=["Agosto"]},22519:e=>{e.exports=["Valores de los cambios en la barra"]},52003:e=>{e.exports=["¿Está seguro de que desea eliminar el estudio y todos sus hijos?"]},68854:e=>{e.exports=["Haga doble clic"]},97325:e=>{e.exports=["Error en los datos"]},52916:e=>{e.exports=["Los datos se actualizan una vez al día."]},25978:e=>{e.exports=["Los datos se actualizan una vez por segundo, aunque entre medias haya más actualizaciones en el mercado."]},57310:e=>{e.exports=["Los datos se retrasan"]},49321:e=>{e.exports=["Los datos que se proporcionan en el plan básico se actualizan una vez por segundo, aunque entre medias haya más actualizaciones en el mercado."]},55669:e=>{e.exports=["Diciembre"]},83498:e=>{e.exports=["Eliminar panel"]},59315:e=>{e.exports=["Datos de cierre diario"]},82751:e=>{e.exports="Error"},40519:e=>{e.exports=["Buenas. El mercado está abierto para el trading posmercado."]},80227:e=>{e.exports=["Zona horaria del mercado de valores"]},16467:e=>{e.exports=["Febrero"]},25046:e=>{e.exports=["Complete los acuerdos de los mercados de valores"]},93666:e=>{e.exports=["Marcar el símbolo"]},564:e=>{e.exports=["Vi"]},72970:e=>{e.exports=["Viernes"]},88958:e=>{e.exports=["Festivo"]},21686:e=>{e.exports=["Ocultar la leyenda del indicador"]},26935:e=>{e.exports=["Argumentos de los indicadores"]},26315:e=>{e.exports=["Títulos de los indicadores"]},84098:e=>{e.exports=["Valores de los indicadores"]},91459:e=>{e.exports=["Si desea obtener datos en tiempo real de {listedExchange}, deberá completar un Acuerdo del mercado de valores. No se preocupe, le llevará poco tiempo."]},50634:e=>{e.exports=["La sesión de trading posmercado comenzará en {remainingTime}."]},74537:e=>{e.exports=["El trading premercado dará comienzo en {remainingTime}."]},26910:e=>{e.exports=["Enero"]},23230:e=>{e.exports=["Julio"]},49385:e=>{e.exports=["Junio"]},99487:e=>{e.exports=["Valores OHLC"]},15815:e=>{e.exports=["Una actualización por segundo"]},90784:e=>{e.exports=["Octubre"]},75991:e=>{e.exports=["Situación de la apertura del mercado"]},18429:e=>{e.exports=["Más información"]},39899:e=>{e.exports=["Mover panel hacia abajo"]},70343:e=>{e.exports=["Mover panel hacia arriba"]},83085:e=>{e.exports=["Lu"]},61199:e=>{e.exports=["Lunes"]},41610:e=>{e.exports=["Más"]},1653:e=>{e.exports=["Buenos días. El mercado está abierto solo para sesiones de negociación premercado."]},56470:e=>{e.exports=["Maximizar gráfico"]},19603:e=>{ -e.exports=["Maximizar panel"]},68327:e=>{e.exports=["Mayo"]},35732:e=>{e.exports=["Gestionar paneles"]},84675:e=>{e.exports=["Marzo"]},83949:e=>{e.exports=["Mercado abierto"]},35701:e=>{e.exports=["El mercado abre en {remainingTime}."]},95814:e=>{e.exports=["Mercado cerrado"]},98105:e=>{e.exports=["El mercado cierra en {remainingTime}."]},87202:e=>{e.exports=["El mercado está actualmente de vacaciones. ¡Qué suerte!"]},71194:e=>{e.exports=["Noviembre"]},66324:e=>{e.exports=["Código fuente"]},36835:e=>{e.exports=["Sáb"]},1144:e=>{e.exports=["Sábado"]},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports=["Septiembre"]},28705:e=>{e.exports=["Mostrar la leyenda del indicador"]},51072:e=>{e.exports=["Mostrar árbol de objetos"]},37809:e=>{e.exports=["Mostrar la configuración de los intervalos"]},39045:e=>{e.exports=["Error de estudio"]},86577:e=>{e.exports=["Do"]},72149:e=>{e.exports=["Domingo"]},39339:e=>{e.exports=["Título del símbolo"]},29985:e=>{e.exports=["Posmercado"]},28412:e=>{e.exports=["Las actualizaciones de datos de los planes de pago son más rápidas."]},56042:e=>{e.exports=["Premercado"]},36015:e=>{e.exports=["En la actualidad, no se encuentran disponibles los datos en tiempo real para {description}. No obstante, es posible que se pueda acceder a dichos datos en el futuro."]},6667:e=>{e.exports=["{exchange} proporciona datos en tiempo real para {symbolName}."]},48293:e=>{e.exports=["Restaurar gráfico"]},91029:e=>{e.exports=["Restaurar panel"]},75094:e=>{e.exports=["Mi"]},7147:e=>{e.exports=["Miércoles"]},52984:e=>{e.exports=["Si desea obtener datos en tiempo real para {description}, compre el paquete de datos en tiempo real."]},9787:e=>{e.exports=["Jue"]},7951:e=>{e.exports=["Jueves"]},57918:e=>{e.exports=["Estos datos se muestran en tiempo real, aunque difieren un poco respecto a los de la contraparte oficial de los principales mercados de valores."]},68025:e=>{e.exports=["Estos datos se muestran en tiempo real, pero difieren un poco respecto a los de la contraparte oficial recibidos de {exchange}."]},73717:e=>{e.exports=["Ese símbolo no existe. Por favor, elija otro."]},57048:e=>{e.exports=["Es tiempo de dar un paseo: este mercado está cerrado."]},94316:e=>{e.exports=["Mar"]},44979:e=>{e.exports=["Martes"]},8209:e=>{e.exports=["Desmarcar el símbolo"]},1111:e=>{e.exports=["Volumen"]},61311:e=>{e.exports=["Aumentar"]},47602:e=>{e.exports=["Alejar"]},57889:e=>{e.exports=["cambiar la visibilidad de los valores OHLC"]},18644:e=>{e.exports=["cambiar visibilidad de la situación de la apertura del mercado"]},45110:e=>{e.exports=["cambiar la visibilidad del cambio de barra"]},31325:e=>{e.exports=["cambiar la visibilidad de los títulos de los indicadores"]},99774:e=>{e.exports=["cambiar la visibilidad de los valores de los indicadores"]},96162:e=>{e.exports=["cambiar la visibilidad de los argumentos de los indicadores"]},26717:e=>{e.exports=["cambiar la visibilidad de la descripción del símbolo"]},9455:e=>{ -e.exports=["cambiar la visibilidad de los valores de volumen"]},39348:e=>{e.exports=["menos de 1 minuto"]},87358:e=>{e.exports=["mostrar {title}"]},7827:e=>{e.exports=["{days} y {hours}"]},7435:e=>{e.exports=["{exchange} por {originalExchange}"]},19830:e=>{e.exports=["{hours} y {minutes}"]},1084:e=>{e.exports=["Los usuarios registrados tienen disponibles, de forma gratuita, los datos en tiempo real de {listedExchange}."]},11155:e=>{e.exports=["Los datos de {symbolName} se retrasan {time} minutos"]},77033:e=>{e.exports=["Los datos se actualizan una vez cada {amount} segundo, aunque haya más actualizaciones en el mercado.","Los datos se actualizan una vez cada {amount} segundos, aunque haya más actualizaciones en el mercado."]},2121:e=>{e.exports=["Los datos de nuestro plan Básico se actualizan una vez cada {amount} segundo, aunque haya más actualizaciones en el mercado.","Los datos de nuestro plan Básico se actualizan una vez cada {amount} segundos, aunque haya más actualizaciones en el mercado."]},5223:e=>{e.exports=["Una actualización cada {amount} segundo","Una actualización cada {amount} segundos"]},58609:e=>{e.exports=["{number} día","{number} días"]},24430:e=>{e.exports=["{number} hora","{number} horas"]},67151:e=>{e.exports=["{number} minuto","{number} minutos"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports=["V"]},11268:e=>{e.exports=["L"]},63331:e=>{e.exports=["Sáb"]},85954:e=>{e.exports=["Do"]},26230:e=>{e.exports=["X"]},24793:e=>{e.exports=["Ju"]},31533:e=>{e.exports=["Ma"]},89790:e=>{e.exports=["No se pudo obtener el código fuente Pine."]},39589:e=>{e.exports=["Colapsar panel"]},38154:e=>{e.exports=["Confirmar Quitar árbol de estudio"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Crea una cuenta gratuita"]},69419:e=>{e.exports=["Todo va bien: el mercado está abierto."]},97637:e=>{e.exports=["Abril"]},86797:e=>{e.exports=["Agosto"]},22519:e=>{e.exports=["Valores de los cambios en la barra"]},52003:e=>{e.exports=["¿Está seguro de que desea eliminar el estudio y todos sus hijos?"]},68854:e=>{e.exports=["Haga doble clic"]},97325:e=>{e.exports=["Error en los datos"]},52916:e=>{e.exports=["Los datos se actualizan una vez al día."]},25978:e=>{e.exports=["Los datos se actualizan una vez por segundo, aunque entre medias haya más actualizaciones en el mercado."]},57310:e=>{e.exports=["Los datos se retrasan"]},49321:e=>{e.exports=["Los datos que se proporcionan en el plan básico se actualizan una vez por segundo, aunque entre medias haya más actualizaciones en el mercado."]},55669:e=>{e.exports=["Diciembre"]},83498:e=>{e.exports=["Eliminar panel"]},59315:e=>{e.exports=["Datos de cierre diario"]},82751:e=>{e.exports="Error"},40519:e=>{e.exports=["Buenas. El mercado está abierto para el trading posmercado."]},80227:e=>{e.exports=["Zona horaria del mercado de valores"]},16467:e=>{e.exports=["Febrero"]},25046:e=>{e.exports=["Complete los acuerdos de los mercados de valores"]},93666:e=>{e.exports=["Marcar el símbolo"]},564:e=>{e.exports=["Vi"]},72970:e=>{e.exports=["Viernes"]},88958:e=>{e.exports=["Festivo"]},21686:e=>{e.exports=["Ocultar la leyenda del indicador"]},26935:e=>{e.exports=["Argumentos de los indicadores"]},26315:e=>{e.exports=["Títulos de los indicadores"]},84098:e=>{e.exports=["Valores de los indicadores"]},91459:e=>{e.exports=["Si desea obtener datos en tiempo real de {listedExchange}, deberá completar un Acuerdo del mercado de valores. No se preocupe, le llevará poco tiempo."]},50634:e=>{e.exports=["La sesión de trading posmercado comenzará en {remainingTime}."]},74537:e=>{e.exports=["El trading premercado dará comienzo en {remainingTime}."]},26910:e=>{e.exports=["Enero"]},23230:e=>{e.exports=["Julio"]},49385:e=>{e.exports=["Junio"]},99487:e=>{e.exports=["Valores OHLC"]},15815:e=>{e.exports=["Una actualización por segundo"]},90784:e=>{e.exports=["Octubre"]},75991:e=>{e.exports=["Situación de la apertura del mercado"]},18429:e=>{e.exports=["Más información"]},39899:e=>{e.exports=["Mover panel hacia abajo"]},70343:e=>{e.exports=["Mover panel hacia arriba"]},83085:e=>{e.exports=["Lu"]},61199:e=>{e.exports=["Lunes"]},41610:e=>{e.exports=["Más"]},1653:e=>{e.exports=["Buenos días. El mercado está abierto solo para sesiones de negociación premercado."]},56470:e=>{e.exports=["Maximizar gráfico"]},19603:e=>{ +e.exports=["Maximizar panel"]},68327:e=>{e.exports=["Mayo"]},35732:e=>{e.exports=["Gestionar paneles"]},84675:e=>{e.exports=["Marzo"]},83949:e=>{e.exports=["Mercado abierto"]},35701:e=>{e.exports=["El mercado abre en {remainingTime}."]},95814:e=>{e.exports=["Mercado cerrado"]},98105:e=>{e.exports=["El mercado cierra en {remainingTime}."]},87202:e=>{e.exports=["El mercado está actualmente de vacaciones. ¡Qué suerte!"]},71194:e=>{e.exports=["Noviembre"]},66324:e=>{e.exports=["Código fuente"]},36835:e=>{e.exports=["Sáb"]},1144:e=>{e.exports=["Sábado"]},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports=["Septiembre"]},28705:e=>{e.exports=["Mostrar la leyenda del indicador"]},51072:e=>{e.exports=["Mostrar árbol de objetos"]},37809:e=>{e.exports=["Mostrar la configuración de los intervalos"]},39045:e=>{e.exports=["Error de estudio"]},86577:e=>{e.exports=["Do"]},72149:e=>{e.exports=["Domingo"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["Título del símbolo"]},29985:e=>{e.exports=["Posmercado"]},28412:e=>{e.exports=["Las actualizaciones de datos de los planes de pago son más rápidas."]},56042:e=>{e.exports=["Premercado"]},36015:e=>{e.exports=["En la actualidad, no se encuentran disponibles los datos en tiempo real para {description}. No obstante, es posible que se pueda acceder a dichos datos en el futuro."]},6667:e=>{e.exports=["{exchange} proporciona datos en tiempo real para {symbolName}."]},48293:e=>{e.exports=["Restaurar gráfico"]},91029:e=>{e.exports=["Restaurar panel"]},75094:e=>{e.exports=["Mi"]},7147:e=>{e.exports=["Miércoles"]},52984:e=>{e.exports=["Si desea obtener datos en tiempo real para {description}, compre el paquete de datos en tiempo real."]},9787:e=>{e.exports=["Jue"]},7951:e=>{e.exports=["Jueves"]},57918:e=>{e.exports=["Estos datos se muestran en tiempo real, aunque difieren un poco respecto a los de la contraparte oficial de los principales mercados de valores."]},68025:e=>{e.exports=["Estos datos se muestran en tiempo real, pero difieren un poco respecto a los de la contraparte oficial recibidos de {exchange}."]},73717:e=>{e.exports=["Ese símbolo no existe. Por favor, elija otro."]},57048:e=>{e.exports=["Es tiempo de dar un paseo: este mercado está cerrado."]},94316:e=>{e.exports=["Mar"]},44979:e=>{e.exports=["Martes"]},8209:e=>{e.exports=["Desmarcar el símbolo"]},1111:e=>{e.exports=["Volumen"]},61311:e=>{e.exports=["Aumentar"]},47602:e=>{e.exports=["Alejar"]},57889:e=>{e.exports=["cambiar la visibilidad de los valores OHLC"]},18644:e=>{e.exports=["cambiar visibilidad de la situación de la apertura del mercado"]},45110:e=>{e.exports=["cambiar la visibilidad del cambio de barra"]},31325:e=>{e.exports=["cambiar la visibilidad de los títulos de los indicadores"]},99774:e=>{e.exports=["cambiar la visibilidad de los valores de los indicadores"]},96162:e=>{e.exports=["cambiar la visibilidad de los argumentos de los indicadores"]},26717:e=>{ +e.exports=["cambiar la visibilidad de la descripción del símbolo"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["cambiar la visibilidad de los valores de volumen"]},39348:e=>{e.exports=["menos de 1 minuto"]},87358:e=>{e.exports=["mostrar {title}"]},7827:e=>{e.exports=["{days} y {hours}"]},7435:e=>{e.exports=["{exchange} por {originalExchange}"]},19830:e=>{e.exports=["{hours} y {minutes}"]},1084:e=>{e.exports=["Los usuarios registrados tienen disponibles, de forma gratuita, los datos en tiempo real de {listedExchange}."]},11155:e=>{e.exports=["Los datos de {symbolName} se retrasan {time} minutos"]},77033:e=>{e.exports=["Los datos se actualizan una vez cada {amount} segundo, aunque haya más actualizaciones en el mercado.","Los datos se actualizan una vez cada {amount} segundos, aunque haya más actualizaciones en el mercado."]},2121:e=>{e.exports=["Los datos de nuestro plan Básico se actualizan una vez cada {amount} segundo, aunque haya más actualizaciones en el mercado.","Los datos de nuestro plan Básico se actualizan una vez cada {amount} segundos, aunque haya más actualizaciones en el mercado."]},5223:e=>{e.exports=["Una actualización cada {amount} segundo","Una actualización cada {amount} segundos"]},58609:e=>{e.exports=["{number} día","{number} días"]},24430:e=>{e.exports=["{number} hora","{number} horas"]},67151:e=>{e.exports=["{number} minuto","{number} minutos"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/fa.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/fa.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index a72e6c07..00000000 --- a/charting_library/bundles/fa.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports="bars"},19648:e=>{e.exports="12-hours"},55838:e=>{e.exports="24-hours"},88364:e=>{e.exports="Chart basic styles"},46720:e=>{e.exports=["نشانه‌گر"]},50985:e=>{e.exports="Currency"},17319:e=>{e.exports="Currency and Unit"},19481:e=>{e.exports="Appearance"},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports="Average close price"},27331:e=>{e.exports=["پس‌زمینه"]},22519:e=>{e.exports=["Bar Change Values"]},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports=["Date Format"]},55090:e=>{e.exports="Day of week on labels"},29601:e=>{e.exports=["شرح"]},26897:e=>{e.exports=["وقایع"]},95338:e=>{e.exports=["Horz Grid Lines"]},60971:e=>{e.exports="High and low price"},61142:e=>{e.exports=["اندیکاتورها"]},34905:e=>{e.exports="Indicators value"},29687:e=>{e.exports="Indicators and financials value"},25084:e=>{e.exports="Indicators and financials name"},9654:e=>{e.exports="Indicators name"},99487:e=>{e.exports=["OHLC Values"]},75991:e=>{e.exports="Open market status"},70500:e=>{e.exports="Money"},66653:e=>{e.exports="Margins"},42502:e=>{e.exports="No overlapping"},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports=["محورها"]},53224:e=>{e.exports="Scales placement"},79194:e=>{e.exports="Status line"},89053:e=>{e.exports=["نماد"]},35383:e=>{e.exports=["Symbol Name"]},27767:e=>{e.exports="Symbol last price"},40847:e=>{e.exports="Symbol previous day close price"},50446:e=>{e.exports="Pane"},73908:e=>{e.exports="Pane separators"},36014:e=>{e.exports=["مقیاس درصدی"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports="Pre/post market price"},64859:e=>{e.exports="Price Scale"},76523:e=>{e.exports="Price and percentage value"},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["رنگ نماد پس زمینه"]},67369:e=>{e.exports="Title"},31326:e=>{e.exports="Titles"},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports="Ticker and description"},43637:e=>{e.exports="Time Scale"},97316:e=>{e.exports="Time hours format"},90801:e=>{e.exports="Trading"},77534:e=>{e.exports="Unit"},1111:e=>{e.exports=["حجم"]},80170:e=>{e.exports="Value according to scale"},91322:e=>{e.exports="Values"},70353:e=>{e.exports=["Vert Grid Lines"]},57889:e=>{e.exports="change OHLC values visibility"},35646:e=>{e.exports="change navigation buttons visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},10349:e=>{e.exports="change bottom margin"},88161:e=>{e.exports="change currency and unit labels visibility"},79570:e=>{e.exports="change currency label visibility"},99011:e=>{e.exports="change chart background color"},72458:e=>{e.exports="change chart background type"},37034:e=>{e.exports="change crosshair width"},29951:e=>{e.exports="change crosshair color"},92027:e=>{e.exports="change crosshair style"},50457:e=>{e.exports="change date format"},7104:e=>{e.exports="change day of week on labels"},88096:e=>{e.exports="change horz grid lines color"},2523:e=>{e.exports="change horz grid lines style"},31325:e=>{ -e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},59820:e=>{e.exports="change indicators and financials name labels visibility"},90512:e=>{e.exports="change indicators and financials value labels visibility"},97956:e=>{e.exports="change legend background transparency"},61061:e=>{e.exports="change legend background visibility"},37730:e=>{e.exports="change pane buttons visibility"},89032:e=>{e.exports="change pane separators color"},35636:e=>{e.exports="change right margin"},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports="change symbol watermark color"},87159:e=>{e.exports="change symbol watermark visibility"},26717:e=>{e.exports="change symbol description visibility"},28741:e=>{e.exports="change symbol last value mode"},95071:e=>{e.exports="change symbol legend format"},35065:e=>{e.exports="change scales text color"},84382:e=>{e.exports="change scales font size"},12468:e=>{e.exports="change scales lines color"},71589:e=>{e.exports="change sessions breaks visibility"},15035:e=>{e.exports="change sessions breaks width"},1579:e=>{e.exports="change sessions breaks color"},21460:e=>{e.exports="change sessions breaks style"},76991:e=>{e.exports="change time hours format"},98905:e=>{e.exports="change top margin"},7011:e=>{e.exports="change unit label visibility"},22722:e=>{e.exports="change vert grid lines color"},22867:e=>{e.exports="change vert grid lines style"},9455:e=>{e.exports="change volume values visibility"}}]); \ No newline at end of file diff --git a/charting_library/bundles/fa.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/fa.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..d131cb6b --- /dev/null +++ b/charting_library/bundles/fa.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports="bars"},19648:e=>{e.exports="12-hours"},55838:e=>{e.exports="24-hours"},88364:e=>{e.exports="Chart basic styles"},46720:e=>{e.exports=["نشانه‌گر"]},50985:e=>{e.exports="Currency"},17319:e=>{e.exports="Currency and Unit"},19481:e=>{e.exports="Appearance"},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports="Average close price"},27331:e=>{e.exports=["پس‌زمینه"]},22519:e=>{e.exports=["Bar Change Values"]},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports=["Date Format"]},55090:e=>{e.exports="Day of week on labels"},29601:e=>{e.exports=["شرح"]},26897:e=>{e.exports=["وقایع"]},95338:e=>{e.exports=["Horz Grid Lines"]},60971:e=>{e.exports="High and low price"},61142:e=>{e.exports=["اندیکاتورها"]},34905:e=>{e.exports="Indicators value"},29687:e=>{e.exports="Indicators and financials value"},25084:e=>{e.exports="Indicators and financials name"},9654:e=>{e.exports="Indicators name"},99487:e=>{e.exports=["OHLC Values"]},75991:e=>{e.exports="Open market status"},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports="Money"},66653:e=>{e.exports="Margins"},42502:e=>{e.exports="No overlapping"},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports=["محورها"]},53224:e=>{e.exports="Scales placement"},79194:e=>{e.exports="Status line"},89053:e=>{e.exports=["نماد"]},35383:e=>{e.exports=["Symbol Name"]},27767:e=>{e.exports="Symbol last price"},40847:e=>{e.exports="Symbol previous day close price"},50446:e=>{e.exports="Pane"},73908:e=>{e.exports="Pane separators"},36014:e=>{e.exports=["مقیاس درصدی"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports="Pre/post market price"},64859:e=>{e.exports="Price Scale"},76523:e=>{e.exports="Price and percentage value"},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["رنگ نماد پس زمینه"]},67369:e=>{e.exports="Title"},31326:e=>{e.exports="Titles"},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports="Ticker and description"},43637:e=>{e.exports="Time Scale"},97316:e=>{e.exports="Time hours format"},90801:e=>{e.exports="Trading"},77534:e=>{e.exports="Unit"},1111:e=>{e.exports=["حجم"]},80170:e=>{e.exports="Value according to scale"},91322:e=>{e.exports="Values"},70353:e=>{e.exports=["Vert Grid Lines"]},57889:e=>{e.exports="change OHLC values visibility"},35646:e=>{e.exports="change navigation buttons visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},10349:e=>{e.exports="change bottom margin"},88161:e=>{e.exports="change currency and unit labels visibility"},79570:e=>{e.exports="change currency label visibility"},99011:e=>{e.exports="change chart background color"},72458:e=>{e.exports="change chart background type"},37034:e=>{e.exports="change crosshair width"},29951:e=>{e.exports="change crosshair color"},92027:e=>{e.exports="change crosshair style"},50457:e=>{e.exports="change date format"},7104:e=>{e.exports="change day of week on labels"},88096:e=>{e.exports="change horz grid lines color"},2523:e=>{ +e.exports="change horz grid lines style"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},59820:e=>{e.exports="change indicators and financials name labels visibility"},90512:e=>{e.exports="change indicators and financials value labels visibility"},97956:e=>{e.exports="change legend background transparency"},61061:e=>{e.exports="change legend background visibility"},37730:e=>{e.exports="change pane buttons visibility"},89032:e=>{e.exports="change pane separators color"},35636:e=>{e.exports="change right margin"},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports="change symbol watermark color"},87159:e=>{e.exports="change symbol watermark visibility"},26717:e=>{e.exports="change symbol description visibility"},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports="change symbol last value mode"},95071:e=>{e.exports="change symbol legend format"},35065:e=>{e.exports="change scales text color"},84382:e=>{e.exports="change scales font size"},12468:e=>{e.exports="change scales lines color"},71589:e=>{e.exports="change sessions breaks visibility"},15035:e=>{e.exports="change sessions breaks width"},1579:e=>{e.exports="change sessions breaks color"},21460:e=>{e.exports="change sessions breaks style"},76991:e=>{e.exports="change time hours format"},98905:e=>{e.exports="change top margin"},7011:e=>{e.exports="change unit label visibility"},22722:e=>{e.exports="change vert grid lines color"},22867:e=>{e.exports="change vert grid lines style"},9455:e=>{e.exports="change volume values visibility"}}]); \ No newline at end of file diff --git a/charting_library/bundles/fa.6847.490ee46270bef6a878dd.js b/charting_library/bundles/fa.7257.089fbbc28bead9558b87.js similarity index 55% rename from charting_library/bundles/fa.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/fa.7257.089fbbc28bead9558b87.js index 8b0c72a4..07372d9e 100644 --- a/charting_library/bundles/fa.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/fa.7257.089fbbc28bead9558b87.js @@ -1,2 +1,2 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports="Could not get Pine source code."},39589:e=>{e.exports="Collapse pane"},38154:e=>{e.exports="Confirm Remove Study Tree"},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports="Create a free account"},69419:e=>{e.exports="All's well — Market is open."},97637:e=>{e.exports=["آوریل"]},86797:e=>{e.exports=["آگوست"]},22519:e=>{e.exports=["Bar Change Values"]},52003:e=>{e.exports="Do you really want to delete study and all of it's children?"},68854:e=>{e.exports="Double click"},97325:e=>{e.exports="Data error"},52916:e=>{e.exports="Data is updated once a day."},25978:e=>{e.exports="Data is updated once per second, even if there are more updates on the market."},57310:e=>{e.exports="Data is delayed"},49321:e=>{e.exports="Data on our Basic plan is updated once per second, even if there are more updates on the market."},55669:e=>{e.exports=["دسامبر"]},83498:e=>{e.exports="Delete pane"},59315:e=>{e.exports="End of day data"},82751:e=>{e.exports=["خطا"]},40519:e=>{e.exports="Evening. Market is open for post-market trading."},80227:e=>{e.exports="Exchange timezone"},16467:e=>{e.exports="February"},25046:e=>{e.exports="Fill out Exchange Agreements"},93666:e=>{e.exports="Flag Symbol"},564:e=>{e.exports="Fri"},72970:e=>{e.exports="Friday"},88958:e=>{e.exports="Holiday"},21686:e=>{e.exports="Hide Indicator Legend"},26935:e=>{e.exports=["Indicator Arguments"]},26315:e=>{e.exports=["عنوان اندیکاتور"]},84098:e=>{e.exports=["مقادیر اندیکاتور"]},91459:e=>{e.exports="If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"},50634:e=>{e.exports="It'll go to post-market trading in {remainingTime}."},74537:e=>{e.exports="It'll open for pre-market trading in {remainingTime}."},26910:e=>{e.exports="January"},23230:e=>{e.exports="July"},49385:e=>{e.exports="June"},99487:e=>{e.exports=["OHLC Values"]},15815:e=>{e.exports="One update per second"},90784:e=>{e.exports="October"},75991:e=>{e.exports="Open market status"},18429:e=>{e.exports="Learn more"},39899:e=>{e.exports="Move pane down"},70343:e=>{e.exports="Move pane up"},83085:e=>{e.exports="Mon"},61199:e=>{e.exports="Monday"},41610:e=>{e.exports=["بیشتر"]},1653:e=>{e.exports="Morning. Market is open for pre-market trading."},56470:e=>{e.exports="Maximize chart"},19603:e=>{e.exports="Maximize pane"},68327:e=>{e.exports=["می"]},35732:e=>{e.exports="Manage panes"},84675:e=>{e.exports="March"},83949:e=>{e.exports="Market open"},35701:e=>{e.exports="Market opens in {remainingTime}."},95814:e=>{e.exports="Market closed"},98105:e=>{e.exports="Market closes in {remainingTime}."},87202:e=>{e.exports="Market is currently on holiday. Lucky them."},71194:e=>{e.exports="November"},66324:e=>{e.exports="Source code"},36835:e=>{e.exports="Sat"},1144:e=>{ -e.exports="Saturday"},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports="September"},28705:e=>{e.exports="Show Indicator Legend"},51072:e=>{e.exports="Show Object Tree"},37809:e=>{e.exports="Show interval settings"},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports="Sun"},72149:e=>{e.exports="Sunday"},39339:e=>{e.exports="Symbol title"},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports="Paid plans feature faster data updates."},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports="Real-time data for {description} is not supported right now. We may support it in the future."},6667:e=>{e.exports="Real-time data for {symbolName} is provided by {exchange} exchange."},48293:e=>{e.exports="Restore chart"},91029:e=>{e.exports="Restore pane"},75094:e=>{e.exports="Wed"},7147:e=>{e.exports="Wednesday"},52984:e=>{e.exports="To get real-time data for {description}, please buy the real-time data package."},9787:e=>{e.exports="Thu"},7951:e=>{e.exports="Thursday"},57918:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges."},68025:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}."},73717:e=>{e.exports="This symbol doesn't exist, please pick another one."},57048:e=>{e.exports="Time for a walk — this market is closed."},94316:e=>{e.exports="Tue"},44979:e=>{e.exports="Tuesday"},8209:e=>{e.exports="Unflag Symbol"},1111:e=>{e.exports=["حجم"]},61311:e=>{e.exports=["بزرگ نمایی"]},47602:e=>{e.exports=["کوچک نمایی"]},57889:e=>{e.exports="change OHLC values visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},26717:e=>{e.exports="change symbol description visibility"},9455:e=>{e.exports="change volume values visibility"},39348:e=>{e.exports="less than 1 minute"},87358:e=>{e.exports="show {title}"},7827:e=>{e.exports="{days} and {hours}"},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports="{hours} and {minutes}"},1084:e=>{e.exports="{listedExchange} real-time data is available for free to registered users."},11155:e=>{e.exports="{symbolName} data is delayed by {time} minutes."},77033:e=>{e.exports=["Data is updated once every {amount} seconds, even if there are more updates on the market."]},2121:e=>{e.exports=["Data on our Basic plan is updated once every {amount} seconds, even if there are more updates on the market."]},5223:e=>{e.exports=["One update every {amount} seconds"]},58609:e=>{e.exports=["{number} days"]},24430:e=>{e.exports=["{number} hours"]},67151:e=>{e.exports=["{number} minutes"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports="Could not get Pine source code."},39589:e=>{e.exports="Collapse pane"},38154:e=>{e.exports="Confirm Remove Study Tree"},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports="Create a free account"},69419:e=>{e.exports="All's well — Market is open."},97637:e=>{e.exports=["آوریل"]},86797:e=>{e.exports=["آگوست"]},22519:e=>{e.exports=["Bar Change Values"]},52003:e=>{e.exports="Do you really want to delete study and all of it's children?"},68854:e=>{e.exports="Double click"},97325:e=>{e.exports="Data error"},52916:e=>{e.exports="Data is updated once a day."},25978:e=>{e.exports="Data is updated once per second, even if there are more updates on the market."},57310:e=>{e.exports="Data is delayed"},49321:e=>{e.exports="Data on our Basic plan is updated once per second, even if there are more updates on the market."},55669:e=>{e.exports=["دسامبر"]},83498:e=>{e.exports="Delete pane"},59315:e=>{e.exports="End of day data"},82751:e=>{e.exports=["خطا"]},40519:e=>{e.exports="Evening. Market is open for post-market trading."},80227:e=>{e.exports="Exchange timezone"},16467:e=>{e.exports="February"},25046:e=>{e.exports="Fill out Exchange Agreements"},93666:e=>{e.exports="Flag Symbol"},564:e=>{e.exports="Fri"},72970:e=>{e.exports="Friday"},88958:e=>{e.exports="Holiday"},21686:e=>{e.exports="Hide Indicator Legend"},26935:e=>{e.exports=["Indicator Arguments"]},26315:e=>{e.exports=["عنوان اندیکاتور"]},84098:e=>{e.exports=["مقادیر اندیکاتور"]},91459:e=>{e.exports="If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"},50634:e=>{e.exports="It'll go to post-market trading in {remainingTime}."},74537:e=>{e.exports="It'll open for pre-market trading in {remainingTime}."},26910:e=>{e.exports="January"},23230:e=>{e.exports="July"},49385:e=>{e.exports="June"},99487:e=>{e.exports=["OHLC Values"]},15815:e=>{e.exports="One update per second"},90784:e=>{e.exports="October"},75991:e=>{e.exports="Open market status"},18429:e=>{e.exports="Learn more"},39899:e=>{e.exports="Move pane down"},70343:e=>{e.exports="Move pane up"},83085:e=>{e.exports="Mon"},61199:e=>{e.exports="Monday"},41610:e=>{e.exports=["بیشتر"]},1653:e=>{e.exports="Morning. Market is open for pre-market trading."},56470:e=>{e.exports="Maximize chart"},19603:e=>{e.exports="Maximize pane"},68327:e=>{e.exports=["می"]},35732:e=>{e.exports="Manage panes"},84675:e=>{e.exports="March"},83949:e=>{e.exports="Market open"},35701:e=>{e.exports="Market opens in {remainingTime}."},95814:e=>{e.exports="Market closed"},98105:e=>{e.exports="Market closes in {remainingTime}."},87202:e=>{e.exports="Market is currently on holiday. Lucky them."},71194:e=>{e.exports="November"},66324:e=>{e.exports="Source code"},36835:e=>{e.exports="Sat"},1144:e=>{ +e.exports="Saturday"},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports="September"},28705:e=>{e.exports="Show Indicator Legend"},51072:e=>{e.exports="Show Object Tree"},37809:e=>{e.exports="Show interval settings"},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports="Sun"},72149:e=>{e.exports="Sunday"},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports="Symbol title"},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports="Paid plans feature faster data updates."},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports="Real-time data for {description} is not supported right now. We may support it in the future."},6667:e=>{e.exports="Real-time data for {symbolName} is provided by {exchange} exchange."},48293:e=>{e.exports="Restore chart"},91029:e=>{e.exports="Restore pane"},75094:e=>{e.exports="Wed"},7147:e=>{e.exports="Wednesday"},52984:e=>{e.exports="To get real-time data for {description}, please buy the real-time data package."},9787:e=>{e.exports="Thu"},7951:e=>{e.exports="Thursday"},57918:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges."},68025:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}."},73717:e=>{e.exports="This symbol doesn't exist, please pick another one."},57048:e=>{e.exports="Time for a walk — this market is closed."},94316:e=>{e.exports="Tue"},44979:e=>{e.exports="Tuesday"},8209:e=>{e.exports="Unflag Symbol"},1111:e=>{e.exports=["حجم"]},61311:e=>{e.exports=["بزرگ نمایی"]},47602:e=>{e.exports=["کوچک نمایی"]},57889:e=>{e.exports="change OHLC values visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},26717:e=>{e.exports="change symbol description visibility"},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports="change volume values visibility"},39348:e=>{e.exports="less than 1 minute"},87358:e=>{e.exports="show {title}"},7827:e=>{e.exports="{days} and {hours}"},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports="{hours} and {minutes}"},1084:e=>{e.exports="{listedExchange} real-time data is available for free to registered users."},11155:e=>{e.exports="{symbolName} data is delayed by {time} minutes."},77033:e=>{e.exports=["Data is updated once every {amount} seconds, even if there are more updates on the market."]},2121:e=>{e.exports=["Data on our Basic plan is updated once every {amount} seconds, even if there are more updates on the market."]},5223:e=>{e.exports=["One update every {amount} seconds"]},58609:e=>{e.exports=["{number} days"]},24430:e=>{e.exports=["{number} hours"]},67151:e=>{e.exports=["{number} minutes"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/fr.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/fr.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 760b271a..00000000 --- a/charting_library/bundles/fr.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports=["barres"]},19648:e=>{e.exports=["12 heures"]},55838:e=>{e.exports=["24 heures"]},88364:e=>{e.exports=["Styles de base des graphiques"]},46720:e=>{e.exports=["Mire"]},50985:e=>{e.exports=["Devise"]},17319:e=>{e.exports=["Devise et unité"]},19481:e=>{e.exports=["Apparence"]},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports=["Prix de clôture moyen"]},27331:e=>{e.exports=["Arrière-Plan"]},22519:e=>{e.exports=["Valeurs du changement de barre"]},87845:e=>{e.exports=["Boutons"]},25209:e=>{e.exports=["Format de la date"]},55090:e=>{e.exports=["Jour de la semaine sur les étiquettes"]},29601:e=>{e.exports="Description"},26897:e=>{e.exports=["Événements"]},95338:e=>{e.exports=["Lignes horizontales de la grille"]},60971:e=>{e.exports=["Prix haut et bas"]},61142:e=>{e.exports=["Indicateurs"]},34905:e=>{e.exports=["Valeur des indicateurs"]},29687:e=>{e.exports=["Indicateurs et valeurs financières"]},25084:e=>{e.exports=["Indicateurs et noms des données financières"]},9654:e=>{e.exports=["Nom des indicateurs"]},99487:e=>{e.exports=["Valeurs OHLC"]},75991:e=>{e.exports=["Statut de marché ouvert"]},70500:e=>{e.exports=["Argent"]},66653:e=>{e.exports=["Marges"]},42502:e=>{e.exports=["Pas de chevauchement"]},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports=["Échelles"]},53224:e=>{e.exports=["Placement des échelles"]},79194:e=>{e.exports=["Ligne d'état"]},89053:e=>{e.exports=["Symbole"]},35383:e=>{e.exports=["Nom du symbole"]},27767:e=>{e.exports=["Dernier prix du symbole"]},40847:e=>{e.exports=["Prix de clôture du jour précédent du symbole"]},50446:e=>{e.exports=["Volet"]},73908:e=>{e.exports=["Séparateurs de volets"]},36014:e=>{e.exports=["Pourcentage"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports=["Prix pré/post marché"]},64859:e=>{e.exports=["Echelle de prix"]},76523:e=>{e.exports=["Prix et valeur de pourcentage"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Filigrane"]},67369:e=>{e.exports=["Titre"]},31326:e=>{e.exports=["Titres"]},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports=["Ticker et description"]},43637:e=>{e.exports=["Echelle de temps"]},97316:e=>{e.exports=["Format de l'heure"]},90801:e=>{e.exports="Trading"},77534:e=>{e.exports=["Unité"]},1111:e=>{e.exports="Volume"},80170:e=>{e.exports=["Valeur selon l'échelle"]},91322:e=>{e.exports=["Valeurs"]},70353:e=>{e.exports=["Lignes Verticales de grille"]},57889:e=>{e.exports=["modifier la visibilité des valeurs OHLC"]},35646:e=>{e.exports=["modifier la visibilité des boutons de navigation"]},18644:e=>{e.exports=["modifier la visibilité du statut de marché ouvert"]},45110:e=>{e.exports=["modifier la visibilité du changement de barre"]},10349:e=>{e.exports=["modifier la marge inférieure"]},88161:e=>{e.exports=["modifier la visibilité des étiquettes des devises et des unités"]},79570:e=>{e.exports=["changer la visibilité de l'étiquette de la devise"]},99011:e=>{e.exports=["modifier la couleur de fond du graphique"]},72458:e=>{ -e.exports=["modifier le type d'arrière-plan du graphique"]},37034:e=>{e.exports=["modifier la largeur de la mire"]},29951:e=>{e.exports=["modifier la couleur de la mire"]},92027:e=>{e.exports=["modifier le style de la mire"]},50457:e=>{e.exports=["changer le format de la date"]},7104:e=>{e.exports=["changer le jour de la semaine sur les étiquettes"]},88096:e=>{e.exports=["modifier la couleur des lignes de la grille horizontale"]},2523:e=>{e.exports=["modifier le style des lignes de la grille horizontale"]},31325:e=>{e.exports=["modifier la visibilité des titres de l'indicateur"]},99774:e=>{e.exports=["modifier la visibilité des valeurs de l'indicateur"]},96162:e=>{e.exports=["modifier la visibilité des arguments de l'indicateur"]},59820:e=>{e.exports=["Modifier la visibilité des étiquettes de noms des indicateurs et des données financières"]},90512:e=>{e.exports=["modifier la visibilité des étiquettes de valeur des indicateurs et des données financières"]},97956:e=>{e.exports=["modifier la transparence du fond de la légende"]},61061:e=>{e.exports=["modifier la visibilité du fond de la légende"]},37730:e=>{e.exports=["modifier la visibilité des boutons du volet"]},89032:e=>{e.exports=["modifier la couleur des séparateurs de volets"]},35636:e=>{e.exports=["modifier la marge de droite"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["modifier la couleur du filigrane du symbole"]},87159:e=>{e.exports=["modifier la visibilité du filigrane du symbole"]},26717:e=>{e.exports=["modifier la visibilité de la description du symbole"]},28741:e=>{e.exports=["changer le mode de la dernière valeur du symbole"]},95071:e=>{e.exports=["changer le format de la légende des symboles"]},35065:e=>{e.exports=["modifier la couleur du texte des échelles"]},84382:e=>{e.exports=["modifier la taille de police des échelles"]},12468:e=>{e.exports=["modifier la couleur des lignes des échelles"]},71589:e=>{e.exports=["modifier la visibilité des interruptions de session"]},15035:e=>{e.exports=["modifier la largeur des interruptions de session"]},1579:e=>{e.exports=["modifier la couleur des interruptions de session"]},21460:e=>{e.exports=["modifier le style des interruptions de session"]},76991:e=>{e.exports=["changer le format de l'heure"]},98905:e=>{e.exports=["modifier la marge supérieure"]},7011:e=>{e.exports=["modifier la visibilité de l'étiquette d'unité"]},22722:e=>{e.exports=["modifier la couleur des lignes de la grille verticale"]},22867:e=>{e.exports=["modifier le style des lignes de la grille verticale"]},9455:e=>{e.exports=["modifier la visibilité des valeurs de volume"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/fr.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/fr.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..2879a14c --- /dev/null +++ b/charting_library/bundles/fr.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports=["barres"]},19648:e=>{e.exports=["12 heures"]},55838:e=>{e.exports=["24 heures"]},88364:e=>{e.exports=["Styles de base des graphiques"]},46720:e=>{e.exports=["Mire"]},50985:e=>{e.exports=["Devise"]},17319:e=>{e.exports=["Devise et unité"]},19481:e=>{e.exports=["Apparence"]},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports=["Prix de clôture moyen"]},27331:e=>{e.exports=["Arrière-Plan"]},22519:e=>{e.exports=["Valeurs du changement de barre"]},87845:e=>{e.exports=["Boutons"]},25209:e=>{e.exports=["Format de la date"]},55090:e=>{e.exports=["Jour de la semaine sur les étiquettes"]},29601:e=>{e.exports="Description"},26897:e=>{e.exports=["Événements"]},95338:e=>{e.exports=["Lignes horizontales de la grille"]},60971:e=>{e.exports=["Prix haut et bas"]},61142:e=>{e.exports=["Indicateurs"]},34905:e=>{e.exports=["Valeur des indicateurs"]},29687:e=>{e.exports=["Indicateurs et valeurs financières"]},25084:e=>{e.exports=["Indicateurs et noms des données financières"]},9654:e=>{e.exports=["Nom des indicateurs"]},99487:e=>{e.exports=["Valeurs OHLC"]},75991:e=>{e.exports=["Statut de marché ouvert"]},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports=["Argent"]},66653:e=>{e.exports=["Marges"]},42502:e=>{e.exports=["Pas de chevauchement"]},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports=["Échelles"]},53224:e=>{e.exports=["Placement des échelles"]},79194:e=>{e.exports=["Ligne d'état"]},89053:e=>{e.exports=["Symbole"]},35383:e=>{e.exports=["Nom du symbole"]},27767:e=>{e.exports=["Dernier prix du symbole"]},40847:e=>{e.exports=["Prix de clôture du jour précédent du symbole"]},50446:e=>{e.exports=["Volet"]},73908:e=>{e.exports=["Séparateurs de volets"]},36014:e=>{e.exports=["Pourcentage"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports=["Prix pré/post marché"]},64859:e=>{e.exports=["Echelle de prix"]},76523:e=>{e.exports=["Prix et valeur de pourcentage"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Filigrane"]},67369:e=>{e.exports=["Titre"]},31326:e=>{e.exports=["Titres"]},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports=["Ticker et description"]},43637:e=>{e.exports=["Echelle de temps"]},97316:e=>{e.exports=["Format de l'heure"]},90801:e=>{e.exports="Trading"},77534:e=>{e.exports=["Unité"]},1111:e=>{e.exports="Volume"},80170:e=>{e.exports=["Valeur selon l'échelle"]},91322:e=>{e.exports=["Valeurs"]},70353:e=>{e.exports=["Lignes Verticales de grille"]},57889:e=>{e.exports=["modifier la visibilité des valeurs OHLC"]},35646:e=>{e.exports=["modifier la visibilité des boutons de navigation"]},18644:e=>{e.exports=["modifier la visibilité du statut de marché ouvert"]},45110:e=>{e.exports=["modifier la visibilité du changement de barre"]},10349:e=>{e.exports=["modifier la marge inférieure"]},88161:e=>{e.exports=["modifier la visibilité des étiquettes des devises et des unités"]},79570:e=>{e.exports=["changer la visibilité de l'étiquette de la devise"]},99011:e=>{e.exports=["modifier la couleur de fond du graphique"] +},72458:e=>{e.exports=["modifier le type d'arrière-plan du graphique"]},37034:e=>{e.exports=["modifier la largeur de la mire"]},29951:e=>{e.exports=["modifier la couleur de la mire"]},92027:e=>{e.exports=["modifier le style de la mire"]},50457:e=>{e.exports=["changer le format de la date"]},7104:e=>{e.exports=["changer le jour de la semaine sur les étiquettes"]},88096:e=>{e.exports=["modifier la couleur des lignes de la grille horizontale"]},2523:e=>{e.exports=["modifier le style des lignes de la grille horizontale"]},31325:e=>{e.exports=["modifier la visibilité des titres de l'indicateur"]},99774:e=>{e.exports=["modifier la visibilité des valeurs de l'indicateur"]},96162:e=>{e.exports=["modifier la visibilité des arguments de l'indicateur"]},59820:e=>{e.exports=["Modifier la visibilité des étiquettes de noms des indicateurs et des données financières"]},90512:e=>{e.exports=["modifier la visibilité des étiquettes de valeur des indicateurs et des données financières"]},97956:e=>{e.exports=["modifier la transparence du fond de la légende"]},61061:e=>{e.exports=["modifier la visibilité du fond de la légende"]},37730:e=>{e.exports=["modifier la visibilité des boutons du volet"]},89032:e=>{e.exports=["modifier la couleur des séparateurs de volets"]},35636:e=>{e.exports=["modifier la marge de droite"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["modifier la couleur du filigrane du symbole"]},87159:e=>{e.exports=["modifier la visibilité du filigrane du symbole"]},26717:e=>{e.exports=["modifier la visibilité de la description du symbole"]},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports=["changer le mode de la dernière valeur du symbole"]},95071:e=>{e.exports=["changer le format de la légende des symboles"]},35065:e=>{e.exports=["modifier la couleur du texte des échelles"]},84382:e=>{e.exports=["modifier la taille de police des échelles"]},12468:e=>{e.exports=["modifier la couleur des lignes des échelles"]},71589:e=>{e.exports=["modifier la visibilité des interruptions de session"]},15035:e=>{e.exports=["modifier la largeur des interruptions de session"]},1579:e=>{e.exports=["modifier la couleur des interruptions de session"]},21460:e=>{e.exports=["modifier le style des interruptions de session"]},76991:e=>{e.exports=["changer le format de l'heure"]},98905:e=>{e.exports=["modifier la marge supérieure"]},7011:e=>{e.exports=["modifier la visibilité de l'étiquette d'unité"]},22722:e=>{e.exports=["modifier la couleur des lignes de la grille verticale"]},22867:e=>{e.exports=["modifier le style des lignes de la grille verticale"]},9455:e=>{e.exports=["modifier la visibilité des valeurs de volume"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/fr.6847.490ee46270bef6a878dd.js b/charting_library/bundles/fr.7257.089fbbc28bead9558b87.js similarity index 52% rename from charting_library/bundles/fr.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/fr.7257.089fbbc28bead9558b87.js index 2073d450..2204b05a 100644 --- a/charting_library/bundles/fr.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/fr.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports=["Ven"]},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports=["Impossible d'obtenir le code source de Pine."]},39589:e=>{e.exports=["Réduire le volet"]},38154:e=>{e.exports=["Confirmer la suppression de l'arbre d'étude"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Créez un compte gratuit"]},69419:e=>{e.exports=["Tout va bien - Le marché est ouvert"]},97637:e=>{e.exports=["Avril"]},86797:e=>{e.exports=["Août"]},22519:e=>{e.exports=["Valeurs du changement de barre"]},52003:e=>{e.exports=["Voulez-vous vraiment supprimer l'étude principale et ses dérivés ?"]},68854:e=>{e.exports=["Double cliquer"]},97325:e=>{e.exports=["Problème avec les données"]},52916:e=>{e.exports=["Les données sont actualisées une fois par jour."]},25978:e=>{e.exports=["Les données sont mises à jour une fois par seconde, même s'il y a plus de mises à jour sur le marché."]},57310:e=>{e.exports=["Les données sont retardées"]},49321:e=>{e.exports=["Les données de notre plan de base sont mises à jour une fois par seconde, même s'il y a plus de mises à jour sur le marché."]},55669:e=>{e.exports=["Décembre"]},83498:e=>{e.exports=["Supprimer le volet"]},59315:e=>{e.exports=["Données Fin de journée"]},82751:e=>{e.exports=["Erreur"]},40519:e=>{e.exports=["Bonne soirée. Le marché est ouvert pour les transactions post-marché."]},80227:e=>{e.exports=["Fuseau horaire de la bourse"]},16467:e=>{e.exports=["Février"]},25046:e=>{e.exports=["Remplir les Conventions de Bourse"]},93666:e=>{e.exports=["Flagger le symbole"]},564:e=>{e.exports=["Ven"]},72970:e=>{e.exports=["Vendredi"]},88958:e=>{e.exports=["Vacances"]},21686:e=>{e.exports=["Masquer la légende de l'indicateur"]},26935:e=>{e.exports=["Arguments de l'indicateur"]},26315:e=>{e.exports=["Titres de l'indicateur"]},84098:e=>{e.exports=["Valeurs de l'indicateur"]},91459:e=>{e.exports=["Si vous souhaitez obtenir des données en temps réel de {listedExchange}, vous devez remplir une convention d'échange. Ne vous inquiétez pas, cela ne prend que quelques clics"]},50634:e=>{e.exports=["Passage en trading post-marché dans {remainingTime}."]},74537:e=>{e.exports=["Ouverture du trading pré-marché dans {remainingTime}."]},26910:e=>{e.exports=["Janvier"]},23230:e=>{e.exports=["Juillet"]},49385:e=>{e.exports=["Juin"]},99487:e=>{e.exports=["Valeurs OHLC"]},15815:e=>{e.exports=["Une mise à jour par seconde"]},90784:e=>{e.exports=["Octobre"]},75991:e=>{e.exports=["Statut de marché ouvert"]},18429:e=>{e.exports=["En savoir plus"]},39899:e=>{e.exports=["Déplacer le volet vers le bas"]},70343:e=>{e.exports=["Déplacer le volet vers le haut"]},83085:e=>{e.exports=["Lun"]},61199:e=>{e.exports=["Lundi"]},41610:e=>{e.exports=["Plus"]},1653:e=>{e.exports=["Bonjour. Le marché est ouvert pour les transactions pré-marché."]},56470:e=>{e.exports=["Maximiser le graphique"]},19603:e=>{ -e.exports=["Maximiser le volet"]},68327:e=>{e.exports=["Mai"]},35732:e=>{e.exports=["Gérer les volets"]},84675:e=>{e.exports=["Mars"]},83949:e=>{e.exports=["Marché ouvert"]},35701:e=>{e.exports=["Le marché ouvre dans {remainingTime}"]},95814:e=>{e.exports=["Marché fermé"]},98105:e=>{e.exports=["Le marché ferme dans {remainingTime}"]},87202:e=>{e.exports=["Le marché est actuellement en congé. Quelle chance !"]},71194:e=>{e.exports=["Novembre"]},66324:e=>{e.exports=["Code source"]},36835:e=>{e.exports=["Sam"]},1144:e=>{e.exports=["Samedi"]},40653:e=>{e.exports=["Faire défiler vers la gauche"]},26721:e=>{e.exports=["Faire défiler jusqu'à la barre la plus récente"]},35809:e=>{e.exports=["Faire défiler vers la droite"]},61132:e=>{e.exports=["Septembre"]},28705:e=>{e.exports=["Montrer la légende de l'indicateur"]},51072:e=>{e.exports=["Afficher l'arborescence des objets"]},37809:e=>{e.exports=["Afficher les paramètres d'intervalle"]},39045:e=>{e.exports=["Erreur dans l'étude"]},86577:e=>{e.exports=["Dim"]},72149:e=>{e.exports=["Dimanche"]},39339:e=>{e.exports=["Titre du symbole"]},29985:e=>{e.exports=["Post-marché"]},28412:e=>{e.exports=["Les plans payants permettent une mise à jour plus rapide des données."]},56042:e=>{e.exports=["Pré-marché"]},36015:e=>{e.exports=["Les données en temps réel pour {description} ne sont pas prises en charge pour le moment. Elles pourraient l'être dans le futur."]},6667:e=>{e.exports=["Les données en temps réel pour {symbolName} sont fournies par la Bourse {exchange}."]},48293:e=>{e.exports=["Restaurer le graphique"]},91029:e=>{e.exports=["Restaurer le volet"]},75094:e=>{e.exports=["Mer"]},7147:e=>{e.exports=["Mercredi"]},52984:e=>{e.exports=["Pour obtenir des données en temps réel pour {description}, veuillez acheter le package de données en temps réel."]},9787:e=>{e.exports=["Jeu"]},7951:e=>{e.exports=["Jeudi"]},57918:e=>{e.exports=["Ces données sont en temps réel, mais elles sont légèrement différentes de leur équivalent officiel à la Bourse primaire."]},68025:e=>{e.exports=["Cette donnée est en temps réel, mais elle est légèrement différente de son homologue officielle provenant de {exchange}."]},73717:e=>{e.exports=["Ce symbole n'existe pas, veuillez en choisir un autre."]},57048:e=>{e.exports=["Une petite pause? - ce marché est fermé"]},94316:e=>{e.exports=["Mar"]},44979:e=>{e.exports=["Mardi"]},8209:e=>{e.exports=["Déflagger le symbole"]},1111:e=>{e.exports="Volume"},61311:e=>{e.exports=["Grossissement"]},47602:e=>{e.exports=["Réduction"]},57889:e=>{e.exports=["modifier la visibilité des valeurs OHLC"]},18644:e=>{e.exports=["modifier la visibilité du statut de marché ouvert"]},45110:e=>{e.exports=["modifier la visibilité du changement de barre"]},31325:e=>{e.exports=["modifier la visibilité des titres de l'indicateur"]},99774:e=>{e.exports=["modifier la visibilité des valeurs de l'indicateur"]},96162:e=>{e.exports=["modifier la visibilité des arguments de l'indicateur"]},26717:e=>{e.exports=["modifier la visibilité de la description du symbole"]},9455:e=>{ -e.exports=["modifier la visibilité des valeurs de volume"]},39348:e=>{e.exports=["moins d'1 minute"]},87358:e=>{e.exports=["afficher {title}"]},7827:e=>{e.exports=["{days} et {hours}"]},7435:e=>{e.exports=["{exchange} par {originalExchange}"]},19830:e=>{e.exports=["{hours} et {minutes}"]},1084:e=>{e.exports=["Les données en temps réel de {listedExchange} sont disponibles gratuitement pour les utilisateurs enregistrés."]},11155:e=>{e.exports=["Les données de {symbolName} sont retardées de {time} minutes."]},77033:e=>{e.exports=["Les données sont mises à jour une fois par {amount} seconde, même s'il y a plus de mises à jour sur le marché.","Les données sont mises à jour une fois toutes les {amount} secondes, même s'il y a plus de mises à jour sur le marché."]},2121:e=>{e.exports=["Les données de notre plan Basic sont mises à jour une fois par {amount} seconde, même s'il y a plus de mises à jour sur le marché.","Les données de notre plan Basic sont mises à jour une fois toutes les {amount} secondes, même s'il y a plus de mises à jour sur le marché."]},5223:e=>{e.exports=["Une mise à jour toutes les {amount} seconde","Une mise à jour toutes les {amount} secondes"]},58609:e=>{e.exports=["{number} jour","{number} jours"]},24430:e=>{e.exports=["{number} heure","{number} heures"]},67151:e=>{e.exports="{number} minute"}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports=["Ven"]},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports=["Impossible d'obtenir le code source de Pine."]},39589:e=>{e.exports=["Réduire le volet"]},38154:e=>{e.exports=["Confirmer la suppression de l'arbre d'étude"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Créez un compte gratuit"]},69419:e=>{e.exports=["Tout va bien - Le marché est ouvert"]},97637:e=>{e.exports=["Avril"]},86797:e=>{e.exports=["Août"]},22519:e=>{e.exports=["Valeurs du changement de barre"]},52003:e=>{e.exports=["Voulez-vous vraiment supprimer l'étude principale et ses dérivés ?"]},68854:e=>{e.exports=["Double cliquer"]},97325:e=>{e.exports=["Problème avec les données"]},52916:e=>{e.exports=["Les données sont actualisées une fois par jour."]},25978:e=>{e.exports=["Les données sont mises à jour une fois par seconde, même s'il y a plus de mises à jour sur le marché."]},57310:e=>{e.exports=["Les données sont retardées"]},49321:e=>{e.exports=["Les données de notre plan de base sont mises à jour une fois par seconde, même s'il y a plus de mises à jour sur le marché."]},55669:e=>{e.exports=["Décembre"]},83498:e=>{e.exports=["Supprimer le volet"]},59315:e=>{e.exports=["Données Fin de journée"]},82751:e=>{e.exports=["Erreur"]},40519:e=>{e.exports=["Bonne soirée. Le marché est ouvert pour les transactions post-marché."]},80227:e=>{e.exports=["Fuseau horaire de la bourse"]},16467:e=>{e.exports=["Février"]},25046:e=>{e.exports=["Remplir les Conventions de Bourse"]},93666:e=>{e.exports=["Flagger le symbole"]},564:e=>{e.exports=["Ven"]},72970:e=>{e.exports=["Vendredi"]},88958:e=>{e.exports=["Vacances"]},21686:e=>{e.exports=["Masquer la légende de l'indicateur"]},26935:e=>{e.exports=["Arguments de l'indicateur"]},26315:e=>{e.exports=["Titres de l'indicateur"]},84098:e=>{e.exports=["Valeurs de l'indicateur"]},91459:e=>{e.exports=["Si vous souhaitez obtenir des données en temps réel de {listedExchange}, vous devez remplir une convention d'échange. Ne vous inquiétez pas, cela ne prend que quelques clics"]},50634:e=>{e.exports=["Passage en trading post-marché dans {remainingTime}."]},74537:e=>{e.exports=["Ouverture du trading pré-marché dans {remainingTime}."]},26910:e=>{e.exports=["Janvier"]},23230:e=>{e.exports=["Juillet"]},49385:e=>{e.exports=["Juin"]},99487:e=>{e.exports=["Valeurs OHLC"]},15815:e=>{e.exports=["Une mise à jour par seconde"]},90784:e=>{e.exports=["Octobre"]},75991:e=>{e.exports=["Statut de marché ouvert"]},18429:e=>{e.exports=["En savoir plus"]},39899:e=>{e.exports=["Déplacer le volet vers le bas"]},70343:e=>{e.exports=["Déplacer le volet vers le haut"]},83085:e=>{e.exports=["Lun"]},61199:e=>{e.exports=["Lundi"]},41610:e=>{e.exports=["Plus"]},1653:e=>{e.exports=["Bonjour. Le marché est ouvert pour les transactions pré-marché."]},56470:e=>{e.exports=["Maximiser le graphique"]},19603:e=>{ +e.exports=["Maximiser le volet"]},68327:e=>{e.exports=["Mai"]},35732:e=>{e.exports=["Gérer les volets"]},84675:e=>{e.exports=["Mars"]},83949:e=>{e.exports=["Marché ouvert"]},35701:e=>{e.exports=["Le marché ouvre dans {remainingTime}"]},95814:e=>{e.exports=["Marché fermé"]},98105:e=>{e.exports=["Le marché ferme dans {remainingTime}"]},87202:e=>{e.exports=["Le marché est actuellement en congé. Quelle chance !"]},71194:e=>{e.exports=["Novembre"]},66324:e=>{e.exports=["Code source"]},36835:e=>{e.exports=["Sam"]},1144:e=>{e.exports=["Samedi"]},40653:e=>{e.exports=["Faire défiler vers la gauche"]},26721:e=>{e.exports=["Faire défiler jusqu'à la barre la plus récente"]},35809:e=>{e.exports=["Faire défiler vers la droite"]},61132:e=>{e.exports=["Septembre"]},28705:e=>{e.exports=["Montrer la légende de l'indicateur"]},51072:e=>{e.exports=["Afficher l'arborescence des objets"]},37809:e=>{e.exports=["Afficher les paramètres d'intervalle"]},39045:e=>{e.exports=["Erreur dans l'étude"]},86577:e=>{e.exports=["Dim"]},72149:e=>{e.exports=["Dimanche"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["Titre du symbole"]},29985:e=>{e.exports=["Post-marché"]},28412:e=>{e.exports=["Les plans payants permettent une mise à jour plus rapide des données."]},56042:e=>{e.exports=["Pré-marché"]},36015:e=>{e.exports=["Les données en temps réel pour {description} ne sont pas prises en charge pour le moment. Elles pourraient l'être dans le futur."]},6667:e=>{e.exports=["Les données en temps réel pour {symbolName} sont fournies par la Bourse {exchange}."]},48293:e=>{e.exports=["Restaurer le graphique"]},91029:e=>{e.exports=["Restaurer le volet"]},75094:e=>{e.exports=["Mer"]},7147:e=>{e.exports=["Mercredi"]},52984:e=>{e.exports=["Pour obtenir des données en temps réel pour {description}, veuillez acheter le package de données en temps réel."]},9787:e=>{e.exports=["Jeu"]},7951:e=>{e.exports=["Jeudi"]},57918:e=>{e.exports=["Ces données sont en temps réel, mais elles sont légèrement différentes de leur équivalent officiel à la Bourse primaire."]},68025:e=>{e.exports=["Cette donnée est en temps réel, mais elle est légèrement différente de son homologue officielle provenant de {exchange}."]},73717:e=>{e.exports=["Ce symbole n'existe pas, veuillez en choisir un autre."]},57048:e=>{e.exports=["Une petite pause? - ce marché est fermé"]},94316:e=>{e.exports=["Mar"]},44979:e=>{e.exports=["Mardi"]},8209:e=>{e.exports=["Déflagger le symbole"]},1111:e=>{e.exports="Volume"},61311:e=>{e.exports=["Grossissement"]},47602:e=>{e.exports=["Réduction"]},57889:e=>{e.exports=["modifier la visibilité des valeurs OHLC"]},18644:e=>{e.exports=["modifier la visibilité du statut de marché ouvert"]},45110:e=>{e.exports=["modifier la visibilité du changement de barre"]},31325:e=>{e.exports=["modifier la visibilité des titres de l'indicateur"]},99774:e=>{e.exports=["modifier la visibilité des valeurs de l'indicateur"]},96162:e=>{e.exports=["modifier la visibilité des arguments de l'indicateur"]},26717:e=>{ +e.exports=["modifier la visibilité de la description du symbole"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["modifier la visibilité des valeurs de volume"]},39348:e=>{e.exports=["moins d'1 minute"]},87358:e=>{e.exports=["afficher {title}"]},7827:e=>{e.exports=["{days} et {hours}"]},7435:e=>{e.exports=["{exchange} par {originalExchange}"]},19830:e=>{e.exports=["{hours} et {minutes}"]},1084:e=>{e.exports=["Les données en temps réel de {listedExchange} sont disponibles gratuitement pour les utilisateurs enregistrés."]},11155:e=>{e.exports=["Les données de {symbolName} sont retardées de {time} minutes."]},77033:e=>{e.exports=["Les données sont mises à jour une fois par {amount} seconde, même s'il y a plus de mises à jour sur le marché.","Les données sont mises à jour une fois toutes les {amount} secondes, même s'il y a plus de mises à jour sur le marché."]},2121:e=>{e.exports=["Les données de notre plan Basic sont mises à jour une fois par {amount} seconde, même s'il y a plus de mises à jour sur le marché.","Les données de notre plan Basic sont mises à jour une fois toutes les {amount} secondes, même s'il y a plus de mises à jour sur le marché."]},5223:e=>{e.exports=["Une mise à jour toutes les {amount} seconde","Une mise à jour toutes les {amount} secondes"]},58609:e=>{e.exports=["{number} jour","{number} jours"]},24430:e=>{e.exports=["{number} heure","{number} heures"]},67151:e=>{e.exports="{number} minute"}}]); \ No newline at end of file diff --git a/charting_library/bundles/general-chart-properties-dialog.efb2c0f56f646a659b5e.js b/charting_library/bundles/general-chart-properties-dialog.8177033bd4fa0c3e7041.js similarity index 84% rename from charting_library/bundles/general-chart-properties-dialog.efb2c0f56f646a659b5e.js rename to charting_library/bundles/general-chart-properties-dialog.8177033bd4fa0c3e7041.js index 9a2f71be..59a61fd1 100644 --- a/charting_library/bundles/general-chart-properties-dialog.efb2c0f56f646a659b5e.js +++ b/charting_library/bundles/general-chart-properties-dialog.8177033bd4fa0c3e7041.js @@ -1,5 +1,5 @@ (self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7078],{47461:e=>{e.exports={backButton:"backButton-pbr_BOzj"}},21703:e=>{e.exports={wrapper:"wrapper-a7Y2yl3G",container:"container-a7Y2yl3G",tab:"tab-a7Y2yl3G",active:"active-a7Y2yl3G",title:"title-a7Y2yl3G",icon:"icon-a7Y2yl3G",titleText:"titleText-a7Y2yl3G",nested:"nested-a7Y2yl3G",isTablet:"isTablet-a7Y2yl3G",isMobile:"isMobile-a7Y2yl3G"}},80556:e=>{e.exports={"tablet-normal-breakpoint":"screen and (max-width: 768px)","tablet-small-breakpoint":"screen and (max-width: 430px)",withSidebar:"withSidebar-E5yydi0j",content:"content-E5yydi0j",tabContent:"tabContent-E5yydi0j",applyToAllButton:"applyToAllButton-E5yydi0j"}},1117:e=>{e.exports={themesButtonText:"themesButtonText-hJtL5aqJ",themesButtonIcon:"themesButtonIcon-hJtL5aqJ",defaultsButtonText:"defaultsButtonText-hJtL5aqJ",defaultsButtonItem:"defaultsButtonItem-hJtL5aqJ"}},45829:e=>{e.exports={separator:"separator-w5iW5vBm",small:"small-w5iW5vBm",normal:"normal-w5iW5vBm",large:"large-w5iW5vBm"}},22265:(e,t,a)=>{"use strict";a.d(t,{DialogSidebarContainer:()=>m,DialogSidebarWrapper:()=>h,DialogSidebarItem:()=>d});var l=a(50959),i=a(97754),n=a.n(i),o=a(9745),s=a(68648),r=a(21703);function c(e){return{isMobile:"mobile"===e,isTablet:"tablet"===e}}function m(e){const{mode:t,className:a,...i}=e,{isMobile:o,isTablet:s}=c(t),m=n()(r.container,s&&r.isTablet,o&&r.isMobile,a);return l.createElement("div",{...i,className:m,"data-role":"dialog-sidebar"})}function h(e){return l.createElement("div",{className:r.wrapper,...e})}function d(e){const{mode:t,title:a,icon:i,isActive:m,onClick:h,...d}=e,{isMobile:p,isTablet:u}=c(t);return l.createElement("div",{...d,className:n()(r.tab,u&&r.isTablet,p&&r.isMobile,m&&r.active),onClick:h},l.createElement(o.Icon,{className:r.icon,icon:i}),!u&&l.createElement("span",{className:r.title},l.createElement("span",{className:r.titleText},a),p&&l.createElement(o.Icon,{className:r.nested,icon:s})))}},72811:(e,t,a)=>{"use strict";a.r(t),a.d(t,{GeneralChartPropertiesDialogRenderer:()=>Z});var l=a(44352),i=a(50959),n=a(962),o=a(94720),s=a(53942),r=a(50182),c=a(66849),m=a(40296),h=a(56840),d=a.n(h),p=a(57737),u=a(90692),b=a(9745),g=a(95276),y=a(16396),_=a(51613),C=a(8840),v=(a(93731),a(3615));const T=l.t(null,void 0,a(40837));var f=a(50655),k=a(86339),A=a(96040),S=a(51768),P=a(70412),E=a(32563),w=a(1117);function B(e){const{themeName:t,chartWidgetCollection:a,onRemove:l,manager:n}=e,[o,s]=(0,P.useHover)(),r=i.useCallback((()=>function(e,t,a){window.is_authenticated&&(0,v.showConfirm)({text:T.format({name:e}),onConfirm:({dialogClose:a})=>{(0,C.removeTheme)(e),t&&t(e),a()}},a)}(t,l,n)),[t,l,n]),c=i.useCallback((()=>{(0,C.loadTheme)(a,{themeName:t,standardTheme:!1}).then((()=>{a.readOnly()||window.saver.saveChartSilently(),(0,S.trackEvent)("GUI","Switch to custom theme")}))}),[t,a]);return i.createElement("div",{...s},i.createElement(y.PopupMenuItem,{className:w.defaultsButtonItem,isActive:!1,label:t,onClick:c,toolbox:i.createElement(A.RemoveButton,{hidden:!E.mobiletouch&&!o,onClick:r}) -}))}var D=a(44996);const M=l.t(null,void 0,a(19611)),z=l.t(null,void 0,a(73169)),x=((0,k.appendEllipsis)(l.t(null,void 0,a(9908))),l.t(null,void 0,a(75819)));class I extends i.PureComponent{constructor(e){super(e),this._manager=null,this._handleApplyDefaults=()=>{const{model:e,chartWidgetCollection:t}=this.props;e.restorePreferences();const a=(0,C.getCurrentTheme)().name;(0,C.loadTheme)(t,{themeName:a,standardTheme:!0,applyOverrides:!0})},this._handleSaveAs=()=>{0},this._handleRemoveTheme=e=>{this.setState({themes:this.state.themes.filter((t=>t!==e))})},this._syncThemeList=()=>{0},this.state={themes:[]},this._syncThemeList()}render(){return i.createElement(f.SlotContext.Consumer,null,(e=>(this._manager=e,i.createElement(u.MatchMedia,{rule:"screen and (max-width: 768px)"},(e=>i.createElement(g.ControlDisclosure,{id:"series-theme-manager",className:!e&&w.themesButtonText,hideArrowButton:e,"data-name":"theme-select",buttonChildren:this._getPlaceHolderItem(e)},this._getThemeItems(e)))))))}_getPlaceHolderItem(e){return e?i.createElement(b.Icon,{className:w.themesButtonIcon,icon:D}):M}_getThemeItems(e){const{isApplyToAllVisible:t,chartWidgetCollection:a,applyToAllCallback:l}=this.props,{themes:n}=this.state;return i.createElement(i.Fragment,null,e&&t&&i.createElement(y.PopupMenuItem,{className:w.defaultsButtonItem,isActive:!1,label:x,onClick:l}),i.createElement(y.PopupMenuItem,{className:w.defaultsButtonItem,isActive:!1,label:z,onClick:this._handleApplyDefaults}),!1,n.length>0&&i.createElement(i.Fragment,null,i.createElement(_.PopupMenuSeparator,{key:"separator"}),n.map((e=>i.createElement(B,{key:e,themeName:e,onRemove:this._handleRemoveTheme,chartWidgetCollection:a,manager:this._manager})))))}}var N=a(59064),L=a(71953),W=a(24437),V=a(22265),q=a(86656);const G={areaSymbolMinTick:"normal",areaSymbolTimezone:"normal",barSymbolMinTick:"normal",barSymbolTimezone:"normal",baselineSymbolMinTick:"normal",baselineSymbolTimezone:"normal",candleSymbolMinTick:"normal",candleSymbolTimezone:"normal",dateFormat:"normal",haSymbolMinTick:"normal",haSymbolTimezone:"normal",hiloSymbolMinTick:"normal",hiloSymbolTimezone:"normal",hollowCandleSymbolMinTick:"normal",hollowCandleSymbolTimezone:"normal",kagiAtrLength:"normal",kagiReversalAmount:"normal",kagiStyle:"normal",kagiSymbolMinTick:"normal",kagiSymbolTimezone:"normal",lineSymbolMinTick:"normal",lineSymbolTimezone:"normal",sessionId:"normal",lockScale:"normal",mainSeriesSymbolAreaPriceSource:"normal",mainSeriesSymbolBaseLevelPercentage:"normal",mainSeriesSymbolBaseLinePriceSource:"normal",mainSeriesSymbolLinePriceSource:"normal",mainSeriesSymbolStyleType:"normal",navButtons:"big",paneButtons:"big",scalesCurrencyUnit:"big",pbLb:"normal",pbSymbolMinTick:"normal",pbSymbolTimezone:"normal",pnfAtrLength:"normal",pnfBoxSize:"normal",pnfReversalAmount:"normal",pnfSources:"normal",pnfStyle:"normal",pnfSymbolMinTick:"normal",pnfSymbolTimezone:"normal",rangeSymbolMinTick:"normal",rangeSymbolTimezone:"normal",renkoAtrLength:"normal",renkoBoxSize:"normal",renkoStyle:"normal", +}))}var D=a(44996);const M=l.t(null,void 0,a(19611)),z=l.t(null,void 0,a(73169)),x=((0,k.appendEllipsis)(l.t(null,void 0,a(9908))),l.t(null,void 0,a(75819)));class I extends i.PureComponent{constructor(e){super(e),this._manager=null,this._handleApplyDefaults=()=>{const{model:e,chartWidgetCollection:t}=this.props;e.restorePreferences();const a=(0,C.getCurrentTheme)().name;(0,C.loadTheme)(t,{themeName:a,standardTheme:!0,applyOverrides:!0,onlyActiveChart:!0})},this._handleSaveAs=()=>{0},this._handleRemoveTheme=e=>{this.setState({themes:this.state.themes.filter((t=>t!==e))})},this._syncThemeList=()=>{0},this.state={themes:[]},this._syncThemeList()}render(){return i.createElement(f.SlotContext.Consumer,null,(e=>(this._manager=e,i.createElement(u.MatchMedia,{rule:"screen and (max-width: 768px)"},(e=>i.createElement(g.ControlDisclosure,{id:"series-theme-manager",className:!e&&w.themesButtonText,hideArrowButton:e,"data-name":"theme-select",buttonChildren:this._getPlaceHolderItem(e)},this._getThemeItems(e)))))))}_getPlaceHolderItem(e){return e?i.createElement(b.Icon,{className:w.themesButtonIcon,icon:D}):M}_getThemeItems(e){const{isApplyToAllVisible:t,chartWidgetCollection:a,applyToAllCallback:l}=this.props,{themes:n}=this.state;return i.createElement(i.Fragment,null,e&&t&&i.createElement(y.PopupMenuItem,{className:w.defaultsButtonItem,isActive:!1,label:x,onClick:l}),i.createElement(y.PopupMenuItem,{className:w.defaultsButtonItem,isActive:!1,label:z,onClick:this._handleApplyDefaults}),!1,n.length>0&&i.createElement(i.Fragment,null,i.createElement(_.PopupMenuSeparator,{key:"separator"}),n.map((e=>i.createElement(B,{key:e,themeName:e,onRemove:this._handleRemoveTheme,chartWidgetCollection:a,manager:this._manager})))))}}var N=a(59064),L=a(71953),W=a(24437),V=a(22265),q=a(86656);const G={areaSymbolMinTick:"normal",areaSymbolTimezone:"normal",barSymbolMinTick:"normal",barSymbolTimezone:"normal",baselineSymbolMinTick:"normal",baselineSymbolTimezone:"normal",candleSymbolMinTick:"normal",candleSymbolTimezone:"normal",dateFormat:"normal",haSymbolMinTick:"normal",haSymbolTimezone:"normal",hiloSymbolMinTick:"normal",hiloSymbolTimezone:"normal",hollowCandleSymbolMinTick:"normal",hollowCandleSymbolTimezone:"normal",kagiAtrLength:"normal",kagiReversalAmount:"normal",kagiStyle:"normal",kagiSymbolMinTick:"normal",kagiSymbolTimezone:"normal",lineSymbolMinTick:"normal",lineSymbolTimezone:"normal",sessionId:"normal",lockScale:"normal",mainSeriesSymbolAreaPriceSource:"normal",mainSeriesSymbolBaseLevelPercentage:"normal",mainSeriesSymbolBaseLinePriceSource:"normal",mainSeriesSymbolLinePriceSource:"normal",mainSeriesSymbolStyleType:"normal",navButtons:"big",paneButtons:"big",scalesCurrencyUnit:"big",pbLb:"normal",pbSymbolMinTick:"normal",pbSymbolTimezone:"normal",pnfAtrLength:"normal",pnfBoxSize:"normal",pnfReversalAmount:"normal",pnfSources:"normal",pnfStyle:"normal",pnfSymbolMinTick:"normal",pnfSymbolTimezone:"normal",rangeSymbolMinTick:"normal",rangeSymbolTimezone:"normal",renkoAtrLength:"normal",renkoBoxSize:"normal",renkoStyle:"normal", renkoSymbolMinTick:"normal",renkoSymbolTimezone:"normal",scalesPlacement:"normal",symbolLastValueLabel:"big",symbolTextSource:"normal"};var R=a(48199),Y=a(47461);function j(e){return i.createElement(R.BackButton,{className:Y.backButton,size:"medium","aria-label":l.t(null,{context:"input"},a(16936)),preservePaddings:!0,...e})}var H=a(80556);const U="properties_dialog.last_page_id";class J extends i.PureComponent{constructor(e){var t;super(e),this._renderChildren=({requestResize:e,isSmallWidth:t})=>(this._requestResize=e,i.createElement("div",{className:H.content},this._renderTabs(t),this._renderTabContent(t))),this._renderApplyToAllButton=()=>i.createElement(u.MatchMedia,{rule:W.DialogBreakpoints.TabletNormal},(e=>this._renderApplyToAll(e))),this._renderFooterLeft=()=>{const{model:e,chartWidgetCollection:t}=this.props,{isApplyToAllVisible:a}=this.state;return i.createElement(I,{model:e,isApplyToAllVisible:a,applyToAllCallback:this._handleApplyToAll,chartWidgetCollection:t})},this._createTabClickHandler=e=>()=>this._selectPage(e),this._selectPage=(e,t)=>{const{activePage:a}=this.state;e!==a&&(a&&a.definitions.unsubscribe(this._onChangeActivePageDefinitions),null!==e&&(t||d().setValue(U,e.id),e.definitions.subscribe(this._onChangeActivePageDefinitions)),this.setState({activePage:e,tableKey:Date.now()},(()=>{this._requestResize&&this._requestResize()})))},this._onChangeActivePageDefinitions=()=>{L.logger.logNormal("Definition collection was updated"),this.setState({tableKey:Date.now()},(()=>{this._requestResize&&this._requestResize()}))},this._onTabVisibilityChanged=()=>{const e=this.props.pages.filter((e=>e.visible.value()));this.setState({visiblePages:e});const t=this.state.activePage;null===t||e.includes(t)||this._selectPage(0===e.length?null:e[0],!0)},this._handleCancel=()=>{this.props.onCancel(),this.props.onClose()},this._handleSubmit=()=>{this.props.onSubmit(),this.props.onClose()},this._handleScroll=()=>{N.globalCloseDelegate.fire()},this._handleApplyToAll=()=>{const{chartWidgetCollection:e,model:t}=this.props,{isApplyToAllVisible:a}=this.state;a&&e.applyPreferencesToAllCharts(t)},this._syncApplyToAllVisibility=()=>{const{chartWidgetCollection:e}=this.props;this.setState({isApplyToAllVisible:(0,p.isMultipleLayout)(e.layout.value())})},this._handleBackClick=()=>{const{activePage:e}=this.state;e&&e.definitions.unsubscribe(this._onChangeActivePageDefinitions),this.setState({activePage:null})};const{pages:a,activePageId:l}=e,n=a.filter((e=>e.visible.value()));let o=null!==(t=n.find((e=>e.id===l)))&&void 0!==t?t:null;if(!o){const e=d().getValue(U),t=n.find((t=>t.id===e));o=t||(n.length>0?n[0]:null)}this.state={activePage:o,visiblePages:n,isApplyToAllVisible:(0,p.isMultipleLayout)(e.chartWidgetCollection.layout.value()),tableKey:Date.now()}}componentDidMount(){const{chartWidgetCollection:e,pages:t}=this.props,{activePage:a}=this.state;e.layout.subscribe(this._syncApplyToAllVisibility),a&&a.definitions.subscribe(this._onChangeActivePageDefinitions),t.forEach((e=>e.visible.subscribe(this._onTabVisibilityChanged)))} componentWillUnmount(){const{chartWidgetCollection:e,pages:t}=this.props,{activePage:a}=this.state;a&&a.definitions.unsubscribe(this._onChangeActivePageDefinitions),e.layout.unsubscribe(this._syncApplyToAllVisibility),t.forEach((e=>e.visible.unsubscribe(this._onTabVisibilityChanged)))}render(){const{isOpened:e,onClose:t}=this.props,{activePage:n}=this.state;return i.createElement(u.MatchMedia,{rule:W.DialogBreakpoints.TabletSmall},(o=>i.createElement(r.AdaptiveConfirmDialog,{className:H.withSidebar,dataName:"series-properties-dialog",onClose:t,isOpened:e,title:null!==n&&o?n.title:l.t(null,void 0,a(74207)),footerLeftRenderer:this._renderFooterLeft,additionalButtons:this._renderApplyToAllButton(),additionalHeaderElement:null!==n&&o?i.createElement(j,{onClick:this._handleBackClick}):void 0,onSubmit:this._handleSubmit,onCancel:this._handleCancel,render:this._renderChildren,submitOnEnterKey:!1})))}_renderTabContent(e){const{pages:t}=this.props,a=this._getCurrentPage(e);if(a){const e=t.find((e=>e.id===a.id)),l=e?e.definitions.value():[];return i.createElement(q.TouchScrollContainer,{className:H.tabContent,onScroll:this._handleScroll},i.createElement(c.ControlCustomWidthContext.Provider,{value:G},i.createElement(m.PropertyTable,{key:this.state.tableKey},l.map((e=>i.createElement(s.Section,{key:e.id,definition:e}))))))}return null}_renderTabs(e){const{activePage:t,visiblePages:a}=this.state;if(t&&e)return null;const l=this._getCurrentPage(e);return i.createElement(u.MatchMedia,{rule:W.DialogBreakpoints.TabletNormal},(e=>i.createElement(u.MatchMedia,{rule:W.DialogBreakpoints.TabletSmall},(t=>{const n=t?"mobile":e?"tablet":void 0;return i.createElement(V.DialogSidebarContainer,{mode:n,onScroll:this._handleScroll},a.map((e=>i.createElement(V.DialogSidebarItem,{key:e.id,mode:n,"data-name":e.id,title:e.title,icon:e.icon,onClick:this._createTabClickHandler(e),isActive:l?e.id===l.id:void 0}))))}))))}_renderApplyToAll(e){const{isApplyToAllVisible:t}=this.state;return!e&&t&&i.createElement("span",{className:H.applyToAllButton},i.createElement(o.Button,{appearance:"stroke",onClick:this._handleApplyToAll},l.t(null,void 0,a(75819))))}_getCurrentPage(e){const{pages:t}=this.props,{activePage:a}=this.state;let l=null;return a?l=a:!e&&t.length&&(l=t[0]),l}}var O=a(76422),F=a(88279);const K=l.t(null,void 0,a(74207));class Z extends F.DialogRenderer{constructor(e){super(),this._handleClose=()=>{n.unmountComponentAtNode(this._container),this._setVisibility(!1),this._onClose&&this._onClose()},this._handleSubmit=()=>{},this._handleCancel=()=>{this._model.undoToCheckpoint(this._checkpoint)},this._propertyPages=e.propertyPages,this._model=e.model,this._activePageId=e.activePageId,this._onClose=e.onClose,this._chartWidgetCollection=e.chartWidgetCollection,this._checkpoint=this._ensureCheckpoint(e.undoCheckPoint)}hide(e){e?this._handleCancel():this._handleSubmit(),this._handleClose()}isVisible(){return this.visible().value()}show(){n.render(i.createElement(J,{title:K,isOpened:!0,onSubmit:this._handleSubmit,onClose:this._handleClose, onCancel:this._handleCancel,pages:this._propertyPages,model:this._model,activePageId:this._activePageId,chartWidgetCollection:this._chartWidgetCollection}),this._container),this._setVisibility(!0),O.emit("edit_object_dialog",{objectType:"mainSeries",scriptTitle:this._model.mainSeries().title()})}_ensureCheckpoint(e){return void 0===e&&(e=this._model.createUndoCheckpoint()),e}}},51613:(e,t,a)=>{"use strict";a.d(t,{PopupMenuSeparator:()=>s});var l=a(50959),i=a(97754),n=a.n(i),o=a(45829);function s(e){const{size:t="normal",className:a,ariaHidden:i=!1}=e;return l.createElement("div",{className:n()(o.separator,"small"===t&&o.small,"normal"===t&&o.normal,"large"===t&&o.large,a),role:"separator","aria-hidden":i})}},68648:e=>{e.exports=''},74207:e=>{e.exports={ar:["إعدادات الرسم البياني"],ca_ES:["Configuració de gràfics"],cs:"Chart settings",de:["Chart Einstellungen"],el:"Chart settings",en:"Chart settings",es:["Configuración del gráfico"],fa:"Chart settings",fr:["Paramètres du graphique"],he_IL:["הגדרות גרף"],hu_HU:"Chart settings",id_ID:["Pengaturan chart"],it:["Impostazioni grafico"],ja:["チャート設定"],ko:["차트 세팅"],ms_MY:["Tetapan Carta"],nl_NL:"Chart settings",pl:["Ustawienia wykresu"],pt:["Configurações do gráfico"],ro:"Chart settings",ru:["Настройки графика"],sv:["Diagraminställningar"],th:["การตั้งค่าชาร์ต"],tr:["Grafik ayarları"],vi:["Cài đặt biểu đồ"],zh:["图表设置"],zh_TW:["圖表設定"]}},73169:e=>{e.exports={ar:["تطبيق الإعدادات الافتراضية"],ca_ES:["Aplica configuracions per defecte"],cs:["Apply Defaults"],de:["Voreinstellungen anwenden"],el:["Apply Defaults"],en:"Apply defaults",es:["Aplicar configuraciones por defecto"],fa:["Apply Defaults"],fr:["Appliquer les paramètres par défaut"],he_IL:["החל ברירת מחדל"],hu_HU:["Alapértelmezett Alkalmazása"],id_ID:["Terapkan Pengaturan Awal"],it:["Applica predefiniti"],ja:["デフォルトを適用"],ko:["기본설정"],ms_MY:["Guna Pakai Lalai"],nl_NL:["Apply Defaults"],pl:["Zastosuj domyślne"],pt:["Aplicar padrões"],ro:["Apply Defaults"],ru:["Применить по умолчанию"],sv:["Tillämpa standardinställningarna"],th:["ตั้งให้เป็นค่าเบื้องต้น"],tr:["Varsayılanları uygula"],vi:["Áp dụng Nhiều mặc định"],zh:["应用默认"],zh_TW:["套用預設值"]}},75819:e=>{e.exports={ar:["تفعيل على الكل"],ca_ES:["Aplica-ho a tot"],cs:"Apply to all",de:["Auf alle Anwenden"],el:"Apply to all",en:"Apply to all",es:["Aplica a todo"],fa:"Apply to all",fr:["Appliquer à tous"],he_IL:["החל על הכל"],hu_HU:"Apply to all",id_ID:["Terapkan ke seluruh"],it:["Applica su tutti"],ja:["すべてに適用"],ko:["모두 적용"],ms_MY:["Tertakluk untuk semua"],nl_NL:"Apply to all",pl:["Zastosuj do wszystkich"],pt:["Aplicar a todos"],ro:"Apply to all",ru:["Применить ко всем"],sv:["Använd för alla"],th:["ดำเนินการกับทั้งหมด"],tr:["Hepsine uygula"],vi:["Áp dụng cho tất cả"],zh:["应用至全部"],zh_TW:["全部套用"]}},40837:e=>{e.exports={ar:['هل تريد حقًا حذف قالب الرسم البياني "{name}"؟'], diff --git a/charting_library/bundles/general-property-page.22ecdfa32d18165d6800.js b/charting_library/bundles/general-property-page.22ecdfa32d18165d6800.js deleted file mode 100644 index 23b88c54..00000000 --- a/charting_library/bundles/general-property-page.22ecdfa32d18165d6800.js +++ /dev/null @@ -1,10 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[3596],{25008:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ChartPropertyDefinitionsViewModel:()=>kt});var n=i(50151),r=i(44352),o=i(2484),l=(i(8169),i(97070),i(40549)),a=i.n(l),s=i(65279),c=i(82623),d=i(11954),u=i(43074),p=i(37364),h=i(68622),v=i(35663),g=i(47539),y=i(1930),P=i(52865),f=i(21580),b=i(7019);const m=new g.TranslatedString("change symbol description visibility",r.t(null,void 0,i(26717))),w=new g.TranslatedString("change symbol legend format",r.t(null,void 0,i(95071))),S=new g.TranslatedString("change open market status visibility",r.t(null,void 0,i(18644))),D=new g.TranslatedString("change OHLC values visibility",r.t(null,void 0,i(57889))),_=new g.TranslatedString("change bar change visibility",r.t(null,void 0,i(45110))),T=new g.TranslatedString("change indicator arguments visibility",r.t(null,void 0,i(96162))),C=new g.TranslatedString("change indicator titles visibility",r.t(null,void 0,i(31325))),k=new g.TranslatedString("change indicator values visibility",r.t(null,void 0,i(99774))),V=new g.TranslatedString("change legend background visibility",r.t(null,void 0,i(61061))),O=new g.TranslatedString("change legend background transparency",r.t(null,void 0,i(97956))),L=new g.TranslatedString("change volume values visibility",r.t(null,void 0,i(9455))),M=r.t(null,void 0,i(67369)),x=r.t(null,void 0,i(99487)),G=r.t(null,void 0,i(22519)),R=r.t(null,void 0,i(1111)),W=r.t(null,void 0,i(31326)),A=r.t(null,void 0,i(68791)),F=r.t(null,void 0,i(91322)),z=r.t(null,void 0,i(27331)),N=r.t(null,void 0,i(75991));var E=i(79807),H=i(99846),j=i(34440),B=i(87172),U=i(35624);const I=o.enabled("show_average_close_price_line_and_label"),q=new g.TranslatedString("change symbol labels visibility",r.t(null,void 0,i(9402))),J=new g.TranslatedString("change symbol last value visibility",r.t(null,void 0,i(53150))),K=new g.TranslatedString("change symbol last value mode",r.t(null,void 0,i(28741))),Q=(new g.TranslatedString("change symbol previous close value visibility",r.t(null,void 0,i(12707))),new g.TranslatedString("change bid and ask labels visibility",r.t(null,void 0,i(5100))),new g.TranslatedString("change pre/post market price label visibility",r.t(null,void 0,i(49889))),new g.TranslatedString("change high and low price labels visibility",r.t(null,void 0,i(66805)))),X=new g.TranslatedString("change average close price label visibility",r.t(null,void 0,i(39402))),Y=(new g.TranslatedString("change indicators and financials name labels visibility",r.t(null,void 0,i(59820))),new g.TranslatedString("change indicators name labels visibility",r.t(null,void 0,i(87027)))),Z=(new g.TranslatedString("change indicators and financials value labels visibility",r.t(null,void 0,i(90512))), -new g.TranslatedString("change indicators value labels visibility",r.t(null,void 0,i(14922)))),$=new g.TranslatedString("change no overlapping labels",r.t(null,void 0,i(83935))),ee=new g.TranslatedString("change countdown to bar close visibility",r.t(null,void 0,i(58108))),te=new g.TranslatedString("change currency label visibility",r.t(null,void 0,i(79570))),ie=new g.TranslatedString("change unit label visibility",r.t(null,void 0,i(7011))),ne=new g.TranslatedString("change currency and unit labels visibility",r.t(null,void 0,i(88161))),re=new g.TranslatedString("change plus button visibility",r.t(null,void 0,i(50190))),oe=new g.TranslatedString("toggle lock scale",r.t(null,void 0,i(21203))),le=new g.TranslatedString("change price to bar ratio",r.t(null,void 0,i(69510))),ae=new g.TranslatedString("change date format",r.t(null,void 0,i(50457))),se=new g.TranslatedString("change time hours format",r.t(null,void 0,i(76991))),ce=(new g.TranslatedString("change day of week on labels",r.t(null,void 0,i(7104))),r.t(null,void 0,i(35383))),de=r.t(null,void 0,i(27767)),ue=(r.t(null,void 0,i(40847)),r.t(null,void 0,i(25084)),r.t(null,void 0,i(9654))),pe=(r.t(null,void 0,i(29687)),r.t(null,void 0,i(34905))),he=(r.t(null,void 0,i(47586)),r.t(null,void 0,i(74823)),r.t(null,void 0,i(95036))),ve=r.t(null,void 0,i(60971)),ge=r.t(null,void 0,i(42502)),ye=r.t(null,void 0,i(94420)),Pe=r.t(null,void 0,i(94370)),fe=r.t(null,void 0,i(50985)),be=r.t(null,void 0,i(77534)),me=r.t(null,void 0,i(17319)),we=r.t(null,void 0,i(97378)),Se=r.t(null,void 0,i(53224)),De=r.t(null,void 0,i(18219)),_e=r.t(null,void 0,i(64859)),Te=r.t(null,void 0,i(25209)),Ce=r.t(null,void 0,i(97316)),ke=r.t(null,void 0,i(43637)),Ve=(r.t(null,void 0,i(55090)),[{value:H.PriceAxisLastValueMode.LastPriceAndPercentageValue,title:r.t(null,void 0,i(76523))},{value:H.PriceAxisLastValueMode.LastValueAccordingToScale,title:r.t(null,void 0,i(80170))}]);const Oe=new g.TranslatedString("change chart background color",r.t(null,void 0,i(99011))),Le=new g.TranslatedString("change chart background type",r.t(null,void 0,i(72458))),Me=new g.TranslatedString("change vert grid lines color",r.t(null,void 0,i(22722))),xe=(new g.TranslatedString("change vert grid lines style",r.t(null,void 0,i(22867))),new g.TranslatedString("change horz grid lines color",r.t(null,void 0,i(88096)))),Ge=(new g.TranslatedString("change horz grid lines style",r.t(null,void 0,i(2523))), -new g.TranslatedString("change sessions breaks visibility",r.t(null,void 0,i(71589)))),Re=new g.TranslatedString("change sessions breaks color",r.t(null,void 0,i(1579))),We=new g.TranslatedString("change sessions breaks width",r.t(null,void 0,i(15035))),Ae=new g.TranslatedString("change sessions breaks style",r.t(null,void 0,i(21460))),Fe=new g.TranslatedString("change scales text color",r.t(null,void 0,i(35065))),ze=new g.TranslatedString("change scales font size",r.t(null,void 0,i(84382))),Ne=new g.TranslatedString("change scales lines color",r.t(null,void 0,i(12468))),Ee=new g.TranslatedString("change pane separators color",r.t(null,void 0,i(89032))),He=new g.TranslatedString("change crosshair color",r.t(null,void 0,i(29951))),je=new g.TranslatedString("change crosshair width",r.t(null,void 0,i(37034))),Be=new g.TranslatedString("change crosshair style",r.t(null,void 0,i(92027))),Ue=new g.TranslatedString("change symbol watermark visibility",r.t(null,void 0,i(87159))),Ie=new g.TranslatedString("change symbol watermark color",r.t(null,void 0,i(25616))),qe=new g.TranslatedString("change navigation buttons visibility",r.t(null,void 0,i(35646))),Je=new g.TranslatedString("change pane buttons visibility",r.t(null,void 0,i(37730))),Ke=new g.TranslatedString("change top margin",r.t(null,void 0,i(98905))),Qe=new g.TranslatedString("change bottom margin",r.t(null,void 0,i(10349))),Xe=new g.TranslatedString("change right margin",r.t(null,void 0,i(35636))),Ye=new g.TranslatedString("change right margin percentage",r.t(null,void 0,i(66601))),Ze=r.t(null,void 0,i(27331)),$e=r.t(null,void 0,i(70353)),et=r.t(null,void 0,i(95338)),tt=r.t(null,void 0,i(59827)),it=r.t(null,void 0,i(37229)),nt=r.t(null,void 0,i(83182)),rt=r.t(null,void 0,i(73908)),ot=r.t(null,void 0,i(46720)),lt=r.t(null,void 0,i(77705)),at=r.t(null,void 0,i(74343)),st=r.t(null,void 0,i(50446)),ct=r.t(null,void 0,i(65994)),dt=r.t(null,void 0,i(91757)),ut=r.t(null,void 0,i(21141)),pt=r.t(null,void 0,i(36014)),ht=r.t(null,void 0,i(16812)),vt=r.t(null,{context:"unit"},i(50831));var gt=i(54808),yt=i(55262),Pt=i(86985),ft=i(51620),bt=i(20364);const mt={symbol:i(77822),legend:i(35885),scales:i(23068),appearance:i(37424),events:i(13168),trading:i(73837)},wt=r.t(null,void 0,i(89053)),St=r.t(null,void 0,i(79194)),Dt=r.t(null,void 0,i(43115)),_t=r.t(null,void 0,i(19481)),Tt=(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 Ct=[{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))}];class kt{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(),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,s.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,n.ensureNotNull)(this._model.timeScale()).maxRightOffsetChanged().unsubscribeAll(this),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,n.ensureNotNull)(this._profitLossOptions).setValue([])}_updateDefinitions(){(0,s.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:bt.availableTimezones.map((e=>({value:e.id,title:e.title})))};return new h.SeriesPropertyDefinitionsViewModel(this._series,this._undoModel,"symbol",wt,mt.symbol,e)}_createLegendPropertyPage(){const e=this._chartWidgetProperties.childs().paneProperties.childs().legendProperties.childs(),t={property:this._series.properties().childs().statusViewStyle.childs().symbolTextSource,values:Ct},n=function(e,t,n,o,l){const c=[],d=[],u=(0,s.createOptionsPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.showSeriesTitle,m),option:(0,s.convertToDefinitionProperty)(e,n.property,w)},{id:"symbolTextSource",title:M,options:new(a())(n.values)});if(d.push(u),null!==o){const t=(0,b.combineWithFilteredUpdate)(((t,i)=>"market"===t&&!(0, -y.isEconomicSymbol)(e.mainSeries().symbolInfo())),((e,t)=>null!==e),e.mainSeries().marketStatusModel().status(),e.mainSeries().symbolResolvingActive()),i=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,o,S),visible:(0,s.convertFromReadonlyWVToDefinitionProperty)(t)},{id:"showOpenMarketStatus",title:N});d.push(i)}const p=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.showSeriesOHLC,D)},{id:"ohlcTitle",title:x});d.push(p);const h=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.showBarChange,_)},{id:"barChange",title:G});d.push(h),d.push((0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.showVolume,L)},{id:"barVolume",title:R})),c.push((0,s.createPropertyDefinitionsGeneralGroup)(d,"seriesLegendVisibilityGroup",r.t(null,void 0,i(89053))));const v=[],g=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.showStudyArguments,T)},{id:"studyArguments",title:A}),E=(0,s.createCheckableSetPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.showStudyTitles,C)},{id:"studyTitles",title:W},[g]),H=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.showStudyValues,k)},{id:"studyValues",title:F}),j=(0,P.createWVFromGetterAndSubscription)((()=>e.model().priceDataSources().some((e=>!(0,f.isActingAsSymbolSource)(e)&&e.showInObjectTree()))),e.model().dataSourceCollectionChanged());v.push(E,H),c.push((0,s.createPropertyDefinitionsGeneralGroup)(v,"studiesLegendVisibilityGroup",r.t(null,void 0,i(61142)),j));const B=[],U=(0,s.createTransparencyPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.showBackground,V),transparency:(0,s.convertToDefinitionProperty)(e,t.backgroundTransparency,O)},{id:"legendBgTransparency",title:z});return B.push(U),c.push((0,s.createPropertyDefinitionsGeneralGroup)(B,"generalLegendGroup")),{definitions:c}}(this._undoModel,e,t,this._options.marketStatusWidgetEnabled?v.showMarketOpenStatusProperty:null);return(0,c.createPropertyPage)(n,"legend",St,mt.legend)}_createScalesPropertyPage(){const e=this._createScalesDefinitions();return(0,c.createPropertyPage)(e,"scales",Dt,mt.scales)}_createScalesDefinitions(){const e=this._chartWidgetProperties.childs().scalesProperties.childs(),t={property:this._model.properties().childs().priceScaleSelectionStrategyName,values:(0,p.allPriceScaleSelectionStrategyInfo)().map((e=>({value:e.name,title:e.title})))};null===this._availableDateFormatValues&&(this._availableDateFormatValues=new(a())(function(e=!1){const t=new Date(Date.UTC(1997,8,29));return gt.availableDateFormats.map((i=>({value:i,title:new Pt.DateFormatter(i,e).format(t)})))}()).spawn());const n={property:yt.dateFormatProperty,values:this._availableDateFormatValues},l={property:ft.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,n){const r=n.seriesPriceScale.properties().childs(),l=[],c=[],d=[],u=[];if(n.seriesHasClosePrice){const t=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,i.showSymbolLabels,q)},{id:"symbolNameLabel",title:ce}),n=(0,s.createOptionsPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,i.showSeriesLastValue,J),option:(0,s.convertToDefinitionProperty)(e,i.seriesLastValueMode,K)},{id:"symbolLastValueLabel",title:de,options:new(a())(Ve)});c.push(t,n)}const p=t.highLowAvgPrice.childs(),h=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,p.highLowPriceLabelsVisible,Q)},{id:"highLowPriceLabels",title:ve});if(c.push(h),I){const t=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,p.averageClosePriceLabelVisible,X)},{id:"averageClosePriceLabel",title:he});c.push(t)}const v=(0,P.createWVFromGetterAndSubscription)((()=>e.model().priceDataSources().some((e=>!(0,f.isActingAsSymbolSource)(e)&&e.showInObjectTree()))),e.model().dataSourceCollectionChanged());{const t=(0,s.createCheckablePropertyDefinition)({visible:(0,s.convertFromReadonlyWVToDefinitionProperty)(v),checked:(0,s.convertToDefinitionProperty)(e,i.showStudyPlotLabels,Y)},{id:"studyNameLabel",title:ue});c.push(t)}const g=(0,P.createWVFromGetterAndSubscription)((()=>e.model().priceDataSources().some((e=>!(0,f.isActingAsSymbolSource)(e)&&e.showInObjectTree()))),e.model().dataSourceCollectionChanged());{const t=(0,s.createCheckablePropertyDefinition)({visible:(0,s.convertFromReadonlyWVToDefinitionProperty)(g),checked:(0,s.convertToDefinitionProperty)(e,i.showStudyLastValue,Z)},{id:"studyLastValueLabel",title:pe});c.push(t)}const y=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,r.alignLabels,$)},{id:"noOverlappingLabels",title:ge});if(c.push(y),l.push((0,s.createPropertyDefinitionsGeneralGroup)(c,"scalesLabelsGroup",ye)),n.countdownEnabled){const i=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,t.showCountdown,ee)},{id:"countdown",title:Pe});d.push(i)}if(e.crossHairSource().isMenuEnabled()){const t=(0,s.createCheckablePropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,B.addPlusButtonProperty,re)},{id:"addPlusButton",title:we});d.push(t)}if(n.currencyConversionEnabled||n.unitConversionEnabled){const t=n.currencyConversionEnabled&&n.unitConversionEnabled?me:n.currencyConversionEnabled?fe:be,i=n.currencyConversionEnabled&&n.unitConversionEnabled?ne:n.currencyConversionEnabled?te:ie,r=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(e,(0,U.currencyUnitVisibilityProperty)(),i)},{id:"scalesCurrencyUnit",title:t,options:new(a())((0,U.currencyUnitVisibilityOptions)())});d.push(r)}const b=(0,s.createNumberPropertyDefinition)({checked:(0,s.getLockPriceScaleDefinitionProperty)(e,r.lockScale,n.seriesPriceScale,oe),value:(0,s.getScaleRatioDefinitionProperty)(e,n.mainSeriesScaleRatioProperty,le,[(0,j.limitedPrecision)(7),e=>e])},{ -id:"lockScale",title:De,min:new(a())(n.mainSeriesScaleRatioProperty.getMinValue()),max:new(a())(n.mainSeriesScaleRatioProperty.getMaxValue()),step:new(a())(n.mainSeriesScaleRatioProperty.getStepChangeValue())}),m=(0,s.createOptionsPropertyDefinition)({option:(0,s.getPriceScaleSelectionStrategyDefinitionProperty)(e,n.scalesPlacementPropertyObj.property)},{id:"scalesPlacement",title:Se,options:new(a())(n.scalesPlacementPropertyObj.values)});if(d.push(b,m),l.push((0,s.createPropertyDefinitionsGeneralGroup)(d,"scalesPriceScaleGroup",_e)),o.enabled("scales_date_format")){const t=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(e,n.dateFormatPropertyObj.property,ae)},{id:"dateFormat",title:Te,options:n.dateFormatPropertyObj.values});u.push(t)}if(o.enabled("scales_time_hours_format")){const t=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(e,n.timeHoursFormatPropertyObj.property,se)},{id:"timeHoursFormat",title:Ce,options:new(a())(n.timeHoursFormatPropertyObj.values)});u.push(t)}return u.length>0&&l.push((0,s.createPropertyDefinitionsGeneralGroup)(u,"scalesTimeScaleGroup",ke)),{definitions:l}}(this._undoModel,this._series.properties().childs(),e,{disableSeriesPrevCloseValueProperty:this._series.isDWMProperty(),seriesHasClosePrice:this._series.hasClosePrice(),seriesPriceScale:this._series.priceScale(),mainSeriesScaleRatioProperty:c,scalesPlacementPropertyObj:t,dateFormatPropertyObj:n,timeHoursFormatPropertyObj:l,currencyConversionEnabled:this._options.currencyConversionEnabled,unitConversionEnabled:this._options.unitConversionEnabled,countdownEnabled:this._options.countdownEnabled,withWeekdayProperty:void 0})}_createMaxOffsetPropertyObject(){const e=(0,n.ensureNotNull)(this._model.timeScale()),t=new(a())(Math.floor(e.maxRightOffset()));e.maxRightOffsetChanged().subscribe(this,(e=>{t.setValue(Math.floor(e))})),this._maxRightOffsetPropertyObject={value:e.defaultRightOffset(),min:new(a())(0),max:t}}_createDefaultRightOffsetPercentageWatchedValue(){const e=(0,n.ensureNotNull)(this._model.timeScale());this._defaultRightOffsetPercentageWatchedValue=e.defaultRightOffsetPercentage()}_createUseRightOffsetPercentageWatchedValue(){const e=(0,n.ensureNotNull)(this._model.timeScale());this._useRightOffsetPercentageWatchedValue=e.usePercentageRightOffset()}_createAppearancePropertyPage(){const e=this._chartWidgetProperties.childs(),t=e.paneProperties.childs(),l=e.scalesProperties.childs(),p=this._model.watermarkSource();let h=null;null!==p&&(h=p.properties().childs());const v={property:d.property(),values:d.availableValues()},g={property:u.property(),values:u.availableValues()},y=this._model.sessions().properties().childs().graphics.childs().vertlines.childs().sessBreaks.childs();null===this._maxRightOffsetPropertyObject&&this._createMaxOffsetPropertyObject(),null===this._defaultRightOffsetPercentageWatchedValue&&this._createDefaultRightOffsetPercentageWatchedValue(),null===this._useRightOffsetPercentageWatchedValue&&this._createUseRightOffsetPercentageWatchedValue() -;const f=(0,n.ensureNotNull)(this._maxRightOffsetPropertyObject),b=(0,n.ensureNotNull)(this._defaultRightOffsetPercentageWatchedValue),m=(0,n.ensureNotNull)(this._useRightOffsetPercentageWatchedValue),w=function(e,t,n,l,c,d,u,p,h,v,g){const y=[],f=[],b=[],m=[],w=[],S=(0,s.createColorPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(e,t.background,null,Oe),gradientColor1:(0,s.getColorDefinitionProperty)(e,t.backgroundGradientStartColor,null,Oe),gradientColor2:(0,s.getColorDefinitionProperty)(e,t.backgroundGradientEndColor,null,Oe),type:(0,s.convertToDefinitionProperty)(e,t.backgroundType,Le)},{id:"chartBackground",title:Ze,noAlpha:!0}),D=t.vertGridProperties.childs(),_=(0,s.createLinePropertyDefinition)({color:(0,s.getColorDefinitionProperty)(e,D.color,null,Me),style:void 0},{id:"vertGridLine",title:$e}),T=t.horzGridProperties.childs(),C=(0,s.createLinePropertyDefinition)({color:(0,s.getColorDefinitionProperty)(e,T.color,null,xe),style:void 0},{id:"horizGridLine",title:et}),k=(0,P.combineProperty)((e=>!e),e.mainSeries().isDWMProperty()),V=(0,s.createLinePropertyDefinition)({visible:(0,E.makeProxyDefinitionPropertyDestroyable)(k),checked:(0,s.convertToDefinitionProperty)(e,c.visible,Ge),color:(0,s.getColorDefinitionProperty)(e,c.color,null,Re),width:(0,s.convertToDefinitionProperty)(e,c.width,We),style:(0,s.convertToDefinitionProperty)(e,c.style,Ae)},{id:"sessionBeaks",title:tt}),O=(0,P.createWVFromGetterAndSubscription)((()=>1!==e.model().panes().length),e.model().panesCollectionChanged()),L=(0,s.createLinePropertyDefinition)({visible:(0,s.convertFromReadonlyWVToDefinitionProperty)(O),color:(0,s.getColorDefinitionProperty)(e,t.separatorColor,null,Ee)},{id:"paneSeparators",title:rt}),M=t.crossHairProperties.childs(),x=(0,s.createLinePropertyDefinition)({color:(0,s.getColorDefinitionProperty)(e,M.color,M.transparency,He),width:(0,s.convertToDefinitionProperty)(e,M.width,je),style:(0,s.convertToDefinitionProperty)(e,M.style,Be)},{id:"crossHair",title:ot});if(y.push(S,_,C,V,L,x),null!==n){const t=(0,s.createColorPropertyDefinition)({checked:(0,s.convertToDefinitionProperty)(e,n.visibility,Ue),color:(0,s.getColorDefinitionProperty)(e,n.color,null,Ie)},{id:"watermark",title:lt});y.push(t)}const G=(0,s.createTextPropertyDefinition)({color:(0,s.getColorDefinitionProperty)(e,l.textColor,null,Fe),size:(0,s.convertToDefinitionProperty)(e,l.fontSize,ze)},{id:"scalesText",title:it}),R=(0,s.createLinePropertyDefinition)({color:(0,s.getColorDefinitionProperty)(e,l.lineColor,null,Ne)},{id:"scalesLine",title:nt});f.push(G,R);const W=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(e,p.property,qe)},{id:"navButtons",title:at,options:new(a())(p.values)}),A=(0,s.createOptionsPropertyDefinition)({option:(0,s.convertToDefinitionProperty)(e,h.property,Je)},{id:"paneButtons",title:st,options:new(a())(h.values)});b.push(W,A);const F=(0,s.createNumberPropertyDefinition)({value:(0,s.convertToDefinitionProperty)(e,t.topMargin,Ke,[j.floor])},{type:0,id:"paneTopMargin",title:ct,min:new(a())(0), -max:new(a())(25),step:new(a())(1),unit:new(a())("%")}),z=(0,s.createNumberPropertyDefinition)({value:(0,s.convertToDefinitionProperty)(e,t.bottomMargin,Qe,[j.floor])},{type:0,id:"paneBottomMargin",title:dt,min:new(a())(0),max:new(a())(25),step:new(a())(1),unit:new(a())("%")});if(m.push(F,z),o.enabled("chart_property_page_right_margin_editor")){const t={value:(0,s.convertFromWVToDefinitionProperty)(e,u.value,Xe,[j.floor])},i={type:0,id:"paneRightMargin",title:ut,min:u.min,max:u.max,step:new(a())(1),unit:new(a())(vt)};if(o.enabled("show_percent_option_for_right_margin")){const n=(0,s.createNumberPropertyDefinition)({...t,checked:(0,s.convertFromWVToDefinitionProperty)(e,g.opposite(),Ye)},{...i,title:ht}),r=(0,s.createNumberPropertyDefinition)({checked:(0,s.convertFromWVToDefinitionProperty)(e,g,Ye),value:(0,s.convertFromWVToDefinitionProperty)(e,v,Ye,[j.floor])},{type:0,id:"paneRightMarginPercentage",title:pt,min:new(a())(0),max:new(a())(99),step:new(a())(1),unit:new(a())("%")});w.push(n),w.push(r)}else{const e=(0,s.createNumberPropertyDefinition)(t,i);m.push(e)}}const N=[(0,s.createPropertyDefinitionsGeneralGroup)(y,"chartBasicStylesAppearanceGroup",r.t(null,void 0,i(88364))),(0,s.createPropertyDefinitionsGeneralGroup)(f,"scalesAppearanceGroup",r.t(null,void 0,i(43115))),(0,s.createPropertyDefinitionsGeneralGroup)(b,"buttonsAppearanceGroup",r.t(null,void 0,i(87845))),(0,s.createPropertyDefinitionsGeneralGroup)(m,"marginsAppearanceGroup",r.t(null,void 0,i(66653)))];return w.length>0&&N.push((0,s.createPropertyDefinitionsGeneralGroup)(w,"rightMarginsAppearanceGroup",r.t(null,void 0,i(40187)))),{definitions:N}}(this._undoModel,t,h,l,y,this._series.isDWMProperty(),f,v,g,b,m);return(0,c.createPropertyPage)(w,"appearance",_t,mt.appearance)}_createTradingPropertyPage(){return null}_createEventsPropertyPage(){return null}}},37424:e=>{e.exports=''},13168:e=>{e.exports=''},23068:e=>{e.exports=''},35885:e=>{ -e.exports=''},77822:e=>{e.exports=''},73837:e=>{e.exports=''}}]); \ No newline at end of file diff --git a/charting_library/bundles/general-property-page.e96347394179591498c3.js b/charting_library/bundles/general-property-page.e96347394179591498c3.js new file mode 100644 index 00000000..76c38ddb --- /dev/null +++ b/charting_library/bundles/general-property-page.e96347394179591498c3.js @@ -0,0 +1,10 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[3596],{25008:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ChartPropertyDefinitionsViewModel:()=>Lt});var n=i(50151),r=i(44352),o=i(2484),l=(i(8169),i(97070),i(40549)),s=i.n(l),a=i(65279),c=i(82623),d=i(11954),u=i(43074),p=i(37364),h=i(68622),v=i(35663),g=i(47539),y=i(1930),P=i(52865),f=i(21580),b=i(7019);const m=new g.TranslatedString("change symbol description visibility",r.t(null,void 0,i(26717))),w=new g.TranslatedString("change symbol legend format",r.t(null,void 0,i(95071))),S=new g.TranslatedString("change open market status visibility",r.t(null,void 0,i(18644))),D=new g.TranslatedString("change OHLC values visibility",r.t(null,void 0,i(57889))),_=new g.TranslatedString("change bar change visibility",r.t(null,void 0,i(45110))),T=new g.TranslatedString("change indicator arguments visibility",r.t(null,void 0,i(96162))),C=new g.TranslatedString("change indicator titles visibility",r.t(null,void 0,i(31325))),k=new g.TranslatedString("change indicator values visibility",r.t(null,void 0,i(99774))),V=new g.TranslatedString("change legend background visibility",r.t(null,void 0,i(61061))),O=new g.TranslatedString("change legend background transparency",r.t(null,void 0,i(97956))),L=new g.TranslatedString("change volume values visibility",r.t(null,void 0,i(9455))),M=new g.TranslatedString("change symbol field visibility",r.t(null,void 0,i(6091))),x=r.t(null,void 0,i(67369)),G=r.t(null,void 0,i(99487)),R=r.t(null,void 0,i(22519)),W=r.t(null,void 0,i(1111)),A=r.t(null,void 0,i(31326)),F=r.t(null,void 0,i(68791)),z=r.t(null,void 0,i(91322)),N=r.t(null,void 0,i(27331)),E=r.t(null,void 0,i(75991)),H=r.t(null,void 0,i(24248)),j=o.enabled("symbol_info_price_source");var B=i(79807),U=i(99846),I=i(34440),q=i(87172),J=i(35624);const K=o.enabled("show_average_close_price_line_and_label"),Q=new g.TranslatedString("change symbol labels visibility",r.t(null,void 0,i(9402))),X=new g.TranslatedString("change symbol last value visibility",r.t(null,void 0,i(53150))),Y=new g.TranslatedString("change symbol last value mode",r.t(null,void 0,i(28741))),Z=(new g.TranslatedString("change symbol previous close value visibility",r.t(null,void 0,i(12707))),new g.TranslatedString("change bid and ask labels visibility",r.t(null,void 0,i(5100))),new g.TranslatedString("change pre/post market price label visibility",r.t(null,void 0,i(49889))),new g.TranslatedString("change high and low price labels visibility",r.t(null,void 0,i(66805)))),$=new g.TranslatedString("change average close price label visibility",r.t(null,void 0,i(39402))),ee=(new g.TranslatedString("change indicators and financials name labels visibility",r.t(null,void 0,i(59820))),new g.TranslatedString("change indicators name labels visibility",r.t(null,void 0,i(87027)))),te=(new g.TranslatedString("change indicators and financials value labels visibility",r.t(null,void 0,i(90512))), +new g.TranslatedString("change indicators value labels visibility",r.t(null,void 0,i(14922)))),ie=new g.TranslatedString("change no overlapping labels",r.t(null,void 0,i(83935))),ne=new g.TranslatedString("change countdown to bar close visibility",r.t(null,void 0,i(58108))),re=new g.TranslatedString("change currency label visibility",r.t(null,void 0,i(79570))),oe=new g.TranslatedString("change unit label visibility",r.t(null,void 0,i(7011))),le=new g.TranslatedString("change currency and unit labels visibility",r.t(null,void 0,i(88161))),se=new g.TranslatedString("change plus button visibility",r.t(null,void 0,i(50190))),ae=new g.TranslatedString("toggle lock scale",r.t(null,void 0,i(21203))),ce=new g.TranslatedString("change price to bar ratio",r.t(null,void 0,i(69510))),de=new g.TranslatedString("change date format",r.t(null,void 0,i(50457))),ue=new g.TranslatedString("change time hours format",r.t(null,void 0,i(76991))),pe=(new g.TranslatedString("change day of week on labels",r.t(null,void 0,i(7104))),r.t(null,void 0,i(35383))),he=r.t(null,void 0,i(27767)),ve=(r.t(null,void 0,i(40847)),r.t(null,void 0,i(25084)),r.t(null,void 0,i(9654))),ge=(r.t(null,void 0,i(29687)),r.t(null,void 0,i(34905))),ye=(r.t(null,void 0,i(47586)),r.t(null,void 0,i(74823)),r.t(null,void 0,i(95036))),Pe=r.t(null,void 0,i(60971)),fe=r.t(null,void 0,i(42502)),be=r.t(null,void 0,i(94420)),me=r.t(null,void 0,i(94370)),we=r.t(null,void 0,i(50985)),Se=r.t(null,void 0,i(77534)),De=r.t(null,void 0,i(17319)),_e=r.t(null,void 0,i(97378)),Te=r.t(null,void 0,i(53224)),Ce=r.t(null,void 0,i(18219)),ke=r.t(null,void 0,i(64859)),Ve=r.t(null,void 0,i(25209)),Oe=r.t(null,void 0,i(97316)),Le=r.t(null,void 0,i(43637)),Me=(r.t(null,void 0,i(55090)),[{value:U.PriceAxisLastValueMode.LastPriceAndPercentageValue,title:r.t(null,void 0,i(76523))},{value:U.PriceAxisLastValueMode.LastValueAccordingToScale,title:r.t(null,void 0,i(80170))}]);const xe=new g.TranslatedString("change chart background color",r.t(null,void 0,i(99011))),Ge=new g.TranslatedString("change chart background type",r.t(null,void 0,i(72458))),Re=new g.TranslatedString("change vert grid lines color",r.t(null,void 0,i(22722))),We=(new g.TranslatedString("change vert grid lines style",r.t(null,void 0,i(22867))),new g.TranslatedString("change horz grid lines color",r.t(null,void 0,i(88096)))),Ae=(new g.TranslatedString("change horz grid lines style",r.t(null,void 0,i(2523))), +new g.TranslatedString("change sessions breaks visibility",r.t(null,void 0,i(71589)))),Fe=new g.TranslatedString("change sessions breaks color",r.t(null,void 0,i(1579))),ze=new g.TranslatedString("change sessions breaks width",r.t(null,void 0,i(15035))),Ne=new g.TranslatedString("change sessions breaks style",r.t(null,void 0,i(21460))),Ee=new g.TranslatedString("change scales text color",r.t(null,void 0,i(35065))),He=new g.TranslatedString("change scales font size",r.t(null,void 0,i(84382))),je=new g.TranslatedString("change scales lines color",r.t(null,void 0,i(12468))),Be=new g.TranslatedString("change pane separators color",r.t(null,void 0,i(89032))),Ue=new g.TranslatedString("change crosshair color",r.t(null,void 0,i(29951))),Ie=new g.TranslatedString("change crosshair width",r.t(null,void 0,i(37034))),qe=new g.TranslatedString("change crosshair style",r.t(null,void 0,i(92027))),Je=new g.TranslatedString("change symbol watermark visibility",r.t(null,void 0,i(87159))),Ke=new g.TranslatedString("change symbol watermark color",r.t(null,void 0,i(25616))),Qe=new g.TranslatedString("change navigation buttons visibility",r.t(null,void 0,i(35646))),Xe=new g.TranslatedString("change pane buttons visibility",r.t(null,void 0,i(37730))),Ye=new g.TranslatedString("change top margin",r.t(null,void 0,i(98905))),Ze=new g.TranslatedString("change bottom margin",r.t(null,void 0,i(10349))),$e=new g.TranslatedString("change right margin",r.t(null,void 0,i(35636))),et=new g.TranslatedString("change right margin percentage",r.t(null,void 0,i(66601))),tt=r.t(null,void 0,i(27331)),it=r.t(null,void 0,i(70353)),nt=r.t(null,void 0,i(95338)),rt=r.t(null,void 0,i(59827)),ot=r.t(null,void 0,i(37229)),lt=r.t(null,void 0,i(83182)),st=r.t(null,void 0,i(73908)),at=r.t(null,void 0,i(46720)),ct=r.t(null,void 0,i(77705)),dt=r.t(null,void 0,i(74343)),ut=r.t(null,void 0,i(50446)),pt=r.t(null,void 0,i(65994)),ht=r.t(null,void 0,i(91757)),vt=r.t(null,void 0,i(21141)),gt=r.t(null,void 0,i(36014)),yt=r.t(null,void 0,i(16812)),Pt=r.t(null,{context:"unit"},i(50831));var ft=i(54808),bt=i(55262),mt=i(86985),wt=i(51620),St=i(20364);const Dt={symbol:i(77822),legend:i(35885),scales:i(23068),appearance:i(37424),events:i(13168),trading:i(73837)},_t=r.t(null,void 0,i(89053)),Tt=r.t(null,void 0,i(79194)),Ct=r.t(null,void 0,i(43115)),kt=r.t(null,void 0,i(19481)),Vt=(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 Ot=[{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))}];o.enabled("symbol_info_long_description")&&Ot.push({id:"symbol-text-source-long-description",value:"long-description",title:r.t(null,void 0,i(96073))});class Lt{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(),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,n.ensureNotNull)(this._model.timeScale()).maxRightOffsetChanged().unsubscribeAll(this),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,n.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:St.availableTimezones.map((e=>({value:e.id,title:e.title})))};return new h.SeriesPropertyDefinitionsViewModel(this._series,this._undoModel,"symbol",_t,Dt.symbol,e)}_createLegendPropertyPage(){const e=this._chartWidgetProperties.childs().paneProperties.childs().legendProperties.childs(),t={property:this._series.properties().childs().statusViewStyle.childs().symbolTextSource,values:Ot},n=function(e,t,n,o,l){const c=[],d=[],u=(0,a.createOptionsPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showSeriesTitle,m),option:(0,a.convertToDefinitionProperty)(e,n.property,w)},{id:"symbolTextSource",title:x,options:new(s())(n.values)}) +;if(d.push(u),null!==o){const t=(0,b.combineWithFilteredUpdate)(((t,i)=>"market"===t&&!(0,y.isEconomicSymbol)(e.mainSeries().symbolInfo())),((e,t)=>null!==e),e.mainSeries().marketStatusModel().status(),e.mainSeries().symbolResolvingActive()),i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,o,S),visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(t)},{id:"showOpenMarketStatus",title:E});d.push(i)}const p=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showSeriesOHLC,D)},{id:"ohlcTitle",title:G});d.push(p);const h=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showBarChange,_)},{id:"barChange",title:R});if(d.push(h),d.push((0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showVolume,L)},{id:"barVolume",title:W})),j){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(),(0,P.createWVFromGetterAndSubscription)((()=>e.model().symbolSources().length),e.model().symbolSourceCollectionChanged()));d.push((0,a.createCheckablePropertyDefinition)({disabled:(0,a.convertFromReadonlyWVToDefinitionProperty)(e.model().symbolSourceResolvingActive()),checked:(0,a.convertToDefinitionProperty)(e,t.showPriceSource,M),visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(i)},{id:"priceSource",title:H}))}c.push((0,a.createPropertyDefinitionsGeneralGroup)(d,"seriesLegendVisibilityGroup",r.t(null,void 0,i(89053))));const v=[],g=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showStudyArguments,T)},{id:"studyArguments",title:F}),B=(0,a.createCheckableSetPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showStudyTitles,C)},{id:"studyTitles",title:A},[g]),U=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showStudyValues,k)},{id:"studyValues",title:z}),I=(0,P.createWVFromGetterAndSubscription)((()=>e.model().priceDataSources().some((e=>!(0,f.isActingAsSymbolSource)(e)&&e.showInObjectTree()))),e.model().dataSourceCollectionChanged());v.push(B,U),c.push((0,a.createPropertyDefinitionsGeneralGroup)(v,"studiesLegendVisibilityGroup",r.t(null,void 0,i(61142)),I));const q=[],J=(0,a.createTransparencyPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showBackground,V),transparency:(0,a.convertToDefinitionProperty)(e,t.backgroundTransparency,O)},{id:"legendBgTransparency",title:N});return q.push(J),c.push((0,a.createPropertyDefinitionsGeneralGroup)(q,"generalLegendGroup")),{definitions:c}}(this._undoModel,e,t,this._options.marketStatusWidgetEnabled?v.showMarketOpenStatusProperty:null);return(0,c.createPropertyPage)(n,"legend",Tt,Dt.legend)}_createScalesPropertyPage(){const e=this._createScalesDefinitions();return(0,c.createPropertyPage)(e,"scales",Ct,Dt.scales)}_createScalesDefinitions(){ +const e=this._chartWidgetProperties.childs().scalesProperties.childs(),t={property:this._model.properties().childs().priceScaleSelectionStrategyName,values:(0,p.allPriceScaleSelectionStrategyInfo)().map((e=>({value:e.name,title:e.title})))};null===this._availableDateFormatValues&&(this._availableDateFormatValues=new(s())(function(e=!1){const t=new Date(Date.UTC(1997,8,29));return ft.availableDateFormats.map((i=>({value:i,title:new mt.DateFormatter(i,e).format(t)})))}()).spawn());const n={property:bt.dateFormatProperty,values:this._availableDateFormatValues},l={property:wt.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,n){const r=n.seriesPriceScale.properties().childs(),l=[],c=[],d=[],u=[];if(n.seriesHasClosePrice){const t=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showSymbolLabels,Q)},{id:"symbolNameLabel",title:pe}),n=(0,a.createOptionsPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,i.showSeriesLastValue,X),option:(0,a.convertToDefinitionProperty)(e,i.seriesLastValueMode,Y)},{id:"symbolLastValueLabel",title:he,options:new(s())(Me)});c.push(t,n)}const p=t.highLowAvgPrice.childs(),h=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,p.highLowPriceLabelsVisible,Z)},{id:"highLowPriceLabels",title:Pe});if(c.push(h),K){const t=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,p.averageClosePriceLabelVisible,$)},{id:"averageClosePriceLabel",title:ye});c.push(t)}const v=(0,P.createWVFromGetterAndSubscription)((()=>e.model().priceDataSources().some((e=>!(0,f.isActingAsSymbolSource)(e)&&e.showInObjectTree()))),e.model().dataSourceCollectionChanged());{const t=(0,a.createCheckablePropertyDefinition)({visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(v),checked:(0,a.convertToDefinitionProperty)(e,i.showStudyPlotLabels,ee)},{id:"studyNameLabel",title:ve});c.push(t)}const g=(0,P.createWVFromGetterAndSubscription)((()=>e.model().priceDataSources().some((e=>!(0,f.isActingAsSymbolSource)(e)&&e.showInObjectTree()))),e.model().dataSourceCollectionChanged());{const t=(0,a.createCheckablePropertyDefinition)({visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(g),checked:(0,a.convertToDefinitionProperty)(e,i.showStudyLastValue,te)},{id:"studyLastValueLabel",title:ge});c.push(t)}const y=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,r.alignLabels,ie)},{id:"noOverlappingLabels",title:fe});if(c.push(y),l.push((0,a.createPropertyDefinitionsGeneralGroup)(c,"scalesLabelsGroup",be)),n.countdownEnabled){const i=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,t.showCountdown,ne)},{id:"countdown",title:me});d.push(i)}if(e.crossHairSource().isMenuEnabled()){const t=(0,a.createCheckablePropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,q.addPlusButtonProperty,se)},{ +id:"addPlusButton",title:_e});d.push(t)}if(n.currencyConversionEnabled||n.unitConversionEnabled){const t=n.currencyConversionEnabled&&n.unitConversionEnabled?De:n.currencyConversionEnabled?we:Se,i=n.currencyConversionEnabled&&n.unitConversionEnabled?le:n.currencyConversionEnabled?re:oe,r=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,(0,J.currencyUnitVisibilityProperty)(),i)},{id:"scalesCurrencyUnit",title:t,options:new(s())((0,J.currencyUnitVisibilityOptions)())});d.push(r)}const b=(0,a.createNumberPropertyDefinition)({checked:(0,a.getLockPriceScaleDefinitionProperty)(e,r.lockScale,n.seriesPriceScale,ae),value:(0,a.getScaleRatioDefinitionProperty)(e,n.mainSeriesScaleRatioProperty,ce,[(0,I.limitedPrecision)(7),e=>e])},{id:"lockScale",title:Ce,min:new(s())(n.mainSeriesScaleRatioProperty.getMinValue()),max:new(s())(n.mainSeriesScaleRatioProperty.getMaxValue()),step:new(s())(n.mainSeriesScaleRatioProperty.getStepChangeValue())}),m=(0,a.createOptionsPropertyDefinition)({option:(0,a.getPriceScaleSelectionStrategyDefinitionProperty)(e,n.scalesPlacementPropertyObj.property)},{id:"scalesPlacement",title:Te,options:new(s())(n.scalesPlacementPropertyObj.values)});if(d.push(b,m),l.push((0,a.createPropertyDefinitionsGeneralGroup)(d,"scalesPriceScaleGroup",ke)),o.enabled("scales_date_format")){const t=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,n.dateFormatPropertyObj.property,de)},{id:"dateFormat",title:Ve,options:n.dateFormatPropertyObj.values});u.push(t)}if(o.enabled("scales_time_hours_format")){const t=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,n.timeHoursFormatPropertyObj.property,ue)},{id:"timeHoursFormat",title:Oe,options:new(s())(n.timeHoursFormatPropertyObj.values)});u.push(t)}return u.length>0&&l.push((0,a.createPropertyDefinitionsGeneralGroup)(u,"scalesTimeScaleGroup",Le)),{definitions:l}}(this._undoModel,this._series.properties().childs(),e,{disableSeriesPrevCloseValueProperty:this._series.isDWMProperty(),seriesHasClosePrice:this._series.hasClosePrice(),seriesPriceScale:this._series.priceScale(),mainSeriesScaleRatioProperty:c,scalesPlacementPropertyObj:t,dateFormatPropertyObj:n,timeHoursFormatPropertyObj:l,currencyConversionEnabled:this._options.currencyConversionEnabled,unitConversionEnabled:this._options.unitConversionEnabled,countdownEnabled:this._options.countdownEnabled,withWeekdayProperty:void 0})}_createMaxOffsetPropertyObject(){const e=(0,n.ensureNotNull)(this._model.timeScale()),t=new(s())(Math.floor(e.maxRightOffset()));e.maxRightOffsetChanged().subscribe(this,(e=>{t.setValue(Math.floor(e))})),this._maxRightOffsetPropertyObject={value:e.defaultRightOffset(),min:new(s())(0),max:t}}_createDefaultRightOffsetPercentageWatchedValue(){const e=(0,n.ensureNotNull)(this._model.timeScale());this._defaultRightOffsetPercentageWatchedValue=e.defaultRightOffsetPercentage()}_createUseRightOffsetPercentageWatchedValue(){const e=(0,n.ensureNotNull)(this._model.timeScale()) +;this._useRightOffsetPercentageWatchedValue=e.usePercentageRightOffset()}_createAppearancePropertyPage(){const e=this._chartWidgetProperties.childs(),t=e.paneProperties.childs(),l=e.scalesProperties.childs(),p=this._model.watermarkSource();let h=null;null!==p&&(h=p.properties().childs());const v={property:d.property(),values:d.availableValues()},g={property:u.property(),values:u.availableValues()},y=this._model.sessions().properties().childs().graphics.childs().vertlines.childs().sessBreaks.childs();null===this._maxRightOffsetPropertyObject&&this._createMaxOffsetPropertyObject(),null===this._defaultRightOffsetPercentageWatchedValue&&this._createDefaultRightOffsetPercentageWatchedValue(),null===this._useRightOffsetPercentageWatchedValue&&this._createUseRightOffsetPercentageWatchedValue();const f=(0,n.ensureNotNull)(this._maxRightOffsetPropertyObject),b=(0,n.ensureNotNull)(this._defaultRightOffsetPercentageWatchedValue),m=(0,n.ensureNotNull)(this._useRightOffsetPercentageWatchedValue),w=function(e,t,n,l,c,d,u,p,h,v,g){const y=[],f=[],b=[],m=[],w=[],S=(0,a.createColorPropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,t.background,null,xe),gradientColor1:(0,a.getColorDefinitionProperty)(e,t.backgroundGradientStartColor,null,xe),gradientColor2:(0,a.getColorDefinitionProperty)(e,t.backgroundGradientEndColor,null,xe),type:(0,a.convertToDefinitionProperty)(e,t.backgroundType,Ge)},{id:"chartBackground",title:tt,noAlpha:!0}),D=t.vertGridProperties.childs(),_=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,D.color,null,Re),style:void 0},{id:"vertGridLine",title:it}),T=t.horzGridProperties.childs(),C=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,T.color,null,We),style:void 0},{id:"horizGridLine",title:nt}),k=(0,P.combineProperty)((e=>!e),e.mainSeries().isDWMProperty()),V=(0,a.createLinePropertyDefinition)({visible:(0,B.makeProxyDefinitionPropertyDestroyable)(k),checked:(0,a.convertToDefinitionProperty)(e,c.visible,Ae),color:(0,a.getColorDefinitionProperty)(e,c.color,null,Fe),width:(0,a.convertToDefinitionProperty)(e,c.width,ze),style:(0,a.convertToDefinitionProperty)(e,c.style,Ne)},{id:"sessionBeaks",title:rt}),O=(0,P.createWVFromGetterAndSubscription)((()=>1!==e.model().panes().length),e.model().panesCollectionChanged()),L=(0,a.createLinePropertyDefinition)({visible:(0,a.convertFromReadonlyWVToDefinitionProperty)(O),color:(0,a.getColorDefinitionProperty)(e,t.separatorColor,null,Be)},{id:"paneSeparators",title:st}),M=t.crossHairProperties.childs(),x=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,M.color,M.transparency,Ue),width:(0,a.convertToDefinitionProperty)(e,M.width,Ie),style:(0,a.convertToDefinitionProperty)(e,M.style,qe)},{id:"crossHair",title:at});if(y.push(S,_,C,V,L,x),null!==n){const t=(0,a.createColorPropertyDefinition)({checked:(0,a.convertToDefinitionProperty)(e,n.visibility,Je),color:(0,a.getColorDefinitionProperty)(e,n.color,null,Ke)},{id:"watermark",title:ct});y.push(t)}const G=(0,a.createTextPropertyDefinition)({ +color:(0,a.getColorDefinitionProperty)(e,l.textColor,null,Ee),size:(0,a.convertToDefinitionProperty)(e,l.fontSize,He)},{id:"scalesText",title:ot}),R=(0,a.createLinePropertyDefinition)({color:(0,a.getColorDefinitionProperty)(e,l.lineColor,null,je)},{id:"scalesLine",title:lt});f.push(G,R);const W=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,p.property,Qe)},{id:"navButtons",title:dt,options:new(s())(p.values)}),A=(0,a.createOptionsPropertyDefinition)({option:(0,a.convertToDefinitionProperty)(e,h.property,Xe)},{id:"paneButtons",title:ut,options:new(s())(h.values)});b.push(W,A);const F=(0,a.createNumberPropertyDefinition)({value:(0,a.convertToDefinitionProperty)(e,t.topMargin,Ye,[I.floor])},{type:0,id:"paneTopMargin",title:pt,min:new(s())(0),max:new(s())(25),step:new(s())(1),unit:new(s())("%")}),z=(0,a.createNumberPropertyDefinition)({value:(0,a.convertToDefinitionProperty)(e,t.bottomMargin,Ze,[I.floor])},{type:0,id:"paneBottomMargin",title:ht,min:new(s())(0),max:new(s())(25),step:new(s())(1),unit:new(s())("%")});if(m.push(F,z),o.enabled("chart_property_page_right_margin_editor")){const t={value:(0,a.convertFromWVToDefinitionProperty)(e,u.value,$e,[I.floor])},i={type:0,id:"paneRightMargin",title:vt,min:u.min,max:u.max,step:new(s())(1),unit:new(s())(Pt)};if(o.enabled("show_percent_option_for_right_margin")){const n=(0,a.createNumberPropertyDefinition)({...t,checked:(0,a.convertFromWVToDefinitionProperty)(e,g.opposite(),et)},{...i,title:yt}),r=(0,a.createNumberPropertyDefinition)({checked:(0,a.convertFromWVToDefinitionProperty)(e,g,et),value:(0,a.convertFromWVToDefinitionProperty)(e,v,et,[I.floor])},{type:0,id:"paneRightMarginPercentage",title:gt,min:new(s())(0),max:new(s())(99),step:new(s())(1),unit:new(s())("%")});w.push(n),w.push(r)}else{const e=(0,a.createNumberPropertyDefinition)(t,i);m.push(e)}}const N=[(0,a.createPropertyDefinitionsGeneralGroup)(y,"chartBasicStylesAppearanceGroup",r.t(null,void 0,i(88364))),(0,a.createPropertyDefinitionsGeneralGroup)(f,"scalesAppearanceGroup",r.t(null,void 0,i(43115))),(0,a.createPropertyDefinitionsGeneralGroup)(b,"buttonsAppearanceGroup",r.t(null,void 0,i(87845))),(0,a.createPropertyDefinitionsGeneralGroup)(m,"marginsAppearanceGroup",r.t(null,void 0,i(66653)))];return w.length>0&&N.push((0,a.createPropertyDefinitionsGeneralGroup)(w,"rightMarginsAppearanceGroup",r.t(null,void 0,i(40187)))),{definitions:N}}(this._undoModel,t,h,l,y,this._series.isDWMProperty(),f,v,g,b,m);return(0,c.createPropertyPage)(w,"appearance",kt,Dt.appearance)}_createTradingPropertyPage(){return null}_createEventsPropertyPage(){return null}}},37424:e=>{e.exports=''},13168:e=>{ +e.exports=''},23068:e=>{e.exports=''},35885:e=>{e.exports=''},77822:e=>{e.exports=''},73837:e=>{e.exports=''}}]); \ No newline at end of file diff --git a/charting_library/bundles/he_IL.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/he_IL.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 6cb01ced..00000000 --- a/charting_library/bundles/he_IL.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:s=>{s.exports=["ברים"]},19648:s=>{s.exports=["12 שעות"]},55838:s=>{s.exports=["24 שעות"]},88364:s=>{s.exports=["גרף סגנונות בסיסי"]},46720:s=>{s.exports=["צלב"]},50985:s=>{s.exports=["מַטְבֵּעַ"]},17319:s=>{s.exports=["מטבע ויחידה"]},19481:s=>{s.exports=["ניראות"]},68791:s=>{s.exports=["טיעונים"]},95036:s=>{s.exports=["מחיר סגירה ממוצע"]},27331:s=>{s.exports=["רקע"]},22519:s=>{s.exports=["ערכי שינוי הנר"]},87845:s=>{s.exports=["כפתורים"]},25209:s=>{s.exports=["פורמט תאריך"]},55090:s=>{s.exports=["יום בשבוע על תוויות"]},29601:s=>{s.exports=["תיאור"]},26897:s=>{s.exports=["אירועים"]},95338:s=>{s.exports=["קווי רשת אופקי"]},60971:s=>{s.exports=["מחיר גבוה ונמוך"]},61142:s=>{s.exports=["אינדיקטורים"]},34905:s=>{s.exports=["ערך אינדיקטורים"]},29687:s=>{s.exports=["אינדיקטורים וערך פיננסי"]},25084:s=>{s.exports=["אינדיקטורים ושם פיננסיים"]},9654:s=>{s.exports=["שם אינדיקטורים"]},99487:s=>{s.exports=["ערכי פגנס"]},75991:s=>{s.exports=["מצב שוק פתוח"]},70500:s=>{s.exports=["כסף"]},66653:s=>{s.exports=["מינוף"]},42502:s=>{s.exports=["אין חפיפה"]},74343:s=>{s.exports=["ניווט"]},43115:s=>{s.exports=["סולם מחיר"]},53224:s=>{s.exports=["מיקום קנה מידה"]},79194:s=>{s.exports=["שורת סטטוס"]},89053:s=>{s.exports=["סימול"]},35383:s=>{s.exports=["שם סימול"]},27767:s=>{s.exports=["סימול מחיר אחרון"]},40847:s=>{s.exports=["סימול מחיר סגירה ביום הקודם"]},50446:s=>{s.exports=["פאנל"]},73908:s=>{s.exports=["מפרידי חלוניות"]},36014:s=>{s.exports=["אחוז"]},78621:s=>{s.exports=["פיפס"]},74823:s=>{s.exports=["מחיר פרה/פוסט מארקט"]},64859:s=>{s.exports=["סולם מחירים"]},76523:s=>{s.exports=["מחיר אחרון וערך האחוז"]},40187:s=>{s.exports="Right Margin"},77705:s=>{s.exports=["סימן מים"]},67369:s=>{s.exports=["כותרת"]},31326:s=>{s.exports=["כותרות"]},23097:s=>{s.exports=["טיקר"]},82168:s=>{s.exports=["טיקר ותיאור"]},43637:s=>{s.exports=["סולם זמן"]},97316:s=>{s.exports=["זמן שעות פורמט"]},90801:s=>{s.exports=["מסחר"]},77534:s=>{s.exports=["יחידה"]},1111:s=>{s.exports=["ווליום/נפח מסחר"]},80170:s=>{s.exports=["ערך אחרון לפי קנה מידה"]},91322:s=>{s.exports=["ערכים"]},70353:s=>{s.exports=["קווי רשת אנכיים"]},57889:s=>{s.exports=["שנה את הנראות של ערכי OHLC"]},35646:s=>{s.exports=["שנה נראות של לחצני הניווט"]},18644:s=>{s.exports=["שנה את נראות מצב השוק הפתוח"]},45110:s=>{s.exports=["שנה נראות של בר שינוי"]},10349:s=>{s.exports=["שנה שוליים תחתוניים"]},88161:s=>{s.exports=["שנה את נראות תוויות המטבע והיחידה"]},79570:s=>{s.exports=["שנה את נראות תווית המטבע"]},99011:s=>{s.exports=["שנה את צבע הרקע של הגרף"]},72458:s=>{s.exports=["שנה את סוג הרקע של הגרף"]},37034:s=>{s.exports=["שנה רוחב צלב"]},29951:s=>{s.exports=["שנה את צבע הצלב"]},92027:s=>{s.exports=["שנה סגנון צלב"]},50457:s=>{s.exports=["שנה פורמט תאריך"]},7104:s=>{s.exports=["שנה את יום השבוע על התוויות"]},88096:s=>{s.exports=["שנה את צבע קווי הרשת האופקיים"]},2523:s=>{s.exports=["שנה את סגנון קווי הרשת האופקיים"]},31325:s=>{s.exports=["שנה את נראות של כותרות אינדיקטור"]},99774:s=>{ -s.exports=["שינוי נראות ערכי אינדיקטור"]},96162:s=>{s.exports=["שינוי נראות ארגומנטים של אינדיקטור"]},59820:s=>{s.exports=["שנה נראות של שם תוויות אינדיקטורים ופיננסיות"]},90512:s=>{s.exports=["שנה נראות של אינדיקטורים ותוויות ערך פיננסיות"]},97956:s=>{s.exports=["שנה את שקיפות הרקע של מקרא"]},61061:s=>{s.exports=["שנה נראות הרקע של מקרא"]},37730:s=>{s.exports=["שנה נראות לחצני החלונית"]},89032:s=>{s.exports=["שנה את צבע מפריד החלונות"]},35636:s=>{s.exports=["שנה שוליים ימניים"]},66601:s=>{s.exports="change right margin percentage"},25616:s=>{s.exports=["שנה צבע סימן מים של הסימול"]},87159:s=>{s.exports=["שנה נראות סימן מים של הסימול"]},26717:s=>{s.exports=["שנה את נראות תיאור הסימול"]},28741:s=>{s.exports=["שינוי מצב ערך אחרון של סימול"]},95071:s=>{s.exports=["שנה פורמט מקרא סימולים"]},35065:s=>{s.exports=["שנה צבע טקסט של סולמות"]},84382:s=>{s.exports=["שנה גודל גופן בקנה מידה"]},12468:s=>{s.exports=["שנה צבע קווים של סולמות"]},71589:s=>{s.exports=["שנה נראות של הפסקות סשנים"]},15035:s=>{s.exports=["שנה רוחב קווי הפרדה של סשנים sessions breaks"]},1579:s=>{s.exports=["שנה צבע קווי הפרדה של סשנים sessions breaks"]},21460:s=>{s.exports=["שנה סגנון הפסקות סשן sessions breaks"]},76991:s=>{s.exports=["שינוי זמן שעות פורמט"]},98905:s=>{s.exports=["שנה שוליים עליוניים"]},7011:s=>{s.exports=["שנה את נראות תווית היחידה"]},22722:s=>{s.exports=["שנה את צבע קווי הרשת האנכיים"]},22867:s=>{s.exports=["שנה את סגנון קווי הרשת האנכיים"]},9455:s=>{s.exports=["שינוי נראות ערכי ווליום"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/he_IL.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/he_IL.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..28c27b39 --- /dev/null +++ b/charting_library/bundles/he_IL.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:s=>{s.exports=["ברים"]},19648:s=>{s.exports=["12 שעות"]},55838:s=>{s.exports=["24 שעות"]},88364:s=>{s.exports=["גרף סגנונות בסיסי"]},46720:s=>{s.exports=["צלב"]},50985:s=>{s.exports=["מַטְבֵּעַ"]},17319:s=>{s.exports=["מטבע ויחידה"]},19481:s=>{s.exports=["ניראות"]},68791:s=>{s.exports=["טיעונים"]},95036:s=>{s.exports=["מחיר סגירה ממוצע"]},27331:s=>{s.exports=["רקע"]},22519:s=>{s.exports=["ערכי שינוי הנר"]},87845:s=>{s.exports=["כפתורים"]},25209:s=>{s.exports=["פורמט תאריך"]},55090:s=>{s.exports=["יום בשבוע על תוויות"]},29601:s=>{s.exports=["תיאור"]},26897:s=>{s.exports=["אירועים"]},95338:s=>{s.exports=["קווי רשת אופקי"]},60971:s=>{s.exports=["מחיר גבוה ונמוך"]},61142:s=>{s.exports=["אינדיקטורים"]},34905:s=>{s.exports=["ערך אינדיקטורים"]},29687:s=>{s.exports=["אינדיקטורים וערך פיננסי"]},25084:s=>{s.exports=["אינדיקטורים ושם פיננסיים"]},9654:s=>{s.exports=["שם אינדיקטורים"]},99487:s=>{s.exports=["ערכי פגנס"]},75991:s=>{s.exports=["מצב שוק פתוח"]},96073:s=>{s.exports="Long Description"},70500:s=>{s.exports=["כסף"]},66653:s=>{s.exports=["מינוף"]},42502:s=>{s.exports=["אין חפיפה"]},74343:s=>{s.exports=["ניווט"]},43115:s=>{s.exports=["סולם מחיר"]},53224:s=>{s.exports=["מיקום קנה מידה"]},79194:s=>{s.exports=["שורת סטטוס"]},89053:s=>{s.exports=["סימול"]},35383:s=>{s.exports=["שם סימול"]},27767:s=>{s.exports=["סימול מחיר אחרון"]},40847:s=>{s.exports=["סימול מחיר סגירה ביום הקודם"]},50446:s=>{s.exports=["פאנל"]},73908:s=>{s.exports=["מפרידי חלוניות"]},36014:s=>{s.exports=["אחוז"]},78621:s=>{s.exports=["פיפס"]},74823:s=>{s.exports=["מחיר פרה/פוסט מארקט"]},64859:s=>{s.exports=["סולם מחירים"]},76523:s=>{s.exports=["מחיר אחרון וערך האחוז"]},40187:s=>{s.exports="Right Margin"},77705:s=>{s.exports=["סימן מים"]},67369:s=>{s.exports=["כותרת"]},31326:s=>{s.exports=["כותרות"]},23097:s=>{s.exports=["טיקר"]},82168:s=>{s.exports=["טיקר ותיאור"]},43637:s=>{s.exports=["סולם זמן"]},97316:s=>{s.exports=["זמן שעות פורמט"]},90801:s=>{s.exports=["מסחר"]},77534:s=>{s.exports=["יחידה"]},1111:s=>{s.exports=["ווליום/נפח מסחר"]},80170:s=>{s.exports=["ערך אחרון לפי קנה מידה"]},91322:s=>{s.exports=["ערכים"]},70353:s=>{s.exports=["קווי רשת אנכיים"]},57889:s=>{s.exports=["שנה את הנראות של ערכי OHLC"]},35646:s=>{s.exports=["שנה נראות של לחצני הניווט"]},18644:s=>{s.exports=["שנה את נראות מצב השוק הפתוח"]},45110:s=>{s.exports=["שנה נראות של בר שינוי"]},10349:s=>{s.exports=["שנה שוליים תחתוניים"]},88161:s=>{s.exports=["שנה את נראות תוויות המטבע והיחידה"]},79570:s=>{s.exports=["שנה את נראות תווית המטבע"]},99011:s=>{s.exports=["שנה את צבע הרקע של הגרף"]},72458:s=>{s.exports=["שנה את סוג הרקע של הגרף"]},37034:s=>{s.exports=["שנה רוחב צלב"]},29951:s=>{s.exports=["שנה את צבע הצלב"]},92027:s=>{s.exports=["שנה סגנון צלב"]},50457:s=>{s.exports=["שנה פורמט תאריך"]},7104:s=>{s.exports=["שנה את יום השבוע על התוויות"]},88096:s=>{s.exports=["שנה את צבע קווי הרשת האופקיים"]},2523:s=>{s.exports=["שנה את סגנון קווי הרשת האופקיים"]},31325:s=>{s.exports=["שנה את נראות של כותרות אינדיקטור"]}, +99774:s=>{s.exports=["שינוי נראות ערכי אינדיקטור"]},96162:s=>{s.exports=["שינוי נראות ארגומנטים של אינדיקטור"]},59820:s=>{s.exports=["שנה נראות של שם תוויות אינדיקטורים ופיננסיות"]},90512:s=>{s.exports=["שנה נראות של אינדיקטורים ותוויות ערך פיננסיות"]},97956:s=>{s.exports=["שנה את שקיפות הרקע של מקרא"]},61061:s=>{s.exports=["שנה נראות הרקע של מקרא"]},37730:s=>{s.exports=["שנה נראות לחצני החלונית"]},89032:s=>{s.exports=["שנה את צבע מפריד החלונות"]},35636:s=>{s.exports=["שנה שוליים ימניים"]},66601:s=>{s.exports="change right margin percentage"},25616:s=>{s.exports=["שנה צבע סימן מים של הסימול"]},87159:s=>{s.exports=["שנה נראות סימן מים של הסימול"]},26717:s=>{s.exports=["שנה את נראות תיאור הסימול"]},6091:s=>{s.exports="change symbol field visibility"},28741:s=>{s.exports=["שינוי מצב ערך אחרון של סימול"]},95071:s=>{s.exports=["שנה פורמט מקרא סימולים"]},35065:s=>{s.exports=["שנה צבע טקסט של סולמות"]},84382:s=>{s.exports=["שנה גודל גופן בקנה מידה"]},12468:s=>{s.exports=["שנה צבע קווים של סולמות"]},71589:s=>{s.exports=["שנה נראות של הפסקות סשנים"]},15035:s=>{s.exports=["שנה רוחב קווי הפרדה של סשנים sessions breaks"]},1579:s=>{s.exports=["שנה צבע קווי הפרדה של סשנים sessions breaks"]},21460:s=>{s.exports=["שנה סגנון הפסקות סשן sessions breaks"]},76991:s=>{s.exports=["שינוי זמן שעות פורמט"]},98905:s=>{s.exports=["שנה שוליים עליוניים"]},7011:s=>{s.exports=["שנה את נראות תווית היחידה"]},22722:s=>{s.exports=["שנה את צבע קווי הרשת האנכיים"]},22867:s=>{s.exports=["שנה את סגנון קווי הרשת האנכיים"]},9455:s=>{s.exports=["שינוי נראות ערכי ווליום"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/he_IL.6847.490ee46270bef6a878dd.js b/charting_library/bundles/he_IL.7257.089fbbc28bead9558b87.js similarity index 61% rename from charting_library/bundles/he_IL.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/he_IL.7257.089fbbc28bead9558b87.js index 15dc448e..d3a3fdb1 100644 --- a/charting_library/bundles/he_IL.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/he_IL.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports=["שישי"]},11268:e=>{e.exports=["שני"]},63331:e=>{e.exports=["שבת"]},85954:e=>{e.exports=["ראשון"]},26230:e=>{e.exports="We"},24793:e=>{e.exports=["חמישי"]},31533:e=>{e.exports=["שלישי"]},89790:e=>{e.exports=["לא ניתן לקבל קוד מקור"]},39589:e=>{e.exports=["פאנל ממוזער"]},38154:e=>{e.exports=["אישור הסרת עץ המחקר"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["צור חשבון בחינם"]},69419:e=>{e.exports=["הכל טוב - השוק פתוח."]},97637:e=>{e.exports=["‏אפריל"]},86797:e=>{e.exports=["‏אוגוסט"]},22519:e=>{e.exports=["ערכי שינוי הנר"]},52003:e=>{e.exports=["האם אתה באמת רוצה למחוק את המחקר ואת כל הבנים שלו?"]},68854:e=>{e.exports=["לחץ לחיצה כפולה"]},97325:e=>{e.exports=["בעיית נתונים"]},52916:e=>{e.exports=["הנתונים מתעדכנים פעם ביום."]},25978:e=>{e.exports=["הנתונים מתעדכנים פעם בשנייה, גם אם ישנם עדכונים נוספים בשוק."]},57310:e=>{e.exports=["הנתונים מעוכבים"]},49321:e=>{e.exports=["הנתונים על התוכנית הבסיסית שלנו מתעדכנים פעם בשנייה, גם אם יש עדכונים נוספים בשוק."]},55669:e=>{e.exports=["דצמבר‏"]},83498:e=>{e.exports=["מחק את החלונית"]},59315:e=>{e.exports=["נתוני סוף יום"]},82751:e=>{e.exports=["שגיאה"]},40519:e=>{e.exports=["ערב. השוק פתוח למסחר מאוחר post-market."]},80227:e=>{e.exports=["אזור זמן של הבורסה"]},16467:e=>{e.exports=["פברואר‏"]},25046:e=>{e.exports=["מלא את הסכמי הבורסה"]},93666:e=>{e.exports=["סימול דגל"]},564:e=>{e.exports=["שישי"]},72970:e=>{e.exports=["יום שישי"]},88958:e=>{e.exports=["חג"]},21686:e=>{e.exports=["הסתר מקרא אינדיקטור"]},26935:e=>{e.exports=["ארגומנטים של אינדיקטור"]},26315:e=>{e.exports=["כותרות מתנד"]},84098:e=>{e.exports=["ערכי מתנד"]},91459:e=>{e.exports=["אם אתה מעוניין בנתונים בזמן אמת של {listedExchange} תצטרך להשלים הסכם Exchange. אל דאגה, זה לוקח רק כמה לחיצות"]},50634:e=>{e.exports=["זה יעבור למסחר המאוחר, פוסט מארקט ב-{remainingTime}."]},74537:e=>{e.exports=["הוא ייפתח לטרום מסחר פרה-מארקט ב-{remainingTime}."]},26910:e=>{e.exports=["ינואר‏"]},23230:e=>{e.exports=["יולי‏"]},49385:e=>{e.exports=["יוני‏"]},99487:e=>{e.exports=["ערכי פגנס"]},15815:e=>{e.exports=["עדכון אחד מידי שנייה"]},90784:e=>{e.exports=["אוקטובר‏"]},75991:e=>{e.exports=["מצב שוק פתוח"]},18429:e=>{e.exports=["למד עוד"]},39899:e=>{e.exports=["הזז חלונית למטה"]},70343:e=>{e.exports=["הזז חלונית למעלה"]},83085:e=>{e.exports=["שני"]},61199:e=>{e.exports=["יום שני"]},41610:e=>{e.exports=["עוד"]},1653:e=>{e.exports=["בקר. השוק פתוח כעת לטרום מסחר, פרה-מרקט בלבד."]},56470:e=>{e.exports=["הגדל גרף"]},19603:e=>{e.exports=["הגדל חלונית"]},68327:e=>{e.exports=["מאי"]},35732:e=>{e.exports=["נהל חלונות"]},84675:e=>{e.exports=["מרץ‏"]},83949:e=>{e.exports=["שוק פתוח"]},35701:e=>{e.exports=["השוק נפתח בעוד {remainingTime}."]},95814:e=>{e.exports=["השוק סגור"]},98105:e=>{e.exports=["השוק נסגר בעוד {remainingTime}."]},87202:e=>{e.exports=["השוק נמצא כרגע בחופשה. כיף להם."]},71194:e=>{e.exports=["נובמבר‏"]},66324:e=>{e.exports=["קוד מקור"]},36835:e=>{e.exports=["שבת"]},1144:e=>{e.exports=["יום שבת"]},40653:e=>{ -e.exports=["גלול לשמאל"]},26721:e=>{e.exports=["גלול לבר העדכני ביותר"]},35809:e=>{e.exports=["גלול לימין"]},61132:e=>{e.exports=["ספטמבר‏"]},28705:e=>{e.exports=["הצג מקרא אינדיקטור"]},51072:e=>{e.exports=["הצג עץ אובייקטים"]},37809:e=>{e.exports=["הצג הגדרות אינטרוולים"]},39045:e=>{e.exports=["שגיאת מחקר"]},86577:e=>{e.exports=["יום ראשון"]},72149:e=>{e.exports=["יום ראשון"]},39339:e=>{e.exports=["כותרת סימול"]},29985:e=>{e.exports=["פוסט-מרקט"]},28412:e=>{e.exports=["תוכניות בתשלום כוללות עדכוני נתונים מהירים יותר."]},56042:e=>{e.exports=["פרה-מרקט"]},36015:e=>{e.exports=["נתוני זמן אמת עבור {description} אינם נתמכים כרגע. אנו עשויים לתמוך בזה בעתיד."]},6667:e=>{e.exports=["נתונים בזמן אמת עבור {symbolName} מסופקים על ידי {exchange} exchange."]},48293:e=>{e.exports=["שחזר גרף"]},91029:e=>{e.exports=["שחזר חלון"]},75094:e=>{e.exports=["רביעי"]},7147:e=>{e.exports=["יום רביעי"]},52984:e=>{e.exports=["כדי לקבל נתונים בזמן אמת עבור {description}, אנא קנה את חבילת הנתונים בזמן אמת."]},9787:e=>{e.exports=["חמישי"]},7951:e=>{e.exports=["יום חמישי"]},57918:e=>{e.exports=["נתונים אלה הם בזמן אמת, אך הם שונים במקצת מהמקבילה הרשמית שלה מהבורסה הראשית."]},68025:e=>{e.exports=["נתונים אלה הם בזמן אמת, אך הם שונים במקצת מהמקבילה הרשמית שלהם שמגיעה מ- {exchange}."]},73717:e=>{e.exports=["סימול זה אינו קיים, אנא בחר סימול אחר."]},57048:e=>{e.exports=["זמן לטיול - שוק זה סגור."]},94316:e=>{e.exports=["שלישי"]},44979:e=>{e.exports=["יום שלישי"]},8209:e=>{e.exports=["בטל סימול"]},1111:e=>{e.exports=["ווליום/נפח מסחר"]},61311:e=>{e.exports=["הגדל"]},47602:e=>{e.exports=["הקטן"]},57889:e=>{e.exports=["שנה את הנראות של ערכי OHLC"]},18644:e=>{e.exports=["שנה את נראות מצב השוק הפתוח"]},45110:e=>{e.exports=["שנה נראות של בר שינוי"]},31325:e=>{e.exports=["שנה את נראות של כותרות אינדיקטור"]},99774:e=>{e.exports=["שינוי נראות ערכי אינדיקטור"]},96162:e=>{e.exports=["שינוי נראות ארגומנטים של אינדיקטור"]},26717:e=>{e.exports=["שנה את נראות תיאור הסימול"]},9455:e=>{e.exports=["שינוי נראות ערכי ווליום"]},39348:e=>{e.exports=["פחות מדקה אחת"]},87358:e=>{e.exports=["הצג ‎{title}‎"]},7827:e=>{e.exports=["‎{days}‎ ו-‎{hours}‎"]},7435:e=>{e.exports=["{exchange} מאת {originalExchange}"]},19830:e=>{e.exports=["‎{hours}‎ ו-‎{minutes}‎"]},1084:e=>{e.exports=["‎‎{listedExchange}‎ נתונים בזמן אמת זמינים בחינם למשתמשים רשומים."]},11155:e=>{e.exports=["הנתונים של {symbolName} מעוכבים ב‎{time}‎ דקות."]},77033:e=>{e.exports=["הנתונים מתעדכנים אחת ל-{amount} שנייה, גם אם יש עדכונים נוספים בשוק.","הנתונים מתעדכנים אחת ל-{amount} שניות, גם אם יש עדכונים נוספים בשוק.","הנתונים מתעדכנים אחת ל-{amount} שניות, גם אם יש עדכונים נוספים בשוק.","הנתונים מתעדכנים אחת ל-{amount} שניות, גם אם יש עדכונים נוספים בשוק."]},2121:e=>{ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports=["שישי"]},11268:e=>{e.exports=["שני"]},63331:e=>{e.exports=["שבת"]},85954:e=>{e.exports=["ראשון"]},26230:e=>{e.exports="We"},24793:e=>{e.exports=["חמישי"]},31533:e=>{e.exports=["שלישי"]},89790:e=>{e.exports=["לא ניתן לקבל קוד מקור"]},39589:e=>{e.exports=["פאנל ממוזער"]},38154:e=>{e.exports=["אישור הסרת עץ המחקר"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["צור חשבון בחינם"]},69419:e=>{e.exports=["הכל טוב - השוק פתוח."]},97637:e=>{e.exports=["‏אפריל"]},86797:e=>{e.exports=["‏אוגוסט"]},22519:e=>{e.exports=["ערכי שינוי הנר"]},52003:e=>{e.exports=["האם אתה באמת רוצה למחוק את המחקר ואת כל הבנים שלו?"]},68854:e=>{e.exports=["לחץ לחיצה כפולה"]},97325:e=>{e.exports=["בעיית נתונים"]},52916:e=>{e.exports=["הנתונים מתעדכנים פעם ביום."]},25978:e=>{e.exports=["הנתונים מתעדכנים פעם בשנייה, גם אם ישנם עדכונים נוספים בשוק."]},57310:e=>{e.exports=["הנתונים מעוכבים"]},49321:e=>{e.exports=["הנתונים על התוכנית הבסיסית שלנו מתעדכנים פעם בשנייה, גם אם יש עדכונים נוספים בשוק."]},55669:e=>{e.exports=["דצמבר‏"]},83498:e=>{e.exports=["מחק את החלונית"]},59315:e=>{e.exports=["נתוני סוף יום"]},82751:e=>{e.exports=["שגיאה"]},40519:e=>{e.exports=["ערב. השוק פתוח למסחר מאוחר post-market."]},80227:e=>{e.exports=["אזור זמן של הבורסה"]},16467:e=>{e.exports=["פברואר‏"]},25046:e=>{e.exports=["מלא את הסכמי הבורסה"]},93666:e=>{e.exports=["סימול דגל"]},564:e=>{e.exports=["שישי"]},72970:e=>{e.exports=["יום שישי"]},88958:e=>{e.exports=["חג"]},21686:e=>{e.exports=["הסתר מקרא אינדיקטור"]},26935:e=>{e.exports=["ארגומנטים של אינדיקטור"]},26315:e=>{e.exports=["כותרות מתנד"]},84098:e=>{e.exports=["ערכי מתנד"]},91459:e=>{e.exports=["אם אתה מעוניין בנתונים בזמן אמת של {listedExchange} תצטרך להשלים הסכם Exchange. אל דאגה, זה לוקח רק כמה לחיצות"]},50634:e=>{e.exports=["זה יעבור למסחר המאוחר, פוסט מארקט ב-{remainingTime}."]},74537:e=>{e.exports=["הוא ייפתח לטרום מסחר פרה-מארקט ב-{remainingTime}."]},26910:e=>{e.exports=["ינואר‏"]},23230:e=>{e.exports=["יולי‏"]},49385:e=>{e.exports=["יוני‏"]},99487:e=>{e.exports=["ערכי פגנס"]},15815:e=>{e.exports=["עדכון אחד מידי שנייה"]},90784:e=>{e.exports=["אוקטובר‏"]},75991:e=>{e.exports=["מצב שוק פתוח"]},18429:e=>{e.exports=["למד עוד"]},39899:e=>{e.exports=["הזז חלונית למטה"]},70343:e=>{e.exports=["הזז חלונית למעלה"]},83085:e=>{e.exports=["שני"]},61199:e=>{e.exports=["יום שני"]},41610:e=>{e.exports=["עוד"]},1653:e=>{e.exports=["בקר. השוק פתוח כעת לטרום מסחר, פרה-מרקט בלבד."]},56470:e=>{e.exports=["הגדל גרף"]},19603:e=>{e.exports=["הגדל חלונית"]},68327:e=>{e.exports=["מאי"]},35732:e=>{e.exports=["נהל חלונות"]},84675:e=>{e.exports=["מרץ‏"]},83949:e=>{e.exports=["שוק פתוח"]},35701:e=>{e.exports=["השוק נפתח בעוד {remainingTime}."]},95814:e=>{e.exports=["השוק סגור"]},98105:e=>{e.exports=["השוק נסגר בעוד {remainingTime}."]},87202:e=>{e.exports=["השוק נמצא כרגע בחופשה. כיף להם."]},71194:e=>{e.exports=["נובמבר‏"]},66324:e=>{e.exports=["קוד מקור"]},36835:e=>{e.exports=["שבת"]},1144:e=>{e.exports=["יום שבת"]},40653:e=>{ +e.exports=["גלול לשמאל"]},26721:e=>{e.exports=["גלול לבר העדכני ביותר"]},35809:e=>{e.exports=["גלול לימין"]},61132:e=>{e.exports=["ספטמבר‏"]},28705:e=>{e.exports=["הצג מקרא אינדיקטור"]},51072:e=>{e.exports=["הצג עץ אובייקטים"]},37809:e=>{e.exports=["הצג הגדרות אינטרוולים"]},39045:e=>{e.exports=["שגיאת מחקר"]},86577:e=>{e.exports=["יום ראשון"]},72149:e=>{e.exports=["יום ראשון"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["כותרת סימול"]},29985:e=>{e.exports=["פוסט-מרקט"]},28412:e=>{e.exports=["תוכניות בתשלום כוללות עדכוני נתונים מהירים יותר."]},56042:e=>{e.exports=["פרה-מרקט"]},36015:e=>{e.exports=["נתוני זמן אמת עבור {description} אינם נתמכים כרגע. אנו עשויים לתמוך בזה בעתיד."]},6667:e=>{e.exports=["נתונים בזמן אמת עבור {symbolName} מסופקים על ידי {exchange} exchange."]},48293:e=>{e.exports=["שחזר גרף"]},91029:e=>{e.exports=["שחזר חלון"]},75094:e=>{e.exports=["רביעי"]},7147:e=>{e.exports=["יום רביעי"]},52984:e=>{e.exports=["כדי לקבל נתונים בזמן אמת עבור {description}, אנא קנה את חבילת הנתונים בזמן אמת."]},9787:e=>{e.exports=["חמישי"]},7951:e=>{e.exports=["יום חמישי"]},57918:e=>{e.exports=["נתונים אלה הם בזמן אמת, אך הם שונים במקצת מהמקבילה הרשמית שלה מהבורסה הראשית."]},68025:e=>{e.exports=["נתונים אלה הם בזמן אמת, אך הם שונים במקצת מהמקבילה הרשמית שלהם שמגיעה מ- {exchange}."]},73717:e=>{e.exports=["סימול זה אינו קיים, אנא בחר סימול אחר."]},57048:e=>{e.exports=["זמן לטיול - שוק זה סגור."]},94316:e=>{e.exports=["שלישי"]},44979:e=>{e.exports=["יום שלישי"]},8209:e=>{e.exports=["בטל סימול"]},1111:e=>{e.exports=["ווליום/נפח מסחר"]},61311:e=>{e.exports=["הגדל"]},47602:e=>{e.exports=["הקטן"]},57889:e=>{e.exports=["שנה את הנראות של ערכי OHLC"]},18644:e=>{e.exports=["שנה את נראות מצב השוק הפתוח"]},45110:e=>{e.exports=["שנה נראות של בר שינוי"]},31325:e=>{e.exports=["שנה את נראות של כותרות אינדיקטור"]},99774:e=>{e.exports=["שינוי נראות ערכי אינדיקטור"]},96162:e=>{e.exports=["שינוי נראות ארגומנטים של אינדיקטור"]},26717:e=>{e.exports=["שנה את נראות תיאור הסימול"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["שינוי נראות ערכי ווליום"]},39348:e=>{e.exports=["פחות מדקה אחת"]},87358:e=>{e.exports=["הצג ‎{title}‎"]},7827:e=>{e.exports=["‎{days}‎ ו-‎{hours}‎"]},7435:e=>{e.exports=["{exchange} מאת {originalExchange}"]},19830:e=>{e.exports=["‎{hours}‎ ו-‎{minutes}‎"]},1084:e=>{e.exports=["‎‎{listedExchange}‎ נתונים בזמן אמת זמינים בחינם למשתמשים רשומים."]},11155:e=>{e.exports=["הנתונים של {symbolName} מעוכבים ב‎{time}‎ דקות."]},77033:e=>{e.exports=["הנתונים מתעדכנים אחת ל-{amount} שנייה, גם אם יש עדכונים נוספים בשוק.","הנתונים מתעדכנים אחת ל-{amount} שניות, גם אם יש עדכונים נוספים בשוק.","הנתונים מתעדכנים אחת ל-{amount} שניות, גם אם יש עדכונים נוספים בשוק.","הנתונים מתעדכנים אחת ל-{amount} שניות, גם אם יש עדכונים נוספים בשוק."]},2121:e=>{ e.exports=["הנתונים על התוכנית הבסיסית שלנו מתעדכנים אחת ל-{amount} שנייה, גם אם יש עדכונים נוספים בשוק.","הנתונים על התוכנית הבסיסית שלנו מתעדכנים אחת ל-{amount} שניות, גם אם יש עדכונים נוספים בשוק.","הנתונים על התוכנית הבסיסית שלנו מתעדכנים אחת ל-{amount} שניות, גם אם יש עדכונים נוספים בשוק.","הנתונים על התוכנית הבסיסית שלנו מתעדכנים אחת ל-{amount} שניות, גם אם יש עדכונים נוספים בשוק."]},5223:e=>{e.exports=["עדכון אחד כל {amount} שנייה","עדכון אחד כל {amount} שניות","עדכון אחד כל {amount} שניות","עדכון אחד כל {amount} שניות"]},58609:e=>{e.exports=["יום {number}","{number} ימים","{number} ימים","{number} ימים"]},24430:e=>{e.exports=["שעה ‎{number}‎","{number} שעות","{number} שעות","{number} שעות"]},67151:e=>{e.exports=["דקה {number}","{number} דקות","{number} דקות","{number} דקות"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/hu_HU.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/hu_HU.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index c4411ca3..00000000 --- a/charting_library/bundles/hu_HU.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports="bars"},19648:e=>{e.exports="12-hours"},55838:e=>{e.exports="24-hours"},88364:e=>{e.exports="Chart basic styles"},46720:e=>{e.exports=["Szálkereszt"]},50985:e=>{e.exports=["Valuta"]},17319:e=>{e.exports="Currency and Unit"},19481:e=>{e.exports="Appearance"},68791:e=>{e.exports=["Argumentumok"]},95036:e=>{e.exports="Average close price"},27331:e=>{e.exports=["Háttér"]},22519:e=>{e.exports=["Bar Change Values"]},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports=["Date Format"]},55090:e=>{e.exports="Day of week on labels"},29601:e=>{e.exports=["Leírás"]},26897:e=>{e.exports=["Események"]},95338:e=>{e.exports=["Vízszintes Rácsvonalak"]},60971:e=>{e.exports="High and low price"},61142:e=>{e.exports=["Indikátorok"]},34905:e=>{e.exports="Indicators value"},29687:e=>{e.exports="Indicators and financials value"},25084:e=>{e.exports="Indicators and financials name"},9654:e=>{e.exports="Indicators name"},99487:e=>{e.exports=["OHCL Értékek"]},75991:e=>{e.exports="Open market status"},70500:e=>{e.exports=["Pénz"]},66653:e=>{e.exports=["Fedezeti Letét"]},42502:e=>{e.exports="No overlapping"},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports=["Skálák"]},53224:e=>{e.exports="Scales placement"},79194:e=>{e.exports="Status line"},89053:e=>{e.exports=["Szimbólum"]},35383:e=>{e.exports=["Szimbólum Neve"]},27767:e=>{e.exports="Symbol last price"},40847:e=>{e.exports="Symbol previous day close price"},50446:e=>{e.exports="Pane"},73908:e=>{e.exports="Pane separators"},36014:e=>{e.exports=["Százalék"]},78621:e=>{e.exports=["Pipek"]},74823:e=>{e.exports="Pre/post market price"},64859:e=>{e.exports="Price Scale"},76523:e=>{e.exports="Price and percentage value"},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Vízjel"]},67369:e=>{e.exports=["Cím"]},31326:e=>{e.exports="Titles"},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports="Ticker and description"},43637:e=>{e.exports="Time Scale"},97316:e=>{e.exports="Time hours format"},90801:e=>{e.exports=["Kereskedés"]},77534:e=>{e.exports="Unit"},1111:e=>{e.exports=["Volumen"]},80170:e=>{e.exports="Value according to scale"},91322:e=>{e.exports="Values"},70353:e=>{e.exports=["Függőleges Rácsvonalak"]},57889:e=>{e.exports="change OHLC values visibility"},35646:e=>{e.exports="change navigation buttons visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},10349:e=>{e.exports="change bottom margin"},88161:e=>{e.exports="change currency and unit labels visibility"},79570:e=>{e.exports="change currency label visibility"},99011:e=>{e.exports="change chart background color"},72458:e=>{e.exports="change chart background type"},37034:e=>{e.exports="change crosshair width"},29951:e=>{e.exports="change crosshair color"},92027:e=>{e.exports="change crosshair style"},50457:e=>{e.exports="change date format"},7104:e=>{e.exports="change day of week on labels"},88096:e=>{e.exports="change horz grid lines color"},2523:e=>{ -e.exports="change horz grid lines style"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},59820:e=>{e.exports="change indicators and financials name labels visibility"},90512:e=>{e.exports="change indicators and financials value labels visibility"},97956:e=>{e.exports="change legend background transparency"},61061:e=>{e.exports="change legend background visibility"},37730:e=>{e.exports="change pane buttons visibility"},89032:e=>{e.exports="change pane separators color"},35636:e=>{e.exports="change right margin"},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports="change symbol watermark color"},87159:e=>{e.exports="change symbol watermark visibility"},26717:e=>{e.exports="change symbol description visibility"},28741:e=>{e.exports="change symbol last value mode"},95071:e=>{e.exports="change symbol legend format"},35065:e=>{e.exports="change scales text color"},84382:e=>{e.exports="change scales font size"},12468:e=>{e.exports="change scales lines color"},71589:e=>{e.exports="change sessions breaks visibility"},15035:e=>{e.exports="change sessions breaks width"},1579:e=>{e.exports="change sessions breaks color"},21460:e=>{e.exports="change sessions breaks style"},76991:e=>{e.exports="change time hours format"},98905:e=>{e.exports="change top margin"},7011:e=>{e.exports="change unit label visibility"},22722:e=>{e.exports="change vert grid lines color"},22867:e=>{e.exports="change vert grid lines style"},9455:e=>{e.exports="change volume values visibility"}}]); \ No newline at end of file diff --git a/charting_library/bundles/hu_HU.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/hu_HU.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..58d121db --- /dev/null +++ b/charting_library/bundles/hu_HU.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports="bars"},19648:e=>{e.exports="12-hours"},55838:e=>{e.exports="24-hours"},88364:e=>{e.exports="Chart basic styles"},46720:e=>{e.exports=["Szálkereszt"]},50985:e=>{e.exports=["Valuta"]},17319:e=>{e.exports="Currency and Unit"},19481:e=>{e.exports="Appearance"},68791:e=>{e.exports=["Argumentumok"]},95036:e=>{e.exports="Average close price"},27331:e=>{e.exports=["Háttér"]},22519:e=>{e.exports=["Bar Change Values"]},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports=["Date Format"]},55090:e=>{e.exports="Day of week on labels"},29601:e=>{e.exports=["Leírás"]},26897:e=>{e.exports=["Események"]},95338:e=>{e.exports=["Vízszintes Rácsvonalak"]},60971:e=>{e.exports="High and low price"},61142:e=>{e.exports=["Indikátorok"]},34905:e=>{e.exports="Indicators value"},29687:e=>{e.exports="Indicators and financials value"},25084:e=>{e.exports="Indicators and financials name"},9654:e=>{e.exports="Indicators name"},99487:e=>{e.exports=["OHCL Értékek"]},75991:e=>{e.exports="Open market status"},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports=["Pénz"]},66653:e=>{e.exports=["Fedezeti Letét"]},42502:e=>{e.exports="No overlapping"},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports=["Skálák"]},53224:e=>{e.exports="Scales placement"},79194:e=>{e.exports="Status line"},89053:e=>{e.exports=["Szimbólum"]},35383:e=>{e.exports=["Szimbólum Neve"]},27767:e=>{e.exports="Symbol last price"},40847:e=>{e.exports="Symbol previous day close price"},50446:e=>{e.exports="Pane"},73908:e=>{e.exports="Pane separators"},36014:e=>{e.exports=["Százalék"]},78621:e=>{e.exports=["Pipek"]},74823:e=>{e.exports="Pre/post market price"},64859:e=>{e.exports="Price Scale"},76523:e=>{e.exports="Price and percentage value"},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Vízjel"]},67369:e=>{e.exports=["Cím"]},31326:e=>{e.exports="Titles"},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports="Ticker and description"},43637:e=>{e.exports="Time Scale"},97316:e=>{e.exports="Time hours format"},90801:e=>{e.exports=["Kereskedés"]},77534:e=>{e.exports="Unit"},1111:e=>{e.exports=["Volumen"]},80170:e=>{e.exports="Value according to scale"},91322:e=>{e.exports="Values"},70353:e=>{e.exports=["Függőleges Rácsvonalak"]},57889:e=>{e.exports="change OHLC values visibility"},35646:e=>{e.exports="change navigation buttons visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},10349:e=>{e.exports="change bottom margin"},88161:e=>{e.exports="change currency and unit labels visibility"},79570:e=>{e.exports="change currency label visibility"},99011:e=>{e.exports="change chart background color"},72458:e=>{e.exports="change chart background type"},37034:e=>{e.exports="change crosshair width"},29951:e=>{e.exports="change crosshair color"},92027:e=>{e.exports="change crosshair style"},50457:e=>{e.exports="change date format"},7104:e=>{e.exports="change day of week on labels"},88096:e=>{ +e.exports="change horz grid lines color"},2523:e=>{e.exports="change horz grid lines style"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},59820:e=>{e.exports="change indicators and financials name labels visibility"},90512:e=>{e.exports="change indicators and financials value labels visibility"},97956:e=>{e.exports="change legend background transparency"},61061:e=>{e.exports="change legend background visibility"},37730:e=>{e.exports="change pane buttons visibility"},89032:e=>{e.exports="change pane separators color"},35636:e=>{e.exports="change right margin"},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports="change symbol watermark color"},87159:e=>{e.exports="change symbol watermark visibility"},26717:e=>{e.exports="change symbol description visibility"},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports="change symbol last value mode"},95071:e=>{e.exports="change symbol legend format"},35065:e=>{e.exports="change scales text color"},84382:e=>{e.exports="change scales font size"},12468:e=>{e.exports="change scales lines color"},71589:e=>{e.exports="change sessions breaks visibility"},15035:e=>{e.exports="change sessions breaks width"},1579:e=>{e.exports="change sessions breaks color"},21460:e=>{e.exports="change sessions breaks style"},76991:e=>{e.exports="change time hours format"},98905:e=>{e.exports="change top margin"},7011:e=>{e.exports="change unit label visibility"},22722:e=>{e.exports="change vert grid lines color"},22867:e=>{e.exports="change vert grid lines style"},9455:e=>{e.exports="change volume values visibility"}}]); \ No newline at end of file diff --git a/charting_library/bundles/hu_HU.6847.490ee46270bef6a878dd.js b/charting_library/bundles/hu_HU.7257.089fbbc28bead9558b87.js similarity index 55% rename from charting_library/bundles/hu_HU.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/hu_HU.7257.089fbbc28bead9558b87.js index b56cfef5..aa6db1c3 100644 --- a/charting_library/bundles/hu_HU.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/hu_HU.7257.089fbbc28bead9558b87.js @@ -1,2 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports=["P"]},11268:e=>{e.exports=["H"]},63331:e=>{e.exports=["Szo"]},85954:e=>{e.exports=["V"]},26230:e=>{e.exports=["Sze"]},24793:e=>{e.exports=["Cs"]},31533:e=>{e.exports=["K"]},89790:e=>{e.exports=["Nem kapható Pine forráskód."]},39589:e=>{e.exports="Collapse pane"},38154:e=>{e.exports=["Tanulmányfa Eltávolításának Jóváhagyása"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports="Create a free account"},69419:e=>{e.exports="All's well — Market is open."},97637:e=>{e.exports=["Április"]},86797:e=>{e.exports=["Augusztus"]},22519:e=>{e.exports=["Bar Change Values"]},52003:e=>{e.exports=["Biztos, hogy törölni akarod a tanulmányt?"]},68854:e=>{e.exports="Double click"},97325:e=>{e.exports="Data error"},52916:e=>{e.exports="Data is updated once a day."},25978:e=>{e.exports="Data is updated once per second, even if there are more updates on the market."},57310:e=>{e.exports="Data is delayed"},49321:e=>{e.exports="Data on our Basic plan is updated once per second, even if there are more updates on the market."},55669:e=>{e.exports="December"},83498:e=>{e.exports="Delete pane"},59315:e=>{e.exports="End of day data"},82751:e=>{e.exports=["Hiba"]},40519:e=>{e.exports="Evening. Market is open for post-market trading."},80227:e=>{e.exports="Exchange timezone"},16467:e=>{e.exports=["Február"]},25046:e=>{e.exports="Fill out Exchange Agreements"},93666:e=>{e.exports="Flag Symbol"},564:e=>{e.exports=["Pén"]},72970:e=>{e.exports=["Péntek"]},88958:e=>{e.exports="Holiday"},21686:e=>{e.exports="Hide Indicator Legend"},26935:e=>{e.exports=["Indikátor Argumentumok"]},26315:e=>{e.exports=["Indikátor Címkék"]},84098:e=>{e.exports=["Indikátor Értékek"]},91459:e=>{e.exports="If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"},50634:e=>{e.exports="It'll go to post-market trading in {remainingTime}."},74537:e=>{e.exports="It'll open for pre-market trading in {remainingTime}."},26910:e=>{e.exports=["Január"]},23230:e=>{e.exports=["Július"]},49385:e=>{e.exports=["Június"]},99487:e=>{e.exports=["OHCL Értékek"]},15815:e=>{e.exports="One update per second"},90784:e=>{e.exports=["Október"]},75991:e=>{e.exports="Open market status"},18429:e=>{e.exports=["Tudj meg többet"]},39899:e=>{e.exports="Move pane down"},70343:e=>{e.exports="Move pane up"},83085:e=>{e.exports=["Hét"]},61199:e=>{e.exports=["Hétfő"]},41610:e=>{e.exports=["Több"]},1653:e=>{e.exports="Morning. Market is open for pre-market trading."},56470:e=>{e.exports="Maximize chart"},19603:e=>{e.exports="Maximize pane"},68327:e=>{e.exports=["Május"]},35732:e=>{e.exports="Manage panes"},84675:e=>{e.exports=["Március"]},83949:e=>{e.exports="Market open"},35701:e=>{e.exports="Market opens in {remainingTime}."},95814:e=>{e.exports="Market closed"},98105:e=>{e.exports="Market closes in {remainingTime}."},87202:e=>{e.exports="Market is currently on holiday. Lucky them."},71194:e=>{e.exports="November"},66324:e=>{ -e.exports=["Forráskód"]},36835:e=>{e.exports=["Szom"]},1144:e=>{e.exports=["Szombat"]},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports=["Szeptember"]},28705:e=>{e.exports="Show Indicator Legend"},51072:e=>{e.exports="Show Object Tree"},37809:e=>{e.exports="Show interval settings"},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports=["Vas"]},72149:e=>{e.exports=["Vasárnap"]},39339:e=>{e.exports="Symbol title"},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports="Paid plans feature faster data updates."},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports="Real-time data for {description} is not supported right now. We may support it in the future."},6667:e=>{e.exports="Real-time data for {symbolName} is provided by {exchange} exchange."},48293:e=>{e.exports="Restore chart"},91029:e=>{e.exports="Restore pane"},75094:e=>{e.exports=["Szer"]},7147:e=>{e.exports=["Szerda"]},52984:e=>{e.exports="To get real-time data for {description}, please buy the real-time data package."},9787:e=>{e.exports=["Cs"]},7951:e=>{e.exports=["Csütörtök"]},57918:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges."},68025:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}."},73717:e=>{e.exports="This symbol doesn't exist, please pick another one."},57048:e=>{e.exports="Time for a walk — this market is closed."},94316:e=>{e.exports=["Ke"]},44979:e=>{e.exports=["Kedd"]},8209:e=>{e.exports="Unflag Symbol"},1111:e=>{e.exports=["Volumen"]},61311:e=>{e.exports=["Nagyítás"]},47602:e=>{e.exports=["Kicsinyítés"]},57889:e=>{e.exports="change OHLC values visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},26717:e=>{e.exports="change symbol description visibility"},9455:e=>{e.exports="change volume values visibility"},39348:e=>{e.exports="less than 1 minute"},87358:e=>{e.exports="show {title}"},7827:e=>{e.exports="{days} and {hours}"},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports="{hours} and {minutes}"},1084:e=>{e.exports="{listedExchange} real-time data is available for free to registered users."},11155:e=>{e.exports="{symbolName} data is delayed by {time} minutes."},77033:e=>{e.exports=["Data is updated once every {amount} seconds, even if there are more updates on the market."]},2121:e=>{e.exports=["Data on our Basic plan is updated once every {amount} seconds, even if there are more updates on the market."]},5223:e=>{e.exports=["One update every {amount} seconds"]},58609:e=>{e.exports=["{number} days"]},24430:e=>{e.exports=["{number} hours"]},67151:e=>{e.exports=["{number} minutes"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports=["P"]},11268:e=>{e.exports=["H"]},63331:e=>{e.exports=["Szo"]},85954:e=>{e.exports=["V"]},26230:e=>{e.exports=["Sze"]},24793:e=>{e.exports=["Cs"]},31533:e=>{e.exports=["K"]},89790:e=>{e.exports=["Nem kapható Pine forráskód."]},39589:e=>{e.exports="Collapse pane"},38154:e=>{e.exports=["Tanulmányfa Eltávolításának Jóváhagyása"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports="Create a free account"},69419:e=>{e.exports="All's well — Market is open."},97637:e=>{e.exports=["Április"]},86797:e=>{e.exports=["Augusztus"]},22519:e=>{e.exports=["Bar Change Values"]},52003:e=>{e.exports=["Biztos, hogy törölni akarod a tanulmányt?"]},68854:e=>{e.exports="Double click"},97325:e=>{e.exports="Data error"},52916:e=>{e.exports="Data is updated once a day."},25978:e=>{e.exports="Data is updated once per second, even if there are more updates on the market."},57310:e=>{e.exports="Data is delayed"},49321:e=>{e.exports="Data on our Basic plan is updated once per second, even if there are more updates on the market."},55669:e=>{e.exports="December"},83498:e=>{e.exports="Delete pane"},59315:e=>{e.exports="End of day data"},82751:e=>{e.exports=["Hiba"]},40519:e=>{e.exports="Evening. Market is open for post-market trading."},80227:e=>{e.exports="Exchange timezone"},16467:e=>{e.exports=["Február"]},25046:e=>{e.exports="Fill out Exchange Agreements"},93666:e=>{e.exports="Flag Symbol"},564:e=>{e.exports=["Pén"]},72970:e=>{e.exports=["Péntek"]},88958:e=>{e.exports="Holiday"},21686:e=>{e.exports="Hide Indicator Legend"},26935:e=>{e.exports=["Indikátor Argumentumok"]},26315:e=>{e.exports=["Indikátor Címkék"]},84098:e=>{e.exports=["Indikátor Értékek"]},91459:e=>{e.exports="If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"},50634:e=>{e.exports="It'll go to post-market trading in {remainingTime}."},74537:e=>{e.exports="It'll open for pre-market trading in {remainingTime}."},26910:e=>{e.exports=["Január"]},23230:e=>{e.exports=["Július"]},49385:e=>{e.exports=["Június"]},99487:e=>{e.exports=["OHCL Értékek"]},15815:e=>{e.exports="One update per second"},90784:e=>{e.exports=["Október"]},75991:e=>{e.exports="Open market status"},18429:e=>{e.exports=["Tudj meg többet"]},39899:e=>{e.exports="Move pane down"},70343:e=>{e.exports="Move pane up"},83085:e=>{e.exports=["Hét"]},61199:e=>{e.exports=["Hétfő"]},41610:e=>{e.exports=["Több"]},1653:e=>{e.exports="Morning. Market is open for pre-market trading."},56470:e=>{e.exports="Maximize chart"},19603:e=>{e.exports="Maximize pane"},68327:e=>{e.exports=["Május"]},35732:e=>{e.exports="Manage panes"},84675:e=>{e.exports=["Március"]},83949:e=>{e.exports="Market open"},35701:e=>{e.exports="Market opens in {remainingTime}."},95814:e=>{e.exports="Market closed"},98105:e=>{e.exports="Market closes in {remainingTime}."},87202:e=>{e.exports="Market is currently on holiday. Lucky them."},71194:e=>{e.exports="November"},66324:e=>{ +e.exports=["Forráskód"]},36835:e=>{e.exports=["Szom"]},1144:e=>{e.exports=["Szombat"]},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports=["Szeptember"]},28705:e=>{e.exports="Show Indicator Legend"},51072:e=>{e.exports="Show Object Tree"},37809:e=>{e.exports="Show interval settings"},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports=["Vas"]},72149:e=>{e.exports=["Vasárnap"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports="Symbol title"},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports="Paid plans feature faster data updates."},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports="Real-time data for {description} is not supported right now. We may support it in the future."},6667:e=>{e.exports="Real-time data for {symbolName} is provided by {exchange} exchange."},48293:e=>{e.exports="Restore chart"},91029:e=>{e.exports="Restore pane"},75094:e=>{e.exports=["Szer"]},7147:e=>{e.exports=["Szerda"]},52984:e=>{e.exports="To get real-time data for {description}, please buy the real-time data package."},9787:e=>{e.exports=["Cs"]},7951:e=>{e.exports=["Csütörtök"]},57918:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges."},68025:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}."},73717:e=>{e.exports="This symbol doesn't exist, please pick another one."},57048:e=>{e.exports="Time for a walk — this market is closed."},94316:e=>{e.exports=["Ke"]},44979:e=>{e.exports=["Kedd"]},8209:e=>{e.exports="Unflag Symbol"},1111:e=>{e.exports=["Volumen"]},61311:e=>{e.exports=["Nagyítás"]},47602:e=>{e.exports=["Kicsinyítés"]},57889:e=>{e.exports="change OHLC values visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},26717:e=>{e.exports="change symbol description visibility"},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports="change volume values visibility"},39348:e=>{e.exports="less than 1 minute"},87358:e=>{e.exports="show {title}"},7827:e=>{e.exports="{days} and {hours}"},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports="{hours} and {minutes}"},1084:e=>{e.exports="{listedExchange} real-time data is available for free to registered users."},11155:e=>{e.exports="{symbolName} data is delayed by {time} minutes."},77033:e=>{e.exports=["Data is updated once every {amount} seconds, even if there are more updates on the market."]},2121:e=>{e.exports=["Data on our Basic plan is updated once every {amount} seconds, even if there are more updates on the market."]},5223:e=>{e.exports=["One update every {amount} seconds"]},58609:e=>{e.exports=["{number} days"]},24430:e=>{ +e.exports=["{number} hours"]},67151:e=>{e.exports=["{number} minutes"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/id_ID.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/id_ID.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index c56d87f9..00000000 --- a/charting_library/bundles/id_ID.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:a=>{a.exports=["bar"]},19648:a=>{a.exports=["12-jam"]},55838:a=>{a.exports=["24-jam"]},88364:a=>{a.exports=["Chart corak basic"]},46720:a=>{a.exports="Crosshair"},50985:a=>{a.exports=["Mata Uang"]},17319:a=>{a.exports=["Mata uang dan unit"]},19481:a=>{a.exports=["Tampilan"]},68791:a=>{a.exports=["Argumen"]},95036:a=>{a.exports=["Rata-rata penutupan"]},27331:a=>{a.exports=["Latar"]},22519:a=>{a.exports=["Nilai Perubahan Bar"]},87845:a=>{a.exports=["Tombol-tombol"]},25209:a=>{a.exports=["Format Tanggal"]},55090:a=>{a.exports=["Hari dalam seminggu pada label"]},29601:a=>{a.exports=["Deskripsi"]},26897:a=>{a.exports=["Peristiwa"]},95338:a=>{a.exports=["Garis Horizontal"]},60971:a=>{a.exports=["Harga tertinggi dan terendah"]},61142:a=>{a.exports=["Indikator"]},34905:a=>{a.exports=["Nilai indikator"]},29687:a=>{a.exports=["Nilai indikator dan finansial"]},25084:a=>{a.exports=["Nama indikator dan finansial"]},9654:a=>{a.exports=["Nama indikator"]},99487:a=>{a.exports=["Nilai OHLC"]},75991:a=>{a.exports=["Tampilkan status pasar Buka"]},70500:a=>{a.exports=["Uang"]},66653:a=>{a.exports=["Marjin"]},42502:a=>{a.exports=["Tidak tumpang tindih"]},74343:a=>{a.exports=["Navigasi"]},43115:a=>{a.exports=["Skala"]},53224:a=>{a.exports=["Penempatan Skala"]},79194:a=>{a.exports=["Baris status"]},89053:a=>{a.exports=["Simbol"]},35383:a=>{a.exports=["Nama Simbol"]},27767:a=>{a.exports=["Simbol harga terakhir"]},40847:a=>{a.exports=["Simbol penutupan hari sebelumnya"]},50446:a=>{a.exports=["Panel"]},73908:a=>{a.exports=["Pemisah panel"]},36014:a=>{a.exports=["Persentase"]},78621:a=>{a.exports=["Pip"]},74823:a=>{a.exports=["Pra/Pasca pasar"]},64859:a=>{a.exports=["Skala Harga"]},76523:a=>{a.exports=["Nilai Harga dan Persentase"]},40187:a=>{a.exports="Right Margin"},77705:a=>{a.exports=["Tanda air"]},67369:a=>{a.exports=["Judul"]},31326:a=>{a.exports=["Judul"]},23097:a=>{a.exports="Ticker"},82168:a=>{a.exports=["Ticker dan deskripsi"]},43637:a=>{a.exports=["Skala waktu"]},97316:a=>{a.exports=["Format waktu jam"]},90801:a=>{a.exports="Trading"},77534:a=>{a.exports="Unit"},1111:a=>{a.exports="Volume"},80170:a=>{a.exports=["Nilai menurut Skala"]},91322:a=>{a.exports=["Nilai"]},70353:a=>{a.exports=["Garis Vertikal"]},57889:a=>{a.exports=["ubah visibilitas nilai OHLC"]},35646:a=>{a.exports=["ubah visibilitas tombol navigasi"]},18644:a=>{a.exports=["ubah visibilitas status market yang terbuka"]},45110:a=>{a.exports=["ubah visibilitas perubahan bar"]},10349:a=>{a.exports=["ubah margin bawah"]},88161:a=>{a.exports=["ubah visibilitas mata uang dan label unit"]},79570:a=>{a.exports=["ubah visibilitas label mata uang"]},99011:a=>{a.exports=["ubah warna latar belakang chart"]},72458:a=>{a.exports=["ubah tipe latar belakang chart"]},37034:a=>{a.exports=["ubah lebar crosshair"]},29951:a=>{a.exports=["ubah warna crosshair"]},92027:a=>{a.exports=["ubah corak crosshair"]},50457:a=>{a.exports=["ubah format tanggal"]},7104:a=>{a.exports=["ubah hari dalam seminggu pada label"]}, -88096:a=>{a.exports=["ubah warna garis grid horizontal"]},2523:a=>{a.exports=["ubah corak garis grid horizontal"]},31325:a=>{a.exports=["ubah visibilitas judul indikator"]},99774:a=>{a.exports=["ubah visibilitas nilai indikator"]},96162:a=>{a.exports=["ubah visibilitas argumen indikator"]},59820:a=>{a.exports=["ubah visibilitas label nama indikator dan finansial"]},90512:a=>{a.exports=["ubah visibilitas label nilai indikator dan finansial"]},97956:a=>{a.exports=["ubah transparansi latar belakang legenda"]},61061:a=>{a.exports=["ubah visibilitas latar belakang legenda"]},37730:a=>{a.exports=["ubah visibilitas tombol pane"]},89032:a=>{a.exports=["Ubah warna pemisah panel"]},35636:a=>{a.exports=["ubah margin kanan"]},66601:a=>{a.exports="change right margin percentage"},25616:a=>{a.exports=["ubah warna watermark simbol"]},87159:a=>{a.exports=["ubah visibilitas watermark simbol"]},26717:a=>{a.exports=["ubah visibilitas deskripsi simbol"]},28741:a=>{a.exports=["ubah mode nilai terakhir simbol"]},95071:a=>{a.exports=["ubah format legenda simbol"]},35065:a=>{a.exports=["ubah warna skala teks"]},84382:a=>{a.exports=["ubah ukuran font skala"]},12468:a=>{a.exports=["ubah warna garis skala"]},71589:a=>{a.exports=["ubah visibilitas jeda sesi"]},15035:a=>{a.exports=["ubah lebar jeda sesi"]},1579:a=>{a.exports=["ubah warna jeda sesi"]},21460:a=>{a.exports=["ubah corak jeda sesi"]},76991:a=>{a.exports=["Ubah format waktu jam"]},98905:a=>{a.exports=["ubah margin atas"]},7011:a=>{a.exports=["ubah visibilitas label unit"]},22722:a=>{a.exports=["ubah warna garis grid vertikal"]},22867:a=>{a.exports=["ubah corak garis grid vertikal"]},9455:a=>{a.exports=["ubah visibilitas nilai volume"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/id_ID.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/id_ID.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..613cbf44 --- /dev/null +++ b/charting_library/bundles/id_ID.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:a=>{a.exports=["bar"]},19648:a=>{a.exports=["12-jam"]},55838:a=>{a.exports=["24-jam"]},88364:a=>{a.exports=["Chart corak basic"]},46720:a=>{a.exports="Crosshair"},50985:a=>{a.exports=["Mata Uang"]},17319:a=>{a.exports=["Mata uang dan unit"]},19481:a=>{a.exports=["Tampilan"]},68791:a=>{a.exports=["Argumen"]},95036:a=>{a.exports=["Rata-rata penutupan"]},27331:a=>{a.exports=["Latar"]},22519:a=>{a.exports=["Nilai Perubahan Bar"]},87845:a=>{a.exports=["Tombol-tombol"]},25209:a=>{a.exports=["Format Tanggal"]},55090:a=>{a.exports=["Hari dalam seminggu pada label"]},29601:a=>{a.exports=["Deskripsi"]},26897:a=>{a.exports=["Peristiwa"]},95338:a=>{a.exports=["Garis Horizontal"]},60971:a=>{a.exports=["Harga tertinggi dan terendah"]},61142:a=>{a.exports=["Indikator"]},34905:a=>{a.exports=["Nilai indikator"]},29687:a=>{a.exports=["Nilai indikator dan finansial"]},25084:a=>{a.exports=["Nama indikator dan finansial"]},9654:a=>{a.exports=["Nama indikator"]},99487:a=>{a.exports=["Nilai OHLC"]},75991:a=>{a.exports=["Tampilkan status pasar Buka"]},96073:a=>{a.exports="Long Description"},70500:a=>{a.exports=["Uang"]},66653:a=>{a.exports=["Marjin"]},42502:a=>{a.exports=["Tidak tumpang tindih"]},74343:a=>{a.exports=["Navigasi"]},43115:a=>{a.exports=["Skala"]},53224:a=>{a.exports=["Penempatan Skala"]},79194:a=>{a.exports=["Baris status"]},89053:a=>{a.exports=["Simbol"]},35383:a=>{a.exports=["Nama Simbol"]},27767:a=>{a.exports=["Simbol harga terakhir"]},40847:a=>{a.exports=["Simbol penutupan hari sebelumnya"]},50446:a=>{a.exports=["Panel"]},73908:a=>{a.exports=["Pemisah panel"]},36014:a=>{a.exports=["Persentase"]},78621:a=>{a.exports=["Pip"]},74823:a=>{a.exports=["Pra/Pasca pasar"]},64859:a=>{a.exports=["Skala Harga"]},76523:a=>{a.exports=["Nilai Harga dan Persentase"]},40187:a=>{a.exports="Right Margin"},77705:a=>{a.exports=["Tanda air"]},67369:a=>{a.exports=["Judul"]},31326:a=>{a.exports=["Judul"]},23097:a=>{a.exports="Ticker"},82168:a=>{a.exports=["Ticker dan deskripsi"]},43637:a=>{a.exports=["Skala waktu"]},97316:a=>{a.exports=["Format waktu jam"]},90801:a=>{a.exports="Trading"},77534:a=>{a.exports="Unit"},1111:a=>{a.exports="Volume"},80170:a=>{a.exports=["Nilai menurut Skala"]},91322:a=>{a.exports=["Nilai"]},70353:a=>{a.exports=["Garis Vertikal"]},57889:a=>{a.exports=["ubah visibilitas nilai OHLC"]},35646:a=>{a.exports=["ubah visibilitas tombol navigasi"]},18644:a=>{a.exports=["ubah visibilitas status market yang terbuka"]},45110:a=>{a.exports=["ubah visibilitas perubahan bar"]},10349:a=>{a.exports=["ubah margin bawah"]},88161:a=>{a.exports=["ubah visibilitas mata uang dan label unit"]},79570:a=>{a.exports=["ubah visibilitas label mata uang"]},99011:a=>{a.exports=["ubah warna latar belakang chart"]},72458:a=>{a.exports=["ubah tipe latar belakang chart"]},37034:a=>{a.exports=["ubah lebar crosshair"]},29951:a=>{a.exports=["ubah warna crosshair"]},92027:a=>{a.exports=["ubah corak crosshair"]},50457:a=>{a.exports=["ubah format tanggal"]},7104:a=>{ +a.exports=["ubah hari dalam seminggu pada label"]},88096:a=>{a.exports=["ubah warna garis grid horizontal"]},2523:a=>{a.exports=["ubah corak garis grid horizontal"]},31325:a=>{a.exports=["ubah visibilitas judul indikator"]},99774:a=>{a.exports=["ubah visibilitas nilai indikator"]},96162:a=>{a.exports=["ubah visibilitas argumen indikator"]},59820:a=>{a.exports=["ubah visibilitas label nama indikator dan finansial"]},90512:a=>{a.exports=["ubah visibilitas label nilai indikator dan finansial"]},97956:a=>{a.exports=["ubah transparansi latar belakang legenda"]},61061:a=>{a.exports=["ubah visibilitas latar belakang legenda"]},37730:a=>{a.exports=["ubah visibilitas tombol pane"]},89032:a=>{a.exports=["Ubah warna pemisah panel"]},35636:a=>{a.exports=["ubah margin kanan"]},66601:a=>{a.exports="change right margin percentage"},25616:a=>{a.exports=["ubah warna watermark simbol"]},87159:a=>{a.exports=["ubah visibilitas watermark simbol"]},26717:a=>{a.exports=["ubah visibilitas deskripsi simbol"]},6091:a=>{a.exports="change symbol field visibility"},28741:a=>{a.exports=["ubah mode nilai terakhir simbol"]},95071:a=>{a.exports=["ubah format legenda simbol"]},35065:a=>{a.exports=["ubah warna skala teks"]},84382:a=>{a.exports=["ubah ukuran font skala"]},12468:a=>{a.exports=["ubah warna garis skala"]},71589:a=>{a.exports=["ubah visibilitas jeda sesi"]},15035:a=>{a.exports=["ubah lebar jeda sesi"]},1579:a=>{a.exports=["ubah warna jeda sesi"]},21460:a=>{a.exports=["ubah corak jeda sesi"]},76991:a=>{a.exports=["Ubah format waktu jam"]},98905:a=>{a.exports=["ubah margin atas"]},7011:a=>{a.exports=["ubah visibilitas label unit"]},22722:a=>{a.exports=["ubah warna garis grid vertikal"]},22867:a=>{a.exports=["ubah corak garis grid vertikal"]},9455:a=>{a.exports=["ubah visibilitas nilai volume"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/id_ID.6847.490ee46270bef6a878dd.js b/charting_library/bundles/id_ID.7257.089fbbc28bead9558b87.js similarity index 56% rename from charting_library/bundles/id_ID.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/id_ID.7257.089fbbc28bead9558b87.js index 2a8e8cb9..a010fa87 100644 --- a/charting_library/bundles/id_ID.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/id_ID.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:a=>{a.exports=["Jum"]},11268:a=>{a.exports=["Sen"]},63331:a=>{a.exports=["Sab"]},85954:a=>{a.exports=["Min"]},26230:a=>{a.exports=["Rab"]},24793:a=>{a.exports=["Kam"]},31533:a=>{a.exports=["Sel"]},89790:a=>{a.exports=["Tidak bisa mendapatkan kode sumber Pine."]},39589:a=>{a.exports=["Tutup panel"]},38154:a=>{a.exports=["Konfirmasi Hilangkan Pohon Studi"]},65636:a=>{a.exports="Cboe BZX"},36004:a=>{a.exports=["Buat sebuah akun gratis"]},69419:a=>{a.exports=["Semuanya ok - Pasar telah buka."]},97637:a=>{a.exports="April"},86797:a=>{a.exports=["Agustus"]},22519:a=>{a.exports=["Nilai Perubahan Bar"]},52003:a=>{a.exports=["Apakah benar anda ingin menghapus studi beserta semua turunannya?"]},68854:a=>{a.exports=["Dobel klik"]},97325:a=>{a.exports=["Permasalahan data"]},52916:a=>{a.exports=["Data diupdate satu kali dalam sehari."]},25978:a=>{a.exports=["Data di update hanya satu kali per detiknya, meskipun didalam pasar terdapat update yang lebih banyak."]},57310:a=>{a.exports=["Data tertunda"]},49321:a=>{a.exports=["Data yang disediakan untuk skema Basic kami hanya di update satu kali per detiknya, meskipun didalam pasar terdapat update yang lebih banyak."]},55669:a=>{a.exports=["Desember"]},83498:a=>{a.exports=["Hapus panel"]},59315:a=>{a.exports=["Data penghujung hari"]},82751:a=>{a.exports=["Kesalahan"]},40519:a=>{a.exports=["Selamat sore. Pasar hanya buka untuk melakukan trading pasca-pasar."]},80227:a=>{a.exports=["Zona waktu bursa"]},16467:a=>{a.exports=["Februari"]},25046:a=>{a.exports=["Mengisi Kesepakatan Bursa"]},93666:a=>{a.exports=["Tandai Simbol"]},564:a=>{a.exports=["Jum"]},72970:a=>{a.exports=["Jumat"]},88958:a=>{a.exports=["Hari Libur"]},21686:a=>{a.exports=["Sembunyikan Legenda Indikator"]},26935:a=>{a.exports=["Argumentasi Indikator"]},26315:a=>{a.exports=["Judul Indikator"]},84098:a=>{a.exports=["Nilai Indikator"]},91459:a=>{a.exports=["Jika anda menginginkan data real-time {listedExchange} anda perlu melengkapi Kesepakatan Bursanya. Jangan khawatir, ini hanya membutuhkan beberapa kali klik saja"]},50634:a=>{a.exports=["Akan menuju perdagangan pasca-pasar dalam {remainingTime}."]},74537:a=>{a.exports=["Perdagangan pra-pasar akan terbuka dalam {remainingTime}."]},26910:a=>{a.exports=["Januari"]},23230:a=>{a.exports=["Juli"]},49385:a=>{a.exports=["Juni"]},99487:a=>{a.exports=["Nilai OHLC"]},15815:a=>{a.exports=["Satu update per detik"]},90784:a=>{a.exports=["Oktober"]},75991:a=>{a.exports=["Tampilkan status pasar Buka"]},18429:a=>{a.exports=["Pelajari lebih lanjut"]},39899:a=>{a.exports=["Pindahkan panel kebawah"]},70343:a=>{a.exports=["Pindahkan panel keatas"]},83085:a=>{a.exports=["Sen"]},61199:a=>{a.exports=["Senin"]},41610:a=>{a.exports=["Lebih lanjut"]},1653:a=>{a.exports=["Selamat pagi. Pasar telah dibuka untuk melakukan trading pra-pasar."]},56470:a=>{a.exports=["Perbesar chart"]},19603:a=>{a.exports=["Perbesar panel"]},68327:a=>{a.exports=["Mei"]},35732:a=>{a.exports=["Kelola panel"]},84675:a=>{a.exports=["Maret"]}, -83949:a=>{a.exports=["Pasar buka"]},35701:a=>{a.exports=["Pasar buka dalam {remainingTime}"]},95814:a=>{a.exports=["Pasar tutup"]},98105:a=>{a.exports=["Pasar tutup dalam {remainingTime}."]},87202:a=>{a.exports=["Pasar saat ini sedang libur. Mereka beruntung."]},71194:a=>{a.exports="November"},66324:a=>{a.exports=["Kode sumber"]},36835:a=>{a.exports=["Sab"]},1144:a=>{a.exports=["Sabtu"]},40653:a=>{a.exports=["Geser ke kiri"]},26721:a=>{a.exports=["Geser ke bar terbaru"]},35809:a=>{a.exports=["Geser ke kanan"]},61132:a=>{a.exports="September"},28705:a=>{a.exports=["Tampilkan Legenda Indikator"]},51072:a=>{a.exports=["Tampilkan Pohon Objek"]},37809:a=>{a.exports=["Tampilkan pengaturan interval"]},39045:a=>{a.exports=["Studi Error"]},86577:a=>{a.exports=["Min"]},72149:a=>{a.exports=["Minggu"]},39339:a=>{a.exports=["Judul simbol"]},29985:a=>{a.exports=["Pasca-pasar"]},28412:a=>{a.exports=["Skema berbayar memberikan update data yang lebih cepat."]},56042:a=>{a.exports=["Pra-pasar"]},36015:a=>{a.exports=["Data real-time untuk {description} belum kami dukung pada saat ini. Data ini mungkin dapat tersedia di masa mendatang."]},6667:a=>{a.exports=["Data real-time untuk {symbolName} disediakan oleh bursa {exchange}."]},48293:a=>{a.exports=["Kembalikan chart"]},91029:a=>{a.exports=["Kembalikan panel"]},75094:a=>{a.exports=["Rab"]},7147:a=>{a.exports=["Rabu"]},52984:a=>{a.exports=["Untuk mendapatkan data real-time untuk {description}, harap membeli paket data real-timenya."]},9787:a=>{a.exports=["Kamis"]},7951:a=>{a.exports=["Kamis"]},57918:a=>{a.exports=["Data ini adalah data real-time, namun sedikit berbeda dari yang berasal dari bursa primer resminya."]},68025:a=>{a.exports=["Data ini adalah data real-time, tetapi sedikit berbeda dari data yang berasal dari bursa resmi {exchange}."]},73717:a=>{a.exports=["Tidak terdapat simbol yang dimaksud. Harap pilih simbol lainnya."]},57048:a=>{a.exports=["Saatnya rehat - pasar ini telah tutup."]},94316:a=>{a.exports=["Selasa"]},44979:a=>{a.exports=["Selasa"]},8209:a=>{a.exports=["Hapus Tanda Simbol"]},1111:a=>{a.exports="Volume"},61311:a=>{a.exports=["Perbesar"]},47602:a=>{a.exports=["Perkecil"]},57889:a=>{a.exports=["ubah visibilitas nilai OHLC"]},18644:a=>{a.exports=["ubah visibilitas status market yang terbuka"]},45110:a=>{a.exports=["ubah visibilitas perubahan bar"]},31325:a=>{a.exports=["ubah visibilitas judul indikator"]},99774:a=>{a.exports=["ubah visibilitas nilai indikator"]},96162:a=>{a.exports=["ubah visibilitas argumen indikator"]},26717:a=>{a.exports=["ubah visibilitas deskripsi simbol"]},9455:a=>{a.exports=["ubah visibilitas nilai volume"]},39348:a=>{a.exports=["Kurang dari 1 menit"]},87358:a=>{a.exports=["tampilkan {title}"]},7827:a=>{a.exports=["{days} dan {hours}"]},7435:a=>{a.exports=["{exchange} oleh {originalExchange}"]},19830:a=>{a.exports=["{hours} dan {minutes}"]},1084:a=>{a.exports=["Data real-time {listedExchange} tersedia gratis untuk pengguna terdaftar."]},11155:a=>{a.exports=["Data {symbolName} tertunda selama {time} menit."]},77033:a=>{ -a.exports=["Data diperbarui satu kali setiap {amount} detik, bahkan jika terdapat lebih banyak pembaruan di pasar."]},2121:a=>{a.exports=["Data pada skema Basic kami diperbarui satu kali setiap {amount} detik, bahkan jika terdapat lebih banyak pembaruan di pasar."]},5223:a=>{a.exports=["Satu pembaruan setiap {amount} detik"]},58609:a=>{a.exports=["{number} hari"]},24430:a=>{a.exports=["{number} jam"]},67151:a=>{a.exports=["{number} menit"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:a=>{a.exports=["Jum"]},11268:a=>{a.exports=["Sen"]},63331:a=>{a.exports=["Sab"]},85954:a=>{a.exports=["Min"]},26230:a=>{a.exports=["Rab"]},24793:a=>{a.exports=["Kam"]},31533:a=>{a.exports=["Sel"]},89790:a=>{a.exports=["Tidak bisa mendapatkan kode sumber Pine."]},39589:a=>{a.exports=["Tutup panel"]},38154:a=>{a.exports=["Konfirmasi Hilangkan Pohon Studi"]},65636:a=>{a.exports="Cboe BZX"},36004:a=>{a.exports=["Buat sebuah akun gratis"]},69419:a=>{a.exports=["Semuanya ok - Pasar telah buka."]},97637:a=>{a.exports="April"},86797:a=>{a.exports=["Agustus"]},22519:a=>{a.exports=["Nilai Perubahan Bar"]},52003:a=>{a.exports=["Apakah benar anda ingin menghapus studi beserta semua turunannya?"]},68854:a=>{a.exports=["Dobel klik"]},97325:a=>{a.exports=["Permasalahan data"]},52916:a=>{a.exports=["Data diupdate satu kali dalam sehari."]},25978:a=>{a.exports=["Data di update hanya satu kali per detiknya, meskipun didalam pasar terdapat update yang lebih banyak."]},57310:a=>{a.exports=["Data tertunda"]},49321:a=>{a.exports=["Data yang disediakan untuk skema Basic kami hanya di update satu kali per detiknya, meskipun didalam pasar terdapat update yang lebih banyak."]},55669:a=>{a.exports=["Desember"]},83498:a=>{a.exports=["Hapus panel"]},59315:a=>{a.exports=["Data penghujung hari"]},82751:a=>{a.exports=["Kesalahan"]},40519:a=>{a.exports=["Selamat sore. Pasar hanya buka untuk melakukan trading pasca-pasar."]},80227:a=>{a.exports=["Zona waktu bursa"]},16467:a=>{a.exports=["Februari"]},25046:a=>{a.exports=["Mengisi Kesepakatan Bursa"]},93666:a=>{a.exports=["Tandai Simbol"]},564:a=>{a.exports=["Jum"]},72970:a=>{a.exports=["Jumat"]},88958:a=>{a.exports=["Hari Libur"]},21686:a=>{a.exports=["Sembunyikan Legenda Indikator"]},26935:a=>{a.exports=["Argumentasi Indikator"]},26315:a=>{a.exports=["Judul Indikator"]},84098:a=>{a.exports=["Nilai Indikator"]},91459:a=>{a.exports=["Jika anda menginginkan data real-time {listedExchange} anda perlu melengkapi Kesepakatan Bursanya. Jangan khawatir, ini hanya membutuhkan beberapa kali klik saja"]},50634:a=>{a.exports=["Akan menuju perdagangan pasca-pasar dalam {remainingTime}."]},74537:a=>{a.exports=["Perdagangan pra-pasar akan terbuka dalam {remainingTime}."]},26910:a=>{a.exports=["Januari"]},23230:a=>{a.exports=["Juli"]},49385:a=>{a.exports=["Juni"]},99487:a=>{a.exports=["Nilai OHLC"]},15815:a=>{a.exports=["Satu update per detik"]},90784:a=>{a.exports=["Oktober"]},75991:a=>{a.exports=["Tampilkan status pasar Buka"]},18429:a=>{a.exports=["Pelajari lebih lanjut"]},39899:a=>{a.exports=["Pindahkan panel kebawah"]},70343:a=>{a.exports=["Pindahkan panel keatas"]},83085:a=>{a.exports=["Sen"]},61199:a=>{a.exports=["Senin"]},41610:a=>{a.exports=["Lebih lanjut"]},1653:a=>{a.exports=["Selamat pagi. Pasar telah dibuka untuk melakukan trading pra-pasar."]},56470:a=>{a.exports=["Perbesar chart"]},19603:a=>{a.exports=["Perbesar panel"]},68327:a=>{a.exports=["Mei"]},35732:a=>{a.exports=["Kelola panel"]},84675:a=>{a.exports=["Maret"]}, +83949:a=>{a.exports=["Pasar buka"]},35701:a=>{a.exports=["Pasar buka dalam {remainingTime}"]},95814:a=>{a.exports=["Pasar tutup"]},98105:a=>{a.exports=["Pasar tutup dalam {remainingTime}."]},87202:a=>{a.exports=["Pasar saat ini sedang libur. Mereka beruntung."]},71194:a=>{a.exports="November"},66324:a=>{a.exports=["Kode sumber"]},36835:a=>{a.exports=["Sab"]},1144:a=>{a.exports=["Sabtu"]},40653:a=>{a.exports=["Geser ke kiri"]},26721:a=>{a.exports=["Geser ke bar terbaru"]},35809:a=>{a.exports=["Geser ke kanan"]},61132:a=>{a.exports="September"},28705:a=>{a.exports=["Tampilkan Legenda Indikator"]},51072:a=>{a.exports=["Tampilkan Pohon Objek"]},37809:a=>{a.exports=["Tampilkan pengaturan interval"]},39045:a=>{a.exports=["Studi Error"]},86577:a=>{a.exports=["Min"]},72149:a=>{a.exports=["Minggu"]},46041:a=>{a.exports="Symbol price source"},39339:a=>{a.exports=["Judul simbol"]},29985:a=>{a.exports=["Pasca-pasar"]},28412:a=>{a.exports=["Skema berbayar memberikan update data yang lebih cepat."]},56042:a=>{a.exports=["Pra-pasar"]},36015:a=>{a.exports=["Data real-time untuk {description} belum kami dukung pada saat ini. Data ini mungkin dapat tersedia di masa mendatang."]},6667:a=>{a.exports=["Data real-time untuk {symbolName} disediakan oleh bursa {exchange}."]},48293:a=>{a.exports=["Kembalikan chart"]},91029:a=>{a.exports=["Kembalikan panel"]},75094:a=>{a.exports=["Rab"]},7147:a=>{a.exports=["Rabu"]},52984:a=>{a.exports=["Untuk mendapatkan data real-time untuk {description}, harap membeli paket data real-timenya."]},9787:a=>{a.exports=["Kamis"]},7951:a=>{a.exports=["Kamis"]},57918:a=>{a.exports=["Data ini adalah data real-time, namun sedikit berbeda dari yang berasal dari bursa primer resminya."]},68025:a=>{a.exports=["Data ini adalah data real-time, tetapi sedikit berbeda dari data yang berasal dari bursa resmi {exchange}."]},73717:a=>{a.exports=["Tidak terdapat simbol yang dimaksud. Harap pilih simbol lainnya."]},57048:a=>{a.exports=["Saatnya rehat - pasar ini telah tutup."]},94316:a=>{a.exports=["Selasa"]},44979:a=>{a.exports=["Selasa"]},8209:a=>{a.exports=["Hapus Tanda Simbol"]},1111:a=>{a.exports="Volume"},61311:a=>{a.exports=["Perbesar"]},47602:a=>{a.exports=["Perkecil"]},57889:a=>{a.exports=["ubah visibilitas nilai OHLC"]},18644:a=>{a.exports=["ubah visibilitas status market yang terbuka"]},45110:a=>{a.exports=["ubah visibilitas perubahan bar"]},31325:a=>{a.exports=["ubah visibilitas judul indikator"]},99774:a=>{a.exports=["ubah visibilitas nilai indikator"]},96162:a=>{a.exports=["ubah visibilitas argumen indikator"]},26717:a=>{a.exports=["ubah visibilitas deskripsi simbol"]},6091:a=>{a.exports="change symbol field visibility"},9455:a=>{a.exports=["ubah visibilitas nilai volume"]},39348:a=>{a.exports=["Kurang dari 1 menit"]},87358:a=>{a.exports=["tampilkan {title}"]},7827:a=>{a.exports=["{days} dan {hours}"]},7435:a=>{a.exports=["{exchange} oleh {originalExchange}"]},19830:a=>{a.exports=["{hours} dan {minutes}"]},1084:a=>{a.exports=["Data real-time {listedExchange} tersedia gratis untuk pengguna terdaftar."]},11155:a=>{ +a.exports=["Data {symbolName} tertunda selama {time} menit."]},77033:a=>{a.exports=["Data diperbarui satu kali setiap {amount} detik, bahkan jika terdapat lebih banyak pembaruan di pasar."]},2121:a=>{a.exports=["Data pada skema Basic kami diperbarui satu kali setiap {amount} detik, bahkan jika terdapat lebih banyak pembaruan di pasar."]},5223:a=>{a.exports=["Satu pembaruan setiap {amount} detik"]},58609:a=>{a.exports=["{number} hari"]},24430:a=>{a.exports=["{number} jam"]},67151:a=>{a.exports=["{number} menit"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/it.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/it.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index b1fba882..00000000 --- a/charting_library/bundles/it.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:i=>{i.exports=["barre"]},19648:i=>{i.exports=["12 ore"]},55838:i=>{i.exports=["24 ore"]},88364:i=>{i.exports=["Stili base del grafico"]},46720:i=>{i.exports=["Cursore"]},50985:i=>{i.exports=["Valuta"]},17319:i=>{i.exports=["Valuta ed unità"]},19481:i=>{i.exports=["Stile"]},68791:i=>{i.exports=["Argomenti"]},95036:i=>{i.exports=["Etichetta prezzo medio chiusura"]},27331:i=>{i.exports=["Sfondo"]},22519:i=>{i.exports=["Variazione barre"]},87845:i=>{i.exports=["Pulsanti"]},25209:i=>{i.exports=["Formato data"]},55090:i=>{i.exports=["Giorno della settimana sulle etichette"]},29601:i=>{i.exports=["Descrizione"]},26897:i=>{i.exports=["Eventi"]},95338:i=>{i.exports=["Linee orizz. griglia"]},60971:i=>{i.exports=["Etichette prezzo Max e Min"]},61142:i=>{i.exports=["Indicatori"]},34905:i=>{i.exports=["Etichette valore indicatori"]},29687:i=>{i.exports=["Etichette valore indicatori e finanziari"]},25084:i=>{i.exports=["Etichette nome indicatori e finanziari"]},9654:i=>{i.exports=["Etichette nome indicatori"]},99487:i=>{i.exports=["Valori OHLC"]},75991:i=>{i.exports=["Mercato aperto"]},70500:i=>{i.exports=["Denaro"]},66653:i=>{i.exports=["Margini"]},42502:i=>{i.exports=["Nessuna etichetta sovrapposta"]},74343:i=>{i.exports=["Controlli navigazione"]},43115:i=>{i.exports=["Assi"]},53224:i=>{i.exports=["Posizione assi"]},79194:i=>{i.exports=["Legenda"]},89053:i=>{i.exports=["Simbolo"]},35383:i=>{i.exports=["Nome simbolo"]},27767:i=>{i.exports=["Etichetta ultimo valore simbolo"]},40847:i=>{i.exports=["Etichetta ultima chiusura giornaliera simbolo"]},50446:i=>{i.exports=["Pannello"]},73908:i=>{i.exports=["Separatori pannello"]},36014:i=>{i.exports=["Percentuale"]},78621:i=>{i.exports=["Pip/Tick"]},74823:i=>{i.exports=["Etichetta prezzo pre/post mercato"]},64859:i=>{i.exports=["Asse del prezzo"]},76523:i=>{i.exports=["Valore di prezzo e percentuale"]},40187:i=>{i.exports="Right Margin"},77705:i=>{i.exports=["Filigrana"]},67369:i=>{i.exports=["Titolo"]},31326:i=>{i.exports=["Titoli"]},23097:i=>{i.exports="Ticker"},82168:i=>{i.exports=["Ticker e descrizione"]},43637:i=>{i.exports=["Asse temporale"]},97316:i=>{i.exports=["Formato orario"]},90801:i=>{i.exports="Trading"},77534:i=>{i.exports=["Unità"]},1111:i=>{i.exports="Volume"},80170:i=>{i.exports=["Valore asse"]},91322:i=>{i.exports=["Valori"]},70353:i=>{i.exports=["Linee vert. griglia"]},57889:i=>{i.exports=["cambio visibilità valori OHLC"]},35646:i=>{i.exports=["cambio visibilità pulsanti navigazione"]},18644:i=>{i.exports=["cambio visibilità stato di mercato"]},45110:i=>{i.exports=["cambio visibilità variazione barre"]},10349:i=>{i.exports=["cambio margine inf"]},88161:i=>{i.exports=["cambio visibilità etichette valuta e unità"]},79570:i=>{i.exports=["cambio visibilità etichetta valuta"]},99011:i=>{i.exports=["cambio colore sfondo grafico"]},72458:i=>{i.exports=["cambio tipologia sfondo grafico"]},37034:i=>{i.exports=["cambio spessore linea croce"]},29951:i=>{i.exports=["cambio colore linea croce"]}, -92027:i=>{i.exports=["cambio stile linea croce"]},50457:i=>{i.exports=["cambio formato data"]},7104:i=>{i.exports=["cambia il giorno della settimana sulle etichette"]},88096:i=>{i.exports=["cambio colore linee orizz griglia"]},2523:i=>{i.exports=["cambio stile linee orizz griglia"]},31325:i=>{i.exports=["cambio visibilità titoli indicatore"]},99774:i=>{i.exports=["cambio visibilità valori indicatore"]},96162:i=>{i.exports=["cambio visibilità argomenti indicatore"]},59820:i=>{i.exports=["cambia visibilità etichette nomi indicatori e finanziari"]},90512:i=>{i.exports=["cambia visibilità etichette valori indicatori e finanziari"]},97956:i=>{i.exports=["cambio trasparenza sfondo legenda"]},61061:i=>{i.exports=["cambio visibilità sfondo legenda"]},37730:i=>{i.exports=["cambio visibilità pulsanti pannelli"]},89032:i=>{i.exports=["cambio colore separatori pannello"]},35636:i=>{i.exports=["cambio margine dx"]},66601:i=>{i.exports="change right margin percentage"},25616:i=>{i.exports=["cambio colore filigrana"]},87159:i=>{i.exports=["cambio visibilità filigrana"]},26717:i=>{i.exports=["cambio visibilità descrizione simbolo"]},28741:i=>{i.exports=["cambio modalità ultimo valore simbolo"]},95071:i=>{i.exports=["cambio formato legenda simbolo"]},35065:i=>{i.exports=["cambio colore testo assi"]},84382:i=>{i.exports=["cambio dimensione font assi"]},12468:i=>{i.exports=["cambio colore linee assi"]},71589:i=>{i.exports=["cambio visibilità separatori sessione"]},15035:i=>{i.exports=["cambio spessore separatori sessione"]},1579:i=>{i.exports=["cambio colore separatori sessione"]},21460:i=>{i.exports=["cambio stile separatori sessione"]},76991:i=>{i.exports=["cambio formato orario"]},98905:i=>{i.exports=["cambio margine sup"]},7011:i=>{i.exports=["cambio visibilità etichetta unità"]},22722:i=>{i.exports=["cambio colore linee vert griglia"]},22867:i=>{i.exports=["cambio stile linee vert griglia"]},9455:i=>{i.exports=["cambio visibilità valori volume"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/it.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/it.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..2e6e68be --- /dev/null +++ b/charting_library/bundles/it.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:i=>{i.exports=["barre"]},19648:i=>{i.exports=["12 ore"]},55838:i=>{i.exports=["24 ore"]},88364:i=>{i.exports=["Stili base del grafico"]},46720:i=>{i.exports=["Cursore"]},50985:i=>{i.exports=["Valuta"]},17319:i=>{i.exports=["Valuta ed unità"]},19481:i=>{i.exports=["Stile"]},68791:i=>{i.exports=["Argomenti"]},95036:i=>{i.exports=["Etichetta prezzo medio chiusura"]},27331:i=>{i.exports=["Sfondo"]},22519:i=>{i.exports=["Variazione barre"]},87845:i=>{i.exports=["Pulsanti"]},25209:i=>{i.exports=["Formato data"]},55090:i=>{i.exports=["Giorno della settimana sulle etichette"]},29601:i=>{i.exports=["Descrizione"]},26897:i=>{i.exports=["Eventi"]},95338:i=>{i.exports=["Linee orizz. griglia"]},60971:i=>{i.exports=["Etichette prezzo Max e Min"]},61142:i=>{i.exports=["Indicatori"]},34905:i=>{i.exports=["Etichette valore indicatori"]},29687:i=>{i.exports=["Etichette valore indicatori e finanziari"]},25084:i=>{i.exports=["Etichette nome indicatori e finanziari"]},9654:i=>{i.exports=["Etichette nome indicatori"]},99487:i=>{i.exports=["Valori OHLC"]},75991:i=>{i.exports=["Mercato aperto"]},96073:i=>{i.exports="Long Description"},70500:i=>{i.exports=["Denaro"]},66653:i=>{i.exports=["Margini"]},42502:i=>{i.exports=["Nessuna etichetta sovrapposta"]},74343:i=>{i.exports=["Controlli navigazione"]},43115:i=>{i.exports=["Assi"]},53224:i=>{i.exports=["Posizione assi"]},79194:i=>{i.exports=["Legenda"]},89053:i=>{i.exports=["Simbolo"]},35383:i=>{i.exports=["Nome simbolo"]},27767:i=>{i.exports=["Etichetta ultimo valore simbolo"]},40847:i=>{i.exports=["Etichetta ultima chiusura giornaliera simbolo"]},50446:i=>{i.exports=["Pannello"]},73908:i=>{i.exports=["Separatori pannello"]},36014:i=>{i.exports=["Percentuale"]},78621:i=>{i.exports=["Pip/Tick"]},74823:i=>{i.exports=["Etichetta prezzo pre/post mercato"]},64859:i=>{i.exports=["Asse del prezzo"]},76523:i=>{i.exports=["Valore di prezzo e percentuale"]},40187:i=>{i.exports="Right Margin"},77705:i=>{i.exports=["Filigrana"]},67369:i=>{i.exports=["Titolo"]},31326:i=>{i.exports=["Titoli"]},23097:i=>{i.exports="Ticker"},82168:i=>{i.exports=["Ticker e descrizione"]},43637:i=>{i.exports=["Asse temporale"]},97316:i=>{i.exports=["Formato orario"]},90801:i=>{i.exports="Trading"},77534:i=>{i.exports=["Unità"]},1111:i=>{i.exports="Volume"},80170:i=>{i.exports=["Valore asse"]},91322:i=>{i.exports=["Valori"]},70353:i=>{i.exports=["Linee vert. griglia"]},57889:i=>{i.exports=["cambio visibilità valori OHLC"]},35646:i=>{i.exports=["cambio visibilità pulsanti navigazione"]},18644:i=>{i.exports=["cambio visibilità stato di mercato"]},45110:i=>{i.exports=["cambio visibilità variazione barre"]},10349:i=>{i.exports=["cambio margine inf"]},88161:i=>{i.exports=["cambio visibilità etichette valuta e unità"]},79570:i=>{i.exports=["cambio visibilità etichetta valuta"]},99011:i=>{i.exports=["cambio colore sfondo grafico"]},72458:i=>{i.exports=["cambio tipologia sfondo grafico"]},37034:i=>{i.exports=["cambio spessore linea croce"]},29951:i=>{ +i.exports=["cambio colore linea croce"]},92027:i=>{i.exports=["cambio stile linea croce"]},50457:i=>{i.exports=["cambio formato data"]},7104:i=>{i.exports=["cambia il giorno della settimana sulle etichette"]},88096:i=>{i.exports=["cambio colore linee orizz griglia"]},2523:i=>{i.exports=["cambio stile linee orizz griglia"]},31325:i=>{i.exports=["cambio visibilità titoli indicatore"]},99774:i=>{i.exports=["cambio visibilità valori indicatore"]},96162:i=>{i.exports=["cambio visibilità argomenti indicatore"]},59820:i=>{i.exports=["cambia visibilità etichette nomi indicatori e finanziari"]},90512:i=>{i.exports=["cambia visibilità etichette valori indicatori e finanziari"]},97956:i=>{i.exports=["cambio trasparenza sfondo legenda"]},61061:i=>{i.exports=["cambio visibilità sfondo legenda"]},37730:i=>{i.exports=["cambio visibilità pulsanti pannelli"]},89032:i=>{i.exports=["cambio colore separatori pannello"]},35636:i=>{i.exports=["cambio margine dx"]},66601:i=>{i.exports="change right margin percentage"},25616:i=>{i.exports=["cambio colore filigrana"]},87159:i=>{i.exports=["cambio visibilità filigrana"]},26717:i=>{i.exports=["cambio visibilità descrizione simbolo"]},6091:i=>{i.exports="change symbol field visibility"},28741:i=>{i.exports=["cambio modalità ultimo valore simbolo"]},95071:i=>{i.exports=["cambio formato legenda simbolo"]},35065:i=>{i.exports=["cambio colore testo assi"]},84382:i=>{i.exports=["cambio dimensione font assi"]},12468:i=>{i.exports=["cambio colore linee assi"]},71589:i=>{i.exports=["cambio visibilità separatori sessione"]},15035:i=>{i.exports=["cambio spessore separatori sessione"]},1579:i=>{i.exports=["cambio colore separatori sessione"]},21460:i=>{i.exports=["cambio stile separatori sessione"]},76991:i=>{i.exports=["cambio formato orario"]},98905:i=>{i.exports=["cambio margine sup"]},7011:i=>{i.exports=["cambio visibilità etichetta unità"]},22722:i=>{i.exports=["cambio colore linee vert griglia"]},22867:i=>{i.exports=["cambio stile linee vert griglia"]},9455:i=>{i.exports=["cambio visibilità valori volume"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/it.6847.490ee46270bef6a878dd.js b/charting_library/bundles/it.7257.089fbbc28bead9558b87.js similarity index 52% rename from charting_library/bundles/it.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/it.7257.089fbbc28bead9558b87.js index 14b3fdd3..e48b91d3 100644 --- a/charting_library/bundles/it.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/it.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:o=>{o.exports=["Ven"]},11268:o=>{o.exports=["Lun"]},63331:o=>{o.exports=["Sab"]},85954:o=>{o.exports=["Dom"]},26230:o=>{o.exports=["Mer"]},24793:o=>{o.exports=["Gio"]},31533:o=>{o.exports=["Mar"]},89790:o=>{o.exports=["Impossibile accedere al codice Pine"]},39589:o=>{o.exports=["Comprimi pannello"]},38154:o=>{o.exports=["Conferma rimozione albero di studio"]},65636:o=>{o.exports="Cboe BZX"},36004:o=>{o.exports=["Crea un account gratuito"]},69419:o=>{o.exports=["Tutto a posto. Il mercato è aperto."]},97637:o=>{o.exports=["Aprile"]},86797:o=>{o.exports=["Agosto"]},22519:o=>{o.exports=["Variazione barre"]},52003:o=>{o.exports=["Vuoi eliminare questa analisi e quelle collegate?"]},68854:o=>{o.exports=["Doppio click"]},97325:o=>{o.exports=["Problema di dati"]},52916:o=>{o.exports=["Dati aggiornati una volta al giorno."]},25978:o=>{o.exports=["I dati sono aggiornati al massimo una volta per secondo, anche se ci sono più variazioni di prezzo."]},57310:o=>{o.exports=["Dati in differita"]},49321:o=>{o.exports=["Con l'account gratuito, i dati sono aggiornati al massimo una volta per secondo, anche se ci sono più variazioni di prezzo."]},55669:o=>{o.exports=["Dicembre"]},83498:o=>{o.exports=["Rimuovi pannello"]},59315:o=>{o.exports=["Dati di fine giornata"]},82751:o=>{o.exports=["Errore"]},40519:o=>{o.exports=["Ora il mercato è in fase di post-negoziazione."]},80227:o=>{o.exports=["Fusorario di riferimento"]},16467:o=>{o.exports=["Febbraio"]},25046:o=>{o.exports=["Compila la Licenza di borsa"]},93666:o=>{o.exports=["Evidenzia simbolo"]},564:o=>{o.exports=["Ven"]},72970:o=>{o.exports=["Venerdì"]},88958:o=>{o.exports=["Festività"]},21686:o=>{o.exports=["Nascondi legenda indicatore"]},26935:o=>{o.exports=["Argomenti indicatore"]},26315:o=>{o.exports=["Titoli indicatore"]},84098:o=>{o.exports=["Valori indicatore"]},91459:o=>{o.exports=["Se vuoi accedere ai dati in tempo reale da {listedExchange}, devi compilare la Licenza di borsa. Ci vogliono pochi click, non ti preoccupare."]},50634:o=>{o.exports=["Il trading post mercato comincia tra {remainingTime}."]},74537:o=>{o.exports=["Il trading pre mercato comincia tra {remainingTime}."]},26910:o=>{o.exports=["Gennaio"]},23230:o=>{o.exports=["Luglio"]},49385:o=>{o.exports=["Giugno"]},99487:o=>{o.exports=["Valori OHLC"]},15815:o=>{o.exports=["Un aggiornamento al secondo"]},90784:o=>{o.exports=["Ottobre"]},75991:o=>{o.exports=["Mercato aperto"]},18429:o=>{o.exports=["Scopri di più"]},39899:o=>{o.exports=["Sposta giù il pannello"]},70343:o=>{o.exports=["Sposta su il pannello"]},83085:o=>{o.exports=["Lun"]},61199:o=>{o.exports=["Lunedì"]},41610:o=>{o.exports=["Altro"]},1653:o=>{o.exports=["Ora il mercato è in fase di pre-negoziazione."]},56470:o=>{o.exports=["Espandi grafico"]},19603:o=>{o.exports=["Espandi pannello"]},68327:o=>{o.exports=["Maggio"]},35732:o=>{o.exports=["Gestisci pannelli"]},84675:o=>{o.exports=["Marzo"]},83949:o=>{o.exports=["Mercato aperto"]},35701:o=>{ -o.exports=["Il mercato apre tra {remainingTime}."]},95814:o=>{o.exports=["Mercato chiuso"]},98105:o=>{o.exports=["Il mercato chiude tra {remainingTime}."]},87202:o=>{o.exports=["Il mercato è chiuso per festività. Beato lui."]},71194:o=>{o.exports=["Novembre"]},66324:o=>{o.exports=["Codice sorgente"]},36835:o=>{o.exports=["Sab"]},1144:o=>{o.exports=["Sabato"]},40653:o=>{o.exports=["Scorri verso sinistra"]},26721:o=>{o.exports=["Scorri fino all'ultima barra"]},35809:o=>{o.exports=["Scorri verso destra"]},61132:o=>{o.exports=["Settembre"]},28705:o=>{o.exports=["Mostra legenda indicatore"]},51072:o=>{o.exports=["Mostra albero oggetti"]},37809:o=>{o.exports=["Mostra impostazioni intervallo"]},39045:o=>{o.exports=["Errore indicatore"]},86577:o=>{o.exports=["Dom"]},72149:o=>{o.exports=["Domenica"]},39339:o=>{o.exports=["Titolo del Simbolo"]},29985:o=>{o.exports=["Post-mercato"]},28412:o=>{o.exports=["Gli abbonamenti mostrano aggiornamenti di prezzo più rapidi."]},56042:o=>{o.exports=["Pre-mercato"]},36015:o=>{o.exports=["I dati in tempo reale per {description} non sono supportati al momento. In futuro potremo supportarli."]},6667:o=>{o.exports=["I dati in tempo reale per {symbolName} sono forniti da {exchange}."]},48293:o=>{o.exports=["Ripristina grafico"]},91029:o=>{o.exports=["Ripristina pannello"]},75094:o=>{o.exports=["Mer"]},7147:o=>{o.exports=["Mercoledì"]},52984:o=>{o.exports=["Per ottenere i dati in tempo reale per {description}, devi acquistare il pacchetto di dati aggiuntivo."]},9787:o=>{o.exports=["Gio"]},7951:o=>{o.exports=["Giovedì"]},57918:o=>{o.exports=["Questi dati sono in tempo reale, ma differiscono leggermente da quelli della borsa ufficiale."]},68025:o=>{o.exports=["I dati sono in tempo reale, ma possono differire in minima parte dalla controparte ufficiale quotata su {exchange}."]},73717:o=>{o.exports=["Questo simbolo non è presente. Selezionane un altro."]},57048:o=>{o.exports=["Tempo di una passeggiata. Qui non si muove niente."]},94316:o=>{o.exports=["Mar"]},44979:o=>{o.exports=["Martedì"]},8209:o=>{o.exports=["Smetti di evidenziare simbolo"]},1111:o=>{o.exports="Volume"},61311:o=>{o.exports=["Ingrandisci"]},47602:o=>{o.exports=["Rimpicciolisci"]},57889:o=>{o.exports=["cambio visibilità valori OHLC"]},18644:o=>{o.exports=["cambio visibilità stato di mercato"]},45110:o=>{o.exports=["cambio visibilità variazione barre"]},31325:o=>{o.exports=["cambio visibilità titoli indicatore"]},99774:o=>{o.exports=["cambio visibilità valori indicatore"]},96162:o=>{o.exports=["cambio visibilità argomenti indicatore"]},26717:o=>{o.exports=["cambio visibilità descrizione simbolo"]},9455:o=>{o.exports=["cambio visibilità valori volume"]},39348:o=>{o.exports=["meno di 1 minuto"]},87358:o=>{o.exports=["mostra {title}"]},7827:o=>{o.exports=["{days} e {hours}"]},7435:o=>{o.exports=["{exchange} tramite {originalExchange}"]},19830:o=>{o.exports=["{hours} e {minutes}"]},1084:o=>{o.exports=["I dati in tempo reale di {listedExchange} sono disponibili senza costi per tutti gli utenti registrati."]},11155:o=>{ -o.exports=["I dati di {symbolName} sono ritardati di {time} minuti."]},77033:o=>{o.exports=["I dati vengono aggiornati una volta ogni {amount} secondo, anche se il mercato si aggiorna più velocemente.","I dati vengono aggiornati una volta ogni {amount} secondo, anche se il mercato si aggiorna più velocemente."]},2121:o=>{o.exports=["I dati sul nostro piano basic vengono aggiornati una volta ogni {amount} secondo, anche se il mercato si muove più velocemente.","I dati sul nostro piano basic vengono aggiornati una volta ogni {amount} secondo, anche se il mercato si muove più velocemente."]},5223:o=>{o.exports=["Un aggiornamento ogni {amount} secondo.","Un aggiornamento ogni {amount} secondi."]},58609:o=>{o.exports=["{number} giorno","{number} giorni"]},24430:o=>{o.exports=["{number} ora","{number} ore"]},67151:o=>{o.exports=["{number} minuto","{number} minuti"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:o=>{o.exports=["Ven"]},11268:o=>{o.exports=["Lun"]},63331:o=>{o.exports=["Sab"]},85954:o=>{o.exports=["Dom"]},26230:o=>{o.exports=["Mer"]},24793:o=>{o.exports=["Gio"]},31533:o=>{o.exports=["Mar"]},89790:o=>{o.exports=["Impossibile accedere al codice Pine"]},39589:o=>{o.exports=["Comprimi pannello"]},38154:o=>{o.exports=["Conferma rimozione albero di studio"]},65636:o=>{o.exports="Cboe BZX"},36004:o=>{o.exports=["Crea un account gratuito"]},69419:o=>{o.exports=["Tutto a posto. Il mercato è aperto."]},97637:o=>{o.exports=["Aprile"]},86797:o=>{o.exports=["Agosto"]},22519:o=>{o.exports=["Variazione barre"]},52003:o=>{o.exports=["Vuoi eliminare questa analisi e quelle collegate?"]},68854:o=>{o.exports=["Doppio click"]},97325:o=>{o.exports=["Problema di dati"]},52916:o=>{o.exports=["Dati aggiornati una volta al giorno."]},25978:o=>{o.exports=["I dati sono aggiornati al massimo una volta per secondo, anche se ci sono più variazioni di prezzo."]},57310:o=>{o.exports=["Dati in differita"]},49321:o=>{o.exports=["Con l'account gratuito, i dati sono aggiornati al massimo una volta per secondo, anche se ci sono più variazioni di prezzo."]},55669:o=>{o.exports=["Dicembre"]},83498:o=>{o.exports=["Rimuovi pannello"]},59315:o=>{o.exports=["Dati di fine giornata"]},82751:o=>{o.exports=["Errore"]},40519:o=>{o.exports=["Ora il mercato è in fase di post-negoziazione."]},80227:o=>{o.exports=["Fusorario di riferimento"]},16467:o=>{o.exports=["Febbraio"]},25046:o=>{o.exports=["Compila la Licenza di borsa"]},93666:o=>{o.exports=["Evidenzia simbolo"]},564:o=>{o.exports=["Ven"]},72970:o=>{o.exports=["Venerdì"]},88958:o=>{o.exports=["Festività"]},21686:o=>{o.exports=["Nascondi legenda indicatore"]},26935:o=>{o.exports=["Argomenti indicatore"]},26315:o=>{o.exports=["Titoli indicatore"]},84098:o=>{o.exports=["Valori indicatore"]},91459:o=>{o.exports=["Se vuoi accedere ai dati in tempo reale da {listedExchange}, devi compilare la Licenza di borsa. Ci vogliono pochi click, non ti preoccupare."]},50634:o=>{o.exports=["Il trading post mercato comincia tra {remainingTime}."]},74537:o=>{o.exports=["Il trading pre mercato comincia tra {remainingTime}."]},26910:o=>{o.exports=["Gennaio"]},23230:o=>{o.exports=["Luglio"]},49385:o=>{o.exports=["Giugno"]},99487:o=>{o.exports=["Valori OHLC"]},15815:o=>{o.exports=["Un aggiornamento al secondo"]},90784:o=>{o.exports=["Ottobre"]},75991:o=>{o.exports=["Mercato aperto"]},18429:o=>{o.exports=["Scopri di più"]},39899:o=>{o.exports=["Sposta giù il pannello"]},70343:o=>{o.exports=["Sposta su il pannello"]},83085:o=>{o.exports=["Lun"]},61199:o=>{o.exports=["Lunedì"]},41610:o=>{o.exports=["Altro"]},1653:o=>{o.exports=["Ora il mercato è in fase di pre-negoziazione."]},56470:o=>{o.exports=["Espandi grafico"]},19603:o=>{o.exports=["Espandi pannello"]},68327:o=>{o.exports=["Maggio"]},35732:o=>{o.exports=["Gestisci pannelli"]},84675:o=>{o.exports=["Marzo"]},83949:o=>{o.exports=["Mercato aperto"]},35701:o=>{ +o.exports=["Il mercato apre tra {remainingTime}."]},95814:o=>{o.exports=["Mercato chiuso"]},98105:o=>{o.exports=["Il mercato chiude tra {remainingTime}."]},87202:o=>{o.exports=["Il mercato è chiuso per festività. Beato lui."]},71194:o=>{o.exports=["Novembre"]},66324:o=>{o.exports=["Codice sorgente"]},36835:o=>{o.exports=["Sab"]},1144:o=>{o.exports=["Sabato"]},40653:o=>{o.exports=["Scorri verso sinistra"]},26721:o=>{o.exports=["Scorri fino all'ultima barra"]},35809:o=>{o.exports=["Scorri verso destra"]},61132:o=>{o.exports=["Settembre"]},28705:o=>{o.exports=["Mostra legenda indicatore"]},51072:o=>{o.exports=["Mostra albero oggetti"]},37809:o=>{o.exports=["Mostra impostazioni intervallo"]},39045:o=>{o.exports=["Errore indicatore"]},86577:o=>{o.exports=["Dom"]},72149:o=>{o.exports=["Domenica"]},46041:o=>{o.exports="Symbol price source"},39339:o=>{o.exports=["Titolo del Simbolo"]},29985:o=>{o.exports=["Post-mercato"]},28412:o=>{o.exports=["Gli abbonamenti mostrano aggiornamenti di prezzo più rapidi."]},56042:o=>{o.exports=["Pre-mercato"]},36015:o=>{o.exports=["I dati in tempo reale per {description} non sono supportati al momento. In futuro potremo supportarli."]},6667:o=>{o.exports=["I dati in tempo reale per {symbolName} sono forniti da {exchange}."]},48293:o=>{o.exports=["Ripristina grafico"]},91029:o=>{o.exports=["Ripristina pannello"]},75094:o=>{o.exports=["Mer"]},7147:o=>{o.exports=["Mercoledì"]},52984:o=>{o.exports=["Per ottenere i dati in tempo reale per {description}, devi acquistare il pacchetto di dati aggiuntivo."]},9787:o=>{o.exports=["Gio"]},7951:o=>{o.exports=["Giovedì"]},57918:o=>{o.exports=["Questi dati sono in tempo reale, ma differiscono leggermente da quelli della borsa ufficiale."]},68025:o=>{o.exports=["I dati sono in tempo reale, ma possono differire in minima parte dalla controparte ufficiale quotata su {exchange}."]},73717:o=>{o.exports=["Questo simbolo non è presente. Selezionane un altro."]},57048:o=>{o.exports=["Tempo di una passeggiata. Qui non si muove niente."]},94316:o=>{o.exports=["Mar"]},44979:o=>{o.exports=["Martedì"]},8209:o=>{o.exports=["Smetti di evidenziare simbolo"]},1111:o=>{o.exports="Volume"},61311:o=>{o.exports=["Ingrandisci"]},47602:o=>{o.exports=["Rimpicciolisci"]},57889:o=>{o.exports=["cambio visibilità valori OHLC"]},18644:o=>{o.exports=["cambio visibilità stato di mercato"]},45110:o=>{o.exports=["cambio visibilità variazione barre"]},31325:o=>{o.exports=["cambio visibilità titoli indicatore"]},99774:o=>{o.exports=["cambio visibilità valori indicatore"]},96162:o=>{o.exports=["cambio visibilità argomenti indicatore"]},26717:o=>{o.exports=["cambio visibilità descrizione simbolo"]},6091:o=>{o.exports="change symbol field visibility"},9455:o=>{o.exports=["cambio visibilità valori volume"]},39348:o=>{o.exports=["meno di 1 minuto"]},87358:o=>{o.exports=["mostra {title}"]},7827:o=>{o.exports=["{days} e {hours}"]},7435:o=>{o.exports=["{exchange} tramite {originalExchange}"]},19830:o=>{o.exports=["{hours} e {minutes}"]},1084:o=>{ +o.exports=["I dati in tempo reale di {listedExchange} sono disponibili senza costi per tutti gli utenti registrati."]},11155:o=>{o.exports=["I dati di {symbolName} sono ritardati di {time} minuti."]},77033:o=>{o.exports=["I dati vengono aggiornati una volta ogni {amount} secondo, anche se il mercato si aggiorna più velocemente.","I dati vengono aggiornati una volta ogni {amount} secondo, anche se il mercato si aggiorna più velocemente."]},2121:o=>{o.exports=["I dati sul nostro piano basic vengono aggiornati una volta ogni {amount} secondo, anche se il mercato si muove più velocemente.","I dati sul nostro piano basic vengono aggiornati una volta ogni {amount} secondo, anche se il mercato si muove più velocemente."]},5223:o=>{o.exports=["Un aggiornamento ogni {amount} secondo.","Un aggiornamento ogni {amount} secondi."]},58609:o=>{o.exports=["{number} giorno","{number} giorni"]},24430:o=>{o.exports=["{number} ora","{number} ore"]},67151:o=>{o.exports=["{number} minuto","{number} minuti"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ja.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/ja.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index f4c0d011..00000000 --- a/charting_library/bundles/ja.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports=["バー"]},19648:e=>{e.exports=["12時間"]},55838:e=>{e.exports=["24時間"]},88364:e=>{e.exports=["チャートの基本スタイル"]},46720:e=>{e.exports=["十字カーソル"]},50985:e=>{e.exports=["通貨"]},17319:e=>{e.exports=["通貨と単位"]},19481:e=>{e.exports=["外観"]},68791:e=>{e.exports=["引数"]},95036:e=>{e.exports=["平均終値"]},27331:e=>{e.exports=["背景"]},22519:e=>{e.exports=["バーの変動値"]},87845:e=>{e.exports=["ボタン"]},25209:e=>{e.exports=["日付の形式"]},55090:e=>{e.exports=["曜日の表示"]},29601:e=>{e.exports=["詳細"]},26897:e=>{e.exports=["イベント"]},95338:e=>{e.exports=["水平グリッドライン"]},60971:e=>{e.exports=["高値・安値"]},61142:e=>{e.exports=["インジケーター"]},34905:e=>{e.exports=["インジケーター値"]},29687:e=>{e.exports=["インジケーターと財務指標値"]},25084:e=>{e.exports=["インジケーターと財務指標名"]},9654:e=>{e.exports=["インジケーター名"]},99487:e=>{e.exports=["OHLC値"]},75991:e=>{e.exports=["市場の開始状況を表示"]},70500:e=>{e.exports=["金額"]},66653:e=>{e.exports=["マージン"]},42502:e=>{e.exports=["ラベルを重ねない"]},74343:e=>{e.exports=["ナビゲーション"]},43115:e=>{e.exports=["スケール"]},53224:e=>{e.exports=["スケールの配置"]},79194:e=>{e.exports=["ステータスライン"]},89053:e=>{e.exports=["シンボル"]},35383:e=>{e.exports=["シンボル名"]},27767:e=>{e.exports=["シンボルの現在値"]},40847:e=>{e.exports=["シンボルの前日終値"]},50446:e=>{e.exports=["ペイン"]},73908:e=>{e.exports=["ペインの境界線"]},36014:e=>{e.exports=["パーセンテージ"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports=["プレ/アフターマーケット価格"]},64859:e=>{e.exports=["価格スケール"]},76523:e=>{e.exports=["価格とパーセント値"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["透かし"]},67369:e=>{e.exports=["タイトル"]},31326:e=>{e.exports=["タイトル"]},23097:e=>{e.exports=["ティッカー"]},82168:e=>{e.exports=["ティッカーと詳細"]},43637:e=>{e.exports=["時間軸"]},97316:e=>{e.exports=["時刻の表記"]},90801:e=>{e.exports=["トレーディング"]},77534:e=>{e.exports=["単位"]},1111:e=>{e.exports=["出来高"]},80170:e=>{e.exports=["スケールに応じた値"]},91322:e=>{e.exports=["値"]},70353:e=>{e.exports=["垂直グリッドライン"]},57889:e=>{e.exports=["OHLC値の表示の変更"]},35646:e=>{e.exports=["ナビゲーションボタンの表示の変更"]},18644:e=>{e.exports=["市場ステータスの表示の変更"]},45110:e=>{e.exports=["バーの変動値の表示の変更"]},10349:e=>{e.exports=["下マージンの変更"]},88161:e=>{e.exports=["通貨と単位ラベルの表示の変更"]},79570:e=>{e.exports=["通貨ラベルの表示の変更"]},99011:e=>{e.exports=["チャートの背景色の変更"]},72458:e=>{e.exports=["チャートの背景の種類の変更"]},37034:e=>{e.exports=["十字カーソルの幅の変更"]},29951:e=>{e.exports=["十字カーソルの色の変更"]},92027:e=>{e.exports=["十字カーソルのスタイルの変更"]},50457:e=>{e.exports=["日付の形式の変更"]},7104:e=>{e.exports=["曜日の表示の変更"]},88096:e=>{e.exports=["水平グリッドラインの色の変更"]},2523:e=>{e.exports=["水平グリッドラインのスタイルの変更"]},31325:e=>{e.exports=["インジケーターのタイトルの表示の変更"]},99774:e=>{e.exports=["インジケーターの値の表示の変更"]},96162:e=>{e.exports=["インジケーターの引数の表示の変更"]},59820:e=>{e.exports=["インジケーターと財務指標名ラベルの可視性を変更"]},90512:e=>{e.exports=["インジケーターと財務指標値のラベルの可視性を変更"]},97956:e=>{e.exports=["凡例の背景の透明度の変更"]},61061:e=>{e.exports=["凡例の背景の表示の変更"]},37730:e=>{e.exports=["ペインボタンの表示の変更"]},89032:e=>{e.exports=["ペインの境界線の色の変更"]},35636:e=>{e.exports=["右マージンの変更"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["シンボルの透かしの色の変更"]},87159:e=>{e.exports=["シンボルの透かしの表示の変更"]}, -26717:e=>{e.exports=["シンボルの詳細の表示の変更"]},28741:e=>{e.exports=["シンボルの現在値モードの変更"]},95071:e=>{e.exports=["シンボルの凡例の形式の変更"]},35065:e=>{e.exports=["スケールテキストの色の変更"]},84382:e=>{e.exports=["スケールのフォントサイズの変更"]},12468:e=>{e.exports=["スケールのラインの色の変更"]},71589:e=>{e.exports=["セッション区切りの表示の変更"]},15035:e=>{e.exports=["セッション区切りの幅の変更"]},1579:e=>{e.exports=["セッション区切りの色の変更"]},21460:e=>{e.exports=["セッション区切りのスタイルの変更"]},76991:e=>{e.exports=["時刻の表記の変更"]},98905:e=>{e.exports=["上マージンの変更"]},7011:e=>{e.exports=["単位ラベルの表示の変更"]},22722:e=>{e.exports=["垂直グリッドラインの色の変更"]},22867:e=>{e.exports=["垂直グリッドラインのスタイルの変更"]},9455:e=>{e.exports=["出来高の値の表示の変更"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ja.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/ja.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..0f994b38 --- /dev/null +++ b/charting_library/bundles/ja.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports=["バー"]},19648:e=>{e.exports=["12時間"]},55838:e=>{e.exports=["24時間"]},88364:e=>{e.exports=["チャートの基本スタイル"]},46720:e=>{e.exports=["十字カーソル"]},50985:e=>{e.exports=["通貨"]},17319:e=>{e.exports=["通貨と単位"]},19481:e=>{e.exports=["外観"]},68791:e=>{e.exports=["引数"]},95036:e=>{e.exports=["平均終値"]},27331:e=>{e.exports=["背景"]},22519:e=>{e.exports=["バーの変動値"]},87845:e=>{e.exports=["ボタン"]},25209:e=>{e.exports=["日付の形式"]},55090:e=>{e.exports=["曜日の表示"]},29601:e=>{e.exports=["詳細"]},26897:e=>{e.exports=["イベント"]},95338:e=>{e.exports=["水平グリッドライン"]},60971:e=>{e.exports=["高値・安値"]},61142:e=>{e.exports=["インジケーター"]},34905:e=>{e.exports=["インジケーター値"]},29687:e=>{e.exports=["インジケーターと財務指標値"]},25084:e=>{e.exports=["インジケーターと財務指標名"]},9654:e=>{e.exports=["インジケーター名"]},99487:e=>{e.exports=["OHLC値"]},75991:e=>{e.exports=["市場の開始状況を表示"]},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports=["金額"]},66653:e=>{e.exports=["マージン"]},42502:e=>{e.exports=["ラベルを重ねない"]},74343:e=>{e.exports=["ナビゲーション"]},43115:e=>{e.exports=["スケール"]},53224:e=>{e.exports=["スケールの配置"]},79194:e=>{e.exports=["ステータスライン"]},89053:e=>{e.exports=["シンボル"]},35383:e=>{e.exports=["シンボル名"]},27767:e=>{e.exports=["シンボルの現在値"]},40847:e=>{e.exports=["シンボルの前日終値"]},50446:e=>{e.exports=["ペイン"]},73908:e=>{e.exports=["ペインの境界線"]},36014:e=>{e.exports=["パーセンテージ"]},78621:e=>{e.exports="Pips"},74823:e=>{e.exports=["プレ/アフターマーケット価格"]},64859:e=>{e.exports=["価格スケール"]},76523:e=>{e.exports=["価格とパーセント値"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["透かし"]},67369:e=>{e.exports=["タイトル"]},31326:e=>{e.exports=["タイトル"]},23097:e=>{e.exports=["ティッカー"]},82168:e=>{e.exports=["ティッカーと詳細"]},43637:e=>{e.exports=["時間軸"]},97316:e=>{e.exports=["時刻の表記"]},90801:e=>{e.exports=["トレーディング"]},77534:e=>{e.exports=["単位"]},1111:e=>{e.exports=["出来高"]},80170:e=>{e.exports=["スケールに応じた値"]},91322:e=>{e.exports=["値"]},70353:e=>{e.exports=["垂直グリッドライン"]},57889:e=>{e.exports=["OHLC値の表示の変更"]},35646:e=>{e.exports=["ナビゲーションボタンの表示の変更"]},18644:e=>{e.exports=["市場ステータスの表示の変更"]},45110:e=>{e.exports=["バーの変動値の表示の変更"]},10349:e=>{e.exports=["下マージンの変更"]},88161:e=>{e.exports=["通貨と単位ラベルの表示の変更"]},79570:e=>{e.exports=["通貨ラベルの表示の変更"]},99011:e=>{e.exports=["チャートの背景色の変更"]},72458:e=>{e.exports=["チャートの背景の種類の変更"]},37034:e=>{e.exports=["十字カーソルの幅の変更"]},29951:e=>{e.exports=["十字カーソルの色の変更"]},92027:e=>{e.exports=["十字カーソルのスタイルの変更"]},50457:e=>{e.exports=["日付の形式の変更"]},7104:e=>{e.exports=["曜日の表示の変更"]},88096:e=>{e.exports=["水平グリッドラインの色の変更"]},2523:e=>{e.exports=["水平グリッドラインのスタイルの変更"]},31325:e=>{e.exports=["インジケーターのタイトルの表示の変更"]},99774:e=>{e.exports=["インジケーターの値の表示の変更"]},96162:e=>{e.exports=["インジケーターの引数の表示の変更"]},59820:e=>{e.exports=["インジケーターと財務指標名ラベルの可視性を変更"]},90512:e=>{e.exports=["インジケーターと財務指標値のラベルの可視性を変更"]},97956:e=>{e.exports=["凡例の背景の透明度の変更"]},61061:e=>{e.exports=["凡例の背景の表示の変更"]},37730:e=>{e.exports=["ペインボタンの表示の変更"]},89032:e=>{e.exports=["ペインの境界線の色の変更"]},35636:e=>{e.exports=["右マージンの変更"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["シンボルの透かしの色の変更"]}, +87159:e=>{e.exports=["シンボルの透かしの表示の変更"]},26717:e=>{e.exports=["シンボルの詳細の表示の変更"]},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports=["シンボルの現在値モードの変更"]},95071:e=>{e.exports=["シンボルの凡例の形式の変更"]},35065:e=>{e.exports=["スケールテキストの色の変更"]},84382:e=>{e.exports=["スケールのフォントサイズの変更"]},12468:e=>{e.exports=["スケールのラインの色の変更"]},71589:e=>{e.exports=["セッション区切りの表示の変更"]},15035:e=>{e.exports=["セッション区切りの幅の変更"]},1579:e=>{e.exports=["セッション区切りの色の変更"]},21460:e=>{e.exports=["セッション区切りのスタイルの変更"]},76991:e=>{e.exports=["時刻の表記の変更"]},98905:e=>{e.exports=["上マージンの変更"]},7011:e=>{e.exports=["単位ラベルの表示の変更"]},22722:e=>{e.exports=["垂直グリッドラインの色の変更"]},22867:e=>{e.exports=["垂直グリッドラインのスタイルの変更"]},9455:e=>{e.exports=["出来高の値の表示の変更"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ja.6847.490ee46270bef6a878dd.js b/charting_library/bundles/ja.7257.089fbbc28bead9558b87.js similarity index 55% rename from charting_library/bundles/ja.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/ja.7257.089fbbc28bead9558b87.js index 8cf1f5a1..b0a467b7 100644 --- a/charting_library/bundles/ja.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/ja.7257.089fbbc28bead9558b87.js @@ -1,2 +1,2 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports=["金"]},11268:e=>{e.exports=["月"]},63331:e=>{e.exports=["土"]},85954:e=>{e.exports=["日"]},26230:e=>{e.exports=["水"]},24793:e=>{e.exports=["木"]},31533:e=>{e.exports=["火"]},89790:e=>{e.exports=["Pineソースコードを取得できませんでした。"]},39589:e=>{e.exports=["ペインを折りたたむ"]},38154:e=>{e.exports=["インジケーター削除の確認"]},65636:e=>{e.exports=["CBOE BZX"]},36004:e=>{e.exports=["無料アカウントを作成"]},69419:e=>{e.exports=["すべてが順調です — 市場はオープンです。"]},97637:e=>{e.exports=["4月"]},86797:e=>{e.exports=["8月"]},22519:e=>{e.exports=["バーの変動値"]},52003:e=>{e.exports=["本当にすべての関連のインジケーターを削除しますか?"]},68854:e=>{e.exports=["ダブルクリック"]},97325:e=>{e.exports=["データに問題が発生しています"]},52916:e=>{e.exports=["データは1日に1度更新されます。"]},25978:e=>{e.exports=["市場でより多くの更新がある場合でも、データは1秒に1回だけ更新されます。"]},57310:e=>{e.exports=["データは遅延しています"]},49321:e=>{e.exports=["無料プランで提供されるデータは、市場でより多くの更新がある場合でも1秒に1回だけ更新されます。"]},55669:e=>{e.exports=["12月"]},83498:e=>{e.exports=["ペインを削除"]},59315:e=>{e.exports=["終日データ"]},82751:e=>{e.exports=["エラー"]},40519:e=>{e.exports=["夜です。市場は現在アフターマーケットでオープンしています。"]},80227:e=>{e.exports=["取引所のタイムゾーン"]},16467:e=>{e.exports=["2月"]},25046:e=>{e.exports=["取引所の合意書に記入"]},93666:e=>{e.exports=["シンボルにフラグを付ける"]},564:e=>{e.exports=["金"]},72970:e=>{e.exports=["金曜日"]},88958:e=>{e.exports=["休日"]},21686:e=>{e.exports=["インジケーターの凡例を隠す"]},26935:e=>{e.exports=["インジケーターの引数"]},26315:e=>{e.exports=["インジケーターのタイトル"]},84098:e=>{e.exports=["インジケーターの値"]},91459:e=>{e.exports=["{listedExchange} のリアルタイムデータをご希望の場合には、取引所の合意書に承諾される必要があります。数回のクリックで完了しますのでご安心ください。"]},50634:e=>{e.exports=["アフターマーケット開始まで{remainingTime}。"]},74537:e=>{e.exports=["プレマーケット市場開始まで{remainingTime}。"]},26910:e=>{e.exports=["1月"]},23230:e=>{e.exports=["7月"]},49385:e=>{e.exports=["6月"]},99487:e=>{e.exports=["OHLC値"]},15815:e=>{e.exports=["1秒に1回更新"]},90784:e=>{e.exports=["10月"]},75991:e=>{e.exports=["市場の開始状況を表示"]},18429:e=>{e.exports=["詳細を確認"]},39899:e=>{e.exports=["ペインを下に移動"]},70343:e=>{e.exports=["ペインを上に移動"]},83085:e=>{e.exports=["月"]},61199:e=>{e.exports=["月曜日"]},41610:e=>{e.exports=["詳細"]},1653:e=>{e.exports=["朝です。市場は現在プレマーケットでオープンしています。"]},56470:e=>{e.exports=["チャートを最大化"]},19603:e=>{e.exports=["ペインを最大化"]},68327:e=>{e.exports=["5月"]},35732:e=>{e.exports=["ペインを管理"]},84675:e=>{e.exports=["3月"]},83949:e=>{e.exports=["市場開始"]},35701:e=>{e.exports=["市場開始まで{remainingTime}。"]},95814:e=>{e.exports=["市場終了"]},98105:e=>{e.exports=["市場終了まで{remainingTime}。"]},87202:e=>{e.exports=["市場は現在休日です。良い休日を。"]},71194:e=>{e.exports=["11月"]},66324:e=>{e.exports=["ソースコード"]},36835:e=>{e.exports=["土"]},1144:e=>{e.exports=["土曜日"]},40653:e=>{e.exports=["左にスクロール"]},26721:e=>{e.exports=["最新のバーまでスクロール"]},35809:e=>{e.exports=["右にスクロール"]},61132:e=>{e.exports=["9月"]},28705:e=>{e.exports=["インジケーターの凡例を表示"]},51072:e=>{e.exports=["オブジェクトツリーを表示"]},37809:e=>{e.exports=["時間足の設定を表示"]},39045:e=>{e.exports=["スクリプトエラー"]},86577:e=>{e.exports=["日"]},72149:e=>{e.exports=["日曜日"]},39339:e=>{e.exports=["シンボルのタイトル"]},29985:e=>{e.exports=["アフターマーケット"]},28412:e=>{e.exports=["有料プランでは、データの更新が高速になります。"]},56042:e=>{ -e.exports=["プレマーケット"]},36015:e=>{e.exports=["現在{description}のリアルタイムデータはサポートされていません。将来的にはサポートされる可能性があります。"]},6667:e=>{e.exports=["{symbolName}のリアルタイムデータは{exchange}取引所から提供されています。"]},48293:e=>{e.exports=["チャートを復元"]},91029:e=>{e.exports=["ペインを復元"]},75094:e=>{e.exports=["水"]},7147:e=>{e.exports=["水曜日"]},52984:e=>{e.exports=["{description}のリアルタイムデータを入手するには、該当のリアルタイムデータパッケージをご購入ください。"]},9787:e=>{e.exports=["木"]},7951:e=>{e.exports=["木曜日"]},57918:e=>{e.exports=["このデータはリアルタイムですが、一次取引所の公式データとは若干異なります。"]},68025:e=>{e.exports=["このデータはリアルタイムですが、{exchange}の公式データとは若干異なります。"]},73717:e=>{e.exports=["このシンボルは存在しません。別のシンボルを選択して下さい。"]},57048:e=>{e.exports=["お散歩の時間です — 市場はクローズです。"]},94316:e=>{e.exports=["火"]},44979:e=>{e.exports=["火曜日"]},8209:e=>{e.exports=["シンボルのフラグを外す"]},1111:e=>{e.exports=["出来高"]},61311:e=>{e.exports=["ズームイン"]},47602:e=>{e.exports=["ズームアウト"]},57889:e=>{e.exports=["OHLC値の表示の変更"]},18644:e=>{e.exports=["市場ステータスの表示の変更"]},45110:e=>{e.exports=["バーの変動値の表示の変更"]},31325:e=>{e.exports=["インジケーターのタイトルの表示の変更"]},99774:e=>{e.exports=["インジケーターの値の表示の変更"]},96162:e=>{e.exports=["インジケーターの引数の表示の変更"]},26717:e=>{e.exports=["シンボルの詳細の表示の変更"]},9455:e=>{e.exports=["出来高の値の表示の変更"]},39348:e=>{e.exports=["1分未満"]},87358:e=>{e.exports=["{title}の表示"]},7827:e=>{e.exports=["{days}と{hours}"]},7435:e=>{e.exports=["{originalExchange}による{exchange}"]},19830:e=>{e.exports=["{hours}{minutes}"]},1084:e=>{e.exports=["登録ユーザーの方は無料で{listedExchange}のリアルタイムデータをご利用頂けます。"]},11155:e=>{e.exports=["{symbolName}のデータは{time}分遅延しています。"]},77033:e=>{e.exports=["市場でより多くの更新がある場合でも、データは{amount}秒に1回だけ更新されます。"]},2121:e=>{e.exports=["無料プランで提供されるデータは、市場でより多くの更新がある場合でも{amount}秒に1回だけ更新されます。"]},5223:e=>{e.exports=["{amount}秒につき1回の更新"]},58609:e=>{e.exports=["{number}日"]},24430:e=>{e.exports=["{number}時間"]},67151:e=>{e.exports=["{number}分"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports=["金"]},11268:e=>{e.exports=["月"]},63331:e=>{e.exports=["土"]},85954:e=>{e.exports=["日"]},26230:e=>{e.exports=["水"]},24793:e=>{e.exports=["木"]},31533:e=>{e.exports=["火"]},89790:e=>{e.exports=["Pineソースコードを取得できませんでした。"]},39589:e=>{e.exports=["ペインを折りたたむ"]},38154:e=>{e.exports=["インジケーター削除の確認"]},65636:e=>{e.exports=["CBOE BZX"]},36004:e=>{e.exports=["無料アカウントを作成"]},69419:e=>{e.exports=["すべてが順調です — 市場はオープンです。"]},97637:e=>{e.exports=["4月"]},86797:e=>{e.exports=["8月"]},22519:e=>{e.exports=["バーの変動値"]},52003:e=>{e.exports=["本当にすべての関連のインジケーターを削除しますか?"]},68854:e=>{e.exports=["ダブルクリック"]},97325:e=>{e.exports=["データに問題が発生しています"]},52916:e=>{e.exports=["データは1日に1度更新されます。"]},25978:e=>{e.exports=["市場でより多くの更新がある場合でも、データは1秒に1回だけ更新されます。"]},57310:e=>{e.exports=["データは遅延しています"]},49321:e=>{e.exports=["無料プランで提供されるデータは、市場でより多くの更新がある場合でも1秒に1回だけ更新されます。"]},55669:e=>{e.exports=["12月"]},83498:e=>{e.exports=["ペインを削除"]},59315:e=>{e.exports=["終日データ"]},82751:e=>{e.exports=["エラー"]},40519:e=>{e.exports=["夜です。市場は現在アフターマーケットでオープンしています。"]},80227:e=>{e.exports=["取引所のタイムゾーン"]},16467:e=>{e.exports=["2月"]},25046:e=>{e.exports=["取引所の合意書に記入"]},93666:e=>{e.exports=["シンボルにフラグを付ける"]},564:e=>{e.exports=["金"]},72970:e=>{e.exports=["金曜日"]},88958:e=>{e.exports=["休日"]},21686:e=>{e.exports=["インジケーターの凡例を隠す"]},26935:e=>{e.exports=["インジケーターの引数"]},26315:e=>{e.exports=["インジケーターのタイトル"]},84098:e=>{e.exports=["インジケーターの値"]},91459:e=>{e.exports=["{listedExchange} のリアルタイムデータをご希望の場合には、取引所の合意書に承諾される必要があります。数回のクリックで完了しますのでご安心ください。"]},50634:e=>{e.exports=["アフターマーケット開始まで{remainingTime}。"]},74537:e=>{e.exports=["プレマーケット市場開始まで{remainingTime}。"]},26910:e=>{e.exports=["1月"]},23230:e=>{e.exports=["7月"]},49385:e=>{e.exports=["6月"]},99487:e=>{e.exports=["OHLC値"]},15815:e=>{e.exports=["1秒に1回更新"]},90784:e=>{e.exports=["10月"]},75991:e=>{e.exports=["市場の開始状況を表示"]},18429:e=>{e.exports=["詳細を確認"]},39899:e=>{e.exports=["ペインを下に移動"]},70343:e=>{e.exports=["ペインを上に移動"]},83085:e=>{e.exports=["月"]},61199:e=>{e.exports=["月曜日"]},41610:e=>{e.exports=["詳細"]},1653:e=>{e.exports=["朝です。市場は現在プレマーケットでオープンしています。"]},56470:e=>{e.exports=["チャートを最大化"]},19603:e=>{e.exports=["ペインを最大化"]},68327:e=>{e.exports=["5月"]},35732:e=>{e.exports=["ペインを管理"]},84675:e=>{e.exports=["3月"]},83949:e=>{e.exports=["市場開始"]},35701:e=>{e.exports=["市場開始まで{remainingTime}。"]},95814:e=>{e.exports=["市場終了"]},98105:e=>{e.exports=["市場終了まで{remainingTime}。"]},87202:e=>{e.exports=["市場は現在休日です。良い休日を。"]},71194:e=>{e.exports=["11月"]},66324:e=>{e.exports=["ソースコード"]},36835:e=>{e.exports=["土"]},1144:e=>{e.exports=["土曜日"]},40653:e=>{e.exports=["左にスクロール"]},26721:e=>{e.exports=["最新のバーまでスクロール"]},35809:e=>{e.exports=["右にスクロール"]},61132:e=>{e.exports=["9月"]},28705:e=>{e.exports=["インジケーターの凡例を表示"]},51072:e=>{e.exports=["オブジェクトツリーを表示"]},37809:e=>{e.exports=["時間足の設定を表示"]},39045:e=>{e.exports=["スクリプトエラー"]},86577:e=>{e.exports=["日"]},72149:e=>{e.exports=["日曜日"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["シンボルのタイトル"]},29985:e=>{e.exports=["アフターマーケット"]},28412:e=>{ +e.exports=["有料プランでは、データの更新が高速になります。"]},56042:e=>{e.exports=["プレマーケット"]},36015:e=>{e.exports=["現在{description}のリアルタイムデータはサポートされていません。将来的にはサポートされる可能性があります。"]},6667:e=>{e.exports=["{symbolName}のリアルタイムデータは{exchange}取引所から提供されています。"]},48293:e=>{e.exports=["チャートを復元"]},91029:e=>{e.exports=["ペインを復元"]},75094:e=>{e.exports=["水"]},7147:e=>{e.exports=["水曜日"]},52984:e=>{e.exports=["{description}のリアルタイムデータを入手するには、該当のリアルタイムデータパッケージをご購入ください。"]},9787:e=>{e.exports=["木"]},7951:e=>{e.exports=["木曜日"]},57918:e=>{e.exports=["このデータはリアルタイムですが、一次取引所の公式データとは若干異なります。"]},68025:e=>{e.exports=["このデータはリアルタイムですが、{exchange}の公式データとは若干異なります。"]},73717:e=>{e.exports=["このシンボルは存在しません。別のシンボルを選択して下さい。"]},57048:e=>{e.exports=["お散歩の時間です — 市場はクローズです。"]},94316:e=>{e.exports=["火"]},44979:e=>{e.exports=["火曜日"]},8209:e=>{e.exports=["シンボルのフラグを外す"]},1111:e=>{e.exports=["出来高"]},61311:e=>{e.exports=["ズームイン"]},47602:e=>{e.exports=["ズームアウト"]},57889:e=>{e.exports=["OHLC値の表示の変更"]},18644:e=>{e.exports=["市場ステータスの表示の変更"]},45110:e=>{e.exports=["バーの変動値の表示の変更"]},31325:e=>{e.exports=["インジケーターのタイトルの表示の変更"]},99774:e=>{e.exports=["インジケーターの値の表示の変更"]},96162:e=>{e.exports=["インジケーターの引数の表示の変更"]},26717:e=>{e.exports=["シンボルの詳細の表示の変更"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["出来高の値の表示の変更"]},39348:e=>{e.exports=["1分未満"]},87358:e=>{e.exports=["{title}の表示"]},7827:e=>{e.exports=["{days}と{hours}"]},7435:e=>{e.exports=["{originalExchange}による{exchange}"]},19830:e=>{e.exports=["{hours}{minutes}"]},1084:e=>{e.exports=["登録ユーザーの方は無料で{listedExchange}のリアルタイムデータをご利用頂けます。"]},11155:e=>{e.exports=["{symbolName}のデータは{time}分遅延しています。"]},77033:e=>{e.exports=["市場でより多くの更新がある場合でも、データは{amount}秒に1回だけ更新されます。"]},2121:e=>{e.exports=["無料プランで提供されるデータは、市場でより多くの更新がある場合でも{amount}秒に1回だけ更新されます。"]},5223:e=>{e.exports=["{amount}秒につき1回の更新"]},58609:e=>{e.exports=["{number}日"]},24430:e=>{e.exports=["{number}時間"]},67151:e=>{e.exports=["{number}分"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ko.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/ko.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index be5acc21..00000000 --- a/charting_library/bundles/ko.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports=["바"]},19648:e=>{e.exports=["12시간"]},55838:e=>{e.exports=["24시간"]},88364:e=>{e.exports=["차트 베이직 스타일"]},46720:e=>{e.exports=["십자선"]},50985:e=>{e.exports=["통화"]},17319:e=>{e.exports=["통화 및 단위"]},19481:e=>{e.exports=["모습"]},68791:e=>{e.exports=["인자"]},95036:e=>{e.exports=["애버리지 클로즈 프라이스"]},27331:e=>{e.exports=["배경"]},22519:e=>{e.exports=["바 체인지 밸류"]},87845:e=>{e.exports=["버튼"]},25209:e=>{e.exports=["데이트 포맷"]},55090:e=>{e.exports=["레이블의 요일"]},29601:e=>{e.exports=["설명"]},26897:e=>{e.exports=["이벤트"]},95338:e=>{e.exports=["가로격자선"]},60971:e=>{e.exports=["하이/로우 프라이스"]},61142:e=>{e.exports=["지표"]},34905:e=>{e.exports=["인디케이터 밸류"]},29687:e=>{e.exports=["인디케이터 및 파이낸셜 밸류"]},25084:e=>{e.exports=["인디케이터 및 파이낸셜 네임"]},9654:e=>{e.exports=["인디케이터 네임"]},99487:e=>{e.exports=["시고저종 값"]},75991:e=>{e.exports=["오픈 마켓 스테이터스"]},70500:e=>{e.exports=["머니"]},66653:e=>{e.exports=["마진"]},42502:e=>{e.exports=["오버래핑 없음"]},74343:e=>{e.exports=["네비게이션"]},43115:e=>{e.exports=["눈금"]},53224:e=>{e.exports=["스케일 플레이스먼트"]},79194:e=>{e.exports=["스테이터스 라인"]},89053:e=>{e.exports=["심볼"]},35383:e=>{e.exports=["심볼 이름"]},27767:e=>{e.exports=["심볼 라스트 프라이스"]},40847:e=>{e.exports=["심볼 전일 종가 프라이스"]},50446:e=>{e.exports=["페인"]},73908:e=>{e.exports=["페인 나누개"]},36014:e=>{e.exports=["퍼센트"]},78621:e=>{e.exports=["핍스"]},74823:e=>{e.exports=["프리/포스트 마켓 프라이스"]},64859:e=>{e.exports=["프라이스 스케일"]},76523:e=>{e.exports=["프라이스 및 퍼센트 밸류"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["워터마크"]},67369:e=>{e.exports=["타이틀"]},31326:e=>{e.exports=["제목"]},23097:e=>{e.exports=["티커"]},82168:e=>{e.exports=["티커와 설명"]},43637:e=>{e.exports=["타임 스케일"]},97316:e=>{e.exports=["시간 형식"]},90801:e=>{e.exports=["트레이딩"]},77534:e=>{e.exports=["유닛"]},1111:e=>{e.exports=["거래량"]},80170:e=>{e.exports=["스케일에 따른 밸류"]},91322:e=>{e.exports=["밸류"]},70353:e=>{e.exports=["세로격자선"]},57889:e=>{e.exports=["OHLC 밸류 비저빌리티 바꾸기"]},35646:e=>{e.exports=["내비게이션 버튼 비저빌리티 바꾸기"]},18644:e=>{e.exports=["오픈 마켓 스테이터스 비저빌리티 바꾸기"]},45110:e=>{e.exports=["바 체인지 비저빌리티 바꾸기"]},10349:e=>{e.exports=["바텀 마진 바꾸기"]},88161:e=>{e.exports=["커런시 및 유닛 라벨 비저빌리티를 바꾸십시오"]},79570:e=>{e.exports=["커런시 라벨 비저빌리티 바꾸기"]},99011:e=>{e.exports=["차트 백그라운드 컬러 바꾸기"]},72458:e=>{e.exports=["차트 백그라운드 타입 바꾸기"]},37034:e=>{e.exports=["크로스헤어 너비 바꾸기"]},29951:e=>{e.exports=["크로스헤어 컬러 바꾸기"]},92027:e=>{e.exports=["크로스헤어 스타일 바꾸기"]},50457:e=>{e.exports=["데이트 포맷 변경"]},7104:e=>{e.exports=["레이블의 요일 변경"]},88096:e=>{e.exports=["호리존털 그리드 라인 컬러 바꾸기"]},2523:e=>{e.exports=["호리존털 그리드 라인 스타일 바꾸기"]},31325:e=>{e.exports=["인디케이터 타이틀 비저빌리티 바꾸기"]},99774:e=>{e.exports=["인디케이터 밸류 비저빌리티 바꾸기"]},96162:e=>{e.exports=["인디케이터 아규먼트 비저빌리티 바꾸기"]},59820:e=>{e.exports=["인디케이터 및 파이낸셜 네임 라벨 비저빌리티 바꾸기"]},90512:e=>{e.exports=["인디케이터 및 파이낸셜 밸류 라벨 비저빌리티 바꾸기"]},97956:e=>{e.exports=["설명 배경 투명도 변경"]},61061:e=>{e.exports=["설명 배경 가시성 변경"]},37730:e=>{e.exports=["페인 버튼 비저빌리티 바꾸기"]},89032:e=>{e.exports=["페인 나누개 컬러 바꾸기"]},35636:e=>{e.exports=["오른쪽 마진 바꾸기"]},66601:e=>{e.exports="change right margin percentage"}, -25616:e=>{e.exports=["심볼 워터마크 컬러 바꾸기"]},87159:e=>{e.exports=["심볼 워터마크 비저빌리티 바꾸기"]},26717:e=>{e.exports=["심볼 설명 비저빌리티 바꾸기"]},28741:e=>{e.exports=["심볼 라스트 밸류 모드 바꾸기"]},95071:e=>{e.exports=["종목 설명 포맷 변경"]},35065:e=>{e.exports=["스케일 텍스트 컬러 바꾸기"]},84382:e=>{e.exports=["스케일 폰트 사이즈 바꾸기"]},12468:e=>{e.exports=["스케일 라인 컬러 바꾸기"]},71589:e=>{e.exports=["세션 브레이크 비저빌리티 바꾸기"]},15035:e=>{e.exports=["세션 브레이크 너비 바꾸기"]},1579:e=>{e.exports=["세션 브레이크 컬러 바꾸기"]},21460:e=>{e.exports=["체인지 세션 브레이크 스타일 바꾸기"]},76991:e=>{e.exports=["시간 형식 변경"]},98905:e=>{e.exports=["탑 마진 바꾸기"]},7011:e=>{e.exports=["유닛 라벨 비저빌리티 바꾸기"]},22722:e=>{e.exports=["버티컬 그리드 라인 컬러 바꾸기"]},22867:e=>{e.exports=["버티컬 그리드 라인 스타일 바꾸기"]},9455:e=>{e.exports=["볼륨 비저빌리티 바꾸기"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ko.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/ko.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..be322712 --- /dev/null +++ b/charting_library/bundles/ko.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports=["바"]},19648:e=>{e.exports=["12시간"]},55838:e=>{e.exports=["24시간"]},88364:e=>{e.exports=["차트 베이직 스타일"]},46720:e=>{e.exports=["십자선"]},50985:e=>{e.exports=["통화"]},17319:e=>{e.exports=["통화 및 단위"]},19481:e=>{e.exports=["모습"]},68791:e=>{e.exports=["인자"]},95036:e=>{e.exports=["애버리지 클로즈 프라이스"]},27331:e=>{e.exports=["배경"]},22519:e=>{e.exports=["바 체인지 밸류"]},87845:e=>{e.exports=["버튼"]},25209:e=>{e.exports=["데이트 포맷"]},55090:e=>{e.exports=["레이블의 요일"]},29601:e=>{e.exports=["설명"]},26897:e=>{e.exports=["이벤트"]},95338:e=>{e.exports=["가로격자선"]},60971:e=>{e.exports=["하이/로우 프라이스"]},61142:e=>{e.exports=["지표"]},34905:e=>{e.exports=["인디케이터 밸류"]},29687:e=>{e.exports=["인디케이터 및 파이낸셜 밸류"]},25084:e=>{e.exports=["인디케이터 및 파이낸셜 네임"]},9654:e=>{e.exports=["인디케이터 네임"]},99487:e=>{e.exports=["시고저종 값"]},75991:e=>{e.exports=["오픈 마켓 스테이터스"]},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports=["머니"]},66653:e=>{e.exports=["마진"]},42502:e=>{e.exports=["오버래핑 없음"]},74343:e=>{e.exports=["네비게이션"]},43115:e=>{e.exports=["눈금"]},53224:e=>{e.exports=["스케일 플레이스먼트"]},79194:e=>{e.exports=["스테이터스 라인"]},89053:e=>{e.exports=["심볼"]},35383:e=>{e.exports=["심볼 이름"]},27767:e=>{e.exports=["심볼 라스트 프라이스"]},40847:e=>{e.exports=["심볼 전일 종가 프라이스"]},50446:e=>{e.exports=["페인"]},73908:e=>{e.exports=["페인 나누개"]},36014:e=>{e.exports=["퍼센트"]},78621:e=>{e.exports=["핍스"]},74823:e=>{e.exports=["프리/포스트 마켓 프라이스"]},64859:e=>{e.exports=["프라이스 스케일"]},76523:e=>{e.exports=["프라이스 및 퍼센트 밸류"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["워터마크"]},67369:e=>{e.exports=["타이틀"]},31326:e=>{e.exports=["제목"]},23097:e=>{e.exports=["티커"]},82168:e=>{e.exports=["티커와 설명"]},43637:e=>{e.exports=["타임 스케일"]},97316:e=>{e.exports=["시간 형식"]},90801:e=>{e.exports=["트레이딩"]},77534:e=>{e.exports=["유닛"]},1111:e=>{e.exports=["거래량"]},80170:e=>{e.exports=["스케일에 따른 밸류"]},91322:e=>{e.exports=["밸류"]},70353:e=>{e.exports=["세로격자선"]},57889:e=>{e.exports=["OHLC 밸류 비저빌리티 바꾸기"]},35646:e=>{e.exports=["내비게이션 버튼 비저빌리티 바꾸기"]},18644:e=>{e.exports=["오픈 마켓 스테이터스 비저빌리티 바꾸기"]},45110:e=>{e.exports=["바 체인지 비저빌리티 바꾸기"]},10349:e=>{e.exports=["바텀 마진 바꾸기"]},88161:e=>{e.exports=["커런시 및 유닛 라벨 비저빌리티를 바꾸십시오"]},79570:e=>{e.exports=["커런시 라벨 비저빌리티 바꾸기"]},99011:e=>{e.exports=["차트 백그라운드 컬러 바꾸기"]},72458:e=>{e.exports=["차트 백그라운드 타입 바꾸기"]},37034:e=>{e.exports=["크로스헤어 너비 바꾸기"]},29951:e=>{e.exports=["크로스헤어 컬러 바꾸기"]},92027:e=>{e.exports=["크로스헤어 스타일 바꾸기"]},50457:e=>{e.exports=["데이트 포맷 변경"]},7104:e=>{e.exports=["레이블의 요일 변경"]},88096:e=>{e.exports=["호리존털 그리드 라인 컬러 바꾸기"]},2523:e=>{e.exports=["호리존털 그리드 라인 스타일 바꾸기"]},31325:e=>{e.exports=["인디케이터 타이틀 비저빌리티 바꾸기"]},99774:e=>{e.exports=["인디케이터 밸류 비저빌리티 바꾸기"]},96162:e=>{e.exports=["인디케이터 아규먼트 비저빌리티 바꾸기"]},59820:e=>{e.exports=["인디케이터 및 파이낸셜 네임 라벨 비저빌리티 바꾸기"]},90512:e=>{e.exports=["인디케이터 및 파이낸셜 밸류 라벨 비저빌리티 바꾸기"]},97956:e=>{e.exports=["설명 배경 투명도 변경"]},61061:e=>{e.exports=["설명 배경 가시성 변경"]},37730:e=>{e.exports=["페인 버튼 비저빌리티 바꾸기"]},89032:e=>{e.exports=["페인 나누개 컬러 바꾸기"]},35636:e=>{e.exports=["오른쪽 마진 바꾸기"]},66601:e=>{ +e.exports="change right margin percentage"},25616:e=>{e.exports=["심볼 워터마크 컬러 바꾸기"]},87159:e=>{e.exports=["심볼 워터마크 비저빌리티 바꾸기"]},26717:e=>{e.exports=["심볼 설명 비저빌리티 바꾸기"]},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports=["심볼 라스트 밸류 모드 바꾸기"]},95071:e=>{e.exports=["종목 설명 포맷 변경"]},35065:e=>{e.exports=["스케일 텍스트 컬러 바꾸기"]},84382:e=>{e.exports=["스케일 폰트 사이즈 바꾸기"]},12468:e=>{e.exports=["스케일 라인 컬러 바꾸기"]},71589:e=>{e.exports=["세션 브레이크 비저빌리티 바꾸기"]},15035:e=>{e.exports=["세션 브레이크 너비 바꾸기"]},1579:e=>{e.exports=["세션 브레이크 컬러 바꾸기"]},21460:e=>{e.exports=["체인지 세션 브레이크 스타일 바꾸기"]},76991:e=>{e.exports=["시간 형식 변경"]},98905:e=>{e.exports=["탑 마진 바꾸기"]},7011:e=>{e.exports=["유닛 라벨 비저빌리티 바꾸기"]},22722:e=>{e.exports=["버티컬 그리드 라인 컬러 바꾸기"]},22867:e=>{e.exports=["버티컬 그리드 라인 스타일 바꾸기"]},9455:e=>{e.exports=["볼륨 비저빌리티 바꾸기"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ko.6847.490ee46270bef6a878dd.js b/charting_library/bundles/ko.7257.089fbbc28bead9558b87.js similarity index 55% rename from charting_library/bundles/ko.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/ko.7257.089fbbc28bead9558b87.js index fb931ab7..55dfe25a 100644 --- a/charting_library/bundles/ko.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/ko.7257.089fbbc28bead9558b87.js @@ -1,2 +1,2 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports=["금"]},11268:e=>{e.exports=["월"]},63331:e=>{e.exports=["토"]},85954:e=>{e.exports=["일"]},26230:e=>{e.exports=["수"]},24793:e=>{e.exports=["목"]},31533:e=>{e.exports=["화"]},89790:e=>{e.exports=["Pine 소스 코드는 구할 수 없음."]},39589:e=>{e.exports=["페인 접기"]},38154:e=>{e.exports=["스터디트리 지우기 확인"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["프리 어카운트 만들기"]},69419:e=>{e.exports=["모두 다 좋습니다 — 마켓이 오픈되었습니다."]},97637:e=>{e.exports=["4월"]},86797:e=>{e.exports=["8월"]},22519:e=>{e.exports=["바 체인지 밸류"]},52003:e=>{e.exports=["스터디 및 그 자식들 모두 지우시겠습니까?"]},68854:e=>{e.exports=["더블 클릭"]},97325:e=>{e.exports=["데이터 문제"]},52916:e=>{e.exports=["데이터는 하루에 한번 업데이트됩니다."]},25978:e=>{e.exports=["데이터는 초당 한번씩만 업데이트됩니다."]},57310:e=>{e.exports=["딜레이 데이터입니다"]},49321:e=>{e.exports=["베이직 플랜 데이터는 초당 한번씩만 업데이트됩니다."]},55669:e=>{e.exports=["12월"]},83498:e=>{e.exports=["페인 지우기"]},59315:e=>{e.exports=["종가 데이터"]},82751:e=>{e.exports=["에러"]},40519:e=>{e.exports=["저녁. 포스트 마켓 트레이딩만 열려 있습니다."]},80227:e=>{e.exports=["거래소 시간대"]},16467:e=>{e.exports=["2월"]},25046:e=>{e.exports=["익스체인지 어그리먼트를 채우십시오"]},93666:e=>{e.exports=["플래그 심볼"]},564:e=>{e.exports=["금"]},72970:e=>{e.exports=["금요일"]},88958:e=>{e.exports=["할리데이"]},21686:e=>{e.exports=["인디케이터 레전드 숨기기"]},26935:e=>{e.exports=["지표인자"]},26315:e=>{e.exports=["지표이름"]},84098:e=>{e.exports=["지표값"]},91459:e=>{e.exports=["{listedExchange} 리얼타임 데이터를 받고 싶다면 익스체인지 어그리먼트를 채워야 합니다. 클릭 두어번이면 됩니다."]},50634:e=>{e.exports=["{remainingTime} 뒤에는 포스트-마켓 트레이딩으로 갑니다."]},74537:e=>{e.exports=["{remainingTime} 뒤에는 프리-마켓 트레이딩이 열립니다."]},26910:e=>{e.exports=["1월"]},23230:e=>{e.exports=["7월"]},49385:e=>{e.exports=["6월"]},99487:e=>{e.exports=["시고저종 값"]},15815:e=>{e.exports=["초당 한번 업데이트"]},90784:e=>{e.exports=["10월"]},75991:e=>{e.exports=["오픈 마켓 스테이터스"]},18429:e=>{e.exports=["자세히 보기"]},39899:e=>{e.exports=["페인 아래로"]},70343:e=>{e.exports=["페인 위로"]},83085:e=>{e.exports=["월"]},61199:e=>{e.exports=["월요일"]},41610:e=>{e.exports=["더보기"]},1653:e=>{e.exports=["아침. 프리 마켓 트레이딩만 열려 있습니다."]},56470:e=>{e.exports=["차트 최대화"]},19603:e=>{e.exports=["페인 최대화"]},68327:e=>{e.exports=["5월"]},35732:e=>{e.exports=["페인 관리"]},84675:e=>{e.exports=["3월"]},83949:e=>{e.exports=["마켓 오픈"]},35701:e=>{e.exports=["{remainingTime} 뒤에 마켓이 열립니다."]},95814:e=>{e.exports=["마켓 클로즈드"]},98105:e=>{e.exports=["{remainingTime} 뒤에 마켓이 닫힙니다."]},87202:e=>{e.exports=["마켓이 현재 휴일입니다. 운이 좋네요."]},71194:e=>{e.exports=["11월"]},66324:e=>{e.exports=["소스코드"]},36835:e=>{e.exports=["토"]},1144:e=>{e.exports=["토요일"]},40653:e=>{e.exports=["왼쪽으로 스크롤"]},26721:e=>{e.exports=["가장 최근 막대로 스크롤"]},35809:e=>{e.exports=["오른쪽으로 스크롤"]},61132:e=>{e.exports=["9월"]},28705:e=>{e.exports=["인디케이터 레전드 보이기"]},51072:e=>{e.exports=["오브젝트 트리 보기"]},37809:e=>{e.exports=["간격 설정 표시"]},39045:e=>{e.exports=["스터디 에러"]},86577:e=>{e.exports=["일"]},72149:e=>{e.exports=["일요일"]},39339:e=>{e.exports=["심볼 타이틀"]},29985:e=>{e.exports=["포스트 마켓"]},28412:e=>{e.exports=["유료 플랜은 데이터 업데이트가 더욱 더 빠릅니다."]},56042:e=>{e.exports=["프리 마켓"]},36015:e=>{ -e.exports=["{description} 리얼타임 데이터는 현재는 지원되지 않습니다. 나중에 지원될 수 있습니다."]},6667:e=>{e.exports=["{symbolName} 리얼타임 데이터는 {exchange} 에서 제공합니다."]},48293:e=>{e.exports=["차트 원래대로"]},91029:e=>{e.exports=["페인 원래대로"]},75094:e=>{e.exports=["수"]},7147:e=>{e.exports=["수요일"]},52984:e=>{e.exports=["{description} 리얼타임 데이터를 받으려면 리얼타임 데이터 패키지를 사도록 하십시오."]},9787:e=>{e.exports=["목"]},7951:e=>{e.exports=["목요일"]},57918:e=>{e.exports=["실시간 데이터이지만 공식 거래소의 데이터와는 조금 다릅니다."]},68025:e=>{e.exports=["이 데이터는 실시간이지만, {exchange}의 공식 데이터와는 약간 다릅니다."]},73717:e=>{e.exports=["그런 심볼은 없습니다. 다른 심볼을 고르십시오."]},57048:e=>{e.exports=["산책시간입니다 — 이 마켓은 클로즈되었습니다"]},94316:e=>{e.exports=["화"]},44979:e=>{e.exports=["화요일"]},8209:e=>{e.exports=["언플래그 심볼"]},1111:e=>{e.exports=["거래량"]},61311:e=>{e.exports=["크게보기"]},47602:e=>{e.exports=["작게보기"]},57889:e=>{e.exports=["OHLC 밸류 비저빌리티 바꾸기"]},18644:e=>{e.exports=["오픈 마켓 스테이터스 비저빌리티 바꾸기"]},45110:e=>{e.exports=["바 체인지 비저빌리티 바꾸기"]},31325:e=>{e.exports=["인디케이터 타이틀 비저빌리티 바꾸기"]},99774:e=>{e.exports=["인디케이터 밸류 비저빌리티 바꾸기"]},96162:e=>{e.exports=["인디케이터 아규먼트 비저빌리티 바꾸기"]},26717:e=>{e.exports=["심볼 설명 비저빌리티 바꾸기"]},9455:e=>{e.exports=["볼륨 비저빌리티 바꾸기"]},39348:e=>{e.exports=["1분 미만"]},87358:e=>{e.exports=["{title} 보이기"]},7827:e=>{e.exports=["{days}와 {hours}"]},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports=["{hours}와 {minutes}"]},1084:e=>{e.exports=["등록 유저는 {listedExchange} 리얼타임 데이터를 무료로 쓸 수 있습니다."]},11155:e=>{e.exports=["{symbolName} 데이터는 {time}분 지연입니다."]},77033:e=>{e.exports=["시장에 더 많은 업데이트가 있더라도 {amount}초마다 데이터가 업데이트됩니다."]},2121:e=>{e.exports=["시장에 더 많은 업데이트가 있더라도, 기본 플랜의 데이터는 {amount}초마다 한 번씩 업데이트됩니다."]},5223:e=>{e.exports=["{amount}초마다 업데이트 1회"]},58609:e=>{e.exports=["{number} 날"]},24430:e=>{e.exports=["{number} 시간"]},67151:e=>{e.exports=["{number} 분"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports=["금"]},11268:e=>{e.exports=["월"]},63331:e=>{e.exports=["토"]},85954:e=>{e.exports=["일"]},26230:e=>{e.exports=["수"]},24793:e=>{e.exports=["목"]},31533:e=>{e.exports=["화"]},89790:e=>{e.exports=["Pine 소스 코드는 구할 수 없음."]},39589:e=>{e.exports=["페인 접기"]},38154:e=>{e.exports=["스터디트리 지우기 확인"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["프리 어카운트 만들기"]},69419:e=>{e.exports=["모두 다 좋습니다 — 마켓이 오픈되었습니다."]},97637:e=>{e.exports=["4월"]},86797:e=>{e.exports=["8월"]},22519:e=>{e.exports=["바 체인지 밸류"]},52003:e=>{e.exports=["스터디 및 그 자식들 모두 지우시겠습니까?"]},68854:e=>{e.exports=["더블 클릭"]},97325:e=>{e.exports=["데이터 문제"]},52916:e=>{e.exports=["데이터는 하루에 한번 업데이트됩니다."]},25978:e=>{e.exports=["데이터는 초당 한번씩만 업데이트됩니다."]},57310:e=>{e.exports=["딜레이 데이터입니다"]},49321:e=>{e.exports=["베이직 플랜 데이터는 초당 한번씩만 업데이트됩니다."]},55669:e=>{e.exports=["12월"]},83498:e=>{e.exports=["페인 지우기"]},59315:e=>{e.exports=["종가 데이터"]},82751:e=>{e.exports=["에러"]},40519:e=>{e.exports=["저녁. 포스트 마켓 트레이딩만 열려 있습니다."]},80227:e=>{e.exports=["거래소 시간대"]},16467:e=>{e.exports=["2월"]},25046:e=>{e.exports=["익스체인지 어그리먼트를 채우십시오"]},93666:e=>{e.exports=["플래그 심볼"]},564:e=>{e.exports=["금"]},72970:e=>{e.exports=["금요일"]},88958:e=>{e.exports=["할리데이"]},21686:e=>{e.exports=["인디케이터 레전드 숨기기"]},26935:e=>{e.exports=["지표인자"]},26315:e=>{e.exports=["지표이름"]},84098:e=>{e.exports=["지표값"]},91459:e=>{e.exports=["{listedExchange} 리얼타임 데이터를 받고 싶다면 익스체인지 어그리먼트를 채워야 합니다. 클릭 두어번이면 됩니다."]},50634:e=>{e.exports=["{remainingTime} 뒤에는 포스트-마켓 트레이딩으로 갑니다."]},74537:e=>{e.exports=["{remainingTime} 뒤에는 프리-마켓 트레이딩이 열립니다."]},26910:e=>{e.exports=["1월"]},23230:e=>{e.exports=["7월"]},49385:e=>{e.exports=["6월"]},99487:e=>{e.exports=["시고저종 값"]},15815:e=>{e.exports=["초당 한번 업데이트"]},90784:e=>{e.exports=["10월"]},75991:e=>{e.exports=["오픈 마켓 스테이터스"]},18429:e=>{e.exports=["자세히 보기"]},39899:e=>{e.exports=["페인 아래로"]},70343:e=>{e.exports=["페인 위로"]},83085:e=>{e.exports=["월"]},61199:e=>{e.exports=["월요일"]},41610:e=>{e.exports=["더보기"]},1653:e=>{e.exports=["아침. 프리 마켓 트레이딩만 열려 있습니다."]},56470:e=>{e.exports=["차트 최대화"]},19603:e=>{e.exports=["페인 최대화"]},68327:e=>{e.exports=["5월"]},35732:e=>{e.exports=["페인 관리"]},84675:e=>{e.exports=["3월"]},83949:e=>{e.exports=["마켓 오픈"]},35701:e=>{e.exports=["{remainingTime} 뒤에 마켓이 열립니다."]},95814:e=>{e.exports=["마켓 클로즈드"]},98105:e=>{e.exports=["{remainingTime} 뒤에 마켓이 닫힙니다."]},87202:e=>{e.exports=["마켓이 현재 휴일입니다. 운이 좋네요."]},71194:e=>{e.exports=["11월"]},66324:e=>{e.exports=["소스코드"]},36835:e=>{e.exports=["토"]},1144:e=>{e.exports=["토요일"]},40653:e=>{e.exports=["왼쪽으로 스크롤"]},26721:e=>{e.exports=["가장 최근 막대로 스크롤"]},35809:e=>{e.exports=["오른쪽으로 스크롤"]},61132:e=>{e.exports=["9월"]},28705:e=>{e.exports=["인디케이터 레전드 보이기"]},51072:e=>{e.exports=["오브젝트 트리 보기"]},37809:e=>{e.exports=["간격 설정 표시"]},39045:e=>{e.exports=["스터디 에러"]},86577:e=>{e.exports=["일"]},72149:e=>{e.exports=["일요일"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["심볼 타이틀"]},29985:e=>{e.exports=["포스트 마켓"]},28412:e=>{e.exports=["유료 플랜은 데이터 업데이트가 더욱 더 빠릅니다."]},56042:e=>{ +e.exports=["프리 마켓"]},36015:e=>{e.exports=["{description} 리얼타임 데이터는 현재는 지원되지 않습니다. 나중에 지원될 수 있습니다."]},6667:e=>{e.exports=["{symbolName} 리얼타임 데이터는 {exchange} 에서 제공합니다."]},48293:e=>{e.exports=["차트 원래대로"]},91029:e=>{e.exports=["페인 원래대로"]},75094:e=>{e.exports=["수"]},7147:e=>{e.exports=["수요일"]},52984:e=>{e.exports=["{description} 리얼타임 데이터를 받으려면 리얼타임 데이터 패키지를 사도록 하십시오."]},9787:e=>{e.exports=["목"]},7951:e=>{e.exports=["목요일"]},57918:e=>{e.exports=["실시간 데이터이지만 공식 거래소의 데이터와는 조금 다릅니다."]},68025:e=>{e.exports=["이 데이터는 실시간이지만, {exchange}의 공식 데이터와는 약간 다릅니다."]},73717:e=>{e.exports=["그런 심볼은 없습니다. 다른 심볼을 고르십시오."]},57048:e=>{e.exports=["산책시간입니다 — 이 마켓은 클로즈되었습니다"]},94316:e=>{e.exports=["화"]},44979:e=>{e.exports=["화요일"]},8209:e=>{e.exports=["언플래그 심볼"]},1111:e=>{e.exports=["거래량"]},61311:e=>{e.exports=["크게보기"]},47602:e=>{e.exports=["작게보기"]},57889:e=>{e.exports=["OHLC 밸류 비저빌리티 바꾸기"]},18644:e=>{e.exports=["오픈 마켓 스테이터스 비저빌리티 바꾸기"]},45110:e=>{e.exports=["바 체인지 비저빌리티 바꾸기"]},31325:e=>{e.exports=["인디케이터 타이틀 비저빌리티 바꾸기"]},99774:e=>{e.exports=["인디케이터 밸류 비저빌리티 바꾸기"]},96162:e=>{e.exports=["인디케이터 아규먼트 비저빌리티 바꾸기"]},26717:e=>{e.exports=["심볼 설명 비저빌리티 바꾸기"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["볼륨 비저빌리티 바꾸기"]},39348:e=>{e.exports=["1분 미만"]},87358:e=>{e.exports=["{title} 보이기"]},7827:e=>{e.exports=["{days}와 {hours}"]},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports=["{hours}와 {minutes}"]},1084:e=>{e.exports=["등록 유저는 {listedExchange} 리얼타임 데이터를 무료로 쓸 수 있습니다."]},11155:e=>{e.exports=["{symbolName} 데이터는 {time}분 지연입니다."]},77033:e=>{e.exports=["시장에 더 많은 업데이트가 있더라도 {amount}초마다 데이터가 업데이트됩니다."]},2121:e=>{e.exports=["시장에 더 많은 업데이트가 있더라도, 기본 플랜의 데이터는 {amount}초마다 한 번씩 업데이트됩니다."]},5223:e=>{e.exports=["{amount}초마다 업데이트 1회"]},58609:e=>{e.exports=["{number} 날"]},24430:e=>{e.exports=["{number} 시간"]},67151:e=>{e.exports=["{number} 분"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/library.1ac08da24621d68cbd6c.js b/charting_library/bundles/library.43f252de058d7eb0de8d.js similarity index 62% rename from charting_library/bundles/library.1ac08da24621d68cbd6c.js rename to charting_library/bundles/library.43f252de058d7eb0de8d.js index 94520c23..9d756e3e 100644 --- a/charting_library/bundles/library.1ac08da24621d68cbd6c.js +++ b/charting_library/bundles/library.43f252de058d7eb0de8d.js @@ -3,12 +3,12 @@ isAnyMobile:()=>S});const s="undefined"!=typeof window&&"undefined"!=typeof navigator,r=s&&"ontouchstart"in window,n=s&&r&&"onorientationchange"in window,o=s&&(r||!!navigator.maxTouchPoints),a=s&&window.chrome&&window.chrome.runtime,l=s&&window.navigator.userAgent.toLowerCase().indexOf("firefox")>-1,c=s&&/\sEdge\/\d\d\b/.test(navigator.userAgent),h=s&&Boolean(navigator.vendor)&&navigator.vendor.indexOf("Apple")>-1&&-1===navigator.userAgent.indexOf("CriOS")&&-1===navigator.userAgent.indexOf("FxiOS"),d=s&&/mac/i.test(navigator.platform),u=s&&/Win32|Win64/i.test(navigator.platform),p=s&&/Linux/i.test(navigator.platform),_=s&&/Android/i.test(navigator.userAgent),m=s&&/BlackBerry/i.test(navigator.userAgent),g=s&&/iPhone|iPad|iPod/.test(navigator.platform),f=s&&/Opera Mini/i.test(navigator.userAgent),v=s&&("MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/iPad/.test(navigator.platform)),S=_||m||g||f},7394:(e,t,i)=>{"use strict";i.r(t),i.d(t,{colorsPalette:()=>d,getHexColorByName:()=>u}) ;const s=JSON.parse('{"color-white":"#ffffff","color-black":"#000000","color-cold-gray-50":"#F8F9FD","color-cold-gray-100":"#F0F3FA","color-cold-gray-150":"#E0E3EB","color-cold-gray-200":"#D1D4DC","color-cold-gray-250":"#C1C4CD","color-cold-gray-300":"#B2B5BE","color-cold-gray-350":"#A3A6AF","color-cold-gray-400":"#9598A1","color-cold-gray-450":"#868993","color-cold-gray-500":"#787B86","color-cold-gray-550":"#6A6D78","color-cold-gray-600":"#5D606B","color-cold-gray-650":"#50535E","color-cold-gray-700":"#434651","color-cold-gray-750":"#363A45","color-cold-gray-800":"#2A2E39","color-cold-gray-850":"#1E222D","color-cold-gray-900":"#131722","color-cold-gray-950":"#0C0E15","color-ripe-red-50":"#FFEBEC","color-ripe-red-100":"#FCCBCD","color-ripe-red-200":"#FAA1A4","color-ripe-red-300":"#F77C80","color-ripe-red-400":"#F7525F","color-ripe-red-500":"#F23645","color-ripe-red-600":"#CC2F3C","color-ripe-red-700":"#B22833","color-ripe-red-800":"#991F29","color-ripe-red-900":"#801922","color-ripe-red-a100":"#FF8080","color-ripe-red-a200":"#FF5252","color-ripe-red-a400":"#FF3333","color-ripe-red-a600":"#CC2929","color-ripe-red-a700":"#802028","color-ripe-red-a800":"#4D191D","color-ripe-red-a900":"#331F20","color-tan-orange-50":"#FFF3E0","color-tan-orange-100":"#FFE0B2","color-tan-orange-200":"#FFCC80","color-tan-orange-300":"#ffb74d","color-tan-orange-400":"#FFA726","color-tan-orange-500":"#FF9800","color-tan-orange-600":"#FB8C00","color-tan-orange-700":"#F57C00","color-tan-orange-800":"#EF6C00","color-tan-orange-900":"#e65100","color-tan-orange-a200":"#ffab40","color-tan-orange-a400":"#FF9100","color-tan-orange-a600":"#CC7014","color-tan-orange-a700":"#8C541C","color-tan-orange-a800":"#593A1B","color-tan-orange-a900":"#33261A","color-iguana-green-100":"#C8E6C9","color-iguana-green-200":"#A5D6A7","color-iguana-green-300":"#81c784","color-iguana-green-400":"#66BB6A","color-iguana-green-500":"#4caf50","color-iguana-green-600":"#43a047","color-iguana-green-700":"#388e3c","color-iguana-green-800":"#2E7D32","color-iguana-green-900":"#1B5E20","color-iguana-green-a700":"#00c853","color-banana-yellow-100":"#FFF9C4","color-banana-yellow-200":"#FFF59D","color-banana-yellow-300":"#FFF176","color-banana-yellow-400":"#ffee58","color-banana-yellow-500":"#ffeb3b","color-banana-yellow-600":"#fdd835","color-banana-yellow-700":"#fbc02d","color-banana-yellow-800":"#f9a825","color-banana-yellow-900":"#F57F17","color-banana-yellow-a400":"#ffea00","color-banana-yellow-a700":"#ffd600","color-tv-blue-50":"#E3EFFD","color-tv-blue-100":"#BBD9FB","color-tv-blue-200":"#90BFF9","color-tv-blue-300":"#5B9CF6","color-tv-blue-400":"#3179F5","color-tv-blue-500":"#2962FF","color-tv-blue-600":"#1E53E5","color-tv-blue-700":"#1848CC","color-tv-blue-800":"#143EB3","color-tv-blue-900":"#0C3299","color-tv-blue-a100":"#82b1ff","color-tv-blue-a200":"#448aff","color-tv-blue-a400":"#2979ff","color-tv-blue-a600":"#2962FF","color-tv-blue-a700":"#143A87","color-tv-blue-a800":"#142E61","color-tv-blue-a900":"#132042","color-deep-blue-100":"#D1C4E9","color-deep-blue-200":"#B39DDB","color-deep-blue-300":"#9575cd","color-deep-blue-400":"#7e57c2","color-deep-blue-500":"#673ab7","color-deep-blue-700":"#512da8","color-deep-blue-800":"#4527A0","color-deep-blue-900":"#311B92","color-deep-blue-a100":"#b388ff","color-deep-blue-a200":"#7C4DFF","color-deep-blue-a400":"#651FFF","color-deep-blue-a700":"#6200EA","color-minty-green-50":"#DAF2EE","color-minty-green-100":"#ACE5DC","color-minty-green-200":"#70CCBD","color-minty-green-300":"#42BDA8","color-minty-green-400":"#22AB94","color-minty-green-500":"#089981","color-minty-green-600":"#06806B","color-minty-green-700":"#056656","color-minty-green-800":"#004D40","color-minty-green-900":"#00332A","color-minty-green-a400":"#2BD9BC","color-minty-green-a700":"#24B29B","color-minty-green-a900":"#082621","color-grapes-purple-50":"#F3E5F5","color-grapes-purple-100":"#E1BEE7","color-grapes-purple-200":"#CE93D8","color-grapes-purple-300":"#ba68c8","color-grapes-purple-400":"#ab47bc","color-grapes-purple-500":"#9c27b0","color-grapes-purple-600":"#8e24aa","color-grapes-purple-700":"#7b1fa2","color-grapes-purple-800":"#6A1B9A","color-grapes-purple-900":"#4A148C","color-grapes-purple-a200":"#E040FB","color-grapes-purple-a400":"#D500F9","color-grapes-purple-a700":"#aa00ff","color-berry-pink-100":"#F8BBD0","color-berry-pink-200":"#f48fb1","color-berry-pink-300":"#f06292","color-berry-pink-400":"#ec407a","color-berry-pink-500":"#e91e63","color-berry-pink-600":"#D81B60","color-berry-pink-700":"#C2185B","color-berry-pink-800":"#AD1457","color-berry-pink-900":"#880E4F","color-berry-pink-a100":"#ff80ab","color-berry-pink-a200":"#ff4081","color-berry-pink-a400":"#f50057","color-sky-blue-100":"#B2EBF2","color-sky-blue-200":"#80DEEA","color-sky-blue-300":"#4dd0e1","color-sky-blue-400":"#26c6da","color-sky-blue-500":"#00bcd4","color-sky-blue-600":"#00acc1","color-sky-blue-700":"#0097A7","color-sky-blue-800":"#00838F","color-sky-blue-900":"#006064","color-sky-blue-a400":"#00e5ff","color-sky-blue-a700":"#00B8D4","color-deep-blue-600":"#5E35B1","color-forest-green-50":"#DAF2E6","color-forest-green-100":"#ACE5C9","color-forest-green-200":"#70CC9E","color-forest-green-300":"#42BD7F","color-forest-green-400":"#22AB67","color-forest-green-500":"#089950","color-forest-green-600":"#068043","color-forest-green-700":"#056636","color-forest-green-800":"#004D27","color-forest-green-900":"#1A3326","color-facebook":"#1877F2","color-deep-facebook":"#1564CA","color-twitter":"#1DA1F2","color-deep-twitter":"#188CD3","color-youtube":"#FF0000","color-linkedin":"#007BB5","color-aqua-spring":"#ebf9f5","color-army-green":"#3d2c12","color-army-green-2":"#31230d","color-athens-gray-1":"#f2f3f5","color-athens-gray-2":"#f7f8fa","color-athens-gray-3":"#eceff2","color-black-180":"#b4b4b4","color-blue-dianne":"#21384d","color-bluish":"#2185cc","color-bright-gray":"#363c4e","color-brownish-grey":"#8d6e63","color-carnation":"#f04561","color-catskill-white":"#e1ecf2","color-charade":"#2f3241","color-charcoal-grey":"#323337","color-curious-blue":"#299dcd","color-dark-blue-grey":"#123440","color-darkness-blue-grey":"#12213b","color-dark-grey":"#292a2d","color-dark-grey-blue":"#28415a","color-dark-sky-blue":"#37a6ef","color-deep-sea-blue":"#016087","color-ebony-clay":"#262b3e","color-foam":"#d7f0fb","color-gull-gray":"#9db2bd","color-humming-bird":"#d3eef9","color-keppel-1":"#37bc9b","color-keppel-2":"#34b293","color-lavender-blush":"#ffedf0","color-lightish-purple":"#a75ee8","color-loblolly":"#c5cbce","color-manatee":"#878ca8","color-mandy":"#eb4d5c","color-medium-blue":"#2e7bb2","color-milk-chocolate":"#6f2626","color-mirage-1":"#131722","color-mirage-2":"#171b29","color-mirage-3":"#1c2030","color-mischka":"#d6d8e0","color-morning-glory":"#9addcc","color-oslo-gray":"#8b8e95","color-pale":"#fff2cf","color-pale-grey-1":"#f9fafb","color-pale-grey-2":"#e7ebee","color-pale-sky":"#6b7988","color-picton-blue-1":"#3bb3e4","color-puerto-rico":"#3bc2a1","color-purple-brown":"#4e2934","color-purple-brown-2":"#3d2028","color-radical-red":"#ff4a68","color-regent-gray":"#8797a5","color-scooter":"#38acdb","color-silver-tree":"#53b987","color-slate-gray":"#758696","color-sundown":"#ffa4b3","color-sunglow":"#ffca3b","color-tan-hide":"#ff9850","color-trout-1":"#4c525e","color-trout-2":"#4f5966","color-violet-1":"#332738","color-violet-2":"#271d2b","color-white-ice":"#ebf7fc","color-wild-watermelon":"#ff5773","color-readonly-input":"#b4b4b4","color-brand-dark":"#2a2c39","color-seeking-alpha-brand":"#ff7200"}'),r=JSON.parse('{"color-header-bg":"color-white","color-body-bg":"color-white","color-body-secondary-bg":"color-cold-gray-100","color-bg-primary":"color-white","color-bg-primary-hover":"color-cold-gray-100","color-bg-secondary":"color-white","color-bg-highlight":"color-cold-gray-50","color-bg-scroll-buttons":"color-cold-gray-100","color-legacy-bg-scroll-buttons":"color-cold-gray-850","color-legacy-bg-widget":"color-white","color-text-primary":"color-cold-gray-900","color-text-secondary":"color-cold-gray-550","color-text-tertiary":"color-cold-gray-400","color-text-disabled":"color-cold-gray-300","color-accent-content":"color-cold-gray-900","color-box-shadow":"color-cold-gray-300","color-divider":"color-cold-gray-150","color-divider-hover":"color-cold-gray-100","color-divider-secondary":"color-cold-gray-100","color-active-hover-text":"color-cold-gray-900","color-alert-text":"color-cold-gray-900","color-border-table":"color-cold-gray-100","color-brand":"color-tv-blue-500","color-brand-active":"color-tv-blue-700","color-brand-hover":"color-tv-blue-600","color-chart-page-bg":"color-cold-gray-150","color-common-tooltip-bg":"color-cold-gray-800","color-danger":"color-ripe-red-400","color-danger-hover":"color-ripe-red-500","color-danger-active":"color-ripe-red-600","color-depthrenderer-stroke-style":"color-cold-gray-100","color-highlight-new":"color-tan-orange-50","color-input-bg":"color-white","color-input-publish-bg":"color-white","color-link":"color-tv-blue-500","color-link-hover":"color-tv-blue-600","color-link-active":"color-tv-blue-700","color-list-nth-child-bg":"color-cold-gray-50","color-pane-bg":"color-white","color-pane-secondary-bg":"color-cold-gray-100","color-popup-menu-item-hover-bg":"color-cold-gray-100","color-popup-menu-separator":"color-cold-gray-150","color-screener-description":"color-cold-gray-650","color-success":"color-minty-green-500","color-success-hover":"color-minty-green-600","color-success-active":"color-minty-green-700","color-toolbar-button-text":"color-cold-gray-900","color-toolbar-button-text-hover":"color-cold-gray-900","color-toolbar-button-text-active":"color-tv-blue-500","color-toolbar-button-text-active-hover":"color-tv-blue-600","color-toolbar-button-background-hover":"color-cold-gray-100","color-toolbar-button-background-secondary-hover":"color-cold-gray-150","color-toolbar-button-background-active":"color-tv-blue-50","color-toolbar-button-background-active-hover":"color-tv-blue-100","color-toolbar-toggle-button-background-active":"color-tv-blue-500","color-toolbar-toggle-button-background-active-hover":"color-tv-blue-600","color-toolbar-toggle-button-icon":"color-cold-gray-200","color-toolbar-interactive-element-text-normal":"color-cold-gray-900","color-toolbar-interactive-element-text-hover":"color-cold-gray-900","color-toolbar-opened-element-bg":"color-cold-gray-100","color-toolbar-divider-background":"color-cold-gray-150","color-tooltip-bg":"color-cold-gray-800","color-tv-dialog-caption":"color-cold-gray-650","color-tv-dropdown-item-hover-bg":"color-cold-gray-100","color-underlined-text":"color-cold-gray-500","color-widget-pages-bg":"color-white","color-warning":"color-tan-orange-500","color-growing":"color-minty-green-500","color-falling":"color-ripe-red-500","color-forex-icon":"color-cold-gray-750","color-list-item-active-bg":"color-tv-blue-400","color-list-item-hover-bg":"color-tv-blue-50","color-list-item-text":"color-cold-gray-800","color-price-axis-label-back":"color-cold-gray-150","color-price-axis-label-text":"color-cold-gray-650","color-price-axis-gear":"color-cold-gray-900","color-price-axis-gear-hover":"color-black","color-price-axis-highlight":"color-cold-gray-150","color-bid":"color-tv-blue-500","color-border":"color-cold-gray-150","color-border-chat-fields":"color-cold-gray-250","color-border-hover":"color-cold-gray-250","color-button-hover-bg":"color-cold-gray-150","color-depthrenderer-fill-style":"color-cold-gray-650","color-disabled-border-and-color":"color-cold-gray-150","color-disabled-input":"color-cold-gray-150","color-empty-container-message":"color-cold-gray-550","color-icons":"color-cold-gray-550","color-input-textarea-readonly":"color-cold-gray-650","color-input-placeholder-text":"color-cold-gray-350","color-item-active-blue":"color-tv-blue-50","color-item-hover-active-bg":"color-tv-blue-100","color-item-hover-bg":"color-tv-blue-100","color-item-hover-blue":"color-tv-blue-100","color-item-selected-blue":"color-tv-blue-50","color-item-active-text":"color-white","color-item-active-bg":"color-tv-blue-500","color-list-item":"color-cold-gray-550","color-news-highlight":"color-tv-blue-100","color-placeholder":"color-cold-gray-350","color-row-hover-active-bg":"color-cold-gray-100","color-sb-scrollbar-body-bg":"color-cold-gray-200","color-section-separator-border":"color-cold-gray-300","color-separator-table-chat":"color-cold-gray-150","color-tag-active-bg":"color-cold-gray-200","color-tag-hover-bg":"color-cold-gray-150","color-text-regular":"color-cold-gray-700","color-tv-button-checked":"color-cold-gray-550","color-scroll-bg":"color-cold-gray-400","color-scroll-border":"color-cold-gray-100","color-widget-border":"color-cold-gray-100","color-scroll-buttons-arrow":"color-white","color-control-intent-default":"color-cold-gray-200","color-control-intent-success":"color-minty-green-500","color-control-intent-primary":"color-tv-blue-500","color-control-intent-warning":"color-tan-orange-500","color-control-intent-danger":"color-ripe-red-500","color-goto-label-background":"color-cold-gray-800","color-pre-market":"color-tan-orange-600","color-pre-market-bg":"color-tan-orange-400","color-post-market":"color-tv-blue-500","color-post-market-bg":"color-tv-blue-400","color-market-open":"color-minty-green-500","color-market-open-bg":"color-minty-green-400","color-market-closed":"color-cold-gray-400","color-market-holiday":"color-cold-gray-400","color-market-expired":"color-ripe-red-500","color-invalid-symbol":"color-ripe-red-400","color-invalid-symbol-hover":"color-ripe-red-700","color-replay-mode":"color-tv-blue-500","color-replay-mode-point-select":"color-cold-gray-350","color-replay-mode-icon":"color-white","color-replay-mode-hover":"color-tv-blue-600","color-notaccurate-mode":"color-berry-pink-700","color-notaccurate-mode-bg":"color-berry-pink-400","color-delay-mode":"color-tan-orange-700","color-delay-mode-bg":"color-tan-orange-400","color-eod-mode":"color-grapes-purple-700","color-eod-mode-bg":"color-grapes-purple-400","color-data-problem":"color-ripe-red-600","color-data-problem-bg":"color-ripe-red-400","color-data-problem-hover":"color-ripe-red-700","color-list-item-bg-highlighted":"color-tv-blue-50","color-list-item-bg-selected":"color-tv-blue-100","color-list-item-bg-highlighted-hover":"color-tv-blue-100","color-list-item-bg-selected-hover":"color-tv-blue-200","color-screener-header-bg":"color-white","color-screener-header-bg-hover":"color-cold-gray-100","color-marker-flagged":"color-ripe-red-400","color-marker-flagged-hovered":"color-ripe-red-600","color-ask":"color-ripe-red-400","color-sell":"color-ripe-red-400","color-buy":"color-tv-blue-500","color-neutral":"color-cold-gray-500","color-pro":"color-minty-green-400","color-pro-hover":"color-minty-green-600","color-pro-plus":"color-tv-blue-500","color-pro-plus-hover":"color-tv-blue-600","color-pro-premium":"color-tan-orange-500","color-pro-premium-hover":"color-tan-orange-700","color-trial":"color-cold-gray-500","color-trial-hover":"color-cold-gray-600","color-mod":"color-ripe-red-400","color-mod-hover":"color-ripe-red-600","color-ad":"color-tan-orange-500","color-broker-featured":"color-minty-green-400","color-broker-featured-hover":"color-minty-green-600","color-alert-status-active":"color-minty-green-400","color-alert-status-stopped":"color-ripe-red-500","color-alert-status-triggered":"color-tan-orange-500","color-overlay":"color-cold-gray-400","color-search-button-hover":"color-cold-gray-150","color-boost-button-content-selected":"color-tv-blue-600","color-boost-button-content-hover":"color-cold-gray-900","color-boost-button-bg-hover":"color-cold-gray-150","color-boost-button-border-hover":"color-cold-gray-150","color-boost-button-border-default":"color-cold-gray-150","color-common-tooltip-text":"color-cold-gray-100","color-replay-data-mode":"color-radical-red","color-legacy-success":"color-keppel-1","color-collapse-tabs-border":"color-athens-gray-3","color-site-widget-hover":"color-athens-gray-1","color-attention":"color-sunglow","color-card-border":"color-cold-gray-150","color-card-border-hover":"color-cold-gray-300","color-background-special-primary":"color-white","color-stroke-special-primary":"color-cold-gray-150","color-selection-bg":"color-tv-blue-100"}') ;var n=i(50151);const o={...s,...r},a={},l=Object.keys(o).length,c=/^#[0-9A-F]{6}$/i;function h(e,t=[]){const i=o[e];if(!i)return null;if(c.test(i))return i;const s=i;return t.push(e),-1!==t.indexOf(s)?(console.warn("Colors definitions cycled"),i):t.length>l?(console.warn("Too many variables-link in HEX-color search: "+t[0]),null):h(s,t)}Object.keys(o).forEach((e=>{const t=h(e);a[e]=(0,n.ensureNotNull)(t)}));const d=a;function u(e){const t=d[e];if(!t)throw new Error("No such color "+e);return t}},74991:(e,t,i)=>{"use strict";i.d(t,{dur:()=>s,easingFunc:()=>r,CubicBezier:()=>n});const s=350,r={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e*e:(4-2*e)*e-1,easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1- --e*e*e*e,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-8*--e*e*e*e,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1+--e*e*e*e*e,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e};class n{constructor(e,t,i,s){this._mX1=e,this._mY1=t,this._mX2=i,this._mY2=s}easingFunc(e){return this._mX1===this._mY1&&this._mX2===this._mY2?e:this._calcBezier(this._getTForX(e))}_a(e,t){return 1-3*t+3*e}_b(e,t){return 3*t-6*e}_c(e){return 3*e}_calcBezier(e){return((this._a(this._mY1,this._mY2)*e+this._b(this._mY1,this._mY2))*e+this._c(this._mY1))*e}_getSlope(e){return 3*this._a(this._mX1,this._mX2)*e*e+2*this._b(this._mX1,this._mX2)*e+this._c(this._mX1)}_getTForX(e){let t=e;for(let i=0;i<4;++i){const i=this._getSlope(t);if(0===i)return t;t-=(this._calcBezier(t)-e)/i}return t}}},77317:(e,t,i)=>{"use strict";i.d(t,{setupChartEventHint:()=>d});var s=i(50151),r=i(44352),n=i(56840),o=i(76076),a=i(28667),l=i(49483),c=i(68335),h=i(2484);function d(e,t=!1){if(!h.enabled("popup_hints"))return;const d=e.getContainer();let u=null,p=null;function _(e,t){if(u)u.show(e,g.bind(null,t));else{const s=o.tool.value();Promise.all([i.e(9908),i.e(962),i.e(6166)]).then(i.bind(i,5015)).then((i=>{u=new i.ChartEventHintRenderer(d),s===o.tool.value()&&u.show(e,g.bind(null,t))}))}}function m(e){return!Boolean(n.getBool(e))}function g(e){n.setValue(e,!0,{forceFlush:!0}),(0,s.ensureNotNull)(u).destroy(),null!==p&&p(),u=null}o.tool.subscribe((function(){if(!m("hint.touchPainting"))return;const e=o.tool.value(),t=(0,a.isLineToolDrawWithoutPoints)(e),s=l.CheckMobile.any();!(0,a.isStudyLineToolName)(e)||"LineToolRegressionTrend"===e||t||s?(0,a.isLineToolName)(e)&&!(0,a.isLineDrawnWithPressedButton)(e)&&!t&&s?_(r.t(null,void 0,i(67861)),"hint.touchPainting"):u&&u.hide():_(r.t(null,void 0,i(32234)),"hint.touchPainting")})),o.createdLineTool.subscribe(null,(function(){const e=o.tool.value();"LineToolPath"===e&&m("hint.finishBuildPathByDblClick")?_(r.t(null,void 0,i(5828)),"hint.finishBuildPathByDblClick"):"LineToolPolyline"===e&&m("hint.finishBuildPolylineByDblClick")&&_(r.t(null,void 0,i(63898)),"hint.finishBuildPolylineByDblClick")})),o.finishedLineTool.subscribe(null,(function(){if(u){const e=o.tool.value() -;"LineToolPath"===e?g("hint.finishBuildPathByDblClick"):"LineToolPolyline"===e&&g("hint.finishBuildPolylineByDblClick")}})),e.layoutSizesChanged().subscribe((function(){if(!m("hint.startResizingChartInLayout"))return;_(r.t(null,void 0,i(35273)),"hint.startResizingChartInLayout")})),t||l.CheckMobile.any()||!m("hint.startFocusedZoom")||(p=function(e,t){let i=!1;const s=r=>{r?(i&&t(r),e.onZoom().unsubscribe(null,s)):i||(t(r),i=!0)};return e.onZoom().subscribe(null,s),()=>e.onZoom().unsubscribe(null,s)}(e,(function(e){if(!m("hint.startFocusedZoom"))return;if(e)u&&(p=null,g("hint.startFocusedZoom"));else{const e=c.isMacKeyboard?"⌘":"Ctrl";_(r.t(null,void 0,i(35963)).format({key:e}),"hint.startFocusedZoom")}})))}},81602:(e,t,i)=>{"use strict";i.d(t,{setupChartScreenshotHint:()=>o});var s=i(44352),r=i(76422),n=i(50151);function o(e,t){const o=s.t(null,void 0,i(78104)).format({emoji:"👍"}),a=s.t(null,void 0,i(12011)).format({emoji:"👍"});r.on("onServerScreenshotCopiedToClipboard",(()=>h(o)),null),r.on("onClientScreenshotCopiedToClipboard",(()=>h(a)),null);let l=null;const c=e.getContainer();function h(e){l?l.show(e):Promise.all([i.e(8707),i.e(8887),i.e(962),i.e(92)]).then(i.bind(i,81573)).then((i=>{l||(l=new i.ChartScreenshotHintRenderer((0,n.ensureNotNull)(c),{bottomPadding:t.seriesControlBarEnabled}),l.show(e))}))}}},94194:(e,t,i)=>{"use strict";i.d(t,{getTooltipData:()=>r,setTooltipData:()=>n});const s=new WeakMap;function r(e,t){const i=s.get(e);return i instanceof Function?i(t):i&&i[t]}function n(e,t,i){if(i instanceof Function)return void s.set(e,i);const r=s.get(e),n=void 0===r||r instanceof Function?{}:r;n[t]=i,s.set(e,n)}},61814:(e,t,i)=>{"use strict";i.d(t,{hotKeySerialize:()=>r,hotKeyDeserialize:()=>n});var s=i(11536);function r(e){return(0,s.clean)(JSON.stringify(e))}function n(e){return JSON.parse((0,s.clean)(e,!0))}},38780:(e,t,i)=>{"use strict";i.d(t,{hide:()=>G,show:()=>U,showOnElement:()=>z});var s=i(32563);let r=0,n=0,o=0;function a(){clearTimeout(r),clearTimeout(n),clearTimeout(o)}function l(e,t){r=setTimeout(e,t)}const c="tooltip-root-element";let h;function d(){const e=document.getElementById(c);e?h=e:(h=document.createElement("div"),h.id=c,document.body.appendChild(h))}function u(){h&&(h.innerHTML="")}"interactive"===document.readyState?d():document.addEventListener("DOMContentLoaded",d);var p=i(50151);const _={default:"",white:"theme-white","round-shadow":"theme-round-shadow"},m=Object.keys(_);var g=i(94194),f=i(61814),v=i(66032),S=i(80142),y=(i(93731),i(33933)),b=i(91031),w=i(49483),C=i(1338);function P(e){const t=function(e){const t=e.hasAttribute("data-tooltip")?e.getAttribute("data-tooltip"):e.getAttribute("title");return t&&((0,g.setTooltipData)(e,"text",t),e.removeAttribute("title")),(0,g.getTooltipData)(e,"text")||""}(e),i=e.getBoundingClientRect(),s={h:i.height,w:i.width,x:i.left,y:i.top},r=e.getAttribute("data-color-theme")||"",n=e.classList.contains("common-tooltip-html"),o=parseInt(e.getAttribute("data-tooltip-delay")||""),a=parseInt(e.getAttribute("data-tooltip-debounce")||"");let l={ -type:"none"};return t&&(l={type:n?"html":"text",data:t}),{above:e.classList.contains("common-tooltip-above"),below:e.classList.contains("common-tooltip-below"),otl:e.classList.contains("common-tooltip-otl"),otr:e.classList.contains("common-tooltip-otr"),vertical:e.classList.contains("common-tooltip-vertical"),hotkey:e.getAttribute("data-tooltip-hotkey"),narrow:e.classList.contains("common-tooltip-narrow"),wide:e.classList.contains("common-tooltip-wide"),colorTheme:r,tooltipDelay:o,tooltipDebounce:a,rect:s,content:l,target:e}}function T(e){const t=E.cloneNode(!0),i=B(t),{content:s}=e;switch(s.type){case"element":i.innerHTML="",i.appendChild(s.data);break;case"html":i.innerHTML=s.data;break;case"text":if(e.hotkey){const e=V.cloneNode(!0);e.innerText=s.data,i.appendChild(e)}else i.innerText=s.data}if(e.hotkey){const t="none"!==s.type,r=D.cloneNode(!0),n=(0,f.hotKeyDeserialize)(e.hotkey),o=n.keys.map((e=>`${e}`));r.innerHTML=function(e,t){const i=/{\d}|{hotkey_\d}/gi;return e.replace(i,(e=>{const i=Number(e.match(/\d/));return t[i]}))}(n.text,o).replace(/\s\+\s/g,`+`),i.classList.add(C["common-tooltip__body--with-hotkey"]),t&&r.classList.add(C["common-tooltip__hotkey-block--divider"]),i.appendChild(r)}return t.addEventListener("contextmenu",y.preventDefault),t}function x(e,t){const i=t.rect;if(!i)return;!function(e,t){const i=m.includes(t)?_[t]:"";e.classList.remove(...m.map((e=>_[e])).filter((e=>!!e))),i&&!e.classList.contains(i)&&e.classList.add(i)}(e,t.colorTheme||"default"),t.addClass&&e.classList.add(t.addClass);const s=B(e),r=e.querySelector(`.${C["common-tooltip__button-container"]}`);s.classList.toggle(C["common-tooltip__body--width_wide"],Boolean(t.wide)),s.classList.toggle(C["common-tooltip__body--no-padding"],Boolean(t.noPadding)),s.classList.toggle(C["common-tooltip__body--width_narrow"],Boolean(t.narrow)),s.classList.toggle(C["common-tooltip__body--no-buttons"],!0),s.style.left=M(0),s.style.width=M(s.clientWidth+(Boolean(t.noPadding)?0:2));const n=document.body.clientWidth,o=w.CheckMobile.iOS()||(0,w.supportTouch)()&&(0,w.isMac)()?window.innerHeight:document.body.clientHeight,a=t.vertical,l=t.extendMargin||a&&i.w<20||!a&&i.h<20;e.classList.toggle(C["common-tooltip--farther"],l),e.classList.toggle(C["common-tooltip--vertical"],a),e.classList.toggle(C["common-tooltip--horizontal"],!a);const c=function(e){return e.querySelector(`.${C["common-tooltip__ear-holder"]}`)}(e),h=e.offsetHeight;if(a){const a=10,l=o-10,d=12,u=a+d,p=l-d,_=(0,b.clamp)(i.y+i.h/2,u,p)-h/2,m=_+h;e.style.left=M(i.x+i.w),e.style.top=M(_),_l&&(s.style.top=r.style.top=M(l-m));const{right:g}=(e.querySelector(":last-child")||s).getBoundingClientRect(),f=g+10>n;e.classList.toggle(C["common-tooltip--direction_reversed"],f),e.classList.toggle(C["common-tooltip--direction_normal"],!f);let v=f?"after":"before";(0,S.isRtl)()?(v=t.otr?"after":v,v=t.otl?"before":v):(v=t.otr?"before":v,v=t.otl?"after":v), -c.classList.toggle(C["common-tooltip__ear-holder--before"],"before"===v),c.classList.toggle(C["common-tooltip__ear-holder--after"],"after"===v),"after"===v&&(e.style.left="auto",e.style.right=M(n-i.x))}else{const a=i.x-(s.offsetWidth-i.w)/2,l=n-10-e.offsetWidth,d=Math.max(10,Math.min(a,l));e.style.left=M(d);const u=l\n\t\t
\n\t\t\t
\n\t\t
\n\t\t
\n\t\n`,L=`\n\t
\n`,k=`\n\t
\n`,E=(0,v.parseHtmlElement)(A),D=(0,v.parseHtmlElement)(L),V=(0,v.parseHtmlElement)(k);function B(e){return e.querySelector(`.${C["common-tooltip__body"]}`)}function R(e,t){return 10+e{W&&(W.destroy(),W=null)};for(const t of r){if("buttons"in e){if(1&e.buttons)continue}else if(1===e.which)continue;const i=()=>z(t);if(i()){const e=e=>{e.target instanceof Element&&e.target.contains(t)&&s(null,!0)},s=(r,o=!1)=>{t.removeEventListener("common-tooltip-update",i),t.removeEventListener("mouseleave",s),t.removeEventListener("mousedown",s),document.removeEventListener("scroll",e,{capture:!0}),n(),G(o)};t.addEventListener("common-tooltip-update",i),t.addEventListener("mouseleave",s),t.addEventListener("mousedown",s),document.addEventListener("scroll",e,{capture:!0}),null===W&&(W=(0,N.createGroup)({desc:"Tooltip"}),W.add({desc:"Hide",hotkey:27,handler:s}));break}}}),!0);const H=new MutationObserver((()=>{if(F&&F.options.target){let e;e="isConnected"in F.options.target?F.options.target.isConnected:document.body.contains(F.options.target),e||G()}})),z=(e,t={})=>{ -const{content:i,...s}=Y(t),r=P(e),n=Object.assign(r,s);return"none"!==i.type&&(n.content=i),!("none"===n.content.type&&!n.hotkey)&&(n.target=e,U(n),!0)},U=e=>{const t=Y(e),i=T(t);var s;if(F={options:t,element:i},s=i,u(),h&&h.appendChild(s),a(),!O)return I(i),void l((()=>q(i)),function(e){return"number"!=typeof e.tooltipDelay||isNaN(e.tooltipDelay)?500:e.tooltipDelay}(t));const{tooltipDebounce:r}=e;"number"!=typeof r||isNaN(r)?q(i):l((()=>q(i)),r)};function j(){u(),O=!1,F=null}const G=e=>{if(a(),H.disconnect(),!F)return;if(!e&&!O)return;const{element:t,options:i}=F,s=()=>{t.removeEventListener("mouseleave",s),I(t),e?j():o=setTimeout((()=>{j()}),250)};var r,l;i.tooltipHideDelay?(r=()=>{t.querySelector(":hover")?t.addEventListener("mouseleave",s):s()},l=i.tooltipHideDelay,n=setTimeout(r,l)):s()};function q(e){const{options:t}=(0,p.ensureNotNull)(F);if(x(e,t),function(e){e.classList.toggle(C["common-tooltip--hidden"],!1)}(e),H.observe(document,{childList:!0,subtree:!0}),O=!0,t.forceHideOnMove){const e=()=>{document.removeEventListener("mousemove",e),G()};document.addEventListener("mousemove",e)}}function $(e){return e&&(e.nodeType===Node.ELEMENT_NODE?e:null)}function Y(e){if(function(e){return"content"in e}(e))return e;const{inner:t,html:i,text:s,...r}=e;let n={type:"none"};return t&&(n={type:"element",data:t}),s&&(n={type:i?"html":"text",data:s}),{content:n,...r}}},28325:(e,t,i)=>{"use strict";i.d(t,{ChartPage:()=>d});var s=i(40549),r=i.n(s),n=i(31940);function o(e,t){let i=0;for(const{min:s,max:r}of t){if(e0&&t.push({min:e,max:s})}return t.sort(((e,t)=>e.min-t.min||e.max-t.max)),t}function l(e,t){if(e.length!==t.length)return!1;for(let i=e.length;i--;){if(e[i].min!==t[i].min)return!1;if(e[i].max!==t[i].max)return!1}return!0}var c=i(2484);const h=c.enabled("no_min_chart_width");class d{constructor(e){this._processVisibility=e=>{const t=e.container.value();return this.affectsLayout(e.name)?(t&&t.classList.toggle("js-hidden",!1),!0):(t&&t.classList.toggle("js-hidden",!0),!1)},this._setWidth=(e,t,i)=>{let s=i;this._fullscreenArea!==e.name&&(e.availWidth.setValue(i),e.canNegotiate.width&&(s=o(i,e.negotiations.width))),t||(s=0);const r=e.container.value();return r&&t&&(r.style.width=s+"px"),e.width.setValue(s),s},this._setHeight=(e,t,i)=>{let s=i;this._fullscreenArea!==e.name&&(e.availHeight.setValue(i),e.canNegotiate.height&&(s=o(i,e.negotiations.height))),t||(s=0);const r=e.container.value();return r&&t&&(r.style.height=s+"px"),e.height.setValue(s),s};const t=e.container.value();if(!t)throw new Error("bridge.container.value() must be an element");this._container=t,this._availableAreas=["left","tradingpanel","right","top","bottom","center","topleft","extratop"],this._areas={},this._bridge=e,this._width=e.width,this._height=e.height, +;"LineToolPath"===e?g("hint.finishBuildPathByDblClick"):"LineToolPolyline"===e&&g("hint.finishBuildPolylineByDblClick")}})),e.layoutSizesChanged().subscribe((function(){if(!m("hint.startResizingChartInLayout"))return;_(r.t(null,void 0,i(35273)),"hint.startResizingChartInLayout")})),t||l.CheckMobile.any()||!m("hint.startFocusedZoom")||(p=function(e,t){let i=!1;const s=r=>{r?(i&&t(r),e.onZoom().unsubscribe(null,s)):i||(t(r),i=!0)};return e.onZoom().subscribe(null,s),()=>e.onZoom().unsubscribe(null,s)}(e,(function(e){if(!m("hint.startFocusedZoom"))return;if(e)u&&(p=null,g("hint.startFocusedZoom"));else{const e=c.isMacKeyboard?"⌘":"Ctrl";_(r.t(null,void 0,i(35963)).format({key:e}),"hint.startFocusedZoom")}})))}},81602:(e,t,i)=>{"use strict";i.d(t,{setupChartScreenshotHint:()=>o});var s=i(44352),r=i(76422),n=i(50151);function o(e,t){const o=s.t(null,void 0,i(78104)).format({emoji:"👍"}),a=s.t(null,void 0,i(12011)).format({emoji:"👍"});r.on("onServerScreenshotCopiedToClipboard",(()=>h(o)),null),r.on("onClientScreenshotCopiedToClipboard",(()=>h(a)),null);let l=null;const c=e.getContainer();function h(e){l?l.show(e):Promise.all([i.e(8707),i.e(8887),i.e(962),i.e(92)]).then(i.bind(i,81573)).then((i=>{l||(l=new i.ChartScreenshotHintRenderer((0,n.ensureNotNull)(c),{bottomPadding:t.seriesControlBarEnabled}),l.show(e))}))}}},94194:(e,t,i)=>{"use strict";i.d(t,{getTooltipData:()=>r,setTooltipData:()=>n});const s=new WeakMap;function r(e,t){const i=s.get(e);return i instanceof Function?i(t):i&&i[t]}function n(e,t,i){if(i instanceof Function)return void s.set(e,i);const r=s.get(e),n=void 0===r||r instanceof Function?{}:r;n[t]=i,s.set(e,n)}},61814:(e,t,i)=>{"use strict";i.d(t,{hotKeySerialize:()=>r,hotKeyDeserialize:()=>n});var s=i(11536);function r(e){return(0,s.clean)(JSON.stringify(e))}function n(e){return JSON.parse((0,s.clean)(e,!0))}},38780:(e,t,i)=>{"use strict";i.d(t,{hide:()=>G,show:()=>U,showOnElement:()=>z});var s=i(32563);let r=0,n=0,o=0;function a(){clearTimeout(r),clearTimeout(n),clearTimeout(o)}function l(e,t){r=setTimeout(e,t)}const c="tooltip-root-element";let h;function d(){const e=document.getElementById(c);e?h=e:(h=document.createElement("div"),h.id=c,document.body.appendChild(h))}function u(){h&&(h.innerHTML="")}"interactive"===document.readyState?d():document.addEventListener("DOMContentLoaded",d);var p=i(50151);const _={default:"",white:"theme-white","round-shadow":"theme-round-shadow"},m=Object.keys(_);var g=i(94194),f=i(61814),v=i(66032),S=i(80142),y=(i(93731),i(33933)),b=i(91031),w=i(49483),P=i(1338);function C(e){const t=function(e){const t=e.hasAttribute("data-tooltip")?e.getAttribute("data-tooltip"):e.getAttribute("title");return t&&((0,g.setTooltipData)(e,"text",t),e.removeAttribute("title")),(0,g.getTooltipData)(e,"text")||""}(e),i=e.getBoundingClientRect(),s={h:i.height,w:i.width,x:i.left,y:i.top},r=e.getAttribute("data-color-theme")||"",n=e.classList.contains("common-tooltip-html"),o=parseInt(e.getAttribute("data-tooltip-delay")||""),a=parseInt(e.getAttribute("data-tooltip-debounce")||"");let l={ +type:"none"};return t&&(l={type:n?"html":"text",data:t}),{above:e.classList.contains("common-tooltip-above"),below:e.classList.contains("common-tooltip-below"),otl:e.classList.contains("common-tooltip-otl"),otr:e.classList.contains("common-tooltip-otr"),vertical:e.classList.contains("common-tooltip-vertical"),hotkey:e.getAttribute("data-tooltip-hotkey"),narrow:e.classList.contains("common-tooltip-narrow"),wide:e.classList.contains("common-tooltip-wide"),colorTheme:r,tooltipDelay:o,tooltipDebounce:a,rect:s,content:l,target:e}}function T(e){const t=E.cloneNode(!0),i=V(t),{content:s}=e;switch(s.type){case"element":i.innerHTML="",i.appendChild(s.data);break;case"html":i.innerHTML=s.data;break;case"text":if(e.hotkey){const e=B.cloneNode(!0);e.innerText=s.data,i.appendChild(e)}else i.innerText=s.data}if(e.hotkey){const t="none"!==s.type,r=D.cloneNode(!0),n=(0,f.hotKeyDeserialize)(e.hotkey),o=n.keys.map((e=>`${e}`));r.innerHTML=function(e,t){const i=/{\d}|{hotkey_\d}/gi;return e.replace(i,(e=>{const i=Number(e.match(/\d/));return t[i]}))}(n.text,o).replace(/\s\+\s/g,`+`),i.classList.add(P["common-tooltip__body--with-hotkey"]),t&&r.classList.add(P["common-tooltip__hotkey-block--divider"]),i.appendChild(r)}return t.addEventListener("contextmenu",y.preventDefault),t}function x(e,t){const i=t.rect;if(!i)return;!function(e,t){const i=m.includes(t)?_[t]:"";e.classList.remove(...m.map((e=>_[e])).filter((e=>!!e))),i&&!e.classList.contains(i)&&e.classList.add(i)}(e,t.colorTheme||"default"),t.addClass&&e.classList.add(t.addClass);const s=V(e),r=e.querySelector(`.${P["common-tooltip__button-container"]}`);s.classList.toggle(P["common-tooltip__body--width_wide"],Boolean(t.wide)),s.classList.toggle(P["common-tooltip__body--no-padding"],Boolean(t.noPadding)),s.classList.toggle(P["common-tooltip__body--width_narrow"],Boolean(t.narrow)),s.classList.toggle(P["common-tooltip__body--no-buttons"],!0),s.style.left=M(0),s.style.width=M(s.clientWidth+(Boolean(t.noPadding)?0:2));const n=document.body.clientWidth,o=w.CheckMobile.iOS()||(0,w.supportTouch)()&&(0,w.isMac)()?window.innerHeight:document.body.clientHeight,a=t.vertical,l=t.extendMargin||a&&i.w<20||!a&&i.h<20;e.classList.toggle(P["common-tooltip--farther"],l),e.classList.toggle(P["common-tooltip--vertical"],a),e.classList.toggle(P["common-tooltip--horizontal"],!a);const c=function(e){return e.querySelector(`.${P["common-tooltip__ear-holder"]}`)}(e),h=e.offsetHeight;if(a){const a=10,l=o-10,d=12,u=a+d,p=l-d,_=(0,b.clamp)(i.y+i.h/2,u,p)-h/2,m=_+h;e.style.left=M(i.x+i.w),e.style.top=M(_),_l&&(s.style.top=r.style.top=M(l-m));const{right:g}=(e.querySelector(":last-child")||s).getBoundingClientRect(),f=g+10>n;e.classList.toggle(P["common-tooltip--direction_reversed"],f),e.classList.toggle(P["common-tooltip--direction_normal"],!f);let v=f?"after":"before";(0,S.isRtl)()?(v=t.otr?"after":v,v=t.otl?"before":v):(v=t.otr?"before":v,v=t.otl?"after":v), +c.classList.toggle(P["common-tooltip__ear-holder--before"],"before"===v),c.classList.toggle(P["common-tooltip__ear-holder--after"],"after"===v),"after"===v&&(e.style.left="auto",e.style.right=M(n-i.x))}else{const a=i.x-(s.offsetWidth-i.w)/2,l=n-10-e.offsetWidth,d=Math.max(10,Math.min(a,l));e.style.left=M(d);const u=l\n\t\t
\n\t\t\t
\n\t\t
\n\t\t
\n\t\n`,L=`\n\t
\n`,k=`\n\t
\n`,E=(0,v.parseHtmlElement)(A),D=(0,v.parseHtmlElement)(L),B=(0,v.parseHtmlElement)(k);function V(e){return e.querySelector(`.${P["common-tooltip__body"]}`)}function R(e,t){return 10+e{W&&(W.destroy(),W=null)};for(const t of r){if("buttons"in e){if(1&e.buttons)continue}else if(1===e.which)continue;const i=()=>z(t);if(i()){const e=e=>{e.target instanceof Element&&e.target.contains(t)&&s(null,!0)},s=(r,o=!1)=>{t.removeEventListener("common-tooltip-update",i),t.removeEventListener("mouseleave",s),t.removeEventListener("mousedown",s),document.removeEventListener("scroll",e,{capture:!0}),n(),G(o)};t.addEventListener("common-tooltip-update",i),t.addEventListener("mouseleave",s),t.addEventListener("mousedown",s),document.addEventListener("scroll",e,{capture:!0}),null===W&&(W=(0,N.createGroup)({desc:"Tooltip"}),W.add({desc:"Hide",hotkey:27,handler:s}));break}}}),!0);const H=new MutationObserver((()=>{if(F&&F.options.target){let e;e="isConnected"in F.options.target?F.options.target.isConnected:document.body.contains(F.options.target),e||G()}})),z=(e,t={})=>{ +const{content:i,...s}=Y(t),r=C(e),n=Object.assign(r,s);return"none"!==i.type&&(n.content=i),!("none"===n.content.type&&!n.hotkey)&&(n.target=e,U(n),!0)},U=e=>{const t=Y(e),i=T(t);var s;if(F={options:t,element:i},s=i,u(),h&&h.appendChild(s),a(),!O)return I(i),void l((()=>q(i)),function(e){return"number"!=typeof e.tooltipDelay||isNaN(e.tooltipDelay)?500:e.tooltipDelay}(t));const{tooltipDebounce:r}=e;"number"!=typeof r||isNaN(r)?q(i):l((()=>q(i)),r)};function j(){u(),O=!1,F=null}const G=e=>{if(a(),H.disconnect(),!F)return;if(!e&&!O)return;const{element:t,options:i}=F,s=()=>{t.removeEventListener("mouseleave",s),I(t),e?j():o=setTimeout((()=>{j()}),250)};var r,l;i.tooltipHideDelay?(r=()=>{t.querySelector(":hover")?t.addEventListener("mouseleave",s):s()},l=i.tooltipHideDelay,n=setTimeout(r,l)):s()};function q(e){const{options:t}=(0,p.ensureNotNull)(F);if(x(e,t),function(e){e.classList.toggle(P["common-tooltip--hidden"],!1)}(e),H.observe(document,{childList:!0,subtree:!0}),O=!0,t.forceHideOnMove){const e=()=>{document.removeEventListener("mousemove",e),G()};document.addEventListener("mousemove",e)}}function $(e){return e&&(e.nodeType===Node.ELEMENT_NODE?e:null)}function Y(e){if(function(e){return"content"in e}(e))return e;const{inner:t,html:i,text:s,...r}=e;let n={type:"none"};return t&&(n={type:"element",data:t}),s&&(n={type:i?"html":"text",data:s}),{content:n,...r}}},28325:(e,t,i)=>{"use strict";i.d(t,{ChartPage:()=>d});var s=i(40549),r=i.n(s),n=i(31940);function o(e,t){let i=0;for(const{min:s,max:r}of t){if(e0&&t.push({min:e,max:s})}return t.sort(((e,t)=>e.min-t.min||e.max-t.max)),t}function l(e,t){if(e.length!==t.length)return!1;for(let i=e.length;i--;){if(e[i].min!==t[i].min)return!1;if(e[i].max!==t[i].max)return!1}return!0}var c=i(2484);const h=c.enabled("no_min_chart_width");class d{constructor(e){this._processVisibility=e=>{const t=e.container.value();return this.affectsLayout(e.name)?(t&&t.classList.toggle("js-hidden",!1),!0):(t&&t.classList.toggle("js-hidden",!0),!1)},this._setWidth=(e,t,i)=>{let s=i;this._fullscreenArea!==e.name&&(e.availWidth.setValue(i),e.canNegotiate.width&&(s=o(i,e.negotiations.width))),t||(s=0);const r=e.container.value();return r&&t&&(r.style.width=s+"px"),e.width.setValue(s),s},this._setHeight=(e,t,i)=>{let s=i;this._fullscreenArea!==e.name&&(e.availHeight.setValue(i),e.canNegotiate.height&&(s=o(i,e.negotiations.height))),t||(s=0);const r=e.container.value();return r&&t&&(r.style.height=s+"px"),e.height.setValue(s),s};const t=e.container.value();if(!t)throw new Error("bridge.container.value() must be an element");this._container=t,this._availableAreas=["left","tradingpanel","right","top","bottom","center","topleft","extratop"],this._areas={},this._bridge=e,this._width=e.width,this._height=e.height, this._width.subscribe((()=>this.recalculate())),this._height.subscribe((()=>this.recalculate())),this._bridge.visible.subscribe((()=>this._updateVisibility())),this._bridge.fullscreen.subscribe((()=>this._onParentFullscreenChange())),this.recalculate()}allocate(e){const t=e&&e.areaName;if(-1===this._availableAreas.indexOf(t))throw new Error("unknown options.areaName");this.free(t);const i=this._createDOM(t),s={name:t,canNegotiate:{width:"left"===t||"right"===t||"tradingpanel"===t||"topleft"===t,height:"top"===t||"bottom"===t||"topleft"===t||"extratop"===t},negotiations:{width:[],height:[]},remove:()=>{for(const e in this._areas)this._areas[e]===s&&this.free(e)},negotiateWidth:e=>{if(!s.canNegotiate.width)return;const t=a(e);l(s.negotiations.width,t)||(s.negotiations.width=t,this.recalculate())},negotiateHeight:e=>{if(!s.canNegotiate.height)return;const t=a(e);l(s.negotiations.height,t)||(s.negotiations.height=t,this.recalculate())},requestFullscreen:()=>{this._fullscreenArea||("right"!==t&&"center"!==t||(this._fullscreenArea=t),"center"===t&&this._bridge.requestFullscreen(),this._updateFullscreen())},exitFullscreen:()=>{t===this._fullscreenArea&&(this._fullscreenArea=void 0,"center"===t&&this._bridge.exitFullscreen(),this._updateFullscreen())},width:new(r()),height:new(r()),availWidth:new(r()),availHeight:new(r()),alive:new(r())(!0),container:new(r())(i),visible:new(r())(!0),fullscreen:new(r())(!1),fullscreenable:new(r())("right"===t||"center"===t),rdState:new n.ResizerDetacherState};return s.rdState.pushOwner(s),this._areas[t]=s,s.rdState.owner.subscribe((e=>{const i=s.container.value();if(e!==s)i&&(i.innerHTML="",i.parentElement&&i.parentElement.removeChild(i));else{let e=null;for(let i=this._availableAreas.indexOf(t);i--;){const t=this._availableAreas[i];if(this.affectsLayout(t)){e=this._areas[t].container.value();break}}i&&(e&&i.parentElement?i.insertAdjacentElement("afterend",e):this._container.appendChild(i))}this.recalculate()}),{callWithLast:!0}),s.rdState.bridge()}free(e){const t=this._areas[e];if(!t)return;this._areas[e]=void 0;const i=t.container.value();i&&i.parentElement&&i.parentElement.removeChild(i),t.alive.setValue(!1)}recalculate(){const e={};this._recalcSingleRunToken=e;const t=this._areas.topleft,i=this._areas.left,s=this._areas.tradingpanel,r=this._areas.right,n=this._areas.top,o=this._areas.bottom,a=this._areas.center,l=this._areas.extratop,c=this._width.value(),d=this._height.value();let u=0,p=0,_=0,m=0,g=0,f=0,v=0,S=0;if(e===this._recalcSingleRunToken&&l){const e=this._processVisibility(l);S=this._setHeight(l,e,d),this._setWidth(l,e,c)}if(e===this._recalcSingleRunToken&&t){const e=this._processVisibility(t);v=this._setHeight(t,e,d),f=this._setWidth(t,e,c);const i=t.container.value();e&&i&&(i.style.top=S+"px")}let y=0;if(e===this._recalcSingleRunToken&&n){const e=this._processVisibility(n),t=n.container.value();e&&t&&(t.style.left=f+"px",t.style.top=S+"px");const i=c-f;this._setWidth(n,e,i),u=this._setHeight(n,e,d),u&&(y=1)}if(e===this._recalcSingleRunToken&&i){ -const e=this._processVisibility(i),t=Math.max(v,u);_=this._setWidth(i,e,c),_&&(_+=4),_&&1===y&&(y=4);const s=i.container.value();e&&s&&(s.style.top=t+S+y+"px"),this._setHeight(i,e,d-t-S)}if(e===this._recalcSingleRunToken&&s){const e=this._processVisibility(s);let t=c-_;h||(t-=300),g=this._setWidth(s,e,t),g&&1===y&&(y=4),this._setHeight(s,e,d-S-u-y)}if(e===this._recalcSingleRunToken&&r){const e=this._processVisibility(r);let t=c-_-g;h||(t-=300),m=this._setWidth(r,e,t),m&&1===y&&(y=4),this._setHeight(r,e,d-S-u-y);const i=r.container.value();e&&i&&(i.style.top=u+S+y+"px",i.classList.toggle("no-border-top-left-radius",Boolean(g)))}const b=g+m;let w=0;const C=c-_-g-m-(b?4:0);if(e===this._recalcSingleRunToken&&o){const e=this._processVisibility(o),t=o.container.value();e&&t&&(t.style.left=_+"px",t.classList.toggle("no-border-top-left-radius",!_),t.classList.toggle("no-border-top-right-radius",!b)),this._setWidth(o,e,C);const i=d-S;w=Math.min(300,i-0),p=this._setHeight(o,e,i)+4}const P=Boolean(u&&(_||b));if(this._container.classList.toggle("layout-with-border-radius",P),e===this._recalcSingleRunToken&&a){const e=this._processVisibility(a),t=a.container.value();e&&t&&(t.style.left=_+"px",t.style.top=u+S+y+"px",t.classList.toggle("no-border-bottom-left-radius",!p||!_),t.classList.toggle("no-border-bottom-right-radius",!b||!p),t.classList.toggle("no-border-top-left-radius",Boolean(!_&&b)),t.classList.toggle("no-border-top-right-radius",Boolean(_&&!b))),this._setWidth(a,e,C);const i=d-u-p-S-y;this._setHeight(a,e,Math.max(i,w))}if(e===this._recalcSingleRunToken&&s&&this.affectsLayout("tradingpanel")){const e=s.container.value();e&&(e.style.right=m+"px",e.style.top=S+u+y+"px",e.style.borderTopLeftRadius=P?"4px":"0px")}e===this._recalcSingleRunToken&&this._updateVisibility()}affectsLayout(e){const t=this._areas[e];if(!t)return!1;if(t.rdState.owner.value()!==t)return!1;if(this._fullscreenArea&&this._fullscreenArea!==e)return u(e);if(this._width.value()<=567||this._height.value()<=445){if(!["center","top","left","topleft","extratop"].includes(e))return!1}return!0}_updateVisibility(){const e=this._bridge.visible.value();for(let t=0;t{"use strict";i.d(t,{ResizerDetacherState:()=>o});var s=i(50151),r=i(40549),n=i.n(r);class o{constructor(e){this._alive=new(n()),this._container=new(n()),this._width=new(n()),this._height=new(n()),this._fullscreen=new(n()),this._detachable=new(n()),this._fullscreenable=new(n()),this._visible=new(n()),this._availWidth=new(n()),this._availHeight=new(n()),this._owner=new(n()),this._ownersStack=[],this.owner=this._owner.readonly(),this._bridge={alive:this._alive.readonly(),container:this._container.readonly(),width:this._width.readonly(),height:this._height.readonly(),fullscreen:this._fullscreen.readonly(),detachable:this._detachable.readonly(),fullscreenable:this._fullscreenable.readonly(),visible:this._visible.readonly(),availWidth:this._availWidth.readonly(),availHeight:this._availHeight.readonly(),remove:()=>{const e=this._owner.value();e&&e.remove&&e.remove()},negotiateWidth:e=>{const t=this._owner.value();t&&t.negotiateWidth&&t.negotiateWidth(e)},negotiateHeight:e=>{const t=this._owner.value();t&&t.negotiateHeight&&t.negotiateHeight(e)},requestFullscreen:()=>{const e=this._owner.value();e&&e.requestFullscreen&&e.requestFullscreen()},exitFullscreen:()=>{const e=this._owner.value();e&&e.exitFullscreen&&e.exitFullscreen()},detach:e=>{const t=this._owner.value();t&&t.detach&&t.detach(e)},attach:()=>{const e=this._owner.value();e&&e.attach&&e.attach()}},e&&this.pushOwner(e)}bridge(){return this._bridge}pushOwner(e){if(!e.alive.value())return;for(const e of this._ownersStack)this._unsubscribeOwner(e);const t={owner:e};this._ownersStack.push(t),this._subscribeOwner(t)}_subscribeOwner(e){const t=e.owner;if(e.deathWatcher||(this._alive.setValue(!0),e.deathWatcher=t.alive.spawn(),e.deathWatcher.subscribe((t=>{t||this._deadHandler(e)}))),this._owner.setValue(t),!e.subscriptions){const i=e.subscriptions=[];this._visible.setValue(!1);const s=(e,t)=>{if(e){const s=e.spawn();i.push(s),s.subscribe((e=>{t.setValue(e)}),{callWithLast:!0})}else t.deleteValue()};s(t.container,this._container),s(t.width,this._width),s(t.height,this._height),s(t.fullscreen,this._fullscreen),s(t.detachable,this._detachable),s(t.fullscreenable,this._fullscreenable),s(t.availWidth,this._availWidth),s(t.availHeight,this._availHeight),s(t.visible,this._visible)}}_unsubscribeOwner(e,t){if(e.subscriptions){for(const t of e.subscriptions)t.unsubscribe();e.subscriptions=null}t&&e.deathWatcher&&(e.deathWatcher.unsubscribe(),e.deathWatcher=null)}_deadHandler(e){const t=this._ownersStack.indexOf(e);(0,s.assert)(-1!==t,"sanitized owner should be in stack");for(let e=this._ownersStack.length-1;e>=t;e--)this._unsubscribeOwner(this._ownersStack[e],!0);this._ownersStack.length=t,t>0?this._subscribeOwner(this._ownersStack[t-1]):(this._alive.setValue(!1),this._owner.deleteValue())}}},89356:(e,t,i)=>{"use strict";i.d(t,{Root:()=>d}) ;var s=i(40549),r=i.n(s),n=i(31940);class o{constructor(e){this._document=e,this.isFullscreen=new(r());const t=()=>{const e=["fullscreenElement","webkitFullscreenElement","mozFullscreenElement","mozFullScreenElement","msFullscreenElement"];for(let t=0;t{this.isVisible.setValue(!e[r])},i(),e.addEventListener(t,i,!1);break}}this.destroy=()=>{i&&(e.removeEventListener(t,i,!1),i=null)}}}var l=i(84015),c=i(50151),h=i(49483);class d{constructor(e){this._updateDocumentHeight=e=>{"visual"===this._viewportType&&this._window.document.documentElement.style.setProperty("height",`${e}px`,"important")},this._window=e,this._fullscreenApi=new o(e.document),this._viewportType=h.CheckMobile.iOS()&&!(0,l.isOnMobileAppPage)("any")&&this._window.visualViewport?"visual":"quirks","visual"===this._viewportType?this._viewport=(0,c.ensure)(this._window.visualViewport):this._viewport=this._window;const t=this._layoutSizeSensor=this._window.document.createElement("div");t.id="layout-size-sensor",t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.right="0",t.style.bottom="0",t.style.pointerEvents="none",t.style.visibility="hidden",this._initFullscreen()}allocate(){this.free();const e=this._window.document,t=e.createElement("div");t.classList.add("js-rootresizer__contents"),t.style.position="relative",t.style.width="100%",t.style.height="100%",e.body.insertAdjacentElement("afterbegin",t),e.body.insertAdjacentElement("afterbegin",this._layoutSizeSensor),this._visibilityApi=new a(this._window.document);const i={alive:new(r())(!0),fullscreenable:new(r())(!0),container:new(r())(t),width:new(r()),height:new(r()),availWidth:new(r()),availHeight:new(r()),visible:this._visibilityApi.isVisible,fullscreen:this._fullscreenApi.isFullscreen,remove:()=>{i.alive.setValue(!1)},attach:()=>{i.alive.setValue(!1),this._window.close()},requestFullscreen:()=>{this._requestFullscreen()},exitFullscreen:()=>{this._exitFullscreen()}};return i.alive.subscribe((e=>{e||i!==this._area||this.free()})),this._area=i,this._resizeHandler=()=>{const e=this._width(i)||800,t=this._height(i)||600;i.availHeight.setValue(t),i.availWidth.setValue(e),i.height.setValue(t),i.width.setValue(e)}, this._area.height.subscribe(this._updateDocumentHeight,{callWithLast:!0}),this._resizeHandler(),this._viewport.addEventListener("resize",this._resizeHandler),new n.ResizerDetacherState(i).bridge()}free(){if(this._resizeHandler&&(this._viewport.removeEventListener("resize",this._resizeHandler),this._resizeHandler=void 0),this._visibilityApi&&(this._visibilityApi.destroy(),this._visibilityApi=void 0),this._area){const e=this._area;this._area=void 0,e.height.unsubscribe(this._updateDocumentHeight),e.alive.setValue(!1);const t=e.container.value(),i=null==t?void 0:t.parentElement;i&&(i.removeChild(t),i.removeChild(this._layoutSizeSensor))}}_height(e){if("visual"===this._viewportType)return this._layoutSizeSensor.clientHeight;return e.container.value().clientHeight}_width(e){return e.container.value().clientWidth}_requestFullscreen(){this._fullscreenApi.enter()}_exitFullscreen(){this._fullscreenApi.exit()}_initFullscreen(){this._fullscreenApi.isFullscreen.subscribe((e=>{this._resizeHandler&&this._resizeHandler()}))}}},33134:(e,t,i)=>{"use strict";i.d(t,{DEFAULT_SIZE:()=>s,spinnerSizeMap:()=>r});const s="large",r={mini:"xsmall",xsmall:"xsmall",small:"small",medium:"medium",large:"large"}},5683:(e,t,i)=>{"use strict";i.d(t,{createStubElem:()=>r});var s=i(60309);function r(e=[],t=[]){const i=document.createElement("div"),r=document.createElement("div");return i.appendChild(r),i.classList.add(s.container),r.classList.add(s.inner),e.forEach((e=>{i.classList.add(s[e])})),t.forEach((e=>{i.classList.add(s[e])})),i}},45973:(e,t,i)=>{"use strict";i.r(t),i.d(t,{lineToolEntityInfo:()=>o,studyEntityInfo:()=>a,seriesEntityInfo:()=>l,entityForDataSource:()=>c});var s=i(89215),r=i(37121),n=i(6250);function o(e){return{id:e.id(),name:(t=e.toolname,Object.keys(r.supportedLineTools).find((e=>r.supportedLineTools[e].name===t))||null)};var t}function a(e){return{id:e.id(),name:e.metaInfo().description}}function l(e){return{id:e.id(),name:"Main Series"}}function c(e,t){return t===e.mainSeries()?l(e.mainSeries()):(0,s.isStudy)(t)?a(t):(0,n.isLineTool)(t)?o(t):null}},68582:(e,t,i)=>{"use strict";i.r(t),i.d(t,{isLineToolRiskReward:()=>a,LineDataSourceApi:()=>c});var s=i(50151),r=i(65665);const n=new Map([["LineToolRiskRewardLong",2],["LineToolRiskRewardShort",2],["LineToolBezierQuadro",3],["LineToolBezierCubic",4]]);function o(e){const t=n.get(e.toolname);if(void 0!==t)return t;const i=e.pointsCount();return-1===i?e.points().length:i}function a(e){return"LineToolRiskRewardLong"===e||"LineToolRiskRewardShort"===e}const l=["alwaysShowStats","entryPrice","inputs.first bar time","inputs.last bar time","interval","linesWidths","points","snapTo45Degrees","stopPrice","symbol","symbolStateVersion","currencyId","unitId","targetPrice","zOrderVersion"];class c{constructor(e,t,i){this._source=e,this._undoModel=t,this._model=t.model(),this._pointsConverter=i}isSelectionEnabled(){return this._source.isSelectionEnabled()}setSelectionEnabled(e){this._source.setSelectionEnabled(e)}isSavingEnabled(){return this._source.isSavedInChart()}setSavingEnabled(e){ @@ -26,40 +26,40 @@ return this._watchedDataFrequencyResolution.readonly()}bindToChartWidget(e){if(t this._searchCharts.feedBySymbol.call(this._searchCharts,e)):()=>{};!0===this._searchCharts.loadingSymbol.value()?this._feedBySymbolDebounceCounter<100&&(this._feedBySymbolDebounceCounter++,this._searchChartsLoadDebounced=(0,s.default)(t,2e3),this._searchChartsLoadDebounced(e)):this._searchCharts.feedBySymbol(e)}_mainSeries(){if(!this._activeChartWidget)throw new Error("ChartWidget is undefined");return this._activeChartWidget.model().mainSeries()}_properties(){return this._mainSeries().properties()}_symbolProperty(){return this._properties().symbol}_intervalProperty(){return this._properties().interval}_watchedSymbolListener(e){this._symbolProperty().value()!==e&&this._chartWidgetCollection.setSymbol(e)}_sendSnowplowAnalytics(){if(!window.user.do_not_track)throw new Error("unsupported")}_onSymbolPropertyChange(){const e=this._symbolProperty().value()!==this._watchedSymbol.value();this._watchedSymbol.setValue(this._symbolProperty().value()),e&&this._chartWidgetCollection.setSymbol(this._symbolProperty().value())}_onSymbolResolved(e){const t=this._mainSeries().symbolInfo();t&&this._applyValuesFromSymbolInfo(t)}_applyValuesFromSymbolInfo(e){const t=e.pro_name||o.enabled("trading_terminal")&&(e.full_name||e.name)||"";this._proSymbol.setValue(t),e.aliases&&this._symbolNamesList.setValue(e.aliases)}_updateSeriesSymbolInfo(){this._seriesShortSymbol.setValue(this._properties().shortName.value());const e=this._mainSeries().symbolInfo();if(e){this._applyValuesFromSymbolInfo(e);{const t=e.supported_resolutions;t?this._watchedSupportedResolutions.setValue(t):this._watchedSupportedResolutions.setValue(void 0)}let t=(0,c.allChartStyles)();(0,a.isCloseBasedSymbol)(e)&&(t=t.filter((e=>(0,a.isSingleValueBasedStyle)(e)))),this._watchedSupportedChartStyles.setValue(t),this._watchedIntraday.setValue(!!e.has_intraday),this._watchedSeconds.setValue(!!e.has_seconds),this._watchedTicks.setValue(!(0,a.isCloseBasedSymbol)(e)&&!!e.has_ticks),this._watchedRange.setValue(!(0,a.isCloseBasedSymbol)(e));const i=e.data_frequency?e.data_frequency:void 0;this._watchedDataFrequencyResolution.setValue(i)}else this._watchedIntraday.deleteValue(),this._watchedSeconds.deleteValue(),this._watchedTicks.deleteValue(),this._watchedRange.deleteValue(),this._proSymbol.deleteValue()}_watchedIntervalListener(e){this._intervalProperty().value()!==e&&this._chartWidgetCollection.setResolution(e)}_onIntervalPropertyChange(){const e=this._intervalProperty().value()!==this._watchedInterval.value();this._watchedInterval.setValue(this._intervalProperty().value()),e&&this._chartWidgetCollection.setResolution(this._intervalProperty().value())}_onChartModelCreated(e){if(!this._activeChartWidget)throw new Error("ChartWidget is undefined");this._chartWidgetBindingState=d.BoundToModel,this._activeChartWidget.modelCreated().unsubscribe(this,this._onChartModelCreated);const t=this._symbolProperty();t.subscribe(this,this._onSymbolPropertyChange),this._watchedSymbol.setValue(t.value()),this._watchedSymbol.subscribe(this._watchedSymbolListenerBound);const i=this._mainSeries() ;i.dataEvents().symbolResolved().subscribe(this,this._onSymbolResolved),this._watchedSymbol.hook=e=>(i.symbolSameAsCurrent(e)&&(e=i.symbol()),e),i.dataEvents().symbolResolved().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().symbolError().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().symbolNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),i.dataEvents().symbolGroupNotPermitted().subscribe(this,this._updateSeriesSymbolInfo),this._updateSeriesSymbolInfo();const s=this._intervalProperty();s.subscribe(this,this._onIntervalPropertyChange),this._watchedInterval.setValue(s.value()),this._watchedInterval.subscribe(this._watchedIntervalListenerBound),this._activeChartWidget.readOnly()&&(this._watchedSymbol.writeLock=!0)}};window.TradingViewApi||(window.TradingViewApi={linking:u})},11417:(e,t,i)=>{"use strict";const{getLogger:s}=i(98351),r=s("TVLocalStorage");var n=function(){try{this.isAvailable=!0,this.localStorage=window.localStorage,this.localStorage.setItem("tvlocalstorage.available","true")}catch(e){delete this.isAvailable,delete this.localStorage}this._updateLength();try{this._report()}catch(e){}};n.prototype._report=function(){if(this.isAvailable){const e=10,t=[];for(let e=0;et.length-e.length));const i=t.slice(0,e);t.sort(((e,t)=>t.key.length-e.key.length));const s=t.slice(0,e);r.logNormal(`Total amount of keys in Local Storage: ${this.length}`),r.logNormal(`Top ${e} keys with longest values: ${JSON.stringify(i)}`),r.logNormal(`Top ${e} longest key names: ${JSON.stringify(s)}`);try{navigator.storage.estimate().then((e=>{r.logNormal(`Storage estimate: ${JSON.stringify(e)}`)}))}catch(e){}}},n.prototype.length=0,n.prototype.isAvailable=!1,n.prototype.localStorage={"tvlocalstorage.available":"false"},n.prototype._updateLength=function(){if(this.isAvailable)this.length=this.localStorage.length;else{var e,t=0;for(e in this.localStorage)this.localStorage.hasOwnProperty(e)&&t++;this.length=t}},n.prototype.key=function(e){return this.isAvailable?this.localStorage.key(e):Object.keys(this.localStorage)[e]},n.prototype.getItem=function(e){return this.isAvailable?this.localStorage.getItem(e):void 0===this.localStorage[e]?null:this.localStorage[e]},n.prototype.setItem=function(e,t){this.isAvailable?this.localStorage.setItem(e,t):this.localStorage[e]=t,this._updateLength()},n.prototype.removeItem=function(e){this.isAvailable?this.localStorage.removeItem(e):delete this.localStorage[e],this._updateLength()},n.prototype.clear=function(){this.isAvailable?this.localStorage.clear():this.localStorage={},this._updateLength()};var o=function(e){this.storage=e};o.prototype.getItem=function(e){return Promise.resolve(this.storage.getItem(e))},o.prototype.setItem=function(e,t){return Promise.resolve(this.storage.setItem(e,t))},window.TVLocalStorage=new n,window.TVLocalStorageAsync=new o(window.TVLocalStorage),e.exports={TVLocalStorage:window.TVLocalStorage, TVLocalStorageAsync:window.TVLocalStorageAsync}},84015:(e,t,i)=>{"use strict";function s(e,t=!1){return!1}function r(e,t=!1){return e}i.d(t,{isOnMobileAppPage:()=>s,urlWithMobileAppParams:()=>r})},19334:(e,t,i)=>{"use strict";function s(){}i.d(t,{addPerfMark:()=>o});const r=console.timeStamp?console.timeStamp.bind(console):s,n=window.performance&&performance.mark?performance.mark.bind(performance):s;window.performance&&performance.measure&&performance.measure.bind(performance),window.performance&&performance.clearMarks&&performance.clearMarks.bind(performance);function o(e){r(e),n(e)}},14905:(e,t,i)=>{"use strict";function s(e){return e===r(e)}function r(e){const t=e.indexOf("$"),i=e.indexOf("@");return t<0&&i>=0?null:e.substring(Math.max(t+1,0),i>=0?i:e.length)}i.d(t,{isPineIdString:()=>s,extractPineId:()=>r})},16216:(e,t,i)=>{"use strict";i.r(t),i.d(t,{registerService:()=>o,unregisterService:()=>a,hasService:()=>l,service:()=>c,waitServiceRegistered:()=>h});var s=i(71668);const r={},n=new Map;function o(e,t){if(l(e))throw new Error("Service already registered");r[e.id]=t;const i=n.get(e.id);void 0!==i&&(n.delete(e.id),i.resolve(t))}function a(e){if(!l(e))throw new Error("Service not found");r[e.id]=void 0}function l(e){return void 0!==r[e.id]}function c(e){const t=r[e.id];if(void 0===t)throw new Error("ServiceLocator: Service "+e.id+" not found");return t}function h(e){if(l(e))return Promise.resolve(c(e));let t=n.get(e.id);return void 0===t&&(t=(0,s.createDeferredPromise)(),n.set(e.id,t)),t.promise}},56840:(e,t,i)=>{"use strict";e=i.nmd(e),i(49483);i(93043).fetch;var s=i(41225).regExpEscape,r=i(21097).TVXWindowEvents,n=i(11417).TVLocalStorage,o=i(26867),a=i(2484),l=["s.tradingview.com","betacdn.tradingview.com"],c=a.enabled("use_localstorage_for_settings"),h=window.TVSettings=function(){var e=!1,t=null;function i(){return!t&&c}try{e=!TradingView.onWidget()&&parent&&parent!==window&&!!parent.IS_DEMO_PAGE}catch(e){}if(e){var d={"widgetbar.layout-settings":{widgets:{},settings:{minimized:!0}},notShowMainWizard:!0},u=function(e,t,i){var s=d[e];return null==s?t:s},p=function(){};return{loaded:!1,loadedModel:!1,getValue:u,getJSON:u,getBool:u,getFloat:u,getInt:u,setValue:p,setJSON:p,remove:p,keys:function(){return Object.keys(d)},keysMask:function(){return[]},sync:p,onSync:{subscribe:function(){}}}}window.environment;var _,m=TradingView.onWidget()?"tradingview-widget":"tradingview",g=m+".",f={},v=[/^widgetbar\.widget\.watchlist.+/,/.+quicks$/,/^widgetbar\.layout-settings$/,/^ChartSideToolbarWidget\.visible$/,/^onwidget\.watchlist$/,/^domepanel.visible$/,/^orderpanel.visible$/,/^chart\.favoriteDrawings$/,/^chart\.favoriteDrawingsPosition$/,/^loadChartDialog.favorites$/,/^ChartFavoriteDrawingToolbarWidget\.visible/,/^trading\.chart\.proterty$/,/^trading_floating_toolbar\.position$/,/^trading\.orderWidgetMode\./,/^symbolWatermark$/,/^pinereference\.size$/,/^pinereference\.position$/,/^hint\.+/,/^ChartDrawingToolbarWidget\.visible/];function S(e){return g+e}function y(e){return e.substring(g.length)}function b(e,t){var i=f[e] -;return null==i?t:i}function w(e,t,i){i=i||{};var s=""+t;return f[e]!==s&&(f[e]=s,P(e)),i.forceFlush&&!_&&(_=setTimeout((function(){_=void 0,T()}),10)),h}function C(e,t){return t=t||{},null!=f[e]&&(delete f[e],P(e)),t.forceFlush&&T(),h}function P(e){if(t)null==f[e]?t.removeValue(e):t.setValue(e,f[e]);else if(i())try{null==f[e]?n.removeItem(S(e)):n.setItem(S(e),f[e])}catch(e){}else 0;r.emit("settings",JSON.stringify({key:e,value:f[e]}))}function T(e){}function x(){return Object.keys(f)}function I(e){for(var t=0;t=0;n--)e.test(i[n])&&r.push(i[n]),e.lastIndex=0;return r},sync:function(e){null!==e?(t?A(t.initialSettings||{}):i()?(function(){if(TradingView.onWidget()&&l.includes(window.location.host))for(var e="tradingview.",t=n.length;t--;){var i=n.key(t);if(0===i.indexOf(e)){var s=i.replace(e,m+".");n.setItem(s,n.getItem(i)),n.removeItem(i)}}}(),function(){f={};for(var e=!a.enabled("save_chart_properties_to_local_storage"),t=n.length;t--;){var i=n.key(t);if(i&&M(i)){var s=i.substring(g.length);e&&!I(s)||(f[s]=n.getItem(i))}}}()):A(e||{}),L.fire()):!0},onSync:L,setSettingsAdapter:function(e){t=e}}}();e&&e.exports&&(e.exports=h)},26843:(e,t,i)=>{"use strict";i.d(t,{StdTheme:()=>a.StdTheme,getStdChartTheme:()=>h,getStdThemeNames:()=>c,isStdTheme:()=>u,translateThemeName:()=>d});var s=i(44352),r=i(24377) +;return null==i?t:i}function w(e,t,i){i=i||{};var s=""+t;return f[e]!==s&&(f[e]=s,C(e)),i.forceFlush&&!_&&(_=setTimeout((function(){_=void 0,T()}),10)),h}function P(e,t){return t=t||{},null!=f[e]&&(delete f[e],C(e)),t.forceFlush&&T(),h}function C(e){if(t)null==f[e]?t.removeValue(e):t.setValue(e,f[e]);else if(i())try{null==f[e]?n.removeItem(S(e)):n.setItem(S(e),f[e])}catch(e){}else 0;r.emit("settings",JSON.stringify({key:e,value:f[e]}))}function T(e){}function x(){return Object.keys(f)}function I(e){for(var t=0;t=0;n--)e.test(i[n])&&r.push(i[n]),e.lastIndex=0;return r},sync:function(e){null!==e?(t?A(t.initialSettings||{}):i()?(function(){if(TradingView.onWidget()&&l.includes(window.location.host))for(var e="tradingview.",t=n.length;t--;){var i=n.key(t);if(0===i.indexOf(e)){var s=i.replace(e,m+".");n.setItem(s,n.getItem(i)),n.removeItem(i)}}}(),function(){f={};for(var e=!a.enabled("save_chart_properties_to_local_storage"),t=n.length;t--;){var i=n.key(t);if(i&&M(i)){var s=i.substring(g.length);e&&!I(s)||(f[s]=n.getItem(i))}}}()):A(e||{}),L.fire()):!0},onSync:L,setSettingsAdapter:function(e){t=e}}}();e&&e.exports&&(e.exports=h)},26843:(e,t,i)=>{"use strict";i.d(t,{StdTheme:()=>a.StdTheme,getStdChartTheme:()=>h,getStdThemeNames:()=>c,isStdTheme:()=>u,translateThemeName:()=>d});var s=i(44352),r=i(24377) ;const n=JSON.parse('{"content":{"chartProperties":{"scalesProperties":{"textColor":"#131722","lineColor":"rgba(42, 46, 57, 0)","backgroundColor":"#ffffff"},"paneProperties":{"vertGridProperties":{"color":"rgba(42, 46, 57, 0.06)"},"horzGridProperties":{"color":"rgba(42, 46, 57, 0.06)"},"crossHairProperties":{"color":"#9598A1"},"background":"#ffffff","backgroundGradientStartColor":"#ffffff","backgroundGradientEndColor":"#ffffff","separatorColor":"#E0E3EB"}},"sessions":{"graphics":{"backgrounds":{"outOfSession":{"color":"#2962FF","transparency":92},"preMarket":{"color":"#FF9800","transparency":92},"postMarket":{"color":"#2962FF","transparency":92}},"vertlines":{"sessBreaks":{"color":"#4985e7","style":2,"width":1}}}},"mainSourceProperties":{"baseLineColor":"#B2B5BE","candleStyle":{"borderColor":"#378658","upColor":"#089981","wickColor":"#737375","wickUpColor":"#089981","wickDownColor":"#F23645","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645"},"haStyle":{"borderColor":"#378658","upColor":"#089981","wickColor":"#737375","wickUpColor":"#089981","wickDownColor":"#F23645","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645"},"barStyle":{"downColor":"#F23645","upColor":"#089981"},"pnfStyle":{"downColor":"#F23645","upColor":"#089981","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"},"baselineStyle":{"baselineColor":"#758696","topFillColor1":"rgba(8, 153, 129, 0.28)","topFillColor2":"rgba(8, 153, 129, 0.05)","bottomFillColor1":"rgba(242, 54, 69, 0.05)","bottomFillColor2":"rgba(242, 54, 69, 0.28)","topLineColor":"#089981","bottomLineColor":"#F23645"},"areaStyle":{"transparency":100,"color1":"rgba(41, 98, 255, 0.28)","color2":"#2962FF","linecolor":"#2962FF","linewidth":2,"linestyle":0},"hiloStyle":{"color":"#2962FF","borderColor":"#2962FF","labelColor":"#2962FF"},"columnStyle":{"upColor":"rgba(8, 153, 129, 0.5)","downColor":"rgba(242, 54, 69, 0.5)","priceSource":"close"},"renkoStyle":{"upColor":"#089981","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae","borderUpColorProjection":"#a9dcc3","borderDownColorProjection":"#f5a6ae","wickUpColor":"#089981","wickDownColor":"#F23645"},"lineStyle":{"color":"#2962FF","linewidth":2,"linestyle":0},"kagiStyle":{"downColor":"#F23645","upColor":"#089981","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"},"pbStyle":{"upColor":"#089981","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae","borderUpColorProjection":"#a9dcc3","borderDownColorProjection":"#f5a6ae"},"rangeStyle":{"upColor":"#089981","downColor":"#F23645","upColorProjection":"#a9dcc3","downColorProjection":"#f5a6ae"}}}}'),o=JSON.parse('{"content":{"chartProperties":{"scalesProperties":{"textColor":"#B2B5BE","lineColor":"rgba(240, 243, 250, 0)","backgroundColor":"#ffffff"},"paneProperties":{"vertGridProperties":{"color":"rgba(240, 243, 250, 0.06)"},"horzGridProperties":{"color":"rgba(240, 243, 250, 0.06)"},"crossHairProperties":{"color":"#9598A1"},"background":"#131722","backgroundGradientStartColor":"#181C27","backgroundGradientEndColor":"#131722","backgroundType":"gradient","separatorColor":"#2A2E39"}},"sessions":{"graphics":{"backgrounds":{"outOfSession":{"color":"#2962FF","transparency":92},"preMarket":{"color":"#FF9800","transparency":92},"postMarket":{"color":"#2962FF","transparency":92}},"vertlines":{"sessBreaks":{"color":"#4985e7","style":2,"width":1}}}},"mainSourceProperties":{"baseLineColor":"#5d606b","candleStyle":{"borderColor":"#378658","upColor":"#089981","wickColor":"#B5B5B8","wickUpColor":"#089981","wickDownColor":"#F23645","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645"},"haStyle":{"borderColor":"#378658","upColor":"#089981","wickColor":"#B5B5B8","wickUpColor":"#089981","wickDownColor":"#F23645","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645"},"barStyle":{"downColor":"#F23645","upColor":"#089981"},"pnfStyle":{"downColor":"#F23645","upColor":"#089981","upColorProjection":"#336854","downColorProjection":"#7f323f"},"baselineStyle":{"baselineColor":"#758696","topFillColor1":"rgba(8, 153, 129, 0.28)","topFillColor2":"rgba(8, 153, 129, 0.05)","bottomFillColor1":"rgba(242, 54, 69, 0.05)","bottomFillColor2":"rgba(242, 54, 69, 0.28)","topLineColor":"#089981","bottomLineColor":"#F23645"},"areaStyle":{"transparency":100,"color1":"rgba(41, 98, 255, 0.28)","color2":"#2962FF","linecolor":"#2962FF","linewidth":2,"linestyle":0},"hiloStyle":{"color":"#2962FF","borderColor":"#2962FF","labelColor":"#2962FF"},"columnStyle":{"upColor":"rgba(8, 153, 129, 0.5)","downColor":"rgba(242, 54, 69, 0.5)","priceSource":"close"},"renkoStyle":{"upColor":"#089981","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645","upColorProjection":"#336854","downColorProjection":"#7f323f","borderUpColorProjection":"#336854","borderDownColorProjection":"#7f323f","wickUpColor":"#089981","wickDownColor":"#F23645"},"lineStyle":{"color":"#2962FF","linewidth":2,"linestyle":0},"kagiStyle":{"downColor":"#F23645","upColor":"#089981","upColorProjection":"#336854","downColorProjection":"#7f323f"},"pbStyle":{"upColor":"#089981","downColor":"#F23645","borderUpColor":"#089981","borderDownColor":"#F23645","upColorProjection":"#336854","downColorProjection":"#7f323f","borderUpColorProjection":"#336854","borderDownColorProjection":"#7f323f"},"rangeStyle":{"upColor":"#089981","downColor":"#F23645","upColorProjection":"#336854","downColorProjection":"#7f323f"}}}}') -;var a=i(24633);function l(){return{[a.StdTheme.Light]:JSON.parse(JSON.stringify(n)),[a.StdTheme.Dark]:JSON.parse(JSON.stringify(o))}}function c(){return[a.StdTheme.Light,a.StdTheme.Dark]}function h(e){return l()[e]}function d(e){return{[a.StdTheme.Light]:s.t(null,{context:"colorThemeName"},i(69841)),[a.StdTheme.Dark]:s.t(null,{context:"colorThemeName"},i(14642))}[e]||e}function u(e){const t=l();return c().some((i=>p(t[i],e)))}function p(e,t){let i=e.content===t.content;return function(e={},t){try{_(e,[],t)}catch(e){return}}(e.content,((e,s)=>{const n=function(e,t={}){let i=t;for(let t=0;t{"use strict";var s;i.d(t,{StdTheme:()=>s}),function(e){e.Light="light",e.Dark="dark"}(s||(s={}))},8840:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DEFAULT_THEME:()=>p,extractThemeFromModel:()=>N,getCurrentTheme:()=>S,getStdTheme:()=>A,getStdThemeNames:()=>I,getStdThemedValue:()=>L,getTheme:()=>T,getThemeNames:()=>x,getThemedColor:()=>y,isPublicTheme:()=>v,isStdTheme:()=>R,isStdThemeName:()=>M,isStdThemedDefaultValue:()=>k,isThemeExist:()=>V,loadTheme:()=>b,removeTheme:()=>D,restoreTheme:()=>w,saveTheme:()=>E,savedThemeName:()=>C,syncTheme:()=>P,themes:()=>f,translateStdThemeName:()=>B});var s=i(24377),r=i(64548),n=i(56840);function o(){return(0,n.getValue)("current_theme.name")||null}var a=i(93043);const l=(0,i(98351).getLogger)("Themes.Provider");let c=null;function h(e){return(0,a.fetch)("/theme/?themeName="+encodeURIComponent(e),{credentials:"include",method:"GET"}).then((e=>e.json())).then((e=>{const t={};return e.content&&(t.content=JSON.parse(e.content)),t}))}var d=i(26843),u=i(45345);const p="light";var _=i(44352) +;var a=i(24633);function l(){return{[a.StdTheme.Light]:JSON.parse(JSON.stringify(n)),[a.StdTheme.Dark]:JSON.parse(JSON.stringify(o))}}function c(){return[a.StdTheme.Light,a.StdTheme.Dark]}function h(e){return l()[e]}function d(e){return{[a.StdTheme.Light]:s.t(null,{context:"colorThemeName"},i(69841)),[a.StdTheme.Dark]:s.t(null,{context:"colorThemeName"},i(14642))}[e]||e}function u(e){const t=l();return c().some((i=>p(t[i],e)))}function p(e,t){let i=e.content===t.content;return function(e={},t){try{_(e,[],t)}catch(e){return}}(e.content,((e,s)=>{const n=function(e,t={}){let i=t;for(let t=0;t{"use strict";var s;i.d(t,{StdTheme:()=>s}),function(e){e.Light="light",e.Dark="dark"}(s||(s={}))},8840:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DEFAULT_THEME:()=>p,extractThemeFromModel:()=>N,getCurrentTheme:()=>S,getStdTheme:()=>A,getStdThemeNames:()=>I,getStdThemedValue:()=>L,getTheme:()=>T,getThemeNames:()=>x,getThemedColor:()=>y,isPublicTheme:()=>v,isStdTheme:()=>R,isStdThemeName:()=>M,isStdThemedDefaultValue:()=>k,isThemeExist:()=>B,loadTheme:()=>b,removeTheme:()=>D,restoreTheme:()=>w,saveTheme:()=>E,savedThemeName:()=>P,syncTheme:()=>C,themes:()=>f,translateStdThemeName:()=>V});var s=i(24377),r=i(64548),n=i(56840);function o(){return(0,n.getValue)("current_theme.name")||null}var a=i(93043);const l=(0,i(98351).getLogger)("Themes.Provider");let c=null;function h(e){return(0,a.fetch)("/theme/?themeName="+encodeURIComponent(e),{credentials:"include",method:"GET"}).then((e=>e.json())).then((e=>{const t={};return e.content&&(t.content=JSON.parse(e.content)),t}))}var d=i(26843),u=i(45345);const p="light";var _=i(44352) ;const m=JSON.parse('{"color-header-bg":"color-black","color-body-bg":"color-black","color-body-secondary-bg":"color-cold-gray-900","color-bg-primary":"color-cold-gray-850","color-bg-primary-hover":"color-cold-gray-800","color-bg-secondary":"color-cold-gray-900","color-bg-highlight":"color-cold-gray-900","color-bg-scroll-buttons":"color-cold-gray-800","color-legacy-bg-scroll-buttons":"color-cold-gray-550","color-legacy-bg-widget":"color-cold-gray-900","color-text-primary":"color-cold-gray-200","color-text-secondary":"color-cold-gray-450","color-text-tertiary":"color-cold-gray-400","color-text-disabled":"color-cold-gray-650","color-accent-content":"color-white","color-divider":"color-cold-gray-700","color-divider-hover":"color-cold-gray-800","color-divider-secondary":"color-cold-gray-800","color-box-shadow":"color-cold-gray-900","color-active-hover-text":"color-cold-gray-200","color-alert-text":"color-cold-gray-200","color-border":"color-cold-gray-750","color-border-chat-fields":"color-cold-gray-750","color-border-hover":"color-cold-gray-650","color-border-table":"color-cold-gray-800","color-brand":"color-tv-blue-500","color-brand-hover":"color-tv-blue-600","color-brand-active":"color-tv-blue-700","color-button-hover-bg":"color-cold-gray-850","color-chart-page-bg":"color-cold-gray-800","color-common-tooltip-bg":"color-cold-gray-750","color-danger":"color-ripe-red-600","color-danger-hover":"color-ripe-red-500","color-danger-active":"color-ripe-red-400","color-depthrenderer-fill-style":"color-cold-gray-150","color-depthrenderer-stroke-style":"color-cold-gray-650","color-disabled-border-and-color":"color-cold-gray-800","color-disabled-input":"color-cold-gray-750","color-empty-container-message":"color-cold-gray-450","color-highlight-new":"color-tv-blue-a800","color-icons":"color-cold-gray-450","color-input-bg":"color-cold-gray-800","color-input-textarea-readonly":"color-cold-gray-650","color-input-placeholder-text":"color-cold-gray-700","color-input-publish-bg":"color-cold-gray-900","color-item-active-blue":"color-tv-blue-a900","color-item-hover-active-bg":"color-cold-gray-800","color-item-hover-bg":"color-cold-gray-800","color-item-hover-blue":"color-tv-blue-a800","color-item-selected-blue":"color-tv-blue-a800","color-item-active-text":"color-cold-gray-200","color-item-active-bg":"color-tv-blue-500","color-link":"color-tv-blue-500","color-link-hover":"color-tv-blue-600","color-link-active":"color-tv-blue-700","color-list-item":"color-cold-gray-450","color-list-nth-child-bg":"color-cold-gray-850","color-news-highlight":"color-cold-gray-800","color-pane-bg":"color-cold-gray-900","color-pane-secondary-bg":"color-cold-gray-850","color-placeholder":"color-cold-gray-650","color-popup-menu-item-hover-bg":"color-cold-gray-800","color-popup-menu-separator":"color-cold-gray-700","color-row-hover-active-bg":"color-cold-gray-800","color-sb-scrollbar-body-bg":"color-cold-gray-650","color-screener-description":"color-cold-gray-200","color-section-separator-border":"color-cold-gray-750","color-search-button-hover":"color-cold-gray-700","color-separator-table-chat":"color-cold-gray-750","color-success":"color-minty-green-700","color-success-hover":"color-minty-green-600","color-success-active":"color-minty-green-500","color-tag-active-bg":"color-cold-gray-750","color-tag-hover-bg":"color-cold-gray-800","color-text-regular":"color-cold-gray-200","color-toolbar-button-text":"color-cold-gray-200","color-toolbar-button-text-hover":"color-cold-gray-200","color-toolbar-button-text-active":"color-tv-blue-500","color-toolbar-button-text-active-hover":"color-tv-blue-600","color-toolbar-button-background-hover":"color-cold-gray-800","color-toolbar-button-background-secondary-hover":"color-cold-gray-750","color-toolbar-button-background-active":"color-tv-blue-a900","color-toolbar-button-background-active-hover":"color-tv-blue-a800","color-toolbar-toggle-button-background-active":"color-tv-blue-500","color-toolbar-toggle-button-background-active-hover":"color-tv-blue-600","color-toolbar-toggle-button-icon":"color-cold-gray-650","color-toolbar-interactive-element-text-normal":"color-cold-gray-200","color-toolbar-interactive-element-text-hover":"color-cold-gray-250","color-toolbar-opened-element-bg":"color-cold-gray-800","color-toolbar-divider-background":"color-cold-gray-700","color-tooltip-bg":"color-cold-gray-750","color-tv-button-checked":"color-cold-gray-500","color-tv-dialog-caption":"color-cold-gray-50","color-tv-dropdown-item-hover-bg":"color-cold-gray-800","color-underlined-text":"color-cold-gray-300","color-widget-pages-bg":"color-cold-gray-900","color-warning":"color-tan-orange-700","color-forex-icon":"color-white","color-list-item-active-bg":"color-tv-blue-500","color-list-item-hover-bg":"color-cold-gray-800","color-list-item-text":"color-cold-gray-200","color-price-axis-label-back":"color-cold-gray-800","color-price-axis-label-text":"color-cold-gray-500","color-price-axis-gear":"color-cold-gray-500","color-price-axis-gear-hover":"color-cold-gray-400","color-price-axis-highlight":"color-cold-gray-800","color-bid":"color-tv-blue-500","color-scroll-bg":"color-cold-gray-750","color-scroll-border":"color-cold-gray-850","color-widget-border":"color-cold-gray-800","color-scroll-buttons-arrow":"color-white","color-control-intent-default":"color-cold-gray-650","color-control-intent-success":"color-minty-green-500","color-control-intent-primary":"color-tv-blue-500","color-control-intent-warning":"color-tan-orange-500","color-control-intent-danger":"color-ripe-red-700","color-growing":"color-minty-green-500","color-falling":"color-ripe-red-500","color-goto-label-background":"color-cold-gray-650","color-pre-market":"color-tan-orange-600","color-pre-market-bg":"color-tan-orange-400","color-post-market":"color-tv-blue-500","color-post-market-bg":"color-tv-blue-400","color-market-open":"color-minty-green-500","color-market-open-bg":"color-minty-green-400","color-market-closed":"color-cold-gray-400","color-market-holiday":"color-cold-gray-400","color-market-expired":"color-ripe-red-500","color-invalid-symbol":"color-ripe-red-400","color-invalid-symbol-hover":"color-ripe-red-500","color-replay-mode":"color-tv-blue-500","color-replay-mode-point-select":"color-cold-gray-250","color-replay-mode-icon":"color-tv-blue-50","color-replay-mode-hover":"color-tv-blue-600","color-notaccurate-mode":"color-berry-pink-700","color-notaccurate-mode-bg":"color-berry-pink-400","color-delay-mode":"color-tan-orange-700","color-delay-mode-bg":"color-tan-orange-400","color-eod-mode":"color-grapes-purple-700","color-eod-mode-bg":"color-grapes-purple-400","color-data-problem":"color-ripe-red-600","color-data-problem-bg":"color-ripe-red-400","color-data-problem-hover":"color-ripe-red-500","color-list-item-bg-highlighted":"color-tv-blue-a900","color-list-item-bg-selected":"color-tv-blue-a800","color-list-item-bg-highlighted-hover":"color-tv-blue-a800","color-list-item-bg-selected-hover":"color-tv-blue-a700","color-screener-header-bg":"color-cold-gray-850","color-screener-header-bg-hover":"color-cold-gray-800","color-overlay":"color-cold-gray-950","color-boost-button-content-selected":"color-tv-blue-100","color-boost-button-content-hover":"color-white","color-boost-button-bg-hover":"color-cold-gray-750","color-boost-button-border-hover":"color-cold-gray-750","color-boost-button-border-default":"color-cold-gray-700","color-card-border":"color-cold-gray-700","color-card-border-hover":"color-cold-gray-600","color-background-special-primary":"color-black","color-stroke-special-primary":"color-cold-gray-800","color-selection-bg":"color-tv-blue-a700"}') -;var g=i(7394);const f={[d.StdTheme.Light]:{name:d.StdTheme.Light,label:()=>_.t(null,{context:"colorThemeName"},i(69841)),order:2,getThemedColor:e=>(0,g.getHexColorByName)(e)},[d.StdTheme.Dark]:{name:d.StdTheme.Dark,label:()=>_.t(null,{context:"colorThemeName"},i(14642)),order:1,getThemedColor:e=>{const t=m[e]||e;return(0,g.getHexColorByName)(t)}}};function v(e){return!e.isPrivate}function S(){return f[u.watchedTheme.value()]||f[p]}function y(e){return S().getThemedColor(e)}async function b(e,t){const{themeName:i,standardTheme:s,syncState:n=!0,noUndo:o=!1,applyOverrides:a=!1}=t,l=await(s?Promise.resolve(A(i)):T(i)),c=!s;if(void 0!==l.content){const t=!s;a&&(void 0!==(h=l.content).chartProperties&&(0,r.applyDefaultsOverrides)(h.chartProperties),void 0!==h.mainSourceProperties&&(0,r.applyDefaultsOverrides)(h.mainSourceProperties,void 0,!0,"mainSeriesProperties")),await e.applyTheme({theme:l.content,onlyActiveChart:t,restoreNonThemeDefaults:c,themeName:i,standardTheme:s,syncState:n,noUndo:o})}var h;return l}function w(){(0,u.setTheme)(o()||p)}function C(){return o()}function P(){var e;e=S().name,(0,n.setValue)("current_theme.name",e,{forceFlush:!0})}function T(e){return h(e)}function x(){return c||(0,a.fetch)("/themes/",{credentials:"include",method:"GET"}).then((e=>(c=e.json(),c)))}function I(){return d.getStdThemeNames()}function M(e){return I().includes(e)}function A(e){return d.getStdChartTheme(e)||{content:void 0}}function L(e,t){const i=t||S().name,s=d.getStdChartTheme(i),r=0!==e.length&&e.split(".");return s&&s.content&&r?r.reduce(((e,t)=>e[t]),s.content):null}function k(e,t,i){const r=L(e,i);return null!==r&&(0,s.areEqualRgba)((0,s.parseRgba)(r),(0,s.parseRgba)(String(t)))}function E(e,t){return function(e,t){const i=new FormData;return i.append("content",JSON.stringify(t)),i.append("name",e),c=null,(0,a.fetch)("/save-theme/",{credentials:"include",method:"POST",body:i}).then((e=>e.json()),(e=>l.logError(e)))}(e,t)}function D(e){return function(e){const t=new FormData;return t.append("name",e),c=null,(0,a.fetch)("/remove-theme/",{credentials:"include",method:"POST",body:t}).then((e=>e.json()),(e=>l.logError(e)))}(e)}function V(e){return function(e){return h(e).then((e=>Boolean(e.content)))}(e)}function B(e){return d.translateThemeName(e)}function R(e){return d.isStdTheme(e)}function N(e){return{content:{chartProperties:{paneProperties:e.model().properties().childs().paneProperties.state(),scalesProperties:e.model().properties().childs().scalesProperties.state()},sessions:e.model().sessions().properties().state(),mainSourceProperties:e.model().mainSeries().properties().state(),version:e.model().version()}}}},45345:(e,t,i)=>{"use strict";i.d(t,{setTheme:()=>n,watchedTheme:()=>r});var s=i(40549);const r=new(i.n(s)());function n(e){r.setValue(e)}r.subscribe((e=>{!function(e,t=window){const i="theme-"+e,s=t.document.documentElement.classList;for(const e of Array.from(s))e.startsWith("theme-")&&e!==i&&s.remove(e);s.add(i)}(e,window)}))},51768:(e,t,i)=>{"use strict";i.d(t,{trackEvent:()=>l,disableTrackingEvents:()=>c}) -;var s=i(76422),r=i(2484);const n=(0,i(98351).getLogger)("Common.TrackEvent"),o=[/Study_(Drawing)_(.*)/,/(Study)_(.*)@tv-basicstudies/,/(Study)_(.*)/,/(Chart Style) (.*)/];let a=!1;const l=(e,t,i)=>{if(a)return;if(r.enabled("charting_library_base"))return void((e,t,i)=>{t=t||e||i||"";let r="";for(let e=0;e{"use strict";i.d(t,{TVXWindowEvents:()=>o});i(93731);var s=i(98351),r=i(11417);const n=(0,s.getLogger)("XWindowEvents");var o;!function(e){const t="tvxwevents.",i={};let s;window.BroadcastChannel?(s=new BroadcastChannel("tvxwevents"),s.addEventListener("message",(function(e){const{data:{event:t,value:s}}=e;i[t]&&i[t].forEach((e=>{e(s)}))})),function(){const e=[],i=performance.now();for(let i=0;i{t(e.newValue)}));r.TVLocalStorage.removeItem(n)})),e.on=function(e,t){i[e]||(i[e]=[]),i[e].push(t)},e.off=function(e,t){if(!i[e])return;const s=i[e].indexOf(t);-1!==s&&(1===i[e].length?delete i[e]:i[e].splice(s,1))},e.emit=function(e,i=Date.now()){try{s?s.postMessage({event:e,value:i}):r.TVLocalStorage.setItem(t+e,i.toString())}catch(e){n.logError(e.message)}}}(o||(o={}))},44352:(e,t,i)=>{"use strict";i.r(t),i.d(t,{t:()=>s});i(93731);function s(e,t={},n){if(null===e)return Array.isArray(n)?(n[r(t.count)]||n[0]).format(t.replace||t):"object"==typeof n?s(null,t,n[i.g.language]||n.en):s(n,t);if(n&&e){const i=`${e}${t.context?`_${t.context}`:""}`;if(n[i])return s(null,t,n[i])}if("number"==typeof e)return e.toString();if("string"!=typeof e)return"";if(i.g.customTranslateFunction){const s=i.g.customTranslateFunction(e,t);if(null!==s)return s}return(t.plural&&1!=+t.count?t.plural:e).format(t.replace||t)}const r={ca_ES:(e=1)=>+(1!=e),cs:(e=1)=>+(1==e?0:e>=2&&e<=4?1:2),el:(e=1)=>+(1!=e),da_DK:(e=1)=>+(1!=e),en:(e=1)=>+(1!=e),et_EE:(e=1)=>+(1!=e),fa:(e=1)=>0,hu_HU:(e=1)=>0,id_ID:(e=1)=>0,it:(e=1)=>+(1!=e),ms_MY:(e=1)=>0,no:(e=1)=>+(1!=e),nl_NL:(e=1)=>+(1!=e),ro:(e=1)=>+(1==e?0:e%100>19||e%100==0&&0!=e?2:1),sk_SK:(e=1)=>+(1==e?0:e>=2&&e<=4?1:2), -sv:(e=1)=>+(1!=e),zh:(e=1)=>0,zh_TW:(e=1)=>0,de:(e=1)=>+(1!=e),es:(e=1)=>+(1!=e),fr:(e=1)=>+(e>1),he_IL:(e=1)=>+(1==e?0:2==e?1:e>10&&e%10==0?2:3),ko:(e=1)=>0,ja:(e=1)=>0,pl:(e=1)=>+(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),pt:(e=1)=>+(1!=e),tr:(e=1)=>+(1!=e),vi:(e=1)=>0,ar:(e=1)=>+(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11&&e%100<=99?4:5),ru:(e=1)=>+(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),th:(e=1)=>0}[i.g.language]},68121:(e,t,i)=>{"use strict";i.r(t),i.d(t,{activateKeyPressHandler:()=>m,showDialog:()=>g});const s=[];let r=null;function n(e){for(let t=0;t=0&&!0!==s[t].func(e);t--);}window.addEventListener("keypress",o,!1);var a=i(36309),l=i(2484),c=i(84603),h=i(28105),d=i(90877),u=i(51768);let p=null;function _(e){if(!(0,a.globalKeypressMatches)(e))return!1;e.preventDefault();const t=String.fromCharCode(e.charCode);return l.enabled("show_interval_dialog_on_key_press")&&function(e){return/[1-9]/.test(e)}(t)?(0,c.showChangeIntervalDialogAsync)({initVal:t}):l.enabled("symbol_search_hot_key")&&(g({defaultValue:t,selectSearchOnInit:!1,source:"keyboard"}),(0,u.trackEvent)("GUI","SS","hotkey")),!0}function m(){(0,h.loadChangeIntervalDialog)(),function(e,t){const i={name:e,func:t},r=n(i.name);r>-1&&s.splice(r,1),s.unshift(i)}("symbolEdit",_)}function g(e){const t=p=(0,d.loadNewSymbolSearch)().then((i=>{t===p&&i.showDefaultSearchDialog(e)}));return t}},78136:(e,t,i)=>{"use strict";let s;function r(){return s}function n(e){s=e}i.d(t,{getSearchRequestDelay:()=>r,setSearchRequestDelay:()=>n})},52092:(e,t,i)=>{"use strict";i.d(t,{CLOSE_POPUPS_AND_DIALOGS_COMMAND:()=>s});const s="CLOSE_POPUPS_AND_DIALOGS_COMMAND"},42120:(e,t,i)=>{"use strict";i.d(t,{CompareDialogRenderer:()=>n});var s=i(88279);var r=i(76422);class n extends s.DialogRenderer{constructor(e){super(),this._dialog=null,this._subscribe=e=>{this._setVisibility(e)},this._chartWidgetCollection=e}show(){this._load().then((e=>{var t,i;null===(t=this._dialog)||void 0===t||t.hide(),null===(i=this._dialog)||void 0===i||i.visible().unsubscribe(this._subscribe),this._dialog=e,e.visible().subscribe(this._subscribe),e.show(),r.emit("compare_add")}))}hide(){var e;null===(e=this._dialog)||void 0===e||e.hide()}_load(){return Promise.all([i.e(7271).then(i.bind(i,56217)),Promise.all([i.e(8230),i.e(5384),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(6092),i.e(8825),i.e(8271),i.e(5761),i.e(8707),i.e(3261),i.e(537),i.e(1271),i.e(962),i.e(2842),i.e(3016),i.e(3988),i.e(731)]).then(i.bind(i,89035))]).then((([e,t])=>{const i=new e.CompareModel(this._chartWidgetCollection);return t.getCompareDialogRenderer(i)}))}}},3615:(e,t,i)=>{"use strict";async function s(e,t){const s=await Promise.all([i.e(8230),i.e(5384),i.e(4819),i.e(8619),i.e(346),i.e(1140),i.e(6812),i.e(2754),i.e(962),i.e(3016),i.e(535),i.e(8890)]).then(i.bind(i,70493));return s.showSimpleDialog(e,s.renameModule,t)}async function r(e,t){ +;var g=i(7394);const f={[d.StdTheme.Light]:{name:d.StdTheme.Light,label:()=>_.t(null,{context:"colorThemeName"},i(69841)),order:2,getThemedColor:e=>(0,g.getHexColorByName)(e)},[d.StdTheme.Dark]:{name:d.StdTheme.Dark,label:()=>_.t(null,{context:"colorThemeName"},i(14642)),order:1,getThemedColor:e=>{const t=m[e]||e;return(0,g.getHexColorByName)(t)}}};function v(e){return!e.isPrivate}function S(){return f[u.watchedTheme.value()]||f[p]}function y(e){return S().getThemedColor(e)}async function b(e,t){const{themeName:i,standardTheme:s,syncState:n=!0,noUndo:o=!1,applyOverrides:a=!1,onlyActiveChart:l=!1}=t,c=await(s?Promise.resolve(A(i)):T(i)),h=!s;if(void 0!==c.content){const t=!s||l;a&&(void 0!==(d=c.content).chartProperties&&(0,r.applyDefaultsOverrides)(d.chartProperties),void 0!==d.mainSourceProperties&&(0,r.applyDefaultsOverrides)(d.mainSourceProperties,void 0,!0,"mainSeriesProperties")),await e.applyTheme({theme:c.content,onlyActiveChart:t,restoreNonThemeDefaults:h,themeName:i,standardTheme:s,syncState:n,noUndo:o})}var d;return c}function w(){(0,u.setTheme)(o()||p)}function P(){return o()}function C(){var e;e=S().name,(0,n.setValue)("current_theme.name",e,{forceFlush:!0})}function T(e){return h(e)}function x(){return c||(0,a.fetch)("/themes/",{credentials:"include",method:"GET"}).then((e=>(c=e.json(),c)))}function I(){return d.getStdThemeNames()}function M(e){return I().includes(e)}function A(e){return d.getStdChartTheme(e)||{content:void 0}}function L(e,t){const i=t||S().name,s=d.getStdChartTheme(i),r=0!==e.length&&e.split(".");return s&&s.content&&r?r.reduce(((e,t)=>e[t]),s.content):null}function k(e,t,i){const r=L(e,i);return null!==r&&(0,s.areEqualRgba)((0,s.parseRgba)(r),(0,s.parseRgba)(String(t)))}function E(e,t){return function(e,t){const i=new FormData;return i.append("content",JSON.stringify(t)),i.append("name",e),c=null,(0,a.fetch)("/save-theme/",{credentials:"include",method:"POST",body:i}).then((e=>e.json()),(e=>l.logError(e)))}(e,t)}function D(e){return function(e){const t=new FormData;return t.append("name",e),c=null,(0,a.fetch)("/remove-theme/",{credentials:"include",method:"POST",body:t}).then((e=>e.json()),(e=>l.logError(e)))}(e)}function B(e){return function(e){return h(e).then((e=>Boolean(e.content)))}(e)}function V(e){return d.translateThemeName(e)}function R(e){return d.isStdTheme(e)}function N(e){return{content:{chartProperties:{paneProperties:e.model().properties().childs().paneProperties.state(),scalesProperties:e.model().properties().childs().scalesProperties.state()},sessions:e.model().sessions().properties().state(),mainSourceProperties:e.model().mainSeries().properties().state(),version:e.model().version()}}}},45345:(e,t,i)=>{"use strict";i.d(t,{setTheme:()=>n,watchedTheme:()=>r});var s=i(40549);const r=new(i.n(s)());function n(e){r.setValue(e)}r.subscribe((e=>{!function(e,t=window){const i="theme-"+e,s=t.document.documentElement.classList;for(const e of Array.from(s))e.startsWith("theme-")&&e!==i&&s.remove(e);s.add(i)}(e,window)}))},51768:(e,t,i)=>{"use strict";i.d(t,{trackEvent:()=>l, +disableTrackingEvents:()=>c});var s=i(76422),r=i(2484);const n=(0,i(98351).getLogger)("Common.TrackEvent"),o=[/Study_(Drawing)_(.*)/,/(Study)_(.*)@tv-basicstudies/,/(Study)_(.*)/,/(Chart Style) (.*)/];let a=!1;const l=(e,t,i)=>{if(a)return;if(r.enabled("charting_library_base"))return void((e,t,i)=>{t=t||e||i||"";let r="";for(let e=0;e{"use strict";i.d(t,{TVXWindowEvents:()=>o});i(93731);var s=i(98351),r=i(11417);const n=(0,s.getLogger)("XWindowEvents");var o;!function(e){const t="tvxwevents.",i={};let s;window.BroadcastChannel?(s=new BroadcastChannel("tvxwevents"),s.addEventListener("message",(function(e){const{data:{event:t,value:s}}=e;i[t]&&i[t].forEach((e=>{e(s)}))})),function(){const e=[],i=performance.now();for(let i=0;i{t(e.newValue)}));r.TVLocalStorage.removeItem(n)})),e.on=function(e,t){i[e]||(i[e]=[]),i[e].push(t)},e.off=function(e,t){if(!i[e])return;const s=i[e].indexOf(t);-1!==s&&(1===i[e].length?delete i[e]:i[e].splice(s,1))},e.emit=function(e,i=Date.now()){try{s?s.postMessage({event:e,value:i}):r.TVLocalStorage.setItem(t+e,i.toString())}catch(e){n.logError(e.message)}}}(o||(o={}))},44352:(e,t,i)=>{"use strict";i.r(t),i.d(t,{t:()=>s});i(93731);function s(e,t={},n){if(null===e)return Array.isArray(n)?(n[r(t.count)]||n[0]).format(t.replace||t):"object"==typeof n?s(null,t,n[i.g.language]||n.en):s(n,t);if(n&&e){const i=`${e}${t.context?`_${t.context}`:""}`;if(n[i])return s(null,t,n[i])}if("number"==typeof e)return e.toString();if("string"!=typeof e)return"";if(i.g.customTranslateFunction){const s=i.g.customTranslateFunction(e,t);if(null!==s)return s}return(t.plural&&1!=+t.count?t.plural:e).format(t.replace||t)}const r={ca_ES:(e=1)=>+(1!=e),cs:(e=1)=>+(1==e?0:e>=2&&e<=4?1:2),el:(e=1)=>+(1!=e),da_DK:(e=1)=>+(1!=e),en:(e=1)=>+(1!=e),et_EE:(e=1)=>+(1!=e),fa:(e=1)=>0,hu_HU:(e=1)=>0,id_ID:(e=1)=>0,it:(e=1)=>+(1!=e),ms_MY:(e=1)=>0,no:(e=1)=>+(1!=e),nl_NL:(e=1)=>+(1!=e),ro:(e=1)=>+(1==e?0:e%100>19||e%100==0&&0!=e?2:1), +sk_SK:(e=1)=>+(1==e?0:e>=2&&e<=4?1:2),sv:(e=1)=>+(1!=e),zh:(e=1)=>0,zh_TW:(e=1)=>0,de:(e=1)=>+(1!=e),es:(e=1)=>+(1!=e),fr:(e=1)=>+(e>1),he_IL:(e=1)=>+(1==e?0:2==e?1:e>10&&e%10==0?2:3),ko:(e=1)=>0,ja:(e=1)=>0,pl:(e=1)=>+(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),pt:(e=1)=>+(1!=e),tr:(e=1)=>+(1!=e),vi:(e=1)=>0,ar:(e=1)=>+(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11&&e%100<=99?4:5),ru:(e=1)=>+(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),th:(e=1)=>0}[i.g.language]},68121:(e,t,i)=>{"use strict";i.r(t),i.d(t,{activateKeyPressHandler:()=>m,showDialog:()=>g});const s=[];let r=null;function n(e){for(let t=0;t=0&&!0!==s[t].func(e);t--);}window.addEventListener("keypress",o,!1);var a=i(36309),l=i(2484),c=i(84603),h=i(28105),d=i(90877),u=i(51768);let p=null;function _(e){if(!(0,a.globalKeypressMatches)(e))return!1;e.preventDefault();const t=String.fromCharCode(e.charCode);return l.enabled("show_interval_dialog_on_key_press")&&function(e){return/[1-9]/.test(e)}(t)?(0,c.showChangeIntervalDialogAsync)({initVal:t}):l.enabled("symbol_search_hot_key")&&(g({defaultValue:t,selectSearchOnInit:!1,source:"keyboard"}),(0,u.trackEvent)("GUI","SS","hotkey")),!0}function m(){(0,h.loadChangeIntervalDialog)(),function(e,t){const i={name:e,func:t},r=n(i.name);r>-1&&s.splice(r,1),s.unshift(i)}("symbolEdit",_)}function g(e){const t=p=(0,d.loadNewSymbolSearch)().then((i=>{t===p&&i.showDefaultSearchDialog(e)}));return t}},78136:(e,t,i)=>{"use strict";let s;function r(){return s}function n(e){s=e}i.d(t,{getSearchRequestDelay:()=>r,setSearchRequestDelay:()=>n})},52092:(e,t,i)=>{"use strict";i.d(t,{CLOSE_POPUPS_AND_DIALOGS_COMMAND:()=>s});const s="CLOSE_POPUPS_AND_DIALOGS_COMMAND"},42120:(e,t,i)=>{"use strict";i.d(t,{CompareDialogRenderer:()=>n});var s=i(88279);var r=i(76422);class n extends s.DialogRenderer{constructor(e){super(),this._dialog=null,this._subscribe=e=>{this._setVisibility(e)},this._chartWidgetCollection=e}show(){this._load().then((e=>{var t,i;null===(t=this._dialog)||void 0===t||t.hide(),null===(i=this._dialog)||void 0===i||i.visible().unsubscribe(this._subscribe),this._dialog=e,e.visible().subscribe(this._subscribe),e.show(),r.emit("compare_add")}))}hide(){var e;null===(e=this._dialog)||void 0===e||e.hide()}_load(){return Promise.all([i.e(7271).then(i.bind(i,56217)),Promise.all([i.e(8230),i.e(5384),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(6092),i.e(8825),i.e(8271),i.e(5761),i.e(8707),i.e(3261),i.e(537),i.e(1271),i.e(962),i.e(2842),i.e(3016),i.e(3988),i.e(731)]).then(i.bind(i,89035))]).then((([e,t])=>{const i=new e.CompareModel(this._chartWidgetCollection);return t.getCompareDialogRenderer(i)}))}}},3615:(e,t,i)=>{"use strict";async function s(e,t){const s=await Promise.all([i.e(8230),i.e(5384),i.e(4819),i.e(8619),i.e(346),i.e(1140),i.e(6812),i.e(2754),i.e(962),i.e(3016),i.e(535),i.e(8890)]).then(i.bind(i,70493));return s.showSimpleDialog(e,s.renameModule,t)}async function r(e,t){ const s=await Promise.all([i.e(8230),i.e(5384),i.e(4819),i.e(8619),i.e(346),i.e(1140),i.e(6812),i.e(2754),i.e(962),i.e(3016),i.e(535),i.e(8890)]).then(i.bind(i,70493));return s.showSimpleDialog(e,s.confirmModule,t)}async function n(e,t){const s=await Promise.all([i.e(8230),i.e(5384),i.e(4819),i.e(8619),i.e(346),i.e(1140),i.e(6812),i.e(2754),i.e(962),i.e(3016),i.e(535),i.e(8890)]).then(i.bind(i,70493));return s.showSimpleDialog(e,s.warningModule,t)}i.d(t,{showRename:()=>s,showConfirm:()=>r,showWarning:()=>n})},14881:(e,t,i)=>{"use strict";i.d(t,{hideStateChange:()=>r});var s=i(26867);const r=new(i.n(s)())},90995:(e,t,i)=>{"use strict";i.d(t,{getHideOptions:()=>h,toggleHideMode:()=>d,getSavedHideMode:()=>u});var s=i(50151),r=i(44352),n=i(56840),o=i(97070),a=i(76076),l=i(14881);let c=null;function h(){if(null!==c)return c;const e=(0,o.tradingService)();return c=new Map([["drawings",{label:r.t(null,void 0,i(13277)),dataName:"hide-drawing-tools",tooltip:{active:r.t(null,void 0,i(98116)),inactive:r.t(null,void 0,i(95551))},getBoxedValue:()=>(0,a.hideAllDrawings)(),trackLabel:"hide drawings"}],["indicators",{label:r.t(null,void 0,i(44177)),dataName:"hide-indicators",tooltip:{active:r.t(null,void 0,i(49982)),inactive:r.t(null,void 0,i(86306))},getBoxedValue:()=>(0,a.hideAllIndicators)(),trackLabel:"hide indicators"}],["positions",{label:r.t(null,void 0,i(90540)),dataName:"hide-positions-and-orders",tooltip:{active:r.t(null,void 0,i(62632)),inactive:r.t(null,void 0,i(70803))},getBoxedValue:()=>(0,s.ensureNotNull)(e).showTradedSources,inverted:!0,trackLabel:"hide positions"}],["all",{label:r.t(null,void 0,i(33911)),dataName:"hide-all",tooltip:{active:e?r.t(null,void 0,i(38293)):r.t(null,void 0,i(39046)),inactive:e?r.t(null,void 0,i(67927)):r.t(null,void 0,i(44312))},trackLabel:"hide all"}]]),e||c.delete("positions"),c}function d(e){e?n.setValue("ChartToolsHideMode",e):e=u();const t=p();let i=!t;return"all"===e?(_(((e,t,s)=>{e.setValue(s?!i:i)})),l.hideStateChange.fire({hideMode:e,isActive:i}),i):(_(((s,r,n)=>{if(r===e){const e=t?!n:!s.value();s.setValue(e),i=n?!e:e}else s.setValue(Boolean(n))})),l.hideStateChange.fire({hideMode:e,isActive:i}),i)}function u(){const e=n.getValue("ChartToolsHideMode","drawings");return h().has(e)?e:"drawings"}function p(){let e=!0;return _(((t,i,s)=>{const r=t.value();e=e&&(s?!r:r)})),e}function _(e){h().forEach(((t,i)=>{var s;const r=null===(s=t.getBoxedValue)||void 0===s?void 0:s.call(t);r&&e(r,i,t.inverted)}))}},13323:(e,t,i)=>{"use strict";i.d(t,{GeneralChartPropertiesRenderer:()=>r});var s=i(88279);class r extends s.DialogRenderer{constructor(e){super(),this._dialog=null,this._subscribe=e=>{this._setVisibility(e)},this._chartWidgetCollection=e}show(){const e=this._chartWidgetCollection,t=e.activeChartWidget.value() ;return t.generalPropertiesDefinitions().then((s=>Promise.all([i.e(6848),i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(6092),i.e(8619),i.e(346),i.e(8825),i.e(8271),i.e(5761),i.e(8009),i.e(8707),i.e(7177),i.e(3261),i.e(3562),i.e(8049),i.e(3578),i.e(4884),i.e(3795),i.e(140),i.e(8251),i.e(5020),i.e(6304),i.e(3200),i.e(962),i.e(2842),i.e(3988),i.e(9050),i.e(8494),i.e(5890),i.e(7078)]).then(i.bind(i,72811)).then((i=>{var r,n;const o=new i.GeneralChartPropertiesDialogRenderer({chartWidgetCollection:e,propertyPages:s,activePageId:this._activePageId,model:t.model()});return null===(r=this._dialog)||void 0===r||r.hide(),null===(n=this._dialog)||void 0===n||n.visible().unsubscribe(this._subscribe),this._dialog=o,o.visible().subscribe(this._subscribe),o.show(),this._activePageId=void 0,o}))))}hide(){var e;null===(e=this._dialog)||void 0===e||e.hide()}isVisible(){return this.visible().value()}focusOnText(){}setActivePage(e){this._activePageId=e}}},25812:(e,t,i)=>{"use strict";var s;i.d(t,{ToolboxType:()=>s}),function(e){e[e.Delete=0]="Delete"}(s||(s={}))},59064:(e,t,i)=>{"use strict";i.d(t,{globalCloseDelegate:()=>r,globalCloseMenu:()=>n});var s=i(26867);const r=new(i.n(s)());function n(){r.fire()}},68515:e=>{e.exports={"css-value-header-toolbar-height":"38px"}},12882:e=>{e.exports={chartsSplitter:"chartsSplitter-_LZ9aQoF",hovered:"hovered-_LZ9aQoF","i-active":"i-active-_LZ9aQoF"}},8342:e=>{e.exports={"css-value-pane-controls-padding-left":"1px","css-value-pane-controls-padding-right":"5px"}},51782:e=>{e.exports={paneSeparator:"paneSeparator-ZR_yhubO",handle:"handle-ZR_yhubO",hovered:"hovered-ZR_yhubO",active:"active-ZR_yhubO"}},50343:(e,t,i)=>{"use strict";var s=i(65665).declareClassAsPureInterface;function r(){}TradingView.WEB_SOCKET_WAS_CONNECTED=!1,r.prototype.defaultResolutions=function(){},r.prototype.availableCurrencies=function(){},r.prototype.availableUnits=function(){},r.prototype.supportedSymbolsTypes=function(){},r.prototype.symbolsGrouping=function(){},r.prototype.quoteCreateSession=function(e){},r.prototype.quoteDeleteSession=function(e){},r.prototype.quoteSetFields=function(e,t){},r.prototype.quoteAddSymbols=function(e,t){},r.prototype.quoteRemoveSymbols=function(e,t){},r.prototype.quoteFastSymbols=function(e,t){},r.prototype.depthCreateSession=function(e,t,i){},r.prototype.depthDeleteSession=function(e){},r.prototype.depthSetSymbol=function(e,t){},r.prototype.depthClearSymbol=function(e){},r.prototype.depthSetScale=function(e,t){},r.prototype.chartCreateSession=function(e,t){},r.prototype.chartDeleteSession=function(e){},r.prototype.createSession=function(e,t){},r.prototype.removeSession=function(e){},r.prototype.connected=function(){},r.prototype.connect=function(){},r.prototype.disconnect=function(){},r.prototype.switchTimezone=function(e,t){},r.prototype.resolveSymbol=function(e,t,i,s){},r.prototype.createSeries=function(e,t,i,s,r,n,o,a){},r.prototype.removeSeries=function(e,t,i){},r.prototype.modifySeries=function(e,t,i,s,r,n,o){},r.prototype.requestMoreData=function(e,t,i,s){}, -r.prototype.requestMetadata=function(e,t,i){},r.prototype.canCreateStudy=function(e,t){},r.prototype.createStudy=function(e,t,i,s,r,n,o){},r.prototype.rebindStudy=function(e,t,i,s,r,n,o,a){},r.prototype.removeStudy=function(e,t,i){},r.prototype.modifyStudy=function(e,t,i,s,r){},r.prototype.createPointset=function(e,t,i,s,r,n,o){},r.prototype.modifyPointset=function(e,t,i,s,r){},r.prototype.removePointset=function(e,t,i){},r.prototype.requestMoreTickmarks=function(e,t,i,s){},r.prototype.requestFirstBarTime=function(e,t,i,s){},r.prototype._invokeHandler=function(e,t){},r.prototype._sendRequest=function(e,t){},r.prototype._onMessage=function(e){},r.prototype._dispatchNotification=function(e){},r.prototype._invokeNotificationHandler=function(e,t,i){},r.prototype._notifySessions=function(e){},r.prototype.unpack=function(e){},r.prototype.searchSymbols=function(e,t,i,s,r,n,o,a,l,c){},r.prototype.serverTimeOffset=function(){},r.prototype.getMarks=function(e,t,i,s,r){},r.prototype.getTimescaleMarks=function(e,t,i,s,r){},s(r,"ChartApiInterface"),e.exports.ChartApiInterface=r},91612:(e,t,i)=>{"use strict";i.r(t),i.d(t,{setCustomAdapter:()=>_,initialize:()=>m,updateUser:()=>g,getChartsCount:()=>f,getCharts:()=>v,removeChart:()=>S,saveChart:()=>y,getChartContent:()=>b,loadChart:()=>w,removeStudyTemplate:()=>C,getStudyTemplateContent:()=>P,saveStudyTemplate:()=>T,getStudyTemplatesList:()=>x,invalidateStudyTemplatesList:()=>I,getStudyTemplateContentById:()=>M,getStandardStudyTemplateContentById:()=>A,removeStudyTemplateById:()=>L,renameStudyTemplate:()=>k,replaceStudyTemplate:()=>E,getDrawingTemplates:()=>D,loadDrawingTemplate:()=>V,removeDrawingTemplate:()=>B,saveDrawingTemplate:()=>R});var s=i(76422),r=i(98351),n=i(33972);const o=(0,r.getLogger)("Chart.SaveloadAdapter.Library");let a,l,c,h,d=null,u=null;function p(e){return`${c}/${encodeURIComponent(h)}/${e}?client=${encodeURIComponent(a)}&user=${encodeURIComponent(l)}`}function _(e){d=e}function m(e,t,i,s){a=e,l=t,c=i,h=s}function g(e){l=e}function f(e,t){throw new Error("Not implemented")}async function v(){const e=e=>e.map((e=>({id:e.id,name:e.name,image_url:String(e.id),modified_iso:e.timestamp,short_symbol:e.symbol,interval:e.resolution})));if(d)return d.getAllCharts().then(e);try{const t=await fetch(`${p("charts")}`,{credentials:"same-origin"});if(!t.ok)throw new Error(`Getting chart content response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Get chart content request failed: "+i.message);return e(i.data)}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}async function S(e){if(d)d.removeChart(e);else try{const t=await fetch(`${p("charts")}&chart=${encodeURIComponent(e)}`,{method:"DELETE",credentials:"same-origin"});if(!t.ok)throw new Error(`Remove chart response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Remove drawing template request failed: "+i.message)}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}async function y(e,t,i,s,r){var a;const l=r.id.value(),c={name:e, -content:JSON.stringify(s),symbol:t,resolution:i};if(d)return d.saveChart({...c,id:l});try{const e=new FormData;for(const t in c)e.append(t,c[t]);let t=p("charts");null!=l&&(t+=`&chart=${encodeURIComponent(l)}`);const i=await fetch(t,{credentials:"same-origin",method:"POST",body:e});if(!i.ok)throw new Error(`Saving chart content response was not OK. Status: ${i.status}.`);const s=await i.json();if("ok"!==s.status)throw new Error("Saving chart content request failed: "+s.message);return(null!==(a=s.id)&&void 0!==a?a:l).toString()}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}async function b(e){const t=t=>{const i=JSON.parse(t);return i.uid=e.id,i};if(d)return d.getChartContent(e.id).then((e=>t(e)));try{const i=await fetch(`${p("charts")}&chart=${encodeURIComponent(e.id)}`,{credentials:"same-origin"});if(!i.ok)throw new Error(`Getting chart content response was not OK. Status: ${i.status}.`);const s=await i.json();if("ok"!==s.status)throw new Error("Get chart content request failed: "+s.message);return t(s.data.content)}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}function w(e){b(e).then((e=>{s.emit("chart_load_requested",e)}),(()=>{o.logWarn("Error loading chart")}))}async function C(e){try{if(d)return d.removeStudyTemplate({name:e});const t=await fetch(`${p("study_templates")}&template=${encodeURIComponent(e)}`,{method:"DELETE",credentials:"same-origin"});if(!t.ok)throw new Error(`Remove study template response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Remove study template request failed: "+i.message)}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}async function P(e){try{if(d){return{content:await d.getStudyTemplateContent({name:e})}}const t=await fetch(`${p("study_templates")}&template=${encodeURIComponent(e)}`,{credentials:"same-origin"});if(!t.ok)throw new Error(`Get study template response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Get study template request failed: "+i.message);return i.data}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}async function T(e){try{if(d)return d.saveStudyTemplate(e).then((()=>({error:""}))).catch((e=>({error:null!=e?(0,n.errorToString)(e):"error"})));const t=new FormData;t.append("name",e.name),t.append("content",e.content);const i=await fetch(p("study_templates"),{method:"POST",body:t,credentials:"same-origin"});if(!i.ok)throw new Error(`Save study template response was not OK. Status: ${i.status}.`);const s=await i.json();return{error:"ok"===s.status?"":s.status}}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}async function x(){try{if(u)return u;u=[];const e=e=>(u=e.map((e=>({is_default:!1,name:e.name}))),u);if(d)return d.getAllStudyTemplates().then(e);const t=await fetch(p("study_templates"),{method:"GET",credentials:"same-origin"});if(!t.ok)throw new Error(`Study templates list response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Study templates list request failed: "+i.message);return e(i.data) -}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}function I(){u=null}function M(e,t){throw new Error("Not implemented")}function A(e,t){throw new Error("Not implemented")}function L(e,t){throw new Error("Not implemented")}function k(e,t,i){throw new Error("Not implemented")}function E(e,t,i){throw new Error("Not implemented")}async function D(e){throw new Error("Not implemented")}async function V(e,t){throw new Error("Not implemented")}async function B(e,t){throw new Error("Not implemented")}async function R(e,t,i){throw new Error("Not implemented")}},79930:(e,t,i)=>{"use strict";var s=i(50151).ensureNotNull,r=i(69228),n=i(578).Interval,o=i(31686),a=i(96531),l=i(50343).ChartApiInterface,c=i(61536).HandlerInfo,h=i(65665).requireFullInterfaceImplementation,d=i(98351).getLogger("Chart.ChartApiLocal"),u=i(45673).TIMEFRAMETYPE,p=i(8950).createDwmAligner;TradingView.STUDY_COUNT_LIMIT=210;JSServer.ChartApi=function(e){this._notificationHandlers={},this._sessions={},this.studyCounter=0,this._connected=!1,this._enabled=!1,this._studyEngine=new o(e),this._callbacks={},this._serverTimeOffset=0;var t=this;this._studyEngine.on("configuration_received",(function(){t._fireEvent("configuration_received")})),this._studyEngine.on("realtime_tick",(function(e){var i={time:e.value[0]/1e3,open:e.value[1],high:e.value[2],low:e.value[3],close:e.value[4],volume:e.value[5]};t._fireEvent("realtime_tick",i,!0)})),this._setVisibleRangeTimeout={}},JSServer.ChartApi.prototype.destroy=function(){this._studyEngine.destroy(),this._studyEngine=null},JSServer.ChartApi.prototype.purgeCache=function(e){this._studyEngine.purgeCache(),this._studyEngine.purgeDataCache()},JSServer.ChartApi.prototype.defaultResolutions=function(){return this._studyEngine.supportedResolutions()||["1","3","5","15","30","45","60","120","180","240","1D","1W","1M"]},JSServer.ChartApi.prototype.availableCurrencies=function(){var e=this._studyEngine.supportedCurrencies().map((function(e){return"string"==typeof e?{id:e,code:e}:e}));return Promise.resolve(e)},JSServer.ChartApi.prototype.availableUnits=function(){return Promise.resolve(this._studyEngine.supportedUnits())},JSServer.ChartApi.prototype.supportedSymbolsTypes=function(){return this._studyEngine.supportedSymbolsTypes()},JSServer.ChartApi.prototype.symbolsGrouping=function(){return this._studyEngine.symbolsGrouping()},JSServer.ChartApi.prototype.start=function(){this._enabled=!0,this._fireEvent("start_enabled")},JSServer.ChartApi.prototype.unsubscribe=function(e,t){var i=this._callbacks[e];i&&i.splice(i.indexOf(t),1)},JSServer.ChartApi.prototype.on=function(e,t){return this._callbacks.hasOwnProperty(e)||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},JSServer.ChartApi.prototype._fireEvent=function(e,t,i){if(this._callbacks.hasOwnProperty(e)){var s=this._callbacks[e].slice(0);i||(this._callbacks[e]=[]);for(var r=0;rn||(TradingView.ChartapiMessagerInstances[e].onSeriesTimeframeUpdate(t,i,_,n,a),l&&setTimeout(l,0))}}}if(this._studyEngine.isTimeScaleExtendedTo(e,1e3*r))_();else{ -var m=TradingView.ChartapiMessagerInstances[e].seriesCompleted,g=TradingView.ChartapiMessagerInstances[e].seriesError;void 0!==this._setVisibleRangeTimeout[e]&&clearTimeout(this._setVisibleRangeTimeout[e]),this._setVisibleRangeTimeout[e]=setTimeout(function(){delete this._setVisibleRangeTimeout[e],m.subscribe(null,f,!0),g.subscribe(null,v,!0),this._studyEngine.ensureExtendedTo(t,e,1e3*r)}.bind(this),0)}function f(e,s){e===t&&s===i&&(m.unsubscribe(null,f),g.unsubscribe(null,v),_())}function v(e,s){e===t&&s===i&&m.unsubscribe(null,f)}},JSServer.ChartApi.prototype._applyTimeFrame=function(e,t,i,s,o){var a,l,c={},h=!0;if(o.type===u.PeriodBack){var d=this._studyEngine.getSeriesLastBarTime(e,i);if(null===d)return;l=d/1e3;var _=n.parse(o.value),m=this._studyEngine.getSeriesSymbolInfo(e,i);a=r.alignPeriodsBackForVisibleRange(m.session,m.session_holidays,m.corrections,_.letter(),_.multiplier(),1,d)/1e3;var g=p(this._studyEngine.getSeriesInterval(e,i),m);null!==g&&(l=g.timeToExchangeTradingDay(1e3*l)/1e3,a=g.timeToExchangeTradingDay(1e3*a)/1e3),c={applyDefaultRightMargin:!0},h=!1}else a=o.from,l=o.to;this.setVisibleTimeRange(e,i,s,a,l,h,c)},JSServer.ChartApi.prototype.modifySeries=function(e,t,i,s,r,n,o){var a=this;this._notificationHandlers[e][t]=new c((function(r){"series_completed"===r.method&&null!==n&&(a._applyTimeFrame(e,s,t,i,n),n=null),o(r)}),t),this._studyEngine.modifySeries(e,t,s,r,i)},JSServer.ChartApi.prototype.requestMoreData=function(e,t){this._studyEngine.extendSeriesRange(e,t)},JSServer.ChartApi.prototype.setStudiesAccessController=function(e){this.studiesAccessController=e},JSServer.ChartApi.prototype.allStudiesMetadata=function(){return this._studyEngine.studiesMetadata()},JSServer.ChartApi.prototype.requestMetadata=function(e,t,i){this._notificationHandlers[e][t]=new c(i,t);var s=this.studiesAccessController.getEnabledTools();TradingView.ChartapiMessagerInstances[e].onRequestMetadata(t,s)},JSServer.ChartApi.prototype.canCreateStudy=function(){return this.studyCounter{"use strict";var s=i(26867),r=function(e,t){this._server=e,this._session=t,this.seriesCompleted=new s,this.seriesError=new s};r.prototype.onRequestMetadata=function(e,t){this._server.receiveLocalResponse({method:"studies_metadata",params:[this._session,e,{errors:[],hash:"",metainfo:t,migrations:[]}]})},r.prototype.onSymbolResolved=function(e,t){this._server.receiveLocalResponse({method:"symbol_resolved",params:[this._session,e,t]})},r.prototype.onSymbolError=function(e,t){this._server.receiveLocalResponse({method:"symbol_error",params:[this._session,e,t]})},r.prototype.onStudyError=function(e,t,i){this._server.receiveLocalResponse({method:"study_error",params:[this._session,e,t,i]})},r.prototype.onSeriesLoading=function(e,t){ -this._server.receiveLocalResponse({method:"series_loading",params:[this._session,e,t]})},r.prototype.onSeriesCompleted=function(e,t,i){this._server.receiveLocalResponse({method:"series_completed",params:[this._session,e,i,t]}),this.seriesCompleted.fire(e,t)},r.prototype.onSeriesError=function(e,t,i){this._server.receiveLocalResponse({method:"series_error",params:[this._session,e,t,i]}),this.seriesError.fire(e,t)},r.prototype.onStudyCompleted=function(e,t){this._server.receiveLocalResponse({method:"study_completed",params:[this._session,e,t]})},r.prototype.onStudyLoading=function(e,t){this._server.receiveLocalResponse({method:"study_loading",params:[this._session,e,t]})},r.prototype.onTickmarksUpdated=function(e,t){var i={method:"tickmark_update",params:[this._session,{index:e,zoffset:0,changes:[],marks:t,index_diff:[]}]};this._server.receiveLocalResponse(i)},r.prototype.onTimescaleUpdate=function(e,t){var i={method:"timescale_update",params:[this._session,this._prepareDataUpdateObjects(t),{index:e.pointsIndex,zoffset:0,changes:e.points,marks:e.marks,index_diff:e.indexChange,baseIndex:e.baseIndex}]};this._server.receiveLocalResponse(i)},r.prototype.onTimescaleCompleted=function(e){this._server.receiveLocalResponse({method:"timescale_completed",params:[this._session,e]})},r.prototype.onSeriesTimeframeUpdate=function(e,t,i,s,r){var n={method:"series_timeframe",params:[this._session,e,t,i,s,null,!0,r]};this._server.receiveLocalResponse(n)},r.prototype.onPointsetDataUpdate=function(e,t,i){this.onDataUpdate(e,t,i,null)},r.prototype._prepareDataUpdateObjects=function(e){var t={};return e.forEach((function(e){t[e.objId]={series:e.data,turnaround:e.turnaround},e.nonSeriesData&&(e.nonSeriesData.data?t[e.objId].nonseries={d:JSON.stringify(e.nonSeriesData.data),indexes:e.nonSeriesData.indexes}:t[e.objId].nonseries={d:"",indexes:[]})})),t},r.prototype.onDataUpdate=function(e,t,i,s){var r={method:"data_update",params:[this._session,this._prepareDataUpdateObjects([{objId:e,turnaround:t,data:i,nonSeriesData:s}])]};this._server.receiveLocalResponse(r)},r.prototype.onQuotesData=function(e){this._server.receiveLocalResponse({method:"quote_symbol_data",params:e})},r.prototype.onDepthData=function(e){this._server.receiveLocalResponse({method:"dd",params:e})},r.prototype.onDepthUpdate=function(e){this._server.receiveLocalResponse({method:"dpu",params:e})},r.prototype.onClearData=function(e){this._server.receiveLocalResponse({method:"clear_data",params:[this._session,e]})},TradingView.ChartapiMessagerInstances=[],e.exports=r},40011:(e,t,i)=>{"use strict";i.d(t,{DatafeedRequestsCachedProcessor:()=>_});var s=i(50151),r=i(578),n=i(93975),o=i(76702),a=i(2484),l=i(69228),c=i(8950),h=i(21169);i(93731);function d(e,t){return e.ticker+(e.currency_code?"_#_"+e.currency_code:"")+(e.unit_id?"_#_"+e.unit_id:"")+(e.subsession_id?"_#_"+e.subsession_id:"")+"_#_"+t}function u(e){return new Date(e).toISOString()}class p{constructor(e,t,i,s,n,o){this._cache={bars:[]},this._nextSubscriptionId=0,this._pendingSubscribers=[],this._subscribers=[], -this._requesting=!1,this._leftDate=null,this._nextTime=null,this._realtimeOn=!1,this._endOfData=!1,this._resetCacheTimeout=null,this._errorMessage=null,this._destroyed=!1,this._emptyResponsesCount=0,this._datafeed=e,this._symbolInfo=t,this._interval=r.Interval.parse(i),this._resolution=this._interval.value(),this._dwmAligner=n,this._serverTimeOffsetGetter=s,this._resetCacheTimePeriod=void 0===o?1e4:o,this._sessionSpec=new h.SessionSpec(t.timezone,t.session,t.session_holidays,t.corrections),this._updateDatesFromExpirationDate()}destroy(){0!==this._subscribers.length&&console.warn("Destroying with not-empty state"),this._clearResetCacheTimeout(),this._unsubscribeRealtime(),this._purgeCache(),delete this._datafeed,this._destroyed=!0}addSubscription(e,t,i){const s=this._getNextSubscriptionId();this._pendingSubscribers.push({key:s,range:e,onHistoryCallback:t,onErrorCallback:i}),r.Interval.isDWM(this._resolution)&&void 0!==e.to&&null!==this._dwmAligner&&e.to%864e5&&console.warn(`Internal error: invalid date for DWM resolution ${u(e.to)}, expected time without a time part`),this._clearResetCacheTimeout();return setTimeout((()=>{this._destroyed||this._processPendingSubscribers()}),0),s}removeSubscription(e){const t=this._pendingSubscribers.find((t=>t.key===e));if(t)return void this._pendingSubscribers.splice(this._pendingSubscribers.indexOf(t),1);const i=this._subscribers.find((t=>t.key===e));if(i)return this._subscribers.splice(this._subscribers.indexOf(i),1),void(this._subscribers.length||(this._resetCacheTimeout=setTimeout((()=>{this._resetCacheTimeout=null,this._purgeCache(),this._unsubscribeRealtime()}),this._resetCacheTimePeriod)));console.warn("Unknown subscription symbol={0}, resolution={1}, key={2}".format(this._symbolInfo.name,this._resolution,e))}_logMessage(e,t){if(a.enabled("charting_library_debug_mode")||t){const t=this._symbolInfo.currency_code,i=this._symbolInfo.unit_id;console.log(`FEED [${this._symbolInfo.name}|${this._resolution}${t?"|"+t:""}${i?"|"+i:""}]: ${e}`)}}_clearResetCacheTimeout(){null!==this._resetCacheTimeout&&(clearTimeout(this._resetCacheTimeout),this._resetCacheTimeout=null)}_purgeCache(){this._logMessage("Reset cache"),this._cache={bars:[]},this._errorMessage=null,this._leftDate=null,this._endOfData=!1,this._updateDatesFromExpirationDate()}_updateDatesFromExpirationDate(){void 0!==this._symbolInfo.expiration_date&&(this._nextTime=1e3*this._symbolInfo.expiration_date,this._leftDate=1e3*(this._symbolInfo.expiration_date+1))}_dealignTime(e){return null===this._dwmAligner?e:this._dwmAligner.timeToExchangeTradingDay(e)}_normalizeRange(e){const t=void 0!==e.to?e.to:this._dealignTime(this._now());if(0===this._cache.bars.length||void 0!==e.to&&t<=(0,s.ensureNotNull)(this._leftDate))return{countBack:e.countBack,to:t};const i=null!==this._dwmAligner?this._dwmAligner.timeToSessionStart(t):t,r=(0,n.lowerbound)(this._cache.bars,i,((e,t)=>e.time{e.onErrorCallback(t)}))}let t=this._normalizeRange(e[0].range);for(const i of e.map((e=>this._normalizeRange(e.range))))(i.tot.countBack)&&(t=i);this._logMessage(`Leftmost subscriber requires ${t.countBack} bars prior ${u(t.to)}`);!(null===this._leftDate||t.to{const t=this._moveSubscriberToRealtime(e);this._returnHistoryDataToSubscriber(e,t)})),this._subscribeRealtimeIfNeeded()):this._ensureRequestedTo(t)}_moveSubscriberToRealtime(e){const t={key:e.key,onHistoryCallback:e.onHistoryCallback,barset:null};return this._subscribers.push(t),t}_isSymbolExpired(){return this._symbolInfo.expired||void 0!==this._symbolInfo.expiration_date}_subscribeRealtimeIfNeeded(){!this._subscribers.length||this._realtimeOn||this._isSymbolExpired()||this._subscribeRealtime()}_subscribeRealtime(){if(this._symbolInfo.expired||this._realtimeOn)return;this._realtimeOn=!0,this._datafeed.subscribeBars(this._symbolInfo,this._resolution,(e=>{null!==this._dwmAligner&&(e.time=this._dwmAligner.timeToSessionStart(e.time)),this._putToCacheNewBar(e),this._subscribers.forEach((t=>{const i=t.barset;if(null===i)throw new Error("subscriber.barset is null");i.add(e),t.onHistoryCallback(i)}))}),d(this._symbolInfo,this._resolution),(()=>{this._unsubscribeRealtime();const e=this._leftDate;this._purgeCache(),null!==e&&this._ensureRequestedTo({to:e,countBack:0})})),this._logMessage("Subscribed to realtime")}_unsubscribeRealtime(){!this._isSymbolExpired()&&this._realtimeOn&&(this._datafeed.unsubscribeBars(d(this._symbolInfo,this._resolution)),this._logMessage("Unsubscribed from realtime"),this._realtimeOn=!1)}_returnHistoryDataToSubscriber(e,t){const i=this._normalizeRange(e.range),s=this._createBarsetForRange(i);s.count()>0?this._logMessage("Bars to return for request {0}: total {1} bars in [{2} ... {3}] ".format(e.key,s.count(),u(s.bars[0].time),u(s.bars[s.count()-1].time))):this._logMessage("Request {0}. Nothing to return.".format(e.key)),t.barset=s,this._endOfData&&null!==this._leftDate&&i.to<=this._leftDate&&(s.endOfData=!0),e.onHistoryCallback(s)}_createBarsetForRange(e){const t=null!==this._dwmAligner?this._dwmAligner.timeToSessionStart(e.to):e.to,i=(0,n.lowerbound)(this._cache.bars,t,((e,t)=>e.time{"use strict";i.r(t),i.d(t,{setCustomAdapter:()=>_,initialize:()=>m,updateUser:()=>g,getChartsCount:()=>f,getCharts:()=>v,removeChart:()=>S,saveChart:()=>y,getChartContent:()=>b,loadChart:()=>w,removeStudyTemplate:()=>P,getStudyTemplateContent:()=>C,saveStudyTemplate:()=>T,getStudyTemplatesList:()=>x,invalidateStudyTemplatesList:()=>I,getStudyTemplateContentById:()=>M,getStandardStudyTemplateContentById:()=>A,removeStudyTemplateById:()=>L,renameStudyTemplate:()=>k,replaceStudyTemplate:()=>E,getDrawingTemplates:()=>D,loadDrawingTemplate:()=>B,removeDrawingTemplate:()=>V,saveDrawingTemplate:()=>R});var s=i(76422),r=i(98351),n=i(33972);const o=(0,r.getLogger)("Chart.SaveloadAdapter.Library");let a,l,c,h,d=null,u=null;function p(e){return`${c}/${encodeURIComponent(h)}/${e}?client=${encodeURIComponent(a)}&user=${encodeURIComponent(l)}`}function _(e){d=e}function m(e,t,i,s){a=e,l=t,c=i,h=s}function g(e){l=e}function f(e,t){throw new Error("Not implemented")}async function v(){const e=e=>e.map((e=>({id:e.id,name:e.name,image_url:String(e.id),modified_iso:e.timestamp,short_symbol:e.symbol,interval:e.resolution})));if(d)return d.getAllCharts().then(e);try{const t=await fetch(`${p("charts")}`,{credentials:"same-origin"});if(!t.ok)throw new Error(`Getting chart content response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Get chart content request failed: "+i.message);return e(i.data)}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}async function S(e){if(d)d.removeChart(e);else try{const t=await fetch(`${p("charts")}&chart=${encodeURIComponent(e)}`,{method:"DELETE",credentials:"same-origin"});if(!t.ok)throw new Error(`Remove chart response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Remove drawing template request failed: "+i.message)}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}async function y(e,t,i,s,r){var a;const l=r.id.value(),c={name:e, +content:JSON.stringify(s),symbol:t,resolution:i};if(d)return d.saveChart({...c,id:l});try{const e=new FormData;for(const t in c)e.append(t,c[t]);let t=p("charts");null!=l&&(t+=`&chart=${encodeURIComponent(l)}`);const i=await fetch(t,{credentials:"same-origin",method:"POST",body:e});if(!i.ok)throw new Error(`Saving chart content response was not OK. Status: ${i.status}.`);const s=await i.json();if("ok"!==s.status)throw new Error("Saving chart content request failed: "+s.message);return(null!==(a=s.id)&&void 0!==a?a:l).toString()}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}async function b(e){const t=t=>{const i=JSON.parse(t);return i.uid=e.id,i};if(d)return d.getChartContent(e.id).then((e=>t(e)));try{const i=await fetch(`${p("charts")}&chart=${encodeURIComponent(e.id)}`,{credentials:"same-origin"});if(!i.ok)throw new Error(`Getting chart content response was not OK. Status: ${i.status}.`);const s=await i.json();if("ok"!==s.status)throw new Error("Get chart content request failed: "+s.message);return t(s.data.content)}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}function w(e){b(e).then((e=>{s.emit("chart_load_requested",e)}),(()=>{o.logWarn("Error loading chart")}))}async function P(e){try{if(d)return d.removeStudyTemplate({name:e});const t=await fetch(`${p("study_templates")}&template=${encodeURIComponent(e)}`,{method:"DELETE",credentials:"same-origin"});if(!t.ok)throw new Error(`Remove study template response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Remove study template request failed: "+i.message)}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}async function C(e){try{if(d){return{content:await d.getStudyTemplateContent({name:e})}}const t=await fetch(`${p("study_templates")}&template=${encodeURIComponent(e)}`,{credentials:"same-origin"});if(!t.ok)throw new Error(`Get study template response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Get study template request failed: "+i.message);return i.data}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}async function T(e){try{if(d)return d.saveStudyTemplate(e).then((()=>({error:""}))).catch((e=>({error:null!=e?(0,n.errorToString)(e):"error"})));const t=new FormData;t.append("name",e.name),t.append("content",e.content);const i=await fetch(p("study_templates"),{method:"POST",body:t,credentials:"same-origin"});if(!i.ok)throw new Error(`Save study template response was not OK. Status: ${i.status}.`);const s=await i.json();return{error:"ok"===s.status?"":s.status}}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}async function x(){try{if(u)return u;u=[];const e=e=>(u=e.map((e=>({is_default:!1,name:e.name}))),u);if(d)return d.getAllStudyTemplates().then(e);const t=await fetch(p("study_templates"),{method:"GET",credentials:"same-origin"});if(!t.ok)throw new Error(`Study templates list response was not OK. Status: ${t.status}.`);const i=await t.json();if("ok"!==i.status)throw new Error("Study templates list request failed: "+i.message);return e(i.data) +}catch(e){throw o.logWarn((0,n.errorToString)(e)),e}}function I(){u=null}function M(e,t){throw new Error("Not implemented")}function A(e,t){throw new Error("Not implemented")}function L(e,t){throw new Error("Not implemented")}function k(e,t,i){throw new Error("Not implemented")}function E(e,t,i){throw new Error("Not implemented")}async function D(e){throw new Error("Not implemented")}async function B(e,t){throw new Error("Not implemented")}async function V(e,t){throw new Error("Not implemented")}async function R(e,t,i){throw new Error("Not implemented")}},79930:(e,t,i)=>{"use strict";var s=i(50151).ensureNotNull,r=i(69228),n=i(578).Interval,o=i(31686),a=i(96531),l=i(50343).ChartApiInterface,c=i(61536).HandlerInfo,h=i(65665).requireFullInterfaceImplementation,d=i(98351).getLogger("Chart.ChartApiLocal"),u=i(45673).TIMEFRAMETYPE,p=i(8950).createDwmAligner;TradingView.STUDY_COUNT_LIMIT=210;JSServer.ChartApi=function(e){this._notificationHandlers={},this._sessions={},this.studyCounter=0,this._connected=!1,this._enabled=!1,this._studyEngine=new o(e),this._callbacks={},this._serverTimeOffset=0;var t=this;this._studyEngine.on("configuration_received",(function(){t._fireEvent("configuration_received")})),this._studyEngine.on("realtime_tick",(function(e){var i={time:e.value[0]/1e3,open:e.value[1],high:e.value[2],low:e.value[3],close:e.value[4],volume:e.value[5]};t._fireEvent("realtime_tick",i,!0)})),this._setVisibleRangeTimeout={}},JSServer.ChartApi.prototype.destroy=function(){this._studyEngine.destroy(),this._studyEngine=null},JSServer.ChartApi.prototype.purgeCache=function(e){this._studyEngine.purgeCache(),this._studyEngine.purgeDataCache()},JSServer.ChartApi.prototype.defaultResolutions=function(){return this._studyEngine.supportedResolutions()||["1","3","5","15","30","45","60","120","180","240","1D","1W","1M"]},JSServer.ChartApi.prototype.availableCurrencies=function(){var e=this._studyEngine.supportedCurrencies().map((function(e){return"string"==typeof e?{id:e,code:e}:e}));return Promise.resolve(e)},JSServer.ChartApi.prototype.availableUnits=function(){return Promise.resolve(this._studyEngine.supportedUnits())},JSServer.ChartApi.prototype.availablePriceSources=function(){return Promise.resolve(this._studyEngine.supportedPriceSources())},JSServer.ChartApi.prototype.supportedSymbolsTypes=function(){return this._studyEngine.supportedSymbolsTypes()},JSServer.ChartApi.prototype.symbolsGrouping=function(){return this._studyEngine.symbolsGrouping()},JSServer.ChartApi.prototype.start=function(){this._enabled=!0,this._fireEvent("start_enabled")},JSServer.ChartApi.prototype.unsubscribe=function(e,t){var i=this._callbacks[e];i&&i.splice(i.indexOf(t),1)},JSServer.ChartApi.prototype.on=function(e,t){return this._callbacks.hasOwnProperty(e)||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},JSServer.ChartApi.prototype._fireEvent=function(e,t,i){if(this._callbacks.hasOwnProperty(e)){var s=this._callbacks[e].slice(0);i||(this._callbacks[e]=[]);for(var r=0;rn||(TradingView.ChartapiMessagerInstances[e].onSeriesTimeframeUpdate(t,i,_,n,a),l&&setTimeout(l,0))}}} +if(this._studyEngine.isTimeScaleExtendedTo(e,1e3*r))_();else{var m=TradingView.ChartapiMessagerInstances[e].seriesCompleted,g=TradingView.ChartapiMessagerInstances[e].seriesError;void 0!==this._setVisibleRangeTimeout[e]&&clearTimeout(this._setVisibleRangeTimeout[e]),this._setVisibleRangeTimeout[e]=setTimeout(function(){delete this._setVisibleRangeTimeout[e],m.subscribe(null,f,!0),g.subscribe(null,v,!0),this._studyEngine.ensureExtendedTo(t,e,1e3*r)}.bind(this),0)}function f(e,s){e===t&&s===i&&(m.unsubscribe(null,f),g.unsubscribe(null,v),_())}function v(e,s){e===t&&s===i&&m.unsubscribe(null,f)}},JSServer.ChartApi.prototype._applyTimeFrame=function(e,t,i,s,o){var a,l,c={},h=!0;if(o.type===u.PeriodBack){var d=this._studyEngine.getSeriesLastBarTime(e,i);if(null===d)return;l=d/1e3;var _=n.parse(o.value),m=this._studyEngine.getSeriesSymbolInfo(e,i);a=r.alignPeriodsBackForVisibleRange(m.session,m.session_holidays,m.corrections,_.letter(),_.multiplier(),1,d)/1e3;var g=p(this._studyEngine.getSeriesInterval(e,i),m);null!==g&&(l=g.timeToExchangeTradingDay(1e3*l)/1e3,a=g.timeToExchangeTradingDay(1e3*a)/1e3),c={applyDefaultRightMargin:!0},h=!1}else a=o.from,l=o.to;this.setVisibleTimeRange(e,i,s,a,l,h,c)},JSServer.ChartApi.prototype.modifySeries=function(e,t,i,s,r,n,o){var a=this;this._notificationHandlers[e][t]=new c((function(r){"series_completed"===r.method&&null!==n&&(a._applyTimeFrame(e,s,t,i,n),n=null),o(r)}),t),this._studyEngine.modifySeries(e,t,s,r,i)},JSServer.ChartApi.prototype.requestMoreData=function(e,t){this._studyEngine.extendSeriesRange(e,t)},JSServer.ChartApi.prototype.setStudiesAccessController=function(e){this.studiesAccessController=e},JSServer.ChartApi.prototype.allStudiesMetadata=function(){return this._studyEngine.studiesMetadata()},JSServer.ChartApi.prototype.requestMetadata=function(e,t,i){this._notificationHandlers[e][t]=new c(i,t);var s=this.studiesAccessController.getEnabledTools();TradingView.ChartapiMessagerInstances[e].onRequestMetadata(t,s)},JSServer.ChartApi.prototype.canCreateStudy=function(){return this.studyCounter{"use strict";var s=i(26867),r=function(e,t){this._server=e,this._session=t,this.seriesCompleted=new s,this.seriesError=new s};r.prototype.onRequestMetadata=function(e,t){this._server.receiveLocalResponse({method:"studies_metadata",params:[this._session,e,{errors:[],hash:"",metainfo:t,migrations:[]}]})},r.prototype.onSymbolResolved=function(e,t){this._server.receiveLocalResponse({method:"symbol_resolved",params:[this._session,e,t]})},r.prototype.onSymbolError=function(e,t){this._server.receiveLocalResponse({method:"symbol_error",params:[this._session,e,t]})},r.prototype.onStudyError=function(e,t,i){this._server.receiveLocalResponse({method:"study_error",params:[this._session,e,t,i]})}, +r.prototype.onSeriesLoading=function(e,t){this._server.receiveLocalResponse({method:"series_loading",params:[this._session,e,t]})},r.prototype.onSeriesCompleted=function(e,t,i){this._server.receiveLocalResponse({method:"series_completed",params:[this._session,e,i,t]}),this.seriesCompleted.fire(e,t)},r.prototype.onSeriesError=function(e,t,i){this._server.receiveLocalResponse({method:"series_error",params:[this._session,e,t,i]}),this.seriesError.fire(e,t)},r.prototype.onStudyCompleted=function(e,t){this._server.receiveLocalResponse({method:"study_completed",params:[this._session,e,t]})},r.prototype.onStudyLoading=function(e,t){this._server.receiveLocalResponse({method:"study_loading",params:[this._session,e,t]})},r.prototype.onTickmarksUpdated=function(e,t){var i={method:"tickmark_update",params:[this._session,{index:e,zoffset:0,changes:[],marks:t,index_diff:[]}]};this._server.receiveLocalResponse(i)},r.prototype.onTimescaleUpdate=function(e,t){var i={method:"timescale_update",params:[this._session,this._prepareDataUpdateObjects(t),{index:e.pointsIndex,zoffset:0,changes:e.points,marks:e.marks,index_diff:e.indexChange,baseIndex:e.baseIndex}]};this._server.receiveLocalResponse(i)},r.prototype.onTimescaleCompleted=function(e){this._server.receiveLocalResponse({method:"timescale_completed",params:[this._session,e]})},r.prototype.onSeriesTimeframeUpdate=function(e,t,i,s,r){var n={method:"series_timeframe",params:[this._session,e,t,i,s,null,!0,r]};this._server.receiveLocalResponse(n)},r.prototype.onPointsetDataUpdate=function(e,t,i){this.onDataUpdate(e,t,i,null)},r.prototype._prepareDataUpdateObjects=function(e){var t={};return e.forEach((function(e){t[e.objId]={series:e.data,turnaround:e.turnaround},e.nonSeriesData&&(e.nonSeriesData.data?t[e.objId].nonseries={d:JSON.stringify(e.nonSeriesData.data),indexes:e.nonSeriesData.indexes}:t[e.objId].nonseries={d:"",indexes:[]})})),t},r.prototype.onDataUpdate=function(e,t,i,s){var r={method:"data_update",params:[this._session,this._prepareDataUpdateObjects([{objId:e,turnaround:t,data:i,nonSeriesData:s}])]};this._server.receiveLocalResponse(r)},r.prototype.onQuotesData=function(e){this._server.receiveLocalResponse({method:"quote_symbol_data",params:e})},r.prototype.onDepthData=function(e){this._server.receiveLocalResponse({method:"dd",params:e})},r.prototype.onDepthUpdate=function(e){this._server.receiveLocalResponse({method:"dpu",params:e})},r.prototype.onClearData=function(e){this._server.receiveLocalResponse({method:"clear_data",params:[this._session,e]})},TradingView.ChartapiMessagerInstances=[],e.exports=r},40011:(e,t,i)=>{"use strict";i.d(t,{DatafeedRequestsCachedProcessor:()=>_});var s=i(50151),r=i(578),n=i(93975),o=i(76702),a=i(2484),l=i(69228),c=i(8950),h=i(21169);i(93731);function d(e,t){return e.ticker+(e.currency_code?"_#_"+e.currency_code:"")+(e.unit_id?"_#_"+e.unit_id:"")+(e.subsession_id?"_#_"+e.subsession_id:"")+"_#_"+t}function u(e){return new Date(e).toISOString()}class p{constructor(e,t,i,s,n,o){this._cache={bars:[]},this._nextSubscriptionId=0, +this._pendingSubscribers=[],this._subscribers=[],this._requesting=!1,this._leftDate=null,this._nextTime=null,this._realtimeOn=!1,this._endOfData=!1,this._resetCacheTimeout=null,this._errorMessage=null,this._destroyed=!1,this._emptyResponsesCount=0,this._datafeed=e,this._symbolInfo=t,this._interval=r.Interval.parse(i),this._resolution=this._interval.value(),this._dwmAligner=n,this._serverTimeOffsetGetter=s,this._resetCacheTimePeriod=void 0===o?1e4:o,this._sessionSpec=new h.SessionSpec(t.timezone,t.session,t.session_holidays,t.corrections),this._updateDatesFromExpirationDate()}destroy(){0!==this._subscribers.length&&console.warn("Destroying with not-empty state"),this._clearResetCacheTimeout(),this._unsubscribeRealtime(),this._purgeCache(),delete this._datafeed,this._destroyed=!0}addSubscription(e,t,i){const s=this._getNextSubscriptionId();this._pendingSubscribers.push({key:s,range:e,onHistoryCallback:t,onErrorCallback:i}),r.Interval.isDWM(this._resolution)&&void 0!==e.to&&null!==this._dwmAligner&&e.to%864e5&&console.warn(`${this._logMessagePrefix()}Internal error: invalid date for DWM resolution ${u(e.to)}, expected time without a time part`),this._clearResetCacheTimeout();return setTimeout((()=>{this._destroyed||this._processPendingSubscribers()}),0),s}removeSubscription(e){const t=this._pendingSubscribers.find((t=>t.key===e));if(t)return void this._pendingSubscribers.splice(this._pendingSubscribers.indexOf(t),1);const i=this._subscribers.find((t=>t.key===e));if(i)return this._subscribers.splice(this._subscribers.indexOf(i),1),void(this._subscribers.length||(this._resetCacheTimeout=setTimeout((()=>{this._resetCacheTimeout=null,this._purgeCache(),this._unsubscribeRealtime()}),this._resetCacheTimePeriod)));console.warn("Unknown subscription symbol={0}, resolution={1}, key={2}".format(this._symbolInfo.name,this._resolution,e))}_logMessage(e,t){(a.enabled("charting_library_debug_mode")||t)&&console.log(`${this._logMessagePrefix()}${e}`)}_logMessagePrefix(){const e=this._symbolInfo.currency_code,t=this._symbolInfo.unit_id;return`FEED [${this._symbolInfo.name}|${this._resolution}${e?"|"+e:""}${t?"|"+t:""}]: `}_clearResetCacheTimeout(){null!==this._resetCacheTimeout&&(clearTimeout(this._resetCacheTimeout),this._resetCacheTimeout=null)}_purgeCache(){this._logMessage("Reset cache"),this._cache={bars:[]},this._errorMessage=null,this._leftDate=null,this._endOfData=!1,this._updateDatesFromExpirationDate()}_updateDatesFromExpirationDate(){void 0!==this._symbolInfo.expiration_date&&(this._nextTime=1e3*this._symbolInfo.expiration_date,this._leftDate=1e3*(this._symbolInfo.expiration_date+1))}_dealignTime(e){return null===this._dwmAligner?e:this._dwmAligner.timeToExchangeTradingDay(e)}_normalizeRange(e){const t=void 0!==e.to?e.to:this._dealignTime(this._now());if(0===this._cache.bars.length||void 0!==e.to&&t<=(0,s.ensureNotNull)(this._leftDate))return{countBack:e.countBack,to:t};const i=null!==this._dwmAligner?this._dwmAligner.timeToSessionStart(t):t,r=(0,n.lowerbound)(this._cache.bars,i,((e,t)=>e.time{e.onErrorCallback(t)}))}let t=this._normalizeRange(e[0].range);for(const i of e.map((e=>this._normalizeRange(e.range))))(i.tot.countBack)&&(t=i);this._logMessage(`Leftmost subscriber requires ${t.countBack} bars prior ${u(t.to)}`);!(null===this._leftDate||t.to{const t=this._moveSubscriberToRealtime(e);this._returnHistoryDataToSubscriber(e,t)})),this._subscribeRealtimeIfNeeded()):this._ensureRequestedTo(t)}_moveSubscriberToRealtime(e){const t={key:e.key,onHistoryCallback:e.onHistoryCallback,barset:null};return this._subscribers.push(t),t}_isSymbolExpired(){return this._symbolInfo.expired||void 0!==this._symbolInfo.expiration_date}_subscribeRealtimeIfNeeded(){!this._subscribers.length||this._realtimeOn||this._isSymbolExpired()||this._subscribeRealtime()}_subscribeRealtime(){if(this._symbolInfo.expired||this._realtimeOn)return;this._realtimeOn=!0,this._datafeed.subscribeBars(this._symbolInfo,this._resolution,(e=>{null!==this._dwmAligner&&(e.time=this._dwmAligner.timeToSessionStart(e.time)),this._putToCacheNewBar(e),this._subscribers.forEach((t=>{const i=t.barset;if(null===i)throw new Error("subscriber.barset is null");i.add(e),t.onHistoryCallback(i)}))}),d(this._symbolInfo,this._resolution),(()=>{this._unsubscribeRealtime();const e=this._leftDate;this._purgeCache(),null!==e&&this._ensureRequestedTo({to:e,countBack:0})})),this._logMessage("Subscribed to realtime")}_unsubscribeRealtime(){!this._isSymbolExpired()&&this._realtimeOn&&(this._datafeed.unsubscribeBars(d(this._symbolInfo,this._resolution)),this._logMessage("Unsubscribed from realtime"),this._realtimeOn=!1)}_returnHistoryDataToSubscriber(e,t){const i=this._normalizeRange(e.range),s=this._createBarsetForRange(i);s.count()>0?this._logMessage("Bars to return for request {0}: total {1} bars in [{2} ... {3}] ".format(e.key,s.count(),u(s.bars[0].time),u(s.bars[s.count()-1].time))):this._logMessage("Request {0}. Nothing to return.".format(e.key)),t.barset=s,this._endOfData&&null!==this._leftDate&&i.to<=this._leftDate&&(s.endOfData=!0),e.onHistoryCallback(s)}_createBarsetForRange(e){const t=null!==this._dwmAligner?this._dwmAligner.timeToSessionStart(e.to):e.to,i=(0,n.lowerbound)(this._cache.bars,t,((e,t)=>e.time{if(!this._destroyed)if(a)this._logMessage("getBars callback is already called before",!0);else{if(a=!0,e.length>0){const t=` [${u(e[0].time)} ... ${u(e[e.length-1].time)}]`;this._logMessage(`Receiving bars: total ${e.length} bars in ${t}, requested range: ${o}`)}else this._logMessage(`Receiving bars: barset is empty, requested range: ${o}`);this._requesting=!1,this._processBars(e,t)}}),(e=>{this._destroyed||(a?this._logMessage("getBars callback is already called before",!0):(a=!0,this._requesting=!1,this._errorMessage=e||null,this._processPendingSubscribers()))}))}_processBars(e,t){this._checkBars(e),this._alignBarsTime(e),e.length>0?(this._emptyResponsesCount=0,this._processFullBarset(e,t)):(this._emptyResponsesCount+=1,this._processEmptyBarset(t)),this._processPendingSubscribers()}_processEmptyBarset(e){e&&e.nextTime?(this._logMessage("Next time received: `{0}`".format(u(1e3*e.nextTime))),this._nextTime=1e3*e.nextTime):e&&e.noData?(this._logMessage("EOD received"),this._setEndOfData()):this._logMessage("nextTime or noData should present in metainfo when empty barset is returned"),50===this._emptyResponsesCount&&(this._logMessage("EOD detected due 50 empty responses in a row"),this._setEndOfData())}_setEndOfData(){this._endOfData=!0, -this._cache.bars.length&&(this._leftDate=this._dealignTime(this._cache.bars[0].time))}_processFullBarset(e,t){this._putToCache(e)?null!==this._leftDate&&0!==this._cache.bars.length&&(this._interval.isTicks()?this._leftDate=this._dealignTime(this._cache.bars[0].time):this._leftDate=Math.min(this._leftDate,this._dealignTime(this._cache.bars[0].time))):this._logMessage("Incremental update failed. Starting full update. Returned data should be in the requested range.",!0),t&&t.nextTime?console.warn("nextTime should be set when there is no data in the requested period only"):t&&t.noData&&console.warn("noData should be set when there is no data in the requested period and earlier only")}_getNextSubscriptionId(){return this._nextSubscriptionId++}_checkBars(e,t=!1){if(a.enabled("charting_library_debug_mode"))for(let i=1;i"number"!=typeof e[i][t]||!isFinite(e[i][t])))&&console.error("Wrong bars values: all OHLC values should be numbers")}}_putToCache(e){if(0===e.length)return!0;if(this._cache.bars.length===e.length&&this._cache.bars[0].time===e[0].time&&this._cache.bars[this._cache.bars.length-1].time===e[e.length-1].time)return this._logMessage("Time range of received data is the same as cached one. Skip the update."),!0;if(0!==this._cache.bars.length&&e[e.length-1].time===this._cache.bars[0].time&&this._cache.bars.splice(0,1),0!==this._cache.bars.length&&e[e.length-1].time>=this._cache.bars[0].time){const t=this._cache.bars[this._cache.bars.length-1].time===e[e.length-1].time;if(this._cache.bars=[],!t)return this._leftDate=null,!1;this._logMessage("Received history up to now instead of incremental update. Return exactly what is requested.")}return this._cache.bars=[...e,...this._cache.bars],this._checkBars(this._cache.bars,!0),!0}_putToCacheNewBar(e){const t=this._cache.bars.length,i=e.time,s=0===t?NaN:this._cache.bars[t-1].time;0===t||st.destroy())),this._threads={},delete this._datafeed}purgeCache(){this._forEachThread(((e,t)=>t.destroy())),this._threads={}}subscribe(e,t,i,s,r){const n=d(e,t);this._threads[n]||(this._threads[n]=this._createThread(e,t));return n+'"'+this._threads[n].addSubscription(i,s,r)} -unsubscribe(e){const t=e.split('"');if(2!==t.length)return void console.warn("Wrong guid format");const i=t[0],s=parseInt(t[1]);this._threads.hasOwnProperty(i)?this._threads[i].removeSubscription(s):console.warn("Data thread doesnt exist: "+e)}_createThread(e,t){return new p(this._datafeed,e,t,this._serverTimeOffsetGetter,(0,c.createDwmAligner)(t,e),this._resetCacheTimePeriod)}_forEachThread(e){Object.keys(this._threads).forEach((t=>e(t,this._threads[t])))}}},23150:(e,t,i)=>{"use strict";i.d(t,{barTimeToEndOfPeriod:()=>r,endOfPeriodToBarTime:()=>n});var s=i(76545);function r(e,t,i){if(i.isDays())return t;if(e.moveTo(1e3*t),i.isIntraday()){const i=e.indexOfBar(1e3*t);if(i<0)throw new Error(`${t} is out of the instrument session `);return e.endOfBar(i)/1e3}return e.startOfBar(s.SessionStage.LASTBAR_SESSION)/1e3}function n(e,t,i){if(i.isDays())return t;const s=1e3*t-1;if(e.moveTo(s),i.isIntraday()){const i=e.indexOfBar(s);if(i<0)throw new Error(`${t} is out of the instrument session `);return e.startOfBar(i)/1e3}return t=e.startOfBar(0)/1e3}},11249:(e,t,i)=>{"use strict";i.d(t,{replaceGraphicsTimesWithTimePointIndexIndex:()=>n});const s=new Map([["horizlines",e=>[e.startIndex,e.endIndex]],["hhists",e=>[e.firstBarTime,e.firstBarTime]],["vertlines",e=>[e.index]],["polygons",e=>e.points.map((e=>e.index))],["horizlines",e=>[e.startIndex,e.endIndex]],["hhists",e=>[e.firstBarTime,e.firstBarTime]],["vertlines",e=>[e.index]],["polygons",e=>e.points.map((e=>e.index))],["backgrounds",e=>[e.start,e.stop]]]),r=new Map([["horizlines",(e,t)=>{const i=e;i.startIndex=t.get(i.startIndex),i.endIndex=t.get(i.endIndex)}],["hhists",(e,t)=>{const i=e;i.firstBarTime=t.get(i.firstBarTime),i.lastBarTime=t.get(i.lastBarTime)}],["vertlines",(e,t)=>{const i=e;i.index=t.get(i.index)}],["polygons",(e,t)=>{const i=e;for(const e of i.points)e.index=t.get(e.index)}],["backgrounds",(e,t)=>{const i=e;i.start=t.get(i.start),i.stop=t.get(i.stop)}]]);function n(e){const t=e.data&&e.data.graphicsCmds&&e.data.graphicsCmds.create;if(!t)return[];const i=new Map,n=new Set;s.forEach(((e,s)=>{const r=t[s];if(r)for(const t of r)for(const s of t.data){const t=e(s);for(const e of t)i.set(e,-1),n.add(e)}}));const o=Array.from(n).sort(((e,t)=>e-t));return o.forEach(((e,t)=>i.set(e,t))),r.forEach(((e,s)=>{const r=t[s];if(r)for(const t of r)for(const s of t.data)e(s,i)})),o}},17152:(e,t,i)=>{"use strict";var s=i(2484);window.onload=function(){location.hostname.indexOf(".")>=0&&!function(){try{return/^(192|172|10)\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]/.test(location.hostname)||/^.*((?:\.local)|localhost)$/.test(location.hostname)}catch(e){return!1}}()&&setTimeout((function(){try{var e=function(){var e=0;return JSON.parse(urlParams.logo).image&&(e="C",s.enabled("link_to_tradingview")||(e="D")),e}();window.ga&&(0!==e&&window.ga("send","event","s",e),urlParams.utm||window.ga("send","event","l"))}catch(e){}}),3e4)}},78554:(e,t,i)=>{"use strict";var s=i(69228),r={};e.exports=function(e,t,i){var n,o,a={},l=r[i]||"out_of_session",c=!1,h=i,d=t,u=null;function p(){ -var e={};e.symbolname=h,e.status="ok",e.values={},e.values.current_session=l,r[h]=l,TradingView.ChartapiMessagerInstances[d].onQuotesData([d].concat([e]))}function _(){if(n)if(o)l="out_of_session";else{var e=s.isTradingNow((new Date).getTime(),n)?"market":"out_of_session";e!==l&&(l=e,p())}}return e(i,null,(function(e){c||function(e){n=new s.SessionInfo(e.timezone,e.session,e.session_holidays,e.corrections),o=e.expired,u=setInterval(_,6e4),_(),p()}(e)}),(function(){})),a.stop=function(){c=!0,u&&clearInterval(u)},a.marketStatus=function(){return l},a}},743:(e,t,i)=>{"use strict";i.d(t,{getChartStyleStudy:()=>n});var s=i(76702);class r{main(e){const t=e.new_var(s.Std.open(e)),i=e.new_var(s.Std.close(e)),r=t.get(1),n=i.get(1),o=s.Std.ohlc4(e),a=s.Std.na(t.get(1))?(s.Std.open(e)+s.Std.close(e))/2:(r+n)/2;t.set(a),i.set(o);const l=s.Std.max(s.Std.high(e),s.Std.max(a,o)),c=s.Std.min(s.Std.low(e),s.Std.min(a,o)),h=s.Std.volume(e),d=e.symbol;return[d.time,a,l,c,o,h,d.updatetime,d.isBarClosed]}}function n(e){if(0===e.type.indexOf("BarSetHeikenAshi@tv-basicstudies-"))return new r;const t=`unknown builder type: ${e.type}`;throw console.error(t),new Error(t)}},22115:(e,t,i)=>{"use strict";var s=i(578).Interval,r=i(8950).isAlignmentEnabled,n=i(743).getChartStyleStudy,o=i(91035).decodeExtendedSymbol,a=i(54480).findSuitableResolutionToBuildFrom,l=i(92484).SubsessionId,c=function(){var e=i(76702),t=e.StudyEngine,c=e.BarBuilder,h=e.BarSet;function d(e){this.host=e,this.cache={}}function u(t){console.error(t),e.Std.error(t)}d.prototype.getCache=function(e){return this.cache[e]},d.prototype.putCache=function(e,t){this.cache[e]=t},d.prototype.subscribe=function(e,t,i,s,r,n,o,a,l,c,h){var d=l(o),u=function(e,t,i,s,r,n,o,a,l){var c=r.has_empty_bars?"_":"";return n+e+s+(t||"")+(i||"")+(l||"")+c+"_"+o.countBack+"_"+o.to+"_"+Boolean(a)}(e,t,i,s,o,a,d,c,h),p=this.getCache(u);return p||(p=this.createItem(e,t,i,s,o,d,a,c,h),this.putCache(u,p)),p.listeners.addListener(r,n),{key:u,listener:r}},d.prototype.unsubscribe=function(e){var t=this.getCache(e.key);t&&t.listeners.removeListener(e.listener)},d.prototype.removeUnused=function(){var e=[];for(var t in this.cache){if(this.cache[t])0===this.cache[t].listeners.listenersCount()&&e.push(t)}if(0!==e.length){for(var i=0;i"number"!=typeof e[i][t]||!isFinite(e[i][t])))&&console.error(`${this._logMessagePrefix()}Wrong bars values: all OHLC values should be numbers`)}}_putToCache(e){if(0===e.length)return!0;if(this._cache.bars.length===e.length&&this._cache.bars[0].time===e[0].time&&this._cache.bars[this._cache.bars.length-1].time===e[e.length-1].time)return this._logMessage("Time range of received data is the same as cached one. Skip the update."),!0;if(0!==this._cache.bars.length&&e[e.length-1].time===this._cache.bars[0].time&&this._cache.bars.splice(0,1),0!==this._cache.bars.length&&e[e.length-1].time>=this._cache.bars[0].time){const t=this._cache.bars[this._cache.bars.length-1].time===e[e.length-1].time;if(this._cache.bars=[],!t)return this._leftDate=null,!1;this._logMessage("Received history up to now instead of incremental update. Return exactly what is requested.")}return this._cache.bars=[...e,...this._cache.bars],this._checkBars(this._cache.bars,!0),!0}_putToCacheNewBar(e){const t=this._cache.bars.length,i=e.time,s=0===t?NaN:this._cache.bars[t-1].time;0===t||st.destroy())),this._threads={},delete this._datafeed}purgeCache(){this._forEachThread(((e,t)=>t.destroy())),this._threads={}}subscribe(e,t,i,s,r){const n=d(e,t) +;this._threads[n]||(this._threads[n]=this._createThread(e,t));return n+'"'+this._threads[n].addSubscription(i,s,r)}unsubscribe(e){const t=e.split('"');if(2!==t.length)return void console.warn("Wrong guid format");const i=t[0],s=parseInt(t[1]);this._threads.hasOwnProperty(i)?this._threads[i].removeSubscription(s):console.warn("Data thread doesnt exist: "+e)}_createThread(e,t){return new p(this._datafeed,e,t,this._serverTimeOffsetGetter,(0,c.createDwmAligner)(t,e),this._resetCacheTimePeriod)}_forEachThread(e){Object.keys(this._threads).forEach((t=>e(t,this._threads[t])))}}},23150:(e,t,i)=>{"use strict";i.d(t,{barTimeToEndOfPeriod:()=>r,endOfPeriodToBarTime:()=>n});var s=i(76545);function r(e,t,i){if(i.isDays())return t;if(e.moveTo(1e3*t),i.isIntraday()){const i=e.indexOfBar(1e3*t);if(i<0)throw new Error(`${t} is out of the instrument session `);return e.endOfBar(i)/1e3}return e.startOfBar(s.SessionStage.LASTBAR_SESSION)/1e3}function n(e,t,i){if(i.isDays())return t;const s=1e3*t-1;if(e.moveTo(s),i.isIntraday()){const i=e.indexOfBar(s);if(i<0)throw new Error(`${t} is out of the instrument session `);return e.startOfBar(i)/1e3}return t=e.startOfBar(0)/1e3}},11249:(e,t,i)=>{"use strict";i.d(t,{replaceGraphicsTimesWithTimePointIndexIndex:()=>n});const s=new Map([["horizlines",e=>[e.startIndex,e.endIndex]],["hhists",e=>[e.firstBarTime,e.firstBarTime]],["vertlines",e=>[e.index]],["polygons",e=>e.points.map((e=>e.index))],["horizlines",e=>[e.startIndex,e.endIndex]],["hhists",e=>[e.firstBarTime,e.firstBarTime]],["vertlines",e=>[e.index]],["polygons",e=>e.points.map((e=>e.index))],["backgrounds",e=>[e.start,e.stop]]]),r=new Map([["horizlines",(e,t)=>{const i=e;i.startIndex=t.get(i.startIndex),i.endIndex=t.get(i.endIndex)}],["hhists",(e,t)=>{const i=e;i.firstBarTime=t.get(i.firstBarTime),i.lastBarTime=t.get(i.lastBarTime)}],["vertlines",(e,t)=>{const i=e;i.index=t.get(i.index)}],["polygons",(e,t)=>{const i=e;for(const e of i.points)e.index=t.get(e.index)}],["backgrounds",(e,t)=>{const i=e;i.start=t.get(i.start),i.stop=t.get(i.stop)}]]);function n(e){const t=e.data&&e.data.graphicsCmds&&e.data.graphicsCmds.create;if(!t)return[];const i=new Map,n=new Set;s.forEach(((e,s)=>{const r=t[s];if(r)for(const t of r)for(const s of t.data){const t=e(s);for(const e of t)i.set(e,-1),n.add(e)}}));const o=Array.from(n).sort(((e,t)=>e-t));return o.forEach(((e,t)=>i.set(e,t))),r.forEach(((e,s)=>{const r=t[s];if(r)for(const t of r)for(const s of t.data)e(s,i)})),o}},17152:(e,t,i)=>{"use strict";var s=i(2484);window.onload=function(){location.hostname.indexOf(".")>=0&&!function(){try{return/^(192|172|10)\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]\.[0-9][0-9][0-9]/.test(location.hostname)||/^.*((?:\.local)|localhost)$/.test(location.hostname)}catch(e){return!1}}()&&setTimeout((function(){try{var e=function(){var e=0;return JSON.parse(urlParams.logo).image&&(e="C",s.enabled("link_to_tradingview")||(e="D")),e}();window.ga&&(0!==e&&window.ga("send","event","s",e),urlParams.utm||window.ga("send","event","l"))}catch(e){}}),3e4)}},78554:(e,t,i)=>{"use strict" +;var s=i(69228),r={};e.exports=function(e,t,i){var n,o,a={},l=r[i]||"out_of_session",c=!1,h=i,d=t,u=null;function p(){var e={};e.symbolname=h,e.status="ok",e.values={},e.values.current_session=l,r[h]=l,TradingView.ChartapiMessagerInstances[d].onQuotesData([d].concat([e]))}function _(){if(n)if(o)l="out_of_session";else{var e=s.isTradingNow((new Date).getTime(),n)?"market":"out_of_session";e!==l&&(l=e,p())}}return e(i,null,(function(e){c||function(e){n=new s.SessionInfo(e.timezone,e.session,e.session_holidays,e.corrections),o=e.expired,u=setInterval(_,6e4),_(),p()}(e)}),(function(){})),a.stop=function(){c=!0,u&&clearInterval(u)},a.marketStatus=function(){return l},a}},743:(e,t,i)=>{"use strict";i.d(t,{getChartStyleStudy:()=>n});var s=i(76702);class r{main(e){const t=e.new_var(s.Std.open(e)),i=e.new_var(s.Std.close(e)),r=t.get(1),n=i.get(1),o=s.Std.ohlc4(e),a=s.Std.na(t.get(1))?(s.Std.open(e)+s.Std.close(e))/2:(r+n)/2;t.set(a),i.set(o);const l=s.Std.max(s.Std.high(e),s.Std.max(a,o)),c=s.Std.min(s.Std.low(e),s.Std.min(a,o)),h=s.Std.volume(e),d=e.symbol;return[d.time,a,l,c,o,h,d.updatetime,d.isBarClosed]}}function n(e){if(0===e.type.indexOf("BarSetHeikenAshi@tv-basicstudies-"))return new r;const t=`unknown builder type: ${e.type}`;throw console.error(t),new Error(t)}},22115:(e,t,i)=>{"use strict";var s=i(578).Interval,r=i(8950).isAlignmentEnabled,n=i(743).getChartStyleStudy,o=i(91035).decodeExtendedSymbol,a=i(54480).findSuitableResolutionToBuildFrom,l=i(92484).SubsessionId,c=function(){var e=i(76702),t=e.StudyEngine,c=e.BarBuilder,h=e.BarSet;function d(e){this.host=e,this.cache={}}function u(t){console.error(t),e.Std.error(t)}d.prototype.getCache=function(e){return this.cache[e]},d.prototype.putCache=function(e,t){this.cache[e]=t},d.prototype.subscribe=function(e,t,i,s,r,n,o,a,l,c,h){var d=l(o),u=function(e,t,i,s,r,n,o,a,l){var c=r.has_empty_bars?"_":"";return n+e+s+(t||"")+(i||"")+(l||"")+c+"_"+o.countBack+"_"+o.to+"_"+Boolean(a)}(e,t,i,s,o,a,d,c,h),p=this.getCache(u);return p||(p=this.createItem(e,t,i,s,o,d,a,c,h),this.putCache(u,p)),p.listeners.addListener(r,n),{key:u,listener:r}},d.prototype.unsubscribe=function(e){var t=this.getCache(e.key);t&&t.listeners.removeListener(e.listener)},d.prototype.removeUnused=function(){var e=[];for(var t in this.cache){if(this.cache[t])0===this.cache[t].listeners.listenersCount()&&e.push(t)}if(0!==e.length){for(var i=0;i{"use strict";i.d(t,{findSuitableResolutionToBuildFrom:()=>o});var s=i(578);function r(e,t){const i=t.multiplier();for(let s=e.length-1;s>=0;s--){const r=Number(e[s]);if(i%r==0)return{error:!1,resolution:`${r}${t.letter()}`}}return{error:!0,errorMessage:n(t.value())}}function n(e){return`Misconfiguration error: it is trying to request ${e} but we cannot build it from lower resolution`}function o(e,t){const i=s.Interval.parse(e);if((i.isWeeks()||i.isMonths())&&t.has_weekly_and_monthly){let e=["1"];i.isWeeks()&&void 0!==t.weekly_multipliers&&(e=t.weekly_multipliers),i.isMonths()&&void 0!==t.monthly_multipliers&&(e=t.monthly_multipliers);const s=r(e,i);if(!s.error)return s}if(i.isDWM()&&(void 0===t.has_daily||t.has_daily))return i.isDays()&&void 0!==t.daily_multipliers?r(t.daily_multipliers,i):void 0===t.daily_multipliers||t.daily_multipliers.includes("1")?{error:!1,resolution:"1D"}:{error:!0,errorMessage:"Misconfiguration error: it is trying to request a resolution but symbol does not support it"};if(i.isDWM())return{error:!0,errorMessage:n(i.value())};if(i.isMinutes()&&!t.has_intraday)return{error:!0,errorMessage:"Misconfiguration error: it is trying to request intraday resolution but symbol does not support it"};if(i.isSeconds()&&!t.has_seconds)return{error:!0,errorMessage:"Misconfiguration error: it is trying to request seconds resolution but symbol does not support it"};if(i.isTicks())return!t.has_ticks||i.multiplier()>1?{error:!0,errorMessage:`Misconfiguration error: it is trying to request ${i.multiplier()} ticks resolution but symbol does not support it`}:{error:!1,resolution:"1T"};const o=i.isSeconds()?t.seconds_multipliers:t.intraday_multipliers;return void 0===o?{error:!1,resolution:i.value()}:r(o,i)}},76702:(e,t,i)=>{"use strict";var s,r=i(76368).StudyError,n=i(93975),o=i(76545).SessionStage,a=i(578).Interval,l=i(8950).createDwmAligner,c=i(8950).createTimeToBarTimeAligner,h=i(91035).decodeExtendedSymbol,d=i(91035).encodeExtendedSymbolOrGetSimpleSymbolString,u=i(92484).SubsessionId,p=i(5471).PrePostMarketBarIdentifier,_=i(21169).SessionSpec,m=1e-10,g="undefined"!=typeof window?window:i.g,f=g.PineJsCalendar?g.PineJsCalendar:i(32769),v=i(69228),S=i(87770).extrapolateBarsFrontToTime,y={};function b(e,t,i,s,r){var n=r,o=0;if(isNaN(e.get(t-1)))return{index:NaN,value:NaN};for(var a=0;at},y.gt=function(e,t){return!y.isZero(e-t)&&e>t},y.lt=function(e,t){return!y.isZero(e-t)&&e(i||m)},y.less=function(e,t,i){return t-e>(i||m)},y.compare=function(e,t,i){return y.equal(e,t,i)?0:y.greater(e,t,i)?1:-1},y.max=Math.max,y.min=Math.min,y.pow=Math.pow,y.abs=Math.abs,y.log=Math.log,y.log10=function(e){return Math.log(e)/Math.LN10},y.sqrt=Math.sqrt,y.sign=function(e){return isNaN(e)?NaN:y.isZero(e)?0:e>0?1:-1},y.exp=Math.exp,y.sin=Math.sin,y.cos=Math.cos,y.tan=Math.tan,y.asin=Math.asin,y.acos=Math.acos,y.atan=Math.atan,y.floor=Math.floor,y.ceil=Math.ceil,y.round=Math.round,y.avg=function(e,t,i,s,r,n){if(2===arguments.length)return(e+t)/2;for(var o=0,a=0;a=0;--n){var o=t[n];if(!(o>=i.startOfBar(0))){i.moveTo(o);var a=t[n+1];s.push(a)}}s.reverse()}return s},y.selectPreAndPostMarketTimes=function(e,t){if(y.isdwm(e)||void 0===e.symbol.session.timezone)return{preMarket:[],postMarket:[]};if(null===e.symbol.regularSubsession||null===e.symbol.preMarketSubsession||null===e.symbol.postMarketSubsession)return{preMarket:[],postMarket:[]};return new p(e.symbol.timezone,e.symbol.preMarketSubsession,e.symbol.postMarketSubsession).getPreAndPostMarketTimes(t)},y.iff=function(e,t,i){return y.not(e)?i:t},y.rising=function(e,t){for(var i=1;ie.get(0))return 0;return 1},y.falling=function(e,t){for(var i=1;i=0;r--){s+=(t-r)*e.get(r)}return 2*s/(t*(t+1))},y.vwma=function(e,t,i){var s=i.new_var(y.volume(i)),r=i.new_var(e.get(0)*y.volume(i));return y.sma(r,t,i)/y.sma(s,t,i)},y.swma=function(e,t){return(e.get(0)+2*e.get(1)+2*e.get(2)+e.get(3))/6},y.supertrend=function(e,t,i){var s=y.atr(t,i),r=i.new_var(s).get(1),n=y.hl2(i),o=n+s*e,a=n-s*e,l=y.close(i),c=i.new_var(l).get(1),h=i.new_var(),d=y.nz(h.get(1)),u=i.new_var(),p=y.nz(u.get(1));a=y.gt(a,d)||y.lt(c,d)?a:d,h.set(a),o=y.lt(o,p)||y.gt(c,p)?o:p,u.set(o) -;var _=y.na(),m=i.new_var(),g=m.get(1),f=-1===(_=y.na(r)?1:g===p?l>o?-1:1:l2&&(T=Math.min(T,S))):(T=Math.max(T,b),y.n(s)>2&&(T=Math.max(T,w))),p.set(T),T},y.alma=function(e,t,i,s){for(var r=Math.floor(i*(t-1)),n=t/s*(t/s),o=[],a=0,l=0;l1&&(this._currentIndex.set(n),this._currentValue.set(o),this._pivotIndex.set(a))}isPivotFound(){return-1!==this._pivotIndex.get()}pivotIndex(){return this._pivotIndex.get()}currentValue(){return this._currentValue.get()}pivotType(){return this._pivotType}reset(){this._currentValue.set(NaN),this._currentIndex.set(0),this._pivotIndex.set(-1)}isRightSideOk(e){return e-this._currentIndex.get()===this._areaRight}isViolate(e,t){if(e<1||isNaN(this._currentValue.get()))return!0;var i=this._series.get(this._index-e);return!!isNaN(i)||(i===this._currentValue.get()?t:this._pivotType===w.HIGH?i>this._currentValue.get():ithis._areaRight}update(){if(this._isNewBar&&this.isPivotFound()&&this.reset(),this.processPoint(this._index),this.isRightSideOk(this._index)){if(-1===this._pivotIndex.get()){for(var e=!0,t=0;t1&&this.addPivot(n,o,a),this.processPivot(this._pivotHigh),this.processPivot(this._pivotLow)}addPivot(e,t,i){this._lastIndex.set(e),this._lastVal.set(t),this._lastType.set(i)}updatePivot(e,t){this._lastIndex.set(e),this._lastVal.set(t)}lastPrice(){return this._lastVal.get()}lastIndex(){return this._lastIndex.get()}addPoint(e,t,i){if(isNaN(this._lastVal.get()))this.addPivot(e,t,i);else{var s=this._lastVal.get();if(this._lastType.get()!==i)Math.abs(s-t)/t>this._deviation&&this.addPivot(e,t,i);else(i===w.HIGH?t>s:t0&&i.set(e),i}new_unlimited_var(e){var t=this.vars;t.length<=this.vars_index&&t.push(new x(this.symbol));var i=t[this.vars_index++];return arguments.length>0&&i.set(e),i}new_ctx(){return this.ctx.length<=this.ctx_index&&this.ctx.push(new P(this.symbol)),this.ctx[this.ctx_index++]}prepare(e){this.ctx_index=0,this.vars_index=0;for(var t=0;te&&(e=i)}return e}stop(){this.symbol=null,this.vars=null}setMinimumAdditionalDepth(e){this.minimumAdditionalDepth=e}}class T{constructor(e){this.mindepth=0,this.original=NaN,this.modified=!1,this.symbol=e}valueOf(){return this.get(0)}get(e){return isNaN(e)&&(e=0),e=e||0,this.hist?e>=this.hist.length?(console.error("not enough depth: "+this),NaN):this._get(e):(this.mindepth=y.max(this.mindepth,e),NaN)}_get(e){var t=this.hist_pos-e;return t<0&&(t+=this.hist.length),this.hist[t]}set(e){this.hist&&(this.hist[this.hist_pos]=e,this.modified=!0)}prepare(e){e===this.symbol&&(e.isNewBar?(this.original=this.get(0),!this.modified&&this.hist||this.add_hist()):this.set(this.original),this.modified=!1)}add_hist(){if(!this.hist){var e=y.na(this.mindepth)?y.max_series_default_size:y.max(this.mindepth+1,1);e=Math.round(e);for(var t=new Array(e),i=0;io?-1:1:l2&&(T=Math.min(T,S))):(T=Math.max(T,b),y.n(s)>2&&(T=Math.max(T,w))),p.set(T),T},y.alma=function(e,t,i,s){for(var r=Math.floor(i*(t-1)),n=t/s*(t/s),o=[],a=0,l=0;l1&&(this._currentIndex.set(n),this._currentValue.set(o),this._pivotIndex.set(a))}isPivotFound(){return-1!==this._pivotIndex.get()}pivotIndex(){return this._pivotIndex.get()}currentValue(){return this._currentValue.get()}pivotType(){return this._pivotType}reset(){this._currentValue.set(NaN),this._currentIndex.set(0),this._pivotIndex.set(-1)}isRightSideOk(e){return e-this._currentIndex.get()===this._areaRight}isViolate(e,t){if(e<1||isNaN(this._currentValue.get()))return!0;var i=this._series.get(this._index-e);return!!isNaN(i)||(i===this._currentValue.get()?t:this._pivotType===w.HIGH?i>this._currentValue.get():ithis._areaRight}update(){if(this._isNewBar&&this.isPivotFound()&&this.reset(),this.processPoint(this._index),this.isRightSideOk(this._index)){if(-1===this._pivotIndex.get()){for(var e=!0,t=0;t1&&this.addPivot(n,o,a),this.processPivot(this._pivotHigh),this.processPivot(this._pivotLow)}addPivot(e,t,i){this._lastIndex.set(e),this._lastVal.set(t),this._lastType.set(i)}updatePivot(e,t){this._lastIndex.set(e),this._lastVal.set(t)}lastPrice(){return this._lastVal.get()}lastIndex(){return this._lastIndex.get()}addPoint(e,t,i){if(isNaN(this._lastVal.get()))this.addPivot(e,t,i);else{var s=this._lastVal.get();if(this._lastType.get()!==i)Math.abs(s-t)/t>this._deviation&&this.addPivot(e,t,i);else(i===w.HIGH?t>s:t0&&i.set(e),i}new_unlimited_var(e){var t=this.vars;t.length<=this.vars_index&&t.push(new x(this.symbol));var i=t[this.vars_index++];return arguments.length>0&&i.set(e),i}new_ctx(){return this.ctx.length<=this.ctx_index&&this.ctx.push(new C(this.symbol)),this.ctx[this.ctx_index++]}prepare(e){this.ctx_index=0,this.vars_index=0;for(var t=0;te&&(e=i)}return e}stop(){this.symbol=null,this.vars=null}setMinimumAdditionalDepth(e){this.minimumAdditionalDepth=e}}class T{constructor(e){this.mindepth=0,this.original=NaN,this.modified=!1,this.symbol=e}valueOf(){return this.get(0)}get(e){return isNaN(e)&&(e=0),e=e||0,this.hist?e>=this.hist.length?(console.error("not enough depth: "+this),NaN):this._get(e):(this.mindepth=y.max(this.mindepth,e),NaN)}_get(e){var t=this.hist_pos-e;return t<0&&(t+=this.hist.length),this.hist[t]}set(e){this.hist&&(this.hist[this.hist_pos]=e,this.modified=!0)}prepare(e){e===this.symbol&&(e.isNewBar?(this.original=this.get(0),!this.modified&&this.hist||this.add_hist()):this.set(this.original),this.modified=!1)}add_hist(){if(!this.hist){var e=y.na(this.mindepth)?y.max_series_default_size:y.max(this.mindepth+1,1);e=Math.round(e);for(var t=new Array(e),i=0;ie.id===u.Regular)),i=e.subsessions.find((e=>e.id===u.PreMarket)),s=e.subsessions.find((e=>e.id===u.PostMarket));void 0!==t&&(this.regularSubsession=new _(e.timezone,t.session,e.session_holidays,t["session-correction"])),void 0!==i&&(this.preMarketSubsession=new _(e.timezone,i.session,e.session_holidays,i["session-correction"])),void 0!==s&&(this.postMarketSubsession=new _(e.timezone,s.session,e.session_holidays,s["session-correction"]))}}isdwm(){return""!==this.resolution&&"S"!==this.resolution&&"T"!==this.resolution}enable_dwm_aligning(e,t){this.dwm_aligner=v.newBarBuilder(this.period,e,t)}bartime(){var e=this.time;if(!this.isdwm()||isNaN(e))return e;var t=f.utc_to_cal(this.timezone,e);return this.session.spec.correctTradingDay(t),f.cal_to_utc(this.timezone,t)}lastbar(e){if(!isNaN(e.time)){var t=e.time;this.dwm_aligner&&(this.dwm_aligner.moveTo(t),t=this.dwm_aligner.startOfBar(0));var i=this.time!==t;i&&this.index>=0&&!this.isBarClosed&&(this.isNewBar=!1,this.isBarClosed=!0,this.script.calc(this)),this.time=t,this.open=e.open,this.high=e.high,this.low=e.low,this.close=e.close,this.volume=e.volume, -this.updatetime=e.updatetime,this.isNewBar=i,this.isBarClosed=e.isBarClosed,this.isLastBar=e.isLastBar,this.isNewBar&&(this.index++,this.isFirstBar=0===this.index),this.script.calc(this)}}}class M{constructor(e,t,i,s,r,n,o,a,l,c,h){this.body=n,this.symbols=[],this.runner=r,this.inputCallback=a,this.out=o,this.nonseriesOut=l,this.ctx=new P(this.add_sym(e,t,i,s,c,h)),this.init()}calc(e){var t=this.ctx,i=this.body;t.prepare(e);var s=i.main(t,this.inputCallback,e);if(s&&"composite"===s.type)for(let e=0;e1&&o.enable_dwm_aligning(this.symbols[0].session,o.session),o}maxAdditionalDepth(){return this.symbols[0].isAdditionalDepthAllowed?this.ctx.maxAdditionalDepth():0}stop(){this.symbols=null,this.ctx.stop(),this.ctx=null}get_sym(e){return this.symbols[e]}}class A{constructor(e){this.symbols=[],this.barsets=[],this.subscription=[],this.host=e,this.isRecalculated=!1,this.isStarted=!1,this.start()}add_sym(e,t,i,s,r,n,o){var a=new I(e,t,i,s,r,n,o);return this.symbols.push(a),a}get_sym(e){return this.symbols[e]}out(e,t){if(this.nonseriesUpdate){var i=Object.assign({},this.nonseriesUpdate);t.splice(0,0,e.time),i.lastBar=t,this.host.nonseriesOut(e,i)}else this.host.out(e,t)}start(){this.isStarted=!0;var e=this.host;this._script=new M(e.tickerid,e.period,e.currencyCode,e.unitId,this,e.body,this.out.bind(this),e.input,e.nonseriesOut,e.symbolInfo,e.subsessionId);var t=this,i=[],s=this.symbols,r=Object.assign({},e.dataRange,{countBack:e.dataRange.countBack+t._script.maxAdditionalDepth()}),n=s[0];function o(t,s,r){i.push(A.feed.subscribe(t.tickerid,t.currencyCode,t.unitId,t.period,r,e.onErrorCallback,e.symbolInfo,e.sessionId,s,e.forceAlignBars,t.subsessionId))}function h(i,s){"series"===(s.nonseries?"nonseries":"series")?t.update(i,s):s.lastBar?(t.nonseriesUpdate=s,s.lastBar.isLastBar=!0,t.symbols[0].lastbar(s.lastBar),t.nonseriesUpdate=null):e.nonseriesOut(p,s)}function d(){return r}o(n,d,(function(e){!e.nonseries&&Number.isFinite(e.firstLoadedTimeMs)&&function(e){function i(i,s){var r=c(i,s)(e),n=l(i,s);return null!==n&&(r=n.timeToExchangeTradingDay(r)),{to:r,countBack:t._script.maxAdditionalDepth()}}for(var r=1;r1&&o.enable_dwm_aligning(this.symbols[0].session,o.session),o}maxAdditionalDepth(){return this.symbols[0].isAdditionalDepthAllowed?this.ctx.maxAdditionalDepth():0}stop(){this.symbols=null,this.ctx.stop(),this.ctx=null}get_sym(e){return this.symbols[e]}}class A{constructor(e){this.symbols=[],this.barsets=[],this.subscription=[],this.host=e,this.isRecalculated=!1,this.isStarted=!1,this.start()}add_sym(e,t,i,s,r,n,o){var a=new I(e,t,i,s,r,n,o);return this.symbols.push(a),a}get_sym(e){return this.symbols[e]}out(e,t){if(this.nonseriesUpdate){var i=Object.assign({},this.nonseriesUpdate);t.splice(0,0,e.time),i.lastBar=t,this.host.nonseriesOut(e,i)}else this.host.out(e,t)}start(){this.isStarted=!0;var e=this.host;this._script=new M(e.tickerid,e.period,e.currencyCode,e.unitId,this,e.body,this.out.bind(this),e.input,e.nonseriesOut,e.symbolInfo,e.subsessionId);var t=this,i=[],s=this.symbols,r=Object.assign({},e.dataRange,{countBack:e.dataRange.countBack+t._script.maxAdditionalDepth()}),n=s[0];function o(t,s,r){i.push(A.feed.subscribe(t.tickerid,t.currencyCode,t.unitId,t.period,r,e.onErrorCallback,e.symbolInfo,e.sessionId,s,e.forceAlignBars,t.subsessionId))}function h(i,s){"series"===(s.nonseries?"nonseries":"series")?t.update(i,s):s.lastBar?(t.nonseriesUpdate=s,s.lastBar.isLastBar=!0,t.symbols[0].lastbar(s.lastBar),t.nonseriesUpdate=null):e.nonseriesOut(p,s)}function d(){return r}o(n,d,(function(e){!e.nonseries&&Number.isFinite(e.firstLoadedTimeMs)&&function(e){function i(i,s){var r=c(i,s)(e),n=l(i,s);return null!==n&&(r=n.timeToExchangeTradingDay(r)),{to:r,countBack:t._script.maxAdditionalDepth()}}for(var r=1;r=0;i--)for(var s=e[i],r=this.barsets[i],n=r.count(),o=0;o{"use strict";const s=i(7394).getHexColorByName;var r=i(76702);i(95056);var n=i(9610).pivotPointsStandardStudyItem,o=i(58015).volumeProfileVisibleRangeStudyItem,a=i(76310).volumeProfileFixedRangeVbPStudyItem,l=i(76310).volumeProfileFixedRangeBSStudyItem,c=i(66380).spreadStudyItem,h=i(38854).ratioStudyItem,d=i(85289).regressionTrendStudyItem;const u=s("color-ripe-red-400"),p=s("color-minty-green-400");JSServer.studyLibrary=JSServer.studyLibrary.concat([{name:"Compare",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!0,defaults:{styles:{compare:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#9C27B0"}},inputs:{source:"close",symbol:""}},plots:[{id:"compare",type:"line"}],styles:{compare:{title:"Plot",histogramBase:0}},description:"Compare",shortDescription:"Compare",is_price_study:!0,inputs:[{defval:"close",id:"source",name:"Source",options:["open","high","low","close","hl2","hlc3","ohlc4"],type:"text"},{id:"symbol",name:"Symbol",type:"symbol",isHidden:!0}],id:"Compare@tv-basicstudies-1",format:{type:"inherit"}},constructor:function(){this.init=function(e,t){this._context=e,this._context.new_sym(t(1),r.Std.period(this._context))},this.main=function(e,t){this._context=e;var i=this._context.new_unlimited_var(this._context.symbol.time);this._context.select_sym(1);var s=this._context.new_unlimited_var(this._context.symbol.time),n=r.Std[t(0)](this._context),o=this._context.new_unlimited_var(n);return this._context.select_sym(0),[o.adopt(s,i,0)]}}},{name:"Overlay",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!0,defaults:{styles:{},inputs:{symbol:""}},plots:[{id:"open",type:"line"},{id:"high",type:"line"},{id:"low",type:"line"},{id:"close",type:"line"}],styles:{open:{title:"Open"},high:{title:"High"},low:{title:"Low"},close:{title:"Close"}},description:"Overlay",shortDescription:"Overlay",is_price_study:!1,inputs:[{id:"symbol",name:"symbol",defval:"",type:"symbol",isHidden:!0}],id:"Overlay@tv-basicstudies-1",format:{type:"price",precision:4}},constructor:function(){this.init=function(e,t){this._context=e,this._context.new_sym(t(0),r.Std.period(this._context))},this.main=function(e,t){this._context=e +var t=e.symbol.time,i=this.bb.alignTime(t),s=e.new_var(i),r=y.na(i),n=s.get(1),o=y.na(n)?1:y.neq(i,n),a=e.new_var(),l=e.new_var(),c=e.new_var(),h=e.new_var(),d=a.get(1),u=l.get(1),p=c.get(1),_=h.get(1),m=r?NaN:o?y.open(e):d,g=r?NaN:o?y.high(e):y.max(y.high(e),u),f=r?NaN:o?y.low(e):y.min(y.low(e),p),v=r?NaN:y.close(e),S=r?NaN:o?y.volume(e):y.volume(e)+_,b=r?NaN:t,w=e.symbol.isBarClosed&&this.bb.isLastBar(0,t),P=this.generateEmptyBars&&o?this.extrapolate(n,i):void 0,C=e.new_var(y.close(e)).get(1),T=P instanceof Array?C:NaN;return a.set(m),l.set(g),c.set(f),h.set(S),[i,m,g,f,v,S,b,w,P,T]}},e.exports.setupFeed=function(e){A.feed=e},e.exports.getVolumeProfileResolutionForPeriod=function(e,t,i,r){return void 0!==s?s(e,t,i,r):e},e.exports.overwriteVolumeProfileResolutionForPeriodGetter=function(e){s=e}},40716:(e,t,i)=>{"use strict";const s=i(7394).getHexColorByName;var r=i(76702);i(95056);var n=i(9610).pivotPointsStandardStudyItem,o=i(58015).volumeProfileVisibleRangeStudyItem,a=i(76310).volumeProfileFixedRangeVbPStudyItem,l=i(76310).volumeProfileFixedRangeBSStudyItem,c=i(66380).spreadStudyItem,h=i(38854).ratioStudyItem,d=i(85289).regressionTrendStudyItem;const u=s("color-ripe-red-400"),p=s("color-minty-green-400");JSServer.studyLibrary=JSServer.studyLibrary.concat([{name:"Compare",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!0,defaults:{styles:{compare:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#9C27B0"}},inputs:{source:"close",symbol:""}},plots:[{id:"compare",type:"line"}],styles:{compare:{title:"Plot",histogramBase:0}},description:"Compare",shortDescription:"Compare",is_price_study:!0,inputs:[{defval:"close",id:"source",name:"Source",options:["open","high","low","close","hl2","hlc3","ohlc4"],type:"text"},{id:"symbol",name:"Symbol",type:"symbol",isHidden:!0}],id:"Compare@tv-basicstudies-1",format:{type:"inherit"}},constructor:function(){this.init=function(e,t){this._context=e,this._context.new_sym(t(1),r.Std.period(this._context))},this.main=function(e,t){this._context=e;var i=this._context.new_unlimited_var(this._context.symbol.time);this._context.select_sym(1);var s=this._context.new_unlimited_var(this._context.symbol.time),n=r.Std[t(0)](this._context),o=this._context.new_unlimited_var(n);return this._context.select_sym(0),[o.adopt(s,i,0)]}}},{name:"Overlay",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!0,defaults:{styles:{},inputs:{symbol:""}},plots:[{id:"open",type:"line"},{id:"high",type:"line"},{id:"low",type:"line"},{id:"close",type:"line"}],styles:{open:{title:"Open"},high:{title:"High"},low:{title:"Low"},close:{title:"Close"}},description:"Overlay",shortDescription:"Overlay",is_price_study:!1,inputs:[{id:"symbol",name:"symbol",defval:"",type:"symbol",isHidden:!0}],id:"Overlay@tv-basicstudies-1",format:{type:"price",precision:4}},constructor:function(){this.init=function(e,t){this._context=e,this._context.new_sym(t(0),r.Std.period(this._context))},this.main=function(e,t){this._context=e ;var i=this._context.new_unlimited_var(this._context.symbol.time);this._context.select_sym(1);var s=this._context.new_unlimited_var(this._context.symbol.time),n=this._context.new_unlimited_var(r.Std.open(this._context)),o=this._context.new_unlimited_var(r.Std.high(this._context)),a=this._context.new_unlimited_var(r.Std.low(this._context)),l=this._context.new_unlimited_var(r.Std.close(this._context));return this._context.select_sym(0),[n.adopt(s,i,1),o.adopt(s,i,1),a.adopt(s,i,1),l.adopt(s,i,1)]}}},{name:"Volume",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{vol:{linestyle:0,linewidth:1,plottype:5,trackPrice:!1,transparency:50,visible:!0,color:"#000080"},vol_ma:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!1,color:"#2196F3"},smoothedMA:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!1,color:"#2196F3"}},palettes:{volumePalette:{colors:{0:{color:u,width:1,style:0},1:{color:p,width:1,style:0}}}},inputs:{showMA:!1,length:20,col_prev_close:!1,symbol:"",smoothingLine:"SMA",smoothingLength:9}},plots:[{id:"vol",type:"line"},{id:"volumePalette",palette:"volumePalette",target:"vol",type:"colorer"},{id:"vol_ma",type:"line"},{id:"smoothedMA",type:"line"}],styles:{vol:{title:"Volume",histogramBase:0},vol_ma:{title:"Volume MA",histogramBase:0},smoothedMA:{title:"Smoothed MA",histogramBase:0}},description:"Volume",shortDescription:"Volume",is_price_study:!1,palettes:{volumePalette:{colors:{0:{name:"Falling"},1:{name:"Growing"}}}},inputs:[{id:"symbol",name:"Other Symbol",defval:"",type:"symbol",optional:!0,isHidden:!1},{id:"showMA",name:"show MA",defval:!1,type:"bool",isHidden:!0},{id:"length",name:"MA Length",defval:20,type:"integer",min:1,max:2e3},{defval:!1,id:"col_prev_close",name:"Color based on previous close",type:"bool"},{id:"smoothingLine",name:"Smoothing Line",defval:"SMA",type:"text",options:["SMA","EMA","WMA"]},{id:"smoothingLength",name:"Smoothing Length",defval:9,type:"integer",min:1,max:1e4}],id:"Volume@tv-basicstudies-1",format:{type:"volume"}},constructor:function(){this.init=function(e,t){this._context=e,""!==t(0)&&this._context.new_sym(t(0),r.Std.period(this._context))},this.f_0=function(e,t){return r.Std.gt(e,t)?0:1},this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.volume(this._context),s=r.Std.open(this._context),n=r.Std.close(this._context),o=this._context.new_var(this._context.symbol.time),a=this._input(4),l=this._input(5);if(this._context.setMinimumAdditionalDepth(this._input(2)+l),""!==this._input(0)){this._context.select_sym(1);var c=this._context.new_var(this._context.symbol.time),h=this._context.new_var(r.Std.volume(this._context)),d=this._context.new_var(r.Std.open(this._context)),u=this._context.new_var(r.Std.close(this._context));i=h.adopt(c,o,1),s=d.adopt(c,o,1),n=u.adopt(c,o,1),this._context.select_sym(0)}var p,_,m=this._context.new_var(i),g=r.Std.sma(m,this._input(2),this._context),f=this._context.new_var(g),v=this._context.new_var(n) ;return p=v.get(1)&&this._input(3)?this.f_0(v.get(1),n):this.f_0(s,n),"EMA"===a?_=r.Std.ema(f,l,this._context):"WMA"===a?_=r.Std.wma(f,l,this._context):"SMA"===a&&(_=r.Std.sma(f,l,this._context)),[i,p,g,_]}}},{name:"ZigZag",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:2,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#2196F3"}},inputs:{in_0:5,in_1:10}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",target:"plot_0",type:"dataoffset"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Zig Zag",shortDescription:"ZigZag",is_price_study:!0,classId:"ScriptWithDataOffset",inputs:[{id:"in_0",name:"deviation",defval:5,type:"float",min:.001,max:100},{id:"in_1",name:"depth",defval:10,type:"integer",min:2,max:1e3}],id:"ZigZag@tv-basicstudies-1",format:{type:"inherit"}},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),s=this._input(1),n=i/100,o=Math.ceil(s/2);return[r.Std.zigzag(n,o,this._context),r.Std.zigzagbars(n,o,this._context)]}}},{name:"Sessions",metainfo:{_metainfoVersion:52,defaults:{graphics:{vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}},backgrounds:{preMarket:{color:"#FF9800",transparency:92,visible:!0},postMarket:{color:"#2196F3",transparency:92,visible:!0}}},linkedToSeries:!0},description:"Sessions",graphics:{vertlines:{sessBreaks:{name:"Session Break",halign:"left"}},backgrounds:{preMarket:{name:"Pre market"},postMarket:{name:"Post market"}}},id:"Sessions@tv-basicstudies-1",inputs:[],is_hidden_study:!0,is_price_study:!0,name:"Sessions@tv-basicstudies",palettes:{},plots:[],shortDescription:"Sessions",format:{type:"inherit"}},constructor:function(){function e(e,t){return{id:e,index:e,extendBottom:!0,extendTop:!0}}function t(e){return{id:e.start,start:e.start,stop:e.stop}}this.init=function(){this._times=[]},this._getVerticalLineData=function(t){return r.Std.selectSessionBreaks(t,this._times).map(e)},this._getPreAndPostMarketBackgroundsData=function(e){const i=r.Std.selectPreAndPostMarketTimes(e,this._times);return{preMarket:i.preMarket.map(t),postMarket:i.postMarket.map(t)}},this.main=function(e,t){if(r.Std.isdwm(e))return null;var i=r.Std.time(e);if(isNaN(i))return null;var s=this._times.length;if(0!==s&&this._times[s-1]===i||this._times.push(i),!e.symbol.isLastBar||!e.symbol.isNewBar)return null;var n=this._getVerticalLineData(e),o=this._getPreAndPostMarketBackgroundsData(e);return 0===n.length&&0===o.preMarket.length&&0===o.postMarket?null:{nonseries:!0,type:"study_graphics",data:{graphicsCmds:{create:{vertlines:[{styleId:"sessBreaks",data:n}],backgrounds:[{styleId:"preMarket",data:o.preMarket},{styleId:"postMarket",data:o.postMarket}]},erase:[{action:"all"}]}}}}}},{name:"SuperTrend",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:3,plottype:0,trackPrice:!1,transparency:35,visible:!0,color:"#000080"},plot_2:{linestyle:0,linewidth:3, plottype:"shape_arrow_up",trackPrice:!1,location:"BelowBar",transparency:35,visible:!0,color:"#00FF00"},plot_3:{linestyle:0,linewidth:3,plottype:"shape_arrow_down",trackPrice:!1,location:"AboveBar",transparency:35,visible:!0,color:"#FF0000"}},palettes:{palette_0:{colors:{0:{color:"#008000",width:3,style:0},1:{color:"#800000",width:3,style:0}}}},inputs:{in_0:10,in_1:3}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",palette:"palette_0",target:"plot_0",type:"colorer"},{id:"plot_2",type:"shapes"},{id:"plot_3",type:"shapes"}],styles:{plot_0:{title:"SuperTrend",histogramBase:0,joinPoints:!1,isHidden:!1},plot_2:{title:"Up Arrow",histogramBase:0,joinPoints:!1,isHidden:!1},plot_3:{title:"Down Arrow",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"SuperTrend",shortDescription:"SuperTrend",is_price_study:!0,palettes:{palette_0:{colors:{0:{name:"Color 0"},1:{name:"Color 1"}},valToIndex:{0:0,1:1}}},inputs:[{id:"in_0",name:"Length",defval:10,type:"integer",min:1,max:100},{id:"in_1",name:"Factor",defval:3,type:"float",min:1,max:100}],id:"SuperTrend@tv-basicstudies-1",scriptIdPart:"",name:"SuperTrend",isCustomIndicator:!0,format:{type:"inherit"}},constructor:function(){this.main=function(e,t){var i=t(0),s=t(1),[n,o]=r.Std.supertrend(s,i,e),a=e.new_var(o).get(1);return[n,-1===o?0:1,-1===o&&a!==o?1:NaN,1===o&&a!==o?1:NaN]}}},n,o,a,l,c,h,d])},9610:(e,t,i)=>{"use strict";i.d(t,{pivotPointsStandardStudyItem:()=>d});var s=i(76702),r=i(578),n=i(54480);class o{constructor(){this.p=NaN,this.r1=NaN,this.s1=NaN,this.r2=NaN,this.s2=NaN,this.r3=NaN,this.s3=NaN,this.r4=NaN,this.s4=NaN,this.r5=NaN,this.s5=NaN,this.startIndex__t=NaN,this.endIndex__t=NaN}}class a{constructor(){this.pivots=[]}}function l(e,t){e.setUTCMonth(e.getUTCMonth()+t)}function c(e,t){if(s.Std.ismonthly(e)){let i=new Date(t);return i.getUTCDay()=1&&t.multiplier()<=15?"1D":"1W";case r.ResolutionKind.Seconds:case r.ResolutionKind.Ticks:return"1D"}throw new Error("Unexpected resolution type: "+e.symbol.resolution)}(e);case"Daily":return"1D";case"Weekly":return"1W";case"Monthly":return"1M";case"Yearly":return"12M";default:throw new Error("No such pivTimeFrame: "+t)}}const d={name:"Pivot Points Standard",metainfo:{_metainfoVersion:44,defaults:{inputs:{kind:"Traditional",lookBack:15,pivTimeFrame:"Auto",showHistoricalPivots:!0},precision:"4"},description:"Pivot Points Standard",id:"PivotPointsStandard@tv-basicstudies-80",inputs:[{defval:"Traditional",id:"kind", @@ -100,7 +100,7 @@ c+=Math.pow(i-l-1,2);h=Math.pow(h,2);var u,p,_,m=Math.sqrt((d-h/c)/(this.period- histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Historical Volatility",shortDescription:"HV",is_price_study:!1,inputs:[{id:"in_0",name:"length",defval:10,type:"integer",min:1,max:1e12}],id:"historical_volatility@tv-basicstudies-1",scriptIdPart:"",name:"Historical Volatility",format:{precision:2,type:"price"}},constructor:function(){this.f_0=function(){var e=this._input(0),t=r.Std.or(r.Std.isintraday(this._context),r.Std.and(r.Std.isdaily(this._context),r.Std.eq(r.Std.interval(this._context),1)))?1:7,i=this._context.new_var(r.Std.close(this._context)),s=this._context.new_var(r.Std.log(r.Std.close(this._context)/i.get(1)));return[100*r.Std.stdev(s,e,this._context)*r.Std.sqrt(365/t)]},this.main=function(e,t){return this._context=e,this._input=t,this.f_0()}}},{name:"Hull MA",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#2196F3"}},inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Hull Moving Average",shortDescription:"HMA",is_price_study:!0,inputs:[{id:"in_0",name:"length",defval:9,type:"integer",min:1,max:1e4}],id:"Hull MA@tv-basicstudies-1",scriptIdPart:"",name:"Hull MA",format:{type:"inherit"}},constructor:function(){this.f_0=function(e,t){return 2*e-t},this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.close(this._context),s=this._input(0),n=s/2;this._context.setMinimumAdditionalDepth(Math.ceil(s+n));var o=this._context.new_var(i),a=r.Std.wma(o,n,this._context),l=this._context.new_var(i),c=r.Std.wma(l,s,this._context),h=this.f_0(a,c),d=r.Std.sqrt(s),u=r.Std.round(d),p=this._context.new_var(h);return[r.Std.wma(p,u,this._context)]}}},{name:"Ichimoku Cloud",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#2196F3"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:l},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#43A047"},plot_3:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#A5D6A7"},plot_4:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:o}},palettes:{palette_0:{colors:{0:{color:"#43A047",width:1,style:0},1:{color:a,width:1,style:0}}}},filledAreasStyle:{fill_0:{color:"#000080",transparency:90,visible:!0}},inputs:{in_0:9,in_1:26,in_2:52,in_3:26}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"},{id:"plot_3",type:"line"},{id:"plot_4",type:"line"},{id:"plot_5",palette:"palette_0",target:"fill_0",type:"colorer"}],styles:{plot_0:{title:"Conversion Line",histogramBase:0,joinPoints:!1,isHidden:!1},plot_1:{title:"Base Line",histogramBase:0,joinPoints:!1,isHidden:!1},plot_2:{title:"Lagging Span",histogramBase:0,joinPoints:!1,isHidden:!1},plot_3:{title:"Leading Span A",histogramBase:0, joinPoints:!1,isHidden:!1},plot_4:{title:"Leading Span B",histogramBase:0,joinPoints:!1,isHidden:!1}},description:"Ichimoku Cloud",shortDescription:"Ichimoku",is_price_study:!0,is_hidden_study:!1,id:"Ichimoku Cloud@tv-basicstudies-1",palettes:{palette_0:{colors:{0:{name:"Color 0"},1:{name:"Color 1"}},valToIndex:{0:0,1:1}}},filledAreas:[{id:"fill_0",objAId:"plot_3",objBId:"plot_4",type:"plot_plot",title:"Plots Background",isHidden:!1,palette:"palette_0"}],inputs:[{id:"in_0",name:"Conversion Line Periods",defval:9,type:"integer",min:1,max:1e12},{id:"in_1",name:"Base Line Periods",defval:26,type:"integer",min:1,max:1e12},{id:"in_2",name:"Leading Span B",defval:52,type:"integer",min:1,max:1e12},{id:"in_3",name:"Lagging Span",defval:26,type:"integer",min:1,max:1e12}],scriptIdPart:"",name:"Ichimoku Cloud",format:{type:"inherit"}},constructor:function(){this.donchian=function(e){var t=this._context.new_var(r.Std.low(this._context)),i=this._context.new_var(r.Std.high(this._context));return r.Std.avg(r.Std.lowest(t,e,this._context),r.Std.highest(i,e,this._context))},this.f_1=function(){var e=this._input(0),t=this._input(1),i=this._input(2),s=this._input(3),n=this.donchian(e),o=this.donchian(t),a=r.Std.avg(n,o),l=this.donchian(i);return[n,o,r.Std.close(this._context),a,l,1-s,s-1,s-1,r.Std.gt(a,l)?0:1]},this.main=function(e,t){this._context=e,this._input=t;var i=this.f_1();return[i[0],i[1],{value:i[2],offset:i[5]},{value:i[3],offset:i[6]},{value:i[4],offset:i[7]},i[8]]}}},{name:"Keltner Channels",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#2196F3"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#2196F3"},plot_2:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#2196F3"}},filledAreasStyle:{fill_0:{color:"#2196F3",transparency:95,visible:!0}},inputs:{in_0:!0,in_1:20,in_2:1}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"},{id:"plot_2",type:"line"}],styles:{plot_0:{title:"Upper",histogramBase:0,joinPoints:!1},plot_1:{title:"Middle",histogramBase:0,joinPoints:!1},plot_2:{title:"Lower",histogramBase:0,joinPoints:!1}},description:"Keltner Channels",shortDescription:"KC",is_price_study:!0,filledAreas:[{id:"fill_0",objAId:"plot_0",objBId:"plot_2",type:"plot_plot",title:"Plots Background"}],inputs:[{id:"in_0",name:"useTrueRange",defval:!0,type:"bool"},{id:"in_1",name:"length",defval:20,type:"integer",min:1,max:2e3},{id:"in_2",name:"mult",defval:1,type:"float",min:-1e12,max:1e12}],id:"Keltner Channels@tv-basicstudies-1",scriptIdPart:"",name:"Keltner Channels",format:{type:"inherit"}},constructor:function(){this.f_0=function(e,t,i,s){return e?t:i-s},this.f_1=function(e,t,i){return e+t*i},this.f_2=function(e,t,i){return e-t*i},this.main=function(e,t){this._context=e,this._input=t ;var i=r.Std.close(this._context),s=this._input(0),n=this._input(1),o=this._input(2),a=this._context.new_var(i),l=r.Std.ema(a,n,this._context),c=this.f_0(s,r.Std.tr(this._context),r.Std.high(this._context),r.Std.low(this._context)),h=this._context.new_var(c),d=r.Std.ema(h,n,this._context);return[this.f_1(l,d,o),l,this.f_2(l,d,o)]}}},{name:"Klinger Oscillator",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#2196F3"},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#43A047"}},inputs:{}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1}},description:"Klinger Oscillator",shortDescription:"Klinger Oscillator",is_price_study:!1,inputs:[],id:"Klinger Oscillator@tv-basicstudies-1",scriptIdPart:"",name:"Klinger Oscillator",format:{type:"volume"}},constructor:function(){this.f_0=function(e,t){return r.Std.ge(e,0)?t:-t},this.f_1=function(e,t){return e-t},this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.hlc3(this._context);this._context.setMinimumAdditionalDepth(66);var s=this._context.new_var(i),n=r.Std.change(s),o=this.f_0(n,r.Std.volume(this._context)),a=this._context.new_var(o),l=r.Std.ema(a,34,this._context),c=this._context.new_var(o),h=r.Std.ema(c,55,this._context),d=this.f_1(l,h),u=this._context.new_var(d);return[d,r.Std.ema(u,13,this._context)]}}},{name:"Know Sure Thing",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:u},plot_1:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:a}},bands:[{color:"#787B86",linestyle:2,linewidth:1,visible:!0,value:0}],inputs:{in_0:10,in_1:15,in_2:20,in_3:30,in_4:10,in_5:10,in_6:10,in_7:15,in_8:9}},plots:[{id:"plot_0",type:"line"},{id:"plot_1",type:"line"}],styles:{plot_0:{title:"KST",histogramBase:0,joinPoints:!1},plot_1:{title:"Signal",histogramBase:0,joinPoints:!1}},description:"Know Sure Thing",shortDescription:"KST",is_price_study:!1,bands:[{id:"hline_0",name:"Zero"}],inputs:[{id:"in_0",name:"roclen1",defval:10,type:"integer",min:1,max:2e3},{id:"in_1",name:"roclen2",defval:15,type:"integer",min:1,max:2e3},{id:"in_2",name:"roclen3",defval:20,type:"integer",min:1,max:2e3},{id:"in_3",name:"roclen4",defval:30,type:"integer",min:1,max:2e3},{id:"in_4",name:"smalen1",defval:10,type:"integer",min:1,max:2e3},{id:"in_5",name:"smalen2",defval:10,type:"integer",min:1,max:2e3},{id:"in_6",name:"smalen3",defval:10,type:"integer",min:1,max:2e3},{id:"in_7",name:"smalen4",defval:15,type:"integer",min:1,max:2e3},{id:"in_8",name:"siglen",defval:9,type:"integer",min:1,max:2e3}],id:"Know Sure Thing@tv-basicstudies-1",scriptIdPart:"",name:"Know Sure Thing",format:{type:"price",precision:4}},constructor:function(){ -this.f_0=function(e,t,i,s){return e+2*t+3*i+4*s},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),s=this._input(1),n=this._input(2),o=this._input(3),a=this._input(4),l=this._input(5),c=this._input(6),h=this._input(7),d=this._input(8);this._context.setMinimumAdditionalDepth(Math.max(a+i,l+s,c+n,h+o)+d);var u=r.Std.close(this._context),p=i,_=this._context.new_var(u),m=r.Std.roc(_,p),g=a,f=this._context.new_var(m),v=r.Std.sma(f,g,this._context),S=s,y=this._context.new_var(u),b=r.Std.roc(y,S),w=l,C=this._context.new_var(b),P=r.Std.sma(C,w,this._context),T=n,x=this._context.new_var(u),I=r.Std.roc(x,T),M=c,A=this._context.new_var(I),L=r.Std.sma(A,M,this._context),k=o,E=this._context.new_var(u),D=r.Std.roc(E,k),V=h,B=this._context.new_var(D),R=r.Std.sma(B,V,this._context),N=this.f_0(v,P,L,R),O=this._context.new_var(N);return[N,r.Std.sma(O,d,this._context)]}}},{name:"Least Squares Moving Average",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#2196F3"}},inputs:{in_0:25,in_1:0}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Least Squares Moving Average",shortDescription:"LSMA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:25,type:"integer",min:1,max:1e12},{id:"in_1",name:"Offset",defval:0,type:"integer",min:-1e12,max:1e12}],id:"Least Squares Moving Average@tv-basicstudies-1",scriptIdPart:"",name:"Least Squares Moving Average",format:{type:"inherit"}},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),s=this._input(1),n=r.Std.close(this._context),o=this._context.new_var(n);return[r.Std.linreg(o,i,s)]}}},{name:"Linear Regression Curve",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#2196F3"}},inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Linear Regression Curve",shortDescription:"LRC",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:9,type:"integer",min:1,max:2e3}],id:"Linear Regression Curve@tv-basicstudies-1",scriptIdPart:"",name:"Linear Regression Curve",format:{type:"inherit"}},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.close(this._context),s=this._input(0),n=this._context.new_var(i);return[r.Std.linreg(n,s,0)]}}},{name:"Linear Regression Slope",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Linear Regression Slope@tv-basicstudies-1",scriptIdPart:"",name:"Linear Regression Slope",description:"Linear Regression Slope",shortDescription:"Linear Regression Slope",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:c}},inputs:{ +this.f_0=function(e,t,i,s){return e+2*t+3*i+4*s},this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),s=this._input(1),n=this._input(2),o=this._input(3),a=this._input(4),l=this._input(5),c=this._input(6),h=this._input(7),d=this._input(8);this._context.setMinimumAdditionalDepth(Math.max(a+i,l+s,c+n,h+o)+d);var u=r.Std.close(this._context),p=i,_=this._context.new_var(u),m=r.Std.roc(_,p),g=a,f=this._context.new_var(m),v=r.Std.sma(f,g,this._context),S=s,y=this._context.new_var(u),b=r.Std.roc(y,S),w=l,P=this._context.new_var(b),C=r.Std.sma(P,w,this._context),T=n,x=this._context.new_var(u),I=r.Std.roc(x,T),M=c,A=this._context.new_var(I),L=r.Std.sma(A,M,this._context),k=o,E=this._context.new_var(u),D=r.Std.roc(E,k),B=h,V=this._context.new_var(D),R=r.Std.sma(V,B,this._context),N=this.f_0(v,C,L,R),O=this._context.new_var(N);return[N,r.Std.sma(O,d,this._context)]}}},{name:"Least Squares Moving Average",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#2196F3"}},inputs:{in_0:25,in_1:0}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Least Squares Moving Average",shortDescription:"LSMA",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:25,type:"integer",min:1,max:1e12},{id:"in_1",name:"Offset",defval:0,type:"integer",min:-1e12,max:1e12}],id:"Least Squares Moving Average@tv-basicstudies-1",scriptIdPart:"",name:"Least Squares Moving Average",format:{type:"inherit"}},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=this._input(0),s=this._input(1),n=r.Std.close(this._context),o=this._context.new_var(n);return[r.Std.linreg(o,i,s)]}}},{name:"Linear Regression Curve",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,defaults:{styles:{plot_0:{linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,visible:!0,color:"#2196F3"}},inputs:{in_0:9}},plots:[{id:"plot_0",type:"line"}],styles:{plot_0:{title:"Plot",histogramBase:0,joinPoints:!1}},description:"Linear Regression Curve",shortDescription:"LRC",is_price_study:!0,inputs:[{id:"in_0",name:"Length",defval:9,type:"integer",min:1,max:2e3}],id:"Linear Regression Curve@tv-basicstudies-1",scriptIdPart:"",name:"Linear Regression Curve",format:{type:"inherit"}},constructor:function(){this.main=function(e,t){this._context=e,this._input=t;var i=r.Std.close(this._context),s=this._input(0),n=this._context.new_var(i);return[r.Std.linreg(n,s,0)]}}},{name:"Linear Regression Slope",metainfo:{_metainfoVersion:52,isTVScript:!1,isTVScriptStub:!1,is_hidden_study:!1,is_price_study:!1,id:"Linear Regression Slope@tv-basicstudies-1",scriptIdPart:"",name:"Linear Regression Slope",description:"Linear Regression Slope",shortDescription:"Linear Regression Slope",plots:[{id:"plot_0",type:"line"}],defaults:{styles:{plot_0:{linestyle:0,visible:!0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:c}},inputs:{ periods:14}},styles:{plot_0:{title:"Plot"}},inputs:[{id:"periods",type:"integer",name:"Periods",min:2}],format:{precision:2,type:"price"}},constructor:function(){this.init=function(e,t){this._context=e,this._input=t,this.period=this._input(0)},this.linregSlope=function(e,t,i){var s,r,n,o=0,a=0,l=0,c=0;for(s=0;sthis._sortedTimePoints[this._sortedTimePoints.length-1].timeMs){if(null===this._mainSymbolExtrapolator)return null;const t=this._mainSymbolExtrapolator.indexOfTime(e),i=this._mainSymbolExtrapolator.indexOfTime(this._sortedTimePoints[this._sortedTimePoints.length-1].timeMs);if(null===t||null===i)return null;const s=t.index-i.index-1;return{index:this._sortedTimePoints.length+s,timeMs:t.timeMs}}let t=(0,o.lowerbound)(this._sortedTimePoints,e,((e,t)=>e.timeMs({timeMs:e,markWeight:0,displayTime:NaN})));this._fillPointsData(i,0,0!==this._sortedTimePoints.length?this._sortedTimePoints[this._sortedTimePoints.length-1].displayTime:null);const r=[];for(let t=e;tg(e,i+t)));return r.concat(n)}setTimezone(e){this._displayTimezone="exchange"===e?null:(0,n.get_timezone)(e),this._fillPointsData(this._sortedTimePoints,0)}fillIndexesInRows(e){if(0===e.length)return;let t=-1,i=(0,o.lowerbound)(this._sortedTimePoints,Math.round(1e3*e[0].value[0]),((e,t)=>e.timeMse.timeMs{for(;i=this._sortedTimePoints.length){const t=this.indexOfTime(e);if(null===t)return l.INVALID_TIME_POINT_INDEX;i=t.timeMs!==e?t.index+1:t.index}return(0,s.assert)(i>t,"data must have unique sorted times"),t=i,i}))}firstSeriesBarTime(){return 0===this._sortedTimePoints.length?null:this._sortedTimePoints[0].timeMs}replaceSeriesBarsTimesTail(e,t){if(0===t.length)return null;if(!this._seriesIds.has(e))return this.setSeriesBarsTimes(e,t);const i=[],s=(0,o.lowerbound)(this._sortedTimePoints,t[0],((e,t)=>e.timeMs({timeMs:e.timeMs,pointData:e.pointData,markWeight:0,displayTime:NaN})));for(let e=s;ee.timeMs-t.timeMs));const a=this._updateTimeScalePointsTail(n);return this._applyTimeScaleChanges(a,!1)}setSeriesBarsTimes(e,t){let i=0!==this._pointDataByTimePoint.size;if(this._seriesIds.has(e))if(1===this._seriesIds.size)i=!1,this._pointDataByTimePoint.clear();else for(const t of this._sortedTimePoints)t.pointData.series.delete(e);this._addBarsTimesToSeries(e,t,!1);const s=this._seriesIds.size;0===t.length?this._seriesIds.delete(e):this._seriesIds.add(e),i&&this._cleanupPointsData(this._sortedTimePoints);const r=sthis._seriesIds.size,o=r&&2===this._seriesIds.size||n&&1===this._seriesIds.size,a=[];this._pointDataByTimePoint.forEach(((e,t)=>{a.push({markWeight:0,timeMs:t,displayTime:NaN,pointData:e})})),a.sort(((e,t)=>e.timeMs-t.timeMs));const l=this._updateTimeScalePoints(a);return this._applyTimeScaleChanges(l,o)}_updateFutureBars(){if(0===this._minFutureBarsCount||null===this._mainSymbolExtrapolator)return;if(0!==this._sortedTimePoints.length){const e=this._sortedTimePoints[this._sortedTimePoints.length-1].timeMs;this._mainSymbolExtrapolator.ensureExtrapolatedToFutureTime(e)}const e=this._futureBarsFirstPointIndex();this._mainSymbolExtrapolator.setMinFutureBarsCount(e+this._minFutureBarsCount)}_addBarsTimesToSeries(e,t,i){const s=i?[]:null;for(const i of t){const t=this._pointDataByTimePoint.get(i);if(void 0===t){const t=new Set;t.add(e);const r={index:0,series:t};this._pointDataByTimePoint.set(i,r),null!==s&&s.push({timeMs:i,pointData:r})}else t.series.add(e)}return s}_futureBarsFirstPointIndex(){ if(null===this._mainSymbolExtrapolator||0===this._sortedTimePoints.length)return 0;const e=this._mainSymbolExtrapolator.futureBars();return(0,o.upperbound_int)(e,this._sortedTimePoints[this._sortedTimePoints.length-1].timeMs)}_futureBars(){return null===this._mainSymbolExtrapolator?[]:this._mainSymbolExtrapolator.futureBars().slice(this._futureBarsFirstPointIndex(),this._futureBarsFirstPointIndex()+1e3)}_cleanupPointsData(e){for(const t of e)0===t.pointData.series.size&&this._pointDataByTimePoint.delete(t.timeMs)}_updateTimeScalePoints(e){let t=-1;for(let i=0;ie.timeMs=this._sortedTimePoints.length)continue;this._sortedTimePoints[n].timeMs!==r.timeMs&&-1===i&&(i=n)}const s=t+e.length;if(i=S(i,this._sortedTimePoints.length,s),-1===i)return null;this._fillPointsData(e,0,0===t||0===this._sortedTimePoints.length?null:this._sortedTimePoints[t-1].displayTime);const r=m(this._sortedTimePoints.slice(t),e).map((e=>({old:e.old+t,new:e.new===l.INVALID_TIME_POINT_INDEX?e.new:e.new+t})));{const i=this._sortedTimePoints;let r=0;for(;t+r1&&null===i){const t=Math.ceil(n/(e.length-1)),i=new Date(1e3*(e[0].displayTime-t));e[0].markWeight=_(new Date(1e3*e[0].displayTime),i)}}(e,t,i)}_applyTimeScaleChanges(e,t){if(null===e)return t?(this._fillPointsData(this._sortedTimePoints,0),{points:[],pointsIndex:0,baseIndex:this._getBaseIndex(),indexChange:[],marks:this.tickMarks(0)}):null;let i=e.pointsIndex;if(0!==i&&t&&(this._fillPointsData(this._sortedTimePoints,0),i=0),0===this._sortedTimePoints.length)return{baseIndex:null,pointsIndex:0,indexChange:[],marks:[],points:[]};const s=[];for(let t=e.pointsIndex;t{"use strict";var s=i(78554),r=i(76702),n=i(22115),o=i(56439).SymbolExtrapolator,a=i(59749).SessionTimeScale,l=i(87456).PointsetsManager,c=i(69228),h=i(8950).createDwmAligner,d=i(578).Interval,u=i(76422),p=i(70641).visitObject,_=i(65665).isObject;i(95056),i(96531);var m=i(40011).DatafeedRequestsCachedProcessor,g=i(20364).timezoneIsAvailable,f=i(8950).isAlignmentEnabled,v=i(91035),S=v.isEncodedExtendedSymbol,y=v.decodeExtendedSymbol,b=i(1930).extractSymbolNameFromSymbolInfo,w=i(11249).replaceGraphicsTimesWithTimePointIndexIndex,C=i(2484),P=i(92484).SubsessionId,T=i(69228).getPeriodsBetweenDates;const x="pre_post_market_sessions",I=C.enabled(x);var M=-5e6;function A(e){var t=e.findIndex((function(e){return e.index!==M}));return-1===t?[]:0===t?e:e.slice(t)}function L(e,t){return e+"_"+t}var k=function(e){var t=this;this._studiesCache={},this._objectsDataCache={},this._studiesNonSeriesTimes={},this._metainfoCache=[],this._barsCoefficientsCache={},this._externalDatafeed=e,e.getVolumeProfileResolutionForPeriod&&r.overwriteVolumeProfileResolutionForPeriodGetter((function(t,i,s,r){return e.getVolumeProfileResolutionForPeriod(t,i,s,r)})),this._datafeedConfiguration=null,this._marketStatusWatchers={},this._resolveRequests={},this._resolvePromisesBySymbolId=new Map,this._symbolIdToSymbolRequestString=new Map,this._callbacks={},this._serverTimeOffset=0,t._logMessage("Datafeed settings received: {0}".format(JSON.stringify(window.configurationData))),t._datafeedConfiguration=t._adoptConfigurationData(window.configurationData),t._fireEvent("configuration_received"),t._externalDatafeed.getServerTime&&t._externalDatafeed.getServerTime((function(e){t._serverTimeOffset=e-(new Date).valueOf()/1e3})),this._invalidatedPointsetSessions=new Set,this._refreshPointsetsTimerId=null,this._pointsetsManagers={},this._quotesInfo=[],this._depthInfo=[],this._endOfData={},this._computeStudyCounter=0,this._symbolExtrapolators={},this._timeScales={},this._cachedDatafeed=new m(e,this.serverTimeOffset.bind(this),this._datafeedConfiguration.reset_cache_timeout),n.setupFeed({resolve:function(e,i,s,r){t._resolveSymbolByName(e,i,s,r)},subscribe:function(e,i,s,r,n){return t._cachedDatafeed.subscribe(e,i,s,function(e,i,s){ -var r=new c.SessionInfo(e.timezone,e.session,e.session_holidays,e.corrections),n=c.newBarBuilder(i,r,r);return function(e){if(e&&e.count()){var i=1e3*t.getCurrentUTCTime();n.moveTo(i),n.indexOfBar(i)>=0&&e.setLastBarClosed(!1)}s(e)}}(e,i,r),n)},unsubscribe:function(e){return t._cachedDatafeed.unsubscribe(e)}})};function E(e,t){return e+"_"+t}function D(e,t,i,s){return e+(t?"_#_"+t:"")+(i?"_#_"+i:"")+(s?"_#_"+s:"")}k.prototype._getSymbolExtrapolator=function(e,t,i){var s=d.normalize(i),r=function(e,t,i){const s=void 0!==t.subsession_id?","+t.subsession_id:"";return e+","+t.full_name+","+i+s}(e,t,s),n=this._symbolExtrapolators[r];return void 0===n&&(n=new o(t,s),this._symbolExtrapolators[r]=n),n},k.prototype._barsCoefficients=function(e,t){if(void 0===y(e).type)return{};var i=e+t;return this._barsCoefficientsCache[i]||(this._barsCoefficientsCache[i]={}),this._barsCoefficientsCache[i]},k.prototype.destroy=function(){this._cachedDatafeed.destroy(),this._externalDatafeed=null,Object.keys(this._pointsetsManagers).forEach((function(e){this._pointsetsManagers[e].destroy()}),this),this._pointsetsManagers={}},k.prototype.purgeCache=function(){this._endOfData={},this._resolveRequests={},this._objectsDataCache={},this._studiesNonSeriesTimes={},this._studiesCache={},this._resolvePromisesBySymbolId.clear(),this._symbolIdToSymbolRequestString.clear(),Object.keys(this._pointsetsManagers).forEach((function(e){this._pointsetsManagers[e].destroy()}),this),this._pointsetsManagers={},Object.keys(this._timeScales).forEach((function(e){this._timeScales[e].destroy()}),this),this._timeScales={},Object.keys(this._symbolExtrapolators).forEach((function(e){this._symbolExtrapolators[e].destroy()}),this),this._symbolExtrapolators={}},k.prototype.purgeDataCache=function(){this._cachedDatafeed.purgeCache()},k.prototype._logMessage=function(e){C.enabled("charting_library_debug_mode")&&console.log(e)},k.prototype.on=function(e,t){return this._callbacks.hasOwnProperty(e)||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},k.prototype._fireEvent=function(e,t,i){if(this._callbacks.hasOwnProperty(e)){for(var s=this._callbacks[e],r=0;r_[a].timeMs;l?_.push({index:g(s,_.length),value:[s/1e3].concat(r),timeMs:s}):(_[a].index=g(s,a),_[a].value=[s/1e3].concat(r),_[a].timeMs=s),p||u.onRealtimeCallback([_[_.length-1]],l,_.length,v,i)}(e,t,i)},nonseriesOut:function(e,t){u.onNonSeriesDataUpdate(t,i)},setNoMoreData:function(){S=!0},recalc:function(e,s){p=!1,_.endOfData=S,_.emptyBarCount=s.emptyBarCount,t.error&&null!==t.error()||(null!==l&&(y._objectsDataCache[l]=_),u.onDataReadyCallback(_,v,i,s))}});if(!y._studiesCache[e]||!y._studiesCache[e][n])throw Error("This should never happen");y._studiesCache[e][n].engine=w}catch(e){if(!e.studyError)throw e;u.onErrorCallback(e.message)}}else u.onErrorCallback("Unsupported resolution. Did you forget to set has_intraday to true?")}(w,P)},k.prototype._createStudy=function(e,t,i,s,r,n,o,a){var l=this;function c(e,t,i){e=A(e),l._timeScales[s].fillIndexesInRows(e),TradingView.ChartapiMessagerInstances[s].onDataUpdate(r,n,e,t),TradingView.ChartapiMessagerInstances[s].onStudyCompleted(r,n)}function h(e){var t={};if(0!==e.size){var i={},n=l._studiesCache[s][r].metainfo;e.forEach((function(e,t){i[n.plots[t].id]=e})),t.data={offsets:i}}return t}a=function(e){if(Array.isArray(e))return e;for(var t=[],i=l._studiesCache[s][r].metainfo.inputs,n=0;n=0},k.prototype.ensureExtendedTo=function(e,t,i){if(!this._studiesCache[t][e])throw Error("This should never happen");var s=this;setTimeout((function(){s._recreateSourcesForDataRange(t,{to:i})}),0)},k.prototype.extendSeriesRange=function(e,t){var i=this._timeScales[e].firstSeriesBarTime();if(null!==i){var s=this._mainSeriesRecord(e);if(d.isDWM(s.resolution)&&null!=s.symbolInfo){var r=h(s.resolution,s.symbolInfo);null!==r&&(i=r.timeToExchangeTradingDay(i))}var n=this._symbolIdToSymbolRequestString.get(L(e,s.symbolId)),o=this._barsCoefficients(n,s.resolution),a=o.barsCoefficient||1;if(!o.barsCoefficient){var l=this._getSeriesData(e,s.guid);null!==l&&(o.expectedBarsCount=l.length+t)}var c=this;setTimeout((function(){c._recreateSourcesForDataRange(e,{to:i,countBack:(t+2)*a})}),0)}else this._logMessage("Nothing to extend - there is no points on time scale")},k.prototype.seriesTurnaround=function(e,t){return this._studiesCache[e]&&this._studiesCache[e][t]&&this._studiesCache[e][t].turnaround},k.prototype._seriesDataRange=function(e,t){var i=this._studiesCache[e][t];return null!==i.firstLoadedTimeMs?{to:i.firstLoadedTimeMs,countBack:0 -}:i.dataRange},k.prototype._applyTimeScaleUpdate=function(e,t){if(null!==t){var i=[];for(var s in this._studiesCache[e]){var r=this._studiesCache[e][s];if(r&&"study"===r.type){var n=this._studiesNonSeriesTimes[e][s];if(n){var o={indexes:this._timeScales[e].convertTimesToIndexes(n),data:{indexes_replace:!0}};i.push({objId:s,turnaround:r.turnaround,data:[],nonSeriesData:o})}}}TradingView.ChartapiMessagerInstances[e].onTimescaleUpdate(t,i),Promise.resolve().then(function(){var t=this._mainSeriesRecord(e);if(null!==t&&null!=t.symbolInfo){var i=this._getSymbolExtrapolator(e,t.symbolInfo,t.resolution);this._pointsetsManagers[e].getUpdatesForSymbol(t.symbolInfo.full_name,t.resolution,i,this._timeScales[e]).forEach((function(t,i){TradingView.ChartapiMessagerInstances[e].onPointsetDataUpdate(i,null,t)}))}}.bind(this))}},k.prototype._updateMainTsBuilder=function(e){var t=this._mainSeriesRecord(e);if(null!==t&&null!=t.symbolInfo){var i=this._getSymbolExtrapolator(e,t.symbolInfo,t.resolution);this._timeScales[e].setMainSymbolExtrapolator(i)}},k.prototype._updateTimeScaleState=function(e){var t=!0,i=!0;for(var s in this._studiesCache[e]){var r=this._studiesCache[e][s];"series"===r.type&&(i=i&&this._isEndOfData(e,s,r.turnaround),t=t&&r.completed)}this._timeScales[e].isCompleted()!==t&&(this._timeScales[e].setCompleted(t),t&&TradingView.ChartapiMessagerInstances[e].onTimescaleCompleted(i))},k.prototype._mainSeriesRecord=function(e){var t=null,i=null;for(var s in this._studiesCache[e]){var r=this._studiesCache[e][s];if("series"===r.type&&(null===t&&(t=r),r.isMain)){i=r;break}}return null===i&&(i=t),null!==i&&(i.isMain=!0),i},k.prototype._seriesCount=function(e){var t=0;for(var i in this._studiesCache[e]){"series"===this._studiesCache[e][i].type&&(t+=1)}return t},k.prototype._prepareSeriesNonSeriesData=function(e,t,i){var s=i.data[i.data.length-1],r=this._getSeriesData(e,t),n=null===r?[]:i.data;return{data:{data:{reversalAmount:i.reversalAmount,boxSize:i.boxSize,price:s?s[4]:i.price,bars:n.map((function(e,t){return{time:t,open:e[1],high:e[2],low:e[3],close:e[4],volume:e[5],factor:e[6],additionalPrice:e[6]}}))}},indexes:this._timeScales[e].convertTimesToIndexes(n.map((function(e){var t=e[0]||0;return t<0?r[r.length+t].timeMs:i.projectionTime+t})))}},k.prototype.createSeries=function(e,t,i,s,n,o,a){this._setEndOfData(e,t,i,!1);var l=new r.OHLCV;this._studiesCache[e]=this._studiesCache[e]||{};var c=this._getSeriesData(e,t),h=this._studiesCache[e][t],u=this._seriesCount(e),p=this._mainSeriesRecord(e);if(!h||d.isEqual(h.resolution,n)&&h.symbolId===s)void 0!==o.countBack&&null!==c&&0!==c.length&&(o.to=c[0].timeMs),h&&null!=h.firstLoadedTimeMs?o.to=void 0!==o.to?Math.min(h.firstLoadedTimeMs,o.to):h.firstLoadedTimeMs:h||0===u||null!==p&&(null!=p.firstLoadedTimeMs?(o.to=p.firstLoadedTimeMs,o.countBack=0):o=Object.assign({},p.dataRange));else if(1===u)o=Object.assign({},h.initialDatarange);else{var _=this._timeScales[e].firstSeriesBarTime();(void 0===o.to||null!==_&&_{"use strict";var s=i(78554),r=i(76702),n=i(22115),o=i(56439).SymbolExtrapolator,a=i(59749).SessionTimeScale,l=i(87456).PointsetsManager,c=i(69228),h=i(8950).createDwmAligner,d=i(578).Interval,u=i(76422),p=i(70641).visitObject,_=i(65665).isObject;i(95056),i(96531);var m=i(40011).DatafeedRequestsCachedProcessor,g=i(20364).timezoneIsAvailable,f=i(8950).isAlignmentEnabled,v=i(91035),S=v.isEncodedExtendedSymbol,y=v.decodeExtendedSymbol,b=i(1930).extractSymbolNameFromSymbolInfo,w=i(11249).replaceGraphicsTimesWithTimePointIndexIndex,P=i(2484),C=i(92484).SubsessionId,T=i(69228).getPeriodsBetweenDates;const x="pre_post_market_sessions",I=P.enabled(x);var M=-5e6;function A(e){var t=e.findIndex((function(e){return e.index!==M}));return-1===t?[]:0===t?e:e.slice(t)}function L(e,t){return e+"_"+t}var k=function(e){var t=this;this._studiesCache={},this._objectsDataCache={},this._studiesNonSeriesTimes={},this._metainfoCache=[],this._barsCoefficientsCache={},this._externalDatafeed=e,e.getVolumeProfileResolutionForPeriod&&r.overwriteVolumeProfileResolutionForPeriodGetter((function(t,i,s,r){return e.getVolumeProfileResolutionForPeriod(t,i,s,r)})),this._datafeedConfiguration=null,this._marketStatusWatchers={},this._resolveRequests={},this._resolvePromisesBySymbolId=new Map,this._symbolIdToSymbolRequestString=new Map,this._callbacks={},this._serverTimeOffset=0,t._logMessage("Datafeed settings received: {0}".format(JSON.stringify(window.configurationData))),t._datafeedConfiguration=t._adoptConfigurationData(window.configurationData),t._fireEvent("configuration_received"),t._externalDatafeed.getServerTime&&t._externalDatafeed.getServerTime((function(e){t._serverTimeOffset=e-(new Date).valueOf()/1e3})),this._invalidatedPointsetSessions=new Set,this._refreshPointsetsTimerId=null,this._pointsetsManagers={},this._quotesInfo=[],this._depthInfo=[],this._endOfData={},this._computeStudyCounter=0,this._symbolExtrapolators={},this._timeScales={},this._cachedDatafeed=new m(e,this.serverTimeOffset.bind(this),this._datafeedConfiguration.reset_cache_timeout),n.setupFeed({resolve:function(e,i,s,r){t._resolveSymbolByName(e,i,s,r)},subscribe:function(e,i,s,r,n){return t._cachedDatafeed.subscribe(e,i,s,function(e,i,s){ +var r=new c.SessionInfo(e.timezone,e.session,e.session_holidays,e.corrections),n=c.newBarBuilder(i,r,r);return function(e){if(e&&e.count()){var i=1e3*t.getCurrentUTCTime();n.moveTo(i),n.indexOfBar(i)>=0&&e.setLastBarClosed(!1)}s(e)}}(e,i,r),n)},unsubscribe:function(e){return t._cachedDatafeed.unsubscribe(e)}})};function E(e,t){return e+"_"+t}function D(e,t,i,s){return e+(t?"_#_"+t:"")+(i?"_#_"+i:"")+(s?"_#_"+s:"")}k.prototype._getSymbolExtrapolator=function(e,t,i){var s=d.normalize(i),r=function(e,t,i){const s=void 0!==t.subsession_id?","+t.subsession_id:"";return e+","+t.full_name+","+i+s}(e,t,s),n=this._symbolExtrapolators[r];return void 0===n&&(n=new o(t,s),this._symbolExtrapolators[r]=n),n},k.prototype._barsCoefficients=function(e,t){if(void 0===y(e).type)return{};var i=e+t;return this._barsCoefficientsCache[i]||(this._barsCoefficientsCache[i]={}),this._barsCoefficientsCache[i]},k.prototype.destroy=function(){this._cachedDatafeed.destroy(),this._externalDatafeed=null,Object.keys(this._pointsetsManagers).forEach((function(e){this._pointsetsManagers[e].destroy()}),this),this._pointsetsManagers={}},k.prototype.purgeCache=function(){this._endOfData={},this._resolveRequests={},this._objectsDataCache={},this._studiesNonSeriesTimes={},this._studiesCache={},this._resolvePromisesBySymbolId.clear(),this._symbolIdToSymbolRequestString.clear(),Object.keys(this._pointsetsManagers).forEach((function(e){this._pointsetsManagers[e].destroy()}),this),this._pointsetsManagers={},Object.keys(this._timeScales).forEach((function(e){this._timeScales[e].destroy()}),this),this._timeScales={},Object.keys(this._symbolExtrapolators).forEach((function(e){this._symbolExtrapolators[e].destroy()}),this),this._symbolExtrapolators={}},k.prototype.purgeDataCache=function(){this._cachedDatafeed.purgeCache()},k.prototype._logMessage=function(e){P.enabled("charting_library_debug_mode")&&console.log(e)},k.prototype.on=function(e,t){return this._callbacks.hasOwnProperty(e)||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},k.prototype._fireEvent=function(e,t,i){if(this._callbacks.hasOwnProperty(e)){for(var s=this._callbacks[e],r=0;r_[a].timeMs;l?_.push({index:g(s,_.length),value:[s/1e3].concat(r),timeMs:s}):(_[a].index=g(s,a),_[a].value=[s/1e3].concat(r),_[a].timeMs=s),p||u.onRealtimeCallback([_[_.length-1]],l,_.length,v,i)}(e,t,i)},nonseriesOut:function(e,t){u.onNonSeriesDataUpdate(t,i)},setNoMoreData:function(){S=!0},recalc:function(e,s){p=!1,_.endOfData=S,_.emptyBarCount=s.emptyBarCount,t.error&&null!==t.error()||(null!==l&&(y._objectsDataCache[l]=_),u.onDataReadyCallback(_,v,i,s))}});if(!y._studiesCache[e]||!y._studiesCache[e][n])throw Error("This should never happen");y._studiesCache[e][n].engine=w}catch(e){if(!e.studyError)throw e;u.onErrorCallback(e.message)}}else u.onErrorCallback("Unsupported resolution. Did you forget to set has_intraday to true?")}(w,C)},k.prototype._createStudy=function(e,t,i,s,r,n,o,a){var l=this;function c(e,t,i){e=A(e),l._timeScales[s].fillIndexesInRows(e),TradingView.ChartapiMessagerInstances[s].onDataUpdate(r,n,e,t),TradingView.ChartapiMessagerInstances[s].onStudyCompleted(r,n)}function h(e){var t={};if(0!==e.size){var i={},n=l._studiesCache[s][r].metainfo;e.forEach((function(e,t){i[n.plots[t].id]=e})),t.data={offsets:i}}return t}a=function(e){if(Array.isArray(e))return e;for(var t=[],i=l._studiesCache[s][r].metainfo.inputs,n=0;n=0},k.prototype.ensureExtendedTo=function(e,t,i){if(!this._studiesCache[t][e])throw Error("This should never happen");var s=this;setTimeout((function(){s._recreateSourcesForDataRange(t,{to:i})}),0)},k.prototype.extendSeriesRange=function(e,t){var i=this._timeScales[e].firstSeriesBarTime();if(null!==i){var s=this._mainSeriesRecord(e);if(d.isDWM(s.resolution)&&null!=s.symbolInfo){var r=h(s.resolution,s.symbolInfo);null!==r&&(i=r.timeToExchangeTradingDay(i))}var n=this._symbolIdToSymbolRequestString.get(L(e,s.symbolId)),o=this._barsCoefficients(n,s.resolution),a=o.barsCoefficient||1;if(!o.barsCoefficient){var l=this._getSeriesData(e,s.guid);null!==l&&(o.expectedBarsCount=l.length+t)}var c=this;setTimeout((function(){c._recreateSourcesForDataRange(e,{to:i,countBack:(t+2)*a})}),0)}else this._logMessage("Nothing to extend - there is no points on time scale")},k.prototype.seriesTurnaround=function(e,t){return this._studiesCache[e]&&this._studiesCache[e][t]&&this._studiesCache[e][t].turnaround},k.prototype._seriesDataRange=function(e,t){var i=this._studiesCache[e][t];return null!==i.firstLoadedTimeMs?{ +to:i.firstLoadedTimeMs,countBack:0}:i.dataRange},k.prototype._applyTimeScaleUpdate=function(e,t){if(null!==t){var i=[];for(var s in this._studiesCache[e]){var r=this._studiesCache[e][s];if(r&&"study"===r.type){var n=this._studiesNonSeriesTimes[e][s];if(n){var o={indexes:this._timeScales[e].convertTimesToIndexes(n),data:{indexes_replace:!0}};i.push({objId:s,turnaround:r.turnaround,data:[],nonSeriesData:o})}}}TradingView.ChartapiMessagerInstances[e].onTimescaleUpdate(t,i),Promise.resolve().then(function(){var t=this._mainSeriesRecord(e);if(null!==t&&null!=t.symbolInfo){var i=this._getSymbolExtrapolator(e,t.symbolInfo,t.resolution);this._pointsetsManagers[e].getUpdatesForSymbol(t.symbolInfo.full_name,t.resolution,i,this._timeScales[e]).forEach((function(t,i){TradingView.ChartapiMessagerInstances[e].onPointsetDataUpdate(i,null,t)}))}}.bind(this))}},k.prototype._updateMainTsBuilder=function(e){var t=this._mainSeriesRecord(e);if(null!==t&&null!=t.symbolInfo){var i=this._getSymbolExtrapolator(e,t.symbolInfo,t.resolution);this._timeScales[e].setMainSymbolExtrapolator(i)}},k.prototype._updateTimeScaleState=function(e){var t=!0,i=!0;for(var s in this._studiesCache[e]){var r=this._studiesCache[e][s];"series"===r.type&&(i=i&&this._isEndOfData(e,s,r.turnaround),t=t&&r.completed)}this._timeScales[e].isCompleted()!==t&&(this._timeScales[e].setCompleted(t),t&&TradingView.ChartapiMessagerInstances[e].onTimescaleCompleted(i))},k.prototype._mainSeriesRecord=function(e){var t=null,i=null;for(var s in this._studiesCache[e]){var r=this._studiesCache[e][s];if("series"===r.type&&(null===t&&(t=r),r.isMain)){i=r;break}}return null===i&&(i=t),null!==i&&(i.isMain=!0),i},k.prototype._seriesCount=function(e){var t=0;for(var i in this._studiesCache[e]){"series"===this._studiesCache[e][i].type&&(t+=1)}return t},k.prototype._prepareSeriesNonSeriesData=function(e,t,i){var s=i.data[i.data.length-1],r=this._getSeriesData(e,t),n=null===r?[]:i.data;return{data:{data:{reversalAmount:i.reversalAmount,boxSize:i.boxSize,price:s?s[4]:i.price,bars:n.map((function(e,t){return{time:t,open:e[1],high:e[2],low:e[3],close:e[4],volume:e[5],factor:e[6],additionalPrice:e[6]}}))}},indexes:this._timeScales[e].convertTimesToIndexes(n.map((function(e){var t=e[0]||0;return t<0?r[r.length+t].timeMs:i.projectionTime+t})))}},k.prototype.createSeries=function(e,t,i,s,n,o,a){this._setEndOfData(e,t,i,!1);var l=new r.OHLCV;this._studiesCache[e]=this._studiesCache[e]||{};var c=this._getSeriesData(e,t),h=this._studiesCache[e][t],u=this._seriesCount(e),p=this._mainSeriesRecord(e);if(!h||d.isEqual(h.resolution,n)&&h.symbolId===s)void 0!==o.countBack&&null!==c&&0!==c.length&&(o.to=c[0].timeMs),h&&null!=h.firstLoadedTimeMs?o.to=void 0!==o.to?Math.min(h.firstLoadedTimeMs,o.to):h.firstLoadedTimeMs:h||0===u||null!==p&&(null!=p.firstLoadedTimeMs?(o.to=p.firstLoadedTimeMs,o.countBack=0):o=Object.assign({},p.dataRange));else if(1===u)o=Object.assign({},h.initialDatarange);else{var _=this._timeScales[e].firstSeriesBarTime();(void 0===o.to||null!==_&&_{"use strict";i.d(t,{SymbolExtrapolator:()=>c});var s=i(50151),r=i(93975),n=i(69228),o=i(87770),a=i(578);function l(e,t){return e.length>t}class c{constructor(e,t,i=2e5){this._firstRealBarTimeMs=null,this._historyBarsCache=[],this._projectionFirstIndex=1/0,this._barsTimes=[],this._minFutureBarsCount=0,this._lastRealBarTimeMs=null,this._futureBarsCache=[],this._symbolInfo=e,this._interval=a.Interval.parse(t),this._extrapolateLimit=i,this._barBuilder=(0,n.newBarBuilder)(t,new n.SessionInfo(e.timezone,e.session,e.session_holidays,e.corrections),null)}destroy(){this.clear()}interval(){return this._interval}barBuilder(){return this._barBuilder}symbolInfo(){return this._symbolInfo}clear(){this._firstRealBarTimeMs=null,this._historyBarsCache=[],this._barsTimes=[],this._lastRealBarTimeMs=null,this._futureBarsCache=[],this._minFutureBarsCount=0,this._projectionFirstIndex=1/0}firstFutureBarIndex(){return this._barsTimes.length}futureBars(){return this._futureBarsCache}replaceBarsTimesTail(e,t=e.length){if(0===e.length)return;if(0===this._barsTimes.length)return void this.setBarsTimes(e,t);const i=e[0],n=this._barsTimes[this._barsTimes.length-1],o=i>n?this._barsTimes.length:(0,r.lowerbound_int)(this._barsTimes,i);0!==o?(this._barsTimes.splice(o,this._barsTimes.length,...e),this._projectionFirstIndex=t===e.length?this._barsTimes.length:this._barsTimes.indexOf(e[t]),(0,s.assert)(-1!==this._projectionFirstIndex,"something went wrong"),n!==e[e.length-1]&&this._setLastRealBarTime(e[e.length-1])):this.setBarsTimes(e,t)}setBarsTimes(e,t=e.length){const i=this._barsTimes;if(this._barsTimes=e.slice(),this._projectionFirstIndex=0===this._barsTimes.length?1/0:t,0===e.length)return this._historyBarsCache=[],this._futureBarsCache=[],this._firstRealBarTimeMs=null,void(this._lastRealBarTimeMs=null);0!==i.length&&i[i.length-1]===e[e.length-1]||this._setLastRealBarTime(e[e.length-1]),0!==i.length&&i[0]===e[0]||(this._historyBarsCache=[],this._firstRealBarTimeMs=e[0])}extrapolateTimeWithOffsetToTime(e,t){if(0===t)return{timeMs:e,exact:!0} ;0===this._barsTimes.length&&(t<0?null===this._firstRealBarTimeMs?this._firstRealBarTimeMs=e:(this._extendHistoryCacheToTimeFromRight(Math.min(e,null!==this._lastRealBarTimeMs?this._lastRealBarTimeMs:1/0)),this._ensureExtrapolatedToHistoryTime(e)):null===this._lastRealBarTimeMs?this._lastRealBarTimeMs=e:(this._extendFutureCacheToTimeFromLeft(Math.max(e,null!==this._firstRealBarTimeMs?this._firstRealBarTimeMs:1/0)),this._ensureExtrapolatedToFutureTime(e)));const i=this.indexOfTime(e);if(null===i)return null;const s=this._timeOfBarIndex(i.index+t);return null===s?null:((i.index<0||this._projectionFirstIndex<=i.index)&&(s.exact=!1),s)}indexOfTime(e){if(null!==this._firstRealBarTimeMs&&ethis._lastRealBarTimeMs){this._ensureExtrapolatedToFutureTime(e);let t=(0,r.lowerbound_int)(this._futureBarsCache,e);if(0!==this._futureBarsCache.length&&t===this._futureBarsCache.length&&e>this._futureBarsCache[this._futureBarsCache.length-1])return null;this._futureBarsCache[t]!==e&&(t-=1);const i=Math.max(1,this._barsTimes.length)+t;return{index:i,timeMs:i===this._barsTimes.length-1?(0,s.ensureNotNull)(this._lastRealBarTimeMs):this._futureBarsCache[t]}}if(0===this._barsTimes.length)return null!==this._firstRealBarTimeMs&&this._firstRealBarTimeMs<=e||null!==this._lastRealBarTimeMs&&e<=this._lastRealBarTimeMs?{index:0,timeMs:(0,s.ensureNotNull)(this._timeOfBarIndex(0)).timeMs}:null;let t=(0,r.lowerbound_int)(this._barsTimes,e);return this._barsTimes[t]!==e&&(t-=1),{index:t,timeMs:this._barsTimes[t]}}setMinFutureBarsCount(e){this._minFutureBarsCount=e,0!==this._barsTimes.length&&this._ensureExtrapolatedToFutureBar(e)}ensureExtrapolatedToFutureTime(e){this._ensureExtrapolatedToFutureTime(e)}_setLastRealBarTime(e){const t=this._futureBarsCache.length,i=(0,r.upperbound_int)(this._futureBarsCache,e);0===i?this._extendFutureCacheToTimeFromLeft(e):(this._lastRealBarTimeMs=e,this._futureBarsCache=this._futureBarsCache.slice(i)),this._ensureExtrapolatedToFutureBar(Math.max(t,this._minFutureBarsCount))}_timeOfBarIndex(e){var t;if(e<0){const t=Math.abs(e);this._ensureExtrapolatedToHistoryBar(t);const i=this._historyBarsCache.length-t;return i<0?null:{timeMs:this._historyBarsCache[i],exact:!1}}if(0===e&&0===this._barsTimes.length)return{timeMs:(0,s.ensureNotNull)(null!==(t=this._firstRealBarTimeMs)&&void 0!==t?t:this._lastRealBarTimeMs),exact:!1};if(e>=this._barsTimes.length){const t=e-Math.max(1,this._barsTimes.length);return this._ensureExtrapolatedToFutureBar(t+1),t>=this._futureBarsCache.length?null:{timeMs:this._futureBarsCache[t],exact:!1}}return{timeMs:this._barsTimes[e],exact:e=e)return;if((0,s.assert)(0===this._barsTimes.length,"bars should be empty"),this._firstRealBarTimeMs=e,0===this._historyBarsCache.length)return;const t=(0,o.extrapolateBarsFrontToTime)(this._barBuilder,this._historyBarsCache[this._historyBarsCache.length-1],e-1,this._extrapolateLimit,!0).times;this._historyBarsCache=this._historyBarsCache.concat(t)}_ensureExtrapolatedToFutureBar(e){return!(this._futureBarsCache.length>=e||l(this._futureBarsCache,this._extrapolateLimit))&&this._extendFutureCacheFromRight(((t,i)=>(0,o.extrapolateBarsFrontByCount)(this._barBuilder,t,e-i,!0).times))}_ensureExtrapolatedToFutureTime(e){null!==this._lastRealBarTimeMs&&this._lastRealBarTimeMs>=e||l(this._futureBarsCache,this._extrapolateLimit)||0!==this._futureBarsCache.length&&this._futureBarsCache[this._futureBarsCache.length-1]>=e||(this._extendFutureCacheFromRight(((t,i)=>(0,o.extrapolateBarsFrontToTime)(this._barBuilder,t,e,this._extrapolateLimit,!0).times)),this._futureBarsCache[this._futureBarsCache.length-1]=e||l(this._historyBarsCache,this._extrapolateLimit)||this._extendHistoryCacheFromLeft(((t,i)=>(0,o.extrapolateBarsFrontByCount)(this._barBuilder,t,-(e-i),!0).times.reverse()))}_ensureExtrapolatedToHistoryTime(e){null!==this._firstRealBarTimeMs&&this._firstRealBarTimeMs<=e||l(this._historyBarsCache,this._extrapolateLimit)||0!==this._historyBarsCache.length&&this._historyBarsCache[0]<=e||(this._extendHistoryCacheFromLeft(((t,i)=>{const s=(0,o.extrapolateBarsFrontToTime)(this._barBuilder,t-1,e-1,this._extrapolateLimit,!0).times;return s[s.length-1]===t?s.slice(0,-1):s})),(0===this._historyBarsCache.length||this._historyBarsCache[0]>e)&&this._ensureExtrapolatedToHistoryBar(this._historyBarsCache.length+1))}}},7276:(e,t,i)=>{"use strict";i.d(t,{backend:()=>s});const s=i(91612)},67049:(e,t,i)=>{"use strict";i.d(t,{defaultWatchlistSymbols:()=>n, @@ -155,8 +155,8 @@ get_day_of_month:function(e){return e.getUTCDate()},get_day_of_week:function(e){ title:s.t(null,void 0,i(5961)),offset:0},{id:"Asia/Shanghai",title:s.t(null,void 0,i(69240)),offset:0},{id:"Asia/Singapore",title:s.t(null,void 0,i(56683)),offset:0},{id:"Asia/Taipei",title:s.t(null,void 0,i(38788)),offset:0},{id:"Asia/Tehran",title:s.t(null,void 0,i(16267)),offset:0},{id:"Asia/Tokyo",title:s.t(null,void 0,i(94284)),offset:0},{id:"Asia/Yangon",title:s.t(null,void 0,i(69293)),offset:0},{id:"Atlantic/Reykjavik",title:s.t(null,void 0,i(26833)),offset:0},{id:"Australia/Adelaide",title:s.t(null,void 0,i(17365)),offset:0},{id:"Australia/Brisbane",title:s.t(null,void 0,i(11741)),offset:0},{id:"Australia/Perth",title:s.t(null,void 0,i(35590)),offset:0},{id:"Australia/Sydney",title:s.t(null,void 0,i(11020)),offset:0},{id:"Europe/Amsterdam",title:s.t(null,void 0,i(88010)),offset:0},{id:"Europe/Athens",title:s.t(null,void 0,i(21983)),offset:0},{id:"Europe/Belgrade",title:s.t(null,void 0,i(54861)),offset:0},{id:"Europe/Berlin",title:s.t(null,void 0,i(26825)),offset:0},{id:"Europe/Bratislava",title:s.t(null,void 0,i(5262)),offset:0},{id:"Europe/Brussels",title:s.t(null,void 0,i(90204)),offset:0},{id:"Europe/Bucharest",title:s.t(null,void 0,i(37728)),offset:0},{id:"Europe/Budapest",title:s.t(null,void 0,i(87143)),offset:0},{id:"Europe/Copenhagen",title:s.t(null,void 0,i(43432)),offset:0},{id:"Europe/Dublin",title:s.t(null,void 0,i(9497)),offset:0},{id:"Europe/Helsinki",title:s.t(null,void 0,i(99820)),offset:0},{id:"Europe/Istanbul",title:s.t(null,void 0,i(37885)),offset:0},{id:"Europe/Lisbon",title:s.t(null,void 0,i(50091)),offset:0},{id:"Europe/London",title:s.t(null,void 0,i(50286)),offset:0},{id:"Europe/Luxembourg",title:s.t(null,void 0,i(64352)),offset:0},{id:"Europe/Madrid",title:s.t(null,void 0,i(58038)),offset:0},{id:"Europe/Malta",title:s.t(null,void 0,i(34190)),offset:0},{id:"Europe/Moscow",title:s.t(null,void 0,i(18665)),offset:0},{id:"Europe/Oslo",title:s.t(null,void 0,i(82906)),offset:0},{id:"Europe/Paris",title:s.t(null,void 0,i(95995)),offset:0},{id:"Europe/Riga",title:s.t(null,void 0,i(5871)),offset:0},{id:"Europe/Rome",title:s.t(null,void 0,i(74214)),offset:0},{id:"Europe/Stockholm",title:s.t(null,void 0,i(48767)),offset:0},{id:"Europe/Tallinn",title:s.t(null,void 0,i(39108)),offset:0},{id:"Europe/Vilnius",title:s.t(null,void 0,i(75354)),offset:0},{id:"Europe/Warsaw",title:s.t(null,void 0,i(48474)),offset:0},{id:"Europe/Zurich",title:s.t(null,void 0,i(84301)),offset:0},{id:"Pacific/Auckland",title:s.t(null,void 0,i(24143)),offset:0},{id:"Pacific/Chatham",title:s.t(null,void 0,i(59884)),offset:0},{id:"Pacific/Fakaofo",title:s.t(null,void 0,i(20466)),offset:0},{id:"Pacific/Honolulu",title:s.t(null,void 0,i(61351)),offset:0},{id:"Pacific/Norfolk",title:s.t(null,void 0,i(99203)),offset:0}];function a(e,t,i){const s=function(e){return e.map((({id:e,title:t})=>{const{string:i,offset:s}=(0,r.parseTzOffset)(e);return{id:e,offset:s,title:`(${i}) ${t}`}}))}(e),n=i.filter((({alias:e})=>Boolean(e))).map((({title:e,alias:t,id:i})=>{const{string:s,offset:n}=(0,r.parseTzOffset)(t);return{id:i,offset:n, title:`(${s}) ${e}`,alias:t}})),o=function(e){return e.sort(((e,t)=>{const i=e.offset-t.offset;return 0!==i?i:e.title.localeCompare(t.title)}))}(s.concat(n));return t.concat(o)}const l=a(o,n,[]),c=new Map;l.forEach((e=>{c.set(e.id,!0)}));const h=new Map;n.concat(o).forEach((e=>{h.set(e.id,!0)}));const d=e=>{l.splice(0,l.length,...a(o,n,e)),l.forEach((e=>{c.set(e.id,!0)}))};function u(e){return c.has(e)}function p(e){return h.get(e)||!1}function _(e){for(const{id:t,title:i}of o)if(t===e){return`${i} (${(0,r.parseTzOffset)(e).string})`}return e}},26867:(e,t,i)=>{"use strict";e=i.nmd(e);const s=i(98351).getLogger("Common.Delegate");function r(){this._listeners=[]}function n(e){return!e.singleshot}r.prototype.subscribe=function(e,t,i){const s={object:e,member:t,singleshot:!!i,skip:!1};this._listeners.push(s)},r.prototype.unsubscribe=function(e,t){for(let i=0;i=0;--t){const i=this._listeners[t];i.object===e&&(i.skip=!0,this._listeners.splice(t,1))}},r.prototype.destroy=function(){delete this._listeners},r.prototype.fire=function(){const e=this._listeners;this._listeners=this._listeners.filter(n);const t=e.length;for(let i=0;i{"use strict";i.d(t,{getImage:()=>n});const s=new Map;function r(e){e.crossOrigin="anonymous"}function n(e,t,i=r){let n=s.get(e);return void 0===n&&(n=new Promise(((e,s)=>{const r=new Image;r.onload=()=>{e(r),r.onload=null,r.onerror=null},r.onerror=()=>{s(),r.onload=null,r.onerror=null},i(r),r.src=t})),s.set(e,n)),n}},91031:(e,t,i)=>{"use strict";function s(e,t){return e<=t}function r(e,t){return e>=t}function n(e,t,i){return Math.min(Math.max(e,t),i)}function o(e){return e<0?-1:e>0?1:0}function a(e){if(e<0)return!1;if(e>1e18)return!0;for(let t=e;t>1;t/=10)if(t%10!=0)return!1;return!0}function l(e,t,i){return t-e<=i}function c(e,t,i){return Math.abs(e-t)t?1:0}function u(e,t=d){if(e.length<1)throw Error("array is empty");let i=e[0];for(let s=0;s0&&(i=e[s]);return i}function _(e){const t=Math.ceil(e);return t%2!=0?t-1:t}function m(e){return e>0?Math.floor(e):Math.ceil(e)}i.r(t),i.d(t,{lessThan:()=>s,greaterThan:()=>r,clamp:()=>n,sign:()=>o,isBaseDecimal:()=>a,greaterOrEqual:()=>l,equal:()=>c,log10:()=>h,defComparator:()=>d,min:()=>u,max:()=>p,ceiledEven:()=>_,toInt:()=>m})},43925:(e,t,i)=>{"use strict";i.d(t,{parseTzOffset:()=>r});var s=i(32769);function r(e,t=Date.now()){const i=(0,s.get_timezone)(e).offset_utc(t);let r="";const n=i/1e3/60/60 ;n%1&&(r=":"+Math.round(Math.abs(n%1*60)).toString().padStart(2,"0"));let o="";return o=n>0?"+"+(n-n%1)+r:0===n?"":String(n-n%1+r),{offset:i,string:"UTC"+o}}},83232:(e,t,i)=>{"use strict";var s=i(2484),r=[{d:"E-Mini S&P 500",t:"ES"},{d:"E-Mini Nasdaq 100",t:"NQ"},{d:"Gold",t:"GC"},{d:"Silver",t:"SI"},{d:"Crude Oil WTI",t:"CL"},{d:"Natural Gas",t:"NG"},{d:"Australian Dollar",t:"6A"},{d:"Australian Dollar (Floor)",t:"AD"},{d:"Euro FX",t:"6E"},{d:"Euro FX (Floor)",t:"EC"},{d:"Corn",t:"ZC"},{d:"Corn (Floor)",t:"C"},{d:"Eurodollar",t:"GE"},{d:"Eurodollar (Floor)",t:"ED"}],n=function(){var e=[{pattern:"(",ctor:o},{pattern:")",ctor:a},{pattern:"+",ctor:c},{pattern:"-",ctor:h},{pattern:"*",ctor:d},{pattern:"/",ctor:u},{pattern:"^",ctor:p},{pattern:/\d+(?:\.\d*|(?![a-zA-Z0-9_!:.&]))|\.\d+/,ctor:f},{pattern:/\./,ctor:y},{pattern:s.enabled("charting_library_base")?/[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF^][a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!:.&]*|'.+?'/:/[a-zA-Z0-9_\u0370-\u1FFF_\u2E80-\uFFFF][a-zA-Z0-9_\u0020\u0370-\u1FFF_\u2E80-\uFFFF_!|:.&]*|'.+?'/,ctor:g},{pattern:/'[^']*/,ctor:S},{pattern:/[\0-\x20\s]+/,ctor:n}];function t(e,t){var i=function(){};return i.prototype=t.prototype,e.prototype=new i,e}function i(){}function n(e){this.value=e}function o(){}function a(){}function l(){}function c(){}function h(){}function d(){}function u(){}function p(){}i.prototype.toString=function(){return this.value},t(n,i),t(o,i),o.prototype.value="(",t(a,i),a.prototype.value=")",t(l,i),t(c,l),c.prototype.value="+",c.prototype.precedence=0,c.prototype.commutative=!0,t(h,l),h.prototype.value="-",h.prototype.precedence=0,h.prototype.commutative=!1,t(d,l),d.prototype.value="*",d.prototype.precedence=1,d.prototype.commutative=!0,t(u,l),u.prototype.value="/",u.prototype.precedence=1,u.prototype.commutative=!1,t(p,l),p.prototype.value="^",p.prototype.precedence=2,p.prototype.commutative=!1;var _=/^'?(?:([A-Z0-9_]+):)?(.*?)'?$/i,m=/[+\-/*]/;function g(e){this.value=e}function f(e){this.value=e}function v(e){this.value=e}function S(){g.apply(this,arguments)}function y(){f.apply(this,arguments)}t(g,i),g.prototype.toString=function(){if(this.hasOwnProperty("_ticker")){var e=m.test(this._ticker)?"'":"";return e+(this._exchange?this._exchange+":":"")+this._ticker+e}return this.value},g.prototype.parse=function(){var e=_.exec(this.value);e[1]&&(this._exchange=e[1]),this._ticker=e[2]},g.prototype.parseAsFutures=function(){this.hasOwnProperty("_ticker")||this.parse();for(var e=function(e){return r.some((function(t){return t.t===e}))},t=2;t>=1;--t){var i=this._ticker.slice(0,t);if(e(i)){this._root=i,this._contract=this._ticker.slice(t);break}}},g.prototype.exchange=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._exchange;null==e?delete this._exchange:this._exchange=e+""},g.prototype.ticker=function(e){if(this.hasOwnProperty("_ticker")||this.parse(),!(arguments.length>0))return this._ticker;null==e?delete this._ticker:this._ticker=e+"",delete this._root,delete this._contract}, -g.prototype.root=function(e){if(this.hasOwnProperty("_root")||this.parseAsFutures(),!(arguments.length>0))return this._root;null==e?delete this._root:(this._root=e+"",this._root&&(this._ticker=this._root+(this._contract||"")))},g.prototype.contract=function(e){if(this.hasOwnProperty("_contract")||this.parseAsFutures(),!(arguments.length>0))return this._root;null==e?delete this._contract:(this._contract=e+"",this._root&&(this._ticker=this._root+this._contract))},t(f,i),f.prototype.toString=function(){return this.hasOwnProperty("_normalizedValue")?this._normalizedValue:this.value},f.prototype.parse=function(){this._normalizedValue=this.value.replace(/^0+|\.0*$/g,"").replace(/(\.\d*?)0+$/,"$1").replace(/^(\.|$)/,"0$1")},v.prototype.toString=function(){return this.value},t(S,g),S.prototype.isIncomplete=!0,S.prototype.incompleteSuggest=function(){if("'"!==this.value)return String("'")},t(y,f),y.prototype.isIncomplete=!0;var b=new RegExp(e.map((function(e){return"("+("string"==typeof e.pattern?e.pattern.replace(/[\^$()[\]{}*+?|\\]/g,"\\$&"):e.pattern.source)+")"})).concat(".").join("|"),"g");function w(t,i){var s,r=[];e:for(;s=b.exec(t);){for(var o=e.length;o--;)if(s[o+1]){if(e[o].ctor){var a=new e[o].ctor(s[o+1]);a._offset=s.index,r.push(a)}continue e}var l=new v(s[0]);l._offset=s.index,r.push(l)}if(i&&i.recover){var c;for(o=r.length;o--;){var h=r[o];if(h instanceof f||h instanceof g){if(void 0!==c){var d=new g(""),u=r.splice(o,c-o+1,d);d.value=u.map((function(e){return e.value})).join("")}c=o}else h instanceof n||(c=void 0)}}return r}function C(e){for(var t=[],i=0;in.precedence&&(s[s.length-1].minPrecedence=n.precedence);else if(n instanceof o)s.push(t={minPrecedence:1/0,openBraceIndex:r});else if(n instanceof a){var c=e[(t=s.pop()).openBraceIndex-1],h=e[r+1];h instanceof l&&!(h.precedence<=t.minPrecedence)||!(!(c instanceof l)||c.precedencet.minPrecedence&&(s[s.length-1].minPrecedence=t.minPrecedence))}}for(r=i.length;r--;)e.splice(i[r],1);return e}function T(e){if("string"!=typeof e)throw new TypeError("expression must be a string");return(e=w(e)).filter((function(e){return e instanceof g})).map((function(e){return e.exchange()})).filter((function(e){return e}))}function x(e){return 1!==(e=T(e)).length?null:e[0]}function I(e,t){return(e=T(e)).some((function(e){return t.includes((e||"").toUpperCase())}))}function M(e){return e.join("")}return{tokenize:w,validate:function(e){if(s.enabled("charting_library_base"))return{currentState:"var"};for(var t="init",i="var",r=t,c={warnings:[],errors:[],isEmpty:!0},h=[],d=0;d{"use strict";i.d(t,{TranslatedString:()=>s});class s{constructor(e,t){this._originalText=e,this._translatedText=t}originalText(){return this._originalText}translatedText(){return this._translatedText}format(e){const t={},i={};for(const r of Object.keys(e)){const n=e[r];n instanceof s?(t[r]=n.originalText(), +g.prototype.root=function(e){if(this.hasOwnProperty("_root")||this.parseAsFutures(),!(arguments.length>0))return this._root;null==e?delete this._root:(this._root=e+"",this._root&&(this._ticker=this._root+(this._contract||"")))},g.prototype.contract=function(e){if(this.hasOwnProperty("_contract")||this.parseAsFutures(),!(arguments.length>0))return this._root;null==e?delete this._contract:(this._contract=e+"",this._root&&(this._ticker=this._root+this._contract))},t(f,i),f.prototype.toString=function(){return this.hasOwnProperty("_normalizedValue")?this._normalizedValue:this.value},f.prototype.parse=function(){this._normalizedValue=this.value.replace(/^0+|\.0*$/g,"").replace(/(\.\d*?)0+$/,"$1").replace(/^(\.|$)/,"0$1")},v.prototype.toString=function(){return this.value},t(S,g),S.prototype.isIncomplete=!0,S.prototype.incompleteSuggest=function(){if("'"!==this.value)return String("'")},t(y,f),y.prototype.isIncomplete=!0;var b=new RegExp(e.map((function(e){return"("+("string"==typeof e.pattern?e.pattern.replace(/[\^$()[\]{}*+?|\\]/g,"\\$&"):e.pattern.source)+")"})).concat(".").join("|"),"g");function w(t,i){var s,r=[];e:for(;s=b.exec(t);){for(var o=e.length;o--;)if(s[o+1]){if(e[o].ctor){var a=new e[o].ctor(s[o+1]);a._offset=s.index,r.push(a)}continue e}var l=new v(s[0]);l._offset=s.index,r.push(l)}if(i&&i.recover){var c;for(o=r.length;o--;){var h=r[o];if(h instanceof f||h instanceof g){if(void 0!==c){var d=new g(""),u=r.splice(o,c-o+1,d);d.value=u.map((function(e){return e.value})).join("")}c=o}else h instanceof n||(c=void 0)}}return r}function P(e){for(var t=[],i=0;in.precedence&&(s[s.length-1].minPrecedence=n.precedence);else if(n instanceof o)s.push(t={minPrecedence:1/0,openBraceIndex:r});else if(n instanceof a){var c=e[(t=s.pop()).openBraceIndex-1],h=e[r+1];h instanceof l&&!(h.precedence<=t.minPrecedence)||!(!(c instanceof l)||c.precedencet.minPrecedence&&(s[s.length-1].minPrecedence=t.minPrecedence))}}for(r=i.length;r--;)e.splice(i[r],1);return e}function T(e){if("string"!=typeof e)throw new TypeError("expression must be a string");return(e=w(e)).filter((function(e){return e instanceof g})).map((function(e){return e.exchange()})).filter((function(e){return e}))}function x(e){return 1!==(e=T(e)).length?null:e[0]}function I(e,t){return(e=T(e)).some((function(e){return t.includes((e||"").toUpperCase())}))}function M(e){return e.join("")}return{tokenize:w,validate:function(e){if(s.enabled("charting_library_base"))return{currentState:"var"};for(var t="init",i="var",r=t,c={warnings:[],errors:[],isEmpty:!0},h=[],d=0;d{"use strict";i.d(t,{TranslatedString:()=>s});class s{constructor(e,t){this._originalText=e,this._translatedText=t}originalText(){return this._originalText}translatedText(){return this._translatedText}format(e){const t={},i={};for(const r of Object.keys(e)){const n=e[r];n instanceof s?(t[r]=n.originalText(), i[r]=n.translatedText()):(t[r]=n.toString(),i[r]=n.toString())}const r=this._originalText.format(t),n=this._translatedText.format(i);return new s(r,n)}}},2542:e=>{e.exports.tzData={"America/New_York":{time:[-2717668562,-1633298400,-1615154400,-1601848800,-1583704800,-1570399200,-1551650400,-1536530400,-1523224800,-1504476e3,-1491775200,-1473026400,-1459720800,-1441576800,-1428271200,-1410127200,-1396821600,-1378677600,-1365372e3,-1347228e3,-1333922400,-1315173600,-1301868e3,-1283724e3,-1270418400,-1252274400,-1238968800,-1220824800,-1207519200,-1189375200,-1176069600,-1157320800,-114462e4,-1125871200,-1112565600,-1094421600,-1081116e3,-1062972e3,-1049666400,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-923263200,-905119200,-891813600,-880236e3,-76941e4,-765410400,-747266400,-733960800,-715816800,-702511200,-684367200,-671061600,-652917600,-639612e3,-620863200,-608162400,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-447285600,-431560800,-415836e3,-400111200,-384386400,-368661600,-352936800,-337212e3,-321487200,-305762400,-289432800,-273708e3,-257983200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], offset:[-17762,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3]},"America/Los_Angeles":{ time:[-2717668378,-1633298400,-1615154400,-1601848800,-1583704800,-880236e3,-769420800,-765410400,-687995940,-662680800,-620866800,-608162400,-589417200,-576108e3,-557967600,-544658400,-526518e3,-513208800,-495068400,-481759200,-463618800,-450309600,-431564400,-418255200,-400114800,-386805600,-368665200,-355356e3,-337215600,-323906400,-305766e3,-292456800,-273711600,-261007200,-242262e3,-226533600,-210812400,-195084e3,-179362800,-163634400,-147913200,-13158e4,-116463600,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3],offset:[-28378,-28800,-25200,-28800,-25200,-28800,-25200,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800]},"America/Chicago":{ @@ -166,7 +166,7 @@ time:[-2366755200,-1632088800,-1615154400,-1601771400,-1583712e3,-1567375200,-15 offset:[-19052,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-14400,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3,-14400,-18e3]},"America/Vancouver":{ time:[-2713910400,-1632088800,-1615154400,-880236e3,-769420800,-765410400,-747266400,-733960800,-715816800,-702511200,-684367200,-671061600,-652917600,-639612e3,-620863200,-608162400,-589413600,-576108e3,-557964e3,-544658400,-526514400,-513208800,-495064800,-481759200,-463615200,-450309600,-431560800,-418255200,-400111200,-386805600,-368661600,-355356e3,-337212e3,-323906400,-305762400,-292456800,-273708e3,-261007200,-242258400,-226533600,-210808800,-195084e3,-179359200,-163634400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,136346400,152071200,167796e3,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3], offset:[-29548,-28800,-25200,-28800,-25200,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800,-25200,-28800]},"America/Argentina/Buenos_Aires":{time:[-2372112e3,-1567468800,-1233446400,-1222992e3,-1205971200,-1194048e3,-117288e4,-1162512e3,-1141344e3,-1130976e3,-1109808e3,-109944e4,-1078272e3,-1067817600,-1046649600,-1036281600,-1015113600,-1004745600,-983577600,-973209600,-952041600,-941587200,-931046400,-900892800,-890352e3,-83376e4,-82728e4,-752284800,-733795200,-197337600,-190857600,-184204800,-164505600,-152668800,-132969600,-121132800,-101433600,-86832e3,-71107200,-54777600,-39052800,-23328e3,-7603200,128131200,136598400,596937600,605059200,624412800,636508800,656467200,667958400,687916800,699408e3,719366400,731462400,938908800,952041600,1198972800,1205625600,1224374400,1237075200,1924981200],offset:[-14028,-15408,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-14400,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-10800,-10800,-7200,-10800,-7200,-10800]},"America/El_Salvador":{time:[-1546300800,546998400,559699200,578448e3,591148800,1924970400],offset:[-21408,-21600,-18e3,-21600,-18e3,-21600]},"America/Sao_Paulo":{ -time:[-1767225600,-1206968400,-1191369600,-1175385600,-1159833600,-633830400,-622076400,-602294400,-59184e4,-570758400,-560217600,-539136e3,-53136e4,-195436800,-184204800,-155174400,-150076800,-128908800,-121132800,-99964800,-89596800,-68428800,-57974400,499737600,511228800,530582400,540259200,562118400,571190400,592963200,602035200,624412800,634694400,656467200,666748800,687916800,697593600,719971200,728438400,750816e3,761702400,782265600,793152e3,813715200,823996800,84456e4,856051200,876096e3,888710400,908064e3,919555200,938908800,951609600,970963200,982454400,1003017600,1013904e3,1036281600,1045353600,1066521600,1076803200,1099353600,1108857600,1129420800,1140307200,1162684800,1172361600,119232e4,1203206400,1224374400,1234656e3,1255824e3,1266710400,1287273600,129816e4,1318723200,1330214400,1350777600,1361059200,1382227200,1392508800,1413676800,1424563200,1445126400,1456012800,1476576e3,1487462400,1508025600,1518912e3,1541289600,1550361600,1924981200],offset:[-11188,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800]},"America/Bogota":{time:[-2707689600,-1739059200,704851200,733881600,1924974e3],offset:[-17776,-17776,-18e3,-14400,-18e3]},"America/Caracas":{time:[-2524521600,-1826755200,-157766400,1197169200,1462069800,1924977600],offset:[-16064,-16060,-16200,-14400,-16200,-14400]},"Europe/Moscow":{time:[-2840140800,-1688256e3,-165681e4,-1641340800,-1627956e3,-1618700400,-1596416400,-1593804521,-1589846400,-1542416400,-1539478800,-1525305600,-1522713600,-1491177600,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1414288800,1925002800], +time:[-1767225600,-1206968400,-1191369600,-1175385600,-1159833600,-633830400,-622076400,-602294400,-59184e4,-570758400,-560217600,-539136e3,-53136e4,-195436800,-184204800,-155174400,-150076800,-128908800,-121132800,-99964800,-89596800,-68428800,-57974400,499737600,511228800,530582400,540259200,562118400,571190400,592963200,602035200,624412800,634694400,656467200,666748800,687916800,697593600,719971200,728438400,750816e3,761702400,782265600,793152e3,813715200,823996800,84456e4,856051200,876096e3,888710400,908064e3,919555200,938908800,951609600,970963200,982454400,1003017600,1013904e3,1036281600,1045353600,1066521600,1076803200,1099353600,1108857600,1129420800,1140307200,1162684800,1172361600,119232e4,1203206400,1224374400,1234656e3,1255824e3,1266710400,1287273600,129816e4,1318723200,1330214400,1350777600,1361059200,1382227200,1392508800,1413676800,1424563200,1445126400,1456012800,1476576e3,1487462400,1508025600,1518912e3,1541289600,1550361600,1924981200],offset:[-11188,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800,-7200,-10800]},"America/Bogota":{time:[-2707689600,-1739059200,704851200,729043200,1924974e3],offset:[-17776,-17776,-18e3,-14400,-18e3]},"America/Caracas":{time:[-2524521600,-1826755200,-157766400,1197169200,1462069800,1924977600],offset:[-16064,-16060,-16200,-14400,-16200,-14400]},"Europe/Moscow":{time:[-2840140800,-1688256e3,-165681e4,-1641340800,-1627956e3,-1618700400,-1596416400,-1593804521,-1589846400,-1542416400,-1539478800,-1525305600,-1522713600,-1491177600,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1414288800,1925002800], offset:[9017,9017,9079,12679,9079,16279,12679,16279,14400,10800,14400,18e3,14400,10800,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,10800,7200,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800,14400,10800]},"Europe/Athens":{time:[-2344636800,-1686095940,-1182988800,-1178150400,-906854400,-904867200,-85725e4,-844473600,-828230400,-812419200,-552355200,-541641600,166492800,186195600,198036e3,213764400,228880800,244090800,260330400,275457600,291805200,307418400,323395200,338947200,354682800,370411200,386132400,401860800,417582e3,433310400,449031600,465364800,481086e3,496814400,512535600,528264e3,543985200,559713600,575434800,591163200,606884400,622612800,638334e3,654667200,670388400,686116800,701838e3,717566400,733287600,749016e3,764737200,780465600,796186800,811915200,828241200,846388800,859690800,877838400,891140400,909288e3,92259e4,941342400,954039600,972792e3,985489200,1004241600,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[5692,5692,7200,10800,7200,10800,7200,3600,7200,3600,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Belgrade":{ time:[-2713910400,-905821200,-85725e4,-844552800,-828219600,-812498400,-79677e4,-777938400,-766616400,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[4920,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Berlin":{time:[-2422051200,-1693702800,-1680476400,-1663452e3,-1650142800,-1632002400,-1618693200,-938901600,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-776556e3,-765925200,-761173200,-748476e3,-733266e3,-717627600,-714603600,-71037e4,-701902800,-684972e3,-670453200,-654127200,-639003600,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[3208,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,10800,7200,3600,7200,3600,7200,10800,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Bratislava":{time:[-3786825600,-2469398400,-1693702800,-1680476400,-1663452e3,-1650142800,-1632002400,-1618693200,-938901600,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-765320400,-746575200,-733352400,-728514e3,-72126e4,-716421600,-701902800,-684972e3,-670453200,-654213600,-639003600,29178e4,307508400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[3464,3464,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,0,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Bucharest":{ @@ -182,15 +182,15 @@ offset:[5040,5040,3600,7200,3600,7200,3600,7200,7200,10800,7200,3600,7200,3600,7 time:[-3675196800,-2385244800,-904431600,-891122400,-872982e3,-859672800,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[2048,1786,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Australia/Sydney":{time:[-2364076800,-1672524e3,-1665349200,-883605600,-876085200,-860364e3,-844635600,-828309600,-813186e3,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,386737200,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,636519600,657079200,667969200,688528800,699418800,719978400,731473200,752032800,762922800,783482400,794372400,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,967341600,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800], offset:[36292,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600]},"Australia/Brisbane":{time:[-2366755200,-1672524e3,-1665349200,-883605600,-876085200,-860364e3,-844635600,-828309600,-813186e3,57722400,68007600,625629600,636519600,657079200,667969200,688528800,699418800,1925028e3],offset:[36728,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3]},"Australia/Adelaide":{time:[-2364076800,-2230156800,-1672524e3,-1665349200,-883605600,-876085200,-860364e3,-844635600,-828309600,-813186e3,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,384318e3,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,637729200,657079200,667969200,688528800,701233200,719978400,731473200,752032800,764132400,783482400,796186800,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,972784800,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800], offset:[33260,32400,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800,34200,37800]},"Australia/ACT":{time:[-2364076800,-1672524e3,-1665349200,-883605600,-876085200,-860364e3,-844635600,-828309600,-813186e3,57722400,68007600,89172e3,100062e3,120621600,131511600,152071200,162961200,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,386737200,404877600,415767600,436327200,447217200,467776800,478666800,499226400,511326e3,530071200,542775600,562125600,57483e4,59418e4,606279600,625629600,636519600,657079200,667969200,688528800,699418800,719978400,731473200,752032800,762922800,783482400,794372400,814932e3,828241200,846381600,859690800,877831200,891140400,909280800,92259e4,941335200,954039600,967341600,985489200,1004234400,1017543600,1035684e3,1048993200,1067133600,1080442800,1099188e3,1111892400,1130637600,1143946800,1162087200,1174791600,1193536800,1207450800,1223172e3,1238900400,1254621600,127035e4,1286071200,1301799600,1317520800,1333249200,1349575200,1365303600,1381024800,1396753200,1412474400,1428202800,1443924e3,1459652400,1475373600,1491102e3,1506823200,1522551600,1538877600,1554606e3,1570327200,1586055600,1601776800,1617505200,1633226400,1648954800,1664676e3,1680404400,1696125600,1712458800,172818e4,1743908400,1759629600,1775358e3,1791079200,1806807600,1822528800,1838257200,1853978400,1869706800,1886032800,1901761200,1917482400,1933210800],offset:[36292,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600,36e3,39600]},"Asia/Almaty":{ -time:[-1441152e3,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1925013600],offset:[18468,18e3,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,21600,18e3,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600]},"Asia/Ashkhabad":{time:[-1441152e3,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,192501e4],offset:[14012,14400,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,18e3,14400,18e3]},"Asia/Colombo":{time:[-2840140800,-2019686400,-883267200,-862617600,-764028e3,832982400,846289800,1145061e3,1925011800],offset:[19164,19172,19800,21600,23400,19800,23400,21600,19800]},"Asia/Tokyo":{time:[-2587678861,-683769600,-672274800,-654739200,-640825200,-620265600,-609375600,-588816e3,-577926e3,1925024400],offset:[33539,32400,36e3,32400,36e3,32400,36e3,32400,36e3,32400]},"Asia/Taipei":{time:[-2335219200,-1017792e3,-766191600,-745804800,-733795200,-716860800,-699580800,-683856e3,-670636800,-65232e4,-639100800,-620784e3,-607564800,-589248e3,-576028800,-562896e3,-541728e3,-528681600,-510192e3,-497145600,-478656e3,-465609600,-449798400,-433987200,-418176e3,-402451200,-38664e4,-370915200,-355104e3,-339379200,-323568e3,-302486400,-291945600,-270950400,-260409600,134006400,149817600,165542400,181353600,299635200,307584e3,1925020800],offset:[29160,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Singapore":{time:[-2177452800,-2038176e3,-1167609600,-1073001600,-894153600,-879638400,-766972800,378691200,1925020800],offset:[24925,24925,25200,26400,26400,27e3,32400,27e3,28800]},"Asia/Karachi":{time:[-1988150400,-862617600,-764121600,-576115200,38793600,1018137600,1033862400,1212278400,1225497600,1239753600,1257033600,192501e4],offset:[16092,19800,23400,19800,18e3,18e3,21600,18e3,21600,18e3,21600,18e3]},"Asia/Manila":{time:[-3944678400,-2229292800,-1046649600,-1038700800,-873244800,-794188800,-496195200,-489283200,259372800,275184e3,1925020800],offset:[-57360,29040,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Shanghai":{ +time:[-1441152e3,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1925013600],offset:[18468,18e3,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,21600,18e3,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600,25200,21600]},"Asia/Ashkhabad":{time:[-1441152e3,-1247529600,354931200,370742400,386467200,402278400,418003200,433814400,449625600,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,695786400,192501e4],offset:[14012,14400,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,21600,18e3,18e3,14400,18e3]},"Asia/Colombo":{time:[-2840140800,-2019686400,-883267200,-862617600,-764028e3,832982400,846289800,1145061e3,1925011800],offset:[19164,19172,19800,21600,23400,19800,23400,21600,19800]},"Asia/Tokyo":{time:[-2587678861,-683769600,-672274800,-654739200,-640825200,-620265600,-609375600,-588816e3,-577926e3,1925024400],offset:[33539,32400,36e3,32400,36e3,32400,36e3,32400,36e3,32400]},"Asia/Taipei":{time:[-2335219200,-1017792e3,-766191600,-745804800,-733795200,-716860800,-699580800,-683856e3,-670636800,-65232e4,-639100800,-620784e3,-607564800,-589248e3,-576028800,-562896e3,-541728e3,-528681600,-510192e3,-497145600,-478656e3,-465609600,-449798400,-433987200,-418176e3,-402451200,-38664e4,-370915200,-355104e3,-339379200,-323568e3,-302486400,-291945600,-270950400,-260409600,134006400,149817600,165542400,181353600,299635200,307584e3,1925020800],offset:[29160,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Singapore":{time:[-2177452800,-2038176e3,-1167609600,-1073001600,-894153600,-879638400,-766972800,378689400,1925020800],offset:[24925,24925,25200,26400,26400,27e3,32400,27e3,28800]},"Asia/Karachi":{time:[-1988150400,-862617600,-764121600,-576115200,38793600,1018137600,1033862400,1212278400,1225497600,1239753600,1257033600,192501e4],offset:[16092,19800,23400,19800,18e3,18e3,21600,18e3,21600,18e3,21600,18e3]},"Asia/Manila":{time:[-3944678400,-2229292800,-1046649600,-1038700800,-873244800,-794188800,-496195200,-489283200,259372800,275184e3,1925020800],offset:[-57360,29040,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Shanghai":{ time:[-2177452800,-1600646400,-1585872e3,-933638400,-922060800,-908841600,-888796800,-881020800,-767836800,-745804800,-733795200,-716860800,-699580800,-683856e3,-670636800,-65232e4,-649987200,515556e3,527047200,545191200,558496800,577245600,589946400,608695200,622000800,640144800,653450400,671594400,6849e5,1925020800],offset:[29143,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Seoul":{time:[-1948752e3,-1830384e3,-767318400,-681177600,-672192e3,-654739200,-640828800,-623376e3,-609379200,-588816e3,-577929600,-498096e3,-462672e3,-451699200,-429753600,-418262400,-399513600,-387417600,-368064e3,-355968e3,-336614400,-324518400,-305164800,-293068800,-264902400,547610400,560919600,57906e4,592369200,1925024400],offset:[30472,30600,32400,32400,36e3,32400,36e3,32400,36e3,32400,36e3,32400,30600,34200,30600,34200,30600,34200,30600,34200,30600,34200,30600,34200,30600,32400,36e3,32400,36e3,32400]},"Asia/Tehran":{time:[-1704153600,-757382400,247190400,259286400,277776e3,283996800,290822400,306547200,322444800,338515200,673228800,685497600,701222400,71712e4,732758400,748656e3,764294400,780192e3,795830400,811728e3,827366400,843264e3,858988800,874886400,890524800,906422400,922060800,937958400,953596800,969494400,985219200,1001116800,1016755200,1032652800,1048291200,1064188800,1079827200,1095724800,1111449600,1127347200,1206057600,1221955200,123768e4,1253577600,1269216e3,1285113600,1300752e3,1316649600,1332288e3,1348185600,1363910400,1379808e3,1395446400,1411344e3,1426982400,144288e4,1458518400,1474416e3,1490140800,1506038400,1521676800,1537574400,1553212800,1569110400,1584748800,1600646400,1616371200,1632268800,1647907200,1663804800,1679443200,1695340800,1710979200,1726876800,1742601600,1758499200,1774137600,1790035200,1805673600,1821571200,1837209600,1853107200,1868745600,1884643200,1900368e3,1916265600,1931904e3],offset:[12344,12344,12600,14400,18e3,14400,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600,16200,12600]},"Asia/Dubai":{time:[-1577923200,1925006400],offset:[13272,14400]},"Asia/Kolkata":{time:[-3645216e3,-3155673600,-2019686400,-891561600,-872035200,-862617600,-764121600,1925011800],offset:[21208,21200,19270,19800,23400,19800,23400,19800]},"Asia/Hong_Kong":{ time:[-2056663398,-900882e3,-891547200,-884217600,-761176800,-747878400,-728508600,-717021e3,-697059e3,-683757e3,-668028600,-654726600,-636579e3,-623277e3,-605129400,-591827400,-573679800,-559773e3,-541625400,-528323400,-510179400,-498083400,-478729800,-466633800,-446675400,-435184200,-415225800,-403129800,-383776200,-371680200,-352326600,-340230600,-320877e3,-308781e3,-288822600,-277331400,-257373e3,-245881800,-225923400,-213827400,-194473800,-182377800,-163024200,-148509e3,-132784200,-117059400,-101334600,-85609800,-69280200,-53555400,-37830600,-22105800,-6381e3,9343800,25068600,40793400,56518200,72243e3,88572600,104297400,120022200,126070200,151471800,167196600,182921400,198646200,214371e3,295414200,309324600,1925020800],offset:[27402,28800,32400,30600,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Bangkok":{time:[-2840140800,-1570060800,1925017200],offset:[24124,24124,25200]},"Asia/Chongqing":{time:[-2177452800,-1600646400,-1585872e3,-933638400,-922060800,-908841600,-888796800,-881020800,-767836800,-745804800,-733795200,-716860800,-699580800,-683856e3,-670636800,-65232e4,-649987200,515556e3,527047200,545191200,558496800,577245600,589946400,608695200,622000800,640144800,653450400,671594400,6849e5,1925020800],offset:[29143,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800,32400,28800]},"Asia/Jerusalem":{ time:[-2840140800,-1640995200,-933631200,-923086800,-919029600,-857336400,-844293600,-825800400,-812671200,-794178e3,-779839200,-762642e3,-748303200,-731106e3,-681948e3,-673214400,-667947600,-652312800,-636411600,-622072800,-608936400,-591832800,-572475600,-558568800,-542840400,-527724e3,-514414800,-490831200,-482965200,-459381600,-451515600,-428536800,-418251600,-400111200,-387406800,142387200,150854400,167184e3,178675200,334108800,337741200,452649600,46233e4,482284800,494380800,516758400,526435200,545443200,558489600,576633600,589334400,609897600,620784e3,638323200,651628800,669772800,683683200,701827200,715737600,733708800,747187200,765158400,778032e3,796608e3,810086400,826848e3,842832e3,858902400,874195200,890352e3,90504e4,923018400,936324e3,955677600,970794e3,986778e3,1001293200,1017363600,1033952400,1048813200,1065142800,1081299600,1095814800,1112320800,1128823200,1143770400,1159668e3,117522e4,1189908e3,1206669600,1223172e3,1238119200,1254016800,1269568800,1284256800,1301623200,1317520800,1333072800,1348365600,1364522400,1382839200,1395972e3,1414288800,1427421600,1445738400,1458871200,1477792800,1490320800,1509242400,1521770400,1540692e3,1553824800,1572141600,1585274400,1603591200,1616724e3,1635645600,1648173600,1667095200,1679623200,1698544800,1711677600,1729994400,1743127200,1761444e3,1774576800,1792893600,1806026400,1824948e3,1837476e3,1856397600,1868925600,1887847200,190098e4,1919296800,1932429600],offset:[8454,8440,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,14400,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Asia/Kuwait":{time:[-719625600,1925002800],offset:[11212,10800]},"Asia/Muscat":{time:[-1577923200,1925006400],offset:[13272,14400]},"Asia/Nicosia":{ time:[-1518912e3,166579200,182304e3,200966400,21384e4,228873600,243993600,260323200,276134400,291772800,307497600,323827200,338947200,354672e3,370396800,386121600,401846400,417571200,433296e3,449020800,465350400,481075200,4968e5,512524800,528249600,543974400,559699200,575424e3,591148800,606873600,622598400,638323200,654652800,670377600,686102400,701827200,717552e3,733276800,749001600,764726400,780451200,796176e3,811900800,828230400,843955200,85968e4,875404800,891129600,909288e3,92259e4,941342400,954039600,972792e3,985489200,1004241600,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[8008,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Asia/Qatar":{time:[-1577923200,76204800,1925002800],offset:[12368,14400,10800]},"Asia/Riyadh":{time:[-719625600,1925002800],offset:[11212,10800]},"Asia/Yangon":{time:[-2840140800,-1577923200,-873244800,-778377600,1925015400],offset:[23087,23087,23400,32400,23400]},"Pacific/Auckland":{ time:[-3192393600,-1330293600,-1320012e3,-1300658400,-1287352800,-1269208800,-1255903200,-1237759200,-1224453600,-1206309600,-1192399200,-117486e4,-1160949600,-1143410400,-1125871200,-1112565600,-1094421600,-1081116e3,-1062972e3,-1049666400,-1031522400,-1018216800,-1000072800,-986767200,-968018400,-955317600,-936568800,-923263200,-757382400,152676e3,162356400,183520800,195015600,215575200,226465200,247024800,257914800,278474400,289364400,309924e3,320814e3,341373600,352263600,372823200,384318e3,404877600,415767600,436327200,447217200,467776800,478666800,499226400,510116400,530676e3,541566e3,562125600,573620400,59418e4,60507e4,623815200,637729200,655264800,669178800,686714400,700628400,718164e3,732682800,749613600,764132400,781063200,795582e3,812512800,827031600,844567200,858481200,876016800,889930800,907466400,921985200,938916e3,953434800,970365600,984884400,100242e4,1016334e3,1033869600,1047783600,1065319200,1079838e3,1096768800,1111287600,1128218400,1142737200,1159668e3,1174186800,1191117600,1207450800,1222567200,1238900400,1254016800,127035e4,1285466400,1301799600,1316916e3,1333249200,1348970400,1365303600,138042e4,1396753200,1411869600,1428202800,1443319200,1459652400,1474768800,1491102e3,1506218400,1522551600,1538272800,1554606e3,1569722400,1586055600,1601172e3,1617505200,1632621600,1648954800,1664071200,1680404400,1695520800,1712458800,1727575200,1743908400,1759024800,1775358e3,1790474400,1806807600,1821924e3,1838257200,1853373600,1869706800,1885428e3,1901761200,1916877600,1933210800],offset:[41944,41400,45e3,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,41400,43200,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800,43200,46800]},"Pacific/Chatham":{ time:[-3192393600,-757382400,152678700,162359100,183523500,195018300,215577900,226467900,247027500,257917500,278477100,289367100,309926700,320816700,341376300,352266300,372825900,384320700,404880300,415770300,436329900,447219900,467779500,478669500,499229100,510119100,530678700,541568700,562128300,573623100,594182700,605072700,623817900,637731900,655267500,669181500,686717100,700631100,718166700,732685500,749616300,764135100,781065900,795584700,812515500,827034300,844569900,858483900,876019500,889933500,907469100,921987900,938918700,953437500,970368300,984887100,1002422700,1016336700,1033872300,1047786300,1065321900,1079840700,1096771500,1111290300,1128221100,1142739900,1159670700,1174189500,1191120300,1207453500,1222569900,1238903100,1254019500,1270352700,1285469100,1301802300,1316918700,1333251900,1348973100,1365306300,1380422700,1396755900,1411872300,1428205500,1443321900,1459655100,1474771500,1491104700,1506221100,1522554300,1538275500,1554608700,1569725100,1586058300,1601174700,1617507900,1632624300,1648957500,1664073900,1680407100,1695523500,1712461500,1727577900,1743911100,1759027500,1775360700,1790477100,1806810300,1821926700,1838259900,1853376300,1869709500,1885430700,1901763900,1916880300,1933213500],offset:[44028,44100,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500,45900,49500]},"Pacific/Fakaofo":{time:[-2177452800,1325203200,1925038800],offset:[-41096,-39600,46800]},"Pacific/Honolulu":{time:[-2334139200,-1157320800,-1155470400,-880236e3,-769429800,-765410400,-712188e3,1924956e3],offset:[-37886,-37800,-34200,-37800,-34200,-34200,-37800,-36e3]},"America/Mexico_City":{ -time:[-1514763396,-1343091600,-1234828800,-1220317200,-1207180800,-1191369600,-975283200,-963187200,-917136e3,-907372800,-821923200,-810086400,-627523200,-613008e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,989114400,1001815200,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1175392800,1193536800,1207447200,1224986400,1238896800,1256436e3,1270346400,1288490400,1301796e3,131994e4,1333245600,1351389600,13653e5,1382839200,1396749600,1414288800,1428199200,1445738400,1459648800,1477792800,1491098400,1509242400,1522548e3,1540692e3,1554602400,1572141600,1586052e3,1603591200,1617501600,1635645600,1648951200,1667095200,1680400800,1698544800,1712455200,1729994400,1743904800,1761444e3,1775354400,1792893600,1806804e3,1824948e3,1838253600,1856397600,1869703200,1887847200,1901757600,1919296800,1933207200],offset:[-23796,-25200,-21600,-25200,-21600,-25200,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600]},"Africa/Cairo":{time:[-2185401600,-929836800,-923097600,-906163200,-892857600,-875836800,-857779200,-844300800,-825811200,-812678400,-794188800,-779846400,-762652800,-399081600,-38664e4,-368323200,-355104e3,-336783600,-323643600,-305161200,-292021200,-273625200,-260485200,-242089200,-228949200,-210553200,-197413200,-178930800,-165790800,-147394800,-134254800,-115858800,-102632400,-84322800,-71096400,-52700400,-39474e3,-21164400,-7938e3,10371600,23598e3,41907600,55134e3,7353e4,86756400,105066e3,118292400,136602e3,149828400,168138e3,181364400,199760400,212986800,231296400,244522800,262832400,276058800,294368400,307594800,325990800,339217200,357526800,370753200,396406800,402289200,426819600,433825200,452221200,465447600,483757200,496983600,515293200,528519600,546829200,560055600,578451600,591678e3,610419600,623214e3,641523600,65475e4,673059600,686286e3,704682e3,717908400,736218e3,749444400,767754e3,780980400,799027200,812332800,830476800,843782400,861926400,875232e3,893376e3,906681600,925430400,938736e3,95688e4,970185600,988329600,1001635200,1019779200,1033084800,1051228800,1064534400,1083283200,1096588800,1114732800,1128038400,1146182400,1158883200,1177632e3,1189123200,1209081600,1219968e3,1240531200,1250812800,1272585600,1281484800,1284076800,1285891200,1400198400,1403827200,1406851200,1411689600,1924999200], -offset:[7509,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Africa/Johannesburg":{time:[-2458166400,-2109283200,-860968800,-845244e3,-829519200,-813794400,1924999200],offset:[6720,5400,7200,10800,7200,10800,7200]},"Africa/Nairobi":{time:[-194616e4,-1309737600,-1261958400,-1041379200,-865296e3,1925002800],offset:[8836,9e3,10800,9e3,9900,10800]},"Africa/Tunis":{time:[-27972e5,-1855958400,-969238800,-950486400,-941936400,-891129600,-877824e3,-85725e4,-844552800,-842911200,-84222e4,-828223200,-812498400,-796262400,-781048800,-766627200,231206400,243910800,262828800,276051600,581126400,591152400,606873600,622602e3,64152e4,654656400,1114905600,1128045600,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1924995600],offset:[2444,561,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Asia/Kathmandu":{time:[-1577923200,504921600,1925012700],offset:[20476,19800,20700]},"US/Mountain":{ +time:[-1514763396,-1343091600,-1234828800,-1220317200,-1207180800,-1191369600,-975283200,-963187200,-917136e3,-907372800,-821923200,-810086400,-627523200,-613008e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,989114400,1001815200,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1175392800,1193536800,1207447200,1224986400,1238896800,1256436e3,1270346400,1288490400,1301796e3,131994e4,1333245600,1351389600,13653e5,1382839200,1396749600,1414288800,1428199200,1445738400,1459648800,1477792800,1491098400,1509242400,1522548e3,1540692e3,1554602400,1572141600,1586052e3,1603591200,1617501600,1635645600,1648951200,1667095200,1680400800,1698544800,1712455200,1729994400,1743904800,1761444e3,1775354400,1792893600,1806804e3,1824948e3,1838253600,1856397600,1869703200,1887847200,1901757600,1919296800,1933207200],offset:[-23796,-25200,-21600,-25200,-21600,-25200,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600,-18e3,-21600]},"Africa/Cairo":{time:[-2185401600,-929836800,-923097600,-906163200,-892857600,-875836800,-857779200,-844300800,-825811200,-812678400,-794188800,-779846400,-762652800,-399081600,-38664e4,-368323200,-355104e3,-336783600,-323643600,-305161200,-292021200,-273625200,-260485200,-242089200,-228949200,-210553200,-197413200,-178930800,-165790800,-147394800,-134254800,-115858800,-102632400,-84322800,-71096400,-52700400,-39474e3,-21164400,-7938e3,10371600,23598e3,41907600,55134e3,7353e4,86756400,105066e3,118292400,136602e3,149828400,168138e3,181364400,199760400,212986800,231296400,244522800,262832400,276058800,294368400,307594800,325990800,339217200,357526800,370753200,396406800,402289200,426819600,433825200,452221200,465447600,483757200,496983600,515293200,528519600,546829200,560055600,578451600,591678e3,610419600,623214e3,641523600,65475e4,673059600,686286e3,704682e3,717908400,736218e3,749444400,767754e3,780980400,799027200,812332800,830476800,843782400,861926400,875232e3,893376e3,906681600,925430400,938736e3,95688e4,970185600,988329600,1001635200,1019779200,1033084800,1051228800,1064534400,1083283200,1096588800,1114732800,1128038400,1146182400,1158883200,1177632e3,1189123200,1209081600,1219968e3,1240531200,1250812800,1272585600,1281484800,1284076800,1285891200,1400198400,1403827200,1406851200,1411689600,168264e4,1698364800,1714089600,1730419200,1745539200,1761868800,1776988800,1793318400,1809043200,1824768e3,1840492800,1856217600,1871942400,1887667200,1903392e3,1919721600,1934841600], +offset:[7509,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Africa/Johannesburg":{time:[-2458166400,-2109283200,-860968800,-845244e3,-829519200,-813794400,1924999200],offset:[6720,5400,7200,10800,7200,10800,7200]},"Africa/Nairobi":{time:[-194616e4,-1309737600,-1261958400,-1041379200,-865296e3,1925002800],offset:[8836,9e3,10800,9e3,9900,10800]},"Africa/Tunis":{time:[-27972e5,-1855958400,-969238800,-950486400,-941936400,-891129600,-877824e3,-85725e4,-844552800,-842911200,-84222e4,-828223200,-812498400,-796262400,-781048800,-766627200,231206400,243910800,262828800,276051600,581126400,591152400,606873600,622602e3,64152e4,654656400,1114905600,1128045600,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1924995600],offset:[2444,561,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Asia/Kathmandu":{time:[-1577923200,504921600,1925012700],offset:[20476,19800,20700]},"US/Mountain":{ time:[-2717668796,-1633298400,-1615154400,-1601848800,-1583704800,-1570399200,-1551650400,-1538949600,-1534111200,-880236e3,-769417200,-765410400,-147909600,-13158e4,-11646e4,-100130400,-84405600,-68680800,-52956e3,-37231200,-21506400,-5781600,9943200,25668e3,41392800,57722400,73447200,89172e3,104896800,120621600,126669600,152071200,162352800,183520800,199245600,215575200,230695200,247024800,262749600,278474400,294199200,309924e3,325648800,341373600,357098400,372823200,388548e3,404877600,419997600,436327200,452052e3,467776800,483501600,499226400,514951200,530676e3,544586400,562125600,576036e3,59418e4,607485600,625629600,638935200,657079200,670989600,688528800,702439200,719978400,733888800,752032800,765338400,783482400,796788e3,814932e3,828842400,846381600,860292e3,877831200,891741600,909280800,923191200,941335200,954640800,972784800,986090400,1004234400,1018144800,1035684e3,1049594400,1067133600,1081044e3,1099188e3,1112493600,1130637600,1143943200,1162087200,1173578400,1194141600,1205028e3,1225591200,1236477600,1257040800,1268532e3,1289095200,1299981600,1320544800,1331431200,1351994400,1362880800,1383444e3,1394330400,1414893600,142578e4,1446343200,1457834400,1478397600,1489284e3,1509847200,1520733600,1541296800,1552183200,1572746400,1583632800,1604196e3,1615687200,1636250400,1647136800,16677e5,1678586400,1699149600,1710036e3,1730599200,1741485600,1762048800,1772935200,1793498400,1804989600,1825552800,1836439200,1857002400,1867888800,1888452e3,1899338400,1919901600,1930788e3],offset:[-25196,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200,-21600,-25200]},"Europe/Helsinki":{ time:[-2890252800,-1535932800,-875664e3,-859762800,354679200,370407600,386128800,401857200,417582e3,433310400,449031600,465364800,481086e3,496814400,512535600,528264e3,543985200,559713600,575434800,591163200,606884400,622612800,638334e3,654667200,670388400,686116800,701838e3,717566400,733287600,749016e3,764737200,780465600,796186800,811915200,828241200,846388800,859690800,877838400,891140400,909288e3,92259e4,941342400,954039600,972792e3,985489200,1004241600,1017543600,1035691200,1048993200,1067140800,1080442800,1099195200,1111892400,1130644800,1143342e3,1162094400,1174791600,1193544e3,1206846e3,1224993600,1238295600,1256443200,1269745200,1288497600,1301194800,1319947200,1332644400,1351396800,1364698800,1382846400,1396148400,1414296e3,1427598e3,1445745600,1459047600,14778e5,1490497200,1509249600,1521946800,1540699200,1554001200,1572148800,1585450800,1603598400,1616900400,1635652800,164835e4,1667102400,1679799600,1698552e3,1711854e3,1730001600,1743303600,1761451200,1774753200,1792900800,1806202800,1824955200,1837652400,1856404800,1869102e3,1887854400,1901156400,1919304e3,1932606e3],offset:[5989,5989,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200,10800,7200]},"Europe/Stockholm":{time:[-2871676800,-2208988800,-1692493200,-1680476400,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400], offset:[4332,3614,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Europe/Copenhagen":{time:[-2524521600,-2398291200,-1692493200,-1680483600,-935107200,-85725e4,-844552800,-828219600,-812498400,-79677e4,-781048800,-769381200,-747007200,-736376400,-715212e3,-706741200,-683157600,-675291600,323834400,338958e3,354679200,370407600,386128800,401857200,417578400,433306800,449028e3,465361200,481082400,496810800,512532e3,528260400,543981600,55971e4,575431200,591159600,606880800,622609200,638330400,654663600,670384800,686113200,701834400,717562800,733284e3,749012400,764733600,780462e3,796183200,811911600,828237600,846385200,859687200,877834800,891136800,909284400,922586400,941338800,954036e3,972788400,985485600,1004238e3,101754e4,1035687600,1048989600,1067137200,1080439200,1099191600,1111888800,1130641200,1143338400,1162090800,1174788e3,1193540400,1206842400,122499e4,1238292e3,1256439600,1269741600,1288494e3,1301191200,1319943600,1332640800,1351393200,1364695200,1382842800,1396144800,1414292400,1427594400,1445742e3,1459044e3,1477796400,1490493600,1509246e3,1521943200,1540695600,1553997600,1572145200,1585447200,1603594800,1616896800,1635649200,1648346400,1667098800,1679796e3,1698548400,1711850400,1729998e3,17433e5,1761447600,1774749600,1792897200,1806199200,1824951600,1837648800,1856401200,1869098400,1887850800,1901152800,1919300400,1932602400],offset:[3020,3020,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600,7200,3600]},"Atlantic/Reykjavik":{ @@ -209,297 +209,297 @@ s.assert)(!isNaN(n),"Bad version string: "+e),new r(i,n)}throw new Error("Bad ve e.setValue(!t)})),this._opposite=t}return this._opposite},"undefined"!=typeof window&&(window.WatchedValue=n),e&&e.exports&&(e.exports=n)},85108:(e,t,i)=>{"use strict";i.d(t,{TOOLBAR_WIDTH_EXPANDED:()=>s,TOOLBAR_WIDTH_COLLAPSED:()=>r});const s=52,r=5},26971:(e,t,i)=>{"use strict";i.d(t,{DrawingToolbarBootloader:()=>a});var s=i(85323),r=i(85108),n=i(38881),o=i(5683);class a extends n.ChunkLoader{constructor(e){super(),this._opts=e,s.isDrawingToolbarVisible.value()&&(this._opts.resizerBridge.negotiateWidth(r.TOOLBAR_WIDTH_EXPANDED),this._opts.resizerBridge.container.value().appendChild((0,o.createStubElem)()))}_startLoading(){return Promise.all([i.e(4782),i.e(8230),i.e(7624),i.e(9333),i.e(6092),i.e(4412),i.e(8251),i.e(6879),i.e(3626),i.e(2140),i.e(962),i.e(2842),i.e(1075),i.e(1890),i.e(2182),i.e(2878)]).then(i.bind(i,48221)).then((e=>new e.DrawingToolbarRenderer(this._opts.resizerBridge.container.value(),{...this._opts})))}}},85323:(e,t,i)=>{"use strict";i.d(t,{isDrawingToolbarVisible:()=>c});var s=i(56840),r=i(2484),n=i(40549),o=i.n(n);const a=!r.enabled("hide_left_toolbar_by_default"),l=s.getBool("ChartDrawingToolbarWidget.visible",a),c=new(o())(l)},38190:(e,t,i)=>{"use strict";i.d(t,{HeaderToolbarBootloader:()=>o});var s=i(23568),r=i(5683),n=i(38881);class o extends n.ChunkLoader{constructor(e,t){super(),this._toolsBootloader=e,this._headerProps=t,this._headerProps.resizerBridge.negotiateHeight(s.HEADER_TOOLBAR_HEIGHT_EXPANDED),this._headerProps.resizerBridge.container.value().appendChild((0,r.createStubElem)())}_startLoading(){return Promise.all([this._toolsBootloader.load(),this._loadHeaderToolbar()]).then((([e,t])=>new t(this._headerProps.resizerBridge.container.value(),{...this._headerProps,tools:e})))}_loadHeaderToolbar(){return Promise.all([i.e(8955),i.e(8110),i.e(962),i.e(2158),i.e(3005)]).then(i.bind(i,2869)).then((e=>e.HeaderToolbarRenderer))}}},23568:(e,t,i)=>{"use strict";i.d(t,{HEADER_TOOLBAR_HEIGHT_EXPANDED:()=>r,HEADER_TOOLBAR_HEIGHT_COLLAPSED:()=>n});var s=i(68515);const r=parseInt(s["css-value-header-toolbar-height"]),n=3},96642:(e,t,i)=>{"use strict";i.d(t,{RestrictedToolsetBootloader:()=>r});var s=i(38881);class r extends s.ChunkLoader{_startLoading(){return Promise.all([i.e(2468),i.e(8230),i.e(7624),i.e(4819),i.e(9333),i.e(6092),i.e(8825),i.e(4412),i.e(8009),i.e(1140),i.e(3795),i.e(105),i.e(8819),i.e(1033),i.e(9776),i.e(537),i.e(3626),i.e(7507),i.e(5729),i.e(962),i.e(1075),i.e(5747),i.e(5516)]).then(i.bind(i,19475)).then((e=>e.getRestrictedToolSet()))}}},81205:(e,t,i)=>{"use strict";i.d(t,{FavoriteStudyTemplateService:()=>r});var s=i(67065);class r extends s.CommonJsonStoreService{constructor(e,t){super(e,t,"FAVORITE_STUDY_TEMPLATES_CHANGED","StudyTemplates.quicks",[])}remove(e){this.set(this.get().filter((t=>t!==e)))}}},39263:(e,t,i)=>{"use strict";i.d(t,{DropdownApi:()=>s});class s{constructor(e,t){this._headerToolbar=e,this._dropdownId=t}applyOptions(e){this._headerToolbar.updateDropdown(this._dropdownId,e)}remove(){this._headerToolbar.removeDropdown(this._dropdownId)}}},62923:(e,t,i)=>{ "use strict";var s;i.d(t,{ACTION_ID:()=>s}),function(e){e.TVActionId="TVActionId",e.ChartApplyIndicatorsToAllCharts="Chart.ApplyIndicatorsToAllCharts",e.ChartChangeTimeZone="Chart.ChangeTimeZone",e.ChartDialogsShowChangeInterval="Chart.Dialogs.ShowChangeInterval",e.ChartDialogsShowChangeSymbol="Chart.Dialogs.ShowChangeSymbol",e.ChartDialogsShowCompareOrAddSymbol="Chart.Dialogs.ShowCompareOrAddSymbol",e.ChartDialogsShowGeneralSettings="Chart.Dialogs.ShowGeneralSettings",e.ChartDialogsShowGeneralSettingsSymbolTab="Chart.Dialogs.ShowGeneralSettings.SymbolTab",e.ChartDialogsShowGoToDate="Chart.Dialogs.ShowGoToDate",e.ChartDialogsShowInsertIndicators="Chart.Dialogs.ShowInsertIndicators",e.ChartDialogsShowSymbolInfo="Chart.Dialogs.ShowSymbolInfo",e.ChartDrawingToolbarToggleVisibility="Chart.DrawingToolbar.ToggleVisibility",e.ChartLinesToggleBidAskLinesVisibility="Chart.Lines.ToggleBidAskLinesVisibility",e.ChartLinesToggleHighLowLinesVisibility="Chart.Lines.ToggleHighLowLinesVisibility",e.ChartLinesToggleAverageLineVisibility="Chart.Lines.ToggleAverageLineVisibility",e.ChartLinesToggleSeriesPrevCloseLineVisibility="Chart.Lines.ToggleSeriesPrevCloseLineVisibility",e.ChartLinesToggleSeriesPriceLineVisibility="Chart.Lines.ToggleSeriesPriceLineVisibility",e.ChartLineToolPitchforkChangeTypeToInside="Chart.LineTool.Pitchfork.ChangeTypeToInside",e.ChartLineToolPitchforkChangeTypeToModifiedSchiff="Chart.LineTool.Pitchfork.ChangeTypeToModifiedSchiff",e.ChartLineToolPitchforkChangeTypeToOriginal="Chart.LineTool.Pitchfork.ChangeTypeToOriginal",e.ChartLineToolPitchforkChangeTypeToSchiff="Chart.LineTool.Pitchfork.ChangeTypeToSchiff",e.ChartMarksToggleVisibility="Chart.Marks.ToggleVisibility",e.ChartMoveChartInLayout="Chart.MoveChartInLayout",e.ChartMoveChartInLayoutBack="Chart.MoveChartInLayout.Back",e.ChartMoveChartInLayoutForward="Chart.MoveChartInLayout.Forward",e.ChartObjectTreeShow="Chart.ObjectTree.Show",e.ChartPriceScaleLabelsToggleBidAskLabelsVisibility="Chart.PriceScale.Labels.ToggleBidAskLabelsVisibility",e.ChartPriceScaleLabelsToggleHighLowPriceLabelsVisibility="Chart.PriceScale.Labels.ToggleHighLowPriceLabelsVisibility",e.ChartPriceScaleLabelsToggleAveragePriceLabelVisibility="Chart.PriceScale.Labels.ToggleAveragePriceLabelVisibility",e.ChartPriceScaleLabelsToggleIndicatorsNameLabelsVisibility="Chart.PriceScale.Labels.ToggleIndicatorsNameLabelsVisibility",e.ChartPriceScaleLabelsToggleIndicatorsValueLabelsVisibility="Chart.PriceScale.Labels.ToggleIndicatorsValueLabelsVisibility",e.ChartPriceScaleLabelsToggleSeriesLastValueVisibility="Chart.PriceScale.Labels.ToggleSeriesLastValueVisibility",e.ChartPriceScaleLabelsToggleSymbolNameLabelsVisibility="Chart.PriceScale.Labels.ToggleSymbolNameLabelsVisibility",e.ChartPriceScaleLabelsToggleSymbolPrevCloseValueVisibility="Chart.PriceScale.Labels.ToggleSymbolPrevCloseValueVisibility",e.ChartPriceScaleMergeAllScalesToLeft="Chart.PriceScale.MergeAllScalesToLeft",e.ChartPriceScaleMergeAllScalesToRight="Chart.PriceScale.MergeAllScalesToRight", e.ChartPriceScaleMoveToLeft="Chart.PriceScale.MoveToLeft",e.ChartPriceScaleMoveToRight="Chart.PriceScale.MoveToRight",e.ChartPriceScaleToggleAddOrderPlusButtonVisibility="Chart.PriceScale.ToggleAddOrderPlusButtonVisibility",e.ChartPriceScaleToggleAutoScaleSeriesOnly="Chart.PriceScale.ToggleAutoScaleSeriesOnly",e.ChartPriceScaleToggleCountdownToBarCloseVisibility="Chart.PriceScale.ToggleCountdownToBarCloseVisibility",e.ChartRedo="Chart.Redo",e.ChartRemoveAllIndicators="Chart.RemoveAllIndicators",e.ChartRemoveAllIndicatorsAndLineTools="Chart.RemoveAllIndicatorsAndLineTools",e.ChartRemoveAllLineTools="Chart.RemoveAllLineTools",e.ChartScalesReset="Chart.Scales.Reset",e.ChartScalesToggleLockPriceToBarRatio="Chart.Scales.ToggleLockPriceToBarRatio",e.ChartSelectedObjectHide="Chart.SelectedObject.Hide",e.ChartSelectedObjectRemove="Chart.SelectedObject.Remove",e.ChartSelectedObjectShowSettingsDialog="Chart.SelectedObject.ShowSettingsDialog",e.ChartSelectedObjectToggleLocked="Chart.SelectedObject.ToggleLocked",e.ChartSeriesPriceScaleToggleAutoScale="Chart.Series.PriceScale.ToggleAutoScale",e.ChartSeriesPriceScaleToggleIndexedTo100="Chart.Series.PriceScale.ToggleIndexedTo100",e.ChartSeriesPriceScaleToggleInvertPriceScale="Chart.Series.PriceScale.ToggleInvertPriceScale",e.ChartSeriesPriceScaleToggleLogarithmic="Chart.Series.PriceScale.ToggleLogarithmic",e.ChartSeriesPriceScaleTogglePercentage="Chart.Series.PriceScale.TogglePercentage",e.ChartSeriesPriceScaleToggleRegular="Chart.Series.PriceScale.ToggleRegular",e.ChartSessionBreaksToggleVisibility="Chart.SessionBreaks.ToggleVisibility",e.ChartTimeScaleReset="Chart.TimeScale.Reset",e.ChartUndo="Chart.Undo",e.ChartSourceIntervalsVisibility="Chart.Source.IntervalsVisibility",e.ChartSourceIntervalsVisibilityCurrentAndAbove="Chart.Source.IntervalsVisibility.CurrentAndAbove",e.ChartSourceIntervalsVisibilityCurrentAndBelow="Chart.Source.IntervalsVisibility.CurrentAndBelow",e.ChartSourceIntervalsVisibilityOnlyCurrent="Chart.Source.IntervalsVisibility.Current",e.ChartSourceIntervalsVisibilityAll="Chart.Source.IntervalsVisibility.All"}(s||(s={}))},43986:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Action:()=>l,ActionAsync:()=>c,Separator:()=>h,Loader:()=>d});var s=i(50151),r=i(26867),n=i.n(r),o=i(68335),a=i(68671);class l{constructor(e,t=a.guid()){this.type="action",this._destroyed=!1,this._binding=null,(0,s.assert)(void 0!==e.actionId,"actionId must be defined"),this.id=t,this._onUpdate=new(n()),this._options=e,this.update(e)}execute(){this._options.checkable&&this.update({checked:!this._options.checked}),this._options.onExecute&&this._options.onExecute(this)}getLabel(){return this._options.label||""}getSubItems(){return this._options.subItems||[]}isDisabled(){return!0===this._options.disabled}isActive(){return!0===this._options.active}isCheckable(){return!0===this._options.checkable}isChecked(){return!0===this._options.checked}isLoading(){return!0===this._options.loading}getSize(){var e;return null!==(e=this._options.size)&&void 0!==e?e:"normal"}getPayload(){return this._options.payload} -update(e){this._destroyed||(this._unbindShortcut(),e.hotkeyHash&&(this._options.shortcutHint=(0,o.humanReadableHash)(e.hotkeyHash)),this._options=Object.assign(this._options,e),this._bindShortcut(),this._onUpdate.fire(this))}onUpdate(){return this._onUpdate}getState(){return{actionId:this._options.actionId,label:this.getLabel(),disabled:this.isDisabled(),active:this.isActive(),subItems:this.getSubItems(),checkable:this.isCheckable(),checked:this.isChecked(),loading:this.isLoading(),size:this.getSize(),doNotCloseOnClick:this._options.doNotCloseOnClick||!1,shortcutHint:this._options.shortcutHint,hint:this._options.hint,icon:this._options.icon,iconChecked:this._options.iconChecked,toolbox:this._options.toolbox,showToolboxOnHover:this._options.showToolboxOnHover||!1,statName:this._options.statName,name:this._options.name,invisibleHotkey:this._options.invisibleHotkey,noInteractive:this._options.noInteractive}}getBinding(){return this._binding}setBinding(e){this._binding=e}destroy(){var e,t;this._destroyed=!0,this._onUpdate.destroy(),null!==this._binding&&this._binding.destroy(),this._unbindShortcut(),null===(t=(e=this._options).onDestroy)||void 0===t||t.call(e)}options(){return this._options}_bindShortcut(){if(!this._options.hotkeyGroup||!this._options.hotkeyHash)return;const e="string"==typeof this._options.label?this._options.label:this._options.name;this._hotkeyAction=this._options.hotkeyGroup.add({hotkey:this._options.hotkeyHash,desc:e,handler:()=>this.execute(),isDisabled:()=>this.isDisabled()})}_unbindShortcut(){this._hotkeyAction&&(this._hotkeyAction.destroy(),delete this._hotkeyAction)}}class c extends l{constructor(e,t,i){super({actionId:e},i),this._loader=t,this._loaded=!1}loadOptions(){return this._loadingPromise||(this._loadingPromise=this._loader().then((e=>{this._loaded=!0,this.update(e)}))),this._loadingPromise}getState(){return this.loadOptions(),super.getState()}isLoading(){return!this.isLoaded()}isLoaded(){return this._loaded}}class h{constructor(e){this.type="separator",this.id=a.guid(),this._hint=e}getHint(){return this._hint}}class d extends l{constructor(e){super({actionId:e})}isLoading(){return!0}getSize(){return"big"}}},6195:(e,t,i)=>{"use strict";i.d(t,{defaultContextMenuOptions:()=>Fe,createPasteAction:()=>We,createVisualOrderAction:()=>He,createChangeIntervalsVisibilitiesAction:()=>ze,createActionCopyPrice:()=>Ue,createMTPredictorActions:()=>je,createLinesAction:()=>Ge,createSyncDrawingActions:()=>qe,ActionsProvider:()=>$e});var s=i(50151),r=i(98351),n=(i(60521),i(65665)),o=i(44352),a=i(2484),l=i(43986),c=i(50792),h=i(24679),d=i(89215),u=(i(35936),i(71479)),p=i(46069),_=i(68335),m=(i(25812),i(89895)),g=i(83956),f=(i(1930),i(29628)),v=i(39969),S=i(6250),y=i(21580),b=i(86339),w=i(47539),C=(i(76076),i(578)),P=i(10621),T=i(93352);(0,r.getLogger)("Chart.ActionsProvider"),new w.TranslatedString("show alert label lines",o.t(null,void 0,i(16237))),new w.TranslatedString("hide alert label lines",o.t(null,void 0,i(91842))) -;const x=new w.TranslatedString("change visibility",o.t(null,void 0,i(21511))),I=new w.TranslatedString("pin to scale {label}",o.t(null,void 0,i(56015))),M=new w.TranslatedString("pin to right scale",o.t(null,void 0,i(22615))),A=new w.TranslatedString("pin to left scale",o.t(null,void 0,i(84018))),L=(new w.TranslatedString("change earnings visibility",o.t(null,void 0,i(88217))),new w.TranslatedString("change dividends visibility",o.t(null,void 0,i(84944))),new w.TranslatedString("change splits visibility",o.t(null,void 0,i(74488))),new w.TranslatedString("change continuous contract switch visibility",o.t(null,void 0,i(7017))),new w.TranslatedString("change futures contract expiration visibility",o.t(null,void 0,i(28288))),new w.TranslatedString("change latest news visibility",o.t(null,void 0,i(77578))),new w.TranslatedString("show all ideas",o.t(null,void 0,i(13622)))),k=new w.TranslatedString("show ideas of followed users",o.t(null,void 0,i(26267))),E=new w.TranslatedString("show my ideas only",o.t(null,void 0,i(40061))),D=(new w.TranslatedString("change events visibility on chart",o.t(null,void 0,i(79574))),new w.TranslatedString("add this symbol to entire layout",o.t(null,void 0,i(27982)))),V=new w.TranslatedString("add this indicator to entire layout",o.t(null,void 0,i(82388))),B=(new w.TranslatedString("add this strategy to entire layout",o.t(null,void 0,i(94292))),new w.TranslatedString("add this financial metric to entire layout",o.t(null,void 0,i(22856))),new w.TranslatedString("apply drawing template",o.t(null,void 0,i(49037))),new w.TranslatedString("lock objects",o.t(null,void 0,i(68163)))),R=new w.TranslatedString("unlock objects",o.t(null,void 0,i(66824))),N=new w.TranslatedString("change visibility at current interval and above",o.t(null,void 0,i(78422))),O=new w.TranslatedString("change visibility at current interval and below",o.t(null,void 0,i(49529))),F=new w.TranslatedString("change visibility at current interval",o.t(null,void 0,i(16698))),W=new w.TranslatedString("change visibility at all intervals",o.t(null,void 0,i(66927))),H=(o.t(null,void 0,i(8700)),o.t(null,void 0,i(90830)),o.t(null,void 0,i(64885)),(0,b.appendEllipsis)(o.t(null,void 0,i(93512)))),z=(o.t(null,void 0,i(27558)),o.t(null,void 0,i(87085)),(0,b.appendEllipsis)(o.t(null,void 0,i(52302))),o.t(null,void 0,i(81428))),U=o.t(null,void 0,i(31971)),j=(o.t(null,void 0,i(11156)),o.t(null,void 0,i(15682)),o.t(null,void 0,i(66631)),o.t(null,void 0,i(37422)),o.t(null,void 0,i(5716)),o.t(null,void 0,i(50352)),o.t(null,void 0,i(19263)),o.t(null,void 0,i(15818)),o.t(null,void 0,i(5897)),o.t(null,void 0,i(58976)),o.t(null,void 0,i(11661)),o.t(null,void 0,i(66560)),o.t(null,void 0,i(53958)),o.t(null,void 0,i(34150)),o.t(null,void 0,i(83927)),o.t(null,void 0,i(15644)),o.t(null,void 0,i(42660)),o.t(null,void 0,i(44788)),o.t(null,void 0,i(70437)),o.t(null,void 0,i(71263)),o.t(null,void 0,i(70573)),o.t(null,void 0,i(59560)), -o.t(null,void 0,i(14125))),G=o.t(null,void 0,i(44538)),q=o.t(null,void 0,i(56948)),$=o.t(null,void 0,i(20207)),Y=o.t(null,void 0,i(65810)),K=o.t(null,void 0,i(3822)),X=o.t(null,void 0,i(97324)),Z=o.t(null,void 0,i(764)),J=o.t(null,void 0,i(8128)),Q=o.t(null,void 0,i(61201)),ee=o.t(null,void 0,i(32156)),te=o.t(null,void 0,i(91130)),ie=o.t(null,void 0,i(37680)),se=o.t(null,void 0,i(43707)),re=o.t(null,void 0,i(39065)),ne=o.t(null,void 0,i(54727)),oe=o.t(null,void 0,i(66156)),ae=o.t(null,void 0,i(76598)),le=o.t(null,void 0,i(3485)),ce=o.t(null,void 0,i(45828)),he=o.t(null,void 0,i(2899)),de=o.t(null,void 0,i(40887)),ue=o.t(null,void 0,i(53387)),pe=o.t(null,void 0,i(96712)),_e=o.t(null,void 0,i(26354)),me=o.t(null,void 0,i(19796)),ge=o.t(null,void 0,i(59901)),fe=o.t(null,void 0,i(23221)),ve=o.t(null,void 0,i(22198)),Se=o.t(null,void 0,i(27557)),ye=o.t(null,void 0,i(98486)),be=o.t(null,void 0,i(73106)),we=o.t(null,void 0,i(85964)),Ce=o.t(null,void 0,i(59192)),Pe=o.t(null,void 0,i(83182)),Te=((0,b.appendEllipsis)(o.t(null,void 0,i(92206))),(0,b.appendEllipsis)(o.t(null,void 0,i(3612))),(0,b.appendEllipsis)(o.t(null,void 0,i(89517)))),xe=(o.t(null,void 0,i(13345)),(0,b.appendEllipsis)(o.t(null,void 0,i(9908))),o.t(null,void 0,i(35216))),Ie=o.t(null,void 0,i(52977)),Me=(o.t(null,void 0,i(19611)),o.t(null,void 0,i(38342))),Ae=o.t(null,void 0,i(15101)),Le=o.t(null,void 0,i(42284)),ke=(o.t(null,void 0,i(46771)),o.t(null,void 0,i(66263)),o.t(null,void 0,i(30816)),o.t(null,void 0,i(24620)),o.t(null,void 0,i(84813)),o.t(null,void 0,i(30709)),o.t(null,void 0,i(48284))),Ee=o.t(null,void 0,i(87933)),De=o.t(null,void 0,i(58669)),Ve=((0,b.appendEllipsis)(o.t(null,void 0,i(89517))),o.t(null,void 0,i(8251)),o.t(null,void 0,i(34059))),Be=o.t(null,void 0,i(64288)),Re=(o.t(null,void 0,i(77920)),o.t(null,void 0,i(75669)),o.t(null,void 0,i(8886)),o.t(null,void 0,i(18008)),o.t(null,void 0,i(33606)),(0,b.appendEllipsis)(o.t(null,void 0,i(65986)))),Ne=o.t(null,void 0,i(29682)),Oe=o.t(null,void 0,i(28851)),Fe={general:!0,mainSeries:!0,mainSeriesTrade:!1,esdStudies:!0,studies:!0,fundamentals:!0,lineTools:!0,publishedCharts:!0,ordersAndPositions:!0,alerts:!0,chartEvents:!0,objectTree:!0,gotoLineTool:!1};function We(e,t){return!t.isEmpty()&&a.enabled("datasource_copypaste")?new l.Action({actionId:"Chart.Clipboard.PasteSource",label:Ne.trim(),shortcutHint:(0,_.humanReadableHash)(_.Modifiers.Mod+86),statName:"Paste",onExecute:()=>e.chartWidgetCollection().clipboard.uiRequestPaste(t)}):null}function He(e,t){const s=e.model(),r=s.availableZOrderOperations(t),n=[new l.Action({actionId:"Chart.Source.VisualOrder.BringToFront",label:_e,statName:"BringToFront",disabled:!r.bringToFrontEnabled,onExecute:()=>s.bringToFront(t)}),new l.Action({actionId:"Chart.Source.VisualOrder.SendToBack",label:me,statName:"SendToBack",disabled:!r.sendToBackEnabled,onExecute:()=>s.sendToBack(t)}),new l.Action({actionId:"Chart.Source.VisualOrder.BringForward",label:ge,statName:"BringForward",disabled:!r.bringForwardEnabled,onExecute:()=>s.bringForward(t)}),new l.Action({ -actionId:"Chart.Source.VisualOrder.SendBackward",label:fe,statName:"SendBackward",disabled:!r.sendBackwardEnabled,onExecute:()=>s.sendBackward(t)})];return new l.Action({actionId:"Chart.Source.VisualOrder",label:ve,icon:i(77067),statName:"VisualOrder",subItems:n})}function ze(e,t){const i=e.model(),s=(e,s)=>{const r=C.Interval.parse(i.mainSeries().interval()),n=(0,P.getIntervalsVisibilitiesForMode)(r,e),o=[],a=[];t.forEach((e=>{const t=e.properties().intervalsVisibilities.childs();o.push(t.ticks),a.push(n.ticks),o.push(t.seconds),a.push(n.seconds),o.push(t.secondsFrom),a.push(n.secondsFrom),o.push(t.secondsTo),a.push(n.secondsTo),o.push(t.minutes),a.push(n.minutes),o.push(t.minutesFrom),a.push(n.minutesFrom),o.push(t.minutesTo),a.push(n.minutesTo),o.push(t.hours),a.push(n.hours),o.push(t.hoursFrom),a.push(n.hoursFrom),o.push(t.hoursTo),a.push(n.hoursTo),o.push(t.days),a.push(n.days),o.push(t.daysFrom),a.push(n.daysFrom),o.push(t.daysTo),a.push(n.daysTo),o.push(t.weeks),a.push(n.weeks),o.push(t.weeksFrom),a.push(n.weeksFrom),o.push(t.weeksTo),a.push(n.weeksTo),o.push(t.months),a.push(n.months),o.push(t.monthsFrom),a.push(n.monthsFrom),o.push(t.monthsTo),a.push(n.monthsTo),o.push(t.ranges),a.push(n.ranges)})),i.setProperties(o,a,s)},r=[new l.Action({actionId:"Chart.Source.IntervalsVisibility.CurrentAndAbove",label:ye,statName:"currentAndAboveIntervals",onExecute:()=>s(3,N)}),new l.Action({actionId:"Chart.Source.IntervalsVisibility.CurrentAndBelow",label:be,statName:"currentAndBelowIntervals",onExecute:()=>s(2,O)}),new l.Action({actionId:"Chart.Source.IntervalsVisibility.Current",label:we,statName:"currentInterval",onExecute:()=>s(1,F)}),new l.Action({actionId:"Chart.Source.IntervalsVisibility.All",label:Ce,statName:"allIntervals",onExecute:()=>s(0,W)})];return new l.Action({actionId:"Chart.Source.IntervalsVisibility",label:Se,statName:"IntervalsVisibility",subItems:r})}function Ue(e,t){var i,s,r;const n=e.defaultPriceScale(),o=void 0!==t?n.coordinateToPrice(t,null!==(s=null===(i=e.mainDataSource())||void 0===i?void 0:i.firstValue())&&void 0!==s?s:0):e.model().mainSeries().lastValueData(4,!0,!0).price,a=null===(r=e.mainDataSource())||void 0===r?void 0:r.formatter();if(void 0===o||!a)return null;const c=a.format(o);return new l.Action({actionId:"Chart.Clipboard.CopyPrice",label:`${Oe} (${c})`,statName:"CopyPrice",onExecute:()=>(0,T.getClipboard)().writeText(c)})}function je(e,t,i,s){return null}function Ge(e){const t=e.actions(),i=[t.showPriceLine];return i.push(t.showHighLowPriceLines),a.enabled("show_average_close_price_line_and_label")&&i.push(t.showAverageClosePriceLine),new l.Action({actionId:"Chart.Lines",label:Pe,statName:"Lines",subItems:i})}function qe(e,t){return[]}class $e{constructor(e,t){this._chartWidget=e,this._options=(0,n.merge)((0,n.clone)(Fe),t||{})}async contextMenuActionsForSources(e,t,i){const s=e[0],r=this._options;if(s===this._chartWidget.model().mainSeries()&&r.mainSeries)return this._contextMenuActionsForSeries(s,t);if((0,d.isStudy)(s)&&r.studies)return this._contextMenuActionsForStudy(s);if((0, +update(e){this._destroyed||(this._unbindShortcut(),e.hotkeyHash&&(this._options.shortcutHint=(0,o.humanReadableHash)(e.hotkeyHash)),this._options=Object.assign(this._options,e),this._bindShortcut(),this._onUpdate.fire(this))}onUpdate(){return this._onUpdate}getState(){return{actionId:this._options.actionId,label:this.getLabel(),disabled:this.isDisabled(),active:this.isActive(),subItems:this.getSubItems(),checkable:this.isCheckable(),checked:this.isChecked(),loading:this.isLoading(),size:this.getSize(),doNotCloseOnClick:this._options.doNotCloseOnClick||!1,shortcutHint:this._options.shortcutHint,hint:this._options.hint,icon:this._options.icon,iconChecked:this._options.iconChecked,toolbox:this._options.toolbox,showToolboxOnHover:this._options.showToolboxOnHover||!1,statName:this._options.statName,name:this._options.name,invisibleHotkey:this._options.invisibleHotkey,noInteractive:this._options.noInteractive}}getBinding(){return this._binding}setBinding(e){this._binding=e}destroy(){var e,t;this._destroyed=!0,this._onUpdate.destroy(),null!==this._binding&&this._binding.destroy(),this._unbindShortcut(),null===(t=(e=this._options).onDestroy)||void 0===t||t.call(e)}options(){return this._options}_bindShortcut(){if(!this._options.hotkeyGroup||!this._options.hotkeyHash)return;const e="string"==typeof this._options.label?this._options.label:this._options.name;this._hotkeyAction=this._options.hotkeyGroup.add({hotkey:this._options.hotkeyHash,desc:e,handler:()=>this.execute(),isDisabled:()=>this.isDisabled()})}_unbindShortcut(){this._hotkeyAction&&(this._hotkeyAction.destroy(),delete this._hotkeyAction)}}class c extends l{constructor(e,t,i){super({actionId:e},i),this._loader=t,this._loaded=!1}loadOptions(){return this._loadingPromise||(this._loadingPromise=this._loader().then((e=>{this._loaded=!0,this.update(e)}))),this._loadingPromise}getState(){return this.loadOptions(),super.getState()}isLoading(){return!this.isLoaded()}isLoaded(){return this._loaded}}class h{constructor(e){this.type="separator",this.id=a.guid(),this._hint=e}getHint(){return this._hint}}class d extends l{constructor(e){super({actionId:e})}isLoading(){return!0}getSize(){return"big"}}},6195:(e,t,i)=>{"use strict";i.d(t,{defaultContextMenuOptions:()=>Fe,createPasteAction:()=>We,createVisualOrderAction:()=>He,createChangeIntervalsVisibilitiesAction:()=>ze,createActionCopyPrice:()=>Ue,createMTPredictorActions:()=>je,createLinesAction:()=>Ge,createSyncDrawingActions:()=>qe,ActionsProvider:()=>$e});var s=i(50151),r=i(98351),n=(i(60521),i(65665)),o=i(44352),a=i(2484),l=i(43986),c=i(50792),h=i(24679),d=i(89215),u=(i(35936),i(71479)),p=i(46069),_=i(68335),m=(i(25812),i(89895)),g=i(83956),f=(i(1930),i(29628)),v=i(39969),S=i(6250),y=i(21580),b=i(86339),w=i(47539),P=(i(76076),i(578)),C=i(10621),T=i(93352);(0,r.getLogger)("Chart.ActionsProvider"),new w.TranslatedString("show alert label lines",o.t(null,void 0,i(16237))),new w.TranslatedString("hide alert label lines",o.t(null,void 0,i(91842))) +;const x=new w.TranslatedString("change visibility",o.t(null,void 0,i(21511))),I=new w.TranslatedString("pin to scale {label}",o.t(null,void 0,i(56015))),M=new w.TranslatedString("pin to right scale",o.t(null,void 0,i(22615))),A=new w.TranslatedString("pin to left scale",o.t(null,void 0,i(84018))),L=(new w.TranslatedString("change earnings visibility",o.t(null,void 0,i(88217))),new w.TranslatedString("change dividends visibility",o.t(null,void 0,i(84944))),new w.TranslatedString("change splits visibility",o.t(null,void 0,i(74488))),new w.TranslatedString("change continuous contract switch visibility",o.t(null,void 0,i(7017))),new w.TranslatedString("change futures contract expiration visibility",o.t(null,void 0,i(28288))),new w.TranslatedString("change latest news visibility",o.t(null,void 0,i(77578))),new w.TranslatedString("show all ideas",o.t(null,void 0,i(13622)))),k=new w.TranslatedString("show ideas of followed users",o.t(null,void 0,i(26267))),E=new w.TranslatedString("show my ideas only",o.t(null,void 0,i(40061))),D=(new w.TranslatedString("change events visibility on chart",o.t(null,void 0,i(79574))),new w.TranslatedString("add this symbol to entire layout",o.t(null,void 0,i(27982)))),B=new w.TranslatedString("add this indicator to entire layout",o.t(null,void 0,i(82388))),V=(new w.TranslatedString("add this strategy to entire layout",o.t(null,void 0,i(94292))),new w.TranslatedString("add this financial metric to entire layout",o.t(null,void 0,i(22856))),new w.TranslatedString("apply drawing template",o.t(null,void 0,i(49037))),new w.TranslatedString("lock objects",o.t(null,void 0,i(68163)))),R=new w.TranslatedString("unlock objects",o.t(null,void 0,i(66824))),N=new w.TranslatedString("change visibility at current interval and above",o.t(null,void 0,i(78422))),O=new w.TranslatedString("change visibility at current interval and below",o.t(null,void 0,i(49529))),F=new w.TranslatedString("change visibility at current interval",o.t(null,void 0,i(16698))),W=new w.TranslatedString("change visibility at all intervals",o.t(null,void 0,i(66927))),H=(o.t(null,void 0,i(8700)),o.t(null,void 0,i(90830)),o.t(null,void 0,i(64885)),(0,b.appendEllipsis)(o.t(null,void 0,i(93512)))),z=(o.t(null,void 0,i(27558)),o.t(null,void 0,i(87085)),(0,b.appendEllipsis)(o.t(null,void 0,i(52302))),o.t(null,void 0,i(81428))),U=o.t(null,void 0,i(31971)),j=(o.t(null,void 0,i(11156)),o.t(null,void 0,i(15682)),o.t(null,void 0,i(66631)),o.t(null,void 0,i(37422)),o.t(null,void 0,i(5716)),o.t(null,void 0,i(50352)),o.t(null,void 0,i(19263)),o.t(null,void 0,i(15818)),o.t(null,void 0,i(5897)),o.t(null,void 0,i(58976)),o.t(null,void 0,i(11661)),o.t(null,void 0,i(66560)),o.t(null,void 0,i(53958)),o.t(null,void 0,i(34150)),o.t(null,void 0,i(83927)),o.t(null,void 0,i(15644)),o.t(null,void 0,i(42660)),o.t(null,void 0,i(44788)),o.t(null,void 0,i(70437)),o.t(null,void 0,i(71263)),o.t(null,void 0,i(70573)),o.t(null,void 0,i(59560)), +o.t(null,void 0,i(14125))),G=o.t(null,void 0,i(44538)),q=o.t(null,void 0,i(56948)),$=o.t(null,void 0,i(20207)),Y=o.t(null,void 0,i(65810)),K=o.t(null,void 0,i(3822)),X=o.t(null,void 0,i(97324)),Z=o.t(null,void 0,i(764)),J=o.t(null,void 0,i(8128)),Q=o.t(null,void 0,i(61201)),ee=o.t(null,void 0,i(32156)),te=o.t(null,void 0,i(91130)),ie=o.t(null,void 0,i(37680)),se=o.t(null,void 0,i(43707)),re=o.t(null,void 0,i(39065)),ne=o.t(null,void 0,i(54727)),oe=o.t(null,void 0,i(66156)),ae=o.t(null,void 0,i(76598)),le=o.t(null,void 0,i(3485)),ce=o.t(null,void 0,i(45828)),he=o.t(null,void 0,i(2899)),de=o.t(null,void 0,i(40887)),ue=o.t(null,void 0,i(53387)),pe=o.t(null,void 0,i(96712)),_e=o.t(null,void 0,i(26354)),me=o.t(null,void 0,i(19796)),ge=o.t(null,void 0,i(59901)),fe=o.t(null,void 0,i(23221)),ve=o.t(null,void 0,i(22198)),Se=o.t(null,void 0,i(27557)),ye=o.t(null,void 0,i(98486)),be=o.t(null,void 0,i(73106)),we=o.t(null,void 0,i(85964)),Pe=o.t(null,void 0,i(59192)),Ce=o.t(null,void 0,i(83182)),Te=((0,b.appendEllipsis)(o.t(null,void 0,i(92206))),(0,b.appendEllipsis)(o.t(null,void 0,i(3612))),(0,b.appendEllipsis)(o.t(null,void 0,i(89517)))),xe=(o.t(null,void 0,i(13345)),(0,b.appendEllipsis)(o.t(null,void 0,i(9908))),o.t(null,void 0,i(35216))),Ie=o.t(null,void 0,i(52977)),Me=(o.t(null,void 0,i(19611)),o.t(null,void 0,i(38342))),Ae=o.t(null,void 0,i(15101)),Le=o.t(null,void 0,i(42284)),ke=(o.t(null,void 0,i(46771)),o.t(null,void 0,i(66263)),o.t(null,void 0,i(30816)),o.t(null,void 0,i(24620)),o.t(null,void 0,i(84813)),o.t(null,void 0,i(30709)),o.t(null,void 0,i(48284))),Ee=o.t(null,void 0,i(87933)),De=o.t(null,void 0,i(58669)),Be=((0,b.appendEllipsis)(o.t(null,void 0,i(89517))),o.t(null,void 0,i(8251)),o.t(null,void 0,i(34059))),Ve=o.t(null,void 0,i(64288)),Re=(o.t(null,void 0,i(77920)),o.t(null,void 0,i(75669)),o.t(null,void 0,i(8886)),o.t(null,void 0,i(18008)),o.t(null,void 0,i(33606)),(0,b.appendEllipsis)(o.t(null,void 0,i(65986)))),Ne=o.t(null,void 0,i(29682)),Oe=o.t(null,void 0,i(28851)),Fe={general:!0,mainSeries:!0,mainSeriesTrade:!1,esdStudies:!0,studies:!0,fundamentals:!0,lineTools:!0,publishedCharts:!0,ordersAndPositions:!0,alerts:!0,chartEvents:!0,objectTree:!0,gotoLineTool:!1};function We(e,t){return!t.isEmpty()&&a.enabled("datasource_copypaste")?new l.Action({actionId:"Chart.Clipboard.PasteSource",label:Ne.trim(),shortcutHint:(0,_.humanReadableHash)(_.Modifiers.Mod+86),statName:"Paste",onExecute:()=>e.chartWidgetCollection().clipboard.uiRequestPaste(t)}):null}function He(e,t){const s=e.model(),r=s.availableZOrderOperations(t),n=[new l.Action({actionId:"Chart.Source.VisualOrder.BringToFront",label:_e,statName:"BringToFront",disabled:!r.bringToFrontEnabled,onExecute:()=>s.bringToFront(t)}),new l.Action({actionId:"Chart.Source.VisualOrder.SendToBack",label:me,statName:"SendToBack",disabled:!r.sendToBackEnabled,onExecute:()=>s.sendToBack(t)}),new l.Action({actionId:"Chart.Source.VisualOrder.BringForward",label:ge,statName:"BringForward",disabled:!r.bringForwardEnabled,onExecute:()=>s.bringForward(t)}),new l.Action({ +actionId:"Chart.Source.VisualOrder.SendBackward",label:fe,statName:"SendBackward",disabled:!r.sendBackwardEnabled,onExecute:()=>s.sendBackward(t)})];return new l.Action({actionId:"Chart.Source.VisualOrder",label:ve,icon:i(77067),statName:"VisualOrder",subItems:n})}function ze(e,t){const i=e.model(),s=(e,s)=>{const r=P.Interval.parse(i.mainSeries().interval()),n=(0,C.getIntervalsVisibilitiesForMode)(r,e),o=[],a=[];t.forEach((e=>{const t=e.properties().intervalsVisibilities.childs();o.push(t.ticks),a.push(n.ticks),o.push(t.seconds),a.push(n.seconds),o.push(t.secondsFrom),a.push(n.secondsFrom),o.push(t.secondsTo),a.push(n.secondsTo),o.push(t.minutes),a.push(n.minutes),o.push(t.minutesFrom),a.push(n.minutesFrom),o.push(t.minutesTo),a.push(n.minutesTo),o.push(t.hours),a.push(n.hours),o.push(t.hoursFrom),a.push(n.hoursFrom),o.push(t.hoursTo),a.push(n.hoursTo),o.push(t.days),a.push(n.days),o.push(t.daysFrom),a.push(n.daysFrom),o.push(t.daysTo),a.push(n.daysTo),o.push(t.weeks),a.push(n.weeks),o.push(t.weeksFrom),a.push(n.weeksFrom),o.push(t.weeksTo),a.push(n.weeksTo),o.push(t.months),a.push(n.months),o.push(t.monthsFrom),a.push(n.monthsFrom),o.push(t.monthsTo),a.push(n.monthsTo),o.push(t.ranges),a.push(n.ranges)})),i.setProperties(o,a,s)},r=[new l.Action({actionId:"Chart.Source.IntervalsVisibility.CurrentAndAbove",label:ye,statName:"currentAndAboveIntervals",onExecute:()=>s(3,N)}),new l.Action({actionId:"Chart.Source.IntervalsVisibility.CurrentAndBelow",label:be,statName:"currentAndBelowIntervals",onExecute:()=>s(2,O)}),new l.Action({actionId:"Chart.Source.IntervalsVisibility.Current",label:we,statName:"currentInterval",onExecute:()=>s(1,F)}),new l.Action({actionId:"Chart.Source.IntervalsVisibility.All",label:Pe,statName:"allIntervals",onExecute:()=>s(0,W)})];return new l.Action({actionId:"Chart.Source.IntervalsVisibility",label:Se,statName:"IntervalsVisibility",subItems:r})}function Ue(e,t){var i,s,r;const n=e.defaultPriceScale(),o=void 0!==t?n.coordinateToPrice(t,null!==(s=null===(i=e.mainDataSource())||void 0===i?void 0:i.firstValue())&&void 0!==s?s:0):e.model().mainSeries().lastValueData(4,!0,!0).price,a=null===(r=e.mainDataSource())||void 0===r?void 0:r.formatter();if(void 0===o||!a)return null;const c=a.format(o);return new l.Action({actionId:"Chart.Clipboard.CopyPrice",label:`${Oe} (${c})`,statName:"CopyPrice",onExecute:()=>(0,T.getClipboard)().writeText(c)})}function je(e,t,i,s){return null}function Ge(e){const t=e.actions(),i=[t.showPriceLine];return i.push(t.showHighLowPriceLines),a.enabled("show_average_close_price_line_and_label")&&i.push(t.showAverageClosePriceLine),new l.Action({actionId:"Chart.Lines",label:Ce,statName:"Lines",subItems:i})}function qe(e,t){return[]}class $e{constructor(e,t){this._chartWidget=e,this._options=(0,n.merge)((0,n.clone)(Fe),t||{})}async contextMenuActionsForSources(e,t,i){const s=e[0],r=this._options;if(s===this._chartWidget.model().mainSeries()&&r.mainSeries)return this._contextMenuActionsForSeries(s,t);if((0,d.isStudy)(s)&&r.studies)return this._contextMenuActionsForStudy(s);if((0, S.isLineTool)(s)&&r.lineTools){const t=e.filter(S.isLineTool);return this._contextMenuActionsForLineTool(t)}return[]}_isReadOnly(){return this._chartWidget.readOnly()}_createActionHide(e){return new l.Action({actionId:"Chart.SelectedObject.Hide",label:U,icon:i(84959),statName:"HideSelectedObject",onExecute:this._chartWidget.hideDataSources.bind(this._chartWidget,[e])})}_createActionShow(e){const t=new l.Action({actionId:"Chart.SelectedObject.Show",checkable:!0,label:z,icon:i(16911),statName:"ToggleShow"}),s=new c.ActionBinder(t,e.properties().visible,this._chartWidget.model(),x);return t.setBinding(s),s.setValue(e.properties().visible.value()),t}_createActionScale(e){const t=(0,s.ensureNotNull)(e.priceScale()),r=this._chartWidget.model().model(),n=(0,s.ensureNotNull)(r.paneForSource(e)),o=n.priceScalePosition(t),a=("left"===o?n.leftPriceScales():n.rightPriceScales()).indexOf(t),c=r.priceScaleSlotsCount().totallySlots<2?"dontneedname":"needname",d="overlay"===o?"":(0,h.getPriceAxisNameInfo)(o,a).label,u=re.format({label:d}),p={"left-needname":u,"left-dontneedname":oe,"right-needname":u,"right-dontneedname":ae,"overlay-needname":ne,"overlay-dontneedname":ne}[o+"-"+c];return new l.Action({actionId:"Chart.Source.ChangePriceScale",label:p,icon:i(25191),subItems:this._createActionScaleItems(e)})}_createActionScaleDetach(e,t,i,r){const n=this._chartWidget.model().model(),o=(0,s.ensureNotNull)(n.paneForSource(e));if(!o.canCreateNewPriceScale())return null;const a=(0,s.ensureNotNull)(e.priceScale()),c=a.canDetachSource(e),d=o.priceScalePosition(a),u=c||d!==t;if(!u)return null;const p=n.priceScaleSlotsCount(),_={left:{labelled:X,sided:ie},right:{labelled:X,sided:se}},m="left"===t?o.leftPriceScales().length:o.rightPriceScales().length,g=p[t]>m?"labelled":"sided",f=(0,h.getPriceAxisNameInfo)(t,m).label,v=_[t][g].format({label:f});return new l.Action({actionId:"Chart.Source.ChangePriceScale",checkable:!1,disabled:!u,label:v,statName:r,payload:e,onExecute:i})}_onDetachLeft(e){const t=e.getPayload(),i=this._chartWidget.model().model(),r=(0,s.ensureNotNull)(i.paneForSource(t));this._chartWidget.model().detachToLeft(t,r)}_onDetachRight(e){const t=e.getPayload(),i=this._chartWidget.model().model(),r=(0,s.ensureNotNull)(i.paneForSource(t));this._chartWidget.model().detachToRight(t,r)}_createActionScaleDetachLeft(e){return this._createActionScaleDetach(e,"left",this._onDetachLeft.bind(this),"ToggleScaleLeft")}_createActionScaleDetachRight(e){return this._createActionScaleDetach(e,"right",this._onDetachRight.bind(this),"ToggleScaleRight")}_onMoveToScale(e){const t=e.getPayload();if(t.datasource.priceScale()===t.priceScale)return;const i=this._chartWidget.model().model(),r=(0,s.ensureNotNull)(i.paneForSource(t.datasource));this._chartWidget.model().moveToScale(t.datasource,r,t.priceScale,t.undoText)}_createMoveToScaleAction(e,t,i,s){const r=e.priceScale()===t;return new l.Action({actionId:"Chart.Source.MoveToOtherScale",checkable:!0,checked:r,label:i,statName:"ToggleScale",payload:{datasource:e,priceScale:t,undoText:s}, onExecute:this._onMoveToScale.bind(this)})}_onNoScale(e){const t=e.getPayload().datasource,i=this._chartWidget.model().model(),r=(0,s.ensureNotNull)(i.paneForSource(t));r.isOverlay(t)||this._chartWidget.model().detachNoScale(t,r)}_createActionNoScale(e){const t=this._chartWidget.model().model(),i=(0,s.ensureNotNull)(t.paneForSource(e)),r=i.actionNoScaleIsEnabled(e);return new l.Action({actionId:"Chart.Source.MoveToNoScale",checkable:!0,checked:i.isOverlay(e),label:le,disabled:!r,statName:"ToggleNoScale",payload:{datasource:e},onExecute:this._onNoScale.bind(this)})}_createActionScaleItems(e){const t=[],i=this._chartWidget.model().model(),r=(0,s.ensureNotNull)(i.paneForSource(e)),n=i.priceScaleSlotsCount().totallySlots>1,o=r.rightPriceScales(),a=r.leftPriceScales(),c=this._createActionScaleDetachRight(e),d=this._createActionScaleDetachLeft(e),u=o.length+a.length+(null===c?0:1)+(null===d?0:1)>2,p={right:{hidden:{checked:{labelled:j,sided:G},unchecked:{labelled:q,sided:$}},visible:{checked:{labelled:Y,sided:K},unchecked:{labelled:X,sided:Z}}},left:{hidden:{checked:{labelled:j,sided:J},unchecked:{labelled:q,sided:Q}},visible:{checked:{labelled:Y,sided:ee},unchecked:{labelled:X,sided:te}}}},_={right:M,left:A},m={left:r.visibleLeftPriceScales(),right:r.visibleRightPriceScales()},g=(t,i)=>{const s=("right"===i?o:a)[t],r=m[i].includes(s)?"visible":"hidden",l=e.priceScale()===s?"checked":"unchecked",c=n?"labelled":"sided",d=p[i],u=(0,h.getPriceAxisNameInfo)(i,t).label;return{actionText:d[r][l][c].format({label:u}),undoText:n?I.format({label:u}):_[i]}};t.push(...o.map(((t,i)=>{const s=g(i,"right");return this._createMoveToScaleAction(e,t,s.actionText,s.undoText)}))),null!==c&&t.push(c);u&&(o.length>0||null!==c)&&t.push(new l.Separator);t.push(...a.map(((t,i)=>{const s=g(i,"left");return this._createMoveToScaleAction(e,t,s.actionText,s.undoText)}))),null!==d&&t.push(d);u&&(a.length>0||null!==d)&&t.push(new l.Separator);return t.push(this._createActionNoScale(e)),t}_createActionMergeUp(e){const t=this._chartWidget.model();return t.model().isMergeUpAvailableForSource(e)?new l.Action({actionId:"Chart.Source.MergeUp",label:he,statName:"MergeUp",onExecute:()=>t.mergeSourceUp(e)}):null}_createActionUnmergeUp(e){const t=this._chartWidget.model();return t.model().isUnmergeAvailableForSource(e)?new l.Action({actionId:"Chart.Source.UnmergeUp",label:de,statName:"UnmergeUp",onExecute:()=>t.unmergeSourceUp(e)}):null}_createActionMergeDown(e){const t=this._chartWidget.model();return t.model().isMergeDownAvailableForSource(e)?new l.Action({actionId:"Chart.Source.MergeDown",label:ue,statName:"MergeDown",onExecute:()=>t.mergeSourceDown(e)}):null}_createActionUnmergeDown(e){const t=this._chartWidget.model();return t.model().isUnmergeAvailableForSource(e)?new l.Action({actionId:"Chart.Source.UnmergeDown",label:pe,statName:"UnmergeDown",onExecute:()=>t.unmergeSourceDown(e)}):null}_mergeContentMenuItems(e){ return[this._createActionMergeUp(e),this._createActionUnmergeUp(e),this._createActionMergeDown(e),this._createActionUnmergeDown(e)].filter(n.notNull)}_createActionMove(e){const t=this._mergeContentMenuItems(e);return t.length>0?new l.Action({actionId:"Chart.Source.MoveToPane",label:ce,icon:i(54190),subItems:t}):null}_contextMenuActionsForSeries(e,t){var i;const r=[],n=e.properties().childs().visible.value(),o=this._chartWidget.model().model(),c=(0,s.ensureNotNull)(o.paneForSource(e)),h=this._chartWidget.actions();if(this._isReadOnly())r.push(n?this._createActionHide(e):this._createActionShow(e)),r.push(new l.Separator),r.push(this._createActionScale(e));else{0,r.length>0&&!(r[r.length-1]instanceof l.Separator)&&r.push(new l.Separator),a.enabled("symbol_info")&&r.push(h.showSymbolInfoDialog);o.mainSeries().symbolInfo();if(r.length>0&&!(r[r.length-1]instanceof l.Separator)&&r.push(new l.Separator),!c.isEmpty()&&a.enabled("datasource_copypaste")){const e=Ue(c,t&&"localY"in t?t.localY:void 0),i=We(this._chartWidget,c);(e||i)&&(e&&r.push(e),i&&r.push(i),r.push(new l.Separator))}r.push(He(this._chartWidget,[e]));const s=this._createActionMove(e);null!==s&&r.push(s),r.push(this._createActionScale(e)),r.push(n?this._createActionHide(e):this._createActionShow(e)),r.push(new l.Separator),r.push(Ge(this._chartWidget)),r.push(new l.Separator);Boolean(null===(i=window.widgetbar)||void 0===i?void 0:i.widget("watchlist"))&&h.addToWatchlist&&r.push(h.addToWatchlist),a.enabled("text_notes")&&r.push(h.addToTextNotes),r[r.length-1]instanceof l.Separator||r.push(new l.Separator),a.enabled("show_chart_property_page")&&!this._chartWidget.onWidget()&&r.push(h.mainSeriesPropertiesAction),r[r.length-1]instanceof l.Separator&&r.pop()}return r}_createActionAddChildStudy(e){throw new Error("unsupported")}_createActionAddFundamentals(e){return null}_createActionShowSymbolInfoDialog(e,t){const s=this._chartWidget.model().model();return new l.Action({actionId:"Chart.Dialogs.ShowSymbolInfo",label:Re,icon:i(37924),checkable:!1,statName:"SymbolInfo",onExecute:()=>{const i=e.symbol(),r={symbolInfo:e.symbolInfo(),unitDescription:e=>t.description(e),dateFormatter:s.dateFormatter()};(0,f.showSymbolInfoDialog)(i,r)}})}_createActionShowProperties(e){return new l.Action({actionId:"Chart.Indicator.ShowSettingsDialog",label:Te,icon:i(51983),statName:"EditSelectedObject",onExecute:()=>this._chartWidget.showSourceProperties(e)})}async _contextMenuActionsForStudy(e){const t=this._chartWidget.actions(),i=e.properties().childs().visible.value(),s=[];if(!e.userEditEnabled())return s;if(this._chartWidget.readOnly())s.push(i?this._createActionHide(e):this._createActionShow(e)),s.push(new l.Separator),(0,u.isNonSeriesStudy)(e)||s.push(this._createActionScale(e));else{0,a.enabled("study_on_study")&&e.canHaveChildren()&&s.push(this._createActionAddChildStudy(e));const r=this._createApplyToEntireLayoutCommand(e);if(null!==r&&s.push(r),s.length>0&&!(s[s.length-1]instanceof l.Separator)&&s.push(new l.Separator), -a.enabled("symbol_info")&&(e instanceof g.StudyCompare||e instanceof m.study_Overlay)&&null!==e.symbolInfo()&&(s.push(this._createActionShowSymbolInfoDialog(e,this._chartWidget.model().model().availableUnits())),s.push(new l.Separator)),s.push(He(this._chartWidget,[e])),s.push(ze(this._chartWidget,[e])),!(0,u.isNonSeriesStudy)(e)){const t=this._createActionMove(e);null!==t&&s.push(t),s.push(this._createActionScale(e))}s.push(new l.Separator);const n=e.metaInfo();if(e.copiable()){const t=new l.Action({actionId:"Chart.Clipboard.CopySource",label:xe,shortcutHint:(0,_.humanReadableHash)(_.Modifiers.Mod+67),statName:"Copy",onExecute:()=>{this._chartWidget.chartWidgetCollection().clipboard.uiRequestCopy([e])}});s.push(t)}s.push(i?this._createActionHide(e):this._createActionShow(e)),s.push(t.studyRemove),s.push(new l.Separator),a.enabled("property_pages")&&new p.MetaInfoHelper(n).hasUserEditableOptions()&&s.push(this._createActionShowProperties(e)),s[s.length-1]instanceof l.Separator&&s.pop()}return s}_createEditAlertDrawingAction(e){return new TVAction({label:H.format({title:e.title()}),icon:TbbiEditAlertSvg,statName:"EditAlert",onExecute:()=>{window.runOrSignIn((()=>{e.editAlert("pane_context_menu_edit_alert")}),{source:"Alert edit from pane context menu"})}})}_createLineToolTemplateAction(e){return null}_createActionToggleLockLineTools(e){const t=e[0].properties().frozen.value(),s=t?Ae:Le;return new l.Action({actionId:"Chart.SelectedObject.ToggleLocked",label:s,statName:"ToggleLockSelectedObject",checkable:!0,icon:i(t?97874:2872),onExecute:()=>{if(1===e.length)this._chartWidget.toggleLockSelectedObject();else{const i=t?R:B,s=this._chartWidget.model();s.withMacro(i,(()=>{e.forEach((e=>{s.setProperty(e.properties().frozen,!t,i)}))}))}}})}async _contextMenuActionsForLineTool(e){const t=[],s=this._chartWidget.actions(),r=(this._chartWidget.model().model(),()=>{t.push(He(this._chartWidget,e))}),n=()=>{t.push(ze(this._chartWidget,e))},o=()=>{const s=e.filter((e=>e.cloneable()));if(s.length>0){const e=new l.Action({actionId:"Chart.LineTool.Clone",label:Ie,icon:i(1457),shortcutHint:(0,_.humanReadableModifiers)(_.Modifiers.Mod)+"Drag",statName:"Clone",onExecute:()=>this._chartWidget.model().cloneLineTools(s,!1)},"Clone");t.push(e)}return!!s.length},c=()=>{const i=e.filter((e=>e.copiable()));if(i.length>0){const e=new l.Action({actionId:"Chart.Clipboard.CopyLineTools",label:xe,shortcutHint:(0,_.humanReadableHash)(_.Modifiers.Mod+67),statName:"Copy",onExecute:()=>this._chartWidget.chartWidgetCollection().clipboard.uiRequestCopy(i)},"Copy");t.push(e)}return!!i.length},h=()=>{const e=(this._chartWidget,[]);return t.push(...e),e.length>0},d=e=>{const i=new l.Action({actionId:"Chart.ScrollToLineTool",label:Me.format({lineToolName:e.title()}),statName:"GoToLineTool",checkable:!1,onExecute:async()=>this._chartWidget.model().scrollToLineTool(e)});t.push(i)},u=e=>{const t=this._chartWidget.model().model().lineToolsGroupModel(),i=e.map((e=>t.groupForLineTool(e)));return new Set(i).size<=1};if(1===e.length){const i=e[0] -;if(this._chartWidget.readOnly())t.push(s.lineHide);else if(i.userEditEnabled()){0,r(),n(),this._options.objectTree&&s.paneObjectTree&&t.push(s.paneObjectTree),t.push(new l.Separator);let e=o();e=c()||e,e=h()||e,e&&t.push(new l.Separator),t.push(this._createActionToggleLockLineTools([i])),t.push(s.lineHide),t.push(s.lineRemove),i.points().length>0&&this._options.gotoLineTool&&(t.push(new l.Separator),d(i));const u=await this._chartWidget.propertiesDefinitionsForSource(i);if(a.enabled("property_pages")&&null!==u&&(t.push(new l.Separator),t.push(s.format)),i.additionalActions){t.push(new l.Separator);const e=i.additionalActions(this._chartWidget.model());t.push(...e)}}}else this._options.objectTree&&s.paneObjectTree&&t.push(s.paneObjectTree),u(e)&&r(),n(),t.length>0&&t.push(new l.Separator),o(),c(),h(),t.push(new l.Separator),t.push(this._createActionToggleLockLineTools(e)),t.push(s.lineHide),t.push(s.lineRemove),a.enabled("property_pages")&&(t.push(new l.Separator),t.push(s.format));return t}_createEarningsShow(){return null}_createDividendsShow(){return null}_createSplitsShow(){return null}_contextMenuActionsForESD(){return[]}_contextMenuActionsForRollDates(){return[]}_contextMenuActionsForFuturesContractExpiration(){return[]}_contextMenuActionsForLastNews(){return[]}_contextMenuActionsForPublishedTimeline(e){const t=this._chartWidget.actions(),i=[];if(i.push(t.lineHide),window.is_authenticated){const t=e.properties().childs().filter,s=new TVAction({checked:t.value()===PublishedChartsFilter.None,checkable:!0,label:ke,name:"ToggleAllIdeas",statName:"ToggleAllIdeas",onExecute:()=>this._chartWidget.model().setProperty(t,PublishedChartsFilter.None,L)}),r=new TVAction({checked:t.value()===PublishedChartsFilter.Following,checkable:!0,label:Ee,name:"ToggleIdeasOfPeopleAndUser",statName:"ToggleIdeasOfPeopleAndUser",onExecute:()=>this._chartWidget.model().setProperty(t,PublishedChartsFilter.Following,k)}),n=new TVAction({checked:t.value()===PublishedChartsFilter.Private,checkable:!0,label:De,name:"ToggleUserIdeas",statName:"ToggleUserIdeas",onExecute:()=>this._chartWidget.model().setProperty(t,PublishedChartsFilter.Private,E)});i.push(new l.Separator,s,r,n)}return i}_contextMenuActionsForTradingDrawings(e){return e.contextMenuItems()}_createAlertToggleHorzLineLabelAction(e){throw new Error("Not implemented")}_contextMenuActionsForAlertLabel(e,t){throw new Error("Not implemented")}_contextMenuActionsForChartEvents(e){return[]}_createApplyToEntireLayoutCommand(e){if(!this._chartWidget.chartWidgetCollection().applyIndicatorsToAllChartsAvailable())return null;const t=this._chartWidget.model().model();if(e.parentSources().length>0)return null;const i=(0,s.ensureNotNull)(t.paneForSource(e)),r=t.paneForSource(t.mainSeries())===i,n=e instanceof g.StudyCompare&&e.priceScale()===t.mainSeries().priceScale()&&(0,s.ensureNotNull)(e.priceScale()).isPercentage(),o=r?void 0:t.panes().indexOf(i);let a=Be,c=V,h="AddStudyToEntireLayout";return(0,y.isActingAsSymbolSource)(e)&&(a=Ve,c=D,h="AddSymbolToEntireLayout"),new l.Action({ +a.enabled("symbol_info")&&(e instanceof g.StudyCompare||e instanceof m.study_Overlay)&&null!==e.symbolInfo()&&(s.push(this._createActionShowSymbolInfoDialog(e,this._chartWidget.model().model().availableUnits())),s.push(new l.Separator)),s.push(He(this._chartWidget,[e])),s.push(ze(this._chartWidget,[e])),!(0,u.isNonSeriesStudy)(e)){const t=this._createActionMove(e);null!==t&&s.push(t),s.push(this._createActionScale(e))}s.push(new l.Separator);const n=e.metaInfo();if(e.copiable()){const t=new l.Action({actionId:"Chart.Clipboard.CopySource",label:xe,shortcutHint:(0,_.humanReadableHash)(_.Modifiers.Mod+67),statName:"Copy",onExecute:()=>{this._chartWidget.chartWidgetCollection().clipboard.uiRequestCopy([e])}});s.push(t)}s.push(i?this._createActionHide(e):this._createActionShow(e)),s.push(t.studyRemove),s.push(new l.Separator),a.enabled("property_pages")&&new p.MetaInfoHelper(n).hasUserEditableOptions()&&s.push(this._createActionShowProperties(e)),s[s.length-1]instanceof l.Separator&&s.pop()}return s}_createEditAlertDrawingAction(e){return new TVAction({label:H.format({title:e.title()}),icon:TbbiEditAlertSvg,statName:"EditAlert",onExecute:()=>{window.runOrSignIn((()=>{e.editAlert("pane_context_menu_edit_alert")}),{source:"Alert edit from pane context menu"})}})}_createLineToolTemplateAction(e){return null}_createActionToggleLockLineTools(e){const t=e[0].properties().frozen.value(),s=t?Ae:Le;return new l.Action({actionId:"Chart.SelectedObject.ToggleLocked",label:s,statName:"ToggleLockSelectedObject",checkable:!0,icon:i(t?97874:2872),onExecute:()=>{if(1===e.length)this._chartWidget.toggleLockSelectedObject();else{const i=t?R:V,s=this._chartWidget.model();s.withMacro(i,(()=>{e.forEach((e=>{s.setProperty(e.properties().frozen,!t,i)}))}))}}})}async _contextMenuActionsForLineTool(e){const t=[],s=this._chartWidget.actions(),r=(this._chartWidget.model().model(),()=>{t.push(He(this._chartWidget,e))}),n=()=>{t.push(ze(this._chartWidget,e))},o=()=>{const s=e.filter((e=>e.cloneable()));if(s.length>0){const e=new l.Action({actionId:"Chart.LineTool.Clone",label:Ie,icon:i(1457),shortcutHint:(0,_.humanReadableModifiers)(_.Modifiers.Mod)+"Drag",statName:"Clone",onExecute:()=>this._chartWidget.model().cloneLineTools(s,!1)},"Clone");t.push(e)}return!!s.length},c=()=>{const i=e.filter((e=>e.copiable()));if(i.length>0){const e=new l.Action({actionId:"Chart.Clipboard.CopyLineTools",label:xe,shortcutHint:(0,_.humanReadableHash)(_.Modifiers.Mod+67),statName:"Copy",onExecute:()=>this._chartWidget.chartWidgetCollection().clipboard.uiRequestCopy(i)},"Copy");t.push(e)}return!!i.length},h=()=>{const e=(this._chartWidget,[]);return t.push(...e),e.length>0},d=e=>{const i=new l.Action({actionId:"Chart.ScrollToLineTool",label:Me.format({lineToolName:e.title()}),statName:"GoToLineTool",checkable:!1,onExecute:async()=>this._chartWidget.model().scrollToLineTool(e)});t.push(i)},u=e=>{const t=this._chartWidget.model().model().lineToolsGroupModel(),i=e.map((e=>t.groupForLineTool(e)));return new Set(i).size<=1};if(1===e.length){const i=e[0] +;if(this._chartWidget.readOnly())t.push(s.lineHide);else if(i.userEditEnabled()){0,r(),n(),this._options.objectTree&&s.paneObjectTree&&t.push(s.paneObjectTree),t.push(new l.Separator);let e=o();e=c()||e,e=h()||e,e&&t.push(new l.Separator),t.push(this._createActionToggleLockLineTools([i])),t.push(s.lineHide),t.push(s.lineRemove),i.points().length>0&&this._options.gotoLineTool&&(t.push(new l.Separator),d(i));const u=await this._chartWidget.propertiesDefinitionsForSource(i);if(a.enabled("property_pages")&&null!==u&&(t.push(new l.Separator),t.push(s.format)),i.additionalActions){t.push(new l.Separator);const e=i.additionalActions(this._chartWidget.model());t.push(...e)}}}else this._options.objectTree&&s.paneObjectTree&&t.push(s.paneObjectTree),u(e)&&r(),n(),t.length>0&&t.push(new l.Separator),o(),c(),h(),t.push(new l.Separator),t.push(this._createActionToggleLockLineTools(e)),t.push(s.lineHide),t.push(s.lineRemove),a.enabled("property_pages")&&(t.push(new l.Separator),t.push(s.format));return t}_createEarningsShow(){return null}_createDividendsShow(){return null}_createSplitsShow(){return null}_contextMenuActionsForESD(){return[]}_contextMenuActionsForRollDates(){return[]}_contextMenuActionsForFuturesContractExpiration(){return[]}_contextMenuActionsForLastNews(){return[]}_contextMenuActionsForPublishedTimeline(e){const t=this._chartWidget.actions(),i=[];if(i.push(t.lineHide),window.is_authenticated){const t=e.properties().childs().filter,s=new TVAction({checked:t.value()===PublishedChartsFilter.None,checkable:!0,label:ke,name:"ToggleAllIdeas",statName:"ToggleAllIdeas",onExecute:()=>this._chartWidget.model().setProperty(t,PublishedChartsFilter.None,L)}),r=new TVAction({checked:t.value()===PublishedChartsFilter.Following,checkable:!0,label:Ee,name:"ToggleIdeasOfPeopleAndUser",statName:"ToggleIdeasOfPeopleAndUser",onExecute:()=>this._chartWidget.model().setProperty(t,PublishedChartsFilter.Following,k)}),n=new TVAction({checked:t.value()===PublishedChartsFilter.Private,checkable:!0,label:De,name:"ToggleUserIdeas",statName:"ToggleUserIdeas",onExecute:()=>this._chartWidget.model().setProperty(t,PublishedChartsFilter.Private,E)});i.push(new l.Separator,s,r,n)}return i}_contextMenuActionsForTradingDrawings(e){return e.contextMenuItems()}_createAlertToggleHorzLineLabelAction(e){throw new Error("Not implemented")}_contextMenuActionsForAlertLabel(e,t){throw new Error("Not implemented")}_contextMenuActionsForChartEvents(e){return[]}_createApplyToEntireLayoutCommand(e){if(!this._chartWidget.chartWidgetCollection().applyIndicatorsToAllChartsAvailable())return null;const t=this._chartWidget.model().model();if(e.parentSources().length>0)return null;const i=(0,s.ensureNotNull)(t.paneForSource(e)),r=t.paneForSource(t.mainSeries())===i,n=e instanceof g.StudyCompare&&e.priceScale()===t.mainSeries().priceScale()&&(0,s.ensureNotNull)(e.priceScale()).isPercentage(),o=r?void 0:t.panes().indexOf(i);let a=Ve,c=B,h="AddStudyToEntireLayout";return(0,y.isActingAsSymbolSource)(e)&&(a=Be,c=D,h="AddSymbolToEntireLayout"),new l.Action({ actionId:"Chart.AddIndicatorToAllCharts",label:a,statName:h,onExecute:()=>{const i=(0,s.ensureNotNull)((0,v.clipboardDataForSources)(t.id(),[e])),a=this._chartWidget.chartWidgetCollection(),l={isOnMainPane:r,asCompare:n,paneIndex:o};a.applyIndicatorToAllCharts(this._chartWidget,i,l,c)}},"applyStudyToEntireLayout")}}},37121:(e,t,i)=>{"use strict";i.r(t),i.d(t,{supportedLineTools:()=>s});const s={cursor:{name:"cursor",onlySelectable:!0},dot:{name:"dot",onlySelectable:!0},arrow_cursor:{name:"arrow",onlySelectable:!0},eraser:{name:"eraser",onlySelectable:!0},measure:{name:"measure",onlySelectable:!0},zoom:{name:"zoom",onlySelectable:!0},brush:{name:"LineToolBrush"},highlighter:{name:"LineToolHighlighter"},text:{name:"LineToolText"},anchored_text:{name:"LineToolTextAbsolute",isAnchored:!0},note:{name:"LineToolNote"},anchored_note:{name:"LineToolNoteAbsolute",isAnchored:!0},signpost:{name:"LineToolSignpost"},callout:{name:"LineToolCallout"},balloon:{name:"LineToolBalloon"},comment:{name:"LineToolComment"},arrow_up:{name:"LineToolArrowMarkUp"},arrow_down:{name:"LineToolArrowMarkDown"},arrow_left:{name:"LineToolArrowMarkLeft"},arrow_right:{name:"LineToolArrowMarkRight"},price_label:{name:"LineToolPriceLabel"},price_note:{name:"LineToolPriceNote"},arrow_marker:{name:"LineToolArrowMarker"},flag:{name:"LineToolFlagMark"},vertical_line:{name:"LineToolVertLine"},horizontal_line:{name:"LineToolHorzLine"},cross_line:{name:"LineToolCrossLine"},horizontal_ray:{name:"LineToolHorzRay"},trend_line:{name:"LineToolTrendLine"},info_line:{name:"LineToolInfoLine"},trend_angle:{name:"LineToolTrendAngle"},arrow:{name:"LineToolArrow"},ray:{name:"LineToolRay"},extended:{name:"LineToolExtended"},parallel_channel:{name:"LineToolParallelChannel"},disjoint_angle:{name:"LineToolDisjointAngle"},flat_bottom:{name:"LineToolFlatBottom"},pitchfork:{name:"LineToolPitchfork"},schiff_pitchfork_modified:{name:"LineToolSchiffPitchfork"},schiff_pitchfork:{name:"LineToolSchiffPitchfork2"},inside_pitchfork:{name:"LineToolInsidePitchfork"},pitchfan:{name:"LineToolPitchfan"},gannbox:{name:"LineToolGannSquare"},gannbox_square:{name:"LineToolGannComplex"},gannbox_fixed:{name:"LineToolGannFixed"},gannbox_fan:{name:"LineToolGannFan"},fib_retracement:{name:"LineToolFibRetracement"},fib_trend_ext:{name:"LineToolTrendBasedFibExtension"},fib_speed_resist_fan:{name:"LineToolFibSpeedResistanceFan"},fib_timezone:{name:"LineToolFibTimeZone"},fib_trend_time:{name:"LineToolTrendBasedFibTime"},fib_circles:{name:"LineToolFibCircles"},fib_spiral:{name:"LineToolFibSpiral"},fib_speed_resist_arcs:{name:"LineToolFibSpeedResistanceArcs"},fib_wedge:{name:"LineToolFibWedge"},fib_channel:{name:"LineToolFibChannel"},xabcd_pattern:{name:"LineTool5PointsPattern"},cypher_pattern:{name:"LineToolCypherPattern"},abcd_pattern:{name:"LineToolABCD"},triangle_pattern:{name:"LineToolTrianglePattern"},"3divers_pattern":{name:"LineToolThreeDrivers"},head_and_shoulders:{name:"LineToolHeadAndShoulders"},elliott_impulse_wave:{name:"LineToolElliottImpulse"},elliott_triangle_wave:{ -name:"LineToolElliottTriangle"},elliott_triple_combo:{name:"LineToolElliottTripleCombo"},elliott_correction:{name:"LineToolElliottCorrection"},elliott_double_combo:{name:"LineToolElliottDoubleCombo"},cyclic_lines:{name:"LineToolCircleLines"},time_cycles:{name:"LineToolTimeCycles"},sine_line:{name:"LineToolSineLine"},long_position:{name:"LineToolRiskRewardLong"},short_position:{name:"LineToolRiskRewardShort"},forecast:{name:"LineToolPrediction"},date_range:{name:"LineToolDateRange"},price_range:{name:"LineToolPriceRange"},date_and_price_range:{name:"LineToolDateAndPriceRange"},bars_pattern:{name:"LineToolBarsPattern"},ghost_feed:{name:"LineToolGhostFeed"},projection:{name:"LineToolProjection"},rectangle:{name:"LineToolRectangle"},rotated_rectangle:{name:"LineToolRotatedRectangle"},circle:{name:"LineToolCircle"},ellipse:{name:"LineToolEllipse"},triangle:{name:"LineToolTriangle"},polyline:{name:"LineToolPolyline"},path:{name:"LineToolPath"},curve:{name:"LineToolBezierQuadro"},double_curve:{name:"LineToolBezierCubic"},arc:{name:"LineToolArc"},icon:{name:"LineToolIcon"},emoji:{name:"LineToolEmoji"},regression_trend:{name:"LineToolRegressionTrend"},fixed_range_volume_profile:{name:"LineToolFixedRangeVolumeProfile"}}},39969:(e,t,i)=>{"use strict";i.d(t,{clipboardDataForSources:()=>o});var s=i(50151),r=i(89215),n=i(6250);function o(e,t){if(1===t.length&&(0,r.isStudy)(t[0])){const e=t[0];return{title:e.title(),sources:[{source:(0,s.ensureNotNull)(e.state()),type:"study"}]}}const i={sources:[],title:""};return i.sources=t.filter((e=>e.copiable()&&(0,n.isLineTool)(e))).map((t=>{const i={type:"drawing",geometry:t.geometry(),source:{...t.state(!1),points:t.normalizedPoints()},modelId:e};return delete i.source.alertId,i})),i.sources.length>0?(1===i.sources.length?i.title=t[0].title&&t[0].title():i.title="Drawings",i):null}},74585:(e,t,i)=>{"use strict";i.d(t,{addBrandingSource:()=>Q});var s=i(7019),r=i(27714),n=i(4889),o=i(86441),a=i(34026),l=i(7394),c=i(50151),h=i(44352),d=(i(49483),i(2484)),u=i(1288),p=i(14888),_=i(41207),m=i(38031),g=i(70439),f=i(9740),v=i(83499),S=i(91753),y=i(17364),b=i(40858);i(41483);const w=d.enabled("adaptive_logo"),C=d.enabled("small_no_display"),P=d.enabled("38914"),T="site_branding",x="widget_branding",I="widget_referral_branding",M="widget_custom_branding",A="widget_custom_no_powered_branding",L="fundamental_branding",k="fundamental_custom_branding",E="fundamental_custom_no_powered_branding",D="library_branding",V="library_custom_branding",B="library_custom_no_powered_branding",R=navigator.userAgent.toLowerCase().indexOf("chrome")>-1&&-1===navigator.userAgent.toLowerCase().indexOf("edge"),N=window.urlParams||{};window.initData;N.no_referral_id&&enable(N.referral_id||"","aggressive");const O=!1,F=h.t(null,void 0,i(26619)),W=P?h.t(null,void 0,i(5607)):h.t(null,void 0,i(68111));h.t(null,void 0,i(82128)),h.t(null,void 0,i(88841)),h.t(null,void 0,i(99769));function H(e){return"px EuclidCircular"===e?.1:0}class z extends u.CustomSourceBase{constructor(e,t,i){super(e,t),this._canvasWidth=0, -this._paneHeight=0,this._left=13,this._bottom=16,this._layout=T,this._needToShow=!0,this._showBranding=!1,this._customLogoSrc="",this._customLogoLink="",this._cubicBezier=new _.CubicBezier(.4,.01,.22,1),this._openAnimation=null,this._closeAnimation=null,this._powBy=null,this._custom=null,this._mainSeries=this._model.mainSeries(),this._visibleSpawn=i,this._showForPro=O,this._visibleSpawn.subscribe((()=>{this._model.updateSource(this)})),this._checkLayout(),this._layout!==M&&this._layout!==k||(this._left=8,this._bottom=5);const s=()=>{this._needToShow?this._showBranding=!0:this._showBranding=!1};this._resizeHandlerDelayed=(0,n.default)(s,200),s(),window.addEventListener("resize",this._resizeHandlerDelayed),this._monitorCanvas=(0,v.createDisconnectedBoundCanvas)(document,(0,r.size)({width:0,height:0})),this._monitorCanvas.subscribeSuggestedBitmapSizeChanged((()=>{this._init()})),this._model.isSnapshot()?this._init():(this._mainSeries.dataEvents().symbolResolved().subscribe(this,this._init),null!==this._mainSeries.symbolInfo()&&this._init()),this._renderer={draw:this.draw.bind(this),hitTest:this.hitTest.bind(this)}}destroy(){window.removeEventListener("resize",this._resizeHandlerDelayed),this._mainSeries.dataEvents().symbolResolved().unsubscribeAll(this),this._powBy&&this._powBy.destroy(),this._visibleSpawn.destroy()}paneViews(e){if(window.TradingView.printing)return[];if(!this._visibleSpawn.value())return[];if(this._layout===T&&!this._showForPro&&window.user&&window.user.is_pro)return[];const t=d.enabled("move_logo_to_main_pane");let i=!1;if(e.maximized().value())i=!0;else if(t)i=this._model.mainPane().collapsed().value()?e===this._model.panes().find((e=>!e.collapsed().value())):e.isMainPane();else if(this._model.lastPane().collapsed().value()){const t=this._model.panes();for(let s=t.length-1;s>=0;--s){const r=t[s];if(!r.collapsed().value()){i=r===e;break}}}else i=e.isLast();return i?[{renderer:this.renderer.bind(this)}]:[]}labelPaneViews(e){return[]}priceAxisViews(e,t){return[]}updateAllViews(){}updateViewsForPane(e){}priceScale(){return null}renderer(e,t){return this._paneHeight=e,this._canvasWidth=t,this._renderer}hasContextMenu(){return!1}onClickOutside(){this._hasAnimation()&&this._startCloseAnimation()}hitTest(e){return!this._showBranding||d.enabled("logo_without_link")?null:this._powBy&&this._layout!==A&&this._layout!==E&&(this._powBy.hitTest(e)||this._custom&&this._custom.hitTest(e))?new p.HitTestResult(p.HitTestResult.CUSTOM,{hideCrosshairLinesOnHover:!0,clickHandler:()=>{this._openLink()},tapHandler:()=>{this._hasAnimation()?this._toggleOpenAnimatedOrOpenLink():this._openLink()},mouseEnterHandler:()=>{this._hasAnimation()&&this._startOpenAnimation()},mouseLeaveHandler:()=>{this._hasAnimation()&&this._startCloseAnimation()}}):null}tvUrl(){let e=new URL("https://www.tradingview.com/");if(this._customLogoLink)return this._customLogoLink;if(this._layout===D||this._layout===V){let t;switch(!0){case d.enabled("charting_library"):t="library";break;case d.enabled("trading_terminal"):t="trading-terminal"} -return e.searchParams.append("utm_source",window.location.origin),e.searchParams.append("utm_medium","library"),t&&e.searchParams.append("utm_campaign",t),e.toString()}return e.toString()}draw(e,t){if(!this._showBranding)return;let i=0;N.utm=!0,(0,v.drawScaled)(e,t.pixelRatio,(()=>{this._powBy&&this._powBy.show&&(i=this._powBy.height,e.save(),e.translate(this._left,this._paneHeight-this._bottom-i),this._powBy.draw(e,t,this._canvasWidth),e.restore()),this._custom&&this._custom.show&&(e.save(),e.translate(this._left,this._paneHeight-this._bottom-i-this._custom.height),this._custom.draw(e,t),e.restore())}))}_init(){const e=this._mainSeries.symbolInfo();this._powBy&&this._powBy.destroy(),this._powBy=new Z(this._layout,(null==e?void 0:e.name)||"",this._model,(()=>this._model.fullUpdate())),this._custom=new J(this._layout,this._customLogoSrc,(()=>this._model.fullUpdate())),this._openAnimation=null,this._closeAnimation=null}_checkLayout(){if(d.enabled("widget"))0;else if(d.enabled("charting_library")||d.enabled("trading_terminal")){const e=JSON.parse(N.logo)||{};e.image?(this._customLogoSrc=e.image,this._customLogoLink=e.link,this._needToShow=d.enabled("widget_logo"),d.enabled("link_to_tradingview")?this._layout=V:this._layout=B):(this._layout=D,this._needToShow=d.enabled("widget_logo"))}else this._layout=T}_startOpenAnimation(){null===this._openAnimation&&(null!==this._closeAnimation&&(this._closeAnimation.stop(),this._closeAnimation=null),this._openAnimation=(0,g.doAnimate)({from:this._currentStateForAnimation(),to:this._openedStateForAnimation(),duration:200,easing:this._cubicBezier.easingFunc,onStep:this._animatedDrawStep.bind(this)}))}_startCloseAnimation(){null===this._closeAnimation&&(null!==this._openAnimation&&(this._openAnimation.stop(),this._openAnimation=null),this._closeAnimation=(0,g.doAnimate)({from:this._currentStateForAnimation(),to:this._closedStateForAnimation(),duration:200,easing:this._cubicBezier.easingFunc,onStep:this._animatedDrawStep.bind(this)}))}_currentStateForAnimation(){return(0,c.ensureNotNull)(this._powBy).width}_closedStateForAnimation(){return(0,c.ensureNotNull)(this._powBy).minimizedAnimationWidth()}_openedStateForAnimation(){return(0,c.ensureNotNull)(this._powBy).maximizedAnimationWidth()}_animatedDrawStep(e,t){(0,c.ensureNotNull)(this._powBy).animatedDrawStep(e,t),this._model.lightUpdate()}_hasAnimation(){return null!==this._powBy&&this._powBy.hasAnimation()}_openLink(){if(this._layout===T)return!1;d.enabled("widget");return(0,c.ensureNotNull)(window.open(this.tvUrl(),"_blank")).opener=null,!0}_toggleOpenAnimatedOrOpenLink(){null!==this._openAnimation&&this._openAnimation.completed()?this._openLink()||this._startCloseAnimation():this._startOpenAnimation()}}function U(e){return!C||e>480}function j(e){return!w||e>500}const G={customBrandingTradingViewText:l.colorsPalette["color-brand"],customBrandingText:l.colorsPalette["color-cold-gray-850"],background:l.colorsPalette["color-cold-gray-900"],shadow:(0,m.generateColor)(l.colorsPalette["color-white"],91),text:l.colorsPalette["color-white"], +name:"LineToolElliottTriangle"},elliott_triple_combo:{name:"LineToolElliottTripleCombo"},elliott_correction:{name:"LineToolElliottCorrection"},elliott_double_combo:{name:"LineToolElliottDoubleCombo"},cyclic_lines:{name:"LineToolCircleLines"},time_cycles:{name:"LineToolTimeCycles"},sine_line:{name:"LineToolSineLine"},long_position:{name:"LineToolRiskRewardLong"},short_position:{name:"LineToolRiskRewardShort"},forecast:{name:"LineToolPrediction"},date_range:{name:"LineToolDateRange"},price_range:{name:"LineToolPriceRange"},date_and_price_range:{name:"LineToolDateAndPriceRange"},bars_pattern:{name:"LineToolBarsPattern"},ghost_feed:{name:"LineToolGhostFeed"},projection:{name:"LineToolProjection"},rectangle:{name:"LineToolRectangle"},rotated_rectangle:{name:"LineToolRotatedRectangle"},circle:{name:"LineToolCircle"},ellipse:{name:"LineToolEllipse"},triangle:{name:"LineToolTriangle"},polyline:{name:"LineToolPolyline"},path:{name:"LineToolPath"},curve:{name:"LineToolBezierQuadro"},double_curve:{name:"LineToolBezierCubic"},arc:{name:"LineToolArc"},icon:{name:"LineToolIcon"},emoji:{name:"LineToolEmoji"},regression_trend:{name:"LineToolRegressionTrend"},fixed_range_volume_profile:{name:"LineToolFixedRangeVolumeProfile"}}},39969:(e,t,i)=>{"use strict";i.d(t,{clipboardDataForSources:()=>o});var s=i(50151),r=i(89215),n=i(6250);function o(e,t){if(1===t.length&&(0,r.isStudy)(t[0])){const e=t[0];return{title:e.title(),sources:[{source:(0,s.ensureNotNull)(e.state()),type:"study"}]}}const i={sources:[],title:""};return i.sources=t.filter((e=>e.copiable()&&(0,n.isLineTool)(e))).map((t=>{const i={type:"drawing",geometry:t.geometry(),source:{...t.state(!1),points:t.normalizedPoints()},modelId:e};return delete i.source.alertId,i})),i.sources.length>0?(1===i.sources.length?i.title=t[0].title&&t[0].title():i.title="Drawings",i):null}},74585:(e,t,i)=>{"use strict";i.d(t,{addBrandingSource:()=>Q});var s=i(7019),r=i(27714),n=i(4889),o=i(86441),a=i(34026),l=i(7394),c=i(50151),h=i(44352),d=(i(49483),i(2484)),u=i(1288),p=i(14888),_=i(41207),m=i(38031),g=i(70439),f=i(9740),v=i(83499),S=i(91753),y=i(17364),b=i(40858);i(41483);const w=d.enabled("adaptive_logo"),P=d.enabled("small_no_display"),C=d.enabled("38914"),T="site_branding",x="widget_branding",I="widget_referral_branding",M="widget_custom_branding",A="widget_custom_no_powered_branding",L="fundamental_branding",k="fundamental_custom_branding",E="fundamental_custom_no_powered_branding",D="library_branding",B="library_custom_branding",V="library_custom_no_powered_branding",R=navigator.userAgent.toLowerCase().indexOf("chrome")>-1&&-1===navigator.userAgent.toLowerCase().indexOf("edge"),N=window.urlParams||{};window.initData;N.no_referral_id&&enable(N.referral_id||"","aggressive");const O=!1,F=h.t(null,void 0,i(26619)),W=C?h.t(null,void 0,i(5607)):h.t(null,void 0,i(68111));h.t(null,void 0,i(82128)),h.t(null,void 0,i(88841)),h.t(null,void 0,i(99769));function H(e){return"px EuclidCircular"===e?.1:0}class z extends u.CustomSourceBase{constructor(e,t,i){super(e,t),this._canvasWidth=0, +this._paneHeight=0,this._left=13,this._bottom=16,this._layout=T,this._needToShow=!0,this._showBranding=!1,this._customLogoSrc="",this._customLogoLink="",this._cubicBezier=new _.CubicBezier(.4,.01,.22,1),this._openAnimation=null,this._closeAnimation=null,this._powBy=null,this._custom=null,this._mainSeries=this._model.mainSeries(),this._visibleSpawn=i,this._showForPro=O,this._visibleSpawn.subscribe((()=>{this._model.updateSource(this)})),this._checkLayout(),this._layout!==M&&this._layout!==k||(this._left=8,this._bottom=5);const s=()=>{this._needToShow?this._showBranding=!0:this._showBranding=!1};this._resizeHandlerDelayed=(0,n.default)(s,200),s(),window.addEventListener("resize",this._resizeHandlerDelayed),this._monitorCanvas=(0,v.createDisconnectedBoundCanvas)(document,(0,r.size)({width:0,height:0})),this._monitorCanvas.subscribeSuggestedBitmapSizeChanged((()=>{this._init()})),this._model.isSnapshot()?this._init():(this._mainSeries.dataEvents().symbolResolved().subscribe(this,this._init),null!==this._mainSeries.symbolInfo()&&this._init()),this._renderer={draw:this.draw.bind(this),hitTest:this.hitTest.bind(this)}}destroy(){window.removeEventListener("resize",this._resizeHandlerDelayed),this._mainSeries.dataEvents().symbolResolved().unsubscribeAll(this),this._powBy&&this._powBy.destroy(),this._visibleSpawn.destroy()}paneViews(e){if(window.TradingView.printing)return[];if(!this._visibleSpawn.value())return[];if(this._layout===T&&!this._showForPro&&window.user&&window.user.is_pro)return[];const t=d.enabled("move_logo_to_main_pane");let i=!1;if(e.maximized().value())i=!0;else if(t)i=this._model.mainPane().collapsed().value()?e===this._model.panes().find((e=>!e.collapsed().value())):e.isMainPane();else if(this._model.lastPane().collapsed().value()){const t=this._model.panes();for(let s=t.length-1;s>=0;--s){const r=t[s];if(!r.collapsed().value()){i=r===e;break}}}else i=e.isLast();return i?[{renderer:this.renderer.bind(this)}]:[]}labelPaneViews(e){return[]}priceAxisViews(e,t){return[]}updateAllViews(){}updateViewsForPane(e){}priceScale(){return null}renderer(e,t){return this._paneHeight=e,this._canvasWidth=t,this._renderer}hasContextMenu(){return!1}onClickOutside(){this._hasAnimation()&&this._startCloseAnimation()}hitTest(e){return!this._showBranding||d.enabled("logo_without_link")?null:this._powBy&&this._layout!==A&&this._layout!==E&&(this._powBy.hitTest(e)||this._custom&&this._custom.hitTest(e))?new p.HitTestResult(p.HitTestResult.CUSTOM,{hideCrosshairLinesOnHover:!0,clickHandler:()=>{this._openLink()},tapHandler:()=>{this._hasAnimation()?this._toggleOpenAnimatedOrOpenLink():this._openLink()},mouseEnterHandler:()=>{this._hasAnimation()&&this._startOpenAnimation()},mouseLeaveHandler:()=>{this._hasAnimation()&&this._startCloseAnimation()}}):null}tvUrl(){let e=new URL("https://www.tradingview.com/");if(this._customLogoLink)return this._customLogoLink;if(this._layout===D||this._layout===B){let t;switch(!0){case d.enabled("charting_library"):t="library";break;case d.enabled("trading_terminal"):t="trading-terminal"} +return e.searchParams.append("utm_source",window.location.origin),e.searchParams.append("utm_medium","library"),t&&e.searchParams.append("utm_campaign",t),e.toString()}return e.toString()}draw(e,t){if(!this._showBranding)return;let i=0;N.utm=!0,(0,v.drawScaled)(e,t.pixelRatio,(()=>{this._powBy&&this._powBy.show&&(i=this._powBy.height,e.save(),e.translate(this._left,this._paneHeight-this._bottom-i),this._powBy.draw(e,t,this._canvasWidth),e.restore()),this._custom&&this._custom.show&&(e.save(),e.translate(this._left,this._paneHeight-this._bottom-i-this._custom.height),this._custom.draw(e,t),e.restore())}))}_init(){const e=this._mainSeries.symbolInfo();this._powBy&&this._powBy.destroy(),this._powBy=new Z(this._layout,(null==e?void 0:e.name)||"",this._model,(()=>this._model.fullUpdate())),this._custom=new J(this._layout,this._customLogoSrc,(()=>this._model.fullUpdate())),this._openAnimation=null,this._closeAnimation=null}_checkLayout(){if(d.enabled("widget"))0;else if(d.enabled("charting_library")||d.enabled("trading_terminal")){const e=JSON.parse(N.logo)||{};e.image?(this._customLogoSrc=e.image,this._customLogoLink=e.link,this._needToShow=d.enabled("widget_logo"),d.enabled("link_to_tradingview")?this._layout=B:this._layout=V):(this._layout=D,this._needToShow=d.enabled("widget_logo"))}else this._layout=T}_startOpenAnimation(){null===this._openAnimation&&(null!==this._closeAnimation&&(this._closeAnimation.stop(),this._closeAnimation=null),this._openAnimation=(0,g.doAnimate)({from:this._currentStateForAnimation(),to:this._openedStateForAnimation(),duration:200,easing:this._cubicBezier.easingFunc,onStep:this._animatedDrawStep.bind(this)}))}_startCloseAnimation(){null===this._closeAnimation&&(null!==this._openAnimation&&(this._openAnimation.stop(),this._openAnimation=null),this._closeAnimation=(0,g.doAnimate)({from:this._currentStateForAnimation(),to:this._closedStateForAnimation(),duration:200,easing:this._cubicBezier.easingFunc,onStep:this._animatedDrawStep.bind(this)}))}_currentStateForAnimation(){return(0,c.ensureNotNull)(this._powBy).width}_closedStateForAnimation(){return(0,c.ensureNotNull)(this._powBy).minimizedAnimationWidth()}_openedStateForAnimation(){return(0,c.ensureNotNull)(this._powBy).maximizedAnimationWidth()}_animatedDrawStep(e,t){(0,c.ensureNotNull)(this._powBy).animatedDrawStep(e,t),this._model.lightUpdate()}_hasAnimation(){return null!==this._powBy&&this._powBy.hasAnimation()}_openLink(){if(this._layout===T)return!1;d.enabled("widget");return(0,c.ensureNotNull)(window.open(this.tvUrl(),"_blank")).opener=null,!0}_toggleOpenAnimatedOrOpenLink(){null!==this._openAnimation&&this._openAnimation.completed()?this._openLink()||this._startCloseAnimation():this._startOpenAnimation()}}function U(e){return!P||e>480}function j(e){return!w||e>500}const G={customBrandingTradingViewText:l.colorsPalette["color-brand"],customBrandingText:l.colorsPalette["color-cold-gray-850"],background:l.colorsPalette["color-cold-gray-900"],shadow:(0,m.generateColor)(l.colorsPalette["color-white"],91),text:l.colorsPalette["color-white"], staticTextBackground:(0,m.generateColor)(l.colorsPalette["color-cold-gray-800"],20),logo:l.colorsPalette["color-white"]},q={customBrandingTradingViewText:l.colorsPalette["color-brand"],customBrandingText:l.colorsPalette["color-cold-gray-850"],background:l.colorsPalette["color-white"],shadow:(0,m.generateColor)(l.colorsPalette["color-black"],91),text:l.colorsPalette["color-cold-gray-900"],staticTextBackground:(0,m.generateColor)(l.colorsPalette["color-white"],20),logo:l.colorsPalette["color-cold-gray-900"]};const $={};function Y(e,t){const i=$[e];if(void 0!==i)return i.image||null;const s={};return $[e]=s,function(e){return new Promise((t=>{const i=S.replace(/fill="#[\da-f]{6}"/i,`fill="${e}"`),s=new Image;s.onload=()=>{s.onload=null,t(s)},s.src=URL.createObjectURL(new Blob([i],{type:"image/svg+xml"}))}))}(e).then((e=>{s.image=e,t()})),null}function K(e){const{a:t,d:i,e:s,f:r}=e;return new o.Point(s/t,r/i)}class X{constructor(){this._originPoint=null}hitTest(e){const t=this._getHitTestBox();if(t)return(0,a.pointInBox)(e,t)}_getHitTestBox(){const e=this._originPoint;if(e){const{x:t,y:i}=e;return(0,o.box)(e,new o.Point(t+this.width,i+this.height))}}}class Z extends X{constructor(e,t,i,s){super(),this.show=!0,this.borderRadius=0,this._needDisplayImage=!1,this._imageWidth=22,this._imageHeight=11,this._animatedWidth=32,this._font=`px ${y.CHART_FONT_FAMILY}`,this._txt="TradingView",this._textWidth=0,this._maximizedAnimationTextWidth=0,this._textWidthCache=new b.TextWidthCache,this._pixelRatio=1,this._model=i,this._layout=e,this._symbol=t,this._showAnimatedBranding=d.enabled("show_animated_logo")||this._layout===x,this._alwaysMaximized=d.enabled("logo_always_maximized")||O,this._fontSize=this._showAnimatedBranding||this._layout===I?11:14,this._showAnimatedBranding||this._layout!==M&&this._layout!==k||(this._fontSize=12),this.width=32,this.height=this._fontSize+2,this._requestRepaint=s,this._init(),this._checkFontLoaded(),this._recalculateMetrics()}destroy(){this._model.properties().childs().paneProperties.childs().background.unsubscribeAll(this),this._model.onChartThemeLoaded().unsubscribeAll(this)}hasAnimation(){return this._showAnimatedBranding&&!this._alwaysMaximized}minimizedAnimationWidth(){return 32}maximizedAnimationWidth(){return this._maximizedAnimationTextWidth+32-3}animatedDrawStep(e,t){this._animatedWidth=t}draw(e,t,i){t.pixelRatio!==this._pixelRatio&&(this._textWidthCache.reset(),this._pixelRatio=t.pixelRatio);const s=this._colors;if(this._showAnimatedBranding)this._needDisplayImage&&null!==this._getLogoImage(s.logo)&&(e.save(),e.translate(-Math.ceil((32-this._imageWidth)/2),Math.floor((32-this._imageHeight)/2)),this._originPoint=K(e.getTransform()),this.borderRadius=16,this._drawFillRectWithRoundedCorner(e,-.5,0,this._animatedWidth,32,this.borderRadius),this._drawLogoImage(e,Math.round((32-this._imageWidth)/2),Math.round((32-this._imageHeight)/2)+0),this._animatedWidth>32&&(e.translate(Math.round(32),Math.round(this._fontSize*H(this._font))),this._drawFillTextCropWidth(e,this._animatedWidth-32)),e.restore(), -this.width=this._animatedWidth);else if(this._layout===M||this._layout===k){e.font=this._fontSize+this._font;const t=e.measureText(this._txt).width+2;this.width=t+e.measureText("TradingView").width+2,this._originPoint=K(e.getTransform()),e.save(),e.globalAlpha=.7,e.fillStyle=this._colors.customBrandingText,e.fillText(this._txt,0,12),e.fillStyle=this._colors.customBrandingTradingViewText,e.fillText("TradingView",t,12),e.restore()}else if(U(i)&&this._layout===I){if(this._getLogoImage(s.logo)){e.save(),e.translate(-Math.ceil((32-this._imageWidth)/2),Math.floor((32-this._imageHeight)/2)),this.borderRadius=16,this.width=32;const t=j(i);t&&(this.width+=this._maximizedAnimationTextWidth+4),this._drawFillRectWithRoundedCorner(e,-.5,0,this.width,32,this.borderRadius),this._drawLogoImage(e,Math.round((32-this._imageWidth)/2)+4,Math.round((32-this._imageHeight)/2)+0),t&&(e.translate(35,Math.round(this._fontSize*H(this._font))),this._drawTextFill(e)),e.restore()}}else if(U(i))if(this._needDisplayImage&&null!==this._getLogoImage(s.logo)){e.save(),e.translate(-Math.ceil((32-this._imageWidth)/2),Math.floor((32-this._imageHeight)/2)),this._originPoint=K(e.getTransform()),this.borderRadius=16,this._drawBgCircle(e),e.drawImage((0,c.ensureNotNull)(this._getLogoImage(s.logo)),Math.round((32-this._imageWidth)/2),Math.round((32-this._imageHeight)/2)+0);const t=j(i);t&&(e.translate(37,Math.round(this._fontSize*H(this._font))),this._drawTextStroke(e),this._drawTextFill(e)),e.restore(),this.width=32,t&&(this.width+=this._maximizedAnimationTextWidth)}else{const t=j(i);t&&(e.save(),e.translate(R?-.5:0,-.5),this._drawTextStroke(e),this._drawTextFill(e),e.restore()),t&&(this.width=this._maximizedAnimationTextWidth)}else this.width=0}_init(){this._checkLayout(),this.show&&(this.height=this._needDisplayImage?32:this._fontSize+2,this._updateColors(),this._model.properties().childs().paneProperties.childs().background.subscribe(this,this._updateColors),this._model.onChartThemeLoaded().subscribe(this,this._updateColors))}_checkFontLoaded(){if(document.fonts&&document.fonts.check&&document.fonts.load){document.fonts.check(`${this._fontSize}px EuclidCircular`)?this._font="px EuclidCircular":document.fonts.load(`${this._fontSize}px EuclidCircular`,this._txt).then((()=>{this._font="px EuclidCircular",this._recalculateMetrics(),this._requestRepaint()}))}}_recalculateMetrics(){const e=(0,v.createDisconnectedBoundCanvas)(document,(0,r.size)({width:0,height:0})),t=(0,v.getPretransformedContext2D)(e,!0);t.font=this._fontSize+this._font,this._textWidth=Math.ceil(t.measureText(this._txt).width)+2;let i=this._textWidth+8;i%2==0&&(i+=1),this._maximizedAnimationTextWidth=i,this._textWidthCache.reset(),this._alwaysMaximized&&(this._animatedWidth=this.maximizedAnimationWidth())}_updateColors(){this._colors=this._model.isDark()?G:q}_getLogoImage(e){return Y(e,this._requestRepaint)}_checkLayout(){switch(this._layout){case x:case I:case M:case L:case k:case V:case D:case T:this.show=!0;break;case A:case E:case B:this.show=!1}switch(this._layout){case D: -this._needDisplayImage=!0,this._txt=F;break;case V:this._txt=W}}_drawTextStroke(e){e.save(),e.textBaseline="middle",e.textAlign="start",e.font=this._fontSize+this._font,e.strokeStyle=this._colors.staticTextBackground,e.lineWidth=4,e.lineJoin="round",e.strokeText(this._txt,0,16+this._textWidthCache.yMidCorrection(e,this._txt)),e.restore()}_drawTextFill(e){e.save(),e.textBaseline="middle",e.textAlign="start",e.font=this._fontSize+this._font,e.fillStyle=this._colors.text,e.fillText(this._txt,0,16+this._textWidthCache.yMidCorrection(e,this._txt)),e.restore()}_drawFillTextCropWidth(e,t){e.save(),e.beginPath(),e.rect(0,0,t,this.height),e.clip(),this._drawTextFill(e),e.restore()}_drawBgCircle(e){const t=this.borderRadius,i=2*Math.PI;e.save(),e.beginPath(),e.fillStyle=this._colors.shadow,e.arc(t,t,t+1,0,i),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.fillStyle=this._colors.background,e.arc(t,t,t,0,i,!1),e.fill(),e.closePath(),e.restore()}_drawFillRectWithRoundedCorner(e,t,i,s,r,n){e.save(),(0,f.drawRoundRect)(e,t-1,i-1,s+2,r+2,n),e.fillStyle=this._colors.shadow,e.fill(),e.closePath(),e.restore(),e.save(),(0,f.drawRoundRect)(e,t,i,s,r,n),e.fillStyle=this._colors.background,e.fill(),e.closePath(),e.restore()}_drawLogoImage(e,t,i){e.drawImage((0,c.ensureNotNull)(this._getLogoImage(this._colors.logo)),t,i)}}class J extends X{constructor(e,t,i){super(),this.show=!1,this.width=0,this.height=0,this._ready=!1,this._layout=e,this._src=t,this._onReadyCallback=i,this._checkLayout();const s=new Image;this._img=s,this.show&&(s.addEventListener("load",(()=>{this.width=Math.round(s.width),this.height=Math.round(s.height),this._ready=!0,this._onReadyCallback&&this._onReadyCallback()})),s.crossOrigin="anonymous",s.src=this._src)}draw(e,t){this._ready&&(e.drawImage(this._img,-.5,-.5,this.width,this.height),this._originPoint=K(e.getTransform()))}_checkLayout(){switch(this._layout){case M:case A:case k:case E:case V:case B:this.show=!0;break;case T:case x:case I:case L:case D:this.show=!1}}}function Q(e){e.addCustomSource("branding",((t,i)=>{const r=(0,s.combine)(((e,t)=>{const s=null!=e?e:t;return null!==s&&s.hasModel()&&s.model().model()===i}),e.maximizedChartWidget(),e.leftBottomChartWidget());return new z(t,i,r)}))}},83499:(e,t,i)=>{"use strict";i.d(t,{getCanvasDevicePixelRatio:()=>a,getBindingPixelRatio:()=>l,getContext2D:()=>c,getPrescaledContext2D:()=>h,getPretransformedContext2D:()=>d,fillRect:()=>u,clearRect:()=>p,drawScaled:()=>_,createDisconnectedCanvas:()=>m,createDisconnectedBoundCanvas:()=>g,createBoundCanvas:()=>v,calcTextHorizontalShift:()=>S,disableSelection:()=>y,addExclusionArea:()=>b,measureText:()=>C});var s=i(27714),r=i(50151),n=i(80142),o=i(49483);function a(e){var t,i;return Math.max(1,(null===(i=null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView)||void 0===i?void 0:i.devicePixelRatio)||1)}function l(e){return a(e.canvasElement)}function c(e){const t=(0,r.ensureNotNull)(e.getContext("2d"));return t.setTransform(1,0,0,1,0,0),t}function h(e){const t=(0,r.ensureNotNull)(e.getContext("2d")),i=a(e) -;return t.setTransform(i,0,0,i,0,0),t}function d(e,t){const i=(0,r.ensureNotNull)(e.canvasElement.getContext("2d")),s=l(e);return i.setTransform(s,0,0,s,0,0),t||i.translate(.5,.5),i}function u(e,t,i,s,r,n){e.save(),e.translate(-.5,-.5),e.fillStyle=n,e.fillRect(t,i,s,r),e.restore()}function p(e,t,i,s,r,n){e.save(),e.translate(-.5,-.5),e.globalCompositeOperation="copy",e.fillStyle=n,e.fillRect(t,i,s,r),e.restore()}function _(e,t,i){e.save(),e.scale(t,t),i(),e.restore()}function m(e,t,i){const s=f(e);return void 0===i&&(i=a(s)),s.width=t.width*i,s.height=t.height*i,s}function g(e,t){const i=f(e),r=(0,s.bindCanvasElementBitmapSizeTo)(i,{type:"device-pixel-content-box",transform:(e,t)=>({width:Math.max(e.width,t.width),height:Math.max(e.height,t.height)})});return r.resizeCanvasElement(t),r}function f(e){const t=e.createElement("canvas");return y(t),t}function v(e,t){const i=f((0,r.ensureNotNull)(e.ownerDocument));e.appendChild(i);const n=(0,s.bindCanvasElementBitmapSizeTo)(i,{type:"device-pixel-content-box",transform:(e,t)=>({width:Math.max(e.width,t.width),height:Math.max(e.height,t.height)})});return n.resizeCanvasElement(t),n}function S(e,t){return"center"===e.textAlign?0:(0,n.isRtl)()?"start"===e.textAlign||"right"===e.textAlign?t:0:"start"===e.textAlign||"left"===e.textAlign?0:t}function y(e){e.style.userSelect="none",e.style.webkitUserSelect="none",e.style.msUserSelect="none",e.style.MozUserSelect="none",e.style.webkitTapHighlightColor="transparent"}function b(e,t,i){e.beginPath(),e.rect(0,0,t.physicalWidth,t.physicalHeight);for(let s=0;s{"use strict";i.d(t,{changedAll:()=>n,ChartChangesWatcher:()=>o});var s=i(26867),r=i.n(s);const n=3;class o{constructor(e,t,i){this._undoHistoryHasChanges=!1,this._changesMask=0,this._recursiveLoopingGuard=!1,this._handleMetainfoChanged=()=>{this._changesMask=1|this._changesMask},this._recalculateHaveChanges=(e,t)=>{if(!this._recursiveLoopingGuard)try{this._recursiveLoopingGuard=!0;const e=this._undoHistoryHasChanges?1:0;let i=this._lineToolsHaveChanges.value()?2:0;const s=this._changesMask;this._changesMask=e|i,s!==this._changesMask&&(this._changesMask&&(this._chartWidgetCollection.getAll().forEach((e=>{var i;null===(i=e.lineToolsSynchronizer())||void 0===i||i.markAsValidatedBecuaseOfSavingToContent(!!t)})),i=this._lineToolsHaveChanges.value()?2:0,this._changesMask=e|i),this._onValueChanged.fire(0!==this._changesMask))}finally{this._recursiveLoopingGuard=!1}},this._chartWidgetCollection=e,this._undoHistory=e.undoHistory,this._lineToolsHaveChanges=e.lineToolsSynchronizerHasChanges,this._chartSaver=t,this._globalEvents=i,this._onValueChanged=new(r()), +this.width=this._animatedWidth);else if(this._layout===M||this._layout===k){e.font=this._fontSize+this._font;const t=e.measureText(this._txt).width+2;this.width=t+e.measureText("TradingView").width+2,this._originPoint=K(e.getTransform()),e.save(),e.globalAlpha=.7,e.fillStyle=this._colors.customBrandingText,e.fillText(this._txt,0,12),e.fillStyle=this._colors.customBrandingTradingViewText,e.fillText("TradingView",t,12),e.restore()}else if(U(i)&&this._layout===I){if(this._getLogoImage(s.logo)){e.save(),e.translate(-Math.ceil((32-this._imageWidth)/2),Math.floor((32-this._imageHeight)/2)),this.borderRadius=16,this.width=32;const t=j(i);t&&(this.width+=this._maximizedAnimationTextWidth+4),this._drawFillRectWithRoundedCorner(e,-.5,0,this.width,32,this.borderRadius),this._drawLogoImage(e,Math.round((32-this._imageWidth)/2)+4,Math.round((32-this._imageHeight)/2)+0),t&&(e.translate(35,Math.round(this._fontSize*H(this._font))),this._drawTextFill(e)),e.restore()}}else if(U(i))if(this._needDisplayImage&&null!==this._getLogoImage(s.logo)){e.save(),e.translate(-Math.ceil((32-this._imageWidth)/2),Math.floor((32-this._imageHeight)/2)),this._originPoint=K(e.getTransform()),this.borderRadius=16,this._drawBgCircle(e),e.drawImage((0,c.ensureNotNull)(this._getLogoImage(s.logo)),Math.round((32-this._imageWidth)/2),Math.round((32-this._imageHeight)/2)+0);const t=j(i);t&&(e.translate(37,Math.round(this._fontSize*H(this._font))),this._drawTextStroke(e),this._drawTextFill(e)),e.restore(),this.width=32,t&&(this.width+=this._maximizedAnimationTextWidth)}else{const t=j(i);t&&(e.save(),e.translate(R?-.5:0,-.5),this._drawTextStroke(e),this._drawTextFill(e),e.restore()),t&&(this.width=this._maximizedAnimationTextWidth)}else this.width=0}_init(){this._checkLayout(),this.show&&(this.height=this._needDisplayImage?32:this._fontSize+2,this._updateColors(),this._model.properties().childs().paneProperties.childs().background.subscribe(this,this._updateColors),this._model.onChartThemeLoaded().subscribe(this,this._updateColors))}_checkFontLoaded(){if(document.fonts&&document.fonts.check&&document.fonts.load){document.fonts.check(`${this._fontSize}px EuclidCircular`)?this._font="px EuclidCircular":document.fonts.load(`${this._fontSize}px EuclidCircular`,this._txt).then((()=>{this._font="px EuclidCircular",this._recalculateMetrics(),this._requestRepaint()}))}}_recalculateMetrics(){const e=(0,v.createDisconnectedBoundCanvas)(document,(0,r.size)({width:0,height:0})),t=(0,v.getPretransformedContext2D)(e,!0);t.font=this._fontSize+this._font,this._textWidth=Math.ceil(t.measureText(this._txt).width)+2;let i=this._textWidth+8;i%2==0&&(i+=1),this._maximizedAnimationTextWidth=i,this._textWidthCache.reset(),this._alwaysMaximized&&(this._animatedWidth=this.maximizedAnimationWidth())}_updateColors(){this._colors=this._model.isDark()?G:q}_getLogoImage(e){return Y(e,this._requestRepaint)}_checkLayout(){switch(this._layout){case x:case I:case M:case L:case k:case B:case D:case T:this.show=!0;break;case A:case E:case V:this.show=!1}switch(this._layout){case D: +this._needDisplayImage=!0,this._txt=F;break;case B:this._txt=W}}_drawTextStroke(e){e.save(),e.textBaseline="middle",e.textAlign="start",e.font=this._fontSize+this._font,e.strokeStyle=this._colors.staticTextBackground,e.lineWidth=4,e.lineJoin="round",e.strokeText(this._txt,0,16+this._textWidthCache.yMidCorrection(e,this._txt)),e.restore()}_drawTextFill(e){e.save(),e.textBaseline="middle",e.textAlign="start",e.font=this._fontSize+this._font,e.fillStyle=this._colors.text,e.fillText(this._txt,0,16+this._textWidthCache.yMidCorrection(e,this._txt)),e.restore()}_drawFillTextCropWidth(e,t){e.save(),e.beginPath(),e.rect(0,0,t,this.height),e.clip(),this._drawTextFill(e),e.restore()}_drawBgCircle(e){const t=this.borderRadius,i=2*Math.PI;e.save(),e.beginPath(),e.fillStyle=this._colors.shadow,e.arc(t,t,t+1,0,i),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.fillStyle=this._colors.background,e.arc(t,t,t,0,i,!1),e.fill(),e.closePath(),e.restore()}_drawFillRectWithRoundedCorner(e,t,i,s,r,n){e.save(),(0,f.drawRoundRect)(e,t-1,i-1,s+2,r+2,n),e.fillStyle=this._colors.shadow,e.fill(),e.closePath(),e.restore(),e.save(),(0,f.drawRoundRect)(e,t,i,s,r,n),e.fillStyle=this._colors.background,e.fill(),e.closePath(),e.restore()}_drawLogoImage(e,t,i){e.drawImage((0,c.ensureNotNull)(this._getLogoImage(this._colors.logo)),t,i)}}class J extends X{constructor(e,t,i){super(),this.show=!1,this.width=0,this.height=0,this._ready=!1,this._layout=e,this._src=t,this._onReadyCallback=i,this._checkLayout();const s=new Image;this._img=s,this.show&&(s.addEventListener("load",(()=>{this.width=Math.round(s.width),this.height=Math.round(s.height),this._ready=!0,this._onReadyCallback&&this._onReadyCallback()})),s.crossOrigin="anonymous",s.src=this._src)}draw(e,t){this._ready&&(e.drawImage(this._img,-.5,-.5,this.width,this.height),this._originPoint=K(e.getTransform()))}_checkLayout(){switch(this._layout){case M:case A:case k:case E:case B:case V:this.show=!0;break;case T:case x:case I:case L:case D:this.show=!1}}}function Q(e){e.addCustomSource("branding",((t,i)=>{const r=(0,s.combine)(((e,t)=>{const s=null!=e?e:t;return null!==s&&s.hasModel()&&s.model().model()===i}),e.maximizedChartWidget(),e.leftBottomChartWidget());return new z(t,i,r)}))}},83499:(e,t,i)=>{"use strict";i.d(t,{getCanvasDevicePixelRatio:()=>a,getBindingPixelRatio:()=>l,getContext2D:()=>c,getPrescaledContext2D:()=>h,getPretransformedContext2D:()=>d,fillRect:()=>u,clearRect:()=>p,drawScaled:()=>_,createDisconnectedCanvas:()=>m,createDisconnectedBoundCanvas:()=>g,createBoundCanvas:()=>v,calcTextHorizontalShift:()=>S,disableSelection:()=>y,addExclusionArea:()=>b,measureText:()=>P});var s=i(27714),r=i(50151),n=i(80142),o=i(49483);function a(e){var t,i;return Math.max(1,(null===(i=null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView)||void 0===i?void 0:i.devicePixelRatio)||1)}function l(e){return a(e.canvasElement)}function c(e){const t=(0,r.ensureNotNull)(e.getContext("2d"));return t.setTransform(1,0,0,1,0,0),t}function h(e){const t=(0,r.ensureNotNull)(e.getContext("2d")),i=a(e) +;return t.setTransform(i,0,0,i,0,0),t}function d(e,t){const i=(0,r.ensureNotNull)(e.canvasElement.getContext("2d")),s=l(e);return i.setTransform(s,0,0,s,0,0),t||i.translate(.5,.5),i}function u(e,t,i,s,r,n){e.save(),e.translate(-.5,-.5),e.fillStyle=n,e.fillRect(t,i,s,r),e.restore()}function p(e,t,i,s,r,n){e.save(),e.translate(-.5,-.5),e.globalCompositeOperation="copy",e.fillStyle=n,e.fillRect(t,i,s,r),e.restore()}function _(e,t,i){e.save(),e.scale(t,t),i(),e.restore()}function m(e,t,i){const s=f(e);return void 0===i&&(i=a(s)),s.width=t.width*i,s.height=t.height*i,s}function g(e,t){const i=f(e),r=(0,s.bindCanvasElementBitmapSizeTo)(i,{type:"device-pixel-content-box",transform:(e,t)=>({width:Math.max(e.width,t.width),height:Math.max(e.height,t.height)})});return r.resizeCanvasElement(t),r}function f(e){const t=e.createElement("canvas");return y(t),t}function v(e,t){const i=f((0,r.ensureNotNull)(e.ownerDocument));e.appendChild(i);const n=(0,s.bindCanvasElementBitmapSizeTo)(i,{type:"device-pixel-content-box",transform:(e,t)=>({width:Math.max(e.width,t.width),height:Math.max(e.height,t.height)})});return n.resizeCanvasElement(t),n}function S(e,t){return"center"===e.textAlign?0:(0,n.isRtl)()?"start"===e.textAlign||"right"===e.textAlign?t:0:"start"===e.textAlign||"left"===e.textAlign?0:t}function y(e){e.style.userSelect="none",e.style.webkitUserSelect="none",e.style.msUserSelect="none",e.style.MozUserSelect="none",e.style.webkitTapHighlightColor="transparent"}function b(e,t,i){e.beginPath(),e.rect(0,0,t.physicalWidth,t.physicalHeight);for(let s=0;s{"use strict";i.d(t,{changedAll:()=>n,ChartChangesWatcher:()=>o});var s=i(26867),r=i.n(s);const n=3;class o{constructor(e,t,i){this._undoHistoryHasChanges=!1,this._changesMask=0,this._recursiveLoopingGuard=!1,this._handleMetainfoChanged=()=>{this._changesMask=1|this._changesMask},this._recalculateHaveChanges=(e,t)=>{if(!this._recursiveLoopingGuard)try{this._recursiveLoopingGuard=!0;const e=this._undoHistoryHasChanges?1:0;let i=this._lineToolsHaveChanges.value()?2:0;const s=this._changesMask;this._changesMask=e|i,s!==this._changesMask&&(this._changesMask&&(this._chartWidgetCollection.getAll().forEach((e=>{var i;null===(i=e.lineToolsSynchronizer())||void 0===i||i.markAsValidatedBecuaseOfSavingToContent(!!t)})),i=this._lineToolsHaveChanges.value()?2:0,this._changesMask=e|i),this._onValueChanged.fire(0!==this._changesMask))}finally{this._recursiveLoopingGuard=!1}},this._chartWidgetCollection=e,this._undoHistory=e.undoHistory,this._lineToolsHaveChanges=e.lineToolsSynchronizerHasChanges,this._chartSaver=t,this._globalEvents=i,this._onValueChanged=new(r()), this._subscribe()}destroy(){this._unsubscribe(),this._onValueChanged.destroy()}changes(){return this._changesMask}hasChanges(){return this._changesMask>0}getOnChange(){return this._onValueChanged}_subscribe(){this._globalEvents.subscribe("chart_loaded",this._handleChartLoaded,this),this._undoHistory.undoStack().onChange().subscribe(this,this._handleUndoHistoryChange),this._chartSaver.chartSaved().subscribe(this,this._handleChartSaved),this._lineToolsHaveChanges.subscribe(this._recalculateHaveChanges);this._chartWidgetCollection.metaInfo.name.subscribe(this._handleMetainfoChanged)}_unsubscribe(){this._globalEvents.unsubscribe("chart_loaded",this._handleChartLoaded,this),this._undoHistory.undoStack().onChange().unsubscribe(this,this._handleUndoHistoryChange),this._chartSaver.chartSaved().unsubscribe(this,this._handleChartSaved),this._lineToolsHaveChanges.unsubscribe(this._recalculateHaveChanges);this._chartWidgetCollection.metaInfo.name.unsubscribe(this._handleMetainfoChanged)}_setUndoHistoryHasChanges(e,t){this._undoHistoryHasChanges=e,this._recalculateHaveChanges(e,t)}_handleChartLoaded(){this._setUndoHistoryHasChanges(!1)}_handleUndoHistoryChange(e){e&&!e.customFlag("doesnt_affect_save")&&this._setUndoHistoryHasChanges(!0)}_handleChartSaved(e){e&&this._setUndoHistoryHasChanges(!1,!0)}}},73552:(e,t,i)=>{"use strict";i.d(t,{shiftPressed:()=>g,modifierPressed:()=>f,globalEnvironmentState:()=>v,ChartHotkeysListener:()=>S});var s,r,n,o=i(66141),a=i(68335),l=i(35749),c=i(40549),h=i.n(c),d=i(55611);const u=new(h())(Boolean((null!==(s=o.pressedKeys.value())&&void 0!==s?s:0)&a.Modifiers.Shift)),p=new(h())(Boolean((null!==(r=o.pressedKeys.value())&&void 0!==r?r:0)&a.Modifiers.Mod)),_=new(h())(Boolean((null!==(n=o.pressedKeys.value())&&void 0!==n?n:0)&a.Modifiers.Alt)),m=[a.Modifiers.None,a.Modifiers.Alt,a.Modifiers.Mod,a.Modifiers.Alt+a.Modifiers.Shift];function g(){return u}function f(){return p}function v(){return new d.EnvironmentState({altKey:_.value(),ctrlKey:f().value(),metaKey:f().value(),shiftKey:g().value()})}o.pressedKeys.subscribe(((e=0)=>{u.setValue(Boolean(e&a.Modifiers.Shift)),p.setValue(Boolean(e&a.Modifiers.Mod)),_.setValue(Boolean(e&a.Modifiers.Alt))}));class S{constructor(e,t){this._pressedKeyCode=null,this._boundKeydownHandler=null,this._boundKeyupHandler=null,this._chartWidget=e,this._parent=t,this._boundKeydownHandler=this._keydownHandler.bind(this),this._boundKeyupHandler=this._keyupHandler.bind(this),this._parent.ownerDocument.addEventListener("keydown",this._boundKeydownHandler),this._parent.ownerDocument.addEventListener("keyup",this._boundKeyupHandler)}destroy(){null!==this._boundKeydownHandler&&(this._parent.ownerDocument.removeEventListener("keydown",this._boundKeydownHandler),this._boundKeydownHandler=null),null!==this._boundKeyupHandler&&(this._parent.ownerDocument.removeEventListener("keyup",this._boundKeyupHandler),this._boundKeyupHandler=null)}_keydownHandler(e){ this._chartWidget.hasModel()&&window.document.activeElement===window.document.body&&this._chartWidget.isActive()&&(this._handleMoveDrawingsKeyDown(e)||this._handleScrollKeyDown(e)||this._handleZoomKeyDown(e))&&e.preventDefault()}_keyupHandler(e){this._chartWidget.hasModel()&&this._handleScrollKeyUp(e)}_handleMoveDrawingsKeyDown(e){const t=255&(0,a.hashFromEvent)(e),i=this._chartWidget.model();switch(t){case 37:return i.moveSelectedToolsLeft();case 39:return i.moveSelectedToolsRight();case 38:return i.moveSelectedToolsUp();case 40:return i.moveSelectedToolsDown()}return!1}_handleScrollKeyDown(e){if(null!==this._pressedKeyCode)return!1;const t=(0,a.hashFromEvent)(e),i=255&t,s=(0,a.modifiersFromEvent)(e);let r;if(37===i)r=1;else{if(39!==i)return!1;r=-1}return!(a.isMacKeyboard&&s===a.Modifiers.Mod||!m.includes(s))&&(!(0,l.isNativeUIInteraction)(t,e.target)&&(this._pressedKeyCode=i,s===a.Modifiers.None?this._chartWidget.scrollHelper().moveByBar(r):s===a.Modifiers.Alt||s===a.Modifiers.Mod?this._chartWidget.scrollHelper().move(r):-1===r?this._chartWidget.model().timeScale().scrollToRealtime(!0):this._chartWidget.model().timeScale().scrollToFirstBar(),!0))}_handleScrollKeyUp(e){if(null===this._pressedKeyCode)return!1;const t=(0,a.hashFromEvent)(e);if((0,l.isNativeUIInteraction)(t,e.target))return!1;return(255&t)===this._pressedKeyCode&&(this._pressedKeyCode=null,this._chartWidget.scrollHelper().stopMove(),!0)}_handleZoomKeyDown(e){const t=(0,a.hashFromEvent)(e),i=255&t;if((0,a.modifiersFromEvent)(e)!==a.Modifiers.Mod||(0,l.isNativeUIInteraction)(t,e.target))return!1;const s=this._chartWidget.model();if(38===i)s.zoomIn();else{if(40!==i)return!1;s.zoomOut()}return!0}}},66979:(e,t,i)=>{"use strict";i.d(t,{ChartWidgetApiBase:()=>M});var s=i(50151),r=i(44352),n=i(47539),o=i(578),a=i(1140),l=i(69228),c=i(23150);class h{constructor(e){this._timeScale=e}coordinateToTime(e){const t=this._timeScale.coordinateToIndex(e);return this._timeScale.indexToTimePoint(t)}barSpacingChanged(){return this._timeScale.barSpacingChanged()}rightOffsetChanged(){return this._timeScale.rightOffsetChanged()}setRightOffset(e){this._timeScale.setRightOffset(e)}setBarSpacing(e){this._timeScale.setBarSpacing(e)}barSpacing(){return this._timeScale.barSpacing()}rightOffset(){return this._timeScale.rightOffset()}width(){return this._timeScale.width()}defaultRightOffset(){return this._timeScale.defaultRightOffset().spawn()}defaultRightOffsetPercentage(){return this._timeScale.defaultRightOffsetPercentage().spawn()}usePercentageRightOffset(){return this._timeScale.usePercentageRightOffset().spawn()}isEmpty(){return this._timeScale.isEmpty()}}var d=i(26867),u=i.n(d),p=i(20364);const _=new n.TranslatedString("change timezone",r.t(null,void 0,i(20505)));class m{constructor(e){this._onTimezoneChanged=new(u()),this._chartWidget=e,this._timezoneProperty=e.properties().childs().timezone,this._timezoneProperty.subscribe(this,(e=>{this._onTimezoneChanged.fire(e.value())})),e.onAboutToBeDestroyed().subscribe(this,(()=>{this._timezoneProperty.unsubscribeAll(this)}),!0)} -availableTimezones(){return p.availableTimezones}getTimezone(){const e=this._timezoneProperty.value();return(0,s.ensureDefined)(this.availableTimezones().find((t=>t.id===e)))}setTimezone(e,t){(0,s.assert)((0,p.timezoneIsAvailable)(e),`Incorrect timezone: ${e}`),(null==t?void 0:t.disableUndo)?this._timezoneProperty.setValue(e):this._chartWidget.model().setProperty(this._timezoneProperty,e,_)}onTimezoneChanged(){return this._onTimezoneChanged}}var g=i(45973),f=i(5440),v=i(30684);function S(e,t){const i=()=>{e.completed().unsubscribe(null,s),t(!1)},s=()=>{e.error().unsubscribe(null,i),t(!0)};e.completed().subscribe(null,i,!0),e.error().subscribe(null,s,!0)}var y=i(25071),b=i(58403),w=i(76076),C=i(37121),P=i(82503);const T=new n.TranslatedString("change price to bar ratio",r.t(null,void 0,i(69510))),x=new n.TranslatedString("toggle lock scale",r.t(null,void 0,i(21203))),I=new n.TranslatedString("change series style",r.t(null,void 0,i(53438)));class M{constructor(e,t){this._visibleBarsChanged=new(u()),this._crosshairMoved=new(u()),this._ranges=null,this._chartWidget=e,this._activateChart=t,this._timezoneApi=new m(e),this._chartWidget.withModel(this,(()=>{this._chartWidget.model().crossHairSource().moved().subscribe(this,this._onCrosshairMoved)}))}getPriceToBarRatio(){return this._chartWidget.model().model().mainSeriesScaleRatioProperty().value()}setPriceToBarRatio(e,t){const i=this._chartWidget.model(),s=i.model(),r=s.mainSeriesScaleRatioProperty();(null==t?void 0:t.disableUndo)?new v.SetScaleRatioPropertiesCommand(r,e,null,s).redo():i.setScaleRatioProperty(r,e,T)}isPriceToBarRatioLocked(){return this._chartWidget.model().model().mainSeries().priceScale().isLockScale()}setPriceToBarRatioLocked(e,t){const i=this._chartWidget.model(),s=i.model(),r=s.mainSeries().priceScale();(null==t?void 0:t.disableUndo)?new f.SetPriceScaleModeCommand({lockScale:e},r,null,s).redo():i.setPriceScaleMode({lockScale:e},r,x)}onDataLoaded(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().dataEvents().completed())}onSymbolChanged(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().dataEvents().symbolResolved())}onIntervalChanged(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().onIntervalChanged())}onVisibleRangeChanged(){return this._makeSubscriptionFromDelegate(this._visibleBarsChanged)}onChartTypeChanged(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().onStyleChanged())}onSeriesTimeframe(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().dataEvents().seriesTimeFrame())}whenChartReady(e){this._chartWidget.withModel(this,e)}crossHairMoved(){return this._makeSubscriptionFromDelegate(this._crosshairMoved)}setSymbol(e,t){if(e===this.symbol())return void(null==t||t());const i=e=>{!e&&t&&t()},s=this._chartWidget.model().mainSeries().dataEvents();t&&S(s,i),this._activateChart(),this._chartWidget.setSymbol(e)}setResolution(e,t){let i=o.Interval.normalize(e) +availableTimezones(){return p.availableTimezones}getTimezone(){const e=this._timezoneProperty.value();return(0,s.ensureDefined)(this.availableTimezones().find((t=>t.id===e)))}setTimezone(e,t){(0,s.assert)((0,p.timezoneIsAvailable)(e),`Incorrect timezone: ${e}`),(null==t?void 0:t.disableUndo)?this._timezoneProperty.setValue(e):this._chartWidget.model().setProperty(this._timezoneProperty,e,_)}onTimezoneChanged(){return this._onTimezoneChanged}}var g=i(45973),f=i(5440),v=i(30684);function S(e,t){const i=()=>{e.completed().unsubscribe(null,s),t(!1)},s=()=>{e.error().unsubscribe(null,i),t(!0)};e.completed().subscribe(null,i,!0),e.error().subscribe(null,s,!0)}var y=i(25071),b=i(58403),w=i(76076),P=i(37121),C=i(82503);const T=new n.TranslatedString("change price to bar ratio",r.t(null,void 0,i(69510))),x=new n.TranslatedString("toggle lock scale",r.t(null,void 0,i(21203))),I=new n.TranslatedString("change series style",r.t(null,void 0,i(53438)));class M{constructor(e,t){this._visibleBarsChanged=new(u()),this._crosshairMoved=new(u()),this._ranges=null,this._chartWidget=e,this._activateChart=t,this._timezoneApi=new m(e),this._chartWidget.withModel(this,(()=>{this._chartWidget.model().crossHairSource().moved().subscribe(this,this._onCrosshairMoved)}))}getPriceToBarRatio(){return this._chartWidget.model().model().mainSeriesScaleRatioProperty().value()}setPriceToBarRatio(e,t){const i=this._chartWidget.model(),s=i.model(),r=s.mainSeriesScaleRatioProperty();(null==t?void 0:t.disableUndo)?new v.SetScaleRatioPropertiesCommand(r,e,null,s).redo():i.setScaleRatioProperty(r,e,T)}isPriceToBarRatioLocked(){return this._chartWidget.model().model().mainSeries().priceScale().isLockScale()}setPriceToBarRatioLocked(e,t){const i=this._chartWidget.model(),s=i.model(),r=s.mainSeries().priceScale();(null==t?void 0:t.disableUndo)?new f.SetPriceScaleModeCommand({lockScale:e},r,null,s).redo():i.setPriceScaleMode({lockScale:e},r,x)}onDataLoaded(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().dataEvents().completed())}onSymbolChanged(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().dataEvents().symbolResolved())}onIntervalChanged(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().onIntervalChanged())}onVisibleRangeChanged(){return this._makeSubscriptionFromDelegate(this._visibleBarsChanged)}onChartTypeChanged(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().onStyleChanged())}onSeriesTimeframe(){return this._makeSubscriptionFromDelegate(this._chartWidget.model().mainSeries().dataEvents().seriesTimeFrame())}whenChartReady(e){this._chartWidget.withModel(this,e)}crossHairMoved(){return this._makeSubscriptionFromDelegate(this._crosshairMoved)}setSymbol(e,t){if(e===this.symbol())return void(null==t||t());const i=e=>{!e&&t&&t()},s=this._chartWidget.model().mainSeries().dataEvents();t&&S(s,i),this._activateChart(),this._chartWidget.setSymbol(e)}setResolution(e,t){let i=o.Interval.normalize(e) ;if(null!==i&&(i=this._chartWidget.model().mainSeries().getSupportedResolution(i)),null===i||i===this.resolution())return void(null==t||t());const s=e=>{!e&&t&&t()},r=this._chartWidget.model().mainSeries().dataEvents();t&&S(r,s),this._activateChart(),this._chartWidget.setResolution(i)}setChartType(e,t){const i=this._chartWidget.model().mainSeries().properties().childs().style;if(i.value()===e)return void(null==t||t());const s=e=>{!e&&t&&t()},r=this._chartWidget.model().mainSeries().dataEvents();t&&S(r,s),this._chartWidget.model().setChartStyleProperty(i,e,I)}getAllStudies(){return this._chartWidget.model().model().allStudies(!0).map(g.studyEntityInfo)}getAllPanesHeight(){const e=this._chartWidget.model().model().panes();if(this._chartWidget.isMaximizedPane()){let t=0,i=0;e.forEach((e=>{t+=e.height(),i+=e.stretchFactor()}));const s=i/t;return e.map((e=>Math.round(e.stretchFactor()/s*100)/100))}return e.map((e=>e.height()))}setAllPanesHeight(e){const t=this._chartWidget.model().model(),i=t.panes();(0,s.assert)(i.length===e.length,"There`s a mismatch between the number of heights you provided and the number of panes.");const r=i.reduce(((e,t)=>e+t.stretchFactor()),0)/e.reduce(((e,t)=>e+t));e.forEach(((e,t)=>{const s=e*r;i[t].setStretchFactor(s)})),t.fullUpdate()}maximizeChart(){this._chartWidget.getResizerDetacher().requestFullscreen()}restoreChart(){this._chartWidget.getResizerDetacher().exitFullscreen()}sessions(){return this._chartWidget.model().model().sessions()}getTimeScaleLogicalRange(){return this._chartWidget.model().timeScale().logicalRange()}createStudy(e,t,i,s,r,n){if("function"==typeof r)return console.warn('"createStudy" does not take "callback" parameter anymore'),Promise.resolve(null);if(n=n||{},"string"!=typeof e)return this._createStudy(e);if(n.checkLimit&&!this._chartWidget.model().canCreateStudy())return(0,y.showTooManyStudiesNotice)(),Promise.resolve(null);e=e.toLowerCase();const o=n.disableUndo?this._chartWidget.model().model():this._chartWidget.model(),l=b.StudyMetaInfo.findStudyMetaInfoByDescription(o.studiesMetaData(),e),c=o.createStudyInserter({type:"java",studyId:l.id},[]);if(c.setForceOverlay(!!t),n.priceScale&&c.setPreferredPriceScale(function(e){switch(e){case"no-scale":return"overlay";case"as-series":return"as-series";case"new-left":return"left";case"new-right":return"right";default:throw new Error('The pricescale "'+e+'" is invalid, the only valid options are "no-scale", "as-series", "new-left" and "new-right".')}}(n.priceScale)),n.allowChangeCurrency&&c.setAllowChangeCurrency(!0),n.allowChangeUnit&&c.setAllowChangeUnit(!0),Array.isArray(s)){console.warn("Passing study inputs as an ordered array is now deprecated. Please use an object where keys correspond to the inputs of your study instead.");const e={};for(let t=0;tPromise.resolve({inputs:s||{},parentSources:[]}))).then((e=>(r&&(0,a.applyOverridesToStudy)(e,r),i&&e.setUserEditEnabled(!1),e.id())))}symbolExt(){const e=this._chartWidget.model().mainSeries().symbolInfo() -;return null===e?null:{symbol:e.name,full_name:e.full_name,exchange:e.exchange,description:e.description,type:e.type,pro_name:e.pro_name,typespecs:e.typespecs,delay:e.delay}}getVisibleRange(){const e={from:0,to:0},t=this._chartWidget.model().timeScale();if(t.isEmpty())return e;const i=t.coordinateToVisibleIndex(0),r=t.coordinateToVisibleIndex(t.width()-1),n=this._convertIndexToPublicTime(r);if(null===n)return e;const o=Math.max((0,s.ensureNotNull)(t.points().range().value()).firstIndex,i);return e.from=(0,s.ensureNotNull)(this._convertIndexToPublicTime(o)),e.to=n,e}getTimezoneApi(){return this._timezoneApi}exportData(e){const t={...e};return void 0!==t.from&&(t.from=this._convertTimeFromPublic(t.from)),void 0!==t.to&&(t.to=this._convertTimeFromPublic(t.to)),i.e(9498).then(i.bind(i,43930)).then((e=>e.exportData(this._chartWidget.model().model(),t)))}isSelectBarRequested(){return this._chartWidget.selectPointMode().value()!==w.SelectPointMode.None}barTimeToEndOfPeriod(e){const t=this._prepareEndOfPeriodArgs();return(0,c.barTimeToEndOfPeriod)(t.barBuilder,e,t.intervalObj)}endOfPeriodToBarTime(e){const t=this._prepareEndOfPeriodArgs();return(0,c.endOfPeriodToBarTime)(t.barBuilder,e,t.intervalObj)}createAnchoredShape(e,t){if(!0!==C.supportedLineTools[t.shape].isAnchored)return console.warn(`${t.shape} is not an anchored shape. It can be created using createShape or createMultipointShape`),null;const i=this._chartWidget.model().model(),s=i.mainSeries();if(i.timeScale().isEmpty())return null;const r=void 0!==t.ownerStudyId?i.dataSourceForId(t.ownerStudyId):s,n=this._convertPositionPercentToPricedPoint(e,r);return null===n?null:this.createMultipointShape([n],t)}properties(){return this._chartWidget.properties()}setBarSpacing(e){this._chartWidget.model().timeScale().setBarSpacing(e)}scrollChartByBar(e){this._chartWidget.model().scrollChartByBar(e)}mergeAllScales(e){this._chartWidget.model().mergeAllScales(e)}chartPainted(){return this._chartWidget.chartPainted()}axesSizeReady(){for(const e of this._chartWidget.paneWidgets()){for(const t of e.leftPriceAxisesContainer().axes())if(!t.sizeReady())return!1;for(const t of e.rightPriceAxisesContainer().axes())if(!t.sizeReady())return!1}return!0}applyOverrides(e){this._chartWidget.applyOverrides(e)}addOverlayStudy(e,t,i){return this._chartWidget.addOverlayStudy(e,t,i)}lineToolsSynchronizer(){return this._chartWidget.lineToolsSynchronizer()}ranges(){throw new Error("not implemented")}getTimeScale(){return new h(this._chartWidget.model().timeScale())}_destroy(){this._chartWidget.hasModel()&&this._chartWidget.model().crossHairSource().moved().unsubscribeAll(this)}_createStudy(e){return Promise.reject("Pine Script™ and java studies are not supported")}_convertTimeToPublic(e){return this._getTimeConverter().convertInternalTimeToPublicTime(e)}_convertIndexToPublicTime(e){return null===this._chartWidget.model().mainSeries().symbolInfo()?null:this._getTimeConverter().convertTimePointIndexToPublicTime(e)}_getDefaultCreateMultipointShapeOptions(){return{filled:!0}} -_convertPositionPercentToPricedPoint(e,t){const i=this._chartWidget.model().timeScale(),s=t.priceScale(),r=t.firstValue();if(null==r||!isFinite(r)||null===s)return null;const n=i.coordinateToIndex(e.x*i.width()),o=i.indexToTimePoint(n);if(null===o)return null;return{price:s.coordinateToPrice(e.y*s.height(),r),time:o}}_convertTimeFromPublic(e){return this._getTimeConverter().convertPublicTimeToInternalTime(e)}_getTimeConverter(){const e=this._chartWidget.model().mainSeries();return(0,P.getChartWidgetApiTimeConverter)(e.interval(),(0,s.ensureNotNull)(e.symbolInfo(),"main series symbol info"),this._chartWidget.model().model())}_onCrosshairMoved(e){const t=this._convertIndexToPublicTime(e.index);null!==t&&this._crosshairMoved.fire({price:e.price,time:t})}_makeSubscriptionFromDelegate(e){return{subscribe:e.subscribe.bind(e),unsubscribe:e.unsubscribe.bind(e),unsubscribeAll:e.unsubscribeAll.bind(e)}}_prepareEndOfPeriodArgs(){const e=this._chartWidget.model().model(),t=e.timezone(),i=(0,s.ensureNotNull)(e.mainSeries().symbolInfo()),r=e.mainSeries().interval(),n=new l.SessionInfo(t,i.session,i.session_holidays,i.corrections);return{barBuilder:(0,l.newBarBuilder)(r,n,n),intervalObj:o.Interval.parse(r)}}}},82503:(e,t,i)=>{"use strict";i.d(t,{getChartWidgetApiTimeConverter:()=>o});var s=i(50151),r=i(8950);const n=new Map;function o(e,t,i){const s=function(e,t){return e+t.session+t.timezone+(t.corrections||"")+(t.session_holidays||"")}(e,t);let o=n.get(s);return void 0!==o||(o=new a((0,r.createDwmAligner)(e,t),i),n.set(s,o)),o}class a{constructor(e,t){this._dwmAligner=e,this._chartModel=t}convertPublicTimeToInternalTime(e){return null!==this._dwmAligner?this._dwmAligner.timeToSessionStart(1e3*e)/1e3:e}convertInternalTimeToPublicTime(e){return null!==this._dwmAligner?this._dwmAligner.timeToExchangeTradingDay(1e3*e)/1e3:e}convertTimePointIndexToPublicTime(e){let t=this.convertTimePointIndexToInternalTime(e);return null!==t&&(t=this.convertInternalTimeToPublicTime(t)),t}convertTimePointIndexToInternalTime(e){const t=this._chartModel.timeScale();if(t.isEmpty())return null;const i=t.points(),{firstIndex:r,lastIndex:n}=(0,s.ensureNotNull)(i.range().value());let o=null;if(r<=e&&e<=n)o=i.valueAt(e);else if(e>n){const i=this._chartModel.mainSeries().syncModel();if(null!==i){const r=(0,s.ensureNotNull)(t.indexToTimePoint(n));o=i.projectTime(r,e-n)}}return o}}},46719:(e,t,i)=>{"use strict";i.d(t,{ChartWidgetBase:()=>Fi});var s=i(27714),r=i(50151),n=i(44352),o=i(98351);function a(e,t){const i=Object.create(Object.getPrototypeOf(e));for(const s of t)Object.prototype.hasOwnProperty.call(e,s)&&(i[s]=e[s]);return i}var l=i(56840),c=i(49483),h=i(71668),d=i(76422),u=i(88279);let p;class _ extends u.DialogRenderer{constructor(){super(),this._dialog=null,this._subscribe=e=>{this._setVisibility(e)}}show(){this._load().then((e=>e.show()))}hide(){var e;null===(e=this._dialog)||void 0===e||e.hide()}static getInstance(){return p||(p=new _),p}_load(){ -return Promise.all([i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(6092),i.e(346),i.e(8825),i.e(4412),i.e(8009),i.e(105),i.e(8819),i.e(7920),i.e(4369),i.e(962),i.e(2842),i.e(4062),i.e(3016),i.e(1075),i.e(5747),i.e(8483),i.e(4862)]).then(i.bind(i,90006)).then((e=>{var t,i;return null===(t=this._dialog)||void 0===t||t.hide(),null===(i=this._dialog)||void 0===i||i.visible().unsubscribe(this._subscribe),this._dialog=new e.ObjectTreeDialogRenderer,this._dialog.visible().subscribe(this._subscribe),this._dialog}))}}i(86625);var m=i(66032),g=i(33134);const f=(0,m.parseHtmlElement)(function(e=""){return`
`}());class v{constructor(e){this._shown=!1,this._el=f.cloneNode(!0),this.setSize(g.spinnerSizeMap[e||g.DEFAULT_SIZE])}spin(e){return this._el.classList.add("tv-spinner--shown"),void 0===this._container&&(this._container=e,void 0!==e&&e.appendChild(this._el)),this._shown=!0,this}stop(e){return e&&void 0!==this._container&&this._container.removeChild(this._el),this._el.classList.remove("tv-spinner--shown"),this._shown=!1,this}setStyle(e){return Object.keys(e).forEach((t=>{const i=e[t];void 0!==i&&this._el.style.setProperty(t,i)})),this}style(){return this._el.style}setSize(e){const t=void 0!==e?`tv-spinner--size_${e}`:"";return this._el.className=`tv-spinner ${t} ${this._shown?"tv-spinner--shown":""}`,this}getEl(){return this._el}destroy(){this.stop(),delete this._el,delete this._container}}var S=i(65665),y=i(7019),b=i(53575);var w=i(58403),C=i(43654),P=i(51664);const T=(0,o.getLogger)("Chart.Studies.StudyMetaInfoRepository",{color:"#606"});class x{constructor(e){this._nextRequestNumber=1,this._rawStudiesMetaInfo=[],this._isReady=!1,this._metaInfoQueryQueue=[],this._javaMetaInfoQueryQueue=[],this._javaStudiesMetaInfo=[],this._pineMetaInfoCache=[],this._studiesMigrations=[],this._gateway=e}requestMetaInfo(){this._requestStarted();const e=this._makeNextRequestId();return T.logNormal(`Requesting metainfo #${e}`),new Promise((t=>{T.logNormal(`Requesting studies metadata #${e}`),this._gateway.requestMetadata(e,(i=>{T.logNormal(`Requesting studies metadata #${e} finished`);const s=i.params[1].metainfo.slice();this._processLibraryMetaInfo(s),this._requestFinished(),t()}))}))}findById(e){if(!this._isReady)return this._enqueueMetaInfoQuery(e);const t=this._findStudyMetaInfo(e);return null!==t?Promise.resolve(t):"pine"===e.type?this._compilePine(e):Promise.reject(`unexpected study id=${e.studyId} with type=${e.type}`)}findByIdSync(e){return this._findStudyMetaInfo(e)}isReady(){return this._isReady}findAllJavaStudies(){return this._isReady?Promise.resolve(this._javaStudiesMetaInfo):this._enqueueJavaMetaInfoQuery()}getInternalMetaInfoArray(){return this._javaStudiesMetaInfo}getMigrations(){return this._studiesMigrations}addPineMetaInfo(e){return M(this._pineMetaInfoCache,e)}async getLatestMetaInfoForPineStudy(e,t){return null}_processMigrations(e){throw new Error("not implemented")}_processSiteMetaInfo(e,t){throw new Error("not implemented")} -_processLibraryMetaInfo(e){for(const t of e)I(t),M(this._javaStudiesMetaInfo,t);this._javaStudiesMetaInfo=this._javaStudiesMetaInfo.sort(((e,t)=>{const i=e.description_localized||e.description,s=t.description_localized||t.description;return i>s?1:i{this._metaInfoQueryQueue.push({studyDescriptor:e,resolver:t})}))}_enqueueJavaMetaInfoQuery(){return new Promise((e=>{this._javaMetaInfoQueryQueue.push({resolver:e})}))}_processPendingMetaInfoQueries(){for(;this._metaInfoQueryQueue.length;){const e=this._metaInfoQueryQueue.shift();this.findById(e.studyDescriptor).then(e.resolver)}}_processPendingFullMetaInfoQueries(){for(;this._javaMetaInfoQueryQueue.length;){this._javaMetaInfoQueryQueue.shift().resolver(this._javaStudiesMetaInfo)}}_findStudyMetaInfo(e){return"java"===e.type?this._javaStudiesMetaInfo.find((t=>t.id===e.studyId))||null:this._pineMetaInfoCache.find((t=>t.scriptIdPart===e.pineId&&(void 0===e.pineVersion||(0,r.ensureDefined)(t.pine).version===e.pineVersion)))||null}_makeNextRequestId(){return"metadata_"+this._nextRequestNumber++}_compilePine(e){throw new Error("unsupported")}}function I(e){e.description_localized=n.t(e.description,{context:"study"},i(68716))}function M(e,t){const i=new w.StudyMetaInfo(t);(0,C.migrateMetaInfoAndPropState)(i);let s=!0;const r=e.findIndex((e=>e.id===i.id));if(-1===r)e.push(i);else{const t=e[r],n=void 0!==t.pine?P.Version.parse(t.pine.version):null,o=void 0!==i.pine?P.Version.parse(i.pine.version):null;null===o||null===n||o.isGreaterOrEqual(n)?(t.removeDefaults(),e[r]=i):s=!1}return s&&i.createDefaults(),i}var A,L=i(6250),k=i(89215),E=i(7711),D=i(36646),V=i(16230);!function(e){e.Default="default",e.Success="success",e.Warning="warning",e.Danger="danger"}(A||(A={}));var B=i(86441),R=i(7394),N=i(90995),O=i(47539),F=i(78996),W=i(933),H=i(14888),z=i(8169),U=i(55611),j=i(94393),G=i(76076),q=i(42437),$=i(35861),Y=i(83499),K=i(9740),X=i(95242),Z=i(8840),J=i(32164),Q=i(89494),ee=i(17364);const te=parseInt(Q.labelheight),ie=parseInt(Q.bottommargin);function se(e){return e/11}class re{constructor(){this._wrapper=document.createElement("div"),this._element=document.createElement("div"),this._labelElement=document.createElement("div"),this._gearElement=document.createElement("div"),this._currentScale=1,this._info=null,this._mode="auto",this._wrapper.appendChild(this._element),this._wrapper.classList.add(Q.wrapper),this._element.classList.add(Q.label),this._labelElement.className=Q.symbol,this._element.appendChild(this._labelElement),this._gearElement.className=Q.gear,this._gearElement.innerHTML=J,this._element.appendChild(this._gearElement)}getElement(){return this._wrapper}setMode(e){this._mode!==e&&(this._mode=e)} -align(e,t){const i=se(t);Math.abs(i-this._currentScale)>.1&&(this._currentScale=i,Math.abs(this._currentScale-1)>.1?this._element.style.transform=`scale(${this._currentScale})`:(this._currentScale=1,this._element.style.transform=""))}drawLabelForScreenshot(e,t){if(null===this._info||"gear"===this._mode)return;const i=(0,X.makeFont)(t.fontSize,ee.CHART_FONT_FAMILY);e.fillStyle=Z.themes[t.theme].getThemedColor("color-price-axis-label-back"),e.globalAlpha=.5,e.beginPath();const s=se(t.fontSize)*te/2,r=(0,B.point)(t.offset+t.width/2,t.height/2);e.arc(r.x,r.y,s,0,2*Math.PI,!0),e.fill(),e.globalAlpha=1,e.fillStyle=Z.themes[t.theme].getThemedColor("color-price-axis-label-text"),e.textAlign="center",e.font=i,e.textBaseline="middle",e.fillText(this._info.label,r.x,r.y)}setAxisNameInfo(e){this._info=e,null!==e&&(this._labelElement.textContent=e.label)}static height(e){return(te+ie)*e}}var ne=i(26867),oe=i.n(ne),ae=i(60223),le=i(94194);const ce={enableTooltip:!0,showLabels:!0,enableMenu:!0,enableHighlight:!0};class he{constructor(e,t,i,r,n,o=null){this._invalidated=!0,this._size=(0,s.size)({width:0,height:0}),this._offset=0,this._axisInfo=null,this._onLabelHovered=new(oe()),this._highlighted=!1,this._labelMode="auto",this._fixedLabelMode=null,this._canvasConfiguredHandler=()=>this.update(),this._timeAxisWidget=o,this._isLeft="left"===e,this._rendererOptionsProvider=r.rendererOptionsProvider,this._sourcesTitlesProvider=r.sourcesTitlesProvider,this._contextMenuItemsProvider=r.contextMenuItemsProvider,this._backgroundBasedTheme=r.backgroundBasedTheme,this._getBackgroundTopColor=r.getBackgroundTopColor,this._getBackgroundBottomColor=r.getBackgroundBottomColor,this._showHorizontalBorder=Boolean(r.showHorizontalBorder),this._properties=t,this._axisInfo=i,this._labelOptions={...ce,...n},this._properties.lineColor.subscribe(this,this._onPropertyChanged),this._cell=document.createElement("div"),this._cell.classList.add(Q["price-axis-stub"]),this._labelOptions.enableTooltip&&this._cell.classList.add("apply-common-tooltip"),this._cell.style.width="25px",this._cell.style.height="100%",this._cell.style.position="absolute",this._cell.style.left="0",this._cell.style.overflow="hidden",this._labelOptions.showLabels?(this._label=new re,this._label.setAxisNameInfo(this._axisInfo),this._cell.appendChild(this._label.getElement()),this._labelOptions.enableTooltip&&(0,le.setTooltipData)(this._cell,"text",(e=>this._tooltipContent()))):this._label=null,this._mouseEventHandler=new $.MouseEventHandler(this._cell,this,{treatHorzTouchDragAsPageScroll:!0,treatVertTouchDragAsPageScroll:!0}),this._canvasBinding=(0,Y.createBoundCanvas)(this._cell,(0,s.size)({width:16,height:16})),this._canvasBinding.subscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler);const a=this._canvasBinding.canvasElement;a.style.position="absolute",a.style.left="0",a.style.top="0"}destroy(){this._canvasBinding.unsubscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler),this._canvasBinding.dispose(), +;return null===e?null:{symbol:e.name,full_name:e.full_name,exchange:e.exchange,description:e.description,type:e.type,pro_name:e.pro_name,typespecs:e.typespecs,delay:e.delay}}getVisibleRange(){const e={from:0,to:0},t=this._chartWidget.model().timeScale();if(t.isEmpty())return e;const i=t.coordinateToVisibleIndex(0),r=t.coordinateToVisibleIndex(t.width()-1),n=this._convertIndexToPublicTime(r);if(null===n)return e;const o=Math.max((0,s.ensureNotNull)(t.points().range().value()).firstIndex,i);return e.from=(0,s.ensureNotNull)(this._convertIndexToPublicTime(o)),e.to=n,e}getTimezoneApi(){return this._timezoneApi}exportData(e){const t={...e};return void 0!==t.from&&(t.from=this._convertTimeFromPublic(t.from)),void 0!==t.to&&(t.to=this._convertTimeFromPublic(t.to)),i.e(9498).then(i.bind(i,43930)).then((e=>e.exportData(this._chartWidget.model().model(),t)))}isSelectBarRequested(){return this._chartWidget.selectPointMode().value()!==w.SelectPointMode.None}barTimeToEndOfPeriod(e){const t=this._prepareEndOfPeriodArgs();return(0,c.barTimeToEndOfPeriod)(t.barBuilder,e,t.intervalObj)}endOfPeriodToBarTime(e){const t=this._prepareEndOfPeriodArgs();return(0,c.endOfPeriodToBarTime)(t.barBuilder,e,t.intervalObj)}createAnchoredShape(e,t){if(!0!==P.supportedLineTools[t.shape].isAnchored)return console.warn(`${t.shape} is not an anchored shape. It can be created using createShape or createMultipointShape`),null;const i=this._chartWidget.model().model(),s=i.mainSeries();if(i.timeScale().isEmpty())return null;const r=void 0!==t.ownerStudyId?i.dataSourceForId(t.ownerStudyId):s,n=this._convertPositionPercentToPricedPoint(e,r);return null===n?null:this.createMultipointShape([n],t)}properties(){return this._chartWidget.properties()}setBarSpacing(e){this._chartWidget.model().timeScale().setBarSpacing(e)}scrollChartByBar(e){this._chartWidget.model().scrollChartByBar(e)}mergeAllScales(e){this._chartWidget.model().mergeAllScales(e)}chartPainted(){return this._chartWidget.chartPainted()}axesSizeReady(){for(const e of this._chartWidget.paneWidgets()){for(const t of e.leftPriceAxisesContainer().axes())if(!t.sizeReady())return!1;for(const t of e.rightPriceAxisesContainer().axes())if(!t.sizeReady())return!1}return!0}applyOverrides(e){this._chartWidget.applyOverrides(e)}addOverlayStudy(e,t,i){return this._chartWidget.addOverlayStudy(e,t,i)}lineToolsSynchronizer(){return this._chartWidget.lineToolsSynchronizer()}ranges(){throw new Error("not implemented")}getTimeScale(){return new h(this._chartWidget.model().timeScale())}_destroy(){this._chartWidget.hasModel()&&this._chartWidget.model().crossHairSource().moved().unsubscribeAll(this)}_createStudy(e){return Promise.reject("Pine Script™ and java studies are not supported")}_convertTimeToPublic(e){return this._getTimeConverter().convertInternalTimeToPublicTime(e)}_convertIndexToPublicTime(e){return null===this._chartWidget.model().mainSeries().symbolInfo()?null:this._getTimeConverter().convertTimePointIndexToPublicTime(e)}_getDefaultCreateMultipointShapeOptions(){return{filled:!0}} +_convertPositionPercentToPricedPoint(e,t){const i=this._chartWidget.model().timeScale(),s=t.priceScale(),r=t.firstValue();if(null==r||!isFinite(r)||null===s)return null;const n=i.coordinateToIndex(e.x*i.width()),o=i.indexToTimePoint(n);if(null===o)return null;return{price:s.coordinateToPrice(e.y*s.height(),r),time:o}}_convertTimeFromPublic(e){return this._getTimeConverter().convertPublicTimeToInternalTime(e)}_getTimeConverter(){const e=this._chartWidget.model().mainSeries();return(0,C.getChartWidgetApiTimeConverter)(e.interval(),(0,s.ensureNotNull)(e.symbolInfo(),"main series symbol info"),this._chartWidget.model().model())}_onCrosshairMoved(e){const t=this._convertIndexToPublicTime(e.index);null!==t&&this._crosshairMoved.fire({price:e.price,time:t})}_makeSubscriptionFromDelegate(e){return{subscribe:e.subscribe.bind(e),unsubscribe:e.unsubscribe.bind(e),unsubscribeAll:e.unsubscribeAll.bind(e)}}_prepareEndOfPeriodArgs(){const e=this._chartWidget.model().model(),t=e.timezone(),i=(0,s.ensureNotNull)(e.mainSeries().symbolInfo()),r=e.mainSeries().interval(),n=new l.SessionInfo(t,i.session,i.session_holidays,i.corrections);return{barBuilder:(0,l.newBarBuilder)(r,n,n),intervalObj:o.Interval.parse(r)}}}},82503:(e,t,i)=>{"use strict";i.d(t,{getChartWidgetApiTimeConverter:()=>o});var s=i(50151),r=i(8950);const n=new Map;function o(e,t,i){const s=function(e,t){return e+t.session+t.timezone+(t.corrections||"")+(t.session_holidays||"")}(e,t);let o=n.get(s);return void 0!==o||(o=new a((0,r.createDwmAligner)(e,t),i),n.set(s,o)),o}class a{constructor(e,t){this._dwmAligner=e,this._chartModel=t}convertPublicTimeToInternalTime(e){return null!==this._dwmAligner?this._dwmAligner.timeToSessionStart(1e3*e)/1e3:e}convertInternalTimeToPublicTime(e){return null!==this._dwmAligner?this._dwmAligner.timeToExchangeTradingDay(1e3*e)/1e3:e}convertTimePointIndexToPublicTime(e){let t=this.convertTimePointIndexToInternalTime(e);return null!==t&&(t=this.convertInternalTimeToPublicTime(t)),t}convertTimePointIndexToInternalTime(e){const t=this._chartModel.timeScale();if(t.isEmpty())return null;const i=t.points(),{firstIndex:r,lastIndex:n}=(0,s.ensureNotNull)(i.range().value());let o=null;if(r<=e&&e<=n)o=i.valueAt(e);else if(e>n){const i=this._chartModel.mainSeries().syncModel();if(null!==i){const r=(0,s.ensureNotNull)(t.indexToTimePoint(n));o=i.projectTime(r,e-n)}}return o}}},46719:(e,t,i)=>{"use strict";i.d(t,{ChartWidgetBase:()=>Fi});var s=i(27714),r=i(50151),n=i(44352),o=i(98351);function a(e,t){const i=Object.create(Object.getPrototypeOf(e));for(const s of t)Object.prototype.hasOwnProperty.call(e,s)&&(i[s]=e[s]);return i}var l=i(56840),c=i(49483),h=i(71668),d=i(76422),u=i(88279);let p;class _ extends u.DialogRenderer{constructor(){super(),this._dialog=null,this._subscribe=e=>{this._setVisibility(e)}}show(){this._load().then((e=>e.show()))}hide(){var e;null===(e=this._dialog)||void 0===e||e.hide()}static getInstance(){return p||(p=new _),p}_load(){ +return Promise.all([i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(6092),i.e(346),i.e(8825),i.e(4412),i.e(8009),i.e(105),i.e(8819),i.e(7920),i.e(4369),i.e(962),i.e(2842),i.e(4062),i.e(3016),i.e(1075),i.e(5747),i.e(8483),i.e(4862)]).then(i.bind(i,90006)).then((e=>{var t,i;return null===(t=this._dialog)||void 0===t||t.hide(),null===(i=this._dialog)||void 0===i||i.visible().unsubscribe(this._subscribe),this._dialog=new e.ObjectTreeDialogRenderer,this._dialog.visible().subscribe(this._subscribe),this._dialog}))}}i(86625);var m=i(66032),g=i(33134);const f=(0,m.parseHtmlElement)(function(e=""){return`
`}());class v{constructor(e){this._shown=!1,this._el=f.cloneNode(!0),this.setSize(g.spinnerSizeMap[e||g.DEFAULT_SIZE])}spin(e){return this._el.classList.add("tv-spinner--shown"),void 0===this._container&&(this._container=e,void 0!==e&&e.appendChild(this._el)),this._shown=!0,this}stop(e){return e&&void 0!==this._container&&this._container.removeChild(this._el),this._el.classList.remove("tv-spinner--shown"),this._shown=!1,this}setStyle(e){return Object.keys(e).forEach((t=>{const i=e[t];void 0!==i&&this._el.style.setProperty(t,i)})),this}style(){return this._el.style}setSize(e){const t=void 0!==e?`tv-spinner--size_${e}`:"";return this._el.className=`tv-spinner ${t} ${this._shown?"tv-spinner--shown":""}`,this}getEl(){return this._el}destroy(){this.stop(),delete this._el,delete this._container}}var S=i(65665),y=i(7019),b=i(53575);var w=i(58403),P=i(43654),C=i(51664);const T=(0,o.getLogger)("Chart.Studies.StudyMetaInfoRepository",{color:"#606"});class x{constructor(e){this._nextRequestNumber=1,this._rawStudiesMetaInfo=[],this._isReady=!1,this._metaInfoQueryQueue=[],this._javaMetaInfoQueryQueue=[],this._javaStudiesMetaInfo=[],this._pineMetaInfoCache=[],this._studiesMigrations=[],this._gateway=e}requestMetaInfo(){this._requestStarted();const e=this._makeNextRequestId();return T.logNormal(`Requesting metainfo #${e}`),new Promise((t=>{T.logNormal(`Requesting studies metadata #${e}`),this._gateway.requestMetadata(e,(i=>{T.logNormal(`Requesting studies metadata #${e} finished`);const s=i.params[1].metainfo.slice();this._processLibraryMetaInfo(s),this._requestFinished(),t()}))}))}findById(e){if(!this._isReady)return this._enqueueMetaInfoQuery(e);const t=this._findStudyMetaInfo(e);return null!==t?Promise.resolve(t):"pine"===e.type?this._compilePine(e):Promise.reject(`unexpected study id=${e.studyId} with type=${e.type}`)}findByIdSync(e){return this._findStudyMetaInfo(e)}isReady(){return this._isReady}findAllJavaStudies(){return this._isReady?Promise.resolve(this._javaStudiesMetaInfo):this._enqueueJavaMetaInfoQuery()}getInternalMetaInfoArray(){return this._javaStudiesMetaInfo}getMigrations(){return this._studiesMigrations}addPineMetaInfo(e){return M(this._pineMetaInfoCache,e)}async getLatestMetaInfoForPineStudy(e,t){return null}_processMigrations(e){throw new Error("not implemented")}_processSiteMetaInfo(e,t){throw new Error("not implemented")} +_processLibraryMetaInfo(e){for(const t of e)I(t),M(this._javaStudiesMetaInfo,t);this._javaStudiesMetaInfo=this._javaStudiesMetaInfo.sort(((e,t)=>{const i=e.description_localized||e.description,s=t.description_localized||t.description;return i>s?1:i{this._metaInfoQueryQueue.push({studyDescriptor:e,resolver:t})}))}_enqueueJavaMetaInfoQuery(){return new Promise((e=>{this._javaMetaInfoQueryQueue.push({resolver:e})}))}_processPendingMetaInfoQueries(){for(;this._metaInfoQueryQueue.length;){const e=this._metaInfoQueryQueue.shift();this.findById(e.studyDescriptor).then(e.resolver)}}_processPendingFullMetaInfoQueries(){for(;this._javaMetaInfoQueryQueue.length;){this._javaMetaInfoQueryQueue.shift().resolver(this._javaStudiesMetaInfo)}}_findStudyMetaInfo(e){return"java"===e.type?this._javaStudiesMetaInfo.find((t=>t.id===e.studyId))||null:this._pineMetaInfoCache.find((t=>t.scriptIdPart===e.pineId&&(void 0===e.pineVersion||(0,r.ensureDefined)(t.pine).version===e.pineVersion)))||null}_makeNextRequestId(){return"metadata_"+this._nextRequestNumber++}_compilePine(e){throw new Error("unsupported")}}function I(e){e.description_localized=n.t(e.description,{context:"study"},i(68716))}function M(e,t){const i=new w.StudyMetaInfo(t);(0,P.migrateMetaInfoAndPropState)(i);let s=!0;const r=e.findIndex((e=>e.id===i.id));if(-1===r)e.push(i);else{const t=e[r],n=void 0!==t.pine?C.Version.parse(t.pine.version):null,o=void 0!==i.pine?C.Version.parse(i.pine.version):null;null===o||null===n||o.isGreaterOrEqual(n)?(t.removeDefaults(),e[r]=i):s=!1}return s&&i.createDefaults(),i}var A,L=i(6250),k=i(89215),E=i(7711),D=i(36646),B=i(16230);!function(e){e.Default="default",e.Success="success",e.Warning="warning",e.Danger="danger"}(A||(A={}));var V=i(86441),R=i(7394),N=i(90995),O=i(47539),F=i(78996),W=i(933),H=i(14888),z=i(8169),U=i(55611),j=i(94393),G=i(76076),q=i(42437),$=i(35861),Y=i(83499),K=i(9740),X=i(95242),Z=i(8840),J=i(32164),Q=i(89494),ee=i(17364);const te=parseInt(Q.labelheight),ie=parseInt(Q.bottommargin);function se(e){return e/11}class re{constructor(){this._wrapper=document.createElement("div"),this._element=document.createElement("div"),this._labelElement=document.createElement("div"),this._gearElement=document.createElement("div"),this._currentScale=1,this._info=null,this._mode="auto",this._wrapper.appendChild(this._element),this._wrapper.classList.add(Q.wrapper),this._element.classList.add(Q.label),this._labelElement.className=Q.symbol,this._element.appendChild(this._labelElement),this._gearElement.className=Q.gear,this._gearElement.innerHTML=J,this._element.appendChild(this._gearElement)}getElement(){return this._wrapper}setMode(e){this._mode!==e&&(this._mode=e)} +align(e,t){const i=se(t);Math.abs(i-this._currentScale)>.1&&(this._currentScale=i,Math.abs(this._currentScale-1)>.1?this._element.style.transform=`scale(${this._currentScale})`:(this._currentScale=1,this._element.style.transform=""))}drawLabelForScreenshot(e,t){if(null===this._info||"gear"===this._mode)return;const i=(0,X.makeFont)(t.fontSize,ee.CHART_FONT_FAMILY);e.fillStyle=Z.themes[t.theme].getThemedColor("color-price-axis-label-back"),e.globalAlpha=.5,e.beginPath();const s=se(t.fontSize)*te/2,r=(0,V.point)(t.offset+t.width/2,t.height/2);e.arc(r.x,r.y,s,0,2*Math.PI,!0),e.fill(),e.globalAlpha=1,e.fillStyle=Z.themes[t.theme].getThemedColor("color-price-axis-label-text"),e.textAlign="center",e.font=i,e.textBaseline="middle",e.fillText(this._info.label,r.x,r.y)}setAxisNameInfo(e){this._info=e,null!==e&&(this._labelElement.textContent=e.label)}static height(e){return(te+ie)*e}}var ne=i(26867),oe=i.n(ne),ae=i(60223),le=i(94194);const ce={enableTooltip:!0,showLabels:!0,enableMenu:!0,enableHighlight:!0};class he{constructor(e,t,i,r,n,o=null){this._invalidated=!0,this._size=(0,s.size)({width:0,height:0}),this._offset=0,this._axisInfo=null,this._onLabelHovered=new(oe()),this._highlighted=!1,this._labelMode="auto",this._fixedLabelMode=null,this._canvasConfiguredHandler=()=>this.update(),this._timeAxisWidget=o,this._isLeft="left"===e,this._rendererOptionsProvider=r.rendererOptionsProvider,this._sourcesTitlesProvider=r.sourcesTitlesProvider,this._contextMenuItemsProvider=r.contextMenuItemsProvider,this._backgroundBasedTheme=r.backgroundBasedTheme,this._getBackgroundTopColor=r.getBackgroundTopColor,this._getBackgroundBottomColor=r.getBackgroundBottomColor,this._showHorizontalBorder=Boolean(r.showHorizontalBorder),this._properties=t,this._axisInfo=i,this._labelOptions={...ce,...n},this._properties.lineColor.subscribe(this,this._onPropertyChanged),this._cell=document.createElement("div"),this._cell.classList.add(Q["price-axis-stub"]),this._labelOptions.enableTooltip&&this._cell.classList.add("apply-common-tooltip"),this._cell.style.width="25px",this._cell.style.height="100%",this._cell.style.position="absolute",this._cell.style.left="0",this._cell.style.overflow="hidden",this._labelOptions.showLabels?(this._label=new re,this._label.setAxisNameInfo(this._axisInfo),this._cell.appendChild(this._label.getElement()),this._labelOptions.enableTooltip&&(0,le.setTooltipData)(this._cell,"text",(e=>this._tooltipContent()))):this._label=null,this._mouseEventHandler=new $.MouseEventHandler(this._cell,this,{treatHorzTouchDragAsPageScroll:!0,treatVertTouchDragAsPageScroll:!0}),this._canvasBinding=(0,Y.createBoundCanvas)(this._cell,(0,s.size)({width:16,height:16})),this._canvasBinding.subscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler);const a=this._canvasBinding.canvasElement;a.style.position="absolute",a.style.left="0",a.style.top="0"}destroy(){this._canvasBinding.unsubscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler),this._canvasBinding.dispose(), this._properties.lineColor.unsubscribe(this,this._onPropertyChanged),this._mouseEventHandler.destroy()}mouseEnterEvent(e){this._mouseOrTouchEnterEvent(e)}touchStartEvent(e){this._mouseOrTouchEnterEvent(e)}mouseLeaveEvent(e){this._mouseOrTouchLeaveEvent(e)}touchEndEvent(e){this._mouseOrTouchLeaveEvent(e)}mouseClickEvent(e){this._mouseClickOrTapEvent(e)}tapEvent(e){this._mouseClickOrTapEvent(e)}update(){this._invalidated=!0}getElement(){return this._cell}onLabelHovered(){return this._onLabelHovered}setSizeAndOffset(e,t){(0,s.equalSizes)(this._size,e)||(this._size=e,this._canvasBinding.resizeCanvasElement(e),this._cell.style.width=`${e.width}px`,this._cell.style.minWidth=`${e.width}px`,this._cell.style.height=`${e.height}px`,this._invalidated=!0),this._offset!==t&&(this._offset=t,this._cell.style.left=`${t}px`)}paint(e){if(e{this.setLabelMode((0,r.ensureNotNull)(this._fixedLabelMode)),this._fixedLabelMode=null}))}}var de=i(24679);class ue{constructor(e,t,i,r,n,o=null){this._axises=[],this._stubs=[],this._size=(0,s.size)({width:0,height:0}),this._onLabelHovered=new(oe()),this._scalesProperties=e,this._priceAxisWidgetFactory=i,this._timeAxisWidget=o,this._rendererOptionsProvider=r.rendererOptionsProvider,this._titlesProvider=r.titlesProvider,this._stubContextMenuProvider=r.stubContextMenuProvider,this._backgroundBasedTheme=r.backgroundBasedTheme,this._getBackgroundTopColor=r.getBackgroundTopColor,this._getBackgroundBottomColor=r.getBackgroundBottomColor,this._showHorisontalBorder=Boolean(r.showHorizontalBorder),this._labelsOptions={...ce,...n};const a=this._scalesProperties.childs();this._stubProperties={lineColor:a.lineColor,fontSize:a.fontSize},this._side=t,this._cell=document.createElement("td"),this._cell.classList.add("chart-markup-table","price-axis-container"),this._cell.style.width="25px",this._cell.style.position="relative"}destroy(){this.setScales([],0,0,0)}onLabelHovered(){return this._onLabelHovered}setScales(e,t,i,s){for(;e.length>this._axises.length&&this._axises.lengtho;){const e=(0,r.ensureDefined)(this._stubs.pop()) ;e.onLabelHovered().unsubscribeAll(this),this._cell.removeChild(e.getElement()),e.destroy()}for(;this._stubs.length{this._labelsOptions.showLabels&&this._labelsOptions.enableHighlight&&this._onLabelHovered.fire({owner:t,axis:(0,r.ensureNotNull)(e)},i)})),this._stubs.push(t),this._cell.appendChild(t.getElement())}const a=this._labelsOptions.enableMenu;1===s?this._stubs.forEach(((e,t)=>e.setLabelMode(a?"gear":"symbol"))):this._stubs.forEach(((e,t)=>e.setLabelMode(te.updateCurrencyLabel()))}optimalWidths(){return this._axises.map((e=>e.optimalWidth()))}setSizes(e,t){this._size=(0,s.size)({width:t.reduce(((e,t)=>e+t),0),height:e}),this._cell.style.width=this._size.width+"px",this._cell.style.minWidth=this._size.width+"px",this._cell.style.height=this._size.height+"px",t.length!==this._axises.length+this._stubs.length&&(0,r.assert)(t.length===this._axises.length+this._stubs.length,"Widgets count should be the same as widths one");let i=0;this._forEachWidgetFromLeft(((r,n)=>{const o=t[n];r.setSizeAndOffset((0,s.size)({width:o,height:e}),i),i+=o}))}update(){this._axises.forEach((e=>e.update())),this._stubs.forEach((e=>e.update()))}paint(e){this._axises.forEach(((t,i)=>t.paint(e(i)))),this._stubs.forEach(((t,i)=>t.paint(e(i))))}paintStubs(e){this._stubs.forEach((t=>t.paint(e)))}restoreDefaultCursor(){this._axises.forEach((e=>e.restoreDefaultCursor()))}getWidth(){return this._size.width}findAxisWidgetForScale(e){const t=this._axises.find((t=>t.priceScale()===e));return void 0===t?null:t}getScreenshotData(){const e=this._getImage();return{canvas:e,content:e.toDataURL(),contentHeight:this._size.height,contentWidth:this._size.width}}getImage(){return this._getImage()}slotsCount(){return this._axises.length+this._stubs.length}highlightPriceAxisByLabel(e){this._axises.forEach((t=>{const i=t.axisInfo();t.setHighlighted(null!==i&&i.equals(e))}))}axes(){return this._axises}_stubParams(e){return{rendererOptionsProvider:this._rendererOptionsProvider,backgroundBasedTheme:this._backgroundBasedTheme,sourcesTitlesProvider:()=>this._titlesProvider(this._side,e),contextMenuItemsProvider:()=>this._stubContextMenuProvider(this._side,e),getBackgroundTopColor:this._getBackgroundTopColor,getBackgroundBottomColor:this._getBackgroundBottomColor,showHorizontalBorder:this._showHorisontalBorder}}_getImage(){const e=(0,Y.createDisconnectedCanvas)(document,this._size),t=(0,Y.getPrescaledContext2D)(e);let i=0;return this._forEachWidgetFromLeft(((e,s)=>{const r=e.getWidth();0!==r&&0!==this._size.height&&(t.drawImage(e.getImage(),i,0,r,this._size.height),i+=r)})),e}_forEachWidgetFromLeft(e){const t=[...this._axises,...this._stubs],i="left"===this._side,s=i?-1:t.length,r=i?-1:1 -;for(let n=i?t.length-1:0;n!==s;n+=r)e(t[n],n,t)}}var pe=i(40858),_e=i(51768),me=i(24377),ge=i(38031),fe=i(45345),ve=i(24633),Se=i(91031),ye=i(55824),be=i(81165);const we=(0,R.getHexColorByName)("color-white"),Ce=(0,R.getHexColorByName)("color-cold-gray-100"),Pe=(0,ge.applyTransparency)((0,R.getHexColorByName)("color-white"),60),Te=(0,R.getHexColorByName)("color-cold-gray-800"),xe=(0,ge.applyTransparency)((0,R.getHexColorByName)("color-black"),60);function Ie(e){const t=(0,ge.isHexColor)(e)?e.toLowerCase():(0,me.rgbToHexString)((0,me.parseRgb)(e));return fe.watchedTheme.value()===ve.StdTheme.Light?t===we?Ce:Pe:"#181c27"===t?Te:xe}class Me{constructor(){this._width=null,this._currencyInfo=null,this._unitInfo=null,this._measureUnitIdInfo=null,this._fontSize=0,this._backgroundColor="",this._hoverColor="",this._fadeEndColor="",this._hoveredLabel=null,this._currencyAndUnitLabelsWrapper=document.createElement("div"),this._currencyAndUnitLabelsWrapper.className=be["price-axis-currency-label-wrapper"],this._currencyAndUnitLabelsWrapper.setAttribute("data-name","currency-unit-label-wrapper"),this._controlsContainer=document.createElement("div"),this._controlsContainer.className=be["price-axis-currency-label"],this._currencyAndUnitLabelsWrapper.appendChild(this._controlsContainer),this._currencyLabelDiv=document.createElement("div"),this._currencyLabelDiv.className=be.row,this._currencyLabelDiv.classList.add("apply-common-tooltip"),(0,le.setTooltipData)(this._currencyLabelDiv,"text",(e=>this._currencyTooltipContent())),this._currencyText=document.createElement("span"),this._currencyText.className=be["price-axis-currency-label-text"],this._currencyLabelDiv.appendChild(this._currencyText),this._currencyArrowDown=document.createElement("span"),this._currencyArrowDown.className=be["price-axis-currency-label-arrow-down"],this._currencyArrowDown.innerHTML=ye,this._currencyLabelDiv.appendChild(this._currencyArrowDown),this._measureUnitIdLabelDiv=document.createElement("div"),this._measureUnitIdLabelDiv.className=be.row,this._measureUnitIdLabelDiv.classList.add("apply-common-tooltip"),this._measureUnitIdLabelDiv.classList.add("readonly"),(0,le.setTooltipData)(this._measureUnitIdLabelDiv,"text",(e=>this._measureUnitIdTooltipContent())),this._measureUnitIdText=document.createElement("span"),this._measureUnitIdText.className=be["price-axis-currency-label-text"],this._measureUnitIdLabelDiv.appendChild(this._measureUnitIdText),this._unitLabelDiv=document.createElement("div"),this._unitLabelDiv.className=be.row,this._unitLabelDiv.classList.add("apply-common-tooltip"),(0,le.setTooltipData)(this._unitLabelDiv,"text",(e=>this._unitTooltipContent())),this._unitText=document.createElement("span"),this._unitText.className=be["price-axis-currency-label-text"],this._unitLabelDiv.appendChild(this._unitText),this._unitArrowDown=document.createElement("span"),this._unitArrowDown.className=be["price-axis-currency-label-arrow-down"],this._unitArrowDown.innerHTML=ye,this._unitLabelDiv.appendChild(this._unitArrowDown), +;for(let n=i?t.length-1:0;n!==s;n+=r)e(t[n],n,t)}}var pe=i(40858),_e=i(51768),me=i(24377),ge=i(38031),fe=i(45345),ve=i(24633),Se=i(91031),ye=i(55824),be=i(81165);const we=(0,R.getHexColorByName)("color-white"),Pe=(0,R.getHexColorByName)("color-cold-gray-100"),Ce=(0,ge.applyTransparency)((0,R.getHexColorByName)("color-white"),60),Te=(0,R.getHexColorByName)("color-cold-gray-800"),xe=(0,ge.applyTransparency)((0,R.getHexColorByName)("color-black"),60);function Ie(e){const t=(0,ge.isHexColor)(e)?e.toLowerCase():(0,me.rgbToHexString)((0,me.parseRgb)(e));return fe.watchedTheme.value()===ve.StdTheme.Light?t===we?Pe:Ce:"#181c27"===t?Te:xe}class Me{constructor(){this._width=null,this._currencyInfo=null,this._unitInfo=null,this._measureUnitIdInfo=null,this._fontSize=0,this._backgroundColor="",this._hoverColor="",this._fadeEndColor="",this._hoveredLabel=null,this._currencyAndUnitLabelsWrapper=document.createElement("div"),this._currencyAndUnitLabelsWrapper.className=be["price-axis-currency-label-wrapper"],this._currencyAndUnitLabelsWrapper.setAttribute("data-name","currency-unit-label-wrapper"),this._controlsContainer=document.createElement("div"),this._controlsContainer.className=be["price-axis-currency-label"],this._currencyAndUnitLabelsWrapper.appendChild(this._controlsContainer),this._currencyLabelDiv=document.createElement("div"),this._currencyLabelDiv.className=be.row,this._currencyLabelDiv.classList.add("apply-common-tooltip"),(0,le.setTooltipData)(this._currencyLabelDiv,"text",(e=>this._currencyTooltipContent())),this._currencyText=document.createElement("span"),this._currencyText.className=be["price-axis-currency-label-text"],this._currencyLabelDiv.appendChild(this._currencyText),this._currencyArrowDown=document.createElement("span"),this._currencyArrowDown.className=be["price-axis-currency-label-arrow-down"],this._currencyArrowDown.innerHTML=ye,this._currencyLabelDiv.appendChild(this._currencyArrowDown),this._measureUnitIdLabelDiv=document.createElement("div"),this._measureUnitIdLabelDiv.className=be.row,this._measureUnitIdLabelDiv.classList.add("apply-common-tooltip"),this._measureUnitIdLabelDiv.classList.add("readonly"),(0,le.setTooltipData)(this._measureUnitIdLabelDiv,"text",(e=>this._measureUnitIdTooltipContent())),this._measureUnitIdText=document.createElement("span"),this._measureUnitIdText.className=be["price-axis-currency-label-text"],this._measureUnitIdLabelDiv.appendChild(this._measureUnitIdText),this._unitLabelDiv=document.createElement("div"),this._unitLabelDiv.className=be.row,this._unitLabelDiv.classList.add("apply-common-tooltip"),(0,le.setTooltipData)(this._unitLabelDiv,"text",(e=>this._unitTooltipContent())),this._unitText=document.createElement("span"),this._unitText.className=be["price-axis-currency-label-text"],this._unitLabelDiv.appendChild(this._unitText),this._unitArrowDown=document.createElement("span"),this._unitArrowDown.className=be["price-axis-currency-label-arrow-down"],this._unitArrowDown.innerHTML=ye,this._unitLabelDiv.appendChild(this._unitArrowDown), this._controlsContainer.appendChild(this._currencyLabelDiv),this._controlsContainer.appendChild(this._measureUnitIdLabelDiv),this._controlsContainer.appendChild(this._unitLabelDiv),this._fadeDiv=document.createElement("div"),this._fadeDiv.className=be["price-axis-currency-label-fade"],this._currencyAndUnitLabelsWrapper.appendChild(this._fadeDiv);const e=e=>{null!==this._hoveredLabel&&this._hoveredLabel!==e&&(this._hoveredLabel.style.background=""),e&&e.classList.contains("readonly")||(this._hoveredLabel=e,""===this._hoverColor&&(this._hoverColor=Ie(this._backgroundColor)),null!==e&&(e.style.background=this._hoverColor))};this._currencyLabelDiv.addEventListener("mouseover",(()=>e(this._currencyLabelDiv))),this._currencyLabelDiv.addEventListener("mouseout",(()=>e(null))),this._unitLabelDiv.addEventListener("mouseover",(()=>e(this._unitLabelDiv))),this._unitLabelDiv.addEventListener("mouseout",(()=>e(null))),this.disableCurrency(),this.disableUnit()}element(){return this._currencyAndUnitLabelsWrapper}currencyLabelElement(){return this._currencyLabelDiv}unitLabelElement(){return this._unitLabelDiv}measureUnitIdLabelElement(){return this._measureUnitIdLabelDiv}isEnabled(){return this.currencyLabelEnabled()||this.unitLabelEnabled()||this.measureUnitIdLableEnabled()}width(){if(null!==this._width)return this._width;let e=0;if(this.currencyLabelEnabled()){const t=this._currencyText.getBoundingClientRect(),i=this._currencyArrowDown.getBoundingClientRect();e=Math.max(e,t.width+i.width+2*this._textMarginAndPadding())}if(this.measureUnitIdLableEnabled()){const t=this._measureUnitIdText.getBoundingClientRect();e=Math.max(e,t.width+2*this._textMarginAndPadding())}if(this.unitLabelEnabled()){const t=this._unitText.getBoundingClientRect(),i=this._unitArrowDown.getBoundingClientRect();e=Math.max(e,t.width+i.width+2*this._textMarginAndPadding())}return this._width=e}drawLabel(e,t,i){var s,r,n;if(!this.isEnabled())return;const o=[];o.push(this.currencyLabelEnabled()&&null!==(s=this._currencyText.textContent)&&void 0!==s?s:""),o.push(this.measureUnitIdLableEnabled()&&null!==(r=this._measureUnitIdText.textContent)&&void 0!==r?r:""),o.push(this.unitLabelEnabled()&&null!==(n=this._unitText.textContent)&&void 0!==n?n:""),e.font=(0,X.makeFont)(this._fontSize,ee.CHART_FONT_FAMILY);const a=new pe.TextWidthCache,l=o.map((t=>""===t?0:a.yMidCorrection(e,t))),c=Math.round(Number(be.css_wrapper_margin)*i),h=(0,Se.ceiledEven)(t*i)-2*c,d=Math.round(this.labelBottom()*i);e.fillStyle=this._backgroundColor,e.fillRect(c,0,h,d);const u=Math.round(Number(be.css_fade_height)*i),p=e.createLinearGradient(0,d,0,d+u);p.addColorStop(0,this._backgroundColor),p.addColorStop(1,this._fadeEndColor),e.fillStyle=p;const _=Math.round(Number(be.css_value_currency_label_radius)*i);(0,K.drawRoundRect)(e,c,d,h,u,[0,0,_,_]),e.fill(),e.fillStyle=this._controlsContainer.style.color,e.textBaseline="middle",e.textAlign="left";const m=Math.round(Number(be.css_first_row_top_padding)*i),g=Math.round(this._textMarginAndPadding()*i)+c,f=this._oneLineHeight()/2*i;let v=m+f ;o.forEach(((t,s)=>{""!==t&&((0,Y.drawScaled)(e,i,(()=>e.fillText(t,g/i,(v+l[s])/i))),v=Math.ceil(v+2*f))}))}setHidden(e){this._controlsContainer.classList.toggle(be.hidden,e),this._fadeDiv.classList.toggle(be.hidden,e)}enableCurrency(){this._currencyLabelDiv.classList.remove("js-hidden"),this._width=null,this._updateVisibility()}disableCurrency(){this._currencyLabelDiv.classList.add("js-hidden"),this._width=null,this._updateVisibility()}enableUnit(){this._unitLabelDiv.classList.remove("js-hidden"),this._width=null,this._updateVisibility()}disableUnit(){this._unitLabelDiv.classList.add("js-hidden"),this._width=null,this._updateVisibility()}enableMeasureUnitId(){this._measureUnitIdLabelDiv.classList.remove("js-hidden"),this._width=null,this._updateVisibility()}disableMeasureUnitId(){this._measureUnitIdLabelDiv.classList.add("js-hidden"),this._width=null,this._updateVisibility()}currencyLabelEnabled(){return!this._currencyLabelDiv.classList.contains("js-hidden")}unitLabelEnabled(){return!this._unitLabelDiv.classList.contains("js-hidden")}measureUnitIdLableEnabled(){return!this._measureUnitIdLabelDiv.classList.contains("js-hidden")}currencyConversionAvailable(){return!this._currencyLabelDiv.classList.contains("readonly")}unitConversionAvailable(){return!this._unitLabelDiv.classList.contains("readonly")}setCurrencyInfo(e){if(this._currencyInfo===e)return!1;this._currencyInfo=e;const t=null===e.selectedCurrency?n.t(null,void 0,i(95093)):(0,r.ensureDefined)(e.displayedValues.get(e.selectedCurrency));return this._currencyText.textContent!==t&&(this._currencyText.textContent=t,this._width=null),this._currencyArrowDown.classList.contains("js-hidden")!==e.readOnly&&(this._currencyArrowDown.classList.toggle("js-hidden",e.readOnly),this._currencyLabelDiv.classList.toggle("readonly",e.readOnly),this._width=null),!0}setUnitInfo(e){if(null!==this._unitInfo&&this._unitInfo.selectedUnit===e.selectedUnit&&0===this._unitInfo.availableGroups.size==(0===e.availableGroups.size)&&this._unitInfo.originalUnits.size===e.originalUnits.size)return this._unitInfo=e,!1;this._unitInfo=e;const t=null===e.selectedUnit?n.t(null,void 0,i(95093)):(0,r.ensureDefined)(e.names.get(e.selectedUnit));return this._unitText.textContent!==t&&(this._unitText.textContent=t,this._width=null),this._unitArrowDown.classList.contains("js-hidden")!==(0===e.availableGroups.size)&&(this._unitArrowDown.classList.toggle("js-hidden",0===e.availableGroups.size),this._unitLabelDiv.classList.toggle("readonly",0===e.availableGroups.size),this._width=null),!0}setMeasureUnitIdInfo(e){if(this._measureUnitIdInfo===e)return!1;this._measureUnitIdInfo=e;const t=null===e.selectedMeasureUnitId?n.t(null,void 0,i(95093)):(0,r.ensureDefined)(e.names.get(e.selectedMeasureUnitId));return this._measureUnitIdText.textContent!==t&&(this._measureUnitIdText.textContent=t,this._width=null),this._measureUnitIdLabelDiv.classList.contains("js-hidden")!==(0===e.names.size)&&(this._measureUnitIdLabelDiv.classList.toggle("js-hidden",0===e.names.size),this._width=null),!0}updateColors(e,t){ this._controlsContainer.style.color=t,this._backgroundColor!==e&&(this._backgroundColor=e,this._fadeEndColor=(0,ge.applyTransparency)(e,100),this._hoverColor=Ie(e)),this._controlsContainer.style.background=this._backgroundColor,null!==this._hoveredLabel&&(this._hoveredLabel.style.background=this._hoverColor),this._fadeDiv.style.background=`linear-gradient(${this._backgroundColor}, ${this._fadeEndColor})`}currencyInfo(){return this._currencyInfo}unitInfo(){return this._unitInfo}measureUnitIdInfo(){return this._measureUnitIdInfo}setFontSize(e){this._fontSize!==e&&(this._fontSize=e,this._currencyLabelDiv.style.fontSize=e+"px",this._measureUnitIdLabelDiv.style.fontSize=e+"px",this._unitLabelDiv.style.fontSize=e+"px",this._width=null,this._setLineHeight(this._oneLineHeight()))}labelBottom(){const e=this._oneLineHeight();let t=(this.currencyLabelEnabled()?e:0)+(this.measureUnitIdLableEnabled()?e:0)+(this.unitLabelEnabled()?e:0);return t>0&&(t+=Number(be.css_first_row_top_padding)),t}_textMarginAndPadding(){return Number(be.css_row_left_right_margin)+Number(be.css_row_left_right_padding)}_currencyTooltipContent(){const e=this._currencyInfo;return null===e?"":null===e.selectedCurrency?Array.from(e.currencies).map((t=>(0,r.ensureDefined)(e.displayedValues.get(t)))).join(", "):e.displayedValues.get(e.selectedCurrency)||""}_unitTooltipContent(){const e=this._unitInfo;return null===e?"":null===e.selectedUnit?Array.from(e.units).map((t=>(0,r.ensureDefined)(e.names.get(t)))).join(", "):e.descriptions.get(e.selectedUnit)||""}_measureUnitIdTooltipContent(){const e=this._measureUnitIdInfo;return null===e?"":null===e.selectedMeasureUnitId?Array.from(e.measureUnitIds).map((t=>(0,r.ensureDefined)(e.names.get(t)))).join(", "):e.descriptions.get(e.selectedMeasureUnitId)||""}_setLineHeight(e){this._currencyLabelDiv.style.lineHeight=e+"px",this._measureUnitIdLabelDiv.style.lineHeight=e+"px",this._unitLabelDiv.style.lineHeight=e+"px"}_updateVisibility(){const e=this.isEnabled();this._currencyAndUnitLabelsWrapper.classList.toggle("js-hidden",!e),this._fadeDiv.classList.toggle("js-hidden",!e)}_oneLineHeight(){return 7+this._fontSize}}async function Ae(e,t,s,r){const{UnitConversionRenderer:n}=await Promise.all([i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(8271),i.e(4412),i.e(3795),i.e(9776),i.e(3687),i.e(962),i.e(3016),i.e(1075),i.e(2704)]).then(i.bind(i,71834));return new n(e,s,t,r)}function Le(e,t){let{deltaX:i,deltaY:s}=e;switch(i/=100,s/=100,t.deltaMode){case t.DOM_DELTA_PAGE:i*=120,s*=120;break;case t.DOM_DELTA_LINE:i*=32,s*=32}return{deltaX:i,deltaY:s}}class ke{constructor(){this._totalDeltaX=0,this._totalDeltaY=0,this._prevWheelTime=0}processWheel(e){e.timeStamp-this._prevWheelTime>100&&this._reset(),this._totalDeltaX+=e.deltaX,this._totalDeltaY+=e.deltaY,this._prevWheelTime=e.timeStamp;const t={deltaX:e.deltaX,deltaY:e.deltaY};return 0===this._totalDeltaX||0===this._totalDeltaY||(Math.abs(this._totalDeltaX)>=Math.abs(3*this._totalDeltaY)&&(t.deltaY=0), -Math.abs(this._totalDeltaY)>=Math.abs(3*this._totalDeltaX)&&(t.deltaX=0)),Le(t,e)}_reset(){this._totalDeltaX=0,this._totalDeltaY=0}}var Ee=i(68335),De=i(50792),Ve=i(22512),Be=i(2484),Re=i(6195),Ne=i(43986),Oe=i(35624),Fe=i(39267);i(91663);const We=new O.TranslatedString("change no overlapping labels",n.t(null,void 0,i(83935))),He=n.t(null,void 0,i(75633)),ze=n.t(null,void 0,i(94420)),Ue=n.t(null,void 0,i(81520)),je=n.t(null,void 0,i(25933)),Ge=n.t(null,void 0,i(17258)),qe=n.t(null,void 0,i(50834)),$e=n.t(null,{context:"scale_menu"},i(70361)),Ye=n.t(null,{context:"scale_menu"},i(47807)),Ke=n.t(null,{context:"scale_menu"},i(34727)),Xe=n.t(null,{context:"scale_menu"},i(72116)),Ze=n.t(null,{context:"scale_menu"},i(19238)),Je=n.t(null,{context:"scale_menu"},i(54138));const Qe=function(e){const t=new Ve.LimitedPrecisionNumericFormatter(e);return(e,i)=>(0,S.isNumber)(i)&&!e.isLog()?t.format(i):""}(4),et={contextMenuEnabled:!0,currencyConversionEnabled:!1,unitConversionEnabled:!1,countdownEnabled:!0,contextMenu:{general:!0,source:!0},pressedMouseMoveScale:!0,mouseWheelScale:!0,pinchScale:!0,croppedTickMarks:!0};class tt{constructor(e,t,i,r,n,o,a,l,c){this._actions=null,this._priceScale=null,this._widthCache=new pe.TextWidthCache(1e3),this._color=null,this._fontSize=null,this._currencyFontSize=0,this._currencyLabelWidth=null,this._isVisible=!0,this._updateTimeout=null,this._currencyMenu=null,this._unitMenu=null,this._prevOptimalWidth=0,this._size=(0,s.size)({width:0,height:0}),this._currentCursorClassName="",this._destroyed=!1,this._highlighted=!1,this._mouseWheelHelper=null,this._dragScaleActive=!1,this._offset=NaN,this._pinching=!1,this._lastHittestResult=null,this._recalcCurrencyAndUnitVisibility=()=>{if(null===this._currencyLabel)return;let e=!0;switch((0,Oe.currencyUnitVisibilityProperty)().value()){case"alwaysOff":e=!1;break;case"visibleOnMouseOver":const t=this._chart.anyPriceAxisHovered().value(),i=null!==this._currencyMenu&&this._currencyMenu.isOpened(),s=null!==this._unitMenu&&this._unitMenu.isOpened();e=t||i||s}this._currencyLabel.setHidden(!e)},this._chart=e,this._pane=t,this._undoModel=i,this._properties=r,this._isLeft="left"===o,this._options=(0,S.merge)((0,S.clone)(et),a),this._rendererOptionsProvider=n,this._backgroundBasedTheme=c,this._cell=document.createElement("div"),this._cell.className="price-axis",this._cell.style.width="25px",this._cell.style.left="0",this._canvasConfiguredHandler=()=>{this._undoModel.model().lightUpdate()},this._canvasBinding=(0,Y.createBoundCanvas)(this._cell,(0,s.size)({width:16,height:16})),this._canvasBinding.subscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler);const h=this._canvasBinding.canvasElement;h.style.position="absolute",h.style.zIndex="1",h.style.left="0",h.style.top="0",this._topCanvasBinding=(0,Y.createBoundCanvas)(this._cell,(0,s.size)({width:16,height:16})),this._topCanvasBinding.subscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler);const d=this._topCanvasBinding.canvasElement;d.style.position="absolute",d.style.zIndex="2",d.style.left="0", -d.style.top="0",this._mouseEventHandler=new $.MouseEventHandler(this._cell,this,{treatVertTouchDragAsPageScroll:!1,treatHorzTouchDragAsPageScroll:!0}),this._options.currencyConversionEnabled||this._options.unitConversionEnabled?(this._currencyLabel=new Me,this._cell.appendChild(this._currencyLabel.element())):this._currencyLabel=null,this._properties.childs().fontSize.subscribe(this,this._onFontSizeChanged),this._options.mouseWheelScale&&(this._mouseWheelHelper=new ke,this._cell.addEventListener("wheel",this._onMousewheel.bind(this),{passive:!1})),this._axisInfo=l,this._offset=0,this.restoreDefaultCursor(),(0,Oe.currencyUnitVisibilityProperty)().subscribe(this,this._recalcCurrencyAndUnitVisibility),this._chart.anyPriceAxisHovered().subscribe(this._recalcCurrencyAndUnitVisibility),this._recalcCurrencyAndUnitVisibility(),this.update()}getContextMenuActions(){this._initActions();const e=(0,r.ensureNotNull)(this._actions),t=this._chart.actions(),i=[];return i.push(e.reset,new Ne.Separator,this._autoScaleAction()),this._isMainSeriesAxis()&&i.push(this._lockScaleAction()),i.push(t.scaleSeriesOnly,this._invertAction(),new Ne.Separator,this._regularScaleAction(),this._percentageAction(),this._indexedTo100Action(),this._logAction(),new Ne.Separator),c.CheckMobile.any()||(i.push(this._createMergeScalesAction()),i.push(new Ne.Separator)),Be.enabled("fundamental_widget")||i.push(new Ne.Action({actionId:"Chart.PriceScale.Labels",label:ze,subItems:[t.showSymbolLabelsAction,t.showSeriesLastValue,null,null,t.showHighLowPriceLabels,Be.enabled("show_average_close_price_line_and_label")?t.showAverageClosePriceLabel:null,null,t.showStudyPlotNamesAction,t.showStudyLastValue,e.alignLabels].filter(Boolean)})),i.push((0,Re.createLinesAction)(this._chart)),this._options.countdownEnabled&&i.push(t.showCountdown),this._undoModel.crossHairSource().isMenuEnabled()&&i.push(t.addPlusButton),!(0,c.onWidget)()&&Be.enabled("show_chart_property_page")&&Be.enabled("chart_property_page_scales")&&t.scalesProperties&&i.push(new Ne.Separator,t.scalesProperties),i}getElement(){return this._cell}onOptimalWidthNeedToBeRecalculated(e){const t=this.optimalWidth();(this._prevOptimalWidth{this._undoModel.model().fullUpdate(),this._updateTimeout=null}),100)),this._prevOptimalWidth=t}optimalWidth(){var e;if(!this.isVisible())return 0;let t=0;const i=this.rendererOptions();if(this._pane.hasState()){const i=(0,Y.getContext2D)(this._canvasBinding.canvasElement);i.font=this.baseFont();const s=this.backLabels(!0);for(let e=s.length;e--;){if(!s[e].isAxisLabelVisible())continue;const r=this._widthCache.measureText(i,s[e].text());t=Math.max(t,r);const n=s[e].secondLineText();n&&(t=Math.max(t,this._widthCache.measureText(i,n)));const o=s[e].thirdLineText();o&&(t=Math.max(t,this._widthCache.measureText(i,o)))}const r=this.priceScale(),n=r.marks();n.length>0&&(t=Math.max(t,this._widthCache.measureText(i,n[0].label),this._widthCache.measureText(i,n[n.length-1].label))) +Math.abs(this._totalDeltaY)>=Math.abs(3*this._totalDeltaX)&&(t.deltaX=0)),Le(t,e)}_reset(){this._totalDeltaX=0,this._totalDeltaY=0}}var Ee=i(68335),De=i(50792),Be=i(22512),Ve=i(2484),Re=i(6195),Ne=i(43986),Oe=i(35624),Fe=i(39267);i(91663);const We=new O.TranslatedString("change no overlapping labels",n.t(null,void 0,i(83935))),He=n.t(null,void 0,i(75633)),ze=n.t(null,void 0,i(94420)),Ue=n.t(null,void 0,i(81520)),je=n.t(null,void 0,i(25933)),Ge=n.t(null,void 0,i(17258)),qe=n.t(null,void 0,i(50834)),$e=n.t(null,{context:"scale_menu"},i(70361)),Ye=n.t(null,{context:"scale_menu"},i(47807)),Ke=n.t(null,{context:"scale_menu"},i(34727)),Xe=n.t(null,{context:"scale_menu"},i(72116)),Ze=n.t(null,{context:"scale_menu"},i(19238)),Je=n.t(null,{context:"scale_menu"},i(54138));const Qe=function(e){const t=new Be.LimitedPrecisionNumericFormatter(e);return(e,i)=>(0,S.isNumber)(i)&&!e.isLog()?t.format(i):""}(4),et={contextMenuEnabled:!0,currencyConversionEnabled:!1,unitConversionEnabled:!1,countdownEnabled:!0,contextMenu:{general:!0,source:!0},pressedMouseMoveScale:!0,mouseWheelScale:!0,pinchScale:!0,croppedTickMarks:!0};class tt{constructor(e,t,i,r,n,o,a,l,c){this._actions=null,this._priceScale=null,this._widthCache=new pe.TextWidthCache(1e3),this._color=null,this._fontSize=null,this._currencyFontSize=0,this._currencyLabelWidth=null,this._isVisible=!0,this._updateTimeout=null,this._currencyMenu=null,this._unitMenu=null,this._prevOptimalWidth=0,this._size=(0,s.size)({width:0,height:0}),this._currentCursorClassName="",this._destroyed=!1,this._highlighted=!1,this._mouseWheelHelper=null,this._dragScaleActive=!1,this._offset=NaN,this._pinching=!1,this._lastHittestResult=null,this._recalcCurrencyAndUnitVisibility=()=>{if(null===this._currencyLabel)return;let e=!0;switch((0,Oe.currencyUnitVisibilityProperty)().value()){case"alwaysOff":e=!1;break;case"visibleOnMouseOver":const t=this._chart.anyPriceAxisHovered().value(),i=null!==this._currencyMenu&&this._currencyMenu.isOpened(),s=null!==this._unitMenu&&this._unitMenu.isOpened();e=t||i||s}this._currencyLabel.setHidden(!e)},this._chart=e,this._pane=t,this._undoModel=i,this._properties=r,this._isLeft="left"===o,this._options=(0,S.merge)((0,S.clone)(et),a),this._rendererOptionsProvider=n,this._backgroundBasedTheme=c,this._cell=document.createElement("div"),this._cell.className="price-axis",this._cell.style.width="25px",this._cell.style.left="0",this._canvasConfiguredHandler=()=>{this._undoModel.model().lightUpdate()},this._canvasBinding=(0,Y.createBoundCanvas)(this._cell,(0,s.size)({width:16,height:16})),this._canvasBinding.subscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler);const h=this._canvasBinding.canvasElement;h.style.position="absolute",h.style.zIndex="1",h.style.left="0",h.style.top="0",this._topCanvasBinding=(0,Y.createBoundCanvas)(this._cell,(0,s.size)({width:16,height:16})),this._topCanvasBinding.subscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler);const d=this._topCanvasBinding.canvasElement;d.style.position="absolute",d.style.zIndex="2",d.style.left="0", +d.style.top="0",this._mouseEventHandler=new $.MouseEventHandler(this._cell,this,{treatVertTouchDragAsPageScroll:!1,treatHorzTouchDragAsPageScroll:!0}),this._options.currencyConversionEnabled||this._options.unitConversionEnabled?(this._currencyLabel=new Me,this._cell.appendChild(this._currencyLabel.element())):this._currencyLabel=null,this._properties.childs().fontSize.subscribe(this,this._onFontSizeChanged),this._options.mouseWheelScale&&(this._mouseWheelHelper=new ke,this._cell.addEventListener("wheel",this._onMousewheel.bind(this),{passive:!1})),this._axisInfo=l,this._offset=0,this.restoreDefaultCursor(),(0,Oe.currencyUnitVisibilityProperty)().subscribe(this,this._recalcCurrencyAndUnitVisibility),this._chart.anyPriceAxisHovered().subscribe(this._recalcCurrencyAndUnitVisibility),this._recalcCurrencyAndUnitVisibility(),this.update()}getContextMenuActions(){this._initActions();const e=(0,r.ensureNotNull)(this._actions),t=this._chart.actions(),i=[];return i.push(e.reset,new Ne.Separator,this._autoScaleAction()),this._isMainSeriesAxis()&&i.push(this._lockScaleAction()),i.push(t.scaleSeriesOnly,this._invertAction(),new Ne.Separator,this._regularScaleAction(),this._percentageAction(),this._indexedTo100Action(),this._logAction(),new Ne.Separator),c.CheckMobile.any()||(i.push(this._createMergeScalesAction()),i.push(new Ne.Separator)),Ve.enabled("fundamental_widget")||i.push(new Ne.Action({actionId:"Chart.PriceScale.Labels",label:ze,subItems:[t.showSymbolLabelsAction,t.showSeriesLastValue,null,null,t.showHighLowPriceLabels,Ve.enabled("show_average_close_price_line_and_label")?t.showAverageClosePriceLabel:null,null,t.showStudyPlotNamesAction,t.showStudyLastValue,e.alignLabels].filter(Boolean)})),i.push((0,Re.createLinesAction)(this._chart)),this._options.countdownEnabled&&i.push(t.showCountdown),this._undoModel.crossHairSource().isMenuEnabled()&&i.push(t.addPlusButton),!(0,c.onWidget)()&&Ve.enabled("show_chart_property_page")&&Ve.enabled("chart_property_page_scales")&&t.scalesProperties&&i.push(new Ne.Separator,t.scalesProperties),i}getElement(){return this._cell}onOptimalWidthNeedToBeRecalculated(e){const t=this.optimalWidth();(this._prevOptimalWidth{this._undoModel.model().fullUpdate(),this._updateTimeout=null}),100)),this._prevOptimalWidth=t}optimalWidth(){var e;if(!this.isVisible())return 0;let t=0;const i=this.rendererOptions();if(this._pane.hasState()){const i=(0,Y.getContext2D)(this._canvasBinding.canvasElement);i.font=this.baseFont();const s=this.backLabels(!0);for(let e=s.length;e--;){if(!s[e].isAxisLabelVisible())continue;const r=this._widthCache.measureText(i,s[e].text());t=Math.max(t,r);const n=s[e].secondLineText();n&&(t=Math.max(t,this._widthCache.measureText(i,n)));const o=s[e].thirdLineText();o&&(t=Math.max(t,this._widthCache.measureText(i,o)))}const r=this.priceScale(),n=r.marks();n.length>0&&(t=Math.max(t,this._widthCache.measureText(i,n[0].label),this._widthCache.measureText(i,n[n.length-1].label))) ;const o=(null===(e=r.mainSource())||void 0===e?void 0:e.firstValue())||null;if(null!==o){const e=r.coordinateToPrice(1,o),s=r.coordinateToPrice(this._size.height-2,o);if(Math.abs(e-s)>1e-14){const n=r.formatPrice(Math.floor(Math.min(e,s))+.11111111111111,o),a=r.formatPrice(Math.ceil(Math.max(e,s))-.11111111111111,o);t=Math.max(t,this._widthCache.measureText(i,n),this._widthCache.measureText(i,a))}}}let s=0;this._isCurrencyLabelEnabled()&&(null===this._currencyLabelWidth&&(this._currencyLabelWidth=(0,r.ensureNotNull)(this._currencyLabel).width()),s=Math.round(this._currencyLabelWidth));const n=t||34;let o=Math.max(s,Math.ceil(i.borderSize+i.offsetSize+i.paddingInner+i.paddingOuter+n+4));return o+=o%2,o}backLabels(e){const t=[],i=this._grouppedSources(),s=s=>{for(const r of s){if(!e&&i.topLevelSources.has(r))continue;const s=r.priceAxisViews(this._pane.state(),this.priceScale());if(s)for(const e of s)t.push(e)}};return s(i.sources),s(this._pane.state().customSources()),t}setSizeAndOffset(e,t){(0,s.equalSizes)(this._size,e)||(this._size=e,this._canvasBinding.resizeCanvasElement(e),this._topCanvasBinding.resizeCanvasElement(e),this._cell.style.width=e.width+"px",this._cell.style.height=e.height+"px",this._cell.style.minWidth=e.width+"px"),this._offset!==t&&(this._offset=t,this._cell.style.left=t+"px")}getWidth(){return this._size.width}getImage(){const e=this._size,t=(0,Y.createDisconnectedCanvas)(document,e);return(0,Y.getPrescaledContext2D)(t).drawImage(this._canvasBinding.canvasElement,0,0,e.width,e.height),null!==this._currencyLabel&&this._currencyLabel.isEnabled()&&this._currencyLabel.drawLabel((0,Y.getContext2D)(t),e.width,(0,Y.getCanvasDevicePixelRatio)(t)),t}update(){}paint(e){if(!this._isVisible||0===this._size.width||0===this._size.height)return;if(e===D.InvalidationLevel.None)return;const t=this._pane.state(),i=!t.maximized().value()&&t.collapsed().value();if(this._canvasBinding.applySuggestedBitmapSize(),this._topCanvasBinding.applySuggestedBitmapSize(),e>D.InvalidationLevel.Cursor){const e=(0,Y.getContext2D)(this._canvasBinding.canvasElement),t=(0,Y.getBindingPixelRatio)(this._canvasBinding);i||this._alignLabels(),this._drawBackground(e,t),this._drawBorder(e,t),this._pane.hasState()&&(this.updateCurrencyLabel(),i||(this._drawTickMarks(e,t),this._drawBackLabels(e,t)))}if(this._pane.hasState()&&!i){const e=(0,Y.getContext2D)(this._topCanvasBinding.canvasElement),t=(0,Y.getBindingPixelRatio)(this._topCanvasBinding);e.clearRect(0,0,Math.ceil(this._size.width*t)+1,Math.ceil(this._size.height*t)+1),this._drawCrossHairLabel(e,t)}}restoreDefaultCursor(){this._setCursor("")}priceScale(){return(0,r.ensureNotNull)(this._priceScale)}setPriceScale(e){this._priceScale!==e&&(null!==this._priceScale&&(this._priceScale.onMarksChanged().unsubscribe(this,this.onOptimalWidthNeedToBeRecalculated),this._priceScale.modeChanged().unsubscribeAll(this)),this._priceScale=e,null!==e&&(e.onMarksChanged().subscribe(this,this.onOptimalWidthNeedToBeRecalculated), e.modeChanged().subscribe(this,(()=>this.onOptimalWidthNeedToBeRecalculated(!0)))))}isVisible(){return this._isVisible}setVisible(e){(e=!!e)!==this._isVisible&&(this._cell.style.display=e?"table-cell":"none",this._isVisible=e)}destroy(){null!==this._currencyMenu&&(this._currencyMenu.close(),this._currencyMenu=null),null!==this._unitMenu&&(this._unitMenu.close(),this._unitMenu=null),this._topCanvasBinding.unsubscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler),this._topCanvasBinding.dispose(),this._canvasBinding.unsubscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler),this._canvasBinding.dispose(),null!==this._priceScale&&(this._priceScale.onMarksChanged().unsubscribe(this,this.onOptimalWidthNeedToBeRecalculated),this._priceScale.modeChanged().unsubscribeAll(this)),this._priceScale=null,this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=null),this._mouseEventHandler.destroy(),this._properties.childs().fontSize.unsubscribe(this,this._onFontSizeChanged),null!==this._actions&&this._actions.reset&&this._actions.reset.destroy(),(0,Oe.currencyUnitVisibilityProperty)().unsubscribeAll(this),this._chart.anyPriceAxisHovered().unsubscribe(this._recalcCurrencyAndUnitVisibility),this._chart.setPriceAxisHovered(this,!1),this._destroyed=!0}axisInfo(){return this._axisInfo}setHighlighted(e){this._highlighted=e}backgroundColor(){return this._pane.state().model().backgroundColor().value()}backgroundTopColor(){return this._pane.state().model().backgroundTopColor().value()}lineColor(){return this._properties.childs().lineColor.value()}textColor(){return this._properties.childs().textColor.value()}fontSize(){return this._properties.childs().fontSize.value()}baseFont(){return(0,X.makeFont)(this.fontSize(),ee.CHART_FONT_FAMILY,"")}rendererOptions(){let e=this._rendererOptionsProvider.options();return this._color===e.color&&this._fontSize===e.fontSize||(this._color=e.color),this._fontSize!==e.fontSize&&(this._widthCache.reset(),this._fontSize=e.fontSize,this._currencyLabelWidth=null,this._currencyFontSize=0,this._updateCurrencyLabelFont(),this.onOptimalWidthNeedToBeRecalculated()),e}mouseEnterEvent(e){this._chart.setPriceAxisHovered(this,!0),this._mouseEnterOrTouchStartEvent(e)}mouseMoveEvent(e){this._mouseOrTouchMoveEvent(e)}mouseDownEvent(e){this._mouseDownOrTouchStartEvent(e)}touchStartEvent(e){this._mouseOrTouchMoveEvent(e),this._mouseEnterOrTouchStartEvent(e),this._mouseDownOrTouchStartEvent(e)}pressedMouseMoveEvent(e){this._pressedMouseOrTouchMoveEvent(e)}touchMoveEvent(e){this._pressedMouseOrTouchMoveEvent(e)}pinchStartEvent(){}pinchEvent(e,t,i){if(this._zoomAvailable()&&this._options.pinchScale){if(this._dragScaleActive&&this._finishScale(),!this._pinching)return this._pinching=!0,void this._undoModel.startTwoPointsScalePrice(this._pane.state(),this.priceScale(),t.y,i.y);this._undoModel.twoPointsScalePriceTo(this._pane.state(),this.priceScale(),t.y,i.y)}}pinchEndEvent(){this._pinching=!1,this._undoModel.endTwoPointsScalePrice(this._pane.state(),this.priceScale())} -mouseDownOutsideEvent(){this._finishScale()}touchStartOutsideEvent(){this._finishScale()}mouseUpEvent(e){this._mouseUpOrTouchEndEvent(e)}touchEndEvent(e){this._mouseLeaveOrTouchEndEvent(e),this._mouseUpOrTouchEndEvent(e)}mouseClickEvent(e){this._mouseClickOrTapEvent(e)}tapEvent(e){this._mouseClickOrTapEvent(e)}mouseLeaveEvent(e){this._chart.setPriceAxisHovered(this,!1),this._mouseLeaveOrTouchEndEvent(e)}mouseDoubleClickEvent(e){this._mouseDoubleClickOrDoubleTapEvent(e)}doubleTapEvent(e){this._mouseDoubleClickOrDoubleTapEvent(e)}contextMenuEvent(e){this._contextMenuOrTouchContextMenuEvent(e)}touchContextMenuEvent(e){this._contextMenuOrTouchContextMenuEvent(e)}dataSourceAtPoint(e,t){const i=this._pane.state();if(!i.maximized().value()&&i.collapsed().value())return null;const s=this._grouppedSources(),r=[...s.sources,...s.topLevelSources,...i.customSources()];let n=null,o=null;if(!this._priceScale)return null;const a=(e,t)=>{var i;const s=null!==(i=null==o?void 0:o.result())&&void 0!==i?i:0;e.result()>s&&(o=e,n=t)},l=new B.Point(e,t);for(let e=r.length-1;e>=0;--e){const t=r[e],s=t.priceAxisViews(i,this._priceScale);if(s&&0!==s.length)for(let e=s.length-1;e>=0;--e){const i=s[e].renderer();if(void 0!==i.hitTest){const e=i.hitTest(l,this._size.width,this._isLeft?"left":"right");null!==e&&a(e,t)}}}return this._lastHittestResult=o,n}reset(){const e=this._pane.state(),t=this.priceScale();this._undoModel.resetPriceScale(e,t),this.onOptimalWidthNeedToBeRecalculated(!0)}sizeReady(){return this.getWidth()>=this.optimalWidth()&&null===this._updateTimeout}updateCurrencyLabel(){if(null===this._currencyLabel)return;let e=!1;if(this._options.currencyConversionEnabled){const t=this.priceScale().currency(this._undoModel.model().availableCurrencies());null===t||"alwaysOff"===(0,Oe.currencyUnitVisibilityProperty)().value()?(e=this._currencyLabel.currencyLabelEnabled(),this._currencyLabel.disableCurrency()):(e=!this._currencyLabel.currencyLabelEnabled(),this._currencyLabel.enableCurrency(),this._currencyLabel.updateColors(this.backgroundTopColor(),this.textColor()),e=this._currencyLabel.setCurrencyInfo(t)||e)}if(this._options.unitConversionEnabled){const t="alwaysOff"===(0,Oe.currencyUnitVisibilityProperty)().value(),i=this._undoModel.model().availableUnits(),s=this.priceScale().unit(i);null===s||t?(e=e||this._currencyLabel.unitLabelEnabled(),this._currencyLabel.disableUnit()):(e=e||!this._currencyLabel.unitLabelEnabled(),this._currencyLabel.enableUnit(),this._currencyLabel.updateColors(this.backgroundTopColor(),this.textColor()),e=this._currencyLabel.setUnitInfo(s)||e);const r=this.priceScale().measureUnitId(i);null===r||t?(e=e||this._currencyLabel.measureUnitIdLableEnabled(),this._currencyLabel.disableMeasureUnitId()):(e=e||!this._currencyLabel.measureUnitIdLableEnabled(),this._currencyLabel.enableMeasureUnitId(),this._currencyLabel.updateColors(this.backgroundTopColor(),this.textColor()),e=this._currencyLabel.setMeasureUnitIdInfo(r)||e)}this._updateCurrencyLabelFont(),e&&(this._currencyLabelWidth=null)}_grouppedSources(){var e +mouseDownOutsideEvent(){this._finishScale()}touchStartOutsideEvent(){this._finishScale()}mouseUpEvent(e){this._mouseUpOrTouchEndEvent(e)}touchEndEvent(e){this._mouseLeaveOrTouchEndEvent(e),this._mouseUpOrTouchEndEvent(e)}mouseClickEvent(e){this._mouseClickOrTapEvent(e)}tapEvent(e){this._mouseClickOrTapEvent(e)}mouseLeaveEvent(e){this._chart.setPriceAxisHovered(this,!1),this._mouseLeaveOrTouchEndEvent(e)}mouseDoubleClickEvent(e){this._mouseDoubleClickOrDoubleTapEvent(e)}doubleTapEvent(e){this._mouseDoubleClickOrDoubleTapEvent(e)}contextMenuEvent(e){this._contextMenuOrTouchContextMenuEvent(e)}touchContextMenuEvent(e){this._contextMenuOrTouchContextMenuEvent(e)}dataSourceAtPoint(e,t){const i=this._pane.state();if(!i.maximized().value()&&i.collapsed().value())return null;const s=this._grouppedSources(),r=[...s.sources,...s.topLevelSources,...i.customSources()];let n=null,o=null;if(!this._priceScale)return null;const a=(e,t)=>{var i;const s=null!==(i=null==o?void 0:o.result())&&void 0!==i?i:0;e.result()>s&&(o=e,n=t)},l=new V.Point(e,t);for(let e=r.length-1;e>=0;--e){const t=r[e],s=t.priceAxisViews(i,this._priceScale);if(s&&0!==s.length)for(let e=s.length-1;e>=0;--e){const i=s[e].renderer();if(void 0!==i.hitTest){const e=i.hitTest(l,this._size.width,this._isLeft?"left":"right");null!==e&&a(e,t)}}}return this._lastHittestResult=o,n}reset(){const e=this._pane.state(),t=this.priceScale();this._undoModel.resetPriceScale(e,t),this.onOptimalWidthNeedToBeRecalculated(!0)}sizeReady(){return this.getWidth()>=this.optimalWidth()&&null===this._updateTimeout}updateCurrencyLabel(){if(null===this._currencyLabel)return;let e=!1;if(this._options.currencyConversionEnabled){const t=this.priceScale().currency(this._undoModel.model().availableCurrencies());null===t||"alwaysOff"===(0,Oe.currencyUnitVisibilityProperty)().value()?(e=this._currencyLabel.currencyLabelEnabled(),this._currencyLabel.disableCurrency()):(e=!this._currencyLabel.currencyLabelEnabled(),this._currencyLabel.enableCurrency(),this._currencyLabel.updateColors(this.backgroundTopColor(),this.textColor()),e=this._currencyLabel.setCurrencyInfo(t)||e)}if(this._options.unitConversionEnabled){const t="alwaysOff"===(0,Oe.currencyUnitVisibilityProperty)().value(),i=this._undoModel.model().availableUnits(),s=this.priceScale().unit(i);null===s||t?(e=e||this._currencyLabel.unitLabelEnabled(),this._currencyLabel.disableUnit()):(e=e||!this._currencyLabel.unitLabelEnabled(),this._currencyLabel.enableUnit(),this._currencyLabel.updateColors(this.backgroundTopColor(),this.textColor()),e=this._currencyLabel.setUnitInfo(s)||e);const r=this.priceScale().measureUnitId(i);null===r||t?(e=e||this._currencyLabel.measureUnitIdLableEnabled(),this._currencyLabel.disableMeasureUnitId()):(e=e||!this._currencyLabel.measureUnitIdLableEnabled(),this._currencyLabel.enableMeasureUnitId(),this._currencyLabel.updateColors(this.backgroundTopColor(),this.textColor()),e=this._currencyLabel.setMeasureUnitIdInfo(r)||e)}this._updateCurrencyLabelFont(),e&&(this._currencyLabelWidth=null)}_grouppedSources(){var e ;const t=this._pane,i=t.state().model(),s=this._sameSideSources().slice(),r=t.state(),n=this.priceScale(),o=new Set,a=null!==(e=i.lineBeingEdited())&&void 0!==e?e:i.lineBeingCreated();a&&o.add(a);const l=i.customSourceBeingMoved();null!==l&&o.add(l),i.sourcesBeingMoved().forEach((e=>o.add(e))),i.selection().allSources().forEach((e=>o.add(e)));const c=i.hoveredSource();null!==c&&o.add(c);if(n===r.defaultPriceScale()){const e=this._pane.state().dataSources();for(const t of e)r.isOverlay(t)&&s.push(t)}return{sources:s,topLevelSources:o}}_isCurrencyLabelEnabled(){return null!==this._currencyLabel&&this._currencyLabel.isEnabled()}_updateCurrencyLabelFont(){if(null===this._currencyLabel)return;const e=this.fontSize();e!==this._currencyFontSize&&(this._currencyLabel.setFontSize(e),this._currencyFontSize=e,this._currencyLabelWidth=null,this.onOptimalWidthNeedToBeRecalculated())}_alignLabels(){var e,t;const i=this._size.height;let s=i/2;const r=[],n=this.priceScale(),o=n.orderedSources().slice(),a=this._pane.state(),l=this.rendererOptions();if(n===a.defaultPriceScale()){const e=a.priceDataSources();for(let t=0;t{if(e.ignoreAlignment()||!e.isVisible())return!1;const{total:t}=e.topBottomTotalHeight(l),s=e.floatCoordinate();return s>-t&&se.floatCoordinate()<=s)),d=r.filter((e=>e.floatCoordinate()>s));h.sort(((e,t)=>t.floatCoordinate()-e.floatCoordinate())),h.length>0&&d.length>0&&d.push(h[0]),d.sort(((e,t)=>e.floatCoordinate()-t.floatCoordinate()));for(const e of r)e.setFixedCoordinate(e.coordinate());if(n.properties().childs().alignLabels.value()){if(d.length>0||h.length>0){{const t=null!==(e=h[0])&&void 0!==e?e:d[0],s=t.getFixedCoordinate(),{top:r,bottom:n,total:o}=t.topBottomTotalHeight(l);o0&&t.setFixedCoordinate(r)}{const e=null!==(t=d[0])&&void 0!==t?t:h[0],s=e.getFixedCoordinate(),{top:r,bottom:n,total:o}=e.topBottomTotalHeight(l);oi&&e.setFixedCoordinate(i-n)}}for(let e=1;ea-n)t.setFixedCoordinate(a-n);else if(a>0&&o-s<0&&o+r>0){const{top:e}=i.topBottomTotalHeight(l);t.setFixedCoordinate(Math.min(a-e-r,s))}}for(let e=1;ei&&t.setFixedCoordinate(Math.max(a+r+e,i-s))}}}}_drawTickMarks(e,t){const i=this.priceScale().marks();e.save(),e.font=this.baseFont() ;const s=this.rendererOptions(),n=this._isLeft?Math.floor((this._size.width-s.offsetSize)*t):0,o=this._isLeft?Math.round(n-s.paddingInner*t):Math.round(n+(s.offsetSize+s.paddingInner)*t),a=this.fontSize(),l=this._isCurrencyLabelEnabled()?(0,r.ensureNotNull)(this._currencyLabel).labelBottom():0,c=i.map((t=>{if(this._options.croppedTickMarks)return{visible:!0,yCorrection:this._widthCache.yMidCorrection(e,t.label)};const i=t.coord-a/2,s=t.coord+a/2,r=!(s>this._size.height||ithis._size.height||i{for(let s=i.length;s--;){if(!c[s].visible)continue;const r=i[s];e.fillText(r.label,o/t,r.coord+c[s].yCorrection)}})),e.restore()}_hasAlertLabel(){return!1}async _showCurrenciesContextMenu(){if(null!==this._currencyMenu&&this._currencyMenu.isOpened())return void this._currencyMenu.close();(0,_e.trackEvent)("GUI","Currency conversion");const{currencyActions:e}=await Promise.all([i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(8271),i.e(4412),i.e(3795),i.e(9776),i.e(3687),i.e(962),i.e(3016),i.e(1075),i.e(2704)]).then(i.bind(i,12296)),t=await Ae(Ue,(()=>e(this._undoModel,(0,r.ensureNotNull)(this._currencyLabel).currencyInfo(),this.priceScale())),(0,r.ensureNotNull)(this._currencyLabel).currencyLabelElement(),(()=>this._recalcCurrencyAndUnitVisibility()));this._destroyed?t.close():this._currencyMenu=t}async _showUnitsContextMenu(){if(null!==this._unitMenu&&this._unitMenu.isOpened())return void this._unitMenu.close();(0,_e.trackEvent)("GUI","Unit conversion");const{unitActions:e}=await Promise.all([i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(8271),i.e(4412),i.e(3795),i.e(9776),i.e(3687),i.e(962),i.e(3016),i.e(1075),i.e(2704)]).then(i.bind(i,7690)),t=await Ae(je,(()=>e(this._undoModel,(0,r.ensureNotNull)(this._currencyLabel).unitInfo(),this.priceScale())),(0,r.ensureNotNull)(this._currencyLabel).unitLabelElement(),(()=>this._recalcCurrencyAndUnitVisibility()));this._destroyed?t.close():this._unitMenu=t}_onFontSizeChanged(){this._currencyLabelWidth=null,this._currencyFontSize=0,this._updateCurrencyLabelFont(),this.onOptimalWidthNeedToBeRecalculated()}_mouseOrTouchMoveEvent(e){if(!this._priceScale)return;this.dataSourceAtPoint(e.localX,e.localY)?this._setCursorClassName("pointer"):this._setResizeCursor()}_mouseDownOrTouchStartEvent(e){this._zoomAvailable()&&this._options.pressedMouseMoveScale&&!this._pinching&&(this._dragScaleActive=!0,this._undoModel.startScalePrice(this._pane.state(),this.priceScale(),e.localY))}_mouseEnterOrTouchStartEvent(e){this._setResizeCursor()}_pressedMouseOrTouchMoveEvent(e){if(this._dragScaleActive){const t=this.priceScale();this._undoModel.scalePriceTo(this._pane.state(),t,e.localY)}}_mouseUpOrTouchEndEvent(e){this._finishScale()}_finishScale(){this._dragScaleActive&&(this._undoModel.endScalePrice(this._pane.state(),this.priceScale()),this.restoreDefaultCursor(), this._dragScaleActive=!1)}_mouseClickOrTapEvent(e){if(this._currencyLabel){if(this._currencyLabel.currencyConversionAvailable()&&this._currencyLabel.currencyLabelElement().contains(e.target))return void this._showCurrenciesContextMenu();if(this._currencyLabel.unitConversionAvailable()&&this._currencyLabel.unitLabelElement().contains(e.target))return void this._showUnitsContextMenu()}const t=this.dataSourceAtPoint(e.localX,e.localY);t&&this._undoModel.selectionMacro((e=>{e.selection().isSelected(t)||(e.clearSelection(),e.addSourceToSelection(t))}))}_mouseLeaveOrTouchEndEvent(e){this._setCursorClassName("")}_mouseDoubleClickOrDoubleTapEvent(e){var t;const i=this.dataSourceAtPoint(e.localX,e.localY);i?this._pane.processDoubleClickOnSource(i,null!==(t=this._lastHittestResult)&&void 0!==t?t:void 0,{origin:"price_scale"}):(this.reset(),(0,_e.trackEvent)("GUI","Double click price scale"))}_contextMenuOrTouchContextMenuEvent(e){if(this._options.contextMenuEnabled){const t=this.dataSourceAtPoint(e.localX,e.localY);if(null!==t&&this._options.contextMenu.source){return void this._undoModel.model().selectionMacro((i=>{i.selection().isSelected(t)||(i.clearSelection(),i.addSourceToSelection(t)),this._pane.showContextMenuForSelection(e,{origin:"price_scale"})}))}this._options.contextMenu.general&&ae.ContextMenuManager.showMenu(this.getContextMenuActions(),e,{statName:"PriceScaleContextMenu"},{menuName:"PriceScaleContextMenu"})}}_setResizeCursor(){const e=this.priceScale();e.isPercentage()||e.isIndexedTo100()?this._setCursorClassName(""):this._zoomAvailable()&&(this._options.pressedMouseMoveScale||this._options.mouseWheelScale)&&this._setCursorClassName("ns-resize")}_setCursorClassName(e){let t="";e&&(t="price-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t)}_zoomAvailable(){return!this.priceScale().isEmpty()&&this._undoModel.model().zoomEnabled()}_onMousewheel(e){if(!this._zoomAvailable()||!this._options.mouseWheelScale)return;const t=(0,r.ensureNotNull)(this._mouseWheelHelper).processWheel(e).deltaY;if(0===t)return;e.cancelable&&e.preventDefault();const i=this._undoModel,s=this._pane.state(),n=this.priceScale(),o=this._cell.getBoundingClientRect(),a=e.clientY-o.top,l=a+15*t;i.startScalePrice(s,this.priceScale(),a,!0),i.scalePriceTo(s,n,l),i.endScalePrice(s,n),e.stopPropagation()}_drawCrossHairLabel(e,t){var i,s;e.save();const r=this._pane.state(),n=r.model(),o=this.priceScale(),a=[],l=this.priceScale()===r.defaultPriceScale(),c=null!==(i=n.lineBeingEdited())&&void 0!==i?i:n.lineBeingCreated();if(c&&(c.priceScale()===o||l&&r.isOverlay(c))){const e=c.priceAxisViews(r,o);e&&e.length&&a.push(e)}const h=n.customSourceBeingMoved();this._addViewsOrMaxMin(null===h?[]:[h],a),this._addViewsOrMaxMin(n.sourcesBeingMoved(),a),this._addViewsOrMaxMin(n.selection().allSources(),a);const d=n.hoveredSource();if(d){const e=r.customSources().includes(d)?o:d.priceScale() ;if(!n.selection().isSelected(d)&&(this._isFromSameSide(e)||l&&r.isOverlay(d))){const e=null===(s=n.hoveredSource())||void 0===s?void 0:s.priceAxisViews(r,o);e&&e.length&&a.push(e)}}const u=n.crossHairSource().priceAxisViews(r,o);u&&u.length&&a.push(u);const p=this.rendererOptions(),_=this._isLeft?"right":"left";a.forEach((i=>{i.forEach((i=>{e.save(),i.renderer().draw(e,p,this._widthCache,this._size.width,this._size.height,_,t),e.restore()}))})),e.restore()}_drawBackground(e,t){const i=Math.ceil(this._size.width*t),s=Math.ceil(this._size.height*t),r=this.backgroundTopColor(),n=this.backgroundColor();if(r===n?(0,Y.clearRect)(e,0,0,i+1,s+1,this.backgroundColor()):(0,K.clearRectWithGradient)(e,0,0,i+1,s+1,r,n),this._highlighted){e.globalAlpha=.5;const t=Z.themes[this._backgroundBasedTheme.value()].getThemedColor("color-price-axis-highlight");(0,Y.fillRect)(e,0,0,i+1,s+1,t),e.globalAlpha=1}const o=this._pane.state().model(),a=this.priceScale(),l=o.selection().lineDataSources().filter((e=>e.priceScale()===a)).reduce(((e,t)=>{const i=t.priceAxisPoints();return 0===i.length?e:e.concat(i)}),[]);l.length>0&&this._hightlightBackground(e,l,this.priceScale().mainSource(),t);const c=o.crossHairSource();c.startMeasurePoint()&&this._hightlightBackground(e,c.measurePoints(),this.priceScale().mainSource(),t)}_drawBorder(e,t){e.save(),e.fillStyle=this.lineColor();const i=Math.max(1,Math.floor(this.rendererOptions().borderSize*t)),s=this._isLeft?Math.floor(this._size.width*t)-i:0;e.fillRect(s,0,i,Math.ceil(this._size.height*t)+1),e.restore()}_drawBackLabels(e,t){e.save();const i=this.backLabels(),s=this.rendererOptions(),r=this._isLeft?"right":"left";for(const n of i)n.isAxisLabelVisible()&&(e.save(),n.renderer().draw(e,s,this._widthCache,this._size.width,this._size.height,r,t),e.restore());e.restore()}_hightlightBackground(e,t,i,s){if(!i)return;const r=i.firstValue();if(null===r)return;let n=t[0].price,o=t[0].price;for(let e=1;ei.isOverlay(e)||this._isFromSameSide(e.priceScale())))),0!==e.length)if(1===e.length){const r=e[0].priceAxisViews(i,s);r&&r.length&&t.push(r)}else t.push(this._minMaxViews(e))}_minMaxViews(e){const t=this._pane.state(),i=this.priceScale(),s=[];let r=1/0,n=-1/0,o=null,a=null;for(const s of e){const e=s.priceAxisViews(t,i);if(e&&e.length)for(let t=0;t=n&&(n=s,a=i),s<=r&&(r=s,o=i)}}return a&&s.push(a),o&&s.push(o),s}_isFromSameSide(e){return null!==e&&(this._isLeft?this._pane.state().leftPriceScales():this._pane.state().rightPriceScales()).includes(e)}_sameSideSources(){const e=this._pane.state().sourcesByGroup() ;return this._isLeft?e.leftPriceScalesSources():e.rightPriceScalesSources()}_initActions(){if(!this._pane.hasState()||null!==this._actions)return;const e=this._undoModel,t=new Ne.Action({actionId:"Chart.PriceScale.Reset",label:Ge,icon:Fe,shortcutHint:(0,Ee.humanReadableHash)(Ee.Modifiers.Alt+82),statName:"ResetScale",onExecute:()=>this.reset()}),i=new Ne.Action({actionId:"Chart.PriceScale.ToggleAutoScale",label:qe,checkable:!0,checked:!0,statName:"ToggleAutoScale",onExecute:()=>{e.togglePriceScaleAutoScaleMode(this.priceScale()),this._updateScalesActions()}}),s=new Ne.Action({actionId:"Chart.PriceScale.TogglePercentage",label:$e,checkable:!0,checked:this.priceScale().isPercentage(),statName:"TogglePercantage",onExecute:()=>{e.togglePriceScalePercentageScaleMode(this.priceScale()),this._updateScalesActions()}}),r=new Ne.Action({actionId:"Chart.PriceScale.ToggleIndexedTo100",label:Ye,checkable:!0,checked:this.priceScale().isIndexedTo100(),statName:"ToggleIndexedTo100",onExecute:()=>{e.togglePriceScaleIndexedTo100ScaleMode(this.priceScale()),this._updateScalesActions()}}),n=new Ne.Action({actionId:"Chart.PriceScale.ToggleLogarithmic",label:Ke,checkable:!0,checked:this.priceScale().isLog(),statName:"ToggleLogScale",onExecute:()=>{e.togglePriceScaleLogScaleMode(this.priceScale()),this._updateScalesActions()}}),o=new Ne.Action({actionId:"Chart.PriceScale.ToggleRegular",label:Xe,checkable:!0,checked:this.priceScale().isRegular(),statName:"ToggleRegularScale",onExecute:()=>{e.setPriceScaleRegularScaleMode(this.priceScale()),this._updateScalesActions()}}),a=new Ne.Action({actionId:"Chart.PriceScale.Labels.ToggleNoOverlappingLabelsVisibility",label:Ze,checkable:!0,checked:this.priceScale().properties().childs().alignLabels.value(),statName:"TogglePreciseLabels"});a.setBinding(new De.ActionBinder(a,this.priceScale().properties().childs().alignLabels,e,We));const l=new Ne.Action({actionId:"Chart.PriceScale.ToggleInvertScale",label:Je,checkable:!0,checked:this.priceScale().isInverted(),statName:"Invert Scale",onExecute:()=>{e.invertPriceScale(this.priceScale()),this._updateScalesActions()}});this._actions={reset:t,setAutoScale:i,setPercentage:s,setIndexedTo100:r,setLog:n,setRegular:o,alignLabels:a,invertScale:l},this._updateScalesActions()}_logAction(){return this._isMainSeriesAxis()?this._chart.actions().logSeriesScale:(0,r.ensureNotNull)(this._actions).setLog}_percentageAction(){return this._isMainSeriesAxis()?this._chart.actions().percentSeriesScale:(0,r.ensureNotNull)(this._actions).setPercentage}_indexedTo100Action(){return this._isMainSeriesAxis()?this._chart.actions().indexedTo100SeriesScale:(0,r.ensureNotNull)(this._actions).setIndexedTo100}_autoScaleAction(){return this._isMainSeriesAxis()?this._chart.actions().autoSeriesScale:(0,r.ensureNotNull)(this._actions).setAutoScale}_regularScaleAction(){return this._isMainSeriesAxis()?this._chart.actions().regularSeriesScale:(0,r.ensureNotNull)(this._actions).setRegular}_lockScaleAction(){ const e=this._chart.actions().lockSeriesScale,t=Qe(this.priceScale(),this._undoModel.model().mainSeriesScaleRatio());return e.update({hint:t}),e}_invertAction(){return this._isMainSeriesAxis()?this._chart.actions().invertSeriesScale:(0,r.ensureNotNull)(this._actions).invertScale}_isMainSeriesAxis(){return this.priceScale().hasMainSeries()}_updateScalesActions(){const e=this.priceScale(),t=this._isMainSeriesAxis(),i=(0,r.ensureNotNull)(e.mainSource()).properties(),s=t&&e.isLockScale(),n=t&&6===i.style.value(),o=(0,r.ensureNotNull)(this._actions);o.setRegular.update({checked:e.isRegular(),disabled:s||n}),o.setPercentage.update({checked:e.isPercentage(),disabled:s||n}),o.setIndexedTo100.update({checked:e.isIndexedTo100(),disabled:s||n}),o.setLog.update({checked:e.isLog(),disabled:s||n}),o.setAutoScale.update({checked:e.isAutoScale(),disabled:e.properties().childs().autoScaleDisabled.value()})}_createMergeScalesAction(){const e=this._chart.actions(),t=this._undoModel.model().priceScaleSlotsCount();if(t.left+t.right===1)return 0===t.left?e.moveScaleToLeft:e.moveScaleToRight;const i=[];return i.push(e.mergeLeftScalesAction),i.push(e.mergeRightScalesAction),new Ne.Action({actionId:"Chart.PriceScale.MergeAllScales",label:He,subItems:i})}_setCursor(e){let t="";"grabbing"!==e&&"ns-resize"!==e||(t="price-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t,this._cell.style.cursor)}}function it(e,t){return e.position-t.position}function st(e,t,i){const s=(e.position-t.position)/(e.time-t.time);return Math.sign(s)*Math.min(Math.abs(s),i)}class rt{constructor(e,t,i,s){this._position1=null,this._position2=null,this._position3=null,this._position4=null,this._animationStartPosition=null,this._durationMsecs=0,this._speedPxPerMsec=0,this._terminated=!1,this._minSpeed=e,this._maxSpeed=t,this._dumpingCoeff=i,this._minMove=s}addPosition(e,t){if(null!==this._position1){if(this._position1.time===t)return void(this._position1.position=e);if(Math.abs(this._position1.position-e)50)return;let i=0;const s=st(this._position1,this._position2,this._maxSpeed),r=it(this._position1,this._position2),n=[s],o=[r];if(i+=r,null!==this._position3){const e=st(this._position2,this._position3,this._maxSpeed);if(Math.sign(e)===Math.sign(s)){const t=it(this._position2,this._position3);if(n.push(e),o.push(t),i+=t,null!==this._position4){const e=st(this._position3,this._position4,this._maxSpeed);if(Math.sign(e)===Math.sign(s)){const t=it(this._position3,this._position4);n.push(e),o.push(t),i+=t}}}}let a=0;for(let e=0;ea&&(e.result={hittest:t,source:i,renderer:s,isCustom:r})}const Rt={contextMenuEnabled:!0,contextMenu:Re.defaultContextMenuOptions,priceScaleContextMenuEnabled:!0,legendWidgetEnabled:!0,controlsEnabled:!0,propertyPagesEnabled:!0,sourceSelectionEnabled:!0,countdownEnabled:!0},Nt=new Map([[H.AreaName.Text,"Text"],[H.AreaName.Style,"Style"]]),Ot=!Be.enabled("display_legend_on_all_charts");let Ft=null;function Wt(e,t){return!(0,H.shouldDefaultActionBeExecuted)(e,t,"pressedMouseMoveHandler","touchMoveHandler")}class Ht{constructor(e,t,i,r){this._legendWidget=null,this._paneControls=null,this._isDestroyed=!1,this._trackCrosshairOnlyAfterLongTap=(0,F.lastMouseOrTouchEventInfo)().isTouch,this._startTrackPoint=null,this._exitTrackingModeOnNextTry=!1,this._startMoveSourceParams=null,this._startChangeLineToolParams=null,this._preventSourceChange=!1,this._clonningAtMoveLineTools=null,this._startCloningPoint=null,this._size=(0,s.size)({width:0,height:0}),this._themedTopColor=null,this._initCrossHairPosition=null,this._firstZoomPoint=null,this._editDialog=null,this._processing=!1,this._pressedMoveStage=0,this._touchMove=!1,this._startTouchPoint=null,this._isSelecting=!1,this._prevHoveredHittest=null, +this._durationMsecs=function(e,t){const i=Math.log(t);return Math.log(1*i/-e)/i}(Math.abs(a),this._dumpingCoeff))}getPosition(e){const t=(0,r.ensureNotNull)(this._animationStartPosition),i=e-t.time;return t.position+this._speedPxPerMsec*(Math.pow(this._dumpingCoeff,i)-1)/Math.log(this._dumpingCoeff)}finished(e){return null===this._animationStartPosition||this._progressDuration(e)===this._durationMsecs}terminate(){this._terminated=!0}terminated(){return this._terminated}_progressDuration(e){const t=e-(0,r.ensureNotNull)(this._animationStartPosition).time;return Math.min(t,this._durationMsecs)}}var nt=i(40549),ot=i.n(nt),at=i(67278),lt=i(8771),ct=i(88029),ht=i(28729),dt=i(28667),ut=i(35936),pt=i(6947),_t=i(38780);async function mt(){return(await Promise.all([i.e(1960),i.e(962),i.e(139)]).then(i.bind(i,81200))).ErrorCardRenderer}var gt=i(71248),ft=i(73552);function vt(e){return"startMoving"in e&&"move"in e&&"endMoving"in e&&"convertYCoordinateToPriceForMoving"in e}var St=i(46936),yt=i(97425),bt=i(8342);i(93249);const wt=parseInt(bt["css-value-pane-controls-padding-left"]),Pt=parseInt(bt["css-value-pane-controls-padding-right"]),Ct=(0,R.getHexColorByName)("color-cold-gray-700"),Tt=(0,R.getHexColorByName)("color-cold-gray-400"),xt=new O.TranslatedString("scroll",n.t(null,void 0,i(68193))),It=n.t(null,void 0,i(82232));n.t(null,void 0,i(98478));function Mt(e,t,i){e.drawBackground&&e.drawBackground(t,i)}function At(e,t,i){e.draw(t,i)}function Lt(e,t){return e.paneViews(t)}function kt(e,t){return e.topPaneViews()}function Et(e,t){return e.labelPaneViews(t)}function Dt(e,t){const i=e.strategyOrdersPaneView();return null===i?null:[i]}function Bt(e,t){return null===e||e.source!==t?null:e.hittest.data()}function Vt(e,t,i,s,r){var n,o;const a=null!==(o=null===(n=e.result)||void 0===n?void 0:n.hittest.result())&&void 0!==o?o:0;t.result()>a&&(e.result={hittest:t,source:i,renderer:s,isCustom:r})}const Rt={contextMenuEnabled:!0,contextMenu:Re.defaultContextMenuOptions,priceScaleContextMenuEnabled:!0,legendWidgetEnabled:!0,controlsEnabled:!0,propertyPagesEnabled:!0,sourceSelectionEnabled:!0,countdownEnabled:!0},Nt=new Map([[H.AreaName.Text,"Text"],[H.AreaName.Style,"Style"]]),Ot=!Ve.enabled("display_legend_on_all_charts");let Ft=null;function Wt(e,t){return!(0,H.shouldDefaultActionBeExecuted)(e,t,"pressedMouseMoveHandler","touchMoveHandler")}class Ht{constructor(e,t,i,r){this._legendWidget=null,this._paneControls=null,this._isDestroyed=!1,this._trackCrosshairOnlyAfterLongTap=(0,F.lastMouseOrTouchEventInfo)().isTouch,this._startTrackPoint=null,this._exitTrackingModeOnNextTry=!1,this._startMoveSourceParams=null,this._startChangeLineToolParams=null,this._preventSourceChange=!1,this._clonningAtMoveLineTools=null,this._startCloningPoint=null,this._size=(0,s.size)({width:0,height:0}),this._themedTopColor=null,this._initCrossHairPosition=null,this._firstZoomPoint=null,this._editDialog=null,this._processing=!1,this._pressedMoveStage=0,this._touchMove=!1,this._startTouchPoint=null,this._isSelecting=!1,this._prevHoveredHittest=null, this._contextMenuX=0,this._contextMenuY=0,this._startScrollingPos=null,this._isScrolling=!1,this._scrollPriceScale=null,this._scrollXAnimation=null,this._prevPinchScale=1,this._pinching=!1,this._wasPinched=!1,this._longTap=!1,this._contextMenuOpenedOnLastTap=!1,this._paneControlsResizeObserver=null,this._lastClickedSource=null,this._customLegendWidgetsFactoryMap=new Map,this._prevMoveEventPosition=null,this._onMagnetStateChangedListener=this._onMagnetStateChanged.bind(this),this._onShiftKeyStateChangedListener=this._onShiftKeyStateChanged.bind(this),this._currentCursorClassName="",this._lastFinishedToolId=null,this._needResetMeasureLater=!1,this._currentChangingLineToolHitTest=null,this._currentMovingHitTest=null,this._prevTooltipData=null,this._errorRenderer=null,this._highlightedPriceAxis=new(ot())({owner:"",axis:null}),this._visuallyCollapsed=new(ot())(!1),this._endOfSeriesDataBanner=null,this._canvasConfiguredHandler=()=>this._state&&this._chartModel().lightUpdate(),this._updateVisuallyCollapsed=()=>{this._visuallyCollapsed.setValue(!this.state().maximized().value()&&this.state().collapsed().value())},this._chart=e,this._state=t,this._options=(0,S.merge)((0,S.clone)(Rt),i),this._paneWidgetsSharedState=r,this._state&&this._subscribeToState();const n={contextMenuEnabled:this._options.priceScaleContextMenuEnabled,pressedMouseMoveScale:this._options.handleScale.axisPressedMouseMove.price,mouseWheelScale:this._options.handleScale.mouseWheel,currencyConversionEnabled:this._options.currencyConversionEnabled,unitConversionEnabled:this._options.unitConversionEnabled,countdownEnabled:this._options.countdownEnabled,croppedTickMarks:this._options.croppedTickMarks};void 0!==this._options.priceScaleContextMenu&&(n.contextMenu=this._options.priceScaleContextMenu);const o=(e,t,i,s,r)=>new tt(this._chart,this,this._chartUndoModel(),i,t,e,n,s,r),a=e.properties().childs().scalesProperties,l=this._chartModel().rendererOptionsProvider(),c={backgroundBasedTheme:e.backgroundBasedTheme(),rendererOptionsProvider:l,getBackgroundTopColor:()=>this._chartModel().backgroundTopColor().value(),getBackgroundBottomColor:()=>this._chartModel().backgroundColor().value()},h={showLabels:!1};this._lhsPriceAxisesContainer=new ue(a,"left",o,c,h),this._rhsPriceAxisesContainer=new ue(a,"right",o,c,h),this._paneCell=document.createElement("td"),this._paneCell.classList.add("chart-markup-table","pane"),this._div=document.createElement("div"),this._div.classList.add("chart-gui-wrapper"),this._div.setAttribute("data-name","pane-widget-chart-gui-wrapper"),this._paneCell.appendChild(this._div),this._canvasBinding=(0,Y.createBoundCanvas)(this._div,(0,s.size)({width:16,height:16})),this._canvasBinding.subscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler);const d=this._canvasBinding.canvasElement;d.style.position="absolute",d.style.left="0",d.style.top="0",this._topCanvasBinding=(0,Y.createBoundCanvas)(this._div,(0,s.size)({width:16,height:16})),this._topCanvasBinding.subscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler) ;const u=this._topCanvasBinding.canvasElement;u.style.position="absolute",u.style.left="0",u.style.top="0",this._rowElement=document.createElement("tr"),this._rowElement.appendChild(this._lhsPriceAxisesContainer.getElement()),this._rowElement.appendChild(this._paneCell),this._rowElement.appendChild(this._rhsPriceAxisesContainer.getElement()),this._options.legendWidgetEnabled&&(this._options.customLegendWidgetFactories&&(this._customLegendWidgetsFactoryMap=this._options.customLegendWidgetFactories),this._loadAndCreateLegendWidget()),this._state&&!this._chart.readOnly()&&this._options.controlsEnabled&&this._loadAndCreatePaneControlsWidget(),(0,gt.magnetEnabled)().subscribe(this._onMagnetStateChangedListener),(0,ft.shiftPressed)().subscribe(this._onShiftKeyStateChangedListener),this._paneCell.addEventListener("dragover",(e=>{e.dataTransfer&&Array.from(e.dataTransfer.files).some(blobImageFilter)&&e.preventDefault()})),this.setCursorForTool(),this._mouseEventHandler=new $.MouseEventHandler(this._topCanvasBinding.canvasElement,this,{treatVertTouchDragAsPageScroll:!this._options.handleScroll.vertTouchDrag,treatHorzTouchDragAsPageScroll:!this._options.handleScroll.horzTouchDrag}),this._prevHoveredHittest=null,this._highlightedPriceAxis.subscribe((e=>this._highlightPriceAxisByLabel(e.axis))),this._prevPinchScale=0,this._isDestroyed=!1}destroy(){var e;this._chart.onPaneWidgetDestroyed(this),this._customLegendWidgetsFactoryMap.clear(),this._topCanvasBinding.unsubscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler),this._topCanvasBinding.dispose(),this._canvasBinding.unsubscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler),this._canvasBinding.dispose(),this._legendWidget&&(this._legendWidget.destroy(),this._legendWidget=null),null!==this._paneControlsResizeObserver&&this._paneControlsResizeObserver.disconnect(),null!==this._paneControls&&(this._paneControls.destroy(),this._paneControls=null),this._lhsPriceAxisesContainer.destroy(),this._rhsPriceAxisesContainer.destroy(),this.hasState()&&this._unsubscribeFromState(),(0,gt.magnetEnabled)().unsubscribe(this._onMagnetStateChangedListener),(0,ft.shiftPressed)().unsubscribe(this._onShiftKeyStateChangedListener),this._paneWidgetsSharedState.onPaneDestroyed(this),this._errorRenderer&&this._errorRenderer.then((e=>{e.destroy(),this._errorRenderer=null})),this._prevHoveredHittest=null,this._mouseEventHandler.destroy(),null===(e=this._rowElement.parentElement)||void 0===e||e.removeChild(this._rowElement),this._isDestroyed=!0}size(){return this._size}setSize(e){(0,s.equalSizes)(this._size,e)||(this._size=e,this._canvasBinding.resizeCanvasElement(e),this._topCanvasBinding.resizeCanvasElement(e),this._paneCell.style.width=e.width+"px",this._paneCell.style.height=e.height+"px",this._div.style.width=e.width+"px",this._div.style.height=e.height+"px",this._rowElement.classList.toggle("js-hidden",0===e.height),null!==this._legendWidget&&this._legendWidget.updateWidgetModeBySize(e),null!==this._paneControls&&this._paneControls.updateWidgetModeByWidth(e.width))}width(){ return this._size.width}height(){return this._size.height}backgroundColor(){return this._chartModel().backgroundColor().value()}highlightedPriceAxis(){return this._highlightedPriceAxis}processDoubleClickOnSource(e,t,i){(0,j.isDataSource)(e)&&e.id()!==this._lastFinishedToolId&&this._showEditDialogForSource(e,t)}stretchFactor(){return this._state?this._state.stretchFactor():0}setStretchFactor(e){this.hasState()&&this.state().setStretchFactor(e)}setCursorForTool(e,t,i){if(t&&t.mod()&&e)return void this._setCursorClassName("pointer");if(void 0!==i){switch(i){case pt.PaneCursorType.VerticalResize:this._setCursorClassName("ns-resize");break;case pt.PaneCursorType.HorizontalResize:this._setCursorClassName("ew-resize");break;case pt.PaneCursorType.DiagonalNeSwResize:this._setCursorClassName("nesw-resize");break;case pt.PaneCursorType.DiagonalNwSeResize:this._setCursorClassName("nwse-resize");break;case pt.PaneCursorType.Default:this._setCursorClassName("default");break;case pt.PaneCursorType.Pointer:this._setCursorClassName("pointer");break;case pt.PaneCursorType.Grabbing:this._setCursorClassName("grabbing")}return}const s=G.tool.value();if((0,G.toolIsCursor)(s)){if(null!==this._paneWidgetsSharedState.draggingSource()||this._isScrolling||this._chartUndoModel()&&this._chartUndoModel().model().sourcesBeingMoved().length)return void this._setCursorClassName("grabbing");if(e&&this._options.sourceSelectionEnabled)return void this._setCursorClassName("pointer")}if("eraser"===s)return void this._setCursorClassName("eraser");if("zoom"===s)return void this._setCursorClassName("zoom-in");const r=G.cursorTool.value();"dot"!==r?"arrow"!==r?this._setCursorClassName(""):this._setCursorClassName("default"):this._setCursorClassName("dot")}showContextMenuForSelection(e,t){const i=this._chartUndoModel().selection();if(i.isEmpty())return;const s=i.dataSources().filter((e=>e.hasContextMenu()));this.showContextMenuForSources(s,e,void 0,t)}async showContextMenuForSources(e,t,i,s){var r;if(!e.length)return Promise.resolve(null);const n=e[0],o=(0,S.merge)((0,S.clone)(this._options.contextMenu),i||{}),a=new Re.ActionsProvider(this._chart,o);if(n===this._chartUndoModel().crossHairSource())return n.handleContextMenuEvent(t),Promise.resolve(null);{const i=await a.contextMenuActionsForSources(e,t,null==s?void 0:s.origin);if(0===i.length)return Promise.resolve(null);{let e;return e=n instanceof St.Series?{menuName:"ObjectTreeContextMenu",detail:{type:"series",id:n.instanceId()}}:(0,L.isLineTool)(n)?{menuName:"ObjectTreeContextMenu",detail:{type:"shape",id:null!==(r=null==n?void 0:n.id())&&void 0!==r?r:null}}:{menuName:"ObjectTreeContextMenu",detail:{type:"study",id:(null==n?void 0:n.id())||null}},ae.ContextMenuManager.createMenu(i,void 0,e).then((e=>(e.show(t),e)))}}}leftPriceAxisesContainer(){return this._lhsPriceAxisesContainer}rightPriceAxisesContainer(){return this._rhsPriceAxisesContainer}setPriceAxisSizes(e,t,i){this._priceAxisesContainer(e).setSizes(t,i)}state(){return(0,r.ensureNotNull)(this._state)}hasState(){return null!==this._state} -setState(e){this._state!==e&&(this.hasState()&&this._unsubscribeFromState(),this._state=e,this.hasState()&&(this._subscribeToState(),this.updatePriceAxisWidgets()))}getScreenshotData(e){var t,i;const s=[],r=[];let n,o=[];const a=this.state().sourcesByGroup().priceSources().slice().reverse(),l=this._chart.properties().childs().paneProperties.childs().legendProperties.childs();for(const c of a){const a=c.statusView();if((0,k.isStudy)(c)&&(l.showLegend.value()||(null==e?void 0:e.showCollapsedStudies))){const t=l.showStudyTitles.value(),i=t;if(c.properties().childs().visible.value()&&a&&i){s.push(t?c.statusProvider(null==e?void 0:e.status).text():"");const i=c.valuesProvider().getValues(null);r.push(i)}}else if(c===this._chartModel().mainSeries()&&a&&l.showSeriesTitle.value()){n=c.statusProvider((null==e?void 0:e.status)||{}).text();const s=Be.enabled("use_last_visible_bar_value_in_legend")&&null!==(i=null===(t=this._chartModel().timeScale().visibleBarsStrictRange())||void 0===t?void 0:t.lastBar())&&void 0!==i?i:null;o=c.valuesProvider().getValues(s)}}return{type:"pane",leftAxis:this._lhsPriceAxisesContainer.getScreenshotData(),rightAxis:this._rhsPriceAxisesContainer.getScreenshotData(),content:this._canvasBinding.canvasElement.toDataURL(),canvas:this._canvasBinding.canvasElement,contentWidth:this._size.width,contentHeight:this._size.height,studies:s,studiesValues:r,containsMainSeries:this.containsMainSeries(),mainSeriesText:n,mainSeriesValues:o}}updatePriceAxisWidgets(){if(!this.hasState())return;const e=this._chartModel(),t=e.paneForSource(e.mainSeries());if(!t)return;const i=e.priceScaleSlotsCount(),s=this.state(),r=s.visibleLeftPriceScales(),n=s.visibleRightPriceScales();this._lhsPriceAxisesContainer.setScales(r,i.left,t.leftPriceScales().length,i.left+i.right),this._rhsPriceAxisesContainer.setScales(n,i.right,t.rightPriceScales().length,i.left+i.right)}update(){this.hasState()&&(this._lhsPriceAxisesContainer.update(),this._rhsPriceAxisesContainer.update(),null!==this._legendWidget&&this._legendWidget.update(),this.updateControls())}updateStatusWidget(e){this.hasState()&&null!==this._legendWidget&&(e.legendWidgetLayoutInvalidated()?this._legendWidget.updateLayout():this._legendWidget.update())}updateControls(){this.hasState()&&null!==this._paneControls&&this._paneControls.update()}updateThemedColors(e){this._themedTopColor=e.topColor,this._updateByThemedColors()}statusWidget(){return this._legendWidget}getElement(){return this._rowElement}canvasElement(){return this._canvasBinding.canvasElement}hasCanvas(e){return this._canvasBinding.canvasElement===e||this._topCanvasBinding.canvasElement===e}pinchStartEvent(){null===this._paneWidgetsSharedState.scrollingPane()&&null===this._paneWidgetsSharedState.pinchingPane()&&(this._onTouchEvent(),this._options.handleScale.pinch&&(this._chartModel().stopTimeScaleAnimation(),this._prevPinchScale=1,this._pinching=!0,this._wasPinched=!0,this._paneWidgetsSharedState.setPinchingPane(this)))}pinchEvent(e,t,i,s){ -if(null!==this._paneWidgetsSharedState.scrollingPane()||this._paneWidgetsSharedState.pinchingPane()!==this)return;if(this._onTouchEvent(),!this._options.handleScale.pinch)return;const r=10*(s-this._prevPinchScale);this._prevPinchScale=s,this._chartModel().zoomTime(e.x,r,!0),this._prevPinchScale=s}pinchEndEvent(){null===this._paneWidgetsSharedState.scrollingPane()&&this._paneWidgetsSharedState.pinchingPane()===this&&(this._onTouchEvent(),this._pinching=!1,this._paneWidgetsSharedState.setPinchingPane(null))}mouseClickEvent(e){this._onMouseEvent(),this._mouseClickOrTapEvent(e)}tapEvent(e){this._preventTouchEventsExceptPinch()||(this._onTouchEvent(),this._mouseClickOrTapEvent(e))}mouseDownEvent(e){this._onMouseEvent(),this.hasState()&&this._mouseDownOrTouchStartEvent(e,this._dataSourceAtPoint(e.localX,e.localY))}touchStartEvent(e){if(this._paneWidgetsSharedState.startTouch(this),this._preventTouchEventsExceptPinch())return;const t=!this._trackCrosshairOnlyAfterLongTap&&null!==Ft&&Ft.stateId===this.state().id()&&Math.abs(Ft.x-e.localX)+Math.abs(Ft.y-e.localY)<5;this._onTouchEvent(),this._chart.setActivePaneWidget(this);const i=this._dataSourceAtPoint(e.localX,e.localY);if(t){const t=this._chartModel().crossHairSource();null!==i&&i.source===t||t.selectPointMode().value()!==G.SelectPointMode.None?this.startTrackingMode(new B.Point(e.localX,e.localY),new B.Point(e.localX,e.localY)):!this._chart.readOnly()&&null!==i&&(0,L.isLineTool)(i.source)&&i.source.userEditEnabled()&&this._chartUndoModel().selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection(i.source,i.hittest.data())}))}this._mouseDownOrTouchStartEvent(e,i),this._mouseOrTouchMoveEvent(e)}mouseUpEvent(e){this._onMouseEvent(),this._mouseUpOrTouchEndEvent(e)}touchEndEvent(e){this._paneWidgetsSharedState.endTouch(this),this._preventTouchEventsExceptPinch()||(this._onTouchEvent(),this._mouseOrTouchLeaveEvent(e),this._mouseUpOrTouchEndEvent(e))}mouseMoveEvent(e){this._onMouseEvent(),this._mouseOrTouchMoveEvent(e)}pressedMouseMoveEvent(e){this._onMouseEvent(),this._pressedMouseOrTouchMoveEvent(e)}touchMoveEvent(e){this._preventTouchEventsExceptPinch()||(this._onTouchEvent(),this._pressedMouseOrTouchMoveEvent(e))}mouseLeaveEvent(e){this._onMouseEvent(),this._mouseOrTouchLeaveEvent(e)}mouseDoubleClickEvent(e){this._onMouseEvent(),this._mouseDoubleClickOrDoubleTapEvent(e)}wheelClickEvent(e){if(this._chart.readOnly())return;const t=this._dataSourceAtPoint(e.localX,e.localY);if(null===t||t.isCustom)return;if((t.hittest.result()||0)<=H.HitTestResult.MOVEPOINT_BACKGROUND)return;const i=new U.EnvironmentState(e),s=t.hittest.eraseMarker();if(i.mod()&&void 0!==s&&t.source.processErase)return void t.source.processErase(this._chartUndoModel(),s);const n=this._chartUndoModel();n.selection().isSelected(t.source)||n.selectionMacro((e=>{e.clearSelection();const i=(0,r.ensureNotNull)(t.source);e.addSourceToSelection(i,Vt(t,i))})),this._chart.removeSelectedSources()}doubleTapEvent(e){this._preventTouchEventsExceptPinch()||(this._onTouchEvent(),this._mouseDoubleClickOrDoubleTapEvent(e)) -}longTapEvent(e){if(null===this._state||this._preventTouchEventsExceptPinch())return;if(this._onTouchEvent(),this._longTap=!0,null!==this._startTrackPoint||!this._trackingModeShouldBeActive())return;const t=this._chartModel().selection();if(!t.isEmpty()){const i=this._dataSourceAtPoint(e.localX,e.localY);if(null!==i&&t.isSelected(i.source))return}this.startTrackingMode(new B.Point(e.localX,e.localY),new B.Point(e.localX,e.localY),new U.EnvironmentState(e))}mouseEnterEvent(e){this._onMouseEvent(),this.hasState()&&(this._chart.setActivePaneWidget(this),this._setCursorPosition(e.localX,e.localY,new U.EnvironmentState(e)))}contextMenuEvent(e){this._onMouseEvent(),this._contextMenuEvent(e)}touchContextMenuEvent(e){this._preventTouchEventsExceptPinch()||(this._onTouchEvent(),this._contextMenuEvent(e))}mouseDownOutsideEvent(e){this._processOutsideClick(null,e)}touchStartOutsideEvent(e){this._processOutsideClick(null,e)}cancelZoom(){this._chartModel().crossHairSource().clearSelection(),this._firstZoomPoint=null,this._preventCrossHairMove()&&this._clearCursorPosition()}startTrackingMode(e,t,i){this._startChangeLineToolParams=null,this._startMoveSourceParams=null,this._currentChangingLineToolHitTest=null,this._currentMovingHitTest=null,this._chartUndoModel().selectionMacro((e=>e.clearSelection())),this._startTrackPoint=e,this._exitTrackingModeOnNextTry=!1,this._setCursorPosition(t.x,t.y,i),this._initCrossHairPosition=this._chartModel().crossHairSource().currentPoint()}setDragToAnotherPaneCursor(){this._setCursorClassName("grabbing")}cloneLineTools(e,t){return this._chartUndoModel().cloneLineTools(e,t)}exitTrackingMode(){null!==this._state&&null!==this._startTrackPoint&&(this._exitTrackingModeOnNextTry=!0,this._tryExitTrackingMode())}trackingModeEnabled(){return null!==this._state&&null!==this._startTrackPoint}addCustomWidgetToLegend(e,t){this._options.legendWidgetEnabled&&(this._customLegendWidgetsFactoryMap.set(e,t),null!==this._legendWidget&&this._legendWidget.addCustomWidgetToLegend(e,t))}containsMainSeries(){return!!this.hasState()&&this.state().containsMainSeries()}paint(e){if(!this._chartUndoModel()||!this.hasState()||0===this._size.width||0===this._size.height)return;this._canvasBinding.applySuggestedBitmapSize(),this._topCanvasBinding.applySuggestedBitmapSize(),this._state&&(e.priceScaleSideMaxLevel("left")>D.InvalidationLevel.Cursor||e.priceScaleSideMaxLevel("right")>D.InvalidationLevel.Cursor)&&(this._recalculatePriceScales((0,yt.viewportChangeEvent)()),null!==Ft&&Ft.stateId===this.state().id()&&this._setCursorPosition(Ft.x,Ft.y,Ft.envState));const t=e.fullInvalidation();if(t>D.InvalidationLevel.Cursor&&null!==Ft&&Ft.stateId===this.state().id()){const e=this._dataSourceAtPoint(Ft.x,Ft.y);null!==e&&this._updateHoveredSource(e,(0,ft.globalEnvironmentState)())}if(this._lhsPriceAxisesContainer.paint(e.getterForPriceScaleInvalidationLevelBySide("left")),this._rhsPriceAxisesContainer.paint(e.getterForPriceScaleInvalidationLevelBySide("right")),t===D.InvalidationLevel.None)return -;const i=this._state&&(this._state.maximized().value()||!this._state.collapsed().value());if(t>D.InvalidationLevel.Cursor){const e=(0,r.ensureNotNull)(this._canvasBinding.canvasElement.getContext("2d"));e.setTransform(1,0,0,1,0,0);const t=this._canvasRenderParams();this._drawBackground(e,t),i&&this._drawSources(e,t)}if(null!==this._state){const e=(0,r.ensureNotNull)(this._topCanvasBinding.canvasElement.getContext("2d"));e.setTransform(1,0,0,1,0,0);const t=this._topCanvasRenderParams();e.clearRect(0,0,Math.ceil(this._size.width*t.pixelRatio),Math.ceil(this._size.height*t.pixelRatio)),i&&this._drawSeriesTopViews(e,t),this._drawCrossHair(e,t),i&&this._drawActiveLineTools(e,t)}}cancelCreatingLineTool(){const e=this._chartUndoModel(),t=this._chartUndoModel().lineBeingCreated();if(t)if(t.pointsCount()<=0&&!(0,dt.isLineDrawnWithPressedButton)(t.toolname)){const i=t.points();if(i.length>2){const s=i[i.length-2];e.continueCreatingLine(s),this._finishTool(t)}else e.cancelCreatingLine()}else e.cancelCreatingLine();null!==this._firstZoomPoint&&this.cancelZoom(),this.setCursorForTool()}drawRightThere(e){if((0,L.isLineToolName)(e)&&this.hasState()){const t=this._chartUndoModel(),i=t.crossHairSource(),s=t.model().magnet().align(i.price,i.index,this.state());t.createLineTool({pane:this.state(),point:{index:i.index,price:s},linetool:e})}}cancelMeasuring(){this._chartUndoModel().crossHairSource().clearMeasure(),(0,G.resetToCursor)(),this.setCursorForTool()}async setErrorMessage(e){var t,i,s;e&&!this._errorRenderer&&(this._errorRenderer=this._createErrorBlock()),null===(t=await this._errorRenderer)||void 0===t||t.update({message:null==e?void 0:e.message,icon:(null===(i=this._state)||void 0===i?void 0:i.containsMainSeries())||(null===(s=this._state)||void 0===s?void 0:s.maximized().value())?null==e?void 0:e.icon:void 0,backgroundColor:`linear-gradient(${this._chartModel().backgroundTopColor().value()}, ${this._chartModel().backgroundColor().value()})`,textColor:this._chartModel().isDark()?Tt:Pt,solutionId:null==e?void 0:e.solutionId})}collapsedHeight(){var e,t;return Math.max(Math.ceil(null!==(t=null===(e=this._paneControls)||void 0===e?void 0:e.bottomWithMargin())&&void 0!==t?t:0),33)}_topCanvasRenderParams(){return{pixelRatio:(0,Y.getBindingPixelRatio)(this._topCanvasBinding),physicalWidth:this._topCanvasBinding.canvasElement.width,physicalHeight:this._topCanvasBinding.canvasElement.height,cssWidth:this._chartModel().timeScale().width(),cssHeight:this.height()}}_canvasRenderParams(){return{pixelRatio:(0,Y.getBindingPixelRatio)(this._canvasBinding),physicalWidth:this._canvasBinding.canvasElement.width,physicalHeight:this._canvasBinding.canvasElement.height,cssWidth:this._chartModel().timeScale().width(),cssHeight:this.height()}}_tryExitTrackingMode(e){this._exitTrackingModeOnNextTry&&(this._startTrackPoint=null,e||this._clearCursorPosition())}_tryStartMeasure(e,t,i,s,r){return!(!(0,G.toolIsMeasure)(G.tool.value())||t.startMeasurePoint())&&(e.isTouch||this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,i), -s=this._chartModel().magnet().align(s,r,this.state()),t.startMeasuring({price:s,index:r},this.state()),!0)}_tryFinishMeasure(e,t){if(t.startMeasurePoint()&&!t.endMeasurePoint()){let i=t.price;const s=t.index;return i=this._chartModel().magnet().align(i,s,this.state()),t.finishMeasure({price:i,index:s}),e.isTouch?(0,G.resetToCursor)():this._needResetMeasureLater=!0,this._preventCrossHairMove()&&this._clearCursorPosition(),!0}return!1}_tryStartZoom(e,t,i,s){const r=this._chart.model().model().zoomEnabled();if("zoom"===G.tool.value()&&r){const r=this._chartUndoModel(),n=r.timeScale().indexToCoordinate(i)-.5*r.timeScale().barSpacing();return this._firstZoomPoint={price:t,index:i,x:n,y:e.localY},this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,s),this._chartModel().crossHairSource().startSelection(this.state()),!0}return!1}_finishZoom(e){const t=this.state(),i=t.defaultPriceScale(),s=(0,r.ensureNotNull)(t.mainDataSource()).firstValue(),n=i.coordinateToPrice(e.localY,(0,r.ensureNotNull)(s)),o=this._chartUndoModel(),a=Math.round(o.timeScale().coordinateToIndex(e.localX)),l=(0,r.ensureNotNull)(this._firstZoomPoint);a!==l.index&&o.zoomToViewport(l.index,a,l.price,n,t),this._chartModel().crossHairSource().clearSelection(),this._firstZoomPoint=null,(0,G.resetToCursor)(),this._preventCrossHairMove()&&this._clearCursorPosition()}_tryFinishZoom(e){return null!==this._firstZoomPoint&&(this._finishZoom(e),!0)}_tryHandleEraserMouseDown(e,t){if(!("eraser"!==G.tool.value()||e.isCustom||(i=e.source,i&&i.customization&&i.customization.disableErasing))){const i=this._chartUndoModel();if((0,L.isLineTool)(e.source)||(0,k.isStudy)(e.source)){const s=e.hittest.eraseMarker();return t.mod()&&void 0!==s&&e.source.processErase?e.source.processErase(i,s):i.removeSource(e.source,!1),!0}}var i;return!1}_tryStartChangingLineTool(e,t,i,s){var n,o;if(e.isTouch&&null!==this._startTrackPoint)return!1;const a=t.hittest;if((!e.isTouch||!this._preventSourceChange)&&a&&(0,L.isLineTool)(t.source)&&a.result()===H.HitTestResult.CHANGEPOINT){const l=this._chartUndoModel(),c=(0,r.ensure)(null===(n=this.state().mainDataSource())||void 0===n?void 0:n.firstValue()),h=(0,r.ensureNotNull)(t.source.priceScale()).coordinateToPrice(e.localY,c);l.selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection(t.source,a.data())}));let d=h;t.source.priceScale()===l.mainSeries().priceScale()&&(d=l.model().magnet().align(h,s,this.state()));const u=null===(o=a.data())||void 0===o?void 0:o.pointIndex;return this._startChangeLineToolParams={source:t.source,startPoint:{index:s,price:d},screenPoint:{x:e.localX,y:e.localY},pointIndex:u,envState:i},!0}return this._startChangeLineToolParams=null,!1}_tryStartCloning(e,t,i,s){if(i.mod()){const t=this._chartUndoModel().selection().dataSources().filter((e=>e.cloneable()));if(s&&s.cloneable()&&t.push(s),t.length>0)return this._clonningAtMoveLineTools=t.map((e=>e.id())),this._startCloningPoint=new B.Point(e.localX,e.localY),!0}return!1}_tryFinishClonning(e,t,i){const s=this._chartUndoModel(),n=this._chartModel() -;if(t.mod()&&this._clonningAtMoveLineTools){const o=new B.Point(e.localX,e.localY),a=(0,r.ensureNotNull)(this._startCloningPoint).subtract(o).length(),l=[];for(const e of this._clonningAtMoveLineTools){const t=n.dataSourceForId(e);null!==t&&l.push(t)}if(0===l.length)return!1;if(a>8){const n=this.cloneLineTools(l,!0).map((e=>(0,r.ensureNotNull)(s.model().dataSourceForId(e))));s.selectionMacro((e=>{e.clearSelection();let t=null;n.forEach((s=>{null===t&&(t=Vt(i,s)),e.addSourceToSelection(s,t)}))}));const o=new B.Point(e.localX,e.localY),a=(0,r.ensureNotNull)(n[0].priceScale()),c=(0,r.ensureNotNull)(this.state().mainDataSource()).firstValue(),h={index:s.timeScale().coordinateToIndex(e.localX),price:a.coordinateToPrice(e.localY,(0,r.ensureNotNull)(c))};s.startMovingSources(n,{logical:h,screen:o},null,t),this._clonningAtMoveLineTools=null,this._startCloningPoint=null}return!0}return!1}_mouseDownEventForLineTool(e,t,i,s){var n,o;const a=G.tool.value();if(!this.hasState()||(0,dt.isLineToolDrawWithoutPoints)(a))return;const l=this._chartUndoModel();let c=!1,h=null;(0,G.hideAllDrawings)().value()&&(0,N.toggleHideMode)(),(0,G.lockDrawings)().setValue(!1),e.isTouch&&!e.stylus&&((0,L.isLineToolName)(a)&&!(0,dt.isLineDrawnWithPressedButton)(a)||l.lineBeingCreated())&&this._initToolCreationModeParams(e);const d=l.lineBeingCreated();if(d&&!(0,dt.isLineDrawnWithPressedButton)(d.toolname)){const a=(0,r.ensure)(null===(n=d.ownerSource())||void 0===n?void 0:n.firstValue());if(e.isTouch&&!e.stylus){if(!this._startTouchPoint){this._startTouchPoint=new B.Point(e.pageX,e.pageY);const t=d.points(),i=t[t.length-1],s=l.timeScale().indexToCoordinate(i.index),n=(0,r.ensureNotNull)(d.priceScale()).priceToCoordinate(i.price,a);return void(this._initCrossHairPosition=new B.Point(s,n))}}else if(!e.isTouch){h=d;const n=l.model().paneForSource(d);if(n!==this._state&&null!==n){const i=this._externalPaneXCoord(n,e.localX),s=this._externalPaneYCoord(n,e.localY);c=l.continueCreatingLine({index:Math.round(l.timeScale().coordinateToIndex(i)),price:(0,r.ensure)(null===(o=d.priceScale())||void 0===o?void 0:o.coordinateToPrice(s,a))},t)}else{const e=l.model().magnet().align(s,i,this.state());c=l.continueCreatingLine({index:i,price:e},t)}}}else if(!e.isTouch||e.stylus||(0,dt.isLineDrawnWithPressedButton)(a)){const e={index:i,price:l.model().magnet().align(s,i,this.state())};h=l.createLineTool({pane:this.state(),point:e,linetool:a}),l.lineBeingCreated()||(c=!0)}const u=this._dataSourceAtPoint(e.localX,e.localY);h&&l.selectionMacro((e=>{e.addSourceToSelection((0,r.ensureNotNull)(h),null==u?void 0:u.hittest.data())})),c&&h&&(this._finishTool(h,u),e.preventDefault())}_handleSelectionMouseDownAndGetJustDeselectedSource(e,t,i){const s=this._chartUndoModel();let r=null;return(null===t||t.source.isSelectionEnabled())&&s.selectionMacro((s=>{!this._preventSourceChange&&null!==t&&(e.isTouch?t.hittest.result()>=H.HitTestResult.MOVEPOINT_BACKGROUND:t.hittest.result()>H.HitTestResult.MOVEPOINT_BACKGROUND)?(i.mod()||s.selection().isSelected(t.source)||s.clearSelection(), -i.mod()&&s.selection().isSelected(t.source)?(r=t.source,s.removeSourceFromSelection(t.source)):s.addSourceToSelection(t.source,t.hittest.data()),s.selection().allSources().length>1&&(0,_e.trackEvent)("GUI","Multiselect","Click Select")):i.mod()||s.clearSelection()})),r}_processMouseMoveWhileZoom(e,t){this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,t)}_updateCommonTooltip(e,t){let i=null;if(null!==e&&null!==e.hittest){const t=e.hittest.data();t&&(i=t.tooltip||null)}if(null===this._prevTooltipData&&null===i)return;if(null===i||""===i.text)return this._prevTooltipData=null,void(0,_t.hide)(t);if(this._prevTooltipData&&(0,V.default)(i,this._prevTooltipData))return;this._prevTooltipData=i;const s=(0,S.clone)(i);if(void 0!==s.rect){const e=this._paneCell.getBoundingClientRect();s.rect.x+=e.left,s.rect.y+=e.top}(0,_t.show)(s)}_setCursorPositionOnExternalPane(e,t,i,s){t=this._externalPaneXCoord(e,t),i=this._externalPaneYCoord(e,i);this._chart.paneByState(e)._setCursorPosition(t,i,s)}_setCursorPosition(e,t,i){this._updateLastCrosshairPosition(e,t,i),this._chartModel().setAndSaveCurrentPosition(this._correctXCoord(e),this._correctYCoord(t),this.state(),i)}_updateLastCrosshairPosition(e,t,i){const s=this.state().id();Ft={x:e,y:t,envState:i,stateId:s}}_setCursorClassName(e){let t="";e&&(t="pane--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._paneCell.classList.remove(this._currentCursorClassName),t&&this._paneCell.classList.add(t),this._currentCursorClassName=t,this._paneCell.style.cursor)}_processMouseUpOrTouchEndHandler(e){const t=this._dataSourceAtPoint(e.localX,e.localY);null!==t&&t.hittest.tryCallMouseUpOrTouchEndHandler(e)}_crossHairShouldBeVisible(){const e=this._chartModel().crossHairSource();return(0,L.isLineToolName)(G.tool.value())||(0,G.toolIsMeasure)(G.tool.value())||e.startMeasurePoint()&&!e.endMeasurePoint()||null!==this._firstZoomPoint||null!==this._chartModel().lineBeingEdited()||null!==this._chartModel().lineBeingCreated()}_clearCursorPosition(){Ft=null,this._chartModel().clearCurrentPosition()}_dataSourceAtPoint(e,t){if(!this.hasState())return null;const i={result:null},s=this._chartUndoModel();if((0,L.isLineToolName)(G.tool.value())||null!==s.lineBeingCreated())return i.result;if(this._currentChangingLineToolHitTest)return this._currentChangingLineToolHitTest;if(this._currentMovingHitTest)return this._currentMovingHitTest;const r=this.state(),n=r.height(),o=r.width(),a=Bt.bind(null,i),l=this._canvasRenderParams(),c=new B.Point(e,t);if(!this.state().maximized().value()&&this.state().collapsed().value()||(0,F.lastMouseOrTouchEventInfo)().isTouch&&(G.activePointSelectionMode.value()!==G.SelectPointMode.None||null!==this._startTrackPoint))return this._hitTestSources(l,[s.crossHairSource()],c,a,!1),i.result;const h=r.sourcesByGroup(),d=s.selection();this._hitTestSources(l,d.dataSources(),c,a,!1),this._hitTestSources(l,d.customSources(),c,a,!0);const u=new Set(d.allSources().map((e=>e.id())));this._hitTestSources(l,[s.crossHairSource()],c,a,!1,u), -this._hitTestSources(l,r.customSources(z.CustomSourceLayer.Topmost),c,a,!0,u),this._hitTestSources(l,h.tradingSources(),c,a,!1,u),this._hitTestSources(l,r.customSources(z.CustomSourceLayer.Foreground),c,a,!0,u);const p=[...this._chartModel().multiPaneSources(r),...h.hitTestSources()];if(this._hitTestSources(l,p,c,a,!1,u),this.containsMainSeries()){const e=s.activeStrategySource().value();if(null!==e){const t=e.strategyOrdersPaneView();if(null!==t){const s=t.renderer(n,o);if(null!==s){const t=s.hitTest(c,l);t&&Bt(i,t,e,s,!1)}}}}return null===i.result&&this._hitTestSources(l,r.customSources(z.CustomSourceLayer.Background),c,a,!0,u),i.result}_hitTestSources(e,t,i,s,n,o){const a=(0,r.ensureNotNull)(this._state),l=a.height(),c=a.width();for(let r=t.length-1;r>=0;--r){const h=t[r];if(void 0!==o&&o.has(h.id()))continue;const d=h.paneViews(a);if(null!==d&&0!==d.length)for(let t=d.length-1;t>=0;--t){const r=d[t].renderer(l,c);if(r&&r.hitTest){const t=r.hitTest(i,e);null!==t&&s(t,h,r,n)}}}}_tryStartMovingLineTool(e,t,i,s){var n;if(null===t.source||!t.source.movable()||null!==this._startTrackPoint)return!1;if(!this._preventSourceChange){const o=this._chartUndoModel(),a=(0,r.ensureNotNull)((0,r.ensureNotNull)(this._state).mainDataSource()).firstValue(),l=(0,r.ensureNotNull)(t.source.priceScale()).coordinateToPrice(e.localY,(0,r.ensureNotNull)(a));let c=(t.source.isSelectionEnabled()?o.selection().allSources():[t.source]).filter(vt);const h=c.filter(L.isLineTool);c=h.length>0?h:c.includes(t.source)?[t.source]:[c[0]];const d=new B.Point(e.localX,e.localY),u={index:s,price:l},p=null===(n=t.hittest.data())||void 0===n?void 0:n.activeItem;return this._startMoveSourceParams={source:c,startPoint:{logical:u,screen:d},activeItem:void 0===p?null:p,envState:i},!0}return this._startMoveSourceParams=null,!1}_chartModel(){return this._chart.model().model()}_chartUndoModel(){return this._chart.model()}_externalPaneXCoord(e,t){t+=this._div.getBoundingClientRect().left+document.body.scrollLeft;const i=(0,r.ensureNotNull)(this._chart.paneByState(e)),s=i._div.getBoundingClientRect().left+document.body.scrollLeft;return i._correctXCoord(t-s)}_externalPaneYCoord(e,t){t+=this._div.getBoundingClientRect().top+document.body.scrollTop;const i=(0,r.ensureNotNull)(this._chart.paneByState(e)),s=i._div.getBoundingClientRect().top+document.body.scrollTop;return i._correctYCoord(t-s)}_correctXCoord(e){return Math.max(0,Math.min(e,this._size.width-1))}_correctYCoord(e){return Math.max(0,Math.min(e,this._size.height-1))}_processScroll(e){if(!this._chart.model().model().scrollEnabled())return;const t=performance.now();this._startScrollingPos||this._preventScroll()||(this._startScrollingPos={x:e.clientX,y:e.clientY,timestamp:t,localX:e.localX,localY:e.localY});const i=this._chartUndoModel(),s=this._chartModel().timeScale();let r=this.state().defaultPriceScale();if(this._startScrollingPos&&!this._isScrolling&&(this._startScrollingPos.x!==e.clientX||this._startScrollingPos.y!==e.clientY)){if(i.beginUndoMacro(xt,!0), -null===this._scrollXAnimation&&this._options.useKineticScroll){const e=s.barSpacing();this._scrollXAnimation=new rt(.2/e,7/e,.997,15/e),this._scrollXAnimation.addPosition(s.rightOffset(),this._startScrollingPos.timestamp)}return i.selection().isEmpty()||(r=i.selection().allSources()[0].priceScale()),null===r||r.isEmpty()||(this._scrollPriceScale=r,i.startScrollPrice(this.state(),r,e.localY)),i.startScrollTime(e.localX),this._isScrolling=!0,this.setCursorForTool(),void this._paneWidgetsSharedState.setScrollingPane(this)}this._isScrolling&&(null!==this._scrollPriceScale&&i.scrollPriceTo(this.state(),this._scrollPriceScale,e.localY),i.scrollTimeTo(e.localX),null!==this._scrollXAnimation&&this._scrollXAnimation.addPosition(s.rightOffset(),t))}_finishScroll(){const e=this._chartUndoModel();e.endScrollTime(),null!==this._scrollPriceScale&&e.endScrollPrice(this.state(),this._scrollPriceScale),e.endUndoMacro(),this._isScrolling=!1,this._startScrollingPos=null,this._scrollPriceScale=null,this.setCursorForTool(),this._paneWidgetsSharedState.setScrollingPane(null)}_endScroll(e){if(!this._isScrolling)return!1;this._finishScroll();const t=this._scrollUndoCommandInStack(),i=performance.now(),s=this._chartUndoModel().timeScale();return null!==this._scrollXAnimation&&(this._scrollXAnimation.start(s.rightOffset(),i),this._scrollXAnimation.finished(i)||(this._chartModel().setTimeScaleAnimation(this._scrollXAnimation),this._scrollXAnimation=null)),t}_preventScroll(){return this._trackCrosshairOnlyAfterLongTap&&this._longTap||this._contextMenuOpenedOnLastTap||(0,L.isLineToolName)(G.tool.value())||Boolean(this._chartUndoModel().lineBeingCreated())||null!==this._startTrackPoint}_isSelectPointModeEnabled(){return this._chartUndoModel().crossHairSource().selectPointMode().value()!==G.SelectPointMode.None}_preventCrossHairMove(){return!!this._trackCrosshairOnlyAfterLongTap&&(null===this._chart.trackingModePaneWidget()&&(!!this._contextMenuOpenedOnLastTap||!this._crossHairShouldBeVisible()&&null===this._startTrackPoint))}_finishTool(e,t=null){const i=this._chartUndoModel(),s=e.toolname;if(s===G.tool.value()&&(0,G.resetToCursor)(),this._preventCrossHairMove()&&this._clearCursorPosition(),i.selectionMacro((i=>{i.addSourceToSelection(e,Vt(t,e))})),(0,dt.isTextToolName)(s)){const t=i.createUndoCheckpoint();this._chart.showChartPropertiesForSource(e,ut.TabNames.text,void 0,t).then((e=>{0}))}this._lastFinishedToolId=e.id(),(0,d.emit)("drawing_event",e.id(),"create"),(0,ht.trackDrawingCreated)(e)}_alignSourcesThatBeingMoved(e,t,i,s){const r=this._chartUndoModel(),n=r.timeScale().coordinateToIndex(t);r.model().sourcesBeingMoved().forEach((e=>{var o;let a=n,l=e.convertYCoordinateToPriceForMoving(i,this.state().mainDataSource());if(null!==l){if((0,k.isStudy)(e)){const e=r.mainSeries(),t=e.bars().firstIndex(),i=e.bars().lastIndex();null!==t&&null!==i&&(a=Math.min(Math.max(n,t),i)),l=this._chartModel().magnet().align(l,n,this.state())} -null!==this._currentMovingHitTest&&void 0!==(null===(o=this._currentMovingHitTest.hittest.data())||void 0===o?void 0:o.cursorType)||this.setCursorForTool(),r.moveSources({screen:new B.Point(t,i),logical:{index:a,price:l}},s)}}))}_resetMeasureIfRequired(){this._needResetMeasureLater&&((0,G.resetToCursor)(),this._needResetMeasureLater=!1)}_drawBackground(e,t){const i=Math.ceil(t.pixelRatio*this._size.width),s=Math.ceil(t.pixelRatio*this._size.height),r=this._chartModel(),n=r.backgroundTopColor().value(),o=r.backgroundColor().value();n===o?(0,Y.clearRect)(e,0,0,i+1,s+1,o):(0,K.clearRectWithGradient)(e,0,0,i+1,s+1,n,o)}_drawWatermark(e,t){const i=this._chartModel().watermarkSource();if(null===i)return;const s=this.state();if(!s.containsMainSeries())return;const r=i.paneViews(),n=s.height(),o=s.width();for(const i of r){e.save();const s=i.renderer(n,o);s&&s.draw(e,t),e.restore()}}_drawCrossHair(e,t){const i=this._chartUndoModel().crossHairSource();!i.visible&&(0,G.lockTimeAxis)().value()&&(i.setLockedPosition((0,r.ensureNotNull)(this._state)),i.updateAllViews((0,yt.sourceChangeEvent)(i.id()))),this._drawSourceImpl(e,t,Lt,At,i)}_drawActiveLineTools(e,t){const i=this._chartModel(),s=[i.lineBeingCreated(),i.lineBeingEdited(),...i.sourcesBeingMoved(),i.customSourceBeingMoved()].filter((e=>!!e));for(const r of s){(i.paneForSource(r)===this.state()||(0,j.isDataSource)(r)&&r.isMultiPaneEnabled())&&this._drawSourceImpl(e,t,Lt,At,r)}}_drawSeriesTopViews(e,t){this.state().containsMainSeries()&&this._drawSourceImpl(e,t,kt,At,this._chartUndoModel().mainSeries())}_drawSources(e,t){const i=this.state(),s=i.model(),r=i.sourcesByGroup(),n=r.tradingSources(),o=[...s.multiPaneSources(i),...r.generalSources()],a=r.phantomSources(),l=i.customSources(z.CustomSourceLayer.Background).slice(),c=i.customSources(z.CustomSourceLayer.Foreground).slice(),h=i.customSources(z.CustomSourceLayer.Topmost).slice();{const e=s.panes();for(let t=e.length-1;t>=0;t--)e[t].createDrawingsCaches()}this._drawSourceImpl(e,t,Lt,At,s.gridSource()),this._drawWatermark(e,t);for(const i of l)this._drawSourceImpl(e,t,Lt,Mt,i);for(const i of o)this._drawSourceImpl(e,t,Lt,Mt,i);for(const i of c)this._drawSourceImpl(e,t,Lt,Mt,i);for(const i of a)this._drawSourceImpl(e,t,Lt,Mt,i);const d=new Set;[s.lineBeingCreated(),s.lineBeingEdited(),...s.sourcesBeingMoved(),s.customSourceBeingMoved()].filter(S.notNull).forEach((e=>d.add(e.id())));let u=s.hoveredSource();null!==u&&((0,j.isDataSource)(u)&&!u.showOnTopOnHovering()||d.has(u.id())||(0,j.isDataSource)(u)&&!o.includes(u)?u=null:d.add(u.id()));const p=s.selection().allSources().filter((e=>!((0,j.isDataSource)(e)&&!o.includes(e))&&!d.has(e.id())));p.forEach((e=>d.add(e.id())));{for(const i of l)this._drawSourceImpl(e,t,Lt,At,i,d);for(const i of o)this._drawSourceImpl(e,t,Lt,At,i,d);for(const i of c)this._drawSourceImpl(e,t,Lt,At,i,d);const i=s.activeStrategySource().value();i&&this.containsMainSeries()&&this._drawSourceImpl(e,t,Dt,At,i)}for(const i of n)this._drawSourceImpl(e,t,Lt,Mt,i) -;for(const i of h)this._drawSourceImpl(e,t,Lt,Mt,i);for(const i of o)this._drawSourceImpl(e,t,Et,At,i,d);for(const i of c)this._drawSourceImpl(e,t,Et,At,i,d);for(const i of n)this._drawSourceImpl(e,t,Lt,At,i,d);for(const i of h)this._drawSourceImpl(e,t,Lt,At,i,d);for(const i of p)this._drawSourceImpl(e,t,Lt,At,i);for(const i of p)this._drawSourceImpl(e,t,Et,At,i);u&&(this._drawSourceImpl(e,t,Lt,At,u),this._drawSourceImpl(e,t,Et,At,u));for(const i of a)this._drawSourceImpl(e,t,Lt,At,i,d);{const e=s.panes();for(let t=e.length-1;t>=0;t--)e[t].clearDrawingCaches()}}_drawSourceImpl(e,t,i,s,r,n){if(n&&n.has(r.id()))return;const o=this.state(),a=o.height(),l=o.width(),c=i(r,this.state());if(c)for(const i of c){const r=i.renderer(a,l);r&&(e.save(),s(r,e,t),e.restore())}}_updateByThemedColors(){null!==this._legendWidget&&this._legendWidget.updateThemedColors(this._themedTopColor),null!==this._paneControls&&this._paneControls.updateThemedColors(this._themedTopColor)}_scrollUndoCommandInStack(){const e=this._chartUndoModel().undoHistory().undoStack();if(e.isEmpty())return!1;const t=e.head();if(!(t instanceof q.UndoMacroCommand))return!1;if(t.isEmpty())return!1;const i=t.commands()[0];return i instanceof lt.PriceScaleChangeUndoCommand||i instanceof at.TimeScaleChangeUndoCommand}_onStateDestroyed(){this.setState(null)}_onDataSourcesCollectionChanged(){this._startMoveSourceParams=null}_processMouseEnterLeaveMoveHandlers(e,t){var i,s,r,n;null===this._prevHoveredHittest||this._prevHoveredHittest.renderer===(null==e?void 0:e.renderer)&&(null===(i=this._prevHoveredHittest.hittest.data())||void 0===i?void 0:i.activeItem)===(null===(s=e.hittest.data())||void 0===s?void 0:s.activeItem)||((0,H.tryCallHandler)(t,null===(r=this._prevHoveredHittest.hittest.data())||void 0===r?void 0:r.mouseLeaveHandler),this._prevHoveredHittest=null),t.isTouch||null!==e&&((null===(n=this._prevHoveredHittest)||void 0===n?void 0:n.renderer)!==e.renderer&&(e.hittest.tryCallMouseEnterHandler(t),this._prevHoveredHittest=e),e.hittest.tryCallMouseMoveHandler(t))}_startChangeOrMoveLineToolIfNeeded(){if(null!==this._startChangeLineToolParams){const e=this._startChangeLineToolParams;this._chartUndoModel().startChangingLinetool(e.source,e.startPoint,e.pointIndex,e.envState)}if(null!==this._startMoveSourceParams){const e=this._startMoveSourceParams;this._chartUndoModel().startMovingSources(e.source,e.startPoint,e.activeItem,e.envState)}this._startMoveSourceParams=null,this._startChangeLineToolParams=null}_trackingModeShouldBeActive(){return!(!this._trackCrosshairOnlyAfterLongTap||this._contextMenuOpenedOnLastTap||this._crossHairShouldBeVisible())&&this._longTap}_processOutsideClick(e,t){var i;let s=null;const r=this._chartModel();if(null!==e&&(s=e.isCustom?r.customSourceName(e.source):e.source.id()),null!==this._lastClickedSource&&this._lastClickedSource.id!==s){const e=this._lastClickedSource.id;let i=this._lastClickedSource.isCustom?r.customSourceForName(e):r.dataSourceForId(e);null!==i||this._lastClickedSource.isCustom||(i=r.dataSourceForId(e)), -null!==i&&i.onClickOutside&&(i.onClickOutside(t),this._chartModel().updateSource(i))}this._lastClickedSource=null!==s?{id:s,isCustom:null!==(i=null==e?void 0:e.isCustom)&&void 0!==i&&i}:null}_mouseClickOrTapEvent(e){var t;if(!this.hasState())return;const i=this._dataSourceAtPoint(e.localX,e.localY),s=i&&i.source,n=this._chartUndoModel(),o=Boolean(null===(t=null==i?void 0:i.hittest.data())||void 0===t?void 0:t.hideCrosshairLinesOnHover);this._processOutsideClick(i,e),!this._isSelectPointModeEnabled()||o||e.isTouch&&this.trackingModeEnabled()&&!this._exitTrackingModeOnNextTry||n.crossHairSource().trySelectCurrentPoint(),null!==i&&i.hittest.tryCallClickOrTapHandler(e)&&n.model().updateSource((0,r.ensureNotNull)(s)),!e.isTouch||this._isSelectPointModeEnabled()||i&&i.source===n.crossHairSource()||this._tryExitTrackingMode(),s&&(0,L.isLineTool)(s)&&this._lastFinishedToolId!==s.id()&&(0,d.emit)("drawing_event",s.id(),"click"),this._resetMeasureIfRequired()}_mouseDownOrTouchStartEvent(e,t){var i,s,n,o,a;if(this._pressedMoveStage=1,e.isTouch&&(this._longTap=!1,this._exitTrackingModeOnNextTry=null!==this._startTrackPoint,this._paneWidgetsSharedState.clearDraggingSource()),this._contextMenuOpenedOnLastTap=!1,this._lastFinishedToolId=null,this._chartModel().stopTimeScaleAnimation(),e.isTouch&&this._switchTrackingModeFromAnotherPaneIfNeeded(e),document.activeElement!==document.body&&document.activeElement!==document.documentElement)document.activeElement&&document.activeElement.blur?document.activeElement.blur():document.body.focus();else{const e=document.getSelection();null!==e&&e.removeAllRanges()}(0,d.emit)("mouse_down",{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}),this._updateCommonTooltip(null);const l=this._chartUndoModel(),c=new U.EnvironmentState(e);l.mainSeries().clearGotoDateResult();const h=this.state().defaultPriceScale();if(h.isEmpty()||l.timeScale().isEmpty())return;const u=l.crossHairSource();if(!e.isTouch&&!(0,dt.isLineDrawnWithPressedButton)(G.tool.value())){const t=l.lineBeingCreated(),i=null!==t?l.model().paneForSource(t):null;null!==i&&i!==this._state?this._setCursorPositionOnExternalPane(i,e.localX,e.localY,c):this._setCursorPosition(e.localX,e.localY,c)}e.isTouch&&(0,L.isLineToolName)(G.tool.value())&&((0,dt.isLineDrawnWithPressedButton)(G.tool.value())||null!==u.pane?(0,dt.isLineDrawnWithPressedButton)(G.tool.value())&&this._clearCursorPosition():this._chart.updateCrossHairPositionIfNeeded());const p=(0,r.ensureNotNull)(this.state().mainDataSource()).firstValue();if(null===p)return void(this._chart.readOnly()||(this._handleSelectionMouseDownAndGetJustDeselectedSource(e,t,c),null!==t&&(0,ct.isPriceDataSource)(t.source)&&t.source.isDraggable()&&this._paneWidgetsSharedState.trySetDraggingSource(t.source,this)));let _=h.coordinateToPrice(e.localY,p),m=this._chartModel().timeScale().coordinateToIndex(e.localX);if(u.startMeasurePoint()&&u.endMeasurePoint()&&u.clearMeasure(), -c.shift()&&(null===t||!(null===(s=null===(i=t.hittest.data())||void 0===i?void 0:i.hasOwnShortcutsBehaviourFor)||void 0===s?void 0:s.shiftKey))&&(0,G.toolIsCursor)(G.tool.value())&&l.selection().isEmpty()&&G.tool.setValue("measure"),(e.isTouch&&!e.stylus||!this._tryStartMeasure(e,u,c,_,m))&&(e.isTouch&&!e.stylus||!this._tryFinishMeasure(e,u))&&!this._tryFinishZoom(e)&&!this._tryStartZoom(e,_,m,c)){if(e.isTouch&&(null!==this._startTrackPoint?(this._initCrossHairPosition=u.currentPoint(),this._startTrackPoint=new B.Point(e.localX,e.localY)):this._isSelectPointModeEnabled()&&null===this._chart.trackingModePaneWidget()&&this.startTrackingMode(new B.Point(e.localX,e.localY),new B.Point(e.localX,e.localY),new U.EnvironmentState(e))),e.isTouch&&(this._preventSourceChange=null===t||!l.selection().isSelected(t.source)),!this._isSelectPointModeEnabled()&&!this._isScrolling){if(e.isTouch&&!e.stylus&&((0,G.toolIsMeasure)(G.tool.value())||null!==u.measurePane().value()))return void this._initToolCreationModeParams(e);if((0,L.isLineToolName)(G.tool.value())||l.lineBeingCreated())return c.shift()||l.selectionMacro((e=>e.clearSelection())),void this._mouseDownEventForLineTool(e,c,m,_)}if(null!==t&&t.hittest.tryCallMouseDownOrTouchStartHandler(e),!this._chart.readOnly()){const i=this._handleSelectionMouseDownAndGetJustDeselectedSource(e,t,c);if(null!==t&&!this._preventSourceChange){const i=t.hittest.data();if(t.isCustom){if(t.hittest.hasPressedMoveHandler(e))return l.model().setMovingCustomSource(t.source,i),this._currentMovingHitTest=t,void l.selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection((0,r.ensureNotNull)(t.source),(0,r.ensureNotNull)(i))}))}else if((null==i?void 0:i.areaName)===H.AreaName.SourceItemMove){const s=null==i?void 0:i.activeItem;if(void 0!==s)return l.startCustomMoving(t.source,s,e),this._currentMovingHitTest=t,void l.selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection((0,r.ensureNotNull)(t.source),(0,r.ensureNotNull)(i))}))}}if(null!==t&&this._tryHandleEraserMouseDown(t,c))return;const s=null!==t&&(0,L.isLineTool)(t.source)&&t.source.isLocked&&t.source.isLocked();if(!((0,G.lockDrawings)().value()||s)&&null!==t&&!t.isCustom){if(!t.source.userEditEnabled())return;const s=null===(n=t.hittest.data())||void 0===n?void 0:n.snappingPrice,l=null===(o=t.hittest.data())||void 0===o?void 0:o.snappingIndex;let h=e.localY,d=e.localX;if(void 0!==s&&(h=(0,r.ensure)(null===(a=t.source)||void 0===a?void 0:a.priceScale()).priceToCoordinate(s,p),_=s),void 0!==l&&(d=this._chartModel().timeScale().indexToCoordinate(l),m=l),h===e.localY&&d===e.localX||(e={...e,localY:h,localX:d},this._setCursorPosition(e.localX,e.localY,c)),this._tryStartChangingLineTool(e,t,c,m))return void(this._currentChangingLineToolHitTest=t);if(this._currentChangingLineToolHitTest=null,(g=t.hittest.result())===H.HitTestResult.MOVEPOINT||g===H.HitTestResult.MOVEPOINT_BACKGROUND&&(0,F.lastMouseOrTouchEventInfo)().isTouch){if(this._tryStartCloning(e,t,c,i))return;if(this._tryStartMovingLineTool(e,t,c,m))return void(this._currentMovingHitTest=t) -;this._currentMovingHitTest=null}}if(null!==t&&(0,ct.isPriceDataSource)(t.source)&&t.source.isDraggable()&&this._paneWidgetsSharedState.trySetDraggingSource(t.source,this))return}var g;null!==t&&t.hittest.result()===H.HitTestResult.REGULAR||(this._processing=!0)}}_mouseUpOrTouchEndEvent(e){var t,i;if(!this.hasState())return;this._pressedMoveStage=0;const s=e.isTouch&&null!==this._startTrackPoint,n=e.isTouch&&this._wasPinched;e.isTouch&&(this._wasPinched=!1,this._longTap=!1),this._startMoveSourceParams=null,this._startChangeLineToolParams=null,this._currentChangingLineToolHitTest=null,this._currentMovingHitTest=null;const o=this._chartUndoModel(),a=o.model().customSourceMovingHitTestData();null!==a||o.customMoveBeingProcessed()||this._processMouseUpOrTouchEndHandler(e),this._isSelecting=!1;const l=o.model(),c=l.crossHairSource(),h=this._dataSourceAtPoint(e.localX,e.localY);if(c.selection()&&null===this._firstZoomPoint){const e=this.state().lineToolsForArea(c.selection());o.selectionMacro((t=>{let i=null;e.forEach((e=>{null===i&&(i=Vt(h,e)),t.addSourceToSelection(e,i)}))})),c.clearSelection(),(0,_e.trackEvent)("GUI","Multiselect","Area Select")}(0,d.emit)("mouse_up",{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY});const u=e.isTouch&&this._touchMove;e.isTouch&&(this._touchMove=!1);const p=new U.EnvironmentState(e),_=G.tool.value();if(e.isTouch&&((0,G.toolIsMeasure)(_)||null!==c.measurePane().value())){if(!u&&!e.stylus&&null===c.measurePane().value()&&c.pane!==this._state)return void this._setCursorPosition(e.localX,e.localY);if(!u&&!e.stylus&&this._tryStartMeasure(e,c,p,c.price,c.index))return;if((!u||e.stylus)&&this._tryFinishMeasure(e,c))return}if(e.isTouch&&!u&&!(0,dt.isLineDrawnWithPressedButton)(_)&&(0,L.isLineToolName)(_)&&!o.lineBeingCreated()){if(this._chart.justActivated())return;if(c.pane!==this._state)return void this._setCursorPosition(e.localX,e.localY,p);const i=c.currentPoint(),s=this.state().defaultPriceScale(),n=(0,r.ensure)(null===(t=this.state().mainDataSource())||void 0===t?void 0:t.firstValue()),a={index:Math.round(o.timeScale().coordinateToIndex(i.x)),price:s.coordinateToPrice(i.y,n)},l=(0,r.ensureNotNull)(o.createLineTool({pane:this.state(),point:a,linetool:_}));return o.selectionMacro((e=>{e.addSourceToSelection(l)})),o.lineBeingCreated()||(this._finishTool(l,h),e.preventDefault()),void(this._startTouchPoint=null)}const m=o.lineBeingCreated();if(m&&!(0,dt.isLineDrawnWithPressedButton)(m.toolname)&&e.isTouch&&(this._startTouchPoint||e.stylus)){if(this._startTouchPoint=null,!u||e.stylus){const t=m.points()[m.points().length-1],i=o.continueCreatingLine({index:t.index,price:t.price},new U.EnvironmentState(e));this._initCrossHairPosition=null,i&&(this._finishTool(m,h),e.preventDefault())}return}if(null!==this._firstZoomPoint&&this._firstZoomPoint.draggingMode)return void this._finishZoom(e);if(this._processing=!1,o.customMoveBeingProcessed())return void o.endCustomMoving();if(null!==a&&(a.beingMoved&&((0, -H.tryCallHandler)(e,a.mouseUpHandler,a.touchEndHandler),this.setCursorForTool()),l.setMovingCustomSource(null,null),Wt(e,a)))return;if(l.lineBeingEdited())return o.endChangingLinetool(!1),void(this._preventCrossHairMove()&&this._clearCursorPosition());if((0,dt.isLineDrawnWithPressedButton)(_)&&!this._isSelectPointModeEnabled()){const t=o.lineBeingCreated();null!==t&&((0,ht.trackDrawingCreated)(t),t.finish());const s=this.state().defaultPriceScale();if(s.isEmpty())return;if(!t)return;const n=(0,r.ensure)(null===(i=t.ownerSource())||void 0===i?void 0:i.firstValue()),a=s.coordinateToPrice(e.localY,n),l={index:Math.round(o.timeScale().coordinateToIndex(e.localX)),price:a};return void o.continueCreatingLine(l)}if(l.sourcesBeingMoved().length)return o.endMovingSource(!1,!1),l.sourcesBeingMoved().filter(L.isLineTool).forEach((e=>{this.setCursorForTool(e)})),void l.invalidate(D.InvalidationMask.cursor());if(!this._chart.readOnly()){const t=e.localX>=0&&e.localXH.HitTestResult.MOVEPOINT_BACKGROUND||(0,F.lastMouseOrTouchEventInfo)().isTouch)&&o.selectionMacro((e=>{e.clearSelection();const t=(0,r.ensureNotNull)(h.source);e.addSourceToSelection(t,Vt(h,t))})),e.isTouch&&(this._touchMove=!1)}_mouseOrTouchMoveEvent(e){if(!this.hasState())return;this._resetMeasureIfRequired();const t=this._dataSourceAtPoint(e.localX,e.localY);this._processMouseEnterLeaveMoveHandlers(t,e);const i=this._chartUndoModel();if(!i)return;const s=e.localX,r=e.localY;this._prevMoveEventPosition=new B.Point(s,r);const n=new U.EnvironmentState(e);if(null===this._firstZoomPoint){if(this._updateHoveredSource(t,n,e),!e.isTouch&&i.lineBeingCreated()){const e=i.lineBeingCreated(),t=null===e?null:i.model().paneForSource(e);if(null!==t&&t!==this._state)return void this._setCursorPositionOnExternalPane(t,s,r,n)}e.isTouch||this._setCursorPosition(s,r,n)}else this._processMouseMoveWhileZoom(e,n)}_pressedMouseOrTouchMoveEvent(e){var t -;if(!this.hasState()||this._pinching||e.isTouch&&this._contextMenuOpenedOnLastTap)return;this._pressedMoveStage=2,this._resetMeasureIfRequired(),this._startChangeOrMoveLineToolIfNeeded(),e.isTouch&&(this._touchMove=!0,this._preventSourceChange=!1);const i=new U.EnvironmentState(e),s=this._chartUndoModel(),n=s.crossHairSource(),o=e.localX,a=e.localY;if(this._prevMoveEventPosition=new B.Point(o,a),null!==this._firstZoomPoint)return this._processMouseMoveWhileZoom(e),void(this._firstZoomPoint.draggingMode=!0);const l=G.tool.value();if(e.isTouch&&this._startTouchPoint&&(0,L.isLineToolName)(l)&&!(0,dt.isLineDrawnWithPressedButton)(l)&&!s.lineBeingCreated()&&!this._isSelectPointModeEnabled())return void this._updateCrosshairPositionInToolCreationMode(e,this.state());const c=n.measurePane().value();if(e.isTouch&&(this._startTouchPoint||e.stylus)&&((0,G.toolIsMeasure)(l)||null!==c))return void(e.stylus?this._setCursorPosition(e.localX,e.localY,new U.EnvironmentState(e)):this._updateCrosshairPositionInToolCreationMode(e,c||this.state()));const h=s.lineBeingCreated();if(e.isTouch&&!e.stylus&&h&&!(0,dt.isLineDrawnWithPressedButton)(h.toolname)){if(this._startTouchPoint){const t=(0,r.ensureNotNull)(s.lineBeingCreated()),i=(0,r.ensureNotNull)(s.model().paneForSource(t));this._updateCrosshairPositionInToolCreationMode(e,i)}return}if(e.isTouch&&null!==this._startTrackPoint){this._exitTrackingModeOnNextTry=!1;const e=(0,r.ensureNotNull)(this._initCrossHairPosition),t=new B.Point(o,a).subtract(this._startTrackPoint),s=e.add(t);this._setCursorPosition(s.x,s.y,i)}else e.isTouch&&this._preventCrossHairMove()||this._setCursorPosition(o,a,i);const d=this._isSelectPointModeEnabled();if((0,L.isLineToolName)(l)&&!(0,dt.isLineDrawnWithPressedButton)(l)&&!d&&!i.mod())return;if((0,dt.isLineDrawnWithPressedButton)(l)&&!d){const i=this.state().defaultPriceScale();if(i.isEmpty())return;const n=s.lineBeingCreated();if(!n)return;const o=new B.Point(e.localX,e.localY),a=(0,r.ensure)(null===(t=n.ownerSource())||void 0===t?void 0:t.firstValue());return o.price=i.coordinateToPrice(e.localY,a),o.index=Math.round(s.timeScale().coordinateToIndex(e.localX)),void s.continueCreatingLine(o)}if(null!==this._paneWidgetsSharedState.draggingSource()){const t=e.target,i=this._chart.paneByCanvas(t);i&&(i!==this?i.setDragToAnotherPaneCursor():i.setCursorForTool());const s=this._chart.timeAxisByCanvas(t);s&&s.setCursor("grabbing")}if(s.timeScale().isEmpty())return;const u=this._options.handleScroll;if((!u.pressedMouseMove||e.isTouch)&&(!u.horzTouchDrag&&!u.vertTouchDrag||!e.isTouch))return;if(s.customMoveBeingProcessed())return void s.processCustomMove(e);const p=s.model().customSourceMovingHitTestData();if(null!==p&&(this._updateCommonTooltip(null,!0),s.model().processingCustomSourceMove(),(0,H.tryCallHandler)(e,p.pressedMouseMoveHandler,p.touchMoveHandler),Wt(e,p)))return;if(s.model().lineBeingEdited())return void this._setCursorPosition(o,a,i) -;if(s.model().sourcesBeingMoved().length)return void this._alignSourcesThatBeingMoved(s.model().sourcesBeingMoved(),e.localX,e.localY,i);const _=this._dataSourceAtPoint(e.localX,e.localY);if(this._tryFinishClonning(e,new U.EnvironmentState(e),_))return;const m=(0,G.toolIsMeasure)(l)||n.startMeasurePoint()&&n.endMeasurePoint();this._chart.readOnly()||!i.mod()||(0,L.isLineToolName)(l)||m||d?(this._processScroll(e),this._preventScroll()&&!this._preventCrossHairMove()&&null===this._startTrackPoint&&this._setCursorPosition(e.localX,e.localY,new U.EnvironmentState(e))):this._isSelecting||(n.startSelection(this.state()),this._isSelecting=!0)}_mouseOrTouchLeaveEvent(e){var t;if(!this.hasState())return;const i=this._chartUndoModel();if(!i)return;const s=i.crossHairSource();e.isTouch||null!==s.measurePane().value()&&null===s.endMeasurePoint()||this._clearCursorPosition(),i.model().setHoveredSource(null,null),null!==this._prevHoveredHittest&&((0,H.tryCallHandler)(e,null===(t=this._prevHoveredHittest.hittest.data())||void 0===t?void 0:t.mouseLeaveHandler),this._prevHoveredHittest=null),this._updateCommonTooltip(null),this._chart.unsetActivePaneWidget()}_mouseDoubleClickOrDoubleTapEvent(e){if(!this.hasState())return;const t=!this._chart.readOnly()&&!(0,L.isLineToolName)(G.tool.value())&&this._dataSourceAtPoint(e.localX,e.localY)||null;if(null!==t&&t.isCustom)t.hittest.tryCallDblClickOrDblTapHandler(e);else if(null!==t&&(e.isTouch||t.hittest.result()>H.HitTestResult.MOVEPOINT_BACKGROUND))this.processDoubleClickOnSource(t.source,t.hittest?t.hittest:void 0);else if(!this._chart.readOnly()&&!(0,L.isLineToolName)(G.tool.value())&&!this._chartUndoModel().lineBeingCreated()&&this._chartUndoModel().selection().isEmpty()){const t=this.state();new U.EnvironmentState(e).mod()&&!t.maximized().value()?(t.collapsed().value()||this._chartModel().paneCollapsingAvailable().value())&&this._chart.toggleCollapsedPane(this):this._chart.toggleMaximizePane(this)}}_contextMenuEvent(e){const t=this._chartUndoModel();if(t.crossHairSource().startMeasurePoint()&&!this._trackCrosshairOnlyAfterLongTap)return t.crossHairSource().clearMeasure(),void(0,G.resetToCursor)(!0);if(this._pinching)return;if(null===this._firstZoomPoint||this._trackCrosshairOnlyAfterLongTap||this.cancelZoom(),!(0,G.toolIsCursor)(G.tool.value())||this._isSelectPointModeEnabled()){if(e.isTouch)return;return(0,G.resetToCursor)(!0),this.setCursorForTool(),void(t.lineBeingCreated()&&t.cancelCreatingLine())}if(!this._options.contextMenuEnabled)return;const i=this._dataSourceAtPoint(e.localX,e.localY),s=i?i.source:null;if(e.isTouch&&null!==this._startTrackPoint){if(this._preventSourceChange)return;this._clearCursorPosition()}e.isTouch&&(this._contextMenuOpenedOnLastTap=!0,this._startTrackPoint=null),this._contextMenuX=e.localX,this._contextMenuY=e.localY;const r=i&&i.hittest?i.hittest.result():0,n=r>=H.HitTestResult.REGULAR||r>=H.HitTestResult.MOVEPOINT_BACKGROUND&&e.isTouch;this._chart.updateActions(),t.selectionMacro((t=>{null!==s&&n?t.selection().isSelected(s)||(t.clearSelection(), -t.addSourceToSelection(s,Vt(i,s))):(this._options.contextMenu.general&&this._showContextMenu(e),t.clearSelection())})),null!==i&&n&&null!==s&&((0,j.isDataSource)(s)&&s.hasContextMenu()?s.isSelectionEnabled()?this.showContextMenuForSelection(e):this.showContextMenuForSources([s],e):i.hittest.tryCallContextMenuHandler(e))}_onMouseEvent(){this._preventSourceChange=!1,this._startTrackPoint=null,this._trackCrosshairOnlyAfterLongTap=!1}_onTouchEvent(){this._trackCrosshairOnlyAfterLongTap=!0}_switchTrackingModeFromAnotherPaneIfNeeded(e){const t=this._chart.trackingModePaneWidget();if(null!==t&&t!==this){const i=this._chartModel().crossHairSource().currentPoint();t._exitTrackingModeOnNextTry=!0,t._tryExitTrackingMode(!0),this.startTrackingMode(new B.Point(e.localX,e.localY),new B.Point(i.x,e.localY),new U.EnvironmentState(e))}}_showContextMenu(e){const t=e=>e instanceof Ne.Separator,i=this._customActions(),s=this._initActions(e).filter((e=>null!==e));i.remove.forEach((e=>{for(let t=0;t0;e--)t(r[e])&&t(r[e-1])&&r.splice(e,1);r.length&&t(r[0])&&r.splice(0,1),r.length&&t(r[r.length-1])&&r.splice(r.length-1,1),ae.ContextMenuManager.showMenu(r,e,{statName:"ChartContextMenu"},{menuName:"ChartContextMenu"})}_initActions(e){var t,i;const s=this._chart.actions(),r=[];if(r.push(s.chartReset),r.push(new Ne.Separator),!this.state().isEmpty()&&Be.enabled("datasource_copypaste")){const t=(0,Re.createActionCopyPrice)(this.state(),e.localY),i=(0,Re.createPasteAction)(this._chart,this.state());(t||i)&&(t&&r.push(t),i&&r.push(i),r.push(new Ne.Separator))}r[r.length-1]instanceof Ne.Separator||r.push(new Ne.Separator);return Boolean(null===(t=window.widgetbar)||void 0===t?void 0:t.widget("watchlist"))&&s.addToWatchlist&&r.push(s.addToWatchlist),Be.enabled("text_notes")&&r.push(s.addToTextNotes),r[r.length-1]instanceof Ne.Separator||r.push(new Ne.Separator),r.push(this._createLockTimeAxisAction(e)),r.push(new Ne.Separator),r.push((0,Re.createLinesAction)(this._chart)),!Be.enabled("charting_library_base")&&s.applyColorTheme&&r.push(s.applyColorTheme),r[r.length-1]instanceof Ne.Separator||r.push(new Ne.Separator),this._chart.applyIndicatorsToAllChartsAvailable()&&(r.push(s.applyStudiesToAllCharts),r.push(new Ne.Separator)),r.push(s.paneRemoveAllDrawingTools),r.push(s.paneRemoveAllStudies),r.push(new Ne.Separator),(null===(i=window.pro)||void 0===i?void 0:i.hasPackage("mtp-mtpredictor"))&&this.state().containsMainSeries()&&r.push((0,Re.createMTPredictorActions)(this._chart,this.state(),this._contextMenuX,this._contextMenuY),new Ne.Separator),r.push(s.hideAllMarks),r.push(new Ne.Separator),Be.enabled("show_chart_property_page")&&r.push(s.chartProperties),r[r.length-1]instanceof Ne.Separator&&r.pop(),r}_loadAndCreateLegendWidget(){Promise.all([i.e(6847),i.e(5916),i.e(2215),i.e(5093)]).then(i.bind(i,19401)).then((e=>{if(this._isDestroyed)return;const t=e.LegendWidget,i=(0, -W.deepExtend)({},this._options.legendWidget);i.canShowSourceCode=!this._chart.onWidget()&&!c.CheckMobile.any(),i.readOnlyMode=i.readOnlyMode||this._chart.readOnly(),i.statusesWidgets={sourceStatusesEnabled:this._options.sourceStatusesWidgetEnabled,sourceStatuses:this._options.sourceStatusesWidget||{},marketStatusEnabled:this._options.marketStatusWidgetEnabled,dataUpdateModeEnabled:this._options.chartWarningWidgetEnabled,dataUpdateMode:this._options.chartWarningWidget||{},dataProblemEnabled:this._options.dataProblemWidgetEnabled};const s=(0,y.combine)(((e,t)=>Ot&&this._chart!==e&&!t),this._chart.chartWidgetCollection().activeChartWidget,this._chart.chartWidgetCollection().lock.crosshair),n=(0,y.combine)(((e,t)=>null!==e?e===this._state:(0,G.toolIsMeasure)(t)),this._chartModel().crossHairSource().measurePane(),G.tool);this._legendWidget=new t(this._chartUndoModel(),this,this._chart.backgroundTopTheme().spawn(),s,this._visuallyCollapsed.spawn(),n,i,{showContextMenuForSelection:this.showContextMenuForSelection.bind(this),showContextMenuForSources:this.showContextMenuForSources.bind(this),updateActions:this._chart.updateActions.bind(this._chart),showChartPropertiesForSource:this._chart.showChartPropertiesForSource.bind(this._chart),showGeneralChartProperties:this._chart.showGeneralChartProperties.bind(this._chart),showObjectsTreeDialog:this._chart.showObjectsTreeDialog.bind(this._chart)}),this._div.appendChild(this._legendWidget.getElement()),this._legendWidget.updateLayout(),this._legendWidget.updateWidgetModeBySize(this._size),this._legendWidget.updateThemedColors(this._themedTopColor);for(const e of Array.from(this._customLegendWidgetsFactoryMap.keys()))this._legendWidget.addCustomWidgetToLegend(e,(0,r.ensureDefined)(this._customLegendWidgetsFactoryMap.get(e)))}))}_loadAndCreatePaneControlsWidget(){Promise.all([Promise.all([i.e(6847),i.e(5916),i.e(2215),i.e(5093)]).then(i.bind(i,28756)),Promise.all([i.e(6847),i.e(5916),i.e(2215),i.e(5093)]).then(i.bind(i,59255))]).then((([e,t])=>{var i;if(this._isDestroyed)return;const s=e.PaneControlsWidget;this._paneControls=new s(this._chartUndoModel(),this,{backgroundThemeName:this._chart.backgroundTopTheme()},{toggleMaximizePane:this._chart.toggleMaximizePane.bind(this._chart),toggleCollapsedPane:this._chart.toggleCollapsedPane.bind(this._chart)},this._div),this._paneControls.updateWidgetModeByWidth(this._size.width),this._paneControls.updateThemedColors(this._themedTopColor),this._paneControlsResizeObserver=new t.default(this._handleRestrictLegendWidth.bind(this)),this._paneControlsResizeObserver.observe(this._paneControls.getElement()),(null===(i=this._state)||void 0===i?void 0:i.collapsed().value())&&this._chartModel().fullUpdate()}))}_handleRestrictLegendWidth(e){if(null===this._legendWidget||null===this._paneControls)return;const t=e[e.length-1].contentRect.width,i=0===t?0:t+wt+Ct;this._legendWidget.addMargin(i)}_onMagnetStateChanged(){ -this._chart.isActive()&&(this._isSelectPointModeEnabled()||this._isToolActionActiveOnPane(!0))&&this._chartModel().crossHairSource().visible&&this._updateLineToolUsingMagnetOrShift()}_onShiftKeyStateChanged(){this._chart.isActive()&&this._isToolActionActiveOnPane(!1)&&this._chartModel().crossHairSource().visible&&this._updateLineToolUsingMagnetOrShift(U.EnvironmentState.create((0,ft.shiftPressed)().value()))}_isToolActionActiveOnPane(e){const t=this._chartModel(),i=t.lineBeingCreated()||t.lineBeingEdited()||t.sourcesBeingMoved().length>0&&t.sourcesBeingMoved()[0];return i?t.paneForSource(i)===this._state:e&&(0,L.isLineToolName)(G.tool.value())&&t.crossHairSource().pane===this._state}_updateLineToolUsingMagnetOrShift(e){if(null===this._prevMoveEventPosition)return;const{x:t,y:i}=this._prevMoveEventPosition,s=this._chartModel().sourcesBeingMoved();s.length>0?(G.isStudyEditingNow.value()&&this._setCursorPosition(t,i,e),this._alignSourcesThatBeingMoved(s,t,i,e)):this._setCursorPosition(t,i,e)}_showEditDialogForSource(e,t){if(this._options.propertyPagesEnabled&&e.userEditEnabled())if(e===this._chartUndoModel().mainSeries())this._chart.showGeneralChartProperties(ut.TabNames.symbol);else if((0,L.isLineTool)(e)||(0,k.isStudy)(e)){let i;const s=null==t?void 0:t.data();if(null!=s){const e=s.areaName;void 0!==e&&(i=Nt.get(e))}this._chart.showChartPropertiesForSource(e,i).then((e=>{this._editDialog=e}))}}_initToolCreationModeParams(e){this._startTouchPoint=new B.Point(e.pageX,e.pageY),this._initCrossHairPosition=this._chartModel().crossHairSource().currentPoint()}_updateCrosshairPositionInToolCreationMode(e,t){if(t!==this._state){const i=this._chart.paneByState(t);return i._startTouchPoint=this._startTouchPoint,i._initCrossHairPosition=this._initCrossHairPosition,void i._updateCrosshairPositionInToolCreationMode(e,t)}const i=this._chartModel().crossHairSource();this._chart.justActivated()&&(this._initCrossHairPosition=i.currentPoint());const s=e.pageX,n=e.pageY,o=(0,r.ensureNotNull)(this._initCrossHairPosition),a=new B.Point(s,n).subtract((0,r.ensureNotNull)(this._startTouchPoint)),l=o.add(a);this._setCursorPosition(l.x,l.y,new U.EnvironmentState(e))}_priceAxisesContainer(e){return"left"===e?this._lhsPriceAxisesContainer:this._rhsPriceAxisesContainer}_recalculatePriceScales(e){const t=this.state();for(const i of t.leftPriceScales())t.recalculatePriceScale(i,e);for(const i of t.rightPriceScales())t.recalculatePriceScale(i,e);for(const i of t.sourcesByGroup().overlayPriceScaleSources())(0,L.isLineTool)(i)||t.recalculatePriceScale(i.priceScale(),e)}_createLockTimeAxisAction(e){const t=(0,G.lockTimeAxis)().value();return new Ne.Action({actionId:"Chart.Crosshair.LockVerticalCursor",label:It,statName:"LockCursorInTime",checkable:!0,checked:t,onExecute:()=>this._toggleLockTimeAxis(e.localX,!t)})}_toggleLockTimeAxis(e,t){if(t){const t=this._chartUndoModel().timeScale(),i=t.coordinateToIndex(e),s=t.points().roughTime(i);null!==s&&G.lockTimeAxisTime.setValue(s)}(0,G.lockTimeAxis)().setValue(t)}_preventTouchEventsExceptPinch(){ -return this._paneWidgetsSharedState.hasTouchesOnOtherPanes(this)||null!==this._paneWidgetsSharedState.pinchingPane()}_updateHoveredSource(e,t,i){var s,r;const n=this._chartUndoModel(),o=n.model();let a=!1;const l=e&&e.source,c=this._chart.readOnly();if(o.crossHairSource().isReplaySelection())this._setCursorClassName("none");else if(!(!c||e&&(0,L.isLineTool)(e.source))||this._editDialog&&this._editDialog.visible().value())c&&(o.setHoveredSource(null,null),this.setCursorForTool());else{const h=G.tool.value();let d=null;if(!this._processing&&((0,G.toolIsCursor)(h)||"eraser"===h&&!c||t.mod()||!n.lineBeingCreated())){const t=null==e?void 0:e.hittest;a=Boolean(null===(s=null==t?void 0:t.data())||void 0===s?void 0:s.hideCrosshairLinesOnHover),t&&t.result()>H.HitTestResult.MOVEPOINT_BACKGROUND?(d=l,!(null==l?void 0:l.isHoveredEnabled())||"eraser"===h&&l===n.mainSeries()?o.setHoveredSource(null,null):o.setHoveredSource(l,t.data())):o.setHoveredSource(null,null)}c?this.setCursorForTool(d,t,pt.PaneCursorType.Default):this._options.sourceSelectionEnabled&&(this._isSelectPointModeEnabled()?this._setCursorClassName("pointer"):this.setCursorForTool(d,t,null===(r=null==e?void 0:e.hittest.data())||void 0===r?void 0:r.cursorType));const u=o.customSourceBeingMoved(),p=null!==u?[u]:o.sourcesBeingMoved();if((!p.length||null!==e&&-1===p.indexOf(e.source))&&this._updateCommonTooltip(e),!c&&null!==e&&i&&e.hittest.hasPressedMoveHandler(i)){switch((e.hittest.data()||{}).cursorType){case pt.PaneCursorType.VerticalResize:this._setCursorClassName("ns-resize");break;case pt.PaneCursorType.HorizontalResize:this._setCursorClassName("we-resize");break;case pt.PaneCursorType.DiagonalNeSwResize:this._setCursorClassName("nesw-resize");break;case pt.PaneCursorType.DiagonalNwSeResize:this._setCursorClassName("nwse-resize")}}}this._preventCrossHairMove()&&this._clearCursorPosition(),1!==this._pressedMoveStage&&o.crossHairSource().setLinesShouldBeHidden(a)}async _createErrorBlock(){const e=new(await mt());return this._div.insertBefore(e.container,this._topCanvasBinding.canvasElement.nextSibling),e}_customActions(){const e={top:[],bottom:[],remove:[]},t=this._chartUndoModel().timeScale(),i=this._state&&this._state.defaultPriceScale();if(!Be.enabled("custom_items_in_context_menu"))return e;const s=t.isEmpty()?void 0:t.indexToUserTime(t.coordinateToIndex(this._contextMenuX));let n;if(i&&!i.isEmpty()){const e=(0,r.ensureNotNull)(this.state().mainDataSource()).firstValue();n=i.coordinateToPrice(this._contextMenuY,(0,r.ensureNotNull)(e))}return(0,d.emit)("onContextMenu",{unixtime:null!=s?s.getTime()/1e3:void 0,price:n,callback:t=>{[...t].forEach((t=>{if(t.text)if(t.text.length>1&&"-"===t.text[0])e.remove.push(t.text.slice(1));else{let i;i="-"===t.text?new Ne.Separator:new Ne.Action({actionId:"Chart.ExternalActionId",label:t.text,onExecute:t.click}),t.position&&"top"===t.position?e.top.push(i):e.bottom.push(i)}}))}}),e}_highlightPriceAxisByLabel(e){this._lhsPriceAxisesContainer.highlightPriceAxisByLabel(e), -this._rhsPriceAxisesContainer.highlightPriceAxisByLabel(e)}_subscribeToState(){const e=this.state();e.onDestroyed().subscribe(this,this._onStateDestroyed,!0),e.dataSourcesCollectionChanged().subscribe(this,this._onDataSourcesCollectionChanged),e.maximized().subscribe(this._updateVisuallyCollapsed),e.collapsed().subscribe(this._updateVisuallyCollapsed)}_unsubscribeFromState(){const e=this.state();e.onDestroyed().unsubscribeAll(this),e.dataSourcesCollectionChanged().unsubscribeAll(this),e.maximized().unsubscribe(this._updateVisuallyCollapsed),e.collapsed().unsubscribe(this._updateVisuallyCollapsed)}async _updateEndOfSeriesBanner(){}}var zt=i(51782);class Ut{constructor(e,t,i){this._handleEl=null,this._resizeInfo=null,this._colorCache={lineColor:"",backgroundColor:"",color:""},this._chart=e,this._topPaneIndex=t,this._bottomPaneIndex=i,this._row=document.createElement("tr"),this._cell=document.createElement("td"),this._row.appendChild(this._cell),this._cell.classList.add(zt.paneSeparator),this._cell.setAttribute("colspan","3"),this._cell.style.background=this._color(),this.adjustSize(),this._cell.addEventListener("click",(()=>{}));const s=document.createElement("div");s.classList.add(zt.handle),this._cell.appendChild(s),this._mouseEventHandler=new $.MouseEventHandler(s,this,{treatVertTouchDragAsPageScroll:!1,treatHorzTouchDragAsPageScroll:!0}),this._handleEl=s}destroy(){this._mouseEventHandler.destroy(),this._row.parentElement&&this._row.parentElement.removeChild(this._row)}getElement(){return this._row}hide(){this._row.classList.add("js-hidden")}show(){this._row.classList.remove("js-hidden")}adjustSize(){this._row.style.height=Ut.height()+"px"}mouseEnterEvent(e){const{topPane:t,bottomPane:i}=this._topBottomPane(!0);null!==t&&null!==i&&(0,r.ensureNotNull)(this._handleEl).classList.add(zt.hovered)}mouseLeaveEvent(e){(0,r.ensureNotNull)(this._handleEl).classList.remove(zt.hovered)}mouseDownEvent(e){this._mouseDownOrTouchStartEvent(e)}touchStartEvent(e){this._mouseDownOrTouchStartEvent(e)}pressedMouseMoveEvent(e){this._pressedMouseOrTouchMoveEvent(e)}touchMoveEvent(e){this._pressedMouseOrTouchMoveEvent(e)}mouseUpEvent(e){this._mouseUpOrTouchEndEvent(e)}touchEndEvent(e){this._mouseUpOrTouchEndEvent(e)}update(){this._cell.style.background=this._color().toString()}paint(){}image(){const{topPane:e}=this._topBottomPane(!1),t=e.leftPriceAxisesContainer().getWidth(),i=e.width(),r=e.rightPriceAxisesContainer().getWidth(),n=this._color(),o=(0,Y.createDisconnectedCanvas)(document,(0,s.size)({width:t,height:1})),a=(0,Y.getPrescaledContext2D)(o);a.fillStyle=n,a.fillRect(0,0,t,1);const l=(0,Y.createDisconnectedCanvas)(document,(0,s.size)({width:i,height:1})),c=(0,Y.getPrescaledContext2D)(l);c.fillStyle=n,c.fillRect(0,0,i,1);const h=(0,Y.createDisconnectedCanvas)(document,(0,s.size)({width:r,height:1})),d=(0,Y.getPrescaledContext2D)(h);return d.fillStyle=n,d.fillRect(0,0,r,1),{type:"separator",leftAxis:{content:o.toDataURL(),canvas:o,contentWidth:t,contentHeight:1},rightAxis:{content:h.toDataURL(),canvas:h,contentWidth:r,contentHeight:1 -},content:l.toDataURL(),canvas:l,contentWidth:i,contentHeight:1}}static height(){const e=window.devicePixelRatio||1;return e>=1?1:1/e}_mouseDownOrTouchStartEvent(e){const{topPane:t,bottomPane:i}=this._topBottomPane(!0);if(null===t||null===i)return;const s=t.state().stretchFactor()+i.state().stretchFactor(),n=s/(t.height()+i.height()),o=30*n;s<=2*o||(this._resizeInfo={startY:e.pageY,prevStretchTopPane:t.state().stretchFactor(),maxPaneStretch:s-o,totalStretch:s,pixelStretchFactor:n,minPaneStretch:o},(0,r.ensureNotNull)(this._handleEl).classList.add(zt.active))}_pressedMouseOrTouchMoveEvent(e){const{topPane:t,bottomPane:i}=this._topBottomPane(!0),s=this._resizeInfo;if(null===s||null===t||null===i)return;const r=(e.pageY-s.startY)*s.pixelStretchFactor,n=(0,Se.clamp)(s.prevStretchTopPane+r,s.minPaneStretch,s.maxPaneStretch);t.state().setStretchFactor(n),i.state().setStretchFactor(s.totalStretch-n),this._chart.model().model().fullUpdate()}_mouseUpOrTouchEndEvent(e){const{topPane:t,bottomPane:i}=this._topBottomPane(!0),s=this._resizeInfo;null!==s&&null!==t&&null!==i&&(this._chart.model().addPaneStretchFactorUndoCommand(t.state(),i.state(),s.prevStretchTopPane,t.state().stretchFactor()),this._resizeInfo=null,(0,r.ensureNotNull)(this._handleEl).classList.remove(zt.active))}_color(){const e=this._chart.properties().childs().paneProperties.childs().separatorColor.value(),t=this._chart.model().model().backgroundColor().value();if(this._colorCache.lineColor!==e||this._colorCache.backgroundColor!==t){const i=(0,me.parseRgba)(t),s=(0,me.parseRgba)(e),r=0===i[3]&&0===s[3]?"rgba(0,0,0,0)":(0,me.rgbaToString)((0,me.blendRgba)(i,s));this._colorCache={lineColor:e,backgroundColor:t,color:r}}return this._colorCache.color}_topBottomPane(e){const t=this._chart.paneWidgets();let i=null,s=null;for(let s=this._topPaneIndex;s>=0;--s){const r=t[s];if(!e||!r.state().collapsed().value()){i=r;break}}for(let i=this._bottomPaneIndex;ithis.backgroundColor(),a=()=>{throw new Error("Time axis does not support real price scales")},l={titlesProvider:i,stubContextMenuProvider:(e,t)=>{const i=this.getContextMenuActions(!0);let s=r(e,t);if(s[s.length-1]===this.chart.actions().scalesProperties){const e=[new Ne.Separator].concat(i);Array.prototype.splice.apply(s,[s.length-2,0,...e])}else s.push(new Ne.Separator),s=s.concat(i);return s},backgroundBasedTheme:n, -rendererOptionsProvider:e.model().model().rendererOptionsProvider(),getBackgroundTopColor:o,getBackgroundBottomColor:o,showHorizontalBorder:!0};this._lhsStubContainer=new ue(this._properties,"left",a,l,this._options.priceAxisLabelsOptions,this),this._lhsStubContainer.onLabelHovered().subscribe(this,((e,t)=>{this._onLabelHovered.fire(e,t)})),this._rhsStubContainer=new ue(this._properties,"right",a,l,this._options.priceAxisLabelsOptions,this),this._rhsStubContainer.onLabelHovered().subscribe(this,((e,t)=>{this._onLabelHovered.fire(e,t)})),this._element.appendChild(this._lhsStubContainer.getElement()),this._cell=document.createElement("td"),this._element.appendChild(this._cell),this._cell.classList.add("chart-markup-table","time-axis"),this._cell.style.height="25px",this._dv=document.createElement("div"),this._dv.style.width="100%",this._dv.style.height="100%",this._dv.style.position="relative",this._dv.style.overflow="hidden",this._cell.appendChild(this._dv),this._canvasConfiguredHandler=()=>this.chart.model().model().lightUpdate(),this._canvasBinding=(0,Y.createBoundCanvas)(this._dv,(0,s.size)({width:16,height:16})),this._canvasBinding.subscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler);const c=this._canvasBinding.canvasElement;c.style.position="absolute",c.style.zIndex="1",c.style.left="0",c.style.top="0",this._topCanvasBinding=(0,Y.createBoundCanvas)(this._dv,(0,s.size)({width:16,height:16})),this._topCanvasBinding.subscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler);const h=this._topCanvasBinding.canvasElement;h.style.position="absolute",h.style.zIndex="2",h.style.left="0",h.style.top="0",this._element.appendChild(this._rhsStubContainer.getElement()),this.restoreDefaultCursor(),this.update(),this._minVisibleSpan=jt.MINUTE_SPAN,this._mouseEventHandler=new $.MouseEventHandler(this._topCanvasBinding.canvasElement,this,{treatVertTouchDragAsPageScroll:!0,treatHorzTouchDragAsPageScroll:!1}),this.size=(0,s.size)({width:0,height:0}),(0,G.hideMarksOnBars)().subscribe(this,(()=>this.chart.model().model().lightUpdate()))}destroy(){this._mouseEventHandler.destroy(),this._topCanvasBinding.unsubscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler),this._topCanvasBinding.dispose(),this._canvasBinding.unsubscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler),this._canvasBinding.dispose(),this._rhsStubContainer.onLabelHovered().unsubscribeAll(this),this._lhsStubContainer.onLabelHovered().unsubscribeAll(this),this._lhsStubContainer.destroy(),this._rhsStubContainer.destroy(),this.chart.properties().childs().paneProperties.childs().background.unsubscribeAll(this),(0,G.hideMarksOnBars)().unsubscribeAll(this)}setCursor(e){let t="";"grabbing"!==e&&"ew-resize"!==e||(t="time-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t,this._cell.style.cursor)}restoreDefaultCursor(){this.setCursor("")}getElement(){return this._element}optimalHeight(){ -const e=this.rendererOptions();return Math.ceil(e.borderSize+e.offsetSize+e.fontSize+e.paddingTop+e.paddingBottom+e.labelBottomOffset)}setSizes(e,t,i){this.size&&(0,s.equalSizes)(this.size,e)||(this.size=e,this._canvasBinding.resizeCanvasElement(e),this._topCanvasBinding.resizeCanvasElement(e),this._cell.style.width=e.width+"px",this._cell.style.height=e.height+"px"),this._lhsStubContainer.setSizes(e.height,t),this._rhsStubContainer.setSizes(e.height,i)}rendererOptions(){if(!this._rendererOptions||this._rendererOptions.fontSize!==this.fontSize()){const e=this.fontSize();this._rendererOptions={borderSize:1,offsetSize:5,fontSize:e,font:(0,X.makeFont)(e,ee.CHART_FONT_FAMILY,""),widthCache:new pe.TextWidthCache,paddingTop:3*e/12,paddingBottom:3*e/12,paddingHorizontal:9*e/12,labelBottomOffset:4*e/12}}return this._rendererOptions}backgroundColor(){return this.chart.model().model().backgroundColor().value()}lineColor(){const e=this._properties.childs().lineColor.value();if(0===(0,me.parseRgba)(e)[3]){const e=this.chart.model().model().lastPane();if(e&&(e.collapsed().value()||e.isMainPane()&&this._areEventsEnabled()))return this.chart.properties().childs().paneProperties.childs().separatorColor.value()}return e}textColor(){return this._properties.childs().textColor.value()}fontSize(){return this._properties.childs().fontSize.value()}baseFont(){return(0,X.makeFont)(this.fontSize(),ee.CHART_FONT_FAMILY)}baseBoldFont(){return(0,X.makeFont)(this.fontSize(),ee.CHART_FONT_FAMILY,"","bold")}hasCanvas(e){return this._canvasBinding.canvasElement===e||this._topCanvasBinding.canvasElement===e}onLabelHovered(){return this._onLabelHovered}getScreenshotData(){return{content:this._canvasBinding.canvasElement.toDataURL(),canvas:this._canvasBinding.canvasElement,contentWidth:this.size.width,contentHeight:this.size.height,lhsStub:this._lhsStubContainer.getScreenshotData(),rhsStub:this._rhsStubContainer.getScreenshotData()}}getContextMenuActions(e){var t;const i=this.chart;i.updateActions();const s=i.actions(),r=[];if(e||r.push(s.timeScaleReset,new Ne.Separator),this._options.timezoneMenuEnabled&&r.push(s.applyTimeZone),r.push(s.sessionBreaks),!i.model().mainSeries().isDWM()){const e=null===(t=i.model())||void 0===t?void 0:t.mainSeries().symbolInfo();if(e){const t=i.model().mainSeries().properties().childs().sessionId,s=(e.subsessions||[]).filter((e=>!e.private));if(s.length>1){const e=s.map((e=>{const s={label:(0,Gt.translateSessionDescription)(e.description),checkable:!0,checked:t.value()===e.id,statName:"SetSession",onExecute:()=>{i.model().setProperty(t,e.id,$t)}};return new Ne.Action({...s,actionId:"Chart.SetSession"})})),n={label:Yt,statName:"SetSession",subItems:e},o=new Ne.Action({...n,actionId:"Chart.SetSession"});r.push(o)}}}return r}update(){if(!this.chart.hasModel())return;const e=this.chart.model().timeScale().marks();if(e){this._minVisibleSpan=jt.YEAR_SPAN;for(const t of e)this._minVisibleSpan=Math.min(t.span,this._minVisibleSpan)}}updatePriceAxisStubs(){const e=this.chart.model().model(),t=this.chart.isMaximizedPane()?(0, -r.ensureNotNull)(this.chart.maximizedPaneWidget()).state():e.paneForSource(e.mainSeries());if(!t)return;const i=e.priceScaleSlotsCount();this._lhsStubContainer.setScales([],i.left,t.leftPriceScales().length,i.left+i.right),this._rhsStubContainer.setScales([],i.right,t.rightPriceScales().length,i.left+i.right)}paint(e){if(e===D.InvalidationLevel.None||0===this.size.width||0===this.size.height)return;this._canvasBinding.applySuggestedBitmapSize(),this._topCanvasBinding.applySuggestedBitmapSize();const t=(0,Y.getContext2D)(this._topCanvasBinding.canvasElement);if(e>D.InvalidationLevel.Cursor){const i=(0,Y.getContext2D)(this._canvasBinding.canvasElement),s=(0,Y.getBindingPixelRatio)(this._canvasBinding);this.drawBackground(i,s),this.chart.hasModel()&&(this.drawBorder(i,s),this.drawTickMarks(i,s),this.drawBackLabels(i,s),this.drawCrossHairLabel(t,s)),this._lhsStubContainer.paintStubs(e),this._rhsStubContainer.paintStubs(e)}this.drawCrossHairLabel(t,(0,Y.getBindingPixelRatio)(this._topCanvasBinding))}drawBackground(e,t){if((0,Y.clearRect)(e,0,0,Math.ceil(this.size.width*t)+1,Math.ceil(this.size.height*t)+1,this.backgroundColor()),!this.chart.hasModel())return;const i=this.chart.model();if(!i.timeScale().isEmpty()){const s=i.model().selection().lineDataSources().reduce(((e,t)=>{const i=t.timeAxisPoints();return 0===i.length?e:e.concat(i)}),[]);s.length>0&&this._hightlightBackground(e,s,t)}const s=i.model().crossHairSource();s.startMeasurePoint()&&this._hightlightBackground(e,s.measurePoints(),t)}drawBorder(e,t){e.save(),e.fillStyle=this.lineColor();const i=Math.max(1,Math.floor(this.rendererOptions().borderSize*t)),s=Math.ceil(this.size.width*t);e.fillRect(0,0,s+1,i),e.restore()}drawTickMarks(e,t){const i=this.chart.model().timeScale().marks();if(!i||0===i.length)return;let s=i.reduce(((e,t)=>e.span>t.span?e:t),i[0]).span;s>30&&s<40&&(s=30),e.save(),e.strokeStyle=this.lineColor();const r=this.rendererOptions(),n=r.borderSize+r.offsetSize+r.paddingTop+r.fontSize/2;e.textAlign="center",e.textBaseline="middle",e.fillStyle=this.textColor(),(0,Y.drawScaled)(e,t,(()=>{e.font=this.baseFont();for(let t=0;t=s&&e.fillText(r.label,r.coord,n)}})),e.restore()}drawBackLabels(e,t){var i;e.save();const s=new Set,r=this.chart.model().model();let n=r.dataSources();const o=r.selection().allSources();for(const e of o)s.add(e);r.hoveredSource()&&s.add(r.hoveredSource());for(const e of r.sourcesBeingMoved())s.add(e);const a=r.customSourceBeingMoved();null!==a&&s.add(a);const l=null!==(i=r.lineBeingEdited())&&void 0!==i?i:r.lineBeingCreated();l&&s.add(l),s.add(this.chart.model().crossHairSource()),n=n.concat(r.customSources());const c=this.rendererOptions();for(let i=0;i=s&&(s=a,n=o),a<=i&&(i=a,r=o)}}return n&&t.push(n),r&&t.push(r),t}_zoomAvailable(){return!this.chart.model().timeScale().isEmpty()&&this.chart.model().model().zoomEnabled()&&this._options.pressedMouseMoveScale}_mouseDownOrTouchStartEvent(e){if(this._mousedown||!this._zoomAvailable())return;this._mousedown=!0;const t=this.chart.model();t.timeScale().isEmpty()||t.startScaleTime(e.localX)}_pressedMouseOrTouchMoveEvent(e){this._zoomAvailable()&&this.chart.model().scaleTimeTo(e.localX)} -_mouseUpOrTouchEndEvent(e){this._zoomAvailable()&&(this._mousedown=!1,this.chart.model().endScaleTime(),this.restoreDefaultCursor())}_contextMenuOrTouchContextMenuEvent(e){this._options.contextMenuEnabled&&ae.ContextMenuManager.showMenu(this.getContextMenuActions(),e,{statName:"TimeScaleContextMenu"},{menuName:"TimeScaleContextMenu"})}_mouseOrTouchEnterEvent(e){this._zoomAvailable()&&this.setCursor("ew-resize")}_mouseOrTouchLeaveEvent(e){this.restoreDefaultCursor()}_mouseDoubleClickOrDoubleTapEvent(e){(0,_e.trackEvent)("GUI","Double click time scale"),this.chart.model().resetTimeScale()}_areEventsEnabled(){return!(0,G.hideMarksOnBars)().value()}}function Xt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Zt(e){return e.reduce(((e,t)=>{for(const i in t)if(Xt(t,i)){const s=t[i],r=e[i];r?r.push(s):e[i]=[s]}return e}),{})}const Jt=new O.TranslatedString("move left",n.t(null,void 0,i(15086))),Qt=new O.TranslatedString("move right",n.t(null,void 0,i(61711))),ei={moving:"wait_finishing",wait_finishing:"stop",stop:"moving"};class ti{constructor(e){this._chartModel=null,this._currentDistance=0,this._deferredFinishTimeout=0,this._finishingTimeout=0,this._moveType="",this._startTime=0,this._state="stop",this._movingTimeout=0,this._chart=e,this._chart.withModel(this,(()=>{this._chartModel=this._chart.model()}))}destroy(){clearTimeout(this._movingTimeout)}move(e){if(null!==this._chartModel&&"stop"===this._state&&this._chartModel.beginUndoMacro(1===e?Jt:Qt),this._state=ei.stop,this._moveType="animated",this._deferredFinishTimeout&&(clearTimeout(this._deferredFinishTimeout),this._deferredFinishTimeout=0),this._finishingTimeout&&(clearTimeout(this._finishingTimeout),this._finishingTimeout=0),this._startTime=Date.now(),0===this._movingTimeout){const t=this._startTime,i=10,s=()=>{this.moveStep(t,0,50*e,1e3),this._movingTimeout=setTimeout(s,i)};this._movingTimeout=setTimeout(s,i)}}moveStep(e,t,i,s){if(null!==this._chartModel&&!this._chartModel.timeScale().isEmpty()){const r=Date.now();r1||!isFinite(n))&&(n=1);const o=1-Math.pow(1-n,3);return this._currentDistance=(i-t)*o+t,this._chartModel.scrollChart(this._currentDistance),n}}moveByBar(e){if(null!==this._chartModel){const t=this._chartModel.timeScale();if(t.isEmpty())return;if("stop"===this._state&&this._chartModel.beginUndoMacro(1===e?Jt:Qt),null!==t.visibleBarsStrictRange()){const e=t.indexToCoordinate(t.visibleBarsStrictRange().lastBar())+t.barSpacing()/2;Math.abs(t.width()-e)>t.barSpacing()/6&&this._chartModel.scrollChart(t.width()-e)}if(this._state=ei.stop,this._moveType="by_bar",this._startTime=Date.now(),!this._movingTimeout){let t=0,i=150;const s=400,r=()=>{this._moveByBarStep(e),t++,i>100&&(i-=t/5*20),this._movingTimeout=setTimeout(r,i)};this._movingTimeout=setTimeout(r,s),this._moveByBarStep(e)}}}stopMove(){"by_bar"===this._moveType?this.stopMoveByBar():this._stopMove()}stopMoveByBar(){"moving"===this._state&&(clearTimeout(this._movingTimeout),this._movingTimeout=0,this._state=ei.wait_finishing,this._moveType="", -this._movingTimeout=0,this._currentDistance=0,null!==this._chartModel&&this._chartModel.endUndoMacro())}scrollToRealtime(e){null!==this._chartModel&&this._chartModel.timeScale().scrollToRealtime(e)}_finishMove(){clearTimeout(this._movingTimeout),this._movingTimeout=0,this._deferredFinishTimeout=0;const e=this._currentDistance,t=Date.now(),i=()=>{const s=this.moveStep(t,e,0,700);s&&s<1?this._finishingTimeout=setTimeout(i,10):null!==this._chartModel&&(this._state=ei.wait_finishing,this._moveType="",this._movingTimeout=0,this._currentDistance=0,this._chartModel.endUndoMacro())};this._finishingTimeout=setTimeout(i,10)}_stopMove(){"moving"===this._state&&(this._state=ei.moving,Date.now()-this._startTime<200?this._deferredFinishTimeout=setTimeout(this._finishMove.bind(this),200-(Date.now()-this._startTime)):this._finishMove())}_moveByBarStep(e){if(null!==this._chartModel){if(this._chartModel.timeScale().isEmpty())return;this._chartModel.scrollChartByBar(e)}}}var ii=i(68671);const si=(0,o.getLogger)("ChartApi.AbstractSession");class ri extends class{constructor(e,t,i){this._isConnected=new(ot())(!1),this._state=0,this._isConnectForbidden=!1,this._sessionId="",this._sessionIdChanged=new(oe()),this._chartApi=e,this._sessionPrefix=t,this._shouldReconnectAfterCriticalError=i}destroy(){this._logNormal("Destroying session"),this._isConnected.unsubscribe(),this.disconnect(),this._sessionIdChanged.destroy(),delete this._chartApi,this._logNormal("Session has been destroyed")}isConnected(){return this._isConnected}sessionId(){return this._sessionId}onSessionIdChanged(){return this._sessionIdChanged}connect(){0===this._state&&((0,r.assert)(!this._isConnectForbidden,"Cannot call connect because it is forbidden at this moment"),this._setSessionId(`${this._sessionPrefix}_${(0,ii.randomHash)()}`),this._logNormal("Connecting session - wait until transport stay connected"),this._state=1,this._chartApi.createSession(this._sessionId,this))}disconnect(){0!==this._state&&((0,r.assert)(""!==this._sessionId,"sessionId must not be invalid"),this._logNormal("Disconnecting session..."),this._forbidConnectWhile((()=>{this._chartApi.connected()&&this._sendRemoveSession(),this._processDestroyingOnServer()})))}onMessage(e){switch(e.method){case"connected":return void this._onChartApiConnected();case"disconnected":return void this._onChartApiDisconnected();case"critical_error":const t=String(e.params[0]),i=String(e.params[1]);return void this._onCriticalError(t,i)}this._onMessage(e)}_getChartApi(){return this._chartApi}_generateLogMessage(e){return`[${this._sessionId}] ${e}`}_onCriticalError(e,t){this._logError(`Critical error. Reason=${e}, info=${t}.`),this._forbidConnectWhile((()=>{this._processDestroyingOnServer()})),this._shouldReconnectAfterCriticalError?(this._logNormal("Reconnecting after critical error..."),this.connect()):this._logNormal("Reconnecting after critical error skipped")}_onChartApiConnected(){(0,r.assert)(1===this._state,"Session is not registered"),this._logNormal("Transport is connected. Creating session on the server"), -this._sendCreateSession(),this._state=2,this._isConnected.setValue(!0)}_onChartApiDisconnected(){this._logNormal("Transport is disconnected. Reconnecting..."),this._forbidConnectWhile((()=>{this._processDestroyingOnServer()})),this.connect()}_setSessionId(e){const t=this._sessionId;this._logNormal(`Changing sessionId: old=${t}, new=${e}`),this._sessionId=e,this._sessionIdChanged.fire(e,t)}_logNormal(e){si.logNormal(this._generateLogMessage(e))}_logError(e){si.logError(this._generateLogMessage(e))}_processDestroyingOnServer(){this._state=0,this._isConnected.setValue(!1),this._chartApi.removeSession(this._sessionId),this._setSessionId("")}_forbidConnectWhile(e){this._isConnectForbidden=!0,e(),this._isConnectForbidden=!1}}{constructor(e,t=!1){super(e,"cs",!1),this._sessionDisabled=!1,this._handler=null,this._criticalError=new(oe()),this._symbolResolveMap=new Map,this._disableStatistics=t}destroy(){this._criticalError.destroy(),this._handler=null,this._symbolResolveMap.clear(),super.destroy()}serverTimeOffset(){return this._getChartApi().serverTimeOffset()}switchTimezone(e){return this._getChartApi().switchTimezone(this.sessionId(),e)}defaultResolutions(){return this._getChartApi().defaultResolutions()}availableCurrencies(){return this._getChartApi().availableCurrencies()}availableUnits(){return this._getChartApi().availableUnits()}resolveSymbol(e,t,i){if(this._symbolResolveMap.has(t)){const[e,s]=this._symbolResolveMap.get(t);return Array.isArray(s)?s.push(i):s.then(i),e}{const s=[i];return this._getChartApi().resolveSymbol(this.sessionId(),e,t,(i=>{"symbol_error"===i.method?this._symbolResolveMap.delete(t):this._symbolResolveMap.set(t,[e,Promise.resolve(i)]),s.forEach((e=>e(i)))})),this._symbolResolveMap.set(t,[e,s]),e}}requestFirstBarTime(e,t,i){return this._getChartApi().requestFirstBarTime(this.sessionId(),e,t,i)}createSeries(e,t,i,s,r,n,o){return this._getChartApi().createSeries(this.sessionId(),e,t,i,s,r,n,o)}modifySeries(e,t,i,s,r,n){return this._getChartApi().modifySeries(this.sessionId(),e,t,i,s,r,n)}removeSeries(e){return!!this.isConnected().value()&&this._getChartApi().removeSeries(this.sessionId(),e)}requestMoreData(e,t,i){return"number"==typeof e?this._getChartApi().requestMoreData(this.sessionId(),e):this._getChartApi().requestMoreData(this.sessionId(),e,t,i)}requestMoreTickmarks(e,t,i){return(0,S.isNumber)(e)?this._getChartApi().requestMoreTickmarks(this.sessionId(),e):this._getChartApi().requestMoreTickmarks(this.sessionId(),e,t,i)}requestMetadata(e,t){this._getChartApi().requestMetadata(this.sessionId(),e,t)}canCreateStudy(e){return this._getChartApi().canCreateStudy(e)}createStudy(e,t,i,s,r,n,o){return this._getChartApi().createStudy(this.sessionId(),e,t,i,s,r,n,o)}rebindStudy(e,t,i,s,r,n,o){return this._getChartApi().rebindStudy(this.sessionId(),e,t,i,s,r,n,o)}modifyStudy(e,t,i,s,r){return this._getChartApi().modifyStudy(this.sessionId(),e,t,i,s,r)}removeStudy(e,t){return this._getChartApi().removeStudy(this.sessionId(),e,t)}createPointset(e,t,i,s,r,n){ -return this._getChartApi().createPointset(this.sessionId(),e,t,i,s,r,n)}modifyPointset(e,t,i,s){return this._getChartApi().modifyPointset(this.sessionId(),e,t,i,s)}removePointset(e){return this._getChartApi().removePointset(this.sessionId(),e)}setVisibleTimeRange(e,t,i,s,r,n){this._getChartApi().setVisibleTimeRange(this.sessionId(),e,t,i,s,!0,r,n)}criticalError(){return this._criticalError}connect(e=null){null!==e&&(this._handler=e),this._symbolResolveMap.clear(),super.connect()}setHandler(e){this._handler=e}connected(){return this.isConnected().value()&&!this._sessionDisabled}disable(){this._sessionDisabled=!0}chartApi(){return this._getChartApi()}_sendCreateSession(){Object.keys(this).forEach((e=>{/^(s|st|symbol_)\d+$/.test(e)&&delete this[e]})),this._getChartApi().chartCreateSession(this.sessionId(),this._disableStatistics)}_sendRemoveSession(){this._getChartApi().chartDeleteSession(this.sessionId())}_onMessage(e){this._handler&&this._handler(e)}_onCriticalError(e,t){this._criticalError.fire(e,t),super._onCriticalError(e,t)}}var ni=i(1930),oi=i(92133);class ai{constructor(){this._draggingSource=null,this._activeTouchPanes=new Set,this._scrollingPane=null,this._pinchingPane=null}onPaneDestroyed(e){this._activeTouchPanes.delete(e),this._scrollingPane===e&&(this._scrollingPane=null),this._pinchingPane===e&&(this._pinchingPane=null)}startTouch(e){this._activeTouchPanes.add(e)}endTouch(e){this._activeTouchPanes.delete(e)}hasTouchesOnOtherPanes(e){return this._activeTouchPanes.size>1||1===this._activeTouchPanes.size&&!this._activeTouchPanes.has(e)}trySetDraggingSource(e,t){return!this.hasTouchesOnOtherPanes(t)&&((0,r.assert)(null===this._draggingSource||this._draggingSource===e),this._draggingSource=e,!0)}clearDraggingSource(){null!==this._draggingSource&&(this._draggingSource=null)}draggingSource(){return this._draggingSource}setScrollingPane(e){(0,r.assert)(null===e||null===this._scrollingPane||this._scrollingPane===e),this._scrollingPane=e}scrollingPane(){return this._scrollingPane}setPinchingPane(e){(0,r.assert)(null===e||null===this._pinchingPane||this._pinchingPane===e),this._pinchingPane=e}pinchingPane(){return this._pinchingPane}}let li=null;i(27678);function ci(e,t,s,r,n){return Promise.all([i.e(6848),i.e(4150),i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(6092),i.e(8619),i.e(346),i.e(8825),i.e(8271),i.e(5761),i.e(8009),i.e(8707),i.e(7177),i.e(3261),i.e(3562),i.e(8049),i.e(3578),i.e(4884),i.e(3795),i.e(140),i.e(8955),i.e(8251),i.e(9415),i.e(5020),i.e(3046),i.e(1033),i.e(9230),i.e(9519),i.e(962),i.e(2842),i.e(3988),i.e(9050),i.e(8494),i.e(5890),i.e(6265)]).then(i.bind(i,4060)).then((i=>{const o=new(0,i.EditObjectDialogRenderer)(e,t,r,n);return o.show(s),o}))}let hi=null;var di=i(89664);const ui={[ut.TabNames.symbol]:"symbol",[ut.TabNames.legend]:"legend",[ut.TabNames.scales]:"scales",[ut.TabNames.trading]:"trading",[ut.TabNames.events]:"events",[ut.TabNames.timezoneSessions]:"appearance",[ut.TabNames.text]:"text",[ut.TabNames.style]:"style",[ut.TabNames.visibility]:"visibility"},pi={ -[ut.TabNames.style]:"style",[ut.TabNames.visibility]:"visibilities"};async function _i(e,t,s={},r,n){const o=r.activeChartWidget.value(),{initialTab:a,tabName:l}=s;if(l&&!a&&(s.initialTab=pi[l]),(0,L.isStudyLineTool)(e)&&function(e){return[di.LineToolVbPFixed].some((t=>e instanceof t))}(e))return o.propertiesDefinitionsForSource(e).then((i=>null!==i?ci(e,t,s,n,i):null));if((0,k.isStudy)(e)&&function(e){const{shortId:t}=e.metaInfo();return"Overlay"===t}(e)||(0,L.isLineTool)(e))return o.propertiesDefinitionsForSource(e).then((s=>{if(null!==s){return function(e){return Promise.all([i.e(6848),i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(6092),i.e(8619),i.e(346),i.e(8825),i.e(8271),i.e(5761),i.e(8009),i.e(8707),i.e(7177),i.e(3261),i.e(3562),i.e(8049),i.e(3578),i.e(4884),i.e(140),i.e(8955),i.e(8251),i.e(9415),i.e(5020),i.e(3046),i.e(9230),i.e(7695),i.e(962),i.e(2842),i.e(3988),i.e(9050),i.e(8494),i.e(5890),i.e(6780)]).then(i.bind(i,75892)).then((t=>{const i=new(0,t.SourcePropertiesEditorRenderer)(e);return null!==hi&&hi.hide(),i.show(),hi=i,i}))}({propertyPages:s,model:t,source:e,activePageId:l&&ui[l]})}return null}));if((0,k.isStudy)(e))return ci(e,t,s,n);{const e=l&&ui[l],t=r.getChartPropertiesDialogRenderer();return t.setActivePage(e),t.show()}}var mi=i(20364),gi=i(68121),fi=i(4978),vi=i(7578);class Si{constructor(e,t){this._showed=!1,this._cw=e,this._element=document.createElement("div"),this._element.classList.add("chart-loading-screen"),this._shield=document.createElement("div"),this._shield.classList.add("chart-loading-screen-shield"),this._element.appendChild(this._shield),t.appendChild(this._element),this._cw.withModel(this,this._connectToModel)}show(e){if(e){const e=this._cw.model().mainSeries().status();if(1!==e&&2!==e)return}this._cw.setInLoadingState(!0),this._showed||(this._showed=!0,this._show())}hide(){this._cw.setInLoadingState(!1),this._showed&&this._hide()}isShown(){return this._showed}_connectToModel(){const e=this._cw.model().mainSeries().dataEvents();e.symbolError().subscribe(this,(e=>{e!==vi.permissionDenied&&this.hide()})),e.seriesError().subscribe(this,(()=>{(0,Be.enabled)("hide_loading_screen_on_series_error")&&this.hide()})),e.completed().subscribe(this,this.hide)}_show(){const e=this._cw.properties().childs().paneProperties.childs();let t;if(e.backgroundType.value()===fi.ColorType.Solid)t=e.background.value();else{t=`linear-gradient(${e.backgroundGradientStartColor.value()},${e.backgroundGradientEndColor.value()})`}this._shield.style.background=t,this._element.classList.add("fade")}_hide(){this._showed=!1,this._element.classList.remove("fade")}}var yi=i(93975),bi=i(10621),wi=i(52865);const Ci=(0,R.getHexColorByName)("color-cold-gray-700"),Pi=(0,R.getHexColorByName)("color-cold-gray-400");class Ti{constructor(e){this._container=null,this._errorCardRenderer=null,this._mainSeriesErrorMessage=null,this._banErrorMessage=null,this._errorMessageHandler=e=>{this._chartWidget.hasModel()?this._updatePaneWidgets(e):this._renderErrorWithoutModel(e)},this._chartWidget=e, -this._subscribeToMainSeriesErrors()}destroy(){var e,t,i;null===(e=this._mainSeriesErrorMessage)||void 0===e||e.destroy(),null===(t=this._banErrorMessage)||void 0===t||t.destroy(),null===(i=this._errorCardRenderer)||void 0===i||i.then((e=>{e.container.remove(),e.destroy()}))}updatePaneWidgets(){this._updatePaneWidgets()}setContainer(e){var t;if(this._container!==e){this._container=e,null===(t=this._errorCardRenderer)||void 0===t||t.then((e=>e.container.remove()));const i=this._getErrorMessage();i&&this._errorMessageHandler(i)}}_updatePaneWidgets(e=this._getErrorMessage()){this._chartWidget.paneWidgets().forEach((t=>t.setErrorMessage(e)))}async _renderErrorWithoutModel(e){if(null===this._container||null===e&&null===this._errorCardRenderer)return;const t=await this._getErrorCardRenderer();this._container.contains(t.container)||this._container.appendChild(t.container),t.update(this._createErrorCardRendererState(e))}async _getErrorCardRenderer(){return this._errorCardRenderer||(this._errorCardRenderer=this._createErrorCardRenderer())}async _createErrorCardRenderer(){return new(await mt())}_createErrorCardRendererState(e){return e?{message:e.message,icon:e.icon,textColor:fe.watchedTheme.value()===ve.StdTheme.Dark?Pi:Ci,backgroundColor:fe.watchedTheme.value()===ve.StdTheme.Dark?"#131722":"#FFF",solutionId:e.solutionId}:{message:null}}_subscribeToMainSeriesErrors(){const e=this._chartWidget;e.withModel(this,(()=>{const t=e.model().model().mainSeries();this._mainSeriesErrorMessage=(0,y.combine)(((t,s,r)=>{if(t)return t;let o;switch(s){case 4:{const t=e.model().model().mainSeries().seriesErrorMessage();null!==t&&("resolution_not_entitled"===t||"custom_resolution"===t||"seconds_not_entitled"===t||t.startsWith("study_not_auth:"))||(o=n.t(null,void 0,i(32619)));break}case 1:case 2:break;default:r&&(o=n.t(null,void 0,i(95222)))}return o?{message:o,icon:"ghost"}:null}),this._banErrorMessage||new(ot())(null).readonly(),(0,wi.createWVFromGetterAndSubscription)((()=>t.status()),t.onStatusChanged()),(0,wi.createWVFromGetterAndSubscription)((()=>!t.bars().size()&&!t.isInReplay()),t.dataEvents().dataUpdated()),(0,wi.createWVFromGetterAndSubscription)((()=>({})),e.model().model().onChartThemeLoaded())),this._mainSeriesErrorMessage.subscribe(this._errorMessageHandler,{callWithLast:!0})}))}_getErrorMessage(){var e,t;return(null===(e=this._banErrorMessage)||void 0===e?void 0:e.value())||(null===(t=this._mainSeriesErrorMessage)||void 0===t?void 0:t.value())||null}}var xi=i(8890),Ii=i(26220),Mi=i.n(Ii);async function Ai(e,t,s,o,a="default"){let l,c=[];const h=e.model().model(),d=(0,S.clone)((0,r.ensureDefined)(t.defaults.inputs)),u=new(Mi())({inputs:d}),p=function(e,t){return"symbol"===t?e.inputs.filter((t=>t.id===e.symbolInputId())):e.inputs.filter((e=>e.confirm))}(t,a),_=()=>{l&&h.removeCustomSource(l)},m=()=>{_(),o()},g=e=>{s({inputs:e,parentSources:c}),_()},f=p.filter(xi.isTimeOrPriceNotHiddenInput);if(f.length>0)try{ -const s=await Promise.all([i.e(8087),i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(8619),i.e(346),i.e(8825),i.e(8271),i.e(5761),i.e(8707),i.e(7177),i.e(3261),i.e(3562),i.e(8049),i.e(3578),i.e(4884),i.e(140),i.e(4450),i.e(962),i.e(2842),i.e(3016),i.e(1075),i.e(3988),i.e(9050),i.e(8494),i.e(3030)]).then(i.bind(i,73339)),r=await s.selectInputValuesOnChart(e,f,u,t.shortDescription,t.inputs);if(l=r.customSourceId,r.destPane){const e=r.destPane.mainDataSource();c=e===h.mainSeries()?[]:[e]}else c=[]}catch(e){return void m()}f.length!==p.length?Promise.all([i.e(8087),i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(8619),i.e(346),i.e(8825),i.e(8271),i.e(5761),i.e(8707),i.e(7177),i.e(3261),i.e(3562),i.e(8049),i.e(3578),i.e(4884),i.e(140),i.e(4450),i.e(962),i.e(2842),i.e(3016),i.e(1075),i.e(3988),i.e(9050),i.e(8494),i.e(3030)]).then(i.bind(i,29638)).then((t=>{const s=new t.ConfirmInputsDialogRenderer(function(e){if("symbol"===e)return n.t(null,void 0,i(45743));return n.t(null,void 0,i(46689))}(a),p,u,a,e.model(),g,m);return s.show(),s})):g(u.state().inputs||{})}var Li=i(69228),ki=i(578);var Ei=i(64548);const Di=(0,Be.enabled)("chart_content_overrides_by_defaults"),Vi=(0,o.getLogger)("ChartWidget",{color:"#606"}),Bi=new O.TranslatedString("hide {title}",n.t(null,void 0,i(70301)));const Ri={addToWatchlistEnabled:!0,showFinancialsEnabled:!1,sourceSelectionEnabled:!0,propertyPagesEnabled:!0,paneContextMenuEnabled:!0,priceScaleContextMenuEnabled:!0,currencyConversionEnabled:!1,unitConversionEnabled:!1,goToDateEnabled:!1,marketStatusWidgetEnabled:!0,chartWarningWidgetEnabled:!0,dataProblemWidgetEnabled:!0,paneControlsEnabled:!0,isSymbolAvailable:e=>Promise.resolve(!0),legendWidgetEnabled:!0,chartEventsEnabled:!0,esdEnabled:!1,newsEnabled:!1,continuousContractSwitchesEnabled:!1,futuresContractExpirationEnabled:!1,croppedTickMarks:!0,countdownEnabled:!0,lastPriceAnimationEnabled:!0,useKineticScroll:c.CheckMobile.any(),indicatorsDialogShortcutEnabled:!0,handleScale:{mouseWheel:!0,pinch:!0,axisPressedMouseMove:{time:!0,price:!0}},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0}};function Ni(e,t,i,s=0){const r=t.mainSeries().syncModel(),n=e.mainSeries().syncModel();let o=i;if(null!==r&&null!==n){const t=e.createSyncPoint(r.syncSourceTarget(),n.syncSourceTarget());0!==s&&(i=r.projectTime(i,s)),o=t.sourceTimeToTargetTime(i)}return e.timeScale().points().roughIndex(o,n&&n.distance.bind(n))}const Oi=["Overlay@tv-basicstudies","CorrelationCoefficient@tv-basicstudies","Correlation Coeff@tv-basicstudies","Spread@tv-basicstudies","Ratio@tv-basicstudies"];class Fi{constructor(e,t,i){this.activePaneWidget=null,this._model=null,this._paneWidgets=[],this._maximizedPaneWidget=null,this._timeAxisWidget=null,this._paneSeparators=[],this._controlBarNavigation=null,this._lineToolsSynchronizer=null,this._modelCreated=new(oe()),this._isDestroyed=!1,this._customLegendWidgetsFactoryMap=new Map,this._backgroundTopTheme=new(ot())("light"), +setState(e){this._state!==e&&(this.hasState()&&this._unsubscribeFromState(),this._state=e,this.hasState()&&(this._subscribeToState(),this.updatePriceAxisWidgets()))}getScreenshotData(e){var t,i,s,r;const n=[],o=[];let a,l=[];const c=this.state().sourcesByGroup().priceSources().slice().reverse(),h=this._chart.properties().childs().paneProperties.childs().legendProperties.childs();for(const d of c){const c=d.statusView();if((0,k.isStudy)(d)&&(h.showLegend.value()||(null==e?void 0:e.showCollapsedStudies))){const s=h.showStudyTitles.value(),r=s;if(d.properties().childs().visible.value()&&c&&r){n.push(s?d.statusProvider(null==e?void 0:e.status).text():"");const r=Ve.enabled("use_last_visible_bar_value_in_legend")&&null!==(i=null===(t=this._chartModel().timeScale().visibleBarsStrictRange())||void 0===t?void 0:t.lastBar())&&void 0!==i?i:null,a=d.valuesProvider().getValues(r);o.push(a)}}else if(d===this._chartModel().mainSeries()&&c&&h.showSeriesTitle.value()){a=d.statusProvider((null==e?void 0:e.status)||{}).text();const t=Ve.enabled("use_last_visible_bar_value_in_legend")&&null!==(r=null===(s=this._chartModel().timeScale().visibleBarsStrictRange())||void 0===s?void 0:s.lastBar())&&void 0!==r?r:null;l=d.valuesProvider().getValues(t)}}return{type:"pane",leftAxis:this._lhsPriceAxisesContainer.getScreenshotData(),rightAxis:this._rhsPriceAxisesContainer.getScreenshotData(),content:this._canvasBinding.canvasElement.toDataURL(),canvas:this._canvasBinding.canvasElement,contentWidth:this._size.width,contentHeight:this._size.height,studies:n,studiesValues:o,containsMainSeries:this.containsMainSeries(),mainSeriesText:a,mainSeriesValues:l}}updatePriceAxisWidgets(){if(!this.hasState())return;const e=this._chartModel(),t=e.paneForSource(e.mainSeries());if(!t)return;const i=e.priceScaleSlotsCount(),s=this.state(),r=s.visibleLeftPriceScales(),n=s.visibleRightPriceScales();this._lhsPriceAxisesContainer.setScales(r,i.left,t.leftPriceScales().length,i.left+i.right),this._rhsPriceAxisesContainer.setScales(n,i.right,t.rightPriceScales().length,i.left+i.right)}update(){this.hasState()&&(this._lhsPriceAxisesContainer.update(),this._rhsPriceAxisesContainer.update(),null!==this._legendWidget&&this._legendWidget.update(),this.updateControls())}updateStatusWidget(e){this.hasState()&&null!==this._legendWidget&&(e.legendWidgetLayoutInvalidated()?this._legendWidget.updateLayout():this._legendWidget.update())}updateControls(){this.hasState()&&null!==this._paneControls&&this._paneControls.update()}updateThemedColors(e){this._themedTopColor=e.topColor,this._updateByThemedColors()}statusWidget(){return this._legendWidget}getElement(){return this._rowElement}canvasElement(){return this._canvasBinding.canvasElement}hasCanvas(e){return this._canvasBinding.canvasElement===e||this._topCanvasBinding.canvasElement===e}pinchStartEvent(){null===this._paneWidgetsSharedState.scrollingPane()&&null===this._paneWidgetsSharedState.pinchingPane()&&(this._onTouchEvent(),this._options.handleScale.pinch&&(this._chartModel().stopTimeScaleAnimation(),this._prevPinchScale=1, +this._pinching=!0,this._wasPinched=!0,this._paneWidgetsSharedState.setPinchingPane(this)))}pinchEvent(e,t,i,s){if(null!==this._paneWidgetsSharedState.scrollingPane()||this._paneWidgetsSharedState.pinchingPane()!==this)return;if(this._onTouchEvent(),!this._options.handleScale.pinch)return;const r=10*(s-this._prevPinchScale);this._prevPinchScale=s,this._chartModel().zoomTime(e.x,r,!0),this._prevPinchScale=s}pinchEndEvent(){null===this._paneWidgetsSharedState.scrollingPane()&&this._paneWidgetsSharedState.pinchingPane()===this&&(this._onTouchEvent(),this._pinching=!1,this._paneWidgetsSharedState.setPinchingPane(null))}mouseClickEvent(e){this._onMouseEvent(),this._mouseClickOrTapEvent(e)}tapEvent(e){this._preventTouchEventsExceptPinch()||(this._onTouchEvent(),this._mouseClickOrTapEvent(e))}mouseDownEvent(e){this._onMouseEvent(),this.hasState()&&this._mouseDownOrTouchStartEvent(e,this._dataSourceAtPoint(e.localX,e.localY))}touchStartEvent(e){if(this._paneWidgetsSharedState.startTouch(this),this._preventTouchEventsExceptPinch())return;const t=!this._trackCrosshairOnlyAfterLongTap&&null!==Ft&&Ft.stateId===this.state().id()&&Math.abs(Ft.x-e.localX)+Math.abs(Ft.y-e.localY)<5;this._onTouchEvent(),this._chart.setActivePaneWidget(this);const i=this._dataSourceAtPoint(e.localX,e.localY);if(t){const t=this._chartModel().crossHairSource();null!==i&&i.source===t||t.selectPointMode().value()!==G.SelectPointMode.None?this.startTrackingMode(new V.Point(e.localX,e.localY),new V.Point(e.localX,e.localY)):!this._chart.readOnly()&&null!==i&&(0,L.isLineTool)(i.source)&&i.source.userEditEnabled()&&this._chartUndoModel().selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection(i.source,i.hittest.data())}))}this._mouseDownOrTouchStartEvent(e,i),this._mouseOrTouchMoveEvent(e)}mouseUpEvent(e){this._onMouseEvent(),this._mouseUpOrTouchEndEvent(e)}touchEndEvent(e){this._paneWidgetsSharedState.endTouch(this),this._preventTouchEventsExceptPinch()||(this._onTouchEvent(),this._mouseOrTouchLeaveEvent(e),this._mouseUpOrTouchEndEvent(e))}mouseMoveEvent(e){this._onMouseEvent(),this._mouseOrTouchMoveEvent(e)}pressedMouseMoveEvent(e){this._onMouseEvent(),this._pressedMouseOrTouchMoveEvent(e)}touchMoveEvent(e){this._preventTouchEventsExceptPinch()||(this._onTouchEvent(),this._pressedMouseOrTouchMoveEvent(e))}mouseLeaveEvent(e){this._onMouseEvent(),this._mouseOrTouchLeaveEvent(e)}mouseDoubleClickEvent(e){this._onMouseEvent(),this._mouseDoubleClickOrDoubleTapEvent(e)}wheelClickEvent(e){if(this._chart.readOnly())return;const t=this._dataSourceAtPoint(e.localX,e.localY);if(null===t||t.isCustom)return;if((t.hittest.result()||0)<=H.HitTestResult.MOVEPOINT_BACKGROUND)return;const i=new U.EnvironmentState(e),s=t.hittest.eraseMarker();if(i.mod()&&void 0!==s&&t.source.processErase)return void t.source.processErase(this._chartUndoModel(),s);const n=this._chartUndoModel();n.selection().isSelected(t.source)||n.selectionMacro((e=>{e.clearSelection();const i=(0,r.ensureNotNull)(t.source);e.addSourceToSelection(i,Bt(t,i))})),this._chart.removeSelectedSources()} +doubleTapEvent(e){this._preventTouchEventsExceptPinch()||(this._onTouchEvent(),this._mouseDoubleClickOrDoubleTapEvent(e))}longTapEvent(e){if(null===this._state||this._preventTouchEventsExceptPinch())return;if(this._onTouchEvent(),this._longTap=!0,null!==this._startTrackPoint||!this._trackingModeShouldBeActive())return;const t=this._chartModel().selection();if(!t.isEmpty()){const i=this._dataSourceAtPoint(e.localX,e.localY);if(null!==i&&t.isSelected(i.source))return}this.startTrackingMode(new V.Point(e.localX,e.localY),new V.Point(e.localX,e.localY),new U.EnvironmentState(e))}mouseEnterEvent(e){this._onMouseEvent(),this.hasState()&&(this._chart.setActivePaneWidget(this),this._setCursorPosition(e.localX,e.localY,new U.EnvironmentState(e)))}contextMenuEvent(e){this._onMouseEvent(),this._contextMenuEvent(e)}touchContextMenuEvent(e){this._preventTouchEventsExceptPinch()||(this._onTouchEvent(),this._contextMenuEvent(e))}mouseDownOutsideEvent(e){this._processOutsideClick(null,e)}touchStartOutsideEvent(e){this._processOutsideClick(null,e)}cancelZoom(){this._chartModel().crossHairSource().clearSelection(),this._firstZoomPoint=null,this._preventCrossHairMove()&&this._clearCursorPosition()}startTrackingMode(e,t,i){this._startChangeLineToolParams=null,this._startMoveSourceParams=null,this._currentChangingLineToolHitTest=null,this._currentMovingHitTest=null,this._chartUndoModel().selectionMacro((e=>e.clearSelection())),this._startTrackPoint=e,this._exitTrackingModeOnNextTry=!1,this._setCursorPosition(t.x,t.y,i),this._initCrossHairPosition=this._chartModel().crossHairSource().currentPoint()}setDragToAnotherPaneCursor(){this._setCursorClassName("grabbing")}cloneLineTools(e,t){return this._chartUndoModel().cloneLineTools(e,t)}exitTrackingMode(){null!==this._state&&null!==this._startTrackPoint&&(this._exitTrackingModeOnNextTry=!0,this._tryExitTrackingMode())}trackingModeEnabled(){return null!==this._state&&null!==this._startTrackPoint}addCustomWidgetToLegend(e,t){this._options.legendWidgetEnabled&&(this._customLegendWidgetsFactoryMap.set(e,t),null!==this._legendWidget&&this._legendWidget.addCustomWidgetToLegend(e,t))}containsMainSeries(){return!!this.hasState()&&this.state().containsMainSeries()}paint(e){if(!this._chartUndoModel()||!this.hasState()||0===this._size.width||0===this._size.height)return;this._canvasBinding.applySuggestedBitmapSize(),this._topCanvasBinding.applySuggestedBitmapSize(),this._state&&(e.priceScaleSideMaxLevel("left")>D.InvalidationLevel.Cursor||e.priceScaleSideMaxLevel("right")>D.InvalidationLevel.Cursor)&&(this._recalculatePriceScales((0,yt.viewportChangeEvent)()),null!==Ft&&Ft.stateId===this.state().id()&&this._setCursorPosition(Ft.x,Ft.y,Ft.envState));const t=e.fullInvalidation();if(t>D.InvalidationLevel.Cursor&&null!==Ft&&Ft.stateId===this.state().id()){const e=this._dataSourceAtPoint(Ft.x,Ft.y);null!==e&&this._updateHoveredSource(e,(0,ft.globalEnvironmentState)())}if(this._lhsPriceAxisesContainer.paint(e.getterForPriceScaleInvalidationLevelBySide("left")), +this._rhsPriceAxisesContainer.paint(e.getterForPriceScaleInvalidationLevelBySide("right")),t===D.InvalidationLevel.None)return;const i=this._state&&(this._state.maximized().value()||!this._state.collapsed().value());if(t>D.InvalidationLevel.Cursor){const e=(0,r.ensureNotNull)(this._canvasBinding.canvasElement.getContext("2d"));e.setTransform(1,0,0,1,0,0);const t=this._canvasRenderParams();this._drawBackground(e,t),i&&this._drawSources(e,t)}if(null!==this._state){const e=(0,r.ensureNotNull)(this._topCanvasBinding.canvasElement.getContext("2d"));e.setTransform(1,0,0,1,0,0);const t=this._topCanvasRenderParams();e.clearRect(0,0,Math.ceil(this._size.width*t.pixelRatio),Math.ceil(this._size.height*t.pixelRatio)),i&&this._drawSeriesTopViews(e,t),this._drawCrossHair(e,t),i&&this._drawActiveLineTools(e,t)}}cancelCreatingLineTool(){const e=this._chartUndoModel(),t=this._chartUndoModel().lineBeingCreated();if(t)if(t.pointsCount()<=0&&!(0,dt.isLineDrawnWithPressedButton)(t.toolname)){const i=t.points();if(i.length>2){const s=i[i.length-2];e.continueCreatingLine(s),this._finishTool(t)}else e.cancelCreatingLine()}else e.cancelCreatingLine();null!==this._firstZoomPoint&&this.cancelZoom(),this.setCursorForTool()}drawRightThere(e){if((0,L.isLineToolName)(e)&&this.hasState()){const t=this._chartUndoModel(),i=t.crossHairSource(),s=t.model().magnet().align(i.price,i.index,this.state());t.createLineTool({pane:this.state(),point:{index:i.index,price:s},linetool:e})}}cancelMeasuring(){this._chartUndoModel().crossHairSource().clearMeasure(),(0,G.resetToCursor)(),this.setCursorForTool()}async setErrorMessage(e){var t,i,s;e&&!this._errorRenderer&&(this._errorRenderer=this._createErrorBlock()),null===(t=await this._errorRenderer)||void 0===t||t.update({message:null==e?void 0:e.message,icon:(null===(i=this._state)||void 0===i?void 0:i.containsMainSeries())||(null===(s=this._state)||void 0===s?void 0:s.maximized().value())?null==e?void 0:e.icon:void 0,backgroundColor:`linear-gradient(${this._chartModel().backgroundTopColor().value()}, ${this._chartModel().backgroundColor().value()})`,textColor:this._chartModel().isDark()?Tt:Ct,solutionId:null==e?void 0:e.solutionId})}collapsedHeight(){var e,t;return Math.max(Math.ceil(null!==(t=null===(e=this._paneControls)||void 0===e?void 0:e.bottomWithMargin())&&void 0!==t?t:0),33)}_topCanvasRenderParams(){return{pixelRatio:(0,Y.getBindingPixelRatio)(this._topCanvasBinding),physicalWidth:this._topCanvasBinding.canvasElement.width,physicalHeight:this._topCanvasBinding.canvasElement.height,cssWidth:this._chartModel().timeScale().width(),cssHeight:this.height()}}_canvasRenderParams(){return{pixelRatio:(0,Y.getBindingPixelRatio)(this._canvasBinding),physicalWidth:this._canvasBinding.canvasElement.width,physicalHeight:this._canvasBinding.canvasElement.height,cssWidth:this._chartModel().timeScale().width(),cssHeight:this.height()}}_tryExitTrackingMode(e){this._exitTrackingModeOnNextTry&&(this._startTrackPoint=null,e||this._clearCursorPosition())}_tryStartMeasure(e,t,i,s,r){return!(!(0, +G.toolIsMeasure)(G.tool.value())||t.startMeasurePoint())&&(e.isTouch||this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,i),s=this._chartModel().magnet().align(s,r,this.state()),t.startMeasuring({price:s,index:r},this.state()),!0)}_tryFinishMeasure(e,t){if(t.startMeasurePoint()&&!t.endMeasurePoint()){let i=t.price;const s=t.index;return i=this._chartModel().magnet().align(i,s,this.state()),t.finishMeasure({price:i,index:s}),e.isTouch?(0,G.resetToCursor)():this._needResetMeasureLater=!0,this._preventCrossHairMove()&&this._clearCursorPosition(),!0}return!1}_tryStartZoom(e,t,i,s){const r=this._chart.model().model().zoomEnabled();if("zoom"===G.tool.value()&&r){const r=this._chartUndoModel(),n=r.timeScale().indexToCoordinate(i)-.5*r.timeScale().barSpacing();return this._firstZoomPoint={price:t,index:i,x:n,y:e.localY},this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,s),this._chartModel().crossHairSource().startSelection(this.state()),!0}return!1}_finishZoom(e){const t=this.state(),i=t.defaultPriceScale(),s=(0,r.ensureNotNull)(t.mainDataSource()).firstValue(),n=i.coordinateToPrice(e.localY,(0,r.ensureNotNull)(s)),o=this._chartUndoModel(),a=Math.round(o.timeScale().coordinateToIndex(e.localX)),l=(0,r.ensureNotNull)(this._firstZoomPoint);a!==l.index&&o.zoomToViewport(l.index,a,l.price,n,t),this._chartModel().crossHairSource().clearSelection(),this._firstZoomPoint=null,(0,G.resetToCursor)(),this._preventCrossHairMove()&&this._clearCursorPosition()}_tryFinishZoom(e){return null!==this._firstZoomPoint&&(this._finishZoom(e),!0)}_tryHandleEraserMouseDown(e,t){if(!("eraser"!==G.tool.value()||e.isCustom||(i=e.source,i&&i.customization&&i.customization.disableErasing))){const i=this._chartUndoModel();if((0,L.isLineTool)(e.source)||(0,k.isStudy)(e.source)){const s=e.hittest.eraseMarker();return t.mod()&&void 0!==s&&e.source.processErase?e.source.processErase(i,s):i.removeSource(e.source,!1),!0}}var i;return!1}_tryStartChangingLineTool(e,t,i,s){var n,o;if(e.isTouch&&null!==this._startTrackPoint)return!1;const a=t.hittest;if((!e.isTouch||!this._preventSourceChange)&&a&&(0,L.isLineTool)(t.source)&&a.result()===H.HitTestResult.CHANGEPOINT){const l=this._chartUndoModel(),c=(0,r.ensure)(null===(n=this.state().mainDataSource())||void 0===n?void 0:n.firstValue()),h=(0,r.ensureNotNull)(t.source.priceScale()).coordinateToPrice(e.localY,c);l.selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection(t.source,a.data())}));let d=h;t.source.priceScale()===l.mainSeries().priceScale()&&(d=l.model().magnet().align(h,s,this.state()));const u=null===(o=a.data())||void 0===o?void 0:o.pointIndex;return this._startChangeLineToolParams={source:t.source,startPoint:{index:s,price:d},screenPoint:{x:e.localX,y:e.localY},pointIndex:u,envState:i},!0}return this._startChangeLineToolParams=null,!1}_tryStartCloning(e,t,i,s){if(i.mod()){const t=this._chartUndoModel().selection().dataSources().filter((e=>e.cloneable()));if(s&&s.cloneable()&&t.push(s),t.length>0)return this._clonningAtMoveLineTools=t.map((e=>e.id())), +this._startCloningPoint=new V.Point(e.localX,e.localY),!0}return!1}_tryFinishClonning(e,t,i){const s=this._chartUndoModel(),n=this._chartModel();if(t.mod()&&this._clonningAtMoveLineTools){const o=new V.Point(e.localX,e.localY),a=(0,r.ensureNotNull)(this._startCloningPoint).subtract(o).length(),l=[];for(const e of this._clonningAtMoveLineTools){const t=n.dataSourceForId(e);null!==t&&l.push(t)}if(0===l.length)return!1;if(a>8){const n=this.cloneLineTools(l,!0).map((e=>(0,r.ensureNotNull)(s.model().dataSourceForId(e))));s.selectionMacro((e=>{e.clearSelection();let t=null;n.forEach((s=>{null===t&&(t=Bt(i,s)),e.addSourceToSelection(s,t)}))}));const o=new V.Point(e.localX,e.localY),a=(0,r.ensureNotNull)(n[0].priceScale()),c=(0,r.ensureNotNull)(this.state().mainDataSource()).firstValue(),h={index:s.timeScale().coordinateToIndex(e.localX),price:a.coordinateToPrice(e.localY,(0,r.ensureNotNull)(c))};s.startMovingSources(n,{logical:h,screen:o},null,t),this._clonningAtMoveLineTools=null,this._startCloningPoint=null}return!0}return!1}_mouseDownEventForLineTool(e,t,i,s){var n,o;const a=G.tool.value();if(!this.hasState()||(0,dt.isLineToolDrawWithoutPoints)(a))return;const l=this._chartUndoModel();let c=!1,h=null;(0,G.hideAllDrawings)().value()&&(0,N.toggleHideMode)(),(0,G.lockDrawings)().setValue(!1),e.isTouch&&!e.stylus&&((0,L.isLineToolName)(a)&&!(0,dt.isLineDrawnWithPressedButton)(a)||l.lineBeingCreated())&&this._initToolCreationModeParams(e);const d=l.lineBeingCreated();if(d&&!(0,dt.isLineDrawnWithPressedButton)(d.toolname)){const a=(0,r.ensure)(null===(n=d.ownerSource())||void 0===n?void 0:n.firstValue());if(e.isTouch&&!e.stylus){if(!this._startTouchPoint){this._startTouchPoint=new V.Point(e.pageX,e.pageY);const t=d.points(),i=t[t.length-1],s=l.timeScale().indexToCoordinate(i.index),n=(0,r.ensureNotNull)(d.priceScale()).priceToCoordinate(i.price,a);return void(this._initCrossHairPosition=new V.Point(s,n))}}else if(!e.isTouch){h=d;const n=l.model().paneForSource(d);if(n!==this._state&&null!==n){const i=this._externalPaneXCoord(n,e.localX),s=this._externalPaneYCoord(n,e.localY);c=l.continueCreatingLine({index:Math.round(l.timeScale().coordinateToIndex(i)),price:(0,r.ensure)(null===(o=d.priceScale())||void 0===o?void 0:o.coordinateToPrice(s,a))},t)}else{const e=l.model().magnet().align(s,i,this.state());c=l.continueCreatingLine({index:i,price:e},t)}}}else if(!e.isTouch||e.stylus||(0,dt.isLineDrawnWithPressedButton)(a)){const e={index:i,price:l.model().magnet().align(s,i,this.state())};h=l.createLineTool({pane:this.state(),point:e,linetool:a}),l.lineBeingCreated()||(c=!0)}const u=this._dataSourceAtPoint(e.localX,e.localY);h&&l.selectionMacro((e=>{e.addSourceToSelection((0,r.ensureNotNull)(h),null==u?void 0:u.hittest.data())})),c&&h&&(this._finishTool(h,u),e.preventDefault())}_handleSelectionMouseDownAndGetJustDeselectedSource(e,t,i){const s=this._chartUndoModel();let r=null;return(null===t||t.source.isSelectionEnabled())&&s.selectionMacro((s=>{ +!this._preventSourceChange&&null!==t&&(e.isTouch?t.hittest.result()>=H.HitTestResult.MOVEPOINT_BACKGROUND:t.hittest.result()>H.HitTestResult.MOVEPOINT_BACKGROUND)?(i.mod()||s.selection().isSelected(t.source)||s.clearSelection(),i.mod()&&s.selection().isSelected(t.source)?(r=t.source,s.removeSourceFromSelection(t.source)):s.addSourceToSelection(t.source,t.hittest.data()),s.selection().allSources().length>1&&(0,_e.trackEvent)("GUI","Multiselect","Click Select")):i.mod()||s.clearSelection()})),r}_processMouseMoveWhileZoom(e,t){this._preventCrossHairMove()||this._setCursorPosition(e.localX,e.localY,t)}_updateCommonTooltip(e,t){let i=null;if(null!==e&&null!==e.hittest){const t=e.hittest.data();t&&(i=t.tooltip||null)}if(null===this._prevTooltipData&&null===i)return;if(null===i||""===i.text)return this._prevTooltipData=null,void(0,_t.hide)(t);if(this._prevTooltipData&&(0,B.default)(i,this._prevTooltipData))return;this._prevTooltipData=i;const s=(0,S.clone)(i);if(void 0!==s.rect){const e=this._paneCell.getBoundingClientRect();s.rect.x+=e.left,s.rect.y+=e.top}(0,_t.show)(s)}_setCursorPositionOnExternalPane(e,t,i,s){t=this._externalPaneXCoord(e,t),i=this._externalPaneYCoord(e,i);this._chart.paneByState(e)._setCursorPosition(t,i,s)}_setCursorPosition(e,t,i){this._updateLastCrosshairPosition(e,t,i),this._chartModel().setAndSaveCurrentPosition(this._correctXCoord(e),this._correctYCoord(t),this.state(),i)}_updateLastCrosshairPosition(e,t,i){const s=this.state().id();Ft={x:e,y:t,envState:i,stateId:s}}_setCursorClassName(e){let t="";e&&(t="pane--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._paneCell.classList.remove(this._currentCursorClassName),t&&this._paneCell.classList.add(t),this._currentCursorClassName=t,this._paneCell.style.cursor)}_processMouseUpOrTouchEndHandler(e){const t=this._dataSourceAtPoint(e.localX,e.localY);null!==t&&t.hittest.tryCallMouseUpOrTouchEndHandler(e)}_crossHairShouldBeVisible(){const e=this._chartModel().crossHairSource();return(0,L.isLineToolName)(G.tool.value())||(0,G.toolIsMeasure)(G.tool.value())||e.startMeasurePoint()&&!e.endMeasurePoint()||null!==this._firstZoomPoint||null!==this._chartModel().lineBeingEdited()||null!==this._chartModel().lineBeingCreated()}_clearCursorPosition(){Ft=null,this._chartModel().clearCurrentPosition()}_dataSourceAtPoint(e,t){if(!this.hasState())return null;const i={result:null},s=this._chartUndoModel();if((0,L.isLineToolName)(G.tool.value())||null!==s.lineBeingCreated())return i.result;if(this._currentChangingLineToolHitTest)return this._currentChangingLineToolHitTest;if(this._currentMovingHitTest)return this._currentMovingHitTest;const r=this.state(),n=r.height(),o=r.width(),a=Vt.bind(null,i),l=this._canvasRenderParams(),c=new V.Point(e,t);if(!this.state().maximized().value()&&this.state().collapsed().value()||(0,F.lastMouseOrTouchEventInfo)().isTouch&&(G.activePointSelectionMode.value()!==G.SelectPointMode.None||null!==this._startTrackPoint))return this._hitTestSources(l,[s.crossHairSource()],c,a,!1),i.result +;const h=r.sourcesByGroup(),d=s.selection();this._hitTestSources(l,d.dataSources(),c,a,!1),this._hitTestSources(l,d.customSources(),c,a,!0);const u=new Set(d.allSources().map((e=>e.id())));this._hitTestSources(l,[s.crossHairSource()],c,a,!1,u),this._hitTestSources(l,r.customSources(z.CustomSourceLayer.Topmost),c,a,!0,u),this._hitTestSources(l,h.tradingSources(),c,a,!1,u),this._hitTestSources(l,r.customSources(z.CustomSourceLayer.Foreground),c,a,!0,u);const p=[...this._chartModel().multiPaneSources(r),...h.hitTestSources()];if(this._hitTestSources(l,p,c,a,!1,u),this.containsMainSeries()){const e=s.activeStrategySource().value();if(null!==e){const t=e.strategyOrdersPaneView();if(null!==t){const s=t.renderer(n,o);if(null!==s){const t=s.hitTest(c,l);t&&Vt(i,t,e,s,!1)}}}}return null===i.result&&this._hitTestSources(l,r.customSources(z.CustomSourceLayer.Background),c,a,!0,u),i.result}_hitTestSources(e,t,i,s,n,o){const a=(0,r.ensureNotNull)(this._state),l=a.height(),c=a.width();for(let r=t.length-1;r>=0;--r){const h=t[r];if(void 0!==o&&o.has(h.id()))continue;const d=h.paneViews(a);if(null!==d&&0!==d.length)for(let t=d.length-1;t>=0;--t){const r=d[t].renderer(l,c);if(r&&r.hitTest){const t=r.hitTest(i,e);null!==t&&s(t,h,r,n)}}}}_tryStartMovingLineTool(e,t,i,s){var n;if(null===t.source||!t.source.movable()||null!==this._startTrackPoint)return!1;if(!this._preventSourceChange){const o=this._chartUndoModel(),a=(0,r.ensureNotNull)((0,r.ensureNotNull)(this._state).mainDataSource()).firstValue(),l=(0,r.ensureNotNull)(t.source.priceScale()).coordinateToPrice(e.localY,(0,r.ensureNotNull)(a));let c=(t.source.isSelectionEnabled()?o.selection().allSources():[t.source]).filter(vt);const h=c.filter(L.isLineTool);c=h.length>0?h:c.includes(t.source)?[t.source]:[c[0]];const d=new V.Point(e.localX,e.localY),u={index:s,price:l},p=null===(n=t.hittest.data())||void 0===n?void 0:n.activeItem;return this._startMoveSourceParams={source:c,startPoint:{logical:u,screen:d},activeItem:void 0===p?null:p,envState:i},!0}return this._startMoveSourceParams=null,!1}_chartModel(){return this._chart.model().model()}_chartUndoModel(){return this._chart.model()}_externalPaneXCoord(e,t){t+=this._div.getBoundingClientRect().left+document.body.scrollLeft;const i=(0,r.ensureNotNull)(this._chart.paneByState(e)),s=i._div.getBoundingClientRect().left+document.body.scrollLeft;return i._correctXCoord(t-s)}_externalPaneYCoord(e,t){t+=this._div.getBoundingClientRect().top+document.body.scrollTop;const i=(0,r.ensureNotNull)(this._chart.paneByState(e)),s=i._div.getBoundingClientRect().top+document.body.scrollTop;return i._correctYCoord(t-s)}_correctXCoord(e){return Math.max(0,Math.min(e,this._size.width-1))}_correctYCoord(e){return Math.max(0,Math.min(e,this._size.height-1))}_processScroll(e){if(!this._chart.model().model().scrollEnabled())return;const t=performance.now();this._startScrollingPos||this._preventScroll()||(this._startScrollingPos={x:e.clientX,y:e.clientY,timestamp:t,localX:e.localX,localY:e.localY});const i=this._chartUndoModel(),s=this._chartModel().timeScale() +;let r=this.state().defaultPriceScale();if(this._startScrollingPos&&!this._isScrolling&&(this._startScrollingPos.x!==e.clientX||this._startScrollingPos.y!==e.clientY)){if(i.beginUndoMacro(xt,!0),null===this._scrollXAnimation&&this._options.useKineticScroll){const e=s.barSpacing();this._scrollXAnimation=new rt(.2/e,7/e,.997,15/e),this._scrollXAnimation.addPosition(s.rightOffset(),this._startScrollingPos.timestamp)}return i.selection().isEmpty()||(r=i.selection().allSources()[0].priceScale()),null===r||r.isEmpty()||(this._scrollPriceScale=r,i.startScrollPrice(this.state(),r,e.localY)),i.startScrollTime(e.localX),this._isScrolling=!0,this.setCursorForTool(),void this._paneWidgetsSharedState.setScrollingPane(this)}this._isScrolling&&(null!==this._scrollPriceScale&&i.scrollPriceTo(this.state(),this._scrollPriceScale,e.localY),i.scrollTimeTo(e.localX),null!==this._scrollXAnimation&&this._scrollXAnimation.addPosition(s.rightOffset(),t))}_finishScroll(){const e=this._chartUndoModel();e.endScrollTime(),null!==this._scrollPriceScale&&e.endScrollPrice(this.state(),this._scrollPriceScale),e.endUndoMacro(),this._isScrolling=!1,this._startScrollingPos=null,this._scrollPriceScale=null,this.setCursorForTool(),this._paneWidgetsSharedState.setScrollingPane(null)}_endScroll(e){if(!this._isScrolling)return!1;this._finishScroll();const t=this._scrollUndoCommandInStack(),i=performance.now(),s=this._chartUndoModel().timeScale();return null!==this._scrollXAnimation&&(this._scrollXAnimation.start(s.rightOffset(),i),this._scrollXAnimation.finished(i)||(this._chartModel().setTimeScaleAnimation(this._scrollXAnimation),this._scrollXAnimation=null)),t}_preventScroll(){return this._trackCrosshairOnlyAfterLongTap&&this._longTap||this._contextMenuOpenedOnLastTap||(0,L.isLineToolName)(G.tool.value())||Boolean(this._chartUndoModel().lineBeingCreated())||null!==this._startTrackPoint}_isSelectPointModeEnabled(){return this._chartUndoModel().crossHairSource().selectPointMode().value()!==G.SelectPointMode.None}_preventCrossHairMove(){return!!this._trackCrosshairOnlyAfterLongTap&&(null===this._chart.trackingModePaneWidget()&&(!!this._contextMenuOpenedOnLastTap||!this._crossHairShouldBeVisible()&&null===this._startTrackPoint))}_finishTool(e,t=null){const i=this._chartUndoModel(),s=e.toolname;if(s===G.tool.value()&&(0,G.resetToCursor)(),this._preventCrossHairMove()&&this._clearCursorPosition(),i.selectionMacro((i=>{i.addSourceToSelection(e,Bt(t,e))})),(0,dt.isTextToolName)(s)){const t=i.createUndoCheckpoint();this._chart.showChartPropertiesForSource(e,ut.TabNames.text,void 0,t).then((e=>{0}))}this._lastFinishedToolId=e.id(),(0,d.emit)("drawing_event",e.id(),"create"),(0,ht.trackDrawingCreated)(e)}_alignSourcesThatBeingMoved(e,t,i,s){const r=this._chartUndoModel(),n=r.timeScale().coordinateToIndex(t);r.model().sourcesBeingMoved().forEach((e=>{var o;let a=n,l=e.convertYCoordinateToPriceForMoving(i,this.state().mainDataSource());if(null!==l){if((0,k.isStudy)(e)){const e=r.mainSeries(),t=e.bars().firstIndex(),i=e.bars().lastIndex() +;null!==t&&null!==i&&(a=Math.min(Math.max(n,t),i)),l=this._chartModel().magnet().align(l,n,this.state())}null!==this._currentMovingHitTest&&void 0!==(null===(o=this._currentMovingHitTest.hittest.data())||void 0===o?void 0:o.cursorType)||this.setCursorForTool(),r.moveSources({screen:new V.Point(t,i),logical:{index:a,price:l}},s)}}))}_resetMeasureIfRequired(){this._needResetMeasureLater&&((0,G.resetToCursor)(),this._needResetMeasureLater=!1)}_drawBackground(e,t){const i=Math.ceil(t.pixelRatio*this._size.width),s=Math.ceil(t.pixelRatio*this._size.height),r=this._chartModel(),n=r.backgroundTopColor().value(),o=r.backgroundColor().value();n===o?(0,Y.clearRect)(e,0,0,i+1,s+1,o):(0,K.clearRectWithGradient)(e,0,0,i+1,s+1,n,o)}_drawWatermark(e,t){const i=this._chartModel().watermarkSource();if(null===i)return;const s=this.state();if(!s.containsMainSeries())return;const r=i.paneViews(),n=s.height(),o=s.width();for(const i of r){e.save();const s=i.renderer(n,o);s&&s.draw(e,t),e.restore()}}_drawCrossHair(e,t){const i=this._chartUndoModel().crossHairSource();!i.visible&&(0,G.lockTimeAxis)().value()&&(i.setLockedPosition((0,r.ensureNotNull)(this._state)),i.updateAllViews((0,yt.sourceChangeEvent)(i.id()))),this._drawSourceImpl(e,t,Lt,At,i)}_drawActiveLineTools(e,t){const i=this._chartModel(),s=[i.lineBeingCreated(),i.lineBeingEdited(),...i.sourcesBeingMoved(),i.customSourceBeingMoved()].filter((e=>!!e));for(const r of s){(i.paneForSource(r)===this.state()||(0,j.isDataSource)(r)&&r.isMultiPaneEnabled())&&this._drawSourceImpl(e,t,Lt,At,r)}}_drawSeriesTopViews(e,t){this.state().containsMainSeries()&&this._drawSourceImpl(e,t,kt,At,this._chartUndoModel().mainSeries())}_drawSources(e,t){const i=this.state(),s=i.model(),r=i.sourcesByGroup(),n=r.tradingSources(),o=[...s.multiPaneSources(i),...r.generalSources()],a=r.phantomSources(),l=i.customSources(z.CustomSourceLayer.Background).slice(),c=i.customSources(z.CustomSourceLayer.Foreground).slice(),h=i.customSources(z.CustomSourceLayer.Topmost).slice();{const e=s.panes();for(let t=e.length-1;t>=0;t--)e[t].createDrawingsCaches()}this._drawSourceImpl(e,t,Lt,At,s.gridSource()),this._drawWatermark(e,t);for(const i of l)this._drawSourceImpl(e,t,Lt,Mt,i);for(const i of o)this._drawSourceImpl(e,t,Lt,Mt,i);for(const i of c)this._drawSourceImpl(e,t,Lt,Mt,i);for(const i of a)this._drawSourceImpl(e,t,Lt,Mt,i);const d=new Set;[s.lineBeingCreated(),s.lineBeingEdited(),...s.sourcesBeingMoved(),s.customSourceBeingMoved()].filter(S.notNull).forEach((e=>d.add(e.id())));let u=s.hoveredSource();null!==u&&((0,j.isDataSource)(u)&&!u.showOnTopOnHovering()||d.has(u.id())||(0,j.isDataSource)(u)&&!o.includes(u)?u=null:d.add(u.id()));const p=s.selection().allSources().filter((e=>!((0,j.isDataSource)(e)&&!o.includes(e))&&!d.has(e.id())));p.forEach((e=>d.add(e.id())));{for(const i of l)this._drawSourceImpl(e,t,Lt,At,i,d);for(const i of o)this._drawSourceImpl(e,t,Lt,At,i,d);for(const i of c)this._drawSourceImpl(e,t,Lt,At,i,d);const i=s.activeStrategySource().value() +;i&&this.containsMainSeries()&&this._drawSourceImpl(e,t,Dt,At,i)}for(const i of n)this._drawSourceImpl(e,t,Lt,Mt,i);for(const i of h)this._drawSourceImpl(e,t,Lt,Mt,i);for(const i of o)this._drawSourceImpl(e,t,Et,At,i,d);for(const i of c)this._drawSourceImpl(e,t,Et,At,i,d);for(const i of n)this._drawSourceImpl(e,t,Lt,At,i,d);for(const i of h)this._drawSourceImpl(e,t,Lt,At,i,d);for(const i of p)this._drawSourceImpl(e,t,Lt,At,i);for(const i of p)this._drawSourceImpl(e,t,Et,At,i);u&&(this._drawSourceImpl(e,t,Lt,At,u),this._drawSourceImpl(e,t,Et,At,u));for(const i of a)this._drawSourceImpl(e,t,Lt,At,i,d);{const e=s.panes();for(let t=e.length-1;t>=0;t--)e[t].clearDrawingCaches()}}_drawSourceImpl(e,t,i,s,r,n){if(n&&n.has(r.id()))return;const o=this.state(),a=o.height(),l=o.width(),c=i(r,this.state());if(c)for(const i of c){const r=i.renderer(a,l);r&&(e.save(),s(r,e,t),e.restore())}}_updateByThemedColors(){null!==this._legendWidget&&this._legendWidget.updateThemedColors(this._themedTopColor),null!==this._paneControls&&this._paneControls.updateThemedColors(this._themedTopColor)}_scrollUndoCommandInStack(){const e=this._chartUndoModel().undoHistory().undoStack();if(e.isEmpty())return!1;const t=e.head();if(!(t instanceof q.UndoMacroCommand))return!1;if(t.isEmpty())return!1;const i=t.commands()[0];return i instanceof lt.PriceScaleChangeUndoCommand||i instanceof at.TimeScaleChangeUndoCommand}_onStateDestroyed(){this.setState(null)}_onDataSourcesCollectionChanged(){this._startMoveSourceParams=null}_processMouseEnterLeaveMoveHandlers(e,t){var i,s,r,n;null===this._prevHoveredHittest||this._prevHoveredHittest.renderer===(null==e?void 0:e.renderer)&&(null===(i=this._prevHoveredHittest.hittest.data())||void 0===i?void 0:i.activeItem)===(null===(s=e.hittest.data())||void 0===s?void 0:s.activeItem)||((0,H.tryCallHandler)(t,null===(r=this._prevHoveredHittest.hittest.data())||void 0===r?void 0:r.mouseLeaveHandler),this._prevHoveredHittest=null),t.isTouch||null!==e&&((null===(n=this._prevHoveredHittest)||void 0===n?void 0:n.renderer)!==e.renderer&&(e.hittest.tryCallMouseEnterHandler(t),this._prevHoveredHittest=e),e.hittest.tryCallMouseMoveHandler(t))}_startChangeOrMoveLineToolIfNeeded(){if(null!==this._startChangeLineToolParams){const e=this._startChangeLineToolParams;this._chartUndoModel().startChangingLinetool(e.source,e.startPoint,e.pointIndex,e.envState)}if(null!==this._startMoveSourceParams){const e=this._startMoveSourceParams;this._chartUndoModel().startMovingSources(e.source,e.startPoint,e.activeItem,e.envState)}this._startMoveSourceParams=null,this._startChangeLineToolParams=null}_trackingModeShouldBeActive(){return!(!this._trackCrosshairOnlyAfterLongTap||this._contextMenuOpenedOnLastTap||this._crossHairShouldBeVisible())&&this._longTap}_processOutsideClick(e,t){var i;let s=null;const r=this._chartModel();if(null!==e&&(s=e.isCustom?r.customSourceName(e.source):e.source.id()),null!==this._lastClickedSource&&this._lastClickedSource.id!==s){const e=this._lastClickedSource.id +;let i=this._lastClickedSource.isCustom?r.customSourceForName(e):r.dataSourceForId(e);null!==i||this._lastClickedSource.isCustom||(i=r.dataSourceForId(e)),null!==i&&i.onClickOutside&&(i.onClickOutside(t),this._chartModel().updateSource(i))}this._lastClickedSource=null!==s?{id:s,isCustom:null!==(i=null==e?void 0:e.isCustom)&&void 0!==i&&i}:null}_mouseClickOrTapEvent(e){var t;if(!this.hasState())return;const i=this._dataSourceAtPoint(e.localX,e.localY),s=i&&i.source,n=this._chartUndoModel(),o=Boolean(null===(t=null==i?void 0:i.hittest.data())||void 0===t?void 0:t.hideCrosshairLinesOnHover);this._processOutsideClick(i,e),!this._isSelectPointModeEnabled()||o||e.isTouch&&this.trackingModeEnabled()&&!this._exitTrackingModeOnNextTry||n.crossHairSource().trySelectCurrentPoint(),null!==i&&i.hittest.tryCallClickOrTapHandler(e)&&n.model().updateSource((0,r.ensureNotNull)(s)),!e.isTouch||this._isSelectPointModeEnabled()||i&&i.source===n.crossHairSource()||this._tryExitTrackingMode(),s&&(0,L.isLineTool)(s)&&this._lastFinishedToolId!==s.id()&&(0,d.emit)("drawing_event",s.id(),"click"),this._resetMeasureIfRequired()}_mouseDownOrTouchStartEvent(e,t){var i,s,n,o,a;if(this._pressedMoveStage=1,e.isTouch&&(this._longTap=!1,this._exitTrackingModeOnNextTry=null!==this._startTrackPoint,this._paneWidgetsSharedState.clearDraggingSource()),this._contextMenuOpenedOnLastTap=!1,this._lastFinishedToolId=null,this._chartModel().stopTimeScaleAnimation(),e.isTouch&&this._switchTrackingModeFromAnotherPaneIfNeeded(e),document.activeElement!==document.body&&document.activeElement!==document.documentElement)document.activeElement&&document.activeElement.blur?document.activeElement.blur():document.body.focus();else{const e=document.getSelection();null!==e&&e.removeAllRanges()}(0,d.emit)("mouse_down",{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}),this._updateCommonTooltip(null);const l=this._chartUndoModel(),c=new U.EnvironmentState(e);l.mainSeries().clearGotoDateResult();const h=this.state().defaultPriceScale();if(h.isEmpty()||l.timeScale().isEmpty())return;const u=l.crossHairSource();if(!e.isTouch&&!(0,dt.isLineDrawnWithPressedButton)(G.tool.value())){const t=l.lineBeingCreated(),i=null!==t?l.model().paneForSource(t):null;null!==i&&i!==this._state?this._setCursorPositionOnExternalPane(i,e.localX,e.localY,c):this._setCursorPosition(e.localX,e.localY,c)}e.isTouch&&(0,L.isLineToolName)(G.tool.value())&&((0,dt.isLineDrawnWithPressedButton)(G.tool.value())||null!==u.pane?(0,dt.isLineDrawnWithPressedButton)(G.tool.value())&&this._clearCursorPosition():this._chart.updateCrossHairPositionIfNeeded());const p=(0,r.ensureNotNull)(this.state().mainDataSource()).firstValue();if(null===p)return void(this._chart.readOnly()||(this._handleSelectionMouseDownAndGetJustDeselectedSource(e,t,c),null!==t&&(0,ct.isPriceDataSource)(t.source)&&t.source.isDraggable()&&this._paneWidgetsSharedState.trySetDraggingSource(t.source,this))) +;let _=h.coordinateToPrice(e.localY,p),m=this._chartModel().timeScale().coordinateToIndex(e.localX);if(u.startMeasurePoint()&&u.endMeasurePoint()&&u.clearMeasure(),c.shift()&&(null===t||!(null===(s=null===(i=t.hittest.data())||void 0===i?void 0:i.hasOwnShortcutsBehaviourFor)||void 0===s?void 0:s.shiftKey))&&(0,G.toolIsCursor)(G.tool.value())&&l.selection().isEmpty()&&G.tool.setValue("measure"),(e.isTouch&&!e.stylus||!this._tryStartMeasure(e,u,c,_,m))&&(e.isTouch&&!e.stylus||!this._tryFinishMeasure(e,u))&&!this._tryFinishZoom(e)&&!this._tryStartZoom(e,_,m,c)){if(e.isTouch&&(null!==this._startTrackPoint?(this._initCrossHairPosition=u.currentPoint(),this._startTrackPoint=new V.Point(e.localX,e.localY)):this._isSelectPointModeEnabled()&&null===this._chart.trackingModePaneWidget()&&this.startTrackingMode(new V.Point(e.localX,e.localY),new V.Point(e.localX,e.localY),new U.EnvironmentState(e))),e.isTouch&&(this._preventSourceChange=null===t||!l.selection().isSelected(t.source)),!this._isSelectPointModeEnabled()&&!this._isScrolling){if(e.isTouch&&!e.stylus&&((0,G.toolIsMeasure)(G.tool.value())||null!==u.measurePane().value()))return void this._initToolCreationModeParams(e);if((0,L.isLineToolName)(G.tool.value())||l.lineBeingCreated())return c.shift()||l.selectionMacro((e=>e.clearSelection())),void this._mouseDownEventForLineTool(e,c,m,_)}if(null!==t&&t.hittest.tryCallMouseDownOrTouchStartHandler(e),!this._chart.readOnly()){const i=this._handleSelectionMouseDownAndGetJustDeselectedSource(e,t,c);if(null!==t&&!this._preventSourceChange){const i=t.hittest.data();if(t.isCustom){if(t.hittest.hasPressedMoveHandler(e))return l.model().setMovingCustomSource(t.source,i),this._currentMovingHitTest=t,void l.selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection((0,r.ensureNotNull)(t.source),(0,r.ensureNotNull)(i))}))}else if((null==i?void 0:i.areaName)===H.AreaName.SourceItemMove){const s=null==i?void 0:i.activeItem;if(void 0!==s)return l.startCustomMoving(t.source,s,e),this._currentMovingHitTest=t,void l.selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection((0,r.ensureNotNull)(t.source),(0,r.ensureNotNull)(i))}))}}if(null!==t&&this._tryHandleEraserMouseDown(t,c))return;const s=null!==t&&(0,L.isLineTool)(t.source)&&t.source.isLocked&&t.source.isLocked();if(!((0,G.lockDrawings)().value()||s)&&null!==t&&!t.isCustom){if(!t.source.userEditEnabled())return;const s=null===(n=t.hittest.data())||void 0===n?void 0:n.snappingPrice,l=null===(o=t.hittest.data())||void 0===o?void 0:o.snappingIndex;let h=e.localY,d=e.localX;if(void 0!==s&&(h=(0,r.ensure)(null===(a=t.source)||void 0===a?void 0:a.priceScale()).priceToCoordinate(s,p),_=s),void 0!==l&&(d=this._chartModel().timeScale().indexToCoordinate(l),m=l),h===e.localY&&d===e.localX||(e={...e,localY:h,localX:d},this._setCursorPosition(e.localX,e.localY,c)),this._tryStartChangingLineTool(e,t,c,m))return void(this._currentChangingLineToolHitTest=t);if(this._currentChangingLineToolHitTest=null, +(g=t.hittest.result())===H.HitTestResult.MOVEPOINT||g===H.HitTestResult.MOVEPOINT_BACKGROUND&&(0,F.lastMouseOrTouchEventInfo)().isTouch){if(this._tryStartCloning(e,t,c,i))return;if(this._tryStartMovingLineTool(e,t,c,m))return void(this._currentMovingHitTest=t);this._currentMovingHitTest=null}}if(null!==t&&(0,ct.isPriceDataSource)(t.source)&&t.source.isDraggable()&&this._paneWidgetsSharedState.trySetDraggingSource(t.source,this))return}var g;null!==t&&t.hittest.result()===H.HitTestResult.REGULAR||(this._processing=!0)}}_mouseUpOrTouchEndEvent(e){var t,i;if(!this.hasState())return;this._pressedMoveStage=0;const s=e.isTouch&&null!==this._startTrackPoint,n=e.isTouch&&this._wasPinched;e.isTouch&&(this._wasPinched=!1,this._longTap=!1),this._startMoveSourceParams=null,this._startChangeLineToolParams=null,this._currentChangingLineToolHitTest=null,this._currentMovingHitTest=null;const o=this._chartUndoModel(),a=o.model().customSourceMovingHitTestData();null!==a||o.customMoveBeingProcessed()||this._processMouseUpOrTouchEndHandler(e),this._isSelecting=!1;const l=o.model(),c=l.crossHairSource(),h=this._dataSourceAtPoint(e.localX,e.localY);if(c.selection()&&null===this._firstZoomPoint){const e=this.state().lineToolsForArea(c.selection());o.selectionMacro((t=>{let i=null;e.forEach((e=>{null===i&&(i=Bt(h,e)),t.addSourceToSelection(e,i)}))})),c.clearSelection(),(0,_e.trackEvent)("GUI","Multiselect","Area Select")}(0,d.emit)("mouse_up",{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY});const u=e.isTouch&&this._touchMove;e.isTouch&&(this._touchMove=!1);const p=new U.EnvironmentState(e),_=G.tool.value();if(e.isTouch&&((0,G.toolIsMeasure)(_)||null!==c.measurePane().value())){if(!u&&!e.stylus&&null===c.measurePane().value()&&c.pane!==this._state)return void this._setCursorPosition(e.localX,e.localY);if(!u&&!e.stylus&&this._tryStartMeasure(e,c,p,c.price,c.index))return;if((!u||e.stylus)&&this._tryFinishMeasure(e,c))return}if(e.isTouch&&!u&&!(0,dt.isLineDrawnWithPressedButton)(_)&&(0,L.isLineToolName)(_)&&!o.lineBeingCreated()){if(this._chart.justActivated())return;if(c.pane!==this._state)return void this._setCursorPosition(e.localX,e.localY,p);const i=c.currentPoint(),s=this.state().defaultPriceScale(),n=(0,r.ensure)(null===(t=this.state().mainDataSource())||void 0===t?void 0:t.firstValue()),a={index:Math.round(o.timeScale().coordinateToIndex(i.x)),price:s.coordinateToPrice(i.y,n)},l=(0,r.ensureNotNull)(o.createLineTool({pane:this.state(),point:a,linetool:_}));return o.selectionMacro((e=>{e.addSourceToSelection(l)})),o.lineBeingCreated()||(this._finishTool(l,h),e.preventDefault()),void(this._startTouchPoint=null)}const m=o.lineBeingCreated();if(m&&!(0,dt.isLineDrawnWithPressedButton)(m.toolname)&&e.isTouch&&(this._startTouchPoint||e.stylus)){if(this._startTouchPoint=null,!u||e.stylus){const t=m.points()[m.points().length-1],i=o.continueCreatingLine({index:t.index,price:t.price},new U.EnvironmentState(e));this._initCrossHairPosition=null,i&&(this._finishTool(m,h),e.preventDefault())} +return}if(null!==this._firstZoomPoint&&this._firstZoomPoint.draggingMode)return void this._finishZoom(e);if(this._processing=!1,o.customMoveBeingProcessed())return void o.endCustomMoving();if(null!==a&&(a.beingMoved&&((0,H.tryCallHandler)(e,a.mouseUpHandler,a.touchEndHandler),this.setCursorForTool()),l.setMovingCustomSource(null,null),Wt(e,a)))return;if(l.lineBeingEdited())return o.endChangingLinetool(!1),void(this._preventCrossHairMove()&&this._clearCursorPosition());if((0,dt.isLineDrawnWithPressedButton)(_)&&!this._isSelectPointModeEnabled()){const t=o.lineBeingCreated();null!==t&&((0,ht.trackDrawingCreated)(t),t.finish());const s=this.state().defaultPriceScale();if(s.isEmpty())return;if(!t)return;const n=(0,r.ensure)(null===(i=t.ownerSource())||void 0===i?void 0:i.firstValue()),a=s.coordinateToPrice(e.localY,n),l={index:Math.round(o.timeScale().coordinateToIndex(e.localX)),price:a};return void o.continueCreatingLine(l)}if(l.sourcesBeingMoved().length)return o.endMovingSource(!1,!1),l.sourcesBeingMoved().filter(L.isLineTool).forEach((e=>{this.setCursorForTool(e)})),void l.invalidate(D.InvalidationMask.cursor());if(!this._chart.readOnly()){const t=e.localX>=0&&e.localXH.HitTestResult.MOVEPOINT_BACKGROUND||(0,F.lastMouseOrTouchEventInfo)().isTouch)&&o.selectionMacro((e=>{e.clearSelection();const t=(0,r.ensureNotNull)(h.source);e.addSourceToSelection(t,Bt(h,t))})),e.isTouch&&(this._touchMove=!1)}_mouseOrTouchMoveEvent(e){if(!this.hasState())return;this._resetMeasureIfRequired();const t=this._dataSourceAtPoint(e.localX,e.localY);this._processMouseEnterLeaveMoveHandlers(t,e);const i=this._chartUndoModel();if(!i)return;const s=e.localX,r=e.localY;this._prevMoveEventPosition=new V.Point(s,r);const n=new U.EnvironmentState(e);if(null===this._firstZoomPoint){if(this._updateHoveredSource(t,n,e),!e.isTouch&&i.lineBeingCreated()){ +const e=i.lineBeingCreated(),t=null===e?null:i.model().paneForSource(e);if(null!==t&&t!==this._state)return void this._setCursorPositionOnExternalPane(t,s,r,n)}e.isTouch||this._setCursorPosition(s,r,n)}else this._processMouseMoveWhileZoom(e,n)}_pressedMouseOrTouchMoveEvent(e){var t;if(!this.hasState()||this._pinching||e.isTouch&&this._contextMenuOpenedOnLastTap)return;this._pressedMoveStage=2,this._resetMeasureIfRequired(),this._startChangeOrMoveLineToolIfNeeded(),e.isTouch&&(this._touchMove=!0,this._preventSourceChange=!1);const i=new U.EnvironmentState(e),s=this._chartUndoModel(),n=s.crossHairSource(),o=e.localX,a=e.localY;if(this._prevMoveEventPosition=new V.Point(o,a),null!==this._firstZoomPoint)return this._processMouseMoveWhileZoom(e),void(this._firstZoomPoint.draggingMode=!0);const l=G.tool.value();if(e.isTouch&&this._startTouchPoint&&(0,L.isLineToolName)(l)&&!(0,dt.isLineDrawnWithPressedButton)(l)&&!s.lineBeingCreated()&&!this._isSelectPointModeEnabled())return void this._updateCrosshairPositionInToolCreationMode(e,this.state());const c=n.measurePane().value();if(e.isTouch&&(this._startTouchPoint||e.stylus)&&((0,G.toolIsMeasure)(l)||null!==c))return void(e.stylus?this._setCursorPosition(e.localX,e.localY,new U.EnvironmentState(e)):this._updateCrosshairPositionInToolCreationMode(e,c||this.state()));const h=s.lineBeingCreated();if(e.isTouch&&!e.stylus&&h&&!(0,dt.isLineDrawnWithPressedButton)(h.toolname)){if(this._startTouchPoint){const t=(0,r.ensureNotNull)(s.lineBeingCreated()),i=(0,r.ensureNotNull)(s.model().paneForSource(t));this._updateCrosshairPositionInToolCreationMode(e,i)}return}if(e.isTouch&&null!==this._startTrackPoint){this._exitTrackingModeOnNextTry=!1;const e=(0,r.ensureNotNull)(this._initCrossHairPosition),t=new V.Point(o,a).subtract(this._startTrackPoint),s=e.add(t);this._setCursorPosition(s.x,s.y,i)}else e.isTouch&&this._preventCrossHairMove()||this._setCursorPosition(o,a,i);const d=this._isSelectPointModeEnabled();if((0,L.isLineToolName)(l)&&!(0,dt.isLineDrawnWithPressedButton)(l)&&!d&&!i.mod())return;if((0,dt.isLineDrawnWithPressedButton)(l)&&!d){const i=this.state().defaultPriceScale();if(i.isEmpty())return;const n=s.lineBeingCreated();if(!n)return;const o=new V.Point(e.localX,e.localY),a=(0,r.ensure)(null===(t=n.ownerSource())||void 0===t?void 0:t.firstValue());return o.price=i.coordinateToPrice(e.localY,a),o.index=Math.round(s.timeScale().coordinateToIndex(e.localX)),void s.continueCreatingLine(o)}if(null!==this._paneWidgetsSharedState.draggingSource()){const t=e.target,i=this._chart.paneByCanvas(t);i&&(i!==this?i.setDragToAnotherPaneCursor():i.setCursorForTool());const s=this._chart.timeAxisByCanvas(t);s&&s.setCursor("grabbing")}if(s.timeScale().isEmpty())return;const u=this._options.handleScroll;if((!u.pressedMouseMove||e.isTouch)&&(!u.horzTouchDrag&&!u.vertTouchDrag||!e.isTouch))return;if(s.customMoveBeingProcessed())return void s.processCustomMove(e);const p=s.model().customSourceMovingHitTestData();if(null!==p&&(this._updateCommonTooltip(null,!0),s.model().processingCustomSourceMove(), +(0,H.tryCallHandler)(e,p.pressedMouseMoveHandler,p.touchMoveHandler),Wt(e,p)))return;if(s.model().lineBeingEdited())return void this._setCursorPosition(o,a,i);if(s.model().sourcesBeingMoved().length)return void this._alignSourcesThatBeingMoved(s.model().sourcesBeingMoved(),e.localX,e.localY,i);const _=this._dataSourceAtPoint(e.localX,e.localY);if(this._tryFinishClonning(e,new U.EnvironmentState(e),_))return;const m=(0,G.toolIsMeasure)(l)||n.startMeasurePoint()&&n.endMeasurePoint();this._chart.readOnly()||!i.mod()||(0,L.isLineToolName)(l)||m||d?(this._processScroll(e),this._preventScroll()&&!this._preventCrossHairMove()&&null===this._startTrackPoint&&this._setCursorPosition(e.localX,e.localY,new U.EnvironmentState(e))):this._isSelecting||(n.startSelection(this.state()),this._isSelecting=!0)}_mouseOrTouchLeaveEvent(e){var t;if(!this.hasState())return;const i=this._chartUndoModel();if(!i)return;const s=i.crossHairSource();e.isTouch||null!==s.measurePane().value()&&null===s.endMeasurePoint()||this._clearCursorPosition(),i.model().setHoveredSource(null,null),null!==this._prevHoveredHittest&&((0,H.tryCallHandler)(e,null===(t=this._prevHoveredHittest.hittest.data())||void 0===t?void 0:t.mouseLeaveHandler),this._prevHoveredHittest=null),this._updateCommonTooltip(null),this._chart.unsetActivePaneWidget()}_mouseDoubleClickOrDoubleTapEvent(e){if(!this.hasState())return;const t=!this._chart.readOnly()&&!(0,L.isLineToolName)(G.tool.value())&&this._dataSourceAtPoint(e.localX,e.localY)||null;if(null!==t&&t.isCustom)t.hittest.tryCallDblClickOrDblTapHandler(e);else if(null!==t&&(e.isTouch||t.hittest.result()>H.HitTestResult.MOVEPOINT_BACKGROUND))this.processDoubleClickOnSource(t.source,t.hittest?t.hittest:void 0);else if(!this._chart.readOnly()&&!(0,L.isLineToolName)(G.tool.value())&&!this._chartUndoModel().lineBeingCreated()&&this._chartUndoModel().selection().isEmpty()){const t=this.state();new U.EnvironmentState(e).mod()&&!t.maximized().value()?(t.collapsed().value()||this._chartModel().paneCollapsingAvailable().value())&&this._chart.toggleCollapsedPane(this):this._chart.toggleMaximizePane(this)}}_contextMenuEvent(e){const t=this._chartUndoModel();if(t.crossHairSource().startMeasurePoint()&&!this._trackCrosshairOnlyAfterLongTap)return t.crossHairSource().clearMeasure(),void(0,G.resetToCursor)(!0);if(this._pinching)return;if(null===this._firstZoomPoint||this._trackCrosshairOnlyAfterLongTap||this.cancelZoom(),!(0,G.toolIsCursor)(G.tool.value())||this._isSelectPointModeEnabled()){if(e.isTouch)return;return(0,G.resetToCursor)(!0),this.setCursorForTool(),void(t.lineBeingCreated()&&t.cancelCreatingLine())}if(!this._options.contextMenuEnabled)return;const i=this._dataSourceAtPoint(e.localX,e.localY),s=i?i.source:null;if(e.isTouch&&null!==this._startTrackPoint){if(this._preventSourceChange)return;this._clearCursorPosition()}e.isTouch&&(this._contextMenuOpenedOnLastTap=!0,this._startTrackPoint=null),this._contextMenuX=e.localX,this._contextMenuY=e.localY +;const r=i&&i.hittest?i.hittest.result():0,n=r>=H.HitTestResult.REGULAR||r>=H.HitTestResult.MOVEPOINT_BACKGROUND&&e.isTouch;this._chart.updateActions(),t.selectionMacro((t=>{null!==s&&n?t.selection().isSelected(s)||(t.clearSelection(),t.addSourceToSelection(s,Bt(i,s))):(this._options.contextMenu.general&&this._showContextMenu(e),t.clearSelection())})),null!==i&&n&&null!==s&&((0,j.isDataSource)(s)&&s.hasContextMenu()?s.isSelectionEnabled()?this.showContextMenuForSelection(e):this.showContextMenuForSources([s],e):i.hittest.tryCallContextMenuHandler(e))}_onMouseEvent(){this._preventSourceChange=!1,this._startTrackPoint=null,this._trackCrosshairOnlyAfterLongTap=!1}_onTouchEvent(){this._trackCrosshairOnlyAfterLongTap=!0}_switchTrackingModeFromAnotherPaneIfNeeded(e){const t=this._chart.trackingModePaneWidget();if(null!==t&&t!==this){const i=this._chartModel().crossHairSource().currentPoint();t._exitTrackingModeOnNextTry=!0,t._tryExitTrackingMode(!0),this.startTrackingMode(new V.Point(e.localX,e.localY),new V.Point(i.x,e.localY),new U.EnvironmentState(e))}}_showContextMenu(e){const t=e=>e instanceof Ne.Separator,i=this._customActions(),s=this._initActions(e).filter((e=>null!==e));i.remove.forEach((e=>{for(let t=0;t0;e--)t(r[e])&&t(r[e-1])&&r.splice(e,1);r.length&&t(r[0])&&r.splice(0,1),r.length&&t(r[r.length-1])&&r.splice(r.length-1,1),ae.ContextMenuManager.showMenu(r,e,{statName:"ChartContextMenu"},{menuName:"ChartContextMenu"})}_initActions(e){var t,i;const s=this._chart.actions(),r=[];if(r.push(s.chartReset),r.push(new Ne.Separator),!this.state().isEmpty()&&Ve.enabled("datasource_copypaste")){const t=(0,Re.createActionCopyPrice)(this.state(),e.localY),i=(0,Re.createPasteAction)(this._chart,this.state());(t||i)&&(t&&r.push(t),i&&r.push(i),r.push(new Ne.Separator))}r[r.length-1]instanceof Ne.Separator||r.push(new Ne.Separator);return Boolean(null===(t=window.widgetbar)||void 0===t?void 0:t.widget("watchlist"))&&s.addToWatchlist&&r.push(s.addToWatchlist),Ve.enabled("text_notes")&&r.push(s.addToTextNotes),r[r.length-1]instanceof Ne.Separator||r.push(new Ne.Separator),r.push(this._createLockTimeAxisAction(e)),r.push(new Ne.Separator),r.push((0,Re.createLinesAction)(this._chart)),!Ve.enabled("charting_library_base")&&s.applyColorTheme&&r.push(s.applyColorTheme),r[r.length-1]instanceof Ne.Separator||r.push(new Ne.Separator),this._chart.applyIndicatorsToAllChartsAvailable()&&(r.push(s.applyStudiesToAllCharts),r.push(new Ne.Separator)),r.push(s.paneRemoveAllDrawingTools),r.push(s.paneRemoveAllStudies),r.push(new Ne.Separator),(null===(i=window.pro)||void 0===i?void 0:i.hasPackage("mtp-mtpredictor"))&&this.state().containsMainSeries()&&r.push((0,Re.createMTPredictorActions)(this._chart,this.state(),this._contextMenuX,this._contextMenuY),new Ne.Separator),r.push(s.hideAllMarks),r.push(new Ne.Separator),Ve.enabled("show_chart_property_page")&&r.push(s.chartProperties), +r[r.length-1]instanceof Ne.Separator&&r.pop(),r}_loadAndCreateLegendWidget(){Promise.all([i.e(7257),i.e(5916),i.e(8180),i.e(5093)]).then(i.bind(i,19401)).then((e=>{if(this._isDestroyed)return;const t=e.LegendWidget,i=(0,W.deepExtend)({},this._options.legendWidget);i.canShowSourceCode=!this._chart.onWidget()&&!c.CheckMobile.any(),i.readOnlyMode=i.readOnlyMode||this._chart.readOnly(),i.statusesWidgets={sourceStatusesEnabled:this._options.sourceStatusesWidgetEnabled,sourceStatuses:this._options.sourceStatusesWidget||{},marketStatusEnabled:this._options.marketStatusWidgetEnabled,dataUpdateModeEnabled:this._options.chartWarningWidgetEnabled,dataUpdateMode:this._options.chartWarningWidget||{},dataProblemEnabled:this._options.dataProblemWidgetEnabled};const s=(0,y.combine)(((e,t)=>Ot&&this._chart!==e&&!t),this._chart.chartWidgetCollection().activeChartWidget,this._chart.chartWidgetCollection().lock.crosshair),n=(0,y.combine)(((e,t)=>null!==e?e===this._state:(0,G.toolIsMeasure)(t)),this._chartModel().crossHairSource().measurePane(),G.tool);this._legendWidget=new t(this._chartUndoModel(),this,this._chart.backgroundTopTheme().spawn(),s,this._visuallyCollapsed.spawn(),n,i,{showContextMenuForSelection:this.showContextMenuForSelection.bind(this),showContextMenuForSources:this.showContextMenuForSources.bind(this),updateActions:this._chart.updateActions.bind(this._chart),showChartPropertiesForSource:this._chart.showChartPropertiesForSource.bind(this._chart),showGeneralChartProperties:this._chart.showGeneralChartProperties.bind(this._chart),showObjectsTreeDialog:this._chart.showObjectsTreeDialog.bind(this._chart)}),this._div.appendChild(this._legendWidget.getElement()),this._legendWidget.updateLayout(),this._legendWidget.updateWidgetModeBySize(this._size),this._legendWidget.updateThemedColors(this._themedTopColor);for(const e of Array.from(this._customLegendWidgetsFactoryMap.keys()))this._legendWidget.addCustomWidgetToLegend(e,(0,r.ensureDefined)(this._customLegendWidgetsFactoryMap.get(e)))}))}_loadAndCreatePaneControlsWidget(){Promise.all([Promise.all([i.e(7257),i.e(5916),i.e(8180),i.e(5093)]).then(i.bind(i,28756)),Promise.all([i.e(7257),i.e(5916),i.e(8180),i.e(5093)]).then(i.bind(i,59255))]).then((([e,t])=>{var i;if(this._isDestroyed)return;const s=e.PaneControlsWidget;this._paneControls=new s(this._chartUndoModel(),this,{backgroundThemeName:this._chart.backgroundTopTheme()},{toggleMaximizePane:this._chart.toggleMaximizePane.bind(this._chart),toggleCollapsedPane:this._chart.toggleCollapsedPane.bind(this._chart)},this._div),this._paneControls.updateWidgetModeByWidth(this._size.width),this._paneControls.updateThemedColors(this._themedTopColor),this._paneControlsResizeObserver=new t.default(this._handleRestrictLegendWidth.bind(this)),this._paneControlsResizeObserver.observe(this._paneControls.getElement()),(null===(i=this._state)||void 0===i?void 0:i.collapsed().value())&&this._chartModel().fullUpdate()}))}_handleRestrictLegendWidth(e){if(null===this._legendWidget||null===this._paneControls)return +;const t=e[e.length-1].contentRect.width,i=0===t?0:t+wt+Pt;this._legendWidget.addMargin(i)}_onMagnetStateChanged(){this._chart.isActive()&&(this._isSelectPointModeEnabled()||this._isToolActionActiveOnPane(!0))&&this._chartModel().crossHairSource().visible&&this._updateLineToolUsingMagnetOrShift()}_onShiftKeyStateChanged(){this._chart.isActive()&&this._isToolActionActiveOnPane(!1)&&this._chartModel().crossHairSource().visible&&this._updateLineToolUsingMagnetOrShift(U.EnvironmentState.create((0,ft.shiftPressed)().value()))}_isToolActionActiveOnPane(e){const t=this._chartModel(),i=t.lineBeingCreated()||t.lineBeingEdited()||t.sourcesBeingMoved().length>0&&t.sourcesBeingMoved()[0];return i?t.paneForSource(i)===this._state:e&&(0,L.isLineToolName)(G.tool.value())&&t.crossHairSource().pane===this._state}_updateLineToolUsingMagnetOrShift(e){if(null===this._prevMoveEventPosition)return;const{x:t,y:i}=this._prevMoveEventPosition,s=this._chartModel().sourcesBeingMoved();s.length>0?(G.isStudyEditingNow.value()&&this._setCursorPosition(t,i,e),this._alignSourcesThatBeingMoved(s,t,i,e)):this._setCursorPosition(t,i,e)}_showEditDialogForSource(e,t){if(this._options.propertyPagesEnabled&&e.userEditEnabled())if(e===this._chartUndoModel().mainSeries())this._chart.showGeneralChartProperties(ut.TabNames.symbol);else if((0,L.isLineTool)(e)||(0,k.isStudy)(e)){let i;const s=null==t?void 0:t.data();if(null!=s){const e=s.areaName;void 0!==e&&(i=Nt.get(e))}this._chart.showChartPropertiesForSource(e,i).then((e=>{this._editDialog=e}))}}_initToolCreationModeParams(e){this._startTouchPoint=new V.Point(e.pageX,e.pageY),this._initCrossHairPosition=this._chartModel().crossHairSource().currentPoint()}_updateCrosshairPositionInToolCreationMode(e,t){if(t!==this._state){const i=this._chart.paneByState(t);return i._startTouchPoint=this._startTouchPoint,i._initCrossHairPosition=this._initCrossHairPosition,void i._updateCrosshairPositionInToolCreationMode(e,t)}const i=this._chartModel().crossHairSource();this._chart.justActivated()&&(this._initCrossHairPosition=i.currentPoint());const s=e.pageX,n=e.pageY,o=(0,r.ensureNotNull)(this._initCrossHairPosition),a=new V.Point(s,n).subtract((0,r.ensureNotNull)(this._startTouchPoint)),l=o.add(a);this._setCursorPosition(l.x,l.y,new U.EnvironmentState(e))}_priceAxisesContainer(e){return"left"===e?this._lhsPriceAxisesContainer:this._rhsPriceAxisesContainer}_recalculatePriceScales(e){const t=this.state();for(const i of t.leftPriceScales())t.recalculatePriceScale(i,e);for(const i of t.rightPriceScales())t.recalculatePriceScale(i,e);for(const i of t.sourcesByGroup().overlayPriceScaleSources())(0,L.isLineTool)(i)||t.recalculatePriceScale(i.priceScale(),e)}_createLockTimeAxisAction(e){const t=(0,G.lockTimeAxis)().value();return new Ne.Action({actionId:"Chart.Crosshair.LockVerticalCursor",label:It,statName:"LockCursorInTime",checkable:!0,checked:t,onExecute:()=>this._toggleLockTimeAxis(e.localX,!t)})}_toggleLockTimeAxis(e,t){if(t){const t=this._chartUndoModel().timeScale(),i=t.coordinateToIndex(e),s=t.points().roughTime(i) +;null!==s&&G.lockTimeAxisTime.setValue(s)}(0,G.lockTimeAxis)().setValue(t)}_preventTouchEventsExceptPinch(){return this._paneWidgetsSharedState.hasTouchesOnOtherPanes(this)||null!==this._paneWidgetsSharedState.pinchingPane()}_updateHoveredSource(e,t,i){var s,r;const n=this._chartUndoModel(),o=n.model();let a=!1;const l=e&&e.source,c=this._chart.readOnly();if(o.crossHairSource().isReplaySelection())this._setCursorClassName("none");else if(!(!c||e&&(0,L.isLineTool)(e.source))||this._editDialog&&this._editDialog.visible().value())c&&(o.setHoveredSource(null,null),this.setCursorForTool());else{const h=G.tool.value();let d=null;if(!this._processing&&((0,G.toolIsCursor)(h)||"eraser"===h&&!c||t.mod()||!n.lineBeingCreated())){const t=null==e?void 0:e.hittest;a=Boolean(null===(s=null==t?void 0:t.data())||void 0===s?void 0:s.hideCrosshairLinesOnHover),t&&t.result()>H.HitTestResult.MOVEPOINT_BACKGROUND?(d=l,!(null==l?void 0:l.isHoveredEnabled())||"eraser"===h&&l===n.mainSeries()?o.setHoveredSource(null,null):o.setHoveredSource(l,t.data())):o.setHoveredSource(null,null)}c?this.setCursorForTool(d,t,pt.PaneCursorType.Default):this._options.sourceSelectionEnabled&&(this._isSelectPointModeEnabled()?this._setCursorClassName("pointer"):this.setCursorForTool(d,t,null===(r=null==e?void 0:e.hittest.data())||void 0===r?void 0:r.cursorType));const u=o.customSourceBeingMoved(),p=null!==u?[u]:o.sourcesBeingMoved();if((!p.length||null!==e&&-1===p.indexOf(e.source))&&this._updateCommonTooltip(e),!c&&null!==e&&i&&e.hittest.hasPressedMoveHandler(i)){switch((e.hittest.data()||{}).cursorType){case pt.PaneCursorType.VerticalResize:this._setCursorClassName("ns-resize");break;case pt.PaneCursorType.HorizontalResize:this._setCursorClassName("we-resize");break;case pt.PaneCursorType.DiagonalNeSwResize:this._setCursorClassName("nesw-resize");break;case pt.PaneCursorType.DiagonalNwSeResize:this._setCursorClassName("nwse-resize")}}}this._preventCrossHairMove()&&this._clearCursorPosition(),1!==this._pressedMoveStage&&o.crossHairSource().setLinesShouldBeHidden(a)}async _createErrorBlock(){const e=new(await mt());return this._div.insertBefore(e.container,this._topCanvasBinding.canvasElement.nextSibling),e}_customActions(){const e={top:[],bottom:[],remove:[]},t=this._chartUndoModel().timeScale(),i=this._state&&this._state.defaultPriceScale();if(!Ve.enabled("custom_items_in_context_menu"))return e;const s=t.isEmpty()?void 0:t.indexToUserTime(t.coordinateToIndex(this._contextMenuX));let n;if(i&&!i.isEmpty()){const e=(0,r.ensureNotNull)(this.state().mainDataSource()).firstValue();n=i.coordinateToPrice(this._contextMenuY,(0,r.ensureNotNull)(e))}return(0,d.emit)("onContextMenu",{unixtime:null!=s?s.getTime()/1e3:void 0,price:n,callback:t=>{[...t].forEach((t=>{if(t.text)if(t.text.length>1&&"-"===t.text[0])e.remove.push(t.text.slice(1));else{let i;i="-"===t.text?new Ne.Separator:new Ne.Action({actionId:"Chart.ExternalActionId",label:t.text,onExecute:t.click}),t.position&&"top"===t.position?e.top.push(i):e.bottom.push(i)}}))}}),e}_highlightPriceAxisByLabel(e){ +this._lhsPriceAxisesContainer.highlightPriceAxisByLabel(e),this._rhsPriceAxisesContainer.highlightPriceAxisByLabel(e)}_subscribeToState(){const e=this.state();e.onDestroyed().subscribe(this,this._onStateDestroyed,!0),e.dataSourcesCollectionChanged().subscribe(this,this._onDataSourcesCollectionChanged),e.maximized().subscribe(this._updateVisuallyCollapsed),e.collapsed().subscribe(this._updateVisuallyCollapsed)}_unsubscribeFromState(){const e=this.state();e.onDestroyed().unsubscribeAll(this),e.dataSourcesCollectionChanged().unsubscribeAll(this),e.maximized().unsubscribe(this._updateVisuallyCollapsed),e.collapsed().unsubscribe(this._updateVisuallyCollapsed)}async _updateEndOfSeriesBanner(){}}var zt=i(51782);class Ut{constructor(e,t,i){this._handleEl=null,this._resizeInfo=null,this._colorCache={lineColor:"",backgroundColor:"",color:""},this._chart=e,this._topPaneIndex=t,this._bottomPaneIndex=i,this._row=document.createElement("tr"),this._cell=document.createElement("td"),this._row.appendChild(this._cell),this._cell.classList.add(zt.paneSeparator),this._cell.setAttribute("colspan","3"),this._cell.style.background=this._color(),this.adjustSize(),this._cell.addEventListener("click",(()=>{}));const s=document.createElement("div");s.classList.add(zt.handle),this._cell.appendChild(s),this._mouseEventHandler=new $.MouseEventHandler(s,this,{treatVertTouchDragAsPageScroll:!1,treatHorzTouchDragAsPageScroll:!0}),this._handleEl=s}destroy(){this._mouseEventHandler.destroy(),this._row.parentElement&&this._row.parentElement.removeChild(this._row)}getElement(){return this._row}hide(){this._row.classList.add("js-hidden")}show(){this._row.classList.remove("js-hidden")}adjustSize(){this._row.style.height=Ut.height()+"px"}mouseEnterEvent(e){const{topPane:t,bottomPane:i}=this._topBottomPane(!0);null!==t&&null!==i&&(0,r.ensureNotNull)(this._handleEl).classList.add(zt.hovered)}mouseLeaveEvent(e){(0,r.ensureNotNull)(this._handleEl).classList.remove(zt.hovered)}mouseDownEvent(e){this._mouseDownOrTouchStartEvent(e)}touchStartEvent(e){this._mouseDownOrTouchStartEvent(e)}pressedMouseMoveEvent(e){this._pressedMouseOrTouchMoveEvent(e)}touchMoveEvent(e){this._pressedMouseOrTouchMoveEvent(e)}mouseUpEvent(e){this._mouseUpOrTouchEndEvent(e)}touchEndEvent(e){this._mouseUpOrTouchEndEvent(e)}update(){this._cell.style.background=this._color().toString()}paint(){}image(){const{topPane:e}=this._topBottomPane(!1),t=e.leftPriceAxisesContainer().getWidth(),i=e.width(),r=e.rightPriceAxisesContainer().getWidth(),n=this._color(),o=(0,Y.createDisconnectedCanvas)(document,(0,s.size)({width:t,height:1})),a=(0,Y.getPrescaledContext2D)(o);a.fillStyle=n,a.fillRect(0,0,t,1);const l=(0,Y.createDisconnectedCanvas)(document,(0,s.size)({width:i,height:1})),c=(0,Y.getPrescaledContext2D)(l);c.fillStyle=n,c.fillRect(0,0,i,1);const h=(0,Y.createDisconnectedCanvas)(document,(0,s.size)({width:r,height:1})),d=(0,Y.getPrescaledContext2D)(h);return d.fillStyle=n,d.fillRect(0,0,r,1),{type:"separator",leftAxis:{content:o.toDataURL(),canvas:o,contentWidth:t,contentHeight:1},rightAxis:{ +content:h.toDataURL(),canvas:h,contentWidth:r,contentHeight:1},content:l.toDataURL(),canvas:l,contentWidth:i,contentHeight:1}}static height(){const e=window.devicePixelRatio||1;return e>=1?1:1/e}_mouseDownOrTouchStartEvent(e){const{topPane:t,bottomPane:i}=this._topBottomPane(!0);if(null===t||null===i)return;const s=t.state().stretchFactor()+i.state().stretchFactor(),n=s/(t.height()+i.height()),o=30*n;s<=2*o||(this._resizeInfo={startY:e.pageY,prevStretchTopPane:t.state().stretchFactor(),maxPaneStretch:s-o,totalStretch:s,pixelStretchFactor:n,minPaneStretch:o},(0,r.ensureNotNull)(this._handleEl).classList.add(zt.active))}_pressedMouseOrTouchMoveEvent(e){const{topPane:t,bottomPane:i}=this._topBottomPane(!0),s=this._resizeInfo;if(null===s||null===t||null===i)return;const r=(e.pageY-s.startY)*s.pixelStretchFactor,n=(0,Se.clamp)(s.prevStretchTopPane+r,s.minPaneStretch,s.maxPaneStretch);t.state().setStretchFactor(n),i.state().setStretchFactor(s.totalStretch-n),this._chart.model().model().fullUpdate()}_mouseUpOrTouchEndEvent(e){const{topPane:t,bottomPane:i}=this._topBottomPane(!0),s=this._resizeInfo;null!==s&&null!==t&&null!==i&&(this._chart.model().addPaneStretchFactorUndoCommand(t.state(),i.state(),s.prevStretchTopPane,t.state().stretchFactor()),this._resizeInfo=null,(0,r.ensureNotNull)(this._handleEl).classList.remove(zt.active))}_color(){const e=this._chart.properties().childs().paneProperties.childs().separatorColor.value(),t=this._chart.model().model().backgroundColor().value();if(this._colorCache.lineColor!==e||this._colorCache.backgroundColor!==t){const i=(0,me.parseRgba)(t),s=(0,me.parseRgba)(e),r=0===i[3]&&0===s[3]?"rgba(0,0,0,0)":(0,me.rgbaToString)((0,me.blendRgba)(i,s));this._colorCache={lineColor:e,backgroundColor:t,color:r}}return this._colorCache.color}_topBottomPane(e){const t=this._chart.paneWidgets();let i=null,s=null;for(let s=this._topPaneIndex;s>=0;--s){const r=t[s];if(!e||!r.state().collapsed().value()){i=r;break}}for(let i=this._bottomPaneIndex;ithis.backgroundColor(),a=()=>{throw new Error("Time axis does not support real price scales")},l={titlesProvider:i,stubContextMenuProvider:(e,t)=>{const i=this.getContextMenuActions(!0);let s=r(e,t);if(s[s.length-1]===this.chart.actions().scalesProperties){const e=[new Ne.Separator].concat(i);Array.prototype.splice.apply(s,[s.length-2,0,...e])}else s.push(new Ne.Separator),s=s.concat(i);return s +},backgroundBasedTheme:n,rendererOptionsProvider:e.model().model().rendererOptionsProvider(),getBackgroundTopColor:o,getBackgroundBottomColor:o,showHorizontalBorder:!0};this._lhsStubContainer=new ue(this._properties,"left",a,l,this._options.priceAxisLabelsOptions,this),this._lhsStubContainer.onLabelHovered().subscribe(this,((e,t)=>{this._onLabelHovered.fire(e,t)})),this._rhsStubContainer=new ue(this._properties,"right",a,l,this._options.priceAxisLabelsOptions,this),this._rhsStubContainer.onLabelHovered().subscribe(this,((e,t)=>{this._onLabelHovered.fire(e,t)})),this._element.appendChild(this._lhsStubContainer.getElement()),this._cell=document.createElement("td"),this._element.appendChild(this._cell),this._cell.classList.add("chart-markup-table","time-axis"),this._cell.style.height="25px",this._dv=document.createElement("div"),this._dv.style.width="100%",this._dv.style.height="100%",this._dv.style.position="relative",this._dv.style.overflow="hidden",this._cell.appendChild(this._dv),this._canvasConfiguredHandler=()=>this.chart.model().model().lightUpdate(),this._canvasBinding=(0,Y.createBoundCanvas)(this._dv,(0,s.size)({width:16,height:16})),this._canvasBinding.subscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler);const c=this._canvasBinding.canvasElement;c.style.position="absolute",c.style.zIndex="1",c.style.left="0",c.style.top="0",this._topCanvasBinding=(0,Y.createBoundCanvas)(this._dv,(0,s.size)({width:16,height:16})),this._topCanvasBinding.subscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler);const h=this._topCanvasBinding.canvasElement;h.style.position="absolute",h.style.zIndex="2",h.style.left="0",h.style.top="0",this._element.appendChild(this._rhsStubContainer.getElement()),this.restoreDefaultCursor(),this.update(),this._minVisibleSpan=jt.MINUTE_SPAN,this._mouseEventHandler=new $.MouseEventHandler(this._topCanvasBinding.canvasElement,this,{treatVertTouchDragAsPageScroll:!0,treatHorzTouchDragAsPageScroll:!1}),this.size=(0,s.size)({width:0,height:0}),(0,G.hideMarksOnBars)().subscribe(this,(()=>this.chart.model().model().lightUpdate()))}destroy(){this._mouseEventHandler.destroy(),this._topCanvasBinding.unsubscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler),this._topCanvasBinding.dispose(),this._canvasBinding.unsubscribeSuggestedBitmapSizeChanged(this._canvasConfiguredHandler),this._canvasBinding.dispose(),this._rhsStubContainer.onLabelHovered().unsubscribeAll(this),this._lhsStubContainer.onLabelHovered().unsubscribeAll(this),this._lhsStubContainer.destroy(),this._rhsStubContainer.destroy(),this.chart.properties().childs().paneProperties.childs().background.unsubscribeAll(this),(0,G.hideMarksOnBars)().unsubscribeAll(this)}setCursor(e){let t="";"grabbing"!==e&&"ew-resize"!==e||(t="time-axis--cursor-"+e),this._currentCursorClassName!==t&&(this._currentCursorClassName&&this._cell.classList.remove(this._currentCursorClassName),t&&this._cell.classList.add(t),this._currentCursorClassName=t,this._cell.style.cursor)}restoreDefaultCursor(){this.setCursor("")}getElement(){ +return this._element}optimalHeight(){const e=this.rendererOptions();return Math.ceil(e.borderSize+e.offsetSize+e.fontSize+e.paddingTop+e.paddingBottom+e.labelBottomOffset)}setSizes(e,t,i){this.size&&(0,s.equalSizes)(this.size,e)||(this.size=e,this._canvasBinding.resizeCanvasElement(e),this._topCanvasBinding.resizeCanvasElement(e),this._cell.style.width=e.width+"px",this._cell.style.height=e.height+"px"),this._lhsStubContainer.setSizes(e.height,t),this._rhsStubContainer.setSizes(e.height,i)}rendererOptions(){if(!this._rendererOptions||this._rendererOptions.fontSize!==this.fontSize()){const e=this.fontSize();this._rendererOptions={borderSize:1,offsetSize:5,fontSize:e,font:(0,X.makeFont)(e,ee.CHART_FONT_FAMILY,""),widthCache:new pe.TextWidthCache,paddingTop:3*e/12,paddingBottom:3*e/12,paddingHorizontal:9*e/12,labelBottomOffset:4*e/12}}return this._rendererOptions}backgroundColor(){return this.chart.model().model().backgroundColor().value()}lineColor(){const e=this._properties.childs().lineColor.value();if(0===(0,me.parseRgba)(e)[3]){const e=this.chart.model().model().lastPane();if(e&&(e.collapsed().value()||e.isMainPane()&&this._areEventsEnabled()))return this.chart.properties().childs().paneProperties.childs().separatorColor.value()}return e}textColor(){return this._properties.childs().textColor.value()}fontSize(){return this._properties.childs().fontSize.value()}baseFont(){return(0,X.makeFont)(this.fontSize(),ee.CHART_FONT_FAMILY)}baseBoldFont(){return(0,X.makeFont)(this.fontSize(),ee.CHART_FONT_FAMILY,"","bold")}hasCanvas(e){return this._canvasBinding.canvasElement===e||this._topCanvasBinding.canvasElement===e}onLabelHovered(){return this._onLabelHovered}getScreenshotData(){return{content:this._canvasBinding.canvasElement.toDataURL(),canvas:this._canvasBinding.canvasElement,contentWidth:this.size.width,contentHeight:this.size.height,lhsStub:this._lhsStubContainer.getScreenshotData(),rhsStub:this._rhsStubContainer.getScreenshotData()}}getContextMenuActions(e){var t;const i=this.chart;i.updateActions();const s=i.actions(),r=[];if(e||r.push(s.timeScaleReset,new Ne.Separator),this._options.timezoneMenuEnabled&&r.push(s.applyTimeZone),r.push(s.sessionBreaks),!i.model().mainSeries().isDWM()){const e=null===(t=i.model())||void 0===t?void 0:t.mainSeries().symbolInfo();if(e){const t=i.model().mainSeries().properties().childs().sessionId,s=(e.subsessions||[]).filter((e=>!e.private));if(s.length>1){const e=s.map((e=>{const s={label:(0,Gt.translateSessionDescription)(e.description),checkable:!0,checked:t.value()===e.id,statName:"SetSession",onExecute:()=>{i.model().setProperty(t,e.id,$t)}};return new Ne.Action({...s,actionId:"Chart.SetSession"})})),n={label:Yt,statName:"SetSession",subItems:e},o=new Ne.Action({...n,actionId:"Chart.SetSession"});r.push(o)}}}return r}update(){if(!this.chart.hasModel())return;const e=this.chart.model().timeScale().marks();if(e){this._minVisibleSpan=jt.YEAR_SPAN;for(const t of e)this._minVisibleSpan=Math.min(t.span,this._minVisibleSpan)}}updatePriceAxisStubs(){ +const e=this.chart.model().model(),t=this.chart.isMaximizedPane()?(0,r.ensureNotNull)(this.chart.maximizedPaneWidget()).state():e.paneForSource(e.mainSeries());if(!t)return;const i=e.priceScaleSlotsCount();this._lhsStubContainer.setScales([],i.left,t.leftPriceScales().length,i.left+i.right),this._rhsStubContainer.setScales([],i.right,t.rightPriceScales().length,i.left+i.right)}paint(e){if(e===D.InvalidationLevel.None||0===this.size.width||0===this.size.height)return;this._canvasBinding.applySuggestedBitmapSize(),this._topCanvasBinding.applySuggestedBitmapSize();const t=(0,Y.getContext2D)(this._topCanvasBinding.canvasElement);if(e>D.InvalidationLevel.Cursor){const i=(0,Y.getContext2D)(this._canvasBinding.canvasElement),s=(0,Y.getBindingPixelRatio)(this._canvasBinding);this.drawBackground(i,s),this.chart.hasModel()&&(this.drawBorder(i,s),this.drawTickMarks(i,s),this.drawBackLabels(i,s),this.drawCrossHairLabel(t,s)),this._lhsStubContainer.paintStubs(e),this._rhsStubContainer.paintStubs(e)}this.drawCrossHairLabel(t,(0,Y.getBindingPixelRatio)(this._topCanvasBinding))}drawBackground(e,t){if((0,Y.clearRect)(e,0,0,Math.ceil(this.size.width*t)+1,Math.ceil(this.size.height*t)+1,this.backgroundColor()),!this.chart.hasModel())return;const i=this.chart.model();if(!i.timeScale().isEmpty()){const s=i.model().selection().lineDataSources().reduce(((e,t)=>{const i=t.timeAxisPoints();return 0===i.length?e:e.concat(i)}),[]);s.length>0&&this._hightlightBackground(e,s,t)}const s=i.model().crossHairSource();s.startMeasurePoint()&&this._hightlightBackground(e,s.measurePoints(),t)}drawBorder(e,t){e.save(),e.fillStyle=this.lineColor();const i=Math.max(1,Math.floor(this.rendererOptions().borderSize*t)),s=Math.ceil(this.size.width*t);e.fillRect(0,0,s+1,i),e.restore()}drawTickMarks(e,t){const i=this.chart.model().timeScale().marks();if(!i||0===i.length)return;let s=i.reduce(((e,t)=>e.span>t.span?e:t),i[0]).span;s>30&&s<40&&(s=30),e.save(),e.strokeStyle=this.lineColor();const r=this.rendererOptions(),n=r.borderSize+r.offsetSize+r.paddingTop+r.fontSize/2;e.textAlign="center",e.textBaseline="middle",e.fillStyle=this.textColor(),(0,Y.drawScaled)(e,t,(()=>{e.font=this.baseFont();for(let t=0;t=s&&e.fillText(r.label,r.coord,n)}})),e.restore()}drawBackLabels(e,t){var i;e.save();const s=new Set,r=this.chart.model().model();let n=r.dataSources();const o=r.selection().allSources();for(const e of o)s.add(e);r.hoveredSource()&&s.add(r.hoveredSource());for(const e of r.sourcesBeingMoved())s.add(e);const a=r.customSourceBeingMoved();null!==a&&s.add(a);const l=null!==(i=r.lineBeingEdited())&&void 0!==i?i:r.lineBeingCreated();l&&s.add(l),s.add(this.chart.model().crossHairSource()),n=n.concat(r.customSources());const c=this.rendererOptions();for(let i=0;i=s&&(s=a,n=o),a<=i&&(i=a,r=o)}}return n&&t.push(n),r&&t.push(r),t}_zoomAvailable(){return!this.chart.model().timeScale().isEmpty()&&this.chart.model().model().zoomEnabled()&&this._options.pressedMouseMoveScale}_mouseDownOrTouchStartEvent(e){if(this._mousedown||!this._zoomAvailable())return;this._mousedown=!0;const t=this.chart.model();t.timeScale().isEmpty()||t.startScaleTime(e.localX)}_pressedMouseOrTouchMoveEvent(e){ +this._zoomAvailable()&&this.chart.model().scaleTimeTo(e.localX)}_mouseUpOrTouchEndEvent(e){this._zoomAvailable()&&(this._mousedown=!1,this.chart.model().endScaleTime(),this.restoreDefaultCursor())}_contextMenuOrTouchContextMenuEvent(e){this._options.contextMenuEnabled&&ae.ContextMenuManager.showMenu(this.getContextMenuActions(),e,{statName:"TimeScaleContextMenu"},{menuName:"TimeScaleContextMenu"})}_mouseOrTouchEnterEvent(e){this._zoomAvailable()&&this.setCursor("ew-resize")}_mouseOrTouchLeaveEvent(e){this.restoreDefaultCursor()}_mouseDoubleClickOrDoubleTapEvent(e){(0,_e.trackEvent)("GUI","Double click time scale"),this.chart.model().resetTimeScale()}_areEventsEnabled(){return!(0,G.hideMarksOnBars)().value()}}function Xt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Zt(e){return e.reduce(((e,t)=>{for(const i in t)if(Xt(t,i)){const s=t[i],r=e[i];r?r.push(s):e[i]=[s]}return e}),{})}const Jt=new O.TranslatedString("move left",n.t(null,void 0,i(15086))),Qt=new O.TranslatedString("move right",n.t(null,void 0,i(61711))),ei={moving:"wait_finishing",wait_finishing:"stop",stop:"moving"};class ti{constructor(e){this._chartModel=null,this._currentDistance=0,this._deferredFinishTimeout=0,this._finishingTimeout=0,this._moveType="",this._startTime=0,this._state="stop",this._movingTimeout=0,this._chart=e,this._chart.withModel(this,(()=>{this._chartModel=this._chart.model()}))}destroy(){clearTimeout(this._movingTimeout)}move(e){if(null!==this._chartModel&&"stop"===this._state&&this._chartModel.beginUndoMacro(1===e?Jt:Qt),this._state=ei.stop,this._moveType="animated",this._deferredFinishTimeout&&(clearTimeout(this._deferredFinishTimeout),this._deferredFinishTimeout=0),this._finishingTimeout&&(clearTimeout(this._finishingTimeout),this._finishingTimeout=0),this._startTime=Date.now(),0===this._movingTimeout){const t=this._startTime,i=10,s=()=>{this.moveStep(t,0,50*e,1e3),this._movingTimeout=setTimeout(s,i)};this._movingTimeout=setTimeout(s,i)}}moveStep(e,t,i,s){if(null!==this._chartModel&&!this._chartModel.timeScale().isEmpty()){const r=Date.now();r1||!isFinite(n))&&(n=1);const o=1-Math.pow(1-n,3);return this._currentDistance=(i-t)*o+t,this._chartModel.scrollChart(this._currentDistance),n}}moveByBar(e){if(null!==this._chartModel){const t=this._chartModel.timeScale();if(t.isEmpty())return;if("stop"===this._state&&this._chartModel.beginUndoMacro(1===e?Jt:Qt),null!==t.visibleBarsStrictRange()){const e=t.indexToCoordinate(t.visibleBarsStrictRange().lastBar())+t.barSpacing()/2;Math.abs(t.width()-e)>t.barSpacing()/6&&this._chartModel.scrollChart(t.width()-e)}if(this._state=ei.stop,this._moveType="by_bar",this._startTime=Date.now(),!this._movingTimeout){let t=0,i=150;const s=400,r=()=>{this._moveByBarStep(e),t++,i>100&&(i-=t/5*20),this._movingTimeout=setTimeout(r,i)};this._movingTimeout=setTimeout(r,s),this._moveByBarStep(e)}}}stopMove(){"by_bar"===this._moveType?this.stopMoveByBar():this._stopMove()}stopMoveByBar(){"moving"===this._state&&(clearTimeout(this._movingTimeout),this._movingTimeout=0, +this._state=ei.wait_finishing,this._moveType="",this._movingTimeout=0,this._currentDistance=0,null!==this._chartModel&&this._chartModel.endUndoMacro())}scrollToRealtime(e){null!==this._chartModel&&this._chartModel.timeScale().scrollToRealtime(e)}_finishMove(){clearTimeout(this._movingTimeout),this._movingTimeout=0,this._deferredFinishTimeout=0;const e=this._currentDistance,t=Date.now(),i=()=>{const s=this.moveStep(t,e,0,700);s&&s<1?this._finishingTimeout=setTimeout(i,10):null!==this._chartModel&&(this._state=ei.wait_finishing,this._moveType="",this._movingTimeout=0,this._currentDistance=0,this._chartModel.endUndoMacro())};this._finishingTimeout=setTimeout(i,10)}_stopMove(){"moving"===this._state&&(this._state=ei.moving,Date.now()-this._startTime<200?this._deferredFinishTimeout=setTimeout(this._finishMove.bind(this),200-(Date.now()-this._startTime)):this._finishMove())}_moveByBarStep(e){if(null!==this._chartModel){if(this._chartModel.timeScale().isEmpty())return;this._chartModel.scrollChartByBar(e)}}}var ii=i(68671);const si=(0,o.getLogger)("ChartApi.AbstractSession");class ri extends class{constructor(e,t,i){this._isConnected=new(ot())(!1),this._state=0,this._isConnectForbidden=!1,this._sessionId="",this._sessionIdChanged=new(oe()),this._chartApi=e,this._sessionPrefix=t,this._shouldReconnectAfterCriticalError=i}destroy(){this._logNormal("Destroying session"),this._isConnected.unsubscribe(),this.disconnect(),this._sessionIdChanged.destroy(),delete this._chartApi,this._logNormal("Session has been destroyed")}isConnected(){return this._isConnected}sessionId(){return this._sessionId}onSessionIdChanged(){return this._sessionIdChanged}connect(){0===this._state&&((0,r.assert)(!this._isConnectForbidden,"Cannot call connect because it is forbidden at this moment"),this._setSessionId(`${this._sessionPrefix}_${(0,ii.randomHash)()}`),this._logNormal("Connecting session - wait until transport stay connected"),this._state=1,this._chartApi.createSession(this._sessionId,this))}disconnect(){0!==this._state&&((0,r.assert)(""!==this._sessionId,"sessionId must not be invalid"),this._logNormal("Disconnecting session..."),this._forbidConnectWhile((()=>{this._chartApi.connected()&&this._sendRemoveSession(),this._processDestroyingOnServer()})))}onMessage(e){switch(e.method){case"connected":return void this._onChartApiConnected();case"disconnected":return void this._onChartApiDisconnected();case"critical_error":const t=String(e.params[0]),i=String(e.params[1]);return void this._onCriticalError(t,i)}this._onMessage(e)}_getChartApi(){return this._chartApi}_generateLogMessage(e){return`[${this._sessionId}] ${e}`}_onCriticalError(e,t){this._logError(`Critical error. Reason=${e}, info=${t}.`),this._forbidConnectWhile((()=>{this._processDestroyingOnServer()})),this._shouldReconnectAfterCriticalError?(this._logNormal("Reconnecting after critical error..."),this.connect()):this._logNormal("Reconnecting after critical error skipped")}_onChartApiConnected(){(0,r.assert)(1===this._state,"Session is not registered"), +this._logNormal("Transport is connected. Creating session on the server"),this._sendCreateSession(),this._state=2,this._isConnected.setValue(!0)}_onChartApiDisconnected(){this._logNormal("Transport is disconnected. Reconnecting..."),this._forbidConnectWhile((()=>{this._processDestroyingOnServer()})),this.connect()}_setSessionId(e){const t=this._sessionId;this._logNormal(`Changing sessionId: old=${t}, new=${e}`),this._sessionId=e,this._sessionIdChanged.fire(e,t)}_logNormal(e){si.logNormal(this._generateLogMessage(e))}_logError(e){si.logError(this._generateLogMessage(e))}_processDestroyingOnServer(){this._state=0,this._isConnected.setValue(!1),this._chartApi.removeSession(this._sessionId),this._setSessionId("")}_forbidConnectWhile(e){this._isConnectForbidden=!0,e(),this._isConnectForbidden=!1}}{constructor(e,t=!1){super(e,"cs",!1),this._sessionDisabled=!1,this._handler=null,this._criticalError=new(oe()),this._symbolResolveMap=new Map,this._disableStatistics=t}destroy(){this._criticalError.destroy(),this._handler=null,this._symbolResolveMap.clear(),super.destroy()}serverTimeOffset(){return this._getChartApi().serverTimeOffset()}switchTimezone(e){return this._getChartApi().switchTimezone(this.sessionId(),e)}defaultResolutions(){return this._getChartApi().defaultResolutions()}availableCurrencies(){return this._getChartApi().availableCurrencies()}availableUnits(){return this._getChartApi().availableUnits()}availablePriceSources(){return this._getChartApi().availablePriceSources()}resolveSymbol(e,t,i){if(this._symbolResolveMap.has(t)){const[e,s]=this._symbolResolveMap.get(t);return Array.isArray(s)?s.push(i):s.then(i),e}{const s=[i];return this._getChartApi().resolveSymbol(this.sessionId(),e,t,(i=>{"symbol_error"===i.method?this._symbolResolveMap.delete(t):this._symbolResolveMap.set(t,[e,Promise.resolve(i)]),s.forEach((e=>e(i)))})),this._symbolResolveMap.set(t,[e,s]),e}}requestFirstBarTime(e,t,i){return this._getChartApi().requestFirstBarTime(this.sessionId(),e,t,i)}createSeries(e,t,i,s,r,n,o){return this._getChartApi().createSeries(this.sessionId(),e,t,i,s,r,n,o)}modifySeries(e,t,i,s,r,n){return this._getChartApi().modifySeries(this.sessionId(),e,t,i,s,r,n)}removeSeries(e){return!!this.isConnected().value()&&this._getChartApi().removeSeries(this.sessionId(),e)}requestMoreData(e,t,i){return"number"==typeof e?this._getChartApi().requestMoreData(this.sessionId(),e):this._getChartApi().requestMoreData(this.sessionId(),e,t,i)}requestMoreTickmarks(e,t,i){return(0,S.isNumber)(e)?this._getChartApi().requestMoreTickmarks(this.sessionId(),e):this._getChartApi().requestMoreTickmarks(this.sessionId(),e,t,i)}requestMetadata(e,t){this._getChartApi().requestMetadata(this.sessionId(),e,t)}canCreateStudy(e){return this._getChartApi().canCreateStudy(e)}createStudy(e,t,i,s,r,n,o){return this._getChartApi().createStudy(this.sessionId(),e,t,i,s,r,n,o)}rebindStudy(e,t,i,s,r,n,o){return this._getChartApi().rebindStudy(this.sessionId(),e,t,i,s,r,n,o)}modifyStudy(e,t,i,s,r){return this._getChartApi().modifyStudy(this.sessionId(),e,t,i,s,r)} +removeStudy(e,t){return this._getChartApi().removeStudy(this.sessionId(),e,t)}createPointset(e,t,i,s,r,n){return this._getChartApi().createPointset(this.sessionId(),e,t,i,s,r,n)}modifyPointset(e,t,i,s){return this._getChartApi().modifyPointset(this.sessionId(),e,t,i,s)}removePointset(e){return this._getChartApi().removePointset(this.sessionId(),e)}setVisibleTimeRange(e,t,i,s,r,n){this._getChartApi().setVisibleTimeRange(this.sessionId(),e,t,i,s,!0,r,n)}criticalError(){return this._criticalError}connect(e=null){null!==e&&(this._handler=e),this._symbolResolveMap.clear(),super.connect()}setHandler(e){this._handler=e}connected(){return this.isConnected().value()&&!this._sessionDisabled}disable(){this._sessionDisabled=!0}chartApi(){return this._getChartApi()}_sendCreateSession(){Object.keys(this).forEach((e=>{/^(s|st|symbol_)\d+$/.test(e)&&delete this[e]})),this._getChartApi().chartCreateSession(this.sessionId(),this._disableStatistics)}_sendRemoveSession(){this._getChartApi().chartDeleteSession(this.sessionId())}_onMessage(e){this._handler&&this._handler(e)}_onCriticalError(e,t){this._criticalError.fire(e,t),super._onCriticalError(e,t)}}var ni=i(1930),oi=i(92133);class ai{constructor(){this._draggingSource=null,this._activeTouchPanes=new Set,this._scrollingPane=null,this._pinchingPane=null}onPaneDestroyed(e){this._activeTouchPanes.delete(e),this._scrollingPane===e&&(this._scrollingPane=null),this._pinchingPane===e&&(this._pinchingPane=null)}startTouch(e){this._activeTouchPanes.add(e)}endTouch(e){this._activeTouchPanes.delete(e)}hasTouchesOnOtherPanes(e){return this._activeTouchPanes.size>1||1===this._activeTouchPanes.size&&!this._activeTouchPanes.has(e)}trySetDraggingSource(e,t){return!this.hasTouchesOnOtherPanes(t)&&((0,r.assert)(null===this._draggingSource||this._draggingSource===e),this._draggingSource=e,!0)}clearDraggingSource(){null!==this._draggingSource&&(this._draggingSource=null)}draggingSource(){return this._draggingSource}setScrollingPane(e){(0,r.assert)(null===e||null===this._scrollingPane||this._scrollingPane===e),this._scrollingPane=e}scrollingPane(){return this._scrollingPane}setPinchingPane(e){(0,r.assert)(null===e||null===this._pinchingPane||this._pinchingPane===e),this._pinchingPane=e}pinchingPane(){return this._pinchingPane}}let li=null;i(27678);function ci(e,t,s,r,n){return Promise.all([i.e(6848),i.e(4150),i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(6092),i.e(8619),i.e(346),i.e(8825),i.e(8271),i.e(5761),i.e(8009),i.e(8707),i.e(7177),i.e(3261),i.e(3562),i.e(8049),i.e(3578),i.e(4884),i.e(3795),i.e(140),i.e(8955),i.e(8251),i.e(9415),i.e(5020),i.e(3046),i.e(1033),i.e(9230),i.e(9519),i.e(962),i.e(2842),i.e(3988),i.e(9050),i.e(8494),i.e(5890),i.e(6265)]).then(i.bind(i,4060)).then((i=>{const o=new(0,i.EditObjectDialogRenderer)(e,t,r,n);return o.show(s),o}))}let hi=null;var di=i(89664);const ui={[ut.TabNames.symbol]:"symbol",[ut.TabNames.legend]:"legend",[ut.TabNames.scales]:"scales",[ut.TabNames.trading]:"trading",[ut.TabNames.events]:"events", +[ut.TabNames.timezoneSessions]:"appearance",[ut.TabNames.text]:"text",[ut.TabNames.style]:"style",[ut.TabNames.visibility]:"visibility"},pi={[ut.TabNames.style]:"style",[ut.TabNames.visibility]:"visibilities"};async function _i(e,t,s={},r,n){const o=r.activeChartWidget.value(),{initialTab:a,tabName:l}=s;if(l&&!a&&(s.initialTab=pi[l]),(0,L.isStudyLineTool)(e)&&function(e){return[di.LineToolVbPFixed].some((t=>e instanceof t))}(e))return o.propertiesDefinitionsForSource(e).then((i=>null!==i?ci(e,t,s,n,i):null));if((0,k.isStudy)(e)&&function(e){const{shortId:t}=e.metaInfo();return"Overlay"===t}(e)||(0,L.isLineTool)(e))return o.propertiesDefinitionsForSource(e).then((s=>{if(null!==s){return function(e){return Promise.all([i.e(6848),i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(6092),i.e(8619),i.e(346),i.e(8825),i.e(8271),i.e(5761),i.e(8009),i.e(8707),i.e(7177),i.e(3261),i.e(3562),i.e(8049),i.e(3578),i.e(4884),i.e(140),i.e(8955),i.e(8251),i.e(9415),i.e(5020),i.e(3046),i.e(9230),i.e(7695),i.e(962),i.e(2842),i.e(3988),i.e(9050),i.e(8494),i.e(5890),i.e(6780)]).then(i.bind(i,75892)).then((t=>{const i=new(0,t.SourcePropertiesEditorRenderer)(e);return null!==hi&&hi.hide(),i.show(),hi=i,i}))}({propertyPages:s,model:t,source:e,activePageId:l&&ui[l]})}return null}));if((0,k.isStudy)(e))return ci(e,t,s,n);{const e=l&&ui[l],t=r.getChartPropertiesDialogRenderer();return t.setActivePage(e),t.show()}}var mi=i(20364),gi=i(68121),fi=i(4978),vi=i(7578);class Si{constructor(e,t){this._showed=!1,this._cw=e,this._element=document.createElement("div"),this._element.classList.add("chart-loading-screen"),this._shield=document.createElement("div"),this._shield.classList.add("chart-loading-screen-shield"),this._element.appendChild(this._shield),t.appendChild(this._element),this._cw.withModel(this,this._connectToModel)}show(e){if(e){const e=this._cw.model().mainSeries().status();if(1!==e&&2!==e)return}this._cw.setInLoadingState(!0),this._showed||(this._showed=!0,this._show())}hide(){this._cw.setInLoadingState(!1),this._showed&&this._hide()}isShown(){return this._showed}_connectToModel(){const e=this._cw.model().mainSeries().dataEvents();e.symbolError().subscribe(this,(e=>{e!==vi.permissionDenied&&this.hide()})),e.seriesError().subscribe(this,(()=>{(0,Ve.enabled)("hide_loading_screen_on_series_error")&&this.hide()})),e.completed().subscribe(this,this.hide)}_show(){const e=this._cw.properties().childs().paneProperties.childs();let t;if(e.backgroundType.value()===fi.ColorType.Solid)t=e.background.value();else{t=`linear-gradient(${e.backgroundGradientStartColor.value()},${e.backgroundGradientEndColor.value()})`}this._shield.style.background=t,this._element.classList.add("fade")}_hide(){this._showed=!1,this._element.classList.remove("fade")}}var yi=i(93975),bi=i(10621),wi=i(52865);const Pi=(0,R.getHexColorByName)("color-cold-gray-700"),Ci=(0,R.getHexColorByName)("color-cold-gray-400");class Ti{constructor(e){this._container=null,this._errorCardRenderer=null,this._mainSeriesErrorMessage=null,this._banErrorMessage=null, +this._errorMessageHandler=e=>{this._chartWidget.hasModel()?this._updatePaneWidgets(e):this._renderErrorWithoutModel(e)},this._chartWidget=e,this._subscribeToMainSeriesErrors()}destroy(){var e,t,i;null===(e=this._mainSeriesErrorMessage)||void 0===e||e.destroy(),null===(t=this._banErrorMessage)||void 0===t||t.destroy(),null===(i=this._errorCardRenderer)||void 0===i||i.then((e=>{e.container.remove(),e.destroy()}))}updatePaneWidgets(){this._updatePaneWidgets()}setContainer(e){var t;if(this._container!==e){this._container=e,null===(t=this._errorCardRenderer)||void 0===t||t.then((e=>e.container.remove()));const i=this._getErrorMessage();i&&this._errorMessageHandler(i)}}_updatePaneWidgets(e=this._getErrorMessage()){this._chartWidget.paneWidgets().forEach((t=>t.setErrorMessage(e)))}async _renderErrorWithoutModel(e){if(null===this._container||null===e&&null===this._errorCardRenderer)return;const t=await this._getErrorCardRenderer();this._container.contains(t.container)||this._container.appendChild(t.container),t.update(this._createErrorCardRendererState(e))}async _getErrorCardRenderer(){return this._errorCardRenderer||(this._errorCardRenderer=this._createErrorCardRenderer())}async _createErrorCardRenderer(){return new(await mt())}_createErrorCardRendererState(e){return e?{message:e.message,icon:e.icon,textColor:fe.watchedTheme.value()===ve.StdTheme.Dark?Ci:Pi,backgroundColor:fe.watchedTheme.value()===ve.StdTheme.Dark?"#131722":"#FFF",solutionId:e.solutionId}:{message:null}}_subscribeToMainSeriesErrors(){const e=this._chartWidget;e.withModel(this,(()=>{const t=e.model().model().mainSeries();this._mainSeriesErrorMessage=(0,y.combine)(((t,s,r)=>{if(t)return t;let o;switch(s){case 4:{const t=e.model().model().mainSeries().seriesErrorMessage();null!==t&&("resolution_not_entitled"===t||"custom_resolution"===t||"seconds_not_entitled"===t||t.startsWith("study_not_auth:"))||(o=n.t(null,void 0,i(32619)));break}case 1:case 2:break;default:r&&(o=n.t(null,void 0,i(95222)))}return o?{message:o,icon:"ghost"}:null}),this._banErrorMessage||new(ot())(null).readonly(),(0,wi.createWVFromGetterAndSubscription)((()=>t.status()),t.onStatusChanged()),(0,wi.createWVFromGetterAndSubscription)((()=>!t.bars().size()&&!t.isInReplay()),t.dataEvents().dataUpdated()),(0,wi.createWVFromGetterAndSubscription)((()=>({})),e.model().model().onChartThemeLoaded())),this._mainSeriesErrorMessage.subscribe(this._errorMessageHandler,{callWithLast:!0})}))}_getErrorMessage(){var e,t;return(null===(e=this._banErrorMessage)||void 0===e?void 0:e.value())||(null===(t=this._mainSeriesErrorMessage)||void 0===t?void 0:t.value())||null}}var xi=i(8890),Ii=i(26220),Mi=i.n(Ii);async function Ai(e,t,s,o,a="default"){let l,c=[];const h=e.model().model(),d=(0,S.clone)((0,r.ensureDefined)(t.defaults.inputs)),u=new(Mi())({inputs:d}),p=function(e,t){return"symbol"===t?e.inputs.filter((t=>t.id===e.symbolInputId())):e.inputs.filter((e=>e.confirm))}(t,a),_=()=>{l&&h.removeCustomSource(l)},m=()=>{_(),o()},g=e=>{s({inputs:e,parentSources:c}),_()},f=p.filter(xi.isTimeOrPriceNotHiddenInput) +;if(f.length>0)try{const s=await Promise.all([i.e(8087),i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(8619),i.e(346),i.e(8825),i.e(8271),i.e(5761),i.e(8707),i.e(7177),i.e(3261),i.e(3562),i.e(8049),i.e(3578),i.e(4884),i.e(140),i.e(4450),i.e(962),i.e(2842),i.e(3016),i.e(1075),i.e(3988),i.e(9050),i.e(8494),i.e(3030)]).then(i.bind(i,73339)),r=await s.selectInputValuesOnChart(e,f,u,t.shortDescription,t.inputs);if(l=r.customSourceId,r.destPane){const e=r.destPane.mainDataSource();c=e===h.mainSeries()?[]:[e]}else c=[]}catch(e){return void m()}f.length!==p.length?Promise.all([i.e(8087),i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(8619),i.e(346),i.e(8825),i.e(8271),i.e(5761),i.e(8707),i.e(7177),i.e(3261),i.e(3562),i.e(8049),i.e(3578),i.e(4884),i.e(140),i.e(4450),i.e(962),i.e(2842),i.e(3016),i.e(1075),i.e(3988),i.e(9050),i.e(8494),i.e(3030)]).then(i.bind(i,29638)).then((t=>{const s=new t.ConfirmInputsDialogRenderer(function(e){if("symbol"===e)return n.t(null,void 0,i(45743));return n.t(null,void 0,i(46689))}(a),p,u,a,e.model(),g,m);return s.show(),s})):g(u.state().inputs||{})}var Li=i(69228),ki=i(578);var Ei=i(64548);const Di=(0,Ve.enabled)("chart_content_overrides_by_defaults"),Bi=(0,o.getLogger)("ChartWidget",{color:"#606"}),Vi=new O.TranslatedString("hide {title}",n.t(null,void 0,i(70301)));const Ri={addToWatchlistEnabled:!0,showFinancialsEnabled:!1,sourceSelectionEnabled:!0,propertyPagesEnabled:!0,paneContextMenuEnabled:!0,priceScaleContextMenuEnabled:!0,currencyConversionEnabled:!1,unitConversionEnabled:!1,goToDateEnabled:!1,marketStatusWidgetEnabled:!0,chartWarningWidgetEnabled:!0,dataProblemWidgetEnabled:!0,paneControlsEnabled:!0,isSymbolAvailable:e=>Promise.resolve(!0),legendWidgetEnabled:!0,chartEventsEnabled:!0,esdEnabled:!1,newsEnabled:!1,continuousContractSwitchesEnabled:!1,futuresContractExpirationEnabled:!1,croppedTickMarks:!0,countdownEnabled:!0,lastPriceAnimationEnabled:!0,useKineticScroll:c.CheckMobile.any(),indicatorsDialogShortcutEnabled:!0,handleScale:{mouseWheel:!0,pinch:!0,axisPressedMouseMove:{time:!0,price:!0}},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0}};function Ni(e,t,i,s=0){const r=t.mainSeries().syncModel(),n=e.mainSeries().syncModel();let o=i;if(null!==r&&null!==n){const t=e.createSyncPoint(r.syncSourceTarget(),n.syncSourceTarget());0!==s&&(i=r.projectTime(i,s)),o=t.sourceTimeToTargetTime(i)}return e.timeScale().points().roughIndex(o,n&&n.distance.bind(n))}const Oi=["Overlay@tv-basicstudies","CorrelationCoefficient@tv-basicstudies","Correlation Coeff@tv-basicstudies","Spread@tv-basicstudies","Ratio@tv-basicstudies"];class Fi{constructor(e,t,i){this.activePaneWidget=null,this._model=null,this._paneWidgets=[],this._maximizedPaneWidget=null,this._timeAxisWidget=null,this._paneSeparators=[],this._controlBarNavigation=null,this._lineToolsSynchronizer=null,this._modelCreated=new(oe()),this._isDestroyed=!1,this._customLegendWidgetsFactoryMap=new Map,this._backgroundTopTheme=new(ot())("light"), this._backgroundBasedTheme=new(ot())("light"),this._backgroundBottomTheme=new(ot())("light"),this._lhsAxesWidth=0,this._rhsAxesWidth=0,this._lhsPriceAxisWidthChanged=new(oe()),this._rhsPriceAxisWidthChanged=new(oe()),this._mainDiv=null,this._parent=null,this._elTooltipDiv=null,this._hotkeysListener=null,this._mouseWheelHelper=null,this._onWheelBound=null,this._justActivated=!1,this._inited=!1,this._containsData=!1,this._initialLoading=!1,this._defTimeframe=void 0,this._removeMaximizeHotkey=null,this._metaInfoRepository=null,this._invalidationMask=null,this._drawPlanned=!1,this._drawRafId=0,this._inLoadingState=!1,this._timingsMeter=null,this._tagsChanged=new(oe()),this._redraw=new(oe()),this._isVisible=new(ot())(!0),this._collapsed=new(ot())(!1),this._dataWindowWidget=null,this._resizeHandler=null,this._spinner=null,this._keydownEventListener=null,this._properties=null,this._updateThemedColorBound=this._updateThemedColor.bind(this),this._disconnected=new(oe()),this._reconnectBailout=new(oe()),this._connected=new(oe()),this._chartWidgetInitialized=new(oe()),this._saveChartService=null,this._objectTreeDialogController=null,this._chartPaintedPromise=null,this._noExchangeSubscrptionWarning=null,this._paneWidgetsSharedState=new ai,this._brokerName="",this._onZoom=new(oe()),this._onScroll=new(oe()),this._availableScreen=null,this._hoveredPriceAxes=new Set,this._anyAxisHovered=new(ot())(!1),this._invalidationHandler=e=>{if(!(e instanceof D.InvalidationMask))throw new Error("Invalid mask");null!==this._invalidationMask?this._invalidationMask.merge(e):this._invalidationMask=e,this._drawPlanned||(this._drawPlanned=!0,this._options.visible.when((()=>{const e=!document.hidden,t=this.screen&&this.screen.isShown();null!==this._timingsMeter&&e&&!t&&this._timingsMeter.startWaitingDraw();const i=(0,r.ensureNotNull)((0,r.ensureNotNull)(this._parent).ownerDocument.defaultView);this._drawRafId=i.requestAnimationFrame(this._invalidationRAFCallback.bind(this))})))},this._onChartSessionIsConnectedChanged=e=>{e?this._onConnection():this._onDisconnect()},this._subscribeToBanInfo=e=>{var t,i;e?null===(t=this._spinner)||void 0===t||t.stop():null===(i=this._spinner)||void 0===i||i.spin()},this._id=t,this._layoutId=i,this._options=(0,S.merge)((0,S.clone)(Ri),e),this._options.customLegendWidgetFactories&&(this._customLegendWidgetsFactoryMap=this._options.customLegendWidgetFactories),this._subscribeToDrawingState(),this._chartWidgetCollection=this._options.chartWidgetCollection,this.withModel(this,(()=>{const e=this.model().model();e.backgroundTopColor().subscribe(this._updateThemedColorBound),e.backgroundColor().subscribe(this._updateThemedColorBound)})),this._errorRenderer=new Ti(this),this._scrollHelper=new ti(this),this._objectTreeDialogController=_.getInstance(),this._properties=new E.DefaultProperty("chartproperties",void 0,void 0,this._options.useUserChartPreferences),this._properties.addExclusion("scalesProperties.axisHighlightColor"),this._properties.addExclusion("scalesProperties.axisLineToolLabelBackgroundColorActive"), -this._properties.addExclusion("scalesProperties.axisLineToolLabelBackgroundColorCommon"),this._properties.addExclusion("scalesProperties.showPriceScaleCrosshairLabel"),this._properties.addExclusion("scalesProperties.showTimeScaleCrosshairLabel"),this._properties.addExclusion("scalesProperties.crosshairLabelBgColorLight"),this._properties.addExclusion("scalesProperties.crosshairLabelBgColorDark"),this._startSpinner(this._options.container.value()),this._chartSession=new ri(window.ChartApiInstance),this._metaInfoRepository=new x(this._chartSession)}destroy(){var e,t;null===(e=this._lineToolsSynchronizer)||void 0===e||e.destroy(),null===(t=this._noExchangeSubscrptionWarning)||void 0===t||t.destroy(),window.loginStateChange.unsubscribe(this,this._handleLoginStateChanged),null!==this._model&&(this._model.model().backgroundTopColor().unsubscribe(this._updateThemedColorBound),this._model.model().backgroundColor().unsubscribe(this._updateThemedColorBound),this._model.destroy()),this._customLegendWidgetsFactoryMap.clear(),this._scrollHelper.destroy(),this._errorRenderer.destroy(),this._chartSession.criticalError().unsubscribe(this,this._onChartSessionCriticalError),this._chartSession.isConnected().unsubscribe(this._onChartSessionIsConnectedChanged),this._chartSession.destroy(),this._isDestroyed=!0}emulateCriticalError(){this._chartSession.removeSeries("-1")}chartSession(){return this._chartSession}onDisconnected(){return this._disconnected}onReconnectBailout(){return this._reconnectBailout}onConnected(){return this._connected}chartWidgetInitialized(){return this._chartWidgetInitialized}setVisibleTimeRange(e,t,i,s){{const n=this.model().mainSeries().seriesSource();this._chartSession.setVisibleTimeRange((0,r.ensureNotNull)(n.instanceId()),n.turnaround(),e,t,null!=i?i:{},null!=s?s:()=>{})}}lineToolsSynchronizer(){return this._lineToolsSynchronizer}model(){return(0,r.ensureNotNull)(this._model)}id(){return this._id}layoutId(){return this._layoutId}crossHairSyncEnabled(){return this._chartWidgetCollection.lock.crosshair.value()}isVisible(){return this._isVisible.value()}setVisible(e){this._isVisible.setValue(e)}setCollapsed(e){this._collapsed.setValue(e)}isJustClonedChart(){return!!(this._options||{}).justCloned}setSymbol(e){this._model?this._model.setSymbol(this._model.mainSeries(),e):this.properties().childs().mainSeriesProperties.merge({symbol:e})}setResolution(e){this._model?this._model.setResolution(this._model.mainSeries(),e):this.properties().childs().mainSeriesProperties.merge({interval:e})}getResolution(){return this._model?this._model.mainSeries().properties().childs().interval.value():this.properties().childs().mainSeriesProperties.childs().interval.value()}loadRange(e){if(this._model){this.screen.show();this._model.loadRange(e)||this.screen.hide()}}async showGeneralChartProperties(e){if(!Be.enabled("show_chart_property_page"))return Promise.resolve(null);const t=await this._showChartProperties(this.model().mainSeries(),e,{doNotCloseOnBgClick:!0,onResetToDefault:async()=>{this.model().restorePreferences() -;const e=await Promise.resolve().then(i.bind(i,8840)),t=e.getCurrentTheme().name;e.loadTheme(this.chartWidgetCollection(),{themeName:t,standardTheme:!0})}});if(null===t)return null;const s=()=>{t.hide(),this._chartWidgetCollection.activeChartWidget.unsubscribe(s)};return this._chartWidgetCollection.activeChartWidget.subscribe(s),t}async showChartPropertiesForSources(e){if(!(0,Be.enabled)("property_pages"))return Promise.resolve(null);const{sources:t,title:s,tabName:o,renamable:a}=e,l=(0,r.ensureNotNull)(this._model),c=Zt(t.map((e=>e.properties().childs()))),h=Zt(t.map((e=>e.properties().childs().intervalsVisibilities))),[{createPropertyPage:d},{getSelectionStylePropertiesDefinitions:u},{getSelectionIntervalsVisibilitiesPropertiesDefinition:p},{getSelectionCoordinatesPropertyDefinition:_}]=await Promise.all([Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,82623)),Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,87118)),Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,20196)),Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,19402))]);return async function(e){const{SourcesPropertiesEditorRenderer:t}=await Promise.all([i.e(6848),i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(6092),i.e(8619),i.e(346),i.e(8825),i.e(8271),i.e(5761),i.e(8009),i.e(8707),i.e(7177),i.e(3261),i.e(3562),i.e(8049),i.e(3578),i.e(4884),i.e(140),i.e(8955),i.e(8251),i.e(9415),i.e(5020),i.e(3046),i.e(9230),i.e(7695),i.e(962),i.e(2842),i.e(3988),i.e(9050),i.e(8494),i.e(5890),i.e(6780)]).then(i.bind(i,66512)),s=new t(e);return null!==li&&(li.hide(),li=s),s.show(),s}({sources:t,propertyPages:[d(u(c,l),"Style",n.t(null,void 0,i(32733))),d({definitions:[_(t,l)]},"Displacement",n.t(null,void 0,i(62764))),d(p(h,l),"Visibility",n.t(null,void 0,i(21852)))],undoModel:l,title:s,activeTabId:o,renamable:a})}getPriceAxisWidthChangedByName(e){return"left"===e?this._lhsPriceAxisWidthChanged:this._rhsPriceAxisWidthChanged}getPriceAxisMaxWidthByName(e){return"left"===e?this._lhsAxesWidth:this._rhsAxesWidth}timeAxisHeight(){return null!==this._timeAxisWidget?this._timeAxisWidget.size.height:0}withModel(e,t){null!==this._model?t.call(e):this.modelCreated().subscribe(e,t,!0)}hasModel(){return null!==this._model}copyLineToOtherCharts(){const e=(0,r.ensureNotNull)(this._model),t=e.selection().lineDataSources().filter((e=>e.isSynchronizable()));e.copyToOtherCharts(t)}hideDataSources(e){if(e.length){const t=e.map((e=>e.properties().visible)),i=e.map((()=>!1));this.model().setProperties(t,i,Bi.format({title:new O.TranslatedString(e[0].name(),e[0].title())}))}}hideSelectedObject(){this.hideDataSources(this.model().selection().dataSources().filter((e=>!0)))}unlinkSelectedLine(){const e=(0,r.ensureNotNull)(this._model),t=e.selection().lineDataSources();e.unlinkLines(t)}onScroll(){return this._onScroll}onZoom(){return this._onZoom}images(e){window.TradingView.printing=!0;const t=this.model().selection().allSources() -;this.model().selectionMacro((e=>e.clearSelection())),this.model().model().recalculateAllPanes((0,yt.globalChangeEvent)());const i=(t,i)=>{t.paint(i);const s={showCollapsedStudies:Boolean(null==e?void 0:e.showCollapsedStudies),status:null==e?void 0:e.status};return t.getScreenshotData(s)},s=[];if(null!==this._maximizedPaneWidget){const e=this._paneWidgets.indexOf(this._maximizedPaneWidget);s.push(i(this._maximizedPaneWidget,D.InvalidationMask.light().invalidateForPane(e)))}else for(let e=0;e{t.forEach((t=>{e.addSourceToSelection(t)}))})),this.model().model().recalculateAllPanes((0,yt.globalChangeEvent)()),this.model().model().lightUpdate();const n=this.mainSeriesQuotesAndMetainfo();return{panes:s,timeAxis:r,colors:{text:this.properties().childs().scalesProperties.childs().textColor.value(),bg:this.properties().childs().paneProperties.childs().background.value(),scales:this.properties().childs().scalesProperties.childs().lineColor.value()},meta:n.meta,ohlc:n.ohlc,quotes:n.quotes}}insertStudy(e,t,i,s){return new Promise((r=>{0!==t.length?window.runOrSignIn((()=>{r(this._insertStudy(e,t,i,s))}),{source:"study on study"}):r(this._insertStudy(e,t,i,s))})).catch((()=>null))}addOverlayStudy(e,t,i){const s=this.model();return this._options&&this._options.isSymbolAvailable?this._options.isSymbolAvailable(e).then((r=>{if(!r)return null;const n=s.createStudyInserter({type:"java",studyId:"Overlay@tv-basicstudies"},[]),o={allowExtendTimeScale:i};if(Be.enabled("use_overrides_for_overlay")){const e=(0,Ei.factoryDefaults)("study_Overlay@tv-basicstudies.style");o.style=e}return n.setPropertiesState(o),n.setForceOverlay(t),n.insert((()=>Promise.resolve({inputs:{symbol:e},parentSources:[]})))})):Promise.resolve(null)}addCompareStudy(e){const t=this.model();return this._options&&this._options.isSymbolAvailable?this._options.isSymbolAvailable(e).then((i=>i?t.createStudyInserter({type:"java",studyId:"Compare@tv-basicstudies"},[]).insert((()=>Promise.resolve({inputs:{symbol:e},parentSources:[]}))):null)):Promise.resolve(null)}showIndicators(e,t){if(window.studyMarket)return window.studyMarket.visible().value()?void window.studyMarket.hide():(window.studyMarket.show(e,t),window.studyMarket)}setSaveChartService(e){this._saveChartService=e,null!==this._lineToolsSynchronizer&&this._lineToolsSynchronizer.setSaveChartService(e)}getSaveChartService(){return this._saveChartService}mainSeriesQuotesAndMetainfo(){let e,t,i;const s=this._model&&this._model.mainSeries();if(s){const r=e=>null==e?"":s.formatter().format(e,void 0,void 0,!0,!1)+"",n=e=>null==e?"":e+"";e={resolution:s.interval(),symbol:s.symbol(),values:s.valuesProvider().getValues(null)};const o=s.symbolInfo() +this._properties.addExclusion("scalesProperties.axisLineToolLabelBackgroundColorCommon"),this._properties.addExclusion("scalesProperties.showPriceScaleCrosshairLabel"),this._properties.addExclusion("scalesProperties.showTimeScaleCrosshairLabel"),this._properties.addExclusion("scalesProperties.crosshairLabelBgColorLight"),this._properties.addExclusion("scalesProperties.crosshairLabelBgColorDark"),this._startSpinner(this._options.container.value()),this._chartSession=new ri(window.ChartApiInstance),this._metaInfoRepository=new x(this._chartSession)}destroy(){var e,t;null===(e=this._lineToolsSynchronizer)||void 0===e||e.destroy(),null===(t=this._noExchangeSubscrptionWarning)||void 0===t||t.destroy(),window.loginStateChange.unsubscribe(this,this._handleLoginStateChanged),null!==this._model&&(this._model.model().backgroundTopColor().unsubscribe(this._updateThemedColorBound),this._model.model().backgroundColor().unsubscribe(this._updateThemedColorBound),this._model.destroy()),this._customLegendWidgetsFactoryMap.clear(),this._scrollHelper.destroy(),this._errorRenderer.destroy(),this._chartSession.criticalError().unsubscribe(this,this._onChartSessionCriticalError),this._chartSession.isConnected().unsubscribe(this._onChartSessionIsConnectedChanged),this._chartSession.destroy(),this._isDestroyed=!0}emulateCriticalError(){this._chartSession.removeSeries("-1")}chartSession(){return this._chartSession}onDisconnected(){return this._disconnected}onReconnectBailout(){return this._reconnectBailout}onConnected(){return this._connected}chartWidgetInitialized(){return this._chartWidgetInitialized}setVisibleTimeRange(e,t,i,s){{const n=this.model().mainSeries().seriesSource();this._chartSession.setVisibleTimeRange((0,r.ensureNotNull)(n.instanceId()),n.turnaround(),e,t,null!=i?i:{},null!=s?s:()=>{})}}lineToolsSynchronizer(){return this._lineToolsSynchronizer}model(){return(0,r.ensureNotNull)(this._model)}id(){return this._id}layoutId(){return this._layoutId}crossHairSyncEnabled(){return this._chartWidgetCollection.lock.crosshair.value()}isVisible(){return this._isVisible.value()}setVisible(e){this._isVisible.setValue(e)}setCollapsed(e){this._collapsed.setValue(e)}isJustClonedChart(){return!!(this._options||{}).justCloned}setSymbol(e){this._model?this._model.setSymbol(this._model.mainSeries(),e):this.properties().childs().mainSeriesProperties.merge({symbol:e})}setResolution(e){this._model?this._model.setResolution(this._model.mainSeries(),e):this.properties().childs().mainSeriesProperties.merge({interval:e})}getResolution(){return this._model?this._model.mainSeries().properties().childs().interval.value():this.properties().childs().mainSeriesProperties.childs().interval.value()}loadRange(e){if(this._model){this.screen.show();this._model.loadRange(e)||this.screen.hide()}}async showGeneralChartProperties(e){if(!Ve.enabled("show_chart_property_page"))return Promise.resolve(null);const t=await this._showChartProperties(this.model().mainSeries(),e,{doNotCloseOnBgClick:!0,onResetToDefault:async()=>{this.model().restorePreferences() +;const e=await Promise.resolve().then(i.bind(i,8840)),t=e.getCurrentTheme().name;e.loadTheme(this.chartWidgetCollection(),{themeName:t,standardTheme:!0})}});if(null===t)return null;const s=()=>{t.hide(),this._chartWidgetCollection.activeChartWidget.unsubscribe(s)};return this._chartWidgetCollection.activeChartWidget.subscribe(s),t}async showChartPropertiesForSources(e){if(!(0,Ve.enabled)("property_pages"))return Promise.resolve(null);const{sources:t,title:s,tabName:o,renamable:a}=e,l=(0,r.ensureNotNull)(this._model),c=Zt(t.map((e=>e.properties().childs()))),h=Zt(t.map((e=>e.properties().childs().intervalsVisibilities))),[{createPropertyPage:d},{getSelectionStylePropertiesDefinitions:u},{getSelectionIntervalsVisibilitiesPropertiesDefinition:p},{getSelectionCoordinatesPropertyDefinition:_}]=await Promise.all([Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,82623)),Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,87118)),Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,20196)),Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,19402))]);return async function(e){const{SourcesPropertiesEditorRenderer:t}=await Promise.all([i.e(6848),i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(4819),i.e(9333),i.e(6092),i.e(8619),i.e(346),i.e(8825),i.e(8271),i.e(5761),i.e(8009),i.e(8707),i.e(7177),i.e(3261),i.e(3562),i.e(8049),i.e(3578),i.e(4884),i.e(140),i.e(8955),i.e(8251),i.e(9415),i.e(5020),i.e(3046),i.e(9230),i.e(7695),i.e(962),i.e(2842),i.e(3988),i.e(9050),i.e(8494),i.e(5890),i.e(6780)]).then(i.bind(i,66512)),s=new t(e);return null!==li&&(li.hide(),li=s),s.show(),s}({sources:t,propertyPages:[d(u(c,l),"Style",n.t(null,void 0,i(32733))),d({definitions:[_(t,l)]},"Displacement",n.t(null,void 0,i(62764))),d(p(h,l),"Visibility",n.t(null,void 0,i(21852)))],undoModel:l,title:s,activeTabId:o,renamable:a})}getPriceAxisWidthChangedByName(e){return"left"===e?this._lhsPriceAxisWidthChanged:this._rhsPriceAxisWidthChanged}getPriceAxisMaxWidthByName(e){return"left"===e?this._lhsAxesWidth:this._rhsAxesWidth}timeAxisHeight(){return null!==this._timeAxisWidget?this._timeAxisWidget.size.height:0}withModel(e,t){null!==this._model?t.call(e):this.modelCreated().subscribe(e,t,!0)}hasModel(){return null!==this._model}copyLineToOtherCharts(){const e=(0,r.ensureNotNull)(this._model),t=e.selection().lineDataSources().filter((e=>e.isSynchronizable()));e.copyToOtherCharts(t)}hideDataSources(e){if(e.length){const t=e.map((e=>e.properties().visible)),i=e.map((()=>!1));this.model().setProperties(t,i,Vi.format({title:new O.TranslatedString(e[0].name(),e[0].title())}))}}hideSelectedObject(){this.hideDataSources(this.model().selection().dataSources().filter((e=>!0)))}unlinkSelectedLine(){const e=(0,r.ensureNotNull)(this._model),t=e.selection().lineDataSources();e.unlinkLines(t)}onScroll(){return this._onScroll}onZoom(){return this._onZoom}images(e){window.TradingView.printing=!0;const t=this.model().selection().allSources() +;this.model().selectionMacro((e=>e.clearSelection())),this.model().model().recalculateAllPanes((0,yt.globalChangeEvent)());const i=(t,i)=>{t.paint(i);const s={showCollapsedStudies:Boolean(null==e?void 0:e.showCollapsedStudies),status:null==e?void 0:e.status};return t.getScreenshotData(s)},s=[];if(null!==this._maximizedPaneWidget){const e=this._paneWidgets.indexOf(this._maximizedPaneWidget);s.push(i(this._maximizedPaneWidget,D.InvalidationMask.light().invalidateForPane(e)))}else for(let e=0;e{t.forEach((t=>{e.addSourceToSelection(t)}))})),this.model().model().recalculateAllPanes((0,yt.globalChangeEvent)()),this.model().model().lightUpdate();const n=this.mainSeriesQuotesAndMetainfo();return{panes:s,timeAxis:r,colors:{text:this.properties().childs().scalesProperties.childs().textColor.value(),bg:this.properties().childs().paneProperties.childs().background.value(),scales:this.properties().childs().scalesProperties.childs().lineColor.value()},meta:n.meta,ohlc:n.ohlc,quotes:n.quotes}}insertStudy(e,t,i,s){return new Promise((r=>{0!==t.length?window.runOrSignIn((()=>{r(this._insertStudy(e,t,i,s))}),{source:"study on study"}):r(this._insertStudy(e,t,i,s))})).catch((()=>null))}addOverlayStudy(e,t,i){const s=this.model();return this._options&&this._options.isSymbolAvailable?this._options.isSymbolAvailable(e).then((r=>{if(!r)return null;const n=s.createStudyInserter({type:"java",studyId:"Overlay@tv-basicstudies"},[]),o={allowExtendTimeScale:i};if(Ve.enabled("use_overrides_for_overlay")){const e=(0,Ei.factoryDefaults)("study_Overlay@tv-basicstudies.style");o.style=e}return n.setPropertiesState(o),n.setForceOverlay(t),n.insert((()=>Promise.resolve({inputs:{symbol:e},parentSources:[]})))})):Promise.resolve(null)}addCompareStudy(e){const t=this.model();return this._options&&this._options.isSymbolAvailable?this._options.isSymbolAvailable(e).then((i=>i?t.createStudyInserter({type:"java",studyId:"Compare@tv-basicstudies"},[]).insert((()=>Promise.resolve({inputs:{symbol:e},parentSources:[]}))):null)):Promise.resolve(null)}showIndicators(e,t){if(window.studyMarket)return window.studyMarket.visible().value()?void window.studyMarket.hide():(window.studyMarket.show(e,t),window.studyMarket)}setSaveChartService(e){this._saveChartService=e,null!==this._lineToolsSynchronizer&&this._lineToolsSynchronizer.setSaveChartService(e)}getSaveChartService(){return this._saveChartService}mainSeriesQuotesAndMetainfo(){let e,t,i;const s=this._model&&this._model.mainSeries();if(s){const r=e=>null==e?"":s.formatter().format(e,void 0,void 0,!0,!1)+"",n=e=>null==e?"":e+"";e={resolution:s.interval(),symbol:s.symbol(),values:s.valuesProvider().getValues(null)};const o=s.symbolInfo() ;o&&(e.symbol=o.full_name,e.description=o.description,e.exchange=o.exchange);const a=s.bars().last();null!==a&&(t=a.value.slice(1,5).map(r));const l=s.quotes();l&&(i={change:r(l.change),changePercent:n(l.change_percent),last:r(l.last_price)})}return{meta:e,ohlc:t,quotes:i}}updateCrossHairPositionIfNeeded(){if(this._model){const e=G.tool.value();this._model.model().setCurrentTool(e);const t=(0,F.lastMouseOrTouchEventInfo)();if(t.isTouch){const e=this._maximizedPaneWidget||this._paneWidgets[0];if(e.hasState()&&(!t.stylus&&(this._isLineToolModeExceptBrush()||(0,G.toolIsMeasure)(G.tool.value()))||this.selectPointMode().value()!==G.SelectPointMode.None)){const t=e.state(),i=.5*this._model.model().timeScale().width(),s=.5*t.defaultPriceScale().height();this._model.model().setAndSaveCurrentPosition(i,s,t)}}if(this._model&&t.isTouch){const e=this._model.model().crossHairSource();e.updateAllViews((0,yt.sourceChangeEvent)(e.id()))}}}trackingModePaneWidget(){if(!(0,F.lastMouseOrTouchEventInfo)().isTouch)return null;for(const e of this.paneWidgets())if(e.trackingModeEnabled())return e;return null}startTrackingMode(){if((0,F.lastMouseOrTouchEventInfo)().isTouch){this.exitTrackingMode(),this.updateCrossHairPositionIfNeeded();const e=this._maximizedPaneWidget||this._paneWidgets[0],t=this.model().model().crossHairSource().currentPoint();e.startTrackingMode(t,t)}}exitTrackingMode(){(0,F.lastMouseOrTouchEventInfo)().isTouch&&this.paneWidgets().some((e=>e.trackingModeEnabled()))&&(this.paneWidgets().forEach((e=>e.exitTrackingMode())),this.model().model().clearCurrentPosition())}onToolChanged(){this.model().lineBeingCreated()&&this._cancelCreatingLine(),this.selectPointMode().value()!==G.SelectPointMode.None&&this.cancelRequestSelectPoint(),this.exitTrackingMode()}setInLoadingState(e){this._inLoadingState=e}paint(e){const t=null!=e?e:D.InvalidationMask.full();t.validationActions().forEach((e=>e())),this._paneWidgets.forEach(((e,i)=>{null!==this._maximizedPaneWidget&&this._maximizedPaneWidget!==e||e.paint(t.invalidateForPane(i))})),this._timeAxisWidget&&this._timeAxisWidget.paint(t.invalidateForTimeScale()),this._redraw.fire()}GUIResetScales(){(0,_e.trackEvent)("GUI","Reset Scales"),null!==this._model&&this._model.resetScales()}toggleMaximizePane(e){var t;if(!(this._paneWidgets.length<2)){this._maximizedPaneWidget?(this._maximizedPaneWidget.state().maximized().setValue(!1),this._maximizedPaneWidget=null,this._paneSeparators.forEach((e=>e.show()))):(this._maximizedPaneWidget=e,this._maximizedPaneWidget.state().maximized().setValue(!0),this._paneSeparators.forEach((e=>e.hide())));for(let e=this._paneWidgets.length;e--;)this._paneWidgets[e].updateControls(),this._paneWidgets[e].updatePriceAxisWidgets();this._errorRenderer.updatePaneWidgets(),null===(t=this._timeAxisWidget)||void 0===t||t.updatePriceAxisStubs(),this._adjustSize(),this.updateCrossHairPositionIfNeeded()}}maximizedPaneWidget(){return this._maximizedPaneWidget}isMaximizedPane(){return null!==this._maximizedPaneWidget}toggleCollapsedPane(e){const t=e.state() ;t.collapsed().setValue(!t.collapsed().value()),this._paneWidgets.forEach((e=>e.updateControls())),this._adjustSize(),this.updateCrossHairPositionIfNeeded()}unsetActivePaneWidget(){this.activePaneWidget=null}setActivePaneWidget(e){this.activePaneWidget=e}onPaneWidgetDestroyed(e){this.activePaneWidget===e&&(this.activePaneWidget=null)}backgroundTopTheme(){return this._backgroundTopTheme.readonly()}backgroundBasedTheme(){return this._backgroundBasedTheme.readonly()}backgroundBottomTheme(){return this._backgroundBottomTheme.readonly()}lineToolsAndGroupsDTO(){return(0,r.ensureNotNull)(this._lineToolsSynchronizer).prepareDTO()}resetLineToolsInvalidated(e,t,i){(0,r.ensureNotNull)(this._lineToolsSynchronizer).resetInvalidated(e,t,i)}applyLineToolUpdateNotification(e,t){(0,r.ensureNotNull)(this._lineToolsSynchronizer).applyLineToolUpdateNotification(e,t)}reloadAllLineTools(){(0,r.ensureNotNull)(this._lineToolsSynchronizer).reloadAllLineTools()}startApplyingLineToolUpdateNotification(){var e;null===(e=this._lineToolsSynchronizer)||void 0===e||e.startApplyingLineToolUpdateNotification()}endApplyingLineToolUpdateNotification(){var e;null===(e=this._lineToolsSynchronizer)||void 0===e||e.endApplyingLineToolUpdateNotification()}applyAlertIdByExternalSource(e,t){var i;null===(i=this._lineToolsSynchronizer)||void 0===i||i.applyAlertIdByExternalSource(e,t)}deleteAlertByExternalSource(e,t){var i;null===(i=this._lineToolsSynchronizer)||void 0===i||i.deleteAlertByExternalSource(e)}shouldBeSavedEvenIfHidden(){return this._model?this.model().model().shouldBeSavedEvenIfHidden():!!this._options.content.shouldBeSavedEvenIfHidden}showObjectsTreeDialog(){var e;null===(e=this._objectTreeDialogController)||void 0===e||e.show()}addCustomWidgetToLegend(e,t){this._customLegendWidgetsFactoryMap.set(e,t);for(const i of this.paneWidgets())i.addCustomWidgetToLegend(e,t)}applyIndicatorsToAllChartsAvailable(){if(!this.chartWidgetCollection().applyIndicatorsToAllChartsAvailable())return!1;for(const e of this.model().model().panes()){if(e.sourcesByGroup().all().some((e=>(0,k.isStudy)(e)&&!0)))return!0}return!1}restoreState(e,t,i){this._adjustSize();(0,r.ensureNotNull)(this._model).restoreState(this._content,t,i);this._setActions()}addCompareAsOverlay(e,t,i){const s=this.model();return(0,r.ensureDefined)(this._options.isSymbolAvailable)(e).then((r=>{if(!r)return null;const n=s.createStudyInserter({type:"java",studyId:"Overlay@tv-basicstudies"},[]);return n.setForceOverlay(!0),n.setPreferredPriceScale("as-series"),!0!==i&&n.setTargetPriceScaleMode({percentage:!0}),void 0!==t&&n.setPropertiesState({allowExtendTimeScale:t}),n.insert((async()=>({inputs:{symbol:e},parentSources:[]})))}))}scrollHelper(){return this._scrollHelper}setBroker(e){var t;this._brokerName=e,null===(t=this._lineToolsSynchronizer)||void 0===t||t.setBroker(e)}chartPainted(){return this._drawPlanned?(null===this._chartPaintedPromise&&(this._chartPaintedPromise=(0,h.createDeferredPromise)()),this._chartPaintedPromise.promise):Promise.resolve()}setDataWindowWidget(e){this._dataWindowWidget=e} -removeDataWindowWidget(){this._dataWindowWidget=null}showSelectedSourcesProperties(e){const t=(0,r.ensureNotNull)(this._model).selection().dataSources();if(1===t.length)this.showSourceProperties(t[0],e);else{const i=t.filter(L.isLineTool);i.length>0&&this.showChartPropertiesForSources({sources:i,tabName:e})}}connect(){this._chartSession.isConnected().subscribe(this._onChartSessionIsConnectedChanged),this._chartSession.criticalError().subscribe(this,this._onChartSessionCriticalError),this._chartSession.connect(this._onData.bind(this))}finishInitWithoutConnect(){this._chartSession.disable(),this._init(),this._chartWidgetInitialized.fire()}reconnect(){this._chartSession.disconnect(),this._chartSession.connect()}update(){if(this.hasModel()){for(const e of this._paneWidgets)e.update();this._timeAxisWidget&&this._timeAxisWidget.update()}}setPriceAxisHovered(e,t){t?this._hoveredPriceAxes.add(e):this._hoveredPriceAxes.delete(e),this._anyAxisHovered.setValue(this._hoveredPriceAxes.size>0)}anyPriceAxisHovered(){return this._anyAxisHovered.readonly()}_insertStudy(e,t,i,s){const n=(0,r.ensureNotNull)(this._model).createStudyInserter(e,t,i);n.setForceOverlay("java"===e.type&&"Volume@tv-basicstudies"===e.studyId&&Be.enabled("volume_force_overlay"));const o=n.insert(((e,i,r)=>new Promise(((n,o)=>{var a;this.selectPointMode().value()!==G.SelectPointMode.None&&this.cancelRequestSelectPoint(),s?n(s(e,i,r)):!function(e){return Oi.includes(e.id)}(r)?(null!=(a=i)?a:[]).some((e=>e.confirm))?((0,_e.trackEvent)("GUI","Confirmation dialogs","Inputs confirmation dialog"),Ai(this,r,n,o)):n({inputs:{},parentSources:t}):((0,_e.trackEvent)("GUI","Confirmation dialogs","Symbol confirmation dialog"),Ai(this,r,n,o,"symbol"))}))));return o.then((()=>{(0,G.hideAllIndicators)().value()&&(0,N.toggleHideMode)()})).catch((e=>{})),o}async _showChartProperties(e,t,i,s){if(!this._model)return null;t&&((0,l.setValue)("properties_dialog.active_tab.chart",t),i.tabName=t);const r=await _i(e,this._model,i,this._options.chartWidgetCollection,s);return(null==r?void 0:r.visible().value())?r:null}_createLineToolsSynchronizerIfNeeded(){0}_updateThemedColor(){const e=this.model().model(),t=e.backgroundColorAtYPercentFromTop(.5);let i=e.backgroundTopColor().value(),s=e.backgroundColor().value();const r=(0,ge.isColorDark)(t),n=(0,ge.isColorDark)(i),o=(0,ge.isColorDark)(s);this.widget().classList.toggle("chart-widget--themed-dark",r),this.widget().classList.toggle("chart-widget--themed-light",!r),this.widget().classList.toggle("chart-widget__top--themed-dark",n),this.widget().classList.toggle("chart-widget__top--themed-light",!n),this.widget().classList.toggle("chart-widget__bottom--themed-dark",o),this.widget().classList.toggle("chart-widget__bottom--themed-light",!o),this._backgroundTopTheme.setValue(n?"dark":"light"),this._backgroundBasedTheme.setValue(r?"dark":"light"),this._backgroundBottomTheme.setValue(o?"dark":"light"),i===s&&(0,Z.isStdThemedDefaultValue)("chartProperties.paneProperties.background",i,this._backgroundBasedTheme.value())&&(i=null,s=null) -;for(const e of this._paneWidgets)e.updateThemedColors({topColor:i,bottomColor:s})}_isLineToolModeExceptBrush(){const e=G.tool.value();return(0,L.isLineToolName)(e)&&!(0,L.isLineDrawnWithPressedButton)(e)&&this.selectPointMode().value()===G.SelectPointMode.None}_cancelCreatingLine(){const e=(0,r.ensureNotNull)(this._model).model(),t=e.lineBeingCreated();if(null!==t){const i=(0,r.ensureNotNull)(e.paneForSource(t));(0,r.ensureNotNull)(this.paneByState(i)).cancelCreatingLineTool(),t.toolname===G.tool.value()&&(0,G.resetToCursor)()}const i=e.crossHairSource().measurePane().value();if(null!==i){(0,r.ensureNotNull)(this.paneByState(i)).cancelMeasuring()}}_adjustSize(e){var t;let i=0;const r=null===this._model?null:this._model.model().priceScaleSlotsCount(),n=new Uint32Array(null===r?0:r.left),o=new Uint32Array(null===r?0:r.right),a=(0,Y.getCanvasDevicePixelRatio)(document.body),l=(e,t)=>e+t,c=(e,t)=>{t.forEach(((t,i)=>{e[i]=Math.max(e[i],t)}))},h=this._width(),u=this._height(),p=this._paneSeparators.length,_=this.isMaximizedPane()?0:Ut.height()*p,m=null!==this._timeAxisWidget?this._timeAxisWidget.optimalHeight():0;let g=u-m>=61?m:0;g%2&&(g+=1);const f=Math.max(1,Math.floor((u-_-g)/this._paneWidgets.length));let v=0,S=null;for(const e of this._paneWidgets)if(!this._maximizedPaneWidget||this._maximizedPaneWidget===e){e.leftPriceAxisesContainer().updateCurrencyLabels();const t=e.leftPriceAxisesContainer().optimalWidths();e.rightPriceAxisesContainer().updateCurrencyLabels();const s=e.rightPriceAxisesContainer().optimalWidths();c(n,t),c(o,s),this._maximizedPaneWidget!==e&&e.state().collapsed().value()?v+=Math.min(f,e.collapsedHeight()):(i+=e.stretchFactor(),S=e)}let y=n.reduce(l,0),b=o.reduce(l,0),w=Math.max(h-y-b,0);if(w<=102){y=0,b=0,w=h;for(let e=0;e0&&this.showChartPropertiesForSources({sources:i,tabName:e})}}connect(){this._chartSession.isConnected().subscribe(this._onChartSessionIsConnectedChanged),this._chartSession.criticalError().subscribe(this,this._onChartSessionCriticalError),this._chartSession.connect(this._onData.bind(this))}finishInitWithoutConnect(){this._chartSession.disable(),this._init(),this._chartWidgetInitialized.fire()}reconnect(){this._chartSession.disconnect(),this._chartSession.connect()}update(){if(this.hasModel()){for(const e of this._paneWidgets)e.update();this._timeAxisWidget&&this._timeAxisWidget.update()}}setPriceAxisHovered(e,t){t?this._hoveredPriceAxes.add(e):this._hoveredPriceAxes.delete(e),this._anyAxisHovered.setValue(this._hoveredPriceAxes.size>0)}anyPriceAxisHovered(){return this._anyAxisHovered.readonly()}_insertStudy(e,t,i,s){const n=(0,r.ensureNotNull)(this._model).createStudyInserter(e,t,i);n.setForceOverlay("java"===e.type&&"Volume@tv-basicstudies"===e.studyId&&Ve.enabled("volume_force_overlay"));const o=n.insert(((e,i,r)=>new Promise(((n,o)=>{var a;this.selectPointMode().value()!==G.SelectPointMode.None&&this.cancelRequestSelectPoint(),s?n(s(e,i,r)):!function(e){return Oi.includes(e.id)}(r)?(null!=(a=i)?a:[]).some((e=>e.confirm))?((0,_e.trackEvent)("GUI","Confirmation dialogs","Inputs confirmation dialog"),Ai(this,r,n,o)):n({inputs:{},parentSources:t}):((0,_e.trackEvent)("GUI","Confirmation dialogs","Symbol confirmation dialog"),Ai(this,r,n,o,"symbol"))}))));return o.then((()=>{(0,G.hideAllIndicators)().value()&&(0,N.toggleHideMode)()})).catch((e=>{})),o}async _showChartProperties(e,t,i,s){if(!this._model)return null;t&&((0,l.setValue)("properties_dialog.active_tab.chart",t),i.tabName=t);const r=await _i(e,this._model,i,this._options.chartWidgetCollection,s);return(null==r?void 0:r.visible().value())?r:null}_createLineToolsSynchronizerIfNeeded(){0}_updateThemedColor(){const e=this.model().model(),t=e.backgroundColorAtYPercentFromTop(.5);let i=e.backgroundTopColor().value(),s=e.backgroundColor().value();const r=(0,ge.isColorDark)(t),n=(0,ge.isColorDark)(i),o=(0,ge.isColorDark)(s);this.widget().classList.toggle("chart-widget--themed-dark",r),this.widget().classList.toggle("chart-widget--themed-light",!r),this.widget().classList.toggle("chart-widget__top--themed-dark",n),this.widget().classList.toggle("chart-widget__top--themed-light",!n),this.widget().classList.toggle("chart-widget__bottom--themed-dark",o),this.widget().classList.toggle("chart-widget__bottom--themed-light",!o),this._backgroundTopTheme.setValue(n?"dark":"light"),this._backgroundBasedTheme.setValue(r?"dark":"light"),this._backgroundBottomTheme.setValue(o?"dark":"light"),i===s&&(0,Z.isStdThemedDefaultValue)("chartProperties.paneProperties.background",i,this._backgroundBasedTheme.value())&&(i=null,s=null) +;for(const e of this._paneWidgets)e.updateThemedColors({topColor:i,bottomColor:s})}_isLineToolModeExceptBrush(){const e=G.tool.value();return(0,L.isLineToolName)(e)&&!(0,L.isLineDrawnWithPressedButton)(e)&&this.selectPointMode().value()===G.SelectPointMode.None}_cancelCreatingLine(){const e=(0,r.ensureNotNull)(this._model).model(),t=e.lineBeingCreated();if(null!==t){const i=(0,r.ensureNotNull)(e.paneForSource(t));(0,r.ensureNotNull)(this.paneByState(i)).cancelCreatingLineTool(),t.toolname===G.tool.value()&&(0,G.resetToCursor)()}const i=e.crossHairSource().measurePane().value();if(null!==i){(0,r.ensureNotNull)(this.paneByState(i)).cancelMeasuring()}}_adjustSize(e){var t;let i=0;const r=null===this._model?null:this._model.model().priceScaleSlotsCount(),n=new Uint32Array(null===r?0:r.left),o=new Uint32Array(null===r?0:r.right),a=(0,Y.getCanvasDevicePixelRatio)(document.body),l=(e,t)=>e+t,c=(e,t)=>{t.forEach(((t,i)=>{e[i]=Math.max(e[i],t)}))},h=this._width(),u=this._height(),p=this._paneSeparators.length,_=this.isMaximizedPane()?0:Ut.height()*p,m=null!==this._timeAxisWidget?this._timeAxisWidget.optimalHeight():0;let g=u-m>=61?m:0;g%2&&(g+=1);const f=Math.max(1,Math.floor((u-_-g)/this._paneWidgets.length));let v=0,S=null;for(const e of this._paneWidgets)if(!this._maximizedPaneWidget||this._maximizedPaneWidget===e){e.leftPriceAxisesContainer().updateCurrencyLabels();const t=e.leftPriceAxisesContainer().optimalWidths();e.rightPriceAxisesContainer().updateCurrencyLabels();const s=e.rightPriceAxisesContainer().optimalWidths();c(n,t),c(o,s),this._maximizedPaneWidget!==e&&e.state().collapsed().value()?v+=Math.min(f,e.collapsedHeight()):(i+=e.stretchFactor(),S=e)}let y=n.reduce(l,0),b=o.reduce(l,0),w=Math.max(h-y-b,0);if(w<=102){y=0,b=0,w=h;for(let e=0;e0){const e=new Ut(this,r-1,r);this._paneSeparators.push(e),this._timeAxisWidget?this._elMainTable.insertBefore(e.getElement(),this._timeAxisWidget.getElement()):this._elMainTable.appendChild(e.getElement())}this._timeAxisWidget?this._elMainTable.insertBefore(i.getElement(),this._timeAxisWidget.getElement()):this._elMainTable.appendChild(i.getElement())}for(let i=0;iD.InvalidationLevel.Cursor&&(null===(i=this._timeAxisWidget)||void 0===i||i.update(),this._applyTimeScaleInvalidations(e,t)),this.paint(e),this._dataWindowWidget){const t=e.maxPaneInvalidation();t===D.InvalidationLevel.Full?this._dataWindowWidget.fullUpdate():t>D.InvalidationLevel.None&&this._dataWindowWidget.update()}for(let t=0;t{i.appendChild(s),s.addEventListener("mousedown",this._beginRequestActive.bind(this)),s.addEventListener("mouseup",this._endRequestActive.bind(this)),s.addEventListener("touchstart",this._beginRequestActive.bind(this)),s.addEventListener("touchmove",this._endRequestActive.bind(this)),s.addEventListener("touchend",this._endRequestActive.bind(this)), -s.addEventListener("click",this._requestActive.bind(this))})),this._inited&&(null!==this._timeAxisWidget&&(this._timeAxisWidget.destroy(),this._timeAxisWidget=null),this._paneWidgets.forEach((e=>{e.destroy()})),this._paneWidgets.length=0,this._paneSeparators.forEach((e=>{e.destroy()})),this._paneSeparators.length=0,this._update(D.InvalidationMask.full(),performance.now()))}_init(){this.hasModel()&&this.model().mainSeries().clearData(),this._initColors(),this._makeDefaultGui();this._makeDefaultModel(),(()=>{this._checkObsoleteTimezone(),this._chartSession&&this._chartSession.connected()&&this.model().model().restart(),this._content&&(this._initColors(),this._updateGui(),this.update()),this._resizeHandler=()=>{this._invalidationHandler(D.InvalidationMask.full())},this._resizeHandler(),(0,r.ensureNotNull)(this._parent).appendChild((0,r.ensureNotNull)(this._mainDiv)),this._spinner&&(this._spinner.stop(),this._spinner=null),this._keydownEventListener=e=>{27===e.which&&e.preventDefault()},window.addEventListener("keydown:chart_"+this._id,this._keydownEventListener),this._activateSymbolSearchHotkeys(),this.model().timeScale().onScroll().subscribe(this,(()=>this._onScroll.fire())),this._inited=!0})()}_makeDefaultModel(){let e;if(this._content&&this._content.timeScale.points){const t=this._content.timeScale.points.items[0];e={startDate:t}}if(!(0,r.ensureNotNull)(this._metaInfoRepository).getInternalMetaInfoArray())throw new Error("Cannot create chart model: studies metainfo is absent");const t=()=>{var t,i;const s={readOnly:this.readOnly(),isSnapshot:!!this._containsData,...a(this._options,["timeScale","crossHair","chartEventsEnabled","esdEnabled","newsEnabled","continuousContractSwitchesEnabled","futuresContractExpirationEnabled","countdownEnabled","lastPriceAnimationEnabled","currencyConversionEnabled","unitConversionEnabled","watermarkEnabled","shiftVisibleRangeOnNewBar","hideIdeas","onWidget"])};let n;n=this._collapsed;const o=function(e,t,i,s,r,n,o,a,l,c,h){const d=new b.ChartUndoModel(e,t,i,s,r,n,o,a,l,c,h);return d.model().fullUpdate(),d}(this._chartSession,this._invalidationHandler,this.properties(),e,(0,r.ensureNotNull)(this._metaInfoRepository),this,this._options.undoHistory,this._options.barsMarksContainersFactory,s,n,null!==(i=null===(t=this._saveChartService)||void 0===t?void 0:t.autoSaveEnabled())&&void 0!==i?i:new(ot())(!0));return this._createSessions(o.model()),o};(0,Be.enabled)("lean_chart_load")?this._model=this._model||t():this._model=t(),this._model.model().setChartSaveTime(1e3*this._chartWidgetCollection.metaInfo.lastModified.value()),this._createVolumeIfNeeded();if(this._content){let e={};Di&&this._initialLoading&&(e={symbol:this._defSymbol,interval:this._defInterval,style:this._defStyle}),this.restoreState(this._content,this._containsData,e),Di&&this._defSymbol&&this.model().model().recalculatePriceRangeOnce()}else this._setActions();this._createLineToolsSynchronizerIfNeeded(),(()=>{const e=(0,r.ensureNotNull)(this._model);e.onTagsChanged().subscribe(this,(()=>this.onModelTagsChanged())), -this._initBackgroundColor(),this._updateGui(),this._modelCreated.fire(e),this._tagsChanged.fire(),Be.enabled("determine_first_data_request_size_using_visible_range")&&this._setFirstRequestNumbarsUsingTimeframeAndInterval(e);const t=e.mainSeries(),i=t.properties().childs();this._defTimeframe&&t.setDefaultTimeframe(this._defTimeframe),t.dataEvents().symbolNotPermitted().subscribe(null,(e=>t.setSymbolParams({symbol:e}))),i.style.unsubscribe(this,this._onChartStyleChanged),i.style.subscribe(this,this._onChartStyleChanged),t.dataEvents().completed().subscribe(this,(()=>this._addPerfMark("SeriesCompleted")),!0),t.dataEvents().barReceived().subscribe(this,(()=>this._addPerfMark("SeriesFirstDataReceived")),!0);this._options;t.dataEvents().chartTypeNotPermitted().subscribe(null,(()=>{t.setSymbolParams({interval:"D"})})),t.dataEvents().intradaySpreadNotPermitted().subscribe(null,(()=>{t.setSymbolParams({interval:"D"})})),t.dataEvents().customIntervalNotPermitted().subscribe(null,(i=>{const s=e.model().defaultResolutions(),r=s.find((e=>(0,oi.compareResolutions)(e,i)>=0)),n=null!=r?r:s[s.length-1];t.setSymbolParams({interval:n})})),t.dataEvents().intradayExchangeNotPermitted().subscribe(null,(()=>{t.setSymbolParams({interval:"D"})})),t.requestingStyleIsNotSupported.subscribe(null,(()=>{const i=t.interval(),s=e.model().defaultResolutions(),r=(0,ni.getLastUsedSingleValueBasedStyle)(),n=(0,oi.getResolutionByChartStyle)(r,i,s);t.setChartStyleWithIntervalIfNeeded(r,n)})),t.requestingStyleSupportRecovered.subscribe(null,(i=>{const s=t.interval(),r=e.model().defaultResolutions(),n=(0,oi.getResolutionByChartStyle)(i,s,r);t.setChartStyleWithIntervalIfNeeded(i,n)}))})()}_startSpinner(e){this._spinner||e&&(this._spinner=(new v).spin(e))}_handleLoginStateChanged(){0}_checkObsoleteTimezone(){const e=this.properties().childs().timezone.value();(0,mi.timezoneIsAvailable)(e)||this.properties().childs().timezone.setValue({UTC:"Etc/UTC",EST:"America/New_York",CST:"America/Chicago",PST:"America/Los_Angeles"}[e]||"exchange")}_initColors(){const e=this.properties().childs(),t=e.scalesProperties.childs();t.lineColor.listeners().subscribe(this,this._updateAndPaint),t.textColor.listeners().subscribe(this,this._updateAndPaint),e.paneProperties.childs().separatorColor.listeners().subscribe(this,this._setPaneSeparatorLineColor)}_setPaneSeparatorLineColor(){this._paneSeparators.forEach((e=>e.update())),this._updateAndPaint()}_updateAndPaint(){this.update(),this.paint()}_makeDefaultGui(){this._makeLoadingScreen(),this.hasModel()&&(this._makeTimeAxisWidget(),this._makePaneWidgetsAndSeparators()),this._adjustSize(),this._updateScalesActions(),(0,Y.disableSelection)(this._elMainTable),this.update(),this.paint()}_makeLoadingScreen(){if(Be.enabled("lean_chart_load")){if(this.screen)return;this.screen=new Si(this,(0,r.ensureNotNull)(this._parent))}else this.screen=new Si(this,(0,r.ensureNotNull)(this._mainDiv))}_makeAvailableOnTVPopup(){throw new Error("Not implemented")}_activateSymbolSearchHotkeys(){this.readOnly()||this._options.hideSymbolSearch||(0, +e&&e.panesOrderInvalidated()&&d.emit("panes_order_changed")}_onMousewheel(e){if(!this.model().model().zoomEnabled()||null===this._mouseWheelHelper)return;if(!(0,c.onWidget)()&&parent&&parent!==window&&parent.IS_DEMO_PAGE)return;if(null===this._model)return;if(this.model().timeScale().isEmpty())return;const t=this._mouseWheelHelper.processWheel(e),i=t.deltaX,s=-t.deltaY;if(0!==i&&this._options.handleScroll.mouseWheel||0!==s&&this._options.handleScale.mouseWheel){if(e.cancelable&&e.preventDefault(),0!==s&&this._options.handleScale.mouseWheel){const t=Math.sign(s)*Math.min(1,Math.abs(s)),i=(0,r.ensureNotNull)(this._mainDiv).getBoundingClientRect(),n=e.clientX-this._lhsAxesWidth-i.left;if(!Number.isFinite(n)||!Number.isFinite(t))return void Bi.logWarn("Incorrect mouse wheel processing: scrollPosition: "+n+", zoomScale: "+t);const o=new U.EnvironmentState(e).mod();this.model().model().zoomTime(n,t,!!o||void 0),this._onZoom.fire(o)}0!==i&&this._options.handleScroll.mouseWheel&&this.model().scrollChart(-80*i)}}_updateGui(e){this._model&&(this._makeTimeAxisWidget(),this._makePaneWidgetsAndSeparators(),this._elMainTable.style.userSelect="none",this._adjustSize(e))}_setElement(e){if(this._mainDiv){this._mainDiv.remove();const e=document.createRange();e.selectNodeContents((0,r.ensureNotNull)(this._parent)),e.deleteContents()}this._controlBarNavigation&&(this._controlBarNavigation.destroy(),this._controlBarNavigation=null),null!==this._removeMaximizeHotkey&&this._removeMaximizeHotkey(),this._removeMaximizeHotkey=this._initMaximizeHotkey(e);const t=e.ownerDocument,i=t.createElement("div");i.classList.add("chart-container-border"),e.insertBefore(i,e.firstChild),this._parent=i;const s=t.createElement("div");if(s.classList.add("chart-widget"),this._mainDiv=s,this._elTooltipDiv=t.createElement("div"),this._elTooltipDiv.className="tooltip-wrapper",this._mainDiv.appendChild(this._elTooltipDiv),this._elMainTable=t.createElement("table"),this._elMainTable.className="chart-markup-table",this._elMainTable.setAttribute("cellpading","0"),this._elMainTable.setAttribute("cellspacing","0"),this._mainDiv.appendChild(this._elMainTable),this._hotkeysListener&&this._hotkeysListener.destroy(),this._errorRenderer.setContainer(this._parent),this._hotkeysListener=new ft.ChartHotkeysListener(this,this._mainDiv),(this._options.controlBarEnabled||(0,Ve.enabled)("control_bar"))&&this._createControlBar(),this._options.handleScale.mouseWheel||this._options.handleScroll.mouseWheel){this._mouseWheelHelper=new ke;const e=this._onMousewheel.bind(this);this._onWheelBound=e,this._mainDiv.addEventListener("wheel",e,{passive:!1})}this.resize(),this._justActivated=!1,this.withModel(this,(()=>{i.appendChild(s),s.addEventListener("mousedown",this._beginRequestActive.bind(this)),s.addEventListener("mouseup",this._endRequestActive.bind(this)),s.addEventListener("touchstart",this._beginRequestActive.bind(this)),s.addEventListener("touchmove",this._endRequestActive.bind(this)),s.addEventListener("touchend",this._endRequestActive.bind(this)), +s.addEventListener("click",this._requestActive.bind(this))})),this._inited&&(null!==this._timeAxisWidget&&(this._timeAxisWidget.destroy(),this._timeAxisWidget=null),this._paneWidgets.forEach((e=>{e.destroy()})),this._paneWidgets.length=0,this._paneSeparators.forEach((e=>{e.destroy()})),this._paneSeparators.length=0,this._update(D.InvalidationMask.full(),performance.now()))}_init(){this.hasModel()&&this.model().mainSeries().clearData(),this._initColors(),this._makeDefaultGui();this._makeDefaultModel(),(()=>{this._checkObsoleteTimezone(),this._chartSession&&this._chartSession.connected()&&this.model().model().restart(),this._content&&(this._initColors(),this._updateGui(),this.update()),this._resizeHandler=()=>{this._invalidationHandler(D.InvalidationMask.full())},this._resizeHandler(),(0,r.ensureNotNull)(this._parent).appendChild((0,r.ensureNotNull)(this._mainDiv)),this._spinner&&(this._spinner.stop(),this._spinner=null),this._keydownEventListener=e=>{27===e.which&&e.preventDefault()},window.addEventListener("keydown:chart_"+this._id,this._keydownEventListener),this._activateSymbolSearchHotkeys(),this.model().timeScale().onScroll().subscribe(this,(()=>this._onScroll.fire())),this._inited=!0})()}_makeDefaultModel(){let e;if(this._content&&this._content.timeScale.points){const t=this._content.timeScale.points.items[0];e={startDate:t}}if(!(0,r.ensureNotNull)(this._metaInfoRepository).getInternalMetaInfoArray())throw new Error("Cannot create chart model: studies metainfo is absent");const t=()=>{var t,i;const s={readOnly:this.readOnly(),isSnapshot:!!this._containsData,...a(this._options,["timeScale","crossHair","chartEventsEnabled","esdEnabled","newsEnabled","continuousContractSwitchesEnabled","futuresContractExpirationEnabled","countdownEnabled","lastPriceAnimationEnabled","currencyConversionEnabled","unitConversionEnabled","watermarkEnabled","shiftVisibleRangeOnNewBar","hideIdeas","onWidget"])};let n;n=this._collapsed;const o=function(e,t,i,s,r,n,o,a,l,c,h){const d=new b.ChartUndoModel(e,t,i,s,r,n,o,a,l,c,h);return d.model().fullUpdate(),d}(this._chartSession,this._invalidationHandler,this.properties(),e,(0,r.ensureNotNull)(this._metaInfoRepository),this,this._options.undoHistory,this._options.barsMarksContainersFactory,s,n,null!==(i=null===(t=this._saveChartService)||void 0===t?void 0:t.autoSaveEnabled())&&void 0!==i?i:new(ot())(!0));return this._createSessions(o.model()),o};(0,Ve.enabled)("lean_chart_load")?this._model=this._model||t():this._model=t(),this._model.model().setChartSaveTime(1e3*this._chartWidgetCollection.metaInfo.lastModified.value()),this._createVolumeIfNeeded();if(this._content){let e={};Di&&this._initialLoading&&(e={symbol:this._defSymbol,interval:this._defInterval,style:this._defStyle}),this.restoreState(this._content,this._containsData,e),Di&&this._defSymbol&&this.model().model().recalculatePriceRangeOnce()}else this._setActions();this._createLineToolsSynchronizerIfNeeded(),(()=>{const e=(0,r.ensureNotNull)(this._model);e.onTagsChanged().subscribe(this,(()=>this.onModelTagsChanged())), +this._initBackgroundColor(),this._updateGui(),this._modelCreated.fire(e),this._tagsChanged.fire(),Ve.enabled("determine_first_data_request_size_using_visible_range")&&this._setFirstRequestNumbarsUsingTimeframeAndInterval(e);const t=e.mainSeries(),i=t.properties().childs();this._defTimeframe&&t.setDefaultTimeframe(this._defTimeframe),t.dataEvents().symbolNotPermitted().subscribe(null,(e=>t.setSymbolParams({symbol:e}))),i.style.unsubscribe(this,this._onChartStyleChanged),i.style.subscribe(this,this._onChartStyleChanged),t.dataEvents().completed().subscribe(this,(()=>this._addPerfMark("SeriesCompleted")),!0),t.dataEvents().barReceived().subscribe(this,(()=>this._addPerfMark("SeriesFirstDataReceived")),!0);this._options;t.dataEvents().chartTypeNotPermitted().subscribe(null,(()=>{t.setSymbolParams({interval:"D"})})),t.dataEvents().intradaySpreadNotPermitted().subscribe(null,(()=>{t.setSymbolParams({interval:"D"})})),t.dataEvents().customIntervalNotPermitted().subscribe(null,(i=>{const s=e.model().defaultResolutions(),r=s.find((e=>(0,oi.compareResolutions)(e,i)>=0)),n=null!=r?r:s[s.length-1];t.setSymbolParams({interval:n})})),t.dataEvents().intradayExchangeNotPermitted().subscribe(null,(()=>{t.setSymbolParams({interval:"D"})})),t.requestingStyleIsNotSupported.subscribe(null,(()=>{const i=t.interval(),s=e.model().defaultResolutions(),r=(0,ni.getLastUsedSingleValueBasedStyle)(),n=(0,oi.getResolutionByChartStyle)(r,i,s);t.setChartStyleWithIntervalIfNeeded(r,n)})),t.requestingStyleSupportRecovered.subscribe(null,(i=>{const s=t.interval(),r=e.model().defaultResolutions(),n=(0,oi.getResolutionByChartStyle)(i,s,r);t.setChartStyleWithIntervalIfNeeded(i,n)}))})()}_startSpinner(e){this._spinner||e&&(this._spinner=(new v).spin(e))}_handleLoginStateChanged(){0}_checkObsoleteTimezone(){const e=this.properties().childs().timezone.value();(0,mi.timezoneIsAvailable)(e)||this.properties().childs().timezone.setValue({UTC:"Etc/UTC",EST:"America/New_York",CST:"America/Chicago",PST:"America/Los_Angeles"}[e]||"exchange")}_initColors(){const e=this.properties().childs(),t=e.scalesProperties.childs();t.lineColor.listeners().subscribe(this,this._updateAndPaint),t.textColor.listeners().subscribe(this,this._updateAndPaint),e.paneProperties.childs().separatorColor.listeners().subscribe(this,this._setPaneSeparatorLineColor)}_setPaneSeparatorLineColor(){this._paneSeparators.forEach((e=>e.update())),this._updateAndPaint()}_updateAndPaint(){this.update(),this.paint()}_makeDefaultGui(){this._makeLoadingScreen(),this.hasModel()&&(this._makeTimeAxisWidget(),this._makePaneWidgetsAndSeparators()),this._adjustSize(),this._updateScalesActions(),(0,Y.disableSelection)(this._elMainTable),this.update(),this.paint()}_makeLoadingScreen(){if(Ve.enabled("lean_chart_load")){if(this.screen)return;this.screen=new Si(this,(0,r.ensureNotNull)(this._parent))}else this.screen=new Si(this,(0,r.ensureNotNull)(this._mainDiv))}_makeAvailableOnTVPopup(){throw new Error("Not implemented")}_activateSymbolSearchHotkeys(){this.readOnly()||this._options.hideSymbolSearch||(0, gi.activateKeyPressHandler)()}_makeTimeAxisWidget(){if(this._timeAxisWidget)return void this._timeAxisWidget.updatePriceAxisStubs();const e=this.model();this._timeAxisWidget=new Kt(this,this._options.timeScaleWidget,this._titlesProvider.bind(this),this._menuItemsProvider.bind(this),this._backgroundBasedTheme),this._elMainTable.appendChild(this._timeAxisWidget.getElement()),this._timeAxisWidget.updatePriceAxisStubs(),this._timeAxisWidget.onLabelHovered().subscribe(this,((t,i)=>{const s=this._maximizedPaneWidget?this._maximizedPaneWidget.state():e.paneForSource(e.mainSeries()),n=(0,r.ensureNotNull)(this.paneByState((0,r.ensureNotNull)(s))).highlightedPriceAxis(),o=n.value();(i||o.owner===t.owner)&&(n.setValue({owner:t.owner,axis:i?t.axis:null}),this.model().model().lightUpdate())}))}_titlesProvider(e,t){const i=this.model(),s=(0,r.ensureNotNull)(this._maximizedPaneWidget?this._maximizedPaneWidget.state():i.paneForSource(i.mainSeries())),n="right"===e?s.rightPriceScales():s.leftPriceScales();if(n.lengthe===i.mainSeries()||(0,k.isStudy)(e)));return o.reverse(),o=(0,yi.moveToHead)(o,i.mainSeries()),o.map((e=>e.title(!0,void 0,!1)))}_menuItemsProvider(e,t){const i=this.model(),s=(0,r.ensureNotNull)(this._maximizedPaneWidget?this._maximizedPaneWidget.state():i.paneForSource(i.mainSeries())),n="right"===e?s.visibleRightPriceScales():s.visibleLeftPriceScales();if(n.length{this._addPerfMark("RequestMetadataEnd"), -this._inited?this.model().model().setStudiesMetaData(e.getInternalMetaInfoArray(),e.getMigrations()):(this._init(),this._chartWidgetInitialized.fire(),Be.enabled("charting_library_base")||Vi.logDebug("initialized"))}))}async _createControlBar(){const e=await Promise.all([i.e(6847),i.e(5916),i.e(2215),i.e(5093)]).then(i.bind(i,3791));this._controlBarNavigation=new e.ControlBarNavigation(this,(0,r.ensureNotNull)(this._mainDiv),this._options.controlBar),this._model&&this._adjustSize()}_subscribeToDrawingState(){if(this._options.readOnly)return;(0,G.init)();const e=(e,t)=>{const i=this._model;if(null===i)return;const s=i.model();e.model!==s&&(this._lineToolsSynchronizer?this._lineToolsSynchronizer.executeSyncedAction((()=>t(s,i))):t(s,i))};G.createdLineTool.subscribe(null,(t=>{e(t,((e,i)=>{const s=(0,r.ensureNotNull)(e.paneForSource(e.mainSeries()));let n,o=null;if(void 0===t.pointPositionPercents){if(o=Ni(e,t.model,t.point.timeStamp),null===o)return;n=t.point.price}else{const i=t.pointPositionPercents.x*e.timeScale().width(),s=e.mainSeries().priceScale(),r=t.pointPositionPercents.y*s.height(),a=e.mainSeries().firstValue();if(null===a)return;o=e.timeScale().coordinateToIndex(i),n=s.coordinateToPrice(r,a)}const a={index:(0,r.ensureNotNull)(o),price:n},l=i.createLineTool({pane:s,point:a,linetool:t.linetool,properties:t.properties,linkKey:t.linkKey,ownerSource:e.mainSeries(),disableSynchronization:!0,id:t.id});null!==l&&!Boolean(this.model().lineBeingCreated())&&t.finalState&&l.restoreExternalPoints(t.finalState,{indexesChanged:!0,pricesChanged:!0})}))})),G.continuedLineTool.subscribe(null,(t=>{e(t,((e,i)=>{var s;const r=Ni(e,t.model,t.point.timeStamp);if(null===r)return;const n={index:r,price:t.point.price},o=e.lineBeingCreated();if(null===o)return;i.continueExternalLine(n,null!==(s=t.envState)&&void 0!==s?s:void 0,!!t.finalState)&&t.finalState&&o.restoreExternalPoints(t.finalState,{indexesChanged:!0,pricesChanged:!0})}))})),G.cancelledLineTool.subscribe(null,(t=>{e(t,((e,t)=>{e.cancelCreatingLine()}))})),G.beenSetLineToolLastPoint.subscribe(null,(t=>{e(t,((e,i)=>{const s=e.lineBeingCreated();if(null===s||s.linkKey().value()!==t.linkKey)return;const r=Ni(e,t.model,t.point.timeStamp);if(null===r)return;const n={index:r,price:t.point.price};s.setLastPoint(n),s.updateAllViews((0,yt.sourceChangeEvent)(s.id())),e.lightUpdate()}))})),G.startedMovingLineTool.subscribe(null,(t=>{e(t,((e,i)=>{var s;const r=t.linkKeys.map(L.lineToolByLinkKey.bind(null,e)).filter(S.notNull);if(r.length){const i=Ni(e,t.model,t.point.timeStamp);if(null===i)return;const n={index:i,price:t.point.price},o=null!==(s=t.activeItem)&&void 0!==s?s:null,a=r[0].pointToScreenPoint(n);a&&e.startMovingSources(r,{logical:n,screen:a},o,t.pointPositionPercents,null===t.envState?void 0:t.envState,!0)}}))})),G.movedLineTool.subscribe(null,(t=>{e(t,((e,i)=>{var s;const r=e.sourcesBeingMoved().filter(L.isLineTool).filter((e=>(e=>t.linkKeys.some((t=>e.linkKey().value()===t)))(e)));if(!r.length)return;const n=Ni(e,t.model,t.point.timeStamp);if(null===n)return;const o={ +this._inited?this.model().model().setStudiesMetaData(e.getInternalMetaInfoArray(),e.getMigrations()):(this._init(),this._chartWidgetInitialized.fire(),Ve.enabled("charting_library_base")||Bi.logDebug("initialized"))}))}async _createControlBar(){const e=await Promise.all([i.e(7257),i.e(5916),i.e(8180),i.e(5093)]).then(i.bind(i,3791));this._controlBarNavigation=new e.ControlBarNavigation(this,(0,r.ensureNotNull)(this._mainDiv),this._options.controlBar),this._model&&this._adjustSize()}_subscribeToDrawingState(){if(this._options.readOnly)return;(0,G.init)();const e=(e,t)=>{const i=this._model;if(null===i)return;const s=i.model();e.model!==s&&(this._lineToolsSynchronizer?this._lineToolsSynchronizer.executeSyncedAction((()=>t(s,i))):t(s,i))};G.createdLineTool.subscribe(null,(t=>{e(t,((e,i)=>{const s=(0,r.ensureNotNull)(e.paneForSource(e.mainSeries()));let n,o=null;if(void 0===t.pointPositionPercents){if(o=Ni(e,t.model,t.point.timeStamp),null===o)return;n=t.point.price}else{const i=t.pointPositionPercents.x*e.timeScale().width(),s=e.mainSeries().priceScale(),r=t.pointPositionPercents.y*s.height(),a=e.mainSeries().firstValue();if(null===a)return;o=e.timeScale().coordinateToIndex(i),n=s.coordinateToPrice(r,a)}const a={index:(0,r.ensureNotNull)(o),price:n},l=i.createLineTool({pane:s,point:a,linetool:t.linetool,properties:t.properties,linkKey:t.linkKey,ownerSource:e.mainSeries(),disableSynchronization:!0,id:t.id});null!==l&&!Boolean(this.model().lineBeingCreated())&&t.finalState&&l.restoreExternalPoints(t.finalState,{indexesChanged:!0,pricesChanged:!0})}))})),G.continuedLineTool.subscribe(null,(t=>{e(t,((e,i)=>{var s;const r=Ni(e,t.model,t.point.timeStamp);if(null===r)return;const n={index:r,price:t.point.price},o=e.lineBeingCreated();if(null===o)return;i.continueExternalLine(n,null!==(s=t.envState)&&void 0!==s?s:void 0,!!t.finalState)&&t.finalState&&o.restoreExternalPoints(t.finalState,{indexesChanged:!0,pricesChanged:!0})}))})),G.cancelledLineTool.subscribe(null,(t=>{e(t,((e,t)=>{e.cancelCreatingLine()}))})),G.beenSetLineToolLastPoint.subscribe(null,(t=>{e(t,((e,i)=>{const s=e.lineBeingCreated();if(null===s||s.linkKey().value()!==t.linkKey)return;const r=Ni(e,t.model,t.point.timeStamp);if(null===r)return;const n={index:r,price:t.point.price};s.setLastPoint(n),s.updateAllViews((0,yt.sourceChangeEvent)(s.id())),e.lightUpdate()}))})),G.startedMovingLineTool.subscribe(null,(t=>{e(t,((e,i)=>{var s;const r=t.linkKeys.map(L.lineToolByLinkKey.bind(null,e)).filter(S.notNull);if(r.length){const i=Ni(e,t.model,t.point.timeStamp);if(null===i)return;const n={index:i,price:t.point.price},o=null!==(s=t.activeItem)&&void 0!==s?s:null,a=r[0].pointToScreenPoint(n);a&&e.startMovingSources(r,{logical:n,screen:a},o,t.pointPositionPercents,null===t.envState?void 0:t.envState,!0)}}))})),G.movedLineTool.subscribe(null,(t=>{e(t,((e,i)=>{var s;const r=e.sourcesBeingMoved().filter(L.isLineTool).filter((e=>(e=>t.linkKeys.some((t=>e.linkKey().value()===t)))(e)));if(!r.length)return;const n=Ni(e,t.model,t.point.timeStamp);if(null===n)return;const o={ index:n,price:t.point.price},a=r[0].pointToScreenPoint(o);a&&e.moveSources({logical:o,screen:a},t.pointPositionPercents,null!==(s=t.envState)&&void 0!==s?s:void 0,!0)}))})),G.finishedMovingLineTool.subscribe(null,(t=>{e(t,((e,i)=>{const s=e.sourcesBeingMoved().filter(L.isLineTool);if(0===s.length)return;s.forEach((i=>{const s=(e=>{for(let i=0;i{e(t,((e,i)=>{var s;const r=(0,L.lineToolByLinkKey)(e,t.linkKey);if(null!==r){const i=r.getPoint(t.pointIndex),n=i?i.index:Ni(e,t.model,t.point.timeStamp);if(null===n)return;if(r.isActualSymbol()&&r.isActualCurrency()&&r.isActualUnit()){const i={index:n,price:t.point.price};e.startChangingLinetool(r,i,t.pointIndex,null!==(s=t.envState)&&void 0!==s?s:void 0,!0)}}}))})),G.changedLineTool.subscribe(null,(t=>{e(t,((e,i)=>{const s=e.lineBeingEdited();if(null===s||s.linkKey().value()!==t.linkKey)return;let n=null;if(n=t.changes.indexesChanged?Ni(e,t.model,t.point.timeStamp):(0,r.ensureNotNull)(e.linePointBeingChanged()).index,null!==n&&s.isActualSymbol()&&s.isActualCurrency()&&s.isActualUnit()){const i={index:n,price:t.point.price};e.changeLinePoint(i,void 0,!0)}}))})),G.finishedChangingLineTool.subscribe(null,(t=>{e(t,((e,i)=>{const s=(0,L.lineToolByLinkKey)(e,t.linkKey);null!==s&&s.isActualSymbol()&&s.isActualCurrency()&&s.isActualUnit()&&null!==e.lineBeingEdited()&&e.endChangingLinetool(!!t.finalState,!0),null!==s&&t.finalState&&s.restoreExternalPoints(t.finalState,t.changes)}))})),G.removedLineTool.subscribe(null,(t=>{e(t,((e,i)=>{const{withUndo:s,unlink:r,linkKey:n}=t,o=(0,L.lineToolByLinkKey)(e,n);if(null!==o)r&&o.detachAlert(),s?i.removeSource(o,!1):e.removeSource(o);else if(this._lineToolsSynchronizer){const{sourceTitle:e,symbol:o,lineToolState:a}=t;i.removeUnloadedLineTool({lineToolsSynchronizer:this._lineToolsSynchronizer,state:a,unlink:r,sourceTitle:e,linkKey:n,symbol:o,withUndo:s})}}))})),G.finishedLineTool.subscribe(null,(t=>{e(t,((e,i)=>{const s=(0,L.lineToolByLinkKey)(e,t.linkKey);null!==s&&(0,dt.isLineToolFinishRequiredWhenCreatedByApi)(s.toolname)&&s.finish()}))})),G.changedLineStyle.subscribe(null,(t=>{e(t,((e,i)=>{const s=(0,L.lineToolByLinkKey)(e,t.linkKey);null!==s&&(s.restoreExternalState(t.state),s.propertiesChanged(!0),t.alertId&&s.syncAlert(t.alertId))}))})),G.restoredLineToolState.subscribe(null,(t=>{e(t,((e,i)=>{const s=(0,L.lineToolByLinkKey)(e,t.linkKey);if(null!==s){const i={...t.state};i.indexes=t.state.points.map((i=>({index:Ni(e,t.model,i.time_t),price:i.price}))),e.restoreLineToolState(s,i,!1)}}))})),G.restoredLineTool.subscribe(null,(t=>{e(t,((e,i)=>{e.restoreSource(t.state.restorePane,t.state.paneIndex,t.state.paneState,t.state.sourceState,null)}))})),G.copiedLineTool.subscribe(null,(t=>{ -e(t,((e,i)=>{const s=(0,r.ensureNotNull)(e.paneForSource(e.mainSeries()));let n;const o={...t.state,intervalsVisibilities:(0,bi.mergeIntervalVisibilitiesDefaults)(t.state.intervalsVisibilities)},a=(0,L.createLineToolProperties)(t.linetool,o,e),l=e.dataSourceForId(t.id);if(l){if(!(0,L.isLineTool)(l))return void Vi.logError(`Error sync creating line tool. Object with id ${t.id} is already in use and it is not a line tool`);if(l.toolname!==t.linetool)return void Vi.logError(`Error sync creating line tool. Object with id ${t.id} is already in use and its type differs: ${l.toolname} and ${t.linetool}`)}if(l&&(l.linkKey().setValue(t.linkKey),l.share(t.sharingMode)),t.pointPositionPercents){const e={index:0,price:0};if(n=null!=l?l:i.createLineTool({pane:s,point:e,linetool:t.linetool,properties:a,linkKey:t.linkKey,disableSynchronization:!0,id:t.id}),null===n)return;n.restorePositionPercents((0,r.ensureDefined)(t.pointPositionPercents))}else{const o=t.points.map((i=>({index:(0,r.ensureNotNull)(Ni(e,t.model,i.timeStamp)),price:i.price}))),c=o[0];if(n=null!=l?l:i.createLineTool({pane:s,point:c,linetool:t.linetool,properties:a,linkKey:t.linkKey,sharingMode:t.sharingMode,disableSynchronization:!0,id:t.id}),null===n)return;if(e.lineBeingCreated())for(let e=1;e0){const i=Math.ceil(e.timeScale().width()/t.barCount);e.timeScale().setBarSpacing(i)}}}},59595:(e,t,i)=>{"use strict";i.r(t),i.d(t,{allInitialModelsCreated:()=>Yt,allInitialSymbolsResolved:()=>$t,applyIndicatorToAllChartsImpl:()=>at,applyIndicatorsToAllChartsImpl:()=>ot,applyLineToolUpdateNotificationImpl:()=>mt,applyThemeImpl:()=>Zt,chartsSymbolsImpl:()=>vt,checkProFeatureImpl:()=>Kt,computeContentBoxImpl:()=>Mt,copyScreenshotToClipboard:()=>Ct,createBroadcastChannel:()=>jt,createChartStorageSubscriptionsIfRequired:()=>St,createClipboardHandler:()=>gt,createLeftBottomChartWidgetWV:()=>Tt,deserializedChartIds:()=>pt,destroyBroadcastChannel:()=>Gt,downloadScreenshot:()=>wt,generateNewChartId:()=>Bt,getAsyncStateForChartImpl:()=>dt,getClientSnapshot:()=>It,getSnapshot:()=>xt,getStateForChartImpl:()=>ht,getVisuallyAdjacentDefImpl:()=>Dt,handleConnectionLimitReachedChanged:()=>oi,handleDateRangeLockChange:()=>si,handleDeviceConnectionClosed:()=>ai,handleInternalDateRangeLockChange:()=>ii,handleInternalIntervalLockChange:()=>ei,handleInternalSymbolLockChange:()=>Jt,handleInternalTrackTimeLockChange:()=>ri,handleIntervalLockChange:()=>ti,handleSymbolLockChange:()=>Qt,handleTrackTimeLockChange:()=>ni,hideChartImpl:()=>Ft,isFirstChartInLayout:()=>ut,lineToolsAndGroupsDTOsImpl:()=>ct,removeChartWidgetSubscriptionsImpl:()=>Wt,resetLineToolsInvalidatedImpl:()=>_t,setBrokerImpl:()=>ft,setChartLayoutWithUndoImpl:()=>Xt,setLayoutImpl:()=>Ht,syncCrosshairImpl:()=>Ut,syncScrollImpl:()=>qt,takeScreenshot:()=>yt,takeServerScreenshot:()=>bt,updateLayoutImpl:()=>Et,updateLayoutPartialImpl:()=>kt});var s=i(50151),r=i(86441),n=i(98351),o=i(44352),a=i(47539),l=i(49483),c=i(2484);function h(e){const t={};return{promise:new Promise(((i,s)=>{e.subscribe(t,i,!0)})),destroy:()=>{e.unsubscribeAll(t)}}}i(90981);var d=i(71733);class u extends d.UndoCommand{constructor(e,t){super(null),this._chartModel=e,this._targetIndex=t}redo(){const e=this._chartModel.createPane(this._targetIndex,void 0,this._paneId);this._paneId=e.id()}undo(){const e=(0,s.ensureDefined)(this._paneId),t=this._chartModel.panes().find((t=>t.id()===e)) -;void 0!==t&&this._chartModel.removePane(t)}createdPaneId(){return this._paneId}}class p extends d.UndoCommand{constructor(e,t,i,s){super(s),this._setter=e,this._oldValue=t,this._newValue=i}redo(){this._setter(this._newValue)}undo(){this._setter(this._oldValue)}}class _ extends p{constructor(e,t,i,s){super((e=>this._vwState.setValue(e)),t,i,s),this._vwState=e}}var m=i(10381),g=i(65446),f=i(93352);const v=(0,n.getLogger)("Clipboard");class S{constructor(e){this._e=e}write(e){return(0,g.writeImpl)(this._toRaw(e),this._e)}_toRaw(e){const t={files:[]};t.text=e.text,void 0!==e.app?t.html=this._serializeAppData(e.app,e.text):e.html&&(t.html=e.html);for(const i of e.files||[])t.files.push(i);return t}_serializeAppData(e,t){return`${t?(0,m.htmlEscape)(t.slice(0,256)):"📈"}`}}class y{constructor(e){this._e=e}async read(){this._e&&0===this._e.eventPhase&&(v.logWarn("Cannot use an already dispatched ClipboardEvent for reading"),this._e=null);const e=this._e?this._readUsingEvent(this._e):await this._readUsingApi();return this._fromRaw(e)}_readUsingEvent(e){const t=(0,s.ensure)(e.clipboardData);e.preventDefault();const i={files:[]};for(let e=0;e0&&(t.files=e.files),t}_parseAppData(e){if(-1===e.slice(0,1024).indexOf("data-tradingview-clip"))return;const t=(new DOMParser).parseFromString(e,"text/html").querySelector("[data-tradingview-clip]");return t?t.getAttribute("data-tradingview-clip")||"":void 0}_readBlobAsText(e){return new Promise(((t,i)=>{const s=new FileReader;s.onloadend=()=>{t(s.result)},s.onerror=()=>{i(s.error)},s.readAsText(e)}))}}var b=i(35749);function w(e){const t=e.target;return null!==t&&1===t.nodeType&&(0,b.isTextEditingField)(t)}function C(e){const t=e.target;if(null===t)return!1;const i=(t.ownerDocument||t).getSelection();return null!==i&&!i.isCollapsed}class P extends class{constructor(e){this._callbacks=Object.assign({},e),this._boundOnCopy=this._onCopyEv.bind(this),this._boundOnCut=this._onCutEv.bind(this),this._boundOnPaste=this._onPasteEv.bind(this)}listen(){document.addEventListener("copy",this._boundOnCopy),document.addEventListener("cut",this._boundOnCut), -document.addEventListener("paste",this._boundOnPaste)}async peek(){if("granted"!==(await navigator.permissions.query({name:"clipboard-read"})).state)throw new Error("clipboard-read is not granted");return new y(null).read()}uiRequestCopy(e){this._callbacks.copyRequested&&this._callbacks.copyRequested(new S(null),e)}uiRequestCut(e){this._callbacks.cutRequested&&this._callbacks.cutRequested(new S(null),e)}uiRequestPaste(e){this._callbacks.pasteRequested&&this._callbacks.pasteRequested(new y(null),e)}destroy(){document.removeEventListener("copy",this._boundOnCopy),document.removeEventListener("cut",this._boundOnCut),document.removeEventListener("paste",this._boundOnPaste)}_onCopyEv(e){e.defaultPrevented||this._callbacks.copyRequested&&this._callbacks.copyRequested(new S(e))}_onCutEv(e){e.defaultPrevented||this._callbacks.cutRequested&&this._callbacks.cutRequested(new S(e))}_onPasteEv(e){e.defaultPrevented||this._callbacks.pasteRequested&&this._callbacks.pasteRequested(new y(e))}}{_onCopyEv(e){if(!w(e)&&!C(e))return super._onCopyEv(e)}_onCutEv(e){if(!w(e)&&!C(e))return super._onCutEv(e)}_onPasteEv(e){if(!w(e))return super._onPasteEv(e)}}const T=()=>i.e(4389).then(i.bind(i,33646));function x(e,t={}){return T().then((i=>i.copyToClipboardImageOfChart(e,t)))}function I(e,t={}){return T().then((i=>i.getImageOfChartSilently(e,t)))}var M=i(76422),A=i(84015),L=i(8840),k=i(57737),E=i(27714),D=i(24377),V=i(26843),B=i(93975),R=i(83499),N=i(17364),O=i(95242),F=i(10123),W=i(76351);const H=!c.enabled("widget_logo");function z(e,t=null,i=null){let s={};if("number"==typeof e)return{relativePositions:{[e]:{l:t,t:i}},nextElementLeft:e,nextElementTop:e};const[r,...n]=e;if("v"===r){let e=null;for(const r of n){const n=z(r,t,i);s={...s,...n.relativePositions},i=n.nextElementTop,e=n.nextElementLeft}t=e}if("h"===r){let e=null;for(const r of n){const n=z(r,t,i);s={...s,...n.relativePositions},t=n.nextElementLeft,e=n.nextElementTop}i=e}return{relativePositions:s,nextElementTop:i,nextElementLeft:t}}const U=function(e){const t={};for(const i of Object.keys(e)){const s=z(e[i]).relativePositions;t[i]=s}return t}(F);function j(e,t,i,s){let r=Math.round(10*s),n=Math.round(10*s);const o=i[e];if(null!==o.l){const e=j(o.l,t,i,s);r=e.x+e.width+Math.round(5*s)}if(null!==o.t){const e=j(o.t,t,i,s);n=e.y+e.height+Math.round(5*s)}const a=t[e];return{x:r,y:n,width:a.width,height:a.height}}function G(e,t,i){var s;const r=(new DOMParser).parseFromString(W,"image/svg+xml");null===(s=null==r?void 0:r.firstElementChild)||void 0===s||s.setAttribute("color",i);const n=URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(r)],{type:"image/svg+xml"}));return new Promise((i=>{const s=new Image;s.width=e,s.height=t,s.onload=()=>{i({image:s,width:e,height:t})},s.src=n}))}function q(e,t,i,s,r){e.save(),e.drawImage(s.image,t,i,s.width,s.height),e.textBaseline="bottom";const n=(t+s.width)/r+3,o=(i+s.height)/r;(0,R.drawScaled)(e,r,(()=>{e.fillText("TradingView",n,o)})),e.restore()}function $(e,t,i,s){return(0,R.drawScaled)(e,s,(()=>{e.fillText(i,t.x/s,t.y/s)})), -e.measureText(i).width*s}function Y(e,t,i,s,n,o){const a=n.map((e=>e.text)).join("");let l=i.x;const c=function(e,t,i,s){if(e.measureText(t).width*s<=i)return{text:t,elided:!1};const r=e.measureText("...").width*s,n=[];for(let e=0;ee.measureText(t.slice(0,o+1)).width*s+r>i));return{text:(t=t.slice(0,o)).trim(),elided:!0}}(e,a,s-l,t);if(c.elided&&!o)return null;const h=[];let d=0;for(const e of n){if(d+e.text.length>c.text.length)break;h.push(e.text),d+=e.text.length}const u=h.join("").trim().length;d=0;for(const s of n){if(d+s.text.length>u)break;s.color&&(e.save(),e.fillStyle=s.color),l+=$(e,new r.Point(l,i.y),s.text,t),s.color&&e.restore(),d+=s.text.length}return c.elided&&(l+=$(e,new r.Point(l,i.y),"...",t)),l}function K(e){return e.map((e=>({...e,title:""})))}function X(e,t){const i=[{text:e.trim()}];for(const e of t)e.visible&&(""!==i[i.length-1].text&&i.push({text:" "}),e.title&&i.push({text:e.title}),i.push({text:e.value,color:e.color}));return i}class Z{constructor(e,t){this._logoTextColor=null,this._snapshotData=e,t=t||{},this._options={backgroundColor:L.themes[e.theme].getThemedColor("color-bg-primary"),borderColor:L.themes[e.theme].getThemedColor("color-border"),font:N.CHART_FONT_FAMILY,fontSize:12,legendMode:"vertical",hideResolution:!1,showHeaderPublishedBy:!1,showHeaderMainSymbol:!1,...t};const i=U[e.layout],s=e.charts.map((e=>function(e){const t=e.panes[0],i=t.canvas.width+t.leftAxis.canvas.width+t.rightAxis.canvas.width;let s=0;for(const t of e.panes)s+=t.canvas.height;return void 0!==e.timeAxis&&0!==e.timeAxis.contentHeight&&(s+=e.timeAxis.canvas.height),(0,E.size)({width:i,height:s})}(e)));if(this._pixelRatio=e.hidpiRatio,this._chartsGeometry=e.charts.map(((e,t)=>j(t,s,i,this._pixelRatio))),!H){let i=e.theme;void 0!==t.backgroundColor&&(i="black"===(0,D.rgbToBlackWhiteString)((0,D.parseRgb)(t.backgroundColor),150)?V.StdTheme.Dark:V.StdTheme.Light),this._logoTextColor=L.themes[i].getThemedColor("color-text-primary")}this._headerDefaultTextColor=L.themes[e.theme].getThemedColor("color-text-primary")}async getImage(){const e=this._pixelRatio;let t=0,i=0,s=0;const n=this._headerItems();if(n.length>0){s=Math.ceil(1.4*this._options.fontSize*e)*n.length}i+=s;let o=0,a=0;for(const e of this._chartsGeometry)o=Math.max(o,e.x+e.width),a=Math.max(a,e.y+e.height);const l=i;t+=o,i+=a,t+=Math.round(10*e);const c=H?Math.round(10*e):Math.round(35*e),h=i;i+=c;const d=(0,R.createDisconnectedCanvas)(document,(0,E.size)({width:t,height:i}),1),u=(0,R.getContext2D)(d);u.font=(0,O.makeFont)(this._options.fontSize,this._options.font),u.textBaseline="top",u.fillStyle=this._options.backgroundColor,u.fillRect(0,0,t,i),n.length>0&&this._drawHeader(u,n,t,new r.Point(Math.round(10*e),Math.round(10*e)));for(let e=0;e{const s=(0,r.ensureNotNull)(e.paneForSource(e.mainSeries()));let n;const o={...t.state,intervalsVisibilities:(0,bi.mergeIntervalVisibilitiesDefaults)(t.state.intervalsVisibilities)},a=(0,L.createLineToolProperties)(t.linetool,o,e),l=e.dataSourceForId(t.id);if(l){if(!(0,L.isLineTool)(l))return void Bi.logError(`Error sync creating line tool. Object with id ${t.id} is already in use and it is not a line tool`);if(l.toolname!==t.linetool)return void Bi.logError(`Error sync creating line tool. Object with id ${t.id} is already in use and its type differs: ${l.toolname} and ${t.linetool}`)}if(l&&(l.linkKey().setValue(t.linkKey),l.share(t.sharingMode)),t.pointPositionPercents){const e={index:0,price:0};if(n=null!=l?l:i.createLineTool({pane:s,point:e,linetool:t.linetool,properties:a,linkKey:t.linkKey,disableSynchronization:!0,id:t.id}),null===n)return;n.restorePositionPercents((0,r.ensureDefined)(t.pointPositionPercents))}else{const o=t.points.map((i=>({index:(0,r.ensureNotNull)(Ni(e,t.model,i.timeStamp)),price:i.price}))),c=o[0];if(n=null!=l?l:i.createLineTool({pane:s,point:c,linetool:t.linetool,properties:a,linkKey:t.linkKey,sharingMode:t.sharingMode,disableSynchronization:!0,id:t.id}),null===n)return;if(e.lineBeingCreated())for(let e=1;e0){const i=Math.ceil(e.timeScale().width()/t.barCount);e.timeScale().setBarSpacing(i)}}}},46378:(e,t,i)=>{"use strict";i.r(t),i.d(t,{allInitialModelsCreated:()=>Xt,allInitialSymbolsResolved:()=>Kt,applyIndicatorToAllChartsImpl:()=>ct,applyIndicatorsToAllChartsImpl:()=>lt,applyLineToolUpdateNotificationImpl:()=>ft,applyThemeImpl:()=>Qt,chartsSymbolsImpl:()=>yt,checkProFeatureImpl:()=>Zt,computeContentBoxImpl:()=>Lt,copyScreenshotToClipboard:()=>Tt,createBroadcastChannel:()=>qt,createChartStorageSubscriptionsIfRequired:()=>bt,createClipboardHandler:()=>vt,createLeftBottomChartWidgetWV:()=>It,deserializedChartIds:()=>mt,destroyBroadcastChannel:()=>$t,downloadScreenshot:()=>Ct,generateNewChartId:()=>Nt,getAsyncStateForChartImpl:()=>pt,getClientSnapshot:()=>At,getSnapshot:()=>Mt,getStateForChartImpl:()=>ut,getVisuallyAdjacentDefImpl:()=>Vt,handleConnectionLimitReachedChanged:()=>li,handleDateRangeLockChange:()=>ni,handleDeviceConnectionClosed:()=>ci,handleInternalDateRangeLockChange:()=>ri,handleInternalIntervalLockChange:()=>ii,handleInternalSymbolLockChange:()=>ei,handleInternalTrackTimeLockChange:()=>oi,handleIntervalLockChange:()=>si,handleSymbolLockChange:()=>ti,handleTrackTimeLockChange:()=>ai,hideChartImpl:()=>Ht,isFirstChartInLayout:()=>_t,lineToolsAndGroupsDTOsImpl:()=>dt,removeChartWidgetSubscriptionsImpl:()=>zt,resetLineToolsInvalidatedImpl:()=>gt,setBrokerImpl:()=>St,setChartLayoutWithUndoImpl:()=>Jt,setLayoutImpl:()=>Ut,syncCrosshairImpl:()=>Gt,syncScrollImpl:()=>Yt,takeScreenshot:()=>wt,takeServerScreenshot:()=>Pt,updateLayoutImpl:()=>Bt,updateLayoutPartialImpl:()=>Dt});var s=i(50151),r=i(86441),n=i(98351),o=i(44352),a=i(47539),l=i(49483),c=i(2484);function h(e){const t={};return{promise:new Promise(((i,s)=>{e.subscribe(t,i,!0)})),destroy:()=>{e.unsubscribeAll(t)}}}i(90981);var d=i(71733);class u extends d.UndoCommand{constructor(e,t){super(null),this._chartModel=e,this._targetIndex=t}redo(){const e=this._chartModel.createPane(this._targetIndex,void 0,this._paneId);this._paneId=e.id()}undo(){const e=(0,s.ensureDefined)(this._paneId),t=this._chartModel.panes().find((t=>t.id()===e)) +;void 0!==t&&this._chartModel.removePane(t)}createdPaneId(){return this._paneId}}class p extends d.UndoCommand{constructor(e,t,i,s){super(s),this._setter=e,this._oldValue=t,this._newValue=i}redo(){this._setter(this._newValue)}undo(){this._setter(this._oldValue)}}class _ extends p{constructor(e,t,i,s){super((e=>this._vwState.setValue(e)),t,i,s),this._vwState=e}}var m=i(10381),g=i(65446),f=i(93352);const v=(0,n.getLogger)("Clipboard");class S{constructor(e){this._e=e}write(e){return(0,g.writeImpl)(this._toRaw(e),this._e)}_toRaw(e){const t={files:[]};t.text=e.text,void 0!==e.app?t.html=this._serializeAppData(e.app,e.text):e.html&&(t.html=e.html);for(const i of e.files||[])t.files.push(i);return t}_serializeAppData(e,t){return`${t?(0,m.htmlEscape)(t.slice(0,256)):"📈"}`}}class y{constructor(e){this._e=e}async read(){this._e&&0===this._e.eventPhase&&(v.logWarn("Cannot use an already dispatched ClipboardEvent for reading"),this._e=null);const e=this._e?this._readUsingEvent(this._e):await this._readUsingApi();return this._fromRaw(e)}_readUsingEvent(e){const t=(0,s.ensure)(e.clipboardData);e.preventDefault();const i={files:[]};for(let e=0;e0&&(t.files=e.files),t}_parseAppData(e){if(-1===e.slice(0,1024).indexOf("data-tradingview-clip"))return;const t=(new DOMParser).parseFromString(e,"text/html").querySelector("[data-tradingview-clip]");return t?t.getAttribute("data-tradingview-clip")||"":void 0}_readBlobAsText(e){return new Promise(((t,i)=>{const s=new FileReader;s.onloadend=()=>{t(s.result)},s.onerror=()=>{i(s.error)},s.readAsText(e)}))}}var b=i(35749);function w(e){const t=e.target;return null!==t&&1===t.nodeType&&(0,b.isTextEditingField)(t)}function P(e){const t=e.target;if(null===t)return!1;const i=(t.ownerDocument||t).getSelection();return null!==i&&!i.isCollapsed}class C extends class{constructor(e){this._callbacks=Object.assign({},e),this._boundOnCopy=this._onCopyEv.bind(this),this._boundOnCut=this._onCutEv.bind(this),this._boundOnPaste=this._onPasteEv.bind(this)}listen(){document.addEventListener("copy",this._boundOnCopy),document.addEventListener("cut",this._boundOnCut), +document.addEventListener("paste",this._boundOnPaste)}async peek(){if("granted"!==(await navigator.permissions.query({name:"clipboard-read"})).state)throw new Error("clipboard-read is not granted");return new y(null).read()}uiRequestCopy(e){this._callbacks.copyRequested&&this._callbacks.copyRequested(new S(null),e)}uiRequestCut(e){this._callbacks.cutRequested&&this._callbacks.cutRequested(new S(null),e)}uiRequestPaste(e){this._callbacks.pasteRequested&&this._callbacks.pasteRequested(new y(null),e)}destroy(){document.removeEventListener("copy",this._boundOnCopy),document.removeEventListener("cut",this._boundOnCut),document.removeEventListener("paste",this._boundOnPaste)}_onCopyEv(e){e.defaultPrevented||this._callbacks.copyRequested&&this._callbacks.copyRequested(new S(e))}_onCutEv(e){e.defaultPrevented||this._callbacks.cutRequested&&this._callbacks.cutRequested(new S(e))}_onPasteEv(e){e.defaultPrevented||this._callbacks.pasteRequested&&this._callbacks.pasteRequested(new y(e))}}{_onCopyEv(e){if(!w(e)&&!P(e))return super._onCopyEv(e)}_onCutEv(e){if(!w(e)&&!P(e))return super._onCutEv(e)}_onPasteEv(e){if(!w(e))return super._onPasteEv(e)}}const T=()=>i.e(4389).then(i.bind(i,33646));function x(e,t={}){return T().then((i=>i.copyToClipboardImageOfChart(e,t)))}function I(e,t={}){return T().then((i=>i.getImageOfChartSilently(e,t)))}var M=i(76422),A=i(84015),L=i(8840),k=i(57737),E=i(27714),D=i(24377),B=i(26843),V=i(93975),R=i(83499),N=i(17364),O=i(95242),F=i(10123),W=i(76351);const H=!c.enabled("widget_logo");function z(e,t=null,i=null){let s={};if("number"==typeof e)return{relativePositions:{[e]:{l:t,t:i}},nextElementLeft:e,nextElementTop:e};const[r,...n]=e;if("v"===r){let e=null;for(const r of n){const n=z(r,t,i);s={...s,...n.relativePositions},i=n.nextElementTop,e=n.nextElementLeft}t=e}if("h"===r){let e=null;for(const r of n){const n=z(r,t,i);s={...s,...n.relativePositions},t=n.nextElementLeft,e=n.nextElementTop}i=e}return{relativePositions:s,nextElementTop:i,nextElementLeft:t}}const U=function(e){const t={};for(const i of Object.keys(e)){const s=z(e[i]).relativePositions;t[i]=s}return t}(F);function j(e,t,i,s){let r=Math.round(10*s),n=Math.round(10*s);const o=i[e];if(null!==o.l){const e=j(o.l,t,i,s);r=e.x+e.width+Math.round(5*s)}if(null!==o.t){const e=j(o.t,t,i,s);n=e.y+e.height+Math.round(5*s)}const a=t[e];return{x:r,y:n,width:a.width,height:a.height}}function G(e,t,i){var s;const r=(new DOMParser).parseFromString(W,"image/svg+xml");null===(s=null==r?void 0:r.firstElementChild)||void 0===s||s.setAttribute("color",i);const n=URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(r)],{type:"image/svg+xml"}));return new Promise((i=>{const s=new Image;s.width=e,s.height=t,s.onload=()=>{i({image:s,width:e,height:t})},s.src=n}))}function q(e,t,i,s,r){e.save(),e.drawImage(s.image,t,i,s.width,s.height),e.textBaseline="bottom";const n=(t+s.width)/r+3,o=(i+s.height)/r;(0,R.drawScaled)(e,r,(()=>{e.fillText("TradingView",n,o)})),e.restore()}function $(e,t,i,s){return(0,R.drawScaled)(e,s,(()=>{e.fillText(i,t.x/s,t.y/s)})), +e.measureText(i).width*s}function Y(e,t,i,s,n,o){const a=n.map((e=>e.text)).join("");let l=i.x;const c=function(e,t,i,s){if(e.measureText(t).width*s<=i)return{text:t,elided:!1};const r=e.measureText("...").width*s,n=[];for(let e=0;ee.measureText(t.slice(0,o+1)).width*s+r>i));return{text:(t=t.slice(0,o)).trim(),elided:!0}}(e,a,s-l,t);if(c.elided&&!o)return null;const h=[];let d=0;for(const e of n){if(d+e.text.length>c.text.length)break;h.push(e.text),d+=e.text.length}const u=h.join("").trim().length;d=0;for(const s of n){if(d+s.text.length>u)break;s.color&&(e.save(),e.fillStyle=s.color),l+=$(e,new r.Point(l,i.y),s.text,t),s.color&&e.restore(),d+=s.text.length}return c.elided&&(l+=$(e,new r.Point(l,i.y),"...",t)),l}function K(e){return e.map((e=>({...e,title:""})))}function X(e,t){const i=[{text:e.trim()}];for(const e of t)e.visible&&(""!==i[i.length-1].text&&i.push({text:" "}),e.title&&i.push({text:e.title}),i.push({text:e.value,color:e.color}));return i}class Z{constructor(e,t){this._logoTextColor=null,this._snapshotData=e,t=t||{},this._options={backgroundColor:L.themes[e.theme].getThemedColor("color-bg-primary"),borderColor:L.themes[e.theme].getThemedColor("color-border"),font:N.CHART_FONT_FAMILY,fontSize:12,legendMode:"vertical",hideResolution:!1,showHeaderPublishedBy:!1,showHeaderMainSymbol:!1,...t};const i=U[e.layout],s=e.charts.map((e=>function(e){const t=e.panes[0],i=t.canvas.width+t.leftAxis.canvas.width+t.rightAxis.canvas.width;let s=0;for(const t of e.panes)s+=t.canvas.height;return void 0!==e.timeAxis&&0!==e.timeAxis.contentHeight&&(s+=e.timeAxis.canvas.height),(0,E.size)({width:i,height:s})}(e)));if(this._pixelRatio=e.hidpiRatio,this._chartsGeometry=e.charts.map(((e,t)=>j(t,s,i,this._pixelRatio))),!H){let i=e.theme;void 0!==t.backgroundColor&&(i="black"===(0,D.rgbToBlackWhiteString)((0,D.parseRgb)(t.backgroundColor),150)?B.StdTheme.Dark:B.StdTheme.Light),this._logoTextColor=L.themes[i].getThemedColor("color-text-primary")}this._headerDefaultTextColor=L.themes[e.theme].getThemedColor("color-text-primary")}async getImage(){const e=this._pixelRatio;let t=0,i=0,s=0;const n=this._headerItems();if(n.length>0){s=Math.ceil(1.4*this._options.fontSize*e)*n.length}i+=s;let o=0,a=0;for(const e of this._chartsGeometry)o=Math.max(o,e.x+e.width),a=Math.max(a,e.y+e.height);const l=i;t+=o,i+=a,t+=Math.round(10*e);const c=H?Math.round(10*e):Math.round(35*e),h=i;i+=c;const d=(0,R.createDisconnectedCanvas)(document,(0,E.size)({width:t,height:i}),1),u=(0,R.getContext2D)(d);u.font=(0,O.makeFont)(this._options.fontSize,this._options.font),u.textBaseline="top",u.fillStyle=this._options.backgroundColor,u.fillRect(0,0,t,i),n.length>0&&this._drawHeader(u,n,t,new r.Point(Math.round(10*e),Math.round(10*e)));for(let e=0;e0&&t.leftAxis.contentHeight>0&&(i.drawImage(t.leftAxis.canvas,s,n),s+=t.leftAxis.canvas.width),i.drawImage(t.canvas,s,n),s+=t.canvas.width,t.rightAxis.contentWidth>0&&t.rightAxis.contentHeight>0&&i.drawImage(t.rightAxis.canvas,s,n),"pane"===t.type&&(i.fillStyle=e.colors.text,this._drawLegend(t,i,new r.Point(o,l),a)),n+=t.canvas.height}if(void 0!==e.timeAxis&&0!==e.timeAxis.contentHeight){let t=0;e.timeAxis.lhsStub.contentWidth>0&&e.timeAxis.lhsStub.contentHeight>0&&(i.drawImage(e.timeAxis.lhsStub.canvas,t,n),t+=e.timeAxis.lhsStub.canvas.width),i.drawImage(e.timeAxis.canvas,t,n),t+=e.timeAxis.canvas.width,e.timeAxis.rhsStub.contentWidth>0&&e.timeAxis.rhsStub.contentHeight>0&&i.drawImage(e.timeAxis.rhsStub.canvas,t,n)}i.strokeStyle=this._options.borderColor,i.strokeRect(0,0,t.width,t.height),i.restore()}_headerItems(){var e,t,i,s;const r=[];if(this._options.showHeaderPublishedBy&&this._snapshotData.publishedBy)for(const e of this._snapshotData.publishedBy)r.push([{text:e}]);if(this._options.showHeaderMainSymbol){const n=this._snapshotData.charts[0],o=`${null===(e=n.meta)||void 0===e?void 0:e.symbol}, ${null===(t=n.meta)||void 0===t?void 0:t.resolution}`;r.push(X(o,null!==(s=null===(i=n.meta)||void 0===i?void 0:i.values)&&void 0!==s?s:[]))}return r}_drawHeader(e,t,i,s){e.save(),e.fillStyle=this._headerDefaultTextColor;const n=Math.ceil(1.4*this._options.fontSize*this._pixelRatio);t.forEach(((t,o)=>{Y(e,this._pixelRatio,new r.Point(s.x,s.y+n*o),i,t,!0)})),e.restore()}_drawLegend(e,t,i,n){let o=!0;const a=Math.ceil(1.4*this._options.fontSize*this._pixelRatio);let l=i.x,c=i.y;if(e.mainSeriesText&&c+a{e.fillText(r,0,0)}))}_fillRadius(e){const t=this._data.style,i=Math.max(1,Math.floor(e));let s=Math.round(t.lollipop.width*e);return s%2!=i%2&&(s+=1),s/2}_drawBorderLine(e,t,i,s){const r=this._data.style;e.strokeStyle=r.lollipop.strokeStyle,e.lineWidth=i,(0,fe.setLineStyle)(e,ge.LINESTYLE_SOLID),(0,fe.createCircle)(e,t.x,t.y,s),e.stroke()}_drawFilledCircle(e,t,i,s){e.fillStyle=s,(0,fe.createCircle)(e,t.x,t.y,i),e.fill()}}var ye=i(14888);class be extends Se{_drawLollipop(e,t,i){var s;if(!this._imageLoaded())return void super._drawLollipop(e,t,i);const r=this._data.style,n=i.pixelRatio,o=this._fillRadius(n);let a=Math.round(r.lollipop.lineWidth*n),l=o-Math.round(1*n+a/2);if(r.lollipop.fillCircle&&(r.lollipop.backgroundColor&&this._drawFilledCircle(e,t,o,r.lollipop.backgroundColor),r.lollipop.fillStyle&&this._drawFilledCircle(e,t,l,r.lollipop.fillStyle)),null===(s=this._data.style.lollipop.image)||void 0===s?void 0:s.imageElement){const i=o-Math.round(1*n+2*a),s=2*i;e.save(),e.imageSmoothingEnabled=!0,e.imageSmoothingQuality="high",(0,fe.createCircle)(e,t.x,t.y,i),e.clip(),e.drawImage(this._data.style.lollipop.image.imageElement,t.x-i,t.y-i,s,s),e.restore()}"active"===this._data.status&&(l-=a/2,a*=1.5),this._drawBorderLine(e,t,a,l)}_drawLabel(e,t,i){this._imageLoaded()&&!this._data.style.lollipop.text.showWhenImageLoaded||super._drawLabel(e,t,i)}_imageLoaded(){ -return Boolean(this._data.style.lollipop.image&&this._data.style.lollipop.image.imageElement&&this._data.style.lollipop.image.imageElement.complete&&this._data.style.lollipop.image.imageElement.naturalWidth)}}const we={fillPath:new Path2D("M8.961.92a3 3 0 0 1 3.078 0l7.5 4.48A3 3 0 0 1 21 7.975V20a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V7.975A3 3 0 0 1 1.461 5.4l7.5-4.48z"),strokePath:new Path2D("M9.867 2.742c.39-.23.875-.23 1.266 0l7.5 4.406c.382.225.617.635.617 1.078V20c0 .69-.56 1.25-1.25 1.25H3c-.69 0-1.25-.56-1.25-1.25V8.226c0-.443.235-.853.617-1.078l7.5-4.406z")},Ce={fillPath:new Path2D("M8.961 22.08a3 3 0 0 0 3.078 0l7.5-4.48A3 3 0 0 0 21 15.025V3a3 3 0 0 0-3-3H3a3 3 0 0 0-3 3v12.025A3 3 0 0 0 1.461 17.6l7.5 4.48z"),strokePath:new Path2D("M9.866 20.257c.391.23.877.23 1.268 0l7.5-4.414a1.25 1.25 0 0 0 .616-1.078V3c0-.69-.56-1.25-1.25-1.25H3c-.69 0-1.25.56-1.25 1.25v11.765c0 .443.234.853.616 1.078l7.5 4.414z")},Pe={fillPath:new Path2D("M3 0h15c1.662 0 3 1.338 3 3v15c0 1.662-1.338 3-3 3H3c-1.662 0-3-1.338-3-3V3c0-1.662 1.338-3 3-3z"),strokePath:new Path2D("M3 1.75h15c.693 0 1.25.557 1.25 1.25v15c0 .693-.557 1.25-1.25 1.25H3c-.692 0-1.25-.558-1.25-1.25V3c0-.692.558-1.25 1.25-1.25z")};function Te(e,t,i,s,r){const n=i.pixelRatio;e.save(),e.translate(t.x-s.lollipop.width*n/2,t.y-s.lollipop.height*n/2),e.scale(n,n),s.lollipop.fillCircle&&s.lollipop.backgroundColor&&(e.fillStyle=s.lollipop.backgroundColor,e.fill(r.fillPath)),e.strokeStyle=s.lollipop.strokeStyle,e.lineWidth=Math.round(s.lollipop.lineWidth*n)/n,(0,fe.setLineStyle)(e,ge.LINESTYLE_SOLID),s.lollipop.fillCircle&&s.lollipop.fillStyle&&(e.fillStyle=s.lollipop.fillStyle,e.fill(r.strokePath)),e.stroke(r.strokePath),e.restore()}function xe(e,t,i,s){Te(e,t,i,s,we)}function Ie(e,t,i,s){Te(e,t,i,s,Ce)}function Me(e,t,i,s){Te(e,t,i,s,Pe)}class Ae extends Se{_drawLollipop(e,t,i){const s=this._data.style;switch(s.shape){case"earningUp":xe(e,t,i,s);break;case"earningDown":Ie(e,t,i,s);break;case"earning":Me(e,t,i,s);break;default:super._drawLollipop(e,t,i)}}}const Le={backgroundDark:(0,de.getHexColorByName)("color-cold-gray-900"),backgroundLight:(0,de.getHexColorByName)("color-white")};class ke extends class{constructor(e,t,i){this._invalidated=!1,this._renderer=new ue.CompositeRenderer,this._textWidthCache=new pe.TextWidthCache,this._stylesCache=null,this._lollipops={},this._lollipopsCounter=0,this._lastClickedId=null,this.onPaneBgChange=()=>{this._recreateStyles(this._model)},this._lastClickedId=null,this._model=e,this._source=t,this._clickHandler=i,this._recreateStyles(e),e.backgroundColor().subscribe(this.onPaneBgChange),e.mainSeries().onSymbolIntervalChanged().subscribe(this,this._onSymbolOrIntervalChanged)}destroy(){this._model.backgroundColor().unsubscribe(this.onPaneBgChange),this._model.mainSeries().onSymbolIntervalChanged().unsubscribeAll(this)}processClickOutside(e){var t;if(null===this._lastClickedId||!e)return void this.clearLastClicked();let i=null;if(function(e){return void 0!==e.touches}(e)){if(1!==e.touches.length)return;{const t=(0, -s.ensureNotNull)(e.target).getBoundingClientRect(),n=e.touches[0];i=new r.Point(n.clientX-t.left,n.clientY-t.top)}}else i=new r.Point(e.offsetX,e.offsetY);const n=this._renderer.hitTest(i,{physicalHeight:0,physicalWidth:0,pixelRatio:1,cssHeight:0,cssWidth:0});null!==n&&(null===(t=n.data())||void 0===t?void 0:t.activeItem)===(0,s.ensureDefined)(this._lollipops[this._lastClickedId]).itemIndex||this.clearLastClicked()}clearLastClicked(){const e=null!==this._lastClickedId&&this._lollipops[this._lastClickedId]||null;null!==e&&(e.active=!1),this._lastClickedId=null}getLastClickedLollipopId(){return this._lastClickedId}update(){this._invalidated=!0}afterUpdate(e,t,i,s){}getStyle(e,t){let i=t;if(e.stack&&(i+="_stack:"+e.stack),"active"===i)return this._activeStyle;if("hovered"===i)return this._hoveredStyle;if("default"===i)return this._defaultStyle;if(this._stylesCache||(this._stylesCache={}),!this._stylesCache[i]){const s=(0,ae.clone)("active"===t?this._activeStyle:"hovered"===t?this._hoveredStyle:this._defaultStyle);e.stack&&(s.lollipop.incHeight=25*e.stack),this._stylesCache[i]=s}return this._stylesCache[i]}hasTooltip(e){return!0}_getY(){let e=0;const t=this._model.panes();for(let i=t.length;i--;){const s=t[i];s.containsMainSeries()&&(e+=s.height())}return e}_showBarLine(e){return this.hasTooltip(e)&&(e.hovered||e.active)}_createRenderers(e,t){this._renderer.clear();const i=(0,E.size)({width:e,height:t});for(const e in this._lollipops)if(this._lollipops.hasOwnProperty(e)){const t=(0,s.ensureDefined)(this._lollipops[e]);if(t.visible){const e=this._getLollipopStatus(t),s=this.getStyle(t,e),n={id:t.id,centerPoint:new r.Point(t.basePoint.x,t.basePoint.y-s.lollipop.bottom-s.lollipop.height/2-(s.lollipop.incHeight||0)),style:s,status:e},o={activeItem:t.itemIndex,hideCrosshairLinesOnHover:!0,clickHandler:this._lollipopMouseClickHandler.bind(this,n,i),tapHandler:this._lollipopMouseClickHandler.bind(this,n,i)};if(this._renderer.append(this._createRendererForLollipop(n,o)),this._showBarLine(t)){const{strokeStyle:e,lineStyle:i,lineWidth:r}=s.barLine,n={color:e,linestyle:i,linewidth:r,x:t.basePoint.x,top:0,bottom:t.basePoint.y-s.lollipop.bottom-s.lollipop.height},o=new _e.VerticalLineRenderer;o.setData(n),this._renderer.insert(o,0)}}}}_recreateStyles(e){this._stylesCache=null}_createRendererForLollipop(e,t){return new Se(e,new ye.HitTestResult(ye.HitTestResult.CUSTOM,t),this._textWidthCache)}_onSymbolOrIntervalChanged(){this._lollipops={},this._lollipopsCounter=0,this._renderer.clear(),this.clearLastClicked()}_lollipopMouseClickHandler(e,t,i){i.preventDefault();const n=e.id;if(this._lastClickedId=this._lastClickedId===n?null:n,null===this._lastClickedId)return;const o={target:i.target,targetSize:t,point:new r.Point(e.centerPoint.x,e.centerPoint.y-e.style.lollipop.height/2-8),marginTop:15};this._clickHandler(o,(()=>{const e=(0,s.ensureDefined)(this._lollipops[n]);return this._createTooltipContent(e)}))}_getLollipopStatus(e){return e.active?"active":e.hovered?"hovered":"default"}}{constructor(e,t,i){super(e,t,i),this.stylesCache={}, -this.templatesCache={},this._itemIndexToId=new Map,this.source=t}clearCaches(){this.clearLastClicked(),this._lollipops={},this._lollipopsCounter=0}update(){this._invalidated=!0}renderer(e,t){return this._invalidated&&(this._createLollipops(t,e),this._invalidated=!1),this._renderer}getStyle(e){const t=e.active?"active":e.hovered?"hovered":"default";return this._generateStyle(t,e)}hasTooltip(e){return Boolean(e.items&&e.items.length)}_createTooltipContent(e){const t=e.items;return t?[{type:"common",subTitle:Array.isArray(t)?t.map((e=>({value:e}))):[{value:t}],style:{color:e.color}}]:null}_createRendererForLollipop(e,t){return new(e.style.lollipop.image?be:Ae)(e,new ye.HitTestResult(ye.HitTestResult.CUSTOM,t),this._textWidthCache)}_lollipopMouseClickHandler(e,t,i){super._lollipopMouseClickHandler(e,t,i),(0,M.emit)("onTimescaleMarkClick",e.id)}_createLollipops(e,t){const i=this._model.timeScale(),s=super._getY(),n=this._model.lastHittestData(),o=this._model.hoveredSource(),a=this.source.marks(),l=new Map;Object.keys(a).forEach((e=>{var t;const c=a[e],h=c.id,d=c.index;if(null!=d){const e=h===this.getLastClickedLollipopId(),a=this._lollipops[h],u=void 0!==a?a.itemIndex:this._lollipopsCounter++;this._itemIndexToId.has(u)||this._itemIndexToId.set(u,h);const p=o===this.source&&null!==n&&n.activeItem===u,_=(null!==(t=l.get(d))&&void 0!==t?t:-1)+1;l.set(d,_),this._lollipops[h]={id:h,itemIndex:u,basePoint:new r.Point(i.indexToCoordinate(d)+1,s),hovered:p,active:e,label:c.label,color:c.color,items:c.tooltip,visible:!0,stack:_,shape:c.shape,image:this._getImageForUrl(c.imageUrl),showLabelWhenImageLoaded:c.showLabelWhenImageLoaded,textColor:c.labelFontColor}}})),super._createRenderers(e,t)}_getImageForUrl(e){if(e)return this.source.getImageElement(e)}_generateStyle(e,t){const{color:i,label:s,stack:r,shape:n,image:o,textColor:a}=t;let l=e+i+s;if(void 0!==r&&(l+="_stack"+r),!(l in this.stylesCache)){const c=this._model.isDark()?Le.backgroundDark:Le.backgroundLight;let h,d=i;if("active"===e)h=i,d="rgba(255, 255, 255, 0.92)";else if("hovered"===e){const e=(0,D.tryParseRgba)(i);if(null!==e){const t=e[3]*(1-.85);h=(0,D.rgbaToString)((0,D.rgba)(e[0],e[1],e[2],t))}}a&&(d=a);let u=23,p=23,_=1,m=0;"earning"===n?(p=21,u=21,_=2):"earningUp"===n?(u=21,m=1,_=2):"earningDown"===n&&(u=21,m=-.5,_=.5);const g={barLine:{lineStyle:ge.LINESTYLE_DASHED,lineWidth:1,strokeStyle:i},lollipop:{width:u,height:p,bottom:_,backgroundColor:c,lineWidth:1.5,fillStyle:h,strokeStyle:i,fillCircle:!0,text:{label:s,deltaY:m,strokeStyle:d,font:(0,O.makeFont)(12,N.CHART_FONT_FAMILY,"bold"),showWhenImageLoaded:t.showLabelWhenImageLoaded},image:o},shape:n};void 0!==r&&(g.lollipop.incHeight=25*r),this.stylesCache[l]=g}return this.stylesCache[l]}}var Ee=i(7711),De=i(50841);const Ve=(0,n.getLogger)("Chart.UserDefinedTimescaleMarks");class Be extends ce.BarsMarksContainer{constructor(e){super(e,new Ee.DefaultProperty("UserDefinedTimescaleMarks",{visible:!0})),this._imageItems=new Map,this._requestedPointsets=new Set,this._destroyed=!1,(0, -he.hideMarksOnBars)().subscribe(this,(()=>this._properties.childs().visible.setValue(!(0,he.hideMarksOnBars)().value()))),this._paneView=new ke(e,this,this._showTooltip.bind(this)),this._paneViews=[this._paneView]}destroy(){this._destroyed=!0,(0,he.hideMarksOnBars)().unsubscribeAll(this),super.destroy()}zorder(){return De.sortSourcesPreOrdered.TimeScaleMarks}userEditEnabled(){return!1}clearMarks(){const e=this._model.chartApi();e.isConnected().value()&&Object.keys(this._marks).forEach((t=>{const i=this._getPointsetId(t);e.removePointset(i)})),this._requestedPointsets.clear(),super.clearMarks(),this._paneView.clearCaches(),this.updateAllViewsAndRepaint()}hasContextMenu(){return!1}paneViews(){return this._properties.childs().visible.value()?this._paneViews:[]}updateAllViews(){this._paneView.update()}onClickOutside(){this._paneView.processClickOutside()}getImageElement(e){return this._imageItems.has(e)||this._addImageToStore(e),this._imageItems.get(e)}_initialize(){this._properties.childs().visible.setValue(!0)}_plateViewData(e){return{text:e.text}}_getData(e){const t=this._model.mainSeries().symbolInfo();if(!t)return;const i=this.roundRange(this._rangeDifference(e)),r=this._model.mainSeries(),n=r.seriesSource().symbolInstanceId(),o=r.properties().childs().interval.value();window.ChartApiInstance.getTimescaleMarks(t,i.start,i.end,(t=>{const i=this._model.chartApi();for(const e of t){e.index=null;const t=e.id,r=this._getPointsetId(t.toString()),a=this._marks[t];if(a&&null!==a.index&&(a.tickmark===e.tickmark?e.index=a.index:this._requestedPointsets.has(r)&&i.isConnected().value()&&(i.removePointset(r),this._requestedPointsets.delete(r))),e.imageUrl&&this._addImageToStore(e.imageUrl),this._marks[t]=e,null===e.index&&i.isConnected().value()){this._requestedPointsets.add(r);const t=[[e.tickmark,0]];i.createPointset(r,"turnaround",(0,s.ensureNotNull)(n),o,t,(e=>this._onPointsetData(e)))}}this._loadedRange=this._rangeUnion(e,this._loadedRange),this.updateAllViewsAndRepaint()}),o)}_getPointsetId(e){return"pointsetMark_"+e}_onPointsetData(e){if("data_update"===e.method){const t=e.params.customId.split("_")[1],i=this._marks[t],s=e.params.plots;i&&1===s.length&&(i.index=s[0].value[0])}this.updateAllViews()}async _showTooltip(e,t){const s=t();if(!s)return;const r=this._model.timeScale(),n=[r.onScroll(),r.barSpacingChanged(),this._model.mainSeries().onSymbolIntervalChanged()],o=this._paneView.processClickOutside.bind(this._paneView);(await Promise.all([i.e(7624),i.e(6092),i.e(240),i.e(962),i.e(1075),i.e(9039)]).then(i.bind(i,36647))).showLollipopTooltip({items:s,position:e,customCloseSubscriptions:n,onClickOutside:o})}_addImageToStore(e){this._imageItems.has(e)||this._loadNewImage(e)}_loadNewImage(e){const t={imageElement:null};(0,le.getImage)(e,e).then((e=>{this._destroyed||(t.imageElement=e,this.updateAllViews(),this._model.updateSource(this))})).catch((()=>{Ve.logWarn(`An error ocurred while loading image ${e}`)})),this._imageItems.set(e,t)}}function Re(e,t){const i=Math.max(1,Math.floor(t)),s=Math.round(e.x*t)+i%2/2 -;let r=Math.round(e.size*t);(s+r/2)%1!=0&&(r+=1);const n=Math.min(Math.max(1,Math.round(t*e.borderWidth)),r/2);let o;const a=("up"===e.direction?-1:1)*(e.yInverted?-1:1),l=a*(Math.round(e.size*t/2)+i%2);if(void 0!==e.fixedSpaceYPosition){const i=Math.round(e.fixedSpaceYPosition.itemSpacing*t),s=e.fixedSpaceYPosition.order,n=a*(r*s+i*(s+1));o=Math.round(e.fixedSpaceYPosition.basePosition*t)+n+l}else o=Math.round(e.y*t)+l;return{x:s,y:o,size:r,borderWidth:n,tickSize:i}}function Ne(e,t,i,s){e.save(),i&&!s.highlightByAuthor&&(e.globalAlpha=.4),s.mine?function(e,t,i){const{borderColor:s,backgroundColor:r,doNotFill:n,direction:o,yInverted:a}=i,{x:l,y:c,borderWidth:h,size:d,tickSize:u}=Re(i,t.pixelRatio);e.strokeStyle=s,e.fillStyle=r,e.lineWidth=h;const p="up"===o!==a?-1:1;let _=Math.round(d/2/Math.tan(Math.PI/6))+u%2/2;(l+_/2)%1!=0&&(_-=1);e.translate(l,c+_/2*p),e.beginPath();const m=h/2;e.moveTo(0,-p*(_-m)),e.lineTo(d/2-m,h/2),e.lineTo(-d/2+m,h/2),e.lineTo(0,-p*(_-h/2)),e.closePath(),n||e.fill();e.stroke()}(e,t,s):function(e,t,i){const{borderColor:s,backgroundColor:r,label:n}=i,o=t.pixelRatio,{x:a,y:l,borderWidth:c,size:h}=Re(i,o);e.strokeStyle=s,e.fillStyle=r,e.lineWidth=c,e.beginPath();const d=h/2-c/2;e.arc(a,l,d,0,2*Math.PI,!0),e.closePath(),e.fill(),e.stroke(),n&&h/2>=7&&(e.textAlign="center",e.textBaseline="middle",e.font=n.font,e.fillStyle=n.fontColor,(0,R.drawScaled)(e,o,(()=>{e.fillText(n.text,a/o,l/o)})))}(e,t,s),e.restore()}class Oe{constructor(e,t,i,s){this._canvas=null,this._clickHandler=e,this._enterHandler=t,this._leaveHandler=i,this._data=null!=s?s:null}setData(e){this._data=e}hitTest(e,t){if(null===this._data)return null;for(let i=this._data.items.length-1;i>=0;--i){const s=this._hitTestDot(this._data.items[i],e,t.pixelRatio);if(s)return s}return null}draw(e,t){this._canvas=e.canvas,null!==this._data&&this._data.items.forEach(Ne.bind(null,e,t,this._data.highlightByAuthor))}_hitTestDot(e,t,i){const s=new r.Point(e.x,Re(e,i).y/i);if((0,me.pointInCircle)(t,s,Math.max(e.size/2,8))){const t=this._canvas,i=null===t?void 0:{mouseEnterHandler:()=>this._enterHandler(e,s.y,t),mouseLeaveHandler:()=>this._leaveHandler(),clickHandler:i=>this._clickHandler(e,s.y,t,i),tapHandler:i=>this._clickHandler(e,s.y,t,i)};return new ye.HitTestResult(ye.HitTestResult.REGULAR,{activeItem:e.originalItem.id,...i})}return null}}const Fe={green:{border:(0,de.getHexColorByName)("color-minty-green-700"),background:(0,de.getHexColorByName)("color-minty-green-a700")},red:{border:(0,de.getHexColorByName)("color-ripe-red-700"),background:(0,de.getHexColorByName)("color-ripe-red-500")},neutral:{border:(0,de.getHexColorByName)("color-tan-orange-700"),background:(0,de.getHexColorByName)("color-tan-orange-500")},yellow:{border:"#EAC300",background:"#FFD400"},blue:{border:"#047ACE",background:"#0496FF"}};class We extends class{constructor(e,t){this._tooltip=null,this._hoveredBarsMarkData=null,this._destroyed=!1,this._invalidated=!0,this._originalData=[],this._source=e,this._model=t, -this._renderer=new Oe(this._onItemClicked.bind(this),this._showItem.bind(this),this._hideItem.bind(this)),this._createTooltipRenderer().then((e=>{this._destroyed?null==e||e.destroy():this._tooltip=e})),e.properties().childs().visible.subscribe(null,(()=>{var e;null===(e=this._tooltip)||void 0===e||e.hide(!0)}))}destroy(){var e;this._destroyed=!0,null===(e=this._tooltip)||void 0===e||e.destroy()}source(){return this._source}update(){this._invalidated=!0}renderer(e,t){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer}onClickOutside(e){e.isTouch&&null!==this._tooltip&&!this._tooltip.contains(e.target)&&this._tooltip.hide(!0)}_extractBarMarksRendererItemData(e,t){var i,s;const r=null!==(i=t.overridedTheme)&&void 0!==i?i:Fe[t.theme],n=this._calculateSize(e,t),o=this._calculateY(e,n,t);return null===this._hoveredBarsMarkData||this._hoveredBarsMarkData.id!==t.id||this._hoveredBarsMarkData.x===t.x&&this._hoveredBarsMarkData.y===Math.round(o)||(null===(s=this._tooltip)||void 0===s||s.hide(!0),this._hoveredBarsMarkData=null),{x:t.x,y:this._calculateY(e,n,t),direction:t.direction,borderColor:r.border,borderWidth:t.hovered||t.highlightByAuthor?4:2,backgroundColor:r.background,size:n,doNotFill:!t.public,yInverted:t.yInverted,label:void 0===t.label?void 0:{text:t.label,fontColor:t.labelFontColor,font:(0,O.makeFont)(Math.ceil(Math.max(10,Math.min(n/2,20))),N.CHART_FONT_FAMILY,"bold")},originalItem:t}}_onItemClicked(e,t,i,s){s.isTouch&&this._showItem(e,t,i)}async _showItem(e,t,i){var r;const n=await this._tooltipProps(e);if(null===n)return;const o=this._model.timeScale().barSpacing(),a=this._calculateSize(o,e.originalItem);this._hoveredBarsMarkData={x:e.x,y:Math.round(this._calculateY(o,a,e.originalItem)),id:e.originalItem.id},null===(r=this._tooltip)||void 0===r||r.show({itemSize:a,container:(0,s.ensureNotNull)(i.parentElement),x:e.x,y:t,factoryProps:n,onClickOutside:()=>{var e;return null===(e=this._tooltip)||void 0===e?void 0:e.hide(!0)}})}_hideItem(){var e;null===(e=this._tooltip)||void 0===e||e.hide()}_calculateSize(e,t){return Math.min(553,Math.max(7,t.minSize,.8*e))}_updateImpl(){this._originalData=this._source.getPlatesViewData();const e=this._model.timeScale().barSpacing(),t=this._originalData.map(this._extractBarMarksRendererItemData.bind(this,e));this._renderer.setData({items:t,barSpacing:e,highlightByAuthor:!1})}}{async _createTooltipRenderer(){const[{TooltipRenderer:e},{UserDefinedBarsMarksTooltip:t}]=await Promise.all([Promise.all([i.e(2913),i.e(962),i.e(8020)]).then(i.bind(i,40072)),Promise.all([i.e(2913),i.e(962),i.e(8020)]).then(i.bind(i,71276))]);return new e(t)}_calculateY(e,t,i){const s=Math.max(1.4*i.minSize,e+4),r=("up"===i.direction?-1:1)*(i.yInverted?-1:1)*(s*(i.order+.6)+.25*s);return i.y+r}_onItemClicked(e,t,i,s){var r,n;super._onItemClicked(e,t,i,s),null===(n=(r=e.originalItem).onClicked)||void 0===n||n.call(r)}_tooltipProps(e){const t=e.originalItem.text;return t?Promise.resolve({text:t}):Promise.resolve(null)}}class He extends ce.BarsMarksContainer{constructor(e){ -super(e,new Ee.DefaultProperty("UserDefinedBarsMarks",{visible:!0})),this._paneView=new We(this,e),this._paneViews=[this._paneView],(0,he.hideMarksOnBars)().subscribe(this,(()=>{this.properties().childs().visible.setValue(!(0,he.hideMarksOnBars)().value())}))}destroy(){(0,he.hideMarksOnBars)().unsubscribeAll(this),this._paneView.destroy(),super.destroy()}zorder(){return De.sortSourcesPreOrdered.BarMarks}userEditEnabled(){return!1}clearMarks(){super.clearMarks(),this.updateAllViewsAndRepaint()}hasContextMenu(){return!1}paneViews(){return this._properties.childs().visible.value()?this._paneViews:[]}onClickOutside(e){this._paneView.onClickOutside(e)}_initialize(){this.properties().childs().visible.setValue(!0)}_plateViewData(e){const t={text:e.text,onClicked:e.onClicked};return"object"==typeof e.color&&(t.theme="user_defined_theme",t.overridedTheme={},t.overridedTheme.border=e.color.border,t.overridedTheme.background=e.color.background),t}_getData(e){const t=this._model.mainSeries().symbolInfo();if(!t)return;const i=this.roundRange(this._rangeDifference(e)),s=this._model.mainSeries().properties().childs().interval.value();window.ChartApiInstance.getMarks(t,i.start,i.end,(t=>{for(const e of t)this._marks[e.id]=e;this._loadedRange=this._rangeUnion(e,this._loadedRange),this.updateAllViewsAndRepaint()}),s)}}var ze=i(45345);const Ue=new a.TranslatedString("apply toolbars theme",o.t(null,void 0,i(58570)));class je extends d.UndoCommand{constructor(e,t,i=!0){super(Ue),this._prevThemeName=e,this._themeName=t,this._syncState=i}undo(){(0,L.isStdThemeName)(this._prevThemeName)&&((0,ze.setTheme)(this._prevThemeName),this._syncState&&(0,L.syncTheme)())}redo(){(0,L.isStdThemeName)(this._themeName.toLowerCase())&&((0,ze.setTheme)(this._themeName.toLowerCase()),this._syncState&&(0,L.syncTheme)())}}i(78831),i(74914),i(51620);var Ge=i(7019),qe=i(65407),$e=i(12882),Ye=i(40549);const Ke=!l.CheckMobile.any(),Xe=(0,n.getLogger)("ChartWidgetCollectionBase"),Ze=new a.TranslatedString("apply indicators to entire layout",o.t(null,void 0,i(44547))),Je=new a.TranslatedString("sync time",o.t(null,void 0,i(60635))),Qe=new a.TranslatedString("resize layout",o.t(null,void 0,i(13034))),et=new a.TranslatedString("reset layout sizes",o.t(null,void 0,i(30910))),tt=new a.TranslatedString("apply chart theme",o.t(null,void 0,i(66568))),it=new a.TranslatedString("symbol lock",o.t(null,void 0,i(92831))),st=new a.TranslatedString("interval lock",o.t(null,void 0,i(28916))),rt=new a.TranslatedString("date range lock",o.t(null,void 0,i(90621))),nt=new a.TranslatedString("track time",o.t(null,void 0,i(47122)));o.t(null,void 0,i(46669)),o.t(null,void 0,i(98478)),o.t(null,void 0,i(34004)),o.t(null,void 0,i(96260)),o.t(null,void 0,i(38641)),o.t(null,void 0,i(10160));function ot(e,t){const i=t.model().model().studyTemplate();e.undoHistory.beginUndoMacro(Ze);for(let s=0;se.id()===n)))}const l=t.pasteSourceFromClip(o,i,!0);if(l&&1===l.length){const e=l[0];if(r.asCompare){const i=(0,s.ensureNotNull)(t.mainSeries().priceScale());t.moveToScale(e,(0,s.ensureDefined)(o),i,n),t.setPriceScaleMode({percentage:!0},i,null)}}t.model().lightUpdate()}}e.undoHistory.endUndoMacro()}function lt(e){let t=1;for(;e.has(""+t);)t++;return""+t}function ct(e){const t=new Map,i=e.chartsCountToSave(),s=new Set;for(let r=0;r(0,s.ensureDefined)(e.content.chartId)))}function _t(e,t,i){e.chartsCountToSave();i.forEach((i=>{const s=(r=i.chartId,null!==(o=null===(n=e.chartWidgetsDefs.find((e=>e.chartWidget.id()===r)))||void 0===n?void 0:n.chartWidget)&&void 0!==o?o:null);var r,n,o;null==s||s.resetLineToolsInvalidated(t,i.savedDto,i.sharingMode)}))}function mt(e,t,i,s){const r=e.map((e=>e.chartWidget)).filter((e=>e.hasModel())).filter((e=>e.id()===t||0!==s));try{r.forEach((e=>e.startApplyingLineToolUpdateNotification())),r.forEach((e=>e.applyLineToolUpdateNotification(i,s)))}finally{r.forEach((e=>e.endApplyingLineToolUpdateNotification()))}}function gt(e){return new P({copyRequested:(t,i)=>{e.activeChartWidget.value().model().clipboardCopy(t,i)},cutRequested:(t,i)=>{e.activeChartWidget.value().model().clipboardCut(t,i)},pasteRequested:(t,i)=>{(i?i.model().undoModel():e.activeChartWidget.value().model()).clipboardPaste(t,i)}})}function ft(e,t){0}function vt(e){const t={};return e.chartWidgetsDefs.map((e=>e.chartWidget)).forEach((e=>t[e.id()]=function(e){var t,i,r,n,o;const a={};if(!e.hasModel()){const n=e.options().content;if(!n)return a;const o=(0,s.ensureNotNull)(n.panes.reduce(((e,t)=>{var i;return null!==(i=null!=e?e:t.sources.find((e=>"MainSeries"===e.type)))&&void 0!==i?i:null}),null)) -;return a.resolution=null===(t=o.state)||void 0===t?void 0:t.interval,a.symbol=null===(i=o.state)||void 0===i?void 0:i.symbol,a.short_name=null===(r=o.state)||void 0===r?void 0:r.shortName,a}const l=e.model().mainSeries(),c=l.properties().childs(),h=l.symbolInfo();a.resolution=c.interval.value(),a.symbol_type=null!==h&&h.type||"",a.exchange=null!==h&&h.exchange||"",a.listed_exchange=null!==h&&h.listed_exchange||"";const d=null!==(n=null==h?void 0:h.legs)&&void 0!==n?n:[];if(null!==h&&l.isSpread()){const e=d[0];let t=h.base_name[0];t=t.split(":")[1],a.symbol=e,a.short_name=t,a.expression=h.full_name}else a.symbol=null!==h&&h.ticker||c.symbol.value(),a.short_name=c.shortName.value();const u=null!==(o=null==h?void 0:h.base_name)&&void 0!==o?o:[];return a.legs=d.map(((e,t)=>({symbol:e,pro_symbol:u[t]}))),a}(e))),t}function St(e,t){0}function yt(e,t){return I(t,{snapshotUrl:e}).then((e=>((0,M.emit)("onScreenshotReady",e),e)))}function bt(e,t){const i={snapshotUrl:e};const s=(0,A.isOnMobileAppPage)("any");return(s?I:x)(t,i).then((e=>((0,M.emit)("onScreenshotReady",e),s||(0,M.emit)("onServerScreenshotCopiedToClipboard"),e)))}function wt(e){return function(e){return T().then((t=>t.downloadClientScreenshot(e)))}(e)}function Ct(e){return function(e){return T().then((t=>t.copyToClipboardClientScreenshot(e)))}(e).then((()=>{(0,M.emit)("onClientScreenshotCopiedToClipboard")}))}const Pt={s:0,"2h":0,"2v":1,"2-1":1,"3s":0,"3h":0,"3v":2,4:1,6:1,8:1,"1-2":1,"3r":1,"4h":0,"4v":3,"4s":0,"5h":0,"6h":0,"7h":0,"8h":0,"1-3":1,"2-2":3,"2-3":2,"1-4":1,"5s":0,"6c":4,"8c":6};function Tt(e,t,i,s){let r=0;const n=(0,qe.createWVFromGetterAndSubscriptions)((()=>++r),[i,s]);return(0,Ge.combine)((t=>{var i;return null!==(i=e()[Pt[t]])&&void 0!==i?i:null}),t,n)}function xt(e,t,i,s){const r=Math.max(1,window.devicePixelRatio||1),n=e.getAll();let o;const a=e.maximizedChartWidget().value();if(s&&s.onlyActiveChart||a)return{layout:"s",hidpiRatio:r,theme:(0,L.getCurrentTheme)().name,charts:[e.activeChartWidget.value().images(s)],publishedBy:o};const l=[],c=k.layouts[e.layout.value()].count,h={showCollapsedStudies:(s=s||{}).showCollapsedStudies,status:s.status};for(let e=0;e{const t=this._state.currentLayoutResizeAction.value() -;t&&this._applyMouseMove(t.delta,e)},this._state=e,this._splitterElement=t,this._splitter=i,(0,re.shiftPressed)().subscribe(this._onShiftPressed)}destroy(){(0,re.shiftPressed)().unsubscribe(this._onShiftPressed)}mouseDownEvent(e){this._mouseDownOrTouchStartEvent(e)}touchStartEvent(e){this._mouseDownOrTouchStartEvent(e)}pressedMouseMoveEvent(e){this._pressedMouseOrTouchMoveEvent(e)}touchMoveEvent(e){this._pressedMouseOrTouchMoveEvent(e)}mouseUpEvent(e){this._mouseUpOrTouchEndEvent(e)}touchEndEvent(e){this._mouseUpOrTouchEndEvent(e)}mouseEnterEvent(e){this._highlightSplitters(e.shiftKey)}mouseLeaveEvent(e){const t=At(this._splitter.className);Array.from(this._state.parent.getElementsByClassName(t)).forEach((e=>e.classList.remove($e.hovered)))}mouseDoubleClickEvent(e){const t=(0,te.layoutInitialSizingState)(this._state.layoutTemplate.value().expression);this._state.undoHistory.beginUndoMacro(et),this._state.undoHistory.pushUndoCommand(new _(this._state.sizingState.spawn(),this._state.sizingState.value(),t,et));const i=this._state.layoutTemplate.value().layoutType;this._state.undoHistory.pushUndoCommand(new p((e=>e?this._state.allLayoutSizesState.set(i,e):this._state.allLayoutSizesState.delete(i)),this._state.allLayoutSizesState.get(this._state.layoutTemplate.value().layoutType),t,et)),this._state.undoHistory.endUndoMacro()}_highlightSplitters(e){const t=At(this._splitter.className);Array.from(this._state.parent.getElementsByClassName(t)).forEach((e=>e.classList.remove($e.hovered)));(e?Array.from(this._state.parent.getElementsByClassName(t)):[this._splitterElement]).forEach((e=>e.classList.add($e.hovered)))}_mouseDownOrTouchStartEvent(e){const t=new r.Point(e.localX+this._splitterElement.offsetLeft,e.localY+this._splitterElement.offsetTop),i=(0,ie.deepCopy)(this._state.sizingState.value());this._state.currentLayoutResizeAction.setValue({point:t,splitter:this._splitter,initialState:i,alignedState:this._state.layoutTemplate.value().syncSublayoutsBySplitter(this._splitter,(0,ie.deepCopy)(i)),shiftState:e.shiftKey,delta:0}),this._splitterElement.classList.add($e["i-active"]),this._highlightSplitters(e.shiftKey)}_pressedMouseOrTouchMoveEvent(e){const t=this._state.currentLayoutResizeAction.value();if(!t)return;t.shiftState!==e.shiftKey&&(this._highlightSplitters(e.shiftKey),t.shiftState=e.shiftKey);const i=new r.Point(e.localX+this._splitterElement.offsetLeft,e.localY+this._splitterElement.offsetTop);t.delta="v"===t.splitter.orientation?i.y-t.point.y:i.x-t.point.x,this._applyMouseMove(t.delta,e.shiftKey)}_mouseUpOrTouchEndEvent(e){const t=this._state.currentLayoutResizeAction.value();if(t&&(this._splitterElement.classList.remove($e["i-active"]),this._state.currentLayoutResizeAction.setValue(null),t.currentState)){this._state.undoHistory.beginUndoMacro(Qe),this._state.undoHistory.pushUndoCommand(new _(this._state.sizingState.spawn(),t.initialState,t.currentState,Qe));const e=this._state.layoutTemplate.value().layoutType -;this._state.undoHistory.pushUndoCommand(new p((t=>t?this._state.allLayoutSizesState.set(e,t):this._state.allLayoutSizesState.delete(e)),this._state.allLayoutSizesState.get(this._state.layoutTemplate.value().layoutType),this._state.sizingState.value(),et)),this._state.undoHistory.endUndoMacro(),this._state.layoutSizesChanged.setValue(!0)}}_applyMouseMove(e,t){var i;const r=(0,s.ensureNotNull)(this._state.currentLayoutResizeAction.value()),n=t?r.alignedState:r.initialState,o=null!==(i=this._state.options.padding)&&void 0!==i?i:2,a=Mt(this._state);r.currentState=this._state.layoutTemplate.value().resizeApplier(a,o,e,r.splitter,(0,ie.deepCopy)(n),t),this._state.sizingState.setValue(r.currentState)}}function kt(e,t,i,s,r){var n,o;const a=null!==(n=e.options.padding)&&void 0!==n?n:2,l=null!==(o=e.options.border)&&void 0!==o?o:0;r=null!=r?r:e.layoutTemplate.value();const c=Mt(e),h=r.sizer(c,i,s,a+l,Ke?e.sizingState.value():void 0);h.width=Math.max(Math.round(h.width),0),h.height=Math.max(Math.round(h.height),0),h.top=Math.round(h.top),h.left=Math.round(h.left),t.metrics=h;const d=t.container.value();if(d){d.style.width=h.width+"px",d.style.height=h.height+"px",d.style.top=h.top+"px",d.style.left=h.left+"px";const e=1===s;false;const t=Math.round(c.width),i=0===h.top&&0===h.left,r=0===h.top&&h.left+h.width===t,n=0===h.top&&h.width===t;d.classList.toggle("top-left-chart",!e&&!n&&i),d.classList.toggle("top-right-chart",!e&&!n&&r),d.classList.toggle("top-full-width-chart",e||n)}t.width.setValue(h.width),t.height.setValue(h.height)}function Et(e){var t,i,s;let r;const n=e.layoutTemplate.value(),o=e.maximizedChartDef.value();if(r=o?[o]:e.chartWidgetsDefs.slice(0,n.count).filter((e=>!e.hiddenInLayout.value())),r.forEach(((t,i)=>kt(e,t,i,r.length))),Ke&&!e.maximizedChartDef.value()){const r=Mt(e),o=null!==(t=e.options.padding)&&void 0!==t?t:2,a=null!==(i=e.options.border)&&void 0!==i?i:0,l=n.splitters(r,o+a,e.sizingState.value()),c=null!==(s=e.splitters.value())&&void 0!==s?s:[];c.forEach(((e,t)=>{t>=l.length&&(e.splitterElement.remove(),e.mouseHandler.destroy(),e.mouseListener.destroy())}));const h=l.map(((t,i)=>{const s=i({def:t,metrics:e.layoutTemplate.value().sizer({top:0,left:0,width:256,height:256},i,s.length,0) -}))).sort(((e,t)=>e.metrics.top-t.metrics.top||e.metrics.left-t.metrics.left)).map((e=>e.def));if(s.length<2)return null;let r=s.indexOf(t);return-1===r?null:(r=(r+(i?s.length-1:1))%s.length,s[r])}function Vt(e,t){return e.chartWidgetsDefs.some((e=>{var i;return(null===(i=e.chartWidget)||void 0===i?void 0:i.id())===t}))}function Bt(e){let t=1;for(;e(""+t);)t++;return""+t}function Rt(e){const t=e.activeChartWidget.value();if(t){const i=t.state();return i.chartId=Bt((t=>Vt(e,t))),i.shouldBeSavedEvenIfHidden=!1,{content:i}}}function Nt(e,t,i){const r=e.toastsFactory;let n={chartWidgetCollection:t,isActive:0===e.chartWidgetsDefs.length,barsMarksContainersFactory:t=>function(e,t,i){const s=[];{const t=new He(e);s.push(t);const i=new Be(e);s.push(i)}return s}(t,0,e.options),undoHistory:e.undoHistory,readOnly:e.readOnly,initialLoading:e.initialLoading,getToasts:r?()=>r.getChartToasts():void 0,...null!=i?i:{}};void 0!==e.customLegendWidgetsFactoriesMap&&(n.customLegendWidgetFactories=new Map(e.customLegendWidgetsFactoriesMap));const o=document.createElement("div");o.classList.add("chart-container"),o.style.position="absolute",o.style.overflow="hidden",e.parent.appendChild(o),l.isEdge&&(o.style.touchAction="none",o.style.msTouchAction="none"),n.className&&o.classList.add(n.className);const a={alive:new Ye(!0),container:new Ye(o),width:new Ye,height:new Ye,collapsed:new Ye(!1),hiddenInLayout:new Ye(!1),visible:new Ye,rdState:new Q.ResizerDetacherState,requestFullscreen:()=>{e.globalDetachable.value()&&(e.setMaximized(a),e.activeChartWidget.setValue((0,s.ensureNotNull)(a.chartWidget)))},exitFullscreen:()=>{e.activeChartWidget.value()===a.chartWidget&&e.setMaximized(null)},detachable:e.globalDetachable,fullscreenable:e.globalDetachable,fullscreen:new Ye,chartWidget:null};a.rdState.pushOwner(a),e.chartWidgetsDefs.push(a);const c=()=>{a.visible.setValue(!a.hiddenInLayout.value()&&e.options.resizerBridge.visible.value())};a.hiddenInLayout.subscribe((()=>{(0,s.ensureNotNull)(a.chartWidget).setVisible(!a.hiddenInLayout.value()),c()})),a.collapsed.subscribe((()=>(0,s.ensureNotNull)(a.chartWidget).setCollapsed(a.collapsed.value()))),e.options.resizerBridge.visible.subscribe(c),c(),function(e,t){let i=0,s=0;const r=t.layoutTemplate.value();for(let n=0;nVt(e,t))),d=new ee.ChartWidget(n,h,t.metaInfo.uid.value());return a.chartWidget=d,e.saveChartService&&a.chartWidget.setSaveChartService(e.saveChartService),n.containsData?d.finishInitWithoutConnect():d.connect(),d.withModel(null,(()=>{const t=d.model().model();e.customSources.forEach(((e,i)=>{t.addCustomSource(i,e.factory,e.layer)}))})),e.updateWatchedValue(),e.updateActivityView(),e.chartWidgetCreatedDelegate.fire(d),a}function Ot(e,t,i,s){const r={...e.widgetOptions,...e.savedChartWidgetOptions.shift()||Rt(e),...0===i||e.symbolLock.value()?void 0:{defSymbol:null}},n=Nt(e,t,r),o=n.chartWidget -;return o.modelCreated().subscribe(null,(()=>{s?s():e.checkAllPendingModelsAlreadyCreated(),e.dateRangeLock.value()&&o===e.activeChartWidget.value()&&e.subscribeToCompletedEventForDateRangeSync(o,!0)}),!0),n}function Ft(e){e.hiddenInLayout.setValue(!0);const t=e.container.value();t.parentNode&&t.parentNode.removeChild(t),e.fullscreen.setValue(!1)}function Wt(e,t){e.chartWidgetsDefs.forEach((i=>{const r=(0,s.ensureNotNull)(i.chartWidget);r.onZoom().unsubscribeAll(t),r.onScroll().unsubscribeAll(t),r.withModel(null,(()=>{const t=r.lineToolsSynchronizer();null!==t&&(t.hasChanges().unsubscribe(e.recalcHasChanges),e.recalcHasChanges())}))}))}async function Ht(e,t,i){var r,n;try{const t=e.chartWidgetsDefs.map((e=>{var t,i,s;return null!==(s=null===(i=null===(t=e.chartWidget)||void 0===t?void 0:t.lineToolsSynchronizer())||void 0===i?void 0:i.flushPendingSavings())&&void 0!==s?s:null})).filter(ae.notNull);t.length&&await Promise.all(t)}catch(e){Xe.logError(`Error flushing line tools: ${e}`)}(t=e.checkProFeature(t))in k.layouts||(t="s"),Wt(e,i);const o=e.layoutType,a=k.layouts[t].count;(0,M.emit)("layout_about_to_be_changed",t),(null!==(r=e.splitters.value())&&void 0!==r?r:[]).forEach(((e,t)=>{e.splitterElement.remove(),e.mouseHandler.destroy()})),e.splitters.setValue([]);const l=k.layouts[t];e.layoutTemplate.setValue(l);const c=null!==(n=e.allLayoutSizesState.get(l.layoutType))&&void 0!==n?n:(0,te.layoutInitialSizingState)(l.expression);e.allLayoutSizesState.set(l.layoutType,c),e.sizingState.setValue(c);const h=e.maximizedChartDef.value();o!==t&&e.maximizedChartDef.value()&&e.maximizedChartDef.setValue(null),h&&e.activeChartWidget.setValue((0,s.ensureNotNull)(h.chartWidget));for(let t=0;t=a;if(r=e.maximizedChartDef.value()?e.maximizedChartDef.value()===n:t1),n.fullscreen.setValue(e.maximizedChartDef.value()===n),n.collapsed.setValue(o)}else n&&(Ft(n),n.collapsed.setValue(o))}e.sizingState.setValue(c),Et(e),e.layoutWV.setValue(t),e.setLayoutType(t),e.updateWatchedValue(),function(e){const t=e.layoutTemplate.value().count;e.inlineChartsCount.setValue(t),e.globalDetachable.setValue(t>1)}(e),e.checkAllPendingModelsAlreadyCreated(),function(e,t){e.chartWidgetsDefs.forEach((i=>{const r=(0,s.ensureNotNull)(i.chartWidget);r.onZoom().subscribe(t,(t=>e.onZoom.fire(t))),r.onScroll().subscribe(t,(()=>e.onScroll.fire())),r.withModel(null,(()=>{const t=r.lineToolsSynchronizer();null!==t&&(t.hasChanges().subscribe(e.recalcHasChanges),e.recalcHasChanges())}))}))}(e,i),e.inlineChartsCount.value()<1&&a>0&&e.chartWidgetsDefs[a-1].rdState.bridge().attach()}function zt(e,t,i,s,r){ -if(!s&&!e.crosshairLockRaw)return!1;const n=e.actualLayoutCount();return e.chartWidgetsDefs.slice(0,n).filter((e=>e.rdState.bridge().visible.value())).map((e=>e.chartWidget)).filter((e=>e.id()!==i&&e.hasModel())).forEach((e=>e.model().model().setExternalPosition(t,r))),!0}function Ut(e,t,i,s,r){if(zt(e,t,i,s,r)){const i=e.crossHairSyncBroadcast;if(i){const e={type:"crosshair",payload:{point:t,envState:r,sourceUniqueId:i.uniqueId}};i.channel.postMessage(e)}}}function jt(e){const t=new BroadcastChannel("ChartWidgetsCollection");return t.onmessage=t=>{const i=t.data,s=e();if(s.crossHairSyncBroadcast&&"crosshair"===i.type)s.crossHairSyncBroadcast.uniqueId!==i.payload.sourceUniqueId&&zt(s,i.payload.point,null,!1,i.payload.envState)},{channel:t,uniqueId:(0,J.randomHashN)(6)}}function Gt(e){var t;null===(t=e.crossHairSyncBroadcast)||void 0===t||t.channel.close()}function qt(e,t,i){if(!e.trackTimeLock.value()||e.dateRangeLock.value())return;const s=e.layoutTemplate.value().count;e.undoHistory.beginUndoMacro(Je),e.chartWidgetsDefs.slice(0,s).filter((e=>e.chartWidget.hasModel()&&e.chartWidget.model().model()!==i)).forEach((e=>{const i=e.chartWidget.model().model(),s=i.mainSeries().syncModel();s&&i.syncTimeWithModel(s.syncSourceTarget(),t)})),e.undoHistory.endUndoMacro()}function $t(e){return Promise.all(e.map((e=>{const t=e.model().mainSeries();return t.symbolResolvingActive().value()?h(t.dataEvents().symbolResolved()).promise:t.symbolInfo()})))}function Yt(e){return e.chartWidgetsDefs.every((e=>e.chartWidget.hasModel()))?Promise.resolve(e.chartWidgetsDefs.map((e=>e.chartWidget))):Promise.all(e.chartWidgetsDefs.map((e=>e.chartWidget.hasModel()||h(e.chartWidget.modelCreated()).promise))).then((()=>Yt(e)))}function Kt(e,t){var i;if((0,c.enabled)("charting_library_base"))return t;if("s"===t||e.widgetOptions.containsData||e.readOnly||isProductFeatureEnabled(ProductFeatures.MULTIPLE_CHARTS)&&(0,s.ensure)(null===(i=getProductFeatureConfig(ProductFeatures.MULTIPLE_CHARTS))||void 0===i?void 0:i.limit)>=k.layouts[t].count)return t;return"s"}async function Xt(e,t,i){if(i=Kt(e,i),e.layoutWV.value()===i)return!1;const s=e.chartWidgetsDefs.map((e=>{var t,i,s;return null!==(s=null===(i=null===(t=e.chartWidget)||void 0===t?void 0:t.lineToolsSynchronizer())||void 0===i?void 0:i.flushPendingSavings())&&void 0!==s?s:null})).filter(ae.notNull);if(s.length)try{await Promise.all(s)}catch(e){Xe.logError(`Error flushing line tools: ${e}`)}return e.undoHistory.pushUndoCommand(new oe(t,i)),!0}async function Zt(e,t,i){const{theme:s,onlyActiveChart:r,restoreNonThemeDefaults:n,themeName:o,standardTheme:a,syncState:l=!0,noUndo:c}=i,h=(0,L.getCurrentTheme)().name;let d;r?d=[e.activeChartWidget.value()]:(await Promise.all(e.savedChartWidgetOptions.map(((i,s)=>new Promise((i=>{Ft(Ot(e,t,s,i))}))))),d=e.chartWidgetsDefs.map((e=>e.chartWidget))),c?(a&&new je(h,o,l).redo(),d.forEach((e=>{e.model().model().restoreTheme(s,n,c)}))):(e.undoHistory.beginUndoMacro(tt),a&&e.undoHistory.pushUndoCommand(new je(h,o,l)),d.forEach((e=>{e.model().model().restoreTheme(s,n) -})),e.undoHistory.endUndoMacro())}function Jt(e,t){e.symbolLock.setValue(t)}function Qt(e,t){const{internalSymbolLock:i,activeChartWidget:s,undoHistory:r,chartWidgetsDefs:n,dateRangeLock:o,loadingContent:a}=e;if(t!==i.value())if(a)i.setValue(t);else{if(e.undoHistory.beginUndoMacro(it),t){const t=s.value(),i=t.getSymbol();for(let s=0;s{"use strict";i.r(t),i.d(t,{setChartFontFamily:()=>r,CHART_FONT_FAMILY:()=>n,CHART_MONOSPACE_FONT_FAMILY:()=>o});const s="'Trebuchet MS', Roboto, Ubuntu, sans-serif";function r(e){n=e}let n=`-apple-system, BlinkMacSystemFont, ${s}`;const o="monospace"},72005:(e,t,i)=>{"use strict";var s=i(26867);i(51226);var r=i(47539).TranslatedString,n=i(50151),o=n.assert,a=n.ensureDefined,l=i(46936).Series,c=i(2484),h=i(50792).ActionBinder,d=i(56840).setValue,u=i(35936).TabNames,p=i(68009).showGoToDateDialog,_=i(68335),m=i(66141),g=i(68927).Study,f=i(46289).StudyStub,v=i(89215).isStudy,S=i(10971).LineDataSource,y=i(6250),b=y.isLineTool,w=y.isStudyLineTool,C=i(83421).STUDYPLOTDISPLAYTARGET,P=i(43986).Action,T=i(62923).ACTION_ID,x=i(76076),I=i(578).Interval,M=i(1930),A=M.getDefaultStyle,L=M.hasVolume,k=i(29628).showSymbolInfoDialog,E=i(36646).InvalidationMask,D=i(82992).linking,V=i(84603).showChangeIntervalDialogAsync,B=i(68121).showDialog,R=i(20364),N=R.availableTimezones,O=R.timezoneIsAvailable,F=i(90995).toggleHideMode,W=i(58403).StudyMetaInfo,H=i(51768).trackEvent,z=i(78996).lastMouseOrTouchEventInfo,U=i(64548);const{viewportChangeEvent:j}=i(97425),{SelectPointMode:G}=i(76076),{ReplayStatus:q}=i(14948);var $=i(98351).getLogger("ChartWidget",{color:"#606" -}),Y=i(86339).appendEllipsis,K=i(57737).isMultipleLayout,X=i(19334).addPerfMark,Z=i(52865).combineProperty,J=i(46719).ChartWidgetBase,Q=i(49483).CheckMobile.any(),ee=i(45673).TIMEFRAMETYPE,te=i(71668).createDeferredPromise,ie=i(87172).addPlusButtonProperty;const se=c.enabled("show_average_close_price_line_and_label");var re=new r("change timezone",i(44352).t(null,void 0,i(20505))),ne=new r("scale price chart only",i(44352).t(null,void 0,i(99042))),oe=new r("stay in drawing mode",i(44352).t(null,void 0,i(52010))),ae=(new r("hide all drawing tools",i(44352).t(null,void 0,i(54781))),new r("hide marks on bars",i(44352).t(null,void 0,i(44974)))),le=new r("change symbol last value visibility",i(44352).t(null,void 0,i(53150))),ce=(new r("change symbol previous close value visibility",i(44352).t(null,void 0,i(12707))),new r("change previous close price line visibility",i(44352).t(null,void 0,i(59883))),new r("change symbol labels visibility",i(44352).t(null,void 0,i(9402)))),he=new r("change indicators name labels visibility",i(44352).t(null,void 0,i(87027))),de=new r("change indicators value labels visibility",i(44352).t(null,void 0,i(14922))),ue=(new r("change bid and ask labels visibility",i(44352).t(null,void 0,i(5100))),new r("change bid and ask lines visibility",i(44352).t(null,void 0,i(32311))),new r("change pre/post market price label visibility",i(44352).t(null,void 0,i(49889))),new r("change pre/post market price line visibility",i(44352).t(null,void 0,i(16750))),new r("change high and low price lines visibility",i(44352).t(null,void 0,i(92556)))),pe=new r("change high and low price labels visibility",i(44352).t(null,void 0,i(66805))),_e=new r("change average close price line visibility",i(44352).t(null,void 0,i(98866))),me=new r("change average close price label visibility",i(44352).t(null,void 0,i(39402))),ge=new r("change countdown to bar close visibility",i(44352).t(null,void 0,i(58108))),fe=new r("change plus button visibility",i(44352).t(null,void 0,i(50190))),ve=new r("change price line visibility",i(44352).t(null,void 0,i(67761))),Se=new r("unlock {title}",i(44352).t(null,void 0,i(92421))),ye=new r("lock {title}",i(44352).t(null,void 0,i(50193))),be=new r("change session breaks visibility",i(44352).t(null,void 0,i(15403))),we=i(44352).t(null,void 0,i(15241)),Ce=i(44352).t(null,void 0,i(29404)),Pe=i(44352).t(null,void 0,i(44302)),Te=i(44352).t(null,void 0,i(94338));e.exports.ChartWidget=class extends J{constructor(e,t,i){super(e,t,i),this._options.timeScaleWidget&&(this._options.timeScaleWidget.pressedMouseMoveScale=this._options.handleScale.axisPressedMouseMove.time);var r=this,n=this._options.content,o=this._options.readOnly;this._removeMaximizeHotkey=null,r._hotkeys=m.createGroup({desc:"Chart actions",isDisabled:function(){return!r._isActive}});var a=this._options.containsData,l=this._options.onWidget,c=this._options.onCmeWidget;c&&$.logWarn("[ChartWidget] 'onCmeWidget' option is depricated") -;var h=this._options.widgetCustomer,d=this._options.timezone,u=this._options.hideSymbolSearch,p=this._options.defSymbol,_=I.isValid(this._options.defInterval)?this._options.defInterval:void 0,g=parseInt(this._options.defStyle),f=M.isValidStyle(g)?g:void 0,v=this._options.defSessionId,S=void 0!==this._options.defTimeframe?"string"==typeof this._options.defTimeframe?{value:this._options.defTimeframe.toUpperCase(),type:ee.PeriodBack}:{...this._options.defTimeframe,type:ee.TimeRange}:void 0;this._content=n,this._initialLoading=this._options.initialLoading,this._readOnly=o,this._containsData=a,this._defSymbol=p,this._defInterval=_,this._defTimeframe=S,this._defStyle=f,this._onWidget=!!l,this._compareSymbols=this._options.compareSymbols,this._onWidget&&(c?this._widgetCustomer="cme":h&&(this._widgetCustomer=h)),this._hideSymbolSearch=u,this._frameTime=30,this._model=null,this._metaInfo={},this._drawRafId=0,this._compareDialog=this._chartWidgetCollection.getCompareDialogRenderer();var y=this._contentSeriesProperties();y&&(p=y.symbol,_=y.interval),void 0===this._options.useUserChartPreferences&&(this._options.useUserChartPreferences=!0);var b="chartproperties.mainSeriesProperties",w=this._options.useUserChartPreferences?U.defaults(b):U.factoryDefaults(b);this._properties.mainSeriesProperties.merge(w),this._properties.mainSeriesProperties.hasChild("esdBreaksStyle")&&this._properties.mainSeriesProperties.removeProperty("esdBreaksStyle"),_=_||w.interval||"D",M.isValidStyle(f)||(f=M.isValidStyle(w.style)?w.style:A(I.isRange(_))),this._properties.mainSeriesProperties.merge({visible:!0,symbol:p||DEFAULT_SYMBOL,shortName:"",timeframe:"",onWidget:this._onWidget,interval:_,currencyId:null,unitId:null,style:f,sessionId:v,lineStyle:{styleType:U.factoryDefaults("chartproperties.mainSeriesProperties.lineStyle.styleType")}}),this._containsData&&this._properties.mainSeriesProperties.merge({showCountdown:!1}),d&&O(d)&&this._properties.timezone.setValue(d),this._tagsChanged=new s,this._timingsMeter=null,this._isActive=this._options.isActive,this._options.container.subscribe((function(e){r._setElement(e)}),{callWithLast:!0});var C=function(){r.resize()};this._options.width.subscribe(C),this._options.height.subscribe(C),this._options.visible.subscribe(this._updateTimingsMeterState.bind(this)),this._aboutToBeDestroyed=new s,this._actions=null,this._definitionsViewModel=null,this._backgroundTopColorSpawn=null,this._backgroundBottomColorSpawn=null,this._hintDefferedPromise=null,this._activeHint=null}isInitialized(){return Boolean(this._inited)}compareSymbols(){return this._compareSymbols}async _getChartPropertyDefinitionsViewModel(){if(null===this._definitionsViewModel){const{ChartPropertyDefinitionsViewModel:e}=await Promise.all([i.e(6803),i.e(1626),i.e(892),i.e(8622),i.e(3596)]).then(i.bind(i,25008));if(this._isDestroyed)throw new Error("Chart widget already destroyed");await new Promise((e=>this.withModel(null,e))),null===this._definitionsViewModel&&(this._definitionsViewModel=new e(this.model(),this.properties(),this._options))} -return this._definitionsViewModel}_initMaximizeHotkey(e){var t=this;function i(e){e.defaultPrevented||_.modifiersFromEvent(e)===_.Modifiers.Alt&&e.stopPropagation()}function s(e){e.defaultPrevented||_.modifiersFromEvent(e)===_.Modifiers.Alt&&(e.preventDefault(),e.stopPropagation(),t.toggleFullscreen())}return e.addEventListener("mousedown",i,!0),e.addEventListener("click",s,!0),function(){e.removeEventListener("mousedown",i,!0),e.removeEventListener("click",s,!0)}}toggleFullscreen(){var e=this.getResizerDetacher();e.fullscreenable.value()&&(e.fullscreen.value()?e.exitFullscreen():e.requestFullscreen())}_beginRequestActive(){var e=this._chartWidgetCollection.activeChartWidget.value()!==this;if(this._chartWidgetCollection.activeChartWidget.setValue(this),e){const e=z();e.isTouch&&!e.stylus&&this._isLineToolModeExceptBrush()&&this.updateCrossHairPositionIfNeeded(),this._justActivated=!0}}_endRequestActive(){var e=this;this._justActivated&&setTimeout((function(){e._justActivated=!1}),0)}_requestActive(){this._beginRequestActive(),this._endRequestActive()}justActivated(){return this._justActivated}setTimezone(e){e&&O(e)?this._properties.timezone.setValue(e):console.warn("Incorrect timezone: "+JSON.stringify(e))}getTimezone(){return this._properties.timezone.value()}refreshMarks(){this.model().barsMarksSources().forEach((function(e){e.refreshData()}))}clearMarks(){this.model().barsMarksSources().forEach((function(e){e.clearMarks()}))}metaInfoRepository(){return this._metaInfoRepository}_initBackgroundColor(){null===this._backgroundTopColorSpawn&&(this._backgroundTopColorSpawn=this._model.model().backgroundTopColor().spawn(),this._backgroundTopColorSpawn.subscribe(this._onBackgroundColorChanged.bind(this))),null===this._backgroundBottomColorSpawn&&(this._backgroundBottomColorSpawn=this._model.model().backgroundColor().spawn(),this._backgroundBottomColorSpawn.subscribe(this._onBackgroundColorChanged.bind(this)))}paneWidgets(){return this._paneWidgets}paneByCanvas(e){for(var t=0;t{null!==e&&t()}))}));var t=new P({actionId:T.ChartScalesReset,label:i(44352).t(null,void 0,i(34301)),icon:i(39267),statName:"ResetChart",onExecute:this.GUIResetScales.bind(this),hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Alt+82}),s=new P({actionId:T.ChartSeriesPriceScaleToggleInvertPriceScale,label:i(44352).t(null,void 0,i(53239)),statName:"Invert Scale",checkable:!0,onExecute:function(){e._model.invertPriceScale(e._model.mainSeries().priceScale())},hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Alt+73}),r=new P({actionId:T.ChartSeriesPriceScaleToggleAutoScale,label:i(44352).t(null,void 0,i(50834)),checkable:!0,onExecute:function(){var t=e._model.mainSeries().priceScale();e._model.togglePriceScaleAutoScaleMode(t),r.update({checked:t.isAutoScale()})}}),n=new P({actionId:T.ChartScalesToggleLockPriceToBarRatio,label:i(44352).t(null,void 0,i(18219)),checkable:!0,statName:"ToggleLockScale",onExecute:function(){e._model.togglePriceScaleLockScaleMode(e._model.mainSeries().priceScale())}}),o=new P({actionId:T.ChartSeriesPriceScaleToggleRegular,label:i(44352).t(null,{context:"scale_menu"},i(72116)),checkable:!0,statName:"ToggleRegularScale",onExecute:function(){var t=e._model.mainSeries().priceScale();e._model.setPriceScaleRegularScaleMode(t),o.update({checked:t.isRegular()})}}),a=new P({actionId:T.ChartSeriesPriceScaleTogglePercentage,label:i(44352).t(null,void 0,i(51102)),checkable:!0,statName:"TogglePercantage",onExecute:function(){ -e._model.togglePriceScalePercentageScaleMode(e._model.mainSeries().priceScale())},hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Alt+80}),l=new P({actionId:T.ChartSeriesPriceScaleToggleIndexedTo100,label:i(44352).t(null,void 0,i(20062)),checkable:!0,statName:"ToggleIndexedTo100",onExecute:function(){e._model.togglePriceScaleIndexedTo100ScaleMode(e._model.mainSeries().priceScale())}}),g=new P({actionId:T.ChartSeriesPriceScaleToggleLogarithmic,label:i(44352).t(null,void 0,i(12285)),statName:"ToggleLogScale",checkable:!0,onExecute:function(){e._model.togglePriceScaleLogScaleMode(e._model.mainSeries().priceScale())},hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Alt+76}),f=new P({actionId:T.ChartUndo,label:i(44352).t(null,void 0,i(81320)),onExecute:function(){H("GUI","Undo"),e._model.undoHistory().undo()},disabled:!0,hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Mod+90}),v=new P({actionId:T.ChartRedo,label:i(44352).t(null,void 0,i(41615)),onExecute:function(){H("GUI","Redo"),e._model.undoHistory().redo()},disabled:!0,hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Mod+89});e.withModel(null,(function(){e._model.undoHistory().undoStack().onChange().subscribe(e,e.updateUndoRedo),e._model.undoHistory().redoStack().onChange().subscribe(e,e.updateUndoRedo)}));var S=new P({actionId:T.ChartChangeTimeZone,label:i(44352).t(null,void 0,i(64375)),statName:"TimeZone"}),y=new P({actionId:T.ChartDialogsShowChangeSymbol,label:Y(i(44352).t(null,void 0,i(28089))),statName:"ChangeSymbol",onExecute:function(){B({defaultValue:""})}});d("symboledit.dialog_last_entry","");var b={actionId:T.ChartDialogsShowChangeInterval,label:Y(i(44352).t(null,void 0,i(99374))),statName:"ChangeInterval",onExecute:function(){V({initVal:D.interval.value(),selectOnInit:!0})}};!c.enabled("show_interval_dialog_on_key_press")||this.readOnly()||this._hideSymbolSearch||(b.shortcutHint=",",b.hotkeyGroup=this._hotkeys,b.hotkeyHash=188);var w,C=new P(b);if(!TradingView.onWidget()){if(this._options.addToWatchlistEnabled){const e={hotkeyGroup:this._hotkeys};w=new WatchListAction(this,e)}0}var I=new P({actionId:T.ChartTimeScaleReset,label:i(44352).t(null,void 0,i(25333)),icon:i(39267),statName:"ResetScale",onExecute:function(){e.model().resetTimeScale()},hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Mod+m.Modifiers.Alt+81}),M=new P({actionId:T.ChartRemoveAllIndicators,label:i(44352).t(null,void 0,i(13951)),statName:"RemoveAllIndicators",onExecute:this.removeAllStudies.bind(this)}),A=new P({actionId:T.ChartRemoveAllLineTools,label:i(44352).t(null,void 0,i(1434)),statName:"RemoveAllDrawingTools",onExecute:this.removeAllDrawingTools.bind(this)}),L=new P({actionId:T.ChartRemoveAllIndicatorsAndLineTools,label:i(44352).t(null,void 0,i(97305)),statName:"RemoveAllIndicatorsAndDrawingTools",onExecute:this.removeAllStudiesDrawingTools.bind(this)}),R=this.chartWidgetCollection(),N=new P({actionId:T.ChartApplyIndicatorsToAllCharts,label:i(44352).t(null,void 0,i(95910)),statName:"ApplyIndicatorsToAllCharts",onExecute:function(){R.applyIndicatorsToAllCharts(e)}}),O={ -actionId:T.ChartDialogsShowInsertIndicators,label:Y(i(44352).t(null,void 0,i(98767))),statName:"InsertIndicator",onExecute:function(){e.showIndicators()}};this._options.indicatorsDialogShortcutEnabled&&(O.hotkeyGroup=this._hotkeys,O.hotkeyHash=191,this._hotkeys.add({handler:function(){this.showIndicators()}.bind(this),desc:"Show insert indicator dialog",hotkey:111}));var W,z=new P(O),U=new P({actionId:T.ChartDialogsShowCompareOrAddSymbol,label:Y(i(44352).t(null,void 0,i(20229))),statName:"CompareOrAddSymbol",onExecute:this.toggleCompareOrAdd.bind(this)}),G=new P({actionId:T.ChartObjectTreeShow,label:Y(i(44352).t(null,void 0,i(675))),statName:"ObjectsTree",onExecute:this.showObjectsTreePanelOrDialog.bind(this)}),q=new P({actionId:T.ChartDialogsShowGeneralSettings,label:Y(i(44352).t(null,void 0,i(89517))),icon:i(51983),statName:"ChartProperties",onExecute:function(){e.showGeneralChartProperties()}}),$=new P({actionId:T.ChartDialogsShowGeneralSettingsSymbolTab,label:Y(i(44352).t(null,void 0,i(89517))),icon:i(51983),statName:"MainSeriesProperties",onExecute:function(){e.showGeneralChartProperties(u.symbol)}}),K=new P({actionId:T.ChartSelectedObjectToggleLocked,label:i(44352).t(null,void 0,i(1441)),statName:"ToggleLockSelectedObject",onExecute:this.toggleLockSelectedObject.bind(this)}),X=new P({actionId:T.ChartSelectedObjectHide,label:i(44352).t(null,void 0,i(31971)),icon:i(84959),statName:"HideSelectedObject",onExecute:this.hideSelectedObject.bind(this)});c.enabled("property_pages")&&(W=new P({actionId:T.ChartSelectedObjectShowSettingsDialog,label:Y(i(44352).t(null,void 0,i(89517))),icon:i(51983),statName:"EditSelectedObject",onExecute:function(){e.showSelectedSourcesProperties()}})),this.withModel(null,(function(){var t=e.model().mainSeries(),i=t.properties();i.priceAxisProperties.subscribe(e,e._updateScalesActions),t.priceScaleAboutToBeChanged().subscribe(e,(function(){i.priceAxisProperties.unsubscribeAll(e)})),t.priceScaleChanged().subscribe(e,(function(){i.priceAxisProperties.subscribe(e,e._updateScalesActions),e._updateScalesActions()}))}));var J=new P({actionId:T.ChartPriceScaleToggleAutoScaleSeriesOnly,label:i(44352).t(null,void 0,i(37207)),checkable:!0,statName:"ScalePriceChartOnly"});J.binder=new h(J,this._properties.scalesProperties.scaleSeriesOnly,this.model(),ne);var Q=this.model().model();this._properties.scalesProperties.scaleSeriesOnly.listeners().subscribe(null,(function(){Q.recalculateAllPanes(j()),Q.invalidate(E.full())}));var ee=new P({actionId:T.ChartDrawingToolbarToggleVisibility,label:i(44352).t(null,void 0,i(22903)),checkable:!0,statName:"ToggleDrawingToolbar"}),te=this._options.isDrawingToolbarVisible;te&&(te.subscribe((function(e){ee.update({checked:e})}),{callWithLast:!0}),ee.update({onExecute:function(){te.setValue(!te.value())}}));var re=new P({actionId:"",label:i(44352).t(null,void 0,i(93161)),checkable:!0,statName:"ToggleStayInDrawingMode"});re.binder=new h(re,x.properties().stayInDrawingMode,this.model(),oe),this._hotkeys.add({handler:function(){F()},desc:"Hide all drawing tools", -hotkey:m.Modifiers.Mod+m.Modifiers.Alt+72});var Se=new P({actionId:T.ChartMarksToggleVisibility,label:i(44352).t(null,void 0,i(2441)),checkable:!0,statName:"ToggleHideMarksOnBars"});Se.binder=new h(Se,x.hideMarksOnBars(),this.model(),ae,(function(){x.hideMarksOnBars().setValue(this.value())}));const ye=this.properties().scalesProperties;var be=new P({actionId:T.ChartPriceScaleLabelsToggleSeriesLastValueVisibility,label:i(44352).t(null,void 0,i(52054)),checkable:!0,checked:!1,statName:"ToggleSymbolLastValue"});be.binder=new h(be,ye.showSeriesLastValue,this.model(),le);var xe=new P({actionId:T.ChartPriceScaleLabelsToggleSymbolNameLabelsVisibility,label:i(44352).t(null,void 0,i(90932)),checkable:!0,checked:!1,statName:"ToggleSymbolLabels"});xe.binding=new h(xe,ye.showSymbolLabels,this.model(),ce);const Ie=Z(((e,t)=>e||!1),ye.showStudyLastValue,ye.showFundamentalLastValue);var Me=new P({actionId:T.ChartPriceScaleLabelsToggleIndicatorsValueLabelsVisibility,label:i(44352).t(null,void 0,i(81584)),checkable:!0,checked:!1,statName:"ToggleStudiesAndFundamentalsPriceLabels"});Me.binder=new h(Me,Ie,this.model(),null,(()=>{const e=!Ie.value();this.model().beginUndoMacro(de),this.model().setProperty(ye.showStudyLastValue,e,null),this.model().endUndoMacro()}));const Ae=Z(((e,t)=>e||!1),ye.showStudyPlotLabels,ye.showFundamentalNameLabel);var Le=new P({actionId:T.ChartPriceScaleLabelsToggleIndicatorsNameLabelsVisibility,label:i(44352).t(null,void 0,i(31485)),checkable:!0,checked:!1,statName:"ToggleStudiesAndFundamentalsNameLabels"});Le.binding=new h(Le,Ae,this.model(),null,(()=>{const e=!Ae.value();this.model().beginUndoMacro(he),this.model().setProperty(ye.showStudyPlotLabels,e,null),this.model().endUndoMacro()}));var ke=this.model().mainSeries().properties().highLowAvgPrice,Ee=new P({actionId:T.ChartPriceScaleLabelsToggleHighLowPriceLabelsVisibility,label:i(44352).t(null,void 0,i(60259)),checkable:!0,checked:!1,statName:"ToggleHighLowPriceLabels"});Ee.binding=new h(Ee,ke.highLowPriceLabelsVisible,this.model(),pe);var De=new P({actionId:T.ChartLinesToggleHighLowLinesVisibility,label:i(44352).t(null,void 0,i(21803)),checkable:!0,checked:!1,statName:"ToggleHighLowPriceLine"});if(De.binding=new h(De,ke.highLowPriceLinesVisible,this.model(),ue),se){var Ve=new P({actionId:T.ChartPriceScaleLabelsToggleAveragePriceLabelVisibility,label:i(44352).t(null,void 0,i(8975)),checkable:!0,checked:!1,statName:"ToggleAverageClosePriceLabel"});Ve.binding=new h(Ve,ke.averageClosePriceLabelVisible,this.model(),me);var Be=new P({actionId:T.ChartLinesToggleAverageLineVisibility,label:i(44352).t(null,void 0,i(87899)),checkable:!0,checked:!1,statName:"ToggleAverageClosePriceLine"});Be.binding=new h(Be,ke.averageClosePriceLineVisible,this.model(),_e)}var Re=new P({actionId:T.ChartPriceScaleToggleCountdownToBarCloseVisibility,label:i(44352).t(null,void 0,i(94370)),checkable:!0,checked:!1,statName:"ToggleCountdown"});Re.binder=new h(Re,this.model().mainSeries().properties().showCountdown,this.model(),ge);var Ne=new P({ -actionId:T.ChartPriceScaleToggleAddOrderPlusButtonVisibility,label:i(44352).t(null,void 0,i(97378)),checkable:!0,checked:ie.value(),statName:"ToggleAddOrderPlusButton"});Ne.binder=new h(Ne,ie,this.model(),fe);var Oe=null;this._options.goToDateEnabled&&(Oe=new P({actionId:T.ChartDialogsShowGoToDate,label:Y(i(44352).t(null,void 0,i(75190))),statName:"GoToDate",onExecute:function(){var t=e._chartWidgetCollection.activeChartWidget.value();p(t)},hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Alt+71}));var Fe=new P({actionId:T.ChartDialogsShowSymbolInfo,label:Y(i(44352).t(null,void 0,i(65986))),icon:i(37924),checkable:!1,statName:"SymbolInfo",onExecute:function(){var t=e.model().model(),i=t.mainSeries().symbol(),s=t.mainSeries().symbolInfo(),r=t.availableUnits(),n={symbolInfo:s,showUnit:t.unitConversionEnabled(),unitDescription:e=>r.description(e),dateFormatter:t.dateFormatter()};k(i,n)}}),We=new P({actionId:T.ChartPriceScaleMergeAllScalesToLeft,label:we,statName:"MergeAllScalesToLeft",onExecute:function(){e.model().mergeAllScales("left")}}),He=new P({actionId:T.ChartPriceScaleMergeAllScalesToRight,label:Ce,statName:"MergeAllScalesToRight",onExecute:function(){e.model().mergeAllScales("right")}}),ze=new P({actionId:T.ChartPriceScaleMoveToLeft,label:Pe,statName:"MoveScaleToLeft",onExecute:function(){e.model().mergeAllScales("left")}}),Ue=new P({actionId:T.ChartPriceScaleMoveToRight,label:Te,statName:"MoveScaleToRight",onExecute:function(){e.model().mergeAllScales("right")}});var je=c.enabled("show_object_tree");if(this._actions={chartProperties:q,mainSeriesPropertiesAction:$,timeScaleReset:I,chartReset:t,invertSeriesScale:s,logSeriesScale:g,autoSeriesScale:r,lockSeriesScale:n,regularSeriesScale:o,percentSeriesScale:a,indexedTo100SeriesScale:l,compareOrAdd:U,paneObjectTree:je?G:void 0,insertIndicator:z,symbolSearch:y,showSymbolInfoDialog:Fe,changeInterval:C,seriesHide:X,studyHide:X,lineToggleLock:K,lineHide:X,scaleSeriesOnly:J,drawingToolbarAction:ee,stayInDrawingModeAction:re,hideAllMarks:Se,applyTimeZone:S,showCountdown:Re,addPlusButton:Ne,showSeriesLastValue:be,showHighLowPriceLabels:Ee,showHighLowPriceLines:De,showAverageClosePriceLabel:Ve,showAverageClosePriceLine:Be,showSymbolLabelsAction:xe,showStudyLastValue:Me,showStudyPlotNamesAction:Le,undo:f,redo:v,mergeLeftScalesAction:We,mergeRightScalesAction:He,moveScaleToLeft:ze,moveScaleToRight:Ue,moveChartAction:undefined},w&&(this._actions.addToWatchlist=w),!TradingView.onWidget()&&c.enabled("text_notes")&&(this._actions.addToTextNotes=undefined),null!==Oe&&(this._actions.gotoDate=Oe),this.createSessionBreaksActions(),!this.readOnly()){var Ge=new P({actionId:T.ChartSelectedObjectRemove,label:i(44352).t(null,void 0,i(34596)),icon:i(35149),statName:"RemoveSelectedObject",onExecute:function(){var e=this._chartWidgetCollection.activeChartWidget.value();e||(e=this),e.removeSelectedSources()}.bind(this),hotkeyGroup:this._hotkeys,hotkeyHash:_.isMacKeyboard?8:46});this._hotkeys.add({handler:function(){this.removeSelectedSources()}.bind(this),desc:"Remove selected source", -hotkey:_.isMacKeyboard?46:8}),this._actions.paneRemoveAllStudies=M,this._actions.paneRemoveAllDrawingTools=A,this._actions.paneRemoveAllStudiesDrawingTools=L,this._actions.applyStudiesToAllCharts=N,this._actions.studyRemove=Ge,this._actions.lineRemove=Ge,c.enabled("property_pages")&&(this._actions.format=W)}this._actions.showPriceLine=new P({actionId:T.ChartLinesToggleSeriesPriceLineVisibility,label:i(44352).t(null,void 0,i(91492)),checkable:!0,statName:"TogglePriceLine"}),this._actions.showPriceLine.binding=new h(this._actions.showPriceLine,this.model().mainSeries().properties().showPriceLine,this.model(),ve),this.readOnly()||(this._hotkeys.add({desc:"Draw Horizontal Line here",hotkey:m.Modifiers.Alt+72,handler:function(){e.activePaneWidget&&e.activePaneWidget.drawRightThere("LineToolHorzLine")}}),this._hotkeys.add({desc:"Draw Horizontal Ray here",hotkey:m.Modifiers.Alt+74,handler:function(){e.activePaneWidget&&e.activePaneWidget.drawRightThere("LineToolHorzRay")}}),this._hotkeys.add({desc:"Draw Vertical Line here",hotkey:m.Modifiers.Alt+86,handler:function(){e.activePaneWidget&&e.activePaneWidget.drawRightThere("LineToolVertLine")}}),this._hotkeys.add({desc:"Draw Cross Line here",hotkey:m.Modifiers.Alt+67,handler:function(){e.activePaneWidget&&e.activePaneWidget.drawRightThere("LineToolCrossLine")}}),this._hotkeys.add({desc:"Draw Trend Line",hotkey:m.Modifiers.Alt+84,handler:function(){e.activePaneWidget&&x.tool.setValue("LineToolTrendLine")}}),this._hotkeys.add({desc:"Draw Fib Retracement",hotkey:m.Modifiers.Alt+70,handler:function(){e.activePaneWidget&&x.tool.setValue("LineToolFibRetracement")}})),this._updateScalesActions()}options(){return this._options}executeActionById(e){if("takeScreenshot"===e)return console.warn('Action "takeScreenshot" is deprecated. Use method "takeScreenshot" instead'),void this._chartWidgetCollection.takeScreenshot();e in this._actions?this._actions[e]instanceof P&&this._actions[e].execute():console.warn("Unknown action id: "+e)}getCheckableActionState(e){if(e in this._actions){var t=this._actions[e];if(t instanceof P&&t.isCheckable())return t.isChecked();console.warn("Action "+e+" has no state")}else console.warn("Unknown action id: "+e);return null}_updateScalesActions(){if(null!==this._actions){var e=this.model().mainSeries(),t=e.priceScale(),i=e.properties(),s=t.isLockScale(),r=i.style.value()===l.STYLE_PNF;this._actions.percentSeriesScale.update({disabled:s||r,checked:t.isPercentage()}),this._actions.logSeriesScale.update({disabled:s||r,checked:t.isLog()}),this._actions.regularSeriesScale.update({disabled:s||r,checked:t.isRegular()}),this._actions.indexedTo100SeriesScale.update({disabled:s||r,checked:t.isIndexedTo100()}),this._actions.invertSeriesScale.update({checked:t.isInverted()}),this._actions.lockSeriesScale.update({checked:t.isLockScale()}),this._actions.autoSeriesScale.update({checked:t.isAutoScale(),disabled:t.properties().autoScaleDisabled.value()})}}removeAllStudies(){this._model.removeAllStudies()}removeAllDrawingTools(){this._model.removeAllDrawingTools()} -removeAllStudiesDrawingTools(){this._model.removeAllStudiesAndDrawingTools()}defaultSymbol(){return this._defSymbol}widget(){return this._mainDiv}_onBackgroundColorChanged(){for(var e=0;e0;)for(var t=this._content.panes[e].sources,i=t.length;i-- >0;)if("MainSeries"===t[i].type)return t[i].state}updateUndoRedo(){this._model&&(this.actions().undo.update({disabled:this._model.undoHistory().undoStack().isEmpty()}),this.actions().redo.update({disabled:this._model.undoHistory().redoStack().isEmpty()}))}createSessionBreaksActions(){var e=new P({actionId:T.ChartSessionBreaksToggleVisibility,label:i(44352).t(null,void 0,i(59827)),checkable:!0,statName:"ToggleSessionBreaks"});e.binder=new h(e,this._model.chartModel().sessions().properties().graphics.vertlines.sessBreaks.visible,this.model(),be),this._actions.sessionBreaks=e}updateActionForIntradayOnly(e){e&&e instanceof P&&e.update({disabled:this.model().mainSeries().isDWM()})}containsVolume(){return this.model().dataSources().some((function(e){return e instanceof g&&"Volume"===e.metaInfo().shortId}))}containsStudyByPredicate(e){return!!this._model&&this._model.dataSources().some((function(t){if(!(t instanceof g))return!1;var i=t.metaInfo();return e(i)}))}containsStudy(e){return this.containsStudyByPredicate((function(t){return t.id===e||t.fullId===e}))}isSmall(){return this._width()<550||this._height()<300}onWidget(){return this._onWidget}onCmeWidget(){return"cme"===this.widgetCustomer()}widgetCustomer(){return this._widgetCustomer}resize(){var e=this._height()+"px",t=this._width()+"px";this._mainDiv.style.height=e,this._mainDiv.style.width=t,this._elMainTable.style.height=e,this._elMainTable.style.width=t,this._resizeHandler&&this._mainDiv&&this._resizeHandler()}applyOverrides(e){var t={};for(var i in e)i.startsWith("mainSeriesProperties.priceAxisProperties")||(t[i]=e[i]) -;if(applyPropertiesOverrides(this.properties(),null,!1,t,null),this._model){applyPropertiesOverrides(this._model.model().properties(),null,!1,t),applyPropertiesOverrides(this._model.mainSeries().properties(),null,!1,t,"mainSeriesProperties"),this._model.model().sessions().applyOverrides(t);const e=this._model.chartModel().watermarkSource();null!==e&&e.applyOverrides(t)}}applyStudiesOverrides(e){W.mergeDefaultsOverrides(e),this._applyStudiesOverrides()}setActive(e){this._isActive=e,z().isTouch&&(e&&0!==this.selectPointMode().value()?this.startTrackingMode():this.exitTrackingMode()),this._paneWidgets.forEach((function(e){e.update()})),e||this.model().selectionMacro((function(e){e.clearSelection()}))}isActive(){return this._isActive}isMultipleLayout(){return K(this._chartWidgetCollection.layout.value())}selectPointMode(){return this._model.model().selectPointMode()}cancelRequestSelectPoint(){this._model.model().cancelRequestSelectPoint(),this._model.model().setReplayStatus(q.Undefined)}requestSelectPoint(e,t){var i=this;return e.selectPointMode===G.Replay&&this._model.model().setReplayStatus(q.PointSelect),new Promise((function(s,r){if(a()){x.resetToCursor(!0),i._model.lineBeingCreated()&&i._model.cancelCreatingLine();var n=!1,o={};i._model.model().onPointSelected().subscribe(o,(function(e,t){n=!0,i._isVisible.unsubscribe(a),i._hideHint(),s({point:e,pane:t})}),!0),i._model.model().requestSelectPoint(e),i.startTrackingMode(),void 0!==t&&i._showHint(t),i._isVisible.subscribe(a),i.selectPointMode().subscribe((function(){setTimeout((function(){n||(0===i.selectPointMode().value()&&i._hideHint(),i._model.model().onPointSelected().unsubscribeAll(o),i._isVisible.unsubscribe(a),r("cancelled"))}))}),{once:!0})}function a(){return!!i.isVisible()||(r("Chartwidget must be visible"),i.cancelRequestSelectPoint(),!1)}}))}showReplayOrderConfirmationDialog(){if(!this.model().isInReplay())return Promise.resolve()}_addPerfMark(e){X("ChartWidget."+this._id+"."+e)}requestFullscreen(){this._options.requestFullscreen()}getResizerDetacher(){return this._options}_createHint(){if(null===this._hintDefferedPromise){var e=te();this._hintDefferedPromise=e;var t=this;Promise.all([i.e(9908),i.e(962),i.e(6166)]).then(i.bind(i,5015)).then((function(i){e.resolve(new i.ChartEventHintRenderer(t._chartWidgetCollection.getContainer()))}))}return this._hintDefferedPromise?a(this._hintDefferedPromise).promise:null}_showHint(e){if(c.enabled("popup_hints"))if(null!==this._activeHint)this._activeHint.show(e);else{var t=this,i=this._createHint();null!==i&&i.then((function(i){if(null!==i){if(t._activeHint=i,void 0===e)return;t._activeHint.show(e)}}))}}_hideHint(){null!==this._activeHint&&this._activeHint.hide()}}},24134:(e,t,i)=>{"use strict" -;var s=i(50151).ensureNotNull,r=i(68582),n=r.LineDataSourceApi,o=r.isLineToolRiskReward,a=i(67e3).StudyApi,l=i(82650).SeriesApi,c=i(32112).SelectionApi,h=i(98076).PaneApi,d=i(8950).createDwmAligner,u=i(578).Interval,p=i(37121).supportedLineTools,_=i(65665),m=_.isNumber,g=_.deepEquals,f=i(6250).createLineToolProperties,v=i(6250).prepareLineToolPropertiesByOwnerSource,S=i(45973).lineToolEntityInfo,y=i(57404).LineToolsGroupControllerApi,b=i(34853).RemoveSourcesCommand;const{isLineDrawnWithPressedButton:w,isLineToolFinishRequiredWhenCreatedByApi:C}=i(28667),P=i(55611).EnvironmentState;var T=i(66979).ChartWidgetApiBase,x=i(76076);i(51768).trackEvent;function I(e,t){return t.map((function(t){return e.dataSourceForId(t)}))}e.exports=class extends T{constructor(e,t){super(e,t),this._panes=new WeakMap,this._studies=new WeakMap,this._lineDataSources=new WeakMap,this._selectionApi=null,this._prevVisibleRange=null,this._chartWidget.onAboutToBeDestroyed().subscribe(this,this._destroy,!0),this._chartWidget.withModel(this,(function(){this._chartWidget.model().timeScale().logicalRangeChanged().subscribe(this,this._onLogicalRangeChanged)}))}id(){return this._chartWidget.id()}_getPaneApi(e){var t=this._panes.get(e);return void 0===t&&(t=new h(e,this._chartWidget),this._panes.set(e,t)),t}_getStudyApi(e){var t=this._studies.get(e);return void 0===t&&(t=new a(e,this._chartWidget),this._studies.set(e,t)),t}_getLineDataSourceApi(e){var t=this._lineDataSources.get(e);return void 0===t&&(t=new n(e,this._chartWidget.model(),{apiPointsToDataSource:this._convertUserPointsToDataSource.bind(this),dataSourcePointsToPriced:e=>{var t=this._chartWidget.model().mainSeries().syncModel(),i=this._chartWidget.model().timeScale();return e.map((e=>{var s=i.normalizeBarIndex(e.index);return{price:e.price,time:this._convertTimeToPublic(t.projectTime(s.time_t,s.offset))}}))}}),this._lineDataSources.set(e,t)),t}executeActionById(e){this._chartWidget.executeActionById(e)}getCheckableActionState(e){return this._chartWidget.getCheckableActionState(e)}setZoomEnabled(e){this._chartWidget.model().model().setZoomEnabled(e)}setScrollEnabled(e){this._chartWidget.model().model().setScrollEnabled(e)}refreshMarks(){this._chartWidget.refreshMarks()}clearMarks(){this._chartWidget.clearMarks()}symbol(){return this._chartWidget.getSymbol()}resolution(){return this._chartWidget.model().mainSeries().properties().interval.value()}resetData(){this._chartWidget.model().mainSeries().rerequestData()}setEntityVisibility(e,t){console.warn("`setEntityVisibility` is deprecated. Use shape/study API instead");var i=this._chartWidget.model().model().dataSourceForId(e);if(i){var s=i.properties();s&&s.visible&&s.visible.setValue(t)}}availableZOrderOperations(e){var t=I(this._chartWidget.model().model(),e);return this._chartWidget.model().availableZOrderOperations(t)}sendToBack(e){var t=I(this._chartWidget.model().model(),e);this._chartWidget.model().sendToBack(t)}bringToFront(e){var t=I(this._chartWidget.model().model(),e);this._chartWidget.model().bringToFront(t)}insertAfter(e,t){ -var i=this._chartWidget.model().model(),s=I(i,e),r=i.dataSourceForId(t);this._chartWidget.model().insertAfter(s,r)}insertBefore(e,t){var i=this._chartWidget.model().model(),s=I(i,e),r=i.dataSourceForId(t);this._chartWidget.model().insertBefore(s,r)}bringForward(e){var t=I(this._chartWidget.model().model(),e);this._chartWidget.model().bringForward(t)}sendBackward(e){var t=I(this._chartWidget.model().model(),e);this._chartWidget.model().sendBackward(t)}showPropertiesDialog(e){var t=this._chartWidget.model().model().dataSourceForId(e);if(null===t)throw new Error("Study or shape "+e+" does not exist");this._chartWidget.showChartPropertiesForSource(t)}getAllShapes(){return this._chartWidget.model().model().allLineTools().map(S).filter((function(e){return null!==e.name}))}removeAllShapes(){this._chartWidget.removeAllDrawingTools()}removeAllStudies(){this._chartWidget.removeAllStudies()}removeEntity(e,t){var i=this._chartWidget.model().chartModel().dataSourceForId(e);i?t&&t.disableUndo?new b(this._chartWidget.model().chartModel(),[i],"").redo():this._chartWidget.model().removeSource(i,!0,!0):console.warn("Can't find a source with id: "+e)}removeEntityWithUndo(e){var t=this._chartWidget.model().chartModel().dataSourceForId(e);this._chartWidget.model().removeSource(t,!1)}selection(){return null===this._selectionApi&&(this._selectionApi=new c(this._chartWidget.model().model())),this._selectionApi}createStudyTemplate(e){return this._chartWidget.model().model().studyTemplate(e.saveSymbol,e.saveInterval)}drawOnAllCharts(e){x.drawOnAllCharts.setValue(e)}applyStudyTemplate(e){this._chartWidget.model().applyStudyTemplate(e,""+1e3*Math.random())}setVisibleRange(e,t){return new Promise(function(i){this._chartWidget.setVisibleTimeRange(e.from,e.to,t,i)}.bind(this))}getVisiblePriceRange(){return console.warn("`getVisiblePriceRange` is deprecated. Use Price Scale API instead"),this._chartWidget.model().mainSeries()?this._chartWidget.model().mainSeries().priceScale().priceRangeInPrice():null}scrollPosition(){return console.warn("`scrollPosition` is deprecated. Use rightOffset from Time Scale API instead"),this._chartWidget.model().timeScale().rightOffset()}defaultScrollPosition(){return console.warn("`defaultScrollPosition` is deprecated. Use defaultRightOffset from Time Scale API instead"),this._chartWidget.model().timeScale().defaultRightOffset().value()}_createTradingPrimitive(e,t){var i,r=this._chartWidget.model(),n=r.model(),o=n.paneForSource(n.mainSeries());function a(){var e=TradingView.CLOSE_PLOT,t=s(r.mainSeries().bars().last());return{index:t.index,price:t.value[e]}}return(i=t?n.createLineTool(o,a(),e):r.createLineTool({pane:o,point:a(),linetool:e}))?i._adapter:void 0}createOrderLine(e){e=e||{};return this._createTradingPrimitive("LineToolOrder",e.disableUndo)}createPositionLine(e){e=e||{};return this._createTradingPrimitive("LineToolPosition",e.disableUndo)}createExecutionShape(e){e=e||{};return this._createTradingPrimitive("LineToolExecution",e.disableUndo)}createShape(e,t){return this.createMultipointShape([e],t)} -_alignPoints(e){var t=this._chartWidget.model().model(),i=t.mainSeries(),s=i.interval();if(t.timeScale().isEmpty()||!u.isDWM(s))return e;var r=d(s,i.symbolInfo());return null===r?e:e.map((function(e){return r.timeToSessionStart(1e3*e)/1e3}))}_convertUserPointsToDataSource(e){var t=this._chartWidget.model().model(),i=t.mainSeries(),s=t.timeScale().points(),r=i.data();if(t.timeScale().isEmpty())return null;var n=e.map((function(e){return e.time||0})),o=this._alignPoints(n);function a(e,t,n){var o=s.closestIndexLeft(e)||0,a={index:o},l=s.valueAt(o);const c=s.range().value();if(e>l&&o===c.lastIndex)(h=i.syncModel().distance(l,e)).success&&(a.index=a.index+h.result);else if(e2)throw new Error("Wrong points count for "+i.shape+". Required 1 or 2");2===c.length&&(d.startChanging(1,c[1]),d.setPoint(1,c[1]),d.endChanging())}else{var m=d.pointsCount();if(m!==c.length&&-1!==m)throw new Error("Wrong points count for "+i.shape+". Required "+m);for(var g=new P(void 0,!0),S=w(s.name),y=1;y{"use strict";var s=i(26867),r=i(50151).assert,n=i(71668).createDeferredPromise,o=i(47539).TranslatedString,a=i(57737).layouts,l=i(29443).createUndoHistory,c=i(76076),h=i(66141),d=i(68335),u=i(76422),p=i(2484),_=i(40549),m=i(98351).getLogger("Chart.ChartWidgetCollection"),g=i(33933).preventDefaultForContextMenu,f=i(77906),v=i(13323).GeneralChartPropertiesRenderer,S=i(92133).setLastUsedResolution,y=i(42120).CompareDialogRenderer,b=i(84015).isOnMobileAppPage,w=i(32769),C=i(1930);const{isSupportedLayout:P,tryGuessingTheMostSuitableLayout:T}=i(57737) -;var x,I=i(59595),M=I.applyIndicatorsToAllChartsImpl,A=I.applyIndicatorToAllChartsImpl,L=I.lineToolsAndGroupsDTOsImpl,k=I.getStateForChartImpl,E=I.resetLineToolsInvalidatedImpl,D=I.applyLineToolUpdateNotificationImpl,V=I.createClipboardHandler,B=I.chartsSymbolsImpl,R=I.updateLayoutImpl,N=I.computeContentBoxImpl,O=(I.getVisuallyAdjacentDefImpl,I.setLayoutImpl),F=I.removeChartWidgetSubscriptionsImpl,W=I.generateNewChartId,H=I.syncCrosshairImpl,z=I.createBroadcastChannel,U=I.destroyBroadcastChannel,j=I.syncScrollImpl,G=I.allInitialModelsCreated,q=I.allInitialSymbolsResolved,$=I.applyThemeImpl,Y=I.isFirstChartInLayout,K=I.deserializedChartIds,X=I.handleDateRangeLockChange,Z=I.handleInternalDateRangeLockChange,J=I.handleTrackTimeLockChange,Q=I.handleInternalTrackTimeLockChange,ee=I.handleIntervalLockChange,te=I.handleInternalIntervalLockChange,ie=I.handleSymbolLockChange,se=I.handleInternalSymbolLockChange,re=(I.handleConnectionLimitReachedChanged,I.handleDeviceConnectionClosed,I.createLeftBottomChartWidgetWV),ne={saveChartEnabled:!0,takeScreenshotEnabled:!0,publishedChartsEnabled:!0},oe=new o("change symbol",i(44352).t(null,void 0,i(526))),ae=new o("change resolution",i(44352).t(null,void 0,i(32303))),le=new o("change series style",i(44352).t(null,void 0,i(53438)));i(44352).t(null,void 0,i(19149));e.exports=function(e){var t=this,o=Object.assign({},ne,e),ce=new _,he=o.readOnly||!1,de=[],ue=0,pe=new _,_e=new _,me=new _,ge="s",fe=new _(null),ve=new Map,Se=new _([]),ye=new _,be=[],we=!1,Ce=!1,Pe=new _(!1),Te=new _(null),xe=new _(!1),Ie=new _(!1);Ie.subscribe((e=>ie(ut(),e)));var Me=new _(Ie.value());Me.subscribe((e=>se(ut(),e)));var Ae=new _(!1);Ae.subscribe((e=>ee(ut(),e)));var Le=new _(Ae.value());Le.subscribe((e=>te(ut(),e)));var ke=new _(!1);ke.subscribe((e=>J(ut(),e)));var Ee=new _(ke.value());Ee.subscribe((e=>Q(ut(),e)));var De=new _(!1);De.subscribe((e=>X(ut(),e))),fe.subscribe(Ot);var Ve=new _(De.value());Ve.subscribe((e=>Z(ut(),e)));var Be=new _(TVSettings.getBool("chart.syncCrosshair",!0)),Re=h.createGroup({desc:"Layout"}),Ne=null,Oe=null,Fe=null,We=null;if(window.TVD){var He=window.TVD.crosshairSyncEnabled;He?(He.value()&&(Fe=z(ut)),We=He.subscribe((e=>{e?Fe=z(ut):(U(ut()),Fe=null)}))):Fe=z(ut)}var ze=Be.value();Be.subscribe((function(e){ze=e=!!e,TVSettings.setValue("chart.syncCrosshair",e);for(var t=0;t{$e.setValue(null===e?null:e.chartWidget)}));var Ye=o.widgetOptions||{},Ke=o.metaInfo||{},Xe={id:new _(Ke.id||null),name:new _(Ke.name),description:new _(Ke.description),username:new _(Ke.username),uid:new _(Ke.uid),lastModified:new _(Ke.lastModified)},Ze=l();Ze.onChange().subscribe(null,(function(e){u.emit("undo_redo_state_changed",e)}));var Je=o.resizerBridge.container.value();Je.addEventListener("contextmenu",g);var Qe,et=n(),tt=new s,it=new s,st=new s,rt=new _(!1),nt=new _(null),ot=null,at=null -;o.seriesControlBarEnabled&&(Qe="0px",nt.setValue(document.createElement("div")),nt.value().style.left=Qe,nt.value().style.right=Qe,nt.value().style.bottom=Qe,nt.value().classList.add("chart-toolbar","chart-controls-bar"),nt.value().setAttribute("data-is-chart-toolbar-component","true"),Je.appendChild(nt.value()),Promise.all([i.e(8230),i.e(7624),i.e(1428),i.e(4819),i.e(9333),i.e(6092),i.e(8825),i.e(1140),i.e(3795),i.e(105),i.e(9415),i.e(5639),i.e(7507),i.e(7895),i.e(962),i.e(1075),i.e(5747),i.e(7260)]).then(i.bind(i,33366)).then((({BottomToolbarRenderer:e})=>{var i=o.resizerBridge,r=[i.container.spawn(),i.width.spawn(),i.height.spawn()],n=i.container.value(),a=function(){var e=n.getBoundingClientRect(),t=N(ut());return t.top=e.top+t.top,t.left=e.left+t.left,t},l=new s,c=function(){l.fire()};r.forEach((function(e){e.subscribe(c)}));var h=function(){r.forEach((function(e){e.destroy()})),l.destroy()};ot=new e(nt.value(),l,a,t,ChartApiInstance,Ye,o.seriesControlBar),at=function(){null!==ot&&(ot.destroy(),ot=null,nt.value().remove(),nt.setValue(null)),h()}})));var lt=new v(t),ct=new y(t);function ht(){rt.setValue(de.some((e=>{const t=e.chartWidget.lineToolsSynchronizer();return null!==t&&t.hasChanges().value()})))}function dt(e){return I.checkProFeatureImpl(ut(),e)}function ut(){return{undoHistory:Ze,chartWidgetsDefs:de,chartsCountToSave:pt,actualLayoutCount:_t,savedChartWidgetOptions:be,activeChartWidget:ce,options:o,parent:Je,toastsFactory:null,crosshairLockRaw:ze,crossHairSyncBroadcast:Fe,setChartStorageNotificationSubscription:e=>{Oe=e},maximizedChartDef:qe,setMaximized:yt,layoutTemplate:me,widthWV:je,heightWV:Ge,checkProFeature:dt,lineToolsSynchronizerHasChanges:rt,recalcHasChanges:ht,onZoom:it,onScroll:st,layoutType:ge,layoutWV:Ue,setLayoutType:e=>{ge=e},isPhoneSize:Pe,viewMode:ye,updateViewMode:wt,loadingContent:we,setLoadingContent:e=>{we=e},initialLoading:Ce,inlineChartsCount:_e,updateWatchedValue:Ct,checkAllPendingModelsAlreadyCreated:bt,readOnly:he,symbolLock:Ie,internalSymbolLock:Me,intervalLock:Ae,internalIntervalLock:Le,dateRangeLock:De,internalDateRangeLock:Ve,trackTimeLock:ke,internalTrackTimeLock:Ee,crosshairLock:Be,customLegendWidgetsFactoriesMap:Qt,globalDetachable:pe,saveChartService:Ne,customSources:Zt,updateActivityView:Pt,chartWidgetCreatedDelegate:tt,sizingState:Te,currentLayoutResizeAction:fe,allLayoutSizesState:ve,splitters:Se,widgetOptions:Ye,bottomToolbar:nt,replayContainer:Jt,layoutSizesChanged:xe,subscribeToCompletedEventForDateRangeSync:Bt,subscribeToEventsForDateRangeSync:Rt,unsubscribeFromEventsForDateRangeSync:Nt,syncChartsDateRangesWithActiveChartRange:Wt}}function pt(){return _t()}function _t(){return a[ge].count}function mt(e,t,i,s,r){return k(ut(),e,t,i,s,r)}function gt(e){return e.value()?1:0}function ft(){R(ut())}function vt(e){return e.rdState.owner.value()!==e}function St(e){return O(ut(),e,t)}function yt(e){qe.value()!==e&&(qe.setValue(e),St(ge))}function bt(){de.every((e=>e.chartWidget.hasModel()))&&(Ct(),u.emit("layout_changed"))}function wt(){ -"s"===ge||qe.value()?ye.setValue(x.ForceFullscreen):ye.setValue(x.Multichart)}function Ct(){var e=Math.min(me.value().count,de.length)-1;if(e<0)ce.deleteValue();else{var t=ue;t<0&&(t=0),t>e&&(t=e),ce.setValue(de[t].chartWidget)}}function Pt(){for(var e=de.length;e--;){var t=e===ue;de[e].container.value().classList.toggle("active",t),de[e].container.value().classList.toggle("inactive",!t)}}function Tt(e){}Te.subscribe((()=>ft())),je.subscribe(ft),Ge.subscribe(ft),this.updateLayout=ft;const xt=new s;var It=new s,Mt=new _,At=new _([]),Lt=null;function kt(e){var t=e.mainSeries().properties();t.style.subscribe(null,Et),Et(t.style),e.model().onSelectedSourceChanged().subscribe(null,Dt),De.value()&&(Rt(e),Wt()),Dt(e.selection().allSources())}function Et(e){Mt.setValue(e.value())}function Dt(){var e=Lt.model();At.setValue(e.selection().allSources())}ce.subscribe((function(e){if(e){for(var t,i=de.length;i--;)if(de[i].chartWidget===e){t=i;break}if(!isFinite(t))throw new Error("Cannot make detached ChartWidget active");if(ue!==t){qe.value()&&(vt(de[t])||qe.setValue(de[t])),ue=t,Pt();for(i=de.length;i--;)de[i].chartWidget!==e&&de[i].chartWidget.setActive(!1);ci(),e.setActive(!0),c.activePointSelectionMode.setValue(e.selectPointMode().value())}!function(e){if(Lt!==e){if(Lt&&(Lt.modelCreated().unsubscribe(null,kt),Lt.hasModel())){var t=Lt.model();De.value()&&Nt(t),t.mainSeries().properties().style.unsubscribe(null,Et),t.model().onSelectedSourceChanged().unsubscribe(null,Dt),Lt=null}e&&(Lt=e,e.hasModel()?kt(e.model()):e.modelCreated().subscribe(null,kt))}}(e)}}),{callWithLast:!0});var Vt=new Map;function Bt(e,t){var i=e.id();if(!Vt.has(i)){var s=function(){const i=e.id();Vt.has(i)&&(Vt.delete(i),Wt(t?e:void 0))};e.model().mainSeries().dataEvents().completed().subscribe(null,s,!0),Vt.set(i,{cw:e,callback:s})}}function Rt(e){e.timeScale().visibleBarsStrictRangeChanged().subscribe(null,Ft)}function Nt(e){e.timeScale().visibleBarsStrictRangeChanged().unsubscribe(null,Ft),Vt.forEach((function(e){var t=e.cw,i=e.callback;t.model().mainSeries().dataEvents().completed().unsubscribe(null,i)})),Vt.clear()}function Ot(e){De.value()&&null===e&&Wt()}function Ft(e,t){Wt()}function Wt(e){if(De.value()&&null===fe.value()){var t=ce.value(),i=t.model().mainSeries();if(C.isTimeBasedStyle(i.style())){var s=t.model().timeScale(),r=s.visibleBarsStrictRange();if(null!==r){var n=s.points().range().value(),o=s.indexToTimePoint(r.firstBar());null===o&&i.endOfData()&&(o=s.indexToTimePoint(n.firstIndex));var a=s.indexToTimePoint(r.lastBar());if(null===a&&(a=s.indexToTimePoint(n.lastIndex)),null!==o&&null!==a){Vt.delete(t.id());var l=1e3*o,c=1e3*a;if(i.isDWM()){var h=new Date(l),d=new Date(c);w.set_hms(h,0,0,0,0),w.set_hms(d,0,0,0,0),l=h.getTime(),c=d.getTime()}for(var u=0;ude.map((e=>e.chartWidget)),ai=re(oi,Ue.readonly(),xt,tt);function li(e,t){if(we=!0,Ce=Boolean(t),be.splice(0),e){if(e.charts||(e={layout:"s",charts:[e]}),e.layoutsSizes)for(const t of Object.keys(e.layoutsSizes))ve.set(t,e.layoutsSizes[t]);var i=new Set;e.charts.forEach((function(e){e.chartId&&i.add(e.chartId)})),e.charts.forEach((function(e){if(!e.chartId){var t=W((function(e){return i.has(e)}));i.add(t),e.chartId=t}}));let t=e.layout;if(!P(t)){const e=T(t);m.logError(`Loading unsupported layout ${t}. Force migration to ${e}`),t=e}ge=dt(t||"s");for(var s=0;s$e.readonly(),leftBottomChartWidget:()=>ai,destroy:function(){if(Gt.fire(),Xt(!1),null!==at&&(at(),at=null),F(ut()),ti.destroy(),ii.destroy(),ri.destroy(),si.destroy(),ni.destroy(),fe.unsubscribe(Ot),de.forEach((function(e){ -void 0!==e.timingsMeter&&e.timingsMeter.destroy(),e.chartWidget.destroy()})),o.resizerBridge.remove(),Se.value().forEach((e=>{e.mouseHandler.destroy(),e.mouseListener.destroy()})),window.removeEventListener("resize",ft),c.tool.unsubscribe(ci),c.tool.unsubscribe(hi),et.resolve(),Je.remove(),Zt.clear(),Qt.clear(),Re.destroy(),Oe&&Oe.destroy(),ei&&ei.destroy(),window.TVD){const e=window.TVD.crosshairSyncEnabled;e&&e.unsubscribe(We),U(ut())}},onAboutToBeDestroyed:Gt,layout:Ue.readonly(),setLayout:St,activeChartWidget:ce,viewMode:ye,activeChartStyle:Mt.readonly(),setChartStyleToWidget:function(e,t){t||(t=ce.value()),t&&function(e,t){var i=e.model(),s=i.mainSeries().properties().style;i.setChartStyleProperty(s,t,le)}(t,e)},selectedSources:At.readonly(),metaInfo:Xe,state:function(e,i,s,r){for(var n=[],o=pt(),a=0;a{c.layoutsSizes[t]=e})),c},lineToolsAndGroupsDTOs:function(){return L(ut())},resetLineToolsInvalidated:function(e,t){return E(ut(),e,t)},applyLineToolUpdateNotification:D.bind(null,de),readOnly:function(){return he},onZoom:function(){return it},onScroll:function(){return st},resizerBridge:function(){return o.resizerBridge},lock:{symbol:ti,interval:ii,dateRange:si,crosshair:ni,trackTime:ri},setSymbol:function(e){Ie.value()?zt(e):ce.value().setSymbol(e)},setResolution:function(e){jt||Ut||function(e){if(S(e),Ut=!0,Ae.value()){for(var t=!1,i=0;iH(ut(),e,t,i,s),syncScroll:function(e,t){return j(ut(),e,t)},setSymbolAll:zt,clearChartMetaInfo:function(){Xe.id.setValue(null),Xe.uid.setValue(void 0),Xe.name.setValue(void 0)},takeScreenshot:I.takeScreenshot.bind(this,o.snapshotUrl,this),takeServerScreenshot:I.takeServerScreenshot.bind(this,o.snapshotUrl,this),loadContent:li,purgeUnusedWidgets:function(){for(var e=a[ge].count;e1},applyIndicatorToAllCharts:function(e,t,i,s){A(ut(),e,t,i,s)},setActive:Xt,inlineChartsCount:_e.readonly(),revertToInline:function(){yt(null);for(var e=0;eft())),ft()},destroyReplayWidget:function(){r(null!==Jt,"Cannot remove replay container, container is not created"),Jt.remove(),Jt=null,ft()},setViewMode:function(e){ye.setValue(e)},moveActiveChartWithUndo:function(e){},activeChartCanBeMoved:function(){return!1},generalPropertiesDefinitions:function(){return ce.value().generalPropertiesDefinitions()},reconnectChartApi:function(e){undefined(e)},setBroker:function(e){0},setSaveChartService:function(e){Ne=e;for(var t=0;txe}),li(o.content,!0),Ue.subscribe((function(){Pt()})),Ue.hook=function(e){ -return e===this.value()?e:dt(e)},he&&(Ue.writeLock=!0),window.addEventListener("resize",ft);var di=0;function ui(){0===--di&&u.emitOnce("onChartReady")}de.forEach((function(e){if(e){di++;var t=e.chartWidget;t.withModel(null,(function(){o.metaInfo&&t.model().model().setChartSaveTime(1e3*o.metaInfo.lastModified);var e=t.model().mainSeries();if(e.bars().size()>0||e.isStatusBad())ui();else{var i=e.dataEvents(),s=function(){ui(),i.barReceived().unsubscribe(null,s),i.completed().unsubscribe(null,s),i.error().unsubscribe(null,s)};i.barReceived().subscribe(null,s),i.completed().subscribe(null,s),i.error().subscribe(null,s)}}))}})),G(ut()).then(q).then((function(){window.saver&&window.is_authenticated&&o.widgetOptions.justCloned&&window.saver.saveChartSilently()})).catch(m.logError.bind(m))}},60223:(e,t,i)=>{"use strict";i.d(t,{ContextMenuManager:()=>s});var s,r=i(43986),n=i(59064);!function(e){let t=null,s=null;const o=[],a={createAction:e=>new r.Action({...e,actionId:"Chart.CustomActionId"}),createAsyncAction:e=>new r.ActionAsync("Chart.CustomActionId",e),createSeparator:()=>new r.Separator};async function l(e,r={},n={menuName:""},l){let h;null!==t&&(e=await t(e,a));const d=()=>{const e=o.indexOf(h);-1!==e&&o.splice(e,1),void 0!==l&&l()};if(null!==s)h=await s(e,n,d),c();else{const t=await Promise.all([i.e(7624),i.e(6092),i.e(5761),i.e(4412),i.e(8009),i.e(1140),i.e(5639),i.e(1528),i.e(962),i.e(1075),i.e(2804),i.e(1584)]).then(i.bind(i,46492));h=new t.ContextMenuRenderer(e,r,d,c)}return o.push(h),h}function c(){(0,n.globalCloseMenu)()}e.createMenu=l,e.showMenu=function(e,t,i={},s,r){return l(e,i,s,r).then((e=>e.show(t)))},e.setCustomRendererFactory=function(e){s=e},e.setCustomItemsProcessor=function(e){t=e},e.hideAll=c,e.getShown=function(){for(let e=0;e{"use strict";i.d(t,{DialogRenderer:()=>n});var s=i(40549),r=i.n(s);class n{constructor(){this._container=document.createElement("div"),this._visibility=new(r())(!1)}visible(){return this._visibility.readonly()}_setVisibility(e){this._visibility.setValue(e)}}},35936:(e,t,i)=>{"use strict";var s;i.d(t,{TabNames:()=>s}),function(e){e.background="Background",e.coordinates="Coordinates",e.drawings="Drawings",e.events="Events",e.eventsAndAlerts="Events & Alerts",e.inputs="Inputs",e.properties="Properties",e.scales="Scales",e.legend="Legend",e.sourceCode="Source Code",e.style="Style",e.symbol="Symbol",e.timezoneSessions="Timezone/Sessions",e.trading="Trading",e.visibility="Visibility",e.text="Text"}(s||(s={}))},9416:(e,t,i)=>{"use strict";function s(e){return e.getAll().some((e=>e.isInitialized()))}function r(e,t){const i=e.getAll(),s=()=>{t(),i.forEach((e=>{e.chartWidgetInitialized().unsubscribe(null,s)}))};i.forEach((e=>{e.chartWidgetInitialized().subscribe(null,s,!0)}))}i.r(t),i.d(t,{isAnyChartWidgetInitialized:()=>s,waitAnyChartWidgetInitialized:()=>r})},8222:(e,t,i)=>{"use strict";i.d(t,{getFavoriteDrawingToolbarPromise:()=>o,createFavoriteDrawingToolbar:()=>a});var s=i(23568);let r=null,n=null -;function o(){return n}function a(){null===n&&(n=Promise.all([i.e(5652),i.e(8230),i.e(7624),i.e(4819),i.e(9333),i.e(6092),i.e(8619),i.e(8825),i.e(5761),i.e(4412),i.e(8009),i.e(1140),i.e(3562),i.e(105),i.e(5639),i.e(8819),i.e(6879),i.e(1528),i.e(7263),i.e(962),i.e(1075),i.e(5747),i.e(1890),i.e(2182),i.e(2804),i.e(2306)]).then(i.bind(i,2209)).then((({FavoriteDrawingToolbar:e})=>(r=null!==r?r:new e({left:window.innerWidth/2,top:s.HEADER_TOOLBAR_HEIGHT_EXPANDED+61}),r))))}},24679:(e,t,i)=>{"use strict";i.d(t,{getPriceAxisNameInfo:()=>o});const s=["Z","Y","X","W","V","U","T","S"],r=["A","B","C","D","E","F","G","H"];class n{constructor(e){this.label=e}equals(e){return null!==e&&this.label===e.label}}function o(e,t){const i="left"===e?s:r;return new n(t{"use strict";i.d(t,{CHART_WIDGET_COLLECTION_SERVICE:()=>s});i(16216);const s={id:"ChartWidgetCollectionService"};var r;!function(e){e.Multichart="multichart",e.ForceFullscreen="force-fullscreen"}(r||(r={}))},36646:(e,t,i)=>{"use strict";i.d(t,{InvalidationLevel:()=>s,InvalidationMask:()=>a,defaultInvalidationLevel:()=>o});var s,r=i(50151);class n{constructor(e=o){this._paneInvalidationLevel=o,this._leftPriceScalesInvalidationMap=new Map,this._rightPriceScalesInvalidationMap=new Map,this._legendWidgetInvalidated=!1,this._invalidationLevel=e}fullInvalidation(){return this._invalidationLevel}invalidateAll(e){this._invalidationLevel=Math.max(this._invalidationLevel,e)}invalidatePane(e){this._paneInvalidationLevel=Math.max(this._invalidationLevel,e)}invalidateLegendWidgetLayout(){this._legendWidgetInvalidated=!0}invalidatePriceScale(e,t,i){const s="left"===e?this._leftPriceScalesInvalidationMap:this._rightPriceScalesInvalidationMap,r=s.get(t)||o;s.set(t,Math.max(r,i))}invalidationLevelForPane(){return Math.max(this._paneInvalidationLevel,this._invalidationLevel)}legendWidgetLayoutInvalidated(){return this._legendWidgetInvalidated||this._invalidationLevel===s.Full}getterForPriceScaleInvalidationLevelBySide(e){const t="left"===e?this._leftPriceScalesInvalidationMap:this._rightPriceScalesInvalidationMap;return e=>Math.max(t.get(e)||o,this._invalidationLevel)}priceScaleSideMaxLevel(e){const t="left"===e?this._leftPriceScalesInvalidationMap:this._rightPriceScalesInvalidationMap;let i=this._invalidationLevel;return t.size>0&&t.forEach((e=>{e>i&&(i=e)})),i}merge(e){this._invalidationLevel=Math.max(this._invalidationLevel,e._invalidationLevel),this._paneInvalidationLevel=Math.max(this._paneInvalidationLevel,e._paneInvalidationLevel),e._leftPriceScalesInvalidationMap.forEach(((e,t)=>{const i=this._leftPriceScalesInvalidationMap.get(t)||o;this._leftPriceScalesInvalidationMap.set(t,Math.max(i,e))})),e._rightPriceScalesInvalidationMap.forEach(((e,t)=>{const i=this._rightPriceScalesInvalidationMap.get(t)||o;this._rightPriceScalesInvalidationMap.set(t,Math.max(i,e))})),this._legendWidgetInvalidated=this._legendWidgetInvalidated||e._legendWidgetInvalidated}}!function(e){e[e.None=0]="None",e[e.Cursor=1]="Cursor",e[e.Light=2]="Light",e[e.Full=3]="Full" -}(s||(s={}));const o=s.None;class a{constructor(e=o){this._panesOrderChanged=!1,this._keepVisibleTimeRangeOnResize=!1,this._timeAxisInvalidationLevel=o,this._invalidatedPanes=new Map,this._additionalActions=[],this._timeScaleInvalidations=[],this._invalidationLevel=e}invalidateAll(e){this._invalidationLevel!==e&&(this._invalidationLevel=Math.max(this._invalidationLevel,e),this._invalidatedPanes.forEach((e=>{e.invalidateAll(this._invalidationLevel)})))}invalidateAllPane(e,t){this._invalidatedPanes.has(e)||this._invalidatedPanes.set(e,new n(this._invalidationLevel)),(0,r.ensureDefined)(this._invalidatedPanes.get(e)).invalidateAll(t)}invalidatePriceScale(e,t,i,s){this._invalidatedPanes.has(e)||this._invalidatedPanes.set(e,new n(this._invalidationLevel)),(0,r.ensureDefined)(this._invalidatedPanes.get(e)).invalidatePriceScale(t,i,s)}invalidateTimeScale(e){this._timeAxisInvalidationLevel=Math.max(this._timeAxisInvalidationLevel,e)}invalidatePanesOrder(){this._panesOrderChanged=!0}lockVisibleTimeRangeOnResize(){this._keepVisibleTimeRangeOnResize=!0}fullInvalidation(){return this._invalidationLevel}maxPaneInvalidation(){const e=[];return this._invalidatedPanes.forEach((t=>{e.push(t.fullInvalidation())})),Math.max(...e,this._invalidationLevel)}invalidateForPane(e){return this._invalidatedPanes.get(e)||new n(this._invalidationLevel)}invalidateForTimeScale(){return Math.max(this._timeAxisInvalidationLevel,this._invalidationLevel)}validationActions(){return this._additionalActions}addValidationAction(e){this._additionalActions.push(e)}merge(e){this._invalidationLevel=Math.max(this._invalidationLevel,e._invalidationLevel),this._panesOrderChanged=this._panesOrderChanged||e._panesOrderChanged,this._keepVisibleTimeRangeOnResize=this._keepVisibleTimeRangeOnResize||e._keepVisibleTimeRangeOnResize,this._invalidatedPanes.forEach((e=>{e.invalidateAll(this._invalidationLevel)})),e._invalidatedPanes.forEach(((e,t)=>{this._invalidatedPanes.has(t)||this._invalidatedPanes.set(t,new n(this._invalidationLevel)),(0,r.ensureDefined)(this._invalidatedPanes.get(t)).merge(e)})),this._timeAxisInvalidationLevel=Math.max(this._timeAxisInvalidationLevel,e._timeAxisInvalidationLevel);for(let t=0;t0===e.type));if(-1!==e){const[t]=this._timeScaleInvalidations.splice(e,1);t.value.terminate()}}}},78996:(e,t,i)=>{"use strict";i.d(t,{lastMouseOrTouchEventInfo:()=>r,setLastMouseOrTouchEventInfo:()=>n});let s=(0,i(49483).supportTouch)()?{isTouch:!0,stylus:!1}:{isTouch:!1};function r(){return s}function n(e){s=e.isTouch?{isTouch:!0,stylus:e.stylus}:{isTouch:!1}}},7121:(e,t,i)=>{"use strict";i.d(t,{layoutInitialSizingState:()=>n});var s=i(3308);i(50151);function r(e){return e.map((t=>{if((0,s.default)(t))return{percent:1/e.length};{const i=t.slice(1);return{percent:1/e.length,substate:r(i)}}}))}function n(e){return r(e.slice(1))}},57737:(e,t,i)=>{"use strict";i.r(t),i.d(t,{layouts:()=>r,isSingleLayout:()=>n,isMultipleLayout:()=>o,isSupportedLayout:()=>a,tryGuessingTheMostSuitableLayout:()=>l});i(10123),i(7121);let s;s={};const r={...{s:{title:"1 chart",count:1,layoutType:"s",sizer:(e,t)=>{if(0!==t)throw new RangeError("invalid index");return e},splitters:()=>[],resizeApplier:(e,t,i,s,r)=>r,syncSublayoutsBySplitter:(e,t)=>t,expression:["h",0]}},...s};function n(e){return"s"===e}function o(e){return!n(e)}function a(e){return n(e)||s.hasOwnProperty(e)}function l(e){return"s"}},57404:(e,t,i)=>{"use strict";i.d(t,{LineToolsGroupControllerApi:()=>o});var s=i(50841),r=i(50151),n=i(6250);class o{constructor(e,t){this._controller=e,this._model=t}createGroupFromSelection(){return this._controller.createGroupFromSelection().id}removeGroup(e){const t=(0,r.ensureDefined)(this._groupById(e));this._controller.removeGroup(t)}groups(){return this._controller.groups().map((e=>e.id))}shapesInGroup(e){const t=(0,r.ensureDefined)(this._groupById(e));return(0,s.sortSources)(t.lineTools()).map((e=>e.id()))}excludeShapeFromGroup(e,t){const i=(0,r.ensureDefined)(this._groupById(e)),s=(0,r.ensureNotNull)(this._model.dataSourceForId(t));(0,r.assert)((0,n.isLineTool)(s),"Passed shapeId is not a line tool"),this._controller.excludeLineToolFromGroup(i,s)}addShapeToGroup(e,t){const i=(0,r.ensureDefined)(this._groupById(e)),s=(0,r.ensureNotNull)(this._model.dataSourceForId(t));(0,r.assert)((0,n.isLineTool)(s),"Passed shapeId is not a line tool"),this._controller.addLineToolToGroup(i,s)}availableZOrderOperations(e){const t=(0,r.ensureDefined)(this._groupById(e));return this._controller.availableZOrderOperations(t)}bringToFront(e){const t=(0,r.ensureDefined)(this._groupById(e));this._controller.bringToFront(t)}bringForward(e){const t=(0,r.ensureDefined)(this._groupById(e));this._controller.bringForward(t)}sendBackward(e){const t=(0,r.ensureDefined)(this._groupById(e));this._controller.sendBackward(t)}sendToBack(e){const t=(0,r.ensureDefined)(this._groupById(e)) -;this._controller.sendToBack(t)}insertAfter(e,t){const i=(0,r.ensureDefined)(this._groupById(e)),s=(0,r.ensureNotNull)(this._groupById(t)||this._model.dataSourceForId(t));this._controller.insertAfter(i,s)}insertBefore(e,t){const i=(0,r.ensureDefined)(this._groupById(e)),s=(0,r.ensureNotNull)(this._groupById(t)||this._model.dataSourceForId(t));this._controller.insertBefore(i,s)}groupVisibility(e){return(0,r.ensureDefined)(this._groupById(e)).visibility()}setGroupVisibility(e,t){const i=(0,r.ensureDefined)(this._groupById(e));this._controller.setGroupVisibility(i,t)}groupLock(e){return(0,r.ensureDefined)(this._groupById(e)).locked()}setGroupLock(e,t){const i=(0,r.ensureDefined)(this._groupById(e));this._controller.setGroupLock(i,t)}getGroupName(e){return(0,r.ensureDefined)(this._groupById(e)).name()}setGroupName(e,t){const i=(0,r.ensureDefined)(this._groupById(e));this._controller.setGroupName(i,t)}canBeGroupped(e){const t=e.map((e=>(0,r.ensureNotNull)(this._model.dataSourceForId(e))));return!t.some((e=>!(0,n.isLineTool)(e)))&&this._controller.canBeGroupped(t)}_groupById(e){return this._controller.groups().find((t=>t.id===e))}}},35861:(e,t,i)=>{"use strict";i.d(t,{MouseEventHandler:()=>h});var s=i(49483),r=i(50151),n=i(65665),o=i(80007),a=i(78996);const l=s.isSafari?"click":"auxclick",c={treatVertTouchDragAsPageScroll:!1,treatHorzTouchDragAsPageScroll:!1};class h{constructor(e,t,i){this._clickCount=0,this._clickTimeoutId=null,this._clickPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._tapCount=0,this._tapTimeoutId=null,this._tapPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._longTapTimeoutId=null,this._longTapActive=!1,this._mouseMoveStartPosition=null,this._touchMoveStartPosition=null,this._touchMoveExceededManhattanDistance=!1,this._cancelClick=!1,this._cancelTap=!1,this._unsubscribeOutsideMouseEvents=null,this._unsubscribeOutsideTouchEvents=null,this._unsubscribeMobileSafariEvents=null,this._unsubscribeMousemove=null,this._unsubscribeRootMouseEvents=null,this._unsubscribeRootTouchEvents=null,this._startPinchMiddlePoint=null,this._startPinchDistance=0,this._pinchPrevented=!1,this._preventTouchDragProcess=!1,this._mousePressed=!1,this._lastTouchEventTimeStamp=0,this._activeTouchId=null,this._acceptMouseLeave=!s.CheckMobile.iOS(),this._onFirefoxOutsideMouseUp=e=>{this._mouseUpHandler(e)},this._onMobileSafariDoubleClick=e=>{if(this._firesTouchEvents(e)){const t=this._makeCompatEvent(e);if(++this._tapCount,this._tapTimeoutId&&this._tapCount>1){const{manhattanDistance:i}=this._touchMouseMoveWithDownInfo(u(e),this._tapPosition);i<30&&!this._cancelTap&&this._processTouchEvent(t,this._handler.doubleTapEvent),this._resetTapTimeout()}}else{const t=this._makeCompatEvent(e);if(++this._clickCount,this._clickTimeoutId&&this._clickCount>1){const{manhattanDistance:i}=this._touchMouseMoveWithDownInfo(u(e),this._clickPosition);i<5&&!this._cancelClick&&this._processMouseEvent(t,this._handler.mouseDoubleClickEvent),this._resetClickTimeout()}}},this._target=e,this._handler=t,this._options=(0, -n.merge)((0,n.clone)(c),i||{}),this._init()}destroy(){null!==this._unsubscribeOutsideMouseEvents&&(this._unsubscribeOutsideMouseEvents(),this._unsubscribeOutsideMouseEvents=null),null!==this._unsubscribeOutsideTouchEvents&&(this._unsubscribeOutsideTouchEvents(),this._unsubscribeOutsideTouchEvents=null),null!==this._unsubscribeMousemove&&(this._unsubscribeMousemove(),this._unsubscribeMousemove=null),null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null),null!==this._unsubscribeMobileSafariEvents&&(this._unsubscribeMobileSafariEvents(),this._unsubscribeMobileSafariEvents=null),this._clearLongTapTimeout(),this._resetClickTimeout()}_mouseEnterHandler(e){this._unsubscribeMousemove&&this._unsubscribeMousemove();const t=this._mouseMoveHandler.bind(this);if(this._unsubscribeMousemove=()=>{this._target.removeEventListener("mousemove",t)},this._target.addEventListener("mousemove",t),this._firesTouchEvents(e))return;const i=this._makeCompatEvent(e);this._processMouseEvent(i,this._handler.mouseEnterEvent),this._acceptMouseLeave=!0}_resetClickTimeout(){null!==this._clickTimeoutId&&clearTimeout(this._clickTimeoutId),this._clickCount=0,this._clickTimeoutId=null,this._clickPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}}_resetTapTimeout(){null!==this._tapTimeoutId&&clearTimeout(this._tapTimeoutId),this._tapCount=0,this._tapTimeoutId=null,this._tapPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}}_mouseMoveHandler(e){if(this._mousePressed||null!==this._touchMoveStartPosition)return;if(this._firesTouchEvents(e))return;const t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.mouseMoveEvent),this._acceptMouseLeave=!0}_touchMoveHandler(e){const t=m(e.changedTouches,(0,r.ensureNotNull)(this._activeTouchId));if(null===t)return;if(this._lastTouchEventTimeStamp=_(e),null!==this._startPinchMiddlePoint)return;if(this._preventTouchDragProcess)return;this._pinchPrevented=!0;const i=this._touchMouseMoveWithDownInfo(u(t),(0,r.ensureNotNull)(this._touchMoveStartPosition)),{xOffset:s,yOffset:n,manhattanDistance:a}=i;if(this._touchMoveExceededManhattanDistance||!(a<5)){if(!this._touchMoveExceededManhattanDistance){const e=.5*s,t=n>=e&&!this._options.treatVertTouchDragAsPageScroll,i=e>n&&!this._options.treatHorzTouchDragAsPageScroll;t||i||(this._preventTouchDragProcess=!0),this._touchMoveExceededManhattanDistance=!0,this._cancelTap=!0,this._clearLongTapTimeout(),this._resetTapTimeout()}if(!this._preventTouchDragProcess){const i=this._makeCompatEvent(e,t);this._processTouchEvent(i,this._handler.touchMoveEvent),(0,o.preventDefault)(e)}}}_mouseMoveWithDownHandler(e){if(0!==e.button)return;const t=this._touchMouseMoveWithDownInfo(u(e),(0,r.ensureNotNull)(this._mouseMoveStartPosition)),{manhattanDistance:i}=t;if(i>=5&&(this._cancelClick=!0,this._resetClickTimeout()),this._cancelClick){const t=this._makeCompatEvent(e) -;this._processMouseEvent(t,this._handler.pressedMouseMoveEvent)}}_touchMouseMoveWithDownInfo(e,t){const i=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);return{xOffset:i,yOffset:s,manhattanDistance:i+s}}_touchEndHandler(e){let t=m(e.changedTouches,(0,r.ensureNotNull)(this._activeTouchId));if(null===t&&0===e.touches.length&&(t=e.changedTouches[0]),null===t)return;this._activeTouchId=null,this._lastTouchEventTimeStamp=_(e),this._clearLongTapTimeout(),this._touchMoveStartPosition=null,this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);const i=this._makeCompatEvent(e,t);if(this._processTouchEvent(i,this._handler.touchEndEvent),++this._tapCount,this._tapTimeoutId&&this._tapCount>1){const{manhattanDistance:e}=this._touchMouseMoveWithDownInfo(u(t),this._tapPosition);e<30&&!this._cancelTap&&this._processTouchEvent(i,this._handler.doubleTapEvent),this._resetTapTimeout()}else this._cancelTap||(this._processTouchEvent(i,this._handler.tapEvent),this._handler.tapEvent&&(0,o.preventDefault)(e));0===this._tapCount&&(0,o.preventDefault)(e),0===e.touches.length&&this._longTapActive&&(this._longTapActive=!1,(0,o.preventDefault)(e))}_mouseUpHandler(e){if(0!==e.button)return;const t=this._makeCompatEvent(e);if(this._mouseMoveStartPosition=null,this._mousePressed=!1,this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),s.isFF){this._target.ownerDocument.documentElement.removeEventListener("mouseleave",this._onFirefoxOutsideMouseUp)}if(!this._firesTouchEvents(e))if(this._processMouseEvent(t,this._handler.mouseUpEvent),++this._clickCount,this._clickTimeoutId&&this._clickCount>1){const{manhattanDistance:i}=this._touchMouseMoveWithDownInfo(u(e),this._clickPosition);i<5&&!this._cancelClick&&this._processMouseEvent(t,this._handler.mouseDoubleClickEvent),this._resetClickTimeout()}else this._cancelClick||this._processMouseEvent(t,this._handler.mouseClickEvent)}_clearLongTapTimeout(){null!==this._longTapTimeoutId&&(clearTimeout(this._longTapTimeoutId),this._longTapTimeoutId=null)}_touchStartHandler(e){if(null!==this._activeTouchId)return;const t=e.changedTouches[0];this._activeTouchId=t.identifier,this._lastTouchEventTimeStamp=_(e);const i=this._target.ownerDocument.documentElement;this._cancelTap=!1,this._touchMoveExceededManhattanDistance=!1,this._preventTouchDragProcess=!1,this._touchMoveStartPosition=u(t),this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);{const t=this._touchMoveHandler.bind(this),s=this._touchEndHandler.bind(this);this._unsubscribeRootTouchEvents=()=>{i.removeEventListener("touchmove",t),i.removeEventListener("touchend",s)},i.addEventListener("touchmove",t,{passive:!1}),i.addEventListener("touchend",s,{passive:!1}),this._clearLongTapTimeout(),this._longTapTimeoutId=setTimeout(this._longTapHandler.bind(this,e),240)}const s=this._makeCompatEvent(e,t);this._processTouchEvent(s,this._handler.touchStartEvent),this._tapTimeoutId||(this._tapCount=0, -this._tapTimeoutId=setTimeout(this._resetTapTimeout.bind(this),500),this._tapPosition=u(t))}_wheelClickHandler(e){if(1!==e.button)return;if(this._firesTouchEvents(e))return;const t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.wheelClickEvent)}_mouseDownHandler(e){if(0!==e.button)return;const t=this._target.ownerDocument.documentElement;s.isFF&&t.addEventListener("mouseleave",this._onFirefoxOutsideMouseUp),this._cancelClick=!1,this._mouseMoveStartPosition=u(e),this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null);{const e=this._mouseMoveWithDownHandler.bind(this),i=this._mouseUpHandler.bind(this);this._unsubscribeRootMouseEvents=()=>{t.removeEventListener("mousemove",e),t.removeEventListener("mouseup",i)},t.addEventListener("mousemove",e),t.addEventListener("mouseup",i)}if(this._mousePressed=!0,this._firesTouchEvents(e))return;const i=this._makeCompatEvent(e);this._processMouseEvent(i,this._handler.mouseDownEvent),this._clickTimeoutId||(this._clickCount=0,this._clickTimeoutId=setTimeout(this._resetClickTimeout.bind(this),500),this._clickPosition=u(e))}_init(){this._target.addEventListener("mouseenter",this._mouseEnterHandler.bind(this)),this._target.addEventListener("touchcancel",this._clearLongTapTimeout.bind(this));{const e=this._target.ownerDocument,t=e=>!e.target||!this._target.contains(e.target),i=e=>{if(!t(e))return;const i=e.changedTouches[0];this._lastTouchEventTimeStamp=_(e),this._processTouchEvent(this._makeCompatEvent(e,i),this._handler.touchStartOutsideEvent)},s=e=>{t(e)&&!this._firesTouchEvents(e)&&this._processMouseEvent(this._makeCompatEvent(e),this._handler.mouseDownOutsideEvent)};this._unsubscribeOutsideTouchEvents=()=>{e.removeEventListener("touchstart",i)},this._unsubscribeOutsideMouseEvents=()=>{e.removeEventListener("mousedown",s)},e.addEventListener("mousedown",s),e.addEventListener("touchstart",i,{passive:!0})}s.CheckMobile.iOS()&&(this._unsubscribeMobileSafariEvents=()=>{this._target.removeEventListener("dblclick",this._onMobileSafariDoubleClick)},this._target.addEventListener("dblclick",this._onMobileSafariDoubleClick)),this._target.addEventListener("mouseleave",this._mouseLeaveHandler.bind(this)),this._target.addEventListener("contextmenu",this._contextMenuHandler.bind(this)),this._target.addEventListener("touchstart",this._touchStartHandler.bind(this),{passive:!0}),(0,o.preventScrollByWheelClick)(this._target),this._target.addEventListener("mousedown",this._mouseDownHandler.bind(this)),this._target.addEventListener(l,this._wheelClickHandler.bind(this)),this._initPinch(),this._target.addEventListener("touchmove",(()=>{}),{passive:!1})}_initPinch(){void 0===this._handler.pinchStartEvent&&void 0===this._handler.pinchEvent&&void 0===this._handler.pinchEndEvent||(this._target.addEventListener("touchstart",(e=>this._checkPinchState(e.touches)),{passive:!0}),this._target.addEventListener("touchmove",(e=>{if(2===e.touches.length&&null!==this._startPinchMiddlePoint&&void 0!==this._handler.pinchEvent){ -const t=e.touches[0],i=e.touches[1],s=p(t,i)/this._startPinchDistance,r=d(this._target);this._handler.pinchEvent(this._startPinchMiddlePoint,{x:t.clientX-r.left,y:t.clientY-r.top},{x:i.clientX-r.left,y:i.clientY-r.top},s),(0,o.preventDefault)(e)}}),{passive:!1}),this._target.addEventListener("touchend",(e=>{this._checkPinchState(e.touches)})))}_checkPinchState(e){1===e.length&&(this._pinchPrevented=!1),2!==e.length||this._pinchPrevented||this._longTapActive?this._stopPinch():this._startPinch(e)}_startPinch(e){if(void 0!==this._handler.pinchStartEvent){const t=d(this._target),i=e[0],s=e[1],r={x:i.clientX-t.left,y:i.clientY-t.top},n={x:s.clientX-t.left,y:s.clientY-t.top};this._startPinchMiddlePoint={x:(r.x+n.x)/2,y:(r.y+n.y)/2},this._startPinchDistance=p(i,s),this._handler.pinchStartEvent(this._startPinchMiddlePoint,r,n)}this._clearLongTapTimeout()}_stopPinch(){null!==this._startPinchMiddlePoint&&(this._startPinchMiddlePoint=null,void 0!==this._handler.pinchEndEvent&&this._handler.pinchEndEvent())}_mouseLeaveHandler(e){if(this._unsubscribeMousemove&&this._unsubscribeMousemove(),this._firesTouchEvents(e))return;if(!this._acceptMouseLeave)return;const t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.mouseLeaveEvent),this._acceptMouseLeave=!s.CheckMobile.iOS()}_longTapHandler(e){const t=m(e.touches,(0,r.ensureNotNull)(this._activeTouchId));if(null===t)return;const i=this._makeCompatEvent(e,t);this._processTouchEvent(i,this._handler.longTapEvent),this._processTouchEvent(i,this._handler.touchContextMenuEvent),this._cancelTap=!0,this._longTapActive=!0}_contextMenuHandler(e){if((0,o.preventDefault)(e),null!==this._touchMoveStartPosition)return;if(this._firesTouchEvents(e))return;const t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.contextMenuEvent),this._cancelClick=!0}_firesTouchEvents(e){return e.sourceCapabilities&&void 0!==e.sourceCapabilities.firesTouchEvents?e.sourceCapabilities.firesTouchEvents:_(e){"touchstart"!==e.type&&(0,o.preventDefault)(e)}}}}function d(e){return e.getBoundingClientRect()||{left:0,top:0}}function u(e){return{x:e.pageX,y:e.pageY}}function p(e,t){const i=e.clientX-t.clientX,s=e.clientY-t.clientY;return Math.sqrt(i*i+s*s)}function _(e){return e.timeStamp||performance.now()}function m(e,t){ -for(let i=0;i{"use strict";i.d(t,{navigationButtonsVisibilityKey:()=>r,property:()=>n,availableValues:()=>o,actualBehavior:()=>a});var s=i(84803);const r="NavigationButtons.visibility",{property:n,availableValues:o,actualBehavior:a}=(0,s.createVisibilityController)(r)},43074:(e,t,i)=>{"use strict";i.d(t,{property:()=>n,availableValues:()=>o,actualBehavior:()=>a});var s=i(84803),r=i(11954);const{property:n,availableValues:o,actualBehavior:a}=(0,s.createVisibilityController)("PaneButtons.visibility",r.navigationButtonsVisibilityKey)},50792:(e,t,i)=>{"use strict";i.d(t,{ActionBinder:()=>s});class s{constructor(e,t,i,s,r=null){this._property=t,this._undoModel=i,this._undoText=s,this._action=e,this.setValue(t.value()),t.subscribe(this,this._propertyChanged),null!==r?e.update({onExecute:r.bind(this)}):e.update({onExecute:this._onActionCallback.bind(this)})}destroy(){this._property.unsubscribe(this,this._propertyChanged)}value(){return this._action.isChecked()}setValue(e){this._action.update({checked:Boolean(e)})}_onActionCallback(){this._undoModel.setProperty(this._property,this.value(),this._undoText)}_propertyChanged(e){this.setValue(e.value())}}},50534:(e,t,i)=>{"use strict";i.d(t,{isCustomStudy:()=>r});const s={VbPFixed:!0,PivotPointsStandard:!0,VbPVisible:!0};function r(e){return e in s}},46069:(e,t,i)=>{"use strict";i.d(t,{MetaInfoHelper:()=>u});var s=i(50151),r=i(58403),n=i(83421),o=i(65665),a=i(98351),l=i(8890);function c(e){return!e.groupId&&!e.isHidden&&e.id!==l.RangeDependentStudyInputNames.FirstBar&&e.id!==l.RangeDependentStudyInputNames.LastBar}var h=i(50534);const d=(0,a.getLogger)("Platform.GUI.PropertyDialog.Indicators.MetaInfo");class u{constructor(e){this._metaInfo=e}hasUserEditableInputs(){return this._metaInfo.inputs.some(c)}getUserEditableInputs(){return this._metaInfo.inputs.filter(c)}hasUserEditableProperties(){return r.StudyMetaInfo.isScriptStrategy(this._metaInfo)}hasUserEditableStyles(){const e=this._metaInfo;return e.plots.length>0||void 0!==e.bands||void 0!==e.filledAreas||(0,h.isCustomStudy)(e.shortId)||r.StudyMetaInfo.isScriptStrategy(this._metaInfo)||Object.values(e.graphics).some((e=>void 0!==e))}getUserEditablePlots(){const e=new Set,t=this._metaInfo;return t.plots.filter((i=>{if((0,n.isColorerPlot)(i)||(0,n.isTextColorerPlot)(i)||(0,n.isDataOffsetPlot)(i)||(0,n.isOhlcColorerPlot)(i)||(0,n.isAlertConditionPlot)(i)||(0,n.isDataPlot)(i))return!1;if((0,n.isOhlcPlot)(i)){const r=i.target;if(e.has(r))return!1;e.add(r);const n=(0,s.ensureDefined)(t.ohlcPlots);return!(0,s.ensureDefined)(n[r]).isHidden}{const e=t.styles?t.styles[i.id]:void 0;return void 0===e||!e.isHidden}}))}hasUserEditableOptions(){return this.hasUserEditableInputs()||this.hasUserEditableProperties()||this.hasUserEditableStyles()}getStrategyProperties(){const e=this._metaInfo,t=e.inputs.filter(_),i={...p};for(const s of t){const t=s.internalID;i[t]=s,p.hasOwnProperty(t)||d.logWarn(`Unknown strategy input internal id ${t} in ${e.fullId}`)}return(0, -o.clone)(i)}}const p={currency:void 0,backtest_fill_limits_assumption:void 0,calc_on_every_tick:void 0,calc_on_order_fills:void 0,commission_value:void 0,commission_type:void 0,initial_capital:void 0,pyramiding:void 0,slippage:void 0,default_qty_type:void 0,default_qty_value:void 0,margin_long:void 0,margin_short:void 0,use_bar_magnifier:void 0,process_orders_on_close:void 0};function _(e){return"strategy_props"===e.groupId}},71445:(e,t,i)=>{"use strict";i.d(t,{checkAuthBeforeSaveLoad:()=>r});var s=i(2484);function r(e,t){s.enabled("saveload_requires_authentication")?window.runOrSignIn(e,t):e()}},67065:(e,t,i)=>{"use strict";i.d(t,{AbstractJsonStoreService:()=>n,CommonJsonStoreService:()=>o});var s=i(26867),r=i.n(s);class n{constructor(e,t,i,s,n){this._onChange=new(r()),this._handleChange=()=>{this._onChange.fire(this.get())},this._crossTabEvents=e,this._jsonKeyValueStore=t,this.CROSSTAB_EVENT_NAME=i,this.JSON_STORE_KEY=s,this.defaultStoreValue=this._serialize(n),this._subscribe()}get(){const e=this._jsonKeyValueStore.getJSON(this.JSON_STORE_KEY,this.defaultStoreValue);return this._deserialize(e)}set(e,t){const i=this._serialize(e);this._jsonKeyValueStore.setJSON(this.JSON_STORE_KEY,i,t),this._crossTabEvents.emit(this.CROSSTAB_EVENT_NAME),this._onChange.fire(e)}getOnChange(){return this._onChange}destroy(){this._unsubscribe(),this._onChange.destroy(),delete this._onChange}_subscribe(){this._crossTabEvents.on(this.CROSSTAB_EVENT_NAME,this._handleChange),this._jsonKeyValueStore.onSync.subscribe(this,this._handleChange)}_unsubscribe(){this._crossTabEvents.off(this.CROSSTAB_EVENT_NAME,this._handleChange),this._jsonKeyValueStore.onSync.unsubscribe(this,this._handleChange)}}class o extends n{_serialize(e){return e}_deserialize(e){return e}}},5520:(e,t,i)=>{"use strict";i.d(t,{LoadChartService:()=>d});var s=i(2484),r=i(7276),n=i(71445),o=i(88279),a=i(21097),l=i(56840),c=i(67065);class h extends c.CommonJsonStoreService{constructor(e,t){super(e,t,"FAVORITE_CHARTS_CHANGED","loadChartDialog.favorites",{})}}class d extends o.DialogRenderer{constructor(e=null){super(),this._chartWidgetCollection=null,this._promise=null,this._dialog=null,this._subscribe=e=>{this._setVisibility(e)},this._getChartEntry=e=>({id:e.id,url:e.url,title:e.name,symbol:e.short_symbol,interval:e.interval,toolsCount:0,modified:e.modified_iso,favorite:void 0,active:()=>this._isActiveChart(e.id),openAction:()=>r.backend.loadChart(e),deleteAction:()=>r.backend.removeChart(e.image_url).then((()=>this._deleteChart(e.id))),favoriteAction:e=>Promise.resolve(this._updateFavorites(e))}),this._updateFavorites=e=>{var t;null===(t=this._favoriteChartsService)||void 0===t||t.set(e)},this._isActiveChart=e=>null!==this._chartWidgetCollection&&e===this._chartWidgetCollection.metaInfo.id.value(),this._deleteChart=e=>{this._isActiveChart(e)&&(s.enabled("saveload_storage_customization")?null!==this._chartWidgetCollection&&this._chartWidgetCollection.clearChartMetaInfo():location.href="/chart/"+location.search)},this._chartWidgetCollection=e, -this._favoriteChartsService=new h(a.TVXWindowEvents,l)}showLoadDialog(){(0,n.checkAuthBeforeSaveLoad)(this._showLoadDialog.bind(this),{source:"Load chart",sourceMeta:"Chart"})}show(){this.showLoadDialog()}hide(){var e,t;null===(e=this._dialog)||void 0===e||e.hide(),null===(t=this._dialog)||void 0===t||t.visible().unsubscribe(this._subscribe)}_showLoadDialog(){(s.enabled("saveload_requires_authentication")&&!window.is_authenticated?Promise.resolve([]):r.backend.getCharts()).then((e=>e.map(this._getChartEntry))).then((e=>{const t=this._promise=Promise.all([i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(9333),i.e(8271),i.e(4412),i.e(8009),i.e(7920),i.e(1830),i.e(962),i.e(2842),i.e(3016),i.e(1075),i.e(8483),i.e(5009)]).then(i.bind(i,69883)).then((i=>{if(this._promise===t){this._dialog&&(this._dialog.hide(),this._dialog.visible().unsubscribe(this._subscribe));const t={charts:e,favoriteChartsService:this._favoriteChartsService,chartWidgetCollection:this._chartWidgetCollection};this._dialog=new i.LoadChartDialogRenderer(t),this._dialog.visible().subscribe(this._subscribe),this._dialog.show()}}))}))}async _changeFavoriteState(e,t,i){return Promise.resolve()}}},93958:(e,t,i)=>{"use strict";i.d(t,{SaveChartService:()=>v});var s=i(2484),r=i(40549),n=i.n(r),o=i(76422),a=i(25927),l=i(71445);i(93731);s.enabled("atsv2s");var c=i(44352),h=i(7276);async function d(){return!0}var u=i(3615);const p=s.enabled("confirm_overwrite_if_chart_layout_with_name_exists");class _{constructor(e,t,i){this._visibility=new(n())(!1),this._chartWidgetCollection=e,this._doSave=t,this._doLoad=i}hide(){var e;null===(e=this._hide)||void 0===e||e.call(this),this._visibility.setValue(!1)}visible(){return this._visibility.readonly()}_showRenameDialog(e,t,s,r){return(0,u.showRename)({title:this._renameDialogTitle(),text:this._renameDialogText(),maxLength:64,initValue:e,onRename:async e=>{if(!p)return void this._renameActionHandler(e,t,s,r);const{newValue:n,dialogClose:o}=e,a=(await this._doLoad()).find((e=>e.name===n));o(),void 0!==a?this._hide=await(0,u.showConfirm)({title:c.t(null,void 0,i(56996)),text:c.t(null,void 0,i(30192)),onConfirm:({dialogClose:e})=>{e(),this._doOverwriteExistingLayout(a.id,n,t,s,r)},onCancel:({dialogClose:e})=>{e(),this._showRenameDialog(n,t,s,r)}}):this._renameActionHandler({newValue:n,dialogClose:o},t,s,r)},onClose:()=>this._visibility.setValue(!1)})}_doSaveCurrentLayout(e,t,i,s){const r=this._chartWidgetCollection.metaInfo.name.value();this._chartWidgetCollection.metaInfo.name.setValue(e),this._doSave(t,i,(()=>{this._chartWidgetCollection.metaInfo.name.setValue(r),null==s||s()}))}_doOverwriteExistingLayout(e,t,i,s,r){const n=this._chartWidgetCollection.metaInfo.name.value();this._chartWidgetCollection.metaInfo.id.setValue(e),this._chartWidgetCollection.metaInfo.name.setValue(t),this._doSave(i,s,(()=>{this._chartWidgetCollection.metaInfo.name.setValue(n),null==r||r()}))}}class m extends _{cloneChart(){this._cloneChart().then((()=>this._visibility.setValue(!0)))}show(){(0,l.checkAuthBeforeSaveLoad)((()=>this.cloneChart()),{ -source:"Clone chart"})}_renameDialogTitle(){return c.t(null,void 0,i(87898))}_renameDialogText(){return c.t(null,void 0,i(24435))+":"}_renameActionHandler({newValue:e,dialogClose:t}){s.enabled("saveload_storage_customization")&&this._doCloneCurrentLayout(e),t()}async _cloneChart(){const e=await d();e&&(this._hide=await this._showRenameDialog(this._getInitialRenameDialogInput()))}_doCloneCurrentLayout(e){const t=this._chartWidgetCollection.metaInfo.name.value();this._chartWidgetCollection.metaInfo.uid.deleteValue(),this._chartWidgetCollection.metaInfo.id.deleteValue(),this._chartWidgetCollection.metaInfo.name.setValue(e),this._doSave(void 0,void 0,(()=>{this._chartWidgetCollection.metaInfo.name.setValue(t)}))}_getInitialRenameDialogInput(){return c.t(null,{context:"ex: AAPL chart copy"},i(16493)).format({title:this._chartWidgetCollection.metaInfo.name.value()})}}class g extends _{show(e,t,i){this._saveNewChart(e,t,i).then((()=>this._visibility.setValue(!0)))}_renameDialogTitle(){return c.t(null,void 0,i(10520))}_renameDialogText(){return c.t(null,void 0,i(24435))+":"}_renameActionHandler({newValue:e,dialogClose:t},i,s,r){this._doSaveCurrentLayout(e,i,s,r),t()}async _saveNewChart(e,t,i){await d();const s=this._chartWidgetCollection.metaInfo.name.value();this._hide=await this._showRenameDialog(s,e,t,i)}}class f extends _{show(){(0,l.checkAuthBeforeSaveLoad)((()=>this._show()),{source:"Rename chart"})}_renameDialogTitle(){return c.t(null,void 0,i(4142))}_renameDialogText(){return c.t(null,void 0,i(24435))+":"}_renameActionHandler({newValue:e,dialogClose:t}){this._doSaveCurrentLayout(e),t()}async _show(){await this._renameChart(),this._visibility.setValue(!0)}async _renameChart(){const e=this._chartWidgetCollection.metaInfo.name.value();this._hide=await this._showRenameDialog(e)}}class v{constructor(e,t){this._autosaveTimer=null,this._watchedAutoSaveEnabled=new(n()),this._toggleAutoSaveEnabledHandler=this._toggleAutoSaveEnabled.bind(this),this._doSave=(e,t,i,s)=>{const r=this._chartWidgetCollection;void 0!==e&&e();const n=this._chartChangesWatcher.changes();this._chartSaver.saveChartSilently((e=>{var i;i=r.metaInfo.uid.value(),"/chart/"===location.pathname&&(location.href="/chart/"+i),void 0!==t&&t(e)}),(()=>{void 0!==i&&i()}),{autoSave:Boolean(s),changes:n})},this._doLoad=()=>h.backend.getCharts(),this._chartWidgetCollection=e,this._chartSaver=t,this._createController=new g(e,this._doSave,this._doLoad),this._renameController=new f(e,this._doSave,this._doLoad),this._saveAsController=new m(e,this._doSave,this._doLoad),this._chartChangesWatcher=new a.ChartChangesWatcher(e,t,o),e.saveKeysPressed().subscribe(this,this.saveChartOrShowTitleDialog),this._chartChangesWatcher.getOnChange().subscribe(this,this._onStateChanged)}autoSaveEnabled(){return this._watchedAutoSaveEnabled}destroy(){0}getCreateController(){return this._createController}getRenameController(){return this._renameController}getSaveAsController(){return this._saveAsController}cloneChart(){this._saveAsController.cloneChart()}saveChartAs(){ -this._saveAsController.show()}renameChart(){this._renameController.show()}saveNewChart(e,t,i){this._createController.show(e,t,i)}saveExistentChart(e,t,i){this._doSave(e,t,i)}changes(){return this._chartChangesWatcher.changes()}hasChanges(){return 0!==this._chartChangesWatcher.changes()}saveChartOrShowTitleDialog(e,t,i){const s=window.saver.isSaveInProcess(),r=this._chartChangesWatcher.hasChanges(),n=!!this._chartWidgetCollection.metaInfo.id.value();window.is_authenticated&&(s||!r&&n)||(0,l.checkAuthBeforeSaveLoad)((()=>{null!=this._chartWidgetCollection.metaInfo.id.value()?this.saveExistentChart(e,t,i):this.saveNewChart(e,t,i)}),{source:"Save chart",sourceMeta:"Chart"})}saveToJSON(){return this._chartSaver.saveToJSON()}saveChartSilently(e,t,i){this._chartSaver.saveChartSilently(e,t,i)}setAutoSaveEnabled(e){window.is_authenticated&&window.saver.isSaveInProcess()||(0,l.checkAuthBeforeSaveLoad)((()=>{this._watchedAutoSaveEnabled.setValue(e)}),{source:"AutoSave chart"})}saveChartLineTools(e,t,i,s){return this._chartSaver.saveChartLineTools(e,t,i,s)}_autoSaveEnabledSettingHandler(e){0}_toggleAutoSaveEnabled(e){0}_enableAutoSave(){0}_disableAutoSave(){0}_onStateChanged(e){e?this._startAutosave():this._stopAutosave()}_startAutosave(){s.enabled("charts_auto_save")&&null===this._autosaveTimer&&(this._autosaveTimer=setTimeout((()=>{this._autosaveTimer=null,this._chartWidgetCollection.metaInfo.id.value()&&this._doSave(void 0,void 0,void 0,!0)}),6e4))}_stopAutosave(){null!==this._autosaveTimer&&(clearInterval(this._autosaveTimer),this._autosaveTimer=null)}}},35663:(e,t,i)=>{"use strict";i.d(t,{showMarketOpenStatusProperty:()=>a,restoreShowMarketOpenStatusProperty:()=>l});var s=i(60923),r=i(56840);const n="Chart.ShowMarketOpenStatus";function o(){return r.getBool(n,true)}const a=(0,s.createPrimitiveProperty)(o());function l(){a.setValue(true),r.remove(n)}r.onSync.subscribe(null,(()=>a.setValue(o()))),a.subscribe(null,(()=>r.setValue(n,a.value())))},30802:(e,t,i)=>{"use strict";i.d(t,{firstReplacedByBatsExchange:()=>a,isEod:()=>l,isYield:()=>c,isDelay:()=>h,witoutRealtime:()=>d,getExchange:()=>u});i(50151);var s=i(83232),r=i.n(s);i(1930);const n=["DJ","CBOE","JSE"],o=["NZX"];function a(e){return null}function l(e,t){return r().hasEodSymbols(e.full_name)||6===t}function c(e){var t;return Boolean(null===(t=e.typespecs)||void 0===t?void 0:t.includes("yield"))}function h(e){return void 0!==e&&e>0}function d(e){return"index"===e.type&&n.includes(e.listed_exchange)||"futures"===e.type&&o.includes(e.listed_exchange)}async function u(e){return null}},87520:(e,t,i)=>{"use strict";i.d(t,{StudyTemplates:()=>p});var s=i(44352),r=i(7276),n=i(51768),o=i(26867),a=i.n(o),l=i(40549),c=i.n(l),h=i(3615);const d=(0,i(98351).getLogger)("Platform.StudyTemplates"),u=s.t(null,void 0,i(97065));class p{constructor(e){this._chartWidgetCollection=e.chartWidgetCollection,this._favoriteStudyTemplatesService=e.favoriteStudyTemplatesService,window.loginStateChange.subscribe(null,r.backend.invalidateStudyTemplatesList),this._list=new(c())([]), -this._onChange=new(a()),this._list.subscribe((()=>this._onChange.fire()))}findRecordByName(e){return this._list.value().find((t=>t.name===e))||null}showSaveAsDialog(){const e=this._chartWidgetCollection.activeChartWidget.value().model();Promise.all([i.e(8230),i.e(5384),i.e(1428),i.e(1685),i.e(4819),i.e(8619),i.e(346),i.e(5761),i.e(7177),i.e(1140),i.e(4884),i.e(6812),i.e(4147),i.e(962),i.e(3016),i.e(535),i.e(6631)]).then(i.bind(i,50215)).then((t=>{new t.StudyTemplateSaver({controller:e,onSave:e=>{this._list.setValue(e)}}).show()}))}applyTemplate(e){const t=this.findRecordByName(e);null!==t?window.runOrSignIn((()=>{const e=this._chartWidgetCollection.activeChartWidget.value(),i=i=>{(0,n.trackEvent)("GUI","Load Study Template"),e.model().applyStudyTemplate(JSON.parse(i.content),t.name)};void 0!==t.id?t.is_default?r.backend.getStandardStudyTemplateContentById(t.id,i):r.backend.getStudyTemplateContentById(t.id,i):r.backend.getStudyTemplateContent(t.name).then(i)}),{source:"Study templates apply"}):d.logNormal(`Template ${e} not found in cache`)}deleteStudyTemplate(e){const t=this.findRecordByName(e);null!==t?this._removeTemplate(t):d.logNormal(`Template ${e} not found in cache`)}list(){return this._list.value()}getOnChange(){return this._onChange}refreshStudyTemplateList(e){r.backend.getStudyTemplatesList().then((t=>{this._list.setValue(t),void 0!==e&&e()}))}invalidate(){r.backend.invalidateStudyTemplatesList()}_removeTemplate(e){window.runOrSignIn((()=>{(0,h.showConfirm)({text:u.format({name:e.name}),onConfirm:({dialogClose:t})=>new Promise((i=>{const s=()=>{this.refreshStudyTemplateList((()=>{const s=this.list();this._list.setValue(s.filter((t=>t!==e))),this._favoriteStudyTemplatesService&&this._favoriteStudyTemplatesService.remove(e.name),i(),t()}))};r.backend.invalidateStudyTemplatesList(),void 0!==e.id?r.backend.removeStudyTemplateById(e.id,s):r.backend.removeStudyTemplate(e.name).then(s)}))})}),{source:"Study templates delete"})}}},36309:(e,t,i)=>{"use strict";i.d(t,{canShowSpreadActions:()=>r,globalKeypressMatches:()=>n});var s=i(2484);i(92133),i(82992);new RegExp("^quandl","i");function r(){let e=!1;return s.enabled("show_spread_operators")&&(e=!0),e}function n(e){if(e.ctrlKey)return!1;if(e.metaKey)return!1;if(!e.charCode)return!1;if(!e.which||e.which<=32)return!1;const t=e.target;return!t||!/^(input|textarea)$/i.test(t.tagName)&&"listbox"!==t.getAttribute("role")}},90877:(e,t,i)=>{"use strict";function s(){return Promise.all([i.e(8230),i.e(5384),i.e(1428),i.e(1685),i.e(4819),i.e(8825),i.e(8271),i.e(8707),i.e(3261),i.e(962),i.e(2842),i.e(3016),i.e(3988),i.e(1754)]).then(i.bind(i,89324))}i.d(t,{loadNewSymbolSearch:()=>s})},97070:(e,t,i)=>{"use strict";i.d(t,{tradingService:()=>n});var s=i(16216);const r={id:"TradingService"};function n(){return(0,s.hasService)(r)?(0,s.service)(r):null}},70107:(e,t,i)=>{"use strict";i.d(t,{TradingViewApiBase:()=>S});var s=i(50151),r=i(82992),n=i(2484),o=i(51768),a=i(8840),l=i(45345),c=i(26867),h=i.n(c);class d{constructor(e){this._toolbarThemeChanged=new(h()), -this._onWatchedThemeChanged=e=>{this._toolbarThemeChanged.fire(e)},this._opts=e,l.watchedTheme.subscribe(this._onWatchedThemeChanged)}destroy(){l.watchedTheme.unsubscribe(this._onWatchedThemeChanged)}isStdTheme(){const e=this._opts.chartWidgetCollection.getAll().every((e=>(0,a.isStdTheme)((0,a.extractThemeFromModel)(e.model()))));return Promise.resolve(e)}async setStdTheme(e,t=!0,i){await(0,a.loadTheme)(this._opts.chartWidgetCollection,{themeName:e,standardTheme:!0,syncState:t,noUndo:i})}setStdThemeForLayout(e,t=!0){(0,l.setTheme)(e),t&&(0,a.syncTheme)()}getCurrentThemeName(){return(0,a.getCurrentTheme)().name}toolbarThemeChanged(){return this._toolbarThemeChanged}}var u=i(37121),p=i(76076),_=i(40549),m=i.n(_),g=i(7711);const f=new(h());function v(){throw new Error("not implemented")}class S{constructor(e){this._studyTemplatesDrawer=null,this._fontIconsSettingsDrawer=null,this._favoriteDrawingsToolbar=null,this._themesApi=null,this._newsApiDeferredPromise=null,this._newsApiRejectionReason=null,this._watchlistApiDeferredPromise=null,this._watchlistApiRejectionReason=null,this._widgetbarApiDeferredPromise=null,this._widgetbarApiRejectionReason=null,this._isDestroyed=!1,this._widgebarApi=null,this._magnetEnabledWatchedValue=null,this._magnetModeWatchedValue=null;const{chartApiInstance:t,chartWidgetCollection:i,studyMarket:s,financialsDialog:n,saveChartService:o,loadChartService:a,sharingChartService:l=null}=e;this._chartWidgetCollection=i,this._studyMarket=s,this._financialsDialog=n,this._saveChartService=o,this._sharingChartService=l,this._loadChartLayoutDialog=a,this._intervalsService=null,this._alertsWidgetDialog=null,this._detailsDialogController=null,this._supportedChartStylesSpawn=r.linking.supportedChartStyles.spawn(),this._chartWidgetCollection.onAboutToBeDestroyed.subscribe(null,(()=>this.destroy()),!0);const c=i.lock;this._symbolSync=c.symbol.spawn(),this._intervalSync=c.interval.spawn(),this._dateRangeSync=c.dateRange.spawn(),this._crosshairSync=c.crosshair.spawn(),this._timeSync=c.trackTime.spawn()}destroy(){var e,t,i;this._supportedChartStylesSpawn.destroy(),null===(e=this._intervalsService)||void 0===e||e.destroy(),null===(t=this._themesApi)||void 0===t||t.destroy(),null===(i=this._widgebarApi)||void 0===i||i.destroy(),this._widgetbarApiRejectionReason="This ITradingViewApi instance has been destroyed",this._symbolSync.destroy(),this._intervalSync.destroy(),this._dateRangeSync.destroy(),this._crosshairSync.destroy(),this._timeSync.destroy(),this._isDestroyed=!0,(0,p.properties)().childs().magnet.unsubscribeAll(this),(0,p.properties)().childs().magnetMode.unsubscribeAll(this)}themes(){return null===this._themesApi&&(this._themesApi=new d({chartWidgetCollection:this._chartWidgetCollection})),this._themesApi}dialogs(){var e,t,i,s,r,n;return{Indicators:this._studyMarket,Financials:this._financialsDialog,Compare:this._chartWidgetCollection.getCompareDialogRenderer(),ObjectsTree:null,ChartProperties:this._chartWidgetCollection.getChartPropertiesDialogRenderer(), -ChartLayoutSaveAs:null!==(t=null===(e=this._saveChartService)||void 0===e?void 0:e.getSaveAsController())&&void 0!==t?t:null,ChartLayoutRename:null!==(s=null===(i=this._saveChartService)||void 0===i?void 0:i.getRenameController())&&void 0!==s?s:null,ChartLayoutCreate:null!==(n=null===(r=this._saveChartService)||void 0===r?void 0:r.getCreateController())&&void 0!==n?n:null,ChartLayoutLoad:this._loadChartLayoutDialog,Alerts:this._alertsWidgetDialog,Details:this._detailsDialogController,FinancialsCharts:null,Technicals:null,Forecast:null}}studyTemplatesDrawerApi(){v()}fontIconsSettingsDrawer(){v()}intervalsService(){v()}supportedChartTypes(){return this._supportedChartStylesSpawn}setBrokerName(e){this._chartWidgetCollection.setBroker(e)}drawOnAllChartsMode(e){(0,p.drawOnAllChartsMode)().setValue(e)}disableTrackingEvents(){(0,o.disableTrackingEvents)()}getSaveChartService(){return this._saveChartService}symbolSync(){return this._symbolSync}intervalSync(){return this._intervalSync}dateRangeSync(){return this._dateRangeSync}crosshairSync(){return this._crosshairSync}timeSync(){return this._timeSync}setSymbolSearchUI(e){v()}setLayout(e,t){(null==t?void 0:t.withUndo)?this._chartWidgetCollection.setChartLayoutWithUndo(e):this._chartWidgetCollection.setLayout(e)}selectLineTool(e,t){if(!u.supportedLineTools[e])return;const i=u.supportedLineTools[e].name;if("icon"===e){const e=null==t?void 0:t.icon;void 0!==e&&p.iconTool.setValue(e)}if("emoji"===e){const e=null==t?void 0:t.emoji;void 0!==e&&p.emojiTool.setValue(e)}p.tool.setValue(i)}favoriteDrawingsToolbar(){return i.e(5551).then(i.bind(i,63624)).then((e=>(this._favoriteDrawingsToolbar||(this._favoriteDrawingsToolbar=new e.FavoriteDrawingsApi),this._favoriteDrawingsToolbar)))}sharingChart(){return this._sharingChartService}watchlist(){v()}setWatchlistApiPromise(e){v()}news(){v()}setNewsApiPromise(e){v()}widgetbar(){v()}setWidgetbarApiPromise(e){v()}getChartStorage(){return getChartStorage()}setDebugMode(e){n.setEnabled("charting_library_debug_mode",e)}setFeatureEnabled(e,t){n.setEnabled(e,t)}magnetEnabled(){return null===this._magnetEnabledWatchedValue&&(this._magnetEnabledWatchedValue=new(m())((0,p.properties)().childs().magnet.value()),this._magnetEnabledWatchedValue.subscribe((e=>{(0,g.saveDefaultProperties)(!0),(0,p.properties)().childs().magnet.setValue(e),(0,g.saveDefaultProperties)(!1)})),(0,p.properties)().childs().magnet.subscribe(this,(()=>{(0,s.ensureNotNull)(this._magnetEnabledWatchedValue).setValue((0,p.properties)().childs().magnet.value())}))),this._magnetEnabledWatchedValue}magnetMode(){return null===this._magnetModeWatchedValue&&(this._magnetModeWatchedValue=new(m())((0,p.properties)().childs().magnetMode.value()),this._magnetModeWatchedValue.subscribe((e=>{(0,g.saveDefaultProperties)(!0),(0,p.properties)().childs().magnetMode.setValue(e),(0,g.saveDefaultProperties)(!1)})),(0,p.properties)().childs().magnetMode.subscribe(this,(()=>{(0,s.ensureNotNull)(this._magnetModeWatchedValue).setValue((0,p.properties)().childs().magnetMode.value())}))), -this._magnetModeWatchedValue}flushBufferedData(){f.fire()}}},73809:(e,t,i)=>{"use strict";var s=i(26867),r=i(40549),n=i(82992).linking,o=(i(71668).createDeferredPromise,i(24134)),a=i(57737).layouts,l=i(76422),c=i(60223).ContextMenuManager,h=i(76076),d=i(92133),u=i(7276).backend,p=i(98351),_=i(3615).showWarning,m=i(3615).showConfirm,g=i(37121),f=i(52092).CLOSE_POPUPS_AND_DIALOGS_COMMAND,v=i(578).Interval,S=i(25927).ChartChangesWatcher,y=i(70107).TradingViewApiBase,b=i(58403).StudyMetaInfo,w=i(152).getStudyInputsInfo,C=i(70120).getStudyStylesInfo;e.exports=class extends y{constructor(e){const{chartWidgetCollection:t,saveChartService:i,loadChartService:r,sharingChartService:o,alertsDispatcher:a,supportTicketData:l,favoriteServices:c,chartApiInstance:h=null,studyMarket:d=null,financialsDialog:u=null}=e;super({chartApiInstance:h,chartWidgetCollection:t,studyMarket:d,financialsDialog:u,saveChartService:i,loadChartService:r,sharingChartService:o}),this._chartApiInstance=h,this._loadChartService=r,this._alertsDispatcher=a,this._supportTicketData=l,this._favoriteServices=c,this._proxyWatchListChangedDelegate=null,this._lockDrawingsWatchedValue=null,this._hideDrawingsWatchedValue=null,this._hideIndicatorsWatchedValue=null,this._replayApi=null,this._chartChangesWatcher=null,this._hasChartChangesWatchedValue=null,this._getDataSourceHub=function(){return t.activeChartWidget.value().model().model()},this._chartWidgetCollection.getResizerDetacher=function(){return t.activeChartWidget.value().getResizerDetacher()},this._alertService=this._alertsDispatcher?new undefined(this._alertsDispatcher,this._getDataSourceHub):null,this._activeChangedChangedDelegate=new s,this._chartWidgetCollection.activeChartWidget.subscribe(function(){this._activeChangedChangedDelegate.fire()}.bind(this)),this._chartWidgets=new WeakMap,this._activateChart=function(e){t.activeChartWidget.setValue(e)},this.linking=n}subscribe(e,t){l.subscribe(e,t)}unsubscribe(e,t){l.unsubscribe(e,t)}onContextMenu(e){l.subscribe("onContextMenu",(function(t){t.callback(e(t.unixtime,t.price))}))}onGrayedObjectClicked(e){l.subscribe("onGrayedObjectClicked",e)}activeChart(){return this._getChartWidgetApi(this._chartWidgetCollection.activeChartWidget.value())}_getChartWidgetApi(e){var t=this._chartWidgets.get(e);return void 0===t&&(t=new o(e,this._activateChart.bind(null,e)),this._chartWidgets.set(e,t)),t}onActiveChartChanged(){return this._activeChangedChangedDelegate}changeSymbol(e,t,i){n.interval.setValue(v.normalize(t)),n.symbol.setValue(e),i&&this.activeChart().onDataLoaded().subscribe(null,i,!0)}layout(){return this._chartWidgetCollection.layout.value()}layoutName(){return this._chartWidgetCollection.metaInfo.name.value()}layoutNameWatchedValue(){return this._chartWidgetCollection.metaInfo.name.readonly()}layoutSettingsDrawer(){throw new Error("not implemented")}chartsCount(){return a[this.layout()].count}viewMode(){throw new Error("not implemented")}viewModeWatchedValue(){throw new Error("not implemented")}setForceFullscreenMode(){throw new Error("not implemented")} -setMultichartMode(){throw new Error("not implemented")}setActiveChart(e){throw new Error("not implemented")}chart(e){if(void 0===e&&(e=0),e<0||e>=this.chartsCount())throw Error("Incorrect index: "+e);return this._getChartWidgetApi(this._chartWidgetCollection.getAll()[e])}getSymbolInterval(e){var t={symbol:n.symbol.value(),interval:n.interval.value()};return e&&e(t),t}saveChart(e){if(this._saveChartService){var t=this._saveChartService.saveToJSON();return e&&e(JSON.parse(t.content))}}loadChart(e){this._chartApiInstance.disconnect(),this._chartWidgetCollection.loadContent(e.json),this._chartWidgetCollection.purgeUnusedWidgets(),e.extendedData&&(this._chartWidgetCollection.metaInfo.id.setValue(e.extendedData.uid),this._chartWidgetCollection.metaInfo.uid.setValue(e.extendedData.uid),this._chartWidgetCollection.metaInfo.name.setValue(e.extendedData.name)),this._chartApiInstance.connect(),n.symbol.setValue(this.activeChart().symbol()),l.emit("chart_loaded")}getStudiesList(){return this._chartApiInstance.allStudiesMetadata().filter((function(e){return!e.is_hidden_study})).map((function(e){return e.description}))}getStudyInputs(e){{const t=b.findStudyMetaInfoByDescription(this._chartApiInstance.allStudiesMetadata(),e);return w(t)}}getStudyStyles(e){{const t=b.findStudyMetaInfoByDescription(this._chartApiInstance.allStudiesMetadata(),e);return C(t)}}getSavedCharts(e){u.getCharts().then(e)}loadChartFromServer(e){u.loadChart(e)}saveChartToServer(e,t,i){this._saveChartService&&this._saveChartService.saveChartSilently(e,t,i)}setAutosave(e){this._saveChartService&&this._saveChartService.autoSaveEnabled().setValue(e)}removeChartFromServer(e,t){u.removeChart(e).then(t)}getIntervals(){var e=[],t=d.getCustomResolutions();return null!==this._chartApiInstance&&(e=this._chartApiInstance.defaultResolutions()),d.mergeResolutions(e,t)}closePopupsAndDialogs(){c.hideAll(),l.emit(f)}selectedLineTool(){for(var e=Object.keys(g.supportedLineTools),t=h.tool.value(),i=0;i{"use strict";i.d(t,{addPlusButtonProperty:()=>a,restoreAddPlusButtonSettingsValue:()=>l});var s=i(56840),r=i(60923);const n="add_plus_button";function o(){return s.getBool(n,!0)}const a=(0,r.createPrimitiveProperty)(o());function l(){a.setValue(!0),s.remove(n)}s.onSync.subscribe(null,(()=>a.setValue(o()))),a.subscribe(null,(()=>s.setValue(n,a.value())))},10678:(e,t,i)=>{"use strict";i.d(t,{alignToStep:()=>n});var s=i(60521),r=i.n(s);function n(e,t){return r()(e).div(t).round(0,r().roundHalfUp).mul(t).toNumber()}},91109:(e,t,i)=>{"use strict";i.d(t,{AppliedTimeFrame:()=>r});var s=i(90593);class r{constructor(e){this._appliedTimeFrame=new s.WatchedObject(null),this._appliedTimeFrameInfo=null,this._appliedTimeFrameChangedBound=this._appliedTimeFrameChanged.bind(this),this._model=e,e.mainSeries().dataEvents().seriesTimeFrame().subscribe(this,this._onSeriesTimeFrame),this._appliedTimeFrame.subscribe(this._appliedTimeFrameChangedBound)}destroy(){this._appliedTimeFrame.unsubscribe(this._appliedTimeFrameChangedBound),this._model.timeScale().logicalRangeChanged().unsubscribeAll(this),this._model.mainSeries().dataEvents().seriesTimeFrame().unsubscribeAll(this)}appliedTimeFrame(){return this._appliedTimeFrame}_appliedTimeFrameChanged(){this._model.timeScale().logicalRangeChanged().unsubscribe(this,this._invalidateAppliedTimeFrame)}_onSeriesTimeFrame(e,t,i,s){if(s){const e=this._model.timeScale();this._appliedTimeFrameInfo={logicalRange:e.logicalRange(),baseIndex:e.baseIndex()},e.logicalRangeChanged().subscribe(this,this._invalidateAppliedTimeFrame)}}_invalidateAppliedTimeFrame(){if(null===this._appliedTimeFrameInfo)return;const e=this._model.timeScale(),t=e.logicalRange(),i=e.baseIndex(),s=this._appliedTimeFrameInfo.logicalRange,r=this._appliedTimeFrameInfo.baseIndex;(null===t||null===s||Math.abs(i-t.left()-(r-s.left()))>=.01||Math.abs(i-t.right()-(r-s.right()))>=.01)&&this._appliedTimeFrame.setValue(null)}}},81345:(e,t,i)=>{"use strict";i.d(t,{defaultsPreferencesByWhiteList:()=>P,preferencesByWhiteList:()=>C});var s=i(65665),r=i(8169);var n=i(98351),o=i(99846),a=i(64548),l=i(22600),c=i(933),h=i(4978);const d=(0,n.getLogger)("Chart.ApplyPreferencesToAllCharts"),u={color:"",style:0},p={autoScale:!1,autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,log:!1,logDisabled:!1,alignLabels:!1,isInverted:!1,indexedTo100:!1},_={backgroundType:h.ColorType.Solid,background:"",backgroundGradientStartColor:"",backgroundGradientEndColor:"",topMargin:0,bottomMargin:0,rightOffset:0,horzGridProperties:(0,c.deepExtend)({},u),vertGridProperties:(0,c.deepExtend)({},u),crossHairProperties:(0,c.deepExtend)({},{color:"",style:0,transparency:0, -width:0}),legendProperties:(0,c.deepExtend)({},{showStudyArguments:!1,showStudyTitles:!1,showStudyValues:!1,showSeriesTitle:!1,showSeriesOHLC:!1,showLegend:!1,showBarChange:!0,showVolume:!1,showBackground:!0,backgroundTransparency:0}),axisProperties:(0,c.deepExtend)({},p),separatorColor:""},m={lineColor:"",textColor:"",fontSize:0,scaleSeriesOnly:!1,showSeriesLastValue:!1,seriesLastValueMode:o.PriceAxisLastValueMode.LastValueAccordingToScale,showSeriesPrevCloseValue:!1,showStudyLastValue:!1,showSymbolLabels:!1,showStudyPlotLabels:!1,showBidAskLabels:!1,showPrePostMarketPriceLabel:!0,showFundamentalLastValue:!1,showFundamentalNameLabel:!1,showPriceScaleCrosshairLabel:!0,showTimeScaleCrosshairLabel:!0},g={...m},f={visible:!1,futureOnly:!1,breaks:(0,c.deepExtend)({},{color:"",visible:!1,style:0,width:0})},v={style:0,minTick:"",showPriceLine:!1,priceLineWidth:0,priceLineColor:"",baseLineColor:"",showPrevClosePriceLine:!1,showCountdown:!0,prevClosePriceLineWidth:0,sessionId:"regular",prevClosePriceLineColor:"",esdShowDividends:!1,esdShowSplits:!1,esdShowEarnings:!1,esdShowBreaks:!1,showContinuousContractSwitches:!1,showContinuousContractSwitchesBreaks:!1,showFuturesContractExpiration:!1,showLastNews:!1,dividendsAdjustment:!1,backAdjustment:!1,settlementAsClose:!0,statusViewStyle:(0,c.deepExtend)({},{fontSize:16,showExchange:!0,showInterval:!0,symbolTextSource:"description"}),priceAxisProperties:(0,c.deepExtend)({},p),highLowAvgPrice:(0,c.deepExtend)({},{highLowPriceLinesVisible:!1,highLowPriceLabelsVisible:!1,averageClosePriceLabelVisible:!1,averageClosePriceLineVisible:!1,highLowPriceLinesColor:"",highLowPriceLinesWidth:0,averagePriceLineColor:"",averagePriceLineWidth:0}),candleStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",drawWick:!1,drawBorder:!1,drawBody:!0,borderColor:"",borderUpColor:"",borderDownColor:"",wickColor:"",wickUpColor:"",wickDownColor:"",barColorsOnPrevClose:!1}),hollowCandleStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",drawWick:!1,drawBorder:!1,drawBody:!0,borderColor:"",borderUpColor:"",borderDownColor:"",wickColor:"",wickUpColor:"",wickDownColor:""}),barStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",barColorsOnPrevClose:!1,dontDrawOpen:!1,thinBars:!0}),lineStyle:(0,c.deepExtend)({},{color:"",linestyle:0,linewidth:0,styleType:0}),areaStyle:(0,c.deepExtend)({},{color1:"",color2:"",linecolor:"",linestyle:0,linewidth:0,transparency:0}),baselineStyle:(0,c.deepExtend)({},{topFillColor1:"",topFillColor2:"",bottomFillColor1:"",bottomFillColor2:"",topLineColor:"",bottomLineColor:"",baselineColor:"",topLineWidth:0,bottomLineWidth:0,transparency:0,baseLevelPercentage:0}),hiloStyle:(0,c.deepExtend)({},{color:"",showBorders:!1,borderColor:"",showLabels:!1,labelColor:"",drawBody:!0}),haStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",drawWick:!1,drawBorder:!1,drawBody:!0,borderColor:"",borderUpColor:"",borderDownColor:"",wickColor:"",wickUpColor:"",wickDownColor:"",showRealLastPrice:!1,barColorsOnPrevClose:!1,inputs:{}}),renkoStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",borderUpColor:"", -borderDownColor:"",upColorProjection:"",downColorProjection:"",borderUpColorProjection:"",borderDownColorProjection:"",wickUpColor:"",wickDownColor:"",inputs:{boxSize:0,style:"",atrLength:0,wicks:!1,sources:"",source:""}}),pbStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",borderUpColor:"",borderDownColor:"",upColorProjection:"",downColorProjection:"",borderUpColorProjection:"",borderDownColorProjection:"",inputs:{source:"",lb:0}}),kagiStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",upColorProjection:"",downColorProjection:"",inputs:{style:"",atrLength:0,reversalAmount:0}}),pnfStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",upColorProjection:"",downColorProjection:"",inputs:{reversalAmount:0,boxSize:0,style:"",atrLength:0}}),rangeStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",upColorProjection:"",downColorProjection:"",thinBars:!1,inputs:{range:0,phantomBars:!1}}),columnStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",barColorsOnPrevClose:!1})},S={priceScaleSelectionStrategyName:"auto",timeScale:(0,c.deepExtend)({},{defaultRightOffset:0,defaultRightOffsetPercentage:5,usePercentageRightOffset:!1}),mainSeries:(0,c.deepExtend)({},v),sessions:(0,c.deepExtend)({},l.sessionsPreferencesDefault),paneProperties:(0,c.deepExtend)({},_),chartEventsSourceProperties:(0,c.deepExtend)({},f),tradingProperties:(0,c.deepExtend)({},r.tradingPreferencesDefault)},y={timezone:"",scalesProperties:(0,c.deepExtend)({},g),...S},b={scalesProperties:(0,c.deepExtend)({},m),...S};function w(e,t,i,r,n=!0){if(void 0===t[e])return d.logDebug(`We haven't had this property ${r}.${e} yet, please, remove it from whiteList`),null;if((0,s.isObject)(i[e])){const s=Object.keys(i[e]);let o="";return s.map((s=>({[s]:w(s,t[e],i[e],`${r}.${e}`,n)}))).reduce(((e,t)=>(o=Object.keys(t)[0],e[o]=t[o],e)),{})}return n?t[e].value():t[e]}function C(e,t,i=y){const s={timezone:"",priceScaleSelectionStrategyName:"auto",timeScale:{defaultRightOffset:e.timeScale().defaultRightOffset().value(),defaultRightOffsetPercentage:e.timeScale().defaultRightOffsetPercentage().value(),usePercentageRightOffset:e.timeScale().usePercentageRightOffset().value()},mainSeries:{},sessions:{},paneProperties:{},scalesProperties:{},chartEventsSourceProperties:{},tradingProperties:{}},r=["timeScale","mainSeries","sessions"],n=i.mainSeries,o=Object.keys(i),a=Object.keys(n),l=t.properties(),c=e.properties(),h=i.sessions,d=Object.keys(h),u=e.sessions().properties();return a.forEach((e=>{s.mainSeries[e]=w(e,l,n,"mainSeries")})),d.forEach((e=>{s.sessions[e]=w(e,u,h,"sessions")})),o.forEach((e=>{r.includes(e)||(s[e]=w(e,c,i,"preferences"))})),s}function P(e,t,i=b){const s={timeScale:{defaultRightOffset:e.timeScale().rightOffsetDefaultValue(),defaultRightOffsetPercentage:e.timeScale().defaultRightOffsetPercentage().value(),usePercentageRightOffset:e.timeScale().usePercentageRightOffset().value()},mainSeries:{},sessions:(0,c.deepExtend)({},l.sessionsPreferencesDefault),paneProperties:{},scalesProperties:{},chartEventsSourceProperties:{},tradingProperties:{}, -priceScaleSelectionStrategyName:"auto"},r=["timeScale","mainSeries","sessions"],n=i.mainSeries,o=Object.keys(i),h=Object.keys(n),d=(0,a.factoryDefaults)("chartproperties.mainSeriesProperties"),u=(0,a.factoryDefaults)("chartproperties");return h.forEach((e=>{s.mainSeries[e]=w(e,d,n,"mainSeries",!1)})),o.forEach((e=>{r.includes(e)||(s[e]=w(e,u,i,"preferences",!1))})),s}},5049:(e,t,i)=>{"use strict";i.d(t,{axisLabelBackgroundColor:()=>r});var s=i(7394);const r={common:s.colorsPalette["color-tv-blue-500"],active:s.colorsPalette["color-tv-blue-800"]}},8950:(e,t,i)=>{"use strict";i.d(t,{createDwmAligner:()=>c,isAlignmentEnabled:()=>h,createTimeToBarTimeAligner:()=>d});var s=i(32769),r=i(2484),n=i(578),o=i(46292),a=i(69228);const l=new o.SessionInfo("Etc/UTC","0000-0000:1234567");function c(e,t){if(!h()||!n.Interval.isDWM(e))return null;const i=new o.SessionInfo(t.timezone,t.session,t.session_holidays,t.corrections),r=(0,a.newBarBuilder)(e,i,l);return{timeToSessionStart:e=>r.tradingDayToSessionStart(e),timeToExchangeTradingDay:e=>{const t=s.utc_to_cal(i.timezone,e),r=i.spec.correctTradingDay(t);return s.set_hms(r,0,0,0,0,s.get_timezone("Etc/UTC")),r.getTime()}}}function h(){return!r.enabled("disable_resolution_rebuild")}function d(e,t){if(!h())return e=>e;const i=new o.SessionInfo(t.timezone,t.session,t.session_holidays,t.corrections),s=(0,a.newBarBuilder)(e,i,i,!1);return e=>s.alignTimeIfPossible(e)}},46292:(e,t,i)=>{"use strict";i.d(t,{SessionInfo:()=>o,BarBuilderBase:()=>a});var s=i(32769),r=i(76545),n=i(21169);class o{constructor(e,t,i,s){this.init(e,t,i,s),this._state={timezone:e,spec:t,holidays:i,corrections:s}}init(e,t,i,r){this.timezone=s.get_timezone(e),this.spec=new n.SessionSpec(e,t,i,r)}state(){return this._state}static fromState(e){return new o(e.timezone,e.spec,e.holidays,e.corrections)}}class a{alignTime(e){if(isNaN(e))return NaN;let t=this.indexOfBar(e);return t===r.SessionStage.POST_SESSION&&(this.moveTo(e),t=this.indexOfBar(e)),t<0?NaN:this.startOfBar(t)}}},69228:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SessionInfo:()=>o.SessionInfo,alignExchangeTimeToSessionStartAndReturnUTC:()=>P,alignPeriodsBackForDataRequest:()=>y,alignPeriodsBackForVisibleRange:()=>b,getPeriodsBetweenDates:()=>C,isTradingNow:()=>T,newBarBuilder:()=>S});var s=i(32769),r=i(578),n=i(91031),o=i(46292),a=i(76545);class l extends o.BarBuilderBase{constructor(e,t){super(),this._sessionStartMs=-Number.MAX_VALUE,this._sessionEndMs=-Number.MAX_VALUE,this._periodSec=e,this._session=t}alignTimeIfPossible(e){const t=this.alignTime(e);return isNaN(t)?e:t}indexOfBar(e){return e=this._sessionEndMs?a.SessionStage.POST_SESSION:(0,n.toInt)(s.time_seconds_diff(e,this._sessionStartMs)/this._periodSec)}startOfBar(e){if(e===a.SessionStage.PRE_SESSION){const e=s.get_cal_from_unix_timestamp_ms(this._session.timezone,this._sessionStartMs-1),t=this._session.spec.alignToNearestSessionEnd(e,-1);return s.cal_to_utc(this._session.timezone,t)}if(e===a.SessionStage.POST_SESSION)return this._sessionEndMs -;if(e<0)throw new Error("Negative offset is not supported");return this._sessionStartMs+s.time_seconds(this._periodSec*e)}endOfBar(e){if(e<0)throw new Error("Index cannot be negative");const t=this.startOfBar(e)+1e3*this._periodSec;return t>this._sessionEndMs?this._sessionEndMs:t}isLastBar(e,t){return t>=this._sessionStartMs+s.time_seconds(this._periodSec*(e+1)-1)}moveTo(e){const t=this._session.timezone,i=s.utc_to_cal(t,e),r=this._session.spec.alignToSessionStart(i);this._sessionStartMs=s.cal_to_utc(t,i),s.add_minutes(i,r),this._sessionEndMs=s.cal_to_utc(t,i)}indexOfLastBarInSession(){return(0,n.toInt)((this._sessionEndMs-1-this._sessionStartMs)/1e3/this._periodSec)}moveNext(){this.moveTo(this._sessionEndMs)}}var c=i(19781);function h(e,t){const i=s.clone(t),r=e.businessDaysToCalendarDays(i,1);r>1&&s.add_date(i,r-1);const n=e.leftBorderOfDailyBar(i);if(null===n)throw new Error("Cannot calculate left border of daily bar");return s.cal_to_utc(s.get_timezone(e.timezone()),n)}class d extends o.BarBuilderBase{constructor(e,t,i,s,r=!1){super(),this._periodStart=-Number.MAX_VALUE,this._periodEnd=-Number.MAX_VALUE,this._periodLastBarStart=-Number.MAX_VALUE,this._periodStartDay=new c.BusinessDay(0,0,0),this._periodEndDay=new c.BusinessDay(0,0,0),this._period=i,this._sessionTgt=e,this._builder=s,this._useBusinessDays=r,this._sessionSrc=r?new o.SessionInfo("Etc/UTC","24x7"):t||e}builder(){return this._builder}alignTimeIfPossible(e){return this.tradingDayToSessionStart(e)}tradingDayToSessionStart(e){return this.moveTo(e),this.startOfBar(0)}indexOfBar(e){if(this._useBusinessDays){const t=c.BusinessDay.fromCalendar(s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e));return t.before(this._periodStartDay)?a.SessionStage.PRE_SESSION:this._periodEndDay.before(t)?a.SessionStage.POST_SESSION:0}return e=this._periodEnd?a.SessionStage.POST_SESSION:0}startOfBar(e){if(e===a.SessionStage.PRE_SESSION){const e=s.get_cal_from_unix_timestamp_ms(this._sessionTgt.timezone,this._periodStart-1),t=this._sessionTgt.spec.alignToNearestSessionEnd(e,-1);return s.cal_to_utc(this._sessionTgt.timezone,t)-1}return e===a.SessionStage.POST_SESSION||e>0?this._periodEnd:e===a.SessionStage.LASTBAR_SESSION?this._periodLastBarStart:this._periodStart}moveTo(e){const t=s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e);this._sessionSrc.spec.correctTradingDay(t);const i=s.get_year(t),r=this._indexOfPeriodInYear(t),n=r+this._period,o=this._sessionTgt.spec,a=this._sessionTgt.timezone,l=this._builder.startOfPeriod(a,r,i);this._periodStart=h(o,l);const d=s.clone(l),u=o.businessDaysToCalendarDays(d,1);u>1&&s.add_date(d,u-1),this._periodStartDay=c.BusinessDay.fromCalendar(d);const p=this._builder.startOfPeriod(a,n,i);this._periodEnd=h(o,p);const _=s.clone(p);for(s.add_date(_,-1);o.isCalWeekEnd(_);)s.add_date(_,-1);this._periodEndDay=c.BusinessDay.fromCalendar(_),s.add_date(p,-1),function(e,t){for(;e.isCalWeekEnd(t);)s.add_date(t,-1)}(this._sessionTgt.spec,p),this._periodLastBarStart=h(o,p), -(this._periodLastBarStart=this._periodLastBarStart}currentRange(){return{from:this._periodStartDay,to:this._periodEndDay}}indexOfBarInYear(e){const t=s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e),i=s.get_year(t),r=this._builder.indexOfPeriod(t),o=this._sessionTgt.timezone;let a=this._builder.startOfPeriod(o,r,i),l=h(this._sessionTgt.spec,a);return a=s.get_cal_from_unix_timestamp_ms(s.get_timezone("Etc/UTC"),l),i=0&&(r-=7),(0,n.toInt)((r+i)/7))}class _{indexOfPeriod(e){return s.get_day_of_year(e)-1}startOfPeriod(e,t,i){const r=s.days_per_year(i);return s.get_cal(s.get_timezone("Etc/UTC"),i,s.JANUARY,1+Math.min(t,r))}}class m extends _{constructor(e){super(),this._sessionsSpec=e}indexOfPeriod(e){return super.indexOfPeriod(e)-function(e,t){const i=p(e,t),r=s.get_cal(s.get_timezone("Etc/UTC"),s.get_year(t),s.JANUARY,1);s.add_date(r,7*i);const n=i*e.weekEndsCount()+e.holidaysFromYearStart(r),o=s.get_day_of_year(t)-s.get_day_of_year(r);return n+o-e.calendarDaysToBusinessDays(r,o)}(this._sessionsSpec,e)}startOfPeriod(e,t,i){const r=7-this._sessionsSpec.weekEndsCount(),o=Math.max(0,(0,n.toInt)(t/r)-1),a=s.get_cal(s.get_timezone("Etc/UTC"),i,s.JANUARY,1),l=s.get_days_per_year(a);if(s.add_date(a,7*o),(t-=r*o-this._sessionsSpec.holidaysFromYearStart(a))>0){const e=this._sessionsSpec.businessDaysToCalendarDays(a,t);s.add_date(a,e)}let c=s.get_day_of_year(a)-1;return is.get_days_per_year(r)?this.startOfPeriod(e,0,i+1):(s.add_date(r,a),r)}}class v{indexOfPeriod(e){return s.get_month(e)}startOfPeriod(e,t,i){if(t<0){const e=(0,n.toInt)((11-t)/12);i-=e,t+=12*e}else t>s.DECEMBER&&(i++,t=s.JANUARY);return s.get_cal(s.get_timezone("Etc/UTC"),i,t,1)}}function S(e,t,i,s=!1){const n=r.Interval.parse(e),o=n.multiplier();return n.isMinutes()?new l(60*o,t):n.isSeconds()?new l(o,t):n.isTicks()?new l(1,t):n.isRange()?new l(60*o,t):new d(t,i,o,function(e,t){switch(e){case r.ResolutionKind.Days:return new g(t);case r.ResolutionKind.Weeks:return new f(t);case r.ResolutionKind.Months:return new v}throw new Error(`Unknown dwm resolution: ${e}`)}(n.kind(),t),s)}function y(e,t,i,s,r,n,o){return w(e,t,i,s,r,n,o,0)}function b(e,t,i,s,r,n,o){return w(e,t,i,s,r,n,o,1)}function w(e,t,i,s,n,a,l,c){const h=r.Interval.parse(n+s);if(h.isMonths()){const e=new Date(l);return 0===c&&e.setUTCDate(1),function(e,t){x(e,Math.floor(t/12));let i=e.getUTCMonth()-t%12;i<0&&(x(e,1),i+=12);e.setUTCMonth(i);for(;e.getUTCMonth()!==i;)I(e,1)}(e,a*h.multiplier()),e.getTime()}const d=new o.SessionInfo("Etc/UTC",e,t,i),u=h.inMilliseconds(),p=h.isDWM();let _;_=p?864e5:60*d.spec.maxTradingDayLength()*1e3;let m=0;m=h.isWeeks()?7:7-d.spec.weekEndsCount();const g=_/u,f=m*g;let v;if(a=g&&(f=_/6048e5*g),Math.ceil(f)}function P(e,t){const i=s.clone(t);return e.alignToSessionStart(i),s.cal_to_utc(s.get_timezone(e.timezone()),i)}function T(e,t){const i=s.utc_to_cal(t.timezone,+e);let r=s.get_day_of_week(i),n=s.get_minutes_from_midnight(i);const o=t.spec.findSession(t.spec.getWeekIndex(i),r,n).getEntry();return o.isOvernight()&&n>o.startOffset()+o.length()&&r===o.dayOfWeek()-1&&(r++,n-=1440),r===o.dayOfWeek()&&n>=o.startOffset()&&n{"use strict";i.d(t,{BusinessDay:()=>r});var s=i(32769);class r{constructor(e,t,i){this.year=e,this.month=t,this.day=i}toString(){return`${this.year}-${this.month}-${this.day}`}compareTo(e){return this.year>e.year||this.year===e.year&&this.month>e.month||this.year===e.year&&this.month===e.month&&this.day>e.day?1:this.year===e.year&&this.month===e.month&&this.day===e.day?0:-1}before(e){return-1===this.compareTo(e)}toCalendar(e){return s.get_cal(s.get_timezone("Etc/UTC"),this.year,this.month-1,this.day)} -addDays(e){const t=this.toCalendar(s.get_timezone("Etc/UTC"));return s.add_date(t,e),r.fromCalendar(t)}static fromCalendar(e){return new r(s.get_year(e),s.get_month(e)+1,s.get_day_of_month(e))}}},76545:(e,t,i)=>{"use strict";var s;i.d(t,{SessionStage:()=>s}),function(e){e[e.PRE_SESSION=-1]="PRE_SESSION",e[e.POST_SESSION=-2]="POST_SESSION",e[e.LASTBAR_SESSION=-3]="LASTBAR_SESSION"}(s||(s={}))},87770:(e,t,i)=>{"use strict";i.d(t,{extrapolateBarsFrontToTime:()=>r,extrapolateBarsFrontByCount:()=>n});var s=i(76545);function r(e,t,i,s,n=!1){if(t>i){const o=r(e,i,t,s,n);return o.count=-o.count,o}return o(e,t,1,((e,t)=>t>i||0!==s&&e>s),n)}function n(e,t,i,s=!1){const r=i<0?-1:1;return o(e,t,r,((e,t)=>e>=i*r),s)}function o(e,t,i,r,n){let o=0,a=t;e.moveTo(a);let l=0,c=Number.MAX_VALUE,h=!1,d=t;const u=[];for(;!r(o,a);){if(l>15)throw new Error("Internal error 0x10 while extrapolating.");const r=e.indexOfBar(a);if(r===s.SessionStage.PRE_SESSION&&1===i)a=e.startOfBar(0),e.moveTo(a);else if(r===s.SessionStage.PRE_SESSION&&-1===i)a=e.startOfBar(s.SessionStage.PRE_SESSION),e.moveTo(a);else if(r===s.SessionStage.POST_SESSION&&1===i)a=e.startOfBar(s.SessionStage.POST_SESSION),e.moveTo(a);else{if(r===s.SessionStage.POST_SESSION&&-1===i)throw new Error("Internal error 0x12 while extrapolating.");{const p=e.startOfBar(r);if(p>t&&i>0||t>p&&i<0){if(h&&c===p)throw new Error("Internal error 0x11 while extrapolating.");h=!0,c=p,l=0,o++,d=p,n&&u.push(d)}if(0===r&&-1===i)a=p-1;else{a=e.startOfBar(r+i);const t=e.startOfBar(s.SessionStage.POST_SESSION);a>t&&(e.moveTo(t),a=e.startOfBar(0))}}}l++}return{time:d,times:u,count:o}}},5471:(e,t,i)=>{"use strict";i.d(t,{PrePostMarketBarIdentifier:()=>n});var s=i(32769);function r(e,t){return null!==t&&t.to>e&&e>=t.from}class n{constructor(e,t,i){this._timezone=e,this._preMarketSessionSpec=t,this._postMarketSessionSpec=i}getPreAndPostMarketTimes(e){if(0===e.length)return{preMarket:[],postMarket:[]};const t=[],i=[];let r=null,n=null,o=e[0],a=(0,s.utc_to_cal)(this._timezone,o);this._isInPreMarketSession(a)&&(n=o),this._isInPostMarketSession(a)&&(r=o);for(let l=1;l{"use strict";i.d(t,{SessionSpec:()=>v});var s=i(32769),r=i(93975),n=i(19781);function o(e,t){return e.compareTo(t)}class a{constructor(e,t,i){this._dayOfWeek=e,this._start=t,this._length=i}start(){ -return this._start+s.minutesPerDay*this.sessionStartDaysOffset()}startOffset(){return this._start}sessionStartDaysOffset(){return this._start>=0?0:this._start%s.minutesPerDay==0?-Math.ceil(this._start/s.minutesPerDay):-Math.floor(this._start/s.minutesPerDay)}sessionEndDaysOffset(){const e=this._start+this._length;return e>=0?0:e%s.minutesPerDay==0?-Math.ceil(e/s.minutesPerDay):-Math.floor(e/s.minutesPerDay)}isOvernight(){return this._start<0}dayOfWeek(){return this._dayOfWeek}sessionStartDayOfWeek(){let e=this._dayOfWeek-this.sessionStartDaysOffset();return es.SATURDAY&&(e=1),e}length(){return this._length}weight(){return this._dayOfWeek*s.minutesPerDay+this._start}compareTo(e){const t=this.weight(),i=t+this._length,s=e.weight(),r=s+e._length;return t<=s&&ss?1:-1}contains(e){const t=60*s.get_hours(e)+s.get_minutes(e);let i=s.get_day_of_week(e)-this._dayOfWeek;i>0&&(i-=7);const r=i*s.minutesPerDay+t;return r>=this._start&&r=48&&e<=57}class _{constructor(){this.entries=[],this.firstDayOfWeek=s.MONDAY,this.weekEndsCount=-1,this.maxTradingDayLength=0}parseSessions(e,t){var i;let s=!1;this._clear(),this.timezone=e;const{hasErrors:r,spec:n}=this._parseFirstDayOfWeek(t);if("24x7"===n.toLowerCase())for(const e of d)this.entries.push(_._createSessionEntry(e,0,0,0,0));else{let e=!1;const t=new Map;for(const i of n.split("|")){const r=i.split(":");if(1!==r.length&&2!==r.length){s=!0,u.logError(`Bad session section: ${i}`);continue}const n=1===r.length;if(n){if(e){s=!0,u.logError(`Duplicated default section: ${i}`);continue}e=!0}const o=n?h:_._parseWorkingDays(r[1]);for(const e of o)n&&t.has(e)||t.set(e,r[0])}for(const e of d){const i=t.get(e);if(void 0!==i)for(const t of i.split(",")){const{hasErrors:i,sessionEntry:r}=_._parseSessionEntry(e,t);i&&(s=i),this.entries.push(r)}}}this.entries.sort(o);const a=new Map;for(const e of this.entries){const t=e.dayOfWeek();a.set(t,e.length()+(null!==(i=a.get(t))&&void 0!==i?i:0))}return this.maxTradingDayLength=0,a.forEach((e=>{this.maxTradingDayLength=Math.max(this.maxTradingDayLength,e)})),this.weekEndsCount=7-a.size,s||r}static parseHolidaysAndCorrections(e,t,i){const r=new Map,n=new Map,o=e=>{const t=this._parseDay(e),i=t.toString(),s=n.get(i);return void 0!==s?s:(n.set(i,t),t)};if(""!==t){const e=[];for(const i of t.split(",")){if(8!==i.length)throw new Error(`bad holiday date: ${i}`);const t=o(i);r.set(t,e)}}if(""===i)return r;const l=s.get_timezone("Etc/UTC");for(const e of i.split(";")){const t=e.split(":");if(2!==t.length)throw new Error(`bad correction section: ${e}`);const i=[] -;if("dayoff"!==t[0])for(const e of t[0].split(","))i.push(this._parseSessionEntry(1,e).sessionEntry);for(const e of t[1].split(",")){if(8!==e.length)throw new Error(`bad correction date: ${e}`);const t=o(e),n=s.get_day_of_week(s.get_cal(l,t.year,t.month-1,t.day)),c=[];for(const e of i)c.push(new a(n,e.startOffset(),e.length()));r.set(t,c)}}return r}_clear(){this.entries=[],this.timezone="",this.firstDayOfWeek=s.MONDAY,this.weekEndsCount=-1}_parseFirstDayOfWeek(e){const t=e.split(";");if(t.length>2)return u.logError(`Only one \`first day\` specification expected @ session ${e}`),{hasErrors:!0,spec:e};if(1===t.length)return{hasErrors:!1,spec:e};let i=1;let r=t[0].indexOf("-")>=0?NaN:parseInt(t[0]);return isNaN(r)&&(i=0,r=parseInt(t[1])),rs.SATURDAY?(u.logError(`Unexpected day index @ session: ${e}; day index ${r}`),{hasErrors:!0,spec:e}):(this.firstDayOfWeek=r,{hasErrors:!1,spec:t[i]})}static _parseDay(e){const t=parseInt(e.substring(0,4)),i=parseInt(e.substring(4,6)),s=parseInt(e.substring(6,8));return new n.BusinessDay(t,i,s)}static _parseSessionEntry(e,t){let i=!1,s=t.split("-");2!==s.length&&(i=!0,u.logError(`Bad sessions entry: ${t}`),s=["0000","0000"]);let r=0,n=s[0];if(n.includes("F")){const e=n.split("F");n=e[0],r=""!==e[1]?parseInt(e[1]):1}let o=0,a=s[1];if(a.includes("F")){const e=a.split("F");a=e[0],o=""!==e[1]?parseInt(e[1]):1}if(!this._isCorrectSession(n)||!this._isCorrectSession(a))throw new Error(`Incorrect entry syntax: ${t}`);const l=n,c=a;return{hasErrors:i,sessionEntry:this._createSessionEntry(e,_._minutesFromHHMM(l),_._minutesFromHHMM(c),r,o)}}static _isCorrectSession(e){return 4===e.length&&p(e.charCodeAt(0))&&p(e.charCodeAt(1))&&p(e.charCodeAt(2))&&p(e.charCodeAt(3))}static _parseWorkingDays(e){const t=[];for(let i=0;i0&&(t-=r*s.minutesPerDay),n>0&&(i-=n*s.minutesPerDay);return new a(e,t,i-t)}}function m(e,t){return e.compareTo(t)<0}function g(e,t){const i=(0,r.lowerbound)(e,t,((e,t)=>-1===e.day.compareTo(t)));return i===e.length?null:e[i]}const f=621672192e5;class v{constructor(e="Etc/UTC",t="0000-0000",i="",r=""){this._entries=[],this._firstDayOfWeek=s.MONDAY,this._entriesHash=new Map,this._holidayAndCorrectionMap=new Map,this._holidaySessions=[];const n=new _;n.parseSessions(e,t),this._entries=n.entries,this._timezone=n.timezone,this._spec=t,this._firstDayOfWeek=n.firstDayOfWeek,this._weekEndsCount=n.weekEndsCount,this._maxTradingDayLength=n.maxTradingDayLength;const o=_.parseHolidaysAndCorrections(e,i,r),a=s.get_timezone(e);this._isThereCorrections=""!==i||""!==r,o.forEach(((e,t)=>{this._holidayAndCorrectionMap.set(t.toString(),e),this._holidaySessions.push({day:t,sessions:e});const i=this.getWeekIndex(t.toCalendar(a));this._entriesHash.set(i,null)})),this._holidaySessions.sort(((e,t)=>e.day.compareTo(t.day)))}entries(){return this._entries}timezone(){ -return this._timezone}spec(){return this._spec}firstDayOfWeek(){return this._firstDayOfWeek}addSessionEntry(e,t,i,r,n){0===i&&(i=s.minutesPerDay),r===n&&i<=t&&(r+=1),r>0&&(t-=r*s.minutesPerDay),n>0&&(i-=n*s.minutesPerDay);const o=i-t;this._entries.push(new a(e,t,o))}longestSessionLength(){let e=0,t=0;for(const t of this._holidaySessions)t.sessions.forEach((t=>{e=Math.max(e,t.length())}));return this._entries.forEach((e=>{t=Math.max(t,e.length())})),Math.max(e,t)}isWeekEnd(e){const t=(0,r.lowerbound)(this._entries,new a(e,0,0),((e,t)=>e.dayOfWeek()this._entries.length-1||this._entries[t].dayOfWeek()!==e}isCalWeekEnd(e){const t=s.get_day_of_week(e);if(!this._isThereCorrections)return this.isWeekEnd(t);const i=n.BusinessDay.fromCalendar(e),r=this._holidayAndCorrectionMap.get(i.toString());return void 0===r?this.isWeekEnd(t):0===r.length}hasWeekEnds(){return this.weekEndsCount()>0}weekEndsCount(){return this._weekEndsCount}maxTradingDayLength(){return this._maxTradingDayLength}holidaysFromYearStart(e){if(!this._isThereCorrections)return 0;const t=s.get_timezone(this._timezone),i=new n.BusinessDay(s.get_year(e),s.JANUARY,1),r=n.BusinessDay.fromCalendar(e);let o=0;const a=this._selectHolidays(i,r);for(let e=0;et.start()%e==0&&t.length()%e==0))}indexOfSession(e,t,i){const n=this._getEntriesForWeek(e);let o=(0,r.lowerbound)(n,new a(t,i,0),m);if(o!==n.length)return new l(e,o,n);let c=e;const h=7-t+this._firstDayOfWeek-1;for(i=-(s.minutesPerDay-i+h*s.minutesPerDay);;){c++;const e=this._getEntriesForWeek(c);if(0!==e.length)return o=(0,r.lowerbound)(e,new a(this._firstDayOfWeek,i,0),m),new l(c,o,e)}}findSession(e,t,i,s=0){const r=this.indexOfSession(e,t,i),n=r.entries;let o=r.entryIndex;if(0!==s){const e=n[o].dayOfWeek(),t=s>0?1:-1;for(;;){const i=o+t;if(i<0||i>=n.length||n[i].dayOfWeek()!==e)break;o=i}}return new l(r.weekIndex,o,n)}getWeekIndex(e){if(!this._isThereCorrections)return 0;const t=s.get_day_of_week(e)-s.SUNDAY,i=s.get_timezone("Etc/UTC"),r=s.get_cal(i,s.get_year(e),s.get_month(e),s.get_day_of_month(e)-t);return Math.floor((r.getTime()+f)/1e3/86400/7)}correctTradingDay(e){const t=s.get_day_of_week(e),i=60*s.get_hours(e)+s.get_minutes(e),r=this.getWeekIndex(e),n=this.findSession(r,t,i,0),o=n.getEntry().dayOfWeek()-t+7*(n.weekIndex-r);return 0!==o&&s.add_date(e,o),e}alignToSessionStart(e,t=0){const i=s.get_day_of_week(e),r=60*s.get_hours(e)+s.get_minutes(e),n=this.getWeekIndex(e),o=this.findSession(n,i,r,t),a=o.getEntry(),l=a.dayOfWeek()-i+7*(o.weekIndex-n);0!==l&&s.add_date(e,l);const c=a.startOffset();return s.set_hms(e,c/60,c%60,0,0,s.get_timezone(this._timezone)),a.length()}businessDaysToCalendarDays(e,t){let i=this.getWeekIndex(e),r=s.get_day_of_week(e),n=0,o=0;for(;oi);)e[a].dayOfWeek()=t)return n}i++,r=s.SUNDAY}return n}calendarDaysToBusinessDays(e,t){let i=this.getWeekIndex(e),r=s.get_day_of_week(e),n=0,o=0;for(;ni);)e[a].dayOfWeek()=t)return o}i++,r=s.SUNDAY}return o}alignToNearestSessionStart(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionStart.bind(this))}alignToNearestSessionEnd(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionEnd.bind(this))}leftBorderOfDailyBar(e){const t=this._getEntriesForDay(e);return 0===t.length?null:(t.sort(o),this._getLeftEntryBorder(e,t[0]))}bordersOfDailyBar(e){const t=this._getEntriesForDay(e);if(0===t.length)return null;t.sort(o);const i=this._getLeftEntryBorder(e,t[0]),r=t[t.length-1],n=s.clone(e);let a=60*(r.startOffset()+r.length())-1;const l=Math.floor(a/3600);return a-=3600*l,s.set_hms(n,l,a/60,a%60,0,s.get_timezone(this._timezone)),{from:i,to:n}}getEntriesForWeekByCalendar(e){const t=this.getWeekIndex(e);return this._getEntriesForWeek(t)}_getEntriesForWeek(e){let t=this._entriesHash.get(e);if(void 0===t)return this._entries;if(null!==t)return t;const i=s.get_timezone(this._timezone);t=this._entries.slice();const r=this._weekIndexToCalendar(e),a=this._weekIndexToCalendar(e+1),l=n.BusinessDay.fromCalendar(r),c=n.BusinessDay.fromCalendar(a),h=this._selectHolidays(l,c);for(const e of h){const r=e.day.toCalendar(i),n=s.get_day_of_week(r);t=t.filter((e=>e.dayOfWeek()!==n)),t=t.concat(e.sessions)}return t.sort(o),this._entriesHash.set(e,t),t}_selectHolidays(e,t){const i=[];let s=e;for(;;){const e=g(this._holidaySessions,s);if(null===e)return i;if(!e.day.before(t))return i;i.push(e),s=e.day.addDays(1)}}_weekIndexToCalendar(e){const t=1e3*(86400*e*7+86400)-f,i=s.get_cal_from_unix_timestamp_ms(s.get_timezone("Etc/UTC"),t),r=s.get_timezone("Etc/UTC");return s.get_cal(r,s.get_year(i),s.get_month(i),s.get_day_of_month(i))}_alignToNearestSessionValue(e,t,i){const r=s.get_day_of_week(e),n=60*s.get_hours(e)+s.get_minutes(e),o=this.getWeekIndex(e);let a=this.findSession(o,r,n);if(a.getEntry().contains(e)&&o===a.weekIndex||1===t)return i(a,s.clone(e),t);const c=a.getEntry(),h=c.contains(e),d=o===a.weekIndex,u=c.sessionStartDaysOffset()-c.dayOfWeek()>=0;if(h&&(d||u))return i(a,s.clone(e),t);let p=a.entryIndex-1;if(p<0){let e=a.weekIndex,t=a.entries;for(;p<0;)e--,t=this._getEntriesForWeek(e),p+=t.length;a=new l(e,p,t)}else a=new l(a.weekIndex,p,a.entries);return i(a,s.clone(e),t)}_entrySessionStart(e,t,i){return this._entrySessionValue(e,t,i,(e=>60*e.start()))}_entrySessionEnd(e,t,i){return this._entrySessionValue(e,t,i,(e=>60*(e.start()+e.length())-1))}_entrySessionValue(e,t,i,r){let n=s.get_day_of_week(t);const o=e.getEntry();let a=o.dayOfWeek()-o.sessionStartDaysOffset();const l=this.getWeekIndex(t);let c=e.weekIndex-l,h=!1;if(a0&&i>=0||c<0&&i<0)&&s.add_date(t,7*c), -!o.contains(t)){let e=a-n;h&&i<0&&(e=-(7-a+n)),s.add_date(t,e),n=s.get_day_of_week(t)}o.isOvernight()&&n===o.dayOfWeek()&&s.add_date(t,-o.sessionStartDaysOffset());let d=r(o);const u=Math.floor(d/3600);return d-=3600*u,s.set_hms(t,u,d/60,d%60,0,s.get_timezone(this._timezone)),t}_getEntriesForDay(e){const t=s.get_day_of_week(e);return this._getEntriesForWeek(this.getWeekIndex(e)).filter((e=>e.dayOfWeek()===t))}_getLeftEntryBorder(e,t){const i=s.clone(e),r=t.startOffset();return s.set_hms(i,r/60,r%60,0,0,s.get_timezone(this._timezone)),i}}},98799:(e,t,i)=>{"use strict";i.d(t,{barFunctionByStyle:()=>r});var s=i(22770);function r(e,t){switch(e){case 12:return(0,s.barFunction)("low","low","close");case 2:case 3:case 10:case 13:return(0,s.barFunction)(null!=t?t:"close");default:return(0,s.barFunction)("close","open")}}},27642:(e,t,i)=>{"use strict";i.d(t,{BarsMarksContainer:()=>m});var s=i(50151),r=i(98351),n=i(56840),o=i.n(n),a=i(2484),l=i(578),c=i(65665),h=i(1930),d=i(80230),u=i(97425);const p=(0,r.getLogger)("Chart.BarsMarksContainer"),_=Math.round(new Date(2037,0,1).getTime()/1e3);class m extends d.DataSource{constructor(e,t,i){const r=e.onWidget();let n;n=r?!e.hideIdeas():!!a.enabled("bars_marks")&&o().getBool("BarsMarksContainer.visibile",!1),t.merge({visible:n}),t.childs().visible.subscribe(null,(t=>{r||e.isSnapshot()||!a.enabled("bars_marks")||o().setValue("BarsMarksContainer.visibile",!!t.value())})),super(i),this._paneViews=[],this._model=e,this._properties=t,this._requests=[],this._marks={},this._loadedRange=null,this._getDataTimeout=null,this._collectedRange=null,this._lastRange=null;const l=this._model.mainSeries();l.onSymbolIntervalChanged().subscribe(this,this.clearMarks),l.dataEvents().symbolResolved().subscribe(this,this.clearMarks),l.dataEvents().completed().subscribe(this,(()=>{var e,t;const i=l.data();if(0===i.size())return;const r=(0,s.ensureNotNull)(i.first()).index,n=(0,s.ensureNotNull)(i.last()).index,o=this.timeScale();this.getData({start:null!==(e=o.indexToTimePoint(r))&&void 0!==e?e:1/0,end:null!==(t=o.indexToTimePoint(n))&&void 0!==t?t:-1/0})})),this._initialize(),this._pinnedTooltips={}}destroy(){const e=this._model.mainSeries();e.onSymbolIntervalChanged().unsubscribeAll(this),e.dataEvents().symbolResolved().unsubscribeAll(this),e.dataEvents().completed().unsubscribeAll(this)}properties(){return this._properties}marks(){return this._marks}pinTooltip(e,t){this._pinnedTooltips[e]=t}timeScale(){return this._model.timeScale()}getIntervalInTicks(){const e=this._model.mainSeries().properties().childs().interval.value(),t=l.Interval.parse(e);if(!t.isValid())throw new TypeError("Unexpected interval");return t.isRange()?60:t.inMilliseconds()/1e3}getVisibleTickMarksRange(){var e,t;if(this.timeScale().isEmpty())return{start:0,end:0};const i=(0,s.ensureNotNull)(this.timeScale().visibleBarsStrictRange()),{firstIndex:r,lastIndex:n}=(0,s.ensureNotNull)(this.timeScale().points().range().value());if(!(i.lastBar()>r&&i.firstBar(){var r,n;const o=this._marks[s],a=o.tickmark;a>=(null!==(r=t.start)&&void 0!==r?r:1/0)&&a<=(null!==(n=t.end)&&void 0!==n?n:-1/0)+i&&e.push(o)})),e}getPublishedPlates(){const e={};return window.is_authenticated?(this.getVisibleRangePlates().forEach((t=>{t.is_public&&(this._pinnedTooltips[t.id]||t.user__id===window.user.id)&&(e[t.id]=t)})),e):e}filterDisplayedPlates(e){const t=e.reduce(((e,t)=>{const i=this._getIndex(t.tickmark);return null!==i&&(e[i]=e[i]||[],e[i].push(t)),e}),{});return Object.keys(t).reduce(((e,i)=>{let s=t[i];return s=s.sort(((e,t)=>t.views_count-e.views_count)),s=s.slice(0,10),e.concat(s)}),[])}getPlatesViewData(){var e,t,i;const r=this._model.mainSeries();if(r.data().isEmpty())return[];const n=(0,h.isPriceSourceStyle)(r.style())?r.barFunction():null,o=this.filterDisplayedPlates(this.getVisibleRangePlates()),a={},l=null!==(e=this._model.lastHittestData())&&void 0!==e?e:this._model.lastSelectedHittestData();let c=null;null!==l&&this._model.hoveredSource()===this&&(c=null!==(t=l.activeItem)&&void 0!==t?t:null);const d=[];for(const e of o){const t=(0,s.ensureNotNull)(this._getIndex(e.tickmark)),i=this._getBar(t);if(null===i)continue;const r=this._layout(e.direction),o=this._theme(e.direction),l=c===e.id,h=this.timeScale().indexToCoordinate(t),u=this._offset(r,i,n),p=(0,s.ensureNotNull)(this.priceScale()).isInverted();let _=0;t in a||(a[t]={up:0,down:0}),_=a[t][r]++,d.push({id:e.id,x:h,y:u,yInverted:p,order:_,direction:r,theme:o,hovered:l,pinned:!0===this._pinnedTooltips[e.id],user__id:e.user__id,label:e.label,labelFontColor:e.labelFontColor||"#444",minSize:e.minSize||5,...this._plateViewData(e)})}const u=d.filter((e=>!0===e.hovered));for(let e=0;ee.hovered&&!t.hovered?1:0)),d}priceAxisViews(){return null}updateAllViews(e){for(const t of this._paneViews)t.update(e)}updateAllViewsAndRepaint(){this.updateAllViews((0,u.sourceChangeEvent)(this.id())),this._model.updateSource(this)}roundRange(e){return{start:Math.round(e.start),end:Math.round(e.end)}}refreshData(){null!==this._lastRange&&this.getData(this._lastRange)}getData(e){(0,c.isNumber)(e.start)&&(0,c.isNumber)(e.end)?(this._lastRange=e,e.end=_,this._pushGetDataStack(Object.assign({},e))):p.logError("Wrong range")}clearMarks(){this._abortAllRequests(),this._marks={},this._loadedRange=null}isUserDeletable(){return!1}isSavedInChart(e){return!1}isSpeciallyZOrderedSource(){return!0}showInObjectTree(){return!1}_plateViewData(e){return{}}_layout(e){switch(e){default:case 0:case 2:case 3:case 4:case 5:case 6:return"up";case 1:return"down"}}_theme(e){ -switch(e){default:case 0:return"neutral";case 1:case 5:return"green";case 2:case 6:return"red";case 3:return"yellow";case 4:return"blue"}}_offset(e,t,i){let r;switch(e){default:case"up":r=null===i?t[2]:i(t);break;case"down":r=null===i?t[3]:i(t)}return(0,s.ensureNotNull)(this.priceScale()).priceToCoordinate(r,(0,s.ensureNotNull)((0,s.ensureNotNull)(this.ownerSource()).firstValue()))}_getIndex(e){return this.timeScale().timePointToIndex(e)}_getBar(e){return this._model.mainSeries().data().valueAt(e)}_rangeDifference(e){return e=Object.assign({start:1/0,end:-1/0},e),this._loadedRange&&(e.startthis._loadedRange.end&&(e.start=this._loadedRange.end)),e}_rangeUnion(e,t){return e=Object.assign({start:1/0,end:-1/0},e),t&&(e.start=Math.min(t.start,e.start),e.end=Math.max(t.end,e.end)),e}_pushGetDataStack(e){(0,c.isNumber)(e.start)&&(0,c.isNumber)(e.end)?(this._getDataTimeout&&clearTimeout(this._getDataTimeout),this._collectedRange=this._rangeUnion(e,this._collectedRange),this._getDataTimeout=setTimeout((()=>{this._getData(this._collectedRange),this._getDataTimeout=this._collectedRange=null}),300)):p.logError("Wrong tickmark range")}_abortAllRequests(){this._requests.forEach((e=>{e.cancel()})),this._requests=[],this._getDataTimeout&&clearTimeout(this._getDataTimeout),this._getDataTimeout=this._collectedRange=null}}},2250:(e,t,i)=>{"use strict";var s=i(33639).PlotRowSearchMode,r=i(83421).STUDYPLOTDISPLAYTARGET,n=i(38031).rgbaFromInteger;function o(){this.backColorers=[]}function a(e){o.call(this),this._series=e}function l(e,t){o.call(this),this._study=e,this._plotIndex=t}o.prototype.barStyle=function(e,t,i){for(var s={},r=this.backColorers.length-1;r>=0;r--)this.backColorers[r].applyBarStyle(e,t,s,i);return this.applyBarStyle(e,t,s,i),s},o.prototype.pushBackBarColorer=function(e){this.backColorers.push(e)},o.prototype.applyBarStyle=function(e,t,i){throw new Error("This function is supposed to be reimplemented in a subclass")},inherit(a,o),a.upColor=function(e,t){switch(e.style.value()){case TradingView.Series.STYLE_LINE:return e.lineStyle.color.value();case TradingView.Series.STYLE_AREA:return e.areaStyle.linecolor.value();case TradingView.Series.STYLE_BARS:return e.barStyle.upColor.value();case TradingView.Series.STYLE_CANDLES:return e.candleStyle.upColor.value();case TradingView.Series.STYLE_HOLLOW_CANDLES:return e.hollowCandleStyle.upColor.value();case TradingView.Series.STYLE_HEIKEN_ASHI:return e.haStyle.upColor.value();case TradingView.Series.STYLE_BASELINE:return e.baselineStyle.topLineColor.value();case TradingView.Series.STYLE_HILO:return e.hiloStyle.color.value();case TradingView.Series.STYLE_COLUMNS:return e.columnStyle.upColor.value()}throw new Error("Unknown series style")},a.downColor=function(e,t){switch(e.style.value()){case TradingView.Series.STYLE_LINE:return e.lineStyle.color.value();case TradingView.Series.STYLE_AREA:return e.areaStyle.linecolor.value();case TradingView.Series.STYLE_BARS:return e.barStyle.downColor.value() -;case TradingView.Series.STYLE_CANDLES:return e.candleStyle.downColor.value();case TradingView.Series.STYLE_HOLLOW_CANDLES:return e.hollowCandleStyle.downColor.value();case TradingView.Series.STYLE_HEIKEN_ASHI:return e.haStyle.downColor.value();case TradingView.Series.STYLE_BASELINE:return e.baselineStyle.bottomLineColor.value();case TradingView.Series.STYLE_HILO:return e.hiloStyle.color.value();case TradingView.Series.STYLE_COLUMNS:return e.columnStyle.downColor.value()}throw new Error("Unknown series style")},a.prototype._applyLineStyle=function(e,t,i,s,r){i.barColor=a.upColor(r)},a.prototype._applyAreaStyle=function(e,t,i,s,r){i.barColor=a.upColor(r)},a.prototype._applyBarStyle=function(e,t,i,s,r){var n=a.upColor(r),o=a.downColor(r),l=this.findBar(e,!1,s);if(r.barStyle.barColorsOnPrevClose.value()){var c=this.findPrevBar(e,!1,s);i.barColor=c[TradingView.CLOSE_PLOT]<=l[TradingView.CLOSE_PLOT]?n:o,i.barBorderColor=c[TradingView.CLOSE_PLOT]<=l[TradingView.CLOSE_PLOT]?n:o}else i.barColor=l[TradingView.OPEN_PLOT]<=l[TradingView.CLOSE_PLOT]?n:o,i.barBorderColor=l[TradingView.OPEN_PLOT]<=l[TradingView.CLOSE_PLOT]?n:o},a.prototype._applyCandleStyle=function(e,t,i,s,r){var n,o=a.upColor(r,t),l=a.downColor(r,t),c=r.candleStyle.borderUpColor?r.candleStyle.borderUpColor.value():r.candleStyle.borderColor.value(),h=r.candleStyle.borderDownColor?r.candleStyle.borderDownColor.value():r.candleStyle.borderColor.value(),d=r.candleStyle.wickUpColor?r.candleStyle.wickUpColor.value():r.candleStyle.wickColor.value(),u=r.candleStyle.wickDownColor?r.candleStyle.wickDownColor.value():r.candleStyle.wickColor.value(),p=this.findBar(e,!1,s);r.candleStyle.barColorsOnPrevClose.value()&&this._series.data().first().index!==e?n=this.findPrevBar(e,!1,s)[TradingView.CLOSE_PLOT]<=p[TradingView.CLOSE_PLOT]:n=p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT];i.barColor=n?o:l,i.barBorderColor=n?c:h,i.barWickColor=n?d:u},a.prototype._applyHollowCandleStyle=function(e,t,i,s,r){var n,o=a.upColor(r,t),l=a.downColor(r,t),c=r.hollowCandleStyle.borderUpColor?r.hollowCandleStyle.borderUpColor.value():r.hollowCandleStyle.borderColor.value(),h=r.hollowCandleStyle.borderDownColor?r.hollowCandleStyle.borderDownColor.value():r.hollowCandleStyle.borderColor.value(),d=r.hollowCandleStyle.wickUpColor?r.hollowCandleStyle.wickUpColor.value():r.hollowCandleStyle.wickColor.value(),u=r.hollowCandleStyle.wickDownColor?r.hollowCandleStyle.wickDownColor.value():r.hollowCandleStyle.wickColor.value(),p=this.findBar(e,!1,s),_=this.findPrevBar(e,!1,s);n=this._series.data().first().index!==e?_[TradingView.CLOSE_PLOT]<=p[TradingView.CLOSE_PLOT]:p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT],i.barColor=n?o:l,i.barBorderColor=n?c:h,i.barWickColor=n?d:u,i.isBarHollow=p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT]},a.prototype._applyHAStyle=function(e,t,i,s,r){var n,o=a.upColor(r,t),l=a.downColor(r,t),c=r.haStyle.borderUpColor.value(),h=r.haStyle.borderDownColor.value(),d=r.haStyle.wickUpColor.value(),u=r.haStyle.wickDownColor.value(),p=this.findBar(e,t,s) -;r.haStyle.barColorsOnPrevClose.value()?n=this.findPrevBar(e,t,s)[TradingView.CLOSE_PLOT]<=p[TradingView.CLOSE_PLOT]:n=p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT];i.barColor=n?o:l,i.barBorderColor=n?c:h,i.barWickColor=n?d:u},a.prototype._applyBaseLineStyle=function(e,t,i,s,r){var n=this.findBar(e,t,s),o=r.baselineStyle,l=this._series.priceScale(),c=Math.round(l.height()*(Math.abs(100-o.baseLevelPercentage.value())/100)),h=this._series.firstValue(),d=l.coordinateToPrice(c,h);n[TradingView.CLOSE_PLOT]>d?i.barColor=a.upColor(r,t):i.barColor=a.downColor(r,t)},a.prototype._applyHiLoStyle=function(e,t,i,s,r){i.barColor=a.upColor(r,t),i.barBorderColor=r.hiloStyle.borderColor.value()},a.prototype._applyColumnStyle=function(e,t,i,s,r){var n=a.upColor(r),o=a.downColor(r),l=this.findBar(e,!1,s);if(r.columnStyle.barColorsOnPrevClose.value()){var c=this.findPrevBar(e,!1,s);i.color=c[TradingView.CLOSE_PLOT]<=l[TradingView.CLOSE_PLOT]?n:o}else i.color=l[TradingView.OPEN_PLOT]<=l[TradingView.CLOSE_PLOT]?n:o;i.barColor=i.color},a.prototype.applyBarStyle=function(e,t,i,s){i||(i={}),i.barColor=null,i.barBorderColor=null,i.barWickColor=null,i.isBarHollow=null,i.isBarUp=null,i.upColor=null,i.downColor=null,i.isTwoColorBar=null,i.isMergedBar=null;var r=this._series.properties();switch(r.style.value()){case TradingView.Series.STYLE_LINE:this._applyLineStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_AREA:this._applyAreaStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_BARS:this._applyBarStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_CANDLES:this._applyCandleStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_HOLLOW_CANDLES:this._applyHollowCandleStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_HEIKEN_ASHI:this._applyHAStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_BASELINE:this._applyBaseLineStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_HILO:this._applyHiLoStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_COLUMNS:this._applyColumnStyle(e,t,i,s,r)}return i},a.prototype.getSeriesBars=function(e){return e?this._series.nsBars():this._series.bars()},a.prototype._findBarFieldValue=function(e,t,i){var s=this.getSeriesBars(i).valueAt(e);if(null!==s)return s[t]},a.prototype.findBar=function(e,t,i){return i?i.value:this.getSeriesBars(t).valueAt(e)||[]},a.prototype.findPrevBar=function(e,t,i){if(i&&i.previousValue)return i.previousValue;var r=this._series.bars().search(e-1,s.NearestLeft,TradingView.CLOSE_PLOT);return null!==r?r.value:[]},inherit(l,o),l.prototype.getBars=function(){return this._study.series().bars()},l.prototype.firstColoredBar=function(e){for(var t=e,i=0;ie+c)return i;if(s.styles[l.id].display.value()===r.None)return i;var h=a.valueAt(e-c);if(null===h)return i;var d=h[this._plotIndex+1];if(null==d)return i;if(d=Math.round(d),o.isRGB)i.barColor=n(d),i.upColor=i.barColor,i.downColor=i.barColor;else{var u=o.plots[this._plotIndex].palette,p=s.palettes[u],_=o.palettes[u].valToIndex?o.palettes[u].valToIndex[d]:d,m=p.colors[_].color.value();i.barColor=m,i.upColor=m.color,i.downColor=m.color}return i},t.SeriesBarColorer=a,t.StudyBarColorer=l},28263:(e,t,i)=>{"use strict";i.d(t,{BarsRange:()=>r});var s=i(50151);class r{constructor(e,t){(0,s.assert)(e<=t,"The last bar in the bars range should be greater than or equal to the first bar"),this._firstBar=e,this._lastBar=t}firstBar(){return this._firstBar}lastBar(){return this._lastBar}count(){return this._lastBar-this._firstBar+1}contains(e){return this._firstBar<=e&&e<=this._lastBar}equals(e){return this._firstBar===e.firstBar()&&this._lastBar===e.lastBar()}static compare(e,t){return null===e||null===t?e===t:e.equals(t)}}},43331:(e,t,i)=>{"use strict";i.d(t,{ChartModelBase:()=>$i});var s=i(4889),r=i(27788),n=i(50151),o=i(86441),a=i(24377),l=i(7394),c=i(44352),h=i(45345),d=i(8840),u=i(51768),p=i(71668),_=i(76422),m=i(11417),g=i(8169),f=i(94393),v=i(93975),S=i(6250);function y(e){return(0,S.isLineTool)(e)&&e.boundToSymbol()||!1}class b{constructor(){this._items=[],this._set=new Set,this._dataSourcesCache=null,this._customSourcesCache=null,this._lineSourcesCache=null}isEmpty(){return 0===this._items.length}add(e){if(this._items.length>0&&!y(this._items[0])&&this.clear(),y(e)){const t=(0,v.lowerbound)(this._items,e,((e,t)=>e.zorder()!(0,f.isDataSource)(e)))),this._customSourcesCache}checkLineToolSelection(){this._items.forEach((e=>(0,S.isLineTool)(e)&&e.calcIsActualSymbol())),this._items=this._items.filter((e=>!(0,S.isLineTool)(e)||e.isActualSymbol())),this._invalidateCache()}remove(e){this._items=this._items.filter((t=>t!==e)),this._set.delete(e),this._invalidateCache()}clear(){this._items=[],this._set.clear(),this._invalidateCache()}_invalidateCache(){this._customSourcesCache=null,this._dataSourcesCache=null,this._lineSourcesCache=null}} -var w=i(81685),C=i(46289),P=i(91217),T=i(578),x=i(7711),I=i(26220),M=i.n(I),A=i(95242),L=i(17364);class k{constructor(e){this._rendererOptions={borderSize:1,offsetSize:5,fontSize:NaN,font:"",color:"",paneBackgroundColor:"",paddingBottom:0,paddingInner:0,paddingOuter:0,paddingTop:0,lineSpacing:0},this._chartModel=e}options(){const e=this._rendererOptions,t=this._chartModel.properties().childs(),i=t.scalesProperties.childs().fontSize.value();return e.fontSize!==i&&(e.fontSize=i,e.font=(0,A.makeFont)(i,L.CHART_FONT_FAMILY,""),e.paddingTop=2.5/12*i,e.paddingBottom=e.paddingTop,e.paddingInner=i/12*e.offsetSize,e.paddingOuter=i/12*e.offsetSize,e.lineSpacing=2/12*i),e.color=t.scalesProperties.childs().textColor.value(),e.paneBackgroundColor=t.paneProperties.childs().background.value(),this._rendererOptions}}var E=i(7910),D=i(59780),V=i(74599),B=i(64548),R=i(1288),N=i(2484),O=i(1930),F=i(22600),W=i(97425);const H=new V.PriceFormatter,z="sessions";class U extends R.CustomSourceBase{constructor(e,t,i){super(e,t),this._studySource=null,this._paneViews=[],this._metaInfo=null,this._destroyed=!1,this._isStarted=!1,this._loadedGraphics=null,this._doubleClickHandler=i;const s=t.mainSeries();this._properties=new x.DefaultProperty("sessions"),(0,B.applyDefaultsOverrides)(this._properties.childs().graphics,void 0,!1,z),this._removeDuplicateProperties(),this._properties.subscribe(this,this._onPropertiesChanged),t.studyMetaInfoRepository().findById({type:"java",studyId:"Sessions@tv-basicstudies"}).then((i=>{this._destroyed||null===this._loadedGraphics&&(this._setMetaInfo(i),null!==this._metaInfo&&(this._studySource=new E.StudyDataSource(t.chartApi(),s.seriesSource(),"sessions_",this._metaInfo),this._createPaneViews(),this._studySource.dataCleared().subscribe(this,this.updateAllViews.bind(this,(0,W.sourceChangeEvent)(e))),this._studySource.dataUpdated().subscribe(this,this.updateAllViews.bind(this,(0,W.sourceChangeEvent)(e))),this._studySource.setInputs({}),this._processHibernate()))})),t.timeScale().onReset().subscribe(this,this._clearData),t.timeScale().logicalRangeChanged().subscribe(this,this.updateAllViews.bind(this,(0,W.viewportChangeEvent)())),t.mainSeries().sessionIdProxyProperty().subscribe(this,this._updateVisibleOfPreAndPostMarketBackground),t.mainSeries().properties().childs().interval.subscribe(this,this._processHibernate),this._updateVisibleOfPreAndPostMarketBackground(t.mainSeries().properties().childs().sessionId)}applyOverrides(e){(0,B.applyPropertiesOverrides)(this._properties.childs().graphics,void 0,!1,e,z),this._model.updateSource(this)}start(){this._isStarted=!0,this._processHibernate()}restart(){this._clearData(),N.enabled("stop_study_on_restart")&&this.stop(),this.start()}isStarted(){return this._isStarted}stop(){this._isStarted=!1,null!==this._studySource&&this._studySource.stop()}isHoveredEnabled(){return!1}paneViews(e){return this._paneViews}updateAllViews(e){this._paneViews.forEach((t=>t.update(e)))}updateViewsForPane(e,t){this.updateAllViews(t)}destroy(){this._destroyed=!0, -null!==this._studySource&&(this._studySource.dataCleared().unsubscribeAll(this),this._studySource.dataUpdated().unsubscribeAll(this),this._studySource.destroy(),this._studySource=null),this._model.timeScale().logicalRangeChanged().unsubscribeAll(this),this._model.timeScale().onReset().unsubscribeAll(this),this._model.mainSeries().sessionIdProxyProperty().unsubscribeAll(this),this._model.mainSeries().properties().childs().interval.unsubscribeAll(this),this._properties.unsubscribeAll(this)}series(){return this._model.mainSeries()}priceScale(){return this.series().priceScale()}graphics(){return this._loadedGraphics||(0,n.ensureNotNull)(this._studySource).graphics()}properties(){return this._properties}graphicsInfo(){return(0,n.ensureNotNull)(this._metaInfo).graphics}firstValue(e){return this._model.mainSeries().firstValue()}formatter(){return H}state(e){const t={properties:this._properties.state()};return e&&null!==this._metaInfo&&(t.data={graphics:(0,D.saveStudyGraphics)(this.graphics(),this._model.timeScale().visibleBarsStrictRange()),metaInfo:this._metaInfo}),t}restoreState(e,t){const i=e.properties;this._migrateOutOfSessionProperty(i),this._properties.mergeAndFire(i),this._removeDuplicateProperties(),this._updateVisibleOfPreAndPostMarketBackground(this._model.mainSeries().properties().childs().sessionId),void 0!==e.data&&t&&(this._loadStudyGraphics(e.data.graphics),this._setMetaInfo(e.data.metaInfo),this._createPaneViews())}restoreOldState(e,t){const i={properties:{graphics:e.state.graphics}};void 0!==e.data&&void 0!==e.metaInfo&&t&&(i.data={metaInfo:e.metaInfo,graphics:e.data.graphics}),this.restoreState(i,t)}applyPreferences(e){this._properties.mergePreferences(e)}metaInfo(){return(0,n.ensureNotNull)(this._metaInfo)}_loadStudyGraphics(e){const t=e.backgrounds;if(void 0!==t){const e=t.findIndex((e=>"inSession"===e.styleId));-1!==e&&t.splice(e,1)}this._loadedGraphics=(0,D.loadStudyGraphics)(e)}_setMetaInfo(e){const t=e.graphics.backgrounds;void 0!==t&&void 0!==t.inSession&&delete t.inSession,this._metaInfo=e}_updateVisibleOfPreAndPostMarketBackground(e){const t=!(0,O.isRegularSessionId)(e.value());this._outOfSessionVisibilityProperty().setValue(t),this._preMarketVisibilityProperty().setValue(t),this._postMarketVisibilityProperty().setValue(t)}_clearData(){null!==this._studySource&&this._studySource.clearData()}_createPaneViews(){const e={doubleClickHandler:this._doubleClickHandler};(0,D.createGraphicsPaneViews)(this,this._model,e).then((e=>{this._paneViews=e,this._model.lightUpdate()}))}_onPropertiesChanged(){this._processHibernate(),this.updateAllViews((0,W.sourceChangeEvent)(this.id()))}_processHibernate(){if(null!==this._studySource){const e=this._canBeHibernated(),t=this._isHibernated(),i=this._studySource.isStarted();!t&&e&&i?this._studySource.stop():!t||e||i||this._studySource.start()}}_canBeHibernated(){const e=this._model.mainSeries(),t=this._preMarketVisibilityProperty().value()&&this._postMarketVisibilityProperty().value()&&this._outOfSessionVisibilityProperty().value() -;return e.isDWM()||!t&&!this._vertLinesVisibleProperty().value()}_isHibernated(){return this._isStarted&&(null===this._studySource||!this._studySource.isStarted())}_outOfSessionVisibilityProperty(){return this._properties.childs().graphics.childs().backgrounds.childs().outOfSession.childs().visible}_preMarketVisibilityProperty(){return this._properties.childs().graphics.childs().backgrounds.childs().preMarket.childs().visible}_postMarketVisibilityProperty(){return this._properties.childs().graphics.childs().backgrounds.childs().postMarket.childs().visible}_vertLinesVisibleProperty(){return this._properties.childs().graphics.childs().vertlines.childs().sessBreaks.childs().visible}_removeDuplicateProperties(){this._properties.hasChild("properties")&&(this._properties.removeProperty("properties"),(0,x.saveDefaultProperties)(!0),this._properties.childChanged(null),(0,x.saveDefaultProperties)(!1))}_migrateOutOfSessionProperty(e){const t=e.graphics.backgrounds;if(void 0!==t){const i=t.outOfSession;i.color===(0,n.ensureDefined)(F.sessionsPreferencesDefault.graphics.backgrounds).outOfSession.color||"postMarket"in t||(e.graphics.backgrounds={...t,postMarket:{color:i.color,transparency:i.transparency,visible:i.visible},preMarket:{color:i.color,transparency:i.transparency,visible:i.visible}})}}}var j=i(89215),G=i(26867),q=i.n(G),$=i(40549),Y=i.n($),K=i(36646),X=i(35624),Z=i(98351),J=i(68671),Q=i(37364),ee=i(47539),te=i(58403),ie=i(65665),se=i(50059),re=i(88029),ne=i(50841);const oe=new Map([["price",e=>(0,re.isPriceDataSource)(e)],["trading",e=>(0,S.isTrading)(e)],["drawing",e=>(0,S.isLineTool)(e)&&!(0,S.isTrading)(e)&&!e.isPhantom()],["drawingsForAllSymbols",e=>(0,S.isLineTool)(e)&&!(0,S.isTrading)(e)&&!e.isPhantom()],["phantom",e=>(0,S.isLineTool)(e)&&e.isPhantom()],["restRowSources",e=>!(0,S.isLineTool)(e)&&!(0,S.isTrading)(e)],["legendViewSources",e=>(0,re.isPriceDataSource)(e)||(0,S.isStudyLineTool)(e)],["leftPriceScale",(e,t)=>"left"===le(e,t)],["rightPriceScale",(e,t)=>"right"===le(e,t)],["overlayPriceScale",(e,t)=>"overlay"===le(e,t)]]),ae=new Map([["price","visibleSorted"],["trading","visibleSorted"],["drawing","visibleSorted"],["drawingsForAllSymbols","allSorted"],["phantom","visibleSorted"],["restRowSources","visibleSorted"],["legendViewSources","visibleSorted"],["leftPriceScale","visibleSorted"],["rightPriceScale","visibleSorted"],["overlayPriceScale","visibleSorted"]]);function le(e,t){const i=e.priceScale();return null===i?"overlay":t.priceScalePosition(i)}class ce{constructor(e){this._groupedSources=new Map,this._sources=null,this._pane=e}clear(){this._groupedSources.clear(),this._sources=null}destroy(){this.clear()}all(){return this._groupedSources.has("visibleSorted")||this._sortSources(),(0,n.ensureDefined)(this._groupedSources.get("visibleSorted"))}allIncludingHidden(){return this._groupedSources.has("allSorted")||this._sortSources(),(0,n.ensureDefined)(this._groupedSources.get("allSorted"))}allExceptSpecialSources(){if(!this._groupedSources.has("exceptSpecial")){ -const e=this.allIncludingHidden().filter((e=>!e.isSpeciallyZOrderedSource()));this._groupedSources.set("exceptSpecial",e)}return(0,n.ensureDefined)(this._groupedSources.get("exceptSpecial"))}tradingSources(){return this._getSourcesByGroupType("trading")}priceSources(){return this._getSourcesByGroupType("price")}lineSources(){return this._getSourcesByGroupType("drawing")}lineSourcesForAllSymbols(){return this._getSourcesByGroupType("drawingsForAllSymbols")}phantomSources(){return this._getSourcesByGroupType("phantom")}allExceptLineAndTradingSources(){return this._getSourcesByGroupType("restRowSources")}hitTestSources(){if(!this._groupedSources.has("hitTest")){const e=this.allExceptLineAndTradingSources().concat(this.lineSources());this._groupedSources.set("hitTest",e)}return(0,n.ensureDefined)(this._groupedSources.get("hitTest"))}generalSources(){if(!this._groupedSources.has("general")){const e=this.allExceptLineAndTradingSources().concat(this.lineSources());this._groupedSources.set("general",(0,ne.sortSources)(e))}return(0,n.ensureDefined)(this._groupedSources.get("general"))}leftPriceScalesSources(){return this._getSourcesByGroupType("leftPriceScale")}rightPriceScalesSources(){return this._getSourcesByGroupType("rightPriceScale")}overlayPriceScaleSources(){return this._getSourcesByGroupType("overlayPriceScale")}legendViewSources(){return this._getSourcesByGroupType("legendViewSources")}_getSourcesByGroupType(e){const t=(0,n.ensureDefined)(ae.get(e));return this._groupedSources.has(t)?this._groupedSources.has(e)||this._groupSources(e):(this._sortSources(),this._groupSources(e)),(0,n.ensureDefined)(this._groupedSources.get(e))}_sortSources(){null===this._sources&&(this._sources=this._pane.dataSources());const e=(0,ne.sortSources)(this._sources),t=e.filter((e=>!(0,S.isLineTool)(e)||e.isActualSymbol()&&e.isActualCurrency()&&e.isActualUnit()));this._groupedSources.set("allSorted",e),this._groupedSources.set("visibleSorted",t)}_groupSources(e){const t=(0,n.ensureDefined)(ae.get(e)),i=oe.get(e);if(void 0!==i){const s=(0,n.ensureDefined)(this._groupedSources.get(t)).filter((e=>i(e,this._pane)));this._groupedSources.set(e,s)}}}var he=i(60862),de=i(53778),ue=i(23304),pe=i(21580),_e=i(12033),me=i(62472),ge=i(77906),fe=i(86635);const ve=[],Se=[];class ye{constructor(e){this._studies={},this._deferreds={},this._container=e,ve.push(e),Se.push(this)}add(e,t){this._deferreds[e]&&(this._deferreds[e].resolve(t),delete this._deferreds[e]),this._studies[e]=t}get(e){return this._studies[e]?Promise.resolve(this._studies[e]):(this._deferreds[e]||(this._deferreds[e]=(0,p.createDeferredPromise)()),this._deferreds[e].promise)}reset(){const e=ve.indexOf(this._container);~e&&(ve.splice(e,1),Se.splice(e,1))}static instance(e){const t=ve.indexOf(e);return~t?Se[t]:new ye(e)}}var be=i(26132);var we=i(10621),Ce=i(37098),Pe=i(27569),Te=i(54922),xe=i(93753),Ie=i(55168);new ee.TranslatedString("update {title} script",c.t(null,void 0,i(50728)));const Me=(0,Z.getLogger)("Chart.Pane");function Ae(e,t,i){e.setMargins({top:t,bottom:i})}class Le{ -constructor(e,t,i,s){this.m_dataSources=[],this._sourceWatchedValuesSubscriptions=new Map,this.m_mainDataSource=null,this._cachedOrderedSources=new ce(this),this._sourcesById=new Map,this._priceSourcesById=new Map,this._sourcePropertiesChanged=new(q()),this._sourcesZOrderChanged=new(q()),this._tagsChanged=new(q()),this._stretchFactor=1e3,this._isInInsertManyDataSourcesState=!1,this._lastLineDataSourceZOrder=null,this._rightPriceScales=[],this._leftPriceScales=[],this._lockedPriceScale=null,this._currentPriceScaleRatio=null,this._onPriceScalesChanged=new(q()),this._isRecalculatingScales=!1,this._priceDataSources=[],this._symbolSources=[],this._lollipopDataSources=[],this._symbolSourceResolved=new(q()),this._symbolSourceResolvingActive=new(Y())(!1),this._bulkActions={activeCounter:0},this._height=0,this._width=0,this._dataSourcesCollectionChanged=new(q()),this._symbolSourceCollectionChanged=new(q()),this._maximized=new(Y())(!1),this._collapsed=new(Y())(!1),this._destroyed=new(q()),this._executionsPositionController=null,this._recalcSymbolSourceResolvingActive=()=>{for(const e of this._symbolSources)if(e.symbolResolvingActive().value())return void this._symbolSourceResolvingActive.setValue(!0);this._symbolSourceResolvingActive.setValue(!1)},this._onSymbolSourceCollectionChanged=()=>{0===this._bulkActions.activeCounter?this._symbolSourceCollectionChanged.fire():this._bulkActions.symbolSourceCollectionChanged=!0},this._priceScaleSelectionStrategy=(0,Q.createPriceScaleSelectionStrategy)(i.properties().childs().priceScaleSelectionStrategyName.value()),this._id=null!=s?s:(0,J.randomHashN)(6),this._timeScale=e,this.m_mainDataSource=null,this._properties=t,this._model=i,i.properties().childs().priceScaleSelectionStrategyName.subscribe(null,(e=>{this._priceScaleSelectionStrategy=(0,Q.createPriceScaleSelectionStrategy)(e.value()),this._priceScaleSelectionStrategy.apply(this)})),this._timeScale.barSpacingChanged().subscribe(this,(()=>{this.m_mainDataSource===this._model.mainSeries()&&this._recalculatePriceScaleByScaleRatio(this.m_mainDataSource.priceScale())})),t.childs().topMargin.subscribe(this,this._updateMargins),t.childs().bottomMargin.subscribe(this,this._updateMargins),this._updateMargins()}destroy(){this._properties.childs().topMargin.unsubscribeAll(this),this._properties.childs().bottomMargin.unsubscribeAll(this),this._model.properties().childs().priceScaleSelectionStrategyName.unsubscribeAll(this),this._timeScale.barSpacingChanged().unsubscribeAll(this),this._leftPriceScales.concat(this._rightPriceScales).forEach((e=>{e.modeChanged().unsubscribeAll(this),e.priceRangeChanged().unsubscribeAll(this),e.internalHeightChanged().unsubscribeAll(this)}));for(const e of this.m_dataSources)this.removeSourceFromPriceScale(e),e.destroy&&e.destroy();this._destroyed.fire()}id(){return this._id}bulkActionMacro(e){const t=this._bulkActions;t.activeCounter+=1,e(),t.activeCounter-=1,0===t.activeCounter&&(this._dataSourcesCollectionChanged.fire(),t.symbolSourceCollectionChanged&&this._symbolSourceCollectionChanged.fire(), -t.symbolSourceCollectionChanged=!1)}defaultPriceScale(){var e,t;const i=null!==(t=null===(e=this.m_mainDataSource)||void 0===e?void 0:e.priceScale())&&void 0!==t?t:null;if(null!==i)return i;const s=this.properties().childs().axisProperties.state();return s.autoScale=!0,new he.PriceScale(this._model.properties().childs().scalesProperties,s)}leftPriceScales(){return this._leftPriceScales}rightPriceScales(){return this._rightPriceScales}visibleLeftPriceScales(){var e;const t=this._model.priceScaleSlotsCount();if(this._leftPriceScales.length>t.left){const i=(0,v.moveToHead)(this._leftPriceScales,null===(e=this.mainDataSource())||void 0===e?void 0:e.priceScale());return i.splice(t.left),i}return this._leftPriceScales}visibleRightPriceScales(){var e;const t=this._model.priceScaleSlotsCount();if(this._rightPriceScales.length>t.right){const i=(0,v.moveToHead)(this._rightPriceScales,null===(e=this.mainDataSource())||void 0===e?void 0:e.priceScale());return i.splice(t.right),i}return this._rightPriceScales}clearSeries(e){const t=this._model.mainSeries();for(let i=this.m_dataSources.length-1;i>=0;i--)this.m_dataSources[i]===t&&this._removeSourceFromCollections(i,e)}sourcesByGroup(){return this._cachedOrderedSources}dataSourceForId(e){return this._sourcesById.get(e)||null}changeSourceId(e,t){(0,n.assert)(this.hasDataSource(e));const i=e.id();e.setId(t),this._sourcesById.delete(i),this._sourcesById.set(t,e),(0,re.isPriceDataSource)(e)&&(this._priceSourcesById.delete(i),this._priceSourcesById.set(t,e))}movePriceScale(e,t,i){const s=this.priceScalePosition(e);if(s!==t)this.removePriceScale(e),this._placePriceScale(e,t,i),e.invalidateMargins(),this._invalidateSourcesCache();else if(void 0!==i&&"overlay"!==s){const t="left"===s?this._leftPriceScales:this._rightPriceScales,r=t.indexOf(e);t.splice(r,1),t.splice(i,0,e)}}mainDataSource(){return this.m_mainDataSource}isEmpty(){return null===this.m_mainDataSource}recalculatePriceScale(e,t){if(!e)return;const i=e.sourcesForAutoscale();if((e.isAutoScale()||e.priceRangeShouldBeRecalculatedOnce())&&i&&i.length>0&&!this.timeScale().isEmpty()){const t=this.timeScale().visibleBarsStrictRange();e.recalculatePriceRange(t)}e.updateAllViews(t)}onSourceTagsChanged(){this._tagsChanged.fire()}insertDataSource(e,t,i){e.setZorder(i),t||(t=this.findSuitableScale(e)),this._addSourceToCollections(e);let s=!1;e===this.model().mainSeries()?(this.m_mainDataSource=this.model().mainSeries(),s=!0):null===this.m_mainDataSource&&(0,re.isPriceDataSource)(e)&&(this.m_mainDataSource=e,s=!0),t.addDataSource(e,this._isInInsertManyDataSourcesState),e.setPriceScale(t),t.invalidateMargins(),e.onTagsChanged&&e.onTagsChanged().subscribe(this,this.onSourceTagsChanged),s&&this._processMainSourceChange(),this._tagsChanged.fire(),(0,re.isPriceDataSource)(e)&&this.recalculatePriceScale(t,(0,W.sourceChangeEvent)(e.id())),this._invalidateSourcesCache()}addDataSource(e,t,i){let s=e.zorder();i||((0, -S.isLineTool)(e)&&!e.isSpeciallyZOrderedSource()?(s=null!==this._lastLineDataSourceZOrder?this._lastLineDataSourceZOrder+1:this.newLineToolZOrder(),this._isInInsertManyDataSourcesState&&(this._lastLineDataSourceZOrder=s)):(0,j.isStudy)(e)&&!e.isSpeciallyZOrderedSource()&&(s=this.newStudyZOrder())),this.insertDataSource(e,t,s)}removeDataSource(e,t,i){const s=this.m_dataSources.indexOf(e);if(-1===s)return void Me.logDebug("removeDataSource: invalid data source");this._removeSourceFromCollections(s,!!i),e!==this.m_mainDataSource||t||(this.m_mainDataSource=null);const r=e.priceScale();this.removeSourceFromPriceScale(e),e.onTagsChanged&&e.onTagsChanged().unsubscribe(this,this.onSourceTagsChanged),(0,re.isPriceDataSource)(e)&&!t&&this._processMainSourceChange(),this._tagsChanged.fire(),r&&(0,re.isPriceDataSource)(e)&&this.recalculatePriceScale(r,(0,W.sourceChangeEvent)(e.id())),this._invalidateSourcesCache()}hasDataSource(e){return this._sourcesById.has(e.id())}hasPriceDataSource(e){return this._priceSourcesById.has(e.id())}dataSources(){return this.m_dataSources}priceDataSources(){return this._priceDataSources}lollipopDataSources(){return this._lollipopDataSources}symbolSources(){return this._symbolSources}replaceSource(e,t,i){const s=this.m_mainDataSource===e,r=e.zorder();this.insertDataSource(t,i,r),this.removeDataSource(e,s),this._sourcesById.set(t.id(),t),(0,re.isPriceDataSource)(t)&&this._priceSourcesById.set(t.id(),t),s&&(this.m_mainDataSource=t,this._processMainSourceChange())}findSuitableScale(e,t,i){return this._priceScaleSelectionStrategy.findSuitableScale(this,e,t,i)}createNewPriceScaleIfPossible(){return this._priceScaleSelectionStrategy.createNewPriceScaleIfPossible(this)}canCreateNewPriceScale(){return this._priceScaleSelectionStrategy.canCreateNewPriceScale(this)}isOverlay(e){const t=e.priceScale();return null===t||"overlay"===this.priceScalePosition(t)}recalculate(e){this._leftPriceScales.forEach((t=>this.recalculatePriceScale(t,e))),this._rightPriceScales.forEach((t=>this.recalculatePriceScale(t,e)));for(const t of this.m_dataSources)this.isOverlay(t)&&!(0,S.isLineTool)(t)&&this.recalculatePriceScale(t.priceScale(),e);this.updateAllViews(e),this._model.updatePane(this)}updateAllViews(e){for(const t of this.m_dataSources)t.updateAllViews(e);for(const t of this.model().customSources())t.updateViewsForPane(this,e)}updateLollipopViews(e){}priceScalePosition(e){return this._leftPriceScales.includes(e)?"left":this._rightPriceScales.includes(e)?"right":"overlay"}createPriceScaleAtPosition(e,t){const i=this.properties().childs().axisProperties.state();i.autoScale=!0;const s=new he.PriceScale(this.model().properties().childs().scalesProperties,i);return s.setHeight(this.height()),Ae(s,this._defaultTopMargin(),this._defaultBottomMargin()),this._placePriceScale(s,e,t),s}removePriceScale(e){e.modeChanged().unsubscribeAll(this),e.priceRangeChanged().unsubscribeAll(this),e.internalHeightChanged().unsubscribeAll(this),e===this._lockedPriceScale&&(this._lockedPriceScale=null,this._currentPriceScaleRatio=null) -;const t=this._leftPriceScales.indexOf(e);-1!==t&&(this._leftPriceScales[t].invalidateMargins(),this._leftPriceScales.splice(t,1));const i=this._rightPriceScales.indexOf(e);if(-1!==i&&(this._rightPriceScales[i].invalidateMargins(),this._rightPriceScales.splice(i,1)),null===e.mainSource()){const t=e.dataSources().length;0!==t&&Me.logError("Invalid priceScale state: empty mainSource but non-empty data sources="+t)}this._onPriceScalesChanged.fire()}priceScaleIndex(e,t){switch(t){case"left":return this.leftPriceScales().indexOf(e);case"right":return this.rightPriceScales().indexOf(e)}}move(e,t,i){const s=e.priceScale();this.removeSourceFromPriceScale(e),t.addDataSource(e),e.setPriceScale(t),t.invalidateMargins(),this._processMainSourceChange(),this._invalidateSourcesCache(),e.isIncludedInAutoScale()&&(null!==s&&this.recalculatePriceScale(s,(0,W.sourceChangeEvent)(e.id())),this.recalculatePriceScale(t,(0,W.sourceChangeEvent)(e.id()))),this._onPriceScalesChanged.fire()}setZOrders(e){e.forEach(((e,t)=>{t.setZorder(e)})),this._invalidateSourcesCache(),0===this._bulkActions.activeCounter&&this._dataSourcesCollectionChanged.fire(),this.model().lightUpdate()}isMainPane(){return this.hasDataSource(this.model().mainSeries())}isLast(){const e=this.model().panes();return e[e.length-1]===this}newStudyZOrder(){return(0,_e.newStudyZOrder)(this._priceDataSources)}newLineToolZOrder(e){return(0,_e.newLineToolZOrder)(this.m_dataSources,e)}model(){return this._model}containsMainSeries(){return this._sourcesById.has(this.model().mainSeries().id())}applyPriceScaleRatio(e,t){var i;null!==this._lockedPriceScale&&this._lockedPriceScale!==e||this._currentPriceScaleRatio===t||!this.isMainPane()||null===this._lockedPriceScale&&e!==(null===(i=this.mainDataSource())||void 0===i?void 0:i.priceScale())||(this._setNewPriceRangeByScaleRatio(e,t,this._mainSourceVisiblePriceRange(e),!0,!0),null!==this._lockedPriceScale?this._tryToApplyNewPriceScaleRatio():e.isLog()||this.model().mainSeriesScaleRatioPropertyOnChanged())}sendToBack(e){const t=this.sourcesByGroup().allExceptSpecialSources();this._batchReorder(e,t[0],_e.moveBeforeSource)}bringToFront(e){const t=this.sourcesByGroup().allExceptSpecialSources();this._batchReorder(e,t[t.length-1],_e.moveAfterSource)}sendBackward(e){const t=this.sourcesByGroup().allIncludingHidden(),i=t.indexOf(e[0]);if(0===i)this.bringToFront(e);else{const s=t[i-1];this.insertBefore(e,s)}}bringForward(e){const t=this.sourcesByGroup().allExceptSpecialSources(),i=t.indexOf(e[e.length-1]);if(i===t.length-1)this.sendToBack(e);else{const s=t[i+1];this.insertAfter(e,s)}}insertAfter(e,t){this._batchReorder(e,t,_e.moveAfterSource)}insertBefore(e,t){this._batchReorder(e,t,_e.moveBeforeSource)}maximized(){return this._maximized}collapsed(){return this._collapsed}getPriceScaleById(e){const t=this.m_dataSources.find((t=>{var i;return(null===(i=t.priceScale())||void 0===i?void 0:i.id())===e}));return void 0===t?null:t.priceScale()}priceScaleSelectionStrategy(){return this._priceScaleSelectionStrategy}setPriceScaleSelectionStrategy(e){ -this._priceScaleSelectionStrategy=e,e.apply(this)}findTargetPriceAxisViews(e,t,i,s){if((0,f.isDataSource)(e)&&this.model().paneForSource(e)!==this)return[];const r=e.priceScale();if(t===r)return i;if(null===r)return[];if("overlay"===this.priceScalePosition(r))return t===this.defaultPriceScale()?i:[];const n=this.priceScalePosition(t);if(n!==this.priceScalePosition(r))return[];const o="left"===n?this.leftPriceScales():this.rightPriceScales();return o.indexOf(t)1}properties(){return this._properties}setPriceAutoScale(e,t){e.setMode({autoScale:t}),this.timeScale().isEmpty()||this.recalculatePriceScale(e,(0,W.viewportChangeEvent)())}state(e,t,i,s,r,n){var o,a;const l={sources:[],mainSourceId:null===(o=this.m_mainDataSource)||void 0===o?void 0:o.id(),stretchFactor:this._stretchFactor,leftAxisesState:[],rightAxisesState:[],overlayPriceScales:{},priceScaleRatio:this._currentPriceScaleRatio},c=new Map,h=e=>{if(c.has(e))return c.get(e);let o=null;const a=i&&!e.isSavedInStudyTemplates()||!e.state||(0,S.isLineTool)(e)&&n||!e.isSavedInChart(Boolean(t))||!(o=e.state(t,r))||s&&(0,S.isLineTool)(e)&&e.isActualSymbol&&!e.isActualSymbol()||e.isPhantom()?null:o;return c.set(e,a),a};if(e){l.sources=[];for(let e=0;enull!==c.get(e),u=e=>!n||!(0,S.isLineTool)(e);l.leftAxisesState=this._leftPriceScales.map((e=>({state:e.state(),sources:e.dataSources().filter(d).filter(u).map((e=>e.id()))}))),l.rightAxisesState=this._rightPriceScales.map((e=>({state:e.state(),sources:e.dataSources().filter(d).filter(u).map((e=>e.id()))}))),l.overlayPriceScales={};for(const e of this.m_dataSources)if(this.isOverlay(e)&&e.isSavedInChart(Boolean(t))){const t=e.priceScale();l.overlayPriceScales[e.id()]=null!==(a=null==t?void 0:t.state())&&void 0!==a?a:null}return l}restoreState(e,t,i,s,r,o,a){r=r||{},e.stretchFactor&&(this._stretchFactor=e.stretchFactor),s=null!=s?s:this._model.mainSeries().id();const l={};if(e.sources){const n=e.sources.filter((e=>{var t;return!!e&&("MainSeries"===e.type||(!(null===(t=e.points)||void 0===t?void 0:t.some((e=>null===e.time_t||!isFinite(e.time_t))))||(Me.logNormal("Dropped invalid "+e.type+". Reason: non-numeric point time"),!1)))})),c=n.findIndex(me.isMainSeriesState);-1!==c&&this.model().mainSeries().setObsoleteZOrder(n[c].zorder),i<3&&(0,_e.reorderDataSourcesStateZOrder)(n);const h=-1!==this.m_dataSources.indexOf(this._model.mainSeries());this.clearSeries(Boolean(a)),this.m_mainDataSource=null,h&&this._addSourceToCollections(this._model.mainSeries(),a),(()=>{const t=n.find((t=>t.id===e.mainSourceId));if(void 0===t)return void Me.logWarn("There is no main source with id "+e.mainSourceId+", total sources="+n.length);if(!window.TradingView[t.type]||!(0,S.isLineToolName)(t.type))return void Me.logNormal("The type of main source is not line tool - fix is unnecessary");let i=null -;for(const e of n)if(!window.TradingView[t.type]||!(0,S.isLineToolName)(e.type)){if(null!==i)return void Me.logWarn("Pane contains more than 1 possibly main sources - auto fix cannot be applied");i=e}if(null===i)return void Me.logWarn("Pane contains only line tools - possible we need to remove this pane?");const s=e.mainSourceId;let r=0;e.mainSourceId=i.id,n.forEach((e=>{e.ownerSource===s&&(e.ownerSource=null==i?void 0:i.id,r+=1)})),Me.logNormal("Auto fix broken pane is applied, changed line tools="+r+", changed from="+s+" to="+i.id)})();for(const e of n)if("study_Sessions"===e.type){this.model().sessions().restoreOldState(e,t);break}for(const e of n)"study_Sessions"!==e.type&&(null===this._model.dataSourceForId(e.id)||"MainSeries"===e.type?(l[e.id]=e.ownerSource,(0,me.isMainSeriesState)(e)?this._restoreMainSeries(e,t,h,r,o,a):(0,me.isStudyState)(e)?this.restoreStudy(e,t,s,r,a,!0):(0,me.isLineToolState)(e)?(e.state&&(e.state.zOrderVersion=2),this.restoreLineTool(e,t,void 0,a)):"ChartEventsSource"===e.type&&this._restoreSpecialSource(e,t,a)):Me.logError("Duplicate id while restoring pane: "+e.type+","+e.id))}const c=new Set,h=(e,t)=>{e.priceScale()!==t&&(this.removeSourceFromPriceScale(e),e.setPriceScale(t),t.addDataSource(e))},d=(e,t,i)=>{if(c.has(e))return;c.add(e);const s=i.m_showSymbolLabels;void 0!==s&&e===this.model().mainSeries()&&this.model().properties().childs().scalesProperties.childs().showSymbolLabels.setValue(s),this._model.children(e,!0).forEach((e=>d(e,t,i))),h(e,t)},u=e=>{const t=(0,B.defaults)("chartproperties").paneProperties.axisProperties,i=new he.PriceScale(this.model().properties().childs().scalesProperties,t);return i.restoreState(e.state),e.sources.forEach((e=>{const s=this.dataSourceForId(e);s&&d(s,i,t)})),0===i.dataSources().length?null:i},p=e=>e.map(u).filter((e=>null!==e));let _;if(e.leftAxisesState)_=p(e.leftAxisesState);else{const t=u({state:e.leftAxisState,sources:e.leftAxisSources});_=null!==t?[t]:[]}let m;if(this._leftPriceScales.slice().forEach((e=>this.removePriceScale(e))),this._leftPriceScales=[],_.forEach((e=>this._placePriceScale(e,"left"))),e.rightAxisesState)m=p(e.rightAxisesState);else{const t=u({state:e.rightAxisState,sources:e.rightAxisSources});m=null!==t?[t]:[]}this._rightPriceScales.slice().forEach((e=>this.removePriceScale(e))),this._rightPriceScales=[],m.forEach((e=>this._placePriceScale(e,"right"))),this._currentPriceScaleRatio=e.priceScaleRatio||e.leftPriceScaleRatio||e.rightPriceScaleRatio||null;const g=new Map;for(const t of this.m_dataSources){if(c.has(t))continue;let i;if(e.overlayPriceScales&&e.overlayPriceScales[t.id()]){let s=e.overlayPriceScales[t.id()];g.has(null==s?void 0:s.id)?i=g.get(null==s?void 0:s.id):(s=(0,n.ensure)(s),i=new he.PriceScale(this._model.properties().childs().scalesProperties),i.setHeight(this._height),s.m_isAutoScale=!0,s.m_isLog=!1,s.m_isPercentage=!1,s.m_isLockScale=!1,i.restoreState(s),g.set(s.id,i))}else i=new he.PriceScale(this._model.properties().childs().scalesProperties),i.setHeight(this._height);h(t,i)} -for(const e of Object.keys(l)){const t=l[e],i=this.dataSourceForId(e);t&&i&&null===i.ownerSource()&&i.setOwnerSource(this.dataSourceForId(t))}if(e.mainSourceId&&!this.containsMainSeries()&&(this.m_mainDataSource=this.dataSourceForId(e.mainSourceId)),!this.m_mainDataSource)for(const e of this.m_dataSources)if((0,re.isPriceDataSource)(e)){this.m_mainDataSource=e;break}for(const e of this.m_dataSources)if((0,S.isLineTool)(e))e.ownerSource()||e.setOwnerSource(this.mainDataSource()),e.isFixed()&&e.restoreFixedPoint();else if((0,j.isStudy)(e)){const t=e.properties().childs();!e.ownerSource()&&t.linkedToSeries&&t.linkedToSeries.value()&&e.setOwnerSource(this.model().mainSeries())}this._updateMargins(),this._cachedOrderedSources.clear()}onPriceScalesChanged(){return this._onPriceScalesChanged}setPaneSize(e){let t;switch(e){case"large":t=1;break;case"medium":t=.6;break;case"small":t=.3;break;case"tiny":t=.15;break;default:throw new Error("Unknown size enum value: "+e)}this._stretchFactor=1e3*t}stretchFactor(){return this._stretchFactor}setStretchFactor(e){this._stretchFactor=e}customSources(e){return this.model().customSources(e)}createDrawingsCaches(){se.ExecutionsPositionController.recreateOrderedByBarsSourcesCache(this)}clearDrawingCaches(){se.ExecutionsPositionController.clearOrderedByBarsSourcesCache()}executionsPositionController(){return this._executionsPositionController||(this._executionsPositionController=new se.ExecutionsPositionController(this)),this._executionsPositionController}width(){return this._width}height(){return this._height}setHeight(e){this._height=e,this._leftPriceScales.forEach((t=>t.setHeight(e))),this._rightPriceScales.forEach((t=>t.setHeight(e)));for(let t=0;t(e.paneViews(this)||[]).some((e=>{const r=e.renderer(t,i);return r&&r.doesIntersectWithBox&&r.doesIntersectWithBox(s)}))))}logicalRectToPixels(e){const t=this.defaultPriceScale(),i=this.timeScale(),s=(0,n.ensureNotNull)((0, -n.ensureNotNull)(t.mainSource()).firstValue()),r=t.priceToCoordinate(e.p1.price,s),a=i.indexToCoordinate(e.p1.index),l=t.priceToCoordinate(e.p2.price,s),c=i.indexToCoordinate(e.p2.index),h=new o.Point(Math.min(a,c),Math.min(r,l)),d=new o.Point(Math.max(a,c),Math.max(r,l));return(0,o.box)(h,d)}timeScale(){return this._timeScale}restoreLineTool(e,t,i,s,r){var o,a,l,c,h,d,u,p,_,m,g;delete e.state.lastUpdateTime,e.state.intervalsVisibilities=(0,we.mergeIntervalVisibilitiesDefaults)(e.state.intervalsVisibilities),i=void 0===i||i,be.LineToolElliott.migrateState(e),"LineToolGannComplex"!==(g=e).type||void 0!==g.version&&1!==g.version||(g.type="LineToolGannFixed"),Array.isArray(e.positionPercents)&&(e.positionPercents=e.positionPercents[0]);const f=e.type,v=e.id,y=e.state,b=i?e.zorder:this.newLineToolZOrder();(0,n.assert)((0,S.isLineToolName)(f),"invalid data source type:"+f+" (expected to be a Line Tool)");let w,C,P=null;if((0,me.isStudyLineToolState)(e)){P=this._model.studyVersioning();const t=P.patchPointsBasedStudyState(e);e=t;const i=t.metaInfo;Object.assign(i,te.StudyMetaInfo.parseIdString(null==i?void 0:i.fullId));const s=P.updateMetaInfo(i)||i;C=(0,S.createStudyLineToolProperties)(f,i,s,y,P),w=(0,S.createLineTool)(f,this._model,C,s,!0)}else C=(0,S.createLineToolProperties)(f,y,this._model),t?null===(o=C.child("fixedSize"))||void 0===o||o.setValue(!1):null===(a=C.child("fixedSize"))||void 0===a||a.setValue(!0),w=(0,S.createLineTool)(f,this._model,C,null,!0);w.setId(v),w.linkKey().setValue(e.linkKey||null);const T=e.alertId;T&&w.canHasAlert()&&N.enabled("alerts")&&!this._model.readOnly()&&!this._model.isJustClonedChart()&&w.setAlert(T);let x=null!==(l=e.indexes)&&void 0!==l?l:[];if(x=x.slice(0,null!==(h=null===(c=e.points)||void 0===c?void 0:c.length)&&void 0!==h?h:x.length),w.isFixed()?void 0!==e.positionPercents?w.restorePositionPercents(e.positionPercents):w.restorePositionPercents({x:.5,y:.5}):e.points&&w.restorePoints(e.points,x,t),w instanceof Ce.LineToolBarsPattern||w instanceof Pe.LineToolCallout||w instanceof Te.LineToolTrendAngle||w instanceof xe.LineToolGhostFeed||w instanceof Ie.LineToolParallelChannel)null===(u=(d=w).restoreData)||void 0===u||u.call(d,e);else if(t&&(0,me.isStudyLineToolState)(e)&&w.restoreData){const t=e;P&&(t.graphics=P.patchPointsBasedStudyData(t.metaInfo,t.graphics)),null===(p=w.restoreData)||void 0===p||p.call(w,t)}const I=null==e.version?1:e.version,M=null==w.version?1:w.version;if(I!==M&&(null===(m=(_=w).migrateVersion)||void 0===m||m.call(_,I,M,{pane:this,model:this._model,properties:C})),void 0!==b&&w.setZorder(b),r)(0,S.prepareLineToolPropertiesByOwnerSource)(w.properties(),r),w.setOwnerSource(r);else{const t=e.ownerSource?this.dataSourceForId(e.ownerSource):null;w.setOwnerSource(t)}return this._addSourceToCollections(w,s),this._cachedOrderedSources.clear(),w}restoreStudy(e,t,i,s,r,n){var o;if(t&&void 0===e.data&&void 0===e.nonSeriesData&&void 0===e.indexes)return Me.logError("Cannot restore (skipping) study without data "+e.id+", "+e.metaInfo.id),null -;const a=e.id,l=e.state,c=e.zorder;i=null!=i?i:this._model.mainSeries().id();const h=(null!==(o=e.parentSources)&&void 0!==o?o:e.ownerSource?[e.ownerSource]:[]).filter((e=>e!==i));let d=(0,ie.clone)(e.metaInfo);if(Object.assign(d,te.StudyMetaInfo.parseIdString(d.id)),function(e){return"Script$TV_EARNINGS@tv-scripting"===e||"Script$TV_DIVIDENDS@tv-scripting"===e||"Script$TV_SPLITS@tv-scripting"===e||"ESD$TV_EARNINGS@tv-scripting"===e||"ESD$TV_DIVIDENDS@tv-scripting"===e||"ESD$TV_SPLITS@tv-scripting"===e||"Earnings@tv-basicstudies"===e||"Dividends@tv-basicstudies"===e||"Splits@tv-basicstudies"===e||"BarSetContinuousRollDates@tv-corestudies"===e}(d.id)&&!t)return Me.logNormal("Skipping study "+d.id),null;let u=l;const p=this._model.studyVersioning(),_=p.patchPropsStateAndMetaInfo(u,d,{oldShowStudyLastValueProperty:t&&!(null==s?void 0:s.showStudyLastValueProperty)});u=_.propsState,d=_.metaInfo;const m=new C.StudyStub(this._model,e,d.shortDescription);let g;m.setId(a),m.setZorder(c);const f=i=>{m.setStatus({type:fe.StudyStatusType.Undefined});const s=i||new te.StudyMetaInfo(d),r=ye.instance(this._model),n=n=>{var o;const l=(0,P.prepareStudyPropertiesForLoadChart)(d,i,u,p),c=(0,j.createStudy)(this._model,l,n,s);if(c.setId(a),c.setOwnFirstValue(null!==(o=e.ownFirstValue)&&void 0!==o?o:null),t){const t=e,{data:i,nsData:s,indexes:r}=p.patchStudyData(d,t.data,t.nonSeriesData,t.indexes);c.restoreData(i,s,r)}this._model.replaceStudyStub(m,c)||(g=c),r.add(a,c)};if(h.length>0){const e=h.map((e=>r.get(e)));Promise.all(e).then(n)}else n([])};if(t)f(null);else{const e=p.updateMetaInfoAsync(d);e.sync?f(e.result):e.result.then(f).catch((e=>m.setFailed("error: "+e)))}const v=null!=g?g:m;if(v){v.setZorder(c);const t=e.metaInfo.linkedToSeries?this._model.mainSeries():h.length?this.dataSourceForId(h[0]):null;v.setOwnerSource(t),this._addSourceToCollections(v,r),this._processMainSourceChange()}return this._cachedOrderedSources.clear(),v}clipboardLineToolOwnerSource(e){const t=this.dataSourceForId(e);if(null!==t){const e=t.ownerSource();if(null!==e&&null!==e.firstValue())return e}const i=this.mainDataSource();if(null!==i&&null!==i.firstValue())return i;for(const e of this.dataSources())if((0,re.isPriceDataSource)(e)&&null!==e.firstValue())return e;return null}realignLineTools(e){var t;let i=!1;for(const s of this.m_dataSources)!(0,S.isLineTool)(s)||void 0!==e&&(null===(t=null==s?void 0:s.ownerSource())||void 0===t?void 0:t.symbolSource())!==e&&(0,pe.isActingAsSymbolSource)(e)||(s.realign(),s.updateAllViews((0,W.sourceChangeEvent)(s.id())),i=!0);return i&&this._invalidateSourcesCache(),i}startScalePrice(e,t){e.startScale(t)}scalePriceTo(e,t){e.scaleTo(t),this.updateAllViews((0,W.viewportChangeEvent)())}endScalePrice(e){e.endScale()}startScrollPrice(e,t){e.startScroll(t)}scrollPriceTo(e,t){e.scrollTo(t),this.updateAllViews((0,W.viewportChangeEvent)())}endScrollPrice(e){e.endScroll()}resetPriceScale(e){const t=this.timeScale().visibleBarsStrictRange();e.isLockScale()||e.setMode({autoScale:!0}),e.recalculatePriceRange(t),this.updateAllViews((0, -W.viewportChangeEvent)())}restorePriceScaleState(e,t){e.restoreState(t),this.updateAllViews((0,W.viewportChangeEvent)())}beginInsertManyLineDataSources(){this._isInInsertManyDataSourcesState=!0,this._lastLineDataSourceZOrder=null}endInsertManyLineDataSources(){this._isInInsertManyDataSourcesState=!1,this._lastLineDataSourceZOrder=null}removeSourceFromPriceScale(e){const t=e.priceScale();if(null!==t){const i=t.dataSources();i.indexOf(e)>=0&&t.removeDataSource(e),0===i.length&&this.removePriceScale(t)}}_invalidateSourcesCache(){this._cachedOrderedSources.clear(),this._leftPriceScales.forEach((e=>e.invalidateSourcesCache())),this._rightPriceScales.forEach((e=>e.invalidateSourcesCache()))}_processMainSourceChange(){let e=!1;if(null===this.m_mainDataSource)for(const t of this.m_dataSources)if((0,re.isPriceDataSource)(t)&&!this.isOverlay(t)&&(!t.properties().linkedToSeries||!t.properties().linkedToSeries.value())){this.m_mainDataSource=t,e=!0;break}if(this.m_mainDataSource&&e){let e=this.m_dataSources.filter(S.isLineTool);e=(0,ne.sortSources)(e);for(const t of e)this.move(t,(0,n.ensureNotNull)(this.m_mainDataSource.priceScale()),!0)}else if(!this.m_mainDataSource||this.isOverlay(this.m_mainDataSource)&&0===this._nonOverlayPricesSourcesCount()){let e=null;if(this.m_dataSources.includes(this._model.mainSeries()))e=this._model.mainSeries();else for(const t of this.m_dataSources)if((0,re.isPriceDataSource)(t)&&this.isOverlay(t)&&t.showInObjectTree()){e=t;break}if(null!==e){const t=this.m_mainDataSource===e;this.m_mainDataSource=e;const i=this.createNewPriceScaleIfPossible();if(t&&e===this._model.mainSeries()){const t=(0,n.ensureNotNull)(e.priceScale());this._model.children(e,!0).forEach((e=>{this.removeSourceFromPriceScale(e),i.addDataSource(e),e.setPriceScale(i)})),this.removePriceScale(t)}this.move(e,i,!0),this.recalculatePriceScale(e.priceScale(),(0,W.globalChangeEvent)())}}}_addSourceToCollections(e,t){this.m_dataSources.push(e),this._sourcesById.set(e.id(),e),this._invalidateSourcesCache();const i=()=>{this._sourcePropertiesChanged.fire(e)};e.properties().subscribe(this,i),e.zOrderChanged().subscribe(this,(t=>this._sourcesZOrderChanged.fire(e,t))),(0,S.isLineTool)(e)&&(e.normalizedPointsChanged().subscribe(this,i),e.fixedPointChanged().subscribe(this,i),e.hasAlert.subscribe(i),e.sharingMode().subscribe(i),e.linkKey().subscribe(i),this._sourceWatchedValuesSubscriptions.set(e.id(),i));const s=(0,pe.isSymbolSource)(e)?e:null;(0,re.isPriceDataSource)(e)&&(this._priceSourcesById.set(e.id(),e),e.currencyChanged().subscribe(this,(()=>this._invalidateSourcesCache())),e.unitChanged().subscribe(this,(()=>this._invalidateSourcesCache())),this._priceDataSources.push(e),null!==s&&(this._symbolSources.push(s),s.symbolResolved().subscribe(this,(()=>this._symbolSourceResolved.fire(e))),s.symbolResolvingActive().subscribe(this._recalcSymbolSourceResolvingActive),s.symbolHibernated().subscribe(this._onSymbolSourceCollectionChanged),this._recalcSymbolSourceResolvingActive(),this._onSymbolSourceCollectionChanged())), -e.isMultiPaneAvailable()&&this.model().addMultiPaneSource(e),t||0!==this._bulkActions.activeCounter||this._dataSourcesCollectionChanged.fire()}_removeSourceFromCollections(e,t){const i=this.m_dataSources[e];i.properties().unsubscribeAll(this),i.zOrderChanged().unsubscribeAll(this),this.m_dataSources.splice(e,1),this._sourcesById.delete(i.id());const s=i.id();if((0,S.isLineTool)(i)&&(i.normalizedPointsChanged().unsubscribeAll(this),i.fixedPointChanged().unsubscribeAll(this),this._sourceWatchedValuesSubscriptions.has(s))){const e=this._sourceWatchedValuesSubscriptions.get(s);i.hasAlert.unsubscribe(e),i.linkKey().unsubscribe(e)}this._invalidateSourcesCache();const r=(0,pe.isSymbolSource)(i)?i:null;(0,re.isPriceDataSource)(i)&&(this._priceSourcesById.delete(i.id()),i.currencyChanged().unsubscribeAll(this),i.unitChanged().unsubscribeAll(this),(0,v.removeItemFromArray)(this._priceDataSources,i),null!==r&&((0,v.removeItemFromArray)(this._symbolSources,r),r.symbolResolved().unsubscribeAll(this),r.symbolResolvingActive().unsubscribe(this._recalcSymbolSourceResolvingActive),r.symbolHibernated().unsubscribe(this._onSymbolSourceCollectionChanged),this._recalcSymbolSourceResolvingActive(),this._onSymbolSourceCollectionChanged())),i.isMultiPaneAvailable()&&this.model().removeMultiPaneSource(i),t||0!==this._bulkActions.activeCounter||this._dataSourcesCollectionChanged.fire()}_recalculatePriceScaleByScaleRatio(e){this.isMainPane()&&e===this._lockedPriceScale&&(null!==this._currentPriceScaleRatio?this._applyOldScaleRatioToPriceScale():this._tryToApplyNewPriceScaleRatio())}_defaultBottomMargin(){return.01*this.properties().childs().bottomMargin.value()}_defaultTopMargin(){return.01*this.properties().childs().topMargin.value()}_updateMargins(){const e=this._defaultTopMargin(),t=this._defaultBottomMargin();for(const i of this._leftPriceScales)Ae(i,e,t);for(const i of this._rightPriceScales)Ae(i,e,t);for(const i of this.m_dataSources)if(this.isOverlay(i)){const s=i.priceScale();null!==s&&(Ae(s,e,t),this.recalculatePriceScale(s,(0,W.viewportChangeEvent)()))}for(const e of this._leftPriceScales)this.recalculatePriceScale(e,(0,W.viewportChangeEvent)());for(const e of this._rightPriceScales)this.recalculatePriceScale(e,(0,W.viewportChangeEvent)());this.updateAllViews((0,W.viewportChangeEvent)())}_batchReorder(e,t,i){i(this.sourcesByGroup().allExceptSpecialSources(),e,t),this._invalidateSourcesCache(),this._dataSourcesCollectionChanged.fire(),this.model().fullUpdate()}_placePriceScale(e,t,i){if("overlay"===t)return void e.invalidateMargins();const s="left"===t?this._leftPriceScales:this._rightPriceScales,r=void 0===i?s.length:i;s.splice(r,0,e),e.modeChanged().subscribe(this,this._onPriceScaleModeChanged.bind(this,e)),e.internalHeightChanged().subscribe(this,this._recalculatePriceScaleByScaleRatio.bind(this,e)),e.priceRangeChanged().subscribe(this,this._recalculateTimeScaleByScaleRatio.bind(this,e)),e.priceRangeChanged().subscribe(this,this._onPriceScaleSetMinMaxPriceRange.bind(this,e)),e.isLockScale()&&((0, -n.assert)(null===this._lockedPriceScale),this._lockedPriceScale=e,this._currentPriceScaleRatio=null),e.invalidateMargins(),this._onPriceScalesChanged.fire()}_onPriceScaleModeChanged(e,t,i){if(i.lockScale&&(this._lockedPriceScale!==e&&null!==this._lockedPriceScale&&this._lockedPriceScale.setMode({lockScale:!1}),this._lockedPriceScale=e,this._currentPriceScaleRatio=(0,de.scaleRatio)(this.timeScale(),e)),t.lockScale&&!i.lockScale&&(this._lockedPriceScale=null,this._currentPriceScaleRatio=null),t.percentage===i.percentage&&t.indexedTo100===i.indexedTo100)return;const s=this.timeScale().visibleBarsStrictRange();null!==s&&(e.recalculatePriceRange(s),e.updateAllViews((0,W.viewportChangeEvent)()))}_applyOldScaleRatioToPriceScale(){this._isRecalculatingScales||null===this._currentPriceScaleRatio||null===this._lockedPriceScale||(this._isRecalculatingScales=!0,this._setNewPriceRangeByScaleRatio(this._lockedPriceScale,this._currentPriceScaleRatio,this._mainSourceVisiblePriceRange(this._lockedPriceScale)),this._isRecalculatingScales=!1)}_setNewPriceRangeByScaleRatio(e,t,i,s,r){const n=(0,de.priceRangeByScaleRatio)(e,this.timeScale().barSpacing(),t);e.setPriceRange(null!==n?n:i,s,r)}_applyOldScaleRatioToTimeScale(){this._isRecalculatingScales||null===this._currentPriceScaleRatio||(this._isRecalculatingScales=!0,this._setNewBarSpacingByScaleRatio(),this._isRecalculatingScales=!1)}_tryToApplyNewPriceScaleRatio(){const e=(0,n.ensureNotNull)(this._lockedPriceScale),t=(0,de.scaleRatio)(this.timeScale(),e);this._currentPriceScaleRatio===t||e.isLog()||(this._currentPriceScaleRatio=t,this.model().mainSeriesScaleRatioPropertyOnChanged())}_recalculateTimeScaleByScaleRatio(e){e===this._lockedPriceScale&&(null!==this._currentPriceScaleRatio?this._applyOldScaleRatioToTimeScale():this._tryToApplyNewPriceScaleRatio())}_setNewBarSpacingByScaleRatio(){const e=this.timeScale().getValidBarSpacing((0,de.barSpacingByScaleRatio)((0,n.ensureNotNull)(this._lockedPriceScale),this._currentPriceScaleRatio));this.timeScale().isValidBarSpacing(e)&&this.timeScale().setBarSpacing(e)}_mainSourceVisiblePriceRange(e){const t=this.timeScale().visibleBarsStrictRange();return null!==t?(0,n.ensureNotNull)((0,n.ensureNotNull)(e.mainSource()).priceRange(t.firstBar(),t.lastBar())):new ue.PriceRange(-.5,.5)}_setMinMaxPriceRange(){const e=(0,n.ensureNotNull)(this._lockedPriceScale),t=(0,de.priceRangeByScaleRatio)(e,this.timeScale().maxBarSpacing(),this._currentPriceScaleRatio),i=(0,de.priceRangeByScaleRatio)(e,this.timeScale().minBarSpacing(),this._currentPriceScaleRatio);null!==t&&e.setMaxPriceRange(t),null!==i&&e.setMinPriceRange(i)}_onPriceScaleSetMinMaxPriceRange(e){e===this._lockedPriceScale&&this._setMinMaxPriceRange()}_nonOverlayPricesSourcesCount(){return this.m_dataSources.filter((e=>(!e.properties().linkedToSeries||!e.properties().linkedToSeries.value())&&((0,re.isPriceDataSource)(e)&&e.showInObjectTree()&&!this.isOverlay(e)))).length}_restoreMainSeries(e,t,i,s,r,n){const o=e.id,a=e.state;if(a&&r&&(a.style=r.style||a.style,a.interval=r.interval||a.interval, -r.symbol&&r.symbol!==a.symbol&&(a.symbol=r.symbol,delete a.currencyId,delete a.unitId)),a&&["candleStyle","hollowCandleStyle","haStyle"].forEach((e=>{a[e]&&(a[e].wickUpColor=a[e].wickUpColor||a[e].wickColor,a[e].wickDownColor=a[e].wickDownColor||a[e].wickColor)})),a&&(a.statusViewStyle=a.statusViewStyle||{},!a.statusViewStyle.symbolTextSource)){const e=!!a.statusViewStyle.showSymbolAsDescription;a.statusViewStyle.symbolTextSource=e?"ticker":"description"}if(a&&(a.extendedHours?a.sessionId="extended":a.sessionId||(a.sessionId="regular"),delete a.extendedHours),!i){const e=this._model.mainSeries();this._model.mainPane().removeDataSource(e,!1,n),this._addSourceToCollections(e,n)}const l=this.model().mainSeries(),c=l.properties().childs();this.m_mainDataSource=l;const h=a&&a.style?a.style:void 0;if(6===h&&"ATR"===c.pnfStyle.childs().inputs.childs().style.value()?c.pnfStyle.childs().inputs.childs().style.setValueSilently("Traditional"):4===h&&"ATR"===c.renkoStyle.childs().inputs.childs().style.value()&&c.renkoStyle.childs().inputs.childs().style.setValueSilently("Traditional"),a&&!a.hasOwnProperty("showSessions")&&(a.showSessions=!1),a&&void 0===a.settlementAsClose&&(a.settlementAsClose=!1),a&&t&&(a.showCountdown=!1),a&&(t&&!("showSeriesLastValueProperty"in s)&&"showLastValue"in a&&this._model.properties().childs().scalesProperties.childs().showSeriesLastValue.setValue(a.showLastValue),delete a.showLastValue),a){const t={haStyle:(0,O.chartStyleStudyId)(8,!0),renkoStyle:(0,O.chartStyleStudyId)(4,!0),pbStyle:(0,O.chartStyleStudyId)(7,!0),kagiStyle:(0,O.chartStyleStudyId)(5,!0),pnfStyle:(0,O.chartStyleStudyId)(6,!0),rangeStyle:(0,O.chartStyleStudyId)(11,!0)},i=this._model.studyVersioning(),s=l.styleStudyInfos(),r=Object.keys(ge.SYMBOL_STRING_DATA);for(let n=0;nthis._right+.5?!0===t&&2:!0!==t||0}before(e){return ethis._right+.5}equals(e){return this._left===e.left()&&this._right===e.right()}static compare(e,t){return null===e||null===t?e===t:e.equals(t)}}var Re=i(90593);const Ne=(0,Z.getLogger)("Chart.TimePoints");function Oe(e,t){return null===e||null===t?e===t:e.firstIndex===t.firstIndex&&e.lastIndex===t.lastIndex}class Fe{constructor(){this._zoffset=0,this._items=[],this._range=new Re.WatchedObject(null,Oe)}clear(){this._zoffset=0, -this._items=[],this._range.setValue(null)}size(){return this._items.length}range(){return this._range.readonly()}merge(e,t,i){const s=this._mergeImpl(e,t,i);return this._updateFirstAndLastIndex(),s}addTail(e,t){for(let i=t?1:0;ithis._items[this._items.length-1])return t?this._validOffsetToIndex(this._items.length-1):null;for(let i=0;io){const i=e-o;if(i<500&&null!=t)return t(l,i);return l+i*c}return null}roughIndex(e,t=null){const i=this._items;if(!i.length||i.length<2)return null;const s=i.length-1,r=this._validOffsetToIndex(0),n=this._validOffsetToIndex(s),o=i[0],a=i[s];if(e>=o&&e<=a)return this.closestIndexLeft(e);const l=(a-o)/(n-r);if(ea){const i=e-a;let s=Math.trunc(i/l);if(s<500&&null!==t){const i=t(a,e);i.success&&(s=i.result)}return n+s}return null}closestIndexLeft(e){const t=this._items;if(!t.length)return null;if(Number.isNaN(e))return null;let i=t.length-1;if(e>=t[i])return this._validOffsetToIndex(i);let s=0;const r=t[s];if(es+1;){const r=s+i>>1,n=t[r];if(n>e)i=r;else{if(!(nthis._zoffset&&e+t>0)return Ne.logError("merge: when the first time point index is updated, we should fill the time points starting from the first one"),[];if(0===this._items.length)return this._items=i.slice(),this._zoffset=t,[{change:"rebuild",index:this._validOffsetToIndex(0)}];const s=e+this._zoffset;if(s<0){const r=Math.abs(s) -;if(i.lengththis._items.length){const e=o-this._items.length;for(let t=n;t{this._usePercentageRightOffset.setValue(!1),this._defaultRightOffsetOptionsUpdated()})),this._defaultRightOffsetPercentage.subscribe((e=>{if(e>=100||e<0){const t=Math.max(0,Math.min(e,99));this._defaultRightOffsetPercentage.setValue(t)}else this._usePercentageRightOffset.setValue(!0),this._defaultRightOffsetOptionsUpdated()})),this._usePercentageRightOffset.subscribe((()=>{this._defaultRightOffsetOptionsUpdated()})),this._options.preserveBarSpacing&&(this._barSpacing=this._scalesProperties.childs().barSpacing.value()||6),this._barSpacingChanged.subscribe(this,this._maxRightOffsetOnChanged),this._widthChanged.subscribe(this,this._maxRightOffsetOnChanged)}destroy(){this._barSpacingChanged.unsubscribeAll(this),this._barSpacingChanged.destroy(),this._widthChanged.unsubscribeAll(this),this._widthChanged.destroy()}isEmpty(){return 0===this._width||!this.canNormalize()}canNormalize(){return this._points.size()>0}update(e,t,i,s){this._visibleBarsInvalidated=!0,i.length>0&&this._points.merge(e,t,i),this._tickMarks.merge(s),this.correctOffset()}addTail(e,t,i){this._tickMarks.removeTail(t);const s=e.params,r=(0,n.ensureDefined)(this._tickMarks.maxIndex)+(i?0:1);for(let e=0;e0&&(i*=this._width/e.width)),this._tryToUpdateBarSpacing(this._barSpacing,i),this.correctOffset(),this._usePercentageRightOffset.value()&&(this._rightOffset=this.percentsToBarIndexLength(this._defaultRightOffsetPercentage.value())),this._rightOffsetChanged.fire(this._rightOffset)}marks(){if(this.isEmpty())return null;const e=this._barSpacing,t=5*((this._scalesProperties.childs().fontSize.value()||0)+4),i=Math.round(t/e),s=(0,n.ensureNotNull)(this.visibleBarsStrictRange()),r=Math.max(s.firstBar(),s.firstBar()-i),o=Math.max(s.lastBar(),s.lastBar()-i),a=this._tickMarks.build(e,t),l=[];for(const e of a){if(!(r<=e.index&&e.index<=o))continue;const t=this._tickMarks.indexToTime(e.index);null!==t&&l.push({coord:this.indexToCoordinate(e.index),label:this.formatLabel(t,e.span),span:e.span,major:e.label>=je.DAY_SPAN})}return l}visibleBarsStrictRange(){return this._visibleBarsInvalidated&&(this._visibleBarsInvalidated=!1,this._updateVisibleBars()),this._visibleBars.strictRange()}visibleBarsStrictRangeChanged(){return this._visibleBarsChanged}visibleStrictDataRange(e){const t=this.visibleBarsStrictRange();if(null===t)return null;const i=e.search(t.firstBar(),Je.PlotRowSearchMode.NearestRight),s=e.search(t.lastBar(),Je.PlotRowSearchMode.NearestLeft);return null===i||null===s?null:new Ve.BarsRange(i.index,s.index)}visibleExtendedDataRange(e,t){const i=this.visibleBarsStrictRange();if(null===i)return null;let s=1===t?null:e.search(i.firstBar()-1,Je.PlotRowSearchMode.NearestLeft),r=0===t?null:e.search(i.lastBar()+1,Je.PlotRowSearchMode.NearestRight);return null===s&&(s=e.search(i.firstBar(),Je.PlotRowSearchMode.NearestRight)),null===r&&(r=e.search(i.lastBar(),Je.PlotRowSearchMode.NearestLeft)),null===s||null===r?null:new Ve.BarsRange(s.index,r.index)}logicalRangeChanged(){return this._logicalRangeChanged}tickMarks(){return this._tickMarks}points(){return this._points}width(){return this._width}setWidth(e,t){if(!Number.isFinite(e)||e<=0)return void it.logWarn(`setWidth: invalid argument: ${e}`);if(this._width===e)return;if(this._visibleBarsInvalidated=!0,(t||this._options.lockVisibleTimeRangeOnResize)&&this._width){const t=this._barSpacing*e/this._width;this._tryToUpdateBarSpacing(this._barSpacing,t)}else this._width&&this.setBarSpacing(this._barSpacing);if(null!==this._leftEdgeIndex){if((0,n.ensureNotNull)(this.visibleBarsStrictRange()).firstBar()<=this._leftEdgeIndex){const t=this._width-e;this._rightOffset-=Math.round(t/this._barSpacing)+1}}const i=this._usePercentageRightOffset.value()&&this._rightOffset>0?this.barIndexLengthToPercents(this._rightOffset):-1;this._width=e,this._widthChanged.fire(e);const s=this._rightOffset -;i>0?this._rightOffset=this.percentsToBarIndexLength(i):this.correctOffset(),this._rightOffset!==s&&this._rightOffsetChanged.fire(this._rightOffset),this._requestMoreData()}setLeftEdgeFix(e){this._leftEdgeIndex=e;const t=this.visibleBarsStrictRange();if(null===t)return;const i=t.firstBar()-e;if(i<0){const e=this._rightOffset-i-1;this.scrollToOffsetAnimated(e,500)}}indexToCoordinate(e){if(this.isEmpty())return 0;if(!(0,ie.isInteger)(e))return 0;const t=this.baseIndex()+this._rightOffset-e;return this._width-(t+.5)*this._barSpacing-1}indexToUserTime(e){return this._tickMarks.indexToTime(e)}timePointToIndex(e,t){switch(t){case 0:return this._points.indexOf(e,!1);case 1:return this._points.closestIndexLeft(e);default:return this._points.indexOf(e,!0)}}indexToTimePoint(e){return this._points.valueAt(e)}timeToCoordinate(e){const t=this._points.closestIndexLeft(e);if(null===t)return null;const i=(0,n.ensureNotNull)(this._points.valueAt(t)),s=this.indexToCoordinate(t);if(s<=0||s>=this._width)return null;const r=this.barSpacing(),o=this.baseIndex(),a=s+(e-i)/((0,n.ensureNotNull)(this._points.valueAt(o))-(0,n.ensureNotNull)(this._points.valueAt(o-1)))*r+1;return a<=0||a>=this._width?null:a}barIndexesToCoordinates(e){const t=this.baseIndex();for(const i of e){const e=i.time,s=t+this._rightOffset-e,r=this._width-(s+.5)*this._barSpacing-1;i.time=r}}timedValuesToCoordinates(e,t,i){var s,r;const n=this.baseIndex()+this._rightOffset,o=this._width-n*this._barSpacing-.5*this._barSpacing-1,a=null!==(s=null==t?void 0:t.startItemIndex)&&void 0!==s?s:0;let l=a;const c=null!==(r=null==t?void 0:t.endItemIndex)&&void 0!==r?r:e.length;!0===i&&(l=(0,v.upperbound)(e,We.UNPLOTTABLE_TIME_POINT_INDEX,((e,t)=>e{void 0!==t&&t(),this._requestMoreData()};if(e){const e=this._rightOffset,t=this.maxRightOffset();t>0&&i>t&&(i=t);const r=this._model;(0,Ze.doAnimate)({from:e,to:i,duration:1e3,easing:ke.easingFunc.easeInOutQuint,onComplete:s,onStep:(e,t)=>{this._visibleBarsInvalidated=!0,this._updateRightOffset(t),this._onScroll.fire(),r.recalculateAllPanes((0,W.viewportChangeEvent)()),r.lightUpdate(),r.recalcVisibleRangeStudies()}})}else this._visibleBarsInvalidated=!0,this._updateRightOffset(i),this._onScroll.fire(),s()}scrollToFirstBar(){this._model.gotoTime(new Date("1800-01-01").getTime()),this._onScroll.fire()}scrollToOffsetAnimated(e,t){if(!isFinite(e))throw new RangeError("offset is required and must be finite number");const i=void 0===t?400:t -;if(!isFinite(i)||i<=0)throw new RangeError("animationDuration (optional) must be finite positive number");const s=this._rightOffset,r=Date.now(),n=()=>{this._visibleBarsInvalidated=!0;const t=(Date.now()-r)/i;if(t>=1)return this._updateRightOffset(e),this._visibleBarsInvalidated=!0,this._model.recalculateAllPanes((0,W.viewportChangeEvent)()),void this._model.lightUpdate();const o=s+(e-s)*t;this._updateRightOffset(o),this._model.recalculateAllPanes((0,W.viewportChangeEvent)()),setTimeout(n,20)};n()}defaultRightOffset(){return this._defaultRightOffset}rightOffsetDefaultValue(){return 10}defaultRightOffsetPercentage(){return this._defaultRightOffsetPercentage}usePercentageRightOffset(){return this._usePercentageRightOffset}barSpacing(){return this._barSpacing}setBarSpacing(e){Number.isFinite(e)?(e=this.getValidBarSpacing(e),this._tryToUpdateBarSpacing(this._barSpacing,e)&&(this.correctOffset(),this._options.preserveBarSpacing&&((0,x.saveDefaultProperties)(!0),this._scalesProperties.childs().barSpacing.setValue(this._barSpacing),(0,x.saveDefaultProperties)(!1)),this._model.recalculateAllPanes((0,W.viewportChangeEvent)()),this._model.lightUpdate())):it.logWarn(`setBarSpacing: invalid argument: ${e}`)}barSpacingChanged(){return this._barSpacingChanged}getValidBarSpacing(e){return null==e&&(e=this.barSpacing()),ethis.maxBarSpacing()?this.maxBarSpacing():e}isValidBarSpacing(e){return e>=this.minBarSpacing()&&e<=this.maxBarSpacing()}preserveBarSpacing(){return this._options.preserveBarSpacing}normalizeBarIndex(e){let t=0,i=0;const s=this.baseIndex(),r=(0,n.ensureNotNull)(this._points.range().value()).firstIndex;return es?(t=(0,n.ensureNotNull)(this._points.valueAt(s)),i=e-s):(t=(0,n.ensureNotNull)(this._points.valueAt(e)),i=0),{time_t:t,offset:i}}denormalizeTimePoint(e){const t=this._points.indexOf(e.time_t,!1);if(null!==t)return t+e.offset}rightOffset(){return this._rightOffset}rightOffsetChanged(){return this._rightOffsetChanged}minRightOffset(){var e;const t=null===(e=this.points().range().value())||void 0===e?void 0:e.firstIndex,i=this._baseIndex;if(void 0===t||null===i)return null;if(null!==this._leftEdgeIndex){const e=this.width()/this._barSpacing;return this._leftEdgeIndex-i+e-1}return t-i-1+tt}maxRightOffset(){return this.width()/this._barSpacing-tt}maxRightOffsetChanged(){return this._maxRightOffsetChanged}onReset(){return this._resetDelegate}scrollStartPoint(){return this._scrollStartPoint}baseIndex(){return this._baseIndex||0}zoom(e,t,i){if(!Number.isFinite(e)||!Number.isFinite(t))return void it.logWarn(`zoom: invalid arguments: ${e}, ${t}, ${i}`);const s=this.rightOffset(),r=void 0!==i?!i:this._options.rightBarStaysOnScroll,n=r&&this.usePercentageRightOffset().value()&&s>=0,o=n?this.barIndexLengthToPercents(s):void 0,a=this.coordinateToIndex(e),l=this.barSpacing(),c=l+t*(l/10);this.setBarSpacing(c),r||this.setRightOffset(s-.5+(a-this._coordinateToFloatIndex(e))), -n&&void 0!==o&&this.setRightOffset(this.percentsToBarIndexLength(o)),this._requestMoreData()}zoomToBarsRange(e,t){if(null!==this._leftEdgeIndex&&(e=Math.max(e,this._leftEdgeIndex)),t<=e)return;const i=this.baseIndex(),s=this._rightOffset;this._rightOffset=t-i;const r=Math.max(t-e+1,tt);this.setBarSpacing(this.width()/r),this._visibleBarsInvalidated=!0,this.correctOffset(),this._rightOffset!==s&&this._rightOffsetChanged.fire(this._rightOffset),this._requestMoreData()}coordinateToIndex(e){return Math.ceil(this._coordinateToFloatIndex(e))}coordinateToVisibleIndex(e){let t;if(0===e){const e=this._coordinateToFloatIndex(-1);t=Math.floor(e)+1}else t=this.coordinateToIndex(e);const i=this.visibleBarsStrictRange();return null===i||i.contains(t)||(t=Math.min(Math.max(i.firstBar(),t),i.lastBar())),t}canZoomIn(){return this.barSpacing()this._options.minBarSpacing}minBarSpacing(){return this._options.minBarSpacing}maxBarSpacing(){const e=this.width();return et?e:e/tt}minVisibleBarCount(){return tt}resetRightOffset(){this.setRightOffset(this.targetDefaultRightOffset())}reset(){this._visibleBarsInvalidated=!0,this._points.clear(),this._scrollStartPoint=null,this._scaleStartPoint=null,this._clearCommonTransitionsStartState(),this._tickMarks.reset(),this._leftEdgeIndex=null,this._resetDelegate.fire(),this.disconnect()}disconnect(){this._requestingMoreData=!1,this._requestedTickmarksCount=0,this._endOfData=!1}setBaseIndex(e){Number.isFinite(e)?(this._visibleBarsInvalidated=!0,this._baseIndex=e,this.correctOffset()):it.logDebug(`setBaseIndex: invalid argument: ${e}`)}resetBaseIndex(){this._visibleBarsInvalidated=!0,this._baseIndex=null}setRightOffset(e){Number.isFinite(e)?(this._visibleBarsInvalidated=!0,this._updateRightOffset(e)):it.logWarn(`setRightOffset: invalid argument: ${e}`)}correctBarSpacing(){this.isEmpty()||this.points().size()e&&(this._rightOffset=e,this._visibleBarsInvalidated=!0);const t=this.minRightOffset();null!==t&&this._rightOffsetthis.formatLabelImpl(e,t))),this._formattedBySpan.set(i,s)),s.format(new Date(e))}formatLabelImpl(e,t){if(!(e&&e instanceof Date))return"incorrect time";const s=function(e,t){if(e{ -e.onChanged().subscribe(null,(t=>this._onChanged.fire(e.id,t)))}))}groups(){return this._groups.filter((e=>e.isActualSymbol()))}groupsForAllSymbols(){return this._groups}createGroup(e,t,i){t=t||this._generateNextName();const s=new at.LineToolsGroup(e,t,i);this._groups.push(s),s.onChanged().subscribe(null,(e=>this._onChanged.fire(s.id,e)));const r={visibilityChanged:!1,lockedChanged:!1,titleChanged:!1,isActualIntervalChanged:!1,affectedLineTools:e.map((e=>e.id()))};return this._onChanged.fire(s.id,r),s}addGroup(e){this._groups.push(e),e.onChanged().subscribe(null,(t=>this._onChanged.fire(e.id,t))),this._onChanged.fire(e.id)}removeGroup(e){const t=this._groups.findIndex((t=>t.id===e.id));this._groups.splice(t,1),this._onChanged.fire(e.id)}groupForId(e){return this._groups.find((t=>t.id===e))||null}groupForLineTool(e){return this._groups.find((t=>t.containsLineTool(e)))||null}removeLineTools(e){const t=new Set;this._groups.forEach((i=>{const s=e.filter(i.containsLineTool.bind(i));s.length&&(i.excludeLineTools(s),t.add(i.id))}));return this._groups.filter((e=>0===e.lineTools().length)).forEach((e=>this.removeGroup(e))),Array.from(t)}state(e){return{groups:(e?this._groups.filter((e=>e.isActualSymbol())):this._groups).map((e=>e.state()))}}onChanged(){return this._onChanged}fireChangedAll(){this._groups.forEach((e=>{this._onChanged.fire(e.id)}))}static fromState(e,t){const i=[];for(const s of t.groups){const t=at.LineToolsGroup.fromState(e,s);null!==t&&i.push(t)}return new lt(i)}_generateNextName(){const e=new Set(this.groups().map((e=>e.name())));for(let t=1;;t++){const i=`Group ${t}`,s=`Group_${t}`;if(!e.has(i)&&!e.has(s))return i}}}var ct=i(14948),ht=i(32769),dt=i.n(ht),ut=i(69228);let pt=null;function _t(e){return Boolean(e.symbolInfo.timezone)&&Boolean(e.symbolInfo.session)}class mt{constructor(e,t){var i,s;this._sourceTargetBarBuilder=null,this._cache=new Map,this._source=e,this._sourceSession=ut.SessionInfo.fromState(e.session),this._target=t,this._targetSession=ut.SessionInfo.fromState(t.session),this._isResolutionTheSame=T.Interval.isEqual(e.resolution,t.resolution),this._isSessionTheSame=(i=e.symbolInfo,s=t.symbolInfo,i.timezone===s.timezone&&i.session===s.session&&i.session_holidays===s.session_holidays&&i.corrections===s.corrections),this._shouldCorrectTradingDay=T.Interval.isDWM(e.resolution)&&!this._isSessionTheSame}sourceTimeToTargetTime(e){if(this._isSessionTheSame&&this._isResolutionTheSame)return e;if(!_t(this._source)||!_t(this._target))return e;let t=this._cache.get(e);if(void 0===t){let i=1e3*e;if(this._shouldCorrectTradingDay){let e=dt().utc_to_cal(this._sourceSession.timezone,i);e=this._sourceSession.spec.correctTradingDay(e);const t=new Date(e);dt().set_hms(t,0,0,0,0,this._sourceSession.timezone),i=t.valueOf()}const s=this._sourceTargetBuilder();s.moveTo(i);const r=s.indexOfBar(i);t=s.startOfBar(Math.max(0,r))/1e3,this._cache.set(e,t)}return t}_sourceTargetBuilder(){if(null===this._sourceTargetBarBuilder){ -const e=this._isSessionTheSame?this._targetSession:(null===pt&&(pt=new ut.SessionInfo("Etc/UTC","24x7")),pt);this._sourceTargetBarBuilder=(0,ut.newBarBuilder)(this._target.resolution,this._targetSession,e)}return this._sourceTargetBarBuilder}}var gt=i(76076),ft=i(38031),vt=i(27642),St=i(4978);function yt(e,t){return e.codet.code?1:0}class bt{constructor(e){this._convertibleItems=e,this._idsToItems=new Map;for(const t of e)this._idsToItems.set(t.id,t)}convertible(e){return void 0!==this._idsToItems.get(e)}item(e){var t;return null!==(t=this._idsToItems.get(e))&&void 0!==t?t:null}size(){return this._convertibleItems.length}filterConvertible(e,t){const i=this._convertibleItems.filter(function(e,t){return i=>!e.has(i.id)&&t(i.id)}(e,t));return i.sort(yt),i}}class wt{constructor(e){this._allGroups=new Set,this._idToName=new Map,this._idToDescription=new Map,this._groupedUnitIds=new Map,this._groupedUnits=new Map,this._groupById=new Map,this._size=0,this._units=e;for(const t in e)if(e.hasOwnProperty(t)){this._allGroups.add(t),this._groupedUnitIds.set(t,new Set(e[t].map((e=>e.id)))),this._groupedUnits.set(t,e[t]);for(const i of e[t])this._size++,this._idToName.set(i.id,i.name),this._idToDescription.set(i.id,i.description),this._groupById.set(i.id,t)}}unitsChanged(e){return this._units!==e}size(){return this._size}name(e){return this._idToName.get(e)||e}description(e){return this._idToDescription.get(e)||e}unitGroupById(e){return this._groupById.get(e)||null}allGroups(){return new Set(this._allGroups)}unitsByGroups(e){const t=[];return e.forEach((e=>{const i=this._groupedUnits.get(e);void 0!==i&&t.push({name:e,units:i})})),t}convertible(e,t){for(const i of t){const t=this._groupedUnitIds.get(i);if(void 0!==t&&t.has(e))return!0}return!1}}var Ct=i(50335);class Pt{constructor(e){this._source=null,this._sourcePane=null,this._currentToolSupportsPhantomMode=!1,this._model=e}destroy(){this._source=null,this._sourcePane=null}source(){return this._source}onToolChanged(){this._removeSource();const e=this._model.currentTool();this._currentToolSupportsPhantomMode=(0,S.isLineToolName)(e)&&(0,S.supportsPhantomMode)(e)}onCursorPositionUpdated(){if(!this._currentToolSupportsPhantomMode)return;const e=this._model.crossHairSource();if(this._sourcePane!==e.pane&&this._removeSource(),null===e.pane||!(0,Ct.isNumber)(e.index)||!(0,Ct.isNumber)(e.price))return void this._removeSource();const t={index:e.index,price:e.price};null!==this._source?this._source.setPoint(0,t):(this._source=this._model.createLineTool(e.pane,t,this._model.currentTool(),void 0,null),this._sourcePane=e.pane)}_removeSource(){null!==this._source&&(this._model.removeSource(this._source),this._source=null,this._sourcePane=null)}}var Tt=i(45673),xt=i(64810),It=i(71248);class Mt{constructor(){this._lastValue=null}align(e,t,i){this._lastValue=null;let s=e;if(!(0,It.magnetEnabled)().value())return s;const r=i.mainDataSource();if(null===r)return s;const o=r.model().mainSeries();if(r!==o)return s;const a=o.priceScale();if(a.isEmpty())return s;const l=function(e,t){ -const i=e.bars().valueAt(t);if(null===i)return;let s;s=null!==e.priceSource()?[e.barFunction()(i)]:12===e.style()?[i[2],i[3]]:[i[1],i[2],i[3],i[4]];return s}(o,t);if(!l)return s;const c=(0,n.ensure)(o.firstValue()),h=l.map((e=>({y:a.priceToCoordinate(e,c),price:e}))),d=a.priceToCoordinate(e,c);h.sort(((e,t)=>Math.abs(e.y-d)-Math.abs(t.y-d)));const u=h[0];return((0,It.magnetMode)().value()===xt.MagnetMode.StrongMagnet||Math.abs(u.y-d)<50)&&(s=u.price,this._lastValue=s),s}lastValue(){return this._lastValue}resetLastValue(){this._lastValue=null}}var At=i(8950),Lt=i(80230),kt=i(9740);class Et{constructor(){this._data=null}setData(e){this._data=e}draw(e,t){if(null===this._data)return;const i=t.pixelRatio,s=Math.max(1,Math.floor(i));e.lineWidth=s;const r=Math.ceil(this._data.h*i),n=Math.ceil(this._data.w*i);if(e.save(),e.lineCap="butt",this._data.vertLinesVisible){e.strokeStyle=this._data.vertLinesColor,(0,kt.setLineStyle)(e,this._data.vertLineStyle);for(const t of this._data.timeMarks){const s=Math.round(t.coord*i);(0,kt.drawVerticalLine)(e,s,0,r)}}if(this._data.horzLinesVisible){e.strokeStyle=this._data.horzLinesColor,(0,kt.setLineStyle)(e,this._data.horzLineStyle);for(const t of this._data.priceMarks){const s=Math.round(t.coord*i);(0,kt.drawHorizontalLine)(e,s,0,n)}}e.restore()}hitTest(e){return null}}var Dt=i(53479);class Vt{constructor(e){this._renderer=new Et,this._pane=e}update(){}renderer(){const e=this._pane.defaultPriceScale(),t=this._pane.model().timeScale();if(e.isEmpty()||t.isEmpty())return null;const i=this._pane.model().properties().childs().paneProperties.childs(),s=t.marks(),r={horzLinesVisible:!0,vertLinesVisible:!0,horzLinesColor:i.horzGridProperties.childs().color.value(),vertLinesColor:i.vertGridProperties.childs().color.value(),horzLineStyle:Dt.LINESTYLE_SOLID,vertLineStyle:Dt.LINESTYLE_SOLID,priceMarks:e.marks(),timeMarks:null!==s?s:[],w:this._pane.width(),h:this._pane.height()};return this._renderer.setData(r),this._renderer}}class Bt extends Lt.DataSource{id(){return"grid"}paneViews(e){return[new Vt(e)]}}var Rt=i(67876);class Nt extends Rt.PriceAxisView{constructor(e,t,i){super(),this._source=e,this._priceScale=t,this._priceProvider=i,this._properties=e.model().properties().childs().scalesProperties}setHitTestData(e){this._hitTestData=e}additionalPadding(e){return 0}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const s=this._priceScale,r=s.mainSource(),n=null!==r?r.firstValue():null;if(!this._isVisible()||s.isEmpty()||null===n)return;const o=this._priceProvider(s);if(null===o)return;i.background=(0,ft.resetTransparency)(this._bgColor()),i.textColor=this.generateTextColor(i.background);const a=this.additionalPadding(s.fontSize());i.additionalPaddingTop=a,i.additionalPaddingBottom=a,i.coordinate=s.priceToCoordinate(o,n),e.text=s.formatPrice(o,n),e.visible=!0,t.visible=!0,t.hitTestData=this._hitTestData}}class Ot extends Nt{additionalPadding(e){return 2/12*e}_isVisible(){return this._properties.childs().showPriceScaleCrosshairLabel.value()&&this._source.visible&&null!==this._source.pane} -_bgColor(){const e=this._properties.childs();return this._source.model().isDark()?e.crosshairLabelBgColorDark.value():e.crosshairLabelBgColorLight.value()}_updateRendererData(e,t,i){const s=t.visible;super._updateRendererData(e,t,i),this._source.isHovered()?t.backgroung=this._source.model().isDark()?l.colorsPalette["color-cold-gray-600"]:l.colorsPalette["color-cold-gray-650"]:t.backgroung=void 0,s||(t.visible=s)}}class Ft extends Nt{_isVisible(){return null!==this._source.measurePane().value()}_bgColor(){return this._properties.childs().axisLineToolLabelBackgroundColorCommon.value()}}var Wt=i(64636),Ht=(i(43986),i(60223));function zt(e){const t=e.priceScale();return null===t?0:t.isPercentage()||t.isIndexedTo100()?2:1}const Ut=N.enabled("show_context_menu_in_crosshair_if_only_one_item");class jt extends Wt.PanePriceAxisView{constructor(e,t,i,s,r){super(e,t,s),this._crossHairMenuCachedState=null,this._hasActions=!1,this._tooltipText=null,this._gaOrigin="CH menu",this._crosshairPriceAxisView=e,e.setPaneRendererLabelIcon(0),this._crosshair=t,this._scale=i,this._options=r}_updateImpl(e,t){super._updateImpl(e,t);const i=this._crosshair.y,s=this._chartModel.properties().childs().scalesProperties.childs().fontSize.value(),r=this._chartModel.timeScale().width(),n=this._crosshair.model().priceAxisRendererOptions(),o=s+2*this._crosshairPriceAxisView.additionalPadding(s)+n.paddingTop+n.paddingBottom,a=o,l=i-o/2,c=r-a,h=this._crosshair.pane,d=this._mainDataSourceOnPane(),u=d&&d.symbolSource(),p=!!u&&(u.isConvertedToOtherCurrency()||u.isConvertedToOtherUnit());if(null!==d){const e=zt(d),t=d.idForAlert(),i=this._chartModel.isInReplay(),s=this._crossHairMenuCachedState;null!==s&&s.id===t&&s.priceScale===e&&s.isCurrencyOrUnitConverted===p&&s.isInReplay===i||(this._updateTooltipAndActionsAvaliability(d,e,p),this._crossHairMenuCachedState={id:t,priceScale:e,isCurrencyOrUnitConverted:p,isInReplay:i})}const _=null!==d&&(0,pe.isActingAsSymbolSource)(d)?d.symbol():null,m=null!==h&&(h.maximized().value()||!h.collapsed().value())&&(Boolean(_)||!1);this._crosshairPriceAxisView.setPaneLabelVisible(m);const g=null!==h&&0!==h.leftPriceScales().length&&m,f=null!==h&&0!==h.rightPriceScales().length&&m,v=r-a/2,S=this._tooltipText?{text:this._tooltipText,rect:{x:v,y:l,w:0,h:0}}:void 0;this._data={left:g,right:f,xl:0,xr:c,y:l,containerWidth:a,containerHeight:o,clickHandler:this._handleClick.bind(this),tooltip:S},this._crosshairPriceAxisView.setHitTestData(this._data)}_priceScale(){return this._scale}_updateTooltipAndActionsAvaliability(e,t,i){this._tooltipText=null,this._hasActions=!1;if(!(1===t))return;this._chartModel.isInReplay();let s=0;let r=0;1!==s||Ut||(this._tooltipText=""),this._crosshairPriceAxisView.setPaneRendererLabelIcon(r),this._hasActions=0!==s}_handleClick(e,t,i){(0,u.trackEvent)(this._gaOrigin,"click");const s=this._mainDataSourceOnPane(),r=null!==s&&(0,pe.isActingAsSymbolSource)(s)?s.symbol():null,n={pageX:i.pageX,pageY:i.pageY,clientX:i.clientX,clientY:i.clientY,screenX:i.screenX,screenY:i.screenY,price:this._crosshair.price, -symbol:r};_.emit("onPlusClick",n)}_getMenuItems(e){return Promise.resolve([])}_createAlertMenuItems(e){return Promise.resolve([])}_createTradingMenuItems(){return Promise.resolve([])}_createAddHorizontalLineMenuItem(){return[]}_getActionAddAlert(e){return null}_getActionAddHorizontalLine(e){return null}_getValue(e,t){const i=e.priceScale(),s=e.firstValue();if(null===i||null===s)return null;return i.isPercentage()||i.isIndexedTo100()?null:i.coordinateToPrice(t,s)}_formatValue(e,t){return t.formatter().format(e)}_addAlert(e,t){}_addHorizontalLineTool(e,t){}_showContextMenu(e,t,i,s){const r="left"===s;setTimeout((()=>{const t=(0,n.ensureDefined)(this._data),s=r?t.xl:t.xr,o=i.localX-s,a=i.clientX-o,l=i.clientX-o+t.containerWidth;Ht.ContextMenuManager.showMenu(e,{clientX:r?a:l,clientY:i.clientY-t.containerHeight/2,boxHeight:t.containerHeight,attachToXBy:r?"left":"right",attachToYBy:"auto-strict"},void 0,{menuName:"CrosshairMenuView"})}))}_mainDataSourceOnPane(){const e=this._crosshair.pane;return null!==e?e.mainDataSource():null}}var Gt=i(78996),qt=i(14888);class $t{constructor(e){this._data=e}hitTest(e){return void 0===this._data.clickHandler?null:new qt.HitTestResult(qt.HitTestResult.CUSTOM,{clickHandler:this._data.clickHandler,tapHandler:this._data.clickHandler})}draw(e,t){const i=t.pixelRatio,s=this._data.vertLinesVisible,r=this._data.horzLinesVisible;if(!s&&!r)return;e.save(),e.lineWidth=Math.max(1,Math.floor(this._data.lineWidth*i)),e.strokeStyle=this._data.color,e.fillStyle=this._data.color,e.lineCap="butt",(0,kt.setLineStyle)(e,this._data.lineStyle);const n=Math.round(this._data.x*i),o=Math.round(this._data.y*i),a=Math.ceil(this._data.w*i),l=Math.ceil(this._data.h*i);s&&n>=0&&(0,kt.drawVerticalLine)(e,n,0,l),r&&o>=0&&(0,kt.drawHorizontalLine)(e,o,0,a),this._data.drawCenter&&(e.beginPath(),e.arc(n,o,Math.round(3*i),0,2*Math.PI,!0),e.fillStyle=this._data.color,e.fill()),this._data.scissors&&function(e,t,i,s){const{pixelRatio:r,physicalHeight:n}=t,o=24*r,a=e.lineWidth%2?.5:0,l=i-Math.round(o/2)+a/r;let c=Math.round(s-o/2);if(c<0)c=0;else{const e=n-o;c>e&&(c=e)}e.translate(l,c),e.scale(r,r),e.fillStyle="#131722",e.fill(Yt),e.strokeStyle="#fff",e.lineWidth=1,e.stroke(Yt)}(e,t,n,o),e.restore()}}const Yt=new Path2D("m15.68 3.72-3.82 5.52-3.83-5.52-.28-.42-.42.3a2.84 2.84 0 0 0-.68 3.92l3.27 4.73-1.16 1.68a3.34 3.34 0 0 0-4.26 3.22 3.34 3.34 0 0 0 3.32 3.35 3.34 3.34 0 0 0 3.08-4.6l1-1.44 1.13 1.62a3.34 3.34 0 0 0 3.15 4.42c1.84 0 3.32-1.5 3.32-3.35a3.34 3.34 0 0 0-4.42-3.17l-1.23-1.78 3.22-4.65a2.86 2.86 0 0 0-.69-3.96l-.41-.29-.29.42ZM7.82 16.27c.47 0 .86.39.86.88 0 .48-.39.87-.86.87a.87.87 0 0 1-.86-.87c0-.5.4-.88.86-.88Zm8.36 0c.47 0 .86.39.86.88 0 .48-.4.87-.86.87a.87.87 0 0 1-.86-.87c0-.5.39-.88.86-.88Z");const Kt=l.colorsPalette["color-tv-blue-500"];class Xt{constructor(e,t){this._rendererData={},this._renderer=new $t(this._rendererData),this._source=e,this._pane=t}update(){}renderer(e,t){ -const i=this._source.selectPointMode().value()!==gt.SelectPointMode.None,s=this._source.visible&&(this._source.areLinesVisible||i)&&!this._source.linesShouldBeHidden(),r=this._rendererData;if(!s||null===this._pane)return null;const o=this._source.paneForPointSelect(),a=this._source.isReplaySelection(),l=this._pane===this._source.pane,c=a||(null!==o?this._source.pane===o&&this._pane===o:l);if(r.scissors=!1,i&&this._source.isOnHoveredChartWidget()&&c){const e=(0,n.ensureNotNull)(this._source.pointToSelect());r.color=this._source.lineColor()||Kt,a?(r.lineWidth=2,r.scissors=l):r.lineWidth=1,r.lineStyle=Dt.LINESTYLE_SOLID,r.horzLinesVisible=!0,r.vertLinesVisible=!0,r.drawCenter=!1,"time"===e?r.horzLinesVisible=!1:"price"===e&&(r.vertLinesVisible=!1)}else{const e=this._source.properties(),t=this._source.model().currentTool(),i=(0,Gt.lastMouseOrTouchEventInfo)(),s=i.isTouch&&!i.stylus&&((0,S.isLineToolName)(t)||(0,gt.toolIsMeasure)(t));let n;n=s?Kt:e.childs().color.value();const o=e.childs().transparency.value();!s&&o>0&&(n=(0,ft.generateColor)(n,o)),r.color=n,r.horzLinesVisible=this._pane===this._source.pane&&(this._pane.maximized().value()||!this._pane.collapsed().value()),r.vertLinesVisible=!0,r.lineWidth=e.childs().width.value(),r.lineStyle=e.childs().style.value(),r.drawCenter=s&&this._pane===this._source.pane}return r.w=this._pane.width(),r.h=this._pane.height(),r.x=void 0!==this._source.lockedX&&isFinite(this._source.lockedX)?this._source.lockedX:this._source.x,r.y=this._source.y,this._renderer}}var Zt=i(26740);const Jt={backgroundColor:(0,ft.generateColor)(l.colorsPalette["color-tv-blue-500"],70),borderColor:(0,ft.generateColor)(l.colorsPalette["color-tv-blue-500"],20)};class Qt{constructor(e){this._renderer=new Zt.RectangleRenderer,this._rectangle=null,this._crosshair=e}update(){const e=this._crosshair.selection();null!==e&&null!==this._crosshair.pane?this._rectangle=this._crosshair.pane.logicalRectToPixels(e):this._rectangle=null}renderer(e,t){if(!this._rectangle)return null;const i={backcolor:Jt.backgroundColor,color:Jt.borderColor,fillBackground:!0,linewidth:1,points:[this._rectangle.min,this._rectangle.max],extendLeft:!1,extendRight:!1};return this._renderer.setData(i),this._renderer}}var ei=i(80142),ti=i(18766),ii=i(68336),si=i(45063),ri=i(48566),ni=i(9933),oi=i(44381),ai=i(29639),li=i(85113);const ci=c.t(null,void 0,i(33355)),hi=c.t(null,{context:"study"},i(32819)),di=new ti.PercentageFormatter,ui=new si.TimeSpanFormatter,pi=new ri.VolumeFormatter,_i=(0,l.getHexColorByName)("color-tv-blue-500"),mi=(0,l.getHexColorByName)("color-ripe-red-400"),gi={bgColorPositive:(0,ft.generateColor)(_i,80),bgColorNegative:(0,ft.generateColor)(mi,80),colorPositive:(0,l.getHexColorByName)("color-tv-blue-600"),colorNegative:(0,l.getHexColorByName)("color-ripe-red-400"),labelBgColorPositive:_i,labelBgColorNegative:mi};class fi{constructor(e,t){this._pipFormatter=null,this._lastSymbolInfo=null,this._horzTrenRenderer=new ni.TrendLineRenderer,this._vertTrenRenderer=new ni.TrendLineRenderer,this._bgRenderer=new Zt.RectangleRenderer, -this._labelRenderer=new oi.TextRenderer,this._p1=null,this._p2=null,this._label=null,this._source=e,this._pane=t}update(e){const[t,i]=this._source.measurePoints();if(void 0===i)return this._p1=null,void(this._p2=null);const s=(0,n.ensureNotNull)(this._source.measurePane().value()),r=t.price,a=i.price,l=i.price-r,c=i.index-t.index,h=(0,ei.forceLTRStr)(""+c),d=(0,n.ensureNotNull)(s.mainDataSource());let u=(0,n.ensureNotNull)(d.formatter()).format(l);if(Math.abs(r)>1e-8){const e=l/Math.abs(r);u+=" ("+di.format(100*e)+")"}const p=(0,ei.forceLTRStr)(u);this._label=p+"\n"+ci.format({count:h});const _=(0,n.ensureNotNull)(d.firstValue()),m=this._source.model().timeScale().indexToCoordinate(t.index),g=this._source.model().timeScale().indexToCoordinate(i.index),f=s.defaultPriceScale().priceToCoordinate(r,_),v=s.defaultPriceScale().priceToCoordinate(a,_);this._p1=new o.Point(m,f),this._p2=new o.Point(g,v);const S=this._source.model().timeScale().indexToUserTime(t.index),y=this._source.model().timeScale().indexToUserTime(i.index);let b=null;if(null!==S&&null!==y){const e=this._pane.model().mainSeries().symbolInfo();null!==e&&e!==this._lastSymbolInfo&&(this._pipFormatter=new ii.PipFormatter(e.pricescale,e.minmov,e.type,e.minmove2),this._lastSymbolInfo=e),b=(y.valueOf()-S.valueOf())/1e3}const w=this._pipFormatter?this._pipFormatter.format(l):null,C=null!==w?" , "+w:"",P=null!==b?ui.format(b):null,T=null!==P?", "+(0,ei.startWithLTR)(P):"";this._label=(0,ei.forceLTRStr)(p+C)+"\n"+ci.format({count:h})+T;const x=this._source.measureVolume();Number.isNaN(x)||(this._label+=`\n${hi} ${pi.format(x)}`);const I=a=50?li.LineEnd.Arrow:li.LineEnd.Normal};this._horzTrenRenderer.setData(s)}{const e=Math.round(E.x),t=new o.Point(e,this._p1.y),i=new o.Point(e,this._p2.y),s={points:[t,i],color:M,linewidth:1,linestyle:Dt.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:li.LineEnd.Normal,rightend:Math.abs(t.y-i.y)>=50?li.LineEnd.Arrow:li.LineEnd.Normal};this._vertTrenRenderer.setData(s)}const D={x:0,y:10},V=.5*(this._p1.x+this._p2.x),B=this._p2.y,R=new o.Point(V,B),N=(O=(0,n.ensureNotNull)(this._label),{points:[R],text:O,color:"#FFFFFF",horzAlign:"center",vertAlign:"middle",font:L.CHART_FONT_FAMILY,offsetX:D.x,offsetY:D.y,bold:!1,italic:!1,fontsize:12,padding:8,highlightBorder:!1,backgroundColor:A,backgroundTransparency:10,backgroundVertInflate:5,backgroundHorzInflate:5,backgroundRoundRect:4});var O;this._labelRenderer.setData(N);const F=this._labelRenderer.measure(),W=(0, -oi.calculateLabelPosition)(F,this._p1,this._p2,D,this._pane.height());this._labelRenderer.setPoints([W])}renderer(){if(null===this._p1||null===this._p2)return null;const e=new ai.CompositeRenderer;return e.append(this._bgRenderer),e.append(this._horzTrenRenderer),e.append(this._vertTrenRenderer),e.append(this._labelRenderer),e}}var vi=i(86216);class Si extends vi.MediaCoordinatesPaneRenderer{constructor(e){super(),this._data=e}hitTest(e){return null}_drawImpl(e){const t=e.context;t.translate(this._data.x-this._data.width/2,this._data.y-this._data.height/2),t.strokeStyle="rgba(153,153,153,.3)",t.lineWidth=2,t.beginPath(),this._drawShackle(t),t.stroke(),t.closePath(),t.strokeStyle="rgba(153,153,153,.7)",t.lineWidth=1,t.beginPath(),t.rect(0,this._data.height-this._data.bodyHeight+.5,this._data.width,this._data.bodyHeight),t.closePath(),t.stroke(),t.translate(0,-1),t.strokeStyle="#777",t.beginPath(),this._drawShackle(t),t.stroke(),t.closePath(),t.fillStyle="rgba(255,255,255,.7)",t.beginPath(),t.rect(1,this._data.height-this._data.bodyHeight+1.5,this._data.width-2,this._data.bodyHeight-2),t.fill(),t.beginPath(),t.rect(.5,this._data.height-this._data.bodyHeight+1,this._data.width-1,this._data.bodyHeight-1),t.stroke(),t.closePath(),t.fillStyle="#777",t.fillRect(this._data.width/2-.5,this._data.height-this._data.bodyHeight/2,1,2)}_drawShackle(e){const t=(this._data.width-3)/2,i=this._data.height-this._data.bodyHeight;e.moveTo(1.5,t),e.arc(this._data.width/2,t,t,Math.PI,2*Math.PI),i>t&&(e.moveTo(1.5,t),e.lineTo(1.5,i),e.moveTo(this._data.width-1.5,t),e.lineTo(this._data.width-1.5,i))}}class yi{constructor(e,t,i){this._horzVisible=!1,this._source=e,this._pane=t,this._axis=i||"x"}update(){}renderer(e,t){const i=this._source.visible&&this._source.areLinesVisible,s=(0,gt.lockTimeAxis)().value(),r=i&&this._horzVisible,o=i||s;if("y"===this._axis&&!r||!o)return null;const a="y"===this._axis?this._pane.width()-4.5:(0,n.ensureDefined)(this._source.lockedX)+1,l="y"===this._axis?this._source.y:this._pane.height()-5.5-1;return new Si({x:a,y:l,width:9,height:11,bodyHeight:7})}}var bi=i(49483),wi=i(87172),Ci=i(95790),Pi=i(2);class Ti extends Ci.DataWindowView{constructor(e){super(),this._invalidated=!0,this._dateItem=new Ci.DataWindowItem("",c.t(null,void 0,i(76912)),""),this._timeItem=new Ci.DataWindowItem("",c.t(null,void 0,i(31976)),""),this._model=e,this._items.push(this._dateItem),this._items.push(this._timeItem)}update(){this._invalidated=!0}items(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items}_updateImpl(){const e=this._model.mainSeries().isDWM();if(this._timeItem.setVisible(!e),this._timeItem.setValue(Pi.notAvailable),this._dateItem.setValue(Pi.notAvailable),this._model.timeScale().isEmpty())return;let t=this._model.crossHairSource().appliedIndex();if(!(0,Ct.isNumber)(t)){const e=this._model.mainSeries().data().last();if(null===e)return;t=e.index}const i=this._model.timeScale().indexToUserTime(t);null!==i&&(this._dateItem.setValue(this._model.dateFormatter().format(i)), -e||this._timeItem.setValue(this._model.timeFormatter().format(i)))}}var xi=i(2893);const Ii=l.colorsPalette["color-tv-blue-500"],Mi=c.t(null,{context:"Replay"},i(20747));class Ai extends xi.TimeAxisView{constructor(e,t,i,s=!1){super(e),this._indexProvider=i,this._highlighted=s,this._source=t,this._properties=e.properties().childs().scalesProperties}_getText(e){if(this._source.isReplaySelection()){const t=this._model.timeScale().indexToUserTime(e);return null!==t?`${Mi}: ${this._model.dateTimeFormatter().format(t)}`:""}return super._getText(e)}_getBgColor(){if(this._source.isReplaySelection())return Ii;const e=this._properties.childs();return this._highlighted?e.axisLineToolLabelBackgroundColorCommon.value():this._model.isDark()?e.crosshairLabelBgColorDark.value():e.crosshairLabelBgColorLight.value()}_getIndex(){return this._model.crossHairSource().visible?this._indexProvider():null}_isVisible(){return this._properties.childs().showTimeScaleCrosshairLabel.value()}}var Li=i(67245);const ki={menuEnabled:!1,menuForMainSourceOnly:!1,disableTradingMenuActions:!1,disableDrawHorizLineMenuAction:!1};class Ei extends Lt.DataSource{constructor(e,t,i){super(),this.pane=null,this.price=NaN,this.index=NaN,this.visible=!0,this.areLinesVisible=!0,this.x=NaN,this.y=NaN,this._measurePane=new(Y())(null),this._measurePaneViewCache=new WeakMap,this._startMeasurePoint=null,this._endMeasurePoint=null,this._lastValidMeasurePoint=null,this._isOnHoveredChartWidget=!1,this._crossHairSelectPointMode=new(Y())(gt.SelectPointMode.None),this._selectionPane=null,this._selectionView=new Qt(this),this._selectionStartPoint=null,this._timeLockPaneView=null,this._crosshairPaneViewCache=new WeakMap,this._pointSelectionPaneViewCache=new WeakMap,this._priceAxisViews=new Map,this._panePriceAxisViews=new Map,this._startMeasurePriceAxisViews=new Map,this._endMeasurePriceAxisViews=new Map,this._originX=NaN,this._originY=NaN,this._subscribed=!1,this._movedDelegate=new(q()),this._pointSelectedDelegate=new(q()),this._requestedPoint=null,this._paneForRequestedPoint=null,this._selectLineColor=null,this._volumeCalculator=null,this._model=e,this._options=Object.assign({},ki,i||{}),this._linesShouldBeHidden=this._model.readOnly(),this._dataWindowView=new Ti(e),this.setSelectionEnabled(!1);const s=e=>t=>t===(0,n.ensureNotNull)(this._measurePane.value()).defaultPriceScale()?e():null;this._currentPosPriceProvider=e=>{const t=(0,n.ensureNotNull)(this.pane);if(e===t.defaultPriceScale())return this.price;const i=(0,n.ensureNotNull)(t.defaultPriceScale().mainSource()).firstValue();if(null===i)return null;const s=t.defaultPriceScale().priceToCoordinate(this.price,i),r=(0,n.ensureNotNull)(e.mainSource()).firstValue();return null===r?null:e.coordinateToPrice(s,r)},this._startMeasurePriceProvider=s((()=>(0,n.ensureNotNull)(this._startMeasurePoint).price)),this._endMeasurePriceProvider=s((()=>(0,n.ensureNotNull)(this._lastMeasurePoint()).price)),this._properties=t;this._timeAxisView=new Ai(e,this,(()=>this.appliedIndex()),!1),this._startMeasureTimeAxisView=new Ai(e,this,(()=>(0, -n.ensureNotNull)(this._startMeasurePoint).index),!0),this._endMeasureTimeAxisView=new Ai(e,this,(()=>(0,n.ensureNotNull)(this._lastMeasurePoint()).index),!0),e.readOnly()||gt.cursorTool.subscribe((e=>this.areLinesVisible="arrow"!==e),{callWithLast:!0})}destroy(){null!==this._volumeCalculator&&this._volumeCalculator.destroy(),this._measurePane.setValue(null)}moved(){return this._movedDelegate}originX(){return this._originX}originY(){return this._originY}saveOriginCoords(e,t){this._originX=e,this._originY=t}clearOriginCoords(){this._originX=NaN,this._originY=NaN}currentPoint(){return new o.Point(this.x,this.y)}model(){return this._model}appliedIndex(){return Number.isFinite(this.lockedIndex)?this.lockedIndex:this.index}startMeasurePoint(){return this._startMeasurePoint||null}endMeasurePoint(){return this._endMeasurePoint||null}measureVolume(){if(null===this._volumeCalculator)return NaN;const[e,t]=this.measurePoints();return void 0===t?NaN:this._volumeCalculator.volume(e.index,t.index)}measurePane(){return this._measurePane.readonly()}startMeasuring(e,t){this._startMeasurePoint=e,this._measurePane.setValue(t),t.containsMainSeries()&&((0,n.assert)(null===this._volumeCalculator),this._volumeCalculator=new Li.SeriesTimeRangeVolumeCalculator(this.model().mainSeries())),this._model.updatePane(t)}finishMeasure(e){this._endMeasurePoint=e}clearMeasure(){this._measurePane.setValue(null),delete this._startMeasurePoint,delete this._endMeasurePoint,delete this._lastValidMeasurePoint,this._model.lightUpdate(),null!==this._volumeCalculator&&(this._volumeCalculator.destroy(),this._volumeCalculator=null)}measurePoints(){const e=[(0,n.ensureNotNull)(this._startMeasurePoint)],t=this._lastMeasurePoint();return null!==t&&e.push(t),e}startSelection(e){this._selectionStartPoint=this.currentLogicalPoint(),this._selectionPane=e}clearSelection(){this._selectionStartPoint=null,this._selectionPane=null}selection(){return this._selectionStartPoint?{p1:this._selectionStartPoint,p2:this.currentLogicalPoint()}:null}currentLogicalPoint(){return{index:this.appliedIndex(),price:this.price}}selectPointMode(){return this._crossHairSelectPointMode}lineColor(){return this._selectLineColor}cancelRequestSelectPoint(){this._crossHairSelectPointMode.value()!==gt.SelectPointMode.None&&this._setSelectPointModeState(gt.SelectPointMode.None)}requestSelectPoint(e){(0,n.assert)(this._crossHairSelectPointMode.value()===gt.SelectPointMode.None,"Point already requested");const{pointType:t,pane:i,lineColor:s=null,selectPointMode:r=gt.SelectPointMode.Study}=e;i&&((0,n.assert)(-1!==this._model.panes().indexOf(i),"Chartmodel doesn't contains specified pane"),this._paneForRequestedPoint=i,this._model.panesCollectionChanged().subscribe(this,this._paneCollectionChanged)),this._selectLineColor=s,this._requestedPoint=t,this._setSelectPointModeState(r)}onPointSelected(){return this._pointSelectedDelegate}trySelectCurrentPoint(){const e=(0,n.ensureNotNull)(this._requestedPoint);if(!this._model.mainSeries().bars().contains(this.index)&&"price"!==e)return;const t=(0, -n.ensureNotNull)(this.pane);if(this._paneForRequestedPoint&&this._paneForRequestedPoint!==t)return;let i,s;if("price"===e||(i=this._model.timeScale().indexToTimePoint(this.index),null!==i)){if("time"!==e){const e=t.mainDataSource();if(null===e)return;const i=e.firstValue(),r=e.priceScale();if(null===i||null===r)return;s=r.coordinateToPrice(this.y,i)}this._setSelectPointModeState(gt.SelectPointMode.None),this._pointSelectedDelegate.fire({time:i,price:s},t)}}isOnHoveredChartWidget(){return this._isOnHoveredChartWidget}setOnHoveredChartWidget(e){this._isOnHoveredChartWidget=e}isReplaySelection(){return!1}clearPosition(){this.visible=!1,this.index=NaN,this.price=NaN,this.x=NaN,this.y=NaN,this.pane=null,this.clearOriginCoords(),this._updateVisibilityDependentPaneViews()}setPosition(e,t,i){return this._subscribed||(this._model.mainSeries().onRestarted().subscribe(this,this.clearMeasure),this._subscribed=!0),this.setLockedPosition(i),this.visible=!0,this._tryToUpdateViews(e,t,i)}setLinesShouldBeHidden(e){this._linesShouldBeHidden=e}linesShouldBeHidden(){return this._linesShouldBeHidden}handleContextMenuEvent(e){this._crossHairSelectPointMode.value()!==gt.SelectPointMode.None&&this._setSelectPointModeState(gt.SelectPointMode.None)}properties(){return this._properties}priceAxisViews(e,t){const i=null===this._requestedPoint||"time"!==this._requestedPoint||!this._isOnHoveredChartWidget,s=[];return this.pane===e&&i&&s.push(this._createPriceAxisViewOnDemand(this._priceAxisViews,this._panePriceAxisViews,e,t,this._currentPosPriceProvider,Ot,!0)[0]),this._startMeasurePoint&&s.push(this._createPriceAxisViewOnDemand(this._startMeasurePriceAxisViews,null,e,t,this._startMeasurePriceProvider,Ft)[0]),this._lastMeasurePoint()&&s.push(this._createPriceAxisViewOnDemand(this._endMeasurePriceAxisViews,null,e,t,this._endMeasurePriceProvider,Ft)[0]),s}timeAxisViews(){const e=[],t=null===this._requestedPoint||"price"!==this._requestedPoint||!this._isOnHoveredChartWidget;return!this._linesShouldBeHidden&&(this.visible||(0,gt.lockTimeAxis)().value())&&t&&e.push(this._timeAxisView),this._startMeasurePoint&&e.push(this._startMeasureTimeAxisView),this._lastMeasurePoint()&&e.push(this._endMeasureTimeAxisView),e}paneViews(e){if(void 0===e)return null;const t=[];if(this.isReplaySelection()){let i=this._pointSelectionPaneViewCache.get(e);i||(i=new CrosshairPointSelectionPaneView(this,e,this._model),this._pointSelectionPaneViewCache.set(e,i)),t.push(i)}let i=this._crosshairPaneViewCache.get(e);if(i||(i=new Xt(this,e),this._crosshairPaneViewCache.set(e,i)),t.push(i),e===this._selectionPane&&t.push(this._selectionView),e===this._measurePane.value()){let i=this._measurePaneViewCache.get(e);i||(i=new fi(this,e),this._measurePaneViewCache.set(e,i)),i.update((0,W.sourceChangeEvent)(this.id())),t.push(i)}if(wi.addPlusButtonProperty.value()){const i=e===this.pane,s=!bi.CheckMobile.any()||window.screen.width>=320,r=gt.tool.value(),n=(0, -S.isLineToolName)(r),o=null!==this._model.lineBeingEdited()||null!==this._model.lineBeingCreated()||this._model.sourcesBeingMoved().length>0||null!==this._model.customSourceBeingMoved()||(0,gt.toolIsMeasure)(r);if(i&&this._isOnHoveredChartWidget&&this._crossHairSelectPointMode.value()===gt.SelectPointMode.None&&s&&!n&&!o){const i=e.mainDataSource();if(null!==i){const s=i.priceScale();if(null!==s){const i=this._createPriceAxisViewOnDemand(this._priceAxisViews,this._panePriceAxisViews,e,s,this._currentPosPriceProvider,Ot,!0)[1];null!==i&&t.push(i)}}}}return(0,gt.lockTimeAxis)().value()&&(null===this._timeLockPaneView&&(this._timeLockPaneView=new yi(this,e)),t.push(this._timeLockPaneView)),t}dataWindowView(){return this._dataWindowView}updateAllViews(e){this._priceAxisViews.forEach((t=>{t.forEach((t=>t.update(e)))})),this._panePriceAxisViews.forEach((t=>{t.forEach((t=>t.update(e)))})),this._startMeasurePoint&&(this._startMeasurePriceAxisViews.forEach((t=>{t.forEach((t=>t.update(e)))})),this._startMeasureTimeAxisView.update(e)),this._lastMeasurePoint()&&(this._endMeasurePriceAxisViews.forEach((t=>{t.forEach((t=>t.update(e)))})),this._endMeasureTimeAxisView.update(e)),this._timeAxisView.update(e),this._selectionView.update(),this._dataWindowView.update(),this._updateVisibilityDependentPaneViews()}setLockedPosition(e){delete this.lockedIndex,delete this.lockedX,e!==this._measurePane.value()&&(0,gt.lockTimeAxis)().value()&&(this.lockedIndex=this._model.timeScale().points().roughIndex(gt.lockTimeAxisTime.value()),null!==this.lockedIndex&&(this.lockedX=this._model.timeScale().indexToCoordinate(this.lockedIndex)))}isMenuEnabled(){return this._options.menuEnabled}isHoveredEnabled(){return wi.addPlusButtonProperty.value()}isHovered(){return this._model.hoveredSource()===this}pointToSelect(){return this._requestedPoint}paneForPointSelect(){return this._paneForRequestedPoint}_lastMeasurePoint(){return this._endMeasurePoint?this._endMeasurePoint:(null!==this.pane&&this._measurePane.value()===this.pane&&(this._lastValidMeasurePoint={price:this._model.magnet().align(this.price,this.index,this.pane),index:this.index}),this._lastValidMeasurePoint||null)}_createPriceAxisViewOnDemand(e,t,i,s,r,o,a=!1){let l=e.get(i),c=null!==t?t.get(i):void 0;void 0===l&&(l=new Map,e.set(i,l),this._options.menuEnabled&&null!==t&&(c=new Map,t.set(i,c)),a&&i.onDestroyed().subscribe(this,(()=>this._onPaneDestroyed(i))));let h=l.get(s);if(void 0===h){if(h=new o(this,s,r),l.set(s,h),void 0!==c){const e=new jt(h,this,s,this._model,this._options);c.set(s,e)}a&&s.lastSourceRemoved().subscribe(this,(()=>this._onPriceScaleCleared(s)))}let d=null;return void 0!==c&&(d=(0,n.ensureDefined)(c.get(s))),[h,d]}_onPaneDestroyed(e){e.onDestroyed().unsubscribeAll(this),this._priceAxisViews.delete(e),this._panePriceAxisViews.delete(e),this._startMeasurePriceAxisViews.delete(e),this._endMeasurePriceAxisViews.delete(e)}_onPriceScaleCleared(e){e.lastSourceRemoved().unsubscribeAll(this),this._priceAxisViews.forEach((t=>t.delete(e))), -this._panePriceAxisViews.forEach((t=>t.delete(e))),this._startMeasurePriceAxisViews.forEach((t=>t.delete(e))),this._endMeasurePriceAxisViews.forEach((t=>t.delete(e)))}_tryToUpdateViews(e,t,i){return!!this._tryToUpdateData(e,t,i)&&(this.updateAllViews((0,W.sourceChangeEvent)(this.id())),this._movedDelegate.fire({index:this.index,price:this.price}),!0)}_tryToUpdateData(e,t,i){const s=this.x,r=this.y,o=this.price,a=this.index,l=this.pane,c=this._priceScaleByPane(i);if(this.index=e,this.x=isNaN(e)?NaN:this._model.timeScale().indexToCoordinate(e),null!==c&&null!==i){this.pane=i,this.price=t;const e=(0,n.ensureNotNull)(i.mainDataSource()).firstValue();this.y=null===e?NaN:c.priceToCoordinate(t,e)}else this.pane=null,this.price=NaN,this.y=NaN;return s!==this.x||r!==this.y||a!==this.index||o!==this.price||l!==this.pane}_priceScaleByPane(e){return e&&!e.defaultPriceScale().isEmpty()?e.defaultPriceScale():null}_setSelectPointModeState(e){e===gt.SelectPointMode.None&&(this._requestedPoint=null,this._selectLineColor=null,this._paneForRequestedPoint&&(this._paneForRequestedPoint=null,this._model.panesCollectionChanged().unsubscribe(this,this._paneCollectionChanged))),gt.activePointSelectionMode.setValue(e),this._crossHairSelectPointMode.setValue(e),this._model.lightUpdate()}_paneCollectionChanged(e){const t=this._paneForRequestedPoint;null!==t&&-1===e.indexOf(t)&&this.cancelRequestSelectPoint()}_updateVisibilityDependentPaneViews(){var e;for(const t of this.model().panes())null===(e=this._pointSelectionPaneViewCache.get(t))||void 0===e||e.update()}}var Di=i(46936),Vi=i(17908),Bi=i(81345),Ri=i(7006),Ni=i(72006),Oi=i(50337),Fi=i(71479),Wi=i(56840);const Hi=new ee.TranslatedString("remove deselected empty line tools",c.t(null,void 0,i(59211))),zi=N.enabled("auto_enable_symbol_labels"),Ui=(0,Z.getLogger)("Chart.ChartModel");function ji(e,t){const i=e.indexOf(t);return-1!==i&&(e.splice(i,1),!0)}function Gi(e){var t,i;for(let s=e.length;s--;){const r=e[s].dataSources();for(let e=r.length;e--;)null===(t=r[e].dataWindowView())||void 0===t||t.update();const n=e[s].priceDataSources();for(let e=n.length;e--;)null===(i=n[e].legendView())||void 0===i||i.update()}}const qi={isSnapshot:!1,readOnly:!1,watermarkEnabled:!0,shiftVisibleRangeOnNewBar:!0,currencyConversionEnabled:!1,unitConversionEnabled:!1,countdownEnabled:!0,lastPriceAnimationEnabled:!0,onWidget:!1,hideIdeas:!1};class $i{constructor(e,t,i,r,n,o,a,l,c,d){this._onRearrangePanes=new(q()),this._lineToolsGroupModel=new lt,this._sourcesBeingMoved=[],this._activeItemBeingMoved=null,this._lineBeingEdited=null,this._linePointBeingEdited=null,this._linePointBeingChanged=null,this._customSourceBeingMovedHitTestData=null,this._customSourceBeingMoved=null,this._dataSourceCollectionChanged=new(q()),this._sourceProperitesChanged=new(q()),this._sourceZOrderChanged=new(q()),this._symbolSourceResolved=new(q()),this._symbolSourceResolvingActive=new(Y())(!1),this._adjustForDividendsAvailability=new(Y())(0),this._adjustForDividendsEnabled=new(Y())(!1),this._sessions=null,this._currentTool="", -this._lineBeingCreated=null,this._paneBeingCreatedLineOn=null,this._lineCancelled=new(q()),this._phantomSourceContainer=new Pt(this),this._destroyed=!1,this._isSettingsExternalPosition=!1,this._isTimeScrolling=!1,this._magnet=new Mt,this._scrollingState=null,this._modelIntervals=[],this._rendererOptionsProvider=new k(this),this._studyInserted=new(q()),this._cachedStudiesMaxOffset=0,this._replayStatus=new(Y())(ct.ReplayStatus.Undefined),this._panes=[],this._tagsChanged=new(q()),this._strategySources=[],this._strategySourcesChange=new(q()),this._activeStrategySource=new(Y())(null),this._paneCollapsingAvailable=new(Y())(!1),this._panesCollectionChanged=new(q()),this._scrollEnabled=N.enabled("chart_scroll"),this._zoomEnabled=N.enabled("chart_zoom"),this._isScalesResetAvailableChanged=new(q()),this._isScalesResetAvailable=!1,this._lollipopSourcesWatcher=null,this._alertsWatcher=null,this._hoveredSource=null,this._hoveredSourceChanged=new(q()),this._lastHoveredHittestData=null,this._lastSelectedHittestData=null,this._topmostCustomSources=[],this._fgCustomSources=[],this._bgCustomSources=[],this._allCustomSources=[],this._customSourcesMap=new Map,this._multiPaneSources=[],this._showLegendProperty=new(M()),this._id=(0,J.guid)(),this._chartSaveTime=null,this._availableCurrenciesList=null,this._availableCurrencies=new bt([]),this._availableUnitsObject=null,this._availableUnits=new wt({}),this._shouldBeSavedEvenIfHidden=!1,this._watchedThemeSpawn=h.watchedTheme.spawn(),this._gradientColorsCache=null,this._recalcVRStudiesParams={},this._recalcColorStudiesParams={},this._recalcVisibleRangeStudiesImplDebounced=(0,s.default)(this._recalcVisibleRangeStudiesImpl.bind(this,this._recalcVRStudiesParams),500),this._recalcColorStudiesImplDebounced=(0,s.default)(this._recalcColorStudiesImpl.bind(this,this._recalcColorStudiesParams),250),this._width=0,this._resetScales=new(q()),this._chartThemeLoaded=new(q()),this._selection=new b,this._selectedSourceChanged=new(q()),this._symbolSourceCollectionChanged=new(q()),this._gridSource=new Bt,this._syncPointCache=new Map,this._lastAppliedGotoTimeRange=null,this._lastGotoTimeRange=null,this._clearSelection=()=>{this._lastSelectedHittestData=null,this._selection.clear()},this._removeSourceFromSelection=e=>{this._selection.remove(e)},this._addSourceToSelection=(e,t)=>{const i=this._selection.isSelected(e);i&&this._lastSelectedHittestData===t||e&&!e.isSelectionEnabled()||(this._lastSelectedHittestData=t||null,i||this._selection.add(e))},this._recalcSymbolResolvingActive=()=>{for(const e of this._panes)if(e.symbolSourceResolvingActive().value())return void this._symbolSourceResolvingActive.setValue(!0);this._symbolSourceResolvingActive.setValue(!1)},this._recalcAdjustForDividendsAvailibility=()=>{var e,t,i,s;if(this._symbolSourceResolvingActive.value())return void this._adjustForDividendsAvailability.setValue(0);const r=this.mainSeries();switch(null!==(t=null===(e=r.symbolInfo())||void 0===e?void 0:e.allowed_adjustment)&&void 0!==t?t:"none"){case"dividends": -return void this._adjustForDividendsAvailability.setValue(2);case"splits":return void this._adjustForDividendsAvailability.setValue(1);case"any":return void this._adjustForDividendsAvailability.setValue(3)}for(const e of this.symbolSources().filter(pe.isActingAsSymbolSource)){if(e.symbolHibernated().value()||e===r)continue;if("any"===(null!==(s=null===(i=e.symbolInfo())||void 0===i?void 0:i.allowed_adjustment)&&void 0!==s?s:"none"))return void this._adjustForDividendsAvailability.setValue(3)}this._adjustForDividendsAvailability.setValue(0)},this._recalcAdjustForDividendsEnabled=()=>{switch(this._adjustForDividendsAvailability.value()){case 2:return void this._adjustForDividendsEnabled.setValue(!0);case 0:case 1:return void this._adjustForDividendsEnabled.setValue(!1)}this._adjustForDividendsEnabled.setValue(this.mainSeries().properties().childs().dividendsAdjustment.value())},this._recalcPaneCollapsingAvailable=e=>{let t=this._panes.filter((e=>!e.collapsed().value())).length;0===t&&e&&this._panes.length>0&&(this._panes[0].collapsed().setValue(!1),t=1),this._paneCollapsingAvailable.setValue(t>1)},this._chartApi=e,this._invalidateHandler=t,this._undoModel=o,this._properties=i,this._options=(0,ie.merge)((0,ie.clone)(qi),l),this._collapsedWV=c,this._isAutoSaveEnabled=d,this._studiesMetaInfoRepository=n,this._readOnly=this._options.readOnly,this._isSnapshot=this._options.isSnapshot,this._chartSaveTime=(new Date).valueOf(),this._backgroundColor=new(Y())(this._getBackgroundColor()),this._backgroundTopColor=new(Y())(this._getBackgroundColor(!0)),this._properties.childs().paneProperties.childs().background.subscribe(this,this._updateBackgroundColor),this._properties.childs().paneProperties.childs().backgroundType.subscribe(this,this._updateBackgroundColor),this._properties.childs().paneProperties.childs().backgroundGradientStartColor.subscribe(this,this._updateBackgroundColor),this._properties.childs().paneProperties.childs().backgroundGradientEndColor.subscribe(this,this._updateBackgroundColor),this._backgroundColor.subscribe(this.recalcColorStudies.bind(this,!1)),this._backgroundTopColor.subscribe(this.recalcColorStudies.bind(this,!1)),this._watchedThemeSpawn.subscribe(this._updateBackgroundColor.bind(this)),this._symbolSourceResolvingActive.subscribe(this._recalcAdjustForDividendsAvailibility),this.setStudiesMetaData(this._studiesMetaInfoRepository.getInternalMetaInfoArray(),this._studiesMetaInfoRepository.getMigrations()),(0,gt.init)();const u=this._readOnly?new(M())((0,B.defaults)("chartproperties.paneProperties.crossHairProperties")):this._properties.childs().paneProperties.childs().crossHairProperties;this.m_crossHairSource=new Ei(this,u,this._options.crossHair),this._crossHairSelectPointMode=this.m_crossHairSource.selectPointMode().spawn(),this._crossHairSelectPointMode.subscribe((e=>{if(e!==gt.SelectPointMode.None&&this.lineBeingCreated()){const e=gt.tool.value();this.cancelCreatingLine(),gt.tool.setValue(e)}})),this._tagsChanged=new(q());const p=new x.DefaultProperty("chartproperties.mainSeriesProperties") -;p.addExclusion("minTick"),p.addExclusion("priceAxisProperties.lockScale"),p.addExclusion("priceAxisProperties.percentage"),p.addExclusion("priceAxisProperties.indexedTo100"),p.addExclusion("priceAxisProperties.isInverted"),p.addExclusion("priceAxisProperties.log"),p.addExclusion("priceAxisProperties.logDisabled"),p.addExclusion("priceAxisProperties.percentageDisabled"),p.addExclusion("priceAxisProperties.autoScaleDisabled"),p.merge(i.childs().mainSeriesProperties.state()),this._timeScale=new st(this,this._options.timeScale);const _={countdownEnabled:this._options.countdownEnabled,lastPriceAnimationEnabled:this._options.lastPriceAnimationEnabled};this.m_mainSeries=new Di.Series(this,p,_,r),this.m_mainSeries.onStyleChanged().subscribe(this._timeScale,this._timeScale.invalidateVisibleBars);const m=()=>this.fullUpdate();this.m_mainSeries.properties().childs().showCountdown.subscribe(this,(()=>{this.m_mainSeries.updateAllViews((0,W.sourceChangeEvent)(this.m_mainSeries.id())),m()})),(0,X.currencyUnitVisibilityProperty)().subscribe(this,m),this._timeScale.visibleBarsStrictRangeChanged().subscribe(this.m_mainSeries,this.m_mainSeries.clearHighLowPriceCache),this._timeScale.visibleBarsStrictRangeChanged().subscribe(this.m_mainSeries,this.m_mainSeries.clearAveragePriceCache),this.createPane(void 0,{axisProperties:p.childs().priceAxisProperties.state(["autoScale"])}),this._adjustForDividendsAvailability.subscribe(this._recalcAdjustForDividendsEnabled),this.mainSeries().properties().childs().dividendsAdjustment.subscribe(this,this._recalcAdjustForDividendsEnabled),this._recalcAdjustForDividendsEnabled(),this._boundUpdateStudiesMaxOffset=this._updateStudiesMaxOffset.bind(this),this.mainSeries().dataEvents().seriesTimeFrame().subscribe(this,((e,t,i,s)=>{if(null!==this._lastAppliedGotoTimeRange&&null!==i&&s&&(0,Tt.areEqualTimeFrames)(this._lastAppliedGotoTimeRange.range,i)){const e=this.appliedTimeFrame().value();null!==e&&!this._lastAppliedGotoTimeRange.actual&&(0,Tt.areEqualTimeFrames)(this._lastAppliedGotoTimeRange.range,e.val)&&this.appliedTimeFrame().setValue(null),this._lastAppliedGotoTimeRange=null}})),this.mainSeries().dataEvents().completed().subscribe(this,(e=>{null===this._lastAppliedGotoTimeRange&&null!==this._lastGotoTimeRange&&(this.gotoTimeRange(this._lastGotoTimeRange.from,this._lastGotoTimeRange.to),this._lastGotoTimeRange=null)}));const g=this._panes[0];g.setStretchFactor(2*g.stretchFactor()),this._properties.listeners().subscribe(this,this.lightUpdate),this._properties.childs().timezone.subscribe(null,(()=>{this._chartApi&&this._chartApi.isConnected().value()&&this._chartApi.switchTimezone(this.timezone())})),g.addDataSource(this.m_mainSeries,g.findSuitableScale(this.m_mainSeries),!1),this._barsMarksSources=a(this);for(const e of this._barsMarksSources)e.setOwnerSource(this.m_mainSeries),g.addDataSource(e,this.m_mainSeries.priceScale(),!0)}setStudiesMetaData(e,t){this._studiesMetaData=e,this._studyVersioning=new w.StudyVersioning(this._studiesMetaData,t)}restart(){this._chartApi.switchTimezone(this.timezone()), -this._timeScale.reset(),this.m_mainSeries.restart();for(const e of this.dataSources())e.restart&&e!==this.m_mainSeries&&e.restart();this.sessions().restart()}version(){return 3}collapsed(){return this._collapsedWV}chartSaveTime(){return this._chartSaveTime}setChartSaveTime(e){this._chartSaveTime=e}destroy(){this._phantomSourceContainer.destroy(),this._hoveredSourceChanged.destroy(),null!==this._watermarkSource&&(this._watermarkSource.destroy(),this._watermarkSource=null),Array.from(this._customSourcesMap.keys()).forEach(this._removeCustomSource,this),(0,n.assert)(0===this._topmostCustomSources.length),(0,n.assert)(0===this._fgCustomSources.length),(0,n.assert)(0===this._bgCustomSources.length),(0,n.assert)(0===this._allCustomSources.length),(0,n.assert)(0===this._customSourcesMap.size),null!==this._lollipopSourcesWatcher&&(this._lollipopSourcesWatcher.destroy(),this._lollipopSourcesWatcher=null),null!==this._alertsWatcher&&this._alertsWatcher.destroy(),this._properties.childs().paneProperties.childs().background.unsubscribeAll(this),this._properties.childs().paneProperties.childs().backgroundType.unsubscribeAll(this),this._properties.childs().paneProperties.childs().backgroundGradientEndColor.unsubscribeAll(this),this._properties.childs().paneProperties.childs().backgroundGradientStartColor.unsubscribeAll(this),this._watchedThemeSpawn.destroy(),this._lastHoveredHittestData=null,this._lastSelectedHittestData=null,(0,X.currencyUnitVisibilityProperty)().unsubscribeAll(this),this._crossHairSelectPointMode.destroy(),this._destroyed=!0}undoModel(){return this._undoModel}onData(e){switch(e.method){case"timescale_update":{const t=e.params;this._updateTimeScale({index:t.index,zoffset:t.zoffset,values:t.changes,indexDiffs:t.index_diff,baseIndex:t.baseIndex,marks:t.marks,clearFlag:t.clear});break}case"timescale_completed":{const t=Boolean(e.params[0]);this._timeScale.onTimeScaleCompleted(t);break}}}addStrategySource(e,t){1!==t&&-1===this._strategySources.indexOf(e)&&(this._strategySources.push(e),this._strategySourcesChange.fire(t),this.setActiveStrategySource(e))}removeStrategySource(e,t){if(1===t)return;const i=this._strategySources.indexOf(e);if(-1!==i){if(this._strategySources.splice(i,1)[0]===this._activeStrategySource.value()&&this.unsetActiveStrategySource(),this._strategySources.length>0){const e=this._strategySources[this._strategySources.length-1];this.setActiveStrategySource(e)}this._strategySourcesChange.fire(t)}}setActiveStrategySource(e){-1!==this._strategySources.indexOf(e)&&this._activeStrategySource.setValue(e)}unsetActiveStrategySource(){this._activeStrategySource.setValue(null)}activeStrategySource(){return this._activeStrategySource}strategySources(){return this._strategySources}strategySourcesChange(){return this._strategySourcesChange}setScrollEnabled(e){this._scrollEnabled=e}scrollEnabled(){return this._scrollEnabled}setZoomEnabled(e){this._zoomEnabled=e}zoomEnabled(){return this._zoomEnabled}zoomToViewport(e,t,i,s,r){this.setTimeViewport(e,t);let n=Math.min(i,s),o=Math.max(i,s) -;const a=r.defaultPriceScale();a.isPercentage()||a.setMode({autoScale:!1}),a.isLog()&&(n=a.priceToLogical(n),o=a.priceToLogical(o)),a.setPriceRange(new ue.PriceRange(n,o)),this.recalculateAllPanes((0,W.viewportChangeEvent)()),this.invalidate(this._paneInvalidationMask(r,K.InvalidationLevel.Light)),this._setScalesResetAvailable(!0)}setTimeViewport(e,t){const i=this.appliedTimeFrame().value();null!==this._lastAppliedGotoTimeRange&&null!==i&&(0,Tt.areEqualTimeFrames)(this._lastAppliedGotoTimeRange.range,i.val)&&!this._lastAppliedGotoTimeRange.actual||(this.timeScale().zoomToBarsRange(e,t),this.recalculateAllPanes((0,W.viewportChangeEvent)()),this.recalcVisibleRangeStudies(),this.lightUpdate())}onTagsChanged(){return this._tagsChanged}canZoomIn(){return this._timeScale.canZoomIn()&&this._zoomEnabled}canZoomOut(){return this._timeScale.canZoomOut()&&this._zoomEnabled}onPaneTagsChanged(){this._tagsChanged.fire()}panesCollectionChanged(){return this._panesCollectionChanged}dataSourceCollectionChanged(){return this._dataSourceCollectionChanged}symbolSourceCollectionChanged(){return this._symbolSourceCollectionChanged}symbolSourceResolved(){return this._symbolSourceResolved}symbolSourceResolvingActive(){return this._symbolSourceResolvingActive}adjustForDividendsAvailability(){return this._adjustForDividendsAvailability}adjustForDividendsEnabled(){return this._adjustForDividendsEnabled}paneCollapsingAvailable(){return this._paneCollapsingAvailable}sourcePropertiesChanged(){return this._sourceProperitesChanged}sourceZOrderChanged(){return this._sourceZOrderChanged}zoomTime(e,t,i){if(!this._zoomEnabled)return;const s=this.timeScale();if(s.isEmpty()||0===t)return;const r=s.width();e=Math.max(1,Math.min(e,r-2)),s.zoom(e,t,i),this.recalculateAllPanes((0,W.viewportChangeEvent)()),this.lightUpdate(),this.recalcVisibleRangeStudies(),this._setScalesResetAvailable(!0)}linePointBeingEdited(){return this._linePointBeingEdited}activeItemBeingMoved(){return this._activeItemBeingMoved}linePointBeingChanged(){return this._linePointBeingChanged}updateAllPaneViews(e){for(const t of this._panes)t.updateAllViews(e)}dataSources(){const e=[this.crossHairSource()];for(const t of this._panes)for(const i of t.dataSources())e.push(i);return e}priceDataSources(){const e=[];for(const t of this._panes)for(const i of t.priceDataSources())e.push(i);return e}symbolSources(){const e=[];for(const t of this._panes)for(const i of t.symbolSources())e.push(i);return e}selection(){return this._selection}selectionMacro(e,t=!1){const i=this.selection().allSources();e({removeSourceFromSelection:this._removeSourceFromSelection,addSourceToSelection:this._addSourceToSelection,clearSelection:this._clearSelection,selection:this.selection.bind(this)});const s=(0,v.subtract)(i,this.selection().allSources()),r=(0,v.subtract)(this.selection().allSources(),i);r.concat(i).forEach((e=>e.updateAllViews((0,W.selectionChangeEvent)())));let n=[];s.forEach((e=>{if((0,S.isLineTool)(e)){const i=e.hasAlert.value()&&e.getAlertSync();i&&i.setSelected(!1), -!t&&e.shouldBeRemovedOnDeselect()&&n.push(e)}})),r.forEach((e=>{const t=(0,S.isLineTool)(e)&&e.hasAlert&&e.hasAlert.value()&&e.getAlertSync();t&&t.setSelected(!0)})),n=n.filter((e=>null!==this.dataSourceForId(e.id()))),n.length>0&&this._undoModel.removeSources(n,!1,Hi),this.lightUpdate(),(s.length>0||r.length>0)&&this._selectedSourceChanged.fire()}onSelectedSourceChanged(){return this._selectedSourceChanged}checkLineToolSelection(){const e=this.selection().allSources();this._selection.checkLineToolSelection(),e.length!==this.selection().allSources().length&&this._selectedSourceChanged.fire()}lineToolsGroupModel(){return this._lineToolsGroupModel}restoreLineToolsGroups(e){this._lineToolsGroupModel=lt.fromState(this,e)}realignLineTools(e){for(const t of this._panes)(void 0===e||t.hasDataSource(e))&&t.realignLineTools(e)&&this._dataSourceCollectionChanged.fire(t)}isSnapshot(){return this._isSnapshot}onWidget(){return this._options.onWidget}hideIdeas(){return this._options.hideIdeas}updateSource(e){const t=this._invalidationMaskForSource(e);null!==t&&this.invalidate(t)}updateSourcePriceScale(e){const t=this._invalidationMaskForSourcePriceScale(e);null!==t&&this.invalidate(t)}updatePane(e){this.invalidate(this._paneInvalidationMask(e))}insertStudyWithParams(e,t,i,s,o,a,l,c,h,d,u){var p,_;let m=null;if(!o&&void 0!==e.groupingKey){const t=this.findNonOverlayStudyWithGroupingKey(e.groupingKey);null!==t&&(m=t.pane)}null===m&&(o||e.is_price_study?m=(0,n.ensureNotNull)(this.paneForSource(null!==(p=null==a?void 0:a[0])&&void 0!==p?p:this.m_mainSeries)):(m=this.createPane(),void 0!==d&&m.setPaneSize(d))),"Compare@tv-basicstudies"===e.id&&this.m_mainSeries.priceScale().setMode({log:!1,percentage:!0});const g=(0,ie.merge)((0,r.default)(null!=s?s:{}),{inputs:t,parentSources:[]}),f=null!=a?a:[],v=(0,P.prepareStudyProperties)(e,g,m,this.studyVersioning(),f),S=(0,j.createStudy)(this,v,f,e,u);this._recalcVisibleRangeStudiesImpl({studies:[S],oldEndVisibleIndex:-1,oldStartVisibleIndex:-1,force:!0,timerId:null});const y=m.findSuitableScale(S,null!==(_=null==a?void 0:a[0])&&void 0!==_?_:this.mainSeries(),l);if(y===this.mainSeries().priceScale()&&(0,pe.isSymbolSource)(S)){const e=c?(0,Ni.sourceNewCurrencyOnPinningToPriceScale)(S,y,this,!0):null,t=h?(0,Oi.sourceNewUnitOnPinningToPriceScale)(S,y,this,!0):null;null===e&&null===t||S.setSymbolParams({currency:e||void 0,unit:t||void 0})}return(0,pe.isSymbolSource)(S)&&(0,n.ensureNotNull)(m).hasDataSource(this.mainSeries())&&zi&&!Wi.getBool("enable_symbol_labels_on_inserting_compare_once",!1)&&((0,x.saveDefaultProperties)(!0),this.properties().childs().scalesProperties.childs().showSymbolLabels.setValue(!0),(0,x.saveDefaultProperties)(!1),Wi.setValue("enable_symbol_labels_on_inserting_compare_once",!0)),S.start(),i&&m.id()===i.paneId?m.insertDataSource(S,y,i.zorder):m.addDataSource(S,y,!1),S.properties().childs().linkedToSeries&&S.properties().childs().linkedToSeries.value()&&S.setOwnerSource(this.mainSeries()),this.recalculatePane(m,(0,W.sourceChangeEvent)(S.id())),this.fullUpdate(), -this._invalidateBarColorerCaches(),this._recalcVisibleRangeStudiesImpl({studies:[S],force:!0}),this._recalcColorStudiesImpl({studies:[S],force:!0}),this._studyInserted.fire(S),S.maxOffset().subscribe(this._boundUpdateStudiesMaxOffset,{callWithLast:!0}),S}replaceStudyStub(e,t){const i=this.paneForSource(e);if(null===i)return!1;const s=e.priceScale(),r=e.zorder(),n=e.ownerSource();return this.paneForSource(e)===i?i.replaceSource(e,t,s):(i.insertDataSource(t,s,r),this.removeSource(e)),t.setOwnerSource(n),this.dataSources().forEach((i=>{i.ownerSource()===e&&i.setOwnerSource(t)})),t.start(),this.recalculatePane(i,(0,W.sourceChangeEvent)(t.id())),this.fullUpdate(),!0}insertStudyStub(e){const t=this.mainSeries(),i=(0,n.ensureNotNull)(this.paneForSource(t)),s=new C.StudyStub(this,null,e),r=i.createPriceScaleAtPosition("overlay");return i.addDataSource(s,r,!1),this.recalculatePane(i,(0,W.sourceChangeEvent)(s.id())),this.fullUpdate(),s}removeStudyStub(e){const t=this.dataSourceForId(e);return null===t?(Ui.logNormal("StudyStub id="+e+" is not found in chart model"),!1):(this.removeSource(t),!0)}setHoveredSource(e,t=null){const i=this._hoveredSource!==e;if(!i&&this._lastHoveredHittestData===t)return;this._lastHoveredHittestData=t;let s=null;if(this._hoveredSource){this._hoveredSource.updateAllViews((0,W.selectionChangeEvent)()),s=new K.InvalidationMask(K.InvalidationLevel.Cursor);const e=this._invalidationMaskForSource(this._hoveredSource,K.InvalidationLevel.Light);null!==e&&s.merge(e)}if(this._hoveredSource=e,e){e.updateAllViews((0,W.selectionChangeEvent)()),s||(s=new K.InvalidationMask(K.InvalidationLevel.Cursor));const t=this._invalidationMaskForSource(e,K.InvalidationLevel.Light);null!==t&&s.merge(t)}s&&this.invalidate(s),i&&this._hoveredSourceChanged.fire(e)}properties(){return this._properties}chartApi(){return this._chartApi}disconnect(){this.sessions().stop();for(const e of this.dataSources())e.disconnect&&e.disconnect();this._timeScale.disconnect()}crossHairSource(){return this.m_crossHairSource}gridSource(){return this._gridSource}publishedChartsTimelineSource(){return null}hoveredSource(){return this._hoveredSource}hoveredSourceChanged(){return this._hoveredSourceChanged}lastHittestData(){return this._lastHoveredHittestData}lastSelectedHittestData(){return this._lastSelectedHittestData}syncTimeWithModel(e,t){const i=this.mainSeries().syncModel();if(null===i)return;const s=1e3*this.createSyncPoint(e,i.syncSourceTarget()).sourceTimeToTargetTime(t/1e3),r=(0,ht.get_timezone)(this.timezone());let n=(0,ht.utc_to_cal)(r,s);this.mainSeries().isDWM()&&(n=i.getSession().spec.correctTradingDay(n),(0,ht.set_hms)(n,0,0,0,0,(0,ht.get_timezone)("Etc/UTC"))),this._gotoTimeImpl(n.getTime(),{centerIfVisible:!1})}gotoTime(e){return this._gotoTimeImpl(e,{centerIfVisible:!0})}recalculatePane(e,t){null==e||e.recalculate(t)}recalculateAllPanes(e){this._panes.forEach((t=>t.recalculate(e))),this.updateAllPaneViews(e),this.crossHairSource().updateAllViews(e)}gotoTimeRange(e,t){const i=this.timeScale(),s=i.tickMarks(),r=this.mainSeries() -;if(void 0===s.minIndex)return void(this._lastGotoTimeRange={from:e,to:t});let o=e,a=t;const l=r.symbolInfo();if(null!==l){let i=this.properties().childs().timezone.value();"exchange"===i&&(i=l.timezone);const s=(0,ht.get_timezone)(i),n=(0,ht.utc_to_cal)(s,e),c=(0,ht.utc_to_cal)(s,t);if(r.isDWM()){const e=(0,ht.get_timezone)("Etc/UTC");(0,ht.set_hms)(n,0,0,0,0,e),(0,ht.set_hms)(c,0,0,0,0,e)}o=n.getTime(),a=c.getTime()}const c=(0,n.ensureDefined)(s.maxIndex),h=(0,n.ensureDefined)(s.minIndex);if(o>=(0,n.ensureNotNull)(s.indexToTime(h)).valueOf()||r.endOfData()){const e=(e,t)=>e(0,n.ensureNotNull)(s.indexToTime(e)).valueOf(),l=(0,v.lowerboundExt)(t,o,e,s.nearestIndex(o),c);let d=o===a?l:(0,v.lowerboundExt)(t,a,e,s.nearestIndex(a),c);this._lastGotoTimeRange=null,null!==this._lastAppliedGotoTimeRange&&(this._lastAppliedGotoTimeRange.actual=!1);const u=i.baseIndex();if(l+Math.max(d-l+1,i.minVisibleBarCount())>u){const e=i.targetDefaultRightOffset();d-u=0;t--)if(this._panes[t].hasDataSource(e))return this._panes[t];return e instanceof vt.BarsMarksContainer?this.paneForSource(this.mainSeries()):null}mainPane(){for(const e of this._panes)if(e.isMainPane())return e;throw new Error("Main pane is not found")}lastPane(){return this._panes[this._panes.length-1]}removeSource(e,t){this.selectionMacro((t=>t.removeSourceFromSelection(e)),!0),this._hoveredSource===e&&(this._hoveredSource=null,this._lastHoveredHittestData=null),this._sourcesBeingMoved.includes(e)&&(this._sourcesBeingMoved=this._sourcesBeingMoved.filter((t=>t!==e)),this._sourcesBeingMoved.length||(this._activeItemBeingMoved=null)),e===this._lineBeingEdited&&(this._lineBeingEdited=null,gt.isToolEditingNow.setValue(!1)),e===this._lineBeingCreated&&(this._lineBeingCreated=null,gt.isToolCreatingNow.setValue(!1)),!t&&e.stop&&e.stop();const i=this.detachSource(e),s=this.mainSeries().priceScale();return(0,j.isStudy)(e)&&(0,pe.isActingAsSymbolSource)(e)&&e.priceScale()===s&&s.isPercentage()&&1===s.seriesLikeSources().filter(pe.isActingAsSymbolSource).length&&s.setMode({percentage:!1}),this.fullUpdate(),this._invalidateBarColorerCaches(),(0,j.isStudy)(e)&&((0,_.emit)("study_event",e.id(),"remove"),e.isChildStudy()&&e.parentSources().forEach((t=>t.unsetChild(e))),e.maxOffset().unsubscribe(this._boundUpdateStudiesMaxOffset)),!t&&e.destroy&&e.destroy(),(0, -S.isLineTool)(e)&&(e.removeAlert(),(0,_.emit)("drawing_event",e.id(),"remove")),i}allStudies(e){const t=e?e=>(0,j.isStudy)(e)&&!0:j.isStudy;return this._getAllSources(t)}findNonOverlayStudyWithGroupingKey(e,t){const i=void 0!==t?[t]:this._panes;for(const t of i){const i=t.dataSources().find((i=>(0,j.isStudy)(i)&&i.metaInfo().groupingKey===e&&!t.isOverlay(i)));if(void 0!==i)return{pane:t,study:i}}return null}movePaneUp(e){this.movePane(e,e-1)}movePaneDown(e){this.movePane(e,e+1)}movePane(e,t){const i=this._panes[e];this._panes.splice(e,1),this._panes.splice(t,0,i),this._panesCollectionChanged.fire(this._panes),this._onRearrangePanes.fire(),this.invalidate(K.InvalidationMask.panesOrder())}backgroundColor(){return this._backgroundColor}backgroundTopColor(){return this._backgroundTopColor}backgroundColorAtYPercentFromTop(e){const t=this.backgroundColor().value(),i=this.backgroundTopColor().value();if(t===i)return t;if(e=Math.max(0,Math.min(100,Math.round(100*e))),null===this._gradientColorsCache||this._gradientColorsCache.topColor!==i||this._gradientColorsCache.bottomColor!==t)this._gradientColorsCache={topColor:i,bottomColor:t,colors:new Map};else{const t=this._gradientColorsCache.colors.get(e);if(void 0!==t)return t}const s=(0,ft.gradientColorAtPercent)(i,t,e/100);return this._gradientColorsCache.colors.set(e,s),s}backgroundCounterColor(){const e=this.backgroundColor().value();if(void 0===this._lastBackgroundColor||void 0===this._lastOriginalColor||e!==this._lastBackgroundColor){const t=(0,a.rgbToBlackWhiteString)((0,a.parseRgb)(e),150);this._lastBackgroundColor=e,this._lastOriginalColor="black"===t?"white":"black"}return this._lastOriginalColor}isDark(){return"white"===this.backgroundCounterColor()}defaultResolutions(){return this.chartApi().defaultResolutions()}availableCurrencies(){const e=this._getAvailableCurrencies();return e.length!==this._availableCurrencies.size()&&(this._availableCurrencies=new bt(e)),this._availableCurrencies}currencyConversionEnabled(){return this._options.currencyConversionEnabled}availableUnits(){const e=this._getAvailableUnits();return this._availableUnits.unitsChanged(e)&&(this._availableUnits=new wt(e)),this._availableUnits}unitConversionEnabled(){return this._options.unitConversionEnabled}resetDeferredStudies(){ye.instance(this).reset()}isJustClonedChart(){return this._undoModel.isJustClonedChart()}studyTemplate(e,t,i){const s={panes:[],version:this.version()};for(const e of this.panes())s.panes.push(e.state(!0,!1,!0));const r=this.mainSeries();return e&&(s.symbol=r.symbol(),this.currencyConversionEnabled()&&i&&(s.currency=r.currency()),this.unitConversionEnabled()&&i&&(s.unit=r.unit())),t&&(s.interval=r.interval()),s}restoreLineToolState(e,t,i){e.restorePoints(t.points,t.indexes||[]),e.properties().merge(t.state),e.restoreData&&e.restoreData(t),e.linkKey().setValue(t.linkKey||null),e.createServerPoints(),this.fullUpdate();const s=e.linkKey().value();null!==s&&i&&(0,gt.restoreLineToolState)({model:this,linkKey:s,state:t})}preferences(){return(0, -Bi.preferencesByWhiteList)(this,this.mainSeries())}restoreTheme(e,t,i){e.mainSourceProperties.hollowCandleStyle||(e.mainSourceProperties.hollowCandleStyle=e.mainSourceProperties.candleStyle),this._undoModel.chartLoadTheme(e,t,i)}onResetScales(){return this._resetScales}startMovingSources(e,t,i,s,r,o){this._sourcesBeingMoved=e,this._activeItemBeingMoved=i;let a=!1;if(this._sourcesBeingMoved.forEach((e=>{!a&&(0,j.isStudy)(e)&&(a=!0);const l=(0,n.ensureNotNull)(this.paneForSource(e)),c=(0,S.isLineTool)(e),h=c&&e.linkKey().value();if(!1!==h&&null!==h&&s.has(h)&&c&&e.isFixed()){const t=(0,n.ensureDefined)(s.get(h)),a={screen:this._percentPositionToPoint(t,l)};e.startMoving(a,i,r,o)}else e.startMoving(t,i,r,o);const d=this._paneInvalidationMask(l,K.InvalidationLevel.Light);this.invalidate(d)})),!o){const s=e.filter(S.isLineTool).filter((e=>e.linkKey().value()&&e.isSynchronizable())).map((e=>e.linkKey().value()));if(s.length&&t.logical){const o=this.externalTimeStamp(t.logical.index),a={linkKeys:s,model:this,symbol:this.mainSeries().symbol(),point:{price:t.logical.price,timeStamp:o},activeItem:null!==i?i:void 0,envState:r,pointPositionPercents:new Map};e.forEach((e=>{if((0,S.isLineTool)(e)){const i=e.linkKey().value();if(i&&e.isSynchronizable()&&e.isFixed()){const s=(0,n.ensureNotNull)(this.paneForSource(e));a.pointPositionPercents.set(i,this._pointToPercentPosition((0,n.ensureDefined)(t.screen),s))}}})),(0,gt.startMovingLineTool)(a)}}gt.isToolMovingNow.setValue(!0),a&>.isStudyEditingNow.setValue(!0)}moveSources(e,t,i,s){if(this._sourcesBeingMoved.filter((e=>!e.isLocked||!e.isLocked())).forEach((r=>{const o=(0,S.isLineTool)(r)?r.linkKey().value():null;if(null!==o&&t.has(o)){const e=(0,n.ensureNotNull)(this.paneForSource(r)),a=(0,n.ensureDefined)(t.get(o)),l={screen:this._percentPositionToPoint(a,e)};r.move(l,this._activeItemBeingMoved,i,s)}else r.move(e,this._activeItemBeingMoved,i,s)})),this.lightUpdate(),!s&&e.logical){const t=this._sourcesBeingMoved.filter(S.isLineTool).filter((e=>e.isSynchronizable()&&!!e.linkKey().value())).map((e=>e.linkKey().value())),s=this.externalTimeStamp(e.logical.index),r={linkKeys:t,model:this,point:{price:e.logical.price,timeStamp:s},envState:i,pointPositionPercents:new Map};this._sourcesBeingMoved.filter(S.isLineTool).forEach((t=>{if(t.linkKey().value()&&t.isSynchronizable()&&t.isFixed()){const i=(0,n.ensureNotNull)(this.paneForSource(t));r.pointPositionPercents.set(t.linkKey().value(),this._pointToPercentPosition((0,n.ensureDefined)(e.screen),i))}})),(0,gt.moveLineTool)(r)}}endMovingSources(e,t,i){const s=this._sourcesBeingMoved.map((s=>{const r=(0,n.ensureNotNull)(this.paneForSource(s)),o=s.endMoving(e,t,i),a=this._paneInvalidationMask(r,K.InvalidationLevel.Light);return a.invalidateAll(K.InvalidationLevel.Light),this.invalidate(a),o})),r=this._sourcesBeingMoved.filter(S.isLineTool).filter((e=>e.isSynchronizable()&&!!e.linkKey().value())).map((e=>e.linkKey().value())),o=this._sourcesBeingMoved.filter(S.isLineTool).filter((e=>e.isSynchronizable()&&!!e.linkKey)).map((e=>{const t={ -points:e.normalizedPoints(),interval:this.mainSeries().interval()};return e.isFixed()&&(t.pointPositionPercents=e.calcPositionPercents()),t}));r.length&&(0,gt.finishMovingLineTool)({linkKeys:r,model:this,finalStates:o,changes:s}),this._sourcesBeingMoved=[],this._activeItemBeingMoved=null,gt.isToolMovingNow.setValue(!1),gt.isStudyEditingNow.setValue(!1)}sourcesBeingMoved(){return this._sourcesBeingMoved}setMovingCustomSource(e,t){this._customSourceBeingMoved=e,this._customSourceBeingMovedHitTestData=null!==t?{beingMoved:!1,...t}:null}processingCustomSourceMove(){null!==this._customSourceBeingMovedHitTestData&&(this._customSourceBeingMovedHitTestData.beingMoved=!0)}customSourceMovingHitTestData(){return this._customSourceBeingMovedHitTestData}customSourceBeingMoved(){return null!==this._customSourceBeingMovedHitTestData&&this._customSourceBeingMovedHitTestData.beingMoved?this._customSourceBeingMoved:null}width(){return this._width}setWidth(e,t){this._width=e,this._timeScale.setWidth(e,t);for(const t of this._panes)t.setWidth(e);this.recalculateAllPanes((0,W.viewportChangeEvent)()),this.recalcVisibleRangeStudies()}setPaneHeight(e,t){e.setHeight(t),this.recalculateAllPanes((0,W.viewportChangeEvent)()),this.lightUpdate()}isScalesResetAvailableChanged(){return this._isScalesResetAvailableChanged}isScalesResetAvailable(){return this._isScalesResetAvailable}panes(){return this._panes}paneForId(e){return this._panes.find((t=>t.id()===e))||null}createPane(e,t,i){const s=this._undoModel.chartWidget();s.isMaximizedPane()&&s.toggleMaximizePane(null);const r=this._properties.childs().paneProperties;t&&r.merge(t);const n=new Le(this._timeScale,r,this,i);return void 0!==e?this._panes.splice(e,0,n):this._panes.push(n),n.onTagsChanged().subscribe(this,$i.prototype.onPaneTagsChanged),n.dataSourcesCollectionChanged().subscribe(this,(()=>this._dataSourceCollectionChanged.fire(n))),n.symbolSourceCollectionChanged().subscribe(this,(()=>this._onSymbolSourceCollectionChanged(n))),n.sourcePropertiesChanged().subscribe(this,(e=>this._sourceProperitesChanged.fire(n,e))),n.sourceZOrderChanged().subscribe(this,(e=>this._sourceZOrderChanged.fire(n,e))),n.symbolSourceResolved().subscribe(this,(e=>this._symbolSourceResolved.fire(n,e))),n.symbolSourceResolvingActive().subscribe(this._recalcSymbolResolvingActive),n.collapsed().subscribe(this._recalcPaneCollapsingAvailable),this._recalcPaneCollapsingAvailable(),this._panesCollectionChanged.fire(this._panes),this.invalidate(K.InvalidationMask.panesOrder()),n}removePane(e){const t=this._undoModel.chartWidget();t.isMaximizedPane()&&t.toggleMaximizePane(null);const i=e;i.destroy();const s=this._panes.indexOf(i);-1!==s&&(this._panes.splice(s,1),e.dataSourcesCollectionChanged().unsubscribeAll(this),e.symbolSourceCollectionChanged().unsubscribeAll(this),e.sourcePropertiesChanged().unsubscribeAll(this),e.onTagsChanged().unsubscribeAll(this),e.symbolSourceResolved().unsubscribeAll(this),i.symbolSourceResolvingActive().unsubscribe(this._recalcSymbolResolvingActive), -e.collapsed().unsubscribe(this._recalcPaneCollapsingAvailable),this._recalcPaneCollapsingAvailable(!0));this.crossHairSource().pane===e&&this.clearCurrentPosition(),this._panesCollectionChanged.fire(this._panes),this.invalidate(K.InvalidationMask.panesOrder())}changePanesHeight(e,t){if(this._panes.length<2)return;(0,n.assert)(e>=0&&ee+t.stretchFactor()),0),r=this._panes.reduce(((e,t)=>e+t.height()),0),o=r-30*(this._panes.length-1);t=Math.min(o,Math.max(30,t));const a=s/r,l=i.height();i.setStretchFactor(t*a);let c=t-l,h=this._panes.length-1;for(const e of this._panes)if(e!==i){const t=Math.min(o,Math.max(30,e.height()-c/h));c-=e.height()-t,h-=1;const i=t*a;e.setStretchFactor(i)}this.fullUpdate()}clearCurrentPosition(){const e=this.crossHairSource();e.clearPosition(),(0,n.ensureNotNull)(e.dataWindowView()).update(),Gi(this._panes),this.invalidate(K.InvalidationMask.cursor());const t=this._undoModel.chartWidget();t.chartWidgetCollection().syncCrosshair(null,t.id()),this._phantomSourceContainer.onCursorPositionUpdated()}setAndSaveCurrentPosition(e,t,i,s){this.crossHairSource().saveOriginCoords(e,t),this.setCurrentPosition(e,t,i,s)}setCurrentPosition(e,t,i,s){var r,o,a;let l=NaN;const c=this._timeScale.coordinateToVisibleIndex(e),h=null!==(a=null===(o=null!==(r=this._lineBeingEdited)&&void 0!==r?r:this._lineBeingCreated)||void 0===o?void 0:o.priceScale())&&void 0!==a?a:i.defaultPriceScale();let d=null;!h.isEmpty()&&Number.isFinite(t)&&(d=(0,n.ensureNotNull)(i.mainDataSource()).firstValue(),null!==d&&(l=h.coordinateToPrice(t,d)));const u=this._crossHairSelectPointMode.value()!==gt.SelectPointMode.None,p=this.currentTool(),_=this.mainSeries(),m=this.crossHairSource(),g=m.index,f=m.price,v=u||gt.isStudyEditingNow.value(),y=h===this.m_mainSeries.priceScale()&&(this._lineBeingCreated||this._lineBeingEdited||(0,S.isLineToolName)(p)||(0,gt.toolIsMeasure)(p)||v);!this._isSettingsExternalPosition&&y?(l=this._magnet.align(l,c,i),null!==d&&this._setCorrectedPositionToCrosshair(c,l,i)):this._magnet.resetLastValue();let b=null;if(isNaN(l)||(b=i),this._isTimeScrolling){if(!this._isSettingsExternalPosition&&u){const e=_.bars().firstIndex(),t=_.bars().lastIndex();if(null!==e&&null!==t){const s=Math.min(Math.max(c,e),t);s!==c&&this._setCorrectedPositionToCrosshair(s,l,i)}}else m.setPosition(m.index,l,b);return}m.setOnHoveredChartWidget(!0),m.setPosition(c,l,b),(0,n.ensureNotNull)(m.dataWindowView()).update(),Gi(this._panes);const w=_.syncModel();if(this.crossHairSource().startMeasurePoint()||this._lineBeingCreated?this.lightUpdate():this.invalidate(K.InvalidationMask.cursor()),this._lineBeingCreated){const e=this._lineBeingCreated.linkKey().value();if(!this._isSettingsExternalPosition){const t=this._lineBeingCreated.setLastPoint({index:c,price:l},s);if(this._lineBeingCreated.updateAllViews((0,W.sourceChangeEvent)(this._lineBeingCreated.id())),t.price===l&&t.index===c||this._setCorrectedPositionToCrosshair(t.index,t.price,i),w&&e){ -const i=this._timeScale.points().roughTime(t.index,w.projectTime.bind(w));(0,gt.setLineToolLastPoint)({model:this,linkKey:e,point:{timeStamp:(0,n.ensureNotNull)(i),price:t.price}})}}}if(!this._isSettingsExternalPosition&&null!==this._lineBeingEdited&&null!==this._linePointBeingEdited){const e={index:c,price:l};this.changeLinePoint(e,s);const t=this._lineBeingEdited.alignCrossHairToAnchor(this._linePointBeingEdited)?this._lineBeingEdited.getPoint(this._linePointBeingEdited):e;null!==t&&this._setCorrectedPositionToCrosshair(t.index,t.price,i)}if(!this._isSettingsExternalPosition&&v){const e=_.bars().firstIndex(),t=_.bars().lastIndex();if(null!==e&&null!==t){const s=Math.min(Math.max(c,e),t);s!==c&&this._setCorrectedPositionToCrosshair(s,l,i)}}(g!==c||f!==l)&&this._syncCrosshair(s)}setExternalPosition(e,t){let i;const s=this.crossHairSource();if(s.setOnHoveredChartWidget(!1),null!==e&&(0,ie.isNumber)(e.timeStamp)){const t=this.mainSeries().syncModel();if(t){const s=this.createSyncPoint(e.syncSourceTarget,t.syncSourceTarget()).sourceTimeToTargetTime(e.timeStamp);i=this._timeScale.points().roughIndex(s,t.distance.bind(t))}}if(null!==e&&null!=i&&Number.isFinite(i)){this._isSettingsExternalPosition=!0;const r=(0,n.ensureNotNull)(this.paneForSource(this.mainSeries())),o=this._timeScale.indexToCoordinate(i),a=(0,n.ensureNotNull)(r.mainDataSource()).firstValue();if(null!==a){let i=NaN;void 0!==e.price&&Number.isFinite(e.price)&&(i=this.mainSeries().priceScale().priceToCoordinate(e.price,a)),s.clearOriginCoords(),this.setCurrentPosition(o,i,r,t)}return s.setOnHoveredChartWidget(!1),void(this._isSettingsExternalPosition=!1)}s.clearPosition(),(0,n.ensureNotNull)(s.dataWindowView()).update(),Gi(this._panes),this.invalidate(K.InvalidationMask.cursor())}startScaleTime(e){this._timeScale.startScale(e)}scaleTimeTo(e){this._timeScale.scaleTo(e),this.recalculateAllPanes((0,W.viewportChangeEvent)()),this.lightUpdate(),this._setScalesResetAvailable(!0)}endScaleTime(){this._timeScale.endScale(),this.lightUpdate(),this.recalcVisibleRangeStudies()}resetTimeScale(){this._timeScale.restoreDefault(),this.recalculateAllPanes((0,W.viewportChangeEvent)()),this.recalcVisibleRangeStudies(),this.lightUpdate(),this._resetScales.fire(),this._setScalesResetAvailable(!1)}startScalePrice(e,t,i){e.startScalePrice(t,i)}scalePriceTo(e,t,i){e.scalePriceTo(t,i),this.mainSeries().priceScale().isLockScale()?this.lightUpdate():this.invalidate(this._paneInvalidationMask(e,K.InvalidationLevel.Light)),this._setScalesResetAvailable(!0)}endScalePrice(e,t){e.endScalePrice(t),this.invalidate(this._paneInvalidationMask(e,K.InvalidationLevel.Light))}startTwoPointsScalePrice(e,t,i,s){t.startTwoPointsScale(i,s)}twoPointsScalePriceTo(e,t,i,s){t.twoPointsScale(i,s),this.invalidate(this._paneInvalidationMask(e)),this._setScalesResetAvailable(!0)}endTwoPointsScalePrice(e,t){t.endTwoPointsScale(),this.invalidate(this._paneInvalidationMask(e))}resetPriceScale(e,t){this._setScalesResetAvailable(!1),e.resetPriceScale(t), -this.invalidate(this._paneInvalidationMask(e,K.InvalidationLevel.Light))}restorePriceScaleState(e,t,i){e.restorePriceScaleState(t,i),this.invalidate(this._paneInvalidationMask(e,K.InvalidationLevel.Light))}currentTool(){return this._currentTool}setCurrentTool(e){this._currentTool!==e&&((0,S.isLineToolName)(e)&&this.selectionMacro((e=>{e.clearSelection()})),this._currentTool=e,this._phantomSourceContainer.onToolChanged())}detachSource(e){const t=this.paneForSource(e);return!!t&&(t.removeDataSource(e),t.isEmpty()?(this._lineBeingCreated&&t===this._paneBeingCreatedLineOn&&this.cancelCreatingLine(),this.removePane(t),!0):(this.fullUpdate(),!1))}children(e,t){return this.dataSources().filter((i=>(0,j.isStudy)(i)?!t&&i.parentSources().includes(e):i.ownerSource()===e))}onRearrangePanes(){return this._onRearrangePanes}finishLineTool(e){const t=e.linkKey().value();(0,gt.drawOnAllCharts)().value()&&null!==t&&e.isSynchronizable()&&(0,gt.finishLineTool)({linkKey:t,model:this})}startChangingLinetool(e,t,i,s,r){this._lineBeingEdited=e,this._linePointBeingChanged=t||null,this._linePointBeingEdited=void 0===i?null:i,this._lineBeingEdited.startChanging(i,t,r),gt.isToolEditingNow.setValue(!0);const o=(0,n.ensureNotNull)(this.paneForSource(e));this._lineBeingEdited.startDragPoint&&void 0!==i&&void 0!==t&&this._lineBeingEdited.startDragPoint(i,t),r||void 0===i||void 0===t||this._lineBeingEdited.setPoint(i,t,s,r),this._lineBeingEdited.updateAllViews((0,W.sourceChangeEvent)(this._lineBeingEdited.id()));const a=this._paneInvalidationMask(o,K.InvalidationLevel.Light);this.invalidate(a);const l=e.linkKey().value();if(l&&e.isSynchronizable()&&void 0!==i&&void 0!==t){const e=(0,n.ensureNotNull)(this.externalTimeStamp(t.index));(0,gt.startChangingLineTool)({linkKey:l,model:this,symbol:this.mainSeries().symbol(),point:{price:t.price,timeStamp:e},pointIndex:i,envState:s||null})}}createLineTool(e,t,i,s,r,a,l){if((0,n.assert)((0,S.isLineToolName)(i),`Cannot create unknown line tool: ${i}`),s){const e={...Ri.intervalsVisibilitiesDefaults},t=s.childs().intervalsVisibilities.state();(0,ie.merge)(e,null!=t?t:{});const r=s.state();r.intervalsVisibilities=e,s=(0,S.createLineToolProperties)(i,r,this)}const c=(0,S.createLineTool)(i,this,s,null,void 0,l);if("LineToolExecution"!==i){let e;switch(i){case"LineToolIcon":e=c.properties().childs().icon.value().toString(16).toUpperCase();break;case"LineToolEmoji":e=c.properties().childs().emoji.value()}(0,u.trackEvent)("drawings","Study_Drawing_"+i,e)}const h=!c.linkKey().value()&&!r;a=(0,n.ensureDefined)(a||(0,n.ensureNotNull)(e.mainDataSource())),s||(0,S.prepareLineToolPropertiesByOwnerSource)(c.properties(),a),c.setOwnerSource(a);const d=a.priceScale();if(e.addDataSource(c,d,!1),(0,gt.drawOnAllCharts)().value()){const e=c.isSynchronizable()?r||(0,J.randomHash)():null;c.linkKey().setValue(e)}else c.linkKey().setValue(r);let p;if(c.isFixed()){const i=(0,n.ensureNotNull)((0,n.ensureNotNull)(e.mainDataSource()).firstValue()),s=this._timeScale.indexToCoordinate(t.index),r=(0, -n.ensureNotNull)(d).priceToCoordinate(t.price,i);p=c.addFixedPoint(new o.Point(s,r))}else p=c.addPoint(t);return p||(this._lineBeingCreated=c,this._paneBeingCreatedLineOn=e,gt.isToolCreatingNow.setValue(!0)),h&&c.enableCurrentIntervalVisibility(),this.fullUpdate(),c}endChangingLinetool(e,t){const i=(0,n.ensureNotNull)(this._lineBeingEdited),s=i.endChanging(!1,e,t);this._lineBeingEdited=null,gt.isToolEditingNow.setValue(!1),this._linePointBeingEdited=null,this._linePointBeingChanged=null,this.lightUpdate();const r={points:i.normalizedPoints(),interval:this.mainSeries().interval()},o=i.linkKey().value();null!==o&&i.isSynchronizable()&&!t&&(0,gt.finishChangingLineTool)({model:this,linkKey:o,symbol:this.mainSeries().symbol(),finalState:r,changes:s})}continueCreatingLine(e,t,i,s){const r=(0,n.ensureNotNull)(this._lineBeingCreated),o=r.addPoint(e,t,i);r.updateAllViews((0,W.sourceChangeEvent)(r.id()));const a=new K.InvalidationMask(K.InvalidationLevel.Light);return o&&(this._paneBeingCreatedLineOn=null,this._lineBeingCreated=null,gt.isToolCreatingNow.setValue(!1)),this.invalidate(a),o}cancelCreatingLine(){if(!this._lineBeingCreated)return;const e=this._lineBeingCreated;this.removeSource(this._lineBeingCreated),this._lineBeingCreated=null,this._lineCancelled.fire(),gt.isToolCreatingNow.setValue(!1),(0,gt.drawOnAllCharts)().value()&&e.isSynchronizable()&&(0,gt.cancelLineTool)({model:this})}lineBeingCreated(){return this._lineBeingCreated}paneBeingCreatedLineOn(){return this._paneBeingCreatedLineOn}lineCancelled(){return this._lineCancelled}isPhantomLine(e){return this._phantomSourceContainer.source()===e}changeLinePoint(e,t,i){const s=(0,n.ensureNotNull)(this._lineBeingEdited),r=(0,n.ensureNotNull)(this._linePointBeingEdited);let o=e.price,a=e.index;if(s.setPoint(r,e,t,i),!i){const t=s.alignCrossHairToAnchor(r)?s.getPoint(r):e;null!==t&&(a=t.index,o=t.price)}s.updateAllViews((0,W.sourceChangeEvent)(s.id())),this.lightUpdate();const l=s.linkKey().value();if(!i&&null!==l&&s.isSynchronizable()){const e=(0,n.ensureNotNull)(this._linePointBeingChanged),i={indexesChanged:a!==e.index,pricesChanged:o!==e.price},c=s.getChangePointForSync(r);if(null!==c){const e=this.externalTimeStamp(a);null!==e&&(o=c.price,(0,gt.changeLineTool)({linkKey:l,model:this,symbol:this.mainSeries().symbol(),point:{price:o,timeStamp:e},envState:t,changes:i}))}}}changeLinePoints(e,t,i){const s=e.points(),r=e.linkKey().value();!i&&r&&e.isSynchronizable()&&t.forEach(((t,i)=>{const o=s[i],a=o.price!==t.price,l=o.index!==t.index;if(e.getChangePointForSync(i)){const e=(0,n.ensureNotNull)(this.externalTimeStamp(t.index));(0,gt.changeLineTool)({linkKey:r,model:this,symbol:this.mainSeries().symbol(),point:{price:t.price,timeStamp:e},changes:{pricesChanged:a,indexesChanged:l}})}})),e.setPoints(t),e.updateAllViews((0,W.sourceChangeEvent)(e.id())),this.lightUpdate()}startScrollTime(e){this._timeScale.startScroll(e),this._isTimeScrolling=!0,this.mainSeries().clearGotoDateResult()}scrollTimeTo(e){this._timeScale.scrollTo(e),this.recalculateAllPanes((0, -W.viewportChangeEvent)()),this.lightUpdate(),this._setScalesResetAvailable(!0)}endScrollTime(){this._timeScale.endScroll(),this.lightUpdate(),this.recalcVisibleRangeStudies(),this._isTimeScrolling=!1}startScrollPrice(e,t,i){e.startScrollPrice(t,i)}scrollPriceTo(e,t,i){e.scrollPriceTo(t,i),this.invalidate(this._paneInvalidationMask(e,K.InvalidationLevel.Light))}endScrollPrice(e,t){e.endScrollPrice(t),this.invalidate(this._paneInvalidationMask(e,K.InvalidationLevel.Light))}addCustomSource(e,t,i=g.CustomSourceLayer.Foreground){this._customSourcesMap.has(e)&&Ui.logWarn(`Attempt to add the same custom source multiple time "${e}"`),Ui.logNormal(`Adding custom source "${e}"`);const s=t(e,this);switch(i){case g.CustomSourceLayer.Background:this._bgCustomSources.push(s);break;case g.CustomSourceLayer.Foreground:this._fgCustomSources.push(s);break;case g.CustomSourceLayer.Topmost:this._topmostCustomSources.push(s);break;default:throw new Error(`Unknown custom sources layer ${i}`)}this._allCustomSources.push(s),this._customSourcesMap.set(e,s),this.lightUpdate()}removeCustomSource(e){this._removeCustomSource(e),this.lightUpdate()}hasCustomSource(e){return this._customSourcesMap.has(e)}customSourceForName(e){return this._customSourcesMap.get(e)||null}customSourceName(e){let t=null;return this._customSourcesMap.forEach(((i,s)=>{i===e&&(t=s)})),t}customSources(e){switch(e){case g.CustomSourceLayer.Background:return this._bgCustomSources;case g.CustomSourceLayer.Foreground:return this._fgCustomSources;case g.CustomSourceLayer.Topmost:return this._topmostCustomSources;default:return this._allCustomSources}}addMultiPaneSource(e){this._multiPaneSources.push(e),this.lightUpdate()}removeMultiPaneSource(e){const t=this._multiPaneSources.indexOf(e);-1===t?Ui.logWarn("Attempt to remove multi-pane source which does not exist in the model"):this._multiPaneSources.splice(t,1),this.lightUpdate()}multiPaneSources(e){return this._multiPaneSources.filter((t=>!e.hasDataSource(t)))}magnet(){return this._magnet}dateTimeFormatter(){return this._dateTimeFormatter}dateFormatter(){return this._dateFormatter}timeFormatter(){return this._timeFormatter}isUnmergeAvailableForSource(e){if(!this._unmergeAvailable(e))return!1;return(0,n.ensureNotNull)(this.paneForSource(e)).dataSources().filter(this._unmergeAvailable,this).length>1}isMergeDownAvailableForSource(e){if(!this._unmergeAvailable(e))return!1;const t=this.paneForSource(e),i=this.panes();return t!==i[i.length-1]}isMergeUpAvailableForSource(e){if(!this._unmergeAvailable(e))return!1;return this.paneForSource(e)!==this.panes()[0]}sessions(){return(0,n.ensureNotNull)(this._sessions)}createSessions(e){(0,n.assert)(null===this._sessions,"Sessions are already created"),this.addCustomSource("sessions",((t,i)=>(this._sessions=new U(t,i,e),this._sessions.start(),this._sessions)),g.CustomSourceLayer.Background)}createPrePostMarket(e){this.addCustomSource("prePostMarket",((t,i)=>new PrePostMarket(t,i,e)))}replayStatus(){return this._replayStatus}setReplayStatus(e){this._replayStatus.setValue(e)}theme(){ -const e=this.properties().childs().paneProperties.state();delete e.topMargin,delete e.bottomMargin;const t=this.mainSeries().state().state;t&&(delete t.symbol,delete t.interval,delete t.currencyId,delete t.unitId);const i={mainSourceProperties:t,sessions:this.sessions().properties().state(),chartProperties:{paneProperties:e,scalesProperties:this.properties().childs().scalesProperties.state()},version:this.version()};return i.version=this.version(),i}onChartThemeLoaded(){return this._chartThemeLoaded}chartThemeLoaded(){this._chartThemeLoaded.fire()}state(e,t,i,s){var r;const n=this.publishedChartsTimelineSource(),o=this.properties().childs(),a=o.tradingProperties.state(),l={panes:this._panes.map((r=>r.state(!0,e,!1,t,i,s))),timeScale:this._timeScale.state(e),chartProperties:{paneProperties:o.paneProperties.state(),scalesProperties:o.scalesProperties.state(),publishedChartsTimelineProperties:n?n.state(e):void 0,chartEventsSourceProperties:null===(r=o.chartEventsSourceProperties)||void 0===r?void 0:r.state(),tradingProperties:a,priceScaleSelectionStrategyName:o.priceScaleSelectionStrategyName.value()},sessions:this.sessions().state(e),version:this.version(),timezone:this.timezone(),shouldBeSavedEvenIfHidden:this._shouldBeSavedEvenIfHidden};return s||(l.lineToolsGroups=this.lineToolsGroupModel().state(t)),l}restoreState(e,t,i){ye.instance(this).reset();const s={};if(!e.panes)return void Ui.logDebug("ChartModel.restoreState: invalid state");if(!Array.isArray(e.panes))return void Ui.logDebug("ChartModel.restoreState: invalid state");if(e.panes.length<1)return void Ui.logDebug("ChartModel.restoreState: invalid state");for(const e of this._barsMarksSources)this.detachSource(e);if(this._shouldBeSavedEvenIfHidden=void 0===e.shouldBeSavedEvenIfHidden||e.shouldBeSavedEvenIfHidden,e.chartProperties&&!e.chartProperties.timezone&&(e.chartProperties.timezone=e.timezone),e.chartProperties){const i=(0,B.factoryDefaults)("chartproperties").scalesProperties;(0,ie.merge)(i,e.chartProperties.scalesProperties),!("showLastValue"in i)||"showSeriesLastValue"in i||"showStudyLastValue"in i||(i.showSeriesLastValueProperty=i.showLastValue,i.showStudyLastValueProperty=i.showLastValue),"showSeriesLastValue"in i&&(s.showSeriesLastValueProperty=!0),"showStudyLastValue"in i&&(s.showStudyLastValueProperty=!0),(!this.isSnapshot()&&!this.readOnly()&&"showCurrency"in i||"showUnit"in i)&&((0,X.migrateShowCurrencyAndShowUnitProperties)(i.showCurrency,i.showUnit),delete i.showCurrency,delete i.showUnit),e.chartProperties.paneProperties.vertGridProperties=e.chartProperties.paneProperties.vertGridProperties||(0,ie.clone)(e.chartProperties.paneProperties.gridProperties),e.chartProperties.paneProperties.horzGridProperties=e.chartProperties.paneProperties.horzGridProperties||(0,ie.clone)(e.chartProperties.paneProperties.gridProperties),"backgroundType"in e.chartProperties.paneProperties||(e.chartProperties.paneProperties.backgroundType=St.ColorType.Solid),"separatorColor"in e.chartProperties.paneProperties||(e.chartProperties.paneProperties.separatorColor=(0, -d.getThemedColor)("color-chart-page-bg")),this._properties.childs().paneProperties.mergeAndFire(e.chartProperties.paneProperties),this._properties.childs().scalesProperties.mergeAndFire(i),e.chartProperties.timezone&&this._properties.childs().timezone.setValue(e.chartProperties.timezone),e.chartProperties.chartEventsSourceProperties&&this._properties.hasChild("chartEventsSourceProperties")&&this._properties.childs().chartEventsSourceProperties.mergeAndFire(e.chartProperties.chartEventsSourceProperties),e.chartProperties.tradingProperties&&this._properties.hasChild("tradingProperties")&&(void 0===e.chartProperties.tradingProperties.horizontalAlignment&&(e.chartProperties.tradingProperties.horizontalAlignment=(r=e.chartProperties.tradingProperties.lineLength)<=40?g.TradedGroupHorizontalAlignment.Right:r>=60?g.TradedGroupHorizontalAlignment.Left:g.TradedGroupHorizontalAlignment.Center),this._properties.childs().tradingProperties.mergeAndFire(e.chartProperties.tradingProperties)),this._timeScale.restoreState(e.timeScale,t),this._updateDateTimeFormatter()}var r;if(e.timeScale&&this._timeScale.restoreState(e.timeScale,t),!this.readOnly()){const t=this._getExceedingChildStudies(e.panes);if(t.length){for(let i=e.panes.length-1;i>=0;--i){const s=e.panes[i];for(let e=s.sources.length-1;e>=0;--e){const i=s.sources[e];~t.indexOf(i)&&s.sources.splice(e,1)}s.sources.length||e.panes.splice(i,1)}0}}const n=e.version||0,o=e.panes;let a="_seriesId";for(const e of o){const t=e.sources.find((e=>"MainSeries"===e.type));if(t){a=t.id;break}}this.panes()[0].restoreState(o[0],t,n,a,s,i,!0);let l=1;for(let r=1;rp&&h%100==0?{lines_limit_exceeded:!0,line_tools_count:h}:(this.panes().forEach((e=>this._dataSourceCollectionChanged.fire(e))),this._lineToolsGroupModel.fireChangedAll(),{})}shouldBeSavedEvenIfHidden(){return this._shouldBeSavedEvenIfHidden}setShouldBeSavedEvenIfHidden(e){this._shouldBeSavedEvenIfHidden=e}externalTimeStamp(e){const t=this.mainSeries().syncModel();return this.timeScale().points().roughTime(e,t&&t.projectTime.bind(t))} -syncLollipopSources(){null!==this._lollipopSourcesWatcher&&this._lollipopSourcesWatcher.syncSources()}restoreChartEvents(e){null!==this._lollipopSourcesWatcher&&this._options.chartEventsEnabled&&this._lollipopSourcesWatcher.restoreChartEvents(e)}recalcVisibleRangeStudies(e){this._recalcVRStudiesParams.force=this._recalcVRStudiesParams.force||Boolean(e),this._recalcVisibleRangeStudiesImplDebounced()}recalcColorStudies(e){this._recalcColorStudiesParams.force=this._recalcColorStudiesParams.force||Boolean(e),this._recalcColorStudiesImplDebounced()}recalcStudyBasedLineTools(){this.dataSources().forEach((e=>{(0,S.isStudyLineTool)(e)&&e.recalcStudyIfNeeded()}))}alertsWatcher(){return this._alertsWatcher}showLegend(){return this._showLegendProperty}id(){return this._id}selectPointMode(){return this._crossHairSelectPointMode}recalculatePriceRangeOnce(){const e=this.mainSeries();for(const t of this._panes)for(const i of t.priceDataSources())i.symbolSource()===e&&i.disablePriceRangeReady()}invalidate(e){var t;null===(t=this._invalidateHandler)||void 0===t||t.call(this,e)}appliedTimeFrame(){return this._appliedTimeFrame.appliedTimeFrame()}barsMarksSources(){return this._barsMarksSources}createSyncPoint(e,t){return(0,Vi.getDefault2Lazy)(this._syncPointCache,e.uniqueId,t.uniqueId,(()=>new mt(e,t)))}isAutoSaveEnabled(){return this._isAutoSaveEnabled}studyAwareDefaultRightOffset(){return this._timeScale.usePercentageRightOffset().value()?this._timeScale.percentsToBarIndexLength(this.studyAwareDefaultRightOffsetPercentage()):Math.max(this._timeScale.defaultRightOffset().value(),this._cachedStudiesMaxOffset)}studyAwareDefaultRightOffsetPercentage(){return this._timeScale.usePercentageRightOffset().value()?Math.max(this._timeScale.defaultRightOffsetPercentage().value(),this._timeScale.barIndexLengthToPercents(this._cachedStudiesMaxOffset)):this._timeScale.barIndexLengthToPercents(this.studyAwareDefaultRightOffset())}clearAllStudies(){this.dataSources().forEach((e=>{var t;return null===(t=e.clearData)||void 0===t?void 0:t.call(e)}))}setTimeScaleAnimation(e){const t=K.InvalidationMask.light();t.setTimeScaleAnimation(e),this.invalidate(t)}stopTimeScaleAnimation(){const e=K.InvalidationMask.light();e.stopTimeScaleAnimation(),this.invalidate(e)}lollipopSourcesOptions(){const e=this._options;return{chartEventsEnabled:!this._options.isSnapshot&&this._options.chartEventsEnabled,esdEnabled:e.esdEnabled,continuousContractSwitchesEnabled:e.continuousContractSwitchesEnabled,futuresContractExpirationEnabled:e.futuresContractExpirationEnabled,newsEnabled:e.newsEnabled}}_initAlertsList(){throw new Error("Not implemented")}_updateStudiesMaxOffset(){const e=Math.max(...this.allStudies().map((e=>e.maxOffset().value())));this._cachedStudiesMaxOffset=e;const t=this._timeScale.rightOffset();t<0||this._timeScale.setRightOffset(Math.max(t,e))}_updateBaseIndex(e,t){const i=this._timeScale,s=i.baseIndex(),r=i.visibleBarsStrictRange(),n=i.logicalRange();if(null!==n&&t){const t=n.contains(s),o=e-s;let a=t?null:i.rightOffset()-o -;if(!this._options.shiftVisibleRangeOnNewBar&&t){const e=i.indexToCoordinate(s)+i.barSpacing()/2+1,t=s-n.left()+o,l=e/t;if(l>=i.minBarSpacing()){i.setBarSpacing(l);a=i.width()/l-t}else(null==r?void 0:r.lastBar())!==s&&(a=i.rightOffset()-o)}null!==a&&i.setRightOffset(a)}i.setBaseIndex(e)}_createLollipopSourcesWatcher(){}_updateDateTimeFormatter(){const e=ot.dateFormatProperty.value(),t=void 0;if(this._dateFormatter=new nt.DateFormatter(e,t),this.mainSeries().isDWM())this._dateTimeFormatter=new nt.DateFormatter(e,t),this._timeFormatter=new Ke.TimeFormatter((0,Xe.getHourMinuteFormat)(Ye.timeHoursFormatProperty.value()));else{const i=T.Interval.parse(this.mainSeries().interval()),s=(0,Xe.getTimeFormatForInterval)(i,Ye.timeHoursFormatProperty.value());this._dateTimeFormatter=new rt.DateTimeFormatter({dateFormat:e,withWeekday:t,timeFormat:s,dateTimeSeparator:" "}),this._timeFormatter=new Ke.TimeFormatter(s)}}_setScalesResetAvailable(e){this._isScalesResetAvailable!==e&&(this._isScalesResetAvailable=e,this._isScalesResetAvailableChanged.fire())}_invalidationMaskForSource(e,t=K.InvalidationLevel.Light){if(e===this.crossHairSource())return K.InvalidationMask.cursor();if(this._watermarkSource===e)return this._paneInvalidationMask((0,n.ensureNotNull)(this.paneForSource(this.mainSeries())),t);if(-1!==this._allCustomSources.indexOf(e)){const e=new K.InvalidationMask;return e.invalidateAll(t),e}if(!(0,f.isDataSource)(e))return null;if(e.isMultiPaneEnabled())return new K.InvalidationMask(t);const i=this.paneForSource(e);return null!==i?this._paneInvalidationMask(i,t):null}_paneInvalidationMask(e,t=K.InvalidationLevel.Light){const i=new K.InvalidationMask,s=this._panes.indexOf(e);return i.invalidateAllPane(s,t),i}_invalidationMaskForSourcePriceScale(e,t=K.InvalidationLevel.Light){if(!(0,f.isDataSource)(e))return new K.InvalidationMask(t);const i=this.paneForSource(e);if(null===i)return null;let s=e.priceScale();if(null===s)return null;const r=this._panes.indexOf(i);let n=i.priceScalePosition(s);if("overlay"===n){const e=this._panes[r].defaultPriceScale();s=e,n=i.priceScalePosition(e)}const o=i.priceScaleIndex(s,n);if(void 0===o)return null;const a=new K.InvalidationMask;return a.invalidatePriceScale(r,n,o,t),a}_removeCustomSource(e){const t=this._customSourcesMap.get(e);if(void 0===t)return void Ui.logWarn(`Attempt to remove custom source which does not exist in the model - "${e}"`);Ui.logNormal(`Removing custom source "${e}"`),this.selectionMacro((e=>{e.removeSourceFromSelection(t)})),this._hoveredSource===t&&this.setHoveredSource(null),this._customSourceBeingMoved===t&&this.setMovingCustomSource(null,null);const i=ji(this._bgCustomSources,t),s=ji(this._fgCustomSources,t),r=ji(this._topmostCustomSources,t),o=ji(this._allCustomSources,t);(0,n.assert)(i||s||r,"Source should be presented in one of the layers"),(0,n.assert)(o,"Source should be presented in the array"),this._customSourcesMap.delete(e),t.destroy()}_updateShowLegendProperty(){ -const e=this._properties.childs().paneProperties.childs().legendProperties.childs().showLegend,t=this._showLegendProperty;if(e.value())t.setValue(!0);else{for(const e of this._panes){let i=0;for(const s of e.priceDataSources())if(s!==this.mainSeries()&&null!==s.statusView()&&(i++,i>1))return void t.setValue(!1)}t.setValue(!0)}}_pointToPercentPosition(e,t){return{x:e.x/this._timeScale.width(),y:e.y/(0,n.ensureNotNull)((0,n.ensureNotNull)(t.mainDataSource()).priceScale()).height()}}_percentPositionToPoint(e,t){const i=e.x*this._timeScale.width(),s=e.y*(0,n.ensureNotNull)((0,n.ensureNotNull)(t.mainDataSource()).priceScale()).height();return new o.Point(i,s)}_recalcVisibleRangeStudiesImpl(e){var t,i,s;if(e.timerId=null,this.timeScale().isEmpty())return;const r=this.timeScale().visibleBarsStrictRange();if(null===r)return;const n=this.mainSeries().bars(),o=n.search(r.firstBar(),Je.PlotRowSearchMode.NearestRight),a=n.search(r.lastBar(),Je.PlotRowSearchMode.NearestLeft),l=n.lastIndex(),c=o?o.index:void 0,h=a?a.index:void 0,d=c===e.oldStartVisibleIndex,u=h===e.oldEndVisibleIndex;if(d&&u&&!e.force)return;e.force=!1,e.oldStartVisibleIndex=void 0!==c?c:NaN,e.oldEndVisibleIndex=void 0!==h?h:NaN;const p={first_visible_bar_time:1e3*(null!==(t=null==o?void 0:o.value[0])&&void 0!==t?t:0),last_visible_bar_time:1e3*(null!==(i=null==a?void 0:a.value[0])&&void 0!==i?i:0),subscribeRealtime:(null==a?void 0:a.index)===l},_=null!==(s=e.studies)&&void 0!==s?s:this.priceDataSources();e.studies=void 0;for(const e of _)if((0,j.isStudy)(e)){const t=e.metaInfo().inputs,i=[];for(const e of t)p.hasOwnProperty(e.id)&&i.push(e.id);const s=e.properties().childs().inputs;for(const e of i)s.childs()[e].setValueSilently(p[e]);i.length>0&&s.listeners().fire(s)}}_recalcColorStudiesImpl(e){var t;e.timerId=null;const i=this.backgroundColorAtYPercentFromTop(.5),s=this.isDark()?l.colorsPalette["color-cold-gray-200"]:l.colorsPalette["color-cold-gray-900"],r=i===e.oldBgColor,n=s===e.oldFgColor;if(r&&n&&!e.force)return;e.force=!1,e.oldBgColor=i,e.oldFgColor=s;const o={__chart_bgcolor:i,__chart_fgcolor:s},a=null!==(t=e.studies)&&void 0!==t?t:this.priceDataSources();e.studies=void 0;for(const e of a)if((0,j.isStudy)(e)){const t=e.metaInfo().inputs,i=[];for(const e of t)o.hasOwnProperty(e.id)&&i.push(e.id);const s=e.properties().childs().inputs;for(const e of i)s.childs()[e].setValueSilently(o[e]);i.length>0&&s.listeners().fire(s)}}_getAllSources(e){const t=[];for(const i of this._panes){const s=i.sourcesByGroup().all();for(const i of s)e(i)&&t.push(i)}return t}_invalidateBarColorerCaches(){this.mainSeries().invalidateBarColorerCache()}_addAlertLabelToChart(e){throw new Error("Not implemented")}_removeAlertLabelFromChart(e){throw new Error("Not implemented")}_removeAllAlertLabelsFromChart(){throw new Error("Not implemented")}_updateTimeScale(e){var t,i,s,r;const{index:n,zoffset:o,values:a,indexDiffs:l,baseIndex:c,marks:h,clearFlag:d}=e;if(d){this._timeScale.reset();for(const e of this.dataSources())null===(t=e.clearData)||void 0===t||t.call(e)} -if(l.length>0)for(const e of this.dataSources())null===(i=e.moveData)||void 0===i||i.call(e,l);const u=this._timeScale.indexToTimePoint(this._timeScale.baseIndex()),p=this._timeScale.canNormalize();this._timeScale.update(n,o,a,h);const _=this._timeScale.points().range().value();let m="ChartModel.prototype._updateTimeScale("+n+","+o+","+a.length+","+l.length+","+h.length+","+d+")";if(m+="TimeScale: {first:"+(null!==(s=null==_?void 0:_.firstIndex)&&void 0!==s?s:null)+",last:"+(null!==(r=null==_?void 0:_.lastIndex)&&void 0!==r?r:null)+"}",null===c){this._timeScale.resetBaseIndex();const e=this._timeScale.rightOffset();e<0?this._timeScale.setRightOffset(this.studyAwareDefaultRightOffset()):this._timeScale.setRightOffset(Math.max(e,this._cachedStudiesMaxOffset))}else if(void 0!==c){const e=this._timeScale.indexToTimePoint(c),t=null!==u&&null!==e&&e>u;this._updateBaseIndex(c,t)}if(Ui.logDebug(m),!p&&p!==this._timeScale.canNormalize())for(const e of this.dataSources())!(0,S.isLineTool)(e)||e.isFixed()||e.isSourceHidden()||e.processHibernate();this.recalculateAllPanes((0,W.globalChangeEvent)()),this.lightUpdate()}_getAvailableCurrencies(){return!this.currencyConversionEnabled()||this.isSnapshot()?[]:(0,ie.isArray)(this._availableCurrenciesList)?this._availableCurrenciesList:(null!==this._availableCurrenciesList||(this._availableCurrenciesList=this.chartApi().availableCurrencies(),this._availableCurrenciesList.then((e=>{this._destroyed||(this._availableCurrenciesList=e,this.fullUpdate())})).catch((e=>{Ui.logWarn(`An error occurred while getting currencies config: ${e}`)}))),[])}_getAvailableUnits(){return!this.unitConversionEnabled()||this.isSnapshot()?{}:this._availableUnitsObject instanceof Promise||null===this._availableUnitsObject?(null!==this._availableUnitsObject||(this._availableUnitsObject=this.chartApi().availableUnits(),this._availableUnitsObject.then((e=>{this._destroyed||(this._availableUnitsObject=e,this.fullUpdate())})).catch((e=>{Ui.logWarn(`An error occurred while getting units config: ${e}`)}))),{}):this._availableUnitsObject}_getBackgroundColor(e){const t=this._properties.childs().paneProperties.childs();if(t.backgroundType.value()===St.ColorType.Gradient){const i=t.backgroundGradientStartColor.value(),s=t.backgroundGradientEndColor.value();return e?i:s}return t.background.value()}_updateBackgroundColor(){this._backgroundColor.setValue(this._getBackgroundColor()),this._backgroundTopColor.setValue(this._getBackgroundColor(!0))}_syncCrosshair(e){if(!this._isSettingsExternalPosition){const t=this._undoModel.chartWidget(),i=this._undoModel.mainSeries(),s=i.syncModel(),r=this._undoModel.crossHairSource(),n=r.pane;if(null!==s&&null!==n){const o={timeStamp:this._timeScale.points().roughTime(r.index,s.projectTime.bind(s)),syncSourceTarget:s.syncSourceTarget()};n.mainDataSource()===i&&(o.price=r.price,o.symbol=i.symbol());let a=this._lineBeingCreated||null!==this._linePointBeingEdited||Boolean(this._sourcesBeingMoved.length);a=a&&(0,gt.drawOnAllCharts)().value(),t.chartWidgetCollection().syncCrosshair(o,t.id(),a,e)} -this._phantomSourceContainer.onCursorPositionUpdated()}}_gotoTimeImpl(e,t){const i=this.timeScale(),s=this.mainSeries();let r;if(void 0!==e){if(this._scrollingState&&this._scrollingState.deferred.reject(),r=(0,p.createDeferredPromise)(),!s.isDWM()){const t=s.symbolInfo();if(null!==t){let i=this.properties().childs().timezone.value();"exchange"===i&&(i=t.timezone);const r=(0,ht.cal_to_utc)((0,ht.get_timezone)(i),new Date(e)),n=(0,At.createTimeToBarTimeAligner)(s.interval(),t)(r);e=(0,ht.utc_to_cal)((0,ht.get_timezone)(i),n).getTime()}}this._scrollingState={targetDate:e,deferred:r,centerIfVisible:t.centerIfVisible}}else{if(!this._scrollingState)return Ui.logError("scrollTo called without an argument"),Promise.reject();e=this._scrollingState.targetDate,r=this._scrollingState.deferred}if(void 0===i.tickMarks().minIndex)return r.resolve(void 0),r.promise;this.stopTimeScaleAnimation();let o=((e,t)=>{if((e=>(0,n.ensureNotNull)(i.tickMarks().indexToTime((0,n.ensureDefined)(i.tickMarks().minIndex))).valueOf()-e)(t)<0){let r=i.tickMarks().nearestIndex(t);const o=s.bars().lastIndex();if(null===o)return null;r=Math.min(r,o);let a=(0,n.ensureNotNull)(i.tickMarks().indexToTime(r)).valueOf();for(;a1&&s.push(e)),n=(n+1)%t.length}return s}}},50745:(e,t,i)=>{"use strict";i.d(t,{japaneseChartStyles:()=>r,commonChartStyles:()=>n,allChartStyles:()=>o});var s=i(2484);function r(){return s.enabled("japanese_chart_styles"),[8]}function n(){const e=[0,1,9,13,2,3,10];return s.enabled("chart_style_hilo")&&e.push(12),e}function o(){return n().concat(r())}},94533:(e,t,i)=>{"use strict";i.d(t,{ -ChartUndoModelBase:()=>ji});var s=i(85459),r=i.n(s),n=i(16230),o=i(50151),a=i(86441),l=i(44352),c=i(41207),h=i(25071),d=i(58403),u=i(45673),p=i(578);function _(e,t){return!!p.Interval.isEqual(e.res,t.res)&&(0,u.areEqualTimeFrames)(e.val,t.val)}var m=i(43426),g=i(39969),f=i(6250),v=i(70439),S=i(68671),y=i(51768),b=i(72006),w=i(2484),C=i(46627),P=i(98351),T=i(89215),x=i(47539),I=i(65665);const M=new x.TranslatedString("move all scales to left",l.t(null,void 0,i(81898))),A=new x.TranslatedString("move all scales to right",l.t(null,void 0,i(22863))),L=(0,P.getLogger)("Chart.MergeAllScales");var k=i(71733);class E extends k.UndoCommand{constructor(e,t,i,s,r,n){super(n),this._model=e,this._paneIndex=e.panes().indexOf(t),this._targetPosition=s,this._targetIndex=r,this._scaleId=i.id(),this._sourcePosition=t.priceScalePosition(i),"overlay"!==this._sourcePosition&&(this._sourceIndex=t.priceScaleIndex(i,this._sourcePosition))}redo(){const e=this._model.panes()[this._paneIndex],t=(0,o.ensureNotNull)(e.getPriceScaleById(this._scaleId));e.movePriceScale(t,this._targetPosition,this._targetIndex),this._model.fullUpdate()}undo(){const e=this._model.panes()[this._paneIndex],t=(0,o.ensureNotNull)(e.getPriceScaleById(this._scaleId));e.movePriceScale(t,this._sourcePosition,this._sourceIndex),this._model.fullUpdate()}}class D extends k.UndoCommand{constructor(e,t,i,s){super(s),this._createdIds=[],this._model=e,this._withoutShift=i,this._origStates=t.map((e=>e.state(!0)));const r=e.lineToolsGroupModel();this._origGroups=t.map((e=>{const t=r.groupForLineTool(e);return t&&t.id}))}redo(){const e=this._model.lineToolsGroupModel(),t=this._origStates.map(((t,i)=>{const s=(0,o.ensureNotNull)(this._model.dataSourceForId(t.id)),r=0===this._createdIds.length?void 0:(0,o.ensureDefined)(this._createdIds[i]),n=(0,f.cloneLineTool)(this._model,s,!this._withoutShift,r),a=(0,o.ensureNotNull)(s.priceScale());(0,o.ensureNotNull)(this._model.paneForSource(s)).addDataSource(n,a,!1);const l=this._origGroups[i];if(null!==l){const t=e.groupForId(l);t&&t.addLineTools([n])}return this._model.updateSource(n),n}));0===this._createdIds.length&&(this._createdIds=t.map((e=>e.id()))),this._model.selectionMacro((e=>{e.clearSelection(),t.forEach((t=>{e.addSourceToSelection(t)}))})),this._model.setShouldBeSavedEvenIfHidden(!0)}undo(){const e=this._model.lineToolsGroupModel();this._createdIds.forEach((t=>{const i=(0,o.ensureNotNull)(this._model.dataSourceForId(t)),s=e.groupForLineTool(i);null!==s&&s.excludeLineTool(i),this._model.removeSource(i)}))}newIds(){return this._createdIds}}var V=i(34853),B=i(65071);class R extends k.UndoCommand{constructor(e,t,i,s=!0){super(i,s),this._newStates=[],this._model=e,this._savedStates=t.map((e=>e.state(!1)))}redo(){this._applyState(this._newStates)}undo(){0===this._newStates.length&&this.saveNewState(),this._applyState(this._savedStates)}saveNewState(){const e=this._savedStates.filter(I.notNull).map((e=>(0,o.ensureNotNull)(this._model.dataSourceForId(e.id))));this._newStates=e.map((e=>e.state(!1)))}_applyState(e){ -for(const t of e)if(null!==t){const e=this._model.dataSourceForId(t.id);if(null!==e)if((0,T.isStudy)(e)){const i=t.state.inputs,s=e.properties().childs().inputs.childs();for(const e in i)s[e]&&s[e].setValue(i[e])}else this._model.restoreLineToolState(e,t,!0)}}}var N=i(52934),O=i(11426),F=i(50841),W=i(58631);const H=new x.TranslatedString("create {tool}",l.t(null,void 0,i(81791)));class z extends k.UndoCommand{constructor(e,t,i,s,r=0,n){super(H.format({tool:new x.TranslatedString(i,W.lineToolsLocalizedNames[i])}),!1),this._lineId=null,this._lineState=null,this._model=e,this._paneIndex=e.panes().indexOf(t),this._lineTool=i,this._ownerSourceId=s.id(),this._lineId=null!=n?n:null,this._drawOnAllChartsMode=r}startCreatingLine(e,t,i){var s;const r=this._model.panes()[this._paneIndex],n=this._model.dataSourceForId(this._ownerSourceId),o=this._model.createLineTool(r,e,this._lineTool,t,i,n,null!==(s=this._lineId)&&void 0!==s?s:void 0);return this._lineId=o.id(),!this._model.lineBeingCreated()}continueCreatingLine(e,t,i,s){const r=this._model.continueCreatingLine(e,t,i,s);return r&&this._model.setShouldBeSavedEvenIfHidden(!0),r}line(){return null===this._lineId?null:this._model.dataSourceForId(this._lineId)}undo(){const e=this.line();null!==e&&(this._lineState=e.state(!1),this._model.removeSource(e),this._lineId=null)}redo(){if(null===this._lineState)return;const e=this._model.restoreSource(!1,this._paneIndex,null,(0,o.ensureNotNull)(this._lineState),null);null!==e&&(this._lineId=e.id(),this._lineState=null,e.share(this._drawOnAllChartsMode))}drawOnAllCharts(){return 0!==this._drawOnAllChartsMode}}const U=new x.TranslatedString("bring {title} to front",l.t(null,void 0,i(78246))),j=new x.TranslatedString("send {title} to back",l.t(null,void 0,i(66781))),G=new x.TranslatedString("insert {title} after {targetTitle}",l.t(null,void 0,i(53146))),q=new x.TranslatedString("insert {title} before {targetTitle}",l.t(null,void 0,i(67176))),$=new x.TranslatedString("send {title} backward",l.t(null,void 0,i(16259))),Y=new x.TranslatedString("bring {title} forward",l.t(null,void 0,i(56763))),K=new x.TranslatedString("send group {title} backward",l.t(null,void 0,i(4998))),X=new x.TranslatedString("bring group {title} forward",l.t(null,void 0,i(27195)));function Z(e){return new x.TranslatedString(e.name(),e.title())}class J extends k.UndoCommand{constructor(e,t,i){super(i),this._sourcesByPanes=new Map,this._originalState=new Map,this._model=e,t.forEach((t=>{const i=(0,o.ensureNotNull)(e.paneForSource(t)),s=e.panes().indexOf(i),r=this._sourcesByPanes.get(s)||[];r.push(t.id()),this._sourcesByPanes.set(s,r)})),Array.from(this._sourcesByPanes.keys()).forEach((t=>{const i=e.panes()[t],s=new Map;i.sourcesByGroup().allIncludingHidden().forEach((e=>{s.set(e.id(),e.zorder())})),this._originalState.set(t,s)}))}undo(){this._originalState.forEach(((e,t)=>{const i=this._model.panes()[t],s=new Map;e.forEach(((e,t)=>{const r=(0,o.ensureNotNull)(i.dataSourceForId(t));s.set(r,e)})),i.setZOrders(s)}))}redo(){this._sourcesByPanes.forEach(((e,t)=>{ -const i=this._model.panes()[t],s=e.map((e=>(0,o.ensureNotNull)(i.dataSourceForId(e))));this._paneOperation(i,s)}))}}class Q extends J{constructor(e,t){super(e,t,U.format({title:Z(t[0])}))}_paneOperation(e,t){e.bringToFront(t)}}class ee extends J{constructor(e,t){super(e,t,j.format({title:Z(t[0])}))}_paneOperation(e,t){e.sendToBack(t)}}class te extends J{constructor(e,t,i,s){super(e,t,s),this._targetSource=i}_paneOperation(e,t){e.insertAfter(t,this._targetSource)}}class ie extends te{constructor(e,t,i){super(e,t,i,G.format({title:Z(t[0]),targetTitle:Z(i)}))}}class se extends J{constructor(e,t,i,s){super(e,t,s),this._targetSource=i}_paneOperation(e,t){e.insertBefore(t,this._targetSource)}}class re extends se{constructor(e,t,i){super(e,t,i,q.format({title:Z(t[0]),targetTitle:Z(i)}))}}function ne(e,t){const i=t[0],s=e.sourcesByGroup().all().filter((e=>e.zorder()e.zorder()>i.zorder()));if(0===s.length)throw new Error("Cannot bring forward source that alreadt on back");let r=s[0];if((0,f.isLineTool)(r)){const t=e.model().lineToolsGroupModel().groupForLineTool(r);if(null!==t){const e=t.lineTools();r=e[e.length-1]}}return r}class le extends te{constructor(e,t,i){super(e,i,ae(t,i),Y.format({title:Z(i[0])}))}}function ce(e,t){return(0,o.ensureNotNull)(e.paneForSource(t.lineTools()[0]))}class he extends se{constructor(e,t){super(e,t.lineTools(),ne(ce(e,t),t.lineTools()),K.format({title:t.name()}))}}class de extends te{constructor(e,t){super(e,t.lineTools(),ae(ce(e,t),t.lineTools()),X.format({title:t.name()}))}}const ue=new x.TranslatedString("rearrange panes",l.t(null,void 0,i(33348)));class pe extends k.UndoCommand{constructor(e,t,i){super(ue),this._chartModel=e,this._index=t,(0,I.isNumber)(i)?this._dstIndex=i:this._dstIndex="up"===i?t-1:t+1}redo(){this._checkIndices()&&this._chartModel.movePane(this._index,this._dstIndex)}undo(){this._checkIndices()&&this._chartModel.movePane(this._dstIndex,this._index)}_checkIndices(){const e=this._chartModel.panes().length;return this._index>=0&&this._index=0&&this._dstIndexe.id()))}redo(){const e=(0,o.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId));this._model.lineToolsGroupModel().removeGroup(e)}undo(){const e=this._lineToolsIds.map((e=>this._model.dataSourceForId(e))),t=new Pe.LineToolsGroup(e,this._groupName,this._groupId);this._model.lineToolsGroupModel().addGroup(t)}}const xe=new x.TranslatedString("create line tools group",l.t(null,void 0,i(3195)));class Ie extends k.UndoCommand{constructor(e,t){super(xe),this._groupId=null,this._model=e,this._sourcesIds=t.map((e=>e.id()))}redo(){const e=this._sourcesIds.map((e=>this._model.dataSourceForId(e))),t=null===this._groupId?void 0:this._groupId -;this._groupId=this._model.lineToolsGroupModel().createGroup(e,this._title,t).id}undo(){const e=(0,o.ensureNotNull)(this._model.lineToolsGroupModel().groupForId((0,o.ensureNotNull)(this._groupId)));this._model.lineToolsGroupModel().removeGroup(e)}createdGroupId(){return this._groupId}}const Me=new x.TranslatedString("add line tool(s) to group {group}",l.t(null,void 0,i(40242)));class Ae extends k.UndoCommand{constructor(e,t,i){super(Me.format({group:t.name()})),this._model=e,this._groupId=t.id,this._lineToolsIds=i.map((e=>e.id()))}redo(){const e=(0,o.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId)),t=this._lineToolsIds.map((e=>this._model.dataSourceForId(e)));e.addLineTools(t)}undo(){const e=this._lineToolsIds.map((e=>this._model.dataSourceForId(e)));(0,o.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId)).excludeLineTools(e)}}class Le extends k.UndoCommand{constructor(e,t,i,s,r){super(i),this._targetObj=e,this._newValue=t,this._oldValue=this._targetObj.value(),this._model=s,r&&this.setCustomFlag("doesnt_affect_save",!0)}redo(){(0,ge.saveDefaultProperties)(!0),this._targetObj.setValue(this._newValue),(0,ge.saveDefaultProperties)(!1),this._model.recalculateAllPanes((0,ye.globalChangeEvent)()),this._model.lightUpdate()}undo(){(0,ge.saveDefaultProperties)(!0),this._targetObj.setValue(this._oldValue),(0,ge.saveDefaultProperties)(!1),this._model.recalculateAllPanes((0,ye.globalChangeEvent)()),this._model.lightUpdate()}}class ke extends k.UndoCommand{constructor(e,t,i,s){super(s),this._chartModel=e,this._groupId=t.id,this._oldName=t.name(),this._newName=i}redo(){(0,o.ensureNotNull)(this._chartModel.lineToolsGroupModel().groupForId(this._groupId)).setName(this._newName)}undo(){(0,o.ensureNotNull)(this._chartModel.lineToolsGroupModel().groupForId(this._groupId)).setName(this._oldName)}}var Ee=i(76076);const De=new x.TranslatedString("create line tools group from selection",l.t(null,void 0,i(92659))),Ve=new x.TranslatedString("removing line tools group {name}",l.t(null,void 0,i(78811))),Be=new x.TranslatedString("add line tool {lineTool} to group {name}",l.t(null,void 0,i(99113))),Re=new x.TranslatedString("make group {group} visible",l.t(null,void 0,i(87927))),Ne=new x.TranslatedString("make group {group} invisible",l.t(null,void 0,i(45223))),Oe=new x.TranslatedString("lock group {group}",l.t(null,void 0,i(4963))),Fe=new x.TranslatedString("unlock group {group}",l.t(null,void 0,i(51114))),We=new x.TranslatedString("rename group {group} to {newName}",l.t(null,void 0,i(16338)));class He{constructor(e){this._lineToolsAffectChartInvalidation=new C.FeatureToggleWatchedValue("do_not_invalidate_chart_on_changing_line_tools",!1),this._environment=e}createGroupFromSelection(){const e=this._environment.model();(0,o.assert)(!e.selection().isEmpty(),"Cannot create group from empty selection");const t=(0,F.sortSources)(e.selection().lineDataSources());(0,o.assert)(t.length===e.selection().allSources().length,"A group could contain line tools only") -;const i=t.length>1||null!==this._environment.model().lineToolsGroupModel().groupForLineTool(t[0]),s=t.reduce(((e,t)=>e.zorder()>t.zorder()?e:t),t[0]);let r=s;const n=e.lineToolsGroupModel().groupForLineTool(s);if(null!==n){const e=n.lineTools();r=e[e.length-1]}this._environment.beginUndoMacro(De,this._lineToolsAffectChartInvalidation.value());const a=new Map,l=new Set;t.forEach((t=>{const i=this._groupForLineTool(t);if(null===i)return;const s=a.get(i)||[];s.push(t),a.set(i,s);const r=(0,o.ensureNotNull)(e.paneForSource(t));l.add(r)})),(0,o.assert)(l.size<=1,"All selected sources should be on the same pane"),a.forEach(((t,i)=>{const s=new B.ExcludeLineToolsFromGroupUndoCommand(e,i,t);this._environment.pushUndoCommand(s)}));const c=new Ie(e,(0,F.sortSources)(t));if(this._environment.pushUndoCommand(c),i){const i=new ie(e,t,r);this._environment.pushUndoCommand(i)}this._environment.endUndoMacro();const h=(0,o.ensureNotNull)(c.createdGroupId());return(0,o.ensureNotNull)(e.lineToolsGroupModel().groupForId(h))}removeGroup(e){const t=this._environment.model(),i=e.lineTools();this._environment.beginUndoMacro(Ve.format({name:e.name()}),this._lineToolsAffectChartInvalidation.value());const s=new Te(t,e,null);this._environment.pushUndoCommand(s);const r=new V.RemoveSourcesCommand(t,i,null);this._environment.pushUndoCommand(r);const n=t.mainSeries().symbol();i.forEach((e=>{null!==e.linkKey().value()&&(0,Ee.removeLineTool)({withUndo:!0,model:t,symbol:n,sourceTitle:new x.TranslatedString(e.name(),e.title()),lineToolState:e.state(!1),linkKey:(0,o.ensureNotNull)(e.linkKey().value())})})),this._environment.endUndoMacro()}groups(){return this._environment.model().lineToolsGroupModel().groups()}excludeLineToolFromGroup(e,t){const i=this._environment.model(),s=new B.ExcludeLineToolsFromGroupUndoCommand(i,e,[t]);s.setCustomFlag("doesnt_affect_save",this._lineToolsAffectChartInvalidation.value()),this._environment.pushUndoCommand(s)}addLineToolToGroup(e,t){const i=this._environment.model(),s=i.lineToolsGroupModel().groupForLineTool(t);if(s===e)return;const r=Be.format({lineTool:new x.TranslatedString(t.name(),t.title()),name:e.name()});this._environment.beginUndoMacro(r,this._lineToolsAffectChartInvalidation.value()),null!==s&&this._environment.pushUndoCommand(new B.ExcludeLineToolsFromGroupUndoCommand(i,s,[t])),this._environment.pushUndoCommand(new Ae(i,e,[t])),this._environment.endUndoMacro()}bringToFront(e){const t=this._environment.model(),i=new Q(t,e.lineTools());i.setCustomFlag("doesnt_affect_save",this._lineToolsAffectChartInvalidation.value()),this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])}sendToBack(e){const t=this._environment.model(),i=new ee(t,e.lineTools());i.setCustomFlag("doesnt_affect_save",this._lineToolsAffectChartInvalidation.value()),this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])}bringForward(e){const t=this._environment.model(),i=new de(t,e) -;i.setCustomFlag("doesnt_affect_save",this._lineToolsAffectChartInvalidation.value()),this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])}sendBackward(e){const t=this._environment.model(),i=new he(t,e);i.setCustomFlag("doesnt_affect_save",this._lineToolsAffectChartInvalidation.value()),this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])}insertAfter(e,t){const i=this._environment.model();let s;if(t instanceof Pe.LineToolsGroup){const e=t.lineTools();s=e[e.length-1]}else s=t;const r=new ie(i,e.lineTools(),s);this._environment.pushUndoCommand(r),this._environment.emitEvent("changeZOrder",[e.lineTools()])}insertBefore(e,t){const i=this._environment.model();let s;if(t instanceof Pe.LineToolsGroup){s=t.lineTools()[0]}else s=t;const r=new re(i,e.lineTools(),s);this._environment.pushUndoCommand(r),this._environment.emitEvent("changeZOrder",[e.lineTools()])}availableZOrderOperations(e){const t=this._environment.model(),i=e.lineTools(),s=i[0],r=i[i.length-1],n=(0,o.ensureNotNull)(t.paneForSource(i[0])).sourcesByGroup().allExceptSpecialSources(),a=n[0],l=n[n.length-1];return{bringForwardEnabled:r!==l,bringToFrontEnabled:r!==l,sendBackwardEnabled:s!==a,sendToBackEnabled:s!==a}}setGroupVisibility(e,t){const i=(t?Re:Ne).format({group:e.name()}),s=this._environment.model();this._environment.beginUndoMacro(i,this._lineToolsAffectChartInvalidation.value()),e.lineTools().forEach((e=>{const i=e.properties().visible,r=new Le(i,t,null,s);this._environment.pushUndoCommand(r)})),this._environment.endUndoMacro()}setGroupLock(e,t){const i=(t?Oe:Fe).format({group:e.name()}),s=this._environment.model();this._environment.beginUndoMacro(i,this._lineToolsAffectChartInvalidation.value()),e.lineTools().forEach((e=>{const i=e.properties().frozen,r=new Le(i,t,null,s);this._environment.pushUndoCommand(r)})),this._environment.endUndoMacro()}setGroupName(e,t){const i=this._environment.model(),s=We.format({group:e.name(),newName:t}),r=new ke(i,e,t,s);r.setCustomFlag("doesnt_affect_save",this._lineToolsAffectChartInvalidation.value()),this._environment.pushUndoCommand(r)}canBeGroupped(e){const t=this._environment.model();return new Set(e.map((e=>t.paneForSource(e)))).size<=1}_groupForLineTool(e){return this._environment.model().lineToolsGroupModel().groups().find((t=>t.containsLineTool(e)))||null}}var ze=i(58121),Ue=i(26989),je=i(62472),Ge=i(12033);const qe=new x.TranslatedString("apply study template {template}",l.t(null,void 0,i(26065)));function $e(e){for(const t of e.panes)for(const e of t.sources)if((0,je.isMainSeriesState)(e))return e.id;return null}class Ye extends k.UndoCommand{constructor(e,t,i){var s,r;super(qe.format({template:i})),this._newSymbolParams={},this._model=e,this._templateContent=function(e,t){const i=(0,ze.default)({},e),s=(0,o.ensureNotNull)($e(i));for(const e of i.panes){e.mainSourceId===s&&(e.mainSourceId=t);for(const i of e.sources)if(i.id===s){i.id=t;const r=e=>{const i=e.indexOf(s);-1!==i&&e.splice(i,1,t)} -;if(e.leftAxisesState&&e.rightAxisesState?(e.leftAxisesState.forEach((e=>r(e.sources))),e.rightAxisesState.forEach((e=>r(e.sources)))):(r(e.leftAxisSources),r(e.rightAxisSources)),e.overlayPriceScales){const i=e.overlayPriceScales[s];i&&(delete e.overlayPriceScales[s],e.overlayPriceScales[t]=i)}}else i.ownerSource===s&&(i.ownerSource=t)}return i}(t,e.mainSeries().id()),this._initialState=e.studyTemplate(!0,!0,!0);const n=e.mainSeries();t.symbol&&(this._newSymbolParams={symbol:t.symbol,currency:null!==(s=t.currency)&&void 0!==s?s:null,unit:null!==(r=t.unit)&&void 0!==r?r:null}),t.interval&&(this._newSymbolParams.interval=t.interval,this._newSymbolParams.style=(0,fe.getChartStyleByResolution)(t.interval,n.style())),this._initialSymbolParams={symbol:n.symbol(),currency:n.currency(),unit:n.unit(),interval:n.interval(),style:n.style()},this._initialState=e.studyTemplate(),this._initialGroupsState=e.lineToolsGroupModel().state()}redo(){this._model.mainSeries().setSymbolParams(this._newSymbolParams);const e=this._merge(this._templateContent).filter(f.isLineTool);this._model.lineToolsGroupModel().removeLineTools(e);const t=this._model.mainSeries().properties();(0,fe.preparePriceAxisProperties)(t),this._model.recalcVisibleRangeStudies(!0),this._model.setShouldBeSavedEvenIfHidden(!0)}undo(){this._model.mainSeries().setSymbolParams(this._initialSymbolParams),this._merge(this._initialState)}_merge(e){const t=e.version||0,i=this._model,s=i.mainSeries();(0,o.assert)(s.id()===$e(e)),s.priceScale().properties().childs().lockScale.setValue(!1);const r=i.panes(),n=[];for(let e=r.length;e--;){const t=r[e],i=t.containsMainSeries(),s=t.dataSources();for(let e=s.length;e--;){const t=s[e];(!i||(0,T.isStudy)(t)&&t.isRemovedByStudyTemplates())&&n.push(t)}}i.resetDeferredStudies();const a=(0,Ue.closeSourcesSet)(i,n);for(let e=0;ee.zorder-t.zorder));for(let e=0;e-1,a=o?r[e]:i.createPane(e);o&&t<3&&(0,Ge.reorderDataSourcesStateZOrder)(n.sources),a.restoreState(n,!1,t),null!==a.mainDataSource()||i.removePane(a)}return i.syncLollipopSources(),s.priceScale().setMode({autoScale:!0}),i.startNotStartedStudies(),i.recalculateAllPanes((0,ye.globalChangeEvent)()),i.fullUpdate(),a}}var Ke=i(21580);const Xe=(0,P.getLogger)("Chart.ChartUndoModel"),Ze=new x.TranslatedString("paste drawing",l.t(null,void 0,i(96916)));class Je extends k.UndoCommand{constructor(e,t,i,s,r){super(Ze),this._needCopyToOtherCharts=!1,this._sourceState=null,this._model=e,this._clipboardData=t,this._paneIndex=this._model.panes().indexOf(i||(0,o.ensureNotNull)(this._model.paneForSource(this._model.mainSeries()))),this._pasteWithData=!!s,this._keepZIndex=!!r}redo(){const e=this._model.panes()[this._paneIndex],t=(0,o.ensureNotNull)(e.clipboardLineToolOwnerSource(this._clipboardData.source.id)) -;null===this._sourceState&&(this._sourceState=this._getSourceState(t));const i=(0,o.ensureNotNull)(e.restoreLineTool(this._sourceState,this._pasteWithData,this._keepZIndex,void 0,t));(0,o.ensureNotNull)(t.priceScale()).addDataSource(i),this._clipboardData.centeredOnChart&&i.centerPosition&&i.centerPosition(),i.restoreFixedPoint(),i.createServerPoints();const s=(0,Ke.isActingAsSymbolSource)(t)||t.metaInfo().is_price_study;this._needCopyToOtherCharts=Boolean(s&&((0,Ee.drawOnAllCharts)().value()||i.linkKey().value()&&i.isSynchronizable())),this._model.setShouldBeSavedEvenIfHidden(!0)}undo(){if(!this._sourceState)return void Xe.logError("This command was never executed - nothing to undo");const e=this.source();this._clipboardData.centeredOnChart&&(this._clipboardData.centeredOnChart=!1,this._sourceState.points=e.normalizedPoints()),this._model.removeSource(e)}source(){return(0,o.ensureNotNull)(this._model.dataSourceForId((0,o.ensureNotNull)(this._sourceState).id))}needCopyToOtherCharts(){return this._needCopyToOtherCharts}_getSourceState(e){const t=(0,I.clone)(this._clipboardData.source);delete t.state.symbol,null!=t.linkKey&&(t.linkKey=(0,S.randomHash)());const i=(0,o.ensureNotNull)(e.priceScale()),s=this._model,{symbol:r,currencyId:n,unitId:l}=this._clipboardData.source.state,c=(0,o.ensureNotNull)(e.symbolSource());let h=!1;!c.symbolSameAsCurrent(r)||(null!==n?n!==(0,fe.symbolCurrency)(c.symbolInfo(),void 0,!0):c.isConvertedToOtherCurrency())||(null!==l?l!==(0,fe.symbolUnit)(c.symbolInfo(),this._model.unitConversionEnabled()):c.isConvertedToOtherUnit())||((0,Ke.isActingAsSymbolSource)(e)?h=!0:(0,T.isStudy)(e)&&(h=Boolean(e.metaInfo().is_price_study)));const d=e=>{const t=e.x*s.timeScale().width(),r=e.y*i.height()-40;return new a.Point(t,r)},u=(0,o.ensureNotNull)(e.firstValue());if(this._model.id()===this._clipboardData.modelId||!h)for(let e=0;ee.id())),this._inputs=i,this._targetZOrder=h,this._preferredPriceScale=o,this._allowChangeCurrency=a,this._allowChangeUnit=l,this._paneSize=c}redo(){ -const e=this._parentIds.map((e=>this._chartModel.dataSourceForId(e))),t=this._chartModel.insertStudyWithParams(this._studyMetaInfo,this._inputs,this._targetZOrder,this._props,this._addAsOverlay,e,this._preferredPriceScale,this._allowChangeCurrency,this._allowChangeUnit,this._paneSize,null===this._studyId?void 0:this._studyId);if(this._studyId=t.id(),t.childStudyByRebind().subscribe(null,(()=>(0,y.trackEvent)("SOS","Apply SOS","Rebind SOS"))),this._chartModel.setShouldBeSavedEvenIfHidden(!0),null!==this._paneState){(0,o.ensureNotNull)(this._chartModel.paneForSource(t)).restoreState(this._paneState,!1,this._chartModel.version()),this._paneState=null}}undo(){const e=(0,o.ensureNotNull)(this._chartModel.dataSourceForId((0,o.ensureNotNull)(this._studyId))),t=(0,o.ensureNotNull)(this._chartModel.paneForSource(e)).state();this._chartModel.removeSource(e)&&(this._paneState=t)}insertedStudy(){return this._chartModel.dataSourceForId((0,o.ensureNotNull)(this._studyId))}}var ut=i(5440),pt=i(96196),_t=i.n(pt),mt=i(50337),gt=i(8771);const ft=new x.TranslatedString("zoom",l.t(null,void 0,i(59833)));class vt extends k.UndoCommand{constructor(e,t,i,s,r,n){super(ft),this._barSpacing=null,this._rightBarsOffset=null,this._leftBarsOffset=null,this._priceMode=null,this._model=e,this._startBar=t,this._endBar=i,this._startPrice=s,this._endPrice=r,this._pane=n}redo(){const e=(0,o.ensureNotNull)(this._model.timeScale().visibleBarsStrictRange());this._leftBarsOffset=e.firstBar()-this._startBar,this._rightBarsOffset=e.lastBar()-this._endBar,this._barSpacing=this._model.timeScale().barSpacing(),this._priceMode=this._pane.defaultPriceScale().mode(),this._model.zoomToViewport(this._startBar,this._endBar,this._startPrice,this._endPrice,this._pane)}undo(){const e=this._model.timeScale(),t=this._pane.defaultPriceScale(),i=(0,o.ensureNotNull)(e.visibleBarsStrictRange());e.setBarSpacing((0,o.ensureNotNull)(this._barSpacing)),e.zoomToBarsRange(i.firstBar()+(0,o.ensureNotNull)(this._leftBarsOffset),i.lastBar()+(0,o.ensureNotNull)(this._rightBarsOffset)),t.setMode((0,o.ensureNotNull)(this._priceMode)),t.recalculatePriceRange((0,o.ensureNotNull)(e.visibleBarsStrictRange())),this._model.recalculateAllPanes((0,ye.viewportChangeEvent)()),this._model.lightUpdate()}}const St=(0,P.getLogger)("Chart.ChartUndoModel"),yt=new x.TranslatedString("zoom",l.t(null,void 0,i(59833)));class bt extends k.UndoCommand{constructor(e,t,i){super(yt),this._baseCmd=e,this._zoomStack=t,this._inOut=i}undo(){if(this._inOut){if(this._baseCmd!==this._zoomStack.head())return void St.logDebug("zoom stack inconsistency");this._baseCmd.undo(),this._zoomStack.pop()}else this._baseCmd.redo(),this._zoomStack.push(this._baseCmd)}redo(){if(this._inOut)this._baseCmd.redo(),this._zoomStack.push(this._baseCmd);else{if(this._baseCmd!==this._zoomStack.head())return void St.logDebug("zoom stack inconsistency");this._baseCmd.undo(),this._zoomStack.pop()}}}const wt=new x.TranslatedString("stop syncing drawing",l.t(null,void 0,i(98784)));class Ct extends k.UndoCommand{constructor(e,t){super(wt), -this._model=e,this._sourceId=t.id(),this._linkKey=t.linkKey().value()}redo(){(0,o.ensureNotNull)(this._model.dataSourceForId(this._sourceId)).linkKey().setValue(null)}undo(){(0,o.ensureNotNull)(this._model.dataSourceForId(this._sourceId)).linkKey().setValue(this._linkKey)}}const Pt=new x.TranslatedString("restore defaults",l.t(null,void 0,i(9608)));class Tt extends k.UndoCommand{constructor(e,t,i=Pt){super(i),this._chartModel=e,this._defaultProperty=t,this._state=t.state()}redo(){this._chartModel.restoreFactoryDefaults(this._defaultProperty)}undo(){this._defaultProperty.mergeAndFire(this._state),this._chartModel.mainSeries().onChartStyleChanged()}}var xt=i(7006);class It extends Tt{redo(){this._defaultProperty.hasChild("intervalsVisibilities")&&this._defaultProperty.childs().intervalsVisibilities.mergeAndFire(xt.intervalsVisibilitiesDefaults),super.redo()}}class Mt extends It{redo(){super.redo(),this._chartModel.recalcColorStudies(!0)}undo(){super.undo(),this._chartModel.recalcColorStudies(!0)}}var At=i(10621),Lt=i(933),kt=i(64548);function Et(e){const{visible:t,...i}=e;return i}function Dt(e){const{visible:t,...i}=e;return i}function Vt(e){const{drawWick:t,drawBorder:i,drawBody:s,barColorsOnPrevClose:r,...n}=e;return n}function Bt(e){const{drawWick:t,drawBorder:i,drawBody:s,...r}=e;return r}function Rt(e){const{drawWick:t,drawBorder:i,drawBody:s,showRealLastPrice:r,inputs:n,...o}=e;return o}function Nt(e){const{barColorsOnPrevClose:t,dontDrawOpen:i,thinBars:s,...r}=e;return r}function Ot(e){const{showBorders:t,showLabels:i,drawBody:s,...r}=e;return r}function Ft(e){const{linestyle:t,linewidth:i,styleType:s,priceSource:r,...n}=e;return n}function Wt(e){const{linestyle:t,linewidth:i,priceSource:s,...r}=e;return r}function Ht(e){const{inputs:t,...i}=e;return i}function zt(e){const{inputs:t,...i}=e;return i}function Ut(e){const{inputs:t,...i}=e;return i}function jt(e){const{inputs:t,...i}=e;return i}function Gt(e){const{topLineWidth:t,bottomLineWidth:i,baseLevelPercentage:s,priceSource:r,...n}=e;return n}function qt(e){const{thinBars:t,inputs:i,...s}=e;return s}function $t(e){const{visible:t,style:i,symbol:s,interval:r,sessionId:n,highLowAvgPrice:o,showCountdown:a,bidAsk:l,prePostMarket:c,priceAxisProperties:h,candleStyle:d,hollowCandleStyle:u,haStyle:p,barStyle:_,hiloStyle:m,lineStyle:g,areaStyle:f,renkoStyle:v,pbStyle:S,kagiStyle:y,pnfStyle:b,baselineStyle:w,rangeStyle:C,esdShowDividends:P,esdShowSplits:T,esdShowEarnings:x,esdShowBreaks:I,showContinuousContractSwitches:M,showContinuousContractSwitchesBreaks:A,showFuturesContractExpiration:L,showLastNews:k,...E}=e;return{bidAsk:Et(l),prePostMarket:Dt(c),candleStyle:Vt(d),hollowCandleStyle:Bt(u),haStyle:Rt(p),barStyle:Nt(_),hiloStyle:Ot(m),lineStyle:Ft(g),areaStyle:Wt(f),renkoStyle:Ht(v),pbStyle:zt(S),kagiStyle:Ut(y),pnfStyle:jt(b),baselineStyle:Gt(w),rangeStyle:qt(C),...E}}function Yt(e){ -const{scaleSeriesOnly:t,showSeriesLastValue:i,showStudyLastValue:s,showSymbolLabels:r,showBidAskLabels:n,showPrePostMarketPriceLabel:o,showStudyPlotLabels:a,showFundamentalNameLabel:l,showFundamentalLastValue:c,seriesLastValueMode:h,...d}=e;return d}function Kt(e){const{topMargin:t,bottomMargin:i,...s}=e;return s}const Xt=new x.TranslatedString("apply chart theme",l.t(null,void 0,i(66568)));class Zt extends k.UndoCommand{constructor(e,t,i){var s,r,n;super(Xt),this._model=e,this._newSessionProps=t.sessions||(0,kt.factoryDefaults)("sessions"),["candleStyle","hollowCandleStyle","haStyle"].forEach((e=>{t.mainSourceProperties[e].wickUpColor=t.mainSourceProperties[e].wickUpColor||t.mainSourceProperties[e].wickColor,t.mainSourceProperties[e].wickDownColor=t.mainSourceProperties[e].wickDownColor||t.mainSourceProperties[e].wickColor})),t.chartProperties=null!==(s=t.chartProperties)&&void 0!==s?s:{paneProperties:void 0,scalesProperties:void 0},t.chartProperties.paneProperties.vertGridProperties=null!==(r=t.chartProperties.paneProperties.vertGridProperties)&&void 0!==r?r:t.chartProperties.paneProperties.gridProperties,t.chartProperties.paneProperties.horzGridProperties=null!==(n=t.chartProperties.paneProperties.horzGridProperties)&&void 0!==n?n:t.chartProperties.paneProperties.gridProperties;const o=this._model.properties().state().paneProperties.legendProperties;delete o.backgroundTransparency,t.chartProperties.paneProperties.legendProperties={...t.chartProperties.paneProperties.legendProperties,...o};const a=(0,kt.factoryDefaults)("chartproperties"),l=(0,Lt.deepExtend)({},a,t.chartProperties);this._newChartProps={paneProperties:Kt(l.paneProperties),scalesProperties:Yt(l.scalesProperties)},e.timeScale().preserveBarSpacing()&&delete this._newChartProps.scalesProperties.barSpacing;const c=(0,kt.factoryDefaults)("chartproperties.mainSeriesProperties"),h=(0,Lt.deepExtend)({},c,t.mainSourceProperties);this._newSeriesProps=i?h:$t(h);const d=e.properties().state();this._oldChartProps={paneProperties:Kt(d.paneProperties),scalesProperties:Yt(d.scalesProperties)};const u=e.mainSeries().properties().state();this._oldSeriesProps=i?u:$t(u),this._oldSessionProps=this._model.sessions().properties().state()}undo(){this._merge(this._oldChartProps,this._oldSeriesProps,this._oldSessionProps),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),this._model.chartThemeLoaded()}redo(){this._merge(this._newChartProps,this._newSeriesProps,this._newSessionProps),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),this._model.chartThemeLoaded()}_merge(e,t,i){var s,r,n,o;const a=this._model;(0,ge.saveDefaultProperties)(!0),e&&(a.properties().childs().paneProperties.mergeAndFire(e.paneProperties),a.properties().childs().scalesProperties.mergeAndFire(e.scalesProperties)),"priceAxisProperties"in t&&a.mainSeries().priceScale().setMode({autoScale:null===(s=t.priceAxisProperties)||void 0===s?void 0:s.autoScale,percentage:null===(r=t.priceAxisProperties)||void 0===r?void 0:r.percentage, -log:null===(n=t.priceAxisProperties)||void 0===n?void 0:n.log,lockScale:null===(o=t.priceAxisProperties)||void 0===o?void 0:o.lockScale}),a.mainSeries().properties().mergeAndFire(t),a.mainSeries().properties().saveDefaults(),a.mainSeries().createPaneView(),a.mainSeries().invalidateBarStylesCache(),a.recalculateAllPanes((0,ye.globalChangeEvent)()),a.fullUpdate(),a.properties().saveDefaults(),a.sessions().restoreState({properties:i},!1),(0,ge.saveDefaultProperties)(!1)}}const Jt=new x.TranslatedString("change resolution",l.t(null,void 0,i(32303)));class Qt extends k.UndoCommand{constructor(e,t,i){let s;super(Jt),this._sourceId=e.id();const r=(0,fe.isRangeStyle)(e.style()),n=p.Interval.isRange(t);!r&&n?s=11:r&&!n&&(s=(0,fe.getLastUsedStyle)()),this._newSymbolParams={interval:t,style:s},this._prevSymbolParams={symbol:e.symbol(),currency:e.currency(),unit:e.unit(),interval:e.interval(),style:e.style()},this._chartWidget=i}redo(){this._symbolSource().setSymbolParams(this._newSymbolParams),this._chartWidget.screen.show(!0)}undo(){this._symbolSource().setSymbolParams(this._prevSymbolParams),this._chartWidget.screen.show(!0)}_symbolSource(){return(0,o.ensureNotNull)(this._chartWidget.model().model().dataSourceForId(this._sourceId))}}var ei=i(21076),ti=i(76422) -;const ii=new x.TranslatedString("send {title} backward",l.t(null,void 0,i(16259))),si=new x.TranslatedString("bring {title} forward",l.t(null,void 0,i(56763))),ri=new x.TranslatedString("insert {title} after {target}",l.t(null,void 0,i(74055))),ni=new x.TranslatedString("insert {title} before {target}",l.t(null,void 0,i(11231))),oi=new x.TranslatedString("cut {title}",l.t(null,void 0,i(78755))),ai=new x.TranslatedString("cut sources",l.t(null,void 0,i(63649))),li=new x.TranslatedString("remove {title}",l.t(null,void 0,i(39859))),ci=new x.TranslatedString("remove drawings group",l.t(null,void 0,i(70653))),hi=new x.TranslatedString("move scale",l.t(null,void 0,i(4184))),di=new x.TranslatedString("stop syncing line tool(s)",l.t(null,void 0,i(57011))),ui=new x.TranslatedString("zoom out",l.t(null,void 0,i(9645))),pi=new x.TranslatedString("zoom in",l.t(null,void 0,i(19813))),_i=new x.TranslatedString("move drawing(s)",l.t(null,void 0,i(45356))),mi=new x.TranslatedString("load default drawing template",l.t(null,void 0,i(54597))),gi=new x.TranslatedString("apply factory defaults to selected sources",l.t(null,void 0,i(96996))),fi=new x.TranslatedString("change currency",l.t(null,void 0,i(22641))),vi=new x.TranslatedString("change unit",l.t(null,void 0,i(39028))),Si=new x.TranslatedString("clone line tools",l.t(null,void 0,i(5179))),yi=new x.TranslatedString("merge up",l.t(null,void 0,i(66143))),bi=new x.TranslatedString("merge down",l.t(null,void 0,i(62153))),wi=new x.TranslatedString("merge to pane",l.t(null,void 0,i(70746))),Ci=new x.TranslatedString("unmerge up",l.t(null,void 0,i(52540))),Pi=new x.TranslatedString("unmerge down",l.t(null,void 0,i(86949))),Ti=new x.TranslatedString("unmerge to new bottom pane",l.t(null,void 0,i(20057))),xi=new x.TranslatedString("move {title} to new right scale",l.t(null,void 0,i(45544))),Ii=new x.TranslatedString("move {title} to new left scale",l.t(null,void 0,i(11303))),Mi=new x.TranslatedString("make {title} no scale (Full screen)",l.t(null,void 0,i(74642))),Ai=new x.TranslatedString("scroll time",l.t(null,void 0,i(70009))),Li=new x.TranslatedString("scale time",l.t(null,void 0,i(35962))),ki=new x.TranslatedString("reset time scale",l.t(null,void 0,i(55064))),Ei=new x.TranslatedString("reset scales",l.t(null,void 0,i(21948))),Di=new x.TranslatedString("create {tool}",l.t(null,void 0,i(81791))),Vi=new x.TranslatedString("change {pointIndex} point",l.t(null,void 0,i(72032))),Bi=new x.TranslatedString("paste {title}",l.t(null,void 0,i(41601))),Ri=new x.TranslatedString("insert {title}",l.t(null,void 0,i(90743))),Ni=new x.TranslatedString("remove all studies",l.t(null,void 0,i(15516))),Oi=new x.TranslatedString("remove drawings",l.t(null,void 0,i(44656))),Fi=new x.TranslatedString("remove all studies and drawing tools",l.t(null,void 0,i(80171))),Wi=(new x.TranslatedString("turn line tools sharing off",l.t(null,void 0,i(28068))),new x.TranslatedString("share line tools in layout",l.t(null,void 0,i(77554))),new x.TranslatedString("share line tools globally",l.t(null,void 0,i(64704))), -l.t(null,void 0,i(75139)),(0,P.getLogger)("Chart.ChartUndoModel"));function Hi(e,t){return{bringForwardEnabled:e.bringForwardEnabled||t.bringForwardEnabled,bringToFrontEnabled:e.bringToFrontEnabled||t.bringToFrontEnabled,sendBackwardEnabled:e.sendBackwardEnabled||t.sendBackwardEnabled,sendToBackEnabled:e.sendToBackEnabled||t.sendToBackEnabled}}function zi(e){return new x.TranslatedString(e.name(),e.title())}function Ui(){return(0,Ee.drawOnAllCharts)().value()?1:0}class ji extends(r()){constructor(e,t,i,s,r,n,o,a,l,c,h){super(),this._createLineCommand=null,this._initialTimeScrollState=null,this._initialTimeScrollPos=null,this._scalePriceInfo=null,this._currentSourceMoveCommand=null,this._currentLineChangeCommand=null,this._currentCustomMoveCommand=null,this._zoomStack=new m.UndoStack,this._lineToolsDoNotAffectChartInvalidation=new C.FeatureToggleWatchedValue("do_not_invalidate_chart_on_changing_line_tools",!1),this._chartWidget=n,this.m_model=new(_t())(e,t,i,s,r,this,a,l,c,h),this._undoHistory=o,this._lineToolsGroupController=new He({model:this._model.bind(this),pushUndoCommand:this._pushUndoCommand.bind(this),beginUndoMacro:(e,t)=>{this._undoHistory.beginUndoMacro(e).setCustomFlag("doesnt_affect_save",!!t)},endUndoMacro:this._undoHistory.endUndoMacro.bind(this._undoHistory),emitEvent:this.emitEvent.bind(this)})}undoHistory(){return this._undoHistory}setWatchedValue(e,t,i){this._undoHistory.setWatchedValue(e,t,i)}lineToolsGroupController(){return this._lineToolsGroupController}mergeAllScales(e){!function(e,t){e.beginUndoMacro("left"===t?M:A),e.model().panes().forEach((i=>{const s="left"===t?i.rightPriceScales():i.leftPriceScales(),r=("left"===t?i.leftPriceScales():i.rightPriceScales()).concat(s),n="overlay"===i.priceScalePosition(i.defaultPriceScale())?r[0]:i.defaultPriceScale();e.movePriceScale(i,n,t,0),r.forEach((t=>{if(t===n)return;let s=t.mainSource();for(;null!==s;){e.moveToScale(s,i,n,null,!0);const r=t.mainSource();if(r===s){L.logError("Loop detected while trying to merge scales");break}s=r}}))})),e.endUndoMacro(),e.model().fullUpdate()}(this,e)}movePriceScale(e,t,i,s){const r=new E(this._model(),e,t,i,s,hi);this._pushUndoCommand(r)}createLineTool({pane:e,point:t,linetool:i,properties:s,linkKey:r,ownerSource:n,disableSynchronization:a,sharingMode:l=Ui(),id:c}){if(("LineToolRegressionTrend"===i||"LineToolAnchoredVWAP"===i)&&!this.canCreateStudy())return(0,h.showTooManyStudiesNotice)(),null;const d=Di.format({tool:new x.TranslatedString(i,W.lineToolsLocalizedNames[i])});this.beginUndoMacro(d,this._lineToolsDoNotAffectChartInvalidation.value());const u=!a;this._createLineCommand=new z(this._model(),e,i,n||(0,o.ensureNotNull)(e.mainDataSource()),l,c);const p=this._createLineCommand.startCreatingLine(t,s,r||null),_=(0,o.ensureNotNull)(this._createLineCommand.line());let m=null;if(p&&(u&&this.finishLineTool(_),this._pushUndoCommand(this._createLineCommand),this._createLineCommand=null,m={points:_.normalizedPoints(),interval:this.mainSeries().interval()}),u&&void 0===r&&(0, -Ee.drawOnAllCharts)().value()&&_.isSynchronizable()){const e=(0,o.ensureNotNull)(this.model().externalTimeStamp(t.index)),s={point:{price:t.price,timeStamp:e},linetool:i,properties:_.properties(),symbol:this.mainSeries().symbol(),model:this.model(),linkKey:(0,o.ensureNotNull)(_.linkKey().value()),finalState:m,id:_.id()};_.isFixed()&&(s.pointPositionPercents=_.calcPositionPercents()),(0,Ee.createLineTool)(s)}return this.endUndoMacro(),_}continueCreatingLine(e,t,i,s){const r=(0,o.ensureNotNull)(this._createLineCommand);this.beginUndoMacro(r.text(),this._lineToolsDoNotAffectChartInvalidation.value());const n=(0,o.ensureNotNull)(this._model().lineBeingCreated()),a=r.continueCreatingLine(e,t,i,s);let l=null;if(a&&(this.finishLineTool(n),this._pushUndoCommand(r),this._createLineCommand=null,l={points:n.normalizedPoints(),interval:this.mainSeries().interval()}),r.drawOnAllCharts()&&n.isSynchronizable()){const i=(0,o.ensureNotNull)(this._model().externalTimeStamp(e.index));(0,Ee.continueLineTool)({point:{price:e.price,timeStamp:i},envState:t,finalState:l,model:this._model()})}return this.endUndoMacro(),a}continueExternalLine(e,t,i){const s=(0,o.ensureNotNull)(this._createLineCommand),r=s.continueCreatingLine(e,t,i);return r&&(this._pushUndoCommand(s),this._createLineCommand=null),r}finishLineTool(e){this._model().finishLineTool(e)}pasteImageAsLineTool(e,t,i,s){return null}loadRange(e){const t=this._model(),i=t.mainSeries().getSupportedResolution(e.res),s={val:e.val,res:i},r=t.appliedTimeFrame().value();return(null===r||!_(r,s))&&(this._pushUndoCommand(new Ce(t,s)),!0)}unlinkLines(e){const t=this.model();this.beginUndoMacro(di,this._lineToolsDoNotAffectChartInvalidation.value());for(const i of e)null!==i.linkKey().value()&&(0,Ee.removeLineTool)({withUndo:!0,model:this.model(),symbol:i.symbol(),linkKey:(0,o.ensureNotNull)(i.linkKey().value()),sourceTitle:zi(i),lineToolState:i.state(!1),unlink:!0}),this._pushUndoCommand(new Ct(t,i));this.endUndoMacro()}zoomFromViewport(){const e=new bt((0,o.ensureDefined)(this._zoomStack.head()),this._zoomStack,!1);this._pushUndoCommand(e)}zoomToViewport(e,t,i,s,r){const n=new vt(this.m_model,e,t,i,s,r),o=new bt(n,this._zoomStack,!0);this._pushUndoCommand(o)}zoomStack(){return this._zoomStack}hoveredSource(){return this.m_model.hoveredSource()}setProperty(e,t,i,s){if(e&&e.value()!==t){const r=new Le(e,t,i,this.m_model,s);this._pushUndoCommand(r),this.emitEvent("setProperty")}}withMacro(e,t,i){const s=this.beginUndoMacro(e,i);try{t()}finally{this.endUndoMacro()}return s}barsMarksSources(){return this.m_model.barsMarksSources()}removeAllDrawingTools(){this.beginUndoMacro(Oi,!0),this._removeAllDrawingToolsImpl(),this.endUndoMacro()}removeAllStudiesAndDrawingTools(){this.beginUndoMacro(Fi),this._removeAllDrawingToolsImpl(),this._removeAllStudiesImpl(),this.endUndoMacro()}removeAllStudies(){this.beginUndoMacro(Ni),this._removeAllStudiesImpl(),this.endUndoMacro()}canZoomIn(){return this.model().canZoomIn()}canZoomOut(){return this.model().canZoomOut()}zoomOut(){const e=this.timeScale().width() -;if(this.canZoomOut()){try{this.beginUndoMacro(ui)}catch(e){return}(0,v.doAnimate)({to:e/5,onStep:e=>{this.startScaleTime(0),this.scaleTimeTo(e),this.endScaleTime()},onComplete:()=>this.endUndoMacro()})}}zoomIn(){const e=this.timeScale().width();if(this.canZoomIn()){try{this.beginUndoMacro(pi)}catch(e){return}(0,v.doAnimate)({to:e/5,onStep:e=>{this.startScaleTime(e),this.scaleTimeTo(0),this.endScaleTime()},onComplete:()=>this.endUndoMacro()})}}startMovingSources(e,t,i,s){e.filter((e=>e.doesMovingAffectsUndo())).length&&(this._currentSourceMoveCommand=new R(this.model(),e,_i,!1),e.every(f.isLineTool)&&this._currentSourceMoveCommand.setCustomFlag("doesnt_affect_save",this._lineToolsDoNotAffectChartInvalidation.value())),this.model().startMovingSources(e,t,i,new Map,s)}moveSources(e,t){this.model().moveSources(e,new Map,t)}endMovingSource(e,t){this.model().endMovingSources(e,void 0,t),null!==this._currentSourceMoveCommand&&(this._currentSourceMoveCommand.saveNewState(),this._pushUndoCommand(this._currentSourceMoveCommand)),this._currentSourceMoveCommand=null}startChangingLinetool(e,t,i,s,r){this._currentLineChangeCommand=new R(this.model(),[e],Vi.format({pointIndex:i}),!1),this._currentLineChangeCommand.setCustomFlag("doesnt_affect_save",this._lineToolsDoNotAffectChartInvalidation.value()),this.model().startChangingLinetool(e,t,i,s,r)}changeLinePoint(e,t){this.model().changeLinePoint(e,t)}endChangingLinetool(e){this.model().endChangingLinetool(e),null!==this._currentLineChangeCommand&&(this._currentLineChangeCommand.saveNewState(),this._pushUndoCommand(this._currentLineChangeCommand)),this._currentLineChangeCommand=null}setChartStyleProperty(e,t,i){if(e.value()!==t){const s=new be(e,t,this.mainSeries(),i,this.model(),this.chartWidget());this._pushUndoCommand(s),this.emitEvent("setChartStyleProperty"),(0,me.trackChartStyleChanged)(e.value())}}restorePropertiesForSource(e){(0,f.isLineTool)(e)?this._restoreLineToolFactoryDefaults(e):this._restoreStudyFactoryDefaults(e)}restoreLineToolsFactoryDefaults(e){1===e.length?this._restoreLineToolFactoryDefaults(e[0]):(this.beginUndoMacro(gi),e.forEach((e=>this._restoreLineToolFactoryDefaults(e))),this.endUndoMacro())}restoreState(e,t,i){return this.m_model.restoreState(e,t,i)}async clipboardCopy(e,t=this.selection().dataSources()){if(!(0,w.enabled)("datasource_copypaste"))return;const i=t.filter((e=>e.copiable()));if(0===i.length)return;for(const e of i)if((0,T.isStudy)(e)&&e.isChildStudy())throw new Error("Can not copy child study");const s=(0,g.clipboardDataForSources)(this._model().id(),i);return null!==s?e.write({app:JSON.stringify(s),text:s.title}):void 0}async clipboardCut(e,t=this.selection().dataSources()){if(!(0,w.enabled)("datasource_copypaste"))return;const i=t.filter((e=>e.copiable()));if(0===i.length)return;await this.clipboardCopy(e,i);const s=i.filter((e=>e.isUserDeletable()));if(0===s.length)return;const r=(1===s.length?oi:ai).format({title:zi(s[0])});this.beginUndoMacro(r),this.m_model.selectionMacro((()=>this.removeSources(s,!1,r)),!0),this.endUndoMacro()} -async clipboardPaste(e,t){let i=null;if((0,w.enabled)("datasource_copypaste")&&(i=i||await e.read(),i.app)){const e=JSON.parse(i.app);if(null!==this.pasteSourceFromClip(t,e))return}await this._processSpecialLineToolsContents(e,i,t)}applyStudyTemplate(e,t){const i=new Ye(this._model(),e,t);this._pushUndoCommand(i)}createStudyInserter(e,t,i){const s={createStudy:(e,t,i,s,r,n,o,a,l,c,h)=>this.checkIfFeatureAvailable(e,n)?((0,y.trackEvent)("studies","Study_"+e.id),"Compare@tv-basicstudies"===e.id&&(0,y.trackEvent)("compare","symbol:"+t.symbol),this._insertStudy(e,t,s,r,n,o,a,l,c,null,h)):(Wi.logNormal("Cannot insert study "+e.id),null)};void 0!==i&&(s.createStub=()=>this.m_model.insertStudyStub(i).id(),s.removeStub=e=>this.m_model.removeStudyStub(e));const r=new ei.StudyInserter(e,this.m_model.studyMetaInfoRepository(),s);return r.setParentSources(t),r}replayStatus(){return this.m_model.replayStatus()}setReplayStatus(e){return this.m_model.setReplayStatus(e)}startCustomMoving(e,t,i){this._currentCustomMoveCommand=new ht(this.model(),e,t,i)}customMoveBeingProcessed(){return null!==this._currentCustomMoveCommand}processCustomMove(e){(0,o.ensureNotNull)(this._currentCustomMoveCommand).move(e)}endCustomMoving(){null!==this._currentCustomMoveCommand&&this._currentCustomMoveCommand.hasChanges()&&(this._pushUndoCommand(this._currentCustomMoveCommand),this._currentCustomMoveCommand=null)}panes(){return this.m_model.panes()}cloneLineTools(e,t){for(let t=0;t(0,o.ensureNotNull)(this.model().dataSourceForId(e))));this.copyToOtherCharts(e)}return this.endUndoMacro(),this.emitEvent("cloneLineTools"),i.newIds()}removeSource(e,t,i){this.lineBeingCreated()!==e?this.removeSources([e],t,li.format({title:zi(e)}),i):this.cancelCreatingLine()}removeSelectedSources(){const e=this._model().selection().dataSources();if(!e.length)return;const t=(e.length>1?ci:li).format({title:zi(e[0])});this.removeSources(e,!1,t)}removeSources(e,t,i,s){s||(e=e.filter((e=>e.isUserDeletable())));const r=this._model(),n=r.lineToolsGroupModel(),a=e.every(f.isLineTool)&&this._lineToolsDoNotAffectChartInvalidation.value();this.beginUndoMacro(i,a),r.selectionMacro((s=>{const a=new Map;e.forEach((e=>{if((0,f.isLineTool)(e)){const t=n.groupForLineTool(e);if(null!==t){const i=a.get(t)||[];i.push(e),a.set(t,i)}null!==e.linkKey().value()&&(0,Ee.removeLineTool)({withUndo:!0,model:this.model(),linkKey:(0,o.ensureNotNull)(e.linkKey().value()),symbol:this.model().mainSeries().symbol(),lineToolState:e.state(!1),sourceTitle:zi(e)})}})),a.forEach(((e,t)=>{const i=new B.ExcludeLineToolsFromGroupUndoCommand(r,t,e);this._pushUndoCommand(i)}));const l=new V.RemoveSourcesCommand(r,e,i),c=l.removedIds();this._pushUndoCommand(l),!t&&c.length>0&&(1===c.length?this.emitEvent("removeSource",[c[0]]):this.emitEvent("removeSources",[c])) -}),!0),this.endUndoMacro()}removeUnloadedLineTool({lineToolsSynchronizer:e,sourceTitle:t,linkKey:i,symbol:s,state:r,withUndo:n,unlink:o}){}async scrollToLineTool(e){const t=this.timeScale().logicalRange();if(null===t)return;const i=this.timeScale().barSpacing();let s=t.left();const r=e.points().map((e=>e.index)),n=this.timeScale().points().range().value();if(null===n)return;let a=n.firstIndex;const l=n.lastIndex,h=t.length()/2;if(0===r.length||r.some((e=>t.contains(e))))return;const d=()=>{const t=e.points().map((e=>e.index)),i=t.filter((e=>e<=l)).reduce(((e,t)=>null===e?t:Math.max(e,t)),null);return null!==i?i:t.reduce(((e,t)=>Math.min(e,t)))};let u,p=d();if(a-h>p){const t=e.points().map((e=>e.time)).filter(I.notUndefined).map((e=>e.valueOf()));if(0===t.length)return;const i=t.reduce(((e,t)=>Math.min(e,t)),t[0]);await this.model().gotoTime(i),p=d();const r=(0,o.ensureNotNull)(this.timeScale().logicalRange());if(r.contains(p))return;s=r.left(),a=(0,o.ensureNotNull)(this.timeScale().points().range().value()).firstIndex}a-h>p?(u=(s-a+h)*i,this.mainSeries().setGotoDateResult({timestamp:(0,o.ensureNotNull)(this.timeScale().points().valueAt(a)),eod:!0})):u=(s-p+1+h)*i,this.startScrollTime(0),(0,v.doAnimate)({onStep:(e,t)=>this.scrollTimeTo(t),from:0,to:Math.round(u),easing:c.easingFunc.easeInOutCubic,duration:c.dur,onComplete:()=>this.endScrollTime()})}mergeSourceUp(e){const t=new O.MergeUpUndoCommand(this._model(),e,yi);this._mergeUnmergeSource(e,t)}mergeSourceDown(e){const t=new O.MergeDownUndoCommand(this._model(),e,bi);this._mergeUnmergeSource(e,t)}mergeToPane(e,t,i){const s=this._model().panes().indexOf(t),r=new O.MergeToTargetPane(this._model(),e,s,wi,i);this._mergeUnmergeSource(e,r)}unmergeSourceUp(e){const t=new N.UnmergeUpUndoCommand(this._model(),e,Ci);this._mergeUnmergeSource(e,t)}unmergeSourceDown(e){const t=new N.UnmergeDownUndoCommand(this._model(),e,Pi);this._mergeUnmergeSource(e,t)}unmergeToNewBottomPane(e){const t=new N.UnmergeToNewBottomPane(this._model(),e,Ti);this._mergeUnmergeSource(e,t)}availableZOrderOperations(e){const t=this._model().lineToolsGroupModel(),i=e.filter(f.isLineTool),s=i.map((e=>t.groupForLineTool(e)));(0,o.assert)(new Set(s).size<=1,"Cannot move line tools from different group");const r=0===s.length?null:s[0];let n={bringForwardEnabled:!1,bringToFrontEnabled:!1,sendBackwardEnabled:!1,sendToBackEnabled:!1};const a=new Set(i);for(const t of(0,F.sortSources)(e)){if((0,f.isLineTool)(t)&&null!==r){const e=(0,F.sortSources)(r.lineTools().filter((e=>!a.has(e)||e===t)));n=Hi(n,{bringForwardEnabled:t!==e[e.length-1],bringToFrontEnabled:t!==e[e.length-1],sendBackwardEnabled:t!==e[0],sendToBackEnabled:t!==e[0]});continue}const e=(0,o.ensureNotNull)(this._model().paneForSource(t)).sourcesByGroup().allExceptSpecialSources();if(0===e.length)continue;const i=t.zorder(),s=e[0].zorder(),l=e[e.length-1].zorder();n=Hi(n,{bringForwardEnabled:i!==l,bringToFrontEnabled:i!==l,sendBackwardEnabled:i!==s,sendToBackEnabled:i!==s})}return n}sendToBack(e){ +this._chartWidgetCollection.setLayout(this._oldLayoutType)}}var ae=i(65665),le=i(76076),ce=i(7394),he=i(29639),de=i(40858),ue=i(6612),pe=i(34026),_e=i(53479),me=i(9740),ge=i(55014);class fe{constructor(e,t,i){this._data=e,this._hittest=t,this._textWidthCache=i}draw(e,t){const i=t.pixelRatio,s=this._data.centerPoint,n=Math.round(s.x*i),o=Math.round(s.y*i),a=Math.max(1,Math.floor(i))%2/2,l=new r.Point(n+a,o-a);this._drawLollipop(e,l,t),this._drawLabel(e,l,t.pixelRatio)}hitTest(e,t){const i=(0,ge.interactionTolerance)().esd,s=this._data.centerPoint.y-this._data.style.lollipop.height/2-i,n=this._data.centerPoint.x-this._data.style.lollipop.width/2-i,o=(0,r.box)(new r.Point(n,s),new r.Point(n+this._data.style.lollipop.width+2*i,s+this._data.style.lollipop.height+2*i));return(0,pe.pointInBox)(e,o)?this._hittest:null}_drawLollipop(e,t,i){const s=this._data.style,r=i.pixelRatio,n=this._fillRadius(r);s.lollipop.fillCircle&&s.lollipop.backgroundColor&&this._drawFilledCircle(e,t,n,s.lollipop.backgroundColor);const o=Math.round(s.lollipop.lineWidth*r),a=n-Math.round(1*r+o/2);this._drawBorderLine(e,t,o,a),s.lollipop.fillCircle&&s.lollipop.fillStyle&&this._drawFilledCircle(e,t,a,s.lollipop.fillStyle)}_drawLabel(e,t,i){const s=this._data.style.lollipop.text,r=s.label;if(""===r)return;e.textAlign="center",e.textBaseline="middle",e.fillStyle=s.strokeStyle,e.font=s.font;const n=this._textWidthCache.yMidCorrection(e,r);e.translate(t.x,t.y+((s.deltaY||0)+n)*i),(0,R.drawScaled)(e,i,(()=>{e.fillText(r,0,0)}))}_fillRadius(e){const t=this._data.style,i=Math.max(1,Math.floor(e));let s=Math.round(t.lollipop.width*e);return s%2!=i%2&&(s+=1),s/2}_drawBorderLine(e,t,i,s){const r=this._data.style;e.strokeStyle=r.lollipop.strokeStyle,e.lineWidth=i,(0,me.setLineStyle)(e,_e.LINESTYLE_SOLID),(0,me.createCircle)(e,t.x,t.y,s),e.stroke()}_drawFilledCircle(e,t,i,s){e.fillStyle=s,(0,me.createCircle)(e,t.x,t.y,i),e.fill()}}var ve=i(14888);class Se extends fe{_drawLollipop(e,t,i){var s;if(!this._imageLoaded())return void super._drawLollipop(e,t,i);const r=this._data.style,n=i.pixelRatio,o=this._fillRadius(n);let a=Math.round(r.lollipop.lineWidth*n),l=o-Math.round(1*n+a/2);if(r.lollipop.fillCircle&&(r.lollipop.backgroundColor&&this._drawFilledCircle(e,t,o,r.lollipop.backgroundColor),r.lollipop.fillStyle&&this._drawFilledCircle(e,t,l,r.lollipop.fillStyle)),null===(s=this._data.style.lollipop.image)||void 0===s?void 0:s.imageElement){const i=o-Math.round(1*n+2*a),s=2*i;e.save(),e.imageSmoothingEnabled=!0,e.imageSmoothingQuality="high",(0,me.createCircle)(e,t.x,t.y,i),e.clip(),e.drawImage(this._data.style.lollipop.image.imageElement,t.x-i,t.y-i,s,s),e.restore()}"active"===this._data.status&&(l-=a/2,a*=1.5),this._drawBorderLine(e,t,a,l)}_drawLabel(e,t,i){this._imageLoaded()&&!this._data.style.lollipop.text.showWhenImageLoaded||super._drawLabel(e,t,i)}_imageLoaded(){ +return Boolean(this._data.style.lollipop.image&&this._data.style.lollipop.image.imageElement&&this._data.style.lollipop.image.imageElement.complete&&this._data.style.lollipop.image.imageElement.naturalWidth)}}const ye={fillPath:new Path2D("M8.961.92a3 3 0 0 1 3.078 0l7.5 4.48A3 3 0 0 1 21 7.975V20a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V7.975A3 3 0 0 1 1.461 5.4l7.5-4.48z"),strokePath:new Path2D("M9.867 2.742c.39-.23.875-.23 1.266 0l7.5 4.406c.382.225.617.635.617 1.078V20c0 .69-.56 1.25-1.25 1.25H3c-.69 0-1.25-.56-1.25-1.25V8.226c0-.443.235-.853.617-1.078l7.5-4.406z")},be={fillPath:new Path2D("M8.961 22.08a3 3 0 0 0 3.078 0l7.5-4.48A3 3 0 0 0 21 15.025V3a3 3 0 0 0-3-3H3a3 3 0 0 0-3 3v12.025A3 3 0 0 0 1.461 17.6l7.5 4.48z"),strokePath:new Path2D("M9.866 20.257c.391.23.877.23 1.268 0l7.5-4.414a1.25 1.25 0 0 0 .616-1.078V3c0-.69-.56-1.25-1.25-1.25H3c-.69 0-1.25.56-1.25 1.25v11.765c0 .443.234.853.616 1.078l7.5 4.414z")},we={fillPath:new Path2D("M3 0h15c1.662 0 3 1.338 3 3v15c0 1.662-1.338 3-3 3H3c-1.662 0-3-1.338-3-3V3c0-1.662 1.338-3 3-3z"),strokePath:new Path2D("M3 1.75h15c.693 0 1.25.557 1.25 1.25v15c0 .693-.557 1.25-1.25 1.25H3c-.692 0-1.25-.558-1.25-1.25V3c0-.692.558-1.25 1.25-1.25z")};function Pe(e,t,i,s,r){const n=i.pixelRatio;e.save(),e.translate(t.x-s.lollipop.width*n/2,t.y-s.lollipop.height*n/2),e.scale(n,n),s.lollipop.fillCircle&&s.lollipop.backgroundColor&&(e.fillStyle=s.lollipop.backgroundColor,e.fill(r.fillPath)),e.strokeStyle=s.lollipop.strokeStyle,e.lineWidth=Math.round(s.lollipop.lineWidth*n)/n,(0,me.setLineStyle)(e,_e.LINESTYLE_SOLID),s.lollipop.fillCircle&&s.lollipop.fillStyle&&(e.fillStyle=s.lollipop.fillStyle,e.fill(r.strokePath)),e.stroke(r.strokePath),e.restore()}function Ce(e,t,i,s){Pe(e,t,i,s,ye)}function Te(e,t,i,s){Pe(e,t,i,s,be)}function xe(e,t,i,s){Pe(e,t,i,s,we)}class Ie extends fe{_drawLollipop(e,t,i){const s=this._data.style;switch(s.shape){case"earningUp":Ce(e,t,i,s);break;case"earningDown":Te(e,t,i,s);break;case"earning":xe(e,t,i,s);break;default:super._drawLollipop(e,t,i)}}}const Me={backgroundDark:(0,ce.getHexColorByName)("color-cold-gray-900"),backgroundLight:(0,ce.getHexColorByName)("color-white")};class Ae extends class{constructor(e,t,i){this._invalidated=!1,this._renderer=new he.CompositeRenderer,this._textWidthCache=new de.TextWidthCache,this._stylesCache=null,this._lollipops={},this._lollipopsCounter=0,this._lastClickedId=null,this.onPaneBgChange=()=>{this._recreateStyles(this._model)},this._lastClickedId=null,this._model=e,this._source=t,this._clickHandler=i,this._recreateStyles(e),e.backgroundColor().subscribe(this.onPaneBgChange),e.mainSeries().onSymbolIntervalChanged().subscribe(this,this._onSymbolOrIntervalChanged)}destroy(){this._model.backgroundColor().unsubscribe(this.onPaneBgChange),this._model.mainSeries().onSymbolIntervalChanged().unsubscribeAll(this)}processClickOutside(e){var t;if(null===this._lastClickedId||!e)return void this.clearLastClicked();let i=null;if(function(e){return void 0!==e.touches}(e)){if(1!==e.touches.length)return;{const t=(0, +s.ensureNotNull)(e.target).getBoundingClientRect(),n=e.touches[0];i=new r.Point(n.clientX-t.left,n.clientY-t.top)}}else i=new r.Point(e.offsetX,e.offsetY);const n=this._renderer.hitTest(i,{physicalHeight:0,physicalWidth:0,pixelRatio:1,cssHeight:0,cssWidth:0});null!==n&&(null===(t=n.data())||void 0===t?void 0:t.activeItem)===(0,s.ensureDefined)(this._lollipops[this._lastClickedId]).itemIndex||this.clearLastClicked()}clearLastClicked(){const e=null!==this._lastClickedId&&this._lollipops[this._lastClickedId]||null;null!==e&&(e.active=!1),this._lastClickedId=null}getLastClickedLollipopId(){return this._lastClickedId}update(){this._invalidated=!0}afterUpdate(e,t,i,s){}getStyle(e,t){let i=t;if(e.stack&&(i+="_stack:"+e.stack),"active"===i)return this._activeStyle;if("hovered"===i)return this._hoveredStyle;if("default"===i)return this._defaultStyle;if(this._stylesCache||(this._stylesCache={}),!this._stylesCache[i]){const s=(0,ae.clone)("active"===t?this._activeStyle:"hovered"===t?this._hoveredStyle:this._defaultStyle);e.stack&&(s.lollipop.incHeight=25*e.stack),this._stylesCache[i]=s}return this._stylesCache[i]}hasTooltip(e){return!0}_getY(){let e=0;const t=this._model.panes();for(let i=t.length;i--;){const s=t[i];s.containsMainSeries()&&(e+=s.height())}return e}_showBarLine(e){return this.hasTooltip(e)&&(e.hovered||e.active)}_createRenderers(e,t){this._renderer.clear();const i=(0,E.size)({width:e,height:t});for(const e in this._lollipops)if(this._lollipops.hasOwnProperty(e)){const t=(0,s.ensureDefined)(this._lollipops[e]);if(t.visible){const e=this._getLollipopStatus(t),s=this.getStyle(t,e),n={id:t.id,centerPoint:new r.Point(t.basePoint.x,t.basePoint.y-s.lollipop.bottom-s.lollipop.height/2-(s.lollipop.incHeight||0)),style:s,status:e},o={activeItem:t.itemIndex,hideCrosshairLinesOnHover:!0,clickHandler:this._lollipopMouseClickHandler.bind(this,n,i),tapHandler:this._lollipopMouseClickHandler.bind(this,n,i)};if(this._renderer.append(this._createRendererForLollipop(n,o)),this._showBarLine(t)){const{strokeStyle:e,lineStyle:i,lineWidth:r}=s.barLine,n={color:e,linestyle:i,linewidth:r,x:t.basePoint.x,top:0,bottom:t.basePoint.y-s.lollipop.bottom-s.lollipop.height},o=new ue.VerticalLineRenderer;o.setData(n),this._renderer.insert(o,0)}}}}_recreateStyles(e){this._stylesCache=null}_createRendererForLollipop(e,t){return new fe(e,new ve.HitTestResult(ve.HitTestResult.CUSTOM,t),this._textWidthCache)}_onSymbolOrIntervalChanged(){this._lollipops={},this._lollipopsCounter=0,this._renderer.clear(),this.clearLastClicked()}_lollipopMouseClickHandler(e,t,i){i.preventDefault();const n=e.id;if(this._lastClickedId=this._lastClickedId===n?null:n,null===this._lastClickedId)return;const o={target:i.target,targetSize:t,point:new r.Point(e.centerPoint.x,e.centerPoint.y-e.style.lollipop.height/2-8),marginTop:15};this._clickHandler(o,(()=>{const e=(0,s.ensureDefined)(this._lollipops[n]);return this._createTooltipContent(e)}))}_getLollipopStatus(e){return e.active?"active":e.hovered?"hovered":"default"}}{constructor(e,t,i){super(e,t,i),this.stylesCache={}, +this.templatesCache={},this._itemIndexToId=new Map,this.source=t}clearCaches(){this.clearLastClicked(),this._lollipops={},this._lollipopsCounter=0}update(){this._invalidated=!0}renderer(e,t){return this._invalidated&&(this._createLollipops(t,e),this._invalidated=!1),this._renderer}getStyle(e){const t=e.active?"active":e.hovered?"hovered":"default";return this._generateStyle(t,e)}hasTooltip(e){return Boolean(e.items&&e.items.length)}_createTooltipContent(e){const t=e.items;return t?[{type:"common",subTitle:Array.isArray(t)?t.map((e=>({value:e}))):[{value:t}],style:{color:e.color}}]:null}_createRendererForLollipop(e,t){return new(e.style.lollipop.image?Se:Ie)(e,new ve.HitTestResult(ve.HitTestResult.CUSTOM,t),this._textWidthCache)}_lollipopMouseClickHandler(e,t,i){super._lollipopMouseClickHandler(e,t,i),(0,M.emit)("onTimescaleMarkClick",e.id)}_createLollipops(e,t){const i=this._model.timeScale(),s=super._getY(),n=this._model.lastHittestData(),o=this._model.hoveredSource(),a=this.source.marks(),l=new Map;Object.keys(a).forEach((e=>{var t;const c=a[e],h=c.id,d=c.index;if(null!=d){const e=h===this.getLastClickedLollipopId(),a=this._lollipops[h],u=void 0!==a?a.itemIndex:this._lollipopsCounter++;this._itemIndexToId.has(u)||this._itemIndexToId.set(u,h);const p=o===this.source&&null!==n&&n.activeItem===u,_=(null!==(t=l.get(d))&&void 0!==t?t:-1)+1;l.set(d,_),this._lollipops[h]={id:h,itemIndex:u,basePoint:new r.Point(i.indexToCoordinate(d)+1,s),hovered:p,active:e,label:c.label,color:c.color,items:c.tooltip,visible:!0,stack:_,shape:c.shape,image:this._getImageForUrl(c.imageUrl),showLabelWhenImageLoaded:c.showLabelWhenImageLoaded,textColor:c.labelFontColor}}})),super._createRenderers(e,t)}_getImageForUrl(e){if(e)return this.source.getImageElement(e)}_generateStyle(e,t){const{color:i,label:s,stack:r,shape:n,image:o,textColor:a}=t;let l=e+i+s;if(void 0!==r&&(l+="_stack"+r),!(l in this.stylesCache)){const c=this._model.isDark()?Me.backgroundDark:Me.backgroundLight;let h,d=i;if("active"===e)h=i,d="rgba(255, 255, 255, 0.92)";else if("hovered"===e){const e=(0,D.tryParseRgba)(i);if(null!==e){const t=e[3]*(1-.85);h=(0,D.rgbaToString)((0,D.rgba)(e[0],e[1],e[2],t))}}a&&(d=a);let u=23,p=23,_=1,m=0;"earning"===n?(p=21,u=21,_=2):"earningUp"===n?(u=21,m=1,_=2):"earningDown"===n&&(u=21,m=-.5,_=.5);const g={barLine:{lineStyle:_e.LINESTYLE_DASHED,lineWidth:1,strokeStyle:i},lollipop:{width:u,height:p,bottom:_,backgroundColor:c,lineWidth:1.5,fillStyle:h,strokeStyle:i,fillCircle:!0,text:{label:s,deltaY:m,strokeStyle:d,font:(0,O.makeFont)(12,N.CHART_FONT_FAMILY,"bold"),showWhenImageLoaded:t.showLabelWhenImageLoaded},image:o},shape:n};void 0!==r&&(g.lollipop.incHeight=25*r),this.stylesCache[l]=g}return this.stylesCache[l]}}var Le=i(7711),ke=i(50841),Ee=i(28866),De=i(27642);const Be=(0,n.getLogger)("Chart.UserDefinedImageMarks");class Ve extends De.BarsMarksContainer{constructor(){super(...arguments),this._imageItems=new Map,this._destroyed=!1}destroy(){this._destroyed=!0,super.destroy()}getImageElement(e){ +return this._imageItems.has(e)||this.addImageToStore(e),this._imageItems.get(e)}addImageToStore(e){this._imageItems.has(e)||this._loadNewImage(e)}_loadNewImage(e){const t={imageElement:null};(0,Ee.getImage)(e,e).then((e=>{this._destroyed||(t.imageElement=e,this.updateAllViewsAndRepaint(),this._model.updateSource(this))})).catch((()=>{Be.logWarn(`An error ocurred while loading image ${e}`)})),this._imageItems.set(e,t)}}class Re extends Ve{constructor(e){super(e,new Le.DefaultProperty("UserDefinedTimescaleMarks",{visible:!0})),this._requestedPointsets=new Set,(0,le.hideMarksOnBars)().subscribe(this,(()=>this._properties.childs().visible.setValue(!(0,le.hideMarksOnBars)().value()))),this._paneView=new Ae(e,this,this._showTooltip.bind(this)),this._paneViews=[this._paneView]}destroy(){(0,le.hideMarksOnBars)().unsubscribeAll(this),super.destroy()}zorder(){return ke.sortSourcesPreOrdered.TimeScaleMarks}userEditEnabled(){return!1}clearMarks(){const e=this._model.chartApi();e.isConnected().value()&&Object.keys(this._marks).forEach((t=>{const i=this._getPointsetId(t);e.removePointset(i)})),this._requestedPointsets.clear(),super.clearMarks(),this._paneView.clearCaches(),this.updateAllViewsAndRepaint()}hasContextMenu(){return!1}paneViews(){return this._properties.childs().visible.value()?this._paneViews:[]}updateAllViews(){this._paneView.update()}onClickOutside(){this._paneView.processClickOutside()}_initialize(){this._properties.childs().visible.setValue(!0)}_plateViewData(e){return{text:e.text}}_getData(e){const t=this._model.mainSeries().symbolInfo();if(!t)return;const i=this.roundRange(this._rangeDifference(e)),r=this._model.mainSeries(),n=r.seriesSource().symbolInstanceId(),o=r.properties().childs().interval.value();window.ChartApiInstance.getTimescaleMarks(t,i.start,i.end,(t=>{const i=this._model.chartApi();for(const e of t){e.index=null;const t=e.id,r=this._getPointsetId(t.toString()),a=this._marks[t];if(a&&null!==a.index&&(a.tickmark===e.tickmark?e.index=a.index:this._requestedPointsets.has(r)&&i.isConnected().value()&&(i.removePointset(r),this._requestedPointsets.delete(r))),e.imageUrl&&this.addImageToStore(e.imageUrl),this._marks[t]=e,null===e.index&&i.isConnected().value()){this._requestedPointsets.add(r);const t=[[e.tickmark,0]];i.createPointset(r,"turnaround",(0,s.ensureNotNull)(n),o,t,(e=>this._onPointsetData(e)))}}this._loadedRange=this._rangeUnion(e,this._loadedRange),this.updateAllViewsAndRepaint()}),o)}_getPointsetId(e){return"pointsetMark_"+e}_onPointsetData(e){if("data_update"===e.method){const t=e.params.customId.split("_")[1],i=this._marks[t],s=e.params.plots;i&&1===s.length&&(i.index=s[0].value[0])}this.updateAllViews()}async _showTooltip(e,t){const s=t();if(!s)return;const r=this._model.timeScale(),n=[r.onScroll(),r.barSpacingChanged(),this._model.mainSeries().onSymbolIntervalChanged()],o=this._paneView.processClickOutside.bind(this._paneView);(await Promise.all([i.e(7624),i.e(6092),i.e(240),i.e(962),i.e(1075),i.e(9039)]).then(i.bind(i,36647))).showLollipopTooltip({items:s,position:e, +customCloseSubscriptions:n,onClickOutside:o})}}function Ne(e,t){const i=Math.max(1,Math.floor(t)),s=Math.round(e.x*t)+i%2/2;let r=Math.round(e.size*t);(s+r/2)%1!=0&&(r+=1);const n=Math.min(Math.max(1,Math.round(t*e.borderWidth)),r/2);let o;const a=("up"===e.direction?-1:1)*(e.yInverted?-1:1),l=a*(Math.round(e.size*t/2)+i%2);if(void 0!==e.fixedSpaceYPosition){const i=Math.round(e.fixedSpaceYPosition.itemSpacing*t),s=e.fixedSpaceYPosition.order,n=a*(r*s+i*(s+1));o=Math.round(e.fixedSpaceYPosition.basePosition*t)+n+l}else o=Math.round(e.y*t)+l;return{x:s,y:o,size:r,borderWidth:n,tickSize:i}}function Oe(e,t,i,s){var r,n,o;if(e.save(),i&&!s.highlightByAuthor&&(e.globalAlpha=.4),s.mine)!function(e,t,i){const{borderColor:s,backgroundColor:r,doNotFill:n,direction:o,yInverted:a}=i,{x:l,y:c,borderWidth:h,size:d,tickSize:u}=Ne(i,t.pixelRatio);e.strokeStyle=s,e.fillStyle=r,e.lineWidth=h;const p="up"===o!==a?-1:1;let _=Math.round(d/2/Math.tan(Math.PI/6))+u%2/2;(l+_/2)%1!=0&&(_-=1);e.translate(l,c+_/2*p),e.beginPath();const m=h/2;e.moveTo(0,-p*(_-m)),e.lineTo(d/2-m,h/2),e.lineTo(-d/2+m,h/2),e.lineTo(0,-p*(_-h/2)),e.closePath(),n||e.fill();e.stroke()}(e,t,s);else{let i=!1;{const e=s.image&&(o=s.image,Boolean(o&&o.imageElement&&o.imageElement.complete&&o.imageElement.naturalWidth));i=Boolean(e&&!s.showLabelWhenImageLoaded)}!function(e,t,i,s,r){const{borderColor:n,backgroundColor:o,label:a}=i,l=t.pixelRatio,{x:c,y:h,borderWidth:d,size:u}=Ne(i,l);e.strokeStyle=n,e.fillStyle=o,e.lineWidth=d,e.beginPath();const p=u/2-d/2;e.arc(c,h,p,0,2*Math.PI,!0),e.closePath(),e.fill(),r&&function(e,t,i,s,r){if(t){const n=2*i;e.save(),e.imageSmoothingEnabled=!0,e.imageSmoothingQuality="high",(0,me.createCircle)(e,s,r,i),e.clip(),e.drawImage(t,s-i,r-i,n,n),e.restore()}}(e,r,p,c,h);e.stroke(),!s&&a&&u/2>=7&&(e.textAlign="center",e.textBaseline="middle",e.font=a.font,e.fillStyle=a.fontColor,(0,R.drawScaled)(e,l,(()=>{e.fillText(a.text,c/l,h/l)})))}(e,t,s,i,null!==(n=null===(r=s.image)||void 0===r?void 0:r.imageElement)&&void 0!==n?n:void 0)}e.restore()}class Fe{constructor(e,t,i,s){this._canvas=null,this._clickHandler=e,this._enterHandler=t,this._leaveHandler=i,this._data=null!=s?s:null}setData(e){this._data=e}hitTest(e,t){if(null===this._data)return null;for(let i=this._data.items.length-1;i>=0;--i){const s=this._hitTestDot(this._data.items[i],e,t.pixelRatio);if(s)return s}return null}draw(e,t){this._canvas=e.canvas,null!==this._data&&this._data.items.forEach(Oe.bind(null,e,t,this._data.highlightByAuthor))}_hitTestDot(e,t,i){const s=new r.Point(e.x,Ne(e,i).y/i);if((0,pe.pointInCircle)(t,s,Math.max(e.size/2,8))){const t=this._canvas,i=null===t?void 0:{mouseEnterHandler:()=>this._enterHandler(e,s.y,t),mouseLeaveHandler:()=>this._leaveHandler(),clickHandler:i=>this._clickHandler(e,s.y,t,i),tapHandler:i=>this._clickHandler(e,s.y,t,i)};return new ve.HitTestResult(ve.HitTestResult.REGULAR,{activeItem:e.originalItem.id,...i})}return null}}const We={green:{border:(0,ce.getHexColorByName)("color-minty-green-700"),background:(0, +ce.getHexColorByName)("color-minty-green-a700")},red:{border:(0,ce.getHexColorByName)("color-ripe-red-700"),background:(0,ce.getHexColorByName)("color-ripe-red-500")},neutral:{border:(0,ce.getHexColorByName)("color-tan-orange-700"),background:(0,ce.getHexColorByName)("color-tan-orange-500")},yellow:{border:"#EAC300",background:"#FFD400"},blue:{border:"#047ACE",background:"#0496FF"}};function He(e){var t,i,s,r;return e.hovered||e.highlightByAuthor?null!==(i=null===(t=e.overrideBorderWidth)||void 0===t?void 0:t.hoveredWidth)&&void 0!==i?i:4:null!==(r=null===(s=e.overrideBorderWidth)||void 0===s?void 0:s.width)&&void 0!==r?r:2}class ze extends class{constructor(e,t){this._tooltip=null,this._hoveredBarsMarkData=null,this._destroyed=!1,this._invalidated=!0,this._originalData=[],this._source=e,this._model=t,this._renderer=new Fe(this._onItemClicked.bind(this),this._showItem.bind(this),this._hideItem.bind(this)),this._createTooltipRenderer().then((e=>{this._destroyed?null==e||e.destroy():this._tooltip=e})),e.properties().childs().visible.subscribe(null,(()=>{var e;null===(e=this._tooltip)||void 0===e||e.hide(!0)}))}destroy(){var e;this._destroyed=!0,null===(e=this._tooltip)||void 0===e||e.destroy()}source(){return this._source}update(){this._invalidated=!0}renderer(e,t){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer}onClickOutside(e){e.isTouch&&null!==this._tooltip&&!this._tooltip.contains(e.target)&&this._tooltip.hide(!0)}_extractBarMarksRendererItemData(e,t){var i,s;const r=null!==(i=t.overridedTheme)&&void 0!==i?i:We[t.theme],n=this._calculateSize(e,t),o=this._calculateY(e,n,t);return null===this._hoveredBarsMarkData||this._hoveredBarsMarkData.id!==t.id||this._hoveredBarsMarkData.x===t.x&&this._hoveredBarsMarkData.y===Math.round(o)||(null===(s=this._tooltip)||void 0===s||s.hide(!0),this._hoveredBarsMarkData=null),{x:t.x,y:this._calculateY(e,n,t),direction:t.direction,borderColor:r.border,borderWidth:He(t),backgroundColor:r.background,size:n,doNotFill:!t.public,yInverted:t.yInverted,label:void 0===t.label?void 0:{text:t.label,fontColor:t.labelFontColor,font:(0,O.makeFont)(Math.ceil(Math.max(10,Math.min(n/2,20))),N.CHART_FONT_FAMILY,"bold")},originalItem:t}}_onItemClicked(e,t,i,s){s.isTouch&&this._showItem(e,t,i)}async _showItem(e,t,i){var r;const n=await this._tooltipProps(e);if(null===n)return;const o=this._model.timeScale().barSpacing(),a=this._calculateSize(o,e.originalItem);this._hoveredBarsMarkData={x:e.x,y:Math.round(this._calculateY(o,a,e.originalItem)),id:e.originalItem.id},null===(r=this._tooltip)||void 0===r||r.show({itemSize:a,container:(0,s.ensureNotNull)(i.parentElement),x:e.x,y:t,factoryProps:n,onClickOutside:()=>{var e;return null===(e=this._tooltip)||void 0===e?void 0:e.hide(!0)}})}_hideItem(){var e;null===(e=this._tooltip)||void 0===e||e.hide()}_calculateSize(e,t){return Math.min(553,Math.max(7,t.minSize,.8*e))}_updateImpl(){this._originalData=this._source.getPlatesViewData() +;const e=this._model.timeScale().barSpacing(),t=this._originalData.map(this._extractBarMarksRendererItemData.bind(this,e));this._renderer.setData({items:t,barSpacing:e,highlightByAuthor:!1})}}{async _createTooltipRenderer(){const[{TooltipRenderer:e},{UserDefinedBarsMarksTooltip:t}]=await Promise.all([Promise.all([i.e(2913),i.e(962),i.e(8020)]).then(i.bind(i,40072)),Promise.all([i.e(2913),i.e(962),i.e(8020)]).then(i.bind(i,71276))]);return new e(t)}_calculateY(e,t,i){const s=Math.max(1.4*i.minSize,e+4),r=("up"===i.direction?-1:1)*(i.yInverted?-1:1)*(s*(i.order+.6)+.25*s);return i.y+r}_onItemClicked(e,t,i,s){var r,n;super._onItemClicked(e,t,i,s),null===(n=(r=e.originalItem).onClicked)||void 0===n||n.call(r)}_tooltipProps(e){const t=e.originalItem.text;return t?Promise.resolve({text:t}):Promise.resolve(null)}_extractBarMarksRendererItemData(e,t){return{...super._extractBarMarksRendererItemData(e,t),showLabelWhenImageLoaded:t.showLabelWhenImageLoaded,image:t.image}}}class Ue extends Ve{constructor(e){super(e,new Le.DefaultProperty("UserDefinedBarsMarks",{visible:!0})),this._paneView=new ze(this,e),this._paneViews=[this._paneView],(0,le.hideMarksOnBars)().subscribe(this,(()=>{this.properties().childs().visible.setValue(!(0,le.hideMarksOnBars)().value())}))}destroy(){(0,le.hideMarksOnBars)().unsubscribeAll(this),this._paneView.destroy(),super.destroy()}zorder(){return ke.sortSourcesPreOrdered.BarMarks}userEditEnabled(){return!1}clearMarks(){super.clearMarks(),this.updateAllViewsAndRepaint()}hasContextMenu(){return!1}paneViews(){return this._properties.childs().visible.value()?this._paneViews:[]}onClickOutside(e){this._paneView.onClickOutside(e)}_initialize(){this.properties().childs().visible.setValue(!0)}_plateViewData(e){const t={text:e.text,onClicked:e.onClicked};"object"==typeof e.color&&(t.theme="user_defined_theme",t.overridedTheme={},t.overridedTheme.border=e.color.border,t.overridedTheme.background=e.color.background);const i=(0,ae.isNumber)(e.borderWidth)?e.borderWidth:void 0,s=(0,ae.isNumber)(e.hoveredBorderWidth)?e.hoveredBorderWidth:void 0;if(void 0===i&&void 0===s||(t.overrideBorderWidth={width:i,hoveredWidth:s}),e.showLabelWhenImageLoaded&&(t.showLabelWhenImageLoaded=!0),e.imageUrl){const i=this.getImageElement(e.imageUrl);t.image=i}return t}_getData(e){const t=this._model.mainSeries().symbolInfo();if(!t)return;const i=this.roundRange(this._rangeDifference(e)),s=this._model.mainSeries().properties().childs().interval.value();window.ChartApiInstance.getMarks(t,i.start,i.end,(t=>{for(const e of t)this._marks[e.id]=e,e.imageUrl&&this.addImageToStore(e.imageUrl);this._loadedRange=this._rangeUnion(e,this._loadedRange),this.updateAllViewsAndRepaint()}),s)}}var je=i(45345);const Ge=new a.TranslatedString("apply toolbars theme",o.t(null,void 0,i(58570)));class qe extends d.UndoCommand{constructor(e,t,i=!0){super(Ge),this._prevThemeName=e,this._themeName=t,this._syncState=i}undo(){(0,L.isStdThemeName)(this._prevThemeName)&&((0,je.setTheme)(this._prevThemeName),this._syncState&&(0,L.syncTheme)())}redo(){(0, +L.isStdThemeName)(this._themeName.toLowerCase())&&((0,je.setTheme)(this._themeName.toLowerCase()),this._syncState&&(0,L.syncTheme)())}}i(78831),i(74914),i(51620);var $e=i(7019),Ye=i(65407),Ke=i(12882),Xe=i(40549);const Ze=!l.CheckMobile.any(),Je=(0,n.getLogger)("ChartWidgetCollectionBase"),Qe=new a.TranslatedString("apply indicators to entire layout",o.t(null,void 0,i(44547))),et=new a.TranslatedString("sync time",o.t(null,void 0,i(60635))),tt=new a.TranslatedString("resize layout",o.t(null,void 0,i(13034))),it=new a.TranslatedString("reset layout sizes",o.t(null,void 0,i(30910))),st=new a.TranslatedString("apply chart theme",o.t(null,void 0,i(66568))),rt=new a.TranslatedString("symbol lock",o.t(null,void 0,i(92831))),nt=new a.TranslatedString("interval lock",o.t(null,void 0,i(28916))),ot=new a.TranslatedString("date range lock",o.t(null,void 0,i(90621))),at=new a.TranslatedString("track time",o.t(null,void 0,i(47122)));o.t(null,void 0,i(46669)),o.t(null,void 0,i(98478)),o.t(null,void 0,i(34004)),o.t(null,void 0,i(96260)),o.t(null,void 0,i(38641)),o.t(null,void 0,i(10160));function lt(e,t){const i=t.model().model().studyTemplate();e.undoHistory.beginUndoMacro(Qe);for(let s=0;se.id()===n)))}const l=t.pasteSourceFromClip(o,i,!0);if(l&&1===l.length){const e=l[0];if(r.asCompare){const i=(0,s.ensureNotNull)(t.mainSeries().priceScale());t.moveToScale(e,(0,s.ensureDefined)(o),i,n),t.setPriceScaleMode({percentage:!0},i,null)}}t.model().lightUpdate()}}e.undoHistory.endUndoMacro()}function ht(e){let t=1;for(;e.has(""+t);)t++;return""+t}function dt(e){const t=new Map,i=e.chartsCountToSave(),s=new Set;for(let r=0;r(0,s.ensureDefined)(e.content.chartId)))}function gt(e,t,i){e.chartsCountToSave();i.forEach((i=>{const s=(r=i.chartId,null!==(o=null===(n=e.chartWidgetsDefs.find((e=>e.chartWidget.id()===r)))||void 0===n?void 0:n.chartWidget)&&void 0!==o?o:null);var r,n,o;null==s||s.resetLineToolsInvalidated(t,i.savedDto,i.sharingMode)}))}function ft(e,t,i,s){const r=e.map((e=>e.chartWidget)).filter((e=>e.hasModel())).filter((e=>e.id()===t||0!==s));try{r.forEach((e=>e.startApplyingLineToolUpdateNotification())),r.forEach((e=>e.applyLineToolUpdateNotification(i,s)))}finally{r.forEach((e=>e.endApplyingLineToolUpdateNotification()))}}function vt(e){return new C({copyRequested:(t,i)=>{e.activeChartWidget.value().model().clipboardCopy(t,i)},cutRequested:(t,i)=>{e.activeChartWidget.value().model().clipboardCut(t,i)},pasteRequested:(t,i)=>{(i?i.model().undoModel():e.activeChartWidget.value().model()).clipboardPaste(t,i)}})}function St(e,t){0}function yt(e){const t={};return e.chartWidgetsDefs.map((e=>e.chartWidget)).forEach((e=>t[e.id()]=function(e){var t,i,r,n,o;const a={};if(!e.hasModel()){const n=e.options().content;if(!n)return a;const o=(0,s.ensureNotNull)(n.panes.reduce(((e,t)=>{var i;return null!==(i=null!=e?e:t.sources.find((e=>"MainSeries"===e.type)))&&void 0!==i?i:null}),null));return a.resolution=null===(t=o.state)||void 0===t?void 0:t.interval,a.symbol=null===(i=o.state)||void 0===i?void 0:i.symbol,a.short_name=null===(r=o.state)||void 0===r?void 0:r.shortName,a}const l=e.model().mainSeries(),c=l.properties().childs(),h=l.symbolInfo();a.resolution=c.interval.value(),a.symbol_type=null!==h&&h.type||"",a.exchange=null!==h&&h.exchange||"",a.listed_exchange=null!==h&&h.listed_exchange||"";const d=null!==(n=null==h?void 0:h.legs)&&void 0!==n?n:[];if(null!==h&&l.isSpread()){const e=d[0];let t=h.base_name[0];t=t.split(":")[1],a.symbol=e,a.short_name=t,a.expression=h.full_name}else a.symbol=null!==h&&h.ticker||c.symbol.value(),a.short_name=c.shortName.value();const u=null!==(o=null==h?void 0:h.base_name)&&void 0!==o?o:[];return a.legs=d.map(((e,t)=>({symbol:e,pro_symbol:u[t]}))),a}(e))),t}function bt(e,t){0}function wt(e,t){return I(t,{snapshotUrl:e}).then((e=>((0,M.emit)("onScreenshotReady",e),e)))}function Pt(e,t){const i={snapshotUrl:e};const s=(0,A.isOnMobileAppPage)("any");return(s?I:x)(t,i).then((e=>((0,M.emit)("onScreenshotReady",e),s||(0,M.emit)("onServerScreenshotCopiedToClipboard"),e)))}function Ct(e){return function(e){return T().then((t=>t.downloadClientScreenshot(e)))}(e)}function Tt(e){return function(e){return T().then((t=>t.copyToClipboardClientScreenshot(e)))}(e).then((()=>{(0,M.emit)("onClientScreenshotCopiedToClipboard")}))}const xt={s:0,"2h":0,"2v":1,"2-1":1,"3s":0,"3h":0,"3v":2,4:1,6:1,8:1,"1-2":1,"3r":1,"4h":0,"4v":3,"4s":0,"5h":0,"6h":0,"7h":0,"8h":0,"1-3":1,"2-2":3,"2-3":2,"1-4":1,"5s":0,"6c":4,"8c":6};function It(e,t,i,s){let r=0;const n=(0,Ye.createWVFromGetterAndSubscriptions)((()=>++r),[i,s]);return(0,$e.combine)((t=>{var i +;return null!==(i=e()[xt[t]])&&void 0!==i?i:null}),t,n)}function Mt(e,t,i,s){const r=Math.max(1,window.devicePixelRatio||1),n=e.getAll();let o;const a=e.maximizedChartWidget().value();if(s&&s.onlyActiveChart||a)return{layout:"s",hidpiRatio:r,theme:(0,L.getCurrentTheme)().name,charts:[e.activeChartWidget.value().images(s)],publishedBy:o};const l=[],c=k.layouts[e.layout.value()].count,h={showCollapsedStudies:(s=s||{}).showCollapsedStudies,status:s.status};for(let e=0;e{const t=this._state.currentLayoutResizeAction.value();t&&this._applyMouseMove(t.delta,e)},this._state=e,this._splitterElement=t,this._splitter=i,(0,re.shiftPressed)().subscribe(this._onShiftPressed)}destroy(){(0,re.shiftPressed)().unsubscribe(this._onShiftPressed)}mouseDownEvent(e){this._mouseDownOrTouchStartEvent(e)}touchStartEvent(e){this._mouseDownOrTouchStartEvent(e)}pressedMouseMoveEvent(e){this._pressedMouseOrTouchMoveEvent(e)}touchMoveEvent(e){this._pressedMouseOrTouchMoveEvent(e)}mouseUpEvent(e){this._mouseUpOrTouchEndEvent(e)}touchEndEvent(e){this._mouseUpOrTouchEndEvent(e)}mouseEnterEvent(e){this._highlightSplitters(e.shiftKey)}mouseLeaveEvent(e){const t=kt(this._splitter.className);Array.from(this._state.parent.getElementsByClassName(t)).forEach((e=>e.classList.remove(Ke.hovered)))}mouseDoubleClickEvent(e){const t=(0,te.layoutInitialSizingState)(this._state.layoutTemplate.value().expression);this._state.undoHistory.beginUndoMacro(it),this._state.undoHistory.pushUndoCommand(new _(this._state.sizingState.spawn(),this._state.sizingState.value(),t,it));const i=this._state.layoutTemplate.value().layoutType;this._state.undoHistory.pushUndoCommand(new p((e=>e?this._state.allLayoutSizesState.set(i,e):this._state.allLayoutSizesState.delete(i)),this._state.allLayoutSizesState.get(this._state.layoutTemplate.value().layoutType),t,it)),this._state.undoHistory.endUndoMacro()}_highlightSplitters(e){const t=kt(this._splitter.className);Array.from(this._state.parent.getElementsByClassName(t)).forEach((e=>e.classList.remove(Ke.hovered)));(e?Array.from(this._state.parent.getElementsByClassName(t)):[this._splitterElement]).forEach((e=>e.classList.add(Ke.hovered)))}_mouseDownOrTouchStartEvent(e){ +const t=new r.Point(e.localX+this._splitterElement.offsetLeft,e.localY+this._splitterElement.offsetTop),i=(0,ie.deepCopy)(this._state.sizingState.value());this._state.currentLayoutResizeAction.setValue({point:t,splitter:this._splitter,initialState:i,alignedState:this._state.layoutTemplate.value().syncSublayoutsBySplitter(this._splitter,(0,ie.deepCopy)(i)),shiftState:e.shiftKey,delta:0}),this._splitterElement.classList.add(Ke["i-active"]),this._highlightSplitters(e.shiftKey)}_pressedMouseOrTouchMoveEvent(e){const t=this._state.currentLayoutResizeAction.value();if(!t)return;t.shiftState!==e.shiftKey&&(this._highlightSplitters(e.shiftKey),t.shiftState=e.shiftKey);const i=new r.Point(e.localX+this._splitterElement.offsetLeft,e.localY+this._splitterElement.offsetTop);t.delta="v"===t.splitter.orientation?i.y-t.point.y:i.x-t.point.x,this._applyMouseMove(t.delta,e.shiftKey)}_mouseUpOrTouchEndEvent(e){const t=this._state.currentLayoutResizeAction.value();if(t&&(this._splitterElement.classList.remove(Ke["i-active"]),this._state.currentLayoutResizeAction.setValue(null),t.currentState)){this._state.undoHistory.beginUndoMacro(tt),this._state.undoHistory.pushUndoCommand(new _(this._state.sizingState.spawn(),t.initialState,t.currentState,tt));const e=this._state.layoutTemplate.value().layoutType;this._state.undoHistory.pushUndoCommand(new p((t=>t?this._state.allLayoutSizesState.set(e,t):this._state.allLayoutSizesState.delete(e)),this._state.allLayoutSizesState.get(this._state.layoutTemplate.value().layoutType),this._state.sizingState.value(),it)),this._state.undoHistory.endUndoMacro(),this._state.layoutSizesChanged.setValue(!0)}}_applyMouseMove(e,t){var i;const r=(0,s.ensureNotNull)(this._state.currentLayoutResizeAction.value()),n=t?r.alignedState:r.initialState,o=null!==(i=this._state.options.padding)&&void 0!==i?i:2,a=Lt(this._state);r.currentState=this._state.layoutTemplate.value().resizeApplier(a,o,e,r.splitter,(0,ie.deepCopy)(n),t),this._state.sizingState.setValue(r.currentState)}}function Dt(e,t,i,s,r){var n,o;const a=null!==(n=e.options.padding)&&void 0!==n?n:2,l=null!==(o=e.options.border)&&void 0!==o?o:0;r=null!=r?r:e.layoutTemplate.value();const c=Lt(e),h=r.sizer(c,i,s,a+l,Ze?e.sizingState.value():void 0);h.width=Math.max(Math.round(h.width),0),h.height=Math.max(Math.round(h.height),0),h.top=Math.round(h.top),h.left=Math.round(h.left),t.metrics=h;const d=t.container.value();if(d){d.style.width=h.width+"px",d.style.height=h.height+"px",d.style.top=h.top+"px",d.style.left=h.left+"px";const e=1===s;false;const t=Math.round(c.width),i=0===h.top&&0===h.left,r=0===h.top&&h.left+h.width===t,n=0===h.top&&h.width===t;d.classList.toggle("top-left-chart",!e&&!n&&i),d.classList.toggle("top-right-chart",!e&&!n&&r),d.classList.toggle("top-full-width-chart",e||n)}t.width.setValue(h.width),t.height.setValue(h.height)}function Bt(e){var t,i,s;let r;const n=e.layoutTemplate.value(),o=e.maximizedChartDef.value();if(r=o?[o]:e.chartWidgetsDefs.slice(0,n.count).filter((e=>!e.hiddenInLayout.value())),r.forEach(((t,i)=>Dt(e,t,i,r.length))), +Ze&&!e.maximizedChartDef.value()){const r=Lt(e),o=null!==(t=e.options.padding)&&void 0!==t?t:2,a=null!==(i=e.options.border)&&void 0!==i?i:0,l=n.splitters(r,o+a,e.sizingState.value()),c=null!==(s=e.splitters.value())&&void 0!==s?s:[];c.forEach(((e,t)=>{t>=l.length&&(e.splitterElement.remove(),e.mouseHandler.destroy(),e.mouseListener.destroy())}));const h=l.map(((t,i)=>{const s=i({def:t,metrics:e.layoutTemplate.value().sizer({top:0,left:0,width:256,height:256},i,s.length,0)}))).sort(((e,t)=>e.metrics.top-t.metrics.top||e.metrics.left-t.metrics.left)).map((e=>e.def));if(s.length<2)return null;let r=s.indexOf(t);return-1===r?null:(r=(r+(i?s.length-1:1))%s.length,s[r])}function Rt(e,t){return e.chartWidgetsDefs.some((e=>{var i;return(null===(i=e.chartWidget)||void 0===i?void 0:i.id())===t}))}function Nt(e){let t=1;for(;e(""+t);)t++;return""+t}function Ot(e){const t=e.activeChartWidget.value();if(t){const i=t.state();return i.chartId=Nt((t=>Rt(e,t))),i.shouldBeSavedEvenIfHidden=!1,{content:i}}}function Ft(e,t,i){const r=e.toastsFactory;let n={chartWidgetCollection:t,isActive:0===e.chartWidgetsDefs.length,barsMarksContainersFactory:t=>function(e,t,i){const s=[];{const t=new Ue(e);s.push(t);const i=new Re(e);s.push(i)}return s}(t,0,e.options),undoHistory:e.undoHistory,readOnly:e.readOnly,initialLoading:e.initialLoading,getToasts:r?()=>r.getChartToasts():void 0,...null!=i?i:{}};void 0!==e.customLegendWidgetsFactoriesMap&&(n.customLegendWidgetFactories=new Map(e.customLegendWidgetsFactoriesMap));const o=document.createElement("div");o.classList.add("chart-container"),o.style.position="absolute",o.style.overflow="hidden",e.parent.appendChild(o),l.isEdge&&(o.style.touchAction="none",o.style.msTouchAction="none"),n.className&&o.classList.add(n.className);const a={alive:new Xe(!0),container:new Xe(o),width:new Xe,height:new Xe,collapsed:new Xe(!1),hiddenInLayout:new Xe(!1),visible:new Xe,rdState:new Q.ResizerDetacherState,requestFullscreen:()=>{e.globalDetachable.value()&&(e.setMaximized(a),e.activeChartWidget.setValue((0,s.ensureNotNull)(a.chartWidget)))},exitFullscreen:()=>{e.activeChartWidget.value()===a.chartWidget&&e.setMaximized(null)},detachable:e.globalDetachable,fullscreenable:e.globalDetachable,fullscreen:new Xe, +chartWidget:null};a.rdState.pushOwner(a),e.chartWidgetsDefs.push(a);const c=()=>{a.visible.setValue(!a.hiddenInLayout.value()&&e.options.resizerBridge.visible.value())};a.hiddenInLayout.subscribe((()=>{(0,s.ensureNotNull)(a.chartWidget).setVisible(!a.hiddenInLayout.value()),c()})),a.collapsed.subscribe((()=>(0,s.ensureNotNull)(a.chartWidget).setCollapsed(a.collapsed.value()))),e.options.resizerBridge.visible.subscribe(c),c(),function(e,t){let i=0,s=0;const r=t.layoutTemplate.value();for(let n=0;nRt(e,t))),d=new ee.ChartWidget(n,h,t.metaInfo.uid.value());return a.chartWidget=d,e.saveChartService&&a.chartWidget.setSaveChartService(e.saveChartService),n.containsData?d.finishInitWithoutConnect():d.connect(),d.withModel(null,(()=>{const t=d.model().model();e.customSources.forEach(((e,i)=>{t.addCustomSource(i,e.factory,e.layer)}))})),e.updateWatchedValue(),e.updateActivityView(),e.chartWidgetCreatedDelegate.fire(d),a}function Wt(e,t,i,s){const r={...e.widgetOptions,...e.savedChartWidgetOptions.shift()||Ot(e),...0===i||e.symbolLock.value()?void 0:{defSymbol:null}},n=Ft(e,t,r),o=n.chartWidget;return o.modelCreated().subscribe(null,(()=>{s?s():e.checkAllPendingModelsAlreadyCreated(),e.dateRangeLock.value()&&o===e.activeChartWidget.value()&&e.subscribeToCompletedEventForDateRangeSync(o,!0)}),!0),n}function Ht(e){e.hiddenInLayout.setValue(!0);const t=e.container.value();t.parentNode&&t.parentNode.removeChild(t),e.fullscreen.setValue(!1)}function zt(e,t){e.chartWidgetsDefs.forEach((i=>{const r=(0,s.ensureNotNull)(i.chartWidget);r.onZoom().unsubscribeAll(t),r.onScroll().unsubscribeAll(t),r.withModel(null,(()=>{const t=r.lineToolsSynchronizer();null!==t&&(t.hasChanges().unsubscribe(e.recalcHasChanges),e.recalcHasChanges())}))}))}async function Ut(e,t,i){var r,n;try{const t=e.chartWidgetsDefs.map((e=>{var t,i,s;return null!==(s=null===(i=null===(t=e.chartWidget)||void 0===t?void 0:t.lineToolsSynchronizer())||void 0===i?void 0:i.flushPendingSavings())&&void 0!==s?s:null})).filter(ae.notNull);t.length&&await Promise.all(t)}catch(e){Je.logError(`Error flushing line tools: ${e}`)}(t=e.checkProFeature(t))in k.layouts||(t="s"),zt(e,i);const o=e.layoutType,a=k.layouts[t].count;(0,M.emit)("layout_about_to_be_changed",t),(null!==(r=e.splitters.value())&&void 0!==r?r:[]).forEach(((e,t)=>{e.splitterElement.remove(),e.mouseHandler.destroy()})),e.splitters.setValue([]);const l=k.layouts[t];e.layoutTemplate.setValue(l);const c=null!==(n=e.allLayoutSizesState.get(l.layoutType))&&void 0!==n?n:(0,te.layoutInitialSizingState)(l.expression);e.allLayoutSizesState.set(l.layoutType,c),e.sizingState.setValue(c);const h=e.maximizedChartDef.value();o!==t&&e.maximizedChartDef.value()&&e.maximizedChartDef.setValue(null),h&&e.activeChartWidget.setValue((0,s.ensureNotNull)(h.chartWidget));for(let t=0;t=a +;if(r=e.maximizedChartDef.value()?e.maximizedChartDef.value()===n:t1),n.fullscreen.setValue(e.maximizedChartDef.value()===n),n.collapsed.setValue(o)}else n&&(Ht(n),n.collapsed.setValue(o))}e.sizingState.setValue(c),Bt(e),e.layoutWV.setValue(t),e.setLayoutType(t),e.updateWatchedValue(),function(e){const t=e.layoutTemplate.value().count;e.inlineChartsCount.setValue(t),e.globalDetachable.setValue(t>1)}(e),e.checkAllPendingModelsAlreadyCreated(),function(e,t){e.chartWidgetsDefs.forEach((i=>{const r=(0,s.ensureNotNull)(i.chartWidget);r.onZoom().subscribe(t,(t=>e.onZoom.fire(t))),r.onScroll().subscribe(t,(()=>e.onScroll.fire())),r.withModel(null,(()=>{const t=r.lineToolsSynchronizer();null!==t&&(t.hasChanges().subscribe(e.recalcHasChanges),e.recalcHasChanges())}))}))}(e,i),e.inlineChartsCount.value()<1&&a>0&&e.chartWidgetsDefs[a-1].rdState.bridge().attach()}function jt(e,t,i,s,r){if(!s&&!e.crosshairLockRaw)return!1;const n=e.actualLayoutCount();return e.chartWidgetsDefs.slice(0,n).filter((e=>e.rdState.bridge().visible.value())).map((e=>e.chartWidget)).filter((e=>e.id()!==i&&e.hasModel())).forEach((e=>e.model().model().setExternalPosition(t,r))),!0}function Gt(e,t,i,s,r){if(jt(e,t,i,s,r)){const i=e.crossHairSyncBroadcast;if(i){const e={type:"crosshair",payload:{point:t,envState:r,sourceUniqueId:i.uniqueId}};i.channel.postMessage(e)}}}function qt(e){const t=new BroadcastChannel("ChartWidgetsCollection");return t.onmessage=t=>{const i=t.data,s=e();if(s.crossHairSyncBroadcast&&"crosshair"===i.type)s.crossHairSyncBroadcast.uniqueId!==i.payload.sourceUniqueId&&jt(s,i.payload.point,null,!1,i.payload.envState)},{channel:t,uniqueId:(0,J.randomHashN)(6)}}function $t(e){var t;null===(t=e.crossHairSyncBroadcast)||void 0===t||t.channel.close()}function Yt(e,t,i){if(!e.trackTimeLock.value()||e.dateRangeLock.value())return;const s=e.layoutTemplate.value().count;e.undoHistory.beginUndoMacro(et),e.chartWidgetsDefs.slice(0,s).filter((e=>e.chartWidget.hasModel()&&e.chartWidget.model().model()!==i)).forEach((e=>{const i=e.chartWidget.model().model(),s=i.mainSeries().syncModel();s&&i.syncTimeWithModel(s.syncSourceTarget(),t)})),e.undoHistory.endUndoMacro()}function Kt(e){return Promise.all(e.map((e=>{const t=e.model().mainSeries();return t.symbolResolvingActive().value()?h(t.dataEvents().symbolResolved()).promise:t.symbolInfo()})))}function Xt(e){return e.chartWidgetsDefs.every((e=>e.chartWidget.hasModel()))?Promise.resolve(e.chartWidgetsDefs.map((e=>e.chartWidget))):Promise.all(e.chartWidgetsDefs.map((e=>e.chartWidget.hasModel()||h(e.chartWidget.modelCreated()).promise))).then((()=>Xt(e)))}function Zt(e,t){var i;if((0,c.enabled)("charting_library_base"))return t +;if("s"===t||e.widgetOptions.containsData||e.readOnly||isProductFeatureEnabled(ProductFeatures.MULTIPLE_CHARTS)&&(0,s.ensure)(null===(i=getProductFeatureConfig(ProductFeatures.MULTIPLE_CHARTS))||void 0===i?void 0:i.limit)>=k.layouts[t].count)return t;return"s"}async function Jt(e,t,i){if(i=Zt(e,i),e.layoutWV.value()===i)return!1;const s=e.chartWidgetsDefs.map((e=>{var t,i,s;return null!==(s=null===(i=null===(t=e.chartWidget)||void 0===t?void 0:t.lineToolsSynchronizer())||void 0===i?void 0:i.flushPendingSavings())&&void 0!==s?s:null})).filter(ae.notNull);if(s.length)try{await Promise.all(s)}catch(e){Je.logError(`Error flushing line tools: ${e}`)}return e.undoHistory.pushUndoCommand(new oe(t,i)),!0}async function Qt(e,t,i){const{theme:s,onlyActiveChart:r,restoreNonThemeDefaults:n,themeName:o,standardTheme:a,syncState:l=!0,noUndo:c}=i,h=(0,L.getCurrentTheme)().name;let d;r?d=[e.activeChartWidget.value()]:(await Promise.all(e.savedChartWidgetOptions.map(((i,s)=>new Promise((i=>{Ht(Wt(e,t,s,i))}))))),d=e.chartWidgetsDefs.map((e=>e.chartWidget))),c?(a&&new qe(h,o,l).redo(),d.forEach((e=>{e.model().model().restoreTheme(s,n,c)}))):(e.undoHistory.beginUndoMacro(st),a&&e.undoHistory.pushUndoCommand(new qe(h,o,l)),d.forEach((e=>{e.model().model().restoreTheme(s,n)})),e.undoHistory.endUndoMacro())}function ei(e,t){e.symbolLock.setValue(t)}function ti(e,t){const{internalSymbolLock:i,activeChartWidget:s,undoHistory:r,chartWidgetsDefs:n,dateRangeLock:o,loadingContent:a}=e;if(t!==i.value())if(a)i.setValue(t);else{if(e.undoHistory.beginUndoMacro(rt),t){const t=s.value(),i=t.getSymbol();for(let s=0;s{"use strict";i.r(t),i.d(t,{setChartFontFamily:()=>r,CHART_FONT_FAMILY:()=>n,CHART_MONOSPACE_FONT_FAMILY:()=>o});const s="'Trebuchet MS', Roboto, Ubuntu, sans-serif";function r(e){ +n=e}let n=`-apple-system, BlinkMacSystemFont, ${s}`;const o="monospace"},72005:(e,t,i)=>{"use strict";var s=i(26867);i(51226);var r=i(47539).TranslatedString,n=i(50151),o=n.assert,a=n.ensureDefined,l=i(46936).Series,c=i(2484),h=i(50792).ActionBinder,d=i(56840).setValue,u=i(35936).TabNames,p=i(68009).showGoToDateDialog,_=i(68335),m=i(66141),g=i(68927).Study,f=i(46289).StudyStub,v=i(89215).isStudy,S=i(10971).LineDataSource,y=i(6250),b=y.isLineTool,w=y.isStudyLineTool,P=i(83421).STUDYPLOTDISPLAYTARGET,C=i(43986).Action,T=i(62923).ACTION_ID,x=i(76076),I=i(578).Interval,M=i(1930),A=M.getDefaultStyle,L=M.hasVolume,k=i(29628).showSymbolInfoDialog,E=i(36646).InvalidationMask,D=i(82992).linking,B=i(84603).showChangeIntervalDialogAsync,V=i(68121).showDialog,R=i(20364),N=R.availableTimezones,O=R.timezoneIsAvailable,F=i(90995).toggleHideMode,W=i(58403).StudyMetaInfo,H=i(51768).trackEvent,z=i(78996).lastMouseOrTouchEventInfo,U=i(64548);const{viewportChangeEvent:j}=i(97425),{SelectPointMode:G}=i(76076),{ReplayStatus:q}=i(14948);var $=i(98351).getLogger("ChartWidget",{color:"#606"}),Y=i(86339).appendEllipsis,K=i(57737).isMultipleLayout,X=i(19334).addPerfMark,Z=i(52865).combineProperty,J=i(46719).ChartWidgetBase,Q=i(49483).CheckMobile.any(),ee=i(45673).TIMEFRAMETYPE,te=i(71668).createDeferredPromise,ie=i(87172).addPlusButtonProperty;const se=c.enabled("show_average_close_price_line_and_label");var re=new r("change timezone",i(44352).t(null,void 0,i(20505))),ne=new r("scale price chart only",i(44352).t(null,void 0,i(99042))),oe=new r("stay in drawing mode",i(44352).t(null,void 0,i(52010))),ae=(new r("hide all drawing tools",i(44352).t(null,void 0,i(54781))),new r("hide marks on bars",i(44352).t(null,void 0,i(44974)))),le=new r("change symbol last value visibility",i(44352).t(null,void 0,i(53150))),ce=(new r("change symbol previous close value visibility",i(44352).t(null,void 0,i(12707))),new r("change previous close price line visibility",i(44352).t(null,void 0,i(59883))),new r("change symbol labels visibility",i(44352).t(null,void 0,i(9402)))),he=new r("change indicators name labels visibility",i(44352).t(null,void 0,i(87027))),de=new r("change indicators value labels visibility",i(44352).t(null,void 0,i(14922))),ue=(new r("change bid and ask labels visibility",i(44352).t(null,void 0,i(5100))),new r("change bid and ask lines visibility",i(44352).t(null,void 0,i(32311))),new r("change pre/post market price label visibility",i(44352).t(null,void 0,i(49889))),new r("change pre/post market price line visibility",i(44352).t(null,void 0,i(16750))), +new r("change high and low price lines visibility",i(44352).t(null,void 0,i(92556)))),pe=new r("change high and low price labels visibility",i(44352).t(null,void 0,i(66805))),_e=new r("change average close price line visibility",i(44352).t(null,void 0,i(98866))),me=new r("change average close price label visibility",i(44352).t(null,void 0,i(39402))),ge=new r("change countdown to bar close visibility",i(44352).t(null,void 0,i(58108))),fe=new r("change plus button visibility",i(44352).t(null,void 0,i(50190))),ve=new r("change price line visibility",i(44352).t(null,void 0,i(67761))),Se=new r("unlock {title}",i(44352).t(null,void 0,i(92421))),ye=new r("lock {title}",i(44352).t(null,void 0,i(50193))),be=new r("change session breaks visibility",i(44352).t(null,void 0,i(15403))),we=i(44352).t(null,void 0,i(15241)),Pe=i(44352).t(null,void 0,i(29404)),Ce=i(44352).t(null,void 0,i(44302)),Te=i(44352).t(null,void 0,i(94338));e.exports.ChartWidget=class extends J{constructor(e,t,i){super(e,t,i),this._options.timeScaleWidget&&(this._options.timeScaleWidget.pressedMouseMoveScale=this._options.handleScale.axisPressedMouseMove.time);var r=this,n=this._options.content,o=this._options.readOnly;this._removeMaximizeHotkey=null,r._hotkeys=m.createGroup({desc:"Chart actions",isDisabled:function(){return!r._isActive}});var a=this._options.containsData,l=this._options.onWidget,c=this._options.onCmeWidget;c&&$.logWarn("[ChartWidget] 'onCmeWidget' option is depricated");var h=this._options.widgetCustomer,d=this._options.timezone,u=this._options.hideSymbolSearch,p=this._options.defSymbol,_=I.isValid(this._options.defInterval)?this._options.defInterval:void 0,g=parseInt(this._options.defStyle),f=M.isValidStyle(g)?g:void 0,v=this._options.defSessionId,S=void 0!==this._options.defTimeframe?"string"==typeof this._options.defTimeframe?{value:this._options.defTimeframe.toUpperCase(),type:ee.PeriodBack}:{...this._options.defTimeframe,type:ee.TimeRange}:void 0;this._content=n,this._initialLoading=this._options.initialLoading,this._readOnly=o,this._containsData=a,this._defSymbol=p,this._defInterval=_,this._defTimeframe=S,this._defStyle=f,this._onWidget=!!l,this._compareSymbols=this._options.compareSymbols,this._onWidget&&(c?this._widgetCustomer="cme":h&&(this._widgetCustomer=h)),this._hideSymbolSearch=u,this._frameTime=30,this._model=null,this._metaInfo={},this._drawRafId=0,this._compareDialog=this._chartWidgetCollection.getCompareDialogRenderer();var y=this._contentSeriesProperties();y&&(p=y.symbol,_=y.interval),void 0===this._options.useUserChartPreferences&&(this._options.useUserChartPreferences=!0);var b="chartproperties.mainSeriesProperties",w=this._options.useUserChartPreferences?U.defaults(b):U.factoryDefaults(b);this._properties.mainSeriesProperties.merge(w),this._properties.mainSeriesProperties.hasChild("esdBreaksStyle")&&this._properties.mainSeriesProperties.removeProperty("esdBreaksStyle"),_=_||w.interval||"D",M.isValidStyle(f)||(f=M.isValidStyle(w.style)?w.style:A(I.isRange(_))),this._properties.mainSeriesProperties.merge({visible:!0, +symbol:p||DEFAULT_SYMBOL,shortName:"",timeframe:"",onWidget:this._onWidget,interval:_,currencyId:null,unitId:null,style:f,sessionId:v,lineStyle:{styleType:U.factoryDefaults("chartproperties.mainSeriesProperties.lineStyle.styleType")}}),this._containsData&&this._properties.mainSeriesProperties.merge({showCountdown:!1}),d&&O(d)&&this._properties.timezone.setValue(d),this._tagsChanged=new s,this._timingsMeter=null,this._isActive=this._options.isActive,this._options.container.subscribe((function(e){r._setElement(e)}),{callWithLast:!0});var P=function(){r.resize()};this._options.width.subscribe(P),this._options.height.subscribe(P),this._options.visible.subscribe(this._updateTimingsMeterState.bind(this)),this._aboutToBeDestroyed=new s,this._actions=null,this._definitionsViewModel=null,this._backgroundTopColorSpawn=null,this._backgroundBottomColorSpawn=null,this._hintDefferedPromise=null,this._activeHint=null}isInitialized(){return Boolean(this._inited)}compareSymbols(){return this._compareSymbols}async _getChartPropertyDefinitionsViewModel(){if(null===this._definitionsViewModel){const{ChartPropertyDefinitionsViewModel:e}=await Promise.all([i.e(6803),i.e(6444),i.e(892),i.e(8622),i.e(3596)]).then(i.bind(i,25008));if(this._isDestroyed)throw new Error("Chart widget already destroyed");await new Promise((e=>this.withModel(null,e))),null===this._definitionsViewModel&&(this._definitionsViewModel=new e(this.model(),this.properties(),this._options))}return this._definitionsViewModel}_initMaximizeHotkey(e){var t=this;function i(e){e.defaultPrevented||_.modifiersFromEvent(e)===_.Modifiers.Alt&&e.stopPropagation()}function s(e){e.defaultPrevented||_.modifiersFromEvent(e)===_.Modifiers.Alt&&(e.preventDefault(),e.stopPropagation(),t.toggleFullscreen())}return e.addEventListener("mousedown",i,!0),e.addEventListener("click",s,!0),function(){e.removeEventListener("mousedown",i,!0),e.removeEventListener("click",s,!0)}}toggleFullscreen(){var e=this.getResizerDetacher();e.fullscreenable.value()&&(e.fullscreen.value()?e.exitFullscreen():e.requestFullscreen())}_beginRequestActive(){var e=this._chartWidgetCollection.activeChartWidget.value()!==this;if(this._chartWidgetCollection.activeChartWidget.setValue(this),e){const e=z();e.isTouch&&!e.stylus&&this._isLineToolModeExceptBrush()&&this.updateCrossHairPositionIfNeeded(),this._justActivated=!0}}_endRequestActive(){var e=this;this._justActivated&&setTimeout((function(){e._justActivated=!1}),0)}_requestActive(){this._beginRequestActive(),this._endRequestActive()}justActivated(){return this._justActivated}setTimezone(e){e&&O(e)?this._properties.timezone.setValue(e):console.warn("Incorrect timezone: "+JSON.stringify(e))}getTimezone(){return this._properties.timezone.value()}refreshMarks(){this.model().barsMarksSources().forEach((function(e){e.refreshData()}))}clearMarks(){this.model().barsMarksSources().forEach((function(e){e.clearMarks()}))}metaInfoRepository(){return this._metaInfoRepository}_initBackgroundColor(){ +null===this._backgroundTopColorSpawn&&(this._backgroundTopColorSpawn=this._model.model().backgroundTopColor().spawn(),this._backgroundTopColorSpawn.subscribe(this._onBackgroundColorChanged.bind(this))),null===this._backgroundBottomColorSpawn&&(this._backgroundBottomColorSpawn=this._model.model().backgroundColor().spawn(),this._backgroundBottomColorSpawn.subscribe(this._onBackgroundColorChanged.bind(this)))}paneWidgets(){return this._paneWidgets}paneByCanvas(e){for(var t=0;t{null!==e&&t()}))}));var t=new C({actionId:T.ChartScalesReset,label:i(44352).t(null,void 0,i(34301)),icon:i(39267),statName:"ResetChart",onExecute:this.GUIResetScales.bind(this),hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Alt+82}),s=new C({actionId:T.ChartSeriesPriceScaleToggleInvertPriceScale,label:i(44352).t(null,void 0,i(53239)),statName:"Invert Scale",checkable:!0,onExecute:function(){e._model.invertPriceScale(e._model.mainSeries().priceScale())},hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Alt+73}),r=new C({actionId:T.ChartSeriesPriceScaleToggleAutoScale,label:i(44352).t(null,void 0,i(50834)),checkable:!0,onExecute:function(){var t=e._model.mainSeries().priceScale();e._model.togglePriceScaleAutoScaleMode(t),r.update({checked:t.isAutoScale()})}}),n=new C({actionId:T.ChartScalesToggleLockPriceToBarRatio,label:i(44352).t(null,void 0,i(18219)),checkable:!0,statName:"ToggleLockScale",onExecute:function(){e._model.togglePriceScaleLockScaleMode(e._model.mainSeries().priceScale())}}),o=new C({actionId:T.ChartSeriesPriceScaleToggleRegular,label:i(44352).t(null,{context:"scale_menu"},i(72116)),checkable:!0,statName:"ToggleRegularScale",onExecute:function(){var t=e._model.mainSeries().priceScale();e._model.setPriceScaleRegularScaleMode(t),o.update({checked:t.isRegular()})}}),a=new C({actionId:T.ChartSeriesPriceScaleTogglePercentage,label:i(44352).t(null,void 0,i(51102)),checkable:!0,statName:"TogglePercantage",onExecute:function(){e._model.togglePriceScalePercentageScaleMode(e._model.mainSeries().priceScale())},hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Alt+80}),l=new C({actionId:T.ChartSeriesPriceScaleToggleIndexedTo100,label:i(44352).t(null,void 0,i(20062)),checkable:!0,statName:"ToggleIndexedTo100",onExecute:function(){e._model.togglePriceScaleIndexedTo100ScaleMode(e._model.mainSeries().priceScale())}}),g=new C({actionId:T.ChartSeriesPriceScaleToggleLogarithmic,label:i(44352).t(null,void 0,i(12285)),statName:"ToggleLogScale",checkable:!0,onExecute:function(){e._model.togglePriceScaleLogScaleMode(e._model.mainSeries().priceScale())},hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Alt+76}),f=new C({actionId:T.ChartUndo,label:i(44352).t(null,void 0,i(81320)),onExecute:function(){H("GUI","Undo"),e._model.undoHistory().undo()},disabled:!0,hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Mod+90}),v=new C({actionId:T.ChartRedo,label:i(44352).t(null,void 0,i(41615)),onExecute:function(){H("GUI","Redo"),e._model.undoHistory().redo()},disabled:!0,hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Mod+89});e.withModel(null,(function(){e._model.undoHistory().undoStack().onChange().subscribe(e,e.updateUndoRedo),e._model.undoHistory().redoStack().onChange().subscribe(e,e.updateUndoRedo)}));var S=new C({actionId:T.ChartChangeTimeZone,label:i(44352).t(null,void 0,i(64375)),statName:"TimeZone"}),y=new C({actionId:T.ChartDialogsShowChangeSymbol,label:Y(i(44352).t(null,void 0,i(28089))),statName:"ChangeSymbol",onExecute:function(){V({defaultValue:""})}}) +;d("symboledit.dialog_last_entry","");var b={actionId:T.ChartDialogsShowChangeInterval,label:Y(i(44352).t(null,void 0,i(99374))),statName:"ChangeInterval",onExecute:function(){B({initVal:D.interval.value(),selectOnInit:!0})}};!c.enabled("show_interval_dialog_on_key_press")||this.readOnly()||this._hideSymbolSearch||(b.shortcutHint=",",b.hotkeyGroup=this._hotkeys,b.hotkeyHash=188);var w,P=new C(b);if(!TradingView.onWidget()){if(this._options.addToWatchlistEnabled){const e={hotkeyGroup:this._hotkeys};w=new WatchListAction(this,e)}0}var I=new C({actionId:T.ChartTimeScaleReset,label:i(44352).t(null,void 0,i(25333)),icon:i(39267),statName:"ResetScale",onExecute:function(){e.model().resetTimeScale()},hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Mod+m.Modifiers.Alt+81}),M=new C({actionId:T.ChartRemoveAllIndicators,label:i(44352).t(null,void 0,i(13951)),statName:"RemoveAllIndicators",onExecute:this.removeAllStudies.bind(this)}),A=new C({actionId:T.ChartRemoveAllLineTools,label:i(44352).t(null,void 0,i(1434)),statName:"RemoveAllDrawingTools",onExecute:this.removeAllDrawingTools.bind(this)}),L=new C({actionId:T.ChartRemoveAllIndicatorsAndLineTools,label:i(44352).t(null,void 0,i(97305)),statName:"RemoveAllIndicatorsAndDrawingTools",onExecute:this.removeAllStudiesDrawingTools.bind(this)}),R=this.chartWidgetCollection(),N=new C({actionId:T.ChartApplyIndicatorsToAllCharts,label:i(44352).t(null,void 0,i(95910)),statName:"ApplyIndicatorsToAllCharts",onExecute:function(){R.applyIndicatorsToAllCharts(e)}}),O={actionId:T.ChartDialogsShowInsertIndicators,label:Y(i(44352).t(null,void 0,i(98767))),statName:"InsertIndicator",onExecute:function(){e.showIndicators()}};this._options.indicatorsDialogShortcutEnabled&&(O.hotkeyGroup=this._hotkeys,O.hotkeyHash=191,this._hotkeys.add({handler:function(){this.showIndicators()}.bind(this),desc:"Show insert indicator dialog",hotkey:111}));var W,z=new C(O),U=new C({actionId:T.ChartDialogsShowCompareOrAddSymbol,label:Y(i(44352).t(null,void 0,i(20229))),statName:"CompareOrAddSymbol",onExecute:this.toggleCompareOrAdd.bind(this)}),G=new C({actionId:T.ChartObjectTreeShow,label:Y(i(44352).t(null,void 0,i(675))),statName:"ObjectsTree",onExecute:this.showObjectsTreePanelOrDialog.bind(this)}),q=new C({actionId:T.ChartDialogsShowGeneralSettings,label:Y(i(44352).t(null,void 0,i(89517))),icon:i(51983),statName:"ChartProperties",onExecute:function(){e.showGeneralChartProperties()}}),$=new C({actionId:T.ChartDialogsShowGeneralSettingsSymbolTab,label:Y(i(44352).t(null,void 0,i(89517))),icon:i(51983),statName:"MainSeriesProperties",onExecute:function(){e.showGeneralChartProperties(u.symbol)}}),K=new C({actionId:T.ChartSelectedObjectToggleLocked,label:i(44352).t(null,void 0,i(1441)),statName:"ToggleLockSelectedObject",onExecute:this.toggleLockSelectedObject.bind(this)}),X=new C({actionId:T.ChartSelectedObjectHide,label:i(44352).t(null,void 0,i(31971)),icon:i(84959),statName:"HideSelectedObject",onExecute:this.hideSelectedObject.bind(this)});c.enabled("property_pages")&&(W=new C({ +actionId:T.ChartSelectedObjectShowSettingsDialog,label:Y(i(44352).t(null,void 0,i(89517))),icon:i(51983),statName:"EditSelectedObject",onExecute:function(){e.showSelectedSourcesProperties()}})),this.withModel(null,(function(){var t=e.model().mainSeries(),i=t.properties();i.priceAxisProperties.subscribe(e,e._updateScalesActions),t.priceScaleAboutToBeChanged().subscribe(e,(function(){i.priceAxisProperties.unsubscribeAll(e)})),t.priceScaleChanged().subscribe(e,(function(){i.priceAxisProperties.subscribe(e,e._updateScalesActions),e._updateScalesActions()}))}));var J=new C({actionId:T.ChartPriceScaleToggleAutoScaleSeriesOnly,label:i(44352).t(null,void 0,i(37207)),checkable:!0,statName:"ScalePriceChartOnly"});J.binder=new h(J,this._properties.scalesProperties.scaleSeriesOnly,this.model(),ne);var Q=this.model().model();this._properties.scalesProperties.scaleSeriesOnly.listeners().subscribe(null,(function(){Q.recalculateAllPanes(j()),Q.invalidate(E.full())}));var ee=new C({actionId:T.ChartDrawingToolbarToggleVisibility,label:i(44352).t(null,void 0,i(22903)),checkable:!0,statName:"ToggleDrawingToolbar"}),te=this._options.isDrawingToolbarVisible;te&&(te.subscribe((function(e){ee.update({checked:e})}),{callWithLast:!0}),ee.update({onExecute:function(){te.setValue(!te.value())}}));var re=new C({actionId:"",label:i(44352).t(null,void 0,i(93161)),checkable:!0,statName:"ToggleStayInDrawingMode"});re.binder=new h(re,x.properties().stayInDrawingMode,this.model(),oe),this._hotkeys.add({handler:function(){F()},desc:"Hide all drawing tools",hotkey:m.Modifiers.Mod+m.Modifiers.Alt+72});var Se=new C({actionId:T.ChartMarksToggleVisibility,label:i(44352).t(null,void 0,i(2441)),checkable:!0,statName:"ToggleHideMarksOnBars"});Se.binder=new h(Se,x.hideMarksOnBars(),this.model(),ae,(function(){x.hideMarksOnBars().setValue(this.value())}));const ye=this.properties().scalesProperties;var be=new C({actionId:T.ChartPriceScaleLabelsToggleSeriesLastValueVisibility,label:i(44352).t(null,void 0,i(52054)),checkable:!0,checked:!1,statName:"ToggleSymbolLastValue"});be.binder=new h(be,ye.showSeriesLastValue,this.model(),le);var xe=new C({actionId:T.ChartPriceScaleLabelsToggleSymbolNameLabelsVisibility,label:i(44352).t(null,void 0,i(90932)),checkable:!0,checked:!1,statName:"ToggleSymbolLabels"});xe.binding=new h(xe,ye.showSymbolLabels,this.model(),ce);const Ie=Z(((e,t)=>e||!1),ye.showStudyLastValue,ye.showFundamentalLastValue);var Me=new C({actionId:T.ChartPriceScaleLabelsToggleIndicatorsValueLabelsVisibility,label:i(44352).t(null,void 0,i(81584)),checkable:!0,checked:!1,statName:"ToggleStudiesAndFundamentalsPriceLabels"});Me.binder=new h(Me,Ie,this.model(),null,(()=>{const e=!Ie.value();this.model().beginUndoMacro(de),this.model().setProperty(ye.showStudyLastValue,e,null),this.model().endUndoMacro()}));const Ae=Z(((e,t)=>e||!1),ye.showStudyPlotLabels,ye.showFundamentalNameLabel);var Le=new C({actionId:T.ChartPriceScaleLabelsToggleIndicatorsNameLabelsVisibility,label:i(44352).t(null,void 0,i(31485)),checkable:!0,checked:!1, +statName:"ToggleStudiesAndFundamentalsNameLabels"});Le.binding=new h(Le,Ae,this.model(),null,(()=>{const e=!Ae.value();this.model().beginUndoMacro(he),this.model().setProperty(ye.showStudyPlotLabels,e,null),this.model().endUndoMacro()}));var ke=this.model().mainSeries().properties().highLowAvgPrice,Ee=new C({actionId:T.ChartPriceScaleLabelsToggleHighLowPriceLabelsVisibility,label:i(44352).t(null,void 0,i(60259)),checkable:!0,checked:!1,statName:"ToggleHighLowPriceLabels"});Ee.binding=new h(Ee,ke.highLowPriceLabelsVisible,this.model(),pe);var De=new C({actionId:T.ChartLinesToggleHighLowLinesVisibility,label:i(44352).t(null,void 0,i(21803)),checkable:!0,checked:!1,statName:"ToggleHighLowPriceLine"});if(De.binding=new h(De,ke.highLowPriceLinesVisible,this.model(),ue),se){var Be=new C({actionId:T.ChartPriceScaleLabelsToggleAveragePriceLabelVisibility,label:i(44352).t(null,void 0,i(8975)),checkable:!0,checked:!1,statName:"ToggleAverageClosePriceLabel"});Be.binding=new h(Be,ke.averageClosePriceLabelVisible,this.model(),me);var Ve=new C({actionId:T.ChartLinesToggleAverageLineVisibility,label:i(44352).t(null,void 0,i(87899)),checkable:!0,checked:!1,statName:"ToggleAverageClosePriceLine"});Ve.binding=new h(Ve,ke.averageClosePriceLineVisible,this.model(),_e)}var Re=new C({actionId:T.ChartPriceScaleToggleCountdownToBarCloseVisibility,label:i(44352).t(null,void 0,i(94370)),checkable:!0,checked:!1,statName:"ToggleCountdown"});Re.binder=new h(Re,this.model().mainSeries().properties().showCountdown,this.model(),ge);var Ne=new C({actionId:T.ChartPriceScaleToggleAddOrderPlusButtonVisibility,label:i(44352).t(null,void 0,i(97378)),checkable:!0,checked:ie.value(),statName:"ToggleAddOrderPlusButton"});Ne.binder=new h(Ne,ie,this.model(),fe);var Oe=null;this._options.goToDateEnabled&&(Oe=new C({actionId:T.ChartDialogsShowGoToDate,label:Y(i(44352).t(null,void 0,i(75190))),statName:"GoToDate",onExecute:function(){var t=e._chartWidgetCollection.activeChartWidget.value();p(t)},hotkeyGroup:this._hotkeys,hotkeyHash:m.Modifiers.Alt+71}));var Fe=new C({actionId:T.ChartDialogsShowSymbolInfo,label:Y(i(44352).t(null,void 0,i(65986))),icon:i(37924),checkable:!1,statName:"SymbolInfo",onExecute:function(){var t=e.model().model(),i=t.mainSeries().symbol(),s=t.mainSeries().symbolInfo(),r=t.availableUnits(),n={symbolInfo:s,showUnit:t.unitConversionEnabled(),unitDescription:e=>r.description(e),dateFormatter:t.dateFormatter()};k(i,n)}}),We=new C({actionId:T.ChartPriceScaleMergeAllScalesToLeft,label:we,statName:"MergeAllScalesToLeft",onExecute:function(){e.model().mergeAllScales("left")}}),He=new C({actionId:T.ChartPriceScaleMergeAllScalesToRight,label:Pe,statName:"MergeAllScalesToRight",onExecute:function(){e.model().mergeAllScales("right")}}),ze=new C({actionId:T.ChartPriceScaleMoveToLeft,label:Ce,statName:"MoveScaleToLeft",onExecute:function(){e.model().mergeAllScales("left")}}),Ue=new C({actionId:T.ChartPriceScaleMoveToRight,label:Te,statName:"MoveScaleToRight",onExecute:function(){e.model().mergeAllScales("right")}});var je=c.enabled("show_object_tree") +;if(this._actions={chartProperties:q,mainSeriesPropertiesAction:$,timeScaleReset:I,chartReset:t,invertSeriesScale:s,logSeriesScale:g,autoSeriesScale:r,lockSeriesScale:n,regularSeriesScale:o,percentSeriesScale:a,indexedTo100SeriesScale:l,compareOrAdd:U,paneObjectTree:je?G:void 0,insertIndicator:z,symbolSearch:y,showSymbolInfoDialog:Fe,changeInterval:P,seriesHide:X,studyHide:X,lineToggleLock:K,lineHide:X,scaleSeriesOnly:J,drawingToolbarAction:ee,stayInDrawingModeAction:re,hideAllMarks:Se,applyTimeZone:S,showCountdown:Re,addPlusButton:Ne,showSeriesLastValue:be,showHighLowPriceLabels:Ee,showHighLowPriceLines:De,showAverageClosePriceLabel:Be,showAverageClosePriceLine:Ve,showSymbolLabelsAction:xe,showStudyLastValue:Me,showStudyPlotNamesAction:Le,undo:f,redo:v,mergeLeftScalesAction:We,mergeRightScalesAction:He,moveScaleToLeft:ze,moveScaleToRight:Ue,moveChartAction:undefined},w&&(this._actions.addToWatchlist=w),!TradingView.onWidget()&&c.enabled("text_notes")&&(this._actions.addToTextNotes=undefined),null!==Oe&&(this._actions.gotoDate=Oe),this.createSessionBreaksActions(),!this.readOnly()){var Ge=new C({actionId:T.ChartSelectedObjectRemove,label:i(44352).t(null,void 0,i(34596)),icon:i(35149),statName:"RemoveSelectedObject",onExecute:function(){var e=this._chartWidgetCollection.activeChartWidget.value();e||(e=this),e.removeSelectedSources()}.bind(this),hotkeyGroup:this._hotkeys,hotkeyHash:_.isMacKeyboard?8:46});this._hotkeys.add({handler:function(){this.removeSelectedSources()}.bind(this),desc:"Remove selected source",hotkey:_.isMacKeyboard?46:8}),this._actions.paneRemoveAllStudies=M,this._actions.paneRemoveAllDrawingTools=A,this._actions.paneRemoveAllStudiesDrawingTools=L,this._actions.applyStudiesToAllCharts=N,this._actions.studyRemove=Ge,this._actions.lineRemove=Ge,c.enabled("property_pages")&&(this._actions.format=W)}this._actions.showPriceLine=new C({actionId:T.ChartLinesToggleSeriesPriceLineVisibility,label:i(44352).t(null,void 0,i(91492)),checkable:!0,statName:"TogglePriceLine"}),this._actions.showPriceLine.binding=new h(this._actions.showPriceLine,this.model().mainSeries().properties().showPriceLine,this.model(),ve),this.readOnly()||(this._hotkeys.add({desc:"Draw Horizontal Line here",hotkey:m.Modifiers.Alt+72,handler:function(){e.activePaneWidget&&e.activePaneWidget.drawRightThere("LineToolHorzLine")}}),this._hotkeys.add({desc:"Draw Horizontal Ray here",hotkey:m.Modifiers.Alt+74,handler:function(){e.activePaneWidget&&e.activePaneWidget.drawRightThere("LineToolHorzRay")}}),this._hotkeys.add({desc:"Draw Vertical Line here",hotkey:m.Modifiers.Alt+86,handler:function(){e.activePaneWidget&&e.activePaneWidget.drawRightThere("LineToolVertLine")}}),this._hotkeys.add({desc:"Draw Cross Line here",hotkey:m.Modifiers.Alt+67,handler:function(){e.activePaneWidget&&e.activePaneWidget.drawRightThere("LineToolCrossLine")}}),this._hotkeys.add({desc:"Draw Trend Line",hotkey:m.Modifiers.Alt+84,handler:function(){e.activePaneWidget&&x.tool.setValue("LineToolTrendLine")}}),this._hotkeys.add({desc:"Draw Fib Retracement", +hotkey:m.Modifiers.Alt+70,handler:function(){e.activePaneWidget&&x.tool.setValue("LineToolFibRetracement")}})),this._updateScalesActions()}options(){return this._options}executeActionById(e){if("takeScreenshot"===e)return console.warn('Action "takeScreenshot" is deprecated. Use method "takeScreenshot" instead'),void this._chartWidgetCollection.takeScreenshot();e in this._actions?this._actions[e]instanceof C&&this._actions[e].execute():console.warn("Unknown action id: "+e)}getCheckableActionState(e){if(e in this._actions){var t=this._actions[e];if(t instanceof C&&t.isCheckable())return t.isChecked();console.warn("Action "+e+" has no state")}else console.warn("Unknown action id: "+e);return null}_updateScalesActions(){if(null!==this._actions){var e=this.model().mainSeries(),t=e.priceScale(),i=e.properties(),s=t.isLockScale(),r=i.style.value()===l.STYLE_PNF;this._actions.percentSeriesScale.update({disabled:s||r,checked:t.isPercentage()}),this._actions.logSeriesScale.update({disabled:s||r,checked:t.isLog()}),this._actions.regularSeriesScale.update({disabled:s||r,checked:t.isRegular()}),this._actions.indexedTo100SeriesScale.update({disabled:s||r,checked:t.isIndexedTo100()}),this._actions.invertSeriesScale.update({checked:t.isInverted()}),this._actions.lockSeriesScale.update({checked:t.isLockScale()}),this._actions.autoSeriesScale.update({checked:t.isAutoScale(),disabled:t.properties().autoScaleDisabled.value()})}}removeAllStudies(){this._model.removeAllStudies()}removeAllDrawingTools(){this._model.removeAllDrawingTools()}removeAllStudiesDrawingTools(){this._model.removeAllStudiesAndDrawingTools()}defaultSymbol(){return this._defSymbol}widget(){return this._mainDiv}_onBackgroundColorChanged(){for(var e=0;e0;)for(var t=this._content.panes[e].sources,i=t.length;i-- >0;)if("MainSeries"===t[i].type)return t[i].state}updateUndoRedo(){ +this._model&&(this.actions().undo.update({disabled:this._model.undoHistory().undoStack().isEmpty()}),this.actions().redo.update({disabled:this._model.undoHistory().redoStack().isEmpty()}))}createSessionBreaksActions(){var e=new C({actionId:T.ChartSessionBreaksToggleVisibility,label:i(44352).t(null,void 0,i(59827)),checkable:!0,statName:"ToggleSessionBreaks"});e.binder=new h(e,this._model.chartModel().sessions().properties().graphics.vertlines.sessBreaks.visible,this.model(),be),this._actions.sessionBreaks=e}updateActionForIntradayOnly(e){e&&e instanceof C&&e.update({disabled:this.model().mainSeries().isDWM()})}containsVolume(){return this.model().dataSources().some((function(e){return e instanceof g&&"Volume"===e.metaInfo().shortId}))}containsStudyByPredicate(e){return!!this._model&&this._model.dataSources().some((function(t){if(!(t instanceof g))return!1;var i=t.metaInfo();return e(i)}))}containsStudy(e){return this.containsStudyByPredicate((function(t){return t.id===e||t.fullId===e}))}isSmall(){return this._width()<550||this._height()<300}onWidget(){return this._onWidget}onCmeWidget(){return"cme"===this.widgetCustomer()}widgetCustomer(){return this._widgetCustomer}resize(){var e=this._height()+"px",t=this._width()+"px";this._mainDiv.style.height=e,this._mainDiv.style.width=t,this._elMainTable.style.height=e,this._elMainTable.style.width=t,this._resizeHandler&&this._mainDiv&&this._resizeHandler()}applyOverrides(e){var t={};for(var i in e)i.startsWith("mainSeriesProperties.priceAxisProperties")||(t[i]=e[i]);if(applyPropertiesOverrides(this.properties(),null,!1,t,null),this._model){applyPropertiesOverrides(this._model.model().properties(),null,!1,t),applyPropertiesOverrides(this._model.mainSeries().properties(),null,!1,t,"mainSeriesProperties"),this._model.model().sessions().applyOverrides(t);const e=this._model.chartModel().watermarkSource();null!==e&&e.applyOverrides(t)}}applyStudiesOverrides(e){W.mergeDefaultsOverrides(e),this._applyStudiesOverrides()}setActive(e){this._isActive=e,z().isTouch&&(e&&0!==this.selectPointMode().value()?this.startTrackingMode():this.exitTrackingMode()),this._paneWidgets.forEach((function(e){e.update()})),e||this.model().selectionMacro((function(e){e.clearSelection()}))}isActive(){return this._isActive}isMultipleLayout(){return K(this._chartWidgetCollection.layout.value())}selectPointMode(){return this._model.model().selectPointMode()}cancelRequestSelectPoint(){this._model.model().cancelRequestSelectPoint(),this._model.model().setReplayStatus(q.Undefined)}requestSelectPoint(e,t){var i=this;return e.selectPointMode===G.Replay&&this._model.model().setReplayStatus(q.PointSelect),new Promise((function(s,r){if(a()){x.resetToCursor(!0),i._model.lineBeingCreated()&&i._model.cancelCreatingLine();var n=!1,o={};i._model.model().onPointSelected().subscribe(o,(function(e,t){n=!0,i._isVisible.unsubscribe(a),i._hideHint(),s({point:e,pane:t})}),!0),i._model.model().requestSelectPoint(e),i.startTrackingMode(),void 0!==t&&i._showHint(t),i._isVisible.subscribe(a),i.selectPointMode().subscribe((function(){ +setTimeout((function(){n||(0===i.selectPointMode().value()&&i._hideHint(),i._model.model().onPointSelected().unsubscribeAll(o),i._isVisible.unsubscribe(a),r("cancelled"))}))}),{once:!0})}function a(){return!!i.isVisible()||(r("Chartwidget must be visible"),i.cancelRequestSelectPoint(),!1)}}))}showReplayOrderConfirmationDialog(){if(!this.model().isInReplay())return Promise.resolve()}_addPerfMark(e){X("ChartWidget."+this._id+"."+e)}requestFullscreen(){this._options.requestFullscreen()}getResizerDetacher(){return this._options}_createHint(){if(null===this._hintDefferedPromise){var e=te();this._hintDefferedPromise=e;var t=this;Promise.all([i.e(9908),i.e(962),i.e(6166)]).then(i.bind(i,5015)).then((function(i){e.resolve(new i.ChartEventHintRenderer(t._chartWidgetCollection.getContainer()))}))}return this._hintDefferedPromise?a(this._hintDefferedPromise).promise:null}_showHint(e){if(c.enabled("popup_hints"))if(null!==this._activeHint)this._activeHint.show(e);else{var t=this,i=this._createHint();null!==i&&i.then((function(i){if(null!==i){if(t._activeHint=i,void 0===e)return;t._activeHint.show(e)}}))}}_hideHint(){null!==this._activeHint&&this._activeHint.hide()}}},24134:(e,t,i)=>{"use strict";var s=i(50151).ensureNotNull,r=i(68582),n=r.LineDataSourceApi,o=r.isLineToolRiskReward,a=i(67e3).StudyApi,l=i(82650).SeriesApi,c=i(32112).SelectionApi,h=i(98076).PaneApi,d=i(8950).createDwmAligner,u=i(578).Interval,p=i(37121).supportedLineTools,_=i(65665),m=_.isNumber,g=_.deepEquals,f=i(6250).createLineToolProperties,v=i(6250).prepareLineToolPropertiesByOwnerSource,S=i(45973).lineToolEntityInfo,y=i(57404).LineToolsGroupControllerApi,b=i(34853).RemoveSourcesCommand;const{isLineDrawnWithPressedButton:w,isLineToolFinishRequiredWhenCreatedByApi:P}=i(28667),C=i(55611).EnvironmentState;var T=i(66979).ChartWidgetApiBase,x=i(76076);i(51768).trackEvent;function I(e,t){return t.map((function(t){return e.dataSourceForId(t)}))}e.exports=class extends T{constructor(e,t){super(e,t),this._panes=new WeakMap,this._studies=new WeakMap,this._lineDataSources=new WeakMap,this._selectionApi=null,this._prevVisibleRange=null,this._chartWidget.onAboutToBeDestroyed().subscribe(this,this._destroy,!0),this._chartWidget.withModel(this,(function(){this._chartWidget.model().timeScale().logicalRangeChanged().subscribe(this,this._onLogicalRangeChanged)}))}id(){return this._chartWidget.id()}_getPaneApi(e){var t=this._panes.get(e);return void 0===t&&(t=new h(e,this._chartWidget),this._panes.set(e,t)),t}_getStudyApi(e){var t=this._studies.get(e);return void 0===t&&(t=new a(e,this._chartWidget),this._studies.set(e,t)),t}_getLineDataSourceApi(e){var t=this._lineDataSources.get(e);return void 0===t&&(t=new n(e,this._chartWidget.model(),{apiPointsToDataSource:this._convertUserPointsToDataSource.bind(this),dataSourcePointsToPriced:e=>{var t=this._chartWidget.model().mainSeries().syncModel(),i=this._chartWidget.model().timeScale();return e.map((e=>{var s=i.normalizeBarIndex(e.index);return{price:e.price,time:this._convertTimeToPublic(t.projectTime(s.time_t,s.offset))}}))}}), +this._lineDataSources.set(e,t)),t}executeActionById(e){this._chartWidget.executeActionById(e)}getCheckableActionState(e){return this._chartWidget.getCheckableActionState(e)}setZoomEnabled(e){this._chartWidget.model().model().setZoomEnabled(e)}setScrollEnabled(e){this._chartWidget.model().model().setScrollEnabled(e)}refreshMarks(){this._chartWidget.refreshMarks()}clearMarks(){this._chartWidget.clearMarks()}symbol(){return this._chartWidget.getSymbol()}resolution(){return this._chartWidget.model().mainSeries().properties().interval.value()}resetData(){this._chartWidget.model().mainSeries().rerequestData()}setEntityVisibility(e,t){console.warn("`setEntityVisibility` is deprecated. Use shape/study API instead");var i=this._chartWidget.model().model().dataSourceForId(e);if(i){var s=i.properties();s&&s.visible&&s.visible.setValue(t)}}availableZOrderOperations(e){var t=I(this._chartWidget.model().model(),e);return this._chartWidget.model().availableZOrderOperations(t)}sendToBack(e){var t=I(this._chartWidget.model().model(),e);this._chartWidget.model().sendToBack(t)}bringToFront(e){var t=I(this._chartWidget.model().model(),e);this._chartWidget.model().bringToFront(t)}insertAfter(e,t){var i=this._chartWidget.model().model(),s=I(i,e),r=i.dataSourceForId(t);this._chartWidget.model().insertAfter(s,r)}insertBefore(e,t){var i=this._chartWidget.model().model(),s=I(i,e),r=i.dataSourceForId(t);this._chartWidget.model().insertBefore(s,r)}bringForward(e){var t=I(this._chartWidget.model().model(),e);this._chartWidget.model().bringForward(t)}sendBackward(e){var t=I(this._chartWidget.model().model(),e);this._chartWidget.model().sendBackward(t)}showPropertiesDialog(e){var t=this._chartWidget.model().model().dataSourceForId(e);if(null===t)throw new Error("Study or shape "+e+" does not exist");this._chartWidget.showChartPropertiesForSource(t)}getAllShapes(){return this._chartWidget.model().model().allLineTools().map(S).filter((function(e){return null!==e.name}))}removeAllShapes(){this._chartWidget.removeAllDrawingTools()}removeAllStudies(){this._chartWidget.removeAllStudies()}removeEntity(e,t){var i=this._chartWidget.model().chartModel().dataSourceForId(e);i?t&&t.disableUndo?new b(this._chartWidget.model().chartModel(),[i],"").redo():this._chartWidget.model().removeSource(i,!0,!0):console.warn("Can't find a source with id: "+e)}removeEntityWithUndo(e){var t=this._chartWidget.model().chartModel().dataSourceForId(e);this._chartWidget.model().removeSource(t,!1)}selection(){return null===this._selectionApi&&(this._selectionApi=new c(this._chartWidget.model().model())),this._selectionApi}createStudyTemplate(e){return this._chartWidget.model().model().studyTemplate(e.saveSymbol,e.saveInterval)}drawOnAllCharts(e){x.drawOnAllCharts.setValue(e)}applyStudyTemplate(e){this._chartWidget.model().applyStudyTemplate(e,""+1e3*Math.random())}setVisibleRange(e,t){return new Promise(function(i){this._chartWidget.setVisibleTimeRange(e.from,e.to,t,i)}.bind(this))}getVisiblePriceRange(){ +return console.warn("`getVisiblePriceRange` is deprecated. Use Price Scale API instead"),this._chartWidget.model().mainSeries()?this._chartWidget.model().mainSeries().priceScale().priceRangeInPrice():null}scrollPosition(){return console.warn("`scrollPosition` is deprecated. Use rightOffset from Time Scale API instead"),this._chartWidget.model().timeScale().rightOffset()}defaultScrollPosition(){return console.warn("`defaultScrollPosition` is deprecated. Use defaultRightOffset from Time Scale API instead"),this._chartWidget.model().timeScale().defaultRightOffset().value()}_createTradingPrimitive(e,t){var i,r=this._chartWidget.model(),n=r.model(),o=n.paneForSource(n.mainSeries());function a(){var e=TradingView.CLOSE_PLOT,t=s(r.mainSeries().bars().last());return{index:t.index,price:t.value[e]}}return(i=t?n.createLineTool(o,a(),e):r.createLineTool({pane:o,point:a(),linetool:e}))?i._adapter:void 0}createOrderLine(e){e=e||{};return this._createTradingPrimitive("LineToolOrder",e.disableUndo)}createPositionLine(e){e=e||{};return this._createTradingPrimitive("LineToolPosition",e.disableUndo)}createExecutionShape(e){e=e||{};return this._createTradingPrimitive("LineToolExecution",e.disableUndo)}createShape(e,t){return this.createMultipointShape([e],t)}_alignPoints(e){var t=this._chartWidget.model().model(),i=t.mainSeries(),s=i.interval();if(t.timeScale().isEmpty()||!u.isDWM(s))return e;var r=d(s,i.symbolInfo());return null===r?e:e.map((function(e){return r.timeToSessionStart(1e3*e)/1e3}))}_convertUserPointsToDataSource(e){var t=this._chartWidget.model().model(),i=t.mainSeries(),s=t.timeScale().points(),r=i.data();if(t.timeScale().isEmpty())return null;var n=e.map((function(e){return e.time||0})),o=this._alignPoints(n);function a(e,t,n){var o=s.closestIndexLeft(e)||0,a={index:o},l=s.valueAt(o);const c=s.range().value();if(e>l&&o===c.lastIndex)(h=i.syncModel().distance(l,e)).success&&(a.index=a.index+h.result);else if(e2)throw new Error("Wrong points count for "+i.shape+". Required 1 or 2");2===c.length&&(d.startChanging(1,c[1]),d.setPoint(1,c[1]),d.endChanging())}else{var m=d.pointsCount();if(m!==c.length&&-1!==m)throw new Error("Wrong points count for "+i.shape+". Required "+m);for(var g=new C(void 0,!0),S=w(s.name),y=1;y{"use strict";var s=i(26867),r=i(50151).assert,n=i(71668).createDeferredPromise,o=i(47539).TranslatedString,a=i(57737).layouts,l=i(29443).createUndoHistory,c=i(76076),h=i(66141),d=i(68335),u=i(76422),p=i(2484),_=i(40549),m=i(98351).getLogger("Chart.ChartWidgetCollection"),g=i(33933).preventDefaultForContextMenu,f=i(77906),v=i(13323).GeneralChartPropertiesRenderer,S=i(92133).setLastUsedResolution,y=i(42120).CompareDialogRenderer,b=i(84015).isOnMobileAppPage,w=i(32769),P=i(1930);const{isSupportedLayout:C,tryGuessingTheMostSuitableLayout:T}=i(57737);var x,I=i(46378),M=I.applyIndicatorsToAllChartsImpl,A=I.applyIndicatorToAllChartsImpl,L=I.lineToolsAndGroupsDTOsImpl,k=I.getStateForChartImpl,E=I.resetLineToolsInvalidatedImpl,D=I.applyLineToolUpdateNotificationImpl,B=I.createClipboardHandler,V=I.chartsSymbolsImpl,R=I.updateLayoutImpl,N=I.computeContentBoxImpl,O=(I.getVisuallyAdjacentDefImpl,I.setLayoutImpl),F=I.removeChartWidgetSubscriptionsImpl,W=I.generateNewChartId,H=I.syncCrosshairImpl,z=I.createBroadcastChannel,U=I.destroyBroadcastChannel,j=I.syncScrollImpl,G=I.allInitialModelsCreated,q=I.allInitialSymbolsResolved,$=I.applyThemeImpl,Y=I.isFirstChartInLayout,K=I.deserializedChartIds,X=I.handleDateRangeLockChange,Z=I.handleInternalDateRangeLockChange,J=I.handleTrackTimeLockChange,Q=I.handleInternalTrackTimeLockChange,ee=I.handleIntervalLockChange,te=I.handleInternalIntervalLockChange,ie=I.handleSymbolLockChange,se=I.handleInternalSymbolLockChange,re=(I.handleConnectionLimitReachedChanged,I.handleDeviceConnectionClosed,I.createLeftBottomChartWidgetWV),ne={saveChartEnabled:!0,takeScreenshotEnabled:!0,publishedChartsEnabled:!0},oe=new o("change symbol",i(44352).t(null,void 0,i(526))),ae=new o("change resolution",i(44352).t(null,void 0,i(32303))),le=new o("change series style",i(44352).t(null,void 0,i(53438)));i(44352).t(null,void 0,i(19149));e.exports=function(e){var t=this,o=Object.assign({},ne,e),ce=new _,he=o.readOnly||!1,de=[],ue=0,pe=new _,_e=new _,me=new _,ge="s",fe=new _(null),ve=new Map,Se=new _([]),ye=new _,be=[],we=!1,Pe=!1,Ce=new _(!1),Te=new _(null),xe=new _(!1),Ie=new _(!1);Ie.subscribe((e=>ie(ut(),e)));var Me=new _(Ie.value());Me.subscribe((e=>se(ut(),e)));var Ae=new _(!1);Ae.subscribe((e=>ee(ut(),e)));var Le=new _(Ae.value());Le.subscribe((e=>te(ut(),e)));var ke=new _(!1);ke.subscribe((e=>J(ut(),e)));var Ee=new _(ke.value());Ee.subscribe((e=>Q(ut(),e)));var De=new _(!1) +;De.subscribe((e=>X(ut(),e))),fe.subscribe(Ot);var Be=new _(De.value());Be.subscribe((e=>Z(ut(),e)));var Ve=new _(TVSettings.getBool("chart.syncCrosshair",!0)),Re=h.createGroup({desc:"Layout"}),Ne=null,Oe=null,Fe=null,We=null;if(window.TVD){var He=window.TVD.crosshairSyncEnabled;He?(He.value()&&(Fe=z(ut)),We=He.subscribe((e=>{e?Fe=z(ut):(U(ut()),Fe=null)}))):Fe=z(ut)}var ze=Ve.value();Ve.subscribe((function(e){ze=e=!!e,TVSettings.setValue("chart.syncCrosshair",e);for(var t=0;t{$e.setValue(null===e?null:e.chartWidget)}));var Ye=o.widgetOptions||{},Ke=o.metaInfo||{},Xe={id:new _(Ke.id||null),name:new _(Ke.name),description:new _(Ke.description),username:new _(Ke.username),uid:new _(Ke.uid),lastModified:new _(Ke.lastModified)},Ze=l();Ze.onChange().subscribe(null,(function(e){u.emit("undo_redo_state_changed",e)}));var Je=o.resizerBridge.container.value();Je.addEventListener("contextmenu",g);var Qe,et=n(),tt=new s,it=new s,st=new s,rt=new _(!1),nt=new _(null),ot=null,at=null;o.seriesControlBarEnabled&&(Qe="0px",nt.setValue(document.createElement("div")),nt.value().style.left=Qe,nt.value().style.right=Qe,nt.value().style.bottom=Qe,nt.value().classList.add("chart-toolbar","chart-controls-bar"),nt.value().setAttribute("data-is-chart-toolbar-component","true"),Je.appendChild(nt.value()),Promise.all([i.e(8230),i.e(7624),i.e(1428),i.e(4819),i.e(9333),i.e(6092),i.e(8825),i.e(1140),i.e(3795),i.e(105),i.e(9415),i.e(5639),i.e(7507),i.e(7895),i.e(962),i.e(1075),i.e(5747),i.e(7260)]).then(i.bind(i,33366)).then((({BottomToolbarRenderer:e})=>{var i=o.resizerBridge,r=[i.container.spawn(),i.width.spawn(),i.height.spawn()],n=i.container.value(),a=function(){var e=n.getBoundingClientRect(),t=N(ut());return t.top=e.top+t.top,t.left=e.left+t.left,t},l=new s,c=function(){l.fire()};r.forEach((function(e){e.subscribe(c)}));var h=function(){r.forEach((function(e){e.destroy()})),l.destroy()};ot=new e(nt.value(),l,a,t,ChartApiInstance,Ye,o.seriesControlBar),at=function(){null!==ot&&(ot.destroy(),ot=null,nt.value().remove(),nt.setValue(null)),h()}})));var lt=new v(t),ct=new y(t);function ht(){rt.setValue(de.some((e=>{const t=e.chartWidget.lineToolsSynchronizer();return null!==t&&t.hasChanges().value()})))}function dt(e){return I.checkProFeatureImpl(ut(),e)}function ut(){return{undoHistory:Ze,chartWidgetsDefs:de,chartsCountToSave:pt,actualLayoutCount:_t,savedChartWidgetOptions:be,activeChartWidget:ce,options:o,parent:Je,toastsFactory:null,crosshairLockRaw:ze,crossHairSyncBroadcast:Fe,setChartStorageNotificationSubscription:e=>{Oe=e},maximizedChartDef:qe,setMaximized:yt,layoutTemplate:me,widthWV:je,heightWV:Ge,checkProFeature:dt,lineToolsSynchronizerHasChanges:rt,recalcHasChanges:ht,onZoom:it,onScroll:st,layoutType:ge,layoutWV:Ue,setLayoutType:e=>{ge=e},isPhoneSize:Ce,viewMode:ye,updateViewMode:wt,loadingContent:we,setLoadingContent:e=>{we=e}, +initialLoading:Pe,inlineChartsCount:_e,updateWatchedValue:Pt,checkAllPendingModelsAlreadyCreated:bt,readOnly:he,symbolLock:Ie,internalSymbolLock:Me,intervalLock:Ae,internalIntervalLock:Le,dateRangeLock:De,internalDateRangeLock:Be,trackTimeLock:ke,internalTrackTimeLock:Ee,crosshairLock:Ve,customLegendWidgetsFactoriesMap:Qt,globalDetachable:pe,saveChartService:Ne,customSources:Zt,updateActivityView:Ct,chartWidgetCreatedDelegate:tt,sizingState:Te,currentLayoutResizeAction:fe,allLayoutSizesState:ve,splitters:Se,widgetOptions:Ye,bottomToolbar:nt,replayContainer:Jt,layoutSizesChanged:xe,subscribeToCompletedEventForDateRangeSync:Vt,subscribeToEventsForDateRangeSync:Rt,unsubscribeFromEventsForDateRangeSync:Nt,syncChartsDateRangesWithActiveChartRange:Wt}}function pt(){return _t()}function _t(){return a[ge].count}function mt(e,t,i,s,r){return k(ut(),e,t,i,s,r)}function gt(e){return e.value()?1:0}function ft(){R(ut())}function vt(e){return e.rdState.owner.value()!==e}function St(e){return O(ut(),e,t)}function yt(e){qe.value()!==e&&(qe.setValue(e),St(ge))}function bt(){de.every((e=>e.chartWidget.hasModel()))&&(Pt(),u.emit("layout_changed"))}function wt(){"s"===ge||qe.value()?ye.setValue(x.ForceFullscreen):ye.setValue(x.Multichart)}function Pt(){var e=Math.min(me.value().count,de.length)-1;if(e<0)ce.deleteValue();else{var t=ue;t<0&&(t=0),t>e&&(t=e),ce.setValue(de[t].chartWidget)}}function Ct(){for(var e=de.length;e--;){var t=e===ue;de[e].container.value().classList.toggle("active",t),de[e].container.value().classList.toggle("inactive",!t)}}function Tt(e){}Te.subscribe((()=>ft())),je.subscribe(ft),Ge.subscribe(ft),this.updateLayout=ft;const xt=new s;var It=new s,Mt=new _,At=new _([]),Lt=null;function kt(e){var t=e.mainSeries().properties();t.style.subscribe(null,Et),Et(t.style),e.model().onSelectedSourceChanged().subscribe(null,Dt),De.value()&&(Rt(e),Wt()),Dt(e.selection().allSources())}function Et(e){Mt.setValue(e.value())}function Dt(){var e=Lt.model();At.setValue(e.selection().allSources())}ce.subscribe((function(e){if(e){for(var t,i=de.length;i--;)if(de[i].chartWidget===e){t=i;break}if(!isFinite(t))throw new Error("Cannot make detached ChartWidget active");if(ue!==t){qe.value()&&(vt(de[t])||qe.setValue(de[t])),ue=t,Ct();for(i=de.length;i--;)de[i].chartWidget!==e&&de[i].chartWidget.setActive(!1);ci(),e.setActive(!0),c.activePointSelectionMode.setValue(e.selectPointMode().value())}!function(e){if(Lt!==e){if(Lt&&(Lt.modelCreated().unsubscribe(null,kt),Lt.hasModel())){var t=Lt.model();De.value()&&Nt(t),t.mainSeries().properties().style.unsubscribe(null,Et),t.model().onSelectedSourceChanged().unsubscribe(null,Dt),Lt=null}e&&(Lt=e,e.hasModel()?kt(e.model()):e.modelCreated().subscribe(null,kt))}}(e)}}),{callWithLast:!0});var Bt=new Map;function Vt(e,t){var i=e.id();if(!Bt.has(i)){var s=function(){const i=e.id();Bt.has(i)&&(Bt.delete(i),Wt(t?e:void 0))};e.model().mainSeries().dataEvents().completed().subscribe(null,s,!0),Bt.set(i,{cw:e,callback:s})}}function Rt(e){e.timeScale().visibleBarsStrictRangeChanged().subscribe(null,Ft)} +function Nt(e){e.timeScale().visibleBarsStrictRangeChanged().unsubscribe(null,Ft),Bt.forEach((function(e){var t=e.cw,i=e.callback;t.model().mainSeries().dataEvents().completed().unsubscribe(null,i)})),Bt.clear()}function Ot(e){De.value()&&null===e&&Wt()}function Ft(e,t){Wt()}function Wt(e){if(De.value()&&null===fe.value()){var t=ce.value(),i=t.model().mainSeries();if(P.isTimeBasedStyle(i.style())){var s=t.model().timeScale(),r=s.visibleBarsStrictRange();if(null!==r){var n=s.points().range().value(),o=s.indexToTimePoint(r.firstBar());null===o&&i.endOfData()&&(o=s.indexToTimePoint(n.firstIndex));var a=s.indexToTimePoint(r.lastBar());if(null===a&&(a=s.indexToTimePoint(n.lastIndex)),null!==o&&null!==a){Bt.delete(t.id());var l=1e3*o,c=1e3*a;if(i.isDWM()){var h=new Date(l),d=new Date(c);w.set_hms(h,0,0,0,0),w.set_hms(d,0,0,0,0),l=h.getTime(),c=d.getTime()}for(var u=0;ude.map((e=>e.chartWidget)),ai=re(oi,Ue.readonly(),xt,tt);function li(e,t){if(we=!0,Pe=Boolean(t),be.splice(0),e){if(e.charts||(e={layout:"s",charts:[e]}),e.layoutsSizes)for(const t of Object.keys(e.layoutsSizes))ve.set(t,e.layoutsSizes[t]);var i=new Set;e.charts.forEach((function(e){e.chartId&&i.add(e.chartId)})),e.charts.forEach((function(e){if(!e.chartId){var t=W((function(e){return i.has(e) +}));i.add(t),e.chartId=t}}));let t=e.layout;if(!C(t)){const e=T(t);m.logError(`Loading unsupported layout ${t}. Force migration to ${e}`),t=e}ge=dt(t||"s");for(var s=0;s$e.readonly(),leftBottomChartWidget:()=>ai,destroy:function(){if(Gt.fire(),Xt(!1),null!==at&&(at(),at=null),F(ut()),ti.destroy(),ii.destroy(),ri.destroy(),si.destroy(),ni.destroy(),fe.unsubscribe(Ot),de.forEach((function(e){void 0!==e.timingsMeter&&e.timingsMeter.destroy(),e.chartWidget.destroy()})),o.resizerBridge.remove(),Se.value().forEach((e=>{e.mouseHandler.destroy(),e.mouseListener.destroy()})),window.removeEventListener("resize",ft),c.tool.unsubscribe(ci),c.tool.unsubscribe(hi),et.resolve(),Je.remove(),Zt.clear(),Qt.clear(),Re.destroy(),Oe&&Oe.destroy(),ei&&ei.destroy(),window.TVD){const e=window.TVD.crosshairSyncEnabled;e&&e.unsubscribe(We),U(ut())}},onAboutToBeDestroyed:Gt,layout:Ue.readonly(),setLayout:St,activeChartWidget:ce,viewMode:ye,activeChartStyle:Mt.readonly(),setChartStyleToWidget:function(e,t){t||(t=ce.value()),t&&function(e,t){var i=e.model(),s=i.mainSeries().properties().style;i.setChartStyleProperty(s,t,le)}(t,e)},selectedSources:At.readonly(),metaInfo:Xe,state:function(e,i,s,r){for(var n=[],o=pt(),a=0;a{c.layoutsSizes[t]=e})),c},lineToolsAndGroupsDTOs:function(){return L(ut())},resetLineToolsInvalidated:function(e,t){return E(ut(),e,t)},applyLineToolUpdateNotification:D.bind(null,de),readOnly:function(){return he},onZoom:function(){return it},onScroll:function(){return st},resizerBridge:function(){return o.resizerBridge},lock:{symbol:ti,interval:ii,dateRange:si,crosshair:ni,trackTime:ri},setSymbol:function(e){Ie.value()?zt(e):ce.value().setSymbol(e)},setResolution:function(e){jt||Ut||function(e){if(S(e),Ut=!0,Ae.value()){for(var t=!1,i=0;iH(ut(),e,t,i,s),syncScroll:function(e,t){return j(ut(),e,t)},setSymbolAll:zt,clearChartMetaInfo:function(){Xe.id.setValue(null),Xe.uid.setValue(void 0),Xe.name.setValue(void 0)},takeScreenshot:I.takeScreenshot.bind(this,o.snapshotUrl,this),takeServerScreenshot:I.takeServerScreenshot.bind(this,o.snapshotUrl,this),loadContent:li,purgeUnusedWidgets:function(){for(var e=a[ge].count;e1},applyIndicatorToAllCharts:function(e,t,i,s){A(ut(),e,t,i,s)},setActive:Xt,inlineChartsCount:_e.readonly(),revertToInline:function(){yt(null);for(var e=0;eft())),ft()},destroyReplayWidget:function(){r(null!==Jt,"Cannot remove replay container, container is not created"),Jt.remove(),Jt=null,ft()},setViewMode:function(e){ye.setValue(e)},moveActiveChartWithUndo:function(e){},activeChartCanBeMoved:function(){return!1},generalPropertiesDefinitions:function(){return ce.value().generalPropertiesDefinitions()},reconnectChartApi:function(e){undefined(e)},setBroker:function(e){0},setSaveChartService:function(e){Ne=e;for(var t=0;txe}),li(o.content,!0),Ue.subscribe((function(){Ct()})),Ue.hook=function(e){return e===this.value()?e:dt(e)},he&&(Ue.writeLock=!0),window.addEventListener("resize",ft);var di=0;function ui(){0===--di&&u.emitOnce("onChartReady")}de.forEach((function(e){if(e){di++;var t=e.chartWidget;t.withModel(null,(function(){o.metaInfo&&t.model().model().setChartSaveTime(1e3*o.metaInfo.lastModified);var e=t.model().mainSeries();if(e.bars().size()>0||e.isStatusBad())ui();else{var i=e.dataEvents(),s=function(){ui(),i.barReceived().unsubscribe(null,s),i.completed().unsubscribe(null,s),i.error().unsubscribe(null,s)};i.barReceived().subscribe(null,s),i.completed().subscribe(null,s),i.error().subscribe(null,s)}}))}})),G(ut()).then(q).then((function(){window.saver&&window.is_authenticated&&o.widgetOptions.justCloned&&window.saver.saveChartSilently()})).catch(m.logError.bind(m))}},60223:(e,t,i)=>{"use strict";i.d(t,{ContextMenuManager:()=>s});var s,r=i(43986),n=i(59064);!function(e){let t=null,s=null;const o=[],a={createAction:e=>new r.Action({...e,actionId:"Chart.CustomActionId"}),createAsyncAction:e=>new r.ActionAsync("Chart.CustomActionId",e),createSeparator:()=>new r.Separator};async function l(e,r={},n={menuName:""},l){let h;null!==t&&(e=await t(e,a));const d=()=>{const e=o.indexOf(h);-1!==e&&o.splice(e,1),void 0!==l&&l()};if(null!==s)h=await s(e,n,d),c();else{const t=await Promise.all([i.e(7624),i.e(6092),i.e(5761),i.e(4412),i.e(8009),i.e(1140),i.e(5639),i.e(1528),i.e(962),i.e(1075),i.e(2804),i.e(1584)]).then(i.bind(i,46492));h=new t.ContextMenuRenderer(e,r,d,c)}return o.push(h),h}function c(){(0,n.globalCloseMenu)()}e.createMenu=l,e.showMenu=function(e,t,i={},s,r){return l(e,i,s,r).then((e=>e.show(t)))},e.setCustomRendererFactory=function(e){s=e},e.setCustomItemsProcessor=function(e){t=e},e.hideAll=c,e.getShown=function(){for(let e=0;e{"use strict";i.d(t,{DialogRenderer:()=>n});var s=i(40549),r=i.n(s);class n{constructor(){ +this._container=document.createElement("div"),this._visibility=new(r())(!1)}visible(){return this._visibility.readonly()}_setVisibility(e){this._visibility.setValue(e)}}},35936:(e,t,i)=>{"use strict";var s;i.d(t,{TabNames:()=>s}),function(e){e.background="Background",e.coordinates="Coordinates",e.drawings="Drawings",e.events="Events",e.eventsAndAlerts="Events & Alerts",e.inputs="Inputs",e.properties="Properties",e.scales="Scales",e.legend="Legend",e.sourceCode="Source Code",e.style="Style",e.symbol="Symbol",e.timezoneSessions="Timezone/Sessions",e.trading="Trading",e.visibility="Visibility",e.text="Text"}(s||(s={}))},9416:(e,t,i)=>{"use strict";function s(e){return e.getAll().some((e=>e.isInitialized()))}function r(e,t){const i=e.getAll(),s=()=>{t(),i.forEach((e=>{e.chartWidgetInitialized().unsubscribe(null,s)}))};i.forEach((e=>{e.chartWidgetInitialized().subscribe(null,s,!0)}))}i.r(t),i.d(t,{isAnyChartWidgetInitialized:()=>s,waitAnyChartWidgetInitialized:()=>r})},8222:(e,t,i)=>{"use strict";i.d(t,{getFavoriteDrawingToolbarPromise:()=>o,createFavoriteDrawingToolbar:()=>a});var s=i(23568);let r=null,n=null;function o(){return n}function a(){null===n&&(n=Promise.all([i.e(5652),i.e(8230),i.e(7624),i.e(4819),i.e(9333),i.e(6092),i.e(8619),i.e(8825),i.e(5761),i.e(4412),i.e(8009),i.e(1140),i.e(3562),i.e(105),i.e(5639),i.e(8819),i.e(6879),i.e(1528),i.e(7263),i.e(962),i.e(1075),i.e(5747),i.e(1890),i.e(2182),i.e(2804),i.e(2306)]).then(i.bind(i,2209)).then((({FavoriteDrawingToolbar:e})=>(r=null!==r?r:new e({left:window.innerWidth/2,top:s.HEADER_TOOLBAR_HEIGHT_EXPANDED+61}),r))))}},24679:(e,t,i)=>{"use strict";i.d(t,{getPriceAxisNameInfo:()=>o});const s=["Z","Y","X","W","V","U","T","S"],r=["A","B","C","D","E","F","G","H"];class n{constructor(e){this.label=e}equals(e){return null!==e&&this.label===e.label}}function o(e,t){const i="left"===e?s:r;return new n(t{"use strict";i.d(t,{CHART_WIDGET_COLLECTION_SERVICE:()=>s});i(16216);const s={id:"ChartWidgetCollectionService"};var r;!function(e){e.Multichart="multichart",e.ForceFullscreen="force-fullscreen"}(r||(r={}))},36646:(e,t,i)=>{"use strict";i.d(t,{InvalidationLevel:()=>s,InvalidationMask:()=>a,defaultInvalidationLevel:()=>o});var s,r=i(50151);class n{constructor(e=o){this._paneInvalidationLevel=o,this._leftPriceScalesInvalidationMap=new Map,this._rightPriceScalesInvalidationMap=new Map,this._legendWidgetInvalidated=!1,this._invalidationLevel=e}fullInvalidation(){return this._invalidationLevel}invalidateAll(e){this._invalidationLevel=Math.max(this._invalidationLevel,e)}invalidatePane(e){this._paneInvalidationLevel=Math.max(this._invalidationLevel,e)}invalidateLegendWidgetLayout(){this._legendWidgetInvalidated=!0}invalidatePriceScale(e,t,i){const s="left"===e?this._leftPriceScalesInvalidationMap:this._rightPriceScalesInvalidationMap,r=s.get(t)||o;s.set(t,Math.max(r,i))}invalidationLevelForPane(){return Math.max(this._paneInvalidationLevel,this._invalidationLevel)}legendWidgetLayoutInvalidated(){ +return this._legendWidgetInvalidated||this._invalidationLevel===s.Full}getterForPriceScaleInvalidationLevelBySide(e){const t="left"===e?this._leftPriceScalesInvalidationMap:this._rightPriceScalesInvalidationMap;return e=>Math.max(t.get(e)||o,this._invalidationLevel)}priceScaleSideMaxLevel(e){const t="left"===e?this._leftPriceScalesInvalidationMap:this._rightPriceScalesInvalidationMap;let i=this._invalidationLevel;return t.size>0&&t.forEach((e=>{e>i&&(i=e)})),i}merge(e){this._invalidationLevel=Math.max(this._invalidationLevel,e._invalidationLevel),this._paneInvalidationLevel=Math.max(this._paneInvalidationLevel,e._paneInvalidationLevel),e._leftPriceScalesInvalidationMap.forEach(((e,t)=>{const i=this._leftPriceScalesInvalidationMap.get(t)||o;this._leftPriceScalesInvalidationMap.set(t,Math.max(i,e))})),e._rightPriceScalesInvalidationMap.forEach(((e,t)=>{const i=this._rightPriceScalesInvalidationMap.get(t)||o;this._rightPriceScalesInvalidationMap.set(t,Math.max(i,e))})),this._legendWidgetInvalidated=this._legendWidgetInvalidated||e._legendWidgetInvalidated}}!function(e){e[e.None=0]="None",e[e.Cursor=1]="Cursor",e[e.Light=2]="Light",e[e.Full=3]="Full"}(s||(s={}));const o=s.None;class a{constructor(e=o){this._panesOrderChanged=!1,this._keepVisibleTimeRangeOnResize=!1,this._timeAxisInvalidationLevel=o,this._invalidatedPanes=new Map,this._additionalActions=[],this._timeScaleInvalidations=[],this._invalidationLevel=e}invalidateAll(e){this._invalidationLevel!==e&&(this._invalidationLevel=Math.max(this._invalidationLevel,e),this._invalidatedPanes.forEach((e=>{e.invalidateAll(this._invalidationLevel)})))}invalidateAllPane(e,t){this._invalidatedPanes.has(e)||this._invalidatedPanes.set(e,new n(this._invalidationLevel)),(0,r.ensureDefined)(this._invalidatedPanes.get(e)).invalidateAll(t)}invalidatePriceScale(e,t,i,s){this._invalidatedPanes.has(e)||this._invalidatedPanes.set(e,new n(this._invalidationLevel)),(0,r.ensureDefined)(this._invalidatedPanes.get(e)).invalidatePriceScale(t,i,s)}invalidateTimeScale(e){this._timeAxisInvalidationLevel=Math.max(this._timeAxisInvalidationLevel,e)}invalidatePanesOrder(){this._panesOrderChanged=!0}lockVisibleTimeRangeOnResize(){this._keepVisibleTimeRangeOnResize=!0}fullInvalidation(){return this._invalidationLevel}maxPaneInvalidation(){const e=[];return this._invalidatedPanes.forEach((t=>{e.push(t.fullInvalidation())})),Math.max(...e,this._invalidationLevel)}invalidateForPane(e){return this._invalidatedPanes.get(e)||new n(this._invalidationLevel)}invalidateForTimeScale(){return Math.max(this._timeAxisInvalidationLevel,this._invalidationLevel)}validationActions(){return this._additionalActions}addValidationAction(e){this._additionalActions.push(e)}merge(e){this._invalidationLevel=Math.max(this._invalidationLevel,e._invalidationLevel),this._panesOrderChanged=this._panesOrderChanged||e._panesOrderChanged,this._keepVisibleTimeRangeOnResize=this._keepVisibleTimeRangeOnResize||e._keepVisibleTimeRangeOnResize,this._invalidatedPanes.forEach((e=>{e.invalidateAll(this._invalidationLevel)})), +e._invalidatedPanes.forEach(((e,t)=>{this._invalidatedPanes.has(t)||this._invalidatedPanes.set(t,new n(this._invalidationLevel)),(0,r.ensureDefined)(this._invalidatedPanes.get(t)).merge(e)})),this._timeAxisInvalidationLevel=Math.max(this._timeAxisInvalidationLevel,e._timeAxisInvalidationLevel);for(let t=0;t0===e.type));if(-1!==e){const[t]=this._timeScaleInvalidations.splice(e,1);t.value.terminate()}}}},78996:(e,t,i)=>{"use strict";i.d(t,{lastMouseOrTouchEventInfo:()=>r,setLastMouseOrTouchEventInfo:()=>n});let s=(0,i(49483).supportTouch)()?{isTouch:!0,stylus:!1}:{isTouch:!1};function r(){return s}function n(e){s=e.isTouch?{isTouch:!0,stylus:e.stylus}:{isTouch:!1}}},7121:(e,t,i)=>{"use strict";i.d(t,{layoutInitialSizingState:()=>n});var s=i(3308);i(50151);function r(e){return e.map((t=>{if((0,s.default)(t))return{percent:1/e.length};{const i=t.slice(1);return{percent:1/e.length,substate:r(i)}}}))}function n(e){return r(e.slice(1))}},57737:(e,t,i)=>{"use strict";i.r(t),i.d(t,{layouts:()=>r,isSingleLayout:()=>n,isMultipleLayout:()=>o,isSupportedLayout:()=>a,tryGuessingTheMostSuitableLayout:()=>l});i(10123),i(7121);let s;s={};const r={...{s:{title:"1 chart",count:1,layoutType:"s",sizer:(e,t)=>{if(0!==t)throw new RangeError("invalid index");return e},splitters:()=>[],resizeApplier:(e,t,i,s,r)=>r,syncSublayoutsBySplitter:(e,t)=>t,expression:["h",0]}},...s};function n(e){return"s"===e}function o(e){return!n(e)}function a(e){return n(e)||s.hasOwnProperty(e)}function l(e){return"s"}},57404:(e,t,i)=>{"use strict";i.d(t,{LineToolsGroupControllerApi:()=>o});var s=i(50841),r=i(50151),n=i(6250);class o{constructor(e,t){this._controller=e,this._model=t}createGroupFromSelection(){return this._controller.createGroupFromSelection().id}removeGroup(e){const t=(0,r.ensureDefined)(this._groupById(e));this._controller.removeGroup(t)} +groups(){return this._controller.groups().map((e=>e.id))}shapesInGroup(e){const t=(0,r.ensureDefined)(this._groupById(e));return(0,s.sortSources)(t.lineTools()).map((e=>e.id()))}excludeShapeFromGroup(e,t){const i=(0,r.ensureDefined)(this._groupById(e)),s=(0,r.ensureNotNull)(this._model.dataSourceForId(t));(0,r.assert)((0,n.isLineTool)(s),"Passed shapeId is not a line tool"),this._controller.excludeLineToolFromGroup(i,s)}addShapeToGroup(e,t){const i=(0,r.ensureDefined)(this._groupById(e)),s=(0,r.ensureNotNull)(this._model.dataSourceForId(t));(0,r.assert)((0,n.isLineTool)(s),"Passed shapeId is not a line tool"),this._controller.addLineToolToGroup(i,s)}availableZOrderOperations(e){const t=(0,r.ensureDefined)(this._groupById(e));return this._controller.availableZOrderOperations(t)}bringToFront(e){const t=(0,r.ensureDefined)(this._groupById(e));this._controller.bringToFront(t)}bringForward(e){const t=(0,r.ensureDefined)(this._groupById(e));this._controller.bringForward(t)}sendBackward(e){const t=(0,r.ensureDefined)(this._groupById(e));this._controller.sendBackward(t)}sendToBack(e){const t=(0,r.ensureDefined)(this._groupById(e));this._controller.sendToBack(t)}insertAfter(e,t){const i=(0,r.ensureDefined)(this._groupById(e)),s=(0,r.ensureNotNull)(this._groupById(t)||this._model.dataSourceForId(t));this._controller.insertAfter(i,s)}insertBefore(e,t){const i=(0,r.ensureDefined)(this._groupById(e)),s=(0,r.ensureNotNull)(this._groupById(t)||this._model.dataSourceForId(t));this._controller.insertBefore(i,s)}groupVisibility(e){return(0,r.ensureDefined)(this._groupById(e)).visibility()}setGroupVisibility(e,t){const i=(0,r.ensureDefined)(this._groupById(e));this._controller.setGroupVisibility(i,t)}groupLock(e){return(0,r.ensureDefined)(this._groupById(e)).locked()}setGroupLock(e,t){const i=(0,r.ensureDefined)(this._groupById(e));this._controller.setGroupLock(i,t)}getGroupName(e){return(0,r.ensureDefined)(this._groupById(e)).name()}setGroupName(e,t){const i=(0,r.ensureDefined)(this._groupById(e));this._controller.setGroupName(i,t)}canBeGroupped(e){const t=e.map((e=>(0,r.ensureNotNull)(this._model.dataSourceForId(e))));return!t.some((e=>!(0,n.isLineTool)(e)))&&this._controller.canBeGroupped(t)}_groupById(e){return this._controller.groups().find((t=>t.id===e))}}},35861:(e,t,i)=>{"use strict";i.d(t,{MouseEventHandler:()=>h});var s=i(49483),r=i(50151),n=i(65665),o=i(80007),a=i(78996);const l=s.isSafari?"click":"auxclick",c={treatVertTouchDragAsPageScroll:!1,treatHorzTouchDragAsPageScroll:!1};class h{constructor(e,t,i){this._clickCount=0,this._clickTimeoutId=null,this._clickPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._tapCount=0,this._tapTimeoutId=null,this._tapPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY},this._longTapTimeoutId=null,this._longTapActive=!1,this._mouseMoveStartPosition=null,this._touchMoveStartPosition=null,this._touchMoveExceededManhattanDistance=!1,this._cancelClick=!1,this._cancelTap=!1,this._unsubscribeOutsideMouseEvents=null,this._unsubscribeOutsideTouchEvents=null, +this._unsubscribeMobileSafariEvents=null,this._unsubscribeMousemove=null,this._unsubscribeRootMouseEvents=null,this._unsubscribeRootTouchEvents=null,this._startPinchMiddlePoint=null,this._startPinchDistance=0,this._pinchPrevented=!1,this._preventTouchDragProcess=!1,this._mousePressed=!1,this._lastTouchEventTimeStamp=0,this._activeTouchId=null,this._acceptMouseLeave=!s.CheckMobile.iOS(),this._onFirefoxOutsideMouseUp=e=>{this._mouseUpHandler(e)},this._onMobileSafariDoubleClick=e=>{if(this._firesTouchEvents(e)){const t=this._makeCompatEvent(e);if(++this._tapCount,this._tapTimeoutId&&this._tapCount>1){const{manhattanDistance:i}=this._touchMouseMoveWithDownInfo(u(e),this._tapPosition);i<30&&!this._cancelTap&&this._processTouchEvent(t,this._handler.doubleTapEvent),this._resetTapTimeout()}}else{const t=this._makeCompatEvent(e);if(++this._clickCount,this._clickTimeoutId&&this._clickCount>1){const{manhattanDistance:i}=this._touchMouseMoveWithDownInfo(u(e),this._clickPosition);i<5&&!this._cancelClick&&this._processMouseEvent(t,this._handler.mouseDoubleClickEvent),this._resetClickTimeout()}}},this._target=e,this._handler=t,this._options=(0,n.merge)((0,n.clone)(c),i||{}),this._init()}destroy(){null!==this._unsubscribeOutsideMouseEvents&&(this._unsubscribeOutsideMouseEvents(),this._unsubscribeOutsideMouseEvents=null),null!==this._unsubscribeOutsideTouchEvents&&(this._unsubscribeOutsideTouchEvents(),this._unsubscribeOutsideTouchEvents=null),null!==this._unsubscribeMousemove&&(this._unsubscribeMousemove(),this._unsubscribeMousemove=null),null!==this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),null!==this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null),null!==this._unsubscribeMobileSafariEvents&&(this._unsubscribeMobileSafariEvents(),this._unsubscribeMobileSafariEvents=null),this._clearLongTapTimeout(),this._resetClickTimeout()}_mouseEnterHandler(e){this._unsubscribeMousemove&&this._unsubscribeMousemove();const t=this._mouseMoveHandler.bind(this);if(this._unsubscribeMousemove=()=>{this._target.removeEventListener("mousemove",t)},this._target.addEventListener("mousemove",t),this._firesTouchEvents(e))return;const i=this._makeCompatEvent(e);this._processMouseEvent(i,this._handler.mouseEnterEvent),this._acceptMouseLeave=!0}_resetClickTimeout(){null!==this._clickTimeoutId&&clearTimeout(this._clickTimeoutId),this._clickCount=0,this._clickTimeoutId=null,this._clickPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}}_resetTapTimeout(){null!==this._tapTimeoutId&&clearTimeout(this._tapTimeoutId),this._tapCount=0,this._tapTimeoutId=null,this._tapPosition={x:Number.NEGATIVE_INFINITY,y:Number.POSITIVE_INFINITY}}_mouseMoveHandler(e){if(this._mousePressed||null!==this._touchMoveStartPosition)return;if(this._firesTouchEvents(e))return;const t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.mouseMoveEvent),this._acceptMouseLeave=!0}_touchMoveHandler(e){const t=m(e.changedTouches,(0, +r.ensureNotNull)(this._activeTouchId));if(null===t)return;if(this._lastTouchEventTimeStamp=_(e),null!==this._startPinchMiddlePoint)return;if(this._preventTouchDragProcess)return;this._pinchPrevented=!0;const i=this._touchMouseMoveWithDownInfo(u(t),(0,r.ensureNotNull)(this._touchMoveStartPosition)),{xOffset:s,yOffset:n,manhattanDistance:a}=i;if(this._touchMoveExceededManhattanDistance||!(a<5)){if(!this._touchMoveExceededManhattanDistance){const e=.5*s,t=n>=e&&!this._options.treatVertTouchDragAsPageScroll,i=e>n&&!this._options.treatHorzTouchDragAsPageScroll;t||i||(this._preventTouchDragProcess=!0),this._touchMoveExceededManhattanDistance=!0,this._cancelTap=!0,this._clearLongTapTimeout(),this._resetTapTimeout()}if(!this._preventTouchDragProcess){const i=this._makeCompatEvent(e,t);this._processTouchEvent(i,this._handler.touchMoveEvent),(0,o.preventDefault)(e)}}}_mouseMoveWithDownHandler(e){if(0!==e.button)return;const t=this._touchMouseMoveWithDownInfo(u(e),(0,r.ensureNotNull)(this._mouseMoveStartPosition)),{manhattanDistance:i}=t;if(i>=5&&(this._cancelClick=!0,this._resetClickTimeout()),this._cancelClick){const t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.pressedMouseMoveEvent)}}_touchMouseMoveWithDownInfo(e,t){const i=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);return{xOffset:i,yOffset:s,manhattanDistance:i+s}}_touchEndHandler(e){let t=m(e.changedTouches,(0,r.ensureNotNull)(this._activeTouchId));if(null===t&&0===e.touches.length&&(t=e.changedTouches[0]),null===t)return;this._activeTouchId=null,this._lastTouchEventTimeStamp=_(e),this._clearLongTapTimeout(),this._touchMoveStartPosition=null,this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);const i=this._makeCompatEvent(e,t);if(this._processTouchEvent(i,this._handler.touchEndEvent),++this._tapCount,this._tapTimeoutId&&this._tapCount>1){const{manhattanDistance:e}=this._touchMouseMoveWithDownInfo(u(t),this._tapPosition);e<30&&!this._cancelTap&&this._processTouchEvent(i,this._handler.doubleTapEvent),this._resetTapTimeout()}else this._cancelTap||(this._processTouchEvent(i,this._handler.tapEvent),this._handler.tapEvent&&(0,o.preventDefault)(e));0===this._tapCount&&(0,o.preventDefault)(e),0===e.touches.length&&this._longTapActive&&(this._longTapActive=!1,(0,o.preventDefault)(e))}_mouseUpHandler(e){if(0!==e.button)return;const t=this._makeCompatEvent(e);if(this._mouseMoveStartPosition=null,this._mousePressed=!1,this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null),s.isFF){this._target.ownerDocument.documentElement.removeEventListener("mouseleave",this._onFirefoxOutsideMouseUp)}if(!this._firesTouchEvents(e))if(this._processMouseEvent(t,this._handler.mouseUpEvent),++this._clickCount,this._clickTimeoutId&&this._clickCount>1){const{manhattanDistance:i}=this._touchMouseMoveWithDownInfo(u(e),this._clickPosition);i<5&&!this._cancelClick&&this._processMouseEvent(t,this._handler.mouseDoubleClickEvent),this._resetClickTimeout() +}else this._cancelClick||this._processMouseEvent(t,this._handler.mouseClickEvent)}_clearLongTapTimeout(){null!==this._longTapTimeoutId&&(clearTimeout(this._longTapTimeoutId),this._longTapTimeoutId=null)}_touchStartHandler(e){if(null!==this._activeTouchId)return;const t=e.changedTouches[0];this._activeTouchId=t.identifier,this._lastTouchEventTimeStamp=_(e);const i=this._target.ownerDocument.documentElement;this._cancelTap=!1,this._touchMoveExceededManhattanDistance=!1,this._preventTouchDragProcess=!1,this._touchMoveStartPosition=u(t),this._unsubscribeRootTouchEvents&&(this._unsubscribeRootTouchEvents(),this._unsubscribeRootTouchEvents=null);{const t=this._touchMoveHandler.bind(this),s=this._touchEndHandler.bind(this);this._unsubscribeRootTouchEvents=()=>{i.removeEventListener("touchmove",t),i.removeEventListener("touchend",s)},i.addEventListener("touchmove",t,{passive:!1}),i.addEventListener("touchend",s,{passive:!1}),this._clearLongTapTimeout(),this._longTapTimeoutId=setTimeout(this._longTapHandler.bind(this,e),240)}const s=this._makeCompatEvent(e,t);this._processTouchEvent(s,this._handler.touchStartEvent),this._tapTimeoutId||(this._tapCount=0,this._tapTimeoutId=setTimeout(this._resetTapTimeout.bind(this),500),this._tapPosition=u(t))}_wheelClickHandler(e){if(1!==e.button)return;if(this._firesTouchEvents(e))return;const t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.wheelClickEvent)}_mouseDownHandler(e){if(0!==e.button)return;const t=this._target.ownerDocument.documentElement;s.isFF&&t.addEventListener("mouseleave",this._onFirefoxOutsideMouseUp),this._cancelClick=!1,this._mouseMoveStartPosition=u(e),this._unsubscribeRootMouseEvents&&(this._unsubscribeRootMouseEvents(),this._unsubscribeRootMouseEvents=null);{const e=this._mouseMoveWithDownHandler.bind(this),i=this._mouseUpHandler.bind(this);this._unsubscribeRootMouseEvents=()=>{t.removeEventListener("mousemove",e),t.removeEventListener("mouseup",i)},t.addEventListener("mousemove",e),t.addEventListener("mouseup",i)}if(this._mousePressed=!0,this._firesTouchEvents(e))return;const i=this._makeCompatEvent(e);this._processMouseEvent(i,this._handler.mouseDownEvent),this._clickTimeoutId||(this._clickCount=0,this._clickTimeoutId=setTimeout(this._resetClickTimeout.bind(this),500),this._clickPosition=u(e))}_init(){this._target.addEventListener("mouseenter",this._mouseEnterHandler.bind(this)),this._target.addEventListener("touchcancel",this._clearLongTapTimeout.bind(this));{const e=this._target.ownerDocument,t=e=>!e.target||!this._target.contains(e.target),i=e=>{if(!t(e))return;const i=e.changedTouches[0];this._lastTouchEventTimeStamp=_(e),this._processTouchEvent(this._makeCompatEvent(e,i),this._handler.touchStartOutsideEvent)},s=e=>{t(e)&&!this._firesTouchEvents(e)&&this._processMouseEvent(this._makeCompatEvent(e),this._handler.mouseDownOutsideEvent)};this._unsubscribeOutsideTouchEvents=()=>{e.removeEventListener("touchstart",i)},this._unsubscribeOutsideMouseEvents=()=>{e.removeEventListener("mousedown",s)},e.addEventListener("mousedown",s), +e.addEventListener("touchstart",i,{passive:!0})}s.CheckMobile.iOS()&&(this._unsubscribeMobileSafariEvents=()=>{this._target.removeEventListener("dblclick",this._onMobileSafariDoubleClick)},this._target.addEventListener("dblclick",this._onMobileSafariDoubleClick)),this._target.addEventListener("mouseleave",this._mouseLeaveHandler.bind(this)),this._target.addEventListener("contextmenu",this._contextMenuHandler.bind(this)),this._target.addEventListener("touchstart",this._touchStartHandler.bind(this),{passive:!0}),(0,o.preventScrollByWheelClick)(this._target),this._target.addEventListener("mousedown",this._mouseDownHandler.bind(this)),this._target.addEventListener(l,this._wheelClickHandler.bind(this)),this._initPinch(),this._target.addEventListener("touchmove",(()=>{}),{passive:!1})}_initPinch(){void 0===this._handler.pinchStartEvent&&void 0===this._handler.pinchEvent&&void 0===this._handler.pinchEndEvent||(this._target.addEventListener("touchstart",(e=>this._checkPinchState(e.touches)),{passive:!0}),this._target.addEventListener("touchmove",(e=>{if(2===e.touches.length&&null!==this._startPinchMiddlePoint&&void 0!==this._handler.pinchEvent){const t=e.touches[0],i=e.touches[1],s=p(t,i)/this._startPinchDistance,r=d(this._target);this._handler.pinchEvent(this._startPinchMiddlePoint,{x:t.clientX-r.left,y:t.clientY-r.top},{x:i.clientX-r.left,y:i.clientY-r.top},s),(0,o.preventDefault)(e)}}),{passive:!1}),this._target.addEventListener("touchend",(e=>{this._checkPinchState(e.touches)})))}_checkPinchState(e){1===e.length&&(this._pinchPrevented=!1),2!==e.length||this._pinchPrevented||this._longTapActive?this._stopPinch():this._startPinch(e)}_startPinch(e){if(void 0!==this._handler.pinchStartEvent){const t=d(this._target),i=e[0],s=e[1],r={x:i.clientX-t.left,y:i.clientY-t.top},n={x:s.clientX-t.left,y:s.clientY-t.top};this._startPinchMiddlePoint={x:(r.x+n.x)/2,y:(r.y+n.y)/2},this._startPinchDistance=p(i,s),this._handler.pinchStartEvent(this._startPinchMiddlePoint,r,n)}this._clearLongTapTimeout()}_stopPinch(){null!==this._startPinchMiddlePoint&&(this._startPinchMiddlePoint=null,void 0!==this._handler.pinchEndEvent&&this._handler.pinchEndEvent())}_mouseLeaveHandler(e){if(this._unsubscribeMousemove&&this._unsubscribeMousemove(),this._firesTouchEvents(e))return;if(!this._acceptMouseLeave)return;const t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.mouseLeaveEvent),this._acceptMouseLeave=!s.CheckMobile.iOS()}_longTapHandler(e){const t=m(e.touches,(0,r.ensureNotNull)(this._activeTouchId));if(null===t)return;const i=this._makeCompatEvent(e,t);this._processTouchEvent(i,this._handler.longTapEvent),this._processTouchEvent(i,this._handler.touchContextMenuEvent),this._cancelTap=!0,this._longTapActive=!0}_contextMenuHandler(e){if((0,o.preventDefault)(e),null!==this._touchMoveStartPosition)return;if(this._firesTouchEvents(e))return;const t=this._makeCompatEvent(e);this._processMouseEvent(t,this._handler.contextMenuEvent),this._cancelClick=!0}_firesTouchEvents(e){ +return e.sourceCapabilities&&void 0!==e.sourceCapabilities.firesTouchEvents?e.sourceCapabilities.firesTouchEvents:_(e){"touchstart"!==e.type&&(0,o.preventDefault)(e)}}}}function d(e){return e.getBoundingClientRect()||{left:0,top:0}}function u(e){return{x:e.pageX,y:e.pageY}}function p(e,t){const i=e.clientX-t.clientX,s=e.clientY-t.clientY;return Math.sqrt(i*i+s*s)}function _(e){return e.timeStamp||performance.now()}function m(e,t){for(let i=0;i{"use strict";i.d(t,{navigationButtonsVisibilityKey:()=>r,property:()=>n,availableValues:()=>o,actualBehavior:()=>a});var s=i(84803);const r="NavigationButtons.visibility",{property:n,availableValues:o,actualBehavior:a}=(0,s.createVisibilityController)(r)},43074:(e,t,i)=>{"use strict";i.d(t,{property:()=>n,availableValues:()=>o,actualBehavior:()=>a});var s=i(84803),r=i(11954);const{property:n,availableValues:o,actualBehavior:a}=(0,s.createVisibilityController)("PaneButtons.visibility",r.navigationButtonsVisibilityKey)},50792:(e,t,i)=>{"use strict";i.d(t,{ActionBinder:()=>s});class s{constructor(e,t,i,s,r=null){this._property=t,this._undoModel=i,this._undoText=s,this._action=e,this.setValue(t.value()),t.subscribe(this,this._propertyChanged),null!==r?e.update({onExecute:r.bind(this)}):e.update({onExecute:this._onActionCallback.bind(this)})}destroy(){this._property.unsubscribe(this,this._propertyChanged)}value(){return this._action.isChecked()}setValue(e){this._action.update({checked:Boolean(e)})}_onActionCallback(){this._undoModel.setProperty(this._property,this.value(),this._undoText)}_propertyChanged(e){this.setValue(e.value())}}},50534:(e,t,i)=>{"use strict";i.d(t,{isCustomStudy:()=>r});const s={VbPFixed:!0,PivotPointsStandard:!0,VbPVisible:!0};function r(e){return e in s}},46069:(e,t,i)=>{"use strict";i.d(t,{MetaInfoHelper:()=>u});var s=i(50151),r=i(58403),n=i(83421),o=i(65665),a=i(98351),l=i(8890);function c(e){return!e.groupId&&!e.isHidden&&e.id!==l.RangeDependentStudyInputNames.FirstBar&&e.id!==l.RangeDependentStudyInputNames.LastBar}var h=i(50534);const d=(0,a.getLogger)("Platform.GUI.PropertyDialog.Indicators.MetaInfo");class u{constructor(e){this._metaInfo=e}hasUserEditableInputs(){return this._metaInfo.inputs.some(c)}getUserEditableInputs(){ +return this._metaInfo.inputs.filter(c)}hasUserEditableProperties(){return r.StudyMetaInfo.isScriptStrategy(this._metaInfo)}hasUserEditableStyles(){const e=this._metaInfo;return e.plots.length>0||void 0!==e.bands||void 0!==e.filledAreas||(0,h.isCustomStudy)(e.shortId)||r.StudyMetaInfo.isScriptStrategy(this._metaInfo)||Object.values(e.graphics).some((e=>void 0!==e))}getUserEditablePlots(){const e=new Set,t=this._metaInfo;return t.plots.filter((i=>{if((0,n.isColorerPlot)(i)||(0,n.isTextColorerPlot)(i)||(0,n.isDataOffsetPlot)(i)||(0,n.isOhlcColorerPlot)(i)||(0,n.isAlertConditionPlot)(i)||(0,n.isDataPlot)(i))return!1;if((0,n.isOhlcPlot)(i)){const r=i.target;if(e.has(r))return!1;e.add(r);const n=(0,s.ensureDefined)(t.ohlcPlots);return!(0,s.ensureDefined)(n[r]).isHidden}{const e=t.styles?t.styles[i.id]:void 0;return void 0===e||!e.isHidden}}))}hasUserEditableOptions(){return this.hasUserEditableInputs()||this.hasUserEditableProperties()||this.hasUserEditableStyles()}getStrategyProperties(){const e=this._metaInfo,t=e.inputs.filter(_),i={...p};for(const s of t){const t=s.internalID;i[t]=s,p.hasOwnProperty(t)||d.logWarn(`Unknown strategy input internal id ${t} in ${e.fullId}`)}return(0,o.clone)(i)}}const p={currency:void 0,backtest_fill_limits_assumption:void 0,calc_on_every_tick:void 0,calc_on_order_fills:void 0,commission_value:void 0,commission_type:void 0,initial_capital:void 0,pyramiding:void 0,slippage:void 0,default_qty_type:void 0,default_qty_value:void 0,margin_long:void 0,margin_short:void 0,use_bar_magnifier:void 0,process_orders_on_close:void 0};function _(e){return"strategy_props"===e.groupId}},71445:(e,t,i)=>{"use strict";i.d(t,{checkAuthBeforeSaveLoad:()=>r});var s=i(2484);function r(e,t){s.enabled("saveload_requires_authentication")?window.runOrSignIn(e,t):e()}},67065:(e,t,i)=>{"use strict";i.d(t,{AbstractJsonStoreService:()=>n,CommonJsonStoreService:()=>o});var s=i(26867),r=i.n(s);class n{constructor(e,t,i,s,n){this._onChange=new(r()),this._handleChange=()=>{this._onChange.fire(this.get())},this._crossTabEvents=e,this._jsonKeyValueStore=t,this.CROSSTAB_EVENT_NAME=i,this.JSON_STORE_KEY=s,this.defaultStoreValue=this._serialize(n),this._subscribe()}get(){const e=this._jsonKeyValueStore.getJSON(this.JSON_STORE_KEY,this.defaultStoreValue);return this._deserialize(e)}set(e,t){const i=this._serialize(e);this._jsonKeyValueStore.setJSON(this.JSON_STORE_KEY,i,t),this._crossTabEvents.emit(this.CROSSTAB_EVENT_NAME),this._onChange.fire(e)}getOnChange(){return this._onChange}destroy(){this._unsubscribe(),this._onChange.destroy(),delete this._onChange}_subscribe(){this._crossTabEvents.on(this.CROSSTAB_EVENT_NAME,this._handleChange),this._jsonKeyValueStore.onSync.subscribe(this,this._handleChange)}_unsubscribe(){this._crossTabEvents.off(this.CROSSTAB_EVENT_NAME,this._handleChange),this._jsonKeyValueStore.onSync.unsubscribe(this,this._handleChange)}}class o extends n{_serialize(e){return e}_deserialize(e){return e}}},5520:(e,t,i)=>{"use strict";i.d(t,{LoadChartService:()=>d}) +;var s=i(2484),r=i(7276),n=i(71445),o=i(88279),a=i(21097),l=i(56840),c=i(67065);class h extends c.CommonJsonStoreService{constructor(e,t){super(e,t,"FAVORITE_CHARTS_CHANGED","loadChartDialog.favorites",{})}}class d extends o.DialogRenderer{constructor(e=null){super(),this._chartWidgetCollection=null,this._promise=null,this._dialog=null,this._subscribe=e=>{this._setVisibility(e)},this._getChartEntry=e=>({id:e.id,url:e.url,title:e.name,symbol:e.short_symbol,interval:e.interval,toolsCount:0,modified:e.modified_iso,favorite:void 0,active:()=>this._isActiveChart(e.id),openAction:()=>r.backend.loadChart(e),deleteAction:()=>r.backend.removeChart(e.image_url).then((()=>this._deleteChart(e.id))),favoriteAction:e=>Promise.resolve(this._updateFavorites(e))}),this._updateFavorites=e=>{var t;null===(t=this._favoriteChartsService)||void 0===t||t.set(e)},this._isActiveChart=e=>null!==this._chartWidgetCollection&&e===this._chartWidgetCollection.metaInfo.id.value(),this._deleteChart=e=>{this._isActiveChart(e)&&(s.enabled("saveload_storage_customization")?null!==this._chartWidgetCollection&&this._chartWidgetCollection.clearChartMetaInfo():location.href="/chart/"+location.search)},this._chartWidgetCollection=e,this._favoriteChartsService=new h(a.TVXWindowEvents,l)}showLoadDialog(){(0,n.checkAuthBeforeSaveLoad)(this._showLoadDialog.bind(this),{source:"Load chart",sourceMeta:"Chart"})}show(){this.showLoadDialog()}hide(){var e,t;null===(e=this._dialog)||void 0===e||e.hide(),null===(t=this._dialog)||void 0===t||t.visible().unsubscribe(this._subscribe)}_showLoadDialog(){(s.enabled("saveload_requires_authentication")&&!window.is_authenticated?Promise.resolve([]):r.backend.getCharts()).then((e=>e.map(this._getChartEntry))).then((e=>{const t=this._promise=Promise.all([i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(9333),i.e(8271),i.e(4412),i.e(8009),i.e(7920),i.e(1830),i.e(962),i.e(2842),i.e(3016),i.e(1075),i.e(8483),i.e(5009)]).then(i.bind(i,69883)).then((i=>{if(this._promise===t){this._dialog&&(this._dialog.hide(),this._dialog.visible().unsubscribe(this._subscribe));const t={charts:e,favoriteChartsService:this._favoriteChartsService,chartWidgetCollection:this._chartWidgetCollection};this._dialog=new i.LoadChartDialogRenderer(t),this._dialog.visible().subscribe(this._subscribe),this._dialog.show()}}))}))}async _changeFavoriteState(e,t,i){return Promise.resolve()}}},93958:(e,t,i)=>{"use strict";i.d(t,{SaveChartService:()=>v});var s=i(2484),r=i(40549),n=i.n(r),o=i(76422),a=i(25927),l=i(71445);i(93731);s.enabled("atsv2s");var c=i(44352),h=i(7276);async function d(){return!0}var u=i(3615);const p=s.enabled("confirm_overwrite_if_chart_layout_with_name_exists");class _{constructor(e,t,i){this._visibility=new(n())(!1),this._chartWidgetCollection=e,this._doSave=t,this._doLoad=i}hide(){var e;null===(e=this._hide)||void 0===e||e.call(this),this._visibility.setValue(!1)}visible(){return this._visibility.readonly()}_showRenameDialog(e,t,s,r){return(0,u.showRename)({title:this._renameDialogTitle(),text:this._renameDialogText(),maxLength:64, +initValue:e,onRename:async e=>{if(!p)return void this._renameActionHandler(e,t,s,r);const{newValue:n,dialogClose:o}=e,a=(await this._doLoad()).find((e=>e.name===n));o(),void 0!==a?this._hide=await(0,u.showConfirm)({title:c.t(null,void 0,i(56996)),text:c.t(null,void 0,i(30192)),onConfirm:({dialogClose:e})=>{e(),this._doOverwriteExistingLayout(a.id,n,t,s,r)},onCancel:({dialogClose:e})=>{e(),this._showRenameDialog(n,t,s,r)}}):this._renameActionHandler({newValue:n,dialogClose:o},t,s,r)},onClose:()=>this._visibility.setValue(!1)})}_doSaveCurrentLayout(e,t,i,s){const r=this._chartWidgetCollection.metaInfo.name.value();this._chartWidgetCollection.metaInfo.name.setValue(e),this._doSave(t,i,(()=>{this._chartWidgetCollection.metaInfo.name.setValue(r),null==s||s()}))}_doOverwriteExistingLayout(e,t,i,s,r){const n=this._chartWidgetCollection.metaInfo.name.value();this._chartWidgetCollection.metaInfo.id.setValue(e),this._chartWidgetCollection.metaInfo.name.setValue(t),this._doSave(i,s,(()=>{this._chartWidgetCollection.metaInfo.name.setValue(n),null==r||r()}))}}class m extends _{cloneChart(){this._cloneChart().then((()=>this._visibility.setValue(!0)))}show(){(0,l.checkAuthBeforeSaveLoad)((()=>this.cloneChart()),{source:"Clone chart"})}_renameDialogTitle(){return c.t(null,void 0,i(87898))}_renameDialogText(){return c.t(null,void 0,i(24435))+":"}_renameActionHandler({newValue:e,dialogClose:t}){s.enabled("saveload_storage_customization")&&this._doCloneCurrentLayout(e),t()}async _cloneChart(){const e=await d();e&&(this._hide=await this._showRenameDialog(this._getInitialRenameDialogInput()))}_doCloneCurrentLayout(e){const t=this._chartWidgetCollection.metaInfo.name.value();this._chartWidgetCollection.metaInfo.uid.deleteValue(),this._chartWidgetCollection.metaInfo.id.deleteValue(),this._chartWidgetCollection.metaInfo.name.setValue(e),this._doSave(void 0,void 0,(()=>{this._chartWidgetCollection.metaInfo.name.setValue(t)}))}_getInitialRenameDialogInput(){return c.t(null,{context:"ex: AAPL chart copy"},i(16493)).format({title:this._chartWidgetCollection.metaInfo.name.value()})}}class g extends _{show(e,t,i){this._saveNewChart(e,t,i).then((()=>this._visibility.setValue(!0)))}_renameDialogTitle(){return c.t(null,void 0,i(10520))}_renameDialogText(){return c.t(null,void 0,i(24435))+":"}_renameActionHandler({newValue:e,dialogClose:t},i,s,r){this._doSaveCurrentLayout(e,i,s,r),t()}async _saveNewChart(e,t,i){await d();const s=this._chartWidgetCollection.metaInfo.name.value();this._hide=await this._showRenameDialog(s,e,t,i)}}class f extends _{show(){(0,l.checkAuthBeforeSaveLoad)((()=>this._show()),{source:"Rename chart"})}_renameDialogTitle(){return c.t(null,void 0,i(4142))}_renameDialogText(){return c.t(null,void 0,i(24435))+":"}_renameActionHandler({newValue:e,dialogClose:t}){this._doSaveCurrentLayout(e),t()}async _show(){await this._renameChart(),this._visibility.setValue(!0)}async _renameChart(){const e=this._chartWidgetCollection.metaInfo.name.value();this._hide=await this._showRenameDialog(e)}}class v{constructor(e,t){ +this._autosaveTimer=null,this._watchedAutoSaveEnabled=new(n()),this._toggleAutoSaveEnabledHandler=this._toggleAutoSaveEnabled.bind(this),this._doSave=(e,t,i,s)=>{const r=this._chartWidgetCollection;void 0!==e&&e();const n=this._chartChangesWatcher.changes();this._chartSaver.saveChartSilently((e=>{var i;i=r.metaInfo.uid.value(),"/chart/"===location.pathname&&(location.href="/chart/"+i),void 0!==t&&t(e)}),(()=>{void 0!==i&&i()}),{autoSave:Boolean(s),changes:n})},this._doLoad=()=>h.backend.getCharts(),this._chartWidgetCollection=e,this._chartSaver=t,this._createController=new g(e,this._doSave,this._doLoad),this._renameController=new f(e,this._doSave,this._doLoad),this._saveAsController=new m(e,this._doSave,this._doLoad),this._chartChangesWatcher=new a.ChartChangesWatcher(e,t,o),e.saveKeysPressed().subscribe(this,this.saveChartOrShowTitleDialog),this._chartChangesWatcher.getOnChange().subscribe(this,this._onStateChanged)}autoSaveEnabled(){return this._watchedAutoSaveEnabled}destroy(){0}getCreateController(){return this._createController}getRenameController(){return this._renameController}getSaveAsController(){return this._saveAsController}cloneChart(){this._saveAsController.cloneChart()}saveChartAs(){this._saveAsController.show()}renameChart(){this._renameController.show()}saveNewChart(e,t,i){this._createController.show(e,t,i)}saveExistentChart(e,t,i){this._doSave(e,t,i)}changes(){return this._chartChangesWatcher.changes()}hasChanges(){return 0!==this._chartChangesWatcher.changes()}saveChartOrShowTitleDialog(e,t,i){const s=window.saver.isSaveInProcess(),r=this._chartChangesWatcher.hasChanges(),n=!!this._chartWidgetCollection.metaInfo.id.value();window.is_authenticated&&(s||!r&&n)||(0,l.checkAuthBeforeSaveLoad)((()=>{null!=this._chartWidgetCollection.metaInfo.id.value()?this.saveExistentChart(e,t,i):this.saveNewChart(e,t,i)}),{source:"Save chart",sourceMeta:"Chart"})}saveToJSON(){return this._chartSaver.saveToJSON()}saveChartSilently(e,t,i){this._chartSaver.saveChartSilently(e,t,i)}setAutoSaveEnabled(e){window.is_authenticated&&window.saver.isSaveInProcess()||(0,l.checkAuthBeforeSaveLoad)((()=>{this._watchedAutoSaveEnabled.setValue(e)}),{source:"AutoSave chart"})}saveChartLineTools(e,t,i,s){return this._chartSaver.saveChartLineTools(e,t,i,s)}_autoSaveEnabledSettingHandler(e){0}_toggleAutoSaveEnabled(e){0}_enableAutoSave(){0}_disableAutoSave(){0}_onStateChanged(e){e?this._startAutosave():this._stopAutosave()}_startAutosave(){s.enabled("charts_auto_save")&&null===this._autosaveTimer&&(this._autosaveTimer=setTimeout((()=>{this._autosaveTimer=null,this._chartWidgetCollection.metaInfo.id.value()&&this._doSave(void 0,void 0,void 0,!0)}),6e4))}_stopAutosave(){null!==this._autosaveTimer&&(clearInterval(this._autosaveTimer),this._autosaveTimer=null)}}},35663:(e,t,i)=>{"use strict";i.d(t,{showMarketOpenStatusProperty:()=>a,restoreShowMarketOpenStatusProperty:()=>l});var s=i(60923),r=i(56840);const n="Chart.ShowMarketOpenStatus";function o(){return r.getBool(n,true)}const a=(0,s.createPrimitiveProperty)(o());function l(){ +a.setValue(true),r.remove(n)}r.onSync.subscribe(null,(()=>a.setValue(o()))),a.subscribe(null,(()=>r.setValue(n,a.value())))},30802:(e,t,i)=>{"use strict";i.d(t,{firstReplacedByBatsExchange:()=>a,isEod:()=>l,isYield:()=>c,isDelay:()=>h,witoutRealtime:()=>d,getExchange:()=>u});i(50151);var s=i(83232),r=i.n(s);i(1930);const n=["DJ","CBOE","JSE"],o=["NZX"];function a(e){return null}function l(e,t){return r().hasEodSymbols(e.full_name)||6===t}function c(e){var t;return Boolean(null===(t=e.typespecs)||void 0===t?void 0:t.includes("yield"))}function h(e){return void 0!==e&&e>0}function d(e){return"index"===e.type&&n.includes(e.listed_exchange)||"futures"===e.type&&o.includes(e.listed_exchange)}async function u(e){return null}},87520:(e,t,i)=>{"use strict";i.d(t,{StudyTemplates:()=>p});var s=i(44352),r=i(7276),n=i(51768),o=i(26867),a=i.n(o),l=i(40549),c=i.n(l),h=i(3615);const d=(0,i(98351).getLogger)("Platform.StudyTemplates"),u=s.t(null,void 0,i(97065));class p{constructor(e){this._chartWidgetCollection=e.chartWidgetCollection,this._favoriteStudyTemplatesService=e.favoriteStudyTemplatesService,window.loginStateChange.subscribe(null,r.backend.invalidateStudyTemplatesList),this._list=new(c())([]),this._onChange=new(a()),this._list.subscribe((()=>this._onChange.fire()))}findRecordByName(e){return this._list.value().find((t=>t.name===e))||null}showSaveAsDialog(){const e=this._chartWidgetCollection.activeChartWidget.value().model();Promise.all([i.e(8230),i.e(5384),i.e(1428),i.e(1685),i.e(4819),i.e(8619),i.e(346),i.e(5761),i.e(7177),i.e(1140),i.e(4884),i.e(6812),i.e(4147),i.e(962),i.e(3016),i.e(535),i.e(6631)]).then(i.bind(i,50215)).then((t=>{new t.StudyTemplateSaver({controller:e,onSave:e=>{this._list.setValue(e)}}).show()}))}applyTemplate(e){const t=this.findRecordByName(e);null!==t?window.runOrSignIn((()=>{const e=this._chartWidgetCollection.activeChartWidget.value(),i=i=>{(0,n.trackEvent)("GUI","Load Study Template"),e.model().applyStudyTemplate(JSON.parse(i.content),t.name)};void 0!==t.id?t.is_default?r.backend.getStandardStudyTemplateContentById(t.id,i):r.backend.getStudyTemplateContentById(t.id,i):r.backend.getStudyTemplateContent(t.name).then(i)}),{source:"Study templates apply"}):d.logNormal(`Template ${e} not found in cache`)}deleteStudyTemplate(e){const t=this.findRecordByName(e);null!==t?this._removeTemplate(t):d.logNormal(`Template ${e} not found in cache`)}list(){return this._list.value()}getOnChange(){return this._onChange}refreshStudyTemplateList(e){r.backend.getStudyTemplatesList().then((t=>{this._list.setValue(t),void 0!==e&&e()}))}invalidate(){r.backend.invalidateStudyTemplatesList()}_removeTemplate(e){window.runOrSignIn((()=>{(0,h.showConfirm)({text:u.format({name:e.name}),onConfirm:({dialogClose:t})=>new Promise((i=>{const s=()=>{this.refreshStudyTemplateList((()=>{const s=this.list();this._list.setValue(s.filter((t=>t!==e))),this._favoriteStudyTemplatesService&&this._favoriteStudyTemplatesService.remove(e.name),i(),t()}))};r.backend.invalidateStudyTemplatesList(), +void 0!==e.id?r.backend.removeStudyTemplateById(e.id,s):r.backend.removeStudyTemplate(e.name).then(s)}))})}),{source:"Study templates delete"})}}},36309:(e,t,i)=>{"use strict";i.d(t,{canShowSpreadActions:()=>r,globalKeypressMatches:()=>n});var s=i(2484);i(92133),i(82992);new RegExp("^quandl","i");function r(){let e=!1;return s.enabled("show_spread_operators")&&(e=!0),e}function n(e){if(e.ctrlKey)return!1;if(e.metaKey)return!1;if(!e.charCode)return!1;if(!e.which||e.which<=32)return!1;const t=e.target;return!t||!/^(input|textarea)$/i.test(t.tagName)&&"listbox"!==t.getAttribute("role")}},90877:(e,t,i)=>{"use strict";function s(){return Promise.all([i.e(8230),i.e(5384),i.e(1428),i.e(1685),i.e(4819),i.e(8825),i.e(8271),i.e(8707),i.e(3261),i.e(962),i.e(2842),i.e(3016),i.e(3988),i.e(1754)]).then(i.bind(i,89324))}i.d(t,{loadNewSymbolSearch:()=>s})},97070:(e,t,i)=>{"use strict";i.d(t,{tradingService:()=>n});var s=i(16216);const r={id:"TradingService"};function n(){return(0,s.hasService)(r)?(0,s.service)(r):null}},70107:(e,t,i)=>{"use strict";i.d(t,{TradingViewApiBase:()=>S});var s=i(50151),r=i(82992),n=i(2484),o=i(51768),a=i(8840),l=i(45345),c=i(26867),h=i.n(c);class d{constructor(e){this._toolbarThemeChanged=new(h()),this._onWatchedThemeChanged=e=>{this._toolbarThemeChanged.fire(e)},this._opts=e,l.watchedTheme.subscribe(this._onWatchedThemeChanged)}destroy(){l.watchedTheme.unsubscribe(this._onWatchedThemeChanged)}isStdTheme(){const e=this._opts.chartWidgetCollection.getAll().every((e=>(0,a.isStdTheme)((0,a.extractThemeFromModel)(e.model()))));return Promise.resolve(e)}async setStdTheme(e,t=!0,i){await(0,a.loadTheme)(this._opts.chartWidgetCollection,{themeName:e,standardTheme:!0,syncState:t,noUndo:i})}setStdThemeForLayout(e,t=!0){(0,l.setTheme)(e),t&&(0,a.syncTheme)()}getCurrentThemeName(){return(0,a.getCurrentTheme)().name}toolbarThemeChanged(){return this._toolbarThemeChanged}}var u=i(37121),p=i(76076),_=i(40549),m=i.n(_),g=i(7711);const f=new(h());function v(){throw new Error("not implemented")}class S{constructor(e){this._studyTemplatesDrawer=null,this._fontIconsSettingsDrawer=null,this._favoriteDrawingsToolbar=null,this._themesApi=null,this._newsApiDeferredPromise=null,this._newsApiRejectionReason=null,this._watchlistApiDeferredPromise=null,this._watchlistApiRejectionReason=null,this._widgetbarApiDeferredPromise=null,this._widgetbarApiRejectionReason=null,this._isDestroyed=!1,this._widgebarApi=null,this._magnetEnabledWatchedValue=null,this._magnetModeWatchedValue=null;const{chartApiInstance:t,chartWidgetCollection:i,studyMarket:s,financialsDialog:n,saveChartService:o,loadChartService:a,sharingChartService:l=null}=e;this._chartWidgetCollection=i,this._studyMarket=s,this._financialsDialog=n,this._saveChartService=o,this._sharingChartService=l,this._loadChartLayoutDialog=a,this._intervalsService=null,this._alertsWidgetDialog=null,this._detailsDialogController=null,this._supportedChartStylesSpawn=r.linking.supportedChartStyles.spawn(),this._chartWidgetCollection.onAboutToBeDestroyed.subscribe(null,(()=>this.destroy()),!0) +;const c=i.lock;this._symbolSync=c.symbol.spawn(),this._intervalSync=c.interval.spawn(),this._dateRangeSync=c.dateRange.spawn(),this._crosshairSync=c.crosshair.spawn(),this._timeSync=c.trackTime.spawn()}destroy(){var e,t,i;this._supportedChartStylesSpawn.destroy(),null===(e=this._intervalsService)||void 0===e||e.destroy(),null===(t=this._themesApi)||void 0===t||t.destroy(),null===(i=this._widgebarApi)||void 0===i||i.destroy(),this._widgetbarApiRejectionReason="This ITradingViewApi instance has been destroyed",this._symbolSync.destroy(),this._intervalSync.destroy(),this._dateRangeSync.destroy(),this._crosshairSync.destroy(),this._timeSync.destroy(),this._isDestroyed=!0,(0,p.properties)().childs().magnet.unsubscribeAll(this),(0,p.properties)().childs().magnetMode.unsubscribeAll(this)}themes(){return null===this._themesApi&&(this._themesApi=new d({chartWidgetCollection:this._chartWidgetCollection})),this._themesApi}dialogs(){var e,t,i,s,r,n;return{Indicators:this._studyMarket,Financials:this._financialsDialog,Compare:this._chartWidgetCollection.getCompareDialogRenderer(),ObjectsTree:null,ChartProperties:this._chartWidgetCollection.getChartPropertiesDialogRenderer(),ChartLayoutSaveAs:null!==(t=null===(e=this._saveChartService)||void 0===e?void 0:e.getSaveAsController())&&void 0!==t?t:null,ChartLayoutRename:null!==(s=null===(i=this._saveChartService)||void 0===i?void 0:i.getRenameController())&&void 0!==s?s:null,ChartLayoutCreate:null!==(n=null===(r=this._saveChartService)||void 0===r?void 0:r.getCreateController())&&void 0!==n?n:null,ChartLayoutLoad:this._loadChartLayoutDialog,Alerts:this._alertsWidgetDialog,Details:this._detailsDialogController,FinancialsCharts:null,Technicals:null,Forecast:null}}studyTemplatesDrawerApi(){v()}fontIconsSettingsDrawer(){v()}intervalsService(){v()}supportedChartTypes(){return this._supportedChartStylesSpawn}setBrokerName(e){this._chartWidgetCollection.setBroker(e)}drawOnAllChartsMode(e){(0,p.drawOnAllChartsMode)().setValue(e)}disableTrackingEvents(){(0,o.disableTrackingEvents)()}getSaveChartService(){return this._saveChartService}symbolSync(){return this._symbolSync}intervalSync(){return this._intervalSync}dateRangeSync(){return this._dateRangeSync}crosshairSync(){return this._crosshairSync}timeSync(){return this._timeSync}setSymbolSearchUI(e){v()}setLayout(e,t){(null==t?void 0:t.withUndo)?this._chartWidgetCollection.setChartLayoutWithUndo(e):this._chartWidgetCollection.setLayout(e)}selectLineTool(e,t){if(!u.supportedLineTools[e])return;const i=u.supportedLineTools[e].name;if("icon"===e){const e=null==t?void 0:t.icon;void 0!==e&&p.iconTool.setValue(e)}if("emoji"===e){const e=null==t?void 0:t.emoji;void 0!==e&&p.emojiTool.setValue(e)}p.tool.setValue(i)}favoriteDrawingsToolbar(){return i.e(5551).then(i.bind(i,63624)).then((e=>(this._favoriteDrawingsToolbar||(this._favoriteDrawingsToolbar=new e.FavoriteDrawingsApi),this._favoriteDrawingsToolbar)))}sharingChart(){return this._sharingChartService}watchlist(){v()}setWatchlistApiPromise(e){v()}news(){v()}setNewsApiPromise(e){v()}widgetbar(){v()} +setWidgetbarApiPromise(e){v()}getChartStorage(){return getChartStorage()}setDebugMode(e){n.setEnabled("charting_library_debug_mode",e)}setFeatureEnabled(e,t){n.setEnabled(e,t)}magnetEnabled(){return null===this._magnetEnabledWatchedValue&&(this._magnetEnabledWatchedValue=new(m())((0,p.properties)().childs().magnet.value()),this._magnetEnabledWatchedValue.subscribe((e=>{(0,g.saveDefaultProperties)(!0),(0,p.properties)().childs().magnet.setValue(e),(0,g.saveDefaultProperties)(!1)})),(0,p.properties)().childs().magnet.subscribe(this,(()=>{(0,s.ensureNotNull)(this._magnetEnabledWatchedValue).setValue((0,p.properties)().childs().magnet.value())}))),this._magnetEnabledWatchedValue}magnetMode(){return null===this._magnetModeWatchedValue&&(this._magnetModeWatchedValue=new(m())((0,p.properties)().childs().magnetMode.value()),this._magnetModeWatchedValue.subscribe((e=>{(0,g.saveDefaultProperties)(!0),(0,p.properties)().childs().magnetMode.setValue(e),(0,g.saveDefaultProperties)(!1)})),(0,p.properties)().childs().magnetMode.subscribe(this,(()=>{(0,s.ensureNotNull)(this._magnetModeWatchedValue).setValue((0,p.properties)().childs().magnetMode.value())}))),this._magnetModeWatchedValue}flushBufferedData(){f.fire()}}},73809:(e,t,i)=>{"use strict";var s=i(26867),r=i(40549),n=i(82992).linking,o=(i(71668).createDeferredPromise,i(24134)),a=i(57737).layouts,l=i(76422),c=i(60223).ContextMenuManager,h=i(76076),d=i(92133),u=i(7276).backend,p=i(98351),_=i(3615).showWarning,m=i(3615).showConfirm,g=i(37121),f=i(52092).CLOSE_POPUPS_AND_DIALOGS_COMMAND,v=i(578).Interval,S=i(25927).ChartChangesWatcher,y=i(70107).TradingViewApiBase,b=i(58403).StudyMetaInfo,w=i(152).getStudyInputsInfo,P=i(70120).getStudyStylesInfo;e.exports=class extends y{constructor(e){const{chartWidgetCollection:t,saveChartService:i,loadChartService:r,sharingChartService:o,alertsDispatcher:a,supportTicketData:l,favoriteServices:c,chartApiInstance:h=null,studyMarket:d=null,financialsDialog:u=null}=e;super({chartApiInstance:h,chartWidgetCollection:t,studyMarket:d,financialsDialog:u,saveChartService:i,loadChartService:r,sharingChartService:o}),this._chartApiInstance=h,this._loadChartService=r,this._alertsDispatcher=a,this._supportTicketData=l,this._favoriteServices=c,this._proxyWatchListChangedDelegate=null,this._lockDrawingsWatchedValue=null,this._hideDrawingsWatchedValue=null,this._hideIndicatorsWatchedValue=null,this._replayApi=null,this._chartChangesWatcher=null,this._hasChartChangesWatchedValue=null,this._getDataSourceHub=function(){return t.activeChartWidget.value().model().model()},this._chartWidgetCollection.getResizerDetacher=function(){return t.activeChartWidget.value().getResizerDetacher()},this._alertService=this._alertsDispatcher?new undefined(this._alertsDispatcher,this._getDataSourceHub):null,this._activeChangedChangedDelegate=new s,this._chartWidgetCollection.activeChartWidget.subscribe(function(){this._activeChangedChangedDelegate.fire()}.bind(this)),this._chartWidgets=new WeakMap,this._activateChart=function(e){t.activeChartWidget.setValue(e)},this.linking=n} +subscribe(e,t){l.subscribe(e,t)}unsubscribe(e,t){l.unsubscribe(e,t)}onContextMenu(e){l.subscribe("onContextMenu",(function(t){t.callback(e(t.unixtime,t.price))}))}onGrayedObjectClicked(e){l.subscribe("onGrayedObjectClicked",e)}activeChart(){return this._getChartWidgetApi(this._chartWidgetCollection.activeChartWidget.value())}_getChartWidgetApi(e){var t=this._chartWidgets.get(e);return void 0===t&&(t=new o(e,this._activateChart.bind(null,e)),this._chartWidgets.set(e,t)),t}onActiveChartChanged(){return this._activeChangedChangedDelegate}changeSymbol(e,t,i){n.interval.setValue(v.normalize(t)),n.symbol.setValue(e),i&&this.activeChart().onDataLoaded().subscribe(null,i,!0)}layout(){return this._chartWidgetCollection.layout.value()}layoutName(){return this._chartWidgetCollection.metaInfo.name.value()}layoutNameWatchedValue(){return this._chartWidgetCollection.metaInfo.name.readonly()}layoutSettingsDrawer(){throw new Error("not implemented")}chartsCount(){return a[this.layout()].count}viewMode(){throw new Error("not implemented")}viewModeWatchedValue(){throw new Error("not implemented")}setForceFullscreenMode(){throw new Error("not implemented")}setMultichartMode(){throw new Error("not implemented")}setActiveChart(e){throw new Error("not implemented")}chart(e){if(void 0===e&&(e=0),e<0||e>=this.chartsCount())throw Error("Incorrect index: "+e);return this._getChartWidgetApi(this._chartWidgetCollection.getAll()[e])}getSymbolInterval(e){var t={symbol:n.symbol.value(),interval:n.interval.value()};return e&&e(t),t}saveChart(e){if(this._saveChartService){var t=this._saveChartService.saveToJSON();return e&&e(JSON.parse(t.content))}}loadChart(e){this._chartApiInstance.disconnect(),this._chartWidgetCollection.loadContent(e.json),this._chartWidgetCollection.purgeUnusedWidgets(),e.extendedData&&(this._chartWidgetCollection.metaInfo.id.setValue(e.extendedData.uid),this._chartWidgetCollection.metaInfo.uid.setValue(e.extendedData.uid),this._chartWidgetCollection.metaInfo.name.setValue(e.extendedData.name)),this._chartApiInstance.connect(),n.symbol.setValue(this.activeChart().symbol()),l.emit("chart_loaded")}getStudiesList(){return this._chartApiInstance.allStudiesMetadata().filter((function(e){return!e.is_hidden_study})).map((function(e){return e.description}))}getStudyInputs(e){{const t=b.findStudyMetaInfoByDescription(this._chartApiInstance.allStudiesMetadata(),e);return w(t)}}getStudyStyles(e){{const t=b.findStudyMetaInfoByDescription(this._chartApiInstance.allStudiesMetadata(),e);return P(t)}}getSavedCharts(e){u.getCharts().then(e)}loadChartFromServer(e){u.loadChart(e)}saveChartToServer(e,t,i){this._saveChartService&&this._saveChartService.saveChartSilently(e,t,i)}setAutosave(e){this._saveChartService&&this._saveChartService.autoSaveEnabled().setValue(e)}removeChartFromServer(e,t){u.removeChart(e).then(t)}getIntervals(){var e=[],t=d.getCustomResolutions();return null!==this._chartApiInstance&&(e=this._chartApiInstance.defaultResolutions()),d.mergeResolutions(e,t)}closePopupsAndDialogs(){c.hideAll(),l.emit(f)}selectedLineTool(){ +for(var e=Object.keys(g.supportedLineTools),t=h.tool.value(),i=0;i{"use strict";i.d(t,{addPlusButtonProperty:()=>a,restoreAddPlusButtonSettingsValue:()=>l});var s=i(56840),r=i(60923);const n="add_plus_button";function o(){return s.getBool(n,!0)}const a=(0,r.createPrimitiveProperty)(o());function l(){a.setValue(!0),s.remove(n)}s.onSync.subscribe(null,(()=>a.setValue(o()))),a.subscribe(null,(()=>s.setValue(n,a.value())))},10678:(e,t,i)=>{"use strict";i.d(t,{alignToStep:()=>n});var s=i(60521),r=i.n(s);function n(e,t){return r()(e).div(t).round(0,r().roundHalfUp).mul(t).toNumber()}},91109:(e,t,i)=>{"use strict";i.d(t,{AppliedTimeFrame:()=>r});var s=i(90593);class r{constructor(e){this._appliedTimeFrame=new s.WatchedObject(null),this._appliedTimeFrameInfo=null,this._appliedTimeFrameChangedBound=this._appliedTimeFrameChanged.bind(this),this._model=e,e.mainSeries().dataEvents().seriesTimeFrame().subscribe(this,this._onSeriesTimeFrame),this._appliedTimeFrame.subscribe(this._appliedTimeFrameChangedBound)}destroy(){this._appliedTimeFrame.unsubscribe(this._appliedTimeFrameChangedBound),this._model.timeScale().logicalRangeChanged().unsubscribeAll(this),this._model.mainSeries().dataEvents().seriesTimeFrame().unsubscribeAll(this)}appliedTimeFrame(){return this._appliedTimeFrame}_appliedTimeFrameChanged(){this._model.timeScale().logicalRangeChanged().unsubscribe(this,this._invalidateAppliedTimeFrame)}_onSeriesTimeFrame(e,t,i,s){if(s){const e=this._model.timeScale();this._appliedTimeFrameInfo={logicalRange:e.logicalRange(),baseIndex:e.baseIndex()}, +e.logicalRangeChanged().subscribe(this,this._invalidateAppliedTimeFrame)}}_invalidateAppliedTimeFrame(){if(null===this._appliedTimeFrameInfo)return;const e=this._model.timeScale(),t=e.logicalRange(),i=e.baseIndex(),s=this._appliedTimeFrameInfo.logicalRange,r=this._appliedTimeFrameInfo.baseIndex;(null===t||null===s||Math.abs(i-t.left()-(r-s.left()))>=.01||Math.abs(i-t.right()-(r-s.right()))>=.01)&&this._appliedTimeFrame.setValue(null)}}},81345:(e,t,i)=>{"use strict";i.d(t,{defaultsPreferencesByWhiteList:()=>C,preferencesByWhiteList:()=>P});var s=i(65665),r=i(8169);var n=i(98351),o=i(99846),a=i(64548),l=i(22600),c=i(933),h=i(4978);const d=(0,n.getLogger)("Chart.ApplyPreferencesToAllCharts"),u={color:"",style:0},p={autoScale:!1,autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,log:!1,logDisabled:!1,alignLabels:!1,isInverted:!1,indexedTo100:!1},_={backgroundType:h.ColorType.Solid,background:"",backgroundGradientStartColor:"",backgroundGradientEndColor:"",topMargin:0,bottomMargin:0,rightOffset:0,horzGridProperties:(0,c.deepExtend)({},u),vertGridProperties:(0,c.deepExtend)({},u),crossHairProperties:(0,c.deepExtend)({},{color:"",style:0,transparency:0,width:0}),legendProperties:(0,c.deepExtend)({},{showStudyArguments:!1,showStudyTitles:!1,showStudyValues:!1,showSeriesTitle:!1,showSeriesOHLC:!1,showLegend:!1,showBarChange:!0,showVolume:!1,showPriceSource:!1,showBackground:!0,backgroundTransparency:0}),axisProperties:(0,c.deepExtend)({},p),separatorColor:""},m={lineColor:"",textColor:"",fontSize:0,scaleSeriesOnly:!1,showSeriesLastValue:!1,seriesLastValueMode:o.PriceAxisLastValueMode.LastValueAccordingToScale,showSeriesPrevCloseValue:!1,showStudyLastValue:!1,showSymbolLabels:!1,showStudyPlotLabels:!1,showBidAskLabels:!1,showPrePostMarketPriceLabel:!0,showFundamentalLastValue:!1,showFundamentalNameLabel:!1,showPriceScaleCrosshairLabel:!0,showTimeScaleCrosshairLabel:!0},g={...m},f={visible:!1,futureOnly:!1,breaks:(0,c.deepExtend)({},{color:"",visible:!1,style:0,width:0})},v={style:0,minTick:"",showPriceLine:!1,priceLineWidth:0,priceLineColor:"",baseLineColor:"",showPrevClosePriceLine:!1,showCountdown:!0,prevClosePriceLineWidth:0,sessionId:"regular",prevClosePriceLineColor:"",esdShowDividends:!1,esdShowSplits:!1,esdShowEarnings:!1,esdShowBreaks:!1,showContinuousContractSwitches:!1,showContinuousContractSwitchesBreaks:!1,showFuturesContractExpiration:!1,showLastNews:!1,dividendsAdjustment:!1,backAdjustment:!1,settlementAsClose:!0,statusViewStyle:(0,c.deepExtend)({},{fontSize:16,showExchange:!0,showInterval:!0,symbolTextSource:"description"}),priceAxisProperties:(0,c.deepExtend)({},p),highLowAvgPrice:(0,c.deepExtend)({},{highLowPriceLinesVisible:!1,highLowPriceLabelsVisible:!1,averageClosePriceLabelVisible:!1,averageClosePriceLineVisible:!1,highLowPriceLinesColor:"",highLowPriceLinesWidth:0,averagePriceLineColor:"",averagePriceLineWidth:0}),candleStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",drawWick:!1,drawBorder:!1,drawBody:!0,borderColor:"",borderUpColor:"",borderDownColor:"",wickColor:"",wickUpColor:"", +wickDownColor:"",barColorsOnPrevClose:!1}),hollowCandleStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",drawWick:!1,drawBorder:!1,drawBody:!0,borderColor:"",borderUpColor:"",borderDownColor:"",wickColor:"",wickUpColor:"",wickDownColor:""}),barStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",barColorsOnPrevClose:!1,dontDrawOpen:!1,thinBars:!0}),lineStyle:(0,c.deepExtend)({},{color:"",linestyle:0,linewidth:0,styleType:0}),areaStyle:(0,c.deepExtend)({},{color1:"",color2:"",linecolor:"",linestyle:0,linewidth:0,transparency:0}),baselineStyle:(0,c.deepExtend)({},{topFillColor1:"",topFillColor2:"",bottomFillColor1:"",bottomFillColor2:"",topLineColor:"",bottomLineColor:"",baselineColor:"",topLineWidth:0,bottomLineWidth:0,transparency:0,baseLevelPercentage:0}),hiloStyle:(0,c.deepExtend)({},{color:"",showBorders:!1,borderColor:"",showLabels:!1,labelColor:"",drawBody:!0}),haStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",drawWick:!1,drawBorder:!1,drawBody:!0,borderColor:"",borderUpColor:"",borderDownColor:"",wickColor:"",wickUpColor:"",wickDownColor:"",showRealLastPrice:!1,barColorsOnPrevClose:!1,inputs:{}}),renkoStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",borderUpColor:"",borderDownColor:"",upColorProjection:"",downColorProjection:"",borderUpColorProjection:"",borderDownColorProjection:"",wickUpColor:"",wickDownColor:"",inputs:{boxSize:0,style:"",atrLength:0,wicks:!1,sources:"",source:""}}),pbStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",borderUpColor:"",borderDownColor:"",upColorProjection:"",downColorProjection:"",borderUpColorProjection:"",borderDownColorProjection:"",inputs:{source:"",lb:0}}),kagiStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",upColorProjection:"",downColorProjection:"",inputs:{style:"",atrLength:0,reversalAmount:0}}),pnfStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",upColorProjection:"",downColorProjection:"",inputs:{reversalAmount:0,boxSize:0,style:"",atrLength:0}}),rangeStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",upColorProjection:"",downColorProjection:"",thinBars:!1,inputs:{range:0,phantomBars:!1}}),columnStyle:(0,c.deepExtend)({},{upColor:"",downColor:"",barColorsOnPrevClose:!1})},S={priceScaleSelectionStrategyName:"auto",timeScale:(0,c.deepExtend)({},{defaultRightOffset:0,defaultRightOffsetPercentage:5,usePercentageRightOffset:!1}),mainSeries:(0,c.deepExtend)({},v),sessions:(0,c.deepExtend)({},l.sessionsPreferencesDefault),paneProperties:(0,c.deepExtend)({},_),chartEventsSourceProperties:(0,c.deepExtend)({},f),tradingProperties:(0,c.deepExtend)({},r.tradingPreferencesDefault)},y={timezone:"",scalesProperties:(0,c.deepExtend)({},g),...S},b={scalesProperties:(0,c.deepExtend)({},m),...S};function w(e,t,i,r,n=!0){if(void 0===t[e])return d.logDebug(`We haven't had this property ${r}.${e} yet, please, remove it from whiteList`),null;if((0,s.isObject)(i[e])){const s=Object.keys(i[e]);let o="";return s.map((s=>({[s]:w(s,t[e],i[e],`${r}.${e}`,n)}))).reduce(((e,t)=>(o=Object.keys(t)[0],e[o]=t[o],e)),{})}return n?t[e].value():t[e]}function P(e,t,i=y){const s={timezone:"", +priceScaleSelectionStrategyName:"auto",timeScale:{defaultRightOffset:e.timeScale().defaultRightOffset().value(),defaultRightOffsetPercentage:e.timeScale().defaultRightOffsetPercentage().value(),usePercentageRightOffset:e.timeScale().usePercentageRightOffset().value()},mainSeries:{},sessions:{},paneProperties:{},scalesProperties:{},chartEventsSourceProperties:{},tradingProperties:{}},r=["timeScale","mainSeries","sessions"],n=i.mainSeries,o=Object.keys(i),a=Object.keys(n),l=t.properties(),c=e.properties(),h=i.sessions,d=Object.keys(h),u=e.sessions().properties();return a.forEach((e=>{s.mainSeries[e]=w(e,l,n,"mainSeries")})),d.forEach((e=>{s.sessions[e]=w(e,u,h,"sessions")})),o.forEach((e=>{r.includes(e)||(s[e]=w(e,c,i,"preferences"))})),s}function C(e,t,i=b,s=!0){const r={timeScale:{defaultRightOffset:e.timeScale().rightOffsetDefaultValue(),defaultRightOffsetPercentage:e.timeScale().defaultRightOffsetPercentage().value(),usePercentageRightOffset:e.timeScale().usePercentageRightOffset().value()},mainSeries:{},sessions:(0,c.deepExtend)({},l.sessionsPreferencesDefault),paneProperties:{},scalesProperties:{},chartEventsSourceProperties:{},tradingProperties:{},priceScaleSelectionStrategyName:"auto"},n=["timeScale","mainSeries","sessions"],o=i.mainSeries,h=Object.keys(i),d=Object.keys(o),u=(0,a.factoryDefaults)("chartproperties.mainSeriesProperties"),p=(0,a.factoryDefaults)("chartproperties");return d.forEach((e=>{s&&"style"===e||(r.mainSeries[e]=w(e,u,o,"mainSeries",!1))})),h.forEach((e=>{n.includes(e)||(r[e]=w(e,p,i,"preferences",!1))})),r}},5049:(e,t,i)=>{"use strict";i.d(t,{axisLabelBackgroundColor:()=>r});var s=i(7394);const r={common:s.colorsPalette["color-tv-blue-500"],active:s.colorsPalette["color-tv-blue-800"]}},8950:(e,t,i)=>{"use strict";i.d(t,{createDwmAligner:()=>c,isAlignmentEnabled:()=>h,createTimeToBarTimeAligner:()=>d});var s=i(32769),r=i(2484),n=i(578),o=i(46292),a=i(69228);const l=new o.SessionInfo("Etc/UTC","0000-0000:1234567");function c(e,t){if(!h()||!n.Interval.isDWM(e))return null;const i=new o.SessionInfo(t.timezone,t.session,t.session_holidays,t.corrections),r=(0,a.newBarBuilder)(e,i,l);return{timeToSessionStart:e=>r.tradingDayToSessionStart(e),timeToExchangeTradingDay:e=>{const t=s.utc_to_cal(i.timezone,e),r=i.spec.correctTradingDay(t);return s.set_hms(r,0,0,0,0,s.get_timezone("Etc/UTC")),r.getTime()}}}function h(){return!r.enabled("disable_resolution_rebuild")}function d(e,t){if(!h())return e=>e;const i=new o.SessionInfo(t.timezone,t.session,t.session_holidays,t.corrections),s=(0,a.newBarBuilder)(e,i,i,!1);return e=>s.alignTimeIfPossible(e)}},46292:(e,t,i)=>{"use strict";i.d(t,{SessionInfo:()=>o,BarBuilderBase:()=>a});var s=i(32769),r=i(76545),n=i(21169);class o{constructor(e,t,i,s){this.init(e,t,i,s),this._state={timezone:e,spec:t,holidays:i,corrections:s}}init(e,t,i,r){this.timezone=s.get_timezone(e),this.spec=new n.SessionSpec(e,t,i,r)}state(){return this._state}static fromState(e){return new o(e.timezone,e.spec,e.holidays,e.corrections)}}class a{alignTime(e){if(isNaN(e))return NaN +;let t=this.indexOfBar(e);return t===r.SessionStage.POST_SESSION&&(this.moveTo(e),t=this.indexOfBar(e)),t<0?NaN:this.startOfBar(t)}}},69228:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SessionInfo:()=>o.SessionInfo,alignExchangeTimeToSessionStartAndReturnUTC:()=>C,alignPeriodsBackForDataRequest:()=>y,alignPeriodsBackForVisibleRange:()=>b,getPeriodsBetweenDates:()=>P,isTradingNow:()=>T,newBarBuilder:()=>S});var s=i(32769),r=i(578),n=i(91031),o=i(46292),a=i(76545);class l extends o.BarBuilderBase{constructor(e,t){super(),this._sessionStartMs=-Number.MAX_VALUE,this._sessionEndMs=-Number.MAX_VALUE,this._periodSec=e,this._session=t}alignTimeIfPossible(e){const t=this.alignTime(e);return isNaN(t)?e:t}indexOfBar(e){return e=this._sessionEndMs?a.SessionStage.POST_SESSION:(0,n.toInt)(s.time_seconds_diff(e,this._sessionStartMs)/this._periodSec)}startOfBar(e){if(e===a.SessionStage.PRE_SESSION){const e=s.get_cal_from_unix_timestamp_ms(this._session.timezone,this._sessionStartMs-1),t=this._session.spec.alignToNearestSessionEnd(e,-1);return s.cal_to_utc(this._session.timezone,t)}if(e===a.SessionStage.POST_SESSION)return this._sessionEndMs;if(e<0)throw new Error("Negative offset is not supported");return this._sessionStartMs+s.time_seconds(this._periodSec*e)}endOfBar(e){if(e<0)throw new Error("Index cannot be negative");const t=this.startOfBar(e)+1e3*this._periodSec;return t>this._sessionEndMs?this._sessionEndMs:t}isLastBar(e,t){return t>=this._sessionStartMs+s.time_seconds(this._periodSec*(e+1)-1)}moveTo(e){const t=this._session.timezone,i=s.utc_to_cal(t,e),r=this._session.spec.alignToSessionStart(i);this._sessionStartMs=s.cal_to_utc(t,i),s.add_minutes(i,r),this._sessionEndMs=s.cal_to_utc(t,i)}indexOfLastBarInSession(){return(0,n.toInt)((this._sessionEndMs-1-this._sessionStartMs)/1e3/this._periodSec)}moveNext(){this.moveTo(this._sessionEndMs)}}var c=i(19781);function h(e,t){const i=s.clone(t),r=e.businessDaysToCalendarDays(i,1);r>1&&s.add_date(i,r-1);const n=e.leftBorderOfDailyBar(i);if(null===n)throw new Error("Cannot calculate left border of daily bar");return s.cal_to_utc(s.get_timezone(e.timezone()),n)}class d extends o.BarBuilderBase{constructor(e,t,i,s,r=!1){super(),this._periodStart=-Number.MAX_VALUE,this._periodEnd=-Number.MAX_VALUE,this._periodLastBarStart=-Number.MAX_VALUE,this._periodStartDay=new c.BusinessDay(0,0,0),this._periodEndDay=new c.BusinessDay(0,0,0),this._period=i,this._sessionTgt=e,this._builder=s,this._useBusinessDays=r,this._sessionSrc=r?new o.SessionInfo("Etc/UTC","24x7"):t||e}builder(){return this._builder}alignTimeIfPossible(e){return this.tradingDayToSessionStart(e)}tradingDayToSessionStart(e){return this.moveTo(e),this.startOfBar(0)}indexOfBar(e){if(this._useBusinessDays){const t=c.BusinessDay.fromCalendar(s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e));return t.before(this._periodStartDay)?a.SessionStage.PRE_SESSION:this._periodEndDay.before(t)?a.SessionStage.POST_SESSION:0} +return e=this._periodEnd?a.SessionStage.POST_SESSION:0}startOfBar(e){if(e===a.SessionStage.PRE_SESSION){const e=s.get_cal_from_unix_timestamp_ms(this._sessionTgt.timezone,this._periodStart-1),t=this._sessionTgt.spec.alignToNearestSessionEnd(e,-1);return s.cal_to_utc(this._sessionTgt.timezone,t)-1}return e===a.SessionStage.POST_SESSION||e>0?this._periodEnd:e===a.SessionStage.LASTBAR_SESSION?this._periodLastBarStart:this._periodStart}moveTo(e){const t=s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e);this._sessionSrc.spec.correctTradingDay(t);const i=s.get_year(t),r=this._indexOfPeriodInYear(t),n=r+this._period,o=this._sessionTgt.spec,a=this._sessionTgt.timezone,l=this._builder.startOfPeriod(a,r,i);this._periodStart=h(o,l);const d=s.clone(l),u=o.businessDaysToCalendarDays(d,1);u>1&&s.add_date(d,u-1),this._periodStartDay=c.BusinessDay.fromCalendar(d);const p=this._builder.startOfPeriod(a,n,i);this._periodEnd=h(o,p);const _=s.clone(p);for(s.add_date(_,-1);o.isCalWeekEnd(_);)s.add_date(_,-1);this._periodEndDay=c.BusinessDay.fromCalendar(_),s.add_date(p,-1),function(e,t){for(;e.isCalWeekEnd(t);)s.add_date(t,-1)}(this._sessionTgt.spec,p),this._periodLastBarStart=h(o,p),(this._periodLastBarStart=this._periodLastBarStart}currentRange(){return{from:this._periodStartDay,to:this._periodEndDay}}indexOfBarInYear(e){const t=s.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e),i=s.get_year(t),r=this._builder.indexOfPeriod(t),o=this._sessionTgt.timezone;let a=this._builder.startOfPeriod(o,r,i),l=h(this._sessionTgt.spec,a);return a=s.get_cal_from_unix_timestamp_ms(s.get_timezone("Etc/UTC"),l),i=0&&(r-=7),(0,n.toInt)((r+i)/7))}class _{indexOfPeriod(e){return s.get_day_of_year(e)-1}startOfPeriod(e,t,i){const r=s.days_per_year(i);return s.get_cal(s.get_timezone("Etc/UTC"),i,s.JANUARY,1+Math.min(t,r))}}class m extends _{constructor(e){super(),this._sessionsSpec=e}indexOfPeriod(e){return super.indexOfPeriod(e)-function(e,t){const i=p(e,t),r=s.get_cal(s.get_timezone("Etc/UTC"),s.get_year(t),s.JANUARY,1);s.add_date(r,7*i);const n=i*e.weekEndsCount()+e.holidaysFromYearStart(r),o=s.get_day_of_year(t)-s.get_day_of_year(r);return n+o-e.calendarDaysToBusinessDays(r,o)}(this._sessionsSpec,e)} +startOfPeriod(e,t,i){const r=7-this._sessionsSpec.weekEndsCount(),o=Math.max(0,(0,n.toInt)(t/r)-1),a=s.get_cal(s.get_timezone("Etc/UTC"),i,s.JANUARY,1),l=s.get_days_per_year(a);if(s.add_date(a,7*o),(t-=r*o-this._sessionsSpec.holidaysFromYearStart(a))>0){const e=this._sessionsSpec.businessDaysToCalendarDays(a,t);s.add_date(a,e)}let c=s.get_day_of_year(a)-1;return is.get_days_per_year(r)?this.startOfPeriod(e,0,i+1):(s.add_date(r,a),r)}}class v{indexOfPeriod(e){return s.get_month(e)}startOfPeriod(e,t,i){if(t<0){const e=(0,n.toInt)((11-t)/12);i-=e,t+=12*e}else t>s.DECEMBER&&(i++,t=s.JANUARY);return s.get_cal(s.get_timezone("Etc/UTC"),i,t,1)}}function S(e,t,i,s=!1){const n=r.Interval.parse(e),o=n.multiplier();return n.isMinutes()?new l(60*o,t):n.isSeconds()?new l(o,t):n.isTicks()?new l(1,t):n.isRange()?new l(60*o,t):new d(t,i,o,function(e,t){switch(e){case r.ResolutionKind.Days:return new g(t);case r.ResolutionKind.Weeks:return new f(t);case r.ResolutionKind.Months:return new v}throw new Error(`Unknown dwm resolution: ${e}`)}(n.kind(),t),s)}function y(e,t,i,s,r,n,o){return w(e,t,i,s,r,n,o,0)}function b(e,t,i,s,r,n,o){return w(e,t,i,s,r,n,o,1)}function w(e,t,i,s,n,a,l,c){const h=r.Interval.parse(n+s);if(h.isMonths()){const e=new Date(l);return 0===c&&e.setUTCDate(1),function(e,t){x(e,Math.floor(t/12));let i=e.getUTCMonth()-t%12;i<0&&(x(e,1),i+=12);e.setUTCMonth(i);for(;e.getUTCMonth()!==i;)I(e,1)}(e,a*h.multiplier()),e.getTime()}const d=new o.SessionInfo("Etc/UTC",e,t,i),u=h.inMilliseconds(),p=h.isDWM();let _;_=p?864e5:60*d.spec.maxTradingDayLength()*1e3;let m=0;m=h.isWeeks()?7:7-d.spec.weekEndsCount();const g=_/u,f=m*g;let v;if(a=g&&(f=_/6048e5*g),Math.ceil(f)}function C(e,t){const i=s.clone(t);return e.alignToSessionStart(i),s.cal_to_utc(s.get_timezone(e.timezone()),i)}function T(e,t){const i=s.utc_to_cal(t.timezone,+e);let r=s.get_day_of_week(i),n=s.get_minutes_from_midnight(i);const o=t.spec.findSession(t.spec.getWeekIndex(i),r,n).getEntry();return o.isOvernight()&&n>o.startOffset()+o.length()&&r===o.dayOfWeek()-1&&(r++,n-=1440),r===o.dayOfWeek()&&n>=o.startOffset()&&n{"use strict";i.d(t,{BusinessDay:()=>r});var s=i(32769);class r{constructor(e,t,i){this.year=e,this.month=t,this.day=i}toString(){return`${this.year}-${this.month}-${this.day}`}compareTo(e){return this.year>e.year||this.year===e.year&&this.month>e.month||this.year===e.year&&this.month===e.month&&this.day>e.day?1:this.year===e.year&&this.month===e.month&&this.day===e.day?0:-1}before(e){return-1===this.compareTo(e)}toCalendar(e){return s.get_cal(s.get_timezone("Etc/UTC"),this.year,this.month-1,this.day)}addDays(e){const t=this.toCalendar(s.get_timezone("Etc/UTC"));return s.add_date(t,e),r.fromCalendar(t)}static fromCalendar(e){return new r(s.get_year(e),s.get_month(e)+1,s.get_day_of_month(e))}}},76545:(e,t,i)=>{"use strict";var s;i.d(t,{SessionStage:()=>s}),function(e){e[e.PRE_SESSION=-1]="PRE_SESSION",e[e.POST_SESSION=-2]="POST_SESSION",e[e.LASTBAR_SESSION=-3]="LASTBAR_SESSION"}(s||(s={}))},87770:(e,t,i)=>{"use strict";i.d(t,{extrapolateBarsFrontToTime:()=>r,extrapolateBarsFrontByCount:()=>n});var s=i(76545);function r(e,t,i,s,n=!1){if(t>i){const o=r(e,i,t,s,n);return o.count=-o.count,o}return o(e,t,1,((e,t)=>t>i||0!==s&&e>s),n)}function n(e,t,i,s=!1){const r=i<0?-1:1;return o(e,t,r,((e,t)=>e>=i*r),s)}function o(e,t,i,r,n){let o=0,a=t;e.moveTo(a);let l=0,c=Number.MAX_VALUE,h=!1,d=t;const u=[];for(;!r(o,a);){if(l>15)throw new Error("Internal error 0x10 while extrapolating.");const r=e.indexOfBar(a);if(r===s.SessionStage.PRE_SESSION&&1===i)a=e.startOfBar(0),e.moveTo(a);else if(r===s.SessionStage.PRE_SESSION&&-1===i)a=e.startOfBar(s.SessionStage.PRE_SESSION),e.moveTo(a);else if(r===s.SessionStage.POST_SESSION&&1===i)a=e.startOfBar(s.SessionStage.POST_SESSION),e.moveTo(a);else{if(r===s.SessionStage.POST_SESSION&&-1===i)throw new Error("Internal error 0x12 while extrapolating.");{const p=e.startOfBar(r);if(p>t&&i>0||t>p&&i<0){if(h&&c===p)throw new Error("Internal error 0x11 while extrapolating.");h=!0,c=p,l=0,o++,d=p,n&&u.push(d)}if(0===r&&-1===i)a=p-1;else{a=e.startOfBar(r+i);const t=e.startOfBar(s.SessionStage.POST_SESSION);a>t&&(e.moveTo(t),a=e.startOfBar(0))}}}l++}return{time:d,times:u,count:o}}},5471:(e,t,i)=>{"use strict";i.d(t,{PrePostMarketBarIdentifier:()=>n});var s=i(32769);function r(e,t){return null!==t&&t.to>e&&e>=t.from}class n{constructor(e,t,i){this._timezone=e,this._preMarketSessionSpec=t,this._postMarketSessionSpec=i} +getPreAndPostMarketTimes(e){if(0===e.length)return{preMarket:[],postMarket:[]};const t=[],i=[];let r=null,n=null,o=e[0],a=(0,s.utc_to_cal)(this._timezone,o);this._isInPreMarketSession(a)&&(n=o),this._isInPostMarketSession(a)&&(r=o);for(let l=1;l{"use strict";i.d(t,{SessionSpec:()=>v});var s=i(32769),r=i(93975),n=i(19781);function o(e,t){return e.compareTo(t)}class a{constructor(e,t,i){this._dayOfWeek=e,this._start=t,this._length=i}start(){return this._start+s.minutesPerDay*this.sessionStartDaysOffset()}startOffset(){return this._start}sessionStartDaysOffset(){return this._start>=0?0:this._start%s.minutesPerDay==0?-Math.ceil(this._start/s.minutesPerDay):-Math.floor(this._start/s.minutesPerDay)}sessionEndDaysOffset(){const e=this._start+this._length;return e>=0?0:e%s.minutesPerDay==0?-Math.ceil(e/s.minutesPerDay):-Math.floor(e/s.minutesPerDay)}isOvernight(){return this._start<0}dayOfWeek(){return this._dayOfWeek}sessionStartDayOfWeek(){let e=this._dayOfWeek-this.sessionStartDaysOffset();return es.SATURDAY&&(e=1),e}length(){return this._length}weight(){return this._dayOfWeek*s.minutesPerDay+this._start}compareTo(e){const t=this.weight(),i=t+this._length,s=e.weight(),r=s+e._length;return t<=s&&ss?1:-1}contains(e){const t=60*s.get_hours(e)+s.get_minutes(e);let i=s.get_day_of_week(e)-this._dayOfWeek;i>0&&(i-=7);const r=i*s.minutesPerDay+t;return r>=this._start&&r=48&&e<=57}class _{constructor(){this.entries=[],this.firstDayOfWeek=s.MONDAY,this.weekEndsCount=-1,this.maxTradingDayLength=0}parseSessions(e,t){var i;let s=!1;this._clear(),this.timezone=e;const{hasErrors:r,spec:n}=this._parseFirstDayOfWeek(t);if("24x7"===n.toLowerCase())for(const e of d)this.entries.push(_._createSessionEntry(e,0,0,0,0));else{let e=!1;const t=new Map;for(const i of n.split("|")){const r=i.split(":");if(1!==r.length&&2!==r.length){s=!0, +u.logError(`Bad session section: ${i}`);continue}const n=1===r.length;if(n){if(e){s=!0,u.logError(`Duplicated default section: ${i}`);continue}e=!0}const o=n?h:_._parseWorkingDays(r[1]);for(const e of o)n&&t.has(e)||t.set(e,r[0])}for(const e of d){const i=t.get(e);if(void 0!==i)for(const t of i.split(",")){const{hasErrors:i,sessionEntry:r}=_._parseSessionEntry(e,t);i&&(s=i),this.entries.push(r)}}}this.entries.sort(o);const a=new Map;for(const e of this.entries){const t=e.dayOfWeek();a.set(t,e.length()+(null!==(i=a.get(t))&&void 0!==i?i:0))}return this.maxTradingDayLength=0,a.forEach((e=>{this.maxTradingDayLength=Math.max(this.maxTradingDayLength,e)})),this.weekEndsCount=7-a.size,s||r}static parseHolidaysAndCorrections(e,t,i){const r=new Map,n=new Map,o=e=>{const t=this._parseDay(e),i=t.toString(),s=n.get(i);return void 0!==s?s:(n.set(i,t),t)};if(""!==t){const e=[];for(const i of t.split(",")){if(8!==i.length)throw new Error(`bad holiday date: ${i}`);const t=o(i);r.set(t,e)}}if(""===i)return r;const l=s.get_timezone("Etc/UTC");for(const e of i.split(";")){const t=e.split(":");if(2!==t.length)throw new Error(`bad correction section: ${e}`);const i=[];if("dayoff"!==t[0])for(const e of t[0].split(","))i.push(this._parseSessionEntry(1,e).sessionEntry);for(const e of t[1].split(",")){if(8!==e.length)throw new Error(`bad correction date: ${e}`);const t=o(e),n=s.get_day_of_week(s.get_cal(l,t.year,t.month-1,t.day)),c=[];for(const e of i)c.push(new a(n,e.startOffset(),e.length()));r.set(t,c)}}return r}_clear(){this.entries=[],this.timezone="",this.firstDayOfWeek=s.MONDAY,this.weekEndsCount=-1}_parseFirstDayOfWeek(e){const t=e.split(";");if(t.length>2)return u.logError(`Only one \`first day\` specification expected @ session ${e}`),{hasErrors:!0,spec:e};if(1===t.length)return{hasErrors:!1,spec:e};let i=1;let r=t[0].indexOf("-")>=0?NaN:parseInt(t[0]);return isNaN(r)&&(i=0,r=parseInt(t[1])),rs.SATURDAY?(u.logError(`Unexpected day index @ session: ${e}; day index ${r}`),{hasErrors:!0,spec:e}):(this.firstDayOfWeek=r,{hasErrors:!1,spec:t[i]})}static _parseDay(e){const t=parseInt(e.substring(0,4)),i=parseInt(e.substring(4,6)),s=parseInt(e.substring(6,8));return new n.BusinessDay(t,i,s)}static _parseSessionEntry(e,t){let i=!1,s=t.split("-");2!==s.length&&(i=!0,u.logError(`Bad sessions entry: ${t}`),s=["0000","0000"]);let r=0,n=s[0];if(n.includes("F")){const e=n.split("F");n=e[0],r=""!==e[1]?parseInt(e[1]):1}let o=0,a=s[1];if(a.includes("F")){const e=a.split("F");a=e[0],o=""!==e[1]?parseInt(e[1]):1}if(!this._isCorrectSession(n)||!this._isCorrectSession(a))throw new Error(`Incorrect entry syntax: ${t}`);const l=n,c=a;return{hasErrors:i,sessionEntry:this._createSessionEntry(e,_._minutesFromHHMM(l),_._minutesFromHHMM(c),r,o)}}static _isCorrectSession(e){return 4===e.length&&p(e.charCodeAt(0))&&p(e.charCodeAt(1))&&p(e.charCodeAt(2))&&p(e.charCodeAt(3))}static _parseWorkingDays(e){const t=[];for(let i=0;i0&&(t-=r*s.minutesPerDay),n>0&&(i-=n*s.minutesPerDay);return new a(e,t,i-t)}}function m(e,t){return e.compareTo(t)<0}function g(e,t){const i=(0,r.lowerbound)(e,t,((e,t)=>-1===e.day.compareTo(t)));return i===e.length?null:e[i]}const f=621672192e5;class v{constructor(e="Etc/UTC",t="0000-0000",i="",r=""){this._entries=[],this._firstDayOfWeek=s.MONDAY,this._entriesHash=new Map,this._holidayAndCorrectionMap=new Map,this._holidaySessions=[];const n=new _;n.parseSessions(e,t),this._entries=n.entries,this._timezone=n.timezone,this._spec=t,this._firstDayOfWeek=n.firstDayOfWeek,this._weekEndsCount=n.weekEndsCount,this._maxTradingDayLength=n.maxTradingDayLength;const o=_.parseHolidaysAndCorrections(e,i,r),a=s.get_timezone(e);this._isThereCorrections=""!==i||""!==r,o.forEach(((e,t)=>{this._holidayAndCorrectionMap.set(t.toString(),e),this._holidaySessions.push({day:t,sessions:e});const i=this.getWeekIndex(t.toCalendar(a));this._entriesHash.set(i,null)})),this._holidaySessions.sort(((e,t)=>e.day.compareTo(t.day)))}entries(){return this._entries}timezone(){return this._timezone}spec(){return this._spec}firstDayOfWeek(){return this._firstDayOfWeek}addSessionEntry(e,t,i,r,n){0===i&&(i=s.minutesPerDay),r===n&&i<=t&&(r+=1),r>0&&(t-=r*s.minutesPerDay),n>0&&(i-=n*s.minutesPerDay);const o=i-t;this._entries.push(new a(e,t,o))}longestSessionLength(){let e=0,t=0;for(const t of this._holidaySessions)t.sessions.forEach((t=>{e=Math.max(e,t.length())}));return this._entries.forEach((e=>{t=Math.max(t,e.length())})),Math.max(e,t)}isWeekEnd(e){const t=(0,r.lowerbound)(this._entries,new a(e,0,0),((e,t)=>e.dayOfWeek()this._entries.length-1||this._entries[t].dayOfWeek()!==e}isCalWeekEnd(e){const t=s.get_day_of_week(e);if(!this._isThereCorrections)return this.isWeekEnd(t);const i=n.BusinessDay.fromCalendar(e),r=this._holidayAndCorrectionMap.get(i.toString());return void 0===r?this.isWeekEnd(t):0===r.length}hasWeekEnds(){return this.weekEndsCount()>0}weekEndsCount(){return this._weekEndsCount}maxTradingDayLength(){return this._maxTradingDayLength}holidaysFromYearStart(e){if(!this._isThereCorrections)return 0;const t=s.get_timezone(this._timezone),i=new n.BusinessDay(s.get_year(e),s.JANUARY,1),r=n.BusinessDay.fromCalendar(e);let o=0;const a=this._selectHolidays(i,r);for(let e=0;et.start()%e==0&&t.length()%e==0))}indexOfSession(e,t,i){const n=this._getEntriesForWeek(e);let o=(0,r.lowerbound)(n,new a(t,i,0),m);if(o!==n.length)return new l(e,o,n);let c=e;const h=7-t+this._firstDayOfWeek-1;for(i=-(s.minutesPerDay-i+h*s.minutesPerDay);;){c++;const e=this._getEntriesForWeek(c);if(0!==e.length)return o=(0,r.lowerbound)(e,new a(this._firstDayOfWeek,i,0),m),new l(c,o,e)}}findSession(e,t,i,s=0){ +const r=this.indexOfSession(e,t,i),n=r.entries;let o=r.entryIndex;if(0!==s){const e=n[o].dayOfWeek(),t=s>0?1:-1;for(;;){const i=o+t;if(i<0||i>=n.length||n[i].dayOfWeek()!==e)break;o=i}}return new l(r.weekIndex,o,n)}getWeekIndex(e){if(!this._isThereCorrections)return 0;const t=s.get_day_of_week(e)-s.SUNDAY,i=s.get_timezone("Etc/UTC"),r=s.get_cal(i,s.get_year(e),s.get_month(e),s.get_day_of_month(e)-t);return Math.floor((r.getTime()+f)/1e3/86400/7)}correctTradingDay(e){const t=s.get_day_of_week(e),i=60*s.get_hours(e)+s.get_minutes(e),r=this.getWeekIndex(e),n=this.findSession(r,t,i,0),o=n.getEntry().dayOfWeek()-t+7*(n.weekIndex-r);return 0!==o&&s.add_date(e,o),e}alignToSessionStart(e,t=0){const i=s.get_day_of_week(e),r=60*s.get_hours(e)+s.get_minutes(e),n=this.getWeekIndex(e),o=this.findSession(n,i,r,t),a=o.getEntry(),l=a.dayOfWeek()-i+7*(o.weekIndex-n);0!==l&&s.add_date(e,l);const c=a.startOffset();return s.set_hms(e,c/60,c%60,0,0,s.get_timezone(this._timezone)),a.length()}businessDaysToCalendarDays(e,t){let i=this.getWeekIndex(e),r=s.get_day_of_week(e),n=0,o=0;for(;oi);)e[a].dayOfWeek()=t)return n}i++,r=s.SUNDAY}return n}calendarDaysToBusinessDays(e,t){let i=this.getWeekIndex(e),r=s.get_day_of_week(e),n=0,o=0;for(;ni);)e[a].dayOfWeek()=t)return o}i++,r=s.SUNDAY}return o}alignToNearestSessionStart(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionStart.bind(this))}alignToNearestSessionEnd(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionEnd.bind(this))}leftBorderOfDailyBar(e){const t=this._getEntriesForDay(e);return 0===t.length?null:(t.sort(o),this._getLeftEntryBorder(e,t[0]))}bordersOfDailyBar(e){const t=this._getEntriesForDay(e);if(0===t.length)return null;t.sort(o);const i=this._getLeftEntryBorder(e,t[0]),r=t[t.length-1],n=s.clone(e);let a=60*(r.startOffset()+r.length())-1;const l=Math.floor(a/3600);return a-=3600*l,s.set_hms(n,l,a/60,a%60,0,s.get_timezone(this._timezone)),{from:i,to:n}}getEntriesForWeekByCalendar(e){const t=this.getWeekIndex(e);return this._getEntriesForWeek(t)}_getEntriesForWeek(e){let t=this._entriesHash.get(e);if(void 0===t)return this._entries;if(null!==t)return t;const i=s.get_timezone(this._timezone);t=this._entries.slice();const r=this._weekIndexToCalendar(e),a=this._weekIndexToCalendar(e+1),l=n.BusinessDay.fromCalendar(r),c=n.BusinessDay.fromCalendar(a),h=this._selectHolidays(l,c);for(const e of h){const r=e.day.toCalendar(i),n=s.get_day_of_week(r);t=t.filter((e=>e.dayOfWeek()!==n)),t=t.concat(e.sessions)}return t.sort(o),this._entriesHash.set(e,t),t}_selectHolidays(e,t){const i=[];let s=e;for(;;){const e=g(this._holidaySessions,s);if(null===e)return i;if(!e.day.before(t))return i;i.push(e),s=e.day.addDays(1)}}_weekIndexToCalendar(e){ +const t=1e3*(86400*e*7+86400)-f,i=s.get_cal_from_unix_timestamp_ms(s.get_timezone("Etc/UTC"),t),r=s.get_timezone("Etc/UTC");return s.get_cal(r,s.get_year(i),s.get_month(i),s.get_day_of_month(i))}_alignToNearestSessionValue(e,t,i){const r=s.get_day_of_week(e),n=60*s.get_hours(e)+s.get_minutes(e),o=this.getWeekIndex(e);let a=this.findSession(o,r,n);if(a.getEntry().contains(e)&&o===a.weekIndex||1===t)return i(a,s.clone(e),t);const c=a.getEntry(),h=c.contains(e),d=o===a.weekIndex,u=c.sessionStartDaysOffset()-c.dayOfWeek()>=0;if(h&&(d||u))return i(a,s.clone(e),t);let p=a.entryIndex-1;if(p<0){let e=a.weekIndex,t=a.entries;for(;p<0;)e--,t=this._getEntriesForWeek(e),p+=t.length;a=new l(e,p,t)}else a=new l(a.weekIndex,p,a.entries);return i(a,s.clone(e),t)}_entrySessionStart(e,t,i){return this._entrySessionValue(e,t,i,(e=>60*e.start()))}_entrySessionEnd(e,t,i){return this._entrySessionValue(e,t,i,(e=>60*(e.start()+e.length())-1))}_entrySessionValue(e,t,i,r){let n=s.get_day_of_week(t);const o=e.getEntry();let a=o.dayOfWeek()-o.sessionStartDaysOffset();const l=this.getWeekIndex(t);let c=e.weekIndex-l,h=!1;if(a0&&i>=0||c<0&&i<0)&&s.add_date(t,7*c),!o.contains(t)){let e=a-n;h&&i<0&&(e=-(7-a+n)),s.add_date(t,e),n=s.get_day_of_week(t)}o.isOvernight()&&n===o.dayOfWeek()&&s.add_date(t,-o.sessionStartDaysOffset());let d=r(o);const u=Math.floor(d/3600);return d-=3600*u,s.set_hms(t,u,d/60,d%60,0,s.get_timezone(this._timezone)),t}_getEntriesForDay(e){const t=s.get_day_of_week(e);return this._getEntriesForWeek(this.getWeekIndex(e)).filter((e=>e.dayOfWeek()===t))}_getLeftEntryBorder(e,t){const i=s.clone(e),r=t.startOffset();return s.set_hms(i,r/60,r%60,0,0,s.get_timezone(this._timezone)),i}}},98799:(e,t,i)=>{"use strict";i.d(t,{barFunctionByStyle:()=>r});var s=i(22770);function r(e,t){switch(e){case 12:return(0,s.barFunction)("low","low","close");case 2:case 3:case 10:case 13:return(0,s.barFunction)(null!=t?t:"close");default:return(0,s.barFunction)("close","open")}}},27642:(e,t,i)=>{"use strict";i.d(t,{BarsMarksContainer:()=>m});var s=i(50151),r=i(98351),n=i(56840),o=i.n(n),a=i(2484),l=i(578),c=i(65665),h=i(1930),d=i(80230),u=i(97425);const p=(0,r.getLogger)("Chart.BarsMarksContainer"),_=Math.round(new Date(2037,0,1).getTime()/1e3);class m extends d.DataSource{constructor(e,t,i){const r=e.onWidget();let n;n=r?!e.hideIdeas():!!a.enabled("bars_marks")&&o().getBool("BarsMarksContainer.visibile",!1),t.merge({visible:n}),t.childs().visible.subscribe(null,(t=>{r||e.isSnapshot()||!a.enabled("bars_marks")||o().setValue("BarsMarksContainer.visibile",!!t.value())})),super(i),this._paneViews=[],this._model=e,this._properties=t,this._requests=[],this._marks={},this._loadedRange=null,this._getDataTimeout=null,this._collectedRange=null,this._lastRange=null;const l=this._model.mainSeries();l.onSymbolIntervalChanged().subscribe(this,this.clearMarks),l.dataEvents().symbolResolved().subscribe(this,this.clearMarks),l.dataEvents().completed().subscribe(this,(()=>{var e,t;const i=l.data();if(0===i.size())return;const r=(0, +s.ensureNotNull)(i.first()).index,n=(0,s.ensureNotNull)(i.last()).index,o=this.timeScale();this.getData({start:null!==(e=o.indexToTimePoint(r))&&void 0!==e?e:1/0,end:null!==(t=o.indexToTimePoint(n))&&void 0!==t?t:-1/0})})),this._initialize(),this._pinnedTooltips={}}destroy(){const e=this._model.mainSeries();e.onSymbolIntervalChanged().unsubscribeAll(this),e.dataEvents().symbolResolved().unsubscribeAll(this),e.dataEvents().completed().unsubscribeAll(this)}properties(){return this._properties}marks(){return this._marks}pinTooltip(e,t){this._pinnedTooltips[e]=t}timeScale(){return this._model.timeScale()}getIntervalInTicks(){const e=this._model.mainSeries().properties().childs().interval.value(),t=l.Interval.parse(e);if(!t.isValid())throw new TypeError("Unexpected interval");return t.isRange()?60:t.inMilliseconds()/1e3}getVisibleTickMarksRange(){var e,t;if(this.timeScale().isEmpty())return{start:0,end:0};const i=(0,s.ensureNotNull)(this.timeScale().visibleBarsStrictRange()),{firstIndex:r,lastIndex:n}=(0,s.ensureNotNull)(this.timeScale().points().range().value());if(!(i.lastBar()>r&&i.firstBar(){var r,n;const o=this._marks[s],a=o.tickmark;a>=(null!==(r=t.start)&&void 0!==r?r:1/0)&&a<=(null!==(n=t.end)&&void 0!==n?n:-1/0)+i&&e.push(o)})),e}getPublishedPlates(){const e={};return window.is_authenticated?(this.getVisibleRangePlates().forEach((t=>{t.is_public&&(this._pinnedTooltips[t.id]||t.user__id===window.user.id)&&(e[t.id]=t)})),e):e}filterDisplayedPlates(e){const t=e.reduce(((e,t)=>{const i=this._getIndex(t.tickmark);return null!==i&&(e[i]=e[i]||[],e[i].push(t)),e}),{});return Object.keys(t).reduce(((e,i)=>{let s=t[i];return s=s.sort(((e,t)=>t.views_count-e.views_count)),s=s.slice(0,10),e.concat(s)}),[])}getPlatesViewData(){var e,t,i;const r=this._model.mainSeries();if(r.data().isEmpty())return[];const n=(0,h.isPriceSourceStyle)(r.style())?r.barFunction():null,o=this.filterDisplayedPlates(this.getVisibleRangePlates()),a={},l=null!==(e=this._model.lastHittestData())&&void 0!==e?e:this._model.lastSelectedHittestData();let c=null;null!==l&&this._model.hoveredSource()===this&&(c=null!==(t=l.activeItem)&&void 0!==t?t:null);const d=[];for(const e of o){const t=(0,s.ensureNotNull)(this._getIndex(e.tickmark)),i=this._getBar(t);if(null===i)continue;const r=this._layout(e.direction),o=this._theme(e.direction),l=c===e.id,h=this.timeScale().indexToCoordinate(t),u=this._offset(r,i,n),p=(0,s.ensureNotNull)(this.priceScale()).isInverted();let _=0;t in a||(a[t]={up:0,down:0}),_=a[t][r]++,d.push({id:e.id,x:h,y:u,yInverted:p,order:_,direction:r,theme:o,hovered:l,pinned:!0===this._pinnedTooltips[e.id],user__id:e.user__id,label:e.label, +labelFontColor:e.labelFontColor||"#444",minSize:e.minSize||5,...this._plateViewData(e)})}const u=d.filter((e=>!0===e.hovered));for(let e=0;ee.hovered&&!t.hovered?1:0)),d}priceAxisViews(){return null}updateAllViews(e){for(const t of this._paneViews)t.update(e)}updateAllViewsAndRepaint(){this.updateAllViews((0,u.sourceChangeEvent)(this.id())),this._model.updateSource(this)}roundRange(e){return{start:Math.round(e.start),end:Math.round(e.end)}}refreshData(){null!==this._lastRange&&this.getData(this._lastRange)}getData(e){(0,c.isNumber)(e.start)&&(0,c.isNumber)(e.end)?(this._lastRange=e,e.end=_,this._pushGetDataStack(Object.assign({},e))):p.logError("Wrong range")}clearMarks(){this._abortAllRequests(),this._marks={},this._loadedRange=null}isUserDeletable(){return!1}isSavedInChart(e){return!1}isSpeciallyZOrderedSource(){return!0}showInObjectTree(){return!1}_plateViewData(e){return{}}_layout(e){switch(e){default:case 0:case 2:case 3:case 4:case 5:case 6:return"up";case 1:return"down"}}_theme(e){switch(e){default:case 0:return"neutral";case 1:case 5:return"green";case 2:case 6:return"red";case 3:return"yellow";case 4:return"blue"}}_offset(e,t,i){let r;switch(e){default:case"up":r=null===i?t[2]:i(t);break;case"down":r=null===i?t[3]:i(t)}return(0,s.ensureNotNull)(this.priceScale()).priceToCoordinate(r,(0,s.ensureNotNull)((0,s.ensureNotNull)(this.ownerSource()).firstValue()))}_getIndex(e){return this.timeScale().timePointToIndex(e)}_getBar(e){return this._model.mainSeries().data().valueAt(e)}_rangeDifference(e){return e=Object.assign({start:1/0,end:-1/0},e),this._loadedRange&&(e.startthis._loadedRange.end&&(e.start=this._loadedRange.end)),e}_rangeUnion(e,t){return e=Object.assign({start:1/0,end:-1/0},e),t&&(e.start=Math.min(t.start,e.start),e.end=Math.max(t.end,e.end)),e}_pushGetDataStack(e){(0,c.isNumber)(e.start)&&(0,c.isNumber)(e.end)?(this._getDataTimeout&&clearTimeout(this._getDataTimeout),this._collectedRange=this._rangeUnion(e,this._collectedRange),this._getDataTimeout=setTimeout((()=>{this._getData(this._collectedRange),this._getDataTimeout=this._collectedRange=null}),300)):p.logError("Wrong tickmark range")}_abortAllRequests(){this._requests.forEach((e=>{e.cancel()})),this._requests=[],this._getDataTimeout&&clearTimeout(this._getDataTimeout),this._getDataTimeout=this._collectedRange=null}}},2250:(e,t,i)=>{"use strict";var s=i(33639).PlotRowSearchMode,r=i(83421).STUDYPLOTDISPLAYTARGET,n=i(38031).rgbaFromInteger;function o(){this.backColorers=[]}function a(e){o.call(this),this._series=e}function l(e,t){o.call(this),this._study=e,this._plotIndex=t}o.prototype.barStyle=function(e,t,i){for(var s={},r=this.backColorers.length-1;r>=0;r--)this.backColorers[r].applyBarStyle(e,t,s,i);return this.applyBarStyle(e,t,s,i),s},o.prototype.pushBackBarColorer=function(e){this.backColorers.push(e)},o.prototype.applyBarStyle=function(e,t,i){ +throw new Error("This function is supposed to be reimplemented in a subclass")},inherit(a,o),a.upColor=function(e,t){switch(e.style.value()){case TradingView.Series.STYLE_LINE:return e.lineStyle.color.value();case TradingView.Series.STYLE_AREA:return e.areaStyle.linecolor.value();case TradingView.Series.STYLE_BARS:return e.barStyle.upColor.value();case TradingView.Series.STYLE_CANDLES:return e.candleStyle.upColor.value();case TradingView.Series.STYLE_HOLLOW_CANDLES:return e.hollowCandleStyle.upColor.value();case TradingView.Series.STYLE_HEIKEN_ASHI:return e.haStyle.upColor.value();case TradingView.Series.STYLE_BASELINE:return e.baselineStyle.topLineColor.value();case TradingView.Series.STYLE_HILO:return e.hiloStyle.color.value();case TradingView.Series.STYLE_COLUMNS:return e.columnStyle.upColor.value()}throw new Error("Unknown series style")},a.downColor=function(e,t){switch(e.style.value()){case TradingView.Series.STYLE_LINE:return e.lineStyle.color.value();case TradingView.Series.STYLE_AREA:return e.areaStyle.linecolor.value();case TradingView.Series.STYLE_BARS:return e.barStyle.downColor.value();case TradingView.Series.STYLE_CANDLES:return e.candleStyle.downColor.value();case TradingView.Series.STYLE_HOLLOW_CANDLES:return e.hollowCandleStyle.downColor.value();case TradingView.Series.STYLE_HEIKEN_ASHI:return e.haStyle.downColor.value();case TradingView.Series.STYLE_BASELINE:return e.baselineStyle.bottomLineColor.value();case TradingView.Series.STYLE_HILO:return e.hiloStyle.color.value();case TradingView.Series.STYLE_COLUMNS:return e.columnStyle.downColor.value()}throw new Error("Unknown series style")},a.prototype._applyLineStyle=function(e,t,i,s,r){i.barColor=a.upColor(r)},a.prototype._applyAreaStyle=function(e,t,i,s,r){i.barColor=a.upColor(r)},a.prototype._applyBarStyle=function(e,t,i,s,r){var n=a.upColor(r),o=a.downColor(r),l=this.findBar(e,!1,s);if(r.barStyle.barColorsOnPrevClose.value()){var c=this.findPrevBar(e,!1,s);i.barColor=c[TradingView.CLOSE_PLOT]<=l[TradingView.CLOSE_PLOT]?n:o,i.barBorderColor=c[TradingView.CLOSE_PLOT]<=l[TradingView.CLOSE_PLOT]?n:o}else i.barColor=l[TradingView.OPEN_PLOT]<=l[TradingView.CLOSE_PLOT]?n:o,i.barBorderColor=l[TradingView.OPEN_PLOT]<=l[TradingView.CLOSE_PLOT]?n:o},a.prototype._applyCandleStyle=function(e,t,i,s,r){var n,o=a.upColor(r,t),l=a.downColor(r,t),c=r.candleStyle.borderUpColor?r.candleStyle.borderUpColor.value():r.candleStyle.borderColor.value(),h=r.candleStyle.borderDownColor?r.candleStyle.borderDownColor.value():r.candleStyle.borderColor.value(),d=r.candleStyle.wickUpColor?r.candleStyle.wickUpColor.value():r.candleStyle.wickColor.value(),u=r.candleStyle.wickDownColor?r.candleStyle.wickDownColor.value():r.candleStyle.wickColor.value(),p=this.findBar(e,!1,s);r.candleStyle.barColorsOnPrevClose.value()&&this._series.data().first().index!==e?n=this.findPrevBar(e,!1,s)[TradingView.CLOSE_PLOT]<=p[TradingView.CLOSE_PLOT]:n=p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT];i.barColor=n?o:l,i.barBorderColor=n?c:h,i.barWickColor=n?d:u}, +a.prototype._applyHollowCandleStyle=function(e,t,i,s,r){var n,o=a.upColor(r,t),l=a.downColor(r,t),c=r.hollowCandleStyle.borderUpColor?r.hollowCandleStyle.borderUpColor.value():r.hollowCandleStyle.borderColor.value(),h=r.hollowCandleStyle.borderDownColor?r.hollowCandleStyle.borderDownColor.value():r.hollowCandleStyle.borderColor.value(),d=r.hollowCandleStyle.wickUpColor?r.hollowCandleStyle.wickUpColor.value():r.hollowCandleStyle.wickColor.value(),u=r.hollowCandleStyle.wickDownColor?r.hollowCandleStyle.wickDownColor.value():r.hollowCandleStyle.wickColor.value(),p=this.findBar(e,!1,s),_=this.findPrevBar(e,!1,s);n=this._series.data().first().index!==e?_[TradingView.CLOSE_PLOT]<=p[TradingView.CLOSE_PLOT]:p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT],i.barColor=n?o:l,i.barBorderColor=n?c:h,i.barWickColor=n?d:u,i.isBarHollow=p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT]},a.prototype._applyHAStyle=function(e,t,i,s,r){var n,o=a.upColor(r,t),l=a.downColor(r,t),c=r.haStyle.borderUpColor.value(),h=r.haStyle.borderDownColor.value(),d=r.haStyle.wickUpColor.value(),u=r.haStyle.wickDownColor.value(),p=this.findBar(e,t,s);r.haStyle.barColorsOnPrevClose.value()?n=this.findPrevBar(e,t,s)[TradingView.CLOSE_PLOT]<=p[TradingView.CLOSE_PLOT]:n=p[TradingView.OPEN_PLOT]<=p[TradingView.CLOSE_PLOT];i.barColor=n?o:l,i.barBorderColor=n?c:h,i.barWickColor=n?d:u},a.prototype._applyBaseLineStyle=function(e,t,i,s,r){var n=this.findBar(e,t,s),o=r.baselineStyle,l=this._series.priceScale(),c=Math.round(l.height()*(Math.abs(100-o.baseLevelPercentage.value())/100)),h=this._series.firstValue(),d=l.coordinateToPrice(c,h);n[TradingView.CLOSE_PLOT]>d?i.barColor=a.upColor(r,t):i.barColor=a.downColor(r,t)},a.prototype._applyHiLoStyle=function(e,t,i,s,r){i.barColor=a.upColor(r,t),i.barBorderColor=r.hiloStyle.borderColor.value()},a.prototype._applyColumnStyle=function(e,t,i,s,r){var n=a.upColor(r),o=a.downColor(r),l=this.findBar(e,!1,s);if(r.columnStyle.barColorsOnPrevClose.value()){var c=this.findPrevBar(e,!1,s);i.color=c[TradingView.CLOSE_PLOT]<=l[TradingView.CLOSE_PLOT]?n:o}else i.color=l[TradingView.OPEN_PLOT]<=l[TradingView.CLOSE_PLOT]?n:o;i.barColor=i.color},a.prototype.applyBarStyle=function(e,t,i,s){i||(i={}),i.barColor=null,i.barBorderColor=null,i.barWickColor=null,i.isBarHollow=null,i.isBarUp=null,i.upColor=null,i.downColor=null,i.isTwoColorBar=null,i.isMergedBar=null;var r=this._series.properties();switch(r.style.value()){case TradingView.Series.STYLE_LINE:this._applyLineStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_AREA:this._applyAreaStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_BARS:this._applyBarStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_CANDLES:this._applyCandleStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_HOLLOW_CANDLES:this._applyHollowCandleStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_HEIKEN_ASHI:this._applyHAStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_BASELINE:this._applyBaseLineStyle(e,t,i,s,r);break;case TradingView.Series.STYLE_HILO:this._applyHiLoStyle(e,t,i,s,r);break +;case TradingView.Series.STYLE_COLUMNS:this._applyColumnStyle(e,t,i,s,r)}return i},a.prototype.getSeriesBars=function(e){return e?this._series.nsBars():this._series.bars()},a.prototype._findBarFieldValue=function(e,t,i){var s=this.getSeriesBars(i).valueAt(e);if(null!==s)return s[t]},a.prototype.findBar=function(e,t,i){return i?i.value:this.getSeriesBars(t).valueAt(e)||[]},a.prototype.findPrevBar=function(e,t,i){if(i&&i.previousValue)return i.previousValue;var r=this._series.bars().search(e-1,s.NearestLeft,TradingView.CLOSE_PLOT);return null!==r?r.value:[]},inherit(l,o),l.prototype.getBars=function(){return this._study.series().bars()},l.prototype.firstColoredBar=function(e){for(var t=e,i=0;ie+c)return i;if(s.styles[l.id].display.value()===r.None)return i;var h=a.valueAt(e-c);if(null===h)return i;var d=h[this._plotIndex+1];if(null==d)return i;if(d=Math.round(d),o.isRGB)i.barColor=n(d),i.upColor=i.barColor,i.downColor=i.barColor;else{var u=o.plots[this._plotIndex].palette,p=s.palettes[u],_=o.palettes[u].valToIndex?o.palettes[u].valToIndex[d]:d,m=p.colors[_].color.value();i.barColor=m,i.upColor=m.color,i.downColor=m.color}return i},t.SeriesBarColorer=a,t.StudyBarColorer=l},28263:(e,t,i)=>{"use strict";i.d(t,{BarsRange:()=>r});var s=i(50151);class r{constructor(e,t){(0,s.assert)(e<=t,"The last bar in the bars range should be greater than or equal to the first bar"),this._firstBar=e,this._lastBar=t}firstBar(){return this._firstBar}lastBar(){return this._lastBar}count(){return this._lastBar-this._firstBar+1}contains(e){return this._firstBar<=e&&e<=this._lastBar}equals(e){return this._firstBar===e.firstBar()&&this._lastBar===e.lastBar()}static compare(e,t){return null===e||null===t?e===t:e.equals(t)}}},81306:(e,t,i)=>{"use strict";i.d(t,{ChartModelBase:()=>Yi});var s=i(4889),r=i(27788),n=i(50151),o=i(86441),a=i(24377),l=i(7394),c=i(44352),h=i(45345),d=i(8840),u=i(51768),p=i(71668),_=i(76422),m=i(11417),g=i(8169),f=i(94393),v=i(93975),S=i(6250);function y(e){return(0,S.isLineTool)(e)&&e.boundToSymbol()||!1}class b{constructor(){this._items=[],this._set=new Set,this._dataSourcesCache=null,this._customSourcesCache=null,this._lineSourcesCache=null}isEmpty(){return 0===this._items.length}add(e){if(this._items.length>0&&!y(this._items[0])&&this.clear(),y(e)){const t=(0,v.lowerbound)(this._items,e,((e,t)=>e.zorder()!(0,f.isDataSource)(e)))),this._customSourcesCache}checkLineToolSelection(){this._items.forEach((e=>(0,S.isLineTool)(e)&&e.calcIsActualSymbol())),this._items=this._items.filter((e=>!(0,S.isLineTool)(e)||e.isActualSymbol())),this._invalidateCache()}remove(e){this._items=this._items.filter((t=>t!==e)),this._set.delete(e),this._invalidateCache()}clear(){this._items=[],this._set.clear(),this._invalidateCache()}_invalidateCache(){this._customSourcesCache=null,this._dataSourcesCache=null,this._lineSourcesCache=null}}var w=i(81685),P=i(46289),C=i(91217),T=i(578),x=i(7711),I=i(26220),M=i.n(I),A=i(95242),L=i(17364);class k{constructor(e){this._rendererOptions={borderSize:1,offsetSize:5,fontSize:NaN,font:"",color:"",paneBackgroundColor:"",paddingBottom:0,paddingInner:0,paddingOuter:0,paddingTop:0,lineSpacing:0},this._chartModel=e}options(){const e=this._rendererOptions,t=this._chartModel.properties().childs(),i=t.scalesProperties.childs().fontSize.value();return e.fontSize!==i&&(e.fontSize=i,e.font=(0,A.makeFont)(i,L.CHART_FONT_FAMILY,""),e.paddingTop=2.5/12*i,e.paddingBottom=e.paddingTop,e.paddingInner=i/12*e.offsetSize,e.paddingOuter=i/12*e.offsetSize,e.lineSpacing=2/12*i),e.color=t.scalesProperties.childs().textColor.value(),e.paneBackgroundColor=t.paneProperties.childs().background.value(),this._rendererOptions}}var E=i(7910),D=i(59780),B=i(74599),V=i(64548),R=i(1288),N=i(2484),O=i(1930),F=i(22600),W=i(97425);const H=new B.PriceFormatter,z="sessions";class U extends R.CustomSourceBase{constructor(e,t,i){super(e,t),this._studySource=null,this._paneViews=[],this._metaInfo=null,this._destroyed=!1,this._isStarted=!1,this._loadedGraphics=null,this._doubleClickHandler=i;const s=t.mainSeries();this._properties=new x.DefaultProperty("sessions"),(0,V.applyDefaultsOverrides)(this._properties.childs().graphics,void 0,!1,z),this._removeDuplicateProperties(),this._properties.subscribe(this,this._onPropertiesChanged),t.studyMetaInfoRepository().findById({type:"java",studyId:"Sessions@tv-basicstudies"}).then((i=>{this._destroyed||null===this._loadedGraphics&&(this._setMetaInfo(i),null!==this._metaInfo&&(this._studySource=new E.StudyDataSource(t.chartApi(),s.seriesSource(),"sessions_",this._metaInfo),this._createPaneViews(),this._studySource.dataCleared().subscribe(this,this.updateAllViews.bind(this,(0,W.sourceChangeEvent)(e))),this._studySource.dataUpdated().subscribe(this,this.updateAllViews.bind(this,(0,W.sourceChangeEvent)(e))),this._studySource.setInputs({}),this._processHibernate())) +})),t.timeScale().onReset().subscribe(this,this._clearData),t.timeScale().logicalRangeChanged().subscribe(this,this.updateAllViews.bind(this,(0,W.viewportChangeEvent)())),t.mainSeries().sessionIdProxyProperty().subscribe(this,this._updateVisibleOfPreAndPostMarketBackground),t.mainSeries().properties().childs().interval.subscribe(this,this._processHibernate),this._updateVisibleOfPreAndPostMarketBackground(t.mainSeries().properties().childs().sessionId)}applyOverrides(e){(0,V.applyPropertiesOverrides)(this._properties.childs().graphics,void 0,!1,e,z),this._model.updateSource(this)}start(){this._isStarted=!0,this._processHibernate()}restart(){this._clearData(),N.enabled("stop_study_on_restart")&&this.stop(),this.start()}isStarted(){return this._isStarted}stop(){this._isStarted=!1,null!==this._studySource&&this._studySource.stop()}isHoveredEnabled(){return!1}paneViews(e){return this._paneViews}updateAllViews(e){this._paneViews.forEach((t=>t.update(e)))}updateViewsForPane(e,t){this.updateAllViews(t)}destroy(){this._destroyed=!0,null!==this._studySource&&(this._studySource.dataCleared().unsubscribeAll(this),this._studySource.dataUpdated().unsubscribeAll(this),this._studySource.destroy(),this._studySource=null),this._model.timeScale().logicalRangeChanged().unsubscribeAll(this),this._model.timeScale().onReset().unsubscribeAll(this),this._model.mainSeries().sessionIdProxyProperty().unsubscribeAll(this),this._model.mainSeries().properties().childs().interval.unsubscribeAll(this),this._properties.unsubscribeAll(this)}series(){return this._model.mainSeries()}priceScale(){return this.series().priceScale()}graphics(){return this._loadedGraphics||(0,n.ensureNotNull)(this._studySource).graphics()}properties(){return this._properties}graphicsInfo(){return(0,n.ensureNotNull)(this._metaInfo).graphics}firstValue(e){return this._model.mainSeries().firstValue()}formatter(){return H}state(e){const t={properties:this._properties.state()};return e&&null!==this._metaInfo&&(t.data={graphics:(0,D.saveStudyGraphics)(this.graphics(),this._model.timeScale().visibleBarsStrictRange()),metaInfo:this._metaInfo}),t}restoreState(e,t){const i=e.properties;this._migrateOutOfSessionProperty(i),this._properties.mergeAndFire(i),this._removeDuplicateProperties(),this._updateVisibleOfPreAndPostMarketBackground(this._model.mainSeries().properties().childs().sessionId),void 0!==e.data&&t&&(this._loadStudyGraphics(e.data.graphics),this._setMetaInfo(e.data.metaInfo),this._createPaneViews())}restoreOldState(e,t){const i={properties:{graphics:e.state.graphics}};void 0!==e.data&&void 0!==e.metaInfo&&t&&(i.data={metaInfo:e.metaInfo,graphics:e.data.graphics}),this.restoreState(i,t)}applyPreferences(e){this._properties.mergePreferences(e)}metaInfo(){return(0,n.ensureNotNull)(this._metaInfo)}_loadStudyGraphics(e){const t=e.backgrounds;if(void 0!==t){const e=t.findIndex((e=>"inSession"===e.styleId));-1!==e&&t.splice(e,1)}this._loadedGraphics=(0,D.loadStudyGraphics)(e)}_setMetaInfo(e){const t=e.graphics.backgrounds;void 0!==t&&void 0!==t.inSession&&delete t.inSession, +this._metaInfo=e}_updateVisibleOfPreAndPostMarketBackground(e){const t=!(0,O.isRegularSessionId)(e.value());this._outOfSessionVisibilityProperty().setValue(t),this._preMarketVisibilityProperty().setValue(t),this._postMarketVisibilityProperty().setValue(t)}_clearData(){null!==this._studySource&&this._studySource.clearData()}_createPaneViews(){const e={doubleClickHandler:this._doubleClickHandler};(0,D.createGraphicsPaneViews)(this,this._model,e).then((e=>{this._paneViews=e,this._model.lightUpdate()}))}_onPropertiesChanged(){this._processHibernate(),this.updateAllViews((0,W.sourceChangeEvent)(this.id()))}_processHibernate(){if(null!==this._studySource){const e=this._canBeHibernated(),t=this._isHibernated(),i=this._studySource.isStarted();!t&&e&&i?this._studySource.stop():!t||e||i||this._studySource.start()}}_canBeHibernated(){const e=this._model.mainSeries(),t=this._preMarketVisibilityProperty().value()&&this._postMarketVisibilityProperty().value()&&this._outOfSessionVisibilityProperty().value();return e.isDWM()||!t&&!this._vertLinesVisibleProperty().value()}_isHibernated(){return this._isStarted&&(null===this._studySource||!this._studySource.isStarted())}_outOfSessionVisibilityProperty(){return this._properties.childs().graphics.childs().backgrounds.childs().outOfSession.childs().visible}_preMarketVisibilityProperty(){return this._properties.childs().graphics.childs().backgrounds.childs().preMarket.childs().visible}_postMarketVisibilityProperty(){return this._properties.childs().graphics.childs().backgrounds.childs().postMarket.childs().visible}_vertLinesVisibleProperty(){return this._properties.childs().graphics.childs().vertlines.childs().sessBreaks.childs().visible}_removeDuplicateProperties(){this._properties.hasChild("properties")&&(this._properties.removeProperty("properties"),(0,x.saveDefaultProperties)(!0),this._properties.childChanged(null),(0,x.saveDefaultProperties)(!1))}_migrateOutOfSessionProperty(e){const t=e.graphics.backgrounds;if(void 0!==t){const i=t.outOfSession;i.color===(0,n.ensureDefined)(F.sessionsPreferencesDefault.graphics.backgrounds).outOfSession.color||"postMarket"in t||(e.graphics.backgrounds={...t,postMarket:{color:i.color,transparency:i.transparency,visible:i.visible},preMarket:{color:i.color,transparency:i.transparency,visible:i.visible}})}}}var j=i(89215),G=i(26867),q=i.n(G),$=i(40549),Y=i.n($),K=i(36646),X=i(35624),Z=i(98351),J=i(68671),Q=i(37364),ee=i(47539),te=i(58403),ie=i(65665),se=i(50059),re=i(88029),ne=i(50841);const oe=new Map([["price",e=>(0,re.isPriceDataSource)(e)],["trading",e=>(0,S.isTrading)(e)],["drawing",e=>(0,S.isLineTool)(e)&&!(0,S.isTrading)(e)&&!e.isPhantom()],["drawingsForAllSymbols",e=>(0,S.isLineTool)(e)&&!(0,S.isTrading)(e)&&!e.isPhantom()],["phantom",e=>(0,S.isLineTool)(e)&&e.isPhantom()],["restRowSources",e=>!(0,S.isLineTool)(e)&&!(0,S.isTrading)(e)],["legendViewSources",e=>(0,re.isPriceDataSource)(e)||(0, +S.isStudyLineTool)(e)],["leftPriceScale",(e,t)=>"left"===le(e,t)],["rightPriceScale",(e,t)=>"right"===le(e,t)],["overlayPriceScale",(e,t)=>"overlay"===le(e,t)]]),ae=new Map([["price","visibleSorted"],["trading","visibleSorted"],["drawing","visibleSorted"],["drawingsForAllSymbols","allSorted"],["phantom","visibleSorted"],["restRowSources","visibleSorted"],["legendViewSources","visibleSorted"],["leftPriceScale","visibleSorted"],["rightPriceScale","visibleSorted"],["overlayPriceScale","visibleSorted"]]);function le(e,t){const i=e.priceScale();return null===i?"overlay":t.priceScalePosition(i)}class ce{constructor(e){this._groupedSources=new Map,this._sources=null,this._pane=e}clear(){this._groupedSources.clear(),this._sources=null}destroy(){this.clear()}all(){return this._groupedSources.has("visibleSorted")||this._sortSources(),(0,n.ensureDefined)(this._groupedSources.get("visibleSorted"))}allIncludingHidden(){return this._groupedSources.has("allSorted")||this._sortSources(),(0,n.ensureDefined)(this._groupedSources.get("allSorted"))}allExceptSpecialSources(){if(!this._groupedSources.has("exceptSpecial")){const e=this.allIncludingHidden().filter((e=>!e.isSpeciallyZOrderedSource()));this._groupedSources.set("exceptSpecial",e)}return(0,n.ensureDefined)(this._groupedSources.get("exceptSpecial"))}tradingSources(){return this._getSourcesByGroupType("trading")}priceSources(){return this._getSourcesByGroupType("price")}lineSources(){return this._getSourcesByGroupType("drawing")}lineSourcesForAllSymbols(){return this._getSourcesByGroupType("drawingsForAllSymbols")}phantomSources(){return this._getSourcesByGroupType("phantom")}allExceptLineAndTradingSources(){return this._getSourcesByGroupType("restRowSources")}hitTestSources(){if(!this._groupedSources.has("hitTest")){const e=this.allExceptLineAndTradingSources().concat(this.lineSources());this._groupedSources.set("hitTest",e)}return(0,n.ensureDefined)(this._groupedSources.get("hitTest"))}generalSources(){if(!this._groupedSources.has("general")){const e=this.allExceptLineAndTradingSources().concat(this.lineSources());this._groupedSources.set("general",(0,ne.sortSources)(e))}return(0,n.ensureDefined)(this._groupedSources.get("general"))}leftPriceScalesSources(){return this._getSourcesByGroupType("leftPriceScale")}rightPriceScalesSources(){return this._getSourcesByGroupType("rightPriceScale")}overlayPriceScaleSources(){return this._getSourcesByGroupType("overlayPriceScale")}legendViewSources(){return this._getSourcesByGroupType("legendViewSources")}_getSourcesByGroupType(e){const t=(0,n.ensureDefined)(ae.get(e));return this._groupedSources.has(t)?this._groupedSources.has(e)||this._groupSources(e):(this._sortSources(),this._groupSources(e)),(0,n.ensureDefined)(this._groupedSources.get(e))}_sortSources(){null===this._sources&&(this._sources=this._pane.dataSources());const e=(0,ne.sortSources)(this._sources),t=e.filter((e=>!(0,S.isLineTool)(e)||e.isActualSymbol()&&e.isActualCurrency()&&e.isActualUnit()));this._groupedSources.set("allSorted",e), +this._groupedSources.set("visibleSorted",t)}_groupSources(e){const t=(0,n.ensureDefined)(ae.get(e)),i=oe.get(e);if(void 0!==i){const s=(0,n.ensureDefined)(this._groupedSources.get(t)).filter((e=>i(e,this._pane)));this._groupedSources.set(e,s)}}}var he=i(60862),de=i(53778),ue=i(23304),pe=i(21580),_e=i(12033),me=i(62472),ge=i(77906),fe=i(86635);const ve=[],Se=[];class ye{constructor(e){this._studies={},this._deferreds={},this._container=e,ve.push(e),Se.push(this)}add(e,t){this._deferreds[e]&&(this._deferreds[e].resolve(t),delete this._deferreds[e]),this._studies[e]=t}get(e){return this._studies[e]?Promise.resolve(this._studies[e]):(this._deferreds[e]||(this._deferreds[e]=(0,p.createDeferredPromise)()),this._deferreds[e].promise)}reset(){const e=ve.indexOf(this._container);~e&&(ve.splice(e,1),Se.splice(e,1))}static instance(e){const t=ve.indexOf(e);return~t?Se[t]:new ye(e)}}var be=i(26132);var we=i(10621),Pe=i(37098),Ce=i(27569),Te=i(54922),xe=i(93753),Ie=i(55168);new ee.TranslatedString("update {title} script",c.t(null,void 0,i(50728)));const Me=(0,Z.getLogger)("Chart.Pane");function Ae(e,t,i){e.setMargins({top:t,bottom:i})}class Le{constructor(e,t,i,s){this.m_dataSources=[],this._sourceWatchedValuesSubscriptions=new Map,this.m_mainDataSource=null,this._cachedOrderedSources=new ce(this),this._sourcesById=new Map,this._priceSourcesById=new Map,this._sourcePropertiesChanged=new(q()),this._sourcesZOrderChanged=new(q()),this._tagsChanged=new(q()),this._stretchFactor=1e3,this._isInInsertManyDataSourcesState=!1,this._lastLineDataSourceZOrder=null,this._rightPriceScales=[],this._leftPriceScales=[],this._lockedPriceScale=null,this._currentPriceScaleRatio=null,this._onPriceScalesChanged=new(q()),this._isRecalculatingScales=!1,this._priceDataSources=[],this._symbolSources=[],this._lollipopDataSources=[],this._symbolSourceResolved=new(q()),this._symbolSourceResolvingActive=new(Y())(!1),this._bulkActions={activeCounter:0},this._height=0,this._width=0,this._dataSourcesCollectionChanged=new(q()),this._symbolSourceCollectionChanged=new(q()),this._maximized=new(Y())(!1),this._collapsed=new(Y())(!1),this._destroyed=new(q()),this._executionsPositionController=null,this._recalcSymbolSourceResolvingActive=()=>{for(const e of this._symbolSources)if(e.symbolResolvingActive().value())return void this._symbolSourceResolvingActive.setValue(!0);this._symbolSourceResolvingActive.setValue(!1)},this._onSymbolSourceCollectionChanged=()=>{0===this._bulkActions.activeCounter?this._symbolSourceCollectionChanged.fire():this._bulkActions.symbolSourceCollectionChanged=!0},this._priceScaleSelectionStrategy=(0,Q.createPriceScaleSelectionStrategy)(i.properties().childs().priceScaleSelectionStrategyName.value()),this._id=null!=s?s:(0,J.randomHashN)(6),this._timeScale=e,this.m_mainDataSource=null,this._properties=t,this._model=i,i.properties().childs().priceScaleSelectionStrategyName.subscribe(null,(e=>{this._priceScaleSelectionStrategy=(0,Q.createPriceScaleSelectionStrategy)(e.value()),this._priceScaleSelectionStrategy.apply(this)})), +this._timeScale.barSpacingChanged().subscribe(this,(()=>{this.m_mainDataSource===this._model.mainSeries()&&this._recalculatePriceScaleByScaleRatio(this.m_mainDataSource.priceScale())})),t.childs().topMargin.subscribe(this,this._updateMargins),t.childs().bottomMargin.subscribe(this,this._updateMargins),this._updateMargins()}destroy(){this._properties.childs().topMargin.unsubscribeAll(this),this._properties.childs().bottomMargin.unsubscribeAll(this),this._model.properties().childs().priceScaleSelectionStrategyName.unsubscribeAll(this),this._timeScale.barSpacingChanged().unsubscribeAll(this),this._leftPriceScales.concat(this._rightPriceScales).forEach((e=>{e.modeChanged().unsubscribeAll(this),e.priceRangeChanged().unsubscribeAll(this),e.internalHeightChanged().unsubscribeAll(this)}));for(const e of this.m_dataSources)this.removeSourceFromPriceScale(e),e.destroy&&e.destroy();this._destroyed.fire()}id(){return this._id}bulkActionMacro(e){const t=this._bulkActions;t.activeCounter+=1,e(),t.activeCounter-=1,0===t.activeCounter&&(this._dataSourcesCollectionChanged.fire(),t.symbolSourceCollectionChanged&&this._symbolSourceCollectionChanged.fire(),t.symbolSourceCollectionChanged=!1)}defaultPriceScale(){var e,t;const i=null!==(t=null===(e=this.m_mainDataSource)||void 0===e?void 0:e.priceScale())&&void 0!==t?t:null;if(null!==i)return i;const s=this.properties().childs().axisProperties.state();return s.autoScale=!0,new he.PriceScale(this._model.properties().childs().scalesProperties,s)}leftPriceScales(){return this._leftPriceScales}rightPriceScales(){return this._rightPriceScales}visibleLeftPriceScales(){var e;const t=this._model.priceScaleSlotsCount();if(this._leftPriceScales.length>t.left){const i=(0,v.moveToHead)(this._leftPriceScales,null===(e=this.mainDataSource())||void 0===e?void 0:e.priceScale());return i.splice(t.left),i}return this._leftPriceScales}visibleRightPriceScales(){var e;const t=this._model.priceScaleSlotsCount();if(this._rightPriceScales.length>t.right){const i=(0,v.moveToHead)(this._rightPriceScales,null===(e=this.mainDataSource())||void 0===e?void 0:e.priceScale());return i.splice(t.right),i}return this._rightPriceScales}clearSeries(e){const t=this._model.mainSeries();for(let i=this.m_dataSources.length-1;i>=0;i--)this.m_dataSources[i]===t&&this._removeSourceFromCollections(i,e)}sourcesByGroup(){return this._cachedOrderedSources}dataSourceForId(e){return this._sourcesById.get(e)||null}changeSourceId(e,t){(0,n.assert)(this.hasDataSource(e));const i=e.id();e.setId(t),this._sourcesById.delete(i),this._sourcesById.set(t,e),(0,re.isPriceDataSource)(e)&&(this._priceSourcesById.delete(i),this._priceSourcesById.set(t,e))}movePriceScale(e,t,i){const s=this.priceScalePosition(e);if(s!==t)this.removePriceScale(e),this._placePriceScale(e,t,i),e.invalidateMargins(),this._invalidateSourcesCache();else if(void 0!==i&&"overlay"!==s){const t="left"===s?this._leftPriceScales:this._rightPriceScales,r=t.indexOf(e);t.splice(r,1),t.splice(i,0,e)}}mainDataSource(){return this.m_mainDataSource}isEmpty(){ +return null===this.m_mainDataSource}recalculatePriceScale(e,t){if(!e)return;const i=e.sourcesForAutoscale();if((e.isAutoScale()||e.priceRangeShouldBeRecalculatedOnce())&&i&&i.length>0&&!this.timeScale().isEmpty()){const t=this.timeScale().visibleBarsStrictRange();e.recalculatePriceRange(t)}e.updateAllViews(t)}onSourceTagsChanged(){this._tagsChanged.fire()}insertDataSource(e,t,i){e.setZorder(i),t||(t=this.findSuitableScale(e)),this._addSourceToCollections(e);let s=!1;e===this.model().mainSeries()?(this.m_mainDataSource=this.model().mainSeries(),s=!0):null===this.m_mainDataSource&&(0,re.isPriceDataSource)(e)&&(this.m_mainDataSource=e,s=!0),t.addDataSource(e,this._isInInsertManyDataSourcesState),e.setPriceScale(t),t.invalidateMargins(),e.onTagsChanged&&e.onTagsChanged().subscribe(this,this.onSourceTagsChanged),s&&this._processMainSourceChange(),this._tagsChanged.fire(),(0,re.isPriceDataSource)(e)&&this.recalculatePriceScale(t,(0,W.sourceChangeEvent)(e.id())),this._invalidateSourcesCache()}addDataSource(e,t,i){let s=e.zorder();i||((0,S.isLineTool)(e)&&!e.isSpeciallyZOrderedSource()?(s=null!==this._lastLineDataSourceZOrder?this._lastLineDataSourceZOrder+1:this.newLineToolZOrder(),this._isInInsertManyDataSourcesState&&(this._lastLineDataSourceZOrder=s)):(0,j.isStudy)(e)&&!e.isSpeciallyZOrderedSource()&&(s=this.newStudyZOrder())),this.insertDataSource(e,t,s)}removeDataSource(e,t,i){const s=this.m_dataSources.indexOf(e);if(-1===s)return void Me.logDebug("removeDataSource: invalid data source");this._removeSourceFromCollections(s,!!i),e!==this.m_mainDataSource||t||(this.m_mainDataSource=null);const r=e.priceScale();this.removeSourceFromPriceScale(e),e.onTagsChanged&&e.onTagsChanged().unsubscribe(this,this.onSourceTagsChanged),(0,re.isPriceDataSource)(e)&&!t&&this._processMainSourceChange(),this._tagsChanged.fire(),r&&(0,re.isPriceDataSource)(e)&&this.recalculatePriceScale(r,(0,W.sourceChangeEvent)(e.id())),this._invalidateSourcesCache()}hasDataSource(e){return this._sourcesById.has(e.id())}hasPriceDataSource(e){return this._priceSourcesById.has(e.id())}dataSources(){return this.m_dataSources}priceDataSources(){return this._priceDataSources}lollipopDataSources(){return this._lollipopDataSources}symbolSources(){return this._symbolSources}replaceSource(e,t,i){const s=this.m_mainDataSource===e,r=e.zorder();this.insertDataSource(t,i,r),this.removeDataSource(e,s),this._sourcesById.set(t.id(),t),(0,re.isPriceDataSource)(t)&&this._priceSourcesById.set(t.id(),t),s&&(this.m_mainDataSource=t,this._processMainSourceChange())}findSuitableScale(e,t,i){return this._priceScaleSelectionStrategy.findSuitableScale(this,e,t,i)}createNewPriceScaleIfPossible(){return this._priceScaleSelectionStrategy.createNewPriceScaleIfPossible(this)}canCreateNewPriceScale(){return this._priceScaleSelectionStrategy.canCreateNewPriceScale(this)}isOverlay(e){const t=e.priceScale();return null===t||"overlay"===this.priceScalePosition(t)}recalculate(e){this._leftPriceScales.forEach((t=>this.recalculatePriceScale(t,e))), +this._rightPriceScales.forEach((t=>this.recalculatePriceScale(t,e)));for(const t of this.m_dataSources)this.isOverlay(t)&&!(0,S.isLineTool)(t)&&this.recalculatePriceScale(t.priceScale(),e);this.updateAllViews(e),this._model.updatePane(this)}updateAllViews(e){for(const t of this.m_dataSources)t.updateAllViews(e);for(const t of this.model().customSources())t.updateViewsForPane(this,e)}updateLollipopViews(e){}priceScalePosition(e){return this._leftPriceScales.includes(e)?"left":this._rightPriceScales.includes(e)?"right":"overlay"}createPriceScaleAtPosition(e,t){const i=this.properties().childs().axisProperties.state();i.autoScale=!0;const s=new he.PriceScale(this.model().properties().childs().scalesProperties,i);return s.setHeight(this.height()),Ae(s,this._defaultTopMargin(),this._defaultBottomMargin()),this._placePriceScale(s,e,t),s}removePriceScale(e){e.modeChanged().unsubscribeAll(this),e.priceRangeChanged().unsubscribeAll(this),e.internalHeightChanged().unsubscribeAll(this),e===this._lockedPriceScale&&(this._lockedPriceScale=null,this._currentPriceScaleRatio=null);const t=this._leftPriceScales.indexOf(e);-1!==t&&(this._leftPriceScales[t].invalidateMargins(),this._leftPriceScales.splice(t,1));const i=this._rightPriceScales.indexOf(e);if(-1!==i&&(this._rightPriceScales[i].invalidateMargins(),this._rightPriceScales.splice(i,1)),null===e.mainSource()){const t=e.dataSources().length;0!==t&&Me.logError("Invalid priceScale state: empty mainSource but non-empty data sources="+t)}this._onPriceScalesChanged.fire()}priceScaleIndex(e,t){switch(t){case"left":return this.leftPriceScales().indexOf(e);case"right":return this.rightPriceScales().indexOf(e)}}move(e,t,i){const s=e.priceScale();this.removeSourceFromPriceScale(e),t.addDataSource(e),e.setPriceScale(t),t.invalidateMargins(),this._processMainSourceChange(),this._invalidateSourcesCache(),e.isIncludedInAutoScale()&&(null!==s&&this.recalculatePriceScale(s,(0,W.sourceChangeEvent)(e.id())),this.recalculatePriceScale(t,(0,W.sourceChangeEvent)(e.id()))),this._onPriceScalesChanged.fire()}setZOrders(e){e.forEach(((e,t)=>{t.setZorder(e)})),this._invalidateSourcesCache(),0===this._bulkActions.activeCounter&&this._dataSourcesCollectionChanged.fire(),this.model().lightUpdate()}isMainPane(){return this.hasDataSource(this.model().mainSeries())}isLast(){const e=this.model().panes();return e[e.length-1]===this}newStudyZOrder(){return(0,_e.newStudyZOrder)(this._priceDataSources)}newLineToolZOrder(e){return(0,_e.newLineToolZOrder)(this.m_dataSources,e)}model(){return this._model}containsMainSeries(){return this._sourcesById.has(this.model().mainSeries().id())}applyPriceScaleRatio(e,t){var i;null!==this._lockedPriceScale&&this._lockedPriceScale!==e||this._currentPriceScaleRatio===t||!this.isMainPane()||null===this._lockedPriceScale&&e!==(null===(i=this.mainDataSource())||void 0===i?void 0:i.priceScale())||(this._setNewPriceRangeByScaleRatio(e,t,this._mainSourceVisiblePriceRange(e),!0,!0), +null!==this._lockedPriceScale?this._tryToApplyNewPriceScaleRatio():e.isLog()||this.model().mainSeriesScaleRatioPropertyOnChanged())}sendToBack(e){const t=this.sourcesByGroup().allExceptSpecialSources();this._batchReorder(e,t[0],_e.moveBeforeSource)}bringToFront(e){const t=this.sourcesByGroup().allExceptSpecialSources();this._batchReorder(e,t[t.length-1],_e.moveAfterSource)}sendBackward(e){const t=this.sourcesByGroup().allIncludingHidden(),i=t.indexOf(e[0]);if(0===i)this.bringToFront(e);else{const s=t[i-1];this.insertBefore(e,s)}}bringForward(e){const t=this.sourcesByGroup().allExceptSpecialSources(),i=t.indexOf(e[e.length-1]);if(i===t.length-1)this.sendToBack(e);else{const s=t[i+1];this.insertAfter(e,s)}}insertAfter(e,t){this._batchReorder(e,t,_e.moveAfterSource)}insertBefore(e,t){this._batchReorder(e,t,_e.moveBeforeSource)}maximized(){return this._maximized}collapsed(){return this._collapsed}getPriceScaleById(e){const t=this.m_dataSources.find((t=>{var i;return(null===(i=t.priceScale())||void 0===i?void 0:i.id())===e}));return void 0===t?null:t.priceScale()}priceScaleSelectionStrategy(){return this._priceScaleSelectionStrategy}setPriceScaleSelectionStrategy(e){this._priceScaleSelectionStrategy=e,e.apply(this)}findTargetPriceAxisViews(e,t,i,s){if((0,f.isDataSource)(e)&&this.model().paneForSource(e)!==this)return[];const r=e.priceScale();if(t===r)return i;if(null===r)return[];if("overlay"===this.priceScalePosition(r))return t===this.defaultPriceScale()?i:[];const n=this.priceScalePosition(t);if(n!==this.priceScalePosition(r))return[];const o="left"===n?this.leftPriceScales():this.rightPriceScales();return o.indexOf(t)1}properties(){return this._properties}setPriceAutoScale(e,t){e.setMode({autoScale:t}),this.timeScale().isEmpty()||this.recalculatePriceScale(e,(0,W.viewportChangeEvent)())}state(e,t,i,s,r,n){var o,a;const l={sources:[],mainSourceId:null===(o=this.m_mainDataSource)||void 0===o?void 0:o.id(),stretchFactor:this._stretchFactor,leftAxisesState:[],rightAxisesState:[],overlayPriceScales:{},priceScaleRatio:this._currentPriceScaleRatio},c=new Map,h=e=>{if(c.has(e))return c.get(e);let o=null;const a=i&&!e.isSavedInStudyTemplates()||!e.state||(0,S.isLineTool)(e)&&n||!e.isSavedInChart(Boolean(t))||!(o=e.state(t,r))||s&&(0,S.isLineTool)(e)&&e.isActualSymbol&&!e.isActualSymbol()||e.isPhantom()?null:o;return c.set(e,a),a};if(e){l.sources=[];for(let e=0;enull!==c.get(e),u=e=>!n||!(0,S.isLineTool)(e);l.leftAxisesState=this._leftPriceScales.map((e=>({state:e.state(),sources:e.dataSources().filter(d).filter(u).map((e=>e.id()))}))),l.rightAxisesState=this._rightPriceScales.map((e=>({state:e.state(),sources:e.dataSources().filter(d).filter(u).map((e=>e.id()))}))),l.overlayPriceScales={};for(const e of this.m_dataSources)if(this.isOverlay(e)&&e.isSavedInChart(Boolean(t))){ +const t=e.priceScale();l.overlayPriceScales[e.id()]=null!==(a=null==t?void 0:t.state())&&void 0!==a?a:null}return l}restoreState(e,t,i,s,r,o,a){r=r||{},e.stretchFactor&&(this._stretchFactor=e.stretchFactor),s=null!=s?s:this._model.mainSeries().id();const l={};if(e.sources){const n=e.sources.filter((e=>{var t;return!!e&&("MainSeries"===e.type||(!(null===(t=e.points)||void 0===t?void 0:t.some((e=>null===e.time_t||!isFinite(e.time_t))))||(Me.logNormal("Dropped invalid "+e.type+". Reason: non-numeric point time"),!1)))})),c=n.findIndex(me.isMainSeriesState);-1!==c&&this.model().mainSeries().setObsoleteZOrder(n[c].zorder),i<3&&(0,_e.reorderDataSourcesStateZOrder)(n);const h=-1!==this.m_dataSources.indexOf(this._model.mainSeries());this.clearSeries(Boolean(a)),this.m_mainDataSource=null,h&&this._addSourceToCollections(this._model.mainSeries(),a),(()=>{const t=n.find((t=>t.id===e.mainSourceId));if(void 0===t)return void Me.logWarn("There is no main source with id "+e.mainSourceId+", total sources="+n.length);if(!window.TradingView[t.type]||!(0,S.isLineToolName)(t.type))return void Me.logNormal("The type of main source is not line tool - fix is unnecessary");let i=null;for(const e of n)if(!window.TradingView[t.type]||!(0,S.isLineToolName)(e.type)){if(null!==i)return void Me.logWarn("Pane contains more than 1 possibly main sources - auto fix cannot be applied");i=e}if(null===i)return void Me.logWarn("Pane contains only line tools - possible we need to remove this pane?");const s=e.mainSourceId;let r=0;e.mainSourceId=i.id,n.forEach((e=>{e.ownerSource===s&&(e.ownerSource=null==i?void 0:i.id,r+=1)})),Me.logNormal("Auto fix broken pane is applied, changed line tools="+r+", changed from="+s+" to="+i.id)})();for(const e of n)if("study_Sessions"===e.type){this.model().sessions().restoreOldState(e,t);break}for(const e of n)"study_Sessions"!==e.type&&(null===this._model.dataSourceForId(e.id)||"MainSeries"===e.type?(l[e.id]=e.ownerSource,(0,me.isMainSeriesState)(e)?this._restoreMainSeries(e,t,h,r,o,a):(0,me.isStudyState)(e)?this.restoreStudy(e,t,s,r,a,!0):(0,me.isLineToolState)(e)?(e.state&&(e.state.zOrderVersion=2),this.restoreLineTool(e,t,void 0,a)):"ChartEventsSource"===e.type&&this._restoreSpecialSource(e,t,a)):Me.logError("Duplicate id while restoring pane: "+e.type+","+e.id))}const c=new Set,h=(e,t)=>{e.priceScale()!==t&&(this.removeSourceFromPriceScale(e),e.setPriceScale(t),t.addDataSource(e))},d=(e,t,i)=>{if(c.has(e))return;c.add(e);const s=i.m_showSymbolLabels;void 0!==s&&e===this.model().mainSeries()&&this.model().properties().childs().scalesProperties.childs().showSymbolLabels.setValue(s),this._model.children(e,!0).forEach((e=>d(e,t,i))),h(e,t)},u=e=>{const t=(0,V.defaults)("chartproperties").paneProperties.axisProperties,i=new he.PriceScale(this.model().properties().childs().scalesProperties,t);return i.restoreState(e.state),e.sources.forEach((e=>{const s=this.dataSourceForId(e);s&&d(s,i,t)})),0===i.dataSources().length?null:i},p=e=>e.map(u).filter((e=>null!==e));let _;if(e.leftAxisesState)_=p(e.leftAxisesState);else{ +const t=u({state:e.leftAxisState,sources:e.leftAxisSources});_=null!==t?[t]:[]}let m;if(this._leftPriceScales.slice().forEach((e=>this.removePriceScale(e))),this._leftPriceScales=[],_.forEach((e=>this._placePriceScale(e,"left"))),e.rightAxisesState)m=p(e.rightAxisesState);else{const t=u({state:e.rightAxisState,sources:e.rightAxisSources});m=null!==t?[t]:[]}this._rightPriceScales.slice().forEach((e=>this.removePriceScale(e))),this._rightPriceScales=[],m.forEach((e=>this._placePriceScale(e,"right"))),this._currentPriceScaleRatio=e.priceScaleRatio||e.leftPriceScaleRatio||e.rightPriceScaleRatio||null;const g=new Map;for(const t of this.m_dataSources){if(c.has(t))continue;let i;if(e.overlayPriceScales&&e.overlayPriceScales[t.id()]){let s=e.overlayPriceScales[t.id()];g.has(null==s?void 0:s.id)?i=g.get(null==s?void 0:s.id):(s=(0,n.ensure)(s),i=new he.PriceScale(this._model.properties().childs().scalesProperties),i.setHeight(this._height),s.m_isAutoScale=!0,s.m_isLog=!1,s.m_isPercentage=!1,s.m_isLockScale=!1,i.restoreState(s),g.set(s.id,i))}else i=new he.PriceScale(this._model.properties().childs().scalesProperties),i.setHeight(this._height);h(t,i)}for(const e of Object.keys(l)){const t=l[e],i=this.dataSourceForId(e);t&&i&&null===i.ownerSource()&&i.setOwnerSource(this.dataSourceForId(t))}if(e.mainSourceId&&!this.containsMainSeries()&&(this.m_mainDataSource=this.dataSourceForId(e.mainSourceId)),!this.m_mainDataSource)for(const e of this.m_dataSources)if((0,re.isPriceDataSource)(e)){this.m_mainDataSource=e;break}for(const e of this.m_dataSources)if((0,S.isLineTool)(e))e.ownerSource()||e.setOwnerSource(this.mainDataSource()),e.isFixed()&&e.restoreFixedPoint();else if((0,j.isStudy)(e)){const t=e.properties().childs();!e.ownerSource()&&t.linkedToSeries&&t.linkedToSeries.value()&&e.setOwnerSource(this.model().mainSeries())}this._updateMargins(),this._cachedOrderedSources.clear()}onPriceScalesChanged(){return this._onPriceScalesChanged}setPaneSize(e){let t;switch(e){case"large":t=1;break;case"medium":t=.6;break;case"small":t=.3;break;case"tiny":t=.15;break;default:throw new Error("Unknown size enum value: "+e)}this._stretchFactor=1e3*t}stretchFactor(){return this._stretchFactor}setStretchFactor(e){this._stretchFactor=e}customSources(e){return this.model().customSources(e)}createDrawingsCaches(){se.ExecutionsPositionController.recreateOrderedByBarsSourcesCache(this)}clearDrawingCaches(){se.ExecutionsPositionController.clearOrderedByBarsSourcesCache()}executionsPositionController(){return this._executionsPositionController||(this._executionsPositionController=new se.ExecutionsPositionController(this)),this._executionsPositionController}width(){return this._width}height(){return this._height}setHeight(e){this._height=e,this._leftPriceScales.forEach((t=>t.setHeight(e))),this._rightPriceScales.forEach((t=>t.setHeight(e)));for(let t=0;t(e.paneViews(this)||[]).some((e=>{const r=e.renderer(t,i);return r&&r.doesIntersectWithBox&&r.doesIntersectWithBox(s)}))))}logicalRectToPixels(e){const t=this.defaultPriceScale(),i=this.timeScale(),s=(0,n.ensureNotNull)((0,n.ensureNotNull)(t.mainSource()).firstValue()),r=t.priceToCoordinate(e.p1.price,s),a=i.indexToCoordinate(e.p1.index),l=t.priceToCoordinate(e.p2.price,s),c=i.indexToCoordinate(e.p2.index),h=new o.Point(Math.min(a,c),Math.min(r,l)),d=new o.Point(Math.max(a,c),Math.max(r,l));return(0,o.box)(h,d)}timeScale(){return this._timeScale}restoreLineTool(e,t,i,s,r){var o,a,l,c,h,d,u,p,_,m,g;delete e.state.lastUpdateTime,e.state.intervalsVisibilities=(0,we.mergeIntervalVisibilitiesDefaults)(e.state.intervalsVisibilities),i=void 0===i||i,be.LineToolElliott.migrateState(e),"LineToolGannComplex"!==(g=e).type||void 0!==g.version&&1!==g.version||(g.type="LineToolGannFixed"),Array.isArray(e.positionPercents)&&(e.positionPercents=e.positionPercents[0]);const f=e.type,v=e.id,y=e.state,b=i?e.zorder:this.newLineToolZOrder();(0,n.assert)((0,S.isLineToolName)(f),"invalid data source type:"+f+" (expected to be a Line Tool)");let w,P,C=null;if((0,me.isStudyLineToolState)(e)){C=this._model.studyVersioning();const t=C.patchPointsBasedStudyState(e);e=t;const i=t.metaInfo;Object.assign(i,te.StudyMetaInfo.parseIdString(null==i?void 0:i.fullId));const s=C.updateMetaInfo(i)||i;P=(0,S.createStudyLineToolProperties)(f,i,s,y,C),w=(0,S.createLineTool)(f,this._model,P,s,!0)}else P=(0,S.createLineToolProperties)(f,y,this._model),t?null===(o=P.child("fixedSize"))||void 0===o||o.setValue(!1):null===(a=P.child("fixedSize"))||void 0===a||a.setValue(!0),w=(0,S.createLineTool)(f,this._model,P,null,!0);w.setId(v),w.linkKey().setValue(e.linkKey||null);const T=e.alertId;T&&w.canHasAlert()&&N.enabled("alerts")&&!this._model.readOnly()&&!this._model.isJustClonedChart()&&w.setAlert(T);let x=null!==(l=e.indexes)&&void 0!==l?l:[];if(x=x.slice(0,null!==(h=null===(c=e.points)||void 0===c?void 0:c.length)&&void 0!==h?h:x.length),w.isFixed()?void 0!==e.positionPercents?w.restorePositionPercents(e.positionPercents):w.restorePositionPercents({x:.5,y:.5}):e.points&&w.restorePoints(e.points,x,t), +w instanceof Pe.LineToolBarsPattern||w instanceof Ce.LineToolCallout||w instanceof Te.LineToolTrendAngle||w instanceof xe.LineToolGhostFeed||w instanceof Ie.LineToolParallelChannel)null===(u=(d=w).restoreData)||void 0===u||u.call(d,e);else if(t&&(0,me.isStudyLineToolState)(e)&&w.restoreData){const t=e;C&&(t.graphics=C.patchPointsBasedStudyData(t.metaInfo,t.graphics)),null===(p=w.restoreData)||void 0===p||p.call(w,t)}const I=null==e.version?1:e.version,M=null==w.version?1:w.version;if(I!==M&&(null===(m=(_=w).migrateVersion)||void 0===m||m.call(_,I,M,{pane:this,model:this._model,properties:P})),void 0!==b&&w.setZorder(b),r)(0,S.prepareLineToolPropertiesByOwnerSource)(w.properties(),r),w.setOwnerSource(r);else{const t=e.ownerSource?this.dataSourceForId(e.ownerSource):null;w.setOwnerSource(t)}return this._addSourceToCollections(w,s),this._cachedOrderedSources.clear(),w}restoreStudy(e,t,i,s,r,n){var o;if(t&&void 0===e.data&&void 0===e.nonSeriesData&&void 0===e.indexes)return Me.logError("Cannot restore (skipping) study without data "+e.id+", "+e.metaInfo.id),null;const a=e.id,l=e.state,c=e.zorder;i=null!=i?i:this._model.mainSeries().id();const h=(null!==(o=e.parentSources)&&void 0!==o?o:e.ownerSource?[e.ownerSource]:[]).filter((e=>e!==i));let d=(0,ie.clone)(e.metaInfo);if(Object.assign(d,te.StudyMetaInfo.parseIdString(d.id)),function(e){return"Script$TV_EARNINGS@tv-scripting"===e||"Script$TV_DIVIDENDS@tv-scripting"===e||"Script$TV_SPLITS@tv-scripting"===e||"ESD$TV_EARNINGS@tv-scripting"===e||"ESD$TV_DIVIDENDS@tv-scripting"===e||"ESD$TV_SPLITS@tv-scripting"===e||"Earnings@tv-basicstudies"===e||"Dividends@tv-basicstudies"===e||"Splits@tv-basicstudies"===e||"BarSetContinuousRollDates@tv-corestudies"===e}(d.id)&&!t)return Me.logNormal("Skipping study "+d.id),null;let u=l;const p=this._model.studyVersioning(),_=p.patchPropsStateAndMetaInfo(u,d,{oldShowStudyLastValueProperty:t&&!(null==s?void 0:s.showStudyLastValueProperty)});u=_.propsState,d=_.metaInfo;const m=new P.StudyStub(this._model,e,d.shortDescription);let g;m.setId(a),m.setZorder(c);const f=i=>{m.setStatus({type:fe.StudyStatusType.Undefined});const s=i||new te.StudyMetaInfo(d),r=ye.instance(this._model),n=n=>{var o;const l=(0,C.prepareStudyPropertiesForLoadChart)(d,i,u,p),c=(0,j.createStudy)(this._model,l,n,s);if(c.setId(a),c.setOwnFirstValue(null!==(o=e.ownFirstValue)&&void 0!==o?o:null),t){const t=e,{data:i,nsData:s,indexes:r}=p.patchStudyData(d,t.data,t.nonSeriesData,t.indexes);c.restoreData(i,s,r)}this._model.replaceStudyStub(m,c)||(g=c),r.add(a,c)};if(h.length>0){const e=h.map((e=>r.get(e)));Promise.all(e).then(n)}else n([])};if(t)f(null);else{const e=p.updateMetaInfoAsync(d);e.sync?f(e.result):e.result.then(f).catch((e=>m.setFailed("error: "+e)))}const v=null!=g?g:m;if(v){v.setZorder(c);const t=e.metaInfo.linkedToSeries?this._model.mainSeries():h.length?this.dataSourceForId(h[0]):null;v.setOwnerSource(t),this._addSourceToCollections(v,r),this._processMainSourceChange()}return this._cachedOrderedSources.clear(),v}clipboardLineToolOwnerSource(e){ +const t=this.dataSourceForId(e);if(null!==t){const e=t.ownerSource();if(null!==e&&null!==e.firstValue())return e}const i=this.mainDataSource();if(null!==i&&null!==i.firstValue())return i;for(const e of this.dataSources())if((0,re.isPriceDataSource)(e)&&null!==e.firstValue())return e;return null}realignLineTools(e){var t;let i=!1;for(const s of this.m_dataSources)!(0,S.isLineTool)(s)||void 0!==e&&(null===(t=null==s?void 0:s.ownerSource())||void 0===t?void 0:t.symbolSource())!==e&&(0,pe.isActingAsSymbolSource)(e)||(s.realign(),s.updateAllViews((0,W.sourceChangeEvent)(s.id())),i=!0);return i&&this._invalidateSourcesCache(),i}startScalePrice(e,t){e.startScale(t)}scalePriceTo(e,t){e.scaleTo(t),this.updateAllViews((0,W.viewportChangeEvent)())}endScalePrice(e){e.endScale()}startScrollPrice(e,t){e.startScroll(t)}scrollPriceTo(e,t){e.scrollTo(t),this.updateAllViews((0,W.viewportChangeEvent)())}endScrollPrice(e){e.endScroll()}resetPriceScale(e){const t=this.timeScale().visibleBarsStrictRange();e.isLockScale()||e.setMode({autoScale:!0}),e.recalculatePriceRange(t),this.updateAllViews((0,W.viewportChangeEvent)())}restorePriceScaleState(e,t){e.restoreState(t),this.updateAllViews((0,W.viewportChangeEvent)())}beginInsertManyLineDataSources(){this._isInInsertManyDataSourcesState=!0,this._lastLineDataSourceZOrder=null}endInsertManyLineDataSources(){this._isInInsertManyDataSourcesState=!1,this._lastLineDataSourceZOrder=null}removeSourceFromPriceScale(e){const t=e.priceScale();if(null!==t){const i=t.dataSources();i.indexOf(e)>=0&&t.removeDataSource(e),0===i.length&&this.removePriceScale(t)}}_invalidateSourcesCache(){this._cachedOrderedSources.clear(),this._leftPriceScales.forEach((e=>e.invalidateSourcesCache())),this._rightPriceScales.forEach((e=>e.invalidateSourcesCache()))}_processMainSourceChange(){let e=!1;if(null===this.m_mainDataSource)for(const t of this.m_dataSources)if((0,re.isPriceDataSource)(t)&&!this.isOverlay(t)&&(!t.properties().linkedToSeries||!t.properties().linkedToSeries.value())){this.m_mainDataSource=t,e=!0;break}if(this.m_mainDataSource&&e){let e=this.m_dataSources.filter(S.isLineTool);e=(0,ne.sortSources)(e);for(const t of e)this.move(t,(0,n.ensureNotNull)(this.m_mainDataSource.priceScale()),!0)}else if(!this.m_mainDataSource||this.isOverlay(this.m_mainDataSource)&&0===this._nonOverlayPricesSourcesCount()){let e=null;if(this.m_dataSources.includes(this._model.mainSeries()))e=this._model.mainSeries();else for(const t of this.m_dataSources)if((0,re.isPriceDataSource)(t)&&this.isOverlay(t)&&t.showInObjectTree()){e=t;break}if(null!==e){const t=this.m_mainDataSource===e;this.m_mainDataSource=e;const i=this.createNewPriceScaleIfPossible();if(t&&e===this._model.mainSeries()){const t=(0,n.ensureNotNull)(e.priceScale());this._model.children(e,!0).forEach((e=>{this.removeSourceFromPriceScale(e),i.addDataSource(e),e.setPriceScale(i)})),this.removePriceScale(t)}this.move(e,i,!0),this.recalculatePriceScale(e.priceScale(),(0,W.globalChangeEvent)())}}}_addSourceToCollections(e,t){this.m_dataSources.push(e), +this._sourcesById.set(e.id(),e),this._invalidateSourcesCache();const i=()=>{this._sourcePropertiesChanged.fire(e)};e.properties().subscribe(this,i),e.zOrderChanged().subscribe(this,(t=>this._sourcesZOrderChanged.fire(e,t))),(0,S.isLineTool)(e)&&(e.normalizedPointsChanged().subscribe(this,i),e.fixedPointChanged().subscribe(this,i),e.hasAlert.subscribe(i),e.sharingMode().subscribe(i),e.linkKey().subscribe(i),this._sourceWatchedValuesSubscriptions.set(e.id(),i));const s=(0,pe.isSymbolSource)(e)?e:null;(0,re.isPriceDataSource)(e)&&(this._priceSourcesById.set(e.id(),e),e.currencyChanged().subscribe(this,(()=>this._invalidateSourcesCache())),e.unitChanged().subscribe(this,(()=>this._invalidateSourcesCache())),this._priceDataSources.push(e),null!==s&&(this._symbolSources.push(s),s.symbolResolved().subscribe(this,(()=>this._symbolSourceResolved.fire(e))),s.symbolResolvingActive().subscribe(this._recalcSymbolSourceResolvingActive),s.symbolHibernated().subscribe(this._onSymbolSourceCollectionChanged),this._recalcSymbolSourceResolvingActive(),this._onSymbolSourceCollectionChanged())),e.isMultiPaneAvailable()&&this.model().addMultiPaneSource(e),t||0!==this._bulkActions.activeCounter||this._dataSourcesCollectionChanged.fire()}_removeSourceFromCollections(e,t){const i=this.m_dataSources[e];i.properties().unsubscribeAll(this),i.zOrderChanged().unsubscribeAll(this),this.m_dataSources.splice(e,1),this._sourcesById.delete(i.id());const s=i.id();if((0,S.isLineTool)(i)&&(i.normalizedPointsChanged().unsubscribeAll(this),i.fixedPointChanged().unsubscribeAll(this),this._sourceWatchedValuesSubscriptions.has(s))){const e=this._sourceWatchedValuesSubscriptions.get(s);i.hasAlert.unsubscribe(e),i.linkKey().unsubscribe(e)}this._invalidateSourcesCache();const r=(0,pe.isSymbolSource)(i)?i:null;(0,re.isPriceDataSource)(i)&&(this._priceSourcesById.delete(i.id()),i.currencyChanged().unsubscribeAll(this),i.unitChanged().unsubscribeAll(this),(0,v.removeItemFromArray)(this._priceDataSources,i),null!==r&&((0,v.removeItemFromArray)(this._symbolSources,r),r.symbolResolved().unsubscribeAll(this),r.symbolResolvingActive().unsubscribe(this._recalcSymbolSourceResolvingActive),r.symbolHibernated().unsubscribe(this._onSymbolSourceCollectionChanged),this._recalcSymbolSourceResolvingActive(),this._onSymbolSourceCollectionChanged())),i.isMultiPaneAvailable()&&this.model().removeMultiPaneSource(i),t||0!==this._bulkActions.activeCounter||this._dataSourcesCollectionChanged.fire()}_recalculatePriceScaleByScaleRatio(e){this.isMainPane()&&e===this._lockedPriceScale&&(null!==this._currentPriceScaleRatio?this._applyOldScaleRatioToPriceScale():this._tryToApplyNewPriceScaleRatio())}_defaultBottomMargin(){return.01*this.properties().childs().bottomMargin.value()}_defaultTopMargin(){return.01*this.properties().childs().topMargin.value()}_updateMargins(){const e=this._defaultTopMargin(),t=this._defaultBottomMargin();for(const i of this._leftPriceScales)Ae(i,e,t);for(const i of this._rightPriceScales)Ae(i,e,t);for(const i of this.m_dataSources)if(this.isOverlay(i)){ +const s=i.priceScale();null!==s&&(Ae(s,e,t),this.recalculatePriceScale(s,(0,W.viewportChangeEvent)()))}for(const e of this._leftPriceScales)this.recalculatePriceScale(e,(0,W.viewportChangeEvent)());for(const e of this._rightPriceScales)this.recalculatePriceScale(e,(0,W.viewportChangeEvent)());this.updateAllViews((0,W.viewportChangeEvent)())}_batchReorder(e,t,i){i(this.sourcesByGroup().allExceptSpecialSources(),e,t),this._invalidateSourcesCache(),this._dataSourcesCollectionChanged.fire(),this.model().fullUpdate()}_placePriceScale(e,t,i){if("overlay"===t)return void e.invalidateMargins();const s="left"===t?this._leftPriceScales:this._rightPriceScales,r=void 0===i?s.length:i;s.splice(r,0,e),e.modeChanged().subscribe(this,this._onPriceScaleModeChanged.bind(this,e)),e.internalHeightChanged().subscribe(this,this._recalculatePriceScaleByScaleRatio.bind(this,e)),e.priceRangeChanged().subscribe(this,this._recalculateTimeScaleByScaleRatio.bind(this,e)),e.priceRangeChanged().subscribe(this,this._onPriceScaleSetMinMaxPriceRange.bind(this,e)),e.isLockScale()&&((0,n.assert)(null===this._lockedPriceScale),this._lockedPriceScale=e,this._currentPriceScaleRatio=null),e.invalidateMargins(),this._onPriceScalesChanged.fire()}_onPriceScaleModeChanged(e,t,i){if(i.lockScale&&(this._lockedPriceScale!==e&&null!==this._lockedPriceScale&&this._lockedPriceScale.setMode({lockScale:!1}),this._lockedPriceScale=e,this._currentPriceScaleRatio=(0,de.scaleRatio)(this.timeScale(),e)),t.lockScale&&!i.lockScale&&(this._lockedPriceScale=null,this._currentPriceScaleRatio=null),t.percentage===i.percentage&&t.indexedTo100===i.indexedTo100)return;const s=this.timeScale().visibleBarsStrictRange();null!==s&&(e.recalculatePriceRange(s),e.updateAllViews((0,W.viewportChangeEvent)()))}_applyOldScaleRatioToPriceScale(){this._isRecalculatingScales||null===this._currentPriceScaleRatio||null===this._lockedPriceScale||(this._isRecalculatingScales=!0,this._setNewPriceRangeByScaleRatio(this._lockedPriceScale,this._currentPriceScaleRatio,this._mainSourceVisiblePriceRange(this._lockedPriceScale)),this._isRecalculatingScales=!1)}_setNewPriceRangeByScaleRatio(e,t,i,s,r){const n=(0,de.priceRangeByScaleRatio)(e,this.timeScale().barSpacing(),t);e.setPriceRange(null!==n?n:i,s,r)}_applyOldScaleRatioToTimeScale(){this._isRecalculatingScales||null===this._currentPriceScaleRatio||(this._isRecalculatingScales=!0,this._setNewBarSpacingByScaleRatio(),this._isRecalculatingScales=!1)}_tryToApplyNewPriceScaleRatio(){const e=(0,n.ensureNotNull)(this._lockedPriceScale),t=(0,de.scaleRatio)(this.timeScale(),e);this._currentPriceScaleRatio===t||e.isLog()||(this._currentPriceScaleRatio=t,this.model().mainSeriesScaleRatioPropertyOnChanged())}_recalculateTimeScaleByScaleRatio(e){e===this._lockedPriceScale&&(null!==this._currentPriceScaleRatio?this._applyOldScaleRatioToTimeScale():this._tryToApplyNewPriceScaleRatio())}_setNewBarSpacingByScaleRatio(){const e=this.timeScale().getValidBarSpacing((0,de.barSpacingByScaleRatio)((0,n.ensureNotNull)(this._lockedPriceScale),this._currentPriceScaleRatio)) +;this.timeScale().isValidBarSpacing(e)&&this.timeScale().setBarSpacing(e)}_mainSourceVisiblePriceRange(e){const t=this.timeScale().visibleBarsStrictRange();return null!==t?(0,n.ensureNotNull)((0,n.ensureNotNull)(e.mainSource()).priceRange(t.firstBar(),t.lastBar())):new ue.PriceRange(-.5,.5)}_setMinMaxPriceRange(){const e=(0,n.ensureNotNull)(this._lockedPriceScale),t=(0,de.priceRangeByScaleRatio)(e,this.timeScale().maxBarSpacing(),this._currentPriceScaleRatio),i=(0,de.priceRangeByScaleRatio)(e,this.timeScale().minBarSpacing(),this._currentPriceScaleRatio);null!==t&&e.setMaxPriceRange(t),null!==i&&e.setMinPriceRange(i)}_onPriceScaleSetMinMaxPriceRange(e){e===this._lockedPriceScale&&this._setMinMaxPriceRange()}_nonOverlayPricesSourcesCount(){return this.m_dataSources.filter((e=>(!e.properties().linkedToSeries||!e.properties().linkedToSeries.value())&&((0,re.isPriceDataSource)(e)&&e.showInObjectTree()&&!this.isOverlay(e)))).length}_restoreMainSeries(e,t,i,s,r,n){const o=e.id,a=e.state;if(a&&r&&(a.style=r.style||a.style,a.interval=r.interval||a.interval,r.symbol&&r.symbol!==a.symbol&&(a.symbol=r.symbol,delete a.currencyId,delete a.unitId)),a&&["candleStyle","hollowCandleStyle","haStyle"].forEach((e=>{a[e]&&(a[e].wickUpColor=a[e].wickUpColor||a[e].wickColor,a[e].wickDownColor=a[e].wickDownColor||a[e].wickColor)})),a&&(a.statusViewStyle=a.statusViewStyle||{},!a.statusViewStyle.symbolTextSource)){const e=!!a.statusViewStyle.showSymbolAsDescription;a.statusViewStyle.symbolTextSource=e?"ticker":"description"}if(a&&(a.extendedHours?a.sessionId="extended":a.sessionId||(a.sessionId="regular"),delete a.extendedHours),!i){const e=this._model.mainSeries();this._model.mainPane().removeDataSource(e,!1,n),this._addSourceToCollections(e,n)}const l=this.model().mainSeries(),c=l.properties().childs();this.m_mainDataSource=l;const h=a&&a.style?a.style:void 0;if(6===h&&"ATR"===c.pnfStyle.childs().inputs.childs().style.value()?c.pnfStyle.childs().inputs.childs().style.setValueSilently("Traditional"):4===h&&"ATR"===c.renkoStyle.childs().inputs.childs().style.value()&&c.renkoStyle.childs().inputs.childs().style.setValueSilently("Traditional"),a&&!a.hasOwnProperty("showSessions")&&(a.showSessions=!1),a&&void 0===a.settlementAsClose&&(a.settlementAsClose=!1),a&&t&&(a.showCountdown=!1),a&&(t&&!("showSeriesLastValueProperty"in s)&&"showLastValue"in a&&this._model.properties().childs().scalesProperties.childs().showSeriesLastValue.setValue(a.showLastValue),delete a.showLastValue),a){const t={haStyle:(0,O.chartStyleStudyId)(8,!0),renkoStyle:(0,O.chartStyleStudyId)(4,!0),pbStyle:(0,O.chartStyleStudyId)(7,!0),kagiStyle:(0,O.chartStyleStudyId)(5,!0),pnfStyle:(0,O.chartStyleStudyId)(6,!0),rangeStyle:(0,O.chartStyleStudyId)(11,!0)},i=this._model.studyVersioning(),s=l.styleStudyInfos(),r=Object.keys(ge.SYMBOL_STRING_DATA);for(let n=0;nthis._right+.5?!0===t&&2:!0!==t||0}before(e){return ethis._right+.5}equals(e){return this._left===e.left()&&this._right===e.right()}static compare(e,t){return null===e||null===t?e===t:e.equals(t)}}var Re=i(90593);const Ne=(0,Z.getLogger)("Chart.TimePoints");function Oe(e,t){return null===e||null===t?e===t:e.firstIndex===t.firstIndex&&e.lastIndex===t.lastIndex}class Fe{constructor(){this._zoffset=0,this._items=[],this._range=new Re.WatchedObject(null,Oe)}clear(){this._zoffset=0,this._items=[],this._range.setValue(null)}size(){return this._items.length}range(){return this._range.readonly()}merge(e,t,i){const s=this._mergeImpl(e,t,i);return this._updateFirstAndLastIndex(),s}addTail(e,t){for(let i=t?1:0;ithis._items[this._items.length-1])return t?this._validOffsetToIndex(this._items.length-1):null;for(let i=0;io){const i=e-o;if(i<500&&null!=t)return t(l,i);return l+i*c}return null}roughIndex(e,t=null){const i=this._items;if(!i.length||i.length<2)return null;const s=i.length-1,r=this._validOffsetToIndex(0),n=this._validOffsetToIndex(s),o=i[0],a=i[s];if(e>=o&&e<=a)return this.closestIndexLeft(e);const l=(a-o)/(n-r);if(ea){const i=e-a +;let s=Math.trunc(i/l);if(s<500&&null!==t){const i=t(a,e);i.success&&(s=i.result)}return n+s}return null}closestIndexLeft(e){const t=this._items;if(!t.length)return null;if(Number.isNaN(e))return null;let i=t.length-1;if(e>=t[i])return this._validOffsetToIndex(i);let s=0;const r=t[s];if(es+1;){const r=s+i>>1,n=t[r];if(n>e)i=r;else{if(!(nthis._zoffset&&e+t>0)return Ne.logError("merge: when the first time point index is updated, we should fill the time points starting from the first one"),[];if(0===this._items.length)return this._items=i.slice(),this._zoffset=t,[{change:"rebuild",index:this._validOffsetToIndex(0)}];const s=e+this._zoffset;if(s<0){const r=Math.abs(s);if(i.lengththis._items.length){const e=o-this._items.length;for(let t=n;t{this._usePercentageRightOffset.setValue(!1),this._defaultRightOffsetOptionsUpdated()})),this._defaultRightOffsetPercentage.subscribe((e=>{if(e>=100||e<0){const t=Math.max(0,Math.min(e,99));this._defaultRightOffsetPercentage.setValue(t)}else this._usePercentageRightOffset.setValue(!0),this._defaultRightOffsetOptionsUpdated()})),this._usePercentageRightOffset.subscribe((()=>{this._defaultRightOffsetOptionsUpdated()})),this._options.preserveBarSpacing&&(this._barSpacing=this._scalesProperties.childs().barSpacing.value()||6),this._barSpacingChanged.subscribe(this,this._maxRightOffsetOnChanged),this._widthChanged.subscribe(this,this._maxRightOffsetOnChanged)}destroy(){this._barSpacingChanged.unsubscribeAll(this),this._barSpacingChanged.destroy(),this._widthChanged.unsubscribeAll(this),this._widthChanged.destroy()}isEmpty(){return 0===this._width||!this.canNormalize()}canNormalize(){return this._points.size()>0}update(e,t,i,s){this._visibleBarsInvalidated=!0,i.length>0&&this._points.merge(e,t,i),this._tickMarks.merge(s),this.correctOffset()}addTail(e,t,i){this._tickMarks.removeTail(t);const s=e.params,r=(0,n.ensureDefined)(this._tickMarks.maxIndex)+(i?0:1);for(let e=0;e0&&(i*=this._width/e.width)),this._tryToUpdateBarSpacing(this._barSpacing,i),this.correctOffset(),this._usePercentageRightOffset.value()&&(this._rightOffset=this.percentsToBarIndexLength(this._defaultRightOffsetPercentage.value())),this._rightOffsetChanged.fire(this._rightOffset)}marks(){if(this.isEmpty())return null;const e=this._barSpacing,t=5*((this._scalesProperties.childs().fontSize.value()||0)+4),i=Math.round(t/e),s=(0,n.ensureNotNull)(this.visibleBarsStrictRange()),r=Math.max(s.firstBar(),s.firstBar()-i),o=Math.max(s.lastBar(),s.lastBar()-i),a=this._tickMarks.build(e,t),l=[];for(const e of a){if(!(r<=e.index&&e.index<=o))continue;const t=this._tickMarks.indexToTime(e.index);null!==t&&l.push({coord:this.indexToCoordinate(e.index),label:this.formatLabel(t,e.span),span:e.span,major:e.label>=je.DAY_SPAN})}return l}visibleBarsStrictRange(){return this._visibleBarsInvalidated&&(this._visibleBarsInvalidated=!1,this._updateVisibleBars()),this._visibleBars.strictRange()}visibleBarsStrictRangeChanged(){return this._visibleBarsChanged}visibleStrictDataRange(e){const t=this.visibleBarsStrictRange();if(null===t)return null;const i=e.search(t.firstBar(),Je.PlotRowSearchMode.NearestRight),s=e.search(t.lastBar(),Je.PlotRowSearchMode.NearestLeft);return null===i||null===s?null:new Be.BarsRange(i.index,s.index)}visibleExtendedDataRange(e,t){const i=this.visibleBarsStrictRange();if(null===i)return null;let s=1===t?null:e.search(i.firstBar()-1,Je.PlotRowSearchMode.NearestLeft),r=0===t?null:e.search(i.lastBar()+1,Je.PlotRowSearchMode.NearestRight);return null===s&&(s=e.search(i.firstBar(),Je.PlotRowSearchMode.NearestRight)),null===r&&(r=e.search(i.lastBar(),Je.PlotRowSearchMode.NearestLeft)), +null===s||null===r?null:new Be.BarsRange(s.index,r.index)}logicalRangeChanged(){return this._logicalRangeChanged}tickMarks(){return this._tickMarks}points(){return this._points}width(){return this._width}setWidth(e,t){if(!Number.isFinite(e)||e<=0)return void it.logWarn(`setWidth: invalid argument: ${e}`);if(this._width===e)return;if(this._visibleBarsInvalidated=!0,(t||this._options.lockVisibleTimeRangeOnResize)&&this._width){const t=this._barSpacing*e/this._width;this._tryToUpdateBarSpacing(this._barSpacing,t)}else this._width&&this.setBarSpacing(this._barSpacing);if(null!==this._leftEdgeIndex){if((0,n.ensureNotNull)(this.visibleBarsStrictRange()).firstBar()<=this._leftEdgeIndex){const t=this._width-e;this._rightOffset-=Math.round(t/this._barSpacing)+1}}const i=this._usePercentageRightOffset.value()&&this._rightOffset>0?this.barIndexLengthToPercents(this._rightOffset):-1;this._width=e,this._widthChanged.fire(e);const s=this._rightOffset;i>0?this._rightOffset=this.percentsToBarIndexLength(i):this.correctOffset(),this._rightOffset!==s&&this._rightOffsetChanged.fire(this._rightOffset),this._requestMoreData()}setLeftEdgeFix(e){this._leftEdgeIndex=e;const t=this.visibleBarsStrictRange();if(null===t)return;const i=t.firstBar()-e;if(i<0){const e=this._rightOffset-i-1;this.scrollToOffsetAnimated(e,500)}}indexToCoordinate(e){if(this.isEmpty())return 0;if(!(0,ie.isInteger)(e))return 0;const t=this.baseIndex()+this._rightOffset-e;return this._width-(t+.5)*this._barSpacing-1}indexToUserTime(e){return this._tickMarks.indexToTime(e)}timePointToIndex(e,t){switch(t){case 0:return this._points.indexOf(e,!1);case 1:return this._points.closestIndexLeft(e);default:return this._points.indexOf(e,!0)}}indexToTimePoint(e){return this._points.valueAt(e)}timeToCoordinate(e){const t=this._points.closestIndexLeft(e);if(null===t)return null;const i=(0,n.ensureNotNull)(this._points.valueAt(t)),s=this.indexToCoordinate(t);if(s<=0||s>=this._width)return null;const r=this.barSpacing(),o=this.baseIndex(),a=s+(e-i)/((0,n.ensureNotNull)(this._points.valueAt(o))-(0,n.ensureNotNull)(this._points.valueAt(o-1)))*r+1;return a<=0||a>=this._width?null:a}barIndexesToCoordinates(e){const t=this.baseIndex();for(const i of e){const e=i.time,s=t+this._rightOffset-e,r=this._width-(s+.5)*this._barSpacing-1;i.time=r}}timedValuesToCoordinates(e,t,i){var s,r;const n=this.baseIndex()+this._rightOffset,o=this._width-n*this._barSpacing-.5*this._barSpacing-1,a=null!==(s=null==t?void 0:t.startItemIndex)&&void 0!==s?s:0;let l=a;const c=null!==(r=null==t?void 0:t.endItemIndex)&&void 0!==r?r:e.length;!0===i&&(l=(0,v.upperbound)(e,We.UNPLOTTABLE_TIME_POINT_INDEX,((e,t)=>e{void 0!==t&&t(),this._requestMoreData()};if(e){const e=this._rightOffset,t=this.maxRightOffset();t>0&&i>t&&(i=t);const r=this._model;(0,Ze.doAnimate)({from:e,to:i,duration:1e3,easing:ke.easingFunc.easeInOutQuint,onComplete:s,onStep:(e,t)=>{this._visibleBarsInvalidated=!0,this._updateRightOffset(t),this._onScroll.fire(),r.recalculateAllPanes((0,W.viewportChangeEvent)()),r.lightUpdate(),r.recalcVisibleRangeStudies()}})}else this._visibleBarsInvalidated=!0,this._updateRightOffset(i),this._onScroll.fire(),s()}scrollToFirstBar(){this._model.gotoTime(new Date("1800-01-01").getTime()),this._onScroll.fire()}scrollToOffsetAnimated(e,t){if(!isFinite(e))throw new RangeError("offset is required and must be finite number");const i=void 0===t?400:t;if(!isFinite(i)||i<=0)throw new RangeError("animationDuration (optional) must be finite positive number");const s=this._rightOffset,r=Date.now(),n=()=>{this._visibleBarsInvalidated=!0;const t=(Date.now()-r)/i;if(t>=1)return this._updateRightOffset(e),this._visibleBarsInvalidated=!0,this._model.recalculateAllPanes((0,W.viewportChangeEvent)()),void this._model.lightUpdate();const o=s+(e-s)*t;this._updateRightOffset(o),this._model.recalculateAllPanes((0,W.viewportChangeEvent)()),setTimeout(n,20)};n()}defaultRightOffset(){return this._defaultRightOffset}rightOffsetDefaultValue(){return 10}defaultRightOffsetPercentage(){return this._defaultRightOffsetPercentage}usePercentageRightOffset(){return this._usePercentageRightOffset}barSpacing(){return this._barSpacing}setBarSpacing(e){Number.isFinite(e)?(e=this.getValidBarSpacing(e),this._tryToUpdateBarSpacing(this._barSpacing,e)&&(this.correctOffset(),this._options.preserveBarSpacing&&((0,x.saveDefaultProperties)(!0),this._scalesProperties.childs().barSpacing.setValue(this._barSpacing),(0,x.saveDefaultProperties)(!1)),this._model.recalculateAllPanes((0,W.viewportChangeEvent)()),this._model.lightUpdate())):it.logWarn(`setBarSpacing: invalid argument: ${e}`)}barSpacingChanged(){return this._barSpacingChanged}getValidBarSpacing(e){return null==e&&(e=this.barSpacing()),ethis.maxBarSpacing()?this.maxBarSpacing():e}isValidBarSpacing(e){return e>=this.minBarSpacing()&&e<=this.maxBarSpacing()}preserveBarSpacing(){return this._options.preserveBarSpacing}normalizeBarIndex(e){let t=0,i=0;const s=this.baseIndex(),r=(0,n.ensureNotNull)(this._points.range().value()).firstIndex;return es?(t=(0,n.ensureNotNull)(this._points.valueAt(s)),i=e-s):(t=(0,n.ensureNotNull)(this._points.valueAt(e)),i=0),{time_t:t,offset:i}}denormalizeTimePoint(e){const t=this._points.indexOf(e.time_t,!1);if(null!==t)return t+e.offset}rightOffset(){return this._rightOffset}rightOffsetChanged(){return this._rightOffsetChanged}minRightOffset(){var e +;const t=null===(e=this.points().range().value())||void 0===e?void 0:e.firstIndex,i=this._baseIndex;if(void 0===t||null===i)return null;if(null!==this._leftEdgeIndex){const e=this.width()/this._barSpacing;return this._leftEdgeIndex-i+e-1}return t-i-1+tt}maxRightOffset(){return this.width()/this._barSpacing-tt}maxRightOffsetChanged(){return this._maxRightOffsetChanged}onReset(){return this._resetDelegate}scrollStartPoint(){return this._scrollStartPoint}baseIndex(){return this._baseIndex||0}zoom(e,t,i){if(!Number.isFinite(e)||!Number.isFinite(t))return void it.logWarn(`zoom: invalid arguments: ${e}, ${t}, ${i}`);const s=this.rightOffset(),r=void 0!==i?!i:this._options.rightBarStaysOnScroll,n=r&&this.usePercentageRightOffset().value()&&s>=0,o=n?this.barIndexLengthToPercents(s):void 0,a=this.coordinateToIndex(e),l=this.barSpacing(),c=l+t*(l/10);this.setBarSpacing(c),r||this.setRightOffset(s-.5+(a-this._coordinateToFloatIndex(e))),n&&void 0!==o&&this.setRightOffset(this.percentsToBarIndexLength(o)),this._requestMoreData()}zoomToBarsRange(e,t){if(null!==this._leftEdgeIndex&&(e=Math.max(e,this._leftEdgeIndex)),t<=e)return;const i=this.baseIndex(),s=this._rightOffset;this._rightOffset=t-i;const r=Math.max(t-e+1,tt);this.setBarSpacing(this.width()/r),this._visibleBarsInvalidated=!0,this.correctOffset(),this._rightOffset!==s&&this._rightOffsetChanged.fire(this._rightOffset),this._requestMoreData()}coordinateToIndex(e){return Math.ceil(this._coordinateToFloatIndex(e))}coordinateToVisibleIndex(e){let t;if(0===e){const e=this._coordinateToFloatIndex(-1);t=Math.floor(e)+1}else t=this.coordinateToIndex(e);const i=this.visibleBarsStrictRange();return null===i||i.contains(t)||(t=Math.min(Math.max(i.firstBar(),t),i.lastBar())),t}canZoomIn(){return this.barSpacing()this._options.minBarSpacing}minBarSpacing(){return this._options.minBarSpacing}maxBarSpacing(){const e=this.width();return et?e:e/tt}minVisibleBarCount(){return tt}resetRightOffset(){this.setRightOffset(this.targetDefaultRightOffset())}reset(){this._visibleBarsInvalidated=!0,this._points.clear(),this._scrollStartPoint=null,this._scaleStartPoint=null,this._clearCommonTransitionsStartState(),this._tickMarks.reset(),this._leftEdgeIndex=null,this._resetDelegate.fire(),this.disconnect()}disconnect(){this._requestingMoreData=!1,this._requestedTickmarksCount=0,this._endOfData=!1}setBaseIndex(e){Number.isFinite(e)?(this._visibleBarsInvalidated=!0,this._baseIndex=e,this.correctOffset()):it.logDebug(`setBaseIndex: invalid argument: ${e}`)}resetBaseIndex(){this._visibleBarsInvalidated=!0,this._baseIndex=null}setRightOffset(e){Number.isFinite(e)?(this._visibleBarsInvalidated=!0,this._updateRightOffset(e)):it.logWarn(`setRightOffset: invalid argument: ${e}`)}correctBarSpacing(){this.isEmpty()||this.points().size()e&&(this._rightOffset=e,this._visibleBarsInvalidated=!0);const t=this.minRightOffset();null!==t&&this._rightOffsetthis.formatLabelImpl(e,t))),this._formattedBySpan.set(i,s)),s.format(new Date(e))}formatLabelImpl(e,t){if(!(e&&e instanceof Date))return"incorrect time";const s=function(e,t){if(e{e.onChanged().subscribe(null,(t=>this._onChanged.fire(e.id,t)))}))}groups(){return this._groups.filter((e=>e.isActualSymbol()))}groupsForAllSymbols(){return this._groups}createGroup(e,t,i){t=t||this._generateNextName();const s=new at.LineToolsGroup(e,t,i);this._groups.push(s),s.onChanged().subscribe(null,(e=>this._onChanged.fire(s.id,e)));const r={visibilityChanged:!1,lockedChanged:!1,titleChanged:!1,isActualIntervalChanged:!1,affectedLineTools:e.map((e=>e.id()))};return this._onChanged.fire(s.id,r),s}addGroup(e){this._groups.push(e),e.onChanged().subscribe(null,(t=>this._onChanged.fire(e.id,t))),this._onChanged.fire(e.id)}removeGroup(e){const t=this._groups.findIndex((t=>t.id===e.id));this._groups.splice(t,1),this._onChanged.fire(e.id)}groupForId(e){return this._groups.find((t=>t.id===e))||null}groupForLineTool(e){return this._groups.find((t=>t.containsLineTool(e)))||null}removeLineTools(e){const t=new Set;this._groups.forEach((i=>{const s=e.filter(i.containsLineTool.bind(i));s.length&&(i.excludeLineTools(s),t.add(i.id))}));return this._groups.filter((e=>0===e.lineTools().length)).forEach((e=>this.removeGroup(e))),Array.from(t)}state(e){return{groups:(e?this._groups.filter((e=>e.isActualSymbol())):this._groups).map((e=>e.state()))}}onChanged(){return this._onChanged}fireChangedAll(){this._groups.forEach((e=>{this._onChanged.fire(e.id)}))}static fromState(e,t){const i=[];for(const s of t.groups){const t=at.LineToolsGroup.fromState(e,s);null!==t&&i.push(t)}return new lt(i)}_generateNextName(){const e=new Set(this.groups().map((e=>e.name())));for(let t=1;;t++){const i=`Group ${t}`,s=`Group_${t}`;if(!e.has(i)&&!e.has(s))return i}}}var ct=i(14948),ht=i(32769),dt=i.n(ht),ut=i(69228);let pt=null;function _t(e){return Boolean(e.symbolInfo.timezone)&&Boolean(e.symbolInfo.session)}class mt{constructor(e,t){ +var i,s;this._sourceTargetBarBuilder=null,this._cache=new Map,this._source=e,this._sourceSession=ut.SessionInfo.fromState(e.session),this._target=t,this._targetSession=ut.SessionInfo.fromState(t.session),this._isResolutionTheSame=T.Interval.isEqual(e.resolution,t.resolution),this._isSessionTheSame=(i=e.symbolInfo,s=t.symbolInfo,i.timezone===s.timezone&&i.session===s.session&&i.session_holidays===s.session_holidays&&i.corrections===s.corrections),this._shouldCorrectTradingDay=T.Interval.isDWM(e.resolution)&&!this._isSessionTheSame}sourceTimeToTargetTime(e){if(this._isSessionTheSame&&this._isResolutionTheSame)return e;if(!_t(this._source)||!_t(this._target))return e;let t=this._cache.get(e);if(void 0===t){let i=1e3*e;if(this._shouldCorrectTradingDay){let e=dt().utc_to_cal(this._sourceSession.timezone,i);e=this._sourceSession.spec.correctTradingDay(e);const t=new Date(e);dt().set_hms(t,0,0,0,0,this._sourceSession.timezone),i=t.valueOf()}const s=this._sourceTargetBuilder();s.moveTo(i);const r=s.indexOfBar(i);t=s.startOfBar(Math.max(0,r))/1e3,this._cache.set(e,t)}return t}_sourceTargetBuilder(){if(null===this._sourceTargetBarBuilder){const e=this._isSessionTheSame?this._targetSession:(null===pt&&(pt=new ut.SessionInfo("Etc/UTC","24x7")),pt);this._sourceTargetBarBuilder=(0,ut.newBarBuilder)(this._target.resolution,this._targetSession,e)}return this._sourceTargetBarBuilder}}var gt=i(76076),ft=i(38031),vt=i(27642),St=i(4978);function yt(e,t){return e.codet.code?1:0}class bt{constructor(e){this._convertibleItems=e,this._idsToItems=new Map;for(const t of e)this._idsToItems.set(t.id,t)}convertible(e){return void 0!==this._idsToItems.get(e)}item(e){var t;return null!==(t=this._idsToItems.get(e))&&void 0!==t?t:null}size(){return this._convertibleItems.length}filterConvertible(e,t){const i=this._convertibleItems.filter(function(e,t){return i=>!e.has(i.id)&&t(i.id)}(e,t));return i.sort(yt),i}}class wt{constructor(e){this._allGroups=new Set,this._idToName=new Map,this._idToDescription=new Map,this._groupedUnitIds=new Map,this._groupedUnits=new Map,this._groupById=new Map,this._size=0,this._units=e;for(const t in e)if(e.hasOwnProperty(t)){this._allGroups.add(t),this._groupedUnitIds.set(t,new Set(e[t].map((e=>e.id)))),this._groupedUnits.set(t,e[t]);for(const i of e[t])this._size++,this._idToName.set(i.id,i.name),this._idToDescription.set(i.id,i.description),this._groupById.set(i.id,t)}}unitsChanged(e){return this._units!==e}size(){return this._size}name(e){return this._idToName.get(e)||e}description(e){return this._idToDescription.get(e)||e}unitGroupById(e){return this._groupById.get(e)||null}allGroups(){return new Set(this._allGroups)}unitsByGroups(e){const t=[];return e.forEach((e=>{const i=this._groupedUnits.get(e);void 0!==i&&t.push({name:e,units:i})})),t}convertible(e,t){for(const i of t){const t=this._groupedUnitIds.get(i);if(void 0!==t&&t.has(e))return!0}return!1}}var Pt=i(50335);class Ct{constructor(e){this._source=null,this._sourcePane=null,this._currentToolSupportsPhantomMode=!1,this._model=e}destroy(){ +this._source=null,this._sourcePane=null}source(){return this._source}onToolChanged(){this._removeSource();const e=this._model.currentTool();this._currentToolSupportsPhantomMode=(0,S.isLineToolName)(e)&&(0,S.supportsPhantomMode)(e)}onCursorPositionUpdated(){if(!this._currentToolSupportsPhantomMode)return;const e=this._model.crossHairSource();if(this._sourcePane!==e.pane&&this._removeSource(),null===e.pane||!(0,Pt.isNumber)(e.index)||!(0,Pt.isNumber)(e.price))return void this._removeSource();const t={index:e.index,price:e.price};null!==this._source?this._source.setPoint(0,t):(this._source=this._model.createLineTool(e.pane,t,this._model.currentTool(),void 0,null),this._sourcePane=e.pane)}_removeSource(){null!==this._source&&(this._model.removeSource(this._source),this._source=null,this._sourcePane=null)}}var Tt=i(45673),xt=i(64810),It=i(71248);class Mt{constructor(){this._lastValue=null}align(e,t,i){this._lastValue=null;let s=e;if(!(0,It.magnetEnabled)().value())return s;const r=i.mainDataSource();if(null===r)return s;const o=r.model().mainSeries();if(r!==o)return s;const a=o.priceScale();if(a.isEmpty())return s;const l=function(e,t){const i=e.bars().valueAt(t);if(null===i)return;let s;s=null!==e.priceSource()?[e.barFunction()(i)]:12===e.style()?[i[2],i[3]]:[i[1],i[2],i[3],i[4]];return s}(o,t);if(!l)return s;const c=(0,n.ensure)(o.firstValue()),h=l.map((e=>({y:a.priceToCoordinate(e,c),price:e}))),d=a.priceToCoordinate(e,c);h.sort(((e,t)=>Math.abs(e.y-d)-Math.abs(t.y-d)));const u=h[0];return((0,It.magnetMode)().value()===xt.MagnetMode.StrongMagnet||Math.abs(u.y-d)<50)&&(s=u.price,this._lastValue=s),s}lastValue(){return this._lastValue}resetLastValue(){this._lastValue=null}}var At=i(8950),Lt=i(80230),kt=i(9740);class Et{constructor(){this._data=null}setData(e){this._data=e}draw(e,t){if(null===this._data)return;const i=t.pixelRatio,s=Math.max(1,Math.floor(i));e.lineWidth=s;const r=Math.ceil(this._data.h*i),n=Math.ceil(this._data.w*i);if(e.save(),e.lineCap="butt",this._data.vertLinesVisible){e.strokeStyle=this._data.vertLinesColor,(0,kt.setLineStyle)(e,this._data.vertLineStyle);for(const t of this._data.timeMarks){const s=Math.round(t.coord*i);(0,kt.drawVerticalLine)(e,s,0,r)}}if(this._data.horzLinesVisible){e.strokeStyle=this._data.horzLinesColor,(0,kt.setLineStyle)(e,this._data.horzLineStyle);for(const t of this._data.priceMarks){const s=Math.round(t.coord*i);(0,kt.drawHorizontalLine)(e,s,0,n)}}e.restore()}hitTest(e){return null}}var Dt=i(53479);class Bt{constructor(e){this._renderer=new Et,this._pane=e}update(){}renderer(){const e=this._pane.defaultPriceScale(),t=this._pane.model().timeScale();if(e.isEmpty()||t.isEmpty())return null;const i=this._pane.model().properties().childs().paneProperties.childs(),s=t.marks(),r={horzLinesVisible:!0,vertLinesVisible:!0,horzLinesColor:i.horzGridProperties.childs().color.value(),vertLinesColor:i.vertGridProperties.childs().color.value(),horzLineStyle:Dt.LINESTYLE_SOLID,vertLineStyle:Dt.LINESTYLE_SOLID,priceMarks:e.marks(),timeMarks:null!==s?s:[],w:this._pane.width(), +h:this._pane.height()};return this._renderer.setData(r),this._renderer}}class Vt extends Lt.DataSource{id(){return"grid"}paneViews(e){return[new Bt(e)]}}var Rt=i(67876);class Nt extends Rt.PriceAxisView{constructor(e,t,i){super(),this._source=e,this._priceScale=t,this._priceProvider=i,this._properties=e.model().properties().childs().scalesProperties}setHitTestData(e){this._hitTestData=e}additionalPadding(e){return 0}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const s=this._priceScale,r=s.mainSource(),n=null!==r?r.firstValue():null;if(!this._isVisible()||s.isEmpty()||null===n)return;const o=this._priceProvider(s);if(null===o)return;i.background=(0,ft.resetTransparency)(this._bgColor()),i.textColor=this.generateTextColor(i.background);const a=this.additionalPadding(s.fontSize());i.additionalPaddingTop=a,i.additionalPaddingBottom=a,i.coordinate=s.priceToCoordinate(o,n),e.text=s.formatPrice(o,n),e.visible=!0,t.visible=!0,t.hitTestData=this._hitTestData}}class Ot extends Nt{additionalPadding(e){return 2/12*e}_isVisible(){return this._properties.childs().showPriceScaleCrosshairLabel.value()&&this._source.visible&&null!==this._source.pane}_bgColor(){const e=this._properties.childs();return this._source.model().isDark()?e.crosshairLabelBgColorDark.value():e.crosshairLabelBgColorLight.value()}_updateRendererData(e,t,i){const s=t.visible;super._updateRendererData(e,t,i),this._source.isHovered()?t.backgroung=this._source.model().isDark()?l.colorsPalette["color-cold-gray-600"]:l.colorsPalette["color-cold-gray-650"]:t.backgroung=void 0,s||(t.visible=s)}}class Ft extends Nt{_isVisible(){return null!==this._source.measurePane().value()}_bgColor(){return this._properties.childs().axisLineToolLabelBackgroundColorCommon.value()}}var Wt=i(64636),Ht=(i(43986),i(60223));function zt(e){const t=e.priceScale();return null===t?0:t.isPercentage()||t.isIndexedTo100()?2:1}const Ut=N.enabled("show_context_menu_in_crosshair_if_only_one_item");class jt extends Wt.PanePriceAxisView{constructor(e,t,i,s,r){super(e,t,s),this._crossHairMenuCachedState=null,this._hasActions=!1,this._tooltipText=null,this._gaOrigin="CH menu",this._crosshairPriceAxisView=e,e.setPaneRendererLabelIcon(0),this._crosshair=t,this._scale=i,this._options=r}_updateImpl(e,t){super._updateImpl(e,t);const i=this._crosshair.y,s=this._chartModel.properties().childs().scalesProperties.childs().fontSize.value(),r=this._chartModel.timeScale().width(),n=this._crosshair.model().priceAxisRendererOptions(),o=s+2*this._crosshairPriceAxisView.additionalPadding(s)+n.paddingTop+n.paddingBottom,a=o,l=i-o/2,c=r-a,h=this._crosshair.pane,d=this._mainDataSourceOnPane(),u=d&&d.symbolSource(),p=!!u&&(u.isConvertedToOtherCurrency()||u.isConvertedToOtherUnit());if(null!==d){const e=zt(d),t=d.idForAlert(),i=this._chartModel.isInReplay(),s=this._crossHairMenuCachedState;null!==s&&s.id===t&&s.priceScale===e&&s.isCurrencyOrUnitConverted===p&&s.isInReplay===i||(this._updateTooltipAndActionsAvaliability(d,e,p),this._crossHairMenuCachedState={id:t,priceScale:e,isCurrencyOrUnitConverted:p,isInReplay:i}) +}const _=null!==d&&(0,pe.isActingAsSymbolSource)(d)?d.symbol():null,m=null!==h&&(h.maximized().value()||!h.collapsed().value())&&(Boolean(_)||!1);this._crosshairPriceAxisView.setPaneLabelVisible(m);const g=null!==h&&0!==h.leftPriceScales().length&&m,f=null!==h&&0!==h.rightPriceScales().length&&m,v=r-a/2,S=this._tooltipText?{text:this._tooltipText,rect:{x:v,y:l,w:0,h:0}}:void 0;this._data={left:g,right:f,xl:0,xr:c,y:l,containerWidth:a,containerHeight:o,clickHandler:this._handleClick.bind(this),tooltip:S},this._crosshairPriceAxisView.setHitTestData(this._data)}_priceScale(){return this._scale}_updateTooltipAndActionsAvaliability(e,t,i){this._tooltipText=null,this._hasActions=!1;if(!(1===t))return;this._chartModel.isInReplay();let s=0;let r=0;1!==s||Ut||(this._tooltipText=""),this._crosshairPriceAxisView.setPaneRendererLabelIcon(r),this._hasActions=0!==s}_handleClick(e,t,i){(0,u.trackEvent)(this._gaOrigin,"click");const s=this._mainDataSourceOnPane(),r=null!==s&&(0,pe.isActingAsSymbolSource)(s)?s.symbol():null,n={pageX:i.pageX,pageY:i.pageY,clientX:i.clientX,clientY:i.clientY,screenX:i.screenX,screenY:i.screenY,price:this._crosshair.price,symbol:r};_.emit("onPlusClick",n)}_getMenuItems(e){return Promise.resolve([])}_createAlertMenuItems(e){return Promise.resolve([])}_createTradingMenuItems(){return Promise.resolve([])}_createAddHorizontalLineMenuItem(){return[]}_getActionAddAlert(e){return null}_getActionAddHorizontalLine(e){return null}_getValue(e,t){const i=e.priceScale(),s=e.firstValue();if(null===i||null===s)return null;return i.isPercentage()||i.isIndexedTo100()?null:i.coordinateToPrice(t,s)}_formatValue(e,t){return t.formatter().format(e)}_addAlert(e,t){}_addHorizontalLineTool(e,t){}_showContextMenu(e,t,i,s){const r="left"===s;setTimeout((()=>{const t=(0,n.ensureDefined)(this._data),s=r?t.xl:t.xr,o=i.localX-s,a=i.clientX-o,l=i.clientX-o+t.containerWidth;Ht.ContextMenuManager.showMenu(e,{clientX:r?a:l,clientY:i.clientY-t.containerHeight/2,boxHeight:t.containerHeight,attachToXBy:r?"left":"right",attachToYBy:"auto-strict"},void 0,{menuName:"CrosshairMenuView"})}))}_mainDataSourceOnPane(){const e=this._crosshair.pane;return null!==e?e.mainDataSource():null}}var Gt=i(78996),qt=i(14888);class $t{constructor(e){this._data=e}hitTest(e){return void 0===this._data.clickHandler?null:new qt.HitTestResult(qt.HitTestResult.CUSTOM,{clickHandler:this._data.clickHandler,tapHandler:this._data.clickHandler})}draw(e,t){const i=t.pixelRatio,s=this._data.vertLinesVisible,r=this._data.horzLinesVisible;if(!s&&!r)return;e.save(),e.lineWidth=Math.max(1,Math.floor(this._data.lineWidth*i)),e.strokeStyle=this._data.color,e.fillStyle=this._data.color,e.lineCap="butt",(0,kt.setLineStyle)(e,this._data.lineStyle);const n=Math.round(this._data.x*i),o=Math.round(this._data.y*i),a=Math.ceil(this._data.w*i),l=Math.ceil(this._data.h*i);s&&n>=0&&(0,kt.drawVerticalLine)(e,n,0,l),r&&o>=0&&(0,kt.drawHorizontalLine)(e,o,0,a),this._data.drawCenter&&(e.beginPath(),e.arc(n,o,Math.round(3*i),0,2*Math.PI,!0),e.fillStyle=this._data.color,e.fill()), +this._data.scissors&&function(e,t,i,s){const{pixelRatio:r,physicalHeight:n}=t,o=24*r,a=e.lineWidth%2?.5:0,l=i-Math.round(o/2)+a/r;let c=Math.round(s-o/2);if(c<0)c=0;else{const e=n-o;c>e&&(c=e)}e.translate(l,c),e.scale(r,r),e.fillStyle="#131722",e.fill(Yt),e.strokeStyle="#fff",e.lineWidth=1,e.stroke(Yt)}(e,t,n,o),e.restore()}}const Yt=new Path2D("m15.68 3.72-3.82 5.52-3.83-5.52-.28-.42-.42.3a2.84 2.84 0 0 0-.68 3.92l3.27 4.73-1.16 1.68a3.34 3.34 0 0 0-4.26 3.22 3.34 3.34 0 0 0 3.32 3.35 3.34 3.34 0 0 0 3.08-4.6l1-1.44 1.13 1.62a3.34 3.34 0 0 0 3.15 4.42c1.84 0 3.32-1.5 3.32-3.35a3.34 3.34 0 0 0-4.42-3.17l-1.23-1.78 3.22-4.65a2.86 2.86 0 0 0-.69-3.96l-.41-.29-.29.42ZM7.82 16.27c.47 0 .86.39.86.88 0 .48-.39.87-.86.87a.87.87 0 0 1-.86-.87c0-.5.4-.88.86-.88Zm8.36 0c.47 0 .86.39.86.88 0 .48-.4.87-.86.87a.87.87 0 0 1-.86-.87c0-.5.39-.88.86-.88Z");const Kt=l.colorsPalette["color-tv-blue-500"];class Xt{constructor(e,t){this._rendererData={},this._renderer=new $t(this._rendererData),this._source=e,this._pane=t}update(){}renderer(e,t){const i=this._source.selectPointMode().value()!==gt.SelectPointMode.None,s=this._source.visible&&(this._source.areLinesVisible||i)&&!this._source.linesShouldBeHidden(),r=this._rendererData;if(!s||null===this._pane)return null;const o=this._source.paneForPointSelect(),a=this._source.isReplaySelection(),l=this._pane===this._source.pane,c=a||(null!==o?this._source.pane===o&&this._pane===o:l);if(r.scissors=!1,i&&this._source.isOnHoveredChartWidget()&&c){const e=(0,n.ensureNotNull)(this._source.pointToSelect());r.color=this._source.lineColor()||Kt,a?(r.lineWidth=2,r.scissors=l):r.lineWidth=1,r.lineStyle=Dt.LINESTYLE_SOLID,r.horzLinesVisible=!0,r.vertLinesVisible=!0,r.drawCenter=!1,"time"===e?r.horzLinesVisible=!1:"price"===e&&(r.vertLinesVisible=!1)}else{const e=this._source.properties(),t=this._source.model().currentTool(),i=(0,Gt.lastMouseOrTouchEventInfo)(),s=i.isTouch&&!i.stylus&&((0,S.isLineToolName)(t)||(0,gt.toolIsMeasure)(t));let n;n=s?Kt:e.childs().color.value();const o=e.childs().transparency.value();!s&&o>0&&(n=(0,ft.generateColor)(n,o)),r.color=n,r.horzLinesVisible=this._pane===this._source.pane&&(this._pane.maximized().value()||!this._pane.collapsed().value()),r.vertLinesVisible=!0,r.lineWidth=e.childs().width.value(),r.lineStyle=e.childs().style.value(),r.drawCenter=s&&this._pane===this._source.pane}return r.w=this._pane.width(),r.h=this._pane.height(),r.x=void 0!==this._source.lockedX&&isFinite(this._source.lockedX)?this._source.lockedX:this._source.x,r.y=this._source.y,this._renderer}}var Zt=i(26740);const Jt={backgroundColor:(0,ft.generateColor)(l.colorsPalette["color-tv-blue-500"],70),borderColor:(0,ft.generateColor)(l.colorsPalette["color-tv-blue-500"],20)};class Qt{constructor(e){this._renderer=new Zt.RectangleRenderer,this._rectangle=null,this._crosshair=e}update(){const e=this._crosshair.selection();null!==e&&null!==this._crosshair.pane?this._rectangle=this._crosshair.pane.logicalRectToPixels(e):this._rectangle=null}renderer(e,t){if(!this._rectangle)return null;const i={ +backcolor:Jt.backgroundColor,color:Jt.borderColor,fillBackground:!0,linewidth:1,points:[this._rectangle.min,this._rectangle.max],extendLeft:!1,extendRight:!1};return this._renderer.setData(i),this._renderer}}var ei=i(80142),ti=i(18766),ii=i(68336),si=i(45063),ri=i(48566),ni=i(9933),oi=i(44381),ai=i(29639),li=i(85113);const ci=c.t(null,void 0,i(33355)),hi=c.t(null,{context:"study"},i(32819)),di=new ti.PercentageFormatter,ui=new si.TimeSpanFormatter,pi=new ri.VolumeFormatter,_i=(0,l.getHexColorByName)("color-tv-blue-500"),mi=(0,l.getHexColorByName)("color-ripe-red-400"),gi={bgColorPositive:(0,ft.generateColor)(_i,80),bgColorNegative:(0,ft.generateColor)(mi,80),colorPositive:(0,l.getHexColorByName)("color-tv-blue-600"),colorNegative:(0,l.getHexColorByName)("color-ripe-red-400"),labelBgColorPositive:_i,labelBgColorNegative:mi};class fi{constructor(e,t){this._pipFormatter=null,this._lastSymbolInfo=null,this._horzTrenRenderer=new ni.TrendLineRenderer,this._vertTrenRenderer=new ni.TrendLineRenderer,this._bgRenderer=new Zt.RectangleRenderer,this._labelRenderer=new oi.TextRenderer,this._p1=null,this._p2=null,this._label=null,this._source=e,this._pane=t}update(e){const[t,i]=this._source.measurePoints();if(void 0===i)return this._p1=null,void(this._p2=null);const s=(0,n.ensureNotNull)(this._source.measurePane().value()),r=t.price,a=i.price,l=i.price-r,c=i.index-t.index,h=(0,ei.forceLTRStr)(""+c),d=(0,n.ensureNotNull)(s.mainDataSource());let u=(0,n.ensureNotNull)(d.formatter()).format(l);if(Math.abs(r)>1e-8){const e=l/Math.abs(r);u+=" ("+di.format(100*e)+")"}const p=(0,ei.forceLTRStr)(u);this._label=p+"\n"+ci.format({count:h});const _=(0,n.ensureNotNull)(d.firstValue()),m=this._source.model().timeScale().indexToCoordinate(t.index),g=this._source.model().timeScale().indexToCoordinate(i.index),f=s.defaultPriceScale().priceToCoordinate(r,_),v=s.defaultPriceScale().priceToCoordinate(a,_);this._p1=new o.Point(m,f),this._p2=new o.Point(g,v);const S=this._source.model().timeScale().indexToUserTime(t.index),y=this._source.model().timeScale().indexToUserTime(i.index);let b=null;if(null!==S&&null!==y){const e=this._pane.model().mainSeries().symbolInfo();null!==e&&e!==this._lastSymbolInfo&&(this._pipFormatter=new ii.PipFormatter(e.pricescale,e.minmov,e.type,e.minmove2),this._lastSymbolInfo=e),b=(y.valueOf()-S.valueOf())/1e3}const w=this._pipFormatter?this._pipFormatter.format(l):null,P=null!==w?" , "+w:"",C=null!==b?ui.format(b):null,T=null!==C?", "+(0,ei.startWithLTR)(C):"";this._label=(0,ei.forceLTRStr)(p+P)+"\n"+ci.format({count:h})+T;const x=this._source.measureVolume();Number.isNaN(x)||(this._label+=`\n${hi} ${pi.format(x)}`);const I=a=50?li.LineEnd.Arrow:li.LineEnd.Normal};this._horzTrenRenderer.setData(s)}{const e=Math.round(E.x),t=new o.Point(e,this._p1.y),i=new o.Point(e,this._p2.y),s={points:[t,i],color:M,linewidth:1,linestyle:Dt.LINESTYLE_SOLID,extendleft:!1,extendright:!1,leftend:li.LineEnd.Normal,rightend:Math.abs(t.y-i.y)>=50?li.LineEnd.Arrow:li.LineEnd.Normal};this._vertTrenRenderer.setData(s)}const D={x:0,y:10},B=.5*(this._p1.x+this._p2.x),V=this._p2.y,R=new o.Point(B,V),N=(O=(0,n.ensureNotNull)(this._label),{points:[R],text:O,color:"#FFFFFF",horzAlign:"center",vertAlign:"middle",font:L.CHART_FONT_FAMILY,offsetX:D.x,offsetY:D.y,bold:!1,italic:!1,fontsize:12,padding:8,highlightBorder:!1,backgroundColor:A,backgroundTransparency:10,backgroundVertInflate:5,backgroundHorzInflate:5,backgroundRoundRect:4});var O;this._labelRenderer.setData(N);const F=this._labelRenderer.measure(),W=(0,oi.calculateLabelPosition)(F,this._p1,this._p2,D,this._pane.height());this._labelRenderer.setPoints([W])}renderer(){if(null===this._p1||null===this._p2)return null;const e=new ai.CompositeRenderer;return e.append(this._bgRenderer),e.append(this._horzTrenRenderer),e.append(this._vertTrenRenderer),e.append(this._labelRenderer),e}}var vi=i(86216);class Si extends vi.MediaCoordinatesPaneRenderer{constructor(e){super(),this._data=e}hitTest(e){return null}_drawImpl(e){const t=e.context;t.translate(this._data.x-this._data.width/2,this._data.y-this._data.height/2),t.strokeStyle="rgba(153,153,153,.3)",t.lineWidth=2,t.beginPath(),this._drawShackle(t),t.stroke(),t.closePath(),t.strokeStyle="rgba(153,153,153,.7)",t.lineWidth=1,t.beginPath(),t.rect(0,this._data.height-this._data.bodyHeight+.5,this._data.width,this._data.bodyHeight),t.closePath(),t.stroke(),t.translate(0,-1),t.strokeStyle="#777",t.beginPath(),this._drawShackle(t),t.stroke(),t.closePath(),t.fillStyle="rgba(255,255,255,.7)",t.beginPath(),t.rect(1,this._data.height-this._data.bodyHeight+1.5,this._data.width-2,this._data.bodyHeight-2),t.fill(),t.beginPath(),t.rect(.5,this._data.height-this._data.bodyHeight+1,this._data.width-1,this._data.bodyHeight-1),t.stroke(),t.closePath(),t.fillStyle="#777",t.fillRect(this._data.width/2-.5,this._data.height-this._data.bodyHeight/2,1,2)}_drawShackle(e){const t=(this._data.width-3)/2,i=this._data.height-this._data.bodyHeight;e.moveTo(1.5,t),e.arc(this._data.width/2,t,t,Math.PI,2*Math.PI),i>t&&(e.moveTo(1.5,t),e.lineTo(1.5,i),e.moveTo(this._data.width-1.5,t),e.lineTo(this._data.width-1.5,i))}}class yi{constructor(e,t,i){this._horzVisible=!1,this._source=e,this._pane=t,this._axis=i||"x"}update(){}renderer(e,t){const i=this._source.visible&&this._source.areLinesVisible,s=(0,gt.lockTimeAxis)().value(),r=i&&this._horzVisible,o=i||s;if("y"===this._axis&&!r||!o)return null;const a="y"===this._axis?this._pane.width()-4.5:(0,n.ensureDefined)(this._source.lockedX)+1,l="y"===this._axis?this._source.y:this._pane.height()-5.5-1;return new Si({x:a, +y:l,width:9,height:11,bodyHeight:7})}}var bi=i(49483),wi=i(87172),Pi=i(95790),Ci=i(2);class Ti extends Pi.DataWindowView{constructor(e){super(),this._invalidated=!0,this._dateItem=new Pi.DataWindowItem("",c.t(null,void 0,i(76912)),""),this._timeItem=new Pi.DataWindowItem("",c.t(null,void 0,i(31976)),""),this._model=e,this._items.push(this._dateItem),this._items.push(this._timeItem)}update(){this._invalidated=!0}items(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items}_updateImpl(){const e=this._model.mainSeries().isDWM();if(this._timeItem.setVisible(!e),this._timeItem.setValue(Ci.notAvailable),this._dateItem.setValue(Ci.notAvailable),this._model.timeScale().isEmpty())return;let t=this._model.crossHairSource().appliedIndex();if(!(0,Pt.isNumber)(t)){const e=this._model.mainSeries().data().last();if(null===e)return;t=e.index}const i=this._model.timeScale().indexToUserTime(t);null!==i&&(this._dateItem.setValue(this._model.dateFormatter().format(i)),e||this._timeItem.setValue(this._model.timeFormatter().format(i)))}}var xi=i(2893);const Ii=l.colorsPalette["color-tv-blue-500"],Mi=c.t(null,{context:"Replay"},i(20747));class Ai extends xi.TimeAxisView{constructor(e,t,i,s=!1){super(e),this._indexProvider=i,this._highlighted=s,this._source=t,this._properties=e.properties().childs().scalesProperties}_getText(e){if(this._source.isReplaySelection()){const t=this._model.timeScale().indexToUserTime(e);return null!==t?`${Mi}: ${this._model.dateTimeFormatter().format(t)}`:""}return super._getText(e)}_getBgColor(){if(this._source.isReplaySelection())return Ii;const e=this._properties.childs();return this._highlighted?e.axisLineToolLabelBackgroundColorCommon.value():this._model.isDark()?e.crosshairLabelBgColorDark.value():e.crosshairLabelBgColorLight.value()}_getIndex(){return this._model.crossHairSource().visible?this._indexProvider():null}_isVisible(){return this._properties.childs().showTimeScaleCrosshairLabel.value()}}var Li=i(67245);const ki={menuEnabled:!1,menuForMainSourceOnly:!1,disableTradingMenuActions:!1,disableDrawHorizLineMenuAction:!1};class Ei extends Lt.DataSource{constructor(e,t,i){super(),this.pane=null,this.price=NaN,this.index=NaN,this.visible=!0,this.areLinesVisible=!0,this.x=NaN,this.y=NaN,this._measurePane=new(Y())(null),this._measurePaneViewCache=new WeakMap,this._startMeasurePoint=null,this._endMeasurePoint=null,this._lastValidMeasurePoint=null,this._isOnHoveredChartWidget=!1,this._crossHairSelectPointMode=new(Y())(gt.SelectPointMode.None),this._selectionPane=null,this._selectionView=new Qt(this),this._selectionStartPoint=null,this._timeLockPaneView=null,this._crosshairPaneViewCache=new WeakMap,this._pointSelectionPaneViewCache=new WeakMap,this._priceAxisViews=new Map,this._panePriceAxisViews=new Map,this._startMeasurePriceAxisViews=new Map,this._endMeasurePriceAxisViews=new Map,this._originX=NaN,this._originY=NaN,this._subscribed=!1,this._movedDelegate=new(q()),this._pointSelectedDelegate=new(q()),this._requestedPoint=null,this._paneForRequestedPoint=null, +this._selectLineColor=null,this._volumeCalculator=null,this._model=e,this._options=Object.assign({},ki,i||{}),this._linesShouldBeHidden=this._model.readOnly(),this._dataWindowView=new Ti(e),this.setSelectionEnabled(!1);const s=e=>t=>t===(0,n.ensureNotNull)(this._measurePane.value()).defaultPriceScale()?e():null;this._currentPosPriceProvider=e=>{const t=(0,n.ensureNotNull)(this.pane);if(e===t.defaultPriceScale())return this.price;const i=(0,n.ensureNotNull)(t.defaultPriceScale().mainSource()).firstValue();if(null===i)return null;const s=t.defaultPriceScale().priceToCoordinate(this.price,i),r=(0,n.ensureNotNull)(e.mainSource()).firstValue();return null===r?null:e.coordinateToPrice(s,r)},this._startMeasurePriceProvider=s((()=>(0,n.ensureNotNull)(this._startMeasurePoint).price)),this._endMeasurePriceProvider=s((()=>(0,n.ensureNotNull)(this._lastMeasurePoint()).price)),this._properties=t;this._timeAxisView=new Ai(e,this,(()=>this.appliedIndex()),!1),this._startMeasureTimeAxisView=new Ai(e,this,(()=>(0,n.ensureNotNull)(this._startMeasurePoint).index),!0),this._endMeasureTimeAxisView=new Ai(e,this,(()=>(0,n.ensureNotNull)(this._lastMeasurePoint()).index),!0),e.readOnly()||gt.cursorTool.subscribe((e=>this.areLinesVisible="arrow"!==e),{callWithLast:!0})}destroy(){null!==this._volumeCalculator&&this._volumeCalculator.destroy(),this._measurePane.setValue(null)}moved(){return this._movedDelegate}originX(){return this._originX}originY(){return this._originY}saveOriginCoords(e,t){this._originX=e,this._originY=t}clearOriginCoords(){this._originX=NaN,this._originY=NaN}currentPoint(){return new o.Point(this.x,this.y)}model(){return this._model}appliedIndex(){return Number.isFinite(this.lockedIndex)?this.lockedIndex:this.index}startMeasurePoint(){return this._startMeasurePoint||null}endMeasurePoint(){return this._endMeasurePoint||null}measureVolume(){if(null===this._volumeCalculator)return NaN;const[e,t]=this.measurePoints();return void 0===t?NaN:this._volumeCalculator.volume(e.index,t.index)}measurePane(){return this._measurePane.readonly()}startMeasuring(e,t){this._startMeasurePoint=e,this._measurePane.setValue(t),t.containsMainSeries()&&((0,n.assert)(null===this._volumeCalculator),this._volumeCalculator=new Li.SeriesTimeRangeVolumeCalculator(this.model().mainSeries())),this._model.updatePane(t)}finishMeasure(e){this._endMeasurePoint=e}clearMeasure(){this._measurePane.setValue(null),delete this._startMeasurePoint,delete this._endMeasurePoint,delete this._lastValidMeasurePoint,this._model.lightUpdate(),null!==this._volumeCalculator&&(this._volumeCalculator.destroy(),this._volumeCalculator=null)}measurePoints(){const e=[(0,n.ensureNotNull)(this._startMeasurePoint)],t=this._lastMeasurePoint();return null!==t&&e.push(t),e}startSelection(e){this._selectionStartPoint=this.currentLogicalPoint(),this._selectionPane=e}clearSelection(){this._selectionStartPoint=null,this._selectionPane=null}selection(){return this._selectionStartPoint?{p1:this._selectionStartPoint,p2:this.currentLogicalPoint()}:null}currentLogicalPoint(){return{ +index:this.appliedIndex(),price:this.price}}selectPointMode(){return this._crossHairSelectPointMode}lineColor(){return this._selectLineColor}cancelRequestSelectPoint(){this._crossHairSelectPointMode.value()!==gt.SelectPointMode.None&&this._setSelectPointModeState(gt.SelectPointMode.None)}requestSelectPoint(e){(0,n.assert)(this._crossHairSelectPointMode.value()===gt.SelectPointMode.None,"Point already requested");const{pointType:t,pane:i,lineColor:s=null,selectPointMode:r=gt.SelectPointMode.Study}=e;i&&((0,n.assert)(-1!==this._model.panes().indexOf(i),"Chartmodel doesn't contains specified pane"),this._paneForRequestedPoint=i,this._model.panesCollectionChanged().subscribe(this,this._paneCollectionChanged)),this._selectLineColor=s,this._requestedPoint=t,this._setSelectPointModeState(r)}onPointSelected(){return this._pointSelectedDelegate}trySelectCurrentPoint(){const e=(0,n.ensureNotNull)(this._requestedPoint);if(!this._model.mainSeries().bars().contains(this.index)&&"price"!==e)return;const t=(0,n.ensureNotNull)(this.pane);if(this._paneForRequestedPoint&&this._paneForRequestedPoint!==t)return;let i,s;if("price"===e||(i=this._model.timeScale().indexToTimePoint(this.index),null!==i)){if("time"!==e){const e=t.mainDataSource();if(null===e)return;const i=e.firstValue(),r=e.priceScale();if(null===i||null===r)return;s=r.coordinateToPrice(this.y,i)}this._setSelectPointModeState(gt.SelectPointMode.None),this._pointSelectedDelegate.fire({time:i,price:s},t)}}isOnHoveredChartWidget(){return this._isOnHoveredChartWidget}setOnHoveredChartWidget(e){this._isOnHoveredChartWidget=e}isReplaySelection(){return!1}clearPosition(){this.visible=!1,this.index=NaN,this.price=NaN,this.x=NaN,this.y=NaN,this.pane=null,this.clearOriginCoords(),this._updateVisibilityDependentPaneViews()}setPosition(e,t,i){return this._subscribed||(this._model.mainSeries().onRestarted().subscribe(this,this.clearMeasure),this._subscribed=!0),this.setLockedPosition(i),this.visible=!0,this._tryToUpdateViews(e,t,i)}setLinesShouldBeHidden(e){this._linesShouldBeHidden=e}linesShouldBeHidden(){return this._linesShouldBeHidden}handleContextMenuEvent(e){this._crossHairSelectPointMode.value()!==gt.SelectPointMode.None&&this._setSelectPointModeState(gt.SelectPointMode.None)}properties(){return this._properties}priceAxisViews(e,t){const i=null===this._requestedPoint||"time"!==this._requestedPoint||!this._isOnHoveredChartWidget,s=[];return this.pane===e&&i&&s.push(this._createPriceAxisViewOnDemand(this._priceAxisViews,this._panePriceAxisViews,e,t,this._currentPosPriceProvider,Ot,!0)[0]),this._startMeasurePoint&&s.push(this._createPriceAxisViewOnDemand(this._startMeasurePriceAxisViews,null,e,t,this._startMeasurePriceProvider,Ft)[0]),this._lastMeasurePoint()&&s.push(this._createPriceAxisViewOnDemand(this._endMeasurePriceAxisViews,null,e,t,this._endMeasurePriceProvider,Ft)[0]),s}timeAxisViews(){const e=[],t=null===this._requestedPoint||"price"!==this._requestedPoint||!this._isOnHoveredChartWidget;return!this._linesShouldBeHidden&&(this.visible||(0, +gt.lockTimeAxis)().value())&&t&&e.push(this._timeAxisView),this._startMeasurePoint&&e.push(this._startMeasureTimeAxisView),this._lastMeasurePoint()&&e.push(this._endMeasureTimeAxisView),e}paneViews(e){if(void 0===e)return null;const t=[];if(this.isReplaySelection()){let i=this._pointSelectionPaneViewCache.get(e);i||(i=new CrosshairPointSelectionPaneView(this,e,this._model),this._pointSelectionPaneViewCache.set(e,i)),t.push(i)}let i=this._crosshairPaneViewCache.get(e);if(i||(i=new Xt(this,e),this._crosshairPaneViewCache.set(e,i)),t.push(i),e===this._selectionPane&&t.push(this._selectionView),e===this._measurePane.value()){let i=this._measurePaneViewCache.get(e);i||(i=new fi(this,e),this._measurePaneViewCache.set(e,i)),i.update((0,W.sourceChangeEvent)(this.id())),t.push(i)}if(wi.addPlusButtonProperty.value()){const i=e===this.pane,s=!bi.CheckMobile.any()||window.screen.width>=320,r=gt.tool.value(),n=(0,S.isLineToolName)(r),o=null!==this._model.lineBeingEdited()||null!==this._model.lineBeingCreated()||this._model.sourcesBeingMoved().length>0||null!==this._model.customSourceBeingMoved()||(0,gt.toolIsMeasure)(r);if(i&&this._isOnHoveredChartWidget&&this._crossHairSelectPointMode.value()===gt.SelectPointMode.None&&s&&!n&&!o){const i=e.mainDataSource();if(null!==i){const s=i.priceScale();if(null!==s){const i=this._createPriceAxisViewOnDemand(this._priceAxisViews,this._panePriceAxisViews,e,s,this._currentPosPriceProvider,Ot,!0)[1];null!==i&&t.push(i)}}}}return(0,gt.lockTimeAxis)().value()&&(null===this._timeLockPaneView&&(this._timeLockPaneView=new yi(this,e)),t.push(this._timeLockPaneView)),t}dataWindowView(){return this._dataWindowView}updateAllViews(e){this._priceAxisViews.forEach((t=>{t.forEach((t=>t.update(e)))})),this._panePriceAxisViews.forEach((t=>{t.forEach((t=>t.update(e)))})),this._startMeasurePoint&&(this._startMeasurePriceAxisViews.forEach((t=>{t.forEach((t=>t.update(e)))})),this._startMeasureTimeAxisView.update(e)),this._lastMeasurePoint()&&(this._endMeasurePriceAxisViews.forEach((t=>{t.forEach((t=>t.update(e)))})),this._endMeasureTimeAxisView.update(e)),this._timeAxisView.update(e),this._selectionView.update(),this._dataWindowView.update(),this._updateVisibilityDependentPaneViews()}setLockedPosition(e){delete this.lockedIndex,delete this.lockedX,e!==this._measurePane.value()&&(0,gt.lockTimeAxis)().value()&&(this.lockedIndex=this._model.timeScale().points().roughIndex(gt.lockTimeAxisTime.value()),null!==this.lockedIndex&&(this.lockedX=this._model.timeScale().indexToCoordinate(this.lockedIndex)))}isMenuEnabled(){return this._options.menuEnabled}isHoveredEnabled(){return wi.addPlusButtonProperty.value()}isHovered(){return this._model.hoveredSource()===this}pointToSelect(){return this._requestedPoint}paneForPointSelect(){return this._paneForRequestedPoint}_lastMeasurePoint(){return this._endMeasurePoint?this._endMeasurePoint:(null!==this.pane&&this._measurePane.value()===this.pane&&(this._lastValidMeasurePoint={price:this._model.magnet().align(this.price,this.index,this.pane),index:this.index}), +this._lastValidMeasurePoint||null)}_createPriceAxisViewOnDemand(e,t,i,s,r,o,a=!1){let l=e.get(i),c=null!==t?t.get(i):void 0;void 0===l&&(l=new Map,e.set(i,l),this._options.menuEnabled&&null!==t&&(c=new Map,t.set(i,c)),a&&i.onDestroyed().subscribe(this,(()=>this._onPaneDestroyed(i))));let h=l.get(s);if(void 0===h){if(h=new o(this,s,r),l.set(s,h),void 0!==c){const e=new jt(h,this,s,this._model,this._options);c.set(s,e)}a&&s.lastSourceRemoved().subscribe(this,(()=>this._onPriceScaleCleared(s)))}let d=null;return void 0!==c&&(d=(0,n.ensureDefined)(c.get(s))),[h,d]}_onPaneDestroyed(e){e.onDestroyed().unsubscribeAll(this),this._priceAxisViews.delete(e),this._panePriceAxisViews.delete(e),this._startMeasurePriceAxisViews.delete(e),this._endMeasurePriceAxisViews.delete(e)}_onPriceScaleCleared(e){e.lastSourceRemoved().unsubscribeAll(this),this._priceAxisViews.forEach((t=>t.delete(e))),this._panePriceAxisViews.forEach((t=>t.delete(e))),this._startMeasurePriceAxisViews.forEach((t=>t.delete(e))),this._endMeasurePriceAxisViews.forEach((t=>t.delete(e)))}_tryToUpdateViews(e,t,i){return!!this._tryToUpdateData(e,t,i)&&(this.updateAllViews((0,W.sourceChangeEvent)(this.id())),this._movedDelegate.fire({index:this.index,price:this.price}),!0)}_tryToUpdateData(e,t,i){const s=this.x,r=this.y,o=this.price,a=this.index,l=this.pane,c=this._priceScaleByPane(i);if(this.index=e,this.x=isNaN(e)?NaN:this._model.timeScale().indexToCoordinate(e),null!==c&&null!==i){this.pane=i,this.price=t;const e=(0,n.ensureNotNull)(i.mainDataSource()).firstValue();this.y=null===e?NaN:c.priceToCoordinate(t,e)}else this.pane=null,this.price=NaN,this.y=NaN;return s!==this.x||r!==this.y||a!==this.index||o!==this.price||l!==this.pane}_priceScaleByPane(e){return e&&!e.defaultPriceScale().isEmpty()?e.defaultPriceScale():null}_setSelectPointModeState(e){e===gt.SelectPointMode.None&&(this._requestedPoint=null,this._selectLineColor=null,this._paneForRequestedPoint&&(this._paneForRequestedPoint=null,this._model.panesCollectionChanged().unsubscribe(this,this._paneCollectionChanged))),gt.activePointSelectionMode.setValue(e),this._crossHairSelectPointMode.setValue(e),this._model.lightUpdate()}_paneCollectionChanged(e){const t=this._paneForRequestedPoint;null!==t&&-1===e.indexOf(t)&&this.cancelRequestSelectPoint()}_updateVisibilityDependentPaneViews(){var e;for(const t of this.model().panes())null===(e=this._pointSelectionPaneViewCache.get(t))||void 0===e||e.update()}}var Di=i(46936),Bi=i(17908),Vi=i(81345),Ri=i(7006),Ni=i(72006),Oi=i(50337),Fi=i(71479),Wi=i(56840);class Hi{constructor(e){this._priceSourceNamesById=new Map,e.forEach((e=>this._priceSourceNamesById.set(e.id,e.name)))}name(e){var t;return null!==(t=this._priceSourceNamesById.get(e))&&void 0!==t?t:null}priceSourcesChanged(e){return e.length!==this._priceSourceNamesById.size}}const zi=new ee.TranslatedString("remove deselected empty line tools",c.t(null,void 0,i(59211))),Ui=N.enabled("auto_enable_symbol_labels"),ji=(0,Z.getLogger)("Chart.ChartModel");function Gi(e,t){const i=e.indexOf(t);return-1!==i&&(e.splice(i,1), +!0)}function qi(e){var t,i;for(let s=e.length;s--;){const r=e[s].dataSources();for(let e=r.length;e--;)null===(t=r[e].dataWindowView())||void 0===t||t.update();const n=e[s].priceDataSources();for(let e=n.length;e--;)null===(i=n[e].legendView())||void 0===i||i.update()}}const $i={isSnapshot:!1,readOnly:!1,watermarkEnabled:!0,shiftVisibleRangeOnNewBar:!0,currencyConversionEnabled:!1,unitConversionEnabled:!1,countdownEnabled:!0,lastPriceAnimationEnabled:!0,onWidget:!1,hideIdeas:!1};class Yi{constructor(e,t,i,r,n,o,a,l,c,d){this._onRearrangePanes=new(q()),this._lineToolsGroupModel=new lt,this._sourcesBeingMoved=[],this._activeItemBeingMoved=null,this._lineBeingEdited=null,this._linePointBeingEdited=null,this._linePointBeingChanged=null,this._customSourceBeingMovedHitTestData=null,this._customSourceBeingMoved=null,this._dataSourceCollectionChanged=new(q()),this._sourceProperitesChanged=new(q()),this._sourceZOrderChanged=new(q()),this._symbolSourceResolved=new(q()),this._symbolSourceResolvingActive=new(Y())(!1),this._adjustForDividendsAvailability=new(Y())(0),this._adjustForDividendsEnabled=new(Y())(!1),this._sessions=null,this._currentTool="",this._lineBeingCreated=null,this._paneBeingCreatedLineOn=null,this._lineCancelled=new(q()),this._phantomSourceContainer=new Ct(this),this._destroyed=!1,this._isSettingsExternalPosition=!1,this._isTimeScrolling=!1,this._magnet=new Mt,this._scrollingState=null,this._modelIntervals=[],this._rendererOptionsProvider=new k(this),this._studyInserted=new(q()),this._cachedStudiesMaxOffset=0,this._replayStatus=new(Y())(ct.ReplayStatus.Undefined),this._panes=[],this._tagsChanged=new(q()),this._strategySources=[],this._strategySourcesChange=new(q()),this._activeStrategySource=new(Y())(null),this._paneCollapsingAvailable=new(Y())(!1),this._panesCollectionChanged=new(q()),this._scrollEnabled=N.enabled("chart_scroll"),this._zoomEnabled=N.enabled("chart_zoom"),this._isScalesResetAvailableChanged=new(q()),this._isScalesResetAvailable=!1,this._lollipopSourcesWatcher=null,this._alertsWatcher=null,this._hoveredSource=null,this._hoveredSourceChanged=new(q()),this._lastHoveredHittestData=null,this._lastSelectedHittestData=null,this._topmostCustomSources=[],this._fgCustomSources=[],this._bgCustomSources=[],this._allCustomSources=[],this._customSourcesMap=new Map,this._multiPaneSources=[],this._showLegendProperty=new(M()),this._id=(0,J.guid)(),this._chartSaveTime=null,this._availableCurrenciesList=null,this._availableCurrencies=new bt([]),this._availablePriceSources=new Hi([]),this._availableUnitsObject=null,this._availableUnits=new wt({}),this._availablePriceSourcesList=null,this._shouldBeSavedEvenIfHidden=!1,this._watchedThemeSpawn=h.watchedTheme.spawn(),this._gradientColorsCache=null,this._recalcVRStudiesParams={},this._recalcColorStudiesParams={},this._recalcVisibleRangeStudiesImplDebounced=(0,s.default)(this._recalcVisibleRangeStudiesImpl.bind(this,this._recalcVRStudiesParams),500),this._recalcColorStudiesImplDebounced=(0, +s.default)(this._recalcColorStudiesImpl.bind(this,this._recalcColorStudiesParams),250),this._width=0,this._resetScales=new(q()),this._chartThemeLoaded=new(q()),this._selection=new b,this._selectedSourceChanged=new(q()),this._symbolSourceCollectionChanged=new(q()),this._gridSource=new Vt,this._syncPointCache=new Map,this._lastAppliedGotoTimeRange=null,this._lastGotoTimeRange=null,this._clearSelection=()=>{this._lastSelectedHittestData=null,this._selection.clear()},this._removeSourceFromSelection=e=>{this._selection.remove(e)},this._addSourceToSelection=(e,t)=>{const i=this._selection.isSelected(e);i&&this._lastSelectedHittestData===t||e&&!e.isSelectionEnabled()||(this._lastSelectedHittestData=t||null,i||this._selection.add(e))},this._recalcSymbolResolvingActive=()=>{for(const e of this._panes)if(e.symbolSourceResolvingActive().value())return void this._symbolSourceResolvingActive.setValue(!0);this._symbolSourceResolvingActive.setValue(!1)},this._recalcAdjustForDividendsAvailibility=()=>{var e,t,i,s;if(this._symbolSourceResolvingActive.value())return void this._adjustForDividendsAvailability.setValue(0);const r=this.mainSeries();switch(null!==(t=null===(e=r.symbolInfo())||void 0===e?void 0:e.allowed_adjustment)&&void 0!==t?t:"none"){case"dividends":return void this._adjustForDividendsAvailability.setValue(2);case"splits":return void this._adjustForDividendsAvailability.setValue(1);case"any":return void this._adjustForDividendsAvailability.setValue(3)}for(const e of this.symbolSources().filter(pe.isActingAsSymbolSource)){if(e.symbolHibernated().value()||e===r)continue;if("any"===(null!==(s=null===(i=e.symbolInfo())||void 0===i?void 0:i.allowed_adjustment)&&void 0!==s?s:"none"))return void this._adjustForDividendsAvailability.setValue(3)}this._adjustForDividendsAvailability.setValue(0)},this._recalcAdjustForDividendsEnabled=()=>{switch(this._adjustForDividendsAvailability.value()){case 2:return void this._adjustForDividendsEnabled.setValue(!0);case 0:case 1:return void this._adjustForDividendsEnabled.setValue(!1)}this._adjustForDividendsEnabled.setValue(this.mainSeries().properties().childs().dividendsAdjustment.value())},this._recalcPaneCollapsingAvailable=e=>{let t=this._panes.filter((e=>!e.collapsed().value())).length;0===t&&e&&this._panes.length>0&&(this._panes[0].collapsed().setValue(!1),t=1),this._paneCollapsingAvailable.setValue(t>1)},this._chartApi=e,this._invalidateHandler=t,this._undoModel=o,this._properties=i,this._options=(0,ie.merge)((0,ie.clone)($i),l),this._collapsedWV=c,this._isAutoSaveEnabled=d,this._studiesMetaInfoRepository=n,this._readOnly=this._options.readOnly,this._isSnapshot=this._options.isSnapshot,this._chartSaveTime=(new Date).valueOf(),this._backgroundColor=new(Y())(this._getBackgroundColor()),this._backgroundTopColor=new(Y())(this._getBackgroundColor(!0)),this._properties.childs().paneProperties.childs().background.subscribe(this,this._updateBackgroundColor),this._properties.childs().paneProperties.childs().backgroundType.subscribe(this,this._updateBackgroundColor), +this._properties.childs().paneProperties.childs().backgroundGradientStartColor.subscribe(this,this._updateBackgroundColor),this._properties.childs().paneProperties.childs().backgroundGradientEndColor.subscribe(this,this._updateBackgroundColor),this._backgroundColor.subscribe(this.recalcColorStudies.bind(this,!1)),this._backgroundTopColor.subscribe(this.recalcColorStudies.bind(this,!1)),this._watchedThemeSpawn.subscribe(this._updateBackgroundColor.bind(this)),this._symbolSourceResolvingActive.subscribe(this._recalcAdjustForDividendsAvailibility),this.setStudiesMetaData(this._studiesMetaInfoRepository.getInternalMetaInfoArray(),this._studiesMetaInfoRepository.getMigrations()),(0,gt.init)();const u=this._readOnly?new(M())((0,V.defaults)("chartproperties.paneProperties.crossHairProperties")):this._properties.childs().paneProperties.childs().crossHairProperties;this.m_crossHairSource=new Ei(this,u,this._options.crossHair),this._crossHairSelectPointMode=this.m_crossHairSource.selectPointMode().spawn(),this._crossHairSelectPointMode.subscribe((e=>{if(e!==gt.SelectPointMode.None&&this.lineBeingCreated()){const e=gt.tool.value();this.cancelCreatingLine(),gt.tool.setValue(e)}})),this._tagsChanged=new(q());const p=new x.DefaultProperty("chartproperties.mainSeriesProperties");p.addExclusion("minTick"),p.addExclusion("priceAxisProperties.lockScale"),p.addExclusion("priceAxisProperties.percentage"),p.addExclusion("priceAxisProperties.indexedTo100"),p.addExclusion("priceAxisProperties.isInverted"),p.addExclusion("priceAxisProperties.log"),p.addExclusion("priceAxisProperties.logDisabled"),p.addExclusion("priceAxisProperties.percentageDisabled"),p.addExclusion("priceAxisProperties.autoScaleDisabled"),p.merge(i.childs().mainSeriesProperties.state()),this._timeScale=new st(this,this._options.timeScale);const _={countdownEnabled:this._options.countdownEnabled,lastPriceAnimationEnabled:this._options.lastPriceAnimationEnabled};this.m_mainSeries=new Di.Series(this,p,_,r),this.m_mainSeries.onStyleChanged().subscribe(this._timeScale,this._timeScale.invalidateVisibleBars);const m=()=>this.fullUpdate();this.m_mainSeries.properties().childs().showCountdown.subscribe(this,(()=>{this.m_mainSeries.updateAllViews((0,W.sourceChangeEvent)(this.m_mainSeries.id())),m()})),(0,X.currencyUnitVisibilityProperty)().subscribe(this,m),this._timeScale.visibleBarsStrictRangeChanged().subscribe(this.m_mainSeries,this.m_mainSeries.clearHighLowPriceCache),this._timeScale.visibleBarsStrictRangeChanged().subscribe(this.m_mainSeries,this.m_mainSeries.clearAveragePriceCache),this.createPane(void 0,{axisProperties:p.childs().priceAxisProperties.state(["autoScale"])}),this._adjustForDividendsAvailability.subscribe(this._recalcAdjustForDividendsEnabled),this.mainSeries().properties().childs().dividendsAdjustment.subscribe(this,this._recalcAdjustForDividendsEnabled),this._recalcAdjustForDividendsEnabled(),this._boundUpdateStudiesMaxOffset=this._updateStudiesMaxOffset.bind(this),this.mainSeries().dataEvents().seriesTimeFrame().subscribe(this,((e,t,i,s)=>{ +if(null!==this._lastAppliedGotoTimeRange&&null!==i&&s&&(0,Tt.areEqualTimeFrames)(this._lastAppliedGotoTimeRange.range,i)){const e=this.appliedTimeFrame().value();null!==e&&!this._lastAppliedGotoTimeRange.actual&&(0,Tt.areEqualTimeFrames)(this._lastAppliedGotoTimeRange.range,e.val)&&this.appliedTimeFrame().setValue(null),this._lastAppliedGotoTimeRange=null}})),this.mainSeries().dataEvents().completed().subscribe(this,(e=>{null===this._lastAppliedGotoTimeRange&&null!==this._lastGotoTimeRange&&(this.gotoTimeRange(this._lastGotoTimeRange.from,this._lastGotoTimeRange.to),this._lastGotoTimeRange=null)}));const g=this._panes[0];g.setStretchFactor(2*g.stretchFactor()),this._properties.listeners().subscribe(this,this.lightUpdate),this._properties.childs().timezone.subscribe(null,(()=>{this._chartApi&&this._chartApi.isConnected().value()&&this._chartApi.switchTimezone(this.timezone())})),g.addDataSource(this.m_mainSeries,g.findSuitableScale(this.m_mainSeries),!1),this._barsMarksSources=a(this);for(const e of this._barsMarksSources)e.setOwnerSource(this.m_mainSeries),g.addDataSource(e,this.m_mainSeries.priceScale(),!0)}setStudiesMetaData(e,t){this._studiesMetaData=e,this._studyVersioning=new w.StudyVersioning(this._studiesMetaData,t)}restart(){this._chartApi.switchTimezone(this.timezone()),this._timeScale.reset(),this.m_mainSeries.restart();for(const e of this.dataSources())e.restart&&e!==this.m_mainSeries&&e.restart();this.sessions().restart()}version(){return 3}collapsed(){return this._collapsedWV}chartSaveTime(){return this._chartSaveTime}setChartSaveTime(e){this._chartSaveTime=e}destroy(){this._phantomSourceContainer.destroy(),this._hoveredSourceChanged.destroy(),null!==this._watermarkSource&&(this._watermarkSource.destroy(),this._watermarkSource=null),Array.from(this._customSourcesMap.keys()).forEach(this._removeCustomSource,this),(0,n.assert)(0===this._topmostCustomSources.length),(0,n.assert)(0===this._fgCustomSources.length),(0,n.assert)(0===this._bgCustomSources.length),(0,n.assert)(0===this._allCustomSources.length),(0,n.assert)(0===this._customSourcesMap.size),null!==this._lollipopSourcesWatcher&&(this._lollipopSourcesWatcher.destroy(),this._lollipopSourcesWatcher=null),null!==this._alertsWatcher&&this._alertsWatcher.destroy(),this._properties.childs().paneProperties.childs().background.unsubscribeAll(this),this._properties.childs().paneProperties.childs().backgroundType.unsubscribeAll(this),this._properties.childs().paneProperties.childs().backgroundGradientEndColor.unsubscribeAll(this),this._properties.childs().paneProperties.childs().backgroundGradientStartColor.unsubscribeAll(this),this._watchedThemeSpawn.destroy(),this._lastHoveredHittestData=null,this._lastSelectedHittestData=null,(0,X.currencyUnitVisibilityProperty)().unsubscribeAll(this),this._crossHairSelectPointMode.destroy(),this._destroyed=!0}undoModel(){return this._undoModel}onData(e){switch(e.method){case"timescale_update":{const t=e.params;this._updateTimeScale({index:t.index,zoffset:t.zoffset,values:t.changes,indexDiffs:t.index_diff, +baseIndex:t.baseIndex,marks:t.marks,clearFlag:t.clear});break}case"timescale_completed":{const t=Boolean(e.params[0]);this._timeScale.onTimeScaleCompleted(t);break}}}addStrategySource(e,t){1!==t&&-1===this._strategySources.indexOf(e)&&(this._strategySources.push(e),this._strategySourcesChange.fire(t),this.setActiveStrategySource(e))}removeStrategySource(e,t){if(1===t)return;const i=this._strategySources.indexOf(e);if(-1!==i){if(this._strategySources.splice(i,1)[0]===this._activeStrategySource.value()&&this.unsetActiveStrategySource(),this._strategySources.length>0){const e=this._strategySources[this._strategySources.length-1];this.setActiveStrategySource(e)}this._strategySourcesChange.fire(t)}}setActiveStrategySource(e){-1!==this._strategySources.indexOf(e)&&this._activeStrategySource.setValue(e)}unsetActiveStrategySource(){this._activeStrategySource.setValue(null)}activeStrategySource(){return this._activeStrategySource}strategySources(){return this._strategySources}strategySourcesChange(){return this._strategySourcesChange}setScrollEnabled(e){this._scrollEnabled=e}scrollEnabled(){return this._scrollEnabled}setZoomEnabled(e){this._zoomEnabled=e}zoomEnabled(){return this._zoomEnabled}zoomToViewport(e,t,i,s,r){this.setTimeViewport(e,t);let n=Math.min(i,s),o=Math.max(i,s);const a=r.defaultPriceScale();a.isPercentage()||a.setMode({autoScale:!1}),a.isLog()&&(n=a.priceToLogical(n),o=a.priceToLogical(o)),a.setPriceRange(new ue.PriceRange(n,o)),this.recalculateAllPanes((0,W.viewportChangeEvent)()),this.invalidate(this._paneInvalidationMask(r,K.InvalidationLevel.Light)),this._setScalesResetAvailable(!0)}setTimeViewport(e,t){const i=this.appliedTimeFrame().value();null!==this._lastAppliedGotoTimeRange&&null!==i&&(0,Tt.areEqualTimeFrames)(this._lastAppliedGotoTimeRange.range,i.val)&&!this._lastAppliedGotoTimeRange.actual||(this.timeScale().zoomToBarsRange(e,t),this.recalculateAllPanes((0,W.viewportChangeEvent)()),this.recalcVisibleRangeStudies(),this.lightUpdate())}onTagsChanged(){return this._tagsChanged}canZoomIn(){return this._timeScale.canZoomIn()&&this._zoomEnabled}canZoomOut(){return this._timeScale.canZoomOut()&&this._zoomEnabled}onPaneTagsChanged(){this._tagsChanged.fire()}panesCollectionChanged(){return this._panesCollectionChanged}dataSourceCollectionChanged(){return this._dataSourceCollectionChanged}symbolSourceCollectionChanged(){return this._symbolSourceCollectionChanged}symbolSourceResolved(){return this._symbolSourceResolved}symbolSourceResolvingActive(){return this._symbolSourceResolvingActive}adjustForDividendsAvailability(){return this._adjustForDividendsAvailability}adjustForDividendsEnabled(){return this._adjustForDividendsEnabled}paneCollapsingAvailable(){return this._paneCollapsingAvailable}sourcePropertiesChanged(){return this._sourceProperitesChanged}sourceZOrderChanged(){return this._sourceZOrderChanged}zoomTime(e,t,i){if(!this._zoomEnabled)return;const s=this.timeScale();if(s.isEmpty()||0===t)return;const r=s.width();e=Math.max(1,Math.min(e,r-2)),s.zoom(e,t,i),this.recalculateAllPanes((0, +W.viewportChangeEvent)()),this.lightUpdate(),this.recalcVisibleRangeStudies(),this._setScalesResetAvailable(!0)}linePointBeingEdited(){return this._linePointBeingEdited}activeItemBeingMoved(){return this._activeItemBeingMoved}linePointBeingChanged(){return this._linePointBeingChanged}updateAllPaneViews(e){for(const t of this._panes)t.updateAllViews(e)}dataSources(){const e=[this.crossHairSource()];for(const t of this._panes)for(const i of t.dataSources())e.push(i);return e}priceDataSources(){const e=[];for(const t of this._panes)for(const i of t.priceDataSources())e.push(i);return e}symbolSources(){const e=[];for(const t of this._panes)for(const i of t.symbolSources())e.push(i);return e}selection(){return this._selection}selectionMacro(e,t=!1){const i=this.selection().allSources();e({removeSourceFromSelection:this._removeSourceFromSelection,addSourceToSelection:this._addSourceToSelection,clearSelection:this._clearSelection,selection:this.selection.bind(this)});const s=(0,v.subtract)(i,this.selection().allSources()),r=(0,v.subtract)(this.selection().allSources(),i);r.concat(i).forEach((e=>e.updateAllViews((0,W.selectionChangeEvent)())));let n=[];s.forEach((e=>{if((0,S.isLineTool)(e)){const i=e.hasAlert.value()&&e.getAlertSync();i&&i.setSelected(!1),!t&&e.shouldBeRemovedOnDeselect()&&n.push(e)}})),r.forEach((e=>{const t=(0,S.isLineTool)(e)&&e.hasAlert&&e.hasAlert.value()&&e.getAlertSync();t&&t.setSelected(!0)})),n=n.filter((e=>null!==this.dataSourceForId(e.id()))),n.length>0&&this._undoModel.removeSources(n,!1,zi),this.lightUpdate(),(s.length>0||r.length>0)&&this._selectedSourceChanged.fire()}onSelectedSourceChanged(){return this._selectedSourceChanged}checkLineToolSelection(){const e=this.selection().allSources();this._selection.checkLineToolSelection(),e.length!==this.selection().allSources().length&&this._selectedSourceChanged.fire()}lineToolsGroupModel(){return this._lineToolsGroupModel}restoreLineToolsGroups(e){this._lineToolsGroupModel=lt.fromState(this,e)}realignLineTools(e){for(const t of this._panes)(void 0===e||t.hasDataSource(e))&&t.realignLineTools(e)&&this._dataSourceCollectionChanged.fire(t)}isSnapshot(){return this._isSnapshot}onWidget(){return this._options.onWidget}hideIdeas(){return this._options.hideIdeas}updateSource(e){const t=this._invalidationMaskForSource(e);null!==t&&this.invalidate(t)}updateSourcePriceScale(e){const t=this._invalidationMaskForSourcePriceScale(e);null!==t&&this.invalidate(t)}updatePane(e){this.invalidate(this._paneInvalidationMask(e))}insertStudyWithParams(e,t,i,s,o,a,l,c,h,d,u){var p,_;let m=null;if(!o&&void 0!==e.groupingKey){const t=this.findNonOverlayStudyWithGroupingKey(e.groupingKey);null!==t&&(m=t.pane)}null===m&&(o||e.is_price_study?m=(0,n.ensureNotNull)(this.paneForSource(null!==(p=null==a?void 0:a[0])&&void 0!==p?p:this.m_mainSeries)):(m=this.createPane(),void 0!==d&&m.setPaneSize(d))),"Compare@tv-basicstudies"===e.id&&this.m_mainSeries.priceScale().setMode({log:!1,percentage:!0});const g=(0,ie.merge)((0,r.default)(null!=s?s:{}),{inputs:t,parentSources:[] +}),f=null!=a?a:[],v=(0,C.prepareStudyProperties)(e,g,m,this.studyVersioning(),f),S=(0,j.createStudy)(this,v,f,e,u);this._recalcVisibleRangeStudiesImpl({studies:[S],oldEndVisibleIndex:-1,oldStartVisibleIndex:-1,force:!0,timerId:null});const y=m.findSuitableScale(S,null!==(_=null==a?void 0:a[0])&&void 0!==_?_:this.mainSeries(),l);if(y===this.mainSeries().priceScale()&&(0,pe.isSymbolSource)(S)){const e=c?(0,Ni.sourceNewCurrencyOnPinningToPriceScale)(S,y,this,!0):null,t=h?(0,Oi.sourceNewUnitOnPinningToPriceScale)(S,y,this,!0):null;null===e&&null===t||S.setSymbolParams({currency:e||void 0,unit:t||void 0})}return(0,pe.isSymbolSource)(S)&&(0,n.ensureNotNull)(m).hasDataSource(this.mainSeries())&&Ui&&!Wi.getBool("enable_symbol_labels_on_inserting_compare_once",!1)&&((0,x.saveDefaultProperties)(!0),this.properties().childs().scalesProperties.childs().showSymbolLabels.setValue(!0),(0,x.saveDefaultProperties)(!1),Wi.setValue("enable_symbol_labels_on_inserting_compare_once",!0)),S.start(),i&&m.id()===i.paneId?m.insertDataSource(S,y,i.zorder):m.addDataSource(S,y,!1),S.properties().childs().linkedToSeries&&S.properties().childs().linkedToSeries.value()&&S.setOwnerSource(this.mainSeries()),this.recalculatePane(m,(0,W.sourceChangeEvent)(S.id())),this.fullUpdate(),this._invalidateBarColorerCaches(),this._recalcVisibleRangeStudiesImpl({studies:[S],force:!0}),this._recalcColorStudiesImpl({studies:[S],force:!0}),this._studyInserted.fire(S),S.maxOffset().subscribe(this._boundUpdateStudiesMaxOffset,{callWithLast:!0}),S}replaceStudyStub(e,t){const i=this.paneForSource(e);if(null===i)return!1;const s=e.priceScale(),r=e.zorder(),n=e.ownerSource();return this.paneForSource(e)===i?i.replaceSource(e,t,s):(i.insertDataSource(t,s,r),this.removeSource(e)),t.setOwnerSource(n),this.dataSources().forEach((i=>{i.ownerSource()===e&&i.setOwnerSource(t)})),t.start(),this.recalculatePane(i,(0,W.sourceChangeEvent)(t.id())),this.fullUpdate(),!0}insertStudyStub(e){const t=this.mainSeries(),i=(0,n.ensureNotNull)(this.paneForSource(t)),s=new P.StudyStub(this,null,e),r=i.createPriceScaleAtPosition("overlay");return i.addDataSource(s,r,!1),this.recalculatePane(i,(0,W.sourceChangeEvent)(s.id())),this.fullUpdate(),s}removeStudyStub(e){const t=this.dataSourceForId(e);return null===t?(ji.logNormal("StudyStub id="+e+" is not found in chart model"),!1):(this.removeSource(t),!0)}setHoveredSource(e,t=null){const i=this._hoveredSource!==e;if(!i&&this._lastHoveredHittestData===t)return;this._lastHoveredHittestData=t;let s=null;if(this._hoveredSource){this._hoveredSource.updateAllViews((0,W.selectionChangeEvent)()),s=new K.InvalidationMask(K.InvalidationLevel.Cursor);const e=this._invalidationMaskForSource(this._hoveredSource,K.InvalidationLevel.Light);null!==e&&s.merge(e)}if(this._hoveredSource=e,e){e.updateAllViews((0,W.selectionChangeEvent)()),s||(s=new K.InvalidationMask(K.InvalidationLevel.Cursor));const t=this._invalidationMaskForSource(e,K.InvalidationLevel.Light);null!==t&&s.merge(t)}s&&this.invalidate(s),i&&this._hoveredSourceChanged.fire(e)}properties(){ +return this._properties}chartApi(){return this._chartApi}disconnect(){this.sessions().stop();for(const e of this.dataSources())e.disconnect&&e.disconnect();this._timeScale.disconnect()}crossHairSource(){return this.m_crossHairSource}gridSource(){return this._gridSource}publishedChartsTimelineSource(){return null}hoveredSource(){return this._hoveredSource}hoveredSourceChanged(){return this._hoveredSourceChanged}lastHittestData(){return this._lastHoveredHittestData}lastSelectedHittestData(){return this._lastSelectedHittestData}syncTimeWithModel(e,t){const i=this.mainSeries().syncModel();if(null===i)return;const s=1e3*this.createSyncPoint(e,i.syncSourceTarget()).sourceTimeToTargetTime(t/1e3),r=(0,ht.get_timezone)(this.timezone());let n=(0,ht.utc_to_cal)(r,s);this.mainSeries().isDWM()&&(n=i.getSession().spec.correctTradingDay(n),(0,ht.set_hms)(n,0,0,0,0,(0,ht.get_timezone)("Etc/UTC"))),this._gotoTimeImpl(n.getTime(),{centerIfVisible:!1})}gotoTime(e){return this._gotoTimeImpl(e,{centerIfVisible:!0})}recalculatePane(e,t){null==e||e.recalculate(t)}recalculateAllPanes(e){this._panes.forEach((t=>t.recalculate(e))),this.updateAllPaneViews(e),this.crossHairSource().updateAllViews(e)}gotoTimeRange(e,t){const i=this.timeScale(),s=i.tickMarks(),r=this.mainSeries();if(void 0===s.minIndex)return void(this._lastGotoTimeRange={from:e,to:t});let o=e,a=t;const l=r.symbolInfo();if(null!==l){let i=this.properties().childs().timezone.value();"exchange"===i&&(i=l.timezone);const s=(0,ht.get_timezone)(i),n=(0,ht.utc_to_cal)(s,e),c=(0,ht.utc_to_cal)(s,t);if(r.isDWM()){const e=(0,ht.get_timezone)("Etc/UTC");(0,ht.set_hms)(n,0,0,0,0,e),(0,ht.set_hms)(c,0,0,0,0,e)}o=n.getTime(),a=c.getTime()}const c=(0,n.ensureDefined)(s.maxIndex),h=(0,n.ensureDefined)(s.minIndex);if(o>=(0,n.ensureNotNull)(s.indexToTime(h)).valueOf()||r.endOfData()){const e=(e,t)=>e(0,n.ensureNotNull)(s.indexToTime(e)).valueOf(),l=(0,v.lowerboundExt)(t,o,e,s.nearestIndex(o),c);let d=o===a?l:(0,v.lowerboundExt)(t,a,e,s.nearestIndex(a),c);this._lastGotoTimeRange=null,null!==this._lastAppliedGotoTimeRange&&(this._lastAppliedGotoTimeRange.actual=!1);const u=i.baseIndex();if(l+Math.max(d-l+1,i.minVisibleBarCount())>u){const e=i.targetDefaultRightOffset();d-u=0;t--)if(this._panes[t].hasDataSource(e))return this._panes[t] +;return e instanceof vt.BarsMarksContainer?this.paneForSource(this.mainSeries()):null}mainPane(){for(const e of this._panes)if(e.isMainPane())return e;throw new Error("Main pane is not found")}lastPane(){return this._panes[this._panes.length-1]}removeSource(e,t){this.selectionMacro((t=>t.removeSourceFromSelection(e)),!0),this._hoveredSource===e&&(this._hoveredSource=null,this._lastHoveredHittestData=null),this._sourcesBeingMoved.includes(e)&&(this._sourcesBeingMoved=this._sourcesBeingMoved.filter((t=>t!==e)),this._sourcesBeingMoved.length||(this._activeItemBeingMoved=null)),e===this._lineBeingEdited&&(this._lineBeingEdited=null,gt.isToolEditingNow.setValue(!1)),e===this._lineBeingCreated&&(this._lineBeingCreated=null,gt.isToolCreatingNow.setValue(!1)),!t&&e.stop&&e.stop();const i=this.detachSource(e),s=this.mainSeries().priceScale();return(0,j.isStudy)(e)&&(0,pe.isActingAsSymbolSource)(e)&&e.priceScale()===s&&s.isPercentage()&&1===s.seriesLikeSources().filter(pe.isActingAsSymbolSource).length&&s.setMode({percentage:!1}),this.fullUpdate(),this._invalidateBarColorerCaches(),(0,j.isStudy)(e)&&((0,_.emit)("study_event",e.id(),"remove"),e.isChildStudy()&&e.parentSources().forEach((t=>t.unsetChild(e))),e.maxOffset().unsubscribe(this._boundUpdateStudiesMaxOffset)),!t&&e.destroy&&e.destroy(),(0,S.isLineTool)(e)&&(e.removeAlert(),(0,_.emit)("drawing_event",e.id(),"remove")),i}allStudies(e){const t=e?e=>(0,j.isStudy)(e)&&!0:j.isStudy;return this._getAllSources(t)}findNonOverlayStudyWithGroupingKey(e,t){const i=void 0!==t?[t]:this._panes;for(const t of i){const i=t.dataSources().find((i=>(0,j.isStudy)(i)&&i.metaInfo().groupingKey===e&&!t.isOverlay(i)));if(void 0!==i)return{pane:t,study:i}}return null}movePaneUp(e){this.movePane(e,e-1)}movePaneDown(e){this.movePane(e,e+1)}movePane(e,t){const i=this._panes[e];this._panes.splice(e,1),this._panes.splice(t,0,i),this._panesCollectionChanged.fire(this._panes),this._onRearrangePanes.fire(),this.invalidate(K.InvalidationMask.panesOrder())}backgroundColor(){return this._backgroundColor}backgroundTopColor(){return this._backgroundTopColor}backgroundColorAtYPercentFromTop(e){const t=this.backgroundColor().value(),i=this.backgroundTopColor().value();if(t===i)return t;if(e=Math.max(0,Math.min(100,Math.round(100*e))),null===this._gradientColorsCache||this._gradientColorsCache.topColor!==i||this._gradientColorsCache.bottomColor!==t)this._gradientColorsCache={topColor:i,bottomColor:t,colors:new Map};else{const t=this._gradientColorsCache.colors.get(e);if(void 0!==t)return t}const s=(0,ft.gradientColorAtPercent)(i,t,e/100);return this._gradientColorsCache.colors.set(e,s),s}backgroundCounterColor(){const e=this.backgroundColor().value();if(void 0===this._lastBackgroundColor||void 0===this._lastOriginalColor||e!==this._lastBackgroundColor){const t=(0,a.rgbToBlackWhiteString)((0,a.parseRgb)(e),150);this._lastBackgroundColor=e,this._lastOriginalColor="black"===t?"white":"black"}return this._lastOriginalColor}isDark(){return"white"===this.backgroundCounterColor()}defaultResolutions(){ +return this.chartApi().defaultResolutions()}availableCurrencies(){const e=this._getAvailableCurrencies();return e.length!==this._availableCurrencies.size()&&(this._availableCurrencies=new bt(e)),this._availableCurrencies}currencyConversionEnabled(){return this._options.currencyConversionEnabled}availableUnits(){const e=this._getAvailableUnits();return this._availableUnits.unitsChanged(e)&&(this._availableUnits=new wt(e)),this._availableUnits}unitConversionEnabled(){return this._options.unitConversionEnabled}availablePriceSources(){const e=this._getAvailablePriceSources();return null!==e&&this._availablePriceSources.priceSourcesChanged(e)&&(this._availablePriceSources=new Hi(e)),this._availablePriceSources}resetDeferredStudies(){ye.instance(this).reset()}isJustClonedChart(){return this._undoModel.isJustClonedChart()}studyTemplate(e,t,i){const s={panes:[],version:this.version()};for(const e of this.panes())s.panes.push(e.state(!0,!1,!0));const r=this.mainSeries();return e&&(s.symbol=r.symbol(),this.currencyConversionEnabled()&&i&&(s.currency=r.currency()),this.unitConversionEnabled()&&i&&(s.unit=r.unit())),t&&(s.interval=r.interval()),s}restoreLineToolState(e,t,i){e.restorePoints(t.points,t.indexes||[]),e.properties().merge(t.state),e.restoreData&&e.restoreData(t),e.linkKey().setValue(t.linkKey||null),e.createServerPoints(),this.fullUpdate();const s=e.linkKey().value();null!==s&&i&&(0,gt.restoreLineToolState)({model:this,linkKey:s,state:t})}preferences(){return(0,Vi.preferencesByWhiteList)(this,this.mainSeries())}restoreTheme(e,t,i){e.mainSourceProperties.hollowCandleStyle||(e.mainSourceProperties.hollowCandleStyle=e.mainSourceProperties.candleStyle),this._undoModel.chartLoadTheme(e,t,i)}onResetScales(){return this._resetScales}startMovingSources(e,t,i,s,r,o){this._sourcesBeingMoved=e,this._activeItemBeingMoved=i;let a=!1;if(this._sourcesBeingMoved.forEach((e=>{!a&&(0,j.isStudy)(e)&&(a=!0);const l=(0,n.ensureNotNull)(this.paneForSource(e)),c=(0,S.isLineTool)(e),h=c&&e.linkKey().value();if(!1!==h&&null!==h&&s.has(h)&&c&&e.isFixed()){const t=(0,n.ensureDefined)(s.get(h)),a={screen:this._percentPositionToPoint(t,l)};e.startMoving(a,i,r,o)}else e.startMoving(t,i,r,o);const d=this._paneInvalidationMask(l,K.InvalidationLevel.Light);this.invalidate(d)})),!o){const s=e.filter(S.isLineTool).filter((e=>e.linkKey().value()&&e.isSynchronizable())).map((e=>e.linkKey().value()));if(s.length&&t.logical){const o=this.externalTimeStamp(t.logical.index),a={linkKeys:s,model:this,symbol:this.mainSeries().symbol(),point:{price:t.logical.price,timeStamp:o},activeItem:null!==i?i:void 0,envState:r,pointPositionPercents:new Map};e.forEach((e=>{if((0,S.isLineTool)(e)){const i=e.linkKey().value();if(i&&e.isSynchronizable()&&e.isFixed()){const s=(0,n.ensureNotNull)(this.paneForSource(e));a.pointPositionPercents.set(i,this._pointToPercentPosition((0,n.ensureDefined)(t.screen),s))}}})),(0,gt.startMovingLineTool)(a)}}gt.isToolMovingNow.setValue(!0),a&>.isStudyEditingNow.setValue(!0)}moveSources(e,t,i,s){ +if(this._sourcesBeingMoved.filter((e=>!e.isLocked||!e.isLocked())).forEach((r=>{const o=(0,S.isLineTool)(r)?r.linkKey().value():null;if(null!==o&&t.has(o)){const e=(0,n.ensureNotNull)(this.paneForSource(r)),a=(0,n.ensureDefined)(t.get(o)),l={screen:this._percentPositionToPoint(a,e)};r.move(l,this._activeItemBeingMoved,i,s)}else r.move(e,this._activeItemBeingMoved,i,s)})),this.lightUpdate(),!s&&e.logical){const t=this._sourcesBeingMoved.filter(S.isLineTool).filter((e=>e.isSynchronizable()&&!!e.linkKey().value())).map((e=>e.linkKey().value())),s=this.externalTimeStamp(e.logical.index),r={linkKeys:t,model:this,point:{price:e.logical.price,timeStamp:s},envState:i,pointPositionPercents:new Map};this._sourcesBeingMoved.filter(S.isLineTool).forEach((t=>{if(t.linkKey().value()&&t.isSynchronizable()&&t.isFixed()){const i=(0,n.ensureNotNull)(this.paneForSource(t));r.pointPositionPercents.set(t.linkKey().value(),this._pointToPercentPosition((0,n.ensureDefined)(e.screen),i))}})),(0,gt.moveLineTool)(r)}}endMovingSources(e,t,i){const s=this._sourcesBeingMoved.map((s=>{const r=(0,n.ensureNotNull)(this.paneForSource(s)),o=s.endMoving(e,t,i),a=this._paneInvalidationMask(r,K.InvalidationLevel.Light);return a.invalidateAll(K.InvalidationLevel.Light),this.invalidate(a),o})),r=this._sourcesBeingMoved.filter(S.isLineTool).filter((e=>e.isSynchronizable()&&!!e.linkKey().value())).map((e=>e.linkKey().value())),o=this._sourcesBeingMoved.filter(S.isLineTool).filter((e=>e.isSynchronizable()&&!!e.linkKey)).map((e=>{const t={points:e.normalizedPoints(),interval:this.mainSeries().interval()};return e.isFixed()&&(t.pointPositionPercents=e.calcPositionPercents()),t}));r.length&&(0,gt.finishMovingLineTool)({linkKeys:r,model:this,finalStates:o,changes:s}),this._sourcesBeingMoved=[],this._activeItemBeingMoved=null,gt.isToolMovingNow.setValue(!1),gt.isStudyEditingNow.setValue(!1)}sourcesBeingMoved(){return this._sourcesBeingMoved}setMovingCustomSource(e,t){this._customSourceBeingMoved=e,this._customSourceBeingMovedHitTestData=null!==t?{beingMoved:!1,...t}:null}processingCustomSourceMove(){null!==this._customSourceBeingMovedHitTestData&&(this._customSourceBeingMovedHitTestData.beingMoved=!0)}customSourceMovingHitTestData(){return this._customSourceBeingMovedHitTestData}customSourceBeingMoved(){return null!==this._customSourceBeingMovedHitTestData&&this._customSourceBeingMovedHitTestData.beingMoved?this._customSourceBeingMoved:null}width(){return this._width}setWidth(e,t){this._width=e,this._timeScale.setWidth(e,t);for(const t of this._panes)t.setWidth(e);this.recalculateAllPanes((0,W.viewportChangeEvent)()),this.recalcVisibleRangeStudies()}setPaneHeight(e,t){e.setHeight(t),this.recalculateAllPanes((0,W.viewportChangeEvent)()),this.lightUpdate()}isScalesResetAvailableChanged(){return this._isScalesResetAvailableChanged}isScalesResetAvailable(){return this._isScalesResetAvailable}panes(){return this._panes}paneForId(e){return this._panes.find((t=>t.id()===e))||null}createPane(e,t,i){const s=this._undoModel.chartWidget() +;s.isMaximizedPane()&&s.toggleMaximizePane(null);const r=this._properties.childs().paneProperties;t&&r.merge(t);const n=new Le(this._timeScale,r,this,i);return void 0!==e?this._panes.splice(e,0,n):this._panes.push(n),n.onTagsChanged().subscribe(this,Yi.prototype.onPaneTagsChanged),n.dataSourcesCollectionChanged().subscribe(this,(()=>this._dataSourceCollectionChanged.fire(n))),n.symbolSourceCollectionChanged().subscribe(this,(()=>this._onSymbolSourceCollectionChanged(n))),n.sourcePropertiesChanged().subscribe(this,(e=>this._sourceProperitesChanged.fire(n,e))),n.sourceZOrderChanged().subscribe(this,(e=>this._sourceZOrderChanged.fire(n,e))),n.symbolSourceResolved().subscribe(this,(e=>this._symbolSourceResolved.fire(n,e))),n.symbolSourceResolvingActive().subscribe(this._recalcSymbolResolvingActive),n.collapsed().subscribe(this._recalcPaneCollapsingAvailable),this._recalcPaneCollapsingAvailable(),this._panesCollectionChanged.fire(this._panes),this.invalidate(K.InvalidationMask.panesOrder()),n}removePane(e){const t=this._undoModel.chartWidget();t.isMaximizedPane()&&t.toggleMaximizePane(null);const i=e;i.destroy();const s=this._panes.indexOf(i);-1!==s&&(this._panes.splice(s,1),e.dataSourcesCollectionChanged().unsubscribeAll(this),e.symbolSourceCollectionChanged().unsubscribeAll(this),e.sourcePropertiesChanged().unsubscribeAll(this),e.onTagsChanged().unsubscribeAll(this),e.symbolSourceResolved().unsubscribeAll(this),i.symbolSourceResolvingActive().unsubscribe(this._recalcSymbolResolvingActive),e.collapsed().unsubscribe(this._recalcPaneCollapsingAvailable),this._recalcPaneCollapsingAvailable(!0));this.crossHairSource().pane===e&&this.clearCurrentPosition(),this._panesCollectionChanged.fire(this._panes),this.invalidate(K.InvalidationMask.panesOrder())}changePanesHeight(e,t){if(this._panes.length<2)return;(0,n.assert)(e>=0&&ee+t.stretchFactor()),0),r=this._panes.reduce(((e,t)=>e+t.height()),0),o=r-30*(this._panes.length-1);t=Math.min(o,Math.max(30,t));const a=s/r,l=i.height();i.setStretchFactor(t*a);let c=t-l,h=this._panes.length-1;for(const e of this._panes)if(e!==i){const t=Math.min(o,Math.max(30,e.height()-c/h));c-=e.height()-t,h-=1;const i=t*a;e.setStretchFactor(i)}this.fullUpdate()}clearCurrentPosition(){const e=this.crossHairSource();e.clearPosition(),(0,n.ensureNotNull)(e.dataWindowView()).update(),qi(this._panes),this.invalidate(K.InvalidationMask.cursor());const t=this._undoModel.chartWidget();t.chartWidgetCollection().syncCrosshair(null,t.id()),this._phantomSourceContainer.onCursorPositionUpdated()}setAndSaveCurrentPosition(e,t,i,s){this.crossHairSource().saveOriginCoords(e,t),this.setCurrentPosition(e,t,i,s)}setCurrentPosition(e,t,i,s){var r,o,a;let l=NaN;const c=this._timeScale.coordinateToVisibleIndex(e),h=null!==(a=null===(o=null!==(r=this._lineBeingEdited)&&void 0!==r?r:this._lineBeingCreated)||void 0===o?void 0:o.priceScale())&&void 0!==a?a:i.defaultPriceScale();let d=null;!h.isEmpty()&&Number.isFinite(t)&&(d=(0, +n.ensureNotNull)(i.mainDataSource()).firstValue(),null!==d&&(l=h.coordinateToPrice(t,d)));const u=this._crossHairSelectPointMode.value()!==gt.SelectPointMode.None,p=this.currentTool(),_=this.mainSeries(),m=this.crossHairSource(),g=m.index,f=m.price,v=u||gt.isStudyEditingNow.value(),y=h===this.m_mainSeries.priceScale()&&(this._lineBeingCreated||this._lineBeingEdited||(0,S.isLineToolName)(p)||(0,gt.toolIsMeasure)(p)||v);!this._isSettingsExternalPosition&&y?(l=this._magnet.align(l,c,i),null!==d&&this._setCorrectedPositionToCrosshair(c,l,i)):this._magnet.resetLastValue();let b=null;if(isNaN(l)||(b=i),this._isTimeScrolling){if(!this._isSettingsExternalPosition&&u){const e=_.bars().firstIndex(),t=_.bars().lastIndex();if(null!==e&&null!==t){const s=Math.min(Math.max(c,e),t);s!==c&&this._setCorrectedPositionToCrosshair(s,l,i)}}else m.setPosition(m.index,l,b);return}m.setOnHoveredChartWidget(!0),m.setPosition(c,l,b),(0,n.ensureNotNull)(m.dataWindowView()).update(),qi(this._panes);const w=_.syncModel();if(this.crossHairSource().startMeasurePoint()||this._lineBeingCreated?this.lightUpdate():this.invalidate(K.InvalidationMask.cursor()),this._lineBeingCreated){const e=this._lineBeingCreated.linkKey().value();if(!this._isSettingsExternalPosition){const t=this._lineBeingCreated.setLastPoint({index:c,price:l},s);if(this._lineBeingCreated.updateAllViews((0,W.sourceChangeEvent)(this._lineBeingCreated.id())),t.price===l&&t.index===c||this._setCorrectedPositionToCrosshair(t.index,t.price,i),w&&e){const i=this._timeScale.points().roughTime(t.index,w.projectTime.bind(w));(0,gt.setLineToolLastPoint)({model:this,linkKey:e,point:{timeStamp:(0,n.ensureNotNull)(i),price:t.price}})}}}if(!this._isSettingsExternalPosition&&null!==this._lineBeingEdited&&null!==this._linePointBeingEdited){const e={index:c,price:l};this.changeLinePoint(e,s);const t=this._lineBeingEdited.alignCrossHairToAnchor(this._linePointBeingEdited)?this._lineBeingEdited.getPoint(this._linePointBeingEdited):e;null!==t&&this._setCorrectedPositionToCrosshair(t.index,t.price,i)}if(!this._isSettingsExternalPosition&&v){const e=_.bars().firstIndex(),t=_.bars().lastIndex();if(null!==e&&null!==t){const s=Math.min(Math.max(c,e),t);s!==c&&this._setCorrectedPositionToCrosshair(s,l,i)}}(g!==c||f!==l)&&this._syncCrosshair(s)}setExternalPosition(e,t){let i;const s=this.crossHairSource();if(s.setOnHoveredChartWidget(!1),null!==e&&(0,ie.isNumber)(e.timeStamp)){const t=this.mainSeries().syncModel();if(t){const s=this.createSyncPoint(e.syncSourceTarget,t.syncSourceTarget()).sourceTimeToTargetTime(e.timeStamp);i=this._timeScale.points().roughIndex(s,t.distance.bind(t))}}if(null!==e&&null!=i&&Number.isFinite(i)){this._isSettingsExternalPosition=!0;const r=(0,n.ensureNotNull)(this.paneForSource(this.mainSeries())),o=this._timeScale.indexToCoordinate(i),a=(0,n.ensureNotNull)(r.mainDataSource()).firstValue();if(null!==a){let i=NaN;void 0!==e.price&&Number.isFinite(e.price)&&(i=this.mainSeries().priceScale().priceToCoordinate(e.price,a)),s.clearOriginCoords(),this.setCurrentPosition(o,i,r,t)} +return s.setOnHoveredChartWidget(!1),void(this._isSettingsExternalPosition=!1)}s.clearPosition(),(0,n.ensureNotNull)(s.dataWindowView()).update(),qi(this._panes),this.invalidate(K.InvalidationMask.cursor())}startScaleTime(e){this._timeScale.startScale(e)}scaleTimeTo(e){this._timeScale.scaleTo(e),this.recalculateAllPanes((0,W.viewportChangeEvent)()),this.lightUpdate(),this._setScalesResetAvailable(!0)}endScaleTime(){this._timeScale.endScale(),this.lightUpdate(),this.recalcVisibleRangeStudies()}resetTimeScale(){this._timeScale.restoreDefault(),this.recalculateAllPanes((0,W.viewportChangeEvent)()),this.recalcVisibleRangeStudies(),this.lightUpdate(),this._resetScales.fire(),this._setScalesResetAvailable(!1)}startScalePrice(e,t,i){e.startScalePrice(t,i)}scalePriceTo(e,t,i){e.scalePriceTo(t,i),this.mainSeries().priceScale().isLockScale()?this.lightUpdate():this.invalidate(this._paneInvalidationMask(e,K.InvalidationLevel.Light)),this._setScalesResetAvailable(!0)}endScalePrice(e,t){e.endScalePrice(t),this.invalidate(this._paneInvalidationMask(e,K.InvalidationLevel.Light))}startTwoPointsScalePrice(e,t,i,s){t.startTwoPointsScale(i,s)}twoPointsScalePriceTo(e,t,i,s){t.twoPointsScale(i,s),this.invalidate(this._paneInvalidationMask(e)),this._setScalesResetAvailable(!0)}endTwoPointsScalePrice(e,t){t.endTwoPointsScale(),this.invalidate(this._paneInvalidationMask(e))}resetPriceScale(e,t){this._setScalesResetAvailable(!1),e.resetPriceScale(t),this.invalidate(this._paneInvalidationMask(e,K.InvalidationLevel.Light))}restorePriceScaleState(e,t,i){e.restorePriceScaleState(t,i),this.invalidate(this._paneInvalidationMask(e,K.InvalidationLevel.Light))}currentTool(){return this._currentTool}setCurrentTool(e){this._currentTool!==e&&((0,S.isLineToolName)(e)&&this.selectionMacro((e=>{e.clearSelection()})),this._currentTool=e,this._phantomSourceContainer.onToolChanged())}detachSource(e){const t=this.paneForSource(e);return!!t&&(t.removeDataSource(e),t.isEmpty()?(this._lineBeingCreated&&t===this._paneBeingCreatedLineOn&&this.cancelCreatingLine(),this.removePane(t),!0):(this.fullUpdate(),!1))}children(e,t){return this.dataSources().filter((i=>(0,j.isStudy)(i)?!t&&i.parentSources().includes(e):i.ownerSource()===e))}onRearrangePanes(){return this._onRearrangePanes}finishLineTool(e){const t=e.linkKey().value();(0,gt.drawOnAllCharts)().value()&&null!==t&&e.isSynchronizable()&&(0,gt.finishLineTool)({linkKey:t,model:this})}startChangingLinetool(e,t,i,s,r){this._lineBeingEdited=e,this._linePointBeingChanged=t||null,this._linePointBeingEdited=void 0===i?null:i,this._lineBeingEdited.startChanging(i,t,r),gt.isToolEditingNow.setValue(!0);const o=(0,n.ensureNotNull)(this.paneForSource(e));this._lineBeingEdited.startDragPoint&&void 0!==i&&void 0!==t&&this._lineBeingEdited.startDragPoint(i,t),r||void 0===i||void 0===t||this._lineBeingEdited.setPoint(i,t,s,r),this._lineBeingEdited.updateAllViews((0,W.sourceChangeEvent)(this._lineBeingEdited.id()));const a=this._paneInvalidationMask(o,K.InvalidationLevel.Light);this.invalidate(a);const l=e.linkKey().value() +;if(l&&e.isSynchronizable()&&void 0!==i&&void 0!==t){const e=(0,n.ensureNotNull)(this.externalTimeStamp(t.index));(0,gt.startChangingLineTool)({linkKey:l,model:this,symbol:this.mainSeries().symbol(),point:{price:t.price,timeStamp:e},pointIndex:i,envState:s||null})}}createLineTool(e,t,i,s,r,a,l){if((0,n.assert)((0,S.isLineToolName)(i),`Cannot create unknown line tool: ${i}`),s){const e={...Ri.intervalsVisibilitiesDefaults},t=s.childs().intervalsVisibilities.state();(0,ie.merge)(e,null!=t?t:{});const r=s.state();r.intervalsVisibilities=e,s=(0,S.createLineToolProperties)(i,r,this)}const c=(0,S.createLineTool)(i,this,s,null,void 0,l);if("LineToolExecution"!==i){let e;switch(i){case"LineToolIcon":e=c.properties().childs().icon.value().toString(16).toUpperCase();break;case"LineToolEmoji":e=c.properties().childs().emoji.value()}(0,u.trackEvent)("drawings","Study_Drawing_"+i,e)}const h=!c.linkKey().value()&&!r;a=(0,n.ensureDefined)(a||(0,n.ensureNotNull)(e.mainDataSource())),s||(0,S.prepareLineToolPropertiesByOwnerSource)(c.properties(),a),c.setOwnerSource(a);const d=a.priceScale();if(e.addDataSource(c,d,!1),(0,gt.drawOnAllCharts)().value()){const e=c.isSynchronizable()?r||(0,J.randomHash)():null;c.linkKey().setValue(e)}else c.linkKey().setValue(r);let p;if(c.isFixed()){const i=(0,n.ensureNotNull)((0,n.ensureNotNull)(e.mainDataSource()).firstValue()),s=this._timeScale.indexToCoordinate(t.index),r=(0,n.ensureNotNull)(d).priceToCoordinate(t.price,i);p=c.addFixedPoint(new o.Point(s,r))}else p=c.addPoint(t);return p||(this._lineBeingCreated=c,this._paneBeingCreatedLineOn=e,gt.isToolCreatingNow.setValue(!0)),h&&c.enableCurrentIntervalVisibility(),this.fullUpdate(),c}endChangingLinetool(e,t){const i=(0,n.ensureNotNull)(this._lineBeingEdited),s=i.endChanging(!1,e,t);this._lineBeingEdited=null,gt.isToolEditingNow.setValue(!1),this._linePointBeingEdited=null,this._linePointBeingChanged=null,this.lightUpdate();const r={points:i.normalizedPoints(),interval:this.mainSeries().interval()},o=i.linkKey().value();null!==o&&i.isSynchronizable()&&!t&&(0,gt.finishChangingLineTool)({model:this,linkKey:o,symbol:this.mainSeries().symbol(),finalState:r,changes:s})}continueCreatingLine(e,t,i,s){const r=(0,n.ensureNotNull)(this._lineBeingCreated),o=r.addPoint(e,t,i);r.updateAllViews((0,W.sourceChangeEvent)(r.id()));const a=new K.InvalidationMask(K.InvalidationLevel.Light);return o&&(this._paneBeingCreatedLineOn=null,this._lineBeingCreated=null,gt.isToolCreatingNow.setValue(!1)),this.invalidate(a),o}cancelCreatingLine(){if(!this._lineBeingCreated)return;const e=this._lineBeingCreated;this.removeSource(this._lineBeingCreated),this._lineBeingCreated=null,this._lineCancelled.fire(),gt.isToolCreatingNow.setValue(!1),(0,gt.drawOnAllCharts)().value()&&e.isSynchronizable()&&(0,gt.cancelLineTool)({model:this})}lineBeingCreated(){return this._lineBeingCreated}paneBeingCreatedLineOn(){return this._paneBeingCreatedLineOn}lineCancelled(){return this._lineCancelled}isPhantomLine(e){return this._phantomSourceContainer.source()===e}changeLinePoint(e,t,i){const s=(0, +n.ensureNotNull)(this._lineBeingEdited),r=(0,n.ensureNotNull)(this._linePointBeingEdited);let o=e.price,a=e.index;if(s.setPoint(r,e,t,i),!i){const t=s.alignCrossHairToAnchor(r)?s.getPoint(r):e;null!==t&&(a=t.index,o=t.price)}s.updateAllViews((0,W.sourceChangeEvent)(s.id())),this.lightUpdate();const l=s.linkKey().value();if(!i&&null!==l&&s.isSynchronizable()){const e=(0,n.ensureNotNull)(this._linePointBeingChanged),i={indexesChanged:a!==e.index,pricesChanged:o!==e.price},c=s.getChangePointForSync(r);if(null!==c){const e=this.externalTimeStamp(a);null!==e&&(o=c.price,(0,gt.changeLineTool)({linkKey:l,model:this,symbol:this.mainSeries().symbol(),point:{price:o,timeStamp:e},envState:t,changes:i}))}}}changeLinePoints(e,t,i){const s=e.points(),r=e.linkKey().value();!i&&r&&e.isSynchronizable()&&t.forEach(((t,i)=>{const o=s[i],a=o.price!==t.price,l=o.index!==t.index;if(e.getChangePointForSync(i)){const e=(0,n.ensureNotNull)(this.externalTimeStamp(t.index));(0,gt.changeLineTool)({linkKey:r,model:this,symbol:this.mainSeries().symbol(),point:{price:t.price,timeStamp:e},changes:{pricesChanged:a,indexesChanged:l}})}})),e.setPoints(t),e.updateAllViews((0,W.sourceChangeEvent)(e.id())),this.lightUpdate()}startScrollTime(e){this._timeScale.startScroll(e),this._isTimeScrolling=!0,this.mainSeries().clearGotoDateResult()}scrollTimeTo(e){this._timeScale.scrollTo(e),this.recalculateAllPanes((0,W.viewportChangeEvent)()),this.lightUpdate(),this._setScalesResetAvailable(!0)}endScrollTime(){this._timeScale.endScroll(),this.lightUpdate(),this.recalcVisibleRangeStudies(),this._isTimeScrolling=!1}startScrollPrice(e,t,i){e.startScrollPrice(t,i)}scrollPriceTo(e,t,i){e.scrollPriceTo(t,i),this.invalidate(this._paneInvalidationMask(e,K.InvalidationLevel.Light))}endScrollPrice(e,t){e.endScrollPrice(t),this.invalidate(this._paneInvalidationMask(e,K.InvalidationLevel.Light))}addCustomSource(e,t,i=g.CustomSourceLayer.Foreground){this._customSourcesMap.has(e)&&ji.logWarn(`Attempt to add the same custom source multiple time "${e}"`),ji.logNormal(`Adding custom source "${e}"`);const s=t(e,this);switch(i){case g.CustomSourceLayer.Background:this._bgCustomSources.push(s);break;case g.CustomSourceLayer.Foreground:this._fgCustomSources.push(s);break;case g.CustomSourceLayer.Topmost:this._topmostCustomSources.push(s);break;default:throw new Error(`Unknown custom sources layer ${i}`)}this._allCustomSources.push(s),this._customSourcesMap.set(e,s),this.lightUpdate()}removeCustomSource(e){this._removeCustomSource(e),this.lightUpdate()}hasCustomSource(e){return this._customSourcesMap.has(e)}customSourceForName(e){return this._customSourcesMap.get(e)||null}customSourceName(e){let t=null;return this._customSourcesMap.forEach(((i,s)=>{i===e&&(t=s)})),t}customSources(e){switch(e){case g.CustomSourceLayer.Background:return this._bgCustomSources;case g.CustomSourceLayer.Foreground:return this._fgCustomSources;case g.CustomSourceLayer.Topmost:return this._topmostCustomSources;default:return this._allCustomSources}}addMultiPaneSource(e){this._multiPaneSources.push(e), +this.lightUpdate()}removeMultiPaneSource(e){const t=this._multiPaneSources.indexOf(e);-1===t?ji.logWarn("Attempt to remove multi-pane source which does not exist in the model"):this._multiPaneSources.splice(t,1),this.lightUpdate()}multiPaneSources(e){return this._multiPaneSources.filter((t=>!e.hasDataSource(t)))}magnet(){return this._magnet}dateTimeFormatter(){return this._dateTimeFormatter}dateFormatter(){return this._dateFormatter}timeFormatter(){return this._timeFormatter}isUnmergeAvailableForSource(e){if(!this._unmergeAvailable(e))return!1;return(0,n.ensureNotNull)(this.paneForSource(e)).dataSources().filter(this._unmergeAvailable,this).length>1}isMergeDownAvailableForSource(e){if(!this._unmergeAvailable(e))return!1;const t=this.paneForSource(e),i=this.panes();return t!==i[i.length-1]}isMergeUpAvailableForSource(e){if(!this._unmergeAvailable(e))return!1;return this.paneForSource(e)!==this.panes()[0]}sessions(){return(0,n.ensureNotNull)(this._sessions)}createSessions(e){(0,n.assert)(null===this._sessions,"Sessions are already created"),this.addCustomSource("sessions",((t,i)=>(this._sessions=new U(t,i,e),this._sessions.start(),this._sessions)),g.CustomSourceLayer.Background)}createPrePostMarket(e){this.addCustomSource("prePostMarket",((t,i)=>new PrePostMarket(t,i,e)))}replayStatus(){return this._replayStatus}setReplayStatus(e){this._replayStatus.setValue(e)}theme(){const e=this.properties().childs().paneProperties.state();delete e.topMargin,delete e.bottomMargin;const t=this.mainSeries().state().state;t&&(delete t.symbol,delete t.interval,delete t.currencyId,delete t.unitId);const i={mainSourceProperties:t,sessions:this.sessions().properties().state(),chartProperties:{paneProperties:e,scalesProperties:this.properties().childs().scalesProperties.state()},version:this.version()};return i.version=this.version(),i}onChartThemeLoaded(){return this._chartThemeLoaded}chartThemeLoaded(){this._chartThemeLoaded.fire()}state(e,t,i,s){var r;const n=this.publishedChartsTimelineSource(),o=this.properties().childs(),a=o.tradingProperties.state(),l={panes:this._panes.map((r=>r.state(!0,e,!1,t,i,s))),timeScale:this._timeScale.state(e),chartProperties:{paneProperties:o.paneProperties.state(),scalesProperties:o.scalesProperties.state(),publishedChartsTimelineProperties:n?n.state(e):void 0,chartEventsSourceProperties:null===(r=o.chartEventsSourceProperties)||void 0===r?void 0:r.state(),tradingProperties:a,priceScaleSelectionStrategyName:o.priceScaleSelectionStrategyName.value()},sessions:this.sessions().state(e),version:this.version(),timezone:this.timezone(),shouldBeSavedEvenIfHidden:this._shouldBeSavedEvenIfHidden};return s||(l.lineToolsGroups=this.lineToolsGroupModel().state(t)),l}restoreState(e,t,i){ye.instance(this).reset();const s={};if(!e.panes)return void ji.logDebug("ChartModel.restoreState: invalid state");if(!Array.isArray(e.panes))return void ji.logDebug("ChartModel.restoreState: invalid state");if(e.panes.length<1)return void ji.logDebug("ChartModel.restoreState: invalid state") +;for(const e of this._barsMarksSources)this.detachSource(e);if(this._shouldBeSavedEvenIfHidden=void 0===e.shouldBeSavedEvenIfHidden||e.shouldBeSavedEvenIfHidden,e.chartProperties&&!e.chartProperties.timezone&&(e.chartProperties.timezone=e.timezone),e.chartProperties){const i=(0,V.factoryDefaults)("chartproperties").scalesProperties;(0,ie.merge)(i,e.chartProperties.scalesProperties),!("showLastValue"in i)||"showSeriesLastValue"in i||"showStudyLastValue"in i||(i.showSeriesLastValueProperty=i.showLastValue,i.showStudyLastValueProperty=i.showLastValue),"showSeriesLastValue"in i&&(s.showSeriesLastValueProperty=!0),"showStudyLastValue"in i&&(s.showStudyLastValueProperty=!0),(!this.isSnapshot()&&!this.readOnly()&&"showCurrency"in i||"showUnit"in i)&&((0,X.migrateShowCurrencyAndShowUnitProperties)(i.showCurrency,i.showUnit),delete i.showCurrency,delete i.showUnit),e.chartProperties.paneProperties.vertGridProperties=e.chartProperties.paneProperties.vertGridProperties||(0,ie.clone)(e.chartProperties.paneProperties.gridProperties),e.chartProperties.paneProperties.horzGridProperties=e.chartProperties.paneProperties.horzGridProperties||(0,ie.clone)(e.chartProperties.paneProperties.gridProperties),"backgroundType"in e.chartProperties.paneProperties||(e.chartProperties.paneProperties.backgroundType=St.ColorType.Solid),"separatorColor"in e.chartProperties.paneProperties||(e.chartProperties.paneProperties.separatorColor=(0,d.getThemedColor)("color-chart-page-bg")),this._properties.childs().paneProperties.mergeAndFire(e.chartProperties.paneProperties),this._properties.childs().scalesProperties.mergeAndFire(i),e.chartProperties.timezone&&this._properties.childs().timezone.setValue(e.chartProperties.timezone),e.chartProperties.chartEventsSourceProperties&&this._properties.hasChild("chartEventsSourceProperties")&&this._properties.childs().chartEventsSourceProperties.mergeAndFire(e.chartProperties.chartEventsSourceProperties),e.chartProperties.tradingProperties&&this._properties.hasChild("tradingProperties")&&(void 0===e.chartProperties.tradingProperties.horizontalAlignment&&(e.chartProperties.tradingProperties.horizontalAlignment=(r=e.chartProperties.tradingProperties.lineLength)<=40?g.TradedGroupHorizontalAlignment.Right:r>=60?g.TradedGroupHorizontalAlignment.Left:g.TradedGroupHorizontalAlignment.Center),this._properties.childs().tradingProperties.mergeAndFire(e.chartProperties.tradingProperties)),this._timeScale.restoreState(e.timeScale,t),this._updateDateTimeFormatter()}var r;if(e.timeScale&&this._timeScale.restoreState(e.timeScale,t),!this.readOnly()){const t=this._getExceedingChildStudies(e.panes);if(t.length){for(let i=e.panes.length-1;i>=0;--i){const s=e.panes[i];for(let e=s.sources.length-1;e>=0;--e){const i=s.sources[e];~t.indexOf(i)&&s.sources.splice(e,1)}s.sources.length||e.panes.splice(i,1)}0}}const n=e.version||0,o=e.panes;let a="_seriesId";for(const e of o){const t=e.sources.find((e=>"MainSeries"===e.type));if(t){a=t.id;break}}this.panes()[0].restoreState(o[0],t,n,a,s,i,!0);let l=1;for(let r=1;rp&&h%100==0?{lines_limit_exceeded:!0,line_tools_count:h}:(this.panes().forEach((e=>this._dataSourceCollectionChanged.fire(e))),this._lineToolsGroupModel.fireChangedAll(),{})}shouldBeSavedEvenIfHidden(){return this._shouldBeSavedEvenIfHidden}setShouldBeSavedEvenIfHidden(e){this._shouldBeSavedEvenIfHidden=e}externalTimeStamp(e){const t=this.mainSeries().syncModel();return this.timeScale().points().roughTime(e,t&&t.projectTime.bind(t))}syncLollipopSources(){null!==this._lollipopSourcesWatcher&&this._lollipopSourcesWatcher.syncSources()}restoreChartEvents(e){null!==this._lollipopSourcesWatcher&&this._options.chartEventsEnabled&&this._lollipopSourcesWatcher.restoreChartEvents(e)}recalcVisibleRangeStudies(e){this._recalcVRStudiesParams.force=this._recalcVRStudiesParams.force||Boolean(e),this._recalcVisibleRangeStudiesImplDebounced()}recalcColorStudies(e){this._recalcColorStudiesParams.force=this._recalcColorStudiesParams.force||Boolean(e),this._recalcColorStudiesImplDebounced()}recalcStudyBasedLineTools(){this.dataSources().forEach((e=>{(0,S.isStudyLineTool)(e)&&e.recalcStudyIfNeeded()}))}alertsWatcher(){return this._alertsWatcher}showLegend(){return this._showLegendProperty}id(){return this._id}selectPointMode(){return this._crossHairSelectPointMode}recalculatePriceRangeOnce(){const e=this.mainSeries();for(const t of this._panes)for(const i of t.priceDataSources())i.symbolSource()===e&&i.disablePriceRangeReady()}invalidate(e){var t;null===(t=this._invalidateHandler)||void 0===t||t.call(this,e)}appliedTimeFrame(){return this._appliedTimeFrame.appliedTimeFrame()}barsMarksSources(){return this._barsMarksSources}createSyncPoint(e,t){return(0,Bi.getDefault2Lazy)(this._syncPointCache,e.uniqueId,t.uniqueId,(()=>new mt(e,t)))}isAutoSaveEnabled(){return this._isAutoSaveEnabled}studyAwareDefaultRightOffset(){return this._timeScale.usePercentageRightOffset().value()?this._timeScale.percentsToBarIndexLength(this.studyAwareDefaultRightOffsetPercentage()):Math.max(this._timeScale.defaultRightOffset().value(),this._cachedStudiesMaxOffset)} +studyAwareDefaultRightOffsetPercentage(){return this._timeScale.usePercentageRightOffset().value()?Math.max(this._timeScale.defaultRightOffsetPercentage().value(),this._timeScale.barIndexLengthToPercents(this._cachedStudiesMaxOffset)):this._timeScale.barIndexLengthToPercents(this.studyAwareDefaultRightOffset())}clearAllStudies(){this.dataSources().forEach((e=>{var t;return null===(t=e.clearData)||void 0===t?void 0:t.call(e)}))}setTimeScaleAnimation(e){const t=K.InvalidationMask.light();t.setTimeScaleAnimation(e),this.invalidate(t)}stopTimeScaleAnimation(){const e=K.InvalidationMask.light();e.stopTimeScaleAnimation(),this.invalidate(e)}lollipopSourcesOptions(){const e=this._options;return{chartEventsEnabled:!this._options.isSnapshot&&this._options.chartEventsEnabled,esdEnabled:e.esdEnabled,continuousContractSwitchesEnabled:e.continuousContractSwitchesEnabled,futuresContractExpirationEnabled:e.futuresContractExpirationEnabled,newsEnabled:e.newsEnabled}}_initAlertsList(){throw new Error("Not implemented")}_updateStudiesMaxOffset(){const e=Math.max(...this.allStudies().map((e=>e.maxOffset().value())));this._cachedStudiesMaxOffset=e;const t=this._timeScale.rightOffset();t<0||this._timeScale.setRightOffset(Math.max(t,e))}_updateBaseIndex(e,t){const i=this._timeScale,s=i.baseIndex(),r=i.visibleBarsStrictRange(),n=i.logicalRange();if(null!==n&&t){const t=n.contains(s),o=e-s;let a=t?null:i.rightOffset()-o;if(!this._options.shiftVisibleRangeOnNewBar&&t){const e=i.indexToCoordinate(s)+i.barSpacing()/2+1,t=s-n.left()+o,l=e/t;if(l>=i.minBarSpacing()){i.setBarSpacing(l);a=i.width()/l-t}else(null==r?void 0:r.lastBar())!==s&&(a=i.rightOffset()-o)}null!==a&&i.setRightOffset(a)}i.setBaseIndex(e)}_createLollipopSourcesWatcher(){}_updateDateTimeFormatter(){const e=ot.dateFormatProperty.value(),t=void 0;if(this._dateFormatter=new nt.DateFormatter(e,t),this.mainSeries().isDWM())this._dateTimeFormatter=new nt.DateFormatter(e,t),this._timeFormatter=new Ke.TimeFormatter((0,Xe.getHourMinuteFormat)(Ye.timeHoursFormatProperty.value()));else{const i=T.Interval.parse(this.mainSeries().interval()),s=(0,Xe.getTimeFormatForInterval)(i,Ye.timeHoursFormatProperty.value());this._dateTimeFormatter=new rt.DateTimeFormatter({dateFormat:e,withWeekday:t,timeFormat:s,dateTimeSeparator:" "}),this._timeFormatter=new Ke.TimeFormatter(s)}}_setScalesResetAvailable(e){this._isScalesResetAvailable!==e&&(this._isScalesResetAvailable=e,this._isScalesResetAvailableChanged.fire())}_invalidationMaskForSource(e,t=K.InvalidationLevel.Light){if(e===this.crossHairSource())return K.InvalidationMask.cursor();if(this._watermarkSource===e)return this._paneInvalidationMask((0,n.ensureNotNull)(this.paneForSource(this.mainSeries())),t);if(-1!==this._allCustomSources.indexOf(e)){const e=new K.InvalidationMask;return e.invalidateAll(t),e}if(!(0,f.isDataSource)(e))return null;if(e.isMultiPaneEnabled())return new K.InvalidationMask(t);const i=this.paneForSource(e);return null!==i?this._paneInvalidationMask(i,t):null}_paneInvalidationMask(e,t=K.InvalidationLevel.Light){ +const i=new K.InvalidationMask,s=this._panes.indexOf(e);return i.invalidateAllPane(s,t),i}_invalidationMaskForSourcePriceScale(e,t=K.InvalidationLevel.Light){if(!(0,f.isDataSource)(e))return new K.InvalidationMask(t);const i=this.paneForSource(e);if(null===i)return null;let s=e.priceScale();if(null===s)return null;const r=this._panes.indexOf(i);let n=i.priceScalePosition(s);if("overlay"===n){const e=this._panes[r].defaultPriceScale();s=e,n=i.priceScalePosition(e)}const o=i.priceScaleIndex(s,n);if(void 0===o)return null;const a=new K.InvalidationMask;return a.invalidatePriceScale(r,n,o,t),a}_removeCustomSource(e){const t=this._customSourcesMap.get(e);if(void 0===t)return void ji.logWarn(`Attempt to remove custom source which does not exist in the model - "${e}"`);ji.logNormal(`Removing custom source "${e}"`),this.selectionMacro((e=>{e.removeSourceFromSelection(t)})),this._hoveredSource===t&&this.setHoveredSource(null),this._customSourceBeingMoved===t&&this.setMovingCustomSource(null,null);const i=Gi(this._bgCustomSources,t),s=Gi(this._fgCustomSources,t),r=Gi(this._topmostCustomSources,t),o=Gi(this._allCustomSources,t);(0,n.assert)(i||s||r,"Source should be presented in one of the layers"),(0,n.assert)(o,"Source should be presented in the array"),this._customSourcesMap.delete(e),t.destroy()}_updateShowLegendProperty(){const e=this._properties.childs().paneProperties.childs().legendProperties.childs().showLegend,t=this._showLegendProperty;if(e.value())t.setValue(!0);else{for(const e of this._panes){let i=0;for(const s of e.priceDataSources())if(s!==this.mainSeries()&&null!==s.statusView()&&(i++,i>1))return void t.setValue(!1)}t.setValue(!0)}}_pointToPercentPosition(e,t){return{x:e.x/this._timeScale.width(),y:e.y/(0,n.ensureNotNull)((0,n.ensureNotNull)(t.mainDataSource()).priceScale()).height()}}_percentPositionToPoint(e,t){const i=e.x*this._timeScale.width(),s=e.y*(0,n.ensureNotNull)((0,n.ensureNotNull)(t.mainDataSource()).priceScale()).height();return new o.Point(i,s)}_recalcVisibleRangeStudiesImpl(e){var t,i,s;if(e.timerId=null,this.timeScale().isEmpty())return;const r=this.timeScale().visibleBarsStrictRange();if(null===r)return;const n=this.mainSeries().bars(),o=n.search(r.firstBar(),Je.PlotRowSearchMode.NearestRight),a=n.search(r.lastBar(),Je.PlotRowSearchMode.NearestLeft),l=n.lastIndex(),c=o?o.index:void 0,h=a?a.index:void 0,d=c===e.oldStartVisibleIndex,u=h===e.oldEndVisibleIndex;if(d&&u&&!e.force)return;e.force=!1,e.oldStartVisibleIndex=void 0!==c?c:NaN,e.oldEndVisibleIndex=void 0!==h?h:NaN;const p={first_visible_bar_time:1e3*(null!==(t=null==o?void 0:o.value[0])&&void 0!==t?t:0),last_visible_bar_time:1e3*(null!==(i=null==a?void 0:a.value[0])&&void 0!==i?i:0),subscribeRealtime:(null==a?void 0:a.index)===l},_=null!==(s=e.studies)&&void 0!==s?s:this.priceDataSources();e.studies=void 0;for(const e of _)if((0,j.isStudy)(e)){const t=e.metaInfo().inputs,i=[];for(const e of t)p.hasOwnProperty(e.id)&&i.push(e.id);const s=e.properties().childs().inputs;for(const e of i)s.childs()[e].setValueSilently(p[e]) +;i.length>0&&s.listeners().fire(s)}}_recalcColorStudiesImpl(e){var t;e.timerId=null;const i=this.backgroundColorAtYPercentFromTop(.5),s=this.isDark()?l.colorsPalette["color-cold-gray-200"]:l.colorsPalette["color-cold-gray-900"],r=i===e.oldBgColor,n=s===e.oldFgColor;if(r&&n&&!e.force)return;e.force=!1,e.oldBgColor=i,e.oldFgColor=s;const o={__chart_bgcolor:i,__chart_fgcolor:s},a=null!==(t=e.studies)&&void 0!==t?t:this.priceDataSources();e.studies=void 0;for(const e of a)if((0,j.isStudy)(e)){const t=e.metaInfo().inputs,i=[];for(const e of t)o.hasOwnProperty(e.id)&&i.push(e.id);const s=e.properties().childs().inputs;for(const e of i)s.childs()[e].setValueSilently(o[e]);i.length>0&&s.listeners().fire(s)}}_getAllSources(e){const t=[];for(const i of this._panes){const s=i.sourcesByGroup().all();for(const i of s)e(i)&&t.push(i)}return t}_invalidateBarColorerCaches(){this.mainSeries().invalidateBarColorerCache()}_addAlertLabelToChart(e){throw new Error("Not implemented")}_removeAlertLabelFromChart(e){throw new Error("Not implemented")}_removeAllAlertLabelsFromChart(){throw new Error("Not implemented")}_updateTimeScale(e){var t,i,s,r;const{index:n,zoffset:o,values:a,indexDiffs:l,baseIndex:c,marks:h,clearFlag:d}=e;if(d){this._timeScale.reset();for(const e of this.dataSources())null===(t=e.clearData)||void 0===t||t.call(e)}if(l.length>0)for(const e of this.dataSources())null===(i=e.moveData)||void 0===i||i.call(e,l);const u=this._timeScale.indexToTimePoint(this._timeScale.baseIndex()),p=this._timeScale.canNormalize();this._timeScale.update(n,o,a,h);const _=this._timeScale.points().range().value();let m="ChartModel.prototype._updateTimeScale("+n+","+o+","+a.length+","+l.length+","+h.length+","+d+")";if(m+="TimeScale: {first:"+(null!==(s=null==_?void 0:_.firstIndex)&&void 0!==s?s:null)+",last:"+(null!==(r=null==_?void 0:_.lastIndex)&&void 0!==r?r:null)+"}",null===c){this._timeScale.resetBaseIndex();const e=this._timeScale.rightOffset();e<0?this._timeScale.setRightOffset(this.studyAwareDefaultRightOffset()):this._timeScale.setRightOffset(Math.max(e,this._cachedStudiesMaxOffset))}else if(void 0!==c){const e=this._timeScale.indexToTimePoint(c),t=null!==u&&null!==e&&e>u;this._updateBaseIndex(c,t)}if(ji.logDebug(m),!p&&p!==this._timeScale.canNormalize())for(const e of this.dataSources())!(0,S.isLineTool)(e)||e.isFixed()||e.isSourceHidden()||e.processHibernate();this.recalculateAllPanes((0,W.globalChangeEvent)()),this.lightUpdate()}_getAvailableCurrencies(){return!this.currencyConversionEnabled()||this.isSnapshot()?[]:(0,ie.isArray)(this._availableCurrenciesList)?this._availableCurrenciesList:(null!==this._availableCurrenciesList||(this._availableCurrenciesList=this.chartApi().availableCurrencies(),this._availableCurrenciesList.then((e=>{this._destroyed||(this._availableCurrenciesList=e,this.fullUpdate())})).catch((e=>{ji.logWarn(`An error occurred while getting currencies config: ${e}`)}))),[])}_getAvailableUnits(){ +return!this.unitConversionEnabled()||this.isSnapshot()?{}:this._availableUnitsObject instanceof Promise||null===this._availableUnitsObject?(null!==this._availableUnitsObject||(this._availableUnitsObject=this.chartApi().availableUnits(),this._availableUnitsObject.then((e=>{this._destroyed||(this._availableUnitsObject=e,this.fullUpdate())})).catch((e=>{ji.logWarn(`An error occurred while getting units config: ${e}`)}))),{}):this._availableUnitsObject}_getAvailablePriceSources(){return Array.isArray(this._availablePriceSourcesList)?this._availablePriceSourcesList:(this._availablePriceSourcesList=this.chartApi().availablePriceSources(),this._availablePriceSourcesList.then((e=>{this._destroyed||(this._availablePriceSourcesList=e,this.fullUpdate())})).catch((e=>{ji.logWarn(`An error occurred while getting price sources config: ${e}`)})),[])}_getBackgroundColor(e){const t=this._properties.childs().paneProperties.childs();if(t.backgroundType.value()===St.ColorType.Gradient){const i=t.backgroundGradientStartColor.value(),s=t.backgroundGradientEndColor.value();return e?i:s}return t.background.value()}_updateBackgroundColor(){this._backgroundColor.setValue(this._getBackgroundColor()),this._backgroundTopColor.setValue(this._getBackgroundColor(!0))}_syncCrosshair(e){if(!this._isSettingsExternalPosition){const t=this._undoModel.chartWidget(),i=this._undoModel.mainSeries(),s=i.syncModel(),r=this._undoModel.crossHairSource(),n=r.pane;if(null!==s&&null!==n){const o={timeStamp:this._timeScale.points().roughTime(r.index,s.projectTime.bind(s)),syncSourceTarget:s.syncSourceTarget()};n.mainDataSource()===i&&(o.price=r.price,o.symbol=i.symbol());let a=this._lineBeingCreated||null!==this._linePointBeingEdited||Boolean(this._sourcesBeingMoved.length);a=a&&(0,gt.drawOnAllCharts)().value(),t.chartWidgetCollection().syncCrosshair(o,t.id(),a,e)}this._phantomSourceContainer.onCursorPositionUpdated()}}_gotoTimeImpl(e,t){const i=this.timeScale(),s=this.mainSeries();let r;if(void 0!==e){if(this._scrollingState&&this._scrollingState.deferred.reject(),r=(0,p.createDeferredPromise)(),!s.isDWM()){const t=s.symbolInfo();if(null!==t){let i=this.properties().childs().timezone.value();"exchange"===i&&(i=t.timezone);const r=(0,ht.cal_to_utc)((0,ht.get_timezone)(i),new Date(e)),n=(0,At.createTimeToBarTimeAligner)(s.interval(),t)(r);e=(0,ht.utc_to_cal)((0,ht.get_timezone)(i),n).getTime()}}this._scrollingState={targetDate:e,deferred:r,centerIfVisible:t.centerIfVisible}}else{if(!this._scrollingState)return ji.logError("scrollTo called without an argument"),Promise.reject();e=this._scrollingState.targetDate,r=this._scrollingState.deferred}if(void 0===i.tickMarks().minIndex)return r.resolve(void 0),r.promise;this.stopTimeScaleAnimation();let o=((e,t)=>{if((e=>(0,n.ensureNotNull)(i.tickMarks().indexToTime((0,n.ensureDefined)(i.tickMarks().minIndex))).valueOf()-e)(t)<0){let r=i.tickMarks().nearestIndex(t);const o=s.bars().lastIndex();if(null===o)return null;r=Math.min(r,o);let a=(0,n.ensureNotNull)(i.tickMarks().indexToTime(r)).valueOf();for(;a1&&s.push(e)),n=(n+1)%t.length}return s}}},50745:(e,t,i)=>{"use strict";i.d(t,{japaneseChartStyles:()=>r,commonChartStyles:()=>n,allChartStyles:()=>o});var s=i(2484);function r(){return s.enabled("japanese_chart_styles"),[8]}function n(){const e=[0,1,9,13,2,3,10];return s.enabled("chart_style_hilo")&&e.push(12),e}function o(){return n().concat(r())}},94533:(e,t,i)=>{"use strict";i.d(t,{ChartUndoModelBase:()=>ji});var s=i(85459),r=i.n(s),n=i(16230),o=i(50151),a=i(86441),l=i(44352),c=i(41207),h=i(25071),d=i(58403),u=i(45673),p=i(578);function _(e,t){return!!p.Interval.isEqual(e.res,t.res)&&(0,u.areEqualTimeFrames)(e.val,t.val)}var m=i(43426),g=i(39969),f=i(6250),v=i(70439),S=i(68671),y=i(51768),b=i(72006),w=i(2484),P=i(46627),C=i(98351),T=i(89215),x=i(47539),I=i(65665);const M=new x.TranslatedString("move all scales to left",l.t(null,void 0,i(81898))),A=new x.TranslatedString("move all scales to right",l.t(null,void 0,i(22863))),L=(0,C.getLogger)("Chart.MergeAllScales");var k=i(71733);class E extends k.UndoCommand{constructor(e,t,i,s,r,n){super(n),this._model=e,this._paneIndex=e.panes().indexOf(t),this._targetPosition=s,this._targetIndex=r,this._scaleId=i.id(),this._sourcePosition=t.priceScalePosition(i),"overlay"!==this._sourcePosition&&(this._sourceIndex=t.priceScaleIndex(i,this._sourcePosition))}redo(){const e=this._model.panes()[this._paneIndex],t=(0,o.ensureNotNull)(e.getPriceScaleById(this._scaleId));e.movePriceScale(t,this._targetPosition,this._targetIndex),this._model.fullUpdate()}undo(){const e=this._model.panes()[this._paneIndex],t=(0,o.ensureNotNull)(e.getPriceScaleById(this._scaleId)) +;e.movePriceScale(t,this._sourcePosition,this._sourceIndex),this._model.fullUpdate()}}class D extends k.UndoCommand{constructor(e,t,i,s){super(s),this._createdIds=[],this._model=e,this._withoutShift=i,this._origStates=t.map((e=>e.state(!0)));const r=e.lineToolsGroupModel();this._origGroups=t.map((e=>{const t=r.groupForLineTool(e);return t&&t.id}))}redo(){const e=this._model.lineToolsGroupModel(),t=this._origStates.map(((t,i)=>{const s=(0,o.ensureNotNull)(this._model.dataSourceForId(t.id)),r=0===this._createdIds.length?void 0:(0,o.ensureDefined)(this._createdIds[i]),n=(0,f.cloneLineTool)(this._model,s,!this._withoutShift,r),a=(0,o.ensureNotNull)(s.priceScale());(0,o.ensureNotNull)(this._model.paneForSource(s)).addDataSource(n,a,!1);const l=this._origGroups[i];if(null!==l){const t=e.groupForId(l);t&&t.addLineTools([n])}return this._model.updateSource(n),n}));0===this._createdIds.length&&(this._createdIds=t.map((e=>e.id()))),this._model.selectionMacro((e=>{e.clearSelection(),t.forEach((t=>{e.addSourceToSelection(t)}))})),this._model.setShouldBeSavedEvenIfHidden(!0)}undo(){const e=this._model.lineToolsGroupModel();this._createdIds.forEach((t=>{const i=(0,o.ensureNotNull)(this._model.dataSourceForId(t)),s=e.groupForLineTool(i);null!==s&&s.excludeLineTool(i),this._model.removeSource(i)}))}newIds(){return this._createdIds}}var B=i(34853),V=i(65071);class R extends k.UndoCommand{constructor(e,t,i,s=!0){super(i,s),this._newStates=[],this._model=e,this._savedStates=t.map((e=>e.state(!1)))}redo(){this._applyState(this._newStates)}undo(){0===this._newStates.length&&this.saveNewState(),this._applyState(this._savedStates)}saveNewState(){const e=this._savedStates.filter(I.notNull).map((e=>(0,o.ensureNotNull)(this._model.dataSourceForId(e.id))));this._newStates=e.map((e=>e.state(!1)))}_applyState(e){for(const t of e)if(null!==t){const e=this._model.dataSourceForId(t.id);if(null!==e)if((0,T.isStudy)(e)){const i=t.state.inputs,s=e.properties().childs().inputs.childs();for(const e in i)s[e]&&s[e].setValue(i[e])}else this._model.restoreLineToolState(e,t,!0)}}}var N=i(52934),O=i(11426),F=i(50841),W=i(58631);const H=new x.TranslatedString("create {tool}",l.t(null,void 0,i(81791)));class z extends k.UndoCommand{constructor(e,t,i,s,r=0,n){super(H.format({tool:new x.TranslatedString(i,W.lineToolsLocalizedNames[i])}),!1),this._lineId=null,this._lineState=null,this._model=e,this._paneIndex=e.panes().indexOf(t),this._lineTool=i,this._ownerSourceId=s.id(),this._lineId=null!=n?n:null,this._drawOnAllChartsMode=r}startCreatingLine(e,t,i){var s;const r=this._model.panes()[this._paneIndex],n=this._model.dataSourceForId(this._ownerSourceId),o=this._model.createLineTool(r,e,this._lineTool,t,i,n,null!==(s=this._lineId)&&void 0!==s?s:void 0);return this._lineId=o.id(),!this._model.lineBeingCreated()}continueCreatingLine(e,t,i,s){const r=this._model.continueCreatingLine(e,t,i,s);return r&&this._model.setShouldBeSavedEvenIfHidden(!0),r}line(){return null===this._lineId?null:this._model.dataSourceForId(this._lineId)}undo(){const e=this.line() +;null!==e&&(this._lineState=e.state(!1),this._model.removeSource(e),this._lineId=null)}redo(){if(null===this._lineState)return;const e=this._model.restoreSource(!1,this._paneIndex,null,(0,o.ensureNotNull)(this._lineState),null);null!==e&&(this._lineId=e.id(),this._lineState=null,e.share(this._drawOnAllChartsMode))}drawOnAllCharts(){return 0!==this._drawOnAllChartsMode}}const U=new x.TranslatedString("bring {title} to front",l.t(null,void 0,i(78246))),j=new x.TranslatedString("send {title} to back",l.t(null,void 0,i(66781))),G=new x.TranslatedString("insert {title} after {targetTitle}",l.t(null,void 0,i(53146))),q=new x.TranslatedString("insert {title} before {targetTitle}",l.t(null,void 0,i(67176))),$=new x.TranslatedString("send {title} backward",l.t(null,void 0,i(16259))),Y=new x.TranslatedString("bring {title} forward",l.t(null,void 0,i(56763))),K=new x.TranslatedString("send group {title} backward",l.t(null,void 0,i(4998))),X=new x.TranslatedString("bring group {title} forward",l.t(null,void 0,i(27195)));function Z(e){return new x.TranslatedString(e.name(),e.title())}class J extends k.UndoCommand{constructor(e,t,i){super(i),this._sourcesByPanes=new Map,this._originalState=new Map,this._model=e,t.forEach((t=>{const i=(0,o.ensureNotNull)(e.paneForSource(t)),s=e.panes().indexOf(i),r=this._sourcesByPanes.get(s)||[];r.push(t.id()),this._sourcesByPanes.set(s,r)})),Array.from(this._sourcesByPanes.keys()).forEach((t=>{const i=e.panes()[t],s=new Map;i.sourcesByGroup().allIncludingHidden().forEach((e=>{s.set(e.id(),e.zorder())})),this._originalState.set(t,s)}))}undo(){this._originalState.forEach(((e,t)=>{const i=this._model.panes()[t],s=new Map;e.forEach(((e,t)=>{const r=(0,o.ensureNotNull)(i.dataSourceForId(t));s.set(r,e)})),i.setZOrders(s)}))}redo(){this._sourcesByPanes.forEach(((e,t)=>{const i=this._model.panes()[t],s=e.map((e=>(0,o.ensureNotNull)(i.dataSourceForId(e))));this._paneOperation(i,s)}))}}class Q extends J{constructor(e,t){super(e,t,U.format({title:Z(t[0])}))}_paneOperation(e,t){e.bringToFront(t)}}class ee extends J{constructor(e,t){super(e,t,j.format({title:Z(t[0])}))}_paneOperation(e,t){e.sendToBack(t)}}class te extends J{constructor(e,t,i,s){super(e,t,s),this._targetSource=i}_paneOperation(e,t){e.insertAfter(t,this._targetSource)}}class ie extends te{constructor(e,t,i){super(e,t,i,G.format({title:Z(t[0]),targetTitle:Z(i)}))}}class se extends J{constructor(e,t,i,s){super(e,t,s),this._targetSource=i}_paneOperation(e,t){e.insertBefore(t,this._targetSource)}}class re extends se{constructor(e,t,i){super(e,t,i,q.format({title:Z(t[0]),targetTitle:Z(i)}))}}function ne(e,t){const i=t[0],s=e.sourcesByGroup().all().filter((e=>e.zorder()e.zorder()>i.zorder()));if(0===s.length)throw new Error("Cannot bring forward source that alreadt on back");let r=s[0];if((0,f.isLineTool)(r)){const t=e.model().lineToolsGroupModel().groupForLineTool(r);if(null!==t){const e=t.lineTools();r=e[e.length-1]}}return r}class le extends te{constructor(e,t,i){super(e,i,ae(t,i),Y.format({title:Z(i[0])}))}}function ce(e,t){return(0,o.ensureNotNull)(e.paneForSource(t.lineTools()[0]))}class he extends se{constructor(e,t){super(e,t.lineTools(),ne(ce(e,t),t.lineTools()),K.format({title:t.name()}))}}class de extends te{constructor(e,t){super(e,t.lineTools(),ae(ce(e,t),t.lineTools()),X.format({title:t.name()}))}}const ue=new x.TranslatedString("rearrange panes",l.t(null,void 0,i(33348)));class pe extends k.UndoCommand{constructor(e,t,i){super(ue),this._chartModel=e,this._index=t,(0,I.isNumber)(i)?this._dstIndex=i:this._dstIndex="up"===i?t-1:t+1}redo(){this._checkIndices()&&this._chartModel.movePane(this._index,this._dstIndex)}undo(){this._checkIndices()&&this._chartModel.movePane(this._dstIndex,this._index)}_checkIndices(){const e=this._chartModel.panes().length;return this._index>=0&&this._index=0&&this._dstIndexe.id()))}redo(){const e=(0,o.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId));this._model.lineToolsGroupModel().removeGroup(e)}undo(){const e=this._lineToolsIds.map((e=>this._model.dataSourceForId(e))),t=new Ce.LineToolsGroup(e,this._groupName,this._groupId);this._model.lineToolsGroupModel().addGroup(t)}}const xe=new x.TranslatedString("create line tools group",l.t(null,void 0,i(3195)));class Ie extends k.UndoCommand{constructor(e,t){super(xe),this._groupId=null,this._model=e,this._sourcesIds=t.map((e=>e.id()))}redo(){const e=this._sourcesIds.map((e=>this._model.dataSourceForId(e))),t=null===this._groupId?void 0:this._groupId;this._groupId=this._model.lineToolsGroupModel().createGroup(e,this._title,t).id}undo(){const e=(0,o.ensureNotNull)(this._model.lineToolsGroupModel().groupForId((0,o.ensureNotNull)(this._groupId)));this._model.lineToolsGroupModel().removeGroup(e)}createdGroupId(){return this._groupId}}const Me=new x.TranslatedString("add line tool(s) to group {group}",l.t(null,void 0,i(40242)));class Ae extends k.UndoCommand{constructor(e,t,i){super(Me.format({group:t.name()})),this._model=e,this._groupId=t.id,this._lineToolsIds=i.map((e=>e.id()))}redo(){const e=(0,o.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId)),t=this._lineToolsIds.map((e=>this._model.dataSourceForId(e)));e.addLineTools(t)}undo(){const e=this._lineToolsIds.map((e=>this._model.dataSourceForId(e)));(0,o.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId)).excludeLineTools(e)}}class Le extends k.UndoCommand{constructor(e,t,i,s,r){super(i),this._targetObj=e,this._newValue=t,this._oldValue=this._targetObj.value(),this._model=s,r&&this.setCustomFlag("doesnt_affect_save",!0)}redo(){(0,ge.saveDefaultProperties)(!0),this._targetObj.setValue(this._newValue),(0,ge.saveDefaultProperties)(!1),this._model.recalculateAllPanes((0, +ye.globalChangeEvent)()),this._model.lightUpdate()}undo(){(0,ge.saveDefaultProperties)(!0),this._targetObj.setValue(this._oldValue),(0,ge.saveDefaultProperties)(!1),this._model.recalculateAllPanes((0,ye.globalChangeEvent)()),this._model.lightUpdate()}}class ke extends k.UndoCommand{constructor(e,t,i,s){super(s),this._chartModel=e,this._groupId=t.id,this._oldName=t.name(),this._newName=i}redo(){(0,o.ensureNotNull)(this._chartModel.lineToolsGroupModel().groupForId(this._groupId)).setName(this._newName)}undo(){(0,o.ensureNotNull)(this._chartModel.lineToolsGroupModel().groupForId(this._groupId)).setName(this._oldName)}}var Ee=i(76076);const De=new x.TranslatedString("create line tools group from selection",l.t(null,void 0,i(92659))),Be=new x.TranslatedString("removing line tools group {name}",l.t(null,void 0,i(78811))),Ve=new x.TranslatedString("add line tool {lineTool} to group {name}",l.t(null,void 0,i(99113))),Re=new x.TranslatedString("make group {group} visible",l.t(null,void 0,i(87927))),Ne=new x.TranslatedString("make group {group} invisible",l.t(null,void 0,i(45223))),Oe=new x.TranslatedString("lock group {group}",l.t(null,void 0,i(4963))),Fe=new x.TranslatedString("unlock group {group}",l.t(null,void 0,i(51114))),We=new x.TranslatedString("rename group {group} to {newName}",l.t(null,void 0,i(16338)));class He{constructor(e){this._lineToolsAffectChartInvalidation=new P.FeatureToggleWatchedValue("do_not_invalidate_chart_on_changing_line_tools",!1),this._environment=e}createGroupFromSelection(){const e=this._environment.model();(0,o.assert)(!e.selection().isEmpty(),"Cannot create group from empty selection");const t=(0,F.sortSources)(e.selection().lineDataSources());(0,o.assert)(t.length===e.selection().allSources().length,"A group could contain line tools only");const i=t.length>1||null!==this._environment.model().lineToolsGroupModel().groupForLineTool(t[0]),s=t.reduce(((e,t)=>e.zorder()>t.zorder()?e:t),t[0]);let r=s;const n=e.lineToolsGroupModel().groupForLineTool(s);if(null!==n){const e=n.lineTools();r=e[e.length-1]}this._environment.beginUndoMacro(De,this._lineToolsAffectChartInvalidation.value());const a=new Map,l=new Set;t.forEach((t=>{const i=this._groupForLineTool(t);if(null===i)return;const s=a.get(i)||[];s.push(t),a.set(i,s);const r=(0,o.ensureNotNull)(e.paneForSource(t));l.add(r)})),(0,o.assert)(l.size<=1,"All selected sources should be on the same pane"),a.forEach(((t,i)=>{const s=new V.ExcludeLineToolsFromGroupUndoCommand(e,i,t);this._environment.pushUndoCommand(s)}));const c=new Ie(e,(0,F.sortSources)(t));if(this._environment.pushUndoCommand(c),i){const i=new ie(e,t,r);this._environment.pushUndoCommand(i)}this._environment.endUndoMacro();const h=(0,o.ensureNotNull)(c.createdGroupId());return(0,o.ensureNotNull)(e.lineToolsGroupModel().groupForId(h))}removeGroup(e){const t=this._environment.model(),i=e.lineTools();this._environment.beginUndoMacro(Be.format({name:e.name()}),this._lineToolsAffectChartInvalidation.value());const s=new Te(t,e,null);this._environment.pushUndoCommand(s) +;const r=new B.RemoveSourcesCommand(t,i,null);this._environment.pushUndoCommand(r);const n=t.mainSeries().symbol();i.forEach((e=>{null!==e.linkKey().value()&&(0,Ee.removeLineTool)({withUndo:!0,model:t,symbol:n,sourceTitle:new x.TranslatedString(e.name(),e.title()),lineToolState:e.state(!1),linkKey:(0,o.ensureNotNull)(e.linkKey().value())})})),this._environment.endUndoMacro()}groups(){return this._environment.model().lineToolsGroupModel().groups()}excludeLineToolFromGroup(e,t){const i=this._environment.model(),s=new V.ExcludeLineToolsFromGroupUndoCommand(i,e,[t]);s.setCustomFlag("doesnt_affect_save",this._lineToolsAffectChartInvalidation.value()),this._environment.pushUndoCommand(s)}addLineToolToGroup(e,t){const i=this._environment.model(),s=i.lineToolsGroupModel().groupForLineTool(t);if(s===e)return;const r=Ve.format({lineTool:new x.TranslatedString(t.name(),t.title()),name:e.name()});this._environment.beginUndoMacro(r,this._lineToolsAffectChartInvalidation.value()),null!==s&&this._environment.pushUndoCommand(new V.ExcludeLineToolsFromGroupUndoCommand(i,s,[t])),this._environment.pushUndoCommand(new Ae(i,e,[t])),this._environment.endUndoMacro()}bringToFront(e){const t=this._environment.model(),i=new Q(t,e.lineTools());i.setCustomFlag("doesnt_affect_save",this._lineToolsAffectChartInvalidation.value()),this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])}sendToBack(e){const t=this._environment.model(),i=new ee(t,e.lineTools());i.setCustomFlag("doesnt_affect_save",this._lineToolsAffectChartInvalidation.value()),this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])}bringForward(e){const t=this._environment.model(),i=new de(t,e);i.setCustomFlag("doesnt_affect_save",this._lineToolsAffectChartInvalidation.value()),this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])}sendBackward(e){const t=this._environment.model(),i=new he(t,e);i.setCustomFlag("doesnt_affect_save",this._lineToolsAffectChartInvalidation.value()),this._environment.pushUndoCommand(i),this._environment.emitEvent("changeZOrder",[e.lineTools()])}insertAfter(e,t){const i=this._environment.model();let s;if(t instanceof Ce.LineToolsGroup){const e=t.lineTools();s=e[e.length-1]}else s=t;const r=new ie(i,e.lineTools(),s);this._environment.pushUndoCommand(r),this._environment.emitEvent("changeZOrder",[e.lineTools()])}insertBefore(e,t){const i=this._environment.model();let s;if(t instanceof Ce.LineToolsGroup){s=t.lineTools()[0]}else s=t;const r=new re(i,e.lineTools(),s);this._environment.pushUndoCommand(r),this._environment.emitEvent("changeZOrder",[e.lineTools()])}availableZOrderOperations(e){const t=this._environment.model(),i=e.lineTools(),s=i[0],r=i[i.length-1],n=(0,o.ensureNotNull)(t.paneForSource(i[0])).sourcesByGroup().allExceptSpecialSources(),a=n[0],l=n[n.length-1];return{bringForwardEnabled:r!==l,bringToFrontEnabled:r!==l,sendBackwardEnabled:s!==a,sendToBackEnabled:s!==a}}setGroupVisibility(e,t){const i=(t?Re:Ne).format({ +group:e.name()}),s=this._environment.model();this._environment.beginUndoMacro(i,this._lineToolsAffectChartInvalidation.value()),e.lineTools().forEach((e=>{const i=e.properties().visible,r=new Le(i,t,null,s);this._environment.pushUndoCommand(r)})),this._environment.endUndoMacro()}setGroupLock(e,t){const i=(t?Oe:Fe).format({group:e.name()}),s=this._environment.model();this._environment.beginUndoMacro(i,this._lineToolsAffectChartInvalidation.value()),e.lineTools().forEach((e=>{const i=e.properties().frozen,r=new Le(i,t,null,s);this._environment.pushUndoCommand(r)})),this._environment.endUndoMacro()}setGroupName(e,t){const i=this._environment.model(),s=We.format({group:e.name(),newName:t}),r=new ke(i,e,t,s);r.setCustomFlag("doesnt_affect_save",this._lineToolsAffectChartInvalidation.value()),this._environment.pushUndoCommand(r)}canBeGroupped(e){const t=this._environment.model();return new Set(e.map((e=>t.paneForSource(e)))).size<=1}_groupForLineTool(e){return this._environment.model().lineToolsGroupModel().groups().find((t=>t.containsLineTool(e)))||null}}var ze=i(58121),Ue=i(26989),je=i(62472),Ge=i(12033);const qe=new x.TranslatedString("apply study template {template}",l.t(null,void 0,i(26065)));function $e(e){for(const t of e.panes)for(const e of t.sources)if((0,je.isMainSeriesState)(e))return e.id;return null}class Ye extends k.UndoCommand{constructor(e,t,i){var s,r;super(qe.format({template:i})),this._newSymbolParams={},this._model=e,this._templateContent=function(e,t){const i=(0,ze.default)({},e),s=(0,o.ensureNotNull)($e(i));for(const e of i.panes){e.mainSourceId===s&&(e.mainSourceId=t);for(const i of e.sources)if(i.id===s){i.id=t;const r=e=>{const i=e.indexOf(s);-1!==i&&e.splice(i,1,t)};if(e.leftAxisesState&&e.rightAxisesState?(e.leftAxisesState.forEach((e=>r(e.sources))),e.rightAxisesState.forEach((e=>r(e.sources)))):(r(e.leftAxisSources),r(e.rightAxisSources)),e.overlayPriceScales){const i=e.overlayPriceScales[s];i&&(delete e.overlayPriceScales[s],e.overlayPriceScales[t]=i)}}else i.ownerSource===s&&(i.ownerSource=t)}return i}(t,e.mainSeries().id()),this._initialState=e.studyTemplate(!0,!0,!0);const n=e.mainSeries();t.symbol&&(this._newSymbolParams={symbol:t.symbol,currency:null!==(s=t.currency)&&void 0!==s?s:null,unit:null!==(r=t.unit)&&void 0!==r?r:null}),t.interval&&(this._newSymbolParams.interval=t.interval,this._newSymbolParams.style=(0,fe.getChartStyleByResolution)(t.interval,n.style())),this._initialSymbolParams={symbol:n.symbol(),currency:n.currency(),unit:n.unit(),interval:n.interval(),style:n.style()},this._initialState=e.studyTemplate(),this._initialGroupsState=e.lineToolsGroupModel().state()}redo(){this._model.mainSeries().setSymbolParams(this._newSymbolParams);const e=this._merge(this._templateContent).filter(f.isLineTool);this._model.lineToolsGroupModel().removeLineTools(e);const t=this._model.mainSeries().properties();(0,fe.preparePriceAxisProperties)(t),this._model.recalcVisibleRangeStudies(!0),this._model.setShouldBeSavedEvenIfHidden(!0)}undo(){ +this._model.mainSeries().setSymbolParams(this._initialSymbolParams),this._merge(this._initialState)}_merge(e){const t=e.version||0,i=this._model,s=i.mainSeries();(0,o.assert)(s.id()===$e(e)),s.priceScale().properties().childs().lockScale.setValue(!1);const r=i.panes(),n=[];for(let e=r.length;e--;){const t=r[e],i=t.containsMainSeries(),s=t.dataSources();for(let e=s.length;e--;){const t=s[e];(!i||(0,T.isStudy)(t)&&t.isRemovedByStudyTemplates())&&n.push(t)}}i.resetDeferredStudies();const a=(0,Ue.closeSourcesSet)(i,n);for(let e=0;ee.zorder-t.zorder));for(let e=0;e-1,a=o?r[e]:i.createPane(e);o&&t<3&&(0,Ge.reorderDataSourcesStateZOrder)(n.sources),a.restoreState(n,!1,t),null!==a.mainDataSource()||i.removePane(a)}return i.syncLollipopSources(),s.priceScale().setMode({autoScale:!0}),i.startNotStartedStudies(),i.recalculateAllPanes((0,ye.globalChangeEvent)()),i.fullUpdate(),a}}var Ke=i(21580);const Xe=(0,C.getLogger)("Chart.ChartUndoModel"),Ze=new x.TranslatedString("paste drawing",l.t(null,void 0,i(96916)));class Je extends k.UndoCommand{constructor(e,t,i,s,r){super(Ze),this._needCopyToOtherCharts=!1,this._sourceState=null,this._model=e,this._clipboardData=t,this._paneIndex=this._model.panes().indexOf(i||(0,o.ensureNotNull)(this._model.paneForSource(this._model.mainSeries()))),this._pasteWithData=!!s,this._keepZIndex=!!r}redo(){const e=this._model.panes()[this._paneIndex],t=(0,o.ensureNotNull)(e.clipboardLineToolOwnerSource(this._clipboardData.source.id));null===this._sourceState&&(this._sourceState=this._getSourceState(t));const i=(0,o.ensureNotNull)(e.restoreLineTool(this._sourceState,this._pasteWithData,this._keepZIndex,void 0,t));(0,o.ensureNotNull)(t.priceScale()).addDataSource(i),this._clipboardData.centeredOnChart&&i.centerPosition&&i.centerPosition(),i.restoreFixedPoint(),i.createServerPoints();const s=(0,Ke.isActingAsSymbolSource)(t)||t.metaInfo().is_price_study;this._needCopyToOtherCharts=Boolean(s&&((0,Ee.drawOnAllCharts)().value()||i.linkKey().value()&&i.isSynchronizable())),this._model.setShouldBeSavedEvenIfHidden(!0)}undo(){if(!this._sourceState)return void Xe.logError("This command was never executed - nothing to undo");const e=this.source();this._clipboardData.centeredOnChart&&(this._clipboardData.centeredOnChart=!1,this._sourceState.points=e.normalizedPoints()),this._model.removeSource(e)}source(){return(0,o.ensureNotNull)(this._model.dataSourceForId((0,o.ensureNotNull)(this._sourceState).id))}needCopyToOtherCharts(){return this._needCopyToOtherCharts}_getSourceState(e){const t=(0,I.clone)(this._clipboardData.source);delete t.state.symbol,null!=t.linkKey&&(t.linkKey=(0,S.randomHash)());const i=(0,o.ensureNotNull)(e.priceScale()),s=this._model,{symbol:r,currencyId:n,unitId:l}=this._clipboardData.source.state,c=(0,o.ensureNotNull)(e.symbolSource());let h=!1 +;!c.symbolSameAsCurrent(r)||(null!==n?n!==(0,fe.symbolCurrency)(c.symbolInfo(),void 0,!0):c.isConvertedToOtherCurrency())||(null!==l?l!==(0,fe.symbolUnit)(c.symbolInfo(),this._model.unitConversionEnabled()):c.isConvertedToOtherUnit())||((0,Ke.isActingAsSymbolSource)(e)?h=!0:(0,T.isStudy)(e)&&(h=Boolean(e.metaInfo().is_price_study)));const d=e=>{const t=e.x*s.timeScale().width(),r=e.y*i.height()-40;return new a.Point(t,r)},u=(0,o.ensureNotNull)(e.firstValue());if(this._model.id()===this._clipboardData.modelId||!h)for(let e=0;ee.id())),this._inputs=i,this._targetZOrder=h,this._preferredPriceScale=o,this._allowChangeCurrency=a,this._allowChangeUnit=l,this._paneSize=c}redo(){const e=this._parentIds.map((e=>this._chartModel.dataSourceForId(e))),t=this._chartModel.insertStudyWithParams(this._studyMetaInfo,this._inputs,this._targetZOrder,this._props,this._addAsOverlay,e,this._preferredPriceScale,this._allowChangeCurrency,this._allowChangeUnit,this._paneSize,null===this._studyId?void 0:this._studyId);if(this._studyId=t.id(),t.childStudyByRebind().subscribe(null,(()=>(0,y.trackEvent)("SOS","Apply SOS","Rebind SOS"))),this._chartModel.setShouldBeSavedEvenIfHidden(!0),null!==this._paneState){(0,o.ensureNotNull)(this._chartModel.paneForSource(t)).restoreState(this._paneState,!1,this._chartModel.version()),this._paneState=null}}undo(){const e=(0,o.ensureNotNull)(this._chartModel.dataSourceForId((0,o.ensureNotNull)(this._studyId))),t=(0,o.ensureNotNull)(this._chartModel.paneForSource(e)).state();this._chartModel.removeSource(e)&&(this._paneState=t)}insertedStudy(){return this._chartModel.dataSourceForId((0,o.ensureNotNull)(this._studyId))}}var ut=i(5440),pt=i(96196),_t=i.n(pt),mt=i(50337),gt=i(8771);const ft=new x.TranslatedString("zoom",l.t(null,void 0,i(59833)));class vt extends k.UndoCommand{constructor(e,t,i,s,r,n){super(ft),this._barSpacing=null,this._rightBarsOffset=null,this._leftBarsOffset=null,this._priceMode=null,this._model=e,this._startBar=t,this._endBar=i,this._startPrice=s,this._endPrice=r,this._pane=n}redo(){const e=(0,o.ensureNotNull)(this._model.timeScale().visibleBarsStrictRange());this._leftBarsOffset=e.firstBar()-this._startBar,this._rightBarsOffset=e.lastBar()-this._endBar,this._barSpacing=this._model.timeScale().barSpacing(),this._priceMode=this._pane.defaultPriceScale().mode(), +this._model.zoomToViewport(this._startBar,this._endBar,this._startPrice,this._endPrice,this._pane)}undo(){const e=this._model.timeScale(),t=this._pane.defaultPriceScale(),i=(0,o.ensureNotNull)(e.visibleBarsStrictRange());e.setBarSpacing((0,o.ensureNotNull)(this._barSpacing)),e.zoomToBarsRange(i.firstBar()+(0,o.ensureNotNull)(this._leftBarsOffset),i.lastBar()+(0,o.ensureNotNull)(this._rightBarsOffset)),t.setMode((0,o.ensureNotNull)(this._priceMode)),t.recalculatePriceRange((0,o.ensureNotNull)(e.visibleBarsStrictRange())),this._model.recalculateAllPanes((0,ye.viewportChangeEvent)()),this._model.lightUpdate()}}const St=(0,C.getLogger)("Chart.ChartUndoModel"),yt=new x.TranslatedString("zoom",l.t(null,void 0,i(59833)));class bt extends k.UndoCommand{constructor(e,t,i){super(yt),this._baseCmd=e,this._zoomStack=t,this._inOut=i}undo(){if(this._inOut){if(this._baseCmd!==this._zoomStack.head())return void St.logDebug("zoom stack inconsistency");this._baseCmd.undo(),this._zoomStack.pop()}else this._baseCmd.redo(),this._zoomStack.push(this._baseCmd)}redo(){if(this._inOut)this._baseCmd.redo(),this._zoomStack.push(this._baseCmd);else{if(this._baseCmd!==this._zoomStack.head())return void St.logDebug("zoom stack inconsistency");this._baseCmd.undo(),this._zoomStack.pop()}}}const wt=new x.TranslatedString("stop syncing drawing",l.t(null,void 0,i(98784)));class Pt extends k.UndoCommand{constructor(e,t){super(wt),this._model=e,this._sourceId=t.id(),this._linkKey=t.linkKey().value()}redo(){(0,o.ensureNotNull)(this._model.dataSourceForId(this._sourceId)).linkKey().setValue(null)}undo(){(0,o.ensureNotNull)(this._model.dataSourceForId(this._sourceId)).linkKey().setValue(this._linkKey)}}const Ct=new x.TranslatedString("restore defaults",l.t(null,void 0,i(9608)));class Tt extends k.UndoCommand{constructor(e,t,i=Ct){super(i),this._chartModel=e,this._defaultProperty=t,this._state=t.state()}redo(){this._chartModel.restoreFactoryDefaults(this._defaultProperty)}undo(){this._defaultProperty.mergeAndFire(this._state),this._chartModel.mainSeries().onChartStyleChanged()}}var xt=i(7006);class It extends Tt{redo(){this._defaultProperty.hasChild("intervalsVisibilities")&&this._defaultProperty.childs().intervalsVisibilities.mergeAndFire(xt.intervalsVisibilitiesDefaults),super.redo()}}class Mt extends It{redo(){super.redo(),this._chartModel.recalcColorStudies(!0)}undo(){super.undo(),this._chartModel.recalcColorStudies(!0)}}var At=i(10621),Lt=i(933),kt=i(64548);function Et(e){const{visible:t,...i}=e;return i}function Dt(e){const{visible:t,...i}=e;return i}function Bt(e){const{drawWick:t,drawBorder:i,drawBody:s,barColorsOnPrevClose:r,...n}=e;return n}function Vt(e){const{drawWick:t,drawBorder:i,drawBody:s,...r}=e;return r}function Rt(e){const{drawWick:t,drawBorder:i,drawBody:s,showRealLastPrice:r,inputs:n,...o}=e;return o}function Nt(e){const{barColorsOnPrevClose:t,dontDrawOpen:i,thinBars:s,...r}=e;return r}function Ot(e){const{showBorders:t,showLabels:i,drawBody:s,...r}=e;return r}function Ft(e){ +const{linestyle:t,linewidth:i,styleType:s,priceSource:r,...n}=e;return n}function Wt(e){const{linestyle:t,linewidth:i,priceSource:s,...r}=e;return r}function Ht(e){const{inputs:t,...i}=e;return i}function zt(e){const{inputs:t,...i}=e;return i}function Ut(e){const{inputs:t,...i}=e;return i}function jt(e){const{inputs:t,...i}=e;return i}function Gt(e){const{topLineWidth:t,bottomLineWidth:i,baseLevelPercentage:s,priceSource:r,...n}=e;return n}function qt(e){const{thinBars:t,inputs:i,...s}=e;return s}function $t(e){const{visible:t,style:i,symbol:s,interval:r,sessionId:n,highLowAvgPrice:o,showCountdown:a,bidAsk:l,prePostMarket:c,priceAxisProperties:h,candleStyle:d,hollowCandleStyle:u,haStyle:p,barStyle:_,hiloStyle:m,lineStyle:g,areaStyle:f,renkoStyle:v,pbStyle:S,kagiStyle:y,pnfStyle:b,baselineStyle:w,rangeStyle:P,esdShowDividends:C,esdShowSplits:T,esdShowEarnings:x,esdShowBreaks:I,showContinuousContractSwitches:M,showContinuousContractSwitchesBreaks:A,showFuturesContractExpiration:L,showLastNews:k,...E}=e;return{bidAsk:Et(l),prePostMarket:Dt(c),candleStyle:Bt(d),hollowCandleStyle:Vt(u),haStyle:Rt(p),barStyle:Nt(_),hiloStyle:Ot(m),lineStyle:Ft(g),areaStyle:Wt(f),renkoStyle:Ht(v),pbStyle:zt(S),kagiStyle:Ut(y),pnfStyle:jt(b),baselineStyle:Gt(w),rangeStyle:qt(P),...E}}function Yt(e){const{scaleSeriesOnly:t,showSeriesLastValue:i,showStudyLastValue:s,showSymbolLabels:r,showBidAskLabels:n,showPrePostMarketPriceLabel:o,showStudyPlotLabels:a,showFundamentalNameLabel:l,showFundamentalLastValue:c,seriesLastValueMode:h,...d}=e;return d}function Kt(e){const{topMargin:t,bottomMargin:i,...s}=e;return s}const Xt=new x.TranslatedString("apply chart theme",l.t(null,void 0,i(66568)));class Zt extends k.UndoCommand{constructor(e,t,i){var s,r,n;super(Xt),this._model=e,this._newSessionProps=t.sessions||(0,kt.factoryDefaults)("sessions"),["candleStyle","hollowCandleStyle","haStyle"].forEach((e=>{t.mainSourceProperties[e].wickUpColor=t.mainSourceProperties[e].wickUpColor||t.mainSourceProperties[e].wickColor,t.mainSourceProperties[e].wickDownColor=t.mainSourceProperties[e].wickDownColor||t.mainSourceProperties[e].wickColor})),t.chartProperties=null!==(s=t.chartProperties)&&void 0!==s?s:{paneProperties:void 0,scalesProperties:void 0},t.chartProperties.paneProperties.vertGridProperties=null!==(r=t.chartProperties.paneProperties.vertGridProperties)&&void 0!==r?r:t.chartProperties.paneProperties.gridProperties,t.chartProperties.paneProperties.horzGridProperties=null!==(n=t.chartProperties.paneProperties.horzGridProperties)&&void 0!==n?n:t.chartProperties.paneProperties.gridProperties;const o=this._model.properties().state().paneProperties.legendProperties;delete o.backgroundTransparency,t.chartProperties.paneProperties.legendProperties={...t.chartProperties.paneProperties.legendProperties,...o};const a=(0,kt.factoryDefaults)("chartproperties"),l=(0,Lt.deepExtend)({},a,t.chartProperties);this._newChartProps={paneProperties:Kt(l.paneProperties),scalesProperties:Yt(l.scalesProperties)}, +e.timeScale().preserveBarSpacing()&&delete this._newChartProps.scalesProperties.barSpacing;const c=(0,kt.factoryDefaults)("chartproperties.mainSeriesProperties"),h=(0,Lt.deepExtend)({},c,t.mainSourceProperties);this._newSeriesProps=i?h:$t(h);const d=e.properties().state();this._oldChartProps={paneProperties:Kt(d.paneProperties),scalesProperties:Yt(d.scalesProperties)};const u=e.mainSeries().properties().state();this._oldSeriesProps=i?u:$t(u),this._oldSessionProps=this._model.sessions().properties().state()}undo(){this._merge(this._oldChartProps,this._oldSeriesProps,this._oldSessionProps),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),this._model.chartThemeLoaded()}redo(){this._merge(this._newChartProps,this._newSeriesProps,this._newSessionProps),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),this._model.chartThemeLoaded()}_merge(e,t,i){var s,r,n,o;const a=this._model;(0,ge.saveDefaultProperties)(!0),e&&(a.properties().childs().paneProperties.mergeAndFire(e.paneProperties),a.properties().childs().scalesProperties.mergeAndFire(e.scalesProperties)),"priceAxisProperties"in t&&a.mainSeries().priceScale().setMode({autoScale:null===(s=t.priceAxisProperties)||void 0===s?void 0:s.autoScale,percentage:null===(r=t.priceAxisProperties)||void 0===r?void 0:r.percentage,log:null===(n=t.priceAxisProperties)||void 0===n?void 0:n.log,lockScale:null===(o=t.priceAxisProperties)||void 0===o?void 0:o.lockScale}),a.mainSeries().properties().mergeAndFire(t),a.mainSeries().properties().saveDefaults(),a.mainSeries().createPaneView(),a.mainSeries().invalidateBarStylesCache(),a.recalculateAllPanes((0,ye.globalChangeEvent)()),a.fullUpdate(),a.properties().saveDefaults(),a.sessions().restoreState({properties:i},!1),(0,ge.saveDefaultProperties)(!1)}}const Jt=new x.TranslatedString("change resolution",l.t(null,void 0,i(32303)));class Qt extends k.UndoCommand{constructor(e,t,i){let s;super(Jt),this._sourceId=e.id();const r=(0,fe.isRangeStyle)(e.style()),n=p.Interval.isRange(t);!r&&n?s=11:r&&!n&&(s=(0,fe.getLastUsedStyle)()),this._newSymbolParams={interval:t,style:s},this._prevSymbolParams={symbol:e.symbol(),currency:e.currency(),unit:e.unit(),interval:e.interval(),style:e.style()},this._chartWidget=i}redo(){this._symbolSource().setSymbolParams(this._newSymbolParams),this._chartWidget.screen.show(!0)}undo(){this._symbolSource().setSymbolParams(this._prevSymbolParams),this._chartWidget.screen.show(!0)}_symbolSource(){return(0,o.ensureNotNull)(this._chartWidget.model().model().dataSourceForId(this._sourceId))}}var ei=i(21076),ti=i(76422) +;const ii=new x.TranslatedString("send {title} backward",l.t(null,void 0,i(16259))),si=new x.TranslatedString("bring {title} forward",l.t(null,void 0,i(56763))),ri=new x.TranslatedString("insert {title} after {target}",l.t(null,void 0,i(74055))),ni=new x.TranslatedString("insert {title} before {target}",l.t(null,void 0,i(11231))),oi=new x.TranslatedString("cut {title}",l.t(null,void 0,i(78755))),ai=new x.TranslatedString("cut sources",l.t(null,void 0,i(63649))),li=new x.TranslatedString("remove {title}",l.t(null,void 0,i(39859))),ci=new x.TranslatedString("remove drawings group",l.t(null,void 0,i(70653))),hi=new x.TranslatedString("move scale",l.t(null,void 0,i(4184))),di=new x.TranslatedString("stop syncing line tool(s)",l.t(null,void 0,i(57011))),ui=new x.TranslatedString("zoom out",l.t(null,void 0,i(9645))),pi=new x.TranslatedString("zoom in",l.t(null,void 0,i(19813))),_i=new x.TranslatedString("move drawing(s)",l.t(null,void 0,i(45356))),mi=new x.TranslatedString("load default drawing template",l.t(null,void 0,i(54597))),gi=new x.TranslatedString("apply factory defaults to selected sources",l.t(null,void 0,i(96996))),fi=new x.TranslatedString("change currency",l.t(null,void 0,i(22641))),vi=new x.TranslatedString("change unit",l.t(null,void 0,i(39028))),Si=new x.TranslatedString("clone line tools",l.t(null,void 0,i(5179))),yi=new x.TranslatedString("merge up",l.t(null,void 0,i(66143))),bi=new x.TranslatedString("merge down",l.t(null,void 0,i(62153))),wi=new x.TranslatedString("merge to pane",l.t(null,void 0,i(70746))),Pi=new x.TranslatedString("unmerge up",l.t(null,void 0,i(52540))),Ci=new x.TranslatedString("unmerge down",l.t(null,void 0,i(86949))),Ti=new x.TranslatedString("unmerge to new bottom pane",l.t(null,void 0,i(20057))),xi=new x.TranslatedString("move {title} to new right scale",l.t(null,void 0,i(45544))),Ii=new x.TranslatedString("move {title} to new left scale",l.t(null,void 0,i(11303))),Mi=new x.TranslatedString("make {title} no scale (Full screen)",l.t(null,void 0,i(74642))),Ai=new x.TranslatedString("scroll time",l.t(null,void 0,i(70009))),Li=new x.TranslatedString("scale time",l.t(null,void 0,i(35962))),ki=new x.TranslatedString("reset time scale",l.t(null,void 0,i(55064))),Ei=new x.TranslatedString("reset scales",l.t(null,void 0,i(21948))),Di=new x.TranslatedString("create {tool}",l.t(null,void 0,i(81791))),Bi=new x.TranslatedString("change {pointIndex} point",l.t(null,void 0,i(72032))),Vi=new x.TranslatedString("paste {title}",l.t(null,void 0,i(41601))),Ri=new x.TranslatedString("insert {title}",l.t(null,void 0,i(90743))),Ni=new x.TranslatedString("remove all studies",l.t(null,void 0,i(15516))),Oi=new x.TranslatedString("remove drawings",l.t(null,void 0,i(44656))),Fi=new x.TranslatedString("remove all studies and drawing tools",l.t(null,void 0,i(80171))),Wi=(new x.TranslatedString("turn line tools sharing off",l.t(null,void 0,i(28068))),new x.TranslatedString("share line tools in layout",l.t(null,void 0,i(77554))),new x.TranslatedString("share line tools globally",l.t(null,void 0,i(64704))), +l.t(null,void 0,i(75139)),(0,C.getLogger)("Chart.ChartUndoModel"));function Hi(e,t){return{bringForwardEnabled:e.bringForwardEnabled||t.bringForwardEnabled,bringToFrontEnabled:e.bringToFrontEnabled||t.bringToFrontEnabled,sendBackwardEnabled:e.sendBackwardEnabled||t.sendBackwardEnabled,sendToBackEnabled:e.sendToBackEnabled||t.sendToBackEnabled}}function zi(e){return new x.TranslatedString(e.name(),e.title())}function Ui(){return(0,Ee.drawOnAllCharts)().value()?1:0}class ji extends(r()){constructor(e,t,i,s,r,n,o,a,l,c,h){super(),this._createLineCommand=null,this._initialTimeScrollState=null,this._initialTimeScrollPos=null,this._scalePriceInfo=null,this._currentSourceMoveCommand=null,this._currentLineChangeCommand=null,this._currentCustomMoveCommand=null,this._zoomStack=new m.UndoStack,this._lineToolsDoNotAffectChartInvalidation=new P.FeatureToggleWatchedValue("do_not_invalidate_chart_on_changing_line_tools",!1),this._chartWidget=n,this.m_model=new(_t())(e,t,i,s,r,this,a,l,c,h),this._undoHistory=o,this._lineToolsGroupController=new He({model:this._model.bind(this),pushUndoCommand:this._pushUndoCommand.bind(this),beginUndoMacro:(e,t)=>{this._undoHistory.beginUndoMacro(e).setCustomFlag("doesnt_affect_save",!!t)},endUndoMacro:this._undoHistory.endUndoMacro.bind(this._undoHistory),emitEvent:this.emitEvent.bind(this)})}undoHistory(){return this._undoHistory}setWatchedValue(e,t,i){this._undoHistory.setWatchedValue(e,t,i)}lineToolsGroupController(){return this._lineToolsGroupController}mergeAllScales(e){!function(e,t){e.beginUndoMacro("left"===t?M:A),e.model().panes().forEach((i=>{const s="left"===t?i.rightPriceScales():i.leftPriceScales(),r=("left"===t?i.leftPriceScales():i.rightPriceScales()).concat(s),n="overlay"===i.priceScalePosition(i.defaultPriceScale())?r[0]:i.defaultPriceScale();e.movePriceScale(i,n,t,0),r.forEach((t=>{if(t===n)return;let s=t.mainSource();for(;null!==s;){e.moveToScale(s,i,n,null,!0);const r=t.mainSource();if(r===s){L.logError("Loop detected while trying to merge scales");break}s=r}}))})),e.endUndoMacro(),e.model().fullUpdate()}(this,e)}movePriceScale(e,t,i,s){const r=new E(this._model(),e,t,i,s,hi);this._pushUndoCommand(r)}createLineTool({pane:e,point:t,linetool:i,properties:s,linkKey:r,ownerSource:n,disableSynchronization:a,sharingMode:l=Ui(),id:c}){if(("LineToolRegressionTrend"===i||"LineToolAnchoredVWAP"===i)&&!this.canCreateStudy())return(0,h.showTooManyStudiesNotice)(),null;const d=Di.format({tool:new x.TranslatedString(i,W.lineToolsLocalizedNames[i])});this.beginUndoMacro(d,this._lineToolsDoNotAffectChartInvalidation.value());const u=!a;this._createLineCommand=new z(this._model(),e,i,n||(0,o.ensureNotNull)(e.mainDataSource()),l,c);const p=this._createLineCommand.startCreatingLine(t,s,r||null),_=(0,o.ensureNotNull)(this._createLineCommand.line());let m=null;if(p&&(u&&this.finishLineTool(_),this._pushUndoCommand(this._createLineCommand),this._createLineCommand=null,m={points:_.normalizedPoints(),interval:this.mainSeries().interval()}),u&&void 0===r&&(0, +Ee.drawOnAllCharts)().value()&&_.isSynchronizable()){const e=(0,o.ensureNotNull)(this.model().externalTimeStamp(t.index)),s={point:{price:t.price,timeStamp:e},linetool:i,properties:_.properties(),symbol:this.mainSeries().symbol(),model:this.model(),linkKey:(0,o.ensureNotNull)(_.linkKey().value()),finalState:m,id:_.id()};_.isFixed()&&(s.pointPositionPercents=_.calcPositionPercents()),(0,Ee.createLineTool)(s)}return this.endUndoMacro(),_}continueCreatingLine(e,t,i,s){const r=(0,o.ensureNotNull)(this._createLineCommand);this.beginUndoMacro(r.text(),this._lineToolsDoNotAffectChartInvalidation.value());const n=(0,o.ensureNotNull)(this._model().lineBeingCreated()),a=r.continueCreatingLine(e,t,i,s);let l=null;if(a&&(this.finishLineTool(n),this._pushUndoCommand(r),this._createLineCommand=null,l={points:n.normalizedPoints(),interval:this.mainSeries().interval()}),r.drawOnAllCharts()&&n.isSynchronizable()){const i=(0,o.ensureNotNull)(this._model().externalTimeStamp(e.index));(0,Ee.continueLineTool)({point:{price:e.price,timeStamp:i},envState:t,finalState:l,model:this._model()})}return this.endUndoMacro(),a}continueExternalLine(e,t,i){const s=(0,o.ensureNotNull)(this._createLineCommand),r=s.continueCreatingLine(e,t,i);return r&&(this._pushUndoCommand(s),this._createLineCommand=null),r}finishLineTool(e){this._model().finishLineTool(e)}pasteImageAsLineTool(e,t,i,s){return null}loadRange(e){const t=this._model(),i=t.mainSeries().getSupportedResolution(e.res),s={val:e.val,res:i},r=t.appliedTimeFrame().value();return(null===r||!_(r,s))&&(this._pushUndoCommand(new Pe(t,s)),!0)}unlinkLines(e){const t=this.model();this.beginUndoMacro(di,this._lineToolsDoNotAffectChartInvalidation.value());for(const i of e)null!==i.linkKey().value()&&(0,Ee.removeLineTool)({withUndo:!0,model:this.model(),symbol:i.symbol(),linkKey:(0,o.ensureNotNull)(i.linkKey().value()),sourceTitle:zi(i),lineToolState:i.state(!1),unlink:!0}),this._pushUndoCommand(new Pt(t,i));this.endUndoMacro()}zoomFromViewport(){const e=new bt((0,o.ensureDefined)(this._zoomStack.head()),this._zoomStack,!1);this._pushUndoCommand(e)}zoomToViewport(e,t,i,s,r){const n=new vt(this.m_model,e,t,i,s,r),o=new bt(n,this._zoomStack,!0);this._pushUndoCommand(o)}zoomStack(){return this._zoomStack}hoveredSource(){return this.m_model.hoveredSource()}setProperty(e,t,i,s){if(e&&e.value()!==t){const r=new Le(e,t,i,this.m_model,s);this._pushUndoCommand(r),this.emitEvent("setProperty")}}withMacro(e,t,i){const s=this.beginUndoMacro(e,i);try{t()}finally{this.endUndoMacro()}return s}barsMarksSources(){return this.m_model.barsMarksSources()}removeAllDrawingTools(){this.beginUndoMacro(Oi,!0),this._removeAllDrawingToolsImpl(),this.endUndoMacro()}removeAllStudiesAndDrawingTools(){this.beginUndoMacro(Fi),this._removeAllDrawingToolsImpl(),this._removeAllStudiesImpl(),this.endUndoMacro()}removeAllStudies(){this.beginUndoMacro(Ni),this._removeAllStudiesImpl(),this.endUndoMacro()}canZoomIn(){return this.model().canZoomIn()}canZoomOut(){return this.model().canZoomOut()}zoomOut(){const e=this.timeScale().width() +;if(this.canZoomOut()){try{this.beginUndoMacro(ui)}catch(e){return}(0,v.doAnimate)({to:e/5,onStep:e=>{this.startScaleTime(0),this.scaleTimeTo(e),this.endScaleTime()},onComplete:()=>this.endUndoMacro()})}}zoomIn(){const e=this.timeScale().width();if(this.canZoomIn()){try{this.beginUndoMacro(pi)}catch(e){return}(0,v.doAnimate)({to:e/5,onStep:e=>{this.startScaleTime(e),this.scaleTimeTo(0),this.endScaleTime()},onComplete:()=>this.endUndoMacro()})}}startMovingSources(e,t,i,s){e.filter((e=>e.doesMovingAffectsUndo())).length&&(this._currentSourceMoveCommand=new R(this.model(),e,_i,!1),e.every(f.isLineTool)&&this._currentSourceMoveCommand.setCustomFlag("doesnt_affect_save",this._lineToolsDoNotAffectChartInvalidation.value())),this.model().startMovingSources(e,t,i,new Map,s)}moveSources(e,t){this.model().moveSources(e,new Map,t)}endMovingSource(e,t){this.model().endMovingSources(e,void 0,t),null!==this._currentSourceMoveCommand&&(this._currentSourceMoveCommand.saveNewState(),this._pushUndoCommand(this._currentSourceMoveCommand)),this._currentSourceMoveCommand=null}startChangingLinetool(e,t,i,s,r){this._currentLineChangeCommand=new R(this.model(),[e],Bi.format({pointIndex:i}),!1),this._currentLineChangeCommand.setCustomFlag("doesnt_affect_save",this._lineToolsDoNotAffectChartInvalidation.value()),this.model().startChangingLinetool(e,t,i,s,r)}changeLinePoint(e,t){this.model().changeLinePoint(e,t)}endChangingLinetool(e){this.model().endChangingLinetool(e),null!==this._currentLineChangeCommand&&(this._currentLineChangeCommand.saveNewState(),this._pushUndoCommand(this._currentLineChangeCommand)),this._currentLineChangeCommand=null}setChartStyleProperty(e,t,i){if(e.value()!==t){const s=new be(e,t,this.mainSeries(),i,this.model(),this.chartWidget());this._pushUndoCommand(s),this.emitEvent("setChartStyleProperty"),(0,me.trackChartStyleChanged)(e.value())}}restorePropertiesForSource(e){(0,f.isLineTool)(e)?this._restoreLineToolFactoryDefaults(e):this._restoreStudyFactoryDefaults(e)}restoreLineToolsFactoryDefaults(e){1===e.length?this._restoreLineToolFactoryDefaults(e[0]):(this.beginUndoMacro(gi),e.forEach((e=>this._restoreLineToolFactoryDefaults(e))),this.endUndoMacro())}restoreState(e,t,i){return this.m_model.restoreState(e,t,i)}async clipboardCopy(e,t=this.selection().dataSources()){if(!(0,w.enabled)("datasource_copypaste"))return;const i=t.filter((e=>e.copiable()));if(0===i.length)return;for(const e of i)if((0,T.isStudy)(e)&&e.isChildStudy())throw new Error("Can not copy child study");const s=(0,g.clipboardDataForSources)(this._model().id(),i);return null!==s?e.write({app:JSON.stringify(s),text:s.title}):void 0}async clipboardCut(e,t=this.selection().dataSources()){if(!(0,w.enabled)("datasource_copypaste"))return;const i=t.filter((e=>e.copiable()));if(0===i.length)return;await this.clipboardCopy(e,i);const s=i.filter((e=>e.isUserDeletable()));if(0===s.length)return;const r=(1===s.length?oi:ai).format({title:zi(s[0])});this.beginUndoMacro(r),this.m_model.selectionMacro((()=>this.removeSources(s,!1,r)),!0),this.endUndoMacro()} +async clipboardPaste(e,t){let i=null;if((0,w.enabled)("datasource_copypaste")&&(i=i||await e.read(),i.app)){const e=JSON.parse(i.app);if(null!==this.pasteSourceFromClip(t,e))return}await this._processSpecialLineToolsContents(e,i,t)}applyStudyTemplate(e,t){const i=new Ye(this._model(),e,t);this._pushUndoCommand(i)}createStudyInserter(e,t,i){const s={createStudy:(e,t,i,s,r,n,o,a,l,c,h)=>this.checkIfFeatureAvailable(e,n)?((0,y.trackEvent)("studies","Study_"+e.id),"Compare@tv-basicstudies"===e.id&&(0,y.trackEvent)("compare","symbol:"+t.symbol),this._insertStudy(e,t,s,r,n,o,a,l,c,null,h)):(Wi.logNormal("Cannot insert study "+e.id),null)};void 0!==i&&(s.createStub=()=>this.m_model.insertStudyStub(i).id(),s.removeStub=e=>this.m_model.removeStudyStub(e));const r=new ei.StudyInserter(e,this.m_model.studyMetaInfoRepository(),s);return r.setParentSources(t),r}replayStatus(){return this.m_model.replayStatus()}setReplayStatus(e){return this.m_model.setReplayStatus(e)}startCustomMoving(e,t,i){this._currentCustomMoveCommand=new ht(this.model(),e,t,i)}customMoveBeingProcessed(){return null!==this._currentCustomMoveCommand}processCustomMove(e){(0,o.ensureNotNull)(this._currentCustomMoveCommand).move(e)}endCustomMoving(){null!==this._currentCustomMoveCommand&&this._currentCustomMoveCommand.hasChanges()&&(this._pushUndoCommand(this._currentCustomMoveCommand),this._currentCustomMoveCommand=null)}panes(){return this.m_model.panes()}cloneLineTools(e,t){for(let t=0;t(0,o.ensureNotNull)(this.model().dataSourceForId(e))));this.copyToOtherCharts(e)}return this.endUndoMacro(),this.emitEvent("cloneLineTools"),i.newIds()}removeSource(e,t,i){this.lineBeingCreated()!==e?this.removeSources([e],t,li.format({title:zi(e)}),i):this.cancelCreatingLine()}removeSelectedSources(){const e=this._model().selection().dataSources();if(!e.length)return;const t=(e.length>1?ci:li).format({title:zi(e[0])});this.removeSources(e,!1,t)}removeSources(e,t,i,s){s||(e=e.filter((e=>e.isUserDeletable())));const r=this._model(),n=r.lineToolsGroupModel(),a=e.every(f.isLineTool)&&this._lineToolsDoNotAffectChartInvalidation.value();this.beginUndoMacro(i,a),r.selectionMacro((s=>{const a=new Map;e.forEach((e=>{if((0,f.isLineTool)(e)){const t=n.groupForLineTool(e);if(null!==t){const i=a.get(t)||[];i.push(e),a.set(t,i)}null!==e.linkKey().value()&&(0,Ee.removeLineTool)({withUndo:!0,model:this.model(),linkKey:(0,o.ensureNotNull)(e.linkKey().value()),symbol:this.model().mainSeries().symbol(),lineToolState:e.state(!1),sourceTitle:zi(e)})}})),a.forEach(((e,t)=>{const i=new V.ExcludeLineToolsFromGroupUndoCommand(r,t,e);this._pushUndoCommand(i)}));const l=new B.RemoveSourcesCommand(r,e,i),c=l.removedIds();this._pushUndoCommand(l),!t&&c.length>0&&(1===c.length?this.emitEvent("removeSource",[c[0]]):this.emitEvent("removeSources",[c])) +}),!0),this.endUndoMacro()}removeUnloadedLineTool({lineToolsSynchronizer:e,sourceTitle:t,linkKey:i,symbol:s,state:r,withUndo:n,unlink:o}){}async scrollToLineTool(e){const t=this.timeScale().logicalRange();if(null===t)return;const i=this.timeScale().barSpacing();let s=t.left();const r=e.points().map((e=>e.index)),n=this.timeScale().points().range().value();if(null===n)return;let a=n.firstIndex;const l=n.lastIndex,h=t.length()/2;if(0===r.length||r.some((e=>t.contains(e))))return;const d=()=>{const t=e.points().map((e=>e.index)),i=t.filter((e=>e<=l)).reduce(((e,t)=>null===e?t:Math.max(e,t)),null);return null!==i?i:t.reduce(((e,t)=>Math.min(e,t)))};let u,p=d();if(a-h>p){const t=e.points().map((e=>e.time)).filter(I.notUndefined).map((e=>e.valueOf()));if(0===t.length)return;const i=t.reduce(((e,t)=>Math.min(e,t)),t[0]);await this.model().gotoTime(i),p=d();const r=(0,o.ensureNotNull)(this.timeScale().logicalRange());if(r.contains(p))return;s=r.left(),a=(0,o.ensureNotNull)(this.timeScale().points().range().value()).firstIndex}a-h>p?(u=(s-a+h)*i,this.mainSeries().setGotoDateResult({timestamp:(0,o.ensureNotNull)(this.timeScale().points().valueAt(a)),eod:!0})):u=(s-p+1+h)*i,this.startScrollTime(0),(0,v.doAnimate)({onStep:(e,t)=>this.scrollTimeTo(t),from:0,to:Math.round(u),easing:c.easingFunc.easeInOutCubic,duration:c.dur,onComplete:()=>this.endScrollTime()})}mergeSourceUp(e){const t=new O.MergeUpUndoCommand(this._model(),e,yi);this._mergeUnmergeSource(e,t)}mergeSourceDown(e){const t=new O.MergeDownUndoCommand(this._model(),e,bi);this._mergeUnmergeSource(e,t)}mergeToPane(e,t,i){const s=this._model().panes().indexOf(t),r=new O.MergeToTargetPane(this._model(),e,s,wi,i);this._mergeUnmergeSource(e,r)}unmergeSourceUp(e){const t=new N.UnmergeUpUndoCommand(this._model(),e,Pi);this._mergeUnmergeSource(e,t)}unmergeSourceDown(e){const t=new N.UnmergeDownUndoCommand(this._model(),e,Ci);this._mergeUnmergeSource(e,t)}unmergeToNewBottomPane(e){const t=new N.UnmergeToNewBottomPane(this._model(),e,Ti);this._mergeUnmergeSource(e,t)}availableZOrderOperations(e){const t=this._model().lineToolsGroupModel(),i=e.filter(f.isLineTool),s=i.map((e=>t.groupForLineTool(e)));(0,o.assert)(new Set(s).size<=1,"Cannot move line tools from different group");const r=0===s.length?null:s[0];let n={bringForwardEnabled:!1,bringToFrontEnabled:!1,sendBackwardEnabled:!1,sendToBackEnabled:!1};const a=new Set(i);for(const t of(0,F.sortSources)(e)){if((0,f.isLineTool)(t)&&null!==r){const e=(0,F.sortSources)(r.lineTools().filter((e=>!a.has(e)||e===t)));n=Hi(n,{bringForwardEnabled:t!==e[e.length-1],bringToFrontEnabled:t!==e[e.length-1],sendBackwardEnabled:t!==e[0],sendToBackEnabled:t!==e[0]});continue}const e=(0,o.ensureNotNull)(this._model().paneForSource(t)).sourcesByGroup().allExceptSpecialSources();if(0===e.length)continue;const i=t.zorder(),s=e[0].zorder(),l=e[e.length-1].zorder();n=Hi(n,{bringForwardEnabled:i!==l,bringToFrontEnabled:i!==l,sendBackwardEnabled:i!==s,sendToBackEnabled:i!==s})}return n}sendToBack(e){ if(!this.availableZOrderOperations(e).sendToBackEnabled)throw new Error("Send to back operation is unavailable");let t=null;const i=e[0];if((0,f.isLineTool)(i)){const s=this._model().lineToolsGroupModel().groupForLineTool(i);if(null!==s){const i=s.lineTools();t=new re(this.model(),(0,F.sortSources)(e),i[0])}}null===t&&(t=new ee(this.model(),(0,F.sortSources)(e))),this._pushUndoCommand(t),this.emitEvent("changeZOrder",[e])}bringToFront(e){if(!this.availableZOrderOperations(e).bringToFrontEnabled)throw new Error("Bring to front operation is unavailable");let t=null;const i=e[0];if((0,f.isLineTool)(i)){const s=this._model().lineToolsGroupModel().groupForLineTool(i);if(null!==s){const i=s.lineTools();t=new ie(this.model(),(0,F.sortSources)(e),i[i.length-1])}}null===t&&(t=new Q(this.model(),(0,F.sortSources)(e))),this._pushUndoCommand(t),this.emitEvent("changeZOrder",[e])}sendBackward(e){if(!this.availableZOrderOperations(e).sendBackwardEnabled)throw new Error("Send backward operation is unavailable");const t=ii.format({title:zi(e[0])});this._sendBackOrBringForward(t,(0,F.sortSources)(e),((e,t)=>new oe(this.model(),e,t)))}bringForward(e){if(!this.availableZOrderOperations(e).bringForwardEnabled)throw new Error("Bring forward operation is unavailable");const t=si.format({title:zi(e[0])});this._sendBackOrBringForward(t,(0,F.sortSources)(e),((e,t)=>new le(this.model(),e,t)))}insertAfter(e,t){e=(0,F.sortSources)(e);const i=ri.format({title:zi(e[0]),target:zi(t)});this._insertAfterOrBefore(i,e,t,(()=>new ie(this.model(),e,t)))}insertBefore(e,t){e=(0,F.sortSources)(e);const i=ni.format({title:zi(e[0]),target:zi(t)});this._insertAfterOrBefore(i,e,t,(()=>new re(this.model(),e,t)))}detachToRight(e,t){(0,y.trackEvent)("Chart","Move to new right scale");const i=xi.format({title:zi(e)}),s=new tt.MoveToNewPriceScaleUndoCommand(this.model(),e,t,"right",i);this._pushUndoCommand(s),this.emitEvent("moveSource",[e])}detachToLeft(e,t){(0,y.trackEvent)("Chart","Move to new left scale");const i=Ii.format({title:zi(e)}),s=new tt.MoveToNewPriceScaleUndoCommand(this.model(),e,t,"left",i);this._pushUndoCommand(s),this.emitEvent("moveSource",[e])}detachNoScale(e,t){(0,y.trackEvent)("Chart","Make source no scale");const i=Mi.format({title:zi(e)}),s=new tt.MoveToNewPriceScaleUndoCommand(this.model(),e,t,"overlay",i);this._pushUndoCommand(s),this.emitEvent("moveSource",[e])}moveToScale(e,t,i,s,r){(0,y.trackEvent)("Chart","Move source to target scale"),this.beginUndoMacro(s);const n=new tt.MoveToExistingPriceScaleUndoCommand(this.model(),e,t,i,s),o=r?null:(0,b.sourceNewCurrencyOnPinningToPriceScale)(e,i,this._model()),a=r?null:(0,mt.sourceNewUnitOnPinningToPriceScale)(e,i,this._model());this._pushUndoCommand(n),null!==o&&this.setPriceScaleCurrency(i,o),null!==a&&this.setPriceScaleUnit(i,a),this.endUndoMacro(),this.emitEvent("moveSource",[e])}startScrollTime(e){const t=this.timeScale();this._initialTimeScrollState={rightOffset:t.rightOffset(),barSpacing:t.barSpacing()},this._initialTimeScrollPos=e,this.model().startScrollTime(e)}scrollTimeTo(e){ -null!==this._initialTimeScrollPos&&null!==this._initialTimeScrollState&&Math.abs(e-this._initialTimeScrollPos)>20&&(this._pushUndoCommand(new _e.TimeScaleChangeUndoCommand(this.model(),this._initialTimeScrollState,Ai)),this._initialTimeScrollPos=null,this._initialTimeScrollState=null),this.model().scrollTimeTo(e)}endScrollTime(){this.model().endScrollTime(),this._initialTimeScrollPos=null,this._initialTimeScrollState=null}startScaleTime(e){const t=this.timeScale(),i={rightOffset:t.rightOffset(),barSpacing:t.barSpacing()};this._pushUndoCommand(new _e.TimeScaleChangeUndoCommand(this.model(),i,Li)),this.model().startScaleTime(e)}scaleTimeTo(e){this.model().scaleTimeTo(e)}endScaleTime(){this.model().endScaleTime()}resetTimeScale(){const e=this.timeScale(),t={rightOffset:e.rightOffset(),barSpacing:e.barSpacing()};this._pushUndoCommand(new _e.TimeScaleChangeUndoCommand(this.model(),t,ki)),this.model().resetTimeScale()}startScalePrice(e,t,i,s){this._scalePriceInfo={priceScaleState:t.state(),tryMergeConsecutiveScales:s},this.model().startScalePrice(e,t,i)}scalePriceTo(e,t,i){this.model().scalePriceTo(e,t,i)}endScalePrice(e,t){this.model().endScalePrice(e,t);const i=(0,o.ensureNotNull)(this._scalePriceInfo);(0,n.default)(i.priceScaleState,t.state())||this._pushUndoCommand(new gt.PriceScaleChangeUndoCommand(this.model(),e,t,i.priceScaleState,i.tryMergeConsecutiveScales)),this._scalePriceInfo=null}startTwoPointsScalePrice(e,t,i,s,r){this._scalePriceInfo={priceScaleState:t.state(),tryMergeConsecutiveScales:r},this.model().startTwoPointsScalePrice(e,t,i,s)}twoPointsScalePriceTo(e,t,i,s){this.model().twoPointsScalePriceTo(e,t,i,s)}endTwoPointsScalePrice(e,t){this.model().endTwoPointsScalePrice(e,t);const i=(0,o.ensureNotNull)(this._scalePriceInfo);(0,n.default)(i.priceScaleState,t.state())||this._pushUndoCommand(new gt.PriceScaleChangeUndoCommand(this.model(),e,t,i.priceScaleState,i.tryMergeConsecutiveScales)),this._scalePriceInfo=null}resetPriceScale(e,t){const i=t.state();this.model().resetPriceScale(e,t),(0,n.default)(i,t.state())||this._pushUndoCommand(new gt.PriceScaleChangeUndoCommand(this.m_model,e,t,i))}rearrangePanes(e,t){const i=new pe(this._model(),e,t);this._pushUndoCommand(i)}movePane(e,t){const i=new pe(this._model(),e,t);this._pushUndoCommand(i)}readOnly(){return this.m_model.readOnly()}checkIfFeatureAvailable(e,t){let i=this.canCreateStudy();const s=t.length>0;return!this.readOnly()&&s&&(i=this.canCreateStudy(!0)),!!i||(s||(0,h.showTooManyStudiesNotice)(),!1)}pasteSourceFromClip(e,t,i){const s=t;if(!s||0===s.sources.length)return null;const r=e||(0,o.ensureNotNull)(this.model().paneForSource(this.mainSeries()));if(!s.sources.some((e=>"drawing"!==e.type||null!==r.clipboardLineToolOwnerSource(e.source.id))))return null;this.beginUndoMacro(Bi.format({title:s.title}));let n=0;const a=[],l=[];for(const t of s.sources)if("drawing"===t.type&&null!==r.clipboardLineToolOwnerSource(t.source.id)){const e=this.pasteLineTool(r,t);n<5&&((0,me.trackDrawingPasted)(e),n+=1),l.push(e),a.push(e) +null!==this._initialTimeScrollPos&&null!==this._initialTimeScrollState&&Math.abs(e-this._initialTimeScrollPos)>20&&(this._pushUndoCommand(new _e.TimeScaleChangeUndoCommand(this.model(),this._initialTimeScrollState,Ai)),this._initialTimeScrollPos=null,this._initialTimeScrollState=null),this.model().scrollTimeTo(e)}endScrollTime(){this.model().endScrollTime(),this._initialTimeScrollPos=null,this._initialTimeScrollState=null}startScaleTime(e){const t=this.timeScale(),i={rightOffset:t.rightOffset(),barSpacing:t.barSpacing()};this._pushUndoCommand(new _e.TimeScaleChangeUndoCommand(this.model(),i,Li)),this.model().startScaleTime(e)}scaleTimeTo(e){this.model().scaleTimeTo(e)}endScaleTime(){this.model().endScaleTime()}resetTimeScale(){const e=this.timeScale(),t={rightOffset:e.rightOffset(),barSpacing:e.barSpacing()};this._pushUndoCommand(new _e.TimeScaleChangeUndoCommand(this.model(),t,ki)),this.model().resetTimeScale()}startScalePrice(e,t,i,s){this._scalePriceInfo={priceScaleState:t.state(),tryMergeConsecutiveScales:s},this.model().startScalePrice(e,t,i)}scalePriceTo(e,t,i){this.model().scalePriceTo(e,t,i)}endScalePrice(e,t){this.model().endScalePrice(e,t);const i=(0,o.ensureNotNull)(this._scalePriceInfo);(0,n.default)(i.priceScaleState,t.state())||this._pushUndoCommand(new gt.PriceScaleChangeUndoCommand(this.model(),e,t,i.priceScaleState,i.tryMergeConsecutiveScales)),this._scalePriceInfo=null}startTwoPointsScalePrice(e,t,i,s,r){this._scalePriceInfo={priceScaleState:t.state(),tryMergeConsecutiveScales:r},this.model().startTwoPointsScalePrice(e,t,i,s)}twoPointsScalePriceTo(e,t,i,s){this.model().twoPointsScalePriceTo(e,t,i,s)}endTwoPointsScalePrice(e,t){this.model().endTwoPointsScalePrice(e,t);const i=(0,o.ensureNotNull)(this._scalePriceInfo);(0,n.default)(i.priceScaleState,t.state())||this._pushUndoCommand(new gt.PriceScaleChangeUndoCommand(this.model(),e,t,i.priceScaleState,i.tryMergeConsecutiveScales)),this._scalePriceInfo=null}resetPriceScale(e,t){const i=t.state();this.model().resetPriceScale(e,t),(0,n.default)(i,t.state())||this._pushUndoCommand(new gt.PriceScaleChangeUndoCommand(this.m_model,e,t,i))}rearrangePanes(e,t){const i=new pe(this._model(),e,t);this._pushUndoCommand(i)}movePane(e,t){const i=new pe(this._model(),e,t);this._pushUndoCommand(i)}readOnly(){return this.m_model.readOnly()}checkIfFeatureAvailable(e,t){let i=this.canCreateStudy();const s=t.length>0;return!this.readOnly()&&s&&(i=this.canCreateStudy(!0)),!!i||(s||(0,h.showTooManyStudiesNotice)(),!1)}pasteSourceFromClip(e,t,i){const s=t;if(!s||0===s.sources.length)return null;const r=e||(0,o.ensureNotNull)(this.model().paneForSource(this.mainSeries()));if(!s.sources.some((e=>"drawing"!==e.type||null!==r.clipboardLineToolOwnerSource(e.source.id))))return null;this.beginUndoMacro(Vi.format({title:s.title}));let n=0;const a=[],l=[];for(const t of s.sources)if("drawing"===t.type&&null!==r.clipboardLineToolOwnerSource(t.source.id)){const e=this.pasteLineTool(r,t);n<5&&((0,me.trackDrawingPasted)(e),n+=1),l.push(e),a.push(e) }else"study"===t.type&&t.source&&t.source.metaInfo&&this.checkIfFeatureAvailable(new d.StudyMetaInfo(t.source.metaInfo),[])&&a.push(this.pasteStudy(t,i?e:void 0));return l.length&&this.selectionMacro((e=>{e.clearSelection(),l.forEach((t=>{e.addSourceToSelection(t,null)}))})),this.endUndoMacro(),a}pasteLineTool(e,t,i,s){t.source.state.intervalsVisibilities=(0,At.mergeIntervalVisibilitiesDefaults)(t.source.state.intervalsVisibilities),(0,At.makeIntervalsVisibilitiesVisibleAtInterval)(t.source.state.intervalsVisibilities,p.Interval.parse(this.model().mainSeries().interval()));const r=new Je(this.model(),t,e,i,s);this._pushUndoCommand(r);const n=r.source();return r.needCopyToOtherCharts()&&this.copyToOtherCharts([n]),this.selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection(n,null)})),n}pasteStudy(e,t){const i=new ot(this.model(),e,null==t?void 0:t.id());this._pushUndoCommand(i);const s=(0,o.ensureNotNull)(i.state()).id;return(0,ti.emit)("study_event",s,"paste_study"),(0,o.ensureNotNull)(this._model().dataSourceForId(s))}setPriceScaleCurrency(e,t){const i=new Qe.SetPriceScaleCurrencyUndoCommand(e,t,this.chartWidget(),fi);this._pushUndoCommand(i)}setPriceScaleUnit(e,t){const i=new et.SetPriceScaleUnitUndoCommand(e,t,this.chartWidget(),vi);this._pushUndoCommand(i)}setSymbol(e,t){e.symbol()!==t&&this._pushUndoCommand(new st(e,t,this.chartWidget()))}setResolution(e,t){e===this.mainSeries()&&(t=e.getSupportedResolution(t)),p.Interval.isEqual(e.interval(),t)||this._pushUndoCommand(new Qt(e,t,this.chartWidget()))}chartLoadTheme(e,t,i){const s=new Zt(this.model(),e,t);i?s.redo():this._pushUndoCommand(s)}isJustClonedChart(){return this._chartWidget.isJustClonedChart()}copyToOtherCharts(e){const t=this.mainSeries(),i=t.syncModel(),s=this.timeScale();if(i)for(const r of e){if(!r.isSynchronizable())continue;const e=r.linkKey().value()||(0,S.randomHash)();r.linkKey().setValue(e);const n=r.state(!1),a=r.normalizedPoints(),l=r.properties().interval.value(),c=t.interval();let h;if(p.Interval.isEqual(l,c))h=a.map((e=>{const t=(0,o.ensureNotNull)(s.timePointToIndex(e.time_t))+e.offset;return{price:e.price,timeStamp:(0,o.ensureNotNull)(this.model().externalTimeStamp(t))}}));else{const e=i.createNewModelWithResolution(l);h=a.map((t=>({price:t.price,timeStamp:0===t.offset?t.time_t:e.projectTime(t.time_t,t.offset)})))}const d={...n,id:r.id(),linkKey:e,points:h,linetool:r.toolname,model:this.model(),symbol:t.symbol(),finalState:{points:a,interval:l},pointPositionPercents:r.isFixed()?r.calcPositionPercents():void 0,sharingMode:r.sharingMode().value()};(0,Ee.copyLineTool)(d)}}addPaneStretchFactorUndoCommand(e,t,i,s){const r=new at(this.model(),e,t,i,s);this._pushUndoCommand(r)}paneForSource(e){return this.m_model.paneForSource(e)}destroy(){this._lineToolsDoNotAffectChartInvalidation.destroy(),this.m_model.destroy()}moveSelectedToolsLeft(){return this._moveSelectedTools(2)}moveSelectedToolsUp(){return this._moveSelectedTools(0)}moveSelectedToolsRight(){return this._moveSelectedTools(3)}moveSelectedToolsDown(){ -return this._moveSelectedTools(1)}insertStudyWithoutCheck(e,t,i){return this._insertStudy(e,t,{},!1,[],void 0,void 0,void 0,void 0,null!=i?i:null,void 0)}saveLineToolState(e,t){this._pushUndoCommand(new R(this.m_model,[e],t))}resetScales(){this.beginUndoMacro(Ei),this.resetTimeScale();for(const e of this.m_model.panes()){for(const t of e.leftPriceScales())this.resetPriceScale(e,t);for(const t of e.rightPriceScales())this.resetPriceScale(e,t)}this.endUndoMacro(),this.m_model.recalculateAllPanes((0,ye.viewportChangeEvent)())}shareLineTools(e,t){}canCreateStudy(e){return this.model().chartApi().canCreateStudy(e)}studiesMetaData(){return this.m_model.studiesMetaData()}_isCountedStudy(e){throw new Error("Not implemented")}_mergeUnmergeSource(e,t){this.beginUndoMacro(t.text());const i=(0,o.ensureNotNull)(this._model().paneForSource(e)),s=new Set(i.sourcesByGroup().lineSources().filter((t=>t.ownerSource()===e)));this._model().lineToolsGroupModel().groups().filter((e=>{const t=e.lineTools().some((e=>s.has(e))),i=e.lineTools().some((e=>!s.has(e)));return t&&i})).forEach((e=>{this._pushUndoCommand(new B.ExcludeLineToolsFromGroupUndoCommand(this._model(),e,e.lineTools()))})),this._pushUndoCommand(t),this.endUndoMacro()}_insertStudy(e,t,i,s,r,n,a,l,c,h,d){const u=Ri.format({title:e.description});this.beginUndoMacro(u);const p=new dt(this.model(),e,t,i,s,r,n,a,l,c,h||null,u);this._pushUndoCommand(p);const _=p.insertedStudy();if(void 0!==d){const e=new ut.SetPriceScaleModeCommand(d,(0,o.ensureNotNull)(_.priceScale()),null,this.model());this._pushUndoCommand(e)}return this.endUndoMacro(),_}async _processSpecialLineToolsContents(e,t,i){0}_insertAfterOrBefore(e,t,i,s){const r=(0,o.ensureNotNull)(this._model().paneForSource(i));if(t.some((e=>(0,f.isLineTool)(e)&&this._model().paneForSource(e)!==r)))throw new Error("Cannot insert line tool after target on another pane");this.beginUndoMacro(e),t.forEach((e=>{(0,o.ensureNotNull)(this.model().paneForSource(e))!==r&&this.mergeToPane(e,r)}));const n=s();this._pushUndoCommand(n),this.emitEvent("changeZOrder",[t]),this.endUndoMacro()}_sendBackOrBringForward(e,t,i){const s=new Map;t.forEach((e=>{const t=(0,o.ensureNotNull)(this._model().paneForSource(e)),i=s.get(t)||[];i.push(e),s.set(t,i)})),this.beginUndoMacro(e),s.forEach(((e,t)=>{this._pushUndoCommand(i(t,e))})),this.endUndoMacro(),this.emitEvent("changeZOrder",[t])}_moveSelectedTools(e){const t=this.model().selection().lineDataSources();if(0===t.length)return!1;if((0,Ee.lockDrawings)().value())return!0;const i=this.timeScale().visibleBarsStrictRange();if(null===i)return!1;const s=function(e){const t=new Map;for(const i of e){const e=i.ownerSource();if(null===e)continue;let s=t.get(e);if(void 0===s){const r=e.priceScale(),n=e.priceStep(),o=e.firstValue();if(null===r||null===n||null===o)continue;if(null===r.priceRange())continue;s={sources:[],priceScale:r,priceStep:n,startPrice:i.points()[0].price,firstValue:o},t.set(e,s)}s.sources.push(i)}return t}(t);if(0===s.size)return!1 -;this.beginUndoMacro(_i,this._lineToolsDoNotAffectChartInvalidation.value());const r=i.firstBar(),n=this.timeScale().indexToCoordinate(r),o=r+(3===e?1:2===e?-1:0),l=this.timeScale().indexToCoordinate(o);return Ee.isDirectionalMovementActive.setValue(!0),s.forEach((t=>{const{startPrice:i,priceStep:s,priceScale:c,firstValue:h}=t,d=i+(0===e?s:1===e?-s:0),u=c.priceToCoordinate(i,h),p=c.priceToCoordinate(d,h),_={logical:{index:r,price:i},screen:new a.Point(n,u)},m={logical:{index:o,price:d},screen:new a.Point(l,p)};this.startMovingSources(t.sources,_,null),this.moveSources(m),this.endMovingSource(!1,!0)})),Ee.isDirectionalMovementActive.setValue(!1),this.endUndoMacro(),!0}_restoreStudyFactoryDefaults(e){const t=new Mt(this.m_model,e.properties());this._pushUndoCommand(t)}_restoreLineToolFactoryDefaults(e){this.beginUndoMacro(mi,this._lineToolsDoNotAffectChartInvalidation.value()),this.saveLineToolState(e,mi);const t=new It(this.m_model,e.properties(),mi);this._pushUndoCommand(t),this.saveLineToolState(e,mi),this.endUndoMacro(),this.model().updateSource(e)}_removeAllDrawingToolsImpl(e){this.selectionMacro((()=>{this.lineBeingCreated()&&this.cancelCreatingLine();this.dataSources().filter(f.isLineTool).filter((e=>e.isActualSymbol()&&e.isUserDeletable())).filter((t=>!e||e===t.toolname)).forEach((e=>this.removeSource(e,!1)))}),!0)}_removeAllStudiesImpl(){const e=this.dataSources(),t=e.filter(T.isStudy).filter((e=>!e.isChildStudy()&&e.removeByRemoveAllStudies())),i=e.filter(T.isStudyStub);t.concat(i).forEach((e=>this.removeSource(e,!1)))}}},96196:(e,t,i)=>{"use strict";var s=i(26867),r=i(50151).ensureNotNull,n=i(50151).assert,o=i(43331).ChartModelBase,a=i(6250).isLineTool,l=i(96881).Watermark,c=i(49483).CheckMobile,h=i(36646).InvalidationMask,d=i(36646).InvalidationLevel;const{globalChangeEvent:u,sourceChangeEvent:p}=i(97425);var _=i(89215),m=_.isStudy,g=_.isFundamentalStudy,f=i(76076),v=i(95190).MainSeriesScaleRatioProperty,S=i(53778).scaleRatio,y=i(21076).StudyInserter,b=i(55262).dateFormatProperty,w=i(51620).timeHoursFormatProperty,C=i(76422),P=i(47130).StudyColorRotatorFactory,T=i(2484),x=i(91109).AppliedTimeFrame;i(14948).ReplayStatus,T.enabled("fix_left_edge");class I extends o{constructor(e,t,i,s,r,n,o,a,c,h){super(e,t,i,s,r,n,o,a,c,h);var d=this;this._mainSeriesScaleRatioProperty=new v(this),this.m_mainSeries.dataEvents().completed().subscribe(this,function(){this._scrollingState&&this.gotoTime()}.bind(this)),this.m_mainSeries.onIntervalChanged().subscribe(this,(function(){this._recalcVRStudiesParams.oldStartVisibleIndex=NaN,this._recalcVRStudiesParams.oldEndVisibleIndex=NaN})),this._readOnly||(this.m_mainSeries.properties().addChild("priceAxisProperties",this.m_mainSeries.m_priceScale.properties()),this._properties.paneProperties.legendProperties.showStudyTitles.listeners().subscribe(this,(function(e){e.value()||d._properties.paneProperties.legendProperties.showStudyArguments.setValue(!1)}))),this._watermarkSource=this._options.watermarkEnabled?new l(this,this.m_mainSeries):null, -f.hideAllDrawings().subscribe(this,this._onDrawingsVisibilityChanged),f.hideAllIndicators().subscribe(this,this._onIndicatorsVisibilityChanged),this._properties.scalesProperties.listeners().subscribe(this,I.prototype.fullUpdate),this._studyShiftColorStartOffset=void 0,this._linePointBeingEdited=null,this._lineBeingEdited=null,b.subscribe(this,this._updateDateTimeFormatter),w.subscribe(this,this._updateDateTimeFormatter),this.mainSeries().properties().interval.subscribe(this,this._updateDateTimeFormatter),this._updateDateTimeFormatter(),this._studyColorRotatorFactory=new P(this),this._dataSourceCollectionChanged.subscribe(this,this._updateShowLegendProperty.bind(this)),this._properties.paneProperties.legendProperties.showLegend.subscribe(this,this._updateShowLegendProperty),this._appliedTimeFrame=new x(this),this.mainSeries().onTimeFrameApplied().subscribe(this,(function(e){var t=null!==e?{res:this.mainSeries().interval(),val:e}:null;this.appliedTimeFrame().setValue(t)}))}applyPreferences(e){for(var t in e)void 0!==this._properties[t]&&"m_mainSeries"!==this._properties[t]&&this._properties[t].mergeAndFire(e[t]);void 0!==e.timeScale&&(this._timeScale.defaultRightOffset().setValue(e.timeScale.defaultRightOffset),this._timeScale.defaultRightOffsetPercentage().setValue(e.timeScale.defaultRightOffsetPercentage),this._timeScale.usePercentageRightOffset().setValue(e.timeScale.usePercentageRightOffset)),this._properties.saveDefaults(),this.m_mainSeries.applyPreferences(e.mainSeries),this.sessions().applyPreferences(e.sessions),this.recalculateAllPanes(u()),this.fullUpdate()}timezone(){return this._properties.timezone.value()}initConnection(){this._chartApi.switchTimezone(this.timezone())}updatePane(e){var t=this._paneInvalidationMask(e);this.invalidate(t)}fullUpdate(){this.invalidate(h.full())}lightUpdate(){this.invalidate(h.light())}studiesMetaData(){return this._studiesMetaData}studyVersioning(){return this._studyVersioning}startNotStartedStudies(){if(!this.m_mainSeries.isStarted())throw new Error("Cannot start studies: main series is not started");for(var e=this.dataSources(),t=0;tt.ownerSource()===e)));this._model().lineToolsGroupModel().groups().filter((e=>{const t=e.lineTools().some((e=>s.has(e))),i=e.lineTools().some((e=>!s.has(e)));return t&&i})).forEach((e=>{this._pushUndoCommand(new V.ExcludeLineToolsFromGroupUndoCommand(this._model(),e,e.lineTools()))})),this._pushUndoCommand(t),this.endUndoMacro()}_insertStudy(e,t,i,s,r,n,a,l,c,h,d){const u=Ri.format({title:e.description});this.beginUndoMacro(u);const p=new dt(this.model(),e,t,i,s,r,n,a,l,c,h||null,u);this._pushUndoCommand(p);const _=p.insertedStudy();if(void 0!==d){const e=new ut.SetPriceScaleModeCommand(d,(0,o.ensureNotNull)(_.priceScale()),null,this.model());this._pushUndoCommand(e)}return this.endUndoMacro(),_}async _processSpecialLineToolsContents(e,t,i){0}_insertAfterOrBefore(e,t,i,s){const r=(0,o.ensureNotNull)(this._model().paneForSource(i));if(t.some((e=>(0,f.isLineTool)(e)&&this._model().paneForSource(e)!==r)))throw new Error("Cannot insert line tool after target on another pane");this.beginUndoMacro(e),t.forEach((e=>{(0,o.ensureNotNull)(this.model().paneForSource(e))!==r&&this.mergeToPane(e,r)}));const n=s();this._pushUndoCommand(n),this.emitEvent("changeZOrder",[t]),this.endUndoMacro()}_sendBackOrBringForward(e,t,i){const s=new Map;t.forEach((e=>{const t=(0,o.ensureNotNull)(this._model().paneForSource(e)),i=s.get(t)||[];i.push(e),s.set(t,i)})),this.beginUndoMacro(e),s.forEach(((e,t)=>{this._pushUndoCommand(i(t,e))})),this.endUndoMacro(),this.emitEvent("changeZOrder",[t])}_moveSelectedTools(e){const t=this.model().selection().lineDataSources();if(0===t.length)return!1;if((0,Ee.lockDrawings)().value())return!0;const i=this.timeScale().visibleBarsStrictRange();if(null===i)return!1;const s=function(e){const t=new Map;for(const i of e){const e=i.ownerSource();if(null===e)continue;let s=t.get(e);if(void 0===s){const r=e.priceScale(),n=e.priceStep(),o=e.firstValue();if(null===r||null===n||null===o)continue;if(null===r.priceRange())continue;s={sources:[],priceScale:r,priceStep:n,startPrice:i.points()[0].price,firstValue:o},t.set(e,s)}s.sources.push(i)}return t}(t);if(0===s.size)return!1 +;this.beginUndoMacro(_i,this._lineToolsDoNotAffectChartInvalidation.value());const r=i.firstBar(),n=this.timeScale().indexToCoordinate(r),o=r+(3===e?1:2===e?-1:0),l=this.timeScale().indexToCoordinate(o);return Ee.isDirectionalMovementActive.setValue(!0),s.forEach((t=>{const{startPrice:i,priceStep:s,priceScale:c,firstValue:h}=t,d=i+(0===e?s:1===e?-s:0),u=c.priceToCoordinate(i,h),p=c.priceToCoordinate(d,h),_={logical:{index:r,price:i},screen:new a.Point(n,u)},m={logical:{index:o,price:d},screen:new a.Point(l,p)};this.startMovingSources(t.sources,_,null),this.moveSources(m),this.endMovingSource(!1,!0)})),Ee.isDirectionalMovementActive.setValue(!1),this.endUndoMacro(),!0}_restoreStudyFactoryDefaults(e){const t=new Mt(this.m_model,e.properties());this._pushUndoCommand(t)}_restoreLineToolFactoryDefaults(e){this.beginUndoMacro(mi,this._lineToolsDoNotAffectChartInvalidation.value()),this.saveLineToolState(e,mi);const t=new It(this.m_model,e.properties(),mi);this._pushUndoCommand(t),this.saveLineToolState(e,mi),this.endUndoMacro(),this.model().updateSource(e)}_removeAllDrawingToolsImpl(e){this.selectionMacro((()=>{this.lineBeingCreated()&&this.cancelCreatingLine();this.dataSources().filter(f.isLineTool).filter((e=>e.isActualSymbol()&&e.isUserDeletable())).filter((t=>!e||e===t.toolname)).forEach((e=>this.removeSource(e,!1)))}),!0)}_removeAllStudiesImpl(){const e=this.dataSources(),t=e.filter(T.isStudy).filter((e=>!e.isChildStudy()&&e.removeByRemoveAllStudies())),i=e.filter(T.isStudyStub);t.concat(i).forEach((e=>this.removeSource(e,!1)))}}},96196:(e,t,i)=>{"use strict";var s=i(26867),r=i(50151).ensureNotNull,n=i(50151).assert,o=i(81306).ChartModelBase,a=i(6250).isLineTool,l=i(96881).Watermark,c=i(49483).CheckMobile,h=i(36646).InvalidationMask,d=i(36646).InvalidationLevel;const{globalChangeEvent:u,sourceChangeEvent:p}=i(97425);var _=i(89215),m=_.isStudy,g=_.isFundamentalStudy,f=i(76076),v=i(95190).MainSeriesScaleRatioProperty,S=i(53778).scaleRatio,y=i(21076).StudyInserter,b=i(55262).dateFormatProperty,w=i(51620).timeHoursFormatProperty,P=i(76422),C=i(47130).StudyColorRotatorFactory,T=i(2484),x=i(91109).AppliedTimeFrame;i(14948).ReplayStatus,T.enabled("fix_left_edge");class I extends o{constructor(e,t,i,s,r,n,o,a,c,h){super(e,t,i,s,r,n,o,a,c,h);var d=this;this._mainSeriesScaleRatioProperty=new v(this),this.m_mainSeries.dataEvents().completed().subscribe(this,function(){this._scrollingState&&this.gotoTime()}.bind(this)),this.m_mainSeries.onIntervalChanged().subscribe(this,(function(){this._recalcVRStudiesParams.oldStartVisibleIndex=NaN,this._recalcVRStudiesParams.oldEndVisibleIndex=NaN})),this._readOnly||(this.m_mainSeries.properties().addChild("priceAxisProperties",this.m_mainSeries.m_priceScale.properties()),this._properties.paneProperties.legendProperties.showStudyTitles.listeners().subscribe(this,(function(e){e.value()||d._properties.paneProperties.legendProperties.showStudyArguments.setValue(!1)}))),this._watermarkSource=this._options.watermarkEnabled?new l(this,this.m_mainSeries):null, +f.hideAllDrawings().subscribe(this,this._onDrawingsVisibilityChanged),f.hideAllIndicators().subscribe(this,this._onIndicatorsVisibilityChanged),this._properties.scalesProperties.listeners().subscribe(this,I.prototype.fullUpdate),this._studyShiftColorStartOffset=void 0,this._linePointBeingEdited=null,this._lineBeingEdited=null,b.subscribe(this,this._updateDateTimeFormatter),w.subscribe(this,this._updateDateTimeFormatter),this.mainSeries().properties().interval.subscribe(this,this._updateDateTimeFormatter),this._updateDateTimeFormatter(),this._studyColorRotatorFactory=new C(this),this._dataSourceCollectionChanged.subscribe(this,this._updateShowLegendProperty.bind(this)),this._properties.paneProperties.legendProperties.showLegend.subscribe(this,this._updateShowLegendProperty),this._appliedTimeFrame=new x(this),this.mainSeries().onTimeFrameApplied().subscribe(this,(function(e){var t=null!==e?{res:this.mainSeries().interval(),val:e}:null;this.appliedTimeFrame().setValue(t)}))}applyPreferences(e){for(var t in e)void 0!==this._properties[t]&&"m_mainSeries"!==this._properties[t]&&this._properties[t].mergeAndFire(e[t]);void 0!==e.timeScale&&(this._timeScale.defaultRightOffset().setValue(e.timeScale.defaultRightOffset),this._timeScale.defaultRightOffsetPercentage().setValue(e.timeScale.defaultRightOffsetPercentage),this._timeScale.usePercentageRightOffset().setValue(e.timeScale.usePercentageRightOffset)),this._properties.saveDefaults(),this.m_mainSeries.applyPreferences(e.mainSeries),this.sessions().applyPreferences(e.sessions),this.recalculateAllPanes(u()),this.fullUpdate()}timezone(){return this._properties.timezone.value()}initConnection(){this._chartApi.switchTimezone(this.timezone())}updatePane(e){var t=this._paneInvalidationMask(e);this.invalidate(t)}fullUpdate(){this.invalidate(h.full())}lightUpdate(){this.invalidate(h.light())}studiesMetaData(){return this._studiesMetaData}studyVersioning(){return this._studyVersioning}startNotStartedStudies(){if(!this.m_mainSeries.isStarted())throw new Error("Cannot start studies: main series is not started");for(var e=this.dataSources(),t=0;t0),n?{left:0,right:1,totallySlots:i}:{left:1,right:0,totallySlots:i}}return{left:e,right:t,totallySlots:e+t}}setPriceAutoScale(e,t,i){e.setPriceAutoScale(t,i),this.invalidate(this._paneInvalidationMask(e,d.Light))}updateScales(e,t){this._undoModel._chartWidget._updateScalesActions()}mainSeriesScaleRatioProperty(){return this._mainSeriesScaleRatioProperty}mainSeriesScaleRatioPropertyOnChanged(){this._mainSeriesScaleRatioProperty.listeners().fire(this._mainSeriesScaleRatioProperty)}mainSeriesScaleRatio(){return S(this._timeScale,this.m_mainSeries.priceScale())}setMainSeriesScaleRatio(e){this.paneForSource(this.m_mainSeries).applyPriceScaleRatio(this.m_mainSeries.priceScale(),e)}restoreFactoryDefaults(e){e.restoreFactoryDefaults(),this.recalcVisibleRangeStudies(!0)}orderedDataSources(e){var t=[];t.push(this.m_crossHairSource);for(var i=0;i0)}createStudyInserter(e){return new y(e,this._studiesMetaInfoRepository,{createStudy:this.insertStudyWithParams.bind(this)})}studyInserted(){return this._studyInserted}lineBeingEdited(){return this._lineBeingEdited}linePointBeingEdited(){return this._linePointBeingEdited}calculateDefaultTags(){for(var e=[],t=this.dataSources(),i=0;i-1&&this._modelIntervals.splice(t,1)}clearIntervals(){for(var e=0;ethis.removeSource(e))),Array.from(this._customSourcesMap.keys()).forEach(this._removeCustomSource,this),n(0===this._topmostCustomSources.length),n(0===this._fgCustomSources.length),n(0===this._bgCustomSources.length),n(0===this._allCustomSources.length),n(0===this._customSourcesMap.size);for(var e=0;e{"use strict";var s=i(95242).makeFont,r=i(95242).parseFont,n=i(98351).getLogger;const{drawPoly:o}=i(9740);var a=n("Model.ChartTradingUtils"),l={_fontHeightCache:{},_parsedColorCache:{},_parseColor:function(e){if(this._parsedColorCache[e])return this._parsedColorCache[e];var t=document.createElement("div");t.style.color=e;var i=t.style.color.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i)||t.style.color.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d*\.?\d+)\s*\)$/i),s={r:i[1],g:i[2],b:i[3],a:i[4]||"1"};return this._parsedColorCache[e]=s,s},getColorFromProperties:function(e,t){var i=1-t.value()/100,s=this._parseColor(e.value());return"rgba("+s.r+","+s.g+","+s.b+","+i+")"},setColorToProperties:function(e,t,i){var s=this._parseColor(e);t.setValue("rgb("+s.r+","+s.g+","+s.b+")");var r=100*(1-s.a);i.setValue(Math.max(0,Math.min(r,100)))},getFontFromProperties:function(e,t,i,r){return s(t.value(),e.value(),r.value()?"italic":"",i.value()?"bold":"")},setFontToProperties:function(e,t,i,s,n){var o=r(e);null!==o?(o.family.length>0&&t.setValue(o.family),i.setValue(o.size),s.setValue(o.bold),n.setValue(o.italic)):a.logError("Invalid font: "+e)},fontHeight:function(e){if(!this._fontHeightCache[e]){var t=document.createElement("span");t.appendChild(document.createTextNode("height")),document.body.appendChild(t),t.style.cssText="font: "+e+"; white-space: nowrap; display: inline;";var i=t.offsetHeight;document.body.removeChild(t),this._fontHeightCache[e]=Math.ceil(i)}return this._fontHeightCache[e]},drawPolyHoverOrPress:function(e,t,i,s){s?(e.save(),e.fillStyle="rgba(0, 0, 0, 0.15)",o(e,t,!0),e.restore()):i&&(e.save(),e.fillStyle="rgba(0, 0, 0, 0.1)",o(e,t,!0),e.restore())},repaint:function(e){e.lightUpdate()},roundToMinTick:function(e,t){var i=1/e.mainSource().base();return i*Math.round(t/i)}};e.exports=l}, -53575:(e,t,i)=>{"use strict";var s=i(47539).TranslatedString,r=i(70439).doAnimate,n=i(94533).ChartUndoModelBase,o=(i(7711).saveDefaultProperties,i(71733).UndoCommand,i(24557).ApplyLineToolTemplateUndoCommand),a=i(89786).SetPriceScaleSelectionStrategyCommand,l=i(30684).SetScaleRatioPropertiesCommand,c=i(51768).trackEvent,h=i(40320).RestoreDefaultsPreferencesUndoCommand,d=i(5440).SetPriceScaleModeCommand,u=i(8771).PriceScaleChangeUndoCommand,p=new s("move left",i(44352).t(null,void 0,i(15086))),_=new s("move right",i(44352).t(null,void 0,i(61711))),m=new s("toggle auto scale",i(44352).t(null,void 0,i(63060))),g=new s("toggle lock scale",i(44352).t(null,void 0,i(21203))),f=new s("toggle regular scale",i(44352).t(null,void 0,i(33714))),v=new s("toggle indexed to 100 scale",i(44352).t(null,void 0,i(98860))),S=new s("toggle percentage scale",i(44352).t(null,void 0,i(68642))),y=new s("toggle log scale",i(44352).t(null,void 0,i(60166))),b=new s("invert scale",i(44352).t(null,void 0,i(94245))),w=new s("remove pane",i(44352).t(null,void 0,i(47637))),C=(new s("apply all chart properties",i(44352).t(null,void 0,i(64034))),new s("set price scale selection strategy to {title}",i(44352).t(null,void 0,i(69485))));t.ChartUndoModel=class extends n{constructor(e,t,i,s,r,n,o,a,l,c,h){super(e,t,i,s,r,n,o,a,l,c,h),this.beginUndoMacro=(e,t)=>{var i=o.beginUndoMacro(e);return i.setCustomFlag("doesnt_affect_save",t),i},this.endUndoMacro=o.endUndoMacro.bind(o),this.createUndoCheckpoint=o.createUndoCheckpoint.bind(o),this.undoToCheckpoint=o.undoToCheckpoint.bind(o)}version(){return this.m_model.version()}createPane(e){return this.m_model.createPane(e)}restart(){this.m_model.restart()}disconnect(){this.m_model.disconnect()}studyVersioning(){return this.m_model.studyVersioning()}chartModel(){return this._model()}_model(){return this.m_model}pushUndoCommand(e){this._pushUndoCommand(e)}_pushUndoCommand(e){this._undoHistory.pushUndoCommand(e)}startScrollPrice(e,t,i){t.isAutoScale()||(this._initialPriceScrollState=t.state(),this._initialPriceScrollPos=i,this.chartModel().startScrollPrice(e,t,i))}scrollPriceTo(e,t,i){t.isAutoScale()||(this._initialPriceScrollPos&&Math.abs(this._initialPriceScrollPos-i)>20&&(this.pushUndoCommand(new u(this.m_model,e,t,this._initialPriceScrollState)),delete this._initialPriceScrollState,delete this._initialPriceScrollPos),this.chartModel().scrollPriceTo(e,t,i))}endScrollPrice(e,t){t.isAutoScale()||(delete this._initialPriceScrollState,delete this._initialPriceScrollPos,this.chartModel().endScrollPrice(e,t))}setPriceAutoScale(e,t,i){this.pushUndoCommand(new u(this.m_model,e,t,t.state())),this.chartModel().setPriceAutoScale(e,t,i)}setWidth(e){this.m_model.setWidth(e)}setPaneHeight(e,t){this.m_model.setPaneHeight(e,t)}gridSource(){return this.m_model.gridSource()}watermarkSource(){return this.m_model.watermarkSource()}publishedChartsTimelineSource(){return this.m_model.publishedChartsTimelineSource()}crossHairSource(){return this.m_model.crossHairSource()}model(){return this.m_model}chartWidget(){return this._chartWidget} -mainSeries(){return this.m_model.m_mainSeries}mainSeriesScaleRatioProperty(){return this.m_model.mainSeriesScaleRatioProperty()}timeScale(){return this.m_model.timeScale()}selectionMacro(e,t){return this.m_model.selectionMacro(e,t)}setHoveredSource(e,t){this.m_model.setHoveredSource(e,t)}selection(){return this.m_model.selection()}onSelectedSourceChanged(){return this.m_model.onSelectedSourceChanged()}activeStrategySource(){return this.m_model.activeStrategySource()}invalidate(e){this.m_model.invalidate(e)}setCurrentPosition(e,t,i,s){this.m_model.setCurrentPosition(e,t,i,s)}setAndSaveCurrentPosition(e,t,i,s){this.m_model.setAndSaveCurrentPosition(e,t,i,s)}setProperties(e,t,i){var s=this;this.beginUndoMacro(i),this.m_model.selectionMacro((function(){for(var r=0;r{"use strict";var s=i(47539).TranslatedString,r=i(70439).doAnimate,n=i(94533).ChartUndoModelBase,o=(i(7711).saveDefaultProperties,i(71733).UndoCommand,i(24557).ApplyLineToolTemplateUndoCommand),a=i(89786).SetPriceScaleSelectionStrategyCommand,l=i(30684).SetScaleRatioPropertiesCommand,c=i(51768).trackEvent,h=i(40320).RestoreDefaultsPreferencesUndoCommand,d=i(5440).SetPriceScaleModeCommand,u=i(8771).PriceScaleChangeUndoCommand,p=new s("move left",i(44352).t(null,void 0,i(15086))),_=new s("move right",i(44352).t(null,void 0,i(61711))),m=new s("toggle auto scale",i(44352).t(null,void 0,i(63060))),g=new s("toggle lock scale",i(44352).t(null,void 0,i(21203))),f=new s("toggle regular scale",i(44352).t(null,void 0,i(33714))),v=new s("toggle indexed to 100 scale",i(44352).t(null,void 0,i(98860))),S=new s("toggle percentage scale",i(44352).t(null,void 0,i(68642))),y=new s("toggle log scale",i(44352).t(null,void 0,i(60166))),b=new s("invert scale",i(44352).t(null,void 0,i(94245))),w=new s("remove pane",i(44352).t(null,void 0,i(47637))),P=(new s("apply all chart properties",i(44352).t(null,void 0,i(64034))),new s("set price scale selection strategy to {title}",i(44352).t(null,void 0,i(69485))));t.ChartUndoModel=class extends n{constructor(e,t,i,s,r,n,o,a,l,c,h){super(e,t,i,s,r,n,o,a,l,c,h),this.beginUndoMacro=(e,t)=>{var i=o.beginUndoMacro(e);return i.setCustomFlag("doesnt_affect_save",t),i},this.endUndoMacro=o.endUndoMacro.bind(o),this.createUndoCheckpoint=o.createUndoCheckpoint.bind(o),this.undoToCheckpoint=o.undoToCheckpoint.bind(o)}version(){return this.m_model.version()}createPane(e){return this.m_model.createPane(e)}restart(){this.m_model.restart()}disconnect(){this.m_model.disconnect()}studyVersioning(){return this.m_model.studyVersioning()}chartModel(){return this._model()}_model(){return this.m_model}pushUndoCommand(e){this._pushUndoCommand(e)}_pushUndoCommand(e){this._undoHistory.pushUndoCommand(e)}startScrollPrice(e,t,i){t.isAutoScale()||(this._initialPriceScrollState=t.state(),this._initialPriceScrollPos=i,this.chartModel().startScrollPrice(e,t,i))}scrollPriceTo(e,t,i){t.isAutoScale()||(this._initialPriceScrollPos&&Math.abs(this._initialPriceScrollPos-i)>20&&(this.pushUndoCommand(new u(this.m_model,e,t,this._initialPriceScrollState)),delete this._initialPriceScrollState,delete this._initialPriceScrollPos),this.chartModel().scrollPriceTo(e,t,i))}endScrollPrice(e,t){t.isAutoScale()||(delete this._initialPriceScrollState,delete this._initialPriceScrollPos,this.chartModel().endScrollPrice(e,t))}setPriceAutoScale(e,t,i){this.pushUndoCommand(new u(this.m_model,e,t,t.state())),this.chartModel().setPriceAutoScale(e,t,i)}setWidth(e){this.m_model.setWidth(e)}setPaneHeight(e,t){this.m_model.setPaneHeight(e,t)}gridSource(){return this.m_model.gridSource()}watermarkSource(){return this.m_model.watermarkSource()}publishedChartsTimelineSource(){return this.m_model.publishedChartsTimelineSource()}crossHairSource(){return this.m_model.crossHairSource()}model(){return this.m_model}chartWidget(){return this._chartWidget} +mainSeries(){return this.m_model.m_mainSeries}mainSeriesScaleRatioProperty(){return this.m_model.mainSeriesScaleRatioProperty()}timeScale(){return this.m_model.timeScale()}selectionMacro(e,t){return this.m_model.selectionMacro(e,t)}setHoveredSource(e,t){this.m_model.setHoveredSource(e,t)}selection(){return this.m_model.selection()}onSelectedSourceChanged(){return this.m_model.onSelectedSourceChanged()}activeStrategySource(){return this.m_model.activeStrategySource()}invalidate(e){this.m_model.invalidate(e)}setCurrentPosition(e,t,i,s){this.m_model.setCurrentPosition(e,t,i,s)}setAndSaveCurrentPosition(e,t,i,s){this.m_model.setAndSaveCurrentPosition(e,t,i,s)}setProperties(e,t,i){var s=this;this.beginUndoMacro(i),this.m_model.selectionMacro((function(){for(var r=0;r{"use strict";var s;i.d(t,{ColorType:()=>s}),function(e){e.Solid="solid",e.Gradient="gradient"}(s||(s={}))},35624:(e,t,i)=>{"use strict";i.d(t,{currencyUnitVisibilityProperty:()=>o,currencyUnitVisibilityOptions:()=>a,migrateShowCurrencyAndShowUnitProperties:()=>c,restoreCurrencyUnitVisibilitySettingsValue:()=>h});var s=i(84803),r=i(56840),n=i.n(r);const{property:o,availableValues:a}=(0,s.createVisibilityController)("PriceAxisCurrencyAndUnit.visibility");let l=!1;function c(e,t){l||(l=!0,void 0===n().getValue("PriceAxisCurrencyAndUnit.visibility")&&o().setValue(e||t?"alwaysOn":"alwaysOff"))}function h(){o().setValue("visibleOnMouseOver"),n().remove("PriceAxisCurrencyAndUnit.visibility")}},72006:(e,t,i)=>{"use strict";i.d(t,{sourceNewCurrencyOnPinningToPriceScale:()=>r});var s=i(21580);function r(e,t,i,r){let n=null;if(i.currencyConversionEnabled()&&(0,s.isActingAsSymbolSource)(e)){const s=i.availableCurrencies(),o=t.currency(s),a=e.currency();null!==o&&null!==o.selectedCurrency&&!o.allCurrenciesAreOriginal&&o.selectedCurrency!==a&&(r&&null===a||null!==a&&s.convertible(a))&&(n=o.selectedCurrency)}return n}},1288:(e,t,i)=>{"use strict";i.d(t,{CustomSourceBase:()=>s});class s{constructor(e,t){this._id=e,this._model=t}id(){return this._id}isHoveredEnabled(){return!0}isSelectionEnabled(){return!1}priceScale(){return null}paneViews(e){return[]}labelPaneViews(e){return[]}priceAxisViews(e,t){return[]}updateViewsForPane(e,t){e.containsMainSeries()&&this.updateAllViews(t)}}},40962:(e,t,i)=>{"use strict";i.d(t,{CustomTimezones:()=>_});var s=i(50151),r=i(32769),n=i(20364),o=i(2542);const a=/^Etc\/GMT([+-])(\d{1,2}):?(\d\d)?$/,l=new Map;function c(e){if(l.has(e))return l.get(e);const t=a.test(e);return l.set(e,t),t}const h=new Map;function d(e){if(h.has(e))return h.get(e);const t=function(e){const t=e.match(a);if(!t)return 0;const i="+"===t[1]?-1:1;return 60*(60*parseInt(t[2],10)+parseInt(t[3]||"0",10))*i}(e),i={time:[1924992e3+t],offset:[t]};return h.set(e,i),i}let u=null;const p=new Map;class _{ constructor(){this._customTimezones=new Map}addTimezones(e){e.forEach((e=>{const{id:t,...i}=e;this._addTimezone(t,i)})),this.updateChartTimezones()}listTimezoneIds(){return[...this._customTimezones.keys()]}listTimezones(){return[...this._customTimezones.entries()].map((([e,t])=>({id:e,...t})))}getTimezoneInfo(e){if(!this.timezoneIsAvailable(e))throw new Error("Provided timezone alias is not within the list of supported timezones.");return(0,s.ensure)(this._customTimezones.get(e))}getAllTimezoneInfo(){return this.listTimezones()}getAliasTimezone(e){return this.getTimezoneInfo(e).alias}timezoneIsAvailable(e){return this._customTimezones.has(e)}updateChartTimezones(){(0,n.updateAvailableTimezones)(this.getAllTimezoneInfo())}getTimezoneData(e){if(p.has(e))return p.get(e);let t=null;if(c(e))t=d(e);else if(this.timezoneIsAvailable(e)){const i=this.getAliasTimezone(e);o.tzData[i]&&(t=o.tzData[i]),!t&&c(i)&&(t=d(i))}return t&&p.set(e,t),t}static instance(){return null===u&&(u=new _),u}_addTimezone(e,t){try{if((0,s.ensure)(e,"Custom timezone ID"),(0,s.ensure)(t.alias,"Custom timezone alias"),(0,s.ensure)(t.title,"Custom timezone title"),(0,n.timezoneIsAvailable)(e)&&!this.timezoneIsAvailable(e))throw new Error("Custom timezone id already exists.");if(!(0,n.timezoneIsSupported)(t.alias)&&!c(t.alias))throw new Error("Custom timezone alias is not a supported timezone.");if(e.length<1)throw new Error("Custom timezone id is empty");if(t.title.length<1)throw new Error("Custom timezone title is empty");this._customTimezones.set(e,t)}catch(e){console.warn(`Unable to add custom timezone. ${e}`)}}}(0,r.setCustomTimezones)(_)},62472:(e,t,i)=>{"use strict";i.d(t,{isMainSeriesState:()=>r,isStudyState:()=>n,isLineToolState:()=>o,isStudyLineToolState:()=>a});var s=i(6250);function r(e){return"MainSeries"===e.type}function n(e){return Boolean(e.type)&&e.type.toLowerCase().startsWith("study")}function o(e){return Boolean(e.type)&&(0,s.isLineToolName)(e.type)}function a(e){return Boolean(e.type)&&(0,s.isStudyLineToolName)(e.type)}},80230:(e,t,i)=>{"use strict";i.d(t,{DataSource:()=>l});i(2484);var s=i(40549),r=i.n(s),n=i(68671),o=i(26867),a=i.n(o);class l{constructor(e){this.hasAlert=new(r())(!1),this._zorder=0,this.m_priceScale=null,this._ownerSource=null,this._userEditEnabled=!0,this._onPriceScaleChanged=new(a()),this._isSelectionEnabled=!0,this._instanceId=(0,n.randomHashN)(6),this._ownerSourceChanged=new(a()),this._zOrderChanged=new(a()),this._id=null!=e?e:(0,n.randomHashN)(6)}id(){return this._id}instanceId(){return this._instanceId}preferNoScale(){return!1}setId(e){this._id=e}zorder(){return this._zorder}setZorder(e){"number"==typeof e&&this._zorder!==e&&(this._zorder=e,this._zOrderChanged.fire(e))}isSpeciallyZOrderedSource(){return!1}title(){throw new Error("Implement this fun in a subclass")}name(){throw new Error("Implement this fun in a subclass")}priceScale(){return this.m_priceScale}setPriceScale(e){this.m_priceScale=e,this._onPriceScaleChanged.fire()}ownerSource(){return this._ownerSource}setOwnerSource(e){ const t=this._ownerSource;this._ownerSource=e,this._ownerSourceChanged.fire(t,e)}ownerSourceChanged(){return this._ownerSourceChanged}zOrderChanged(){return this._zOrderChanged}isSavedInChart(e){return!0}isSavedInStudyTemplates(){return!0}isRemovedByStudyTemplates(){return!0}hasContextMenu(){return!0}showInObjectTree(){return!0}setUserEditEnabled(e){this._userEditEnabled=e}userEditEnabled(){return this._userEditEnabled}canBeHidden(){return this.userEditEnabled()}isUserDeletable(){return this.userEditEnabled()}properties(){throw new Error("Implement this fun in a subclass")}isVisible(){return this.properties().visible.value()}dataWindowView(){return null}priceAxisViews(e,t){return null}timeAxisViews(){return null}updateAllViews(e){}paneViews(e){return null}labelPaneViews(){return null}isFailed(){return!1}isLoading(){return!1}isPhantom(){return!1}isChildStudy(){return!1}hasChildren(){return!1}canHaveChildren(){return!1}onClickOutside(e){}getSourceIcon(){return null}state(e){throw new Error("Implement this fun in a subclass")}onPriceScaleChanged(){return this._onPriceScaleChanged}doesMovingAffectsUndo(){return!0}isMultiPaneAvailable(){return!1}isMultiPaneEnabled(){return!1}copiable(){return!1}cloneable(){return!1}movable(){return!1}isIncludedInAutoScale(){return!1}isHoveredEnabled(){return this.isSelectionEnabled()}showOnTopOnHovering(){return!0}isSelectionEnabled(){return this._isSelectionEnabled}setSelectionEnabled(e){this._isSelectionEnabled=e}firstValue(){return null}priceRange(e,t){return null}autoScaleInfo(e,t){return{range:this.priceRange(e,t)}}stateForAlert(){return null}canHasAlert(){return!1}alertCreationAvailable(){return new(r())(this.hasStateForAlert()).readonly()}hasStateForAlert(){return!1}idForAlert(){return this._id}}},95790:(e,t,i)=>{"use strict";i.d(t,{DataWindowItem:()=>s,DataWindowView:()=>r});class s{constructor(e,t,i,s=!1){this._visible=!0,this._id=e,this._title=t,this._value=i,this._unimportant=s}id(){return this._id}title(){return this._title}setTitle(e){this._title=e}text(){return this._value}value(){return this._value}setValue(e){this._value=e}visible(){return this._visible}setVisible(e){this._visible=e}color(){return this._color}setColor(e){this._color=e}unimportant(){return this._unimportant}}class r{constructor(){this._items=[],this._header="",this._title=""}header(){return this._header}title(){return this._title}items(){return this._items}update(){}}},55262:(e,t,i)=>{"use strict";i.d(t,{dateFormatProperty:()=>l,restoreDateFormatSettingsValue:()=>c});var s=i(56840),r=i(60923),n=i(54808);const o="date_format";function a(){return s.getValue(o,(0,n.defaultDateFormat)())}const l=(0,r.createPrimitiveProperty)(a());function c(){l.setValue((0,n.defaultDateFormat)()),s.remove(o)}s.onSync.subscribe(null,(()=>l.setValue(a()))),l.subscribe(null,(()=>s.setValue(o,l.value())))},7711:(e,t,i)=>{"use strict";i.r(t),i.d(t,{createDefaultsState:()=>u,saveDefaultProperties:()=>_,DefaultProperty:()=>m});var s=i(27788),r=i(58121),n=i(15736),o=i(64548),a=i(26220),l=i.n(a),c=i(26867),h=i.n(c);function d(e,t){ -const i=(0,s.default)(e);return t.forEach((e=>(0,n.default)(i,e.split(".")))),i}function u(e,t,i,n){const a=e?o.defaults:o.factoryDefaults,l=t.startsWith("study_")?(0,s.default)(a("study")):{};let c=(0,s.default)(a(t,n));return t.startsWith("study_")&&c.inputs&&delete c.inputs.symbol,"linetoolicon"===t&&e&&(c.icon=(0,o.defaults)(t).icon),"linetooemoji"===t&&e&&(c.emoji=(0,o.defaults)(t).emoji),c=d(c,i),(0,r.default)(l,c),l}let p=!1;function _(e){p=e}class m extends(l()){constructor(e,t,i,s){super(function(e,t,i,s){let n;return void 0===s&&(s=!0),i?n=t:(n=u(s,e,[],null),t&&(0,r.default)(n,t)),n}(e,t,i,s)),this._exclusions=[],this._restoreFactoryDefaultsEvent=new(h()),this._defaultName=e,this._useUserPreferences=null==s||s,this.listeners().subscribe(this,m.prototype.onPropertyChanged),this._restoreFactoryDefaultsEvent=new(h())}preferences(){return this.state(this._exclusions)}mergePreferences(e){this.mergeAndFire(d(e,this._exclusions))}addExclusion(e){this._exclusions.indexOf(e)<0&&this._exclusions.push(e)}removeExclusion(e){const t=this._exclusions.indexOf(e);-1!==t&&this._exclusions.splice(t,1)}restoreFactoryDefaults(){const e=u(!1,this._defaultName,this._exclusions,null);this.mergeAndFire(e),this._defaultName.startsWith("study_")&&!this._defaultName.startsWith("study_VbPFixed")||(0,o.saveDefaults)(this._defaultName,void 0),this._restoreFactoryDefaultsEvent.fire()}onRestoreFactoryDefaults(){return this._restoreFactoryDefaultsEvent}onPropertyChanged(){!p||this._defaultName.startsWith("study_")&&!this._defaultName.startsWith("study_VbPFixed")||this.saveDefaults()}saveDefaults(){this._useUserPreferences&&(0,o.saveDefaults)(this._defaultName,this.preferences())}clone(e){const t=new m(this._defaultName,this.state(),null==e?void 0:e.replaceByState,this._useUserPreferences);for(let e=0;e{"use strict";var s=i(8169).PlDisplay;const{getHexColorByName:r}=i(7394),{generateColor:n}=i(38031);var o=i(8169).TradedGroupHorizontalAlignment,a=i(77906),l=i(23680).LineToolPitchforkStyle,c=i(57693).LineToolBarsPatternMode,h=i(83421),d=h.LineStudyPlotStyle,u=h.STUDYPLOTDISPLAYTARGET,p=i(94030),_=i(99846).PriceAxisLastValueMode,m=i(67052).StoriesTimeLineItemType,g=i(64810).MagnetMode,f=i(85113).LineEnd,v=i(4978).ColorType,S=i(41481).StatsPosition,y=i(22600).sessionsPreferencesDefault,b=i(5049).axisLabelBackgroundColor;const{LINESTYLE_SOLID:w,LINESTYLE_DOTTED:C,LINESTYLE_DASHED:P}=i(53479);var T=i(98351).getLogger("Chart.Defaults") -;const x=r("color-black"),I=r("color-white"),M=n(I,75),A=r("color-tv-blue-50"),L=r("color-tv-blue-500"),k=n(L,30),E=n(L,70),D=n(L,72),V=n(L,75),B=n(L,80),R=r("color-tv-blue-600"),N=r("color-deep-blue-200"),O=r("color-deep-blue-300"),F=r("color-deep-blue-500"),W=n(F,80),H=r("color-sky-blue-500"),z=n(H,80),U=r("color-sky-blue-700"),j=n(U,30),G=r("color-youtube"),q=r("color-ripe-red-200"),$=r("color-ripe-red-300"),Y=r("color-ripe-red-400"),K=r("color-ripe-red-500"),X=n(K,70),Z=n(K,80),J=n(K,72),Q=n(K,95),ee=r("color-ripe-red-600"),te=r("color-grapes-purple-500"),ie=n(te,100),se=n(te,80),re=n(te,30),ne=r("color-berry-pink-500"),oe=n(ne,80),ae=r("color-minty-green-100"),le=r("color-minty-green-500"),ce=n(le,80),he=n(le,72),de=n(le,95),ue=r("color-iguana-green-300"),pe=r("color-iguana-green-500"),_e=n(pe,80),me=r("color-tan-orange-300"),ge=r("color-tan-orange-500"),fe=n(ge,80),ve=r("color-tan-orange-600"),Se=r("color-tan-orange-700"),ye=r("color-cold-gray-150"),be=r("color-cold-gray-300"),we=r("color-cold-gray-400"),Ce=r("color-cold-gray-500"),Pe=r("color-cold-gray-800"),Te=n(Pe,94),xe=n(Pe,100),Ie=r("color-cold-gray-900"),Me=r("color-cold-gray-750"),Ae=r("color-slate-gray"),Le=r("color-silver-tree"),ke=n(Le,95),Ee=r("color-mandy"),De=n(Ee,95);var Ve=function(e){var t=function(e,t){return{color:e,visible:t}},i=function(e,t,i){return{coeff:e,color:t,visible:i}},r=function(e,t,i,s,r){return{coeff:e,color:t,visible:i,linestyle:void 0===s?w:s,linewidth:void 0===r?1:r}},h=function(e,t,i){return{color:e,width:i,visible:t}},T=function(e,t,i,s,r){return{color:e,visible:t,width:i,x:s,y:r}},Pe=function(e,t,i,s,r,n){return{coeff1:e,coeff2:t,color:i,visible:s,linestyle:void 0===r?w:r,linewidth:void 0===n?1:n}};if(void 0===TradingView.defaultProperties){var Ve;switch(window.locale){case"ar_AE":Ve="Asia/Dubai";break;case"au":Ve="Australia/Sydney";break;case"br":Ve="America/Sao_Paulo";break;case"ca":Ve="America/Toronto";break;case"de_DE":case"it":Ve="Europe/Berlin";break;case"es":Ve="Europe/Madrid";break;case"fa_IR":Ve="Asia/Tehran";break;case"fr":case"sv_SE":Ve="Europe/Paris";break;case"he_IL":case"tr":Ve="Europe/Athens";break;case"hu_HU":case"pl":Ve="Europe/Warsaw";break;case"id":case"th_TH":case"vi_VN":Ve="Asia/Bangkok";break;case"in":Ve="Asia/Kolkata";break;case"ja":case"kr":Ve="Asia/Tokyo";break;case"ms_MY":Ve="Asia/Singapore";break;case"ru":Ve="Europe/Moscow";break;case"uk":Ve="Europe/London";break;case"zh_CN":case"zh_TW":Ve="Asia/Shanghai";break;default:Ve="Etc/UTC"}TradingView.defaultProperties={chartproperties:{timezone:Ve,priceScaleSelectionStrategyName:"auto",paneProperties:{backgroundType:v.Solid,background:I,backgroundGradientStartColor:I,backgroundGradientEndColor:I,vertGridProperties:{color:Te,style:w},horzGridProperties:{color:Te,style:w},crossHairProperties:{color:we,style:P,transparency:0,width:1},topMargin:10,bottomMargin:8,axisProperties:{autoScale:!0,autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,indexedTo100:!1,log:!1,logDisabled:!1,alignLabels:!0,isInverted:!1},legendProperties:{ -showStudyArguments:!0,showStudyTitles:!0,showStudyValues:!0,showSeriesTitle:!0,showSeriesOHLC:!0,showLegend:!0,showBarChange:!0,showVolume:!1,showBackground:!0,backgroundTransparency:50},separatorColor:ye},scalesProperties:{backgroundColor:I,lineColor:xe,textColor:Ie,fontSize:12,scaleSeriesOnly:!1,showSeriesLastValue:!0,seriesLastValueMode:_.LastValueAccordingToScale,showSeriesPrevCloseValue:!1,showStudyLastValue:!0,showSymbolLabels:!1,showStudyPlotLabels:!1,showBidAskLabels:!1,showPrePostMarketPriceLabel:!0,showFundamentalNameLabel:!1,showFundamentalLastValue:!0,barSpacing:p.DEFAULT_BAR_SPACING,axisHighlightColor:V,axisLineToolLabelBackgroundColorCommon:b.common,axisLineToolLabelBackgroundColorActive:b.active,showPriceScaleCrosshairLabel:!0,showTimeScaleCrosshairLabel:!0,crosshairLabelBgColorLight:Ie,crosshairLabelBgColorDark:Me},mainSeriesProperties:{style:a.STYLE_CANDLES,esdShowDividends:!0,esdShowSplits:!0,esdShowEarnings:!0,esdShowBreaks:!1,esdFlagSize:2,showContinuousContractSwitches:!0,showContinuousContractSwitchesBreaks:!1,showFuturesContractExpiration:!0,showLastNews:!0,showCountdown:!0,bidAsk:{visible:!1,lineStyle:C,lineWidth:1,bidLineColor:L,askLineColor:Y},prePostMarket:{visible:!0,lineStyle:C,lineWidth:1,preMarketColor:ve,postMarketColor:L},highLowAvgPrice:{highLowPriceLinesVisible:!1,highLowPriceLabelsVisible:!1,averageClosePriceLineVisible:!1,averageClosePriceLabelVisible:!1,highLowPriceLinesColor:"",highLowPriceLinesWidth:1,averagePriceLineColor:"",averagePriceLineWidth:1},visible:!0,showPriceLine:!0,priceLineWidth:1,priceLineColor:"",baseLineColor:be,showPrevClosePriceLine:!1,prevClosePriceLineWidth:1,prevClosePriceLineColor:"#555555",minTick:"default",dividendsAdjustment:void 0,backAdjustment:!1,settlementAsClose:!0,sessionId:"regular",sessVis:!1,statusViewStyle:{fontSize:16,showExchange:!0,showInterval:!0,symbolTextSource:"description"},candleStyle:{upColor:le,downColor:K,drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:le,borderDownColor:K,wickColor:"#737375",wickUpColor:le,wickDownColor:K,barColorsOnPrevClose:!1,drawBody:!0},hollowCandleStyle:{upColor:le,downColor:K,drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:le,borderDownColor:K,wickColor:"#737375",wickUpColor:le,wickDownColor:K,drawBody:!0},haStyle:{upColor:le,downColor:K,drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:le,borderDownColor:K,wickColor:"#737375",wickUpColor:le,wickDownColor:K,showRealLastPrice:!1,barColorsOnPrevClose:!1,inputs:{},inputInfo:{},drawBody:!0},barStyle:{upColor:le,downColor:K,barColorsOnPrevClose:!1,dontDrawOpen:!1,thinBars:!0},hiloStyle:{color:L,showBorders:!0,borderColor:L,showLabels:!0,labelColor:L,drawBody:!0},columnStyle:{upColor:n(le,50),downColor:n(K,50),barColorsOnPrevClose:!0,priceSource:"close"},lineStyle:{color:L,linestyle:w,linewidth:2,priceSource:"close",styleType:a.STYLE_LINE_TYPE_SIMPLE},areaStyle:{color1:D,color2:L,linecolor:L,linestyle:w,linewidth:2,priceSource:"close",transparency:100},priceAxisProperties:{autoScale:!0,autoScaleDisabled:!1,lockScale:!1, -percentage:!1,percentageDisabled:!1,indexedTo100:!1,log:!1,logDisabled:!1,isInverted:!1,alignLabels:!0},renkoStyle:{upColor:le,downColor:K,borderUpColor:le,borderDownColor:K,upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae",borderUpColorProjection:"#a9dcc3",borderDownColorProjection:"#f5a6ae",wickUpColor:le,wickDownColor:K,inputs:{source:"close",sources:"Close",boxSize:3,style:"ATR",atrLength:14,wicks:!0},inputInfo:{source:{name:"Source"},sources:{name:"Source"},boxSize:{name:"Box size"},style:{name:"Style"},atrLength:{name:"ATR length"},wicks:{name:"Wicks"}}},pbStyle:{upColor:le,downColor:K,borderUpColor:le,borderDownColor:K,upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae",borderUpColorProjection:"#a9dcc3",borderDownColorProjection:"#f5a6ae",inputs:{source:"close",lb:3},inputInfo:{source:{name:"Source"},lb:{name:"Number of line"}}},kagiStyle:{upColor:le,downColor:K,upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae",inputs:{source:"close",style:"ATR",atrLength:14,reversalAmount:1},inputInfo:{source:{name:"Source"},style:{name:"Style"},atrLength:{name:"ATR length"},reversalAmount:{name:"Reversal amount"}}},pnfStyle:{upColor:le,downColor:K,upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae",inputs:{sources:"Close",reversalAmount:3,boxSize:1,style:"ATR",atrLength:14,oneStepBackBuilding:!1},inputInfo:{sources:{name:"Source"},boxSize:{name:"Box size"},reversalAmount:{name:"Reversal amount"},style:{name:"Style"},atrLength:{name:"ATR length"},oneStepBackBuilding:{name:"One step back building"}}},baselineStyle:{baselineColor:Ae,topFillColor1:he,topFillColor2:de,bottomFillColor1:Q,bottomFillColor2:J,topLineColor:le,bottomLineColor:K,topLineWidth:2,bottomLineWidth:2,priceSource:"close",transparency:50,baseLevelPercentage:50},rangeStyle:{upColor:le,downColor:K,thinBars:!0,upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae",inputs:{range:10,phantomBars:!1},inputInfo:{range:{name:"Range"},phantomBars:{name:"Phantom bars"}}}},chartEventsSourceProperties:{visible:!0,futureOnly:!0,breaks:{color:"#555555",visible:!1,style:P,width:1}},tradingProperties:{showPositions:!0,positionPL:{visibility:!0,display:s.Money},bracketsPL:{visibility:!0,display:s.Money},showOrders:!0,showExecutions:!0,showExecutionsLabels:!1,showReverse:!0,horizontalAlignment:o.Right,extendLeft:!0,lineLength:5,lineWidth:1,lineStyle:w},editorFontsList:["Verdana","Courier New","Times New Roman","Arial"],volumePaneSize:"large"},sessions:y,drawings:{magnet:!1,magnetMode:g.WeakMagnet,stayInDrawingMode:!1,drawOnAllCharts:!0,drawOnAllChartsMode:1},linetoolorder:{extendLeft:"inherit",lineLength:"inherit",lineColor:G,lineActiveBuyColor:"#4094e8",lineInactiveBuyColor:"rgba(64, 148, 232, 0.5)",lineActiveSellColor:"#e75656",lineInactiveSellColor:"rgba(231, 86, 86, 0.5)",lineStyle:"inherit",lineWidth:"inherit",bodyBorderActiveBuyColor:"#4094e8",bodyBorderInactiveBuyColor:"rgba(64, 148, 232, 0.5)",bodyBorderActiveSellColor:"#e75656",bodyBorderInactiveSellColor:"rgba(231, 86, 86, 0.5)",bodyBackgroundColor:M,bodyBackgroundTransparency:25, -bodyTextInactiveLimitColor:"rgba(38, 140, 2, 0.5)",bodyTextActiveLimitColor:"#268c02",bodyTextInactiveStopColor:"rgba(231, 86, 86, 0.5)",bodyTextActiveStopColor:"#e75656",bodyTextInactiveBuyColor:"rgba(64, 148, 232, 0.5)",bodyTextActiveBuyColor:"#4094e8",bodyTextInactiveSellColor:"rgba(231, 86, 86, 0.5)",bodyTextActiveSellColor:"#e75656",bodyFontFamily:"Verdana",bodyFontSize:9,bodyFontBold:!0,bodyFontItalic:!1,quantityBorderActiveBuyColor:"#4094e8",quantityBorderInactiveBuyColor:"rgba(64, 148, 232, 0.5)",quantityBorderActiveSellColor:"#e75656",quantityBorderInactiveSellColor:"rgba(231, 86, 86, 0.5)",quantityBackgroundInactiveBuyColor:"rgba(64, 148, 232, 0.5)",quantityBackgroundActiveBuyColor:"#4094e8",quantityBackgroundInactiveSellColor:"rgba(231, 86, 86, 0.5)",quantityBackgroundActiveSellColor:"#e75656",quantityTextColor:I,quantityTextTransparency:0,quantityFontFamily:"Verdana",quantityFontSize:9,quantityFontBold:!0,quantityFontItalic:!1,cancelButtonBorderActiveBuyColor:"#4094e8",cancelButtonBorderInactiveBuyColor:"rgba(64, 148, 232, 0.5)",cancelButtonBorderActiveSellColor:"#e75656",cancelButtonBorderInactiveSellColor:"rgba(231, 86, 86, 0.5)",cancelButtonBackgroundColor:M,cancelButtonBackgroundTransparency:25,cancelButtonIconActiveBuyColor:"#4094e8",cancelButtonIconInactiveBuyColor:"rgba(64, 148, 232, 0.5)",cancelButtonIconActiveSellColor:"#e75656",cancelButtonIconInactiveSellColor:"rgba(231, 86, 86, 0.5)",tooltip:"",modifyTooltip:"",cancelTooltip:""},linetoolposition:{extendLeft:"inherit",lineLength:"inherit",lineBuyColor:"#4094e8",lineSellColor:"#e75656",lineStyle:"inherit",lineWidth:"inherit",bodyBorderBuyColor:"#4094e8",bodyBorderSellColor:"#e75656",bodyBackgroundColor:M,bodyBackgroundTransparency:25,bodyTextPositiveColor:"#268c02",bodyTextNeutralColor:"#646464",bodyTextNegativeColor:"#e75656",bodyFontFamily:"Verdana",bodyFontSize:9,bodyFontBold:!0,bodyFontItalic:!1,quantityBorderBuyColor:"#4094e8",quantityBorderSellColor:"#e75656",quantityBackgroundBuyColor:"#4094e8",quantityBackgroundSellColor:"#e75656",quantityTextColor:I,quantityTextTransparency:0,quantityFontFamily:"Verdana",quantityFontSize:9,quantityFontBold:!0,quantityFontItalic:!1,reverseButtonBorderBuyColor:"#4094e8",reverseButtonBorderSellColor:"#e75656",reverseButtonBackgroundColor:M,reverseButtonBackgroundTransparency:25,reverseButtonIconBuyColor:"#4094e8",reverseButtonIconSellColor:"#e75656",closeButtonBorderBuyColor:"#4094e8",closeButtonBorderSellColor:"#e75656",closeButtonBackgroundColor:M,closeButtonBackgroundTransparency:25,closeButtonIconBuyColor:"#4094e8",closeButtonIconSellColor:"#e75656",tooltip:"",protectTooltip:"",closeTooltip:"",reverseTooltip:""},linetoolexecution:{direction:"buy",arrowHeight:8,arrowSpacing:1,arrowBuyColor:"#4094e8",arrowSellColor:"#e75656",text:"",textColor:x,textTransparency:0,fontFamily:"Verdana",fontSize:10,fontBold:!1,fontItalic:!1,tooltip:""},linetoolicon:{color:L,size:40,icon:61720,angle:.5*Math.PI},linetoolemoji:{size:40,emoji:"😀",angle:.5*Math.PI},linetoolimage:{transparency:0,cssWidth:0,cssHeight:0,angle:0}, -linetoolbezierquadro:{linecolor:L,linewidth:1,fillBackground:!1,backgroundColor:B,transparency:50,linestyle:w,extendLeft:!1,extendRight:!1,leftEnd:f.Normal,rightEnd:f.Normal},linetoolbeziercubic:{linecolor:F,linewidth:1,fillBackground:!1,backgroundColor:W,transparency:80,linestyle:w,extendLeft:!1,extendRight:!1,leftEnd:f.Normal,rightEnd:f.Normal},linetooltrendline:{linecolor:L,linewidth:2,linestyle:w,extendLeft:!1,extendRight:!1,leftEnd:f.Normal,rightEnd:f.Normal,showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:L,fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceLabels:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:S.Right},linetoolinfoline:{linecolor:L,linewidth:2,linestyle:w,extendLeft:!1,extendRight:!1,leftEnd:f.Normal,rightEnd:f.Normal,showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:L,fontsize:14,bold:!1,italic:!1,alwaysShowStats:!0,showMiddlePoint:!1,showPriceLabels:!1,showPriceRange:!0,showBarsRange:!0,showDateTimeRange:!0,showDistance:!0,showAngle:!0,statsPosition:S.Center},linetooltimecycles:{linecolor:"#159980",linewidth:1,fillBackground:!0,backgroundColor:"rgba(106, 168, 79, 0.5)",transparency:50,linestyle:w},linetoolsineline:{linecolor:"#159980",linewidth:1,linestyle:w},linetooltrendangle:{linecolor:L,linewidth:2,linestyle:w,textcolor:L,fontsize:12,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceLabels:!1,showPriceRange:!1,showBarsRange:!1,extendRight:!1,extendLeft:!1,statsPosition:S.Right},linetooldisjointangle:{linecolor:le,linewidth:2,linestyle:w,fillBackground:!0,backgroundColor:ce,transparency:20,extendLeft:!1,extendRight:!1,leftEnd:f.Normal,rightEnd:f.Normal,textcolor:le,fontsize:12,bold:!1,italic:!1,showPrices:!1,showPriceRange:!1,showDateTimeRange:!1,showBarsRange:!1},linetoolflatbottom:{linecolor:ge,linewidth:2,linestyle:w,fillBackground:!0,backgroundColor:fe,transparency:20,extendLeft:!1,extendRight:!1,leftEnd:f.Normal,rightEnd:f.Normal,textcolor:ge,fontsize:12,bold:!1,italic:!1,showPrices:!1,showPriceRange:!1,showDateTimeRange:!1,showBarsRange:!1},linetoolfibspiral:{counterclockwise:!1,linecolor:H,linewidth:1,linestyle:w},linetoolriskrewardshort:{linecolor:Ce,linewidth:1,textcolor:I,fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"#585858",fillBackground:!0,stopBackground:Z,profitBackground:ce,stopBackgroundTransparency:80,profitBackgroundTransparency:80,drawBorder:!1,borderColor:"#667b8b",compact:!1,riskDisplayMode:"percents",accountSize:1e3,lotSize:1,risk:25,alwaysShowStats:!1,showPriceLabels:!0},linetoolriskrewardlong:{linecolor:Ce,linewidth:1,textcolor:I,fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"#585858",fillBackground:!0,stopBackground:Z,profitBackground:ce,stopBackgroundTransparency:80,profitBackgroundTransparency:80,drawBorder:!1,borderColor:"#667b8b",compact:!1,riskDisplayMode:"percents",accountSize:1e3,lotSize:1,risk:25,alwaysShowStats:!1,showPriceLabels:!0},linetoolarrow:{linecolor:L,linewidth:2,linestyle:w, -extendLeft:!1,extendRight:!1,leftEnd:f.Normal,rightEnd:f.Arrow,showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:L,fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceLabels:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:S.Right},linetoolray:{linecolor:L,linewidth:2,linestyle:w,extendLeft:!1,extendRight:!0,leftEnd:f.Normal,rightEnd:f.Normal,showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:L,fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceLabels:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:S.Right},linetoolextended:{linecolor:L,linewidth:2,linestyle:w,extendLeft:!0,extendRight:!0,leftEnd:f.Normal,rightEnd:f.Normal,showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:L,fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceLabels:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:S.Right},linetoolhorzline:{linecolor:L,linewidth:2,linestyle:w,showPrice:!0,showLabel:!1,textcolor:L,fontsize:12,bold:!1,italic:!1,horzLabelsAlign:"center",vertLabelsAlign:"top"},linetoolhorzray:{linecolor:L,linewidth:2,linestyle:w,showPrice:!0,showLabel:!1,textcolor:L,fontsize:12,bold:!1,italic:!1,horzLabelsAlign:"center",vertLabelsAlign:"top"},linetoolvertline:{linecolor:L,linewidth:2,linestyle:w,extendLine:!0,showTime:!0,showLabel:!1,horzLabelsAlign:"right",vertLabelsAlign:"top",textcolor:L,textOrientation:"vertical",fontsize:14,bold:!1,italic:!1},linetoolcrossline:{linecolor:L,linewidth:2,linestyle:w,showPrice:!0,showTime:!0},linetoolcirclelines:{trendline:{visible:!0,color:"#808080",linewidth:1,linestyle:P},linecolor:"#80ccdb",linewidth:1,linestyle:w},linetoolfibtimezone:{horzLabelsAlign:"right",vertLabelsAlign:"bottom",baselinecolor:"#808080",linecolor:"#0055db",linewidth:1,linestyle:w,showLabels:!0,fillBackground:!1,transparency:80,trendline:{visible:!0,color:"#808080",linewidth:1,linestyle:P},level1:r(0,Ce,!0),level2:r(1,L,!0),level3:r(2,L,!0),level4:r(3,L,!0),level5:r(5,L,!0),level6:r(8,L,!0),level7:r(13,L,!0),level8:r(21,L,!0),level9:r(34,L,!0),level10:r(55,L,!0),level11:r(89,L,!0)},linetooltext:{color:L,fontsize:14,fillBackground:!1,backgroundColor:"rgba(91, 133, 191, 0.3)",backgroundTransparency:70,drawBorder:!1,borderColor:"#667b8b",bold:!1,italic:!1,fixedSize:!0,wordWrap:!1,wordWrapWidth:200},linetooltextabsolute:{color:L,fontsize:14,fillBackground:!1,backgroundColor:"rgba(155, 190, 213, 0.3)",backgroundTransparency:70,drawBorder:!1,borderColor:"#667b8b",bold:!1,italic:!1,fixedSize:!1,wordWrap:!1,wordWrapWidth:200},linetoolballoon:{color:I,backgroundColor:re,borderColor:ie,fontsize:14,transparency:30},linetoolcomment:{color:I,backgroundColor:L,borderColor:L,fontsize:16,transparency:0},linetoolbrush:{linecolor:H,linewidth:1,linestyle:w,smooth:5,fillBackground:!1,backgroundColor:H,transparency:50,leftEnd:f.Normal,rightEnd:f.Normal -},linetoolhighlighter:{linecolor:Z,smooth:5,transparency:80},linetoolpolyline:{linecolor:H,linewidth:1,linestyle:w,fillBackground:!0,backgroundColor:z,transparency:80,filled:!1},linetoolsignpost:{itemType:m.Emoji,emoji:"🙂",showImage:!1,plateColor:L,fontSize:12,bold:!1,italic:!1},linetoolpath:{lineColor:L,lineWidth:2,lineStyle:w,leftEnd:f.Normal,rightEnd:f.Arrow},linetoolarrowmarkleft:{color:L,arrowColor:L,fontsize:14,bold:!1,italic:!1,showLabel:!0},linetoolarrowmarkup:{color:le,arrowColor:le,fontsize:14,bold:!1,italic:!1,showLabel:!0},linetoolarrowmarkright:{color:L,arrowColor:L,fontsize:14,bold:!1,italic:!1,showLabel:!0},linetoolarrowmarkdown:{color:ee,arrowColor:ee,fontsize:14,bold:!1,italic:!1,showLabel:!0},linetoolflagmark:{flagColor:L},linetoolnote:{markerColor:L,textColor:I,backgroundColor:k,backgroundTransparency:0,borderColor:L,fontSize:14,bold:!1,italic:!1,fixedSize:!0},linetoolnoteabsolute:{markerColor:L,textColor:I,backgroundColor:k,backgroundTransparency:0,borderColor:L,fontSize:14,bold:!1,italic:!1,fixedSize:!0},linetoolpricelabel:{color:I,backgroundColor:L,borderColor:L,fontWeight:"bold",fontsize:14,transparency:0},linetoolpricenote:{showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textColor:L,fontSize:14,bold:!1,italic:!1,lineColor:L,priceLabelBackgroundColor:L,priceLabelBorderColor:L,priceLabelTextColor:I,priceLabelFontSize:12,priceLabelBold:!1,priceLabelItalic:!1},linetoolarrowmarker:{backgroundColor:R,textColor:R,bold:!0,italic:!1,fontsize:16,showLabel:!0},linetoolrectangle:{color:te,fillBackground:!0,backgroundColor:se,linewidth:1,transparency:50,showLabel:!1,horzLabelsAlign:"left",vertLabelsAlign:"bottom",textColor:te,fontSize:14,bold:!1,italic:!1,extendLeft:!1,extendRight:!1},linetoolrotatedrectangle:{color:pe,fillBackground:!0,backgroundColor:_e,transparency:50,linewidth:1},linetoolcircle:{color:ge,backgroundColor:fe,fillBackground:!0,linewidth:1,showLabel:!1,textColor:ge,fontSize:14,bold:!1,italic:!1},linetoolellipse:{color:K,fillBackground:!0,backgroundColor:Z,transparency:50,linewidth:1,showLabel:!1,textColor:K,fontSize:14,bold:!1,italic:!1},linetoolarc:{color:ne,fillBackground:!0,backgroundColor:oe,transparency:80,linewidth:1},linetoolprediction:{linecolor:L,linewidth:1,sourceBackColor:L,sourceTextColor:I,sourceStrokeColor:L,targetStrokeColor:L,targetBackColor:L,targetTextColor:I,successBackground:pe,successTextColor:I,failureBackground:K,failureTextColor:I,intermediateBackColor:"#ead289",intermediateTextColor:"#6d4d22",transparency:10,centersColor:"#202020"},linetooltriangle:{color:le,fillBackground:!0,backgroundColor:ce,transparency:80,linewidth:1},linetoolcallout:{color:I,backgroundColor:j,transparency:50,linewidth:1,fontsize:14,bordercolor:U,bold:!1,italic:!1,wordWrap:!1,wordWrapWidth:200},linetoolparallelchannel:{linecolor:L,linewidth:2,linestyle:w,extendLeft:!1,extendRight:!1,fillBackground:!0,backgroundColor:B,transparency:20,showMidline:!0,midlinecolor:L,midlinewidth:1,midlinestyle:P},linetoolelliottimpulse:{degree:7,showWave:!0,color:"#3d85c6",linewidth:1}, -linetoolelliotttriangle:{degree:7,showWave:!0,color:ge,linewidth:1},linetoolelliotttriplecombo:{degree:7,showWave:!0,color:"#6aa84f",linewidth:1},linetoolelliottcorrection:{degree:7,showWave:!0,color:"#3d85c6",linewidth:1},linetoolelliottdoublecombo:{degree:7,showWave:!0,color:"#6aa84f",linewidth:1},linetoolbarspattern:{color:L,mode:c.Bars,mirrored:!1,flipped:!1},linetoolghostfeed:{averageHL:20,variance:50,candleStyle:{upColor:ae,downColor:q,drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:le,borderDownColor:K,wickColor:Ce},transparency:50},study:{inputs:{},styles:{},palettes:{},bands:{},area:{},graphics:{},plots:{},ohlcPlots:{},filledAreasStyle:{},filledAreas:{},visible:!0,showLegendValues:!0,showLabelsOnPriceScale:!0,precision:"default"},linetoolpitchfork:{fillBackground:!0,transparency:80,style:l.Original,median:{visible:!0,color:K,linewidth:1,linestyle:w},extendLines:!1,level0:r(.25,me,!1),level1:r(.382,ue,!1),level2:r(.5,le,!0),level3:r(.618,le,!1),level4:r(.75,H,!1),level5:r(1,L,!0),level6:r(1.5,te,!1),level7:r(1.75,ne,!1),level8:r(2,$,!1)},linetoolpitchfan:{fillBackground:!0,transparency:80,median:{visible:!0,color:K,linewidth:1,linestyle:w},level0:r(.25,me,!1),level1:r(.382,ue,!1),level2:r(.5,H,!0),level3:r(.618,le,!1),level4:r(.75,H,!1),level5:r(1,L,!0),level6:r(1.5,te,!1),level7:r(1.75,ne,!1),level8:r(2,$,!1)},linetoolgannfan:{showLabels:!0,fillBackground:!0,transparency:80,level1:Pe(1,8,ge,!0),level2:Pe(1,4,le,!0),level3:Pe(1,3,pe,!0),level4:Pe(1,2,le,!0),level5:Pe(1,1,H,!0),level6:Pe(2,1,L,!0),level7:Pe(3,1,te,!0),level8:Pe(4,1,ne,!0),level9:Pe(8,1,K,!0)},linetoolganncomplex:{fillBackground:!1,arcsBackground:{fillBackground:!0,transparency:80},reverse:!1,scaleRatio:"",showLabels:!0,labelsStyle:{fontSize:12,bold:!1,italic:!1},levels:[h(Ce,!0,1),h(ge,!0,1),h(H,!0,1),h(pe,!0,1),h(le,!0,1),h(Ce,!0,1)],fanlines:[T(N,!1,1,8,1),T(K,!1,1,5,1),T(Ce,!1,1,4,1),T(ge,!1,1,3,1),T(H,!0,1,2,1),T(pe,!0,1,1,1),T(le,!0,1,1,2),T(le,!1,1,1,3),T(L,!1,1,1,4),T(O,!1,1,1,5),T(N,!1,1,1,8)],arcs:[T(ge,!0,1,1,0),T(ge,!0,1,1,1),T(ge,!0,1,1.5,0),T(H,!0,1,2,0),T(H,!0,1,2,1),T(pe,!0,1,3,0),T(pe,!0,1,3,1),T(le,!0,1,4,0),T(le,!0,1,4,1),T(L,!0,1,5,0),T(L,!0,1,5,1)]},linetoolgannfixed:{fillBackground:!1,arcsBackground:{fillBackground:!0,transparency:80},reverse:!1,levels:[h(Ce,!0,1),h(ge,!0,1),h(H,!0,1),h(pe,!0,1),h(le,!0,1),h(Ce,!0,1)],fanlines:[T(N,!1,1,8,1),T(K,!1,1,5,1),T(Ce,!1,1,4,1),T(ge,!1,1,3,1),T(H,!0,1,2,1),T(pe,!0,1,1,1),T(le,!0,1,1,2),T(le,!1,1,1,3),T(L,!1,1,1,4),T(O,!1,1,1,5),T(N,!1,1,1,8)],arcs:[T(ge,!0,1,1,0),T(ge,!0,1,1,1),T(ge,!0,1,1.5,0),T(H,!0,1,2,0),T(H,!0,1,2,1),T(pe,!0,1,3,0),T(pe,!0,1,3,1),T(le,!0,1,4,0),T(le,!0,1,4,1),T(L,!0,1,5,0),T(L,!0,1,5,1)]},linetoolgannsquare:{color:"rgba(21, 56, 153, 0.8)",linewidth:1,linestyle:w,showTopLabels:!0,showBottomLabels:!0,showLeftLabels:!0,showRightLabels:!0,fillHorzBackground:!0,horzTransparency:80,fillVertBackground:!0,vertTransparency:80,reverse:!1,fans:t(we,!1),hlevel1:i(0,Ce,!0),hlevel2:i(.25,ge,!0),hlevel3:i(.382,H,!0),hlevel4:i(.5,pe,!0),hlevel5:i(.618,le,!0), -hlevel6:i(.75,L,!0),hlevel7:i(1,Ce,!0),vlevel1:i(0,Ce,!0),vlevel2:i(.25,ge,!0),vlevel3:i(.382,H,!0),vlevel4:i(.5,pe,!0),vlevel5:i(.618,le,!0),vlevel6:i(.75,L,!0),vlevel7:i(1,Ce,!0)},linetoolfibspeedresistancefan:{fillBackground:!0,transparency:80,grid:{color:"rgba(21, 56, 153, 0.8)",linewidth:1,linestyle:w,visible:!0},linewidth:1,linestyle:w,showTopLabels:!0,showBottomLabels:!0,showLeftLabels:!0,showRightLabels:!0,reverse:!1,hlevel1:i(0,Ce,!0),hlevel2:i(.25,ge,!0),hlevel3:i(.382,H,!0),hlevel4:i(.5,pe,!0),hlevel5:i(.618,le,!0),hlevel6:i(.75,L,!0),hlevel7:i(1,Ce,!0),vlevel1:i(0,Ce,!0),vlevel2:i(.25,ge,!0),vlevel3:i(.382,H,!0),vlevel4:i(.5,pe,!0),vlevel5:i(.618,le,!0),vlevel6:i(.75,L,!0),vlevel7:i(1,Ce,!0)},linetoolfibretracement:{showCoeffs:!0,showPrices:!0,fillBackground:!0,transparency:80,extendLines:!1,extendLinesLeft:!1,horzLabelsAlign:"left",vertLabelsAlign:"bottom",reverse:!1,coeffsAsPercents:!1,fibLevelsBasedOnLogScale:!1,labelFontSize:12,trendline:{visible:!0,color:Ce,linewidth:1,linestyle:P},levelsStyle:{linewidth:1,linestyle:w},level1:i(0,Ce,!0),level2:i(.236,K,!0),level3:i(.382,ge,!0),level4:i(.5,pe,!0),level5:i(.618,le,!0),level6:i(.786,H,!0),level7:i(1,Ce,!0),level8:i(1.618,L,!0),level9:i(2.618,K,!0),level10:i(3.618,te,!0),level11:i(4.236,ne,!0),level12:i(1.272,ge,!1),level13:i(1.414,K,!1),level16:i(2,le,!1),level14:i(2.272,ge,!1),level15:i(2.414,pe,!1),level17:i(3,H,!1),level18:i(3.272,Ce,!1),level19:i(3.414,L,!1),level20:i(4,K,!1),level21:i(4.272,te,!1),level22:i(4.414,ne,!1),level23:i(4.618,ge,!1),level24:i(4.764,le,!1)},linetoolfibchannel:{showCoeffs:!0,showPrices:!0,fillBackground:!0,transparency:80,extendLeft:!1,extendRight:!1,horzLabelsAlign:"left",vertLabelsAlign:"middle",coeffsAsPercents:!1,labelFontSize:12,levelsStyle:{linewidth:1,linestyle:w},level1:i(0,Ce,!0),level2:i(.236,K,!0),level3:i(.382,ge,!0),level4:i(.5,pe,!0),level5:i(.618,le,!0),level6:i(.786,H,!0),level7:i(1,Ce,!0),level8:i(1.618,L,!0),level9:i(2.618,K,!0),level10:i(3.618,te,!0),level11:i(4.236,ne,!0),level12:i(1.272,ge,!1),level13:i(1.414,K,!1),level16:i(2,le,!1),level14:i(2.272,ge,!1),level15:i(2.414,pe,!1),level17:i(3,H,!1),level18:i(3.272,Ce,!1),level19:i(3.414,L,!1),level20:i(4,K,!1),level21:i(4.272,te,!1),level22:i(4.414,ne,!1),level23:i(4.618,ge,!1),level24:i(4.764,le,!1)},linetoolprojection:{showCoeffs:!0,fillBackground:!0,transparency:80,color1:B,color2:se,linewidth:1,trendline:{visible:!0,color:we,linestyle:w},level1:r(1,"#808080",!0)},linetool5pointspattern:{color:L,textcolor:I,fillBackground:!0,backgroundColor:L,fontsize:12,bold:!1,italic:!1,transparency:85,linewidth:1},linetoolcypherpattern:{color:L,textcolor:I,fillBackground:!0,backgroundColor:L,fontsize:12,bold:!1,italic:!1,transparency:85,linewidth:1},linetooltrianglepattern:{color:F,textcolor:I,fillBackground:!0,backgroundColor:F,fontsize:12,bold:!1,italic:!1,transparency:85,linewidth:1},linetoolabcd:{color:le,textcolor:I,fontsize:12,bold:!1,italic:!1,linewidth:1},linetoolthreedrivers:{color:F,textcolor:I,fillBackground:!0,backgroundColor:"rgba(149, 40, 204, 0.5)", -fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:1},linetoolheadandshoulders:{color:le,textcolor:I,fillBackground:!0,backgroundColor:le,fontsize:12,bold:!1,italic:!1,transparency:85,linewidth:1},linetoolfibwedge:{showCoeffs:!0,fillBackground:!0,transparency:80,trendline:{visible:!0,color:"#808080",linewidth:1,linestyle:w},level1:r(.236,K,!0),level2:r(.382,ge,!0),level3:r(.5,pe,!0),level4:r(.618,le,!0),level5:r(.786,H,!0),level6:r(1,Ce,!0),level7:r(1.618,L,!1),level8:r(2.618,K,!1),level9:r(3.618,F,!1),level10:r(4.236,ne,!1),level11:r(4.618,ne,!1)},linetoolfibcircles:{showCoeffs:!0,fillBackground:!0,transparency:80,coeffsAsPercents:!1,trendline:{visible:!0,color:Ce,linewidth:1,linestyle:P},level1:r(.236,K,!0),level2:r(.382,ge,!0),level3:r(.5,le,!0),level4:r(.618,pe,!0),level5:r(.786,H,!0),level6:r(1,Ce,!0),level7:r(1.618,L,!0),level8:r(2.618,ne,!0),level9:r(3.618,L,!0),level10:r(4.236,ne,!0),level11:r(4.618,K,!0)},linetoolfibspeedresistancearcs:{showCoeffs:!0,fillBackground:!0,transparency:80,fullCircles:!1,trendline:{visible:!0,color:Ce,linewidth:1,linestyle:P},level1:r(.236,K,!0),level2:r(.382,ge,!0),level3:r(.5,le,!0),level4:r(.618,pe,!0),level5:r(.786,H,!0),level6:r(1,Ce,!0),level7:r(1.618,L,!0),level8:r(2.618,ne,!0),level9:r(3.618,L,!0),level10:r(4.236,ne,!0),level11:r(4.618,K,!0)},linetooltrendbasedfibextension:{showCoeffs:!0,showPrices:!0,fillBackground:!0,transparency:80,extendLines:!1,extendLinesLeft:!1,horzLabelsAlign:"left",vertLabelsAlign:"bottom",reverse:!1,coeffsAsPercents:!1,fibLevelsBasedOnLogScale:!1,labelFontSize:12,trendline:{visible:!0,color:Ce,linewidth:1,linestyle:P},levelsStyle:{linewidth:1,linestyle:w},level1:i(0,Ce,!0),level2:i(.236,K,!0),level3:i(.382,ge,!0),level4:i(.5,pe,!0),level5:i(.618,le,!0),level6:i(.786,H,!0),level7:i(1,Ce,!0),level8:i(1.618,L,!0),level9:i(2.618,K,!0),level10:i(3.618,te,!0),level11:i(4.236,ne,!0),level12:i(1.272,ge,!1),level13:i(1.414,K,!1),level16:i(2,le,!1),level14:i(2.272,ge,!1),level15:i(2.414,pe,!1),level17:i(3,H,!1),level18:i(3.272,Ce,!1),level19:i(3.414,L,!1),level20:i(4,K,!1),level21:i(4.272,te,!1),level22:i(4.414,ne,!1),level23:i(4.618,ge,!1),level24:i(4.764,le,!1)},linetooltrendbasedfibtime:{showCoeffs:!0,fillBackground:!0,transparency:80,horzLabelsAlign:"right",vertLabelsAlign:"bottom",trendline:{visible:!0,color:Ce,linewidth:1,linestyle:P},level1:r(0,Ce,!0),level2:r(.382,K,!0),level3:r(.5,ue,!1),level4:r(.618,pe,!0),level5:r(1,le,!0),level6:r(1.382,H,!0),level7:r(1.618,Ce,!0),level8:r(2,L,!0),level9:r(2.382,ne,!0),level10:r(2.618,te,!0),level11:r(3,F,!0)},linetoolschiffpitchfork:{fillBackground:!0,transparency:80,style:l.Schiff,median:{visible:!0,color:K,linewidth:1,linestyle:w},extendLines:!1,level0:r(.25,me,!1),level1:r(.382,ue,!1),level2:r(.5,le,!0),level3:r(.618,le,!1),level4:r(.75,H,!1),level5:r(1,L,!0),level6:r(1.5,te,!1),level7:r(1.75,ne,!1),level8:r(2,$,!1)},linetoolschiffpitchfork2:{fillBackground:!0,transparency:80,style:l.Schiff2,median:{visible:!0,color:K,linewidth:1,linestyle:w},extendLines:!1,level0:r(.25,me,!1),level1:r(.382,ue,!1), -level2:r(.5,le,!0),level3:r(.618,le,!1),level4:r(.75,H,!1),level5:r(1,L,!0),level6:r(1.5,te,!1),level7:r(1.75,ne,!1),level8:r(2,$,!1)},linetoolinsidepitchfork:{fillBackground:!0,transparency:80,style:l.Inside,median:{visible:!0,color:K,linewidth:1,linestyle:w},extendLines:!1,level0:r(.25,me,!1),level1:r(.382,ue,!1),level2:r(.5,le,!0),level3:r(.618,le,!1),level4:r(.75,H,!1),level5:r(1,L,!0),level6:r(1.5,te,!1),level7:r(1.75,ne,!1),level8:r(2,$,!1)},linetoolregressiontrend:{linewidth:1,linestyle:w,styles:{upLine:{display:u.All,color:E,linestyle:w,linewidth:2},downLine:{display:u.All,color:E,linestyle:w,linewidth:2},baseLine:{display:u.All,color:X,linestyle:P,linewidth:1},extendLines:!1,showPearsons:!0,transparency:70}}},Re(TradingView.defaultProperties.chartproperties),Oe()}if(void 0===TradingView.defaultProperties["study_MA@tv-basicstudies"]&&(TradingView.defaultProperties["study_MA@tv-basicstudies"]={description:"Moving Average",shortDescription:"MA",inputs:{length:9,source:"close"},styles:{MovAvg:{display:u.All,color:L,linestyle:w,linewidth:1,plottype:d.Line,histogramBase:0,title:"MA"}}}),void 0===TradingView.defaultProperties["study_PivotPointsHighLow@tv-basicstudies"]&&(TradingView.defaultProperties["study_PivotPointsHighLow@tv-basicstudies"]={fontsize:10,borderColor:L,backColor:A,textColor:Ie}),void 0===TradingView.defaultProperties["study_PivotPointsStandard@tv-basicstudies"]){var Be=!0;TradingView.defaultProperties["study_PivotPointsStandard@tv-basicstudies"]={_hardCodedDefaultsVersion:1,fontsize:11,levelsStyle:{showLabels:!0,visibility:{P:Be,"S1/R1":Be,"S2/R2":Be,"S3/R3":Be,"S4/R4":Be,"S5/R5":Be},colors:{P:ve,"S1/R1":ve,"S2/R2":ve,"S3/R3":ve,"S4/R4":ve,"S5/R5":ve},widths:{P:1,"S1/R1":1,"S2/R2":1,"S3/R3":1,"S4/R4":1,"S5/R5":1}}}}if(void 0===TradingView.defaultProperties["study_ZigZag@tv-basicstudies"]&&(TradingView.defaultProperties["study_ZigZag@tv-basicstudies"]={color:L,linewidth:2}),void 0===TradingView.defaultProperties["study_ElliottWave@tv-basicstudies"]&&(TradingView.defaultProperties["study_ElliottWave@tv-basicstudies"]={inputs:{},level0:t(G,!1),level1:t("#008000",!1),level2:t("#0000ff",!1),level3:t("#ff00ff",!1),level4:t("#0080ff",!0),level5:t(G,!0),level6:t("#008000",!0),level7:t("#0000ff",!0),level8:t("#ff00ff",!0)}),void 0===TradingView.defaultProperties["study_LinearRegression@tv-basicstudies"]&&(TradingView.defaultProperties["study_LinearRegression@tv-basicstudies"]={styles:{upLine:{display:u.All,color:E,linestyle:w,linewidth:1},downLine:{display:u.All,color:E,linestyle:w,linewidth:1},baseLine:{display:u.All,color:X,linestyle:w,linewidth:1},extendLines:!0,showPearsons:!0,backgroundColor:"rgba(153, 21, 21, 0.3)",transparency:70}}),void 0===TradingView.defaultProperties["study_Compare@tv-basicstudies"]&&(TradingView.defaultProperties["study_Compare@tv-basicstudies"]={minTick:"default"}),void 0===TradingView.defaultProperties["study_Overlay@tv-basicstudies"]){TradingView.defaultProperties["study_Overlay@tv-basicstudies"]={style:a.STYLE_LINE,allowExtendTimeScale:!1,showPriceLine:!1,minTick:"default", -candleStyle:{upColor:"#6ba583",downColor:"#d75442",drawWick:!0,drawBorder:!0,drawBody:!0,borderColor:"#378658",borderUpColor:"#225437",borderDownColor:"#5b1a13",wickColor:"#737375",wickUpColor:"#737375",wickDownColor:"#737375",barColorsOnPrevClose:!1},hollowCandleStyle:{upColor:"#6ba583",downColor:"#d75442",drawWick:!0,drawBorder:!0,drawBody:!0,borderColor:"#378658",borderUpColor:"#225437",borderDownColor:"#5b1a13",wickColor:"#737375",wickUpColor:"#737375",wickDownColor:"#737375",barColorsOnPrevClose:!1},barStyle:{upColor:"#6ba583",downColor:"#d75442",barColorsOnPrevClose:!1,dontDrawOpen:!1,thinBars:!0},lineStyle:{color:Se,linestyle:w,linewidth:2,priceSource:"close",styleType:a.STYLE_LINE_TYPE_SIMPLE},areaStyle:{color1:L,color2:L,linecolor:L,linestyle:w,linewidth:2,priceSource:"close",transparency:95},baselineStyle:{baselineColor:Ae,topFillColor1:ke,topFillColor2:ke,bottomFillColor1:De,bottomFillColor2:De,topLineColor:Le,bottomLineColor:Ee,topLineWidth:2,bottomLineWidth:2,priceSource:"close",transparency:50,baseLevelPercentage:50},hiloStyle:{color:L,showBorders:!0,borderColor:L,showLabels:!0,labelColor:L,drawBody:!0},columnStyle:{upColor:n(le,50),downColor:n(K,50),barColorsOnPrevClose:!0,priceSource:"close"},styles:{open:{display:u.All,color:G,linestyle:w,linewidth:1,plottype:d.Line,histogramBase:0},high:{display:u.All,color:G,linestyle:w,linewidth:1,plottype:d.Line,histogramBase:0},low:{display:u.All,color:G,linestyle:w,linewidth:1,plottype:d.Line,histogramBase:0},close:{display:u.All,color:G,linestyle:w,linewidth:1,plottype:d.Line,histogramBase:0}}}}for(var Ne=e.split("."),Fe=TradingView.defaultProperties,We=0;We1?h(e[r],t.slice(1),i):(e[r]&&e[r].setValue?e[r].setValue(i):e[r]=i,!0))}function d(e){i||T.logWarn("Path `"+e+"` does not exist.")}}function Re(e,t,i,s){window.__defaultsOverrides&&Be(e,t,i,window.__defaultsOverrides,s)}function Ne(e,t){window.__settingsOverrides&&Be(e,null,!1,window.__settingsOverrides,t)}function Oe(){var e=/^linetool.+/;Object.keys(TradingView.defaultProperties).forEach((function(t){e.test(t)&&Re(TradingView.defaultProperties[t],null,!1,t)}))}function Fe(e,t){return t?function(e,t){var i=Ve(e);if(!window._UNIT_TESTS){var s=TradingView.clone(TVSettings.getJSON(e,null));if(function(e){var t=new Set(["linetoolregressiontrend"]);return e.startsWith("study_")||t.has(e)}(e)&&s&&function(e){if(!e)return!1;e=e.toString();var t=new RegExp("\\d+").exec(e);return null!==t&&t[0]===e}(s.version)){var r=s.inputs,n=t.updateStudyInputs(s.id,s.version,"last",r,null);s.inputs=n,s=t.updateStudyState(s,s)}TradingView.merge(i,s),Ne(i,e)}return i}(e,t):function(e){var t=Ve(e);if(!window._UNIT_TESTS){ -var i=TradingView.clone(TVSettings.getJSON(e,null));if(i){TradingView.merge(t,i);const s=e.split(".");Ne(t,void 0===s[1]?e:s[1])}}return t}(e)}Fe.create=function(e,t){if(t){var i=Ve(e);TradingView.defaultProperties[e]=Object.assign(t,i)}},Fe.remove=function(e){TradingView.defaultProperties[e]=void 0},TradingView.saveDefaults=function(e,t){void 0===t?TVSettings.remove(e):TVSettings.setJSON(e,t)},TradingView.factoryDefaults=Ve,window.applyDefaultOverridesToLinetools=Oe,window.applyDefaultsOverrides=Re,window.applyPropertiesOverrides=Be,window.defaults=Fe,t.applyDefaultOverridesToLinetools=Oe,t.applyDefaultsOverrides=Re,t.applyPropertiesOverrides=Be,t.defaults=Fe,t.factoryDefaults=Ve,t.saveDefaults=TradingView.saveDefaults},76076:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SelectPointMode:()=>s,toolIsCursor:()=>_,toolIsMeasure:()=>m,resetToCursor:()=>g,lockTimeAxisTime:()=>C,tool:()=>P,iconTool:()=>T,emojiTool:()=>x,cursorTool:()=>I,isToolCreatingNow:()=>M,isToolEditingNow:()=>A,isToolMovingNow:()=>L,isDirectionalMovementActive:()=>k,createdLineTool:()=>E,continuedLineTool:()=>D,cancelledLineTool:()=>V,beenSetLineToolLastPoint:()=>B,startedMovingLineTool:()=>R,movedLineTool:()=>N,finishedMovingLineTool:()=>O,startedChangingLineTool:()=>F,changedLineTool:()=>W,finishedChangingLineTool:()=>H,removedLineTool:()=>z,finishedLineTool:()=>U,changedLineStyle:()=>j,copiedLineTool:()=>G,restoredLineTool:()=>q,restoredLineToolState:()=>$,activePointSelectionMode:()=>Y,isStudyEditingNow:()=>K,createLineTool:()=>J,continueLineTool:()=>Q,cancelLineTool:()=>ee,setLineToolLastPoint:()=>te,startMovingLineTool:()=>ie,moveLineTool:()=>se,finishMovingLineTool:()=>re,startChangingLineTool:()=>ne,changeLineTool:()=>oe,finishChangingLineTool:()=>ae,removeLineTool:()=>le,finishLineTool:()=>ce,changeLineStyle:()=>he,copyLineTool:()=>de,restoreLineTool:()=>ue,restoreLineToolState:()=>pe,init:()=>ge,runOnDrawingStateReady:()=>fe,properties:()=>ve,hideAllDrawings:()=>Se,hideAllIndicators:()=>ye,lockDrawings:()=>be,hideMarksOnBars:()=>we,drawOnAllCharts:()=>Ce,drawOnAllChartsMode:()=>Pe,lockTimeAxis:()=>Te});var s,r=i(50151),n=i(60923),o=i(7711),a=i(40549),l=i.n(a),c=i(26867),h=i.n(c),d=i(56840),u=i(76422),p=i(64548);function _(e){return"cursor"===e||"arrow"===e||"dot"===e}function m(e){return"measure"===e}function g(e=!1){if(!e&&f){if(f.childs().stayInDrawingMode.value())return}P.setValue(I.value())}!function(e){e[e.None=0]="None",e[e.Replay=1]="Replay",e[e.Study=2]="Study"}(s||(s={}));let f=null,v=null,S=null,y=null,b=null,w=null;const C=new(l()),P=new(l()),T=new(l()),x=new(l()),I=new(l()),M=new(l())(!1),A=new(l())(!1),L=new(l())(!1),k=new(l())(!1),E=new(h()),D=new(h()),V=new(h()),B=new(h()),R=new(h()),N=new(h()),O=new(h()),F=new(h()),W=new(h()),H=new(h()),z=new(h()),U=new(h()),j=new(h()),G=new(h()),q=new(h()),$=new(h()),Y=new(l())(s.None),K=new(l())(!1);function X(e,t){const i=t||{value:!1};return t=>{i.value||(i.value=!0,e.fire(t),i.value=!1)}}const Z={value:!1 -},J=X(E,Z),Q=X(D,Z),ee=X(V,Z),te=X(B,Z),ie=X(R),se=X(N),re=X(O),ne=X(F),oe=X(W),ae=X(H),le=X(z),ce=X(U),he=X(j,Z),de=X(G,Z),ue=X(q),pe=X($);let _e=!1,me=[];function ge(){_e||(P.setValue(d.getValue("chart.cursorPreference","cursor")),P.subscribe((e=>_(e)&&I.setValue(e)),{callWithLast:!0}),I.subscribe((e=>{e&&d.setValue("chart.cursorPreference",e)})),f=new o.DefaultProperty("drawings"),v=(0,n.createPrimitiveProperty)(),S=(0,n.createPrimitiveProperty)(),y=(0,n.createPrimitiveProperty)(),b=(0,n.createPrimitiveProperty)(),w=(0,n.createPrimitiveProperty)(),v.setValue(!1),S.setValue(!1),y.setValue(!1),b.setValue(!1),w.setValue(!1),P.subscribe((()=>{(0,u.emit)("onSelectedLineToolChanged")})),T.subscribe((()=>{(0,p.saveDefaults)("linetoolicon",{...(0,p.defaults)("linetoolicon"),icon:T.value()})})),x.subscribe((()=>{(0,p.saveDefaults)("linetoolemoji",{...(0,p.defaults)("linetoolemoji"),emoji:x.value()})})),_e=!0,me.forEach((e=>e())),me=[])}function fe(e){_e?e():me.push(e)}function ve(){return(0,r.ensureNotNull)(f)}function Se(){return(0,r.ensureNotNull)(v)}function ye(){return(0,r.ensureNotNull)(S)}function be(){return(0,r.ensureNotNull)(y)}function we(){return(0,r.ensureNotNull)(b)}function Ce(){return ve().childs().drawOnAllCharts}function Pe(){return ve().childs().drawOnAllChartsMode}function Te(){return(0,r.ensureNotNull)(w)}},55611:(e,t,i)=>{"use strict";i.d(t,{EnvironmentState:()=>r});var s=i(49483);class r{constructor(e,t=!1){this._shift=!1,this._mod=!1,this._alt=!1,void 0!==e&&(this._shift=Boolean(e.shiftKey),this._mod=Boolean((0,s.isMac)()?e.metaKey:e.ctrlKey),this._alt=Boolean(e.altKey)),this._isApiEvent=t}shift(){return this._shift}mod(){return this._mod}alt(){return this._alt}shiftOnly(){return this._shift&&!this._mod&&!this._alt}modOnly(){return this._mod&&!this._shift&&!this._alt}altOnly(){return this._alt&&!this._shift&&!this._mod}modShift(){return this._shift&&this._mod&&!this._alt}isApiEvent(){return this._isApiEvent}static create(e=!1,t=!1,i=!1){return new r({shiftKey:e,ctrlKey:t,metaKey:t,altKey:i})}}},91035:(e,t,i)=>{"use strict";function s(e){return"="+JSON.stringify(r(e))}function r(e){return Object.keys(e).sort().reduce(((t,i)=>("[object Object]"===Object.prototype.toString.call(e[i])?t[i]=r(e[i]):t[i]=e[i],t)),{})}function n(e){return s(e)}function o(e){return"="===e[0]}function a(e){if(!o(e))return{symbol:e};try{return JSON.parse(e.slice(1))}catch(t){return{symbol:e}}}function l(e){return"string"==typeof e?e:l(e.symbol)}i.r(t),i.d(t,{encodeExtendedSymbolOrGetSimpleSymbolString:()=>n,isEncodedExtendedSymbol:()=>o,decodeExtendedSymbol:()=>a,unwrapSimpleSymbol:()=>l})},69145:(e,t,i)=>{"use strict";i.d(t,{customFormatters:()=>s});const s={dateFormatter:null,timeFormatter:null,tickMarkFormatter:null,priceFormatterFactory:null,studyFormatterFactory:null}},54808:(e,t,i)=>{"use strict";i.d(t,{dateFormatFunctions:()=>m,getDateFormatWithWeekday:()=>g,availableDateFormats:()=>f,defaultDateFormat:()=>v});var s=i(44352),r=i(28865),n=i(74599);const o={1:()=>s.t(null,void 0,i(95425)),2:()=>s.t(null,void 0,i(35050)), +const i=(0,s.default)(e);return t.forEach((e=>(0,n.default)(i,e.split(".")))),i}function u(e,t,i,n){const a=e?o.defaults:o.factoryDefaults,l=t.startsWith("study_")?(0,s.default)(a("study")):{};let c=(0,s.default)(a(t,n));return t.startsWith("study_")&&c.inputs&&delete c.inputs.symbol,"linetoolicon"===t&&e&&(c.icon=(0,o.defaults)(t).icon),"linetooemoji"===t&&e&&(c.emoji=(0,o.defaults)(t).emoji),c=d(c,i),(0,r.default)(l,c),l}let p=!1;function _(e){p=e}class m extends(l()){constructor(e,t,i,s){super(function(e,t,i,s){let n;return void 0===s&&(s=!0),i?n=t:(n=u(s,e,[],null),t&&(0,r.default)(n,t)),n}(e,t,i,s)),this._exclusions=[],this._restoreFactoryDefaultsEvent=new(h()),this._defaultName=e,this._useUserPreferences=null==s||s,this.listeners().subscribe(this,m.prototype.onPropertyChanged),this._restoreFactoryDefaultsEvent=new(h())}preferences(){return this.state(this._exclusions)}mergePreferences(e){this.mergeAndFire(d(e,this._exclusions))}addExclusion(e){this._exclusions.indexOf(e)<0&&this._exclusions.push(e)}removeExclusion(e){const t=this._exclusions.indexOf(e);-1!==t&&this._exclusions.splice(t,1)}restoreFactoryDefaults(){const e=u(!1,this._defaultName,this._exclusions,null);this.mergeAndFire(e),this._defaultName.startsWith("study_")&&!this._defaultName.startsWith("study_VbPFixed")||(0,o.saveDefaults)(this._defaultName,void 0),this._restoreFactoryDefaultsEvent.fire()}onRestoreFactoryDefaults(){return this._restoreFactoryDefaultsEvent}onPropertyChanged(){!p||this._defaultName.startsWith("study_")&&!this._defaultName.startsWith("study_VbPFixed")||this.saveDefaults()}saveDefaults(){this._useUserPreferences&&(0,o.saveDefaults)(this._defaultName,this.preferences())}clone(e){const t=new m(this._defaultName,this.state(),null==e?void 0:e.replaceByState,this._useUserPreferences);for(let e=0;e{"use strict";var s=i(8169).PlDisplay;const{getHexColorByName:r}=i(7394),{generateColor:n}=i(38031);var o=i(8169).TradedGroupHorizontalAlignment,a=i(77906),l=i(23680).LineToolPitchforkStyle,c=i(57693).LineToolBarsPatternMode,h=i(83421),d=h.LineStudyPlotStyle,u=h.STUDYPLOTDISPLAYTARGET,p=i(94030),_=i(99846).PriceAxisLastValueMode,m=i(67052).StoriesTimeLineItemType,g=i(64810).MagnetMode,f=i(85113).LineEnd,v=i(4978).ColorType,S=i(41481).StatsPosition,y=i(22600).sessionsPreferencesDefault,b=i(5049).axisLabelBackgroundColor;const{LINESTYLE_SOLID:w,LINESTYLE_DOTTED:P,LINESTYLE_DASHED:C}=i(53479);var T=i(98351).getLogger("Chart.Defaults") +;const x=r("color-black"),I=r("color-white"),M=n(I,75),A=r("color-tv-blue-50"),L=r("color-tv-blue-500"),k=n(L,30),E=n(L,70),D=n(L,72),B=n(L,75),V=n(L,80),R=r("color-tv-blue-600"),N=r("color-deep-blue-200"),O=r("color-deep-blue-300"),F=r("color-deep-blue-500"),W=n(F,80),H=r("color-sky-blue-500"),z=n(H,80),U=r("color-sky-blue-700"),j=n(U,30),G=r("color-youtube"),q=r("color-ripe-red-200"),$=r("color-ripe-red-300"),Y=r("color-ripe-red-400"),K=r("color-ripe-red-500"),X=n(K,70),Z=n(K,80),J=n(K,72),Q=n(K,95),ee=r("color-ripe-red-600"),te=r("color-grapes-purple-500"),ie=n(te,100),se=n(te,80),re=n(te,30),ne=r("color-berry-pink-500"),oe=n(ne,80),ae=r("color-minty-green-100"),le=r("color-minty-green-500"),ce=n(le,80),he=n(le,72),de=n(le,95),ue=r("color-iguana-green-300"),pe=r("color-iguana-green-500"),_e=n(pe,80),me=r("color-tan-orange-300"),ge=r("color-tan-orange-500"),fe=n(ge,80),ve=r("color-tan-orange-600"),Se=r("color-tan-orange-700"),ye=r("color-cold-gray-150"),be=r("color-cold-gray-300"),we=r("color-cold-gray-400"),Pe=r("color-cold-gray-500"),Ce=r("color-cold-gray-800"),Te=n(Ce,94),xe=n(Ce,100),Ie=r("color-cold-gray-900"),Me=r("color-cold-gray-750"),Ae=r("color-slate-gray"),Le=r("color-silver-tree"),ke=n(Le,95),Ee=r("color-mandy"),De=n(Ee,95);var Be=function(e){var t=function(e,t){return{color:e,visible:t}},i=function(e,t,i){return{coeff:e,color:t,visible:i}},r=function(e,t,i,s,r){return{coeff:e,color:t,visible:i,linestyle:void 0===s?w:s,linewidth:void 0===r?1:r}},h=function(e,t,i){return{color:e,width:i,visible:t}},T=function(e,t,i,s,r){return{color:e,visible:t,width:i,x:s,y:r}},Ce=function(e,t,i,s,r,n){return{coeff1:e,coeff2:t,color:i,visible:s,linestyle:void 0===r?w:r,linewidth:void 0===n?1:n}};if(void 0===TradingView.defaultProperties){var Be;switch(window.locale){case"ar_AE":Be="Asia/Dubai";break;case"au":Be="Australia/Sydney";break;case"br":Be="America/Sao_Paulo";break;case"ca":Be="America/Toronto";break;case"de_DE":case"it":Be="Europe/Berlin";break;case"es":Be="Europe/Madrid";break;case"fa_IR":Be="Asia/Tehran";break;case"fr":case"sv_SE":Be="Europe/Paris";break;case"he_IL":case"tr":Be="Europe/Athens";break;case"hu_HU":case"pl":Be="Europe/Warsaw";break;case"id":case"th_TH":case"vi_VN":Be="Asia/Bangkok";break;case"in":Be="Asia/Kolkata";break;case"ja":case"kr":Be="Asia/Tokyo";break;case"ms_MY":Be="Asia/Singapore";break;case"ru":Be="Europe/Moscow";break;case"uk":Be="Europe/London";break;case"zh_CN":case"zh_TW":Be="Asia/Shanghai";break;default:Be="Etc/UTC"}TradingView.defaultProperties={chartproperties:{timezone:Be,priceScaleSelectionStrategyName:"auto",paneProperties:{backgroundType:v.Solid,background:I,backgroundGradientStartColor:I,backgroundGradientEndColor:I,vertGridProperties:{color:Te,style:w},horzGridProperties:{color:Te,style:w},crossHairProperties:{color:we,style:C,transparency:0,width:1},topMargin:10,bottomMargin:8,axisProperties:{autoScale:!0,autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,indexedTo100:!1,log:!1,logDisabled:!1,alignLabels:!0,isInverted:!1},legendProperties:{ +showStudyArguments:!0,showStudyTitles:!0,showStudyValues:!0,showSeriesTitle:!0,showSeriesOHLC:!0,showLegend:!0,showBarChange:!0,showVolume:!1,showBackground:!0,showPriceSource:!0,backgroundTransparency:50},separatorColor:ye},scalesProperties:{backgroundColor:I,lineColor:xe,textColor:Ie,fontSize:12,scaleSeriesOnly:!1,showSeriesLastValue:!0,seriesLastValueMode:_.LastValueAccordingToScale,showSeriesPrevCloseValue:!1,showStudyLastValue:!0,showSymbolLabels:!1,showStudyPlotLabels:!1,showBidAskLabels:!1,showPrePostMarketPriceLabel:!0,showFundamentalNameLabel:!1,showFundamentalLastValue:!0,barSpacing:p.DEFAULT_BAR_SPACING,axisHighlightColor:B,axisLineToolLabelBackgroundColorCommon:b.common,axisLineToolLabelBackgroundColorActive:b.active,showPriceScaleCrosshairLabel:!0,showTimeScaleCrosshairLabel:!0,crosshairLabelBgColorLight:Ie,crosshairLabelBgColorDark:Me},mainSeriesProperties:{style:a.STYLE_CANDLES,esdShowDividends:!0,esdShowSplits:!0,esdShowEarnings:!0,esdShowBreaks:!1,esdFlagSize:2,showContinuousContractSwitches:!0,showContinuousContractSwitchesBreaks:!1,showFuturesContractExpiration:!0,showLastNews:!0,showCountdown:!0,bidAsk:{visible:!1,lineStyle:P,lineWidth:1,bidLineColor:L,askLineColor:Y},prePostMarket:{visible:!0,lineStyle:P,lineWidth:1,preMarketColor:ve,postMarketColor:L},highLowAvgPrice:{highLowPriceLinesVisible:!1,highLowPriceLabelsVisible:!1,averageClosePriceLineVisible:!1,averageClosePriceLabelVisible:!1,highLowPriceLinesColor:"",highLowPriceLinesWidth:1,averagePriceLineColor:"",averagePriceLineWidth:1},visible:!0,showPriceLine:!0,priceLineWidth:1,priceLineColor:"",baseLineColor:be,showPrevClosePriceLine:!1,prevClosePriceLineWidth:1,prevClosePriceLineColor:"#555555",minTick:"default",dividendsAdjustment:void 0,backAdjustment:!1,settlementAsClose:!0,sessionId:"regular",sessVis:!1,statusViewStyle:{fontSize:16,showExchange:!0,showInterval:!0,symbolTextSource:"description"},candleStyle:{upColor:le,downColor:K,drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:le,borderDownColor:K,wickColor:"#737375",wickUpColor:le,wickDownColor:K,barColorsOnPrevClose:!1,drawBody:!0},hollowCandleStyle:{upColor:le,downColor:K,drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:le,borderDownColor:K,wickColor:"#737375",wickUpColor:le,wickDownColor:K,drawBody:!0},haStyle:{upColor:le,downColor:K,drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:le,borderDownColor:K,wickColor:"#737375",wickUpColor:le,wickDownColor:K,showRealLastPrice:!1,barColorsOnPrevClose:!1,inputs:{},inputInfo:{},drawBody:!0},barStyle:{upColor:le,downColor:K,barColorsOnPrevClose:!1,dontDrawOpen:!1,thinBars:!0},hiloStyle:{color:L,showBorders:!0,borderColor:L,showLabels:!0,labelColor:L,drawBody:!0},columnStyle:{upColor:n(le,50),downColor:n(K,50),barColorsOnPrevClose:!0,priceSource:"close"},lineStyle:{color:L,linestyle:w,linewidth:2,priceSource:"close",styleType:a.STYLE_LINE_TYPE_SIMPLE},areaStyle:{color1:D,color2:L,linecolor:L,linestyle:w,linewidth:2,priceSource:"close",transparency:100},priceAxisProperties:{autoScale:!0, +autoScaleDisabled:!1,lockScale:!1,percentage:!1,percentageDisabled:!1,indexedTo100:!1,log:!1,logDisabled:!1,isInverted:!1,alignLabels:!0},renkoStyle:{upColor:le,downColor:K,borderUpColor:le,borderDownColor:K,upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae",borderUpColorProjection:"#a9dcc3",borderDownColorProjection:"#f5a6ae",wickUpColor:le,wickDownColor:K,inputs:{source:"close",sources:"Close",boxSize:3,style:"ATR",atrLength:14,wicks:!0},inputInfo:{source:{name:"Source"},sources:{name:"Source"},boxSize:{name:"Box size"},style:{name:"Style"},atrLength:{name:"ATR length"},wicks:{name:"Wicks"}}},pbStyle:{upColor:le,downColor:K,borderUpColor:le,borderDownColor:K,upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae",borderUpColorProjection:"#a9dcc3",borderDownColorProjection:"#f5a6ae",inputs:{source:"close",lb:3},inputInfo:{source:{name:"Source"},lb:{name:"Number of line"}}},kagiStyle:{upColor:le,downColor:K,upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae",inputs:{source:"close",style:"ATR",atrLength:14,reversalAmount:1},inputInfo:{source:{name:"Source"},style:{name:"Style"},atrLength:{name:"ATR length"},reversalAmount:{name:"Reversal amount"}}},pnfStyle:{upColor:le,downColor:K,upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae",inputs:{sources:"Close",reversalAmount:3,boxSize:1,style:"ATR",atrLength:14,oneStepBackBuilding:!1},inputInfo:{sources:{name:"Source"},boxSize:{name:"Box size"},reversalAmount:{name:"Reversal amount"},style:{name:"Style"},atrLength:{name:"ATR length"},oneStepBackBuilding:{name:"One step back building"}}},baselineStyle:{baselineColor:Ae,topFillColor1:he,topFillColor2:de,bottomFillColor1:Q,bottomFillColor2:J,topLineColor:le,bottomLineColor:K,topLineWidth:2,bottomLineWidth:2,priceSource:"close",transparency:50,baseLevelPercentage:50},rangeStyle:{upColor:le,downColor:K,thinBars:!0,upColorProjection:"#a9dcc3",downColorProjection:"#f5a6ae",inputs:{range:10,phantomBars:!1},inputInfo:{range:{name:"Range"},phantomBars:{name:"Phantom bars"}}}},chartEventsSourceProperties:{visible:!0,futureOnly:!0,breaks:{color:"#555555",visible:!1,style:C,width:1}},tradingProperties:{showPositions:!0,positionPL:{visibility:!0,display:s.Money},bracketsPL:{visibility:!0,display:s.Money},showOrders:!0,showExecutions:!0,showExecutionsLabels:!1,showReverse:!0,horizontalAlignment:o.Right,extendLeft:!0,lineLength:5,lineWidth:1,lineStyle:w},editorFontsList:["Verdana","Courier New","Times New Roman","Arial"],volumePaneSize:"large"},sessions:y,drawings:{magnet:!1,magnetMode:g.WeakMagnet,stayInDrawingMode:!1,drawOnAllCharts:!0,drawOnAllChartsMode:1},linetoolorder:{extendLeft:"inherit",lineLength:"inherit",lineColor:G,lineActiveBuyColor:"#4094e8",lineInactiveBuyColor:"rgba(64, 148, 232, 0.5)",lineActiveSellColor:"#e75656",lineInactiveSellColor:"rgba(231, 86, 86, 0.5)",lineStyle:"inherit",lineWidth:"inherit",bodyBorderActiveBuyColor:"#4094e8",bodyBorderInactiveBuyColor:"rgba(64, 148, 232, 0.5)",bodyBorderActiveSellColor:"#e75656",bodyBorderInactiveSellColor:"rgba(231, 86, 86, 0.5)",bodyBackgroundColor:M, +bodyBackgroundTransparency:25,bodyTextInactiveLimitColor:"rgba(38, 140, 2, 0.5)",bodyTextActiveLimitColor:"#268c02",bodyTextInactiveStopColor:"rgba(231, 86, 86, 0.5)",bodyTextActiveStopColor:"#e75656",bodyTextInactiveBuyColor:"rgba(64, 148, 232, 0.5)",bodyTextActiveBuyColor:"#4094e8",bodyTextInactiveSellColor:"rgba(231, 86, 86, 0.5)",bodyTextActiveSellColor:"#e75656",bodyFontFamily:"Verdana",bodyFontSize:9,bodyFontBold:!0,bodyFontItalic:!1,quantityBorderActiveBuyColor:"#4094e8",quantityBorderInactiveBuyColor:"rgba(64, 148, 232, 0.5)",quantityBorderActiveSellColor:"#e75656",quantityBorderInactiveSellColor:"rgba(231, 86, 86, 0.5)",quantityBackgroundInactiveBuyColor:"rgba(64, 148, 232, 0.5)",quantityBackgroundActiveBuyColor:"#4094e8",quantityBackgroundInactiveSellColor:"rgba(231, 86, 86, 0.5)",quantityBackgroundActiveSellColor:"#e75656",quantityTextColor:I,quantityTextTransparency:0,quantityFontFamily:"Verdana",quantityFontSize:9,quantityFontBold:!0,quantityFontItalic:!1,cancelButtonBorderActiveBuyColor:"#4094e8",cancelButtonBorderInactiveBuyColor:"rgba(64, 148, 232, 0.5)",cancelButtonBorderActiveSellColor:"#e75656",cancelButtonBorderInactiveSellColor:"rgba(231, 86, 86, 0.5)",cancelButtonBackgroundColor:M,cancelButtonBackgroundTransparency:25,cancelButtonIconActiveBuyColor:"#4094e8",cancelButtonIconInactiveBuyColor:"rgba(64, 148, 232, 0.5)",cancelButtonIconActiveSellColor:"#e75656",cancelButtonIconInactiveSellColor:"rgba(231, 86, 86, 0.5)",tooltip:"",modifyTooltip:"",cancelTooltip:""},linetoolposition:{extendLeft:"inherit",lineLength:"inherit",lineBuyColor:"#4094e8",lineSellColor:"#e75656",lineStyle:"inherit",lineWidth:"inherit",bodyBorderBuyColor:"#4094e8",bodyBorderSellColor:"#e75656",bodyBackgroundColor:M,bodyBackgroundTransparency:25,bodyTextPositiveColor:"#268c02",bodyTextNeutralColor:"#646464",bodyTextNegativeColor:"#e75656",bodyFontFamily:"Verdana",bodyFontSize:9,bodyFontBold:!0,bodyFontItalic:!1,quantityBorderBuyColor:"#4094e8",quantityBorderSellColor:"#e75656",quantityBackgroundBuyColor:"#4094e8",quantityBackgroundSellColor:"#e75656",quantityTextColor:I,quantityTextTransparency:0,quantityFontFamily:"Verdana",quantityFontSize:9,quantityFontBold:!0,quantityFontItalic:!1,reverseButtonBorderBuyColor:"#4094e8",reverseButtonBorderSellColor:"#e75656",reverseButtonBackgroundColor:M,reverseButtonBackgroundTransparency:25,reverseButtonIconBuyColor:"#4094e8",reverseButtonIconSellColor:"#e75656",closeButtonBorderBuyColor:"#4094e8",closeButtonBorderSellColor:"#e75656",closeButtonBackgroundColor:M,closeButtonBackgroundTransparency:25,closeButtonIconBuyColor:"#4094e8",closeButtonIconSellColor:"#e75656",tooltip:"",protectTooltip:"",closeTooltip:"",reverseTooltip:""},linetoolexecution:{direction:"buy",arrowHeight:8,arrowSpacing:1,arrowBuyColor:"#4094e8",arrowSellColor:"#e75656",text:"",textColor:x,textTransparency:0,fontFamily:"Verdana",fontSize:10,fontBold:!1,fontItalic:!1,tooltip:""},linetoolicon:{color:L,size:40,icon:61720,angle:.5*Math.PI},linetoolemoji:{size:40,emoji:"😀",angle:.5*Math.PI},linetoolimage:{transparency:0, +cssWidth:0,cssHeight:0,angle:0},linetoolbezierquadro:{linecolor:L,linewidth:1,fillBackground:!1,backgroundColor:V,transparency:50,linestyle:w,extendLeft:!1,extendRight:!1,leftEnd:f.Normal,rightEnd:f.Normal},linetoolbeziercubic:{linecolor:F,linewidth:1,fillBackground:!1,backgroundColor:W,transparency:80,linestyle:w,extendLeft:!1,extendRight:!1,leftEnd:f.Normal,rightEnd:f.Normal},linetooltrendline:{linecolor:L,linewidth:2,linestyle:w,extendLeft:!1,extendRight:!1,leftEnd:f.Normal,rightEnd:f.Normal,showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:L,fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceLabels:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:S.Right},linetoolinfoline:{linecolor:L,linewidth:2,linestyle:w,extendLeft:!1,extendRight:!1,leftEnd:f.Normal,rightEnd:f.Normal,showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:L,fontsize:14,bold:!1,italic:!1,alwaysShowStats:!0,showMiddlePoint:!1,showPriceLabels:!1,showPriceRange:!0,showBarsRange:!0,showDateTimeRange:!0,showDistance:!0,showAngle:!0,statsPosition:S.Center},linetooltimecycles:{linecolor:"#159980",linewidth:1,fillBackground:!0,backgroundColor:"rgba(106, 168, 79, 0.5)",transparency:50,linestyle:w},linetoolsineline:{linecolor:"#159980",linewidth:1,linestyle:w},linetooltrendangle:{linecolor:L,linewidth:2,linestyle:w,textcolor:L,fontsize:12,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceLabels:!1,showPriceRange:!1,showBarsRange:!1,extendRight:!1,extendLeft:!1,statsPosition:S.Right},linetooldisjointangle:{linecolor:le,linewidth:2,linestyle:w,fillBackground:!0,backgroundColor:ce,transparency:20,extendLeft:!1,extendRight:!1,leftEnd:f.Normal,rightEnd:f.Normal,textcolor:le,fontsize:12,bold:!1,italic:!1,showPrices:!1,showPriceRange:!1,showDateTimeRange:!1,showBarsRange:!1},linetoolflatbottom:{linecolor:ge,linewidth:2,linestyle:w,fillBackground:!0,backgroundColor:fe,transparency:20,extendLeft:!1,extendRight:!1,leftEnd:f.Normal,rightEnd:f.Normal,textcolor:ge,fontsize:12,bold:!1,italic:!1,showPrices:!1,showPriceRange:!1,showDateTimeRange:!1,showBarsRange:!1},linetoolfibspiral:{counterclockwise:!1,linecolor:H,linewidth:1,linestyle:w},linetoolriskrewardshort:{linecolor:Pe,linewidth:1,textcolor:I,fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"#585858",fillBackground:!0,stopBackground:Z,profitBackground:ce,stopBackgroundTransparency:80,profitBackgroundTransparency:80,drawBorder:!1,borderColor:"#667b8b",compact:!1,riskDisplayMode:"percents",accountSize:1e3,lotSize:1,risk:25,alwaysShowStats:!1,showPriceLabels:!0},linetoolriskrewardlong:{linecolor:Pe,linewidth:1,textcolor:I,fontsize:12,fillLabelBackground:!0,labelBackgroundColor:"#585858",fillBackground:!0,stopBackground:Z,profitBackground:ce,stopBackgroundTransparency:80,profitBackgroundTransparency:80,drawBorder:!1,borderColor:"#667b8b",compact:!1,riskDisplayMode:"percents",accountSize:1e3,lotSize:1,risk:25,alwaysShowStats:!1,showPriceLabels:!0},linetoolarrow:{linecolor:L, +linewidth:2,linestyle:w,extendLeft:!1,extendRight:!1,leftEnd:f.Normal,rightEnd:f.Arrow,showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:L,fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceLabels:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:S.Right},linetoolray:{linecolor:L,linewidth:2,linestyle:w,extendLeft:!1,extendRight:!0,leftEnd:f.Normal,rightEnd:f.Normal,showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:L,fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceLabels:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:S.Right},linetoolextended:{linecolor:L,linewidth:2,linestyle:w,extendLeft:!0,extendRight:!0,leftEnd:f.Normal,rightEnd:f.Normal,showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textcolor:L,fontsize:14,bold:!1,italic:!1,alwaysShowStats:!1,showMiddlePoint:!1,showPriceLabels:!1,showPriceRange:!1,showBarsRange:!1,showDateTimeRange:!1,showDistance:!1,showAngle:!1,statsPosition:S.Right},linetoolhorzline:{linecolor:L,linewidth:2,linestyle:w,showPrice:!0,showLabel:!1,textcolor:L,fontsize:12,bold:!1,italic:!1,horzLabelsAlign:"center",vertLabelsAlign:"top"},linetoolhorzray:{linecolor:L,linewidth:2,linestyle:w,showPrice:!0,showLabel:!1,textcolor:L,fontsize:12,bold:!1,italic:!1,horzLabelsAlign:"center",vertLabelsAlign:"top"},linetoolvertline:{linecolor:L,linewidth:2,linestyle:w,extendLine:!0,showTime:!0,showLabel:!1,horzLabelsAlign:"right",vertLabelsAlign:"top",textcolor:L,textOrientation:"vertical",fontsize:14,bold:!1,italic:!1},linetoolcrossline:{linecolor:L,linewidth:2,linestyle:w,showPrice:!0,showTime:!0},linetoolcirclelines:{trendline:{visible:!0,color:"#808080",linewidth:1,linestyle:C},linecolor:"#80ccdb",linewidth:1,linestyle:w},linetoolfibtimezone:{horzLabelsAlign:"right",vertLabelsAlign:"bottom",baselinecolor:"#808080",linecolor:"#0055db",linewidth:1,linestyle:w,showLabels:!0,fillBackground:!1,transparency:80,trendline:{visible:!0,color:"#808080",linewidth:1,linestyle:C},level1:r(0,Pe,!0),level2:r(1,L,!0),level3:r(2,L,!0),level4:r(3,L,!0),level5:r(5,L,!0),level6:r(8,L,!0),level7:r(13,L,!0),level8:r(21,L,!0),level9:r(34,L,!0),level10:r(55,L,!0),level11:r(89,L,!0)},linetooltext:{color:L,fontsize:14,fillBackground:!1,backgroundColor:"rgba(91, 133, 191, 0.3)",backgroundTransparency:70,drawBorder:!1,borderColor:"#667b8b",bold:!1,italic:!1,fixedSize:!0,wordWrap:!1,wordWrapWidth:200},linetooltextabsolute:{color:L,fontsize:14,fillBackground:!1,backgroundColor:"rgba(155, 190, 213, 0.3)",backgroundTransparency:70,drawBorder:!1,borderColor:"#667b8b",bold:!1,italic:!1,fixedSize:!1,wordWrap:!1,wordWrapWidth:200},linetoolballoon:{color:I,backgroundColor:re,borderColor:ie,fontsize:14,transparency:30},linetoolcomment:{color:I,backgroundColor:L,borderColor:L,fontsize:16,transparency:0},linetoolbrush:{linecolor:H,linewidth:1,linestyle:w,smooth:5,fillBackground:!1,backgroundColor:H,transparency:50, +leftEnd:f.Normal,rightEnd:f.Normal},linetoolhighlighter:{linecolor:Z,smooth:5,transparency:80},linetoolpolyline:{linecolor:H,linewidth:1,linestyle:w,fillBackground:!0,backgroundColor:z,transparency:80,filled:!1},linetoolsignpost:{itemType:m.Emoji,emoji:"🙂",showImage:!1,plateColor:L,fontSize:12,bold:!1,italic:!1},linetoolpath:{lineColor:L,lineWidth:2,lineStyle:w,leftEnd:f.Normal,rightEnd:f.Arrow},linetoolarrowmarkleft:{color:L,arrowColor:L,fontsize:14,bold:!1,italic:!1,showLabel:!0},linetoolarrowmarkup:{color:le,arrowColor:le,fontsize:14,bold:!1,italic:!1,showLabel:!0},linetoolarrowmarkright:{color:L,arrowColor:L,fontsize:14,bold:!1,italic:!1,showLabel:!0},linetoolarrowmarkdown:{color:ee,arrowColor:ee,fontsize:14,bold:!1,italic:!1,showLabel:!0},linetoolflagmark:{flagColor:L},linetoolnote:{markerColor:L,textColor:I,backgroundColor:k,backgroundTransparency:0,borderColor:L,fontSize:14,bold:!1,italic:!1,fixedSize:!0},linetoolnoteabsolute:{markerColor:L,textColor:I,backgroundColor:k,backgroundTransparency:0,borderColor:L,fontSize:14,bold:!1,italic:!1,fixedSize:!0},linetoolpricelabel:{color:I,backgroundColor:L,borderColor:L,fontWeight:"bold",fontsize:14,transparency:0},linetoolpricenote:{showLabel:!1,horzLabelsAlign:"center",vertLabelsAlign:"bottom",textColor:L,fontSize:14,bold:!1,italic:!1,lineColor:L,priceLabelBackgroundColor:L,priceLabelBorderColor:L,priceLabelTextColor:I,priceLabelFontSize:12,priceLabelBold:!1,priceLabelItalic:!1},linetoolarrowmarker:{backgroundColor:R,textColor:R,bold:!0,italic:!1,fontsize:16,showLabel:!0},linetoolrectangle:{color:te,fillBackground:!0,backgroundColor:se,linewidth:1,transparency:50,showLabel:!1,horzLabelsAlign:"left",vertLabelsAlign:"bottom",textColor:te,fontSize:14,bold:!1,italic:!1,extendLeft:!1,extendRight:!1},linetoolrotatedrectangle:{color:pe,fillBackground:!0,backgroundColor:_e,transparency:50,linewidth:1},linetoolcircle:{color:ge,backgroundColor:fe,fillBackground:!0,linewidth:1,showLabel:!1,textColor:ge,fontSize:14,bold:!1,italic:!1},linetoolellipse:{color:K,fillBackground:!0,backgroundColor:Z,transparency:50,linewidth:1,showLabel:!1,textColor:K,fontSize:14,bold:!1,italic:!1},linetoolarc:{color:ne,fillBackground:!0,backgroundColor:oe,transparency:80,linewidth:1},linetoolprediction:{linecolor:L,linewidth:1,sourceBackColor:L,sourceTextColor:I,sourceStrokeColor:L,targetStrokeColor:L,targetBackColor:L,targetTextColor:I,successBackground:pe,successTextColor:I,failureBackground:K,failureTextColor:I,intermediateBackColor:"#ead289",intermediateTextColor:"#6d4d22",transparency:10,centersColor:"#202020"},linetooltriangle:{color:le,fillBackground:!0,backgroundColor:ce,transparency:80,linewidth:1},linetoolcallout:{color:I,backgroundColor:j,transparency:50,linewidth:1,fontsize:14,bordercolor:U,bold:!1,italic:!1,wordWrap:!1,wordWrapWidth:200},linetoolparallelchannel:{linecolor:L,linewidth:2,linestyle:w,extendLeft:!1,extendRight:!1,fillBackground:!0,backgroundColor:V,transparency:20,showMidline:!0,midlinecolor:L,midlinewidth:1,midlinestyle:C},linetoolelliottimpulse:{degree:7,showWave:!0, +color:"#3d85c6",linewidth:1},linetoolelliotttriangle:{degree:7,showWave:!0,color:ge,linewidth:1},linetoolelliotttriplecombo:{degree:7,showWave:!0,color:"#6aa84f",linewidth:1},linetoolelliottcorrection:{degree:7,showWave:!0,color:"#3d85c6",linewidth:1},linetoolelliottdoublecombo:{degree:7,showWave:!0,color:"#6aa84f",linewidth:1},linetoolbarspattern:{color:L,mode:c.Bars,mirrored:!1,flipped:!1},linetoolghostfeed:{averageHL:20,variance:50,candleStyle:{upColor:ae,downColor:q,drawWick:!0,drawBorder:!0,borderColor:"#378658",borderUpColor:le,borderDownColor:K,wickColor:Pe},transparency:50},study:{inputs:{},styles:{},palettes:{},bands:{},area:{},graphics:{},plots:{},ohlcPlots:{},filledAreasStyle:{},filledAreas:{},visible:!0,showLegendValues:!0,showLabelsOnPriceScale:!0,precision:"default"},linetoolpitchfork:{fillBackground:!0,transparency:80,style:l.Original,median:{visible:!0,color:K,linewidth:1,linestyle:w},extendLines:!1,level0:r(.25,me,!1),level1:r(.382,ue,!1),level2:r(.5,le,!0),level3:r(.618,le,!1),level4:r(.75,H,!1),level5:r(1,L,!0),level6:r(1.5,te,!1),level7:r(1.75,ne,!1),level8:r(2,$,!1)},linetoolpitchfan:{fillBackground:!0,transparency:80,median:{visible:!0,color:K,linewidth:1,linestyle:w},level0:r(.25,me,!1),level1:r(.382,ue,!1),level2:r(.5,H,!0),level3:r(.618,le,!1),level4:r(.75,H,!1),level5:r(1,L,!0),level6:r(1.5,te,!1),level7:r(1.75,ne,!1),level8:r(2,$,!1)},linetoolgannfan:{showLabels:!0,fillBackground:!0,transparency:80,level1:Ce(1,8,ge,!0),level2:Ce(1,4,le,!0),level3:Ce(1,3,pe,!0),level4:Ce(1,2,le,!0),level5:Ce(1,1,H,!0),level6:Ce(2,1,L,!0),level7:Ce(3,1,te,!0),level8:Ce(4,1,ne,!0),level9:Ce(8,1,K,!0)},linetoolganncomplex:{fillBackground:!1,arcsBackground:{fillBackground:!0,transparency:80},reverse:!1,scaleRatio:"",showLabels:!0,labelsStyle:{fontSize:12,bold:!1,italic:!1},levels:[h(Pe,!0,1),h(ge,!0,1),h(H,!0,1),h(pe,!0,1),h(le,!0,1),h(Pe,!0,1)],fanlines:[T(N,!1,1,8,1),T(K,!1,1,5,1),T(Pe,!1,1,4,1),T(ge,!1,1,3,1),T(H,!0,1,2,1),T(pe,!0,1,1,1),T(le,!0,1,1,2),T(le,!1,1,1,3),T(L,!1,1,1,4),T(O,!1,1,1,5),T(N,!1,1,1,8)],arcs:[T(ge,!0,1,1,0),T(ge,!0,1,1,1),T(ge,!0,1,1.5,0),T(H,!0,1,2,0),T(H,!0,1,2,1),T(pe,!0,1,3,0),T(pe,!0,1,3,1),T(le,!0,1,4,0),T(le,!0,1,4,1),T(L,!0,1,5,0),T(L,!0,1,5,1)]},linetoolgannfixed:{fillBackground:!1,arcsBackground:{fillBackground:!0,transparency:80},reverse:!1,levels:[h(Pe,!0,1),h(ge,!0,1),h(H,!0,1),h(pe,!0,1),h(le,!0,1),h(Pe,!0,1)],fanlines:[T(N,!1,1,8,1),T(K,!1,1,5,1),T(Pe,!1,1,4,1),T(ge,!1,1,3,1),T(H,!0,1,2,1),T(pe,!0,1,1,1),T(le,!0,1,1,2),T(le,!1,1,1,3),T(L,!1,1,1,4),T(O,!1,1,1,5),T(N,!1,1,1,8)],arcs:[T(ge,!0,1,1,0),T(ge,!0,1,1,1),T(ge,!0,1,1.5,0),T(H,!0,1,2,0),T(H,!0,1,2,1),T(pe,!0,1,3,0),T(pe,!0,1,3,1),T(le,!0,1,4,0),T(le,!0,1,4,1),T(L,!0,1,5,0),T(L,!0,1,5,1)]},linetoolgannsquare:{color:"rgba(21, 56, 153, 0.8)",linewidth:1,linestyle:w,showTopLabels:!0,showBottomLabels:!0,showLeftLabels:!0,showRightLabels:!0,fillHorzBackground:!0,horzTransparency:80,fillVertBackground:!0,vertTransparency:80,reverse:!1,fans:t(we,!1),hlevel1:i(0,Pe,!0),hlevel2:i(.25,ge,!0),hlevel3:i(.382,H,!0), +hlevel4:i(.5,pe,!0),hlevel5:i(.618,le,!0),hlevel6:i(.75,L,!0),hlevel7:i(1,Pe,!0),vlevel1:i(0,Pe,!0),vlevel2:i(.25,ge,!0),vlevel3:i(.382,H,!0),vlevel4:i(.5,pe,!0),vlevel5:i(.618,le,!0),vlevel6:i(.75,L,!0),vlevel7:i(1,Pe,!0)},linetoolfibspeedresistancefan:{fillBackground:!0,transparency:80,grid:{color:"rgba(21, 56, 153, 0.8)",linewidth:1,linestyle:w,visible:!0},linewidth:1,linestyle:w,showTopLabels:!0,showBottomLabels:!0,showLeftLabels:!0,showRightLabels:!0,reverse:!1,hlevel1:i(0,Pe,!0),hlevel2:i(.25,ge,!0),hlevel3:i(.382,H,!0),hlevel4:i(.5,pe,!0),hlevel5:i(.618,le,!0),hlevel6:i(.75,L,!0),hlevel7:i(1,Pe,!0),vlevel1:i(0,Pe,!0),vlevel2:i(.25,ge,!0),vlevel3:i(.382,H,!0),vlevel4:i(.5,pe,!0),vlevel5:i(.618,le,!0),vlevel6:i(.75,L,!0),vlevel7:i(1,Pe,!0)},linetoolfibretracement:{showCoeffs:!0,showPrices:!0,fillBackground:!0,transparency:80,extendLines:!1,extendLinesLeft:!1,horzLabelsAlign:"left",vertLabelsAlign:"bottom",reverse:!1,coeffsAsPercents:!1,fibLevelsBasedOnLogScale:!1,labelFontSize:12,trendline:{visible:!0,color:Pe,linewidth:1,linestyle:C},levelsStyle:{linewidth:1,linestyle:w},level1:i(0,Pe,!0),level2:i(.236,K,!0),level3:i(.382,ge,!0),level4:i(.5,pe,!0),level5:i(.618,le,!0),level6:i(.786,H,!0),level7:i(1,Pe,!0),level8:i(1.618,L,!0),level9:i(2.618,K,!0),level10:i(3.618,te,!0),level11:i(4.236,ne,!0),level12:i(1.272,ge,!1),level13:i(1.414,K,!1),level16:i(2,le,!1),level14:i(2.272,ge,!1),level15:i(2.414,pe,!1),level17:i(3,H,!1),level18:i(3.272,Pe,!1),level19:i(3.414,L,!1),level20:i(4,K,!1),level21:i(4.272,te,!1),level22:i(4.414,ne,!1),level23:i(4.618,ge,!1),level24:i(4.764,le,!1)},linetoolfibchannel:{showCoeffs:!0,showPrices:!0,fillBackground:!0,transparency:80,extendLeft:!1,extendRight:!1,horzLabelsAlign:"left",vertLabelsAlign:"middle",coeffsAsPercents:!1,labelFontSize:12,levelsStyle:{linewidth:1,linestyle:w},level1:i(0,Pe,!0),level2:i(.236,K,!0),level3:i(.382,ge,!0),level4:i(.5,pe,!0),level5:i(.618,le,!0),level6:i(.786,H,!0),level7:i(1,Pe,!0),level8:i(1.618,L,!0),level9:i(2.618,K,!0),level10:i(3.618,te,!0),level11:i(4.236,ne,!0),level12:i(1.272,ge,!1),level13:i(1.414,K,!1),level16:i(2,le,!1),level14:i(2.272,ge,!1),level15:i(2.414,pe,!1),level17:i(3,H,!1),level18:i(3.272,Pe,!1),level19:i(3.414,L,!1),level20:i(4,K,!1),level21:i(4.272,te,!1),level22:i(4.414,ne,!1),level23:i(4.618,ge,!1),level24:i(4.764,le,!1)},linetoolprojection:{showCoeffs:!0,fillBackground:!0,transparency:80,color1:V,color2:se,linewidth:1,trendline:{visible:!0,color:we,linestyle:w},level1:r(1,"#808080",!0)},linetool5pointspattern:{color:L,textcolor:I,fillBackground:!0,backgroundColor:L,fontsize:12,bold:!1,italic:!1,transparency:85,linewidth:1},linetoolcypherpattern:{color:L,textcolor:I,fillBackground:!0,backgroundColor:L,fontsize:12,bold:!1,italic:!1,transparency:85,linewidth:1},linetooltrianglepattern:{color:F,textcolor:I,fillBackground:!0,backgroundColor:F,fontsize:12,bold:!1,italic:!1,transparency:85,linewidth:1},linetoolabcd:{color:le,textcolor:I,fontsize:12,bold:!1,italic:!1,linewidth:1},linetoolthreedrivers:{color:F,textcolor:I,fillBackground:!0, +backgroundColor:"rgba(149, 40, 204, 0.5)",fontsize:12,bold:!1,italic:!1,transparency:50,linewidth:1},linetoolheadandshoulders:{color:le,textcolor:I,fillBackground:!0,backgroundColor:le,fontsize:12,bold:!1,italic:!1,transparency:85,linewidth:1},linetoolfibwedge:{showCoeffs:!0,fillBackground:!0,transparency:80,trendline:{visible:!0,color:"#808080",linewidth:1,linestyle:w},level1:r(.236,K,!0),level2:r(.382,ge,!0),level3:r(.5,pe,!0),level4:r(.618,le,!0),level5:r(.786,H,!0),level6:r(1,Pe,!0),level7:r(1.618,L,!1),level8:r(2.618,K,!1),level9:r(3.618,F,!1),level10:r(4.236,ne,!1),level11:r(4.618,ne,!1)},linetoolfibcircles:{showCoeffs:!0,fillBackground:!0,transparency:80,coeffsAsPercents:!1,trendline:{visible:!0,color:Pe,linewidth:1,linestyle:C},level1:r(.236,K,!0),level2:r(.382,ge,!0),level3:r(.5,le,!0),level4:r(.618,pe,!0),level5:r(.786,H,!0),level6:r(1,Pe,!0),level7:r(1.618,L,!0),level8:r(2.618,ne,!0),level9:r(3.618,L,!0),level10:r(4.236,ne,!0),level11:r(4.618,K,!0)},linetoolfibspeedresistancearcs:{showCoeffs:!0,fillBackground:!0,transparency:80,fullCircles:!1,trendline:{visible:!0,color:Pe,linewidth:1,linestyle:C},level1:r(.236,K,!0),level2:r(.382,ge,!0),level3:r(.5,le,!0),level4:r(.618,pe,!0),level5:r(.786,H,!0),level6:r(1,Pe,!0),level7:r(1.618,L,!0),level8:r(2.618,ne,!0),level9:r(3.618,L,!0),level10:r(4.236,ne,!0),level11:r(4.618,K,!0)},linetooltrendbasedfibextension:{showCoeffs:!0,showPrices:!0,fillBackground:!0,transparency:80,extendLines:!1,extendLinesLeft:!1,horzLabelsAlign:"left",vertLabelsAlign:"bottom",reverse:!1,coeffsAsPercents:!1,fibLevelsBasedOnLogScale:!1,labelFontSize:12,trendline:{visible:!0,color:Pe,linewidth:1,linestyle:C},levelsStyle:{linewidth:1,linestyle:w},level1:i(0,Pe,!0),level2:i(.236,K,!0),level3:i(.382,ge,!0),level4:i(.5,pe,!0),level5:i(.618,le,!0),level6:i(.786,H,!0),level7:i(1,Pe,!0),level8:i(1.618,L,!0),level9:i(2.618,K,!0),level10:i(3.618,te,!0),level11:i(4.236,ne,!0),level12:i(1.272,ge,!1),level13:i(1.414,K,!1),level16:i(2,le,!1),level14:i(2.272,ge,!1),level15:i(2.414,pe,!1),level17:i(3,H,!1),level18:i(3.272,Pe,!1),level19:i(3.414,L,!1),level20:i(4,K,!1),level21:i(4.272,te,!1),level22:i(4.414,ne,!1),level23:i(4.618,ge,!1),level24:i(4.764,le,!1)},linetooltrendbasedfibtime:{showCoeffs:!0,fillBackground:!0,transparency:80,horzLabelsAlign:"right",vertLabelsAlign:"bottom",trendline:{visible:!0,color:Pe,linewidth:1,linestyle:C},level1:r(0,Pe,!0),level2:r(.382,K,!0),level3:r(.5,ue,!1),level4:r(.618,pe,!0),level5:r(1,le,!0),level6:r(1.382,H,!0),level7:r(1.618,Pe,!0),level8:r(2,L,!0),level9:r(2.382,ne,!0),level10:r(2.618,te,!0),level11:r(3,F,!0)},linetoolschiffpitchfork:{fillBackground:!0,transparency:80,style:l.Schiff,median:{visible:!0,color:K,linewidth:1,linestyle:w},extendLines:!1,level0:r(.25,me,!1),level1:r(.382,ue,!1),level2:r(.5,le,!0),level3:r(.618,le,!1),level4:r(.75,H,!1),level5:r(1,L,!0),level6:r(1.5,te,!1),level7:r(1.75,ne,!1),level8:r(2,$,!1)},linetoolschiffpitchfork2:{fillBackground:!0,transparency:80,style:l.Schiff2,median:{visible:!0,color:K,linewidth:1,linestyle:w},extendLines:!1, +level0:r(.25,me,!1),level1:r(.382,ue,!1),level2:r(.5,le,!0),level3:r(.618,le,!1),level4:r(.75,H,!1),level5:r(1,L,!0),level6:r(1.5,te,!1),level7:r(1.75,ne,!1),level8:r(2,$,!1)},linetoolinsidepitchfork:{fillBackground:!0,transparency:80,style:l.Inside,median:{visible:!0,color:K,linewidth:1,linestyle:w},extendLines:!1,level0:r(.25,me,!1),level1:r(.382,ue,!1),level2:r(.5,le,!0),level3:r(.618,le,!1),level4:r(.75,H,!1),level5:r(1,L,!0),level6:r(1.5,te,!1),level7:r(1.75,ne,!1),level8:r(2,$,!1)},linetoolregressiontrend:{linewidth:1,linestyle:w,styles:{upLine:{display:u.All,color:E,linestyle:w,linewidth:2},downLine:{display:u.All,color:E,linestyle:w,linewidth:2},baseLine:{display:u.All,color:X,linestyle:C,linewidth:1},extendLines:!1,showPearsons:!0,transparency:70}}},Re(TradingView.defaultProperties.chartproperties),Oe()}if(void 0===TradingView.defaultProperties["study_MA@tv-basicstudies"]&&(TradingView.defaultProperties["study_MA@tv-basicstudies"]={description:"Moving Average",shortDescription:"MA",inputs:{length:9,source:"close"},styles:{MovAvg:{display:u.All,color:L,linestyle:w,linewidth:1,plottype:d.Line,histogramBase:0,title:"MA"}}}),void 0===TradingView.defaultProperties["study_PivotPointsHighLow@tv-basicstudies"]&&(TradingView.defaultProperties["study_PivotPointsHighLow@tv-basicstudies"]={fontsize:10,borderColor:L,backColor:A,textColor:Ie}),void 0===TradingView.defaultProperties["study_PivotPointsStandard@tv-basicstudies"]){var Ve=!0;TradingView.defaultProperties["study_PivotPointsStandard@tv-basicstudies"]={_hardCodedDefaultsVersion:1,fontsize:11,levelsStyle:{showLabels:!0,visibility:{P:Ve,"S1/R1":Ve,"S2/R2":Ve,"S3/R3":Ve,"S4/R4":Ve,"S5/R5":Ve},colors:{P:ve,"S1/R1":ve,"S2/R2":ve,"S3/R3":ve,"S4/R4":ve,"S5/R5":ve},widths:{P:1,"S1/R1":1,"S2/R2":1,"S3/R3":1,"S4/R4":1,"S5/R5":1}}}}if(void 0===TradingView.defaultProperties["study_ZigZag@tv-basicstudies"]&&(TradingView.defaultProperties["study_ZigZag@tv-basicstudies"]={color:L,linewidth:2}),void 0===TradingView.defaultProperties["study_ElliottWave@tv-basicstudies"]&&(TradingView.defaultProperties["study_ElliottWave@tv-basicstudies"]={inputs:{},level0:t(G,!1),level1:t("#008000",!1),level2:t("#0000ff",!1),level3:t("#ff00ff",!1),level4:t("#0080ff",!0),level5:t(G,!0),level6:t("#008000",!0),level7:t("#0000ff",!0),level8:t("#ff00ff",!0)}),void 0===TradingView.defaultProperties["study_LinearRegression@tv-basicstudies"]&&(TradingView.defaultProperties["study_LinearRegression@tv-basicstudies"]={styles:{upLine:{display:u.All,color:E,linestyle:w,linewidth:1},downLine:{display:u.All,color:E,linestyle:w,linewidth:1},baseLine:{display:u.All,color:X,linestyle:w,linewidth:1},extendLines:!0,showPearsons:!0,backgroundColor:"rgba(153, 21, 21, 0.3)",transparency:70}}),void 0===TradingView.defaultProperties["study_Compare@tv-basicstudies"]&&(TradingView.defaultProperties["study_Compare@tv-basicstudies"]={minTick:"default"}),void 0===TradingView.defaultProperties["study_Overlay@tv-basicstudies"]){TradingView.defaultProperties["study_Overlay@tv-basicstudies"]={style:a.STYLE_LINE, +allowExtendTimeScale:!1,showPriceLine:!1,minTick:"default",candleStyle:{upColor:"#6ba583",downColor:"#d75442",drawWick:!0,drawBorder:!0,drawBody:!0,borderColor:"#378658",borderUpColor:"#225437",borderDownColor:"#5b1a13",wickColor:"#737375",wickUpColor:"#737375",wickDownColor:"#737375",barColorsOnPrevClose:!1},hollowCandleStyle:{upColor:"#6ba583",downColor:"#d75442",drawWick:!0,drawBorder:!0,drawBody:!0,borderColor:"#378658",borderUpColor:"#225437",borderDownColor:"#5b1a13",wickColor:"#737375",wickUpColor:"#737375",wickDownColor:"#737375",barColorsOnPrevClose:!1},barStyle:{upColor:"#6ba583",downColor:"#d75442",barColorsOnPrevClose:!1,dontDrawOpen:!1,thinBars:!0},lineStyle:{color:Se,linestyle:w,linewidth:2,priceSource:"close",styleType:a.STYLE_LINE_TYPE_SIMPLE},areaStyle:{color1:L,color2:L,linecolor:L,linestyle:w,linewidth:2,priceSource:"close",transparency:95},baselineStyle:{baselineColor:Ae,topFillColor1:ke,topFillColor2:ke,bottomFillColor1:De,bottomFillColor2:De,topLineColor:Le,bottomLineColor:Ee,topLineWidth:2,bottomLineWidth:2,priceSource:"close",transparency:50,baseLevelPercentage:50},hiloStyle:{color:L,showBorders:!0,borderColor:L,showLabels:!0,labelColor:L,drawBody:!0},columnStyle:{upColor:n(le,50),downColor:n(K,50),barColorsOnPrevClose:!0,priceSource:"close"},styles:{open:{display:u.All,color:G,linestyle:w,linewidth:1,plottype:d.Line,histogramBase:0},high:{display:u.All,color:G,linestyle:w,linewidth:1,plottype:d.Line,histogramBase:0},low:{display:u.All,color:G,linestyle:w,linewidth:1,plottype:d.Line,histogramBase:0},close:{display:u.All,color:G,linestyle:w,linewidth:1,plottype:d.Line,histogramBase:0}}}}for(var Ne=e.split("."),Fe=TradingView.defaultProperties,We=0;We1?h(e[r],t.slice(1),i):(e[r]&&e[r].setValue?e[r].setValue(i):e[r]=i,!0))}function d(e){i||T.logWarn("Path `"+e+"` does not exist.")}}function Re(e,t,i,s){window.__defaultsOverrides&&Ve(e,t,i,window.__defaultsOverrides,s)}function Ne(e,t){window.__settingsOverrides&&Ve(e,null,!1,window.__settingsOverrides,t)}function Oe(){var e=/^linetool.+/;Object.keys(TradingView.defaultProperties).forEach((function(t){e.test(t)&&Re(TradingView.defaultProperties[t],null,!1,t)}))}function Fe(e,t){return t?function(e,t){var i=Be(e);if(!window._UNIT_TESTS){var s=TradingView.clone(TVSettings.getJSON(e,null));if(function(e){var t=new Set(["linetoolregressiontrend"]);return e.startsWith("study_")||t.has(e)}(e)&&s&&function(e){if(!e)return!1;e=e.toString();var t=new RegExp("\\d+").exec(e);return null!==t&&t[0]===e}(s.version)){var r=s.inputs,n=t.updateStudyInputs(s.id,s.version,"last",r,null);s.inputs=n,s=t.updateStudyState(s,s)}TradingView.merge(i,s),Ne(i,e)}return i}(e,t):function(e){ +var t=Be(e);if(!window._UNIT_TESTS){var i=TradingView.clone(TVSettings.getJSON(e,null));if(i){TradingView.merge(t,i);const s=e.split(".");Ne(t,void 0===s[1]?e:s[1])}}return t}(e)}Fe.create=function(e,t){if(t){var i=Be(e);TradingView.defaultProperties[e]=Object.assign(t,i)}},Fe.remove=function(e){TradingView.defaultProperties[e]=void 0},TradingView.saveDefaults=function(e,t){void 0===t?TVSettings.remove(e):TVSettings.setJSON(e,t)},TradingView.factoryDefaults=Be,window.applyDefaultOverridesToLinetools=Oe,window.applyDefaultsOverrides=Re,window.applyPropertiesOverrides=Ve,window.defaults=Fe,t.applyDefaultOverridesToLinetools=Oe,t.applyDefaultsOverrides=Re,t.applyPropertiesOverrides=Ve,t.defaults=Fe,t.factoryDefaults=Be,t.saveDefaults=TradingView.saveDefaults},76076:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SelectPointMode:()=>s,toolIsCursor:()=>_,toolIsMeasure:()=>m,resetToCursor:()=>g,lockTimeAxisTime:()=>P,tool:()=>C,iconTool:()=>T,emojiTool:()=>x,cursorTool:()=>I,isToolCreatingNow:()=>M,isToolEditingNow:()=>A,isToolMovingNow:()=>L,isDirectionalMovementActive:()=>k,createdLineTool:()=>E,continuedLineTool:()=>D,cancelledLineTool:()=>B,beenSetLineToolLastPoint:()=>V,startedMovingLineTool:()=>R,movedLineTool:()=>N,finishedMovingLineTool:()=>O,startedChangingLineTool:()=>F,changedLineTool:()=>W,finishedChangingLineTool:()=>H,removedLineTool:()=>z,finishedLineTool:()=>U,changedLineStyle:()=>j,copiedLineTool:()=>G,restoredLineTool:()=>q,restoredLineToolState:()=>$,activePointSelectionMode:()=>Y,isStudyEditingNow:()=>K,createLineTool:()=>J,continueLineTool:()=>Q,cancelLineTool:()=>ee,setLineToolLastPoint:()=>te,startMovingLineTool:()=>ie,moveLineTool:()=>se,finishMovingLineTool:()=>re,startChangingLineTool:()=>ne,changeLineTool:()=>oe,finishChangingLineTool:()=>ae,removeLineTool:()=>le,finishLineTool:()=>ce,changeLineStyle:()=>he,copyLineTool:()=>de,restoreLineTool:()=>ue,restoreLineToolState:()=>pe,init:()=>ge,runOnDrawingStateReady:()=>fe,properties:()=>ve,hideAllDrawings:()=>Se,hideAllIndicators:()=>ye,lockDrawings:()=>be,hideMarksOnBars:()=>we,drawOnAllCharts:()=>Pe,drawOnAllChartsMode:()=>Ce,lockTimeAxis:()=>Te});var s,r=i(50151),n=i(60923),o=i(7711),a=i(40549),l=i.n(a),c=i(26867),h=i.n(c),d=i(56840),u=i(76422),p=i(64548);function _(e){return"cursor"===e||"arrow"===e||"dot"===e}function m(e){return"measure"===e}function g(e=!1){if(!e&&f){if(f.childs().stayInDrawingMode.value())return}C.setValue(I.value())}!function(e){e[e.None=0]="None",e[e.Replay=1]="Replay",e[e.Study=2]="Study"}(s||(s={}));let f=null,v=null,S=null,y=null,b=null,w=null;const P=new(l()),C=new(l()),T=new(l()),x=new(l()),I=new(l()),M=new(l())(!1),A=new(l())(!1),L=new(l())(!1),k=new(l())(!1),E=new(h()),D=new(h()),B=new(h()),V=new(h()),R=new(h()),N=new(h()),O=new(h()),F=new(h()),W=new(h()),H=new(h()),z=new(h()),U=new(h()),j=new(h()),G=new(h()),q=new(h()),$=new(h()),Y=new(l())(s.None),K=new(l())(!1);function X(e,t){const i=t||{value:!1};return t=>{i.value||(i.value=!0,e.fire(t),i.value=!1)}}const Z={value:!1 +},J=X(E,Z),Q=X(D,Z),ee=X(B,Z),te=X(V,Z),ie=X(R),se=X(N),re=X(O),ne=X(F),oe=X(W),ae=X(H),le=X(z),ce=X(U),he=X(j,Z),de=X(G,Z),ue=X(q),pe=X($);let _e=!1,me=[];function ge(){_e||(C.setValue(d.getValue("chart.cursorPreference","cursor")),C.subscribe((e=>_(e)&&I.setValue(e)),{callWithLast:!0}),I.subscribe((e=>{e&&d.setValue("chart.cursorPreference",e)})),f=new o.DefaultProperty("drawings"),v=(0,n.createPrimitiveProperty)(),S=(0,n.createPrimitiveProperty)(),y=(0,n.createPrimitiveProperty)(),b=(0,n.createPrimitiveProperty)(),w=(0,n.createPrimitiveProperty)(),v.setValue(!1),S.setValue(!1),y.setValue(!1),b.setValue(!1),w.setValue(!1),C.subscribe((()=>{(0,u.emit)("onSelectedLineToolChanged")})),T.subscribe((()=>{(0,p.saveDefaults)("linetoolicon",{...(0,p.defaults)("linetoolicon"),icon:T.value()})})),x.subscribe((()=>{(0,p.saveDefaults)("linetoolemoji",{...(0,p.defaults)("linetoolemoji"),emoji:x.value()})})),_e=!0,me.forEach((e=>e())),me=[])}function fe(e){_e?e():me.push(e)}function ve(){return(0,r.ensureNotNull)(f)}function Se(){return(0,r.ensureNotNull)(v)}function ye(){return(0,r.ensureNotNull)(S)}function be(){return(0,r.ensureNotNull)(y)}function we(){return(0,r.ensureNotNull)(b)}function Pe(){return ve().childs().drawOnAllCharts}function Ce(){return ve().childs().drawOnAllChartsMode}function Te(){return(0,r.ensureNotNull)(w)}},55611:(e,t,i)=>{"use strict";i.d(t,{EnvironmentState:()=>r});var s=i(49483);class r{constructor(e,t=!1){this._shift=!1,this._mod=!1,this._alt=!1,void 0!==e&&(this._shift=Boolean(e.shiftKey),this._mod=Boolean((0,s.isMac)()?e.metaKey:e.ctrlKey),this._alt=Boolean(e.altKey)),this._isApiEvent=t}shift(){return this._shift}mod(){return this._mod}alt(){return this._alt}shiftOnly(){return this._shift&&!this._mod&&!this._alt}modOnly(){return this._mod&&!this._shift&&!this._alt}altOnly(){return this._alt&&!this._shift&&!this._mod}modShift(){return this._shift&&this._mod&&!this._alt}isApiEvent(){return this._isApiEvent}static create(e=!1,t=!1,i=!1){return new r({shiftKey:e,ctrlKey:t,metaKey:t,altKey:i})}}},91035:(e,t,i)=>{"use strict";function s(e){return"="+JSON.stringify(r(e))}function r(e){return Object.keys(e).sort().reduce(((t,i)=>("[object Object]"===Object.prototype.toString.call(e[i])?t[i]=r(e[i]):t[i]=e[i],t)),{})}function n(e){return s(e)}function o(e){return"="===e[0]}function a(e){if(!o(e))return{symbol:e};try{return JSON.parse(e.slice(1))}catch(t){return{symbol:e}}}function l(e){return"string"==typeof e?e:l(e.symbol)}i.r(t),i.d(t,{encodeExtendedSymbolOrGetSimpleSymbolString:()=>n,isEncodedExtendedSymbol:()=>o,decodeExtendedSymbol:()=>a,unwrapSimpleSymbol:()=>l})},69145:(e,t,i)=>{"use strict";i.d(t,{customFormatters:()=>s});const s={dateFormatter:null,timeFormatter:null,tickMarkFormatter:null,priceFormatterFactory:null,studyFormatterFactory:null}},54808:(e,t,i)=>{"use strict";i.d(t,{dateFormatFunctions:()=>m,getDateFormatWithWeekday:()=>g,availableDateFormats:()=>f,defaultDateFormat:()=>v});var s=i(44352),r=i(28865),n=i(74599);const o={1:()=>s.t(null,void 0,i(95425)),2:()=>s.t(null,void 0,i(35050)), 3:()=>s.t(null,void 0,i(51369)),4:()=>s.t(null,void 0,i(42762)),5:()=>s.t(null,{context:"short"},i(27991)),6:()=>s.t(null,void 0,i(15224)),7:()=>s.t(null,void 0,i(6215)),8:()=>s.t(null,void 0,i(38465)),9:()=>s.t(null,void 0,i(57902)),10:()=>s.t(null,void 0,i(73546)),11:()=>s.t(null,void 0,i(71230)),12:()=>s.t(null,void 0,i(92203))},a=(e,t)=>(t?e.getMonth():e.getUTCMonth())+1,l=(e,t)=>t?e.getFullYear():e.getUTCFullYear(),c=e=>e.toLocaleDateString(window.language?(0,r.getIsoLanguageCodeFromLanguage)(window.language):void 0,{weekday:"short",timeZone:"UTC"}),h=(e,t)=>(0,n.numberToStringWithLeadingZero)(((e,t)=>t?e.getDate():e.getUTCDate())(e,t),2),d=(e,t)=>o[a(e,t)](),u=(e,t)=>(0,n.numberToStringWithLeadingZero)(a(e,t),2),p=(e,t)=>(0,n.numberToStringWithLeadingZero)(l(e,t)%100,2),_=(e,t)=>(0,n.numberToStringWithLeadingZero)(l(e,t),4),m={"dd MMM 'yy":(e,t)=>`${h(e,t)} ${d(e,t)} '${p(e,t)}`,"MMM dd, yyyy":(e,t)=>`${d(e,t)} ${h(e,t)}, ${_(e,t)}`,"MMM dd":(e,t)=>`${d(e,t)} ${h(e,t)}`,"dd MMM":(e,t)=>`${h(e,t)} ${d(e,t)}`,"yyyy-MM-dd":(e,t)=>`${_(e,t)}-${u(e,t)}-${h(e,t)}`,"yy-MM-dd":(e,t)=>`${p(e,t)}-${u(e,t)}-${h(e,t)}`,"yy/MM/dd":(e,t)=>`${p(e,t)}/${u(e,t)}/${h(e,t)}`,"yyyy/MM/dd":(e,t)=>`${_(e,t)}/${u(e,t)}/${h(e,t)}`,"dd-MM-yyyy":(e,t)=>`${h(e,t)}-${u(e,t)}-${_(e,t)}`,"dd-MM-yy":(e,t)=>`${h(e,t)}-${u(e,t)}-${p(e,t)}`,"dd/MM/yy":(e,t)=>`${h(e,t)}/${u(e,t)}/${p(e,t)}`,"dd/MM/yyyy":(e,t)=>`${h(e,t)}/${u(e,t)}/${_(e,t)}`,"MM/dd/yy":(e,t)=>`${u(e,t)}/${h(e,t)}/${p(e,t)}`,"MM/dd/yyyy":(e,t)=>`${u(e,t)}/${h(e,t)}/${_(e,t)}`};function g(e){return"ja"===window.language?(t,i)=>`${m[e](t,i)} (${c(t)})`:(t,i)=>`${c(t)} ${m[e](t,i)}`}const f=Object.keys(m),v=()=>-1!==["ja","ko","zh","zh_TW"].indexOf(window.language||"")?"yyyy-MM-dd":"dd MMM 'yy"},86985:(e,t,i)=>{"use strict";i.d(t,{DateFormatter:()=>n});var s=i(69145),r=i(54808);class n{constructor(e="yyyy-MM-dd",t=!1){this._dateFormatFunc=t?(0,r.getDateFormatWithWeekday)(e):r.dateFormatFunctions[e]}format(e){return s.customFormatters&&s.customFormatters.dateFormatter?s.customFormatters.dateFormatter.format(e):this._dateFormatFunc(e,!1)}formatLocal(e){return s.customFormatters.dateFormatter?s.customFormatters.dateFormatter.formatLocal?s.customFormatters.dateFormatter.formatLocal(e):s.customFormatters.dateFormatter.format(e):this._dateFormatFunc(e,!0)}}},96701:(e,t,i)=>{"use strict";i.d(t,{DateTimeFormatter:()=>o});var s=i(78831),r=i(86985);const n={dateFormat:"yyyy-MM-dd",withWeekday:!1,timeFormat:s.hourMinuteSecondFormat,dateTimeSeparator:" "};class o{constructor(e={}){const t=Object.assign({},n,e);this._dateFormatter=new r.DateFormatter(t.dateFormat,t.withWeekday),this._timeFormatter=new s.TimeFormatter(t.timeFormat),this._separator=t.dateTimeSeparator}format(e){return`${this._dateFormatter.format(e)}${this._separator}${this._timeFormatter.format(e)}`}formatLocal(e){return`${this._dateFormatter.formatLocal(e)}${this._separator}${this._timeFormatter.formatLocal(e)}`}}},22512:(e,t,i)=>{"use strict";i.d(t,{LimitedPrecisionNumericFormatter:()=>r});var s=i(65665);class r{ constructor(e=1){this._precision=e}format(e){(0,s.isNumber)(e)||(e=parseFloat(e));const t=e.toFixed(this._precision),i=Math.pow(10,-this._precision);return Math.max(parseFloat(t),i)+""}parse(e){const t=parseFloat(e);return isNaN(t)?{res:!1}:{res:!0,value:t,suggest:this.format(t)}}}},34657:(e,t,i)=>{"use strict";i.d(t,{NumericFormatter:()=>n});var s=i(74599),r=i(60521);class n{constructor(e){this._precision=e}format(e){return(void 0!==this._precision?e.toFixed(this._precision):n.formatNoE(e)).replace(".",s.formatterOptions.decimalSign)}parse(e){const t=e.replace(s.formatterOptions.decimalSign,".");let i=parseFloat(t);return this._precision&&(i=+i.toFixed(this._precision)),i}static formatNoE(e){if(!Number.isFinite(e))return String(e);const t=new r.Big(e);return t.lt(1)?t.toFixed():t.toString()}}},18766:(e,t,i)=>{"use strict";i.d(t,{PercentageFormatter:()=>n});var s=i(74599),r=i(80142);class n extends s.PriceFormatter{constructor(e){super(e),this.type="percentage"}state(){const e=s.PriceFormatter.prototype.state.call(this);return e.percent=!0,e}parse(e){return e=e.replace("%",""),super.parse(e)}format(e,t,i,s,n=!0){const o=super.format(e,t,i,s,!1)+"%";return n?(0,r.forceLTRStr)(o):o}static serialize(e){return e.state()}static deserialize(e){return new n(e.priceScale)}}},68336:(e,t,i)=>{"use strict";i.d(t,{PipFormatter:()=>r});var s=i(74599);class r extends s.PriceFormatter{constructor(e,t,i,s){t||(t=1),"forex"!==i&&"cfd"!==i||!s?(super(1),this._isForex=!1):(super(s),this._isForex=!0),this._pipPriceScale=e,this._pipMinMove=t,this._pipMinMove2=s}format(e,t,i){let s=this._isForex?this._pipMinMove2:this._pipMinMove;return void 0===s&&(s=NaN),super.format(e*this._pipPriceScale/s,t,i)}}},74599:(e,t,i)=>{"use strict";i.r(t),i.d(t,{PriceFormatter:()=>m,formatterOptions:()=>c,isFormatterHasForexAdditionalPrecision:()=>_,numberToStringWithLeadingZero:()=>p});var s=i(44352),r=i(60521),n=i(65665);var o=i(80142);const a=(0,i(98351).getLogger)("Chart.PriceFormatter"),l=new RegExp(/^(-?)[0-9]+$/),c={decimalSign:".",decimalSignFractional:"'"},h=new Map;const d=new Map;function u(e,t,i,s){let r=0;if(e>0&&t>0){let t=e;for(i&&s&&(t/=s);t>1;)t/=10,r++}return r}function p(e,t){if(!(0,n.isNumber)(e))return"n/a";if(!(0,n.isInteger)(t))throw new TypeError("invalid length");if(t<0||t>24)throw new TypeError("invalid length");if(0===t)return e.toString();return("0000000000000000"+e.toString()).slice(-t)}function _(e){return"hasForexAdditionalPrecision"in e}class m{constructor(e,t,o,l,c){if(this.type="price",this._formatterErrors={custom:s.t(null,void 0,i(32061)),fraction:s.t(null,void 0,i(42015)),secondFraction:s.t(null,void 0,i(43247))},t||(t=1),(0,n.isNumber)(e)&&(0,n.isInteger)(e)||(e=100),e<0)throw new TypeError("invalid base");this._priceScale=e,this._minMove=t,this._minMove2=l,this._variableMinTickData=o||void 0===c?void 0:function(e,t){var i,s,o,a,l;const c=t.split(" ").map(Number);if((0,n.isEven)(c.length)||c.some(Number.isNaN))return[{minTick:e,price:1/0,maxIndex:1/0}];const h=[];for(let e=0;e0&&2!==l&&4!==l&&8!==l?a.logDebug("invalid minmove2"):(this._fractional=o,this._fractionalLength=u(this._priceScale,this._minMove,this._fractional,this._minMove2))}isFractional(){return!!this._fractional}state(){return{fractional:this._fractional,fractionalLength:this._fractionalLength,minMove:this._minMove,minMove2:this._minMove2,priceScale:this._priceScale}}format(e,t,i,s=!0,n=!0,a=!1){let l="";e<0?(l=!1===s?"":"−",e=-e):e&&!0===t&&(l="+");let c,h=this._priceScale,d=this._minMove,p=this._fractionalLength;if(void 0!==this._variableMinTickData){const t=function(e){const{minTick:t,price:i,variableMinTickData:s,shouldCheckForEquality:r}=e;return void 0===s?t:function(e,t,i=!1){for(let s=0;s1e10)return this._formatAsExponential(t);let l;l=this._fractional?Math.pow(10,n):Math.pow(10,o)*i/(a?1:s);const h=1/l;let d;if(l>1)d=Math.floor(t);else{const e=Math.floor(Math.round(t/h)*h);d=0===Math.round((t-e)/h)?e:e+h}let u="";if(l>1){let e=a?new r.Big(t).mul(l).round(void 0,0).minus(new r.Big(d).mul(l)).toNumber():parseFloat((Math.round(t*l)-d*l).toFixed(n));e>=l&&(e-=l,d+=1);const i=a?new r.Big(e).round(n,0).toNumber():parseFloat(e.toFixed(n))*s;u=c.decimalSign+p(i,n+o),u=this._removeEndingZeros(u,o)}return d.toString()+u}_getFractPart(e,t,i){const s=[0,5],r=[0,2,5,7],n=[0,1,2,3,5,6,7,8];return 2===i?void 0===s[e]?-1:s[e]:4===i?void 0===r[e]?-1:r[e]:8===i&&2===t?void 0===n[e]?-1:n[e]:e}_formatAsFractional(e,t){ @@ -522,9 +522,9 @@ super.setPoint(e,t),this._calculateBarOffset();break;case 1:const i=this.propert this._setPaneViews([new e(this,this._model)])}))}pointsCount(){return 2}name(){return"Cyclic Lines"}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,5513))).CyclicAndSineLinesPatternDefinitionsViewModel}static createProperties(e){var t=new r("linetoolcirclelines",e);return this._configureProperties(t),t}}t.LineToolCircleLines=n},32154:(e,t,i)=>{"use strict";i.d(t,{LineToolCircle:()=>l});var s=i(26220),r=i.n(s),n=i(7711),o=i(10971),a=i(75862);class l extends o.LineDataSource{constructor(e,t,s,r){const n=t||l.createProperties();super(e,n,s,r),i.e(1583).then(i.bind(i,5383)).then((({CirclePaneView:t})=>{const i=[new t(this,e)];this._setPaneViews(i)}))}pointsCount(){return 2}name(){return"Circle"}template(){const e=super.template();return e.text=this.properties().childs().text.value(),e}static createProperties(e){const t=new n.DefaultProperty("linetoolcircle",e);return this._configureProperties(t),t}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,9539))).EllipseCircleDefinitionsViewModel}_snapTo45DegreesAvailable(){return!0}_applyTemplateImpl(e){super._applyTemplateImpl(e),this.properties().childs().text.setValue(e.text)}static _configureProperties(e){super._configureProperties(e),e.hasChild("text")||e.addChild("text",new(r())("")),e.addChild("linesColors",new a.LineToolColorsProperty([e.childs().color])),e.addChild("linesWidths",new a.LineToolWidthsProperty([e.childs().linewidth])),e.addChild("backgroundsColors",new a.LineToolColorsProperty([e.childs().backgroundColor])),e.addChild("textsColors",new a.LineToolColorsProperty([e.childs().textColor],e.childs().showLabel)),e.addExclusion("linesColors"),e.addExclusion("linesWidths"),e.addExclusion("backgroundsColors"),e.addExclusion("text")}}},42421:(e,t,i)=>{"use strict";i.d(t,{LineToolComment:()=>n});var s=i(7711),r=i(50856);class n extends r.LineToolBalloon{constructor(e,t,i,s){super(e,t||n.createProperties(),i,s)}name(){return"Comment"}static createProperties(e){const t=new s.DefaultProperty("linetoolcomment",e);return n._configureProperties(t),t}_createPaneView(){i.e(1583).then(i.bind(i,17269)).then((e=>{this._setPaneViews([new e.CommentPaneView(this,this._model)])}))}}},94617:(e,t,i)=>{"use strict";i.d(t,{LineToolCrossLine:()=>a});var s=i(7711),r=i(72666),n=i(31688),o=i(10971);class a extends o.LineDataSource{constructor(e,t,s,o){super(e,t||a.createProperties(),s,o),this._priceAxisView=new r.LineToolHorzLinePriceAxisView(this),this._timeAxisView=new n.LineToolVertLineTimeAxisView(this),i.e(1583).then(i.bind(i,4332)).then((({CrossLinePaneView:e})=>{this._setPaneViews([new e(this,this._model)])}))}pointsCount(){return 1}name(){return"Cross Line"}priceAxisViews(e,t){return this.isSourceHidden()?null:t===this.priceScale()&&this.properties().childs().showPrice.value()&&this._model.paneForSource(this)===e?[this._priceAxisView]:null}timeAxisViews(){ return this.isSourceHidden()?null:this.properties().childs().showTime.value()?[this._timeAxisView]:null}updateAllViews(e){super.updateAllViews(e),this._priceAxisView.update(e),this._timeAxisView.update()}canHasAlert(){return!1}lineColor(){return this.properties().childs().linecolor.value()}lineWidth(){return this.properties().childs().linewidth.value()}lineStyle(){return this.properties().childs().linestyle.value()}static createProperties(e){const t=new s.DefaultProperty("linetoolcrossline",e);return this._configureProperties(t),t}_getPropertyDefinitionsViewModelClass(){return Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,79094)).then((e=>e.CrossLineDefinitionsViewModel))}}},62262:(e,t,i)=>{"use strict";i.d(t,{LineToolCypherPattern:()=>n});var s=i(51207),r=i(7711);class n extends s.LineTool5PointsPattern{constructor(e,t,i,s){super(e,t||n.createProperties(),i,s)}name(){return"Cypher Pattern"}static createProperties(e){const t=new r.DefaultProperty("linetoolcypherpattern",e);return this._configureProperties(t),t}_loadPaneViews(e){i.e(1583).then(i.bind(i,92238)).then((t=>{this._setPaneViews([new t.CypherPaneView(this,e)])}))}}},56962:(e,t,i)=>{"use strict";i.d(t,{nonThemedFactoryDefaultsBase:()=>d,themedFactoryDefaultsBase:()=>u,DateAndPriceBaseProperties:()=>p});var s=i(7394),r=i(24633),n=i(38031),o=i(7006),a=i(63032),l=i(26220),c=i.n(l);const h=(0,s.getHexColorByName)("color-tv-blue-500"),d={linewidth:1,fontsize:12,fillLabelBackground:!0,fillBackground:!0,backgroundTransparency:60,intervalsVisibilities:{...o.intervalsVisibilitiesDefaults},customText:{visible:!1,fontsize:12,bold:!1,italic:!1}},u=new Map([[r.StdTheme.Light,{textcolor:(0,s.getHexColorByName)("color-black"),labelBackgroundColor:(0,s.getHexColorByName)("color-white"),linecolor:h,backgroundColor:(0,n.generateColor)(h,85),shadow:"rgba(0, 0, 0, 0.2)",customText:{color:h}}],[r.StdTheme.Dark,{textcolor:(0,s.getHexColorByName)("color-white"),labelBackgroundColor:(0,s.getHexColorByName)("color-cold-gray-800"),linecolor:h,backgroundColor:(0,n.generateColor)(h,85),shadow:"rgba(0, 0, 0, 0.4)",customText:{color:h}}]]);class p extends a.ThemedDefaultProperty{constructor(e,t,i,s,r){var n,o,a;super(e,t,i,s,r),null===(n=this.childs().customText)||void 0===n||n.addChild("text",new(c())(null!==(a=null===(o=null==r?void 0:r.customText)||void 0===o?void 0:o.text)&&void 0!==a?a:""))}_allKeys(){const e=super._allKeys();return e.push("customText.text"),e}}},45710:(e,t,i)=>{"use strict";i.d(t,{LineToolDateAndPriceRange:()=>g});var s=i(50151),r=i(10971),n=i(67245),o=i(24633),a=i(7394),l=i(63032),c=i(56962);const h=(0,a.getHexColorByName)("color-tv-blue-500"),d={...c.nonThemedFactoryDefaultsBase,drawBorder:!1,borderWidth:1},u=new Map([[o.StdTheme.Light,{...c.themedFactoryDefaultsBase.get(o.StdTheme.Light),borderColor:h}],[o.StdTheme.Dark,{...c.themedFactoryDefaultsBase.get(o.StdTheme.Dark),borderColor:h}]]),p=(0,l.extractAllPropertiesKeys)((0,s.ensureDefined)(u.get(o.StdTheme.Light))),_=(0,l.extractAllPropertiesKeys)(d) ;class m extends c.DateAndPriceBaseProperties{static create(e){return new this("linetooldateandpricerange",(()=>(0,l.factoryDefaultsForCurrentTheme)(d,u)),_,p,e)}}class g extends r.LineDataSource{constructor(e,t,s,r){super(e,t||g.createProperties(),s,r),this._volumeCalculator=null,i.e(1583).then(i.bind(i,69426)).then((e=>{this._setPaneViews([new e.DateAndPriceRangePaneView(this,this._model)])}))}destroy(){super.destroy(),null!==this._volumeCalculator&&this._volumeCalculator.destroy()}pointsCount(){return 2}name(){return"Date and Price Range"}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,s.assert)(null===this._volumeCalculator),this._volumeCalculator=new n.SeriesTimeRangeVolumeCalculator(this._model.mainSeries())),super.setOwnerSource(e)}static createProperties(e){const t=m.create(e);return this._configureProperties(t),t}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,53110))).GeneralDatePriceRangeDefinitionsViewModel}}},55269:(e,t,i)=>{"use strict";i.d(t,{LineToolDateRange:()=>_});var s=i(50151),r=i(10971),n=i(67245),o=i(24633),a=i(63032),l=i(56962);const c={...l.nonThemedFactoryDefaultsBase,extendTop:!1,extendBottom:!1},h=l.themedFactoryDefaultsBase,d=(0,a.extractAllPropertiesKeys)((0,s.ensureDefined)(h.get(o.StdTheme.Light))),u=(0,a.extractAllPropertiesKeys)(c);class p extends l.DateAndPriceBaseProperties{static create(e){return new this("linetooldaterange",(()=>(0,a.factoryDefaultsForCurrentTheme)(c,h)),u,d,e)}}class _ extends r.LineDataSource{constructor(e,t,s,r){super(e,t||_.createProperties(),s,r),this._volumeCalculator=null,i.e(1583).then(i.bind(i,4061)).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"}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,s.assert)(null===this._volumeCalculator),this._volumeCalculator=new n.SeriesTimeRangeVolumeCalculator(this._model.mainSeries())),super.setOwnerSource(e)}static createProperties(e){const t=p.create(e);return this._configureProperties(t),t}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,53110))).GeneralDatePriceRangeDefinitionsViewModel}}},84145:(e,t,i)=>{"use strict";var s=i(10971).LineDataSource,r=i(7711).DefaultProperty;class n extends s{constructor(e,t,s,r){super(e,t||n.createProperties(),s,r),this.version=n.version,i.e(1583).then(i.t.bind(i,71841,19)).then((({DisjointChannelPaneView:e})=>{this._setPaneViews([new e(this,this._model)])}))}pointsCount(){return 3}name(){return"Disjoint Channel"}hasEditableCoordinates(){return!1}addPoint(e,t){ -return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),super.addPoint(e)}setLastPoint(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),super.setLastPoint(e)}setPoint(e,t,i){var s=.5*(this._points[1].price+this._points[2].price);if(i&&i.shift()&&1===e){this._snapPoint45Degree(t,this.points()[0])}if(e<3&&super.setPoint(e,t),0!==e&&2!==e){if(1===e){var r=this._points[1].price-s;this._points[2].price=this._points[1].price-2*r}else if(3===e){r=t.price-this._points[2].price;this._points[0].price=this._points[1].price-r,this._points[0].index=t.index}this.normalizePoints()}}getPoint(e){if(e<3)return super.getPoint(e);var t=this._points[0].price-this._points[2].price;return{index:this._points[0].index,price:this._points[1].price-t}}canHasAlert(){return!0}_getAlertPlots(){var e=this._points[0],t=this._points[1],i=[];e.index<=t.index?(i.push(e),i.push(t)):(i.push(t),i.push(e));var s=this._points[2];s.time=t.time,s.index=t.index;var r,n,o,a,l={price:s.price+(t.price-e.price),time:e.time,index:e.index},c=[];s.index<=l.index?(c.push(s),c.push(l)):(c.push(l),c.push(s)),i[0].price>c[0].price?(r=i,n=c):c[0].price>i[0].price||c[1].price>i[1].price?(r=c,n=i):(r=i,n=c);var h=this.properties().extendLeft.value(),d=this.properties().extendRight.value();return e.index<=t.index?(o=h,a=d):(o=d,a=h),[this._linePointsToAlertPlot(r,"Upper",o,a),this._linePointsToAlertPlot(n,"Lower",o,a)]}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,99788))).GeneralTrendFiguresDefinitionsViewModel}static createProperties(e){var t=new r("linetooldisjointangle",e);return this._configureProperties(t),t}}n.version=1,t.LineToolDisjointChannel=n},26132:(e,t,i)=>{"use strict";i.d(t,{LineToolElliott:()=>u,LineToolElliottImpulse:()=>m,LineToolElliottTriangle:()=>f,LineToolElliottTripleCombo:()=>S,LineToolElliottCorrection:()=>w,LineToolElliottDoubleCombo:()=>P});var s=i(44352),r=i(47539),n=i(10971),o=i(43986),a=i(7711),l=i(75862);const c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],h=new r.TranslatedString("change Elliott degree",s.t(null,void 0,i(76020))),d=[{value:0,title:s.t(null,void 0,i(33820))},{value:1,title:s.t(null,void 0,i(58397))},{value:2,title:s.t(null,void 0,i(9753))},{value:3,title:s.t(null,void 0,i(18367))},{value:4,title:s.t(null,void 0,i(91889))},{value:5,title:s.t(null,void 0,i(95176))},{value:6,title:s.t(null,void 0,i(48404))},{value:7,title:s.t(null,void 0,i(71778))},{value:8,title:s.t(null,{context:"wave"},i(66051))},{value:9,title:s.t(null,{context:"wave"},i(86054))},{value:10,title:s.t(null,void 0,i(85884))},{value:11,title:s.t(null,void 0,i(71722))},{value:12,title:s.t(null,void 0,i(10931))},{value:13,title:s.t(null,void 0,i(29662))},{value:14,title:s.t(null,void 0,i(9632))}];class u extends n.LineDataSource{constructor(e,t,s,r){super(e,null!=t?t:u.createProperties(),s,r),this.version=4,i.e(1583).then(i.bind(i,38249)).then((e=>{ +return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),super.addPoint(e)}setLastPoint(e,t){return t&&t.shift()&&2===this.points().length&&this._snapPoint45Degree(e,this.points()[this.points().length-2]),super.setLastPoint(e)}setPoint(e,t,i){var s=.5*(this._points[1].price+this._points[2].price);if(i&&i.shift()&&1===e){this._snapPoint45Degree(t,this.points()[0])}if(e<3&&super.setPoint(e,t),0!==e&&2!==e){if(1===e){var r=this._points[1].price-s;this._points[2].price=this._points[1].price-2*r}else if(3===e){r=t.price-this._points[2].price;this._points[0].price=this._points[1].price-r,this._points[0].index=t.index}this.normalizePoints()}}getPoint(e){if(e<3)return super.getPoint(e);var t=this._points[0].price-this._points[2].price;return{index:this._points[0].index,price:this._points[1].price-t}}canHasAlert(){return!0}_getAlertPlots(){var e=this._points[0],t=this._points[1],i=[];e.index<=t.index?(i.push(e),i.push(t)):(i.push(t),i.push(e));var s=this._points[2];s.time=t.time,s.index=t.index;var r,n,o,a,l={price:s.price+(t.price-e.price),time:e.time,index:e.index},c=[];s.index<=l.index?(c.push(s),c.push(l)):(c.push(l),c.push(s)),i[0].price>c[0].price?(r=i,n=c):c[0].price>i[0].price||c[1].price>i[1].price?(r=c,n=i):(r=i,n=c);var h=this.properties().extendLeft.value(),d=this.properties().extendRight.value();return e.index<=t.index?(o=h,a=d):(o=d,a=h),[this._linePointsToAlertPlot(r,"Upper",o,a),this._linePointsToAlertPlot(n,"Lower",o,a)]}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,99788))).GeneralTrendFiguresDefinitionsViewModel}static createProperties(e){var t=new r("linetooldisjointangle",e);return this._configureProperties(t),t}}n.version=1,t.LineToolDisjointChannel=n},26132:(e,t,i)=>{"use strict";i.d(t,{LineToolElliott:()=>u,LineToolElliottImpulse:()=>m,LineToolElliottTriangle:()=>f,LineToolElliottTripleCombo:()=>S,LineToolElliottCorrection:()=>w,LineToolElliottDoubleCombo:()=>C});var s=i(44352),r=i(47539),n=i(10971),o=i(43986),a=i(7711),l=i(75862);const c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],h=new r.TranslatedString("change Elliott degree",s.t(null,void 0,i(76020))),d=[{value:0,title:s.t(null,void 0,i(33820))},{value:1,title:s.t(null,void 0,i(58397))},{value:2,title:s.t(null,void 0,i(9753))},{value:3,title:s.t(null,void 0,i(18367))},{value:4,title:s.t(null,void 0,i(91889))},{value:5,title:s.t(null,void 0,i(95176))},{value:6,title:s.t(null,void 0,i(48404))},{value:7,title:s.t(null,void 0,i(71778))},{value:8,title:s.t(null,{context:"wave"},i(66051))},{value:9,title:s.t(null,{context:"wave"},i(86054))},{value:10,title:s.t(null,void 0,i(85884))},{value:11,title:s.t(null,void 0,i(71722))},{value:12,title:s.t(null,void 0,i(10931))},{value:13,title:s.t(null,void 0,i(29662))},{value:14,title:s.t(null,void 0,i(9632))}];class u extends n.LineDataSource{constructor(e,t,s,r){super(e,null!=t?t:u.createProperties(),s,r),this.version=4,i.e(1583).then(i.bind(i,38249)).then((e=>{ this._setPaneViews([new e.ElliottLabelsPaneView(this,this._model)])}))}migrateVersion(e,t,i){if(i.properties.hasChild("background")&&i.properties.removeProperty("background"),i.properties.hasChild("backgroundColor")&&i.properties.removeProperty("backgroundColor"),i.properties.hasChild("showBackground")&&i.properties.removeProperty("showBackground"),1===e){const e=Object.assign({},this._timePoint[0]);if(this._timePoint.unshift(e),this._points.length>0){const e=Object.assign({},this._points[0]);this._points.unshift(e)}}}applyTemplate(e){const t=e;delete t.background,delete t.backgroundColor,delete t.showBackground,super.applyTemplate(e)}name(){return"Elliott Labels"}additionalActions(e){return[new o.Action({actionId:"Chart.LineTool.Elliot.ChangeDegreeProperty",label:s.t(null,void 0,i(69479)),subItems:c.map((t=>{const i=d.filter((e=>e.value===t))[0];return new o.Action({actionId:"Chart.LineTool.Elliot.ChangeDegreeProperty",label:i.title,checkable:!0,checked:this.properties().childs().degree.value()===t,onExecute:()=>{e.setProperty(this.properties().childs().degree,t,h)}})}))})]}label(e){const t=c.length-this.properties().childs().degree.value()-1,i=Math.floor(t/3);return{group:i,bold:!!(i%2),decoration:["","brackets","circle"][t%3],label:this.labelsGroup()[i][e]}}availableDegreesValues(){return d}static createProperties(e){const t=new a.DefaultProperty("linetoolelliott",e);return this._configureProperties(t),t}static migrateState(e){const t={0:11,1:10,2:9,3:8,4:7,5:6,6:5,7:4,8:3},i={0:11,1:8};"LineToolElliottSubminuette"===e.type&&(e.type="LineToolElliottImpulse",e.state.degree=t[e.state.wavesize]),"LineToolElliottMinor"===e.type&&(e.type="LineToolElliottImpulse",e.state.degree=t[e.state.wavesize]),"LineToolElliottCircle"===e.type&&(e.type="LineToolElliottImpulse",e.state.degree=t[e.state.wavesize]),"LineToolElliottMinorRetr"===e.type&&(e.type="LineToolElliottCorrection",e.state.degree=i[e.state.wavesize]),"LineToolElliottMajorRetr"===e.type&&(e.type="LineToolElliottCorrection",e.state.degree=i[e.state.wavesize])}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,18437))).ElliottPatternDefinitionsViewModel}static _configureProperties(e){super._configureProperties(e),e.addChild("linesColors",new l.LineToolColorsProperty([e.childs().color])),e.addExclusion("linesColors")}}class p extends u{pointsCount(){return 6}}const _=[["0","1","2","3","4","5"],["0","i","ii","iii","iv","v"],["0","1","2","3","4","5"],["0","I","II","III","IV","V"],["0","1","2","3","4","5"]];class m extends p{constructor(e,t,i,s){super(e,t||m.createProperties(),i,s)}name(){return"Elliott Impulse Wave (12345)"}labelsGroup(){return _}static createProperties(e){const t=new a.DefaultProperty("linetoolelliottimpulse",e);return this._configureProperties(t),t}}const g=[["0","A","B","C","D","E"],["0","a","b","c","d","e"],["0","A","B","C","D","E"],["0","a","b","c","d","e"],["0","A","B","C","D","E"]];class f extends p{constructor(e,t,i,s){super(e,t||f.createProperties(),i,s)} -name(){return"Elliott Triangle Wave (ABCDE)"}labelsGroup(){return g}static createProperties(e){const t=new a.DefaultProperty("linetoolelliotttriangle",e);return this._configureProperties(t),t}}const v=[["0","W","X","Y","X","Z"],["0","w","x","y","x","z"],["0","W","X","Y","X","Z"],["0","w","x","y","x","z"],["0","W","X","Y","X","Z"]];class S extends p{constructor(e,t,i,s){super(e,null!=t?t:S.createProperties(),i,s)}name(){return"Elliott Triple Combo Wave (WXYXZ)"}labelsGroup(){return v}static createProperties(e){const t=new a.DefaultProperty("linetoolelliotttriplecombo",e);return this._configureProperties(t),t}}class y extends u{pointsCount(){return 4}}const b=[["0","A","B","C"],["0","a","b","c"],["0","A","B","C"],["0","a","b","c"],["0","A","B","C"]];class w extends y{constructor(e,t,i,s){super(e,null!=t?t:w.createProperties(),i,s)}name(){return"Elliott Correction Wave (ABC)"}labelsGroup(){return b}static createProperties(e){const t=new a.DefaultProperty("linetoolelliottcorrection",e);return this._configureProperties(t),t}}const C=[["0","W","X","Y"],["0","w","x","y"],["0","W","X","Y"],["0","w","x","y"],["0","W","X","Y"]];class P extends y{constructor(e,t,i,s){super(e,null!=t?t:P.createProperties(),i,s)}name(){return"Elliott Double Combo Wave (WXY)"}labelsGroup(){return C}static createProperties(e){const t=new a.DefaultProperty("linetoolelliottdoublecombo",e);return this._configureProperties(t),t}}},8283:(e,t,i)=>{"use strict";i.d(t,{LineToolEllipse:()=>d});var s=i(50151),r=i(4652),n=i(86441),o=i(26220),a=i.n(o),l=i(10971),c=i(7711),h=i(75862);class d extends l.LineDataSource{constructor(e,t,s,r){super(e,t||d.createProperties(),s,r),this.version=2,this._dist=null,this._fakePointAdded=!1,i.e(1583).then(i.bind(i,72284)).then((({EllipsePaneView:e})=>{this._setPaneViews([new e(this,this._model)])}))}startChanging(e,t){if(super.startChanging(e,t),0===e||1===e){const e=(0,s.ensureNotNull)(this.pointToScreenPoint(this._points[0])),t=(0,s.ensureNotNull)(this.pointToScreenPoint(this._points[1])),i=(0,s.ensureNotNull)(this.pointToScreenPoint(this._points[2]));this._dist=(0,r.distanceToLine)(e,t,i).distance||0}}addPoint(e,t,i){const s=super.addPoint(e,t,i);return s&&(this._fakePointAdded=!1),s}setPoint(e,t,i,o){const a={...t};let l=(0,s.ensureNotNull)(this.pointToScreenPoint(this._points[0])),c=(0,s.ensureNotNull)(this.pointToScreenPoint(this._points[1])),h=(0,s.ensureNotNull)(this.pointToScreenPoint(this._points[2]));switch(e){case 0:{if(i&&i.shift()){this._snapPoint45Degree(a,this._points[1]),this._points[0]=a,this._points[2]=this._preparePointInternal(this._points[2],i,!0),this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[0],this._points[1],this._points[2]);break}l=(0,s.ensureNotNull)(this.pointToScreenPoint(a));const e=c.subtract(l),t=l.add(c).scaled(.5),r=new n.Point(-e.y,e.x).normalized();h=t.add(r.scaled((0,s.ensureNotNull)(this._dist))),this._points[0]=a,this._points[2]=(0,s.ensureNotNull)(this.screenPointToPoint(h));break}case 1:{if(i&&i.shift()){ +name(){return"Elliott Triangle Wave (ABCDE)"}labelsGroup(){return g}static createProperties(e){const t=new a.DefaultProperty("linetoolelliotttriangle",e);return this._configureProperties(t),t}}const v=[["0","W","X","Y","X","Z"],["0","w","x","y","x","z"],["0","W","X","Y","X","Z"],["0","w","x","y","x","z"],["0","W","X","Y","X","Z"]];class S extends p{constructor(e,t,i,s){super(e,null!=t?t:S.createProperties(),i,s)}name(){return"Elliott Triple Combo Wave (WXYXZ)"}labelsGroup(){return v}static createProperties(e){const t=new a.DefaultProperty("linetoolelliotttriplecombo",e);return this._configureProperties(t),t}}class y extends u{pointsCount(){return 4}}const b=[["0","A","B","C"],["0","a","b","c"],["0","A","B","C"],["0","a","b","c"],["0","A","B","C"]];class w extends y{constructor(e,t,i,s){super(e,null!=t?t:w.createProperties(),i,s)}name(){return"Elliott Correction Wave (ABC)"}labelsGroup(){return b}static createProperties(e){const t=new a.DefaultProperty("linetoolelliottcorrection",e);return this._configureProperties(t),t}}const P=[["0","W","X","Y"],["0","w","x","y"],["0","W","X","Y"],["0","w","x","y"],["0","W","X","Y"]];class C extends y{constructor(e,t,i,s){super(e,null!=t?t:C.createProperties(),i,s)}name(){return"Elliott Double Combo Wave (WXY)"}labelsGroup(){return P}static createProperties(e){const t=new a.DefaultProperty("linetoolelliottdoublecombo",e);return this._configureProperties(t),t}}},8283:(e,t,i)=>{"use strict";i.d(t,{LineToolEllipse:()=>d});var s=i(50151),r=i(4652),n=i(86441),o=i(26220),a=i.n(o),l=i(10971),c=i(7711),h=i(75862);class d extends l.LineDataSource{constructor(e,t,s,r){super(e,t||d.createProperties(),s,r),this.version=2,this._dist=null,this._fakePointAdded=!1,i.e(1583).then(i.bind(i,72284)).then((({EllipsePaneView:e})=>{this._setPaneViews([new e(this,this._model)])}))}startChanging(e,t){if(super.startChanging(e,t),0===e||1===e){const e=(0,s.ensureNotNull)(this.pointToScreenPoint(this._points[0])),t=(0,s.ensureNotNull)(this.pointToScreenPoint(this._points[1])),i=(0,s.ensureNotNull)(this.pointToScreenPoint(this._points[2]));this._dist=(0,r.distanceToLine)(e,t,i).distance||0}}addPoint(e,t,i){const s=super.addPoint(e,t,i);return s&&(this._fakePointAdded=!1),s}setPoint(e,t,i,o){const a={...t};let l=(0,s.ensureNotNull)(this.pointToScreenPoint(this._points[0])),c=(0,s.ensureNotNull)(this.pointToScreenPoint(this._points[1])),h=(0,s.ensureNotNull)(this.pointToScreenPoint(this._points[2]));switch(e){case 0:{if(i&&i.shift()){this._snapPoint45Degree(a,this._points[1]),this._points[0]=a,this._points[2]=this._preparePointInternal(this._points[2],i,!0),this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[0],this._points[1],this._points[2]);break}l=(0,s.ensureNotNull)(this.pointToScreenPoint(a));const e=c.subtract(l),t=l.add(c).scaled(.5),r=new n.Point(-e.y,e.x).normalized();h=t.add(r.scaled((0,s.ensureNotNull)(this._dist))),this._points[0]=a,this._points[2]=(0,s.ensureNotNull)(this.screenPointToPoint(h));break}case 1:{if(i&&i.shift()){ this._snapPoint45Degree(a,this._points[0]),this._points[1]=a,this._points[2]=this._preparePointInternal(this._points[2],i,!0),this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[1],this._points[0],this._points[2]);break}c=(0,s.ensureNotNull)(this.pointToScreenPoint(a));const e=c.subtract(l),t=l.add(c).scaled(.5),r=new n.Point(-e.y,e.x).normalized();h=t.add(r.scaled((0,s.ensureNotNull)(this._dist))),this._points[1]=a,this._points[2]=(0,s.ensureNotNull)(this.screenPointToPoint(h));break}case 2:{const e=(0,s.ensureNotNull)(this.pointToScreenPoint(a)),t=(0,r.distanceToLine)(l,c,e).distance,i=c.subtract(l),o=l.add(c).scaled(.5),d=new n.Point(-i.y,i.x).normalized();h=o.add(d.scaled(t)),this._points[2]=(0,s.ensureNotNull)(this.screenPointToPoint(h));break}case 3:{const e=(0,s.ensureNotNull)(this.pointToScreenPoint(a)),t=(0,r.distanceToLine)(l,c,e).distance,i=c.subtract(l),o=l.add(c).scaled(.5),d=new n.Point(-i.y,i.x).normalized();h=o.add(d.scaled(t)),this._points[2]=(0,s.ensureNotNull)(this.screenPointToPoint(h));break}}this.normalizePoints()}pointsCount(){return 3}name(){return"Ellipse"}hasEditableCoordinates(){return!1}migrateVersion(e,t,i){if(1===e&&2===this._points.length){const e=this._points[0].price,t=.5*(this._points[0].price+this._points[1].price);this._points[0]={price:t,index:this._points[0].index},this._points[1]={price:t,index:this._points[1].index},this._points.push({price:e,index:this._points[0].index})}if(1===e&&2===this._timePoint.length){const e=this._timePoint[0].price,t=.5*(this._timePoint[0].price+this._timePoint[1].price);this._timePoint[0].price=t,this._timePoint[1].price=t;const i={price:e,offset:this._timePoint[0].offset,time_t:this._timePoint[0].time_t};this._timePoint.push(i)}}template(){const e=super.template();return e.text=this.properties().childs().text.value(),e}static createProperties(e){const t=new c.DefaultProperty("linetoolellipse",e);return this._configureProperties(t),t}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,9539))).EllipseCircleDefinitionsViewModel}_preparePoint(e,t){const i=this._preparePointInternal(e,t,!1);return t&&t.shift()&&this._points[0].index===this._points[1].index&&this._fixVerticalDiameterPoints(this._points[1],this._points[0],i),i}_applyTemplateImpl(e){super._applyTemplateImpl(e),this.properties().childs().text.setValue(e.text)}static _configureProperties(e){super._configureProperties(e),e.hasChild("text")||e.addChild("text",new(a())("")),e.addChild("linesColors",new h.LineToolColorsProperty([e.childs().color])),e.addChild("textsColors",new h.LineToolColorsProperty([e.childs().textColor],e.childs().showLabel)),e.addExclusion("text")}_preparePointInternal(e,t,i){let r={...e};if(t&&t.shift()){const t=this.points().length;if(!this._fakePointAdded&&3===t&&!i)return r;if(this._fakePointAdded||2===t||i){this._snapPoint45Degree(e,this._points[0]),this._fakePointAdded?this._points[1]=e:i||(this._fakePointAdded=!0,super._addPointIntenal(e)) ;const t=(0,s.ensureNotNull)(this.pointToScreenPoint(this._points[0])),o=(0,s.ensureNotNull)(this.pointToScreenPoint(this._points[1])),a=o.x-t.x,l=o.y-t.y,c=Math.sqrt(a*a+l*l)/2,h=o.subtract(t),d=t.add(o).scaled(.5),u=new n.Point(-h.y,h.x).normalized(),p=d.add(u.scaled(c));r=(0,s.ensureNotNull)(this.screenPointToPoint(p)),(isNaN(r.price)||isNaN(r.index))&&(r=(0,s.ensureNotNull)(this.screenPointToPoint(d)))}}else this._fakePointAdded&&(this._points.splice(1,1),this._fakePointAdded=!1);return r}_fixVerticalDiameterPoints(e,t,i){const r=(0,s.ensureNotNull)(this.pointToScreenPoint(e)),o=(0,s.ensureNotNull)(this.pointToScreenPoint(t)),a=this._model.timeScale(),l=a.indexToCoordinate(e.index),c=a.indexToCoordinate(i.index);let h=2*Math.abs(l-c);h*=t.price>e.price?1:-1,e.price=(0,s.ensureNotNull)(this.screenPointToPoint(new n.Point(r.x,o.y+h))).price}}},54445:(e,t,i)=>{"use strict";i.d(t,{LineToolEmoji:()=>c});var s=i(5692),r=i(98351),n=i(93043),o=i(7711),a=i(29111);const l=(0,r.getLogger)("Chart.LineToolEmoji");class c extends a.LineToolSvgIconBase{constructor(e,t,i,s){super(e,t||c.createProperties(),i,s),this.version=1,this._loadViews()}name(){return"Emoji"}static createProperties(e){const t=new o.DefaultProperty("linetoolemoji",e);return this._configureProperties(t),t}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,44785))).LineDataSourceDefinitionsViewModel}async _loadViews(){const e=this._properties.childs().emoji.value(),t=(0,s.getTwemojiUrl)(e,"svg");try{const[s,{EmojiPaneView:r},{svgRenderer:o}]=await Promise.all([(0,n.fetch)(t).then((e=>e.text())),i.e(1583).then(i.bind(i,11365)),i.e(2616).then(i.bind(i,33268))]);if(!this._isDestroyed){this._svgContent=s,this._onIconChanged.fire();const t=o(s);null===t&&l.logWarn(`Couldn't create svg renderer for emoji ${e}`),this._setPaneViews([new r(this,this._model,t)])}}catch(t){l.logWarn(`An error ocurred while loading emoji content ${e}: ${t}`)}}}},50059:(e,t,i)=>{"use strict";i.d(t,{ExecutionsPositionController:()=>u,LineToolExecution:()=>_});var s=i(50151),r=i(10971),n=i(88620),o=i(7711),a=i(33639),l=i(2484),c=i(50841),h=i(97425);const d=c.sortSourcesPreOrdered.LineToolExecution;class u{constructor(e){this._pane=e}getXYCoordinate(e,t,i){let r=0;const n=e.getDirection(),o="buy"===n,l=this._pane.model().mainSeries();if(l.bars){const e=o?10:-10,t=l.bars().search(i,a.PlotRowSearchMode.NearestLeft);if(null!==t){i=t.index;const n=o?t.value[3]:t.value[2],a=l.priceScale(),c=(0,s.ensureNotNull)(l.firstValue());r=a.priceToCoordinate(n,c)+e}}e.setAlignedTimePointIndex(i);const c=t.visibleBarsStrictRange();if(!isFinite(i)||null===c||i>c.lastBar()||i=0;--t){const s=h[t];if(!(s instanceof _)||s.adapter().alignedTimePointIndex()!==i||s.adapter().getDirection()!==n)continue;if(s===e.line())break;const a=s.adapter().height();r=o?r+a:r-a}return{x:t.indexToCoordinate(i), y:r}}static recreateOrderedByBarsSourcesCache(e){this.clearOrderedByBarsSourcesCache();const t=e.sourcesByGroup().all();for(const e of t){if(!(e instanceof _))continue;const t=e.adapter().alignedTimePointIndex();if(void 0===t)continue;const i=u._cachedByBarIndexOrderedExecutions[t]||[];u._cachedByBarIndexOrderedExecutions[t]=i,i.push(e)}}static clearOrderedByBarsSourcesCache(){u._cachedByBarIndexOrderedExecutions={}}}u._cachedByBarIndexOrderedExecutions={};class p{constructor(e,t){this._unixtime=NaN,this._line=e,this._model=t}alignedTimePointIndex(){return this._alignedTimePointIndex}setAlignedTimePointIndex(e){this._alignedTimePointIndex=e}line(){return this._line}getIndex(){return this._model.timeScale().baseIndex()-this._line.points()[0].index}setIndex(e){const t=this._model.timeScale().baseIndex()-Math.abs(e);this._line.startMoving({logical:this._line.points()[0]});const i={...this._line.points()[0]};return i.index=t,this._line.move({logical:i}),this._line.endMoving(!1),this}getTime(){return this._unixtime}setTime(e){return this._unixtime=e,this._line.restorePoints([{offset:0,price:this.getPrice(),time_t:this._unixtime}],[]),this._line.createServerPoints(),this}getPrice(){return this._line.points().length>0?this._line.points()[0].price:this._line.normalizedPoints().length>0?this._line.normalizedPoints()[0].price:NaN}setPrice(e){return this._line.points().length>0&&(this._line.points()[0].price=e),this._line.normalizedPoints().length>0&&(this._line.normalizedPoints()[0].price=e),this}getText(){return this._line.properties().childs().text.value()}setText(e){return this._line.properties().childs().text.setValue(e||""),this._line.updateAllViewsAndRedraw((0,h.sourceChangeEvent)(this._line.id())),this}getArrowHeight(){return this._line.properties().childs().arrowHeight.value()}setArrowHeight(e){return this._line.properties().childs().arrowHeight.setValue(e||5),this}getArrowSpacing(){return this._line.properties().childs().arrowSpacing.value()}setArrowSpacing(e){return this._line.properties().childs().arrowSpacing.setValue(e||1),this}getDirection(){return this._line.properties().childs().direction.value()}setDirection(e){return this._line.properties().childs().direction.setValue(e||"buy"),this}getArrowColor(){const e=this._line.properties().childs();return"buy"===this.getDirection()?e.arrowBuyColor.value():e.arrowSellColor.value()}setArrowColor(e){return"buy"===this.getDirection()?this.setArrowBuyColor(e):this.setArrowSellColor(e),this}setArrowBuyColor(e){return this._line.properties().childs().arrowBuyColor.setValue(e),this}setArrowSellColor(e){return this._line.properties().childs().arrowSellColor.setValue(e),this}getTextColor(){const e=this._line.properties().childs();return n.getColorFromProperties(e.textColor,e.textTransparency)}setTextColor(e){const t=this._line.properties().childs();return n.setColorToProperties(e,t.textColor,t.textTransparency),this}getFont(){const e=this._line.properties().childs();return n.getFontFromProperties(e.fontFamily,e.fontSize,e.fontBold,e.fontItalic)}setFont(e){ @@ -544,23 +544,23 @@ this.updateAllViews((0,l.sourceChangeEvent)(this.id())),this._model.updateSource return Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,29021)).then((e=>e.HighlighterDefinitionsViewModel))}_loadPaneViews(e){i.e(1583).then(i.bind(i,75073)).then((t=>{this._setPaneViews([new t.HighlighterPaneView(this,e)])}))}}},72666:(e,t,i)=>{"use strict";i.d(t,{LineToolHorzLinePriceAxisView:()=>n});var s=i(67876),r=i(38031);class n extends s.PriceAxisView{constructor(e){super(),this._source=e}_updateRendererData(e,t,i){e.visible=!1;const s=this._source.points(),n=this._source.priceScale();if(0===s.length||null===n||n.isEmpty())return;const o=s[0];if(!isFinite(o.price))return;const a=this._source.ownerSource(),l=null!==a?a.firstValue():null;if(null===l)return;const c=(0,r.resetTransparency)(this._source.properties().linecolor.value());i.background=c,i.textColor=this.generateTextColor(c),i.coordinate=n.priceToCoordinate(o.price,l),e.text=n.formatPrice(o.price,l),e.visible=!0}}},71559:(e,t,i)=>{"use strict";i.d(t,{LineToolHorzLine:()=>l});var s=i(26220),r=i.n(s),n=i(7711),o=i(10971),a=i(72666);class l extends o.LineDataSource{constructor(e,t,s,r){super(e,t||l.createProperties(),s,r),this._priceAxisView=new a.LineToolHorzLinePriceAxisView(this),i.e(1583).then(i.bind(i,15557)).then((({HorzLinePaneView:e})=>{this._setPaneViews([new e(this,this._model)])}))}state(e){const t=super.state(e);return t.points&&0!==t.points.length&&(t.points[0].offset=0),t}pointsCount(){return 1}name(){return"Horizontal Line"}priceAxisViews(e,t){return this.isSourceHidden()||t!==this.priceScale()||!this._model.selection().isSelected(this)&&!this.properties().childs().showPrice.value()||e!==this._model.paneForSource(this)?null:[this._priceAxisView]}timeAxisViews(){return null}timeAxisPoints(){return[]}updateAllViews(e){super.updateAllViews(e),this._priceAxisView.update(e)}canHasAlert(){return!0}template(){const e=super.template();return e.text=this.properties().childs().text.value(),e}denormalizeTimePoints(){this._points=[],this._timePoint.length>0&&this._points.push({price:this._timePoint[0].price,index:0})}clearData(){const e=this._points;super.clearData(),this._points=e}static createProperties(e){const t=new n.DefaultProperty("linetoolhorzline",e);return this._configureProperties(t),t}_getAlertPlots(){return[this.points()[0].price]}_pointsForPointset(){return[]}_getPropertyDefinitionsViewModelClass(){return Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,4608)).then((e=>e.HorizontalLineDefinitionsViewModel))}_applyTemplateImpl(e){super._applyTemplateImpl(e),this.properties().childs().text.setValue(e.text||"")}static _configureProperties(e){super._configureProperties(e),e.hasChild("text")||e.addChild("text",new(r())("")),e.addExclusion("text")}}},59810:(e,t,i)=>{"use strict";i.d(t,{LineToolHorzRay:()=>l});var s=i(7711),r=i(26220),n=i.n(r),o=i(72666),a=i(10971);class l extends a.LineDataSource{constructor(e,t,s,r){super(e,null!=t?t:l.createProperties(),s,r),this._priceAxisView=new o.LineToolHorzLinePriceAxisView(this),i.e(1583).then(i.bind(i,64019)).then((({HorzRayPaneView:e})=>{ this._setPaneViews([new e(this,this._model)])}))}pointsCount(){return 1}name(){return"Horizontal Ray"}priceAxisViews(e,t){return this.isSourceHidden()||t!==this.priceScale()||!this._model.selection().isSelected(this)&&!this.properties().childs().showPrice.value()||e!==this._model.paneForSource(this)?null:[this._priceAxisView]}updateAllViews(e){super.updateAllViews(e),this._priceAxisView.update(e)}template(){const e=super.template();return e.text=this.properties().childs().text.value(),e}canHasAlert(){return!0}static createProperties(e){const t=new s.DefaultProperty("linetoolhorzray",e);return this._configureProperties(t),t}_getAlertPlots(){const e=this._points[0],t={index:e.index+1,price:e.price},i=this._linePointsToAlertPlot([e,t],null,!1,!0);return null!==i?[i]:[]}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,74099))).HorizontalRayDefinitionsViewModel}_applyTemplateImpl(e){super._applyTemplateImpl(e),this.properties().childs().text.setValue(e.text||"")}static _configureProperties(e){super._configureProperties(e),e.hasChild("text")||e.addChild("text",new(n())("")),e.addExclusion("text")}}},93615:(e,t,i)=>{"use strict";i.d(t,{LineToolIcon:()=>a});var s=i(7711),r=i(75862),n=i(29111);const o=(0,i(98351).getLogger)("Chart.LineToolIcon");class a extends n.LineToolSvgIconBase{constructor(e,t,i,s){super(e,t||a.createProperties(),i,s),this.version=1,this._loadViews()}name(){return"Icon"}applyTemplate(e){delete e.icon,super.applyTemplate(e)}static createProperties(e){const t=new s.DefaultProperty("linetoolicon",e);return this._configureProperties(t),t}_getPropertyDefinitionsViewModelClass(){return Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,33317)).then((e=>e.IconsDefinitionsViewModel))}async _loadViews(){const[{getSvgContentForCharCode:e,getSvgRenderer:t},{IconPaneView:s},{svgRenderer:r}]=await Promise.all([i.e(7987).then(i.bind(i,30414)),i.e(1583).then(i.bind(i,57850)),i.e(2616).then(i.bind(i,33268))]);if(!this._isDestroyed){const i=this._properties.childs().icon.value();this._svgContent=e(i),this._onIconChanged.fire();const n=t(r,i);null===n&&o.logWarn(`Couldn't create svg renderer for icon ${i}`),this._setPaneViews([new s(this,this._model,n)])}}static _configureProperties(e){super._configureProperties(e),e.addChild("backgroundsColors",new r.LineToolColorsProperty([e.childs().color]))}}},75693:(e,t,i)=>{"use strict";i.d(t,{LineToolInfoLine:()=>n});var s=i(7711),r=i(33818);class n extends r.LineToolTrendLine{constructor(e,t,i,s){super(e,t||n.createProperties(),i,s)}pointsCount(){return 2}name(){return"Info Line"}static createProperties(e){const t=new s.DefaultProperty("linetoolinfoline",e);return this._configureProperties(t),t}}},95109:(e,t,i)=>{"use strict";var s=i(85038).LevelsProperty,r=i(96730).LineToolPitchfork;class n extends r{constructor(e,t,i,s){super(e,t||n.createProperties(),i,s)}name(){return"Inside Pitchfork"}static createProperties(e){var t=new s("linetoolinsidepitchfork",e,!1,{ range:[0,8]});return this._configureProperties(t),t}}t.LineToolInsidePitchfork=n},28667:(e,t,i)=>{"use strict";var s;i.r(t),i.d(t,{isMtpPredictorToolName:()=>o,isStudyLineToolName:()=>a,isLineToolName:()=>l,isLineDrawnWithPressedButton:()=>c,isLineToolFinishRequiredWhenCreatedByApi:()=>h,isLineToolDrawWithoutPoints:()=>d,isImageToolName:()=>u,isTextToolName:()=>p});var r=i(46359);const n=new Set([]);function o(e){return n.has(e)}function a(e){return"LineToolRegressionTrend"===e||"LineToolVbPFixed"===e||"LineToolFixedRangeVolumeProfile"===e}function l(e){return e in(s||(s=i.t(r,2)))||a(e)}function c(e){return"LineToolBrush"===e||"LineToolHighlighter"===e}function h(e){return c(e)||"LineToolPath"===e||"LineToolPolyline"===e||"LineToolGhostFeed"===e}function d(e){return"LineToolTweet"===e||"LineToolIdea"===e||"LineToolImage"===e}function u(e){return"LineToolImage"===e}function p(e){switch(e){case"LineToolBalloon":case"LineToolComment":case"LineToolText":case"LineToolTextAbsolute":case"LineToolCallout":case"LineToolNote":case"LineToolNoteAbsolute":case"LineToolSignpost":return!0}return!1}},17730:(e,t,i)=>{"use strict";i.d(t,{LineDataSourcePointIndexProperty:()=>n});var s=i(26220),r=i.n(s);class n extends(r()){constructor(e,t){super(),this._lineSource=e,this._pointIndex=t}value(){return this._lineSource.points()[this._pointIndex].index}setValue(e){const t=this._lineSource.points()[this._pointIndex];t.index=e,this._lineSource.startChanging(this._pointIndex,t),this._setPointImpl(t),this._lineSource.model().updateSource(this._lineSource),this._listeners.fire(this);const i=this._lineSource.endChanging(!0,!1);this._lineSource.syncMultichartState(i)}_setPointImpl(e){this._lineSource.setPoint(this._pointIndex,e)}}},28537:(e,t,i)=>{"use strict";i.d(t,{LineToolPriceAxisView:()=>o});var s=i(50151),r=i(67876),n=i(38031);class o extends r.PriceAxisView{constructor(e,t){super(),this._active=!1,this._source=e,this._data=t,this._properties=e.model().properties().childs().scalesProperties}setActive(e){this._active=e}_updateRendererData(e,t,i){e.visible=!1;const s=this._source.model();if(!s.timeScale()||s.timeScale().isEmpty())return;const r=this._source.priceScale();if(null===r||r.isEmpty())return;if(!s.selection().isSelected(this._source)&&!this._source.isForcedDrawPriceAxisLabel())return;if(null===s.timeScale().visibleBarsStrictRange())return;const o=this._source.priceAxisPoints(),a=this._data.pointIndex;if(o.length<=a)return;const l=o[a];if(!isFinite(l.price))return;const c=this._source.ownerSource(),h=null!==c?c.firstValue():null;if(null===h)return;let d=this._data.backgroundPropertyGetter?this._data.backgroundPropertyGetter():null;null===d&&(d=this._getBgColor()),i.background=(0,n.resetTransparency)(d),i.borderColor="#2E84A6",i.textColor=this.generateTextColor(i.background),i.coordinate=r.priceToCoordinate(l.price,h),e.text=this._formatPrice(l.price,h),e.visible=!0}_getBgColor(){ -return this._active?this._properties.childs().axisLineToolLabelBackgroundColorActive.value():this._properties.childs().axisLineToolLabelBackgroundColorCommon.value()}_formatPrice(e,t){return(0,s.ensureNotNull)(this._source.priceScale()).formatPrice(e,t)}}},93302:(e,t,i)=>{"use strict";i.d(t,{LineDataSourceTimeAxisView:()=>r});var s=i(2893);class r extends s.TimeAxisView{constructor(e,t){super(e.model()),this._active=!1,this._source=e,this._pointIndex=t,this._properties=e.model().properties().childs().scalesProperties}setActive(e){this._active=e}_getBgColor(){return this._active?this._properties.childs().axisLineToolLabelBackgroundColorActive.value():this._properties.childs().axisLineToolLabelBackgroundColorCommon.value()}_getIndex(){if(!this._model.selection().isSelected(this._source))return null;const e=this._source.timeAxisPoints();return e.length<=this._pointIndex?null:e[this._pointIndex].index}_isVisible(){return!0}}},10971:(e,t,i)=>{"use strict";i.d(t,{LineDataSource:()=>O});var s=i(86441),r=i(50151),n=i(76422),o=i(98351),a=i(2484),l=i(26867),c=i.n(l),h=i(85228),d=i(40549),u=i.n(d),p=i(36646),_=i(92133),m=i(10621),g=i(7006),f=i(1930),v=i(90854),S=i(578),y=i(26220),b=i.n(y),w=i(76076),C=i(80230),P=i(93618),T=i(65665),x=i(97425),I=i(21580),M=i(17730);class A extends(b()){constructor(e,t){super(),this._lineSource=e,this._pointIndex=t,e.pointAdded().subscribe(this,(e=>{this._pointIndex===e&&this._listeners.fire(this)})),e.pointChanged().subscribe(this,(e=>{this._pointIndex===e&&this._listeners.fire(this)}))}value(){const e=this._lineSource.points()[this._pointIndex].price,t=(0,r.ensureNotNull)(this._lineSource.ownerSource()).formatter();if(t.parse){const i=t.format(e),s=t.parse(i);return s.res?s.value:e}return e}setValue(e){const t=this._lineSource.points()[this._pointIndex];t.price=parseFloat(""+e),this._lineSource.startChanging(this._pointIndex,t),this._lineSource.setPoint(this._pointIndex,t),this._lineSource.model().updateSource(this._lineSource),this._listeners.fire(this);const i=this._lineSource.endChanging(!0,!1);this._lineSource.syncMultichartState(i)}}var L=i(93302),k=i(28537),E=i(75862),D=i(58631);const V=(0,o.getLogger)("Chart.LineDataSource"),B=a.enabled("datasource_copypaste");class R{constructor(){this._states=[]}start(e){this._states.push(e)}finish(e){const t=(0,r.ensureDefined)(this._states.pop());return s=t,(i=e).length!==s.length?{indexesChanged:!0,pricesChanged:!0}:i.reduce(((e,t,i)=>{const r=s[i];return e.indexesChanged=e.indexesChanged||t.index!==r.index,e.pricesChanged=e.pricesChanged||t.price!==r.price,e}),{indexesChanged:!1,pricesChanged:!1});var i,s}isEmpty(){return 0===this._states.length}}let N=0;class O extends C.DataSource{constructor(e,t,i,s){if(super(s),this.version=1,this.toolname="",this.customization={forcePriceAxisLabel:!1,disableErasing:!1,disableSave:!1,showInObjectsTree:!0},this._currentPointsetAndSymbolId=null,this._pointChanged=new(c()),this._pointAdded=new(c()),this._priceAxisViews=[],this._timeAxisViews=[],this._timePoint=[],this._points=[],this._lastPoint=null, +return this._active?this._properties.childs().axisLineToolLabelBackgroundColorActive.value():this._properties.childs().axisLineToolLabelBackgroundColorCommon.value()}_formatPrice(e,t){return(0,s.ensureNotNull)(this._source.priceScale()).formatPrice(e,t)}}},93302:(e,t,i)=>{"use strict";i.d(t,{LineDataSourceTimeAxisView:()=>r});var s=i(2893);class r extends s.TimeAxisView{constructor(e,t){super(e.model()),this._active=!1,this._source=e,this._pointIndex=t,this._properties=e.model().properties().childs().scalesProperties}setActive(e){this._active=e}_getBgColor(){return this._active?this._properties.childs().axisLineToolLabelBackgroundColorActive.value():this._properties.childs().axisLineToolLabelBackgroundColorCommon.value()}_getIndex(){if(!this._model.selection().isSelected(this._source))return null;const e=this._source.timeAxisPoints();return e.length<=this._pointIndex?null:e[this._pointIndex].index}_isVisible(){return!0}}},10971:(e,t,i)=>{"use strict";i.d(t,{LineDataSource:()=>O});var s=i(86441),r=i(50151),n=i(76422),o=i(98351),a=i(2484),l=i(26867),c=i.n(l),h=i(85228),d=i(40549),u=i.n(d),p=i(36646),_=i(92133),m=i(10621),g=i(7006),f=i(1930),v=i(90854),S=i(578),y=i(26220),b=i.n(y),w=i(76076),P=i(80230),C=i(93618),T=i(65665),x=i(97425),I=i(21580),M=i(17730);class A extends(b()){constructor(e,t){super(),this._lineSource=e,this._pointIndex=t,e.pointAdded().subscribe(this,(e=>{this._pointIndex===e&&this._listeners.fire(this)})),e.pointChanged().subscribe(this,(e=>{this._pointIndex===e&&this._listeners.fire(this)}))}value(){const e=this._lineSource.points()[this._pointIndex].price,t=(0,r.ensureNotNull)(this._lineSource.ownerSource()).formatter();if(t.parse){const i=t.format(e),s=t.parse(i);return s.res?s.value:e}return e}setValue(e){const t=this._lineSource.points()[this._pointIndex];t.price=parseFloat(""+e),this._lineSource.startChanging(this._pointIndex,t),this._lineSource.setPoint(this._pointIndex,t),this._lineSource.model().updateSource(this._lineSource),this._listeners.fire(this);const i=this._lineSource.endChanging(!0,!1);this._lineSource.syncMultichartState(i)}}var L=i(93302),k=i(28537),E=i(75862),D=i(58631);const B=(0,o.getLogger)("Chart.LineDataSource"),V=a.enabled("datasource_copypaste");class R{constructor(){this._states=[]}start(e){this._states.push(e)}finish(e){const t=(0,r.ensureDefined)(this._states.pop());return s=t,(i=e).length!==s.length?{indexesChanged:!0,pricesChanged:!0}:i.reduce(((e,t,i)=>{const r=s[i];return e.indexesChanged=e.indexesChanged||t.index!==r.index,e.pricesChanged=e.pricesChanged||t.price!==r.price,e}),{indexesChanged:!1,pricesChanged:!1});var i,s}isEmpty(){return 0===this._states.length}}let N=0;class O extends P.DataSource{constructor(e,t,i,s){if(super(s),this.version=1,this.toolname="",this.customization={forcePriceAxisLabel:!1,disableErasing:!1,disableSave:!1,showInObjectsTree:!0},this._currentPointsetAndSymbolId=null,this._pointChanged=new(c()),this._pointAdded=new(c()),this._priceAxisViews=[],this._timeAxisViews=[],this._timePoint=[],this._points=[],this._lastPoint=null, this._paneViews=new Map,this._normalizedPointsChanged=new(c()),this._fixedPointsChanged=new(c()),this._changeStatesStack=new R,this._startMovingPoint=null,this._currentMovingPoint=null,this._isActualSymbol=!1,this._isActualInterval=!1,this._isActualCurrency=!1,this._isActualUnit=!1,this._isDestroyed=!1,this._sharingMode=new(u())(0),this._onTemplateApplying=new(c()),this._onTemplateApplied=new(c()),this._syncStateExclusions=[],this._definitionsViewModel=null,this._syncLineStyleMuted=!1,this._onIsActualIntervalChange=new(c()),this._linkKey=new(u())(null),this._serverUpdateTime=null,this._boundCalcIsActualSymbol=this.calcIsActualSymbol.bind(this),this._alertUndoMode=!1,this._model=e,this._properties=t,this._localAndServerAlertsMismatch=!1,this._properties.hasChild("interval")||this._properties.addChild("interval",new(b())(e.mainSeries().interval())),this.calcIsActualSymbol(),this._properties.childs().intervalsVisibilities.listeners().subscribe(this,this.calcIsActualSymbol),this._properties.subscribe(this,(()=>this.propertiesChanged())),this._createPointsProperties(),this.pointsCount()>0)for(let e=0;e{const t=!1===(0,w.hideAllDrawings)().value();e.value()?e.value()&&t&&n.emit("drawing_event",this._id,"show"):(this._model.selection().isSelected(this)&&this._model.selectionMacro((e=>{e.removeSourceFromSelection(this)})),t&&n.emit("drawing_event",this._id,"hide")),this._onSourceHiddenMayChange()})),(0,w.hideAllDrawings)().subscribe(this,this._onSourceHiddenMayChange),this._definitionsViewModel=null,this._isDestroyed=!1}destroy(){this._paneViews.forEach(((e,t)=>this._destroyPanePaneViews(t))),this.stop(),null!==this._definitionsViewModel&&(this._definitionsViewModel.destroy(),this._definitionsViewModel=null),null!==this._ownerSource&&(this._ownerSource.currencyChanged().unsubscribeAll(this),this._ownerSource.unitChanged().unsubscribeAll(this),(0,I.isSymbolSource)(this._ownerSource)&&(this._ownerSource.symbolResolved().subscribe(this,this._boundCalcIsActualSymbol),this._ownerSource.isActingAsSymbolSource().unsubscribe(this._boundCalcIsActualSymbol))),this.ownerSourceChanged().unsubscribeAll(this),(0,w.hideAllDrawings)().unsubscribeAll(this),this._isDestroyed=!0}priceScale(){return this._ownerSource?this._ownerSource.priceScale():null}createPriceAxisView(e){return new k.LineToolPriceAxisView(this,{pointIndex:e})}model(){return this._model}symbol(){return this._properties.childs().symbol.value()}linkKey(){return this._linkKey}serverUpdateTime(){return this._serverUpdateTime}setServerUpdateTime(e){this._serverUpdateTime=e}boundToSymbol(){return!0}isAvailableInFloatingWidget(){return!0}points(){const e=[];for(let t=0;t{const i=(0,r.ensureNotNull)(this.pointToScreenPoint(t)),n=i.x/this._model.timeScale().width(),o=i.y/e.height();return new s.Point(n,o)}))}widthsProperty(){var e;return null!==(e=this._properties.childs().linesWidths)&&void 0!==e?e:null}lineColorsProperty(){var e;return null!==(e=this._properties.childs().linesColors)&&void 0!==e?e:null}backgroundColorsProperty(){var e;return null!==(e=this._properties.childs().backgroundsColors)&&void 0!==e?e:null}textColorsProperty(){var e;return null!==(e=this._properties.childs().textsColors)&&void 0!==e?e:null}pointsProperty(){return this._pointsProperty}hasEditableCoordinates(){return!0}startMoving(e,t,i,s){this.isFixed()&&this.restoreFixedPoint(),this._startMovingPoint=e}move(e,t,i,s){if(i&&(i.shiftOnly()||i.modShift()))if(this.isFixed()){const t=this._alignScreenPointHorizontallyOrVertically((0,r.ensureDefined)(e.screen));this._currentMovingPoint={screen:t}}else{const t=this._alignPointHorizontallyOrVertically((0,r.ensureDefined)(e.logical)),i=(0,r.ensureNotNull)(this.pointToScreenPoint(t));this._currentMovingPoint={logical:t,screen:i}}else this._currentMovingPoint=e;this.updateAllViews((0,x.sourceChangeEvent)(this.id()))}endMoving(e,t,i){let s=!1,o=!1;if(this._currentMovingPoint&&this._startMovingPoint){if(this.isFixed()){const e=this._correctFixedPoint((0,r.ensureDefined)(this._fixedPoint));e.didCorrect&&(this._fixedPoint=e.point,this._fixedPointsChanged.fire())}else{const e=(0,r.ensureDefined)(this._currentMovingPoint.logical),t=(0,r.ensureDefined)(this._startMovingPoint.logical);s=e.index!==t.index,o=e.price!==t.price;if(this._correctPoints(this._points,i)){n.emit("drawing_event",this._id,"move"),n.emit("drawing_event",this._id,"points_changed");for(let e=0;e0&&(this._points=e)}restorePoints(e,t,i){const s=this._timePoint.length>0&&!(0,T.deepEquals)(this._timePoint,e)[0];this._timePoint=(0,h.deepCopy)(e),this._points=t,i||this.denormalizeTimePoints(),s&&this._normalizedPointsChanged.fire()}restorePositionPercents(e){this._positionPercents=e}calcIsActualSymbol(){const e=this.ownerSource();if(null===e)this._isActualSymbol=!1;else{const t=(0,r.ensureNotNull)(e.symbolSource());this._migrateSymbolProperty();const i=this._properties.childs().symbol,s=i.value();if(this._isActualSymbol=t.symbolSameAsCurrent(s),this._isActualSymbol){const e=t.symbol();(0,v.areEqualSymbols)(s,e)||(V.logWarn('Possible drawing "migrating" detected from "'+s+'" to "'+e+'"'),V.logWarn("Series symbolInfo: "+JSON.stringify(t.symbolInfo())),V.logWarn(`${(new Error).stack}`)),i.setValue(e)}}this.calcIsActualInterval(),this.calcIsActualCurrency(),this.calcIsActualUnit(),this._onSourceHiddenMayChange()}calcIsActualCurrency(){const e=this.ownerSource();if(null===e)return void(this._isActualCurrency=!1);let t=this._properties.childs().currencyId.value();if(null!==t){const i=e.symbolSource();0,this._isActualCurrency=t===(0,f.symbolCurrency)(i.symbolInfo(),void 0,!0) -}else{const t=(0,r.ensureNotNull)(e.symbolSource()).symbolInfo();this._isActualCurrency=null!==t&&(0,f.symbolCurrency)(t)===(0,f.symbolOriginalCurrency)(t)}this._onSourceHiddenMayChange()}calcIsActualUnit(){const e=this.ownerSource();if(null===e)return void(this._isActualUnit=!1);const t=this._properties.childs().unitId.value();if(null!==t)this._isActualUnit=t===(0,r.ensureNotNull)(e.symbolSource()).unit();else{const t=(0,r.ensureNotNull)(e.symbolSource()).symbolInfo(),i=this._model.unitConversionEnabled();this._isActualUnit=null!==t&&(0,f.symbolUnit)(t,i)===(0,f.symbolOriginalUnit)(t,i)}this._onSourceHiddenMayChange()}calcIsActualInterval(){const e=this._isActualInterval,t=this._properties,i=this._model.mainSeries();this._isActualInterval=(0,m.isActualInterval)(S.Interval.parse(i.interval()),t.childs().intervalsVisibilities),!this._isActualInterval&&this._model.selection().isSelected(this)&&this._model.selectionMacro((e=>e.removeSourceFromSelection(this))),this._isActualInterval!==e&&this._onIsActualIntervalChange.fire(),this._onSourceHiddenMayChange()}paneViews(e){if(this.isSourceHidden())return null;const t=this._getPaneViews(this.isMultiPaneAvailable()?e:void 0);if(null===t)return null;if(1===t.length)return[t[0]];const i=[];for(let e=t.length-1;e>=0;--e)i.push(t[e]);return i}priceAxisViews(e,t){if(t!==this.priceScale()||this.isSourceHidden())return null;if(this._model.lineBeingEdited()===this){const e=this._model.linePointBeingEdited();if(null!==e&&e0&&(this._points=e)}restorePoints(e,t,i){const s=this._timePoint.length>0&&!(0,T.deepEquals)(this._timePoint,e)[0];this._timePoint=(0,h.deepCopy)(e),this._points=t,i||this.denormalizeTimePoints(),s&&this._normalizedPointsChanged.fire()}restorePositionPercents(e){this._positionPercents=e}calcIsActualSymbol(){const e=this.ownerSource();if(null===e)this._isActualSymbol=!1;else{const t=(0,r.ensureNotNull)(e.symbolSource());this._migrateSymbolProperty();const i=this._properties.childs().symbol,s=i.value();if(this._isActualSymbol=t.symbolSameAsCurrent(s),this._isActualSymbol){const e=t.symbol();(0,v.areEqualSymbols)(s,e)||(B.logWarn('Possible drawing "migrating" detected from "'+s+'" to "'+e+'"'),B.logWarn("Series symbolInfo: "+JSON.stringify(t.symbolInfo())),B.logWarn(`${(new Error).stack}`)),i.setValue(e)}}this.calcIsActualInterval(),this.calcIsActualCurrency(),this.calcIsActualUnit(),this._onSourceHiddenMayChange()}calcIsActualCurrency(){const e=this.ownerSource();if(null===e)return void(this._isActualCurrency=!1);let t=this._properties.childs().currencyId.value();if(null!==t){const i=e.symbolSource();0,this._isActualCurrency=t===(0,f.symbolCurrency)(i.symbolInfo(),void 0,!0) +}else{const t=(0,r.ensureNotNull)(e.symbolSource()).symbolInfo();this._isActualCurrency=null!==t&&(0,f.symbolCurrency)(t)===(0,f.symbolOriginalCurrency)(t)}this._onSourceHiddenMayChange()}calcIsActualUnit(){const e=this.ownerSource();if(null===e)return void(this._isActualUnit=!1);const t=this._properties.childs().unitId.value();if(null!==t)this._isActualUnit=t===(0,r.ensureNotNull)(e.symbolSource()).unit();else{const t=(0,r.ensureNotNull)(e.symbolSource()).symbolInfo(),i=this._model.unitConversionEnabled();this._isActualUnit=null!==t&&(0,f.symbolUnit)(t,i)===(0,f.symbolOriginalUnit)(t,i)}this._onSourceHiddenMayChange()}calcIsActualInterval(){const e=this._isActualInterval,t=this._properties,i=this._model.mainSeries();this._isActualInterval=(0,m.isActualInterval)(S.Interval.parse(i.interval()),t.childs().intervalsVisibilities),!this._isActualInterval&&this._model.selection().isSelected(this)&&this._model.selectionMacro((e=>e.removeSourceFromSelection(this))),this._isActualInterval!==e&&this._onIsActualIntervalChange.fire(),this._onSourceHiddenMayChange()}paneViews(e){if(this.isSourceHidden())return null;const t=this._getPaneViews(this.isMultiPaneAvailable()?e:void 0);if(null===t)return null;if(1===t.length)return[t[0]];const i=[];for(let e=t.length-1;e>=0;--e)i.push(t[e]);return i}priceAxisViews(e,t){if(t!==this.priceScale()||this.isSourceHidden())return null;if(this._model.lineBeingEdited()===this){const e=this._model.linePointBeingEdited();if(null!==e&&e0}pointAdded(){return this._pointAdded}pointChanged(){return this._pointChanged}pointToScreenPoint(e){var t;const i=this._model.timeScale(),r=this.priceScale(),n=null===(t=this.ownerSource())||void 0===t?void 0:t.firstValue();if(!r||r.isEmpty()||i.isEmpty()||null==n)return null;const o=i.indexToCoordinate(e.index),a=r.priceToCoordinate(e.price,n);return new s.Point(o,a)}screenPointToPoint(e){var t;const i=this.priceScale(),s=null===(t=this.ownerSource())||void 0===t?void 0:t.firstValue();if(null==s||!isFinite(s)||null===i)return null;const r=this._model.timeScale().coordinateToIndex(e.x);return{price:i.coordinateToPrice(e.y,s),index:r}}calcMiddlePoint(e,t){return new s.Point((e.x+t.x)/2,(e.y+t.y)/2)}addPoint(e,t,i){const s=this._preparePoint(e,t);return this._addPointIntenal(s,t,i)}addFixedPoint(e){return this._fixedPoint=e,this.calcPositionPercents(),!0}calcPositionPercents(){const e=this.priceScale();if(!e||e.isEmpty()||void 0===this._fixedPoint)return;const t=this._fixedPoint.x/this._model.timeScale().width(),i=this._fixedPoint.y/e.height();return this._positionPercents={x:t,y:i},this._positionPercents}restoreFixedPoint(){this._fixedPoint=this.fixedPoint()}getPointByPosition(e,t,i,s){return[t,i,s][e]}propertiesChanged(e){this.calcIsActualInterval(),this.updateAllViewsAndRedraw((0,x.sourceChangeEvent)(this.id())),e||this._syncLineStyleIfNeeded(),void 0===this._pendingPropertyChangedEvent&&(this._pendingPropertyChangedEvent=setTimeout((()=>{this._pendingPropertyChangedEvent=void 0,n.emit("drawing_event",this._id,"properties_changed")}),0))}state(e){var t,i;const s={type:this.toolname,id:this.id(),state:this.properties().state(null!==(t=this._propertiesStateExclusions())&&void 0!==t?t:void 0),points:(0,h.deepCopy)(this._timePoint),zorder:this.zorder(),ownerSource:null===(i=this.ownerSource())||void 0===i?void 0:i.id()};return this.linkKey().value()&&(s.linkKey=this.linkKey().value()), -delete s.state.points,e&&(s.indexes=this._points),this.isFixed()&&(s.positionPercents=this._positionPercents||this.calcPositionPercents()),"version"in this&&1!==this.version&&(s.version=this.version),s}updateAllViews(e){this._isActualSymbol&&this._isActualCurrency&&this._isActualUnit&&this._isActualInterval&&this._properties.childs().visible.value()&&(this._updateAllPaneViews(e),this._priceAxisViews.forEach((t=>t.update(e))),this._timeAxisViews.forEach((t=>t.update(e))))}updateAllViewsAndRedraw(e){this.updateAllViews(e),this._model.updateSource(this)}tags(){return[this.toolname]}properties(){return this._properties}restoreExternalPoints(e,t){if(this._timePoint=(0,h.deepCopy)(e.points),t.indexesChanged){if(this.properties().childs().interval.setValue(e.interval),!this.isActualSymbol())return this._clearServerPoints(),void this._normalizedPointsChanged.fire();this.createServerPoints()}else{const t=Math.min(this._points.length,e.points.length);for(let i=0;i0&&this.normalizePoints(),!this._readyToCreatePointset())return;const e=this._pointsForPointset();if(0===e.length)return;++N,this._currentPointsetAndSymbolId={pointsetId:N,symbolId:(0,r.ensureNotNull)(this._model.mainSeries().seriesSource().symbolInstanceId())};const t=(0,_.getServerInterval)(this.properties().childs().interval.value()) +delete s.state.points,e&&(s.indexes=this._points),this.isFixed()&&(s.positionPercents=this._positionPercents||this.calcPositionPercents()),"version"in this&&1!==this.version&&(s.version=this.version),s}updateAllViews(e){this._isActualSymbol&&this._isActualCurrency&&this._isActualUnit&&this._isActualInterval&&this._properties.childs().visible.value()&&(this._updateAllPaneViews(e),this._priceAxisViews.forEach((t=>t.update(e))),this._timeAxisViews.forEach((t=>t.update(e))))}updateAllViewsAndRedraw(e){this.updateAllViews(e),this._model.updateSource(this)}tags(){return[this.toolname]}properties(){return this._properties}restoreExternalPoints(e,t){if(this._timePoint=(0,h.deepCopy)(e.points),t.indexesChanged){if(this.properties().childs().interval.setValue(e.interval),!this.isActualSymbol())return this._clearServerPoints(),void this._normalizedPointsChanged.fire();this.createServerPoints()}else{const t=Math.min(this._points.length,e.points.length);for(let i=0;i0&&this.normalizePoints(),!this._readyToCreatePointset())return;const e=this._pointsForPointset();if(0===e.length)return;++N,this._currentPointsetAndSymbolId={pointsetId:N,symbolId:(0,r.ensureNotNull)(this._model.mainSeries().seriesSource().symbolInstanceId())};const t=(0,_.getServerInterval)(this.properties().childs().interval.value()) ;this._model.chartApi().createPointset(this._currentPointsetIdWithPrefix(),"turnaround",this._currentPointsetAndSymbolId.symbolId,t,e,this.onData.bind(this))}finish(){}realign(){var e;this.calcIsActualSymbol(),this.isFixed()||this.isSourceHidden()||this._model.lineBeingCreated()===this||this._model.lineBeingEdited()===this||(null===(e=this._currentPointsetAndSymbolId)||void 0===e?void 0:e.symbolId)===this._model.mainSeries().seriesSource().symbolInstanceId()||this._clearServerPoints(),this.updateAllViews((0,x.sourceChangeEvent)(this.id()))}stop(){this._clearServerPoints()}restart(){this.isFixed()||(this._currentPointsetAndSymbolId=null,this.createServerPoints())}isStarted(){return null!==this._currentPointsetAndSymbolId}convertYCoordinateToPriceForMoving(e,t){var i;const s=(0,r.ensureNotNull)(this.priceScale());if(s.isEmpty())return null;const n=this.ownerSource(),o=(0,r.ensure)(null===(i=n||t)||void 0===i?void 0:i.firstValue());return s.coordinateToPrice(e,o)}syncMultichartState(e){const t={points:this._timePoint,interval:this._model.mainSeries().interval()},i=this.linkKey().value();if(null!==i&&this.isSynchronizable()){const s={model:this._model,linkKey:i,symbol:this._model.mainSeries().symbol(),finalState:t,changes:e};(0,w.finishChangingLineTool)(s)}}enableCurrentIntervalVisibility(){const e=this.properties().childs().intervalsVisibilities.state();void 0!==e&&((0,m.makeIntervalsVisibilitiesVisibleAtInterval)(e,S.Interval.parse(this._model.mainSeries().interval())),this.properties().childs().intervalsVisibilities.mergeAndFire(e))}clonePositionOffset(){return this.isFixed()?{barOffset:0,xCoordOffset:20,yCoordOffset:20}:{barOffset:0,xCoordOffset:0,yCoordOffset:-40}}sharingMode(){return this._sharingMode}share(e){this.isSynchronizable()&&this._sharingMode.setValue(e)}syncLineStyleState(){const e=this.properties().state(this._syncStateExclusions);return delete e.interval,e.intervalsVisibilities=(0,m.mergeIntervalVisibilitiesDefaults)(e.intervalsVisibilities),e}moveLineTool(e){e.forEach(((e,t)=>this._setPoint(t,e))),this.normalizePoints()}_setPoint(e,t){this._points[e].index===t.index?this._points[e].price=t.price:this._points[e]=t,this._pointChanged.fire(e)}_correctLastPoint(e){return(0,T.clone)(e)}_pointsForPointset(){return this._timePoint.map((e=>[e.time_t,e.offset]))}_snapPoint45Degree(e,t,i){const s=this._model.timeScale(),n=s.indexToCoordinate(t.index),o=s.indexToCoordinate(e.index)-n,a=(0,r.ensureNotNull)(this.priceScale()),l=t.price,c=e.price,h=(0,r.ensureNotNull)((0,r.ensureNotNull)(this.ownerSource()).firstValue()),d=a.priceToCoordinate(l,h),u=a.priceToCoordinate(c,h)-d,p=Math.round(Math.atan2(o,u)/Math.PI*4);if(2===Math.abs(p))i||(e.price=l);else if(0===Math.abs(p)||4===Math.abs(p))i||(e.index=t.index);else{const t=Math.sqrt(o*o+u*u),i=o<0?-1:1,r=u<0?-1:1;let l=Math.max(Math.abs(u),Math.abs(o));l/=l*Math.sqrt(2)/t;const c=Math.round(s.coordinateToIndex(n+l*i)),p=Math.abs(s.indexToCoordinate(c)-n),_=a.coordinateToPrice(d+p*r,h);e.index=c,e.price=_}}normalizePoint(e){return{ ...this._model.timeScale().normalizeBarIndex(e.index),price:e.price}}normalizePoints(){this._timePoint=[];for(let e=0;ethis._destroyPanePaneViews(t))),this._model.lightUpdate()}_getPaneViews(e){return this._paneViews.get(e)||null}_updateAllPaneViews(e){this._paneViews.forEach((t=>{for(const i of t)i.update(e)}))}_alignPointHorizontallyOrVertically(e){const t=(0,r.ensureNotNull)(this.pointToScreenPoint(e)),i=(0,r.ensureDefined)((0,r.ensureNotNull)(this._startMovingPoint).logical),s=(0,r.ensureDefined)((0,r.ensureNotNull)(this._startMovingPoint).screen),n=Math.abs(s.x-t.x),o=Math.abs(s.y-t.y);if(n<10&&o<10)return e;return{index:n=1?{didCorrect:!0,point:e.add(s)}:{didCorrect:!1,point:e}}_currentPointsetIdWithPrefix(){return"pointset_"+(0,r.ensureNotNull)(this._currentPointsetAndSymbolId).pointsetId}_clearServerPoints(){null!==this._currentPointsetAndSymbolId&&this._model.chartApi().isConnected().value()&&this._model.chartApi().removePointset(this._currentPointsetIdWithPrefix()),this._currentPointsetAndSymbolId=null}_createPointProperty(e){const t=this._pointsProperty.childs().points;t.addProperty(""+e,{});const i=t[e];i.addChild("price",new A(this,e)),i.addChild("bar",new M.LineDataSourcePointIndexProperty(this,e))}_createPointsProperties(){this._pointsProperty=new(b()),this._pointsProperty.addChild("points",new(b()));for(let e=0;e=2&&this._snapTo45DegreesAvailable()&&this._snapPoint45Degree(i,this.points()[this.points().length-2]),i}_addPointIntenal(e,t,i){this._points.push(e);const s=this._points.length===this.pointsCount();return s?(this._lastPoint=null,i||(this.normalizePoints(),this.createServerPoints())):this._lastPoint=e,this._pointAdded.fire(this._points.length-1),s}_onSourceHiddenMayChange(){this._model.invalidate(p.InvalidationMask.validateAction((()=>{this!==this._model.lineBeingCreated()&&(this._isDestroyed||this.processHibernate())})))}_saveAlertIdInState(){return!0}_onPointsetUpdated(e){if(0!==e.length){for(let t=0;t0}_onAlertData(e){}_propertiesStateExclusions(){return null}_syncLineStyleIfNeeded(){const e=this.linkKey().value();!this._syncLineStyleMuted&&e&&(0,w.changeLineStyle)({linkKey:e,state:this.syncLineStyleState(),model:this._model})}_muteSyncLineStyle(){this._syncLineStyleMuted=!0}_unmuteSyncLineStyleWithoutApplyingChanges(){this.propertiesChanged(),this._syncLineStyleMuted=!1}_applyTemplateImpl(e){e.intervalsVisibilities=(0,m.mergeIntervalVisibilitiesDefaults)(e.intervalsVisibilities);const t=this.properties();t.mergePreferences(e),t.saveDefaults(),this.propertiesChanged()}_getPropertyDefinitionsViewModelClass(){return Promise.resolve(null)}_getAlertPlots(){return[]}_getUndoHistory(){return this._model.undoModel().undoHistory()}_synchronizeAlert(e){}_linePointsToAlertPlot(e,t,i,s){return null}static _configureProperties(e){if(O._addCollectedProperties(e),e.hasChild("symbolStateVersion")||e.addChild("symbolStateVersion",new(b())(1)),e.hasChild("zOrderVersion")||e.addChild("zOrderVersion",new(b())(1)),e.hasChild("visible")||e.addChild("visible",new(b())(!0)),e.hasChild("frozen")||e.addChild("frozen",new(b())(!1)),e.hasChild("symbol")||e.addChild("symbol",new(b())("")), -e.hasChild("currencyId")||e.addChild("currencyId",new(b())(null)),e.hasChild("unitId")||e.addChild("unitId",new(b())(null)),e.addExclusion("symbolStateVersion"),e.addExclusion("zOrderVersion"),e.addExclusion("visible"),e.addExclusion("frozen"),e.addExclusion("symbol"),e.addExclusion("currencyId"),e.addExclusion("unitId"),e.hasChild("intervalsVisibilities")){const t=(0,T.merge)((0,T.clone)(g.intervalsVisibilitiesDefaults),e.childs().intervalsVisibilities.state());e.removeProperty("intervalsVisibilities"),e.addChild("intervalsVisibilities",new P.IntervalsVisibilitiesProperty(t))}else e.addChild("intervalsVisibilities",new P.IntervalsVisibilitiesProperty(g.intervalsVisibilitiesDefaults));e.hasChild("title")||e.addChild("title",new(b())("")),e.addExclusion("symbolInfo"),e.addExclusion("points"),e.addExclusion("interval"),e.addExclusion("title"),e.hasChild("singleChartOnly")&&e.removeProperty("singleChartOnly"),e.hasChild("font")&&e.removeProperty("font")}static _addCollectedProperties(e){e.hasChild("linewidth")&&e.addChild("linesWidths",new E.LineToolWidthsProperty([(0,r.ensureDefined)(e.child("linewidth"))])),e.hasChild("linecolor")&&e.addChild("linesColors",new E.LineToolColorsProperty([(0,r.ensureDefined)(e.child("linecolor"))])),e.hasChild("backgroundColor")&&e.addChild("backgroundsColors",new E.LineToolColorsProperty([(0,r.ensureDefined)(e.child("backgroundColor"))])),e.hasChild("textColor")&&e.addChild("textsColors",new E.LineToolColorsProperty([(0,r.ensureDefined)(e.child("textColor"))])),e.addExclusion("linesWidths"),e.addExclusion("linesColors"),e.addExclusion("backgroundsColors"),e.addExclusion("textsColors")}_removeAlertSubscriptions(){var e;null===(e=this._unsubscribeAlertCallbacks)||void 0===e||e.call(this),this._unsubscribeAlertCallbacks=void 0}_addAlertSubscriptions(e){}_destroyPanePaneViews(e){const t=this._paneViews.get(e);if(void 0!==t)for(const e of t)e.destroy&&e.destroy();void 0!==e&&e.onDestroyed().unsubscribeAll(this),this._paneViews.delete(e)}_copyPricesWithoutNormalization(){const e=Math.min(this._points.length,this._timePoint.length);for(let t=0;t{"use strict";i.r(t),i.d(t,{LineToolMultiplePropertyBaseImpl:()=>l,LineToolCollectedProperty:()=>c,LineToolWidthsProperty:()=>h,LineToolColorsProperty:()=>d,MultipleLineWidthsProperty:()=>p,MultipleLineColorsProperty:()=>_});var s=i(98351),r=i(26867),n=i.n(r);const o=(0,s.getLogger)("Chart.LineToolCollectedProperty");class a{applyValue(e,t){e.setValue(t)}}class l{constructor(e,t){this._onChange=new(n()),this._properties=e,e.forEach((e=>e.subscribe(this,(()=>{this._onChange.fire(this)})))),this._showIfProperty=t}visible(){var e;return!this._showIfProperty||(null===(e=this._showIfProperty)||void 0===e?void 0:e.value())}value(){if(0===this._properties.length)return o.logError("Incorrect call, should not request value of 0 properties"),"mixed";const e=this._properties[0].value();return 1===this._properties.length||this._properties.every((t=>t.value()===e))?e:"mixed"}state(){}merge(){} +e.hasChild("currencyId")||e.addChild("currencyId",new(b())(null)),e.hasChild("unitId")||e.addChild("unitId",new(b())(null)),e.addExclusion("symbolStateVersion"),e.addExclusion("zOrderVersion"),e.addExclusion("visible"),e.addExclusion("frozen"),e.addExclusion("symbol"),e.addExclusion("currencyId"),e.addExclusion("unitId"),e.hasChild("intervalsVisibilities")){const t=(0,T.merge)((0,T.clone)(g.intervalsVisibilitiesDefaults),e.childs().intervalsVisibilities.state());e.removeProperty("intervalsVisibilities"),e.addChild("intervalsVisibilities",new C.IntervalsVisibilitiesProperty(t))}else e.addChild("intervalsVisibilities",new C.IntervalsVisibilitiesProperty(g.intervalsVisibilitiesDefaults));e.hasChild("title")||e.addChild("title",new(b())("")),e.addExclusion("symbolInfo"),e.addExclusion("points"),e.addExclusion("interval"),e.addExclusion("title"),e.hasChild("singleChartOnly")&&e.removeProperty("singleChartOnly"),e.hasChild("font")&&e.removeProperty("font")}static _addCollectedProperties(e){e.hasChild("linewidth")&&e.addChild("linesWidths",new E.LineToolWidthsProperty([(0,r.ensureDefined)(e.child("linewidth"))])),e.hasChild("linecolor")&&e.addChild("linesColors",new E.LineToolColorsProperty([(0,r.ensureDefined)(e.child("linecolor"))])),e.hasChild("backgroundColor")&&e.addChild("backgroundsColors",new E.LineToolColorsProperty([(0,r.ensureDefined)(e.child("backgroundColor"))])),e.hasChild("textColor")&&e.addChild("textsColors",new E.LineToolColorsProperty([(0,r.ensureDefined)(e.child("textColor"))])),e.addExclusion("linesWidths"),e.addExclusion("linesColors"),e.addExclusion("backgroundsColors"),e.addExclusion("textsColors")}_removeAlertSubscriptions(){var e;null===(e=this._unsubscribeAlertCallbacks)||void 0===e||e.call(this),this._unsubscribeAlertCallbacks=void 0}_addAlertSubscriptions(e){}_destroyPanePaneViews(e){const t=this._paneViews.get(e);if(void 0!==t)for(const e of t)e.destroy&&e.destroy();void 0!==e&&e.onDestroyed().unsubscribeAll(this),this._paneViews.delete(e)}_copyPricesWithoutNormalization(){const e=Math.min(this._points.length,this._timePoint.length);for(let t=0;t{"use strict";i.r(t),i.d(t,{LineToolMultiplePropertyBaseImpl:()=>l,LineToolCollectedProperty:()=>c,LineToolWidthsProperty:()=>h,LineToolColorsProperty:()=>d,MultipleLineWidthsProperty:()=>p,MultipleLineColorsProperty:()=>_});var s=i(98351),r=i(26867),n=i.n(r);const o=(0,s.getLogger)("Chart.LineToolCollectedProperty");class a{applyValue(e,t){e.setValue(t)}}class l{constructor(e,t){this._onChange=new(n()),this._properties=e,e.forEach((e=>e.subscribe(this,(()=>{this._onChange.fire(this)})))),this._showIfProperty=t}visible(){var e;return!this._showIfProperty||(null===(e=this._showIfProperty)||void 0===e?void 0:e.value())}value(){if(0===this._properties.length)return o.logError("Incorrect call, should not request value of 0 properties"),"mixed";const e=this._properties[0].value();return 1===this._properties.length||this._properties.every((t=>t.value()===e))?e:"mixed"}state(){}merge(){} destroy(){this._properties.forEach((e=>e.unsubscribeAll(this)))}subscribe(e,t){this._onChange.subscribe(e,t)}unsubscribe(e,t){this._onChange.unsubscribe(e,t)}unsubscribeAll(e){this._onChange.unsubscribeAll(e)}storeStateIfUndefined(){return!0}}class c extends l{setValue(e,t,i){if("mixed"===e)return;const s=null!=i?i:new a;this._properties.forEach((t=>s.applyValue(t,e)))}}class h extends c{}class d extends c{firstColor(){return this._properties[0].value()}}class u extends l{setValue(e,t,i){if("mixed"===e)return;const s=null!=i?i:new a;this._properties.forEach((t=>t.setValue(e,void 0,s)))}}class p extends u{}class _ extends u{}},46359:(e,t,i)=>{"use strict";t.LineToolFibRetracement=i(30681).LineToolFibRetracement,t.LineToolFibChannel=i(38594).LineToolFibChannel,t.LineToolFibSpeedResistanceArcs=i(25643).LineToolFibSpeedResistanceArcs,t.LineToolProjection=i(13876).LineToolProjection,t.LineToolTrendBasedFibExtension=i(39039).LineToolTrendBasedFibExtension,t.LineToolElliott=i(26132).LineToolElliott,t.LineToolFibCircles=i(93874).LineToolFibCircles,t.LineToolVertLine=i(72544).LineToolVertLine,t.LineToolCrossLine=i(94617).LineToolCrossLine,t.LineToolBarsPattern=i(37098).LineToolBarsPattern,t.LineToolTrendBasedFibTime=i(5665).LineToolTrendBasedFibTime,t.LineToolFibTimeZone=i(97412).LineToolFibTimeZone,t.LineToolCircleLines=i(38574).LineToolCircleLines,t.LineToolDateRange=i(55269).LineToolDateRange,t.LineToolPriceRange=i(38579).LineToolPriceRange,t.LineToolDateAndPriceRange=i(45710).LineToolDateAndPriceRange,t.LineToolParallelChannel=i(55168).LineToolParallelChannel,t.LineToolTrendAngle=i(54922).LineToolTrendAngle,t.LineToolTrendLine=i(33818).LineToolTrendLine,t.LineToolInfoLine=i(75693).LineToolInfoLine,t.LineToolArrowMark=i(82336).LineToolArrowMark,t.LineToolExecution=i(50059).LineToolExecution,t.LineToolPitchfan=i(85687).LineToolPitchfan,t.LineToolGannSquare=i(57065).LineToolGannSquare,t.LineToolFibSpeedResistanceFan=i(42130).LineToolFibSpeedResistanceFan,t.LineToolGannComplex=i(56845).LineToolGannComplex,t.LineToolGannFixed=i(56830).LineToolGannFixed,t.LineToolGannFan=i(40386).LineToolGannFan,t.LineToolFibWedge=i(29396).LineToolFibWedge,t.LineToolPitchfork=i(96730).LineToolPitchfork,t.LineToolDisjointAngle=i(84145).LineToolDisjointChannel,t.LineToolFlatBottom=i(89159).LineToolFlatBottom,t.LineToolIcon=i(93615).LineToolIcon,t.LineToolEmoji=i(54445).LineToolEmoji,t.LineToolRotatedRectangle=i(34068).LineToolRotatedRectangle,t.LineToolFibSpiral=i(83455).LineToolFibSpiral,t.LineToolHeadAndShoulders=i(23731).LineToolHeadAndShoulders,t.LineToolTriangle=i(19328).LineToolTriangle,t.LineToolTrianglePattern=i(3687).LineToolTrianglePattern,t.LineTool5PointsPattern=i(51207).LineTool5PointsPattern,t.LineToolThreeDrivers=i(12799).LineToolThreeDrivers,t.LineToolABCD=i(73528).LineToolABCD,t.LineToolPolyline=i(23067).LineToolPolyline,t.LineToolPath=i(27627).LineToolPath,t.LineToolPrediction=i(84197).LineToolPrediction,t.LineToolPriceLabel=i(90769).LineToolPriceLabel,t.LineToolArrowMarker=i(54681).LineToolArrowMarker, t.LineToolNote=i(53061).LineToolNote,t.LineToolNoteAbsolute=i(53061).LineToolNoteAbsolute,t.LineToolSignpost=i(107).LineToolSignpost,t.LineToolBrush=i(6937).LineToolBrush,t.LineToolArc=i(78206).LineToolArc,t.LineToolCallout=i(27569).LineToolCallout,t.LineToolBalloon=i(50856).LineToolBalloon,t.LineToolComment=i(42421).LineToolComment,t.LineToolText=i(88767).LineToolText,t.LineToolHorzLine=i(71559).LineToolHorzLine,t.LineToolHorzRay=i(59810).LineToolHorzRay,t.LineToolRectangle=i(3293).LineToolRectangle,t.LineToolCircle=i(32154).LineToolCircle,t.LineToolEllipse=i(8283).LineToolEllipse,t.LineToolTimeCycles=i(47351).LineToolTimeCycles,t.LineToolSineLine=i(44625).LineToolSineLine,t.LineToolGhostFeed=i(93753).LineToolGhostFeed,t.LineToolBezierQuadro=i(60623).LineToolBezierQuadro,t.LineToolBezierCubic=i(93228).LineToolBezierCubic,t.LineToolArrow=i(85530).LineToolArrow,t.LineToolRay=i(20376).LineToolRay,t.LineToolExtended=i(94365).LineToolExtended,t.LineToolSchiffPitchfork=i(22840).LineToolSchiffPitchfork,t.LineToolSchiffPitchfork2=i(91945).LineToolSchiffPitchfork2,t.LineToolInsidePitchfork=i(95109).LineToolInsidePitchfork,t.LineToolTextAbsolute=i(88767).LineToolTextAbsolute,t.LineToolArrowMarkLeft=i(82336).LineToolArrowMarkLeft,t.LineToolArrowMarkRight=i(82336).LineToolArrowMarkRight,t.LineToolArrowMarkUp=i(82336).LineToolArrowMarkUp,t.LineToolArrowMarkDown=i(82336).LineToolArrowMarkDown,t.LineToolFlagMark=i(13303).LineToolFlagMark,t.LineToolCypherPattern=i(62262).LineToolCypherPattern,t.LineToolElliottImpulse=i(26132).LineToolElliottImpulse,t.LineToolElliottTriangle=i(26132).LineToolElliottTriangle,t.LineToolElliottTripleCombo=i(26132).LineToolElliottTripleCombo,t.LineToolElliottCorrection=i(26132).LineToolElliottCorrection,t.LineToolElliottDoubleCombo=i(26132).LineToolElliottDoubleCombo,t.LineToolRiskRewardLong=i(85075).LineToolRiskRewardLong,t.LineToolRiskRewardShort=i(85075).LineToolRiskRewardShort,t.LineToolPosition=i(50954).LineToolPosition,t.LineToolOrder=i(28714).LineToolOrder,t.LineToolHighlighter=i(90476).LineToolHighlighter,t.LineToolPriceNote=i(64872).LineToolPriceNote},58631:(e,t,i)=>{"use strict";i.d(t,{lineToolsLocalizedNames:()=>r});var s=i(44352);const r={LineTool5PointsPattern:s.t(null,void 0,i(66527)),LineToolABCD:s.t(null,void 0,i(32852)),LineToolArc:s.t(null,void 0,i(45104)),LineToolArrow:s.t(null,void 0,i(96237)),LineToolArrowMarkDown:s.t(null,void 0,i(8738)),LineToolArrowMarkLeft:s.t(null,void 0,i(35062)),LineToolArrowMarkRight:s.t(null,void 0,i(92163)),LineToolArrowMarkUp:s.t(null,void 0,i(33196)),LineToolBalloon:s.t(null,void 0,i(40664)),LineToolComment:s.t(null,void 0,i(19372)),LineToolBarsPattern:s.t(null,void 0,i(98838)),LineToolBezierCubic:s.t(null,void 0,i(59368)),LineToolBezierQuadro:s.t(null,void 0,i(17206)),LineToolBrush:s.t(null,void 0,i(30251)),LineToolCallout:s.t(null,void 0,i(64149)),LineToolCircleLines:s.t(null,void 0,i(87761)),LineToolCypherPattern:s.t(null,void 0,i(27891)),LineToolDateAndPriceRange:s.t(null,void 0,i(79859)),LineToolDateRange:s.t(null,void 0,i(60222)), LineToolDisjointAngle:s.t(null,void 0,i(3556)),LineToolElliottCorrection:s.t(null,void 0,i(91215)),LineToolElliottDoubleCombo:s.t(null,void 0,i(80983)),LineToolElliottImpulse:s.t(null,void 0,i(74118)),LineToolElliottTriangle:s.t(null,void 0,i(95840)),LineToolElliottTripleCombo:s.t(null,void 0,i(66637)),LineToolEllipse:s.t(null,void 0,i(69418)),LineToolExtended:s.t(null,void 0,i(2578)),LineToolFibChannel:s.t(null,void 0,i(82719)),LineToolFibCircles:s.t(null,void 0,i(64192)),LineToolFibRetracement:s.t(null,void 0,i(63835)),LineToolFibSpeedResistanceArcs:s.t(null,void 0,i(18072)),LineToolFibSpeedResistanceFan:s.t(null,void 0,i(20877)),LineToolFibSpiral:s.t(null,void 0,i(76783)),LineToolFibTimeZone:s.t(null,void 0,i(89037)),LineToolFibWedge:s.t(null,void 0,i(72489)),LineToolFlagMark:s.t(null,void 0,i(55678)),LineToolImage:s.t(null,void 0,i(23450)),LineToolFlatBottom:s.t(null,void 0,i(29230)),LineToolAnchoredVWAP:s.t(null,void 0,i(61704)),LineToolGannComplex:s.t(null,void 0,i(66321)),LineToolGannFixed:s.t(null,void 0,i(87107)),LineToolGannFan:s.t(null,void 0,i(68102)),LineToolGannSquare:s.t(null,void 0,i(81180)),LineToolHeadAndShoulders:s.t(null,void 0,i(42616)),LineToolHorzLine:s.t(null,void 0,i(60049)),LineToolHorzRay:s.t(null,void 0,i(76604)),LineToolIcon:s.t(null,void 0,i(26579)),LineToolEmoji:s.t(null,void 0,i(85223)),LineToolInsidePitchfork:s.t(null,void 0,i(12354)),LineToolNote:s.t(null,void 0,i(75549)),LineToolNoteAbsolute:s.t(null,void 0,i(66828)),LineToolSignpost:s.t(null,void 0,i(68161)),LineToolParallelChannel:s.t(null,void 0,i(70394)),LineToolPitchfan:s.t(null,void 0,i(22293)),LineToolPitchfork:s.t(null,void 0,i(43852)),LineToolPolyline:s.t(null,void 0,i(53047)),LineToolPath:s.t(null,void 0,i(34402)),LineToolPrediction:s.t(null,void 0,i(36972)),LineToolPriceLabel:s.t(null,void 0,i(95921)),LineToolArrowMarker:s.t(null,void 0,i(82473)),LineToolPriceRange:s.t(null,void 0,i(2032)),LineToolProjection:s.t(null,void 0,i(87086)),LineToolRay:s.t(null,void 0,i(50470)),LineToolRectangle:s.t(null,void 0,i(328)),LineToolCircle:s.t(null,void 0,i(90068)),LineToolRegressionTrend:s.t(null,void 0,i(35001)),LineToolRiskRewardLong:s.t(null,void 0,i(44604)),LineToolRiskRewardShort:s.t(null,void 0,i(37819)),LineToolFixedRangeVolumeProfile:s.t(null,{context:"study"},i(40434)),LineToolRotatedRectangle:s.t(null,void 0,i(9998)),LineToolSchiffPitchfork:s.t(null,void 0,i(18559)),LineToolSchiffPitchfork2:s.t(null,void 0,i(98114)),LineToolSineLine:s.t(null,void 0,i(69502)),LineToolText:s.t(null,{context:"tool"},i(20936)),LineToolTextAbsolute:s.t(null,void 0,i(94782)),LineToolThreeDrivers:s.t(null,void 0,i(98538)),LineToolTimeCycles:s.t(null,void 0,i(95005)),LineToolTrendAngle:s.t(null,void 0,i(94770)),LineToolTrendBasedFibExtension:s.t(null,void 0,i(15501)),LineToolTrendBasedFibTime:s.t(null,void 0,i(31196)),LineToolTrendLine:s.t(null,void 0,i(23104)),LineToolInfoLine:s.t(null,void 0,i(27677)),LineToolTriangle:s.t(null,void 0,i(29245)),LineToolTrianglePattern:s.t(null,void 0,i(12390)),LineToolVertLine:s.t(null,void 0,i(56211)), -LineToolCrossLine:s.t(null,void 0,i(60997)),LineToolHighlighter:s.t(null,void 0,i(31895)),LineToolPriceNote:s.t(null,void 0,i(28625)),LineToolVbPFixed:s.t(null,void 0,i(18426))};r.LineToolGhostFeed=s.t(null,void 0,i(7914))},6250:(e,t,i)=>{"use strict";i.r(t),i.d(t,{cloneLineTool:()=>H,createLineTool:()=>E,createLineToolProperties:()=>V,createStudyLineToolProperties:()=>B,getNewToolProperties:()=>k,isLineDrawnWithPressedButton:()=>T.isLineDrawnWithPressedButton,isLineTool:()=>N,isLineToolName:()=>T.isLineToolName,isStudyLineTool:()=>O,isStudyLineToolName:()=>T.isStudyLineToolName,isTrading:()=>F,lineToolByLinkKey:()=>z,prepareLineToolPropertiesByOwnerSource:()=>D,setNewToolProperties:()=>A,supportsPhantomMode:()=>R,tryFindStudyLineToolNameByStudyId:()=>W,unsetNewToolProperties:()=>L});var s=i(50151),r=i(86441),n=i(10621),o=i(87414),a=i(10971),l=i(46359),c=i.t(l,2),h=i(33143),d=i(4774),u=i(58403),p=i(91217),_=i(75862),m=i(65665),g=i(7711);const f=(0,d.studyIdString)("RegressionTrend","tv-basicstudies");function v(e){return void 0!==e.startPrice&&void 0!==e.endPrice}function S(e,t,i,s){return t.styles&&(y(t.styles.baseLine),y(t.styles.downLine),y(t.styles.upLine)),t}function y(e){void 0!==e&&void 0!==e.visible&&(e.display=e.visible?15:0,delete e.visible)}class b extends o.StudyLineDataSource{constructor(e,t,r,n,o){r=null!=r?r:(0,s.ensureNotNull)(e.studyMetaInfoRepository().findByIdSync({type:"java",studyId:f}));super(e,r,"linreg_",null!=t?t:b.createProperties(e),n,o),this.version=2,this._trendData=null,i.e(1583).then(i.bind(i,80021)).then((e=>{this._setPaneViews([new e.RegressionTrendPaneView(this,this._model)])}))}formatter(){throw new Error("This method should never be called")}pointsCount(){return 2}clearData(){this._trendData=null,super.clearData()}state(e){var t;const i=super.state(e);return e?{...i,nonseriesdata:null!==(t=this._trendData)&&void 0!==t?t:void 0}:i}restoreData(e){var t;super.restoreData(e),this._trendData=null!==(t=e.nonseriesdata)&&void 0!==t?t:null}startIndex(){if(null===this._trendData||null===this._indexes)return null;const e=this._indexes[this._trendData.startIndex];return e!==h.INVALID_TIME_POINT_INDEX?e:null}endIndex(){if(null===this._trendData||null===this._indexes)return null;const e=this._indexes[this._trendData.endIndex];return e!==h.INVALID_TIME_POINT_INDEX?e:null}baseLine(){return null===this._trendData?null:this._trendData.baseLine}downLine(){return null===this._trendData?null:this._trendData.downLine}upLine(){return null===this._trendData?null:this._trendData.upLine}pearsons(){return null===this._trendData?null:this._trendData.pearsons}recalcStudyIfNeeded(){this._onStudyInputsMayChange()}cloneable(){return!1}static createProperties(e,t){const i=u.StudyMetaInfo.getStudyPropertyRootNameById(f),r=(0,s.ensureNotNull)(e.studyMetaInfoRepository().findByIdSync({type:"java",studyId:f})),n=(0,g.createDefaultsState)(!0,i,[],e.studyVersioning());return this.createRegressionTrendPropertiesFromStudyMetaInfoAndState(r,r,(0,m.merge)((0,m.clone)(n),null!=t?t:{}),e.studyVersioning())} -static createRegressionTrendPropertiesFromStudyMetaInfoAndState(e,t,i,s){const r=(0,p.prepareStudyPropertiesForLoadChart)(e,t,i,s,S);return this._configureProperties(r),r}static studyId(){return f}_studyInputs(e){(0,s.assert)(2===e.length,"all the line tool points should be defined");const[t,i]=e;if(t.index===i.index)return null;const r=this._getPointTime(t.index<=i.index?t:i,!0),n=this._getPointTime(i.index>=t.index?i:t,!0);return null===r||null===n?(this._subscribeApplyInputsOnSeriesCompleted(),null):{...this.properties().childs().inputs.state(),"first bar time":1e3*r,"last bar time":1e3*n}}_onDataUpdated(e,t,i){null!==t&&(t.indexes_replace||(this._trendData=t.data),"nochange"!==i&&(this._indexes=i),super._onDataUpdated(e,t,i))}_isReady(){return null!==this._trendData&&void 0!==this._trendData.startIndex&&void 0!==this._trendData.endIndex&&v(this._trendData.upLine)&&v(this._trendData.baseLine)&&v(this._trendData.downLine)}_updateAnchorsPrice(){if(!this._trendData||(0,m.isNaN)(this._trendData.baseLine.startPrice)||(0,m.isNaN)(this._trendData.baseLine.endPrice))return;const{startPrice:e,endPrice:t}=this._trendData.baseLine;2===this._points.length&&(this._points[0].price=(0,s.ensureDefined)(e),this._points[1].price=(0,s.ensureDefined)(t),this._timePoint[0].price=(0,s.ensureDefined)(e),this._timePoint[1].price=(0,s.ensureDefined)(t))}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6803),i.e(6682),i.e(892),i.e(8622),i.e(4785),i.e(607)]).then(i.bind(i,73856))).RegressionTrendDefinitionsViewModel}static _configureProperties(e){super._configureProperties(e);const t=e.childs().styles.childs(),i=[t.upLine.childs().linewidth,t.downLine.childs().linewidth,t.baseLine.childs().linewidth];e.addChild("linesWidths",new _.LineToolWidthsProperty(i))}}var w=i(89664);const C=(0,d.studyIdString)("VbPFixed","tv-basicstudies");class P extends w.LineToolVbPFixed{constructor(e,t,i,s,r){const n=i||e.studyMetaInfoRepository().findByIdSync({type:"java",studyId:C});super(e,t,n,s,r)}calcIsActualSymbol(){o.StudyLineDataSource.prototype.calcIsActualSymbol.apply(this)}boundToSymbol(){return!0}isSynchronizable(){return this.priceScale()===this._model.mainSeries().priceScale()}static studyId(){return C}static createProperties(e,t){const i=u.StudyMetaInfo.getStudyPropertyRootNameById(C),r=(0,s.ensureNotNull)(e.studyMetaInfoRepository().findByIdSync({type:"java",studyId:C})),n=(0,g.createDefaultsState)(!0,i,[],e.studyVersioning());return this.createPropertiesFromStudyMetaInfoAndState(r,r,(0,m.merge)((0,m.clone)(n),null!=t?t:{}),e.studyVersioning())}static createPropertiesFromStudyMetaInfoAndState(e,t,i,s){const r=(0,p.prepareStudyPropertiesForLoadChart)(e,t,i,s);return this._configureProperties(r),r}}var T=i(28667),x=i(38875);function I(e){for(const t of Object.keys(e))TradingView[t]=e[t]}I(c),I({LineToolRegressionTrend:b,LineToolVbPFixed:w.LineToolVbPFixed,LineToolFixedRangeVolumeProfile:P});let M=null;function A(e,t,i){return null!==M&&M.tool===e&&M.toolData===t||(M={properties:V(e,void 0,i),tool:e,toolData:t}), -M.properties}function L(){M=null}function k(e){return null!==M&&M.tool===e?M.properties:null}function E(e,t,i,r,n,o){let a;if((0,s.assert)((0,T.isLineToolName)(e),"Unknown line tool: "+e),n||i||(i=k(e)||void 0),"LineToolVbPFixed"===e)a=new w.LineToolVbPFixed(t,i,(0,s.ensureDefined)(r),n,o);else if("LineToolFixedRangeVolumeProfile"===e)a=new P(t,i,(0,s.ensureDefined)(r),n,o);else if("LineToolRegressionTrend"===e)a=new b(t,i,(0,s.ensureDefined)(r),n,o);else{a=new((0,s.ensureDefined)(c[e]))(t,i,n,o)}return a.toolname=e,L(),a}function D(e,t){const i=(0,s.ensureNotNull)(t.symbolSource());e.childs().symbol.setValue(i.symbol()),i.model().currencyConversionEnabled()&&e.childs().currencyId.setValue(i.currency()),i.model().unitConversionEnabled()&&e.childs().unitId.setValue(i.unit()),e.childs().symbolStateVersion.setValue(2),e.childs().zOrderVersion.setValue(2)}function V(e,t,i){if((0,s.assert)((0,T.isLineToolName)(e),`${e} should be name of the line tool`),"LineToolVbPFixed"===e)return w.LineToolVbPFixed.createProperties(i,t);if("LineToolFixedRangeVolumeProfile"===e)return P.createProperties(i,t);if("LineToolRegressionTrend"===e)return b.createProperties(i,t);return(0,s.ensureDefined)(c[e]).createProperties(t)}function B(e,t,i,r,n){if((0,s.assert)((0,T.isStudyLineToolName)(e),`${e} should be name of the study line tool`),"LineToolVbPFixed"===e)return w.LineToolVbPFixed.createPropertiesFromStudyMetaInfoAndState(t,i,r,n);if("LineToolFixedRangeVolumeProfile"===e)return P.createPropertiesFromStudyMetaInfoAndState(t,i,r,n);if("LineToolRegressionTrend"===e)return b.createRegressionTrendPropertiesFromStudyMetaInfoAndState(t,i,r,n);throw new Error(`Property creation is not implemented for study line tool ${e}`)}function R(e){(0,s.assert)((0,T.isLineToolName)(e),`${e} should be name of the line tool`);const t=c[e];return void 0!==t&&Boolean(t.supportPhantomMode)}function N(e){return e instanceof a.LineDataSource}function O(e){return e instanceof o.StudyLineDataSource}function F(e){return e instanceof x.LineToolTrading}function W(e){let t=null;return e===b.studyId()?t="LineToolRegressionTrend":e===w.LineToolVbPFixed.studyId()?t="LineToolVbPFixed":e===P.studyId()&&(t="LineToolFixedRangeVolumeProfile"),t}function H(e,t,i,o){const a=t.toolname,l=t.properties().state();l.intervalsVisibilities=(0,n.mergeIntervalVisibilitiesDefaults)(null==l?void 0:l.intervalsVisibilities);const c=V(t.toolname,l,e);c.childs().visible.setValue(!0);const h=(0,s.ensureNotNull)(t.ownerSource()),d=E(a,e,c);void 0!==o&&d.setId(o),d.setOwnerSource(h),d.toolname=a;const u=d.clonePositionOffset();if(t.isFixed()){const e=(0,s.ensureDefined)(t.fixedPoint()),n=i?e.add(new r.Point(u.xCoordOffset,u.yCoordOffset)):e;d.addFixedPoint(n)}const p=t.normalizedPoints(),_=i?function(e,t,i){const r=(0,s.ensureNotNull)(t.priceScale()),n=(0,s.ensureNotNull)(t.firstValue());return e.map((e=>{const t=e.price,s=r.priceToCoordinate(t,n)+i.yCoordOffset,o=r.coordinateToPrice(s,n);return{time_t:e.time_t,price:o,offset:e.offset+i.barOffset}}))}(p,h,u):p,m=t.points() +LineToolCrossLine:s.t(null,void 0,i(60997)),LineToolHighlighter:s.t(null,void 0,i(31895)),LineToolPriceNote:s.t(null,void 0,i(28625)),LineToolVbPFixed:s.t(null,void 0,i(18426))};r.LineToolGhostFeed=s.t(null,void 0,i(7914))},6250:(e,t,i)=>{"use strict";i.r(t),i.d(t,{cloneLineTool:()=>H,createLineTool:()=>E,createLineToolProperties:()=>B,createStudyLineToolProperties:()=>V,getNewToolProperties:()=>k,isLineDrawnWithPressedButton:()=>T.isLineDrawnWithPressedButton,isLineTool:()=>N,isLineToolName:()=>T.isLineToolName,isStudyLineTool:()=>O,isStudyLineToolName:()=>T.isStudyLineToolName,isTrading:()=>F,lineToolByLinkKey:()=>z,prepareLineToolPropertiesByOwnerSource:()=>D,setNewToolProperties:()=>A,supportsPhantomMode:()=>R,tryFindStudyLineToolNameByStudyId:()=>W,unsetNewToolProperties:()=>L});var s=i(50151),r=i(86441),n=i(10621),o=i(87414),a=i(10971),l=i(46359),c=i.t(l,2),h=i(33143),d=i(4774),u=i(58403),p=i(91217),_=i(75862),m=i(65665),g=i(7711);const f=(0,d.studyIdString)("RegressionTrend","tv-basicstudies");function v(e){return void 0!==e.startPrice&&void 0!==e.endPrice}function S(e,t,i,s){return t.styles&&(y(t.styles.baseLine),y(t.styles.downLine),y(t.styles.upLine)),t}function y(e){void 0!==e&&void 0!==e.visible&&(e.display=e.visible?15:0,delete e.visible)}class b extends o.StudyLineDataSource{constructor(e,t,r,n,o){r=null!=r?r:(0,s.ensureNotNull)(e.studyMetaInfoRepository().findByIdSync({type:"java",studyId:f}));super(e,r,"linreg_",null!=t?t:b.createProperties(e),n,o),this.version=2,this._trendData=null,i.e(1583).then(i.bind(i,80021)).then((e=>{this._setPaneViews([new e.RegressionTrendPaneView(this,this._model)])}))}formatter(){throw new Error("This method should never be called")}pointsCount(){return 2}clearData(){this._trendData=null,super.clearData()}state(e){var t;const i=super.state(e);return e?{...i,nonseriesdata:null!==(t=this._trendData)&&void 0!==t?t:void 0}:i}restoreData(e){var t;super.restoreData(e),this._trendData=null!==(t=e.nonseriesdata)&&void 0!==t?t:null}startIndex(){if(null===this._trendData||null===this._indexes)return null;const e=this._indexes[this._trendData.startIndex];return e!==h.INVALID_TIME_POINT_INDEX?e:null}endIndex(){if(null===this._trendData||null===this._indexes)return null;const e=this._indexes[this._trendData.endIndex];return e!==h.INVALID_TIME_POINT_INDEX?e:null}baseLine(){return null===this._trendData?null:this._trendData.baseLine}downLine(){return null===this._trendData?null:this._trendData.downLine}upLine(){return null===this._trendData?null:this._trendData.upLine}pearsons(){return null===this._trendData?null:this._trendData.pearsons}recalcStudyIfNeeded(){this._onStudyInputsMayChange()}cloneable(){return!1}static createProperties(e,t){const i=u.StudyMetaInfo.getStudyPropertyRootNameById(f),r=(0,s.ensureNotNull)(e.studyMetaInfoRepository().findByIdSync({type:"java",studyId:f})),n=(0,g.createDefaultsState)(!0,i,[],e.studyVersioning());return this.createRegressionTrendPropertiesFromStudyMetaInfoAndState(r,r,(0,m.merge)((0,m.clone)(n),null!=t?t:{}),e.studyVersioning())} +static createRegressionTrendPropertiesFromStudyMetaInfoAndState(e,t,i,s){const r=(0,p.prepareStudyPropertiesForLoadChart)(e,t,i,s,S);return this._configureProperties(r),r}static studyId(){return f}_studyInputs(e){(0,s.assert)(2===e.length,"all the line tool points should be defined");const[t,i]=e;if(t.index===i.index)return null;const r=this._getPointTime(t.index<=i.index?t:i,!0),n=this._getPointTime(i.index>=t.index?i:t,!0);return null===r||null===n?(this._subscribeApplyInputsOnSeriesCompleted(),null):{...this.properties().childs().inputs.state(),"first bar time":1e3*r,"last bar time":1e3*n}}_onDataUpdated(e,t,i){null!==t&&(t.indexes_replace||(this._trendData=t.data),"nochange"!==i&&(this._indexes=i),super._onDataUpdated(e,t,i))}_isReady(){return null!==this._trendData&&void 0!==this._trendData.startIndex&&void 0!==this._trendData.endIndex&&v(this._trendData.upLine)&&v(this._trendData.baseLine)&&v(this._trendData.downLine)}_updateAnchorsPrice(){if(!this._trendData||(0,m.isNaN)(this._trendData.baseLine.startPrice)||(0,m.isNaN)(this._trendData.baseLine.endPrice))return;const{startPrice:e,endPrice:t}=this._trendData.baseLine;2===this._points.length&&(this._points[0].price=(0,s.ensureDefined)(e),this._points[1].price=(0,s.ensureDefined)(t),this._timePoint[0].price=(0,s.ensureDefined)(e),this._timePoint[1].price=(0,s.ensureDefined)(t))}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6803),i.e(6682),i.e(892),i.e(8622),i.e(4785),i.e(607)]).then(i.bind(i,73856))).RegressionTrendDefinitionsViewModel}static _configureProperties(e){super._configureProperties(e);const t=e.childs().styles.childs(),i=[t.upLine.childs().linewidth,t.downLine.childs().linewidth,t.baseLine.childs().linewidth];e.addChild("linesWidths",new _.LineToolWidthsProperty(i))}}var w=i(89664);const P=(0,d.studyIdString)("VbPFixed","tv-basicstudies");class C extends w.LineToolVbPFixed{constructor(e,t,i,s,r){const n=i||e.studyMetaInfoRepository().findByIdSync({type:"java",studyId:P});super(e,t,n,s,r)}calcIsActualSymbol(){o.StudyLineDataSource.prototype.calcIsActualSymbol.apply(this)}boundToSymbol(){return!0}isSynchronizable(){return this.priceScale()===this._model.mainSeries().priceScale()}static studyId(){return P}static createProperties(e,t){const i=u.StudyMetaInfo.getStudyPropertyRootNameById(P),r=(0,s.ensureNotNull)(e.studyMetaInfoRepository().findByIdSync({type:"java",studyId:P})),n=(0,g.createDefaultsState)(!0,i,[],e.studyVersioning());return this.createPropertiesFromStudyMetaInfoAndState(r,r,(0,m.merge)((0,m.clone)(n),null!=t?t:{}),e.studyVersioning())}static createPropertiesFromStudyMetaInfoAndState(e,t,i,s){const r=(0,p.prepareStudyPropertiesForLoadChart)(e,t,i,s);return this._configureProperties(r),r}}var T=i(28667),x=i(38875);function I(e){for(const t of Object.keys(e))TradingView[t]=e[t]}I(c),I({LineToolRegressionTrend:b,LineToolVbPFixed:w.LineToolVbPFixed,LineToolFixedRangeVolumeProfile:C});let M=null;function A(e,t,i){return null!==M&&M.tool===e&&M.toolData===t||(M={properties:B(e,void 0,i),tool:e,toolData:t}), +M.properties}function L(){M=null}function k(e){return null!==M&&M.tool===e?M.properties:null}function E(e,t,i,r,n,o){let a;if((0,s.assert)((0,T.isLineToolName)(e),"Unknown line tool: "+e),n||i||(i=k(e)||void 0),"LineToolVbPFixed"===e)a=new w.LineToolVbPFixed(t,i,(0,s.ensureDefined)(r),n,o);else if("LineToolFixedRangeVolumeProfile"===e)a=new C(t,i,(0,s.ensureDefined)(r),n,o);else if("LineToolRegressionTrend"===e)a=new b(t,i,(0,s.ensureDefined)(r),n,o);else{a=new((0,s.ensureDefined)(c[e]))(t,i,n,o)}return a.toolname=e,L(),a}function D(e,t){const i=(0,s.ensureNotNull)(t.symbolSource());e.childs().symbol.setValue(i.symbol()),i.model().currencyConversionEnabled()&&e.childs().currencyId.setValue(i.currency()),i.model().unitConversionEnabled()&&e.childs().unitId.setValue(i.unit()),e.childs().symbolStateVersion.setValue(2),e.childs().zOrderVersion.setValue(2)}function B(e,t,i){if((0,s.assert)((0,T.isLineToolName)(e),`${e} should be name of the line tool`),"LineToolVbPFixed"===e)return w.LineToolVbPFixed.createProperties(i,t);if("LineToolFixedRangeVolumeProfile"===e)return C.createProperties(i,t);if("LineToolRegressionTrend"===e)return b.createProperties(i,t);return(0,s.ensureDefined)(c[e]).createProperties(t)}function V(e,t,i,r,n){if((0,s.assert)((0,T.isStudyLineToolName)(e),`${e} should be name of the study line tool`),"LineToolVbPFixed"===e)return w.LineToolVbPFixed.createPropertiesFromStudyMetaInfoAndState(t,i,r,n);if("LineToolFixedRangeVolumeProfile"===e)return C.createPropertiesFromStudyMetaInfoAndState(t,i,r,n);if("LineToolRegressionTrend"===e)return b.createRegressionTrendPropertiesFromStudyMetaInfoAndState(t,i,r,n);throw new Error(`Property creation is not implemented for study line tool ${e}`)}function R(e){(0,s.assert)((0,T.isLineToolName)(e),`${e} should be name of the line tool`);const t=c[e];return void 0!==t&&Boolean(t.supportPhantomMode)}function N(e){return e instanceof a.LineDataSource}function O(e){return e instanceof o.StudyLineDataSource}function F(e){return e instanceof x.LineToolTrading}function W(e){let t=null;return e===b.studyId()?t="LineToolRegressionTrend":e===w.LineToolVbPFixed.studyId()?t="LineToolVbPFixed":e===C.studyId()&&(t="LineToolFixedRangeVolumeProfile"),t}function H(e,t,i,o){const a=t.toolname,l=t.properties().state();l.intervalsVisibilities=(0,n.mergeIntervalVisibilitiesDefaults)(null==l?void 0:l.intervalsVisibilities);const c=B(t.toolname,l,e);c.childs().visible.setValue(!0);const h=(0,s.ensureNotNull)(t.ownerSource()),d=E(a,e,c);void 0!==o&&d.setId(o),d.setOwnerSource(h),d.toolname=a;const u=d.clonePositionOffset();if(t.isFixed()){const e=(0,s.ensureDefined)(t.fixedPoint()),n=i?e.add(new r.Point(u.xCoordOffset,u.yCoordOffset)):e;d.addFixedPoint(n)}const p=t.normalizedPoints(),_=i?function(e,t,i){const r=(0,s.ensureNotNull)(t.priceScale()),n=(0,s.ensureNotNull)(t.firstValue());return e.map((e=>{const t=e.price,s=r.priceToCoordinate(t,n)+i.yCoordOffset,o=r.coordinateToPrice(s,n);return{time_t:e.time_t,price:o,offset:e.offset+i.barOffset}}))}(p,h,u):p,m=t.points() ;return d.restorePoints(_,m),d.cloneData&&d.cloneData(t),d.recalculateStateByData&&d.recalculateStateByData(),d}function z(e,t){var i;return null!==(i=e.dataSources().find((e=>N(e)&&e.linkKey().value()===t)))&&void 0!==i?i:null}},53061:(e,t,i)=>{"use strict";var s=i(10971).LineDataSource,r=i(26220),n=i(7711).DefaultProperty;class o extends s{constructor(e,t,s,r){super(e,t||o.createProperties(),s,r),this.version=o.version,i.e(1583).then(i.bind(i,63261)).then((({NotePaneView:e})=>{this._setPaneViews([new e(this,this._model)])}))}pointsCount(){return 1}name(){return"Note"}getTooltipWidth(){return o.TOOLTIP_WIDTH}getTooltipPadding(){return o.TOOLTIP_PADDING}getTooltipLineSpacing(){return o.TOOLTIP_LINESPACING}template(){var e=super.template();return e.text=this.properties().childs().text.value(),e}_applyTemplateImpl(e){super._applyTemplateImpl(e),this.properties().childs().text.setValue(e.text)}static createProperties(e){void 0!==e&&void 0!==e.markerColor&&void 0===e.borderColor&&(e.borderColor=e.markerColor);var t=new n("linetoolnote",e);return this._configureProperties(t),t}state(e){var t=super.state(e);return e&&(t.state.fixedSize=!1),t}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,69704))).NoteDefinitionsViewModel}static _configureProperties(e){super._configureProperties(e),e.hasChild("text")||e.addChild("text",new r(i(44352).t(null,void 0,i(37229)))),e.addExclusion("text")}}o.TOOLTIP_WIDTH=300,o.TOOLTIP_PADDING=10,o.TOOLTIP_LINESPACING=5,o.version=1;class a extends o{constructor(e,t){super(e,t||a.createProperties())}title(){return i(44352).t(null,void 0,i(66828))}name(){return"Anchored Note"}isFixed(){return!0}hasEditableCoordinates(){return!1}static createProperties(e){var t=new n("linetoolnoteabsolute",e);return this._configureProperties(t),t}}t.LineToolNote=o,t.LineToolNoteAbsolute=a},28714:(e,t,i)=>{"use strict";var s=i(38875).LineToolTrading,r=i(28537).LineToolPriceAxisView,n=i(88620),o=i(10971).LineDataSource,a=i(7711).DefaultProperty;const l=i(2484);var c=i(50841).sortSourcesPreOrdered.LineToolOrder;function h(e){return null==e?e="":e+="",e}class d{constructor(e){this._line=e,this._data={bodyText:"order",quantityText:"0"},this._editable=!0,this._cancellable=!0,this._mode="",this._direction="buy",this._active=!0}setMode(e){return this._mode=e,this._line.updateAllViewsAndRedraw(),this}setDirection(e){return this._direction=e,this._line.updateAllViewsAndRedraw(),this}setActive(e){return this._active=e,this._line.updateAllViewsAndRedraw(),this}setEditable(e){return this._editable=e,this._line.updateAllViewsAndRedraw(),this}getEditable(){return this._editable}setCancellable(e){return this._cancellable=e,this._line.updateAllViewsAndRedraw(),this}getCancellable(){return this._cancellable}hasMoveCallback(){return this.isFunction(this._onMoveCallback)}hasModifyCallback(){return this.isFunction(this._onModifyCallback)}getPrice(){ return this._line.points().length>0?this._line.points()[0].price:this._line._timePoint.length>0?this._line._timePoint[0].price:void 0}setPrice(e){if(this._line.points().length>0){var t=this._line.points()[0];t.price=e,this._line._points[0]=t,this._line.normalizePoints(),this._line.updateAllViewsAndRedraw()}return this._line._timePoint.length>0&&(this._line._timePoint[0].price=e),this}getText(){return this._data.bodyText}setText(e){return this._data.bodyText=e||"",this._line.updateAllViewsAndRedraw(),this}setTooltip(e){return this._line.properties().tooltip.setValue(h(e)),this}getTooltip(){return this._line.properties().tooltip.value()}setModifyTooltip(e){return this._line.properties().modifyTooltip.setValue(h(e)),this}getModifyTooltip(){return this._line.properties().modifyTooltip.value()}setCancelTooltip(e){return this._line.properties().cancelTooltip.setValue(h(e)),this}getCancelTooltip(){return this._line.properties().cancelTooltip.value()}getQuantity(){return this._data.quantityText}setQuantity(e){return this._data.quantityText=e||"",this._line.updateAllViewsAndRedraw(),this}getExtendLeft(){var e=this._line.properties().extendLeft.value();return"inherit"===e?this._line._model.properties().tradingProperties.extendLeft.value():e}setExtendLeft(e){return this._line.properties().extendLeft.setValue(e),this}getLineLength(){var e=this._line.properties().lineLength.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineLength.value():e}setLineLength(e){return this._line.properties().lineLength.setValue(Math.max(0,Math.min(e,100))),this}getLineColor(){var e=this._line.properties();return"buy"===this._direction?this._active?e.lineActiveBuyColor.value():e.lineInactiveBuyColor.value():this._active?e.lineActiveSellColor.value():e.lineInactiveSellColor.value()}setLineColor(e){return"buy"===this._direction?this._active?this.setLineActiveBuyColor(e):this.setLineInactiveBuyColor(e):this._active?this.setLineActiveSellColor(e):this.setLineInactiveSellColor(e),this}setLineActiveBuyColor(e){return this._line.properties().lineActiveBuyColor.setValue(e),this}setLineInactiveBuyColor(e){return this._line.properties().lineInactiveBuyColor.setValue(e),this}setLineActiveSellColor(e){return this._line.properties().lineActiveSellColor.setValue(e),this}setLineInactiveSellColor(e){return this._line.properties().lineInactiveSellColor.setValue(e),this}getLineStyle(){var e=this._line.properties().lineStyle.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineStyle.value():e}setLineStyle(e){return this._line.properties().lineStyle.setValue(e),this}getLineWidth(){var e=this._line.properties().lineWidth.value();return"inherit"===e?this._line._model.properties().tradingProperties.lineWidth.value():e}setLineWidth(e){return this._line.properties().lineWidth.setValue(e),this}getBodyBorderColor(){var e=this._line.properties() ;return"buy"===this._direction?this._active?e.bodyBorderActiveBuyColor.value():e.bodyBorderInactiveBuyColor.value():this._active?e.bodyBorderActiveSellColor.value():e.bodyBorderInactiveSellColor.value()}setBodyBorderColor(e){return"buy"===this._direction?this._active?this.setBodyBorderActiveBuyColor(e):this.setBodyBorderInactiveBuyColor(e):this._active?this.setBodyBorderActiveSellColor(e):this.setBodyBorderInactiveSellColor(e),this}setBodyBorderActiveBuyColor(e){return this._line.properties().bodyBorderActiveBuyColor.setValue(e),this}setBodyBorderInactiveBuyColor(e){return this._line.properties().bodyBorderInactiveBuyColor.setValue(e),this}setBodyBorderActiveSellColor(e){return this._line.properties().bodyBorderActiveSellColor.setValue(e),this}setBodyBorderInactiveSellColor(e){return this._line.properties().bodyBorderInactiveSellColor.setValue(e),this}getBodyBackgroundColor(){return n.getColorFromProperties(this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency)}setBodyBackgroundColor(e){return n.setColorToProperties(e,this._line.properties().bodyBackgroundColor,this._line.properties().bodyBackgroundTransparency),this}getBodyTextColor(){var e=this._line.properties();return"limit"===this._mode?this._active?e.bodyTextActiveLimitColor.value():e.bodyTextInactiveLimitColor.value():"stop"===this._mode?this._active?e.bodyTextActiveStopColor.value():e.bodyTextInactiveStopColor.value():"buy"===this._direction?this._active?e.bodyTextActiveBuyColor.value():e.bodyTextInactiveBuyColor.value():this._active?e.bodyTextActiveSellColor.value():e.bodyTextInactiveSellColor.value()}setBodyTextColor(e){return"limit"===this._mode?this._active?this.setBodyTextActiveLimitColor(e):this.setBodyTextInactiveLimitColor(e):"stop"===this._mode?this._active?this.setBodyTextActiveStopColor(e):this.setBodyTextInactiveStopColor(e):"buy"===this._direction?this._active?this.setBodyTextActiveBuyColor(e):this.setBodyTextInactiveBuyColor(e):this._active?this.setBodyTextActiveSellColor(e):this.setBodyTextInactiveSellColor(e),this}setBodyTextInactiveLimitColor(e){return this._line.properties().bodyTextInactiveLimitColor.setValue(e),this}setBodyTextActiveLimitColor(e){return this._line.properties().bodyTextActiveLimitColor.setValue(e),this}setBodyTextInactiveStopColor(e){return this._line.properties().bodyTextInactiveStopColor.setValue(e),this}setBodyTextActiveStopColor(e){return this._line.properties().bodyTextActiveStopColor.setValue(e),this}setBodyTextInactiveBuyColor(e){return this._line.properties().bodyTextInactiveBuyColor.setValue(e),this}setBodyTextActiveBuyColor(e){return this._line.properties().bodyTextActiveBuyColor.setValue(e),this}setBodyTextInactiveSellColor(e){return this._line.properties().bodyTextInactiveSellColor.setValue(e),this}setBodyTextActiveSellColor(e){return this._line.properties().bodyTextActiveSellColor.setValue(e),this}getBodyFont(){ @@ -589,8 +589,8 @@ t!==this.properties().stopPrice.value()&&this.properties().stopPrice._listeners. if(0!==this.points().length){var e=this.properties(),t=e.entryPrice.value(),i=e.stopPrice.value(),s=e.riskSize.value()/(Math.abs(i-t)*this._ownerSourcePointValue());e.qty.setValue(s)}}_recalculateAmount(){if(0===this.points().length)return;var e=this.properties(),t=e.accountSize.value(),i=e.entryPrice.value(),s=e.qty.value(),r=e.stopPrice.value(),n=e.targetPrice.value();const o=this._ownerSourcePointValue();var a=this._roundValue(t+(i-n)*s*o),l=this._roundValue(t-(r-i)*s*o);e.amountTarget.setValue(a),e.amountStop.setValue(l)}name(){return"Risk/Reward short"}stopPrice(){return this.entryPrice()+this.properties().stopLevel.value()/this.ownerSourceBase()}profitPrice(){return this.entryPrice()-this.properties().profitLevel.value()/this.ownerSourceBase()}preparseStopPrice(e){e=this._roundPrice(e);var t=this.entryPrice()+1/this.ownerSourceBase();return Math.max(e,t)}preparseProfitPrice(e){e=this._roundPrice(e);var t=this.entryPrice()-1/this.ownerSourceBase();return Math.min(e,t)}checkStopPrice(e){var t=this.stopPrice(),i=this.profitPrice();return e[TradingView.HIGH_PLOT]>=t?this.stopPrice():e[TradingView.LOW_PLOT]<=i?this.profitPrice():null}_orderSide(){throw new Error("not supported")}static createProperties(e){var t=new o("linetoolriskrewardshort",e);return this._configureProperties(t),t}}class p extends d{constructor(e,t,i,s){super(e,t||p.createProperties(),i,s);var r=this.properties();r.entryPrice.subscribe(this,this._recalculateQty),r.stopPrice.subscribe(this,this._recalculateQty),r.riskSize.subscribe(this,this._recalculateQty),r.entryPrice.subscribe(this,this._recalculateAmount),r.profitLevel.subscribe(this,this._recalculateAmount),r.stopLevel.subscribe(this,this._recalculateAmount),r.accountSize.subscribe(this,this._recalculateAmount),r.riskSize.subscribe(this,this._recalculateAmount),r.qty.subscribe(this,this._recalculateAmount)}_recalculateQty(){if(0!==this.points().length){var e=this.properties(),t=e.entryPrice.value(),i=e.stopPrice.value(),s=e.riskSize.value()/(Math.abs(t-i)*this._ownerSourcePointValue());e.qty.setValue(s)}}_recalculateAmount(){if(0!==this.points().length){var e=this.properties(),t=e.accountSize.value(),i=e.entryPrice.value(),s=e.qty.value(),r=e.stopPrice.value(),n=e.targetPrice.value(),o=this._ownerSourcePointValue(),a=this._roundValue(t+(n-i)*s*o),l=this._roundValue(t-(i-r)*s*o);e.amountTarget.setValue(a),e.amountStop.setValue(l)}}stopPrice(){return this.entryPrice()-this.properties().stopLevel.value()/this.ownerSourceBase()}profitPrice(){return this.entryPrice()+this.properties().profitLevel.value()/this.ownerSourceBase()}calculatePL(e){return e-this.entryPrice()}preparseStopPrice(e){e=this._roundPrice(e);var t=this.entryPrice()-1/this.ownerSourceBase();return Math.min(e,t)}preparseProfitPrice(e){e=this._roundPrice(e);var t=this.entryPrice()+1/this.ownerSourceBase();return Math.max(e,t)}checkStopPrice(e){var t=this.stopPrice(),i=this.profitPrice();return e[TradingView.LOW_PLOT]<=t?this.stopPrice():e[TradingView.HIGH_PLOT]>=i?this.profitPrice():null}name(){return"Risk/Reward long"} _orderSide(){throw new Error("not supported")}static createProperties(e){var t=new o("linetoolriskrewardlong",e);return this._configureProperties(t),t}}t.LineToolRiskRewardLong=p,t.LineToolRiskRewardShort=u},34068:(e,t,i)=>{"use strict";var s=i(86441).Point,r=i(4652).distanceToLine,n=i(10971).LineDataSource,o=i(7711).DefaultProperty,a=i(75862).LineToolColorsProperty;class l extends n{constructor(e,t,s,r){super(e,t||l.createProperties(),s,r),i.e(1583).then(i.t.bind(i,31677,19)).then((({RotatedRectanglePaneView:e})=>{this._setPaneViews([new e(this,this._model)])}))}startChanging(e,t){if(super.startChanging(e,t),0===e||1===e){var i=this._getPaneViews()[0],s=i._points[0],n=i._points[1],o=i._points[2];this._distance=r(s,n,o).distance}}setPoint(e,t,i){if(super.setPoint(e,t,i),0===e||1===e){var r=this._getPaneViews()[0];r.update();var n=r._points[0],o=r._points[1].subtract(n),a=new s(o.y,-o.x).normalized().scaled(this._distance),l=n.add(a),c=this.screenPointToPoint(l);this._points[2]=c}}endChanging(e,t){delete this._distance,super.endChanging(e,t)}pointsCount(){return 3}name(){return"Rotated Rectangle"}hasEditableCoordinates(){return!1}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,38333))).GeneralFiguresDefinitionsViewModel}_snapTo45DegreesAvailable(){return!0}static createProperties(e){var t=new o("linetoolrotatedrectangle",e);return this._configureProperties(t),t}static _configureProperties(e){super._configureProperties(e),e.addChild("linesColors",new a([e.color]))}}t.LineToolRotatedRectangle=l},22840:(e,t,i)=>{"use strict";var s=i(85038).LevelsProperty,r=i(96730).LineToolPitchfork;class n extends r{constructor(e,t,i,s){super(e,t||n.createProperties(),i,s)}name(){return"Modified Schiff Pitchfork"}static createProperties(e){var t=new s("linetoolschiffpitchfork",e,!1,{range:[0,8]});return this._configureProperties(t),t}}t.LineToolSchiffPitchfork=n},91945:(e,t,i)=>{"use strict";var s=i(85038).LevelsProperty,r=i(96730).LineToolPitchfork;class n extends r{constructor(e,t,i,s){super(e,t||n.createProperties(),i,s)}name(){return"Schiff Pitchfork"}static createProperties(e){var t=new s("linetoolschiffpitchfork2",e,!1,{range:[0,8]});return this._configureProperties(t),t}}t.LineToolSchiffPitchfork2=n},107:(e,t,i)=>{"use strict";i.d(t,{LineToolSignpost:()=>g});var s=i(44352),r=i(7711),n=i(10971),o=i(26220),a=i.n(o);class l extends(a()){constructor(e){super(),this._source=e,e.pointAdded().subscribe(this,(()=>this.listeners().fire(this))),e.pointChanged().subscribe(this,(()=>this.listeners().fire(this)))}value(){const e=this._source.properties().childs().position.value();return parseFloat(e.toFixed(2))}setValue(e){this._source.properties().childs().position.setValue(e),this._source.model().updateSource(this._source),this.listeners().fire(this),this._source.syncMultichartState({pricesChanged:!1,indexesChanged:!1})}}var c=i(17730);class h extends c.LineDataSourcePointIndexProperty{constructor(e,t){super(e,t),this._source=e}_setPointImpl(e){ this._source.setPointAndChangeIndex(this._pointIndex,e)}}var d=i(75862),u=i(50151),p=i(83990),_=i(76076);class m extends n.LineDataSource{constructor(){super(...arguments),this._startMovingAnchorY=NaN}priceSource(){return this.ownerSource()}addPoint(e,t,i){return super.addPoint(this._updatePositionAndCorrectPoint(e),t,i)}setPoint(e,t,i){super.setPoint(e,this._updatePositionAndCorrectPoint(t,!this.isPhantom()&&!this._allowChangeAnchorHorizontally()),i),this._syncPosition()}setPointAndChangeIndex(e,t,i){super.setPoint(e,this._updatePositionAndCorrectPoint(t,!1),i),this._syncPosition()}startMoving(e,t,i,s){s||(this._startMovingAnchorY=(0,u.ensureNotNull)(this._anchorYCoordinate())),super.startMoving(e,t,i)}move(e,t,i,s){var r;const n=(0,u.ensureDefined)((0,u.ensureNotNull)(this.startMovingPoint()).logical),o=(0,u.ensureDefined)(e.logical);if(!s&&0===t){const e=this._points[0],t=o.index-n.index,i=(0,u.ensureNotNull)(this.priceScale()),s=(0,u.ensure)(null===(r=this.ownerSource())||void 0===r?void 0:r.firstValue()),a=i.priceToCoordinate(o.price,s)-i.priceToCoordinate(n.price,s),l=this._startMovingAnchorY+a,c=i.coordinateToPrice(l,s);this._updatePositionAndCorrectPoint({index:e.index+t,price:c})}super.move(e,t,i),s||this._syncPosition()}_allowChangeAnchorHorizontally(){return!1}_updatePositionAndCorrectPoint(e,t){t&&(e.index=this._points[0].index);const i=this.priceSource();if(null===i)return e;const s=i.priceScale(),r=i.firstValue();if(null===s||s.isEmpty()||null===r)return e;const n=s.height();let o=n/2,a=e.price>=s.coordinateToPrice(o,r)?1:-1;const l=this._model.mainSeries();if(i===l){const t=l.data().search(this._baseSeriesIndexForPoint(e));if(null!==t){const i=(0,p.seriesPrice)(l,t,-1),n=(0,p.seriesPrice)(l,t,1);a=e.price>=i?1:-1,o=s.priceToCoordinate(1===a?n:i,r),e.price=1===a?Math.max(n,e.price):e.price}}const c=1===(-1===a!==s.isInverted()?-1:1)?o:n-o,h=s.priceToCoordinate(e.price,r),d=Math.min(n,Math.abs(h-o)),u=Math.max(0,Math.min(100,100*d/c))*a;return this.properties().childs().position.setValue(u),e}_baseSeriesIndexForPoint(e){return e.index}_syncPosition(){const e=this.linkKey().value();if(null!==e){const t={position:this.properties().childs().position.value()};(0,_.changeLineStyle)({linkKey:e,state:t,model:this._model})}}_anchorYCoordinate(){const e=this.priceSource();if(null===e)return null;const t=e.priceScale(),i=e.firstValue();if(null===t||t.isEmpty()||null===i)return null;const s=this._model.mainSeries(),r=this.customEvent();if(null===r)return null;let n=null;if(e===s&&(n=(0,p.seriesBasePosition)(s,r)),null===n&&(n=(0,p.noDataBasePosition)(r,t,i)),null===n)return null;const o=r.position(),a=t.priceToCoordinate(n.price,i);return(0,p.positionToCoordinate)(o,t.height(),a,(0,p.positionVisualDirection)(o,t.isInverted()))}}class g extends m{constructor(e,t,s,r){super(e,null!=t?t:g.createProperties(),s,r),i.e(1583).then(i.bind(i,3793)).then((t=>{this._setPaneViews([new t.SignpostPaneView(this,e)])}))}pointsCount(){return 1}name(){return"Signpost"}customEvent(){return{index:()=>{var e,t -;return null!==(t=null===(e=this.points()[0])||void 0===e?void 0:e.index)&&void 0!==t?t:null},position:()=>this.properties().childs().position.value()}}showInObjectTree(){return!this.isPhantom()&&super.showInObjectTree()}isPhantom(){return this._model.isPhantomLine(this)}clonePositionOffset(){return{barOffset:1,xCoordOffset:0,yCoordOffset:0}}template(){const e=super.template(),t=this.properties().childs();return e.text=t.text.value(),e.position=t.position.value(),e}shouldBeRemovedOnDeselect(){const e=this._properties.childs();if(e.showImage.value())return!1;return""===e.text.value().trim()}static createProperties(e){const t=new r.DefaultProperty("linetoolsignpost",e);return this._configureProperties(t),t.hasChild("text")||t.addChild("text",new(a())(s.t(null,void 0,i(37229)))),t.hasChild("position")||t.addChild("position",new(a())(50)),t.addExclusion("text"),t.addExclusion("position"),t.addChild("backgroundsColors",new d.LineToolColorsProperty([t.childs().plateColor])),t}_createPointProperty(e){super._createPointProperty(e);const t=this._pointsProperty.childs().points[e];t.removeProperty("price"),t.removeProperty("bar"),t.addChild("price",new l(this)),t.addChild("bar",new h(this,0))}_applyTemplateImpl(e){super._applyTemplateImpl(e),this.properties().childs().text.setValue(e.text),this.properties().childs().position.setValue(e.position)}_getPropertyDefinitionsViewModelClass(){return Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,31353)).then((e=>e.SignpostDefinitionsViewModel))}static _configureProperties(e){n.LineDataSource._configureProperties(e)}}g.supportPhantomMode=!0},44625:(e,t,i)=>{"use strict";i.d(t,{LineToolSineLine:()=>n});var s=i(7711),r=i(10971);class n extends r.LineDataSource{constructor(e,t,s,r){super(e,t||n.createProperties(),s,r),i.e(1583).then(i.bind(i,71586)).then((e=>{this._setPaneViews([new e.SineLinePaneView(this,this._model)])}))}pointsCount(){return 2}name(){return"Sine Line"}static createProperties(e){const t=new s.DefaultProperty("linetoolsineline",e);return this._configureProperties(t),t}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,5513))).CyclicAndSineLinesPatternDefinitionsViewModel}}},87414:(e,t,i)=>{"use strict";i.d(t,{StudyLineDataSource:()=>P});var s=i(50151),r=i(65665),n=i(88552),o=i(10971),a=i(7711),l=i(58403),c=i(59780),h=i(8890),d=i(7910),u=i(39947),p=i(51332),_=i(91217),m=i(32769),g=i(8950),f=i(97425),v=i(86635),S=i(72039);class y extends S.StatusProviderBase{constructor(e){super(e.model().properties().childs().scalesProperties.childs().textColor),this._source=e}color(){return"#ff0000"}errorStatus(){const e=this._source.status();return e.type===v.StudyStatusType.Error?{error:this.sourceStatusText(),solutionId:(0,v.studyStatusSolutionId)(e),title:(0,v.studyStatusTitle)(e),studyFeature:(0,v.studyStatusFeature)(e)}:null}getSplitTitle(){return this._source.titleInParts()}text(){return this._source.translatedType()}sourceStatusText(){return(0, -v.convertStudyStatusToString)(this._source.status(),!0)}}var b=i(36646),w=i(17659);class C extends w.StatusView{constructor(e){super(e.statusProvider({}))}getSplitTitle(){return this._statusProvider.getSplitTitle()}}class P extends o.LineDataSource{constructor(e,t,s,r,n,o){super(e,r,n,o),this._indexes=null,this._inputs=null,this._definitionsViewModel=null,this._pointsetPoints=null,this._loadedPlots=null,this._loadedGraphics=null,this._beingCreatedPaneView=null,this._anchorsPaneView=null,this._isLegendDisplayed=!1,this._alignerCache=null,Promise.all([i.e(1583).then(i.bind(i,32957)),i.e(1583).then(i.bind(i,90596))]).then((t=>{const{LineToolBeingCreatedPaneView:i}=t[0],{StudyLineDataSourceAnchorsPaneView:s}=t[1];this._beingCreatedPaneView=new i(this,e),this._anchorsPaneView=new s(this,this.model()),this._model.lightUpdate()})),this._metaInfo=t,this._dataSource=new d.StudyDataSource(e.chartApi(),e.mainSeries().seriesSource(),s,t),this._dataSource.dataCleared().subscribe(this,this._onDataCleared),this._dataSource.dataUpdated().subscribe(this,this._onDataUpdated),this._dataSource.studyStatusChanged().subscribe(this,this._onStudyStatusChanged),this._statusProvider=new y(this),this._statusView=new C(this),this._showStudyArgumentsProperty=e.properties().childs().paneProperties.childs().legendProperties.childs().showStudyArguments}isDisplayedInLegend(){return this._isLegendDisplayed}titleInParts(){const e=[];if(this._showStudyArgumentsProperty.value()&&this._inputs)for(const t of this._metaInfo.inputs){if(!0===t.isHidden||"bool"===t.type)continue;const i=this._inputs[t.id];e.push(i.toString())}return[this.name(),e]}destroy(){this._dataSource.dataUpdated().unsubscribeAll(this),this._dataSource.dataCleared().unsubscribeAll(this),this._dataSource.studyStatusChanged().unsubscribeAll(this),this._dataSource.destroy(),null!==this._definitionsViewModel&&(this._definitionsViewModel.destroy(),this._definitionsViewModel=null),this._unsubscribeApplyInputsOnSeriesCompleted(),this._isDestroyed=!0,super.destroy()}stop(){super.stop(),this._isDestroyed||(this._dataSource.stop(),this.clearData())}start(){super.start(),this._isDestroyed||null===this._inputs||this._dataSource.start()}metaInfo(){return this._metaInfo}graphicsInfo(){return this._metaInfo.graphics}series(){return this._model.mainSeries()}translatedType(){return this._metaInfo.description}name(){return this._metaInfo.description}studyId(){return this._metaInfo.id}setPoint(e,t,i){super.setPoint(e,this._preparePoint(t,i))}move(e){}clearData(){this._clearAllDataExceptPointsetPoints(),this._pointsetPoints=null,this.updateAllViews((0,f.sourceChangeEvent)(this.id()))}data(){return this.plots()}plots(){return this._loadedPlots||this._dataSource.plots()}graphics(){return this._loadedGraphics||this._dataSource.graphics()}firstValue(){return this._model.mainSeries().firstValue()}state(e){const t=super.state(e);let i;this.metaInfo()instanceof l.StudyMetaInfo?i=this.metaInfo().state():(i=(0,r.clone)(this.metaInfo()),i.id=l.StudyMetaInfo.parseIdString(i.id+(i.version?"-"+i.version:"")).fullId) +;return null!==(t=null===(e=this.points()[0])||void 0===e?void 0:e.index)&&void 0!==t?t:null},position:()=>this.properties().childs().position.value()}}showInObjectTree(){return!this.isPhantom()&&super.showInObjectTree()}isPhantom(){return this._model.isPhantomLine(this)}clonePositionOffset(){return{barOffset:1,xCoordOffset:0,yCoordOffset:0}}template(){const e=super.template(),t=this.properties().childs();return e.text=t.text.value(),e.position=t.position.value(),e}shouldBeRemovedOnDeselect(){const e=this._properties.childs();if(e.showImage.value())return!1;return""===e.text.value().trim()}static createProperties(e){const t=new r.DefaultProperty("linetoolsignpost",e);return this._configureProperties(t),t.hasChild("text")||t.addChild("text",new(a())(s.t(null,void 0,i(37229)))),t.hasChild("position")||t.addChild("position",new(a())(50)),t.addExclusion("text"),t.addExclusion("position"),t.addChild("backgroundsColors",new d.LineToolColorsProperty([t.childs().plateColor])),t}_createPointProperty(e){super._createPointProperty(e);const t=this._pointsProperty.childs().points[e];t.removeProperty("price"),t.removeProperty("bar"),t.addChild("price",new l(this)),t.addChild("bar",new h(this,0))}_applyTemplateImpl(e){super._applyTemplateImpl(e),this.properties().childs().text.setValue(e.text),this.properties().childs().position.setValue(e.position)}_getPropertyDefinitionsViewModelClass(){return Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,31353)).then((e=>e.SignpostDefinitionsViewModel))}static _configureProperties(e){n.LineDataSource._configureProperties(e)}}g.supportPhantomMode=!0},44625:(e,t,i)=>{"use strict";i.d(t,{LineToolSineLine:()=>n});var s=i(7711),r=i(10971);class n extends r.LineDataSource{constructor(e,t,s,r){super(e,t||n.createProperties(),s,r),i.e(1583).then(i.bind(i,71586)).then((e=>{this._setPaneViews([new e.SineLinePaneView(this,this._model)])}))}pointsCount(){return 2}name(){return"Sine Line"}static createProperties(e){const t=new s.DefaultProperty("linetoolsineline",e);return this._configureProperties(t),t}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,5513))).CyclicAndSineLinesPatternDefinitionsViewModel}}},87414:(e,t,i)=>{"use strict";i.d(t,{StudyLineDataSource:()=>C});var s=i(50151),r=i(65665),n=i(88552),o=i(10971),a=i(7711),l=i(58403),c=i(59780),h=i(8890),d=i(7910),u=i(39947),p=i(51332),_=i(91217),m=i(32769),g=i(8950),f=i(97425),v=i(86635),S=i(72039);class y extends S.StatusProviderBase{constructor(e){super(e.model().properties().childs().scalesProperties.childs().textColor),this._source=e}color(){return"#ff0000"}errorStatus(){const e=this._source.status();return e.type===v.StudyStatusType.Error?{error:this.sourceStatusText(),solutionId:(0,v.studyStatusSolutionId)(e),title:(0,v.studyStatusTitle)(e),studyFeature:(0,v.studyStatusFeature)(e)}:null}getSplitTitle(){return this._source.titleInParts()}text(){return this._source.translatedType()}sourceStatusText(){return(0, +v.convertStudyStatusToString)(this._source.status(),!0)}}var b=i(36646),w=i(17659);class P extends w.StatusView{constructor(e){super(e.statusProvider({}))}getSplitTitle(){return this._statusProvider.getSplitTitle()}}class C extends o.LineDataSource{constructor(e,t,s,r,n,o){super(e,r,n,o),this._indexes=null,this._inputs=null,this._definitionsViewModel=null,this._pointsetPoints=null,this._loadedPlots=null,this._loadedGraphics=null,this._beingCreatedPaneView=null,this._anchorsPaneView=null,this._isLegendDisplayed=!1,this._alignerCache=null,Promise.all([i.e(1583).then(i.bind(i,32957)),i.e(1583).then(i.bind(i,90596))]).then((t=>{const{LineToolBeingCreatedPaneView:i}=t[0],{StudyLineDataSourceAnchorsPaneView:s}=t[1];this._beingCreatedPaneView=new i(this,e),this._anchorsPaneView=new s(this,this.model()),this._model.lightUpdate()})),this._metaInfo=t,this._dataSource=new d.StudyDataSource(e.chartApi(),e.mainSeries().seriesSource(),s,t),this._dataSource.dataCleared().subscribe(this,this._onDataCleared),this._dataSource.dataUpdated().subscribe(this,this._onDataUpdated),this._dataSource.studyStatusChanged().subscribe(this,this._onStudyStatusChanged),this._statusProvider=new y(this),this._statusView=new P(this),this._showStudyArgumentsProperty=e.properties().childs().paneProperties.childs().legendProperties.childs().showStudyArguments}isDisplayedInLegend(){return this._isLegendDisplayed}titleInParts(){const e=[];if(this._showStudyArgumentsProperty.value()&&this._inputs)for(const t of this._metaInfo.inputs){if(!0===t.isHidden||"bool"===t.type)continue;const i=this._inputs[t.id];e.push(i.toString())}return[this.name(),e]}destroy(){this._dataSource.dataUpdated().unsubscribeAll(this),this._dataSource.dataCleared().unsubscribeAll(this),this._dataSource.studyStatusChanged().unsubscribeAll(this),this._dataSource.destroy(),null!==this._definitionsViewModel&&(this._definitionsViewModel.destroy(),this._definitionsViewModel=null),this._unsubscribeApplyInputsOnSeriesCompleted(),this._isDestroyed=!0,super.destroy()}stop(){super.stop(),this._isDestroyed||(this._dataSource.stop(),this.clearData())}start(){super.start(),this._isDestroyed||null===this._inputs||this._dataSource.start()}metaInfo(){return this._metaInfo}graphicsInfo(){return this._metaInfo.graphics}series(){return this._model.mainSeries()}translatedType(){return this._metaInfo.description}name(){return this._metaInfo.description}studyId(){return this._metaInfo.id}setPoint(e,t,i){super.setPoint(e,this._preparePoint(t,i))}move(e){}clearData(){this._clearAllDataExceptPointsetPoints(),this._pointsetPoints=null,this.updateAllViews((0,f.sourceChangeEvent)(this.id()))}data(){return this.plots()}plots(){return this._loadedPlots||this._dataSource.plots()}graphics(){return this._loadedGraphics||this._dataSource.graphics()}firstValue(){return this._model.mainSeries().firstValue()}state(e){const t=super.state(e);let i;this.metaInfo()instanceof l.StudyMetaInfo?i=this.metaInfo().state():(i=(0,r.clone)(this.metaInfo()),i.id=l.StudyMetaInfo.parseIdString(i.id+(i.version?"-"+i.version:"")).fullId) ;const s={...t,metaInfo:i};return e&&(s.data=this.plots().state(),s.nonseriesindexes=this._indexes,s.graphics=(0,c.saveStudyGraphics)(this.graphics(),null)),s}restoreData(e){var t;void 0!==e.data&&(this._loadedPlots=new n.PlotList((0,p.studyPlotFunctionMap)(this._metaInfo),p.studyEmptyPlotValuePredicate),this._loadedPlots.restoreState(e.data)),this._indexes=null!==(t=e.nonseriesindexes)&&void 0!==t?t:this._indexes,this._loadedGraphics=e.graphics?(0,c.loadStudyGraphics)(e.graphics):this._loadedGraphics}getPropertyDefinitionsViewModel(){return null===this._definitionsViewModel?this._getPropertyDefinitionsViewModelClass().then((e=>null===e||this._isDestroyed?null:(null===this._definitionsViewModel&&(this._definitionsViewModel=new e(this._model.undoModel(),this)),this._definitionsViewModel))):Promise.resolve(this._definitionsViewModel)}paneViews(e){let t=[];if(this.isSourceHidden())return t;if(this._isReady()&&this._changeStatesStack.isEmpty()){const i=super.paneViews(e);null!==i&&(t=t.concat(i))}else null!==this._beingCreatedPaneView&&t.push(this._beingCreatedPaneView);return null!==this._anchorsPaneView&&t.push(this._anchorsPaneView),t}propertiesChanged(e){super.propertiesChanged(e),this._onStudyInputsMayChange()}dataAndViewsReady(){return super.dataAndViewsReady()&&this._isReady()}endChanging(e,t){const i=super.endChanging(e,t);return i.indexesChanged?this.clearData():this._updateAnchorsPrice(!0),i}moveData(e){this._dataSource.moveData(e)}restorePoints(e,t,i){super.restorePoints(e,t,i),this._updateAnchorsPrice(!0)}realign(){super.realign(),null===this._model.mainSeries().symbolInfo()&&(this._alignerCache=null)}statusProvider(e){return this._statusProvider}statusView(){return this._statusView}legendView(){return null}dataProblemModel(){return null}dataUpdatedModeModel(){return null}marketStatusModel(){return null}onStatusChanged(){return this._dataSource.studyStatusChanged()}status(){return this._dataSource.studyStatus()}recalcStudyIfNeeded(){}static createPropertiesFromStudyMetaInfoAndState(e,t,i,s){const r=(0,_.prepareStudyPropertiesForLoadChart)(e,t,i,s);return this._configureProperties(r),r}_onStudyStatusChanged(e,t){let i;switch(t.type){case u.StudyStatusType.Error:i=!0;break;case u.StudyStatusType.Completed:i=!1;break;default:return}if(i===this._isLegendDisplayed)return;this._isLegendDisplayed=i;const s=this._model.paneForSource(this);if(s){const e=this._model.panes().indexOf(s),t=b.InvalidationMask.invalidateLegendWidgetLayout(e);this.model().invalidate(t)}}_studyId(){return this._dataSource.studyId()}_isReady(){return!0}_updateAllPaneViews(e){var t,i;super._updateAllPaneViews(e),null===(t=this._beingCreatedPaneView)||void 0===t||t.update(),null===(i=this._anchorsPaneView)||void 0===i||i.update(e)}_getPointTime(e,t){const i=e.index,s=this._model.timeScale().indexToTimePoint(i);if(null!==s)return s;if(t||void 0===e.time)return null;const r=this._model.mainSeries().symbolInfo();if(null===r)return null;let n=this._model.properties().childs().timezone.value();"exchange"===n&&(n=r.timezone);const o=(0, m.cal_to_utc)((0,m.get_timezone)(n),e.time);return this._getStartBarAligner()(o)/1e3}_updateAnchorsPrice(e){}_onPointsetUpdated(e){super._onPointsetUpdated(e),this._pointsetPoints=this._points.map((e=>({price:e.price,index:e.index,time:e.time}))),this._onStudyInputsMayChange()}_onDataCleared(){this.updateAllViews((0,f.sourceChangeEvent)({sourceId:this.id(),clearData:!0})),this._model.updateSource(this)}_onDataUpdated(e,t,i){var s;this._updateAnchorsPrice(),this.updateAllViews((0,f.sourceChangeEvent)({sourceId:this.id(),firstUpdatedTimePointIndex:null===(s=e[0])||void 0===s?void 0:s.index})),this._model.updateSource(this)}_onStudyInputsMayChange(){let e=null;if(null!==this._pointsetPoints&&this._pointsetPoints.length===this.pointsCount()&&(e=this._studyInputs(this._pointsetPoints),null===e&&(this._clearAllDataExceptPointsetPoints(),this.updateAllViews((0,f.sourceChangeEvent)(this.id())))),null!==e){const t=this.metaInfo().inputs.map((e=>e.id)),i=Object.keys(e);for(const s of i)t.includes(s)||delete e[s]}this._areInputsEqual(this._inputs,e)||this._applyStudyInputs(e)}_preparePoint(e,t){return super._preparePoint(this._alignPointToRangeOfActualData(e),t)}_getPropertyDefinitionsViewModelClass(){return Promise.resolve(null)}_subscribeApplyInputsOnSeriesCompleted(){this._unsubscribeApplyInputsOnSeriesCompleted(),this._model.mainSeries().dataEvents().completed().subscribe(this,(()=>this._onStudyInputsMayChange()),!0)}_unsubscribeApplyInputsOnSeriesCompleted(){this._model.mainSeries().dataEvents().completed().unsubscribeAll(this)}_onInputsChanged(){0}static _createPropertiesFromStudyIdAndState(e,t){const i=l.StudyMetaInfo.getStudyPropertyRootNameById(e),s=new a.DefaultProperty(i,t);return this._configureProperties(s),s}static _configureProperties(e){super._configureProperties(e),e.removeExclusion("intervalsVisibilities")}_areInputsEqual(e,t){return null===t?null===e:null!==e&&(0,h.areStudyInputsEqual)(this._metaInfo.inputs,e,t)}_applyStudyInputs(e){const t=this._inputs;this._inputs=e,null!==e&&(this._unsubscribeApplyInputsOnSeriesCompleted(),this._dataSource.setInputs(e),null===t&&this.isStarted()&&!this._dataSource.isStarted()&&this._dataSource.start()),this._onInputsChanged()}_clearAllDataExceptPointsetPoints(){this._inputs=null,this._dataSource.clearData(),this._loadedPlots=null,this._indexes=null,this._loadedGraphics=null}_getStartBarAligner(){const e=this._model.mainSeries().interval();return null!==this._alignerCache&&this._alignerCache.resolution===this._model.mainSeries().interval()||(this._alignerCache={resolution:e,aligner:(0,g.createTimeToBarTimeAligner)(e,(0,s.ensureNotNull)(this._model.mainSeries().symbolInfo()))}),this._alignerCache.aligner}}},29111:(e,t,i)=>{"use strict";i.d(t,{LineToolSvgIconBase:()=>l});var s=i(50151),r=i(86441),n=i(26867),o=i.n(n),a=i(10971);class l extends a.LineDataSource{constructor(e,t,i,s){super(e,t,i,s),this._onIconChanged=new(o()),this._svgContent=null,this._loadViews()}pointsCount(){return 1}hasEditableCoordinates(){return!1}getAnchorLimit(){return 80}getChangePointForSync(e){ return null}setPoint(e,t,i){const n=Object.assign({},t),o=(0,s.ensureNotNull)(this.pointToScreenPoint(this.points()[0])),a=(0,s.ensureNotNull)(this.pointToScreenPoint(n)).subtract(o),l=this.properties().childs();if(0===e||1===e){const t=a.normalized();let i=Math.acos(-t.x);Math.asin(t.y)>0&&(i=2*Math.PI-i),0===e&&(i+=Math.PI),l.angle.setValue(i)}else{const t=a.add(new r.Point(15*(3===e?-1:1),0));l.size.setValue(2*Math.abs(t.x))}}getSourceIcon(){const e=this.svgContent();return null===e?null:{type:"svgContent",content:e}}onSourceIconChanged(){return this._onIconChanged}svgContent(){return this._svgContent}static _configureProperties(e){super._configureProperties(e),e.addExclusion("angle")}}},88767:(e,t,i)=>{"use strict";i.d(t,{LineToolText:()=>u,LineToolTextAbsolute:()=>p});var s=i(50151),r=i(86441),n=i(44352),o=i(10971),a=i(26220),l=i.n(a),c=i(7711),h=i(75862),d=i(97425);class u extends o.LineDataSource{constructor(e,t,s,r){const n=t||u.createProperties();super(e,n,s,r),this._barSpacing=e.timeScale().barSpacing(),this._recalculatePointsOnCenter=!1,i.e(1583).then(i.bind(i,9880)).then((({TextPaneView:t})=>{const i=this._recalculatePointsOnCenter?(e,t)=>{this._recalculatePointsOnCenter&&this._recalculateCenterPosition(e,t)}:void 0;this._setPaneViews([new t(this,e,void 0,void 0,void 0,void 0,void 0,i)])}))}centerPosition(){this._recalculatePointsOnCenter=!0}setPoint(e,t,i){const r=this.properties().childs();let n;if(1===e&&r.wordWrapWidth.value()){const e=this.model().timeScale();n=this.isFixed()?(0,s.ensureDefined)(this.fixedPoint()).x:e.indexToCoordinate(this.points()[0].index);const i=e.indexToCoordinate(t.index)-n-~~(r.fontsize.value()/6);if(!isFinite(i))return;r.wordWrapWidth.setValue(Math.max(100,i))}}pointsCount(){return 1}name(){return"Text"}setPriceScale(e){super.setPriceScale(e),e&&e.priceRange()&&(this._priceDencity=e.height()/(0,s.ensureNotNull)(e.priceRange()).length(),this._isPriceDencityLog=e.isLog())}restoreSize(){const e=(0,s.ensureNotNull)(this.priceScale());this._barSpacing=this.model().timeScale().barSpacing(),this._priceDencity=e.height()/(0,s.ensureNotNull)(e.priceRange()).length(),this.redraw((0,d.sourceChangeEvent)(this.id()))}redraw(e){this.updateAllViews(e),this._model.updateSource(this)}template(){const e=super.template();return e.text=this.properties().childs().text.value(),e}state(e){const t=super.state(e);return e&&(t.state.fixedSize=!1),t}barSpacing(){return this._barSpacing}priceDencity(){return this._priceDencity}isPriceDencityLog(){return this._isPriceDencityLog}hasEditableCoordinates(){return!1}shouldBeRemovedOnDeselect(){return""===this._properties.childs().text.value().trim()}static createProperties(e){const t=new c.DefaultProperty("linetooltext",e);return this._configureProperties(t),t}_applyTemplateImpl(e){super._applyTemplateImpl(e),this.properties().childs().text.setValue(e.text)}_getPropertyDefinitionsViewModelClass(){return Promise.all([i.e(6682),i.e(4800),i.e(892),i.e(4785),i.e(8537)]).then(i.bind(i,63874)).then((e=>e.TextDefinitionsViewModel))}static _configureProperties(e){ @@ -605,119 +605,119 @@ setIsMagnetEnabled:()=>f,setMagnetMode:()=>v});var s=i(7711),r=i(40549),n=i.n(r) s.hasProperty)(t,"isUpdate")){if("boolean"!=typeof t.isUpdate)throw new Error('Invalid type of "isUpdate" field');i.isUpdate=t.isUpdate}return(0,s.hasProperty)(t,"data")&&(i.data=t.data),(0,s.hasProperty)(t,"graphicsCmds")&&(i.graphicsCmds=function(e){if(!(0,s.isObject)(e))throw new Error("Graphics commands should be wrapped in an object");if((0,s.hasProperty)(e,"create"),(0,s.hasProperty)(e,"erase")){const t=e.erase;(0,r.assert)(Array.isArray(t),"Collection of erase commands should be array");for(const e of t){if(!(0,s.isObject)(e)||!(0,s.hasProperty)(e,"action"))throw new Error("Command should be an object with 'action' property");(0,r.assert)("all"===e.action||"one"===e.action,"Erase command action should be 'all' or 'one'")}}return e}(t.graphicsCmds)),i}},2:(e,t,i)=>{"use strict";i.d(t,{notAvailable:()=>r});var s=i(44352);const r=i(2484).enabled("use_na_string_for_not_available_values")?s.t(null,void 0,i(16542)):"∅"},6947:(e,t,i)=>{"use strict";var s;i.d(t,{PaneCursorType:()=>s}),function(e){e[e.Default=0]="Default",e[e.Pointer=1]="Pointer",e[e.Eraser=2]="Eraser",e[e.Dot=3]="Dot",e[e.Grabbing=4]="Grabbing",e[e.ZoomIn=5]="ZoomIn",e[e.VerticalResize=6]="VerticalResize",e[e.HorizontalResize=7]="HorizontalResize",e[e.DiagonalNeSwResize=8]="DiagonalNeSwResize",e[e.DiagonalNwSeResize=9]="DiagonalNwSeResize"}(s||(s={}))},64636:(e,t,i)=>{"use strict";i.d(t,{PanePriceAxisView:()=>n});var s=i(40858);class r{constructor(e){this._priceAxisViewRenderer=null,this._rendererOptions=null,this._align="right",this._width=0,this._height=0,this._textWidthCache=e}setParams(e,t,i,s,r){this._priceAxisViewRenderer=e,this._rendererOptions=t,this._width=i,this._height=s,this._align=r}draw(e,t){null!==this._rendererOptions&&null!==this._priceAxisViewRenderer&&this._priceAxisViewRenderer.draw(e,this._rendererOptions,this._textWidthCache,this._width,this._height,this._align,t.pixelRatio)}hitTest(e){var t,i;return void 0===(null===(t=this._priceAxisViewRenderer)||void 0===t?void 0:t.hitTest)?null:null===(i=this._priceAxisViewRenderer)||void 0===i?void 0:i.hitTest(e,this._width,this._align)}}class n{constructor(e,t,i){this._renderer=null,this._invalidated=!0,this._priceAxisView=e,this._textWidthCache=new s.TextWidthCache(100),this._dataSource=t,this._chartModel=i,this._fontSize=-1,this._panePriceAxisViewRenderer=new r(this._textWidthCache)}update(e){this._invalidated=!0}renderer(e,t){return this._invalidated&&this._updateImpl(e,t),this._renderer}_updateImpl(e,t){this._renderer=null;const i=this._chartModel.crossHairSource(),s=this._dataSource===i?i.pane:this._chartModel.paneForSource(this._dataSource);if(null===s)return;const r=this._priceScale();if(null===r)return;let n=s.priceScalePosition(r);if("overlay"===n&&(n=s.priceScalePosition(s.defaultPriceScale())),"overlay"===n)return;const o=this._chartModel.priceAxisRendererOptions();o.fontSize!==this._fontSize&&(this._fontSize=o.fontSize,this._textWidthCache.reset()),this._panePriceAxisViewRenderer.setParams(this._priceAxisView.paneRenderer(),o,t,e,n), this._renderer=this._panePriceAxisViewRenderer,this._invalidated=!1}_priceScale(){return this._dataSource.priceScale()}}},28962:(e,t,i)=>{"use strict";i.d(t,{PaneRendererArea:()=>a});var s=i(50151),r=i(76078),n=i(55014),o=i(9740);class a extends r.PaneRendererLine{constructor(e){e.forceLineColor=!1,super(e)}draw(e,t){var i,r,a,l,c;const h=this._data;if(0===h.items.length)return;let d=null!==(r=null===(i=this._data.visibleItemsRange)||void 0===i?void 0:i.startItemIndex)&&void 0!==r?r:0,u=(null!==(l=null===(a=this._data.visibleItemsRange)||void 0===a?void 0:a.endItemIndex)&&void 0!==l?l:this._data.items.length)-1;for(;d=0&&!(0,n.coordinateIsValid)(h.items[u].y);)u--;if(d>u)return;e.save(),e.scale(t.pixelRatio,t.pixelRatio),e.lineCap="butt",e.strokeStyle=h.lineColor,e.lineWidth=h.lineWidth,(0,o.setLineStyle)(e,h.lineStyle),e.lineWidth=1;const p={},_=h.items;for(let e=d;e<=u;e++){const t=_[e];let i;if(i=t.style?t.style.color:h.lineColor,e{"use strict";i.d(t,{CompositeRenderer:()=>s});class s{constructor(){this._renderers=[],this._globalAlpha=1}setGlobalAlpha(e){this._globalAlpha=e}append(e){this._renderers.push(e)}insert(e,t){this._renderers.splice(t,0,e)}clear(){this._renderers.length=0}isEmpty(){return 0===this._renderers.length}draw(e,t){for(let i=0;i=0;s--){const r=this._renderers[s].hitTest(e,t);null!==r&&(null===i||r.result()>i.result())&&(i=r)}return i}doesIntersectWithBox(e){return this._renderers.some((t=>!!t.doesIntersectWithBox&&t.doesIntersectWithBox(e)))}}},9740:(e,t,i)=>{"use strict";i.r(t),i.d(t,{clearRectWithGradient:()=>o,fillRectInnerBorder:()=>a,drawHorizontalLine:()=>l,drawVerticalLine:()=>c,drawRoundRect:()=>d,drawRoundRectWithInnerBorder:()=>u,fillRectWithBorder:()=>p,createCircle:()=>_,drawPoly:()=>m,setLineStyle:()=>g,drawLine:()=>f});var s=i(86441),r=i(53479),n=i(89);function o(e,t,i,s,r,n,o){e.save(),e.globalCompositeOperation="copy" ;const a=e.createLinearGradient(0,0,0,r);a.addColorStop(0,n),a.addColorStop(1,o),e.fillStyle=a,e.fillRect(t,i,s,r),e.restore()}function a(e,t,i,s,r,n){e.fillRect(t+n,i,s-2*n,n),e.fillRect(t+n,i+r-n,s-2*n,n),e.fillRect(t,i,n,r),e.fillRect(t+s-n,i,n,r)}function l(e,t,i,s){e.beginPath();const r=e.lineWidth%2?.5:0;e.moveTo(i,t+r),e.lineTo(s,t+r),e.stroke()}function c(e,t,i,s){e.beginPath();const r=e.lineWidth%2?.5:0;e.moveTo(t+r,i),e.lineTo(t+r,s),e.stroke()}function h(e,t){return Array.isArray(e)?e.map((e=>0===e?e:e+t)):e+t}function d(e,t,i,s,r,n,o){let a,l,c,h;if(Array.isArray(n))if(2===n.length){const e=Math.max(0,n[0]),t=Math.max(0,n[1]);a=e,l=e,c=t,h=t}else{if(4!==n.length)throw new Error("Wrong border radius - it should be like css border radius");a=Math.max(0,n[0]),l=Math.max(0,n[1]),c=Math.max(0,n[2]),h=Math.max(0,n[3])}else{const e=Math.max(0,n);a=e,l=e,c=e,h=e}o||e.beginPath(),e.moveTo(t+a,i),e.lineTo(t+s-l,i),0!==l&&e.arcTo(t+s,i,t+s,i+l,l),e.lineTo(t+s,i+r-c),0!==c&&e.arcTo(t+s,i+r,t+s-c,i+r,c),e.lineTo(t+h,i+r),0!==h&&e.arcTo(t,i+r,t,i+r-h,h),e.lineTo(t,i+a),0!==a&&e.arcTo(t,i,t+a,i,a)}function u(e,t,i,s,r,o,a=0,l=0,c="",u=n.LineStyle.Solid){if(e.save(),!l||!c||c===o)return d(e,t,i,s,r,a),e.fillStyle=o,e.fill(),void e.restore();const p=l/2;if("transparent"!==o){const p="transparent"!==c&&u!==n.LineStyle.Solid;d(e,p?t:t+l,p?i:i+l,p?s:s-2*l,p?r:r-2*l,p?a:h(a,-l)),e.fillStyle=o,e.fill()}if("transparent"!==c){d(e,t+p,i+p,s-l,r-l,h(a,-p)),e.lineWidth=l,e.strokeStyle=c,g(e,u),e.closePath(),e.stroke()}e.restore()}function p(e,t,i,r,n,o,a,l,c,h,d,u,p,_,m){const f=h?0:t,v=d?p:r;if(void 0!==o&&(e.fillStyle=o,e.fillRect(f,i,v-f+_,n-i)),void 0!==a&&l>0){if(e.beginPath(),g(e,c),void 0!==m){const t=m.map((e=>e*l));e.setLineDash(t)}let o=(0,s.point)(0,0),h=(0,s.point)(0,0),d=(0,s.point)(0,0),p=(0,s.point)(0,0);switch(u){case"outer":{const e=.5*l;d=(0,s.point)(0,e),p=(0,s.point)(0,e),o=(0,s.point)(e,-l),h=(0,s.point)(e,-l);break}case"center":{const e=l%2?.5:0,t=l%2?.5:_;d=(0,s.point)(.5*l-e,-e),p=(0,s.point)(t+.5*l,-e),o=(0,s.point)(-e,e+.5*l),h=(0,s.point)(t,e+.5*l);break}case"inner":{const e=.5*l;d=(0,s.point)(0,-e),p=(0,s.point)(1,-e),o=(0,s.point)(-e,l),h=(0,s.point)(1-e,l);break}}e.lineWidth=l,e.strokeStyle=a,e.moveTo(f-d.x,i-d.y),e.lineTo(v+p.x,i-p.y),e.moveTo(r+h.x,i+h.y),e.lineTo(r+h.x,n-h.y),e.moveTo(f-d.x,n+d.y),e.lineTo(v+p.x,n+p.y),e.moveTo(t-o.x,i+o.y),e.lineTo(t-o.x,n-o.y),e.stroke()}}function _(e,t,i,s){e.beginPath(),e.arc(t,i,s,0,2*Math.PI,!1),e.closePath()}function m(e,t,i){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(const i of t)e.lineTo(i.x,i.y);e.closePath(),e.stroke(),i&&e.fill()}function g(e,t){let i=[];t!==r.LINESTYLE_SOLID&&(i=function(e,t){return[[e.lineWidth,2*e.lineWidth],[5*e.lineWidth,6*e.lineWidth],[6*e.lineWidth,6*e.lineWidth],[e.lineWidth,4*e.lineWidth],[2*e.lineWidth,e.lineWidth]][t-1]}(e,t)),e.setLineDash(i)}function f(e,t,i,s,r){isFinite(t)&&isFinite(s)&&isFinite(i)&&isFinite(r)&&(e.save(),e.beginPath(),e.moveTo(t,i),e.lineTo(s,r),e.stroke(),e.restore())}},55014:(e,t,i)=>{"use strict" -;i.d(t,{extendAndClipLineSegment:()=>h,getArrowPoints:()=>d,optimalBarWidth:()=>u,optimalCandlestickWidth:()=>p,optimalHiLoWidth:()=>_,interactionTolerance:()=>m,coordinateIsValid:()=>g,setValidLineStyle:()=>f,fillScaledRadius:()=>v,strokeScaledRadius:()=>S});var s=i(86441),r=i(5531),n=i(78996),o=i(65665),a=i(9740);const l={line:13,minDistanceBetweenPoints:10,series:14,curve:10,anchor:13,esd:4},c={line:3,minDistanceBetweenPoints:5,series:2,curve:3,anchor:2,esd:0};function h(e,t,i,n,o,a){if((0,s.equalPoints)(e,t))return null;const l=new s.Point(0,0),c=new s.Point(i,n);if(o){if(a){const i=(0,r.intersectLineAndBox)((0,s.lineThroughPoints)(e,t),(0,s.box)(l,c));return Array.isArray(i)?i:null}{const i=(0,r.intersectRayAndBox)(t,e,(0,s.box)(l,c));return null===i||(0,s.equalPoints)(t,i)?null:(0,s.lineSegment)(t,i)}}if(a){const i=(0,r.intersectRayAndBox)(e,t,(0,s.box)(l,c));return null===i||(0,s.equalPoints)(e,i)?null:(0,s.lineSegment)(e,i)}{const i=(0,r.intersectLineSegmentAndBox)((0,s.lineSegment)(e,t),(0,s.box)(l,c));return Array.isArray(i)?i:null}}function d(e,t,i,s){const r=.5*i,n=Math.sqrt(2),o=t.subtract(e),a=o.normalized();let l=5*i;s&&(l=Math.min(l,.35*o.length()));const c=1*r;if(l*n*.2<=c)return[];const h=a.scaled(l),d=t.subtract(h),u=a.transposed(),p=1*l,_=u.scaled(p),m=d.add(_),g=d.subtract(_),f=m.subtract(t).normalized().scaled(c),v=g.subtract(t).normalized().scaled(c),S=t.add(f),y=t.add(v),b=r*(n-1),w=u.scaled(b),C=Math.min(l-1*r/n,r*n*1),P=a.scaled(C),T=t.subtract(w),x=t.add(w),I=t.subtract(P);return[[m,S],[g,y],[T,I.subtract(w)],[x,I.add(w)]]}function u(e,t){return t=t||1,Math.floor(.3*e*t)}function p(e,t){if(e>=2.5&&e<=4)return Math.floor(3*t);const i=1-.2*Math.atan(Math.max(4,e)-4)/(.5*Math.PI),s=Math.floor(e*i*t),r=Math.floor(e*t),n=Math.min(s,r);return Math.max(Math.floor(t),n)}function _(e){return.4*e}function m(){return(0,n.lastMouseOrTouchEventInfo)().isTouch?l:c}function g(e){return null!=e&&!(0,o.isNaN)(e)}function f(e,t){void 0!==t&&(0,a.setLineStyle)(e,t)}function v(e,t){const i=Math.max(1,Math.floor(t))%2?.5:0;return Math.round(e*t)+i}function S(e,t,i){const s=Math.max(1,Math.floor(t))%2?.5:0;return Math.round(e*t)+(s!==i%2?.5:0)}},2945:(e,t,i)=>{"use strict";i.d(t,{HorizontalLineRenderer:()=>a});var s=i(14888),r=i(9740),n=i(55014),o=i(83499);class a{constructor(){this._data=null,this._hitTest=new s.HitTestResult(s.HitTestResult.REGULAR)}setData(e){this._data=e}setHitTest(e){this._hitTest=e}hitTest(e){if(null===this._data||!1===this._data.visible||null===this._hitTest)return null;const t=(0,n.interactionTolerance)().line,i=Math.abs(e.y-this._data.y)<=t+this._data.linewidth/2,s=void 0===this._data.left||this._data.left-e.x<=t,r=void 0===this._data.right||e.x-this._data.right<=t;return i&&s&&r?this._hitTest:null}draw(e,t){if(null===this._data)return;if(!1===this._data.visible)return;if(this._data.y<-this._data.linewidth/2||this._data.y>t.cssHeight+this._data.linewidth/2)return;const i=t.pixelRatio;e.lineCap="butt",e.strokeStyle=this._data.color, +;i.d(t,{extendAndClipLineSegment:()=>h,getArrowPoints:()=>d,optimalBarWidth:()=>u,optimalCandlestickWidth:()=>p,optimalHiLoWidth:()=>_,interactionTolerance:()=>m,coordinateIsValid:()=>g,setValidLineStyle:()=>f,fillScaledRadius:()=>v,strokeScaledRadius:()=>S});var s=i(86441),r=i(5531),n=i(78996),o=i(65665),a=i(9740);const l={line:13,minDistanceBetweenPoints:10,series:14,curve:10,anchor:13,esd:4},c={line:3,minDistanceBetweenPoints:5,series:2,curve:3,anchor:2,esd:0};function h(e,t,i,n,o,a){if((0,s.equalPoints)(e,t))return null;const l=new s.Point(0,0),c=new s.Point(i,n);if(o){if(a){const i=(0,r.intersectLineAndBox)((0,s.lineThroughPoints)(e,t),(0,s.box)(l,c));return Array.isArray(i)?i:null}{const i=(0,r.intersectRayAndBox)(t,e,(0,s.box)(l,c));return null===i||(0,s.equalPoints)(t,i)?null:(0,s.lineSegment)(t,i)}}if(a){const i=(0,r.intersectRayAndBox)(e,t,(0,s.box)(l,c));return null===i||(0,s.equalPoints)(e,i)?null:(0,s.lineSegment)(e,i)}{const i=(0,r.intersectLineSegmentAndBox)((0,s.lineSegment)(e,t),(0,s.box)(l,c));return Array.isArray(i)?i:null}}function d(e,t,i,s){const r=.5*i,n=Math.sqrt(2),o=t.subtract(e),a=o.normalized();let l=5*i;s&&(l=Math.min(l,.35*o.length()));const c=1*r;if(l*n*.2<=c)return[];const h=a.scaled(l),d=t.subtract(h),u=a.transposed(),p=1*l,_=u.scaled(p),m=d.add(_),g=d.subtract(_),f=m.subtract(t).normalized().scaled(c),v=g.subtract(t).normalized().scaled(c),S=t.add(f),y=t.add(v),b=r*(n-1),w=u.scaled(b),P=Math.min(l-1*r/n,r*n*1),C=a.scaled(P),T=t.subtract(w),x=t.add(w),I=t.subtract(C);return[[m,S],[g,y],[T,I.subtract(w)],[x,I.add(w)]]}function u(e,t){return t=t||1,Math.floor(.3*e*t)}function p(e,t){if(e>=2.5&&e<=4)return Math.floor(3*t);const i=1-.2*Math.atan(Math.max(4,e)-4)/(.5*Math.PI),s=Math.floor(e*i*t),r=Math.floor(e*t),n=Math.min(s,r);return Math.max(Math.floor(t),n)}function _(e){return.4*e}function m(){return(0,n.lastMouseOrTouchEventInfo)().isTouch?l:c}function g(e){return null!=e&&!(0,o.isNaN)(e)}function f(e,t){void 0!==t&&(0,a.setLineStyle)(e,t)}function v(e,t){const i=Math.max(1,Math.floor(t))%2?.5:0;return Math.round(e*t)+i}function S(e,t,i){const s=Math.max(1,Math.floor(t))%2?.5:0;return Math.round(e*t)+(s!==i%2?.5:0)}},2945:(e,t,i)=>{"use strict";i.d(t,{HorizontalLineRenderer:()=>a});var s=i(14888),r=i(9740),n=i(55014),o=i(83499);class a{constructor(){this._data=null,this._hitTest=new s.HitTestResult(s.HitTestResult.REGULAR)}setData(e){this._data=e}setHitTest(e){this._hitTest=e}hitTest(e){if(null===this._data||!1===this._data.visible||null===this._hitTest)return null;const t=(0,n.interactionTolerance)().line,i=Math.abs(e.y-this._data.y)<=t+this._data.linewidth/2,s=void 0===this._data.left||this._data.left-e.x<=t,r=void 0===this._data.right||e.x-this._data.right<=t;return i&&s&&r?this._hitTest:null}draw(e,t){if(null===this._data)return;if(!1===this._data.visible)return;if(this._data.y<-this._data.linewidth/2||this._data.y>t.cssHeight+this._data.linewidth/2)return;const i=t.pixelRatio;e.lineCap="butt",e.strokeStyle=this._data.color, e.lineWidth=Math.max(1,Math.floor(this._data.linewidth*i)),void 0!==this._data.linestyle&&(0,r.setLineStyle)(e,this._data.linestyle);const s=void 0!==this._data.left?Math.max(this._data.left,0):0,n=void 0!==this._data.right?Math.min(this._data.right,t.cssWidth):t.cssWidth,a=Math.round(this._data.y*i),l=Math.round(s*i),c=Math.round(n*i),h=this._data.excludeBoundaries;void 0!==h&&(e.save(),(0,o.addExclusionArea)(e,t,h)),(0,r.drawHorizontalLine)(e,a,l,c),void 0!==this._data.excludeBoundaries&&e.restore()}}},10773:(e,t,i)=>{"use strict";function s(e,t){return e.pixelRatio===t.pixelRatio}i.d(t,{areEqualPaneRenderParams:()=>s})},85113:(e,t,i)=>{"use strict";var s;i.d(t,{LineEnd:()=>s}),function(e){e[e.Normal=0]="Normal",e[e.Arrow=1]="Arrow",e[e.Circle=2]="Circle"}(s||(s={}))},76078:(e,t,i)=>{"use strict";i.d(t,{PaneRendererLine:()=>l});var s=i(86441),r=i(4652),n=i(14888),o=i(55014),a=i(9740);class l{constructor(e){this._data=e}hitTest(e,t){var i,a,l,c;const h=(0,o.interactionTolerance)().series+this._data.lineWidth/2;let d=null!==(a=null===(i=this._data.visibleItemsRange)||void 0===i?void 0:i.startItemIndex)&&void 0!==a?a:0,u=(null!==(c=null===(l=this._data.visibleItemsRange)||void 0===l?void 0:l.endItemIndex)&&void 0!==c?c:this._data.items.length)-1;for(;u-d>2;){const t=Math.round((u+d)/2);this._data.items[t].x<=e.x?d=t:u=t}d=Math.max(1,d-1),u=Math.min(this._data.items.length-1,u+1);for(let t=d;t<=u;++t){const i=this._data.items[t-1],o=this._data.items[t],a=i.x,l=o.x;if((0,r.distanceToSegment)(new s.Point(a,i.y),new s.Point(l,o.y),new s.Point(e.x,e.y)).distance<=h)return this._data.hittest?this._data.hittest:new n.HitTestResult(n.HitTestResult.REGULAR)}return null}draw(e,t){e.save(),e.scale(t.pixelRatio,t.pixelRatio),e.lineCap="square",e.lineJoin="round",e.strokeStyle=this._data.lineColor,e.fillStyle=this._data.lineColor,e.lineWidth=this._data.lineWidth,(0,a.setLineStyle)(e,this._data.lineStyle),(0,o.setValidLineStyle)(e,this._data.lineStyle),this._data.simpleMode?this._drawSimpleMode(e,t.pixelRatio):this._drawLines(e),e.restore()}_drawSimpleMode(e,t){var i,s,r,n;if(e.beginPath(),this._walkLine(e,this._data.items,!1,NaN),e.stroke(),this._data.withMarkers){e.save(),e.scale(1/t,1/t);const o=Math.max(1,Math.floor(t))%2/2,a=(this._data.lineWidth+2)*t+o,l=2*Math.PI;e.beginPath();const c=null!==(s=null===(i=this._data.visibleItemsRange)||void 0===i?void 0:i.startItemIndex)&&void 0!==s?s:0;for(let i=(null!==(n=null===(r=this._data.visibleItemsRange)||void 0===r?void 0:r.endItemIndex)&&void 0!==n?n:this._data.items.length)-1+1;i-- >=c;){const s=this._data.items[i];if(s){const i=Math.round(s.x*t)+o,r=s.y*t;e.moveTo(i,r),e.arc(i,r,a,0,l)}}e.fill(),e.restore()}}_walkLine(e,t,i,s,r){var n,a,l,c;if(!t)return;const h=.25*this._data.barSpacing;let d,u,p,_,m;const g=o.coordinateIsValid,f=r?0:null!==(a=null===(n=this._data.visibleItemsRange)||void 0===n?void 0:n.startItemIndex)&&void 0!==a?a:0,v=r?t.length-1:Math.min((null!==(c=null===(l=this._data.visibleItemsRange)||void 0===l?void 0:l.endItemIndex)&&void 0!==c?c:t.length)-1,t.length-1) ;for(let e=f;e<=v;e++){const i=t[e];if(g(i.y)){u=i,d=e;break}}if(void 0!==d&&void 0!==u)for(let r=d;r<=v;r++){_=t[r],m=t[r+1]||{};const n=Math.round(_.x);if(g(_.y))if(p&&g(p.y))e.lineTo(n,_.y),i&&!g(m.y)&&e.lineTo(n,s);else if(m&&g(m.y))i?(r!==d&&e.lineTo(n,s),e.lineTo(n,_.y)):e.moveTo(n,_.y);else if(i){if(0===r)continue;r!==d&&e.lineTo(n-h,s),e.lineTo(n-h,_.y),e.lineTo(n+h,_.y),e.lineTo(n+h,s)}else e.moveTo(n-h,_.y),e.lineTo(n+h,_.y);p=_}}_drawLines(e){var t,i,s,r;if(!this._data.items.length)return;let n,a,l;const c=.25*this._data.barSpacing,h=o.coordinateIsValid;e.beginPath();const d=null!==(i=null===(t=this._data.visibleItemsRange)||void 0===t?void 0:t.startItemIndex)&&void 0!==i?i:0,u=(null!==(r=null===(s=this._data.visibleItemsRange)||void 0===s?void 0:s.endItemIndex)&&void 0!==r?r:this._data.items.length)-1,p=this._data.items[d];p&&e.moveTo(p.x,p.y);let _,m=e.strokeStyle,g=e.lineWidth;for(let t=d+1;t<=u;++t){let i,s,r;n=this._data.items[t-1],a=this._data.items[t],l=this._data.items[t+1],a.style&&!this._data.forceLineColor?(i=a.style.color,s=a.style.width,r=a.style.style):(i=this._data.lineColor,s=this._data.lineWidth,r=this._data.lineStyle),this._data.ignorePaletteLineWidth&&(s=this._data.lineWidth);(i!==m||s!==g||r!==_)&&(m=i,g=s,_=r,e.stroke(),e.beginPath(),e.strokeStyle=i,e.lineWidth=s,(0,o.setValidLineStyle)(e,r),e.moveTo(n.x,n.y)),f=n,S=l,h((v=a).y)&&(h(f.y)?e.lineTo(v.x,v.y):S&&h(S.y)?e.moveTo(v.x,v.y):(e.moveTo(v.x-c,v.y),e.lineTo(v.x+c,v.y)))}var f,v,S;e.stroke()}}},86216:(e,t,i)=>{"use strict";i.d(t,{MediaCoordinatesPaneRenderer:()=>r});var s=i(27714);class r{draw(e,t){new s.CanvasRenderingTarget2D(e,(0,s.size)({width:t.cssWidth,height:t.cssHeight}),(0,s.size)({width:t.physicalWidth,height:t.physicalHeight})).useMediaCoordinateSpace((e=>this._drawImpl(e)))}drawBackground(e,t){new s.CanvasRenderingTarget2D(e,(0,s.size)({width:t.cssWidth,height:t.cssHeight}),(0,s.size)({width:t.physicalWidth,height:t.physicalHeight})).useMediaCoordinateSpace((e=>this._drawBackgroundImpl(e)))}_drawBackgroundImpl(e){}}},26740:(e,t,i)=>{"use strict";i.d(t,{RectangleRenderer:()=>d});var s=i(50151),r=i(86441),n=i(34026),o=i(4652),a=i(14888),l=i(38031),c=i(9740),h=i(53479);class d{constructor(e,t,i){this._data=null,this._hitTestResult=e||new a.HitTestResult(a.HitTestResult.MOVEPOINT),this._backHitTestResult=t||new a.HitTestResult(a.HitTestResult.MOVEPOINT_BACKGROUND),this._forceOverrideTransparency=Boolean(i)}setData(e){this._data=e}hitTest(e,t){if(null===this._data||this._data.points.length<2||this._data.nohittest)return null;const[i,s]=this._getPointsInPhysicalSpace(t),n=new r.Point(s.x,i.y),a=new r.Point(i.x,s.y),l=new r.Point(e.x*t.pixelRatio,e.y*t.pixelRatio),c=this._extendAndHitTestLineSegment(l,i,n,t);if(null!==c)return c;const h=this._extendAndHitTestLineSegment(l,a,s,t);if(null!==h)return h;let d=(0,o.distanceToSegment)(n,s,l);return d.distance<=3?this._hitTestResult:(d=(0,o.distanceToSegment)(i,a,l),d.distance<=3?this._hitTestResult:this._data.fillBackground?this._hitTestBackground(l,i,s,t):null)}getColor(){ const e=(0,s.ensure)(this._data);return void 0===e.transparency?e.backcolor:(0,l.generateColor)(e.backcolor,e.transparency,this._forceOverrideTransparency)}draw(e,t){if(null===this._data||this._data.points.length<2||this._data.linewidth<=0&&!this._data.fillBackground)return;e.save();const[i,s]=this._getPointsInPhysicalSpace(t),r=this._data.linewidth?Math.max(1,Math.floor(this._data.linewidth*t.pixelRatio)):0,n=this._data.fillBackground?this.getColor():void 0,o=Math.max(1,Math.floor(t.pixelRatio));(0,c.fillRectWithBorder)(e,i.x,i.y,s.x,s.y,n,this._data.color,r,h.LINESTYLE_SOLID,this._data.extendLeft,this._data.extendRight,"center",t.physicalWidth,this._data.includeRightEdge&&1===o?1:0),e.restore()}_getPointsInPhysicalSpace(e,t=0){const i=(0,s.ensureNotNull)(this._data),[n,o]=i.points,a=e.pixelRatio,l=Math.min(n.x,o.x),c=Math.max(n.x,o.x),h=Math.min(n.y,o.y),d=Math.max(n.y,o.y),u=Math.round(l*a)+t,p=Math.round(c*a)+t,_=Math.round(h*a)+t,m=Math.round(d*a)+t;return[new r.Point(u,_),new r.Point(p,m)]}_extendAndHitTestLineSegment(e,t,i,s){const r=this._extendAndClipLineSegment(t,i,s);if(null!==r){if((0,o.distanceToSegment)(r[0],r[1],e).distance<=3)return this._hitTestResult}return null}_extendAndClipLineSegment(e,t,i){const n=(0,s.ensureNotNull)(this._data);if((0,r.equalPoints)(e,t)&&!n.extendLeft&&!n.extendRight)return null;const o=i.physicalWidth,a=Math.min(e.x,t.x),l=Math.max(e.x,t.x),c=n.extendLeft?0:Math.max(a,0),h=n.extendRight?o:Math.min(l,o);return c>h||h<=0||c>=o?null:[new r.Point(c,e.y),new r.Point(h,t.y)]}_hitTestBackground(e,t,i,s){const o=this._extendAndClipLineSegment(t,i,s);return null!==o&&(0,n.pointInBox)(e,(0,r.box)(o[0],o[1]))?this._backHitTestResult:null}}},41481:(e,t,i)=>{"use strict";var s;i.d(t,{StatsPosition:()=>s}),function(e){e[e.Left=0]="Left",e[e.Center=1]="Center",e[e.Right=2]="Right"}(s||(s={}))},19773:(e,t,i)=>{"use strict";i.d(t,{StepLineDecoration:()=>s,PaneRendererStepLine:()=>m});var s,r=i(4652),n=i(14888),o=i(86441),a=i(93975),l=i(55014),c=i(9740),h=i(38031);!function(e){e[e.None=0]="None",e[e.Diamonds=1]="Diamonds"}(s||(s={}));class d{initialize(e,t,i,s){var r,n,o,a;const l=e.lineStyle;t.lineCap="butt",t.lineJoin="round";const h=Math.max(Math.floor(null!==(n=null===(r=s.style)||void 0===r?void 0:r.width)&&void 0!==n?n:e.lineWidth*i.pixelRatio));void 0!==l&&(0,c.setLineStyle)(t,l);const d=h%2?.5:0;t.moveTo(Math.round(s.x*i.pixelRatio)+d,Math.round(s.y*i.pixelRatio)+d),t.strokeStyle=null!==(a=null===(o=s.style)||void 0===o?void 0:o.color)&&void 0!==a?a:e.lineColor,t.lineWidth=h}finishFragment(e){e.stroke()}hitTest(e,t,i,s,r){return d.hitTest(e,t,i,s,r)}applyColor(e,t){e.strokeStyle=t}applyLineWidth(e,t){e.lineWidth=t}drawItem(e,t,i,s){e.lineTo(i.x,i.y),void 0!==s&&(e.lineTo(s.x,i.y),e.lineTo(s.x,s.y))}static hitTest(e,t,i,s,n){var a,c;const h=t.pixelRatio,d=null!==(c=null===(a=i.style)||void 0===a?void 0:a.width)&&void 0!==c?c:e.lineWidth,u=Math.max(1,Math.floor(d*h))%2?.5:0,p=(0,l.interactionTolerance)().series+d/2;let _;if(isNaN(s.y)){ -const e=i.x+u,t=s.x+u,a=new o.Point(e,i.y),l=new o.Point(t,i.y);_=(0,r.distanceToSegment)(a,l,n).distance}else{const t=Math.round(s.x-e.barSpacing/2*h)+u,a=new o.Point(t,i.y),l=new o.Point(t,s.y);_=Math.min((0,r.distanceToSegment)(i,a,n).distance,(0,r.distanceToSegment)(a,l,n).distance,(0,r.distanceToSegment)(l,s,n).distance)}return _<=p}}class u{constructor(){this._lineWidth=1}initialize(e,t,i,s){var r,n,o,a;this.applyColor(t,null!==(n=null===(r=s.style)||void 0===r?void 0:r.color)&&void 0!==n?n:e.lineColor),this._lineWidth=Math.max(Math.floor(null!==(a=null===(o=s.style)||void 0===o?void 0:o.width)&&void 0!==a?a:e.lineWidth*i.pixelRatio))}finishFragment(e){e.fill()}drawItem(e,t,i,s,r){if(r&&void 0!==s&&!Number.isNaN(s.y)){e.save(),e.translate(s.x,s.y),e.rotate(Math.PI/4);const i=this._scaleByLineWidth(this._lineWidth);e.scale(i,i),this._drawItemRotatedAndTranslated(e,t),e.restore()}}applyLineWidth(e,t){this._lineWidth=t}hitTest(e,t,i,s,r){var n,a;if(!s.valIsNotSameAsPrev)return!1;const l=Math.round((i.x+s.x)/2),c=new o.Point(l,s.y),h=r.subtract(c),d=Math.max(Math.floor(null!==(a=null===(n=i.style)||void 0===n?void 0:n.width)&&void 0!==a?a:e.lineWidth*t.pixelRatio));return this._hitTestTranslated(h,d)}_scaleByLineWidth(e){return Math.sqrt(e)}}class p extends u{applyColor(e,t){e.fillStyle=t}_hitTestTranslated(e,t){return Math.abs(e.x)+Math.abs(e.y)<8*this._scaleByLineWidth(t)/2}_drawItemRotatedAndTranslated(e,t){(0,c.drawRoundRect)(e,-4,-4,8,8,2,!0)}}class _ extends u{applyColor(e,t){e.fillStyle=(0,h.applyTransparency)(t,85)}_hitTestTranslated(e,t){return Math.abs(e.x)+Math.abs(e.y)<21*this._scaleByLineWidth(t)/2}_drawItemRotatedAndTranslated(e,t){(0,c.drawRoundRect)(e,-10.5,-10.5,21,21,5,!0)}}class m{constructor(e,t){this._data=null,this._data=null!=e?e:null,this._extendLineToLastConfirmedBar=Boolean(t)}setData(e){this._data=e}hitTest(e,t){const i=this._data;if(null===i||0===i.items.length)return null;const{items:r,items:{length:l},lastConfirmedSeriesBarCoordinate:c,visibleItemsRange:{startItemIndex:h,endItemIndex:u}={startItemIndex:0,endItemIndex:l}}=i,p=i.decoration===s.Diamonds?[new d,new _]:[new d];const m=(0,a.lowerbound)(r,e,((e,t)=>e.x<=t.x),h,u),g=Math.max(0,m-1),f=Math.min(l,m+1);for(let s=g;ss.hitTest(i,t,a,h,e))))return new n.HitTestResult(n.HitTestResult.REGULAR)}else if(this._extendLineToLastConfirmedBar&&void 0!==c&&f===l&&a.xthis._drawImpl(e,t,i))),e.restore()}_drawImpl(e,t,i){var s,r,n,a,l,c,h,d,u,p,_,m,g,f,v,S;if(null===this._data||0===this._data.items.length)return;const{lineWidth:y,lineColor:b,items:w}=this._data,C=t.pixelRatio;let P=Math.max(Math.floor(null!==(r=null===(s=w[0].style)||void 0===s?void 0:s.width)&&void 0!==r?r:y*C)),T=P%2?.5:0 -;i.initialize(this._data,e,t,w[0]);const x=null!==(a=null===(n=this._data.visibleItemsRange)||void 0===n?void 0:n.startItemIndex)&&void 0!==a?a:0,I=null!==(c=null===(l=this._data.visibleItemsRange)||void 0===l?void 0:l.endItemIndex)&&void 0!==c?c:w.length,M=this._data.barSpacing;if(!(I<=x)){e.beginPath(),i.applyColor(e,null!==(d=null===(h=w[x].style)||void 0===h?void 0:h.color)&&void 0!==d?d:b);for(let s=x;s{"use strict";i.d(t,{calculateLabelPosition:()=>u,getTextBoundaries:()=>p,wordWrap:()=>_,TextRenderer:()=>x});var s=i(86441),r=i(50151),n=i(34026),o=i(80142),a=i(14888),l=i(9740),c=i(65665),h=i(83499),d=i(53479);function u(e,t,i,r,n){const o=.5*(t.x+i.x);let a=i.y;return t.y>i.y?(a-=e.height/2+r.y,a=Math.max(e.height/2,a)):(a+=e.height/2+r.y,a=Math.min(n-e.height/2,a)),new s.Point(o,a)}function p(e,t,i){if(e.isOutOfScreen(t,i))return null;const s=e.getPolygonPoints();return 0===s.length?null:s}function _(e,t,i){i=(0,c.isString)(i)?parseInt(i):i,e+="";const s=!(0,c.isNumber)(i)||!isFinite(i)||i<=0?e.split(/\r\n|\r|\n|$/):e.split(/[^\S\r\n]*(?:\r\n|\r|\n|$)/);if(s[s.length-1]||s.pop(),!(0,c.isNumber)(i)||!isFinite(i)||i<=0)return s;const r=[];for(let e=0;e0&&(0,h.measureText)(a.slice(0,3*--e-1).join(""),t).width>i;);if(e>0)r.push(a.slice(0,3*e-1).join("")),a.splice(0,3*e);else{const e=a[0]+(a[1]||"");if(l=1===l?1:~~(i/(0,h.measureText)(e,t).width*e.length),(0,h.measureText)(e.substring(0,l),t).width<=i)for(;(0,h.measureText)(e.substring(0,l+1),t).width<=i;)l++;else for(;l>1&&(0, -h.measureText)(e.substring(0,--l),t).width>i;);l<1&&(l=1),r.push(e.substring(0,l)),a[0]=e.substring(l),a[1]=""}if((0,h.measureText)(a.join(""),t).width<=i){r.push(a.join(""));break}}}return r}function m(e,t,i){if(0===i)return e.clone();const r=(e.x-t.x)*Math.cos(i)-(e.y-t.y)*Math.sin(i)+t.x,n=(e.x-t.x)*Math.sin(i)+(e.y-t.y)*Math.cos(i)+t.y;return new s.Point(r,n)}function g(e,t){const i=Math.round(t+2*b(e)+2*S(e));return i%2?i+1:i}function f(e,t){return C(e)*t+w(e)*(t-1)+2*y(e)+2*v(e)}function v(e){return void 0!==e.boxPaddingVert?e.boxPaddingVert*T(e):void 0!==e.boxPadding?e.boxPadding*T(e):C(e)/3}function S(e){return void 0!==e.boxPaddingHorz?e.boxPaddingHorz*T(e):void 0!==e.boxPadding?e.boxPadding*T(e):C(e)/3}function y(e){return(e.backgroundVertInflate||0)*T(e)}function b(e){return(e.backgroundHorzInflate||0)*T(e)}function w(e){return(e.padding||0)*T(e)}function C(e){return Math.ceil(P(e)*T(e))}function P(e){return e.fontsize||e.fontSize||30}function T(e){const t=Math.min(1,Math.max(.2,Math.min(e.scaleX||1,e.scaleY||1)));if(1===t)return t;const i=P(e);return Math.ceil(t*i)/i}class x{constructor(e,t){this._data=null,this._internalData=null,this._boxSize=null,this._polygonPoints=null,this._linesInfo=null,this._fontInfo=null,this._hittest=t||new a.HitTestResult(a.HitTestResult.MOVEPOINT,{areaName:a.AreaName.Text}),void 0!==e&&this.setData(e)}setData(e){null!==e?(e.horzTextAlign||(e.horzTextAlign=e.horzAlign),!function(e,t){if(null===e||null===t)return null===e==(null===t);if(void 0===e.points!=(void 0===t.points))return!1;if(void 0!==e.points&&void 0!==t.points){if(e.points.length!==t.points.length)return!1;for(let r=0;re.x<=t.x),h,u),g=Math.max(0,m-1),f=Math.min(l,m+1);for(let s=g;ss.hitTest(i,t,a,h,e))))return new n.HitTestResult(n.HitTestResult.REGULAR)}else if(this._extendLineToLastConfirmedBar&&void 0!==c&&f===l&&a.xthis._drawImpl(e,t,i))),e.restore()}_drawImpl(e,t,i){var s,r,n,a,l,c,h,d,u,p,_,m,g,f,v,S;if(null===this._data||0===this._data.items.length)return;const{lineWidth:y,lineColor:b,items:w}=this._data,P=t.pixelRatio;let C=Math.max(Math.floor(null!==(r=null===(s=w[0].style)||void 0===s?void 0:s.width)&&void 0!==r?r:y*P)),T=C%2?.5:0 +;i.initialize(this._data,e,t,w[0]);const x=null!==(a=null===(n=this._data.visibleItemsRange)||void 0===n?void 0:n.startItemIndex)&&void 0!==a?a:0,I=null!==(c=null===(l=this._data.visibleItemsRange)||void 0===l?void 0:l.endItemIndex)&&void 0!==c?c:w.length,M=this._data.barSpacing;if(!(I<=x)){e.beginPath(),i.applyColor(e,null!==(d=null===(h=w[x].style)||void 0===h?void 0:h.color)&&void 0!==d?d:b);for(let s=x;s{"use strict";i.d(t,{calculateLabelPosition:()=>u,getTextBoundaries:()=>p,wordWrap:()=>_,TextRenderer:()=>x});var s=i(86441),r=i(50151),n=i(34026),o=i(80142),a=i(14888),l=i(9740),c=i(65665),h=i(83499),d=i(53479);function u(e,t,i,r,n){const o=.5*(t.x+i.x);let a=i.y;return t.y>i.y?(a-=e.height/2+r.y,a=Math.max(e.height/2,a)):(a+=e.height/2+r.y,a=Math.min(n-e.height/2,a)),new s.Point(o,a)}function p(e,t,i){if(e.isOutOfScreen(t,i))return null;const s=e.getPolygonPoints();return 0===s.length?null:s}function _(e,t,i){i=(0,c.isString)(i)?parseInt(i):i,e+="";const s=!(0,c.isNumber)(i)||!isFinite(i)||i<=0?e.split(/\r\n|\r|\n|$/):e.split(/[^\S\r\n]*(?:\r\n|\r|\n|$)/);if(s[s.length-1]||s.pop(),!(0,c.isNumber)(i)||!isFinite(i)||i<=0)return s;const r=[];for(let e=0;e0&&(0,h.measureText)(a.slice(0,3*--e-1).join(""),t).width>i;);if(e>0)r.push(a.slice(0,3*e-1).join("")),a.splice(0,3*e);else{const e=a[0]+(a[1]||"");if(l=1===l?1:~~(i/(0,h.measureText)(e,t).width*e.length),(0,h.measureText)(e.substring(0,l),t).width<=i)for(;(0,h.measureText)(e.substring(0,l+1),t).width<=i;)l++;else for(;l>1&&(0, +h.measureText)(e.substring(0,--l),t).width>i;);l<1&&(l=1),r.push(e.substring(0,l)),a[0]=e.substring(l),a[1]=""}if((0,h.measureText)(a.join(""),t).width<=i){r.push(a.join(""));break}}}return r}function m(e,t,i){if(0===i)return e.clone();const r=(e.x-t.x)*Math.cos(i)-(e.y-t.y)*Math.sin(i)+t.x,n=(e.x-t.x)*Math.sin(i)+(e.y-t.y)*Math.cos(i)+t.y;return new s.Point(r,n)}function g(e,t){const i=Math.round(t+2*b(e)+2*S(e));return i%2?i+1:i}function f(e,t){return P(e)*t+w(e)*(t-1)+2*y(e)+2*v(e)}function v(e){return void 0!==e.boxPaddingVert?e.boxPaddingVert*T(e):void 0!==e.boxPadding?e.boxPadding*T(e):P(e)/3}function S(e){return void 0!==e.boxPaddingHorz?e.boxPaddingHorz*T(e):void 0!==e.boxPadding?e.boxPadding*T(e):P(e)/3}function y(e){return(e.backgroundVertInflate||0)*T(e)}function b(e){return(e.backgroundHorzInflate||0)*T(e)}function w(e){return(e.padding||0)*T(e)}function P(e){return Math.ceil(C(e)*T(e))}function C(e){return e.fontsize||e.fontSize||30}function T(e){const t=Math.min(1,Math.max(.2,Math.min(e.scaleX||1,e.scaleY||1)));if(1===t)return t;const i=C(e);return Math.ceil(t*i)/i}class x{constructor(e,t){this._data=null,this._internalData=null,this._boxSize=null,this._polygonPoints=null,this._linesInfo=null,this._fontInfo=null,this._hittest=t||new a.HitTestResult(a.HitTestResult.MOVEPOINT,{areaName:a.AreaName.Text}),void 0!==e&&this.setData(e)}setData(e){null!==e?(e.horzTextAlign||(e.horzTextAlign=e.horzAlign),!function(e,t){if(null===e||null===t)return null===e==(null===t);if(void 0===e.points!=(void 0===t.points))return!1;if(void 0!==e.points&&void 0!==t.points){if(e.points.length!==t.points.length)return!1;for(let r=0;re){const i=(0,s.box)(new s.Point(0,0),new s.Point(e,t));return this.getPolygonPoints().every((e=>!(0,n.pointInBox)(e,i)))}return!1}setPoints(e,t){(0,r.ensureNotNull)(this._data).points=e,this._hittest=t||new a.HitTestResult(a.HitTestResult.MOVEPOINT)}fontStyle(e){return null===this._data?"":this._getFontInfo().fontStyle}wordWrap(e,t,i){return _(e,i||this.fontStyle(),t)}draw(e,t){if(null===this._data||void 0===this._data.points||0===this._data.points.length)return;if(this.isOutOfScreen(t.cssWidth,t.cssHeight))return;const i=t.pixelRatio,s=this._getInternalData(),r=this._getRotationPoint().scaled(i);e.save(),e.translate(r.x,r.y),e.rotate(this._data.angle||0),e.translate(-r.x,-r.y);const n=this._getFontInfo().fontSize;e.textBaseline=s.textBaseLine,e.textAlign=s.textAlign,e.font=this.fontStyle();const{scaledLeft:o,scaledRight:a,scaledTop:c,scaledBottom:u}=function(e,t){const i=Math.round(e.boxLeft*t),s=Math.round(e.boxTop*t);return{scaledLeft:i,scaledRight:i+Math.round(e.boxWidth*t),scaledTop:s,scaledBottom:s+Math.round(e.boxHeight*t)}}(s,i);if(this._data.backgroundColor||this._data.borderColor||this._data.highlightBorder&&this._data.wordWrapWidth){const t=this._data.borderWidth||Math.max(n/12,1),s=Math.round(t*i),r=s/2;let h=!1;if(this._data.boxShadow){e.save();const{shadowColor:t,shadowBlur:i,shadowOffsetX:s=0,shadowOffsetY:r=0}=this._data.boxShadow;e.shadowColor=t,e.shadowBlur=i,e.shadowOffsetX=s,e.shadowOffsetY=r,h=!0}if(this._data.backgroundRoundRect)this._data.backgroundColor&&((0,l.drawRoundRect)(e,o,c,a-o,u-c,this._data.backgroundRoundRect*i),e.fillStyle=this._data.backgroundColor,e.fill(),h&&(e.restore(),h=!1)),this._data.borderColor&&((0,l.drawRoundRect)(e,o-r,c-r,a-o+s,u-c+s,this._data.backgroundRoundRect*i+s),e.strokeStyle=this._data.borderColor,e.lineWidth=s,e.stroke(),h&&(e.restore(),h=!1));else if(this._data.backgroundColor&&(e.fillStyle=this._data.backgroundColor,e.fillRect(o,c,a-o,u-c),h&&(e.restore(),h=!1)),this._data.borderColor||this._data.highlightBorder){let t;this._data.borderColor?(e.strokeStyle=this._data.borderColor,t=s):(e.strokeStyle=this._data.color,(0,l.setLineStyle)(e,d.LINESTYLE_DASHED),t=Math.max(1,Math.floor(i))),e.lineWidth=t,e.beginPath(),e.moveTo(o-t/2,c-t/2),e.lineTo(o-t/2,u+t/2),e.lineTo(a+t/2,u+t/2),e.lineTo(a+t/2,c-t/2),e.lineTo(o-t/2,c-t/2),e.stroke(),h&&e.restore()}}e.fillStyle=this._data.color;const p=(o+Math.round(s.textStart*i))/i,_=.05*n;let m=(c+Math.round((s.textTop+_)*i))/i;const g=w(this._data),f=this.getLinesInfo();for(const t of f.lines)(0,h.drawScaled)(e,i,(()=>e.fillText(t,p,m))),m+=n+g;e.restore()} -getPolygonPoints(){if(null!==this._polygonPoints)return this._polygonPoints;if(null===this._data)return[];const e=this._data.angle||0,{boxLeft:t,boxTop:i,boxWidth:r,boxHeight:n}=this._getInternalData(),o=this._getRotationPoint();return this._polygonPoints=[m(new s.Point(t,i),o,e),m(new s.Point(t+r,i),o,e),m(new s.Point(t+r,i+n),o,e),m(new s.Point(t,i+n),o,e)],this._polygonPoints}getLinesInfo(){if(null===this._linesInfo){const e=(0,r.ensureNotNull)(this._data);let t=this.wordWrap(e.text,e.wordWrapWidth);if(void 0!==e.maxHeight){const i=function(e){const t=(0,r.ensureDefined)(e.maxHeight),i=C(e),s=w(e);return Math.floor((t+s)/(i+s))}(e);t.length>i&&(t=t.slice(0,i))}this._linesInfo={linesMaxWidth:this._getLinesMaxWidth(t),lines:t}}return this._linesInfo}_getLinesMaxWidth(e){const t=this.fontStyle();if(null!==this._data&&this._data.wordWrapWidth&&!this._data.forceCalculateMaxLineWidth)return this._data.wordWrapWidth*T(this._data);let i=0;for(const s of e)i=Math.max(i,(0,h.measureText)(s,t).width);return i}_getInternalData(){if(null!==this._internalData)return this._internalData;const e=(0,r.ensureNotNull)(this._data),t=this._getBoxSize(),i=t.boxWidth,s=t.boxHeight,n=(0,r.ensureDefined)(e.points)[0];let a=n.y;switch(e.vertAlign){case"bottom":a-=s+e.offsetY;break;case"middle":a-=s/2;break;case"top":a+=e.offsetY}let l=n.x;const c=S(e),h=v(e),d=b(e)+c;let u;const p=a+(y(e)+h)+C(e)/2;let _;switch(e.horzAlign){case"left":l+=e.offsetX;break;case"center":l-=i/2;break;case"right":l-=i+e.offsetX}switch((0,r.ensureDefined)(e.horzTextAlign)){case"left":_="start",u=l+d,(0,o.isRtl)()&&(e.forceTextAlign?_="left":(u=l+i-d,_="right"));break;case"center":_="center",u=l+i/2;break;case"right":_="end",u=l+i-d,(0,o.isRtl)()&&e.forceTextAlign&&(_="right")}return this._internalData={boxLeft:l,boxTop:a,boxWidth:i,boxHeight:s,textStart:u-l,textTop:p-a,textAlign:_,textBaseLine:"middle"},this._internalData}_getFontInfo(){if(null===this._fontInfo){const e=(0,r.ensureNotNull)(this._data),t=C(e),i=(e.bold?"bold ":"")+(e.italic?"italic ":"")+t+"px "+e.font;this._fontInfo={fontStyle:i,fontSize:t}}return this._fontInfo}_getBoxSize(){if(null===this._boxSize){const e=this.getLinesInfo(),t=(0,r.ensureNotNull)(this._data);this._boxSize={boxWidth:g(t,e.linesMaxWidth),boxHeight:f(t,e.lines.length)}}return this._boxSize}_getRotationPoint(){const{boxLeft:e,boxTop:t,boxWidth:i,boxHeight:n}=this._getInternalData(),{horzAlign:o,vertAlign:a}=(0,r.ensureNotNull)(this._data);let l,c;switch(o){case"center":l=e+i/2;break;case"left":l=e;break;case"right":l=e+i}switch(a){case"middle":c=t+n/2;break;case"top":c=t;break;case"bottom":c=t+n}return new s.Point(l,c)}}},9933:(e,t,i)=>{"use strict";i.d(t,{drawArrow:()=>d,TrendLineRenderer:()=>u});var s=i(50151),r=i(4652),n=i(85113),o=i(14888),a=i(9740),l=i(55014),c=i(83499);function h(e,t,i,s,r){t.save(),t.fillStyle="#000000",t.beginPath(),t.arc(e.x*r,e.y*r,i*r,0,2*Math.PI,!1),t.fill(),s.strokeWidth&&(t.lineWidth=s.strokeWidth,t.stroke()),t.restore()}function d(e,t,i,s,r,n=!1){if(t.subtract(e).length()<1)return;const o=(0, +getPolygonPoints(){if(null!==this._polygonPoints)return this._polygonPoints;if(null===this._data)return[];const e=this._data.angle||0,{boxLeft:t,boxTop:i,boxWidth:r,boxHeight:n}=this._getInternalData(),o=this._getRotationPoint();return this._polygonPoints=[m(new s.Point(t,i),o,e),m(new s.Point(t+r,i),o,e),m(new s.Point(t+r,i+n),o,e),m(new s.Point(t,i+n),o,e)],this._polygonPoints}getLinesInfo(){if(null===this._linesInfo){const e=(0,r.ensureNotNull)(this._data);let t=this.wordWrap(e.text,e.wordWrapWidth);if(void 0!==e.maxHeight){const i=function(e){const t=(0,r.ensureDefined)(e.maxHeight),i=P(e),s=w(e);return Math.floor((t+s)/(i+s))}(e);t.length>i&&(t=t.slice(0,i))}this._linesInfo={linesMaxWidth:this._getLinesMaxWidth(t),lines:t}}return this._linesInfo}_getLinesMaxWidth(e){const t=this.fontStyle();if(null!==this._data&&this._data.wordWrapWidth&&!this._data.forceCalculateMaxLineWidth)return this._data.wordWrapWidth*T(this._data);let i=0;for(const s of e)i=Math.max(i,(0,h.measureText)(s,t).width);return i}_getInternalData(){if(null!==this._internalData)return this._internalData;const e=(0,r.ensureNotNull)(this._data),t=this._getBoxSize(),i=t.boxWidth,s=t.boxHeight,n=(0,r.ensureDefined)(e.points)[0];let a=n.y;switch(e.vertAlign){case"bottom":a-=s+e.offsetY;break;case"middle":a-=s/2;break;case"top":a+=e.offsetY}let l=n.x;const c=S(e),h=v(e),d=b(e)+c;let u;const p=a+(y(e)+h)+P(e)/2;let _;switch(e.horzAlign){case"left":l+=e.offsetX;break;case"center":l-=i/2;break;case"right":l-=i+e.offsetX}switch((0,r.ensureDefined)(e.horzTextAlign)){case"left":_="start",u=l+d,(0,o.isRtl)()&&(e.forceTextAlign?_="left":(u=l+i-d,_="right"));break;case"center":_="center",u=l+i/2;break;case"right":_="end",u=l+i-d,(0,o.isRtl)()&&e.forceTextAlign&&(_="right")}return this._internalData={boxLeft:l,boxTop:a,boxWidth:i,boxHeight:s,textStart:u-l,textTop:p-a,textAlign:_,textBaseLine:"middle"},this._internalData}_getFontInfo(){if(null===this._fontInfo){const e=(0,r.ensureNotNull)(this._data),t=P(e),i=(e.bold?"bold ":"")+(e.italic?"italic ":"")+t+"px "+e.font;this._fontInfo={fontStyle:i,fontSize:t}}return this._fontInfo}_getBoxSize(){if(null===this._boxSize){const e=this.getLinesInfo(),t=(0,r.ensureNotNull)(this._data);this._boxSize={boxWidth:g(t,e.linesMaxWidth),boxHeight:f(t,e.lines.length)}}return this._boxSize}_getRotationPoint(){const{boxLeft:e,boxTop:t,boxWidth:i,boxHeight:n}=this._getInternalData(),{horzAlign:o,vertAlign:a}=(0,r.ensureNotNull)(this._data);let l,c;switch(o){case"center":l=e+i/2;break;case"left":l=e;break;case"right":l=e+i}switch(a){case"middle":c=t+n/2;break;case"top":c=t;break;case"bottom":c=t+n}return new s.Point(l,c)}}},9933:(e,t,i)=>{"use strict";i.d(t,{drawArrow:()=>d,TrendLineRenderer:()=>u});var s=i(50151),r=i(4652),n=i(85113),o=i(14888),a=i(9740),l=i(55014),c=i(83499);function h(e,t,i,s,r){t.save(),t.fillStyle="#000000",t.beginPath(),t.arc(e.x*r,e.y*r,i*r,0,2*Math.PI,!1),t.fill(),s.strokeWidth&&(t.lineWidth=s.strokeWidth,t.stroke()),t.restore()}function d(e,t,i,s,r,n=!1){if(t.subtract(e).length()<1)return;const o=(0, l.getArrowPoints)(e,t,s,n);for(let e=0;e0&&(l[0].x===l[1].x?(0,a.drawVerticalLine)(e,Math.round(l[0].x*s),l[0].y*s,l[1].y*s):l[0].y===l[1].y?(0,a.drawHorizontalLine)(e,Math.round(l[0].y*s),l[0].x*s,l[1].x*s):(0,a.drawLine)(e,l[0].x*s,l[0].y*s,l[1].x*s,l[1].y*s)),i.overlayLineEndings&&this._drawEnds(e,o,i.linewidth,s),void 0!==i.excludeBoundaries&&e.restore()}hitTest(e,t){const i=this._data;if(null===i)return null;if("points"in i&&i.points.length<2)return null;const s=(0,l.interactionTolerance)().line,n=i.points[0],o=i.points[1],a=this._extendAndClipLineSegment(n,o,t);if(null!==a){if((0,r.distanceToSegment)(a[0],a[1],e).distance<=s)return this._hittest}return null}_extendAndClipLineSegment(e,t,i){const r=(0,s.ensureNotNull)(this._data);return(0,l.extendAndClipLineSegment)(e,t,i.cssWidth,i.cssHeight,r.extendleft,r.extendright)}_drawEnds(e,t,i,r){const o=t[0],a=t[1],l=(0,s.ensureNotNull)(this._data);switch(l.leftend){case n.LineEnd.Arrow:d(a,o,e,i,r);break;case n.LineEnd.Circle:h(o,e,i,(0,s.ensureDefined)(l.endstyle),r)}switch(l.rightend){case n.LineEnd.Arrow:d(o,a,e,i,r);break;case n.LineEnd.Circle:h(a,e,i,(0,s.ensureDefined)(l.endstyle),r)}}}},6612:(e,t,i)=>{"use strict";i.d(t,{VerticalLineRenderer:()=>a});var s=i(14888),r=i(9740),n=i(55014),o=i(83499);class a{constructor(){this._data=null,this._hitTest=new s.HitTestResult(s.HitTestResult.MOVEPOINT)}setData(e){this._data=e}setHitTest(e){this._hitTest=e}hitTest(e){if(null===this._data||null===this._hitTest)return null;const t=(0,n.interactionTolerance)().line,i=Math.abs(e.x-this._data.x)<=t+this._data.linewidth/2,s=void 0===this._data.top||this._data.top-e.y<=t,r=void 0===this._data.bottom||e.y-this._data.bottom<=t;return i&&s&&r?this._hitTest:null}draw(e,t){if(null===this._data)return;if(this._data.linewidth<=0)return;if(this._data.x<-this._data.linewidth/2||this._data.x>t.cssWidth+this._data.linewidth/2)return;const i=t.pixelRatio;e.lineCap="butt",e.strokeStyle=this._data.color,e.lineWidth=Math.max(1,Math.floor(this._data.linewidth*i)),void 0!==this._data.linestyle&&(0,r.setLineStyle)(e,this._data.linestyle) ;const s=void 0!==this._data.top?Math.max(this._data.top,0):0,n=void 0!==this._data.bottom?Math.min(this._data.bottom,t.cssHeight):t.cssHeight,a=Math.round(this._data.x*i),l=Math.floor(s*i),c=Math.ceil(n*i),h=this._data.excludeBoundaries;void 0!==h&&(e.save(),(0,o.addExclusionArea)(e,t,h)),(0,r.drawVerticalLine)(e,a,l,c),void 0!==h&&e.restore()}}},50841:(e,t,i)=>{"use strict";i.d(t,{sortSourcesPreOrdered:()=>s,sortSources:()=>r});const s={News:10000001,BarMarks:10000002,TimeScaleMarks:10000003,ChartEventsSource:10000004,Dividends:10000005,Splits:10000006,Earnings:10000007,RollDates:10000008,FutureContractExpiration:10000009,LineToolOrder:10000010,LineToolPosition:10000011,LineToolExecution:10000012,AlertLabel:10000013};function r(e){return[...e].sort(((e,t)=>e.zorder()-t.zorder()))}},88552:(e,t,i)=>{"use strict";i.r(t),i.d(t,{PlotList:()=>u,mergeMinMax:()=>p,mergePlotRows:()=>_});var s=i(50151),r=i(93975),n=i(33143),o=i(98351),a=i(33639);const l=(0,o.getLogger)("Chart.PlotList"),c=30;function h(e){return e.index}function d(e){return e.value[0]}class u{constructor(e=null,t=null){this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache=new Map,this._rowSearchCacheByIndex=new Map,this._rowSearchCacheByIndexWithoutEmptyValues=new Map,this._rowSearchCacheByTime=new Map,this._rowSearchCacheByTimeWithoutEmptyValues=new Map,this._plotFunctions=e||new Map,this._emptyValuePredicate=t}clear(){this._items=[],this._start=0,this._end=0,this._shareRead=!1,this._minMaxCache.clear(),this._invalidateSearchCaches()}first(){return this.size()>0?this._items[this._start]:null}last(){return this.size()>0?this._items[this._end-1]:null}firstIndex(){return this.size()>0?this._indexAt(this._start):null}lastIndex(){return this.size()>0?this._indexAt(this._end-1):null}size(){return this._end-this._start}isEmpty(){return 0===this.size()}contains(e){return null!==this.search(e,a.PlotRowSearchMode.Exact)}valueAt(e){const t=this.search(e);return null!==t?t.value:null}add(e,t){if(this._shareRead)return l.logDebug("add: readonly collection modification attempt"),!1;const i={index:e,value:t},s=this._nonCachedSearch(e,a.PlotRowSearchMode.Exact,h);return this._invalidateSearchCaches(),null===s?(this._items.splice(this._lowerbound(e,h),0,i),this._start=0,this._end=this._items.length,!0):(this._items[s]=i,!1)}search(e,t=a.PlotRowSearchMode.Exact,i){return this._searchImpl(e,t,this._rowSearchCacheByIndex,this._rowSearchCacheByIndexWithoutEmptyValues,h,i)}searchByTime(e,t=a.PlotRowSearchMode.Exact,i){return this._searchImpl(e,t,this._rowSearchCacheByTime,this._rowSearchCacheByTimeWithoutEmptyValues,d,i)}fold(e,t){let i=t;for(let t=this._start;t=i;--t){ const i=this._indexAt(t),s=this._valueAt(t);if(e(i,s))return{index:i,value:s}}return null}each(e){for(let t=this._start;tthis._start&&(t._start-=1),t}rangeIterator(e,t){const i=this._lowerbound(e,h),s=this._upperbound(t);if(i===s)return{hasNext:()=>!1,next:()=>{throw new Error("Invalid operation")}};let r=i-1;return{hasNext:()=>r(r+=1,this._items[r])}}minMaxOnRangeCached(e,t,i){if(this.isEmpty())return null;let s=null;for(const r of i){s=p(s,this._minMaxOnRangeCachedImpl(e-r.offset,t-r.offset,r.name))}return s}minMaxOnRange(e,t,i){if(this.isEmpty())return null;let s=null;for(const r of i){s=p(s,this._minMaxOnRange(e-r.offset,t-r.offset,r.name))}return s}merge(e){return this._shareRead?(l.logDebug("merge: readonly collection modification attempt"),null):0===e.length?null:this.isEmpty()||e[e.length-1].indexthis._items[this._items.length-1].index?this._append(e):1===e.length&&e[0].index===this._items[this._items.length-1].index?(this._updateLast(e[0]),e[0]):this._merge(e)}addTail(e,t=!1){if(0===e.length)return;let i=0;t&&this._end-this._start>0&&(i=1,this._items[this._end-this._start-1].value=e[0].value);for(let t=i;tvoid 0!==e)).sort(((e,t)=>e.index-t.index)),this._invalidateSearchCaches(),this._minMaxCache.clear(),this._start=0,this._end=this._items.length}remove(e){if(this._shareRead)return l.logDebug("remove: readonly collection modification attempt"),null;const t=this._nonCachedSearch(e,a.PlotRowSearchMode.NearestRight,h);if(null===t)return null;const i=this._items.splice(t);return this._end=this._items.length,this._minMaxCache.clear(),this._invalidateSearchCaches(),i.length>0?i[0]:null}state(){const e=this._items.slice(this._start,this._end);return{start:0,end:e.length,data:e}}restoreState(e){e?(this._start=e.start,this._end=e.end,this._shareRead=!1,this._items=e.data,this._minMaxCache.clear(), this._invalidateSearchCaches()):this.clear()}_indexAt(e){return this._items[e].index}_valueAt(e){return this._items[e].value}_length(){return this._items.length}_searchImpl(e,t,i,s,r,n){const o=void 0!==n?i:s,a=void 0!==n?1e4*(t+1)+n:t;let l=o.get(e);if(void 0!==l){const e=l.get(a);if(void 0!==e)return e}const c=this._nonCachedSearch(e,t,r,n);if(null===c)return null;const h={index:this._indexAt(c),value:this._valueAt(c)};return void 0===l&&(l=new Map,o.set(e,l)),l.set(a,h),h}_nonCachedSearch(e,t,i,s){const r=this._lowerbound(e,i),n=r===this._end||e!==i(this._items[r]);if(n&&t!==a.PlotRowSearchMode.Exact)switch(t){case a.PlotRowSearchMode.NearestLeft:return this._searchNearestLeft(r,s);case a.PlotRowSearchMode.NearestRight:return this._searchNearestRight(r,s);default:throw new TypeError("Unknown search mode")}if(void 0===s||n||t===a.PlotRowSearchMode.Exact)return n?null:r;switch(t){case a.PlotRowSearchMode.NearestLeft:return this._nonEmptyNearestLeft(r,s);case a.PlotRowSearchMode.NearestRight:return this._nonEmptyNearestRight(r,s);default:throw new TypeError("Unknown search mode")}}_nonEmptyNearestRight(e,t){const i=(0,s.ensure)(this._emptyValuePredicate),r=(0,s.ensure)(t);for(;e=this._start&&i(this._valueAt(e),r);)e-=1;return et(e)t.index>e),this._start,this._end)}_plotMinMax(e,t,i){let s=null;const r=this._plotFunctions.get(i);if(void 0===r)throw new Error(`Plot "${i}" is not registered`);for(let i=e;is.max&&(s.max=e)))}return s}_invalidateCacheForRow(e){const t=Math.floor(e.index/c);this._minMaxCache.forEach((e=>e.delete(t)))}_prepend(e){return(0,s.assert)(!this._shareRead,"collection should not be readonly"),(0,s.assert)(0!==e.length,"plotRows should not be empty"),this._invalidateSearchCaches(),this._minMaxCache.clear(),this._items=e.concat(this._items),this._start=0,this._end=this._items.length,e[0]}_append(e){return(0,s.assert)(!this._shareRead,"collection should not be readonly"),(0,s.assert)(0!==e.length,"plotRows should not be empty"),this._invalidateSearchCaches(),this._minMaxCache.clear(),this._items=this._items.concat(e),this._start=0,this._end=this._items.length,e[0]}_updateLast(e){(0,s.assert)(!this.isEmpty(),"plot list should not be empty");const t=this._items[this._end-1];(0, -s.assert)(t.index===e.index,"last row index should match new row index"),this._invalidateCacheForRow(e),this._invalidateSearchCaches(),this._items[this._end-1]=e}_merge(e){return(0,s.assert)(0!==e.length,"plot rows should not be empty"),this._invalidateSearchCaches(),this._minMaxCache.clear(),this._items=_(this._items,e),this._start=0,this._end=this._items.length,e[0]}_minMaxOnRangeCachedImpl(e,t,i){if(this.isEmpty())return null;let r=null;const n=(0,s.ensureNotNull)(this.firstIndex()),o=(0,s.ensureNotNull)(this.lastIndex()),a=Math.max(e,n),l=Math.min(t,o),h=Math.ceil(a/c)*c,d=Math.max(h,Math.floor(l/c)*c);r=p(r,this._minMaxOnRange(a,Math.min(h,t,l),i));let u=this._minMaxCache.get(i);void 0===u&&(u=new Map,this._minMaxCache.set(i,u));for(let e=Math.max(h+1,a);et[o].index?o++:(n++,o++,r--);return r}(e,t),s=new Array(i);let r=0,n=0;const o=e.length,a=t.length;let l=0;for(;rt[n].index?(s[l]=t[n],n++):(s[l]=t[n],r++,n++),l++;for(;r{"use strict";i.d(t,{PriceAxisView:()=>p});var s=i(86441),r=i(34026),n=i(78996),o=i(80142),a=i(83499),l=i(14888),c=i(9740),h=i(6947);class d{constructor(e,t){this.setData(e,t)}setData(e,t){this._data=e,this._commonData=t}draw(e,t,i,s,r,n,l){var h,d,u;const p=this._data;if(!p.visible||this._isOutOfScreen(t,r))return;const _=this._commonData,m=void 0!==p.labelIcon,g=p.ignoreOffset?0:t.offsetSize,f=t.borderSize,v=t.paddingTop+_.additionalPaddingTop,S=t.paddingBottom+_.additionalPaddingBottom,y=t.paddingInner,b=t.paddingOuter,w=t.fontSize;let C=p.text,P=p.textColor||_.textColor,T=p.secondLine||"",x=_.secondLineTextColor||P,I=p.thirdLine||"";const M=_.thirdLineTextColor||P;0===T.length&&(T=I,x=M,I=""),0===C.length&&(C=T,P=x,T=I,x=M,I=""),e.save(),e.font=t.font;const A=i.yMidCorrection(e,C)*l,L=Math.ceil(i.measureText(e,C)),k=w+v+S,E=Boolean(T),D=Boolean(I),V=E?Math.ceil(i.measureText(e,T)):0,B=D?Math.ceil(i.measureText(e,I)):0,R=f+y+b+L+g,N=V>0?f+y+b+V+g:0,O=B>0?f+y+b+B+g:0,F=Math.max(R,N,O),W=Math.max(1,Math.floor(l));let H=Math.round(k*l);H%2!=W%2&&(H+=1) -;const z=Math.round((w+t.lineSpacing)*l),U=Math.round(2*(w+t.lineSpacing)*l),j=Math.max(1,Math.floor(f*l)),G=p.separatorVisible?j:0,q=p.borderVisible?j:0,$=m?H:Math.round(F*l),Y=Math.round(g*l),K=Math.ceil(s*l),X=Math.ceil(y*l),Z=Math.round((null!==(h=_.fixedCoordinate)&&void 0!==h?h:_.coordinate)*l)-Math.floor(.5*l),J=Math.floor(Z+W/2-H/2),Q=J+H,ee="right"===n,te=ee?K-G:G,ie=K;let se,re=te;const ne=null!==(d=p.backgroung)&&void 0!==d?d:_.background;e.fillStyle=ne;const oe=2*l;if(e.textAlign=ee?"right":"left",e.textBaseline="middle",ee?(re=te-$,se=te-Y-X-1):(re=te+$,se=te+Y+X),C||m){const i=D?H+U:E?H+z:H;if(((t,s,r)=>{ee?(0,c.drawRoundRectWithInnerBorder)(e,re,J,$,i,t,[oe,0,0,oe],q,s,r):(0,c.drawRoundRectWithInnerBorder)(e,te,J,$,i,t,[0,oe,oe,0],q,s,r)})(ne,null!==(u=_.borderColor)&&void 0!==u?u:ne,_.borderStyle),p.separatorVisible&&(e.fillStyle=t.paneBackgroundColor,e.fillRect(ee?ie-G:0,J,G,Q-J)),m){switch(p.labelIcon){case 0:this._drawPlusIcon(e,te,re,J,Z,Q,W);break;case 1:this._drawClockIcon(e,te,re,Z,W,l)}return void e.restore()}e.save(),e.translate(se,(J+Q)/2+A),(0,a.drawScaled)(e,l,(()=>{e.fillStyle=P,e.fillText(C,0,0)})),e.restore()}E&&(e.fillStyle=x,e.save(),e.translate(se,(J+Q)/2+A+z),(0,a.drawScaled)(e,l,(()=>{e.fillText((0,o.startWithLTR)(T),0,0)})),e.restore()),D&&(e.fillStyle=M,e.save(),e.translate(se,(J+Q)/2+A+U),(0,a.drawScaled)(e,l,(()=>{e.fillText((0,o.startWithLTR)(I),0,0)})),e.restore()),e.restore()}topBottomTotalHeight(e){const t=this._lines();if(!this._data.visible||0===t)return{top:0,bottom:0,total:0};const i=e.fontSize/2+e.paddingTop+this._commonData.additionalPaddingTop,s=(t-.5)*e.fontSize+(t-1)*e.lineSpacing+e.paddingBottom+this._commonData.additionalPaddingBottom;return{top:i,bottom:s,total:i+s}}hitTest(e){const t=this._data.hitTestData;if(void 0===t||!this._data.visible)return null;const i=(0,n.lastMouseOrTouchEventInfo)().isTouch?10:0,o=(0,s.box)(new s.Point(t.xl-i,t.y-i),new s.Point(t.xl+t.containerWidth+i,t.y+t.containerHeight+i)),a=t.left&&(0,r.pointInBox)(e,o),c=(0,s.box)(new s.Point(t.xr-i,t.y-i),new s.Point(t.xr+t.containerWidth+i,t.y+t.containerHeight+i)),d=t.right&&(0,r.pointInBox)(e,c);if(a||d){const i=a?"left":"right";return new l.HitTestResult(l.HitTestResult.CUSTOM,{cursorType:h.PaneCursorType.Default,clickHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,i),tapHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,i),tooltip:t.tooltip})}return null}_drawPlusIcon(e,t,i,s,r,n,o){e.fillStyle=this._commonData.textColor,e.strokeStyle=this._commonData.textColor,e.lineWidth=o;const a=Math.abs(t-i);let l=Math.round(.35*a);l%2!=o%2&&(l+=1);let c=Math.round(.65*a);c%2!=o%2&&(c+=1);const h=Math.floor((a-l)/2),d=Math.min(t,i),u=d+Math.floor(a/2-o/2);e.fillRect(d+h,r,l,o),e.fillRect(u,s+h,o,l),e.beginPath(),e.arc(u+o/2,r+o/2,c/2,0,2*Math.PI,!1),e.stroke()}_drawClockIcon(e,t,i,s,r,n){e.fillStyle=this._commonData.textColor,e.lineWidth=r;const o=Math.abs(t-i);let a=Math.round(.35*o);a%2!=r%2&&(a+=1);let l=Math.round(.65*o);l%2!=r%2&&(l+=1) +s.assert)(t.index===e.index,"last row index should match new row index"),this._invalidateCacheForRow(e),this._invalidateSearchCaches(),this._items[this._end-1]=e}_merge(e){return(0,s.assert)(0!==e.length,"plot rows should not be empty"),this._invalidateSearchCaches(),this._minMaxCache.clear(),this._items=_(this._items,e),this._start=0,this._end=this._items.length,e[0]}_minMaxOnRangeCachedImpl(e,t,i){if(this.isEmpty())return null;let r=null;const n=(0,s.ensureNotNull)(this.firstIndex()),o=(0,s.ensureNotNull)(this.lastIndex()),a=Math.max(e,n),l=Math.min(t,o),h=Math.ceil(a/c)*c,d=Math.max(h,Math.floor(l/c)*c);r=p(r,this._minMaxOnRange(a,Math.min(h,t,l),i));let u=this._minMaxCache.get(i);void 0===u&&(u=new Map,this._minMaxCache.set(i,u));for(let e=Math.max(h+1,a);et[o].index?o++:(n++,o++,r--);return r}(e,t),s=new Array(i);let r=0,n=0;const o=e.length,a=t.length;let l=0;for(;rt[n].index?(s[l]=t[n],n++):(s[l]=t[n],r++,n++),l++;for(;r{"use strict";i.d(t,{PriceAxisView:()=>p});var s=i(86441),r=i(34026),n=i(78996),o=i(80142),a=i(83499),l=i(14888),c=i(9740),h=i(6947);class d{constructor(e,t){this.setData(e,t)}setData(e,t){this._data=e,this._commonData=t}draw(e,t,i,s,r,n,l){var h,d,u;const p=this._data;if(!p.visible||this._isOutOfScreen(t,r))return;const _=this._commonData,m=void 0!==p.labelIcon,g=p.ignoreOffset?0:t.offsetSize,f=t.borderSize,v=t.paddingTop+_.additionalPaddingTop,S=t.paddingBottom+_.additionalPaddingBottom,y=t.paddingInner,b=t.paddingOuter,w=t.fontSize;let P=p.text,C=p.textColor||_.textColor,T=p.secondLine||"",x=_.secondLineTextColor||C,I=p.thirdLine||"";const M=_.thirdLineTextColor||C;0===T.length&&(T=I,x=M,I=""),0===P.length&&(P=T,C=x,T=I,x=M,I=""),e.save(),e.font=t.font;const A=i.yMidCorrection(e,P)*l,L=Math.ceil(i.measureText(e,P)),k=w+v+S,E=Boolean(T),D=Boolean(I),B=E?Math.ceil(i.measureText(e,T)):0,V=D?Math.ceil(i.measureText(e,I)):0,R=f+y+b+L+g,N=B>0?f+y+b+B+g:0,O=V>0?f+y+b+V+g:0,F=Math.max(R,N,O),W=Math.max(1,Math.floor(l));let H=Math.round(k*l);H%2!=W%2&&(H+=1) +;const z=Math.round((w+t.lineSpacing)*l),U=Math.round(2*(w+t.lineSpacing)*l),j=Math.max(1,Math.floor(f*l)),G=p.separatorVisible?j:0,q=p.borderVisible?j:0,$=m?H:Math.round(F*l),Y=Math.round(g*l),K=Math.ceil(s*l),X=Math.ceil(y*l),Z=Math.round((null!==(h=_.fixedCoordinate)&&void 0!==h?h:_.coordinate)*l)-Math.floor(.5*l),J=Math.floor(Z+W/2-H/2),Q=J+H,ee="right"===n,te=ee?K-G:G,ie=K;let se,re=te;const ne=null!==(d=p.backgroung)&&void 0!==d?d:_.background;e.fillStyle=ne;const oe=2*l;if(e.textAlign=ee?"right":"left",e.textBaseline="middle",ee?(re=te-$,se=te-Y-X-1):(re=te+$,se=te+Y+X),P||m){const i=D?H+U:E?H+z:H;if(((t,s,r)=>{ee?(0,c.drawRoundRectWithInnerBorder)(e,re,J,$,i,t,[oe,0,0,oe],q,s,r):(0,c.drawRoundRectWithInnerBorder)(e,te,J,$,i,t,[0,oe,oe,0],q,s,r)})(ne,null!==(u=_.borderColor)&&void 0!==u?u:ne,_.borderStyle),p.separatorVisible&&(e.fillStyle=t.paneBackgroundColor,e.fillRect(ee?ie-G:0,J,G,Q-J)),m){switch(p.labelIcon){case 0:this._drawPlusIcon(e,te,re,J,Z,Q,W);break;case 1:this._drawClockIcon(e,te,re,Z,W,l)}return void e.restore()}e.save(),e.translate(se,(J+Q)/2+A),(0,a.drawScaled)(e,l,(()=>{e.fillStyle=C,e.fillText(P,0,0)})),e.restore()}E&&(e.fillStyle=x,e.save(),e.translate(se,(J+Q)/2+A+z),(0,a.drawScaled)(e,l,(()=>{e.fillText((0,o.startWithLTR)(T),0,0)})),e.restore()),D&&(e.fillStyle=M,e.save(),e.translate(se,(J+Q)/2+A+U),(0,a.drawScaled)(e,l,(()=>{e.fillText((0,o.startWithLTR)(I),0,0)})),e.restore()),e.restore()}topBottomTotalHeight(e){const t=this._lines();if(!this._data.visible||0===t)return{top:0,bottom:0,total:0};const i=e.fontSize/2+e.paddingTop+this._commonData.additionalPaddingTop,s=(t-.5)*e.fontSize+(t-1)*e.lineSpacing+e.paddingBottom+this._commonData.additionalPaddingBottom;return{top:i,bottom:s,total:i+s}}hitTest(e){const t=this._data.hitTestData;if(void 0===t||!this._data.visible)return null;const i=(0,n.lastMouseOrTouchEventInfo)().isTouch?10:0,o=(0,s.box)(new s.Point(t.xl-i,t.y-i),new s.Point(t.xl+t.containerWidth+i,t.y+t.containerHeight+i)),a=t.left&&(0,r.pointInBox)(e,o),c=(0,s.box)(new s.Point(t.xr-i,t.y-i),new s.Point(t.xr+t.containerWidth+i,t.y+t.containerHeight+i)),d=t.right&&(0,r.pointInBox)(e,c);if(a||d){const i=a?"left":"right";return new l.HitTestResult(l.HitTestResult.CUSTOM,{cursorType:h.PaneCursorType.Default,clickHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,i),tapHandler:void 0===t.clickHandler?void 0:t.clickHandler.bind(this,e,i),tooltip:t.tooltip})}return null}_drawPlusIcon(e,t,i,s,r,n,o){e.fillStyle=this._commonData.textColor,e.strokeStyle=this._commonData.textColor,e.lineWidth=o;const a=Math.abs(t-i);let l=Math.round(.35*a);l%2!=o%2&&(l+=1);let c=Math.round(.65*a);c%2!=o%2&&(c+=1);const h=Math.floor((a-l)/2),d=Math.min(t,i),u=d+Math.floor(a/2-o/2);e.fillRect(d+h,r,l,o),e.fillRect(u,s+h,o,l),e.beginPath(),e.arc(u+o/2,r+o/2,c/2,0,2*Math.PI,!1),e.stroke()}_drawClockIcon(e,t,i,s,r,n){e.fillStyle=this._commonData.textColor,e.lineWidth=r;const o=Math.abs(t-i);let a=Math.round(.35*o);a%2!=r%2&&(a+=1);let l=Math.round(.65*o);l%2!=r%2&&(l+=1) ;const c=Math.min(t,i)+Math.floor(o/2-r/2);e.save(),e.translate(c+r/2-l/2,s+r/2-l/2),e.scale(n,n);const h=new Path2D("M7.5 0.8a1 1 0 0 0 0 13.4 1 1 0 0 0 0-13.4zm0 1a1 1 0 0 1 0 11 1 1 0 0 1 0-11zm-.97-.25A3.5 3.5 0 0 0 3.5 0 3.5 3.5 0 0 0 0 3.5a3.5 3.5 0 0 0 1.75 3.03l.5-.86A2.5 2.5 0 0 1 1 3.5 2.5 2.5 0 0 1 3.5 1a2.5 2.5 0 0 1 2.17 1.25zm6.72 4.78A3.5 3.5 0 0 0 15 3.5 3.5 3.5 0 0 0 11.5 0a3.5 3.5 0 0 0-3.03 1.75l.86.5A2.5 2.5 0 0 1 11.5 1 2.5 2.5 0 0 1 14 3.5a2.5 2.5 0 0 1-1.25 2.17zM7 5h1v5H7zm3 2v1H5V7z");e.fill(h),e.restore()}_lines(){const e=this._data;return(e.text?1:0)+(e.secondLine?1:0)+(e.thirdLine?1:0)}_isOutOfScreen(e,t){var i;const s=this._commonData,r=null!==(i=s.fixedCoordinate)&&void 0!==i?i:s.coordinate,{total:n}=this.topBottomTotalHeight(e),o=n/this._lines();return r-o/2-3>t||r+(n-o/2)+3<0}}var u=i(38031);class p{constructor(e){this._commonRendererData={coordinate:0,textColor:"#FFF",background:"#000",additionalPaddingBottom:0,additionalPaddingTop:0},this._axisRendererData={text:"",visible:!1,separatorVisible:!1,borderVisible:!1,ignoreOffset:!1},this._paneRendererData={text:"",visible:!1,separatorVisible:!0,borderVisible:!1,ignoreOffset:!0},this._invalidated=!0,this._axisRenderer=new(e||d)(this._axisRendererData,this._commonRendererData),this._paneRenderer=new(e||d)(this._paneRendererData,this._commonRendererData)}text(){return this._updateRendererDataIfNeeded(),this._axisRendererData.text}secondLineText(){return this._updateRendererDataIfNeeded(),this._axisRendererData.secondLine}thirdLineText(){return this._updateRendererDataIfNeeded(),this._axisRendererData.thirdLine}background(){return this._updateRendererDataIfNeeded(),this._commonRendererData.background}color(){return this._updateRendererDataIfNeeded(),this.generateTextColor(this.background())}generateTextColor(e){return(0,u.colorFromBackground)(e)}coordinate(){return this._updateRendererDataIfNeeded(),this._commonRendererData.coordinate}floatCoordinate(){var e;return this._updateRendererDataIfNeeded(),null!==(e=this._commonRendererData.floatCoordinate)&&void 0!==e?e:this._commonRendererData.coordinate}update(e){this._invalidated=!0}topBottomTotalHeight(e){this._updateRendererDataIfNeeded();const{top:t,bottom:i,total:s}=this._axisRenderer.topBottomTotalHeight(e),{top:r,bottom:n,total:o}=this._paneRenderer.topBottomTotalHeight(e);return{top:Math.max(t,r),bottom:Math.max(i,n),total:Math.max(s,o)}}getFixedCoordinate(){return this._commonRendererData.fixedCoordinate||0}setFixedCoordinate(e){this._commonRendererData.fixedCoordinate=e}isVisible(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible||this._paneRendererData.visible}isAxisLabelVisible(){return this._updateRendererDataIfNeeded(),this._axisRendererData.visible}isPaneLabelVisible(){return this._updateRendererDataIfNeeded(),this._paneRendererData.visible}renderer(){return this._updateRendererDataIfNeeded(),this._axisRenderer}paneRenderer(){return this._updateRendererDataIfNeeded(),this._paneRenderer}setPaneRendererLabelIcon(e){this._paneRendererData.labelIcon=e} setPaneLabelVisible(e){this._paneRendererData.visible=e,this._invalidated=!0}ignoreAlignment(){return!1}_updateRendererDataIfNeeded(){this._invalidated&&(this._commonRendererData.fixedCoordinate=void 0,this._updateRendererData(this._axisRendererData,this._paneRendererData,this._commonRendererData),this._invalidated=!1)}}},88029:(e,t,i)=>{"use strict";i.d(t,{isPriceDataSource:()=>a,PriceDataSource:()=>l});var s=i(80230),r=i(26867),n=i.n(r),o=i(21580);function a(e){return e instanceof l}class l extends s.DataSource{constructor(e,t){super(t),this._formatterChanged=new(n()),this._priceStepChanged=new(n()),this._currencyChanged=new(n()),this._unitChanged=new(n()),this._priceRangeReadyChanged=new(n()),this._priceStep=null,this._priceRangeReady=!0,this._model=e}base(){return 0}model(){return this._model}currencyChanged(){return this._currencyChanged}isCurrencySource(){return!0}isDisplayedInLegend(){return!0}unitChanged(){return this._unitChanged}isUnitSource(){return!0}priceRange(e,t){return null}isDraggable(){return!0}priceLineColor(e){return e}formatterChanged(){return this._formatterChanged}priceStep(e){return this._priceStep}priceStepChanged(){return this._priceStepChanged}isIncludedInAutoScale(){return!0}correctScaleMargins(e){return e}priceRangeReady(){return this._priceRangeReady}priceRangeReadyChanged(){return this._priceRangeReadyChanged}disablePriceRangeReady(){const e=this.priceScale();null===e||e.isAutoScale()||e.mainSource()!==this||(this._priceRangeReady=!1,e.recalculatePriceRangeOnce()),this._priceRangeReadyChanged.fire(!1)}statusView(){return null}legendView(){return null}marketStatusModel(){return null}dataUpdatedModeModel(){return null}dataProblemModel(){return null}_enablePriceRangeReady(){this._priceRangeReady=!0,this._priceRangeReadyChanged.fire(!0)}_onSourceCurrencyChanged(){(0,o.isActingAsSymbolSource)(this)||this._currencyChanged.fire()}_onSourceUnitChanged(){(0,o.isActingAsSymbolSource)(this)||this._unitChanged.fire()}_onSourcePriceRangeReadyChanged(e){(0,o.isActingAsSymbolSource)(this)||e||this.disablePriceRangeReady()}}},45703:(e,t,i)=>{"use strict";i.d(t,{PriceLineAxisView:()=>l,SeriesPriceLineAxisView:()=>c,StudyPriceLineAxisView:()=>h});var s=i(67876),r=i(50151),n=i(53479),o=i(9740);class a{constructor(e,t){this.setData(e,t)}setData(e,t){this._data=e,this._commonData=t}draw(e,t,i,s,a,l,c){var h;if(!this._data.visible)return;const d=null!==(h=this._commonData.fixedCoordinate)&&void 0!==h?h:this._commonData.coordinate;e.lineWidth=Math.max(1,Math.floor((0,r.ensureDefined)(this._data.linewidth)*c)),e.lineCap="butt",(0,o.setLineStyle)(e,void 0===this._data.linestyle?n.LINESTYLE_DOTTED:this._data.linestyle),e.strokeStyle=this._commonData.textColor,(0,o.drawHorizontalLine)(e,Math.round(d*c),0,Math.ceil(s*c))}topBottomTotalHeight(e){return{top:0,bottom:0,total:0}}}class l extends s.PriceAxisView{constructor(e){super(e||a)}ignoreAlignment(){return!0}_updateRendererData(e,t,i){if(t.visible=!1,e.visible=!1,!this._isVisible())return;const s=this._value();s.noData||(i.background="", i.textColor=this._priceLineColor(s.color),i.coordinate=s.coordinate,i.floatCoordinate=s.floatCoordinate,e.linewidth=this._lineWidth(),e.linestyle=this._lineStyle(),e.backgroundAreaVisible=this._backgroundAreaVisible(),e.backgroundAreaColor=this._backgroundAreaColor(),e.backgroundAreaHeight=this._backgroundAreaHeight(),e.visible=!0)}_lineStyle(){return n.LINESTYLE_DOTTED}_backgroundAreaVisible(){return!1}_backgroundAreaColor(){return""}_backgroundAreaHeight(){return 0}}class c extends l{constructor(e){super(),this._series=e}_value(){return this._series.lastValueData(void 0,!0)}_priceLineColor(e){return this._series.priceLineColor(e)}_lineWidth(){return this._series.properties().childs().priceLineWidth.value()}_isVisible(){const e=this._series.model().properties().childs().scalesProperties.childs().showSeriesLastValue.value();return this._series.properties().childs().showPriceLine.value()&&e}}class h extends l{constructor(e,t){super(),this._study=e,this._plotname=t}_value(){return this._study.lastValueData(this._plotname,!0)}_lineWidth(){return this._study.properties().childs().styles.childs()[this._plotname].childs().linewidth.value()}_lineStyle(){return n.LINESTYLE_DOTTED}_priceLineColor(e){return e}_isVisible(){const e=this._study.model().properties().childs().scalesProperties.childs().showStudyLastValue.value(),t=this._study.isPlotVisibleAt(this._plotname,1);return this._study.properties().childs().styles.childs()[this._plotname].childs().trackPrice.value()&&e&&t}}},42961:(e,t,i)=>{"use strict";i.d(t,{PriceScaleBase:()=>A});var s=i(50151),r=i(65665),n=i(26867),o=i.n(n),a=i(93975),l=i(23304),c=i(1194),h=i(46936),d=i(88029),u=i(26220),p=i.n(u),_=i(89215),m=i(21580),g=i(1930),f=i(50337),v=i(50841),S=i(91031);class y{constructor(e,t){if(this._base=e,this._integralDividers=t,(0,S.isBaseDecimal)(this._base))this._fractionalDividers=[2,2.5,2];else{this._fractionalDividers=[];for(let e=this._base;1!==e;){if(e%2==0)this._fractionalDividers.push(2),e/=2;else{if(e%5!=0)throw new Error("unexpected base");this._fractionalDividers.push(2),this._fractionalDividers.push(2.5),e/=5}if(this._fractionalDividers.length>100)throw new Error("something wrong with base")}}}tickSpan(e,t,i){const s=0===this._base?0:1/this._base,r=Math.min(1e-14,(e-t)/1e3);let n=Math.pow(10,Math.max(0,Math.ceil((0,S.log10)(e-t)))),o=0,a=this._integralDividers[0];for(;;){const e=(0,S.greaterOrEqual)(n,s,r)&&n>s+r,t=(0,S.greaterOrEqual)(n,i*a,r),l=(0,S.greaterOrEqual)(n,1,r);if(!(e&&t&&l))break;n/=a,a=this._integralDividers[++o%this._integralDividers.length]}if(n<=s+r&&(n=s),n=Math.max(1,n),this._fractionalDividers.length>0&&(0,S.equal)(n,1,r))for(o=0,a=this._fractionalDividers[0];(0,S.greaterOrEqual)(n,i*a,r)&&n>s+r;)n/=a,a=this._fractionalDividers[++o%this._fractionalDividers.length];return n}}class b{constructor(e,t,i,s){this._marks=null,this._priceScale=e,this._base=t,this._coordinateToLogicalFunc=i,this._logicalToCoordinateFunc=s}base(){return this._base}setBase(e){if(e<0)throw new Error("base < 0");this._base=e}tickSpan(e,t,i=0){ -if(ei&&(l=c);const h=o.tickSpan(e,t,r);h>i&&(l=Math.min(l,h));const d=a.tickSpan(e,t,r);return d>i&&(l=Math.min(l,d)),l>0?l:e-t}rebuildTickMarks(){this._marks=null}marks(){return null===this._marks&&(this._marks=this._rebuildTickMarksImpl()),this._marks}_fontHeight(){return this._priceScale.fontSize()}_tickMarkHeight(){return Math.ceil(2.5*this._fontHeight())}_rebuildTickMarksImpl(){const e=this._priceScale,t=[],i=e.mainSource();if(e.isEmpty()||null===i)return t;let s=i.firstValue();null===s&&(s=0);const r=e.height(),n=this._coordinateToLogicalFunc(r-1,s),o=this._coordinateToLogicalFunc(0,s),a=Math.max(n,o),l=Math.min(n,o);if(a===l)return t;let c=this.tickSpan(a,l),h=a%c;h+=h<0?c:0;const d=a>=l?1:-1;let u=null;const p=e.formatter();let _=NaN;for(let i=a-h;i>l;i-=c){i===_&&(c=this.tickSpan(a,l,c)),_=i;const r=this._logicalToCoordinateFunc(i,s);null!==u&&Math.abs(r-u)i&&(l=c);const h=o.tickSpan(e,t,r);h>i&&(l=Math.min(l,h));const d=a.tickSpan(e,t,r);return d>i&&(l=Math.min(l,d)),l>0?l:e-t}rebuildTickMarks(){this._marks=null}marks(){return null===this._marks&&(this._marks=this._rebuildTickMarksImpl()),this._marks}_fontHeight(){return this._priceScale.fontSize()}_tickMarkHeight(){return Math.ceil(2.5*this._fontHeight())}_rebuildTickMarksImpl(){const e=this._priceScale,t=[],i=e.mainSource();if(e.isEmpty()||null===i)return t;let s=i.firstValue();null===s&&(s=0);const r=e.height(),n=this._coordinateToLogicalFunc(r-1,s),o=this._coordinateToLogicalFunc(0,s),a=Math.max(n,o),l=Math.min(n,o);if(a===l)return t;let c=this.tickSpan(a,l),h=a%c;h+=h<0?c:0;const d=a>=l?1:-1;let u=null;const p=e.formatter();let _=NaN;for(let i=a-h;i>l;i-=c){i===_&&(c=this.tickSpan(a,l,c)),_=i;const r=this._logicalToCoordinateFunc(i,s);null!==u&&Math.abs(r-u)t!==e&&(0,d.isPriceDataSource)(t)&&!((0,_.isStudy)(t)&&t.isLinkedToSeries())))}updateAllViews(e){const t=this._getSourcesToUpdateViews();for(const i of t)i.updateAllViews(e)}logFormula(){return this._logFormula}state(){var e;const t=this._properties.childs();return{id:this._id,m_priceRange:this.isAutoScale()?null:(null===(e=this.priceRange())||void 0===e?void 0:e.serialize())||null,m_isAutoScale:this.isAutoScale(),m_isPercentage:t.percentage.value(),m_isIndexedTo100:t.indexedTo100.value(),m_isLog:t.log.value(),m_isLockScale:this.isLockScale(),m_isInverted:this.isInverted(),m_height:this.m_height,m_topMargin:this._margins.top,m_bottomMargin:this._margins.bottom,alignLabels:t.alignLabels.value(),logFormula:(0,r.clone)(this._logFormula)}}restoreState(e){let t=e.m_priceRange;if(void 0===t)throw new TypeError("invalid state");if(void 0===e.m_isAutoScale)throw new TypeError("invalid state");void 0!==e.id&&(this._id=e.id);const i={autoScale:e.m_isAutoScale};void 0!==e.m_isPercentage&&(i.percentage=e.m_isPercentage),void 0!==e.m_isIndexedTo100&&(i.indexedTo100=e.m_isIndexedTo100),void 0!==e.m_isLog&&(i.log=e.m_isLog),void 0!==e.m_isLockScale&&(i.lockScale=e.m_isLockScale),void 0!==e.m_isInverted&&this._properties.childs().isInverted.setValue(e.m_isInverted),void 0!==e.m_height&&this.setHeight(Math.max(0,e.m_height)),this.setMode(i),t?(t instanceof l.PriceRange||(t=new l.PriceRange(t)),this.setPriceRange(t,!0)):this.m_priceRange=null,e.logFormula&&(this._logFormula=e.logFormula), void 0!==e.m_topMargin&&(this._margins.top=e.m_topMargin),void 0!==e.m_bottomMargin&&(this._margins.bottom=e.m_bottomMargin),void 0!==e.alignLabels&&this._properties.childs().alignLabels.setValue(e.alignLabels),this._mainSource=null,this._scaleSeriesOnly=!1}priceToLogical(e){return this.isLog()&&e?(0,c.toLog)(e,this._logFormula):e}logicalToPrice(e){return this.isLog()?(0,c.fromLog)(e,this._logFormula):e}priceToCoordinate(e,t){const i=this._priceToPercentOrIndexedTo100IfNeeded(e,t);return this._logicalToCoordinate(i)}coordinateToPrice(e,t){let i=this._coordinateToLogical(e);return this.isPercentage()?i=(0,c.fromPercent)(i,t):this.isIndexedTo100()&&(i=(0,c.fromIndexedTo100)(i,t)),i}mainSource(){if(null!==this._mainSource)return this._mainSource;let e;for(const t of this.m_dataSources){if(t instanceof h.Series){e=t;break}!e&&(0,d.isPriceDataSource)(t)&&(e=t)}return this._mainSource=e||null,this._correctedMarginsCache=null,this._mainSource}pricesArrayToCoordinates(e,t,i){this._makeSureItIsValid();const r=this.bottomPixelMargin(),n=(0,s.ensureNotNull)(this.priceRange()),o=n.minValue(),a=n.maxValue(),l=this.internalHeight()-1,h=this.isInverted(),d=l/(a-o);void 0===i&&(i=e.length);const u=this.isPercentage(),p=this.isIndexedTo100(),_=this.isLog(),m=this.m_height;let g,f;for(let s=0;se?(0,c.toLog)(e,this._logFormula):e),0===r.length)return;const d="open"in r[0],u="close"in r[0];if(null!==h)for(let e=0;ethis._currencyCache=null)),e.unitChanged().subscribe(this,(()=>this._unitCache=null)),(0,m.isSymbolSource)(e)&&(this._seriesLikeSources.push(e),e.symbolResolved().subscribe(this,(()=>{this._currencyCache=null,this._unitCache=null,this._measureUnitIdCache=null})),e.isActingAsSymbolSource().subscribe(this._boundOnSourceIsActingAsSymbolSourceChanged),e instanceof h.Series))){const t=e.properties();this._hasSeries||(t.childs().lockScale&&(this.setMode({lockScale:t.childs().lockScale.value()}),t.removeProperty("lockScale")),t.childs().pnfStyle.child("lockScale")&&t.childs().pnfStyle.removeProperty("lockScale")),this._hasSeries=!0}e.properties().visible.listeners().subscribe(this,this._dropScaleCache),(0,_.isStudy)(e)&&(e.onIsActualIntervalChange().subscribe(this,this._dropScaleCache),e.onHibernationStateChange().subscribe(this,this._dropScaleCache),0===this._studiesCount&&(0,C.hideAllIndicators)().subscribe(this,this._dropScaleCache),this._studiesCount++),(0,w.isLineTool)(e)&&(0===this._drawingCount&&(0,C.hideAllDrawings)().subscribe(this,this._dropScaleCache),this._drawingCount++),this.m_dataSources.push(e),this._mainSource=null,this._correctedMarginsCache=null,this._sourcesToUpdateViews=null,this._dropScaleCache(),this.updateFormatter(),this._initScaleProperties(),this.invalidateSourcesCache()}}removeDataSource(e){const t=this.m_dataSources.indexOf(e);if((0, -s.assert)(-1!==t,"Source is not attached to scale"),e.properties().visible.listeners().unsubscribe(this,this._dropScaleCache),this.m_dataSources.splice(t,1),(0,d.isPriceDataSource)(e)){const t=this._priceDataSources.indexOf(e);if((0,s.assert)(-1!==t,"Source is not found"),this._priceDataSources.splice(t,1),(0,m.isSymbolSource)(e)){const t=this._seriesLikeSources.indexOf(e);(0,s.assert)(-1!==t,"Source is not found"),this._seriesLikeSources.splice(t,1),e.symbolResolved().unsubscribeAll(this),e.isActingAsSymbolSource().unsubscribe(this._boundOnSourceIsActingAsSymbolSourceChanged),e instanceof h.Series&&(this._hasSeries=!1)}e.currencyChanged().unsubscribeAll(this),e.unitChanged().unsubscribeAll(this)}this.mainSource()||this.setMode({autoScale:!0}),(0,_.isStudy)(e)&&(e.onIsActualIntervalChange().unsubscribe(this,this._dropScaleCache),e.onHibernationStateChange().unsubscribe(this,this._dropScaleCache),this._studiesCount--,0===this._studiesCount&&(0,C.hideAllIndicators)().unsubscribe(this,this._dropScaleCache)),(0,w.isLineTool)(e)&&(this._drawingCount--,0===this._drawingCount&&(0,C.hideAllDrawings)().unsubscribe(this,this._dropScaleCache)),this._mainSource=null,this._correctedMarginsCache=null,this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this.updateFormatter(),this.invalidateSourcesCache(),0===this.m_dataSources.length&&this._lastSourceRemoved.fire(),this._currencyCache=null,this._unitCache=null,this._measureUnitIdCache=null}currency(e){if(null!==this._currencyCache&&e.size()===this._currencyCache.availableCurrenciesCount)return this._currencyCache.value;let t;const i=new Set,r=new Set,n=new Set,o=new Map;let a,l=0===this._seriesLikeSources.length,c=!0,h=0,d=0;const u=this._seriesLikeSources.filter(m.isActingAsSymbolSource);for(const d of u){if(!d.isVisible())continue;const u=d.symbolInfo();if(null===u){t=null;break}const p=(0,g.symbolOriginalCurrency)(u);if(null===p){t=null;break}o.set(p,(0,s.ensureNotNull)((0,g.symbolOriginalCurrency)(u,!0)));const _=d.currency();if(null===_){t=null;break}o.set(_,(0,s.ensureNotNull)((0,g.symbolCurrency)(u,!0)));const m=(0,g.symbolBaseCurrency)(u);null!==m&&r.add(m),c=c&&p===_,n.add(_),i.add(p),void 0===a?a=_:null!==a&&a!==_&&(a=null),l||e.convertible(_)&&(0,g.symbolCurrencyConvertible)(u)||(l=!0),h+=1}if(null!==t)for(const i of this._priceDataSources){if(u.includes(i))continue;const r=i;if(!r.isCurrencySource()||!r.isVisible())continue;const c=r.currency();if(null===c){t=null;break}n.add(c),d+=1;const h=(0,s.ensureNotNull)(r.symbolSource()),p=r.currencySourceSymbolInfo();if(null===p){t=null;break}if(l||e.convertible(c)&&(0,g.symbolCurrencyConvertible)(p)||(l=!0),o.set(c,(0,s.ensureNotNull)((0,g.symbolCurrency)(p,!0))),u.includes(h)||(l=!0),void 0===a)a=c;else if(null!==a&&a!==c){a=null;break}}return void 0===t&&(t=0===h&&0===d?null:{readOnly:l,selectedCurrency:a||null,currencies:n,originalCurrencies:i,baseCurrencies:r,symbolSourceCount:h,allCurrenciesAreOriginal:c,displayedValues:o}),this._currencyCache={value:t,availableCurrenciesCount:e.size()},t}unit(e){ +const e=n+p*(t.close-o),i=_?e:this.m_height-1-e;t.close=i}if(void 0!==t.additionalPrice){const e=n+p*(t.additionalPrice-o);t.additionalPrice=_?e:this.m_height-1-e}}}formatter(){return null===this._formatter&&this.updateFormatter(),(0,s.ensureNotNull)(this._formatter)}updateFormatter(){this._marksCache=null;const e=this.mainSource();let t=100;e&&(t=e.base()),this._formatter=null,this.isPercentage()?(this._formatter=x,t=100):this.isIndexedTo100()?(this._formatter=new T.PriceFormatter(100,1),t=100):this._formatter=e?e.formatter():I,this._markBuilder=new b(this,t,this._coordinateToLogical.bind(this),this._logicalToCoordinate.bind(this)),this._markBuilder.rebuildTickMarks()}formatPrice(e,t,i){return this.isPercentage()?this.formatPricePercentage(e,t,i):this.isIndexedTo100()?this.formatPriceIndexedTo100(e,t):this.formatter().format(e)}formatPriceAbsolute(e){return this._mainSourceFormatter().format(e)}formatPricePercentage(e,t,i){return e=(0,c.toPercent)(e,t),x.format(e,i)}formatPriceIndexedTo100(e,t){const i=(0,c.toIndexedTo100)(e,t);return this.formatter().format(i)}getFormattedValues(e,t,i){const s=this.formatPriceAbsolute(e),r=this.formatPricePercentage(e,t,i),n=this.formatPriceIndexedTo100(e,t);return{formattedPriceAbsolute:s,formattedPricePercentage:r,formattedPriceIndexedTo100:n,text:(0,c.getCurrentModePriceText)(this,{formattedPriceAbsolute:s,formattedPricePercentage:r,formattedPriceIndexedTo100:n})}}dataSources(){return this.m_dataSources}seriesLikeSources(){return this._seriesLikeSources}addDataSource(e,t){if(t||-1===this.m_dataSources.indexOf(e)){if((0,d.isPriceDataSource)(e)&&(this._priceDataSources.push(e),e.currencyChanged().subscribe(this,(()=>this._currencyCache=null)),e.unitChanged().subscribe(this,(()=>this._unitCache=null)),(0,m.isSymbolSource)(e)&&(this._seriesLikeSources.push(e),e.symbolResolved().subscribe(this,(()=>{this._currencyCache=null,this._unitCache=null,this._measureUnitIdCache=null})),e.isActingAsSymbolSource().subscribe(this._boundOnSourceIsActingAsSymbolSourceChanged),e instanceof h.Series))){const t=e.properties();this._hasSeries||(t.childs().lockScale&&(this.setMode({lockScale:t.childs().lockScale.value()}),t.removeProperty("lockScale")),t.childs().pnfStyle.child("lockScale")&&t.childs().pnfStyle.removeProperty("lockScale")),this._hasSeries=!0}e.properties().visible.listeners().subscribe(this,this._dropScaleCache),(0,_.isStudy)(e)&&(e.onIsActualIntervalChange().subscribe(this,this._dropScaleCache),e.onHibernationStateChange().subscribe(this,this._dropScaleCache),0===this._studiesCount&&(0,P.hideAllIndicators)().subscribe(this,this._dropScaleCache),this._studiesCount++),(0,w.isLineTool)(e)&&(0===this._drawingCount&&(0,P.hideAllDrawings)().subscribe(this,this._dropScaleCache),this._drawingCount++),this.m_dataSources.push(e),this._mainSource=null,this._correctedMarginsCache=null,this._sourcesToUpdateViews=null,this._dropScaleCache(),this.updateFormatter(),this._initScaleProperties(),this.invalidateSourcesCache()}}removeDataSource(e){const t=this.m_dataSources.indexOf(e);if((0, +s.assert)(-1!==t,"Source is not attached to scale"),e.properties().visible.listeners().unsubscribe(this,this._dropScaleCache),this.m_dataSources.splice(t,1),(0,d.isPriceDataSource)(e)){const t=this._priceDataSources.indexOf(e);if((0,s.assert)(-1!==t,"Source is not found"),this._priceDataSources.splice(t,1),(0,m.isSymbolSource)(e)){const t=this._seriesLikeSources.indexOf(e);(0,s.assert)(-1!==t,"Source is not found"),this._seriesLikeSources.splice(t,1),e.symbolResolved().unsubscribeAll(this),e.isActingAsSymbolSource().unsubscribe(this._boundOnSourceIsActingAsSymbolSourceChanged),e instanceof h.Series&&(this._hasSeries=!1)}e.currencyChanged().unsubscribeAll(this),e.unitChanged().unsubscribeAll(this)}this.mainSource()||this.setMode({autoScale:!0}),(0,_.isStudy)(e)&&(e.onIsActualIntervalChange().unsubscribe(this,this._dropScaleCache),e.onHibernationStateChange().unsubscribe(this,this._dropScaleCache),this._studiesCount--,0===this._studiesCount&&(0,P.hideAllIndicators)().unsubscribe(this,this._dropScaleCache)),(0,w.isLineTool)(e)&&(this._drawingCount--,0===this._drawingCount&&(0,P.hideAllDrawings)().unsubscribe(this,this._dropScaleCache)),this._mainSource=null,this._correctedMarginsCache=null,this._sourcesForAutoscale=null,this._sourcesToUpdateViews=null,this.updateFormatter(),this.invalidateSourcesCache(),0===this.m_dataSources.length&&this._lastSourceRemoved.fire(),this._currencyCache=null,this._unitCache=null,this._measureUnitIdCache=null}currency(e){if(null!==this._currencyCache&&e.size()===this._currencyCache.availableCurrenciesCount)return this._currencyCache.value;let t;const i=new Set,r=new Set,n=new Set,o=new Map;let a,l=0===this._seriesLikeSources.length,c=!0,h=0,d=0;const u=this._seriesLikeSources.filter(m.isActingAsSymbolSource);for(const d of u){if(!d.isVisible())continue;const u=d.symbolInfo();if(null===u){t=null;break}const p=(0,g.symbolOriginalCurrency)(u);if(null===p){t=null;break}o.set(p,(0,s.ensureNotNull)((0,g.symbolOriginalCurrency)(u,!0)));const _=d.currency();if(null===_){t=null;break}o.set(_,(0,s.ensureNotNull)((0,g.symbolCurrency)(u,!0)));const m=(0,g.symbolBaseCurrency)(u);null!==m&&r.add(m),c=c&&p===_,n.add(_),i.add(p),void 0===a?a=_:null!==a&&a!==_&&(a=null),l||e.convertible(_)&&(0,g.symbolCurrencyConvertible)(u)||(l=!0),h+=1}if(null!==t)for(const i of this._priceDataSources){if(u.includes(i))continue;const r=i;if(!r.isCurrencySource()||!r.isVisible())continue;const c=r.currency();if(null===c){t=null;break}n.add(c),d+=1;const h=(0,s.ensureNotNull)(r.symbolSource()),p=r.currencySourceSymbolInfo();if(null===p){t=null;break}if(l||e.convertible(c)&&(0,g.symbolCurrencyConvertible)(p)||(l=!0),o.set(c,(0,s.ensureNotNull)((0,g.symbolCurrency)(p,!0))),u.includes(h)||(l=!0),void 0===a)a=c;else if(null!==a&&a!==c){a=null;break}}return void 0===t&&(t=0===h&&0===d?null:{readOnly:l,selectedCurrency:a||null,currencies:n,originalCurrencies:i,baseCurrencies:r,symbolSourceCount:h,allCurrenciesAreOriginal:c,displayedValues:o}),this._currencyCache={value:t,availableCurrenciesCount:e.size()},t}unit(e){ if(null!==this._unitCache&&e.size()===this._unitCache.availableUnitsCount)return this._unitCache.value;let t;const i=new Set,r=new Set,n=new Map,o=new Map;let l,c=0===this._seriesLikeSources.length?new Set:e.allGroups(),h=!0,d=0,u=0;const p=this._seriesLikeSources.filter(m.isActingAsSymbolSource);for(const s of p){if(!s.isVisible())continue;const u=s.symbolInfo();if(null===u){t=null;break}const p=(0,g.symbolOriginalUnit)(u,s.model().unitConversionEnabled());if(null===p){t=null;break}n.set(p,e.name(p)),o.set(p,e.description(p));const _=s.unit();if(null===_){t=null;break}if(n.set(_,e.name(_)),o.set(_,e.description(_)),h=h&&p===_,r.add(_),i.add(p),void 0===l?l=_:null!==l&&l!==_&&(l=null),c.size>0){const t=(0,f.unitConvertibleGroups)(u,_,e);c=(0,a.intersect)(c,new Set(t))}d+=1}if(null!==t)for(const i of this._priceDataSources){if(p.includes(i))continue;const h=i;if(!h.isUnitSource()||!h.isVisible())continue;const d=h.unit();if(null===d){t=null;break}r.add(d),u+=1;const _=(0,s.ensureNotNull)(h.symbolSource()),m=_.symbolInfo();if(null===m){t=null;break}if(c.size>0){const t=(0,f.unitConvertibleGroups)(m,d,e);c=(0,a.intersect)(c,new Set(t))}if(n.set(d,e.name(d)),o.set(d,e.description(d)),p.includes(_)||(c=new Set),void 0===l)l=d;else if(null!==l&&l!==d){l=null;break}}if(void 0===t)if(0===d&&0===u)t=null;else{t={availableGroups:c,selectedUnit:l||null,units:r,originalUnits:i,symbolSourceCount:d,allUnitsAreOriginal:h,names:n,descriptions:o}}return this._unitCache={value:t,availableUnitsCount:e.size()},t}measureUnitId(e){if(null!==this._measureUnitIdCache&&e.size()===this._measureUnitIdCache.availableUnitsCount)return this._measureUnitIdCache.value;let t,i;const s=new Map,r=new Map,n=new Set;let o=0;const a=this._seriesLikeSources.filter(m.isActingAsSymbolSource);for(const l of a){if(!l.isVisible())continue;const a=l.measureUnitId();if(null===a){t=null;break}n.add(a),s.set(a,e.name(a)),r.set(a,e.description(a)),void 0===i?i=a:null!==i&&i!==a&&(i=null),o+=1}return void 0===t&&(t=0===o?null:{selectedMeasureUnitId:i||null,measureUnitIds:n,names:s,descriptions:r,symbolSourceCount:o}),this._measureUnitIdCache={value:t,availableUnitsCount:e.size()},t}setMargins(e){if(!(0,r.isNumber)(e.top)||!(0,r.isNumber)(e.bottom))throw new TypeError("invalid margin");if(e.top<0||e.top>30||e.bottom<0||e.bottom>30)throw new RangeError("invalid margin");this._margins.top===e.top&&this._margins.bottom===e.bottom||(this._margins=e,this._correctedMarginsCache=null,this._invalidateInternalHeightCache(),this._marksCache=null)}topMargin(){return this._correctedMargins().top}bottomMargin(){return this._correctedMargins().bottom}invalidateMargins(){this._correctedMarginsCache=null}topPixelMargin(){return this.isInverted()?this.bottomMargin()*this.height()+this._bottomPixelMargin:this.topMargin()*this.height()+this._topPixelMargin}bottomPixelMargin(){return this.isInverted()?this.topMargin()*this.height()+this._topPixelMargin:this.bottomMargin()*this.height()+this._bottomPixelMargin}marks(){return this._makeSureItIsValid(), null===this._marksCache&&(this._markBuilder.rebuildTickMarks(),this._marksCache=this._markBuilder.marks(),this._onMarksChanged.fire()),this._marksCache}onMarksChanged(){return this._onMarksChanged}priceRangeInPrice(){if(this.isEmpty())return null;const e=this.mainSource();if(null===e)return null;const t=(0,s.ensureNotNull)(e.firstValue()),i=this.height();return{from:this.coordinateToPrice(i-1,t),to:this.coordinateToPrice(0,t)}}setPriceRangeInPrice(e){if(this.isPercentage()||this.isIndexedTo100())return;const t=this.isInverted(),i=t?this.bottomMargin():this.topMargin(),s=t?this.topMargin():this.bottomMargin(),r=this.isLog();let n=r?(0,c.toLog)(e.from,this._logFormula):e.from,o=r?(0,c.toLog)(e.to,this._logFormula):e.to;const a=o-n;n+=s*a,o-=i*a,this.setMode({autoScale:!1}),this.setPriceRange(new l.PriceRange(n,o)),this._marksCache=null,this._onMarksChanged.fire()}hasMainSeries(){return this._hasSeries}getStudies(){return this.dataSources().filter(_.isStudy)}lastSourceRemoved(){return this._lastSourceRemoved}sourcesForAutoscale(){return this._mainSource&&this._scaleSeriesOnly!==this._scalesProperties.childs().scaleSeriesOnly.value()&&(this._sourcesForAutoscale=null),this._sourcesForAutoscale||(this._sourcesForAutoscale=this._recalculateSourcesForAutoscale()),this._sourcesForAutoscale}recalculatePriceRange(e){this._invalidatedForRange={visibleBars:e,isValid:!1}}internalHeightChanged(){return this._internalHeightChanged}orderedSources(){if(this._cachedOrderedSoruces)return this._cachedOrderedSoruces;let e=this.m_dataSources.slice();return e=(0,v.sortSources)(e),this._cachedOrderedSoruces=e,this._cachedOrderedSoruces}invalidateSourcesCache(){this._cachedOrderedSoruces=null,this._sourcesToUpdateViews=null}startScale(e){var t,i;this.isEmpty()||this.isPercentage()||this.isIndexedTo100()||null!==this._scaleStartPoint||null!==this._priceRangeSnapshot||(this._scaleStartPoint=this.m_height-e,this._priceRangeSnapshot=null!==(i=null===(t=this.priceRange())||void 0===t?void 0:t.clone())&&void 0!==i?i:null)}scaleTo(e){if(this.isPercentage()||this.isIndexedTo100()||null===this._scaleStartPoint)return;this.setMode({autoScale:!1}),(e=this.m_height-e)<0&&(e=0);let t=(this._scaleStartPoint+.2*(this.m_height-1))/(e+.2*(this.m_height-1));const i=(0,s.ensureNotNull)(this._priceRangeSnapshot).clone();t=Math.max(t,.1),i.scaleAroundCenter(t),this.setPriceRange(i)}endScale(){this.isPercentage()||this.isIndexedTo100()||null!==this._scaleStartPoint&&(this._scaleStartPoint=null,this._priceRangeSnapshot=null)}startTwoPointsScale(e,t){if(this.isEmpty()||this.isPercentage()||this.isIndexedTo100()||null!==this._twoPointsScaleStartPosition)return;const i=Math.min(e,t),s=Math.max(e,t);this._twoPointsScaleStartPosition={topLogical:this._coordinateToLogical(i),bottomLogical:this._coordinateToLogical(s)}}twoPointsScale(e,t){if(this.isPercentage()||this.isIndexedTo100()||null===this._twoPointsScaleStartPosition)return;this.setMode({autoScale:!1}) ;const i=Math.min(e,t),s=Math.max(e,t),{topLogical:r,bottomLogical:n}=this._twoPointsScaleStartPosition,o=this.bottomPixelMargin(),a=this.internalHeight()-1,c=(this._invertedCoordinate(i)-o)/a,h=(n-r)/((this._invertedCoordinate(s)-o)/a-c),d=r-h*c,u=d+h;this.setPriceRange(new l.PriceRange(this.priceToLogical(d),this.priceToLogical(u)))}endTwoPointsScale(){this._twoPointsScaleStartPosition=null}startScroll(e){var t,i;this.isAutoScale()||null===this._scrollStartPoint&&null===this._priceRangeSnapshot&&(this.isEmpty()||(this._scrollStartPoint=e,this._priceRangeSnapshot=null!==(i=null===(t=this.priceRange())||void 0===t?void 0:t.clone())&&void 0!==i?i:null))}scrollTo(e){if(this.isAutoScale())return;if(null===this._scrollStartPoint||null===this._priceRangeSnapshot)return;const t=this.priceRange();if(null===t)return;let i=e-this._scrollStartPoint;this.isInverted()&&(i*=-1);const s=i*(t.length()/(this.internalHeight()-1)),r=this._priceRangeSnapshot.clone();r.shift(s),this.setPriceRange(r,!0),this._marksCache=null}endScroll(){this.isAutoScale()||null!==this._scrollStartPoint&&(this._scrollStartPoint=null,this._priceRangeSnapshot=null)}_recalculateSourcesForAutoscale(){this._mainSource&&(this._scaleSeriesOnly=this._scalesProperties.childs().scaleSeriesOnly.value());const e=this._scaleSeriesOnly&&this._hasSeries;return this.m_dataSources.filter((t=>!!(t.properties().visible.value()||t instanceof h.Series)&&(e?t instanceof h.Series:(0,_.isStudy)(t)?!t.isSourceHidden()&&t.isIncludedInAutoScale():t.isIncludedInAutoScale())))}_updateAutoScaleDisabledProperty(e){const t=this._properties.childs(),i=t.indexedTo100.value()||t.percentage.value()||t.lockScale.value();e?t.autoScaleDisabled.setValueSilently(i):t.autoScaleDisabled.setValue(i)}_setAutoScaleValueWithDependentProperties(e){const t=this._properties.childs();t.autoScale.setValueSilently(e),e&&(t.percentage.setValueSilently(!1),t.indexedTo100.setValueSilently(!1),t.lockScale.setValueSilently(!1),t.logDisabled.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)}_setLockScaleValueWithDependentProperties(e){const t=this._properties.childs();t.lockScale.setValueSilently(e),e&&(t.autoScale.setValueSilently(!1),t.percentage.setValueSilently(!1),t.indexedTo100.setValueSilently(!1),t.log.setValueSilently(!1)),t.percentageDisabled.setValueSilently(e),t.logDisabled.setValueSilently(e),this._updateAutoScaleDisabledProperty(!0)}_setPercentageValueWithDependentProperties(e){const t=this._properties.childs();t.percentage.setValueSilently(e),e&&(t.autoScale.setValueSilently(!0),t.log.setValueSilently(!1),t.lockScale.setValueSilently(!1),t.indexedTo100.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)}_setIndexedTo100ValueWithDependentProperties(e){const t=this._properties.childs();t.indexedTo100.setValueSilently(e),e&&(t.autoScale.setValueSilently(!0),t.log.setValueSilently(!1),t.lockScale.setValueSilently(!1),t.percentage.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)}_setLogValueWithDependentProperties(e){const t=this._properties.childs() ;t.log.setValueSilently(e),e&&(t.lockScale.setValueSilently(!1),t.percentage.setValueSilently(!1),t.indexedTo100.setValueSilently(!1)),this._updateAutoScaleDisabledProperty(!0)}_recalculatePriceRangeImpl(){const e=this._invalidatedForRange.visibleBars;if(null===e)return;let t=null;const i=this.sourcesForAutoscale(),s=this.isPercentage(),r=this.isIndexedTo100();let n=0,o=0;for(const a of i){if(!a.properties().visible.value())continue;const i=a.firstValue();if(null===i||s&&0===i)continue;const l=e.firstBar(),h=e.lastBar(),d=a.autoScaleInfo(l,h);let u=d.range;u&&(s?u=(0,c.toPercentRange)(u,i):r&&(u=(0,c.toIndexedTo100Range)(u,i)),t=null===t?u:t.merge(u)),void 0!==d.topPixelMargin&&(n=Math.max(n,d.topPixelMargin)),void 0!==d.bottomPixelMargin&&(o=Math.max(o,d.bottomPixelMargin))}if((Math.abs(n-this._topPixelMargin)>0||Math.abs(o-this._bottomPixelMargin)>0)&&(this._bottomPixelMargin=o,this._topPixelMargin=n,this._marksCache=null,this._invalidateInternalHeightCache()),t){if(t.minValue()===t.maxValue()&&(t=new l.PriceRange(t.minValue()-.5,t.maxValue()+.5)),this.isLog()){const e=this._convertPriceRangeFromLog(t),i=(0,c.logFormulaForPriceRange)(e);if(!(0,c.logFormulasAreSame)(i,this._logFormula)){const s=this._priceRangeSnapshot?this._convertPriceRangeFromLog(this._priceRangeSnapshot):null;this._logFormula=i,t=this._convertPriceRangeToLog(e),s&&(this._priceRangeSnapshot=this._convertPriceRangeToLog(s))}}this.setPriceRange(t)}else this.m_priceRange||(this.setPriceRange(new l.PriceRange(-.5,.5)),this._logFormula=(0,c.logFormulaForPriceRange)(null));this._invalidatedForRange.isValid=!0;const a=this.mainSource();null!==a&&this._recalculatePriceRangeOnce&&(this._recalculatePriceRangeOnce=!a.priceRangeReady())}_makeSureItIsValid(){this._invalidatedForRange.isValid||(this._invalidatedForRange.isValid=!0,this._recalculatePriceRangeImpl())}_invalidateInternalHeightCache(){this._internalHeightCache=null,this._internalHeightChanged.fire()}_coordinateToLogical(e){if(this._makeSureItIsValid(),this.isEmpty())return 0;const t=this._invertedCoordinate(e),i=(0,s.ensureNotNull)(this.priceRange()),r=i.minValue()+(i.maxValue()-i.minValue())*((t-this.bottomPixelMargin())/(this.internalHeight()-1));return this.logicalToPrice(r)}_logicalToCoordinate(e){if(this._makeSureItIsValid(),this.isEmpty())return 0;e=this.priceToLogical(e);const t=(0,s.ensureNotNull)(this.priceRange()),i=this.bottomPixelMargin()+(this.internalHeight()-1)*(e-t.minValue())/(t.maxValue()-t.minValue());return this._invertedCoordinate(i)}_dropScaleCache(){this._sourcesForAutoscale=null,this._currencyCache=null,this._unitCache=null,this._measureUnitIdCache=null}_invertedCoordinate(e){return this.isInverted()?e:this.height()-1-e}_initScaleProperties(){const e=this.isLockScale(),t=this.properties().childs();e&&(t.percentage.setValue(!1),t.indexedTo100.setValue(!1),t.log.setValue(!1),t.autoScale.setValue(!1)),t.percentageDisabled.setValue(e),t.logDisabled.setValue(e),this._updateAutoScaleDisabledProperty(!1),t.percentage.value()&&(t.log.setValue(!1),t.indexedTo100.setValue(!1)), t.indexedTo100.value()&&(t.log.setValue(!1),t.percentage.setValue(!1))}_correctedMargins(){if(null===this._correctedMarginsCache){const e=this.mainSource();this._correctedMarginsCache=null!==e?e.correctScaleMargins(this._margins):this._margins}return this._correctedMarginsCache}_getSourcesToUpdateViews(){return this._sourcesToUpdateViews||(this._sourcesToUpdateViews=this.m_dataSources.filter((e=>!(0,w.isLineTool)(e)||e.isActualSymbol()&&e.isActualCurrency()))),this._sourcesToUpdateViews}_mainSourceFormatter(){const e=this.mainSource();return(null==e?void 0:e.formatter())||I}_priceToPercentOrIndexedTo100IfNeeded(e,t){return this.isPercentage()?(0,c.toPercent)(e,t):this.isIndexedTo100()?(0,c.toIndexedTo100)(e,t):e}_onSourceIsActingAsSymbolSourceChanged(){this._dropScaleCache()}}},99846:(e,t,i)=>{"use strict";var s;i.d(t,{PriceAxisLastValueMode:()=>s}),function(e){e[e.LastPriceAndPercentageValue=0]="LastPriceAndPercentageValue",e[e.LastValueAccordingToScale=1]="LastValueAccordingToScale"}(s||(s={}))},1194:(e,t,i)=>{"use strict";i.r(t),i.d(t,{fromPercent:()=>o,toPercent:()=>a,toPercentRange:()=>l,fromIndexedTo100:()=>c,toIndexedTo100:()=>h,toIndexedTo100Range:()=>d,toLog:()=>u,fromLog:()=>p,logFormulaForPriceRange:()=>_,logFormulasAreSame:()=>m,getCurrentModePriceText:()=>g,getOppositeModePriceText:()=>f});var s=i(23304),r=i(91031);const n={logicalOffset:4,coordOffset:1e-4};function o(e,t){return t<0&&(e=-e),e/100*t+t}function a(e,t){const i=100*(e-t)/(t||1);return t<0?-i:i}function l(e,t){const i=a(e.minValue(),t),r=a(e.maxValue(),t);return new s.PriceRange(i,r)}function c(e,t){return t<0&&(e=-e),(e-=100)/100*t+t}function h(e,t){const i=100*(e-t)/t+100;return t<0?-i:i}function d(e,t){const i=h(e.minValue(),t),r=h(e.maxValue(),t);return new s.PriceRange(i,r)}function u(e,t){const i=Math.abs(e);if(i<1e-25)return 0;const s=(0,r.log10)(i+t.coordOffset)+t.logicalOffset;return e<0?-s:s}function p(e,t){const i=Math.abs(e);if(i<1e-15)return 0;const s=Math.pow(10,i-t.logicalOffset)-t.coordOffset;return e<0?-s:s}function _(e){if(null===e)return n;const t=Math.abs(e.maxValue()-e.minValue());if(t>=1||t<1e-15)return n;const i=Math.ceil(Math.abs(Math.log10(t))),s=n.logicalOffset+i;return{logicalOffset:s,coordOffset:1/Math.pow(10,s)}}function m(e,t){return e.logicalOffset===t.logicalOffset&&e.coordOffset===t.coordOffset}function g(e,t){return e.isPercentage()?t.formattedPricePercentage:e.isIndexedTo100()?t.formattedPriceIndexedTo100:t.formattedPriceAbsolute}function f(e,t){return e.isPercentage()||e.isIndexedTo100()?t.formattedPriceAbsolute:t.formattedPricePercentage}},23304:(e,t,i)=>{"use strict";i.r(t),i.d(t,{PriceRange:()=>n});var s=i(65665);const r=(0,i(98351).getLogger)("Chart.PriceRange");class n{constructor(e,t){if(null!==e&&"object"==typeof e){const t=e;this._minValue=t.m_minValue,this._maxValue=t.m_maxValue}else{const i=e;this._minValue=i,void 0!==t&&(this._maxValue=t)}}equals(e){return this._minValue===e._minValue&&this._maxValue===e._maxValue}clone(){return new n(this._minValue,this._maxValue)}minValue(){ return this._minValue}setMinValue(e){this._minValue=e}maxValue(){return this._maxValue}setMaxValue(e){this._maxValue=e}length(){return this._maxValue-this._minValue}isEmpty(){return this._maxValue===this._minValue||this._maxValue!=this._maxValue||this._minValue!=this._minValue}serialize(){return{m_maxValue:this._maxValue,m_minValue:this._minValue}}state(){return{max:this._maxValue,min:this._minValue}}merge(e){return new n(Math.min(this.minValue(),e.minValue()),Math.max(this.maxValue(),e.maxValue()))}apply(e,t){this._minValue=Math.min(this._minValue,e),this._maxValue=Math.max(this._maxValue,t)}set(e,t){this._minValue=e,this._maxValue=t}scaleAroundCenter(e){if(!(0,s.isNumber)(e))return void r.logDebug("PriceRange.scaleAroundCenter: invalid coeff");if(0===this._maxValue-this._minValue)return;const t=.5*(this._maxValue+this._minValue);let i=this._maxValue-t,n=this._minValue-t;i*=e,n*=e,this._maxValue=t+i,this._minValue=t+n}shift(e){(0,s.isNumber)(e)?(this._maxValue+=e,this._minValue+=e):r.logDebug("PriceRange.shift: invalid coeff")}containsStrictly(e){return e.minValue()>this._minValue&&e.maxValue(){"use strict";var s=i(26867),r=i(42961).PriceScaleBase,n=i(23304).PriceRange,o=i(68671).randomHash,a=i(1194),l=a.fromLog,c=a.toLog;class h extends r{constructor(e,t){super(t),this._scalesProperties=e;var i=this;this._modeChanged=new s,this._properties.isInverted.listeners().subscribe(this,h.prototype._onIsInvertedChanged),this._properties.listeners().subscribe(null,(function(){if(i.mainSource()&&i.mainSource().model()){var e=i.mainSource().model().paneForSource(i.mainSource());i.mainSource().model().updatePane(e)}})),this._scalesProperties.listeners().subscribe(this,(function(){this._marksCache=null})),this.setId(o())}_convertPriceRangeFromLog(e){if(null===e)return null;var t=l(e.minValue(),this._logFormula),i=l(e.maxValue(),this._logFormula);return new n(t,i)}_convertPriceRangeToLog(e){if(null===e)return null;var t=c(e.minValue(),this._logFormula),i=c(e.maxValue(),this._logFormula);return new n(t,i)}_canConvertPriceRangeFromLog(e){if(null===e)return!1;var t=l(e.minValue(),this._logFormula),i=l(e.maxValue(),this._logFormula);return isFinite(t)&&isFinite(i)}mode(){return{autoScale:this._properties.autoScale.value(),lockScale:this._properties.lockScale.value(),percentage:this._properties.percentage.value(),indexedTo100:this._properties.indexedTo100.value(),log:this._properties.log.value()}}setMode(e){var t={},i=this.mode(),s=this._properties.state(),r=null;void 0!==e.autoScale&&e.autoScale!==s.autoScale&&(t.autoScale=e.autoScale,this._setAutoScaleValueWithDependentProperties(e.autoScale)),void 0!==e.lockScale&&e.lockScale!==s.lockScale&&(t.lockScale=e.lockScale,this._setLockScaleValueWithDependentProperties(e.lockScale)),void 0!==e.percentage&&e.percentage!==s.percentage&&(t.percentage=e.percentage,this._setPercentageValueWithDependentProperties(e.percentage),this._invalidatedForRange.isValid=!1), -void 0!==e.indexedTo100&&e.indexedTo100!==s.indexedTo100&&(t.indexedTo100=e.indexedTo100,this._setIndexedTo100ValueWithDependentProperties(e.indexedTo100),this._invalidatedForRange.isValid=!1),void 0!==e.log&&e.log!==s.log&&(t.log=e.log,this._setLogValueWithDependentProperties(e.log)),s.log&&!this._properties.log.value()&&(this._canConvertPriceRangeFromLog(this.m_priceRange)?null!==(r=this._convertPriceRangeFromLog(this.m_priceRange))&&this.setPriceRange(r):this.properties().autoScale.setValue(!0)),!s.log&&this._properties.log.value()&&null!==(r=this._convertPriceRangeToLog(this.m_priceRange))&&this.setPriceRange(r),s.autoScale!==this._properties.autoScale.value()&&this._properties.autoScale.listeners().fire(this._properties.autoScale),s.autoScaleDisabled!==this._properties.autoScaleDisabled.value()&&this._properties.autoScaleDisabled.listeners().fire(this._properties.autoScaleDisabled),s.lockScale!==this._properties.lockScale.value()&&this._properties.lockScale.listeners().fire(this._properties.lockScale),s.percentage!==this._properties.percentage.value()&&(this._properties.percentage.listeners().fire(this._properties.percentage),this.updateFormatter()),s.indexedTo100!==this._properties.indexedTo100.value()&&(this._properties.indexedTo100.listeners().fire(this._properties.indexedTo100),this.updateFormatter()),s.percentageDisabled!==this._properties.percentageDisabled.value()&&this._properties.percentageDisabled.listeners().fire(this._properties.percentageDisabled),s.log!==this._properties.log.value()&&this._properties.log.listeners().fire(this._properties.log),s.logDisabled!==this._properties.logDisabled.value()&&this._properties.logDisabled.listeners().fire(this._properties.logDisabled),void 0===t.log&&void 0===t.percentage&&void 0===t.lockScale&&void 0===t.autoScale&&void 0===t.indexedTo100||this._modeChanged.fire(i,this.mode())}modeChanged(){return this._modeChanged}fontSize(){return this._scalesProperties.fontSize.value()}isEmpty(){return this._makeSureItIsValid(),0===this.m_height||!this.m_priceRange||this.m_priceRange.isEmpty()}_onIsInvertedChanged(){this._marksCache=null,this._markBuilder.rebuildTickMarks()}}t.PriceScale=h},60923:(e,t,i)=>{"use strict";i.d(t,{createPrimitiveProperty:()=>n});var s=i(26220),r=i.n(s);function n(e){return new(r())(e)}},63032:(e,t,i)=>{"use strict";i.d(t,{extractAllPropertiesKeys:()=>S,factoryDefaultsForCurrentTheme:()=>b,ThemedDefaultProperty:()=>C});var s=i(58121),r=i(99094),n=i(16230),o=i(98279),a=i(38651),l=i(50151),c=i(56840),h=i(85228),d=i(45345),u=i(26843),p=i(26220),_=i.n(p),m=i(64548),g=i(26867),f=i.n(g);const v=(0,i(98351).getLogger)("ThemedDefaults");function S(e){const t=Object.keys(e),i=[];return t.forEach((t=>{const s=e[t];if((0,o.default)(s)){S(s).forEach((e=>i.push(`${t}.${e}`)))}else i.push(t)})),i}function y(e,t,i=""){const s={};return t.forEach((r=>{const n=r.split("."),a=n[0],l=e[a],c=""===i?a:`${i}.${a}`;if(e.hasOwnProperty(a))if(n.length>1){if(!(0,o.default)(l))return void v.logError(`path ${c} must be an object, but it is a primitive`);{ -const e=t.filter((e=>e.startsWith(`${a}.`))).map((e=>e.split(".").slice(1).join(".")));s[a]=y(l,e,c)}}else{if((0,o.default)(l))return void v.logError(`path ${c} must be a primitive, but it is an object`);s[a]=l}})),s}function b(e,t){var i;const r=null!==(i=d.watchedTheme.value())&&void 0!==i?i:u.StdTheme.Light,n=(0,h.deepCopy)(e);return(0,s.default)(n,(0,l.ensureDefined)(t.get(r))),n}function w(e,t){const i=(0,r.default)(e,((e,i,s)=>{if(void 0===t[s])return e;if(!(0,n.default)(i,t[s]))if((0,o.default)(i)&&(0,o.default)(t[s])){const r=w(i,t[s]);void 0!==r&&(e[s]=r)}else e[s]=i;return e}),{});return(0,a.default)(i)?void 0:i}class C extends(_()){constructor(e,t,i,r,n){super(function(e,t,i){var r;const n=t(),o=(0,h.deepCopy)(null!==(r=c.getJSON(e,null))&&void 0!==r?r:{});return(0,s.default)(n,o),(0,s.default)(n,null!=i?i:{}),n}(e,t,n)),this._applyingThemeInProcess=!1,this._restoreFactoryDefaultsEvent=new(f()),this._defaultName=e,this._defaultsSupplier=t,this._notThemedDefaultsKeys=i,this._themedDefaultsKeys=r}restoreFactoryDefaults(){const e=this._defaultsSupplier();this.mergeAndFire(e),this.saveDefaults(),this._restoreFactoryDefaultsEvent.fire()}addExclusion(){}preferences(){const e=this._allKeys();return y(this.state(),e)}mergePreferences(e){const t=this._allKeys();this.mergeAndFire(y(e,t))}childChanged(e){super.childChanged(e),this._applyingThemeInProcess||this.saveDefaults()}saveDefaults(){const e=this.state(),t=this._defaultsSupplier();let i=w(y(e,this._notThemedDefaultsKeys),y(t,this._notThemedDefaultsKeys));const r=y(t,this._themedDefaultsKeys),n=y(e,this._themedDefaultsKeys),o=w(n,r);(0,a.default)(o)||(i=null!=i?i:{},(0,s.default)(i,n)),(0,m.saveDefaults)(this._defaultName,i)}_allKeys(){return[...this._themedDefaultsKeys,...this._notThemedDefaultsKeys]}}},84912:(e,t,i)=>{"use strict";i.d(t,{convertPropertyToWatchedValue:()=>n});var s=i(40549),r=i.n(s);function n(e){const t=new(r())(e.value());let i=!1;e.subscribe(t,(()=>{i||(i=!0,t.setValue(e.value()),i=!1)}));const s=()=>{i||(i=!0,e.setValue(t.value()),i=!1)};return t.subscribe(s),t.spawn((()=>{e.unsubscribeAll(t),t.unsubscribe(s)}))}},52865:(e,t,i)=>{"use strict";i.d(t,{combineProperty:()=>o,createWVFromGetterAndSubscription:()=>s.createWVFromGetterAndSubscription,createWVFromProperty:()=>r});var s=i(52994);i(65407);function r(e){return(0,s.createWVFromGetterAndSubscription)((()=>e.value()),e)}var n=i(60923);function o(e,...t){const i=()=>e(...t.map((e=>e.value()))),s=(0,n.createPrimitiveProperty)(i()),r=()=>s.setValue(i()),o={};for(const e of t)e.subscribe(o,r);return s.destroy=()=>{t.forEach((e=>e.unsubscribeAll(o)))},s}},52994:(e,t,i)=>{"use strict";i.d(t,{createWVFromGetterAndSubscription:()=>n});var s=i(40549),r=i.n(s);function n(e,t){const i=new(r())(e()),s={};t.subscribe(s,(()=>{i.setValue(e())}));return i.readonly().spawn((()=>t.unsubscribeAll(s)))}},65407:(e,t,i)=>{"use strict";i.d(t,{createWVFromGetterAndSubscriptions:()=>n});var s=i(40549),r=i.n(s);function n(e,t){const i=new(r())(e()),s={};t.forEach((t=>t.subscribe(s,(()=>{i.setValue(e())})))) +void 0!==e.indexedTo100&&e.indexedTo100!==s.indexedTo100&&(t.indexedTo100=e.indexedTo100,this._setIndexedTo100ValueWithDependentProperties(e.indexedTo100),this._invalidatedForRange.isValid=!1),void 0!==e.log&&e.log!==s.log&&(t.log=e.log,this._setLogValueWithDependentProperties(e.log)),s.log&&!this._properties.log.value()&&(this._canConvertPriceRangeFromLog(this.m_priceRange)?null!==(r=this._convertPriceRangeFromLog(this.m_priceRange))&&this.setPriceRange(r):this.properties().autoScale.setValue(!0)),!s.log&&this._properties.log.value()&&null!==(r=this._convertPriceRangeToLog(this.m_priceRange))&&this.setPriceRange(r),s.autoScale!==this._properties.autoScale.value()&&this._properties.autoScale.listeners().fire(this._properties.autoScale),s.autoScaleDisabled!==this._properties.autoScaleDisabled.value()&&this._properties.autoScaleDisabled.listeners().fire(this._properties.autoScaleDisabled),s.lockScale!==this._properties.lockScale.value()&&this._properties.lockScale.listeners().fire(this._properties.lockScale),s.percentage!==this._properties.percentage.value()&&(this._properties.percentage.listeners().fire(this._properties.percentage),this.updateFormatter()),s.indexedTo100!==this._properties.indexedTo100.value()&&(this._properties.indexedTo100.listeners().fire(this._properties.indexedTo100),this.updateFormatter()),s.percentageDisabled!==this._properties.percentageDisabled.value()&&this._properties.percentageDisabled.listeners().fire(this._properties.percentageDisabled),s.log!==this._properties.log.value()&&this._properties.log.listeners().fire(this._properties.log),s.logDisabled!==this._properties.logDisabled.value()&&this._properties.logDisabled.listeners().fire(this._properties.logDisabled),void 0===t.log&&void 0===t.percentage&&void 0===t.lockScale&&void 0===t.autoScale&&void 0===t.indexedTo100||this._modeChanged.fire(i,this.mode())}modeChanged(){return this._modeChanged}fontSize(){return this._scalesProperties.fontSize.value()}isEmpty(){return this._makeSureItIsValid(),0===this.m_height||!this.m_priceRange||this.m_priceRange.isEmpty()}_onIsInvertedChanged(){this._marksCache=null,this._markBuilder.rebuildTickMarks()}}t.PriceScale=h},60923:(e,t,i)=>{"use strict";i.d(t,{createPrimitiveProperty:()=>n});var s=i(26220),r=i.n(s);function n(e){return new(r())(e)}},63032:(e,t,i)=>{"use strict";i.d(t,{extractAllPropertiesKeys:()=>S,factoryDefaultsForCurrentTheme:()=>b,ThemedDefaultProperty:()=>P});var s=i(58121),r=i(99094),n=i(16230),o=i(98279),a=i(38651),l=i(50151),c=i(56840),h=i(85228),d=i(45345),u=i(26843),p=i(26220),_=i.n(p),m=i(64548),g=i(26867),f=i.n(g);const v=(0,i(98351).getLogger)("ThemedDefaults");function S(e){const t=Object.keys(e),i=[];return t.forEach((t=>{const s=e[t];if((0,o.default)(s)){S(s).forEach((e=>i.push(`${t}.${e}`)))}else i.push(t)})),i}function y(e,t,i=""){const s={};return t.forEach((r=>{const n=r.split("."),a=n[0],l=e[a],c=""===i?a:`${i}.${a}`;if(e.hasOwnProperty(a))if(n.length>1){if(!(0,o.default)(l))return void v.logError(`path ${c} must be an object, but it is a primitive`);{ +const e=t.filter((e=>e.startsWith(`${a}.`))).map((e=>e.split(".").slice(1).join(".")));s[a]=y(l,e,c)}}else{if((0,o.default)(l))return void v.logError(`path ${c} must be a primitive, but it is an object`);s[a]=l}})),s}function b(e,t){var i;const r=null!==(i=d.watchedTheme.value())&&void 0!==i?i:u.StdTheme.Light,n=(0,h.deepCopy)(e);return(0,s.default)(n,(0,l.ensureDefined)(t.get(r))),n}function w(e,t){const i=(0,r.default)(e,((e,i,s)=>{if(void 0===t[s])return e;if(!(0,n.default)(i,t[s]))if((0,o.default)(i)&&(0,o.default)(t[s])){const r=w(i,t[s]);void 0!==r&&(e[s]=r)}else e[s]=i;return e}),{});return(0,a.default)(i)?void 0:i}class P extends(_()){constructor(e,t,i,r,n){super(function(e,t,i){var r;const n=t(),o=(0,h.deepCopy)(null!==(r=c.getJSON(e,null))&&void 0!==r?r:{});return(0,s.default)(n,o),(0,s.default)(n,null!=i?i:{}),n}(e,t,n)),this._applyingThemeInProcess=!1,this._restoreFactoryDefaultsEvent=new(f()),this._defaultName=e,this._defaultsSupplier=t,this._notThemedDefaultsKeys=i,this._themedDefaultsKeys=r}restoreFactoryDefaults(){const e=this._defaultsSupplier();this.mergeAndFire(e),this.saveDefaults(),this._restoreFactoryDefaultsEvent.fire()}addExclusion(){}preferences(){const e=this._allKeys();return y(this.state(),e)}mergePreferences(e){const t=this._allKeys();this.mergeAndFire(y(e,t))}childChanged(e){super.childChanged(e),this._applyingThemeInProcess||this.saveDefaults()}saveDefaults(){const e=this.state(),t=this._defaultsSupplier();let i=w(y(e,this._notThemedDefaultsKeys),y(t,this._notThemedDefaultsKeys));const r=y(t,this._themedDefaultsKeys),n=y(e,this._themedDefaultsKeys),o=w(n,r);(0,a.default)(o)||(i=null!=i?i:{},(0,s.default)(i,n)),(0,m.saveDefaults)(this._defaultName,i)}_allKeys(){return[...this._themedDefaultsKeys,...this._notThemedDefaultsKeys]}}},84912:(e,t,i)=>{"use strict";i.d(t,{convertPropertyToWatchedValue:()=>n});var s=i(40549),r=i.n(s);function n(e){const t=new(r())(e.value());let i=!1;e.subscribe(t,(()=>{i||(i=!0,t.setValue(e.value()),i=!1)}));const s=()=>{i||(i=!0,e.setValue(t.value()),i=!1)};return t.subscribe(s),t.spawn((()=>{e.unsubscribeAll(t),t.unsubscribe(s)}))}},52865:(e,t,i)=>{"use strict";i.d(t,{combineProperty:()=>o,createWVFromGetterAndSubscription:()=>s.createWVFromGetterAndSubscription,createWVFromProperty:()=>r});var s=i(52994);i(65407);function r(e){return(0,s.createWVFromGetterAndSubscription)((()=>e.value()),e)}var n=i(60923);function o(e,...t){const i=()=>e(...t.map((e=>e.value()))),s=(0,n.createPrimitiveProperty)(i()),r=()=>s.setValue(i()),o={};for(const e of t)e.subscribe(o,r);return s.destroy=()=>{t.forEach((e=>e.unsubscribeAll(o)))},s}},52994:(e,t,i)=>{"use strict";i.d(t,{createWVFromGetterAndSubscription:()=>n});var s=i(40549),r=i.n(s);function n(e,t){const i=new(r())(e()),s={};t.subscribe(s,(()=>{i.setValue(e())}));return i.readonly().spawn((()=>t.unsubscribeAll(s)))}},65407:(e,t,i)=>{"use strict";i.d(t,{createWVFromGetterAndSubscriptions:()=>n});var s=i(40549),r=i.n(s);function n(e,t){const i=new(r())(e()),s={};t.forEach((t=>t.subscribe(s,(()=>{i.setValue(e())})))) ;return i.readonly().spawn((()=>t.forEach((e=>e.unsubscribeAll(s)))))}},26220:(e,t,i)=>{"use strict";var s=i(26867),r=i(65665).isFunction;function n(e){if(this._listeners=new s,this._childs=[],this._muteChildChanges=!1,void 0!==e)if(this.isPrimitiveType(e))this._value=e;else for(var t in e)this.addProperty(t,e[t])}n.prototype.merge=function(e,t){var i=null;if(t)var s=(i=[]).length;if(void 0===e)return i;if(this.isPrimitiveType(e))return t&&this._value!==e&&i.push(this),this._value=e,i;if(Array.isArray(e))for(var r=0;rs&&i.push(this),i},n.prototype.mergeAndFire=function(e){var t=this.merge(e,!0);this._muteChildChanges=!0,t.forEach((function(e){e._muteChildChanges=!0})),t.forEach((function(e){e._muteChildChanges=!1,e.listeners().fire(e)})),this._muteChildChanges=!1,t.length>0&&this.listeners().fire(this)},n.prototype.state=function(e){var t=r(this.value)?this.value():void 0;void 0===t&&(t={});for(var i=0;i=0},n.prototype.addChild=function(e,t){this[e]&&this[e].unsubscribe(this,this.childChanged),this[e]=t,-1===this._childs.indexOf(e)&&this._childs.push(e),t.subscribe(this,this.childChanged)},n.prototype.childChanged=function(e,t){this._muteChildChanges||this.listeners().fire(this)},n.prototype.subscribe=function(e,t){this.listeners().subscribe(e,t,!1)},n.prototype.unsubscribe=function(e,t){this.listeners().unsubscribe(e,t)},n.prototype.unsubscribeAll=function(e){this.listeners().unsubscribeAll(e)},n.prototype.childs=function(){return this},e.exports=n},54168:(e,t,i)=>{ -"use strict";i.d(t,{QuotesProvider:()=>a});var s=i(36776),r=i(26867),n=i.n(r),o=i(68671);class a{constructor(e="full"){this._quotes=null,this._quoteSessionSymbol=null,this._quoteSessionClientId="",this._pausedQuoteSessionSymbol=null,this._quotesUpdate=new(n()),this._quoteSymbolChanged=new(n()),this._multiplexerType=e}setQuotesSessionSymbol(e){this._quoteSessionSymbol!==e&&(this._pausedQuoteSessionSymbol=null,this._quoteSessionClientId||(this._quoteSessionClientId="series-"+(0,o.guid)()),this._unsubscribeQuoteSession(),e&&this._subscribeQuoteSession(e),this._quoteSymbolChanged.fire())}quotesUpdate(){return this._quotesUpdate}quoteSymbolChanged(){return this._quoteSymbolChanged}quotes(){return this._quotes}isPaused(){return null!==this._pausedQuoteSessionSymbol}pause(){null===this._pausedQuoteSessionSymbol&&(this._pausedQuoteSessionSymbol=this._quoteSessionSymbol,this._unsubscribeQuoteSession())}resume(){null!==this._pausedQuoteSessionSymbol&&(this._subscribeQuoteSession(this._pausedQuoteSessionSymbol),this._pausedQuoteSessionSymbol=null)}destroy(){this._unsubscribeQuoteSession()}_onUpdate(e,t){this._quotes=e&&e.values||null,t&&t.values&&this._quotesUpdate.fire(e,t)}_subscribeQuoteSession(e){this._quoteSessionSymbol=e,(0,s.getQuoteSessionInstance)(this._multiplexerType).subscribe(this._quoteSessionClientId,this._quoteSessionSymbol,this._onUpdate.bind(this))}_unsubscribeQuoteSession(){this._quoteSessionSymbol&&((0,s.getQuoteSessionInstance)(this._multiplexerType).unsubscribe(this._quoteSessionClientId,this._quoteSessionSymbol),this._quoteSessionSymbol=null,this._quotes=null)}}},92133:(e,t,i)=>{"use strict";i.r(t),i.d(t,{normalizeIntervalString:()=>_,isAvailable:()=>m,setLastUsedResolution:()=>g,getRangeResolution:()=>f,getTimeBasedResolution:()=>v,getDefaultResolution:()=>S,getResolutionByChartStyle:()=>y,getApplicableIntervalForFrequency:()=>b,getServerInterval:()=>w,isResolutionMultiplierValid:()=>C,getMaxResolutionValue:()=>T,getResolutionsFromSettings:()=>x,convertResolutionsFromSettings:()=>I,mergeResolutions:()=>M,sortResolutions:()=>A,compareResolutions:()=>k,getCustomResolutions:()=>E,getTranslatedResolution:()=>D,getTranslatedResolutionModel:()=>V,isSecondsEnabled:()=>R,isTicksEnabled:()=>N,isIntervalEnabled:()=>O,parseIntervalValue:()=>F,intervalIsSupported:()=>W});var s=i(44352),r=i(578),n=i(1930),o=i(56840),a=i(82992),l=i(21095),c=i(65665),h=i(2484);const d={[r.ResolutionKind.Ticks]:1,[r.ResolutionKind.Seconds]:60,[r.ResolutionKind.Minutes]:1440,[r.SpecialResolutionKind.Hours]:24,[r.ResolutionKind.Days]:365,[r.ResolutionKind.Weeks]:52,[r.ResolutionKind.Months]:12,[r.ResolutionKind.Range]:1e6,[r.ResolutionKind.Invalid]:NaN},u={[r.ResolutionKind.Ticks]:0,[r.ResolutionKind.Seconds]:1,[r.ResolutionKind.Minutes]:2,[r.SpecialResolutionKind.Hours]:3,[r.ResolutionKind.Days]:4,[r.ResolutionKind.Weeks]:5,[r.ResolutionKind.Months]:6,[r.ResolutionKind.Range]:7,[r.ResolutionKind.Invalid]:8},p={[r.ResolutionKind.Invalid]:"",[r.ResolutionKind.Ticks]:s.t(null,{context:"interval_short"},i(59231)), -[r.ResolutionKind.Seconds]:s.t(null,{context:"interval_short"},i(2949)),[r.ResolutionKind.Minutes]:s.t(null,{context:"interval_short"},i(6791)),[r.SpecialResolutionKind.Hours]:s.t(null,{context:"interval_short"},i(13994)),[r.ResolutionKind.Days]:s.t(null,{context:"interval_short"},i(13395)),[r.ResolutionKind.Weeks]:s.t(null,{context:"interval_short"},i(85521)),[r.ResolutionKind.Months]:s.t(null,{context:"interval_short"},i(37720)),[r.ResolutionKind.Range]:s.t(null,{context:"interval_short"},i(69838))};function _(e){return r.Interval.parse(e).value()}function m(e){const t=r.Interval.parse(e);if(!R()&&t.isSeconds())return!1;if(!N()&&t.isTicks())return!1;const i=t.value(),s=a.linking.dataFrequencyResolution.value();if(void 0!==s&&k(i,s)<0)return!1;const n=a.linking.supportedResolutions.value();return void 0!==n?void 0!==n.find((e=>_(e)===i)):t.isSeconds()?Boolean(a.linking.seconds.value()):t.isTicks()?Boolean(a.linking.ticks.value()):t.isIntraday()?Boolean(a.linking.intraday.value()):t.isDWM()}function g(e){r.Interval.isValid(e)&&(r.Interval.isRange(e)?o.setValue("chart.lastUsedRangeResolution",e):o.setValue("chart.lastUsedTimeBasedResolution",e))}function f(e){const t=o.getValue("chart.lastUsedRangeResolution");if(void 0!==t&&r.Interval.isRange(t))return t;let i="100R";for(const t of e){const e=r.Interval.parse(t);if(e.isRange()){const t=e.value();if("100R"===t)return t;i=t}}return i}function v(e){const t=o.getValue("chart.lastUsedTimeBasedResolution");if(void 0!==t&&r.Interval.isTimeBased(t))return t;let i="1D";for(const t of e){const e=r.Interval.parse(t);if(e.isTimeBased()){const t=e.value();if("1D"===t)return t;i=t}}return i}function S(e){return e?"100R":"1D"}function y(e,t,i){const s=n.isRangeStyle(e),o=r.Interval.isRange(t);return!s&&o?v(i):s&&!o?f(i):t}function b(e,t){return k(t,e)>=0?t:e}function w(e){return r.Interval.isRange(e)?"1":e}function C(e){const{interval:t,guiResolutionKind:i}=r.Interval.parseExt(e);if(!t.isValid())return!1;return(i===r.SpecialResolutionKind.Hours?t.multiplier()/60:t.multiplier())<=P(i)}function P(e){const t=d[e];return Number.isNaN(t)?1:t}function T(e){return P(r.Interval.parseExt(e).guiResolutionKind)}function x(e){const t=I(o.getJSON(e,[]));return(0,l.uniq)(t.filter(C).map(_))}function I(e){return Array.isArray(e)?e:Object.keys(e).map(r.Interval.normalize).filter(c.notNull)}function M(...e){let t=[].concat(...e);return t=(0,l.uniq)(t.filter(C).map(_)),A(t)}function A(e){return e.sort(k)}function L(e){const t=r.Interval.parse(e),i=t.multiplier()||1;return t.isMinuteHours()?[r.SpecialResolutionKind.Hours,i/60]:[t.kind(),i]}function k(e,t){if(e===t)return 0;const[i,s]=L(e),[r,n]=L(t);return i!==r?u[i]-u[r]:s-n}function E(){return[]}function D(e){const{multiplier:t,shortKind:i}=V(e);return`${t}${i}`}function V(e,t){const i=r.Interval.parse(e);let s=i.multiplier(),n=i.kind();if(!i.isValid()){if(t)return null;throw new TypeError("Can't translate invalid interval")}return i.isMinuteHours()&&(s=Math.floor(s/60),n=r.SpecialResolutionKind.Hours),{multiplier:s.toString(),shortKind:B(n), -hint:`${s} ${B(n,s)}`,mayOmitMultiplier:i.isDWM()&&1===s,mayOmitShortKind:i.isMinutes()&&!i.isMinuteHours()}}function B(e,t){if(!t)return p[e];switch(e){case r.ResolutionKind.Ticks:return s.t(null,{plural:"ticks",count:t},i(99136));case r.ResolutionKind.Days:return s.t(null,{plural:"days",count:t},i(30572));case r.ResolutionKind.Weeks:return s.t(null,{plural:"weeks",count:t},i(47966));case r.ResolutionKind.Months:return s.t(null,{plural:"months",count:t},i(99062));case r.ResolutionKind.Seconds:return s.t(null,{plural:"seconds",count:t},i(71787));case r.ResolutionKind.Minutes:return s.t(null,{plural:"minutes",count:t},i(69143));case r.SpecialResolutionKind.Hours:return s.t(null,{plural:"hours",count:t},i(52254));case r.ResolutionKind.Range:return s.t(null,{plural:"ranges",count:t},i(82797));default:return e}}function R(){return h.enabled("seconds_resolution")}function N(){return h.enabled("tick_resolution")}function O(e){{const t=r.Interval.parse(e);if(!R()&&t.isSeconds())return!1;if(!N()&&t.isTicks())return!1}return!0}function F(e){let t;t=/^[,\s]*(^[1-9][0-9]*)?\s*([hdwmst]?)\s*$/i;const i=t.exec(e)||[],s=~~i[1],r=i[2]&&i[2].toUpperCase()||null,n={qty:!s&&r?1:s,unit:r};return n.error=!s&&!r,n.intraday=!(n.error||n.unit&&"H"!==n.unit&&"S"!==n.unit&&"T"!==n.unit),n.range="R"===n.unit,n}function W(e){if(h.enabled("allow_supported_resolutions_set_only")){const t=r.Interval.normalize(e);return null!==t&&m(t)}{const t=F(e);if(t.error)return!1;if(!h.enabled("custom_resolutions")){const t=r.Interval.normalize(e),i=window.ChartApiInstance.defaultResolutions().filter(O);if(!t||-1===i.indexOf(t))return!1}const i=a.linking.dataFrequencyResolution.value();if(void 0!==i&&null!==t.unit&&b(i,t.unit)!==t.unit)return!1;if(t.intraday)return a.linking.intraday.value();{const e=a.linking.supportedResolutions.value();return!e||null!==t.unit&&!!~e.indexOf(t.unit)}}}},53778:(e,t,i)=>{"use strict";i.d(t,{scaleRatio:()=>r,priceRangeByScaleRatio:()=>n,barSpacingByScaleRatio:()=>o});var s=i(23304);function r(e,t){if(t.isLog()||e.isEmpty()||t.isEmpty())return null;const i=function(e){if(e.isEmpty())return null;const t=e.priceRange();if(null===t)return null;const i=t.length();return e.internalHeight()/i}(t);if(null===i)return null;return e.getValidBarSpacing()/Math.max(1e-10,i)}function n(e,t,i){if(e.isLog()||null===i||e.isEmpty())return null;const r=e.priceRange();if(null===r||r.isEmpty())return null;const n=e.internalHeight()/(t/i),o=r.length();if(n===o)return r;const a=(n-o)/2;return new s.PriceRange(r.minValue()-a,r.maxValue()+a)}function o(e,t){if(e.isLog()||null===t||e.isEmpty())return null;const i=e.priceRange();if(null===i)return null;const s=i.length();return e.internalHeight()/s*t}},37364:(e,t,i)=>{"use strict";i.d(t,{createPriceScaleSelectionStrategy:()=>l,allPriceScaleSelectionStrategyInfo:()=>c});var s=i(50151),r=i(44352),n=i(89215);class o{constructor(e){this._priceScalesLimit=8,this._metaInfo=e}metaInfo(){return this._metaInfo}findSuitableScale(e,t,i,s){if(void 0!==s)return this._tryToGetDesiredPriceScale(e,t,s,i);if((0, +"use strict";i.d(t,{QuotesProvider:()=>a});var s=i(36776),r=i(26867),n=i.n(r),o=i(68671);class a{constructor(e="full"){this._quotes=null,this._quoteSessionSymbol=null,this._quoteSessionClientId="",this._pausedQuoteSessionSymbol=null,this._quotesUpdate=new(n()),this._quoteSymbolChanged=new(n()),this._multiplexerType=e}setQuotesSessionSymbol(e){this._quoteSessionSymbol!==e&&(this._pausedQuoteSessionSymbol=null,this._quoteSessionClientId||(this._quoteSessionClientId="series-"+(0,o.guid)()),this._unsubscribeQuoteSession(),e&&this._subscribeQuoteSession(e),this._quoteSymbolChanged.fire())}quotesUpdate(){return this._quotesUpdate}quoteSymbolChanged(){return this._quoteSymbolChanged}quotes(){return this._quotes}isPaused(){return null!==this._pausedQuoteSessionSymbol}pause(){null===this._pausedQuoteSessionSymbol&&(this._pausedQuoteSessionSymbol=this._quoteSessionSymbol,this._unsubscribeQuoteSession())}resume(){null!==this._pausedQuoteSessionSymbol&&(this._subscribeQuoteSession(this._pausedQuoteSessionSymbol),this._pausedQuoteSessionSymbol=null)}destroy(){this._unsubscribeQuoteSession()}_onUpdate(e,t){this._quotes=e&&e.values||null,t&&t.values&&this._quotesUpdate.fire(e,t)}_subscribeQuoteSession(e){this._quoteSessionSymbol=e,(0,s.getQuoteSessionInstance)(this._multiplexerType).subscribe(this._quoteSessionClientId,this._quoteSessionSymbol,this._onUpdate.bind(this))}_unsubscribeQuoteSession(){this._quoteSessionSymbol&&((0,s.getQuoteSessionInstance)(this._multiplexerType).unsubscribe(this._quoteSessionClientId,this._quoteSessionSymbol),this._quoteSessionSymbol=null,this._quotes=null)}}},92133:(e,t,i)=>{"use strict";i.r(t),i.d(t,{normalizeIntervalString:()=>_,isAvailable:()=>m,setLastUsedResolution:()=>g,getRangeResolution:()=>f,getTimeBasedResolution:()=>v,getDefaultResolution:()=>S,getResolutionByChartStyle:()=>y,getApplicableIntervalForFrequency:()=>b,getServerInterval:()=>w,isResolutionMultiplierValid:()=>P,getMaxResolutionValue:()=>T,getResolutionsFromSettings:()=>x,convertResolutionsFromSettings:()=>I,mergeResolutions:()=>M,sortResolutions:()=>A,compareResolutions:()=>k,getCustomResolutions:()=>E,getTranslatedResolution:()=>D,getTranslatedResolutionModel:()=>B,isSecondsEnabled:()=>R,isTicksEnabled:()=>N,isIntervalEnabled:()=>O,parseIntervalValue:()=>F,intervalIsSupported:()=>W});var s=i(44352),r=i(578),n=i(1930),o=i(56840),a=i(82992),l=i(21095),c=i(65665),h=i(2484);const d={[r.ResolutionKind.Ticks]:1,[r.ResolutionKind.Seconds]:60,[r.ResolutionKind.Minutes]:1440,[r.SpecialResolutionKind.Hours]:24,[r.ResolutionKind.Days]:365,[r.ResolutionKind.Weeks]:52,[r.ResolutionKind.Months]:12,[r.ResolutionKind.Range]:1e6,[r.ResolutionKind.Invalid]:NaN},u={[r.ResolutionKind.Ticks]:0,[r.ResolutionKind.Seconds]:1,[r.ResolutionKind.Minutes]:2,[r.SpecialResolutionKind.Hours]:3,[r.ResolutionKind.Days]:4,[r.ResolutionKind.Weeks]:5,[r.ResolutionKind.Months]:6,[r.ResolutionKind.Range]:7,[r.ResolutionKind.Invalid]:8},p={[r.ResolutionKind.Invalid]:"",[r.ResolutionKind.Ticks]:s.t(null,{context:"interval_short"},i(59231)), +[r.ResolutionKind.Seconds]:s.t(null,{context:"interval_short"},i(2949)),[r.ResolutionKind.Minutes]:s.t(null,{context:"interval_short"},i(6791)),[r.SpecialResolutionKind.Hours]:s.t(null,{context:"interval_short"},i(13994)),[r.ResolutionKind.Days]:s.t(null,{context:"interval_short"},i(13395)),[r.ResolutionKind.Weeks]:s.t(null,{context:"interval_short"},i(85521)),[r.ResolutionKind.Months]:s.t(null,{context:"interval_short"},i(37720)),[r.ResolutionKind.Range]:s.t(null,{context:"interval_short"},i(69838))};function _(e){return r.Interval.parse(e).value()}function m(e){const t=r.Interval.parse(e);if(!R()&&t.isSeconds())return!1;if(!N()&&t.isTicks())return!1;const i=t.value(),s=a.linking.dataFrequencyResolution.value();if(void 0!==s&&k(i,s)<0)return!1;const n=a.linking.supportedResolutions.value();return void 0!==n?void 0!==n.find((e=>_(e)===i)):t.isSeconds()?Boolean(a.linking.seconds.value()):t.isTicks()?Boolean(a.linking.ticks.value()):t.isIntraday()?Boolean(a.linking.intraday.value()):t.isDWM()}function g(e){r.Interval.isValid(e)&&(r.Interval.isRange(e)?o.setValue("chart.lastUsedRangeResolution",e):o.setValue("chart.lastUsedTimeBasedResolution",e))}function f(e){const t=o.getValue("chart.lastUsedRangeResolution");if(void 0!==t&&r.Interval.isRange(t))return t;let i="100R";for(const t of e){const e=r.Interval.parse(t);if(e.isRange()){const t=e.value();if("100R"===t)return t;i=t}}return i}function v(e){const t=o.getValue("chart.lastUsedTimeBasedResolution");if(void 0!==t&&r.Interval.isTimeBased(t))return t;let i="1D";for(const t of e){const e=r.Interval.parse(t);if(e.isTimeBased()){const t=e.value();if("1D"===t)return t;i=t}}return i}function S(e){return e?"100R":"1D"}function y(e,t,i){const s=n.isRangeStyle(e),o=r.Interval.isRange(t);return!s&&o?v(i):s&&!o?f(i):t}function b(e,t){return k(t,e)>=0?t:e}function w(e){return r.Interval.isRange(e)?"1":e}function P(e){const{interval:t,guiResolutionKind:i}=r.Interval.parseExt(e);if(!t.isValid())return!1;return(i===r.SpecialResolutionKind.Hours?t.multiplier()/60:t.multiplier())<=C(i)}function C(e){const t=d[e];return Number.isNaN(t)?1:t}function T(e){return C(r.Interval.parseExt(e).guiResolutionKind)}function x(e){const t=I(o.getJSON(e,[]));return(0,l.uniq)(t.filter(P).map(_))}function I(e){return Array.isArray(e)?e:Object.keys(e).map(r.Interval.normalize).filter(c.notNull)}function M(...e){let t=[].concat(...e);return t=(0,l.uniq)(t.filter(P).map(_)),A(t)}function A(e){return e.sort(k)}function L(e){const t=r.Interval.parse(e),i=t.multiplier()||1;return t.isMinuteHours()?[r.SpecialResolutionKind.Hours,i/60]:[t.kind(),i]}function k(e,t){if(e===t)return 0;const[i,s]=L(e),[r,n]=L(t);return i!==r?u[i]-u[r]:s-n}function E(){return[]}function D(e){const{multiplier:t,shortKind:i}=B(e);return`${t}${i}`}function B(e,t){const i=r.Interval.parse(e);let s=i.multiplier(),n=i.kind();if(!i.isValid()){if(t)return null;throw new TypeError("Can't translate invalid interval")}return i.isMinuteHours()&&(s=Math.floor(s/60),n=r.SpecialResolutionKind.Hours),{multiplier:s.toString(),shortKind:V(n), +hint:`${s} ${V(n,s)}`,mayOmitMultiplier:i.isDWM()&&1===s,mayOmitShortKind:i.isMinutes()&&!i.isMinuteHours()}}function V(e,t){if(!t)return p[e];switch(e){case r.ResolutionKind.Ticks:return s.t(null,{plural:"ticks",count:t},i(99136));case r.ResolutionKind.Days:return s.t(null,{plural:"days",count:t},i(30572));case r.ResolutionKind.Weeks:return s.t(null,{plural:"weeks",count:t},i(47966));case r.ResolutionKind.Months:return s.t(null,{plural:"months",count:t},i(99062));case r.ResolutionKind.Seconds:return s.t(null,{plural:"seconds",count:t},i(71787));case r.ResolutionKind.Minutes:return s.t(null,{plural:"minutes",count:t},i(69143));case r.SpecialResolutionKind.Hours:return s.t(null,{plural:"hours",count:t},i(52254));case r.ResolutionKind.Range:return s.t(null,{plural:"ranges",count:t},i(82797));default:return e}}function R(){return h.enabled("seconds_resolution")}function N(){return h.enabled("tick_resolution")}function O(e){{const t=r.Interval.parse(e);if(!R()&&t.isSeconds())return!1;if(!N()&&t.isTicks())return!1}return!0}function F(e){let t;t=/^[,\s]*(^[1-9][0-9]*)?\s*([hdwmst]?)\s*$/i;const i=t.exec(e)||[],s=~~i[1],r=i[2]&&i[2].toUpperCase()||null,n={qty:!s&&r?1:s,unit:r};return n.error=!s&&!r,n.intraday=!(n.error||n.unit&&"H"!==n.unit&&"S"!==n.unit&&"T"!==n.unit),n.range="R"===n.unit,n}function W(e){if(h.enabled("allow_supported_resolutions_set_only")){const t=r.Interval.normalize(e);return null!==t&&m(t)}{const t=F(e);if(t.error)return!1;if(!h.enabled("custom_resolutions")){const t=r.Interval.normalize(e),i=window.ChartApiInstance.defaultResolutions().filter(O);if(!t||-1===i.indexOf(t))return!1}const i=a.linking.dataFrequencyResolution.value();if(void 0!==i&&null!==t.unit&&b(i,t.unit)!==t.unit)return!1;if(t.intraday)return a.linking.intraday.value();{const e=a.linking.supportedResolutions.value();return!e||null!==t.unit&&!!~e.indexOf(t.unit)}}}},53778:(e,t,i)=>{"use strict";i.d(t,{scaleRatio:()=>r,priceRangeByScaleRatio:()=>n,barSpacingByScaleRatio:()=>o});var s=i(23304);function r(e,t){if(t.isLog()||e.isEmpty()||t.isEmpty())return null;const i=function(e){if(e.isEmpty())return null;const t=e.priceRange();if(null===t)return null;const i=t.length();return e.internalHeight()/i}(t);if(null===i)return null;return e.getValidBarSpacing()/Math.max(1e-10,i)}function n(e,t,i){if(e.isLog()||null===i||e.isEmpty())return null;const r=e.priceRange();if(null===r||r.isEmpty())return null;const n=e.internalHeight()/(t/i),o=r.length();if(n===o)return r;const a=(n-o)/2;return new s.PriceRange(r.minValue()-a,r.maxValue()+a)}function o(e,t){if(e.isLog()||null===t||e.isEmpty())return null;const i=e.priceRange();if(null===i)return null;const s=i.length();return e.internalHeight()/s*t}},37364:(e,t,i)=>{"use strict";i.d(t,{createPriceScaleSelectionStrategy:()=>l,allPriceScaleSelectionStrategyInfo:()=>c});var s=i(50151),r=i(44352),n=i(89215);class o{constructor(e){this._priceScalesLimit=8,this._metaInfo=e}metaInfo(){return this._metaInfo}findSuitableScale(e,t,i,s){if(void 0!==s)return this._tryToGetDesiredPriceScale(e,t,s,i);if((0, n.isStudy)(t)){const s=t.metaInfo();if("Volume"===s.shortId&&e.containsMainSeries())return e.createPriceScaleAtPosition("overlay");const r=t.desiredPriceScalePosition();if(null!==r)return this._tryToGetDesiredPriceScale(e,t,r,i);if(void 0!==i&&((0,n.isStudy)(i)||e.isMainPane())&&s.is_price_study)return this._getPriceScaleTheSameAsForSource(i,e)}let r=!1;if((0,n.isStudy)(t)){const i=t.metaInfo().groupingKey;if(void 0!==i){const t=e.model().findNonOverlayStudyWithGroupingKey(i,e);if(null!==t)return this._getPriceScaleTheSameAsForSource(t.study,t.pane)}r=Boolean(t.metaInfo().is_price_study)}else t===e.model().mainSeries()&&(r=!0);if(r){const t=this._findFirstScaleForPriceStudy(e);if(null!==t)return t}return this.createNewPriceScaleIfPossible(e)}canCreateNewPriceScale(e){return e.leftPriceScales().length+e.rightPriceScales().lengthi&&this._priceScaleIsPrice(e.rightPriceScales()[i],t))return e.rightPriceScales()[i];if(e.leftPriceScales().length>i&&this._priceScaleIsPrice(e.leftPriceScales()[i],t))return e.leftPriceScales()[i]}return null}_targetPriceScaleIndex(e,t){if(e.mainSource()===t.mainSeries())return 0}_tryToGetDesiredPriceScale(e,t,i,r){switch(i){case"left":return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("left"):e.createPriceScaleAtPosition("overlay");case"right":return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("right"):e.createPriceScaleAtPosition("overlay");case"as-series":return void 0!==r?(0,s.ensureNotNull)(r.priceScale()):e.isMainPane()?(0,s.ensureNotNull)((0,s.ensureNotNull)(e.mainDataSource()).priceScale()):this.createNewPriceScaleIfPossible(e);case"overlay":return e.createPriceScaleAtPosition("overlay")}}}const a=[{name:"left",title:r.t(null,void 0,i(65323)),ctor:class extends o{constructor(e){super(e)}apply(e){const t=e.model();e.rightPriceScales().slice(0).forEach((i=>e.movePriceScale(i,"left",this._targetPriceScaleIndex(i,t))))}createNewPriceScaleIfPossible(e){return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("left"):e.createPriceScaleAtPosition("overlay")}}},{name:"right",title:r.t(null,void 0,i(14113)),ctor:class extends o{constructor(e){super(e)}apply(e){const t=e.model();e.leftPriceScales().slice(0).forEach((i=>e.movePriceScale(i,"right",this._targetPriceScaleIndex(i,t))))}createNewPriceScaleIfPossible(e){return this.canCreateNewPriceScale(e)?e.createPriceScaleAtPosition("right"):e.createPriceScaleAtPosition("overlay")}}},{name:"auto",title:r.t(null,void 0,i(86951)),ctor:class extends o{constructor(e){super(e)}apply(e){if(e.containsMainSeries()){const t=(0,s.ensureNotNull)((0,s.ensureNotNull)(e.mainDataSource()).priceScale()) ;e.movePriceScale(t,"right",0)}const t=e.model();for(;e.leftPriceScales().length>e.rightPriceScales().length;){const i=e.leftPriceScales()[e.leftPriceScales().length-1];e.movePriceScale(i,"right",this._targetPriceScaleIndex(i,t))}for(;e.rightPriceScales().length-e.leftPriceScales().length>1;){const i=e.rightPriceScales()[e.rightPriceScales().length-1];e.movePriceScale(i,"left",this._targetPriceScaleIndex(i,t))}}createNewPriceScaleIfPossible(e){if(!this.canCreateNewPriceScale(e))return e.createPriceScaleAtPosition("overlay");const t=e.leftPriceScales().lengtht.name===e)));return new t.ctor(t)}function c(){return a}},47149:(e,t,i)=>{"use strict";i.d(t,{SelectionIndexes:()=>r});var s=i(50151);class r{constructor(e){this._baseIndex=null,this._offsetInBar=null,this._offsetInTime=null,this._barsBetweenPoints=null,this._timescale=e}indexes(){const e=this._timescale.visibleBarsStrictRange();if(null===e)return[];const t=e.firstBar(),i=e.lastBar();if(null===this._offsetInTime||null===this._barsBetweenPoints){const e=this._timescale.barSpacing();this._barsBetweenPoints=Math.floor(120/e),this._offsetInBar=i%this._barsBetweenPoints,this._offsetInTime=this._timescale.indexToTimePoint(this._offsetInBar),this._baseIndex=this._timescale.baseIndex()}const r=this._timescale.baseIndex();this._baseIndex!==r&&(this._baseIndex=r,this._offsetInBar=(0,s.ensureNotNull)(this._timescale.timePointToIndex(this._offsetInTime)));const n=(0,s.ensureNotNull)(this._offsetInBar),o=[];let a=Math.floor((t-n)/this._barsBetweenPoints);const l=Math.floor((i-n)/this._barsBetweenPoints);for(;a<=l;a++)o.push(n+a*this._barsBetweenPoints);return o}clear(){this._offsetInBar=null,this._offsetInTime=null,this._baseIndex=null,this._barsBetweenPoints=null}}},53074:(e,t,i)=>{"use strict";i.d(t,{SelectionRenderer:()=>l});var s=i(34026),r=i(7394),n=i(14888),o=i(6947);const a=r.colorsPalette["color-tv-blue-600"];class l{constructor(e){this._data=e||null}setData(e){this._data=e}draw(e,t){if(null===this._data||!this._data.visible)return;const i=t.pixelRatio;e.strokeStyle=void 0!==this._data.color?this._data.color:a,e.lineCap="butt";const s=Math.max(1,Math.floor(i));e.lineWidth=s;const r=this._data.vertOffset||0;for(let t=0;t(0,s.pointInBox)(t,e)))}_drawMarker(e,t,i,s,r){let n=Math.round(3.5*r*2);n%2!=s%2&&(n+=1) -;let o=Math.round(n+2*(.5*s+.75*r));o%2!=s%2&&(o+=1);const a=Math.round(t.x*r),l=Math.round((t.y+i)*r),c=s%2/2;e.beginPath(),e.arc(a+c,l+c,o/2,0,2*Math.PI,!0),e.closePath(),e.fill(),e.beginPath(),e.arc(a+c,l+c,n/2,0,2*Math.PI,!0),e.closePath(),e.stroke()}}},95693:(e,t,i)=>{"use strict";i.d(t,{SeriesBase:()=>zt});var s=i(50151),r=i(49483),n=i(51768),o=i(76422),a=i(98351),l=i(88029),c=i(22770),h=i(88552),d=i(33639),u=i(23304),p=i(26220),_=i.n(p),m=i(1930),g=i(92484),f=i(74599),v=i(77906),S=i(17659),y=i(44352),b=i(2484),w=i(23902),C=i(72039),P=i(12205);function T(e){const t="QUANDL"===(e=e||{}).exchange,s={title:"",description:"",interval:"",exchange:"",provider:"",chartStyle:"",sessionDescription:""};let r="";if(e.description&&t)if(2===e.description.split("/").length)r=e.description.split("/")[1];else{e.description.split("'").filter((e=>e.length)).forEach((e=>{let t=[];t=e&&("/"===e[0]||/\d+\/\(?/.test(e))?[e]:e.split("/").filter((e=>e.length)),r+=t[2===t.length?1:0]}))}else r=e.description?e.description:e.symbol;if(e.ticker?(s.title=e.ticker,s.description=x(r)):s.title=x(r),e.interval&&(s.interval=(0,P.translatedIntervalString)(e.interval)),t&&e.description){const t=/[\w_]+\/[\w_]+/.exec(e.description);t&&t[0]?s.provider=x(t[0].split("/")[0]):s.provider=x(e.description.split("/")[0])}return e.exchange&&(s.exchange=x(e.exchange)),s.chartStyle=x(function(e){return e.inputs,8===e.style?y.t(null,void 0,i(40530)):""}(e)),e.sessionDescription&&(s.sessionDescription=x(e.sessionDescription)),s}function x(e){return e.replace(/'/g,"")}const I=y.t(null,void 0,i(89659)),M=b.enabled("hide_unresolved_symbols_in_legend");class A extends C.StatusProviderBase{constructor(e,t,i,s){super(t),this._series=e,this._statusViewProperties=i,this._options=s||{}}text(){return function(e){const t=T(e);return(e.ticker?t.description:t.title)+(t.interval?", "+t.interval:"")+function(e,t=", "){return(e.provider?`${t}${e.provider}`:"")+(e.exchange?`${t}${e.exchange}`:"")+(e.chartStyle?`${t}${e.chartStyle}`:"")+(e.branding?`${t}${e.branding}`:"")+(e.sessionDescription?`${t}${e.sessionDescription}`:"")}(t)}(this._getTitleGenerationOptions())}getSplitTitle(){return T(this._getTitleGenerationOptions())}bold(){return!1}size(){return this._statusViewProperties.childs().fontSize.value()+"px"}errorStatus(){const e=this._series.seriesErrorMessage();return null!==e?{error:e,title:I}:null}_getTitleGenerationOptions(){var e,t;const i=this._series.symbolInfo(),s=this._statusViewProperties.childs(),r=this._series.symbolTextSourceProxyProperty().value();let n;if(s.showExchange.value()&&i){const s=(0,m.isEconomicSymbol)(i)&&(null!==(t=null===(e=i.source2)||void 0===e?void 0:e.description)&&void 0!==t?t:i.source);n=s||i.exchange}return{description:"ticker"===r?i&&i.name||void 0:(0,w.getTranslatedSymbolDescription)({pro_name:i&&i.pro_name||void 0,short_name:i&&i.name||void 0,description:i&&i.description||void 0,short_description:i&&i.short_description||void 0,local_description:i&&i.local_description||void 0,language:i&&i.language||void 0}),exchange:n, -symbol:M&&null===i?"":this._series.symbol(),interval:s.showInterval.value()&&!this._options.hideResolution?this._series.interval():void 0,style:this._series.properties().childs().style.value(),inputs:this._series.getInputsProperties().state(),boxSize:this._series.data().boxSize,reversalAmount:this._series.data().reversalAmount,ticker:"ticker-and-description"===r?i&&i.name||void 0:""}}}class L extends S.StatusView{constructor(e,t,i,s){super(new A(e,t,i,s)),this._invalidated=!0,this._series=e,this._series.onRestarted().subscribe(this,this.update),this._series.dataEvents().symbolResolved().subscribe(this,this.update),this._series.dataEvents().completed().subscribe(this,this.update),this._series.boxSizeValue().subscribe(this.update.bind(this)),i.childs().symbolTextSource.listeners().subscribe(this,this.update)}getSeriesPrecision(){let e=4;const t=this._series.symbolInfo();return t&&t.pricescale&&(e=Math.round(Math.log(t.pricescale)/Math.log(10))),e}round(e){const t=this.getSeriesPrecision(),i=Math.round(e*Math.pow(10,t))/Math.pow(10,t);return i?i.toString():""}update(){this._invalidated=!0}text(){return this._updateImpl(),super.text()}color(){return this._updateImpl(),super.color()}bold(){return this._updateImpl(),super.bold()}size(){return this._updateImpl(),super.size()}getSplitTitle(){return this._updateImpl(),this._statusProvider.getSplitTitle()}_updateImpl(){this._invalidated&&(this._bold=this._statusProvider.bold(),this._size=this._statusProvider.size(),this._text=this._statusProvider.text(),this._invalidated=!1)}}var k=i(50335),E=i(95790),D=i(76076),V=i(86061),B=i(6250);const R=r.CheckMobile.any(),N=b.enabled("hide_resolution_in_legend");class O extends E.DataWindowView{constructor(e,t){super(),this._invalidated=!0,this._series=e,this._model=t,this._valuesProvider=this._createValuesProvider(e,t),this._items=this._valuesProvider.getItems().map((e=>new E.DataWindowItem(e.id,e.title,"",e.unimportant))),this.update()}update(){this._invalidated=!0}items(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items}series(){return this._series}_updateImpl(){var e,t;const i=this._series.symbolInfo();if(i){const e=[i.name];N||e.push((0,P.translatedIntervalString)(this._series.interval())),(0,m.isEconomicSymbol)(i)&&i.source?e.push(i.source):e.push((0,r.onWidget)()||"forex"===i.type?i.exchange:i.listed_exchange),this._header=e.join(", "),this._title=i.description}else this._header=this._series.symbol();let s=this._model.crossHairSource().appliedIndex();b.enabled("use_last_visible_bar_value_in_legend")&&!(0,k.isNumber)(s)&&(s=null!==(t=null===(e=this._model.timeScale().visibleBarsStrictRange())||void 0===e?void 0:e.lastBar())&&void 0!==t?t:NaN);const n=this._valuesProvider.getValues(s);for(let e=0;ee||t||i),i.showBarChange,i.showSeriesOHLC,i.showVolume),this._visibilityProperty.subscribe(this,this.update)}areValuesVisible(){return this._visibilityProperty.value()}additional(){return null}marketTitle(){const e=this._series.marketStatusModel().status().value();return this._showLastPriceAndChangeOnly()&&("pre_market"===e||"post_market"===e)?`${z}:`:""}destroy(){this._backgroundColorSpawn.destroy(),this._visibilityProperty.destroy()}_createValuesProvider(e,t){return new W(e,t)}}var j=i(40549),G=i.n(j),q=i(21169),$=i(32769);function Y(){const e=window.ChartApiInstance.serverTimeOffset();return Date.now()/1e3+e}function K(e,t,i){return e<=i?t<=i?1/0:t/1e3:Math.min(e,t)/1e3}class X{constructor(e,t){this._marketStatus=new(G())(null),this._lastMarketStatus=null,this._sessionsSpec=null,this._nextSessionEdgeInternal=null,this._nextSessionEdge=new(G())(null),this._recalcNextSessionEdgeTimerId=null,this._futuresContractExpirationTime=null,this._quotesProvider=e,e.quotesUpdate().subscribe(this,this._update.bind(this)),this._resetSubscription=t,this._resetSubscription.subscribe(this,this._resetStatus)}destroy(){this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._quotesProvider.quoteSymbolChanged().unsubscribeAll(this), -this._resetSubscription.unsubscribeAll(this),null!==this._recalcNextSessionEdgeTimerId&&clearTimeout(this._recalcNextSessionEdgeTimerId)}futuresContractExpirationTime(){return this._futuresContractExpirationTime}setSymbolInfo(e){var t,i,s,r,n;if(this._nextSessionEdgeInternal=null,null===e)return void(this._sessionsSpec=null);const o=new q.SessionSpec(e.timezone,null!==(t=e.session_display)&&void 0!==t?t:e.session,e.session_holidays,e.corrections);let a,l;const c=null===(i=e.subsessions)||void 0===i?void 0:i.find((e=>"premarket"===e.id)),h=null===(s=e.subsessions)||void 0===s?void 0:s.find((e=>"postmarket"===e.id));void 0!==c&&(a=new q.SessionSpec(e.timezone,null!==(r=c["session-display"])&&void 0!==r?r:c.session,e.session_holidays,c["session-correction"])),void 0!==h&&(l=new q.SessionSpec(e.timezone,null!==(n=h["session-display"])&&void 0!==n?n:h.session,e.session_holidays,h["session-correction"])),this._sessionsSpec={general:o,preMarket:a,postMarket:l},this._recalculateNextSessionEdge()}status(){return this._marketStatus}nextSessionEdge(){return this._nextSessionEdge}_resetStatus(){this._marketStatus.setValue(null)}_update(e){void 0!==e&&void 0!==e.values.current_session&&(this._lastMarketStatus=e.values.current_session),null!==this._lastMarketStatus?this._marketStatus.setValue(this._lastMarketStatus):this._resetStatus()}_getNextSessionEdgeInternal(){var e;if(null===this._sessionsSpec||"24x7"===this._sessionsSpec.general.spec())return null;const t=1e3*Y();if(null===this._nextSessionEdgeInternal||(null!==(e=this._nextSessionEdgeInternal.timestamp)&&void 0!==e?e:1/0)<=t/1e3){const{general:e,preMarket:i,postMarket:s}=this._sessionsSpec,r=(0,$.get_timezone)(e.timezone()),n=(0,$.utc_to_cal)(r,t),o=K((0,$.cal_to_utc)(r,e.alignToNearestSessionStart(n,1)),(0,$.cal_to_utc)(r,e.alignToNearestSessionEnd(n,1)),t),a=K(void 0!==i?(0,$.cal_to_utc)(r,i.alignToNearestSessionStart(n,1)):1/0,void 0!==i?(0,$.cal_to_utc)(r,i.alignToNearestSessionEnd(n,1)):1/0,t),l=K(void 0!==s?(0,$.cal_to_utc)(r,s.alignToNearestSessionStart(n,1)):1/0,void 0!==s?(0,$.cal_to_utc)(r,s.alignToNearestSessionEnd(n,1)):1/0,t),c=Math.min(o,a,l);c===1/0&&(this._nextSessionEdgeInternal={timestamp:null}),this._nextSessionEdgeInternal=c===l?{timestamp:c,status:"post_market"}:c===a?{timestamp:c,status:"pre_market"}:{timestamp:c}}return this._nextSessionEdgeInternal}_recalculateNextSessionEdge(){const e=this._getNextSessionEdgeInternal();if(null===e||null===e.timestamp)return void this._nextSessionEdge.setValue(null);const t={status:e.status,remainingSeconds:Math.max(0,e.timestamp-Y())};if(null===this._recalcNextSessionEdgeTimerId){let e=Math.ceil(t.remainingSeconds%60);0===e&&(e+=60),this._recalcNextSessionEdgeTimerId=setTimeout((()=>this._recalculateNextSessionEdgeByTimer()),1e3*e)}this._nextSessionEdge.setValue(t)}_recalculateNextSessionEdgeByTimer(){this._recalcNextSessionEdgeTimerId=null,this._recalculateNextSessionEdge()}}var Z=i(35624),J=i(578),Q=i(69228),ee=i(87770),te=i(68671);let ie=0;class se{constructor(e,t){this._extrapolatedData=[], -this._cacheForFuture=!1,this._modelId=ie++,this._builderCache=null,this._uniqueId=(0,te.randomHashN)(6),this._resolution=t,this._symbolInfo=e,this._valid=Boolean(e.timezone)&&Boolean(e.session),this._session=new Q.SessionInfo(e.timezone,e.session,e.session_holidays,e.corrections)}syncSourceTarget(){return{uniqueId:this._uniqueId,resolution:this._resolution,symbolInfo:this._symbolInfo,session:this._session.state()}}getSymbolInfo(){return this._symbolInfo}getSession(){return this._session}getResolution(){return this._resolution}uniqueId(){return this._modelId}distance(e,t){if(!this.isValid())return{success:!1};if(e>t)return{success:!1};if(e===t)return{success:!0,result:0};let i=this._extrapolatedData.length,s=0!==i?this._extrapolatedData[0]:null,r=null!==s?this._extrapolatedData[i-1]:null;const n=er){const s=(0,ee.extrapolateBarsFrontToTime)(this._barBuilder(),r||1e3*e,1e3*t,2e3,!0);this._extrapolatedData=this._extrapolatedData.concat(s.times),i=this._extrapolatedData.length,this._cacheForFuture=n}if(r=this._extrapolatedData[i-1],r<1e3*t)return{success:!1};const o=this._extrapolatedData.indexOf(1e3*t);return-1===o?{success:!1}:{success:!0,result:o}}projectTime(e,t){if(!this.isValid())return e;let i=this._extrapolatedData.length,s=i>0?this._extrapolatedData[0]:null,r=null!==s?this._extrapolatedData[i-1]:null;const n=t>=0;1e3*e===s&&this._cacheForFuture===n||(this._extrapolatedData=[1e3*e],i=1,s=null,r=null);const o=Math.abs(t);if(null===s||o>=i){const s=(0,ee.extrapolateBarsFrontByCount)(this._barBuilder(),r||1e3*e,Math.sign(t)*(o-i+1),!0);this._extrapolatedData=this._extrapolatedData.concat(s.times),i=this._extrapolatedData.length,this._cacheForFuture=n}return i0?e.delay:900;return Math.round(t/60)}listedExchange(){const e=this._symbolInfo.value();return null!==e?e.listed_exchange:""}async description(){const e=this._symbolInfo.value();if(null===e)return"";let t={};try{t=(0,s.ensureNotNull)(await(0,ne.getExchange)(e))}catch(e){ae.logWarn(`Cannot get exchange ${(0,oe.errorToString)(e)}`)}return t.description||e.listed_exchange}exchange(){const e=this._symbolInfo.value();return null!==e?e.exchange:""}proName(){const e=this._symbolInfo.value();return null!==e?e.pro_name:""}firstReplacedByBatsExchange(){const e=this._symbolInfo.value();return e&&(0,ne.firstReplacedByBatsExchange)(e)}_resetStatus(){this._dataUpdatedInfoStatus.setValue(null)}_update(){const e=this._symbolInfo.value();if(null===e)return void this._dataUpdatedInfoStatus.setValue(null);const t=this._status.value();if("string"==typeof t)return void this._dataUpdatedInfoStatus.setValue(null);if(2===t||1===t)return;const i=ce(e,t,this._updatePeriod.value());0!==i.length?this._dataUpdatedInfoStatus.setValue(i):this._dataUpdatedInfoStatus.setValue(null)}}var de=i(90593),ue=i(65665);class pe{constructor(e,t){this._dataProblem=new de.WatchedObject(null),this._quotesProvider=e,this._quotesProvider.quotesUpdate().subscribe(this,this._update.bind(this)),this._resetSubscription=t,this._resetSubscription.subscribe(this,this._resetStatus)}destroy(){this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._resetSubscription.unsubscribeAll(this)}status(){return this._dataProblem}_resetStatus(){this._dataProblem.setValue(null)}_update(e){void 0===e.values||void 0===e.values.data_problem?this._resetStatus():this._dataProblem.setValue((0,ue.clone)(e.values.data_problem))}}var _e=i(54168),me=i(38031),ge=i(67876),fe=i(99846);function ve(e){return e<10?`0${e}`:e.toString()}var Se=i(1194),ye=i(97425);const be=b.enabled("force_exchange_as_title"),we=b.enabled("chart_style_hilo_last_price"),Ce=[0,1,2,3,9,8,10];we&&Ce.push(12);const Pe={alwaysShowGlobalLast:!1,visibleOnHistoryOnly:!1,showCountdown:!0,showSymbolLabel:!0,useSolidBodyColor:!0};class Te extends ge.PriceAxisView{constructor(e,t,i){super(),this._previousCountdown="",this._source=e,this._model=t,this._options={...Pe,...i}}updateCountdown(){this._countdownText()!==this._previousCountdown&&(this.update((0,ye.sourceChangeEvent)(this._source.id())),this._model.updateSourcePriceScale(this._source))}_getSource(){return this._source}_getModel(){return this._model}_isCountdownEnabled(){return this._options.showCountdown}_countdownText(){const e=J.Interval.parse(this._source.interval());if(e.isDWM()||e.isTicks()||e.isSeconds()&&1===e.multiplier())return"";const t=this._source.data().bars().last() -;if(null===t)return"";const i=1e3*(0,s.ensure)(t.value[0]),r=J.Interval.parse(this._source.interval()).inMilliseconds(),n=i.valueOf()+r;let o=Math.round((n-this._currentTime())/1e3);if(o<=0)return"";o=Math.min(o,r/1e3);let a=null;o>=3600&&(a=ve(Math.floor(o/3600))),o%=3600;const l=ve(Math.floor(o/60));o%=60;const c=ve(Math.floor(o));return null!==a?`${a}:${l}:${c}`:`${l}:${c}`}_updateRendererData(e,t,i){var r;if(e.visible=!1,t.visible=!1,!this._source.isVisible())return;const n=this._source.properties().childs();if(!we&&12===n.style.value())return;const o=this._model.timeScale().visibleBarsStrictRange(),a=this._source.data().last();if(null===o||null===a)return;if(this._options.visibleOnHistoryOnly&&o.contains(a.index))return;const l=this._model.properties().childs().scalesProperties.childs();let c=l.showSeriesLastValue.value(),h=this._isCountdownEnabled()&&n.showCountdown.value()&&Ce.includes(n.style.value())&&(this._options.alwaysShowGlobalLast||o.contains(a.index)),d=this._options.showSymbolLabel&&l.showSymbolLabels.value();const u=l.seriesLastValueMode.value()===fe.PriceAxisLastValueMode.LastPriceAndPercentageValue,p=this._source.lastValueData(void 0,this._options.alwaysShowGlobalLast);if(p.noData)return;const _=8===n.style.value();if((c||h||d)&&_&&n.haStyle.childs().showRealLastPrice.value()){const e=this._source.lastValueData(void 0,!1),t=this._source.lastValueData(void 0,!0);e.noData||t.noData||e.index!==t.index||(c=!1,h=!1,d=!1)}const m=(0,me.resetTransparency)(this._source.priceLineColor(p.color));if(this._options.useSolidBodyColor?(i.background=m,i.borderColor=void 0):(i.background=this._model.backgroundColorAtYPercentFromTop((null!==(r=i.fixedCoordinate)&&void 0!==r?r:i.coordinate)/(0,s.ensureNotNull)(this._model.paneForSource(this._source)).height()),i.borderColor=m),i.coordinate=p.coordinate,i.floatCoordinate=p.floatCoordinate,c||h){const t=this._axisFirstLineText(p,c);e.text=t,this._options.useSolidBodyColor?(i.textColor=this.generateTextColor(i.background),e.borderVisible=!1):(e.borderVisible=!0,i.textColor=m),e.textColor=i.textColor;const s=c&&u?(0,Se.getOppositeModePriceText)(this._source.priceScale(),p):"";e.secondLine=s,i.secondLineTextColor=i.textColor;const r=h?this._countdownText():"";this._previousCountdown=r,e.thirdLine=r,i.thirdLineTextColor=(0,me.generateColor)(i.textColor,25),0===t.length&&0===s.length&&0===r.length||(e.visible=!0)}d&&(t.text=this._paneText(d),t.visible=t.text.length>0)}_paneText(e){let t="";const i=this._source.symbolInfo();return be?t=(0,m.displayedSymbolExchange)(i):e&&(t=(0,m.displayedSymbolName)(i)),t}_axisFirstLineText(e,t){return t?(0,Se.getCurrentModePriceText)(this._source.priceScale(),e):""}_currentTime(){return Date.now()+1e3*this._source.serverTimeOffset()}}var xe=i(45703);class Ie extends Te{lastPrice(){return this._getSource().data().lastProjectionPrice}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const r=this._getModel(),n=this._getSource(),o=n.priceScale(),a=r.timeScale(),l=this.lastPrice();if(a.isEmpty()||o.isEmpty()||void 0===l)return -;const c=a.visibleBarsStrictRange();if(null===c)return;const h=c.firstBar(),u=c.lastBar(),p=n.data(),_=p.search(u,d.PlotRowSearchMode.NearestLeft);if(null===_)return;const m=n.nearestIndex(h,d.PlotRowSearchMode.NearestRight);if(void 0===m)return;const g=n.model().properties().childs().scalesProperties.childs(),f=(0,s.ensureNotNull)(p.valueAt(m))[4];let v=i.background,S=g.showSeriesLastValue.value(),y=!1,b=!1,w=!1;const C=n.lastValueData(4,!1),P=n.properties().childs();if(8===P.style.value()&&P.haStyle.childs().showRealLastPrice.value()){const e=n.lastValueData(4,!0);if(e.noData||e.color===i.background||(v=(0,me.resetTransparency)(e.color)),!e.noData&&!C.noData){const t=e.index===C.index;y=t&&g.showSymbolLabels.value(),b=g.seriesLastValueMode.value()===fe.PriceAxisLastValueMode.LastPriceAndPercentageValue,S=S&&t,w=t&&this._isCountdownEnabled()&&P.showCountdown.value()}}else{const e=n.barColorer().barStyle(_.index,!0);v=(0,me.resetTransparency)(e.barColor)}if(i.background=v,i.textColor=this.generateTextColor(v),i.secondLineTextColor=i.textColor,i.thirdLineTextColor=(0,me.generateColor)(i.textColor,25),i.coordinate=o.priceToCoordinate(l,f),e.visible=S||w,!C.noData){const i=n.priceScale().isPercentage();C.formattedPriceAbsolute=o.formatPriceAbsolute(l),C.formattedPricePercentage=o.formatPricePercentage(l,f,!0),C.text=i?C.formattedPricePercentage:C.formattedPriceAbsolute,e.text=this._axisFirstLineText(C,S),e.secondLine=S&&b?i?C.formattedPriceAbsolute:C.formattedPricePercentage:"",e.thirdLine=w?this._countdownText():"",t.text=this._paneText(y)}t.visible=y}}var Me=i(64636),Ae=i(56744),Le=i(7394),ke=i(53479);const Ee={light:{lineStyle:ke.LINESTYLE_DOTTED,lineWidth:1,textColor:Le.colorsPalette["color-cold-gray-900"],backgroundColor:Le.colorsPalette["color-tv-blue-50"],lineColor:Le.colorsPalette["color-cold-gray-500"]},dark:{lineStyle:ke.LINESTYLE_DOTTED,lineWidth:1,textColor:Le.colorsPalette["color-white"],backgroundColor:Le.colorsPalette["color-tv-blue-a800"],lineColor:Le.colorsPalette["color-cold-gray-500"]}};function De(e){return e?Ee.dark:Ee.light}class Ve extends Ae.HorizontalLinePaneView{constructor(e,t,i){super(),this._model=e,this._isVisible=t.lineVisible,this._lineColor=t.lineColor,this._lineWidth=t.lineWidth,this._getValue=i}_updateImpl(){const e=this._lineRendererData;if(e.visible=!1,!this._isVisible.value())return;const t=this._model.mainSeries(),i=t.priceScale(),s=t.firstValue(),r=this._getValue();if(null===s||null===r)return;const n=De(this._model.isDark()),o=this._lineColor.value()?this._lineColor.value():n.lineColor,a=this._lineWidth.value()?this._lineWidth.value():n.lineWidth;e.visible=!0,e.y=i.priceToCoordinate(r,s),e.linestyle=n.lineStyle,e.linewidth=a,e.color=o}}class Be extends ge.PriceAxisView{constructor(e,t,i,s){super(),this._model=e,this._label=t,this._isVisible=i,this._getValue=s}_updateRendererData(e,t,i){if(e.visible=!1,t.visible=!1,!this._isVisible.value())return;const s=this._model.mainSeries(),r=s.priceScale(),n=s.firstValue(),o=this._getValue();if(null===n||null===o)return -;const a=De(this._model.isDark());e.visible=!0,t.visible=!0,e.text=r.formatPriceAbsolute(o),t.text=this._label,i.coordinate=r.priceToCoordinate(o,n),i.background=a.backgroundColor,i.textColor=a.textColor}}class Re extends xe.PriceLineAxisView{constructor(e,t,i){super(),this._model=e,this._isLineVisible=t,this._getValue=i}_isVisible(){return this._isLineVisible.value()}_lineWidth(){return De(this._model.isDark()).lineWidth}_lineStyle(){return De(this._model.isDark()).lineStyle}_priceLineColor(e){return De(this._model.isDark()).lineColor}_value(){const e=this._model.mainSeries(),t=e.priceScale(),i=e.firstValue(),s=this._getValue();if(null===i||null===s)return{noData:!0};const r=t.priceToCoordinate(s,i);return{noData:!1,floatCoordinate:r,coordinate:r,color:"",formattedPricePercentage:"",formattedPriceAbsolute:"",formattedPriceIndexedTo100:"",text:"",index:0}}}const Ne=y.t(null,void 0,i(30777)),Oe=y.t(null,void 0,i(8136));function Fe(e,t,i,s){const r=new Ve(e,i,s),n=new Be(e,i.label,i.labelVisible,s);return{paneView:r,panePriceAxisView:new Me.PanePriceAxisView(n,t,e),priceAxisView:n,priceLineAxisView:new Re(e,i.lineVisible,s)}}const We={light:{lineStyle:ke.LINESTYLE_DOTTED,lineWidth:1,textColor:(0,Le.getHexColorByName)("color-cold-gray-900"),backgroundColor:(0,Le.getHexColorByName)("color-tv-blue-50"),lineColor:(0,Le.getHexColorByName)("color-cold-gray-500")},dark:{lineStyle:ke.LINESTYLE_DOTTED,lineWidth:1,textColor:(0,Le.getHexColorByName)("color-white"),backgroundColor:(0,Le.getHexColorByName)("color-tv-blue-a800"),lineColor:(0,Le.getHexColorByName)("color-cold-gray-500")}};function He(e){return e?We.dark:We.light}class ze extends Ae.HorizontalLinePaneView{constructor(e,t,i){super(),this._model=e,this._isVisible=t.lineVisible,this._lineColor=t.lineColor,this._lineWidth=t.lineWidth,this._getValue=i}_updateImpl(){const e=this._lineRendererData;if(e.visible=!1,!this._isVisible.value())return;const t=this._model.mainSeries(),i=t.priceScale(),s=t.firstValue(),r=this._getValue();if(null===s||null===r)return;const n=He(this._model.isDark()),o=this._lineColor.value()?this._lineColor.value():n.lineColor,a=this._lineWidth.value()?this._lineWidth.value():n.lineWidth;e.visible=!0,e.y=i.priceToCoordinate(r,s),e.linestyle=n.lineStyle,e.linewidth=a,e.color=o}}class Ue extends ge.PriceAxisView{constructor(e,t,i,s){super(),this._model=e,this._label=t,this._isVisible=i,this._getValue=s}_updateRendererData(e,t,i){if(e.visible=!1,t.visible=!1,!this._isVisible.value())return;const s=this._model.mainSeries(),r=s.priceScale(),n=s.firstValue(),o=this._getValue();if(null===n||null===o)return;const a=He(this._model.isDark());e.visible=!0,t.visible=!0,e.text=r.formatPriceAbsolute(o),t.text=this._label,i.coordinate=r.priceToCoordinate(o,n),i.background=a.backgroundColor,i.textColor=a.textColor}}class je extends xe.PriceLineAxisView{constructor(e,t,i){super(),this._model=e,this._isLineVisible=t,this._getValue=i}_isVisible(){return this._isLineVisible.value()}_lineWidth(){return He(this._model.isDark()).lineWidth}_lineStyle(){ -return He(this._model.isDark()).lineStyle}_priceLineColor(e){return He(this._model.isDark()).lineColor}_value(){const e=this._model.mainSeries(),t=e.priceScale(),i=e.firstValue(),s=this._getValue();if(null===i||null===s)return{noData:!0};const r=t.priceToCoordinate(s,i);return{noData:!1,floatCoordinate:r,coordinate:r,color:"",formattedPricePercentage:"",formattedPriceAbsolute:"",formattedPriceIndexedTo100:"",text:"",index:0}}}const Ge=y.t(null,void 0,i(22554));function qe(e,t,i,s){const r=i.childs(),n=function(e,t,i,s){const r=new ze(e,i,s),n=new Ue(e,i.label,i.labelVisible,s),o=new Me.PanePriceAxisView(n,t,e),a=new je(e,i.lineVisible,s);return{paneView:r,panePriceAxisView:o,priceAxisView:n,priceLineAxisView:a}}(e,t,{label:Ge,labelVisible:r.averageClosePriceLabelVisible,lineVisible:r.averageClosePriceLineVisible,lineColor:r.averagePriceLineColor,lineWidth:r.averagePriceLineWidth},(()=>s(0)));return{paneViews:[n.paneView],panePriceAxisViews:[n.panePriceAxisView],priceAxisViews:[n.priceAxisView],priceLineAxisViews:[n.priceLineAxisView]}}var $e=i(26867),Ye=i.n($e),Ke=i(90854),Xe=i(91035),Ze=i(86441);class Je{constructor(){this._data=null}setData(e){this._data=e}data(){return this._data}draw(e,t){const i=this._data;if(null===i)return;const s=t.pixelRatio;e.save();const r=Math.max(1,Math.floor(s)),n=r%2/2,o=Math.round(i.center.x*s)+n,a=i.center.y*s;e.fillStyle=i.seriesLineColor,e.beginPath();const l=Math.max(2,1.5*i.seriesLineWidth)*s;e.arc(o,a,l,0,2*Math.PI,!1),e.fill(),e.fillStyle=i.fillColor,e.beginPath(),e.arc(o,a,i.radius*s,0,2*Math.PI,!1),e.fill(),e.lineWidth=r,e.strokeStyle=i.strokeColor,e.beginPath(),e.arc(o,a,i.radius*s+r/2,0,2*Math.PI,!1),e.stroke(),e.restore()}hitTest(e,t){return null}}function Qe(e){return e}const et=[{start:0,end:.25,startRadius:4,endRadius:10,startFillAlpha:.25,endFillAlpha:0,startStrokeAlpha:.4,endStrokeAlpha:.8,easing:Qe},{start:.25,end:.525,startRadius:10,endRadius:14,startFillAlpha:0,endFillAlpha:0,startStrokeAlpha:.8,endStrokeAlpha:0,easing:Qe},{start:.525,end:1,startRadius:14,endRadius:14,startFillAlpha:0,endFillAlpha:0,startStrokeAlpha:0,endStrokeAlpha:0,easing:Qe}];function tt(e,t,i,s){const r=i+(s-i)*t;return(0,me.applyTransparency)(e,(0,me.alphaToTransparency)(r))}function it(e,t){const i=e%2600/2600;let s;for(const e of et)if(i>=e.start&&i<=e.end){s=e;break}if(void 0===s)throw new Error("Last price animation internal logic error");const r=s.easing((i-s.start)/(s.end-s.start));return{fillColor:tt(t,r,s.startFillAlpha,s.endFillAlpha),strokeColor:tt(t,r,s.startStrokeAlpha,s.endStrokeAlpha),radius:(n=r,o=s.startRadius,a=s.endRadius,o+(a-o)*n)};var n,o,a}class st{constructor(e){this._renderer=new Je,this._invalidated=!0,this._stageInvalidated=!0,this._startTime=performance.now(),this._endTime=this._startTime-1,this._series=e}update(e){if(this._invalidated=!0,"data-source-change"===e.type&&e.sourceId===this._series.id()&&e.realtime&&this._series.seriesLoaded()){const e=performance.now(),t=this._endTime-e;if(t>0)return void(t<650&&(this._endTime+=2600));this._startTime=e, -this._endTime=e+2600}}invalidateStage(){this._stageInvalidated=!0}animationActive(){return performance.now()<=this._endTime}stopAnimation(){this._endTime=this._startTime-1}renderer(e,t){return this._invalidated?(this._updateImpl(e,t),this._invalidated=!1,this._stageInvalidated=!1):this._stageInvalidated&&(this._updateRendererDataStage(),this._stageInvalidated=!1),this._renderer}_updateImpl(e,t){this._renderer.setData(null);const i=this._series.model().timeScale(),s=i.visibleBarsStrictRange(),r=this._series.firstValue(),n=this._series.lastValueData(void 0,!0,!0);if(null===s||null===r||void 0===n.index||void 0===n.price||!s.contains(n.index))return;const o=new Ze.Point(i.indexToCoordinate(n.index),this._series.priceScale().priceToCoordinate(n.price,r)),a=n.color,l=this._series.properties().childs();let c;switch(this._series.style()){case 3:c=l.areaStyle.childs().linewidth.value();break;case 10:const t=l.baselineStyle,i=Math.round(e*(Math.abs(100-t.childs().baseLevelPercentage.value())/100));c=o.y<=i?t.childs().topLineWidth.value():t.childs().bottomLineWidth.value();break;default:c=l.lineStyle.childs().linewidth.value()}const h=it(this._duration(),a);this._renderer.setData({seriesLineColor:a,seriesLineWidth:c,fillColor:h.fillColor,strokeColor:h.strokeColor,radius:h.radius,center:o})}_updateRendererDataStage(){const e=this._renderer.data();if(null!==e){const t=it(this._duration(),e.seriesLineColor);e.fillColor=t.fillColor,e.strokeColor=t.strokeColor,e.radius=t.radius}}_duration(){return this.animationActive()?performance.now()-this._startTime:2599}}var rt=i(36646),nt=i(77213),ot=i(7578),at=i(92133),lt=i(1975);const ct=b.enabled("chart_style_hilo_last_price");class ht extends lt.SeriesHorizontalLinePaneView{constructor(e){super(e),this._lineRendererData.linestyle=ke.LINESTYLE_DOTTED}_updateImpl(){this._lineRendererData.visible=!1;const e=this._series.properties().childs();if(!e.showPriceLine.value())return;if(!ct&&12===e.style.value())return;const t=this._series.lastValueData(void 0,!0);t.noData||(this._lineRendererData.visible=!0,this._lineRendererData.y=t.coordinate,this._lineRendererData.color=this._series.priceLineColor(t.color),this._lineRendererData.linewidth=e.priceLineWidth.value())}}var dt=i(74234),ut=i(16199),pt=i(78201),_t=i(83438),mt=i(15381),gt=i(9657),ft=i(36767),vt=i(29639),St=i(55014),yt=i(53074),bt=i(59386);class wt extends mt.SeriesCandlesPaneView{renderer(e,t){this._invalidated&&(this._updateImpl(null),this._invalidated=!1);const i=this._source.priceScale();if(!i)return null;const s=this._source.properties().childs().haStyle.childs(),r=this._model.timeScale().barSpacing(),n={bars:this._bars,barSpacing:r,bodyVisible:s.drawBody.value(),borderVisible:s.drawBorder.value(),borderColor:s.borderColor.value(),wickColor:s.wickColor.value(),barWidth:(0,St.optimalBarWidth)(r),wickVisible:s.drawWick.value(),isPriceScaleInverted:i.isInverted()},o=new vt.CompositeRenderer;return o.append(new bt.PaneRendererCandles(n)), -this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&o.append(new yt.SelectionRenderer(this._selectionData)),o}}var Ct=i(73436),Pt=i(14224),Tt=i(98799),xt=i(2250),It=i(89215),Mt=i(69145);const At=b.enabled("price_scale_always_last_bar_value"),Lt=b.enabled("display_data_mode"),kt=(r.CheckMobile.any(),!b.enabled("hide_series_legend_item")),Et=b.enabled("hide_price_scale_global_last_bar_value"),Dt=b.enabled("show_average_close_price_line_and_label"),Vt=b.enabled("no_bars_status"),Bt=b.enabled("charting_library_debug_mode"),Rt=b.enabled("chart_style_hilo_last_price"),Nt=(0,a.getLogger)("Chart.Series"),Ot=b.enabled("pre_post_market_sessions");const Ft={countdownEnabled:!0,lastPriceAnimationEnabled:!0};function Wt(e,t,i){return void 0===t?null:`${e}=${t} (${i?"changed":"unchanged"})`}function Ht(e){const t=e.state();return t.data.forEach((e=>e.value.splice(7,1))),t}class zt extends l.PriceDataSource{constructor(e,t,i,r){super(e,"_seriesId"),this.requestingIntradayWhenNotSupported=new(Ye()),this.requestingStyleIsNotSupported=new(Ye()),this.requestingStyleSupportRecovered=new(Ye()),this.requestingResolutionLessThanFrequency=new(Ye()),this._paneView=null,this._futureBarsPaneView=null,this._projectionBarsPaneView=null,this._waterlineView=null,this._priceLineView=null,this._gotoDateView=null,this._baseHorizontalLineView=null,this._priceStep=null,this._symbolInfo=null,this._prevSymbolInfo=null,this._isPrePostMarketPricesAvailableProperty=new(_())(!1),this._isBackAdjustmentForbiddenProperty=new(_())(!0),this._isSettlementAsCloseForbiddenProperty=new(_())(!0),this._highLowPriceCache=new Map,this._averagePriceCache=new Map,this._prevClosePriceAxisView=null,this._priceScaleChanged=new(Ye()),this._priceScaleAboutToBeChanged=new(Ye()),this._onRestarted=new(Ye()),this._onStatusChanged=new(Ye()),this._extendedHoursChanged=new(Ye()),this._tagsChanged=new(Ye()),this._intervalChanged=new(Ye()),this._sessionIdChanged=new(Ye()),this._requestMoreDataAvailable=!0,this._lineStyleLastPriceCirclePaneView=new st(this),this._prevClosePriceLineView=null,this._dataPoweredBy=null,this._loading=!0,this._seriesLoaded=!1,this._status=0,this._symbolResolvingActive=new(G())(!1),this._predictBars=0,this._syncModel=null,this._data=null,this._lastCompleteFlags=null,this._haStyle={studyId:(0,s.ensureNotNull)((0,m.chartStyleStudyId)(8,!0))},this._renkoStyle={studyId:(0,s.ensureNotNull)((0,m.chartStyleStudyId)(4,!0))},this._pbStyle={studyId:(0,s.ensureNotNull)((0,m.chartStyleStudyId)(7,!0))},this._kagiStyle={studyId:(0,s.ensureNotNull)((0,m.chartStyleStudyId)(5,!0))},this._pnfStyle={studyId:(0,s.ensureNotNull)((0,m.chartStyleStudyId)(6,!0))},this._rangeStyle={studyId:(0,s.ensureNotNull)((0,m.chartStyleStudyId)(11,!0))},this._barColorerCache=null,this._boxSizeValue=new(G()),this._base=100,this._pointValue=1,this._formattingDeps=null,this._formatter=new f.PriceFormatter(this._base),this._ignoreMinMoveFormatter=new f.PriceFormatter(this._base),this._ignoreMinMovePriceStep=null,this._lastBarCloseTime=null, -this._onSessionIdPropertyChangedBound=this._onSessionIdPropertyChanged.bind(this),this._ignoreSessionIdProxyPropertyChanges=!1,this._textSourceIsAlwaysTickerRestrictionEnabled=!1,this._lastPriceAnimationActive=!1,this._currentSession="out_of_session",this._onStyleChanged=new(Ye()),this._intervalObj=null,this._obsoleteZOrder=0,this._seriesErrorMessage=null,this._seriesAlwaysFalseHibernatedVW=new(G())(!1),this._styleToRecover=null,this._precomputedBarStyles=new WeakMap,this._doNotShowLastAvailableBar=!1,this._gotoDateResultCleared=!1,this._endOfDataPaneView=null,this._pendingTimeRange=null,this._replaySubscriber=null,this._symbolIntervalChanged=new(Ye()),this._isReplayResolutionAvailableForUser=null,this._onInReplayStateChanged=new(Ye()),this._replayExitedDueUnsupportedInterval=new(Ye()),this._replayExitedDueUnavailableForUserInterval=new(Ye()),this._onTimeFrameApplied=new(Ye()),this._prevRequestedInterval="",this._isActingAsSymbolSource=new(G())(!0),this._seriesSource=new nt.SeriesDataSource(e.chartApi(),"s",r);const n=this._seriesSource.dataEvents();n.symbolResolved().subscribe(this,this._onSymbolResolved),n.symbolError().subscribe(this,this._onSymbolError),n.seriesTimeFrame().subscribe(this,this._onSeriesTimeFrame),n.seriesError().subscribe(this,this._onSeriesError),n.loading().subscribe(this,this._onSeriesLoading),n.completed().subscribe(this,this._onSeriesCompleted),n.dataUpdated().subscribe(this,this._onDataUpdated),n.barReceived().subscribe(this,this._onBarReceived),this._quotesProvider=new _e.QuotesProvider,this._quotesProvider.quotesUpdate().subscribe(this,this._onQuotesUpdate);const o=t.childs();if(t.hasChild("extendedHours")){(0,s.ensureDefined)(o.extendedHours).value()&&!t.hasChild("sessionId")&&t.addChild("sessionId",new(_())("extended")),t.removeProperty("extendedHours")}t.hasChild("sessionId")||t.addChild("sessionId",new(_())(g.SubsessionId.Regular)),this._setProperties(t),this._sessionIdProxyProperty=new(_())(o.sessionId.value()),o.sessionId.subscribe(this,(()=>this._updateSessionIdProxyProperty())),this._sessionIdProxyProperty.subscribe(this,this._onSessionIdProxyPropertyChanged),this._symbolTextSourceProxyProperty=new(_()),this._recalcSymbolTextSourceProxyProperty(),o.statusViewStyle.childs().symbolTextSource.subscribe(this,this._recalcSymbolTextSourceProxyProperty),this._symbolTextSourceProxyProperty.subscribe(this,(()=>e.lightUpdate())),this._options=(0,ue.merge)((0,ue.clone)(Ft),i),this._prevChartStyle=o.style.value(),this._priceAxisView=new Te(this,e,{alwaysShowGlobalLast:!Et,showCountdown:i.countdownEnabled});let a=null;At||Et||(a=new Te(this,e,{visibleOnHistoryOnly:!0,showSymbolLabel:!1,showCountdown:!1,alwaysShowGlobalLast:!1,useSolidBodyColor:!1})),this._priceLinePriceAxisView=new xe.SeriesPriceLineAxisView(this),this._priceLineAxisViews=[this._priceLinePriceAxisView];const l=new Ie(this,e,{showCountdown:i.countdownEnabled});this._priceAxisViews=[this._priceAxisView,l],null!==a&&this._priceAxisViews.push(a),this._panePriceAxisView=new Me.PanePriceAxisView(this._priceAxisView,this,e), -this._historyPricePanePriceAxisView=null!==a?new Me.PanePriceAxisView(a,this,e):null,this._projectionPriceAxisView=new Me.PanePriceAxisView(l,this,e),this._labelPaneViews=[this._panePriceAxisView,this._projectionPriceAxisView],null!==this._historyPricePanePriceAxisView&&this._labelPaneViews.push(this._historyPricePanePriceAxisView),this._highLowAvgPaneViews=[],this._averagePaneViews=[],Dt&&this._createAverageViews(),this._createHighLowAvgViews(),this._subscribeRestartToSessionIdChange(),o.visible.subscribe(this,this._updateLastPriceAnimationActive),this._updateLastPriceAnimationActive(),this._dataWindowView=new O(this,e),this._legendView=new U(this,e),this._statusView=new L(this,this._model.properties().childs().scalesProperties.childs().textColor,o.statusViewStyle),this._marketStatusModel=new X(this._quotesProvider,o.symbol.listeners()),this._dataUpdatedModeModel=Lt?new he({getter:this.symbolInfo.bind(this),onChange:n.symbolResolved()},{getter:this.status.bind(this),onChange:this._onStatusChanged},{getter:()=>{var e;return null===(e=this._lastCompleteFlags)||void 0===e?void 0:e.rt_update_period},onChange:n.completed()},o.symbol.listeners()):null,this._dataProblemModel=new pe(this._quotesProvider,o.symbol.listeners()),this._symbolResolvingActive.subscribe((()=>e.realignLineTools())),this._intervalChanged.subscribe(this,(()=>e.realignLineTools()))}supportsPressedChunks(){return!0}pressedChunks(e,t){return this.data().pressedChunks(e,t)}seriesErrorMessage(){return this._seriesErrorMessage}destroy(){this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._quotesProvider.destroy(),this._model.timeScale().visibleBarsStrictRangeChanged().unsubscribeAll(this),this._unsubscribeRestartToSessionIdChange(),this._replayExitedDueUnsupportedInterval.destroy(),this._replayExitedDueUnavailableForUserInterval.destroy(),this._onTimeFrameApplied.destroy()}isActingAsSymbolSource(){return this._isActingAsSymbolSource.readonly()}barColorer(){if(this._barColorerCache)return this._barColorerCache;let e=null;const t=this._model.dataSources();for(let i=t.length-1;i>=0;i--){const r=t[i];if((0,It.isStudy)(r)&&r.hasBarColorer()&&!r.isSourceHidden()){const t=(0,s.ensureNotNull)(r.barColorer());null===e?e=t:e.pushBackBarColorer(t)}}return null===e?e=new xt.SeriesBarColorer(this):e.pushBackBarColorer(new xt.SeriesBarColorer(this)),this._barColorerCache=e,e}createPaneView(){this._paneView=null,this._projectionBarsPaneView=null,this._waterlineView=null,this._priceLineView=this.hasClosePrice()?new ht(this):null;const e=this._properties.childs().style.value();switch(e){case 0:this._paneView=new _t.SeriesBarsPaneView(this,this._model);break;case 1:this._paneView=new mt.SeriesCandlesPaneView(this,this._model);break;case 2:this._paneView=new gt.SeriesLinePaneView(this,this._model);break;case 3:this._paneView=new ft.SeriesAreaPaneView(this,this._model);break;case 8:this._paneView=new wt(this,this._model);break;case 9:this._paneView=new Ct.SeriesHollowCandlesPaneView(this,this._model);break;case 13: -this._paneView=new pt.SeriesColumnsPaneView(this,this._model);break;case 10:{this._paneView=new Pt.SeriesBaselinePaneView(this,this._model);const e=this._properties.childs().baselineStyle.childs();this._waterlineView=new dt.SeriesWaterlinePaneView({paneHeight:()=>this.priceScale().height(),color:()=>e.baselineColor.value(),baseLevelPercentage:()=>e.baseLevelPercentage.value()});break}case 12:this._paneView=new ut.SeriesHiLoPaneView(this,this._model)}if(null===this._paneView)throw Error("Unknown chart style assigned: "+e)}properties(){return this._properties}zorder(){return 0}quotesProvider(){return this._quotesProvider}currentSession(){return this._currentSession}syncModel(){if(!this._syncModel){const e=this.symbolInfo(),t=this.interval();if(!e||!t)return null;this._syncModel=new se(e,t)}return this._syncModel}labelPaneViews(){return this._labelPaneViews}topPaneViews(){const e=[];if(null!==this._gotoDateView&&e.push(this._gotoDateView),this._lastPriceAnimationActive){const t=this._lineStyleLastPriceCirclePaneView;t.animationActive()&&setTimeout((()=>this._model.invalidate(rt.InvalidationMask.cursor())),0),t.invalidateStage(),e.push(t)}return 0!==e.length?e:null}paneViews(){if(!this.properties().childs().visible.value())return null;const e=[(0,s.ensureNotNull)(this._baseHorizontalLineView),(0,s.ensureNotNull)(this._paneView)];return this._endOfDataPaneView&&e.push(this._endOfDataPaneView),this._futureBarsPaneView&&e.push(this._futureBarsPaneView),this._projectionBarsPaneView&&e.push(this._projectionBarsPaneView),null!==this._waterlineView&&e.push(this._waterlineView),null!==this._priceLineView&&e.push(this._priceLineView),e.push(...this._highLowAvgPaneViews),e.push(...this._averagePaneViews),e}priceAxisViews(e,t){return e.findTargetPriceAxisViews(this,t,this._priceAxisViews,this._priceLineAxisViews)}clearHighLowPriceCache(){this._highLowPriceCache.clear()}clearAveragePriceCache(){this._averagePriceCache.clear()}priceScaleChanged(){return this._priceScaleChanged}priceScaleAboutToBeChanged(){return this._priceScaleAboutToBeChanged}disconnect(){this._seriesSource.stop(),this._predictBars=0,this._status=0,this._model.isSnapshot()||(this._prevSymbolInfo=null,this._symbolInfo=null)}isStarted(){return this._seriesSource.isStarted()}restart(e=!0){if(5===this._status)return;this._loading=!0,this._lastCompleteFlags=null,this._onRestarted.fire(),this._setStatus(1),this._updateSymbolInfo(null,e);let t=this._properties.childs().interval.value();J.Interval.isEqual(t,this._prevRequestedInterval)&&this._notifyIntervalChanged(t);let i=null;this._pendingTimeRange&&(i=this._pendingTimeRange,this._pendingTimeRange=null),this._onBeforeModifySeries(this.getSymbolString(),t),this._onTimeFrameApplied.fire(i),t=(0,at.getServerInterval)(t),this._data=null,this._seriesSource.modifySeries(this._getResolvingSymbolObject(),t,i),this._seriesSource.isStarted()||this._seriesSource.start(),this._prevRequestedInterval=this.interval(),this.updateAllViews((0,ye.sourceChangeEvent)(this.id())),this._model.lightUpdate()}isSymbolInvalid(){ -return 4===this._status}getSymbolString(){return(0,Xe.encodeExtendedSymbolOrGetSimpleSymbolString)(this._getSymbolObject())}invalidateBarStylesCache(e){Nt.logDebug("Invalidate style cache starting from "+e),this._clearStylePlot(this.bars(),e),this._clearStylePlot(this.nsBars())}isStatusBad(){return 12===this.status()||4===this.status()||10===this.status()}isStatusError(){return 12===this.status()}actualSymbol(){return(0,m.actualSymbol)(this.symbolInfo(),this.symbol())}proSymbol(){return(0,m.proSymbol)(this.symbolInfo(),this.symbol())}onStyleChanged(){return this._onStyleChanged}style(){return this.properties().childs().style.value()}setStyle(e){this.setSymbolParams({style:e})}isRangeBasedStyle(){return(0,m.isRangeBasedStyle)(this.style())}symbolSameAsCurrent(e){return(0,Ke.symbolSameAsCurrent)(e,this.symbolInfo())}status(){return this._status}symbol(){return this.properties().childs().symbol.value()}symbolInfo(){return this._symbolInfo}symbolResolved(){return this.dataEvents().symbolResolved()}symbolResolvingActive(){return this._symbolResolvingActive}symbolHibernated(){return this._seriesAlwaysFalseHibernatedVW}firstValue(){const e=this.firstBar();return null===e?null:this._barFunction(e,0)}firstBar(){const e=this.model().timeScale().visibleBarsStrictRange();if(null===e)return null;const t=e.firstBar(),i=this.data().search(t,d.PlotRowSearchMode.NearestRight);return null!==i?i.value:null}formatter(e=!0){return e?this._formatter:this._ignoreMinMoveFormatter}priceStep(e=!0){return e?this._priceStep:this._ignoreMinMovePriceStep}bars(){return this.data().bars()}nsBars(){return this.data().nsBars()}interval(){return this.properties().childs().interval.value()}setInterval(e){this.setSymbolParams({interval:e})}intervalObj(){const e=this.interval();if(null!==this._intervalObj&&this._intervalObj.resolutionString===e)return this._intervalObj.interval;const t=J.Interval.parse(e);return this._intervalObj={resolutionString:e,interval:t},t}prevClose(){const e=this.priceScale();if(e.isEmpty()||this.data().isEmpty())return null;const t=this.quotes(),i=this.firstValue();if(null===t||null===i)return null;const s=t.prev_close_price;return void 0===s?null:{coordinate:e.priceToCoordinate(s,i),floatCoordinate:e.priceToCoordinate(s,i),formattedPricePercentage:e.formatPricePercentage(s,i,!0),formattedPriceAbsolute:e.formatPriceAbsolute(s),formattedPriceIndexedTo100:e.formatPriceIndexedTo100(s,i)}}priceLineColor(e){return this.properties().childs().priceLineColor.value()||e}hasClosePrice(){return Rt||12!==this.properties().childs().style.value()}lastValueData(e,t,i){var s;const r={noData:!0},n=this.priceScale();if(this.model().timeScale().isEmpty()||n.isEmpty()||this.data().isEmpty())return r;const o=this.model().timeScale().visibleBarsStrictRange(),a=this.firstValue();if(null===o||null===a)return r;let l,c;if(t){const e=this.data().bars().last();if(null===e)return r;l=e.value,c=e.index}else{const e=this.data().bars().search(o.lastBar(),d.PlotRowSearchMode.NearestLeft);if(null===e)return r;l=e.value,c=e.index} -const h=null!==(s=void 0!==e?l[e]:this._barFunction(l,2))&&void 0!==s?s:NaN,u=this.barColorer().barStyle(c,!1),p=n.priceToCoordinate(h,a),_={...n.getFormattedValues(h,a,!0),noData:!1,color:u.barColor,floatCoordinate:p,coordinate:p,index:c};return i&&(_.price=h),_}isDWM(){return this.intervalObj().isDWM()}data(){var e;return null!==(e=this._data)&&void 0!==e?e:this._seriesSource.data()}clearData(){(0,s.assert)(null===this._data,"Cannot clear loaded data"),this._seriesSource.clearData()}nearestValue(e,t,i){var s;const r=this.nearestData(e,i);return null!==(s=null==r?void 0:r.value[t])&&void 0!==s?s:void 0}onSymbolIntervalChanged(){return this._symbolIntervalChanged}onIntervalChanged(){return this._intervalChanged}onStatusChanged(){return this._onStatusChanged}onRestarted(){return this._onRestarted}onExtendedHoursChanged(){return this._extendedHoursChanged}requestMoreData(e){if(3!==this._status&&7!==this._status&&8!==this._status&&9!==this._status&&6!==this._status&&11!==this._status)return;if(this._model.timeScale().isEmpty())return;const t=this._model.timeScale().visibleBarsStrictRange();if(null===t)return;if(0===this.bars().size())return;const i=t.lastBar()-(0,s.ensureNotNull)(this.data().last()).index;if(this._predictBarst.update(e))),this._highLowAvgPaneViews.forEach((t=>t.update(e))),this._labelPaneViews.forEach((t=>t.update(e))),this._priceAxisViews.forEach((t=>t.update(e))),this._priceLineAxisViews.forEach((t=>t.update(e))),null===(i=this._futureBarsPaneView)||void 0===i||i.update(e),null===(s=this._projectionBarsPaneView)||void 0===s||s.update(e),null===(r=this._waterlineView)||void 0===r||r.update(e),null===(n=this._priceLineView)||void 0===n||n.update(e),null===(o=this._gotoDateView)||void 0===o||o.update(e),null===(a=this._endOfDataPaneView)||void 0===a||a.update(e),null===(l=this._baseHorizontalLineView)||void 0===l||l.update(e);const c=this._model.activeStrategySource().value();null==c||c.updateAllViews(e),this._lineStyleLastPriceCirclePaneView.update(e)}barFunction(){return this._barFunction}precomputedBarStyle(e){return this._precomputedBarStyles.get(e)}setPrecomputedBarStyle(e,t){this._precomputedBarStyles.set(e,t)}setSymbolParams(e){const{symbol:t,currency:i,unit:r,style:n}=e;let o=e.interval;const a=this.properties().childs(),l=this._symbolInfo;let c,h,d;if(null!==l?(c=void 0!==t&&!(0,Ke.symbolSameAsCurrent)(t,l),h=void 0!==i&&!(0,Ke.currenciesAreSame)(i,l),d=void 0!==r&&!(0,Ke.unitsAreSame)(r,l,this._model.unitConversionEnabled())):(c=void 0!==t&&t!==a.symbol.value(),h=void 0!==i&&i!==a.currencyId.value(),d=void 0!==r&&r!==a.unitId.value()),void 0!==o&&!c){const e=this.getSupportedResolution(o,!1);e!==o&&(Nt.logWarn(`Change interval value from ${o} to ${e} because first is not supported`),o=e)}const u=void 0!==o&&!J.Interval.isEqual(a.interval.value(),o),p=void 0!==n&&n!==a.style.value(),_=[Wt("symbol",t,c),Wt("interval",o,u),Wt("currency",i,h),Wt("unit",r,d),Wt("style",n,p)].filter((e=>null!==e)).join("; ");Nt.logInfo(`Applying series symbol params: ${_}`),void 0!==t&&a.symbol.setValue(t),void 0!==i&&a.currencyId.setValue(i),void 0!==r&&a.unitId.setValue(r),u&&a.interval.setValue((0,s.ensureDefined)(o)),p&&a.style.setValue(n);let m=!1;if(p){m=this.isNeedRestart();const e=!c&&(h||d);this.onChartStyleChanged(e)}!m&&(c||u||h||d)&&this._applySymbolParamsChanges({symbolChanged:c,currencyChanged:h, -unitChanged:d,intervalChanged:u,styleChanged:p}),(c||h||d)&&this.model().checkLineToolSelection()}setSymbol(e){this.setSymbolParams({symbol:e})}currency(){return this.properties().childs().currencyId.value()||null}setCurrency(e){this.setSymbolParams({currency:e})}isConvertedToOtherCurrency(){return(0,m.isConvertedToOtherCurrency)(this.symbolInfo())}unit(){return this.properties().childs().unitId.value()||null}setUnit(e){this.setSymbolParams({unit:e})}measureUnitId(){return(0,m.measureUnitId)(this.symbolInfo())}isConvertedToOtherUnit(){return(0,m.isConvertedToOtherUnit)(this.symbolInfo(),this._model.unitConversionEnabled())}symbolSource(){return this}barsProvider(){return this}title(){return this.symbolTitle()}name(){return this.symbolTitle()}symbolTitle(e,t,i="exchange"){let s=this.properties().childs().symbol.value();const r=this.symbolInfo();if(null!==r){const{type:t}=r;s=(0,m.symbolTitle)(r,e,"forex"===t?"exchange":i)}return t?s:`${s}, ${(0,P.translatedIntervalString)(this.properties().childs().interval.value())}`}setObsoleteZOrder(e){this._obsoleteZOrder=e}obsoleteZOrder(){return this._obsoleteZOrder}valuesProvider(){return new W(this,this.model())}statusProvider(e){return new A(this,this._model.properties().childs().scalesProperties.childs().textColor,this.properties().childs().statusViewStyle,e)}open(e){const t=this.data().valueAt(e);return t&&t[1]}high(e){const t=this.data().valueAt(e);return t&&t[2]}low(e){const t=this.data().valueAt(e);return t&&t[3]}close(e){const t=this.data().valueAt(e);return t&&t[4]}moveItem(e,t,i){if(10===this.style()&&0===t){const t=this.priceScale(),i=this.properties().childs().baselineStyle,s=t.height(),r=100-e.y/s*100,n=r<0?0:Math.round(10*r)/10;i.childs().baseLevelPercentage.setValue(Math.max(Math.min(n,100),0))}}rerequestData(){this._applySymbolParamsChanges({force:!0})}switchToReplay(e,t){throw new Error("Not implemented")}switchToRealtime(){throw new Error("Not implemented")}requestMoreDataAvailable(){return this._requestMoreDataAvailable}seriesLoaded(){return this._seriesLoaded}endOfData(){var e;return void 0!==(null===(e=this._lastCompleteFlags)||void 0===e?void 0:e.data_completed)}endOfDataType(){var e,t;return null!==(t=null===(e=this._lastCompleteFlags)||void 0===e?void 0:e.data_completed)&&void 0!==t?t:null}dataPoweredBy(){return null}boxSizeValue(){return this._boxSizeValue}isUserDeletable(){return!1}changeTimeFrame(){(0,n.trackEvent)("GUI","Change timeframe")}onTagsChanged(){return this._tagsChanged}state(e){var t;const i=this.obsoleteZOrder();let s={type:"MainSeries",id:this.id(),zorder:i,haStyle:this._haStyle,renkoStyle:this._renkoStyle,pbStyle:this._pbStyle,kagiStyle:this._kagiStyle,pnfStyle:this._pnfStyle,rangeStyle:this._rangeStyle,formattingDeps:this._formattingDeps};const r=this.properties().state();if((null===(t=this._symbolInfo)||void 0===t?void 0:t.ticker)&&(r.symbol=this._symbolInfo.ticker),this._model.unitConversionEnabled()||(r.unitId=null),s.state=r,e){let e=this.bars();const t=this._model.timeScale().visibleExtendedDataRange(e,0) -;null!==t&&(e=e.range(t.firstBar(),t.lastBar())),s={...s,bars:Ht(e),nsBars:Ht(this.nsBars()),symbolInfo:this._symbolInfo,rtPrice:this.data().lastProjectionPrice,boxSize:this.data().boxSize,reversalAmount:this.data().reversalAmount}}return s}restoreState(e,t){if(t&&this._setStatus(5),!this._model.unitConversionEnabled()&&e.state&&delete e.state.unitId,this._properties.mergeAndFire(e.state),this._properties.hasChild("esdBreaksStyle")&&this._properties.removeProperty("esdBreaksStyle"),this._prevChartStyle=this.properties().childs().style.value(),this.createPaneView(),t){const t=e;this.restoreData(t.bars,t.nsBars,t.symbolInfo,t.rtPrice,t.boxSize,t.reversalAmount)}e.formattingDeps&&(this._formattingDeps=e.formattingDeps,this._recreatePriceFormattingDependencies())}restoreData(e,t,i,s,r,n){this._status=5,this._data=new c.SeriesData,this._data.bars().restoreState(e),this._data.nsBars().restoreState(t),this._updateSymbolInfo(i,!1),this._data.lastProjectionPrice=s,this._data.boxSize=r;const o=this.properties().childs();r||(6===o.style.value()?this._data.boxSize=o.pnfStyle.childs().inputs.childs().boxSize.value():4===o.style.value()&&(this._data.boxSize=o.renkoStyle.childs().inputs.childs().boxSize.value())),this._data.reversalAmount=n,n||5===o.style.value()&&(this._data.reversalAmount=o.kagiStyle.childs().inputs.childs().reversalAmount.value()),this._loading=!1}async setGotoDateResult(e,t){this._gotoDateResultCleared=!1;const s=await i.e(4079).then(i.bind(i,90225));this._gotoDateResultCleared||(this._gotoDateView=new s.GotoDateView(this,e,t),this._gotoDateView.doNotShowLastAvailableBar(this._doNotShowLastAvailableBar),this._model.updateSource(this))}clearGotoDateResult(){this._gotoDateView=null,this._gotoDateResultCleared=!0}doNotShowLastAvailableBar(e){var t;this._doNotShowLastAvailableBar=e,null===(t=this._gotoDateView)||void 0===t||t.doNotShowLastAvailableBar(e)}dataUpdated(){return this.dataEvents().dataUpdated()}getSupportedResolution(e,t=!0){if(null===this._symbolInfo||!(0,Ke.symbolSameAsCurrent)(this.symbol(),this._symbolInfo))return e;if(J.Interval.isRange(e)&&(0,m.isCloseBasedSymbol)(this._symbolInfo)){const t=this.interval();if(!J.Interval.isRange(t))return t;e="1D"}const i=this._symbolInfo.data_frequency;if(void 0!==i){let s=(0,at.getApplicableIntervalForFrequency)(i,e);if(s!==e){this._model.defaultResolutions();return t&&this.requestingResolutionLessThanFrequency.fire(i,s),s}}if(J.Interval.isIntraday(e)&&!this._symbolInfo.has_intraday)return t&&this.requestingIntradayWhenNotSupported.fire(),"D";if(this._symbolInfo.hasOwnProperty("supported_resolutions")){const t=J.Interval.normalize(e),i=this._symbolInfo.supported_resolutions;if(null!==t&&-1===i.indexOf(t))return i[0]}return e}_barsState(e){const t=e.state();return t.data.forEach((e=>e.value.splice(7,1))),t}_updateBarFunction(){this._barFunction=(0,Tt.barFunctionByStyle)(this.style(),this.priceSource())}_setProperties(e){e.hasChild("timeframe")||e.merge({timeframe:""}),e.hasChild("shortName")||e.merge({shortName:""}), -e.hasChild("currencyId")||e.addChild("currencyId",new(_())(null)),e.hasChild("unitId")||e.addChild("unitId",new(_())(null)),this._properties=e;const t=e.childs();t.currencyId.subscribe(this,this._onCurrencyChanged),t.unitId.subscribe(this,this._onUnitChanged),t.timeframe.subscribe(this,this.changeTimeFrame),e.subscribe(this,this._onPropertiesChanged)}_updateSessionIdProxyProperty(e){const t=this._properties.childs().sessionId.value();let i=t;if(e){const e=this.symbolInfo();null!==e&&(i=e.subsession_id||t)}this._ignoreSessionIdProxyPropertyChanges=!0,this._sessionIdProxyProperty.setValue(i),this._ignoreSessionIdProxyPropertyChanges=!1}_onSessionIdProxyPropertyChanged(){this._ignoreSessionIdProxyPropertyChanges||this._properties.childs().sessionId.setValue(this._sessionIdProxyProperty.value()),this._updateLastPriceAnimationActive()}_onSymbolResolved(e){this._seriesErrorMessage=null,this._updateSymbolInfo(e,!1),this._model.updateSource(this),this._model.onWidget()||((0,n.trackEvent)("Symbol",e.listed_exchange,e.name),(0,n.trackEvent)("Symbol Type",e.type,e.listed_exchange));const t=e.minmov/e.pricescale,i=this.properties().childs();4===i.style.value()&&i.renkoStyle.childs().inputs.childs().boxSize.value(){e[t]=i[t].toString()})),t=t.format(e)}Bt&&Nt.logNormal("Error reason: "+t),this._seriesErrorMessage=t;const s="unknown_symbol"!==t?12:Vt&&this._symbolInfo?10:4;this._setStatus(s),this._seriesLoaded=!0,this._enablePriceRangeReady()}_onSeriesLoading(e){this._loading=!0,this._setStatus(2)}_onDataUpdated(e,t){t?this._requestMoreDataAvailable=!0:this._lastPriceAnimationActive&&this._seriesLoaded&&this._lineStyleLastPriceCirclePaneView.update((0,ye.sourceChangeEvent)(this.id())),this._lastBarCloseTime=e&&e.closeTime||null,this._boxSizeValue.setValue(this.data().boxSize),this._statusView.update(),this.clearAveragePriceCache(),this.clearHighLowPriceCache();const i=this.model(),r=(0,s.ensureNotNull)(i.paneForSource(this));i.recalculatePane(r,(0, -ye.sourceChangeEvent)({sourceId:this.id(),realtime:!t})),i.updateSource(this)}_setStatus(e){this._status=e,this._statusView.update(),this.model().updateSource(this),this._onStatusChanged.fire()}_onBarReceived(e){this.model().recalcVisibleRangeStudies(!0)}_recreateFormatter(){var e,t,i;let s=null;s=null!==(t=null===(e=null===Mt.customFormatters||void 0===Mt.customFormatters?void 0:Mt.customFormatters.priceFormatterFactory)||void 0===e?void 0:e.call(Mt.customFormatters,this.symbolInfo(),this.properties().childs().minTick.value()))&&void 0!==t?t:null,null!==s?(this._formatter=s,this._ignoreMinMoveFormatter=s):(this._formatter=(0,m.createSeriesFormatter)(null!==(i=this.symbolInfo())&&void 0!==i?i:this._formattingDeps,this.properties().childs().minTick.value()),this._ignoreMinMoveFormatter=(0,m.createSeriesFormatter)(this.symbolInfo(),this.properties().childs().minTick.value(),!0)),this.priceScale()&&this.priceScale().updateFormatter(),this._formatterChanged.fire()}_recreatePriceStep(){const{minMove:e,priceScale:t}=(0,m.getSeriesPriceFormattingState)(this.symbolInfo()),i=e/t;this._ignoreMinMovePriceStep=1/t,this._priceStep!==i&&(this._priceStep=i,this._priceStepChanged.fire())}_recreatePriceFormattingDependencies(){this._recreateFormatter(),this._recreatePriceStep()}_onQuotesUpdate(e,t){void 0!==e.values.current_session&&e.values.current_session!==this._currentSession&&(this._currentSession=e.values.current_session,this._updateLastPriceAnimationActive())}_updateIsPrePostMarketPricesForbiddenProperty(){const e=(0,m.symbolHasPreOrPostMarket)(this._symbolInfo)&&(this.isDWM()||(0,m.isRegularSessionId)(this.sessionIdProxyProperty().value()));this._isPrePostMarketPricesAvailableProperty.setValue(e)}_updateSettlementAsCloseForbiddenProperty(){}_updateBackAdjustmentForbiddenProperty(){}_removeReplaySubscriber(){throw new Error("Not implemented")}_getSymbolForApi(){return(0,m.symbolForApi)(this.symbolInfo()||this._prevSymbolInfo,this.symbol())}_getSymbolObject(){const e=this._getExtendedSymbolObject();if(v.SYMBOL_STRING_DATA.hasOwnProperty(this.properties().childs().style.value())){return{symbol:e,type:this.styleStudyInfo(this.getStyleShortName()+"Style").studyId+"!",inputs:this.getInputsProperties().state()}}return e}_getExtendedSymbolObject(){const e={symbol:this._getSymbolForApi()},t=this.properties().childs();null!==this.currency()&&(e["currency-id"]=this.currency());const i=this.unit();return this._model.unitConversionEnabled()&&null!==i&&(e["unit-id"]=i),!this.isDWM()&&Ot&&(e.session=t.sessionId.value()),e}_checkChartStyle(){const e=this.style();(0,m.isCloseBasedSymbol)(this.symbolInfo())?(0,m.isSingleValueBasedStyle)(e)||(this.requestingStyleIsNotSupported.fire(),this._styleToRecover={correctedStyle:this.style(),originalStyle:e}):null!==this._styleToRecover&&(this.requestingStyleSupportRecovered.fire(this._styleToRecover.originalStyle),this._styleToRecover=null)}_updateSymbolInfo(e,t){if(this._prevSymbolInfo=t?this._symbolInfo:null,this._symbolInfo=e,e){const t=this._properties.childs();t.shortName.setValue(e.name) -;const i=(0,m.extractSymbolNameFromSymbolInfo)(e,this.symbol());i&&t.symbol.setValue(i);const s=(0,m.symbolCurrency)(e),r=(0,m.symbolUnit)(e,this._model.unitConversionEnabled());"alwaysOff"===(0,Z.currencyUnitVisibilityProperty)().value()||s===t.currencyId.value()&&r===t.unitId.value()||this._model.fullUpdate(),t.currencyId.setValue(s),t.unitId.setValue(r),this._updateSessionIdProxyProperty(!0)}this._base=e?e.pricescale/e.minmov:100,this._pointValue=e&&e.pointvalue||1;const i=this._getSymbolForApi();this._quotesProvider.setQuotesSessionSymbol(i),this._marketStatusModel.setSymbolInfo(e),e&&this._recreatePriceFormattingDependencies(),this._statusView.update(),this.priceScale().updateFormatter(),this._symbolResolvingActive.setValue(!e),Ot&&this._updateIsPrePostMarketPricesForbiddenProperty()}_createHighLowAvgViews(){const e=this.properties().childs().highLowAvgPrice,t=this._getHighLowPrice.bind(this),i=function(e,t,i,s){const r=i.childs(),n=Fe(e,t,{label:Ne,labelVisible:r.highLowPriceLabelsVisible,lineVisible:r.highLowPriceLinesVisible,lineColor:r.highLowPriceLinesColor,lineWidth:r.highLowPriceLinesWidth},(()=>s(0))),o=Fe(e,t,{label:Oe,labelVisible:r.highLowPriceLabelsVisible,lineVisible:r.highLowPriceLinesVisible,lineColor:r.highLowPriceLinesColor,lineWidth:r.highLowPriceLinesWidth},(()=>s(1)));return{paneViews:[n.paneView,o.paneView],panePriceAxisViews:[n.panePriceAxisView,o.panePriceAxisView],priceAxisViews:[n.priceAxisView,o.priceAxisView],priceLineAxisViews:[n.priceLineAxisView,o.priceLineAxisView]}}(this._model,this,e,t);this._highLowAvgPaneViews.push(...i.paneViews),this._labelPaneViews.push(...i.panePriceAxisViews),this._priceAxisViews.push(...i.priceAxisViews),this._priceLineAxisViews.push(...i.priceLineAxisViews)}_createAverageViews(){const e=this.properties().childs().highLowAvgPrice,t=this._getAveragePrice.bind(this),i=qe(this._model,this,e,t);this._averagePaneViews.push(...i.paneViews),this._labelPaneViews.push(...i.panePriceAxisViews),this._priceAxisViews.push(...i.priceAxisViews),this._priceLineAxisViews.push(...i.priceLineAxisViews)}_getHighLowPrice(e){if(!this._highLowPriceCache.has(e)){const e=this._model.timeScale().visibleBarsStrictRange();if(null===e)return null;const t=function(e,t,i){return e.minMaxOnRangeCached(t,i,[{name:"low",offset:0},{name:"high",offset:0}])}(this._model.mainSeries().bars(),e.firstBar(),e.lastBar());if(null===t)return null;this._highLowPriceCache.set(1,t.min),this._highLowPriceCache.set(0,t.max)}return this._highLowPriceCache.get(e)}_getAveragePrice(e){if(!this._averagePriceCache.has(e)){const e=this._model.timeScale().visibleBarsStrictRange();if(null===e)return null;const t=function(e,t,i){0;const s=(0,c.barFunction)("close");let r=0,n=0;for(let o=t;o<=i;o++){const t=e.valueAt(o);null!==t&&(r+=s(t),n++)}return n?r/n:null}(this._model.mainSeries().bars(),e.firstBar(),e.lastBar());if(null===t)return null;this._averagePriceCache.set(0,t)}return this._averagePriceCache.get(e)}_onSeriesCompleted(e){var t;this._loading=!1,this._seriesErrorMessage=null;let i=e.updateMode -;switch("pulsed"===i&&(i="delayed"),i){case"streaming":this._setStatus(3);break;case"endofday":this._setStatus(6);break;case"delayed":this._setStatus(8);break;case"replay":this._setStatus(11)}i.match(/delayed_streaming/)&&this._setStatus(9),this._lastCompleteFlags=null!==(t=e.flags)&&void 0!==t?t:null;const r=(0,s.ensureNotNull)(this._model.paneForSource(this));r.recalculatePriceScale(this.priceScale(),(0,ye.sourceChangeEvent)(this.id()));const n=rt.InvalidationMask.full();null!==this._model.appliedTimeFrame().value()&&n.lockVisibleTimeRangeOnResize(),this._model.invalidate(n),this.model().recalcVisibleRangeStudies(!0),this.model().recalcStudyBasedLineTools(),!this.priceScale().isLockScale()||this.model().timeScale().isEmpty()||this._seriesLoaded||(this.model().timeScale().correctOffset(),this.model().timeScale().correctBarSpacing(),this.model().resetPriceScale(r,this.priceScale())),this._seriesLoaded=!0,this._enablePriceRangeReady()}_notifyIntervalChanged(e){var t,i;const s={timeframe:null!==(t=this._pendingTimeRange)&&void 0!==t?t:void 0};this._intervalChanged.fire(e,s),this._pendingTimeRange=null!==(i=s.timeframe)&&void 0!==i?i:null}_onCurrencyChanged(){this._currencyChanged.fire()}_onUnitChanged(){this._unitChanged.fire()}_applySymbolParamsChanges(e){this._lastCompleteFlags=null,this.clearGotoDateResult();const t=this.interval();this.currency(),this.unit();J.Interval.isRange(t)&&this._properties.childs().rangeStyle.childs().inputs.childs().range.setValue(J.Interval.parse(t).multiplier());const{symbolChanged:i,intervalChanged:s,currencyChanged:r,unitChanged:n,force:o}=e,a=Ot&&s&&J.Interval.parse(t).isDWM()!=J.Interval.parse(t).isDWM();if(this._syncModel=null,this._prevRequestedInterval=t,5!==this._status&&(!this._seriesSource.isStarted()||i||r||n||a)&&this._updateSymbolInfo(null,!i&&(r||n)),5===this._status)return void this._model.realignLineTools();this._loading=!0,this._setStatus(1),Ot&&this._updateIsPrePostMarketPricesForbiddenProperty(),this._symbolIntervalChanged.fire(),s&&this._notifyIntervalChanged(t),this._onRestarted.fire(),this._seriesLoaded=!1,this._lineStyleLastPriceCirclePaneView.stopAnimation();let l=null;this._pendingTimeRange&&(l=this._pendingTimeRange,this._pendingTimeRange=null),this._onTimeFrameApplied.fire(l),this._onBeforeModifySeries(this.getSymbolString(),t),this._data=null,this._seriesSource.modifySeries(this._getResolvingSymbolObject(),(0,at.getServerInterval)(t),l,o),this._seriesSource.isStarted()||(this._predictBars=0,this._seriesSource.start()),(i||r||n)&&this.disablePriceRangeReady(),this.updateAllViews((0,ye.sourceChangeEvent)(this.id())),this._model.lightUpdate()}_isIntervalSupported(e){return!0}_onBeforeModifySeries(e,t){0}_getResolvingSymbolObject(){return this._getSymbolObject()}_onSessionIdPropertyChanged(){this._sessionIdChanged.fire(),this.isDWM()||(this.restart(),this._updateLastPriceAnimationActive())}_subscribeRestartToSessionIdChange(){this.properties().childs().sessionId.subscribe(this,this._onSessionIdPropertyChangedBound)}_unsubscribeRestartToSessionIdChange(){ -this.properties().childs().sessionId.unsubscribe(this,this._onSessionIdPropertyChangedBound)}_updateLastPriceAnimationActive(){if(!this._options.lastPriceAnimationEnabled)return;const e=this._lastPriceAnimationActive,t=this.properties().childs(),i=t.style.value();if(this._model.isSnapshot()||!t.visible.value()||3!==i&&10!==i&&2!==i)this._lastPriceAnimationActive=!1;else{const e=this.currentSession(),t=!(0,m.isRegularSessionId)(this.sessionIdProxyProperty().value())&&!this.isDWM();this._lastPriceAnimationActive="market"===e||t&&("pre_market"===e||"post_market"===e)}this._lastPriceAnimationActive&&e!==this._lastPriceAnimationActive&&this.model().invalidate(rt.InvalidationMask.cursor())}_onPropertiesChanged(e){const t=this._properties.childs();e!==t.symbol&&e!==t.interval&&e!==t.timeframe&&(this._tagsChanged.fire(),this.createPaneView(),this.updateAllViews((0,ye.sourceChangeEvent)(this._id)),this.model().updateSource(this),(0,o.emit)("series_properties_changed",this._id))}_recalcSymbolTextSourceProxyProperty(){this._textSourceIsAlwaysTickerRestrictionEnabled?this._symbolTextSourceProxyProperty.setValue("ticker"):this._symbolTextSourceProxyProperty.setValue(this._properties.childs().statusViewStyle.childs().symbolTextSource.value())}_clearStylePlot(e,t){if(0===e.size())return;if(void 0===t&&e!==this.nsBars())return void(this._precomputedBarStyles=new WeakMap);const i=null!=t?t:(0,s.ensureNotNull)(e.firstIndex()),r=(0,s.ensureNotNull)(e.lastIndex())+1;e.range(i,r).each(((e,t)=>(this._precomputedBarStyles.delete(t),!1)))}}},77906:(e,t,i)=>{"use strict";i.r(t),i.d(t,{STATUS_OFFLINE:()=>s,STATUS_RESOLVING:()=>r,STATUS_LOADING:()=>n,STATUS_READY:()=>o,STATUS_INVALID_SYMBOL:()=>a,STATUS_SNAPSHOT:()=>l,STATUS_EOD:()=>c,STATUS_PULSE:()=>h,STATUS_DELAYED:()=>d,STATUS_DELAYED_STREAMING:()=>u,STATUS_NO_BARS:()=>p,STATUS_REPLAY:()=>_,STATUS_ERROR:()=>m,SERIES_STATUS_TEXT:()=>g,STYLE_LINE_TYPE_MARKERS:()=>f,STYLE_LINE_TYPE_STEP:()=>v,STYLE_LINE_TYPE_SIMPLE:()=>S,STYLE_BARS:()=>y,STYLE_CANDLES:()=>b,STYLE_LINE:()=>w,STYLE_AREA:()=>C,STYLE_RENKO:()=>P,STYLE_KAGI:()=>T,STYLE_PNF:()=>x,STYLE_PB:()=>I,STYLE_HEIKEN_ASHI:()=>M,STYLE_HOLLOW_CANDLES:()=>A,STYLE_BASELINE:()=>L,STYLE_RANGE:()=>k,STYLE_HILO:()=>E,STYLE_COLUMNS:()=>D,STYLE_SHORT_NAMES:()=>V,SYMBOL_STRING_DATA:()=>B});const s=0,r=1,n=2,o=3,a=4,l=5,c=6,h=7,d=8,u=9,p=10,_=11,m=12,g={[s]:"connecting",[r]:"loading",[n]:"loading",[o]:"realtime",[a]:"invalid",[l]:"snapshot",[c]:"endofday",[h]:"endofday",[d]:"delayed",[u]:"delayed_streaming",[p]:"forbidden",[_]:"replay",[m]:"error"},f=0,v=1,S=2,y=0,b=1,w=2,C=3,P=4,T=5,x=6,I=7,M=8,A=9,L=10,k=11,E=12,D=13,V={0:"bar",1:"candle",9:"hollowCandle",2:"line",3:"area",4:"renko",7:"pb",5:"kagi",6:"pnf",8:"ha",10:"baseline",11:"range",12:"hilo",13:"column"},B={4:{type:"BarSetRenko@tv-prostudies",basicStudyVersion:64},7:{type:"BarSetPriceBreak@tv-prostudies",basicStudyVersion:34},5:{type:"BarSetKagi@tv-prostudies",basicStudyVersion:34},6:{type:"BarSetPnF@tv-prostudies",basicStudyVersion:34},8:{type:"BarSetHeikenAshi@tv-basicstudies", -basicStudyVersion:60},11:{type:"BarSetRange@tv-basicstudies",basicStudyVersion:72}}},22770:(e,t,i)=>{"use strict";i.d(t,{seriesPlotFunctionMap:()=>c,barFunction:()=>h,SeriesData:()=>p});var s,r=i(50151),n=i(88552),o=i(93975);!function(e){e[e.FromLeft=-1]="FromLeft",e[e.FromRight=1]="FromRight"}(s||(s={}));const a={open:e=>e[1],high:e=>e[2],low:e=>e[3],close:e=>e[4],hl2:e=>(e[2]+e[3])/2,hlc3:e=>(e[2]+e[3]+e[4])/3,ohlc4:e=>(e[1]+e[2]+e[3]+e[4])/4},l=["open","high","low","close","hl2","hlc3","ohlc4"];function c(){const e=new Map;return l.forEach(((t,i)=>{e.set(t,h(t))})),e}function h(e,t,i){const s=a[null!=t?t:e],r=a[e],n=a[null!=i?i:e];return(e,t)=>{switch(t){case 0:return s(e);case 2:return n(e);default:return r(e)}}}function d(e,t){return null==e[t]}const u=[{barsToMerge:10,forBarspacingLargerThen:.03},{barsToMerge:30,forBarspacingLargerThen:.01},{barsToMerge:100,forBarspacingLargerThen:.003},{barsToMerge:500,forBarspacingLargerThen:0}];class p{constructor(){this._pressedChunks={chunks:new Map,priceSource:"uninitialized"},this.m_bars=new n.PlotList(c(),d),this.m_nsBars=new n.PlotList(c(),d),this._clearPressedChunks()}bars(){return this.m_bars}nsBars(){return this.m_nsBars}pressedChunks(e,t){if(t!==this._pressedChunks.priceSource){this._pressedChunks.priceSource=t;const e=this.m_bars.first();e&&(this._clearPressedChunks(),this._rebuildPressedChunks(e))}const i=(0,r.ensureDefined)(u.find((t=>t.forBarspacingLargerThen<=e)));return(0,r.ensureDefined)(this._pressedChunks.chunks.get(i.barsToMerge))}mergeRegularBars(e){const t=this.m_bars.size(),i=this.m_bars.merge(e);return i&&"uninitialized"!==this._pressedChunks.priceSource&&(t===this.m_bars.size()&&i.index===this.m_bars.lastIndex()?this._updateLatestChunks():this._rebuildPressedChunks(i)),i}size(){return this.m_bars.size()+this.m_nsBars.size()}each(e){this.m_bars.each(e),this.m_nsBars.each(e)}clear(){this.m_bars.clear(),this.m_nsBars.clear(),this.lastProjectionPrice=void 0,this._clearPressedChunks()}isEmpty(){return this.m_bars.isEmpty()&&this.m_nsBars.isEmpty()}first(){return this.m_bars.isEmpty()?this.m_nsBars.first():this.m_bars.first()}last(){return this.m_nsBars.isEmpty()?this.m_bars.last():this.m_nsBars.last()}search(e,t){return this.nsBars().isEmpty()?this.bars().search(e,t):this.bars().isEmpty()||(0,r.ensureNotNull)(this.nsBars().firstIndex())<=e?this.nsBars().search(e,t):this.bars().search(e,t)}valueAt(e){const t=this.search(e);return null!==t?t.value:null}plotValueToTimePointIndex(e,t,i){if(i===s.FromRight){const i=(i,s)=>{const r=s[t];return null!=r&&e>=r},s=this.m_bars.findLast(i);if(null!==s)return s.index;const r=this.m_nsBars.findLast(i);return null!==r?r.index:this.m_bars.firstIndex()}if(i===s.FromLeft){const i=(i,s)=>{const r=s[t];return null!=r&&e<=r},s=this.m_bars.findFirst(i);if(null!==s)return s.index;const r=this.m_nsBars.findFirst(i);return null!==r?r.index:this.m_bars.lastIndex()}throw new Error("plotValueToTimePointIndex: unsupported search mode")}moveData(e){this.m_bars.move(e),this.m_nsBars.move(e), -this.m_bars.size()>0&&this._rebuildPressedChunks((0,r.ensureNotNull)(this.m_bars.first()))}_rebuildPressedChunks(e){const t=this._pressedChunks.priceSource;if("uninitialized"===t)return;const i=e.index,s=a[t],n=(e,t,i)=>{let r=null;for(;e.hasNext();){const n=e.next(),o=s(n.value);r&&n.index-r.startTime>=i.barsToMerge&&(t.push(r),r=null),r?(r.endTime=n.index,r.high=Math.max(r.high,o),r.low=Math.min(r.low,o),r.close=o):r={startTime:n.index,endTime:n.index,open:o,high:o,low:o,close:o}}r&&t.push(r)};u.forEach((e=>{const t=(0,r.ensureDefined)(this._pressedChunks.chunks.get(e.barsToMerge)),s=(0,o.lowerbound)(t,i,((e,t)=>e.endTime0){const i=t[0].startTime-1,s=(0,r.ensureNotNull)(this.m_bars.firstIndex()),o=this.m_bars.rangeIterator(s,i),a=[];n(o,a,e);const l=a.concat(t);this._pressedChunks.chunks.set(e.barsToMerge,l)}else{const i=(0,r.ensureNotNull)(this.m_bars.lastIndex());t.splice(s);let o=(0,r.ensureNotNull)(this.m_bars.firstIndex());t.length&&(o=t[t.length-1].endTime+1);const a=this.m_bars.rangeIterator(o,i);n(a,t,e)}}))}_updateLatestChunks(){const e=(0,r.ensureNotNull)(this.m_bars.lastIndex());u.forEach((t=>{const i=(0,r.ensureDefined)(this._pressedChunks.chunks.get(t.barsToMerge)),s=this.m_bars.rangeIterator(e,e).next(),n=s.value[4],o=i[i.length-1];o.high=Math.max(o.high,n),o.low=Math.min(o.low,n),o.close=n,o.endTime=s.index}))}_clearPressedChunks(){u.forEach((e=>this._pressedChunks.chunks.set(e.barsToMerge,[])))}}},67245:(e,t,i)=>{"use strict";i.d(t,{SeriesTimeRangeVolumeCalculator:()=>s});class s{constructor(e){this._value=null,this._series=e,this._series.dataEvents().dataUpdated().subscribe(this,this._onSeriesUpdated)}destroy(){this._series.dataEvents().dataUpdated().unsubscribeAll(this)}volume(e,t){if(null!==this._value&&this._value.from===e&&this._value.to===t)return this._value.value;let i=0;const s=this._series.data().bars(),r=s.firstIndex(),n=s.lastIndex();if(null!==r&&en&&t>n)i=NaN;else{const s=this._series.data().bars().rangeIterator(Math.min(e,t),Math.max(e,t));for(;s.hasNext();){const e=s.next().value[5];if(void 0===e){i=NaN;break}i+=e}}return this._value={from:e,to:t,value:i},i}_onSeriesUpdated(e,t){if(null===this._value)return;if(t)return void(this._value=null);const i=this._series.data().bars().lastIndex();(null===i||i<=this._value.to)&&(this._value=null)}}},1930:(e,t,i)=>{"use strict";i.r(t),i.d(t,{getTranslatedChartStyleName:()=>w,isRequiringRestartSeriesStyles:()=>C,isRangeBasedStyle:()=>P,isRangeStyle:()=>T,isTimeBasedStyle:()=>x,isValidStyle:()=>I,isSingleValueBasedStyle:()=>M,setLastUsedStyle:()=>A,getLastUsedStyle:()=>L,getLastUsedSingleValueBasedStyle:()=>k,getDefaultStyle:()=>E,getChartStyleByResolution:()=>D,chartStyleStudyId:()=>V,preparePriceAxisProperties:()=>B,hasProjection:()=>N,isPriceSourceStyle:()=>O,getSeriesPriceFormattingState:()=>F,createSeriesFormatter:()=>W,symbolCurrencyConvertible:()=>H,symbolCurrency:()=>z,symbolOriginalCurrency:()=>U,symbolBaseCurrency:()=>j,isConvertedToOtherCurrency:()=>G,symbolUnitConvertible:()=>q, -symbolUnit:()=>$,symbolOriginalUnit:()=>Y,isConvertedToOtherUnit:()=>K,symbolUnitConvertibleGroupsIfExist:()=>X,symbolCurrentContract:()=>Z,symbolHasPreOrPostMarket:()=>J,symbolHasSeveralSessions:()=>Q,symbolHasEconomicEvents:()=>ee,extractSymbolNameFromSymbolInfo:()=>te,symbolTitle:()=>ie,displayedSymbolName:()=>se,displayedSymbolExchange:()=>re,actualSymbol:()=>ne,proSymbol:()=>oe,symbolForApi:()=>ae,isRegularSessionId:()=>le,isCloseBasedSymbol:()=>ce,isMeasureUnitSymbol:()=>he,measureUnitId:()=>de,hasVolume:()=>ue,isEconomicSymbol:()=>pe,getStudySymbolExchange:()=>_e,isFutureContinuousSymbolWithBackajustment:()=>me,isFuturesContractSymbol:()=>ge,isCryptoSymbol:()=>fe});var s=i(44352),r=i(56840),n=i(77906),o=i(578),a=i(74599),l=i(2484),c=i(50151),h=i(48566),d=i(18766);const u=l.enabled("pay_attention_to_ticker_not_symbol"),p=l.enabled("uppercase_instrument_names"),_=l.enabled("charting_library_single_symbol_request"),m=l.enabled("use_ticker_on_symbol_info_update"),g=l.enabled("hide_object_tree_and_price_scale_exchange_label"),f=[4,5,6,7,8],v=[4,5,6,7,11],S=[0,1,9,2,3,10,8,12,13],y=[2,10,3,13],b={0:s.t(null,void 0,i(16812)),1:s.t(null,void 0,i(63528)),2:s.t(null,void 0,i(1277)),3:s.t(null,void 0,i(42097)),9:s.t(null,void 0,i(61582)),10:s.t(null,void 0,i(17712)),12:s.t(null,void 0,i(31994)),13:s.t(null,void 0,i(36018)),4:s.t(null,void 0,i(20801)),7:s.t(null,void 0,i(63492)),5:s.t(null,void 0,i(92901)),6:s.t(null,void 0,i(99969)),11:s.t(null,void 0,i(90357)),8:s.t(null,void 0,i(40530))};function w(e){return b[e]}function C(e){return-1!==f.indexOf(e)}function P(e){return-1!==v.indexOf(e)}function T(e){return 11===e}function x(e){return-1!==S.indexOf(e)}function I(e){return P(e)||x(e)}function M(e){switch(e){case 3:case 10:case 2:case 13:return!0;default:return!1}}function A(e,t){I(e)&&(11!==e&&r.setValue("chart.lastUsedStyle",e),ce(t)&&M(e)&&r.setValue("chart.lastUsedSingleValueBasedStyle",e))}function L(){const e=r.getInt("chart.lastUsedStyle");return void 0===e?1:e}function k(){const e=r.getInt("chart.lastUsedSingleValueBasedStyle");return void 0===e?2:e}function E(e){return e?11:1}function D(e,t){const i=T(t),s=o.Interval.isRange(e);return!i&&s?E(!0):i&&!s?E(!1):t}function V(e,t){const i=n.SYMBOL_STRING_DATA[e];return void 0===i?null:t?`${i.type}-${i.basicStudyVersion}`:i.type}function B(e){const t=e.priceAxisProperties,i=t.lockScale.value(),s=6===e.style.value();(s||i)&&(t.log.setValue(!1),t.percentage.setValue(!1)),t.logDisabled.setValue(!(!s&&!i)),t.percentageDisabled.setValue(!(!s&&!i))}const R=[4,7,5,6];function N(e){return-1!==R.indexOf(e)}function O(e){return y.includes(e)}function F(e,t="default",i=!1){let s,r,n=100,o=1;if("default"===t)null!=e&&(n=e.pricescale,o=e.minmov,s=e.fractional,r=e.minmove2);else{let e=t.split(",");3!==e.length&&(e=["100","1","false"]),n=parseInt(e[0]),o=parseInt(e[1]),s="true"===e[2]}return i&&(o=1),{priceScale:n,minMove:o,fractional:s,minMove2:r}}function W(e,t,i=!1){if("default"===t&&null!=e){const t=e.formatter||e.format;if("volume"===t)return new h.VolumeFormatter(2) -;if("percent"===t)return new d.PercentageFormatter(e.pricescale)}const{priceScale:s,minMove:r,fractional:n,minMove2:o}=F(e,t,i);return new a.PriceFormatter(s,r,n,o)}function H(e){return null!==e&&"spread"!==e.type}function z(e,t,i){if(null===e)return null;const s=!t||i?e.currency_id:e.currency_code;return void 0===s||""===s?null:s}function U(e,t){const i=t?e.original_currency_code:e.original_currency_id;return null!=i?i:z(e,t)}function j(e){return e.base_currency_id||null}function G(e){return!(null===e||!H(e))&&(void 0!==e.original_currency_id&&e.original_currency_id!==e.currency_id)}function q(e,t){return t&&null!==e&&"spread"!==e.type}function $(e,t){if(null===e||!t)return null;const i=e.unit_id;return void 0===i||""===i?null:i}function Y(e,t){return t?e.original_unit_id||$(e,t):null}function K(e,t){return!(null===e||!q(e,t))&&(void 0!==e.original_unit_id&&e.original_unit_id!==e.unit_id)}function X(e,t){return null!==e&&q(e,t)?e.unit_conversion_types||null:[]}function Z(e){return"futures"===e.type&&e.front_contract||null}function J(e){return null!==e&&void 0!==e.subsessions&&e.subsessions.some((e=>"premarket"===e.id||"postmarket"===e.id))}function Q(e){return null!==e&&void 0!==e.subsessions&&e.subsessions.filter((e=>!e.private)).length>1}function ee(e){return null!==e&&("forex"===e.type||"cfd"===e.type||fe(e))}function te(e,t){let i=e&&(e.pro_name||e.full_name||e.name);return _&&t?i=t:m&&e&&e.ticker&&(i=e.ticker),p&&i&&(i=i.toUpperCase()),i}function ie(e,t,i="exchange"){return t||g?e.name:`${e.name}, ${e[i]}`}function se(e){let t=e&&(Z(e)||e.name)||"";return t.length>40&&(t=t.substring(0,37)+"..."),t.trim()}function re(e){const t=e?e.exchange:"";return p?t.toUpperCase():t}function ne(e,t){return null!==e?e.full_name:t}function oe(e,t){return null!==e?e.pro_name:t}function ae(e,t){return u&&e?(0,c.ensureDefined)(e.ticker):ne(e,t)}function le(e){return"regular"===e||"us_regular"===e}function ce(e){return"c"===(null==e?void 0:e.visible_plots_set)}function he(e){return null!==e&&("unit"===e.measure&&null!==de(e))}function de(e){var t;return null!==(t=null==e?void 0:e.value_unit_id)&&void 0!==t?t:null}function ue(e){return void 0!==e.visible_plots_set?"ohlcv"===e.visible_plots_set:!e.has_no_volume}function pe(e){return null!==e&&"economic"===e.type}function _e(e){return pe(e)&&e.source?e.source:e.exchange&&0!==e.exchange.length?e.exchange:void 0}function me(e){var t;return null!==e&&"futures"===e.type&&Boolean(e.has_backadjustment&&(null===(t=e.typespecs)||void 0===t?void 0:t.includes("continuous")))}function ge(e){var t;return null!==e&&"futures"===e.type&&!Boolean(null===(t=e.typespecs)||void 0===t?void 0:t.includes("continuous"))}function fe(e){var t;return(null===(t=e.typespecs)||void 0===t?void 0:t.includes("crypto"))||"crypto"===e.type||"bitcoin"===e.type}},46936:(e,t,i)=>{"use strict";var s=i(26220);TradingView.DEFAULT_BAR_COUNT=300,TradingView.TIME_PLOT=0,TradingView.OPEN_PLOT=1,TradingView.HIGH_PLOT=2,TradingView.LOW_PLOT=3,TradingView.CLOSE_PLOT=4,TradingView.ADT_PLOT=6 -;var r=i(95693).SeriesBase,n=(i(51768).trackEvent,i(98351).getLogger("Chart.Series")),o=i(77906),a=i(27944).SeriesHorizontalBaseLinePaneView,l=i(933).deepExtend,c=i(76422),h=i(45673).TIMEFRAMETYPE,d=i(1930).isSingleValueBasedStyle;class u extends r{constructor(e,t,i,s){t.removeProperty("currencyId"),super(e,t,i,s),this._chartApi=e._chartApi,this.createPaneView(),this._properties.addExclusion&&(this._properties.addExclusion("visible"),this._properties.addExclusion("currencyId")),this._futureBarsPaneView=null,this.properties().minTick.listeners().subscribe(this,u.prototype._recreateFormatter);var r=this;this.properties().minTick.listeners().subscribe(null,(function(){r._model.fullUpdate()})),this._priceLineView=null,this._baseHorizontalLineView=new a(this),this.bindStyleChange(),this.bindJapChartsInputs(),this._createIsDWMProperty(),this.properties().showCountdown.listeners().subscribe(this,u.prototype._onChangeShowCountdown),this._onChangeShowCountdown(this.properties().showCountdown),this._recreatePriceFormattingDependencies(),this.properties().lineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().areaStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().baselineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().columnStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this._updateBarFunction()}isLoading(){return this._loading}styleStudyInfo(e){return this.styleStudyInfos()[e]}serverTimeOffset(){return this._chartApi.serverTimeOffset()}_onChangeShowCountdown(e){var t=this;e.value()?this._countdownUpdateTimer=this._model.setInterval((function(){t._priceAxisView.updateCountdown()}),500):(this._model.clearInterval(this._countdownUpdateTimer),delete this._countdownUpdateTimer)}_createIsDWMProperty(){this._isDWMProperty=new s(this.isDWM()),this._onRestarted.subscribe(this,(function(){this._isDWMProperty.setValue(this.isDWM())}))}isDWMProperty(){return this._isDWMProperty}fixLastBar(e){0}isPulse(){return this._symbolInfo&&this._symbolInfo.resolutions.length>0}seriesSource(){return this._seriesSource}_onSeriesTimeFrame(e,t,i,s,r){var n=d(this.style())?e+.5:e,o=t;if(void 0===r)null!==i&&i.type!==h.PeriodBack||(o+=this._model.studyAwareDefaultRightOffset());else if(r.applyDefaultRightMargin)o+=this._model.studyAwareDefaultRightOffset();else if(r.percentRightMargin){var a=t-n+1,l=Math.max(0,Math.min(.99,r.percentRightMargin/100));o+=l*a/(1-l)}this._model.setTimeViewport(n,o)}hl2(e){return(this.high(e)+this.low(e))/2}hlc3(e){return(this.high(e)+this.low(e)+this.close(e))/3}ohlc4(e){return(this.open(e)+this.high(e)+this.low(e)+this.close(e))/4}nearestData(e,t){if(TradingView.isInteger(e)){var i=this.data().search(e,t);return null!==i?i:void 0}n.logDebug("Series.nearestData: incorrect logicalPoint")}nearestIndex(e,t){var i=this.nearestData(e,t);return i?i.index:void 0}purgeSymbolInfo(){this._symbolInfo=null}bindStyleChange(){var e=this;Object.keys(u.STYLE_SHORT_NAMES).map((function(e){ -return u.STYLE_SHORT_NAMES[e]+"Style"})).forEach((function(t){e._properties[t].listeners().subscribe(e,u.prototype.invalidateBarStylesCache)}))}bindJapChartsInputs(){this._properties.renkoStyle.inputs.boxSize.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.wicks.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.sources.listeners().subscribe(this,this.onInputChanged),this._properties.pbStyle.inputs.lb.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.reversalAmount.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.boxSize.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.reversalAmount.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.sources.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.oneStepBackBuilding.listeners().subscribe(this,this.onInputChanged),this._properties.rangeStyle.inputs.phantomBars.listeners().subscribe(this,this.onInputChanged)}createDividendsAdjustmentProperty(){throw new Error("Not implemented")}dividendsAdjustmentProperty(){return null}applyPreferences(e){var t=l({},e);this.m_priceScale.setMode({autoScale:t.priceAxisProperties.autoScale,percentage:t.priceAxisProperties.percentage,log:t.priceAxisProperties.log,lockScale:t.priceAxisProperties.lockScale}),this.setChartStyleWithIntervalIfNeeded(t.style),delete t.style,delete t.interval,this._properties.mergePreferences(t),this._properties.saveDefaults(),this.createPaneView(),this.invalidateBarStylesCache()}onInputChanged(){this.restart()}getStyleShortName(){var e=this._properties.style.value();if(u.STYLE_SHORT_NAMES.hasOwnProperty(e))return u.STYLE_SHORT_NAMES[e];throw new Error("Missed short name for style "+e)}getStyleProperties(){return this._properties[this.getStyleShortName()+"Style"]}getInputsProperties(){return this.getStyleProperties().inputs||new s}getInputsInfoProperties(){return this.getStyleProperties().inputInfo||new s}getSymbolName(){return this._symbolInfo?this._symbolInfo.name:""}priceScale(){return this.m_priceScale}setPriceScale(e){this.m_priceScale!==e&&(this._priceScaleAboutToBeChanged.fire(),this.m_priceScale=e,this._properties.removeProperty("priceAxisProperties"),this._properties.addChild("priceAxisProperties",e.properties()),this._properties.priceAxisProperties.childChanged(),c.emit("series_event","price_scale_changed"),this._priceScaleChanged.fire(e))}getSourceIcon(){ -return{type:"loadSvg",svgId:"series."+this.properties().style.value()}}isStyleSupported(e){return!0}destroy(){this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._quotesProvider.destroy(),this.clearGotoDateResult(),this._legendView.destroy(),this._marketStatusModel.destroy(),null!==this._dataUpdatedModeModel&&this._dataUpdatedModeModel.destroy(),this._dataProblemModel.destroy(),this._paneView&&this._paneView.destroy&&this._paneView.destroy(),this._seriesSource.destroy(),super.destroy()}dataEvents(){return this._seriesSource.dataEvents()}moveData(e){return this._seriesSource.moveData(e)}}Object.assign(u,o),TradingView.Series=u,t.Series=u,t.isSeries=function(e){return e instanceof u}},36767:(e,t,i)=>{"use strict";i.d(t,{SeriesAreaPaneView:()=>l});var s=i(38031),r=i(28962),n=i(29639),o=i(53074),a=i(46930);class l extends a.SeriesSingleLinePaneView{renderer(e,t){this._invalidated&&(this._updateImpl(),this._invalidated=!1);const i=this._source.priceScale();if(!i)return null;const a=this._source.properties().childs().areaStyle.childs(),l=a.transparency.value(),c={simpleMode:!1,barSpacing:this._model.timeScale().barSpacing(),items:this._items,lineColor:a.linecolor.value(),lineStyle:a.linestyle.value(),lineWidth:a.linewidth.value(),isSeries:!0,withMarkers:!1,bottom:i.height(),color1:(0,s.generateColor)(a.color1.value(),l),color2:(0,s.generateColor)(a.color2.value(),l)},h=new n.CompositeRenderer;return h.append(new r.PaneRendererArea(c)),this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&h.append(new o.SelectionRenderer(this._selectionData)),h}}},57757:(e,t,i)=>{"use strict";function s(e,t){return 100*(t-e)/Math.abs(e||1)}i.d(t,{barPercentChange:()=>s})},13428:(e,t,i)=>{"use strict";i.d(t,{PaneRendererBars:()=>n});var s=i(55014),r=i(91106);class n extends r.PaneRendererSeriesBase{constructor(e){super(),this._bars=e.bars,this._barSpacing=e.barSpacing,this._dontDrawOpen=e.dontDrawOpen,this._thinBars=e.thinBars}draw(e,t){e.save();const i=t.pixelRatio;if(this._barWidth=this._calcBarWidth(i),this._barWidth>=2){Math.max(1,Math.floor(i))%2!=this._barWidth%2&&this._barWidth--}this._barLineWidth=this._thinBars?Math.min(this._barWidth,Math.floor(i)):this._barWidth;let s=null;const r=this._barLineWidth<=this._barWidth&&this._barSpacing>=Math.floor(1.5*t.pixelRatio);for(const t of this._bars){s!==t.color&&(e.fillStyle=t.color,s=t.color);const n=Math.floor(.5*this._barLineWidth),o=Math.round(t.time*i),a=o-n,l=this._barLineWidth,c=a+l-1,h=Math.min(t.high,t.low),d=Math.max(t.high,t.low),u=Math.round(h*i)-n,p=Math.round(d*i)+n,_=Math.max(p-u,this._barLineWidth);e.fillRect(a,u,l,_);const m=Math.ceil(1.5*this._barWidth);if(r){const s=o-m,r=o+m,h=Math.min(a-s,r-c);if(!this._dontDrawOpen){let r=Math.max(u,Math.round(t.open*i)-n),o=r+l-1;o>u+_-1&&(o=u+_-1,r=o-l+1),e.fillRect(s,r,h,o-r+1)}let d=Math.max(u,Math.round(t.close*i)-n),p=d+l-1;p>u+_-1&&(p=u+_-1,d=p-l+1),e.fillRect(c+1,d,h,p-d+1)}}e.restore()}_getTolerance(){const e=this._calcBarWidth(1),t=this._thinBars?Math.min(e,1):e;return(0, -s.interactionTolerance)().series+t/2}_getBarSpacing(){return this._barSpacing}_calcBarWidth(e){const t=Math.floor(e);return Math.max(t,Math.floor((0,s.optimalBarWidth)(this._barSpacing,e)))}}},83438:(e,t,i)=>{"use strict";i.d(t,{SeriesBarsPaneView:()=>a});var s=i(29639),r=i(53074),n=i(7816),o=i(13428);class a extends n.SeriesBarCandlesPaneView{renderer(e,t){this._invalidated&&(this._updateImpl(null),this._invalidated=!1);const i=this._source.properties().childs(),n={bars:this._bars,barSpacing:this._model.timeScale().barSpacing(),dontDrawOpen:i.barStyle.childs().dontDrawOpen.value(),thinBars:11===i.style.value()?i.rangeStyle.childs().thinBars.value():i.barStyle.childs().thinBars.value()},a=new s.CompositeRenderer;return a.append(new o.PaneRendererBars(n)),this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&a.append(new r.SelectionRenderer(this._selectionData)),a}_createItem(e,t,i){const s={time:e,open:NaN,high:NaN,low:NaN,close:NaN,color:i.barColor};return(0,n.baseBarCandlesUpdater)(t,s)?s:null}}},14224:(e,t,i)=>{"use strict";i.d(t,{SeriesBaselinePaneView:()=>m});var s=i(38031),r=i(29639),n=i(86441),o=i(5531),a=i(4652),l=i(55014),c=i(93975),h=i(86216),d=i(14888);class u extends h.MediaCoordinatesPaneRenderer{constructor(){super(...arguments),this._data=null}setData(e){this._data=e}hitTest(e){if(null===this._data)return null;const{items:t,topLineWidth:i,bottomLineWidth:s}=this._data,r=(0,l.interactionTolerance)().series+(i+s)/4,o=(0,c.lowerbound)(t,e,((e,t)=>e.x<=t.x)),h=Math.max(1,o-1),u=Math.min(t.length-1,o+1);for(let i=h;i<=u;++i){const s=t[i-1],o=t[i],{distance:l}=(0,a.distanceToSegment)(new n.Point(s.x,s.y),new n.Point(o.x,o.y),new n.Point(e.x,e.y));if(l<=r)return new d.HitTestResult(d.HitTestResult.REGULAR)}return null}_drawImpl(e){if(null===this._data)return;const{items:t,baseLevelCoordinate:i,bottom:s,bottomFillColor1:r,bottomFillColor2:a,topFillColor1:c,topFillColor2:h,topLineColor:d,bottomLineColor:u,topLineWidth:p,bottomLineWidth:_}=this._data;if(!function(e){if(0===e.length)return!1;const t=e.findIndex((e=>(0,l.coordinateIsValid)(e.y)));if(-1===t)return!1;let i=e.length-1;for(;i>t&&!(0,l.coordinateIsValid)(e[i].y);)i--;return!(t>i)}(t))return;const m=e.context,{topItems:g,bottomItems:f}=function(e,t){const i=[],s=[];let r=null;for(let a=0;a=t&&s.push(c),r=c;else{if(null===r)continue;c=r}if((0,l.coordinateIsValid)(h.y)&&(c.y>t&&h.yt))if(Math.abs(c.x-h.x)<1){const e=new n.Point(c.x,t);i.push(e),s.push(e)}else{const e=(0,o.intersectLineSegments)(c,h,new n.Point(c.x,t),new n.Point(h.x,t));if(null!==e){const t=c.add(h.subtract(c).scaled(e));i.push(t),s.push(t)}}}return{topItems:i,bottomItems:s}}(t,i);m.lineCap="round",m.lineJoin="round",0!==g.length&&(m.beginPath(),m.moveTo(g[0].x,i),this._makeLine(m,g,!0,0),m.closePath(),m.fillStyle=this._makeLinearGradient(m,c,h,i-s,i),m.fill(),m.beginPath(),this._makeLine(m,g,!1,0),m.lineWidth=p,m.strokeStyle=d, -m.stroke()),0!==f.length&&(m.beginPath(),m.moveTo(f[0].x,i),this._makeLine(m,f,!0,1),m.closePath(),m.fillStyle=this._makeLinearGradient(m,r,a,i,i+s),m.fill(),m.beginPath(),this._makeLine(m,f,!1,1),m.lineWidth=_,m.strokeStyle=u,m.stroke())}_makeLine(e,t,i,s){if(null===this._data)return;const r=t.findIndex((e=>(0,l.coordinateIsValid)(e.y)));if(-1===r)return;const{barSpacing:n,baseLevelCoordinate:o}=this._data,a=.25*n;let c;const h=t.length;for(let n=r;n=o&&h.y>=o){e.moveTo(h.x,h.y);continue}}else if(c&&c.y<=o&&h.y<=o){e.moveTo(h.x,h.y);continue}if(c&&(0,l.coordinateIsValid)(c.y))e.lineTo(h.x,h.y),i&&!(0,l.coordinateIsValid)(d.y)&&e.lineTo(h.x,o);else if(d&&(0,l.coordinateIsValid)(d.y))i?(n!==r&&e.lineTo(h.x,o),e.lineTo(h.x,h.y)):e.moveTo(h.x,h.y);else if(i){if(0===n)continue;n!==r&&e.lineTo(h.x-a,o),e.lineTo(h.x-a,h.y),e.lineTo(h.x+a,h.y),e.lineTo(h.x+a,o)}else e.moveTo(h.x-a,h.y),e.lineTo(h.x+a,h.y);c=h}}}_makeLinearGradient(e,t,i,s,r){const n=e.createLinearGradient(0,s,0,r);return n.addColorStop(0,t),n.addColorStop(1,i),n}}var p=i(53074),_=i(46930);class m extends _.SeriesSingleLinePaneView{constructor(){super(...arguments),this._renderer=new u,this._topFillColor1="",this._topFillColor2="",this._bottomFillColor1="",this._bottomFillColor2="",this._topLineColor="",this._bottomLineColor="",this._topLineWidth=0,this._bottomLineWidth=0,this._barSpacing=0,this._bottom=0,this._baseLevelCoordinate=0}renderer(e,t){this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer.setData({items:this._items,topFillColor1:this._topFillColor1,topFillColor2:this._topFillColor2,bottomFillColor1:this._bottomFillColor1,bottomFillColor2:this._bottomFillColor2,topLineColor:this._topLineColor,bottomLineColor:this._bottomLineColor,topLineWidth:this._topLineWidth,bottomLineWidth:this._bottomLineWidth,barSpacing:this._barSpacing,baseLevelCoordinate:this._baseLevelCoordinate,bottom:this._bottom});const i=new r.CompositeRenderer;return i.append(this._renderer),this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&i.append(new p.SelectionRenderer(this._selectionData)),i}_updateImpl(){super._updateImpl();const e=this._source.priceScale();if(!e)return;const t=this._source.properties().childs().baselineStyle.childs(),i=t.transparency.value();this._topFillColor1=(0,s.generateColor)(t.topFillColor1.value(),i),this._topFillColor2=(0,s.generateColor)(t.topFillColor2.value(),i),this._bottomFillColor1=(0,s.generateColor)(t.bottomFillColor1.value(),i),this._bottomFillColor2=(0,s.generateColor)(t.bottomFillColor2.value(),i),this._topLineColor=t.topLineColor.value(),this._bottomLineColor=t.bottomLineColor.value(),this._topLineWidth=t.topLineWidth.value(),this._bottomLineWidth=t.bottomLineWidth.value(),this._barSpacing=this._model.timeScale().barSpacing(),this._bottom=e.height(),this._baseLevelCoordinate=Math.round(this._bottom*(Math.abs(100-t.baseLevelPercentage.value())/100))}}},74234:(e,t,i)=>{"use strict";i.d(t,{ -SeriesWaterlinePaneView:()=>a});var s=i(56744),r=i(6947),n=i(14888),o=i(53479);class a extends s.HorizontalLinePaneView{constructor(e){super(),this._getters=e;const t={cursorType:r.PaneCursorType.VerticalResize,activeItem:0,areaName:n.AreaName.SourceItemMove};this._lineRenderer.setHitTest(new n.HitTestResult(n.HitTestResult.MOVEPOINT,t)),this._lineRendererData.visible=!0,this._lineRendererData.linestyle=o.LINESTYLE_SPARSE_DOTTED}_updateImpl(){const{baseLevelPercentage:e,paneHeight:t,color:i}=this._getters,s=Math.abs(100-e());this._lineRendererData.y=Math.round(t()*(s/100)),this._lineRendererData.color=i()}}},91106:(e,t,i)=>{"use strict";i.d(t,{PaneRendererSeriesBase:()=>r});var s=i(14888);class r{constructor(){this._bars=[]}hitTest(e){const t=this._bars,i=this._getBarSpacing(),s=i/2;if(0===t.length)return null;const r=this._getTolerance(),n=t[0],o=t[t.length-1];if(e.xo.time+s+r)return null;let a=0,l=t.length-1,c=-1;for(;a<=l;){const i=Math.floor((a+l)/2),h=t[i];let d=s;if(h!==n&&h!==o||(d+=r),Math.abs(h.time-e.x)<=d){c=i;break}e.x-h.time>s?a=i+1:l=i-1}if(-1!==c){const n=Math.ceil(r/i);if(0!==n){const i=Math.max(0,c-n),o=Math.min(t.length-1,c+n);for(let n=i;n<=o;n++)if(Math.abs(e.x-t[n].time)<=s+r&&this._isPointAtBar(t[n],e.y,r))return this._getHitTest()}else if(this._isPointAtBar(t[c],e.y,r))return this._getHitTest()}return null}_getHitTest(){return new s.HitTestResult(s.HitTestResult.REGULAR)}_isPointAtBar(e,t,i){const s=Math.min(e.high,e.low),r=Math.max(e.high,e.low);return s-i<=t&&t<=r+i}}},59386:(e,t,i)=>{"use strict";i.d(t,{PaneRendererCandles:()=>l});var s=i(50151),r=i(14888),n=i(9740),o=i(55014),a=i(91106);class l extends a.PaneRendererSeriesBase{constructor(e){super(),this._barSpacing=1,this._barWidth=1,this._borderVisible=!1,this._barBorderWidth=1,this._wickVisible=!1,this._bodyVisible=!0,this._borderColor=void 0,this._wickColor=void 0,this._hittest=void 0,this._isPriceScaleInverted=!1,e&&this.setData(e)}setData(e){this._bars=e.bars,this._barSpacing=e.barSpacing,this._borderVisible=e.borderVisible,this._bodyVisible=e.bodyVisible,this._wickVisible=e.wickVisible,this._borderColor=e.borderColor,this._wickColor=e.wickColor,this._hittest=e.hittest,this._isPriceScaleInverted=e.isPriceScaleInverted}hitTest(e){return this._wickVisible||this._borderVisible||this._bodyVisible?super.hitTest(e):null}draw(e,t){if(0===this._bars.length)return;const i=t.pixelRatio;if(this._barWidth=(0,o.optimalCandlestickWidth)(this._barSpacing,i),this._barWidth>=2){Math.floor(i)%2!=this._barWidth%2&&this._barWidth--}this._wickVisible&&this._drawWicks(e,i),this._borderVisible&&this._drawBorder(e,i),this._bodyVisible&&this._drawCandles(e,i)}_getTolerance(){return(0,o.interactionTolerance)().series+this._barBorderWidth/2}_getBarSpacing(){return this._barSpacing}_getHitTest(){return this._hittest||new r.HitTestResult(r.HitTestResult.REGULAR)}_isPointAtBar(e,t,i){const s=this._bodyVisible||this._borderVisible,r=this._wickVisible;if(!s&&!r)return!1;if(s){ -const s=r?Math.min(e.high,e.low):Math.min(e.open,e.close),n=r?Math.max(e.high,e.low):Math.max(e.open,e.close);return s-i<=t&&t<=n+i}{const s=Math.min(e.open,e.close),r=Math.max(e.open,e.close);return e.high-i<=t&&t<=s+i||r-i<=t&&t<=e.low+i}}_drawWicks(e,t){const i=this._bars;let r="",n=Math.min(Math.floor(t),Math.floor(this._barSpacing*t));n=Math.max(Math.floor(t),Math.min(n,this._barWidth));const o=Math.floor(.5*n);let a=null;for(const l of i){const i=l.wickColor?l.wickColor:(0,s.ensureDefined)(this._wickColor);i!==r&&(e.fillStyle=i,r=i);let c=Math.round(Math.min(l.open,l.close)*t),h=Math.round(Math.max(l.open,l.close)*t);this._isPriceScaleInverted&&([h,c]=[c,h]);const d=Math.round(l.high*t),u=Math.round(l.low*t);let p=Math.round(t*l.time)-o;const _=p+n-1;null!==a&&(p=Math.max(a+1,p),p=Math.min(p,_));const m=_-p+1;e.fillRect(p,d,m,c-d),e.fillRect(p,h+1,m,u-h-1),a=_}}_calculateBorderWidth(e){let t=Math.floor(1*e);this._barWidth<=2*t&&(t=Math.floor(.5*(this._barWidth-1)));const i=Math.max(Math.floor(e),t);return this._barWidth<=2*i?Math.max(Math.floor(e),Math.floor(1*e)):i}_drawBorder(e,t){let i="";const r=this._calculateBorderWidth(t);let o=null;for(const a of this._bars){if(a.borderColor!==i&&(e.fillStyle=a.borderColor?a.borderColor:(0,s.ensureDefined)(this._borderColor),i=a.borderColor),this._bodyVisible&&a.hollow)continue;let l=Math.round(a.time*t)-Math.floor(.5*this._barWidth);const c=l+this._barWidth-1,h=Math.round(Math.min(a.open,a.close)*t),d=Math.round(Math.max(a.open,a.close)*t);if(null!==o&&(l=Math.max(o+1,l),l=Math.min(l,c)),this._barSpacing*t>2*r)(0,n.fillRectInnerBorder)(e,l,h,c-l+1,d-h+1,r);else{const t=c-l+1;e.fillRect(l,h,t,d-h+1)}o=c}}_drawCandles(e,t){let i="";const s=this._calculateBorderWidth(t);for(const r of this._bars){if(this._borderVisible&&this._barWidth<=2*s&&!r.hollow)continue;let o=Math.round(Math.min(r.open,r.close)*t),a=Math.round(Math.max(r.open,r.close)*t),l=Math.round(r.time*t)-Math.floor(.5*this._barWidth),c=l+this._barWidth-1;if(r.color!==i){const t=r.color;e.fillStyle=t,i=t}if(r.hollow)e.fillStyle=r.color,(0,n.fillRectInnerBorder)(e,l,o,c-l+1,a-o+1,s);else{if(this._borderVisible&&(l+=s,o+=s,c-=s,a-=s),o>a)continue;e.fillRect(l,o,c-l+1,a-o+1)}}}}},15381:(e,t,i)=>{"use strict";i.d(t,{SeriesCandlesPaneView:()=>l});var s=i(29639),r=i(55014),n=i(53074),o=i(7816),a=i(59386);class l extends o.SeriesBarCandlesPaneView{renderer(e,t){this._invalidated&&(this._updateImpl(null),this._invalidated=!1);const i=this._source.priceScale();if(!i)return null;const o=this._source.properties().childs().candleStyle.childs(),l=this._model.timeScale().barSpacing(),c={bars:this._bars,barSpacing:l,bodyVisible:o.drawBody.value(),borderVisible:o.drawBorder.value(),borderColor:o.borderColor.value(),wickColor:o.wickColor.value(),barWidth:(0,r.optimalBarWidth)(l),wickVisible:o.drawWick.value(),isPriceScaleInverted:i.isInverted()},h=new s.CompositeRenderer;return h.append(new a.PaneRendererCandles(c)), -this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&h.append(new n.SelectionRenderer(this._selectionData)),h}_createItem(e,t,i){const s={time:e,open:NaN,high:NaN,low:NaN,close:NaN,color:i.barColor,borderColor:i.barBorderColor,wickColor:i.barWickColor,hollow:i.isBarHollow};return(0,o.baseBarCandlesUpdater)(t,s)?s:null}}},78201:(e,t,i)=>{"use strict";i.d(t,{SeriesColumnsPaneView:()=>p});var s=i(50151),r=i(86441),n=i(2484),o=i(3308),a=i(14888),l=i(29639),c=i(33639),h=i(47149),d=i(53074),u=i(73195);class p{constructor(e,t){this._items=[],this._invalidated=!0,this._isMarkersEnabled=(0,n.enabled)("source_selection_markers"),this._selectionData=null,this._histogramBase=0,this._source=e,this._model=t,this._selectionIndexer=new h.SelectionIndexes(t.timeScale())}update(){this._invalidated=!0}renderer(e,t){this._invalidated&&(this._updateImpl(),this._invalidated=!1);const i={barSpacing:this._model.timeScale().barSpacing(),items:this._items,lineColor:"",histogramBase:this._histogramBase},s=new l.CompositeRenderer;return s.append(new u.PaneRendererColumns(i)),this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&s.append(new d.SelectionRenderer(this._selectionData)),s}_updateImpl(){this._items=[];const e=this._model.timeScale(),t=this._source.priceScale();if(e.isEmpty()||!t||t.isEmpty())return;const i=e.visibleBarsStrictRange();if(null===i)return;if(0===this._source.bars().size())return;const n=this._source.nearestIndex(i.firstBar(),c.PlotRowSearchMode.NearestRight),l=this._source.nearestIndex(i.lastBar(),c.PlotRowSearchMode.NearestLeft);if(void 0===n||void 0===l)return;const h=this._source.bars().range(n,l),d=this._source.barColorer(),u={},p=this._source.barFunction(),_=h.reduce(((e,t,s)=>{const n=p(s);if(!(0,o.default)(n))return e;u.value=s;let a=this._source.precomputedBarStyle(s);void 0===a&&(a=d.barStyle(t,!1,u),this._source.setPrecomputedBarStyle(s,a));const l=new r.Point(t,n);return l.style=a,l.timePointIndex=t,this._items.push(l),u.previousValue=s,i.contains(t)&&null!=e?e:n}),null);if(null!==_)if(t.pointsArrayToCoordinates(this._items,_),e.timedValuesToCoordinates(this._items),this._histogramBase=t.isInverted()?0:t.height(),this._model.selection().isSelected(this._source)){const i=this._selectionIndexer.indexes();this._selectionData={points:[],bgColors:[],visible:!0,barSpacing:e.barSpacing(),hittestResult:a.HitTestResult.REGULAR};const n=(0,s.ensureNotNull)(this._model.paneForSource(this._source)).height();this._selectionData.hittestResult=a.HitTestResult.REGULAR;for(let s=0;s{"use strict";i.d(t,{SeriesHiLoPaneView:()=>g});var s=i(48874),r=i(95242),n=i(93975),o=i(55014),a=i(14888),l=i(86216) -;class c extends l.MediaCoordinatesPaneRenderer{constructor(){super(...arguments),this._data=null,this._barWidth=null}setData(e){this._data=e,this._barWidth=Math.max(1,Math.round((0,o.optimalHiLoWidth)(e.barSpacing)))}hitTest(e){if(null===this._data||null===this._barWidth)return null;const t=this._data.bars,i=.5*this._data.barSpacing;if(0===t.length)return null;if(e.xt[t.length-1].time+i)return null;const s=t[(0,n.lowerbound)(t,e.x-i,((e,t)=>e.times.time+i)return null;const r=(0,o.interactionTolerance)().series+this._barWidth/2,l=Math.min(s.high,s.low),c=Math.max(s.high,s.low),h=this._data.fontSize;return l-r-h<=e.y&&e.y<=l+r||c-r<=e.y&&e.y<=c+r+h?new a.HitTestResult(a.HitTestResult.REGULAR):null}_drawImpl(e){if(null===this._data||null===this._barWidth)return;const{font:t,fontSize:i,labelColor:s,bars:n,inverted:o,labelsPadding:a}=this._data,l=e.context;l.textAlign="center",l.fillStyle=s,l.font=(0,r.makeFont)(i,t);for(let e=0;eMath.max(1,(0,n.lowerboundExt)((e=>e+1),null,(i=>{const s=(0,r.makeFont)(i,u.CHART_FONT_FAMILY);return(0,p.measureText)(e,s).width<=t}),7,36))),((e,t)=>`${e}/${t}`))}renderer(e,t,i){const s=this._source.priceScale();if(!s||s.isEmpty())return null;const r=new h.CompositeRenderer,n=this._needLabels(),a=this._source.properties().childs().hiloStyle.childs(),l=this._model.timeScale().barSpacing();if(this._invalidated){const e=this._source.formatter();this._maxLengthLabel="",this._updateImpl({generateLabels:n,formatter:e}),this._invalidated=!1}if(this._candlesRenderer.setData({bars:this._bars,wickVisible:!1,bodyVisible:a.drawBody.value(),barSpacing:l,borderVisible:a.showBorders.value(),barWidth:(0,o.optimalHiLoWidth)(l)}),r.append(this._candlesRenderer),n){const e=this._calculateLabelFontSize();e&&e>=8&&(this._labelsRenderer.setData({bars:this._bars,barSpacing:l,font:u.CHART_FONT_FAMILY,fontSize:e,labelColor:a.labelColor.value(),inverted:s.isInverted(),labelsPadding:.4*e}),r.append(this._labelsRenderer))}return this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&r.append(new d.SelectionRenderer(this._selectionData)),r}topPixelMargin(){return this._margin()}bottomPixelMargin(){return this._margin()}_createItem(e,t,i,s){const r={time:e,open:NaN,high:NaN,low:NaN,close:NaN,color:i.barColor,borderColor:i.barBorderColor,hollow:!1,highLabel:"",lowLabel:""};if(!(0,m.baseBarCandlesUpdater)(t,r))return null;if(r.open=r.high,r.close=r.low,s.generateLabels){ -const e=s.formatter.format(r.high),t=s.formatter.format(r.low);r.highLabel=e,r.lowLabel=t;const i=(e.length>t.length?e:t).replace(/\d/g,"0");i.length>this._maxLengthLabel.length&&(this._maxLengthLabel=i)}return r}_margin(){if(this._needLabels()){const e=this._calculateLabelFontSize();if(e&&e>=8)return 1.4*e}return 0}_calculateLabelFontSize(){return""===this._maxLengthLabel?null:this._calculateFontSize(this._maxLengthLabel,Math.floor(this._model.timeScale().barSpacing())-2)}_needLabels(){const e=this._source.properties().childs().hiloStyle.childs().showLabels.value(),t=this._model.timeScale().barSpacing();return e&&t>5}}},73436:(e,t,i)=>{"use strict";i.d(t,{SeriesHollowCandlesPaneView:()=>l});var s=i(29639),r=i(55014),n=i(53074),o=i(59386),a=i(15381);class l extends a.SeriesCandlesPaneView{renderer(e,t){this._invalidated&&(this._updateImpl(null),this._invalidated=!1);const i=this._source.priceScale();if(!i)return null;const a=this._source.properties().childs().hollowCandleStyle.childs(),l=this._model.timeScale().barSpacing(),c={bars:this._bars,barSpacing:l,bodyVisible:a.drawBody.value(),borderVisible:a.drawBorder.value(),borderColor:a.borderColor.value(),wickColor:a.wickColor.value(),barWidth:(0,r.optimalBarWidth)(l),wickVisible:a.drawWick.value(),isPriceScaleInverted:i.isInverted()},h=new s.CompositeRenderer;return h.append(new o.PaneRendererCandles(c)),this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&h.append(new n.SelectionRenderer(this._selectionData)),h}}},9657:(e,t,i)=>{"use strict";i.d(t,{SeriesLinePaneView:()=>h});var s=i(14888),r=i(29639),n=i(76078),o=i(19773),a=i(53074),l=i(77906),c=i(46930);class h extends c.SeriesSingleLinePaneView{renderer(e,t){this._invalidated&&(this._updateImpl(),this._invalidated=!1);const i=this._source.properties().childs().lineStyle.childs(),c={barSpacing:this._model.timeScale().barSpacing(),items:this._items,lineColor:i.color.value(),lineStyle:i.linestyle.value(),withMarkers:i.styleType.value()===l.STYLE_LINE_TYPE_MARKERS,lineWidth:i.linewidth.value(),simpleMode:!0,hitTestResult:s.HitTestResult.REGULAR};let h,d;if(h=i.styleType.value()===l.STYLE_LINE_TYPE_STEP?new o.PaneRendererStepLine(c):new n.PaneRendererLine(c),this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData){const e=new r.CompositeRenderer;e.append(h),e.append(new a.SelectionRenderer(this._selectionData)),d=e}else d=h;return d}}},7816:(e,t,i)=>{"use strict";i.d(t,{baseBarCandlesUpdater:()=>c,SeriesBarCandlesPaneView:()=>h});var s=i(86441),r=i(2484),n=i(47149),o=i(33639),a=i(14888);function l(e){return null!=e}function c(e,t){const i=e[1],s=e[2],r=e[3],n=e[4];return!!(l(i)&&l(s)&&l(r)&&l(n))&&(t.open=i,t.high=s,t.low=r,t.close=n,!0)}class h{constructor(e,t){this._bars=[],this._invalidated=!0,this._isMarkersEnabled=(0,r.enabled)("source_selection_markers"),this._selectionData=null,this._source=e,this._model=t,this._selectionIndexer=new n.SelectionIndexes(t.timeScale())}items(){return this._bars}update(){this._invalidated=!0} -_updateImpl(e){const t=this._model.timeScale(),i=this._source.priceScale();if(this._bars=[],t.isEmpty()||!i||i.isEmpty())return;const r=t.visibleBarsStrictRange();if(null===r)return;if(0===this._source.bars().size())return;let n=this._source.nearestIndex(r.firstBar(),o.PlotRowSearchMode.NearestRight);const l=this._source.nearestIndex(r.lastBar(),o.PlotRowSearchMode.NearestLeft);if(void 0===n||void 0===l)return;for(;n<=l;n++){if(null!==this._source.bars().valueAt(n))break}if(n>l)return;const c=this._source.bars().range(n,l),h=this._source.barColorer(),d={};if(c.each(((t,i)=>{d.value=i;let s=this._source.precomputedBarStyle(i);void 0===s&&(s=h.barStyle(t,!1,d),this._source.setPrecomputedBarStyle(i,s));const r=this._createItem(Math.round(t),i,s,e);return!!r&&(d.previousValue=i,this._bars.push(r),!1)})),0===this._bars.length)return;const u=this._source.firstValue();if(null!==u)if(i.barPricesToCoordinates(this._bars,u),t.barIndexesToCoordinates(this._bars),this._model.selection().isSelected(this._source)){const e=this._selectionIndexer.indexes();this._selectionData={points:[],bgColors:[],visible:!0,hittestResult:a.HitTestResult.REGULAR,barSpacing:t.barSpacing()};const r=this._model.paneForSource(this._source);if(!r)return;const n=r.height();for(let r=0;r{"use strict";i.d(t,{SeriesDataSource:()=>y});var s=i(50151),r=i(65665),n=i(91035),o=i(578),a=i(22770),l=i(65447),c=i(7578),h=i(26867),d=i.n(h);class u{constructor(){this._created=new(d()),this._modified=new(d()),this._loading=new(d()),this._completed=new(d()),this._error=new(d()),this._symbolError=new(d()),this._symbolResolved=new(d()),this._seriesError=new(d()),this._symbolNotPermitted=new(d()),this._symbolInvalid=new(d()),this._symbolGroupNotPermitted=new(d()),this._chartTypeNotPermitted=new(d()),this._intradaySpreadNotPermitted=new(d()),this._intradayExchangeNotPermitted=new(d()),this._customIntervalNotPermitted=new(d()),this._secondsIntervalNotPermitted=new(d()),this._tickMarksRangeChanged=new(d()),this._barReceived=new(d()),this._seriesTimeFrame=new(d()),this._dataUpdated=new(d())}destroy(){this._created.destroy(),this._modified.destroy(),this._loading.destroy(),this._completed.destroy(),this._error.destroy(),this._symbolError.destroy(),this._symbolResolved.destroy(),this._seriesError.destroy(),this._symbolInvalid.destroy(),this._symbolNotPermitted.destroy(),this._symbolGroupNotPermitted.destroy(),this._chartTypeNotPermitted.destroy(),this._intradaySpreadNotPermitted.destroy(),this._intradayExchangeNotPermitted.destroy(),this._customIntervalNotPermitted.destroy(),this._secondsIntervalNotPermitted.destroy(),this._tickMarksRangeChanged.destroy(),this._barReceived.destroy(), -this._seriesTimeFrame.destroy(),this._dataUpdated.destroy()}created(){return this._created}modified(){return this._modified}loading(){return this._loading}completed(){return this._completed}error(){return this._error}symbolError(){return this._symbolError}symbolResolved(){return this._symbolResolved}seriesError(){return this._seriesError}symbolInvalid(){return this._symbolInvalid}symbolNotPermitted(){return this._symbolNotPermitted}symbolGroupNotPermitted(){return this._symbolGroupNotPermitted}chartTypeNotPermitted(){return this._chartTypeNotPermitted}intradaySpreadNotPermitted(){return this._intradaySpreadNotPermitted}intradayExchangeNotPermitted(){return this._intradayExchangeNotPermitted}customIntervalNotPermitted(){return this._customIntervalNotPermitted}secondsIntervalNotPermitted(){return this._secondsIntervalNotPermitted}tickMarksRangeChanged(){return this._tickMarksRangeChanged}barReceived(){return this._barReceived}seriesTimeFrame(){return this._seriesTimeFrame}dataUpdated(){return this._dataUpdated}fireCompleted(e){this._completed.fire(e)}fireCreated(e){this._created.fire(e)}fireModified(){this._modified.fire()}fireLoading(e){this._loading.fire(e)}fireError(){this._error.fire()}fireSymbolError(e){this._symbolError.fire(e),this.fireError()}fireSymbolResolved(e){this._symbolResolved.fire(e)}fireSeriesError(e){this._seriesError.fire(e),this.fireError()}fireSymbolInvalid(){this._symbolInvalid.fire()}fireSymbolNotPermitted(e){this._symbolNotPermitted.fire(e)}fireSymbolGroupNotPermitted(e){this._symbolGroupNotPermitted.fire(e)}fireChartTypeNotPermitted(e){this._chartTypeNotPermitted.fire(e),this.fireError()}fireIntradaySpreadNotPermitted(){this._intradaySpreadNotPermitted.fire(),this.fireError()}fireIntradayExchangeNotPermitted(){this._intradayExchangeNotPermitted.fire(),this.fireError()}fireCustomIntervalNotPermitted(e){this._customIntervalNotPermitted.fire(e),this.fireError()}fireSecondsIntervalNotPermitted(){this._secondsIntervalNotPermitted.fire(),this.fireError()}fireTickMarksRangeChanged(e){this._tickMarksRangeChanged.fire(e)}fireBarReceived(e){this._barReceived.fire(e)}fireSeriesTimeFrame(e,t,i,s,r){this._seriesTimeFrame.fire(e,t,i,s,r)}fireDataUpdated(e,t,i){this._dataUpdated.fire(e,t,i)}}var p=i(98351),_=i(1930);const m=(0,p.getLogger)("Chart.SeriesDataSource");var g;!function(e){e[e.Idle=0]="Idle",e[e.AwaitingConnection=1]="AwaitingConnection",e[e.AwaitingFirstDataUpdate=2]="AwaitingFirstDataUpdate",e[e.Active=3]="Active"}(g||(g={}));let f=1;let v=1;function S(e){return e.startDate?e.endDate||e.count?e.endDate?["from_to",e.startDate,e.endDate]:["bar_count",e.startDate,(0,s.ensure)(e.count)]:["from_to",e.startDate]:e.count||300}class y{constructor(e,t,i,s){this._symbol=null,this._resolvedSymbolName=null,this._createSeriesOverriddenParams=0,this._instanceId=null,this._symbolInstanceId=null,this._resolution=null,this._timeFrame=null,this._data=new a.SeriesData,this._dataEvents=new u,this._status=g.Idle,this._turnaroundCounter=1, -this._boundOnGatewayIsConnectedChanged=this._onGatewayIsConnectedChanged.bind(this),this._ongoingDataUpdate=Promise.resolve(),this._gateway=e,this._turnaroundPrefix=t,this._createSeriesParams=S(null!=i?i:{count:300}),this._timeFrame=s||null,this._gateway.isConnected().subscribe(this._boundOnGatewayIsConnectedChanged)}destroy(){this.stop(),this._gateway.isConnected().unsubscribe(this._boundOnGatewayIsConnectedChanged)}modifySeries(e,t,i=null,n=!1){n&&(m.logNormal("Due to force flag clearing symbol & resolution to force re-requesting data."),this._symbol=null,this._resolution=null);const a=this._symbol,l=this._resolution;if(this._symbol=e,this._resolution=t,null===this._instanceId)return void(this._timeFrame=i);const c=!(0,r.deepEquals)(a,e)[0]||null!==this._resolvedSymbolName&&this._resolvedSymbolName!==this._getSymbolNameString(e),h=null===l||!o.Interval.isEqual(l,t);(c||h||null!==i)&&(this._timeFrame=null,(c||h)&&this._turnaroundCounter++,c&&this._resolveSymbol(),this._gateway.modifySeries(this._instanceId,this.turnaround(),(0,s.ensureNotNull)(this._symbolInstanceId),this._resolution,i,this._onMessage.bind(this)),this._dataEvents.fireModified())}requestMoreData(e){null!==this._instanceId&&this._gateway.requestMoreData(this._instanceId,e,this._onMessage.bind(this))}requestMoreTickmarks(e){null!==this._instanceId&&this._gateway.requestMoreTickmarks(this._instanceId,e,this._onMessage.bind(this))}isStarted(){return this._status!==g.Idle}isActive(){return this._status===g.Active}resolution(){return this._resolution}start(){this.isStarted()?m.logNormal("start: data source is already started, nothing to do"):((0,s.assert)(null!==this._symbol,"symbol must be set before start"),(0,s.assert)(null!==this._resolution,"resolution must be set before start"),this._gateway.isConnected().value()?this._createSeries():this._changeStatusTo(g.AwaitingConnection))}stop(){this.isStarted()?(null!==this._instanceId&&(this._gateway.removeSeries(this._instanceId),this._instanceId=null),this._changeStatusTo(g.Idle)):m.logNormal("stop: data source is already stopped, nothing to do")}instanceId(){return this._instanceId}data(){return this._data}clearData(){this.isStarted()?this._enqueueUpdate((()=>this._clearDataImpl())):this._clearDataImpl()}dataEvents(){return this._dataEvents}turnaround(){return`${this._turnaroundPrefix}${this._turnaroundCounter}`}symbolInstanceId(){return this._symbolInstanceId}symbol(){return this._symbol}moveData(e){this._enqueueUpdate((()=>this._data.moveData(e)))}setInitialRequestOptions(e){this._createSeriesOverriddenParams=S(e)}_resolveSymbol(){null!==this._symbol&&(this._symbolInstanceId=this._gateway.resolveSymbol("sds_sym_"+f++,(0,n.encodeExtendedSymbolOrGetSimpleSymbolString)(this._symbol),this._onMessage.bind(this)))}_clearDataImpl(){this._data.clear()}_changeStatusTo(e){(0,s.assert)(this._status!==e,"Source and destination status should be distinct"),m.logNormal(`Status changed from ${g[this._status]} to ${g[e]}`),this._status=e}_createSeries(){(0, -s.assert)(this._status!==g.Active,'Status should not be "Active" when creating a study'),this._instanceId="sds_"+v++,this._resolveSymbol();const e=this._createSeriesOverriddenParams||this._createSeriesParams;this._createSeriesOverriddenParams&&(this._createSeriesOverriddenParams=0),this._gateway.createSeries(this._instanceId,this.turnaround(),(0,s.ensureNotNull)(this._symbolInstanceId),(0,s.ensureNotNull)(this._resolution),e,this._timeFrame,this._onMessage.bind(this)),this._timeFrame=null,this._changeStatusTo(g.AwaitingFirstDataUpdate),this._dataEvents.fireCreated(this._instanceId)}_onGatewayIsConnectedChanged(e){e?this._onGatewayConnected():this._onGatewayDisconnected()}_onGatewayConnected(){this._status===g.AwaitingConnection&&this._createSeries()}_onGatewayDisconnected(){this._status!==g.Idle&&this._status!==g.AwaitingConnection&&(this._instanceId=null,this._changeStatusTo(g.AwaitingConnection)),this._turnaroundCounter=1}_onMessage(e){this._enqueueUpdate((()=>this._onMessageImpl(e)))}async _onMessageImpl(e){switch(e.method){case"symbol_resolved":{const[t,i]=e.params;if(t!==this._symbolInstanceId){m.logNormal(`Resolve for old symbol, expected: ${this._symbolInstanceId}, actual ${e.params[0]}`);break}this._onSymbolResolved(i);break}case"symbol_error":if(e.params[0]!==this._symbolInstanceId){m.logNormal(`Symbol error for old symbol, expected: ${this._symbolInstanceId}, actual ${e.params[0]}`);break}this._onSymbolError(e);break;case"series_timeframe":{const[t,i,s,r,n,o,a]=e.params;if(!this._checkTurnaround(t,i)){m.logNormal(`Time frame for old data, expected: ${this._symbolInstanceId} (${this.turnaround()}), actual ${t} (${i})`);break}this._onSeriesTimeFrame(s,r,n,o,a);break}case"series_error":{const[t,i]=e.params;if(!this._checkTurnaround(t,i)){m.logNormal(`Series error for old data, expected: ${this._symbolInstanceId} (${this.turnaround()}), actual ${t} (${i})`);break}this._onSeriesError(e.params[2]);break}case"series_loading":{const[t,i]=e.params;if(!this._checkTurnaround(t,i))break;this._onSeriesLoading(e.time);break}case"series_completed":{const[t,i,s,r]=e.params;if(!this._checkTurnaround(t,s)){m.logNormal(`Series completed for old data, expected: ${this._symbolInstanceId} (${this.turnaround()}), actual ${t} (${s})`);break}this._onSeriesCompleted(i,e.time,r);break}case"data_update":if(!this._checkTurnaround(e.params.customId,e.params.turnaround)){m.logNormal(`Data update for old data, expected: ${this._symbolInstanceId} (${this.turnaround()}), actual ${e.params.customId} (${e.params.turnaround})`);break}await this._onDataUpdate(e.params.plots,e.params.nonseries,e.params.lastBar);break;case"clear_data":if(e.params.turnaround!==this.turnaround()){m.logNormal(`Clear data for old data, expected: ${this.turnaround()}, actual ${e.params.turnaround}`);break}this._clearDataImpl(),this._dataEvents.fireDataUpdated(void 0,!1,null)}}_onSeriesError(e){let t,i;if("string"==typeof e)i={error:e},t=e;else if(i=e,e.ctx){const i={};Object.entries(e.ctx).forEach((([e,t])=>{i[e]=t.toString()})),t=e.error.format(i)}else t=e.error -;if(t.startsWith("study_not_auth:")){const e=t.split(":",2)[1].split("@",2)[0];if(["BarSetRenko","BarSetPriceBreak","BarSetKagi","BarSetPnF"].includes(e))this._dataEvents.fireChartTypeNotPermitted(e);else if("BarSetSpread"===e)this._dataEvents.fireIntradaySpreadNotPermitted();else if("BarSetRange"===e){const e=`${(0,s.ensureNotNull)(this._symbol).inputs.range}R`;this._dataEvents.fireCustomIntervalNotPermitted(e)}}else"resolution_not_entitled"===t?this._dataEvents.fireIntradayExchangeNotPermitted():"custom_resolution"===t?this._dataEvents.fireCustomIntervalNotPermitted((0,s.ensureNotNull)(this._resolution)):"seconds_not_entitled"===t&&this._dataEvents.fireSecondsIntervalNotPermitted();this._dataEvents.fireSeriesError(i)}_onSeriesTimeFrame(e,t,i,s,r){this._dataEvents.fireSeriesTimeFrame(e,t,i,null==s||s,r)}_onSymbolError(e){if(e.params[1]===c.permissionDenied)switch(e.params[2]){case c.SymbolErrorPermissionDeniedReason.Symbol:this._dataEvents.fireSymbolNotPermitted(e.params[3]);break;case c.SymbolErrorPermissionDeniedReason.GroupPermission:this._dataEvents.fireSymbolGroupNotPermitted(e.params[3]);break;default:this._dataEvents.fireSymbolNotPermitted(e.params[2])}else e.params[1]===c.invalidSymbol&&this._dataEvents.fireSymbolInvalid();this._dataEvents.fireSymbolError(e.params[1])}_onSymbolResolved(e){this._resolvedSymbolName=(0,_.symbolForApi)(e,this._getSymbolNameString((0,s.ensureNotNull)(this._symbol))),this._dataEvents.fireSymbolResolved(e)}_getSymbolNameString(e){return"string"==typeof e.symbol?e.symbol:e.symbol.symbol}async _onDataUpdate(e,t,i){this._onDataUnpacked(e,i,await async function(e){if(void 0===e)return{projectionPlots:[],boxSize:null};if(""===e.d||"nochange"===e.indexes)return null;const t=await(0,l.unpackNonSeriesData)(e.d);if(null===t||t.indexes_replace)return null;const i=e.indexes,{bars:s,price:r,boxSize:n,reversalAmount:o}=t.data,a=(s||[]).map((e=>{let t;return"factor"in e?t=e.factor:"additionalPrice"in e&&(t=e.additionalPrice),{index:i[e.time],value:[0,e.open,e.high,e.low,e.close,e.volume,t]}}));return{lastPrice:r,projectionPlots:a,reversalAmount:o,boxSize:n}}(t))}_enqueueUpdate(e){return this._ongoingDataUpdate=this._ongoingDataUpdate.then(e,e),this._ongoingDataUpdate}_onDataUnpacked(e,t,i){if(this._status===g.Idle)return;this._status===g.AwaitingFirstDataUpdate&&(this._changeStatusTo(g.Active),this._clearDataImpl());const s=this._data.bars().size(),r=this._data.bars().firstIndex(),n=this._data.mergeRegularBars(e);null!==i&&(this._data.nsBars().clear(),this._data.nsBars().merge(i.projectionPlots),this._data.lastProjectionPrice=i.lastPrice,null!==i.boxSize&&(this._data.boxSize=i.boxSize),this._data.reversalAmount=i.reversalAmount);const o=null===r||null!==n&&n.index{"use strict";i.d(t,{SeriesHorizontalBaseLinePaneView:()=>r});var s=i(1975);class r extends s.SeriesHorizontalLinePaneView{constructor(e){super(e)}_updateImpl(){this._lineRendererData.visible=!1;const e=this._series.priceScale().mode();if(!e.percentage&&!e.indexedTo100)return;const t=this._series.firstValue();null!==t&&(this._lineRendererData.visible=!0,this._lineRendererData.y=this._series.priceScale().priceToCoordinate(t,t),this._lineRendererData.color=this._series.properties().childs().baseLineColor.value())}}},1975:(e,t,i)=>{"use strict";i.d(t,{SeriesHorizontalLinePaneView:()=>r});var s=i(56744);class r extends s.HorizontalLinePaneView{constructor(e){super(),this._series=e,this._model=e.model()}}},46930:(e,t,i)=>{"use strict";i.d(t,{SeriesSingleLinePaneView:()=>d});var s=i(3308),r=i(86441),n=i(50151),o=i(2484),a=i(47149),l=i(33639),c=i(14888),h=i(93975);class d{constructor(e,t){this._items=[],this._invalidated=!0,this._isMarkersEnabled=(0,o.enabled)("source_selection_markers"),this._selectionData=null,this._source=e,this._model=t,this._selectionIndexer=new a.SelectionIndexes(t.timeScale())}update(){this._invalidated=!0}_updateImpl(){var e,t;this._items=[];const i=this._model.timeScale(),o=this._source.priceScale();if(i.isEmpty()||!o||o.isEmpty())return;const a=i.visibleBarsStrictRange();if(null===a)return;if(0===this._source.bars().size())return;const d=null!==(e=this._source.nearestIndex(a.firstBar()-1,l.PlotRowSearchMode.NearestLeft))&&void 0!==e?e:a.firstBar()-1,u=null!==(t=this._source.nearestIndex(a.lastBar()+1,l.PlotRowSearchMode.NearestRight))&&void 0!==t?t:a.lastBar()+1,p=this._source.barFunction();let _=null;const m=this._model.timeScale().barSpacing();if(m<.1&&this._source.supportsPressedChunks()){_=this._source.firstValue();const e=this._source.pressedChunks(m,(0,n.ensureNotNull)(this._source.priceSource())),t=(0,h.lowerbound)(e,d,((e,t)=>e.startTimee.endTime{const i=new r.Point(t.startTime,e);this._items.push(i)}))}}else{_=this._source.bars().range(d,u).reduce(((e,t,i)=>{const n=p(i);if(!(0,s.default)(n))return e;const o=new r.Point(t,n);return this._items.push(o),a.contains(t)?null!=e?e:n:e}),null)}if(null!==_)if(o.pointsArrayToCoordinates(this._items,_),i.timedValuesToCoordinates(this._items),this._model.selection().isSelected(this._source)){const e=this._selectionIndexer.indexes();this._selectionData={points:[],bgColors:[],visible:!0,barSpacing:i.barSpacing(),hittestResult:c.HitTestResult.REGULAR};const t=(0,n.ensureNotNull)(this._model.paneForSource(this._source)).height();this._selectionData.hittestResult=c.HitTestResult.REGULAR;for(let s=0;s{"use strict";i.d(t,{calculateColor:()=>P,SeriesValuesProvider:()=>T});var s=i(50151),r=i(50335),n=i(24377),o=i(44352),a=i(49483),l=(i(2484),i(38031)),c=i(80142),h=i(33639),d=i(76076),u=i(18766),p=i(48566),_=i(2250),m=i(57757),g=i(49897),f=i(28667),v=i(2);const S=a.CheckMobile.any(),y=S&&!0,b=new u.PercentageFormatter,w=new p.VolumeFormatter(2),C=`${v.notAvailable} (${v.notAvailable}%)`;function P(e,t){const i=(0,n.parseRgb)(t),s=(0,n.parseRgb)(e);return(0,n.distanceRgb)(i,s)<70?(0,n.rgbToHexString)((0,n.invertRgb)(i)):t}class T{constructor(e,t){this._series=e,this._model=t,this._emptyValues=[{title:o.t(null,void 0,i(39280)),visible:!1,value:"",index:0,id:""},{title:o.t(null,void 0,i(30777)),visible:!1,value:"",index:1,id:""},{title:o.t(null,void 0,i(8136)),visible:!1,value:"",index:2,id:""},{title:o.t(null,void 0,i(31691)),visible:!1,value:"",index:3,id:""},{title:"",visible:!1,value:"",index:4,id:""},{title:"",visible:!1,value:"",index:5,id:""},{title:o.t(null,void 0,i(49329)),visible:!1,value:"",index:6,id:""},{title:o.t(null,{context:"study"},i(32819)),visible:!1,value:"",index:7,id:""}]}getItems(){return this._emptyValues}getValues(e){var t;const i=this._showLastPriceAndChangeOnly(),n=this._emptyValues.map((e=>({...e,visible:!i})));n[0].value=v.notAvailable,n[1].value=v.notAvailable,n[2].value=v.notAvailable,n[3].value=v.notAvailable,n[6].value=C,n[7].value=v.notAvailable,n[5].visible=!1;const o=n[4];if(o.value=v.notAvailable,o.visible=!1,this._model.timeScale().isEmpty()||0===this._series.bars().size()||this._series.priceScale().isEmpty())return n;(0,r.isNumber)(e)||(e=(0,s.ensureNotNull)(this._series.data().last()).index);const a=this._series.nearestIndex(e,h.PlotRowSearchMode.NearestLeft);if(void 0===a)return n;const d=this._series.data().valueAt(a),u=this._model.backgroundTopColor().value();if(null===d)return n;const p=d[1],m=d[2],f=d[3],S=d[4],{values:T}=this._changesData(S,a,i),x=(0,g.getPriceValueFormatterForSource)(this._series);if((0,g.shouldBeFormattedAsPercent)(this._series)||(0,g.shouldBeFormattedAsIndexedTo100)(this._series))n[6].value="";else if(void 0!==T){const e=this._series.formatter();n[6].value=(0,c.forceLTRStr)(`${e.format(T.change,!0)} (${b.format(T.percentChange,!0)})`)}if(i)n[5].value=null==S?v.notAvailable:x(S),n[5].visible=!0,n[6].visible=!0;else{n[0].value=null==p?v.notAvailable:x(p),n[1].value=null==m?v.notAvailable:x(m),n[2].value=null==f?v.notAvailable:x(f),n[3].value=null==S?v.notAvailable:x(S),n[4].value=x(this._series.barFunction()(d));const e=d[5];(0,r.isNumber)(e)?n[7].value=w.format(e):n[7].visible=!1}let I=null;if(i&&!y)I=void 0===T||T.change>=0?_.SeriesBarColorer.upColor(this._series.properties()):_.SeriesBarColorer.downColor(this._series.properties());else{const e=this._series.barColorer().barStyle(a,!1);I=P(u,null!==(t=e.barBorderColor)&&void 0!==t?t:e.barColor)}I=(0,l.resetTransparency)(P(u,I)) -;for(const e of n)e.color=I;return n}_showLastPriceAndChangeOnly(){return S&&(null===this._model.crossHairSource().pane||(0,f.isLineToolName)(d.tool.value())||null!==this._model.lineBeingEdited())}_changesData(e,t,i){var s;if(i&&!y){const e=this._series.quotes();if(null!==e)return{values:{change:null!==e.change?e.change:0,percentChange:null!==e.change_percent?e.change_percent:0}}}else{const i=this._series.data().search(t-1,h.PlotRowSearchMode.NearestLeft),r=null!==(s=null==i?void 0:i.value[4])&&void 0!==s?s:null;if(null!==r&&null!=e)return{values:{change:e-r,percentChange:(0,m.barPercentChange)(r,e)}}}return{}}}},22600:(e,t,i)=>{"use strict";i.d(t,{sessionsPreferencesDefault:()=>r});var s=i(7394);const r={graphics:{backgrounds:{outOfSession:{color:s.colorsPalette["color-tv-blue-500"],transparency:92,visible:!1},preMarket:{color:"#FF9800",transparency:92,visible:!1},postMarket:{color:s.colorsPalette["color-tv-blue-500"],transparency:92,visible:!1}},vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}}}},72039:(e,t,i)=>{"use strict";i.d(t,{StatusProviderBase:()=>s});class s{constructor(e){this._colorProperty=e}size(){return"13px"}bold(){return!1}color(){return this._colorProperty.value()}}},17659:(e,t,i)=>{"use strict";i.d(t,{StatusView:()=>s});class s{constructor(e){this._text="",this._color="",this._size="13px",this._bold=!1,this._statusProvider=e}text(){return this._text}getSplitTitle(){return[this._text]}color(){return this._statusProvider.color()}bold(){return this._bold}size(){return this._size}}},67052:(e,t,i)=>{"use strict";var s;i.d(t,{StoriesTimeLineItemType:()=>s}),function(e){e[e.Image=0]="Image",e[e.Emoji=1]="Emoji"}(s||(s={}))},83990:(e,t,i)=>{"use strict";i.d(t,{seriesPrice:()=>n,positionVisualDirection:()=>a,positionToCoordinate:()=>l,noDataBasePosition:()=>c,seriesBasePosition:()=>h,getNoDataPosition:()=>d,getSeriesPosition:()=>u});var s=i(50151),r=i(33639);function n(e,t,i){const s=e.barFunction();switch(e.style()){case 3:case 10:case 2:return s(t.value);default:return t.value[-1===i?3:2]}}function o(e){return e>=0?1:-1}function a(e,t){return-1===o(e)!==t?-1:1}function l(e,t,i,s){const r=Math.min(t,Math.max(0,1===s?i:t-i));return i-s*Math.abs(r*e/100)}function c(e,t,i){const s=e.index();return null===s?null:{index:s,price:t.coordinateToPrice(t.height()/2,i)}}function h(e,t){const i=e.data().bars(),s=i.first(),a=i.last();if(null===s||null===a)return null;let l;const c=t.index();if(null===c){if(void 0===t.time)return null;const e=t.time(),n=s.value[0],o=a.value[0];if(eo)return null;l=i.searchByTime(e,r.PlotRowSearchMode.NearestRight,4)}else l=i.search(c);return null===l?null:{index:l.index,price:n(e,l,o(t.position()))}}function d(e,t,i){const s=c(e,t,i);if(null===s)return null;const r=a(e.position(),t.isInverted());return{index:s.index,price:s.price,poleStartY:t.height(),visualDirection:1,positionPointDirection:r,startsOnSeriesData:!1}}function u(e,t,i=!0){const r=h(e,t),n=e.priceScale(),o=(0,s.ensureNotNull)(e.firstValue());if(null===r)return d(t,n,o);let l=0 -;const c=e.properties().childs(),u=e.model().timeScale(),p=n.priceToCoordinate(r.price,o);if(i)switch(e.style()){case 3:l=c.areaStyle.childs().linewidth.value()/2;break;case 2:l=c.lineStyle.childs().linewidth.value()/2;break;case 10:const e=Math.abs(100-c.baselineStyle.childs().baseLevelPercentage.value());l=n.height()*e/100>p?c.baselineStyle.childs().topLineWidth.value()/2:c.baselineStyle.childs().bottomLineWidth.value()/2;break;case 1:case 9:case 8:case 12:case 4:case 7:l=3;break;case 0:l=c.barStyle.childs().thinBars.value()?3:Math.max(3,.25*u.barSpacing());break;case 11:l=c.rangeStyle.childs().thinBars.value()?3:Math.max(3,.25*u.barSpacing());break;case 5:l=Math.max(4,.25*u.barSpacing());break;case 6:l=Math.max(5,.25*u.barSpacing())}const _=a(t.position(),n.isInverted()),m=p-_*l;return{index:r.index,price:r.price,poleStartY:m,visualDirection:_,positionPointDirection:_,startsOnSeriesData:!0}}},10623:(e,t,i)=>{"use strict";i.d(t,{materializeBackground:()=>o,dematerializeBackground:()=>a,isBackgroundInBarsRange:()=>l});var s=i(50151),r=i(33143),n=i(65447);function o(e,t){if(e.start>=t.length||e.stop>=t.length)return null;const i=t[e.start],n=t[e.stop];return n===r.INVALID_TIME_POINT_INDEX?null:((0,s.assert)(i===r.INVALID_TIME_POINT_INDEX||i<=n,"start should not exceed stop"),{start:i===r.INVALID_TIME_POINT_INDEX?null:i,stop:n})}function a(e,t,i){return{id:t,start:(0,n.ensureTimePointIndexIndex)(i.indexOf(null!==e.start?e.start:r.INVALID_TIME_POINT_INDEX)),stop:(0,n.ensureTimePointIndexIndex)(i.indexOf(e.stop))}}function l(e,t){if(null===e.start)return t.firstBar()<=e.stop;const i=Math.min(e.start,e.stop),s=Math.max(e.start,e.stop);return t.contains(i)||t.contains(s)||it.lastBar()}},59780:(e,t,i)=>{"use strict";i.d(t,{LiveStudyGraphics:()=>o.LiveStudyGraphics,createGraphicsPaneViews:()=>p,createGraphicsPriceAxisViews:()=>m,emptyStudyGraphics:()=>n.emptyStudyGraphics,isStudyGraphicsEmpty:()=>r.isStudyGraphicsEmpty,loadStudyGraphics:()=>n.loadStudyGraphics,saveStudyGraphics:()=>n.saveStudyGraphics});var s=i(98351),r=i(83280),n=i(49570),o=i(4574),a=i(67876),l=i(38031);class c extends a.PriceAxisView{constructor(e,t){super(),this._source=e,this._data=t}_updateRendererData(e,t,i){var s,r;e.visible=!1;const n=this._source.priceScale(),o=this._source.properties().childs(),a=o.visible.value();if(!n||n.isEmpty()||!a)return;const c=null===(r=null===(s=o.graphics.childs()[this._data.lineType])||void 0===s?void 0:s.childs()[this._data.styleId])||void 0===r?void 0:r.childs();if(!(void 0!==c&&c.visible&&c.visible.value()&&c.showPrice&&c.showPrice.value()&&this._isLabelVisibleAccordinglyToProperties()))return;const h=this._source.firstValue();if(null===h)return;const d=this._data.line.level,u=(0,l.resetTransparency)(c.color.value());i.background=u,i.textColor=this.generateTextColor(u),i.coordinate=n.priceToCoordinate(d,h),e.text=n.formatPrice(d,h,!0),e.visible=!0}_isLabelVisibleAccordinglyToProperties(){ -return!!this._source.model().properties().childs().scalesProperties.childs().showStudyLastValue.value()&&this._source.properties().childs().showLabelsOnPriceScale.value()}}const h=(0,s.getLogger)("Chart.StudyGraphics"),d=new Set(["dwgtablecells"]);async function u(e,t,s,r){switch(e){case"hhists":return new((await i.e(507).then(i.bind(i,58222))).HHistPaneView)(t,s,r);case"horizlines":return new((await i.e(507).then(i.bind(i,94993))).HorizLinePaneView)(t,s,r);case"vertlines":return new((await i.e(507).then(i.bind(i,66794))).VertLinePaneView)(t,s,r);case"polygons":return new((await i.e(507).then(i.bind(i,55493))).PolygonPaneView)(t,s,r);case"backgrounds":return new((await i.e(507).then(i.bind(i,13770))).BackgroundPaneView)(t,s,r)}return null}async function p(e,t,i){const s=[],r=Object.keys(e.graphicsInfo());r.sort(((e,t)=>_(e)-_(t)));for(const n of r){const r=await u(n,e,t,i);null!==r?s.push(r):d.has(n)||h.logWarn(`${n} is not supported by this build of graphics subsystem, skipping`)}return s}function _(e){var t;return null!==(t=r.primitivesZOrders.get(e))&&void 0!==t?t:0}function m(e){const t=Object.keys(e.graphicsInfo()),i=[];for(const s of t)switch(s){case"hlines":e.graphics().hlines().forEach(((t,r)=>{t.forEach((t=>{void 0!==t.level&&i.push(new c(e,{line:{level:t.level},styleId:r,lineType:s}))}))}));break;case"horizlines":e.graphics().horizlines().forEach(((t,r)=>{t.forEach((t=>{void 0!==t.level&&i.push(new c(e,{line:{level:t.level},styleId:r,lineType:s}))}))}))}return i}},9822:(e,t,i)=>{"use strict";i.d(t,{HHistDirection:()=>s,HHistLocation:()=>r,HHistVolumeMode:()=>n,materializeHHist:()=>c,dematerializeHHist:()=>h,isHHistInBarsRange:()=>d});var s,r,n,o=i(50151),a=i(33143),l=i(65447);function c(e,t){if(e.firstBarTime>=t.length||e.lastBarTime>=t.length)return null;const i=t[e.firstBarTime],s=t[e.lastBarTime];return i===a.INVALID_TIME_POINT_INDEX||s===a.INVALID_TIME_POINT_INDEX?null:((0,o.assert)(i<=s,"firstBarTime should not exceed lastBarTime"),(0,o.assert)(e.priceLow<=e.priceHigh,"priceLow should not exceed priceHigh"),{firstBarTime:i,lastBarTime:s,rate:e.rate,priceHigh:e.priceHigh,priceLow:e.priceLow})}function h(e,t,i){const s=(0,l.ensureTimePointIndexIndex)(i.indexOf(e.firstBarTime)),r=(0,l.ensureTimePointIndexIndex)(i.indexOf(e.lastBarTime));return{id:t,...e,firstBarTime:s,lastBarTime:r}}function d(e,t){const i=Math.min(e.firstBarTime,e.lastBarTime),s=Math.max(e.firstBarTime,e.lastBarTime);return t.contains(i)||t.contains(s)||it.lastBar()}!function(e){e.LeftToRight="left_to_right",e.RightToLeft="right_to_left"}(s||(s={})),function(e){e.Relative="relative",e.Absolute="absolute"}(r||(r={})),function(e){e.UpDown="Up/Down",e.Total="Total",e.Delta="Delta"}(n||(n={}))},41837:(e,t,i)=>{"use strict";i.d(t,{materializeHorizLine:()=>o,dematerializeHorizLine:()=>a,isHorizLineInBarsRange:()=>l});var s=i(50151),r=i(33143),n=i(65447);function o(e,t){if(e.startIndex>=t.length||e.endIndex>=t.length)return null;const i=t[e.startIndex],n=t[e.endIndex] -;return i===r.INVALID_TIME_POINT_INDEX||n===r.INVALID_TIME_POINT_INDEX?null:((0,s.assert)(i<=n,"startIndex should not exceed endIndex"),{startIndex:i,endIndex:n,level:e.level,extendLeft:e.extendLeft,extendRight:e.extendRight})}function a(e,t,i){const s=(0,n.ensureTimePointIndexIndex)(i.indexOf(e.startIndex)),r=(0,n.ensureTimePointIndexIndex)(i.indexOf(e.endIndex));return{id:t,...e,startIndex:s,endIndex:r}}function l(e,t){const i=Math.min(e.startIndex,e.endIndex),s=Math.max(e.startIndex,e.endIndex);if(t.contains(i)||t.contains(s)||it.lastBar())return!0;const r=e.startIndext.lastBar()&&r}},4574:(e,t,i)=>{"use strict";i.d(t,{LiveStudyGraphics:()=>d});var s=i(50151),r=i(9822),n=i(41837),o=i(61503),a=i(42454),l=i(10623),c=i(83280),h=i(49570);class d{constructor(){this._indexes=[],this._horizlines=new Map,this._vertlines=new Map,this._lines=new Map,this._hlines=new Map,this._textmarks=new Map,this._shapemarks=new Map,this._backgrounds=new Map,this._polygons=new Map,this._trendchannels=new Map,this._hhists=new Map,this._dwglabels=new Map,this._dwgboxes=new Map,this._dwglines=new Map,this._dwgtables=new Map,this._dwgtablecells=new Map,this._dwglinefills=new Map,this._hhistsByTimePointIndex=new Map}horizlines(){return this._horizlines}vertlines(){return this._vertlines}lines(){return this._lines}hlines(){return this._hlines}textmarks(){return this._textmarks}shapemarks(){return this._shapemarks}backgrounds(){return this._backgrounds}polygons(){return this._polygons}trendchannels(){return this._trendchannels}hhists(){return this._hhists}dwglabels(){return this._dwglabels}dwglines(){return this._dwglines}dwgboxes(){return this._dwgboxes}dwgtables(){return this._dwgtables}dwgtablecells(){return this._dwgtablecells}dwglinefills(){return this._dwglinefills}hhistsByTimePointIndex(){return this._hhistsByTimePointIndex}clear(){this._indexes=[],this._clearPrimitives()}extract(){const e=e=>e.extract(),t={indexes:this._indexes,horizlines:p(this._horizlines,e),vertlines:p(this._vertlines,e),lines:p(this._lines,e),hlines:p(this._hlines,e),textmarks:p(this._textmarks,e),shapemarks:p(this._shapemarks,e),backgrounds:p(this._backgrounds,e),polygons:p(this._polygons,e),trendchannels:p(this._trendchannels,e),hhists:p(this._hhists,e),dwglabels:p(this._dwglabels,e),dwglines:p(this._dwglines,e),dwgboxes:p(this._dwgboxes,e),dwgtables:p(this._dwgtables,e),dwgtablecells:p(this._dwgtablecells,e),dwglinefills:p(this._dwglinefills,e)};return this._hhistsByTimePointIndex=new Map,new h.StaticStudyGraphics("data",t)}replaceIndexesTo(e){this._indexes=e;const t=e=>e.replaceIndexesTo(this._indexes);this._horizlines.forEach(t),this._vertlines.forEach(t),this._lines.forEach(t),this._hlines.forEach(t),this._textmarks.forEach(t),this._shapemarks.forEach(t),this._backgrounds.forEach(t),this._polygons.forEach(t),this._trendchannels.forEach(t),this._hhists.forEach(t),this._dwglabels.forEach(t),this._dwgboxes.forEach(t), -this._dwglines.forEach(t),this._dwgtables.forEach(t),this._dwgtablecells.forEach(t),this._dwglinefills.forEach(t),this._hhistsByTimePointIndex=(0,c.splitHHistsByTimePointIndex)(this._hhists)}processCommands(e,t){void 0!==e.erase&&this._processEraseCommands(e.erase),void 0!==e.create&&this._processCreateCommands(e.create,t)}_processCreateCommands(e,t){for(const i in e){if(!e.hasOwnProperty(i))continue;const c=i;switch((0,s.assert)(c in t,`There is a '${c}' in study response, but it doesn't present in graphics info!`),c){case"hhists":_(this._hhists,e[c],t[c],this._indexes,r.materializeHHist);break;case"horizlines":_(this._horizlines,e[c],t[c],this._indexes,n.materializeHorizLine);break;case"vertlines":_(this._vertlines,e[c],t[c],this._indexes,o.materializeVertLine);break;case"polygons":_(this._polygons,e[c],t[c],this._indexes,a.materializePolygon);break;case"backgrounds":_(this._backgrounds,e[c],t[c],this._indexes,l.materializeBackground)}}this._hhistsByTimePointIndex=(0,c.splitHHistsByTimePointIndex)(this._hhists)}_processEraseCommands(e){for(const t of e)if("all"===t.action)this._clearPrimitives();else{const e=e=>e.deleteById(t.id);switch(t.type){case"horizlines":this._horizlines.forEach(e);break;case"vertlines":this._vertlines.forEach(e);break;case"lines":this._lines.forEach(e);break;case"hlines":this._hlines.forEach(e);break;case"textmarks":this._textmarks.forEach(e);break;case"shapemarks":this._shapemarks.forEach(e);break;case"backgrounds":this._backgrounds.forEach(e);break;case"polygons":this._polygons.forEach(e);break;case"trendchannels":this._trendchannels.forEach(e);break;case"hhists":this._hhists.forEach(e);break;case"dwglabels":this._dwglabels.forEach(e);break;case"dwglines":this._dwglines.forEach(e);break;case"dwgboxes":this._dwgboxes.forEach(e);break;case"dwgtables":this._dwgtables.forEach(e);break;case"dwgtablecells":this._dwgtablecells.forEach(e);break;case"dwglinefills":this._dwglinefills.forEach(e)}}this._hhistsByTimePointIndex=(0,c.splitHHistsByTimePointIndex)(this._hhists)}_clearPrimitives(){this._horizlines.clear(),this._vertlines.clear(),this._lines.clear(),this._hlines.clear(),this._textmarks.clear(),this._shapemarks.clear(),this._backgrounds.clear(),this._polygons.clear(),this._trendchannels.clear(),this._hhists.clear(),this._dwglabels.clear(),this._dwgboxes.clear(),this._dwglines.clear(),this._dwgtables.clear(),this._dwgtablecells.clear(),this._dwglinefills.clear(),this._hhistsByTimePointIndex=new Map}}class u{constructor(e,t){this._primitivesDataById=new Map,this._primitiveById=new Map,this._materializePrimitive=e,this._indexes=t}forEach(e,t){this._primitiveById.forEach((i=>{e.call(t,i,i,this)}))}has(e){let t=!1;return this._primitiveById.forEach((i=>{t=t||i===e})),t}get size(){return this._primitiveById.size}[Symbol.iterator](){return this._primitiveById.values()}entries(){throw new Error("Not implemented")}keys(){throw new Error("Not implemented")}values(){throw new Error("Not implemented")}hasId(e){return this._primitiveById.has(e)}addData(e){this._primitivesDataById.set(e.id,e), -this._tryMaterialize(e)}deleteById(e){this._primitiveById.delete(e),this._primitivesDataById.delete(e)}clear(){this._primitivesDataById.clear(),this._primitiveById.clear()}replaceIndexesTo(e){this._indexes=e,this._primitiveById.clear(),this._primitivesDataById.forEach(this._tryMaterialize,this)}extract(){const e=new Set(this._primitivesDataById.values());return this._primitivesDataById=new Map,this._primitiveById.clear(),e}_tryMaterialize(e){const t=this._materializePrimitive(e,this._indexes);null!==t&&((0,s.assert)(!this._primitiveById.has(e.id),"primitive with specified id should not exist"),this._primitiveById.set(e.id,t))}}function p(e,t){const i=new Map;return e.forEach(((e,s)=>i.set(s,t(e)))),i}function _(e,t,i,r,n){if(void 0!==t)for(const o of t){const t=o.styleId;void 0!==i&&(0,s.assert)(t in i,"Every style used by graphics primitive should be declared in study metainfo");let a=e.get(t);void 0===a&&(a=new u(n,r),e.set(t,a)),o.data.forEach(a.addData.bind(a))}}},42454:(e,t,i)=>{"use strict";i.d(t,{materializePolygon:()=>n,dematerializePolygon:()=>o,isPolygonInBarsRange:()=>a});var s=i(33143),r=i(65447);function n(e,t){for(const i of e.points){if(i.index>=t.length)return null;if(t[i.index]===s.INVALID_TIME_POINT_INDEX)return null}return{points:e.points.map((e=>({index:t[e.index],offset:e.offset,level:e.level})))}}function o(e,t,i){return{id:t,points:e.points.map((e=>({...e,index:(0,r.ensureTimePointIndexIndex)(i.indexOf(e.index))})))}}function a(e,t){var i;if(e.points.some((e=>{var i;return t.contains(e.index+(null!==(i=e.offset)&&void 0!==i?i:0))})))return!0;let s=!1,r=!1;const n=t.firstBar();for(const t of e.points)t.index+(null!==(i=t.offset)&&void 0!==i?i:0){"use strict";i.d(t,{StaticStudyGraphics:()=>h,emptyStudyGraphics:()=>_,loadStudyGraphics:()=>m,saveStudyGraphics:()=>g});var s=i(33143),r=i(41837),n=i(61503),o=i(9822),a=i(42454),l=i(10623),c=i(83280);class h{constructor(e,t){if(this._indexes=[],this._horizlines=new Map,this._vertlines=new Map,this._lines=new Map,this._hlines=new Map,this._textmarks=new Map,this._shapemarks=new Map,this._backgrounds=new Map,this._polygons=new Map,this._trendchannels=new Map,this._hhists=new Map,this._dwglabels=new Map,this._dwglines=new Map,this._dwgboxes=new Map,this._dwgtables=new Map,this._dwgtablecells=new Map,this._dwglinefills=new Map,"data"===e){const e=t;this._indexes=e.indexes,this._vertlines=d(e.vertlines,this._indexes,n.materializeVertLine),this._horizlines=d(e.horizlines,this._indexes,r.materializeHorizLine),this._polygons=d(e.polygons,this._indexes,a.materializePolygon),this._hhists=d(e.hhists,this._indexes,o.materializeHHist),this._backgrounds=d(e.backgrounds,this._indexes,l.materializeBackground)}else if("state"===e){const e=t;this._indexes=e.indexes||[],this._vertlines=u(e.vertlines,this._indexes,n.materializeVertLine),this._horizlines=u(e.horizlines,this._indexes,r.materializeHorizLine),this._polygons=u(e.polygons,this._indexes,a.materializePolygon),this._hhists=u(e.hhists,this._indexes,o.materializeHHist), -this._backgrounds=u(e.backgrounds,this._indexes,l.materializeBackground)}this._hhistsByTimePointIndex=(0,c.splitHHistsByTimePointIndex)(this._hhists)}horizlines(){return this._horizlines}vertlines(){return this._vertlines}lines(){return this._lines}hlines(){return this._hlines}textmarks(){return this._textmarks}shapemarks(){return this._shapemarks}backgrounds(){return this._backgrounds}polygons(){return this._polygons}trendchannels(){return this._trendchannels}hhists(){return this._hhists}dwglabels(){return this._dwglabels}dwglines(){return this._dwglines}dwgboxes(){return this._dwgboxes}dwgtables(){return this._dwgtables}dwgtablecells(){return this._dwgtablecells}dwglinefills(){return this._dwglinefills}hhistsByTimePointIndex(){return this._hhistsByTimePointIndex}}function d(e,t,i){const s=new Map;return e.forEach(((e,r)=>{const n=s.get(r)||new Set;e.forEach((e=>{const s=i(e,t);null!==s&&n.add(s)})),s.set(r,n)})),s}function u(e,t,i){const s=new Map;if(void 0===e)return s;for(const r of e){const e=r.styleId,n=s.get(e)||new Set;r.data.forEach((e=>{const s=i(e,t);null!==s&&n.add(s)})),s.set(e,n)}return s}function p(e,t,i,s,r,n){const o=[];return e.forEach(((e,a)=>{e.forEach((e=>{(null===r||s(e,r))&&function(e,t,i){let s=null;for(const i of e)i.styleId===t&&(s=i);null===s&&(s={styleId:t,data:[]},e.push(s)),s.data.push(i)}(o,a,n(e,t(e),i))}))})),o.length>0?o:void 0}function _(){return new h}function m(e){return new h("state",e)}function g(e,t){const i=function(e){const t=new Set;e.horizlines().forEach(((e,i)=>{e.forEach((e=>{t.add(e.startIndex),t.add(e.endIndex)}))})),e.vertlines().forEach(((e,i)=>{e.forEach((e=>{t.add(e.index)}))})),e.lines().forEach(((e,i)=>{e.forEach((e=>{t.add(e.startIndex),t.add(e.endIndex)}))})),e.textmarks().forEach(((e,i)=>{e.forEach((e=>{t.add(e.time)}))})),e.shapemarks().forEach(((e,i)=>{e.forEach((e=>{t.add(e.time)}))})),e.backgrounds().forEach(((e,i)=>{e.forEach((e=>{t.add(null!==e.start?e.start:s.INVALID_TIME_POINT_INDEX),t.add(e.stop)}))})),e.polygons().forEach(((e,i)=>{e.forEach((e=>{e.points.forEach((e=>{t.add(e.index)}))}))})),e.trendchannels().forEach(((e,i)=>{e.forEach((e=>{t.add(e.startIndex),t.add(e.endIndex)}))})),e.hhists().forEach(((e,i)=>{e.forEach((e=>{t.add(e.firstBarTime),t.add(e.lastBarTime)}))})),e.dwglabels().forEach(((e,i)=>{e.forEach((e=>{t.add(e.x)}))})),e.dwglines().forEach(((e,i)=>{e.forEach((e=>{var i,r;t.add(null!==(i=e.x1)&&void 0!==i?i:s.INVALID_TIME_POINT_INDEX),t.add(null!==(r=e.x2)&&void 0!==r?r:s.INVALID_TIME_POINT_INDEX)}))})),e.dwgboxes().forEach(((e,i)=>{e.forEach((e=>{var i,r;t.add(null!==(i=e.left)&&void 0!==i?i:s.INVALID_TIME_POINT_INDEX),t.add(null!==(r=e.right)&&void 0!==r?r:s.INVALID_TIME_POINT_INDEX)}))}));const i=Array.from(t);return i.sort(((e,t)=>e-t)),i}(e),c={indexes:i};let h=0;const d=()=>++h;return c.vertlines=p(e.vertlines(),d,i,n.isVertLineInBarsRange,t,n.dematerializeVertLine),c.horizlines=p(e.horizlines(),d,i,r.isHorizLineInBarsRange,t,r.dematerializeHorizLine),c.polygons=p(e.polygons(),d,i,a.isPolygonInBarsRange,t,a.dematerializePolygon), -c.hhists=p(e.hhists(),d,i,o.isHHistInBarsRange,t,o.dematerializeHHist),c.backgrounds=p(e.backgrounds(),d,i,l.isBackgroundInBarsRange,t,l.dematerializeBackground),c}},89:(e,t,i)=>{"use strict";var s,r,n,o;i.d(t,{MarkLocation:()=>s,HAlign:()=>r,LineStyle:()=>o}),function(e){e.AboveBar="AboveBar",e.BelowBar="BelowBar",e.Top="Top",e.Bottom="Bottom",e.Right="Right",e.Left="Left",e.Absolute="Absolute",e.AbsoluteUp="AbsoluteUp",e.AbsoluteDown="AbsoluteDown"}(s||(s={})),function(e){e.Left="left",e.Center="center",e.Right="right"}(r||(r={})),function(e){e.Top="top",e.Middle="middle",e.Bottom="bottom"}(n||(n={})),function(e){e[e.Solid=0]="Solid",e[e.Dotted=1]="Dotted",e[e.Dashed=2]="Dashed"}(o||(o={}))},83280:(e,t,i)=>{"use strict";i.d(t,{primitivesZOrders:()=>r,isStudyGraphicsEmpty:()=>n,splitHHistsByTimePointIndex:()=>o});const s=["horizlines","vertlines","lines","hlines","textmarks","shapemarks","backgrounds","polygons","trendchannels","hhists","dwglabels","dwglines","dwgboxes","dwgtables","dwgtablecells","dwglinefills"],r=new Map([["polygons",-4],["trendchannels",-3],["textmarks",-2],["shapemarks",-2],["backgrounds",-1],["hlines",1],["horizlines",1],["hhists",1],["dwglinefills",2],["vertlines",3],["lines",3],["dwglines",3],["dwgboxes",4],["dwglabels",5],["dwgtables",6],["dwgtablecells",6]]);function n(e){return!s.some((t=>e[t]().size>0))}function o(e){const t=new Map;return e.forEach(((e,i)=>{e.forEach((e=>{const s={...e,styleId:i},r=e.firstBarTime;let n=t.get(r);void 0===n&&(n=new Set,t.set(r,n)),n.add(s)}))})),t}},61503:(e,t,i)=>{"use strict";i.d(t,{materializeVertLine:()=>n,dematerializeVertLine:()=>o,isVertLineInBarsRange:()=>a});var s=i(33143),r=i(65447);function n(e,t){if(e.index>=t.length)return null;const i=t[e.index];return i===s.INVALID_TIME_POINT_INDEX?null:{startPrice:e.startPrice,endPrice:e.endPrice,index:i,extendTop:e.extendTop,extendBottom:e.extendBottom}}function o(e,t,i){const s=(0,r.ensureTimePointIndexIndex)(i.indexOf(e.index));return{id:t,...e,index:s}}function a(e,t){return t.contains(e.index)}},58040:(e,t,i)=>{"use strict";i.d(t,{HHistBasedValuesProvider:()=>_});var s=i(50335),r=i(50151),n=i(49483),o=i(33639),a=i(76076),l=i(48566),c=i(9822),h=i(28667),d=i(2);function u(e,t="",i=""){return{id:t,index:e,title:i,value:"",visible:!1}}const p=n.CheckMobile.any();class _{constructor(e,t){this._emptyValues=[],this._study=e,this._model=t,void 0!==this._study.metaInfo().graphics.hhists&&this._emptyValues.push(u(0),u(1),u(2))}getItems(){return this._emptyValues}getValues(e){var t,i;const n=this._emptyValues.map((e=>({...e})));n.forEach((e=>{e.visible=this._study.isVisible(),e.value=d.notAvailable}));const a=this._study.properties().childs().inputs.childs().volume.value();switch(a){case c.HHistVolumeMode.UpDown:n[0].title="Up",n[1].title="Down",n[2].title="Total";break;case c.HHistVolumeMode.Total:n[0].title="Total",n[1].visible=!1,n[2].visible=!1;break;case c.HHistVolumeMode.Delta:n[0].title="Delta",n[1].title="Max(Up, Down)",n[2].title="Total"}const h=this._study.priceScale(),u=this._model.timeScale() -;if(null===h||h.isEmpty()||u.isEmpty()||this._hideValues())return n;if(null===e||!isFinite(e)){const t=this._study.data().last();if(null===t)return n;e=t.index}const p=this._model.crossHairSource(),_=p.price;if(!isFinite(p.y)&&(e=function(e,t){var i;const s=null===(i=e.visibleBarsStrictRange())||void 0===i?void 0:i.lastBar();if(!s)return null;const r=t.data().search(s,o.PlotRowSearchMode.NearestLeft);return r?r.index:null}(this._model.timeScale(),this._model.mainSeries()),null===e))return n;const m=function(e,t,i,s){if(0===e.size)return null;if(!i){const e=(0,r.ensureNotNull)(s.data().valueAt(t));i=s.barFunction()(e)}const n=function(e,t){let i=null;return e.forEach(((e,s)=>{s<=t&&(null===i||s>i)&&(i=s)})),i}(e,t);if(null===n)return null;const o=e.get(n);if(!o||0===o.size)return null;return function(e,t){let i=null;return e.forEach((e=>{e.priceLow<=t&&t{e.value="0"})),n;const g=this._study.metaInfo().graphics.hhists;if(void 0===g)return n;if(void 0===g[m.styleId])return n;const f=null===(i=null===(t=this._study.properties().childs().graphics.childs().hhists)||void 0===t?void 0:t.childs()[m.styleId])||void 0===i?void 0:i.childs(),v=new l.VolumeFormatter,S=e=>(0,s.isNumber)(e)?v.format(e):"";if(a!==c.HHistVolumeMode.Delta){if(m.rate.forEach(((e,t)=>{n[t].value=S(e),n[t].color=(0,r.ensureDefined)(f).colors[t].value()})),a===c.HHistVolumeMode.UpDown){const e=m.rate[0]+m.rate[1];n[2].value=S(e),n[2].color=(0,r.ensureDefined)(f).valuesColor.value()}}else{const e=m.rate[0]>m.rate[1]?0:1,t=(0,r.ensureDefined)(f).colors[e].value(),i=m.rate[0]+m.rate[1];[2*m.rate[e]-i,m.rate[e],i].forEach(((e,i)=>{n[i].value=S(e),n[i].color=t}))}return n}_hideValues(){return p&&(null===this._model.crossHairSource().pane||(0,h.isLineToolName)(a.tool.value())||null!==this._model.lineBeingEdited())}}},39947:(e,t,i)=>{"use strict";var s;i.d(t,{StudyStatusType:()=>s}),function(e){e[e.Undefined=0]="Undefined",e[e.Loading=1]="Loading",e[e.Completed=2]="Completed",e[e.Error=3]="Error"}(s||(s={}))},27678:(e,t,i)=>{"use strict";var s;i.d(t,{InsertionErrorCode:()=>s}),function(e){e.StudyCannotBeChild="cannot_be_child",e.StubWasRemoved="stub_was_removed",e.CannotGetMetainfo="cannot_get_metainfo",e.Cancelled="cancelled",e.Unknown="unknown"}(s||(s={}))},24760:(e,t,i)=>{"use strict";i.d(t,{makeNextSymbolId:()=>r,makeNextStudyId:()=>o});let s=0;function r(){return s++,"ss_"+s}let n=0;function o(){return n++,"st"+n}},43654:(e,t,i)=>{"use strict";i.d(t,{migrateMetaInfoAndPropState:()=>p});var s=i(50151),r=i(58403),n=i(65665);const o=["Moving Average@tv-basicstudies","Moving Average Exponential@tv-basicstudies"];class a{targetMetaInfoVersion(){return 53}migrateMetaInfo(e){const t=e;e._metainfoVersion=53,o.includes(t.id)}migratePropState(e){var t,i,s;o.includes(e.id)&&(e.inputs.length=null!==(t=e.inputs.length)&&void 0!==t?t:e.inputs.in_0,e.inputs.source=null!==(i=e.inputs.source)&&void 0!==i?i:e.inputs.in_1, -e.inputs.offset=null!==(s=e.inputs.offset)&&void 0!==s?s:e.inputs.in_2,delete e.inputs.in_0,delete e.inputs.in_1,delete e.inputs.in_2,e.plots[1]={id:"smoothedMA",type:"line"},e.styles.smoothedMA={display:0,linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#0496ff",histogramBase:0,joinPoints:!1,title:"Smoothed MA"})}}const l=["Volume@tv-basicstudies"];class c{targetMetaInfoVersion(){return 53}migrateMetaInfo(e){const t=e;e._metainfoVersion=53,l.includes(t.id)}migratePropState(e){var t;l.includes(e.id)&&(e.inputs.maLength=null!==(t=e.inputs.length)&&void 0!==t?t:e.inputs.maLength,delete e.inputs.length,delete e.inputs.offset,delete e.inputs.source,e.plots[1]={id:"smoothedMA",type:"line"},e.styles.smoothedMA={display:0,linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#0496ff",histogramBase:0,joinPoints:!1,title:"Smoothed MA"})}}const h=["Relative Strength Index@tv-basicstudies","Commodity Channel Index@tv-basicstudies","On Balance Volume@tv-basicstudies"];class d{targetMetaInfoVersion(){return 53}migrateMetaInfo(e){const t=e;e._metainfoVersion=53,h.includes(t.id)}migratePropState(e){h.includes(e.id)&&(e.plots[1]={id:"smoothedMA",type:"line"},e.styles.smoothedMA={display:0,linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#0496ff",histogramBase:0,joinPoints:!1,title:"Smoothed MA"})}}const u=[new class{targetMetaInfoVersion(){return 47}migrateMetaInfo(e){const t=e,i=e;if(i._metainfoVersion=47,!t.defaults||void 0===t.defaults.precision)return void(i.format={type:"inherit"});const s=t.defaults&&t.defaults.precision,r=(0,n.isNumber)(s)?s:parseInt(s);0===r?i.format={type:"volume"}:isFinite(r)?i.format={type:"price",precision:r}:i.format={type:"inherit"},delete t.defaults.precision}migratePropState(e){}},new class{targetMetaInfoVersion(){return 50}migrateMetaInfo(e){const t=e,i=e;if(i._metainfoVersion=50,void 0===t.defaults||void 0===t.defaults.ohlcPlots||void 0===t.ohlcPlots)return;const r=t.ohlcPlots,n=t.defaults.ohlcPlots,o=(0,s.ensureDefined)((0,s.ensureDefined)(i.defaults).ohlcPlots);for(const e of Object.keys(n)){const t=n[e];if("ohlc_candles"===t.plottype){let i=!1;const s=r[e];void 0!==s&&(i=!!s.drawBorder,delete s.drawBorder),o[e]={borderColor:"#000000",drawBorder:i,...t}}}}migratePropState(e){}},new class{targetMetaInfoVersion(){return 53}migrateMetaInfo(e){const t=e,i=e;if(i._metainfoVersion=53,void 0!==t.defaults){if(void 0!==t.defaults.ohlcPlots&&void 0!==t.ohlcPlots){const e=Object.keys(t.ohlcPlots),r=t.defaults.ohlcPlots,n=(0,s.ensureDefined)((0,s.ensureDefined)(i.defaults).ohlcPlots);for(const t of e){const e=r[t];if(void 0===e||void 0===e.visible)continue;const i=e.visible?15:0;delete e.visible,n[t]={display:i,...e}}}if(void 0!==t.defaults.styles&&void 0!==t.plots){const e=t.plots.map((e=>e.id)),r=t.defaults.styles,n=(0,s.ensureDefined)((0,s.ensureDefined)(i.defaults).styles);for(const t of e){const e=r[t];if(void 0===e||void 0===e.visible)continue;const i=e.visible?15:0;delete e.visible,n[t]={display:i,...e}}}}}migratePropState(e){ -if(e.ohlcPlots)for(const t of Object.keys(e.ohlcPlots)){const i=(0,s.ensureDefined)(e.ohlcPlots[t]);void 0!==i.visible&&(i.display=i.visible?15:0,delete i.visible)}if(e.styles)for(const t of Object.keys(e.styles)){const i=(0,s.ensureDefined)(e.styles[t]);void 0!==i.visible&&(i.display=i.visible?15:0,delete i.visible)}}}];function p(e,t){const i=r.StudyMetaInfo.versionOf(e),n=e;void 0===n._serverMetaInfoVersion&&(n._serverMetaInfoVersion=i);const o=["PennantCP@tv-basicstudies","WedgeCP@tv-basicstudies"].includes(e.id);u.forEach((r=>{(i<0||i>=r.targetMetaInfoVersion())&&!o||(r.migrateMetaInfo(e),void 0!==t&&r.migratePropState(t),(0,s.assert)(e._metainfoVersion===r.targetMetaInfoVersion()))}))}u.push(new a),u.push(new c),u.push(new d),u.sort((function(e,t){return e.targetMetaInfoVersion()-t.targetMetaInfoVersion()}))},71479:(e,t,i)=>{"use strict";i.d(t,{isNonSeriesStudy:()=>n,NonSeriesStudy:()=>o});var s=i(50151),r=i(68927);function n(e){return e instanceof o}class o extends r.Study{clearData(){this._customData=null,this._indexes=null}restoreData(e,t,i){super.restoreData(e),this._customData=t,this._indexes=i}state(e){const t=super.state(e);return e&&(t.nonSeriesData=this._customData,t.indexes=this._indexes),t}customData(){return this._customData}_setPaneViews(e){this._paneViews=e,this.model().lightUpdate()}_onDataUpdated(e,t,i){null!==t&&(t.indexes_replace?((0,s.assert)("nochange"!==i),this._indexes=i):(this._customData=t.data,"nochange"!==i&&(this._indexes=i))),super._onDataUpdated(e,t,i)}}},13850:(e,t,i)=>{"use strict";i.d(t,{OverlayLegendValuesProvider:()=>C});var s=i(1930),r=i(50335),n=i(44352),o=i(49483),a=i(38031),l=i(80142),c=i(18766),h=i(86061),d=i(33639),u=i(76076),p=i(57757),_=i(2250),m=i(49897),g=i(28667),f=i(2);const v=o.CheckMobile.any(),S=v&&!0,y=new c.PercentageFormatter,b=f.notAvailable,w=`${b} (${b}%)`;class C extends class{constructor(e,t){this._study=e,this._model=t,this._emptyValues=[{title:n.t(null,void 0,i(39280)),visible:!1,value:"",index:0,id:""},{title:n.t(null,void 0,i(30777)),visible:!1,value:"",index:1,id:""},{title:n.t(null,void 0,i(8136)),visible:!1,value:"",index:2,id:""},{title:n.t(null,void 0,i(31691)),visible:!1,value:"",index:3,id:""},{title:"",visible:!1,value:"",index:4,id:""},{title:"",visible:!1,value:"",index:5,id:""},{title:n.t(null,void 0,i(49329)),visible:!1,value:"",index:6,id:""}]}getItems(){return this._emptyValues}getValues(e){var t;const i=this._emptyValues.map((e=>({...e})));if(this._model.timeScale().isEmpty())return i;if(0===this._study.data().size())return i;const s=this._showLastPriceAndChangeOnly();if((0,r.isNumber)(e)||(s?e=this._study.data().lastIndex():(e=this._model.crossHairSource().appliedIndex(),(0,r.isNumber)(e)||(e=this._study.data().lastIndex()))),null===e||!(0,r.isNumber)(e))return i;const n=this._study.data().search(e,d.PlotRowSearchMode.NearestLeft,1),o=this._model.backgroundTopColor().value();if(null===n)return i;const c=n.index,u=n.value,p=u[1],g=u[2],f=u[3],v=u[4];i[0].value=b,i[1].value=b,i[2].value=b,i[3].value=b,i[6].value=w -;for(const e of i)e.visible=!s;const C=i[4];C.visible=!1;const{values:P}=this._changesData(v,p,c,s),T=(0,m.getPriceValueFormatterForSource)(this._study);if((0,m.shouldBeFormattedAsPercent)(this._study)||(0,m.shouldBeFormattedAsIndexedTo100)(this._study))i[6].value="";else if(void 0!==P){const e=this._study.formatter();i[6].value=(0,l.forceLTRStr)(`${e.format(P.change,!0)} (${y.format(P.percentChange,!0)})`)}s?(i[5].value=null==v?b:T(v),i[5].visible=!0,i[6].visible=!0):(i[0].value=null==p?b:T(p),i[1].value=null==g?b:T(g),i[2].value=null==f?b:T(f),i[3].value=null==v?b:T(v),C.value=T(this._study.barFunction()(u)),i[5].visible=!1);let x=null;if(s&&!S)x=void 0===P||P.change>=0?_.SeriesBarColorer.upColor(this._study.properties()):_.SeriesBarColorer.downColor(this._study.properties());else{const e=this._study.barColorer().barStyle(c,!1),i=null!==(t=e.barBorderColor)&&void 0!==t?t:e.barColor;x=(0,h.calculateColor)(o,i)}x=(0,a.resetTransparency)((0,h.calculateColor)(o,x));for(const e of i)e.color=x;return i}_showLastPriceAndChangeOnly(){return v&&(null===this._model.crossHairSource().pane||(0,g.isLineToolName)(u.tool.value())||null!==this._model.lineBeingEdited())}_changesData(e,t,i,s){var r;if(s&&!S){const e=this._study.quotes();if(null!==e)return{values:{change:null!==e.change?e.change:0,percentChange:null!==e.change_percent?e.change_percent:0},priceDirection:{basedOnCurrentBar:null!==e.change&&e.change>=0?0:1,basedOnPrevClose:null!==e.change&&e.change>=0?0:1}}}else{const s=this._study.data().search(i-1,d.PlotRowSearchMode.NearestLeft,1),n=null!==(r=null==s?void 0:s.value[4])&&void 0!==r?r:null;if(null!==n&&null!=e&&null!=t)return{values:{change:e-n,percentChange:(0,p.barPercentChange)(n,e)},priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=n?0:1}}}return null==e||null==t?{}:{priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=t?0:1}}}}{constructor(e,t){super(e,t);const i=t.properties().childs().paneProperties.childs().legendProperties.childs();this._showBarChange=i.showBarChange,this._showSeriesOHLC=i.showSeriesOHLC,this._seriesStyle=e.properties().childs().style}getValues(e){const t=super.getValues(e);if(!this._showLastPriceAndChangeOnly()){const e=this._seriesStyle.value(),i=(0,s.isPriceSourceStyle)(e),r=12===e,n=this._showSeriesOHLC.value(),o=n&&!i,a=n&&i;t[0].visible=o&&!r,t[1].visible=o,t[2].visible=o,t[3].visible=o&&!r,t[6].visible=this._showBarChange.value()&&!r,t[4].visible=a}return t}}},41365:(e,t,i)=>{"use strict";i.d(t,{OverlayStatusProvider:()=>r});var s=i(89111);class r extends s.StudyStatusProvider{getSplitTitle(){return this._source.titleInParts(!0,void 0,!1,!1)}text(){return this._source.isActualInterval()?this._source.isFailed()?`${this._source.title(!0,void 0,!1,!1)}: ${this.sourceStatusText()}`:`${this._source.title(!0,void 0,!1,!1)} ${this.sourceStatusText()}`:this._source.title(!0,void 0,!1,!1)}}},5268:(e,t,i)=>{"use strict";i.d(t,{PivotPointsStandardLastPricesView:()=>o});var s=i(33639);const r=["p","s1","r1","s2","r2","s3","r3","s4","r4","s5","r5"],n={P:"P",S1:"S1/R1", -S2:"S2/R2",S3:"S3/R3",S4:"S4/R4",S5:"S5/R5",R1:"S1/R1",R2:"S2/R2",R3:"S3/R3",R4:"S4/R4",R5:"S5/R5"};class o{constructor(e){this._visiblePivots=new Set,this._invidated=!0,this._prices=[],this._source=e}visiblePivots(){return this._visiblePivots}update(){this._invidated=!0}prices(){return this._invidated&&(this._updateImpl(),this._invidated=!1),this._prices}_updateImpl(){this._visiblePivots.clear();const e=this._source.model(),t=this._source.priceScale();if(null===t)return;if(e.timeScale().isEmpty()||t.isEmpty())return;const i=e.timeScale().visibleBarsStrictRange();if(null===i)return;if(!this._source.customData()||!this._source.customData().pivots)return;const o=e.mainSeries().bars().search(i.lastBar(),s.PlotRowSearchMode.NearestLeft);if(null===o)return;const a=o.index,l=this._source.customData().pivots,c=this._source.indexes(),h=this._source.properties().childs(),d=this._source.firstValue();for(let e=0;e=a||o)){this._visiblePivots.add(l[e]),this._prices=[];for(let i=0;i{"use strict";i.d(t,{PaneRendererStandardPivotLabel:()=>r});var s=i(14888);class r{constructor(e,t,i){this._drawRects=[],this._cacheProvider=e,this._point=t,this._label=i}draw(e,t){const i=this._cacheProvider(t);e.save(),e.setTransform(1,0,0,1,0,0);const s=t.pixelRatio;this._drawRects=[];const r=t=>{const r=i.labelRectByIndex(t),n={left:Math.round(this._point.x-r.width+o),top:Math.round(this._point.y-r.height/2),width:r.width,height:r.height};return e.drawImage(i.canvas(),Math.round(r.left*s),Math.round(r.top*s),r.width*s,r.height*s,Math.round(n.left*s),Math.round(n.top*s),n.width*s,n.height*s),this._drawRects.push(n),r.width},n=this._label.split("/");let o=0;for(let e=0;e0&&(o+=r(t+11)/2),o+=r(t)/2}e.restore()}hitTest(e){for(const t of this._drawRects)if(e.x>=t.left&&e.x<=t.left+t.width&&e.y>=t.top&&e.y<=t.top+t.height)return new s.HitTestResult(s.HitTestResult.REGULAR);return null}}},36537:(e,t,i)=>{"use strict";i.d(t,{StandardPivotPointsImageCache:()=>o});var s=i(27714),r=i(83499),n=i(50151);class o{constructor(e,t,i,r){this._priceAxisFontSize=11,this._prices=[],this._labelWidth=0,this._paneRenderParams=e,this._recreateCanvasAndContext((0,s.size)({width:0,height:0})),this.reset({font:t,fontSize:i,backColors:r})}destroy(){delete this._canvas,delete this._cache}canvas(){return this._canvas}reset(e){this._renderParams=e,this._prices=[],this._cache.font=e.fontSize+"px "+e.font,this._labelWidth=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5","/"].reduce(((e,t)=>{const i=this._cache.measureText(t).width;return Math.max(i,e)}),0)}rowHeight(){ -return this._priceAxisFontSize+4}labelRectByIndex(e){return{left:0,top:Math.round(this._topByIndex(e)),width:Math.round(this._labelWidth+4),height:Math.round(this._renderParams.fontSize+8)}}setPrices(e){let t=!1;const i=(e,t)=>{const i=void 0===e,s=void 0===t;return(!i&&!s||i===s)&&(0,n.ensureDefined)(e).formatted===(0,n.ensureDefined)(t).formatted};if(e.length!==this._prices.length)t=!0;else for(let s=0;s{this._cache.translate(.5,.5),this._cache.font=this._renderParams.fontSize+"px "+this._renderParams.font,this._cache.textBaseline="middle";for(let e=0;e{"use strict";i.d(t,{StandardPivotPointsPriceAxisView:()=>o});var s=i(67876),r=i(38031);const n=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"];class o extends s.PriceAxisView{constructor(e,t){super(),this._source=e,this._data=t;const i=t.name;this._completeName="P"===i.toUpperCase()?"P":`S${i[1]}/R${i[1]}`}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const s=this._source.properties().childs();if(!s.visible.value())return;const o=this._completeName,a=s.levelsStyle.childs().visibility.childs();if(!a[o]||!a[o].value())return;const l=this._source.model().timeScale(),c=this._source.priceScale();if(l.isEmpty()||null===l.visibleBarsStrictRange()||null!==c&&c.isEmpty())return;const h=this._source.customData();if(!h||!h.pivots)return;const d=this._source.pricesView().prices()[n.indexOf(this._data.name.toUpperCase())];if(!d)return;i.background=(0,r.resetTransparency)(d.color),i.textColor=this.generateTextColor(i.background),i.coordinate=d.coordinate,i.floatCoordinate=d.floatCoordinate;const u=this._source.model().properties().childs().scalesProperties.childs();u.showStudyLastValue.value()&&(e.text=d.formatted,e.visible=!0),u.showStudyPlotLabels.value()&&(t.text=this._source.priceLabelText(this._data.name),t.visible=!0)}}},24680:(e,t,i)=>{"use strict" -;var s=i(23304).PriceRange,r=i(86441).Point,n=i(66019).StudyStatusView,o=i(35823).StudyDataWindowView,a=i(71479).NonSeriesStudy,l=i(59291).StandardPivotPointsPriceAxisView,c=i(64636).PanePriceAxisView,h=i(14888).HitTestResult,d=i(29639).CompositeRenderer,u=i(10773).areEqualPaneRenderParams,p=i(36537).StandardPivotPointsImageCache,_=i(5268).PivotPointsStandardLastPricesView,m=i(34572).PaneRendererStandardPivotLabel,g=i(2945).HorizontalLineRenderer,f=i(17364);const{LINESTYLE_SOLID:v}=i(53479);class S{constructor(e,t){this._model=e,this._source=t,this._pivots=[],this._textCache={}}setCache(e){this._cache=e}priceAxisViews(e,t){return this._priceAxisViews}mergeLabel(e,t,i){var s=""+t;void 0===e[s]?(e[s]={},e[s].text=i,e[s].ids=[this.complete(i)]):(e[s].text+="/"+i,e[s].ids.push(this.complete(i)))}complete(e){return"P"===e?e:"S"+e[1]+"/R"+e[1]}update(){this._invalidated=!0}_updateImpl(){if(this._source.pricesView().prices(),this._pivots=[],this._source.customData()&&this._source.customData().pivots&&this._source.properties().visible.value()){var e=this._source.customData().pivots,t=this._source._indexes,i=this._model.timeScale(),s=this._source.priceScale();if(s&&!s.isEmpty()&&!i.isEmpty()&&e){var r=i.visibleBarsStrictRange(),n=r.firstBar(),o=r.lastBar();if(this._source.ownerSource())for(var a=this._source.ownerSource().firstValue(),l=0;lo)){var d={},u=this._source.properties().levelsStyle.visibility;u.P.value()&&this.mergeLabel(d,e[l].p,"P"),u["S1/R1"].value()&&(this.mergeLabel(d,e[l].s1,"S1"),this.mergeLabel(d,e[l].r1,"R1")),u["S2/R2"].value()&&(this.mergeLabel(d,e[l].s2,"S2"),this.mergeLabel(d,e[l].r2,"R2")),u["S3/R3"].value()&&(this.mergeLabel(d,e[l].s3,"S3"),this.mergeLabel(d,e[l].r3,"R3")),u["S4/R4"].value()&&(this.mergeLabel(d,e[l].s4,"S4"),this.mergeLabel(d,e[l].r4,"R4")),u["S5/R5"].value()&&(this.mergeLabel(d,e[l].s5,"S5"),this.mergeLabel(d,e[l].r5,"R5"));var p=i.indexToCoordinate(c),_=i.indexToCoordinate(h);for(var m in d){var g=parseFloat(m),f=s.priceToCoordinate(g,a);this._pivots.push({x1:p,x2:_,y:f,label:d[m].text,labelIds:d[m].ids,src:e[l]})}}}}}}renderer(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);for(var e=new d,t=this._source.properties().levelsStyle.colors,i=this._source.properties().levelsStyle.widths,s=this._source.visiblePivots(),n=0;nt)){var l=[],c=this._properties.levelsStyle.visibility;c.P.value()&&l.push(i[o].p),c["S1/R1"].value()&&l.push(i[o].s1,i[o].r1),c["S2/R2"].value()&&l.push(i[o].s2,i[o].r2),c["S3/R3"].value()&&l.push(i[o].s3,i[o].r3),c["S4/R4"].value()&&l.push(i[o].s4,i[o].r4),c["S5/R5"].value()&&l.push(i[o].s5,i[o].r5);for(var h=0;h{"use strict";function s(e){e.lineWidth=void 0,e.lineStyle=void 0;for(let t=0;ts,createEmptyStyle:()=>r})},73195:(e,t,i)=>{"use strict";i.d(t,{PaneRendererColumns:()=>r});var s=i(14888);class r{constructor(e){this._data=null,this._precalculatedCache=[],this.setData(e)}setData(e){this._data=e,this._precalculatedCache=[]}draw(e,t){var i,s,r,n;if(null===this._data||0===this._data.items.length)return;const o=t.pixelRatio;this._precalculatedCache.length||this._fillPrecalculatedCache(o);const a=Math.max(1,Math.floor(o)),l=Math.round(this._data.histogramBase*o)-Math.floor(a/2),c=l+a,h=this._data.lineColor,d=null!==(s=null===(i=this._data.visibleItemsRange)||void 0===i?void 0:i.startItemIndex)&&void 0!==s?s:0,u=(null!==(n=null===(r=this._data.visibleItemsRange)||void 0===r?void 0:r.endItemIndex)&&void 0!==n?n:this._data.items.length)-1;for(let t=d;t<=u;t++){const i=this._data.items[t],s=this._precalculatedCache[t-d],r=Math.round(i.y*o),n=i.style?i.style.color:h;let u,p;e.fillStyle=n,r<=l?(u=r,p=c):(u=l,p=r-Math.floor(a/2)+a),e.fillRect(s.left,u,s.right-s.left+1,p-u)}}hitTest(e){var t,i,r,n;if(null===this._data)return null;const o=.5*this._data.barSpacing,a=e.x-o,l=e.x+o,c=null!==(i=null===(t=this._data.visibleItemsRange)||void 0===t?void 0:t.startItemIndex)&&void 0!==i?i:0,h=(null!==(n=null===(r=this._data.visibleItemsRange)||void 0===r?void 0:r.endItemIndex)&&void 0!==n?n:this._data.items.length)-1;for(let t=c;t<=h;t++){const i=this._data.items[t],r=i.x;if(r>=a&&r<=l){const t=i.y;if(e.y>=Math.min(t,this._data.histogramBase)&&e.y<=Math.max(t,this._data.histogramBase))return new s.HitTestResult(s.HitTestResult.REGULAR)}}return null}_fillPrecalculatedCache(e){var t,i,s,r;if(null===this._data||0===this._data.items.length)return void(this._precalculatedCache=[]);const n=Math.ceil(this._data.barSpacing*e)<=1?0:Math.max(1,Math.floor(e)),o=Math.round(this._data.barSpacing*e)-n,a=null!==(i=null===(t=this._data.visibleItemsRange)||void 0===t?void 0:t.startItemIndex)&&void 0!==i?i:0,l=(null!==(r=null===(s=this._data.visibleItemsRange)||void 0===s?void 0:s.endItemIndex)&&void 0!==r?r:this._data.items.length)-1,c=l-a+1;if(c<=0)return void(this._precalculatedCache=[]);this._precalculatedCache=new Array(c);for(let t=a;t<=l;t++){const i=this._data.items[t],s=Math.round(i.x*e) -;let r,n;if(o%2){const e=(o-1)/2;r=s-e,n=s+e}else{const e=o/2;r=s-e,n=s+e-1}this._precalculatedCache[t-a]={left:r,right:n,roundedCenter:s,center:i.x*e,time:i.timePointIndex}}for(let e=a+1;e<=l;e++){const t=this._precalculatedCache[e-a],i=this._precalculatedCache[e-a-1];t.time===i.time+1&&(t.left-i.right!==n+1&&(i.roundedCenter>i.center?i.right=t.left-n-1:t.left=i.right+n+1))}let h=Math.ceil(this._data.barSpacing*e);for(let e=a+1;e<=l;e++){const t=this._precalculatedCache[e-a];t.right0&&h<4)for(let e=a+1;e<=l;e++){const t=this._precalculatedCache[e-a];t.right-t.left+1>h&&(t.roundedCenter>t.center?t.right-=1:t.left+=1)}}}},76267:(e,t,i)=>{"use strict";i.d(t,{StudyPlotPaneView:()=>B});var s=i(50151),r=i(86441),n=i(24377),o=i(2484),a=i(91031),l=i(65665),c=i(38031),h=i(85228);function d(e,t){const i=new Map;return function(...s){const r=""+(t?t.apply(null,s):s[0]);if(!i.has(r)){const t=e.apply(this,s);return i.set(r,t),t}return i.get(r)}}var u=i(14888),p=i(28962),_=i(29639),m=i(76078),g=i(19773),f=i(47149),v=i(53074),S=i(38217),y=i(55014),b=i(49483);class w{constructor(e){this._data=e}draw(e,t){var i,s,r,n;const o=this._data,a=t.pixelRatio,c=Math.max(1,Math.floor(a))%2?.5:0,h=o.vertOffset||0,d=o.lineColor||o.color,u=o.lineWidth||o.height/2;let p="",_=!1;const m=null!==(s=null===(i=o.visibleItemsRange)||void 0===i?void 0:i.startItemIndex)&&void 0!==s?s:0,g=null!==(n=null===(r=o.visibleItemsRange)||void 0===r?void 0:r.endItemIndex)&&void 0!==n?n:o.items.length;for(let t=m;t{const t=(0,n.rgbToHsl)((0,n.parseRgb)(e)),i=t[0]+.05;return t[0]=i-Math.floor(i),(0,n.rgbToHexString)((0,n.hslToRgb)(t))},E=d(k);function D(e,t){if(null===e)return t;const i=e.firstIndex,s=t.firstIndex,r=e.clearData||t.clearData;return{firstIndex:r||void 0===i||void 0===s?void 0:Math.min(i,s),clearData:r}}const V=new Set([I.LineStudyPlotStyle.Line,I.LineStudyPlotStyle.Area,I.LineStudyPlotStyle.Circles,I.LineStudyPlotStyle.Cross,I.LineStudyPlotStyle.StepLine,I.LineStudyPlotStyle.StepLineWithDiamonds]);class B{constructor(e,t,i,s,r=!1){this._histogramBase=null,this._items=[],this._lastConfirmedSeriesBarCoordinate=NaN,this._selectionData=null,this._lineColor="",this._lineWidth=1,this._color1="",this._color2="",this._dataInvalidated=null,this._viewportInvalidated=!1,this._renderer=new _.CompositeRenderer, -this._isMarkersEnabled=o.enabled("source_selection_markers"),this._study=e,this._series=t,this._model=i,this._plotName=s,this._plotIndex=e.metaInfo().plots.findIndex((e=>e.id===s)),this._colorProvider=(0,M.createStudyPlotColorProvider)(e.metaInfo(),e.properties(),s),this._selectionIndexer=new f.SelectionIndexes(i.timeScale()),this._extendStepLineToBarsEndings=r,this._useFirstUnplottableRow=!1}items(){return this._items}update(e){if("global-change"===e.type)return this._dataInvalidated=D(this._dataInvalidated,{}),void(this._viewportInvalidated=!0);if("data-source-change"!==e.type)this._viewportInvalidated=!0;else{if(e.sourceId===this._study.id()){const t=D(this._dataInvalidated,{firstIndex:e.firstUpdatedTimePointIndex,clearData:e.clearData});this._dataInvalidated=t}}}renderer(){return this._dataInvalidated?this._updateImplFull(this._viewportInvalidated)&&(this._dataInvalidated=null):this._viewportInvalidated&&this._updateImplLight(),this._viewportInvalidated=!1,this._renderer}_getTranspValue(){const e=this._study.properties(),t=e.styles[this._plotName];let i=0;const s=this._study.metaInfo();return"Volume@tv-basicstudies"===s.id&&s.version<=46&&"transparency"in e?(i=e.transparency.value(),i=(0,l.isNumber)(i)?i:0,i):(t.transparency&&(i=t.transparency.value(),i=(0,l.isNumber)(i)?i:0),i)}_updateImplFull(e){var t,i,n,o;if(this._renderer.clear(),(null===(t=this._dataInvalidated)||void 0===t?void 0:t.clearData)&&(this._items=[]),!this._study.isPlotVisibleAt(this._plotName,1))return!1;if(!this._study.priceScale())return!1;const l=this._study.firstValue();if(null===l)return!1;const h=this._study.priceScale();if(null===h)return!1;this._histogramBase=null;const d=this._study.properties().styles[this._plotName],u=d.plottype.value(),p=this._useFirstUnplottableRow&&(u===I.LineStudyPlotStyle.StepLine||u===I.LineStudyPlotStyle.StepLineWithDiamonds),_=this._study.data().plottableRange(p),m=_.size();if(0===m)return!1;const g=this._study.offset(this._plotName);let f=null===(i=this._dataInvalidated)||void 0===i?void 0:i.firstIndex;const v=V.has(u);if(m!==this._items.length){const e=void 0!==f?f+g:void 0;if(void 0===e||0===this._items.length||e<(0,s.ensureDefined)(this._items[0].timePointIndex))this._items=[],_.each(((e,t)=>{const i=t[this._plotIndex+1];if(v&&null==i)return!1;const s=new r.Point(NaN,NaN);return s.origPrices=new r.Point(NaN,NaN),s.timePointIndex=e+g,this._items.push(s),!1})),f=this._items.length?(0,s.ensureDefined)(this._items[0].timePointIndex)-g:void 0;else{const e=this._items[this._items.length-1].timePointIndex,t=(0,s.ensureDefined)(e)-g,i=(0,s.ensureNotNull)(_.lastIndex())+1,n=_.rangeIterator(t+1,i);for(;n.hasNext();){const e=n.next(),t=e.value[this._plotIndex+1],i=null==t;if(v&&i)continue;const s=new r.Point(NaN,NaN);s.origPrices=new r.Point(NaN,NaN),s.timePointIndex=e.index+g,this._items.push(s)}}}let y=NaN,b=NaN;const w=new Map,C=(e,t)=>{let i=w.get(e);void 0===i&&(i=new Map,w.set(e,i));let s=i.get(t);if(void 0===s){const r=!this._plotName||"vol"!==this._plotName;s=(0,c.generateColor)(e,t,r),i.set(t,s)}return s -},P=(0,S.createEmptyStyle)(),T=(0,a.clamp)(this._getTranspValue(),0,100),x=this._model.timeScale().visibleBarsStrictRange();if(null===x)return!1;const{startBar:M,endBar:L}=this._calculateStartEnd(x);if(null===M||null===L||0===this._items.length)return!1;const k=null!=f?f:(0,s.ensureNotNull)(_.firstIndex()),E=_.rangeIterator(k,(0,s.ensureNotNull)(_.lastIndex())+1),D=(0,A.lowerbound)(this._items,k+g,((e,t)=>e.timePointIndex0){const e=this._items[B-1].timePointIndex,i=new r.Point(t-1,NaN);i.origPrices=new r.Point(t-1,NaN),i.timePointIndex=e,Be.timePointIndexee.timePointIndexes+1?{startBar:null,endBar:null}:(i=Math.max(a,i),{startBar:i,endBar:s})}_createRenderer(e,t){var i;this._renderer.clear();const r=this._study.properties().styles[this._plotName],n=(0,a.clamp)(this._getTranspValue(),0,100);this._lineColor=(0,c.generateColor)(r.color.value(),n),this._lineWidth=r.linewidth.value();let o=r.color.value();const d=this._colorProvider.getDefaultPlotPointStyle();d&&(o=d.colors[0],this._lineWidth=null!==(i=d.lineWidth)&&void 0!==i?i:this._lineWidth,this._lineColor=o?(0,c.generateColor)(o,n):this._lineColor),this._color2=(0,c.generateColor)(o,n);const u=this._study.metaInfo().isRGB?k(o):E(o);this._color1=(0,c.generateColor)(u,n);const _={};_.barSpacing=this._model.timeScale().barSpacing(),_.items=this._items,_.histogramBase=this._histogramBase?this._histogramBase:(0,s.ensureNotNull)(this._study.priceScale()).height(),_.lineIndex=0,_.lineStyle=r.linestyle.value(),_.lineColor=this._lineColor,_.lineWidth=this._lineWidth,_.lineWidth=(0,l.isNumber)(_.lineWidth)?_.lineWidth:1,_.color1=this._color1,_.color2=this._color2,_.bottom=_.histogramBase,_.visibleItemsRange={startItemIndex:e,endItemIndex:t},_.lastConfirmedSeriesBarCoordinate=this._lastConfirmedSeriesBarCoordinate,_.simpleMode=this._colorProvider.singleColor();const f=this._renderer,S=!!r.joinPoints&&r.joinPoints.value();switch(r.plottype.value()){case I.LineStudyPlotStyle.Line:case I.LineStudyPlotStyle.LineWithBreaks:f.append(new m.PaneRendererLine(_));break;case I.LineStudyPlotStyle.Area:case I.LineStudyPlotStyle.AreaWithBreaks:f.append(new p.PaneRendererArea(_));break;case I.LineStudyPlotStyle.Histogram:f.append(new x(_));break;case I.LineStudyPlotStyle.Columns:f.append(new C.PaneRendererColumns(_));break;case I.LineStudyPlotStyle.Cross:if(f.append(new T(_)),S){const e=(0,h.deepCopy)(_);e.lineWidth=1,e.forceLineWidth=!0,f.append(new m.PaneRendererLine(e))}break;case I.LineStudyPlotStyle.Circles:if(f.append(new w(_)),S){const e=(0,h.deepCopy)(_);e.lineWidth=1,e.ignorePaletteLineWidth=!0,f.append(new m.PaneRendererLine(e))}break;case I.LineStudyPlotStyle.StepLine:case I.LineStudyPlotStyle.StepLineWithBreaks:case I.LineStudyPlotStyle.StepLineWithDiamonds:{ -_.decoration=r.plottype.value()===I.LineStudyPlotStyle.StepLineWithDiamonds?g.StepLineDecoration.Diamonds:g.StepLineDecoration.None,_.extendToBarsEndings=this._extendStepLineToBarsEndings;const e=new g.PaneRendererStepLine(void 0,!1);e.setData(_),f.append(e);break}default:f.append(new m.PaneRendererLine(_))}this._model.selection().isSelected(this._study)&&this._isMarkersEnabled&&this._selectionData&&f.append(new v.SelectionRenderer(this._selectionData))}_createSelection(e){const t=this._study.priceScale();if(null!==t)if(this._model.selection().isSelected(this._study)){const i=this._selectionIndexer.indexes();this._selectionData={points:[],bgColors:[],visible:!0,hittestResult:u.HitTestResult.REGULAR,barSpacing:this._model.timeScale().barSpacing()};const n=(0,s.ensureNotNull)(this._model.paneForSource(this._study)).height(),o=this._study.offset(this._plotName);for(let s=0;s{"use strict";i.d(t,{createStudyPlotColorProvider:()=>p});var s=i(83421),r=i(50151),n=i(38217);const o=new Map([[0,"color"],[2,"textColor"],[3,"borderColor"],[4,"wickColor"],[5,"colorup"],[6,"colordown"]]);class a{constructor(e){this._plotStyle=e}getPlotPointStyle(e,t){const i=t?(0,n.clearStyle)(t):(0,n.createEmptyStyle)();return o.forEach(((e,t)=>{this._plotStyle[e]&&(i.colors[t]=this._plotStyle[e].value())})),i.lineWidth=this._plotStyle.linewidth?this._plotStyle.linewidth.value():void 0,i.lineStyle=this._plotStyle.linestyle?this._plotStyle.linestyle.value():void 0,i}isColorDefined(){return!0}singleColor(){return!0}getDefaultPlotPointStyle(){return null}}const l=[0,1,2,3,4,5,6];class c{constructor(e,t,i,s){this._palettesColors=new Map,this._defaultPlotColors=new Map,this._indexes=s;const n=t.styles[i];if(n)for(const[e,t]of o)this._defaultPlotColors.set(e,n[t]);const a=(0,r.ensureDefined)(e.palettes),l=e.plots;s.forEach(((e,i)=>{const s=l[e];if(s&&"palette"in s){const e=a[s.palette],r=t.palettes[s.palette];if(e&&r){const{valToIndex:t}=e,{colors:s}=r,n={...s};t&&Object.keys(t).forEach((e=>{const i=t[e];void 0!==i&&(n[e]=s[i])})),this._palettesColors.set(i,n)}}}))}getPlotPointStyle(e,t){const i=t?(0,n.clearStyle)(t):(0,n.createEmptyStyle)();return l.forEach((t=>{var s,n;if(this._palettesColors.has(t)){const n=e[(0,r.ensureDefined)(this._indexes.get(t))+1];if("number"==typeof n){const e=null===(s=this._palettesColors.get(t))||void 0===s?void 0:s[n];0===t&&e&&(i.lineWidth=e.width.value(),i.lineStyle=e.style.value()),i.colors[t]=null==e?void 0:e.color.value()}else i.colors[t]="transparent"}else i.colors[t]=null===(n=this._defaultPlotColors.get(t))||void 0===n?void 0:n.value()})),i}getDefaultPlotPointStyle(){var e -;const t=null===(e=this._palettesColors.get(0))||void 0===e?void 0:e[0];if(void 0!==t){return{colors:[t.color.value(),void 0,void 0,void 0,void 0,void 0,void 0],lineStyle:void 0,lineWidth:t.width.value()}}return null}isColorDefined(){return!!this._palettesColors.size}singleColor(){return!1}}var h=i(38031);class d{constructor(e){this._indexes=e}getPlotPointStyle(e,t){const i=t?(0,n.clearStyle)(t):(0,n.createEmptyStyle)();return this._indexes.forEach(((t,s)=>{const r=e[t+1];if(null!=r){const e=(0,h.rgbaFromInteger)(r);i.colors[s]=e}else i.colors[s]="transparent"})),i}isColorDefined(){return!0}singleColor(){return!1}getDefaultPlotPointStyle(){return null}}const u=new Map([[0,function(e,t){const i=(0,s.isColorerPlot)(t)||(0,s.isOhlcColorerPlot)(t);return"target"in t&&t.target===e&&i}],[2,function(e,t){const i=(0,s.isTextColorerPlot)(t);return"target"in t&&t.target===e&&i}],[1,function(e,t){return(0,s.isBgColorerPlot)(t)&&t.id===e}],[3,function(e,t){const i=(0,s.isCandleBorderColorerPlot)(t);return"target"in t&&t.target===e&&i}],[4,function(e,t){const i=(0,s.isCandleWickColorerPlot)(t);return"target"in t&&t.target===e&&i}],[5,function(e,t){const i=(0,s.isUpColorerPlot)(t);return"target"in t&&t.target===e&&i}],[6,function(e,t){const i=(0,s.isDownColorerPlot)(t);return"target"in t&&t.target===e&&i}]]);function p(e,t,i){const{colorers:s}=function(e,t){const i=e.plots,s=i.findIndex((e=>e.id===t)),r=new Map;return i.forEach(((e,i)=>{u.forEach(((s,n)=>{s(t,e)&&r.set(n,i)}))})),{plotIndex:-1===s?null:s,colorers:r}}(e,i);if(s.size)return e.isRGB?new d(s):new c(e,t,i,s);{const e=t.ohlcPlots;if(e&&e[i])return new a(e[i]);const s=t.styles[i];return new a(s)}}},83421:(e,t,i)=>{"use strict";var s,r,n;function o(e){return"line"===e.type}function a(e){return"shapes"===e.type}function l(e){return"chars"===e.type}function c(e){return"arrows"===e.type}function h(e){return"data"===e.type}function d(e){return"dataoffset"===e.type}function u(e){return"ohlc_open"===e.type}function p(e){return"ohlc_high"===e.type}function _(e){return"ohlc_low"===e.type}function m(e){return"ohlc_close"===e.type}function g(e){return u(e)||p(e)||_(e)||m(e)}function f(e){return"colorer"===e.type&&"palette"in e}function v(e){return"colorer"===e.type&&!("palette"in e)}function S(e){return"colorer"===e.type}function y(e){return"bar_colorer"===e.type}function b(e){return"bg_colorer"===e.type}function w(e){return"text_colorer"===e.type}function C(e){return"ohlc_colorer"===e.type}function P(e){return"wick_colorer"===e.type}function T(e){return"border_colorer"===e.type}function x(e){return"up_colorer"===e.type}function I(e){return"down_colorer"===e.type}function M(e){return"alertcondition"===e.type}function A(e){return o(e)||a(e)||l(e)||c(e)}function L(e){return"Plot"!==e}function k(e){return"ohlc_bars"===e.plottype}function E(e){return"ohlc_candles"===e.plottype}function D(e){return S(e)||y(e)||b(e)||h(e)||d(e)||C(e)||M(e)||x(e)||I(e)||T(e)||P(e)||w(e)}function V(e){return S(e)||w(e)||y(e)||h(e)||d(e)||C(e)||P(e)||T(e)||x(e)||I(e)||M(e)}i.r(t),i.d(t,{ -LineStudyPlotStyle:()=>s,STUDYPLOTDISPLAYTARGET:()=>r,isLinePlot:()=>o,isShapesPlot:()=>a,isCharsPlot:()=>l,isArrowsPlot:()=>c,isDataPlot:()=>h,isDataOffsetPlot:()=>d,isOhlcOpenPlot:()=>u,isOhlcHighPlot:()=>p,isOhlcLowPlot:()=>_,isOhlcClosePlot:()=>m,isOhlcPlot:()=>g,isPaletteColorerPlot:()=>f,isRgbaColorerPlot:()=>v,isColorerPlot:()=>S,isBarColorerPlot:()=>y,isBgColorerPlot:()=>b,isTextColorerPlot:()=>w,isOhlcColorerPlot:()=>C,isCandleWickColorerPlot:()=>P,isCandleBorderColorerPlot:()=>T,isUpColorerPlot:()=>x,isDownColorerPlot:()=>I,isAlertConditionPlot:()=>M,isPlotSupportDisplay:()=>A,isPlotTitleDefined:()=>L,isOhlcPlotStyleBars:()=>k,isOhlcPlotStyleCandles:()=>E,PlotSymbolSize:()=>n,isPlotWithTechnicalValues:()=>D,isNonVisualPlot:()=>V}),function(e){e[e.Line=0]="Line",e[e.Histogram=1]="Histogram",e[e.Cross=3]="Cross",e[e.Area=4]="Area",e[e.Columns=5]="Columns",e[e.Circles=6]="Circles",e[e.LineWithBreaks=7]="LineWithBreaks",e[e.AreaWithBreaks=8]="AreaWithBreaks",e[e.StepLine=9]="StepLine",e[e.StepLineWithDiamonds=10]="StepLineWithDiamonds",e[e.StepLineWithBreaks=11]="StepLineWithBreaks"}(s||(s={})),function(e){e[e.None=0]="None",e[e.Pane=1]="Pane",e[e.DataWindow=2]="DataWindow",e[e.PriceScale=4]="PriceScale",e[e.StatusLine=8]="StatusLine",e[e.All=15]="All"}(r||(r={})),function(e){e.Auto="auto",e.Tiny="tiny",e.Small="small",e.Normal="normal",e.Large="large",e.Huge="huge"}(n||(n={}))},89215:(e,t,i)=>{"use strict";i.r(t),i.d(t,{createStudy:()=>F,isESDStudy:()=>N,isFundamentalStudy:()=>R,isRollDatesStudy:()=>O,isStudy:()=>D,isStudyStrategy:()=>V,isStudyStub:()=>B,studyColorRotationMode:()=>W,useSameColorRotationComparator:()=>z});var s=i(2484),r=i(58403),n=i(68927),o=i(24680),a=i(89895),l=i(83956),c=i(61524),h=i(46289),d=i(50151),u=i(44352);const p=s.enabled("hide_main_series_symbol_from_indicator_legend");class _ extends n.Study{constructor(e,t,i,s){super(e,t,i,s),(0,d.ensureDefined)(this.properties().childs().styles.childs().vol_ma).childs().display.subscribe(this,(()=>this.invalidateTitleCache()))}base(){return 1}destroy(){(0,d.ensureDefined)(this.properties().childs().styles.childs().vol_ma).childs().display.listeners().unsubscribeAll(this),super.destroy()}showOnTopOnHovering(){return!1}_titleInputs(){const e={symbolsForDisplay:!0,skipHiddenInputs:!0,fakeInputsForDisplay:!0,asObject:!1,skipOptionalEmptySymbolInputs:p};return 0!==(0,d.ensureDefined)(this.properties().childs().styles.childs().vol_ma).childs().display.value()?this.inputs(e):this.inputs({...e,skippedInputs:["length"]})}_titleInParts(e,t,i,s){const r=super._titleInParts(e,t,i,s),n=this._getVolumeUnit();return n&&(r[0]+=` · ${n}`),r}_getVolumeUnit(){const e=this.symbolSource().symbolInfo();if(e){switch(e.volume_type){case"base":return e.base_currency;case"quote":return e.original_currency_code||e.currency_code;case"tick":return u.t(null,void 0,i(30973))}}}}var m=i(40549),g=i.n(m),f=i(26220),v=i.n(f),S=i(1930),y=i(90854);class b extends n.Study{constructor(e,t,i,s){super(e,function(e){ -return e.hasChild("currencyId")||e.addChild("currencyId",new(v())(null)),e.hasChild("unitId")||e.addChild("unitId",new(v())(null)),e.addExclusion("currencyId"),e.addExclusion("unitId"),e}(t),i,s),this._isActingAsSymbolSource=new(g())(!1),this._symbolHibernated=new(g())(!1),this._symbolResolvingActive=new(g())(!1),this._realignToolsLastParams=null,this._onIsActingAsSymbolSourceChanged=()=>{this._realignLineToolsIfParamsChanged()},this._recalculateIsActingAsSymbolSource(),this._isActingAsSymbolSource.subscribe(this._onIsActingAsSymbolSourceChanged);const r=this.properties().childs().inputs.childs().symbol;this._previousSymbolInputValue=r.value()}destroy(){this._isActingAsSymbolSource.unsubscribe(this._onIsActingAsSymbolSourceChanged),super.destroy()}isActingAsSymbolSource(){return this._isActingAsSymbolSource.readonly()}properties(){return this._properties}symbol(){return this._isActingAsSymbolSource.value()?this.properties().childs().inputs.childs().symbol.value():this.symbolSource().symbol()}interval(){return this.model().mainSeries().interval()}style(){return this._firstSourceOrSeries().symbolSource().style()}currency(){return this._isActingAsSymbolSource.value()?this.properties().childs().currencyId.value()||null:this.symbolSource().currency()}unit(){return this._isActingAsSymbolSource.value()?this.properties().childs().unitId.value()||null:this.symbolSource().unit()}setSymbolParams(e){this._setSymbolParamsInternal(e)}setSymbol(e){this.setSymbolParams({symbol:e})}symbolInfo(){if(!this._isActingAsSymbolSource.value())return super.symbolSource().symbolInfo();if(void 0===this._resolvedSymbols)return null;const e=this.symbol(),t=this._getSymbolForResolve(e);return this._resolvedSymbols[t]||null}symbolSource(){return this._isActingAsSymbolSource.value()?this:super.symbolSource()}symbolResolved(){return this.symbolsResolved()}symbolResolvingActive(){return this._symbolResolvingActive}symbolHibernated(){return this._symbolHibernated}isVisible(){const e=super.isVisible();return this._symbolHibernated.setValue(!e),e}symbolSameAsCurrent(e){return(0,y.symbolSameAsCurrent)(e,this.symbolInfo())}setCurrency(e){this.setSymbolParams({currency:e})}isConvertedToOtherCurrency(){return(0,S.isConvertedToOtherCurrency)(this.symbolInfo())}setUnit(e){this.setSymbolParams({unit:e})}isConvertedToOtherUnit(){return(0,S.isConvertedToOtherUnit)(this.symbolInfo(),this._model.unitConversionEnabled())}setInterval(e){}setStyle(e){}symbolTitle(e,t){return this.title(!0,{},!1,e)}measureUnitId(){return(0,S.measureUnitId)(this.symbolInfo())}bars(){return super.data()}dataUpdated(){return this._dataUpdated}_onPropertiesChanged(){this._recalculateIsActingAsSymbolSource(),super._onPropertiesChanged(),this._realignLineToolsIfParamsChanged()}_tryChangeInputs(){var e;const t=this._resolvedSymbolsByInput[this.symbol()]||null;(0,y.symbolSameAsCurrent)(this._previousSymbolInputValue,t)||this._setSymbolParamsInternal({currency:null,unit:null}),super._tryChangeInputs(),this._formatter=null,null===(e=this.priceScale())||void 0===e||e.updateFormatter(), -this._previousSymbolInputValue=this.properties().childs().inputs.childs().symbol.value()}_getSymbolObject(e){const t={symbol:e},i=this.currency();null!==i&&(t["currency-id"]=i);const s=this.unit();return this._model.unitConversionEnabled()&&null!==s&&(t["unit-id"]=s),t}_getSymbolForApi(e){return(0,S.symbolForApi)(this._resolvedSymbolsByInput[e]||null,e)}_onSymbolResolved(e,t,i){super._onSymbolResolved(e,t,i),this._recreatePriceFormattingDependencies();const s=t===this.symbol()?(0,S.extractSymbolNameFromSymbolInfo)(i,this.symbol()):null;null!==s&&(this._previousSymbolInputValue=s);const r=(0,S.symbolCurrency)(i),n=(0,S.symbolUnit)(i,this._model.unitConversionEnabled());this._setSymbolParamsInternal({symbol:null!=s?s:void 0,currency:r,unit:n},i),this._symbolResolvingActive.setValue(!1)}_onSymbolResolvingStart(){super._onSymbolResolvingStart(),this._symbolResolvingActive.setValue(!0)}_onSymbolError(){super._onSymbolError(),this._symbolResolvingActive.setValue(!1)}_onCurrencyMayChange(){this.isActingAsSymbolSource()?super._onCurrencyMayChange():this._onCurrencyChanged()}_recalculateIsActingAsSymbolSource(){var e,t;const i=null!==(t=""!==(null===(e=this._currencySourceSymbolInputProperty)||void 0===e?void 0:e.value()))&&void 0!==t&&t;this._isActingAsSymbolSource.setValue(i)}_setSymbolParamsInternal(e,t){const{symbol:i,currency:s,unit:r}=e,n=this.properties().childs(),o=n.inputs.childs().symbol.value(),a=n.currencyId.value(),l=n.unitId.value();if(void 0!==i&&i!==o&&n.inputs.childs().symbol.setValueSilently(i),void 0!==s&&s!==a&&n.currencyId.setValueSilently(s),void 0!==r&&r!==l&&n.unitId.setValueSilently(r),t)this._resolvedSymbolsByInput[this.symbol()]=t,this._resolvedSymbols[this._getSymbolForResolve(this.symbol())]=t,this._realignToolsLastParams=null;else{const e=this.symbolInfo();null!==e&&(n.currencyId.setValueSilently((0,S.symbolCurrency)(e)),n.unitId.setValueSilently((0,S.symbolUnit)(e,this._model.unitConversionEnabled())))}n.inputs.childs().symbol.value()!==o&&n.inputs.childs().symbol.listeners().fire(n.inputs.childs().symbol),n.currencyId.value()!==a&&n.currencyId.listeners().fire(n.currencyId),n.unitId.value()!==l&&n.unitId.listeners().fire(n.unitId),this._realignLineToolsIfParamsChanged()}_realignLineToolsIfParamsChanged(){const e=this.symbol(),t=this.interval(),i=this.currency(),s=this.unit();null!==this._realignToolsLastParams&&this._realignToolsLastParams.symbol===e&&this._realignToolsLastParams.interval===t&&this._realignToolsLastParams.currency===i&&this._realignToolsLastParams.unit===s||(this._model.realignLineTools(this),this._realignToolsLastParams={symbol:e,interval:t,currency:i,unit:s})}}var w=i(23304);var C=i(67876),P=i(38031);class T extends C.PriceAxisView{constructor(e,t){super(),this._source=e,this._styleId=t}_updateRendererData(e,t,i){var s;e.visible=!1;const r=this._source.priceScale(),n=this._source.properties().childs();if(!r||r.isEmpty()||!n.visible.value())return -;const o=null===(s=this._source.properties().childs().graphics.childs().horizlines)||void 0===s?void 0:s.childs()[this._styleId].childs();if(!(o&&o.visible&&o.visible.value()&&this._isLabelVisibleAccordinglyToProperties()))return;const a=this._source.model().timeScale().logicalRange(),l=this._source.firstValue();if(null===l||null===a)return;const c={price:NaN,time:-1/0},h=this._source.graphics().horizlines().get(this._styleId);if(void 0===h)return;for(const e of h){if(void 0===e.level)continue;const t=a.contains(e.startIndex,!0);t===a.contains(e.endIndex,!0)&&0!==t||c.timenew T(this,e)))}_createStudyPlotPaneView(e){return new x.StudyPlotPaneView(this,this._series,this._model,e,this._needExtendToBarsEnding())}_apiInputs(){return{...super._apiInputs(),mapRightBoundaryToBarStartTime:!!this._needExtendToBarsEnding()||void 0}}_needExtendToBarsEnding(){var e;return void 0!==(null===(e=this.metaInfo().defaults.inputs)||void 0===e?void 0:e.mapRightBoundaryToBarStartTime)}}class M extends I{priceRange(e,t){let i=!1;this.graphics().hhists().forEach(((e,t)=>{var s;i=i||(0,d.ensureDefined)(null===(s=this.properties().childs().graphics.childs().hhists)||void 0===s?void 0:s.childs()[t]).value()}));const s=function(e,t,i,s){let r=null;return e.forEach(((e,s)=>{e.forEach((e=>{e.firstBarTime<=i&&e.lastBarTime>=t&&(null===r?r={low:{l:e.priceLow,h:e.priceHigh},high:{h:e.priceHigh}}:(e.priceLow{"use strict";i.d(t,{StudyBaseWindowView:()=>r});var s=i(95790);class r extends s.DataWindowView{constructor(e,t){super(),this._invalidated=!0,this._study=e,this._model=t,this._valueProvider=this._createValuesProvider(e,t),this._items=this._valueProvider.getItems().map((e=>new s.DataWindowItem(e.id,e.title,""))),this.update()}update(){this._invalidated=!0}items(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items}study(){return this._study}_updateImpl(){this._header=this._study.title(!0),this._title=this._study.title();const e=this._valueProvider.getValues(this._currentIndex());for(let t=0;t{"use strict";i.d(t,{StudyColorRotatorFactory:()=>h});var s=i(7394),r=i(24377),n=i(38031),o=i(89215) +;let o=Math.round(n+2*(.5*s+.75*r));o%2!=s%2&&(o+=1);const a=Math.round(t.x*r),l=Math.round((t.y+i)*r),c=s%2/2;e.beginPath(),e.arc(a+c,l+c,o/2,0,2*Math.PI,!0),e.closePath(),e.fill(),e.beginPath(),e.arc(a+c,l+c,n/2,0,2*Math.PI,!0),e.closePath(),e.stroke()}}},95693:(e,t,i)=>{"use strict";i.d(t,{SeriesBase:()=>Gt});var s=i(50151),r=i(49483),n=i(51768),o=i(76422),a=i(98351),l=i(88029),c=i(22770),h=i(88552),d=i(33639),u=i(23304),p=i(26220),_=i.n(p),m=i(1930),g=i(92484),f=i(74599),v=i(77906),S=i(17659),y=i(44352),b=i(2484),w=i(23902),P=i(72039),C=i(12205);function T(e){const t="QUANDL"===(e=e||{}).exchange,s={title:"",description:"",interval:"",exchange:"",provider:"",chartStyle:"",sessionDescription:"",priceSource:""};let r="";if(e.description&&t)if(2===e.description.split("/").length)r=e.description.split("/")[1];else{e.description.split("'").filter((e=>e.length)).forEach((e=>{let t=[];t=e&&("/"===e[0]||/\d+\/\(?/.test(e))?[e]:e.split("/").filter((e=>e.length)),r+=t[2===t.length?1:0]}))}else r=e.description?e.description:e.symbol;if(e.ticker?(s.title=e.ticker,s.description=x(r)):s.title=x(r),e.interval&&(s.interval=(0,C.translatedIntervalString)(e.interval)),t&&e.description){const t=/[\w_]+\/[\w_]+/.exec(e.description);t&&t[0]?s.provider=x(t[0].split("/")[0]):s.provider=x(e.description.split("/")[0])}return e.exchange&&(s.exchange=x(e.exchange)),s.chartStyle=x(function(e){return e.inputs,8===e.style?y.t(null,void 0,i(40530)):""}(e)),e.sessionDescription&&(s.sessionDescription=x(e.sessionDescription)),void 0!==e.priceSource&&(s.priceSource=x(e.priceSource)),s}function x(e){return e.replace(/'/g,"")}const I=y.t(null,void 0,i(89659)),M=b.enabled("hide_unresolved_symbols_in_legend"),A=b.enabled("symbol_info_price_source");class L extends P.StatusProviderBase{constructor(e,t,i,s){super(t),this._series=e,this._statusViewProperties=i,this._options=s||{}}text(){return function(e){const t=T(e);return(e.ticker?t.description:t.title)+(t.interval?", "+t.interval:"")+function(e,t=", "){return(e.provider?`${t}${e.provider}`:"")+(e.exchange?`${t}${e.exchange}`:"")+(e.chartStyle?`${t}${e.chartStyle}`:"")+(e.branding?`${t}${e.branding}`:"")+(e.sessionDescription?`${t}${e.sessionDescription}`:"")}(t)}(this._getTitleGenerationOptions())}getSplitTitle(){return T(this._getTitleGenerationOptions())}bold(){return!1}size(){return this._statusViewProperties.childs().fontSize.value()+"px"}errorStatus(){const e=this._series.seriesErrorMessage();return null!==e?{error:e,title:I}:null}_getTitleGenerationOptions(){var e,t,i;const s=this._series.symbolInfo(),r=this._statusViewProperties.childs(),n=this._series.symbolTextSourceProxyProperty().value();let o;if(r.showExchange.value()&&s){const i=(0,m.isEconomicSymbol)(s)&&(null!==(t=null===(e=s.source2)||void 0===e?void 0:e.description)&&void 0!==t?t:s.source);o=i||s.exchange}const a=null!==(i=A&&(null==s?void 0:s.price_source_id)?this._series.model().availablePriceSources().name(s.price_source_id):null)&&void 0!==i?i:void 0;return{description:E(n,s),exchange:o, +symbol:M&&null===s?"":this._series.symbol(),interval:r.showInterval.value()&&!this._options.hideResolution?this._series.interval():void 0,style:this._series.properties().childs().style.value(),inputs:this._series.getInputsProperties().state(),boxSize:this._series.data().boxSize,reversalAmount:this._series.data().reversalAmount,ticker:k(n,s),priceSource:a}}}function k(e,t){return"ticker-and-description"!==e?"":null!==t?t.name:void 0}function E(e,t){if(null!==t)return"ticker"===e?t.name:"long-description"===e&&void 0!==t.long_description?t.long_description:(0,w.getTranslatedSymbolDescription)({pro_name:t.pro_name||void 0,short_name:t.name||void 0,description:t.description||void 0,short_description:t.short_description||void 0,local_description:t.local_description||void 0,language:t.language||void 0})}class D extends S.StatusView{constructor(e,t,i,s){super(new L(e,t,i,s)),this._invalidated=!0,this._series=e,this._series.onRestarted().subscribe(this,this.update),this._series.dataEvents().symbolResolved().subscribe(this,this.update),this._series.dataEvents().completed().subscribe(this,this.update),this._series.boxSizeValue().subscribe(this.update.bind(this)),i.childs().symbolTextSource.listeners().subscribe(this,this.update)}getSeriesPrecision(){let e=4;const t=this._series.symbolInfo();return t&&t.pricescale&&(e=Math.round(Math.log(t.pricescale)/Math.log(10))),e}round(e){const t=this.getSeriesPrecision(),i=Math.round(e*Math.pow(10,t))/Math.pow(10,t);return i?i.toString():""}update(){this._invalidated=!0}text(){return this._updateImpl(),super.text()}color(){return this._updateImpl(),super.color()}bold(){return this._updateImpl(),super.bold()}size(){return this._updateImpl(),super.size()}getSplitTitle(){return this._updateImpl(),this._statusProvider.getSplitTitle()}_updateImpl(){this._invalidated&&(this._bold=this._statusProvider.bold(),this._size=this._statusProvider.size(),this._text=this._statusProvider.text(),this._invalidated=!1)}}var B=i(50335),V=i(95790),R=i(76076),N=i(86061),O=i(6250);const F=r.CheckMobile.any(),W=b.enabled("hide_resolution_in_legend");class H extends V.DataWindowView{constructor(e,t){super(),this._invalidated=!0,this._series=e,this._model=t,this._valuesProvider=this._createValuesProvider(e,t),this._items=this._valuesProvider.getItems().map((e=>new V.DataWindowItem(e.id,e.title,"",e.unimportant))),this.update()}update(){this._invalidated=!0}items(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items}series(){return this._series}_updateImpl(){var e,t;const i=this._series.symbolInfo();if(i){const e=[i.name];W||e.push((0,C.translatedIntervalString)(this._series.interval())),(0,m.isEconomicSymbol)(i)&&i.source?e.push(i.source):e.push((0,r.onWidget)()||"forex"===i.type?i.exchange:i.listed_exchange),this._header=e.join(", "),this._title=i.description}else this._header=this._series.symbol();let s=this._model.crossHairSource().appliedIndex();b.enabled("use_last_visible_bar_value_in_legend")&&!(0, +B.isNumber)(s)&&(s=null!==(t=null===(e=this._model.timeScale().visibleBarsStrictRange())||void 0===e?void 0:e.lastBar())&&void 0!==t?t:NaN);const n=this._valuesProvider.getValues(s);for(let e=0;ee||t||i),i.showBarChange,i.showSeriesOHLC,i.showVolume),this._visibilityProperty.subscribe(this,this.update)}areValuesVisible(){return this._visibilityProperty.value()}additional(){return null}marketTitle(){const e=this._series.marketStatusModel().status().value();return this._showLastPriceAndChangeOnly()&&("pre_market"===e||"post_market"===e)?`${G}:`:""}destroy(){this._backgroundColorSpawn.destroy(),this._visibilityProperty.destroy()}_createValuesProvider(e,t){return new U(e,t)}}var $=i(40549),Y=i.n($),K=i(21169),X=i(32769);function Z(){const e=window.ChartApiInstance.serverTimeOffset();return Date.now()/1e3+e}function J(e,t,i){return e<=i?t<=i?1/0:t/1e3:Math.min(e,t)/1e3}class Q{constructor(e,t){this._marketStatus=new(Y())(null),this._lastMarketStatus=null,this._sessionsSpec=null, +this._nextSessionEdgeInternal=null,this._nextSessionEdge=new(Y())(null),this._recalcNextSessionEdgeTimerId=null,this._futuresContractExpirationTime=null,this._quotesProvider=e,e.quotesUpdate().subscribe(this,this._update.bind(this)),this._resetSubscription=t,this._resetSubscription.subscribe(this,this._resetStatus)}destroy(){this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._quotesProvider.quoteSymbolChanged().unsubscribeAll(this),this._resetSubscription.unsubscribeAll(this),null!==this._recalcNextSessionEdgeTimerId&&clearTimeout(this._recalcNextSessionEdgeTimerId)}futuresContractExpirationTime(){return this._futuresContractExpirationTime}setSymbolInfo(e){var t,i,s,r,n;if(this._nextSessionEdgeInternal=null,null===e)return void(this._sessionsSpec=null);const o=new K.SessionSpec(e.timezone,null!==(t=e.session_display)&&void 0!==t?t:e.session,e.session_holidays,e.corrections);let a,l;const c=null===(i=e.subsessions)||void 0===i?void 0:i.find((e=>"premarket"===e.id)),h=null===(s=e.subsessions)||void 0===s?void 0:s.find((e=>"postmarket"===e.id));void 0!==c&&(a=new K.SessionSpec(e.timezone,null!==(r=c["session-display"])&&void 0!==r?r:c.session,e.session_holidays,c["session-correction"])),void 0!==h&&(l=new K.SessionSpec(e.timezone,null!==(n=h["session-display"])&&void 0!==n?n:h.session,e.session_holidays,h["session-correction"])),this._sessionsSpec={general:o,preMarket:a,postMarket:l},this._recalculateNextSessionEdge()}status(){return this._marketStatus}nextSessionEdge(){return this._nextSessionEdge}_resetStatus(){this._marketStatus.setValue(null)}_update(e){void 0!==e&&void 0!==e.values.current_session&&(this._lastMarketStatus=e.values.current_session),null!==this._lastMarketStatus?this._marketStatus.setValue(this._lastMarketStatus):this._resetStatus()}_getNextSessionEdgeInternal(){var e;if(null===this._sessionsSpec||"24x7"===this._sessionsSpec.general.spec())return null;const t=1e3*Z();if(null===this._nextSessionEdgeInternal||(null!==(e=this._nextSessionEdgeInternal.timestamp)&&void 0!==e?e:1/0)<=t/1e3){const{general:e,preMarket:i,postMarket:s}=this._sessionsSpec,r=(0,X.get_timezone)(e.timezone()),n=(0,X.utc_to_cal)(r,t),o=J((0,X.cal_to_utc)(r,e.alignToNearestSessionStart(n,1)),(0,X.cal_to_utc)(r,e.alignToNearestSessionEnd(n,1)),t),a=J(void 0!==i?(0,X.cal_to_utc)(r,i.alignToNearestSessionStart(n,1)):1/0,void 0!==i?(0,X.cal_to_utc)(r,i.alignToNearestSessionEnd(n,1)):1/0,t),l=J(void 0!==s?(0,X.cal_to_utc)(r,s.alignToNearestSessionStart(n,1)):1/0,void 0!==s?(0,X.cal_to_utc)(r,s.alignToNearestSessionEnd(n,1)):1/0,t),c=Math.min(o,a,l);c===1/0&&(this._nextSessionEdgeInternal={timestamp:null}),this._nextSessionEdgeInternal=c===l?{timestamp:c,status:"post_market"}:c===a?{timestamp:c,status:"pre_market"}:{timestamp:c}}return this._nextSessionEdgeInternal}_recalculateNextSessionEdge(){const e=this._getNextSessionEdgeInternal();if(null===e||null===e.timestamp)return void this._nextSessionEdge.setValue(null);const t={status:e.status,remainingSeconds:Math.max(0,e.timestamp-Z())} +;if(null===this._recalcNextSessionEdgeTimerId){let e=Math.ceil(t.remainingSeconds%60);0===e&&(e+=60),this._recalcNextSessionEdgeTimerId=setTimeout((()=>this._recalculateNextSessionEdgeByTimer()),1e3*e)}this._nextSessionEdge.setValue(t)}_recalculateNextSessionEdgeByTimer(){this._recalcNextSessionEdgeTimerId=null,this._recalculateNextSessionEdge()}}var ee=i(35624),te=i(578),ie=i(69228),se=i(87770),re=i(68671);let ne=0;class oe{constructor(e,t){this._extrapolatedData=[],this._cacheForFuture=!1,this._modelId=ne++,this._builderCache=null,this._uniqueId=(0,re.randomHashN)(6),this._resolution=t,this._symbolInfo=e,this._valid=Boolean(e.timezone)&&Boolean(e.session),this._session=new ie.SessionInfo(e.timezone,e.session,e.session_holidays,e.corrections)}syncSourceTarget(){return{uniqueId:this._uniqueId,resolution:this._resolution,symbolInfo:this._symbolInfo,session:this._session.state()}}getSymbolInfo(){return this._symbolInfo}getSession(){return this._session}getResolution(){return this._resolution}uniqueId(){return this._modelId}distance(e,t){if(!this.isValid())return{success:!1};if(e>t)return{success:!1};if(e===t)return{success:!0,result:0};let i=this._extrapolatedData.length,s=0!==i?this._extrapolatedData[0]:null,r=null!==s?this._extrapolatedData[i-1]:null;const n=er){const s=(0,se.extrapolateBarsFrontToTime)(this._barBuilder(),r||1e3*e,1e3*t,2e3,!0);this._extrapolatedData=this._extrapolatedData.concat(s.times),i=this._extrapolatedData.length,this._cacheForFuture=n}if(r=this._extrapolatedData[i-1],r<1e3*t)return{success:!1};const o=this._extrapolatedData.indexOf(1e3*t);return-1===o?{success:!1}:{success:!0,result:o}}projectTime(e,t){if(!this.isValid())return e;let i=this._extrapolatedData.length,s=i>0?this._extrapolatedData[0]:null,r=null!==s?this._extrapolatedData[i-1]:null;const n=t>=0;1e3*e===s&&this._cacheForFuture===n||(this._extrapolatedData=[1e3*e],i=1,s=null,r=null);const o=Math.abs(t);if(null===s||o>=i){const s=(0,se.extrapolateBarsFrontByCount)(this._barBuilder(),r||1e3*e,Math.sign(t)*(o-i+1),!0);this._extrapolatedData=this._extrapolatedData.concat(s.times),i=this._extrapolatedData.length,this._cacheForFuture=n}return i0?e.delay:900;return Math.round(t/60)}listedExchange(){const e=this._symbolInfo.value();return null!==e?e.listed_exchange:""}async description(){const e=this._symbolInfo.value();if(null===e)return"";let t={};try{t=(0,s.ensureNotNull)(await(0,le.getExchange)(e))}catch(e){he.logWarn(`Cannot get exchange ${(0,ce.errorToString)(e)}`)}return t.description||e.listed_exchange}exchange(){const e=this._symbolInfo.value();return null!==e?e.exchange:""}proName(){const e=this._symbolInfo.value();return null!==e?e.pro_name:""}firstReplacedByBatsExchange(){const e=this._symbolInfo.value();return e&&(0,le.firstReplacedByBatsExchange)(e)}_resetStatus(){this._dataUpdatedInfoStatus.setValue(null)}_update(){const e=this._symbolInfo.value();if(null===e)return void this._dataUpdatedInfoStatus.setValue(null);const t=this._status.value();if("string"==typeof t)return void this._dataUpdatedInfoStatus.setValue(null);if(2===t||1===t)return;const i=ue(e,t,this._updatePeriod.value());0!==i.length?this._dataUpdatedInfoStatus.setValue(i):this._dataUpdatedInfoStatus.setValue(null)}}var _e=i(90593),me=i(65665);class ge{constructor(e,t){this._dataProblem=new _e.WatchedObject(null),this._quotesProvider=e,this._quotesProvider.quotesUpdate().subscribe(this,this._update.bind(this)),this._resetSubscription=t,this._resetSubscription.subscribe(this,this._resetStatus)}destroy(){this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._resetSubscription.unsubscribeAll(this)}status(){return this._dataProblem}_resetStatus(){this._dataProblem.setValue(null)}_update(e){void 0===e.values||void 0===e.values.data_problem?this._resetStatus():this._dataProblem.setValue((0,me.clone)(e.values.data_problem))}}var fe=i(54168),ve=i(38031),Se=i(67876),ye=i(99846);function be(e){return e<10?`0${e}`:e.toString()}var we=i(1194),Pe=i(97425);const Ce=b.enabled("force_exchange_as_title"),Te=b.enabled("chart_style_hilo_last_price"),xe=[0,1,2,3,9,8,10];Te&&xe.push(12);const Ie={alwaysShowGlobalLast:!1,visibleOnHistoryOnly:!1,showCountdown:!0,showSymbolLabel:!0,useSolidBodyColor:!0};class Me extends Se.PriceAxisView{constructor(e,t,i){super(),this._previousCountdown="",this._source=e,this._model=t,this._options={...Ie,...i}}updateCountdown(){ +this._countdownText()!==this._previousCountdown&&(this.update((0,Pe.sourceChangeEvent)(this._source.id())),this._model.updateSourcePriceScale(this._source))}_getSource(){return this._source}_getModel(){return this._model}_isCountdownEnabled(){return this._options.showCountdown}_countdownText(){const e=te.Interval.parse(this._source.interval());if(e.isDWM()||e.isTicks()||e.isSeconds()&&1===e.multiplier())return"";const t=this._source.data().bars().last();if(null===t)return"";const i=1e3*(0,s.ensure)(t.value[0]),r=te.Interval.parse(this._source.interval()).inMilliseconds(),n=i.valueOf()+r;let o=Math.round((n-this._currentTime())/1e3);if(o<=0)return"";o=Math.min(o,r/1e3);let a=null;o>=3600&&(a=be(Math.floor(o/3600))),o%=3600;const l=be(Math.floor(o/60));o%=60;const c=be(Math.floor(o));return null!==a?`${a}:${l}:${c}`:`${l}:${c}`}_updateRendererData(e,t,i){var r;if(e.visible=!1,t.visible=!1,!this._source.isVisible())return;const n=this._source.properties().childs();if(!Te&&12===n.style.value())return;const o=this._model.timeScale().visibleBarsStrictRange(),a=this._source.data().last();if(null===o||null===a)return;if(this._options.visibleOnHistoryOnly&&o.contains(a.index))return;const l=this._model.properties().childs().scalesProperties.childs();let c=l.showSeriesLastValue.value(),h=this._isCountdownEnabled()&&n.showCountdown.value()&&xe.includes(n.style.value())&&(this._options.alwaysShowGlobalLast||o.contains(a.index)),d=this._options.showSymbolLabel&&l.showSymbolLabels.value();const u=l.seriesLastValueMode.value()===ye.PriceAxisLastValueMode.LastPriceAndPercentageValue,p=this._source.lastValueData(void 0,this._options.alwaysShowGlobalLast);if(p.noData)return;const _=8===n.style.value();if((c||h||d)&&_&&n.haStyle.childs().showRealLastPrice.value()){const e=this._source.lastValueData(void 0,!1),t=this._source.lastValueData(void 0,!0);e.noData||t.noData||e.index!==t.index||(c=!1,h=!1,d=!1)}const m=(0,ve.resetTransparency)(this._source.priceLineColor(p.color));if(this._options.useSolidBodyColor?(i.background=m,i.borderColor=void 0):(i.background=this._model.backgroundColorAtYPercentFromTop((null!==(r=i.fixedCoordinate)&&void 0!==r?r:i.coordinate)/(0,s.ensureNotNull)(this._model.paneForSource(this._source)).height()),i.borderColor=m),i.coordinate=p.coordinate,i.floatCoordinate=p.floatCoordinate,c||h){const t=this._axisFirstLineText(p,c);e.text=t,this._options.useSolidBodyColor?(i.textColor=this.generateTextColor(i.background),e.borderVisible=!1):(e.borderVisible=!0,i.textColor=m),e.textColor=i.textColor;const s=c&&u?(0,we.getOppositeModePriceText)(this._source.priceScale(),p):"";e.secondLine=s,i.secondLineTextColor=i.textColor;const r=h?this._countdownText():"";this._previousCountdown=r,e.thirdLine=r,i.thirdLineTextColor=(0,ve.generateColor)(i.textColor,25),0===t.length&&0===s.length&&0===r.length||(e.visible=!0)}d&&(t.text=this._paneText(d),t.visible=t.text.length>0)}_paneText(e){let t="";const i=this._source.symbolInfo();return Ce?t=(0,m.displayedSymbolExchange)(i):e&&(t=(0,m.displayedSymbolName)(i)),t} +_axisFirstLineText(e,t){return t?(0,we.getCurrentModePriceText)(this._source.priceScale(),e):""}_currentTime(){return Date.now()+1e3*this._source.serverTimeOffset()}}var Ae=i(45703);class Le extends Me{lastPrice(){return this._getSource().data().lastProjectionPrice}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const r=this._getModel(),n=this._getSource(),o=n.priceScale(),a=r.timeScale(),l=this.lastPrice();if(a.isEmpty()||o.isEmpty()||void 0===l)return;const c=a.visibleBarsStrictRange();if(null===c)return;const h=c.firstBar(),u=c.lastBar(),p=n.data(),_=p.search(u,d.PlotRowSearchMode.NearestLeft);if(null===_)return;const m=n.nearestIndex(h,d.PlotRowSearchMode.NearestRight);if(void 0===m)return;const g=n.model().properties().childs().scalesProperties.childs(),f=(0,s.ensureNotNull)(p.valueAt(m))[4];let v=i.background,S=g.showSeriesLastValue.value(),y=!1,b=!1,w=!1;const P=n.lastValueData(4,!1),C=n.properties().childs();if(8===C.style.value()&&C.haStyle.childs().showRealLastPrice.value()){const e=n.lastValueData(4,!0);if(e.noData||e.color===i.background||(v=(0,ve.resetTransparency)(e.color)),!e.noData&&!P.noData){const t=e.index===P.index;y=t&&g.showSymbolLabels.value(),b=g.seriesLastValueMode.value()===ye.PriceAxisLastValueMode.LastPriceAndPercentageValue,S=S&&t,w=t&&this._isCountdownEnabled()&&C.showCountdown.value()}}else{const e=n.barColorer().barStyle(_.index,!0);v=(0,ve.resetTransparency)(e.barColor)}if(i.background=v,i.textColor=this.generateTextColor(v),i.secondLineTextColor=i.textColor,i.thirdLineTextColor=(0,ve.generateColor)(i.textColor,25),i.coordinate=o.priceToCoordinate(l,f),e.visible=S||w,!P.noData){const i=n.priceScale().isPercentage();P.formattedPriceAbsolute=o.formatPriceAbsolute(l),P.formattedPricePercentage=o.formatPricePercentage(l,f,!0),P.text=i?P.formattedPricePercentage:P.formattedPriceAbsolute,e.text=this._axisFirstLineText(P,S),e.secondLine=S&&b?i?P.formattedPriceAbsolute:P.formattedPricePercentage:"",e.thirdLine=w?this._countdownText():"",t.text=this._paneText(y)}t.visible=y}}var ke=i(64636),Ee=i(56744),De=i(7394),Be=i(53479);const Ve={light:{lineStyle:Be.LINESTYLE_DOTTED,lineWidth:1,textColor:De.colorsPalette["color-cold-gray-900"],backgroundColor:De.colorsPalette["color-tv-blue-50"],lineColor:De.colorsPalette["color-cold-gray-500"]},dark:{lineStyle:Be.LINESTYLE_DOTTED,lineWidth:1,textColor:De.colorsPalette["color-white"],backgroundColor:De.colorsPalette["color-tv-blue-a800"],lineColor:De.colorsPalette["color-cold-gray-500"]}};function Re(e){return e?Ve.dark:Ve.light}class Ne extends Ee.HorizontalLinePaneView{constructor(e,t,i){super(),this._model=e,this._isVisible=t.lineVisible,this._lineColor=t.lineColor,this._lineWidth=t.lineWidth,this._getValue=i}_updateImpl(){const e=this._lineRendererData;if(e.visible=!1,!this._isVisible.value())return;const t=this._model.mainSeries(),i=t.priceScale(),s=t.firstValue(),r=this._getValue();if(null===s||null===r)return +;const n=Re(this._model.isDark()),o=this._lineColor.value()?this._lineColor.value():n.lineColor,a=this._lineWidth.value()?this._lineWidth.value():n.lineWidth;e.visible=!0,e.y=i.priceToCoordinate(r,s),e.linestyle=n.lineStyle,e.linewidth=a,e.color=o}}class Oe extends Se.PriceAxisView{constructor(e,t,i,s){super(),this._model=e,this._label=t,this._isVisible=i,this._getValue=s}_updateRendererData(e,t,i){if(e.visible=!1,t.visible=!1,!this._isVisible.value())return;const s=this._model.mainSeries(),r=s.priceScale(),n=s.firstValue(),o=this._getValue();if(null===n||null===o)return;const a=Re(this._model.isDark());e.visible=!0,t.visible=!0,e.text=r.formatPriceAbsolute(o),t.text=this._label,i.coordinate=r.priceToCoordinate(o,n),i.background=a.backgroundColor,i.textColor=a.textColor}}class Fe extends Ae.PriceLineAxisView{constructor(e,t,i){super(),this._model=e,this._isLineVisible=t,this._getValue=i}_isVisible(){return this._isLineVisible.value()}_lineWidth(){return Re(this._model.isDark()).lineWidth}_lineStyle(){return Re(this._model.isDark()).lineStyle}_priceLineColor(e){return Re(this._model.isDark()).lineColor}_value(){const e=this._model.mainSeries(),t=e.priceScale(),i=e.firstValue(),s=this._getValue();if(null===i||null===s)return{noData:!0};const r=t.priceToCoordinate(s,i);return{noData:!1,floatCoordinate:r,coordinate:r,color:"",formattedPricePercentage:"",formattedPriceAbsolute:"",formattedPriceIndexedTo100:"",text:"",index:0}}}const We=y.t(null,void 0,i(30777)),He=y.t(null,void 0,i(8136));function ze(e,t,i,s){const r=new Ne(e,i,s),n=new Oe(e,i.label,i.labelVisible,s);return{paneView:r,panePriceAxisView:new ke.PanePriceAxisView(n,t,e),priceAxisView:n,priceLineAxisView:new Fe(e,i.lineVisible,s)}}const Ue={light:{lineStyle:Be.LINESTYLE_DOTTED,lineWidth:1,textColor:(0,De.getHexColorByName)("color-cold-gray-900"),backgroundColor:(0,De.getHexColorByName)("color-tv-blue-50"),lineColor:(0,De.getHexColorByName)("color-cold-gray-500")},dark:{lineStyle:Be.LINESTYLE_DOTTED,lineWidth:1,textColor:(0,De.getHexColorByName)("color-white"),backgroundColor:(0,De.getHexColorByName)("color-tv-blue-a800"),lineColor:(0,De.getHexColorByName)("color-cold-gray-500")}};function je(e){return e?Ue.dark:Ue.light}class Ge extends Ee.HorizontalLinePaneView{constructor(e,t,i){super(),this._model=e,this._isVisible=t.lineVisible,this._lineColor=t.lineColor,this._lineWidth=t.lineWidth,this._getValue=i}_updateImpl(){const e=this._lineRendererData;if(e.visible=!1,!this._isVisible.value())return;const t=this._model.mainSeries(),i=t.priceScale(),s=t.firstValue(),r=this._getValue();if(null===s||null===r)return;const n=je(this._model.isDark()),o=this._lineColor.value()?this._lineColor.value():n.lineColor,a=this._lineWidth.value()?this._lineWidth.value():n.lineWidth;e.visible=!0,e.y=i.priceToCoordinate(r,s),e.linestyle=n.lineStyle,e.linewidth=a,e.color=o}}class qe extends Se.PriceAxisView{constructor(e,t,i,s){super(),this._model=e,this._label=t,this._isVisible=i,this._getValue=s}_updateRendererData(e,t,i){if(e.visible=!1,t.visible=!1, +!this._isVisible.value())return;const s=this._model.mainSeries(),r=s.priceScale(),n=s.firstValue(),o=this._getValue();if(null===n||null===o)return;const a=je(this._model.isDark());e.visible=!0,t.visible=!0,e.text=r.formatPriceAbsolute(o),t.text=this._label,i.coordinate=r.priceToCoordinate(o,n),i.background=a.backgroundColor,i.textColor=a.textColor}}class $e extends Ae.PriceLineAxisView{constructor(e,t,i){super(),this._model=e,this._isLineVisible=t,this._getValue=i}_isVisible(){return this._isLineVisible.value()}_lineWidth(){return je(this._model.isDark()).lineWidth}_lineStyle(){return je(this._model.isDark()).lineStyle}_priceLineColor(e){return je(this._model.isDark()).lineColor}_value(){const e=this._model.mainSeries(),t=e.priceScale(),i=e.firstValue(),s=this._getValue();if(null===i||null===s)return{noData:!0};const r=t.priceToCoordinate(s,i);return{noData:!1,floatCoordinate:r,coordinate:r,color:"",formattedPricePercentage:"",formattedPriceAbsolute:"",formattedPriceIndexedTo100:"",text:"",index:0}}}const Ye=y.t(null,void 0,i(22554));function Ke(e,t,i,s){const r=i.childs(),n=function(e,t,i,s){const r=new Ge(e,i,s),n=new qe(e,i.label,i.labelVisible,s),o=new ke.PanePriceAxisView(n,t,e),a=new $e(e,i.lineVisible,s);return{paneView:r,panePriceAxisView:o,priceAxisView:n,priceLineAxisView:a}}(e,t,{label:Ye,labelVisible:r.averageClosePriceLabelVisible,lineVisible:r.averageClosePriceLineVisible,lineColor:r.averagePriceLineColor,lineWidth:r.averagePriceLineWidth},(()=>s(0)));return{paneViews:[n.paneView],panePriceAxisViews:[n.panePriceAxisView],priceAxisViews:[n.priceAxisView],priceLineAxisViews:[n.priceLineAxisView]}}var Xe=i(26867),Ze=i.n(Xe),Je=i(90854),Qe=i(91035),et=i(86441);class tt{constructor(){this._data=null}setData(e){this._data=e}data(){return this._data}draw(e,t){const i=this._data;if(null===i)return;const s=t.pixelRatio;e.save();const r=Math.max(1,Math.floor(s)),n=r%2/2,o=Math.round(i.center.x*s)+n,a=i.center.y*s;e.fillStyle=i.seriesLineColor,e.beginPath();const l=Math.max(2,1.5*i.seriesLineWidth)*s;e.arc(o,a,l,0,2*Math.PI,!1),e.fill(),e.fillStyle=i.fillColor,e.beginPath(),e.arc(o,a,i.radius*s,0,2*Math.PI,!1),e.fill(),e.lineWidth=r,e.strokeStyle=i.strokeColor,e.beginPath(),e.arc(o,a,i.radius*s+r/2,0,2*Math.PI,!1),e.stroke(),e.restore()}hitTest(e,t){return null}}function it(e){return e}const st=[{start:0,end:.25,startRadius:4,endRadius:10,startFillAlpha:.25,endFillAlpha:0,startStrokeAlpha:.4,endStrokeAlpha:.8,easing:it},{start:.25,end:.525,startRadius:10,endRadius:14,startFillAlpha:0,endFillAlpha:0,startStrokeAlpha:.8,endStrokeAlpha:0,easing:it},{start:.525,end:1,startRadius:14,endRadius:14,startFillAlpha:0,endFillAlpha:0,startStrokeAlpha:0,endStrokeAlpha:0,easing:it}];function rt(e,t,i,s){const r=i+(s-i)*t;return(0,ve.applyTransparency)(e,(0,ve.alphaToTransparency)(r))}function nt(e,t){const i=e%2600/2600;let s;for(const e of st)if(i>=e.start&&i<=e.end){s=e;break}if(void 0===s)throw new Error("Last price animation internal logic error");const r=s.easing((i-s.start)/(s.end-s.start));return{ +fillColor:rt(t,r,s.startFillAlpha,s.endFillAlpha),strokeColor:rt(t,r,s.startStrokeAlpha,s.endStrokeAlpha),radius:(n=r,o=s.startRadius,a=s.endRadius,o+(a-o)*n)};var n,o,a}class ot{constructor(e){this._renderer=new tt,this._invalidated=!0,this._stageInvalidated=!0,this._startTime=performance.now(),this._endTime=this._startTime-1,this._series=e}update(e){if(this._invalidated=!0,"data-source-change"===e.type&&e.sourceId===this._series.id()&&e.realtime&&this._series.seriesLoaded()){const e=performance.now(),t=this._endTime-e;if(t>0)return void(t<650&&(this._endTime+=2600));this._startTime=e,this._endTime=e+2600}}invalidateStage(){this._stageInvalidated=!0}animationActive(){return performance.now()<=this._endTime}stopAnimation(){this._endTime=this._startTime-1}renderer(e,t){return this._invalidated?(this._updateImpl(e,t),this._invalidated=!1,this._stageInvalidated=!1):this._stageInvalidated&&(this._updateRendererDataStage(),this._stageInvalidated=!1),this._renderer}_updateImpl(e,t){this._renderer.setData(null);const i=this._series.model().timeScale(),s=i.visibleBarsStrictRange(),r=this._series.firstValue(),n=this._series.lastValueData(void 0,!0,!0);if(null===s||null===r||void 0===n.index||void 0===n.price||!s.contains(n.index))return;const o=new et.Point(i.indexToCoordinate(n.index),this._series.priceScale().priceToCoordinate(n.price,r)),a=n.color,l=this._series.properties().childs();let c;switch(this._series.style()){case 3:c=l.areaStyle.childs().linewidth.value();break;case 10:const t=l.baselineStyle,i=Math.round(e*(Math.abs(100-t.childs().baseLevelPercentage.value())/100));c=o.y<=i?t.childs().topLineWidth.value():t.childs().bottomLineWidth.value();break;default:c=l.lineStyle.childs().linewidth.value()}const h=nt(this._duration(),a);this._renderer.setData({seriesLineColor:a,seriesLineWidth:c,fillColor:h.fillColor,strokeColor:h.strokeColor,radius:h.radius,center:o})}_updateRendererDataStage(){const e=this._renderer.data();if(null!==e){const t=nt(this._duration(),e.seriesLineColor);e.fillColor=t.fillColor,e.strokeColor=t.strokeColor,e.radius=t.radius}}_duration(){return this.animationActive()?performance.now()-this._startTime:2599}}var at=i(36646),lt=i(77213),ct=i(7578),ht=i(92133),dt=i(1975);const ut=b.enabled("chart_style_hilo_last_price");class pt extends dt.SeriesHorizontalLinePaneView{constructor(e){super(e),this._lineRendererData.linestyle=Be.LINESTYLE_DOTTED}_updateImpl(){this._lineRendererData.visible=!1;const e=this._series.properties().childs();if(!e.showPriceLine.value())return;if(!ut&&12===e.style.value())return;const t=this._series.lastValueData(void 0,!0);t.noData||(this._lineRendererData.visible=!0,this._lineRendererData.y=t.coordinate,this._lineRendererData.color=this._series.priceLineColor(t.color),this._lineRendererData.linewidth=e.priceLineWidth.value())}}var _t=i(74234),mt=i(16199),gt=i(78201),ft=i(83438),vt=i(15381),St=i(9657),yt=i(36767),bt=i(29639),wt=i(55014),Pt=i(53074),Ct=i(59386);class Tt extends vt.SeriesCandlesPaneView{renderer(e,t){this._invalidated&&(this._updateImpl(null), +this._invalidated=!1);const i=this._source.priceScale();if(!i)return null;const s=this._source.properties().childs().haStyle.childs(),r=this._model.timeScale().barSpacing(),n={bars:this._bars,barSpacing:r,bodyVisible:s.drawBody.value(),borderVisible:s.drawBorder.value(),borderColor:s.borderColor.value(),wickColor:s.wickColor.value(),barWidth:(0,wt.optimalBarWidth)(r),wickVisible:s.drawWick.value(),isPriceScaleInverted:i.isInverted()},o=new bt.CompositeRenderer;return o.append(new Ct.PaneRendererCandles(n)),this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&o.append(new Pt.SelectionRenderer(this._selectionData)),o}}var xt=i(73436),It=i(14224),Mt=i(98799),At=i(2250),Lt=i(89215),kt=i(69145);const Et=b.enabled("price_scale_always_last_bar_value"),Dt=b.enabled("display_data_mode"),Bt=(r.CheckMobile.any(),!b.enabled("hide_series_legend_item")),Vt=b.enabled("hide_price_scale_global_last_bar_value"),Rt=b.enabled("show_average_close_price_line_and_label"),Nt=b.enabled("no_bars_status"),Ot=b.enabled("charting_library_debug_mode"),Ft=b.enabled("chart_style_hilo_last_price"),Wt=(0,a.getLogger)("Chart.Series"),Ht=b.enabled("pre_post_market_sessions");const zt={countdownEnabled:!0,lastPriceAnimationEnabled:!0};function Ut(e,t,i){return void 0===t?null:`${e}=${t} (${i?"changed":"unchanged"})`}function jt(e){const t=e.state();return t.data.forEach((e=>e.value.splice(7,1))),t}class Gt extends l.PriceDataSource{constructor(e,t,i,r){super(e,"_seriesId"),this.requestingIntradayWhenNotSupported=new(Ze()),this.requestingStyleIsNotSupported=new(Ze()),this.requestingStyleSupportRecovered=new(Ze()),this.requestingResolutionLessThanFrequency=new(Ze()),this._paneView=null,this._futureBarsPaneView=null,this._projectionBarsPaneView=null,this._waterlineView=null,this._priceLineView=null,this._gotoDateView=null,this._baseHorizontalLineView=null,this._priceStep=null,this._symbolInfo=null,this._prevSymbolInfo=null,this._isPrePostMarketPricesAvailableProperty=new(_())(!1),this._isBackAdjustmentForbiddenProperty=new(_())(!0),this._isSettlementAsCloseForbiddenProperty=new(_())(!0),this._highLowPriceCache=new Map,this._averagePriceCache=new Map,this._prevClosePriceAxisView=null,this._priceScaleChanged=new(Ze()),this._priceScaleAboutToBeChanged=new(Ze()),this._onRestarted=new(Ze()),this._onStatusChanged=new(Ze()),this._extendedHoursChanged=new(Ze()),this._tagsChanged=new(Ze()),this._intervalChanged=new(Ze()),this._sessionIdChanged=new(Ze()),this._requestMoreDataAvailable=!0,this._lineStyleLastPriceCirclePaneView=new ot(this),this._prevClosePriceLineView=null,this._dataPoweredBy=null,this._loading=!0,this._seriesLoaded=!1,this._status=0,this._symbolResolvingActive=new(Y())(!1),this._predictBars=0,this._syncModel=null,this._data=null,this._lastCompleteFlags=null,this._haStyle={studyId:(0,s.ensureNotNull)((0,m.chartStyleStudyId)(8,!0))},this._renkoStyle={studyId:(0,s.ensureNotNull)((0,m.chartStyleStudyId)(4,!0))},this._pbStyle={studyId:(0,s.ensureNotNull)((0,m.chartStyleStudyId)(7,!0))},this._kagiStyle={ +studyId:(0,s.ensureNotNull)((0,m.chartStyleStudyId)(5,!0))},this._pnfStyle={studyId:(0,s.ensureNotNull)((0,m.chartStyleStudyId)(6,!0))},this._rangeStyle={studyId:(0,s.ensureNotNull)((0,m.chartStyleStudyId)(11,!0))},this._barColorerCache=null,this._boxSizeValue=new(Y()),this._base=100,this._pointValue=1,this._formattingDeps=null,this._formatter=new f.PriceFormatter(this._base),this._ignoreMinMoveFormatter=new f.PriceFormatter(this._base),this._ignoreMinMovePriceStep=null,this._lastBarCloseTime=null,this._onSessionIdPropertyChangedBound=this._onSessionIdPropertyChanged.bind(this),this._ignoreSessionIdProxyPropertyChanges=!1,this._textSourceIsAlwaysTickerRestrictionEnabled=!1,this._lastPriceAnimationActive=!1,this._currentSession="out_of_session",this._onStyleChanged=new(Ze()),this._intervalObj=null,this._obsoleteZOrder=0,this._seriesErrorMessage=null,this._seriesAlwaysFalseHibernatedVW=new(Y())(!1),this._styleToRecover=null,this._precomputedBarStyles=new WeakMap,this._doNotShowLastAvailableBar=!1,this._gotoDateResultCleared=!1,this._endOfDataPaneView=null,this._pendingTimeRange=null,this._replaySubscriber=null,this._symbolIntervalChanged=new(Ze()),this._isReplayResolutionAvailableForUser=null,this._onInReplayStateChanged=new(Ze()),this._replayExitedDueUnsupportedInterval=new(Ze()),this._replayExitedDueUnavailableForUserInterval=new(Ze()),this._onTimeFrameApplied=new(Ze()),this._prevRequestedInterval="",this._isActingAsSymbolSource=new(Y())(!0),this._seriesSource=new lt.SeriesDataSource(e.chartApi(),"s",r);const n=this._seriesSource.dataEvents();n.symbolResolved().subscribe(this,this._onSymbolResolved),n.symbolError().subscribe(this,this._onSymbolError),n.seriesTimeFrame().subscribe(this,this._onSeriesTimeFrame),n.seriesError().subscribe(this,this._onSeriesError),n.loading().subscribe(this,this._onSeriesLoading),n.completed().subscribe(this,this._onSeriesCompleted),n.dataUpdated().subscribe(this,this._onDataUpdated),n.barReceived().subscribe(this,this._onBarReceived),this._quotesProvider=new fe.QuotesProvider,this._quotesProvider.quotesUpdate().subscribe(this,this._onQuotesUpdate);const o=t.childs();if(t.hasChild("extendedHours")){(0,s.ensureDefined)(o.extendedHours).value()&&!t.hasChild("sessionId")&&t.addChild("sessionId",new(_())("extended")),t.removeProperty("extendedHours")}t.hasChild("sessionId")||t.addChild("sessionId",new(_())(g.SubsessionId.Regular)),this._setProperties(t),this._sessionIdProxyProperty=new(_())(o.sessionId.value()),o.sessionId.subscribe(this,(()=>this._updateSessionIdProxyProperty())),this._sessionIdProxyProperty.subscribe(this,this._onSessionIdProxyPropertyChanged),this._symbolTextSourceProxyProperty=new(_()),this._recalcSymbolTextSourceProxyProperty(),o.statusViewStyle.childs().symbolTextSource.subscribe(this,this._recalcSymbolTextSourceProxyProperty),this._symbolTextSourceProxyProperty.subscribe(this,(()=>e.lightUpdate())),this._options=(0,me.merge)((0,me.clone)(zt),i),this._prevChartStyle=o.style.value(),this._priceAxisView=new Me(this,e,{alwaysShowGlobalLast:!Vt, +showCountdown:i.countdownEnabled});let a=null;Et||Vt||(a=new Me(this,e,{visibleOnHistoryOnly:!0,showSymbolLabel:!1,showCountdown:!1,alwaysShowGlobalLast:!1,useSolidBodyColor:!1})),this._priceLinePriceAxisView=new Ae.SeriesPriceLineAxisView(this),this._priceLineAxisViews=[this._priceLinePriceAxisView];const l=new Le(this,e,{showCountdown:i.countdownEnabled});this._priceAxisViews=[this._priceAxisView,l],null!==a&&this._priceAxisViews.push(a),this._panePriceAxisView=new ke.PanePriceAxisView(this._priceAxisView,this,e),this._historyPricePanePriceAxisView=null!==a?new ke.PanePriceAxisView(a,this,e):null,this._projectionPriceAxisView=new ke.PanePriceAxisView(l,this,e),this._labelPaneViews=[this._panePriceAxisView,this._projectionPriceAxisView],null!==this._historyPricePanePriceAxisView&&this._labelPaneViews.push(this._historyPricePanePriceAxisView),this._highLowAvgPaneViews=[],this._averagePaneViews=[],Rt&&this._createAverageViews(),this._createHighLowAvgViews(),this._subscribeRestartToSessionIdChange(),o.visible.subscribe(this,this._updateLastPriceAnimationActive),this._updateLastPriceAnimationActive(),this._dataWindowView=new H(this,e),this._legendView=new q(this,e),this._statusView=new D(this,this._model.properties().childs().scalesProperties.childs().textColor,o.statusViewStyle),this._marketStatusModel=new Q(this._quotesProvider,o.symbol.listeners()),this._dataUpdatedModeModel=Dt?new pe({getter:this.symbolInfo.bind(this),onChange:n.symbolResolved()},{getter:this.status.bind(this),onChange:this._onStatusChanged},{getter:()=>{var e;return null===(e=this._lastCompleteFlags)||void 0===e?void 0:e.rt_update_period},onChange:n.completed()},o.symbol.listeners()):null,this._dataProblemModel=new ge(this._quotesProvider,o.symbol.listeners()),this._symbolResolvingActive.subscribe((()=>e.realignLineTools())),this._intervalChanged.subscribe(this,(()=>e.realignLineTools()))}supportsPressedChunks(){return!0}pressedChunks(e,t){return this.data().pressedChunks(e,t)}seriesErrorMessage(){return this._seriesErrorMessage}destroy(){this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._quotesProvider.destroy(),this._model.timeScale().visibleBarsStrictRangeChanged().unsubscribeAll(this),this._unsubscribeRestartToSessionIdChange(),this._replayExitedDueUnsupportedInterval.destroy(),this._replayExitedDueUnavailableForUserInterval.destroy(),this._onTimeFrameApplied.destroy()}isActingAsSymbolSource(){return this._isActingAsSymbolSource.readonly()}barColorer(){if(this._barColorerCache)return this._barColorerCache;let e=null;const t=this._model.dataSources();for(let i=t.length-1;i>=0;i--){const r=t[i];if((0,Lt.isStudy)(r)&&r.hasBarColorer()&&!r.isSourceHidden()){const t=(0,s.ensureNotNull)(r.barColorer());null===e?e=t:e.pushBackBarColorer(t)}}return null===e?e=new At.SeriesBarColorer(this):e.pushBackBarColorer(new At.SeriesBarColorer(this)),this._barColorerCache=e,e}createPaneView(){this._paneView=null,this._projectionBarsPaneView=null,this._waterlineView=null,this._priceLineView=this.hasClosePrice()?new pt(this):null +;const e=this._properties.childs().style.value();switch(e){case 0:this._paneView=new ft.SeriesBarsPaneView(this,this._model);break;case 1:this._paneView=new vt.SeriesCandlesPaneView(this,this._model);break;case 2:this._paneView=new St.SeriesLinePaneView(this,this._model);break;case 3:this._paneView=new yt.SeriesAreaPaneView(this,this._model);break;case 8:this._paneView=new Tt(this,this._model);break;case 9:this._paneView=new xt.SeriesHollowCandlesPaneView(this,this._model);break;case 13:this._paneView=new gt.SeriesColumnsPaneView(this,this._model);break;case 10:{this._paneView=new It.SeriesBaselinePaneView(this,this._model);const e=this._properties.childs().baselineStyle.childs();this._waterlineView=new _t.SeriesWaterlinePaneView({paneHeight:()=>this.priceScale().height(),color:()=>e.baselineColor.value(),baseLevelPercentage:()=>e.baseLevelPercentage.value()});break}case 12:this._paneView=new mt.SeriesHiLoPaneView(this,this._model)}if(null===this._paneView)throw Error("Unknown chart style assigned: "+e)}properties(){return this._properties}zorder(){return 0}quotesProvider(){return this._quotesProvider}currentSession(){return this._currentSession}syncModel(){if(!this._syncModel){const e=this.symbolInfo(),t=this.interval();if(!e||!t)return null;this._syncModel=new oe(e,t)}return this._syncModel}labelPaneViews(){return this._labelPaneViews}topPaneViews(){const e=[];if(null!==this._gotoDateView&&e.push(this._gotoDateView),this._lastPriceAnimationActive){const t=this._lineStyleLastPriceCirclePaneView;t.animationActive()&&setTimeout((()=>this._model.invalidate(at.InvalidationMask.cursor())),0),t.invalidateStage(),e.push(t)}return 0!==e.length?e:null}paneViews(){if(!this.properties().childs().visible.value())return null;const e=[(0,s.ensureNotNull)(this._baseHorizontalLineView),(0,s.ensureNotNull)(this._paneView)];return this._endOfDataPaneView&&e.push(this._endOfDataPaneView),this._futureBarsPaneView&&e.push(this._futureBarsPaneView),this._projectionBarsPaneView&&e.push(this._projectionBarsPaneView),null!==this._waterlineView&&e.push(this._waterlineView),null!==this._priceLineView&&e.push(this._priceLineView),e.push(...this._highLowAvgPaneViews),e.push(...this._averagePaneViews),e}priceAxisViews(e,t){return e.findTargetPriceAxisViews(this,t,this._priceAxisViews,this._priceLineAxisViews)}clearHighLowPriceCache(){this._highLowPriceCache.clear()}clearAveragePriceCache(){this._averagePriceCache.clear()}priceScaleChanged(){return this._priceScaleChanged}priceScaleAboutToBeChanged(){return this._priceScaleAboutToBeChanged}disconnect(){this._seriesSource.stop(),this._predictBars=0,this._status=0,this._model.isSnapshot()||(this._prevSymbolInfo=null,this._symbolInfo=null)}isStarted(){return this._seriesSource.isStarted()}restart(e=!0){if(5===this._status)return;this._loading=!0,this._lastCompleteFlags=null,this._onRestarted.fire(),this._setStatus(1),this._updateSymbolInfo(null,e);let t=this._properties.childs().interval.value();te.Interval.isEqual(t,this._prevRequestedInterval)&&this._notifyIntervalChanged(t);let i=null +;this._pendingTimeRange&&(i=this._pendingTimeRange,this._pendingTimeRange=null),this._onBeforeModifySeries(this.getSymbolString(),t),this._onTimeFrameApplied.fire(i),t=(0,ht.getServerInterval)(t),this._data=null,this._seriesSource.modifySeries(this._getResolvingSymbolObject(),t,i),this._seriesSource.isStarted()||this._seriesSource.start(),this._prevRequestedInterval=this.interval(),this.updateAllViews((0,Pe.sourceChangeEvent)(this.id())),this._model.lightUpdate()}isSymbolInvalid(){return 4===this._status}getSymbolString(){return(0,Qe.encodeExtendedSymbolOrGetSimpleSymbolString)(this._getSymbolObject())}invalidateBarStylesCache(e){Wt.logDebug("Invalidate style cache starting from "+e),this._clearStylePlot(this.bars(),e),this._clearStylePlot(this.nsBars())}isStatusBad(){return 12===this.status()||4===this.status()||10===this.status()}isStatusError(){return 12===this.status()}actualSymbol(){return(0,m.actualSymbol)(this.symbolInfo(),this.symbol())}proSymbol(){return(0,m.proSymbol)(this.symbolInfo(),this.symbol())}onStyleChanged(){return this._onStyleChanged}style(){return this.properties().childs().style.value()}setStyle(e){this.setSymbolParams({style:e})}isRangeBasedStyle(){return(0,m.isRangeBasedStyle)(this.style())}symbolSameAsCurrent(e){return(0,Je.symbolSameAsCurrent)(e,this.symbolInfo())}status(){return this._status}symbol(){return this.properties().childs().symbol.value()}symbolInfo(){return this._symbolInfo}symbolResolved(){return this.dataEvents().symbolResolved()}symbolResolvingActive(){return this._symbolResolvingActive}symbolHibernated(){return this._seriesAlwaysFalseHibernatedVW}firstValue(){const e=this.firstBar();return null===e?null:this._barFunction(e,0)}firstBar(){const e=this.model().timeScale().visibleBarsStrictRange();if(null===e)return null;const t=e.firstBar(),i=this.data().search(t,d.PlotRowSearchMode.NearestRight);return null!==i?i.value:null}formatter(e=!0){return e?this._formatter:this._ignoreMinMoveFormatter}priceStep(e=!0){return e?this._priceStep:this._ignoreMinMovePriceStep}bars(){return this.data().bars()}nsBars(){return this.data().nsBars()}interval(){return this.properties().childs().interval.value()}setInterval(e){this.setSymbolParams({interval:e})}intervalObj(){const e=this.interval();if(null!==this._intervalObj&&this._intervalObj.resolutionString===e)return this._intervalObj.interval;const t=te.Interval.parse(e);return this._intervalObj={resolutionString:e,interval:t},t}prevClose(){const e=this.priceScale();if(e.isEmpty()||this.data().isEmpty())return null;const t=this.quotes(),i=this.firstValue();if(null===t||null===i)return null;const s=t.prev_close_price;return void 0===s?null:{coordinate:e.priceToCoordinate(s,i),floatCoordinate:e.priceToCoordinate(s,i),formattedPricePercentage:e.formatPricePercentage(s,i,!0),formattedPriceAbsolute:e.formatPriceAbsolute(s),formattedPriceIndexedTo100:e.formatPriceIndexedTo100(s,i)}}priceLineColor(e){return this.properties().childs().priceLineColor.value()||e}hasClosePrice(){return Ft||12!==this.properties().childs().style.value()} +lastValueData(e,t,i){var s;const r={noData:!0},n=this.priceScale();if(this.model().timeScale().isEmpty()||n.isEmpty()||this.data().isEmpty())return r;const o=this.model().timeScale().visibleBarsStrictRange(),a=this.firstValue();if(null===o||null===a)return r;let l,c;if(t){const e=this.data().bars().last();if(null===e)return r;l=e.value,c=e.index}else{const e=this.data().bars().search(o.lastBar(),d.PlotRowSearchMode.NearestLeft);if(null===e)return r;l=e.value,c=e.index}const h=null!==(s=void 0!==e?l[e]:this._barFunction(l,2))&&void 0!==s?s:NaN,u=this.barColorer().barStyle(c,!1),p=n.priceToCoordinate(h,a),_={...n.getFormattedValues(h,a,!0),noData:!1,color:u.barColor,floatCoordinate:p,coordinate:p,index:c};return i&&(_.price=h),_}isDWM(){return this.intervalObj().isDWM()}data(){var e;return null!==(e=this._data)&&void 0!==e?e:this._seriesSource.data()}clearData(){(0,s.assert)(null===this._data,"Cannot clear loaded data"),this._seriesSource.clearData()}nearestValue(e,t,i){var s;const r=this.nearestData(e,i);return null!==(s=null==r?void 0:r.value[t])&&void 0!==s?s:void 0}onSymbolIntervalChanged(){return this._symbolIntervalChanged}onIntervalChanged(){return this._intervalChanged}onStatusChanged(){return this._onStatusChanged}onRestarted(){return this._onRestarted}onExtendedHoursChanged(){return this._extendedHoursChanged}requestMoreData(e){if(3!==this._status&&7!==this._status&&8!==this._status&&9!==this._status&&6!==this._status&&11!==this._status)return;if(this._model.timeScale().isEmpty())return;const t=this._model.timeScale().visibleBarsStrictRange();if(null===t)return;if(0===this.bars().size())return;const i=t.lastBar()-(0,s.ensureNotNull)(this.data().last()).index;if(this._predictBarst.update(e))),this._highLowAvgPaneViews.forEach((t=>t.update(e))),this._labelPaneViews.forEach((t=>t.update(e))),this._priceAxisViews.forEach((t=>t.update(e))),this._priceLineAxisViews.forEach((t=>t.update(e))),null===(i=this._futureBarsPaneView)||void 0===i||i.update(e),null===(s=this._projectionBarsPaneView)||void 0===s||s.update(e),null===(r=this._waterlineView)||void 0===r||r.update(e),null===(n=this._priceLineView)||void 0===n||n.update(e),null===(o=this._gotoDateView)||void 0===o||o.update(e),null===(a=this._endOfDataPaneView)||void 0===a||a.update(e),null===(l=this._baseHorizontalLineView)||void 0===l||l.update(e);const c=this._model.activeStrategySource().value();null==c||c.updateAllViews(e),this._lineStyleLastPriceCirclePaneView.update(e)}barFunction(){return this._barFunction}precomputedBarStyle(e){return this._precomputedBarStyles.get(e)}setPrecomputedBarStyle(e,t){this._precomputedBarStyles.set(e,t)}setSymbolParams(e){const{symbol:t,currency:i,unit:r,style:n}=e;let o=e.interval;const a=this.properties().childs(),l=this._symbolInfo;let c,h,d;if(null!==l?(c=void 0!==t&&!(0,Je.symbolSameAsCurrent)(t,l),h=void 0!==i&&!(0,Je.currenciesAreSame)(i,l),d=void 0!==r&&!(0,Je.unitsAreSame)(r,l,this._model.unitConversionEnabled())):(c=void 0!==t&&t!==a.symbol.value(),h=void 0!==i&&i!==a.currencyId.value(),d=void 0!==r&&r!==a.unitId.value()),void 0!==o&&!c){const e=this.getSupportedResolution(o,!1);e!==o&&(Wt.logWarn(`Change interval value from ${o} to ${e} because first is not supported`),o=e)} +const u=void 0!==o&&!te.Interval.isEqual(a.interval.value(),o),p=void 0!==n&&n!==a.style.value(),_=[Ut("symbol",t,c),Ut("interval",o,u),Ut("currency",i,h),Ut("unit",r,d),Ut("style",n,p)].filter((e=>null!==e)).join("; ");Wt.logInfo(`Applying series symbol params: ${_}`),void 0!==t&&a.symbol.setValue(t),void 0!==i&&a.currencyId.setValue(i),void 0!==r&&a.unitId.setValue(r),u&&a.interval.setValue((0,s.ensureDefined)(o)),p&&a.style.setValue(n);let m=!1;if(p){m=this.isNeedRestart();const e=!c&&(h||d);this.onChartStyleChanged(e)}!m&&(c||u||h||d)&&this._applySymbolParamsChanges({symbolChanged:c,currencyChanged:h,unitChanged:d,intervalChanged:u,styleChanged:p}),(c||h||d)&&this.model().checkLineToolSelection()}setSymbol(e){this.setSymbolParams({symbol:e})}currency(){return this.properties().childs().currencyId.value()||null}setCurrency(e){this.setSymbolParams({currency:e})}isConvertedToOtherCurrency(){return(0,m.isConvertedToOtherCurrency)(this.symbolInfo())}unit(){return this.properties().childs().unitId.value()||null}setUnit(e){this.setSymbolParams({unit:e})}measureUnitId(){return(0,m.measureUnitId)(this.symbolInfo())}isConvertedToOtherUnit(){return(0,m.isConvertedToOtherUnit)(this.symbolInfo(),this._model.unitConversionEnabled())}symbolSource(){return this}barsProvider(){return this}title(){return this.symbolTitle()}name(){return this.symbolTitle()}symbolTitle(e,t,i="exchange"){let s=this.properties().childs().symbol.value();const r=this.symbolInfo();if(null!==r){const{type:t}=r;s=(0,m.symbolTitle)(r,e,"forex"===t?"exchange":i)}return t?s:`${s}, ${(0,C.translatedIntervalString)(this.properties().childs().interval.value())}`}setObsoleteZOrder(e){this._obsoleteZOrder=e}obsoleteZOrder(){return this._obsoleteZOrder}valuesProvider(){return new U(this,this.model())}statusProvider(e){return new L(this,this._model.properties().childs().scalesProperties.childs().textColor,this.properties().childs().statusViewStyle,e)}open(e){const t=this.data().valueAt(e);return t&&t[1]}high(e){const t=this.data().valueAt(e);return t&&t[2]}low(e){const t=this.data().valueAt(e);return t&&t[3]}close(e){const t=this.data().valueAt(e);return t&&t[4]}moveItem(e,t,i){if(10===this.style()&&0===t){const t=this.priceScale(),i=this.properties().childs().baselineStyle,s=t.height(),r=100-e.y/s*100,n=r<0?0:Math.round(10*r)/10;i.childs().baseLevelPercentage.setValue(Math.max(Math.min(n,100),0))}}rerequestData(){this._applySymbolParamsChanges({force:!0})}switchToReplay(e,t){throw new Error("Not implemented")}switchToRealtime(){throw new Error("Not implemented")}requestMoreDataAvailable(){return this._requestMoreDataAvailable}seriesLoaded(){return this._seriesLoaded}endOfData(){var e;return void 0!==(null===(e=this._lastCompleteFlags)||void 0===e?void 0:e.data_completed)}endOfDataType(){var e,t;return null!==(t=null===(e=this._lastCompleteFlags)||void 0===e?void 0:e.data_completed)&&void 0!==t?t:null}dataPoweredBy(){return null}boxSizeValue(){return this._boxSizeValue}isUserDeletable(){return!1}changeTimeFrame(){(0,n.trackEvent)("GUI","Change timeframe")} +onTagsChanged(){return this._tagsChanged}state(e){var t;const i=this.obsoleteZOrder();let s={type:"MainSeries",id:this.id(),zorder:i,haStyle:this._haStyle,renkoStyle:this._renkoStyle,pbStyle:this._pbStyle,kagiStyle:this._kagiStyle,pnfStyle:this._pnfStyle,rangeStyle:this._rangeStyle,formattingDeps:this._formattingDeps};const r=this.properties().state();if((null===(t=this._symbolInfo)||void 0===t?void 0:t.ticker)&&(r.symbol=this._symbolInfo.ticker),this._model.unitConversionEnabled()||(r.unitId=null),s.state=r,e){let e=this.bars();const t=this._model.timeScale().visibleExtendedDataRange(e,0);null!==t&&(e=e.range(t.firstBar(),t.lastBar())),s={...s,bars:jt(e),nsBars:jt(this.nsBars()),symbolInfo:this._symbolInfo,rtPrice:this.data().lastProjectionPrice,boxSize:this.data().boxSize,reversalAmount:this.data().reversalAmount}}return s}restoreState(e,t){if(t&&this._setStatus(5),!this._model.unitConversionEnabled()&&e.state&&delete e.state.unitId,this._properties.mergeAndFire(e.state),this._properties.hasChild("esdBreaksStyle")&&this._properties.removeProperty("esdBreaksStyle"),this._prevChartStyle=this.properties().childs().style.value(),this.createPaneView(),t){const t=e;this.restoreData(t.bars,t.nsBars,t.symbolInfo,t.rtPrice,t.boxSize,t.reversalAmount)}e.formattingDeps&&(this._formattingDeps=e.formattingDeps,this._recreatePriceFormattingDependencies())}restoreData(e,t,i,s,r,n){this._status=5,this._data=new c.SeriesData,this._data.bars().restoreState(e),this._data.nsBars().restoreState(t),this._updateSymbolInfo(i,!1),this._data.lastProjectionPrice=s,this._data.boxSize=r;const o=this.properties().childs();r||(6===o.style.value()?this._data.boxSize=o.pnfStyle.childs().inputs.childs().boxSize.value():4===o.style.value()&&(this._data.boxSize=o.renkoStyle.childs().inputs.childs().boxSize.value())),this._data.reversalAmount=n,n||5===o.style.value()&&(this._data.reversalAmount=o.kagiStyle.childs().inputs.childs().reversalAmount.value()),this._loading=!1}async setGotoDateResult(e,t){this._gotoDateResultCleared=!1;const s=await i.e(4079).then(i.bind(i,90225));this._gotoDateResultCleared||(this._gotoDateView=new s.GotoDateView(this,e,t),this._gotoDateView.doNotShowLastAvailableBar(this._doNotShowLastAvailableBar),this._model.updateSource(this))}clearGotoDateResult(){this._gotoDateView=null,this._gotoDateResultCleared=!0}doNotShowLastAvailableBar(e){var t;this._doNotShowLastAvailableBar=e,null===(t=this._gotoDateView)||void 0===t||t.doNotShowLastAvailableBar(e)}dataUpdated(){return this.dataEvents().dataUpdated()}getSupportedResolution(e,t=!0){if(null===this._symbolInfo||!(0,Je.symbolSameAsCurrent)(this.symbol(),this._symbolInfo))return e;if(te.Interval.isRange(e)&&(0,m.isCloseBasedSymbol)(this._symbolInfo)){const t=this.interval();if(!te.Interval.isRange(t))return t;e="1D"}const i=this._symbolInfo.data_frequency;if(void 0!==i){let s=(0,ht.getApplicableIntervalForFrequency)(i,e);if(s!==e){this._model.defaultResolutions();return t&&this.requestingResolutionLessThanFrequency.fire(i,s),s}} +if(te.Interval.isIntraday(e)&&!this._symbolInfo.has_intraday)return t&&this.requestingIntradayWhenNotSupported.fire(),"D";if(this._symbolInfo.hasOwnProperty("supported_resolutions")){const t=te.Interval.normalize(e),i=this._symbolInfo.supported_resolutions;if(null!==t&&-1===i.indexOf(t))return i[0]}return e}_barsState(e){const t=e.state();return t.data.forEach((e=>e.value.splice(7,1))),t}_updateBarFunction(){this._barFunction=(0,Mt.barFunctionByStyle)(this.style(),this.priceSource())}_setProperties(e){e.hasChild("timeframe")||e.merge({timeframe:""}),e.hasChild("shortName")||e.merge({shortName:""}),e.hasChild("currencyId")||e.addChild("currencyId",new(_())(null)),e.hasChild("unitId")||e.addChild("unitId",new(_())(null)),this._properties=e;const t=e.childs();t.currencyId.subscribe(this,this._onCurrencyChanged),t.unitId.subscribe(this,this._onUnitChanged),t.timeframe.subscribe(this,this.changeTimeFrame),e.subscribe(this,this._onPropertiesChanged)}_updateSessionIdProxyProperty(e){const t=this._properties.childs().sessionId.value();let i=t;if(e){const e=this.symbolInfo();null!==e&&(i=e.subsession_id||t)}this._ignoreSessionIdProxyPropertyChanges=!0,this._sessionIdProxyProperty.setValue(i),this._ignoreSessionIdProxyPropertyChanges=!1}_onSessionIdProxyPropertyChanged(){this._ignoreSessionIdProxyPropertyChanges||this._properties.childs().sessionId.setValue(this._sessionIdProxyProperty.value()),this._updateLastPriceAnimationActive()}_onSymbolResolved(e){this._seriesErrorMessage=null,this._updateSymbolInfo(e,!1),this._model.updateSource(this),this._model.onWidget()||((0,n.trackEvent)("Symbol",e.listed_exchange,e.name),(0,n.trackEvent)("Symbol Type",e.type,e.listed_exchange));const t=e.minmov/e.pricescale,i=this.properties().childs();4===i.style.value()&&i.renkoStyle.childs().inputs.childs().boxSize.value(){e[t]=i[t].toString()})),t=t.format(e)}Ot&&Wt.logNormal("Error reason: "+t),this._seriesErrorMessage=t +;const s="unknown_symbol"!==t?12:Nt&&this._symbolInfo?10:4;this._setStatus(s),this._seriesLoaded=!0,this._enablePriceRangeReady()}_onSeriesLoading(e){this._loading=!0,this._setStatus(2)}_onDataUpdated(e,t){t?this._requestMoreDataAvailable=!0:this._lastPriceAnimationActive&&this._seriesLoaded&&this._lineStyleLastPriceCirclePaneView.update((0,Pe.sourceChangeEvent)(this.id())),this._lastBarCloseTime=e&&e.closeTime||null,this._boxSizeValue.setValue(this.data().boxSize),this._statusView.update(),this.clearAveragePriceCache(),this.clearHighLowPriceCache();const i=this.model(),r=(0,s.ensureNotNull)(i.paneForSource(this));i.recalculatePane(r,(0,Pe.sourceChangeEvent)({sourceId:this.id(),realtime:!t})),i.updateSource(this)}_setStatus(e){this._status=e,this._statusView.update(),this.model().updateSource(this),this._onStatusChanged.fire()}_onBarReceived(e){this.model().recalcVisibleRangeStudies(!0)}_recreateFormatter(){var e,t,i;let s=null;s=null!==(t=null===(e=null===kt.customFormatters||void 0===kt.customFormatters?void 0:kt.customFormatters.priceFormatterFactory)||void 0===e?void 0:e.call(kt.customFormatters,this.symbolInfo(),this.properties().childs().minTick.value()))&&void 0!==t?t:null,null!==s?(this._formatter=s,this._ignoreMinMoveFormatter=s):(this._formatter=(0,m.createSeriesFormatter)(null!==(i=this.symbolInfo())&&void 0!==i?i:this._formattingDeps,this.properties().childs().minTick.value()),this._ignoreMinMoveFormatter=(0,m.createSeriesFormatter)(this.symbolInfo(),this.properties().childs().minTick.value(),!0)),this.priceScale()&&this.priceScale().updateFormatter(),this._formatterChanged.fire()}_recreatePriceStep(){const{minMove:e,priceScale:t}=(0,m.getSeriesPriceFormattingState)(this.symbolInfo()),i=e/t;this._ignoreMinMovePriceStep=1/t,this._priceStep!==i&&(this._priceStep=i,this._priceStepChanged.fire())}_recreatePriceFormattingDependencies(){this._recreateFormatter(),this._recreatePriceStep()}_onQuotesUpdate(e,t){void 0!==e.values.current_session&&e.values.current_session!==this._currentSession&&(this._currentSession=e.values.current_session,this._updateLastPriceAnimationActive())}_updateIsPrePostMarketPricesForbiddenProperty(){const e=(0,m.symbolHasPreOrPostMarket)(this._symbolInfo)&&(this.isDWM()||(0,m.isRegularSessionId)(this.sessionIdProxyProperty().value()));this._isPrePostMarketPricesAvailableProperty.setValue(e)}_updateSettlementAsCloseForbiddenProperty(){}_updateBackAdjustmentForbiddenProperty(){}_removeReplaySubscriber(){throw new Error("Not implemented")}_getSymbolForApi(){return(0,m.symbolForApi)(this.symbolInfo()||this._prevSymbolInfo,this.symbol())}_getSymbolObject(){const e=this._getExtendedSymbolObject();if(v.SYMBOL_STRING_DATA.hasOwnProperty(this.properties().childs().style.value())){return{symbol:e,type:this.styleStudyInfo(this.getStyleShortName()+"Style").studyId+"!",inputs:this.getInputsProperties().state()}}return e}_getExtendedSymbolObject(){const e={symbol:this._getSymbolForApi()},t=this.properties().childs();null!==this.currency()&&(e["currency-id"]=this.currency());const i=this.unit() +;return this._model.unitConversionEnabled()&&null!==i&&(e["unit-id"]=i),!this.isDWM()&&Ht&&(e.session=t.sessionId.value()),e}_checkChartStyle(){const e=this.style();(0,m.isCloseBasedSymbol)(this.symbolInfo())?(0,m.isSingleValueBasedStyle)(e)||(this.requestingStyleIsNotSupported.fire(),this._styleToRecover={correctedStyle:this.style(),originalStyle:e}):null!==this._styleToRecover&&(this.requestingStyleSupportRecovered.fire(this._styleToRecover.originalStyle),this._styleToRecover=null)}_updateSymbolInfo(e,t){if(this._prevSymbolInfo=t?this._symbolInfo:null,this._symbolInfo=e,e){const t=this._properties.childs();t.shortName.setValue(e.name);const i=(0,m.extractSymbolNameFromSymbolInfo)(e,this.symbol());i&&t.symbol.setValue(i);const s=(0,m.symbolCurrency)(e),r=(0,m.symbolUnit)(e,this._model.unitConversionEnabled());"alwaysOff"===(0,ee.currencyUnitVisibilityProperty)().value()||s===t.currencyId.value()&&r===t.unitId.value()||this._model.fullUpdate(),t.currencyId.setValue(s),t.unitId.setValue(r),this._updateSessionIdProxyProperty(!0)}this._base=e?e.pricescale/e.minmov:100,this._pointValue=e&&e.pointvalue||1;const i=this._getSymbolForApi();this._quotesProvider.setQuotesSessionSymbol(i),this._marketStatusModel.setSymbolInfo(e),e&&this._recreatePriceFormattingDependencies(),this._statusView.update(),this.priceScale().updateFormatter(),this._symbolResolvingActive.setValue(!e),Ht&&this._updateIsPrePostMarketPricesForbiddenProperty()}_createHighLowAvgViews(){const e=this.properties().childs().highLowAvgPrice,t=this._getHighLowPrice.bind(this),i=function(e,t,i,s){const r=i.childs(),n=ze(e,t,{label:We,labelVisible:r.highLowPriceLabelsVisible,lineVisible:r.highLowPriceLinesVisible,lineColor:r.highLowPriceLinesColor,lineWidth:r.highLowPriceLinesWidth},(()=>s(0))),o=ze(e,t,{label:He,labelVisible:r.highLowPriceLabelsVisible,lineVisible:r.highLowPriceLinesVisible,lineColor:r.highLowPriceLinesColor,lineWidth:r.highLowPriceLinesWidth},(()=>s(1)));return{paneViews:[n.paneView,o.paneView],panePriceAxisViews:[n.panePriceAxisView,o.panePriceAxisView],priceAxisViews:[n.priceAxisView,o.priceAxisView],priceLineAxisViews:[n.priceLineAxisView,o.priceLineAxisView]}}(this._model,this,e,t);this._highLowAvgPaneViews.push(...i.paneViews),this._labelPaneViews.push(...i.panePriceAxisViews),this._priceAxisViews.push(...i.priceAxisViews),this._priceLineAxisViews.push(...i.priceLineAxisViews)}_createAverageViews(){const e=this.properties().childs().highLowAvgPrice,t=this._getAveragePrice.bind(this),i=Ke(this._model,this,e,t);this._averagePaneViews.push(...i.paneViews),this._labelPaneViews.push(...i.panePriceAxisViews),this._priceAxisViews.push(...i.priceAxisViews),this._priceLineAxisViews.push(...i.priceLineAxisViews)}_getHighLowPrice(e){if(!this._highLowPriceCache.has(e)){const e=this._model.timeScale().visibleBarsStrictRange();if(null===e)return null;const t=function(e,t,i){return e.minMaxOnRangeCached(t,i,[{name:"low",offset:0},{name:"high",offset:0}])}(this._model.mainSeries().bars(),e.firstBar(),e.lastBar());if(null===t)return null +;this._highLowPriceCache.set(1,t.min),this._highLowPriceCache.set(0,t.max)}return this._highLowPriceCache.get(e)}_getAveragePrice(e){if(!this._averagePriceCache.has(e)){const e=this._model.timeScale().visibleBarsStrictRange();if(null===e)return null;const t=function(e,t,i){0;const s=(0,c.barFunction)("close");let r=0,n=0;for(let o=t;o<=i;o++){const t=e.valueAt(o);null!==t&&(r+=s(t),n++)}return n?r/n:null}(this._model.mainSeries().bars(),e.firstBar(),e.lastBar());if(null===t)return null;this._averagePriceCache.set(0,t)}return this._averagePriceCache.get(e)}_onSeriesCompleted(e){var t;this._loading=!1,this._seriesErrorMessage=null;let i=e.updateMode;switch("pulsed"===i&&(i="delayed"),i){case"streaming":this._setStatus(3);break;case"endofday":this._setStatus(6);break;case"delayed":this._setStatus(8);break;case"replay":this._setStatus(11)}i.match(/delayed_streaming/)&&this._setStatus(9),this._lastCompleteFlags=null!==(t=e.flags)&&void 0!==t?t:null;const r=(0,s.ensureNotNull)(this._model.paneForSource(this));r.recalculatePriceScale(this.priceScale(),(0,Pe.sourceChangeEvent)(this.id()));const n=at.InvalidationMask.full();null!==this._model.appliedTimeFrame().value()&&n.lockVisibleTimeRangeOnResize(),this._model.invalidate(n),this.model().recalcVisibleRangeStudies(!0),this.model().recalcStudyBasedLineTools(),!this.priceScale().isLockScale()||this.model().timeScale().isEmpty()||this._seriesLoaded||(this.model().timeScale().correctOffset(),this.model().timeScale().correctBarSpacing(),this.model().resetPriceScale(r,this.priceScale())),this._seriesLoaded=!0,this._enablePriceRangeReady()}_notifyIntervalChanged(e){var t,i;const s={timeframe:null!==(t=this._pendingTimeRange)&&void 0!==t?t:void 0};this._intervalChanged.fire(e,s),this._pendingTimeRange=null!==(i=s.timeframe)&&void 0!==i?i:null}_onCurrencyChanged(){this._currencyChanged.fire()}_onUnitChanged(){this._unitChanged.fire()}_applySymbolParamsChanges(e){this._lastCompleteFlags=null,this.clearGotoDateResult();const t=this.interval();this.currency(),this.unit();te.Interval.isRange(t)&&this._properties.childs().rangeStyle.childs().inputs.childs().range.setValue(te.Interval.parse(t).multiplier());const{symbolChanged:i,intervalChanged:s,currencyChanged:r,unitChanged:n,force:o}=e,a=Ht&&s&&te.Interval.parse(t).isDWM()!=te.Interval.parse(t).isDWM();if(this._syncModel=null,this._prevRequestedInterval=t,5!==this._status&&(!this._seriesSource.isStarted()||i||r||n||a)&&this._updateSymbolInfo(null,!i&&(r||n)),5===this._status)return void this._model.realignLineTools();this._loading=!0,this._setStatus(1),Ht&&this._updateIsPrePostMarketPricesForbiddenProperty(),this._symbolIntervalChanged.fire(),s&&this._notifyIntervalChanged(t),this._onRestarted.fire(),this._seriesLoaded=!1,this._lineStyleLastPriceCirclePaneView.stopAnimation();let l=null;this._pendingTimeRange&&(l=this._pendingTimeRange,this._pendingTimeRange=null),this._onTimeFrameApplied.fire(l),this._onBeforeModifySeries(this.getSymbolString(),t),this._data=null,this._seriesSource.modifySeries(this._getResolvingSymbolObject(),(0, +ht.getServerInterval)(t),l,o),this._seriesSource.isStarted()||(this._predictBars=0,this._seriesSource.start()),(i||r||n)&&this.disablePriceRangeReady(),this.updateAllViews((0,Pe.sourceChangeEvent)(this.id())),this._model.lightUpdate()}_isIntervalSupported(e){return!0}_onBeforeModifySeries(e,t){0}_getResolvingSymbolObject(){return this._getSymbolObject()}_onSessionIdPropertyChanged(){this._sessionIdChanged.fire(),this.isDWM()||(this.restart(),this._updateLastPriceAnimationActive())}_subscribeRestartToSessionIdChange(){this.properties().childs().sessionId.subscribe(this,this._onSessionIdPropertyChangedBound)}_unsubscribeRestartToSessionIdChange(){this.properties().childs().sessionId.unsubscribe(this,this._onSessionIdPropertyChangedBound)}_updateLastPriceAnimationActive(){if(!this._options.lastPriceAnimationEnabled)return;const e=this._lastPriceAnimationActive,t=this.properties().childs(),i=t.style.value();if(this._model.isSnapshot()||!t.visible.value()||3!==i&&10!==i&&2!==i)this._lastPriceAnimationActive=!1;else{const e=this.currentSession(),t=!(0,m.isRegularSessionId)(this.sessionIdProxyProperty().value())&&!this.isDWM();this._lastPriceAnimationActive="market"===e||t&&("pre_market"===e||"post_market"===e)}this._lastPriceAnimationActive&&e!==this._lastPriceAnimationActive&&this.model().invalidate(at.InvalidationMask.cursor())}_onPropertiesChanged(e){const t=this._properties.childs();e!==t.symbol&&e!==t.interval&&e!==t.timeframe&&(this._tagsChanged.fire(),this.createPaneView(),this.updateAllViews((0,Pe.sourceChangeEvent)(this._id)),this.model().updateSource(this),(0,o.emit)("series_properties_changed",this._id))}_recalcSymbolTextSourceProxyProperty(){this._textSourceIsAlwaysTickerRestrictionEnabled?this._symbolTextSourceProxyProperty.setValue("ticker"):this._symbolTextSourceProxyProperty.setValue(this._properties.childs().statusViewStyle.childs().symbolTextSource.value())}_clearStylePlot(e,t){if(0===e.size())return;if(void 0===t&&e!==this.nsBars())return void(this._precomputedBarStyles=new WeakMap);const i=null!=t?t:(0,s.ensureNotNull)(e.firstIndex()),r=(0,s.ensureNotNull)(e.lastIndex())+1;e.range(i,r).each(((e,t)=>(this._precomputedBarStyles.delete(t),!1)))}}},77906:(e,t,i)=>{"use strict";i.r(t),i.d(t,{STATUS_OFFLINE:()=>s,STATUS_RESOLVING:()=>r,STATUS_LOADING:()=>n,STATUS_READY:()=>o,STATUS_INVALID_SYMBOL:()=>a,STATUS_SNAPSHOT:()=>l,STATUS_EOD:()=>c,STATUS_PULSE:()=>h,STATUS_DELAYED:()=>d,STATUS_DELAYED_STREAMING:()=>u,STATUS_NO_BARS:()=>p,STATUS_REPLAY:()=>_,STATUS_ERROR:()=>m,SERIES_STATUS_TEXT:()=>g,STYLE_LINE_TYPE_MARKERS:()=>f,STYLE_LINE_TYPE_STEP:()=>v,STYLE_LINE_TYPE_SIMPLE:()=>S,STYLE_BARS:()=>y,STYLE_CANDLES:()=>b,STYLE_LINE:()=>w,STYLE_AREA:()=>P,STYLE_RENKO:()=>C,STYLE_KAGI:()=>T,STYLE_PNF:()=>x,STYLE_PB:()=>I,STYLE_HEIKEN_ASHI:()=>M,STYLE_HOLLOW_CANDLES:()=>A,STYLE_BASELINE:()=>L,STYLE_RANGE:()=>k,STYLE_HILO:()=>E,STYLE_COLUMNS:()=>D,STYLE_SHORT_NAMES:()=>B,SYMBOL_STRING_DATA:()=>V});const s=0,r=1,n=2,o=3,a=4,l=5,c=6,h=7,d=8,u=9,p=10,_=11,m=12,g={[s]:"connecting",[r]:"loading",[n]:"loading",[o]:"realtime", +[a]:"invalid",[l]:"snapshot",[c]:"endofday",[h]:"endofday",[d]:"delayed",[u]:"delayed_streaming",[p]:"forbidden",[_]:"replay",[m]:"error"},f=0,v=1,S=2,y=0,b=1,w=2,P=3,C=4,T=5,x=6,I=7,M=8,A=9,L=10,k=11,E=12,D=13,B={0:"bar",1:"candle",9:"hollowCandle",2:"line",3:"area",4:"renko",7:"pb",5:"kagi",6:"pnf",8:"ha",10:"baseline",11:"range",12:"hilo",13:"column"},V={4:{type:"BarSetRenko@tv-prostudies",basicStudyVersion:64},7:{type:"BarSetPriceBreak@tv-prostudies",basicStudyVersion:34},5:{type:"BarSetKagi@tv-prostudies",basicStudyVersion:34},6:{type:"BarSetPnF@tv-prostudies",basicStudyVersion:34},8:{type:"BarSetHeikenAshi@tv-basicstudies",basicStudyVersion:60},11:{type:"BarSetRange@tv-basicstudies",basicStudyVersion:72}}},22770:(e,t,i)=>{"use strict";i.d(t,{seriesPlotFunctionMap:()=>c,barFunction:()=>h,SeriesData:()=>p});var s,r=i(50151),n=i(88552),o=i(93975);!function(e){e[e.FromLeft=-1]="FromLeft",e[e.FromRight=1]="FromRight"}(s||(s={}));const a={open:e=>e[1],high:e=>e[2],low:e=>e[3],close:e=>e[4],hl2:e=>(e[2]+e[3])/2,hlc3:e=>(e[2]+e[3]+e[4])/3,ohlc4:e=>(e[1]+e[2]+e[3]+e[4])/4},l=["open","high","low","close","hl2","hlc3","ohlc4"];function c(){const e=new Map;return l.forEach(((t,i)=>{e.set(t,h(t))})),e}function h(e,t,i){const s=a[null!=t?t:e],r=a[e],n=a[null!=i?i:e];return(e,t)=>{switch(t){case 0:return s(e);case 2:return n(e);default:return r(e)}}}function d(e,t){return null==e[t]}const u=[{barsToMerge:10,forBarspacingLargerThen:.03},{barsToMerge:30,forBarspacingLargerThen:.01},{barsToMerge:100,forBarspacingLargerThen:.003},{barsToMerge:500,forBarspacingLargerThen:0}];class p{constructor(){this._pressedChunks={chunks:new Map,priceSource:"uninitialized"},this.m_bars=new n.PlotList(c(),d),this.m_nsBars=new n.PlotList(c(),d),this._clearPressedChunks()}bars(){return this.m_bars}nsBars(){return this.m_nsBars}pressedChunks(e,t){if(t!==this._pressedChunks.priceSource){this._pressedChunks.priceSource=t;const e=this.m_bars.first();e&&(this._clearPressedChunks(),this._rebuildPressedChunks(e))}const i=(0,r.ensureDefined)(u.find((t=>t.forBarspacingLargerThen<=e)));return(0,r.ensureDefined)(this._pressedChunks.chunks.get(i.barsToMerge))}mergeRegularBars(e){const t=this.m_bars.size(),i=this.m_bars.merge(e);return i&&"uninitialized"!==this._pressedChunks.priceSource&&(t===this.m_bars.size()&&i.index===this.m_bars.lastIndex()?this._updateLatestChunks():this._rebuildPressedChunks(i)),i}size(){return this.m_bars.size()+this.m_nsBars.size()}each(e){this.m_bars.each(e),this.m_nsBars.each(e)}clear(){this.m_bars.clear(),this.m_nsBars.clear(),this.lastProjectionPrice=void 0,this._clearPressedChunks()}isEmpty(){return this.m_bars.isEmpty()&&this.m_nsBars.isEmpty()}first(){return this.m_bars.isEmpty()?this.m_nsBars.first():this.m_bars.first()}last(){return this.m_nsBars.isEmpty()?this.m_bars.last():this.m_nsBars.last()}search(e,t){return this.nsBars().isEmpty()?this.bars().search(e,t):this.bars().isEmpty()||(0,r.ensureNotNull)(this.nsBars().firstIndex())<=e?this.nsBars().search(e,t):this.bars().search(e,t)}valueAt(e){const t=this.search(e) +;return null!==t?t.value:null}plotValueToTimePointIndex(e,t,i){if(i===s.FromRight){const i=(i,s)=>{const r=s[t];return null!=r&&e>=r},s=this.m_bars.findLast(i);if(null!==s)return s.index;const r=this.m_nsBars.findLast(i);return null!==r?r.index:this.m_bars.firstIndex()}if(i===s.FromLeft){const i=(i,s)=>{const r=s[t];return null!=r&&e<=r},s=this.m_bars.findFirst(i);if(null!==s)return s.index;const r=this.m_nsBars.findFirst(i);return null!==r?r.index:this.m_bars.lastIndex()}throw new Error("plotValueToTimePointIndex: unsupported search mode")}moveData(e){this.m_bars.move(e),this.m_nsBars.move(e),this.m_bars.size()>0&&this._rebuildPressedChunks((0,r.ensureNotNull)(this.m_bars.first()))}_rebuildPressedChunks(e){const t=this._pressedChunks.priceSource;if("uninitialized"===t)return;const i=e.index,s=a[t],n=(e,t,i)=>{let r=null;for(;e.hasNext();){const n=e.next(),o=s(n.value);r&&n.index-r.startTime>=i.barsToMerge&&(t.push(r),r=null),r?(r.endTime=n.index,r.high=Math.max(r.high,o),r.low=Math.min(r.low,o),r.close=o):r={startTime:n.index,endTime:n.index,open:o,high:o,low:o,close:o}}r&&t.push(r)};u.forEach((e=>{const t=(0,r.ensureDefined)(this._pressedChunks.chunks.get(e.barsToMerge)),s=(0,o.lowerbound)(t,i,((e,t)=>e.endTime0){const i=t[0].startTime-1,s=(0,r.ensureNotNull)(this.m_bars.firstIndex()),o=this.m_bars.rangeIterator(s,i),a=[];n(o,a,e);const l=a.concat(t);this._pressedChunks.chunks.set(e.barsToMerge,l)}else{const i=(0,r.ensureNotNull)(this.m_bars.lastIndex());t.splice(s);let o=(0,r.ensureNotNull)(this.m_bars.firstIndex());t.length&&(o=t[t.length-1].endTime+1);const a=this.m_bars.rangeIterator(o,i);n(a,t,e)}}))}_updateLatestChunks(){const e=(0,r.ensureNotNull)(this.m_bars.lastIndex());u.forEach((t=>{const i=(0,r.ensureDefined)(this._pressedChunks.chunks.get(t.barsToMerge)),s=this.m_bars.rangeIterator(e,e).next(),n=s.value[4],o=i[i.length-1];o.high=Math.max(o.high,n),o.low=Math.min(o.low,n),o.close=n,o.endTime=s.index}))}_clearPressedChunks(){u.forEach((e=>this._pressedChunks.chunks.set(e.barsToMerge,[])))}}},67245:(e,t,i)=>{"use strict";i.d(t,{SeriesTimeRangeVolumeCalculator:()=>s});class s{constructor(e){this._value=null,this._series=e,this._series.dataEvents().dataUpdated().subscribe(this,this._onSeriesUpdated)}destroy(){this._series.dataEvents().dataUpdated().unsubscribeAll(this)}volume(e,t){if(null!==this._value&&this._value.from===e&&this._value.to===t)return this._value.value;let i=0;const s=this._series.data().bars(),r=s.firstIndex(),n=s.lastIndex();if(null!==r&&en&&t>n)i=NaN;else{const s=this._series.data().bars().rangeIterator(Math.min(e,t),Math.max(e,t));for(;s.hasNext();){const e=s.next().value[5];if(void 0===e){i=NaN;break}i+=e}}return this._value={from:e,to:t,value:i},i}_onSeriesUpdated(e,t){if(null===this._value)return;if(t)return void(this._value=null);const i=this._series.data().bars().lastIndex();(null===i||i<=this._value.to)&&(this._value=null)}}},1930:(e,t,i)=>{"use strict";i.r(t),i.d(t,{getTranslatedChartStyleName:()=>w,isRequiringRestartSeriesStyles:()=>P, +isRangeBasedStyle:()=>C,isRangeStyle:()=>T,isTimeBasedStyle:()=>x,isValidStyle:()=>I,isSingleValueBasedStyle:()=>M,setLastUsedStyle:()=>A,getLastUsedStyle:()=>L,getLastUsedSingleValueBasedStyle:()=>k,getDefaultStyle:()=>E,getChartStyleByResolution:()=>D,chartStyleStudyId:()=>B,preparePriceAxisProperties:()=>V,hasProjection:()=>N,isPriceSourceStyle:()=>O,getSeriesPriceFormattingState:()=>F,createSeriesFormatter:()=>W,symbolCurrencyConvertible:()=>H,symbolCurrency:()=>z,symbolOriginalCurrency:()=>U,symbolBaseCurrency:()=>j,isConvertedToOtherCurrency:()=>G,symbolUnitConvertible:()=>q,symbolUnit:()=>$,symbolOriginalUnit:()=>Y,isConvertedToOtherUnit:()=>K,symbolUnitConvertibleGroupsIfExist:()=>X,symbolCurrentContract:()=>Z,symbolHasPreOrPostMarket:()=>J,symbolHasSeveralSessions:()=>Q,symbolHasEconomicEvents:()=>ee,extractSymbolNameFromSymbolInfo:()=>te,symbolTitle:()=>ie,displayedSymbolName:()=>se,displayedSymbolExchange:()=>re,actualSymbol:()=>ne,proSymbol:()=>oe,symbolForApi:()=>ae,isRegularSessionId:()=>le,isCloseBasedSymbol:()=>ce,isMeasureUnitSymbol:()=>he,measureUnitId:()=>de,hasVolume:()=>ue,isEconomicSymbol:()=>pe,getStudySymbolExchange:()=>_e,isFutureContinuousSymbolWithBackajustment:()=>me,isFuturesContractSymbol:()=>ge,isCryptoSymbol:()=>fe});var s=i(44352),r=i(56840),n=i(77906),o=i(578),a=i(74599),l=i(2484),c=i(50151),h=i(48566),d=i(18766);const u=l.enabled("pay_attention_to_ticker_not_symbol"),p=l.enabled("uppercase_instrument_names"),_=l.enabled("charting_library_single_symbol_request"),m=l.enabled("use_ticker_on_symbol_info_update"),g=l.enabled("hide_object_tree_and_price_scale_exchange_label"),f=[4,5,6,7,8],v=[4,5,6,7,11],S=[0,1,9,2,3,10,8,12,13],y=[2,10,3,13],b={0:s.t(null,void 0,i(16812)),1:s.t(null,void 0,i(63528)),2:s.t(null,void 0,i(1277)),3:s.t(null,void 0,i(42097)),9:s.t(null,void 0,i(61582)),10:s.t(null,void 0,i(17712)),12:s.t(null,void 0,i(31994)),13:s.t(null,void 0,i(36018)),4:s.t(null,void 0,i(20801)),7:s.t(null,void 0,i(63492)),5:s.t(null,void 0,i(92901)),6:s.t(null,void 0,i(99969)),11:s.t(null,void 0,i(90357)),8:s.t(null,void 0,i(40530))};function w(e){return b[e]}function P(e){return-1!==f.indexOf(e)}function C(e){return-1!==v.indexOf(e)}function T(e){return 11===e}function x(e){return-1!==S.indexOf(e)}function I(e){return C(e)||x(e)}function M(e){switch(e){case 3:case 10:case 2:case 13:return!0;default:return!1}}function A(e,t){I(e)&&(11!==e&&r.setValue("chart.lastUsedStyle",e),ce(t)&&M(e)&&r.setValue("chart.lastUsedSingleValueBasedStyle",e))}function L(){const e=r.getInt("chart.lastUsedStyle");return void 0===e?1:e}function k(){const e=r.getInt("chart.lastUsedSingleValueBasedStyle");return void 0===e?2:e}function E(e){return e?11:1}function D(e,t){const i=T(t),s=o.Interval.isRange(e);return!i&&s?E(!0):i&&!s?E(!1):t}function B(e,t){const i=n.SYMBOL_STRING_DATA[e];return void 0===i?null:t?`${i.type}-${i.basicStudyVersion}`:i.type}function V(e){const t=e.priceAxisProperties,i=t.lockScale.value(),s=6===e.style.value();(s||i)&&(t.log.setValue(!1),t.percentage.setValue(!1)), +t.logDisabled.setValue(!(!s&&!i)),t.percentageDisabled.setValue(!(!s&&!i))}const R=[4,7,5,6];function N(e){return-1!==R.indexOf(e)}function O(e){return y.includes(e)}function F(e,t="default",i=!1){let s,r,n=100,o=1;if("default"===t)null!=e&&(n=e.pricescale,o=e.minmov,s=e.fractional,r=e.minmove2);else{let e=t.split(",");3!==e.length&&(e=["100","1","false"]),n=parseInt(e[0]),o=parseInt(e[1]),s="true"===e[2]}return i&&(o=1),{priceScale:n,minMove:o,fractional:s,minMove2:r}}function W(e,t,i=!1){if("default"===t&&null!=e){const t=e.formatter||e.format;if("volume"===t)return new h.VolumeFormatter(2);if("percent"===t)return new d.PercentageFormatter(e.pricescale)}const{priceScale:s,minMove:r,fractional:n,minMove2:o}=F(e,t,i);return new a.PriceFormatter(s,r,n,o)}function H(e){return null!==e&&"spread"!==e.type}function z(e,t,i){if(null===e)return null;const s=!t||i?e.currency_id:e.currency_code;return void 0===s||""===s?null:s}function U(e,t){const i=t?e.original_currency_code:e.original_currency_id;return null!=i?i:z(e,t)}function j(e){return e.base_currency_id||null}function G(e){return!(null===e||!H(e))&&(void 0!==e.original_currency_id&&e.original_currency_id!==e.currency_id)}function q(e,t){return t&&null!==e&&"spread"!==e.type}function $(e,t){if(null===e||!t)return null;const i=e.unit_id;return void 0===i||""===i?null:i}function Y(e,t){return t?e.original_unit_id||$(e,t):null}function K(e,t){return!(null===e||!q(e,t))&&(void 0!==e.original_unit_id&&e.original_unit_id!==e.unit_id)}function X(e,t){return null!==e&&q(e,t)?e.unit_conversion_types||null:[]}function Z(e){return"futures"===e.type&&e.front_contract||null}function J(e){return null!==e&&void 0!==e.subsessions&&e.subsessions.some((e=>"premarket"===e.id||"postmarket"===e.id))}function Q(e){return null!==e&&void 0!==e.subsessions&&e.subsessions.filter((e=>!e.private)).length>1}function ee(e){return null!==e&&("forex"===e.type||"cfd"===e.type||fe(e))}function te(e,t){let i=e&&(e.pro_name||e.full_name||e.name);return _&&t?i=t:m&&e&&e.ticker&&(i=e.ticker),p&&i&&(i=i.toUpperCase()),i}function ie(e,t,i="exchange"){return t||g?e.name:`${e.name}, ${e[i]}`}function se(e){let t=e&&(Z(e)||e.name)||"";return t.length>40&&(t=t.substring(0,37)+"..."),t.trim()}function re(e){const t=e?e.exchange:"";return p?t.toUpperCase():t}function ne(e,t){return null!==e?e.full_name:t}function oe(e,t){return null!==e?e.pro_name:t}function ae(e,t){return u&&e?(0,c.ensureDefined)(e.ticker):ne(e,t)}function le(e){return"regular"===e||"us_regular"===e}function ce(e){return"c"===(null==e?void 0:e.visible_plots_set)}function he(e){return null!==e&&("unit"===e.measure&&null!==de(e))}function de(e){var t;return null!==(t=null==e?void 0:e.value_unit_id)&&void 0!==t?t:null}function ue(e){return void 0!==e.visible_plots_set?"ohlcv"===e.visible_plots_set:!e.has_no_volume}function pe(e){return null!==e&&"economic"===e.type}function _e(e){return pe(e)&&e.source?e.source:e.exchange&&0!==e.exchange.length?e.exchange:void 0}function me(e){var t +;return null!==e&&"futures"===e.type&&Boolean(e.has_backadjustment&&(null===(t=e.typespecs)||void 0===t?void 0:t.includes("continuous")))}function ge(e){var t;return null!==e&&"futures"===e.type&&!Boolean(null===(t=e.typespecs)||void 0===t?void 0:t.includes("continuous"))}function fe(e){var t;return(null===(t=e.typespecs)||void 0===t?void 0:t.includes("crypto"))||"crypto"===e.type||"bitcoin"===e.type}},46936:(e,t,i)=>{"use strict";var s=i(26220);TradingView.DEFAULT_BAR_COUNT=300,TradingView.TIME_PLOT=0,TradingView.OPEN_PLOT=1,TradingView.HIGH_PLOT=2,TradingView.LOW_PLOT=3,TradingView.CLOSE_PLOT=4,TradingView.ADT_PLOT=6;var r=i(95693).SeriesBase,n=(i(51768).trackEvent,i(98351).getLogger("Chart.Series")),o=i(77906),a=i(27944).SeriesHorizontalBaseLinePaneView,l=i(933).deepExtend,c=i(76422),h=i(45673).TIMEFRAMETYPE,d=i(1930).isSingleValueBasedStyle;class u extends r{constructor(e,t,i,s){t.removeProperty("currencyId"),super(e,t,i,s),this._chartApi=e._chartApi,this.createPaneView(),this._properties.addExclusion&&(this._properties.addExclusion("visible"),this._properties.addExclusion("currencyId")),this._futureBarsPaneView=null,this.properties().minTick.listeners().subscribe(this,u.prototype._recreateFormatter);var r=this;this.properties().minTick.listeners().subscribe(null,(function(){r._model.fullUpdate()})),this._priceLineView=null,this._baseHorizontalLineView=new a(this),this.bindStyleChange(),this.bindJapChartsInputs(),this._createIsDWMProperty(),this.properties().showCountdown.listeners().subscribe(this,u.prototype._onChangeShowCountdown),this._onChangeShowCountdown(this.properties().showCountdown),this._recreatePriceFormattingDependencies(),this.properties().lineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().areaStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().baselineStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this.properties().columnStyle.priceSource.listeners().subscribe(this,this._updateBarFunction),this._updateBarFunction()}isLoading(){return this._loading}styleStudyInfo(e){return this.styleStudyInfos()[e]}serverTimeOffset(){return this._chartApi.serverTimeOffset()}_onChangeShowCountdown(e){var t=this;e.value()?this._countdownUpdateTimer=this._model.setInterval((function(){t._priceAxisView.updateCountdown()}),500):(this._model.clearInterval(this._countdownUpdateTimer),delete this._countdownUpdateTimer)}_createIsDWMProperty(){this._isDWMProperty=new s(this.isDWM()),this._onRestarted.subscribe(this,(function(){this._isDWMProperty.setValue(this.isDWM())}))}isDWMProperty(){return this._isDWMProperty}fixLastBar(e){0}isPulse(){return this._symbolInfo&&this._symbolInfo.resolutions.length>0}seriesSource(){return this._seriesSource}_onSeriesTimeFrame(e,t,i,s,r){var n=d(this.style())?e+.5:e,o=t;if(void 0===r)null!==i&&i.type!==h.PeriodBack||(o+=this._model.studyAwareDefaultRightOffset());else if(r.applyDefaultRightMargin)o+=this._model.studyAwareDefaultRightOffset();else if(r.percentRightMargin){ +var a=t-n+1,l=Math.max(0,Math.min(.99,r.percentRightMargin/100));o+=l*a/(1-l)}this._model.setTimeViewport(n,o)}hl2(e){return(this.high(e)+this.low(e))/2}hlc3(e){return(this.high(e)+this.low(e)+this.close(e))/3}ohlc4(e){return(this.open(e)+this.high(e)+this.low(e)+this.close(e))/4}nearestData(e,t){if(TradingView.isInteger(e)){var i=this.data().search(e,t);return null!==i?i:void 0}n.logDebug("Series.nearestData: incorrect logicalPoint")}nearestIndex(e,t){var i=this.nearestData(e,t);return i?i.index:void 0}purgeSymbolInfo(){this._symbolInfo=null}bindStyleChange(){var e=this;Object.keys(u.STYLE_SHORT_NAMES).map((function(e){return u.STYLE_SHORT_NAMES[e]+"Style"})).forEach((function(t){e._properties[t].listeners().subscribe(e,u.prototype.invalidateBarStylesCache)}))}bindJapChartsInputs(){this._properties.renkoStyle.inputs.boxSize.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.wicks.listeners().subscribe(this,this.onInputChanged),this._properties.renkoStyle.inputs.sources.listeners().subscribe(this,this.onInputChanged),this._properties.pbStyle.inputs.lb.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.reversalAmount.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),this._properties.kagiStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.boxSize.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.reversalAmount.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.sources.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.style.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.atrLength.listeners().subscribe(this,this.onInputChanged),this._properties.pnfStyle.inputs.oneStepBackBuilding.listeners().subscribe(this,this.onInputChanged),this._properties.rangeStyle.inputs.phantomBars.listeners().subscribe(this,this.onInputChanged)}createDividendsAdjustmentProperty(){throw new Error("Not implemented")}dividendsAdjustmentProperty(){return null}applyPreferences(e){var t=l({},e);this.m_priceScale.setMode({autoScale:t.priceAxisProperties.autoScale,percentage:t.priceAxisProperties.percentage,log:t.priceAxisProperties.log,lockScale:t.priceAxisProperties.lockScale}),this.setChartStyleWithIntervalIfNeeded(t.style),delete t.style,delete t.interval,this._properties.mergePreferences(t),this._properties.saveDefaults(),this.createPaneView(),this.invalidateBarStylesCache()}onInputChanged(){this.restart()}getStyleShortName(){var e=this._properties.style.value();if(u.STYLE_SHORT_NAMES.hasOwnProperty(e))return u.STYLE_SHORT_NAMES[e];throw new Error("Missed short name for style "+e)}getStyleProperties(){ +return this._properties[this.getStyleShortName()+"Style"]}getInputsProperties(){return this.getStyleProperties().inputs||new s}getInputsInfoProperties(){return this.getStyleProperties().inputInfo||new s}getSymbolName(){return this._symbolInfo?this._symbolInfo.name:""}priceScale(){return this.m_priceScale}setPriceScale(e){this.m_priceScale!==e&&(this._priceScaleAboutToBeChanged.fire(),this.m_priceScale=e,this._properties.removeProperty("priceAxisProperties"),this._properties.addChild("priceAxisProperties",e.properties()),this._properties.priceAxisProperties.childChanged(),c.emit("series_event","price_scale_changed"),this._priceScaleChanged.fire(e))}getSourceIcon(){return{type:"loadSvg",svgId:"series."+this.properties().style.value()}}isStyleSupported(e){return!0}destroy(){this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._quotesProvider.destroy(),this.clearGotoDateResult(),this._legendView.destroy(),this._marketStatusModel.destroy(),null!==this._dataUpdatedModeModel&&this._dataUpdatedModeModel.destroy(),this._dataProblemModel.destroy(),this._paneView&&this._paneView.destroy&&this._paneView.destroy(),this._seriesSource.destroy(),super.destroy()}dataEvents(){return this._seriesSource.dataEvents()}moveData(e){return this._seriesSource.moveData(e)}}Object.assign(u,o),TradingView.Series=u,t.Series=u,t.isSeries=function(e){return e instanceof u}},36767:(e,t,i)=>{"use strict";i.d(t,{SeriesAreaPaneView:()=>l});var s=i(38031),r=i(28962),n=i(29639),o=i(53074),a=i(46930);class l extends a.SeriesSingleLinePaneView{renderer(e,t){this._invalidated&&(this._updateImpl(),this._invalidated=!1);const i=this._source.priceScale();if(!i)return null;const a=this._source.properties().childs().areaStyle.childs(),l=a.transparency.value(),c={simpleMode:!1,barSpacing:this._model.timeScale().barSpacing(),items:this._items,lineColor:a.linecolor.value(),lineStyle:a.linestyle.value(),lineWidth:a.linewidth.value(),isSeries:!0,withMarkers:!1,bottom:i.height(),color1:(0,s.generateColor)(a.color1.value(),l),color2:(0,s.generateColor)(a.color2.value(),l)},h=new n.CompositeRenderer;return h.append(new r.PaneRendererArea(c)),this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&h.append(new o.SelectionRenderer(this._selectionData)),h}}},57757:(e,t,i)=>{"use strict";function s(e,t){return 100*(t-e)/Math.abs(e||1)}i.d(t,{barPercentChange:()=>s})},13428:(e,t,i)=>{"use strict";i.d(t,{PaneRendererBars:()=>n});var s=i(55014),r=i(91106);class n extends r.PaneRendererSeriesBase{constructor(e){super(),this._bars=e.bars,this._barSpacing=e.barSpacing,this._dontDrawOpen=e.dontDrawOpen,this._thinBars=e.thinBars}draw(e,t){e.save();const i=t.pixelRatio;if(this._barWidth=this._calcBarWidth(i),this._barWidth>=2){Math.max(1,Math.floor(i))%2!=this._barWidth%2&&this._barWidth--}this._barLineWidth=this._thinBars?Math.min(this._barWidth,Math.floor(i)):this._barWidth;let s=null;const r=this._barLineWidth<=this._barWidth&&this._barSpacing>=Math.floor(1.5*t.pixelRatio);for(const t of this._bars){ +s!==t.color&&(e.fillStyle=t.color,s=t.color);const n=Math.floor(.5*this._barLineWidth),o=Math.round(t.time*i),a=o-n,l=this._barLineWidth,c=a+l-1,h=Math.min(t.high,t.low),d=Math.max(t.high,t.low),u=Math.round(h*i)-n,p=Math.round(d*i)+n,_=Math.max(p-u,this._barLineWidth);e.fillRect(a,u,l,_);const m=Math.ceil(1.5*this._barWidth);if(r){const s=o-m,r=o+m,h=Math.min(a-s,r-c);if(!this._dontDrawOpen){let r=Math.max(u,Math.round(t.open*i)-n),o=r+l-1;o>u+_-1&&(o=u+_-1,r=o-l+1),e.fillRect(s,r,h,o-r+1)}let d=Math.max(u,Math.round(t.close*i)-n),p=d+l-1;p>u+_-1&&(p=u+_-1,d=p-l+1),e.fillRect(c+1,d,h,p-d+1)}}e.restore()}_getTolerance(){const e=this._calcBarWidth(1),t=this._thinBars?Math.min(e,1):e;return(0,s.interactionTolerance)().series+t/2}_getBarSpacing(){return this._barSpacing}_calcBarWidth(e){const t=Math.floor(e);return Math.max(t,Math.floor((0,s.optimalBarWidth)(this._barSpacing,e)))}}},83438:(e,t,i)=>{"use strict";i.d(t,{SeriesBarsPaneView:()=>a});var s=i(29639),r=i(53074),n=i(7816),o=i(13428);class a extends n.SeriesBarCandlesPaneView{renderer(e,t){this._invalidated&&(this._updateImpl(null),this._invalidated=!1);const i=this._source.properties().childs(),n={bars:this._bars,barSpacing:this._model.timeScale().barSpacing(),dontDrawOpen:i.barStyle.childs().dontDrawOpen.value(),thinBars:11===i.style.value()?i.rangeStyle.childs().thinBars.value():i.barStyle.childs().thinBars.value()},a=new s.CompositeRenderer;return a.append(new o.PaneRendererBars(n)),this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&a.append(new r.SelectionRenderer(this._selectionData)),a}_createItem(e,t,i){const s={time:e,open:NaN,high:NaN,low:NaN,close:NaN,color:i.barColor};return(0,n.baseBarCandlesUpdater)(t,s)?s:null}}},14224:(e,t,i)=>{"use strict";i.d(t,{SeriesBaselinePaneView:()=>m});var s=i(38031),r=i(29639),n=i(86441),o=i(5531),a=i(4652),l=i(55014),c=i(93975),h=i(86216),d=i(14888);class u extends h.MediaCoordinatesPaneRenderer{constructor(){super(...arguments),this._data=null}setData(e){this._data=e}hitTest(e){if(null===this._data)return null;const{items:t,topLineWidth:i,bottomLineWidth:s}=this._data,r=(0,l.interactionTolerance)().series+(i+s)/4,o=(0,c.lowerbound)(t,e,((e,t)=>e.x<=t.x)),h=Math.max(1,o-1),u=Math.min(t.length-1,o+1);for(let i=h;i<=u;++i){const s=t[i-1],o=t[i],{distance:l}=(0,a.distanceToSegment)(new n.Point(s.x,s.y),new n.Point(o.x,o.y),new n.Point(e.x,e.y));if(l<=r)return new d.HitTestResult(d.HitTestResult.REGULAR)}return null}_drawImpl(e){if(null===this._data)return;const{items:t,baseLevelCoordinate:i,bottom:s,bottomFillColor1:r,bottomFillColor2:a,topFillColor1:c,topFillColor2:h,topLineColor:d,bottomLineColor:u,topLineWidth:p,bottomLineWidth:_}=this._data;if(!function(e){if(0===e.length)return!1;const t=e.findIndex((e=>(0,l.coordinateIsValid)(e.y)));if(-1===t)return!1;let i=e.length-1;for(;i>t&&!(0,l.coordinateIsValid)(e[i].y);)i--;return!(t>i)}(t))return;const m=e.context,{topItems:g,bottomItems:f}=function(e,t){const i=[],s=[];let r=null;for(let a=0;a=t&&s.push(c),r=c;else{if(null===r)continue;c=r}if((0,l.coordinateIsValid)(h.y)&&(c.y>t&&h.yt))if(Math.abs(c.x-h.x)<1){const e=new n.Point(c.x,t);i.push(e),s.push(e)}else{const e=(0,o.intersectLineSegments)(c,h,new n.Point(c.x,t),new n.Point(h.x,t));if(null!==e){const t=c.add(h.subtract(c).scaled(e));i.push(t),s.push(t)}}}return{topItems:i,bottomItems:s}}(t,i);m.lineCap="round",m.lineJoin="round",0!==g.length&&(m.beginPath(),m.moveTo(g[0].x,i),this._makeLine(m,g,!0,0),m.closePath(),m.fillStyle=this._makeLinearGradient(m,c,h,i-s,i),m.fill(),m.beginPath(),this._makeLine(m,g,!1,0),m.lineWidth=p,m.strokeStyle=d,m.stroke()),0!==f.length&&(m.beginPath(),m.moveTo(f[0].x,i),this._makeLine(m,f,!0,1),m.closePath(),m.fillStyle=this._makeLinearGradient(m,r,a,i,i+s),m.fill(),m.beginPath(),this._makeLine(m,f,!1,1),m.lineWidth=_,m.strokeStyle=u,m.stroke())}_makeLine(e,t,i,s){if(null===this._data)return;const r=t.findIndex((e=>(0,l.coordinateIsValid)(e.y)));if(-1===r)return;const{barSpacing:n,baseLevelCoordinate:o}=this._data,a=.25*n;let c;const h=t.length;for(let n=r;n=o&&h.y>=o){e.moveTo(h.x,h.y);continue}}else if(c&&c.y<=o&&h.y<=o){e.moveTo(h.x,h.y);continue}if(c&&(0,l.coordinateIsValid)(c.y))e.lineTo(h.x,h.y),i&&!(0,l.coordinateIsValid)(d.y)&&e.lineTo(h.x,o);else if(d&&(0,l.coordinateIsValid)(d.y))i?(n!==r&&e.lineTo(h.x,o),e.lineTo(h.x,h.y)):e.moveTo(h.x,h.y);else if(i){if(0===n)continue;n!==r&&e.lineTo(h.x-a,o),e.lineTo(h.x-a,h.y),e.lineTo(h.x+a,h.y),e.lineTo(h.x+a,o)}else e.moveTo(h.x-a,h.y),e.lineTo(h.x+a,h.y);c=h}}}_makeLinearGradient(e,t,i,s,r){const n=e.createLinearGradient(0,s,0,r);return n.addColorStop(0,t),n.addColorStop(1,i),n}}var p=i(53074),_=i(46930);class m extends _.SeriesSingleLinePaneView{constructor(){super(...arguments),this._renderer=new u,this._topFillColor1="",this._topFillColor2="",this._bottomFillColor1="",this._bottomFillColor2="",this._topLineColor="",this._bottomLineColor="",this._topLineWidth=0,this._bottomLineWidth=0,this._barSpacing=0,this._bottom=0,this._baseLevelCoordinate=0}renderer(e,t){this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer.setData({items:this._items,topFillColor1:this._topFillColor1,topFillColor2:this._topFillColor2,bottomFillColor1:this._bottomFillColor1,bottomFillColor2:this._bottomFillColor2,topLineColor:this._topLineColor,bottomLineColor:this._bottomLineColor,topLineWidth:this._topLineWidth,bottomLineWidth:this._bottomLineWidth,barSpacing:this._barSpacing,baseLevelCoordinate:this._baseLevelCoordinate,bottom:this._bottom});const i=new r.CompositeRenderer;return i.append(this._renderer),this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&i.append(new p.SelectionRenderer(this._selectionData)),i}_updateImpl(){super._updateImpl();const e=this._source.priceScale();if(!e)return +;const t=this._source.properties().childs().baselineStyle.childs(),i=t.transparency.value();this._topFillColor1=(0,s.generateColor)(t.topFillColor1.value(),i),this._topFillColor2=(0,s.generateColor)(t.topFillColor2.value(),i),this._bottomFillColor1=(0,s.generateColor)(t.bottomFillColor1.value(),i),this._bottomFillColor2=(0,s.generateColor)(t.bottomFillColor2.value(),i),this._topLineColor=t.topLineColor.value(),this._bottomLineColor=t.bottomLineColor.value(),this._topLineWidth=t.topLineWidth.value(),this._bottomLineWidth=t.bottomLineWidth.value(),this._barSpacing=this._model.timeScale().barSpacing(),this._bottom=e.height(),this._baseLevelCoordinate=Math.round(this._bottom*(Math.abs(100-t.baseLevelPercentage.value())/100))}}},74234:(e,t,i)=>{"use strict";i.d(t,{SeriesWaterlinePaneView:()=>a});var s=i(56744),r=i(6947),n=i(14888),o=i(53479);class a extends s.HorizontalLinePaneView{constructor(e){super(),this._getters=e;const t={cursorType:r.PaneCursorType.VerticalResize,activeItem:0,areaName:n.AreaName.SourceItemMove};this._lineRenderer.setHitTest(new n.HitTestResult(n.HitTestResult.MOVEPOINT,t)),this._lineRendererData.visible=!0,this._lineRendererData.linestyle=o.LINESTYLE_SPARSE_DOTTED}_updateImpl(){const{baseLevelPercentage:e,paneHeight:t,color:i}=this._getters,s=Math.abs(100-e());this._lineRendererData.y=Math.round(t()*(s/100)),this._lineRendererData.color=i()}}},91106:(e,t,i)=>{"use strict";i.d(t,{PaneRendererSeriesBase:()=>r});var s=i(14888);class r{constructor(){this._bars=[]}hitTest(e){const t=this._bars,i=this._getBarSpacing(),s=i/2;if(0===t.length)return null;const r=this._getTolerance(),n=t[0],o=t[t.length-1];if(e.xo.time+s+r)return null;let a=0,l=t.length-1,c=-1;for(;a<=l;){const i=Math.floor((a+l)/2),h=t[i];let d=s;if(h!==n&&h!==o||(d+=r),Math.abs(h.time-e.x)<=d){c=i;break}e.x-h.time>s?a=i+1:l=i-1}if(-1!==c){const n=Math.ceil(r/i);if(0!==n){const i=Math.max(0,c-n),o=Math.min(t.length-1,c+n);for(let n=i;n<=o;n++)if(Math.abs(e.x-t[n].time)<=s+r&&this._isPointAtBar(t[n],e.y,r))return this._getHitTest()}else if(this._isPointAtBar(t[c],e.y,r))return this._getHitTest()}return null}_getHitTest(){return new s.HitTestResult(s.HitTestResult.REGULAR)}_isPointAtBar(e,t,i){const s=Math.min(e.high,e.low),r=Math.max(e.high,e.low);return s-i<=t&&t<=r+i}}},59386:(e,t,i)=>{"use strict";i.d(t,{PaneRendererCandles:()=>l});var s=i(50151),r=i(14888),n=i(9740),o=i(55014),a=i(91106);class l extends a.PaneRendererSeriesBase{constructor(e){super(),this._barSpacing=1,this._barWidth=1,this._borderVisible=!1,this._barBorderWidth=1,this._wickVisible=!1,this._bodyVisible=!0,this._borderColor=void 0,this._wickColor=void 0,this._hittest=void 0,this._isPriceScaleInverted=!1,e&&this.setData(e)}setData(e){this._bars=e.bars,this._barSpacing=e.barSpacing,this._borderVisible=e.borderVisible,this._bodyVisible=e.bodyVisible,this._wickVisible=e.wickVisible,this._borderColor=e.borderColor,this._wickColor=e.wickColor,this._hittest=e.hittest,this._isPriceScaleInverted=e.isPriceScaleInverted}hitTest(e){ +return this._wickVisible||this._borderVisible||this._bodyVisible?super.hitTest(e):null}draw(e,t){if(0===this._bars.length)return;const i=t.pixelRatio;if(this._barWidth=(0,o.optimalCandlestickWidth)(this._barSpacing,i),this._barWidth>=2){Math.floor(i)%2!=this._barWidth%2&&this._barWidth--}this._wickVisible&&this._drawWicks(e,i),this._borderVisible&&this._drawBorder(e,i),this._bodyVisible&&this._drawCandles(e,i)}_getTolerance(){return(0,o.interactionTolerance)().series+this._barBorderWidth/2}_getBarSpacing(){return this._barSpacing}_getHitTest(){return this._hittest||new r.HitTestResult(r.HitTestResult.REGULAR)}_isPointAtBar(e,t,i){const s=this._bodyVisible||this._borderVisible,r=this._wickVisible;if(!s&&!r)return!1;if(s){const s=r?Math.min(e.high,e.low):Math.min(e.open,e.close),n=r?Math.max(e.high,e.low):Math.max(e.open,e.close);return s-i<=t&&t<=n+i}{const s=Math.min(e.open,e.close),r=Math.max(e.open,e.close);return e.high-i<=t&&t<=s+i||r-i<=t&&t<=e.low+i}}_drawWicks(e,t){const i=this._bars;let r="",n=Math.min(Math.floor(t),Math.floor(this._barSpacing*t));n=Math.max(Math.floor(t),Math.min(n,this._barWidth));const o=Math.floor(.5*n);let a=null;for(const l of i){const i=l.wickColor?l.wickColor:(0,s.ensureDefined)(this._wickColor);i!==r&&(e.fillStyle=i,r=i);let c=Math.round(Math.min(l.open,l.close)*t),h=Math.round(Math.max(l.open,l.close)*t);this._isPriceScaleInverted&&([h,c]=[c,h]);const d=Math.round(l.high*t),u=Math.round(l.low*t);let p=Math.round(t*l.time)-o;const _=p+n-1;null!==a&&(p=Math.max(a+1,p),p=Math.min(p,_));const m=_-p+1;e.fillRect(p,d,m,c-d),e.fillRect(p,h+1,m,u-h-1),a=_}}_calculateBorderWidth(e){let t=Math.floor(1*e);this._barWidth<=2*t&&(t=Math.floor(.5*(this._barWidth-1)));const i=Math.max(Math.floor(e),t);return this._barWidth<=2*i?Math.max(Math.floor(e),Math.floor(1*e)):i}_drawBorder(e,t){let i="";const r=this._calculateBorderWidth(t);let o=null;for(const a of this._bars){if(a.borderColor!==i&&(e.fillStyle=a.borderColor?a.borderColor:(0,s.ensureDefined)(this._borderColor),i=a.borderColor),this._bodyVisible&&a.hollow)continue;let l=Math.round(a.time*t)-Math.floor(.5*this._barWidth);const c=l+this._barWidth-1,h=Math.round(Math.min(a.open,a.close)*t),d=Math.round(Math.max(a.open,a.close)*t);if(null!==o&&(l=Math.max(o+1,l),l=Math.min(l,c)),this._barSpacing*t>2*r)(0,n.fillRectInnerBorder)(e,l,h,c-l+1,d-h+1,r);else{const t=c-l+1;e.fillRect(l,h,t,d-h+1)}o=c}}_drawCandles(e,t){let i="";const s=this._calculateBorderWidth(t);for(const r of this._bars){if(this._borderVisible&&this._barWidth<=2*s&&!r.hollow)continue;let o=Math.round(Math.min(r.open,r.close)*t),a=Math.round(Math.max(r.open,r.close)*t),l=Math.round(r.time*t)-Math.floor(.5*this._barWidth),c=l+this._barWidth-1;if(r.color!==i){const t=r.color;e.fillStyle=t,i=t}if(r.hollow)e.fillStyle=r.color,(0,n.fillRectInnerBorder)(e,l,o,c-l+1,a-o+1,s);else{if(this._borderVisible&&(l+=s,o+=s,c-=s,a-=s),o>a)continue;e.fillRect(l,o,c-l+1,a-o+1)}}}}},15381:(e,t,i)=>{"use strict";i.d(t,{SeriesCandlesPaneView:()=>l}) +;var s=i(29639),r=i(55014),n=i(53074),o=i(7816),a=i(59386);class l extends o.SeriesBarCandlesPaneView{renderer(e,t){this._invalidated&&(this._updateImpl(null),this._invalidated=!1);const i=this._source.priceScale();if(!i)return null;const o=this._source.properties().childs().candleStyle.childs(),l=this._model.timeScale().barSpacing(),c={bars:this._bars,barSpacing:l,bodyVisible:o.drawBody.value(),borderVisible:o.drawBorder.value(),borderColor:o.borderColor.value(),wickColor:o.wickColor.value(),barWidth:(0,r.optimalBarWidth)(l),wickVisible:o.drawWick.value(),isPriceScaleInverted:i.isInverted()},h=new s.CompositeRenderer;return h.append(new a.PaneRendererCandles(c)),this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&h.append(new n.SelectionRenderer(this._selectionData)),h}_createItem(e,t,i){const s={time:e,open:NaN,high:NaN,low:NaN,close:NaN,color:i.barColor,borderColor:i.barBorderColor,wickColor:i.barWickColor,hollow:i.isBarHollow};return(0,o.baseBarCandlesUpdater)(t,s)?s:null}}},78201:(e,t,i)=>{"use strict";i.d(t,{SeriesColumnsPaneView:()=>p});var s=i(50151),r=i(86441),n=i(2484),o=i(3308),a=i(14888),l=i(29639),c=i(33639),h=i(47149),d=i(53074),u=i(73195);class p{constructor(e,t){this._items=[],this._invalidated=!0,this._isMarkersEnabled=(0,n.enabled)("source_selection_markers"),this._selectionData=null,this._histogramBase=0,this._source=e,this._model=t,this._selectionIndexer=new h.SelectionIndexes(t.timeScale())}update(){this._invalidated=!0}renderer(e,t){this._invalidated&&(this._updateImpl(),this._invalidated=!1);const i={barSpacing:this._model.timeScale().barSpacing(),items:this._items,lineColor:"",histogramBase:this._histogramBase},s=new l.CompositeRenderer;return s.append(new u.PaneRendererColumns(i)),this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&s.append(new d.SelectionRenderer(this._selectionData)),s}_updateImpl(){this._items=[];const e=this._model.timeScale(),t=this._source.priceScale();if(e.isEmpty()||!t||t.isEmpty())return;const i=e.visibleBarsStrictRange();if(null===i)return;if(0===this._source.bars().size())return;const n=this._source.nearestIndex(i.firstBar(),c.PlotRowSearchMode.NearestRight),l=this._source.nearestIndex(i.lastBar(),c.PlotRowSearchMode.NearestLeft);if(void 0===n||void 0===l)return;const h=this._source.bars().range(n,l),d=this._source.barColorer(),u={},p=this._source.barFunction(),_=h.reduce(((e,t,s)=>{const n=p(s);if(!(0,o.default)(n))return e;u.value=s;let a=this._source.precomputedBarStyle(s);void 0===a&&(a=d.barStyle(t,!1,u),this._source.setPrecomputedBarStyle(s,a));const l=new r.Point(t,n);return l.style=a,l.timePointIndex=t,this._items.push(l),u.previousValue=s,i.contains(t)&&null!=e?e:n}),null);if(null!==_)if(t.pointsArrayToCoordinates(this._items,_),e.timedValuesToCoordinates(this._items),this._histogramBase=t.isInverted()?0:t.height(),this._model.selection().isSelected(this._source)){const i=this._selectionIndexer.indexes();this._selectionData={points:[],bgColors:[],visible:!0, +barSpacing:e.barSpacing(),hittestResult:a.HitTestResult.REGULAR};const n=(0,s.ensureNotNull)(this._model.paneForSource(this._source)).height();this._selectionData.hittestResult=a.HitTestResult.REGULAR;for(let s=0;s{"use strict";i.d(t,{SeriesHiLoPaneView:()=>g});var s=i(48874),r=i(95242),n=i(93975),o=i(55014),a=i(14888),l=i(86216);class c extends l.MediaCoordinatesPaneRenderer{constructor(){super(...arguments),this._data=null,this._barWidth=null}setData(e){this._data=e,this._barWidth=Math.max(1,Math.round((0,o.optimalHiLoWidth)(e.barSpacing)))}hitTest(e){if(null===this._data||null===this._barWidth)return null;const t=this._data.bars,i=.5*this._data.barSpacing;if(0===t.length)return null;if(e.xt[t.length-1].time+i)return null;const s=t[(0,n.lowerbound)(t,e.x-i,((e,t)=>e.times.time+i)return null;const r=(0,o.interactionTolerance)().series+this._barWidth/2,l=Math.min(s.high,s.low),c=Math.max(s.high,s.low),h=this._data.fontSize;return l-r-h<=e.y&&e.y<=l+r||c-r<=e.y&&e.y<=c+r+h?new a.HitTestResult(a.HitTestResult.REGULAR):null}_drawImpl(e){if(null===this._data||null===this._barWidth)return;const{font:t,fontSize:i,labelColor:s,bars:n,inverted:o,labelsPadding:a}=this._data,l=e.context;l.textAlign="center",l.fillStyle=s,l.font=(0,r.makeFont)(i,t);for(let e=0;eMath.max(1,(0,n.lowerboundExt)((e=>e+1),null,(i=>{const s=(0,r.makeFont)(i,u.CHART_FONT_FAMILY);return(0,p.measureText)(e,s).width<=t}),7,36))),((e,t)=>`${e}/${t}`))}renderer(e,t,i){const s=this._source.priceScale();if(!s||s.isEmpty())return null;const r=new h.CompositeRenderer,n=this._needLabels(),a=this._source.properties().childs().hiloStyle.childs(),l=this._model.timeScale().barSpacing();if(this._invalidated){const e=this._source.formatter();this._maxLengthLabel="",this._updateImpl({generateLabels:n,formatter:e}),this._invalidated=!1}if(this._candlesRenderer.setData({bars:this._bars,wickVisible:!1,bodyVisible:a.drawBody.value(),barSpacing:l,borderVisible:a.showBorders.value(),barWidth:(0,o.optimalHiLoWidth)(l)}),r.append(this._candlesRenderer),n){const e=this._calculateLabelFontSize();e&&e>=8&&(this._labelsRenderer.setData({bars:this._bars, +barSpacing:l,font:u.CHART_FONT_FAMILY,fontSize:e,labelColor:a.labelColor.value(),inverted:s.isInverted(),labelsPadding:.4*e}),r.append(this._labelsRenderer))}return this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&r.append(new d.SelectionRenderer(this._selectionData)),r}topPixelMargin(){return this._margin()}bottomPixelMargin(){return this._margin()}_createItem(e,t,i,s){const r={time:e,open:NaN,high:NaN,low:NaN,close:NaN,color:i.barColor,borderColor:i.barBorderColor,hollow:!1,highLabel:"",lowLabel:""};if(!(0,m.baseBarCandlesUpdater)(t,r))return null;if(r.open=r.high,r.close=r.low,s.generateLabels){const e=s.formatter.format(r.high),t=s.formatter.format(r.low);r.highLabel=e,r.lowLabel=t;const i=(e.length>t.length?e:t).replace(/\d/g,"0");i.length>this._maxLengthLabel.length&&(this._maxLengthLabel=i)}return r}_margin(){if(this._needLabels()){const e=this._calculateLabelFontSize();if(e&&e>=8)return 1.4*e}return 0}_calculateLabelFontSize(){return""===this._maxLengthLabel?null:this._calculateFontSize(this._maxLengthLabel,Math.floor(this._model.timeScale().barSpacing())-2)}_needLabels(){const e=this._source.properties().childs().hiloStyle.childs().showLabels.value(),t=this._model.timeScale().barSpacing();return e&&t>5}}},73436:(e,t,i)=>{"use strict";i.d(t,{SeriesHollowCandlesPaneView:()=>l});var s=i(29639),r=i(55014),n=i(53074),o=i(59386),a=i(15381);class l extends a.SeriesCandlesPaneView{renderer(e,t){this._invalidated&&(this._updateImpl(null),this._invalidated=!1);const i=this._source.priceScale();if(!i)return null;const a=this._source.properties().childs().hollowCandleStyle.childs(),l=this._model.timeScale().barSpacing(),c={bars:this._bars,barSpacing:l,bodyVisible:a.drawBody.value(),borderVisible:a.drawBorder.value(),borderColor:a.borderColor.value(),wickColor:a.wickColor.value(),barWidth:(0,r.optimalBarWidth)(l),wickVisible:a.drawWick.value(),isPriceScaleInverted:i.isInverted()},h=new s.CompositeRenderer;return h.append(new o.PaneRendererCandles(c)),this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData&&h.append(new n.SelectionRenderer(this._selectionData)),h}}},9657:(e,t,i)=>{"use strict";i.d(t,{SeriesLinePaneView:()=>h});var s=i(14888),r=i(29639),n=i(76078),o=i(19773),a=i(53074),l=i(77906),c=i(46930);class h extends c.SeriesSingleLinePaneView{renderer(e,t){this._invalidated&&(this._updateImpl(),this._invalidated=!1);const i=this._source.properties().childs().lineStyle.childs(),c={barSpacing:this._model.timeScale().barSpacing(),items:this._items,lineColor:i.color.value(),lineStyle:i.linestyle.value(),withMarkers:i.styleType.value()===l.STYLE_LINE_TYPE_MARKERS,lineWidth:i.linewidth.value(),simpleMode:!0,hitTestResult:s.HitTestResult.REGULAR};let h,d;if(h=i.styleType.value()===l.STYLE_LINE_TYPE_STEP?new o.PaneRendererStepLine(c):new n.PaneRendererLine(c),this._model.selection().isSelected(this._source)&&this._isMarkersEnabled&&this._selectionData){const e=new r.CompositeRenderer;e.append(h), +e.append(new a.SelectionRenderer(this._selectionData)),d=e}else d=h;return d}}},7816:(e,t,i)=>{"use strict";i.d(t,{baseBarCandlesUpdater:()=>c,SeriesBarCandlesPaneView:()=>h});var s=i(86441),r=i(2484),n=i(47149),o=i(33639),a=i(14888);function l(e){return null!=e}function c(e,t){const i=e[1],s=e[2],r=e[3],n=e[4];return!!(l(i)&&l(s)&&l(r)&&l(n))&&(t.open=i,t.high=s,t.low=r,t.close=n,!0)}class h{constructor(e,t){this._bars=[],this._invalidated=!0,this._isMarkersEnabled=(0,r.enabled)("source_selection_markers"),this._selectionData=null,this._source=e,this._model=t,this._selectionIndexer=new n.SelectionIndexes(t.timeScale())}items(){return this._bars}update(){this._invalidated=!0}_updateImpl(e){const t=this._model.timeScale(),i=this._source.priceScale();if(this._bars=[],t.isEmpty()||!i||i.isEmpty())return;const r=t.visibleBarsStrictRange();if(null===r)return;if(0===this._source.bars().size())return;let n=this._source.nearestIndex(r.firstBar(),o.PlotRowSearchMode.NearestRight);const l=this._source.nearestIndex(r.lastBar(),o.PlotRowSearchMode.NearestLeft);if(void 0===n||void 0===l)return;for(;n<=l;n++){if(null!==this._source.bars().valueAt(n))break}if(n>l)return;const c=this._source.bars().range(n,l),h=this._source.barColorer(),d={};if(c.each(((t,i)=>{d.value=i;let s=this._source.precomputedBarStyle(i);void 0===s&&(s=h.barStyle(t,!1,d),this._source.setPrecomputedBarStyle(i,s));const r=this._createItem(Math.round(t),i,s,e);return!!r&&(d.previousValue=i,this._bars.push(r),!1)})),0===this._bars.length)return;const u=this._source.firstValue();if(null!==u)if(i.barPricesToCoordinates(this._bars,u),t.barIndexesToCoordinates(this._bars),this._model.selection().isSelected(this._source)){const e=this._selectionIndexer.indexes();this._selectionData={points:[],bgColors:[],visible:!0,hittestResult:a.HitTestResult.REGULAR,barSpacing:t.barSpacing()};const r=this._model.paneForSource(this._source);if(!r)return;const n=r.height();for(let r=0;r{"use strict";i.d(t,{SeriesDataSource:()=>y});var s=i(50151),r=i(65665),n=i(91035),o=i(578),a=i(22770),l=i(65447),c=i(7578),h=i(26867),d=i.n(h);class u{constructor(){this._created=new(d()),this._modified=new(d()),this._loading=new(d()),this._completed=new(d()),this._error=new(d()),this._symbolError=new(d()),this._symbolResolved=new(d()),this._seriesError=new(d()),this._symbolNotPermitted=new(d()),this._symbolInvalid=new(d()),this._symbolGroupNotPermitted=new(d()),this._chartTypeNotPermitted=new(d()),this._intradaySpreadNotPermitted=new(d()),this._intradayExchangeNotPermitted=new(d()),this._customIntervalNotPermitted=new(d()),this._secondsIntervalNotPermitted=new(d()),this._tickMarksRangeChanged=new(d()), +this._barReceived=new(d()),this._seriesTimeFrame=new(d()),this._dataUpdated=new(d())}destroy(){this._created.destroy(),this._modified.destroy(),this._loading.destroy(),this._completed.destroy(),this._error.destroy(),this._symbolError.destroy(),this._symbolResolved.destroy(),this._seriesError.destroy(),this._symbolInvalid.destroy(),this._symbolNotPermitted.destroy(),this._symbolGroupNotPermitted.destroy(),this._chartTypeNotPermitted.destroy(),this._intradaySpreadNotPermitted.destroy(),this._intradayExchangeNotPermitted.destroy(),this._customIntervalNotPermitted.destroy(),this._secondsIntervalNotPermitted.destroy(),this._tickMarksRangeChanged.destroy(),this._barReceived.destroy(),this._seriesTimeFrame.destroy(),this._dataUpdated.destroy()}created(){return this._created}modified(){return this._modified}loading(){return this._loading}completed(){return this._completed}error(){return this._error}symbolError(){return this._symbolError}symbolResolved(){return this._symbolResolved}seriesError(){return this._seriesError}symbolInvalid(){return this._symbolInvalid}symbolNotPermitted(){return this._symbolNotPermitted}symbolGroupNotPermitted(){return this._symbolGroupNotPermitted}chartTypeNotPermitted(){return this._chartTypeNotPermitted}intradaySpreadNotPermitted(){return this._intradaySpreadNotPermitted}intradayExchangeNotPermitted(){return this._intradayExchangeNotPermitted}customIntervalNotPermitted(){return this._customIntervalNotPermitted}secondsIntervalNotPermitted(){return this._secondsIntervalNotPermitted}tickMarksRangeChanged(){return this._tickMarksRangeChanged}barReceived(){return this._barReceived}seriesTimeFrame(){return this._seriesTimeFrame}dataUpdated(){return this._dataUpdated}fireCompleted(e){this._completed.fire(e)}fireCreated(e){this._created.fire(e)}fireModified(){this._modified.fire()}fireLoading(e){this._loading.fire(e)}fireError(){this._error.fire()}fireSymbolError(e){this._symbolError.fire(e),this.fireError()}fireSymbolResolved(e){this._symbolResolved.fire(e)}fireSeriesError(e){this._seriesError.fire(e),this.fireError()}fireSymbolInvalid(){this._symbolInvalid.fire()}fireSymbolNotPermitted(e){this._symbolNotPermitted.fire(e)}fireSymbolGroupNotPermitted(e){this._symbolGroupNotPermitted.fire(e)}fireChartTypeNotPermitted(e){this._chartTypeNotPermitted.fire(e),this.fireError()}fireIntradaySpreadNotPermitted(){this._intradaySpreadNotPermitted.fire(),this.fireError()}fireIntradayExchangeNotPermitted(){this._intradayExchangeNotPermitted.fire(),this.fireError()}fireCustomIntervalNotPermitted(e){this._customIntervalNotPermitted.fire(e),this.fireError()}fireSecondsIntervalNotPermitted(){this._secondsIntervalNotPermitted.fire(),this.fireError()}fireTickMarksRangeChanged(e){this._tickMarksRangeChanged.fire(e)}fireBarReceived(e){this._barReceived.fire(e)}fireSeriesTimeFrame(e,t,i,s,r){this._seriesTimeFrame.fire(e,t,i,s,r)}fireDataUpdated(e,t,i){this._dataUpdated.fire(e,t,i)}}var p=i(98351),_=i(1930);const m=(0,p.getLogger)("Chart.SeriesDataSource");var g;!function(e){e[e.Idle=0]="Idle", +e[e.AwaitingConnection=1]="AwaitingConnection",e[e.AwaitingFirstDataUpdate=2]="AwaitingFirstDataUpdate",e[e.Active=3]="Active"}(g||(g={}));let f=1;let v=1;function S(e){return e.startDate?e.endDate||e.count?e.endDate?["from_to",e.startDate,e.endDate]:["bar_count",e.startDate,(0,s.ensure)(e.count)]:["from_to",e.startDate]:e.count||300}class y{constructor(e,t,i,s){this._symbol=null,this._resolvedSymbolName=null,this._createSeriesOverriddenParams=0,this._instanceId=null,this._symbolInstanceId=null,this._resolution=null,this._timeFrame=null,this._data=new a.SeriesData,this._dataEvents=new u,this._status=g.Idle,this._turnaroundCounter=1,this._boundOnGatewayIsConnectedChanged=this._onGatewayIsConnectedChanged.bind(this),this._ongoingDataUpdate=Promise.resolve(),this._gateway=e,this._turnaroundPrefix=t,this._createSeriesParams=S(null!=i?i:{count:300}),this._timeFrame=s||null,this._gateway.isConnected().subscribe(this._boundOnGatewayIsConnectedChanged)}destroy(){this.stop(),this._gateway.isConnected().unsubscribe(this._boundOnGatewayIsConnectedChanged)}modifySeries(e,t,i=null,n=!1){n&&(m.logNormal("Due to force flag clearing symbol & resolution to force re-requesting data."),this._symbol=null,this._resolution=null);const a=this._symbol,l=this._resolution;if(this._symbol=e,this._resolution=t,null===this._instanceId)return void(this._timeFrame=i);const c=!(0,r.deepEquals)(a,e)[0]||null!==this._resolvedSymbolName&&this._resolvedSymbolName!==this._getSymbolNameString(e),h=null===l||!o.Interval.isEqual(l,t);(c||h||null!==i)&&(this._timeFrame=null,(c||h)&&this._turnaroundCounter++,c&&this._resolveSymbol(),this._gateway.modifySeries(this._instanceId,this.turnaround(),(0,s.ensureNotNull)(this._symbolInstanceId),this._resolution,i,this._onMessage.bind(this)),this._dataEvents.fireModified())}requestMoreData(e){null!==this._instanceId&&this._gateway.requestMoreData(this._instanceId,e,this._onMessage.bind(this))}requestMoreTickmarks(e){null!==this._instanceId&&this._gateway.requestMoreTickmarks(this._instanceId,e,this._onMessage.bind(this))}isStarted(){return this._status!==g.Idle}isActive(){return this._status===g.Active}resolution(){return this._resolution}start(){this.isStarted()?m.logNormal("start: data source is already started, nothing to do"):((0,s.assert)(null!==this._symbol,"symbol must be set before start"),(0,s.assert)(null!==this._resolution,"resolution must be set before start"),this._gateway.isConnected().value()?this._createSeries():this._changeStatusTo(g.AwaitingConnection))}stop(){this.isStarted()?(null!==this._instanceId&&(this._gateway.removeSeries(this._instanceId),this._instanceId=null),this._changeStatusTo(g.Idle)):m.logNormal("stop: data source is already stopped, nothing to do")}instanceId(){return this._instanceId}data(){return this._data}clearData(){this.isStarted()?this._enqueueUpdate((()=>this._clearDataImpl())):this._clearDataImpl()}dataEvents(){return this._dataEvents}turnaround(){return`${this._turnaroundPrefix}${this._turnaroundCounter}`}symbolInstanceId(){return this._symbolInstanceId}symbol(){ +return this._symbol}moveData(e){this._enqueueUpdate((()=>this._data.moveData(e)))}setInitialRequestOptions(e){this._createSeriesOverriddenParams=S(e)}_resolveSymbol(){null!==this._symbol&&(this._symbolInstanceId=this._gateway.resolveSymbol("sds_sym_"+f++,(0,n.encodeExtendedSymbolOrGetSimpleSymbolString)(this._symbol),this._onMessage.bind(this)))}_clearDataImpl(){this._data.clear()}_changeStatusTo(e){(0,s.assert)(this._status!==e,"Source and destination status should be distinct"),m.logNormal(`Status changed from ${g[this._status]} to ${g[e]}`),this._status=e}_createSeries(){(0,s.assert)(this._status!==g.Active,'Status should not be "Active" when creating a study'),this._instanceId="sds_"+v++,this._resolveSymbol();const e=this._createSeriesOverriddenParams||this._createSeriesParams;this._createSeriesOverriddenParams&&(this._createSeriesOverriddenParams=0),this._gateway.createSeries(this._instanceId,this.turnaround(),(0,s.ensureNotNull)(this._symbolInstanceId),(0,s.ensureNotNull)(this._resolution),e,this._timeFrame,this._onMessage.bind(this)),this._timeFrame=null,this._changeStatusTo(g.AwaitingFirstDataUpdate),this._dataEvents.fireCreated(this._instanceId)}_onGatewayIsConnectedChanged(e){e?this._onGatewayConnected():this._onGatewayDisconnected()}_onGatewayConnected(){this._status===g.AwaitingConnection&&this._createSeries()}_onGatewayDisconnected(){this._status!==g.Idle&&this._status!==g.AwaitingConnection&&(this._instanceId=null,this._changeStatusTo(g.AwaitingConnection)),this._turnaroundCounter=1}_onMessage(e){this._enqueueUpdate((()=>this._onMessageImpl(e)))}async _onMessageImpl(e){switch(e.method){case"symbol_resolved":{const[t,i]=e.params;if(t!==this._symbolInstanceId){m.logNormal(`Resolve for old symbol, expected: ${this._symbolInstanceId}, actual ${e.params[0]}`);break}this._onSymbolResolved(i);break}case"symbol_error":if(e.params[0]!==this._symbolInstanceId){m.logNormal(`Symbol error for old symbol, expected: ${this._symbolInstanceId}, actual ${e.params[0]}`);break}this._onSymbolError(e);break;case"series_timeframe":{const[t,i,s,r,n,o,a]=e.params;if(!this._checkTurnaround(t,i)){m.logNormal(`Time frame for old data, expected: ${this._symbolInstanceId} (${this.turnaround()}), actual ${t} (${i})`);break}this._onSeriesTimeFrame(s,r,n,o,a);break}case"series_error":{const[t,i]=e.params;if(!this._checkTurnaround(t,i)){m.logNormal(`Series error for old data, expected: ${this._symbolInstanceId} (${this.turnaround()}), actual ${t} (${i})`);break}this._onSeriesError(e.params[2]);break}case"series_loading":{const[t,i]=e.params;if(!this._checkTurnaround(t,i))break;this._onSeriesLoading(e.time);break}case"series_completed":{const[t,i,s,r]=e.params;if(!this._checkTurnaround(t,s)){m.logNormal(`Series completed for old data, expected: ${this._symbolInstanceId} (${this.turnaround()}), actual ${t} (${s})`);break}this._onSeriesCompleted(i,e.time,r);break}case"data_update":if(!this._checkTurnaround(e.params.customId,e.params.turnaround)){ +m.logNormal(`Data update for old data, expected: ${this._symbolInstanceId} (${this.turnaround()}), actual ${e.params.customId} (${e.params.turnaround})`);break}await this._onDataUpdate(e.params.plots,e.params.nonseries,e.params.lastBar);break;case"clear_data":if(e.params.turnaround!==this.turnaround()){m.logNormal(`Clear data for old data, expected: ${this.turnaround()}, actual ${e.params.turnaround}`);break}this._clearDataImpl(),this._dataEvents.fireDataUpdated(void 0,!1,null)}}_onSeriesError(e){let t,i;if("string"==typeof e)i={error:e},t=e;else if(i=e,e.ctx){const i={};Object.entries(e.ctx).forEach((([e,t])=>{i[e]=t.toString()})),t=e.error.format(i)}else t=e.error;if(t.startsWith("study_not_auth:")){const e=t.split(":",2)[1].split("@",2)[0];if(["BarSetRenko","BarSetPriceBreak","BarSetKagi","BarSetPnF"].includes(e))this._dataEvents.fireChartTypeNotPermitted(e);else if("BarSetSpread"===e)this._dataEvents.fireIntradaySpreadNotPermitted();else if("BarSetRange"===e){const e=`${(0,s.ensureNotNull)(this._symbol).inputs.range}R`;this._dataEvents.fireCustomIntervalNotPermitted(e)}}else"resolution_not_entitled"===t?this._dataEvents.fireIntradayExchangeNotPermitted():"custom_resolution"===t?this._dataEvents.fireCustomIntervalNotPermitted((0,s.ensureNotNull)(this._resolution)):"seconds_not_entitled"===t&&this._dataEvents.fireSecondsIntervalNotPermitted();this._dataEvents.fireSeriesError(i)}_onSeriesTimeFrame(e,t,i,s,r){this._dataEvents.fireSeriesTimeFrame(e,t,i,null==s||s,r)}_onSymbolError(e){if(e.params[1]===c.permissionDenied)switch(e.params[2]){case c.SymbolErrorPermissionDeniedReason.Symbol:this._dataEvents.fireSymbolNotPermitted(e.params[3]);break;case c.SymbolErrorPermissionDeniedReason.GroupPermission:this._dataEvents.fireSymbolGroupNotPermitted(e.params[3]);break;default:this._dataEvents.fireSymbolNotPermitted(e.params[2])}else e.params[1]===c.invalidSymbol&&this._dataEvents.fireSymbolInvalid();this._dataEvents.fireSymbolError(e.params[1])}_onSymbolResolved(e){this._resolvedSymbolName=(0,_.symbolForApi)(e,this._getSymbolNameString((0,s.ensureNotNull)(this._symbol))),this._dataEvents.fireSymbolResolved(e)}_getSymbolNameString(e){return"string"==typeof e.symbol?e.symbol:e.symbol.symbol}async _onDataUpdate(e,t,i){this._onDataUnpacked(e,i,await async function(e){if(void 0===e)return{projectionPlots:[],boxSize:null};if(""===e.d||"nochange"===e.indexes)return null;const t=await(0,l.unpackNonSeriesData)(e.d);if(null===t||t.indexes_replace)return null;const i=e.indexes,{bars:s,price:r,boxSize:n,reversalAmount:o}=t.data,a=(s||[]).map((e=>{let t;return"factor"in e?t=e.factor:"additionalPrice"in e&&(t=e.additionalPrice),{index:i[e.time],value:[0,e.open,e.high,e.low,e.close,e.volume,t]}}));return{lastPrice:r,projectionPlots:a,reversalAmount:o,boxSize:n}}(t))}_enqueueUpdate(e){return this._ongoingDataUpdate=this._ongoingDataUpdate.then(e,e),this._ongoingDataUpdate}_onDataUnpacked(e,t,i){if(this._status===g.Idle)return;this._status===g.AwaitingFirstDataUpdate&&(this._changeStatusTo(g.Active),this._clearDataImpl()) +;const s=this._data.bars().size(),r=this._data.bars().firstIndex(),n=this._data.mergeRegularBars(e);null!==i&&(this._data.nsBars().clear(),this._data.nsBars().merge(i.projectionPlots),this._data.lastProjectionPrice=i.lastPrice,null!==i.boxSize&&(this._data.boxSize=i.boxSize),this._data.reversalAmount=i.reversalAmount);const o=null===r||null!==n&&n.index{"use strict";i.d(t,{SeriesHorizontalBaseLinePaneView:()=>r});var s=i(1975);class r extends s.SeriesHorizontalLinePaneView{constructor(e){super(e)}_updateImpl(){this._lineRendererData.visible=!1;const e=this._series.priceScale().mode();if(!e.percentage&&!e.indexedTo100)return;const t=this._series.firstValue();null!==t&&(this._lineRendererData.visible=!0,this._lineRendererData.y=this._series.priceScale().priceToCoordinate(t,t),this._lineRendererData.color=this._series.properties().childs().baseLineColor.value())}}},1975:(e,t,i)=>{"use strict";i.d(t,{SeriesHorizontalLinePaneView:()=>r});var s=i(56744);class r extends s.HorizontalLinePaneView{constructor(e){super(),this._series=e,this._model=e.model()}}},46930:(e,t,i)=>{"use strict";i.d(t,{SeriesSingleLinePaneView:()=>d});var s=i(3308),r=i(86441),n=i(50151),o=i(2484),a=i(47149),l=i(33639),c=i(14888),h=i(93975);class d{constructor(e,t){this._items=[],this._invalidated=!0,this._isMarkersEnabled=(0,o.enabled)("source_selection_markers"),this._selectionData=null,this._source=e,this._model=t,this._selectionIndexer=new a.SelectionIndexes(t.timeScale())}update(){this._invalidated=!0}_updateImpl(){var e,t;this._items=[];const i=this._model.timeScale(),o=this._source.priceScale();if(i.isEmpty()||!o||o.isEmpty())return;const a=i.visibleBarsStrictRange();if(null===a)return;if(0===this._source.bars().size())return;const d=null!==(e=this._source.nearestIndex(a.firstBar()-1,l.PlotRowSearchMode.NearestLeft))&&void 0!==e?e:a.firstBar()-1,u=null!==(t=this._source.nearestIndex(a.lastBar()+1,l.PlotRowSearchMode.NearestRight))&&void 0!==t?t:a.lastBar()+1,p=this._source.barFunction();let _=null;const m=this._model.timeScale().barSpacing();if(m<.1&&this._source.supportsPressedChunks()){_=this._source.firstValue();const e=this._source.pressedChunks(m,(0,n.ensureNotNull)(this._source.priceSource())),t=(0,h.lowerbound)(e,d,((e,t)=>e.startTimee.endTime{const i=new r.Point(t.startTime,e);this._items.push(i)}))}}else{_=this._source.bars().range(d,u).reduce(((e,t,i)=>{const n=p(i);if(!(0,s.default)(n))return e;const o=new r.Point(t,n);return this._items.push(o),a.contains(t)?null!=e?e:n:e}),null)}if(null!==_)if(o.pointsArrayToCoordinates(this._items,_), +i.timedValuesToCoordinates(this._items),this._model.selection().isSelected(this._source)){const e=this._selectionIndexer.indexes();this._selectionData={points:[],bgColors:[],visible:!0,barSpacing:i.barSpacing(),hittestResult:c.HitTestResult.REGULAR};const t=(0,n.ensureNotNull)(this._model.paneForSource(this._source)).height();this._selectionData.hittestResult=c.HitTestResult.REGULAR;for(let s=0;s{"use strict";i.d(t,{calculateColor:()=>C,SeriesValuesProvider:()=>T});var s=i(50151),r=i(50335),n=i(24377),o=i(44352),a=i(49483),l=(i(2484),i(38031)),c=i(80142),h=i(33639),d=i(76076),u=i(18766),p=i(48566),_=i(2250),m=i(57757),g=i(49897),f=i(28667),v=i(2);const S=a.CheckMobile.any(),y=S&&!0,b=new u.PercentageFormatter,w=new p.VolumeFormatter(2),P=`${v.notAvailable} (${v.notAvailable}%)`;function C(e,t){const i=(0,n.parseRgb)(t),s=(0,n.parseRgb)(e);return(0,n.distanceRgb)(i,s)<70?(0,n.rgbToHexString)((0,n.invertRgb)(i)):t}class T{constructor(e,t){this._series=e,this._model=t,this._emptyValues=[{title:o.t(null,void 0,i(39280)),visible:!1,value:"",index:0,id:""},{title:o.t(null,void 0,i(30777)),visible:!1,value:"",index:1,id:""},{title:o.t(null,void 0,i(8136)),visible:!1,value:"",index:2,id:""},{title:o.t(null,void 0,i(31691)),visible:!1,value:"",index:3,id:""},{title:"",visible:!1,value:"",index:4,id:""},{title:"",visible:!1,value:"",index:5,id:""},{title:o.t(null,void 0,i(49329)),visible:!1,value:"",index:6,id:""},{title:o.t(null,{context:"study"},i(32819)),visible:!1,value:"",index:7,id:""}]}getItems(){return this._emptyValues}getValues(e){var t;const i=this._showLastPriceAndChangeOnly(),n=this._emptyValues.map((e=>({...e,visible:!i})));n[0].value=v.notAvailable,n[1].value=v.notAvailable,n[2].value=v.notAvailable,n[3].value=v.notAvailable,n[6].value=P,n[7].value=v.notAvailable,n[5].visible=!1;const o=n[4];if(o.value=v.notAvailable,o.visible=!1,this._model.timeScale().isEmpty()||0===this._series.bars().size()||this._series.priceScale().isEmpty())return n;(0,r.isNumber)(e)||(e=(0,s.ensureNotNull)(this._series.data().last()).index);const a=this._series.nearestIndex(e,h.PlotRowSearchMode.NearestLeft);if(void 0===a)return n;const d=this._series.data().valueAt(a),u=this._model.backgroundTopColor().value();if(null===d)return n;const p=d[1],m=d[2],f=d[3],S=d[4],{values:T}=this._changesData(S,a,i),x=(0,g.getPriceValueFormatterForSource)(this._series);if((0,g.shouldBeFormattedAsPercent)(this._series)||(0,g.shouldBeFormattedAsIndexedTo100)(this._series))n[6].value="";else if(void 0!==T){const e=this._series.formatter();n[6].value=(0,c.forceLTRStr)(`${e.format(T.change,!0)} (${b.format(T.percentChange,!0)})`)}if(i)n[5].value=null==S?v.notAvailable:x(S),n[5].visible=!0, +n[6].visible=!0;else{n[0].value=null==p?v.notAvailable:x(p),n[1].value=null==m?v.notAvailable:x(m),n[2].value=null==f?v.notAvailable:x(f),n[3].value=null==S?v.notAvailable:x(S),n[4].value=x(this._series.barFunction()(d));const e=d[5];(0,r.isNumber)(e)?n[7].value=w.format(e):n[7].visible=!1}let I=null;if(i&&!y)I=void 0===T||T.change>=0?_.SeriesBarColorer.upColor(this._series.properties()):_.SeriesBarColorer.downColor(this._series.properties());else{const e=this._series.barColorer().barStyle(a,!1);I=C(u,null!==(t=e.barBorderColor)&&void 0!==t?t:e.barColor)}I=(0,l.resetTransparency)(C(u,I));for(const e of n)e.color=I;return n}_showLastPriceAndChangeOnly(){return S&&(null===this._model.crossHairSource().pane||(0,f.isLineToolName)(d.tool.value())||null!==this._model.lineBeingEdited())}_changesData(e,t,i){var s;if(i&&!y){const e=this._series.quotes();if(null!==e)return{values:{change:null!==e.change?e.change:0,percentChange:null!==e.change_percent?e.change_percent:0}}}else{const i=this._series.data().search(t-1,h.PlotRowSearchMode.NearestLeft),r=null!==(s=null==i?void 0:i.value[4])&&void 0!==s?s:null;if(null!==r&&null!=e)return{values:{change:e-r,percentChange:(0,m.barPercentChange)(r,e)}}}return{}}}},22600:(e,t,i)=>{"use strict";i.d(t,{sessionsPreferencesDefault:()=>r});var s=i(7394);const r={graphics:{backgrounds:{outOfSession:{color:s.colorsPalette["color-tv-blue-500"],transparency:92,visible:!1},preMarket:{color:"#FF9800",transparency:92,visible:!1},postMarket:{color:s.colorsPalette["color-tv-blue-500"],transparency:92,visible:!1}},vertlines:{sessBreaks:{color:"#4985e7",style:2,visible:!1,width:1}}}}},72039:(e,t,i)=>{"use strict";i.d(t,{StatusProviderBase:()=>s});class s{constructor(e){this._colorProperty=e}size(){return"13px"}bold(){return!1}color(){return this._colorProperty.value()}}},17659:(e,t,i)=>{"use strict";i.d(t,{StatusView:()=>s});class s{constructor(e){this._text="",this._color="",this._size="13px",this._bold=!1,this._statusProvider=e}text(){return this._text}getSplitTitle(){return[this._text]}color(){return this._statusProvider.color()}bold(){return this._bold}size(){return this._size}}},67052:(e,t,i)=>{"use strict";var s;i.d(t,{StoriesTimeLineItemType:()=>s}),function(e){e[e.Image=0]="Image",e[e.Emoji=1]="Emoji"}(s||(s={}))},83990:(e,t,i)=>{"use strict";i.d(t,{seriesPrice:()=>n,positionVisualDirection:()=>a,positionToCoordinate:()=>l,noDataBasePosition:()=>c,seriesBasePosition:()=>h,getNoDataPosition:()=>d,getSeriesPosition:()=>u});var s=i(50151),r=i(33639);function n(e,t,i){const s=e.barFunction();switch(e.style()){case 3:case 10:case 2:return s(t.value);default:return t.value[-1===i?3:2]}}function o(e){return e>=0?1:-1}function a(e,t){return-1===o(e)!==t?-1:1}function l(e,t,i,s){const r=Math.min(t,Math.max(0,1===s?i:t-i));return i-s*Math.abs(r*e/100)}function c(e,t,i){const s=e.index();return null===s?null:{index:s,price:t.coordinateToPrice(t.height()/2,i)}}function h(e,t){const i=e.data().bars(),s=i.first(),a=i.last();if(null===s||null===a)return null;let l;const c=t.index();if(null===c){ +if(void 0===t.time)return null;const e=t.time(),n=s.value[0],o=a.value[0];if(eo)return null;l=i.searchByTime(e,r.PlotRowSearchMode.NearestRight,4)}else l=i.search(c);return null===l?null:{index:l.index,price:n(e,l,o(t.position()))}}function d(e,t,i){const s=c(e,t,i);if(null===s)return null;const r=a(e.position(),t.isInverted());return{index:s.index,price:s.price,poleStartY:t.height(),visualDirection:1,positionPointDirection:r,startsOnSeriesData:!1}}function u(e,t,i=!0){const r=h(e,t),n=e.priceScale(),o=(0,s.ensureNotNull)(e.firstValue());if(null===r)return d(t,n,o);let l=0;const c=e.properties().childs(),u=e.model().timeScale(),p=n.priceToCoordinate(r.price,o);if(i)switch(e.style()){case 3:l=c.areaStyle.childs().linewidth.value()/2;break;case 2:l=c.lineStyle.childs().linewidth.value()/2;break;case 10:const e=Math.abs(100-c.baselineStyle.childs().baseLevelPercentage.value());l=n.height()*e/100>p?c.baselineStyle.childs().topLineWidth.value()/2:c.baselineStyle.childs().bottomLineWidth.value()/2;break;case 1:case 9:case 8:case 12:case 4:case 7:l=3;break;case 0:l=c.barStyle.childs().thinBars.value()?3:Math.max(3,.25*u.barSpacing());break;case 11:l=c.rangeStyle.childs().thinBars.value()?3:Math.max(3,.25*u.barSpacing());break;case 5:l=Math.max(4,.25*u.barSpacing());break;case 6:l=Math.max(5,.25*u.barSpacing())}const _=a(t.position(),n.isInverted()),m=p-_*l;return{index:r.index,price:r.price,poleStartY:m,visualDirection:_,positionPointDirection:_,startsOnSeriesData:!0}}},10623:(e,t,i)=>{"use strict";i.d(t,{materializeBackground:()=>o,dematerializeBackground:()=>a,isBackgroundInBarsRange:()=>l});var s=i(50151),r=i(33143),n=i(65447);function o(e,t){if(e.start>=t.length||e.stop>=t.length)return null;const i=t[e.start],n=t[e.stop];return n===r.INVALID_TIME_POINT_INDEX?null:((0,s.assert)(i===r.INVALID_TIME_POINT_INDEX||i<=n,"start should not exceed stop"),{start:i===r.INVALID_TIME_POINT_INDEX?null:i,stop:n})}function a(e,t,i){return{id:t,start:(0,n.ensureTimePointIndexIndex)(i.indexOf(null!==e.start?e.start:r.INVALID_TIME_POINT_INDEX)),stop:(0,n.ensureTimePointIndexIndex)(i.indexOf(e.stop))}}function l(e,t){if(null===e.start)return t.firstBar()<=e.stop;const i=Math.min(e.start,e.stop),s=Math.max(e.start,e.stop);return t.contains(i)||t.contains(s)||it.lastBar()}},59780:(e,t,i)=>{"use strict";i.d(t,{LiveStudyGraphics:()=>o.LiveStudyGraphics,createGraphicsPaneViews:()=>p,createGraphicsPriceAxisViews:()=>m,emptyStudyGraphics:()=>n.emptyStudyGraphics,isStudyGraphicsEmpty:()=>r.isStudyGraphicsEmpty,loadStudyGraphics:()=>n.loadStudyGraphics,saveStudyGraphics:()=>n.saveStudyGraphics});var s=i(98351),r=i(83280),n=i(49570),o=i(4574),a=i(67876),l=i(38031);class c extends a.PriceAxisView{constructor(e,t){super(),this._source=e,this._data=t}_updateRendererData(e,t,i){var s,r;e.visible=!1;const n=this._source.priceScale(),o=this._source.properties().childs(),a=o.visible.value();if(!n||n.isEmpty()||!a)return +;const c=null===(r=null===(s=o.graphics.childs()[this._data.lineType])||void 0===s?void 0:s.childs()[this._data.styleId])||void 0===r?void 0:r.childs();if(!(void 0!==c&&c.visible&&c.visible.value()&&c.showPrice&&c.showPrice.value()&&this._isLabelVisibleAccordinglyToProperties()))return;const h=this._source.firstValue();if(null===h)return;const d=this._data.line.level,u=(0,l.resetTransparency)(c.color.value());i.background=u,i.textColor=this.generateTextColor(u),i.coordinate=n.priceToCoordinate(d,h),e.text=n.formatPrice(d,h,!0),e.visible=!0}_isLabelVisibleAccordinglyToProperties(){return!!this._source.model().properties().childs().scalesProperties.childs().showStudyLastValue.value()&&this._source.properties().childs().showLabelsOnPriceScale.value()}}const h=(0,s.getLogger)("Chart.StudyGraphics"),d=new Set(["dwgtablecells"]);async function u(e,t,s,r){switch(e){case"hhists":return new((await i.e(507).then(i.bind(i,58222))).HHistPaneView)(t,s,r);case"horizlines":return new((await i.e(507).then(i.bind(i,94993))).HorizLinePaneView)(t,s,r);case"vertlines":return new((await i.e(507).then(i.bind(i,66794))).VertLinePaneView)(t,s,r);case"polygons":return new((await i.e(507).then(i.bind(i,55493))).PolygonPaneView)(t,s,r);case"backgrounds":return new((await i.e(507).then(i.bind(i,13770))).BackgroundPaneView)(t,s,r)}return null}async function p(e,t,i){const s=[],r=Object.keys(e.graphicsInfo());r.sort(((e,t)=>_(e)-_(t)));for(const n of r){const r=await u(n,e,t,i);null!==r?s.push(r):d.has(n)||h.logWarn(`${n} is not supported by this build of graphics subsystem, skipping`)}return s}function _(e){var t;return null!==(t=r.primitivesZOrders.get(e))&&void 0!==t?t:0}function m(e){const t=Object.keys(e.graphicsInfo()),i=[];for(const s of t)switch(s){case"hlines":e.graphics().hlines().forEach(((t,r)=>{t.forEach((t=>{void 0!==t.level&&i.push(new c(e,{line:{level:t.level},styleId:r,lineType:s}))}))}));break;case"horizlines":e.graphics().horizlines().forEach(((t,r)=>{t.forEach((t=>{void 0!==t.level&&i.push(new c(e,{line:{level:t.level},styleId:r,lineType:s}))}))}))}return i}},9822:(e,t,i)=>{"use strict";i.d(t,{HHistDirection:()=>s,HHistLocation:()=>r,HHistVolumeMode:()=>n,materializeHHist:()=>c,dematerializeHHist:()=>h,isHHistInBarsRange:()=>d});var s,r,n,o=i(50151),a=i(33143),l=i(65447);function c(e,t){if(e.firstBarTime>=t.length||e.lastBarTime>=t.length)return null;const i=t[e.firstBarTime],s=t[e.lastBarTime];return i===a.INVALID_TIME_POINT_INDEX||s===a.INVALID_TIME_POINT_INDEX?null:((0,o.assert)(i<=s,"firstBarTime should not exceed lastBarTime"),(0,o.assert)(e.priceLow<=e.priceHigh,"priceLow should not exceed priceHigh"),{firstBarTime:i,lastBarTime:s,rate:e.rate,priceHigh:e.priceHigh,priceLow:e.priceLow})}function h(e,t,i){const s=(0,l.ensureTimePointIndexIndex)(i.indexOf(e.firstBarTime)),r=(0,l.ensureTimePointIndexIndex)(i.indexOf(e.lastBarTime));return{id:t,...e,firstBarTime:s,lastBarTime:r}}function d(e,t){const i=Math.min(e.firstBarTime,e.lastBarTime),s=Math.max(e.firstBarTime,e.lastBarTime) +;return t.contains(i)||t.contains(s)||it.lastBar()}!function(e){e.LeftToRight="left_to_right",e.RightToLeft="right_to_left"}(s||(s={})),function(e){e.Relative="relative",e.Absolute="absolute"}(r||(r={})),function(e){e.UpDown="Up/Down",e.Total="Total",e.Delta="Delta"}(n||(n={}))},41837:(e,t,i)=>{"use strict";i.d(t,{materializeHorizLine:()=>o,dematerializeHorizLine:()=>a,isHorizLineInBarsRange:()=>l});var s=i(50151),r=i(33143),n=i(65447);function o(e,t){if(e.startIndex>=t.length||e.endIndex>=t.length)return null;const i=t[e.startIndex],n=t[e.endIndex];return i===r.INVALID_TIME_POINT_INDEX||n===r.INVALID_TIME_POINT_INDEX?null:((0,s.assert)(i<=n,"startIndex should not exceed endIndex"),{startIndex:i,endIndex:n,level:e.level,extendLeft:e.extendLeft,extendRight:e.extendRight})}function a(e,t,i){const s=(0,n.ensureTimePointIndexIndex)(i.indexOf(e.startIndex)),r=(0,n.ensureTimePointIndexIndex)(i.indexOf(e.endIndex));return{id:t,...e,startIndex:s,endIndex:r}}function l(e,t){const i=Math.min(e.startIndex,e.endIndex),s=Math.max(e.startIndex,e.endIndex);if(t.contains(i)||t.contains(s)||it.lastBar())return!0;const r=e.startIndext.lastBar()&&r}},4574:(e,t,i)=>{"use strict";i.d(t,{LiveStudyGraphics:()=>d});var s=i(50151),r=i(9822),n=i(41837),o=i(61503),a=i(42454),l=i(10623),c=i(83280),h=i(49570);class d{constructor(){this._indexes=[],this._horizlines=new Map,this._vertlines=new Map,this._lines=new Map,this._hlines=new Map,this._textmarks=new Map,this._shapemarks=new Map,this._backgrounds=new Map,this._polygons=new Map,this._trendchannels=new Map,this._hhists=new Map,this._dwglabels=new Map,this._dwgboxes=new Map,this._dwglines=new Map,this._dwgtables=new Map,this._dwgtablecells=new Map,this._dwglinefills=new Map,this._hhistsByTimePointIndex=new Map}horizlines(){return this._horizlines}vertlines(){return this._vertlines}lines(){return this._lines}hlines(){return this._hlines}textmarks(){return this._textmarks}shapemarks(){return this._shapemarks}backgrounds(){return this._backgrounds}polygons(){return this._polygons}trendchannels(){return this._trendchannels}hhists(){return this._hhists}dwglabels(){return this._dwglabels}dwglines(){return this._dwglines}dwgboxes(){return this._dwgboxes}dwgtables(){return this._dwgtables}dwgtablecells(){return this._dwgtablecells}dwglinefills(){return this._dwglinefills}hhistsByTimePointIndex(){return this._hhistsByTimePointIndex}clear(){this._indexes=[],this._clearPrimitives()}extract(){const e=e=>e.extract(),t={indexes:this._indexes,horizlines:p(this._horizlines,e),vertlines:p(this._vertlines,e),lines:p(this._lines,e),hlines:p(this._hlines,e),textmarks:p(this._textmarks,e),shapemarks:p(this._shapemarks,e),backgrounds:p(this._backgrounds,e),polygons:p(this._polygons,e),trendchannels:p(this._trendchannels,e),hhists:p(this._hhists,e),dwglabels:p(this._dwglabels,e),dwglines:p(this._dwglines,e),dwgboxes:p(this._dwgboxes,e), +dwgtables:p(this._dwgtables,e),dwgtablecells:p(this._dwgtablecells,e),dwglinefills:p(this._dwglinefills,e)};return this._hhistsByTimePointIndex=new Map,new h.StaticStudyGraphics("data",t)}replaceIndexesTo(e){this._indexes=e;const t=e=>e.replaceIndexesTo(this._indexes);this._horizlines.forEach(t),this._vertlines.forEach(t),this._lines.forEach(t),this._hlines.forEach(t),this._textmarks.forEach(t),this._shapemarks.forEach(t),this._backgrounds.forEach(t),this._polygons.forEach(t),this._trendchannels.forEach(t),this._hhists.forEach(t),this._dwglabels.forEach(t),this._dwgboxes.forEach(t),this._dwglines.forEach(t),this._dwgtables.forEach(t),this._dwgtablecells.forEach(t),this._dwglinefills.forEach(t),this._hhistsByTimePointIndex=(0,c.splitHHistsByTimePointIndex)(this._hhists)}processCommands(e,t){void 0!==e.erase&&this._processEraseCommands(e.erase),void 0!==e.create&&this._processCreateCommands(e.create,t)}_processCreateCommands(e,t){for(const i in e){if(!e.hasOwnProperty(i))continue;const c=i;switch((0,s.assert)(c in t,`There is a '${c}' in study response, but it doesn't present in graphics info!`),c){case"hhists":_(this._hhists,e[c],t[c],this._indexes,r.materializeHHist);break;case"horizlines":_(this._horizlines,e[c],t[c],this._indexes,n.materializeHorizLine);break;case"vertlines":_(this._vertlines,e[c],t[c],this._indexes,o.materializeVertLine);break;case"polygons":_(this._polygons,e[c],t[c],this._indexes,a.materializePolygon);break;case"backgrounds":_(this._backgrounds,e[c],t[c],this._indexes,l.materializeBackground)}}this._hhistsByTimePointIndex=(0,c.splitHHistsByTimePointIndex)(this._hhists)}_processEraseCommands(e){for(const t of e)if("all"===t.action)this._clearPrimitives();else{const e=e=>e.deleteById(t.id);switch(t.type){case"horizlines":this._horizlines.forEach(e);break;case"vertlines":this._vertlines.forEach(e);break;case"lines":this._lines.forEach(e);break;case"hlines":this._hlines.forEach(e);break;case"textmarks":this._textmarks.forEach(e);break;case"shapemarks":this._shapemarks.forEach(e);break;case"backgrounds":this._backgrounds.forEach(e);break;case"polygons":this._polygons.forEach(e);break;case"trendchannels":this._trendchannels.forEach(e);break;case"hhists":this._hhists.forEach(e);break;case"dwglabels":this._dwglabels.forEach(e);break;case"dwglines":this._dwglines.forEach(e);break;case"dwgboxes":this._dwgboxes.forEach(e);break;case"dwgtables":this._dwgtables.forEach(e);break;case"dwgtablecells":this._dwgtablecells.forEach(e);break;case"dwglinefills":this._dwglinefills.forEach(e)}}this._hhistsByTimePointIndex=(0,c.splitHHistsByTimePointIndex)(this._hhists)}_clearPrimitives(){this._horizlines.clear(),this._vertlines.clear(),this._lines.clear(),this._hlines.clear(),this._textmarks.clear(),this._shapemarks.clear(),this._backgrounds.clear(),this._polygons.clear(),this._trendchannels.clear(),this._hhists.clear(),this._dwglabels.clear(),this._dwgboxes.clear(),this._dwglines.clear(),this._dwgtables.clear(),this._dwgtablecells.clear(),this._dwglinefills.clear(),this._hhistsByTimePointIndex=new Map}}class u{ +constructor(e,t){this._primitivesDataById=new Map,this._primitiveById=new Map,this._materializePrimitive=e,this._indexes=t}forEach(e,t){this._primitiveById.forEach((i=>{e.call(t,i,i,this)}))}has(e){let t=!1;return this._primitiveById.forEach((i=>{t=t||i===e})),t}get size(){return this._primitiveById.size}[Symbol.iterator](){return this._primitiveById.values()}entries(){throw new Error("Not implemented")}keys(){throw new Error("Not implemented")}values(){throw new Error("Not implemented")}hasId(e){return this._primitiveById.has(e)}addData(e){this._primitivesDataById.set(e.id,e),this._tryMaterialize(e)}deleteById(e){this._primitiveById.delete(e),this._primitivesDataById.delete(e)}clear(){this._primitivesDataById.clear(),this._primitiveById.clear()}replaceIndexesTo(e){this._indexes=e,this._primitiveById.clear(),this._primitivesDataById.forEach(this._tryMaterialize,this)}extract(){const e=new Set(this._primitivesDataById.values());return this._primitivesDataById=new Map,this._primitiveById.clear(),e}_tryMaterialize(e){const t=this._materializePrimitive(e,this._indexes);null!==t&&((0,s.assert)(!this._primitiveById.has(e.id),"primitive with specified id should not exist"),this._primitiveById.set(e.id,t))}}function p(e,t){const i=new Map;return e.forEach(((e,s)=>i.set(s,t(e)))),i}function _(e,t,i,r,n){if(void 0!==t)for(const o of t){const t=o.styleId;void 0!==i&&(0,s.assert)(t in i,"Every style used by graphics primitive should be declared in study metainfo");let a=e.get(t);void 0===a&&(a=new u(n,r),e.set(t,a)),o.data.forEach(a.addData.bind(a))}}},42454:(e,t,i)=>{"use strict";i.d(t,{materializePolygon:()=>n,dematerializePolygon:()=>o,isPolygonInBarsRange:()=>a});var s=i(33143),r=i(65447);function n(e,t){for(const i of e.points){if(i.index>=t.length)return null;if(t[i.index]===s.INVALID_TIME_POINT_INDEX)return null}return{points:e.points.map((e=>({index:t[e.index],offset:e.offset,level:e.level})))}}function o(e,t,i){return{id:t,points:e.points.map((e=>({...e,index:(0,r.ensureTimePointIndexIndex)(i.indexOf(e.index))})))}}function a(e,t){var i;if(e.points.some((e=>{var i;return t.contains(e.index+(null!==(i=e.offset)&&void 0!==i?i:0))})))return!0;let s=!1,r=!1;const n=t.firstBar();for(const t of e.points)t.index+(null!==(i=t.offset)&&void 0!==i?i:0){"use strict";i.d(t,{StaticStudyGraphics:()=>h,emptyStudyGraphics:()=>_,loadStudyGraphics:()=>m,saveStudyGraphics:()=>g});var s=i(33143),r=i(41837),n=i(61503),o=i(9822),a=i(42454),l=i(10623),c=i(83280);class h{constructor(e,t){if(this._indexes=[],this._horizlines=new Map,this._vertlines=new Map,this._lines=new Map,this._hlines=new Map,this._textmarks=new Map,this._shapemarks=new Map,this._backgrounds=new Map,this._polygons=new Map,this._trendchannels=new Map,this._hhists=new Map,this._dwglabels=new Map,this._dwglines=new Map,this._dwgboxes=new Map,this._dwgtables=new Map,this._dwgtablecells=new Map,this._dwglinefills=new Map,"data"===e){const e=t;this._indexes=e.indexes,this._vertlines=d(e.vertlines,this._indexes,n.materializeVertLine), +this._horizlines=d(e.horizlines,this._indexes,r.materializeHorizLine),this._polygons=d(e.polygons,this._indexes,a.materializePolygon),this._hhists=d(e.hhists,this._indexes,o.materializeHHist),this._backgrounds=d(e.backgrounds,this._indexes,l.materializeBackground)}else if("state"===e){const e=t;this._indexes=e.indexes||[],this._vertlines=u(e.vertlines,this._indexes,n.materializeVertLine),this._horizlines=u(e.horizlines,this._indexes,r.materializeHorizLine),this._polygons=u(e.polygons,this._indexes,a.materializePolygon),this._hhists=u(e.hhists,this._indexes,o.materializeHHist),this._backgrounds=u(e.backgrounds,this._indexes,l.materializeBackground)}this._hhistsByTimePointIndex=(0,c.splitHHistsByTimePointIndex)(this._hhists)}horizlines(){return this._horizlines}vertlines(){return this._vertlines}lines(){return this._lines}hlines(){return this._hlines}textmarks(){return this._textmarks}shapemarks(){return this._shapemarks}backgrounds(){return this._backgrounds}polygons(){return this._polygons}trendchannels(){return this._trendchannels}hhists(){return this._hhists}dwglabels(){return this._dwglabels}dwglines(){return this._dwglines}dwgboxes(){return this._dwgboxes}dwgtables(){return this._dwgtables}dwgtablecells(){return this._dwgtablecells}dwglinefills(){return this._dwglinefills}hhistsByTimePointIndex(){return this._hhistsByTimePointIndex}}function d(e,t,i){const s=new Map;return e.forEach(((e,r)=>{const n=s.get(r)||new Set;e.forEach((e=>{const s=i(e,t);null!==s&&n.add(s)})),s.set(r,n)})),s}function u(e,t,i){const s=new Map;if(void 0===e)return s;for(const r of e){const e=r.styleId,n=s.get(e)||new Set;r.data.forEach((e=>{const s=i(e,t);null!==s&&n.add(s)})),s.set(e,n)}return s}function p(e,t,i,s,r,n){const o=[];return e.forEach(((e,a)=>{e.forEach((e=>{(null===r||s(e,r))&&function(e,t,i){let s=null;for(const i of e)i.styleId===t&&(s=i);null===s&&(s={styleId:t,data:[]},e.push(s)),s.data.push(i)}(o,a,n(e,t(e),i))}))})),o.length>0?o:void 0}function _(){return new h}function m(e){return new h("state",e)}function g(e,t){const i=function(e){const t=new Set;e.horizlines().forEach(((e,i)=>{e.forEach((e=>{t.add(e.startIndex),t.add(e.endIndex)}))})),e.vertlines().forEach(((e,i)=>{e.forEach((e=>{t.add(e.index)}))})),e.lines().forEach(((e,i)=>{e.forEach((e=>{t.add(e.startIndex),t.add(e.endIndex)}))})),e.textmarks().forEach(((e,i)=>{e.forEach((e=>{t.add(e.time)}))})),e.shapemarks().forEach(((e,i)=>{e.forEach((e=>{t.add(e.time)}))})),e.backgrounds().forEach(((e,i)=>{e.forEach((e=>{t.add(null!==e.start?e.start:s.INVALID_TIME_POINT_INDEX),t.add(e.stop)}))})),e.polygons().forEach(((e,i)=>{e.forEach((e=>{e.points.forEach((e=>{t.add(e.index)}))}))})),e.trendchannels().forEach(((e,i)=>{e.forEach((e=>{t.add(e.startIndex),t.add(e.endIndex)}))})),e.hhists().forEach(((e,i)=>{e.forEach((e=>{t.add(e.firstBarTime),t.add(e.lastBarTime)}))})),e.dwglabels().forEach(((e,i)=>{e.forEach((e=>{t.add(e.x)}))})),e.dwglines().forEach(((e,i)=>{e.forEach((e=>{var i,r;t.add(null!==(i=e.x1)&&void 0!==i?i:s.INVALID_TIME_POINT_INDEX), +t.add(null!==(r=e.x2)&&void 0!==r?r:s.INVALID_TIME_POINT_INDEX)}))})),e.dwgboxes().forEach(((e,i)=>{e.forEach((e=>{var i,r;t.add(null!==(i=e.left)&&void 0!==i?i:s.INVALID_TIME_POINT_INDEX),t.add(null!==(r=e.right)&&void 0!==r?r:s.INVALID_TIME_POINT_INDEX)}))}));const i=Array.from(t);return i.sort(((e,t)=>e-t)),i}(e),c={indexes:i};let h=0;const d=()=>++h;return c.vertlines=p(e.vertlines(),d,i,n.isVertLineInBarsRange,t,n.dematerializeVertLine),c.horizlines=p(e.horizlines(),d,i,r.isHorizLineInBarsRange,t,r.dematerializeHorizLine),c.polygons=p(e.polygons(),d,i,a.isPolygonInBarsRange,t,a.dematerializePolygon),c.hhists=p(e.hhists(),d,i,o.isHHistInBarsRange,t,o.dematerializeHHist),c.backgrounds=p(e.backgrounds(),d,i,l.isBackgroundInBarsRange,t,l.dematerializeBackground),c}},89:(e,t,i)=>{"use strict";var s,r,n,o;i.d(t,{MarkLocation:()=>s,HAlign:()=>r,LineStyle:()=>o}),function(e){e.AboveBar="AboveBar",e.BelowBar="BelowBar",e.Top="Top",e.Bottom="Bottom",e.Right="Right",e.Left="Left",e.Absolute="Absolute",e.AbsoluteUp="AbsoluteUp",e.AbsoluteDown="AbsoluteDown"}(s||(s={})),function(e){e.Left="left",e.Center="center",e.Right="right"}(r||(r={})),function(e){e.Top="top",e.Middle="middle",e.Bottom="bottom"}(n||(n={})),function(e){e[e.Solid=0]="Solid",e[e.Dotted=1]="Dotted",e[e.Dashed=2]="Dashed"}(o||(o={}))},83280:(e,t,i)=>{"use strict";i.d(t,{primitivesZOrders:()=>r,isStudyGraphicsEmpty:()=>n,splitHHistsByTimePointIndex:()=>o});const s=["horizlines","vertlines","lines","hlines","textmarks","shapemarks","backgrounds","polygons","trendchannels","hhists","dwglabels","dwglines","dwgboxes","dwgtables","dwgtablecells","dwglinefills"],r=new Map([["polygons",-4],["trendchannels",-3],["textmarks",-2],["shapemarks",-2],["backgrounds",-1],["hlines",1],["horizlines",1],["hhists",1],["dwglinefills",2],["vertlines",3],["lines",3],["dwglines",3],["dwgboxes",4],["dwglabels",5],["dwgtables",6],["dwgtablecells",6]]);function n(e){return!s.some((t=>e[t]().size>0))}function o(e){const t=new Map;return e.forEach(((e,i)=>{e.forEach((e=>{const s={...e,styleId:i},r=e.firstBarTime;let n=t.get(r);void 0===n&&(n=new Set,t.set(r,n)),n.add(s)}))})),t}},61503:(e,t,i)=>{"use strict";i.d(t,{materializeVertLine:()=>n,dematerializeVertLine:()=>o,isVertLineInBarsRange:()=>a});var s=i(33143),r=i(65447);function n(e,t){if(e.index>=t.length)return null;const i=t[e.index];return i===s.INVALID_TIME_POINT_INDEX?null:{startPrice:e.startPrice,endPrice:e.endPrice,index:i,extendTop:e.extendTop,extendBottom:e.extendBottom}}function o(e,t,i){const s=(0,r.ensureTimePointIndexIndex)(i.indexOf(e.index));return{id:t,...e,index:s}}function a(e,t){return t.contains(e.index)}},58040:(e,t,i)=>{"use strict";i.d(t,{HHistBasedValuesProvider:()=>_});var s=i(50335),r=i(50151),n=i(49483),o=i(33639),a=i(76076),l=i(48566),c=i(9822),h=i(28667),d=i(2);function u(e,t="",i=""){return{id:t,index:e,title:i,value:"",visible:!1}}const p=n.CheckMobile.any();class _{constructor(e,t){this._emptyValues=[],this._study=e,this._model=t, +void 0!==this._study.metaInfo().graphics.hhists&&this._emptyValues.push(u(0),u(1),u(2))}getItems(){return this._emptyValues}getValues(e){var t,i;const n=this._emptyValues.map((e=>({...e})));n.forEach((e=>{e.visible=this._study.isVisible(),e.value=d.notAvailable}));const a=this._study.properties().childs().inputs.childs().volume.value();switch(a){case c.HHistVolumeMode.UpDown:n[0].title="Up",n[1].title="Down",n[2].title="Total";break;case c.HHistVolumeMode.Total:n[0].title="Total",n[1].visible=!1,n[2].visible=!1;break;case c.HHistVolumeMode.Delta:n[0].title="Delta",n[1].title="Max(Up, Down)",n[2].title="Total"}const h=this._study.priceScale(),u=this._model.timeScale();if(null===h||h.isEmpty()||u.isEmpty()||this._hideValues())return n;if(null===e||!isFinite(e)){const t=this._study.data().last();if(null===t)return n;e=t.index}const p=this._model.crossHairSource(),_=p.price;if(!isFinite(p.y)&&(e=function(e,t){var i;const s=null===(i=e.visibleBarsStrictRange())||void 0===i?void 0:i.lastBar();if(!s)return null;const r=t.data().search(s,o.PlotRowSearchMode.NearestLeft);return r?r.index:null}(this._model.timeScale(),this._model.mainSeries()),null===e))return n;const m=function(e,t,i,s){if(0===e.size)return null;if(!i){const e=(0,r.ensureNotNull)(s.data().valueAt(t));i=s.barFunction()(e)}const n=function(e,t){let i=null;return e.forEach(((e,s)=>{s<=t&&(null===i||s>i)&&(i=s)})),i}(e,t);if(null===n)return null;const o=e.get(n);if(!o||0===o.size)return null;return function(e,t){let i=null;return e.forEach((e=>{e.priceLow<=t&&t{e.value="0"})),n;const g=this._study.metaInfo().graphics.hhists;if(void 0===g)return n;if(void 0===g[m.styleId])return n;const f=null===(i=null===(t=this._study.properties().childs().graphics.childs().hhists)||void 0===t?void 0:t.childs()[m.styleId])||void 0===i?void 0:i.childs(),v=new l.VolumeFormatter,S=e=>(0,s.isNumber)(e)?v.format(e):"";if(a!==c.HHistVolumeMode.Delta){if(m.rate.forEach(((e,t)=>{n[t].value=S(e),n[t].color=(0,r.ensureDefined)(f).colors[t].value()})),a===c.HHistVolumeMode.UpDown){const e=m.rate[0]+m.rate[1];n[2].value=S(e),n[2].color=(0,r.ensureDefined)(f).valuesColor.value()}}else{const e=m.rate[0]>m.rate[1]?0:1,t=(0,r.ensureDefined)(f).colors[e].value(),i=m.rate[0]+m.rate[1];[2*m.rate[e]-i,m.rate[e],i].forEach(((e,i)=>{n[i].value=S(e),n[i].color=t}))}return n}_hideValues(){return p&&(null===this._model.crossHairSource().pane||(0,h.isLineToolName)(a.tool.value())||null!==this._model.lineBeingEdited())}}},39947:(e,t,i)=>{"use strict";var s;i.d(t,{StudyStatusType:()=>s}),function(e){e[e.Undefined=0]="Undefined",e[e.Loading=1]="Loading",e[e.Completed=2]="Completed",e[e.Error=3]="Error"}(s||(s={}))},27678:(e,t,i)=>{"use strict";var s;i.d(t,{InsertionErrorCode:()=>s}),function(e){e.StudyCannotBeChild="cannot_be_child",e.StubWasRemoved="stub_was_removed",e.CannotGetMetainfo="cannot_get_metainfo",e.Cancelled="cancelled",e.Unknown="unknown"}(s||(s={}))}, +24760:(e,t,i)=>{"use strict";i.d(t,{makeNextSymbolId:()=>r,makeNextStudyId:()=>o});let s=0;function r(){return s++,"ss_"+s}let n=0;function o(){return n++,"st"+n}},43654:(e,t,i)=>{"use strict";i.d(t,{migrateMetaInfoAndPropState:()=>p});var s=i(50151),r=i(58403),n=i(65665);const o=["Moving Average@tv-basicstudies","Moving Average Exponential@tv-basicstudies"];class a{targetMetaInfoVersion(){return 53}migrateMetaInfo(e){const t=e;e._metainfoVersion=53,o.includes(t.id)}migratePropState(e){var t,i,s;o.includes(e.id)&&(e.inputs.length=null!==(t=e.inputs.length)&&void 0!==t?t:e.inputs.in_0,e.inputs.source=null!==(i=e.inputs.source)&&void 0!==i?i:e.inputs.in_1,e.inputs.offset=null!==(s=e.inputs.offset)&&void 0!==s?s:e.inputs.in_2,delete e.inputs.in_0,delete e.inputs.in_1,delete e.inputs.in_2,e.plots[1]={id:"smoothedMA",type:"line"},e.styles.smoothedMA={display:0,linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#0496ff",histogramBase:0,joinPoints:!1,title:"Smoothed MA"})}}const l=["Volume@tv-basicstudies"];class c{targetMetaInfoVersion(){return 53}migrateMetaInfo(e){const t=e;e._metainfoVersion=53,l.includes(t.id)}migratePropState(e){var t;l.includes(e.id)&&(e.inputs.maLength=null!==(t=e.inputs.length)&&void 0!==t?t:e.inputs.maLength,delete e.inputs.length,delete e.inputs.offset,delete e.inputs.source,e.plots[1]={id:"smoothedMA",type:"line"},e.styles.smoothedMA={display:0,linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#0496ff",histogramBase:0,joinPoints:!1,title:"Smoothed MA"})}}const h=["Relative Strength Index@tv-basicstudies","Commodity Channel Index@tv-basicstudies","On Balance Volume@tv-basicstudies"];class d{targetMetaInfoVersion(){return 53}migrateMetaInfo(e){const t=e;e._metainfoVersion=53,h.includes(t.id)}migratePropState(e){h.includes(e.id)&&(e.plots[1]={id:"smoothedMA",type:"line"},e.styles.smoothedMA={display:0,linestyle:0,linewidth:1,plottype:0,trackPrice:!1,transparency:0,color:"#0496ff",histogramBase:0,joinPoints:!1,title:"Smoothed MA"})}}const u=[new class{targetMetaInfoVersion(){return 47}migrateMetaInfo(e){const t=e,i=e;if(i._metainfoVersion=47,!t.defaults||void 0===t.defaults.precision)return void(i.format={type:"inherit"});const s=t.defaults&&t.defaults.precision,r=(0,n.isNumber)(s)?s:parseInt(s);0===r?i.format={type:"volume"}:isFinite(r)?i.format={type:"price",precision:r}:i.format={type:"inherit"},delete t.defaults.precision}migratePropState(e){}},new class{targetMetaInfoVersion(){return 50}migrateMetaInfo(e){const t=e,i=e;if(i._metainfoVersion=50,void 0===t.defaults||void 0===t.defaults.ohlcPlots||void 0===t.ohlcPlots)return;const r=t.ohlcPlots,n=t.defaults.ohlcPlots,o=(0,s.ensureDefined)((0,s.ensureDefined)(i.defaults).ohlcPlots);for(const e of Object.keys(n)){const t=n[e];if("ohlc_candles"===t.plottype){let i=!1;const s=r[e];void 0!==s&&(i=!!s.drawBorder,delete s.drawBorder),o[e]={borderColor:"#000000",drawBorder:i,...t}}}}migratePropState(e){}},new class{targetMetaInfoVersion(){return 53}migrateMetaInfo(e){const t=e,i=e;if(i._metainfoVersion=53, +void 0!==t.defaults){if(void 0!==t.defaults.ohlcPlots&&void 0!==t.ohlcPlots){const e=Object.keys(t.ohlcPlots),r=t.defaults.ohlcPlots,n=(0,s.ensureDefined)((0,s.ensureDefined)(i.defaults).ohlcPlots);for(const t of e){const e=r[t];if(void 0===e||void 0===e.visible)continue;const i=e.visible?15:0;delete e.visible,n[t]={display:i,...e}}}if(void 0!==t.defaults.styles&&void 0!==t.plots){const e=t.plots.map((e=>e.id)),r=t.defaults.styles,n=(0,s.ensureDefined)((0,s.ensureDefined)(i.defaults).styles);for(const t of e){const e=r[t];if(void 0===e||void 0===e.visible)continue;const i=e.visible?15:0;delete e.visible,n[t]={display:i,...e}}}}}migratePropState(e){if(e.ohlcPlots)for(const t of Object.keys(e.ohlcPlots)){const i=(0,s.ensureDefined)(e.ohlcPlots[t]);void 0!==i.visible&&(i.display=i.visible?15:0,delete i.visible)}if(e.styles)for(const t of Object.keys(e.styles)){const i=(0,s.ensureDefined)(e.styles[t]);void 0!==i.visible&&(i.display=i.visible?15:0,delete i.visible)}}}];function p(e,t){const i=r.StudyMetaInfo.versionOf(e),n=e;void 0===n._serverMetaInfoVersion&&(n._serverMetaInfoVersion=i);const o=["PennantCP@tv-basicstudies","WedgeCP@tv-basicstudies"].includes(e.id);u.forEach((r=>{(i<0||i>=r.targetMetaInfoVersion())&&!o||(r.migrateMetaInfo(e),void 0!==t&&r.migratePropState(t),(0,s.assert)(e._metainfoVersion===r.targetMetaInfoVersion()))}))}u.push(new a),u.push(new c),u.push(new d),u.sort((function(e,t){return e.targetMetaInfoVersion()-t.targetMetaInfoVersion()}))},71479:(e,t,i)=>{"use strict";i.d(t,{isNonSeriesStudy:()=>n,NonSeriesStudy:()=>o});var s=i(50151),r=i(68927);function n(e){return e instanceof o}class o extends r.Study{clearData(){this._customData=null,this._indexes=null}restoreData(e,t,i){super.restoreData(e),this._customData=t,this._indexes=i}state(e){const t=super.state(e);return e&&(t.nonSeriesData=this._customData,t.indexes=this._indexes),t}customData(){return this._customData}_setPaneViews(e){this._paneViews=e,this.model().lightUpdate()}_onDataUpdated(e,t,i){null!==t&&(t.indexes_replace?((0,s.assert)("nochange"!==i),this._indexes=i):(this._customData=t.data,"nochange"!==i&&(this._indexes=i))),super._onDataUpdated(e,t,i)}}},13850:(e,t,i)=>{"use strict";i.d(t,{OverlayLegendValuesProvider:()=>P});var s=i(1930),r=i(50335),n=i(44352),o=i(49483),a=i(38031),l=i(80142),c=i(18766),h=i(86061),d=i(33639),u=i(76076),p=i(57757),_=i(2250),m=i(49897),g=i(28667),f=i(2);const v=o.CheckMobile.any(),S=v&&!0,y=new c.PercentageFormatter,b=f.notAvailable,w=`${b} (${b}%)`;class P extends class{constructor(e,t){this._study=e,this._model=t,this._emptyValues=[{title:n.t(null,void 0,i(39280)),visible:!1,value:"",index:0,id:""},{title:n.t(null,void 0,i(30777)),visible:!1,value:"",index:1,id:""},{title:n.t(null,void 0,i(8136)),visible:!1,value:"",index:2,id:""},{title:n.t(null,void 0,i(31691)),visible:!1,value:"",index:3,id:""},{title:"",visible:!1,value:"",index:4,id:""},{title:"",visible:!1,value:"",index:5,id:""},{title:n.t(null,void 0,i(49329)),visible:!1,value:"",index:6,id:""}]}getItems(){return this._emptyValues}getValues(e){ +var t;const i=this._emptyValues.map((e=>({...e})));if(this._model.timeScale().isEmpty())return i;if(0===this._study.data().size())return i;const s=this._showLastPriceAndChangeOnly();if((0,r.isNumber)(e)||(s?e=this._study.data().lastIndex():(e=this._model.crossHairSource().appliedIndex(),(0,r.isNumber)(e)||(e=this._study.data().lastIndex()))),null===e||!(0,r.isNumber)(e))return i;const n=this._study.data().search(e,d.PlotRowSearchMode.NearestLeft,1),o=this._model.backgroundTopColor().value();if(null===n)return i;const c=n.index,u=n.value,p=u[1],g=u[2],f=u[3],v=u[4];i[0].value=b,i[1].value=b,i[2].value=b,i[3].value=b,i[6].value=w;for(const e of i)e.visible=!s;const P=i[4];P.visible=!1;const{values:C}=this._changesData(v,p,c,s),T=(0,m.getPriceValueFormatterForSource)(this._study);if((0,m.shouldBeFormattedAsPercent)(this._study)||(0,m.shouldBeFormattedAsIndexedTo100)(this._study))i[6].value="";else if(void 0!==C){const e=this._study.formatter();i[6].value=(0,l.forceLTRStr)(`${e.format(C.change,!0)} (${y.format(C.percentChange,!0)})`)}s?(i[5].value=null==v?b:T(v),i[5].visible=!0,i[6].visible=!0):(i[0].value=null==p?b:T(p),i[1].value=null==g?b:T(g),i[2].value=null==f?b:T(f),i[3].value=null==v?b:T(v),P.value=T(this._study.barFunction()(u)),i[5].visible=!1);let x=null;if(s&&!S)x=void 0===C||C.change>=0?_.SeriesBarColorer.upColor(this._study.properties()):_.SeriesBarColorer.downColor(this._study.properties());else{const e=this._study.barColorer().barStyle(c,!1),i=null!==(t=e.barBorderColor)&&void 0!==t?t:e.barColor;x=(0,h.calculateColor)(o,i)}x=(0,a.resetTransparency)((0,h.calculateColor)(o,x));for(const e of i)e.color=x;return i}_showLastPriceAndChangeOnly(){return v&&(null===this._model.crossHairSource().pane||(0,g.isLineToolName)(u.tool.value())||null!==this._model.lineBeingEdited())}_changesData(e,t,i,s){var r;if(s&&!S){const e=this._study.quotes();if(null!==e)return{values:{change:null!==e.change?e.change:0,percentChange:null!==e.change_percent?e.change_percent:0},priceDirection:{basedOnCurrentBar:null!==e.change&&e.change>=0?0:1,basedOnPrevClose:null!==e.change&&e.change>=0?0:1}}}else{const s=this._study.data().search(i-1,d.PlotRowSearchMode.NearestLeft,1),n=null!==(r=null==s?void 0:s.value[4])&&void 0!==r?r:null;if(null!==n&&null!=e&&null!=t)return{values:{change:e-n,percentChange:(0,p.barPercentChange)(n,e)},priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=n?0:1}}}return null==e||null==t?{}:{priceDirection:{basedOnCurrentBar:e>=t?0:1,basedOnPrevClose:e>=t?0:1}}}}{constructor(e,t){super(e,t);const i=t.properties().childs().paneProperties.childs().legendProperties.childs();this._showBarChange=i.showBarChange,this._showSeriesOHLC=i.showSeriesOHLC,this._seriesStyle=e.properties().childs().style}getValues(e){const t=super.getValues(e);if(!this._showLastPriceAndChangeOnly()){const e=this._seriesStyle.value(),i=(0,s.isPriceSourceStyle)(e),r=12===e,n=this._showSeriesOHLC.value(),o=n&&!i,a=n&&i;t[0].visible=o&&!r,t[1].visible=o,t[2].visible=o,t[3].visible=o&&!r,t[6].visible=this._showBarChange.value()&&!r, +t[4].visible=a}return t}}},41365:(e,t,i)=>{"use strict";i.d(t,{OverlayStatusProvider:()=>r});var s=i(89111);class r extends s.StudyStatusProvider{getSplitTitle(){return this._source.titleInParts(!0,void 0,!1,!1)}text(){return this._source.isActualInterval()?this._source.isFailed()?`${this._source.title(!0,void 0,!1,!1)}: ${this.sourceStatusText()}`:`${this._source.title(!0,void 0,!1,!1)} ${this.sourceStatusText()}`:this._source.title(!0,void 0,!1,!1)}}},5268:(e,t,i)=>{"use strict";i.d(t,{PivotPointsStandardLastPricesView:()=>o});var s=i(33639);const r=["p","s1","r1","s2","r2","s3","r3","s4","r4","s5","r5"],n={P:"P",S1:"S1/R1",S2:"S2/R2",S3:"S3/R3",S4:"S4/R4",S5:"S5/R5",R1:"S1/R1",R2:"S2/R2",R3:"S3/R3",R4:"S4/R4",R5:"S5/R5"};class o{constructor(e){this._visiblePivots=new Set,this._invidated=!0,this._prices=[],this._source=e}visiblePivots(){return this._visiblePivots}update(){this._invidated=!0}prices(){return this._invidated&&(this._updateImpl(),this._invidated=!1),this._prices}_updateImpl(){this._visiblePivots.clear();const e=this._source.model(),t=this._source.priceScale();if(null===t)return;if(e.timeScale().isEmpty()||t.isEmpty())return;const i=e.timeScale().visibleBarsStrictRange();if(null===i)return;if(!this._source.customData()||!this._source.customData().pivots)return;const o=e.mainSeries().bars().search(i.lastBar(),s.PlotRowSearchMode.NearestLeft);if(null===o)return;const a=o.index,l=this._source.customData().pivots,c=this._source.indexes(),h=this._source.properties().childs(),d=this._source.firstValue();for(let e=0;e=a||o)){this._visiblePivots.add(l[e]),this._prices=[];for(let i=0;i{"use strict";i.d(t,{PaneRendererStandardPivotLabel:()=>r});var s=i(14888);class r{constructor(e,t,i){this._drawRects=[],this._cacheProvider=e,this._point=t,this._label=i}draw(e,t){const i=this._cacheProvider(t);e.save(),e.setTransform(1,0,0,1,0,0);const s=t.pixelRatio;this._drawRects=[];const r=t=>{const r=i.labelRectByIndex(t),n={left:Math.round(this._point.x-r.width+o),top:Math.round(this._point.y-r.height/2),width:r.width,height:r.height};return e.drawImage(i.canvas(),Math.round(r.left*s),Math.round(r.top*s),r.width*s,r.height*s,Math.round(n.left*s),Math.round(n.top*s),n.width*s,n.height*s),this._drawRects.push(n),r.width},n=this._label.split("/");let o=0;for(let e=0;e0&&(o+=r(t+11)/2),o+=r(t)/2}e.restore()}hitTest(e){for(const t of this._drawRects)if(e.x>=t.left&&e.x<=t.left+t.width&&e.y>=t.top&&e.y<=t.top+t.height)return new s.HitTestResult(s.HitTestResult.REGULAR);return null}}},36537:(e,t,i)=>{"use strict";i.d(t,{ +StandardPivotPointsImageCache:()=>o});var s=i(27714),r=i(83499),n=i(50151);class o{constructor(e,t,i,r){this._priceAxisFontSize=11,this._prices=[],this._labelWidth=0,this._paneRenderParams=e,this._recreateCanvasAndContext((0,s.size)({width:0,height:0})),this.reset({font:t,fontSize:i,backColors:r})}destroy(){delete this._canvas,delete this._cache}canvas(){return this._canvas}reset(e){this._renderParams=e,this._prices=[],this._cache.font=e.fontSize+"px "+e.font,this._labelWidth=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5","/"].reduce(((e,t)=>{const i=this._cache.measureText(t).width;return Math.max(i,e)}),0)}rowHeight(){return this._priceAxisFontSize+4}labelRectByIndex(e){return{left:0,top:Math.round(this._topByIndex(e)),width:Math.round(this._labelWidth+4),height:Math.round(this._renderParams.fontSize+8)}}setPrices(e){let t=!1;const i=(e,t)=>{const i=void 0===e,s=void 0===t;return(!i&&!s||i===s)&&(0,n.ensureDefined)(e).formatted===(0,n.ensureDefined)(t).formatted};if(e.length!==this._prices.length)t=!0;else for(let s=0;s{this._cache.translate(.5,.5),this._cache.font=this._renderParams.fontSize+"px "+this._renderParams.font,this._cache.textBaseline="middle";for(let e=0;e{"use strict";i.d(t,{StandardPivotPointsPriceAxisView:()=>o});var s=i(67876),r=i(38031);const n=["P","S1","R1","S2","R2","S3","R3","S4","R4","S5","R5"];class o extends s.PriceAxisView{constructor(e,t){super(),this._source=e,this._data=t;const i=t.name;this._completeName="P"===i.toUpperCase()?"P":`S${i[1]}/R${i[1]}`}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const s=this._source.properties().childs();if(!s.visible.value())return;const o=this._completeName,a=s.levelsStyle.childs().visibility.childs();if(!a[o]||!a[o].value())return;const l=this._source.model().timeScale(),c=this._source.priceScale();if(l.isEmpty()||null===l.visibleBarsStrictRange()||null!==c&&c.isEmpty())return;const h=this._source.customData();if(!h||!h.pivots)return +;const d=this._source.pricesView().prices()[n.indexOf(this._data.name.toUpperCase())];if(!d)return;i.background=(0,r.resetTransparency)(d.color),i.textColor=this.generateTextColor(i.background),i.coordinate=d.coordinate,i.floatCoordinate=d.floatCoordinate;const u=this._source.model().properties().childs().scalesProperties.childs();u.showStudyLastValue.value()&&(e.text=d.formatted,e.visible=!0),u.showStudyPlotLabels.value()&&(t.text=this._source.priceLabelText(this._data.name),t.visible=!0)}}},24680:(e,t,i)=>{"use strict";var s=i(23304).PriceRange,r=i(86441).Point,n=i(66019).StudyStatusView,o=i(35823).StudyDataWindowView,a=i(71479).NonSeriesStudy,l=i(59291).StandardPivotPointsPriceAxisView,c=i(64636).PanePriceAxisView,h=i(14888).HitTestResult,d=i(29639).CompositeRenderer,u=i(10773).areEqualPaneRenderParams,p=i(36537).StandardPivotPointsImageCache,_=i(5268).PivotPointsStandardLastPricesView,m=i(34572).PaneRendererStandardPivotLabel,g=i(2945).HorizontalLineRenderer,f=i(17364);const{LINESTYLE_SOLID:v}=i(53479);class S{constructor(e,t){this._model=e,this._source=t,this._pivots=[],this._textCache={}}setCache(e){this._cache=e}priceAxisViews(e,t){return this._priceAxisViews}mergeLabel(e,t,i){var s=""+t;void 0===e[s]?(e[s]={},e[s].text=i,e[s].ids=[this.complete(i)]):(e[s].text+="/"+i,e[s].ids.push(this.complete(i)))}complete(e){return"P"===e?e:"S"+e[1]+"/R"+e[1]}update(){this._invalidated=!0}_updateImpl(){if(this._source.pricesView().prices(),this._pivots=[],this._source.customData()&&this._source.customData().pivots&&this._source.properties().visible.value()){var e=this._source.customData().pivots,t=this._source._indexes,i=this._model.timeScale(),s=this._source.priceScale();if(s&&!s.isEmpty()&&!i.isEmpty()&&e){var r=i.visibleBarsStrictRange(),n=r.firstBar(),o=r.lastBar();if(this._source.ownerSource())for(var a=this._source.ownerSource().firstValue(),l=0;lo)){var d={},u=this._source.properties().levelsStyle.visibility;u.P.value()&&this.mergeLabel(d,e[l].p,"P"),u["S1/R1"].value()&&(this.mergeLabel(d,e[l].s1,"S1"),this.mergeLabel(d,e[l].r1,"R1")),u["S2/R2"].value()&&(this.mergeLabel(d,e[l].s2,"S2"),this.mergeLabel(d,e[l].r2,"R2")),u["S3/R3"].value()&&(this.mergeLabel(d,e[l].s3,"S3"),this.mergeLabel(d,e[l].r3,"R3")),u["S4/R4"].value()&&(this.mergeLabel(d,e[l].s4,"S4"),this.mergeLabel(d,e[l].r4,"R4")),u["S5/R5"].value()&&(this.mergeLabel(d,e[l].s5,"S5"),this.mergeLabel(d,e[l].r5,"R5"));var p=i.indexToCoordinate(c),_=i.indexToCoordinate(h);for(var m in d){var g=parseFloat(m),f=s.priceToCoordinate(g,a);this._pivots.push({x1:p,x2:_,y:f,label:d[m].text,labelIds:d[m].ids,src:e[l]})}}}}}}renderer(){this._invalidated&&(this._updateImpl(),this._invalidated=!1);for(var e=new d,t=this._source.properties().levelsStyle.colors,i=this._source.properties().levelsStyle.widths,s=this._source.visiblePivots(),n=0;nt)){var l=[],c=this._properties.levelsStyle.visibility;c.P.value()&&l.push(i[o].p),c["S1/R1"].value()&&l.push(i[o].s1,i[o].r1),c["S2/R2"].value()&&l.push(i[o].s2,i[o].r2),c["S3/R3"].value()&&l.push(i[o].s3,i[o].r3),c["S4/R4"].value()&&l.push(i[o].s4,i[o].r4),c["S5/R5"].value()&&l.push(i[o].s5,i[o].r5);for(var h=0;h{"use strict";function s(e){e.lineWidth=void 0,e.lineStyle=void 0;for(let t=0;ts,createEmptyStyle:()=>r})},73195:(e,t,i)=>{"use strict";i.d(t,{PaneRendererColumns:()=>r});var s=i(14888);class r{constructor(e){this._data=null,this._precalculatedCache=[],this.setData(e)}setData(e){this._data=e,this._precalculatedCache=[]}draw(e,t){var i,s,r,n;if(null===this._data||0===this._data.items.length)return;const o=t.pixelRatio;this._precalculatedCache.length||this._fillPrecalculatedCache(o);const a=Math.max(1,Math.floor(o)),l=Math.round(this._data.histogramBase*o)-Math.floor(a/2),c=l+a,h=this._data.lineColor,d=null!==(s=null===(i=this._data.visibleItemsRange)||void 0===i?void 0:i.startItemIndex)&&void 0!==s?s:0,u=(null!==(n=null===(r=this._data.visibleItemsRange)||void 0===r?void 0:r.endItemIndex)&&void 0!==n?n:this._data.items.length)-1;for(let t=d;t<=u;t++){const i=this._data.items[t],s=this._precalculatedCache[t-d],r=Math.round(i.y*o),n=i.style?i.style.color:h;let u,p;e.fillStyle=n,r<=l?(u=r,p=c):(u=l,p=r-Math.floor(a/2)+a),e.fillRect(s.left,u,s.right-s.left+1,p-u)}}hitTest(e){var t,i,r,n;if(null===this._data)return null;const o=.5*this._data.barSpacing,a=e.x-o,l=e.x+o,c=null!==(i=null===(t=this._data.visibleItemsRange)||void 0===t?void 0:t.startItemIndex)&&void 0!==i?i:0,h=(null!==(n=null===(r=this._data.visibleItemsRange)||void 0===r?void 0:r.endItemIndex)&&void 0!==n?n:this._data.items.length)-1;for(let t=c;t<=h;t++){const i=this._data.items[t],r=i.x;if(r>=a&&r<=l){const t=i.y;if(e.y>=Math.min(t,this._data.histogramBase)&&e.y<=Math.max(t,this._data.histogramBase))return new s.HitTestResult(s.HitTestResult.REGULAR)}}return null}_fillPrecalculatedCache(e){var t,i,s,r;if(null===this._data||0===this._data.items.length)return void(this._precalculatedCache=[]) +;const n=Math.ceil(this._data.barSpacing*e)<=1?0:Math.max(1,Math.floor(e)),o=Math.round(this._data.barSpacing*e)-n,a=null!==(i=null===(t=this._data.visibleItemsRange)||void 0===t?void 0:t.startItemIndex)&&void 0!==i?i:0,l=(null!==(r=null===(s=this._data.visibleItemsRange)||void 0===s?void 0:s.endItemIndex)&&void 0!==r?r:this._data.items.length)-1,c=l-a+1;if(c<=0)return void(this._precalculatedCache=[]);this._precalculatedCache=new Array(c);for(let t=a;t<=l;t++){const i=this._data.items[t],s=Math.round(i.x*e);let r,n;if(o%2){const e=(o-1)/2;r=s-e,n=s+e}else{const e=o/2;r=s-e,n=s+e-1}this._precalculatedCache[t-a]={left:r,right:n,roundedCenter:s,center:i.x*e,time:i.timePointIndex}}for(let e=a+1;e<=l;e++){const t=this._precalculatedCache[e-a],i=this._precalculatedCache[e-a-1];t.time===i.time+1&&(t.left-i.right!==n+1&&(i.roundedCenter>i.center?i.right=t.left-n-1:t.left=i.right+n+1))}let h=Math.ceil(this._data.barSpacing*e);for(let e=a+1;e<=l;e++){const t=this._precalculatedCache[e-a];t.right0&&h<4)for(let e=a+1;e<=l;e++){const t=this._precalculatedCache[e-a];t.right-t.left+1>h&&(t.roundedCenter>t.center?t.right-=1:t.left+=1)}}}},76267:(e,t,i)=>{"use strict";i.d(t,{StudyPlotPaneView:()=>V});var s=i(50151),r=i(86441),n=i(24377),o=i(2484),a=i(91031),l=i(65665),c=i(38031),h=i(85228);function d(e,t){const i=new Map;return function(...s){const r=""+(t?t.apply(null,s):s[0]);if(!i.has(r)){const t=e.apply(this,s);return i.set(r,t),t}return i.get(r)}}var u=i(14888),p=i(28962),_=i(29639),m=i(76078),g=i(19773),f=i(47149),v=i(53074),S=i(38217),y=i(55014),b=i(49483);class w{constructor(e){this._data=e}draw(e,t){var i,s,r,n;const o=this._data,a=t.pixelRatio,c=Math.max(1,Math.floor(a))%2?.5:0,h=o.vertOffset||0,d=o.lineColor||o.color,u=o.lineWidth||o.height/2;let p="",_=!1;const m=null!==(s=null===(i=o.visibleItemsRange)||void 0===i?void 0:i.startItemIndex)&&void 0!==s?s:0,g=null!==(n=null===(r=o.visibleItemsRange)||void 0===r?void 0:r.endItemIndex)&&void 0!==n?n:o.items.length;for(let t=m;t{const t=(0,n.rgbToHsl)((0,n.parseRgb)(e)),i=t[0]+.05;return t[0]=i-Math.floor(i),(0,n.rgbToHexString)((0,n.hslToRgb)(t))},E=d(k);function D(e,t){if(null===e)return t;const i=e.firstIndex,s=t.firstIndex,r=e.clearData||t.clearData;return{firstIndex:r||void 0===i||void 0===s?void 0:Math.min(i,s),clearData:r}}const B=new Set([I.LineStudyPlotStyle.Line,I.LineStudyPlotStyle.Area,I.LineStudyPlotStyle.Circles,I.LineStudyPlotStyle.Cross,I.LineStudyPlotStyle.StepLine,I.LineStudyPlotStyle.StepLineWithDiamonds]);class V{ +constructor(e,t,i,s,r=!1){this._histogramBase=null,this._items=[],this._lastConfirmedSeriesBarCoordinate=NaN,this._selectionData=null,this._lineColor="",this._lineWidth=1,this._color1="",this._color2="",this._dataInvalidated=null,this._viewportInvalidated=!1,this._renderer=new _.CompositeRenderer,this._isMarkersEnabled=o.enabled("source_selection_markers"),this._study=e,this._series=t,this._model=i,this._plotName=s,this._plotIndex=e.metaInfo().plots.findIndex((e=>e.id===s)),this._colorProvider=(0,M.createStudyPlotColorProvider)(e.metaInfo(),e.properties(),s),this._selectionIndexer=new f.SelectionIndexes(i.timeScale()),this._extendStepLineToBarsEndings=r,this._useFirstUnplottableRow=!1}items(){return this._items}update(e){if("global-change"===e.type)return this._dataInvalidated=D(this._dataInvalidated,{}),void(this._viewportInvalidated=!0);if("data-source-change"!==e.type)this._viewportInvalidated=!0;else{if(e.sourceId===this._study.id()){const t=D(this._dataInvalidated,{firstIndex:e.firstUpdatedTimePointIndex,clearData:e.clearData});this._dataInvalidated=t}}}renderer(){return this._dataInvalidated?this._updateImplFull(this._viewportInvalidated)&&(this._dataInvalidated=null):this._viewportInvalidated&&this._updateImplLight(),this._viewportInvalidated=!1,this._renderer}_getTranspValue(){const e=this._study.properties(),t=e.styles[this._plotName];let i=0;const s=this._study.metaInfo();return"Volume@tv-basicstudies"===s.id&&s.version<=46&&"transparency"in e?(i=e.transparency.value(),i=(0,l.isNumber)(i)?i:0,i):(t.transparency&&(i=t.transparency.value(),i=(0,l.isNumber)(i)?i:0),i)}_updateImplFull(e){var t,i,n,o;if(this._renderer.clear(),(null===(t=this._dataInvalidated)||void 0===t?void 0:t.clearData)&&(this._items=[]),!this._study.isPlotVisibleAt(this._plotName,1))return!1;if(!this._study.priceScale())return!1;const l=this._study.firstValue();if(null===l)return!1;const h=this._study.priceScale();if(null===h)return!1;this._histogramBase=null;const d=this._study.properties().styles[this._plotName],u=d.plottype.value(),p=this._useFirstUnplottableRow&&(u===I.LineStudyPlotStyle.StepLine||u===I.LineStudyPlotStyle.StepLineWithDiamonds),_=this._study.data().plottableRange(p),m=_.size();if(0===m)return!1;const g=this._study.offset(this._plotName);let f=null===(i=this._dataInvalidated)||void 0===i?void 0:i.firstIndex;const v=B.has(u);if(m!==this._items.length){const e=void 0!==f?f+g:void 0;if(void 0===e||0===this._items.length||e<(0,s.ensureDefined)(this._items[0].timePointIndex))this._items=[],_.each(((e,t)=>{const i=t[this._plotIndex+1];if(v&&null==i)return!1;const s=new r.Point(NaN,NaN);return s.origPrices=new r.Point(NaN,NaN),s.timePointIndex=e+g,this._items.push(s),!1})),f=this._items.length?(0,s.ensureDefined)(this._items[0].timePointIndex)-g:void 0;else{const e=this._items[this._items.length-1].timePointIndex,t=(0,s.ensureDefined)(e)-g,i=(0,s.ensureNotNull)(_.lastIndex())+1,n=_.rangeIterator(t+1,i);for(;n.hasNext();){const e=n.next(),t=e.value[this._plotIndex+1],i=null==t;if(v&&i)continue;const s=new r.Point(NaN,NaN) +;s.origPrices=new r.Point(NaN,NaN),s.timePointIndex=e.index+g,this._items.push(s)}}}let y=NaN,b=NaN;const w=new Map,P=(e,t)=>{let i=w.get(e);void 0===i&&(i=new Map,w.set(e,i));let s=i.get(t);if(void 0===s){const r=!this._plotName||"vol"!==this._plotName;s=(0,c.generateColor)(e,t,r),i.set(t,s)}return s},C=(0,S.createEmptyStyle)(),T=(0,a.clamp)(this._getTranspValue(),0,100),x=this._model.timeScale().visibleBarsStrictRange();if(null===x)return!1;const{startBar:M,endBar:L}=this._calculateStartEnd(x);if(null===M||null===L||0===this._items.length)return!1;const k=null!=f?f:(0,s.ensureNotNull)(_.firstIndex()),E=_.rangeIterator(k,(0,s.ensureNotNull)(_.lastIndex())+1),D=(0,A.lowerbound)(this._items,k+g,((e,t)=>e.timePointIndex0){const e=this._items[V-1].timePointIndex,i=new r.Point(t-1,NaN);i.origPrices=new r.Point(t-1,NaN),i.timePointIndex=e,Ve.timePointIndexee.timePointIndexes+1?{startBar:null,endBar:null}:(i=Math.max(a,i),{startBar:i,endBar:s})}_createRenderer(e,t){var i;this._renderer.clear();const r=this._study.properties().styles[this._plotName],n=(0,a.clamp)(this._getTranspValue(),0,100);this._lineColor=(0,c.generateColor)(r.color.value(),n),this._lineWidth=r.linewidth.value();let o=r.color.value();const d=this._colorProvider.getDefaultPlotPointStyle();d&&(o=d.colors[0],this._lineWidth=null!==(i=d.lineWidth)&&void 0!==i?i:this._lineWidth,this._lineColor=o?(0,c.generateColor)(o,n):this._lineColor),this._color2=(0,c.generateColor)(o,n);const u=this._study.metaInfo().isRGB?k(o):E(o);this._color1=(0,c.generateColor)(u,n);const _={};_.barSpacing=this._model.timeScale().barSpacing(),_.items=this._items,_.histogramBase=this._histogramBase?this._histogramBase:(0,s.ensureNotNull)(this._study.priceScale()).height(),_.lineIndex=0,_.lineStyle=r.linestyle.value(),_.lineColor=this._lineColor,_.lineWidth=this._lineWidth,_.lineWidth=(0,l.isNumber)(_.lineWidth)?_.lineWidth:1,_.color1=this._color1,_.color2=this._color2,_.bottom=_.histogramBase,_.visibleItemsRange={startItemIndex:e,endItemIndex:t},_.lastConfirmedSeriesBarCoordinate=this._lastConfirmedSeriesBarCoordinate,_.simpleMode=this._colorProvider.singleColor();const f=this._renderer,S=!!r.joinPoints&&r.joinPoints.value();switch(r.plottype.value()){case I.LineStudyPlotStyle.Line:case I.LineStudyPlotStyle.LineWithBreaks:f.append(new m.PaneRendererLine(_));break;case I.LineStudyPlotStyle.Area:case I.LineStudyPlotStyle.AreaWithBreaks:f.append(new p.PaneRendererArea(_));break;case I.LineStudyPlotStyle.Histogram:f.append(new x(_));break;case I.LineStudyPlotStyle.Columns:f.append(new P.PaneRendererColumns(_));break;case I.LineStudyPlotStyle.Cross:if(f.append(new T(_)),S){const e=(0,h.deepCopy)(_);e.lineWidth=1,e.forceLineWidth=!0,f.append(new m.PaneRendererLine(e))}break;case I.LineStudyPlotStyle.Circles: +if(f.append(new w(_)),S){const e=(0,h.deepCopy)(_);e.lineWidth=1,e.ignorePaletteLineWidth=!0,f.append(new m.PaneRendererLine(e))}break;case I.LineStudyPlotStyle.StepLine:case I.LineStudyPlotStyle.StepLineWithBreaks:case I.LineStudyPlotStyle.StepLineWithDiamonds:{_.decoration=r.plottype.value()===I.LineStudyPlotStyle.StepLineWithDiamonds?g.StepLineDecoration.Diamonds:g.StepLineDecoration.None,_.extendToBarsEndings=this._extendStepLineToBarsEndings;const e=new g.PaneRendererStepLine(void 0,!1);e.setData(_),f.append(e);break}default:f.append(new m.PaneRendererLine(_))}this._model.selection().isSelected(this._study)&&this._isMarkersEnabled&&this._selectionData&&f.append(new v.SelectionRenderer(this._selectionData))}_createSelection(e){const t=this._study.priceScale();if(null!==t)if(this._model.selection().isSelected(this._study)){const i=this._selectionIndexer.indexes();this._selectionData={points:[],bgColors:[],visible:!0,hittestResult:u.HitTestResult.REGULAR,barSpacing:this._model.timeScale().barSpacing()};const n=(0,s.ensureNotNull)(this._model.paneForSource(this._study)).height(),o=this._study.offset(this._plotName);for(let s=0;s{"use strict";i.d(t,{createStudyPlotColorProvider:()=>p});var s=i(83421),r=i(50151),n=i(38217);const o=new Map([[0,"color"],[2,"textColor"],[3,"borderColor"],[4,"wickColor"],[5,"colorup"],[6,"colordown"]]);class a{constructor(e){this._plotStyle=e}getPlotPointStyle(e,t){const i=t?(0,n.clearStyle)(t):(0,n.createEmptyStyle)();return o.forEach(((e,t)=>{this._plotStyle[e]&&(i.colors[t]=this._plotStyle[e].value())})),i.lineWidth=this._plotStyle.linewidth?this._plotStyle.linewidth.value():void 0,i.lineStyle=this._plotStyle.linestyle?this._plotStyle.linestyle.value():void 0,i}isColorDefined(){return!0}singleColor(){return!0}getDefaultPlotPointStyle(){return null}}const l=[0,1,2,3,4,5,6];class c{constructor(e,t,i,s){this._palettesColors=new Map,this._defaultPlotColors=new Map,this._indexes=s;const n=t.styles[i];if(n)for(const[e,t]of o)this._defaultPlotColors.set(e,n[t]);const a=(0,r.ensureDefined)(e.palettes),l=e.plots;s.forEach(((e,i)=>{const s=l[e];if(s&&"palette"in s){const e=a[s.palette],r=t.palettes[s.palette];if(e&&r){const{valToIndex:t}=e,{colors:s}=r,n={...s};t&&Object.keys(t).forEach((e=>{const i=t[e];void 0!==i&&(n[e]=s[i])})),this._palettesColors.set(i,n)}}}))}getPlotPointStyle(e,t){const i=t?(0,n.clearStyle)(t):(0,n.createEmptyStyle)();return l.forEach((t=>{var s,n;if(this._palettesColors.has(t)){const n=e[(0,r.ensureDefined)(this._indexes.get(t))+1];if("number"==typeof n){const e=null===(s=this._palettesColors.get(t))||void 0===s?void 0:s[n] +;0===t&&e&&(i.lineWidth=e.width.value(),i.lineStyle=e.style.value()),i.colors[t]=null==e?void 0:e.color.value()}else i.colors[t]="transparent"}else i.colors[t]=null===(n=this._defaultPlotColors.get(t))||void 0===n?void 0:n.value()})),i}getDefaultPlotPointStyle(){var e;const t=null===(e=this._palettesColors.get(0))||void 0===e?void 0:e[0];if(void 0!==t){return{colors:[t.color.value(),void 0,void 0,void 0,void 0,void 0,void 0],lineStyle:void 0,lineWidth:t.width.value()}}return null}isColorDefined(){return!!this._palettesColors.size}singleColor(){return!1}}var h=i(38031);class d{constructor(e){this._indexes=e}getPlotPointStyle(e,t){const i=t?(0,n.clearStyle)(t):(0,n.createEmptyStyle)();return this._indexes.forEach(((t,s)=>{const r=e[t+1];if(null!=r){const e=(0,h.rgbaFromInteger)(r);i.colors[s]=e}else i.colors[s]="transparent"})),i}isColorDefined(){return!0}singleColor(){return!1}getDefaultPlotPointStyle(){return null}}const u=new Map([[0,function(e,t){const i=(0,s.isColorerPlot)(t)||(0,s.isOhlcColorerPlot)(t);return"target"in t&&t.target===e&&i}],[2,function(e,t){const i=(0,s.isTextColorerPlot)(t);return"target"in t&&t.target===e&&i}],[1,function(e,t){return(0,s.isBgColorerPlot)(t)&&t.id===e}],[3,function(e,t){const i=(0,s.isCandleBorderColorerPlot)(t);return"target"in t&&t.target===e&&i}],[4,function(e,t){const i=(0,s.isCandleWickColorerPlot)(t);return"target"in t&&t.target===e&&i}],[5,function(e,t){const i=(0,s.isUpColorerPlot)(t);return"target"in t&&t.target===e&&i}],[6,function(e,t){const i=(0,s.isDownColorerPlot)(t);return"target"in t&&t.target===e&&i}]]);function p(e,t,i){const{colorers:s}=function(e,t){const i=e.plots,s=i.findIndex((e=>e.id===t)),r=new Map;return i.forEach(((e,i)=>{u.forEach(((s,n)=>{s(t,e)&&r.set(n,i)}))})),{plotIndex:-1===s?null:s,colorers:r}}(e,i);if(s.size)return e.isRGB?new d(s):new c(e,t,i,s);{const e=t.ohlcPlots;if(e&&e[i])return new a(e[i]);const s=t.styles[i];return new a(s)}}},83421:(e,t,i)=>{"use strict";var s,r,n;function o(e){return"line"===e.type}function a(e){return"shapes"===e.type}function l(e){return"chars"===e.type}function c(e){return"arrows"===e.type}function h(e){return"data"===e.type}function d(e){return"dataoffset"===e.type}function u(e){return"ohlc_open"===e.type}function p(e){return"ohlc_high"===e.type}function _(e){return"ohlc_low"===e.type}function m(e){return"ohlc_close"===e.type}function g(e){return u(e)||p(e)||_(e)||m(e)}function f(e){return"colorer"===e.type&&"palette"in e}function v(e){return"colorer"===e.type&&!("palette"in e)}function S(e){return"colorer"===e.type}function y(e){return"bar_colorer"===e.type}function b(e){return"bg_colorer"===e.type}function w(e){return"text_colorer"===e.type}function P(e){return"ohlc_colorer"===e.type}function C(e){return"wick_colorer"===e.type}function T(e){return"border_colorer"===e.type}function x(e){return"up_colorer"===e.type}function I(e){return"down_colorer"===e.type}function M(e){return"alertcondition"===e.type}function A(e){return o(e)||a(e)||l(e)||c(e)}function L(e){return"Plot"!==e}function k(e){ +return"ohlc_bars"===e.plottype}function E(e){return"ohlc_candles"===e.plottype}function D(e){return S(e)||y(e)||b(e)||h(e)||d(e)||P(e)||M(e)||x(e)||I(e)||T(e)||C(e)||w(e)}function B(e){return S(e)||w(e)||y(e)||h(e)||d(e)||P(e)||C(e)||T(e)||x(e)||I(e)||M(e)}i.r(t),i.d(t,{LineStudyPlotStyle:()=>s,STUDYPLOTDISPLAYTARGET:()=>r,isLinePlot:()=>o,isShapesPlot:()=>a,isCharsPlot:()=>l,isArrowsPlot:()=>c,isDataPlot:()=>h,isDataOffsetPlot:()=>d,isOhlcOpenPlot:()=>u,isOhlcHighPlot:()=>p,isOhlcLowPlot:()=>_,isOhlcClosePlot:()=>m,isOhlcPlot:()=>g,isPaletteColorerPlot:()=>f,isRgbaColorerPlot:()=>v,isColorerPlot:()=>S,isBarColorerPlot:()=>y,isBgColorerPlot:()=>b,isTextColorerPlot:()=>w,isOhlcColorerPlot:()=>P,isCandleWickColorerPlot:()=>C,isCandleBorderColorerPlot:()=>T,isUpColorerPlot:()=>x,isDownColorerPlot:()=>I,isAlertConditionPlot:()=>M,isPlotSupportDisplay:()=>A,isPlotTitleDefined:()=>L,isOhlcPlotStyleBars:()=>k,isOhlcPlotStyleCandles:()=>E,PlotSymbolSize:()=>n,isPlotWithTechnicalValues:()=>D,isNonVisualPlot:()=>B}),function(e){e[e.Line=0]="Line",e[e.Histogram=1]="Histogram",e[e.Cross=3]="Cross",e[e.Area=4]="Area",e[e.Columns=5]="Columns",e[e.Circles=6]="Circles",e[e.LineWithBreaks=7]="LineWithBreaks",e[e.AreaWithBreaks=8]="AreaWithBreaks",e[e.StepLine=9]="StepLine",e[e.StepLineWithDiamonds=10]="StepLineWithDiamonds",e[e.StepLineWithBreaks=11]="StepLineWithBreaks"}(s||(s={})),function(e){e[e.None=0]="None",e[e.Pane=1]="Pane",e[e.DataWindow=2]="DataWindow",e[e.PriceScale=4]="PriceScale",e[e.StatusLine=8]="StatusLine",e[e.All=15]="All"}(r||(r={})),function(e){e.Auto="auto",e.Tiny="tiny",e.Small="small",e.Normal="normal",e.Large="large",e.Huge="huge"}(n||(n={}))},89215:(e,t,i)=>{"use strict";i.r(t),i.d(t,{createStudy:()=>F,isESDStudy:()=>N,isFundamentalStudy:()=>R,isRollDatesStudy:()=>O,isStudy:()=>D,isStudyStrategy:()=>B,isStudyStub:()=>V,studyColorRotationMode:()=>W,useSameColorRotationComparator:()=>z});var s=i(2484),r=i(58403),n=i(68927),o=i(24680),a=i(89895),l=i(83956),c=i(61524),h=i(46289),d=i(50151),u=i(44352);const p=s.enabled("hide_main_series_symbol_from_indicator_legend");class _ extends n.Study{constructor(e,t,i,s){super(e,t,i,s),(0,d.ensureDefined)(this.properties().childs().styles.childs().vol_ma).childs().display.subscribe(this,(()=>this.invalidateTitleCache()))}base(){return 1}destroy(){(0,d.ensureDefined)(this.properties().childs().styles.childs().vol_ma).childs().display.listeners().unsubscribeAll(this),super.destroy()}showOnTopOnHovering(){return!1}_titleInputs(){const e={symbolsForDisplay:!0,skipHiddenInputs:!0,fakeInputsForDisplay:!0,asObject:!1,skipOptionalEmptySymbolInputs:p};return 0!==(0,d.ensureDefined)(this.properties().childs().styles.childs().vol_ma).childs().display.value()?this.inputs(e):this.inputs({...e,skippedInputs:["length"]})}_titleInParts(e,t,i,s){const r=super._titleInParts(e,t,i,s),n=this._getVolumeUnit();return n&&(r[0]+=` · ${n}`),r}_getVolumeUnit(){const e=this.symbolSource().symbolInfo();if(e){switch(e.volume_type){case"base":return e.base_currency;case"quote": +return e.original_currency_code||e.currency_code;case"tick":return u.t(null,void 0,i(30973))}}}}var m=i(40549),g=i.n(m),f=i(26220),v=i.n(f),S=i(1930),y=i(90854);class b extends n.Study{constructor(e,t,i,s){super(e,function(e){return e.hasChild("currencyId")||e.addChild("currencyId",new(v())(null)),e.hasChild("unitId")||e.addChild("unitId",new(v())(null)),e.addExclusion("currencyId"),e.addExclusion("unitId"),e}(t),i,s),this._isActingAsSymbolSource=new(g())(!1),this._symbolHibernated=new(g())(!1),this._symbolResolvingActive=new(g())(!1),this._realignToolsLastParams=null,this._onIsActingAsSymbolSourceChanged=()=>{this._realignLineToolsIfParamsChanged()},this._recalculateIsActingAsSymbolSource(),this._isActingAsSymbolSource.subscribe(this._onIsActingAsSymbolSourceChanged);const r=this.properties().childs().inputs.childs().symbol;this._previousSymbolInputValue=r.value()}destroy(){this._isActingAsSymbolSource.unsubscribe(this._onIsActingAsSymbolSourceChanged),super.destroy()}isActingAsSymbolSource(){return this._isActingAsSymbolSource.readonly()}properties(){return this._properties}symbol(){return this._isActingAsSymbolSource.value()?this.properties().childs().inputs.childs().symbol.value():this.symbolSource().symbol()}interval(){return this.model().mainSeries().interval()}style(){return this._firstSourceOrSeries().symbolSource().style()}currency(){return this._isActingAsSymbolSource.value()?this.properties().childs().currencyId.value()||null:this.symbolSource().currency()}unit(){return this._isActingAsSymbolSource.value()?this.properties().childs().unitId.value()||null:this.symbolSource().unit()}setSymbolParams(e){this._setSymbolParamsInternal(e)}setSymbol(e){this.setSymbolParams({symbol:e})}symbolInfo(){if(!this._isActingAsSymbolSource.value())return super.symbolSource().symbolInfo();if(void 0===this._resolvedSymbols)return null;const e=this.symbol(),t=this._getSymbolForResolve(e);return this._resolvedSymbols[t]||null}symbolSource(){return this._isActingAsSymbolSource.value()?this:super.symbolSource()}symbolResolved(){return this.symbolsResolved()}symbolResolvingActive(){return this._symbolResolvingActive}symbolHibernated(){return this._symbolHibernated}isVisible(){const e=super.isVisible();return this._symbolHibernated.setValue(!e),e}symbolSameAsCurrent(e){return(0,y.symbolSameAsCurrent)(e,this.symbolInfo())}setCurrency(e){this.setSymbolParams({currency:e})}isConvertedToOtherCurrency(){return(0,S.isConvertedToOtherCurrency)(this.symbolInfo())}setUnit(e){this.setSymbolParams({unit:e})}isConvertedToOtherUnit(){return(0,S.isConvertedToOtherUnit)(this.symbolInfo(),this._model.unitConversionEnabled())}setInterval(e){}setStyle(e){}symbolTitle(e,t){return this.title(!0,{},!1,e)}measureUnitId(){return(0,S.measureUnitId)(this.symbolInfo())}bars(){return super.data()}dataUpdated(){return this._dataUpdated}_onPropertiesChanged(){this._recalculateIsActingAsSymbolSource(),super._onPropertiesChanged(),this._realignLineToolsIfParamsChanged()}_tryChangeInputs(){var e;const t=this._resolvedSymbolsByInput[this.symbol()]||null;(0, +y.symbolSameAsCurrent)(this._previousSymbolInputValue,t)||this._setSymbolParamsInternal({currency:null,unit:null}),super._tryChangeInputs(),this._formatter=null,null===(e=this.priceScale())||void 0===e||e.updateFormatter(),this._previousSymbolInputValue=this.properties().childs().inputs.childs().symbol.value()}_getSymbolObject(e){const t={symbol:e},i=this.currency();null!==i&&(t["currency-id"]=i);const s=this.unit();return this._model.unitConversionEnabled()&&null!==s&&(t["unit-id"]=s),t}_getSymbolForApi(e){return(0,S.symbolForApi)(this._resolvedSymbolsByInput[e]||null,e)}_onSymbolResolved(e,t,i){super._onSymbolResolved(e,t,i),this._recreatePriceFormattingDependencies();const s=t===this.symbol()?(0,S.extractSymbolNameFromSymbolInfo)(i,this.symbol()):null;null!==s&&(this._previousSymbolInputValue=s);const r=(0,S.symbolCurrency)(i),n=(0,S.symbolUnit)(i,this._model.unitConversionEnabled());this._setSymbolParamsInternal({symbol:null!=s?s:void 0,currency:r,unit:n},i),this._symbolResolvingActive.setValue(!1)}_onSymbolResolvingStart(){super._onSymbolResolvingStart(),this._symbolResolvingActive.setValue(!0)}_onSymbolError(){super._onSymbolError(),this._symbolResolvingActive.setValue(!1)}_onCurrencyMayChange(){this.isActingAsSymbolSource()?super._onCurrencyMayChange():this._onCurrencyChanged()}_recalculateIsActingAsSymbolSource(){var e,t;const i=null!==(t=""!==(null===(e=this._currencySourceSymbolInputProperty)||void 0===e?void 0:e.value()))&&void 0!==t&&t;this._isActingAsSymbolSource.setValue(i)}_setSymbolParamsInternal(e,t){const{symbol:i,currency:s,unit:r}=e,n=this.properties().childs(),o=n.inputs.childs().symbol.value(),a=n.currencyId.value(),l=n.unitId.value();if(void 0!==i&&i!==o&&n.inputs.childs().symbol.setValueSilently(i),void 0!==s&&s!==a&&n.currencyId.setValueSilently(s),void 0!==r&&r!==l&&n.unitId.setValueSilently(r),t)this._resolvedSymbolsByInput[this.symbol()]=t,this._resolvedSymbols[this._getSymbolForResolve(this.symbol())]=t,this._realignToolsLastParams=null;else{const e=this.symbolInfo();null!==e&&(n.currencyId.setValueSilently((0,S.symbolCurrency)(e)),n.unitId.setValueSilently((0,S.symbolUnit)(e,this._model.unitConversionEnabled())))}n.inputs.childs().symbol.value()!==o&&n.inputs.childs().symbol.listeners().fire(n.inputs.childs().symbol),n.currencyId.value()!==a&&n.currencyId.listeners().fire(n.currencyId),n.unitId.value()!==l&&n.unitId.listeners().fire(n.unitId),this._realignLineToolsIfParamsChanged()}_realignLineToolsIfParamsChanged(){const e=this.symbol(),t=this.interval(),i=this.currency(),s=this.unit();null!==this._realignToolsLastParams&&this._realignToolsLastParams.symbol===e&&this._realignToolsLastParams.interval===t&&this._realignToolsLastParams.currency===i&&this._realignToolsLastParams.unit===s||(this._model.realignLineTools(this),this._realignToolsLastParams={symbol:e,interval:t,currency:i,unit:s})}}var w=i(23304);var P=i(67876),C=i(38031);class T extends P.PriceAxisView{constructor(e,t){super(),this._source=e,this._styleId=t}_updateRendererData(e,t,i){var s;e.visible=!1 +;const r=this._source.priceScale(),n=this._source.properties().childs();if(!r||r.isEmpty()||!n.visible.value())return;const o=null===(s=this._source.properties().childs().graphics.childs().horizlines)||void 0===s?void 0:s.childs()[this._styleId].childs();if(!(o&&o.visible&&o.visible.value()&&this._isLabelVisibleAccordinglyToProperties()))return;const a=this._source.model().timeScale().logicalRange(),l=this._source.firstValue();if(null===l||null===a)return;const c={price:NaN,time:-1/0},h=this._source.graphics().horizlines().get(this._styleId);if(void 0===h)return;for(const e of h){if(void 0===e.level)continue;const t=a.contains(e.startIndex,!0);t===a.contains(e.endIndex,!0)&&0!==t||c.timenew T(this,e)))}_createStudyPlotPaneView(e){return new x.StudyPlotPaneView(this,this._series,this._model,e,this._needExtendToBarsEnding())}_apiInputs(){return{...super._apiInputs(),mapRightBoundaryToBarStartTime:!!this._needExtendToBarsEnding()||void 0}}_needExtendToBarsEnding(){var e;return void 0!==(null===(e=this.metaInfo().defaults.inputs)||void 0===e?void 0:e.mapRightBoundaryToBarStartTime)}}class M extends I{priceRange(e,t){let i=!1;this.graphics().hhists().forEach(((e,t)=>{var s;i=i||(0,d.ensureDefined)(null===(s=this.properties().childs().graphics.childs().hhists)||void 0===s?void 0:s.childs()[t]).value()}));const s=function(e,t,i,s){let r=null;return e.forEach(((e,s)=>{e.forEach((e=>{e.firstBarTime<=i&&e.lastBarTime>=t&&(null===r?r={low:{l:e.priceLow,h:e.priceHigh},high:{h:e.priceHigh}}:(e.priceLow{"use strict";i.d(t,{StudyBaseWindowView:()=>r});var s=i(95790);class r extends s.DataWindowView{constructor(e,t){super(),this._invalidated=!0,this._study=e,this._model=t,this._valueProvider=this._createValuesProvider(e,t),this._items=this._valueProvider.getItems().map((e=>new s.DataWindowItem(e.id,e.title,""))),this.update()}update(){this._invalidated=!0}items(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items}study(){return this._study}_updateImpl(){this._header=this._study.title(!0),this._title=this._study.title();const e=this._valueProvider.getValues(this._currentIndex());for(let t=0;t{"use strict";i.d(t,{StudyColorRotatorFactory:()=>h});var s=i(7394),r=i(24377),n=i(38031),o=i(89215) ;const a=["color-sky-blue-400","color-banana-yellow-700","color-deep-blue-500","color-grapes-purple-a700","color-iguana-green-500","color-minty-green-a700","color-ripe-red-a200","color-berry-pink-200","color-tv-blue-a100","color-tan-orange-a200","color-sky-blue-a400","color-deep-blue-a100","color-grapes-purple-400","color-iguana-green-a700","color-minty-green-200","color-ripe-red-200","color-berry-pink-a200","color-ripe-red-500","color-grapes-purple-500","color-deep-blue-400","color-tv-blue-a200","color-sky-blue-500","color-iguana-green-400","color-minty-green-400","color-banana-yellow-600","color-tan-orange-500","color-berry-pink-400","color-ripe-red-300","color-grapes-purple-300","color-deep-blue-300","color-tv-blue-300","color-sky-blue-300","color-iguana-green-300","color-minty-green-300","color-banana-yellow-400","color-tan-orange-300","color-berry-pink-300","color-tan-orange-a700"];class l{constructor(e){this._offset=0,this._offset=e}getColor(e){if(0===this._offset)return e;const t=a[(this._offset-1)%a.length],i=s.colorsPalette[t],o=(0,n.isHexColor)(e)?1:(0,r.parseRgba)(e)[3];return(0,n.generateColor)(i,(0,n.alphaToTransparency)(o))}}class c{constructor(e,t){this._offset=e,this._modelStartOffset=t}getColor(e){if((0,n.isHexColor)(e)){const t=(0,r.parseRgb)(e);return(0,r.rgbToHexString)((0,r.shiftRgb)(t,this._offset,this._modelStartOffset))}{const t=(0,r.parseRgba)(e);return(0,r.rgbaToString)((0,r.shiftRgba)(t,this._offset,this._modelStartOffset))}}}class h{constructor(e){this._chartModel=e}getColorRotator(e){const t=(0,o.studyColorRotationMode)(e);if(null===t)return null;const i=this._calcDefaultColorsOffset(e);switch(t){case"loop":return new l(i);case"shift":{const e=this._chartModel.getStudyShiftColorStartOffset();return new c(i,e)}}}_calcDefaultColorsOffset(e){let t=0;const i=(0,o.useSameColorRotationComparator)(e);return this._chartModel.dataSources().filter(o.isStudy).forEach((s=>{i(e,s.metaInfo())&&t++})),t}}},7910:(e,t,i)=>{"use strict";i.d(t,{StudyDataSource:()=>_});var s=i(50151),r=i(26867),n=i.n(r),o=i(88552),a=i(65447),l=i(24760),c=i(51332),h=i(4574),d=i(39947);const u=(0,i(98351).getLogger)("Chart.StudyDataSource");var p;!function(e){e[e.Idle=0]="Idle",e[e.AwaitingConnection=1]="AwaitingConnection",e[e.AwaitingParent=2]="AwaitingParent",e[e.AwaitingFirstDataUpdate=3]="AwaitingFirstDataUpdate",e[e.Active=4]="Active"}(p||(p={}));class _{constructor(e,t,i,s){this._inputs=null,this._status=p.Idle,this._studyId=null,this._turnaroundCounter=1,this._studyStatus={type:d.StudyStatusType.Undefined},this._studyStatusChanged=new(n()),this._graphics=new h.LiveStudyGraphics,this._dataCleared=new(n()),this._dataUpdated=new(n()),this._boundOnGatewayIsConnectedChanged=this._onGatewayIsConnectedChanged.bind(this),this._ongoingDataUpdate=Promise.resolve(),this._gateway=e,this._metaInfo=s,this._seriesSource=t,this._turnaroundPrefix=i,this._plots=new o.PlotList((0,c.studyPlotFunctionMap)(s),c.studyEmptyPlotValuePredicate),this._gateway.isConnected().subscribe(this._boundOnGatewayIsConnectedChanged)}destroy(){this.stop(), this._gateway.isConnected().unsubscribe(this._boundOnGatewayIsConnectedChanged),this._dataUpdated.destroy(),this._dataCleared.destroy(),this._studyStatusChanged.destroy()}metaInfo(){return this._metaInfo}inputs(){return this._inputs}setInputs(e){this._inputs=e,null!==this._studyId&&(this._turnaroundCounter++,this._onStudyStatusChangedTo({type:d.StudyStatusType.Undefined}),this._gateway.modifyStudy(this._studyId,this._turnaround(),e,this._onMessage.bind(this)),this._status===p.Active&&this._changeStatusTo(p.AwaitingFirstDataUpdate))}isStarted(){return this._status!==p.Idle}isActive(){return this._status===p.Active}start(){this.isStarted()?u.logNormal("start: data source is already started, nothing to do"):((0,s.assert)(null!==this._inputs,"Inputs should be defined when starting a study data source"),this._gateway.isConnected().value()?this._createStudy():this._changeStatusTo(p.AwaitingConnection))}stop(){this.isStarted()?(null!==this._studyId&&(this._gateway.removeStudy(this._studyId),this._studyId=null,this._onStudyStatusChangedTo({type:d.StudyStatusType.Undefined})),this._changeStatusTo(p.Idle)):u.logNormal("stop: data source is already stopped, nothing to do")}studyId(){return this._studyId}studyStatus(){return this._studyStatus}studyStatusChanged(){return this._studyStatusChanged}plots(){return this._plots}graphics(){return this._graphics}clearData(){this._plots.clear(),this._graphics.clear(),this._dataCleared.fire()}stopAndStealData(){(0,s.assert)(this._status===p.Active,"Couldn't steal data from non-active data source"),this.stop();const e=this._plots,t=this._graphics.extract();return this._plots=new o.PlotList((0,c.studyPlotFunctionMap)(this._metaInfo),c.studyEmptyPlotValuePredicate),{plots:e,graphics:t}}dataCleared(){return this._dataCleared}dataUpdated(){return this._dataUpdated}moveData(e){this._ongoingDataUpdate=this._ongoingDataUpdate.then((()=>{this._plots.move(e)}))}pendingUpdatesReady(){return this._ongoingDataUpdate}_changeStatusTo(e){(0,s.assert)(this._status!==e,"Source and destination status should be distinct"),u.logNormal(`Status changed from ${p[this._status]} to ${p[e]}`),this._status=e}_createStudy(){const e=this._seriesSource.instanceId();null!==e?this._createStudyUsingParentId(e):(this._changeStatusTo(p.AwaitingParent),this._seriesSource.dataEvents().completed().subscribe(this,this._onSeriesCompleted,!0))}_createStudyUsingParentId(e){(0,s.assert)(this._status!==p.Active,'Status should not be "Active" when creating a study'),(0,s.assert)(this._studyStatus.type===d.StudyStatusType.Undefined,'Study status should be "Undefined" when creating a study'),(0,s.assert)(null===this._studyId,"Study id should be empty when creating a study"),this._studyId=(0,l.makeNextStudyId)(),this._gateway.createStudy(this._studyId,this._turnaround(),e,this._metaInfo.fullId+("tv-basicstudies"===this._metaInfo.packageId?"":"!"),(0,s.ensureNotNull)(this._inputs),this._onMessage.bind(this)),this._changeStatusTo(p.AwaitingFirstDataUpdate)}_onGatewayIsConnectedChanged(e){ e?this._onGatewayConnected():this._onGatewayDisconnected()}_onGatewayConnected(){this._status===p.AwaitingConnection&&this._createStudy()}_onGatewayDisconnected(){this._status!==p.Idle&&this._status!==p.AwaitingConnection&&(this._studyId=null,this._changeStatusTo(p.AwaitingConnection),this._studyStatus.type!==d.StudyStatusType.Undefined&&this._onStudyStatusChangedTo({type:d.StudyStatusType.Undefined})),this._turnaroundCounter=1}_onSeriesCompleted(){this._status===p.AwaitingParent&&this._createStudyUsingParentId((0,s.ensure)(this._seriesSource.instanceId()))}_onStudyStatusChangedTo(e){const t=this._studyStatus;this._studyStatus=e,u.logNormal(`Study status type changed from ${d.StudyStatusType[t.type]} to ${d.StudyStatusType[e.type]}`),this._studyStatusChanged.fire(t,e)}_onMessage(e){if("data_update"===e.method){const{customId:t,turnaround:i,plots:r,nonseries:n}=e.params;t===this._studyId&&this._checkTurnaround(i)&&this._onDataUpdate(r,(0,s.ensureDefined)(n))}else if("study_loading"===e.method){const[t,i,s]=e.params;t===this._studyId&&this._checkTurnaround(i)&&this._onStudyLoading(s)}else if("study_completed"===e.method){const[t,i,s]=e.params;t===this._studyId&&this._checkTurnaround(i)&&this._onStudyCompleted(s)}else if("study_error"===e.method){const[t,i,s,r,n]=e.params;t===this._studyId&&this._checkTurnaround(i)&&this._onStudyError(s,r,n)}else"clear_data"===e.method&&this._checkTurnaround(e.params.turnaround)&&this.clearData()}_onDataUpdate(e,t){const i=(0,a.unpackNonSeriesData)(t.d);return this._ongoingDataUpdate=this._ongoingDataUpdate.then((()=>i),(()=>i)).then(this._onDataUnpacked.bind(this,e,t.indexes)),this._ongoingDataUpdate}_onDataUnpacked(e,t,i){this._status!==p.Idle&&(this._status===p.AwaitingFirstDataUpdate&&(this._changeStatusTo(p.Active),this.clearData()),this._mergePlots(e),null!==i&&(i.indexes_replace?((0,s.assert)("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==i.graphicsCmds&&this._graphics.processCommands(i.graphicsCmds,this._metaInfo.graphics))),this._dataUpdated.fire(e,i,t))}_onStudyLoading(e){this._onStudyStatusChangedTo({type:d.StudyStatusType.Loading,startTime:Date.now()})}_onStudyError(e,t,i){this.clearData();const s="string"==typeof e?{error:e.split(":",2)[0]}:e;this._onStudyStatusChangedTo({type:d.StudyStatusType.Error,errorDescription:s})}_onStudyCompleted(e){this._onStudyStatusChangedTo({type:d.StudyStatusType.Completed})}_mergePlots(e){this._plots.merge(e)}_turnaround(){return`${this._turnaroundPrefix}${this._turnaroundCounter}`}_checkTurnaround(e){const t=this._turnaround();return e===t||e===this._seriesSource.turnaround()||e===`${this._seriesSource.turnaround()}_${t}`}}},35823:(e,t,i)=>{"use strict";i.d(t,{StudyDataWindowView:()=>a});var s=i(86368),r=i(77513),n=i(58040);class o{constructor(e,t){this._study=e,this._model=t,this._hhistBasedStudy=void 0!==e.metaInfo().graphics.hhists,this._valuesProvider=this._createValuesProvider(e,t)}getItems(){return this._valuesProvider.getItems()}getValues(e){ @@ -725,99 +725,99 @@ const t=this._valuesProvider.getValues(e),i=e=>!!this._hhistBasedStudy||this._st ;if(void 0!==e){const t=await e(c,a.inputs,a);h=t.inputs,this._parentSources=null!==(i=t.parentSources)&&void 0!==i?i:[]}if(void 0!==t&&t.cancelled)return Promise.reject(r.InsertionErrorCode.Cancelled);const d=this._insertStudy(a,h);return null===d?Promise.reject(r.InsertionErrorCode.Unknown):d}_insertStudy(e,t){return this._inserterImpl.createStudy(e,t,null,this._propsState,this._forceOverlay,this._parentSources,this._preferredPriceScale,this._allowChangeCurrency,this._allowChangeUnit,this._paneSize,this._targetPriceScaleMode)}_canApplyStudyToParent(e){return 0===this._parentSources.length||s.StudyMetaInfo.canBeChild(e)}}},43312:(e,t,i)=>{"use strict";i.d(t,{StudyLegendValuesProvider:()=>n});var s=i(77513),r=i(58040);class n{constructor(e,t){this._study=e,this._model=t,this._showStudyValues=t.properties().childs().paneProperties.childs().legendProperties.childs().showStudyValues,this._hhistBasedStudy=void 0!==e.metaInfo().graphics.hhists,this._valuesProvider=this._createValuesProvider(e,t)}getItems(){return this._valuesProvider.getItems()}getValues(e){const t=this._valuesProvider.getValues(e),i=this._study.properties(),s=this._showStudyValues.value()&&i.childs().showLegendValues.value(),r=e=>!!this._hhistBasedStudy||this._study.isPlotVisibleAt(e,8);for(const e of t)e.visible=e.visible&&s&&r(e.id);return t}_createValuesProvider(e,t){return this._hhistBasedStudy?new r.HHistBasedValuesProvider(e,t):new s.StudyValuesProvider(e,t)}}},93982:(e,t,i)=>{"use strict";i.d(t,{StudyStatusProviderBase:()=>a});var s=i(72039),r=i(86635);const n={NONE:"Default"},o=!1;class a extends s.StatusProviderBase{constructor(e,t){super(t),this._source=e}getSplitTitle(){return this._source.titleInParts(!0,n,void 0,o)}text(){return this._source.isActualInterval()?this._source.isFailed()?`${this._source.title(!0,n,void 0,o)}: ${this.sourceStatusText()}`:`${this._source.title(!0,n,void 0,o)} ${this.sourceStatusText()}`:this._source.title(!0,n,void 0,o)}sourceStatusText(){return(0,r.convertStudyStatusToString)(this._source.status(),!0)}errorStatus(){if(!this._source.isActualInterval()||this._source.isSymbolInvalid())return null;const e=this._source.status();return e.type===r.StudyStatusType.Error?{error:this.sourceStatusText(),solutionId:(0,r.studyStatusSolutionId)(e),title:(0,r.studyStatusTitle)(e),studyFeature:(0,r.studyStatusFeature)(e)}:null}}},89111:(e,t,i)=>{"use strict";i.d(t,{StudyStatusProvider:()=>n});var s=i(44352),r=(i(86635),i(93982));s.t(null,void 0,i(47542));class n extends r.StudyStatusProviderBase{constructor(e,t){super(e,t),this._study=e}color(){return this._study.isFailed()||this._study.metaInfo&&this._study.metaInfo().isTVScriptStub?"#ff0000":super.color()}sourceStatusText(){this._study.status();return super.sourceStatusText()}}},66019:(e,t,i)=>{"use strict";i.d(t,{StudyStatusView:()=>r});var s=i(17659);class r extends s.StatusView{constructor(e){super(e.statusProvider())}color(){return this._statusProvider.color()}getSplitTitle(){return this._statusProvider.getSplitTitle()}update(){this._text=this._statusProvider.text()}}}, 86635:(e,t,i)=>{"use strict";i.d(t,{StudyStatusType:()=>c,convertStudyStatusToString:()=>h,studyStatusFeature:()=>p,studyStatusSolutionId:()=>d,studyStatusTitle:()=>u});var s=i(44352);const r=new Map([["You cannot see this pivot timeframe on this resolution",s.t(null,void 0,i(17126))],["The data vendor doesn't provide volume data for this symbol.",s.t(null,void 0,i(29198))],['Histogram is too large, please increase "Row Size" input.',s.t(null,void 0,i(69085))],["Histogram is too large, please reduce 'Row Size' input.",s.t(null,void 0,i(8122))],["This script is invite-only. To request access, please contact its author.",s.t(null,void 0,i(74986))],["Volume Profile indicator available only on our upgraded plans.",s.t(null,void 0,i(61022))]]),n=s.t(null,void 0,i(16971)),o=new Map,a=new Map,l=s.t(null,void 0,i(30295));var c;function h(e,t){if(e.type===c.Loading)return t?l:"loading...";if(e.type===c.Error){const s=e.errorDescription,n=t?(i=s.error,r.get(i)||i):s.error;if(s.ctx){const e={};return Object.entries(s.ctx).forEach((([t,i])=>{e[t]=i.toString()})),n.format(e)}return n}var i;return""}function d(e){if(e.type===c.Error)return e.errorDescription.solution_id?e.errorDescription.solution_id:function(e){for(const t of Array.from(o.keys()))if(e.includes(t))return o.get(t)}(e.errorDescription.error)}function u(e){if(e.type===c.Error)return-1!==e.errorDescription.error.toLowerCase().indexOf("the data vendor doesn't provide volume data for this symbol.")?n:void 0}function p(e){const{errorDescription:{error:t}}=e;for(const[e,i]of a)if(t.startsWith(e))return i}!function(e){e[e.Undefined=0]="Undefined",e[e.Loading=1]="Loading",e[e.Completed=2]="Completed",e[e.Error=3]="Error"}(c||(c={}))},46289:(e,t,i)=>{"use strict";i.d(t,{StudyStub:()=>m});var s=i(66019),r=i(88029),n=i(74599),o=i(26867),a=i.n(o),l=i(26220),c=i.n(l),h=i(93982);class d extends h.StudyStatusProviderBase{text(){return this._source.isActualInterval()?`${this._source.title()} ${this.sourceStatusText()}`:this._source.title()}}var u=i(86635);class p{getItems(){return[]}getValues(e){return[]}}const _=new(a());class m extends r.PriceDataSource{constructor(e,t,i){super(e),this._priceStep=.01,this._status={type:u.StudyStatusType.Undefined},this._statusChanged=new(a()),this._formatter=new n.PriceFormatter(100),this._origState=t,this._title=i;this._properties=new(c())({visible:!0}),this._statusView=new s.StudyStatusView(this)}barColorer(){return null}properties(){return this._properties}statusView(){return this._statusView}legendView(){return null}state(e){return this._origState}setStatus(e){this._status=e,this._statusChanged.fire()}formatter(){return this._formatter}name(){return this._title}title(){return this._title}titleInParts(){return[this._title]}isFailed(){return this._status.type===u.StudyStatusType.Error}isLoading(){return this._status.type===u.StudyStatusType.Loading}setFailed(e){this.setStatus({type:u.StudyStatusType.Error,errorDescription:{error:e}}),this._model.updateSource(this)}isSymbolInvalid(){return!1}isActualInterval(){return!0} onIsActualIntervalChange(){return _}start(){}status(){return this._status}onStatusChanged(){return this._statusChanged}firstValue(){return null}currency(){return null}sessionId(){return this._model.mainSeries().sessionId()}sessionIdChanged(){return this._model.mainSeries().sessionIdChanged()}unit(){return null}symbolSource(){return this._model.mainSeries()}barsProvider(){return this._model.mainSeries()}valuesProvider(){return new p}statusProvider(e){return new d(this,this._model.properties().childs().scalesProperties.childs().textColor)}}},77513:(e,t,i)=>{"use strict";i.d(t,{StudyValuesProvider:()=>f});var s=i(50335),r=i(49483),n=i(38031),o=i(2484),a=i(33639),l=i(28667),c=i(76076),h=i(83421),d=i(12702),u=i(49897),p=i(50151),_=i(2);const m=r.CheckMobile.any(),g=o.enabled("hide_last_na_study_output");class f{constructor(e,t){this._emptyValues=[],this._colorProviders=new Map,this._study=e,this._model=t,this._studyMetaInfo=this._study.metaInfo(),this._studyProperties=this._study.properties().childs(),this._isFundamental=!1;const i=this._studyMetaInfo.plots;i&&i.forEach(((e,t)=>{if((0,h.isPlotWithTechnicalValues)(e))return;const i=e.id;this._emptyValues.push(function(e,t="",i=""){return{id:t,index:e,title:i,value:"",visible:!1}}(t,i,this._study.guiPlotName(i)));const s=(0,h.isOhlcPlot)(e)?e.target:i;this._colorProviders.set(s,(0,d.createStudyPlotColorProvider)(this._studyMetaInfo,this._study.properties(),s))}))}getItems(){return this._emptyValues}getPlotColor(e,t){var i;const r=t[e+1];if(!(0,s.isNumber)(r))return"";const n=r>0;let o;const a=this._studyMetaInfo.plots[e];let l=a.id;const c=this._studyProperties;if((0,h.isOhlcPlot)(a))l=a.target||l,o=(0,p.ensureDefined)(c.ohlcPlots.childs()[l].childs().color).value();else if((0,h.isArrowsPlot)(a)){const e=(0,p.ensureDefined)(c.styles.childs()[l]);o=n?e.childs().colorup.value():e.childs().colordown.value()}else o=(0,p.ensureDefined)(null===(i=c.styles.childs()[l])||void 0===i?void 0:i.child("color")).value();let d=o;const u=this._colorProviders.get(l),_=u&&u.getPlotPointStyle(t);return _&&((0,h.isArrowsPlot)(a)?(n&&void 0!==_.colors[5]&&(d=_.colors[5]),n||void 0===_.colors[6]||(d=_.colors[6])):void 0!==_.colors[0]&&(d=_.colors[0])),"transparent"===d&&(d=o),d}getValues(e){var t,i;const r=this._emptyValues.map((e=>({...e})));let o=null;const l=this._study.data().lastIndex(),c=this._studyProperties;if(null!==l)for(const e of r){if(0===(null===(t=c.styles.childs()[e.id])||void 0===t?void 0:t.childs().display.value()))continue;const i=this._study.nearestIndex(l,a.PlotRowSearchMode.NearestLeft,e.index+1);if(void 0===i)continue;const s=i+this._study.offset(e.id);o=null!==o?Math.max(s,o):s}(null===e||null!==o&&e>o)&&(e=o);const d=this._hideValues(),m=this._study.isVisible()&&!d?_.notAvailable:"";for(const e of r)e.value=m;if(d)return r;g&&r.length&&(r[r.length-1].value="");const f=this._study.priceScale();if(!this._study.isVisible()||null===e||null===f||f.isEmpty()||this._model.timeScale().isEmpty())return r;const v=(0,u.getPriceValueFormatterForSource)(this._study),S={} -;for(const t of r){const r=t.id,o=(0,p.ensureDefined)(c.styles.childs()[r]),d=o.childs().display.value();if(t.visible=0!==d,!t.visible)continue;const u=o.hasChild("plottype")?null===(i=o.child("plottype"))||void 0===i?void 0:i.value():null,_=this._isFundamental&&(u===h.LineStudyPlotStyle.StepLine||u===h.LineStudyPlotStyle.StepLineWithDiamonds),m=t.index,g=e-this._study.offset(r),f=_||null!==l&&g>l?a.PlotRowSearchMode.NearestLeft:a.PlotRowSearchMode.Exact,y=this._study.nearestIndex(g,f);if(void 0===y)continue;let b=S[r];if(void 0===b&&(b=this._study.getMinFirstBarIndexForPlot(r),Number.isFinite(b)&&(S[r]=b)),b>y)continue;const w=this._study.data().last(),C=this._study.data().valueAt(y)||(null!==w?w.value:null);if(null===C)continue;const P=C[m+1];(0,s.isNumber)(P)&&(t.value=v(P),t.color=(0,n.resetTransparency)(this.getPlotColor(m,C)))}return r}_hideValues(){return m&&(null===this._model.crossHairSource().pane||(0,l.isLineToolName)(c.tool.value())||null!==this._model.lineBeingEdited())}}},91217:(e,t,i)=>{"use strict";i.d(t,{StudyBase:()=>Gt,prepareStudyProperties:()=>Wt,prepareStudyPropertiesForLoadChart:()=>Ut});var s=i(16230),r=i(27788),n=i(50151),o=i(44352),a=i(98351),l=i(49483),c=i(26867),h=i.n(c),d=i(65447),u=i(88029),p=i(23304),_=i(88552),m=i(58403),g=i(59780),f=i(33639),v=i(89),S=i(86368),y=i(43312),b=i(83421);class w extends S.StudyBaseWindowView{constructor(e,t){super(e,t),this._showStudyValues=t.properties().childs().paneProperties.childs().legendProperties.childs().showStudyValues,this._showStudyValues.subscribe(this,this.update);const i=this._study.properties();i.childs().showLegendValues.subscribe(this,this.update);const s=this._study.metaInfo().plots,r=new Set;s.forEach((e=>{var t;if((0,b.isOhlcPlot)(e)){const t=e.target;if(r.has(t))return;r.add(t),i.childs().ohlcPlots.childs()[t].childs().display.subscribe(this,this.update)}else(0,b.isPlotSupportDisplay)(e)&&(null===(t=i.childs().styles.childs()[e.id])||void 0===t||t.childs().display.subscribe(this,this.update))}))}areValuesVisible(){return this._showStudyValues.value()}additional(){return null}destroy(){this._showStudyValues.unsubscribeAll(this);const e=this._study.properties();e.childs().showLegendValues.unsubscribeAll(this);const t=this._study.metaInfo().plots,i=new Set;t.forEach((t=>{var s;if((0,b.isOhlcPlot)(t)){const s=t.target;if(i.has(s))return;i.add(s),e.childs().ohlcPlots.childs()[s].childs().display.unsubscribe(this,this.update)}else(0,b.isPlotSupportDisplay)(t)&&(null===(s=e.childs().styles.childs()[t.id])||void 0===s||s.childs().display.unsubscribe(this,this.update))}))}_createValuesProvider(e,t){return new y.StudyLegendValuesProvider(e,t)}}var C=i(76076),P=i(66019),T=i(91035),x=i(24760),I=i(7578),M=i(89111),A=i(26220),L=i.n(A),k=i(65665),E=i(34657),D=i(8890),V=i(2484),B=i(86441),R=i(38031),N=i(29639);class O{constructor(e){this._data=e}draw(e,t){}drawBackground(e,t){e.save();const i=this._data,s=t.pixelRatio;let r=null;const n=Math.round(this._data.w*s);for(let t=0;t0){i.items[t-1].index===o.index-1&&null!==r&&(l=r+1)}const c=a+n,h=c-l+1;e.fillRect(l,Math.round(i.y*s),h,Math.round(i.h*s)),r=c}e.restore()}hitTest(e){return null}}var F=i(12702);class W{constructor(e,t,i,s){this._items=[],this._invalidated=!0,this._isMarkersEnabled=V.enabled("source_selection_markers"),this._study=e,this._series=t,this._model=i,this._plotName=s;const r=this._study.metaInfo().plots;for(let e=0;e0?(i-=r,s+=r):(i+=r,s-=r);const o=this._study.getMinFirstBarIndexForPlot(this._plotName);if(o>s)return;i=Math.max(o,i);const a=this._study.data().rangeIterator(i,s);for(;a.hasNext();){const e=a.next();let i=e.index;const s=e.value;i+=r;const o=new B.Point(Math.floor(i)-.5,NaN);let l=(0,k.isNumber)(t)?t:50;l=Math.min(l,100),l=Math.max(l,0);const c=this._colorProvider.getPlotPointStyle(s);void 0!==c.colors[1]&&(o.color=(0,R.generateColor)((0,n.ensureDefined)(c.colors[1]),l)),o.index=i,this._items.push(o)}this._model.timeScale().timedValuesToCoordinates(this._items)}}var H,z,U=i(11536),j=i(53074),G=i(23387),q=i(91031),$=i(14888),Y=i(47149),K=i(22770),X=i(38217),Z=i(34026),J=i(17908),Q=i(95242),ee=i(27714),te=i(83499);!function(e){e.Left="left",e.Right="right",e.Center="center"}(H||(H={})),function(e){e.Top="top",e.Bottom="bottom",e.Middle="middle"}(z||(z={}));const ie=(0,te.createDisconnectedCanvas)(document,(0,ee.size)({width:0,height:0}),1);class se{constructor(e,t,i,s,r,o="center",a=0){this._lines=e.split(/[^\S\r\n]*(?:\r\n|\r|\n)/),this._font=function(e,t,i,s){return(0, +;for(const t of r){const r=t.id,o=(0,p.ensureDefined)(c.styles.childs()[r]),d=o.childs().display.value();if(t.visible=0!==d,!t.visible)continue;const u=o.hasChild("plottype")?null===(i=o.child("plottype"))||void 0===i?void 0:i.value():null,_=this._isFundamental&&(u===h.LineStudyPlotStyle.StepLine||u===h.LineStudyPlotStyle.StepLineWithDiamonds),m=t.index,g=e-this._study.offset(r),f=_||null!==l&&g>l?a.PlotRowSearchMode.NearestLeft:a.PlotRowSearchMode.Exact,y=this._study.nearestIndex(g,f);if(void 0===y)continue;let b=S[r];if(void 0===b&&(b=this._study.getMinFirstBarIndexForPlot(r),Number.isFinite(b)&&(S[r]=b)),b>y)continue;const w=this._study.data().last(),P=this._study.data().valueAt(y)||(null!==w?w.value:null);if(null===P)continue;const C=P[m+1];(0,s.isNumber)(C)&&(t.value=v(C),t.color=(0,n.resetTransparency)(this.getPlotColor(m,P)))}return r}_hideValues(){return m&&(null===this._model.crossHairSource().pane||(0,l.isLineToolName)(c.tool.value())||null!==this._model.lineBeingEdited())}}},91217:(e,t,i)=>{"use strict";i.d(t,{StudyBase:()=>Gt,prepareStudyProperties:()=>Wt,prepareStudyPropertiesForLoadChart:()=>Ut});var s=i(16230),r=i(27788),n=i(50151),o=i(44352),a=i(98351),l=i(49483),c=i(26867),h=i.n(c),d=i(65447),u=i(88029),p=i(23304),_=i(88552),m=i(58403),g=i(59780),f=i(33639),v=i(89),S=i(86368),y=i(43312),b=i(83421);class w extends S.StudyBaseWindowView{constructor(e,t){super(e,t),this._showStudyValues=t.properties().childs().paneProperties.childs().legendProperties.childs().showStudyValues,this._showStudyValues.subscribe(this,this.update);const i=this._study.properties();i.childs().showLegendValues.subscribe(this,this.update);const s=this._study.metaInfo().plots,r=new Set;s.forEach((e=>{var t;if((0,b.isOhlcPlot)(e)){const t=e.target;if(r.has(t))return;r.add(t),i.childs().ohlcPlots.childs()[t].childs().display.subscribe(this,this.update)}else(0,b.isPlotSupportDisplay)(e)&&(null===(t=i.childs().styles.childs()[e.id])||void 0===t||t.childs().display.subscribe(this,this.update))}))}areValuesVisible(){return this._showStudyValues.value()}additional(){return null}destroy(){this._showStudyValues.unsubscribeAll(this);const e=this._study.properties();e.childs().showLegendValues.unsubscribeAll(this);const t=this._study.metaInfo().plots,i=new Set;t.forEach((t=>{var s;if((0,b.isOhlcPlot)(t)){const s=t.target;if(i.has(s))return;i.add(s),e.childs().ohlcPlots.childs()[s].childs().display.unsubscribe(this,this.update)}else(0,b.isPlotSupportDisplay)(t)&&(null===(s=e.childs().styles.childs()[t.id])||void 0===s||s.childs().display.unsubscribe(this,this.update))}))}_createValuesProvider(e,t){return new y.StudyLegendValuesProvider(e,t)}}var P=i(76076),C=i(66019),T=i(91035),x=i(24760),I=i(7578),M=i(89111),A=i(26220),L=i.n(A),k=i(65665),E=i(34657),D=i(8890),B=i(2484),V=i(86441),R=i(38031),N=i(29639);class O{constructor(e){this._data=e}draw(e,t){}drawBackground(e,t){e.save();const i=this._data,s=t.pixelRatio;let r=null;const n=Math.round(this._data.w*s);for(let t=0;t0){i.items[t-1].index===o.index-1&&null!==r&&(l=r+1)}const c=a+n,h=c-l+1;e.fillRect(l,Math.round(i.y*s),h,Math.round(i.h*s)),r=c}e.restore()}hitTest(e){return null}}var F=i(12702);class W{constructor(e,t,i,s){this._items=[],this._invalidated=!0,this._isMarkersEnabled=B.enabled("source_selection_markers"),this._study=e,this._series=t,this._model=i,this._plotName=s;const r=this._study.metaInfo().plots;for(let e=0;e0?(i-=r,s+=r):(i+=r,s-=r);const o=this._study.getMinFirstBarIndexForPlot(this._plotName);if(o>s)return;i=Math.max(o,i);const a=this._study.data().rangeIterator(i,s);for(;a.hasNext();){const e=a.next();let i=e.index;const s=e.value;i+=r;const o=new V.Point(Math.floor(i)-.5,NaN);let l=(0,k.isNumber)(t)?t:50;l=Math.min(l,100),l=Math.max(l,0);const c=this._colorProvider.getPlotPointStyle(s);void 0!==c.colors[1]&&(o.color=(0,R.generateColor)((0,n.ensureDefined)(c.colors[1]),l)),o.index=i,this._items.push(o)}this._model.timeScale().timedValuesToCoordinates(this._items)}}var H,z,U=i(11536),j=i(53074),G=i(23387),q=i(91031),$=i(14888),Y=i(47149),K=i(22770),X=i(38217),Z=i(34026),J=i(17908),Q=i(95242),ee=i(27714),te=i(83499);!function(e){e.Left="left",e.Right="right",e.Center="center"}(H||(H={})),function(e){e.Top="top",e.Bottom="bottom",e.Middle="middle"}(z||(z={}));const ie=(0,te.createDisconnectedCanvas)(document,(0,ee.size)({width:0,height:0}),1);class se{constructor(e,t,i,s,r,o="center",a=0){this._lines=e.split(/[^\S\r\n]*(?:\r\n|\r|\n)/),this._font=function(e,t,i,s){return(0, Q.makeFont)(s,i,`${e?"bold ":""}${t?"italic ":""}`)}(t,i,s,r),this._fontSize=r,this._verticalPadding=~~(r/6),this._textAlign=o,this._lineSpacing=a;const l=(0,n.ensureNotNull)(ie.getContext("2d"));l.font=this._font,l.textBaseline="top";let c=0;for(let e=0;e{for(const t of this._lines)n.strokeStyle&&e.strokeText(t,o,a),e.fillText(t,o,a),a+=this._fontSize,a+=this._lineSpacing})),e.restore()}}class re extends J.AbstractMapContainer{constructor(e){super(),this._maxSize=e,this._keysQueue=[]}get(e){const{fontSize:t,text:i,align:s,font:r,lineSpacing:n=0}=e;if(!i||!t||!s)return null;const o=(0,Q.makeFont)(t,r),a=(0,J.getDefault3)(this._map,n,s,o,new Map);let l=a.get(i);return void 0!==l||(this._size>=this._maxSize?this._deleteFirstKey():++this._size,this._keysQueue.push([o,s,n,i]),l=new se(i,e.bold,e.italic,r,t,s,n),a.set(i,l)),l}_deleteFirstKey(){const e=this._keysQueue.shift(),[t,i,s,r]=e,o=(0,n.ensureDefined)(this._map.get(s)),a=(0,n.ensureDefined)(o.get(i)),l=(0,n.ensureDefined)(a.get(t));l.delete(r),0===l.size&&a.delete(t),0===a.size&&o.delete(i),0===o.size&&this._map.delete(s)}}var ne=i(17364);class oe{constructor(e,t={skipRenderingOptimizations:!1}){this._items=[],this._barSpacing=0,this._vertOffset=0,this._textCache=t.textCache||new re(5e3),this._drawOperation=t.skipRenderingOptimizations?this._drawWithoutOptimizations.bind(this):this._drawWithOptimizations.bind(this),null!==e&&this.setData(e)}draw(e,t){this._preDrawInit(),this._drawOperation(e,t)}hitTest(e){const t=$.HitTestResult.REGULAR;let i=null;for(const s of this._items){if(!s)continue;const r=this._calcBoundingBox(s);if(r&&(0,Z.pointInBox)(e,r)){const e={tooltip:this._getTooltip(s,r)};i=new $.HitTestResult(t,e)}}return i}setData(e){this._height=void 0!==e.height?e.height:e.width,this._width=void 0!==e.width?e.width:e.height,this._color=e.color,this._borderColor=e.borderColor,this._vertOffset=e.vertOffset||0,e.text&&(this._text=e.text,this._fontSize=e.fontSize,this._lineSpacing=e.lineSpacing,this._textColor=e.textColor, -this._textAlign=e.textAlign||"center"),void 0!==e.items&&void 0!==e.barSpacing&&this.setItems(e.items,e.barSpacing)}setItems(e,t){this._setBaseData(e,t)}_calcBoundingBox(e){const t=e.vertOffset,i=this._getTextCache(e);if(!i)return;const s=i.textImageWidth,r=i.textImageHeight,n=s/2,o=e.y+t+e.textVertOffset,a=t>0?0:-r,l=t>0?r:0,c=new B.Point(e.x-n,o+a),h=new B.Point(e.x+n,o+l);return(0,B.box)(c,h)}_unionBox(e,t){const i=Math.min(e.min.x,t.min.x),s=Math.max(e.max.x,t.max.x),r=Math.min(e.min.y,t.min.y),n=Math.max(e.max.y,t.max.y),o=new B.Point(i,r),a=new B.Point(s,n);return(0,B.box)(o,a)}_getTooltip(e,t){if(e.tooltip)return{content:{type:"text",data:e.tooltip},tooltipDelay:200,extendMargin:!0,rect:{x:t.min.x,y:t.min.y,w:Math.abs(t.max.x-t.min.x),h:Math.abs(t.max.y-t.min.y)}}}_setBaseData(e,t){this._items.length=0,this._barSpacing=t;for(const t of e){const e=void 0===t.width?(0,n.ensureDefined)(this._width):t.width,i=void 0===t.height?(0,n.ensureDefined)(this._height):t.height,s=void 0===t.vertOffset?this._vertOffset:t.vertOffset,r=s>0?i:-i;this._items.push({width:e,height:i,vertOffset:s,textVertOffset:r,shapeWidth:0,shapeHeight:0,stepX:0,stepY:0,...t})}}_drawItemText(e,t,i){const s=this._getTextCache(i);if(null===s)return;const r=i.x,n=i.vertOffset,o=i.y+n+i.textVertOffset;let a;a=i.style&&void 0!==i.style.textColor?i.style.textColor:this._textColor;const l={style:{fillStyle:a},location:{x:r,y:o,horzAlign:H.Center,vertAlign:n>0?z.Top:z.Bottom}};s.paintTo(e,t,l)}_drawWithOptimizations(e,t){let i,s,r=null,n=!1;for(const o of this._items)o.style&&void 0!==o.style.color?(i=o.style.color||"rgba(0, 0, 0, 0)",s=o.style.borderColor||"rgba(0, 0, 0, 0)"):(i=this._color,s=this._borderColor),(r!==i||l.isSafari)&&(r=i,n&&this._endPath(e),this._startPath(e,t,i,s)),this._drawItemShape(e,t,o),n=!0;n&&this._endPath(e);for(const i of this._items)this._drawItemText(e,t,i)}_drawWithoutOptimizations(e,t){let i,s;for(const r of this._items){const o=(0,n.ensureDefined)(r.style);i=o.color||"rgba(0, 0, 0, 0)",s=o.borderColor||"rgba(0, 0, 0, 0)",this._startPath(e,t,i,s),this._drawItemShape(e,t,r),this._endPath(e),this._drawItemText(e,t,r)}}_drawItemShape(e,t,i){(0,te.drawScaled)(e,t.pixelRatio,(()=>this._drawItemShapeUsingCSSPixels(e,i)))}_drawItemShapeUsingCSSPixels(e,t){}_preDrawInit(){}_startPath(e,t,i,s){}_endPath(e){}_getTextCache(e){var t,i;const s=e.text||this._text,r=e.fontSize||this._fontSize,n=null!==(t=e.lineSpacing)&&void 0!==t?t:this._lineSpacing,o=e.textAlign||this._textAlign,a=null!==(i=e.font)&&void 0!==i?i:ne.CHART_FONT_FAMILY;return this._textCache.get({text:s,bold:!1,italic:!1,font:a,fontSize:r,lineSpacing:n,align:o})}}class ae extends oe{_startPath(e,t,i,s){e.beginPath(),e.lineWidth=this._lineWidth(t),e.lineCap="butt",e.strokeStyle=i}_endPath(e){e.stroke()}_lineWidth(e){return Math.max(1,Math.floor(2*e.pixelRatio))}}class le extends oe{_startPath(e,t,i,s){e.beginPath(),e.lineWidth=this._lineWidth(t),e.lineCap="butt",e.fillStyle=i,e.strokeStyle=s}_endPath(e){e.fill(),e.stroke()}_lineWidth(e){ -return Math.max(1,Math.floor(e.pixelRatio))}}class ce extends le{constructor(){super(...arguments),this._sign=0,this._thinArrow=!1,this._thinArrowLineWidth=0,this._headHeight=0,this._arrowWidth=0}setItems(e,t){this._setBaseData(e,t)}_drawItemShape(e,t,i){const s=t.pixelRatio,r=this._lineWidth(t)%2?.5:0,n=this._sign,o=this._arrowWidth,a=this._headHeight,l=Math.abs(i.height),c=Math.round(i.x*s)+r,h=i.vertOffset,d=Math.round((i.y+h+n*l/2)*s)+r,u=(0,q.ceiledEven)(o*s),p=u/2,_=Math.round(l*s),m=Math.round(a*s);e.translate(c,d),this._thinArrow?(e.moveTo(0,0),e.lineTo(-p,-p*n),e.moveTo(0,0),e.lineTo(p,-p*n),e.moveTo(0,0),e.lineTo(0,-_*n),e.moveTo(-p,-_*n),e.lineTo(p,-_*n)):(e.moveTo(0,0),_=0?e.vertOffset:e.vertOffset-e.shapeHeight}}),me.set("PaneRendererLabelDown",class extends de{_calcBoundingBox(e){const t=e.x-e.shapeWidth/2,i=e.x+e.shapeWidth/2,s=e.y-e.shapeHeight+e.vertOffset,r=e.y+e.vertOffset,n=new B.Point(t,s),o=new B.Point(i,r);return(0,B.box)(n,o)}_drawItemShape(e,t,i){const s=t.pixelRatio,r=this._lineWidth(t)%2?.5:0,n=Math.max(1,Math.floor(s))%2?.5:0,o=this._getArrowSize(i);let a=Math.round(o*s);(n+a)%1!=r%1&&(a+=.5);let l=Math.round(i.shapeWidth/2*s);(n+l)%1!=r%1&&(l+=.5);const c=Math.round(i.x*s)+n,h=Math.round((i.y+i.vertOffset)*s)+r,d=c+a,u=Math.round((i.y+i.vertOffset-o)*s)+r,p=c-a,_=c+l,m=Math.round((i.y+i.vertOffset-i.shapeHeight)*s)+r,g=c-l;e.moveTo(d,u),e.lineTo(c,h),e.lineTo(p,u),i.shapeWidth<=2*o?(e.lineTo(g,u),this._drawCorner(e,g,m,pe.leftUp,s),this._drawCorner(e,_,m,pe.rightUp,s),e.lineTo(_,u)):(this._drawCorner(e,g,u,pe.leftDown,s),this._drawCorner(e,g,m,pe.leftUp,s),this._drawCorner(e,_,m,pe.rightUp,s),this._drawCorner(e,_,u,pe.rightDown,s)),e.lineTo(d,u)}_getVerticalTextOffset(e){return-e.shapeHeight/2-this._getArrowSize(e)/2}_calcVertOffset(e){return Math.sign(e.vertOffset)<=0?e.vertOffset:e.vertOffset+e.shapeHeight}}),me.set("PaneRendererSquare",class extends le{_drawItemShape(e,t,i){const s=t.pixelRatio,r=Math.max(1,Math.floor(s))%2?.5:0,n=this._lineWidth(t)%2?.5:0;let o=Math.round(i.height/2*s);(r+o)%1!=n%1&&(o+=.5);const a=Math.round(i.x*s)+r,l=Math.round((i.y+i.vertOffset)*s)+r,c=a-o,h=l-o,d=a+o,u=l+o;e.rect(c,h,d-c,u-h)}_calcBoundingBox(e){const t=e.height,i=Math.round(t/2),s=e.x-i,r=e.vertOffset,n=e.y+r-i,o=s,a=s+t,l=n,c=n+t,h=new B.Point(o,l),d=new B.Point(a,c);let u=(0,B.box)(h,d);const p=super._calcBoundingBox(e);return p&&(u=this._unionBox(u,p)),u}}),me.set("PaneRendererTriangleApexUp",class extends _e{_drawItemShape(e,t,i){const s=i.width,r=i.height,n=Math.round(r/3),o=i.vertOffset-2*n,a=t.pixelRatio,l=this._lineWidth(t)%2?.5:0,c=Math.max(1,Math.floor(a)),h=c%2?.5:0;let d=Math.round(s*a);d%2!=c%2&&(d+=1);const u=Math.round(i.x*a)+h,p=Math.round((i.y+o)*a),_=u+d/2,m=Math.round((i.y+o+r)*a)+l,g=u-d/2;e.moveTo(u,p),e.lineTo(_,m),e.lineTo(g,m),e.lineTo(u,p)}}),me.set("PaneRendererTriangleApexDown",class extends _e{_drawItemShape(e,t,i){const s=i.width,r=i.height,n=Math.round(r/3),o=i.vertOffset-n,a=t.pixelRatio,l=this._lineWidth(t)%2?.5:0,c=Math.max(1,Math.floor(a)),h=c%2?.5:0;let d=Math.round(s*a);d%2!=c%2&&(d+=1) -;const u=Math.round(i.x*a)+h,p=Math.round((i.y+o)*a)+l,_=u+d/2,m=Math.round((i.y+o+r)*a),g=u-d/2;e.moveTo(g,p),e.lineTo(_,p),e.lineTo(u,m),e.lineTo(g,p)}}),me.set("PaneRendererXCross",class extends ae{_drawItemShapeUsingCSSPixels(e,t){const i=t.width,s=t.height,r=t.x-i/2,n=t.vertOffset,o=t.y-s/2+n;e.moveTo(r,o),e.lineTo(r+i,o+s),e.moveTo(r,o+s),e.lineTo(r+i,o)}_calcBoundingBox(e){const t=e.width,i=e.height,s=e.x-t/2,r=e.vertOffset,n=e.y-i/2+r,o=s,a=s+t,l=n,c=n+i,h=new B.Point(o,l),d=new B.Point(a,c);let u=(0,B.box)(h,d);const p=super._calcBoundingBox(e);return p&&(u=this._unionBox(u,p)),u}});class ge{constructor(e,t,i,s){this._items=[],this._invalidated=!1,this._renderer=null,this._isMarkersEnabled=V.enabled("source_selection_markers"),this._selectionData=null,this._plotIndex=null,this._topCoord=0,this._bottomCoord=0,this._study=e,this._series=t,this._model=i,this._plotName=s;const r=e.metaInfo().plots;for(let e=0;e0?(s-=o,r+=o):(s+=o,r-=o);const a=this._study.getMinFirstBarIndexForPlot(this._plotName);if(a>r)return;s=Math.max(a,s);const l=this._study.data(),c=this._study.firstValue();if(null===c)return;const h=l.rangeIterator(s,r),d=this._getTranspValue();let u=[];const p=this._model.selection().isSelected(this._study);p?(u=this._selectionIndexer.indexes(),this._selectionData={points:[],hittestResult:$.HitTestResult.REGULAR,vertOffset:0,bgColors:[],barSpacing:e.barSpacing(),visible:!0}):(this._selectionIndexer.clear(),this._selectionData=null);const _=this._series.properties().childs().style.value(),m=2===_?"lineStyle":3===_?"areaStyle":null;let g,v;m?(g=this._series.properties().childs()[m].childs().priceSource.value(),v=g):(g="high",v="low");const S=t.isInverted(),y=t.coordinateToPrice(t.height()*t.topMargin(),c),b=t.coordinateToPrice(t.height()*(1-t.bottomMargin()),c);this._topCoord=S?b:y,this._bottomCoord=S?y:b;const w=(0, -n.ensureNotNull)(this._model.paneForSource(this._study)).height(),C=this._study.properties().childs().styles.childs()[this._plotName].childs(),P=C.color.value(),T=C.textColor?C.textColor.value():void 0,x=P,I=P,M=void 0===T?void 0:T,A=(0,n.ensureNotNull)(this._plotIndex),L=(0,X.createEmptyStyle)();for(;h.hasNext();){const e=h.next(),t=e.index,i=e.value,s=Math.floor(t+o),r=i[A+1];if(null==r)continue;const n=this._createItem(s,r,g,v);if(null!==n){if(this._colorProvider.isColorDefined()){n.style={color:x,borderColor:I,textColor:M};const e=this._colorProvider.getPlotPointStyle(i,L);this._fillItemWithPointStyle(n,e,d)}p&&-1!==u.indexOf(t)&&null!==this._selectionData&&(this._selectionData.points.push(n),this._selectionData.bgColors.push(this._model.backgroundColorAtYPercentFromTop(n.y/w))),this._items.push(n)}}this._convertItemsToCoordinates()}_fillItemWithPointStyle(e,t,i){const s=(0,n.ensureDefined)(e.style);if(void 0!==t.colors[0]){s.color=(0,R.generateColor)((0,n.ensureDefined)(t.colors[0]),i);const e=i>9?i-10:0;s.borderColor=(0,R.generateColor)(s.color,e)}void 0!==t.colors[2]&&(s.textColor=(0,R.generateColor)((0,n.ensureDefined)(t.colors[2]),i))}_updateRenderer(e){this._updateImpl();const t=this._model.timeScale(),i={},s=this._getTranspValue(),r=t.barSpacing(),n=this._calculateShapeHeight(r),o=this._study.properties().childs().styles.childs()[this._plotName].childs(),a=o.location.value(),l=this._calculateVerticalOffset(a,n+n/2);i.barSpacing=r,i.items=this._items,i.color=(0,R.generateColor)(o.color.value(),s),i.height=n,i.vertOffset=l;const c=o.plottype.value(),h=G.plotShapesData[c],d=new N.CompositeRenderer;h&&d.append(this._createRenderer(h.paneRendererClass,i)),this._model.selection().isSelected(this._study)&&this._isMarkersEnabled&&null!==this._selectionData&&(this._selectionData.vertOffset=l,d.append(new j.SelectionRenderer(this._selectionData))),this._renderer=d}_createRenderer(e,t){const i=me.get(e);return new((0,n.ensureDefined)(i))(t)}_getSeriesVal(e,t){const i=(0,K.barFunction)(e),s=this._series.data().valueAt(t);return null===s?null:i(s)}_getTranspValue(){let e=0;const t=this._study.properties().childs();t.transparency&&(e=t.transparency.value(),e=(0,k.isNumber)(e)?e:50);const i=t.styles.childs()[this._plotName].childs();return i.transparency&&(e=i.transparency.value(),e=(0,k.isNumber)(e)?e:50),(0,q.clamp)(e,0,100)}_createItem(e,t,i,s){const r=this._study.properties().childs().styles.childs()[this._plotName].childs().location.value();if((null===t||0===t)&&r!==v.MarkLocation.Absolute)return null;let o;switch(r){case v.MarkLocation.AboveBar:const a=this._getSeriesVal(i,e);if(null===a)return null;o=a;break;case v.MarkLocation.BelowBar:const l=this._getSeriesVal(s,e);if(null===l)return null;o=l;break;case v.MarkLocation.Top:o=this._topCoord;break;case v.MarkLocation.Bottom:o=this._bottomCoord;break;case v.MarkLocation.Absolute:o=(0,n.ensureNotNull)(t);break;default:throw new Error("Bad value: "+r)}return new B.Point(e,o)}_convertItemsToCoordinates(){const e=this._model.timeScale(),t=this._study.priceScale() -;e.timedValuesToCoordinates(this._items);const i=(0,n.ensureNotNull)(this._study.firstValue());(0,n.ensureNotNull)(t).pointsArrayToCoordinates(this._items,i)}_calculateVerticalOffset(e,t){let i=0;switch(e){case v.MarkLocation.AboveBar:case v.MarkLocation.Bottom:i=-t;break;case v.MarkLocation.BelowBar:case v.MarkLocation.Top:i=t}return(0,n.ensureNotNull)(this._study.priceScale()).isInverted()&&(i*=-1),i}_calculateShapeHeight(e,t){let i=e;switch(t){case b.PlotSymbolSize.Tiny:i=.3*e;break;case b.PlotSymbolSize.Small:i=.6*e;break;case b.PlotSymbolSize.Normal:i=e;break;case b.PlotSymbolSize.Large:i=1.5*e;break;case b.PlotSymbolSize.Huge:i=2*e}return i}}class fe extends ge{_updateRenderer(e){const t=e.childs();this._updateImpl();const i=this._model.timeScale(),s={},r=this._getTranspValue(),n=i.barSpacing();let o;if(t.size){const e=t.size.value();o=this._calculateShapeHeight(25,e)}else o=Math.round(n/2);o=Math.max(o,1);const a=t.location.value(),l=(0,R.generateColor)(t.color.value(),r),c=r>19?r-10:0,h=this._calculateVerticalOffset(a,Math.round(1.5*o));s.barSpacing=n,s.items=this.items(),s.color=l,s.borderColor=(0,R.generateColor)(t.color.value(),c),s.height=o,s.vertOffset=h;const d=t.plottype.value(),u=G.plotShapesData[d],p=new N.CompositeRenderer,_=t.text?t.text.value():void 0;if(void 0!==_&&""!==_.trim()){let e=_.trim().replace(/\\n/gm,"\n");e=(0,U.cleanButAmpersand)(e,!0),s.text=e,s.fontSize=12;const i=t.textColor?t.textColor.value():void 0;s.textColor=i?(0,R.generateColor)(i,r):l}p.append(super._createRenderer(u.paneRendererClass,s)),this._model.selection().isSelected(this._study)&&this._isMarkersEnabled&&null!==this._selectionData&&(this._selectionData.vertOffset=h,p.append(new j.SelectionRenderer(this._selectionData))),this._renderer=p}}var ve=i(87795),Se=i.n(ve),ye=i(55014);class be extends oe{constructor(e,t){super(null,t),this._fontSizeEnsured=0,this._ch="",this._fontFamily=ne.CHART_FONT_FAMILY,this._charCache=null,null!==e&&this.setData(e)}setData(e){super.setData(e),this._fontSizeEnsured=(0,n.ensureDefined)(this._height);const t=e.char.slice(0,40);this._ch=Se()(t)[0]||" ",this._fontFamily=e.fontFamily||ne.CHART_FONT_FAMILY}hitTest(e){const t=(0,ye.interactionTolerance)().series+this._fontSizeEnsured/2;for(const i of this._items){if(new B.Point(i.x,i.y+i.vertOffset).subtract(e).length()<=t)return new $.HitTestResult($.HitTestResult.REGULAR)}return null}_drawItemShape(e,t,i){const s=i.x,r=i.vertOffset>0?1:-1,n=i.y+i.vertOffset-r*Math.round(this._fontSizeEnsured/2);let o;o=i.style&&void 0!==i.style.color?i.style.color:this._color;const a=this._textImageCache(),l=t.pixelRatio;if(this._fontSizeEnsured<=4/l){e.save();const t=Math.max(1,Math.floor(l));let r=Math.max(1,Math.floor(a.textImageWidth*l));r%2!=t%2&&(r+=r>1?-1:1);const c=Math.round(n*l)+(i.vertOffset>=0?0:-r);return e.fillStyle=o,e.fillRect(Math.round(s*l)+(l%2?.5:0)-r/2,c,r,r),void e.restore()}const c={style:{fillStyle:o},location:{x:s,y:n,horzAlign:H.Center,vertAlign:i.vertOffset>0?z.Top:z.Bottom}};a.paintTo(e,t,c)}_startPath(e,t,i,s){}_endPath(e){} -_textImageCache(){return null!==this._charCache&&this._charCache.fontFamily===this._fontFamily&&this._charCache.fontSize===this._fontSizeEnsured||(this._charCache={fontSize:this._fontSizeEnsured,fontFamily:this._fontFamily,cache:new se(this._ch,!1,!1,this._fontFamily,this._fontSizeEnsured,"center",0)}),this._charCache.cache}}class we extends ge{constructor(){super(...arguments),this._compositeRenderer=new N.CompositeRenderer,this._charRenderer=new be(null)}renderer(){return this._isPlotVisible()&&this._scalesReady()?(this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._compositeRenderer):null}_updateImpl(){if(this._compositeRenderer.clear(),super._updateImpl(),0===this._items.length)return;const e=this._getTranspValue(),t=this._model.timeScale().barSpacing();let i;const s=this._study.properties().childs().styles.childs()[this._plotName].childs();if(s.size){const e=s.size.value();i=this._calculateShapeHeight(50,e)}else i=Math.round(t);const r=s.location.value(),n=(0,R.generateColor)(s.color.value(),e),o=this._calculateVerticalOffset(r,i),a={items:this.items(),barSpacing:t,char:s.char.value(),height:i,vertOffset:o,color:n},l=s.text?s.text.value():void 0;if(void 0!==l&&""!==l.trim()){let t=l.trim().replace(/\\n/gm,"\n");t=(0,U.cleanButAmpersand)(t,!0),a.text=t,a.fontSize=12;const i=s.textColor?s.textColor.value():void 0;a.textColor=i?(0,R.generateColor)(i,e):n}this._charRenderer.setData(a),this._compositeRenderer.append(this._charRenderer),this._model.selection().isSelected(this._study)&&this._isMarkersEnabled&&null!==this._selectionData&&(this._selectionData.vertOffset=o,this._compositeRenderer.append(new j.SelectionRenderer(this._selectionData)))}}var Ce=i(24377);class Pe extends B.Point{constructor(e,t,i,s){super(e,t),this.height=i,this.isUp=s,this.style={}}}function Te(e){return Math.round(e/4)}function xe(e){return Math.round(e/2)}class Ie{constructor(e){this._data=e}draw(e,t){var i;const s=t.pixelRatio,r=this._data,n=xe(r.barSpacing),o=Te(r.barSpacing),a=n<4,l=Math.max(n/2,1),c=(0,q.ceiledEven)(n*s),h=c/2,d=Math.round(n*s);e.lineCap="butt",e.lineWidth=Math.max(1,Math.floor(s));const u=e.lineWidth%2?.5:0;for(const t of r.items){const n=t.isUp?-1:1,p=Math.round(Math.abs(t.height)*s),_=Math.round(t.x*s)+u,m=Math.round((t.y-n*o)*s)+u;e.beginPath(),e.translate(_,m);const g=null!==(i=t.style&&t.style.color)&&void 0!==i?i:t.isUp?r.colorup:r.colordown;a?(e.moveTo(0,0),e.lineTo(-h,-h*n),e.moveTo(0,0),e.lineTo(h,-h*n),e.moveTo(0,0),e.lineTo(0,-p*n),e.moveTo(-h,-p*n),e.lineTo(h,-p*n),e.lineWidth=l,e.strokeStyle=g,e.stroke()):(e.moveTo(0,0),pthis._maxAbsValue&&(this._maxAbsValue=Math.abs(t));const r=t>0;let n;if(r){const t=this._getSeriesVal(s,e);if(null===t)return null;n=t}else{const t=this._getSeriesVal(i,e);if(null===t)return null;n=t}return new Pe(e,n,t,r)}_convertItemsToCoordinates(){const e=this._model.timeScale(),t=(0,n.ensureNotNull)(this._study.priceScale());e.timedValuesToCoordinates(this._items),t.pointsArrayToCoordinates(this._items,(0,n.ensureNotNull)(this._study.firstValue()));const i=this._study.properties().childs().styles.childs();let s=Math.abs(i[this._plotName].childs().minHeight.value()),r=Math.abs(i[this._plotName].childs().maxHeight.value());if(s>r){const e=s;s=r,r=e}const o=(r-s)/this._maxAbsValue,a=this._items;for(let e=0;es)return;i=Math.max(r,i);const o=this._study.data(),a=this._study.firstValue();if(null===a)return;const l=o.rangeIterator(i,s),c=(0,n.ensureDefined)(this._study.properties().childs().ohlcPlots).childs()[this._plotName].childs(),h=new Map,d=(e,t)=>{const i=e+"@"+t;if(!h.has(i)){const s=(0,R.generateColor)(e,t);return h.set(i,s),s}return h.get(i)},u=(0,X.createEmptyStyle)();for(;l.hasNext();){const e=l.next();let t=e.index;const i=e.value;t=Math.floor(t);let s=!0;const r=new Map;for(let e=1;e<=4;++e){const t=this._ohlcPlotIndexes.get(e);if(void 0===t){s=!1;break}const n=i[t+1];if(null==n){s=!1;break}r.set(e,n)}if(!s)continue;const o=(0,n.ensureDefined)(r.get(1)),a=(0,n.ensureDefined)(r.get(4)),h=(0,n.ensureDefined)(r.get(2)),p=(0,n.ensureDefined)(r.get(3)),_=Math.max(o,h,p,a),m=Math.min(o,h,p,a);let g=(0,n.ensureDefined)(d(c.color.value(),0));const f=this._colorProvider.getPlotPointStyle(i,u);void 0!==f.colors[0]&&(g=(0,n.ensureDefined)(f.colors[0]));const v={time:Math.round(t),open:o,high:_,low:m,close:a,color:g,wickColor:f.colors[4],borderColor:f.colors[3],hollow:null};this._bars.push(v)}if(e.barPricesToCoordinates(this._bars,a),this._model.timeScale().barIndexesToCoordinates(this._bars),this._model.selection().isSelected(this._study)){const t=this._selectionIndexer.indexes();this._selectionData={points:[],hittestResult:$.HitTestResult.REGULAR,bgColors:[],visible:!0,barSpacing:this._model.timeScale().barSpacing()};const i=(0,n.ensureNotNull)(this._model.paneForSource(this._study)).height(),s=(0,n.ensureDefined)(this._ohlcPlotIndexes.get(4));for(let r=0;rthis._actualLength?this._items[this._actualLength]:null;return null!==e&&Boolean(e.invalidateCache)&&e.invalidateCache(),e}invalidateCache(){this._invalidations+=1,3e3===this._invalidations&&(this._items.splice(this._actualLength),this._invalidations=0),this._actualLength=0}at(e){return this._items[e]}data(){return this._items}length(){return this._actualLength}}class He extends We{constructor(e){super(),this.color=e}}class ze{constructor(){this._map=new Map,this._usedKeys=new Set,this._invalidations=0}invalidateCache(){this._invalidations+=1,50===this._invalidations&&(this._deleteUnused(),this._invalidations=0),this._usedKeys.clear(),this._map.forEach(((e,t)=>e.invalidateCache()))}get(e){ +this._textAlign=e.textAlign||"center"),void 0!==e.items&&void 0!==e.barSpacing&&this.setItems(e.items,e.barSpacing)}setItems(e,t){this._setBaseData(e,t)}_calcBoundingBox(e){const t=e.vertOffset,i=this._getTextCache(e);if(!i)return;const s=i.textImageWidth,r=i.textImageHeight,n=s/2,o=e.y+t+e.textVertOffset,a=t>0?0:-r,l=t>0?r:0,c=new V.Point(e.x-n,o+a),h=new V.Point(e.x+n,o+l);return(0,V.box)(c,h)}_unionBox(e,t){const i=Math.min(e.min.x,t.min.x),s=Math.max(e.max.x,t.max.x),r=Math.min(e.min.y,t.min.y),n=Math.max(e.max.y,t.max.y),o=new V.Point(i,r),a=new V.Point(s,n);return(0,V.box)(o,a)}_getTooltip(e,t){if(e.tooltip)return{content:{type:"text",data:e.tooltip},tooltipDelay:200,extendMargin:!0,rect:{x:t.min.x,y:t.min.y,w:Math.abs(t.max.x-t.min.x),h:Math.abs(t.max.y-t.min.y)}}}_setBaseData(e,t){this._items.length=0,this._barSpacing=t;for(const t of e){const e=void 0===t.width?(0,n.ensureDefined)(this._width):t.width,i=void 0===t.height?(0,n.ensureDefined)(this._height):t.height,s=void 0===t.vertOffset?this._vertOffset:t.vertOffset,r=s>0?i:-i;this._items.push({width:e,height:i,vertOffset:s,textVertOffset:r,shapeWidth:0,shapeHeight:0,stepX:0,stepY:0,...t})}}_drawItemText(e,t,i){const s=this._getTextCache(i);if(null===s)return;const r=i.x,n=i.vertOffset,o=i.y+n+i.textVertOffset;let a;a=i.style&&void 0!==i.style.textColor?i.style.textColor:this._textColor;const l={style:{fillStyle:a},location:{x:r,y:o,horzAlign:H.Center,vertAlign:n>0?z.Top:z.Bottom}};s.paintTo(e,t,l)}_drawWithOptimizations(e,t){let i,s,r=null,n=!1;for(const o of this._items)o.style&&void 0!==o.style.color?(i=o.style.color||"rgba(0, 0, 0, 0)",s=o.style.borderColor||"rgba(0, 0, 0, 0)"):(i=this._color,s=this._borderColor),(r!==i||l.isSafari)&&(r=i,n&&this._endPath(e),this._startPath(e,t,i,s)),this._drawItemShape(e,t,o),n=!0;n&&this._endPath(e);for(const i of this._items)this._drawItemText(e,t,i)}_drawWithoutOptimizations(e,t){let i,s;for(const r of this._items){const o=(0,n.ensureDefined)(r.style);i=o.color||"rgba(0, 0, 0, 0)",s=o.borderColor||"rgba(0, 0, 0, 0)",this._startPath(e,t,i,s),this._drawItemShape(e,t,r),this._endPath(e),this._drawItemText(e,t,r)}}_drawItemShape(e,t,i){(0,te.drawScaled)(e,t.pixelRatio,(()=>this._drawItemShapeUsingCSSPixels(e,i)))}_drawItemShapeUsingCSSPixels(e,t){}_preDrawInit(){}_startPath(e,t,i,s){}_endPath(e){}_getTextCache(e){var t,i;const s=e.text||this._text,r=e.fontSize||this._fontSize,n=null!==(t=e.lineSpacing)&&void 0!==t?t:this._lineSpacing,o=e.textAlign||this._textAlign,a=null!==(i=e.font)&&void 0!==i?i:ne.CHART_FONT_FAMILY;return this._textCache.get({text:s,bold:!1,italic:!1,font:a,fontSize:r,lineSpacing:n,align:o})}}class ae extends oe{_startPath(e,t,i,s){e.beginPath(),e.lineWidth=this._lineWidth(t),e.lineCap="butt",e.strokeStyle=i}_endPath(e){e.stroke()}_lineWidth(e){return Math.max(1,Math.floor(2*e.pixelRatio))}}class le extends oe{_startPath(e,t,i,s){e.beginPath(),e.lineWidth=this._lineWidth(t),e.lineCap="butt",e.fillStyle=i,e.strokeStyle=s}_endPath(e){e.fill(),e.stroke()}_lineWidth(e){ +return Math.max(1,Math.floor(e.pixelRatio))}}class ce extends le{constructor(){super(...arguments),this._sign=0,this._thinArrow=!1,this._thinArrowLineWidth=0,this._headHeight=0,this._arrowWidth=0}setItems(e,t){this._setBaseData(e,t)}_drawItemShape(e,t,i){const s=t.pixelRatio,r=this._lineWidth(t)%2?.5:0,n=this._sign,o=this._arrowWidth,a=this._headHeight,l=Math.abs(i.height),c=Math.round(i.x*s)+r,h=i.vertOffset,d=Math.round((i.y+h+n*l/2)*s)+r,u=(0,q.ceiledEven)(o*s),p=u/2,_=Math.round(l*s),m=Math.round(a*s);e.translate(c,d),this._thinArrow?(e.moveTo(0,0),e.lineTo(-p,-p*n),e.moveTo(0,0),e.lineTo(p,-p*n),e.moveTo(0,0),e.lineTo(0,-_*n),e.moveTo(-p,-_*n),e.lineTo(p,-_*n)):(e.moveTo(0,0),_=0?e.vertOffset:e.vertOffset-e.shapeHeight}}),me.set("PaneRendererLabelDown",class extends de{_calcBoundingBox(e){const t=e.x-e.shapeWidth/2,i=e.x+e.shapeWidth/2,s=e.y-e.shapeHeight+e.vertOffset,r=e.y+e.vertOffset,n=new V.Point(t,s),o=new V.Point(i,r);return(0,V.box)(n,o)}_drawItemShape(e,t,i){const s=t.pixelRatio,r=this._lineWidth(t)%2?.5:0,n=Math.max(1,Math.floor(s))%2?.5:0,o=this._getArrowSize(i);let a=Math.round(o*s);(n+a)%1!=r%1&&(a+=.5);let l=Math.round(i.shapeWidth/2*s);(n+l)%1!=r%1&&(l+=.5);const c=Math.round(i.x*s)+n,h=Math.round((i.y+i.vertOffset)*s)+r,d=c+a,u=Math.round((i.y+i.vertOffset-o)*s)+r,p=c-a,_=c+l,m=Math.round((i.y+i.vertOffset-i.shapeHeight)*s)+r,g=c-l;e.moveTo(d,u),e.lineTo(c,h),e.lineTo(p,u),i.shapeWidth<=2*o?(e.lineTo(g,u),this._drawCorner(e,g,m,pe.leftUp,s),this._drawCorner(e,_,m,pe.rightUp,s),e.lineTo(_,u)):(this._drawCorner(e,g,u,pe.leftDown,s),this._drawCorner(e,g,m,pe.leftUp,s),this._drawCorner(e,_,m,pe.rightUp,s),this._drawCorner(e,_,u,pe.rightDown,s)),e.lineTo(d,u)}_getVerticalTextOffset(e){return-e.shapeHeight/2-this._getArrowSize(e)/2}_calcVertOffset(e){return Math.sign(e.vertOffset)<=0?e.vertOffset:e.vertOffset+e.shapeHeight}}),me.set("PaneRendererSquare",class extends le{_drawItemShape(e,t,i){const s=t.pixelRatio,r=Math.max(1,Math.floor(s))%2?.5:0,n=this._lineWidth(t)%2?.5:0;let o=Math.round(i.height/2*s);(r+o)%1!=n%1&&(o+=.5);const a=Math.round(i.x*s)+r,l=Math.round((i.y+i.vertOffset)*s)+r,c=a-o,h=l-o,d=a+o,u=l+o;e.rect(c,h,d-c,u-h)}_calcBoundingBox(e){const t=e.height,i=Math.round(t/2),s=e.x-i,r=e.vertOffset,n=e.y+r-i,o=s,a=s+t,l=n,c=n+t,h=new V.Point(o,l),d=new V.Point(a,c);let u=(0,V.box)(h,d);const p=super._calcBoundingBox(e);return p&&(u=this._unionBox(u,p)),u}}),me.set("PaneRendererTriangleApexUp",class extends _e{_drawItemShape(e,t,i){const s=i.width,r=i.height,n=Math.round(r/3),o=i.vertOffset-2*n,a=t.pixelRatio,l=this._lineWidth(t)%2?.5:0,c=Math.max(1,Math.floor(a)),h=c%2?.5:0;let d=Math.round(s*a);d%2!=c%2&&(d+=1);const u=Math.round(i.x*a)+h,p=Math.round((i.y+o)*a),_=u+d/2,m=Math.round((i.y+o+r)*a)+l,g=u-d/2;e.moveTo(u,p),e.lineTo(_,m),e.lineTo(g,m),e.lineTo(u,p)}}),me.set("PaneRendererTriangleApexDown",class extends _e{_drawItemShape(e,t,i){const s=i.width,r=i.height,n=Math.round(r/3),o=i.vertOffset-n,a=t.pixelRatio,l=this._lineWidth(t)%2?.5:0,c=Math.max(1,Math.floor(a)),h=c%2?.5:0;let d=Math.round(s*a);d%2!=c%2&&(d+=1) +;const u=Math.round(i.x*a)+h,p=Math.round((i.y+o)*a)+l,_=u+d/2,m=Math.round((i.y+o+r)*a),g=u-d/2;e.moveTo(g,p),e.lineTo(_,p),e.lineTo(u,m),e.lineTo(g,p)}}),me.set("PaneRendererXCross",class extends ae{_drawItemShapeUsingCSSPixels(e,t){const i=t.width,s=t.height,r=t.x-i/2,n=t.vertOffset,o=t.y-s/2+n;e.moveTo(r,o),e.lineTo(r+i,o+s),e.moveTo(r,o+s),e.lineTo(r+i,o)}_calcBoundingBox(e){const t=e.width,i=e.height,s=e.x-t/2,r=e.vertOffset,n=e.y-i/2+r,o=s,a=s+t,l=n,c=n+i,h=new V.Point(o,l),d=new V.Point(a,c);let u=(0,V.box)(h,d);const p=super._calcBoundingBox(e);return p&&(u=this._unionBox(u,p)),u}});class ge{constructor(e,t,i,s){this._items=[],this._invalidated=!1,this._renderer=null,this._isMarkersEnabled=B.enabled("source_selection_markers"),this._selectionData=null,this._plotIndex=null,this._topCoord=0,this._bottomCoord=0,this._study=e,this._series=t,this._model=i,this._plotName=s;const r=e.metaInfo().plots;for(let e=0;e0?(s-=o,r+=o):(s+=o,r-=o);const a=this._study.getMinFirstBarIndexForPlot(this._plotName);if(a>r)return;s=Math.max(a,s);const l=this._study.data(),c=this._study.firstValue();if(null===c)return;const h=l.rangeIterator(s,r),d=this._getTranspValue();let u=[];const p=this._model.selection().isSelected(this._study);p?(u=this._selectionIndexer.indexes(),this._selectionData={points:[],hittestResult:$.HitTestResult.REGULAR,vertOffset:0,bgColors:[],barSpacing:e.barSpacing(),visible:!0}):(this._selectionIndexer.clear(),this._selectionData=null);const _=this._series.properties().childs().style.value(),m=2===_?"lineStyle":3===_?"areaStyle":null;let g,v;m?(g=this._series.properties().childs()[m].childs().priceSource.value(),v=g):(g="high",v="low");const S=t.isInverted(),y=t.coordinateToPrice(t.height()*t.topMargin(),c),b=t.coordinateToPrice(t.height()*(1-t.bottomMargin()),c);this._topCoord=S?b:y,this._bottomCoord=S?y:b;const w=(0, +n.ensureNotNull)(this._model.paneForSource(this._study)).height(),P=this._study.properties().childs().styles.childs()[this._plotName].childs(),C=P.color.value(),T=P.textColor?P.textColor.value():void 0,x=C,I=C,M=void 0===T?void 0:T,A=(0,n.ensureNotNull)(this._plotIndex),L=(0,X.createEmptyStyle)();for(;h.hasNext();){const e=h.next(),t=e.index,i=e.value,s=Math.floor(t+o),r=i[A+1];if(null==r)continue;const n=this._createItem(s,r,g,v);if(null!==n){if(this._colorProvider.isColorDefined()){n.style={color:x,borderColor:I,textColor:M};const e=this._colorProvider.getPlotPointStyle(i,L);this._fillItemWithPointStyle(n,e,d)}p&&-1!==u.indexOf(t)&&null!==this._selectionData&&(this._selectionData.points.push(n),this._selectionData.bgColors.push(this._model.backgroundColorAtYPercentFromTop(n.y/w))),this._items.push(n)}}this._convertItemsToCoordinates()}_fillItemWithPointStyle(e,t,i){const s=(0,n.ensureDefined)(e.style);if(void 0!==t.colors[0]){s.color=(0,R.generateColor)((0,n.ensureDefined)(t.colors[0]),i);const e=i>9?i-10:0;s.borderColor=(0,R.generateColor)(s.color,e)}void 0!==t.colors[2]&&(s.textColor=(0,R.generateColor)((0,n.ensureDefined)(t.colors[2]),i))}_updateRenderer(e){this._updateImpl();const t=this._model.timeScale(),i={},s=this._getTranspValue(),r=t.barSpacing(),n=this._calculateShapeHeight(r),o=this._study.properties().childs().styles.childs()[this._plotName].childs(),a=o.location.value(),l=this._calculateVerticalOffset(a,n+n/2);i.barSpacing=r,i.items=this._items,i.color=(0,R.generateColor)(o.color.value(),s),i.height=n,i.vertOffset=l;const c=o.plottype.value(),h=G.plotShapesData[c],d=new N.CompositeRenderer;h&&d.append(this._createRenderer(h.paneRendererClass,i)),this._model.selection().isSelected(this._study)&&this._isMarkersEnabled&&null!==this._selectionData&&(this._selectionData.vertOffset=l,d.append(new j.SelectionRenderer(this._selectionData))),this._renderer=d}_createRenderer(e,t){const i=me.get(e);return new((0,n.ensureDefined)(i))(t)}_getSeriesVal(e,t){const i=(0,K.barFunction)(e),s=this._series.data().valueAt(t);return null===s?null:i(s)}_getTranspValue(){let e=0;const t=this._study.properties().childs();t.transparency&&(e=t.transparency.value(),e=(0,k.isNumber)(e)?e:50);const i=t.styles.childs()[this._plotName].childs();return i.transparency&&(e=i.transparency.value(),e=(0,k.isNumber)(e)?e:50),(0,q.clamp)(e,0,100)}_createItem(e,t,i,s){const r=this._study.properties().childs().styles.childs()[this._plotName].childs().location.value();if((null===t||0===t)&&r!==v.MarkLocation.Absolute)return null;let o;switch(r){case v.MarkLocation.AboveBar:const a=this._getSeriesVal(i,e);if(null===a)return null;o=a;break;case v.MarkLocation.BelowBar:const l=this._getSeriesVal(s,e);if(null===l)return null;o=l;break;case v.MarkLocation.Top:o=this._topCoord;break;case v.MarkLocation.Bottom:o=this._bottomCoord;break;case v.MarkLocation.Absolute:o=(0,n.ensureNotNull)(t);break;default:throw new Error("Bad value: "+r)}return new V.Point(e,o)}_convertItemsToCoordinates(){const e=this._model.timeScale(),t=this._study.priceScale() +;e.timedValuesToCoordinates(this._items);const i=(0,n.ensureNotNull)(this._study.firstValue());(0,n.ensureNotNull)(t).pointsArrayToCoordinates(this._items,i)}_calculateVerticalOffset(e,t){let i=0;switch(e){case v.MarkLocation.AboveBar:case v.MarkLocation.Bottom:i=-t;break;case v.MarkLocation.BelowBar:case v.MarkLocation.Top:i=t}return(0,n.ensureNotNull)(this._study.priceScale()).isInverted()&&(i*=-1),i}_calculateShapeHeight(e,t){let i=e;switch(t){case b.PlotSymbolSize.Tiny:i=.3*e;break;case b.PlotSymbolSize.Small:i=.6*e;break;case b.PlotSymbolSize.Normal:i=e;break;case b.PlotSymbolSize.Large:i=1.5*e;break;case b.PlotSymbolSize.Huge:i=2*e}return i}}class fe extends ge{_updateRenderer(e){const t=e.childs();this._updateImpl();const i=this._model.timeScale(),s={},r=this._getTranspValue(),n=i.barSpacing();let o;if(t.size){const e=t.size.value();o=this._calculateShapeHeight(25,e)}else o=Math.round(n/2);o=Math.max(o,1);const a=t.location.value(),l=(0,R.generateColor)(t.color.value(),r),c=r>19?r-10:0,h=this._calculateVerticalOffset(a,Math.round(1.5*o));s.barSpacing=n,s.items=this.items(),s.color=l,s.borderColor=(0,R.generateColor)(t.color.value(),c),s.height=o,s.vertOffset=h;const d=t.plottype.value(),u=G.plotShapesData[d],p=new N.CompositeRenderer,_=t.text?t.text.value():void 0;if(void 0!==_&&""!==_.trim()){let e=_.trim().replace(/\\n/gm,"\n");e=(0,U.cleanButAmpersand)(e,!0),s.text=e,s.fontSize=12;const i=t.textColor?t.textColor.value():void 0;s.textColor=i?(0,R.generateColor)(i,r):l}p.append(super._createRenderer(u.paneRendererClass,s)),this._model.selection().isSelected(this._study)&&this._isMarkersEnabled&&null!==this._selectionData&&(this._selectionData.vertOffset=h,p.append(new j.SelectionRenderer(this._selectionData))),this._renderer=p}}var ve=i(87795),Se=i.n(ve),ye=i(55014);class be extends oe{constructor(e,t){super(null,t),this._fontSizeEnsured=0,this._ch="",this._fontFamily=ne.CHART_FONT_FAMILY,this._charCache=null,null!==e&&this.setData(e)}setData(e){super.setData(e),this._fontSizeEnsured=(0,n.ensureDefined)(this._height);const t=e.char.slice(0,40);this._ch=Se()(t)[0]||" ",this._fontFamily=e.fontFamily||ne.CHART_FONT_FAMILY}hitTest(e){const t=(0,ye.interactionTolerance)().series+this._fontSizeEnsured/2;for(const i of this._items){if(new V.Point(i.x,i.y+i.vertOffset).subtract(e).length()<=t)return new $.HitTestResult($.HitTestResult.REGULAR)}return null}_drawItemShape(e,t,i){const s=i.x,r=i.vertOffset>0?1:-1,n=i.y+i.vertOffset-r*Math.round(this._fontSizeEnsured/2);let o;o=i.style&&void 0!==i.style.color?i.style.color:this._color;const a=this._textImageCache(),l=t.pixelRatio;if(this._fontSizeEnsured<=4/l){e.save();const t=Math.max(1,Math.floor(l));let r=Math.max(1,Math.floor(a.textImageWidth*l));r%2!=t%2&&(r+=r>1?-1:1);const c=Math.round(n*l)+(i.vertOffset>=0?0:-r);return e.fillStyle=o,e.fillRect(Math.round(s*l)+(l%2?.5:0)-r/2,c,r,r),void e.restore()}const c={style:{fillStyle:o},location:{x:s,y:n,horzAlign:H.Center,vertAlign:i.vertOffset>0?z.Top:z.Bottom}};a.paintTo(e,t,c)}_startPath(e,t,i,s){}_endPath(e){} +_textImageCache(){return null!==this._charCache&&this._charCache.fontFamily===this._fontFamily&&this._charCache.fontSize===this._fontSizeEnsured||(this._charCache={fontSize:this._fontSizeEnsured,fontFamily:this._fontFamily,cache:new se(this._ch,!1,!1,this._fontFamily,this._fontSizeEnsured,"center",0)}),this._charCache.cache}}class we extends ge{constructor(){super(...arguments),this._compositeRenderer=new N.CompositeRenderer,this._charRenderer=new be(null)}renderer(){return this._isPlotVisible()&&this._scalesReady()?(this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._compositeRenderer):null}_updateImpl(){if(this._compositeRenderer.clear(),super._updateImpl(),0===this._items.length)return;const e=this._getTranspValue(),t=this._model.timeScale().barSpacing();let i;const s=this._study.properties().childs().styles.childs()[this._plotName].childs();if(s.size){const e=s.size.value();i=this._calculateShapeHeight(50,e)}else i=Math.round(t);const r=s.location.value(),n=(0,R.generateColor)(s.color.value(),e),o=this._calculateVerticalOffset(r,i),a={items:this.items(),barSpacing:t,char:s.char.value(),height:i,vertOffset:o,color:n},l=s.text?s.text.value():void 0;if(void 0!==l&&""!==l.trim()){let t=l.trim().replace(/\\n/gm,"\n");t=(0,U.cleanButAmpersand)(t,!0),a.text=t,a.fontSize=12;const i=s.textColor?s.textColor.value():void 0;a.textColor=i?(0,R.generateColor)(i,e):n}this._charRenderer.setData(a),this._compositeRenderer.append(this._charRenderer),this._model.selection().isSelected(this._study)&&this._isMarkersEnabled&&null!==this._selectionData&&(this._selectionData.vertOffset=o,this._compositeRenderer.append(new j.SelectionRenderer(this._selectionData)))}}var Pe=i(24377);class Ce extends V.Point{constructor(e,t,i,s){super(e,t),this.height=i,this.isUp=s,this.style={}}}function Te(e){return Math.round(e/4)}function xe(e){return Math.round(e/2)}class Ie{constructor(e){this._data=e}draw(e,t){var i;const s=t.pixelRatio,r=this._data,n=xe(r.barSpacing),o=Te(r.barSpacing),a=n<4,l=Math.max(n/2,1),c=(0,q.ceiledEven)(n*s),h=c/2,d=Math.round(n*s);e.lineCap="butt",e.lineWidth=Math.max(1,Math.floor(s));const u=e.lineWidth%2?.5:0;for(const t of r.items){const n=t.isUp?-1:1,p=Math.round(Math.abs(t.height)*s),_=Math.round(t.x*s)+u,m=Math.round((t.y-n*o)*s)+u;e.beginPath(),e.translate(_,m);const g=null!==(i=t.style&&t.style.color)&&void 0!==i?i:t.isUp?r.colorup:r.colordown;a?(e.moveTo(0,0),e.lineTo(-h,-h*n),e.moveTo(0,0),e.lineTo(h,-h*n),e.moveTo(0,0),e.lineTo(0,-p*n),e.moveTo(-h,-p*n),e.lineTo(h,-p*n),e.lineWidth=l,e.strokeStyle=g,e.stroke()):(e.moveTo(0,0),pthis._maxAbsValue&&(this._maxAbsValue=Math.abs(t));const r=t>0;let n;if(r){const t=this._getSeriesVal(s,e);if(null===t)return null;n=t}else{const t=this._getSeriesVal(i,e);if(null===t)return null;n=t}return new Ce(e,n,t,r)}_convertItemsToCoordinates(){const e=this._model.timeScale(),t=(0,n.ensureNotNull)(this._study.priceScale());e.timedValuesToCoordinates(this._items),t.pointsArrayToCoordinates(this._items,(0,n.ensureNotNull)(this._study.firstValue()));const i=this._study.properties().childs().styles.childs();let s=Math.abs(i[this._plotName].childs().minHeight.value()),r=Math.abs(i[this._plotName].childs().maxHeight.value());if(s>r){const e=s;s=r,r=e}const o=(r-s)/this._maxAbsValue,a=this._items;for(let e=0;es)return;i=Math.max(r,i);const o=this._study.data(),a=this._study.firstValue();if(null===a)return;const l=o.rangeIterator(i,s),c=(0,n.ensureDefined)(this._study.properties().childs().ohlcPlots).childs()[this._plotName].childs(),h=new Map,d=(e,t)=>{const i=e+"@"+t;if(!h.has(i)){const s=(0,R.generateColor)(e,t);return h.set(i,s),s}return h.get(i)},u=(0,X.createEmptyStyle)();for(;l.hasNext();){const e=l.next();let t=e.index;const i=e.value;t=Math.floor(t);let s=!0;const r=new Map;for(let e=1;e<=4;++e){const t=this._ohlcPlotIndexes.get(e);if(void 0===t){s=!1;break}const n=i[t+1];if(null==n){s=!1;break}r.set(e,n)}if(!s)continue;const o=(0,n.ensureDefined)(r.get(1)),a=(0,n.ensureDefined)(r.get(4)),h=(0,n.ensureDefined)(r.get(2)),p=(0,n.ensureDefined)(r.get(3)),_=Math.max(o,h,p,a),m=Math.min(o,h,p,a);let g=(0,n.ensureDefined)(d(c.color.value(),0));const f=this._colorProvider.getPlotPointStyle(i,u);void 0!==f.colors[0]&&(g=(0,n.ensureDefined)(f.colors[0]));const v={time:Math.round(t),open:o,high:_,low:m,close:a,color:g,wickColor:f.colors[4],borderColor:f.colors[3],hollow:null};this._bars.push(v)}if(e.barPricesToCoordinates(this._bars,a),this._model.timeScale().barIndexesToCoordinates(this._bars),this._model.selection().isSelected(this._study)){const t=this._selectionIndexer.indexes();this._selectionData={points:[],hittestResult:$.HitTestResult.REGULAR,bgColors:[],visible:!0,barSpacing:this._model.timeScale().barSpacing()};const i=(0,n.ensureNotNull)(this._model.paneForSource(this._study)).height(),s=(0,n.ensureDefined)(this._ohlcPlotIndexes.get(4));for(let r=0;rthis._actualLength?this._items[this._actualLength]:null;return null!==e&&Boolean(e.invalidateCache)&&e.invalidateCache(),e}invalidateCache(){this._invalidations+=1,3e3===this._invalidations&&(this._items.splice(this._actualLength),this._invalidations=0),this._actualLength=0}at(e){return this._items[e]}data(){return this._items}length(){return this._actualLength}}class He extends We{constructor(e){super(),this.color=e}}class ze{constructor(){this._map=new Map,this._usedKeys=new Set,this._invalidations=0}invalidateCache(){this._invalidations+=1,50===this._invalidations&&(this._deleteUnused(),this._invalidations=0),this._usedKeys.clear(),this._map.forEach(((e,t)=>e.invalidateCache()))}get(e){ const t=this._map.get(e);return void 0!==t&&this._usedKeys.add(e),t}set(e,t){this._usedKeys.add(e),this._map.set(e,t)}forEach(e){this._map.forEach(((t,i)=>{this._usedKeys.has(i)&&e(t,i)}))}delete(e){const t=this._map.get(e);void 0!==t&&t.invalidateCache(),this._usedKeys.delete(e)}_deleteUnused(){const e=[];this._map.forEach(((t,i)=>{this._usedKeys.has(i)||e.push(i)}));for(const t of e)this._map.delete(t)}}class Ue extends We{constructor(){super(),this.points1=new We,this.points2=new We,this.push(this.points1),this.push(this.points2)}addPoints1Point(e,t){let i=this.points1.newItem();null!==i?(i.x=e,i.y=t):i={x:e,y:t},this.points1.push(i)}addPoints2Point(e,t){let i=this.points2.newItem();null!==i?(i.x=e,i.y=t):i={x:e,y:t},this.points2.push(i)}invalidateCache(){this.points1.invalidateCache(),this.points2.invalidateCache()}}class je{constructor(){this._data=null}setData(e){this._data=e}hitTest(e,t){return null}draw(e,t){if(null===this._data)return;const i=t.pixelRatio,s=.25*this._data.barSpacing;this._data.colorAreas.forEach((t=>{var r,n;e.beginPath();for(let r=0;r=0;t--)e.lineTo(Math.round(n.points2.at(t).x*i),n.points2.at(t).y*i)}else{const t=n.points2.at(0).x,r=n.points2.at(0).y;e.lineTo(Math.round((o+s)*i),a*i),e.lineTo(Math.round((t+s)*i),r*i),e.lineTo(Math.round((t-s)*i),r*i),e.lineTo(Math.round((o-s)*i),a*i)}}if(e.closePath(),0===t.color.type)e.fillStyle=t.color.color;else{const s=e.createLinearGradient(0,t.color.value1*i,0,t.color.value2*i);s.addColorStop(0,null!==(r=t.color.color1)&&void 0!==r?r:"transparent"),s.addColorStop(1,null!==(n=t.color.color2)&&void 0!==n?n:"transparent"),e.fillStyle=s}e.fill()}))}}function Ge(e){return 0===e.type?`${e.color}`:`${e.color1}:${e.color2}:${e.value1}:${e.value2}`}class qe extends We{constructor(){super(...arguments),this._startIndex=0}setStartIndex(e){this._startIndex=e}isValidIndex(e){return e>=this._startIndex}at(e){const t=e-this._startIndex;for(;t>=this._actualLength;)this._items.length<=t?this._items.push(this._newObject()):this._clearObject(this._items[this._actualLength]),this._actualLength+=1;return this._items[t]}}class $e extends qe{_newObject(){return{plot1Value:void 0,plot2Value:void 0,colorValue:void 0}}_clearObject(e){e.plot1Value=void 0,e.plot2Value=void 0,e.colorValue=void 0}}class Ye extends qe{_newObject(){return{type:void 0,colorIndexOrRgba:void 0,colorIndexOrRgba1:void 0,colorIndexOrRgba2:void 0,value1:void 0,value2:void 0}}_clearObject(e){const t=e;t.type=void 0,t.colorIndexOrRgba=void 0,t.colorIndexOrRgba1=void 0,t.colorIndexOrRgba2=void 0,t.value1=void 0,t.value2=void 0}}class Ke{constructor(e,t,i=!1){this._isHlineFill=!1,this._bandAKey=null,this._bandBKey=null,this._colorPlotIndex=null,this._colors=new We, -this._areaRenderer=new je,this._invalidated=!0,this._plIndex1=null,this._plIndex2=null,this._level1=0,this._level2=0,this._studyValuesCache=new $e,this._colorValuesCache=new Ye,this._points1=new We,this._points2=new We,this._timePoints=new We,this._colorAreas=new ze,this._source=e,this._model=t,this._fillGaps=i}update(){this._invalidated=!0}renderer(e,t){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._areaRenderer}_correctVisibleRange(e,t){var i,s,r,n;const o=this._source.data().plottableRange(),a=e.firstBar()+Math.min(0,t)-1,l=e.lastBar()-t+1,c=this._plotIndex1(),h=this._plotIndex2(),d=o.search(a,f.PlotRowSearchMode.NearestLeft,c),u=o.search(a,f.PlotRowSearchMode.NearestLeft,h),p=o.search(l,f.PlotRowSearchMode.NearestRight,c),_=o.search(l,f.PlotRowSearchMode.NearestRight,h),m=Math.min(null!==(i=null==d?void 0:d.index)&&void 0!==i?i:1/0,e.firstBar()-1),g=Math.min(null!==(s=null==u?void 0:u.index)&&void 0!==s?s:1/0,e.firstBar()-1),v=Math.max(null!==(r=null==p?void 0:p.index)&&void 0!==r?r:-1/0,e.lastBar()+1),S=Math.max(null!==(n=null==_?void 0:_.index)&&void 0!==n?n:-1/0,e.lastBar()+1);let y=1/0;if(null!==this._colorPlotIndex&&(null!==d||null!==u)){const e=o.search(Math.min(m,g)-1,f.PlotRowSearchMode.NearestLeft);null!==e&&(y=e.index)}return[Math.min(m,g,y),Math.max(v,S)]}_plotNames(){return this._source.metaInfo().plots.map((e=>e.id))}_plotIndex1(){return null===this._plIndex1&&(this._plIndex1=this._plotNames().indexOf(this._plotAId())+1),this._plIndex1}_plotIndex2(){return null===this._plIndex2&&(this._plIndex2=this._plotNames().indexOf(this._plotBId())+1),this._plIndex2}_updateImpl(){var e,t;if(this._areaRenderer.setData(null),!this._visible())return;const i=this._source.priceScale(),s=this._model,r=s.timeScale();if(!i||i.isEmpty()||r.isEmpty())return;if(s.mainSeries().bars().isEmpty())return;const o=this._source.firstValue();if(null===o)return;if(this._isHlineFill){const e=this._source.properties().bands[(0,n.ensureNotNull)(this._bandAKey)],t=this._source.properties().bands[(0,n.ensureNotNull)(this._bandBKey)];this._level1=i.priceToCoordinate(e.value.value(),o),this._level2=i.priceToCoordinate(t.value.value(),o)}const a=r.visibleBarsStrictRange();if(null===a)return;const l=new Map,c=e=>{let t=l.get(e);return void 0===t&&(t=i.priceToCoordinate(e,o),l.set(e,t)),t},h=(0,q.clamp)(this._transparency(),0,100),d=new Map,u=e=>{let t=d.get(e);return void 0===t&&(t=(0,R.generateColor)(e,h),d.set(e,t)),t};this._timePoints.invalidateCache(),this._points1.invalidateCache(),this._points2.invalidateCache(),this._colors.invalidateCache(),this._colorAreas.invalidateCache();const p=this._source.offset(this._plotAId()),_=this._source.offset(this._plotBId()),m=Math.min(p,_),g=Math.max(p,_),[f,v]=this._correctVisibleRange(a,g),S=null!==this._colorPlotIndex?this._colors:null,y=this._plotIndex1(),b=this._plotIndex2(),w=this._source.data().plottableRange();if(w.isEmpty())return;let C,P;const T=(0,n.ensureNotNull)(w.firstIndex()),x=(0, -n.ensureNotNull)(w.lastIndex()),I=T-Math.max(0,-m),M=x+Math.max(0,g),A=Math.max(f,I),L=Math.min(v,M),k=this._studyValuesCache,E=this._colorValuesCache;k.invalidateCache(),E.invalidateCache();const D=A-g,V=w.rangeIterator(D,L-m);let B;for(k.setStartIndex(D),E.setStartIndex(D);V.hasNext();){const e=V.next(),t=e.index,i=e.value,s=i[y],r=i[b],o=t+p,a=t+_;if(o===a&&k.isValidIndex(o)){const e=k.at(o);e.plot1Value=s,e.plot2Value=r}else{if(k.isValidIndex(o)){k.at(o).plot1Value=s}if(k.isValidIndex(a)){k.at(a).plot2Value=r}}if(null!==S&&void 0!==B){const e=B+m;if(k.isValidIndex(e)){const t=k.at(e),s=(0,n.ensureNotNull)(this._colorPlotIndex);if(0===s.type){const r=E.at(e);t.colorValue=r,r.type=0,r.colorIndexOrRgba=i[s.colorIndexOrRgba+1]}else{const r=E.at(e);t.colorValue=r,r.colorIndexOrRgba1=void 0===s.colorIndexOrRgba1?void 0:i[s.colorIndexOrRgba1+1],r.colorIndexOrRgba2=void 0===s.colorIndexOrRgba2?void 0:i[s.colorIndexOrRgba2+1],r.value1=void 0===s.valueIndex1?void 0:i[s.valueIndex1+1],r.value2=void 0===s.valueIndex2?void 0:i[s.valueIndex2+1]}}}B=t}const N=this._timePoints,O=this._points1,F=this._points2;let W=null;const H=D+k.length();for(let i=D;ie.id))}_plotIndex1(){return null===this._plIndex1&&(this._plIndex1=this._plotNames().indexOf(this._plotAId())+1),this._plIndex1}_plotIndex2(){return null===this._plIndex2&&(this._plIndex2=this._plotNames().indexOf(this._plotBId())+1),this._plIndex2}_updateImpl(){var e,t;if(this._areaRenderer.setData(null),!this._visible())return;const i=this._source.priceScale(),s=this._model,r=s.timeScale();if(!i||i.isEmpty()||r.isEmpty())return;if(s.mainSeries().bars().isEmpty())return;const o=this._source.firstValue();if(null===o)return;if(this._isHlineFill){const e=this._source.properties().bands[(0,n.ensureNotNull)(this._bandAKey)],t=this._source.properties().bands[(0,n.ensureNotNull)(this._bandBKey)];this._level1=i.priceToCoordinate(e.value.value(),o),this._level2=i.priceToCoordinate(t.value.value(),o)}const a=r.visibleBarsStrictRange();if(null===a)return;const l=new Map,c=e=>{let t=l.get(e);return void 0===t&&(t=i.priceToCoordinate(e,o),l.set(e,t)),t},h=(0,q.clamp)(this._transparency(),0,100),d=new Map,u=e=>{let t=d.get(e);return void 0===t&&(t=(0,R.generateColor)(e,h),d.set(e,t)),t};this._timePoints.invalidateCache(),this._points1.invalidateCache(),this._points2.invalidateCache(),this._colors.invalidateCache(),this._colorAreas.invalidateCache();const p=this._source.offset(this._plotAId()),_=this._source.offset(this._plotBId()),m=Math.min(p,_),g=Math.max(p,_),[f,v]=this._correctVisibleRange(a,g),S=null!==this._colorPlotIndex?this._colors:null,y=this._plotIndex1(),b=this._plotIndex2(),w=this._source.data().plottableRange();if(w.isEmpty())return;let P,C;const T=(0,n.ensureNotNull)(w.firstIndex()),x=(0, +n.ensureNotNull)(w.lastIndex()),I=T-Math.max(0,-m),M=x+Math.max(0,g),A=Math.max(f,I),L=Math.min(v,M),k=this._studyValuesCache,E=this._colorValuesCache;k.invalidateCache(),E.invalidateCache();const D=A-g,B=w.rangeIterator(D,L-m);let V;for(k.setStartIndex(D),E.setStartIndex(D);B.hasNext();){const e=B.next(),t=e.index,i=e.value,s=i[y],r=i[b],o=t+p,a=t+_;if(o===a&&k.isValidIndex(o)){const e=k.at(o);e.plot1Value=s,e.plot2Value=r}else{if(k.isValidIndex(o)){k.at(o).plot1Value=s}if(k.isValidIndex(a)){k.at(a).plot2Value=r}}if(null!==S&&void 0!==V){const e=V+m;if(k.isValidIndex(e)){const t=k.at(e),s=(0,n.ensureNotNull)(this._colorPlotIndex);if(0===s.type){const r=E.at(e);t.colorValue=r,r.type=0,r.colorIndexOrRgba=i[s.colorIndexOrRgba+1]}else{const r=E.at(e);t.colorValue=r,r.colorIndexOrRgba1=void 0===s.colorIndexOrRgba1?void 0:i[s.colorIndexOrRgba1+1],r.colorIndexOrRgba2=void 0===s.colorIndexOrRgba2?void 0:i[s.colorIndexOrRgba2+1],r.value1=void 0===s.valueIndex1?void 0:i[s.valueIndex1+1],r.value2=void 0===s.valueIndex2?void 0:i[s.valueIndex2+1]}}}V=t}const N=this._timePoints,O=this._points1,F=this._points2;let W=null;const H=D+k.length();for(let i=D;i{var e;return this._colorPlotIndex=null!==(e=this._colorPlotIndex)&&void 0!==e?e:{type:1}};for(let t=0;t{null===this._bandAKey&&i.id===e&&(this._bandAKey=s),null===this._bandBKey&&i.id===t&&(this._bandBKey=s)}))}}var ot=i(86635),at=i(10621),lt=i(36646),ct=i(97425),ht=i(40549),dt=i.n(ht),ut=i(1930),pt=i(35624),_t=i(67876);class mt extends _t.PriceAxisView{constructor(e,t){super(),this._model=e.model(),this._source=e,this._data=t}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const s=this._source.model(),r=this._source.priceScale();if(null===r)return;if(!s.isPriceScaleVisible(r))return;const o=this._source.lastValueData(this._data.plotIndex,!1);if(o.noData)return;const a=s.timeScale().visibleBarsStrictRange(),l=s.mainSeries().bars().lastIndex();if(null!==a&&null!==l){if(l<=a.lastBar()){i.background=(0,R.resetTransparency)(o.color);let s=o.color;"transparent"===s&&(s=this._model.properties().childs().scalesProperties.childs().backgroundColor.value()),i.textColor=this.generateTextColor(s),i.borderColor=void 0,e.borderVisible=!1,t.borderVisible=!1}else{const r=s.backgroundColorAtYPercentFromTop(o.coordinate/(0,n.ensureNotNull)(s.paneForSource(this._source)).height());i.background=r,i.textColor=(0,R.resetTransparency)(o.color),i.borderColor=(0,R.resetTransparency)(i.textColor),e.borderVisible=!0,t.borderVisible=!0}i.coordinate=o.coordinate,i.floatCoordinate=o.floatCoordinate,this._showAxisLabel()&&(e.text=o.text,e.visible=!0),this._updatePaneRendererData(t)}}_showPaneLabel(){return!!this._model.properties().childs().scalesProperties.childs().showStudyPlotLabels.value()&&this._source.properties().childs().showLabelsOnPriceScale.value()&&this._source.isPlotVisibleAt(this._data.plotIndex,4)}_showAxisLabel(){return!!this._model.properties().childs().scalesProperties.childs().showStudyLastValue.value()&&this._source.properties().childs().showLabelsOnPriceScale.value()&&this._source.isPlotVisibleAt(this._data.plotIndex,4)}_updatePaneRendererData(e){e.text="",this._showPaneLabel()&&(e.text=this._source.priceLabelText(this._data.plotIndex),e.visible=!0)}}var gt=i(45703),ft=i(2250),vt=i(76422),St=i(64548),yt=i(7006),bt=i(7711),wt=i(93618),Ct=i(81685),Pt=i(77513),Tt=i(74599),xt=i(48566),It=i(18766),Mt=i(69145);const At=(0, -a.getLogger)("Chart.Study"),Lt=o.t(null,void 0,i(14177));const kt={symbolsForDisplay:!1,symbolsForChartApi:!0,skipHiddenInputs:!1,skipFakeInputs:!1,skipBooleanInputs:V.enabled("dont_show_boolean_study_arguments"),asObject:!0,skippedGroups:[],skippedInputs:[],noExchanges:!1,noResolution:!1,keepOptionalSymbolsEmpty:!1,skipColorInputs:!1,skipTimeInputs:!1,skipOptionalEmptySymbolInputs:!1,skipTextareaInputs:!0,priceInputsForDisplay:!1},Et=V.enabled("study_symbol_ticker_description"),Dt=V.enabled("hide_main_series_symbol_from_indicator_legend");function Vt(e,t){const i=e.plots[t];if(!i||!(0,b.isOhlcPlot)(i))return!1;const s=i.target,r=e.defaults.styles&&e.defaults.styles[s],n=e.defaults.ohlcPlots&&e.defaults.ohlcPlots[s],o=e.ohlcPlots&&e.ohlcPlots[s];return r&&(0,b.isOhlcPlotStyleBars)(r)||n&&(0,b.isOhlcPlotStyleBars)(n)||!!o&&(0,b.isOhlcPlotStyleBars)(o)}function Bt(e,t){const i=e.plots[t];if(!i||!(0,b.isOhlcPlot)(i))return!1;const s=i.target,r=e.defaults.styles&&e.defaults.styles[s],n=e.defaults.ohlcPlots&&e.defaults.ohlcPlots[s],o=e.ohlcPlots&&e.ohlcPlots[s];return r&&(0,b.isOhlcPlotStyleCandles)(r)||n&&(0,b.isOhlcPlotStyleCandles)(n)||!!o&&(0,b.isOhlcPlotStyleCandles)(o)}function Rt(e,t){(0,n.assert)(void 0!==e,"zOrder must be defined"),(0,n.assert)(!t.has(e),"zOrder must be unique")}function Nt(e,t){return e.plots.some((e=>((0,b.isColorerPlot)(e)||(0,b.isDataPlot)(e))&&e.target===t))}function Ot(e,t){var i;if(t.plots)for(let s=0;s= 1");let a=(0,k.clone)((0,St.defaults)("study"));Ot(a,e);const l=m.StudyMetaInfo.getStudyPropertyRootName(e);let c=(0,k.clone)((0,St.defaults)(l,s));c.intervalsVisibilities=(0,k.clone)(yt.intervalsVisibilitiesDefaults),"Overlay"!==e.shortId&&"Compare"!==e.shortId||(c.currencyId=null,c.unitId=null),e.isTVScript&&e.TVScriptSourceCode!==c.TVScriptSourceCode&&(c=(0,k.clone)((0,St.factoryDefaults)(l))),(0,k.merge)(a,c),t&&((0,n.assert)(!(t instanceof L()),"propsState should not be an instance of Property"),(0,k.merge)(a,t));const h=(0,k.clone)(e),d={};Ct.StudyVersioning.mergeInputsObjPart(d,null!==(r=h.defaults.inputs)&&void 0!==r?r:{}),Ct.StudyVersioning.mergeInputsObjPart(d,a.inputs),a.inputs=d,delete h.inputs,delete h.defaults.inputs;const u={};if((0,k.merge)(u,h.defaults),(0,k.merge)(u,(0,St.factoryDefaults)(l)),(0,k.merge)(u,a),(0,k.merge)(u,h),delete u.defaults,a=u,null!==i){const t=i.model().studiesColorRotatorFactory().getColorRotator(e) -;null!==t&&("Overlay@tv-basicstudies"===e.id?a.lineStyle.color=t.getColor(a.lineStyle.color):(0,k.merge)(a,function(e,t){for(const i of Object.keys(e.styles)){const s=e.styles[i];if(s&&"color"in s){const e=s.color;s.color=t.getColor(e)}}return e}(a,t)))}return t&&(0,k.merge)(a.styles,null!==(o=t.styles)&&void 0!==o?o:{}),a}function Wt(e,t,i,s,r){return function(e,t,i,s,r,n){const o=Ft(e,t,i,s);return m.StudyMetaInfo.getSourceInputIds(e).forEach(((e,t)=>{const i=o.inputs[e];t=1){const e={};Ct.StudyVersioning.mergeInputsObjPart(e,null!==(n=a.defaults.inputs)&&void 0!==n?n:{}),Ct.StudyVersioning.mergeInputsObjPart(e,o.inputs),o.inputs=e,delete a.inputs,a.defaults&&delete a.defaults.inputs;const t={};(0,k.merge)(t,a.defaults),(0,k.merge)(t,(0,St.factoryDefaults)(m.StudyMetaInfo.getStudyPropertyRootName(a))),(0,k.merge)(t,o),delete a.defaults,(0,k.merge)(t,a),o=t}return o}(e,t,i,s,n);return Ht(t||e,r,o)}function Ut(e,t,i,s,r){return zt(e,t,i,s,m.StudyMetaInfo.getStudyPropertyRootName(e),r)}function jt(e,t,i){let s=0,r=0;return e.inputs.filter((e=>"source"===e.type)).forEach((e=>{(0,D.getInputValue)(i[e.id]).includes("$")&&s++,(0,D.getInputValue)(t[e.id]).includes("$")&&r++})),Math.sign(r)-Math.sign(s)}class Gt extends u.PriceDataSource{constructor(e,t,i,s){var r,o,a;super(e),this._onStart=new(h()),this._onHibernationStateChange=new(h()),this._symbolsResolved=new(h()),this._statusChanged=new(h()),this._restarting=!1,this._paneViews=[],this._legendView=null,this._priceAxisViews=[],this._inputsAnchorsPaneView=null,this._inputsLinesPaneView=null,this._inputsTimeAxisPaneViews=[],this._inputsPriceAxisPaneViews=[],this._resolvedSymbols={},this._resolvedSymbolsByInput={},this._sources=[],this._status={ -type:ot.StudyStatusType.Undefined},this._wasCompletedBefore=!1,this._studyId=null,this._isSubscribedToSessionId=!1,this._titleStrCache={},this._titleInPartsCache={},this._children=[],this._numericFormatter=new E.NumericFormatter,this._priceAxisViewsBase=[],this._priceLinesAxisViews=[],this._graphicsPriceAxisViews=[],this._labelPaneViews=[],this._ownFirstValue=null,this._plotOffsets={},this._formatter=null,this._ongoingDataUpdate=Promise.resolve(),this._studyModified=!1,this._isDestroyed=!1,this._graphics=new g.LiveStudyGraphics,this._dataUpdated=new(h()),this._tagsChanged=new(h()),this._studyName="",this._turnaround="st0",this._currencySourceSymbolInputProperty=null,this._pendingResolveSymbols=new Map,this._onIsActualIntervalChange=new(h()),this._childStudyByRebind=new(h()),this._lastNonEmptyPlotRowCache={},this._startMovingPoint=null,this._processHibernateBound=this.processHibernate.bind(this,1),this._maxOffset=new(dt())(0),this._currencySourceSymbolInfo=null,this._turnaroundCounter=0,this._deferredPinePatchProps=!1,this._chartApi=e.chartApi(),this._properties=t,this._metaInfo=s,this._series=this._model.mainSeries(),this._series.onIntervalChanged().subscribe(this,this._calcIsActualInterval),this._showStudyArgumentsProperty=e.properties().childs().paneProperties.childs().legendProperties.childs().showStudyArguments,e.collapsed().subscribe(this._processHibernateBound),this._sources=i,m.StudyMetaInfo.setChildStudyMetaInfoPropertiesSourceId(s,null===(r=this._sources[0])||void 0===r?void 0:r.id(),t),i.forEach((e=>{e.setChild(this)})),[this._series,...i].forEach((e=>{e.currencyChanged().subscribe(this,this._onSourceCurrencyChanged),e.unitChanged().subscribe(this,this._onSourceUnitChanged),e.priceRangeReadyChanged().subscribe(this,this._onSourcePriceRangeReadyChanged),e.formatterChanged().subscribe(this,this._onSourceFormatterChanged),e.priceStepChanged().subscribe(this,this._onSourcePriceStepChanged)})),Et&&this._model.mainSeries().properties().childs().statusViewStyle.childs().symbolTextSource.listeners().subscribe(this,(()=>{this.invalidateTitleCache(!0)}));const l=this._properties.childs();for(const e of m.StudyMetaInfo.getSourceInputIds(s))null===(o=l.inputs.childs()[e])||void 0===o||o.subscribe(this,this._onSourceInputChanged);this._properties.subscribe(this,this._onPropertiesChanged),l.visible.subscribe(this,this._visibleChanged),l.visible.subscribe(this,(()=>this.processHibernate())),l.intervalsVisibilities.subscribe(this,this._calcIsActualInterval),l.inputs.listeners().subscribe(this,this._updateMaxOffsetValue),void 0!==l.offsets&&l.offsets.listeners().subscribe(this,this._updateMaxOffsetValue),void 0!==l.offset&&l.offset.listeners().subscribe(this,this._updateMaxOffsetValue),this._initializeCurrencySource(),C.hideAllIndicators().subscribe(this,this._visibleChanged);for(let e=0;ethis.processHibernate()))} -for(const e of Object.keys(this._metaInfo.graphics))for(const t of Object.keys(this._metaInfo.graphics[e])){const i=null===(a=l.graphics.childs()[e])||void 0===a?void 0:a.childs()[t];i&&i.childs().visible&&(0,n.ensureDefined)(i.childs().visible).subscribe(this,(()=>this.processHibernate()))}this._isActualInterval=(0,at.isActualInterval)(this._series.intervalObj(),this._properties.childs().intervalsVisibilities),this._initializeStudyInputsPaneViews(),this._handler=e=>this.onData(e),this._handler.isTVScriptStrategy=this._metaInfo.isTVScriptStrategy,this._valuesProvider=new Pt.StudyValuesProvider(this,e)}destroy(){var e;this.parentSources().forEach((e=>{e.currencyChanged().unsubscribeAll(this),e.unitChanged().unsubscribeAll(this),e.priceRangeReadyChanged().unsubscribeAll(this),e.formatterChanged().unsubscribeAll(this),e.priceStepChanged().unsubscribeAll(this)})),this._series.properties().childs().statusViewStyle.childs().symbolTextSource.unsubscribeAll(this),this._series.onIntervalChanged().unsubscribeAll(this),this.formatterChanged().unsubscribe(this,this.invalidateTitleCache),C.hideAllIndicators().unsubscribe(this,this._visibleChanged),this._model.collapsed().unsubscribe(this._processHibernateBound),null!==this._currencySourceSymbolInputProperty&&this._currencySourceSymbolInputProperty.unsubscribeAll(this),null===(e=this._legendView)||void 0===e||e.destroy()}properties(){return this._properties}isDraggable(){return!this._metaInfo.linkedToSeries}lastValueData(e,t,i){const s={noData:!0},r=this.priceScale();if(this._model.timeScale().isEmpty()||null===r||r.isEmpty()||this.data().isEmpty())return s;const n=this._model.timeScale().visibleBarsStrictRange(),o=this.firstValue(!0);if(null===n||null===o)return s;if(!this._properties.childs().visible.value())return s;const a=this._properties.childs().styles,l=this._properties.childs().ohlcPlots;let c,h;if(a&&a.childs()[e]&&(c=a.childs()[e]),l&&l.childs()[e]&&(c=l.childs()[e]),!c||0===c.childs().display.value())return s;const d=this.metaInfo().plots;for(h=0;he.id()));if(h.length&&(c.parentSources=h),e){let e=this.data();const t=this._model.timeScale(),i=this._seriesDataRangeToSave(e);null!==i&&(e=e.range(i.firstBar(),i.lastBar())),c.data=e.state(),c.data.symbols=this._resolvedSymbols,c.data.graphics=(0,g.saveStudyGraphics)(this.graphics(),t.visibleBarsStrictRange()),c.data.plotOffsets=this._plotOffsets}this.ownerSource()&&(c.ownerSource=null===(i=this.ownerSource())||void 0===i?void 0:i.id());for(let e=0;e=0?e:0}}if(null===(s=c.state)||void 0===s?void 0:s.inputs){const e=c.metaInfo.inputs.find((e=>"ILScript"===e.name));e&&delete c.state.inputs[e.id]}return c}restoreData(e){var t,i;this._invalidateLastNonEmptyPlotRowCache(),this.data().restoreState(e),this._resolvedSymbols=null!==(t=e.symbols)&&void 0!==t?t:{},this._graphics=e.graphics?(0,g.loadStudyGraphics)(e.graphics):(0,g.emptyStudyGraphics)(),this._postProcessGraphics(),this._plotOffsets=null!==(i=e.plotOffsets)&&void 0!==i?i:{},this._setStatus({type:ot.StudyStatusType.Completed},!0)}hasStateForAlert(){return!1}stateForAlert(){throw new Error("Not implemented")}idForAlert(){return super.idForAlert()}alertCreationAvailable(){return new(dt())(!1).readonly()}hasBarColorer(){return(0,n.ensureNotNull)(this._metaInfo).plots.some(b.isBarColorerPlot)}barColorer(){const e=this._metaInfo.plots;let t=null;for(let i=0;i0}hasChildren(){return this._children.length>0}isStarted(){return Boolean(this._studyId)}isRestarting(){return this._restarting}isActualInterval(){return this._isActualInterval}onIsActualIntervalChange(){return this._onIsActualIntervalChange}isVisible(){var e,t,i;const s=this._properties.childs();if(this._model.collapsed().value()||!s.visible.value()||!this.isActualInterval())return!1;const r=this.metaInfo() +n.ensure)(e.colorIndexOrRgba)]);i=null===(t=s.values[r])||void 0===t?void 0:t.childs().color.value()}return{type:0,color:i}}const r=this._gradientColorPropsState();let o,a;if(this._isRGB)null!=e.colorIndexOrRgba1&&(o=(0,R.rgbaFromInteger)(e.colorIndexOrRgba1)),null!=e.colorIndexOrRgba2&&(a=(0,R.rgbaFromInteger)(e.colorIndexOrRgba2));else{if(null!=e.colorIndexOrRgba1){const t=(0,n.ensureDefined)(this._palettesInfo.color1);o=t.values[(0,n.ensureDefined)(t.map[e.colorIndexOrRgba1])].childs().color.value()}if(null!=e.colorIndexOrRgba2){const t=(0,n.ensureDefined)(this._palettesInfo.color2);a=t.values[(0,n.ensureDefined)(t.map[e.colorIndexOrRgba2])].childs().color.value()}}const l=null!==(i=e.value1)&&void 0!==i?i:r.value1,c=null!==(s=e.value2)&&void 0!==s?s:r.value2;return o=null!=o?o:r.color1,a=null!=a?a:r.color2,void 0===l||void 0===c||void 0===o&&void 0===a?null:{type:1,color1:o,color2:a,value1:l,value2:c}}_plotAId(){return this._fillMetaInfo.objAId}_plotBId(){return this._fillMetaInfo.objBId}_commonColor(){const e=this._fillStyleProps.childs();if(this._gradientFillType){if(!this._hasAllGradientRequiredProps)return Ze;const e=this._gradientColorPropsState();return{type:1,color1:e.color1,color2:e.color2,value1:e.value1,value2:e.value2}}return{type:0,color:e.color.value()}}_transparency(){return this._fillStyleProps.childs().transparency.value()}_correctVisibleRange(e,t){const[i,s]=super._correctVisibleRange(e,t),r=this._source.getMinFirstBarIndexForPlot(this._fillMetaInfo.id);return[Math.max(r,i),s]}_visible(){return this._fillStyleProps.childs().visible.value()}_initBandIndexes(e,t){this._bandAKey=null,this._bandBKey=null;const i=this._source.metaInfo().bands;if(void 0!==i)for(let s=0;s{null===this._bandAKey&&i.id===e&&(this._bandAKey=s),null===this._bandBKey&&i.id===t&&(this._bandBKey=s)}))}}var ot=i(86635),at=i(10621),lt=i(36646),ct=i(97425),ht=i(40549),dt=i.n(ht),ut=i(1930),pt=i(35624),_t=i(67876);class mt extends _t.PriceAxisView{constructor(e,t){super(),this._model=e.model(),this._source=e,this._data=t}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const s=this._source.model(),r=this._source.priceScale();if(null===r)return;if(!s.isPriceScaleVisible(r))return;const o=this._source.lastValueData(this._data.plotIndex,!1);if(o.noData)return;const a=s.timeScale().visibleBarsStrictRange(),l=s.mainSeries().bars().lastIndex();if(null!==a&&null!==l){if(l<=a.lastBar()){i.background=(0,R.resetTransparency)(o.color);let s=o.color;"transparent"===s&&(s=this._model.properties().childs().scalesProperties.childs().backgroundColor.value()),i.textColor=this.generateTextColor(s),i.borderColor=void 0,e.borderVisible=!1,t.borderVisible=!1}else{const r=s.backgroundColorAtYPercentFromTop(o.coordinate/(0,n.ensureNotNull)(s.paneForSource(this._source)).height());i.background=r,i.textColor=(0,R.resetTransparency)(o.color),i.borderColor=(0,R.resetTransparency)(i.textColor),e.borderVisible=!0,t.borderVisible=!0}i.coordinate=o.coordinate,i.floatCoordinate=o.floatCoordinate,this._showAxisLabel()&&(e.text=o.text,e.visible=!0),this._updatePaneRendererData(t)}}_showPaneLabel(){return!!this._model.properties().childs().scalesProperties.childs().showStudyPlotLabels.value()&&this._source.properties().childs().showLabelsOnPriceScale.value()&&this._source.isPlotVisibleAt(this._data.plotIndex,4)}_showAxisLabel(){return!!this._model.properties().childs().scalesProperties.childs().showStudyLastValue.value()&&this._source.properties().childs().showLabelsOnPriceScale.value()&&this._source.isPlotVisibleAt(this._data.plotIndex,4)}_updatePaneRendererData(e){e.text="",this._showPaneLabel()&&(e.text=this._source.priceLabelText(this._data.plotIndex),e.visible=!0)}}var gt=i(45703),ft=i(2250),vt=i(76422),St=i(64548),yt=i(7006),bt=i(7711),wt=i(93618),Pt=i(81685),Ct=i(77513),Tt=i(74599),xt=i(48566),It=i(18766),Mt=i(69145);const At=(0, +a.getLogger)("Chart.Study"),Lt=o.t(null,void 0,i(14177));const kt={symbolsForDisplay:!1,symbolsForChartApi:!0,skipHiddenInputs:!1,skipFakeInputs:!1,skipBooleanInputs:B.enabled("dont_show_boolean_study_arguments"),asObject:!0,skippedGroups:[],skippedInputs:[],noExchanges:!1,noResolution:!1,keepOptionalSymbolsEmpty:!1,skipColorInputs:!1,skipTimeInputs:!1,skipOptionalEmptySymbolInputs:!1,skipTextareaInputs:!0,priceInputsForDisplay:!1},Et=B.enabled("study_symbol_ticker_description"),Dt=B.enabled("hide_main_series_symbol_from_indicator_legend");function Bt(e,t){const i=e.plots[t];if(!i||!(0,b.isOhlcPlot)(i))return!1;const s=i.target,r=e.defaults.styles&&e.defaults.styles[s],n=e.defaults.ohlcPlots&&e.defaults.ohlcPlots[s],o=e.ohlcPlots&&e.ohlcPlots[s];return r&&(0,b.isOhlcPlotStyleBars)(r)||n&&(0,b.isOhlcPlotStyleBars)(n)||!!o&&(0,b.isOhlcPlotStyleBars)(o)}function Vt(e,t){const i=e.plots[t];if(!i||!(0,b.isOhlcPlot)(i))return!1;const s=i.target,r=e.defaults.styles&&e.defaults.styles[s],n=e.defaults.ohlcPlots&&e.defaults.ohlcPlots[s],o=e.ohlcPlots&&e.ohlcPlots[s];return r&&(0,b.isOhlcPlotStyleCandles)(r)||n&&(0,b.isOhlcPlotStyleCandles)(n)||!!o&&(0,b.isOhlcPlotStyleCandles)(o)}function Rt(e,t){(0,n.assert)(void 0!==e,"zOrder must be defined"),(0,n.assert)(!t.has(e),"zOrder must be unique")}function Nt(e,t){return e.plots.some((e=>((0,b.isColorerPlot)(e)||(0,b.isDataPlot)(e))&&e.target===t))}function Ot(e,t){var i;if(t.plots)for(let s=0;s= 1");let a=(0,k.clone)((0,St.defaults)("study"));Ot(a,e);const l=m.StudyMetaInfo.getStudyPropertyRootName(e);let c=(0,k.clone)((0,St.defaults)(l,s));c.intervalsVisibilities=(0,k.clone)(yt.intervalsVisibilitiesDefaults),"Overlay"!==e.shortId&&"Compare"!==e.shortId||(c.currencyId=null,c.unitId=null),e.isTVScript&&e.TVScriptSourceCode!==c.TVScriptSourceCode&&(c=(0,k.clone)((0,St.factoryDefaults)(l))),(0,k.merge)(a,c),t&&((0,n.assert)(!(t instanceof L()),"propsState should not be an instance of Property"),(0,k.merge)(a,t));const h=(0,k.clone)(e),d={};Pt.StudyVersioning.mergeInputsObjPart(d,null!==(r=h.defaults.inputs)&&void 0!==r?r:{}),Pt.StudyVersioning.mergeInputsObjPart(d,a.inputs),a.inputs=d,delete h.inputs,delete h.defaults.inputs;const u={};if((0,k.merge)(u,h.defaults),(0,k.merge)(u,(0,St.factoryDefaults)(l)),(0,k.merge)(u,a),(0,k.merge)(u,h),delete u.defaults,a=u,null!==i){const t=i.model().studiesColorRotatorFactory().getColorRotator(e) +;null!==t&&("Overlay@tv-basicstudies"===e.id?a.lineStyle.color=t.getColor(a.lineStyle.color):(0,k.merge)(a,function(e,t){for(const i of Object.keys(e.styles)){const s=e.styles[i];if(s&&"color"in s){const e=s.color;s.color=t.getColor(e)}}return e}(a,t)))}return t&&(0,k.merge)(a.styles,null!==(o=t.styles)&&void 0!==o?o:{}),a}function Wt(e,t,i,s,r){return function(e,t,i,s,r,n){const o=Ft(e,t,i,s);return m.StudyMetaInfo.getSourceInputIds(e).forEach(((e,t)=>{const i=o.inputs[e];t=1){const e={};Pt.StudyVersioning.mergeInputsObjPart(e,null!==(n=a.defaults.inputs)&&void 0!==n?n:{}),Pt.StudyVersioning.mergeInputsObjPart(e,o.inputs),o.inputs=e,delete a.inputs,a.defaults&&delete a.defaults.inputs;const t={};(0,k.merge)(t,a.defaults),(0,k.merge)(t,(0,St.factoryDefaults)(m.StudyMetaInfo.getStudyPropertyRootName(a))),(0,k.merge)(t,o),delete a.defaults,(0,k.merge)(t,a),o=t}return o}(e,t,i,s,n);return Ht(t||e,r,o)}function Ut(e,t,i,s,r){return zt(e,t,i,s,m.StudyMetaInfo.getStudyPropertyRootName(e),r)}function jt(e,t,i){let s=0,r=0;return e.inputs.filter((e=>"source"===e.type)).forEach((e=>{(0,D.getInputValue)(i[e.id]).includes("$")&&s++,(0,D.getInputValue)(t[e.id]).includes("$")&&r++})),Math.sign(r)-Math.sign(s)}class Gt extends u.PriceDataSource{constructor(e,t,i,s){var r,o,a;super(e),this._onStart=new(h()),this._onHibernationStateChange=new(h()),this._symbolsResolved=new(h()),this._statusChanged=new(h()),this._restarting=!1,this._paneViews=[],this._legendView=null,this._priceAxisViews=[],this._inputsAnchorsPaneView=null,this._inputsLinesPaneView=null,this._inputsTimeAxisPaneViews=[],this._inputsPriceAxisPaneViews=[],this._resolvedSymbols={},this._resolvedSymbolsByInput={},this._sources=[],this._status={ +type:ot.StudyStatusType.Undefined},this._wasCompletedBefore=!1,this._studyId=null,this._isSubscribedToSessionId=!1,this._titleStrCache={},this._titleInPartsCache={},this._children=[],this._numericFormatter=new E.NumericFormatter,this._priceAxisViewsBase=[],this._priceLinesAxisViews=[],this._graphicsPriceAxisViews=[],this._labelPaneViews=[],this._ownFirstValue=null,this._plotOffsets={},this._formatter=null,this._ongoingDataUpdate=Promise.resolve(),this._studyModified=!1,this._isDestroyed=!1,this._graphics=new g.LiveStudyGraphics,this._dataUpdated=new(h()),this._tagsChanged=new(h()),this._studyName="",this._turnaround="st0",this._currencySourceSymbolInputProperty=null,this._pendingResolveSymbols=new Map,this._onIsActualIntervalChange=new(h()),this._childStudyByRebind=new(h()),this._lastNonEmptyPlotRowCache={},this._startMovingPoint=null,this._processHibernateBound=this.processHibernate.bind(this,1),this._maxOffset=new(dt())(0),this._currencySourceSymbolInfo=null,this._turnaroundCounter=0,this._deferredPinePatchProps=!1,this._chartApi=e.chartApi(),this._properties=t,this._metaInfo=s,this._series=this._model.mainSeries(),this._series.onIntervalChanged().subscribe(this,this._calcIsActualInterval),this._showStudyArgumentsProperty=e.properties().childs().paneProperties.childs().legendProperties.childs().showStudyArguments,e.collapsed().subscribe(this._processHibernateBound),this._sources=i,m.StudyMetaInfo.setChildStudyMetaInfoPropertiesSourceId(s,null===(r=this._sources[0])||void 0===r?void 0:r.id(),t),i.forEach((e=>{e.setChild(this)})),[this._series,...i].forEach((e=>{e.currencyChanged().subscribe(this,this._onSourceCurrencyChanged),e.unitChanged().subscribe(this,this._onSourceUnitChanged),e.priceRangeReadyChanged().subscribe(this,this._onSourcePriceRangeReadyChanged),e.formatterChanged().subscribe(this,this._onSourceFormatterChanged),e.priceStepChanged().subscribe(this,this._onSourcePriceStepChanged)})),Et&&this._model.mainSeries().properties().childs().statusViewStyle.childs().symbolTextSource.listeners().subscribe(this,(()=>{this.invalidateTitleCache(!0)}));const l=this._properties.childs();for(const e of m.StudyMetaInfo.getSourceInputIds(s))null===(o=l.inputs.childs()[e])||void 0===o||o.subscribe(this,this._onSourceInputChanged);this._properties.subscribe(this,this._onPropertiesChanged),l.visible.subscribe(this,this._visibleChanged),l.visible.subscribe(this,(()=>this.processHibernate())),l.intervalsVisibilities.subscribe(this,this._calcIsActualInterval),l.inputs.listeners().subscribe(this,this._updateMaxOffsetValue),void 0!==l.offsets&&l.offsets.listeners().subscribe(this,this._updateMaxOffsetValue),void 0!==l.offset&&l.offset.listeners().subscribe(this,this._updateMaxOffsetValue),this._initializeCurrencySource(),P.hideAllIndicators().subscribe(this,this._visibleChanged);for(let e=0;ethis.processHibernate()))} +for(const e of Object.keys(this._metaInfo.graphics))for(const t of Object.keys(this._metaInfo.graphics[e])){const i=null===(a=l.graphics.childs()[e])||void 0===a?void 0:a.childs()[t];i&&i.childs().visible&&(0,n.ensureDefined)(i.childs().visible).subscribe(this,(()=>this.processHibernate()))}this._isActualInterval=(0,at.isActualInterval)(this._series.intervalObj(),this._properties.childs().intervalsVisibilities),this._initializeStudyInputsPaneViews(),this._handler=e=>this.onData(e),this._handler.isTVScriptStrategy=this._metaInfo.isTVScriptStrategy,this._valuesProvider=new Ct.StudyValuesProvider(this,e)}destroy(){var e;this.parentSources().forEach((e=>{e.currencyChanged().unsubscribeAll(this),e.unitChanged().unsubscribeAll(this),e.priceRangeReadyChanged().unsubscribeAll(this),e.formatterChanged().unsubscribeAll(this),e.priceStepChanged().unsubscribeAll(this)})),this._series.properties().childs().statusViewStyle.childs().symbolTextSource.unsubscribeAll(this),this._series.onIntervalChanged().unsubscribeAll(this),this.formatterChanged().unsubscribe(this,this.invalidateTitleCache),P.hideAllIndicators().unsubscribe(this,this._visibleChanged),this._model.collapsed().unsubscribe(this._processHibernateBound),null!==this._currencySourceSymbolInputProperty&&this._currencySourceSymbolInputProperty.unsubscribeAll(this),null===(e=this._legendView)||void 0===e||e.destroy()}properties(){return this._properties}isDraggable(){return!this._metaInfo.linkedToSeries}lastValueData(e,t,i){const s={noData:!0},r=this.priceScale();if(this._model.timeScale().isEmpty()||null===r||r.isEmpty()||this.data().isEmpty())return s;const n=this._model.timeScale().visibleBarsStrictRange(),o=this.firstValue(!0);if(null===n||null===o)return s;if(!this._properties.childs().visible.value())return s;const a=this._properties.childs().styles,l=this._properties.childs().ohlcPlots;let c,h;if(a&&a.childs()[e]&&(c=a.childs()[e]),l&&l.childs()[e]&&(c=l.childs()[e]),!c||0===c.childs().display.value())return s;const d=this.metaInfo().plots;for(h=0;he.id()));if(h.length&&(c.parentSources=h),e){let e=this.data();const t=this._model.timeScale(),i=this._seriesDataRangeToSave(e);null!==i&&(e=e.range(i.firstBar(),i.lastBar())),c.data=e.state(),c.data.symbols=this._resolvedSymbols,c.data.graphics=(0,g.saveStudyGraphics)(this.graphics(),t.visibleBarsStrictRange()),c.data.plotOffsets=this._plotOffsets}this.ownerSource()&&(c.ownerSource=null===(i=this.ownerSource())||void 0===i?void 0:i.id());for(let e=0;e=0?e:0}}if(null===(s=c.state)||void 0===s?void 0:s.inputs){const e=c.metaInfo.inputs.find((e=>"ILScript"===e.name));e&&delete c.state.inputs[e.id]}return c}restoreData(e){var t,i;this._invalidateLastNonEmptyPlotRowCache(),this.data().restoreState(e),this._resolvedSymbols=null!==(t=e.symbols)&&void 0!==t?t:{},this._graphics=e.graphics?(0,g.loadStudyGraphics)(e.graphics):(0,g.emptyStudyGraphics)(),this._postProcessGraphics(),this._plotOffsets=null!==(i=e.plotOffsets)&&void 0!==i?i:{},this._setStatus({type:ot.StudyStatusType.Completed},!0)}hasStateForAlert(){return!1}stateForAlert(){throw new Error("Not implemented")}idForAlert(){return super.idForAlert()}alertCreationAvailable(){return new(dt())(!1).readonly()}hasBarColorer(){return(0,n.ensureNotNull)(this._metaInfo).plots.some(b.isBarColorerPlot)}barColorer(){const e=this._metaInfo.plots;let t=null;for(let i=0;i0}hasChildren(){return this._children.length>0}isStarted(){return Boolean(this._studyId)}isRestarting(){return this._restarting}isActualInterval(){return this._isActualInterval}onIsActualIntervalChange(){return this._onIsActualIntervalChange}isVisible(){var e,t,i;const s=this._properties.childs();if(this._model.collapsed().value()||!s.visible.value()||!this.isActualInterval())return!1;const r=this.metaInfo() ;if(r.plots.length>0)for(let e=0;ethis.start(e,t)),!0);this._sources.forEach((e=>{e.isHibernated()&&e.start()}));const r=!(this.isHibernationAllowed()&&!this.isVisible())||!0===t;this._chartApi&&this._chartApi.isConnected().value()&&r&&this._allSymbolsAreResolved().then((()=>this._startAfterSymbolsResolved(e,t))).catch((e=>{At.logError("ERROR: "+this._debugId()+" start failed, "+e),this._restarting=!1}))}inputs(e){const t=(0,k.merge)((0,k.clone)(kt),e||{});t.skipOptionalEmptySymbolInputs&&(t.keepOptionalSymbolsEmpty=!0);const i=(0,r.default)(this._buildInputs(t));return t.patchSosInputs&&m.StudyMetaInfo.patchSoSInputs(i,(e=>{var t,i;return null!==(i=null===(t=this._sources.find((t=>t.id()===e)))||void 0===t?void 0:t.sourceId())&&void 0!==i?i:null})),i}metaInfo(){return this._metaInfo}status(){return this._status}name(e){return e?this.metaInfo().shortDescription||this._properties.childs().shortDescription&&this._properties.childs().shortDescription.value()||"Study":this.metaInfo().description||this._properties.childs().description&&this._properties.childs().description.value()||"Study"}title(e,t,i,s){i=void 0===i?!this._showStudyArgumentsProperty.value():i;const r=JSON.stringify([e,t,i,s]);if(this._titleStrCache[r])return this._titleStrCache[r];if(this._titleInPartsCache[r])return this._joinTitlesParts(this._titleInPartsCache[r]);const n=this._title(e,t,i,s);return this._titleStrCache[r]=n,n}titleInParts(e,t,i,s){i=void 0===i?!this._showStudyArgumentsProperty.value():i;const r=JSON.stringify([e,t,i,s]);if(this._titleInPartsCache[r])return this._titleInPartsCache[r];const n=this._titleInParts(e,t,i,s);return this._titleInPartsCache[r]=n,n}invalidateTitleCache(e){if(this._titleStrCache={},this._titleInPartsCache={},!0===e&&this._children)for(let t=0;tt.update(e))),this._labelPaneViews.forEach((t=>t.update(e))),null===(t=this._dataWindowView)||void 0===t||t.update(),null===(i=this._legendView)||void 0===i||i.update(),null===(s=this._statusView)||void 0===s||s.update(),this._priceAxisViews.forEach((t=>t.update(e))),this._priceLinesAxisViews.forEach((t=>t.update(e))),null===(r=this._inputsLinesPaneView)||void 0===r||r.update(e),null===(n=this._inputsAnchorsPaneView)||void 0===n||n.update(e),this._inputsTimeAxisPaneViews.forEach((t=>t.update(e))),this._inputsPriceAxisPaneViews.forEach((t=>t.update(e)))}getStudyName(){return this._studyName}childStudyByRebind(){return this._childStudyByRebind}isPine(){return void 0!==this._metaInfo.pine}isStandardPine(){return this.isPine()&&m.StudyMetaInfo.isStandardPine(this._metaInfo.id)}isLinkedToSeries(){return!0===this._metaInfo.linkedToSeries}defaultPlotIdForAlert(){return this._metaInfo.plots.length?this._metaInfo.plots[0].id:null}resolvedSymbolInfoBySymbol(e){return this._resolvedSymbols&&e&&this._resolvedSymbols[this._getSymbolForResolve(e)]||null}currency(){if(null!==this._currencySourceSymbolInfo)return(0,ut.symbolCurrency)(this._currencySourceSymbolInfo);const e=this.metaInfo() -;return Boolean(e)&&e.is_price_study?this._firstSourceOrSeries().currency():null}currencySourceSymbolInfo(){var e,t,i;return null!==(e=this._currencySourceSymbolInfo)&&void 0!==e?e:null!==(i=null===(t=this.symbolSource())||void 0===t?void 0:t.symbolInfo())&&void 0!==i?i:null}unit(){const e=this.metaInfo();return Boolean(e)&&e.is_price_study?this._firstSourceOrSeries().unit():null}dataWindowView(){return this._dataWindowView}statusView(){return this._statusView}legendView(){return this._legendView}inputsForAlertState(){return this.inputs()}sessionId(){return this._firstSourceOrSeries().sessionId()}sessionIdChanged(){return this._firstSourceOrSeries().sessionIdChanged()}getSymbolString(e){return""===e?"":(0,T.encodeExtendedSymbolOrGetSimpleSymbolString)(this._getSymbolObject(e))}onStatusChanged(){return this._statusChanged}symbolsResolved(){return this._symbolsResolved}onHibernationStateChange(){return this._onHibernationStateChange}valuesProvider(){return new y.StudyLegendValuesProvider(this,this.model())}statusProvider(e){return new M.StudyStatusProvider(this,this._model.properties().childs().scalesProperties.childs().textColor)}correctScaleMargins(e){if("Volume"===this.metaInfo().shortId){const t=this.model().paneForSource(this);return null!==t&&t.isOverlay(this)&&t.containsMainSeries()?{top:.75,bottom:0}:{top:e.top,bottom:0}}return e}canBeHiddenByGlobalFlag(){return!0}isSourceHidden(){return!this.isVisible()||this.canBeHiddenByGlobalFlag()&&C.hideAllIndicators().value()}paneViews(e){if(this.isSourceHidden()||!e.hasPriceDataSource(this))return null;const t=[];return!this._startMovingPoint&&this._wasCompletedBefore&&t.push(...this._paneViews),this._inputsLinesPaneView&&(this._startMovingPoint||this._model.selection().isSelected(this))&&t.push(this._inputsLinesPaneView),this._inputsAnchorsPaneView&&t.push(this._inputsAnchorsPaneView),t}labelPaneViews(){return this.isSourceHidden()?null:this._labelPaneViews}timeAxisViews(){return this._model.selection().isSelected(this)?this._inputsTimeAxisPaneViews:null}priceAxisViews(e,t){const i=this._properties.childs().oldShowLastValue;if(i&&!i.value())return null;let s=this._priceAxisViews.slice();return this._model.selection().isSelected(this)&&(s=s.concat(this._inputsPriceAxisPaneViews)),e.findTargetPriceAxisViews(this,t,s,this._priceLinesAxisViews)}movable(){return null!==this._inputsAnchorsPaneView}startMoving(e,t,i,s){this._startMovingPoint=e,this.stop()}move(e,t,i,s){if(void 0!==e.logical&&null!==this._startMovingPoint){if(Array.isArray(t)){const i=t;this._updateInputValue(e.logical,i[0]),this._updateInputValue(e.logical,i[1])}else this._updateInputValue(e.logical,t);this.updateAllViews((0,ct.sourceChangeEvent)(this.id()))}}endMoving(e,t){return this._startMovingPoint=null,this.start(),{indexesChanged:!1,pricesChanged:!1}}clearData(){var e;this._invalidateLastNonEmptyPlotRowCache(),this.data().clear(),this._graphics instanceof g.LiveStudyGraphics&&(null===(e=this._graphics)||void 0===e||e.clear()),this._plotOffsets={}, +;return Boolean(e)&&e.is_price_study?this._firstSourceOrSeries().currency():null}currencySourceSymbolInfo(){var e,t,i;return null!==(e=this._currencySourceSymbolInfo)&&void 0!==e?e:null!==(i=null===(t=this.symbolSource())||void 0===t?void 0:t.symbolInfo())&&void 0!==i?i:null}unit(){const e=this.metaInfo();return Boolean(e)&&e.is_price_study?this._firstSourceOrSeries().unit():null}dataWindowView(){return this._dataWindowView}statusView(){return this._statusView}legendView(){return this._legendView}inputsForAlertState(){return this.inputs()}sessionId(){return this._firstSourceOrSeries().sessionId()}sessionIdChanged(){return this._firstSourceOrSeries().sessionIdChanged()}getSymbolString(e){return""===e?"":(0,T.encodeExtendedSymbolOrGetSimpleSymbolString)(this._getSymbolObject(e))}onStatusChanged(){return this._statusChanged}symbolsResolved(){return this._symbolsResolved}onHibernationStateChange(){return this._onHibernationStateChange}valuesProvider(){return new y.StudyLegendValuesProvider(this,this.model())}statusProvider(e){return new M.StudyStatusProvider(this,this._model.properties().childs().scalesProperties.childs().textColor)}correctScaleMargins(e){if("Volume"===this.metaInfo().shortId){const t=this.model().paneForSource(this);return null!==t&&t.isOverlay(this)&&t.containsMainSeries()?{top:.75,bottom:0}:{top:e.top,bottom:0}}return e}canBeHiddenByGlobalFlag(){return!0}isSourceHidden(){return!this.isVisible()||this.canBeHiddenByGlobalFlag()&&P.hideAllIndicators().value()}paneViews(e){if(this.isSourceHidden()||!e.hasPriceDataSource(this))return null;const t=[];return!this._startMovingPoint&&this._wasCompletedBefore&&t.push(...this._paneViews),this._inputsLinesPaneView&&(this._startMovingPoint||this._model.selection().isSelected(this))&&t.push(this._inputsLinesPaneView),this._inputsAnchorsPaneView&&t.push(this._inputsAnchorsPaneView),t}labelPaneViews(){return this.isSourceHidden()?null:this._labelPaneViews}timeAxisViews(){return this._model.selection().isSelected(this)?this._inputsTimeAxisPaneViews:null}priceAxisViews(e,t){const i=this._properties.childs().oldShowLastValue;if(i&&!i.value())return null;let s=this._priceAxisViews.slice();return this._model.selection().isSelected(this)&&(s=s.concat(this._inputsPriceAxisPaneViews)),e.findTargetPriceAxisViews(this,t,s,this._priceLinesAxisViews)}movable(){return null!==this._inputsAnchorsPaneView}startMoving(e,t,i,s){this._startMovingPoint=e,this.stop()}move(e,t,i,s){if(void 0!==e.logical&&null!==this._startMovingPoint){if(Array.isArray(t)){const i=t;this._updateInputValue(e.logical,i[0]),this._updateInputValue(e.logical,i[1])}else this._updateInputValue(e.logical,t);this.updateAllViews((0,ct.sourceChangeEvent)(this.id()))}}endMoving(e,t){return this._startMovingPoint=null,this.start(),{indexesChanged:!1,pricesChanged:!1}}clearData(){var e;this._invalidateLastNonEmptyPlotRowCache(),this.data().clear(),this._graphics instanceof g.LiveStudyGraphics&&(null===(e=this._graphics)||void 0===e||e.clear()),this._plotOffsets={}, this.hasBarColorer()&&this._model.mainSeries().invalidateBarStylesCache(),this.updateAllViews((0,ct.sourceChangeEvent)({sourceId:this.id(),clearData:!0}))}convertYCoordinateToPriceForMoving(e,t){const i=this.priceScale();if(!t||!i||i.isEmpty())return null;const s=t.firstValue();return null===s?null:i.coordinateToPrice(e,s)}processHibernate(e){const t=this.isVisible();if(!this.isStarted()&&t&&(this._sources.forEach((e=>{e.processHibernate()})),this.start(void 0,void 0,e),this._onHibernationStateChange.fire(!1)),this.isHibernationAllowed()&&this.isStarted()&&!t){for(const e of this._children)e.processHibernate();this.stop(void 0,e),this._onHibernationStateChange.fire(!0)}}isHibernationAllowed(){return!this.metaInfo().historyCalculationMayChange&&(!this.hasChildren()||!!this._model.collapsed().value()&&this._children.every((e=>e.isHibernationAllowed())))}isPlotVisibleAt(e,t){let i;const s=this.metaInfo().plots.find((t=>t.id===e));if(i=void 0!==s?(0,b.isOhlcPlot)(s)?this._properties.childs().ohlcPlots.childs()[s.target]:this._properties.childs().styles.childs()[e]:this._properties.childs().ohlcPlots.childs()[e],void 0===i)throw new Error(`Study does not contain ${e} plot`);const r=i.childs().display.value();return null!==r&&(r&t)===t}recalculate(){const e=this._model.paneForSource(this);this._model.recalculatePane(e,(0,ct.sourceChangeEvent)(this.id())),this._model.updateSource(this)}maxOffset(){return this._maxOffset}onStart(){return this._onStart}isHibernated(){return!this.isVisible()&&!this.isStarted()}turnaround(e){if(!e)return this._turnaround;const t=this._series.seriesSource().turnaround(),i=buildTreeForStudy(this);return buildTurnaround(t,i)}canHaveChildren(){var e;return this._canHaveChildren=null!==(e=this._canHaveChildren)&&void 0!==e?e:m.StudyMetaInfo.canHaveChildren(this._metaInfo),this._canHaveChildren}setChild(e){-1===this._children.indexOf(e)&&this._children.push(e)}unsetChild(e){const t=this._children.indexOf(e);~t&&this._children.splice(t,1)}getAllChildren(){const e=this._children.slice();for(let t=0;te.id()===i)))&&void 0!==t?t:null}return this._series}priceStep(){return this._priceStep||this._firstSourceOrSeries().priceStep(!1)}_incrementTurnaround(){this._turnaround="st"+ ++this._turnaroundCounter}_checkTurnaround(e){return e===this._turnaround||e===this._model.mainSeries().seriesSource().turnaround()||e===this.turnaround(!0)}_createStudyOnServer(){if(this._isDestroyed)return;const e=this._getStudyIdWithLatestVersion();this._studyId=(0,x.makeNextStudyId)(),this._incrementTurnaround(),this._studyName=e;const t=(0,k.clone)((0,n.ensureDefined)(this._inputs));m.StudyMetaInfo.patchSoSInputs(t,(e=>{var t,i;return null!==(i=null===(t=this._sources.find((t=>t.id()===e)))||void 0===t?void 0:t.sourceId())&&void 0!==i?i:null})), this._chartApi.createStudy(this._studyId,this._turnaround,this.isChildStudy()?(0,n.ensureNotNull)(this._sources[0].sourceId()):(0,n.ensureNotNull)(this._series.seriesSource().instanceId()),this._studyName,t,this._handler,this.isChildStudy())}_stopStudyOnServer(){this._chartApi&&this._chartApi.isConnected().value()&&this.isStarted()&&(this._chartApi.removeStudy((0,n.ensureNotNull)(this._studyId),this.isChildStudy()),this._setStatus({type:ot.StudyStatusType.Undefined})),this._studyId=null}_modifyStudyOnServer(e,t){const i=(0,k.clone)((0,n.ensureDefined)(e));m.StudyMetaInfo.patchSoSInputs(i,(e=>{var t,i;return null!==(i=null===(t=this._sources.find((t=>t.id()===e)))||void 0===t?void 0:t.sourceId())&&void 0!==i?i:null})),this._chartApi.modifyStudy((0,n.ensureNotNull)(this._studyId),this._turnaround,i,this._handler,t)}_transformData(e){}_updateMaxOffsetValue(){let e=-1/0;for(const t of this._metaInfo.plots)e=Math.max(this.offset(t.id),e);this._maxOffset.setValue(e)}_rightOffsetToUnixTime(e){if(this._series.bars().size()>=e){const t=(0,n.ensureNotNull)(this._series.bars().lastIndex())-e;return(0,n.ensureNotNull)(this._series.bars().valueAt(t))[0]}return null}_invalidateLastNonEmptyPlotRowCache(){this._lastNonEmptyPlotRowCache={}}_collectDepsForAlert(){throw new Error("Not implemented")}_allInputsAreValid(){for(const e of this._metaInfo.inputs)if("bar_time"===e.type){const t=e.id;if(null==this._properties.childs().inputs.childs()[t].value())return!1}return!0}_startAfterSymbolsResolved(e,t){if(this.isStarted()&&!this._restarting)return;if(!this._sources.some((e=>!(e.isStarted()&&!e.isRestarting())&&(e.onStart().subscribe(this,this._startAfterSymbolsResolved,!0),!0)))&&(this._restarting=!1,this._allInputsAreValid()&&(this._inputs=this._apiInputs(),this._createStudyOnServer(),this._subscribeToSessionId(),this._onStart.fire(),!0===e&&this._children)))for(const e of this._children)e.start(!0,t)}_changeInputsImpl(e,t){var s;const r=this._calcSources();let a=!0;const l=jt(this._metaInfo,e,t);if(r.length!==this._sources.length||r[0]!==this._sources[0])a=this._rebindToSourceOrRestorePreviousValue(null!==(s=r[0])&&void 0!==s?s:this._series,e,t),a&&(this._inputs=e);else{if(this.isStarted()&&this._chartApi.isConnected().value()&&l>0&&!this._chartApi.canCreateStudy(!0)){const s=window.user.pro_plan;createGoProDialog({feature:"studyOnStudy",actions:s&&[ProPlans.ProPremium,ProPlans.ProPremiumTrial].includes(s)?[{text:o.t(null,void 0,i(75139)),action:PredefinedAction.Close}]:void 0});for(const i of this._metaInfo.inputs){if("source"!==i.type)continue;const s=e[i.id].v,r=t[i.id].v;if(s!==r){(0,n.ensureDefined)(this._properties.childs().inputs.child(i.id)).setValue(r)}}return}this._inputs=e;let s=!1;const a=Object.values(D.RangeDependentStudyInputNames);for(const i of Object.keys(e))if(JSON.stringify(e[i])!==JSON.stringify(t[i])&&!a.includes(i)){s=!0;break}this._incrementTurnaround(),s&&this.disablePriceRangeReady(),this._updateParentSources(r,l),this._modifyStudyOnServer(e,l)}this.invalidateTitleCache(),a&&(this._studyModified=a)} -createPriceAxisView(e){return new mt(this,{plotIndex:e})}createPriceLineAxisView(e){return new gt.StudyPriceLineAxisView(this,e)}_createStudyPlotPaneView(e){return new Re.StudyPlotPaneView(this,this._series,this._model,e)}_createViews(){var e,t,i,s;this._priceAxisViewsBase=[],this._priceLinesAxisViews=[],this._paneViews=[],this._labelPaneViews=[];const r=new Set,o=this.metaInfo(),a=Boolean(o.usePlotsZOrder),l=new Map,c=this._properties.childs();if(c.filledAreas&&o.filledAreas)for(let e=0;e{const i=c.bands.childs()[t];if(i&&i.childs().visible.value()){const t=new tt(i,this),s=a?(0,n.ensureDefined)(e.zorder):l.size;Rt(s,l),l.set(s,{paneViews:[t]})}})),c.bandsBackground&&((0,n.assert)(!a,"'usePlotsZOrder' flag does not supported"),l.set(l.size,{paneViews:[new rt(this)]}));const h=this._paneViews;this._createGraphicsPaneViews().then((e=>{for(let t=0;te-t));for(let e=0;e0){const t=(0,n.ensureNotNull)(this.barColorer()).firstColoredBar(e[0].index);this._model.mainSeries().invalidateBarStylesCache(t)}null!==t&&this._postProcessGraphics();const r=this._model.paneForSource(this);this._model.recalculatePane(r,(0,ct.sourceChangeEvent)({sourceId:this.id(),firstUpdatedTimePointIndex:null!=s?s:void 0})),this._updateSources()}_updateSources(){this._model.updateSource(this),this.hasBarColorer()&&this._model.updateSource(this._model.mainSeries())}_titleInputs(e,t){return this.inputs(this._titleInputsOptions(e,t))}_titleInputsOptions(e,t){return{symbolsForDisplay:!0,skipHiddenInputs:!0,skipFakeInputs:!1,fakeInputsForDisplay:!0,asObject:!1,skippedGroups:[],noExchanges:e,noResolution:t,skipColorInputs:!0,skipTimeInputs:!0,priceInputsForDisplay:!0,skipOptionalEmptySymbolInputs:Dt}}_postProcessGraphics(){ +createPriceAxisView(e){return new mt(this,{plotIndex:e})}createPriceLineAxisView(e){return new gt.StudyPriceLineAxisView(this,e)}_createStudyPlotPaneView(e){return new Re.StudyPlotPaneView(this,this._series,this._model,e)}_createViews(){var e,t,i,s;this._priceAxisViewsBase=[],this._priceLinesAxisViews=[],this._paneViews=[],this._labelPaneViews=[];const r=new Set,o=this.metaInfo(),a=Boolean(o.usePlotsZOrder),l=new Map,c=this._properties.childs();if(c.filledAreas&&o.filledAreas)for(let e=0;e{const i=c.bands.childs()[t];if(i&&i.childs().visible.value()){const t=new tt(i,this),s=a?(0,n.ensureDefined)(e.zorder):l.size;Rt(s,l),l.set(s,{paneViews:[t]})}})),c.bandsBackground&&((0,n.assert)(!a,"'usePlotsZOrder' flag does not supported"),l.set(l.size,{paneViews:[new rt(this)]}));const h=this._paneViews;this._createGraphicsPaneViews().then((e=>{for(let t=0;te-t));for(let e=0;e0){const t=(0,n.ensureNotNull)(this.barColorer()).firstColoredBar(e[0].index);this._model.mainSeries().invalidateBarStylesCache(t)}null!==t&&this._postProcessGraphics();const r=this._model.paneForSource(this);this._model.recalculatePane(r,(0,ct.sourceChangeEvent)({sourceId:this.id(),firstUpdatedTimePointIndex:null!=s?s:void 0})),this._updateSources()}_updateSources(){this._model.updateSource(this),this.hasBarColorer()&&this._model.updateSource(this._model.mainSeries())}_titleInputs(e,t){return this.inputs(this._titleInputsOptions(e,t))}_titleInputsOptions(e,t){return{symbolsForDisplay:!0,skipHiddenInputs:!0,skipFakeInputs:!1,fakeInputsForDisplay:!0,asObject:!1,skippedGroups:[],noExchanges:e,noResolution:t,skipColorInputs:!0,skipTimeInputs:!0,priceInputsForDisplay:!0,skipOptionalEmptySymbolInputs:Dt}}_postProcessGraphics(){ this._graphicsPriceAxisViews=this._createGraphicsPriceAxisViews(),this._concatPriceAxisViews()}async _createGraphicsPaneViews(){return(0,g.createGraphicsPaneViews)(this,this.model())}_createGraphicsPriceAxisViews(){return(0,g.createGraphicsPriceAxisViews)(this)}_subscribeToSessionId(){!this._isSubscribedToSessionId&&this.hasSymbolInputs()&&(this.sessionIdChanged().subscribe(this,this._onSessionIdChanged),this._isSubscribedToSessionId=!0)}_unsubscribeToSessionId(){this._isSubscribedToSessionId&&(this.sessionIdChanged().unsubscribe(this,this._onSessionIdChanged),this._isSubscribedToSessionId=!1)}_onSessionIdChanged(){this.restart(!0)}_title(e,t,i,s){const r=this._titleInParts(e,t,i,s);return this._joinTitlesParts(r)}_formatterByProperties(){const e=this.metaInfo().format,t=this._priceScaleByProperties();if(null!==t)switch(e.type){case"inherit":case"price":return new Tt.PriceFormatter(t);case"volume":return new xt.VolumeFormatter(Math.log10(t));case"percent":return new It.PercentageFormatter(t)}return null}_formatterByMetaInfo(){var e,t;const i=this.metaInfo().format;if("inherit"===i.type)return null;const s=this.series().symbolInfo(),r=(0,k.isNumber)(i.precision)?Math.pow(10,i.precision):void 0;{const s=null!==(t=null===(e=null===Mt.customFormatters||void 0===Mt.customFormatters?void 0:Mt.customFormatters.studyFormatterFactory)||void 0===e?void 0:e.call(Mt.customFormatters,i,this.symbolSource().symbolInfo()))&&void 0!==t?t:null;if(null!==s)return s}switch(i.type){case"price":return new Tt.PriceFormatter(r);case"volume":{let e=i.precision;return void 0===e&&(e=s&&(0,k.isNumber)(s.volume_precision)?s.volume_precision:0),new xt.VolumeFormatter(e)}case"percent":return new It.PercentageFormatter(r);default:return At.logWarn(`Unsupported format type: ${i.type}`),null}}_postProcessPriceRange(e){if(e&&e.minValue()===e.maxValue()&&!this.metaInfo().is_price_study){const t=.005*e.minValue();e=new p.PriceRange(e.minValue()-t,e.maxValue()+t)}const t=this.priceScale();return t&&t.isLog()&&e?new p.PriceRange(t.priceToLogical(e.minValue()),t.priceToLogical(e.maxValue())):e}_joinTitlesParts(e){const t=e[1]?e[1].join(", "):"";return e[0]+(t.length>0?" ("+t+")":"")}_titleInParts(e,t,s,r){var a;const l=this.name(e);t=t||{};const c=[o.t(l,{context:"study"},i(68716))];let h=[];if(!s){const i=this._getMTFResolutionInputTitle();null!==i&&i.length>0&&c.push(i);const s=this.metaInfo(),o=this._titleInputs(r,!0)||[];if(o.length>0){const i={};if(this.isChildStudy())for(let t=0;t=0){const t=this.parentSourceForInput(c);if(t instanceof Gt){const s=t.metaInfo(),n=t.title(e,{},!0,r);if(1===s.plots.length)i[c]=n;else{const e=c.split("$")[1],t=null===(a=s.plots[parseInt(e)])||void 0===a?void 0:a.id,r=s.styles&&s.styles[t],o=r&&r.title||t;i[c]=n+": "+o}}}}h=o.map((e=>{let s=(0,k.isNumber)(e)?this._numericFormatter.format(e):i&&i[e.toString()]||e.toString() ;return t&&t[s.toString()]&&(s=t[s.toString()]),s}))}}return[c.join(" · "),h]}_getMTFResolutionInputTitle(){const e=this.metaInfo();for(let t=0;ts),(()=>s)).then(this._onDataUnpacked.bind(this,e,t.indexes,i)),this._ongoingDataUpdate}_mergeData(e){return this._invalidateLastNonEmptyPlotRowCache(),this.data().merge(e)}_getSymbolForResolve(e){return this.getSymbolString(this._getSymbolForApi(e))}_allSymbolsAreResolved(){const e=this.metaInfo(),t=[];let i=!1;for(let s=0;sthis._symbolsResolved.fire())):e}return Promise.all(t).catch((e=>(this._setStatus({type:ot.StudyStatusType.Error,errorDescription:{error:Lt}}),this.stop(!0),this._model.updateSource(this),Promise.reject("Invalid symbol, "+e)))).then((()=>{null!==this._studyId&&this.stop(!0),this.start(!0),this._symbolsResolved.fire(),this._recheckLineToolsActuality()}))}_getSymbolForApi(e){return e}_resolveSymbol(e,t){if(""===e)return Promise.resolve();let i=this._pendingResolveSymbols.get(e);return void 0!==i||(i=new Promise(((i,s)=>{this._onSymbolResolvingStart(),this._chartApi.resolveSymbol((0,x.makeNextSymbolId)(),e,(r=>{switch(this._pendingResolveSymbols.delete(e),r.method){case"symbol_resolved":this._setStatus({type:ot.StudyStatusType.Undefined}),this._resolvedSymbols[e]=r.params[1],this._resolvedSymbolsByInput[t]=r.params[1],this._onSymbolResolved(e,t,r.params[1]),this.invalidateTitleCache(!0),i();break;case"symbol_error":if(this._setStatus({type:ot.StudyStatusType.Error,errorDescription:{error:r.params[1]}}),this._onSymbolError(),r.params[1]===I.permissionDenied&&r.params[2]){if(r.params[2]!==I.SymbolErrorPermissionDeniedReason.Symbol)return void this._resolveSymbol(r.params[2],t).then(i);if(r.params[3])return void this._resolveSymbol(r.params[3],t).then(i)}0,s()}}))})),this._pendingResolveSymbols.set(e,i)),i}_recheckLineToolsActuality(){const e=this._model.paneForSource(this);null!==e&&e.sourcesByGroup().lineSourcesForAllSymbols().forEach((e=>{e.ownerSource()===this&&e.calcIsActualSymbol()}))}_getSymbolObject(e){const t={symbol:e},i=this.currency() ;return null!==this._currencySourceSymbolInputProperty&&null!==this._currencySourceSymbolInfo&&this._getSymbolForApi(this._currencySourceSymbolInputProperty.value())===e&&(t["currency-id"]=i),t.session=this.sessionId(),t}_onSymbolResolved(e,t,i){this._onCurrencyMayChange()}_onSymbolResolvingStart(){}_onSymbolError(){}_setStatus(e,t){var i;this._status=e,e.type===ot.StudyStatusType.Completed?this._wasCompletedBefore=!0:e.type!==ot.StudyStatusType.Error&&e.type!==ot.StudyStatusType.Undefined||(this._wasCompletedBefore=!1),t||(null===(i=this._statusView)||void 0===i||i.update(),this._model.updateSource(this),this._statusChanged.fire(e))}_onPropertiesChanged(){this._restarting||(this._inputs?this._tryChangeInputs():this._chartApi&&this._chartApi.isConnected().value()&&this.restart()),this._recreatePaneViews(),(0,vt.emit)("study_properties_changed",this._id)}_bandsFirstValue(e){const t=this._metaInfo;if(!t.bands)return null;for(let i=0;ivoid 0!==i[e]),1e3),null===i?null:(this._lastNonEmptyPlotRowCache[e]=i,i)}_onCurrencyChanged(){"alwaysOff"!==(0,pt.currencyUnitVisibilityProperty)().value()&&this._model.fullUpdate(),this.isStarted()&&this._tryChangeInputs(),this._currencyChanged.fire()}_apiInputs(){return this.inputs({keepOptionalSymbolsEmpty:!0})}_tryChangeInputs(){var e;const t=this.isStarted()&&this._chartApi.isConnected().value();if(t&&this._allInputsAreValid())this._allSymbolsAreResolved().then((()=>{const e=this._apiInputs(),t=JSON.stringify(e)!==JSON.stringify(this._inputs);this._isStopped()?t&&this.disablePriceRangeReady():t&&this._changeInputsImpl(e,(0, n.ensureDefined)((0,k.clone)(this._inputs)))})).catch((e=>{At.logError("ERROR: "+this._debugId()+" _tryChangeInputs: cannot modify study, "+e)}));else{t&&this.stop(!0);const i=this._apiInputs(),s=(0,n.ensureDefined)((0,k.clone)(this._inputs));if(JSON.stringify(i)!==JSON.stringify(this._inputs)){const t=this._calcSources();if(t.length!==this._sources.length||t[0]!==this._sources[0])this._rebindToSourceOrRestorePreviousValue(null!==(e=t[0])&&void 0!==e?e:this._series,i,s);else{const e=jt(this._metaInfo,i,s);this._updateParentSources(t,e)}this._inputs=i}}this._tagsChanged.fire()}_debugId(){const e=[];return this._studyId&&e.push(this._studyId),e.push(this._metaInfo.fullId),e.push(this._metaInfo.description),JSON.stringify({study:e})}_onCurrencyMayChange(){if(null!==this._currencySourceSymbolInputProperty){const e=this.currency();this._updateCurrencySourceSymbolInfo(),e!==this.currency()&&this._onCurrencyChanged()}}_fillPrecalculatedAutoscaleInfo(e,t){const i=this._metaInfo,s=this.properties().childs(),r=new Set,n=this._metaInfo.filledAreas||[];for(let e=0;e!(0,b.isPlotWithTechnicalValues)(e))).filter((e=>r.has(e.id)||this.isPlotVisibleAt(e.id,1))).reduce(((i,s)=>this._applyPlotToPrecalculatedAutoscaleInfo(e,t,i,s)),{fields:[],useMainSeriesRange:!1,baseValueMinMax:null})}_firstSourceOrSeries(){var e;return null!==(e=this._sources[0])&&void 0!==e?e:this._series}_updateParentSources(e,t){if(this._sources.forEach((e=>e.unsetChild(this))),e.forEach((e=>e.setChild(this))),this._sources=e,0!==t&&this._sources.length<=1){const e=this._firstSourceOrSeries(),t=this.m_priceScale,i=(0,n.ensureNotNull)(e.priceScale());if(t!==i){const t=this._model.paneForSource(this),s=(0,n.ensureNotNull)(this._model.paneForSource(e));t===s&&s.move(this,i,!0)}}}_calcSources(){const e=this._properties.childs().inputs.state();return m.StudyMetaInfo.getSourceIdsByInputs(this._metaInfo.inputs,e).map((e=>{if("high"===e||"open"===e||"low"===e||"close"===e||"hl2"===e||"ohl3"===e||"ohlc4"===e)return null;{const t=this._model.allStudies().find((t=>t.canHaveChildren()&&t.id()===e));return null!=t?t:null}})).filter(k.notNull)}_isStopped(){return!this.isStarted()}_onDataUnpacked(e,t,i,s){if(this._isDestroyed)return;"nochange"!==t&&this._processPlotOffsets(s),this._transformData(e);const r=this._mergeData(e);null!==s&&(s.indexes_replace?((0,n.assert)("nochange"!==t),this._graphics.replaceIndexesTo(t)):("nochange"!==t&&this._graphics.replaceIndexesTo(t),void 0!==s.graphicsCmds&&this._graphics.processCommands(s.graphicsCmds,this._metaInfo.graphics))),this._onDataUpdated(e,s,t,r&&r.index),this.priceRangeReady()||this._enablePriceRangeReady(),this._dataUpdated.fire(i,!1,r)}_processPlotOffsets(e){if(e&&e.indexes_replace)return;const t=this._plotOffsets;this._plotOffsets=e&&e.offsets||{},(0,s.default)(t,this._plotOffsets)||this.updateAllViews((0,ct.sourceChangeEvent)({sourceId:this.id(),clearData:!0})), this._updateMaxOffsetValue()}_applyPlotToPrecalculatedAutoscaleInfo(e,t,i,s){var r;const o=s.id,a=this._properties.childs().styles.childs()[o],l=(0,b.isShapesPlot)(s)||(0,b.isCharsPlot)(s);i.useMainSeriesRange=i.useMainSeriesRange||(0,b.isArrowsPlot)(s);let c=(0,b.isLinePlot)(s)||(0,b.isOhlcPlot)(s);if(l){const e=(0,n.ensureDefined)(a).childs().location.value(),t=[v.MarkLocation.Absolute,v.MarkLocation.Top,v.MarkLocation.Bottom].indexOf(e)<0;i.useMainSeriesRange=i.useMainSeriesRange||l&&t,c=c||e===v.MarkLocation.Absolute}if(!c)return i;const h={name:o,offset:this.offset(o)},d=a,u=d.childs().plottype.value();if(!this._properties.childs().skipHistogramBaseOnAutoScale&&[b.LineStudyPlotStyle.Histogram,b.LineStudyPlotStyle.Columns,b.LineStudyPlotStyle.Area].indexOf(u)>=0){const s=null===(r=d.childs().histogramBase)||void 0===r?void 0:r.value(),n=this.data().minMaxOnRangeCached(e,t,[h]);return(0,k.isNumber)(s)&&null!==n&&(i.baseValueMinMax=(0,_.mergeMinMax)(i.baseValueMinMax,{min:s,max:s}),i.baseValueMinMax=(0,_.mergeMinMax)(i.baseValueMinMax,n)),i}return i.fields.push(h),i}_onSourceInputChanged(){if(!this.isStarted()){const e=this._calcSources();e[0]!==this._sources[0]&&this._rebindToSource(e[0],this._apiInputs())}}_rebindToSourceOrRestorePreviousValue(e,t,i){let s=!0;if(!this._rebindToSource(e,t)){const e=this._properties.childs().inputs.state(),r=m.StudyMetaInfo.getSourceIdsByInputs(this._metaInfo.inputs,e)[0];for(const e of Object.keys(i)){const o=(0,D.getInputValue)(i[e]),a=(0,D.getInputValue)(t[e]);if(i.hasOwnProperty(e)&&o!==a&&r&&(0,k.isString)(a)&&0===a.indexOf(r)){const t=(0,n.ensureDefined)(this._properties.childs().inputs.child(e)),r=(0,D.getInputValue)(i[e]);t.setValue(r),s=!1;break}}}return s}_rebindToSource(e,t){const i=this.isStarted()&&this._chartApi.isConnected().value(),s=this._firstSourceOrSeries();let r;const o=(0,k.clone)((0,n.ensureDefined)(t)),a=e instanceof Gt?[e,...this._sources]:this._sources;if(m.StudyMetaInfo.patchSoSInputs(o,(e=>{var t,i;return null!==(i=null===(t=a.find((t=>t.id()===e)))||void 0===t?void 0:t.sourceId())&&void 0!==i?i:null})),!this.isChildStudy())return At.logError("Unable to rebind study to source of this type"),!1;{let t;this._sources[0].unsetChild(this);let s=null;if(e===this._model.mainSeries())this._sources=[],this._ownerSource=null,t=this._series.seriesSource().instanceId(),s=2;else{if(!(e instanceof Gt))return At.logError("Unable to rebind study to source of this type"),!1;this._ownerSource=e,this._sources=[e],t=e.sourceId(),e.setChild(this),null===t&&(r=e)}i&&null!==t&&(this._incrementTurnaround(),this.disablePriceRangeReady(),this._chartApi.rebindStudy((0,n.ensureNotNull)(this._studyId),this._turnaround,t,this._studyName,o,this._handler,s))}r&&(this.isStarted()&&this.stop(),r.start(!0)),s instanceof Gt&&s.processHibernate();const l=this.m_priceScale,c=(0,n.ensureNotNull)(e.priceScale());if(l!==c){const t=this._model.paneForSource(this),i=(0,n.ensureNotNull)(this._model.paneForSource(e));t===i&&i.move(this,c,!0)}const h=this._firstSourceOrSeries() ;return s.formatterChanged().unsubscribe(this,this._onSourceFormatterChanged),h.formatterChanged().subscribe(this,this._onSourceFormatterChanged),s.priceStepChanged().unsubscribe(this,this._onSourcePriceStepChanged),h.priceStepChanged().subscribe(this,this._onSourcePriceStepChanged),s.currencyChanged().unsubscribeAll(this),h.currencyChanged().subscribe(this,this._onSourceCurrencyChanged),s.unitChanged().unsubscribeAll(this),h.unitChanged().subscribe(this,this._onSourceUnitChanged),s.priceRangeReadyChanged().unsubscribeAll(this),h.priceRangeReadyChanged().subscribe(this,this._onSourcePriceRangeReadyChanged),this._recreatePriceFormattingDependencies(),!0}_buildInputs(e){(0,n.assert)(!!e,"options not set");let t={};try{t=this._prepareInputs(e)}catch(e){At.logWarn("Failed to prepare study inputs: "+e)}if(e.asObject){const e={};return Object.keys(t).forEach((i=>{null!=t[i]&&(e[i]=t[i])})),e}{const e=[];return Object.keys(t).forEach((i=>{null!=t[i]&&e.push(t[i])})),e}}_prepareInput(e,t){const i=this._prepareInputValue(e,t);return!e.isFake||t.fakeInputsForDisplay||t.onlyAtomValues?i:{v:i,f:!0,t:e.type}}_plotsForAlert(){return[]}_dependenciesForAlerts(){throw new Error("Not implemented")}_calcIsActualInterval(){const e=this._isActualInterval;this._isActualInterval=(0,at.isActualInterval)(this._series.intervalObj(),this._properties.childs().intervalsVisibilities),e!==this._isActualInterval&&(this._onIsActualIntervalChange.fire(),this._visibleChanged(),this.processHibernate())}_visibleChanged(){this._series.invalidateBarColorerCache()}_getNonPriceParent(){const e=this._sources;for(const t of e)if(t instanceof Gt){const e=t.metaInfo();return e.is_price_study&&"Compare@tv-basicstudies"!==e.id?t._getNonPriceParent():t}return null}_updateInputValue(e,t){const i=this._properties.childs().inputs.childs();if(i[t.id])if("price"===t.type)i[t.id].setValue(e.price);else if("time"===t.type){const s=this._model.timeScale().indexToTimePoint(e.index);null!==s&&i[t.id].setValue(1e3*s)}}_initializeStudyInputsPaneViews(){}_updateCurrencySourceSymbolInfo(){var e;null!==this._currencySourceSymbolInputProperty&&(this._currencySourceSymbolInfo=null!==(e=this._resolvedSymbolsByInput[this._currencySourceSymbolInputProperty.value()])&&void 0!==e?e:null)}_initializeCurrencySource(){var e,t;const i=this.metaInfo(),s="symbolInputSymbolSource"===(null===(e=i.symbolSource)||void 0===e?void 0:e.type)&&(null===(t=i.symbolSource)||void 0===t?void 0:t.inputId),r=i.inputs.find((e=>e.id===s)),n="symbol"===(null==r?void 0:r.type);if("string"==typeof s&&n&&i.is_price_study){const e=this._properties.childs().inputs.childs()[s];void 0!==e&&(e.subscribe(this,this._onCurrencyMayChange),this._currencySourceSymbolInputProperty=e)}}_recreatePaneViews(){this.hasBarColorer()&&this._model.mainSeries().invalidateBarStylesCache(),this._createViews(),this.recalculate(),this.updateAllViews((0,ct.sourceChangeEvent)(this.id()))}_pinePatchPropsAllowed(){return(this.isStarted()||this._metaInfo.inputs.some((e=>"symbol"===e.type)))&&!this._restarting}_pinePatchProps(){ -throw new Error("Not implemented")}_areStudyInputsModified(e){if(0===Object.keys(e).length)return!1;if(void 0===this._oldStudyInputs)return!0;const t=Object.keys(this._oldStudyInputs);(0,n.assert)(t.length===Object.keys(e).length,"keys quantity should be equal");for(const i of t)if((0,n.assert)(e.hasOwnProperty(i),`key '${i}' should exist in study inputs`),(0,n.ensureDefined)(this._oldStudyInputs)[i]!==e[i])return!0;return!1}_getStudyErrorText(e){return e.split(":",2)[0]}}},83956:(e,t,i)=>{"use strict";i.d(t,{StudyCompare:()=>O});var s=i(50151),r=i(35624),n=i(68927),o=i(1930),a=i(26220),l=i.n(a),c=i(2484),h=i(99846),d=i(67876),u=i(1194),p=i(38031);const _=c.enabled("force_exchange_as_title");class m extends d.PriceAxisView{constructor(e,t){super(),this._studyCompare=e,this._data=t}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const r=this._studyCompare.priceScale(),n=this._studyCompare.lastValueData(this._data.plotIndex,!1);if(n.noData||null===r||r.isEmpty())return;const o=this._studyCompare.model(),a=o.timeScale().visibleBarsStrictRange(),l=o.mainSeries().bars().lastIndex();if(null===a||null===l)return;if(l<=a.lastBar())i.background=(0,p.resetTransparency)(n.color),i.textColor=this.generateTextColor(i.background),i.borderColor=void 0,e.borderVisible=!1,t.borderVisible=!1;else{const r=o.backgroundColorAtYPercentFromTop(n.coordinate/(0,s.ensureNotNull)(o.paneForSource(this._studyCompare)).height());i.background=r,i.textColor=(0,p.resetTransparency)(n.color),i.borderColor=i.textColor,e.borderVisible=!0,t.borderVisible=!0}i.coordinate=n.coordinate,i.floatCoordinate=n.floatCoordinate;const c=o.properties().childs().scalesProperties.childs();c.showSeriesLastValue.value()&&(e.text=(0,u.getCurrentModePriceText)(r,n),c.seriesLastValueMode.value()!==h.PriceAxisLastValueMode.LastPriceAndPercentageValue?e.secondLine="":e.secondLine=(0,u.getOppositeModePriceText)(r,n),e.visible=!0),t.text="",c.showSymbolLabels.value()&&(t.text=this._paneText(),t.visible=t.text.length>0)}_paneText(){let e="";const t=this._studyCompare.symbolInfo();return _?e=(0,o.displayedSymbolExchange)(t):this._studyCompare.model().properties().childs().scalesProperties.childs().showSymbolLabels.value()&&(e=(0,o.displayedSymbolName)(t)),e}}i(44352);var g=i(35823),f=i(28667),v=i(76076),S=i(49483),y=i(65665),b=i(77513);class w extends b.StudyValuesProvider{constructor(e,t){super(e,t),this._emptyValues[0].title=e.guiPlotName("")}_hideValues(){return!1}}const C=S.CheckMobile.any();class P extends g.StudyDataWindowView{constructor(e,t){super(e,t),this._studyCompare=e}_hideValues(){return!1}_createValuesProvider(e,t){return new w(e,t)}_currentIndex(){const e=this._model.crossHairSource().lockedIndex;let t;return C&&(null===this._model.crossHairSource().pane&&void 0===e||(0,f.isLineToolName)(v.tool.value())||null!==this._model.lineBeingEdited())?t=this._study.data().lastIndex():(t=this._model.crossHairSource().appliedIndex(),(0,y.isNumber)(t)||(t=this._study.data().lastIndex())),t}}class T extends P{constructor(e,t){super(e,t),this._additional=null, -this._showSeriesOHLC=t.properties().childs().paneProperties.childs().legendProperties.childs().showSeriesOHLC,this._showSeriesOHLC.subscribe(this,this.update)}areValuesVisible(){return this._showSeriesOHLC.value()}destroy(){this._showSeriesOHLC.unsubscribeAll(this)}additional(){return this._additional}_updateImpl(){super._updateImpl()}}var x=i(66019),I=i(69145),M=i(89111);class A extends M.StudyStatusProvider{getSplitTitle(){return this._source.titleInParts(!0,void 0,!1,!1)}text(){return this._source.isActualInterval()?this._source.isFailed()?`${this._source.title(!0,void 0,!1,!1)}: ${this.sourceStatusText()}`:`${this._source.title(!0,void 0,!1,!1)} ${this.sourceStatusText()}`:this._source.title(!0,void 0,!1,!1)}}var L=i(90854),k=i(40549),E=i.n(k);const D=c.enabled("study_overlay_compare_legend_option"),V=c.enabled("force_exchange_as_title"),B=c.enabled("uppercase_instrument_names"),R=!c.enabled("hide_study_compare_legend_item"),N=c.enabled("hide_unresolved_symbols_in_legend");class O extends n.Study{constructor(e,t,i,s){super(e,function(e){return e.hasChild("currencyId")||e.addChild("currencyId",new(l())(null)),e.hasChild("unitId")||e.addChild("unitId",new(l())(null)),e.addExclusion("currencyId"),e.addExclusion("unitId"),e}(t),i,s),this._isActingAsSymbolSource=new(E())(!0),this._realignToolsLastParams=null,this.properties().childs().minTick.subscribe(null,(()=>this._recreatePriceFormattingDependencies())),this.properties().childs().minTick.subscribe(null,(()=>this._model.fullUpdate())),this.properties().childs().currencyId.subscribe(this,this._onCurrencyChanged),this.properties().childs().unitId.subscribe(this,this._onUnitChanged),this.properties().merge({skipHistogramBaseOnAutoScale:!0}),this._symbolResolvingActive=new(E())(!1),this._symbolHibernated=new(E())(!1),e.mainSeries().onIntervalChanged().subscribe(this,(()=>e.realignLineTools(this)))}destroy(){this._model.mainSeries().onIntervalChanged().unsubscribeAll(this),super.destroy()}properties(){return this._properties}isActingAsSymbolSource(){return this._isActingAsSymbolSource.readonly()}createPriceAxisView(e){return new m(this,{plotIndex:"compare"})}setSymbolParams(e){this._setSymbolCurrencyUnitInternal(e)}symbol(){return this.properties().childs().inputs.childs().symbol.value()}setSymbol(e){this.setSymbolParams({symbol:e})}symbolInfo(){if(!this._resolvedSymbols)return null;const e=this.properties().childs().inputs.childs().symbol.value();if(!e)return null;let t;return t=this._resolvedSymbols[this._getSymbolForResolve(e)]||null,t}symbolResolved(){return this.symbolsResolved()}symbolResolvingActive(){return this._symbolResolvingActive}symbolHibernated(){return this._symbolHibernated}isVisible(){const e=super.isVisible();return this._symbolHibernated.setValue(!e),e}symbolSameAsCurrent(e){return(0,L.symbolSameAsCurrent)(e,this.symbolInfo())}currency(){return this.properties().childs().currencyId.value()||null}setCurrency(e){this.setSymbolParams({currency:e})}isConvertedToOtherCurrency(){return(0,o.isConvertedToOtherCurrency)(this.symbolInfo())}unit(){ -return this.properties().childs().unitId.value()||null}setUnit(e){this.setSymbolParams({unit:e})}isConvertedToOtherUnit(){return(0,o.isConvertedToOtherUnit)(this.symbolInfo(),this._model.unitConversionEnabled())}style(){return 2}setStyle(e){}interval(){return this._model.mainSeries().interval()}setInterval(e){}symbolSource(){return this}state(e,t){const i=super.state(e,t);return this._model.unitConversionEnabled()||delete i.state.unitId,e&&((0,s.ensureDefined)(i.data).symbols={___snapshot:this.symbolInfo()||void 0}),i}symbolTitle(e,t){return this.title(!0,{},!1,e)}titleInParts(e,t,i,s){const r=this._titleInParts(e,t,i,s).join(", ");return[B?r.toUpperCase():r]}tags(){const e=this.symbol();return e?[e]:[]}statusView(){return R?super.statusView():null}guiPlotName(e){return this.properties().childs().inputs.childs().symbol.value()}canOverrideMinTick(){return!0}canBeHiddenByGlobalFlag(){return!1}valuesProvider(){return new w(this,this.model())}statusProvider(e){return new A(this,this._model.properties().childs().scalesProperties.childs().textColor)}measureUnitId(){return(0,o.measureUnitId)(this.symbolInfo())}_createViews(){this._legendView||(this._legendView=new T(this,this._model)),this._dataWindowView||(this._dataWindowView=new P(this,this._model)),this._statusView||(this._statusView=new x.StudyStatusView(this)),super._createViews()}_showLastValueOnPriceScale(){return this._model.properties().childs().scalesProperties.childs().showSeriesLastValue.value()}_onUnitChanged(){"alwaysOff"!==(0,r.currencyUnitVisibilityProperty)().value()&&this._model.fullUpdate(),this._model.unitConversionEnabled()&&this.isStarted()&&this._tryChangeInputs(),this._unitChanged.fire()}_getSymbolObject(e){const t=super._getSymbolObject(e),i=this.currency();null!==i&&(t["currency-id"]=i);const s=this.unit();return this._model.unitConversionEnabled()&&null!==s&&(t["unit-id"]=s),t}_getSymbolForApi(e){return(0,o.symbolForApi)(this._resolvedSymbolsByInput[e]||null,e)}_onSymbolResolvingStart(){super._onSymbolResolvingStart(),this._symbolResolvingActive.setValue(!0)}_onSymbolError(){super._onSymbolError(),this._symbolResolvingActive.setValue(!1)}_onSymbolResolved(e,t,i){super._onSymbolResolved(e,t,i),this._recreatePriceFormattingDependencies();const s=t===this.symbol()?(0,o.extractSymbolNameFromSymbolInfo)(i,this.symbol()):null,r=(0,o.symbolCurrency)(i),n=(0,o.symbolUnit)(i,this._model.unitConversionEnabled());this._setSymbolCurrencyUnitInternal({symbol:null!=s?s:void 0,currency:r,unit:n},i),this._symbolResolvingActive.setValue(!1)}_changeInputsImpl(e,t){super._changeInputsImpl(e,t),this._realignLineToolsIfParamsChanged()}_createStudyOnServer(){super._createStudyOnServer(),this._realignLineToolsIfParamsChanged()}_tryCreateFormatter(){var e,t;const i=null!==(t=null===(e=null===I.customFormatters||void 0===I.customFormatters?void 0:I.customFormatters.priceFormatterFactory)||void 0===e?void 0:e.call(I.customFormatters,this.symbolInfo(),this.properties().childs().minTick.value()))&&void 0!==t?t:null;return null!==i?i:(0, -o.createSeriesFormatter)(this.symbolInfo(),this.properties().childs().minTick.value())}_titleInParts(e,t,i,s){const r=this.symbolInfo();let n;if(r){const e=(0,o.getStudySymbolExchange)(r);if(V&&e)n=e;else if(n=r.name,D)switch(this._model.mainSeries().symbolTextSourceProxyProperty().value()){case"description":n=r.description;break;case"ticker-and-description":n=`${r.name}, ${r.description}`}else if(e&&!s)return[n,[e]]}else n=N?"":this.properties().childs().inputs.childs().symbol.value();return[n]}_setSymbolCurrencyUnitInternal(e,t){const{symbol:i,currency:s,unit:r}=e,n=this.properties().childs(),a=n.inputs.childs().symbol.value(),l=n.currencyId.value(),c=n.unitId.value();if(void 0!==i&&i!==a&&n.inputs.childs().symbol.setValueSilently(i),void 0!==s&&s!==l&&n.currencyId.setValueSilently(s),void 0!==r&&r!==c&&n.unitId.setValueSilently(r),t)this._resolvedSymbolsByInput[this.symbol()]=t,this._resolvedSymbols[this._getSymbolForResolve(this.symbol())]=t,this._realignToolsLastParams=null;else{const e=this.symbolInfo();null!==e&&(n.currencyId.setValueSilently((0,o.symbolCurrency)(e)),n.unitId.setValueSilently((0,o.symbolUnit)(e,this._model.unitConversionEnabled())))}n.inputs.childs().symbol.value()!==a&&n.inputs.childs().symbol.listeners().fire(n.inputs.childs().symbol),n.currencyId.value()!==l&&n.currencyId.listeners().fire(n.currencyId),n.unitId.value()!==c&&n.unitId.listeners().fire(n.unitId),this._realignLineToolsIfParamsChanged()}_realignLineToolsIfParamsChanged(){const e=this.symbol(),t=this.interval(),i=this.currency(),s=this.unit();null!==this._realignToolsLastParams&&this._realignToolsLastParams.symbol===e&&this._realignToolsLastParams.interval===t&&this._realignToolsLastParams.currency===i&&this._realignToolsLastParams.unit===s||(this._model.realignLineTools(this),this._realignToolsLastParams={symbol:e,interval:t,currency:i,unit:s})}}},51182:(e,t,i)=>{"use strict";i.d(t,{StudyOverlayBase:()=>_e});var s=i(50151),r=i(49483),n=i(98351),o=i(68927),a=i(98799),l=i(35624),c=i(22770),h=i(1930),d=i(26220),u=i.n(d),p=i(91035),_=i(2484),m=i(54168),g=i(90854),f=i(77213),v=i(92133),S=i(88552),y=i(33639),b=i(65665),w=i(23304),C=i(40549),P=i.n(C),T=i(69145),x=i(97425),I=i(66019),M=i(74234),A=i(67876),L=i(99846),k=i(1194),E=i(38031);const D=_.enabled("force_exchange_as_title");class V extends A.PriceAxisView{constructor(e){super(),this._source=e}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const r=this._source.lastValueData("close",!1);if(r.noData)return;const n=this._source.model(),o=this._source.priceScale();if(null===o)return;if(!n.isPriceScaleVisible(o))return;const a=n.timeScale().visibleBarsStrictRange(),l=n.mainSeries().bars().lastIndex();if(null===a||null===l)return;if(l<=a.lastBar())i.background=(0,E.resetTransparency)(r.color),i.textColor=this.generateTextColor(r.color),e.borderVisible=!1,t.borderVisible=!1;else{const o=n.backgroundColorAtYPercentFromTop(r.coordinate/(0,s.ensureNotNull)(n.paneForSource(this._source)).height());i.background=o,i.textColor=(0,E.resetTransparency)(r.color),i.borderColor=i.textColor, -e.borderVisible=!0,t.borderVisible=!0}i.coordinate=r.coordinate,i.floatCoordinate=r.floatCoordinate;const c=this._source.model().properties().childs().scalesProperties.childs();c.showSeriesLastValue.value()&&(e.text=(0,k.getCurrentModePriceText)(o,r),c.seriesLastValueMode.value()!==L.PriceAxisLastValueMode.LastPriceAndPercentageValue?e.secondLine="":e.secondLine=(0,k.getOppositeModePriceText)(o,r),e.visible=!0),t.text="",c.showSymbolLabels.value()&&(t.text=this._paneText(),t.visible=t.text.length>0)}_paneText(){let e="";const t=this._source.symbolInfo();return D?e=(0,h.displayedSymbolExchange)(t):this._source.model().properties().childs().scalesProperties.childs().showSymbolLabels.value()&&(e=(0,h.displayedSymbolName)(t)),e}}var B=i(45703);class R extends B.PriceLineAxisView{constructor(e){super(),this._study=e}_value(){return this._study.lastValueData("",!0)}_priceLineColor(e){return e}_lineWidth(){return 1}_isVisible(){const e=this._study.model().properties().childs().scalesProperties.childs().showSeriesLastValue.value();return this._study.properties().childs().showPriceLine.value()&&e}}var N=i(53479),O=i(2945);class F{constructor(e){this._lineRenderer=new O.HorizontalLineRenderer,this._visible=!1,this._source=e}update(){if(this._visible=!1,!this._source.properties().childs().showPriceLine.value())return;const e=this._source.lastValueData("",!0);e.noData||(this._visible=!0,this._lineRenderer.setData({y:e.coordinate,color:e.color,linewidth:1,linestyle:N.LINESTYLE_DOTTED,visible:this._visible}))}renderer(){return this._visible?this._lineRenderer:null}}var W=i(50335),H=i(95790),z=i(28667),U=i(76076),j=i(43312);const G=r.CheckMobile.any();class q extends H.DataWindowView{constructor(e,t){super(),this._invalidated=!0,this._study=e,this._model=t,this._valueProvider=this._createValuesProvider(e,t),this._items=this._valueProvider.getItems().map((e=>new H.DataWindowItem(e.id,e.title,""))),this.update()}items(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items}update(){this._invalidated=!0}study(){return this._study}_updateImpl(){this._header=this._study.title();let e;this._showLastPriceAndChangeOnly()?e=this._study.data().lastIndex():(e=this._model.crossHairSource().appliedIndex(),(0,W.isNumber)(e)||(e=this._study.data().lastIndex()));const t=this._valueProvider.getValues(e);for(let e=0;ee||t),i.showBarChange,i.showSeriesOHLC),this._visibilityProperty.subscribe(this,this.update)}areValuesVisible(){return this._visibilityProperty.value()}additional(){return this._additional}destroy(){this._backgroundColorSpawn.destroy(),this._visibilityProperty.destroy()}_updateImpl(){super._updateImpl()}_createValuesProvider(e,t){return new $.OverlayLegendValuesProvider(e,t)}}var X=i(64636),Z=i(83438),J=i(15381),Q=i(9657),ee=i(36767),te=i(14224),ie=i(73436),se=i(78201),re=i(16199),ne=i(2250);const oe=r.CheckMobile.any()&&!1,ae=_.enabled("uppercase_instrument_names"),le=_.enabled("study_overlay_compare_legend_option"),ce=_.enabled("secondary_series_extend_time_scale"),he=_.enabled("hide_unresolved_symbols_in_legend"),de=!_.enabled("hide_study_overlay_legend_item"),ue=(0,n.getLogger)("Chart.StudyOverlay");function pe(e,t){return null==e[t]}class _e extends o.Study{constructor(e,t,i,s){super(e,function(e){return e.hasChild("currencyId")||e.addChild("currencyId",new(u())(null)),e.hasChild("unitId")||e.addChild("unitId",new(u())(null)),e.addExclusion("currencyId"),e.addExclusion("unitId"),e}(t),i,s),this._quotesProvider=new m.QuotesProvider,this._seriesSource=null,this._symbolResolvingActive=new(P())(!1),this._symbolHibernated=new(P())(!1),this._styleToRecover=null,this._isActingAsSymbolSource=new(P())(!0),this._realignToolsLastParams=null,this._precomputedBarStyles=new WeakMap,this.m_data=new S.PlotList((0,c.seriesPlotFunctionMap)(),pe),oe&&this._quotesProvider.quotesUpdate().subscribe(this,this._onQuotesUpdate);const r=this.properties().childs();r.currencyId.subscribe(this,this._onCurrencyChanged),r.unitId.subscribe(this,this._onUnitChanged),r.allowExtendTimeScale.subscribe(this,this._onAllowExtendTimeScaleChanged),this._onAllowExtendTimeScaleChanged(),r.style.subscribe(this,this._onChartStyleChanged),r.lineStyle.childs().priceSource.subscribe(this,this._updateBarFunction),r.areaStyle.childs().priceSource.subscribe(this,this._updateBarFunction),r.baselineStyle.childs().priceSource.subscribe(this,this._updateBarFunction),r.columnStyle.childs().priceSource.subscribe(this,this._updateBarFunction),this._updateBarFunction(),this._formatter=null,e.mainSeries().onIntervalChanged().subscribe(this,(()=>e.realignLineTools(this)))}destroy(){this._model.mainSeries().onIntervalChanged().unsubscribeAll(this),super.destroy()}isActingAsSymbolSource(){return this._isActingAsSymbolSource.readonly()}precomputedBarStyle(e){return this._precomputedBarStyles.get(e)}setPrecomputedBarStyle(e,t){this._precomputedBarStyles.set(e,t)}properties(){return this._properties}barColorer(){return new ne.SeriesBarColorer(this)}setSymbolParams(e){this._setSymbolParamsInternal(e)}symbol(){return this.properties().childs().inputs.childs().symbol.value()}setSymbol(e){this.setSymbolParams({symbol:e})}symbolInfo(){if(!this._resolvedSymbols)return null;const e=this._properties.childs().inputs.childs().symbol.value();if(!e)return null;let t;return t=this._resolvedSymbols[this._getSymbolForResolve(e)]||null,t}supportsPressedChunks(){ -return!1}pressedChunks(e,t){throw new Error("Pressed chunks are not supported")}data(){return null===this._seriesSource?super.data():this._seriesSource.data().bars()}symbolResolved(){return this.symbolsResolved()}symbolResolvingActive(){return this._symbolResolvingActive}symbolHibernated(){return this._symbolHibernated}isVisible(){const e=super.isVisible();return this._symbolHibernated.setValue(!e),e}symbolSameAsCurrent(e){return(0,g.symbolSameAsCurrent)(e,this.symbolInfo())}priceSource(){const e=this.properties().childs();switch(e.style.value()){case 2:return e.lineStyle.childs().priceSource.value();case 3:return e.areaStyle.childs().priceSource.value();case 10:return e.baselineStyle.childs().priceSource.value();case 13:return e.columnStyle.childs().priceSource.value()}return null}barFunction(){return this._barFunction}quotes(){return this._quotesProvider.quotes()}currency(){return this.properties().childs().currencyId.value()||null}setCurrency(e){this.setSymbolParams({currency:e})}isConvertedToOtherCurrency(){return(0,h.isConvertedToOtherCurrency)(this.symbolInfo())}unit(){return this.properties().childs().unitId.value()||null}setUnit(e){this.setSymbolParams({unit:e})}isConvertedToOtherUnit(){return(0,h.isConvertedToOtherUnit)(this.symbolInfo(),this._model.unitConversionEnabled())}style(){return this.properties().childs().style.value()}setStyle(e){this.setSymbolParams({style:e})}interval(){return this._model.mainSeries().interval()}setInterval(e){}symbolSource(){return this}barsProvider(){return this}state(e,t){const i=super.state(e,t);return this._model.unitConversionEnabled()||delete i.state.unitId,e&&((0,s.ensureDefined)(i.data).symbols={___snapshot:this.symbolInfo()||void 0}),i}symbolTitle(e,t){return this.title(!0,{},!1,e)}title(e,t,i,s){const r=this._titleInParts(e,t,i,s).join(", ");return ae?r.toUpperCase():r}titleInParts(e,t,i,s){const r=this._titleInParts(e,t,i,s).join(", ");return[ae?r.toUpperCase():r]}isStarted(){return null===this._seriesSource?super.isStarted():this._seriesSource.isStarted()}sourceId(){return null===this._seriesSource?super.sourceId():(0,s.ensureNotNull)(this._seriesSource.instanceId())}moveData(e){null===this._seriesSource?super.moveData(e):this._seriesSource.moveData(e)}firstValue(){const e=this._model.timeScale().visibleBarsStrictRange();if(null===e)return null;const t=e.firstBar();if(0===this.data().size())return this._ownFirstValue;const i=this.data().search(t,y.PlotRowSearchMode.NearestRight,1);return this._ownFirstValue=null!==i?this._barFunction(i.value,0):null,this._ownFirstValue}lastValueData(e,t,i){const s={noData:!0},r=this.priceScale();if(this._model.timeScale().isEmpty()||null===r||r.isEmpty()||this.data().isEmpty())return s;const n=this._model.timeScale().visibleBarsStrictRange();if(null===n)return s;const o=this.properties().childs();if(!o.visible.value())return s;const a=this.nearestIndex(n.lastBar(),y.PlotRowSearchMode.NearestLeft,1);if(void 0===a)return s;const l=this.firstValue();if(null===l)return s -;const c=this._lastNonEmptyPlotRow(4),h=null!==c&&n.contains(c.index),d=null!==c?c.value:null,u=t||h?d:this.data().valueAt(a);if(null===u)return s;const p=this._barFunction(u,2);if(!(0,b.isNumber)(p))return s;const _=r.priceToCoordinate(p,l);let m;switch(o.style.value()){case 0:m=u[1]<=u[4]?o.barStyle.childs().upColor.value():o.barStyle.childs().downColor.value();break;case 1:case 9:m=u[1]<=u[4]?o.candleStyle.childs().upColor.value():o.candleStyle.childs().downColor.value();break;case 13:m=u[1]<=u[4]?o.columnStyle.childs().upColor.value():o.columnStyle.childs().downColor.value();break;case 2:m=o.lineStyle.childs().color.value();break;case 3:m=o.areaStyle.childs().color1.value();break;case 10:{const e=o.baselineStyle.childs();m=_(0,s.ensureNotNull)(this.priceScale()).height(),color:()=>e.baselineColor.value(),baseLevelPercentage:()=>e.baseLevelPercentage.value()});break}case 12:r=new re.SeriesHiLoPaneView(this,this._model)}r&&this._paneViews.push(r),null!==i&&this._paneViews.push(i),this._paneViews.push(new F(this)),this._dataWindowView||(this._dataWindowView=new q(this,this._model)),this._legendView||(this._legendView=new K(this,this._model)),this._statusView||(this._statusView=new I.StudyStatusView(this)),this._priceAxisViews=[...this._priceAxisViewsBase], -this._labelPaneViews.push(new X.PanePriceAxisView(e,this,this._model))}_createStudyOnServer(){null===this._seriesSource?super._createStudyOnServer():this._modifyStudyOnServer((0,s.ensureDefined)(this._inputs)),this._realignLineToolsIfParamsChanged()}_modifyStudyOnServer(e){null===this._seriesSource?super._modifyStudyOnServer(e,0):(this._seriesSource.modifySeries((0,p.decodeExtendedSymbol)(e.symbol),(0,v.getServerInterval)(this._series.properties().childs().interval.value())),this._seriesSource.isStarted()||this._seriesSource.start())}_stopStudyOnServer(){null===this._seriesSource?super._stopStudyOnServer():this._seriesSource.stop()}_titleInParts(e,t,i,s){const r=this.symbolInfo();let n;if(r){if(n=r.name,le)switch(this._model.mainSeries().symbolTextSourceProxyProperty().value()){case"description":n=r.description;break;case"ticker-and-description":n=`${r.name}, ${r.description}`}const e=!s&&(0,h.getStudySymbolExchange)(r);if(e)return[n,[e]]}else n=he?"":this.properties().childs().inputs.childs().symbol.value();return[n]}_onAllowExtendTimeScaleChanged(){const e=this.isStarted();if(e&&this.stop(!0),ce&&this.properties().childs().allowExtendTimeScale.value()){this._seriesSource=new f.SeriesDataSource(this._model.chartApi(),"st_o_");const e=this._seriesSource.dataEvents();e.seriesError().subscribe(this,(e=>{this._onStudyError(this._convertSeriesErrorToStudy(e))})),e.loading().subscribe(this,this._onStudyLoading),e.completed().subscribe(this,(e=>{this._onStudyCompleted(e.time)})),e.dataUpdated().subscribe(this,(()=>{this._studyModified=!1;const e=this._model.paneForSource(this);this._model.recalculatePane(e,(0,x.sourceChangeEvent)(this.id())),this._updateSources(),this.priceRangeReady()||this._enablePriceRangeReady()}))}else{if(null!==this._seriesSource){const e=this._seriesSource.dataEvents();e.seriesError().unsubscribeAll(this),e.loading().unsubscribeAll(this),e.completed().unsubscribeAll(this),e.dataUpdated().unsubscribeAll(this),this._seriesSource.destroy()}this._seriesSource=null}e&&this.start(!0)}_convertSeriesErrorToStudy(e){return{error:e.error,ctx:e.ctx,solution_id:e.solution_id}}_setSymbolParamsInternal(e,t){const{symbol:i,currency:s,unit:r,style:n}=e,o=this.properties().childs(),a=o.inputs.childs().symbol.value(),l=o.currencyId.value(),c=o.unitId.value(),d=o.style.value();if(void 0!==i&&i!==a&&o.inputs.childs().symbol.setValueSilently(i),void 0!==s&&s!==l&&o.currencyId.setValueSilently(s),void 0!==r&&r!==c&&o.unitId.setValueSilently(r),void 0!==n&&o.style.setValueSilently(n),t)this._resolvedSymbolsByInput[this.symbol()]=t,this._resolvedSymbols[this._getSymbolForResolve(this.symbol())]=t,this._realignToolsLastParams=null;else{const e=this.symbolInfo();null!==e&&(o.currencyId.setValueSilently((0,h.symbolCurrency)(e)),o.unitId.setValueSilently((0,h.symbolUnit)(e,this._model.unitConversionEnabled())))}o.inputs.childs().symbol.value()!==a&&o.inputs.childs().symbol.listeners().fire(o.inputs.childs().symbol),o.currencyId.value()!==l&&o.currencyId.listeners().fire(o.currencyId), -o.unitId.value()!==c&&o.unitId.listeners().fire(o.unitId),o.style.value()!==d&&o.style.listeners().fire(o.style),this._checkStyle(),this._realignLineToolsIfParamsChanged()}_updateBarFunction(){this._barFunction=(0,a.barFunctionByStyle)(this.style(),this.priceSource())}_onChartStyleChanged(){var e;this._updateBarFunction(),(null===(e=this._styleToRecover)||void 0===e?void 0:e.originalStyle)!==this.style()&&(this._styleToRecover=null)}_checkStyle(){const e=this.style();(0,h.isCloseBasedSymbol)(this.symbolInfo())?(0,h.isSingleValueBasedStyle)(e)||(this.setStyle(2),this._styleToRecover={correctedStyle:this.style(),originalStyle:e}):null!==this._styleToRecover&&(this.setStyle(this._styleToRecover.originalStyle),this._styleToRecover=null)}_realignLineToolsIfParamsChanged(){const e=this.symbol(),t=this.interval(),i=this.currency(),s=this.unit();null!==this._realignToolsLastParams&&this._realignToolsLastParams.symbol===e&&this._realignToolsLastParams.interval===t&&this._realignToolsLastParams.currency===i&&this._realignToolsLastParams.unit===s||(this._model.realignLineTools(this),this._realignToolsLastParams={symbol:e,interval:t,currency:i,unit:s})}}},1140:(e,t,i)=>{"use strict";i.d(t,{applyOverridesToStudy:()=>c,applyOverridesToStudyDefaults:()=>h});var s=i(50151),r=i(83421);const n=(0,i(98351).getLogger)("Chart.Model.StudyPropertiesOverrider");var o,a;function l(e,t,i,s){const r=i.split(".");if(0===r.length||0===r[0].length)return;const l=function(e){const t=e.split(":");return{name:t[0],type:2===t.length?t[1]:null}}(r[0]),c=l.name,h=l.type,d=null!==h,u=!d||"band"===h,p=!d||"area"===h,_=!d||"input"===h,m=!d||"plot"===h?a.getPlotIdByTitle(e,c):null,g=u?a.getBandIndexByName(e,c):null,f=p?a.getFilledAreaIdByTitle(e,c):null,v=_?a.getInputByName(e,c):null,S=t.hasOwnProperty(c);if((null!==m?1:0)+(null!==g?1:0)+(null!==f?1:0)+(null!==v?1:0)+(S?1:0)>1)return void n.logWarn(`Study '${e.description}' has ambiguous identifier '${c}'`);const y=r[1];if(null!==m){if(1===r.length)return void n.logWarn(`Path of sub-property of '${c}' plot for study '${e.description}' must be not empty`);const i=r.slice(1);o.applyPlotProperty(e,t,m,i,s)}else if(null!==v)o.applyInputValue(t,v,s);else if(null!==g){if(void 0===y)return void n.logWarn(`Property name of '${c}' band for study '${e.description}' must be set`);o.applyBandProperty(t,g,y,s)}else if(null!==f){if(void 0===y)return void n.logWarn(`Property name of '${c}' area for study '${e.description}' must be set`);o.applyFilledAreaProperty(t,f,y,s)}else S?o.setRootProperty(t,r,s):n.logWarn(`Study '${e.description}' has no plot or input '${c}'`)}function c(e,t){const i=e.properties(),s=i.state();for(const i in t)t.hasOwnProperty(i)&&l(e.metaInfo(),s,i,t[i]);i.mergeAndFire(s)}function h(e,t,i){for(const s in e){if(!e.hasOwnProperty(s))continue;const r=s.indexOf(".");if(-1===r)continue;const o=s.substring(0,r),c=a.getMetaInfoByDescription(t,o);if(null===c){n.logWarn(`There is no such study ${o}`);continue}const h=i(c) -;null!==h?l(c,h,s.substring(r+1),e[s]):n.logWarn(`Cannot apply overrides for study ${o}`)}}!function(e){const t={line:r.LineStudyPlotStyle.Line,histogram:r.LineStudyPlotStyle.Histogram,cross:r.LineStudyPlotStyle.Cross,area:r.LineStudyPlotStyle.Area,columns:r.LineStudyPlotStyle.Columns,circles:r.LineStudyPlotStyle.Circles,line_with_breaks:r.LineStudyPlotStyle.LineWithBreaks,area_with_breaks:r.LineStudyPlotStyle.AreaWithBreaks,step_line:r.LineStudyPlotStyle.StepLine,step_line_with_breaks:r.LineStudyPlotStyle.StepLineWithBreaks};e.applyPlotProperty=function(e,i,o,a,l){if(void 0===i.styles)return void n.logWarn("Study does not have styles");const c=a[0];if("color"===c){const t=function(e,t,i){if(void 0===e.plots)return null;for(const s of e.plots){if(!(0,r.isPaletteColorerPlot)(s)||void 0===t.palettes)continue;const e=t.palettes[s.palette];if(s.target===i&&void 0!==e)return e}return null}(e,i,o);return void function(e,t,i,r,o){var a;void 0!==e.styles?null===t&&!isNaN(r)&&r>0?n.logWarn(`Study plot does not have color #${r}`):((0===r||isNaN(r))&&((0,s.ensureDefined)(e.styles[i]).color=String(o),r=0),null!==t&&((0,s.ensureDefined)(null===(a=t.colors)||void 0===a?void 0:a[r]).color=String(o))):n.logWarn("Study does not have styles")}(i,t,o,a.length>1?parseInt(a[1]):NaN,l)}const h=i.styles[o];if(void 0!==h&&h.hasOwnProperty(c)){if("plottype"===c){const e=t[String(l)];if(void 0===e)return void n.logWarn(`Unsupported plot type for plot: ${l}`);l=e}h[c]=l}else n.logWarn(`Study plot does not have property '${c}'`)},e.applyBandProperty=function(e,i,s,r){if(void 0===e.bands)return void n.logWarn("Study does not have bands");const o=e.bands[i];if(void 0!==o&&o.hasOwnProperty(s)){if("plottype"===s){const e=t[String(r)];if(void 0===e)return void n.logWarn(`Unsupported plot type for band: ${r}`);r=e}o[s]=r}else n.logWarn(`Study band does not have property '${s}'`)},e.applyFilledAreaProperty=function(e,t,i,s){if(void 0===e.filledAreasStyle)return void n.logWarn("Study does not have areas");const r=e.filledAreasStyle[t];void 0!==r&&r.hasOwnProperty(i)?r[i]=s:n.logWarn(`Study area does not have property '${i}'`)},e.applyInputValue=function(e,t,i){void 0!==e.inputs&&e.inputs.hasOwnProperty(t)?e.inputs[t]=i:n.logWarn(`Study does not have input '${t}'`)},e.setRootProperty=function(e,t,i){if(0===t.length)return;let s=e;for(const e of t.slice(0,-1)){if(null==s||!s.hasOwnProperty(e))break;s=s[e]}const r=t[t.length-1];null!=s&&s.hasOwnProperty(r)?s[r]=i:n.logWarn(`Study does not have property ${t.join(".")}`)}}(o||(o={})),function(e){e.getInputByName=function(e,t){if(void 0===e.inputs)return null;t=t.toLowerCase();for(const i of e.inputs)if(i.name.toLowerCase()===t)return i.id;return null},e.getPlotIdByTitle=function(e,t){if(void 0===e.styles)return null;t=t.toLowerCase();for(const i in e.styles){const s=e.styles[i];if((void 0!==s&&void 0!==s.title?s.title:i).toLowerCase()===t)return i}return null},e.getFilledAreaIdByTitle=function(e,t){if(void 0===e.filledAreas)return null;t=t.toLowerCase() -;for(const i of e.filledAreas)if(i.title.toLowerCase()===t)return i.id;return null},e.getBandIndexByName=function(e,t){if(void 0===e.bands)return null;t=t.toLowerCase();for(let i=0;i{"use strict";var s=i(26867),r=i(1930).symbolTitle,n=i(2250).StudyBarColorer,o=i(88552).PlotList,a=i(76422),l=i(83421),c=i(51332).studyPlotFunctionMap,h=i(51332).studyEmptyPlotValuePredicate,d=i(2484),u=i(91217).StudyBase,p=i(38031).colorToInteger,_=i(98351).getLogger("Chart.Study"),m=d.enabled("datasource_copypaste"),g=d.enabled("study_symbol_ticker_description"),f=d.enabled("hide_unresolved_symbols_in_legend");function v(e,t){return e&&e[t]&&e[t].hasOwnProperty("showLast")?e[t].showLast.value():null}class S extends u{constructor(e,t,i,r){super(e,t,i,r),this._resolvedSymbols={},this._chartApi=e._chartApi,this._plotFields=[];var n=this.metaInfo().plots;if(n)for(var a=0,u=n.length;a=0?c:l}return l}if(this._metaInfo.isTVScript||this._metaInfo.pine){if("text"===i)return this._metaInfo.defaults.inputs.text;if("pineId"===i)return this._metaInfo.scriptIdPart;if("pineVersion"===i)return this._metaInfo.pine?this._metaInfo.pine.version:"-1";if("color"===e.type&&this._metaInfo.isRGB){var h=this._properties.inputs[i].value();return p(h)}if("price"===e.type){var d=this._properties.inputs[i].value();return t.priceInputsForDisplay?this.formatter().format(d):d}return this._properties.inputs[i].value()}return this._properties.inputs[i].value()}priceLabelText(e){var t,i=this._metaInfo.styles,s=this._metaInfo.ohlcPlots;i&&i[e]&&(t=i[e]),s&&s[e]&&(t=s[e]);var r=t.title;return 1!==this._simplePlotsCount||l.isPlotTitleDefined(r)?this._metaInfo.is_price_study&&r!==this._metaInfo.shortDescription?""===r?this._metaInfo.shortDescription:this._metaInfo.shortDescription+":"+r:r:this._metaInfo.shortDescription}data(){return this.m_data}graphics(){return this._graphics}moveData(e){this._ongoingDataUpdate=this._ongoingDataUpdate.then(function(){this._invalidateLastNonEmptyPlotRowCache(),this.data().move(e)}.bind(this))}replaceData(e,t,i){this._invalidateLastNonEmptyPlotRowCache(),this.data().remove(e+1),this.data().addTail(i,t)}static offset(e,t){var i=0;return e._plotOffsets&&void 0!==e._plotOffsets[t]&&(i+=e._plotOffsets[t]),e.properties().offsets&&void 0!==e.properties().offsets[t]&&(i+=e.properties().offsets[t].val.value()),e.properties().offset&&(i+=e.properties().offset.val.value()),i}offset(e){return S.offset(this,e)}_showLastValueOnPriceScale(){return this._model.properties().scalesProperties.showStudyLastValue.value()}barColorer(){const e=this._metaInfo.plots;let t=null;for(let i=0;i=0&&(e="_v"+this._metaInfo.pine.version),{symbol:this.series().actualSymbol(), -resolution:this.series().interval(),study:this._metaInfo.shortId+e}}_sendTelemetryReport(e,t,i){void 0===i&&(i=this._getTelemetryAdditionalData());var s=Object.assign(t,{additional:i});undefined.sendChartReport(e,s)}_sendTelemetryCounter(e,t){this._sendTelemetryReport(e,{count:1},t)}onAboutToBeDestroyed(){return this._aboutToBeDestroyed}destroy(){this._aboutToBeDestroyed.fire(),this._isDestroyed=!0,null!==this._definitionsViewModel&&(this._definitionsViewModel.destroy(),this._definitionsViewModel=null),this._properties.precision.listeners().unsubscribe(this,this._precisionChanged),this._showStudyArgumentsProperty.listeners().unsubscribe(this,this.invalidateTitleCache),this._properties.description.listeners().unsubscribe(this,this.invalidateTitleCache),this._properties.shortDescription&&this._properties.shortDescription.listeners().unsubscribe(this,this.invalidateTitleCache),this._model.mainSeries().dataEvents().symbolResolved().unsubscribeAll(this),this.hasBarColorer()&&this._properties.visible.listeners().unsubscribe(this._model.mainSeries(),this._model.mainSeries().invalidateBarStylesCache),this._model.mainSeries().dataEvents().symbolResolved().unsubscribe(this,this._recreatePriceFormattingDependencies),void 0!==this._properties.offsets&&this._properties.offsets.listeners().unsubscribe(this,this._updateMaxOffsetValue),void 0!==this._properties.offset&&this._properties.offset.listeners().unsubscribe(this,this._updateMaxOffsetValue),super.destroy()}desiredPriceScalePosition(){return this.metaInfo().isTVScriptStub?"overlay":this.metaInfo().linkedToSeries?"as-series":void 0===this.metaInfo().priceScale?null:["right","left","overlay"][this.metaInfo().priceScale]}guiPlotName(e){var t=this.properties().styles;return t&&t[e]&&t[e].title?t[e].title.value():this.title()}formatterChanged(){return this._formatterChanged}copiable(){return m&&!this.isChildStudy()}setPriceScale(e){super.setPriceScale(e),a.emit("study_event",this.id(),"price_scale_changed")}}TradingView.Study=S,t.Study=S},23387:(e,t,i)=>{"use strict";i.d(t,{plotShapesData:()=>r});var s=i(44352);const r={shape_arrow_down:{guiName:s.t(null,void 0,i(48732)),id:"shape_arrow_down",paneRendererClass:"PaneRendererArrowDown",pineName:"shape.arrowdown",icon:"arrow_down"},shape_arrow_up:{guiName:s.t(null,void 0,i(10650)),id:"shape_arrow_up",paneRendererClass:"PaneRendererArrowUp",pineName:"shape.arrowup",icon:"arrow_up"},shape_circle:{guiName:s.t(null,void 0,i(90068)),id:"shape_circle",paneRendererClass:"PaneRendererCircleShape",pineName:"shape.circle",icon:"circle"},shape_cross:{guiName:s.t(null,void 0,i(29908)),id:"shape_cross",paneRendererClass:"PaneRendererCrossShape",pineName:"shape.cross",icon:"cross"},shape_diamond:{guiName:s.t(null,void 0,i(73720)),id:"shape_diamond",paneRendererClass:"PaneRendererDiamond",pineName:"shape.diamond",icon:"diamond"},shape_flag:{guiName:s.t(null,void 0,i(21524)),id:"shape_flag",paneRendererClass:"PaneRendererFlagShape",pineName:"shape.flag",icon:"flag"},shape_label_down:{guiName:s.t(null,void 0,i(18528)),id:"shape_label_down", -paneRendererClass:"PaneRendererLabelDown",pineName:"shape.labeldown",icon:"label_down"},shape_label_up:{guiName:s.t(null,void 0,i(13046)),id:"shape_label_up",paneRendererClass:"PaneRendererLabelUp",pineName:"shape.labelup",icon:"label_up"},shape_square:{guiName:s.t(null,void 0,i(44904)),id:"shape_square",paneRendererClass:"PaneRendererSquare",pineName:"shape.square",icon:"square"},shape_triangle_down:{guiName:s.t(null,void 0,i(83356)),id:"shape_triangle_down",paneRendererClass:"PaneRendererTriangleApexDown",pineName:"shape.triangledown",icon:"triangle_down"},shape_triangle_up:{guiName:s.t(null,void 0,i(28340)),id:"shape_triangle_up",paneRendererClass:"PaneRendererTriangleApexUp",pineName:"shape.triangleup",icon:"triangle_up"},shape_xcross:{guiName:s.t(null,void 0,i(7050)),id:"shape_xcross",paneRendererClass:"PaneRendererXCross",pineName:"shape.xcross",icon:"x_cross"}}},31359:(e,t,i)=>{"use strict";var s=i(51664).Version,r=i(98351).getLogger("Chart.StudyMigration");function n(e){this._studyId=e,this._maxToVers=s.ZERO,this._maxFromVers=s.ZERO,this._migrs=[]}n.prototype.addMigration=function(e,t,i){var r=s.parse(e),n=s.parse(t);r.isGreater(this._maxFromVers)&&(this._maxFromVers=r),n.isGreater(this._maxToVers)&&(this._maxToVers=n),this._migrs.push({fromVers:r,toVers:n,rules:i})},n.prototype.updateInputs=function(e,t,i){if(!i)return i;for(var s=TradingView.clone(i),n=e;n.isLess(t);){var o=this._findMigration(n);if(null==o)break;if(r.logNormal("Migrating study inputs from "+o.fromVers+" to "+o.toVers+" version, studyId: "+this._studyId+", migration: "+JSON.stringify(o)+", inputs: "+JSON.stringify(i)),s=this._applyMigration(s,o),!n.isLess(o.toVers))throw new Error("Problems in study migration process... Possible infinite cycle has been detected and stopped.");n=o.toVers}return n>e&&r.logNormal("Study inputs migration is done, studyId: "+this._studyId+", inputs: "+JSON.stringify(s)),s},n.prototype._findMigration=function(e){for(var t=-1,i=this._maxFromVers,s=0;s=0||t.indexOf(e)>=0},n._applyInputChangedMinMaxRule=function(e,t){if("adjustValIfNeeded"!==t.action)throw new Error("Unknown action "+t.action+" for rule with type "+t.type);var i=e[t.inputId];return it.maxVal&&(e[t.inputId]=t.maxVal),r.logNormal("Input "+t.inputId+"="+i+" adjusted to value "+e[t.inputId]),e},n._applyInputChangedOptionsRule=function(e,t){if(!(["text"].indexOf(t.inputType)>=0&&"resetToDefValIfNeeded"===t.action))throw new Error("Unexpected rule.inputType="+t.inputType+" in rule.action="+t.action);var i=e[t.inputId];return t.options.indexOf(i)<0&&(e[t.inputId]=t.defVal,r.logNormal("Input "+t.inputId+"="+i+" reset to default value "+t.defVal)),e},e.exports=n},89895:(e,t,i)=>{"use strict";var s=i(13850).OverlayLegendValuesProvider,r=i(41365).OverlayStatusProvider,n=i(51182).StudyOverlayBase;t.study_Overlay=class extends n{constructor(e,t,i,s){super(e,t,i,s),this._paneView=null;var r=this;this.properties().minTick.listeners().subscribe(null,(function(){r._recreatePriceFormattingDependencies(),r.updateAllViews(),r._model.fullUpdate()}))}_showLastValueOnPriceScale(){return this._model.properties().scalesProperties.showSeriesLastValue.value()}_onQuotesUpdate(e,t){!this._legendView||void 0===t.values.change&&void 0===t.values.change_percent||(this._legendView.update(),this._model.updateSource(this))}destroy(){this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._quotesProvider.destroy(),super.destroy()}tags(){var e=[],t=this.symbolInfo();return t?e.push(t.name):this._properties.inputs.symbol.value()&&e.push(this._properties.inputs.symbol.value()),e}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6803),i.e(6682),i.e(892),i.e(8622),i.e(4785),i.e(607)]).then(i.bind(i,4621))).StudyOverlayDefinitionsViewModel}defaultPlotIdForAlert(){return""}valuesProvider(){return new s(this,this.model())}statusProvider(e){return new r(this,this.model())}}},61524:(e,t,i)=>{"use strict";var s=i(50151).assert,r=i(65665).clone,n=i(68927).Study,o=i(88552).PlotList,a=i(51332).studyPlotFunctionMap,l=i(51332).studyEmptyPlotValuePredicate;class c{constructor(e,t,i){this._strategyPlotIndex=e,this._targetPlotIndex=t,this._startIndex=i}rebuildData(e){var t=this._targetPlotIndex+1,i=this._strategyPlotIndex+1,s=null,r=null;e.range(this._startIndex||e.firstIndex(),e.lastIndex()).each((function(n,o){ -var a=o[t],l=o[i]?Math.round(o[i]):null;if(o[t]=null,o[i]=null,!l||l>0)return!1;var c=n+l,h={pointIndex:c,value:a};if(r){if(r.pointIndex!==h.pointIndex){c>=0&&(e.valueAt(c)[t]=a);var d=!1;s&&(d=s.value<=r.value&&r.value<=a||s.value>=r.value&&r.value>=a),d?r.pointIndex>=0&&(e.valueAt(r.pointIndex)[t]=null):s=r,r=h}}else r=h;return!1}))}}t.study_ScriptWithDataOffset=class extends n{constructor(e,t,i,s){super(e,t,i,s),this._underlyingData=new o(a(s),l)}clearData(){super.clearData(),this._underlyingData.clear()}_mergeData(e){this._invalidateLastNonEmptyPlotRowCache();var t=this._underlyingData.firstIndex();this._underlyingData.merge(e),t!==this._underlyingData.firstIndex()&&(this.m_data=new o(a(this._metaInfo),l));var i=this.m_data.lastIndex();this._underlyingData.range(i,this._underlyingData.lastIndex()).each(function(e,t){return this.m_data.add(e,r(t)),!1}.bind(this)),this._plotsForStrategyProcessing().forEach((function(e){new c(e.strategyIndex,e.targetIndex,i).rebuildData(this.m_data)}),this)}_plotsForStrategyProcessing(){var e=[];return this._metaInfo.plots.forEach((function(t,i){if("dataoffset"===t.type){var r=this._metaInfo.plots.findIndex((function(e){return e.id===t.target}));s(r>=0,"target plot not found for strategy plot "+t.id);var n={strategyIndex:i,targetIndex:r};e.push(n)}}),this),e}}},81685:(e,t,i)=>{"use strict";i.d(t,{StudyVersioning:()=>p});var s=i(31359),r=i.n(s);const n=(0,i(98351).getLogger)("Chart.Study.Versioning");var o=i(50151).assert,a=i(51664).Version,l=i(76861),c=i(58403).StudyMetaInfo,h=i(14905).extractPineId,d=i(43654).migrateMetaInfoAndPropState;const u=1e12;class p extends class{constructor(e,t){if(this._migrations={},!e)throw new Error("No studies metainfo");if(this._studiesMetainfo=e,!t)throw new Error("No studies migrations");this._studiesMigrations=t;for(let e=0;e{if(0===this._studiesMetainfo.length||!e.isTVScript||e.version>=22)return t;const i={};let s=0,r=0,n=t[r];for(;void 0!==n;){const e=t[n.id];n.isFake&&(n.id="in_"+s++),i[r]=n,i[n.id]=e,r++,n=t[r]}return i}]}}{updateMetaInfo(e){if(!e)return e;o(!e.isTVScript,"This method should update only built-in java indicators metaInfo. For Pine indicators use updateMetaInfoAsync");for(var t=null,i=this._studiesMetainfo,s=0;s=12&&a<=26){var l={};for(o=0;o=12&&a<=26){var h=r.columns;r.columns=[];for(var d=0;d1e12&&n.logWarn("Bad integer input max value in metaInfo id="+e.id+" title="+e.description))}}static _fixInputsMaxValue(e,t){if(!TradingView.isAbsent(t)){var i=u;if(t.inputs)for(var s=0;si&&(a.max=i))}if(e&&e.inputs){var r=p.splitInputs(e.inputs),n=r.arr;for(var o in n){var a -;"integer"===(a=n[o]).type&&(a.max&&a.max>i&&(a.max=i))}e.inputs=TradingView.merge(r.obj,r.arr)}}}patchPropsStateAndMetaInfo(e,t,i){"Script$BOOKER"!==t.productId||t.alerts||delete e.alerts,p._fixInputsOrder(e,t),p._fixInputsMaxValue(e,t);var s=p.splitInputs(e.inputs);e.inputs=s.obj;var r=c.versionOf(t);ri&&(i=r))}e[i+1]=t}static splitInputs(e){var t={},i={};for(var s in e)isNumber(parseInt(s,10))?t[s]=e[s]:i[s]=e[s];return{arr:t,obj:i}}static findInputKeyById(e,t){var i=null;for(var s in e)if(isNumber(parseInt(s,10))&&e[s].id===t){i=s;break}return i}static getInputKeyById(e,t){var i=p.findInputKeyById(e,t);if(!i)throw new Error("Cannot find input with id: "+t);return i}}},12272:(e,t,i)=>{ -"use strict";i.d(t,{translateSessionDescription:()=>n,translateSessionShortDescription:()=>a});var s=i(44352);const r=new Map([["Premarket",s.t(null,{context:"sessions"},i(56935))],["Postmarket",s.t(null,{context:"sessions"},i(98801))],["Regular Trading Hours",s.t(null,{context:"sessions"},i(24380))],["Extended Trading Hours",s.t(null,{context:"sessions"},i(97442))],["Electronic Trading Hours",s.t(null,{context:"sessions"},i(75610))]]);function n(e){var t;return null!==(t=r.get(e))&&void 0!==t?t:e}const o=new Map([["Premarket",s.t(null,{context:"sessions"},i(56137))],["Postmarket",s.t(null,{context:"sessions"},i(32929))],["Regular Trading Hours",s.t(null,{context:"sessions"},i(63798))],["Extended Trading Hours",s.t(null,{context:"sessions"},i(33021))],["Electronic Trading Hours",s.t(null,{context:"sessions"},i(33021))]]);function a(e){var t;return null!==(t=o.get(e))&&void 0!==t?t:e}},90854:(e,t,i)=>{"use strict";i.d(t,{areEqualSymbols:()=>o,symbolSameAsCurrent:()=>l,unitsAreSame:()=>c,currenciesAreSame:()=>h});var s=i(2484),r=i(1930);const n=s.enabled("uppercase_instrument_names");function o(e,t){return void 0===e?void 0===t:void 0!==t&&(n?e.toUpperCase()===t.toUpperCase():e===t)}function a(e,t){return e.some((e=>o(t,e)))}function l(e,t){if(null===t)return!1;if(t){if(o(t.full_name,e)||o(t.pro_name,e))return!0;if(o(t.ticker,e))return!0;if(t.aliases&&a(t.aliases,e))return!0;if(t.alternatives&&a(t.alternatives,e))return!0;if(0===e.indexOf("FRA:")&&o(t.pro_name,e.replace("FRA:","FWB:")))return!0}return!1}function c(e,t,i){return null===e&&!(0,r.isConvertedToOtherUnit)(t,i)||e===(0,r.symbolUnit)(t,i)}function h(e,t){return null===e&&!(0,r.isConvertedToOtherCurrency)(t)||e===(0,r.symbolCurrency)(t)}},40858:(e,t,i)=>{"use strict";i.d(t,{TextWidthCache:()=>s});class s{constructor(e=150){this._actualSize=0,this._usageTick=1,this._oldestTick=1,this._tick2Labels=new Map,this._cache=new Map,this._maxSize=e}reset(){this._actualSize=0,this._cache.clear(),this._usageTick=1,this._oldestTick=1,this._tick2Labels.clear()}measureText(e,t){return this.getMetrics(e,t).width}yMidCorrection(e,t){const i=this.getMetrics(e,t);return"actualBoundingBoxAscent"in i&&"actualBoundingBoxDescent"in i?(i.actualBoundingBoxAscent-i.actualBoundingBoxDescent)/2:0}getMetrics(e,t){const i=this._cache.get(t);if(void 0!==i)return i.metrics;if(this._actualSize===this._maxSize){const e=this._tick2Labels.get(this._oldestTick);this._tick2Labels.delete(this._oldestTick),this._cache.delete(e),this._oldestTick++,this._actualSize--}e.save(),e.textBaseline="middle";const s=e.measureText(t);return e.restore(),0===s.width&&t.length||(this._cache.set(t,{metrics:s,tick:this._usageTick}),this._tick2Labels.set(this._usageTick,t),this._actualSize++,this._usageTick++),s}}},99299:(e,t,i)=>{"use strict";var s=i(26867);function r(){this._marksByIndex=new Map,this._marksBySpan=[],this.changed=new s,this.minIndex=void 0,this.maxIndex=void 0}r.prototype.reset=function(){this._resetImpl(),this.changed.fire()},r.prototype._resetImpl=function(){this._marksByIndex=new Map, -this._marksBySpan=[],this.minIndex=void 0,this.maxIndex=void 0,this._cache=void 0},r.prototype.merge=function(e){if(0!==e.length){var t=e[0].index,i=e[e.length-1].index;t<=this.minIndex&&i>=this.maxIndex&&this._resetImpl();for(var s=this._marksBySpan,r=new Set,n=0;n=this.maxIndex&&this.maxIndex--,this.maxIndex2;){if(1e3*this._marksByIndex.get(t).time===e)return t;if(1e3*this._marksByIndex.get(i).time===e)return i;var s=Math.round((t+i)/2);1e3*this._marksByIndex.get(s).time>e?i=s:t=s}return t},r.prototype.build=function(e,t){var i=Math.ceil(t/e);if(this._maxbar===i&&this._cache)return this._cache;this._maxbar=i;for(var s=[],r=this._marksBySpan.length;r--;)if(this._marksBySpan[r]){var n=s;s=[];for(var o=n.length,a=0,l=this._marksBySpan[r],c=l.length,h=1/0,d=-1/0,u=0;u=i&&_-d>=i&&(s.push(p),d=_)}for(;ae.index>=i&&e.index<=s))}return{marks:t=t.map((function(e){ -return[e.span,e.time,e.index]})),version:2}},r.prototype.restoreState=function(e){if(this._marksByIndex=new Map,this._marksBySpan=[],this.maxIndex=void 0,this.minIndex=void 0,e&&e.marks&&e.marks.length)if(2===e.version){var t=e.marks.map((function(e){return{span:e[0],time:e[1],index:e[2]}}));this.merge(t)}else this.merge(e.marks)},e.exports.Tickmarks=r},2893:(e,t,i)=>{"use strict";i.d(t,{TimeAxisView:()=>o});var s=i(38031),r=i(83499);class n{constructor(){this._data=null}setData(e){this._data=e}draw(e,t,i){if(null===this._data||!this._data.visible||0===this._data.text.length)return;const s=this._data;e.font=t.font;const n=Math.round(t.widthCache.measureText(e,s.text));if(n<=0)return;e.save();const o=t.paddingHorizontal,a=n+2*o,l=a/2;let c=s.coordinate,h=Math.floor(c-l)+.5;if(s.alwaysInViewPort){const e=s.width;h<0?(c+=Math.abs(0-h),h=Math.floor(c-l)+.5):h+a>e&&(c-=Math.abs(e-(h+a)),h=Math.floor(c-l)+.5)}const d=h+a,u=Math.ceil(0+t.borderSize+t.offsetSize+t.paddingTop+t.fontSize+t.paddingBottom);e.fillStyle=s.background;const p=Math.round(h*i),_=Math.round(0*i),m=Math.round(d*i),g=Math.round(u*i),f=Math.round(2*i);e.beginPath(),e.moveTo(p,_),e.lineTo(p,g-f),e.arcTo(p,g,p+f,g,f),e.lineTo(m-f,g),e.arcTo(m,g,m,g-f,f),e.lineTo(m,_),e.fill();const v=0+t.borderSize+t.offsetSize+t.paddingTop+t.fontSize/2;e.textAlign="left",e.textBaseline="middle",e.fillStyle=s.color;const S=t.widthCache.yMidCorrection(e,"Apr0");e.translate((h+o)*i,(v+S)*i),(0,r.drawScaled)(e,i,(()=>e.fillText(s.text,0,0))),e.restore()}}class o{constructor(e){this._renderer=new n,this._rendererData={background:"",color:"",coordinate:0,text:"",visible:!1,width:0,alwaysInViewPort:!0},this._invalidated=!0,this._model=e,this._renderer.setData(this._rendererData)}update(){this._invalidated=!0}renderer(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer}coordinate(){return this._rendererData.coordinate}_getAlwaysInViewPort(){return!0}_getText(e){const t=this._model.timeScale().indexToUserTime(e);return null!==t?this._model.dateTimeFormatter().format(t):""}_updateImpl(){const e=this._rendererData;if(e.visible=!1,this._model.timeScale().isEmpty()||!this._isVisible())return;const t=this._getIndex();null!==t&&(e.visible=!0,e.width=this._model.timeScale().width(),e.background=this._getBgColor(),e.color=(0,s.colorFromBackground)(e.background),e.coordinate=this._model.timeScale().indexToCoordinate(t),e.alwaysInViewPort=this._getAlwaysInViewPort(),e.text=this._getText(t),this._invalidated=!1)}}},33143:(e,t,i)=>{"use strict";i.d(t,{INVALID_TIME_POINT_INDEX:()=>s,UNPLOTTABLE_TIME_POINT_INDEX:()=>r});const s=-2e6,r=-1e6},51620:(e,t,i)=>{"use strict";i.d(t,{timeHoursFormatProperty:()=>a,restoreTimeHoursFormatSettingsValue:()=>l});var s=i(56840),r=i(60923);const n="time_hours_format";function o(){return s.getValue(n,"24-hours")}const a=(0,r.createPrimitiveProperty)(o());function l(){a.setValue("24-hours"),s.remove(n)}s.onSync.subscribe(null,(()=>a.setValue(o()))),a.subscribe(null,(()=>s.setValue(n,a.value())))},94030:(e,t,i)=>{"use strict" -;i.r(t),i.d(t,{MINUTE_SPAN:()=>s,HOUR_SPAN:()=>r,DAY_SPAN:()=>n,WEEK_SPAN:()=>o,MONTH_SPAN:()=>a,YEAR_SPAN:()=>l,DEFAULT_BAR_SPACING:()=>c});const s=20,r=30,n=40,o=50,a=60,l=70,c=6},74914:(e,t,i)=>{"use strict";i.d(t,{getHourMinuteFormat:()=>r,getHourMinuteSecondFormat:()=>n,getTimeFormatForInterval:()=>o});var s=i(78831);function r(e){return"12-hours"===e?s.twelveHourMinuteFormat:s.hourMinuteFormat}function n(e){return"12-hours"===e?s.twelveHourMinuteSecondFormat:s.hourMinuteSecondFormat}function o(e,t){return e.isSeconds()||e.isTicks()?n(t):r(t)}},28729:(e,t,i)=>{"use strict";i.d(t,{trackDrawingCreated:()=>r,trackDrawingPasted:()=>n,trackDrawingCloned:()=>o,trackChartStyleChanged:()=>a});i(50151),i(77906);function s(e,t){0}function r(e){s()}function n(e){s()}function o(e){s()}function a(e){0}},12205:(e,t,i)=>{"use strict";i.d(t,{translatedIntervalString:()=>r});var s=i(92133);function r(e){const t=(0,s.getTranslatedResolutionModel)(e,!0);return null===t?e:t.multiplier+(t.mayOmitShortKind?"":t.shortKind)}},24557:(e,t,i)=>{"use strict";i.d(t,{ApplyLineToolTemplateUndoCommand:()=>r});var s=i(71733);class r extends s.UndoCommand{constructor(e,t,i){super(i),this._source=e,this._newState=t,this._oldState=e.properties().state()}redo(){this._source.applyTemplate(this._newState)}undo(){this._source.applyTemplate(this._oldState)}}},65071:(e,t,i)=>{"use strict";i.d(t,{ExcludeLineToolsFromGroupUndoCommand:()=>l});var s=i(50151),r=(i(93731),i(44352)),n=i(47539),o=i(71733);const a=new n.TranslatedString("exclude line tools from group {group}",r.t(null,void 0,i(63391)));class l extends o.UndoCommand{constructor(e,t,i){super(a.format({group:t.name()})),this._model=e,this._groupId=t.id,this._groupName=t.name(),this._lineToolsIds=i.map((e=>e.id()))}redo(){const e=(0,s.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId)),t=this._lineToolsIds.map((e=>this._model.dataSourceForId(e)));e.excludeLineTools(t),0===e.lineTools().length&&this._model.lineToolsGroupModel().removeGroup(e)}undo(){const e=this._lineToolsIds.map((e=>this._model.dataSourceForId(e))),t=this._model.lineToolsGroupModel().groupForId(this._groupId);null!==t?t.addLineTools(e):this._model.lineToolsGroupModel().createGroup(e,this._groupName,this._groupId)}}},11426:(e,t,i)=>{"use strict";i.d(t,{MergeUpUndoCommand:()=>o,MergeDownUndoCommand:()=>a,MergeToTargetPane:()=>l});var s=i(50151),r=i(74879);class n extends r.MoveSourceUndoCommand{constructor(e,t,i,s){super(e,t,i),this._restorePane=!1,this._keepZOrder=null!=s&&s}redo(){const e=this._chartModel.panes().length,t=this._chartModel.panes()[this._targetPaneIndex()],i=(0,s.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),r=(0,s.ensureNotNull)(this._chartModel.paneForSource(i)),n=this._chartModel.children(i,!0);r.bulkActionMacro((()=>{n.forEach((e=>this._chartModel.detachSource(e))),this._restorePane=this._chartModel.detachSource(i)}));const o="overlay"===this._initialPriceScalePosition?this._initialPriceScalePosition:void 0,a=t.findSuitableScale(i,void 0,o),l=0===a.dataSources().length -;if(t.bulkActionMacro((()=>{t.addDataSource(i,a,this._keepZOrder),n.forEach((e=>t.addDataSource(e,a,this._keepZOrder)))})),i===this._chartModel.mainSeries()){const e=t.priceScalePosition(a);t.movePriceScale(a,e,0)}if(l){(0,s.ensureNotNull)(i.priceScale()).restoreState(this._newPriceScaleState(t.isOverlay(i)))}this._chartModel.fullUpdate(),e!==this._chartModel.panes().length&&this._chartModel.setShouldBeSavedEvenIfHidden(!0)}undo(){let e;e=this._restorePane?this._chartModel.createPane(this._initialPaneIndex):this._chartModel.panes()[this._initialPaneIndex];const t=(0,s.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),i=(0,s.ensureNotNull)(this._chartModel.paneForSource(t)),r=this._chartModel.children(t,!0);i.bulkActionMacro((()=>{r.forEach((e=>this._chartModel.detachSource(e))),this._chartModel.detachSource(t)}));let n=e.getPriceScaleById(this._initialPriceScaleId);null===n&&(n=e.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex)),e.bulkActionMacro((()=>{e.addDataSource(t,n,!0),r.forEach((t=>e.addDataSource(t,n,!1)))})),(0,s.ensureNotNull)(t.priceScale()).restoreState(this._originalPriceScaleState()),this._chartModel.fullUpdate()}}class o extends n{constructor(e,t,i){super(e,t,i)}_targetPaneIndex(){return this._initialPaneIndex-1}}class a extends n{constructor(e,t,i){super(e,t,i)}_targetPaneIndex(){return this._initialPaneIndex+1}}class l extends n{constructor(e,t,i,s,r){super(e,t,s,r),this._targetPane=i}_targetPaneIndex(){return this._targetPane}}},74879:(e,t,i)=>{"use strict";i.d(t,{MoveSourceUndoCommand:()=>n});var s=i(50151),r=i(71733);class n extends r.UndoCommand{constructor(e,t,i){super(i),this._chartModel=e,this._sourceId=t.id();const r=(0,s.ensureNotNull)(t.priceScale());this._initialPriceScaleId=r.id(),this._initialPriceScaleState=(0,s.ensureNotNull)(t.priceScale()).state();const n=(0,s.ensureNotNull)(e.paneForSource(t));this._initialPriceScalePosition=n.priceScalePosition(r),this._initialPriceScaleIndex=n.priceScaleIndex(r,this._initialPriceScalePosition),this._initialPaneIndex=e.panes().indexOf(n)}_newPriceScaleState(e){const t={...this._initialPriceScaleState};return delete t.m_isLockScale,delete t.id,delete t.m_topMargin,delete t.m_bottomMargin,t}_originalPriceScaleState(){return this._initialPriceScaleState}}},84267:(e,t,i)=>{"use strict";i.d(t,{MoveToNewPriceScaleUndoCommand:()=>o,MoveToExistingPriceScaleUndoCommand:()=>a});var s=i(50151),r=i(74879);class n extends r.MoveSourceUndoCommand{constructor(e,t,i,s){super(e,t,s),this._sourcePaneRemoved=!1,this._targetPaneIndex=e.panes().indexOf(i)}redo(){const e=this._chartModel.panes()[this._initialPaneIndex],t=this._chartModel.panes()[this._targetPaneIndex],i=e!==t,r=this._targetPriceScale(t),n=(0,s.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),o=this._chartModel.children(n,!0);for(const e of o)i?(this._chartModel.detachSource(e),t.addDataSource(e,r,!1)):t.move(e,r);i?(this._sourcePaneRemoved=this._chartModel.detachSource(n),t.addDataSource(n,r,!1)):t.move(n,r) -;const a=t.priceScalePosition(r);t.movePriceScale(r,a,this._targetPriceScaleIndex(n)),this._chartModel.fullUpdate()}undo(){this._sourcePaneRemoved&&this._chartModel.createPane(this._initialPaneIndex);const e=this._chartModel.panes()[this._initialPaneIndex],t=e!==this._chartModel.panes()[this._targetPaneIndex],i=(0,s.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId));let r=e.getPriceScaleById(this._initialPriceScaleId);null===r&&(r=e.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex));const n=this._chartModel.children(i,!0);for(const i of n)t?(this._chartModel.detachSource(i),e.addDataSource(i,r,!1)):e.move(i,r);t?(this._chartModel.detachSource(i),e.addDataSource(i,r,!1)):e.move(i,r),(0,s.ensureNotNull)(i.priceScale()).restoreState(this._originalPriceScaleState()),this._chartModel.fullUpdate()}}class o extends n{constructor(e,t,i,s,r){super(e,t,i,r),this._targetPriceScalePosition=s}_targetPriceScale(e){const t=e.createPriceScaleAtPosition(this._targetPriceScalePosition);return t.restoreState(this._newPriceScaleState("overlay"===this._targetPriceScalePosition)),t}_targetPriceScaleIndex(e){return e===this._chartModel.mainSeries()?0:void 0}}class a extends n{constructor(e,t,i,s,r){super(e,t,i,r),this._targetPriceScaleId=s.id()}_targetPriceScale(e){return(0,s.ensureNotNull)(e.getPriceScaleById(this._targetPriceScaleId))}_targetPriceScaleIndex(e){}}},8771:(e,t,i)=>{"use strict";i.d(t,{PriceScaleChangeUndoCommand:()=>h});var s=i(50151),r=i(44352),n=i(47539),o=i(98351),a=i(71733);const l=(0,o.getLogger)("Chart.ChartUndoModel"),c=new n.TranslatedString("scale price",r.t(null,void 0,i(47222)));class h extends a.UndoCommand{constructor(e,t,i,s,r){super(c,!1),this._newPriceScaleState=null,this._model=e,this._paneIndex=e.panes().indexOf(t),this._priceScaleId=i.id(),this._state=s,this._timestamp=r?performance.now():null}undo(){if(null!==this._newPriceScaleState)return void l.logDebug("PriceScaleChangeUndoCommand.undo: Command is already undone");const[e,t]=this._paneAndScale();this._newPriceScaleState=t.state(),this._model.restorePriceScaleState(e,t,this._state)}redo(){if(null===this._newPriceScaleState)return void l.logDebug("PriceScaleChangeUndoCommand.redo: Command is not undone");const[e,t]=this._paneAndScale();this._model.restorePriceScaleState(e,t,this._newPriceScaleState),this._newPriceScaleState=null}canMerge(e){return e instanceof h&&null!==this._timestamp&&null!==e._timestamp&&null===this._newPriceScaleState&&e._model===this._model&&e._paneIndex===this._paneIndex&&e._priceScaleId===this._priceScaleId&&Math.abs(e._timestamp-this._timestamp)<1e3}merge(e){this._timestamp=e._timestamp}_paneAndScale(){const e=this._model.panes()[this._paneIndex],t=(0,s.ensureNotNull)(e.getPriceScaleById(this._priceScaleId));return[e,t]}}},34853:(e,t,i)=>{"use strict";i.d(t,{RemoveSourcesCommand:()=>m});var s=i(50151),r=i(44352),n=i(47539),o=i(71733),a=i(6250),l=i(98351),c=i(26989),h=i(89215),d=i(65071);class u extends o.UndoCommand{constructor({title:e,chartModel:t,lineDataSourceIds:i}){ -super(e),this._excludeLineToolsFromGroupUndoCommands=[],this._undoState=[],this._chartModel=t,this._lineDataSourceIds=i}redo(){const e=this._lineDataSourceIds.map((e=>(0,s.ensureNotNull)(this._chartModel.dataSourceForId(e))));this._groupLineToolsByGroups(e).forEach(((e,t)=>{const i=new d.ExcludeLineToolsFromGroupUndoCommand(this._chartModel,t,e);i.redo(),this._excludeLineToolsFromGroupUndoCommands.push(i)})),e.forEach((e=>{this._undoState.push({state:e.state(!1),paneIndex:this._chartModel.panes().indexOf((0,s.ensureNotNull)(this._chartModel.paneForSource(e))),sharingMode:e.sharingMode().value()}),this._chartModel.removeSource(e)}))}undo(){var e;for(let t=this._undoState.shift();t;t=this._undoState.shift())null===(e=this._chartModel.restoreSource(!1,t.paneIndex,null,t.state,null))||void 0===e||e.share(t.sharingMode);this._excludeLineToolsFromGroupUndoCommands.forEach((e=>e.undo()))}_groupLineToolsByGroups(e){const t=this._chartModel.lineToolsGroupModel();return e.reduce(((e,i)=>{const s=t.groupForLineTool(i);if(null!==s){const t=e.get(s)||[];t.push(i),e.set(s,t)}return e}),new Map)}}const p=(0,l.getLogger)("Chart.RemoveSourcesCommand"),_=new n.TranslatedString("remove line data sources",r.t(null,void 0,i(66414)));class m extends o.UndoCommand{constructor(e,t,i){super(i),this._removeLineDataSourcesUndoCommand=null,this._initialPriceScaleMode=null;const[r,n]=(0,c.closeSourcesSet)(e,t).reduce(((e,t)=>((0,a.isLineTool)(t)?e[1].push(t.id()):e[0].push(t.id()),e)),[[],[]]);this._chartModel=e,this._sourceIds=r,this._lineDataSourceIds=n,this._sourceStates=[],this._paneIndexes=[],this._priceScalePositionIds=[],this._paneStates=[],this._restorePanes=[];const o=t[0];1===t.length&&(0,h.isStudy)(o)&&(this._initialPriceScaleMode=(0,s.ensureNotNull)(o.priceScale()).mode())}removedIds(){return[...this._sourceIds,...this._lineDataSourceIds]}redo(){this._chartModel.panes().length;const e=this._sourceIds.map((e=>(0,s.ensureNotNull)(this._chartModel.dataSourceForId(e))));this._sourceStates=e.map((e=>(0,s.ensureNotNull)(e.state(!1))));const t=e.map((e=>(0,s.ensureNotNull)(this._chartModel.paneForSource(e))));this._paneIndexes=t.map((e=>this._chartModel.panes().indexOf(e))),this._lineDataSourceIds.length>0&&(this._removeLineDataSourcesUndoCommand=new u({title:_,chartModel:this._chartModel,lineDataSourceIds:this._lineDataSourceIds}),this._removeLineDataSourcesUndoCommand.redo()),this._priceScalePositionIds=e.map(((e,i)=>{const s=e.priceScale();if(null===s)return null;const r=t[i].priceScalePosition(s);return{id:s.id(),position:r,priceScaleIndex:t[i].priceScaleIndex(s,r)}}));const i=new Set;e.forEach(((e,t)=>{i.add(this._paneIndexes[t])})),this._paneStates=e.map(((e,s)=>{const r=this._paneIndexes[s];return i.has(r)?t[s].state(!1,!0):null})),this._restorePanes=e.map((e=>this._chartModel.removeSource(e)))}undo(){const e=[];for(let t=this._sourceStates.length-1;t>=0;t--){const i=this._chartModel.restoreSource(this._restorePanes[t],this._paneIndexes[t],this._paneStates[t],this._sourceStates[t],this._priceScalePositionIds[t]);i&&e.push(i)} -e.some(((t,i)=>t.id()!==this._sourceIds[e.length-i-1]))&&p.logError("Source was restored improperly - source ids does not match"),null!==this._initialPriceScaleMode&&(0,s.ensureNotNull)(e[0].priceScale()).setMode(this._initialPriceScaleMode),this._removeLineDataSourcesUndoCommand&&this._removeLineDataSourcesUndoCommand.undo()}}},40320:(e,t,i)=>{"use strict";i.d(t,{RestoreDefaultsPreferencesUndoCommand:()=>m});var s=i(50151),r=i(44352),n=i(47539),o=i(71733),a=i(81345),l=i(55262),c=i(51620),h=i(35663),d=i(35624),u=i(97070),p=i(87172);const _=new n.TranslatedString("apply all chart properties",r.t(null,void 0,i(64034)));class m extends o.UndoCommand{constructor(e){super(_),this._trading=null,this._oldShowSellBuyButtons=null,this._oldNoConfirmEnabled=null,this._oldShowOnlyRejectionNotifications=null,this._oldShowPricesWithZeroVolume=null,this._oldShowPricesWithSpread=null,this._oldOrderExecutedSoundEnabled=null,this._prevWatermarkPreferences=null,this._model=e,this._trading=(0,u.tradingService)(),null!==this._trading&&(this._oldShowSellBuyButtons=this._trading.showSellBuyButtons.value(),this._oldNoConfirmEnabled=this._trading.noConfirmEnabled.value(),this._oldShowOnlyRejectionNotifications=this._trading.showOnlyRejectionNotifications.value(),this._oldShowPricesWithZeroVolume=this._trading.showPricesWith().zeroVolume.value(),this._oldShowPricesWithSpread=this._trading.showPricesWith().spread.value(),this._oldOrderExecutedSoundEnabled=this._trading.orderExecutedSoundParams.enabled.value()),this._defaultsPreferences=(0,a.defaultsPreferencesByWhiteList)(this._model,this._model.mainSeries()),this._oldPreferences=e.preferences(),this._prevDateFormat=l.dateFormatProperty.value(),this._prevTimeHoursFormat=c.timeHoursFormatProperty.value(),this._prevAddPlusButton=p.addPlusButtonProperty.value(),this._prevShowOpenMarkerStatus=h.showMarketOpenStatusProperty.value(),this._prevCurrencyUnitVisibility=(0,d.currencyUnitVisibilityProperty)().value();const t=this._model.watermarkSource();null!==t&&(this._prevWatermarkPreferences=t.properties().state())}redo(){null!==this._trading&&(this._trading.showSellBuyButtons.setValue(!0),this._trading.noConfirmEnabled.setValue(!1),this._trading.showOnlyRejectionNotifications.setValue(!1),this._trading.showPricesWith().zeroVolume.setValue(!0),this._trading.showPricesWith().spread.setValue(!0),this._trading.orderExecutedSoundParams.enabled.setValue(!1)),this._model.applyPreferences(this._defaultsPreferences),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),(0,l.restoreDateFormatSettingsValue)(),(0,c.restoreTimeHoursFormatSettingsValue)(),(0,p.restoreAddPlusButtonSettingsValue)(),(0,h.restoreShowMarketOpenStatusProperty)(),(0,d.restoreCurrencyUnitVisibilitySettingsValue)();const e=this._model.watermarkSource();null!==e&&e.restorePropertiesDefaults()}undo(){null!==this._trading&&(this._trading.showSellBuyButtons.setValue((0,s.ensureNotNull)(this._oldShowSellBuyButtons)),this._trading.noConfirmEnabled.setValue((0,s.ensureNotNull)(this._oldNoConfirmEnabled)), -this._trading.showOnlyRejectionNotifications.setValue((0,s.ensureNotNull)(this._oldShowOnlyRejectionNotifications)),this._trading.showPricesWith().zeroVolume.setValue((0,s.ensureNotNull)(this._oldShowPricesWithZeroVolume)),this._trading.showPricesWith().spread.setValue((0,s.ensureNotNull)(this._oldShowPricesWithSpread)),this._trading.orderExecutedSoundParams.enabled.setValue((0,s.ensureNotNull)(this._oldOrderExecutedSoundEnabled))),this._model.applyPreferences(this._oldPreferences),this._model.mainSeries().onChartStyleChanged(),this._model.updateScales(),l.dateFormatProperty.setValue(this._prevDateFormat),c.timeHoursFormatProperty.setValue(this._prevTimeHoursFormat),h.showMarketOpenStatusProperty.setValue(this._prevShowOpenMarkerStatus),p.addPlusButtonProperty.setValue(this._prevAddPlusButton),(0,d.currencyUnitVisibilityProperty)().setValue(this._prevCurrencyUnitVisibility);const e=this._model.watermarkSource();null!==e&&null!==this._prevWatermarkPreferences&&e.properties().mergeAndFire(this._prevWatermarkPreferences)}}},55453:(e,t,i)=>{"use strict";i.d(t,{SetPriceScaleCurrencyUndoCommand:()=>o});var s=i(50151),r=i(71733),n=i(1930);class o extends r.UndoCommand{constructor(e,t,i,r){super(r),this._newSourcesCurrencies=new Map,this._oldSourcesCurrencies=new Map,this._showFade=!1,this._chartWidget=i;const o=i.model().mainSeries();for(const i of e.seriesLikeSources()){if(!i.isVisible()||!i.isActingAsSymbolSource().value())continue;const e=t||(0,n.symbolOriginalCurrency)((0,s.ensureNotNull)(i.symbolInfo()));this._newSourcesCurrencies.set(i.id(),e),this._oldSourcesCurrencies.set(i.id(),i.currency()),this._showFade=this._showFade||i===o&&i.currency()!==e}}redo(){this._applyCurrencies(this._newSourcesCurrencies)}undo(){this._applyCurrencies(this._oldSourcesCurrencies)}_applyCurrencies(e){const t=this._chartWidget.model().model();e.forEach(((e,i)=>{(0,s.ensureNotNull)(t.dataSourceForId(i)).setCurrency(e)})),this._chartWidget.model().selectionMacro((e=>{e.clearSelection()})),this._showFade&&this._chartWidget.screen.show(!0)}}},5440:(e,t,i)=>{"use strict";i.d(t,{SetPriceScaleModeCommand:()=>o});var s=i(7711),r=i(71733),n=i(97425);class o extends r.UndoCommand{constructor(e,t,i,s){super(i),this._newMode=e,this._priceScaleId=t.id(),this._model=s,this._oldMode=t.mode()}redo(){this._applyMode(this._newMode)}undo(){this._applyMode(this._oldMode)}_applyMode(e){const t=this._findPriceScaleById();null!==t&&((0,s.saveDefaultProperties)(!0),t.setMode(e),(0,s.saveDefaultProperties)(!1),this._model&&(this._model.recalculateAllPanes((0,n.viewportChangeEvent)()),this._model.lightUpdate()))}_findPriceScaleById(){const e=this._model.panes();for(let t=0;t{"use strict";i.d(t,{SetPriceScaleSelectionStrategyCommand:()=>a});var s=i(50151),r=i(71733),n=i(37364);class o{constructor(e){this._leftScales=e.leftPriceScales().map((e=>e.id())),this._rightScales=e.rightPriceScales().map((e=>e.id()))}restorePane(e){ -this._leftScales.reverse().map((t=>(0,s.ensureNotNull)(e.getPriceScaleById(t)))).forEach((t=>e.movePriceScale(t,"left"))),this._rightScales.reverse().map((t=>(0,s.ensureNotNull)(e.getPriceScaleById(t)))).forEach((t=>e.movePriceScale(t,"right")))}}class a extends r.UndoCommand{constructor(e,t,i){super(i),this._chartModel=e,this._targetStrategy=(0,n.createPriceScaleSelectionStrategy)(t),this._initialState=e.panes().map((e=>new o(e)))}redo(){this._chartModel.panes().forEach((e=>e.setPriceScaleSelectionStrategy(this._targetStrategy))),this._chartModel.fullUpdate()}undo(){const e=this._chartModel.panes();for(let t=0;t{"use strict";i.d(t,{SetPriceScaleUnitUndoCommand:()=>o});var s=i(50151),r=i(71733),n=i(1930);class o extends r.UndoCommand{constructor(e,t,i,r){super(r),this._newSourcesUnits=new Map,this._oldSourcesUnits=new Map,this._showFade=!1,this._chartWidget=i;const o=i.model().mainSeries();for(const i of e.seriesLikeSources()){if(!i.isVisible()||!i.isActingAsSymbolSource().value())continue;const e=t||(0,n.symbolOriginalUnit)((0,s.ensureNotNull)(i.symbolInfo()),this._chartWidget.model().model().unitConversionEnabled());this._newSourcesUnits.set(i.id(),e),this._oldSourcesUnits.set(i.id(),i.unit()),this._showFade=this._showFade||i===o&&i.unit()!==e}}redo(){this._applyUnits(this._newSourcesUnits)}undo(){this._applyUnits(this._oldSourcesUnits)}_applyUnits(e){const t=this._chartWidget.model().model();e.forEach(((e,i)=>{(0,s.ensureNotNull)(t.dataSourceForId(i)).setUnit(e)})),this._chartWidget.model().selectionMacro((e=>{e.clearSelection()})),this._showFade&&this._chartWidget.screen.show(!0)}}},30684:(e,t,i)=>{"use strict";i.d(t,{SetScaleRatioPropertiesCommand:()=>o});var s=i(71733),r=i(7711),n=i(97425);class o extends s.UndoCommand{constructor(e,t,i,s){super(i),this._property=e,this._newValue=t,this._model=s,this._priceScale=this._model.mainSeries().priceScale(),this._oldValue=this._property.value(),this._oldMode=this._priceScale.mode()}redo(){this._oldValue=this._property.value(),this._oldMode=this._priceScale.mode(),(0,r.saveDefaultProperties)(!0),this._priceScale.setMode({autoScale:!1,percentage:!1,log:!1}),this._property.setValue(this._newValue),(0,r.saveDefaultProperties)(!1),this._model.recalculateAllPanes((0,n.viewportChangeEvent)()),this._model.lightUpdate()}undo(){(0,r.saveDefaultProperties)(!0),this._property.setValue(this._oldValue),this._priceScale.setMode(this._oldMode),(0,r.saveDefaultProperties)(!1),this._model.recalculateAllPanes((0,n.viewportChangeEvent)()),this._model.lightUpdate()}}},26989:(e,t,i)=>{"use strict";function s(e,t){let i=[];const r=e.children(t,!1);for(let t=0;t{e.children(t,!1).forEach((e=>{i.has(e)||(i.add(e),r(e))}))};return t.forEach(r),t.filter((e=>!i.has(e))).map((t=>s(e,t))).reduce(((e,t)=>e.concat(t)),[])}i.d(t,{closeSourcesSet:()=>r})},67278:(e,t,i)=>{"use strict";i.d(t,{ -TimeScaleChangeUndoCommand:()=>o});var s=i(98351),r=i(71733);const n=(0,s.getLogger)("Chart.ChartUndoModel");class o extends r.UndoCommand{constructor(e,t,i){super(i,!1),this._newRightOffsetAndBarSpacing=null,this.setCustomFlag("doesnt_affect_save",!0),this._model=e,this._rightOffsetAndBarSpacing=t}undo(){if(null!==this._newRightOffsetAndBarSpacing)return void n.logDebug("TimeScaleChangeUndoCommand.undo: Command is already undone");const e=this._model.timeScale();this._newRightOffsetAndBarSpacing={barSpacing:e.barSpacing(),rightOffset:e.rightOffset()},e.setBarSpacing(this._rightOffsetAndBarSpacing.barSpacing),e.setRightOffset(this._rightOffsetAndBarSpacing.rightOffset),this._model.lightUpdate()}redo(){if(null===this._newRightOffsetAndBarSpacing)return void n.logDebug("TimeScaleChangeUndoCommand.redo: Command is not undone");const e=this._model.timeScale();e.setBarSpacing(this._newRightOffsetAndBarSpacing.barSpacing),e.setRightOffset(this._newRightOffsetAndBarSpacing.rightOffset),this._model.lightUpdate(),this._newRightOffsetAndBarSpacing=null}}},71733:(e,t,i)=>{"use strict";i.d(t,{UndoCommand:()=>r});var s=i(47539);class r{constructor(e,t=!0){this._customFlags={},this._text=e||new s.TranslatedString("",""),this._executeOnPush=t}text(){return this._text}executeOnPush(){return this._executeOnPush}customFlag(e){return this._customFlags[e]}setCustomFlag(e,t){this._customFlags[e]=t}canMerge(e){return!1}merge(e){throw new Error("Should be re-implemented in child classes")}}},29443:(e,t,i)=>{"use strict";i.d(t,{createUndoHistory:()=>u});var s=i(50151),r=i(43426),n=i(42437),o=i(71733);class a extends o.UndoCommand{constructor(e,t,i){super(i),this._wv=e,this._newValue=t,this._oldValue=e.value()}redo(){this._wv.setValue(this._newValue)}undo(){this._wv.setValue(this._oldValue)}}var l=i(98351),c=i(26867),h=i.n(c);const d=(0,l.getLogger)("Common.UndoHistory");function u(){const e=[],t=new r.UndoStack,i=new r.UndoStack,o=new(h());function l(s){if(e.length>0)e[e.length-1].addCommand(s);else{i.clear();const e=t.head(),r=e&&e.text().originalText();e&&e.canMerge(s)?e.merge(s):t.push(s);const n=s.text().originalText();""!==n&&n!==r&&d.logNormal("DO: "+n)}s.executeOnPush()&&s.redo(),e.length||o.fire(c())}function c(){const e=t.head(),s=i.head(),r=void 0===e?void 0:e.text(),n=void 0===s?void 0:s.text();return{enableUndo:!t.isEmpty(),undoText:void 0!==r?r.translatedText():r,enableRedo:!i.isEmpty(),redoText:void 0!==n?n.translatedText():n,originalUndoText:void 0!==r?r.originalText():void 0,originalRedoText:void 0!==n?n.originalText():void 0}}return{beginUndoMacro:function(t){const i=new n.UndoMacroCommand(t);return e.push(i),i},clearStack:function(){t.clear(),i.clear(),o.fire(c())},createUndoCheckpoint:function(){return{lastActualCommand:t.isEmpty()?null:t.head()}},endUndoMacro:function(){const t=(0,s.ensureDefined)(e.pop());t.isEmpty()||l(t)},pushUndoCommand:l,redo:function(){if(i.isEmpty())return!1;const e=i.pop();return!!e&&(e.redo(),t.push(e),d.logNormal("REDO: "+e.text().originalText()),o.fire(c()),!0)},redoStack:function(){return i}, -setWatchedValue:function(e,t,i,s){if(e.value()!==t){const r=new a(e,t,i);r.setCustomFlag("doesnt_affect_save",!!s),l(r),r.redo()}},undo:function(){if(t.isEmpty())return!1;const e=t.pop();return!!e&&(e.undo(),i.push(e),d.logNormal("UNDO: "+e.text().originalText()),o.fire(c()),!0)},undoStack:function(){return t},undoToCheckpoint:function(e){for(;!t.isEmpty()&&e.lastActualCommand!==t.head();)t.pop().undo();i.clear(),o.fire(c())},state:c,onChange:function(){return o}}}},42437:(e,t,i)=>{"use strict";i.d(t,{UndoMacroCommand:()=>r});var s=i(71733);class r extends s.UndoCommand{constructor(e){super(e,!1),this._subcommands=[]}addCommand(e){this._subcommands.push(e)}isEmpty(){return 0===this._subcommands.length}redo(){for(let e=0;e=0;e--)this._subcommands[e].undo()}commands(){return this._subcommands}}},43426:(e,t,i)=>{"use strict";i.d(t,{UndoStack:()=>a});var s=i(71733),r=i(26867),n=i.n(r);const o=(0,i(98351).getLogger)("Common.UndoStack");class a{constructor(){this._commands=[],this._onChange=new(n())}onChange(){return this._onChange}isEmpty(){return 0===this._commands.length}clear(){this.isEmpty()||(this._commands.length=0,this._onChange.fire())}push(e){if(!(e instanceof s.UndoCommand))throw new TypeError("argument must be an instance of UndoCommand");this._commands.push(e),this._onChange.fire(e)}pop(){if(this.isEmpty())return void o.logDebug("pop: undo stack is empty");const e=this._commands.pop();return this._onChange.fire(e),e}head(){if(!this.isEmpty())return this._commands[this._commands.length-1]}}},52934:(e,t,i)=>{"use strict";i.d(t,{UnmergeDownUndoCommand:()=>o,UnmergeUpUndoCommand:()=>a,UnmergeToNewBottomPane:()=>l});var s=i(50151),r=i(74879);class n extends r.MoveSourceUndoCommand{constructor(e,t,i){super(e,t,i)}redo(){const e=(0,s.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),t=(0,s.ensureNotNull)(this._chartModel.paneForSource(e)),i=this._chartModel.children(e,!0);t.bulkActionMacro((()=>{i.forEach((e=>this._chartModel.detachSource(e))),this._chartModel.detachSource(e)}));const r=this._chartModel.createPane(this.targetPaneIndex()),n=r.findSuitableScale(e);r.bulkActionMacro((()=>{r.addDataSource(e,n,!1),i.forEach((e=>r.addDataSource(e,n,!1)))})),(0,s.ensureNotNull)(e.priceScale()).restoreState(this._newPriceScaleState(r.isOverlay(e))),this._chartModel.fullUpdate(),this._chartModel.setShouldBeSavedEvenIfHidden(!0)}undo(){const e=(0,s.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),t=(0,s.ensureNotNull)(this._chartModel.paneForSource(e)),i=this._chartModel.children(e,!0);t.bulkActionMacro((()=>{i.forEach((e=>this._chartModel.detachSource(e)));const t=this._chartModel.detachSource(e);(0,s.assert)(t,"Undo of detaching must remove pane")}));const r=this._chartModel.panes()[this._initialPaneIndex];let n=r.getPriceScaleById(this._initialPriceScaleId);null===n&&(n=r.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex)),r.bulkActionMacro((()=>{ -r.addDataSource(e,n,!0),i.forEach((e=>r.addDataSource(e,n,!1)))})),(0,s.ensureNotNull)(e.priceScale()).restoreState(this._originalPriceScaleState()),this._chartModel.fullUpdate()}}class o extends n{constructor(e,t,i){super(e,t,i)}targetPaneIndex(){return this._initialPaneIndex+1}}class a extends n{constructor(e,t,i){super(e,t,i)}targetPaneIndex(){return this._initialPaneIndex}}class l extends n{constructor(e,t,i){super(e,t,i)}targetPaneIndex(){return this._chartModel.panes().length}}},50337:(e,t,i)=>{"use strict";i.d(t,{unitConvertibleGroups:()=>n,sourceNewUnitOnPinningToPriceScale:()=>o});var s=i(21580),r=i(1930);function n(e,t,i){const s=(0,r.symbolUnitConvertibleGroupsIfExist)(e,!0);if(null!==s)return s;const n=i.unitGroupById(t);return null===n?[]:[n]}function o(e,t,i,r){let o=null;if(i.unitConversionEnabled()&&(0,s.isSymbolSource)(e)){const s=i.availableUnits(),a=t.unit(s),l=e.unit(),c=null===l?[]:n(e.symbolInfo(),l,s);null!==a&&null!==a.selectedUnit&&!a.allUnitsAreOriginal&&a.selectedUnit!==l&&(r&&null===l||null!==l&&s.convertible(l,c))&&(o=a.selectedUnit)}return o}},84803:(e,t,i)=>{"use strict";i.d(t,{createVisibilityController:()=>l});var s=i(44352),r=i(32563),n=i(60923),o=i(56840);function a(e){return"alwaysOn"===e||"alwaysOff"===e?e:"visibleOnMouseOver"}function l(e,t){let l,c;function h(){if(!l){l=(0,n.createPrimitiveProperty)();let i=o.getValue(e);void 0===i&&void 0!==t&&(i=o.getValue(t)),l.setValue(a(i)),l.subscribe(l,(t=>{o.setValue(e,a(t.value()))}))}return l}return{property:h,availableValues:function(){return[{id:"visibleOnMouseOver",value:"visibleOnMouseOver",title:s.t(null,void 0,i(89960))},{id:"alwaysOn",value:"alwaysOn",title:s.t(null,void 0,i(71997))},{id:"alwaysOff",value:"alwaysOff",title:s.t(null,void 0,i(9408))}]},actualBehavior:function(){if(!c){c=(0,n.createPrimitiveProperty)();const e=h(),t=()=>{let t=e.value();"alwaysOn"!==t&&"alwaysOff"!==t&&(t=r.mobiletouch?"alwaysOn":"visibleOnMouseOver"),c&&c.setValue(t)};e.subscribe(c,t),t()}return c}}}},3074:(e,t,i)=>{"use strict";i.r(t),i.d(t,{watermarkProperty:()=>d,restoreWatermarkPropertyDefaults:()=>u});var s=i(24377),r=i(56840),n=i(26220),o=i.n(n);const a="symbolWatermark",l={visibility:!1,color:"rgba(80, 83, 94, 0.25)"};function c(){const e=r.getJSON(a);let t=Object.assign({},l,e);if(void 0===e){if(void 0!==r.getJSON("chartproperties")){const e=r.getJSON("chartproperties").symbolWatermarkProperties;if(void 0!==e){const i=(0,s.tryParseRgba)(e.color);t=Object.assign(t,e),null!==i&&(0!==i[3]?t.visibility=!0:(i[3]=.25,t.color=(0,s.rgbaToString)(i)))}}delete t.transparency}return t}let h=null;function d(){return null===h&&(h=new(o())(c()),r.onSync.subscribe(null,(()=>{null!==h&&h.mergeAndFire(c())})),h.listeners().subscribe(null,(()=>{null!==h&&r.setJSON(a,h.state())}))),h}function u(){null!==h&&h.mergeAndFire(l)}},96881:(e,t,i)=>{"use strict" -;var s=i(12205).translatedIntervalString,r=i(23902).getTranslatedSymbolDescription,n=i(17364).CHART_FONT_FAMILY,o=i(3074),a=o.watermarkProperty,l=o.restoreWatermarkPropertyDefaults,c=i(83499).drawScaled,h=i(64548).applyDefaultsOverrides,d=i(64548).applyPropertiesOverrides;const u="symbolWatermarkProperties";t.Watermark=function(e,t){var i={},o=a();function p(e,t){var s=e.font;return i.hasOwnProperty(s)||(i[s]={}),i[s].hasOwnProperty(t)||(i[s][t]=e.measureText(t).width),i[s][t]}h(o,void 0,!1,u),o.listeners().subscribe(this,(function(){e.updateSource(this)})),this.destroy=function(){o.listeners().unsubscribeAll(this)},this.properties=function(){return o},this.restorePropertiesDefaults=function(){l()},this.applyOverrides=function(e){d(o,void 0,!1,e,u)};var _={renderer:function(e,i){return{draw:function(a,l){c(a,l.pixelRatio,(function(){var l=t.symbolInfo();a.fillStyle=o.color.value();var c,h=l.name;/QUANDL/.test(l.exchange)&&((c=h.split(/\//)).length&&(h=c[c.length-1]));for(var d={description:l.description,short_description:l.short_description,pro_name:l.pro_name,short_name:l.name,local_description:l.local_description,language:l.language},u=[{text:h?h+", "+s(t.interval()):"",font:"96px "+n,lineHeight:117,vertOffset:0},{text:r(d)||"",font:"48px "+n,lineHeight:58,vertOffset:5}],_=0,m=0;mi?i/g:1,_+=v.lineHeight*v.zoom}}var f=Math.max((e-_)/2,0);for(m=0;m{"use strict";i.d(t,{reorderDataSourcesStateZOrder:()=>S,newLineToolZOrder:()=>w,newStudyZOrder:()=>C,moveAfterSource:()=>k,moveBeforeSource:()=>E});var s=i(6250),r=i(89215),n=i(46936),o=i(62472),a=i(93975);function l(e){return(0,s.isLineTool)(e)&&!e.isSpeciallyZOrderedSource()}function c(e){return(0,r.isStudy)(e)&&!e.isSpeciallyZOrderedSource()}function h(e,t){return e.zorder-t.zorder}function d(e,t){(0,o.isMainSeriesState)(e)?e.zorder=0:e.zorder=t}function u(e,t){e.setZorder(t)}function p(e){return e.zorder()}function _(e){return Math.round(1e3*e)/1e3}function m(e,t){const i=Math.max(e,t),s=Math.min(e,t);return Math.max(0,Math.ceil(i)-Math.floor(s)-1)}function g(e,t,i){let s=0;const r=function(e,t){const i=1e3;return Math.abs(t*i-e*i)/i}(t,e);var n;return r>i?(e=Math.trunc(e),s=Math.floor(r/(i+1))):(n=r/(i+1),s=Math.floor(1e3*n)/1e3),{startZOrder:e,zOrderStep:s}}function f(e,t,i,s){let r=e.length,n=t;for(let t=e.length-1;t>=-1;t--)if(-1===t||s(e[t])){const s=t;let o=T(n);if(r-1===s)s>=0&&i(e[s],o);else{const t=m(r,s);let a=0;for(;0===a;){const e=g(n,o,t);n=e.startZOrder,a=e.zOrderStep,0===a&&(o-=1e4,0===o&&(o-=1e4))}let l=r-1;for(;l>s;){const t=_(n-a);i(e[l],t),n=t,l--}s>=0&&i(e[s],o)}n=o,r=s}}function v(e,t,i,s){let r=-1,n=t -;for(let t=0;t<=e.length;t++)if(t===e.length||s(e[t])){const s=t;let o=P(n);if(r+1===s)s<=e.length-1&&i(e[s],o);else{const t=m(r,s);let a=0;for(;0===a;){const e=g(n,o,t);n=e.startZOrder,a=e.zOrderStep,0===a&&(o+=1e4,0===o&&(o+=1e4))}let l=r+1;for(;l<=s-1;){const t=_(n+a);i(e[l],t),n=t,l++}s<=e.length-1&&i(e[s],o)}n=o,r=s}}function S(e){!function(e,t,i,s,r,n){let o=null;const a=[];for(const r of e)t(r)?(a.push(r),o=r):(i(r)||s(r))&&a.push(r);a.sort(n),null!==o&&r(o,0);const l=null===o?-1:a.indexOf(o);-1!==l?(f(a.slice(0,l),0,r,i),v(a.slice(l+1),0,r,i)):v(a,0,r,i)}(e,o.isMainSeriesState,o.isStudyState,o.isLineToolState,d,h)}function y(e,t){const i=Math.floor(e/1e4);let s=t.get(i);return void 0===s&&(s=[],t.set(i,s)),s}function b(e,t,i,s,r,n){let o=-1/0,a=1/0,l=-1/0,c=0;const h=new Map;for(let s=0;sr(e)-r(t)));let p=T(r(u[0]));const m=P(p),f=g(p,m,u.length+1).zOrderStep;return 0!==f?(u.forEach((e=>{const t=_(p+f);s(e,t),p=t})),_(p+f)):_(m+5e3)}function w(e,t){return b(e,l,c,u,p,t)}function C(e){let t=-1e4;for(const i of e)c(i)&&(t=Math.min(t,i.zorder()-1e4));return 0===t?-1e4:t}function P(e){const t=1e4*Math.ceil(e/1e4);return t===e?t+1e4:t}function T(e){const t=1e4*Math.floor(e/1e4);return t===e?t-1e4:t}function x(e,t,i,s,r,n,o){const l=t.length,{newItems:c,movedItemsStartIndex:h}=i>0?(0,a.moveAfter)(e,t,i-1):(0,a.moveBefore)(e,t,0);let d=!1;for(let t=h;tr(e)))?function(e,t,i,s,r,n){let o,a,l=-1,c=-1;0===i?(c=I(e,i+t,s),a=n(e[c])):i+t===e.length?(l=M(e,i-1,s),o=n(e[l])):(l=M(e,i-1,s),o=n(e[l]),c=I(e,i+t,s),a=n(e[c]));if((void 0===o||o<0)&&void 0!==a&&a<=0)f(e.slice(0,c),a,r,s);else if((void 0===a||a>0)&&void 0!==o&&o>=0)v(e.slice(l+1),o,r,s);else{i+t0)&&void 0!==a&&a>=0){c=a;const e=g(c,void 0!==l?l:P(a),t);c=e.startZOrder,p=e.zOrderStep,d=i,u=d+t,h=1}if(0!==p)for(;d!==u;){const t=_(c+h*p);n(e[d],t),c=t,d+=h}else{const t=e.findIndex((e=>r(e)));-1!==t?(f(e.slice(0,t),0,n,s),v(e.slice(t+1),0,n,s)):v(e,0,n,s)}}(c,l,h,r,s,n,o)}function I(e,t,i){for(;t=0&&i(e[t]);)t--;return Math.max(0,t)}function A(e,t,i,s,r,n,o){const a=e.indexOf(i)+1;x(e,t,a,s,r,n,o)} -function L(e,t,i,s,r,n,o){const a=e.indexOf(i);x(e,t,a,s,r,n,o)}function k(e,t,i){A(e,t,i,n.isSeries,c,u,p)}function E(e,t,i){L(e,t,i,n.isSeries,c,u,p)}},82501:(e,t,i)=>{"use strict";i.d(t,{setSymbolSearchCompleteOverrideFunction:()=>r,getSymbolSearchCompleteOverrideFunction:()=>n});let s=(e,t)=>{var i;return Promise.resolve({symbol:e,name:null!==(i=null==t?void 0:t.symbol)&&void 0!==i?i:e})};function r(e){s=e}function n(){return s}},71107:(e,t,i)=>{"use strict";i.d(t,{StudyMetaInfoBase:()=>d});var s=i(27147),r=i(50151),n=i(8890);const o=new Set(["CorrelationCoefficient@tv-basicstudies","Correlation - Log@tv-basicstudies-1"]),a=new Set([]),l=new Set(["line"]),c=new Map([["AnchoredVWAP@tv-basicstudies","linetoolanchoredvwap"],["RegressionTrend@tv-basicstudies","linetoolregressiontrend"]]),h=/^([^\$]+)\$\d+$/;class d{static getSourceIdsByInputs(e,t){if(!Array.isArray(e)||!t)return[];const i=[];for(const r of e)if(d.isSourceInput(r)&&(0,s.default)(t[r.id])){const e=t[r.id];e.includes("$")&&i.push(e.split("$")[0])}return i}static isSourceInput(e){return Boolean(e.id&&(("source"===e.id||"src"===e.id)&&("text"===e.type||"source"===e.type)||"source"===e.type))}static getSourceInputIds(e){const t=[];for(const i of e.inputs)d.isSourceInput(i)&&t.push(i.id);return t}static setChildStudyMetaInfoPropertiesSourceId(e,t,i){for(const s of e.inputs){if(!d.isSourceInput(s))continue;const e=i.childs().inputs&&i.childs().inputs.childs()[s.id];if(e){const i=e.value(),s=h.exec(i);if(2===(null==s?void 0:s.length)){if("{pid}"===s[1]){const s=i.replace(/^[^\$]+/,t);e.setValue(s)}}}}}static patchSoSInputs(e,t){const i=e=>{const i=h.exec(e);if(2===(null==i?void 0:i.length)){const s=i[1],n=`${(0,r.ensureNotNull)(t(s))}`;return e.replace(/^[^\$]+/,n)}return e};for(const t in e)if(/in_[\d+]/.test(t)||"source"===t){const r=e[t];(0,s.default)(r)?e[t]=i(r):(0,n.isExtendedInput)(r)&&(0,n.isExtendedInputSource)(r)&&(r.v=i(r.v))}}static canBeChild(e){if((0,s.default)(e))return!0;if(!e)return!1;if(e.extra&&!d.isAllowedSourceInputsCount(e.extra.sourceInputsCount)||!0===e.canNotBeChild||!1===e.canBeChild||o.has(e.id))return!1;let t=0;for(const i of e.inputs)d.isSourceInput(i)&&(t+=1);return d.isAllowedSourceInputsCount(t)}static isAllowedSourceInputsCount(e){return 1===e}static canHaveChildren(e){if(e){if(e.isTVScriptStrategy||e.TVScriptSourceCode&&isStrategy(e.TVScriptSourceCode))return!1;if(e.id&&!a.has(e.id)&&Array.isArray(e.plots))for(const t of e.plots)if(l.has(t.type))return!0}return!1}static getChildSourceInputTitles(e,t,i){var s;const r={};if(t.plots&&t.plots.length&&e.options&&e.options.length)for(const n of e.options){const e=n?+n.split("$")[1]:NaN,o=isFinite(e)&&t.plots[e];o&&l.has(o.type)&&(r[n]=t.styles&&t.styles[o.id]&&(null===(s=t.styles[o.id])||void 0===s?void 0:s.title)||o.id,i&&(r[n]=i+": "+r[n]))}return r}static canPlotBeSourceOfChildStudy(e){return l.has(e)}static getStudyPropertyRootName(e){const t=c.get(e.id);if(void 0!==t)return t;let i="study_"+e.id;return e.pine&&e.pine.version&&(i+="_"+e.pine.version.replace(".","_")),i} -static getStudyPropertyRootNameById(e){const t=c.get(e);return void 0!==t?t:"study_"+e}}},58403:(e,t,i)=>{"use strict";i.d(t,{StudyMetaInfo:()=>a});var s=i(98351).getLogger("Chart.Study.MetaInfo"),r=i(1140).applyOverridesToStudyDefaults,n=i(71107).StudyMetaInfoBase,o={};class a extends n{constructor(e){super(),TradingView.merge(this,{palettes:{},inputs:[],plots:[],graphics:{},defaults:{}}),TradingView.merge(this,e);var t=e.fullId||e.id;TradingView.merge(this,a.parseIdString(t))}static versionOf(e){var t="_metainfoVersion"in e&&isNumber(e._metainfoVersion)?e._metainfoVersion:0;return t<0&&s.logError("Metainfo format version cannot be negative: "+t),t}static parseIdString(e){var t={};if(-1===e.indexOf("@"))t.shortId=e,t.packageId="tv-basicstudies",t.id=e+"@"+t.packageId,t.version=1;else{var i=e.split("@");t.shortId=i[0];var s=i[1].split("-");if(3===s.length)t.packageId=s.slice(0,2).join("-"),t.id=t.shortId+"@"+t.packageId,t.version=s[2];else if(1===s.length&&"decisionbar"===s[0])t.packageId="les-"+s[0],t.id=t.shortId+"@"+t.packageId,t.version=1;else{if(1!==s.length)throw new Error("unexpected study id:"+e);t.packageId="tv-"+s[0],t.id=t.shortId+"@"+t.packageId,t.version=1}}if(t.fullId=t.id+"-"+t.version,"tv-scripting"===t.packageId){var r=t.shortId;if(0===r.indexOf("Script$")||0===r.indexOf("StrategyScript$")){var n=r.indexOf("_");t.productId=n>=0?r.substring(0,n):t.packageId}else t.productId=t.packageId}else t.productId=t.packageId;return t}static getPackageName(e){return(/^[^@]+@([^-]+-[^-]+)/.exec(e||"")||[0,"tv-basicstudies"])[1]}static cutDollarHash(e){var t=e.indexOf("$"),i=e.indexOf("@");return-1===t?e:e.substring(0,t)+(i>=0?e.substring(i):"")}static hasUserIdSuffix(e){return/^USER;[\d\w]+;\d+$/.test(e)}static hasPubSuffix(e){return/^PUB;.+$/.test(e)}static hasStdSuffix(e){return/^STD;.+$/.test(e)}static isStandardPine(e){return/^(Strategy)?Script\$STD;.*@tv-scripting$/.test(e)}static getStudyIdWithLatestVersion(e){const t=a.cutDollarHash(e.id),i=t.indexOf("CP@tv-basicstudies")>=0;let s=t;return t.indexOf("@tv-scripting")>=0?s+="-101!":s+=i?"-"+e.version+"!":"-"+e.version,s}defaultInputs(){for(var e=[],t=0;t0?e[0].id:null}createDefaults(){if(this.defaults){var e=TradingView.clone(this.defaults);e.precision="default";var t=a.getStudyPropertyRootName(this);defaults.create(t,e)}}removeDefaults(){defaults.remove(a.getStudyPropertyRootName(this))}static findStudyMetaInfoByDescription(e,t){if(e){for(var i=0;i{"use strict";window.TradingView=window.TradingView||{},window.requireAll=function(e){return e.keys().map(e)},i(32563).setClasses(),i(32020),i(56186).install(),i(49483),i(65665),i(93731),i(11417),i(11536),i(39056),i(56840)},67498:(e,t,i)=>{"use strict";i(13781);var s=i(50151).assert;i(16051),i(64548),i(51368);const r=i(2484);JSON.parse(urlParams.disabledFeatures).forEach((function(e){r.setEnabled(e,!1)})),JSON.parse(urlParams.enabledFeatures).forEach((function(e){r.setEnabled(e,!0)})),function(){window.__settingsOverrides=window.parent[window.urlParams.uid].settingsOverrides||{};var e=window.parent[window.urlParams.uid].settingsAdapter;null!=e?(TVSettings.setSettingsAdapter(e),TVSettings.sync()):r.enabled("use_localstorage_for_settings")&&TVSettings.sync()}();var n=i(17364).setChartFontFamily;window.urlParams.customFontFamily&&n(window.urlParams.customFontFamily);var o=i(96642).RestrictedToolsetBootloader,a=i(38190).HeaderToolbarBootloader,l=i(26971).DrawingToolbarBootloader,c=i(85323).isDrawingToolbarVisible;(0,i(32563).setClasses)();var h=i(8840),d=i(45345).setTheme,u=i(9416),p=i(91612),_=i(66141),m=i(88021).migrateShortcut,g=i(93919).ChartSaver,f=i(93958).SaveChartService,v=i(5520).LoadChartService,S=i(87520).StudyTemplates,y=i(81205).FavoriteStudyTemplateService,b=i(82992).linking,w=i(76422),C=i(74599).formatterOptions,P=i(69145).customFormatters,T=i(30371).StudyMarket,x=i(21097).TVXWindowEvents,I=i(71668).createDeferredPromise,M=i(933).deepExtend,A=i(68671).randomHash,L=i(84912).convertPropertyToWatchedValue,k=i(11954).property,E=i(43074).property,D=i(55262).dateFormatProperty,V=i(51620).timeHoursFormatProperty,B=i(40962).CustomTimezones,R=i(35624).currencyUnitVisibilityProperty,N=i(43370).default,O=i(578).Interval,F=i(89356).Root,W=i(28325).ChartPage,H=i(36776).destroyQuoteSessions,z=i(45673).TIMEFRAMETYPE,U=new W(new F(window).allocate()),j=U.allocate({areaName:"center"}),G=(window.parent[urlParams.uid].brokerFactory,Boolean(!1)),q=i(90981).CHART_WIDGET_COLLECTION_SERVICE,$=i(16216);i(17152);var Y=i(45818),K=i(8222).createFavoriteDrawingToolbar,X=i(77317).setupChartEventHint,Z=i(81602).setupChartScreenshotHint,J=i(79930),Q=i(58403).StudyMetaInfo,ee=i(73809);i(95056),i(40716);var te=i(78136).setSearchRequestDelay,ie=i(77906),se=i(76702),re=i(74585).addBrandingSource,ne=i(65312).setAdditionalSymbolInfoFields,oe=i(82501).setSymbolSearchCompleteOverrideFunction,ae=i(39263).DropdownApi,le=i(60223).ContextMenuManager -;i(67049).setDefaultWatchlistSymbols,i(67049).defaultWatchlistSymbols;const ce=new AbortController;var he=window.parent[urlParams.uid].getCustomIndicators,de=I(),ue=I(),pe=r.enabled("left_toolbar");if(void 0!==window.parent[urlParams.uid].contextMenu){var _e=window.parent[urlParams.uid].contextMenu;void 0!==_e.items_processor&&le.setCustomItemsProcessor(_e.items_processor),void 0!==_e.renderer_factory&&le.setCustomRendererFactory(_e.renderer_factory)}if(Promise.all([de.promise,ue.promise]).then((function(){window.ChartApiInstance.start()})),"function"==typeof he){var me=he(se);me&&me.then?me.then((function(e){if(!Array.isArray(e))return console.warn("custom_indicators_getter should be a function that returns a Promise object which result is an array of custom indicators"),void de.resolve();JSServer.studyLibrary.push.apply(JSServer.studyLibrary,e),de.resolve(),console.log("{0} custom indicators loaded.".format(e.length))})).catch((function(e){console.warn("Error loading custom indicators "+e),de.resolve()})):(console.warn("custom_indicators_getter should be a function that returns a Promise object"),de.resolve())}else de.resolve();window.widgetReady=function(e){w.subscribe("onChartReady",e)};var ge=urlParams.theme&&urlParams.theme.toLowerCase();function fe(e){window.__defaultsOverrides=window.__defaultsOverrides||{},M(window.__defaultsOverrides,e),void 0!==TradingView.defaultProperties&&void 0!==TradingView.defaultProperties.chartproperties&&(window.applyDefaultsOverrides(TradingView.defaultProperties.chartproperties),window.applyDefaultOverridesToLinetools())}!function(e){h.themes[e]&&d(e)}(ge),window.applyStudiesOverrides=function(e){e&&(window.chartWidgetCollection?window.chartWidgetCollection.applyStudiesOverrides(e):Q.mergeDefaultsOverrides(e))},window.applyOverrides=function(e){fe(e),window.chartWidgetCollection&&window.chartWidgetCollection.applyOverrides(e)},window.doWhenApiIsReady=function(e){window.tradingViewApi?e():ue.promise.then(e)},window.applyTradingCustomization=function(e){for(var t in e.order)TradingView.defaultProperties.linetoolorder[t]=e.order[t];for(var t in e.position)TradingView.defaultProperties.linetoolposition[t]=e.position[t]},window.changeTheme=function(e,t){var i=h.themes[e.toLowerCase()];return i?window.tradingViewApi.themes().setStdTheme(i.name,!0,t&&t.disableUndo):Promise.resolve()},window.getTheme=function(){return window.tradingViewApi.themes().getCurrentThemeName()},window.is_authenticated=!1;JSON.parse(window.urlParams.brokerConfig);i(44352).t(null,void 0,i(65911)),i(44352).t(null,void 0,i(68111)),i(44352).t(null,void 0,i(5607));var ve=null,Se=I(),ye=null,be=function(){if(r.setEnabled("charting_library_debug_mode","true"===urlParams.debug),r.setEnabled("chart_property_page_trading",!1),r.enabled("remove_library_container_border")){var e=document.querySelector("#library-container");null!==e&&(e.style.border="0px",e.style.padding="1px")}r.enabled("no_min_chart_width")&&(window.document.body.style.minWidth="0px"), -null!=urlParams.studiesOverrides&&Q.mergeDefaultsOverrides(JSON.parse(urlParams.studiesOverrides)),s(void 0===TradingView.defaultProperties,"Default properties are inited before applying overrides"),fe(JSON.parse(urlParams.overrides)),urlParams.numeric_formatting=urlParams.numeric_formatting&&JSON.parse(urlParams.numeric_formatting),urlParams.numeric_formatting&&"string"==typeof urlParams.numeric_formatting.decimal_sign&&(C.decimalSign=urlParams.numeric_formatting.decimal_sign[0]),window.ChartApiInstance=new J(window.parent[urlParams.uid].datafeed),window.parent[urlParams.uid].customFormatters&&(window.parent[urlParams.uid].customFormatters.timeFormatter&&(P.timeFormatter=window.parent[urlParams.uid].customFormatters.timeFormatter),window.parent[urlParams.uid].customFormatters.dateFormatter&&(P.dateFormatter=window.parent[urlParams.uid].customFormatters.dateFormatter),window.parent[urlParams.uid].customFormatters.tickMarkFormatter&&(P.tickMarkFormatter=window.parent[urlParams.uid].customFormatters.tickMarkFormatter),window.parent[urlParams.uid].customFormatters.priceFormatterFactory&&(P.priceFormatterFactory=window.parent[urlParams.uid].customFormatters.priceFormatterFactory),window.parent[urlParams.uid].customFormatters.studyFormatterFactory&&(P.studyFormatterFactory=window.parent[urlParams.uid].customFormatters.studyFormatterFactory)),window.parent[urlParams.uid].customTimezones&&B.instance().addTimezones(window.parent[urlParams.uid].customTimezones),window.ChartApiInstance.setStudiesAccessController(window.ChartApiInstance.createStudiesAccessController(urlParams.studiesAccess));var t,n=urlParams.chartContent?JSON.parse(urlParams.chartContent).json:void 0,d=urlParams.chartContentExtendedData?JSON.parse(urlParams.chartContentExtendedData):n?n.extendedData:void 0,p=urlParams.interval||"D",_=function(e){var t=/(\d+)(\w+)/;return e.map((function(e){var s=t.exec(e.text),r=s[2].toLowerCase(),n=parseInt(s[1]),o="y"===r?12*n+"M":n+r,a=O.parse(e.resolution);return{text:e.title||n+i(44352).t(r,{context:"dates",count:n},i(673)),description:e.description||"",value:{value:o.toUpperCase(),type:z.PeriodBack},targetResolution:a.value(),requiresIntraday:a.isIntraday()}}))}(JSON.parse(urlParams.timeFrames)),m={resizerBridge:j,padding:r.enabled("border_around_the_chart")?2:0,content:n,widgetOptions:{addToWatchlistEnabled:!1,hideIdeas:!0,addVolume:window.ChartApiInstance.studiesAccessController.isToolEnabled("Volume"),muteSessionErrors:!0,timezone:urlParams.timezone,defSymbol:urlParams.symbol,defInterval:p,compareSymbols:urlParams.compareSymbols&&JSON.parse(urlParams.compareSymbols),defTimeframe:(t=window.parent[urlParams.uid].timeframe,t?"string"==typeof t?t:{...t,type:"time-range"}:t),paneContextMenuEnabled:r.enabled("pane_context_menu"),paneContextMenu:{mainSeriesTrade:G},priceScaleContextMenuEnabled:r.enabled("scales_context_menu"),currencyConversionEnabled:r.enabled("pricescale_currency"),unitConversionEnabled:r.enabled("pricescale_unit"),legendWidgetEnabled:r.enabled("legend_widget"),legendWidget:{contextMenu:{ -settings:r.enabled("show_chart_property_page"),showOpenMarketStatus:r.enabled("display_market_status")}},sourceStatusesWidget:{errorSolution:!1},marketStatusWidgetEnabled:r.enabled("display_market_status"),chartWarningWidget:{subscriptionFullInfo:!1},timeScaleWidget:{contextMenuEnabled:r.enabled("scales_context_menu"),timezoneMenuEnabled:r.enabled("timezone_menu"),priceAxisLabelsOptions:{showLabels:r.enabled("main_series_scale_menu")}},timeScale:{preserveBarSpacing:!1,lockVisibleTimeRangeOnResize:r.enabled("lock_visible_time_range_on_resize"),rightBarStaysOnScroll:r.enabled("right_bar_stays_on_scroll"),minBarSpacing:urlParams.time_scale&&JSON.parse(urlParams.time_scale).min_bar_spacing},goToDateEnabled:r.enabled("go_to_date"),crossHair:{menuEnabled:r.enabled("chart_crosshair_menu")},handleScale:{mouseWheel:r.enabled("mouse_wheel_scale"),pinch:r.enabled("pinch_scale"),axisPressedMouseMove:{time:r.enabled("axis_pressed_mouse_move_scale"),price:r.enabled("axis_pressed_mouse_move_scale")}},handleScroll:{mouseWheel:r.enabled("mouse_wheel_scroll"),pressedMouseMove:r.enabled("pressed_mouse_move_scroll"),horzTouchDrag:r.enabled("horz_touch_drag_scroll"),vertTouchDrag:r.enabled("vert_touch_drag_scroll")},shiftVisibleRangeOnNewBar:r.enabled("shift_visible_range_on_new_bar"),croppedTickMarks:r.enabled("cropped_tick_marks"),countdownEnabled:r.enabled("countdown"),indicatorsDialogShortcutEnabled:r.enabled("insert_indicator_dialog_shortcut")},seriesControlBarEnabled:r.enabled("timeframes_toolbar"),seriesControlBar:{timeFramesWidgetEnabled:!0,timeFramesWidget:{goToDateEnabled:r.enabled("go_to_date"),availableTimeFrames:function(e,t){return e?t!==ie.STATUS_DELAYED&&t!==ie.STATUS_DELAYED_STREAMING&&t!==ie.STATUS_EOD&&t!==ie.STATUS_READY?[]:_.filter((function(t){return!(t.requiresIntraday&&!e.has_intraday)&&!(e.supported_resolutions&&!e.supported_resolutions.includes(t.targetResolution))})):[]}},timeWidgetEnabled:!0,timeWidget:{timezoneMenuEnabled:r.enabled("timezone_menu")},adjustForDividendsButtonEnabled:!1,sessionIdButtonEnabled:r.enabled("pre_post_market_sessions"),backAdjustmentButtonEnabled:!1,settlementAsCloseButtonEnabled:!1,percentageScaleButtonEnabled:!0,logScaleButtonEnabled:!0,autoScaleButtonEnabled:!0,fullscreenButtonEnabled:!0,mobileChangeLayoutEnabled:!1},globalEvents:!0,snapshotUrl:urlParams.snapshotUrl,mobileForceChartMaximizeEnabled:!1,saveChartEnabled:r.enabled("save_shortcut")};pe&&(K(),m.widgetOptions.isDrawingToolbarVisible=c),d&&(m.metaInfo={id:d.uid,name:d.name,description:d.description,uid:d.uid,username:"",tags:""}),window.parent[urlParams.uid].additionalSymbolInfoFields&&ne(window.parent[urlParams.uid].additionalSymbolInfoFields),window.parent[urlParams.uid].symbolSearchComplete&&oe(window.parent[urlParams.uid].symbolSearchComplete);var I=window.chartWidgetCollection=new Y(m);let M=!1;I.onAboutToBeDestroyed.subscribe(null,(()=>{M=!0}),!0),re(I),window.studyMarket=new T(I),void 0!==$&&$.registerService(q,I),I.activeChartWidget.subscribe((function(e){w.emit("activeChartChanged",I.getAll().indexOf(e))})), -window.saver=new g(I);var A=new f(I,window.saver),L=new v(I);window.chartWidget=I.activeChartWidget.value(),window.pro=new TradingView.Pro;var k=function(e){if(!r.enabled("header_widget"))return null;var t=U.allocate({areaName:"top"}),s=new(0,i(25927).ChartChangesWatcher)(e.chartWidgetCollection,window.saver,w),n=JSON.parse(urlParams.favorites);n.intervals=n.intervals.map((function(e){var t=""+e;return t.match(/1[DWMYdwmy]/)&&(t=t.slice(1)),t}));var l,c=null;r.enabled("study_templates")&&(c=new y(x,TVSettings),ye=new S({chartWidgetCollection:e.chartWidgetCollection,favoriteStudyTemplatesService:c}));var h=urlParams.header_widget_buttons_mode;"fullsize"===h&&(l=["full"]);"compact"===h&&(l=["small"]);return new a(new o,{chartSaver:window.saver,chartApiInstance:ChartApiInstance,chartWidgetCollection:e.chartWidgetCollection,defaultFavoriteStyles:n.chartTypes,defaultFavoriteIntervals:n.intervals,hideStudyTemplates:!0,resizerBridge:t,studyMarket:window.studyMarket,studyTemplates:ye,favoriteStudyTemplatesService:c,allowedModes:l,saveChartService:e.saveChartService,loadChartService:e.loadChartService,chartChangesWatcher:s,onClick:Ee,snapshotUrl:e.snapshotUrl})}({chartWidgetCollection:I,saveChartService:A,loadChartService:L,snapshotUrl:urlParams.snapshotUrl});null!==k?k.load().then((function(e){ve=e.getComponent(),Se.resolve()})):(Se.promise.catch((function(){})),Se.reject("header widget is not loaded"));var E=function(e){if(pe){var t=urlParams.toolbarbg&&/^[0-9a-f]+$/i.test(urlParams.toolbarbg)?String(urlParams.toolbarbg):void 0;if(t){var i=document.createElement("style");i.textContent="body,.chart-controls-bar,#footer-chart-panel{background-color:#"+t+" !important}",document.head.appendChild(i)}return new l({bgColor:t,chartWidgetCollection:e,drawingsAccess:urlParams.drawingsAccess?JSON.parse(urlParams.drawingsAccess):void 0,resizerBridge:U.allocate({areaName:"left"}),onClick:Ee})}return null}(I),D=null;window.tradingViewApi=new ee({chartWidgetCollection:I,chartApiInstance:window.ChartApiInstance,saveChartService:A,loadChartService:L});if(b.bindToChartWidgetCollection(I),TradingView.isNaN(urlParams.studyCountLimit)||(TradingView.STUDY_COUNT_LIMIT=Math.max(2,+urlParams.studyCountLimit)),!TradingView.isNaN(urlParams.ssreqdelay)){var V=Math.max(0,+urlParams.ssreqdelay);te(V)}window.ChartApiInstance.connect(),Promise.all([i.e(5652),i.e(8230),i.e(7624),i.e(4819),i.e(9333),i.e(6092),i.e(8619),i.e(8825),i.e(5761),i.e(4412),i.e(8009),i.e(1140),i.e(3562),i.e(105),i.e(5639),i.e(8819),i.e(6879),i.e(1528),i.e(7263),i.e(962),i.e(1075),i.e(5747),i.e(1890),i.e(2182),i.e(2804),i.e(2306)]).then(i.t.bind(i,59197,23)).then((({default:e})=>{M||(window.lineToolPropertiesToolbar=new e(I))}));var R=document.querySelector(".tv-content");function F(){E&&E.load(ce.signal),D&&D.load(ce.signal).then((function(e){window.footerWidget=e.getComponent()}))}null!==R&&R.addEventListener("contextmenu",(function(e){null!==e.target&&"input"!==e.target.tagName.toLowerCase()&&"textarea"!==e.target.tagName.toLowerCase()&&e.preventDefault()})),ue.resolve(), -I.undoHistory.undoStack().onChange().subscribe(null,N((function(e){e&&!e.customFlag("doesnt_affect_save")&&w.emit("onAutoSaveNeeded")}),1e3*(urlParams.autoSaveDelay||5),{leading:!1,trailing:!0})),window.chartWidget.withModel(null,(function(){if(ChartApiInstance.on("realtime_tick",(function(e){w.emit("onTick",e)})),!h.savedThemeName()&&ge){var e=h.getStdTheme(ge);e&&e.content&&void 0===n&&I.applyTheme({theme:e.content,onlyActiveChart:!1,restoreNonThemeDefaults:!1,themeName:ge,standardTheme:!0,syncState:!0,noUndo:!0}).then((()=>window.applyOverrides(window.__defaultsOverrides)))}r.enabled("charting_library_debug_mode")&&w.subscribeToAll((function(){var e=Array.prototype.slice.call(arguments);console.log('Event "{0}", arguments: {1}'.format(e[0],JSON.stringify(e.slice(1))))})),X&&(X(I),X=null),Z&&(Z(I,{seriesControlBarEnabled:r.enabled("timeframes_toolbar")}),Z=null)})),u.isAnyChartWidgetInitialized(I)?F():u.waitAnyChartWidgetInitialized(I,F),w.subscribe("chart_load_requested",(function(e){window.tradingViewApi.loadChart({json:JSON.parse(e.content),extendedData:e})}))};window.addEventListener("unload",(function(){ce.abort(),window.widgetbar&&(window.widgetbar.destroy(),window.widgetbar=null),window.chartWidgetCollection&&(window.chartWidgetCollection.destroy(),window.chartWidgetCollection=null),window.ChartApiInstance&&window.ChartApiInstance.disconnect(),H(),window.ChartApiInstance&&(window.ChartApiInstance.destroy(),window.ChartApiInstance=null)})),r.enabled("saveload_storage_customization")&&(window.parent[urlParams.uid].saveLoadAdapter?p.setCustomAdapter(window.parent[urlParams.uid].saveLoadAdapter):void 0!==urlParams.chartsStorageUrl&&urlParams.chartsStorageUrl&&void 0!==urlParams.clientId&&urlParams.clientId?p.initialize(urlParams.clientId,urlParams.userId,urlParams.chartsStorageUrl,urlParams.chartsStorageVer||"1.0"):(r.setEnabled("saveload_storage_customization",!1),r.setEnabled("header_saveload",!1)));var we=I();function Ce(){we.resolve()}window.parent[urlParams.uid].loadLastChart&&r.enabled("saveload_storage_customization")?p.getCharts().then((function(e){if(0!==e.length){var t=e.sort((function(e,t){return t.modified_iso-e.modified_iso}))[0];p.getChartContent(t).then((function(e){var t=JSON.parse(e.content);t.extendedData=e,urlParams.chartContent=JSON.stringify({json:t}),Ce()})).catch(Ce)}else Ce()})).catch(Ce):Ce();var Pe,Te,xe=I();Promise.all([xe.promise,we.promise,window.loadedCustomCss]).then((function(){var e,t,i,s,n,o,a=document.querySelector(".loading-indicator");if(a&&(a.style.display="none"),setTimeout(be,0),r.enabled("14851")&&Math.random()<=.02){e=window,t=document,i="script",s="ga",e.GoogleAnalyticsObject=s,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=1*new Date,n=t.createElement(i),o=t.getElementsByTagName(i)[0],n.async=1,n.src="//www.google-analytics.com/analytics.js",o.parentNode.insertBefore(n,o);var l=document.URL.match(new RegExp("(:?.*://)([^/]+)/.*"))[2];ga("create","UA-112911840-1","auto"),ga("set","anonymizeIp",!0),ga("set",{hostname:l,page:l,referrer:l}), -ga("send","pageview")}})),Pe=!0,window.parent[urlParams.uid].datafeed.onReady((function(e){Pe&&console.warn("`onReady` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),window.configurationData=e,xe.resolve()})),Pe=!1,window.getFunctionFromArguments=function(e){return window.parent[urlParams.uid][e]},window.createShortcutAction=(Te=_.createGroup({desc:"API"}),function(e,t){Te.add({hotkey:m(e),handler:t})}),window.initializationFinished=function(){window.chartWidgetCollection.undoHistory.clearStack()},window.headerReady=function(){return Se.promise},window.createButton=function(e){if(null===ve)throw new Error("Cannot create button: header widget is not ready or is not loaded - use `headerReady` to wait until header is ready");return(e=e||{}).align=e.align||"left",e.useTradingViewStyle=e.useTradingViewStyle||!1,ve.addButton(A(),e)},window.createDropdown=function(e){if(void 0===e)throw new Error("Cannot create dropdown without any parameters. Please refer to the documentation");void 0===e.align&&(e.align="left");const t=A();return ve?(ve.addDropdown(t,e),Promise.resolve(new ae(ve,t))):Se.promise.then((()=>(ve.addDropdown(t,e),new ae(ve,t))))},window.getAllFeatures=function(){const e=r.getAllFeatures();return Object.keys(e).forEach((function(t){isNaN(parseFloat(t))||delete e[t]})),e};var Ie=null;window.getNavigationButtonsVisibility=function(){return null===Ie&&(Ie=L(k())),Ie};var Me=null;window.getPaneButtonsVisibility=function(){return null===Me&&(Me=L(E())),Me};var Ae=null;window.getDateFormat=function(){return null===Ae&&(Ae=L(D)),Ae};var Le=null;window.getTimeHoursFormat=function(){return null===Le&&(Le=L(V)),Le};var ke=null;function Ee(e){var t=TradingView.bottomWidgetBar;t&&t.turnOffMaximize()}window.getCurrencyAndUnitVisibility=function(){return null===ke&&(ke=L(R())),ke}},11536:(e,t,i)=>{e=i.nmd(e),TradingView.cleanButAmpersand=function(e,t){var i=t?["&"]:["&"];return TradingView.clean(e,t,i)},TradingView.strip_tags=function(e){return e&&e.replace?e.replace(/(<([^>]+)>)/gi,""):e},TradingView.encodeSpread=function(e){return encodeURIComponent(e)},TradingView.clean=function(e,t,i){var s=[["&","&"],["<","<"],[">",">"],['"',"""],["'","'"],["'","'"]],r=e;if(!e||!e.replace)return r;for(var n=0;n{"use strict";i.r(t);var s=i(21097),r=i(51768),n=i(38780);function o(e,t=!1){"loading"!==document.readyState?t?setTimeout((()=>e()),1):e():document.addEventListener("DOMContentLoaded",(()=>e()))}new Promise((e=>{o(e)}));function a(e,t="x"){let i=!1;return"x"!==t&&"both"!==t||(i=i||e.offsetWidth{document.addEventListener("mouseenter",(e=>{const t=e.target;if(t instanceof HTMLElement&&t.matches(".apply-overflow-tooltip")){let e="x";if(t.matches(".apply-overflow-tooltip--direction_both")?e="both":t.matches(".apply-overflow-tooltip--direction_y")&&(e="y"),t.matches(".apply-overflow-tooltip--check-children-recursively")){if(!l(t,e))return}else if(t.matches(".apply-overflow-tooltip--check-children")){let i=!1;const s=t.children;for(let t=0;t(t.nodeType===Node.TEXT_NODE&&e.push(t.textContent||""),e)),[]).join("").trim(),(0,n.showOnElement)(t,{text:i});const s=()=>{(0,n.hide)(),["mouseleave","mousedown"].forEach((e=>t.removeEventListener(e,s)))};["mouseleave","mousedown"].forEach((e=>t.addEventListener(e,s)))}}),!0)}));var c=i(26867),h=i.n(c),d=i(11417),u=i(933);let p;function _(e){window.iframeAuthWidget&&!1===window.user.profile_data_filled&&(window.iframeAuthWidget.preventClose=!0);const t=window.user.available_offers||{};window.TVSettings&&window.TVSettings.sync(window.user.settings),window.is_authenticated?(e||(initOfferLoginStateChangeButton(),onGoPro()&&window.location.reload()),!1===window.user.profile_data_filled&&((0,r.trackEvent)("Conversion","First login"),delete window.user.profile_data_filled)):(Object.keys(t).forEach((e=>{const i=e;t[i].available_for_anons||delete t[i]})),window.user={username:"Guest",following:"0",followers:"0",ignore_list:[],available_offers:t},d.TVLocalStorage.removeItem("trial_availiable"))}p=window.loginStateChange?window.loginStateChange:window.loginStateChange=new(h()),p.subscribe(null,_),s.TVXWindowEvents.on("loginStateChange",(e=>{const t=JSON.parse(e);window.user=t.user,window.is_authenticated=!!t.is_authenticated,p.fire()})),s.TVXWindowEvents.on("signOut",(()=>{!function(){if(window.initData.lfs){const e=document.getElementsByClassName("js-admin-warning")[0];document.body.removeChild(e)}let e=!0;[/^\/chart\//,/^\/share-your-love\//].forEach((t=>{t.test(window.location.pathname)&&(e=!1)})),e&&window.location.reload()}()})),(()=>{const e="user-obj-changed",t={};window.crossTabSyncUserAttr=t=>{const i={};t instanceof Array?t.forEach((e=>{i[e]=window.user[e]})):i[t]=window.user[t],s.TVXWindowEvents.emit(e,JSON.stringify(i))},s.TVXWindowEvents.on(e,(e=>{const i=JSON.parse(e);let s;for(s in i)if(i.hasOwnProperty(s)){window.user[s]=i[s];(t[s]||[]).forEach((e=>{e.fire(i[s])}))}}))})(),window.TradingView.changeLoginState=e=>{window.is_authenticated=!!e,s.TVXWindowEvents.emit("loginStateChange",JSON.stringify({is_authenticated:window.is_authenticated,user:window.user})),p.fire()},window.loginUser=function(e,t){window.TVDialogs&&window.TVDialogs.signModal&&window.TVDialogs.signModal.close(),window.user=(0,u.deepExtend)({},e), -window.TradingView.changeLoginState(!0),"function"==typeof t&&window.TVDialogs&&window.TVDialogs.signModal?window.TVDialogs.signModal.on("signinSuccess",(()=>{t()})):"function"==typeof t&&t()},window.loginRequiredDelegate=new(h()),window.runOrSignIn=(e,t)=>{t||(t={}),e()},window.onLoginStateChange=_,window.TradingView.setTrialAvailiable=e=>{d.TVLocalStorage.setItem("trial_availiable",e?"1":"0")},window.TradingView.notificationsChanged=new(h())},38031:(e,t,i)=>{"use strict";i.r(t),i.d(t,{generateColor:()=>r,applyAlpha:()=>n,alphaToTransparency:()=>o,transparencyToAlpha:()=>a,applyTransparency:()=>l,resetTransparency:()=>c,getLuminance:()=>h,isHexColor:()=>d,colorFromBackground:()=>u,gradientColorAtPercent:()=>p,isColorDark:()=>_,rgbaFromInteger:()=>m,rgbaToInteger:()=>g,colorToInteger:()=>f});var s=i(24377);function r(e,t,i){if(t=t||0,!d(e))return i?(0,s.rgbaToString)((0,s.rgba)((0,s.parseRgb)(e),(0,s.normalizeAlphaComponent)(a(t)))):e;const[r,n,o]=(0,s.parseRgb)(e),l=(0,s.normalizeAlphaComponent)(a(t));return(0,s.rgbaToString)([r,n,o,l])}function n(e,t){return r(e,o(t))}function o(e){return 100*(1-e)}function a(e){if(e<0||e>100)throw new Error("invalid transparency");return 1-e/100}function l(e,t){if("transparent"===e)return e;const i=(0,s.parseRgba)(e),r=i[3];return(0,s.rgbaToString)((0,s.rgba)(i[0],i[1],i[2],a(t)*r))}function c(e){return"transparent"===e||d(e)?e:(0,s.rgbaToString)((0,s.rgba)((0,s.parseRgb)(e),(0,s.normalizeAlphaComponent)(1)))}function h(e){const t=(0,s.parseRgb)(e).map((e=>(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)));return Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function d(e){return 0===e.indexOf("#")}function u(e){return"black"===(0,s.rgbToBlackWhiteString)((0,s.parseRgb)(e),150)?"#ffffff":"#000000"}function p(e,t,i){const[r,n,o,a]=(0,s.parseRgba)(e),[l,c,h,d]=(0,s.parseRgba)(t),u=(0,s.rgba)(Math.round(r+i*(l-r)),Math.round(n+i*(c-n)),Math.round(o+i*(h-o)),a+i*(d-a));return(0,s.rgbaToString)(u)}function _(e){return h(c(e))<.5}function m(e){const t=(e=Math.round(e))%256;e-=t;const i=(e/=256)%256;e-=i;const s=(e/=256)%256;e-=s;return`rgba(${t},${i},${s},${(e/=256)/255})`}function g(e){const t=Math.round(255*e[3]);return e[0]+256*e[1]+65536*e[2]+16777216*t}function f(e){const t=(0,s.tryParseRgba)(e);return null===t?0:g(t)}},70439:(e,t,i)=>{"use strict";i.d(t,{doAnimate:()=>n});const s={from:0,duration:250,easing:i(41207).easingFunc.easeOutCubic};class r{constructor(e){this._doing=!0,this._completed=!1,this._options={...s,...e};const t=performance.now();window.requestAnimationFrame((e=>{this._animation(t,this._options.from,e)}))}stop(){this._doing=!1}completed(){return this._completed}_animation(e,t,i){if(!this._doing)return void this._finishAnimation();const s=(i=!i||i<1e12?performance.now():i)-e,r=s>=this._options.duration||t===this._options.to,n=(o=this._options.from,a=this._options.to,l=this._options.easing(s/this._options.duration),o*(1-l)+a*l);var o,a,l;const c=r?this._options.to:n,h=c-t;this._options.onStep(h,c), -r?this._finishAnimation():window.requestAnimationFrame((t=>{this._animation(e,c,t)}))}_finishAnimation(){this._options.onComplete&&this._options.onComplete(),this._completed=!0}}function n(e){return new r(e)}},93043:(e,t,i)=>{"use strict";i.d(t,{fetch:()=>s});(0,i(98351).getLogger)("Fetch");function s(e,t,i={}){return window.fetch(e,t)}},98351:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LOGLEVEL:()=>n,getLogLevel:()=>g,isHighRateEnabled:()=>f,setLogLevel:()=>v,getRawLogHistory:()=>S,serializeLogHistoryEntry:()=>y,getLogHistory:()=>b,getLogger:()=>C,loggingOn:()=>T,loggingOff:()=>x});const s="undefined"!=typeof window?window:{};let r=!1;try{localStorage.getItem(""),r=!0}catch(e){}var n;!function(e){e[e.ERROR=1]="ERROR",e[e.WARNING=2]="WARNING",e[e.INFO=3]="INFO",e[e.NORMAL=4]="NORMAL",e[e.DEBUG=5]="DEBUG"}(n||(n={}));let o=0;const a="tv.logger.loglevel",l="tv.logger.logHighRate",c=[];let h=null,d=null,u=null,p=NaN,_=n.WARNING,m=!1;function g(){return _}function f(){return m}function v(e){e=Math.max(n.ERROR,Math.min(n.DEBUG,e)),_=e,I()}function S(e,t){let i=c.reduce(((e,t)=>e.concat(t)),[]);return i.sort(((e,t)=>e.id-t.id)),void 0!==t&&(i=i.filter((e=>e.subSystemId===t))),"number"==typeof e&&(i=i.slice(-e)),i}function y(e){return new Date(e.timestamp).toISOString()+":"+e.subSystemId+":"+e.message.replace(/"/g,"'")}function b(e,t){return function(e,t){let i,s=0,r=0;for(i=e.length-1;i>=1&&(s+=8*(1+encodeURIComponent(e[i]).length),!(i-1>0&&(r=8*(1+encodeURIComponent(e[i-1]).length),s+r>t)));i--);return e.slice(i)}(S(e,t).map(y),75497472)}function w(e,t,i,s){if(t===d&&s.id===u)return;const r=new Date;if(e<=n.NORMAL&&function(e,t,i,s,r){"function"==typeof structuredClone&&(t=structuredClone(t));const n={id:o,message:t,subSystemId:s,timestamp:Number(e)};o+=1,i.push(n),void 0!==r&&i.length>r&&i.splice(0,1)}(r,t,i,s.id,s.maxCount),e<=_&&(!s.highRate||f())&&(!h||s.id.match(h))){const i=r.toISOString()+":"+s.id+":"+t;switch(e){case n.DEBUG:console.debug(i);break;case n.INFO:case n.NORMAL:s.color?console.log("%c"+i,"color: "+s.color):console.log(i);break;case n.WARNING:console.warn(i);break;case n.ERROR:console.error(i)}d=t,u=s.id,p&&clearTimeout(p),p=setTimeout((()=>{d=null,u=null,p=NaN}),1e3)}}function C(e,t={}){const i=[];c.push(i);const s=Object.assign(t,{id:e});function r(e){return t=>w(e,String(t),i,s)}return{logDebug:r(n.DEBUG),logError:r(n.ERROR),logInfo:r(n.INFO),logNormal:r(n.NORMAL),logWarn:r(n.WARNING)}}const P=C("logger"),T=s.lon=(e,t)=>{v(n.DEBUG),P.logNormal("Debug logging enabled"),m=Boolean(e),h=t||null,I()},x=s.loff=()=>{v(n.INFO),P.logInfo("Debug logging disabled")};function I(){try{r&&(localStorage.setItem(l,String(m)),localStorage.setItem(a,String(_)))}catch(e){P.logWarn(`Cannot save logger state (level: ${_}, high-rate: ${m}) to localStorage: ${e.message}`)}}!function(){m=!!r&&"true"===localStorage.getItem(l);let e=parseInt(r&&localStorage.getItem(a)||"");Number.isNaN(e)&&(e=n.WARNING),v(e),P.logNormal(`Init with settings - level: ${_}, high-rate: ${m}`)}(), -s.performance&&s.performance.now?P.logNormal(`Sync logger and perf times, now is ${s.performance.now()}`):P.logWarn("Perf time is not available")},95242:(e,t,i)=>{"use strict";function s(e,t,i,s){return`${s?s+" ":""}${i?i+" ":""}${e}px ${t}`}i.d(t,{makeFont:()=>s,parseFont:()=>n});const r=/(bold )?(italic )?(\d+)(px|pt) (.*)$/;function n(e){const t=r.exec(e);return null===t?null:{family:t[5],size:parseInt(t[3])*("pt"===t[4]?.75:1),bold:Boolean(t[1]),italic:Boolean(t[2])}}},70641:(e,t,i)=>{"use strict";i.d(t,{visitObject:()=>n});var s=i(65665);function r(e,t,i){return(0,s.isArray)(e)?function(e,t,i){return e.map((e=>{const s=r(e,t,i),n=t(s);return void 0!==n?n:s}))}(e,t,i):(0,s.isObject)(e)&&((0,s.isHashObject)(e)||i&&i.visitInstances)?function(e,t,i){const s={};return Object.keys(e).forEach((n=>{const o=r(e[n],t,i),a=t(o);s[n]=void 0!==a?a:o})),s}(e,t,i):e}function n(e,t,i){const s=r(e,t,i),n=t(s);return void 0!==n?n:s}},41225:(e,t,i)=>{"use strict";function s(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}i.d(t,{regExpEscape:()=>s})},80142:(e,t,i)=>{"use strict";i.r(t),i.d(t,{isRtl:()=>r,stripLTRMarks:()=>a,startWithLTR:()=>l,forceLTRStr:()=>c,forceLTRStrSsr:()=>h,forceRTLStr:()=>d,getLTRScrollLeft:()=>u,getLTRScrollLeftOffset:()=>p,detectAutoDirection:()=>g});var s=i(64531);const r=()=>"rtl"===window.document.dir,n="‬",o=new RegExp("‎|‪|‫|‬","g");function a(e){return""!==e&&r()&&null!=e?e.replace(o,""):e}function l(e){return""!==e&&r()&&null!=e?"‎"+e:e}function c(e){return""!==e&&r()&&null!=e?"‪"+e+n:e}function h(e){return"‪"+e+n}function d(e){return""!==e&&r()&&null!=e?"‫"+e+n:e}function u(e){return(0,s.getNormalizedScrollLeft)(e,"rtl")}function p(e,t){const i=(0,s.detectScrollType)();if("indeterminate"===i)return 0;switch(i){case"negative":t=e.clientWidth-e.scrollWidth+t;break;case"reverse":t=e.scrollWidth-e.clientWidth-t}return t}const _=/[^\u0000-\u0040\u005B-\u0060\u007B-\u00BF\u00D7\u00F7\u02B9-\u02FF\u2000-\u200E\u2010-\u2029\u202C\u202F-\u2BFF]/,m=/[\u0590-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]/;function g(e){const t=_.exec(e);return t?m.test(t[0])?"rtl":"ltr":""}},41207:(e,t,i)=>{"use strict";i.d(t,{CubicBezier:()=>s.CubicBezier,dur:()=>s.dur,easingFunc:()=>s.easingFunc});var s=i(74991)},28105:(e,t,i)=>{"use strict";function s(){return Promise.all([i.e(8230),i.e(5384),i.e(346),i.e(5100),i.e(962),i.e(3016),i.e(2077)]).then(i.bind(i,73501))}i.d(t,{loadChangeIntervalDialog:()=>s})},84603:(e,t,i)=>{"use strict";i.d(t,{showChangeIntervalDialogAsync:()=>n});var s=i(28105);let r=null;function n(e){const t=r=(0,s.loadChangeIntervalDialog)().then((i=>{t===r&&i.showChangeIntervalDialog(e)}));return t}},68009:(e,t,i)=>{"use strict";function s(e){return Promise.all([i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(9333),i.e(8619),i.e(346),i.e(7177),i.e(8049),i.e(8955),i.e(9415),i.e(3046),i.e(7342),i.e(962),i.e(8180),i.e(3016),i.e(1075),i.e(9050),i.e(1859)]).then(i.bind(i,78789)).then((t=>t.showGoToDateDialog(e)))}i.d(t,{showGoToDateDialog:()=>s})},25071:(e,t,i)=>{"use strict";i.d(t,{ -showTooManyStudiesNotice:()=>n});var s=i(44352),r=i(3615);function n(e){"number"!=typeof e&&(e=TradingView.STUDY_COUNT_LIMIT),(0,r.showWarning)({title:s.t(null,void 0,i(33603)),text:s.t(null,void 0,i(70213)).format({number:e})})}},30371:(e,t,i)=>{"use strict";i.d(t,{StudyMarket:()=>n});var s=i(40549),r=i.n(s);class n{constructor(e,t){this._visibility=new(r())(!1),this._dialogPromise=null,this._dialog=null,this._chartWidgetCollection=e,this._options=t}visible(){return this._visibility.readonly()}show(e,t,i){var s;const r=void 0;null===this._dialog&&this._requestDialog(null!=e?e:[],r,t,i),null===(s=this._dialog)||void 0===s||s.open(null!=e?e:[],r,t,i)}hide(){var e;null===(e=this._dialog)||void 0===e||e.hide()}resetAllPages(){var e;null===(e=this._dialog)||void 0===e||e.resetAllStudies()}_requestDialog(e,t,s,r){if(null===this._dialogPromise){let n;n=Promise.all([i.e(8230),i.e(5384),i.e(1428),i.e(1685),i.e(8619),i.e(8271),i.e(4412),i.e(6304),i.e(9262),i.e(962),i.e(3016),i.e(6456)]).then(i.bind(i,56903)).then((e=>new e.IndicatorsLibraryContainer(this._chartWidgetCollection,this._options))),this._dialogPromise=n.then((i=>{this._dialog=i,this._dialog.visible().subscribe((e=>{this._visibility.setValue(e)})),this._dialog.open(e,t,s,r)}))}return this._dialogPromise}}},65312:(e,t,i)=>{"use strict";i.d(t,{setAdditionalSymbolInfoFields:()=>r,getAdditionalSymbolInfoFields:()=>n});let s=[];function r(e){s=e}function n(){return s}},29628:(e,t,i)=>{"use strict";function s(e,t){Promise.all([i.e(8230),i.e(5384),i.e(2685),i.e(962),i.e(3016),i.e(9374)]).then(i.bind(i,16078)).then((i=>{i.showSymbolInfoDialog(null!=e?e:null,t)}))}i.d(t,{showSymbolInfoDialog:()=>s})},26690:(e,t,i)=>{"use strict";i.d(t,{ChartSaverBase:()=>a});var s=i(16230),r=i(25927),n=i(26867),o=i.n(n);new WeakMap;new TextEncoder;class a{constructor(e){this._prevChartState=null,this._chartSavedDelegate=new(o()),this._chartWidgetCollection=e}saveChartLineTools(e,t,i,s){return Promise.reject("Line tools storage is not supported")}_getCommonSavingInfo(e){const t=this._chartWidgetCollection,i=this._chartWidgetCollection.chartsSymbols(),s=i[t.activeChartWidget.value().id()],r={...(n=s,{...n,legs:JSON.stringify(null!==(o=n.legs)&&void 0!==o?o:[])})};var n,o;const a=t.metaInfo;return a.id.value()&&(r.id=a.id.value()),r.name=a.name.value()||"",r.description=a.description.value()||"",r.charts_symbols=function(e){const t={};for(const i of Object.keys(e))t[i]={symbol:e[i].symbol};return JSON.stringify(t)}(i),r.is_realtime=r.is_realtime=e?"0":"1",r}async _saveLineToolsToStorage(){return Promise.resolve()}async _saveChart(e,t,i,n){var o;const a=this._chartWidgetCollection.metaInfo;let l=null!==(o=n.changes)&&void 0!==o?o:r.changedAll,c=!0;if(2&l)try{await this._saveLineToolsToStorage()}catch(e){l|=1,c=!1}if(1&l){const r=e(c);if((0,s.default)(this._prevChartState,r)&&null!==a.id.value())return this._chartSavedDelegate.fire(!0),void t(a,r);0;const o=(e,i)=>(c||this._chartWidgetCollection.getAll().forEach((e=>{var t -;return null===(t=e.lineToolsSynchronizer())||void 0===t?void 0:t.markAsValidatedBecuaseOfSavingToContent(!0)})),t(e,i));return this._saveChartImpl(r,a,o,i,n,e)}this._chartSavedDelegate.fire(!0),t(a,null)}}},93919:(e,t,i)=>{"use strict";var s=i(26867),r=i(50151).assert,n=i(7276).backend,o=i(26690).ChartSaverBase;i(44352).t(null,void 0,i(8162)),i(44352).t(null,void 0,i(17994)),i(44352).t(null,void 0,i(87375));function a(e,t){e.content=JSON.stringify(t)}t.ChartSaver=class extends o{constructor(e){super(e),this._chartAboutToBeSavedDelegate=new s,this._chartSavedDelegate=new s,this._chartSizeLimitExceededDelegate=new s}chartSizeLimitExceeded(){return this._chartSizeLimitExceededDelegate}chartAboutToBeSaved(){return this._chartAboutToBeSavedDelegate}chartSaved(){return this._chartSavedDelegate}saveToJSON(){var e=this._getCommonSavingInfo(!1);return a(e,this._getChartWidgetCollectionState(!1,!0)),e}_getChartWidgetCollectionState(e,t,i,s,r){return e||(t=!0,s=!1),t?this._chartWidgetCollection.state(!!e,i,s,r):this._chartWidgetCollection.activeChartWidget.value().state(!!e,i,s,r)}publishChart(e){}publishScript(e,t,i){}onPublish(e,t){}_saveChartImpl(e,t,i,s,r,o){var a=i,l=s;if(a=function(s){t.id.value()||(t.id.setValue(s),t.uid.setValue(s)),"function"==typeof i&&i(t,e)},!e.name)return console.warn("Saving chart with empty name is not allowed"),void s();n.saveChart(e.name,e.short_name,e.resolution,e,t).then(a.bind(this)).catch(l.bind(this))}saveChartSilently(e,t,i){i=i||{};var s=function(e){var t=e&&!1,s=this._getChartWidgetCollectionState(!1,void 0,void 0,void 0,t),r=this._getCommonSavingInfo(!1,t);return a(r,s),i.chartName&&(r.name=i.chartName),r.name&&0!==r.name.length||!i.defaultChartName||(r.name=i.defaultChartName),i.autoSave&&(r.autoSave=!0),r}.bind(this);this._isSaveInProcess=!0,this._chartAboutToBeSavedDelegate.fire(),this._saveChart(s,function(t,i){r(!this._chartWidgetCollection.readOnly(),"Trying to save layout in read-only mode"),i&&this._chartWidgetCollection.metaInfo.name.setValue(i.name),this._prevChartState=i,this._chartSavedDelegate.fire(!0),this._isSaveInProcess=!1,e&&e({uid:t.uid.value(),data:i}),this._prevChartState&&delete this._prevChartState.savingToken}.bind(this),function(){this._chartSavedDelegate.fire(!1),this._isSaveInProcess=!1,t&&t.apply(null,arguments)}.bind(this),i)}isSaveInProcess(){return this._isSaveInProcess}}},23902:(e,t,i)=>{"use strict";i.d(t,{getTranslatedSymbolDescription:()=>s});i(44352);function s(e){return e.description||""}},86339:(e,t,i)=>{"use strict";function s(e){return e+"…"}i.d(t,{appendEllipsis:()=>s})},99630:(e,t,i)=>{"use strict";function s(e){if(!o(e))throw e}function r(e){return(null==e?void 0:e.aborted)?Promise.reject(n()):new Promise(((t,i)=>{null==e||e.addEventListener("abort",(()=>i(n())),{once:!0})}))}function n(){return new DOMException("Aborted","AbortError")}function o(e){return e instanceof Error&&"AbortError"===e.name}function a(e,t){return Promise.race([r(e),t])}async function l(e,t){let i;try{await a(e,new Promise((e=>{i=setTimeout(e,t)})))}finally{ -clearTimeout(i)}}i.d(t,{skipAbortError:()=>s,isAbortError:()=>o,respectAbort:()=>a,delay:()=>l})},85228:(e,t,i)=>{"use strict";function s(e){let t;if("object"!=typeof e||null==e||"number"==typeof e.nodeType)t=e;else if(e instanceof Date)t=new Date(e.valueOf());else if(Array.isArray(e)){t=[];let i=0;const r=e.length;for(;is})},933:(e,t,i)=>{"use strict";function s(e,...t){return e&&"object"==typeof e?(0===t.length||t.forEach((t=>{null!=t&&"object"==typeof t&&Object.keys(t).forEach((i=>{const n=e[i],o=t[i];if(o===e)return;const a=Array.isArray(o);if(o&&(r(o)||a)){let t;t=a?n&&Array.isArray(n)?n:[]:n&&r(n)?n:{},e[i]=s(t,o)}else void 0!==o&&(e[i]=o)}))})),e):e}function r(e){if(!e||"[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);if(!t)return!0;const i=Object.hasOwnProperty.toString,s=t.hasOwnProperty("constructor")&&t.constructor;return"function"==typeof s&&i.call(s)===i.call(Object)}i.d(t,{deepExtend:()=>s})},71668:(e,t,i)=>{"use strict";function s(){let e,t;return{promise:new Promise(((i,s)=>{e=i,t=s})),reject:t,resolve:e}}i.d(t,{createDeferredPromise:()=>s})},33972:(e,t,i)=>{"use strict";function s(e){if(void 0===e)return"";if(e instanceof Error){let t=e.message;return e.stack&&(t+=" "+e.stack),t}return"string"==typeof e?e.toString():JSON.stringify(e)}i.d(t,{errorToString:()=>s})},5692:(e,t,i)=>{"use strict";i.d(t,{getTwemojiUrl:()=>r});var s=i(18438);function r(e,t){let i="";return s.default.parse(e,(e=>(i=s.default.base+("svg"===t?`svg/${e}.svg`:`72x72/${e}.png`),!1))),i}s.default.base="https://cdnjs.cloudflare.com/ajax/libs/twemoji/13.0.1/"},68671:(e,t,i)=>{"use strict";i.r(t),i.d(t,{guid:()=>r,randomHash:()=>n,randomHashN:()=>o});const s="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function r(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function n(){return o(12)}function o(e){let t="";for(let i=0;i{"use strict";i.d(t,{parseHtml:()=>r,parseHtmlElement:()=>n});const s=new WeakMap;function r(e,t){let i,r;return i=null==t?document.documentElement:9===t.nodeType?t.documentElement:t,s&&(r=s.get(i)),r||(r=i.ownerDocument.createRange(),r.selectNodeContents(i),s&&s.set(i,r)),r.createContextualFragment(e)}function n(e,t){const i=r(e,t),s=i.firstElementChild;return null!==s&&i.removeChild(s),s}},33933:(e,t,i)=>{"use strict";function s(e){e.preventDefault()}i.d(t,{preventDefault:()=>s,preventDefaultForContextMenu:()=>n});const r=["input:not([type])",'input[type="text"]','input[type="email"]','input[type="password"]','input[type="search"]','input[type="number"]','input[type="url"]',"textarea","a[href]",'*[contenteditable="true"]',"[data-allow-context-menu]"];function n(e){const t=e.target -;t&&!t.closest(r.join(", "))&&e.preventDefault()}},10381:(e,t,i)=>{"use strict";i.d(t,{htmlEscape:()=>n,removeSpaces:()=>o,capitalizeFirstLetterInWord:()=>a});const s=/[<"'&>]/g,r=e=>`&#${e.charCodeAt(0)};`;function n(e){return e.replace(s,r)}function o(e=""){return e.replace(/\s+/g,"")}function a(e=""){return e.replace(/\b\w/g,(e=>e.toUpperCase()))}},21095:(e,t,i)=>{"use strict";function s(e){return e.reduce((function(e,t,i){return~e.indexOf(t)||e.push(t),e}),[])}i.r(t),i.d(t,{uniq:()=>s})},1457:e=>{e.exports=''},55824:e=>{e.exports=''},37924:e=>{e.exports=''},2872:e=>{e.exports=''},32164:e=>{ -e.exports=''},39267:e=>{e.exports=''},16911:e=>{e.exports=''},6862:e=>{e.exports=''},54190:e=>{e.exports=''},25191:e=>{ -e.exports=''},51983:e=>{e.exports=''},35149:e=>{e.exports=''},84959:e=>{e.exports=''},97874:e=>{ -e.exports=''},77067:e=>{e.exports=''},76351:e=>{e.exports=''},91753:e=>{e.exports=''},10123:e=>{"use strict";e.exports=JSON.parse('{"4":["v",["h",0,2],["h",1,3]],"6":["v",["h",0,2,4],["h",1,3,5]],"8":["v",["h",0,2,4,6],["h",1,3,5,7]],"2h":["h",0,1],"2v":["v",0,1],"2-1":["v",["h",0,2],1],"3s":["h",0,["v",1,2]],"3h":["h",0,1,2],"3v":["v",0,1,2],"1-2":["v",0,["h",1,2]],"3r":["h",["v",0,1],2],"4h":["h",0,1,2,3],"4v":["v",0,1,2,3],"4s":["h",0,["v",1,2,3]],"5h":["h",0,1,2,3,4],"6h":["h",0,1,2,3,4,5],"7h":["h",0,1,2,3,4,5,6],"8h":["h",0,1,2,3,4,5,6,7],"1-3":["v",0,["h",1,2,3]],"2-2":["v",["h",0,1],["v",2,3]],"2-3":["v",["h",0,1],["h",2,3,4]],"1-4":["v",0,["h",1,2,3,4]],"5s":["h",0,["v",1,2,3,4]],"6c":["v",["h",0,1],["h",2,3],["h",4,5]],"8c":["v",["h",0,1],["h",2,3],["h",4,5],["h",6,7]],"s":0}')}},e=>{e.O(0,[7076,7717,4618],(()=>{return t=67498,e(e.s=t);var t}));e.O()}]); \ No newline at end of file +throw new Error("Not implemented")}_areStudyInputsModified(e){if(0===Object.keys(e).length)return!1;if(void 0===this._oldStudyInputs)return!0;const t=Object.keys(this._oldStudyInputs);(0,n.assert)(t.length===Object.keys(e).length,"keys quantity should be equal");for(const i of t)if((0,n.assert)(e.hasOwnProperty(i),`key '${i}' should exist in study inputs`),(0,n.ensureDefined)(this._oldStudyInputs)[i]!==e[i])return!0;return!1}_getStudyErrorText(e){return e.split(":",2)[0]}}},83956:(e,t,i)=>{"use strict";i.d(t,{StudyCompare:()=>F});var s=i(50151),r=i(35624),n=i(68927),o=i(1930),a=i(26220),l=i.n(a),c=i(2484),h=i(99846),d=i(67876),u=i(1194),p=i(38031);const _=c.enabled("force_exchange_as_title");class m extends d.PriceAxisView{constructor(e,t){super(),this._studyCompare=e,this._data=t}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const r=this._studyCompare.priceScale(),n=this._studyCompare.lastValueData(this._data.plotIndex,!1);if(n.noData||null===r||r.isEmpty())return;const o=this._studyCompare.model(),a=o.timeScale().visibleBarsStrictRange(),l=o.mainSeries().bars().lastIndex();if(null===a||null===l)return;if(l<=a.lastBar())i.background=(0,p.resetTransparency)(n.color),i.textColor=this.generateTextColor(i.background),i.borderColor=void 0,e.borderVisible=!1,t.borderVisible=!1;else{const r=o.backgroundColorAtYPercentFromTop(n.coordinate/(0,s.ensureNotNull)(o.paneForSource(this._studyCompare)).height());i.background=r,i.textColor=(0,p.resetTransparency)(n.color),i.borderColor=i.textColor,e.borderVisible=!0,t.borderVisible=!0}i.coordinate=n.coordinate,i.floatCoordinate=n.floatCoordinate;const c=o.properties().childs().scalesProperties.childs();c.showSeriesLastValue.value()&&(e.text=(0,u.getCurrentModePriceText)(r,n),c.seriesLastValueMode.value()!==h.PriceAxisLastValueMode.LastPriceAndPercentageValue?e.secondLine="":e.secondLine=(0,u.getOppositeModePriceText)(r,n),e.visible=!0),t.text="",c.showSymbolLabels.value()&&(t.text=this._paneText(),t.visible=t.text.length>0)}_paneText(){let e="";const t=this._studyCompare.symbolInfo();return _?e=(0,o.displayedSymbolExchange)(t):this._studyCompare.model().properties().childs().scalesProperties.childs().showSymbolLabels.value()&&(e=(0,o.displayedSymbolName)(t)),e}}i(44352);var g=i(35823),f=i(28667),v=i(76076),S=i(49483),y=i(65665),b=i(77513);class w extends b.StudyValuesProvider{constructor(e,t){super(e,t),this._emptyValues[0].title=e.guiPlotName("")}_hideValues(){return!1}}const P=S.CheckMobile.any();class C extends g.StudyDataWindowView{constructor(e,t){super(e,t),this._studyCompare=e}_hideValues(){return!1}_createValuesProvider(e,t){return new w(e,t)}_currentIndex(){const e=this._model.crossHairSource().lockedIndex;let t;return P&&(null===this._model.crossHairSource().pane&&void 0===e||(0,f.isLineToolName)(v.tool.value())||null!==this._model.lineBeingEdited())?t=this._study.data().lastIndex():(t=this._model.crossHairSource().appliedIndex(),(0,y.isNumber)(t)||(t=this._study.data().lastIndex())),t}}class T extends C{constructor(e,t){super(e,t),this._additional=null, +this._showSeriesOHLC=t.properties().childs().paneProperties.childs().legendProperties.childs().showSeriesOHLC,this._showSeriesOHLC.subscribe(this,this.update)}areValuesVisible(){return this._showSeriesOHLC.value()}destroy(){this._showSeriesOHLC.unsubscribeAll(this)}additional(){return this._additional}_updateImpl(){super._updateImpl()}}var x=i(66019),I=i(69145),M=i(89111);class A extends M.StudyStatusProvider{getSplitTitle(){return this._source.titleInParts(!0,void 0,!1,!1)}text(){return this._source.isActualInterval()?this._source.isFailed()?`${this._source.title(!0,void 0,!1,!1)}: ${this.sourceStatusText()}`:`${this._source.title(!0,void 0,!1,!1)} ${this.sourceStatusText()}`:this._source.title(!0,void 0,!1,!1)}}var L=i(90854),k=i(40549),E=i.n(k);const D=c.enabled("study_overlay_compare_legend_option"),B=c.enabled("force_exchange_as_title"),V=c.enabled("uppercase_instrument_names"),R=!c.enabled("hide_study_compare_legend_item"),N=c.enabled("hide_unresolved_symbols_in_legend"),O=c.enabled("symbol_info_price_source");class F extends n.Study{constructor(e,t,i,s){super(e,function(e){return e.hasChild("currencyId")||e.addChild("currencyId",new(l())(null)),e.hasChild("unitId")||e.addChild("unitId",new(l())(null)),e.addExclusion("currencyId"),e.addExclusion("unitId"),e}(t),i,s),this._isActingAsSymbolSource=new(E())(!0),this._realignToolsLastParams=null,this.properties().childs().minTick.subscribe(null,(()=>this._recreatePriceFormattingDependencies())),this.properties().childs().minTick.subscribe(null,(()=>this._model.fullUpdate())),this.properties().childs().currencyId.subscribe(this,this._onCurrencyChanged),this.properties().childs().unitId.subscribe(this,this._onUnitChanged),this.properties().merge({skipHistogramBaseOnAutoScale:!0}),this._symbolResolvingActive=new(E())(!1),this._symbolHibernated=new(E())(!1),e.mainSeries().onIntervalChanged().subscribe(this,(()=>e.realignLineTools(this)))}destroy(){this._model.mainSeries().onIntervalChanged().unsubscribeAll(this),super.destroy()}properties(){return this._properties}isActingAsSymbolSource(){return this._isActingAsSymbolSource.readonly()}createPriceAxisView(e){return new m(this,{plotIndex:"compare"})}setSymbolParams(e){this._setSymbolCurrencyUnitInternal(e)}symbol(){return this.properties().childs().inputs.childs().symbol.value()}setSymbol(e){this.setSymbolParams({symbol:e})}symbolInfo(){if(!this._resolvedSymbols)return null;const e=this.properties().childs().inputs.childs().symbol.value();if(!e)return null;let t;return t=this._resolvedSymbols[this._getSymbolForResolve(e)]||null,t}symbolResolved(){return this.symbolsResolved()}symbolResolvingActive(){return this._symbolResolvingActive}symbolHibernated(){return this._symbolHibernated}isVisible(){const e=super.isVisible();return this._symbolHibernated.setValue(!e),e}symbolSameAsCurrent(e){return(0,L.symbolSameAsCurrent)(e,this.symbolInfo())}currency(){return this.properties().childs().currencyId.value()||null}setCurrency(e){this.setSymbolParams({currency:e})}isConvertedToOtherCurrency(){return(0, +o.isConvertedToOtherCurrency)(this.symbolInfo())}unit(){return this.properties().childs().unitId.value()||null}setUnit(e){this.setSymbolParams({unit:e})}isConvertedToOtherUnit(){return(0,o.isConvertedToOtherUnit)(this.symbolInfo(),this._model.unitConversionEnabled())}style(){return 2}setStyle(e){}interval(){return this._model.mainSeries().interval()}setInterval(e){}symbolSource(){return this}state(e,t){const i=super.state(e,t);return this._model.unitConversionEnabled()||delete i.state.unitId,e&&((0,s.ensureDefined)(i.data).symbols={___snapshot:this.symbolInfo()||void 0}),i}symbolTitle(e,t){return this.title(!0,{},!1,e)}titleInParts(e,t,i,s){var r;const n=this._titleInParts(e,t,i,s),o=[n[0],...null!==(r=n[1])&&void 0!==r?r:[]].join(", ");return[V?o.toUpperCase():o]}tags(){const e=this.symbol();return e?[e]:[]}statusView(){return R?super.statusView():null}guiPlotName(e){return this.properties().childs().inputs.childs().symbol.value()}canOverrideMinTick(){return!0}canBeHiddenByGlobalFlag(){return!1}valuesProvider(){return new w(this,this.model())}statusProvider(e){return new A(this,this._model.properties().childs().scalesProperties.childs().textColor)}measureUnitId(){return(0,o.measureUnitId)(this.symbolInfo())}_createViews(){this._legendView||(this._legendView=new T(this,this._model)),this._dataWindowView||(this._dataWindowView=new C(this,this._model)),this._statusView||(this._statusView=new x.StudyStatusView(this)),super._createViews()}_showLastValueOnPriceScale(){return this._model.properties().childs().scalesProperties.childs().showSeriesLastValue.value()}_onUnitChanged(){"alwaysOff"!==(0,r.currencyUnitVisibilityProperty)().value()&&this._model.fullUpdate(),this._model.unitConversionEnabled()&&this.isStarted()&&this._tryChangeInputs(),this._unitChanged.fire()}_getSymbolObject(e){const t=super._getSymbolObject(e),i=this.currency();null!==i&&(t["currency-id"]=i);const s=this.unit();return this._model.unitConversionEnabled()&&null!==s&&(t["unit-id"]=s),t}_getSymbolForApi(e){return(0,o.symbolForApi)(this._resolvedSymbolsByInput[e]||null,e)}_onSymbolResolvingStart(){super._onSymbolResolvingStart(),this._symbolResolvingActive.setValue(!0)}_onSymbolError(){super._onSymbolError(),this._symbolResolvingActive.setValue(!1)}_onSymbolResolved(e,t,i){super._onSymbolResolved(e,t,i),this._recreatePriceFormattingDependencies();const s=t===this.symbol()?(0,o.extractSymbolNameFromSymbolInfo)(i,this.symbol()):null,r=(0,o.symbolCurrency)(i),n=(0,o.symbolUnit)(i,this._model.unitConversionEnabled());this._setSymbolCurrencyUnitInternal({symbol:null!=s?s:void 0,currency:r,unit:n},i),this._symbolResolvingActive.setValue(!1)}_changeInputsImpl(e,t){super._changeInputsImpl(e,t),this._realignLineToolsIfParamsChanged()}_createStudyOnServer(){super._createStudyOnServer(),this._realignLineToolsIfParamsChanged()}_tryCreateFormatter(){var e,t +;const i=null!==(t=null===(e=null===I.customFormatters||void 0===I.customFormatters?void 0:I.customFormatters.priceFormatterFactory)||void 0===e?void 0:e.call(I.customFormatters,this.symbolInfo(),this.properties().childs().minTick.value()))&&void 0!==t?t:null;return null!==i?i:(0,o.createSeriesFormatter)(this.symbolInfo(),this.properties().childs().minTick.value())}_titleInParts(e,t,i,s){const r=this.symbolInfo();return[this._getSymbolTitlePart(r),[this._getExchangeTitlePart(r,s),this._getPriceSourceTitlePart(r)].filter((e=>null!==e))]}_getSymbolTitlePart(e){var t;if(null===e)return N?"":this.properties().childs().inputs.childs().symbol.value();const i=(0,o.getStudySymbolExchange)(e);if(B&&void 0!==i)return i;if(D)switch(this._model.mainSeries().symbolTextSourceProxyProperty().value()){case"description":return e.description;case"ticker-and-description":return`${e.name}, ${e.description}`;case"long-description":return null!==(t=e.long_description)&&void 0!==t?t:e.description}return e.name}_getExchangeTitlePart(e,t){var i;return null===e||t?null:null!==(i=(0,o.getStudySymbolExchange)(e))&&void 0!==i?i:null}_getPriceSourceTitlePart(e){var t;return O&&!1!==this._model.properties().childs().paneProperties.childs().legendProperties.childs().showPriceSource.value()&&void 0!==(null==e?void 0:e.price_source_id)&&null!==(t=this._model.availablePriceSources().name(e.price_source_id))&&void 0!==t?t:null}_setSymbolCurrencyUnitInternal(e,t){const{symbol:i,currency:s,unit:r}=e,n=this.properties().childs(),a=n.inputs.childs().symbol.value(),l=n.currencyId.value(),c=n.unitId.value();if(void 0!==i&&i!==a&&n.inputs.childs().symbol.setValueSilently(i),void 0!==s&&s!==l&&n.currencyId.setValueSilently(s),void 0!==r&&r!==c&&n.unitId.setValueSilently(r),t)this._resolvedSymbolsByInput[this.symbol()]=t,this._resolvedSymbols[this._getSymbolForResolve(this.symbol())]=t,this._realignToolsLastParams=null;else{const e=this.symbolInfo();null!==e&&(n.currencyId.setValueSilently((0,o.symbolCurrency)(e)),n.unitId.setValueSilently((0,o.symbolUnit)(e,this._model.unitConversionEnabled())))}n.inputs.childs().symbol.value()!==a&&n.inputs.childs().symbol.listeners().fire(n.inputs.childs().symbol),n.currencyId.value()!==l&&n.currencyId.listeners().fire(n.currencyId),n.unitId.value()!==c&&n.unitId.listeners().fire(n.unitId),this._realignLineToolsIfParamsChanged()}_realignLineToolsIfParamsChanged(){const e=this.symbol(),t=this.interval(),i=this.currency(),s=this.unit();null!==this._realignToolsLastParams&&this._realignToolsLastParams.symbol===e&&this._realignToolsLastParams.interval===t&&this._realignToolsLastParams.currency===i&&this._realignToolsLastParams.unit===s||(this._model.realignLineTools(this),this._realignToolsLastParams={symbol:e,interval:t,currency:i,unit:s})}}},51182:(e,t,i)=>{"use strict";i.d(t,{StudyOverlayBase:()=>me}) +;var s=i(50151),r=i(49483),n=i(98351),o=i(68927),a=i(98799),l=i(35624),c=i(22770),h=i(1930),d=i(26220),u=i.n(d),p=i(91035),_=i(2484),m=i(54168),g=i(90854),f=i(77213),v=i(92133),S=i(88552),y=i(33639),b=i(65665),w=i(23304),P=i(40549),C=i.n(P),T=i(69145),x=i(97425),I=i(66019),M=i(74234),A=i(67876),L=i(99846),k=i(1194),E=i(38031);const D=_.enabled("force_exchange_as_title");class B extends A.PriceAxisView{constructor(e){super(),this._source=e}_updateRendererData(e,t,i){e.visible=!1,t.visible=!1;const r=this._source.lastValueData("close",!1);if(r.noData)return;const n=this._source.model(),o=this._source.priceScale();if(null===o)return;if(!n.isPriceScaleVisible(o))return;const a=n.timeScale().visibleBarsStrictRange(),l=n.mainSeries().bars().lastIndex();if(null===a||null===l)return;if(l<=a.lastBar())i.background=(0,E.resetTransparency)(r.color),i.textColor=this.generateTextColor(r.color),e.borderVisible=!1,t.borderVisible=!1;else{const o=n.backgroundColorAtYPercentFromTop(r.coordinate/(0,s.ensureNotNull)(n.paneForSource(this._source)).height());i.background=o,i.textColor=(0,E.resetTransparency)(r.color),i.borderColor=i.textColor,e.borderVisible=!0,t.borderVisible=!0}i.coordinate=r.coordinate,i.floatCoordinate=r.floatCoordinate;const c=this._source.model().properties().childs().scalesProperties.childs();c.showSeriesLastValue.value()&&(e.text=(0,k.getCurrentModePriceText)(o,r),c.seriesLastValueMode.value()!==L.PriceAxisLastValueMode.LastPriceAndPercentageValue?e.secondLine="":e.secondLine=(0,k.getOppositeModePriceText)(o,r),e.visible=!0),t.text="",c.showSymbolLabels.value()&&(t.text=this._paneText(),t.visible=t.text.length>0)}_paneText(){let e="";const t=this._source.symbolInfo();return D?e=(0,h.displayedSymbolExchange)(t):this._source.model().properties().childs().scalesProperties.childs().showSymbolLabels.value()&&(e=(0,h.displayedSymbolName)(t)),e}}var V=i(45703);class R extends V.PriceLineAxisView{constructor(e){super(),this._study=e}_value(){return this._study.lastValueData("",!0)}_priceLineColor(e){return e}_lineWidth(){return 1}_isVisible(){const e=this._study.model().properties().childs().scalesProperties.childs().showSeriesLastValue.value();return this._study.properties().childs().showPriceLine.value()&&e}}var N=i(53479),O=i(2945);class F{constructor(e){this._lineRenderer=new O.HorizontalLineRenderer,this._visible=!1,this._source=e}update(){if(this._visible=!1,!this._source.properties().childs().showPriceLine.value())return;const e=this._source.lastValueData("",!0);e.noData||(this._visible=!0,this._lineRenderer.setData({y:e.coordinate,color:e.color,linewidth:1,linestyle:N.LINESTYLE_DOTTED,visible:this._visible}))}renderer(){return this._visible?this._lineRenderer:null}}var W=i(50335),H=i(95790),z=i(28667),U=i(76076),j=i(43312);const G=r.CheckMobile.any();class q extends H.DataWindowView{constructor(e,t){super(),this._invalidated=!0,this._study=e,this._model=t,this._valueProvider=this._createValuesProvider(e,t),this._items=this._valueProvider.getItems().map((e=>new H.DataWindowItem(e.id,e.title,""))),this.update()} +items(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._items}update(){this._invalidated=!0}study(){return this._study}_updateImpl(){var e,t;this._header=this._study.title();let i;this._showLastPriceAndChangeOnly()?i=this._study.data().lastIndex():(i=this._model.crossHairSource().appliedIndex(),_.enabled("use_last_visible_bar_value_in_legend")&&!(0,W.isNumber)(i)&&(i=null!==(t=null===(e=this._model.timeScale().visibleBarsStrictRange())||void 0===e?void 0:e.lastBar())&&void 0!==t?t:NaN));const s=this._valueProvider.getValues(i);for(let e=0;ee||t),i.showBarChange,i.showSeriesOHLC),this._visibilityProperty.subscribe(this,this.update)}areValuesVisible(){return this._visibilityProperty.value()}additional(){return this._additional}destroy(){this._backgroundColorSpawn.destroy(),this._visibilityProperty.destroy()}_updateImpl(){super._updateImpl()}_createValuesProvider(e,t){return new $.OverlayLegendValuesProvider(e,t)}}var X=i(64636),Z=i(83438),J=i(15381),Q=i(9657),ee=i(36767),te=i(14224),ie=i(73436),se=i(78201),re=i(16199),ne=i(2250);const oe=r.CheckMobile.any()&&!1,ae=_.enabled("uppercase_instrument_names"),le=_.enabled("study_overlay_compare_legend_option"),ce=_.enabled("secondary_series_extend_time_scale"),he=_.enabled("hide_unresolved_symbols_in_legend"),de=!_.enabled("hide_study_overlay_legend_item"),ue=_.enabled("symbol_info_price_source"),pe=(0,n.getLogger)("Chart.StudyOverlay");function _e(e,t){return null==e[t]}class me extends o.Study{constructor(e,t,i,s){super(e,function(e){return e.hasChild("currencyId")||e.addChild("currencyId",new(u())(null)),e.hasChild("unitId")||e.addChild("unitId",new(u())(null)),e.addExclusion("currencyId"),e.addExclusion("unitId"),e}(t),i,s),this._quotesProvider=new m.QuotesProvider,this._seriesSource=null,this._symbolResolvingActive=new(C())(!1),this._symbolHibernated=new(C())(!1),this._styleToRecover=null,this._isActingAsSymbolSource=new(C())(!0),this._realignToolsLastParams=null,this._precomputedBarStyles=new WeakMap,this.m_data=new S.PlotList((0,c.seriesPlotFunctionMap)(),_e),oe&&this._quotesProvider.quotesUpdate().subscribe(this,this._onQuotesUpdate);const r=this.properties().childs();r.currencyId.subscribe(this,this._onCurrencyChanged),r.unitId.subscribe(this,this._onUnitChanged), +r.allowExtendTimeScale.subscribe(this,this._onAllowExtendTimeScaleChanged),this._onAllowExtendTimeScaleChanged(),r.style.subscribe(this,this._onChartStyleChanged),r.lineStyle.childs().priceSource.subscribe(this,this._updateBarFunction),r.areaStyle.childs().priceSource.subscribe(this,this._updateBarFunction),r.baselineStyle.childs().priceSource.subscribe(this,this._updateBarFunction),r.columnStyle.childs().priceSource.subscribe(this,this._updateBarFunction),this._updateBarFunction(),this._formatter=null,e.mainSeries().onIntervalChanged().subscribe(this,(()=>e.realignLineTools(this)))}destroy(){this._model.mainSeries().onIntervalChanged().unsubscribeAll(this),super.destroy()}isActingAsSymbolSource(){return this._isActingAsSymbolSource.readonly()}precomputedBarStyle(e){return this._precomputedBarStyles.get(e)}setPrecomputedBarStyle(e,t){this._precomputedBarStyles.set(e,t)}properties(){return this._properties}barColorer(){return new ne.SeriesBarColorer(this)}setSymbolParams(e){this._setSymbolParamsInternal(e)}symbol(){return this.properties().childs().inputs.childs().symbol.value()}setSymbol(e){this.setSymbolParams({symbol:e})}symbolInfo(){if(!this._resolvedSymbols)return null;const e=this._properties.childs().inputs.childs().symbol.value();if(!e)return null;let t;return t=this._resolvedSymbols[this._getSymbolForResolve(e)]||null,t}supportsPressedChunks(){return!1}pressedChunks(e,t){throw new Error("Pressed chunks are not supported")}data(){return null===this._seriesSource?super.data():this._seriesSource.data().bars()}symbolResolved(){return this.symbolsResolved()}symbolResolvingActive(){return this._symbolResolvingActive}symbolHibernated(){return this._symbolHibernated}isVisible(){const e=super.isVisible();return this._symbolHibernated.setValue(!e),e}symbolSameAsCurrent(e){return(0,g.symbolSameAsCurrent)(e,this.symbolInfo())}priceSource(){const e=this.properties().childs();switch(e.style.value()){case 2:return e.lineStyle.childs().priceSource.value();case 3:return e.areaStyle.childs().priceSource.value();case 10:return e.baselineStyle.childs().priceSource.value();case 13:return e.columnStyle.childs().priceSource.value()}return null}barFunction(){return this._barFunction}quotes(){return this._quotesProvider.quotes()}currency(){return this.properties().childs().currencyId.value()||null}setCurrency(e){this.setSymbolParams({currency:e})}isConvertedToOtherCurrency(){return(0,h.isConvertedToOtherCurrency)(this.symbolInfo())}unit(){return this.properties().childs().unitId.value()||null}setUnit(e){this.setSymbolParams({unit:e})}isConvertedToOtherUnit(){return(0,h.isConvertedToOtherUnit)(this.symbolInfo(),this._model.unitConversionEnabled())}style(){return this.properties().childs().style.value()}setStyle(e){this.setSymbolParams({style:e})}interval(){return this._model.mainSeries().interval()}setInterval(e){}symbolSource(){return this}barsProvider(){return this}state(e,t){const i=super.state(e,t);return this._model.unitConversionEnabled()||delete i.state.unitId,e&&((0,s.ensureDefined)(i.data).symbols={ +___snapshot:this.symbolInfo()||void 0}),i}symbolTitle(e,t){return this.title(!0,{},!1,e)}title(e,t,i,s){var r;const n=this._titleInParts(e,t,i,s),o=[n[0],...null!==(r=n[1])&&void 0!==r?r:[]].join(", ");return ae?o.toUpperCase():o}titleInParts(e,t,i,s){return[this.title(e,t,i,s)]}isStarted(){return null===this._seriesSource?super.isStarted():this._seriesSource.isStarted()}sourceId(){return null===this._seriesSource?super.sourceId():(0,s.ensureNotNull)(this._seriesSource.instanceId())}moveData(e){null===this._seriesSource?super.moveData(e):this._seriesSource.moveData(e)}firstValue(){const e=this._model.timeScale().visibleBarsStrictRange();if(null===e)return null;const t=e.firstBar();if(0===this.data().size())return this._ownFirstValue;const i=this.data().search(t,y.PlotRowSearchMode.NearestRight,1);return this._ownFirstValue=null!==i?this._barFunction(i.value,0):null,this._ownFirstValue}lastValueData(e,t,i){const s={noData:!0},r=this.priceScale();if(this._model.timeScale().isEmpty()||null===r||r.isEmpty()||this.data().isEmpty())return s;const n=this._model.timeScale().visibleBarsStrictRange();if(null===n)return s;const o=this.properties().childs();if(!o.visible.value())return s;const a=this.nearestIndex(n.lastBar(),y.PlotRowSearchMode.NearestLeft,1);if(void 0===a)return s;const l=this.firstValue();if(null===l)return s;const c=this._lastNonEmptyPlotRow(4),h=null!==c&&n.contains(c.index),d=null!==c?c.value:null,u=t||h?d:this.data().valueAt(a);if(null===u)return s;const p=this._barFunction(u,2);if(!(0,b.isNumber)(p))return s;const _=r.priceToCoordinate(p,l);let m;switch(o.style.value()){case 0:m=u[1]<=u[4]?o.barStyle.childs().upColor.value():o.barStyle.childs().downColor.value();break;case 1:case 9:m=u[1]<=u[4]?o.candleStyle.childs().upColor.value():o.candleStyle.childs().downColor.value();break;case 13:m=u[1]<=u[4]?o.columnStyle.childs().upColor.value():o.columnStyle.childs().downColor.value();break;case 2:m=o.lineStyle.childs().color.value();break;case 3:m=o.areaStyle.childs().color1.value();break;case 10:{const e=o.baselineStyle.childs();m=_(0,s.ensureNotNull)(this.priceScale()).height(),color:()=>e.baselineColor.value(),baseLevelPercentage:()=>e.baseLevelPercentage.value()});break}case 12:r=new re.SeriesHiLoPaneView(this,this._model)}r&&this._paneViews.push(r),null!==i&&this._paneViews.push(i),this._paneViews.push(new F(this)),this._dataWindowView||(this._dataWindowView=new q(this,this._model)),this._legendView||(this._legendView=new K(this,this._model)),this._statusView||(this._statusView=new I.StudyStatusView(this)),this._priceAxisViews=[...this._priceAxisViewsBase],this._labelPaneViews.push(new X.PanePriceAxisView(e,this,this._model))}_createStudyOnServer(){null===this._seriesSource?super._createStudyOnServer():this._modifyStudyOnServer((0,s.ensureDefined)(this._inputs)),this._realignLineToolsIfParamsChanged()}_modifyStudyOnServer(e){null===this._seriesSource?super._modifyStudyOnServer(e,0):(this._seriesSource.modifySeries((0,p.decodeExtendedSymbol)(e.symbol),(0,v.getServerInterval)(this._series.properties().childs().interval.value())),this._seriesSource.isStarted()||this._seriesSource.start())}_stopStudyOnServer(){null===this._seriesSource?super._stopStudyOnServer():this._seriesSource.stop()}_titleInParts(e,t,i,s){const r=this.symbolInfo();return[this._getSymbolTitlePart(r),[this._getExchangeTitlePart(r,s),this._getPriceSourceTitlePart(r)].filter((e=>null!==e))]}_getSymbolTitlePart(e){var t;if(null===e)return he?"":this.properties().childs().inputs.childs().symbol.value();if(le)switch(this._model.mainSeries().symbolTextSourceProxyProperty().value()){case"description":return e.description;case"ticker-and-description":return`${e.name}, ${e.description}`;case"long-description":return null!==(t=e.long_description)&&void 0!==t?t:e.description}return e.name}_getExchangeTitlePart(e,t){var i;return null===e||t?null:null!==(i=(0,h.getStudySymbolExchange)(e))&&void 0!==i?i:null}_getPriceSourceTitlePart(e){var t;return ue&&!1!==this._model.properties().childs().paneProperties.childs().legendProperties.childs().showPriceSource.value()&&void 0!==(null==e?void 0:e.price_source_id)&&null!==(t=this._model.availablePriceSources().name(e.price_source_id))&&void 0!==t?t:null}_onAllowExtendTimeScaleChanged(){const e=this.isStarted();if(e&&this.stop(!0), +ce&&this.properties().childs().allowExtendTimeScale.value()){this._seriesSource=new f.SeriesDataSource(this._model.chartApi(),"st_o_");const e=this._seriesSource.dataEvents();e.seriesError().subscribe(this,(e=>{this._onStudyError(this._convertSeriesErrorToStudy(e))})),e.loading().subscribe(this,this._onStudyLoading),e.completed().subscribe(this,(e=>{this._onStudyCompleted(e.time)})),e.dataUpdated().subscribe(this,(()=>{this._studyModified=!1;const e=this._model.paneForSource(this);this._model.recalculatePane(e,(0,x.sourceChangeEvent)(this.id())),this._updateSources(),this.priceRangeReady()||this._enablePriceRangeReady()}))}else{if(null!==this._seriesSource){const e=this._seriesSource.dataEvents();e.seriesError().unsubscribeAll(this),e.loading().unsubscribeAll(this),e.completed().unsubscribeAll(this),e.dataUpdated().unsubscribeAll(this),this._seriesSource.destroy()}this._seriesSource=null}e&&this.start(!0)}_convertSeriesErrorToStudy(e){return{error:e.error,ctx:e.ctx,solution_id:e.solution_id}}_setSymbolParamsInternal(e,t){const{symbol:i,currency:s,unit:r,style:n}=e,o=this.properties().childs(),a=o.inputs.childs().symbol.value(),l=o.currencyId.value(),c=o.unitId.value(),d=o.style.value();if(void 0!==i&&i!==a&&o.inputs.childs().symbol.setValueSilently(i),void 0!==s&&s!==l&&o.currencyId.setValueSilently(s),void 0!==r&&r!==c&&o.unitId.setValueSilently(r),void 0!==n&&o.style.setValueSilently(n),t)this._resolvedSymbolsByInput[this.symbol()]=t,this._resolvedSymbols[this._getSymbolForResolve(this.symbol())]=t,this._realignToolsLastParams=null;else{const e=this.symbolInfo();null!==e&&(o.currencyId.setValueSilently((0,h.symbolCurrency)(e)),o.unitId.setValueSilently((0,h.symbolUnit)(e,this._model.unitConversionEnabled())))}o.inputs.childs().symbol.value()!==a&&o.inputs.childs().symbol.listeners().fire(o.inputs.childs().symbol),o.currencyId.value()!==l&&o.currencyId.listeners().fire(o.currencyId),o.unitId.value()!==c&&o.unitId.listeners().fire(o.unitId),o.style.value()!==d&&o.style.listeners().fire(o.style),this._checkStyle(),this._realignLineToolsIfParamsChanged()}_updateBarFunction(){this._barFunction=(0,a.barFunctionByStyle)(this.style(),this.priceSource())}_onChartStyleChanged(){var e;this._updateBarFunction(),(null===(e=this._styleToRecover)||void 0===e?void 0:e.originalStyle)!==this.style()&&(this._styleToRecover=null)}_checkStyle(){const e=this.style();(0,h.isCloseBasedSymbol)(this.symbolInfo())?(0,h.isSingleValueBasedStyle)(e)||(this.setStyle(2),this._styleToRecover={correctedStyle:this.style(),originalStyle:e}):null!==this._styleToRecover&&(this.setStyle(this._styleToRecover.originalStyle),this._styleToRecover=null)}_realignLineToolsIfParamsChanged(){const e=this.symbol(),t=this.interval(),i=this.currency(),s=this.unit();null!==this._realignToolsLastParams&&this._realignToolsLastParams.symbol===e&&this._realignToolsLastParams.interval===t&&this._realignToolsLastParams.currency===i&&this._realignToolsLastParams.unit===s||(this._model.realignLineTools(this),this._realignToolsLastParams={symbol:e,interval:t,currency:i, +unit:s})}}},1140:(e,t,i)=>{"use strict";i.d(t,{applyOverridesToStudy:()=>c,applyOverridesToStudyDefaults:()=>h});var s=i(50151),r=i(83421);const n=(0,i(98351).getLogger)("Chart.Model.StudyPropertiesOverrider");var o,a;function l(e,t,i,s){const r=i.split(".");if(0===r.length||0===r[0].length)return;const l=function(e){const t=e.split(":");return{name:t[0],type:2===t.length?t[1]:null}}(r[0]),c=l.name,h=l.type,d=null!==h,u=!d||"band"===h,p=!d||"area"===h,_=!d||"input"===h,m=!d||"plot"===h?a.getPlotIdByTitle(e,c):null,g=u?a.getBandIndexByName(e,c):null,f=p?a.getFilledAreaIdByTitle(e,c):null,v=_?a.getInputByName(e,c):null,S=t.hasOwnProperty(c);if((null!==m?1:0)+(null!==g?1:0)+(null!==f?1:0)+(null!==v?1:0)+(S?1:0)>1)return void n.logWarn(`Study '${e.description}' has ambiguous identifier '${c}'`);const y=r[1];if(null!==m){if(1===r.length)return void n.logWarn(`Path of sub-property of '${c}' plot for study '${e.description}' must be not empty`);const i=r.slice(1);o.applyPlotProperty(e,t,m,i,s)}else if(null!==v)o.applyInputValue(t,v,s);else if(null!==g){if(void 0===y)return void n.logWarn(`Property name of '${c}' band for study '${e.description}' must be set`);o.applyBandProperty(t,g,y,s)}else if(null!==f){if(void 0===y)return void n.logWarn(`Property name of '${c}' area for study '${e.description}' must be set`);o.applyFilledAreaProperty(t,f,y,s)}else S?o.setRootProperty(t,r,s):n.logWarn(`Study '${e.description}' has no plot or input '${c}'`)}function c(e,t){const i=e.properties(),s=i.state();for(const i in t)t.hasOwnProperty(i)&&l(e.metaInfo(),s,i,t[i]);i.mergeAndFire(s)}function h(e,t,i){for(const s in e){if(!e.hasOwnProperty(s))continue;const r=s.indexOf(".");if(-1===r)continue;const o=s.substring(0,r),c=a.getMetaInfoByDescription(t,o);if(null===c){n.logWarn(`There is no such study ${o}`);continue}const h=i(c);null!==h?l(c,h,s.substring(r+1),e[s]):n.logWarn(`Cannot apply overrides for study ${o}`)}}!function(e){const t={line:r.LineStudyPlotStyle.Line,histogram:r.LineStudyPlotStyle.Histogram,cross:r.LineStudyPlotStyle.Cross,area:r.LineStudyPlotStyle.Area,columns:r.LineStudyPlotStyle.Columns,circles:r.LineStudyPlotStyle.Circles,line_with_breaks:r.LineStudyPlotStyle.LineWithBreaks,area_with_breaks:r.LineStudyPlotStyle.AreaWithBreaks,step_line:r.LineStudyPlotStyle.StepLine,step_line_with_breaks:r.LineStudyPlotStyle.StepLineWithBreaks};e.applyPlotProperty=function(e,i,o,a,l){if(void 0===i.styles)return void n.logWarn("Study does not have styles");const c=a[0];if("color"===c){const t=function(e,t,i){if(void 0===e.plots)return null;for(const s of e.plots){if(!(0,r.isPaletteColorerPlot)(s)||void 0===t.palettes)continue;const e=t.palettes[s.palette];if(s.target===i&&void 0!==e)return e}return null}(e,i,o);return void function(e,t,i,r,o){var a;void 0!==e.styles?null===t&&!isNaN(r)&&r>0?n.logWarn(`Study plot does not have color #${r}`):((0===r||isNaN(r))&&((0,s.ensureDefined)(e.styles[i]).color=String(o),r=0),null!==t&&((0, +s.ensureDefined)(null===(a=t.colors)||void 0===a?void 0:a[r]).color=String(o))):n.logWarn("Study does not have styles")}(i,t,o,a.length>1?parseInt(a[1]):NaN,l)}const h=i.styles[o];if(void 0!==h&&h.hasOwnProperty(c)){if("plottype"===c){const e=t[String(l)];if(void 0===e)return void n.logWarn(`Unsupported plot type for plot: ${l}`);l=e}h[c]=l}else n.logWarn(`Study plot does not have property '${c}'`)},e.applyBandProperty=function(e,i,s,r){if(void 0===e.bands)return void n.logWarn("Study does not have bands");const o=e.bands[i];if(void 0!==o&&o.hasOwnProperty(s)){if("plottype"===s){const e=t[String(r)];if(void 0===e)return void n.logWarn(`Unsupported plot type for band: ${r}`);r=e}o[s]=r}else n.logWarn(`Study band does not have property '${s}'`)},e.applyFilledAreaProperty=function(e,t,i,s){if(void 0===e.filledAreasStyle)return void n.logWarn("Study does not have areas");const r=e.filledAreasStyle[t];void 0!==r&&r.hasOwnProperty(i)?r[i]=s:n.logWarn(`Study area does not have property '${i}'`)},e.applyInputValue=function(e,t,i){void 0!==e.inputs&&e.inputs.hasOwnProperty(t)?e.inputs[t]=i:n.logWarn(`Study does not have input '${t}'`)},e.setRootProperty=function(e,t,i){if(0===t.length)return;let s=e;for(const e of t.slice(0,-1)){if(null==s||!s.hasOwnProperty(e))break;s=s[e]}const r=t[t.length-1];null!=s&&s.hasOwnProperty(r)?s[r]=i:n.logWarn(`Study does not have property ${t.join(".")}`)}}(o||(o={})),function(e){e.getInputByName=function(e,t){if(void 0===e.inputs)return null;t=t.toLowerCase();for(const i of e.inputs)if(i.name.toLowerCase()===t)return i.id;return null},e.getPlotIdByTitle=function(e,t){if(void 0===e.styles)return null;t=t.toLowerCase();for(const i in e.styles){const s=e.styles[i];if((void 0!==s&&void 0!==s.title?s.title:i).toLowerCase()===t)return i}return null},e.getFilledAreaIdByTitle=function(e,t){if(void 0===e.filledAreas)return null;t=t.toLowerCase();for(const i of e.filledAreas)if(i.title.toLowerCase()===t)return i.id;return null},e.getBandIndexByName=function(e,t){if(void 0===e.bands)return null;t=t.toLowerCase();for(let i=0;i{"use strict";var s=i(26867),r=i(1930).symbolTitle,n=i(2250).StudyBarColorer,o=i(88552).PlotList,a=i(76422),l=i(83421),c=i(51332).studyPlotFunctionMap,h=i(51332).studyEmptyPlotValuePredicate,d=i(2484),u=i(91217).StudyBase,p=i(38031).colorToInteger,_=i(98351).getLogger("Chart.Study"),m=d.enabled("datasource_copypaste"),g=d.enabled("study_symbol_ticker_description"),f=d.enabled("hide_unresolved_symbols_in_legend");function v(e,t){return e&&e[t]&&e[t].hasOwnProperty("showLast")?e[t].showLast.value():null}class S extends u{constructor(e,t,i,r){super(e,t,i,r),this._resolvedSymbols={},this._chartApi=e._chartApi,this._plotFields=[];var n=this.metaInfo().plots;if(n)for(var a=0,u=n.length;a=0?c:l}return l}if(this._metaInfo.isTVScript||this._metaInfo.pine){if("text"===i)return this._metaInfo.defaults.inputs.text;if("pineId"===i)return this._metaInfo.scriptIdPart;if("pineVersion"===i)return this._metaInfo.pine?this._metaInfo.pine.version:"-1";if("color"===e.type&&this._metaInfo.isRGB){var h=this._properties.inputs[i].value();return p(h)}if("price"===e.type){var d=this._properties.inputs[i].value();return t.priceInputsForDisplay?this.formatter().format(d):d}return this._properties.inputs[i].value()} +return this._properties.inputs[i].value()}priceLabelText(e){var t,i=this._metaInfo.styles,s=this._metaInfo.ohlcPlots;i&&i[e]&&(t=i[e]),s&&s[e]&&(t=s[e]);var r=t.title;return 1!==this._simplePlotsCount||l.isPlotTitleDefined(r)?this._metaInfo.is_price_study&&r!==this._metaInfo.shortDescription?""===r?this._metaInfo.shortDescription:this._metaInfo.shortDescription+":"+r:r:this._metaInfo.shortDescription}data(){return this.m_data}graphics(){return this._graphics}moveData(e){this._ongoingDataUpdate=this._ongoingDataUpdate.then(function(){this._invalidateLastNonEmptyPlotRowCache(),this.data().move(e)}.bind(this))}replaceData(e,t,i){this._invalidateLastNonEmptyPlotRowCache(),this.data().remove(e+1),this.data().addTail(i,t)}static offset(e,t){var i=0;return e._plotOffsets&&void 0!==e._plotOffsets[t]&&(i+=e._plotOffsets[t]),e.properties().offsets&&void 0!==e.properties().offsets[t]&&(i+=e.properties().offsets[t].val.value()),e.properties().offset&&(i+=e.properties().offset.val.value()),i}offset(e){return S.offset(this,e)}_showLastValueOnPriceScale(){return this._model.properties().scalesProperties.showStudyLastValue.value()}barColorer(){const e=this._metaInfo.plots;let t=null;for(let i=0;i=0&&(e="_v"+this._metaInfo.pine.version),{symbol:this.series().actualSymbol(),resolution:this.series().interval(),study:this._metaInfo.shortId+e}}_sendTelemetryReport(e,t,i){void 0===i&&(i=this._getTelemetryAdditionalData());var s=Object.assign(t,{additional:i});undefined.sendChartReport(e,s)}_sendTelemetryCounter(e,t){this._sendTelemetryReport(e,{count:1},t)}onAboutToBeDestroyed(){return this._aboutToBeDestroyed}destroy(){this._aboutToBeDestroyed.fire(),this._isDestroyed=!0,null!==this._definitionsViewModel&&(this._definitionsViewModel.destroy(),this._definitionsViewModel=null),this._properties.precision.listeners().unsubscribe(this,this._precisionChanged),this._showStudyArgumentsProperty.listeners().unsubscribe(this,this.invalidateTitleCache),this._properties.description.listeners().unsubscribe(this,this.invalidateTitleCache),this._properties.shortDescription&&this._properties.shortDescription.listeners().unsubscribe(this,this.invalidateTitleCache),this._model.mainSeries().dataEvents().symbolResolved().unsubscribeAll(this),this.hasBarColorer()&&this._properties.visible.listeners().unsubscribe(this._model.mainSeries(),this._model.mainSeries().invalidateBarStylesCache),this._model.mainSeries().dataEvents().symbolResolved().unsubscribe(this,this._recreatePriceFormattingDependencies),void 0!==this._properties.offsets&&this._properties.offsets.listeners().unsubscribe(this,this._updateMaxOffsetValue), +void 0!==this._properties.offset&&this._properties.offset.listeners().unsubscribe(this,this._updateMaxOffsetValue),super.destroy()}desiredPriceScalePosition(){return this.metaInfo().isTVScriptStub?"overlay":this.metaInfo().linkedToSeries?"as-series":void 0===this.metaInfo().priceScale?null:["right","left","overlay"][this.metaInfo().priceScale]}guiPlotName(e){var t=this.properties().styles;return t&&t[e]&&t[e].title?t[e].title.value():this.title()}formatterChanged(){return this._formatterChanged}copiable(){return m&&!this.isChildStudy()}setPriceScale(e){super.setPriceScale(e),a.emit("study_event",this.id(),"price_scale_changed")}}TradingView.Study=S,t.Study=S},23387:(e,t,i)=>{"use strict";i.d(t,{plotShapesData:()=>r});var s=i(44352);const r={shape_arrow_down:{guiName:s.t(null,void 0,i(48732)),id:"shape_arrow_down",paneRendererClass:"PaneRendererArrowDown",pineName:"shape.arrowdown",icon:"arrow_down"},shape_arrow_up:{guiName:s.t(null,void 0,i(10650)),id:"shape_arrow_up",paneRendererClass:"PaneRendererArrowUp",pineName:"shape.arrowup",icon:"arrow_up"},shape_circle:{guiName:s.t(null,void 0,i(90068)),id:"shape_circle",paneRendererClass:"PaneRendererCircleShape",pineName:"shape.circle",icon:"circle"},shape_cross:{guiName:s.t(null,void 0,i(29908)),id:"shape_cross",paneRendererClass:"PaneRendererCrossShape",pineName:"shape.cross",icon:"cross"},shape_diamond:{guiName:s.t(null,void 0,i(73720)),id:"shape_diamond",paneRendererClass:"PaneRendererDiamond",pineName:"shape.diamond",icon:"diamond"},shape_flag:{guiName:s.t(null,void 0,i(21524)),id:"shape_flag",paneRendererClass:"PaneRendererFlagShape",pineName:"shape.flag",icon:"flag"},shape_label_down:{guiName:s.t(null,void 0,i(18528)),id:"shape_label_down",paneRendererClass:"PaneRendererLabelDown",pineName:"shape.labeldown",icon:"label_down"},shape_label_up:{guiName:s.t(null,void 0,i(13046)),id:"shape_label_up",paneRendererClass:"PaneRendererLabelUp",pineName:"shape.labelup",icon:"label_up"},shape_square:{guiName:s.t(null,void 0,i(44904)),id:"shape_square",paneRendererClass:"PaneRendererSquare",pineName:"shape.square",icon:"square"},shape_triangle_down:{guiName:s.t(null,void 0,i(83356)),id:"shape_triangle_down",paneRendererClass:"PaneRendererTriangleApexDown",pineName:"shape.triangledown",icon:"triangle_down"},shape_triangle_up:{guiName:s.t(null,void 0,i(28340)),id:"shape_triangle_up",paneRendererClass:"PaneRendererTriangleApexUp",pineName:"shape.triangleup",icon:"triangle_up"},shape_xcross:{guiName:s.t(null,void 0,i(7050)),id:"shape_xcross",paneRendererClass:"PaneRendererXCross",pineName:"shape.xcross",icon:"x_cross"}}},31359:(e,t,i)=>{"use strict";var s=i(51664).Version,r=i(98351).getLogger("Chart.StudyMigration");function n(e){this._studyId=e,this._maxToVers=s.ZERO,this._maxFromVers=s.ZERO,this._migrs=[]}n.prototype.addMigration=function(e,t,i){var r=s.parse(e),n=s.parse(t);r.isGreater(this._maxFromVers)&&(this._maxFromVers=r),n.isGreater(this._maxToVers)&&(this._maxToVers=n),this._migrs.push({fromVers:r,toVers:n,rules:i})},n.prototype.updateInputs=function(e,t,i){if(!i)return i +;for(var s=TradingView.clone(i),n=e;n.isLess(t);){var o=this._findMigration(n);if(null==o)break;if(r.logNormal("Migrating study inputs from "+o.fromVers+" to "+o.toVers+" version, studyId: "+this._studyId+", migration: "+JSON.stringify(o)+", inputs: "+JSON.stringify(i)),s=this._applyMigration(s,o),!n.isLess(o.toVers))throw new Error("Problems in study migration process... Possible infinite cycle has been detected and stopped.");n=o.toVers}return n>e&&r.logNormal("Study inputs migration is done, studyId: "+this._studyId+", inputs: "+JSON.stringify(s)),s},n.prototype._findMigration=function(e){for(var t=-1,i=this._maxFromVers,s=0;s=0||t.indexOf(e)>=0},n._applyInputChangedMinMaxRule=function(e,t){if("adjustValIfNeeded"!==t.action)throw new Error("Unknown action "+t.action+" for rule with type "+t.type);var i=e[t.inputId];return it.maxVal&&(e[t.inputId]=t.maxVal),r.logNormal("Input "+t.inputId+"="+i+" adjusted to value "+e[t.inputId]),e},n._applyInputChangedOptionsRule=function(e,t){if(!(["text"].indexOf(t.inputType)>=0&&"resetToDefValIfNeeded"===t.action))throw new Error("Unexpected rule.inputType="+t.inputType+" in rule.action="+t.action);var i=e[t.inputId];return t.options.indexOf(i)<0&&(e[t.inputId]=t.defVal,r.logNormal("Input "+t.inputId+"="+i+" reset to default value "+t.defVal)),e},e.exports=n}, +89895:(e,t,i)=>{"use strict";var s=i(13850).OverlayLegendValuesProvider,r=i(41365).OverlayStatusProvider,n=i(51182).StudyOverlayBase;t.study_Overlay=class extends n{constructor(e,t,i,s){super(e,t,i,s),this._paneView=null;var r=this;this.properties().minTick.listeners().subscribe(null,(function(){r._recreatePriceFormattingDependencies(),r.updateAllViews(),r._model.fullUpdate()}))}_showLastValueOnPriceScale(){return this._model.properties().scalesProperties.showSeriesLastValue.value()}_onQuotesUpdate(e,t){!this._legendView||void 0===t.values.change&&void 0===t.values.change_percent||(this._legendView.update(),this._model.updateSource(this))}destroy(){this._quotesProvider.quotesUpdate().unsubscribeAll(this),this._quotesProvider.destroy(),super.destroy()}tags(){var e=[],t=this.symbolInfo();return t?e.push(t.name):this._properties.inputs.symbol.value()&&e.push(this._properties.inputs.symbol.value()),e}async _getPropertyDefinitionsViewModelClass(){return(await Promise.all([i.e(6803),i.e(6682),i.e(892),i.e(8622),i.e(4785),i.e(607)]).then(i.bind(i,4621))).StudyOverlayDefinitionsViewModel}defaultPlotIdForAlert(){return""}valuesProvider(){return new s(this,this.model())}statusProvider(e){return new r(this,this.model())}}},61524:(e,t,i)=>{"use strict";var s=i(50151).assert,r=i(65665).clone,n=i(68927).Study,o=i(88552).PlotList,a=i(51332).studyPlotFunctionMap,l=i(51332).studyEmptyPlotValuePredicate;class c{constructor(e,t,i){this._strategyPlotIndex=e,this._targetPlotIndex=t,this._startIndex=i}rebuildData(e){var t=this._targetPlotIndex+1,i=this._strategyPlotIndex+1,s=null,r=null;e.range(this._startIndex||e.firstIndex(),e.lastIndex()).each((function(n,o){var a=o[t],l=o[i]?Math.round(o[i]):null;if(o[t]=null,o[i]=null,!l||l>0)return!1;var c=n+l,h={pointIndex:c,value:a};if(r){if(r.pointIndex!==h.pointIndex){c>=0&&(e.valueAt(c)[t]=a);var d=!1;s&&(d=s.value<=r.value&&r.value<=a||s.value>=r.value&&r.value>=a),d?r.pointIndex>=0&&(e.valueAt(r.pointIndex)[t]=null):s=r,r=h}}else r=h;return!1}))}}t.study_ScriptWithDataOffset=class extends n{constructor(e,t,i,s){super(e,t,i,s),this._underlyingData=new o(a(s),l)}clearData(){super.clearData(),this._underlyingData.clear()}_mergeData(e){this._invalidateLastNonEmptyPlotRowCache();var t=this._underlyingData.firstIndex();this._underlyingData.merge(e),t!==this._underlyingData.firstIndex()&&(this.m_data=new o(a(this._metaInfo),l));var i=this.m_data.lastIndex();this._underlyingData.range(i,this._underlyingData.lastIndex()).each(function(e,t){return this.m_data.add(e,r(t)),!1}.bind(this)),this._plotsForStrategyProcessing().forEach((function(e){new c(e.strategyIndex,e.targetIndex,i).rebuildData(this.m_data)}),this)}_plotsForStrategyProcessing(){var e=[];return this._metaInfo.plots.forEach((function(t,i){if("dataoffset"===t.type){var r=this._metaInfo.plots.findIndex((function(e){return e.id===t.target}));s(r>=0,"target plot not found for strategy plot "+t.id);var n={strategyIndex:i,targetIndex:r};e.push(n)}}),this),e}}},81685:(e,t,i)=>{"use strict";i.d(t,{StudyVersioning:()=>p});var s=i(31359),r=i.n(s) +;const n=(0,i(98351).getLogger)("Chart.Study.Versioning");var o=i(50151).assert,a=i(51664).Version,l=i(76861),c=i(58403).StudyMetaInfo,h=i(14905).extractPineId,d=i(43654).migrateMetaInfoAndPropState;const u=1e12;class p extends class{constructor(e,t){if(this._migrations={},!e)throw new Error("No studies metainfo");if(this._studiesMetainfo=e,!t)throw new Error("No studies migrations");this._studiesMigrations=t;for(let e=0;e{if(0===this._studiesMetainfo.length||!e.isTVScript||e.version>=22)return t;const i={};let s=0,r=0,n=t[r];for(;void 0!==n;){const e=t[n.id];n.isFake&&(n.id="in_"+s++),i[r]=n,i[n.id]=e,r++,n=t[r]}return i}]}}{updateMetaInfo(e){if(!e)return e;o(!e.isTVScript,"This method should update only built-in java indicators metaInfo. For Pine indicators use updateMetaInfoAsync");for(var t=null,i=this._studiesMetainfo,s=0;s=12&&a<=26){var l={};for(o=0;o=12&&a<=26){var h=r.columns;r.columns=[];for(var d=0;d1e12&&n.logWarn("Bad integer input max value in metaInfo id="+e.id+" title="+e.description))}}static _fixInputsMaxValue(e,t){if(!TradingView.isAbsent(t)){var i=u;if(t.inputs)for(var s=0;si&&(a.max=i))}if(e&&e.inputs){var r=p.splitInputs(e.inputs),n=r.arr;for(var o in n){var a;"integer"===(a=n[o]).type&&(a.max&&a.max>i&&(a.max=i))}e.inputs=TradingView.merge(r.obj,r.arr)}}}patchPropsStateAndMetaInfo(e,t,i){"Script$BOOKER"!==t.productId||t.alerts||delete e.alerts,p._fixInputsOrder(e,t),p._fixInputsMaxValue(e,t);var s=p.splitInputs(e.inputs);e.inputs=s.obj;var r=c.versionOf(t);ri&&(i=r))}e[i+1]=t}static splitInputs(e){var t={},i={};for(var s in e)isNumber(parseInt(s,10))?t[s]=e[s]:i[s]=e[s];return{arr:t,obj:i}}static findInputKeyById(e,t){var i=null;for(var s in e)if(isNumber(parseInt(s,10))&&e[s].id===t){i=s;break}return i}static getInputKeyById(e,t){var i=p.findInputKeyById(e,t);if(!i)throw new Error("Cannot find input with id: "+t);return i}}},12272:(e,t,i)=>{"use strict";i.d(t,{translateSessionDescription:()=>n,translateSessionShortDescription:()=>a});var s=i(44352);const r=new Map([["Premarket",s.t(null,{context:"sessions"},i(56935))],["Postmarket",s.t(null,{context:"sessions"},i(98801))],["Regular Trading Hours",s.t(null,{context:"sessions"},i(24380))],["Extended Trading Hours",s.t(null,{context:"sessions"},i(97442))],["Electronic Trading Hours",s.t(null,{context:"sessions"},i(75610))]]);function n(e){var t;return null!==(t=r.get(e))&&void 0!==t?t:e}const o=new Map([["Premarket",s.t(null,{context:"sessions"},i(56137))],["Postmarket",s.t(null,{context:"sessions"},i(32929))],["Regular Trading Hours",s.t(null,{context:"sessions"},i(63798))],["Extended Trading Hours",s.t(null,{context:"sessions"},i(33021))],["Electronic Trading Hours",s.t(null,{context:"sessions"},i(33021))]]);function a(e){var t;return null!==(t=o.get(e))&&void 0!==t?t:e}},90854:(e,t,i)=>{"use strict";i.d(t,{areEqualSymbols:()=>o,symbolSameAsCurrent:()=>l,unitsAreSame:()=>c,currenciesAreSame:()=>h});var s=i(2484),r=i(1930);const n=s.enabled("uppercase_instrument_names");function o(e,t){return void 0===e?void 0===t:void 0!==t&&(n?e.toUpperCase()===t.toUpperCase():e===t)}function a(e,t){return e.some((e=>o(t,e)))}function l(e,t){if(null===t)return!1;if(t){if(o(t.full_name,e)||o(t.pro_name,e))return!0;if(o(t.ticker,e))return!0;if(t.aliases&&a(t.aliases,e))return!0 +;if(t.alternatives&&a(t.alternatives,e))return!0;if(0===e.indexOf("FRA:")&&o(t.pro_name,e.replace("FRA:","FWB:")))return!0}return!1}function c(e,t,i){return null===e&&!(0,r.isConvertedToOtherUnit)(t,i)||e===(0,r.symbolUnit)(t,i)}function h(e,t){return null===e&&!(0,r.isConvertedToOtherCurrency)(t)||e===(0,r.symbolCurrency)(t)}},40858:(e,t,i)=>{"use strict";i.d(t,{TextWidthCache:()=>s});class s{constructor(e=150){this._actualSize=0,this._usageTick=1,this._oldestTick=1,this._tick2Labels=new Map,this._cache=new Map,this._maxSize=e}reset(){this._actualSize=0,this._cache.clear(),this._usageTick=1,this._oldestTick=1,this._tick2Labels.clear()}measureText(e,t){return this.getMetrics(e,t).width}yMidCorrection(e,t){const i=this.getMetrics(e,t);return"actualBoundingBoxAscent"in i&&"actualBoundingBoxDescent"in i?(i.actualBoundingBoxAscent-i.actualBoundingBoxDescent)/2:0}getMetrics(e,t){const i=this._cache.get(t);if(void 0!==i)return i.metrics;if(this._actualSize===this._maxSize){const e=this._tick2Labels.get(this._oldestTick);this._tick2Labels.delete(this._oldestTick),this._cache.delete(e),this._oldestTick++,this._actualSize--}e.save(),e.textBaseline="middle";const s=e.measureText(t);return e.restore(),0===s.width&&t.length||(this._cache.set(t,{metrics:s,tick:this._usageTick}),this._tick2Labels.set(this._usageTick,t),this._actualSize++,this._usageTick++),s}}},99299:(e,t,i)=>{"use strict";var s=i(26867);function r(){this._marksByIndex=new Map,this._marksBySpan=[],this.changed=new s,this.minIndex=void 0,this.maxIndex=void 0}r.prototype.reset=function(){this._resetImpl(),this.changed.fire()},r.prototype._resetImpl=function(){this._marksByIndex=new Map,this._marksBySpan=[],this.minIndex=void 0,this.maxIndex=void 0,this._cache=void 0},r.prototype.merge=function(e){if(0!==e.length){var t=e[0].index,i=e[e.length-1].index;t<=this.minIndex&&i>=this.maxIndex&&this._resetImpl();for(var s=this._marksBySpan,r=new Set,n=0;n=this.maxIndex&&this.maxIndex--,this.maxIndex2;){if(1e3*this._marksByIndex.get(t).time===e)return t;if(1e3*this._marksByIndex.get(i).time===e)return i;var s=Math.round((t+i)/2);1e3*this._marksByIndex.get(s).time>e?i=s:t=s}return t},r.prototype.build=function(e,t){var i=Math.ceil(t/e);if(this._maxbar===i&&this._cache)return this._cache;this._maxbar=i;for(var s=[],r=this._marksBySpan.length;r--;)if(this._marksBySpan[r]){var n=s;s=[];for(var o=n.length,a=0,l=this._marksBySpan[r],c=l.length,h=1/0,d=-1/0,u=0;u=i&&_-d>=i&&(s.push(p),d=_)}for(;ae.index>=i&&e.index<=s))}return{marks:t=t.map((function(e){return[e.span,e.time,e.index]})),version:2}},r.prototype.restoreState=function(e){if(this._marksByIndex=new Map,this._marksBySpan=[],this.maxIndex=void 0,this.minIndex=void 0,e&&e.marks&&e.marks.length)if(2===e.version){var t=e.marks.map((function(e){return{span:e[0],time:e[1],index:e[2]}}));this.merge(t)}else this.merge(e.marks)},e.exports.Tickmarks=r},2893:(e,t,i)=>{"use strict";i.d(t,{TimeAxisView:()=>o});var s=i(38031),r=i(83499);class n{constructor(){this._data=null}setData(e){this._data=e}draw(e,t,i){if(null===this._data||!this._data.visible||0===this._data.text.length)return;const s=this._data;e.font=t.font;const n=Math.round(t.widthCache.measureText(e,s.text));if(n<=0)return;e.save();const o=t.paddingHorizontal,a=n+2*o,l=a/2;let c=s.coordinate,h=Math.floor(c-l)+.5;if(s.alwaysInViewPort){const e=s.width;h<0?(c+=Math.abs(0-h),h=Math.floor(c-l)+.5):h+a>e&&(c-=Math.abs(e-(h+a)),h=Math.floor(c-l)+.5)}const d=h+a,u=Math.ceil(0+t.borderSize+t.offsetSize+t.paddingTop+t.fontSize+t.paddingBottom);e.fillStyle=s.background;const p=Math.round(h*i),_=Math.round(0*i),m=Math.round(d*i),g=Math.round(u*i),f=Math.round(2*i);e.beginPath(),e.moveTo(p,_),e.lineTo(p,g-f),e.arcTo(p,g,p+f,g,f),e.lineTo(m-f,g),e.arcTo(m,g,m,g-f,f),e.lineTo(m,_),e.fill();const v=0+t.borderSize+t.offsetSize+t.paddingTop+t.fontSize/2;e.textAlign="left",e.textBaseline="middle",e.fillStyle=s.color +;const S=t.widthCache.yMidCorrection(e,"Apr0");e.translate((h+o)*i,(v+S)*i),(0,r.drawScaled)(e,i,(()=>e.fillText(s.text,0,0))),e.restore()}}class o{constructor(e){this._renderer=new n,this._rendererData={background:"",color:"",coordinate:0,text:"",visible:!1,width:0,alwaysInViewPort:!0},this._invalidated=!0,this._model=e,this._renderer.setData(this._rendererData)}update(){this._invalidated=!0}renderer(){return this._invalidated&&(this._updateImpl(),this._invalidated=!1),this._renderer}coordinate(){return this._rendererData.coordinate}_getAlwaysInViewPort(){return!0}_getText(e){const t=this._model.timeScale().indexToUserTime(e);return null!==t?this._model.dateTimeFormatter().format(t):""}_updateImpl(){const e=this._rendererData;if(e.visible=!1,this._model.timeScale().isEmpty()||!this._isVisible())return;const t=this._getIndex();null!==t&&(e.visible=!0,e.width=this._model.timeScale().width(),e.background=this._getBgColor(),e.color=(0,s.colorFromBackground)(e.background),e.coordinate=this._model.timeScale().indexToCoordinate(t),e.alwaysInViewPort=this._getAlwaysInViewPort(),e.text=this._getText(t),this._invalidated=!1)}}},33143:(e,t,i)=>{"use strict";i.d(t,{INVALID_TIME_POINT_INDEX:()=>s,UNPLOTTABLE_TIME_POINT_INDEX:()=>r});const s=-2e6,r=-1e6},51620:(e,t,i)=>{"use strict";i.d(t,{timeHoursFormatProperty:()=>a,restoreTimeHoursFormatSettingsValue:()=>l});var s=i(56840),r=i(60923);const n="time_hours_format";function o(){return s.getValue(n,"24-hours")}const a=(0,r.createPrimitiveProperty)(o());function l(){a.setValue("24-hours"),s.remove(n)}s.onSync.subscribe(null,(()=>a.setValue(o()))),a.subscribe(null,(()=>s.setValue(n,a.value())))},94030:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MINUTE_SPAN:()=>s,HOUR_SPAN:()=>r,DAY_SPAN:()=>n,WEEK_SPAN:()=>o,MONTH_SPAN:()=>a,YEAR_SPAN:()=>l,DEFAULT_BAR_SPACING:()=>c});const s=20,r=30,n=40,o=50,a=60,l=70,c=6},74914:(e,t,i)=>{"use strict";i.d(t,{getHourMinuteFormat:()=>r,getHourMinuteSecondFormat:()=>n,getTimeFormatForInterval:()=>o});var s=i(78831);function r(e){return"12-hours"===e?s.twelveHourMinuteFormat:s.hourMinuteFormat}function n(e){return"12-hours"===e?s.twelveHourMinuteSecondFormat:s.hourMinuteSecondFormat}function o(e,t){return e.isSeconds()||e.isTicks()?n(t):r(t)}},28729:(e,t,i)=>{"use strict";i.d(t,{trackDrawingCreated:()=>r,trackDrawingPasted:()=>n,trackDrawingCloned:()=>o,trackChartStyleChanged:()=>a});i(50151),i(77906);function s(e,t){0}function r(e){s()}function n(e){s()}function o(e){s()}function a(e){0}},12205:(e,t,i)=>{"use strict";i.d(t,{translatedIntervalString:()=>r});var s=i(92133);function r(e){const t=(0,s.getTranslatedResolutionModel)(e,!0);return null===t?e:t.multiplier+(t.mayOmitShortKind?"":t.shortKind)}},24557:(e,t,i)=>{"use strict";i.d(t,{ApplyLineToolTemplateUndoCommand:()=>r});var s=i(71733);class r extends s.UndoCommand{constructor(e,t,i){super(i),this._source=e,this._newState=t,this._oldState=e.properties().state()}redo(){this._source.applyTemplate(this._newState)}undo(){this._source.applyTemplate(this._oldState)}}},65071:(e,t,i)=>{"use strict";i.d(t,{ +ExcludeLineToolsFromGroupUndoCommand:()=>l});var s=i(50151),r=(i(93731),i(44352)),n=i(47539),o=i(71733);const a=new n.TranslatedString("exclude line tools from group {group}",r.t(null,void 0,i(63391)));class l extends o.UndoCommand{constructor(e,t,i){super(a.format({group:t.name()})),this._model=e,this._groupId=t.id,this._groupName=t.name(),this._lineToolsIds=i.map((e=>e.id()))}redo(){const e=(0,s.ensureNotNull)(this._model.lineToolsGroupModel().groupForId(this._groupId)),t=this._lineToolsIds.map((e=>this._model.dataSourceForId(e)));e.excludeLineTools(t),0===e.lineTools().length&&this._model.lineToolsGroupModel().removeGroup(e)}undo(){const e=this._lineToolsIds.map((e=>this._model.dataSourceForId(e))),t=this._model.lineToolsGroupModel().groupForId(this._groupId);null!==t?t.addLineTools(e):this._model.lineToolsGroupModel().createGroup(e,this._groupName,this._groupId)}}},11426:(e,t,i)=>{"use strict";i.d(t,{MergeUpUndoCommand:()=>o,MergeDownUndoCommand:()=>a,MergeToTargetPane:()=>l});var s=i(50151),r=i(74879);class n extends r.MoveSourceUndoCommand{constructor(e,t,i,s){super(e,t,i),this._restorePane=!1,this._keepZOrder=null!=s&&s}redo(){const e=this._chartModel.panes().length,t=this._chartModel.panes()[this._targetPaneIndex()],i=(0,s.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),r=(0,s.ensureNotNull)(this._chartModel.paneForSource(i)),n=this._chartModel.children(i,!0);r.bulkActionMacro((()=>{n.forEach((e=>this._chartModel.detachSource(e))),this._restorePane=this._chartModel.detachSource(i)}));const o="overlay"===this._initialPriceScalePosition?this._initialPriceScalePosition:void 0,a=t.findSuitableScale(i,void 0,o),l=0===a.dataSources().length;if(t.bulkActionMacro((()=>{t.addDataSource(i,a,this._keepZOrder),n.forEach((e=>t.addDataSource(e,a,this._keepZOrder)))})),i===this._chartModel.mainSeries()){const e=t.priceScalePosition(a);t.movePriceScale(a,e,0)}if(l){(0,s.ensureNotNull)(i.priceScale()).restoreState(this._newPriceScaleState(t.isOverlay(i)))}this._chartModel.fullUpdate(),e!==this._chartModel.panes().length&&this._chartModel.setShouldBeSavedEvenIfHidden(!0)}undo(){let e;e=this._restorePane?this._chartModel.createPane(this._initialPaneIndex):this._chartModel.panes()[this._initialPaneIndex];const t=(0,s.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),i=(0,s.ensureNotNull)(this._chartModel.paneForSource(t)),r=this._chartModel.children(t,!0);i.bulkActionMacro((()=>{r.forEach((e=>this._chartModel.detachSource(e))),this._chartModel.detachSource(t)}));let n=e.getPriceScaleById(this._initialPriceScaleId);null===n&&(n=e.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex)),e.bulkActionMacro((()=>{e.addDataSource(t,n,!0),r.forEach((t=>e.addDataSource(t,n,!1)))})),(0,s.ensureNotNull)(t.priceScale()).restoreState(this._originalPriceScaleState()),this._chartModel.fullUpdate()}}class o extends n{constructor(e,t,i){super(e,t,i)}_targetPaneIndex(){return this._initialPaneIndex-1}}class a extends n{constructor(e,t,i){super(e,t,i)}_targetPaneIndex(){ +return this._initialPaneIndex+1}}class l extends n{constructor(e,t,i,s,r){super(e,t,s,r),this._targetPane=i}_targetPaneIndex(){return this._targetPane}}},74879:(e,t,i)=>{"use strict";i.d(t,{MoveSourceUndoCommand:()=>n});var s=i(50151),r=i(71733);class n extends r.UndoCommand{constructor(e,t,i){super(i),this._chartModel=e,this._sourceId=t.id();const r=(0,s.ensureNotNull)(t.priceScale());this._initialPriceScaleId=r.id(),this._initialPriceScaleState=(0,s.ensureNotNull)(t.priceScale()).state();const n=(0,s.ensureNotNull)(e.paneForSource(t));this._initialPriceScalePosition=n.priceScalePosition(r),this._initialPriceScaleIndex=n.priceScaleIndex(r,this._initialPriceScalePosition),this._initialPaneIndex=e.panes().indexOf(n)}_newPriceScaleState(e){const t={...this._initialPriceScaleState};return delete t.m_isLockScale,delete t.id,delete t.m_topMargin,delete t.m_bottomMargin,t}_originalPriceScaleState(){return this._initialPriceScaleState}}},84267:(e,t,i)=>{"use strict";i.d(t,{MoveToNewPriceScaleUndoCommand:()=>o,MoveToExistingPriceScaleUndoCommand:()=>a});var s=i(50151),r=i(74879);class n extends r.MoveSourceUndoCommand{constructor(e,t,i,s){super(e,t,s),this._sourcePaneRemoved=!1,this._targetPaneIndex=e.panes().indexOf(i)}redo(){const e=this._chartModel.panes()[this._initialPaneIndex],t=this._chartModel.panes()[this._targetPaneIndex],i=e!==t,r=this._targetPriceScale(t),n=(0,s.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),o=this._chartModel.children(n,!0);for(const e of o)i?(this._chartModel.detachSource(e),t.addDataSource(e,r,!1)):t.move(e,r);i?(this._sourcePaneRemoved=this._chartModel.detachSource(n),t.addDataSource(n,r,!1)):t.move(n,r);const a=t.priceScalePosition(r);t.movePriceScale(r,a,this._targetPriceScaleIndex(n)),this._chartModel.fullUpdate()}undo(){this._sourcePaneRemoved&&this._chartModel.createPane(this._initialPaneIndex);const e=this._chartModel.panes()[this._initialPaneIndex],t=e!==this._chartModel.panes()[this._targetPaneIndex],i=(0,s.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId));let r=e.getPriceScaleById(this._initialPriceScaleId);null===r&&(r=e.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex));const n=this._chartModel.children(i,!0);for(const i of n)t?(this._chartModel.detachSource(i),e.addDataSource(i,r,!1)):e.move(i,r);t?(this._chartModel.detachSource(i),e.addDataSource(i,r,!1)):e.move(i,r),(0,s.ensureNotNull)(i.priceScale()).restoreState(this._originalPriceScaleState()),this._chartModel.fullUpdate()}}class o extends n{constructor(e,t,i,s,r){super(e,t,i,r),this._targetPriceScalePosition=s}_targetPriceScale(e){const t=e.createPriceScaleAtPosition(this._targetPriceScalePosition);return t.restoreState(this._newPriceScaleState("overlay"===this._targetPriceScalePosition)),t}_targetPriceScaleIndex(e){return e===this._chartModel.mainSeries()?0:void 0}}class a extends n{constructor(e,t,i,s,r){super(e,t,i,r),this._targetPriceScaleId=s.id()}_targetPriceScale(e){return(0,s.ensureNotNull)(e.getPriceScaleById(this._targetPriceScaleId))} +_targetPriceScaleIndex(e){}}},8771:(e,t,i)=>{"use strict";i.d(t,{PriceScaleChangeUndoCommand:()=>h});var s=i(50151),r=i(44352),n=i(47539),o=i(98351),a=i(71733);const l=(0,o.getLogger)("Chart.ChartUndoModel"),c=new n.TranslatedString("scale price",r.t(null,void 0,i(47222)));class h extends a.UndoCommand{constructor(e,t,i,s,r){super(c,!1),this._newPriceScaleState=null,this._model=e,this._paneIndex=e.panes().indexOf(t),this._priceScaleId=i.id(),this._state=s,this._timestamp=r?performance.now():null}undo(){if(null!==this._newPriceScaleState)return void l.logDebug("PriceScaleChangeUndoCommand.undo: Command is already undone");const[e,t]=this._paneAndScale();this._newPriceScaleState=t.state(),this._model.restorePriceScaleState(e,t,this._state)}redo(){if(null===this._newPriceScaleState)return void l.logDebug("PriceScaleChangeUndoCommand.redo: Command is not undone");const[e,t]=this._paneAndScale();this._model.restorePriceScaleState(e,t,this._newPriceScaleState),this._newPriceScaleState=null}canMerge(e){return e instanceof h&&null!==this._timestamp&&null!==e._timestamp&&null===this._newPriceScaleState&&e._model===this._model&&e._paneIndex===this._paneIndex&&e._priceScaleId===this._priceScaleId&&Math.abs(e._timestamp-this._timestamp)<1e3}merge(e){this._timestamp=e._timestamp}_paneAndScale(){const e=this._model.panes()[this._paneIndex],t=(0,s.ensureNotNull)(e.getPriceScaleById(this._priceScaleId));return[e,t]}}},34853:(e,t,i)=>{"use strict";i.d(t,{RemoveSourcesCommand:()=>m});var s=i(50151),r=i(44352),n=i(47539),o=i(71733),a=i(6250),l=i(98351),c=i(26989),h=i(89215),d=i(65071);class u extends o.UndoCommand{constructor({title:e,chartModel:t,lineDataSourceIds:i}){super(e),this._excludeLineToolsFromGroupUndoCommands=[],this._undoState=[],this._chartModel=t,this._lineDataSourceIds=i}redo(){const e=this._lineDataSourceIds.map((e=>(0,s.ensureNotNull)(this._chartModel.dataSourceForId(e))));this._groupLineToolsByGroups(e).forEach(((e,t)=>{const i=new d.ExcludeLineToolsFromGroupUndoCommand(this._chartModel,t,e);i.redo(),this._excludeLineToolsFromGroupUndoCommands.push(i)})),e.forEach((e=>{this._undoState.push({state:e.state(!1),paneIndex:this._chartModel.panes().indexOf((0,s.ensureNotNull)(this._chartModel.paneForSource(e))),sharingMode:e.sharingMode().value()}),this._chartModel.removeSource(e)}))}undo(){var e;for(let t=this._undoState.shift();t;t=this._undoState.shift())null===(e=this._chartModel.restoreSource(!1,t.paneIndex,null,t.state,null))||void 0===e||e.share(t.sharingMode);this._excludeLineToolsFromGroupUndoCommands.forEach((e=>e.undo()))}_groupLineToolsByGroups(e){const t=this._chartModel.lineToolsGroupModel();return e.reduce(((e,i)=>{const s=t.groupForLineTool(i);if(null!==s){const t=e.get(s)||[];t.push(i),e.set(s,t)}return e}),new Map)}}const p=(0,l.getLogger)("Chart.RemoveSourcesCommand"),_=new n.TranslatedString("remove line data sources",r.t(null,void 0,i(66414)));class m extends o.UndoCommand{constructor(e,t,i){super(i),this._removeLineDataSourcesUndoCommand=null,this._initialPriceScaleMode=null;const[r,n]=(0, +c.closeSourcesSet)(e,t).reduce(((e,t)=>((0,a.isLineTool)(t)?e[1].push(t.id()):e[0].push(t.id()),e)),[[],[]]);this._chartModel=e,this._sourceIds=r,this._lineDataSourceIds=n,this._sourceStates=[],this._paneIndexes=[],this._priceScalePositionIds=[],this._paneStates=[],this._restorePanes=[];const o=t[0];1===t.length&&(0,h.isStudy)(o)&&(this._initialPriceScaleMode=(0,s.ensureNotNull)(o.priceScale()).mode())}removedIds(){return[...this._sourceIds,...this._lineDataSourceIds]}redo(){this._chartModel.panes().length;const e=this._sourceIds.map((e=>(0,s.ensureNotNull)(this._chartModel.dataSourceForId(e))));this._sourceStates=e.map((e=>(0,s.ensureNotNull)(e.state(!1))));const t=e.map((e=>(0,s.ensureNotNull)(this._chartModel.paneForSource(e))));this._paneIndexes=t.map((e=>this._chartModel.panes().indexOf(e))),this._lineDataSourceIds.length>0&&(this._removeLineDataSourcesUndoCommand=new u({title:_,chartModel:this._chartModel,lineDataSourceIds:this._lineDataSourceIds}),this._removeLineDataSourcesUndoCommand.redo()),this._priceScalePositionIds=e.map(((e,i)=>{const s=e.priceScale();if(null===s)return null;const r=t[i].priceScalePosition(s);return{id:s.id(),position:r,priceScaleIndex:t[i].priceScaleIndex(s,r)}}));const i=new Set;e.forEach(((e,t)=>{i.add(this._paneIndexes[t])})),this._paneStates=e.map(((e,s)=>{const r=this._paneIndexes[s];return i.has(r)?t[s].state(!1,!0):null})),this._restorePanes=e.map((e=>this._chartModel.removeSource(e)))}undo(){const e=[];for(let t=this._sourceStates.length-1;t>=0;t--){const i=this._chartModel.restoreSource(this._restorePanes[t],this._paneIndexes[t],this._paneStates[t],this._sourceStates[t],this._priceScalePositionIds[t]);i&&e.push(i)}e.some(((t,i)=>t.id()!==this._sourceIds[e.length-i-1]))&&p.logError("Source was restored improperly - source ids does not match"),null!==this._initialPriceScaleMode&&(0,s.ensureNotNull)(e[0].priceScale()).setMode(this._initialPriceScaleMode),this._removeLineDataSourcesUndoCommand&&this._removeLineDataSourcesUndoCommand.undo()}}},40320:(e,t,i)=>{"use strict";i.d(t,{RestoreDefaultsPreferencesUndoCommand:()=>m});var s=i(50151),r=i(44352),n=i(47539),o=i(71733),a=i(81345),l=i(55262),c=i(51620),h=i(35663),d=i(35624),u=i(97070),p=i(87172);const _=new n.TranslatedString("apply all chart properties",r.t(null,void 0,i(64034)));class m extends o.UndoCommand{constructor(e){super(_),this._trading=null,this._oldShowSellBuyButtons=null,this._oldNoConfirmEnabled=null,this._oldShowOnlyRejectionNotifications=null,this._oldShowPricesWithZeroVolume=null,this._oldShowPricesWithSpread=null,this._oldOrderExecutedSoundEnabled=null,this._prevWatermarkPreferences=null,this._model=e,this._trading=(0,u.tradingService)(),null!==this._trading&&(this._oldShowSellBuyButtons=this._trading.showSellBuyButtons.value(),this._oldNoConfirmEnabled=this._trading.noConfirmEnabled.value(),this._oldShowOnlyRejectionNotifications=this._trading.showOnlyRejectionNotifications.value(),this._oldShowPricesWithZeroVolume=this._trading.showPricesWith().zeroVolume.value(), +this._oldShowPricesWithSpread=this._trading.showPricesWith().spread.value(),this._oldOrderExecutedSoundEnabled=this._trading.orderExecutedSoundParams.enabled.value()),this._defaultsPreferences=(0,a.defaultsPreferencesByWhiteList)(this._model,this._model.mainSeries()),this._oldPreferences=e.preferences(),this._prevDateFormat=l.dateFormatProperty.value(),this._prevTimeHoursFormat=c.timeHoursFormatProperty.value(),this._prevAddPlusButton=p.addPlusButtonProperty.value(),this._prevShowOpenMarkerStatus=h.showMarketOpenStatusProperty.value(),this._prevCurrencyUnitVisibility=(0,d.currencyUnitVisibilityProperty)().value();const t=this._model.watermarkSource();null!==t&&(this._prevWatermarkPreferences=t.properties().state())}redo(){null!==this._trading&&(this._trading.showSellBuyButtons.setValue(!0),this._trading.noConfirmEnabled.setValue(!1),this._trading.showOnlyRejectionNotifications.setValue(!1),this._trading.showPricesWith().zeroVolume.setValue(!0),this._trading.showPricesWith().spread.setValue(!0),this._trading.orderExecutedSoundParams.enabled.setValue(!1)),this._model.applyPreferences(this._defaultsPreferences),this._model.updateScales(),(0,l.restoreDateFormatSettingsValue)(),(0,c.restoreTimeHoursFormatSettingsValue)(),(0,p.restoreAddPlusButtonSettingsValue)(),(0,h.restoreShowMarketOpenStatusProperty)(),(0,d.restoreCurrencyUnitVisibilitySettingsValue)();const e=this._model.watermarkSource();null!==e&&e.restorePropertiesDefaults()}undo(){null!==this._trading&&(this._trading.showSellBuyButtons.setValue((0,s.ensureNotNull)(this._oldShowSellBuyButtons)),this._trading.noConfirmEnabled.setValue((0,s.ensureNotNull)(this._oldNoConfirmEnabled)),this._trading.showOnlyRejectionNotifications.setValue((0,s.ensureNotNull)(this._oldShowOnlyRejectionNotifications)),this._trading.showPricesWith().zeroVolume.setValue((0,s.ensureNotNull)(this._oldShowPricesWithZeroVolume)),this._trading.showPricesWith().spread.setValue((0,s.ensureNotNull)(this._oldShowPricesWithSpread)),this._trading.orderExecutedSoundParams.enabled.setValue((0,s.ensureNotNull)(this._oldOrderExecutedSoundEnabled))),this._model.applyPreferences(this._oldPreferences),this._model.updateScales(),l.dateFormatProperty.setValue(this._prevDateFormat),c.timeHoursFormatProperty.setValue(this._prevTimeHoursFormat),h.showMarketOpenStatusProperty.setValue(this._prevShowOpenMarkerStatus),p.addPlusButtonProperty.setValue(this._prevAddPlusButton),(0,d.currencyUnitVisibilityProperty)().setValue(this._prevCurrencyUnitVisibility);const e=this._model.watermarkSource();null!==e&&null!==this._prevWatermarkPreferences&&e.properties().mergeAndFire(this._prevWatermarkPreferences)}}},55453:(e,t,i)=>{"use strict";i.d(t,{SetPriceScaleCurrencyUndoCommand:()=>o});var s=i(50151),r=i(71733),n=i(1930);class o extends r.UndoCommand{constructor(e,t,i,r){super(r),this._newSourcesCurrencies=new Map,this._oldSourcesCurrencies=new Map,this._showFade=!1,this._chartWidget=i;const o=i.model().mainSeries();for(const i of e.seriesLikeSources()){if(!i.isVisible()||!i.isActingAsSymbolSource().value())continue +;const e=t||(0,n.symbolOriginalCurrency)((0,s.ensureNotNull)(i.symbolInfo()));this._newSourcesCurrencies.set(i.id(),e),this._oldSourcesCurrencies.set(i.id(),i.currency()),this._showFade=this._showFade||i===o&&i.currency()!==e}}redo(){this._applyCurrencies(this._newSourcesCurrencies)}undo(){this._applyCurrencies(this._oldSourcesCurrencies)}_applyCurrencies(e){const t=this._chartWidget.model().model();e.forEach(((e,i)=>{(0,s.ensureNotNull)(t.dataSourceForId(i)).setCurrency(e)})),this._chartWidget.model().selectionMacro((e=>{e.clearSelection()})),this._showFade&&this._chartWidget.screen.show(!0)}}},5440:(e,t,i)=>{"use strict";i.d(t,{SetPriceScaleModeCommand:()=>o});var s=i(7711),r=i(71733),n=i(97425);class o extends r.UndoCommand{constructor(e,t,i,s){super(i),this._newMode=e,this._priceScaleId=t.id(),this._model=s,this._oldMode=t.mode()}redo(){this._applyMode(this._newMode)}undo(){this._applyMode(this._oldMode)}_applyMode(e){const t=this._findPriceScaleById();null!==t&&((0,s.saveDefaultProperties)(!0),t.setMode(e),(0,s.saveDefaultProperties)(!1),this._model&&(this._model.recalculateAllPanes((0,n.viewportChangeEvent)()),this._model.lightUpdate()))}_findPriceScaleById(){const e=this._model.panes();for(let t=0;t{"use strict";i.d(t,{SetPriceScaleSelectionStrategyCommand:()=>a});var s=i(50151),r=i(71733),n=i(37364);class o{constructor(e){this._leftScales=e.leftPriceScales().map((e=>e.id())),this._rightScales=e.rightPriceScales().map((e=>e.id()))}restorePane(e){this._leftScales.reverse().map((t=>(0,s.ensureNotNull)(e.getPriceScaleById(t)))).forEach((t=>e.movePriceScale(t,"left"))),this._rightScales.reverse().map((t=>(0,s.ensureNotNull)(e.getPriceScaleById(t)))).forEach((t=>e.movePriceScale(t,"right")))}}class a extends r.UndoCommand{constructor(e,t,i){super(i),this._chartModel=e,this._targetStrategy=(0,n.createPriceScaleSelectionStrategy)(t),this._initialState=e.panes().map((e=>new o(e)))}redo(){this._chartModel.panes().forEach((e=>e.setPriceScaleSelectionStrategy(this._targetStrategy))),this._chartModel.fullUpdate()}undo(){const e=this._chartModel.panes();for(let t=0;t{"use strict";i.d(t,{SetPriceScaleUnitUndoCommand:()=>o});var s=i(50151),r=i(71733),n=i(1930);class o extends r.UndoCommand{constructor(e,t,i,r){super(r),this._newSourcesUnits=new Map,this._oldSourcesUnits=new Map,this._showFade=!1,this._chartWidget=i;const o=i.model().mainSeries();for(const i of e.seriesLikeSources()){if(!i.isVisible()||!i.isActingAsSymbolSource().value())continue;const e=t||(0,n.symbolOriginalUnit)((0,s.ensureNotNull)(i.symbolInfo()),this._chartWidget.model().model().unitConversionEnabled());this._newSourcesUnits.set(i.id(),e),this._oldSourcesUnits.set(i.id(),i.unit()),this._showFade=this._showFade||i===o&&i.unit()!==e}}redo(){this._applyUnits(this._newSourcesUnits)}undo(){this._applyUnits(this._oldSourcesUnits)}_applyUnits(e){ +const t=this._chartWidget.model().model();e.forEach(((e,i)=>{(0,s.ensureNotNull)(t.dataSourceForId(i)).setUnit(e)})),this._chartWidget.model().selectionMacro((e=>{e.clearSelection()})),this._showFade&&this._chartWidget.screen.show(!0)}}},30684:(e,t,i)=>{"use strict";i.d(t,{SetScaleRatioPropertiesCommand:()=>o});var s=i(71733),r=i(7711),n=i(97425);class o extends s.UndoCommand{constructor(e,t,i,s){super(i),this._property=e,this._newValue=t,this._model=s,this._priceScale=this._model.mainSeries().priceScale(),this._oldValue=this._property.value(),this._oldMode=this._priceScale.mode()}redo(){this._oldValue=this._property.value(),this._oldMode=this._priceScale.mode(),(0,r.saveDefaultProperties)(!0),this._priceScale.setMode({autoScale:!1,percentage:!1,log:!1}),this._property.setValue(this._newValue),(0,r.saveDefaultProperties)(!1),this._model.recalculateAllPanes((0,n.viewportChangeEvent)()),this._model.lightUpdate()}undo(){(0,r.saveDefaultProperties)(!0),this._property.setValue(this._oldValue),this._priceScale.setMode(this._oldMode),(0,r.saveDefaultProperties)(!1),this._model.recalculateAllPanes((0,n.viewportChangeEvent)()),this._model.lightUpdate()}}},26989:(e,t,i)=>{"use strict";function s(e,t){let i=[];const r=e.children(t,!1);for(let t=0;t{e.children(t,!1).forEach((e=>{i.has(e)||(i.add(e),r(e))}))};return t.forEach(r),t.filter((e=>!i.has(e))).map((t=>s(e,t))).reduce(((e,t)=>e.concat(t)),[])}i.d(t,{closeSourcesSet:()=>r})},67278:(e,t,i)=>{"use strict";i.d(t,{TimeScaleChangeUndoCommand:()=>o});var s=i(98351),r=i(71733);const n=(0,s.getLogger)("Chart.ChartUndoModel");class o extends r.UndoCommand{constructor(e,t,i){super(i,!1),this._newRightOffsetAndBarSpacing=null,this.setCustomFlag("doesnt_affect_save",!0),this._model=e,this._rightOffsetAndBarSpacing=t}undo(){if(null!==this._newRightOffsetAndBarSpacing)return void n.logDebug("TimeScaleChangeUndoCommand.undo: Command is already undone");const e=this._model.timeScale();this._newRightOffsetAndBarSpacing={barSpacing:e.barSpacing(),rightOffset:e.rightOffset()},e.setBarSpacing(this._rightOffsetAndBarSpacing.barSpacing),e.setRightOffset(this._rightOffsetAndBarSpacing.rightOffset),this._model.lightUpdate()}redo(){if(null===this._newRightOffsetAndBarSpacing)return void n.logDebug("TimeScaleChangeUndoCommand.redo: Command is not undone");const e=this._model.timeScale();e.setBarSpacing(this._newRightOffsetAndBarSpacing.barSpacing),e.setRightOffset(this._newRightOffsetAndBarSpacing.rightOffset),this._model.lightUpdate(),this._newRightOffsetAndBarSpacing=null}}},71733:(e,t,i)=>{"use strict";i.d(t,{UndoCommand:()=>r});var s=i(47539);class r{constructor(e,t=!0){this._customFlags={},this._text=e||new s.TranslatedString("",""),this._executeOnPush=t}text(){return this._text}executeOnPush(){return this._executeOnPush}customFlag(e){return this._customFlags[e]}setCustomFlag(e,t){this._customFlags[e]=t}canMerge(e){return!1}merge(e){throw new Error("Should be re-implemented in child classes")}}}, +29443:(e,t,i)=>{"use strict";i.d(t,{createUndoHistory:()=>u});var s=i(50151),r=i(43426),n=i(42437),o=i(71733);class a extends o.UndoCommand{constructor(e,t,i){super(i),this._wv=e,this._newValue=t,this._oldValue=e.value()}redo(){this._wv.setValue(this._newValue)}undo(){this._wv.setValue(this._oldValue)}}var l=i(98351),c=i(26867),h=i.n(c);const d=(0,l.getLogger)("Common.UndoHistory");function u(){const e=[],t=new r.UndoStack,i=new r.UndoStack,o=new(h());function l(s){if(e.length>0)e[e.length-1].addCommand(s);else{i.clear();const e=t.head(),r=e&&e.text().originalText();e&&e.canMerge(s)?e.merge(s):t.push(s);const n=s.text().originalText();""!==n&&n!==r&&d.logNormal("DO: "+n)}s.executeOnPush()&&s.redo(),e.length||o.fire(c())}function c(){const e=t.head(),s=i.head(),r=void 0===e?void 0:e.text(),n=void 0===s?void 0:s.text();return{enableUndo:!t.isEmpty(),undoText:void 0!==r?r.translatedText():r,enableRedo:!i.isEmpty(),redoText:void 0!==n?n.translatedText():n,originalUndoText:void 0!==r?r.originalText():void 0,originalRedoText:void 0!==n?n.originalText():void 0}}return{beginUndoMacro:function(t){const i=new n.UndoMacroCommand(t);return e.push(i),i},clearStack:function(){t.clear(),i.clear(),o.fire(c())},createUndoCheckpoint:function(){return{lastActualCommand:t.isEmpty()?null:t.head()}},endUndoMacro:function(){const t=(0,s.ensureDefined)(e.pop());t.isEmpty()||l(t)},pushUndoCommand:l,redo:function(){if(i.isEmpty())return!1;const e=i.pop();return!!e&&(e.redo(),t.push(e),d.logNormal("REDO: "+e.text().originalText()),o.fire(c()),!0)},redoStack:function(){return i},setWatchedValue:function(e,t,i,s){if(e.value()!==t){const r=new a(e,t,i);r.setCustomFlag("doesnt_affect_save",!!s),l(r),r.redo()}},undo:function(){if(t.isEmpty())return!1;const e=t.pop();return!!e&&(e.undo(),i.push(e),d.logNormal("UNDO: "+e.text().originalText()),o.fire(c()),!0)},undoStack:function(){return t},undoToCheckpoint:function(e){for(;!t.isEmpty()&&e.lastActualCommand!==t.head();)t.pop().undo();i.clear(),o.fire(c())},state:c,onChange:function(){return o}}}},42437:(e,t,i)=>{"use strict";i.d(t,{UndoMacroCommand:()=>r});var s=i(71733);class r extends s.UndoCommand{constructor(e){super(e,!1),this._subcommands=[]}addCommand(e){this._subcommands.push(e)}isEmpty(){return 0===this._subcommands.length}redo(){for(let e=0;e=0;e--)this._subcommands[e].undo()}commands(){return this._subcommands}}},43426:(e,t,i)=>{"use strict";i.d(t,{UndoStack:()=>a});var s=i(71733),r=i(26867),n=i.n(r);const o=(0,i(98351).getLogger)("Common.UndoStack");class a{constructor(){this._commands=[],this._onChange=new(n())}onChange(){return this._onChange}isEmpty(){return 0===this._commands.length}clear(){this.isEmpty()||(this._commands.length=0,this._onChange.fire())}push(e){if(!(e instanceof s.UndoCommand))throw new TypeError("argument must be an instance of UndoCommand");this._commands.push(e),this._onChange.fire(e)}pop(){if(this.isEmpty())return void o.logDebug("pop: undo stack is empty") +;const e=this._commands.pop();return this._onChange.fire(e),e}head(){if(!this.isEmpty())return this._commands[this._commands.length-1]}}},52934:(e,t,i)=>{"use strict";i.d(t,{UnmergeDownUndoCommand:()=>o,UnmergeUpUndoCommand:()=>a,UnmergeToNewBottomPane:()=>l});var s=i(50151),r=i(74879);class n extends r.MoveSourceUndoCommand{constructor(e,t,i){super(e,t,i)}redo(){const e=(0,s.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),t=(0,s.ensureNotNull)(this._chartModel.paneForSource(e)),i=this._chartModel.children(e,!0);t.bulkActionMacro((()=>{i.forEach((e=>this._chartModel.detachSource(e))),this._chartModel.detachSource(e)}));const r=this._chartModel.createPane(this.targetPaneIndex()),n=r.findSuitableScale(e);r.bulkActionMacro((()=>{r.addDataSource(e,n,!1),i.forEach((e=>r.addDataSource(e,n,!1)))})),(0,s.ensureNotNull)(e.priceScale()).restoreState(this._newPriceScaleState(r.isOverlay(e))),this._chartModel.fullUpdate(),this._chartModel.setShouldBeSavedEvenIfHidden(!0)}undo(){const e=(0,s.ensureNotNull)(this._chartModel.dataSourceForId(this._sourceId)),t=(0,s.ensureNotNull)(this._chartModel.paneForSource(e)),i=this._chartModel.children(e,!0);t.bulkActionMacro((()=>{i.forEach((e=>this._chartModel.detachSource(e)));const t=this._chartModel.detachSource(e);(0,s.assert)(t,"Undo of detaching must remove pane")}));const r=this._chartModel.panes()[this._initialPaneIndex];let n=r.getPriceScaleById(this._initialPriceScaleId);null===n&&(n=r.createPriceScaleAtPosition(this._initialPriceScalePosition,this._initialPriceScaleIndex)),r.bulkActionMacro((()=>{r.addDataSource(e,n,!0),i.forEach((e=>r.addDataSource(e,n,!1)))})),(0,s.ensureNotNull)(e.priceScale()).restoreState(this._originalPriceScaleState()),this._chartModel.fullUpdate()}}class o extends n{constructor(e,t,i){super(e,t,i)}targetPaneIndex(){return this._initialPaneIndex+1}}class a extends n{constructor(e,t,i){super(e,t,i)}targetPaneIndex(){return this._initialPaneIndex}}class l extends n{constructor(e,t,i){super(e,t,i)}targetPaneIndex(){return this._chartModel.panes().length}}},50337:(e,t,i)=>{"use strict";i.d(t,{unitConvertibleGroups:()=>n,sourceNewUnitOnPinningToPriceScale:()=>o});var s=i(21580),r=i(1930);function n(e,t,i){const s=(0,r.symbolUnitConvertibleGroupsIfExist)(e,!0);if(null!==s)return s;const n=i.unitGroupById(t);return null===n?[]:[n]}function o(e,t,i,r){let o=null;if(i.unitConversionEnabled()&&(0,s.isSymbolSource)(e)){const s=i.availableUnits(),a=t.unit(s),l=e.unit(),c=null===l?[]:n(e.symbolInfo(),l,s);null!==a&&null!==a.selectedUnit&&!a.allUnitsAreOriginal&&a.selectedUnit!==l&&(r&&null===l||null!==l&&s.convertible(l,c))&&(o=a.selectedUnit)}return o}},84803:(e,t,i)=>{"use strict";i.d(t,{createVisibilityController:()=>l});var s=i(44352),r=i(32563),n=i(60923),o=i(56840);function a(e){return"alwaysOn"===e||"alwaysOff"===e?e:"visibleOnMouseOver"}function l(e,t){let l,c;function h(){if(!l){l=(0,n.createPrimitiveProperty)();let i=o.getValue(e);void 0===i&&void 0!==t&&(i=o.getValue(t)),l.setValue(a(i)),l.subscribe(l,(t=>{o.setValue(e,a(t.value()))}))} +return l}return{property:h,availableValues:function(){return[{id:"visibleOnMouseOver",value:"visibleOnMouseOver",title:s.t(null,void 0,i(89960))},{id:"alwaysOn",value:"alwaysOn",title:s.t(null,void 0,i(71997))},{id:"alwaysOff",value:"alwaysOff",title:s.t(null,void 0,i(9408))}]},actualBehavior:function(){if(!c){c=(0,n.createPrimitiveProperty)();const e=h(),t=()=>{let t=e.value();"alwaysOn"!==t&&"alwaysOff"!==t&&(t=r.mobiletouch?"alwaysOn":"visibleOnMouseOver"),c&&c.setValue(t)};e.subscribe(c,t),t()}return c}}}},3074:(e,t,i)=>{"use strict";i.r(t),i.d(t,{watermarkProperty:()=>d,restoreWatermarkPropertyDefaults:()=>u});var s=i(24377),r=i(56840),n=i(26220),o=i.n(n);const a="symbolWatermark",l={visibility:!1,color:"rgba(80, 83, 94, 0.25)"};function c(){const e=r.getJSON(a);let t=Object.assign({},l,e);if(void 0===e){if(void 0!==r.getJSON("chartproperties")){const e=r.getJSON("chartproperties").symbolWatermarkProperties;if(void 0!==e){const i=(0,s.tryParseRgba)(e.color);t=Object.assign(t,e),null!==i&&(0!==i[3]?t.visibility=!0:(i[3]=.25,t.color=(0,s.rgbaToString)(i)))}}delete t.transparency}return t}let h=null;function d(){return null===h&&(h=new(o())(c()),r.onSync.subscribe(null,(()=>{null!==h&&h.mergeAndFire(c())})),h.listeners().subscribe(null,(()=>{null!==h&&r.setJSON(a,h.state())}))),h}function u(){null!==h&&h.mergeAndFire(l)}},96881:(e,t,i)=>{"use strict";var s=i(12205).translatedIntervalString,r=i(23902).getTranslatedSymbolDescription,n=i(17364).CHART_FONT_FAMILY,o=i(3074),a=o.watermarkProperty,l=o.restoreWatermarkPropertyDefaults,c=i(83499).drawScaled,h=i(64548).applyDefaultsOverrides,d=i(64548).applyPropertiesOverrides;const u="symbolWatermarkProperties";t.Watermark=function(e,t){var i={},o=a();function p(e,t){var s=e.font;return i.hasOwnProperty(s)||(i[s]={}),i[s].hasOwnProperty(t)||(i[s][t]=e.measureText(t).width),i[s][t]}h(o,void 0,!1,u),o.listeners().subscribe(this,(function(){e.updateSource(this)})),this.destroy=function(){o.listeners().unsubscribeAll(this)},this.properties=function(){return o},this.restorePropertiesDefaults=function(){l()},this.applyOverrides=function(e){d(o,void 0,!1,e,u)};var _={renderer:function(e,i){return{draw:function(a,l){c(a,l.pixelRatio,(function(){var l=t.symbolInfo();a.fillStyle=o.color.value();var c,h=l.name;/QUANDL/.test(l.exchange)&&((c=h.split(/\//)).length&&(h=c[c.length-1]));for(var d={description:l.description,short_description:l.short_description,pro_name:l.pro_name,short_name:l.name,local_description:l.local_description,language:l.language},u=[{text:h?h+", "+s(t.interval()):"",font:"96px "+n,lineHeight:117,vertOffset:0},{text:r(d)||"",font:"48px "+n,lineHeight:58,vertOffset:5}],_=0,m=0;mi?i/g:1,_+=v.lineHeight*v.zoom}}var f=Math.max((e-_)/2,0);for(m=0;m{"use strict";i.d(t,{reorderDataSourcesStateZOrder:()=>S,newLineToolZOrder:()=>w,newStudyZOrder:()=>P,moveAfterSource:()=>k,moveBeforeSource:()=>E});var s=i(6250),r=i(89215),n=i(46936),o=i(62472),a=i(93975);function l(e){return(0,s.isLineTool)(e)&&!e.isSpeciallyZOrderedSource()}function c(e){return(0,r.isStudy)(e)&&!e.isSpeciallyZOrderedSource()}function h(e,t){return e.zorder-t.zorder}function d(e,t){(0,o.isMainSeriesState)(e)?e.zorder=0:e.zorder=t}function u(e,t){e.setZorder(t)}function p(e){return e.zorder()}function _(e){return Math.round(1e3*e)/1e3}function m(e,t){const i=Math.max(e,t),s=Math.min(e,t);return Math.max(0,Math.ceil(i)-Math.floor(s)-1)}function g(e,t,i){let s=0;const r=function(e,t){const i=1e3;return Math.abs(t*i-e*i)/i}(t,e);var n;return r>i?(e=Math.trunc(e),s=Math.floor(r/(i+1))):(n=r/(i+1),s=Math.floor(1e3*n)/1e3),{startZOrder:e,zOrderStep:s}}function f(e,t,i,s){let r=e.length,n=t;for(let t=e.length-1;t>=-1;t--)if(-1===t||s(e[t])){const s=t;let o=T(n);if(r-1===s)s>=0&&i(e[s],o);else{const t=m(r,s);let a=0;for(;0===a;){const e=g(n,o,t);n=e.startZOrder,a=e.zOrderStep,0===a&&(o-=1e4,0===o&&(o-=1e4))}let l=r-1;for(;l>s;){const t=_(n-a);i(e[l],t),n=t,l--}s>=0&&i(e[s],o)}n=o,r=s}}function v(e,t,i,s){let r=-1,n=t;for(let t=0;t<=e.length;t++)if(t===e.length||s(e[t])){const s=t;let o=C(n);if(r+1===s)s<=e.length-1&&i(e[s],o);else{const t=m(r,s);let a=0;for(;0===a;){const e=g(n,o,t);n=e.startZOrder,a=e.zOrderStep,0===a&&(o+=1e4,0===o&&(o+=1e4))}let l=r+1;for(;l<=s-1;){const t=_(n+a);i(e[l],t),n=t,l++}s<=e.length-1&&i(e[s],o)}n=o,r=s}}function S(e){!function(e,t,i,s,r,n){let o=null;const a=[];for(const r of e)t(r)?(a.push(r),o=r):(i(r)||s(r))&&a.push(r);a.sort(n),null!==o&&r(o,0);const l=null===o?-1:a.indexOf(o);-1!==l?(f(a.slice(0,l),0,r,i),v(a.slice(l+1),0,r,i)):v(a,0,r,i)}(e,o.isMainSeriesState,o.isStudyState,o.isLineToolState,d,h)}function y(e,t){const i=Math.floor(e/1e4);let s=t.get(i);return void 0===s&&(s=[],t.set(i,s)),s}function b(e,t,i,s,r,n){let o=-1/0,a=1/0,l=-1/0,c=0;const h=new Map;for(let s=0;sr(e)-r(t)));let p=T(r(u[0]));const m=C(p),f=g(p,m,u.length+1).zOrderStep;return 0!==f?(u.forEach((e=>{const t=_(p+f);s(e,t),p=t})),_(p+f)):_(m+5e3)}function w(e,t){return b(e,l,c,u,p,t)}function P(e){let t=-1e4;for(const i of e)c(i)&&(t=Math.min(t,i.zorder()-1e4));return 0===t?-1e4:t}function C(e){const t=1e4*Math.ceil(e/1e4);return t===e?t+1e4:t}function T(e){const t=1e4*Math.floor(e/1e4);return t===e?t-1e4:t}function x(e,t,i,s,r,n,o){const l=t.length,{newItems:c,movedItemsStartIndex:h}=i>0?(0, +a.moveAfter)(e,t,i-1):(0,a.moveBefore)(e,t,0);let d=!1;for(let t=h;tr(e)))?function(e,t,i,s,r,n){let o,a,l=-1,c=-1;0===i?(c=I(e,i+t,s),a=n(e[c])):i+t===e.length?(l=M(e,i-1,s),o=n(e[l])):(l=M(e,i-1,s),o=n(e[l]),c=I(e,i+t,s),a=n(e[c]));if((void 0===o||o<0)&&void 0!==a&&a<=0)f(e.slice(0,c),a,r,s);else if((void 0===a||a>0)&&void 0!==o&&o>=0)v(e.slice(l+1),o,r,s);else{i+t0)&&void 0!==a&&a>=0){c=a;const e=g(c,void 0!==l?l:C(a),t);c=e.startZOrder,p=e.zOrderStep,d=i,u=d+t,h=1}if(0!==p)for(;d!==u;){const t=_(c+h*p);n(e[d],t),c=t,d+=h}else{const t=e.findIndex((e=>r(e)));-1!==t?(f(e.slice(0,t),0,n,s),v(e.slice(t+1),0,n,s)):v(e,0,n,s)}}(c,l,h,r,s,n,o)}function I(e,t,i){for(;t=0&&i(e[t]);)t--;return Math.max(0,t)}function A(e,t,i,s,r,n,o){const a=e.indexOf(i)+1;x(e,t,a,s,r,n,o)}function L(e,t,i,s,r,n,o){const a=e.indexOf(i);x(e,t,a,s,r,n,o)}function k(e,t,i){A(e,t,i,n.isSeries,c,u,p)}function E(e,t,i){L(e,t,i,n.isSeries,c,u,p)}},82501:(e,t,i)=>{"use strict";i.d(t,{setSymbolSearchCompleteOverrideFunction:()=>r,getSymbolSearchCompleteOverrideFunction:()=>n});let s=(e,t)=>{var i;return Promise.resolve({symbol:e,name:null!==(i=null==t?void 0:t.symbol)&&void 0!==i?i:e})};function r(e){s=e}function n(){return s}},71107:(e,t,i)=>{"use strict";i.d(t,{StudyMetaInfoBase:()=>d});var s=i(27147),r=i(50151),n=i(8890);const o=new Set(["CorrelationCoefficient@tv-basicstudies","Correlation - Log@tv-basicstudies-1"]),a=new Set([]),l=new Set(["line"]),c=new Map([["AnchoredVWAP@tv-basicstudies","linetoolanchoredvwap"],["RegressionTrend@tv-basicstudies","linetoolregressiontrend"]]),h=/^([^\$]+)\$\d+$/;class d{static getSourceIdsByInputs(e,t){if(!Array.isArray(e)||!t)return[];const i=[];for(const r of e)if(d.isSourceInput(r)&&(0,s.default)(t[r.id])){const e=t[r.id];e.includes("$")&&i.push(e.split("$")[0])}return i}static isSourceInput(e){return Boolean(e.id&&(("source"===e.id||"src"===e.id)&&("text"===e.type||"source"===e.type)||"source"===e.type))}static getSourceInputIds(e){const t=[];for(const i of e.inputs)d.isSourceInput(i)&&t.push(i.id);return t}static setChildStudyMetaInfoPropertiesSourceId(e,t,i){for(const s of e.inputs){if(!d.isSourceInput(s))continue;const e=i.childs().inputs&&i.childs().inputs.childs()[s.id];if(e){const i=e.value(),s=h.exec(i);if(2===(null==s?void 0:s.length)){if("{pid}"===s[1]){const s=i.replace(/^[^\$]+/,t);e.setValue(s)}}}}}static patchSoSInputs(e,t){const i=e=>{const i=h.exec(e);if(2===(null==i?void 0:i.length)){const s=i[1],n=`${(0, +r.ensureNotNull)(t(s))}`;return e.replace(/^[^\$]+/,n)}return e};for(const t in e)if(/in_[\d+]/.test(t)||"source"===t){const r=e[t];(0,s.default)(r)?e[t]=i(r):(0,n.isExtendedInput)(r)&&(0,n.isExtendedInputSource)(r)&&(r.v=i(r.v))}}static canBeChild(e){if((0,s.default)(e))return!0;if(!e)return!1;if(e.extra&&!d.isAllowedSourceInputsCount(e.extra.sourceInputsCount)||!0===e.canNotBeChild||!1===e.canBeChild||o.has(e.id))return!1;let t=0;for(const i of e.inputs)d.isSourceInput(i)&&(t+=1);return d.isAllowedSourceInputsCount(t)}static isAllowedSourceInputsCount(e){return 1===e}static canHaveChildren(e){if(e){if(e.isTVScriptStrategy||e.TVScriptSourceCode&&isStrategy(e.TVScriptSourceCode))return!1;if(e.id&&!a.has(e.id)&&Array.isArray(e.plots))for(const t of e.plots)if(l.has(t.type))return!0}return!1}static getChildSourceInputTitles(e,t,i){var s;const r={};if(t.plots&&t.plots.length&&e.options&&e.options.length)for(const n of e.options){const e=n?+n.split("$")[1]:NaN,o=isFinite(e)&&t.plots[e];o&&l.has(o.type)&&(r[n]=t.styles&&t.styles[o.id]&&(null===(s=t.styles[o.id])||void 0===s?void 0:s.title)||o.id,i&&(r[n]=i+": "+r[n]))}return r}static canPlotBeSourceOfChildStudy(e){return l.has(e)}static getStudyPropertyRootName(e){const t=c.get(e.id);if(void 0!==t)return t;let i="study_"+e.id;return e.pine&&e.pine.version&&(i+="_"+e.pine.version.replace(".","_")),i}static getStudyPropertyRootNameById(e){const t=c.get(e);return void 0!==t?t:"study_"+e}}},58403:(e,t,i)=>{"use strict";i.d(t,{StudyMetaInfo:()=>a});var s=i(98351).getLogger("Chart.Study.MetaInfo"),r=i(1140).applyOverridesToStudyDefaults,n=i(71107).StudyMetaInfoBase,o={};class a extends n{constructor(e){super(),TradingView.merge(this,{palettes:{},inputs:[],plots:[],graphics:{},defaults:{}}),TradingView.merge(this,e);var t=e.fullId||e.id;TradingView.merge(this,a.parseIdString(t))}static versionOf(e){var t="_metainfoVersion"in e&&isNumber(e._metainfoVersion)?e._metainfoVersion:0;return t<0&&s.logError("Metainfo format version cannot be negative: "+t),t}static parseIdString(e){var t={};if(-1===e.indexOf("@"))t.shortId=e,t.packageId="tv-basicstudies",t.id=e+"@"+t.packageId,t.version=1;else{var i=e.split("@");t.shortId=i[0];var s=i[1].split("-");if(3===s.length)t.packageId=s.slice(0,2).join("-"),t.id=t.shortId+"@"+t.packageId,t.version=s[2];else if(1===s.length&&"decisionbar"===s[0])t.packageId="les-"+s[0],t.id=t.shortId+"@"+t.packageId,t.version=1;else{if(1!==s.length)throw new Error("unexpected study id:"+e);t.packageId="tv-"+s[0],t.id=t.shortId+"@"+t.packageId,t.version=1}}if(t.fullId=t.id+"-"+t.version,"tv-scripting"===t.packageId){var r=t.shortId;if(0===r.indexOf("Script$")||0===r.indexOf("StrategyScript$")){var n=r.indexOf("_");t.productId=n>=0?r.substring(0,n):t.packageId}else t.productId=t.packageId}else t.productId=t.packageId;return t}static getPackageName(e){return(/^[^@]+@([^-]+-[^-]+)/.exec(e||"")||[0,"tv-basicstudies"])[1]}static cutDollarHash(e){var t=e.indexOf("$"),i=e.indexOf("@");return-1===t?e:e.substring(0,t)+(i>=0?e.substring(i):"")}static hasUserIdSuffix(e){ +return/^USER;[\d\w]+;\d+$/.test(e)}static hasPubSuffix(e){return/^PUB;.+$/.test(e)}static hasStdSuffix(e){return/^STD;.+$/.test(e)}static isStandardPine(e){return/^(Strategy)?Script\$STD;.*@tv-scripting$/.test(e)}static getStudyIdWithLatestVersion(e){const t=a.cutDollarHash(e.id),i=t.indexOf("CP@tv-basicstudies")>=0;let s=t;return t.indexOf("@tv-scripting")>=0?s+="-101!":s+=i?"-"+e.version+"!":"-"+e.version,s}defaultInputs(){for(var e=[],t=0;t0?e[0].id:null}createDefaults(){if(this.defaults){var e=TradingView.clone(this.defaults);e.precision="default";var t=a.getStudyPropertyRootName(this);defaults.create(t,e)}}removeDefaults(){defaults.remove(a.getStudyPropertyRootName(this))}static findStudyMetaInfoByDescription(e,t){if(e){for(var i=0;i{"use strict";window.TradingView=window.TradingView||{},window.requireAll=function(e){return e.keys().map(e)},i(32563).setClasses(),i(32020),i(56186).install(),i(49483),i(65665),i(93731),i(11417),i(11536),i(39056),i(56840)},67498:(e,t,i)=>{"use strict";i(13781);var s=i(50151).assert;i(16051),i(64548),i(51368);const r=i(2484);JSON.parse(urlParams.disabledFeatures).forEach((function(e){r.setEnabled(e,!1)})),JSON.parse(urlParams.enabledFeatures).forEach((function(e){r.setEnabled(e,!0)})),function(){window.__settingsOverrides=window.parent[window.urlParams.uid].settingsOverrides||{};var e=window.parent[window.urlParams.uid].settingsAdapter;null!=e?(TVSettings.setSettingsAdapter(e),TVSettings.sync()):r.enabled("use_localstorage_for_settings")&&TVSettings.sync()}();var n=i(17364).setChartFontFamily;window.urlParams.customFontFamily&&n(window.urlParams.customFontFamily);var o=i(96642).RestrictedToolsetBootloader,a=i(38190).HeaderToolbarBootloader,l=i(26971).DrawingToolbarBootloader,c=i(85323).isDrawingToolbarVisible;(0,i(32563).setClasses)() +;var h=i(8840),d=i(45345).setTheme,u=i(9416),p=i(91612),_=i(66141),m=i(88021).migrateShortcut,g=i(93919).ChartSaver,f=i(93958).SaveChartService,v=i(5520).LoadChartService,S=i(87520).StudyTemplates,y=i(81205).FavoriteStudyTemplateService,b=i(82992).linking,w=i(76422),P=i(74599).formatterOptions,C=i(69145).customFormatters,T=i(30371).StudyMarket,x=i(21097).TVXWindowEvents,I=i(71668).createDeferredPromise,M=i(933).deepExtend,A=i(68671).randomHash,L=i(84912).convertPropertyToWatchedValue,k=i(11954).property,E=i(43074).property,D=i(55262).dateFormatProperty,B=i(51620).timeHoursFormatProperty,V=i(40962).CustomTimezones,R=i(35624).currencyUnitVisibilityProperty,N=i(43370).default,O=i(578).Interval,F=i(89356).Root,W=i(28325).ChartPage,H=i(36776).destroyQuoteSessions,z=i(45673).TIMEFRAMETYPE,U=new W(new F(window).allocate()),j=U.allocate({areaName:"center"}),G=(window.parent[urlParams.uid].brokerFactory,Boolean(!1)),q=i(90981).CHART_WIDGET_COLLECTION_SERVICE,$=i(16216);i(17152);var Y=i(45818),K=i(8222).createFavoriteDrawingToolbar,X=i(77317).setupChartEventHint,Z=i(81602).setupChartScreenshotHint,J=i(79930),Q=i(58403).StudyMetaInfo,ee=i(73809);i(95056),i(40716);var te=i(78136).setSearchRequestDelay,ie=i(77906),se=i(76702),re=i(74585).addBrandingSource,ne=i(65312).setAdditionalSymbolInfoFields,oe=i(82501).setSymbolSearchCompleteOverrideFunction,ae=i(39263).DropdownApi,le=i(60223).ContextMenuManager;i(67049).setDefaultWatchlistSymbols,i(67049).defaultWatchlistSymbols;const ce=new AbortController;var he=window.parent[urlParams.uid].getCustomIndicators,de=I(),ue=I(),pe=r.enabled("left_toolbar");if(void 0!==window.parent[urlParams.uid].contextMenu){var _e=window.parent[urlParams.uid].contextMenu;void 0!==_e.items_processor&&le.setCustomItemsProcessor(_e.items_processor),void 0!==_e.renderer_factory&&le.setCustomRendererFactory(_e.renderer_factory)}if(Promise.all([de.promise,ue.promise]).then((function(){window.ChartApiInstance.start()})),"function"==typeof he){var me=he(se);me&&me.then?me.then((function(e){if(!Array.isArray(e))return console.warn("custom_indicators_getter should be a function that returns a Promise object which result is an array of custom indicators"),void de.resolve();JSServer.studyLibrary.push.apply(JSServer.studyLibrary,e),de.resolve(),console.log("{0} custom indicators loaded.".format(e.length))})).catch((function(e){console.warn("Error loading custom indicators "+e),de.resolve()})):(console.warn("custom_indicators_getter should be a function that returns a Promise object"),de.resolve())}else de.resolve();window.widgetReady=function(e){w.subscribe("onChartReady",e)};var ge=urlParams.theme&&urlParams.theme.toLowerCase();function fe(e){window.__defaultsOverrides=window.__defaultsOverrides||{},M(window.__defaultsOverrides,e),void 0!==TradingView.defaultProperties&&void 0!==TradingView.defaultProperties.chartproperties&&(window.applyDefaultsOverrides(TradingView.defaultProperties.chartproperties),window.applyDefaultOverridesToLinetools())}!function(e){h.themes[e]&&d(e)}(ge), +window.applyStudiesOverrides=function(e){e&&(window.chartWidgetCollection?window.chartWidgetCollection.applyStudiesOverrides(e):Q.mergeDefaultsOverrides(e))},window.applyOverrides=function(e){fe(e),window.chartWidgetCollection&&window.chartWidgetCollection.applyOverrides(e)},window.doWhenApiIsReady=function(e){window.tradingViewApi?e():ue.promise.then(e)},window.applyTradingCustomization=function(e){for(var t in e.order)TradingView.defaultProperties.linetoolorder[t]=e.order[t];for(var t in e.position)TradingView.defaultProperties.linetoolposition[t]=e.position[t]},window.changeTheme=function(e,t){var i=h.themes[e.toLowerCase()];return i?window.tradingViewApi.themes().setStdTheme(i.name,!0,t&&t.disableUndo):Promise.resolve()},window.getTheme=function(){return window.tradingViewApi.themes().getCurrentThemeName()},window.is_authenticated=!1;JSON.parse(window.urlParams.brokerConfig);i(44352).t(null,void 0,i(65911)),i(44352).t(null,void 0,i(68111)),i(44352).t(null,void 0,i(5607));var ve=null,Se=I(),ye=null,be=function(){if(r.setEnabled("charting_library_debug_mode","true"===urlParams.debug),r.setEnabled("chart_property_page_trading",!1),r.enabled("remove_library_container_border")){var e=document.querySelector("#library-container");null!==e&&(e.style.border="0px",e.style.padding="1px")}r.enabled("no_min_chart_width")&&(window.document.body.style.minWidth="0px"),null!=urlParams.studiesOverrides&&Q.mergeDefaultsOverrides(JSON.parse(urlParams.studiesOverrides)),s(void 0===TradingView.defaultProperties,"Default properties are inited before applying overrides"),fe(JSON.parse(urlParams.overrides)),urlParams.numeric_formatting=urlParams.numeric_formatting&&JSON.parse(urlParams.numeric_formatting),urlParams.numeric_formatting&&"string"==typeof urlParams.numeric_formatting.decimal_sign&&(P.decimalSign=urlParams.numeric_formatting.decimal_sign[0]),window.ChartApiInstance=new J(window.parent[urlParams.uid].datafeed),window.parent[urlParams.uid].customFormatters&&(window.parent[urlParams.uid].customFormatters.timeFormatter&&(C.timeFormatter=window.parent[urlParams.uid].customFormatters.timeFormatter),window.parent[urlParams.uid].customFormatters.dateFormatter&&(C.dateFormatter=window.parent[urlParams.uid].customFormatters.dateFormatter),window.parent[urlParams.uid].customFormatters.tickMarkFormatter&&(C.tickMarkFormatter=window.parent[urlParams.uid].customFormatters.tickMarkFormatter),window.parent[urlParams.uid].customFormatters.priceFormatterFactory&&(C.priceFormatterFactory=window.parent[urlParams.uid].customFormatters.priceFormatterFactory),window.parent[urlParams.uid].customFormatters.studyFormatterFactory&&(C.studyFormatterFactory=window.parent[urlParams.uid].customFormatters.studyFormatterFactory)),window.parent[urlParams.uid].customTimezones&&V.instance().addTimezones(window.parent[urlParams.uid].customTimezones),window.ChartApiInstance.setStudiesAccessController(window.ChartApiInstance.createStudiesAccessController(urlParams.studiesAccess)) +;var t,n=urlParams.chartContent?JSON.parse(urlParams.chartContent).json:void 0,d=urlParams.chartContentExtendedData?JSON.parse(urlParams.chartContentExtendedData):n?n.extendedData:void 0,p=urlParams.interval||"D",_=function(e){var t=/(\d+)(\w+)/;return e.map((function(e){var s=t.exec(e.text),r=s[2].toLowerCase(),n=parseInt(s[1]),o="y"===r?12*n+"M":n+r,a=O.parse(e.resolution);return{text:e.title||n+i(44352).t(r,{context:"dates",count:n},i(673)),description:e.description||"",value:{value:o.toUpperCase(),type:z.PeriodBack},targetResolution:a.value(),requiresIntraday:a.isIntraday()}}))}(JSON.parse(urlParams.timeFrames)),m={resizerBridge:j,padding:r.enabled("border_around_the_chart")?2:0,content:n,widgetOptions:{addToWatchlistEnabled:!1,hideIdeas:!0,addVolume:window.ChartApiInstance.studiesAccessController.isToolEnabled("Volume"),muteSessionErrors:!0,timezone:urlParams.timezone,defSymbol:urlParams.symbol,defInterval:p,compareSymbols:urlParams.compareSymbols&&JSON.parse(urlParams.compareSymbols),defTimeframe:(t=window.parent[urlParams.uid].timeframe,t?"string"==typeof t?t:{...t,type:"time-range"}:t),paneContextMenuEnabled:r.enabled("pane_context_menu"),paneContextMenu:{mainSeriesTrade:G},priceScaleContextMenuEnabled:r.enabled("scales_context_menu"),currencyConversionEnabled:r.enabled("pricescale_currency"),unitConversionEnabled:r.enabled("pricescale_unit"),legendWidgetEnabled:r.enabled("legend_widget"),legendWidget:{contextMenu:{settings:r.enabled("show_chart_property_page"),showOpenMarketStatus:r.enabled("display_market_status")}},sourceStatusesWidget:{errorSolution:!1},marketStatusWidgetEnabled:r.enabled("display_market_status"),chartWarningWidget:{subscriptionFullInfo:!1},timeScaleWidget:{contextMenuEnabled:r.enabled("scales_context_menu"),timezoneMenuEnabled:r.enabled("timezone_menu"),priceAxisLabelsOptions:{showLabels:r.enabled("main_series_scale_menu")}},timeScale:{preserveBarSpacing:!1,lockVisibleTimeRangeOnResize:r.enabled("lock_visible_time_range_on_resize"),rightBarStaysOnScroll:r.enabled("right_bar_stays_on_scroll"),minBarSpacing:urlParams.time_scale&&JSON.parse(urlParams.time_scale).min_bar_spacing},goToDateEnabled:r.enabled("go_to_date"),crossHair:{menuEnabled:r.enabled("chart_crosshair_menu")},handleScale:{mouseWheel:r.enabled("mouse_wheel_scale"),pinch:r.enabled("pinch_scale"),axisPressedMouseMove:{time:r.enabled("axis_pressed_mouse_move_scale"),price:r.enabled("axis_pressed_mouse_move_scale")}},handleScroll:{mouseWheel:r.enabled("mouse_wheel_scroll"),pressedMouseMove:r.enabled("pressed_mouse_move_scroll"),horzTouchDrag:r.enabled("horz_touch_drag_scroll"),vertTouchDrag:r.enabled("vert_touch_drag_scroll")},shiftVisibleRangeOnNewBar:r.enabled("shift_visible_range_on_new_bar"),croppedTickMarks:r.enabled("cropped_tick_marks"),countdownEnabled:r.enabled("countdown"),indicatorsDialogShortcutEnabled:r.enabled("insert_indicator_dialog_shortcut")},seriesControlBarEnabled:r.enabled("timeframes_toolbar"),seriesControlBar:{timeFramesWidgetEnabled:!0,timeFramesWidget:{goToDateEnabled:r.enabled("go_to_date"), +availableTimeFrames:function(e,t){return e?t!==ie.STATUS_DELAYED&&t!==ie.STATUS_DELAYED_STREAMING&&t!==ie.STATUS_EOD&&t!==ie.STATUS_READY?[]:_.filter((function(t){return!(t.requiresIntraday&&!e.has_intraday)&&!(e.supported_resolutions&&!e.supported_resolutions.includes(t.targetResolution))})):[]}},timeWidgetEnabled:!0,timeWidget:{timezoneMenuEnabled:r.enabled("timezone_menu")},adjustForDividendsButtonEnabled:!1,sessionIdButtonEnabled:r.enabled("pre_post_market_sessions"),backAdjustmentButtonEnabled:!1,settlementAsCloseButtonEnabled:!1,percentageScaleButtonEnabled:!0,logScaleButtonEnabled:!0,autoScaleButtonEnabled:!0,fullscreenButtonEnabled:!0,mobileChangeLayoutEnabled:!1},globalEvents:!0,snapshotUrl:urlParams.snapshotUrl,mobileForceChartMaximizeEnabled:!1,saveChartEnabled:r.enabled("save_shortcut")};pe&&(K(),m.widgetOptions.isDrawingToolbarVisible=c),d&&(m.metaInfo={id:d.uid,name:d.name,description:d.description,uid:d.uid,username:"",tags:""}),window.parent[urlParams.uid].additionalSymbolInfoFields&&ne(window.parent[urlParams.uid].additionalSymbolInfoFields),window.parent[urlParams.uid].symbolSearchComplete&&oe(window.parent[urlParams.uid].symbolSearchComplete);var I=window.chartWidgetCollection=new Y(m);let M=!1;I.onAboutToBeDestroyed.subscribe(null,(()=>{M=!0}),!0),re(I),window.studyMarket=new T(I),void 0!==$&&$.registerService(q,I),I.activeChartWidget.subscribe((function(e){w.emit("activeChartChanged",I.getAll().indexOf(e))})),window.saver=new g(I);var A=new f(I,window.saver),L=new v(I);window.chartWidget=I.activeChartWidget.value(),window.pro=new TradingView.Pro;var k=function(e){if(!r.enabled("header_widget"))return null;var t=U.allocate({areaName:"top"}),s=new(0,i(25927).ChartChangesWatcher)(e.chartWidgetCollection,window.saver,w),n=JSON.parse(urlParams.favorites);n.intervals=n.intervals.map((function(e){var t=""+e;return t.match(/1[DWMYdwmy]/)&&(t=t.slice(1)),t}));var l,c=null;r.enabled("study_templates")&&(c=new y(x,TVSettings),ye=new S({chartWidgetCollection:e.chartWidgetCollection,favoriteStudyTemplatesService:c}));var h=urlParams.header_widget_buttons_mode;"fullsize"===h&&(l=["full"]);"compact"===h&&(l=["small"]);return new a(new o,{chartSaver:window.saver,chartApiInstance:ChartApiInstance,chartWidgetCollection:e.chartWidgetCollection,defaultFavoriteStyles:n.chartTypes,defaultFavoriteIntervals:n.intervals,hideStudyTemplates:!0,resizerBridge:t,studyMarket:window.studyMarket,studyTemplates:ye,favoriteStudyTemplatesService:c,allowedModes:l,saveChartService:e.saveChartService,loadChartService:e.loadChartService,chartChangesWatcher:s,onClick:Ee,snapshotUrl:e.snapshotUrl})}({chartWidgetCollection:I,saveChartService:A,loadChartService:L,snapshotUrl:urlParams.snapshotUrl});null!==k?k.load().then((function(e){ve=e.getComponent(),Se.resolve()})):(Se.promise.catch((function(){})),Se.reject("header widget is not loaded"));var E=function(e){if(pe){var t=urlParams.toolbarbg&&/^[0-9a-f]+$/i.test(urlParams.toolbarbg)?String(urlParams.toolbarbg):void 0;if(t){var i=document.createElement("style") +;i.textContent="body,.chart-controls-bar,#footer-chart-panel{background-color:#"+t+" !important}",document.head.appendChild(i)}return new l({bgColor:t,chartWidgetCollection:e,drawingsAccess:urlParams.drawingsAccess?JSON.parse(urlParams.drawingsAccess):void 0,resizerBridge:U.allocate({areaName:"left"}),onClick:Ee})}return null}(I),D=null;window.tradingViewApi=new ee({chartWidgetCollection:I,chartApiInstance:window.ChartApiInstance,saveChartService:A,loadChartService:L});if(b.bindToChartWidgetCollection(I),TradingView.isNaN(urlParams.studyCountLimit)||(TradingView.STUDY_COUNT_LIMIT=Math.max(2,+urlParams.studyCountLimit)),!TradingView.isNaN(urlParams.ssreqdelay)){var B=Math.max(0,+urlParams.ssreqdelay);te(B)}window.ChartApiInstance.connect(),Promise.all([i.e(5652),i.e(8230),i.e(7624),i.e(4819),i.e(9333),i.e(6092),i.e(8619),i.e(8825),i.e(5761),i.e(4412),i.e(8009),i.e(1140),i.e(3562),i.e(105),i.e(5639),i.e(8819),i.e(6879),i.e(1528),i.e(7263),i.e(962),i.e(1075),i.e(5747),i.e(1890),i.e(2182),i.e(2804),i.e(2306)]).then(i.t.bind(i,59197,23)).then((({default:e})=>{M||(window.lineToolPropertiesToolbar=new e(I))}));var R=document.querySelector(".tv-content");function F(){E&&E.load(ce.signal),D&&D.load(ce.signal).then((function(e){window.footerWidget=e.getComponent()}))}null!==R&&R.addEventListener("contextmenu",(function(e){null!==e.target&&"input"!==e.target.tagName.toLowerCase()&&"textarea"!==e.target.tagName.toLowerCase()&&e.preventDefault()})),ue.resolve(),I.undoHistory.undoStack().onChange().subscribe(null,N((function(e){e&&!e.customFlag("doesnt_affect_save")&&w.emit("onAutoSaveNeeded")}),1e3*(urlParams.autoSaveDelay||5),{leading:!1,trailing:!0})),window.chartWidget.withModel(null,(function(){if(ChartApiInstance.on("realtime_tick",(function(e){w.emit("onTick",e)})),!h.savedThemeName()&&ge){var e=h.getStdTheme(ge);e&&e.content&&void 0===n&&I.applyTheme({theme:e.content,onlyActiveChart:!1,restoreNonThemeDefaults:!1,themeName:ge,standardTheme:!0,syncState:!0,noUndo:!0}).then((()=>window.applyOverrides(window.__defaultsOverrides)))}r.enabled("charting_library_debug_mode")&&w.subscribeToAll((function(){var e=Array.prototype.slice.call(arguments);console.log('Event "{0}", arguments: {1}'.format(e[0],JSON.stringify(e.slice(1))))})),X&&(X(I),X=null),Z&&(Z(I,{seriesControlBarEnabled:r.enabled("timeframes_toolbar")}),Z=null)})),u.isAnyChartWidgetInitialized(I)?F():u.waitAnyChartWidgetInitialized(I,F),w.subscribe("chart_load_requested",(function(e){window.tradingViewApi.loadChart({json:JSON.parse(e.content),extendedData:e})}))};window.addEventListener("unload",(function(){ce.abort(),window.widgetbar&&(window.widgetbar.destroy(),window.widgetbar=null),window.chartWidgetCollection&&(window.chartWidgetCollection.destroy(),window.chartWidgetCollection=null),window.ChartApiInstance&&window.ChartApiInstance.disconnect(),H(),window.ChartApiInstance&&(window.ChartApiInstance.destroy(),window.ChartApiInstance=null)})), +r.enabled("saveload_storage_customization")&&(window.parent[urlParams.uid].saveLoadAdapter?p.setCustomAdapter(window.parent[urlParams.uid].saveLoadAdapter):void 0!==urlParams.chartsStorageUrl&&urlParams.chartsStorageUrl&&void 0!==urlParams.clientId&&urlParams.clientId?p.initialize(urlParams.clientId,urlParams.userId,urlParams.chartsStorageUrl,urlParams.chartsStorageVer||"1.0"):(r.setEnabled("saveload_storage_customization",!1),r.setEnabled("header_saveload",!1)));var we=I();function Pe(){we.resolve()}window.parent[urlParams.uid].loadLastChart&&r.enabled("saveload_storage_customization")?p.getCharts().then((function(e){if(0!==e.length){var t=e.sort((function(e,t){return t.modified_iso-e.modified_iso}))[0];p.getChartContent(t).then((function(e){var t=JSON.parse(e.content);t.extendedData=e,urlParams.chartContent=JSON.stringify({json:t}),Pe()})).catch(Pe)}else Pe()})).catch(Pe):Pe();var Ce,Te,xe=I();Promise.all([xe.promise,we.promise,window.loadedCustomCss]).then((function(){var e,t,i,s,n,o,a=document.querySelector(".loading-indicator");if(a&&(a.style.display="none"),setTimeout(be,0),r.enabled("14851")&&Math.random()<=.02){e=window,t=document,i="script",s="ga",e.GoogleAnalyticsObject=s,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=1*new Date,n=t.createElement(i),o=t.getElementsByTagName(i)[0],n.async=1,n.src="//www.google-analytics.com/analytics.js",o.parentNode.insertBefore(n,o);var l=document.URL.match(new RegExp("(:?.*://)([^/]+)/.*"))[2];ga("create","UA-112911840-1","auto"),ga("set","anonymizeIp",!0),ga("set",{hostname:l,page:l,referrer:l}),ga("send","pageview")}})),Ce=!0,window.parent[urlParams.uid].datafeed.onReady((function(e){Ce&&console.warn("`onReady` should return result asynchronously. Use `setTimeout` with 0 interval to execute the callback function."),window.configurationData=e,xe.resolve()})),Ce=!1,window.getFunctionFromArguments=function(e){return window.parent[urlParams.uid][e]},window.createShortcutAction=(Te=_.createGroup({desc:"API"}),function(e,t){Te.add({hotkey:m(e),handler:t})}),window.initializationFinished=function(){window.chartWidgetCollection.undoHistory.clearStack()},window.headerReady=function(){return Se.promise},window.createButton=function(e){if(null===ve)throw new Error("Cannot create button: header widget is not ready or is not loaded - use `headerReady` to wait until header is ready");return(e=e||{}).align=e.align||"left",e.useTradingViewStyle=e.useTradingViewStyle||!1,ve.addButton(A(),e)},window.createDropdown=function(e){if(void 0===e)throw new Error("Cannot create dropdown without any parameters. Please refer to the documentation");void 0===e.align&&(e.align="left");const t=A();return ve?(ve.addDropdown(t,e),Promise.resolve(new ae(ve,t))):Se.promise.then((()=>(ve.addDropdown(t,e),new ae(ve,t))))},window.getAllFeatures=function(){const e=r.getAllFeatures();return Object.keys(e).forEach((function(t){isNaN(parseFloat(t))||delete e[t]})),e};var Ie=null;window.getNavigationButtonsVisibility=function(){return null===Ie&&(Ie=L(k())),Ie};var Me=null +;window.getPaneButtonsVisibility=function(){return null===Me&&(Me=L(E())),Me};var Ae=null;window.getDateFormat=function(){return null===Ae&&(Ae=L(D)),Ae};var Le=null;window.getTimeHoursFormat=function(){return null===Le&&(Le=L(B)),Le};var ke=null;function Ee(e){var t=TradingView.bottomWidgetBar;t&&t.turnOffMaximize()}window.getCurrencyAndUnitVisibility=function(){return null===ke&&(ke=L(R())),ke}},11536:(e,t,i)=>{e=i.nmd(e),TradingView.cleanButAmpersand=function(e,t){var i=t?["&"]:["&"];return TradingView.clean(e,t,i)},TradingView.strip_tags=function(e){return e&&e.replace?e.replace(/(<([^>]+)>)/gi,""):e},TradingView.encodeSpread=function(e){return encodeURIComponent(e)},TradingView.clean=function(e,t,i){var s=[["&","&"],["<","<"],[">",">"],['"',"""],["'","'"],["'","'"]],r=e;if(!e||!e.replace)return r;for(var n=0;n{"use strict";i.r(t);var s=i(21097),r=i(51768),n=i(38780);function o(e,t=!1){"loading"!==document.readyState?t?setTimeout((()=>e()),1):e():document.addEventListener("DOMContentLoaded",(()=>e()))}new Promise((e=>{o(e)}));function a(e,t="x"){let i=!1;return"x"!==t&&"both"!==t||(i=i||e.offsetWidth{document.addEventListener("mouseenter",(e=>{const t=e.target;if(t instanceof HTMLElement&&t.matches(".apply-overflow-tooltip")){let e="x";if(t.matches(".apply-overflow-tooltip--direction_both")?e="both":t.matches(".apply-overflow-tooltip--direction_y")&&(e="y"),t.matches(".apply-overflow-tooltip--check-children-recursively")){if(!l(t,e))return}else if(t.matches(".apply-overflow-tooltip--check-children")){let i=!1;const s=t.children;for(let t=0;t(t.nodeType===Node.TEXT_NODE&&e.push(t.textContent||""),e)),[]).join("").trim(),(0,n.showOnElement)(t,{text:i});const s=()=>{(0,n.hide)(),["mouseleave","mousedown"].forEach((e=>t.removeEventListener(e,s)))};["mouseleave","mousedown"].forEach((e=>t.addEventListener(e,s)))}}),!0)}));var c=i(26867),h=i.n(c),d=i(11417),u=i(933);let p;function _(e){window.iframeAuthWidget&&!1===window.user.profile_data_filled&&(window.iframeAuthWidget.preventClose=!0);const t=window.user.available_offers||{};window.TVSettings&&window.TVSettings.sync(window.user.settings),window.is_authenticated?(e||(initOfferLoginStateChangeButton(),onGoPro()&&window.location.reload()),!1===window.user.profile_data_filled&&((0, +r.trackEvent)("Conversion","First login"),delete window.user.profile_data_filled)):(Object.keys(t).forEach((e=>{const i=e;t[i].available_for_anons||delete t[i]})),window.user={username:"Guest",following:"0",followers:"0",ignore_list:[],available_offers:t},d.TVLocalStorage.removeItem("trial_availiable"))}p=window.loginStateChange?window.loginStateChange:window.loginStateChange=new(h()),p.subscribe(null,_),s.TVXWindowEvents.on("loginStateChange",(e=>{const t=JSON.parse(e);window.user=t.user,window.is_authenticated=!!t.is_authenticated,p.fire()})),s.TVXWindowEvents.on("signOut",(()=>{!function(){if(window.initData.lfs){const e=document.getElementsByClassName("js-admin-warning")[0];document.body.removeChild(e)}let e=!0;[/^\/chart\//,/^\/share-your-love\//].forEach((t=>{t.test(window.location.pathname)&&(e=!1)})),e&&window.location.reload()}()})),(()=>{const e="user-obj-changed",t={};window.crossTabSyncUserAttr=t=>{const i={};t instanceof Array?t.forEach((e=>{i[e]=window.user[e]})):i[t]=window.user[t],s.TVXWindowEvents.emit(e,JSON.stringify(i))},s.TVXWindowEvents.on(e,(e=>{const i=JSON.parse(e);let s;for(s in i)if(i.hasOwnProperty(s)){window.user[s]=i[s];(t[s]||[]).forEach((e=>{e.fire(i[s])}))}}))})(),window.TradingView.changeLoginState=e=>{window.is_authenticated=!!e,s.TVXWindowEvents.emit("loginStateChange",JSON.stringify({is_authenticated:window.is_authenticated,user:window.user})),p.fire()},window.loginUser=function(e,t){window.TVDialogs&&window.TVDialogs.signModal&&window.TVDialogs.signModal.close(),window.user=(0,u.deepExtend)({},e),window.TradingView.changeLoginState(!0),"function"==typeof t&&window.TVDialogs&&window.TVDialogs.signModal?window.TVDialogs.signModal.on("signinSuccess",(()=>{t()})):"function"==typeof t&&t()},window.loginRequiredDelegate=new(h()),window.runOrSignIn=(e,t)=>{t||(t={}),e()},window.onLoginStateChange=_,window.TradingView.setTrialAvailiable=e=>{d.TVLocalStorage.setItem("trial_availiable",e?"1":"0")},window.TradingView.notificationsChanged=new(h())},38031:(e,t,i)=>{"use strict";i.r(t),i.d(t,{generateColor:()=>r,applyAlpha:()=>n,alphaToTransparency:()=>o,transparencyToAlpha:()=>a,applyTransparency:()=>l,resetTransparency:()=>c,getLuminance:()=>h,isHexColor:()=>d,colorFromBackground:()=>u,gradientColorAtPercent:()=>p,isColorDark:()=>_,rgbaFromInteger:()=>m,rgbaToInteger:()=>g,colorToInteger:()=>f});var s=i(24377);function r(e,t,i){if(t=t||0,!d(e))return i?(0,s.rgbaToString)((0,s.rgba)((0,s.parseRgb)(e),(0,s.normalizeAlphaComponent)(a(t)))):e;const[r,n,o]=(0,s.parseRgb)(e),l=(0,s.normalizeAlphaComponent)(a(t));return(0,s.rgbaToString)([r,n,o,l])}function n(e,t){return r(e,o(t))}function o(e){return 100*(1-e)}function a(e){if(e<0||e>100)throw new Error("invalid transparency");return 1-e/100}function l(e,t){if("transparent"===e)return e;const i=(0,s.parseRgba)(e),r=i[3];return(0,s.rgbaToString)((0,s.rgba)(i[0],i[1],i[2],a(t)*r))}function c(e){return"transparent"===e||d(e)?e:(0,s.rgbaToString)((0,s.rgba)((0,s.parseRgb)(e),(0,s.normalizeAlphaComponent)(1)))}function h(e){const t=(0, +s.parseRgb)(e).map((e=>(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)));return Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function d(e){return 0===e.indexOf("#")}function u(e){return"black"===(0,s.rgbToBlackWhiteString)((0,s.parseRgb)(e),150)?"#ffffff":"#000000"}function p(e,t,i){const[r,n,o,a]=(0,s.parseRgba)(e),[l,c,h,d]=(0,s.parseRgba)(t),u=(0,s.rgba)(Math.round(r+i*(l-r)),Math.round(n+i*(c-n)),Math.round(o+i*(h-o)),a+i*(d-a));return(0,s.rgbaToString)(u)}function _(e){return h(c(e))<.5}function m(e){const t=(e=Math.round(e))%256;e-=t;const i=(e/=256)%256;e-=i;const s=(e/=256)%256;e-=s;return`rgba(${t},${i},${s},${(e/=256)/255})`}function g(e){const t=Math.round(255*e[3]);return e[0]+256*e[1]+65536*e[2]+16777216*t}function f(e){const t=(0,s.tryParseRgba)(e);return null===t?0:g(t)}},70439:(e,t,i)=>{"use strict";i.d(t,{doAnimate:()=>n});const s={from:0,duration:250,easing:i(41207).easingFunc.easeOutCubic};class r{constructor(e){this._doing=!0,this._completed=!1,this._options={...s,...e};const t=performance.now();window.requestAnimationFrame((e=>{this._animation(t,this._options.from,e)}))}stop(){this._doing=!1}completed(){return this._completed}_animation(e,t,i){if(!this._doing)return void this._finishAnimation();const s=(i=!i||i<1e12?performance.now():i)-e,r=s>=this._options.duration||t===this._options.to,n=(o=this._options.from,a=this._options.to,l=this._options.easing(s/this._options.duration),o*(1-l)+a*l);var o,a,l;const c=r?this._options.to:n,h=c-t;this._options.onStep(h,c),r?this._finishAnimation():window.requestAnimationFrame((t=>{this._animation(e,c,t)}))}_finishAnimation(){this._options.onComplete&&this._options.onComplete(),this._completed=!0}}function n(e){return new r(e)}},93043:(e,t,i)=>{"use strict";i.d(t,{fetch:()=>s});(0,i(98351).getLogger)("Fetch");function s(e,t,i={}){return window.fetch(e,t)}},98351:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LOGLEVEL:()=>n,getLogLevel:()=>g,isHighRateEnabled:()=>f,setLogLevel:()=>v,getRawLogHistory:()=>S,serializeLogHistoryEntry:()=>y,getLogHistory:()=>b,getLogger:()=>P,loggingOn:()=>T,loggingOff:()=>x});const s="undefined"!=typeof window?window:{};let r=!1;try{localStorage.getItem(""),r=!0}catch(e){}var n;!function(e){e[e.ERROR=1]="ERROR",e[e.WARNING=2]="WARNING",e[e.INFO=3]="INFO",e[e.NORMAL=4]="NORMAL",e[e.DEBUG=5]="DEBUG"}(n||(n={}));let o=0;const a="tv.logger.loglevel",l="tv.logger.logHighRate",c=[];let h=null,d=null,u=null,p=NaN,_=n.WARNING,m=!1;function g(){return _}function f(){return m}function v(e){e=Math.max(n.ERROR,Math.min(n.DEBUG,e)),_=e,I()}function S(e,t){let i=c.reduce(((e,t)=>e.concat(t)),[]);return i.sort(((e,t)=>e.id-t.id)),void 0!==t&&(i=i.filter((e=>e.subSystemId===t))),"number"==typeof e&&(i=i.slice(-e)),i}function y(e){return new Date(e.timestamp).toISOString()+":"+e.subSystemId+":"+e.message.replace(/"/g,"'")}function b(e,t){return function(e,t){let i,s=0,r=0;for(i=e.length-1;i>=1&&(s+=8*(1+encodeURIComponent(e[i]).length),!(i-1>0&&(r=8*(1+encodeURIComponent(e[i-1]).length),s+r>t)));i--);return e.slice(i)}(S(e,t).map(y),75497472) +}function w(e,t,i,s){if(t===d&&s.id===u)return;const r=new Date;if(e<=n.NORMAL&&function(e,t,i,s,r){"function"==typeof structuredClone&&(t=structuredClone(t));const n={id:o,message:t,subSystemId:s,timestamp:Number(e)};o+=1,i.push(n),void 0!==r&&i.length>r&&i.splice(0,1)}(r,t,i,s.id,s.maxCount),e<=_&&(!s.highRate||f())&&(!h||s.id.match(h))){const i=r.toISOString()+":"+s.id+":"+t;switch(e){case n.DEBUG:console.debug(i);break;case n.INFO:case n.NORMAL:s.color?console.log("%c"+i,"color: "+s.color):console.log(i);break;case n.WARNING:console.warn(i);break;case n.ERROR:console.error(i)}d=t,u=s.id,p&&clearTimeout(p),p=setTimeout((()=>{d=null,u=null,p=NaN}),1e3)}}function P(e,t={}){const i=[];c.push(i);const s=Object.assign(t,{id:e});function r(e){return t=>w(e,String(t),i,s)}return{logDebug:r(n.DEBUG),logError:r(n.ERROR),logInfo:r(n.INFO),logNormal:r(n.NORMAL),logWarn:r(n.WARNING)}}const C=P("logger"),T=s.lon=(e,t)=>{v(n.DEBUG),C.logNormal("Debug logging enabled"),m=Boolean(e),h=t||null,I()},x=s.loff=()=>{v(n.INFO),C.logInfo("Debug logging disabled")};function I(){try{r&&(localStorage.setItem(l,String(m)),localStorage.setItem(a,String(_)))}catch(e){C.logWarn(`Cannot save logger state (level: ${_}, high-rate: ${m}) to localStorage: ${e.message}`)}}!function(){m=!!r&&"true"===localStorage.getItem(l);let e=parseInt(r&&localStorage.getItem(a)||"");Number.isNaN(e)&&(e=n.WARNING),v(e),C.logNormal(`Init with settings - level: ${_}, high-rate: ${m}`)}(),s.performance&&s.performance.now?C.logNormal(`Sync logger and perf times, now is ${s.performance.now()}`):C.logWarn("Perf time is not available")},95242:(e,t,i)=>{"use strict";function s(e,t,i,s){return`${s?s+" ":""}${i?i+" ":""}${e}px ${t}`}i.d(t,{makeFont:()=>s,parseFont:()=>n});const r=/(bold )?(italic )?(\d+)(px|pt) (.*)$/;function n(e){const t=r.exec(e);return null===t?null:{family:t[5],size:parseInt(t[3])*("pt"===t[4]?.75:1),bold:Boolean(t[1]),italic:Boolean(t[2])}}},70641:(e,t,i)=>{"use strict";i.d(t,{visitObject:()=>n});var s=i(65665);function r(e,t,i){return(0,s.isArray)(e)?function(e,t,i){return e.map((e=>{const s=r(e,t,i),n=t(s);return void 0!==n?n:s}))}(e,t,i):(0,s.isObject)(e)&&((0,s.isHashObject)(e)||i&&i.visitInstances)?function(e,t,i){const s={};return Object.keys(e).forEach((n=>{const o=r(e[n],t,i),a=t(o);s[n]=void 0!==a?a:o})),s}(e,t,i):e}function n(e,t,i){const s=r(e,t,i),n=t(s);return void 0!==n?n:s}},41225:(e,t,i)=>{"use strict";function s(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}i.d(t,{regExpEscape:()=>s})},80142:(e,t,i)=>{"use strict";i.r(t),i.d(t,{isRtl:()=>r,stripLTRMarks:()=>a,startWithLTR:()=>l,forceLTRStr:()=>c,forceLTRStrSsr:()=>h,forceRTLStr:()=>d,getLTRScrollLeft:()=>u,getLTRScrollLeftOffset:()=>p,detectAutoDirection:()=>g});var s=i(64531);const r=()=>"rtl"===window.document.dir,n="‬",o=new RegExp("‎|‪|‫|‬","g");function a(e){return""!==e&&r()&&null!=e?e.replace(o,""):e}function l(e){return""!==e&&r()&&null!=e?"‎"+e:e}function c(e){return""!==e&&r()&&null!=e?"‪"+e+n:e}function h(e){return"‪"+e+n}function d(e){ +return""!==e&&r()&&null!=e?"‫"+e+n:e}function u(e){return(0,s.getNormalizedScrollLeft)(e,"rtl")}function p(e,t){const i=(0,s.detectScrollType)();if("indeterminate"===i)return 0;switch(i){case"negative":t=e.clientWidth-e.scrollWidth+t;break;case"reverse":t=e.scrollWidth-e.clientWidth-t}return t}const _=/[^\u0000-\u0040\u005B-\u0060\u007B-\u00BF\u00D7\u00F7\u02B9-\u02FF\u2000-\u200E\u2010-\u2029\u202C\u202F-\u2BFF]/,m=/[\u0590-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]/;function g(e){const t=_.exec(e);return t?m.test(t[0])?"rtl":"ltr":""}},41207:(e,t,i)=>{"use strict";i.d(t,{CubicBezier:()=>s.CubicBezier,dur:()=>s.dur,easingFunc:()=>s.easingFunc});var s=i(74991)},28105:(e,t,i)=>{"use strict";function s(){return Promise.all([i.e(8230),i.e(5384),i.e(346),i.e(5100),i.e(962),i.e(3016),i.e(2077)]).then(i.bind(i,73501))}i.d(t,{loadChangeIntervalDialog:()=>s})},84603:(e,t,i)=>{"use strict";i.d(t,{showChangeIntervalDialogAsync:()=>n});var s=i(28105);let r=null;function n(e){const t=r=(0,s.loadChangeIntervalDialog)().then((i=>{t===r&&i.showChangeIntervalDialog(e)}));return t}},68009:(e,t,i)=>{"use strict";function s(e){return Promise.all([i.e(8230),i.e(5384),i.e(7624),i.e(1428),i.e(1685),i.e(9333),i.e(8619),i.e(346),i.e(7177),i.e(8049),i.e(8955),i.e(9415),i.e(3046),i.e(7342),i.e(962),i.e(2215),i.e(3016),i.e(1075),i.e(9050),i.e(1859)]).then(i.bind(i,78789)).then((t=>t.showGoToDateDialog(e)))}i.d(t,{showGoToDateDialog:()=>s})},25071:(e,t,i)=>{"use strict";i.d(t,{showTooManyStudiesNotice:()=>n});var s=i(44352),r=i(3615);function n(e){"number"!=typeof e&&(e=TradingView.STUDY_COUNT_LIMIT),(0,r.showWarning)({title:s.t(null,void 0,i(33603)),text:s.t(null,void 0,i(70213)).format({number:e})})}},30371:(e,t,i)=>{"use strict";i.d(t,{StudyMarket:()=>n});var s=i(40549),r=i.n(s);class n{constructor(e,t){this._visibility=new(r())(!1),this._dialogPromise=null,this._dialog=null,this._chartWidgetCollection=e,this._options=t}visible(){return this._visibility.readonly()}show(e,t,i){var s;const r=void 0;null===this._dialog&&this._requestDialog(null!=e?e:[],r,t,i),null===(s=this._dialog)||void 0===s||s.open(null!=e?e:[],r,t,i)}hide(){var e;null===(e=this._dialog)||void 0===e||e.hide()}resetAllPages(){var e;null===(e=this._dialog)||void 0===e||e.resetAllStudies()}_requestDialog(e,t,s,r){if(null===this._dialogPromise){let n;n=Promise.all([i.e(8230),i.e(5384),i.e(1428),i.e(1685),i.e(8619),i.e(8271),i.e(4412),i.e(6304),i.e(9262),i.e(962),i.e(3016),i.e(6456)]).then(i.bind(i,56903)).then((e=>new e.IndicatorsLibraryContainer(this._chartWidgetCollection,this._options))),this._dialogPromise=n.then((i=>{this._dialog=i,this._dialog.visible().subscribe((e=>{this._visibility.setValue(e)})),this._dialog.open(e,t,s,r)}))}return this._dialogPromise}}},65312:(e,t,i)=>{"use strict";i.d(t,{setAdditionalSymbolInfoFields:()=>r,getAdditionalSymbolInfoFields:()=>n});let s=[];function r(e){s=e}function n(){return s}},29628:(e,t,i)=>{"use strict";function s(e,t){ +Promise.all([i.e(8230),i.e(5384),i.e(2685),i.e(962),i.e(3016),i.e(9374)]).then(i.bind(i,16078)).then((i=>{i.showSymbolInfoDialog(null!=e?e:null,t)}))}i.d(t,{showSymbolInfoDialog:()=>s})},26690:(e,t,i)=>{"use strict";i.d(t,{ChartSaverBase:()=>a});var s=i(16230),r=i(25927),n=i(26867),o=i.n(n);new WeakMap;new TextEncoder;class a{constructor(e){this._prevChartState=null,this._chartSavedDelegate=new(o()),this._chartWidgetCollection=e}saveChartLineTools(e,t,i,s){return Promise.reject("Line tools storage is not supported")}_getCommonSavingInfo(e){const t=this._chartWidgetCollection,i=this._chartWidgetCollection.chartsSymbols(),s=i[t.activeChartWidget.value().id()],r={...(n=s,{...n,legs:JSON.stringify(null!==(o=n.legs)&&void 0!==o?o:[])})};var n,o;const a=t.metaInfo;return a.id.value()&&(r.id=a.id.value()),r.name=a.name.value()||"",r.description=a.description.value()||"",r.charts_symbols=function(e){const t={};for(const i of Object.keys(e))t[i]={symbol:e[i].symbol};return JSON.stringify(t)}(i),r.is_realtime=r.is_realtime=e?"0":"1",r}async _saveLineToolsToStorage(){return Promise.resolve()}async _saveChart(e,t,i,n){var o;const a=this._chartWidgetCollection.metaInfo;let l=null!==(o=n.changes)&&void 0!==o?o:r.changedAll,c=!0;if(2&l)try{await this._saveLineToolsToStorage()}catch(e){l|=1,c=!1}if(1&l){const r=e(c);if((0,s.default)(this._prevChartState,r)&&null!==a.id.value())return this._chartSavedDelegate.fire(!0),void t(a,r);0;const o=(e,i)=>(c||this._chartWidgetCollection.getAll().forEach((e=>{var t;return null===(t=e.lineToolsSynchronizer())||void 0===t?void 0:t.markAsValidatedBecuaseOfSavingToContent(!0)})),t(e,i));return this._saveChartImpl(r,a,o,i,n,e)}this._chartSavedDelegate.fire(!0),t(a,null)}}},93919:(e,t,i)=>{"use strict";var s=i(26867),r=i(50151).assert,n=i(7276).backend,o=i(26690).ChartSaverBase;i(44352).t(null,void 0,i(8162)),i(44352).t(null,void 0,i(17994)),i(44352).t(null,void 0,i(87375));function a(e,t){e.content=JSON.stringify(t)}t.ChartSaver=class extends o{constructor(e){super(e),this._chartAboutToBeSavedDelegate=new s,this._chartSavedDelegate=new s,this._chartSizeLimitExceededDelegate=new s}chartSizeLimitExceeded(){return this._chartSizeLimitExceededDelegate}chartAboutToBeSaved(){return this._chartAboutToBeSavedDelegate}chartSaved(){return this._chartSavedDelegate}saveToJSON(){var e=this._getCommonSavingInfo(!1);return a(e,this._getChartWidgetCollectionState(!1,!0)),e}_getChartWidgetCollectionState(e,t,i,s,r){return e||(t=!0,s=!1),t?this._chartWidgetCollection.state(!!e,i,s,r):this._chartWidgetCollection.activeChartWidget.value().state(!!e,i,s,r)}publishChart(e){}publishScript(e,t,i){}onPublish(e,t){}_saveChartImpl(e,t,i,s,r,o){var a=i,l=s;if(a=function(s){t.id.value()||(t.id.setValue(s),t.uid.setValue(s)),"function"==typeof i&&i(t,e)},!e.name)return console.warn("Saving chart with empty name is not allowed"),void s();n.saveChart(e.name,e.short_name,e.resolution,e,t).then(a.bind(this)).catch(l.bind(this))}saveChartSilently(e,t,i){i=i||{};var s=function(e){ +var t=e&&!1,s=this._getChartWidgetCollectionState(!1,void 0,void 0,void 0,t),r=this._getCommonSavingInfo(!1,t);return a(r,s),i.chartName&&(r.name=i.chartName),r.name&&0!==r.name.length||!i.defaultChartName||(r.name=i.defaultChartName),i.autoSave&&(r.autoSave=!0),r}.bind(this);this._isSaveInProcess=!0,this._chartAboutToBeSavedDelegate.fire(),this._saveChart(s,function(t,i){r(!this._chartWidgetCollection.readOnly(),"Trying to save layout in read-only mode"),i&&this._chartWidgetCollection.metaInfo.name.setValue(i.name),this._prevChartState=i,this._chartSavedDelegate.fire(!0),this._isSaveInProcess=!1,e&&e({uid:t.uid.value(),data:i}),this._prevChartState&&delete this._prevChartState.savingToken}.bind(this),function(){this._chartSavedDelegate.fire(!1),this._isSaveInProcess=!1,t&&t.apply(null,arguments)}.bind(this),i)}isSaveInProcess(){return this._isSaveInProcess}}},23902:(e,t,i)=>{"use strict";i.d(t,{getTranslatedSymbolDescription:()=>s});i(44352);function s(e){return e.description||""}},86339:(e,t,i)=>{"use strict";function s(e){return e+"…"}i.d(t,{appendEllipsis:()=>s})},99630:(e,t,i)=>{"use strict";function s(e){if(!o(e))throw e}function r(e){return(null==e?void 0:e.aborted)?Promise.reject(n()):new Promise(((t,i)=>{null==e||e.addEventListener("abort",(()=>i(n())),{once:!0})}))}function n(){return new DOMException("Aborted","AbortError")}function o(e){return e instanceof Error&&"AbortError"===e.name}function a(e,t){return Promise.race([r(e),t])}async function l(e,t){let i;try{await a(e,new Promise((e=>{i=setTimeout(e,t)})))}finally{clearTimeout(i)}}i.d(t,{skipAbortError:()=>s,isAbortError:()=>o,respectAbort:()=>a,delay:()=>l})},85228:(e,t,i)=>{"use strict";function s(e){let t;if("object"!=typeof e||null==e||"number"==typeof e.nodeType)t=e;else if(e instanceof Date)t=new Date(e.valueOf());else if(Array.isArray(e)){t=[];let i=0;const r=e.length;for(;is})},933:(e,t,i)=>{"use strict";function s(e,...t){return e&&"object"==typeof e?(0===t.length||t.forEach((t=>{null!=t&&"object"==typeof t&&Object.keys(t).forEach((i=>{const n=e[i],o=t[i];if(o===e)return;const a=Array.isArray(o);if(o&&(r(o)||a)){let t;t=a?n&&Array.isArray(n)?n:[]:n&&r(n)?n:{},e[i]=s(t,o)}else void 0!==o&&(e[i]=o)}))})),e):e}function r(e){if(!e||"[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);if(!t)return!0;const i=Object.hasOwnProperty.toString,s=t.hasOwnProperty("constructor")&&t.constructor;return"function"==typeof s&&i.call(s)===i.call(Object)}i.d(t,{deepExtend:()=>s})},71668:(e,t,i)=>{"use strict";function s(){let e,t;return{promise:new Promise(((i,s)=>{e=i,t=s})),reject:t,resolve:e}}i.d(t,{createDeferredPromise:()=>s})},33972:(e,t,i)=>{"use strict";function s(e){if(void 0===e)return"";if(e instanceof Error){let t=e.message;return e.stack&&(t+=" "+e.stack),t}return"string"==typeof e?e.toString():JSON.stringify(e)}i.d(t,{ +errorToString:()=>s})},5692:(e,t,i)=>{"use strict";i.d(t,{getTwemojiUrl:()=>r});var s=i(18438);function r(e,t){let i="";return s.default.parse(e,(e=>(i=s.default.base+("svg"===t?`svg/${e}.svg`:`72x72/${e}.png`),!1))),i}s.default.base="https://cdnjs.cloudflare.com/ajax/libs/twemoji/13.0.1/"},68671:(e,t,i)=>{"use strict";i.r(t),i.d(t,{guid:()=>r,randomHash:()=>n,randomHashN:()=>o});const s="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function r(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function n(){return o(12)}function o(e){let t="";for(let i=0;i{"use strict";i.d(t,{parseHtml:()=>r,parseHtmlElement:()=>n});const s=new WeakMap;function r(e,t){let i,r;return i=null==t?document.documentElement:9===t.nodeType?t.documentElement:t,s&&(r=s.get(i)),r||(r=i.ownerDocument.createRange(),r.selectNodeContents(i),s&&s.set(i,r)),r.createContextualFragment(e)}function n(e,t){const i=r(e,t),s=i.firstElementChild;return null!==s&&i.removeChild(s),s}},33933:(e,t,i)=>{"use strict";function s(e){e.preventDefault()}i.d(t,{preventDefault:()=>s,preventDefaultForContextMenu:()=>n});const r=["input:not([type])",'input[type="text"]','input[type="email"]','input[type="password"]','input[type="search"]','input[type="number"]','input[type="url"]',"textarea","a[href]",'*[contenteditable="true"]',"[data-allow-context-menu]"];function n(e){const t=e.target;t&&!t.closest(r.join(", "))&&e.preventDefault()}},10381:(e,t,i)=>{"use strict";i.d(t,{htmlEscape:()=>n,removeSpaces:()=>o,capitalizeFirstLetterInWord:()=>a});const s=/[<"'&>]/g,r=e=>`&#${e.charCodeAt(0)};`;function n(e){return e.replace(s,r)}function o(e=""){return e.replace(/\s+/g,"")}function a(e=""){return e.replace(/\b\w/g,(e=>e.toUpperCase()))}},21095:(e,t,i)=>{"use strict";function s(e){return e.reduce((function(e,t,i){return~e.indexOf(t)||e.push(t),e}),[])}i.r(t),i.d(t,{uniq:()=>s})},1457:e=>{e.exports=''},55824:e=>{e.exports=''},37924:e=>{e.exports=''},2872:e=>{ +e.exports=''},32164:e=>{e.exports=''},39267:e=>{e.exports=''},16911:e=>{e.exports=''},6862:e=>{e.exports=''},54190:e=>{ +e.exports=''},25191:e=>{e.exports=''},51983:e=>{e.exports=''},35149:e=>{e.exports=''},84959:e=>{ +e.exports=''},97874:e=>{e.exports=''},77067:e=>{e.exports=''},76351:e=>{e.exports=''},91753:e=>{e.exports=''},10123:e=>{"use strict";e.exports=JSON.parse('{"4":["v",["h",0,2],["h",1,3]],"6":["v",["h",0,2,4],["h",1,3,5]],"8":["v",["h",0,2,4,6],["h",1,3,5,7]],"2h":["h",0,1],"2v":["v",0,1],"2-1":["v",["h",0,2],1],"3s":["h",0,["v",1,2]],"3h":["h",0,1,2],"3v":["v",0,1,2],"1-2":["v",0,["h",1,2]],"3r":["h",["v",0,1],2],"4h":["h",0,1,2,3],"4v":["v",0,1,2,3],"4s":["h",0,["v",1,2,3]],"5h":["h",0,1,2,3,4],"6h":["h",0,1,2,3,4,5],"7h":["h",0,1,2,3,4,5,6],"8h":["h",0,1,2,3,4,5,6,7],"1-3":["v",0,["h",1,2,3]],"2-2":["v",["h",0,1],["v",2,3]],"2-3":["v",["h",0,1],["h",2,3,4]],"1-4":["v",0,["h",1,2,3,4]],"5s":["h",0,["v",1,2,3,4]],"6c":["v",["h",0,1],["h",2,3],["h",4,5]],"8c":["v",["h",0,1],["h",2,3],["h",4,5],["h",6,7]],"s":0}')}},e=>{e.O(0,[7076,7717,4618],(()=>{return t=67498,e(e.s=t);var t}));e.O()}]); \ No newline at end of file diff --git a/charting_library/bundles/ms_MY.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/ms_MY.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 45848298..00000000 --- a/charting_library/bundles/ms_MY.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:a=>{a.exports=["bar"]},19648:a=>{a.exports=["12 jam"]},55838:a=>{a.exports=["24 jam"]},88364:a=>{a.exports=["Gaya asas carta"]},46720:a=>{a.exports=["Silangrambut"]},50985:a=>{a.exports=["Mata wang"]},17319:a=>{a.exports=["Mata wang dan Unit"]},19481:a=>{a.exports=["Penampilan"]},68791:a=>{a.exports=["Argumen"]},95036:a=>{a.exports=["Harga tutup purata"]},27331:a=>{a.exports=["Latar Belakang"]},22519:a=>{a.exports=["Nilai Perubahan Bar"]},87845:a=>{a.exports=["Butang"]},25209:a=>{a.exports=["Format Tarikh"]},55090:a=>{a.exports=["Hari untuk minggu pada label"]},29601:a=>{a.exports=["Huraian"]},26897:a=>{a.exports=["Peristiwa"]},95338:a=>{a.exports=["Garisan Grid Melintang"]},60971:a=>{a.exports=["Harga tinggi dan rendah"]},61142:a=>{a.exports=["Penunjuk"]},34905:a=>{a.exports=["Nilai penunjuk"]},29687:a=>{a.exports=["Nilai penunjuk dan kewangan"]},25084:a=>{a.exports=["Nama penunjuk dan kewangan"]},9654:a=>{a.exports=["Nama penunjuk"]},99487:a=>{a.exports=["Nilai OHLC"]},75991:a=>{a.exports=["Buka status pasaran"]},70500:a=>{a.exports=["Wang"]},66653:a=>{a.exports=["Margin"]},42502:a=>{a.exports=["Tiada tindanan"]},74343:a=>{a.exports=["Navigasi"]},43115:a=>{a.exports=["Skala"]},53224:a=>{a.exports=["Kedudukan Penimbangan"]},79194:a=>{a.exports=["Garis status"]},89053:a=>{a.exports=["Simbol"]},35383:a=>{a.exports=["Nama Simbol"]},27767:a=>{a.exports=["Harga akhir simbol"]},40847:a=>{a.exports=["Harga tutup semalam simbol"]},50446:a=>{a.exports=["Panel"]},73908:a=>{a.exports=["Pemisah tetingkap"]},36014:a=>{a.exports=["Peratus"]},78621:a=>{a.exports=["Pip"]},74823:a=>{a.exports=["Harga pra/pasca pasaran"]},64859:a=>{a.exports=["Skala Harga"]},76523:a=>{a.exports=["Nilai Harga dan Peratusan"]},40187:a=>{a.exports="Right Margin"},77705:a=>{a.exports=["Tera Air"]},67369:a=>{a.exports=["Tajuk"]},31326:a=>{a.exports=["Tajuk"]},23097:a=>{a.exports="Ticker"},82168:a=>{a.exports=["Ticker dan keterangan"]},43637:a=>{a.exports=["Skala Masa"]},97316:a=>{a.exports=["Format jam masa"]},90801:a=>{a.exports=["Dagangan"]},77534:a=>{a.exports="Unit"},1111:a=>{a.exports=["Volum"]},80170:a=>{a.exports=["Nilai berdasarkan Skala"]},91322:a=>{a.exports=["Nilai"]},70353:a=>{a.exports=["Garisan Grid Menegak"]},57889:a=>{a.exports=["tukar kebolehlihatan nilai OHLC"]},35646:a=>{a.exports=["tukar kebolehlihatan butang navigasi"]},18644:a=>{a.exports=["tukar kebolehlihatan status pasaran buka"]},45110:a=>{a.exports=["tukar kebolehlihatan bar pertukaran"]},10349:a=>{a.exports=["tukar margin bawah"]},88161:a=>{a.exports=["tukar kebolehlihatan mata wang dan label-label unit"]},79570:a=>{a.exports=["tukar kebolehlihatan label mata wang"]},99011:a=>{a.exports=["tukar warna latarbelakang carta"]},72458:a=>{a.exports=["tukar jenis latarbelakang carta"]},37034:a=>{a.exports=["tukar tebal silangrambut"]},29951:a=>{a.exports=["tukar warna silangrambut"]},92027:a=>{a.exports=["tukar gaya silangrambut"]},50457:a=>{a.exports=["tukar format tarikh"]},7104:a=>{ -a.exports=["pertukaran hari untuk minggu pada label"]},88096:a=>{a.exports=["tukar warna garisan grid mendatar"]},2523:a=>{a.exports=["tukar gaya garisan grid mendatar"]},31325:a=>{a.exports=["tukar kebolehlihatan nama penunjuk"]},99774:a=>{a.exports=["tukar kebolehlihatan nilai penunjuk"]},96162:a=>{a.exports=["tukar kebolehlihatan argumen penunjuk"]},59820:a=>{a.exports=["ubah keterlihatan penunjuk dan label nama kewangan"]},90512:a=>{a.exports=["ubah keterlihatan penunjuk dan label nilai kewangan"]},97956:a=>{a.exports=["tukar ketelusan latarbelakang legenda"]},61061:a=>{a.exports=["tukar kebolehlihatan latarbelakang legenda"]},37730:a=>{a.exports=["tukar kebolehlihatan butang tingkap"]},89032:a=>{a.exports=["tukar warna pemisah tetingkap"]},35636:a=>{a.exports=["tukar margin kanan"]},66601:a=>{a.exports="change right margin percentage"},25616:a=>{a.exports=["tukar warna simbol tera air"]},87159:a=>{a.exports=["tukar kebolehlihatan simbol tera air"]},26717:a=>{a.exports=["tukar kebolehlihatan penjelasan simbol"]},28741:a=>{a.exports=["tukar mod nilai akhir simbol"]},95071:a=>{a.exports=["tukar format legenda simbol"]},35065:a=>{a.exports=["tukar warna skala teks"]},84382:a=>{a.exports=["tukar warna skala teks"]},12468:a=>{a.exports=["tukar warna skala garisan"]},71589:a=>{a.exports=["tukar kebolehlihatan rehat sesi"]},15035:a=>{a.exports=["tukar lebar rehat sesi"]},1579:a=>{a.exports=["tukar warna rehat sesi"]},21460:a=>{a.exports=["tukar gaya rehat sesi"]},76991:a=>{a.exports=["tukar format jam untuk masa"]},98905:a=>{a.exports=["tukar margin atas"]},7011:a=>{a.exports=["tukar kebolehlihatan label unit"]},22722:a=>{a.exports=["tukar warna garisan grid menegak"]},22867:a=>{a.exports=["tukar gaya garisan grid menegak"]},9455:a=>{a.exports=["tukar kebolehlihatan nilai volum"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ms_MY.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/ms_MY.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..0ae731c1 --- /dev/null +++ b/charting_library/bundles/ms_MY.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:a=>{a.exports=["bar"]},19648:a=>{a.exports=["12 jam"]},55838:a=>{a.exports=["24 jam"]},88364:a=>{a.exports=["Gaya asas carta"]},46720:a=>{a.exports=["Silangrambut"]},50985:a=>{a.exports=["Mata wang"]},17319:a=>{a.exports=["Mata wang dan Unit"]},19481:a=>{a.exports=["Penampilan"]},68791:a=>{a.exports=["Argumen"]},95036:a=>{a.exports=["Harga tutup purata"]},27331:a=>{a.exports=["Latar Belakang"]},22519:a=>{a.exports=["Nilai Perubahan Bar"]},87845:a=>{a.exports=["Butang"]},25209:a=>{a.exports=["Format Tarikh"]},55090:a=>{a.exports=["Hari untuk minggu pada label"]},29601:a=>{a.exports=["Huraian"]},26897:a=>{a.exports=["Peristiwa"]},95338:a=>{a.exports=["Garisan Grid Melintang"]},60971:a=>{a.exports=["Harga tinggi dan rendah"]},61142:a=>{a.exports=["Penunjuk"]},34905:a=>{a.exports=["Nilai penunjuk"]},29687:a=>{a.exports=["Nilai penunjuk dan kewangan"]},25084:a=>{a.exports=["Nama penunjuk dan kewangan"]},9654:a=>{a.exports=["Nama penunjuk"]},99487:a=>{a.exports=["Nilai OHLC"]},75991:a=>{a.exports=["Buka status pasaran"]},96073:a=>{a.exports="Long Description"},70500:a=>{a.exports=["Wang"]},66653:a=>{a.exports=["Margin"]},42502:a=>{a.exports=["Tiada tindanan"]},74343:a=>{a.exports=["Navigasi"]},43115:a=>{a.exports=["Skala"]},53224:a=>{a.exports=["Kedudukan Penimbangan"]},79194:a=>{a.exports=["Garis status"]},89053:a=>{a.exports=["Simbol"]},35383:a=>{a.exports=["Nama Simbol"]},27767:a=>{a.exports=["Harga akhir simbol"]},40847:a=>{a.exports=["Harga tutup semalam simbol"]},50446:a=>{a.exports=["Panel"]},73908:a=>{a.exports=["Pemisah tetingkap"]},36014:a=>{a.exports=["Peratus"]},78621:a=>{a.exports=["Pip"]},74823:a=>{a.exports=["Harga pra/pasca pasaran"]},64859:a=>{a.exports=["Skala Harga"]},76523:a=>{a.exports=["Nilai Harga dan Peratusan"]},40187:a=>{a.exports="Right Margin"},77705:a=>{a.exports=["Tera Air"]},67369:a=>{a.exports=["Tajuk"]},31326:a=>{a.exports=["Tajuk"]},23097:a=>{a.exports="Ticker"},82168:a=>{a.exports=["Ticker dan keterangan"]},43637:a=>{a.exports=["Skala Masa"]},97316:a=>{a.exports=["Format jam masa"]},90801:a=>{a.exports=["Dagangan"]},77534:a=>{a.exports="Unit"},1111:a=>{a.exports=["Volum"]},80170:a=>{a.exports=["Nilai berdasarkan Skala"]},91322:a=>{a.exports=["Nilai"]},70353:a=>{a.exports=["Garisan Grid Menegak"]},57889:a=>{a.exports=["tukar kebolehlihatan nilai OHLC"]},35646:a=>{a.exports=["tukar kebolehlihatan butang navigasi"]},18644:a=>{a.exports=["tukar kebolehlihatan status pasaran buka"]},45110:a=>{a.exports=["tukar kebolehlihatan bar pertukaran"]},10349:a=>{a.exports=["tukar margin bawah"]},88161:a=>{a.exports=["tukar kebolehlihatan mata wang dan label-label unit"]},79570:a=>{a.exports=["tukar kebolehlihatan label mata wang"]},99011:a=>{a.exports=["tukar warna latarbelakang carta"]},72458:a=>{a.exports=["tukar jenis latarbelakang carta"]},37034:a=>{a.exports=["tukar tebal silangrambut"]},29951:a=>{a.exports=["tukar warna silangrambut"]},92027:a=>{a.exports=["tukar gaya silangrambut"]},50457:a=>{ +a.exports=["tukar format tarikh"]},7104:a=>{a.exports=["pertukaran hari untuk minggu pada label"]},88096:a=>{a.exports=["tukar warna garisan grid mendatar"]},2523:a=>{a.exports=["tukar gaya garisan grid mendatar"]},31325:a=>{a.exports=["tukar kebolehlihatan nama penunjuk"]},99774:a=>{a.exports=["tukar kebolehlihatan nilai penunjuk"]},96162:a=>{a.exports=["tukar kebolehlihatan argumen penunjuk"]},59820:a=>{a.exports=["ubah keterlihatan penunjuk dan label nama kewangan"]},90512:a=>{a.exports=["ubah keterlihatan penunjuk dan label nilai kewangan"]},97956:a=>{a.exports=["tukar ketelusan latarbelakang legenda"]},61061:a=>{a.exports=["tukar kebolehlihatan latarbelakang legenda"]},37730:a=>{a.exports=["tukar kebolehlihatan butang tingkap"]},89032:a=>{a.exports=["tukar warna pemisah tetingkap"]},35636:a=>{a.exports=["tukar margin kanan"]},66601:a=>{a.exports="change right margin percentage"},25616:a=>{a.exports=["tukar warna simbol tera air"]},87159:a=>{a.exports=["tukar kebolehlihatan simbol tera air"]},26717:a=>{a.exports=["tukar kebolehlihatan penjelasan simbol"]},6091:a=>{a.exports="change symbol field visibility"},28741:a=>{a.exports=["tukar mod nilai akhir simbol"]},95071:a=>{a.exports=["tukar format legenda simbol"]},35065:a=>{a.exports=["tukar warna skala teks"]},84382:a=>{a.exports=["tukar warna skala teks"]},12468:a=>{a.exports=["tukar warna skala garisan"]},71589:a=>{a.exports=["tukar kebolehlihatan rehat sesi"]},15035:a=>{a.exports=["tukar lebar rehat sesi"]},1579:a=>{a.exports=["tukar warna rehat sesi"]},21460:a=>{a.exports=["tukar gaya rehat sesi"]},76991:a=>{a.exports=["tukar format jam untuk masa"]},98905:a=>{a.exports=["tukar margin atas"]},7011:a=>{a.exports=["tukar kebolehlihatan label unit"]},22722:a=>{a.exports=["tukar warna garisan grid menegak"]},22867:a=>{a.exports=["tukar gaya garisan grid menegak"]},9455:a=>{a.exports=["tukar kebolehlihatan nilai volum"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ms_MY.6847.490ee46270bef6a878dd.js b/charting_library/bundles/ms_MY.7257.089fbbc28bead9558b87.js similarity index 56% rename from charting_library/bundles/ms_MY.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/ms_MY.7257.089fbbc28bead9558b87.js index 467c0838..ff1245b8 100644 --- a/charting_library/bundles/ms_MY.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/ms_MY.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:a=>{a.exports="Fr"},11268:a=>{a.exports="Mo"},63331:a=>{a.exports="Sa"},85954:a=>{a.exports="Su"},26230:a=>{a.exports="We"},24793:a=>{a.exports="Th"},31533:a=>{a.exports="Tu"},89790:a=>{a.exports=["Tidak boleh mendapat kod sumber Pine"]},39589:a=>{a.exports=["Runtuhkan tetingkap"]},38154:a=>{a.exports=["Mengesahkan Mengalih Keluar Pohon Kajian"]},65636:a=>{a.exports="Cboe BZX"},36004:a=>{a.exports=["Cipta akaun percuma"]},69419:a=>{a.exports=["Semua berjalan lancar — Pasaran telah dibuka."]},97637:a=>{a.exports="April"},86797:a=>{a.exports=["Ogos"]},22519:a=>{a.exports=["Nilai Perubahan Bar"]},52003:a=>{a.exports=["Adakah anda benar-benar mahu memadam kajian dan semua sub-kajian yang lain?"]},68854:a=>{a.exports=["Klik dua kali"]},97325:a=>{a.exports=["Masalah data"]},52916:a=>{a.exports=["Ia dikemaskini sekali sehari."]},25978:a=>{a.exports=["Data dikemas kini tidak lebih dari sekali sesaat."]},57310:a=>{a.exports=["Data adalah ditangguhkan"]},49321:a=>{a.exports=["Data yang disediakan dengan pakej percuma dikemas kini tidak lebih dari sekali sesaat."]},55669:a=>{a.exports=["Disember"]},83498:a=>{a.exports=["Padamkan tetingkap"]},59315:a=>{a.exports=["Tamat hari data"]},82751:a=>{a.exports=["Ralat"]},40519:a=>{a.exports=["Selamat Petang. Pasaran kini dibuka untuk perdagangan pasca-pasaran sahaja."]},80227:a=>{a.exports=["Zon masa bursa"]},16467:a=>{a.exports=["Februari"]},25046:a=>{a.exports=["Isikan Perjanjian Bursa"]},93666:a=>{a.exports=["Simbol bendera"]},564:a=>{a.exports=["Jum"]},72970:a=>{a.exports=["Jumaat"]},88958:a=>{a.exports=["Cuti"]},21686:a=>{a.exports=["Sembunyi Legenda Penunjuk"]},26935:a=>{a.exports=["Argumen Penunjuk"]},26315:a=>{a.exports=["Tajuk Penunjuk"]},84098:a=>{a.exports=["Nilai Penunjuk"]},91459:a=>{a.exports=["Sekiranya anda menginginkan data masa nyata {listedExchange}, anda perlu melengkapkan Perjanjian Pertukaran. Jangan risau, ianya hanya memerlukan beberapa klik sahaja"]},50634:a=>{a.exports=["Ia akan pergi ke dagangan pasca pasaran dalam {remainingTime}."]},74537:a=>{a.exports=["Ia akan buka untuk dagangan pra pasaran dalam {remainingTime}."]},26910:a=>{a.exports=["Januari"]},23230:a=>{a.exports=["Julai"]},49385:a=>{a.exports=["Jun"]},99487:a=>{a.exports=["Nilai OHLC"]},15815:a=>{a.exports=["Satu kemas kini sesaat"]},90784:a=>{a.exports=["Oktober"]},75991:a=>{a.exports=["Buka status pasaran"]},18429:a=>{a.exports=["Ketahui lebih lanjut"]},39899:a=>{a.exports=["Pindahkan tetingkap ke bawah"]},70343:a=>{a.exports=["Pindahkan tetingkap ke atas"]},83085:a=>{a.exports=["Isnin"]},61199:a=>{a.exports=["Isnin"]},41610:a=>{a.exports=["Lebih"]},1653:a=>{a.exports=["Selamat Pagi. Pasaran kini dibuka untuk perdagangan pra-pasaran sahaja."]},56470:a=>{a.exports=["Maksimakan carta"]},19603:a=>{a.exports=["Maksimakan tetingkap"]},68327:a=>{a.exports=["Mei"]},35732:a=>{a.exports=["Uruskan tetingkap"]},84675:a=>{a.exports=["Mac"]},83949:a=>{a.exports=["Pasaran dibuka"]},35701:a=>{ -a.exports=["Pasaran dibuka dalam {remainingTime}."]},95814:a=>{a.exports=["Pasaran ditutup"]},98105:a=>{a.exports=["Pasaran ditutup dalam {remainingTime}."]},87202:a=>{a.exports=["Pasaran pada masa ini sedang bercuti. Bertuah mereka."]},71194:a=>{a.exports="November"},66324:a=>{a.exports=["Kod sumber"]},36835:a=>{a.exports=["Sabtu"]},1144:a=>{a.exports=["Sabtu"]},40653:a=>{a.exports=["Tatal ke kiri"]},26721:a=>{a.exports=["Tatal ke bar terkini"]},35809:a=>{a.exports=["Tatal ke kanan"]},61132:a=>{a.exports="September"},28705:a=>{a.exports=["Tunjuk Legenda Penunjuk"]},51072:a=>{a.exports=["Tunjuk Salasilah Objek"]},37809:a=>{a.exports=["Tunjuk tetapan selang masa"]},39045:a=>{a.exports=["Kesilapan Pembelajaran"]},86577:a=>{a.exports=["Ahad"]},72149:a=>{a.exports=["Ahad"]},39339:a=>{a.exports=["Nama simbol"]},29985:a=>{a.exports=["Pasca-pasaran"]},28412:a=>{a.exports=["Pelan berbayar memberikan data kemaskini lebih pantas."]},56042:a=>{a.exports=["Pra-pasaran"]},36015:a=>{a.exports=["Data masa nyata bagi {description} tidak disokong buat masa sekarang. Ia mungkin akan disokong pada masa hadapan."]},6667:a=>{a.exports=["Data waktu sebenar untuk {symbolName} disediakan oleh pertukaran {exchange} ."]},48293:a=>{a.exports=["Kembalikan semula carta"]},91029:a=>{a.exports=["Kembalikan tetingkap"]},75094:a=>{a.exports=["Rabu"]},7147:a=>{a.exports=["Rabu"]},52984:a=>{a.exports=["Untuk mendapatkan data masa nyata untuk {description}, sila langgan pakej data masa nyata."]},9787:a=>{a.exports=["Khamis"]},7951:a=>{a.exports=["Khamis"]},57918:a=>{a.exports=["Data ini adalah dalam masa-nyata, tetapi terdapat sedikit perbezaan kepada rakan sejawatnya yang berasal dari pertukaran utama."]},68025:a=>{a.exports=["Data ini adalah dalam masa nyata, tetapi sedikit berbeza dengan rakan rasminya yang berasal dari {exchange}."]},73717:a=>{a.exports=["Tiada ada simbol seperti itu. Sila pilih simbol yang lain."]},57048:a=>{a.exports=["Masa untuk keluar berjalan-jalan — pasaran ini telah tamat."]},94316:a=>{a.exports=["Selasa"]},44979:a=>{a.exports=["Selasa"]},8209:a=>{a.exports=["Simbol tiada bendera"]},1111:a=>{a.exports=["Volum"]},61311:a=>{a.exports=["Zum Masuk"]},47602:a=>{a.exports=["Zum Keluar"]},57889:a=>{a.exports=["tukar kebolehlihatan nilai OHLC"]},18644:a=>{a.exports=["tukar kebolehlihatan status pasaran buka"]},45110:a=>{a.exports=["tukar kebolehlihatan bar pertukaran"]},31325:a=>{a.exports=["tukar kebolehlihatan nama penunjuk"]},99774:a=>{a.exports=["tukar kebolehlihatan nilai penunjuk"]},96162:a=>{a.exports=["tukar kebolehlihatan argumen penunjuk"]},26717:a=>{a.exports=["tukar kebolehlihatan penjelasan simbol"]},9455:a=>{a.exports=["tukar kebolehlihatan nilai volum"]},39348:a=>{a.exports=["kurang daripada 1 minit"]},87358:a=>{a.exports=["tunjuk {title}"]},7827:a=>{a.exports=["{days} dan {hours}"]},7435:a=>{a.exports=["{exchange} oleh {originalExchange}"]},19830:a=>{a.exports=["{hours} dan {minutes}"]},1084:a=>{a.exports=["Data waktu nyata {listedExchange} tersedia secara percuma kepada pengguna berdaftar. Buat akaun percuma!"]}, -11155:a=>{a.exports=["Data {symbolName} ditangguhkan selama {time} minit."]},77033:a=>{a.exports=["Data dikemaskini setiap {amount} saat, walaupun ada lebih banyak kemaskini dalam pasaran."]},2121:a=>{a.exports=["Data pada pelan Basic kami dikemaskini setiap {amount} saat, walaupun ada lebih banyak kemaskini dalam pasaran."]},5223:a=>{a.exports=["Satu kemaskini untuk setiap {amount} saat"]},58609:a=>{a.exports=["{number} hari"]},24430:a=>{a.exports=["{number} jam"]},67151:a=>{a.exports=["{number} minit"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:a=>{a.exports="Fr"},11268:a=>{a.exports="Mo"},63331:a=>{a.exports="Sa"},85954:a=>{a.exports="Su"},26230:a=>{a.exports="We"},24793:a=>{a.exports="Th"},31533:a=>{a.exports="Tu"},89790:a=>{a.exports=["Tidak boleh mendapat kod sumber Pine"]},39589:a=>{a.exports=["Runtuhkan tetingkap"]},38154:a=>{a.exports=["Mengesahkan Mengalih Keluar Pohon Kajian"]},65636:a=>{a.exports="Cboe BZX"},36004:a=>{a.exports=["Cipta akaun percuma"]},69419:a=>{a.exports=["Semua berjalan lancar — Pasaran telah dibuka."]},97637:a=>{a.exports="April"},86797:a=>{a.exports=["Ogos"]},22519:a=>{a.exports=["Nilai Perubahan Bar"]},52003:a=>{a.exports=["Adakah anda benar-benar mahu memadam kajian dan semua sub-kajian yang lain?"]},68854:a=>{a.exports=["Klik dua kali"]},97325:a=>{a.exports=["Masalah data"]},52916:a=>{a.exports=["Ia dikemaskini sekali sehari."]},25978:a=>{a.exports=["Data dikemas kini tidak lebih dari sekali sesaat."]},57310:a=>{a.exports=["Data adalah ditangguhkan"]},49321:a=>{a.exports=["Data yang disediakan dengan pakej percuma dikemas kini tidak lebih dari sekali sesaat."]},55669:a=>{a.exports=["Disember"]},83498:a=>{a.exports=["Padamkan tetingkap"]},59315:a=>{a.exports=["Tamat hari data"]},82751:a=>{a.exports=["Ralat"]},40519:a=>{a.exports=["Selamat Petang. Pasaran kini dibuka untuk perdagangan pasca-pasaran sahaja."]},80227:a=>{a.exports=["Zon masa bursa"]},16467:a=>{a.exports=["Februari"]},25046:a=>{a.exports=["Isikan Perjanjian Bursa"]},93666:a=>{a.exports=["Simbol bendera"]},564:a=>{a.exports=["Jum"]},72970:a=>{a.exports=["Jumaat"]},88958:a=>{a.exports=["Cuti"]},21686:a=>{a.exports=["Sembunyi Legenda Penunjuk"]},26935:a=>{a.exports=["Argumen Penunjuk"]},26315:a=>{a.exports=["Tajuk Penunjuk"]},84098:a=>{a.exports=["Nilai Penunjuk"]},91459:a=>{a.exports=["Sekiranya anda menginginkan data masa nyata {listedExchange}, anda perlu melengkapkan Perjanjian Pertukaran. Jangan risau, ianya hanya memerlukan beberapa klik sahaja"]},50634:a=>{a.exports=["Ia akan pergi ke dagangan pasca pasaran dalam {remainingTime}."]},74537:a=>{a.exports=["Ia akan buka untuk dagangan pra pasaran dalam {remainingTime}."]},26910:a=>{a.exports=["Januari"]},23230:a=>{a.exports=["Julai"]},49385:a=>{a.exports=["Jun"]},99487:a=>{a.exports=["Nilai OHLC"]},15815:a=>{a.exports=["Satu kemas kini sesaat"]},90784:a=>{a.exports=["Oktober"]},75991:a=>{a.exports=["Buka status pasaran"]},18429:a=>{a.exports=["Ketahui lebih lanjut"]},39899:a=>{a.exports=["Pindahkan tetingkap ke bawah"]},70343:a=>{a.exports=["Pindahkan tetingkap ke atas"]},83085:a=>{a.exports=["Isnin"]},61199:a=>{a.exports=["Isnin"]},41610:a=>{a.exports=["Lebih"]},1653:a=>{a.exports=["Selamat Pagi. Pasaran kini dibuka untuk perdagangan pra-pasaran sahaja."]},56470:a=>{a.exports=["Maksimakan carta"]},19603:a=>{a.exports=["Maksimakan tetingkap"]},68327:a=>{a.exports=["Mei"]},35732:a=>{a.exports=["Uruskan tetingkap"]},84675:a=>{a.exports=["Mac"]},83949:a=>{a.exports=["Pasaran dibuka"]},35701:a=>{ +a.exports=["Pasaran dibuka dalam {remainingTime}."]},95814:a=>{a.exports=["Pasaran ditutup"]},98105:a=>{a.exports=["Pasaran ditutup dalam {remainingTime}."]},87202:a=>{a.exports=["Pasaran pada masa ini sedang bercuti. Bertuah mereka."]},71194:a=>{a.exports="November"},66324:a=>{a.exports=["Kod sumber"]},36835:a=>{a.exports=["Sabtu"]},1144:a=>{a.exports=["Sabtu"]},40653:a=>{a.exports=["Tatal ke kiri"]},26721:a=>{a.exports=["Tatal ke bar terkini"]},35809:a=>{a.exports=["Tatal ke kanan"]},61132:a=>{a.exports="September"},28705:a=>{a.exports=["Tunjuk Legenda Penunjuk"]},51072:a=>{a.exports=["Tunjuk Salasilah Objek"]},37809:a=>{a.exports=["Tunjuk tetapan selang masa"]},39045:a=>{a.exports=["Kesilapan Pembelajaran"]},86577:a=>{a.exports=["Ahad"]},72149:a=>{a.exports=["Ahad"]},46041:a=>{a.exports="Symbol price source"},39339:a=>{a.exports=["Nama simbol"]},29985:a=>{a.exports=["Pasca-pasaran"]},28412:a=>{a.exports=["Pelan berbayar memberikan data kemaskini lebih pantas."]},56042:a=>{a.exports=["Pra-pasaran"]},36015:a=>{a.exports=["Data masa nyata bagi {description} tidak disokong buat masa sekarang. Ia mungkin akan disokong pada masa hadapan."]},6667:a=>{a.exports=["Data waktu sebenar untuk {symbolName} disediakan oleh pertukaran {exchange} ."]},48293:a=>{a.exports=["Kembalikan semula carta"]},91029:a=>{a.exports=["Kembalikan tetingkap"]},75094:a=>{a.exports=["Rabu"]},7147:a=>{a.exports=["Rabu"]},52984:a=>{a.exports=["Untuk mendapatkan data masa nyata untuk {description}, sila langgan pakej data masa nyata."]},9787:a=>{a.exports=["Khamis"]},7951:a=>{a.exports=["Khamis"]},57918:a=>{a.exports=["Data ini adalah dalam masa-nyata, tetapi terdapat sedikit perbezaan kepada rakan sejawatnya yang berasal dari pertukaran utama."]},68025:a=>{a.exports=["Data ini adalah dalam masa nyata, tetapi sedikit berbeza dengan rakan rasminya yang berasal dari {exchange}."]},73717:a=>{a.exports=["Tiada ada simbol seperti itu. Sila pilih simbol yang lain."]},57048:a=>{a.exports=["Masa untuk keluar berjalan-jalan — pasaran ini telah tamat."]},94316:a=>{a.exports=["Selasa"]},44979:a=>{a.exports=["Selasa"]},8209:a=>{a.exports=["Simbol tiada bendera"]},1111:a=>{a.exports=["Volum"]},61311:a=>{a.exports=["Zum Masuk"]},47602:a=>{a.exports=["Zum Keluar"]},57889:a=>{a.exports=["tukar kebolehlihatan nilai OHLC"]},18644:a=>{a.exports=["tukar kebolehlihatan status pasaran buka"]},45110:a=>{a.exports=["tukar kebolehlihatan bar pertukaran"]},31325:a=>{a.exports=["tukar kebolehlihatan nama penunjuk"]},99774:a=>{a.exports=["tukar kebolehlihatan nilai penunjuk"]},96162:a=>{a.exports=["tukar kebolehlihatan argumen penunjuk"]},26717:a=>{a.exports=["tukar kebolehlihatan penjelasan simbol"]},6091:a=>{a.exports="change symbol field visibility"},9455:a=>{a.exports=["tukar kebolehlihatan nilai volum"]},39348:a=>{a.exports=["kurang daripada 1 minit"]},87358:a=>{a.exports=["tunjuk {title}"]},7827:a=>{a.exports=["{days} dan {hours}"]},7435:a=>{a.exports=["{exchange} oleh {originalExchange}"]},19830:a=>{a.exports=["{hours} dan {minutes}"]},1084:a=>{ +a.exports=["Data waktu nyata {listedExchange} tersedia secara percuma kepada pengguna berdaftar. Buat akaun percuma!"]},11155:a=>{a.exports=["Data {symbolName} ditangguhkan selama {time} minit."]},77033:a=>{a.exports=["Data dikemaskini setiap {amount} saat, walaupun ada lebih banyak kemaskini dalam pasaran."]},2121:a=>{a.exports=["Data pada pelan Basic kami dikemaskini setiap {amount} saat, walaupun ada lebih banyak kemaskini dalam pasaran."]},5223:a=>{a.exports=["Satu kemaskini untuk setiap {amount} saat"]},58609:a=>{a.exports=["{number} hari"]},24430:a=>{a.exports=["{number} jam"]},67151:a=>{a.exports=["{number} minit"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/nl_NL.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/nl_NL.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index c3a19538..00000000 --- a/charting_library/bundles/nl_NL.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports="bars"},19648:e=>{e.exports="12-hours"},55838:e=>{e.exports="24-hours"},88364:e=>{e.exports="Chart basic styles"},46720:e=>{e.exports=["Vizier"]},50985:e=>{e.exports="Currency"},17319:e=>{e.exports="Currency and Unit"},19481:e=>{e.exports="Appearance"},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports="Average close price"},27331:e=>{e.exports=["Achtergrond"]},22519:e=>{e.exports=["Bar Change Values"]},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports="Date format"},55090:e=>{e.exports="Day of week on labels"},29601:e=>{e.exports=["Beschrijving"]},26897:e=>{e.exports=["Gebeurtenissen"]},95338:e=>{e.exports=["Horz Grid Lines"]},60971:e=>{e.exports="High and low price"},61142:e=>{e.exports=["Indicatoren"]},34905:e=>{e.exports="Indicators value"},29687:e=>{e.exports="Indicators and financials value"},25084:e=>{e.exports="Indicators and financials name"},9654:e=>{e.exports="Indicators name"},99487:e=>{e.exports=["OHLC Values"]},75991:e=>{e.exports="Open market status"},70500:e=>{e.exports="Money"},66653:e=>{e.exports="Margins"},42502:e=>{e.exports="No overlapping"},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports=["Schalen"]},53224:e=>{e.exports="Scales placement"},79194:e=>{e.exports="Status line"},89053:e=>{e.exports=["Symbool"]},35383:e=>{e.exports=["Symbol Name"]},27767:e=>{e.exports="Symbol last price"},40847:e=>{e.exports="Symbol previous day close price"},50446:e=>{e.exports="Pane"},73908:e=>{e.exports="Pane separators"},36014:e=>{e.exports="Percentage"},78621:e=>{e.exports="Pips"},74823:e=>{e.exports="Pre/post market price"},64859:e=>{e.exports="Price Scale"},76523:e=>{e.exports="Price and percentage value"},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Watermerk"]},67369:e=>{e.exports="Title"},31326:e=>{e.exports="Titles"},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports="Ticker and description"},43637:e=>{e.exports="Time Scale"},97316:e=>{e.exports="Time hours format"},90801:e=>{e.exports="Trading"},77534:e=>{e.exports="Unit"},1111:e=>{e.exports="Volume"},80170:e=>{e.exports="Value according to scale"},91322:e=>{e.exports="Values"},70353:e=>{e.exports=["Vert Grid Lines"]},57889:e=>{e.exports="change OHLC values visibility"},35646:e=>{e.exports="change navigation buttons visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},10349:e=>{e.exports="change bottom margin"},88161:e=>{e.exports="change currency and unit labels visibility"},79570:e=>{e.exports="change currency label visibility"},99011:e=>{e.exports="change chart background color"},72458:e=>{e.exports="change chart background type"},37034:e=>{e.exports="change crosshair width"},29951:e=>{e.exports="change crosshair color"},92027:e=>{e.exports="change crosshair style"},50457:e=>{e.exports="change date format"},7104:e=>{e.exports="change day of week on labels"},88096:e=>{e.exports="change horz grid lines color"},2523:e=>{e.exports="change horz grid lines style"}, -31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},59820:e=>{e.exports="change indicators and financials name labels visibility"},90512:e=>{e.exports="change indicators and financials value labels visibility"},97956:e=>{e.exports="change legend background transparency"},61061:e=>{e.exports="change legend background visibility"},37730:e=>{e.exports="change pane buttons visibility"},89032:e=>{e.exports="change pane separators color"},35636:e=>{e.exports="change right margin"},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports="change symbol watermark color"},87159:e=>{e.exports="change symbol watermark visibility"},26717:e=>{e.exports="change symbol description visibility"},28741:e=>{e.exports="change symbol last value mode"},95071:e=>{e.exports="change symbol legend format"},35065:e=>{e.exports="change scales text color"},84382:e=>{e.exports="change scales font size"},12468:e=>{e.exports="change scales lines color"},71589:e=>{e.exports="change sessions breaks visibility"},15035:e=>{e.exports="change sessions breaks width"},1579:e=>{e.exports="change sessions breaks color"},21460:e=>{e.exports="change sessions breaks style"},76991:e=>{e.exports="change time hours format"},98905:e=>{e.exports="change top margin"},7011:e=>{e.exports="change unit label visibility"},22722:e=>{e.exports="change vert grid lines color"},22867:e=>{e.exports="change vert grid lines style"},9455:e=>{e.exports="change volume values visibility"}}]); \ No newline at end of file diff --git a/charting_library/bundles/nl_NL.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/nl_NL.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..28188a82 --- /dev/null +++ b/charting_library/bundles/nl_NL.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports="bars"},19648:e=>{e.exports="12-hours"},55838:e=>{e.exports="24-hours"},88364:e=>{e.exports="Chart basic styles"},46720:e=>{e.exports=["Vizier"]},50985:e=>{e.exports="Currency"},17319:e=>{e.exports="Currency and Unit"},19481:e=>{e.exports="Appearance"},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports="Average close price"},27331:e=>{e.exports=["Achtergrond"]},22519:e=>{e.exports=["Bar Change Values"]},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports="Date format"},55090:e=>{e.exports="Day of week on labels"},29601:e=>{e.exports=["Beschrijving"]},26897:e=>{e.exports=["Gebeurtenissen"]},95338:e=>{e.exports=["Horz Grid Lines"]},60971:e=>{e.exports="High and low price"},61142:e=>{e.exports=["Indicatoren"]},34905:e=>{e.exports="Indicators value"},29687:e=>{e.exports="Indicators and financials value"},25084:e=>{e.exports="Indicators and financials name"},9654:e=>{e.exports="Indicators name"},99487:e=>{e.exports=["OHLC Values"]},75991:e=>{e.exports="Open market status"},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports="Money"},66653:e=>{e.exports="Margins"},42502:e=>{e.exports="No overlapping"},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports=["Schalen"]},53224:e=>{e.exports="Scales placement"},79194:e=>{e.exports="Status line"},89053:e=>{e.exports=["Symbool"]},35383:e=>{e.exports=["Symbol Name"]},27767:e=>{e.exports="Symbol last price"},40847:e=>{e.exports="Symbol previous day close price"},50446:e=>{e.exports="Pane"},73908:e=>{e.exports="Pane separators"},36014:e=>{e.exports="Percentage"},78621:e=>{e.exports="Pips"},74823:e=>{e.exports="Pre/post market price"},64859:e=>{e.exports="Price Scale"},76523:e=>{e.exports="Price and percentage value"},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Watermerk"]},67369:e=>{e.exports="Title"},31326:e=>{e.exports="Titles"},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports="Ticker and description"},43637:e=>{e.exports="Time Scale"},97316:e=>{e.exports="Time hours format"},90801:e=>{e.exports="Trading"},77534:e=>{e.exports="Unit"},1111:e=>{e.exports="Volume"},80170:e=>{e.exports="Value according to scale"},91322:e=>{e.exports="Values"},70353:e=>{e.exports=["Vert Grid Lines"]},57889:e=>{e.exports="change OHLC values visibility"},35646:e=>{e.exports="change navigation buttons visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},10349:e=>{e.exports="change bottom margin"},88161:e=>{e.exports="change currency and unit labels visibility"},79570:e=>{e.exports="change currency label visibility"},99011:e=>{e.exports="change chart background color"},72458:e=>{e.exports="change chart background type"},37034:e=>{e.exports="change crosshair width"},29951:e=>{e.exports="change crosshair color"},92027:e=>{e.exports="change crosshair style"},50457:e=>{e.exports="change date format"},7104:e=>{e.exports="change day of week on labels"},88096:e=>{e.exports="change horz grid lines color"},2523:e=>{ +e.exports="change horz grid lines style"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},59820:e=>{e.exports="change indicators and financials name labels visibility"},90512:e=>{e.exports="change indicators and financials value labels visibility"},97956:e=>{e.exports="change legend background transparency"},61061:e=>{e.exports="change legend background visibility"},37730:e=>{e.exports="change pane buttons visibility"},89032:e=>{e.exports="change pane separators color"},35636:e=>{e.exports="change right margin"},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports="change symbol watermark color"},87159:e=>{e.exports="change symbol watermark visibility"},26717:e=>{e.exports="change symbol description visibility"},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports="change symbol last value mode"},95071:e=>{e.exports="change symbol legend format"},35065:e=>{e.exports="change scales text color"},84382:e=>{e.exports="change scales font size"},12468:e=>{e.exports="change scales lines color"},71589:e=>{e.exports="change sessions breaks visibility"},15035:e=>{e.exports="change sessions breaks width"},1579:e=>{e.exports="change sessions breaks color"},21460:e=>{e.exports="change sessions breaks style"},76991:e=>{e.exports="change time hours format"},98905:e=>{e.exports="change top margin"},7011:e=>{e.exports="change unit label visibility"},22722:e=>{e.exports="change vert grid lines color"},22867:e=>{e.exports="change vert grid lines style"},9455:e=>{e.exports="change volume values visibility"}}]); \ No newline at end of file diff --git a/charting_library/bundles/nl_NL.6847.490ee46270bef6a878dd.js b/charting_library/bundles/nl_NL.7257.089fbbc28bead9558b87.js similarity index 55% rename from charting_library/bundles/nl_NL.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/nl_NL.7257.089fbbc28bead9558b87.js index 3e288b1c..44475eda 100644 --- a/charting_library/bundles/nl_NL.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/nl_NL.7257.089fbbc28bead9558b87.js @@ -1,2 +1,2 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports="Could not get Pine source code."},39589:e=>{e.exports="Collapse pane"},38154:e=>{e.exports="Confirm Remove Study Tree"},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports="Create a free account"},69419:e=>{e.exports="All's well — Market is open."},97637:e=>{e.exports="April"},86797:e=>{e.exports="August"},22519:e=>{e.exports=["Bar Change Values"]},52003:e=>{e.exports="Do you really want to delete study and all of it's children?"},68854:e=>{e.exports="Double click"},97325:e=>{e.exports="Data error"},52916:e=>{e.exports="Data is updated once a day."},25978:e=>{e.exports="Data is updated once per second, even if there are more updates on the market."},57310:e=>{e.exports="Data is delayed"},49321:e=>{e.exports="Data on our Basic plan is updated once per second, even if there are more updates on the market."},55669:e=>{e.exports="December"},83498:e=>{e.exports="Delete pane"},59315:e=>{e.exports="End of day data"},82751:e=>{e.exports=["Fout"]},40519:e=>{e.exports="Evening. Market is open for post-market trading."},80227:e=>{e.exports="Exchange timezone"},16467:e=>{e.exports="February"},25046:e=>{e.exports="Fill out Exchange Agreements"},93666:e=>{e.exports="Flag Symbol"},564:e=>{e.exports="Fri"},72970:e=>{e.exports="Friday"},88958:e=>{e.exports="Holiday"},21686:e=>{e.exports="Hide Indicator Legend"},26935:e=>{e.exports=["Indicator Arguments"]},26315:e=>{e.exports=["Indicator Titles"]},84098:e=>{e.exports=["Indicator Values"]},91459:e=>{e.exports="If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"},50634:e=>{e.exports="It'll go to post-market trading in {remainingTime}."},74537:e=>{e.exports="It'll open for pre-market trading in {remainingTime}."},26910:e=>{e.exports="January"},23230:e=>{e.exports="July"},49385:e=>{e.exports="June"},99487:e=>{e.exports=["OHLC Values"]},15815:e=>{e.exports="One update per second"},90784:e=>{e.exports="October"},75991:e=>{e.exports="Open market status"},18429:e=>{e.exports="Learn more"},39899:e=>{e.exports="Move pane down"},70343:e=>{e.exports="Move pane up"},83085:e=>{e.exports="Mon"},61199:e=>{e.exports="Monday"},41610:e=>{e.exports=["Meer"]},1653:e=>{e.exports="Morning. Market is open for pre-market trading."},56470:e=>{e.exports="Maximize chart"},19603:e=>{e.exports="Maximize pane"},68327:e=>{e.exports=["Mei"]},35732:e=>{e.exports="Manage panes"},84675:e=>{e.exports="March"},83949:e=>{e.exports="Market open"},35701:e=>{e.exports="Market opens in {remainingTime}."},95814:e=>{e.exports="Market closed"},98105:e=>{e.exports="Market closes in {remainingTime}."},87202:e=>{e.exports="Market is currently on holiday. Lucky them."},71194:e=>{e.exports="November"},66324:e=>{e.exports="Source code"},36835:e=>{e.exports="Sat"},1144:e=>{ -e.exports="Saturday"},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports="September"},28705:e=>{e.exports="Show Indicator Legend"},51072:e=>{e.exports="Show Object Tree"},37809:e=>{e.exports="Show interval settings"},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports="Sun"},72149:e=>{e.exports="Sunday"},39339:e=>{e.exports="Symbol title"},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports="Paid plans feature faster data updates."},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports="Real-time data for {description} is not supported right now. We may support it in the future."},6667:e=>{e.exports="Real-time data for {symbolName} is provided by {exchange} exchange."},48293:e=>{e.exports="Restore chart"},91029:e=>{e.exports="Restore pane"},75094:e=>{e.exports="Wed"},7147:e=>{e.exports="Wednesday"},52984:e=>{e.exports="To get real-time data for {description}, please buy the real-time data package."},9787:e=>{e.exports="Thu"},7951:e=>{e.exports="Thursday"},57918:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges."},68025:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}."},73717:e=>{e.exports="This symbol doesn't exist, please pick another one."},57048:e=>{e.exports="Time for a walk — this market is closed."},94316:e=>{e.exports="Tue"},44979:e=>{e.exports="Tuesday"},8209:e=>{e.exports="Unflag Symbol"},1111:e=>{e.exports="Volume"},61311:e=>{e.exports=["Inzoomen"]},47602:e=>{e.exports=["Uitzoomen"]},57889:e=>{e.exports="change OHLC values visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},26717:e=>{e.exports="change symbol description visibility"},9455:e=>{e.exports="change volume values visibility"},39348:e=>{e.exports="less than 1 minute"},87358:e=>{e.exports="show {title}"},7827:e=>{e.exports="{days} and {hours}"},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports="{hours} and {minutes}"},1084:e=>{e.exports="{listedExchange} real-time data is available for free to registered users."},11155:e=>{e.exports="{symbolName} data is delayed by {time} minutes."},77033:e=>{e.exports="Data is updated once every {amount} second, even if there are more updates on the market."},2121:e=>{e.exports="Data on our Basic plan is updated once every {amount} second, even if there are more updates on the market."},5223:e=>{e.exports="One update every {amount} second"},58609:e=>{e.exports="{number} day"},24430:e=>{e.exports="{number} hour"},67151:e=>{e.exports="{number} minute"}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports="Could not get Pine source code."},39589:e=>{e.exports="Collapse pane"},38154:e=>{e.exports="Confirm Remove Study Tree"},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports="Create a free account"},69419:e=>{e.exports="All's well — Market is open."},97637:e=>{e.exports="April"},86797:e=>{e.exports="August"},22519:e=>{e.exports=["Bar Change Values"]},52003:e=>{e.exports="Do you really want to delete study and all of it's children?"},68854:e=>{e.exports="Double click"},97325:e=>{e.exports="Data error"},52916:e=>{e.exports="Data is updated once a day."},25978:e=>{e.exports="Data is updated once per second, even if there are more updates on the market."},57310:e=>{e.exports="Data is delayed"},49321:e=>{e.exports="Data on our Basic plan is updated once per second, even if there are more updates on the market."},55669:e=>{e.exports="December"},83498:e=>{e.exports="Delete pane"},59315:e=>{e.exports="End of day data"},82751:e=>{e.exports=["Fout"]},40519:e=>{e.exports="Evening. Market is open for post-market trading."},80227:e=>{e.exports="Exchange timezone"},16467:e=>{e.exports="February"},25046:e=>{e.exports="Fill out Exchange Agreements"},93666:e=>{e.exports="Flag Symbol"},564:e=>{e.exports="Fri"},72970:e=>{e.exports="Friday"},88958:e=>{e.exports="Holiday"},21686:e=>{e.exports="Hide Indicator Legend"},26935:e=>{e.exports=["Indicator Arguments"]},26315:e=>{e.exports=["Indicator Titles"]},84098:e=>{e.exports=["Indicator Values"]},91459:e=>{e.exports="If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"},50634:e=>{e.exports="It'll go to post-market trading in {remainingTime}."},74537:e=>{e.exports="It'll open for pre-market trading in {remainingTime}."},26910:e=>{e.exports="January"},23230:e=>{e.exports="July"},49385:e=>{e.exports="June"},99487:e=>{e.exports=["OHLC Values"]},15815:e=>{e.exports="One update per second"},90784:e=>{e.exports="October"},75991:e=>{e.exports="Open market status"},18429:e=>{e.exports="Learn more"},39899:e=>{e.exports="Move pane down"},70343:e=>{e.exports="Move pane up"},83085:e=>{e.exports="Mon"},61199:e=>{e.exports="Monday"},41610:e=>{e.exports=["Meer"]},1653:e=>{e.exports="Morning. Market is open for pre-market trading."},56470:e=>{e.exports="Maximize chart"},19603:e=>{e.exports="Maximize pane"},68327:e=>{e.exports=["Mei"]},35732:e=>{e.exports="Manage panes"},84675:e=>{e.exports="March"},83949:e=>{e.exports="Market open"},35701:e=>{e.exports="Market opens in {remainingTime}."},95814:e=>{e.exports="Market closed"},98105:e=>{e.exports="Market closes in {remainingTime}."},87202:e=>{e.exports="Market is currently on holiday. Lucky them."},71194:e=>{e.exports="November"},66324:e=>{e.exports="Source code"},36835:e=>{e.exports="Sat"},1144:e=>{ +e.exports="Saturday"},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports="September"},28705:e=>{e.exports="Show Indicator Legend"},51072:e=>{e.exports="Show Object Tree"},37809:e=>{e.exports="Show interval settings"},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports="Sun"},72149:e=>{e.exports="Sunday"},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports="Symbol title"},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports="Paid plans feature faster data updates."},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports="Real-time data for {description} is not supported right now. We may support it in the future."},6667:e=>{e.exports="Real-time data for {symbolName} is provided by {exchange} exchange."},48293:e=>{e.exports="Restore chart"},91029:e=>{e.exports="Restore pane"},75094:e=>{e.exports="Wed"},7147:e=>{e.exports="Wednesday"},52984:e=>{e.exports="To get real-time data for {description}, please buy the real-time data package."},9787:e=>{e.exports="Thu"},7951:e=>{e.exports="Thursday"},57918:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges."},68025:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}."},73717:e=>{e.exports="This symbol doesn't exist, please pick another one."},57048:e=>{e.exports="Time for a walk — this market is closed."},94316:e=>{e.exports="Tue"},44979:e=>{e.exports="Tuesday"},8209:e=>{e.exports="Unflag Symbol"},1111:e=>{e.exports="Volume"},61311:e=>{e.exports=["Inzoomen"]},47602:e=>{e.exports=["Uitzoomen"]},57889:e=>{e.exports="change OHLC values visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},26717:e=>{e.exports="change symbol description visibility"},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports="change volume values visibility"},39348:e=>{e.exports="less than 1 minute"},87358:e=>{e.exports="show {title}"},7827:e=>{e.exports="{days} and {hours}"},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports="{hours} and {minutes}"},1084:e=>{e.exports="{listedExchange} real-time data is available for free to registered users."},11155:e=>{e.exports="{symbolName} data is delayed by {time} minutes."},77033:e=>{e.exports="Data is updated once every {amount} second, even if there are more updates on the market."},2121:e=>{e.exports="Data on our Basic plan is updated once every {amount} second, even if there are more updates on the market."},5223:e=>{e.exports="One update every {amount} second"},58609:e=>{e.exports="{number} day"},24430:e=>{e.exports="{number} hour"},67151:e=>{e.exports="{number} minute"}}]); \ No newline at end of file diff --git a/charting_library/bundles/pl.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/pl.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 699600d9..00000000 --- a/charting_library/bundles/pl.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:o=>{o.exports=["słupki"]},19648:o=>{o.exports=["12-godzin"]},55838:o=>{o.exports=["24-godziny"]},88364:o=>{o.exports=["Podstawowe style wykresu"]},46720:o=>{o.exports=["Celownik"]},50985:o=>{o.exports=["Waluta"]},17319:o=>{o.exports=["Waluta i jednostka"]},19481:o=>{o.exports=["Wygląd"]},68791:o=>{o.exports=["Argumenty"]},95036:o=>{o.exports=["Średnia cena zamknięcia"]},27331:o=>{o.exports=["Tło"]},22519:o=>{o.exports=["Parametry zmiany słupka"]},87845:o=>{o.exports=["Przyciski"]},25209:o=>{o.exports=["Format daty"]},55090:o=>{o.exports=["Dzień tygodnia na etykietach"]},29601:o=>{o.exports=["Opis"]},26897:o=>{o.exports=["Wydarzenia"]},95338:o=>{o.exports=["Poziome linie siatki"]},60971:o=>{o.exports=["Cena high i low"]},61142:o=>{o.exports=["Wskaźniki"]},34905:o=>{o.exports=["Wartość wskaźnika"]},29687:o=>{o.exports=["Wartości wskaźników finansowych i indykatorów"]},25084:o=>{o.exports=["Nazwy etykiet indykatorów i wskaźników finansowych"]},9654:o=>{o.exports=["Nazwa wskaźnika"]},99487:o=>{o.exports=["Wartości OHLC"]},75991:o=>{o.exports=["Pokaż status Rynek otwarty"]},70500:o=>{o.exports=["Pieniądze"]},66653:o=>{o.exports=["Marginesy"]},42502:o=>{o.exports=["Brak nakładania się"]},74343:o=>{o.exports=["Nawigacja"]},43115:o=>{o.exports=["Skale"]},53224:o=>{o.exports=["Umieszczenie Skali"]},79194:o=>{o.exports=["Linia statusu"]},89053:o=>{o.exports="Symbol"},35383:o=>{o.exports=["Nazwa Symbolu"]},27767:o=>{o.exports=["Ostatnia wartość wymbolu"]},40847:o=>{o.exports=["Cena zamknięcia symbolu z poprzedniego dnia"]},50446:o=>{o.exports=["Panel"]},73908:o=>{o.exports=["Przegrody panelowe"]},36014:o=>{o.exports=["Procentowo"]},78621:o=>{o.exports=["Pipsy"]},74823:o=>{o.exports=["Cena przed/porynkowa"]},64859:o=>{o.exports=["Skala cen"]},76523:o=>{o.exports=["Cena i wartość procentowa"]},40187:o=>{o.exports="Right Margin"},77705:o=>{o.exports=["Znak wodny"]},67369:o=>{o.exports=["Tytuł"]},31326:o=>{o.exports=["Tytuły"]},23097:o=>{o.exports=["Symbol"]},82168:o=>{o.exports=["Ticker i opis"]},43637:o=>{o.exports=["Skala czasu"]},97316:o=>{o.exports=["Format godzinowy"]},90801:o=>{o.exports="Trading"},77534:o=>{o.exports=["Jednostka"]},1111:o=>{o.exports=["Wolumen"]},80170:o=>{o.exports=["Wartość według skali"]},91322:o=>{o.exports=["Wartości"]},70353:o=>{o.exports=["Pionowe linie siatki"]},57889:o=>{o.exports=["zmień widoczności wartości OHLC"]},35646:o=>{o.exports=["zmień widoczność przycisków nawigacyjnych"]},18644:o=>{o.exports=["zmień widoczność statusu otwartego rynku"]},45110:o=>{o.exports=["zmień widoczność zmian słupków"]},10349:o=>{o.exports=["zmień dolny margines"]},88161:o=>{o.exports=["zmiana widoczności etykiet waluty i jednostek"]},79570:o=>{o.exports=["zmień widoczność etykiety waluty"]},99011:o=>{o.exports=["zmień kolor tła wykresu"]},72458:o=>{o.exports=["zmień rodzaj tła wykresu"]},37034:o=>{o.exports=["zmień szerokość celownika"]},29951:o=>{o.exports=["zmień kolor celownika"]},92027:o=>{o.exports=["zmień styl celownika"]}, -50457:o=>{o.exports=["zmień format daty"]},7104:o=>{o.exports=["zmień dzień tygodnia na etykietach"]},88096:o=>{o.exports=["zmień kolor poziomych linii siatki"]},2523:o=>{o.exports=["zmień styl poziomych linii siatki"]},31325:o=>{o.exports=["Zmień widoczność tytułów wskaźników"]},99774:o=>{o.exports=["Zmień widoczność wartości wskaźników"]},96162:o=>{o.exports=["Zmień widoczność argumentów wskaźnika"]},59820:o=>{o.exports=["zmień widoczność nazw etykiet indykatorów i wskaźników finansowych"]},90512:o=>{o.exports=["zmień widoczność etykiet wartości wskaźników finansowych i indykatorów"]},97956:o=>{o.exports=["zmień przezroczystość tła legendy"]},61061:o=>{o.exports=["zmień widoczność tła legendy"]},37730:o=>{o.exports=["zmiana widoczności przycisków panelu"]},89032:o=>{o.exports=["Zmień kolor separatorów paneli"]},35636:o=>{o.exports=["zmień prawy margines"]},66601:o=>{o.exports="change right margin percentage"},25616:o=>{o.exports=["zmień kolor znaku wodnego symbolu"]},87159:o=>{o.exports=["zmień widoczność znaku wodnego symbolu"]},26717:o=>{o.exports=["zmień widoczność opisu symbolu"]},28741:o=>{o.exports=["zmiana trybu ostatniej wartości symbolu"]},95071:o=>{o.exports=["zmień format legendy symboli"]},35065:o=>{o.exports=["zmień kolor tekstu skali"]},84382:o=>{o.exports=["zmień rozmiar czcionki skali"]},12468:o=>{o.exports=["zmień kolor linii skali"]},71589:o=>{o.exports=["zmień widoczność przerw między sesjami"]},15035:o=>{o.exports=["zmień szerokość przerw między sesjami"]},1579:o=>{o.exports=["zmień kolor przerw między sesjami"]},21460:o=>{o.exports=["zmień styl przerw między sesjami"]},76991:o=>{o.exports=["zmień format godzin"]},98905:o=>{o.exports=["zmień górny margines"]},7011:o=>{o.exports=["zmień widoczność etykiety jednostki"]},22722:o=>{o.exports=["zmień kolor pionowych linii siatki"]},22867:o=>{o.exports=["zmień styl pionowych linii siatki"]},9455:o=>{o.exports=["zmień widoczność wartości wolumenu"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/pl.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/pl.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..80923fa7 --- /dev/null +++ b/charting_library/bundles/pl.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:o=>{o.exports=["słupki"]},19648:o=>{o.exports=["12-godzin"]},55838:o=>{o.exports=["24-godziny"]},88364:o=>{o.exports=["Podstawowe style wykresu"]},46720:o=>{o.exports=["Celownik"]},50985:o=>{o.exports=["Waluta"]},17319:o=>{o.exports=["Waluta i jednostka"]},19481:o=>{o.exports=["Wygląd"]},68791:o=>{o.exports=["Argumenty"]},95036:o=>{o.exports=["Średnia cena zamknięcia"]},27331:o=>{o.exports=["Tło"]},22519:o=>{o.exports=["Parametry zmiany słupka"]},87845:o=>{o.exports=["Przyciski"]},25209:o=>{o.exports=["Format daty"]},55090:o=>{o.exports=["Dzień tygodnia na etykietach"]},29601:o=>{o.exports=["Opis"]},26897:o=>{o.exports=["Wydarzenia"]},95338:o=>{o.exports=["Poziome linie siatki"]},60971:o=>{o.exports=["Cena high i low"]},61142:o=>{o.exports=["Wskaźniki"]},34905:o=>{o.exports=["Wartość wskaźnika"]},29687:o=>{o.exports=["Wartości wskaźników finansowych i indykatorów"]},25084:o=>{o.exports=["Nazwy etykiet indykatorów i wskaźników finansowych"]},9654:o=>{o.exports=["Nazwa wskaźnika"]},99487:o=>{o.exports=["Wartości OHLC"]},75991:o=>{o.exports=["Pokaż status Rynek otwarty"]},96073:o=>{o.exports="Long Description"},70500:o=>{o.exports=["Pieniądze"]},66653:o=>{o.exports=["Marginesy"]},42502:o=>{o.exports=["Brak nakładania się"]},74343:o=>{o.exports=["Nawigacja"]},43115:o=>{o.exports=["Skale"]},53224:o=>{o.exports=["Umieszczenie Skali"]},79194:o=>{o.exports=["Linia statusu"]},89053:o=>{o.exports="Symbol"},35383:o=>{o.exports=["Nazwa Symbolu"]},27767:o=>{o.exports=["Ostatnia wartość wymbolu"]},40847:o=>{o.exports=["Cena zamknięcia symbolu z poprzedniego dnia"]},50446:o=>{o.exports=["Panel"]},73908:o=>{o.exports=["Przegrody panelowe"]},36014:o=>{o.exports=["Procentowo"]},78621:o=>{o.exports=["Pipsy"]},74823:o=>{o.exports=["Cena przed/porynkowa"]},64859:o=>{o.exports=["Skala cen"]},76523:o=>{o.exports=["Cena i wartość procentowa"]},40187:o=>{o.exports="Right Margin"},77705:o=>{o.exports=["Znak wodny"]},67369:o=>{o.exports=["Tytuł"]},31326:o=>{o.exports=["Tytuły"]},23097:o=>{o.exports=["Symbol"]},82168:o=>{o.exports=["Ticker i opis"]},43637:o=>{o.exports=["Skala czasu"]},97316:o=>{o.exports=["Format godzinowy"]},90801:o=>{o.exports="Trading"},77534:o=>{o.exports=["Jednostka"]},1111:o=>{o.exports=["Wolumen"]},80170:o=>{o.exports=["Wartość według skali"]},91322:o=>{o.exports=["Wartości"]},70353:o=>{o.exports=["Pionowe linie siatki"]},57889:o=>{o.exports=["zmień widoczności wartości OHLC"]},35646:o=>{o.exports=["zmień widoczność przycisków nawigacyjnych"]},18644:o=>{o.exports=["zmień widoczność statusu otwartego rynku"]},45110:o=>{o.exports=["zmień widoczność zmian słupków"]},10349:o=>{o.exports=["zmień dolny margines"]},88161:o=>{o.exports=["zmiana widoczności etykiet waluty i jednostek"]},79570:o=>{o.exports=["zmień widoczność etykiety waluty"]},99011:o=>{o.exports=["zmień kolor tła wykresu"]},72458:o=>{o.exports=["zmień rodzaj tła wykresu"]},37034:o=>{o.exports=["zmień szerokość celownika"]},29951:o=>{o.exports=["zmień kolor celownika"]}, +92027:o=>{o.exports=["zmień styl celownika"]},50457:o=>{o.exports=["zmień format daty"]},7104:o=>{o.exports=["zmień dzień tygodnia na etykietach"]},88096:o=>{o.exports=["zmień kolor poziomych linii siatki"]},2523:o=>{o.exports=["zmień styl poziomych linii siatki"]},31325:o=>{o.exports=["Zmień widoczność tytułów wskaźników"]},99774:o=>{o.exports=["Zmień widoczność wartości wskaźników"]},96162:o=>{o.exports=["Zmień widoczność argumentów wskaźnika"]},59820:o=>{o.exports=["zmień widoczność nazw etykiet indykatorów i wskaźników finansowych"]},90512:o=>{o.exports=["zmień widoczność etykiet wartości wskaźników finansowych i indykatorów"]},97956:o=>{o.exports=["zmień przezroczystość tła legendy"]},61061:o=>{o.exports=["zmień widoczność tła legendy"]},37730:o=>{o.exports=["zmiana widoczności przycisków panelu"]},89032:o=>{o.exports=["Zmień kolor separatorów paneli"]},35636:o=>{o.exports=["zmień prawy margines"]},66601:o=>{o.exports="change right margin percentage"},25616:o=>{o.exports=["zmień kolor znaku wodnego symbolu"]},87159:o=>{o.exports=["zmień widoczność znaku wodnego symbolu"]},26717:o=>{o.exports=["zmień widoczność opisu symbolu"]},6091:o=>{o.exports="change symbol field visibility"},28741:o=>{o.exports=["zmiana trybu ostatniej wartości symbolu"]},95071:o=>{o.exports=["zmień format legendy symboli"]},35065:o=>{o.exports=["zmień kolor tekstu skali"]},84382:o=>{o.exports=["zmień rozmiar czcionki skali"]},12468:o=>{o.exports=["zmień kolor linii skali"]},71589:o=>{o.exports=["zmień widoczność przerw między sesjami"]},15035:o=>{o.exports=["zmień szerokość przerw między sesjami"]},1579:o=>{o.exports=["zmień kolor przerw między sesjami"]},21460:o=>{o.exports=["zmień styl przerw między sesjami"]},76991:o=>{o.exports=["zmień format godzin"]},98905:o=>{o.exports=["zmień górny margines"]},7011:o=>{o.exports=["zmień widoczność etykiety jednostki"]},22722:o=>{o.exports=["zmień kolor pionowych linii siatki"]},22867:o=>{o.exports=["zmień styl pionowych linii siatki"]},9455:o=>{o.exports=["zmień widoczność wartości wolumenu"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/pl.6847.490ee46270bef6a878dd.js b/charting_library/bundles/pl.7257.089fbbc28bead9558b87.js similarity index 69% rename from charting_library/bundles/pl.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/pl.7257.089fbbc28bead9558b87.js index e3915bc9..46a6da6d 100644 --- a/charting_library/bundles/pl.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/pl.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports=["Pt"]},11268:e=>{e.exports=["Pn"]},63331:e=>{e.exports=["Sob."]},85954:e=>{e.exports=["Nd."]},26230:e=>{e.exports=["Śr"]},24793:e=>{e.exports=["Czw."]},31533:e=>{e.exports=["Wt"]},89790:e=>{e.exports=["Kod źródłowy Pine niedostępny"]},39589:e=>{e.exports=["Zwiń okienko"]},38154:e=>{e.exports=["Potwierdź usunięcie drzewa testowego"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Załóż bezpłatne konto"]},69419:e=>{e.exports=["Wszystko w porządku — rynek jest otwarty."]},97637:e=>{e.exports=["Kwiecień"]},86797:e=>{e.exports=["Sierpień"]},22519:e=>{e.exports=["Parametry zmiany słupka"]},52003:e=>{e.exports=["Czy napewno chcesz usunąć analizę wraz ze skojarzonymi z nią elementami?"]},68854:e=>{e.exports=["Kliknij dwukrotnie"]},97325:e=>{e.exports=["Problem z danymi"]},52916:e=>{e.exports=["Dane są aktualizowane raz dziennie."]},25978:e=>{e.exports=["Dane są aktualizowane raz na sekundę, nawet jeśli na rynku jest więcej aktualizacji."]},57310:e=>{e.exports=["Dane są opóźnione"]},49321:e=>{e.exports=["Dane dostarczane w ramach planu Basic są aktualizowane raz na sekundę, nawet jeśli na rynku jest więcej aktualizacji."]},55669:e=>{e.exports=["Grudzień"]},83498:e=>{e.exports=["Usuń panel"]},59315:e=>{e.exports=["Dane End of Day"]},82751:e=>{e.exports=["Błąd"]},40519:e=>{e.exports=["Dobry wieczór. Rynek jest aktualnie otwarty tylko dla transakcji post-market."]},80227:e=>{e.exports=["Strefa czasowa giełdy"]},16467:e=>{e.exports=["Luty"]},25046:e=>{e.exports=["Wypełnij Umowę Dostępu do Danych"]},93666:e=>{e.exports=["Zaznacz Symbol"]},564:e=>{e.exports=["Pt"]},72970:e=>{e.exports=["Piątek"]},88958:e=>{e.exports=["Święto"]},21686:e=>{e.exports=["Ukryj legendę wskaźnika"]},26935:e=>{e.exports=["Argumenty wskaźników"]},26315:e=>{e.exports=["Nazwa wskaźnika"]},84098:e=>{e.exports=["Wartość wskaźnika"]},91459:e=>{e.exports=["Jeśli potrzebujesz danych w czasie rzeczywistym z {listedExchange}, musisz wypełnić Umowę Dostępu do Danych. Nie martw się, to zajmuje tylko kilka kliknięć"]},50634:e=>{e.exports=["Przejdzie do handlu posesyjnego za {remainingTime}."]},74537:e=>{e.exports=["Otworzy się dla handlu przedsesyjnego za {remainingTime}."]},26910:e=>{e.exports=["Styczeń"]},23230:e=>{e.exports=["Lipiec"]},49385:e=>{e.exports=["Czerwiec"]},99487:e=>{e.exports=["Wartości OHLC"]},15815:e=>{e.exports=["Jedna aktualizacja na sekundę"]},90784:e=>{e.exports=["Październik"]},75991:e=>{e.exports=["Pokaż status Rynek otwarty"]},18429:e=>{e.exports=["Dowiedz się więcej"]},39899:e=>{e.exports=["Przesuń panel w dół"]},70343:e=>{e.exports=["Przesuń panel w górę"]},83085:e=>{e.exports=["Pon"]},61199:e=>{e.exports=["Poniedziałek"]},41610:e=>{e.exports=["Więcej"]},1653:e=>{e.exports=["Dzień dobry. Rynek jest aktualnie otwarty tylko dla transakcji pre-market."]},56470:e=>{e.exports=["Maksymalizuj wykres"]},19603:e=>{e.exports=["Rozwiń panel"]},68327:e=>{e.exports=["Maj"]},35732:e=>{e.exports=["Zarządzanie panelami"]},84675:e=>{e.exports=["Marzec"]}, -83949:e=>{e.exports=["Rynek jest otwarty"]},35701:e=>{e.exports=["Rynek otwiera się za {remainingTime}."]},95814:e=>{e.exports=["Rynek jest zamknięty"]},98105:e=>{e.exports=["Rynek zamyka się za {remainingTime}."]},87202:e=>{e.exports=["Dzisiaj rynek ma wolne."]},71194:e=>{e.exports=["Listopad"]},66324:e=>{e.exports=["Kod źródłowy"]},36835:e=>{e.exports=["Sob"]},1144:e=>{e.exports=["Sobota"]},40653:e=>{e.exports=["Przewiń w lewo"]},26721:e=>{e.exports=["Przejdź do ostatniego słupka"]},35809:e=>{e.exports=["Przewiń w prawo"]},61132:e=>{e.exports=["Wrzesień"]},28705:e=>{e.exports=["Pokaż legendę wskaźnika"]},51072:e=>{e.exports=["Pokaż drzewo obiektów"]},37809:e=>{e.exports=["Pokaż ustawienia interwału"]},39045:e=>{e.exports=["Błąd wskaźnika"]},86577:e=>{e.exports=["Niedz."]},72149:e=>{e.exports=["Niedziela"]},39339:e=>{e.exports=["Tytuł symbolu"]},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports=["Płatne subskrypcje zawierają częstszą aktualizację danych."]},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports=["Dane w czasie rzeczywistym dla {description} nie są obecnie dostępne. Mamy nadzieję, że w przyszłości zaoferujemy użytkownikom dostęp do tych danych."]},6667:e=>{e.exports=["Dane w czasie rzeczywistym dla {symbolName} zostały dostarczone przez giełdę {exchange}."]},48293:e=>{e.exports=["Przywróć wykres"]},91029:e=>{e.exports=["Przywróć panel"]},75094:e=>{e.exports=["Śr."]},7147:e=>{e.exports=["Środa"]},52984:e=>{e.exports=["Aby uzyskać dane w czasie rzeczywistym dla {description}, musisz wykupić subskrypcję dodatkowych danych rynkowych."]},9787:e=>{e.exports=["Czw."]},7951:e=>{e.exports=["Czwartek"]},57918:e=>{e.exports=["Dane są aktualizowane w czasie rzeczywistym, ale różnią się nieznacznie od oficjalnych danych z głównych giełd."]},68025:e=>{e.exports=["Dane są aktualizowane w czasie rzeczywistym, ale różnią się nieznacznie od oficjalnych danych z {exchange}."]},73717:e=>{e.exports=["Nie ma takiego symbolu, wybierz jakiś inny."]},57048:e=>{e.exports=["Czas na spacer — ten rynek jest zamknięty."]},94316:e=>{e.exports=["Wt."]},44979:e=>{e.exports=["Wtorek"]},8209:e=>{e.exports=["Odznacz Symbol"]},1111:e=>{e.exports=["Wolumen"]},61311:e=>{e.exports=["Przybliż"]},47602:e=>{e.exports=["Oddal"]},57889:e=>{e.exports=["zmień widoczności wartości OHLC"]},18644:e=>{e.exports=["zmień widoczność statusu otwartego rynku"]},45110:e=>{e.exports=["zmień widoczność zmian słupków"]},31325:e=>{e.exports=["Zmień widoczność tytułów wskaźników"]},99774:e=>{e.exports=["Zmień widoczność wartości wskaźników"]},96162:e=>{e.exports=["Zmień widoczność argumentów wskaźnika"]},26717:e=>{e.exports=["zmień widoczność opisu symbolu"]},9455:e=>{e.exports=["zmień widoczność wartości wolumenu"]},39348:e=>{e.exports=["mniej niż 1 minuta"]},87358:e=>{e.exports=["pokaż {title}"]},7827:e=>{e.exports=["{days} i {hours}"]},7435:e=>{e.exports=["{exchange} od {originalExchange}"]},19830:e=>{e.exports=["{hours} i {minutes}"]},1084:e=>{ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports=["Pt"]},11268:e=>{e.exports=["Pn"]},63331:e=>{e.exports=["Sob."]},85954:e=>{e.exports=["Nd."]},26230:e=>{e.exports=["Śr"]},24793:e=>{e.exports=["Czw."]},31533:e=>{e.exports=["Wt"]},89790:e=>{e.exports=["Kod źródłowy Pine niedostępny"]},39589:e=>{e.exports=["Zwiń okienko"]},38154:e=>{e.exports=["Potwierdź usunięcie drzewa testowego"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Załóż bezpłatne konto"]},69419:e=>{e.exports=["Wszystko w porządku — rynek jest otwarty."]},97637:e=>{e.exports=["Kwiecień"]},86797:e=>{e.exports=["Sierpień"]},22519:e=>{e.exports=["Parametry zmiany słupka"]},52003:e=>{e.exports=["Czy napewno chcesz usunąć analizę wraz ze skojarzonymi z nią elementami?"]},68854:e=>{e.exports=["Kliknij dwukrotnie"]},97325:e=>{e.exports=["Problem z danymi"]},52916:e=>{e.exports=["Dane są aktualizowane raz dziennie."]},25978:e=>{e.exports=["Dane są aktualizowane raz na sekundę, nawet jeśli na rynku jest więcej aktualizacji."]},57310:e=>{e.exports=["Dane są opóźnione"]},49321:e=>{e.exports=["Dane dostarczane w ramach planu Basic są aktualizowane raz na sekundę, nawet jeśli na rynku jest więcej aktualizacji."]},55669:e=>{e.exports=["Grudzień"]},83498:e=>{e.exports=["Usuń panel"]},59315:e=>{e.exports=["Dane End of Day"]},82751:e=>{e.exports=["Błąd"]},40519:e=>{e.exports=["Dobry wieczór. Rynek jest aktualnie otwarty tylko dla transakcji post-market."]},80227:e=>{e.exports=["Strefa czasowa giełdy"]},16467:e=>{e.exports=["Luty"]},25046:e=>{e.exports=["Wypełnij Umowę Dostępu do Danych"]},93666:e=>{e.exports=["Zaznacz Symbol"]},564:e=>{e.exports=["Pt"]},72970:e=>{e.exports=["Piątek"]},88958:e=>{e.exports=["Święto"]},21686:e=>{e.exports=["Ukryj legendę wskaźnika"]},26935:e=>{e.exports=["Argumenty wskaźników"]},26315:e=>{e.exports=["Nazwa wskaźnika"]},84098:e=>{e.exports=["Wartość wskaźnika"]},91459:e=>{e.exports=["Jeśli potrzebujesz danych w czasie rzeczywistym z {listedExchange}, musisz wypełnić Umowę Dostępu do Danych. Nie martw się, to zajmuje tylko kilka kliknięć"]},50634:e=>{e.exports=["Przejdzie do handlu posesyjnego za {remainingTime}."]},74537:e=>{e.exports=["Otworzy się dla handlu przedsesyjnego za {remainingTime}."]},26910:e=>{e.exports=["Styczeń"]},23230:e=>{e.exports=["Lipiec"]},49385:e=>{e.exports=["Czerwiec"]},99487:e=>{e.exports=["Wartości OHLC"]},15815:e=>{e.exports=["Jedna aktualizacja na sekundę"]},90784:e=>{e.exports=["Październik"]},75991:e=>{e.exports=["Pokaż status Rynek otwarty"]},18429:e=>{e.exports=["Dowiedz się więcej"]},39899:e=>{e.exports=["Przesuń panel w dół"]},70343:e=>{e.exports=["Przesuń panel w górę"]},83085:e=>{e.exports=["Pon"]},61199:e=>{e.exports=["Poniedziałek"]},41610:e=>{e.exports=["Więcej"]},1653:e=>{e.exports=["Dzień dobry. Rynek jest aktualnie otwarty tylko dla transakcji pre-market."]},56470:e=>{e.exports=["Maksymalizuj wykres"]},19603:e=>{e.exports=["Rozwiń panel"]},68327:e=>{e.exports=["Maj"]},35732:e=>{e.exports=["Zarządzanie panelami"]},84675:e=>{e.exports=["Marzec"]}, +83949:e=>{e.exports=["Rynek jest otwarty"]},35701:e=>{e.exports=["Rynek otwiera się za {remainingTime}."]},95814:e=>{e.exports=["Rynek jest zamknięty"]},98105:e=>{e.exports=["Rynek zamyka się za {remainingTime}."]},87202:e=>{e.exports=["Dzisiaj rynek ma wolne."]},71194:e=>{e.exports=["Listopad"]},66324:e=>{e.exports=["Kod źródłowy"]},36835:e=>{e.exports=["Sob"]},1144:e=>{e.exports=["Sobota"]},40653:e=>{e.exports=["Przewiń w lewo"]},26721:e=>{e.exports=["Przejdź do ostatniego słupka"]},35809:e=>{e.exports=["Przewiń w prawo"]},61132:e=>{e.exports=["Wrzesień"]},28705:e=>{e.exports=["Pokaż legendę wskaźnika"]},51072:e=>{e.exports=["Pokaż drzewo obiektów"]},37809:e=>{e.exports=["Pokaż ustawienia interwału"]},39045:e=>{e.exports=["Błąd wskaźnika"]},86577:e=>{e.exports=["Niedz."]},72149:e=>{e.exports=["Niedziela"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["Tytuł symbolu"]},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports=["Płatne subskrypcje zawierają częstszą aktualizację danych."]},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports=["Dane w czasie rzeczywistym dla {description} nie są obecnie dostępne. Mamy nadzieję, że w przyszłości zaoferujemy użytkownikom dostęp do tych danych."]},6667:e=>{e.exports=["Dane w czasie rzeczywistym dla {symbolName} zostały dostarczone przez giełdę {exchange}."]},48293:e=>{e.exports=["Przywróć wykres"]},91029:e=>{e.exports=["Przywróć panel"]},75094:e=>{e.exports=["Śr."]},7147:e=>{e.exports=["Środa"]},52984:e=>{e.exports=["Aby uzyskać dane w czasie rzeczywistym dla {description}, musisz wykupić subskrypcję dodatkowych danych rynkowych."]},9787:e=>{e.exports=["Czw."]},7951:e=>{e.exports=["Czwartek"]},57918:e=>{e.exports=["Dane są aktualizowane w czasie rzeczywistym, ale różnią się nieznacznie od oficjalnych danych z głównych giełd."]},68025:e=>{e.exports=["Dane są aktualizowane w czasie rzeczywistym, ale różnią się nieznacznie od oficjalnych danych z {exchange}."]},73717:e=>{e.exports=["Nie ma takiego symbolu, wybierz jakiś inny."]},57048:e=>{e.exports=["Czas na spacer — ten rynek jest zamknięty."]},94316:e=>{e.exports=["Wt."]},44979:e=>{e.exports=["Wtorek"]},8209:e=>{e.exports=["Odznacz Symbol"]},1111:e=>{e.exports=["Wolumen"]},61311:e=>{e.exports=["Przybliż"]},47602:e=>{e.exports=["Oddal"]},57889:e=>{e.exports=["zmień widoczności wartości OHLC"]},18644:e=>{e.exports=["zmień widoczność statusu otwartego rynku"]},45110:e=>{e.exports=["zmień widoczność zmian słupków"]},31325:e=>{e.exports=["Zmień widoczność tytułów wskaźników"]},99774:e=>{e.exports=["Zmień widoczność wartości wskaźników"]},96162:e=>{e.exports=["Zmień widoczność argumentów wskaźnika"]},26717:e=>{e.exports=["zmień widoczność opisu symbolu"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["zmień widoczność wartości wolumenu"]},39348:e=>{e.exports=["mniej niż 1 minuta"]},87358:e=>{e.exports=["pokaż {title}"]},7827:e=>{e.exports=["{days} i {hours}"]},7435:e=>{e.exports=["{exchange} od {originalExchange}"]},19830:e=>{e.exports=["{hours} i {minutes}"]},1084:e=>{ e.exports=["Dane w czasie rzeczywistym z {listedExchange} są dostępne bezpłatnie dla zarejestrowanych użytkowników."]},11155:e=>{e.exports=["{symbolName} dane są opóźnione o {time} minut."]},77033:e=>{e.exports=["Dane są aktualizowane co {amount} sekundę, nawet jeśli na rynku jest więcej aktualizacji.","Dane są aktualizowane co {amount} sekundy, nawet jeśli na rynku jest więcej aktualizacji.","Dane są aktualizowane co {amount} sekund, nawet jeśli na rynku jest więcej aktualizacji.","Dane są aktualizowane co {amount} sekund, nawet jeśli na rynku jest więcej aktualizacji."]},2121:e=>{e.exports=["Dane dotyczące naszego planu Basic są aktualizowane co {amount} sekundę, nawet jeśli na rynku jest więcej aktualizacji.","Dane dotyczące naszego planu Basic są aktualizowane co {amount} sekundy, nawet jeśli na rynku jest więcej aktualizacji.","Dane dotyczące naszego planu Basic są aktualizowane co {amount} sekund, nawet jeśli na rynku jest więcej aktualizacji.","Dane dotyczące naszego planu Basic są aktualizowane co {amount} sekund, nawet jeśli na rynku jest więcej aktualizacji."]},5223:e=>{e.exports=["Jedna aktualizacja co {amount} sekundę","Jedna aktualizacja co {amount} sekund","Jedna aktualizacja co {amount} sekund","Jedna aktualizacja co {amount} sekund"]},58609:e=>{e.exports=["{number} dzień","{number} dni","{number} dni","{number} dni"]},24430:e=>{e.exports=["{number} godzina","{number} godziny","{number} godzina","{number} godzin"]},67151:e=>{e.exports=["{number} minuta","{number} minuty","{number} minut","{number} minut"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/pt.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/pt.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 0fb8612b..00000000 --- a/charting_library/bundles/pt.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:a=>{a.exports=["barras"]},19648:a=>{a.exports=["12 horas"]},55838:a=>{a.exports=["24 horas"]},88364:a=>{a.exports=["Estilos básico do gráfico"]},46720:a=>{a.exports=["Mira"]},50985:a=>{a.exports=["Moeda"]},17319:a=>{a.exports=["Moeda e Unidade"]},19481:a=>{a.exports=["Aparência"]},68791:a=>{a.exports=["Parâmetros"]},95036:a=>{a.exports=["Média do preço de fechamento"]},27331:a=>{a.exports=["Fundo"]},22519:a=>{a.exports=["Variação do Valor da Barra"]},87845:a=>{a.exports=["Botões"]},25209:a=>{a.exports=["Formato da data"]},55090:a=>{a.exports=["Dias da semana na legenda"]},29601:a=>{a.exports=["Descrição"]},26897:a=>{a.exports=["Eventos"]},95338:a=>{a.exports=["Linhas de grade horizontais"]},60971:a=>{a.exports=["Preço de máxima e mínima"]},61142:a=>{a.exports=["Indicadores"]},34905:a=>{a.exports=["Valor dos indicadores"]},29687:a=>{a.exports=["Indicadores e valor financeiro"]},25084:a=>{a.exports=["Indicadores e nomes dos dados financeiros"]},9654:a=>{a.exports=["Nome dos indicadores"]},99487:a=>{a.exports=["Valores OHLC"]},75991:a=>{a.exports=["Status de abertura do mercado"]},70500:a=>{a.exports=["Dinheiro"]},66653:a=>{a.exports=["Margens"]},42502:a=>{a.exports=["Sem sobreposição"]},74343:a=>{a.exports=["Navegação"]},43115:a=>{a.exports=["Escalas"]},53224:a=>{a.exports=["Fixação da Escala"]},79194:a=>{a.exports=["Status da linha"]},89053:a=>{a.exports=["Símbolo"]},35383:a=>{a.exports=["Nome do símbolo"]},27767:a=>{a.exports=["Último preço do Símbolo"]},40847:a=>{a.exports=["Preço de fechamento do dia anterior do símbolo"]},50446:a=>{a.exports=["Painel"]},73908:a=>{a.exports=["Divisores do painel"]},36014:a=>{a.exports=["Porcentagem"]},78621:a=>{a.exports="Pips"},74823:a=>{a.exports=["Preço no pré/pós mercado"]},64859:a=>{a.exports=["Escala de Preço"]},76523:a=>{a.exports=["Preço e Valor Percentual"]},40187:a=>{a.exports="Right Margin"},77705:a=>{a.exports=["Marca d'água"]},67369:a=>{a.exports=["Título"]},31326:a=>{a.exports=["Títulos"]},23097:a=>{a.exports=["Cotação"]},82168:a=>{a.exports=["Ticker e descrição"]},43637:a=>{a.exports=["Escala de Tempo"]},97316:a=>{a.exports=["Formato das horas do horário"]},90801:a=>{a.exports=["Trade"]},77534:a=>{a.exports=["Unidade"]},1111:a=>{a.exports="Volume"},80170:a=>{a.exports=["Valor de acordo com a Escala"]},91322:a=>{a.exports=["Valores"]},70353:a=>{a.exports=["Linhas de grade verticais"]},57889:a=>{a.exports=["alterar os valores de visibilidade da OHLC"]},35646:a=>{a.exports=["alterar a visibilidade dos botões de navegação"]},18644:a=>{a.exports=["alterar a visibilidade do status de abertura do mercado"]},45110:a=>{a.exports=["alterar a visibilidade da variação da barra"]},10349:a=>{a.exports=["alterar margem inferior"]},88161:a=>{a.exports=["mudar a visibilidade das legendas da moeda e das unidades"]},79570:a=>{a.exports=["alterar a visibilidade da legenda da moeda"]},99011:a=>{a.exports=["alterar a cor de fundo do gráfico"]},72458:a=>{a.exports=["alterar o tipo de fundo do gráfico"]}, -37034:a=>{a.exports=["alterar a largura da mira"]},29951:a=>{a.exports=["alterar a cor da mira"]},92027:a=>{a.exports=["alterar o estilo da mira"]},50457:a=>{a.exports=["alterar formato da data"]},7104:a=>{a.exports=["mudar dia da semana na legenda"]},88096:a=>{a.exports=["alterar a cor das linhas horizontais da grade"]},2523:a=>{a.exports=["alterar o estilo das linhas horizontais da grade"]},31325:a=>{a.exports=["alterar a visibilidade dos títulos dos indicadores"]},99774:a=>{a.exports=["alterar a visibilidade dos valores dos indicadores"]},96162:a=>{a.exports=["alterar a visibilidade dos parâmetros dos indicadores"]},59820:a=>{a.exports=["alterar a visibilidade dos nomes dos rótulos dos valores de indicadores e finanças"]},90512:a=>{a.exports=["alterar a visibilidade dos rótulos de valores de indicadores e financeiros"]},97956:a=>{a.exports=["mudar a transparência do fundo da legenda"]},61061:a=>{a.exports=["alterar a visibilidade do fundo da legenda"]},37730:a=>{a.exports=["alterar a visibilidade dos botões do painel"]},89032:a=>{a.exports=["mudar a cor dos divisores do painel"]},35636:a=>{a.exports=["alterar margem direita"]},66601:a=>{a.exports="change right margin percentage"},25616:a=>{a.exports=["alterar a cor da marca d'água do símbolo"]},87159:a=>{a.exports=["alterar visibilidade da marca d'água do símbolo"]},26717:a=>{a.exports=["mudar a visibilidade da descrição do símbolo"]},28741:a=>{a.exports=["alterar o modo do último valor do símbolo"]},95071:a=>{a.exports=["alterar formato da legenda do símbolo"]},35065:a=>{a.exports=["alterar a cor do texto da escala"]},84382:a=>{a.exports=["altera a fonte do texto da escala"]},12468:a=>{a.exports=["alterar a cor da linha da escala"]},71589:a=>{a.exports=["alterar visibilidade dos intervalos de sessões"]},15035:a=>{a.exports=["alterar a largura dos intervalos de sessões"]},1579:a=>{a.exports=["alterar a cor dos intervalos de sessões"]},21460:a=>{a.exports=["alterar o estilo dos intervalos de sessões"]},76991:a=>{a.exports=["alterar formato das horas do horário"]},98905:a=>{a.exports=["alterar margem superior"]},7011:a=>{a.exports=["alterar a visibilidade das legendas das unidades"]},22722:a=>{a.exports=["alterar a cor das linhas verticais da grade"]},22867:a=>{a.exports=["alterar o estilo das linhas verticais da grade"]},9455:a=>{a.exports=["alterar a visibilidade dos valores do volume"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/pt.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/pt.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..939899f4 --- /dev/null +++ b/charting_library/bundles/pt.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:a=>{a.exports=["barras"]},19648:a=>{a.exports=["12 horas"]},55838:a=>{a.exports=["24 horas"]},88364:a=>{a.exports=["Estilos básico do gráfico"]},46720:a=>{a.exports=["Mira"]},50985:a=>{a.exports=["Moeda"]},17319:a=>{a.exports=["Moeda e Unidade"]},19481:a=>{a.exports=["Aparência"]},68791:a=>{a.exports=["Parâmetros"]},95036:a=>{a.exports=["Média do preço de fechamento"]},27331:a=>{a.exports=["Fundo"]},22519:a=>{a.exports=["Variação do Valor da Barra"]},87845:a=>{a.exports=["Botões"]},25209:a=>{a.exports=["Formato da data"]},55090:a=>{a.exports=["Dias da semana na legenda"]},29601:a=>{a.exports=["Descrição"]},26897:a=>{a.exports=["Eventos"]},95338:a=>{a.exports=["Linhas de grade horizontais"]},60971:a=>{a.exports=["Preço de máxima e mínima"]},61142:a=>{a.exports=["Indicadores"]},34905:a=>{a.exports=["Valor dos indicadores"]},29687:a=>{a.exports=["Indicadores e valor financeiro"]},25084:a=>{a.exports=["Indicadores e nomes dos dados financeiros"]},9654:a=>{a.exports=["Nome dos indicadores"]},99487:a=>{a.exports=["Valores OHLC"]},75991:a=>{a.exports=["Status de abertura do mercado"]},96073:a=>{a.exports="Long Description"},70500:a=>{a.exports=["Dinheiro"]},66653:a=>{a.exports=["Margens"]},42502:a=>{a.exports=["Sem sobreposição"]},74343:a=>{a.exports=["Navegação"]},43115:a=>{a.exports=["Escalas"]},53224:a=>{a.exports=["Fixação da Escala"]},79194:a=>{a.exports=["Status da linha"]},89053:a=>{a.exports=["Símbolo"]},35383:a=>{a.exports=["Nome do símbolo"]},27767:a=>{a.exports=["Último preço do Símbolo"]},40847:a=>{a.exports=["Preço de fechamento do dia anterior do símbolo"]},50446:a=>{a.exports=["Painel"]},73908:a=>{a.exports=["Divisores do painel"]},36014:a=>{a.exports=["Porcentagem"]},78621:a=>{a.exports="Pips"},74823:a=>{a.exports=["Preço no pré/pós mercado"]},64859:a=>{a.exports=["Escala de Preço"]},76523:a=>{a.exports=["Preço e Valor Percentual"]},40187:a=>{a.exports="Right Margin"},77705:a=>{a.exports=["Marca d'água"]},67369:a=>{a.exports=["Título"]},31326:a=>{a.exports=["Títulos"]},23097:a=>{a.exports=["Cotação"]},82168:a=>{a.exports=["Ticker e descrição"]},43637:a=>{a.exports=["Escala de Tempo"]},97316:a=>{a.exports=["Formato das horas do horário"]},90801:a=>{a.exports=["Trade"]},77534:a=>{a.exports=["Unidade"]},1111:a=>{a.exports="Volume"},80170:a=>{a.exports=["Valor de acordo com a Escala"]},91322:a=>{a.exports=["Valores"]},70353:a=>{a.exports=["Linhas de grade verticais"]},57889:a=>{a.exports=["alterar os valores de visibilidade da OHLC"]},35646:a=>{a.exports=["alterar a visibilidade dos botões de navegação"]},18644:a=>{a.exports=["alterar a visibilidade do status de abertura do mercado"]},45110:a=>{a.exports=["alterar a visibilidade da variação da barra"]},10349:a=>{a.exports=["alterar margem inferior"]},88161:a=>{a.exports=["mudar a visibilidade das legendas da moeda e das unidades"]},79570:a=>{a.exports=["alterar a visibilidade da legenda da moeda"]},99011:a=>{a.exports=["alterar a cor de fundo do gráfico"]},72458:a=>{ +a.exports=["alterar o tipo de fundo do gráfico"]},37034:a=>{a.exports=["alterar a largura da mira"]},29951:a=>{a.exports=["alterar a cor da mira"]},92027:a=>{a.exports=["alterar o estilo da mira"]},50457:a=>{a.exports=["alterar formato da data"]},7104:a=>{a.exports=["mudar dia da semana na legenda"]},88096:a=>{a.exports=["alterar a cor das linhas horizontais da grade"]},2523:a=>{a.exports=["alterar o estilo das linhas horizontais da grade"]},31325:a=>{a.exports=["alterar a visibilidade dos títulos dos indicadores"]},99774:a=>{a.exports=["alterar a visibilidade dos valores dos indicadores"]},96162:a=>{a.exports=["alterar a visibilidade dos parâmetros dos indicadores"]},59820:a=>{a.exports=["alterar a visibilidade dos nomes dos rótulos dos valores de indicadores e finanças"]},90512:a=>{a.exports=["alterar a visibilidade dos rótulos de valores de indicadores e financeiros"]},97956:a=>{a.exports=["mudar a transparência do fundo da legenda"]},61061:a=>{a.exports=["alterar a visibilidade do fundo da legenda"]},37730:a=>{a.exports=["alterar a visibilidade dos botões do painel"]},89032:a=>{a.exports=["mudar a cor dos divisores do painel"]},35636:a=>{a.exports=["alterar margem direita"]},66601:a=>{a.exports="change right margin percentage"},25616:a=>{a.exports=["alterar a cor da marca d'água do símbolo"]},87159:a=>{a.exports=["alterar visibilidade da marca d'água do símbolo"]},26717:a=>{a.exports=["mudar a visibilidade da descrição do símbolo"]},6091:a=>{a.exports="change symbol field visibility"},28741:a=>{a.exports=["alterar o modo do último valor do símbolo"]},95071:a=>{a.exports=["alterar formato da legenda do símbolo"]},35065:a=>{a.exports=["alterar a cor do texto da escala"]},84382:a=>{a.exports=["altera a fonte do texto da escala"]},12468:a=>{a.exports=["alterar a cor da linha da escala"]},71589:a=>{a.exports=["alterar visibilidade dos intervalos de sessões"]},15035:a=>{a.exports=["alterar a largura dos intervalos de sessões"]},1579:a=>{a.exports=["alterar a cor dos intervalos de sessões"]},21460:a=>{a.exports=["alterar o estilo dos intervalos de sessões"]},76991:a=>{a.exports=["alterar formato das horas do horário"]},98905:a=>{a.exports=["alterar margem superior"]},7011:a=>{a.exports=["alterar a visibilidade das legendas das unidades"]},22722:a=>{a.exports=["alterar a cor das linhas verticais da grade"]},22867:a=>{a.exports=["alterar o estilo das linhas verticais da grade"]},9455:a=>{a.exports=["alterar a visibilidade dos valores do volume"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/pt.6847.490ee46270bef6a878dd.js b/charting_library/bundles/pt.7257.089fbbc28bead9558b87.js similarity index 53% rename from charting_library/bundles/pt.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/pt.7257.089fbbc28bead9558b87.js index 231116ee..be68b3e6 100644 --- a/charting_library/bundles/pt.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/pt.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports=["Sexta"]},11268:e=>{e.exports=["Seg"]},63331:e=>{e.exports=["Sáb."]},85954:e=>{e.exports=["Dom"]},26230:e=>{e.exports=["Quarta"]},24793:e=>{e.exports=["Quinta"]},31533:e=>{e.exports=["Terça"]},89790:e=>{e.exports=["Não foi possível acessar o código-fonte Pine."]},39589:e=>{e.exports=["Colapsar Painel"]},38154:e=>{e.exports=["Confirmar remoção de árvore de estudo"]},65636:e=>{e.exports=["CBOE BZX"]},36004:e=>{e.exports=["Crie uma conta grátis"]},69419:e=>{e.exports=["Tudo certo — Mercado aberto."]},97637:e=>{e.exports=["Abril"]},86797:e=>{e.exports=["Agosto"]},22519:e=>{e.exports=["Variação do Valor da Barra"]},52003:e=>{e.exports=["Você quer realmente deletar esse estudo e todos os seus derivativos?"]},68854:e=>{e.exports=["Clique duplo"]},97325:e=>{e.exports=["Problema nos dados"]},52916:e=>{e.exports=["É atualizado uma vez ao dia."]},25978:e=>{e.exports=["Os dados são atualizados uma vez por segundo, mesmo que haja mais atualizações no mercado."]},57310:e=>{e.exports=["Dados com atraso"]},49321:e=>{e.exports=["Os dados do nosso plano Básico são atualizados uma vez por segundo, mesmo que haja mais atualizações no mercado."]},55669:e=>{e.exports=["Dezembro"]},83498:e=>{e.exports=["Deletar painel"]},59315:e=>{e.exports=["Dados no fim do dia"]},82751:e=>{e.exports=["Erro"]},40519:e=>{e.exports=["Boa noite. O mercado está aberto para negócios no fechamento do mercado"]},80227:e=>{e.exports=["Fuso horário da Bolsa"]},16467:e=>{e.exports=["Fevereiro"]},25046:e=>{e.exports=["Preencha o Contrato da Bolsa"]},93666:e=>{e.exports=["Marcar Símbolo"]},564:e=>{e.exports=["Sexta"]},72970:e=>{e.exports=["Sexta"]},88958:e=>{e.exports=["Feriado"]},21686:e=>{e.exports=["Ocultar a Legenda do Indicador"]},26935:e=>{e.exports=["Parâmetros dos Indicadores"]},26315:e=>{e.exports=["Títulos dos Indicadores"]},84098:e=>{e.exports=["Valores do indicador"]},91459:e=>{e.exports=["Se você quiser {listedExchange} dados em tempo real, você precisará completar o Contrato da Bolsa. Não se preocupe, são necessários apenas alguns cliques"]},50634:e=>{e.exports=["Vai para as negociações de pós-mercado em {remainingTime}"]},74537:e=>{e.exports=["Abrirá para as negociações de pré-mercado em {remainingTime}."]},26910:e=>{e.exports=["Janeiro"]},23230:e=>{e.exports=["Julho"]},49385:e=>{e.exports=["Junho"]},99487:e=>{e.exports=["Valores OHLC"]},15815:e=>{e.exports=["Atualizado uma vez por segundo"]},90784:e=>{e.exports=["Outubro"]},75991:e=>{e.exports=["Status de abertura do mercado"]},18429:e=>{e.exports=["Saiba mais"]},39899:e=>{e.exports=["Mover painel para baixo"]},70343:e=>{e.exports=["Mover painel para cima"]},83085:e=>{e.exports=["Seg"]},61199:e=>{e.exports=["Segunda"]},41610:e=>{e.exports=["Mais"]},1653:e=>{e.exports=["Bom dia. O mercado está aberto para negócios na pré-abertura."]},56470:e=>{e.exports=["Maximizar gráfico"]},19603:e=>{e.exports=["Maximizar painel"]},68327:e=>{e.exports=["Мaio"]},35732:e=>{e.exports=["Gerenciar paineis"]},84675:e=>{ -e.exports=["Março"]},83949:e=>{e.exports=["Mercado aberto"]},35701:e=>{e.exports=["Mercado abre em {remainingTime}"]},95814:e=>{e.exports=["Mercado fechado"]},98105:e=>{e.exports=["Mercado fecha em {remainingTime}"]},87202:e=>{e.exports=["O mercado está fechado para feriado. Sorte deles."]},71194:e=>{e.exports=["Novembro"]},66324:e=>{e.exports=["Código-fonte"]},36835:e=>{e.exports=["Sáb."]},1144:e=>{e.exports=["Sábado"]},40653:e=>{e.exports=["Rolar para a esquerda"]},26721:e=>{e.exports=["Rolar para a barra mais recente"]},35809:e=>{e.exports=["Rolar para a direita"]},61132:e=>{e.exports=["Setembro"]},28705:e=>{e.exports=["Mostrar a Legenda do Indicador"]},51072:e=>{e.exports=["Mostrar Lista de Objetos"]},37809:e=>{e.exports=["Mostrar configurações de intervalo"]},39045:e=>{e.exports=["Erro do Estudo"]},86577:e=>{e.exports=["Dom"]},72149:e=>{e.exports=["Domingo"]},39339:e=>{e.exports=["Título do símbolo"]},29985:e=>{e.exports=["Pós-mercado"]},28412:e=>{e.exports=["Os planos pagos apresentam atualizações de dados mais rápidas."]},56042:e=>{e.exports=["Pré-mercado"]},36015:e=>{e.exports=["Dados em tempo real para {description} não é suportado no momento. Podemos fornecer no futuro"]},6667:e=>{e.exports=["Os dados em tempo real para {symbolName} são fornecidos pela Bolsa {exchange}."]},48293:e=>{e.exports=["Restaurar gráfico"]},91029:e=>{e.exports=["Restaurar painel"]},75094:e=>{e.exports=["Quarta"]},7147:e=>{e.exports=["Quarta"]},52984:e=>{e.exports=["Para obter dados em tempo real de {description}, adquira o pacote de dados em tempo real."]},9787:e=>{e.exports=["Qui"]},7951:e=>{e.exports=["Quinta"]},57918:e=>{e.exports=["Esse dado é em tempo real, mas é ligeiramente diferente de sua contraparte oficial da bolsa primária."]},68025:e=>{e.exports=["Estes dados são em tempo real, mas são ligeiramente diferentes de sua contraparte oficial vinda da {exchange}."]},73717:e=>{e.exports=["Esse símbolo não existe. Por favor, escolha outro símbolo."]},57048:e=>{e.exports=["Hora de dar uma voltinha — esse mercado está fechado."]},94316:e=>{e.exports=["Terça"]},44979:e=>{e.exports=["Terça"]},8209:e=>{e.exports=["Desmarcar Símbolo"]},1111:e=>{e.exports="Volume"},61311:e=>{e.exports=["Aumentar Zoom"]},47602:e=>{e.exports=["Diminuir Zoom"]},57889:e=>{e.exports=["alterar os valores de visibilidade da OHLC"]},18644:e=>{e.exports=["alterar a visibilidade do status de abertura do mercado"]},45110:e=>{e.exports=["alterar a visibilidade da variação da barra"]},31325:e=>{e.exports=["alterar a visibilidade dos títulos dos indicadores"]},99774:e=>{e.exports=["alterar a visibilidade dos valores dos indicadores"]},96162:e=>{e.exports=["alterar a visibilidade dos parâmetros dos indicadores"]},26717:e=>{e.exports=["mudar a visibilidade da descrição do símbolo"]},9455:e=>{e.exports=["alterar a visibilidade dos valores do volume"]},39348:e=>{e.exports=["menos de 1 minuto"]},87358:e=>{e.exports=["exibir {title}"]},7827:e=>{e.exports=["{days} e {hours}"]},7435:e=>{e.exports=["{exchange} por {originalExchange}"]},19830:e=>{ -e.exports=["{hours} e {minutes}"]},1084:e=>{e.exports=["Dados em tempo real de {listedExchange} estão disponíveis gratuitamente para usuários registrados."]},11155:e=>{e.exports=["Dados de {symbolName} está atrasado em {time} minutos"]},77033:e=>{e.exports=["O dado é atualizado uma vez a cada {amount} segundo, mesmo que haja mais atualizações no mercado.","O dado é atualizado uma vez a cada {amount} segundos, mesmo que haja mais atualizações no mercado."]},2121:e=>{e.exports=["O dado no nosso plano Básico é atualizado uma vez a cada {amount} segundo, mesmo que haja mais atualizações no mercado.","O dado no nosso plano Básico é atualizado uma vez a cada {amount} segundos, mesmo que haja mais atualizações no mercado."]},5223:e=>{e.exports=["Uma atualização a cada {amount} segundo","Uma atualização a cada {amount} segundos"]},58609:e=>{e.exports=["{number} dia","{number} dias"]},24430:e=>{e.exports=["{number} hora","{number} horas"]},67151:e=>{e.exports=["{number} minuto","{number} minutos"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports=["Sexta"]},11268:e=>{e.exports=["Seg"]},63331:e=>{e.exports=["Sáb."]},85954:e=>{e.exports=["Dom"]},26230:e=>{e.exports=["Quarta"]},24793:e=>{e.exports=["Quinta"]},31533:e=>{e.exports=["Terça"]},89790:e=>{e.exports=["Não foi possível acessar o código-fonte Pine."]},39589:e=>{e.exports=["Colapsar Painel"]},38154:e=>{e.exports=["Confirmar remoção de árvore de estudo"]},65636:e=>{e.exports=["CBOE BZX"]},36004:e=>{e.exports=["Crie uma conta grátis"]},69419:e=>{e.exports=["Tudo certo — Mercado aberto."]},97637:e=>{e.exports=["Abril"]},86797:e=>{e.exports=["Agosto"]},22519:e=>{e.exports=["Variação do Valor da Barra"]},52003:e=>{e.exports=["Você quer realmente deletar esse estudo e todos os seus derivativos?"]},68854:e=>{e.exports=["Clique duplo"]},97325:e=>{e.exports=["Problema nos dados"]},52916:e=>{e.exports=["É atualizado uma vez ao dia."]},25978:e=>{e.exports=["Os dados são atualizados uma vez por segundo, mesmo que haja mais atualizações no mercado."]},57310:e=>{e.exports=["Dados com atraso"]},49321:e=>{e.exports=["Os dados do nosso plano Básico são atualizados uma vez por segundo, mesmo que haja mais atualizações no mercado."]},55669:e=>{e.exports=["Dezembro"]},83498:e=>{e.exports=["Deletar painel"]},59315:e=>{e.exports=["Dados no fim do dia"]},82751:e=>{e.exports=["Erro"]},40519:e=>{e.exports=["Boa noite. O mercado está aberto para negócios no fechamento do mercado"]},80227:e=>{e.exports=["Fuso horário da Bolsa"]},16467:e=>{e.exports=["Fevereiro"]},25046:e=>{e.exports=["Preencha o Contrato da Bolsa"]},93666:e=>{e.exports=["Marcar Símbolo"]},564:e=>{e.exports=["Sexta"]},72970:e=>{e.exports=["Sexta"]},88958:e=>{e.exports=["Feriado"]},21686:e=>{e.exports=["Ocultar a Legenda do Indicador"]},26935:e=>{e.exports=["Parâmetros dos Indicadores"]},26315:e=>{e.exports=["Títulos dos Indicadores"]},84098:e=>{e.exports=["Valores do indicador"]},91459:e=>{e.exports=["Se você quiser {listedExchange} dados em tempo real, você precisará completar o Contrato da Bolsa. Não se preocupe, são necessários apenas alguns cliques"]},50634:e=>{e.exports=["Vai para as negociações de pós-mercado em {remainingTime}"]},74537:e=>{e.exports=["Abrirá para as negociações de pré-mercado em {remainingTime}."]},26910:e=>{e.exports=["Janeiro"]},23230:e=>{e.exports=["Julho"]},49385:e=>{e.exports=["Junho"]},99487:e=>{e.exports=["Valores OHLC"]},15815:e=>{e.exports=["Atualizado uma vez por segundo"]},90784:e=>{e.exports=["Outubro"]},75991:e=>{e.exports=["Status de abertura do mercado"]},18429:e=>{e.exports=["Saiba mais"]},39899:e=>{e.exports=["Mover painel para baixo"]},70343:e=>{e.exports=["Mover painel para cima"]},83085:e=>{e.exports=["Seg"]},61199:e=>{e.exports=["Segunda"]},41610:e=>{e.exports=["Mais"]},1653:e=>{e.exports=["Bom dia. O mercado está aberto para negócios na pré-abertura."]},56470:e=>{e.exports=["Maximizar gráfico"]},19603:e=>{e.exports=["Maximizar painel"]},68327:e=>{e.exports=["Мaio"]},35732:e=>{e.exports=["Gerenciar paineis"]},84675:e=>{ +e.exports=["Março"]},83949:e=>{e.exports=["Mercado aberto"]},35701:e=>{e.exports=["Mercado abre em {remainingTime}"]},95814:e=>{e.exports=["Mercado fechado"]},98105:e=>{e.exports=["Mercado fecha em {remainingTime}"]},87202:e=>{e.exports=["O mercado está fechado para feriado. Sorte deles."]},71194:e=>{e.exports=["Novembro"]},66324:e=>{e.exports=["Código-fonte"]},36835:e=>{e.exports=["Sáb."]},1144:e=>{e.exports=["Sábado"]},40653:e=>{e.exports=["Rolar para a esquerda"]},26721:e=>{e.exports=["Rolar para a barra mais recente"]},35809:e=>{e.exports=["Rolar para a direita"]},61132:e=>{e.exports=["Setembro"]},28705:e=>{e.exports=["Mostrar a Legenda do Indicador"]},51072:e=>{e.exports=["Mostrar Lista de Objetos"]},37809:e=>{e.exports=["Mostrar configurações de intervalo"]},39045:e=>{e.exports=["Erro do Estudo"]},86577:e=>{e.exports=["Dom"]},72149:e=>{e.exports=["Domingo"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["Título do símbolo"]},29985:e=>{e.exports=["Pós-mercado"]},28412:e=>{e.exports=["Os planos pagos apresentam atualizações de dados mais rápidas."]},56042:e=>{e.exports=["Pré-mercado"]},36015:e=>{e.exports=["Dados em tempo real para {description} não é suportado no momento. Podemos fornecer no futuro"]},6667:e=>{e.exports=["Os dados em tempo real para {symbolName} são fornecidos pela Bolsa {exchange}."]},48293:e=>{e.exports=["Restaurar gráfico"]},91029:e=>{e.exports=["Restaurar painel"]},75094:e=>{e.exports=["Quarta"]},7147:e=>{e.exports=["Quarta"]},52984:e=>{e.exports=["Para obter dados em tempo real de {description}, adquira o pacote de dados em tempo real."]},9787:e=>{e.exports=["Qui"]},7951:e=>{e.exports=["Quinta"]},57918:e=>{e.exports=["Esse dado é em tempo real, mas é ligeiramente diferente de sua contraparte oficial da bolsa primária."]},68025:e=>{e.exports=["Estes dados são em tempo real, mas são ligeiramente diferentes de sua contraparte oficial vinda da {exchange}."]},73717:e=>{e.exports=["Esse símbolo não existe. Por favor, escolha outro símbolo."]},57048:e=>{e.exports=["Hora de dar uma voltinha — esse mercado está fechado."]},94316:e=>{e.exports=["Terça"]},44979:e=>{e.exports=["Terça"]},8209:e=>{e.exports=["Desmarcar Símbolo"]},1111:e=>{e.exports="Volume"},61311:e=>{e.exports=["Aumentar Zoom"]},47602:e=>{e.exports=["Diminuir Zoom"]},57889:e=>{e.exports=["alterar os valores de visibilidade da OHLC"]},18644:e=>{e.exports=["alterar a visibilidade do status de abertura do mercado"]},45110:e=>{e.exports=["alterar a visibilidade da variação da barra"]},31325:e=>{e.exports=["alterar a visibilidade dos títulos dos indicadores"]},99774:e=>{e.exports=["alterar a visibilidade dos valores dos indicadores"]},96162:e=>{e.exports=["alterar a visibilidade dos parâmetros dos indicadores"]},26717:e=>{e.exports=["mudar a visibilidade da descrição do símbolo"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["alterar a visibilidade dos valores do volume"]},39348:e=>{e.exports=["menos de 1 minuto"]},87358:e=>{e.exports=["exibir {title}"]},7827:e=>{e.exports=["{days} e {hours}"]}, +7435:e=>{e.exports=["{exchange} por {originalExchange}"]},19830:e=>{e.exports=["{hours} e {minutes}"]},1084:e=>{e.exports=["Dados em tempo real de {listedExchange} estão disponíveis gratuitamente para usuários registrados."]},11155:e=>{e.exports=["Dados de {symbolName} está atrasado em {time} minutos"]},77033:e=>{e.exports=["O dado é atualizado uma vez a cada {amount} segundo, mesmo que haja mais atualizações no mercado.","O dado é atualizado uma vez a cada {amount} segundos, mesmo que haja mais atualizações no mercado."]},2121:e=>{e.exports=["O dado no nosso plano Básico é atualizado uma vez a cada {amount} segundo, mesmo que haja mais atualizações no mercado.","O dado no nosso plano Básico é atualizado uma vez a cada {amount} segundos, mesmo que haja mais atualizações no mercado."]},5223:e=>{e.exports=["Uma atualização a cada {amount} segundo","Uma atualização a cada {amount} segundos"]},58609:e=>{e.exports=["{number} dia","{number} dias"]},24430:e=>{e.exports=["{number} hora","{number} horas"]},67151:e=>{e.exports=["{number} minuto","{number} minutos"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ro.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/ro.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 85f145e5..00000000 --- a/charting_library/bundles/ro.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports="bars"},19648:e=>{e.exports="12-hours"},55838:e=>{e.exports="24-hours"},88364:e=>{e.exports="Chart basic styles"},46720:e=>{e.exports="Crosshair"},50985:e=>{e.exports="Currency"},17319:e=>{e.exports="Currency and Unit"},19481:e=>{e.exports="Appearance"},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports="Average close price"},27331:e=>{e.exports="Background"},22519:e=>{e.exports=["Bar Change Values"]},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports=["Date Format"]},55090:e=>{e.exports="Day of week on labels"},29601:e=>{e.exports="Description"},26897:e=>{e.exports="Events"},95338:e=>{e.exports=["Horz Grid Lines"]},60971:e=>{e.exports="High and low price"},61142:e=>{e.exports="Indicators"},34905:e=>{e.exports="Indicators value"},29687:e=>{e.exports="Indicators and financials value"},25084:e=>{e.exports="Indicators and financials name"},9654:e=>{e.exports="Indicators name"},99487:e=>{e.exports=["OHLC Values"]},75991:e=>{e.exports="Open market status"},70500:e=>{e.exports="Money"},66653:e=>{e.exports="Margins"},42502:e=>{e.exports="No overlapping"},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports="Scales"},53224:e=>{e.exports=["Scales Placement"]},79194:e=>{e.exports="Status line"},89053:e=>{e.exports="Symbol"},35383:e=>{e.exports=["Symbol Name"]},27767:e=>{e.exports="Symbol last price"},40847:e=>{e.exports="Symbol previous day close price"},50446:e=>{e.exports="Pane"},73908:e=>{e.exports="Pane separators"},36014:e=>{e.exports="Percentage"},78621:e=>{e.exports="Pips"},74823:e=>{e.exports="Pre/post market price"},64859:e=>{e.exports="Price Scale"},76523:e=>{e.exports=["Price and Percentage Value"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports="Watermark"},67369:e=>{e.exports="Title"},31326:e=>{e.exports="Titles"},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports="Ticker and description"},43637:e=>{e.exports="Time Scale"},97316:e=>{e.exports="Time hours format"},90801:e=>{e.exports="Trading"},77534:e=>{e.exports="Unit"},1111:e=>{e.exports="Volume"},80170:e=>{e.exports=["Value according to Scale"]},91322:e=>{e.exports="Values"},70353:e=>{e.exports=["Vert Grid Lines"]},57889:e=>{e.exports="change OHLC values visibility"},35646:e=>{e.exports="change navigation buttons visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},10349:e=>{e.exports="change bottom margin"},88161:e=>{e.exports="change currency and unit labels visibility"},79570:e=>{e.exports="change currency label visibility"},99011:e=>{e.exports="change chart background color"},72458:e=>{e.exports="change chart background type"},37034:e=>{e.exports="change crosshair width"},29951:e=>{e.exports="change crosshair color"},92027:e=>{e.exports="change crosshair style"},50457:e=>{e.exports="change date format"},7104:e=>{e.exports="change day of week on labels"},88096:e=>{e.exports="change horz grid lines color"},2523:e=>{e.exports="change horz grid lines style"},31325:e=>{ -e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},59820:e=>{e.exports="change indicators and financials name labels visibility"},90512:e=>{e.exports="change indicators and financials value labels visibility"},97956:e=>{e.exports="change legend background transparency"},61061:e=>{e.exports="change legend background visibility"},37730:e=>{e.exports="change pane buttons visibility"},89032:e=>{e.exports="change pane separators color"},35636:e=>{e.exports="change right margin"},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports="change symbol watermark color"},87159:e=>{e.exports="change symbol watermark visibility"},26717:e=>{e.exports="change symbol description visibility"},28741:e=>{e.exports="change symbol last value mode"},95071:e=>{e.exports="change symbol legend format"},35065:e=>{e.exports="change scales text color"},84382:e=>{e.exports="change scales font size"},12468:e=>{e.exports="change scales lines color"},71589:e=>{e.exports="change sessions breaks visibility"},15035:e=>{e.exports="change sessions breaks width"},1579:e=>{e.exports="change sessions breaks color"},21460:e=>{e.exports="change sessions breaks style"},76991:e=>{e.exports="change time hours format"},98905:e=>{e.exports="change top margin"},7011:e=>{e.exports="change unit label visibility"},22722:e=>{e.exports="change vert grid lines color"},22867:e=>{e.exports="change vert grid lines style"},9455:e=>{e.exports="change volume values visibility"}}]); \ No newline at end of file diff --git a/charting_library/bundles/ro.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/ro.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..1e4e02d5 --- /dev/null +++ b/charting_library/bundles/ro.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports="bars"},19648:e=>{e.exports="12-hours"},55838:e=>{e.exports="24-hours"},88364:e=>{e.exports="Chart basic styles"},46720:e=>{e.exports="Crosshair"},50985:e=>{e.exports="Currency"},17319:e=>{e.exports="Currency and Unit"},19481:e=>{e.exports="Appearance"},68791:e=>{e.exports="Arguments"},95036:e=>{e.exports="Average close price"},27331:e=>{e.exports="Background"},22519:e=>{e.exports=["Bar Change Values"]},87845:e=>{e.exports="Buttons"},25209:e=>{e.exports=["Date Format"]},55090:e=>{e.exports="Day of week on labels"},29601:e=>{e.exports="Description"},26897:e=>{e.exports="Events"},95338:e=>{e.exports=["Horz Grid Lines"]},60971:e=>{e.exports="High and low price"},61142:e=>{e.exports="Indicators"},34905:e=>{e.exports="Indicators value"},29687:e=>{e.exports="Indicators and financials value"},25084:e=>{e.exports="Indicators and financials name"},9654:e=>{e.exports="Indicators name"},99487:e=>{e.exports=["OHLC Values"]},75991:e=>{e.exports="Open market status"},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports="Money"},66653:e=>{e.exports="Margins"},42502:e=>{e.exports="No overlapping"},74343:e=>{e.exports="Navigation"},43115:e=>{e.exports="Scales"},53224:e=>{e.exports=["Scales Placement"]},79194:e=>{e.exports="Status line"},89053:e=>{e.exports="Symbol"},35383:e=>{e.exports=["Symbol Name"]},27767:e=>{e.exports="Symbol last price"},40847:e=>{e.exports="Symbol previous day close price"},50446:e=>{e.exports="Pane"},73908:e=>{e.exports="Pane separators"},36014:e=>{e.exports="Percentage"},78621:e=>{e.exports="Pips"},74823:e=>{e.exports="Pre/post market price"},64859:e=>{e.exports="Price Scale"},76523:e=>{e.exports=["Price and Percentage Value"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports="Watermark"},67369:e=>{e.exports="Title"},31326:e=>{e.exports="Titles"},23097:e=>{e.exports="Ticker"},82168:e=>{e.exports="Ticker and description"},43637:e=>{e.exports="Time Scale"},97316:e=>{e.exports="Time hours format"},90801:e=>{e.exports="Trading"},77534:e=>{e.exports="Unit"},1111:e=>{e.exports="Volume"},80170:e=>{e.exports=["Value according to Scale"]},91322:e=>{e.exports="Values"},70353:e=>{e.exports=["Vert Grid Lines"]},57889:e=>{e.exports="change OHLC values visibility"},35646:e=>{e.exports="change navigation buttons visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},10349:e=>{e.exports="change bottom margin"},88161:e=>{e.exports="change currency and unit labels visibility"},79570:e=>{e.exports="change currency label visibility"},99011:e=>{e.exports="change chart background color"},72458:e=>{e.exports="change chart background type"},37034:e=>{e.exports="change crosshair width"},29951:e=>{e.exports="change crosshair color"},92027:e=>{e.exports="change crosshair style"},50457:e=>{e.exports="change date format"},7104:e=>{e.exports="change day of week on labels"},88096:e=>{e.exports="change horz grid lines color"},2523:e=>{ +e.exports="change horz grid lines style"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},59820:e=>{e.exports="change indicators and financials name labels visibility"},90512:e=>{e.exports="change indicators and financials value labels visibility"},97956:e=>{e.exports="change legend background transparency"},61061:e=>{e.exports="change legend background visibility"},37730:e=>{e.exports="change pane buttons visibility"},89032:e=>{e.exports="change pane separators color"},35636:e=>{e.exports="change right margin"},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports="change symbol watermark color"},87159:e=>{e.exports="change symbol watermark visibility"},26717:e=>{e.exports="change symbol description visibility"},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports="change symbol last value mode"},95071:e=>{e.exports="change symbol legend format"},35065:e=>{e.exports="change scales text color"},84382:e=>{e.exports="change scales font size"},12468:e=>{e.exports="change scales lines color"},71589:e=>{e.exports="change sessions breaks visibility"},15035:e=>{e.exports="change sessions breaks width"},1579:e=>{e.exports="change sessions breaks color"},21460:e=>{e.exports="change sessions breaks style"},76991:e=>{e.exports="change time hours format"},98905:e=>{e.exports="change top margin"},7011:e=>{e.exports="change unit label visibility"},22722:e=>{e.exports="change vert grid lines color"},22867:e=>{e.exports="change vert grid lines style"},9455:e=>{e.exports="change volume values visibility"}}]); \ No newline at end of file diff --git a/charting_library/bundles/ro.6847.490ee46270bef6a878dd.js b/charting_library/bundles/ro.7257.089fbbc28bead9558b87.js similarity index 55% rename from charting_library/bundles/ro.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/ro.7257.089fbbc28bead9558b87.js index 488ff4f9..b03f47ec 100644 --- a/charting_library/bundles/ro.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/ro.7257.089fbbc28bead9558b87.js @@ -1,2 +1,2 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports="Could not get Pine source code."},39589:e=>{e.exports="Collapse pane"},38154:e=>{e.exports="Confirm Remove Study Tree"},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports="Create a free account"},69419:e=>{e.exports="All's well — Market is open."},97637:e=>{e.exports="April"},86797:e=>{e.exports="August"},22519:e=>{e.exports=["Bar Change Values"]},52003:e=>{e.exports="Do you really want to delete study and all of it's children?"},68854:e=>{e.exports="Double click"},97325:e=>{e.exports="Data error"},52916:e=>{e.exports="Data is updated once a day."},25978:e=>{e.exports="Data is updated once per second, even if there are more updates on the market."},57310:e=>{e.exports="Data is delayed"},49321:e=>{e.exports="Data on our Basic plan is updated once per second, even if there are more updates on the market."},55669:e=>{e.exports="December"},83498:e=>{e.exports="Delete pane"},59315:e=>{e.exports="End of day data"},82751:e=>{e.exports="Error"},40519:e=>{e.exports="Evening. Market is open for post-market trading."},80227:e=>{e.exports="Exchange timezone"},16467:e=>{e.exports="February"},25046:e=>{e.exports="Fill out Exchange Agreements"},93666:e=>{e.exports="Flag Symbol"},564:e=>{e.exports="Fri"},72970:e=>{e.exports="Friday"},88958:e=>{e.exports="Holiday"},21686:e=>{e.exports="Hide Indicator Legend"},26935:e=>{e.exports=["Indicator Arguments"]},26315:e=>{e.exports=["Indicator Titles"]},84098:e=>{e.exports=["Indicator Values"]},91459:e=>{e.exports="If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"},50634:e=>{e.exports="It'll go to post-market trading in {remainingTime}."},74537:e=>{e.exports="It'll open for pre-market trading in {remainingTime}."},26910:e=>{e.exports="January"},23230:e=>{e.exports="July"},49385:e=>{e.exports="June"},99487:e=>{e.exports=["OHLC Values"]},15815:e=>{e.exports="One update per second"},90784:e=>{e.exports="October"},75991:e=>{e.exports="Open market status"},18429:e=>{e.exports="Learn more"},39899:e=>{e.exports="Move pane down"},70343:e=>{e.exports="Move pane up"},83085:e=>{e.exports="Mon"},61199:e=>{e.exports="Monday"},41610:e=>{e.exports="More"},1653:e=>{e.exports="Morning. Market is open for pre-market trading."},56470:e=>{e.exports="Maximize chart"},19603:e=>{e.exports="Maximize pane"},68327:e=>{e.exports="May"},35732:e=>{e.exports="Manage panes"},84675:e=>{e.exports="March"},83949:e=>{e.exports="Market open"},35701:e=>{e.exports="Market opens in {remainingTime}."},95814:e=>{e.exports="Market closed"},98105:e=>{e.exports="Market closes in {remainingTime}."},87202:e=>{e.exports="Market is currently on holiday. Lucky them."},71194:e=>{e.exports="November"},66324:e=>{e.exports="Source code"},36835:e=>{e.exports="Sat"},1144:e=>{ -e.exports="Saturday"},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports="September"},28705:e=>{e.exports="Show Indicator Legend"},51072:e=>{e.exports="Show Object Tree"},37809:e=>{e.exports="Show interval settings"},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports="Sun"},72149:e=>{e.exports="Sunday"},39339:e=>{e.exports="Symbol title"},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports="Paid plans feature faster data updates."},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports="Real-time data for {description} is not supported right now. We may support it in the future."},6667:e=>{e.exports="Real-time data for {symbolName} is provided by {exchange} exchange."},48293:e=>{e.exports="Restore chart"},91029:e=>{e.exports="Restore pane"},75094:e=>{e.exports="Wed"},7147:e=>{e.exports="Wednesday"},52984:e=>{e.exports="To get real-time data for {description}, please buy the real-time data package."},9787:e=>{e.exports="Thu"},7951:e=>{e.exports="Thursday"},57918:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges."},68025:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}."},73717:e=>{e.exports="This symbol doesn't exist, please pick another one."},57048:e=>{e.exports="Time for a walk — this market is closed."},94316:e=>{e.exports="Tue"},44979:e=>{e.exports="Tuesday"},8209:e=>{e.exports="Unflag Symbol"},1111:e=>{e.exports="Volume"},61311:e=>{e.exports=["Zoom In"]},47602:e=>{e.exports=["Zoom Out"]},57889:e=>{e.exports="change OHLC values visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},26717:e=>{e.exports="change symbol description visibility"},9455:e=>{e.exports="change volume values visibility"},39348:e=>{e.exports="less than 1 minute"},87358:e=>{e.exports="show {title}"},7827:e=>{e.exports="{days} and {hours}"},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports="{hours} and {minutes}"},1084:e=>{e.exports="{listedExchange} real-time data is available for free to registered users."},11155:e=>{e.exports="{symbolName} data is delayed by {time} minutes."},77033:e=>{e.exports="Data is updated once every {amount} second, even if there are more updates on the market."},2121:e=>{e.exports="Data on our Basic plan is updated once every {amount} second, even if there are more updates on the market."},5223:e=>{e.exports="One update every {amount} second"},58609:e=>{e.exports="{number} day"},24430:e=>{e.exports="{number} hour"},67151:e=>{e.exports="{number} minute"}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports="Could not get Pine source code."},39589:e=>{e.exports="Collapse pane"},38154:e=>{e.exports="Confirm Remove Study Tree"},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports="Create a free account"},69419:e=>{e.exports="All's well — Market is open."},97637:e=>{e.exports="April"},86797:e=>{e.exports="August"},22519:e=>{e.exports=["Bar Change Values"]},52003:e=>{e.exports="Do you really want to delete study and all of it's children?"},68854:e=>{e.exports="Double click"},97325:e=>{e.exports="Data error"},52916:e=>{e.exports="Data is updated once a day."},25978:e=>{e.exports="Data is updated once per second, even if there are more updates on the market."},57310:e=>{e.exports="Data is delayed"},49321:e=>{e.exports="Data on our Basic plan is updated once per second, even if there are more updates on the market."},55669:e=>{e.exports="December"},83498:e=>{e.exports="Delete pane"},59315:e=>{e.exports="End of day data"},82751:e=>{e.exports="Error"},40519:e=>{e.exports="Evening. Market is open for post-market trading."},80227:e=>{e.exports="Exchange timezone"},16467:e=>{e.exports="February"},25046:e=>{e.exports="Fill out Exchange Agreements"},93666:e=>{e.exports="Flag Symbol"},564:e=>{e.exports="Fri"},72970:e=>{e.exports="Friday"},88958:e=>{e.exports="Holiday"},21686:e=>{e.exports="Hide Indicator Legend"},26935:e=>{e.exports=["Indicator Arguments"]},26315:e=>{e.exports=["Indicator Titles"]},84098:e=>{e.exports=["Indicator Values"]},91459:e=>{e.exports="If you'd like {listedExchange} real-time data you'll need to complete an Exchange Agreement. Don't worry, it only takes a few clicks"},50634:e=>{e.exports="It'll go to post-market trading in {remainingTime}."},74537:e=>{e.exports="It'll open for pre-market trading in {remainingTime}."},26910:e=>{e.exports="January"},23230:e=>{e.exports="July"},49385:e=>{e.exports="June"},99487:e=>{e.exports=["OHLC Values"]},15815:e=>{e.exports="One update per second"},90784:e=>{e.exports="October"},75991:e=>{e.exports="Open market status"},18429:e=>{e.exports="Learn more"},39899:e=>{e.exports="Move pane down"},70343:e=>{e.exports="Move pane up"},83085:e=>{e.exports="Mon"},61199:e=>{e.exports="Monday"},41610:e=>{e.exports="More"},1653:e=>{e.exports="Morning. Market is open for pre-market trading."},56470:e=>{e.exports="Maximize chart"},19603:e=>{e.exports="Maximize pane"},68327:e=>{e.exports="May"},35732:e=>{e.exports="Manage panes"},84675:e=>{e.exports="March"},83949:e=>{e.exports="Market open"},35701:e=>{e.exports="Market opens in {remainingTime}."},95814:e=>{e.exports="Market closed"},98105:e=>{e.exports="Market closes in {remainingTime}."},87202:e=>{e.exports="Market is currently on holiday. Lucky them."},71194:e=>{e.exports="November"},66324:e=>{e.exports="Source code"},36835:e=>{e.exports="Sat"},1144:e=>{ +e.exports="Saturday"},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports="September"},28705:e=>{e.exports="Show Indicator Legend"},51072:e=>{e.exports="Show Object Tree"},37809:e=>{e.exports="Show interval settings"},39045:e=>{e.exports="Study Error"},86577:e=>{e.exports="Sun"},72149:e=>{e.exports="Sunday"},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports="Symbol title"},29985:e=>{e.exports="Post-market"},28412:e=>{e.exports="Paid plans feature faster data updates."},56042:e=>{e.exports="Pre-market"},36015:e=>{e.exports="Real-time data for {description} is not supported right now. We may support it in the future."},6667:e=>{e.exports="Real-time data for {symbolName} is provided by {exchange} exchange."},48293:e=>{e.exports="Restore chart"},91029:e=>{e.exports="Restore pane"},75094:e=>{e.exports="Wed"},7147:e=>{e.exports="Wednesday"},52984:e=>{e.exports="To get real-time data for {description}, please buy the real-time data package."},9787:e=>{e.exports="Thu"},7951:e=>{e.exports="Thursday"},57918:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from primary exchanges."},68025:e=>{e.exports="This data is real-time, but it’s slightly different to its official counterpart coming from {exchange}."},73717:e=>{e.exports="This symbol doesn't exist, please pick another one."},57048:e=>{e.exports="Time for a walk — this market is closed."},94316:e=>{e.exports="Tue"},44979:e=>{e.exports="Tuesday"},8209:e=>{e.exports="Unflag Symbol"},1111:e=>{e.exports="Volume"},61311:e=>{e.exports=["Zoom In"]},47602:e=>{e.exports=["Zoom Out"]},57889:e=>{e.exports="change OHLC values visibility"},18644:e=>{e.exports="change open market status visibility"},45110:e=>{e.exports="change bar change visibility"},31325:e=>{e.exports="change indicator titles visibility"},99774:e=>{e.exports="change indicator values visibility"},96162:e=>{e.exports="change indicator arguments visibility"},26717:e=>{e.exports="change symbol description visibility"},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports="change volume values visibility"},39348:e=>{e.exports="less than 1 minute"},87358:e=>{e.exports="show {title}"},7827:e=>{e.exports="{days} and {hours}"},7435:e=>{e.exports="{exchange} by {originalExchange}"},19830:e=>{e.exports="{hours} and {minutes}"},1084:e=>{e.exports="{listedExchange} real-time data is available for free to registered users."},11155:e=>{e.exports="{symbolName} data is delayed by {time} minutes."},77033:e=>{e.exports="Data is updated once every {amount} second, even if there are more updates on the market."},2121:e=>{e.exports="Data on our Basic plan is updated once every {amount} second, even if there are more updates on the market."},5223:e=>{e.exports="One update every {amount} second"},58609:e=>{e.exports="{number} day"},24430:e=>{e.exports="{number} hour"},67151:e=>{e.exports="{number} minute"}}]); \ No newline at end of file diff --git a/charting_library/bundles/ru.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/ru.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index cd59d380..00000000 --- a/charting_library/bundles/ru.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports=["бары"]},19648:e=>{e.exports=["12 часов"]},55838:e=>{e.exports=["24 часа"]},88364:e=>{e.exports=["Основной стиль графика"]},46720:e=>{e.exports=["Перекрестие"]},50985:e=>{e.exports=["Валюта"]},17319:e=>{e.exports=["Валюта и единица"]},19481:e=>{e.exports=["Оформление"]},68791:e=>{e.exports=["Аргументы"]},95036:e=>{e.exports=["Средняя цена закрытия"]},27331:e=>{e.exports=["Фон"]},22519:e=>{e.exports=["Значения изменения бара"]},87845:e=>{e.exports=["Кнопки"]},25209:e=>{e.exports=["Формат даты"]},55090:e=>{e.exports=["День недели на метках"]},29601:e=>{e.exports=["Описание"]},26897:e=>{e.exports=["События"]},95338:e=>{e.exports=["Гор. линии сетки"]},60971:e=>{e.exports=["Макс. и мин. цены"]},61142:e=>{e.exports=["Индикаторы"]},34905:e=>{e.exports=["Значения индикаторов"]},29687:e=>{e.exports=["Значения индикаторов и отчётности"]},25084:e=>{e.exports=["Названия индикаторов и отчётности"]},9654:e=>{e.exports=["Названия индикаторов"]},99487:e=>{e.exports=["Значения ОТКР-МАКС-МИН-ЗАКР"]},75991:e=>{e.exports=["Cтатус Рынок открыт"]},70500:e=>{e.exports=["Деньги"]},66653:e=>{e.exports=["Поля"]},42502:e=>{e.exports=["Не перекрывать"]},74343:e=>{e.exports=["Навигация"]},43115:e=>{e.exports=["Шкалы"]},53224:e=>{e.exports=["Расположение шкал"]},79194:e=>{e.exports=["Строка статуса"]},89053:e=>{e.exports=["Инструмент"]},35383:e=>{e.exports=["Имя инструмента"]},27767:e=>{e.exports=["Последнее значение символа"]},40847:e=>{e.exports=["Цена закрытия предыдущего дня"]},50446:e=>{e.exports=["Панель"]},73908:e=>{e.exports=["Разделители панелей"]},36014:e=>{e.exports=["Проценты"]},78621:e=>{e.exports=["Пипсы"]},74823:e=>{e.exports=["Цена пре-/постмаркета"]},64859:e=>{e.exports=["Ценовая шкала"]},76523:e=>{e.exports=["Цена и процентное значение"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Водяной знак"]},67369:e=>{e.exports=["Заголовок"]},31326:e=>{e.exports=["Заголовки"]},23097:e=>{e.exports=["Тикер"]},82168:e=>{e.exports=["Тикер и описание"]},43637:e=>{e.exports=["Временная шкала"]},97316:e=>{e.exports=["Формат времени"]},90801:e=>{e.exports=["Торговля"]},77534:e=>{e.exports=["Единица"]},1111:e=>{e.exports=["Объём"]},80170:e=>{e.exports=["Последнее значение в соответствии со шкалой"]},91322:e=>{e.exports=["Значения"]},70353:e=>{e.exports=["Верт. линии сетки"]},57889:e=>{e.exports=["изменение видимости значений ОТКР-МАКС-МИН-ЗАКР"]},35646:e=>{e.exports=["изменение видимости навигационных кнопок"]},18644:e=>{e.exports=["изменение видимости статуса: Рынок открыт"]},45110:e=>{e.exports=["изменение видимости значения изменения бара"]},10349:e=>{e.exports=["изменение отступа снизу"]},88161:e=>{e.exports=["изменение видимости меток единиц и валюты"]},79570:e=>{e.exports=["изменение видимости метки валюты"]},99011:e=>{e.exports=["изменение цвета фона графика"]},72458:e=>{e.exports=["изменение типа фона графика"]},37034:e=>{e.exports=["изменение толщины перекрестия"]},29951:e=>{e.exports=["изменение цвета перекрестия"]},92027:e=>{ -e.exports=["изменение стиля перекрестия"]},50457:e=>{e.exports=["изменение формата даты"]},7104:e=>{e.exports=["изменение дня недели на метках"]},88096:e=>{e.exports=["изменение цвета гориз. линий сетки"]},2523:e=>{e.exports=["изменение стиля гориз. линий сетки"]},31325:e=>{e.exports=["изменение видимости названий индикаторов"]},99774:e=>{e.exports=["изменение видимости значений индикаторов"]},96162:e=>{e.exports=["изменение видимости параметров индикаторов"]},59820:e=>{e.exports=["изменение видимости меток названий индикаторов и отчетности"]},90512:e=>{e.exports=["изменение видимости меток значений индикаторов и отчетности"]},97956:e=>{e.exports=["изменение прозрачности фона легенды"]},61061:e=>{e.exports=["изменение видимости фона легенды"]},37730:e=>{e.exports=["изменение видимости кнопок панели"]},89032:e=>{e.exports=["изменение цвета разделителей панелей"]},35636:e=>{e.exports=["изменение отступа справа"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["изменение цвета водяного знака инструмента"]},87159:e=>{e.exports=["изменение видимости водяного знака инструмента"]},26717:e=>{e.exports=["изменение видимости описания инструмента"]},28741:e=>{e.exports=["изменение режима последнего значения инструмента"]},95071:e=>{e.exports=["изменение формата легенды символа"]},35065:e=>{e.exports=["изменение цвета текста на шкалах"]},84382:e=>{e.exports=["изменение размера шрифта на шкалах"]},12468:e=>{e.exports=["изменение цвета линий шкал"]},71589:e=>{e.exports=["изменение видимости границ сессий"]},15035:e=>{e.exports=["изменение толщины границ сессий"]},1579:e=>{e.exports=["изменение цвета границ сессий"]},21460:e=>{e.exports=["изменение стиля границ сессий"]},76991:e=>{e.exports=["изменение формата времени"]},98905:e=>{e.exports=["изменение отступа сверху"]},7011:e=>{e.exports=["изменение видимости метки единицы"]},22722:e=>{e.exports=["изменение цвета верт. линий сетки"]},22867:e=>{e.exports=["изменение стиля верт. линий сетки"]},9455:e=>{e.exports=["изменение видимости значений объема"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ru.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/ru.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..0196440c --- /dev/null +++ b/charting_library/bundles/ru.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports=["бары"]},19648:e=>{e.exports=["12 часов"]},55838:e=>{e.exports=["24 часа"]},88364:e=>{e.exports=["Основной стиль графика"]},46720:e=>{e.exports=["Перекрестие"]},50985:e=>{e.exports=["Валюта"]},17319:e=>{e.exports=["Валюта и единица"]},19481:e=>{e.exports=["Оформление"]},68791:e=>{e.exports=["Аргументы"]},95036:e=>{e.exports=["Средняя цена закрытия"]},27331:e=>{e.exports=["Фон"]},22519:e=>{e.exports=["Значения изменения бара"]},87845:e=>{e.exports=["Кнопки"]},25209:e=>{e.exports=["Формат даты"]},55090:e=>{e.exports=["День недели на метках"]},29601:e=>{e.exports=["Описание"]},26897:e=>{e.exports=["События"]},95338:e=>{e.exports=["Гор. линии сетки"]},60971:e=>{e.exports=["Макс. и мин. цены"]},61142:e=>{e.exports=["Индикаторы"]},34905:e=>{e.exports=["Значения индикаторов"]},29687:e=>{e.exports=["Значения индикаторов и отчётности"]},25084:e=>{e.exports=["Названия индикаторов и отчётности"]},9654:e=>{e.exports=["Названия индикаторов"]},99487:e=>{e.exports=["Значения ОТКР-МАКС-МИН-ЗАКР"]},75991:e=>{e.exports=["Cтатус Рынок открыт"]},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports=["Деньги"]},66653:e=>{e.exports=["Поля"]},42502:e=>{e.exports=["Не перекрывать"]},74343:e=>{e.exports=["Навигация"]},43115:e=>{e.exports=["Шкалы"]},53224:e=>{e.exports=["Расположение шкал"]},79194:e=>{e.exports=["Строка статуса"]},89053:e=>{e.exports=["Инструмент"]},35383:e=>{e.exports=["Имя инструмента"]},27767:e=>{e.exports=["Последнее значение символа"]},40847:e=>{e.exports=["Цена закрытия предыдущего дня"]},50446:e=>{e.exports=["Панель"]},73908:e=>{e.exports=["Разделители панелей"]},36014:e=>{e.exports=["Проценты"]},78621:e=>{e.exports=["Пипсы"]},74823:e=>{e.exports=["Цена пре-/постмаркета"]},64859:e=>{e.exports=["Ценовая шкала"]},76523:e=>{e.exports=["Цена и процентное значение"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Водяной знак"]},67369:e=>{e.exports=["Заголовок"]},31326:e=>{e.exports=["Заголовки"]},23097:e=>{e.exports=["Тикер"]},82168:e=>{e.exports=["Тикер и описание"]},43637:e=>{e.exports=["Временная шкала"]},97316:e=>{e.exports=["Формат времени"]},90801:e=>{e.exports=["Торговля"]},77534:e=>{e.exports=["Единица"]},1111:e=>{e.exports=["Объём"]},80170:e=>{e.exports=["Последнее значение в соответствии со шкалой"]},91322:e=>{e.exports=["Значения"]},70353:e=>{e.exports=["Верт. линии сетки"]},57889:e=>{e.exports=["изменение видимости значений ОТКР-МАКС-МИН-ЗАКР"]},35646:e=>{e.exports=["изменение видимости навигационных кнопок"]},18644:e=>{e.exports=["изменение видимости статуса: Рынок открыт"]},45110:e=>{e.exports=["изменение видимости значения изменения бара"]},10349:e=>{e.exports=["изменение отступа снизу"]},88161:e=>{e.exports=["изменение видимости меток единиц и валюты"]},79570:e=>{e.exports=["изменение видимости метки валюты"]},99011:e=>{e.exports=["изменение цвета фона графика"]},72458:e=>{e.exports=["изменение типа фона графика"]},37034:e=>{e.exports=["изменение толщины перекрестия"]},29951:e=>{ +e.exports=["изменение цвета перекрестия"]},92027:e=>{e.exports=["изменение стиля перекрестия"]},50457:e=>{e.exports=["изменение формата даты"]},7104:e=>{e.exports=["изменение дня недели на метках"]},88096:e=>{e.exports=["изменение цвета гориз. линий сетки"]},2523:e=>{e.exports=["изменение стиля гориз. линий сетки"]},31325:e=>{e.exports=["изменение видимости названий индикаторов"]},99774:e=>{e.exports=["изменение видимости значений индикаторов"]},96162:e=>{e.exports=["изменение видимости параметров индикаторов"]},59820:e=>{e.exports=["изменение видимости меток названий индикаторов и отчетности"]},90512:e=>{e.exports=["изменение видимости меток значений индикаторов и отчетности"]},97956:e=>{e.exports=["изменение прозрачности фона легенды"]},61061:e=>{e.exports=["изменение видимости фона легенды"]},37730:e=>{e.exports=["изменение видимости кнопок панели"]},89032:e=>{e.exports=["изменение цвета разделителей панелей"]},35636:e=>{e.exports=["изменение отступа справа"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["изменение цвета водяного знака инструмента"]},87159:e=>{e.exports=["изменение видимости водяного знака инструмента"]},26717:e=>{e.exports=["изменение видимости описания инструмента"]},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports=["изменение режима последнего значения инструмента"]},95071:e=>{e.exports=["изменение формата легенды символа"]},35065:e=>{e.exports=["изменение цвета текста на шкалах"]},84382:e=>{e.exports=["изменение размера шрифта на шкалах"]},12468:e=>{e.exports=["изменение цвета линий шкал"]},71589:e=>{e.exports=["изменение видимости границ сессий"]},15035:e=>{e.exports=["изменение толщины границ сессий"]},1579:e=>{e.exports=["изменение цвета границ сессий"]},21460:e=>{e.exports=["изменение стиля границ сессий"]},76991:e=>{e.exports=["изменение формата времени"]},98905:e=>{e.exports=["изменение отступа сверху"]},7011:e=>{e.exports=["изменение видимости метки единицы"]},22722:e=>{e.exports=["изменение цвета верт. линий сетки"]},22867:e=>{e.exports=["изменение стиля верт. линий сетки"]},9455:e=>{e.exports=["изменение видимости значений объема"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ru.6847.490ee46270bef6a878dd.js b/charting_library/bundles/ru.6847.490ee46270bef6a878dd.js deleted file mode 100644 index ef0f9fbc..00000000 --- a/charting_library/bundles/ru.6847.490ee46270bef6a878dd.js +++ /dev/null @@ -1,3 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports=["Пт"]},11268:e=>{e.exports=["Пн"]},63331:e=>{e.exports=["Сб"]},85954:e=>{e.exports=["Вс"]},26230:e=>{e.exports=["Ср"]},24793:e=>{e.exports=["Чт"]},31533:e=>{e.exports=["Вт"]},89790:e=>{e.exports=["Не удалось получить исходный код Pine."]},39589:e=>{e.exports=["Свернуть панель"]},38154:e=>{e.exports=["Подтвердить удаление дерева индикаторов"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Создайте бесплатный профиль"]},69419:e=>{e.exports=["Всё в порядке — рынок открыт."]},97637:e=>{e.exports=["Апрель"]},86797:e=>{e.exports=["Август"]},22519:e=>{e.exports=["Значения изменения бара"]},52003:e=>{e.exports=["Вы действительно хотите удалить этот индикатор и все связанные с ним расчёты?"]},68854:e=>{e.exports=["Двойное нажатие"]},97325:e=>{e.exports=["Проблема с данными"]},52916:e=>{e.exports=["Данные обновляются один раз в день."]},25978:e=>{e.exports=["Данные обновляются один раз в секунду, даже если обновлений на рынке было больше."]},57310:e=>{e.exports=["Данные c задержкой"]},49321:e=>{e.exports=["Данные, предоставляемые с подпиской Basic, обновляются один раз в секунду, даже если обновлений на рынке было больше."]},55669:e=>{e.exports=["Декабрь"]},83498:e=>{e.exports=["Удалить панель"]},59315:e=>{e.exports=["Обновление раз в день"]},82751:e=>{e.exports=["Ошибка"]},40519:e=>{e.exports=["Сейчас вечер. Рынок открыт для торговли в вечернюю сессию."]},80227:e=>{e.exports=["Часовой пояс биржи"]},16467:e=>{e.exports=["Февраль"]},25046:e=>{e.exports=["Заполнить биржевые соглашения"]},93666:e=>{e.exports=["Отметить символ"]},564:e=>{e.exports=["Пт"]},72970:e=>{e.exports=["Пятница"]},88958:e=>{e.exports=["Выходной день"]},21686:e=>{e.exports=["Скрыть информацию об индикаторах"]},26935:e=>{e.exports=["Параметры индикатора"]},26315:e=>{e.exports=["Названия индикаторов"]},84098:e=>{e.exports=["Значения индикатора"]},91459:e=>{e.exports=["Если вам нужны данные в реальном времени для {listedExchange}, то заполните биржевое соглашение. Не беспокойтесь, это можно сделать в несколько кликов"]},50634:e=>{e.exports=["Вечерняя сессия начнется через {remainingTime}."]},74537:e=>{e.exports=["Предторговый период начнется через {remainingTime}."]},26910:e=>{e.exports=["Январь"]},23230:e=>{e.exports=["Июль"]},49385:e=>{e.exports=["Июнь"]},99487:e=>{e.exports=["Значения ОТКР-МАКС-МИН-ЗАКР"]},15815:e=>{e.exports=["Обновляются раз в секунду"]},90784:e=>{e.exports=["Октябрь"]},75991:e=>{e.exports=["Cтатус Рынок открыт"]},18429:e=>{e.exports=["Узнать больше"]},39899:e=>{e.exports=["Переместить вниз"]},70343:e=>{e.exports=["Переместить вверх"]},83085:e=>{e.exports=["Пн"]},61199:e=>{e.exports=["Понедельник"]},41610:e=>{e.exports=["Ещё"]},1653:e=>{e.exports=["Сейчас утро. Рынок открыт для торговли в предторговый период."]},56470:e=>{e.exports=["Развернуть график"]},19603:e=>{e.exports=["Развернуть панель"]},68327:e=>{e.exports=["Май"]},35732:e=>{e.exports=["Настройки панели"]},84675:e=>{e.exports=["Март"]},83949:e=>{e.exports=["Рынок открыт"]}, -35701:e=>{e.exports=["Рынок открывается через {remainingTime}."]},95814:e=>{e.exports=["Рынок закрыт"]},98105:e=>{e.exports=["Рынок закрывается через {remainingTime}."]},87202:e=>{e.exports=["На рынке сегодня праздничный день. Повезло им."]},71194:e=>{e.exports=["Ноябрь"]},66324:e=>{e.exports=["Исходный код"]},36835:e=>{e.exports=["Сб"]},1144:e=>{e.exports=["Суббота"]},40653:e=>{e.exports=["Прокрутить влево"]},26721:e=>{e.exports=["Прокрутить до текущего бара"]},35809:e=>{e.exports=["Прокрутить вправо"]},61132:e=>{e.exports=["Сентябрь"]},28705:e=>{e.exports=["Показать информацию об индикаторах"]},51072:e=>{e.exports=["Показать дерево объектов"]},37809:e=>{e.exports=["Показывать настройки интервала"]},39045:e=>{e.exports=["Ошибка индикатора или стратегии"]},86577:e=>{e.exports=["Вс"]},72149:e=>{e.exports=["Воскресенье"]},39339:e=>{e.exports=["Имя инструмента"]},29985:e=>{e.exports=["Вечерняя торговая сессия"]},28412:e=>{e.exports=["В платные подписки включено более частое обновление данных."]},56042:e=>{e.exports=["Предторговый период"]},36015:e=>{e.exports=["Данные в реальном времени для {description} не поддерживаются на данный момент. Они могут быть доступны в будущем."]},6667:e=>{e.exports=["Данные в реальном времени для {symbolName} предоставлены биржей {exchange}."]},48293:e=>{e.exports=["Восстановить график"]},91029:e=>{e.exports=["Восстановить панель"]},75094:e=>{e.exports=["Ср"]},7147:e=>{e.exports=["Среда"]},52984:e=>{e.exports=["Чтобы получать данные в реальном времени для {description}, вам нужно купить подписку на данные в реальном времени."]},9787:e=>{e.exports=["Чт"]},7951:e=>{e.exports=["Четверг"]},57918:e=>{e.exports=['Данные обновляются в реальном времени, но они немного отличаются от аналогичных "официальных" данных от основных бирж.']},68025:e=>{e.exports=['Данные обновляются в реальном времени, но они немного отличаются от аналогичных "официальных" данных от {exchange}.']},73717:e=>{e.exports=["Этот символ не существует, пожалуйста, выберите другой."]},57048:e=>{e.exports=["Можно прогуляться — этот рынок сейчас закрыт."]},94316:e=>{e.exports=["Вт"]},44979:e=>{e.exports=["Вторник"]},8209:e=>{e.exports=["Снять отметку с символа"]},1111:e=>{e.exports=["Объём"]},61311:e=>{e.exports=["Увеличить масштаб"]},47602:e=>{e.exports=["Уменьшить масштаб"]},57889:e=>{e.exports=["изменение видимости значений ОТКР-МАКС-МИН-ЗАКР"]},18644:e=>{e.exports=["изменение видимости статуса: Рынок открыт"]},45110:e=>{e.exports=["изменение видимости значения изменения бара"]},31325:e=>{e.exports=["изменение видимости названий индикаторов"]},99774:e=>{e.exports=["изменение видимости значений индикаторов"]},96162:e=>{e.exports=["изменение видимости параметров индикаторов"]},26717:e=>{e.exports=["изменение видимости описания инструмента"]},9455:e=>{e.exports=["изменение видимости значений объема"]},39348:e=>{e.exports=["меньше минуты"]},87358:e=>{e.exports=["отображение: {title}"]},7827:e=>{e.exports=["{days} и {hours}"]},7435:e=>{e.exports=["{exchange} от {originalExchange}"]},19830:e=>{e.exports=["{hours} и {minutes}"]}, -1084:e=>{e.exports=["Данные в реальном времени для {listedExchange} доступны бесплатно для зарегистрированных пользователей."]},11155:e=>{e.exports=["{symbolName} данные с задержкой на {time} минут."]},77033:e=>{e.exports=["Данные обновляются один раз в {amount} секунду, даже если событий на рынке было больше.","Данные обновляются один раз в {amount} секунды, даже если событий на рынке было больше.","Данные обновляются один раз в {amount} секунд, даже если событий на рынке было больше.","Данные обновляются один раз в {amount} секунд, даже если событий на рынке было больше."]},2121:e=>{e.exports=["Данные, предоставляемые с подпиской Basic, обновляются один раз в {amount} секунду, даже если событий на рынке было больше.","Данные, предоставляемые с подпиской Basic, обновляются один раз в {amount} секунды, даже если событий на рынке было больше.","Данные, предоставляемые с подпиской Basic, обновляются один раз в {amount} секунд, даже если событий на рынке было больше.","Данные, предоставляемые с подпиской Basic, обновляются один раз в {amount} секунд, даже если событий на рынке было больше."]},5223:e=>{e.exports=["Данные обновляются один раз в {amount} секунду","Данные обновляются один раз в {amount} секунды","Данные обновляются один раз в {amount} секунд","Данные обновляются один раз в {amount} секунд"]},58609:e=>{e.exports=["{number} день","{number} дня","{number} дней","{number} дней"]},24430:e=>{e.exports=["{number} час","{number} часа","{number} часов","{number} часов"]},67151:e=>{e.exports=["{number} минута","{number} минуты","{number} минут","{number} минут"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/ru.7257.089fbbc28bead9558b87.js b/charting_library/bundles/ru.7257.089fbbc28bead9558b87.js new file mode 100644 index 00000000..91bfba81 --- /dev/null +++ b/charting_library/bundles/ru.7257.089fbbc28bead9558b87.js @@ -0,0 +1,3 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports=["Пт"]},11268:e=>{e.exports=["Пн"]},63331:e=>{e.exports=["Сб"]},85954:e=>{e.exports=["Вс"]},26230:e=>{e.exports=["Ср"]},24793:e=>{e.exports=["Чт"]},31533:e=>{e.exports=["Вт"]},89790:e=>{e.exports=["Не удалось получить исходный код Pine."]},39589:e=>{e.exports=["Свернуть панель"]},38154:e=>{e.exports=["Подтвердить удаление дерева индикаторов"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Создайте бесплатный профиль"]},69419:e=>{e.exports=["Всё в порядке — рынок открыт."]},97637:e=>{e.exports=["Апрель"]},86797:e=>{e.exports=["Август"]},22519:e=>{e.exports=["Значения изменения бара"]},52003:e=>{e.exports=["Вы действительно хотите удалить этот индикатор и все связанные с ним расчёты?"]},68854:e=>{e.exports=["Двойное нажатие"]},97325:e=>{e.exports=["Проблема с данными"]},52916:e=>{e.exports=["Данные обновляются один раз в день."]},25978:e=>{e.exports=["Данные обновляются один раз в секунду, даже если обновлений на рынке было больше."]},57310:e=>{e.exports=["Данные c задержкой"]},49321:e=>{e.exports=["Данные, предоставляемые с подпиской Basic, обновляются один раз в секунду, даже если обновлений на рынке было больше."]},55669:e=>{e.exports=["Декабрь"]},83498:e=>{e.exports=["Удалить панель"]},59315:e=>{e.exports=["Обновление раз в день"]},82751:e=>{e.exports=["Ошибка"]},40519:e=>{e.exports=["Сейчас вечер. Рынок открыт для торговли в вечернюю сессию."]},80227:e=>{e.exports=["Часовой пояс биржи"]},16467:e=>{e.exports=["Февраль"]},25046:e=>{e.exports=["Заполнить биржевые соглашения"]},93666:e=>{e.exports=["Отметить символ"]},564:e=>{e.exports=["Пт"]},72970:e=>{e.exports=["Пятница"]},88958:e=>{e.exports=["Выходной день"]},21686:e=>{e.exports=["Скрыть информацию об индикаторах"]},26935:e=>{e.exports=["Параметры индикатора"]},26315:e=>{e.exports=["Названия индикаторов"]},84098:e=>{e.exports=["Значения индикатора"]},91459:e=>{e.exports=["Если вам нужны данные в реальном времени для {listedExchange}, то заполните биржевое соглашение. Не беспокойтесь, это можно сделать в несколько кликов"]},50634:e=>{e.exports=["Вечерняя сессия начнется через {remainingTime}."]},74537:e=>{e.exports=["Предторговый период начнется через {remainingTime}."]},26910:e=>{e.exports=["Январь"]},23230:e=>{e.exports=["Июль"]},49385:e=>{e.exports=["Июнь"]},99487:e=>{e.exports=["Значения ОТКР-МАКС-МИН-ЗАКР"]},15815:e=>{e.exports=["Обновляются раз в секунду"]},90784:e=>{e.exports=["Октябрь"]},75991:e=>{e.exports=["Cтатус Рынок открыт"]},18429:e=>{e.exports=["Узнать больше"]},39899:e=>{e.exports=["Переместить вниз"]},70343:e=>{e.exports=["Переместить вверх"]},83085:e=>{e.exports=["Пн"]},61199:e=>{e.exports=["Понедельник"]},41610:e=>{e.exports=["Ещё"]},1653:e=>{e.exports=["Сейчас утро. Рынок открыт для торговли в предторговый период."]},56470:e=>{e.exports=["Развернуть график"]},19603:e=>{e.exports=["Развернуть панель"]},68327:e=>{e.exports=["Май"]},35732:e=>{e.exports=["Настройки панели"]},84675:e=>{e.exports=["Март"]},83949:e=>{e.exports=["Рынок открыт"]}, +35701:e=>{e.exports=["Рынок открывается через {remainingTime}."]},95814:e=>{e.exports=["Рынок закрыт"]},98105:e=>{e.exports=["Рынок закрывается через {remainingTime}."]},87202:e=>{e.exports=["На рынке сегодня праздничный день. Повезло им."]},71194:e=>{e.exports=["Ноябрь"]},66324:e=>{e.exports=["Исходный код"]},36835:e=>{e.exports=["Сб"]},1144:e=>{e.exports=["Суббота"]},40653:e=>{e.exports=["Прокрутить влево"]},26721:e=>{e.exports=["Прокрутить до текущего бара"]},35809:e=>{e.exports=["Прокрутить вправо"]},61132:e=>{e.exports=["Сентябрь"]},28705:e=>{e.exports=["Показать информацию об индикаторах"]},51072:e=>{e.exports=["Показать дерево объектов"]},37809:e=>{e.exports=["Показывать настройки интервала"]},39045:e=>{e.exports=["Ошибка индикатора или стратегии"]},86577:e=>{e.exports=["Вс"]},72149:e=>{e.exports=["Воскресенье"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["Имя инструмента"]},29985:e=>{e.exports=["Вечерняя торговая сессия"]},28412:e=>{e.exports=["В платные подписки включено более частое обновление данных."]},56042:e=>{e.exports=["Предторговый период"]},36015:e=>{e.exports=["Данные в реальном времени для {description} не поддерживаются на данный момент. Они могут быть доступны в будущем."]},6667:e=>{e.exports=["Данные в реальном времени для {symbolName} предоставлены биржей {exchange}."]},48293:e=>{e.exports=["Восстановить график"]},91029:e=>{e.exports=["Восстановить панель"]},75094:e=>{e.exports=["Ср"]},7147:e=>{e.exports=["Среда"]},52984:e=>{e.exports=["Чтобы получать данные в реальном времени для {description}, вам нужно купить подписку на данные в реальном времени."]},9787:e=>{e.exports=["Чт"]},7951:e=>{e.exports=["Четверг"]},57918:e=>{e.exports=['Данные обновляются в реальном времени, но они немного отличаются от аналогичных "официальных" данных от основных бирж.']},68025:e=>{e.exports=['Данные обновляются в реальном времени, но они немного отличаются от аналогичных "официальных" данных от {exchange}.']},73717:e=>{e.exports=["Этот символ не существует, пожалуйста, выберите другой."]},57048:e=>{e.exports=["Можно прогуляться — этот рынок сейчас закрыт."]},94316:e=>{e.exports=["Вт"]},44979:e=>{e.exports=["Вторник"]},8209:e=>{e.exports=["Снять отметку с символа"]},1111:e=>{e.exports=["Объём"]},61311:e=>{e.exports=["Увеличить масштаб"]},47602:e=>{e.exports=["Уменьшить масштаб"]},57889:e=>{e.exports=["изменение видимости значений ОТКР-МАКС-МИН-ЗАКР"]},18644:e=>{e.exports=["изменение видимости статуса: Рынок открыт"]},45110:e=>{e.exports=["изменение видимости значения изменения бара"]},31325:e=>{e.exports=["изменение видимости названий индикаторов"]},99774:e=>{e.exports=["изменение видимости значений индикаторов"]},96162:e=>{e.exports=["изменение видимости параметров индикаторов"]},26717:e=>{e.exports=["изменение видимости описания инструмента"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["изменение видимости значений объема"]},39348:e=>{e.exports=["меньше минуты"]},87358:e=>{e.exports=["отображение: {title}"]},7827:e=>{e.exports=["{days} и {hours}"]},7435:e=>{ +e.exports=["{exchange} от {originalExchange}"]},19830:e=>{e.exports=["{hours} и {minutes}"]},1084:e=>{e.exports=["Данные в реальном времени для {listedExchange} доступны бесплатно для зарегистрированных пользователей."]},11155:e=>{e.exports=["{symbolName} данные с задержкой на {time} минут."]},77033:e=>{e.exports=["Данные обновляются один раз в {amount} секунду, даже если событий на рынке было больше.","Данные обновляются один раз в {amount} секунды, даже если событий на рынке было больше.","Данные обновляются один раз в {amount} секунд, даже если событий на рынке было больше.","Данные обновляются один раз в {amount} секунд, даже если событий на рынке было больше."]},2121:e=>{e.exports=["Данные, предоставляемые с подпиской Basic, обновляются один раз в {amount} секунду, даже если событий на рынке было больше.","Данные, предоставляемые с подпиской Basic, обновляются один раз в {amount} секунды, даже если событий на рынке было больше.","Данные, предоставляемые с подпиской Basic, обновляются один раз в {amount} секунд, даже если событий на рынке было больше.","Данные, предоставляемые с подпиской Basic, обновляются один раз в {amount} секунд, даже если событий на рынке было больше."]},5223:e=>{e.exports=["Данные обновляются один раз в {amount} секунду","Данные обновляются один раз в {amount} секунды","Данные обновляются один раз в {amount} секунд","Данные обновляются один раз в {amount} секунд"]},58609:e=>{e.exports=["{number} день","{number} дня","{number} дней","{number} дней"]},24430:e=>{e.exports=["{number} час","{number} часа","{number} часов","{number} часов"]},67151:e=>{e.exports=["{number} минута","{number} минуты","{number} минут","{number} минут"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/runtime.e08bdddf2e5e3f42ece6.js b/charting_library/bundles/runtime.dabbddb8e0cf198a3951.js similarity index 95% rename from charting_library/bundles/runtime.e08bdddf2e5e3f42ece6.js rename to charting_library/bundles/runtime.dabbddb8e0cf198a3951.js index f6a0f41e..6d0c92d2 100644 --- a/charting_library/bundles/runtime.e08bdddf2e5e3f42ece6.js +++ b/charting_library/bundles/runtime.dabbddb8e0cf198a3951.js @@ -1,5 +1,5 @@ -(()=>{"use strict";var e,a,c,d,f,t={},b={};function r(e){var a=b[e];if(void 0!==a)return a.exports;var c=b[e]={id:e,loaded:!1,exports:{}};return t[e].call(c.exports,c,c.exports,r),c.loaded=!0,c.exports}r.m=t,r.c=b,e=[],r.O=(a,c,d,f)=>{if(!c){var t=1/0;for(i=0;i=f)&&Object.keys(r.O).every((e=>r.O[e](c[o])))?c.splice(o--,1):(b=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[c,d,f]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var f=Object.create(null);r.r(f);var t={};a=a||[null,c({}),c([]),c(c)];for(var b=2&d&&e;"object"==typeof b&&!~a.indexOf(b);b=c(b))Object.getOwnPropertyNames(b).forEach((a=>t[a]=()=>e[a]));return t.default=()=>e,r.d(f,t),f},r.d=(e,a)=>{for(var c in a)r.o(a,c)&&!r.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,c)=>(r.f[c](e,a),a)),[])),r.u=e=>5652===e?"__LANG__.5652.e8bf228a6da07385f3cd.js":2468===e?"__LANG__.2468.4338de5955cc8d3cb66d.js":4782===e?"__LANG__.4782.b54749a80d1b22661ce2.js":6848===e?"__LANG__.6848.1833cd09ce56c0318402.js":6803===e?"__LANG__.6803.be8cafcc34e317edec88.js":1626===e?"__LANG__.1626.e17efbef59ce9b4bc834.js":6682===e?"__LANG__.6682.fc6d6d5a6889089c265c.js":4800===e?"__LANG__.4800.b83a96f0775e7b691faa.js":6847===e?"__LANG__.6847.490ee46270bef6a878dd.js":4150===e?"__LANG__.4150.61de76c7f578feeb03b8.js":8087===e?"__LANG__.8087.02a950e0b171d1520043.js":({92:"chart-screenshot-hint",139:"get-error-card",507:"study-pane-views",607:"study-property-pages-with-definitions",731:"add-compare-dialog",1583:"lt-pane-views",1584:"context-menu-renderer",1702:"manage-drawings-dialog",1754:"symbol-search-dialog",1859:"go-to-date-dialog-impl",1890:"line-tools-icons",2077:"change-interval-dialog",2183:"study-inputs-pane-views",2306:"floating-toolbars",2377:"hammerjs",2616:"svg-renderer",2704:"currency-label-menu",2878:"drawing-toolbar",3005:"header-toolbar",3030:"new-confirm-inputs-dialog",3596:"general-property-page",4013:"custom-intervals-add-dialog",4079:"series-pane-views",4389:"take-chart-image-impl",4665:"share-chart-to-social-utils",4862:"object-tree-dialog",5009:"load-chart-dialog",5093:"chart-widget-gui",5516:"restricted-toolset",5551:"favorite-drawings-api",6166:"chart-event-hint",6265:"new-edit-object-dialog",6456:"study-market",6631:"study-template-dialog",6780:"source-properties-editor",7078:"general-chart-properties-dialog",7260:"chart-bottom-toolbar",7271:"compare-model",7648:"show-theme-save-dialog",7987:"lt-icons-atlas",8020:"user-defined-bars-marks-tooltip",8537:"lt-property-pages-with-definitions",8643:"full-tooltips-popup",8890:"simple-dialog",9039:"lollipop-tooltip-renderer",9374:"symbol-info-dialog-impl", -9498:"export-data",9685:"series-icons-map"}[e]||e)+"."+{92:"313b0b47e4c76ba21a62",105:"85874ab839d32a8a7c70",139:"ea6360a95cdae7dad70f",140:"c698f8c0979e0aa76e73",240:"92480a47078a540a8a03",346:"76334afce982f8384be4",507:"8e4a9692b00afacda22d",535:"74d9bc0e51d0ad585990",537:"76ee48ffd2cc878e82ae",607:"0c619cfdb68ef43fdb67",731:"edd0f8d5d2491a1d1c06",892:"ac3eeb47e69ab8ff8ac7",962:"e2eb6a85de39a3d76e5d",1033:"bb804c64fe58de0bace7",1075:"1c913af3f0b8358a4d09",1140:"530d2fbf19217c6c2837",1271:"87cc24463b0ab368ff24",1416:"87239bba7a5772e2e600",1428:"4db8f95385076af2ebe2",1528:"9cdf3baeece30724e816",1553:"c076714f5e24887f0b94",1583:"659b8e5645df4b33847d",1584:"45f14d00e0059c52ee00",1685:"838d129505966759899c",1702:"35e2e7bf6e31f5598ae4",1754:"318dd6851c75d04282d4",1830:"d1c5f4191fdcdbf7b350",1859:"473a3b561104e5c3d51f",1890:"f41aaa48b2150958e27c",1960:"8ebd2403c6732e36d3bb",2077:"c471fd455cbea7147266",2140:"5564abccc94437be80a9",2158:"4b603780e909661194b1",2182:"e89f57afaf29667aec87",2183:"45f89fd8e14c3fbea0d7",2215:"e87235d359e4c375c7b9",2306:"91bb0faa913751e75714",2377:"6e30e0c48af40bf2f6c0",2397:"b12d74441412d9602243",2616:"20f83194edf7431f951e",2685:"c1a906d8819deb9b5ca4",2704:"2815415ec54984e7a75c",2754:"617c76909eb4b2b7f861",2804:"51df698f3652fc234339",2842:"61ec1448858319f48d5a",2878:"7f226c0314e0a6d13a77",2913:"8db22dab61beccd65338",3005:"d4a8df2c27395bb909ac",3016:"534185c97bcc73193183",3030:"15afcdcee91654fbb6d7",3046:"620828ac31103f5257d0",3200:"da649f495aae3ade4977",3261:"d557899efcd7e4276746",3562:"1a11925dc658611c08ed",3578:"972a3bea2327d8adc96b",3596:"22ecdfa32d18165d6800",3626:"626757ec98cee6b4ccdb",3687:"60cdd7c35ed91e8ff15c",3795:"f7338c3d409d1ba72117",3988:"5a425dfbe11985aa0fb7",4013:"cd4f3ce7f332bef49355",4062:"ef79254d1273624a61fe",4079:"8a869c79235246b14f50",4147:"5e81c46177f5963f61bd",4369:"81ecb47c4af1b9de72fa",4389:"273732dacb23911fb5c7",4412:"b2890fa257fb53a16249",4450:"71a13a69c033ad5110aa",4665:"d0d8c434b737debe6dd6",4785:"3d5f5dd0e8226a08f4b1",4819:"3a61ed5890e6fa29c91e",4862:"ceb623c9061579ef4afa",4884:"5bb05ba58fdd28f9b5da",5009:"a3210be66957f59f90ce",5020:"b9af824a0a7e5e020d9b",5093:"fa57ee9476d112fd631e",5100:"ce3f026abe4f758bfc67",5384:"3dc3207fa2eabbc2a630",5516:"292f68f628b81c513fdc",5551:"ebdaba98fd7e4f0a9c1d",5639:"09442c72990cfe1eee09",5729:"7c2985725216bfa75c30",5747:"53cf5258c22b561b8dac",5761:"7cafd7b3fe32b50091c7",5890:"86bca7644e9b4742cfc0",5916:"2c61b4317a248eb7a089",6092:"54c2d754de303c9b7c8a",6166:"0ca3adae43eea16801cf",6265:"d3927b935fd414fbe5ee",6304:"7cb3ed0e3be488d1c8cc",6456:"bc7f3b05f94ea2ddbb50",6631:"a3c9e3bef9359e4ab092",6780:"b847fde494a538aa4b2f",6812:"8859133de433354e78db",6879:"5e54654d836077075405",7078:"efb2c0f56f646a659b5e",7177:"24fd4fdf27847261104f",7260:"fa391f32d66e5615a75e",7263:"f352f6d262009a8bb227",7271:"6458a853f4c2c658810e",7342:"6817554120c91fc72713",7507:"eec4c33278ede4ff77aa",7624:"2fec070ad8eb57fc72aa",7648:"24c0661ddf7f0b31089c",7695:"12e5d268652a1c17d1d3",7895:"6745fb102d98150c4426",7920:"e0aa14628406fdd9aa39",7987:"e989af9bf8cf9856ff25", -7989:"c8b3bf0c012e67260f47",8009:"fced7dbff98ff0282061",8020:"bb7109c0dd0c814114f0",8049:"eb5d0cfe52ecca5d4a13",8110:"f1e1b764c4f798416c97",8180:"640f9faeb3f5f9fa190f",8230:"4f8002f852c9259f2469",8251:"233bde7b9dbc42454f05",8271:"ac057a0f1d09d0520f9c",8483:"abe3ea54e13546b167af",8494:"143450f7c00be27369b3",8537:"eafc283dde13edc363ab",8619:"ca45b77c88569b91c04c",8622:"e7572c9eef1d02164f46",8643:"c4d76612cc0c730a7389",8707:"6f43254d31fccaa6165b",8819:"e3ef6f9f028524561c02",8825:"b6acc714d8c2208ce81d",8887:"5fa45d75b8eeb4bdead8",8890:"5dd31d8783a4794959a0",8955:"bafc3cf104daf05f1298",9039:"a3d3a335db14444e4890",9050:"f4820dabd96059521d2c",9230:"eb70b4621f18a82dd739",9262:"da35e5943f851a3e49f4",9333:"aa89d1acb624d48d0e25",9374:"f8ffbbd0e68800ec13af",9415:"5fa19f422ac378f0cac9",9498:"6abc81bd1f7ccefc360a",9519:"2141b98224d9a2c0391a",9685:"43449af05ef22dfd0e5b",9776:"40b8cf612c827a83ffac",9908:"33de634c55f5a8edf1f5"}[e]+".js",r.miniCssF=e=>e+"."+{105:"104b2f6f9b0648dec9bf",140:"c417fa2d4e2b597fd2e3",240:"593f7d3c53306cf0999b",346:"6fa4b7609b1ee60b9fb5",537:"727e7a8061aba6353cce",1033:"dea80f470e3a5dc32a99",1140:"9be2612a2846a641de60",1271:"e73cc4ab8811551cb45c",1416:"6c0ade7cf2b94bcf389f",1428:"41a7517d6c141851eae2",1528:"5a2e936d44d63a48a319",1685:"eced2d2ad306de76de93",1830:"3d15be044bd7454440f3",1960:"cd6136275cf3692b2266",2140:"93a097540409472a6ad2",2397:"b9ff782e9526b4bffdd5",2685:"e8f70c0201a60bff4a47",2754:"46c79b8e0e2bc98e902a",2913:"843022c70197263550f1",3046:"de47c70192f405571439",3200:"d157ce6579f91f2f5451",3261:"fe3d72da3000b9dbf293",3562:"7453d38d0f6e1f0e1a49",3578:"4df13838b20232303215",3626:"ef3204dc35e71442a34a",3687:"9ffb6026c275aa140253",3795:"6c74ef9929e63857d37b",4147:"19673911190824b00786",4369:"6857708113ce1c4a7366",4412:"8d4e1fafa391b5384b61",4450:"a48b4a4cfbe6f6242b22",4819:"7e5dabc76f3e263cb701",4884:"5b077a3cf794b5066e78",5020:"b567a8a918688a78eefe",5100:"cde5d07bb6ed8d0a8328",5384:"3532ec81f09f0141e063",5639:"9e2022f70344965799f4",5729:"cadde5f41c8c665ff811",5761:"5db6f6616a2be01d5134",5916:"ab1c13c6b34fbbeefca4",6092:"a16d5261d5e9f1e1a7e1",6304:"596786a2b899ca328639",6812:"e4cb798c8384903bd813",6879:"be7ca80c11bcfdfe07be",7177:"ef0a796f40d1c904a10c",7263:"33a0f5a8d0ecca3d6e24",7342:"627086d22455386a2362",7507:"15b05cc8ed1b2cbfc54d",7624:"85a46f1fadf76e279382",7695:"45a1554b55fcf2a2ed5a",7895:"289d3858a8027e0fe15d",7920:"367547efd90fe510d37e",7989:"5cffc6b68a106434f7c8",8009:"1b77a042c86ea9603545",8049:"0ee06a219c0b23490584",8110:"37ff9a45c0ecfd622003",8230:"fbb750fd312778403036",8251:"63e0709659f930aeabbf",8271:"4f5f0c715d1210b60de8",8619:"30c312c31b435f209065",8707:"82dca75e9f28e0c0ffda",8819:"3b1eafc3afb1e3b37d09",8825:"93e4bb012e7e3630302e",8887:"0779d4b1159318c66688",8955:"3b79457016de928c90de",9230:"cf0c009c4a14731a6723",9262:"ecc84aaa9d0bd39ee899",9333:"cd2a3f2212d4663f2c0a",9415:"46497a002c7a98a2f3fa",9519:"9380073fab73395bfea9",9776:"f3f7d85b8d83d2c36ae0",9908:"99b4c96fbed415f14f94"}[e]+".css",r.g=function(){if("object"==typeof globalThis)return globalThis;try{ +(()=>{"use strict";var e,a,c,d,f,t={},b={};function r(e){var a=b[e];if(void 0!==a)return a.exports;var c=b[e]={id:e,loaded:!1,exports:{}};return t[e].call(c.exports,c,c.exports,r),c.loaded=!0,c.exports}r.m=t,r.c=b,e=[],r.O=(a,c,d,f)=>{if(!c){var t=1/0;for(i=0;i=f)&&Object.keys(r.O).every((e=>r.O[e](c[o])))?c.splice(o--,1):(b=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[c,d,f]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var f=Object.create(null);r.r(f);var t={};a=a||[null,c({}),c([]),c(c)];for(var b=2&d&&e;"object"==typeof b&&!~a.indexOf(b);b=c(b))Object.getOwnPropertyNames(b).forEach((a=>t[a]=()=>e[a]));return t.default=()=>e,r.d(f,t),f},r.d=(e,a)=>{for(var c in a)r.o(a,c)&&!r.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,c)=>(r.f[c](e,a),a)),[])),r.u=e=>5652===e?"__LANG__.5652.e8bf228a6da07385f3cd.js":2468===e?"__LANG__.2468.4338de5955cc8d3cb66d.js":4782===e?"__LANG__.4782.b54749a80d1b22661ce2.js":6848===e?"__LANG__.6848.1833cd09ce56c0318402.js":6803===e?"__LANG__.6803.be8cafcc34e317edec88.js":6444===e?"__LANG__.6444.4dd7c5a260f1ab2f3d47.js":6682===e?"__LANG__.6682.fc6d6d5a6889089c265c.js":4800===e?"__LANG__.4800.b83a96f0775e7b691faa.js":7257===e?"__LANG__.7257.089fbbc28bead9558b87.js":4150===e?"__LANG__.4150.61de76c7f578feeb03b8.js":8087===e?"__LANG__.8087.02a950e0b171d1520043.js":({92:"chart-screenshot-hint",139:"get-error-card",507:"study-pane-views",607:"study-property-pages-with-definitions",731:"add-compare-dialog",1583:"lt-pane-views",1584:"context-menu-renderer",1702:"manage-drawings-dialog",1754:"symbol-search-dialog",1859:"go-to-date-dialog-impl",1890:"line-tools-icons",2077:"change-interval-dialog",2183:"study-inputs-pane-views",2306:"floating-toolbars",2377:"hammerjs",2616:"svg-renderer",2704:"currency-label-menu",2878:"drawing-toolbar",3005:"header-toolbar",3030:"new-confirm-inputs-dialog",3596:"general-property-page",4013:"custom-intervals-add-dialog",4079:"series-pane-views",4389:"take-chart-image-impl",4665:"share-chart-to-social-utils",4862:"object-tree-dialog",5009:"load-chart-dialog",5093:"chart-widget-gui",5516:"restricted-toolset",5551:"favorite-drawings-api",6166:"chart-event-hint",6265:"new-edit-object-dialog",6456:"study-market",6631:"study-template-dialog",6780:"source-properties-editor",7078:"general-chart-properties-dialog",7260:"chart-bottom-toolbar",7271:"compare-model",7648:"show-theme-save-dialog",7987:"lt-icons-atlas",8020:"user-defined-bars-marks-tooltip",8537:"lt-property-pages-with-definitions",8643:"full-tooltips-popup",8890:"simple-dialog",9039:"lollipop-tooltip-renderer",9374:"symbol-info-dialog-impl", +9498:"export-data",9685:"series-icons-map"}[e]||e)+"."+{92:"313b0b47e4c76ba21a62",105:"85874ab839d32a8a7c70",139:"ea6360a95cdae7dad70f",140:"c698f8c0979e0aa76e73",240:"92480a47078a540a8a03",346:"76334afce982f8384be4",507:"8e4a9692b00afacda22d",535:"74d9bc0e51d0ad585990",537:"76ee48ffd2cc878e82ae",607:"0c619cfdb68ef43fdb67",731:"edd0f8d5d2491a1d1c06",892:"ac3eeb47e69ab8ff8ac7",962:"e2eb6a85de39a3d76e5d",1033:"bb804c64fe58de0bace7",1075:"1c913af3f0b8358a4d09",1140:"530d2fbf19217c6c2837",1271:"87cc24463b0ab368ff24",1416:"87239bba7a5772e2e600",1428:"4db8f95385076af2ebe2",1528:"9cdf3baeece30724e816",1553:"c076714f5e24887f0b94",1583:"659b8e5645df4b33847d",1584:"45f14d00e0059c52ee00",1685:"838d129505966759899c",1702:"35e2e7bf6e31f5598ae4",1754:"318dd6851c75d04282d4",1830:"d1c5f4191fdcdbf7b350",1859:"473a3b561104e5c3d51f",1890:"f41aaa48b2150958e27c",1960:"8ebd2403c6732e36d3bb",2077:"c471fd455cbea7147266",2140:"5564abccc94437be80a9",2158:"4b603780e909661194b1",2182:"585826b4a9a58eaa7e4a",2183:"45f89fd8e14c3fbea0d7",2215:"e87235d359e4c375c7b9",2306:"91bb0faa913751e75714",2377:"6e30e0c48af40bf2f6c0",2397:"b12d74441412d9602243",2616:"20f83194edf7431f951e",2685:"c1a906d8819deb9b5ca4",2704:"2815415ec54984e7a75c",2754:"617c76909eb4b2b7f861",2804:"51df698f3652fc234339",2842:"61ec1448858319f48d5a",2878:"7f226c0314e0a6d13a77",2913:"8db22dab61beccd65338",3005:"d4a8df2c27395bb909ac",3016:"534185c97bcc73193183",3030:"15afcdcee91654fbb6d7",3046:"620828ac31103f5257d0",3200:"da649f495aae3ade4977",3261:"d557899efcd7e4276746",3562:"1a11925dc658611c08ed",3578:"972a3bea2327d8adc96b",3596:"e96347394179591498c3",3626:"626757ec98cee6b4ccdb",3687:"60cdd7c35ed91e8ff15c",3795:"f7338c3d409d1ba72117",3988:"5a425dfbe11985aa0fb7",4013:"cd4f3ce7f332bef49355",4062:"ef79254d1273624a61fe",4079:"8a869c79235246b14f50",4147:"5e81c46177f5963f61bd",4369:"81ecb47c4af1b9de72fa",4389:"273732dacb23911fb5c7",4412:"b2890fa257fb53a16249",4450:"71a13a69c033ad5110aa",4665:"d0d8c434b737debe6dd6",4785:"3d5f5dd0e8226a08f4b1",4819:"3a61ed5890e6fa29c91e",4862:"ceb623c9061579ef4afa",4884:"5bb05ba58fdd28f9b5da",5009:"a3210be66957f59f90ce",5020:"b9af824a0a7e5e020d9b",5093:"c57c742ff21ef41b19be",5100:"ce3f026abe4f758bfc67",5384:"3dc3207fa2eabbc2a630",5516:"292f68f628b81c513fdc",5551:"ebdaba98fd7e4f0a9c1d",5639:"09442c72990cfe1eee09",5729:"7c2985725216bfa75c30",5747:"53cf5258c22b561b8dac",5761:"7cafd7b3fe32b50091c7",5890:"86bca7644e9b4742cfc0",5916:"2c61b4317a248eb7a089",6092:"54c2d754de303c9b7c8a",6166:"0ca3adae43eea16801cf",6265:"d3927b935fd414fbe5ee",6304:"7cb3ed0e3be488d1c8cc",6456:"bc7f3b05f94ea2ddbb50",6631:"a3c9e3bef9359e4ab092",6780:"b847fde494a538aa4b2f",6812:"8859133de433354e78db",6879:"5e54654d836077075405",7078:"8177033bd4fa0c3e7041",7177:"24fd4fdf27847261104f",7260:"fa391f32d66e5615a75e",7263:"f352f6d262009a8bb227",7271:"6458a853f4c2c658810e",7342:"6817554120c91fc72713",7507:"eec4c33278ede4ff77aa",7624:"2fec070ad8eb57fc72aa",7648:"24c0661ddf7f0b31089c",7695:"12e5d268652a1c17d1d3",7895:"6745fb102d98150c4426",7920:"e0aa14628406fdd9aa39",7987:"e989af9bf8cf9856ff25", +7989:"c8b3bf0c012e67260f47",8009:"fced7dbff98ff0282061",8020:"bb7109c0dd0c814114f0",8049:"eb5d0cfe52ecca5d4a13",8110:"f1e1b764c4f798416c97",8180:"640f9faeb3f5f9fa190f",8230:"4f8002f852c9259f2469",8251:"233bde7b9dbc42454f05",8271:"ac057a0f1d09d0520f9c",8483:"abe3ea54e13546b167af",8494:"143450f7c00be27369b3",8537:"eafc283dde13edc363ab",8619:"ca45b77c88569b91c04c",8622:"00d0a8d0102afc963fc9",8643:"c4d76612cc0c730a7389",8707:"6f43254d31fccaa6165b",8819:"e3ef6f9f028524561c02",8825:"b6acc714d8c2208ce81d",8887:"5fa45d75b8eeb4bdead8",8890:"5dd31d8783a4794959a0",8955:"bafc3cf104daf05f1298",9039:"a3d3a335db14444e4890",9050:"f4820dabd96059521d2c",9230:"eb70b4621f18a82dd739",9262:"da35e5943f851a3e49f4",9333:"aa89d1acb624d48d0e25",9374:"f8ffbbd0e68800ec13af",9415:"5fa19f422ac378f0cac9",9498:"6abc81bd1f7ccefc360a",9519:"2141b98224d9a2c0391a",9685:"43449af05ef22dfd0e5b",9776:"40b8cf612c827a83ffac",9908:"33de634c55f5a8edf1f5"}[e]+".js",r.miniCssF=e=>e+"."+{105:"104b2f6f9b0648dec9bf",140:"c417fa2d4e2b597fd2e3",240:"593f7d3c53306cf0999b",346:"6fa4b7609b1ee60b9fb5",537:"727e7a8061aba6353cce",1033:"dea80f470e3a5dc32a99",1140:"9be2612a2846a641de60",1271:"e73cc4ab8811551cb45c",1416:"6c0ade7cf2b94bcf389f",1428:"41a7517d6c141851eae2",1528:"5a2e936d44d63a48a319",1685:"eced2d2ad306de76de93",1830:"3d15be044bd7454440f3",1960:"cd6136275cf3692b2266",2140:"93a097540409472a6ad2",2397:"b9ff782e9526b4bffdd5",2685:"e8f70c0201a60bff4a47",2754:"46c79b8e0e2bc98e902a",2913:"843022c70197263550f1",3046:"de47c70192f405571439",3200:"d157ce6579f91f2f5451",3261:"fe3d72da3000b9dbf293",3562:"7453d38d0f6e1f0e1a49",3578:"4df13838b20232303215",3626:"ef3204dc35e71442a34a",3687:"9ffb6026c275aa140253",3795:"6c74ef9929e63857d37b",4147:"19673911190824b00786",4369:"6857708113ce1c4a7366",4412:"8d4e1fafa391b5384b61",4450:"a48b4a4cfbe6f6242b22",4819:"7e5dabc76f3e263cb701",4884:"5b077a3cf794b5066e78",5020:"b567a8a918688a78eefe",5100:"cde5d07bb6ed8d0a8328",5384:"3532ec81f09f0141e063",5639:"9e2022f70344965799f4",5729:"cadde5f41c8c665ff811",5761:"5db6f6616a2be01d5134",5916:"ab1c13c6b34fbbeefca4",6092:"a16d5261d5e9f1e1a7e1",6304:"596786a2b899ca328639",6812:"e4cb798c8384903bd813",6879:"be7ca80c11bcfdfe07be",7177:"ef0a796f40d1c904a10c",7263:"33a0f5a8d0ecca3d6e24",7342:"627086d22455386a2362",7507:"15b05cc8ed1b2cbfc54d",7624:"85a46f1fadf76e279382",7695:"45a1554b55fcf2a2ed5a",7895:"289d3858a8027e0fe15d",7920:"367547efd90fe510d37e",7989:"5cffc6b68a106434f7c8",8009:"1b77a042c86ea9603545",8049:"0ee06a219c0b23490584",8110:"37ff9a45c0ecfd622003",8230:"fbb750fd312778403036",8251:"63e0709659f930aeabbf",8271:"4f5f0c715d1210b60de8",8619:"30c312c31b435f209065",8707:"82dca75e9f28e0c0ffda",8819:"3b1eafc3afb1e3b37d09",8825:"93e4bb012e7e3630302e",8887:"0779d4b1159318c66688",8955:"3b79457016de928c90de",9230:"cf0c009c4a14731a6723",9262:"ecc84aaa9d0bd39ee899",9333:"cd2a3f2212d4663f2c0a",9415:"46497a002c7a98a2f3fa",9519:"9380073fab73395bfea9",9776:"f3f7d85b8d83d2c36ae0",9908:"99b4c96fbed415f14f94"}[e]+".css",r.g=function(){if("object"==typeof globalThis)return globalThis;try{ return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},f="tradingview:",r.l=(e,a,c,t)=>{if(d[e])d[e].push(a);else{var b,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i{b.onerror=b.onload=null,clearTimeout(u);var f=d[e];if(delete d[e],b.parentNode&&b.parentNode.removeChild(b),f&&f.forEach((e=>e(c))),a)return a(c)},u=setTimeout(l.bind(null,void 0,{type:"timeout",target:b}),12e4);b.onerror=l.bind(null,b.onerror),b.onload=l.bind(null,b.onload),o&&document.head.appendChild(b)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var a=r.g.document;if(!e&&a&&(a.currentScript&&(e=a.currentScript.src),!e)){var c=a.getElementsByTagName("script");c.length&&(e=c[c.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.p.startsWith(location.origin)&&(r.p=r.p.slice(location.origin.length)),(()=>{const e=r.u;r.u=a=>e(a).replace("__LANG__",r.g.language)})(),r.p=self.WEBPACK_PUBLIC_PATH||r.p;var o,n,i=r.e,s=Object.create(null);function l(e,a){return i(e).catch((function(){return new Promise((function(c){var d=function(){self.removeEventListener("online",d,!1),!1===navigator.onLine?self.addEventListener("online",d,!1):c(a<2?l(e,a+1):i(e))};setTimeout(d,a*a*1e3)}))}))}r.e=function(e){if(!s[e]){s[e]=l(e,0);var a=function(){delete s[e]};s[e].then(a,a)}return s[e]},o=e=>new Promise(((a,c)=>{var d=r.miniCssF(e),f=r.p+d;if(((e,a)=>{for(var c=document.getElementsByTagName("link"),d=0;d{var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onerror=f.onload=t=>{if(f.onerror=f.onload=null,"load"===t.type)c();else{var b=t&&("load"===t.type?"missing":t.type),r=t&&t.target&&t.target.href||a,o=new Error("Loading CSS chunk "+e+" failed.\n("+r+")");o.code="CSS_CHUNK_LOAD_FAILED",o.type=b,o.request=r, f.parentNode.removeChild(f),d(o)}},f.href=a,0!==f.href.indexOf(window.location.origin+"/")&&(f.crossOrigin="anonymous"),document.head.appendChild(f)})(e,f,a,c)})),n={3666:0},r.f.miniCss=(e,a)=>{n[e]?a.push(n[e]):0!==n[e]&&{105:1,140:1,240:1,346:1,537:1,1033:1,1140:1,1271:1,1416:1,1428:1,1528:1,1685:1,1830:1,1960:1,2140:1,2397:1,2685:1,2754:1,2913:1,3046:1,3200:1,3261:1,3562:1,3578:1,3626:1,3687:1,3795:1,4147:1,4369:1,4412:1,4450:1,4819:1,4884:1,5020:1,5100:1,5384:1,5639:1,5729:1,5761:1,5916:1,6092:1,6304:1,6812:1,6879:1,7177:1,7263:1,7342:1,7507:1,7624:1,7695:1,7895:1,7920:1,7989:1,8009:1,8049:1,8110:1,8230:1,8251:1,8271:1,8619:1,8707:1,8819:1,8825:1,8887:1,8955:1,9230:1,9262:1,9333:1,9415:1,9519:1,9776:1,9908:1}[e]&&a.push(n[e]=o(e).then((()=>{n[e]=0}),(a=>{throw delete n[e],a})))},(()=>{var e={3666:0,7717:0};r.f.j=(a,c)=>{var d=r.o(e,a)?e[a]:void 0;if(0!==d)if(d)c.push(d[2]);else if(/^(1(4(0|16|28)|(14|83|96)0|033|05|271|528|685)|2((|1)40|397|685|754|913)|3(6(26|66|87)|(|0)46|200|261|562|578|795)|4(147|369|412|450|819|884)|5(020|100|37|384|639|729|761|916)|6(092|304|812|879)|7((17|50|71)7|[68]95|263|342|624|920|989)|8(2(30|51|71)|8(19|25|87)|(00|04|61)9|110|707|955)|9(230|262|333|415|519|776|908))$/.test(a))e[a]=0;else{var f=new Promise(((c,f)=>d=e[a]=[c,f]));c.push(d[2]=f);var t=r.p+r.u(a),b=new Error;r.l(t,(c=>{if(r.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var f=c&&("load"===c.type?"missing":c.type),t=c&&c.target&&c.target.src;b.message="Loading chunk "+a+" failed.\n("+f+": "+t+")",b.name="ChunkLoadError",b.type=f,b.request=t,d[1](b)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,c)=>{var d,f,[t,b,o]=c,n=0;if(t.some((a=>0!==e[a]))){for(d in b)r.o(b,d)&&(r.m[d]=b[d]);if(o)var i=o(r)}for(a&&a(c);n{const{miniCssF:e}=r;r.miniCssF=a=>self.document&&"rtl"===self.document.dir?e(a).replace(/\.css$/,".rtl.css"):e(a)})()})(); \ No newline at end of file diff --git a/charting_library/bundles/sv.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/sv.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index d6052491..00000000 --- a/charting_library/bundles/sv.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:r=>{r.exports=["staplar"]},19648:r=>{r.exports=["12-timmars"]},55838:r=>{r.exports=["24-timmars"]},88364:r=>{r.exports=["Basstilar för diagram"]},46720:r=>{r.exports=["Sikte"]},50985:r=>{r.exports=["Valuta"]},17319:r=>{r.exports=["Valuta och enhet"]},19481:r=>{r.exports=["Utseende"]},68791:r=>{r.exports=["Argument"]},95036:r=>{r.exports=["Genomsnittligt stängningspris"]},27331:r=>{r.exports=["Bakgrund"]},22519:r=>{r.exports=["Stapelvärdesföränding"]},87845:r=>{r.exports=["Knappar"]},25209:r=>{r.exports=["Datumformat"]},55090:r=>{r.exports=["Veckodagar på etiketter"]},29601:r=>{r.exports=["Beskrivning"]},26897:r=>{r.exports=["Evenemang"]},95338:r=>{r.exports=["Horisontellt rutnät"]},60971:r=>{r.exports=["Högt och lågt pris"]},61142:r=>{r.exports=["Indikatorer"]},34905:r=>{r.exports=["Indikatorers värde"]},29687:r=>{r.exports=["Indikatorer och finansiella värden"]},25084:r=>{r.exports=["Indikatorer och finansiella namn"]},9654:r=>{r.exports=["Indikatornamn"]},99487:r=>{r.exports=["OHLC värden"]},75991:r=>{r.exports=["Öppen marknadsstatus"]},70500:r=>{r.exports=["Pengar"]},66653:r=>{r.exports=["Marginaler"]},42502:r=>{r.exports=["Ingen överlappning"]},74343:r=>{r.exports="Navigation"},43115:r=>{r.exports=["Skalor"]},53224:r=>{r.exports=["Placering av skalor"]},79194:r=>{r.exports=["Statusrad"]},89053:r=>{r.exports="Symbol"},35383:r=>{r.exports=["Symbolnamn"]},27767:r=>{r.exports=["Symbol senaste pris"]},40847:r=>{r.exports=["Symbolen för föregående dags stängningsvärde"]},50446:r=>{r.exports="Pane"},73908:r=>{r.exports=["Panelseparatörer"]},36014:r=>{r.exports=["Pocentsats"]},78621:r=>{r.exports="Pips"},74823:r=>{r.exports=["Före/Eftermarknadspris"]},64859:r=>{r.exports=["prisskala"]},76523:r=>{r.exports=["Pris och procentvärde"]},40187:r=>{r.exports="Right Margin"},77705:r=>{r.exports=["Vattenstämpel"]},67369:r=>{r.exports=["Titel"]},31326:r=>{r.exports=["Titlar"]},23097:r=>{r.exports=["Tickersymbol"]},82168:r=>{r.exports=["Ticker och beskrivning"]},43637:r=>{r.exports=["Tidsskala"]},97316:r=>{r.exports=["Tidsformat timmar"]},90801:r=>{r.exports="Trading"},77534:r=>{r.exports=["Enhet"]},1111:r=>{r.exports=["Volym"]},80170:r=>{r.exports=["Värde enligt skala"]},91322:r=>{r.exports=["Värden"]},70353:r=>{r.exports=["Vert Grid Linjer"]},57889:r=>{r.exports=["ändra synlighet för OHLC-värden"]},35646:r=>{r.exports=["byt navigeringsknappar för vattenmärkessymbol"]},18644:r=>{r.exports=["ändra synlighet för öppen marknadsstatus"]},45110:r=>{r.exports=["ändra synlighet för stapeländringar"]},10349:r=>{r.exports=["ändra bottenmarginal"]},88161:r=>{r.exports=["ändra synlighet för valuta och enhetsetiketter"]},79570:r=>{r.exports=["ändra synlighet för valutaetiketter"]},99011:r=>{r.exports=["ändra diagrammets bakgrundsfärg"]},72458:r=>{r.exports=["ändra digrammets bakgrundstyp"]},37034:r=>{r.exports=["ändra bredd för crosshair"]},29951:r=>{r.exports=["ändra färg för crosshair"]},92027:r=>{r.exports=["ändra stil för crosshair"]},50457:r=>{ -r.exports=["ändra datumformat"]},7104:r=>{r.exports=["byt dag på etiketter"]},88096:r=>{r.exports=["ändra horzrutnätets färg"]},2523:r=>{r.exports=["ändra linjestil på horzrutnätets linjer"]},31325:r=>{r.exports=["ändra synlighet för indikatortitel"]},99774:r=>{r.exports=["ändra synlighet för indikatorvärden"]},96162:r=>{r.exports=["ändra synlighet för indikatorargument"]},59820:r=>{r.exports=["ändra synlighet för indikatorer och finansiella namnetiketter"]},90512:r=>{r.exports=["ändra synlighet för indikatorer och finansiella värdeetiketter"]},97956:r=>{r.exports=["ändra transparens för teckenförklaring"]},61061:r=>{r.exports=["ändra synlighet för teckenförklaring"]},37730:r=>{r.exports=["ändra synligheten för rutknapparna"]},89032:r=>{r.exports=["ändra färgen på panelerna"]},35636:r=>{r.exports=["ändra högermarginalen"]},66601:r=>{r.exports="change right margin percentage"},25616:r=>{r.exports=["ändra färg för vattenmärkessymbol"]},87159:r=>{r.exports=["ändra synligheten för vattenmärkessymbol"]},26717:r=>{r.exports=["ändra synlighet för symbolbeskrivning"]},28741:r=>{r.exports=["ändra symbol för senaste värdeläge"]},95071:r=>{r.exports=["ändra format för teckenförklarimg"]},35065:r=>{r.exports=["ändra textfärg för skalorna"]},84382:r=>{r.exports=["ändra teckenstorlek för skalorna"]},12468:r=>{r.exports=["ändra färg för skalorna"]},71589:r=>{r.exports=["ändra synligheten för sessionsgränser"]},15035:r=>{r.exports=["ändra bredd för sessionsgränser"]},1579:r=>{r.exports=["ändra färg för sessionsgränser"]},21460:r=>{r.exports=["ändra stil för sessionsgränser"]},76991:r=>{r.exports=["ändra tidsformat timmar"]},98905:r=>{r.exports=["ändra toppmarginal"]},7011:r=>{r.exports=["ändra synlighet för enhetsetiketter"]},22722:r=>{r.exports=["ändra färg på rutnätets linjer"]},22867:r=>{r.exports=["ändra linjestil på rutnätets linjer"]},9455:r=>{r.exports=["ändra synlighet för volymvärden"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/sv.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/sv.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..0d58cb82 --- /dev/null +++ b/charting_library/bundles/sv.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:r=>{r.exports=["staplar"]},19648:r=>{r.exports=["12-timmars"]},55838:r=>{r.exports=["24-timmars"]},88364:r=>{r.exports=["Basstilar för diagram"]},46720:r=>{r.exports=["Sikte"]},50985:r=>{r.exports=["Valuta"]},17319:r=>{r.exports=["Valuta och enhet"]},19481:r=>{r.exports=["Utseende"]},68791:r=>{r.exports=["Argument"]},95036:r=>{r.exports=["Genomsnittligt stängningspris"]},27331:r=>{r.exports=["Bakgrund"]},22519:r=>{r.exports=["Stapelvärdesföränding"]},87845:r=>{r.exports=["Knappar"]},25209:r=>{r.exports=["Datumformat"]},55090:r=>{r.exports=["Veckodagar på etiketter"]},29601:r=>{r.exports=["Beskrivning"]},26897:r=>{r.exports=["Evenemang"]},95338:r=>{r.exports=["Horisontellt rutnät"]},60971:r=>{r.exports=["Högt och lågt pris"]},61142:r=>{r.exports=["Indikatorer"]},34905:r=>{r.exports=["Indikatorers värde"]},29687:r=>{r.exports=["Indikatorer och finansiella värden"]},25084:r=>{r.exports=["Indikatorer och finansiella namn"]},9654:r=>{r.exports=["Indikatornamn"]},99487:r=>{r.exports=["OHLC värden"]},75991:r=>{r.exports=["Öppen marknadsstatus"]},96073:r=>{r.exports="Long Description"},70500:r=>{r.exports=["Pengar"]},66653:r=>{r.exports=["Marginaler"]},42502:r=>{r.exports=["Ingen överlappning"]},74343:r=>{r.exports="Navigation"},43115:r=>{r.exports=["Skalor"]},53224:r=>{r.exports=["Placering av skalor"]},79194:r=>{r.exports=["Statusrad"]},89053:r=>{r.exports="Symbol"},35383:r=>{r.exports=["Symbolnamn"]},27767:r=>{r.exports=["Symbol senaste pris"]},40847:r=>{r.exports=["Symbolen för föregående dags stängningsvärde"]},50446:r=>{r.exports="Pane"},73908:r=>{r.exports=["Panelseparatörer"]},36014:r=>{r.exports=["Pocentsats"]},78621:r=>{r.exports="Pips"},74823:r=>{r.exports=["Före/Eftermarknadspris"]},64859:r=>{r.exports=["prisskala"]},76523:r=>{r.exports=["Pris och procentvärde"]},40187:r=>{r.exports="Right Margin"},77705:r=>{r.exports=["Vattenstämpel"]},67369:r=>{r.exports=["Titel"]},31326:r=>{r.exports=["Titlar"]},23097:r=>{r.exports=["Tickersymbol"]},82168:r=>{r.exports=["Ticker och beskrivning"]},43637:r=>{r.exports=["Tidsskala"]},97316:r=>{r.exports=["Tidsformat timmar"]},90801:r=>{r.exports="Trading"},77534:r=>{r.exports=["Enhet"]},1111:r=>{r.exports=["Volym"]},80170:r=>{r.exports=["Värde enligt skala"]},91322:r=>{r.exports=["Värden"]},70353:r=>{r.exports=["Vert Grid Linjer"]},57889:r=>{r.exports=["ändra synlighet för OHLC-värden"]},35646:r=>{r.exports=["byt navigeringsknappar för vattenmärkessymbol"]},18644:r=>{r.exports=["ändra synlighet för öppen marknadsstatus"]},45110:r=>{r.exports=["ändra synlighet för stapeländringar"]},10349:r=>{r.exports=["ändra bottenmarginal"]},88161:r=>{r.exports=["ändra synlighet för valuta och enhetsetiketter"]},79570:r=>{r.exports=["ändra synlighet för valutaetiketter"]},99011:r=>{r.exports=["ändra diagrammets bakgrundsfärg"]},72458:r=>{r.exports=["ändra digrammets bakgrundstyp"]},37034:r=>{r.exports=["ändra bredd för crosshair"]},29951:r=>{r.exports=["ändra färg för crosshair"]},92027:r=>{ +r.exports=["ändra stil för crosshair"]},50457:r=>{r.exports=["ändra datumformat"]},7104:r=>{r.exports=["byt dag på etiketter"]},88096:r=>{r.exports=["ändra horzrutnätets färg"]},2523:r=>{r.exports=["ändra linjestil på horzrutnätets linjer"]},31325:r=>{r.exports=["ändra synlighet för indikatortitel"]},99774:r=>{r.exports=["ändra synlighet för indikatorvärden"]},96162:r=>{r.exports=["ändra synlighet för indikatorargument"]},59820:r=>{r.exports=["ändra synlighet för indikatorer och finansiella namnetiketter"]},90512:r=>{r.exports=["ändra synlighet för indikatorer och finansiella värdeetiketter"]},97956:r=>{r.exports=["ändra transparens för teckenförklaring"]},61061:r=>{r.exports=["ändra synlighet för teckenförklaring"]},37730:r=>{r.exports=["ändra synligheten för rutknapparna"]},89032:r=>{r.exports=["ändra färgen på panelerna"]},35636:r=>{r.exports=["ändra högermarginalen"]},66601:r=>{r.exports="change right margin percentage"},25616:r=>{r.exports=["ändra färg för vattenmärkessymbol"]},87159:r=>{r.exports=["ändra synligheten för vattenmärkessymbol"]},26717:r=>{r.exports=["ändra synlighet för symbolbeskrivning"]},6091:r=>{r.exports="change symbol field visibility"},28741:r=>{r.exports=["ändra symbol för senaste värdeläge"]},95071:r=>{r.exports=["ändra format för teckenförklarimg"]},35065:r=>{r.exports=["ändra textfärg för skalorna"]},84382:r=>{r.exports=["ändra teckenstorlek för skalorna"]},12468:r=>{r.exports=["ändra färg för skalorna"]},71589:r=>{r.exports=["ändra synligheten för sessionsgränser"]},15035:r=>{r.exports=["ändra bredd för sessionsgränser"]},1579:r=>{r.exports=["ändra färg för sessionsgränser"]},21460:r=>{r.exports=["ändra stil för sessionsgränser"]},76991:r=>{r.exports=["ändra tidsformat timmar"]},98905:r=>{r.exports=["ändra toppmarginal"]},7011:r=>{r.exports=["ändra synlighet för enhetsetiketter"]},22722:r=>{r.exports=["ändra färg på rutnätets linjer"]},22867:r=>{r.exports=["ändra linjestil på rutnätets linjer"]},9455:r=>{r.exports=["ändra synlighet för volymvärden"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/sv.6847.490ee46270bef6a878dd.js b/charting_library/bundles/sv.7257.089fbbc28bead9558b87.js similarity index 63% rename from charting_library/bundles/sv.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/sv.7257.089fbbc28bead9558b87.js index 6707b97f..588e0d08 100644 --- a/charting_library/bundles/sv.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/sv.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports=["Det gick inte att få Pine-källkoden."]},39589:e=>{e.exports=["Fäll ihop panel"]},38154:e=>{e.exports=["Bekräfta att du vill ta bort studieträdet"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Skapa ett gratis konto"]},69419:e=>{e.exports=["Allt är väl - marknaden är öppen."]},97637:e=>{e.exports="April"},86797:e=>{e.exports=["Augusti"]},22519:e=>{e.exports=["Stapelvärdesföränding"]},52003:e=>{e.exports=["Vill du verkligen ta bort denna studie och alla dess kopplingar?"]},68854:e=>{e.exports=["Dubbelklicka"]},97325:e=>{e.exports=["Dataproblem"]},52916:e=>{e.exports=["Uppdateras en gång per dag."]},25978:e=>{e.exports=["Data uppdateras mer än en gång per sekund."]},57310:e=>{e.exports=["Dataförsening"]},49321:e=>{e.exports=["Data som tillhandahålls genom gratisabonnemanget uppdateras endast en gång per sekund"]},55669:e=>{e.exports="December"},83498:e=>{e.exports=["Radera panel"]},59315:e=>{e.exports=["Data vid dagens slut"]},82751:e=>{e.exports=["Fel"]},40519:e=>{e.exports=["Endast handel efter marknadens stängning nu."]},80227:e=>{e.exports=["Börsens tidszon"]},16467:e=>{e.exports=["Februari"]},25046:e=>{e.exports=["Fyll i ett avtal med börsen"]},93666:e=>{e.exports=["Flaggsymbol"]},564:e=>{e.exports=["Fre"]},72970:e=>{e.exports=["Fredag"]},88958:e=>{e.exports=["Semester"]},21686:e=>{e.exports=["Dölj indikatorteckenförklaring"]},26935:e=>{e.exports=["Indikatorargument"]},26315:e=>{e.exports=["Indikatortitel"]},84098:e=>{e.exports=["Indikatorvärden"]},91459:e=>{e.exports=["Om du vill ha {listedExchange}s realtidsdata måste du fylla i ett avtal med börsen. Oroa dig inte, det tar bara några få klick."]},50634:e=>{e.exports=["Det går till postmarknadshandel om {remainingTime}."]},74537:e=>{e.exports=["Det går till förmarknadshandel om {remainingTime}."]},26910:e=>{e.exports=["Januari"]},23230:e=>{e.exports=["Juli"]},49385:e=>{e.exports=["Juni"]},99487:e=>{e.exports=["OHLC värden"]},15815:e=>{e.exports=["En uppdatering per sekund"]},90784:e=>{e.exports=["Oktober"]},75991:e=>{e.exports=["Öppen marknadsstatus"]},18429:e=>{e.exports=["Läs mer"]},39899:e=>{e.exports=["Flytta ned panel"]},70343:e=>{e.exports=["Flytta upp panel"]},83085:e=>{e.exports=["Mån"]},61199:e=>{e.exports=["Måndag"]},41610:e=>{e.exports=["Mer"]},1653:e=>{e.exports=["Endast handel före marknadens öppnande nu."]},56470:e=>{e.exports=["Förstora diagram"]},19603:e=>{e.exports=["Förstora panel"]},68327:e=>{e.exports=["Maj"]},35732:e=>{e.exports=["Hantera paneler"]},84675:e=>{e.exports=["Mars"]},83949:e=>{e.exports=["Marknaden är öppen"]},35701:e=>{e.exports=["Marknaden öppnar om {remainingTime}."]},95814:e=>{e.exports=["Marknaden är stängd"]},98105:e=>{e.exports=["Marknaden stänger om {remainingTime}."]},87202:e=>{ -e.exports=["Marknaden har för tillfället semesterstängt. Tur för dem!"]},71194:e=>{e.exports="November"},66324:e=>{e.exports=["Källkod"]},36835:e=>{e.exports=["Lör"]},1144:e=>{e.exports=["Lördag"]},40653:e=>{e.exports=["Skrolla till vänster"]},26721:e=>{e.exports=["Skrolla fram till senaste candlestick"]},35809:e=>{e.exports=["Scrolla till höger"]},61132:e=>{e.exports="September"},28705:e=>{e.exports=["Visa indikatorteckenförklaring"]},51072:e=>{e.exports=["Visa objektträd"]},37809:e=>{e.exports=["Visa inställningar för intervall"]},39045:e=>{e.exports=["Studiefel"]},86577:e=>{e.exports=["Sön"]},72149:e=>{e.exports=["Söndag"]},39339:e=>{e.exports=["Symboltitel"]},29985:e=>{e.exports=["Efter marknadens stängning"]},28412:e=>{e.exports=["Betalade planer har snabbare datauppdatering"]},56042:e=>{e.exports=["Före marknadens öppning"]},36015:e=>{e.exports=["Realtidsdata för {description} stöds inte för närvarande. Eventuellt kommer det att stödjas i framtiden."]},6667:e=>{e.exports=["Realtidsdata för {symbolName} tillhandahålls av {exchange}-börsen."]},48293:e=>{e.exports=["Återställ diagram"]},91029:e=>{e.exports=["Återställ panel"]},75094:e=>{e.exports=["Ons"]},7147:e=>{e.exports=["Onsdag"]},52984:e=>{e.exports=["För att få realtidsdata för {description} behöver du köpa realtidsdatapaketet."]},9787:e=>{e.exports=["Tor"]},7951:e=>{e.exports=["Torsdag"]},57918:e=>{e.exports=["Denna information är i realtid, men den skiljer sig något från sin officiella motsvarighet från primära börser."]},68025:e=>{e.exports=["Uppgifterna är i realtid, men skiljer sig något från den officiella motsvarigheten från {exchange}."]},73717:e=>{e.exports=["Det finns ingen sådan symbol. Vänligen välj en annan."]},57048:e=>{e.exports=["Dags för en promenad - den här marknaden är stängd."]},94316:e=>{e.exports=["Tis"]},44979:e=>{e.exports=["Tisdag"]},8209:e=>{e.exports=["Ta bort flaggsymbol"]},1111:e=>{e.exports=["Volym"]},61311:e=>{e.exports=["Förstora"]},47602:e=>{e.exports=["Förminska"]},57889:e=>{e.exports=["ändra synlighet för OHLC-värden"]},18644:e=>{e.exports=["ändra synlighet för öppen marknadsstatus"]},45110:e=>{e.exports=["ändra synlighet för stapeländringar"]},31325:e=>{e.exports=["ändra synlighet för indikatortitel"]},99774:e=>{e.exports=["ändra synlighet för indikatorvärden"]},96162:e=>{e.exports=["ändra synlighet för indikatorargument"]},26717:e=>{e.exports=["ändra synlighet för symbolbeskrivning"]},9455:e=>{e.exports=["ändra synlighet för volymvärden"]},39348:e=>{e.exports=["mindre än 1 minut"]},87358:e=>{e.exports=["visa {title}"]},7827:e=>{e.exports=["{days} och {hours}"]},7435:e=>{e.exports=["{exchange} via {originalExchange}"]},19830:e=>{e.exports=["{hours} och {minutes}"]},1084:e=>{e.exports=["{listedExchange} Data i realtid finns tillgängliga kostnadsfritt för registrerade användare. Skaffa dig ett gratiskonto nu!"]},11155:e=>{e.exports=["{symbolName} är fördröjd med {time} minuter"]},77033:e=>{ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports="Mo"},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports="We"},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports=["Det gick inte att få Pine-källkoden."]},39589:e=>{e.exports=["Fäll ihop panel"]},38154:e=>{e.exports=["Bekräfta att du vill ta bort studieträdet"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Skapa ett gratis konto"]},69419:e=>{e.exports=["Allt är väl - marknaden är öppen."]},97637:e=>{e.exports="April"},86797:e=>{e.exports=["Augusti"]},22519:e=>{e.exports=["Stapelvärdesföränding"]},52003:e=>{e.exports=["Vill du verkligen ta bort denna studie och alla dess kopplingar?"]},68854:e=>{e.exports=["Dubbelklicka"]},97325:e=>{e.exports=["Dataproblem"]},52916:e=>{e.exports=["Uppdateras en gång per dag."]},25978:e=>{e.exports=["Data uppdateras mer än en gång per sekund."]},57310:e=>{e.exports=["Dataförsening"]},49321:e=>{e.exports=["Data som tillhandahålls genom gratisabonnemanget uppdateras endast en gång per sekund"]},55669:e=>{e.exports="December"},83498:e=>{e.exports=["Radera panel"]},59315:e=>{e.exports=["Data vid dagens slut"]},82751:e=>{e.exports=["Fel"]},40519:e=>{e.exports=["Endast handel efter marknadens stängning nu."]},80227:e=>{e.exports=["Börsens tidszon"]},16467:e=>{e.exports=["Februari"]},25046:e=>{e.exports=["Fyll i ett avtal med börsen"]},93666:e=>{e.exports=["Flaggsymbol"]},564:e=>{e.exports=["Fre"]},72970:e=>{e.exports=["Fredag"]},88958:e=>{e.exports=["Semester"]},21686:e=>{e.exports=["Dölj indikatorteckenförklaring"]},26935:e=>{e.exports=["Indikatorargument"]},26315:e=>{e.exports=["Indikatortitel"]},84098:e=>{e.exports=["Indikatorvärden"]},91459:e=>{e.exports=["Om du vill ha {listedExchange}s realtidsdata måste du fylla i ett avtal med börsen. Oroa dig inte, det tar bara några få klick."]},50634:e=>{e.exports=["Det går till postmarknadshandel om {remainingTime}."]},74537:e=>{e.exports=["Det går till förmarknadshandel om {remainingTime}."]},26910:e=>{e.exports=["Januari"]},23230:e=>{e.exports=["Juli"]},49385:e=>{e.exports=["Juni"]},99487:e=>{e.exports=["OHLC värden"]},15815:e=>{e.exports=["En uppdatering per sekund"]},90784:e=>{e.exports=["Oktober"]},75991:e=>{e.exports=["Öppen marknadsstatus"]},18429:e=>{e.exports=["Läs mer"]},39899:e=>{e.exports=["Flytta ned panel"]},70343:e=>{e.exports=["Flytta upp panel"]},83085:e=>{e.exports=["Mån"]},61199:e=>{e.exports=["Måndag"]},41610:e=>{e.exports=["Mer"]},1653:e=>{e.exports=["Endast handel före marknadens öppnande nu."]},56470:e=>{e.exports=["Förstora diagram"]},19603:e=>{e.exports=["Förstora panel"]},68327:e=>{e.exports=["Maj"]},35732:e=>{e.exports=["Hantera paneler"]},84675:e=>{e.exports=["Mars"]},83949:e=>{e.exports=["Marknaden är öppen"]},35701:e=>{e.exports=["Marknaden öppnar om {remainingTime}."]},95814:e=>{e.exports=["Marknaden är stängd"]},98105:e=>{e.exports=["Marknaden stänger om {remainingTime}."]},87202:e=>{ +e.exports=["Marknaden har för tillfället semesterstängt. Tur för dem!"]},71194:e=>{e.exports="November"},66324:e=>{e.exports=["Källkod"]},36835:e=>{e.exports=["Lör"]},1144:e=>{e.exports=["Lördag"]},40653:e=>{e.exports=["Skrolla till vänster"]},26721:e=>{e.exports=["Skrolla fram till senaste candlestick"]},35809:e=>{e.exports=["Scrolla till höger"]},61132:e=>{e.exports="September"},28705:e=>{e.exports=["Visa indikatorteckenförklaring"]},51072:e=>{e.exports=["Visa objektträd"]},37809:e=>{e.exports=["Visa inställningar för intervall"]},39045:e=>{e.exports=["Studiefel"]},86577:e=>{e.exports=["Sön"]},72149:e=>{e.exports=["Söndag"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["Symboltitel"]},29985:e=>{e.exports=["Efter marknadens stängning"]},28412:e=>{e.exports=["Betalade planer har snabbare datauppdatering"]},56042:e=>{e.exports=["Före marknadens öppning"]},36015:e=>{e.exports=["Realtidsdata för {description} stöds inte för närvarande. Eventuellt kommer det att stödjas i framtiden."]},6667:e=>{e.exports=["Realtidsdata för {symbolName} tillhandahålls av {exchange}-börsen."]},48293:e=>{e.exports=["Återställ diagram"]},91029:e=>{e.exports=["Återställ panel"]},75094:e=>{e.exports=["Ons"]},7147:e=>{e.exports=["Onsdag"]},52984:e=>{e.exports=["För att få realtidsdata för {description} behöver du köpa realtidsdatapaketet."]},9787:e=>{e.exports=["Tor"]},7951:e=>{e.exports=["Torsdag"]},57918:e=>{e.exports=["Denna information är i realtid, men den skiljer sig något från sin officiella motsvarighet från primära börser."]},68025:e=>{e.exports=["Uppgifterna är i realtid, men skiljer sig något från den officiella motsvarigheten från {exchange}."]},73717:e=>{e.exports=["Det finns ingen sådan symbol. Vänligen välj en annan."]},57048:e=>{e.exports=["Dags för en promenad - den här marknaden är stängd."]},94316:e=>{e.exports=["Tis"]},44979:e=>{e.exports=["Tisdag"]},8209:e=>{e.exports=["Ta bort flaggsymbol"]},1111:e=>{e.exports=["Volym"]},61311:e=>{e.exports=["Förstora"]},47602:e=>{e.exports=["Förminska"]},57889:e=>{e.exports=["ändra synlighet för OHLC-värden"]},18644:e=>{e.exports=["ändra synlighet för öppen marknadsstatus"]},45110:e=>{e.exports=["ändra synlighet för stapeländringar"]},31325:e=>{e.exports=["ändra synlighet för indikatortitel"]},99774:e=>{e.exports=["ändra synlighet för indikatorvärden"]},96162:e=>{e.exports=["ändra synlighet för indikatorargument"]},26717:e=>{e.exports=["ändra synlighet för symbolbeskrivning"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["ändra synlighet för volymvärden"]},39348:e=>{e.exports=["mindre än 1 minut"]},87358:e=>{e.exports=["visa {title}"]},7827:e=>{e.exports=["{days} och {hours}"]},7435:e=>{e.exports=["{exchange} via {originalExchange}"]},19830:e=>{e.exports=["{hours} och {minutes}"]},1084:e=>{e.exports=["{listedExchange} Data i realtid finns tillgängliga kostnadsfritt för registrerade användare. Skaffa dig ett gratiskonto nu!"]},11155:e=>{e.exports=["{symbolName} är fördröjd med {time} minuter"]},77033:e=>{ e.exports=["Data uppdateras varje {amount} sekund, även om det finns fler uppdateringar på marknaden.","Data uppdateras varje {amount} sekund, även om det finns fler uppdateringar på marknaden."]},2121:e=>{e.exports=["Data i våra Basabonnemang uppdateras varje {amount} sekund, även om det finns fler uppdateringar på marknaden.","Data i våra Basabonnemang uppdateras var {amount}:e sekund, även om det finns fler uppdateringar på marknaden."]},5223:e=>{e.exports=["En uppdatering varje {amount} sekund","En uppdatering varje {amount} sekund"]},58609:e=>{e.exports=["{number} dag","{number} dagar"]},24430:e=>{e.exports=["{number} timme","{number} timmar"]},67151:e=>{e.exports=["{number} minut","{number} minuter"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/th.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/th.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 91634565..00000000 --- a/charting_library/bundles/th.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports=["แท่ง"]},19648:e=>{e.exports=["12 ชั่วโมง"]},55838:e=>{e.exports=["24 ชั่วโมง"]},88364:e=>{e.exports=["รูปแบบพื้นฐานของแผนภูมิ"]},46720:e=>{e.exports=["เส้นกากบาท"]},50985:e=>{e.exports=["สกุลเงิน"]},17319:e=>{e.exports=["สกุลเงินและหน่วย"]},19481:e=>{e.exports=["รูปลักษณ์"]},68791:e=>{e.exports=["โต้เถียง"]},95036:e=>{e.exports=["เส้นราคาปิดเฉลี่ย"]},27331:e=>{e.exports=["พื้นหลัง"]},22519:e=>{e.exports=["ค่าเปลี่ยนแปลงของแท่ง"]},87845:e=>{e.exports=["ปุ่ม"]},25209:e=>{e.exports=["รูปแบบวันที่"]},55090:e=>{e.exports=["วันในสัปดาห์บนป้ายกำกับ"]},29601:e=>{e.exports=["คำอธิบาย"]},26897:e=>{e.exports=["เหตุการณ์"]},95338:e=>{e.exports=["เส้นกริดแนวนอน"]},60971:e=>{e.exports=["ราคาสูงและต่ำ"]},61142:e=>{e.exports=["อินดิเคเตอร์"]},34905:e=>{e.exports=["มูลค่าของอินดิเคเตอร์"]},29687:e=>{e.exports=["อินดิเคเตอร์และฉลากมูลค่าทางการเงิน"]},25084:e=>{e.exports=["ป้ายชื่ออินดิเคเตอร์และการเงิน"]},9654:e=>{e.exports=["ป้ายชื่ออินดิเคเตอร์"]},99487:e=>{e.exports=["ราคา เปิด สูง ต่ำ และปิด OHLC ของแท่งเทียน"]},75991:e=>{e.exports=["สถานะตลาดเปิด"]},70500:e=>{e.exports=["เงิน"]},66653:e=>{e.exports=["มาร์จิ้น"]},42502:e=>{e.exports=["ไม่มีป้ายที่ทับซ้อนกัน"]},74343:e=>{e.exports=["ปุ่มนำทาง"]},43115:e=>{e.exports=["มาตราส่วน"]},53224:e=>{e.exports=["การวางตำแหน่งสเกล"]},79194:e=>{e.exports=["เส้นสถานะ"]},89053:e=>{e.exports=["สัญลักษณ์"]},35383:e=>{e.exports=["ชื่อสัญลักษณ์"]},27767:e=>{e.exports=["ป้ายค่าราคาล่าสุดของตัวย่อ"]},40847:e=>{e.exports=["ป้ายค่าราคาปิดวันก่อนหน้าของตัวย่อ"]},50446:e=>{e.exports=["หน้าต่างใหม่"]},73908:e=>{e.exports=["ตัวแยกบานหน้าต่าง"]},36014:e=>{e.exports=["เปอร์เซ็นต์"]},78621:e=>{e.exports=["ปิ๊ป"]},74823:e=>{e.exports=["ป้ายราคาก่อน/หลังตลาดเปิดปิด"]},64859:e=>{e.exports=["สเกลราคา"]},76523:e=>{e.exports=["ราคาและค่าเปอร์เซ็นต์"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["ลายน้ำ"]},67369:e=>{e.exports=["หัวเรื่อง"]},31326:e=>{e.exports=["ชื่อเรื่อง"]},23097:e=>{e.exports=["ทิกเกอร์"]},82168:e=>{e.exports=["ทิกเกอร์และคำอธิบาย"]},43637:e=>{e.exports=["ขนาดเวลา"]},97316:e=>{e.exports=["รูปแบบชั่วโมงเวลา"]},90801:e=>{e.exports=["การซื้อขาย"]},77534:e=>{e.exports=["หน่วย"]},1111:e=>{e.exports=["ปริมาณการซื้อขาย"]},80170:e=>{e.exports=["ค่าตามสเกล"]},91322:e=>{e.exports=["มูลค่า"]},70353:e=>{e.exports=["เส้นกริดแนวตั้ง"]},57889:e=>{e.exports=["เปลี่ยนการมองเห็นค่า OHLC"]},35646:e=>{e.exports=["เปลี่ยนการมองเห็นปุ่มนำทาง"]},18644:e=>{e.exports=["เปลี่ยนการมองเห็นสถานะตลาดเปิด"]},45110:e=>{e.exports=["เปลี่ยนการมองเห็นการเปลี่ยนบาร์"]},10349:e=>{e.exports=["เปลี่ยนระยะขอบด้านล่าง"]},88161:e=>{e.exports=["เปลี่ยนสกุลเงินและการมองเห็นป้ายหน่วย"]},79570:e=>{e.exports=["เปลี่ยนการมองเห็นป้ายสกุลเงิน"]},99011:e=>{e.exports=["เปลี่ยนสีพื้นหลังชาร์ต"]},72458:e=>{e.exports=["เปลี่ยนประเภทพื้นหลังของชาร์ต"]},37034:e=>{e.exports=["เปลี่ยนความกว้างเส้นตัด"]},29951:e=>{e.exports=["เปลี่ยนสีเส้นเส้นตัด"]},92027:e=>{e.exports=["เปลี่ยนรูปแบบเส้นตัด"]},50457:e=>{e.exports=["เปลี่ยนรูปแบบวันที่"]}, -7104:e=>{e.exports=["เปลี่ยนวันในสัปดาห์บนป้ายกำกับ"]},88096:e=>{e.exports=["เปลี่ยนสีเส้นกริดแนวนอน"]},2523:e=>{e.exports=["เปลี่ยนรูปแบบเส้นกริดแนวนอน"]},31325:e=>{e.exports=["เปลี่ยนการมองเห็นชื่ออินดิเคเตอร์"]},99774:e=>{e.exports=["เปลี่ยนการมองเห็นค่าอินดิเคเตอร์"]},96162:e=>{e.exports=["เปลี่ยนการมองเห็นอาร์กิวเมนต์อินดิเคเตอร์"]},59820:e=>{e.exports=["เปลี่ยนอินดิเคเตอร์และการมองเห็นป้ายชื่อการเงิน"]},90512:e=>{e.exports=["เปลี่ยนอินดิเคเตอร์และการมองเห็นฉลากมูลค่าทางการเงิน"]},97956:e=>{e.exports=["เปลี่ยนความโปร่งใสพื้นหลังคำอธิบาย"]},61061:e=>{e.exports=["เปลี่ยนการมองเห็นพื้นหลังคำอธิบาย"]},37730:e=>{e.exports=["เปลี่ยนการมองเห็นปุ่มหน้าต่างเสริม"]},89032:e=>{e.exports=["เปลี่ยนสีตัวคั่นบานหน้าต่าง"]},35636:e=>{e.exports=["เปลี่ยนระยะขอบด้านขวา"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["เปลี่ยนสีสัญลักษณ์ลายน้ำ"]},87159:e=>{e.exports=["เปลี่ยนการมองเห็นสัญลักษณ์ลายน้ำ"]},26717:e=>{e.exports=["เปลี่ยนการมองเห็นคำอธิบายสัญลักษณ์"]},28741:e=>{e.exports=["เปลี่ยนโหมดสัญลักษณ์ค่าสุดท้าย"]},95071:e=>{e.exports=["เปลี่ยนรูปแบบคำอธิบายสัญลักษณ์"]},35065:e=>{e.exports=["เปลี่ยนสีสเกลข้อความ"]},84382:e=>{e.exports=["เปลี่ยนขนาดสเกลตัวอักษร"]},12468:e=>{e.exports=["เปลี่ยนสีสเกลเส้น"]},71589:e=>{e.exports=["เปลี่ยนการมองเห็นตัวแบ่งเซสชั่น"]},15035:e=>{e.exports=["เปลี่ยนความกว้างตัวแบ่งเซสชั่น"]},1579:e=>{e.exports=["เปลี่ยนสีตัวแบ่งเซสชั่น"]},21460:e=>{e.exports=["เปลี่ยนรูปแบบตัวแบ่งเซสชั่น"]},76991:e=>{e.exports=["เปลี่ยนรูปแบบชั่วโมงเวลา"]},98905:e=>{e.exports=["เปลี่ยนระยะขอบด้านบน"]},7011:e=>{e.exports=["เปลี่ยนการมองเห็นป้ายหน่วย"]},22722:e=>{e.exports=["เปลี่ยนสีเส้นกริดแนวตั้ง"]},22867:e=>{e.exports=["เปลี่ยนรูปแบบเส้นกริดแนวตั้ง"]},9455:e=>{e.exports=["เปลี่ยนการมองเห็นค่าวอลุ่ม"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/th.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/th.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..2270257b --- /dev/null +++ b/charting_library/bundles/th.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports=["แท่ง"]},19648:e=>{e.exports=["12 ชั่วโมง"]},55838:e=>{e.exports=["24 ชั่วโมง"]},88364:e=>{e.exports=["รูปแบบพื้นฐานของแผนภูมิ"]},46720:e=>{e.exports=["เส้นกากบาท"]},50985:e=>{e.exports=["สกุลเงิน"]},17319:e=>{e.exports=["สกุลเงินและหน่วย"]},19481:e=>{e.exports=["รูปลักษณ์"]},68791:e=>{e.exports=["โต้เถียง"]},95036:e=>{e.exports=["เส้นราคาปิดเฉลี่ย"]},27331:e=>{e.exports=["พื้นหลัง"]},22519:e=>{e.exports=["ค่าเปลี่ยนแปลงของแท่ง"]},87845:e=>{e.exports=["ปุ่ม"]},25209:e=>{e.exports=["รูปแบบวันที่"]},55090:e=>{e.exports=["วันในสัปดาห์บนป้ายกำกับ"]},29601:e=>{e.exports=["คำอธิบาย"]},26897:e=>{e.exports=["เหตุการณ์"]},95338:e=>{e.exports=["เส้นกริดแนวนอน"]},60971:e=>{e.exports=["ราคาสูงและต่ำ"]},61142:e=>{e.exports=["อินดิเคเตอร์"]},34905:e=>{e.exports=["มูลค่าของอินดิเคเตอร์"]},29687:e=>{e.exports=["อินดิเคเตอร์และฉลากมูลค่าทางการเงิน"]},25084:e=>{e.exports=["ป้ายชื่ออินดิเคเตอร์และการเงิน"]},9654:e=>{e.exports=["ป้ายชื่ออินดิเคเตอร์"]},99487:e=>{e.exports=["ราคา เปิด สูง ต่ำ และปิด OHLC ของแท่งเทียน"]},75991:e=>{e.exports=["สถานะตลาดเปิด"]},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports=["เงิน"]},66653:e=>{e.exports=["มาร์จิ้น"]},42502:e=>{e.exports=["ไม่มีป้ายที่ทับซ้อนกัน"]},74343:e=>{e.exports=["ปุ่มนำทาง"]},43115:e=>{e.exports=["มาตราส่วน"]},53224:e=>{e.exports=["การวางตำแหน่งสเกล"]},79194:e=>{e.exports=["เส้นสถานะ"]},89053:e=>{e.exports=["สัญลักษณ์"]},35383:e=>{e.exports=["ชื่อสัญลักษณ์"]},27767:e=>{e.exports=["ป้ายค่าราคาล่าสุดของตัวย่อ"]},40847:e=>{e.exports=["ป้ายค่าราคาปิดวันก่อนหน้าของตัวย่อ"]},50446:e=>{e.exports=["หน้าต่างใหม่"]},73908:e=>{e.exports=["ตัวแยกบานหน้าต่าง"]},36014:e=>{e.exports=["เปอร์เซ็นต์"]},78621:e=>{e.exports=["ปิ๊ป"]},74823:e=>{e.exports=["ป้ายราคาก่อน/หลังตลาดเปิดปิด"]},64859:e=>{e.exports=["สเกลราคา"]},76523:e=>{e.exports=["ราคาและค่าเปอร์เซ็นต์"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["ลายน้ำ"]},67369:e=>{e.exports=["หัวเรื่อง"]},31326:e=>{e.exports=["ชื่อเรื่อง"]},23097:e=>{e.exports=["ทิกเกอร์"]},82168:e=>{e.exports=["ทิกเกอร์และคำอธิบาย"]},43637:e=>{e.exports=["ขนาดเวลา"]},97316:e=>{e.exports=["รูปแบบชั่วโมงเวลา"]},90801:e=>{e.exports=["การซื้อขาย"]},77534:e=>{e.exports=["หน่วย"]},1111:e=>{e.exports=["ปริมาณการซื้อขาย"]},80170:e=>{e.exports=["ค่าตามสเกล"]},91322:e=>{e.exports=["มูลค่า"]},70353:e=>{e.exports=["เส้นกริดแนวตั้ง"]},57889:e=>{e.exports=["เปลี่ยนการมองเห็นค่า OHLC"]},35646:e=>{e.exports=["เปลี่ยนการมองเห็นปุ่มนำทาง"]},18644:e=>{e.exports=["เปลี่ยนการมองเห็นสถานะตลาดเปิด"]},45110:e=>{e.exports=["เปลี่ยนการมองเห็นการเปลี่ยนบาร์"]},10349:e=>{e.exports=["เปลี่ยนระยะขอบด้านล่าง"]},88161:e=>{e.exports=["เปลี่ยนสกุลเงินและการมองเห็นป้ายหน่วย"]},79570:e=>{e.exports=["เปลี่ยนการมองเห็นป้ายสกุลเงิน"]},99011:e=>{e.exports=["เปลี่ยนสีพื้นหลังชาร์ต"]},72458:e=>{e.exports=["เปลี่ยนประเภทพื้นหลังของชาร์ต"]},37034:e=>{e.exports=["เปลี่ยนความกว้างเส้นตัด"]},29951:e=>{e.exports=["เปลี่ยนสีเส้นเส้นตัด"]},92027:e=>{e.exports=["เปลี่ยนรูปแบบเส้นตัด"]},50457:e=>{ +e.exports=["เปลี่ยนรูปแบบวันที่"]},7104:e=>{e.exports=["เปลี่ยนวันในสัปดาห์บนป้ายกำกับ"]},88096:e=>{e.exports=["เปลี่ยนสีเส้นกริดแนวนอน"]},2523:e=>{e.exports=["เปลี่ยนรูปแบบเส้นกริดแนวนอน"]},31325:e=>{e.exports=["เปลี่ยนการมองเห็นชื่ออินดิเคเตอร์"]},99774:e=>{e.exports=["เปลี่ยนการมองเห็นค่าอินดิเคเตอร์"]},96162:e=>{e.exports=["เปลี่ยนการมองเห็นอาร์กิวเมนต์อินดิเคเตอร์"]},59820:e=>{e.exports=["เปลี่ยนอินดิเคเตอร์และการมองเห็นป้ายชื่อการเงิน"]},90512:e=>{e.exports=["เปลี่ยนอินดิเคเตอร์และการมองเห็นฉลากมูลค่าทางการเงิน"]},97956:e=>{e.exports=["เปลี่ยนความโปร่งใสพื้นหลังคำอธิบาย"]},61061:e=>{e.exports=["เปลี่ยนการมองเห็นพื้นหลังคำอธิบาย"]},37730:e=>{e.exports=["เปลี่ยนการมองเห็นปุ่มหน้าต่างเสริม"]},89032:e=>{e.exports=["เปลี่ยนสีตัวคั่นบานหน้าต่าง"]},35636:e=>{e.exports=["เปลี่ยนระยะขอบด้านขวา"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["เปลี่ยนสีสัญลักษณ์ลายน้ำ"]},87159:e=>{e.exports=["เปลี่ยนการมองเห็นสัญลักษณ์ลายน้ำ"]},26717:e=>{e.exports=["เปลี่ยนการมองเห็นคำอธิบายสัญลักษณ์"]},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports=["เปลี่ยนโหมดสัญลักษณ์ค่าสุดท้าย"]},95071:e=>{e.exports=["เปลี่ยนรูปแบบคำอธิบายสัญลักษณ์"]},35065:e=>{e.exports=["เปลี่ยนสีสเกลข้อความ"]},84382:e=>{e.exports=["เปลี่ยนขนาดสเกลตัวอักษร"]},12468:e=>{e.exports=["เปลี่ยนสีสเกลเส้น"]},71589:e=>{e.exports=["เปลี่ยนการมองเห็นตัวแบ่งเซสชั่น"]},15035:e=>{e.exports=["เปลี่ยนความกว้างตัวแบ่งเซสชั่น"]},1579:e=>{e.exports=["เปลี่ยนสีตัวแบ่งเซสชั่น"]},21460:e=>{e.exports=["เปลี่ยนรูปแบบตัวแบ่งเซสชั่น"]},76991:e=>{e.exports=["เปลี่ยนรูปแบบชั่วโมงเวลา"]},98905:e=>{e.exports=["เปลี่ยนระยะขอบด้านบน"]},7011:e=>{e.exports=["เปลี่ยนการมองเห็นป้ายหน่วย"]},22722:e=>{e.exports=["เปลี่ยนสีเส้นกริดแนวตั้ง"]},22867:e=>{e.exports=["เปลี่ยนรูปแบบเส้นกริดแนวตั้ง"]},9455:e=>{e.exports=["เปลี่ยนการมองเห็นค่าวอลุ่ม"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/th.6847.490ee46270bef6a878dd.js b/charting_library/bundles/th.7257.089fbbc28bead9558b87.js similarity index 53% rename from charting_library/bundles/th.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/th.7257.089fbbc28bead9558b87.js index b2609306..bd5c78ac 100644 --- a/charting_library/bundles/th.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/th.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports=["โม"]},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports=["วันพุธ"]},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports=["ไม่สามารถรับไพน์ซอร์สโค๊ดได้"]},39589:e=>{e.exports=["ยุบบานหน้าต่าง"]},38154:e=>{e.exports=["ยืนยันการลบแผนผังการศึกษา"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["สร้างบัญชีฟรี"]},69419:e=>{e.exports=["ทุกอย่างเป็นไปได้ด้วยดี — ตลาดเปิดทำการอยู่"]},97637:e=>{e.exports=["เมษายน"]},86797:e=>{e.exports=["สิงหาคม"]},22519:e=>{e.exports=["ค่าเปลี่ยนแปลงของแท่ง"]},52003:e=>{e.exports=["คุณต้องการที่จะลบการศึกษาและรวมถึงของเด็กทั้งหมด?"]},68854:e=>{e.exports=["ดับเบิ้ลคลิก"]},97325:e=>{e.exports=["ปัญหาเกี่ยวกับข้อมูล"]},52916:e=>{e.exports=["ข้อมูลจะถูกอัพเดทวันละครั้ง"]},25978:e=>{e.exports=["ข้อมูลจะอัพเดทไม่เกินครั้งละ 1 วินาที แม้ว่าตลาดจะมีการอัพเดทเปลี่ยนแปลงมากกว่านี้"]},57310:e=>{e.exports=["ข้อมูลดีเลย์"]},49321:e=>{e.exports=["ข้อมูลสำหรับบัญชีแบบฟรีจะอัพเดทครั้งละ 1 วินาที แม้ว่าตลาดจะมีการอัพเดทเปลี่ยนแปลงมากกว่านี้"]},55669:e=>{e.exports=["ธันวาคม"]},83498:e=>{e.exports=["ลบหน้าต่าง"]},59315:e=>{e.exports=["ข้อมูลแบบสิ้นวัน"]},82751:e=>{e.exports=["ผิดพลาด"]},40519:e=>{e.exports=["ตอนค่ำ ตลาดเปิดอยู่สำหรับการเทรดหลังตลาดปิดเท่านั้น"]},80227:e=>{e.exports=["เขตเวลาตลาดหลักทรัพย์"]},16467:e=>{e.exports=["กุมภาพันธ์"]},25046:e=>{e.exports=["กรอกข้อตกลงการแลกเปลี่ยน"]},93666:e=>{e.exports=["ปักธงสัญลักษณ์"]},564:e=>{e.exports=["ศุกร์"]},72970:e=>{e.exports=["วันศุกร์"]},88958:e=>{e.exports=["วันหยุด"]},21686:e=>{e.exports=["ซ่อน Indicator Legend"]},26935:e=>{e.exports=["ตัวแปรของอินดิเคเตอร์"]},26315:e=>{e.exports=["ชื่ออินดิเคเตอร์"]},84098:e=>{e.exports=["ค่าของอินดิเคเตอร์"]},91459:e=>{e.exports=["หากคุณต้องการ {listedExchange} ข้อมูลแบบเรียลไทม์ คุณจะต้องทำข้อตกลงการแลกเปลี่ยนให้สมบูรณ์ ไม่ต้องกังวล ใช้เวลาเพียงไม่กี่คลิกเท่านั้น"]},50634:e=>{e.exports=["จะเข้าสู่การซื้อขายหลังเวลาทำการใน {remainingTime}"]},74537:e=>{e.exports=["จะเปิดให้ซื้อขายล่วงหน้าใน {remainingTime}"]},26910:e=>{e.exports=["มกราคม"]},23230:e=>{e.exports=["กรกฎาคม"]},49385:e=>{e.exports=["มิถุนายน"]},99487:e=>{e.exports=["ราคา เปิด สูง ต่ำ และปิด OHLC ของแท่งเทียน"]},15815:e=>{e.exports=["อัพเดท 1 ครั้งต่อวินาที"]},90784:e=>{e.exports=["ตุลาคม"]},75991:e=>{e.exports=["สถานะตลาดเปิด"]},18429:e=>{e.exports=["เรียนรู้เพิ่มเติม"]},39899:e=>{e.exports=["ย้ายหน้าต่างลง"]},70343:e=>{e.exports=["ย้ายหน้าต่างขึ้น"]},83085:e=>{e.exports=["จันทร์"]},61199:e=>{e.exports=["วันจันทร์"]},41610:e=>{e.exports=["เพิ่มเติม"]},1653:e=>{e.exports=["ตอนเช้า ตลาดเปิดอยู่สำหรับการเทรดแบบก่อนตลาดเปิดเท่านั้น"]},56470:e=>{e.exports=["ขยายชาร์ตให้ใหญ่สุด"]},19603:e=>{e.exports=["ขยายหน้าต่างให้ใหญ่สุด"]},68327:e=>{e.exports=["พ.ค."]},35732:e=>{e.exports=["จัดการหน้าต่าง"]},84675:e=>{e.exports=["มีนาคม"]},83949:e=>{e.exports=["ตลาดเปิด"]},35701:e=>{e.exports=["ตลาดจะเปิดใน {remainingTime}"]},95814:e=>{e.exports=["ตลาดปิด"]},98105:e=>{ -e.exports=["ตลาดจะปิดใน {remainingTime}"]},87202:e=>{e.exports=["ขณะนี้ตลาดอยู่ในช่วงวันหยุด โชคดีจัง"]},71194:e=>{e.exports=["พฤศจิกายน"]},66324:e=>{e.exports=["ซอร์สโค้ด"]},36835:e=>{e.exports=["เสาร์"]},1144:e=>{e.exports=["เสาร์"]},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports=["กันยายน"]},28705:e=>{e.exports=["แสดง Indicator Legend"]},51072:e=>{e.exports=["แสดงแผนผังวัตถุ"]},37809:e=>{e.exports=["แสดงการตั้งค่าช่วงเวลา"]},39045:e=>{e.exports=["Study มีความผิดพลาด"]},86577:e=>{e.exports=["อาทิตย์"]},72149:e=>{e.exports=["อาทิตย์"]},39339:e=>{e.exports=["ชื่อสัญลักษณ์"]},29985:e=>{e.exports=["หลังตลาดปิด"]},28412:e=>{e.exports=["แผนแบบมีค่าใช้จ่ายจะมีฟีเจอร์ของการอัพเดทข้อมูลที่รวดเร็วกว่า"]},56042:e=>{e.exports=["ก่อนตลาดเปิด"]},36015:e=>{e.exports=["ข้อมูลแบบเรียลไทม์สำหรับ {description} ยังไม่มีรองรับในตอนนี้ โดยในอนาคตอาจมีรองรับได้"]},6667:e=>{e.exports=["ข้อมูลแบบเรียลไทม์สำหรับ {symbolName} ได้รับมาจากตลาดหลักทรัพย์ {exchange}"]},48293:e=>{e.exports=["นำชาร์ตกลับมาใหม่"]},91029:e=>{e.exports=["นำหน้าต่างกลับมาใหม่"]},75094:e=>{e.exports=["พุธ"]},7147:e=>{e.exports=["พุธ"]},52984:e=>{e.exports=["กรณีต้องการได้รับข้อมูลแบบเรียลไทม์สำหรับ {description} กรุณาซื้อแพ็คเกจข้อมูลแบบเรียลไทม์"]},9787:e=>{e.exports=["พฤหัสบดี"]},7951:e=>{e.exports=["พฤหัสบดี"]},57918:e=>{e.exports=["ข้อมูลนี้เป็นแบบเรียลไทม์ แต่มันจะแตกต่างไปเล็กน้อยจากข้อมูลของบริษัทคู่ค้าอย่างเป็นทางการจากตลาดหลักทรัพย์หลัก"]},68025:e=>{e.exports=["ข้อมูลนี้เป็นข้อมูลแบบเรียลไทม์ แต่ต่างจากข้อมูลที่มาจาก {exchange} เล็กน้อย"]},73717:e=>{e.exports=["ไม่มีสัญลักษณ์ตัวย่ออันนี้ กรุณาเลือกสัญลักษณ์ตัวย่ออันอื่น"]},57048:e=>{e.exports=["ได้เวลาไปเดินเล่น — ตลาดนี้ได้ปิดลงแล้ว"]},94316:e=>{e.exports=["อังคาร"]},44979:e=>{e.exports=["อังคาร"]},8209:e=>{e.exports=["ยกเลิกปักธงสัญลักษณ์"]},1111:e=>{e.exports=["ปริมาณการซื้อขาย"]},61311:e=>{e.exports=["ขยายเข้า"]},47602:e=>{e.exports=["ขยายออก"]},57889:e=>{e.exports=["เปลี่ยนการมองเห็นค่า OHLC"]},18644:e=>{e.exports=["เปลี่ยนการมองเห็นสถานะตลาดเปิด"]},45110:e=>{e.exports=["เปลี่ยนการมองเห็นการเปลี่ยนบาร์"]},31325:e=>{e.exports=["เปลี่ยนการมองเห็นชื่ออินดิเคเตอร์"]},99774:e=>{e.exports=["เปลี่ยนการมองเห็นค่าอินดิเคเตอร์"]},96162:e=>{e.exports=["เปลี่ยนการมองเห็นอาร์กิวเมนต์อินดิเคเตอร์"]},26717:e=>{e.exports=["เปลี่ยนการมองเห็นคำอธิบายสัญลักษณ์"]},9455:e=>{e.exports=["เปลี่ยนการมองเห็นค่าวอลุ่ม"]},39348:e=>{e.exports=["น้อยกว่า 1 นาที"]},87358:e=>{e.exports=["แสดง {title}"]},7827:e=>{e.exports=["{days} และ {hours}"]},7435:e=>{e.exports=["{exchange} โดย{originalExchange}"]},19830:e=>{e.exports=["{hours} และ {minutes}"]},1084:e=>{e.exports=["ข้อมูลแบบเรียลไทม์ของ {listedExchange} มีให้บริการโดยไม่มีค่าใช้จ่าย สำหรับผู้ใช้งานที่ลงทะเบียนใช้งาน"]},11155:e=>{e.exports=["ข้อมูล {symbolName} ดีเลย์ {time} นาที"]},77033:e=>{e.exports=["ข้อมูลจะอัปเดตทุกๆ {amount} วินาที แม้ว่าจะมีการอัปเดตเพิ่มเติมในตลาดก็ตาม"]},2121:e=>{ -e.exports=["ข้อมูลในแผนพื้นฐานของเราได้รับการอัปเดตทุกๆ {amount} วินาที แม้ว่าจะมีการอัปเดตเพิ่มเติมในตลาดก็ตาม"]},5223:e=>{e.exports=["อัปเดตหนึ่งครั้งทุกๆ {amount} วินาที"]},58609:e=>{e.exports=["{number} วัน"]},24430:e=>{e.exports=["{number} ชั่วโมง"]},67151:e=>{e.exports=["{number} นาที"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports="Fr"},11268:e=>{e.exports=["โม"]},63331:e=>{e.exports="Sa"},85954:e=>{e.exports="Su"},26230:e=>{e.exports=["วันพุธ"]},24793:e=>{e.exports="Th"},31533:e=>{e.exports="Tu"},89790:e=>{e.exports=["ไม่สามารถรับไพน์ซอร์สโค๊ดได้"]},39589:e=>{e.exports=["ยุบบานหน้าต่าง"]},38154:e=>{e.exports=["ยืนยันการลบแผนผังการศึกษา"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["สร้างบัญชีฟรี"]},69419:e=>{e.exports=["ทุกอย่างเป็นไปได้ด้วยดี — ตลาดเปิดทำการอยู่"]},97637:e=>{e.exports=["เมษายน"]},86797:e=>{e.exports=["สิงหาคม"]},22519:e=>{e.exports=["ค่าเปลี่ยนแปลงของแท่ง"]},52003:e=>{e.exports=["คุณต้องการที่จะลบการศึกษาและรวมถึงของเด็กทั้งหมด?"]},68854:e=>{e.exports=["ดับเบิ้ลคลิก"]},97325:e=>{e.exports=["ปัญหาเกี่ยวกับข้อมูล"]},52916:e=>{e.exports=["ข้อมูลจะถูกอัพเดทวันละครั้ง"]},25978:e=>{e.exports=["ข้อมูลจะอัพเดทไม่เกินครั้งละ 1 วินาที แม้ว่าตลาดจะมีการอัพเดทเปลี่ยนแปลงมากกว่านี้"]},57310:e=>{e.exports=["ข้อมูลดีเลย์"]},49321:e=>{e.exports=["ข้อมูลสำหรับบัญชีแบบฟรีจะอัพเดทครั้งละ 1 วินาที แม้ว่าตลาดจะมีการอัพเดทเปลี่ยนแปลงมากกว่านี้"]},55669:e=>{e.exports=["ธันวาคม"]},83498:e=>{e.exports=["ลบหน้าต่าง"]},59315:e=>{e.exports=["ข้อมูลแบบสิ้นวัน"]},82751:e=>{e.exports=["ผิดพลาด"]},40519:e=>{e.exports=["ตอนค่ำ ตลาดเปิดอยู่สำหรับการเทรดหลังตลาดปิดเท่านั้น"]},80227:e=>{e.exports=["เขตเวลาตลาดหลักทรัพย์"]},16467:e=>{e.exports=["กุมภาพันธ์"]},25046:e=>{e.exports=["กรอกข้อตกลงการแลกเปลี่ยน"]},93666:e=>{e.exports=["ปักธงสัญลักษณ์"]},564:e=>{e.exports=["ศุกร์"]},72970:e=>{e.exports=["วันศุกร์"]},88958:e=>{e.exports=["วันหยุด"]},21686:e=>{e.exports=["ซ่อน Indicator Legend"]},26935:e=>{e.exports=["ตัวแปรของอินดิเคเตอร์"]},26315:e=>{e.exports=["ชื่ออินดิเคเตอร์"]},84098:e=>{e.exports=["ค่าของอินดิเคเตอร์"]},91459:e=>{e.exports=["หากคุณต้องการ {listedExchange} ข้อมูลแบบเรียลไทม์ คุณจะต้องทำข้อตกลงการแลกเปลี่ยนให้สมบูรณ์ ไม่ต้องกังวล ใช้เวลาเพียงไม่กี่คลิกเท่านั้น"]},50634:e=>{e.exports=["จะเข้าสู่การซื้อขายหลังเวลาทำการใน {remainingTime}"]},74537:e=>{e.exports=["จะเปิดให้ซื้อขายล่วงหน้าใน {remainingTime}"]},26910:e=>{e.exports=["มกราคม"]},23230:e=>{e.exports=["กรกฎาคม"]},49385:e=>{e.exports=["มิถุนายน"]},99487:e=>{e.exports=["ราคา เปิด สูง ต่ำ และปิด OHLC ของแท่งเทียน"]},15815:e=>{e.exports=["อัพเดท 1 ครั้งต่อวินาที"]},90784:e=>{e.exports=["ตุลาคม"]},75991:e=>{e.exports=["สถานะตลาดเปิด"]},18429:e=>{e.exports=["เรียนรู้เพิ่มเติม"]},39899:e=>{e.exports=["ย้ายหน้าต่างลง"]},70343:e=>{e.exports=["ย้ายหน้าต่างขึ้น"]},83085:e=>{e.exports=["จันทร์"]},61199:e=>{e.exports=["วันจันทร์"]},41610:e=>{e.exports=["เพิ่มเติม"]},1653:e=>{e.exports=["ตอนเช้า ตลาดเปิดอยู่สำหรับการเทรดแบบก่อนตลาดเปิดเท่านั้น"]},56470:e=>{e.exports=["ขยายชาร์ตให้ใหญ่สุด"]},19603:e=>{e.exports=["ขยายหน้าต่างให้ใหญ่สุด"]},68327:e=>{e.exports=["พ.ค."]},35732:e=>{e.exports=["จัดการหน้าต่าง"]},84675:e=>{e.exports=["มีนาคม"]},83949:e=>{e.exports=["ตลาดเปิด"]},35701:e=>{e.exports=["ตลาดจะเปิดใน {remainingTime}"]},95814:e=>{e.exports=["ตลาดปิด"]},98105:e=>{ +e.exports=["ตลาดจะปิดใน {remainingTime}"]},87202:e=>{e.exports=["ขณะนี้ตลาดอยู่ในช่วงวันหยุด โชคดีจัง"]},71194:e=>{e.exports=["พฤศจิกายน"]},66324:e=>{e.exports=["ซอร์สโค้ด"]},36835:e=>{e.exports=["เสาร์"]},1144:e=>{e.exports=["เสาร์"]},40653:e=>{e.exports="Scroll to the left"},26721:e=>{e.exports="Scroll to the most recent bar"},35809:e=>{e.exports="Scroll to the right"},61132:e=>{e.exports=["กันยายน"]},28705:e=>{e.exports=["แสดง Indicator Legend"]},51072:e=>{e.exports=["แสดงแผนผังวัตถุ"]},37809:e=>{e.exports=["แสดงการตั้งค่าช่วงเวลา"]},39045:e=>{e.exports=["Study มีความผิดพลาด"]},86577:e=>{e.exports=["อาทิตย์"]},72149:e=>{e.exports=["อาทิตย์"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["ชื่อสัญลักษณ์"]},29985:e=>{e.exports=["หลังตลาดปิด"]},28412:e=>{e.exports=["แผนแบบมีค่าใช้จ่ายจะมีฟีเจอร์ของการอัพเดทข้อมูลที่รวดเร็วกว่า"]},56042:e=>{e.exports=["ก่อนตลาดเปิด"]},36015:e=>{e.exports=["ข้อมูลแบบเรียลไทม์สำหรับ {description} ยังไม่มีรองรับในตอนนี้ โดยในอนาคตอาจมีรองรับได้"]},6667:e=>{e.exports=["ข้อมูลแบบเรียลไทม์สำหรับ {symbolName} ได้รับมาจากตลาดหลักทรัพย์ {exchange}"]},48293:e=>{e.exports=["นำชาร์ตกลับมาใหม่"]},91029:e=>{e.exports=["นำหน้าต่างกลับมาใหม่"]},75094:e=>{e.exports=["พุธ"]},7147:e=>{e.exports=["พุธ"]},52984:e=>{e.exports=["กรณีต้องการได้รับข้อมูลแบบเรียลไทม์สำหรับ {description} กรุณาซื้อแพ็คเกจข้อมูลแบบเรียลไทม์"]},9787:e=>{e.exports=["พฤหัสบดี"]},7951:e=>{e.exports=["พฤหัสบดี"]},57918:e=>{e.exports=["ข้อมูลนี้เป็นแบบเรียลไทม์ แต่มันจะแตกต่างไปเล็กน้อยจากข้อมูลของบริษัทคู่ค้าอย่างเป็นทางการจากตลาดหลักทรัพย์หลัก"]},68025:e=>{e.exports=["ข้อมูลนี้เป็นข้อมูลแบบเรียลไทม์ แต่ต่างจากข้อมูลที่มาจาก {exchange} เล็กน้อย"]},73717:e=>{e.exports=["ไม่มีสัญลักษณ์ตัวย่ออันนี้ กรุณาเลือกสัญลักษณ์ตัวย่ออันอื่น"]},57048:e=>{e.exports=["ได้เวลาไปเดินเล่น — ตลาดนี้ได้ปิดลงแล้ว"]},94316:e=>{e.exports=["อังคาร"]},44979:e=>{e.exports=["อังคาร"]},8209:e=>{e.exports=["ยกเลิกปักธงสัญลักษณ์"]},1111:e=>{e.exports=["ปริมาณการซื้อขาย"]},61311:e=>{e.exports=["ขยายเข้า"]},47602:e=>{e.exports=["ขยายออก"]},57889:e=>{e.exports=["เปลี่ยนการมองเห็นค่า OHLC"]},18644:e=>{e.exports=["เปลี่ยนการมองเห็นสถานะตลาดเปิด"]},45110:e=>{e.exports=["เปลี่ยนการมองเห็นการเปลี่ยนบาร์"]},31325:e=>{e.exports=["เปลี่ยนการมองเห็นชื่ออินดิเคเตอร์"]},99774:e=>{e.exports=["เปลี่ยนการมองเห็นค่าอินดิเคเตอร์"]},96162:e=>{e.exports=["เปลี่ยนการมองเห็นอาร์กิวเมนต์อินดิเคเตอร์"]},26717:e=>{e.exports=["เปลี่ยนการมองเห็นคำอธิบายสัญลักษณ์"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["เปลี่ยนการมองเห็นค่าวอลุ่ม"]},39348:e=>{e.exports=["น้อยกว่า 1 นาที"]},87358:e=>{e.exports=["แสดง {title}"]},7827:e=>{e.exports=["{days} และ {hours}"]},7435:e=>{e.exports=["{exchange} โดย{originalExchange}"]},19830:e=>{e.exports=["{hours} และ {minutes}"]},1084:e=>{e.exports=["ข้อมูลแบบเรียลไทม์ของ {listedExchange} มีให้บริการโดยไม่มีค่าใช้จ่าย สำหรับผู้ใช้งานที่ลงทะเบียนใช้งาน"]},11155:e=>{e.exports=["ข้อมูล {symbolName} ดีเลย์ {time} นาที"]},77033:e=>{e.exports=["ข้อมูลจะอัปเดตทุกๆ {amount} วินาที แม้ว่าจะมีการอัปเดตเพิ่มเติมในตลาดก็ตาม"]}, +2121:e=>{e.exports=["ข้อมูลในแผนพื้นฐานของเราได้รับการอัปเดตทุกๆ {amount} วินาที แม้ว่าจะมีการอัปเดตเพิ่มเติมในตลาดก็ตาม"]},5223:e=>{e.exports=["อัปเดตหนึ่งครั้งทุกๆ {amount} วินาที"]},58609:e=>{e.exports=["{number} วัน"]},24430:e=>{e.exports=["{number} ชั่วโมง"]},67151:e=>{e.exports=["{number} นาที"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/tr.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/tr.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 69f022b4..00000000 --- a/charting_library/bundles/tr.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports=["çubuklar"]},19648:e=>{e.exports=["12-saat"]},55838:e=>{e.exports=["24-saat"]},88364:e=>{e.exports=["Basit grafik stilleri"]},46720:e=>{e.exports=["Artı işareti"]},50985:e=>{e.exports=["Döviz"]},17319:e=>{e.exports=["Para Birimi ve Birim"]},19481:e=>{e.exports=["Görünüm"]},68791:e=>{e.exports=["Argümanlar"]},95036:e=>{e.exports=["Ortalama kapanış fiyatı"]},27331:e=>{e.exports=["Arkaplan"]},22519:e=>{e.exports=["Çubuk Değişim Değeri"]},87845:e=>{e.exports=["Tuşlar"]},25209:e=>{e.exports=["Tarih biçimi"]},55090:e=>{e.exports=["Zaman çizelgesi etiketlerinde haftanın günleri"]},29601:e=>{e.exports=["Açıklama"]},26897:e=>{e.exports=["Olaylar"]},95338:e=>{e.exports=["Yatay kılavuz çizgileri"]},60971:e=>{e.exports=["Yüksek ve düşük fiyat"]},61142:e=>{e.exports=["Göstergeler"]},34905:e=>{e.exports=["Gösterge değeri"]},29687:e=>{e.exports=["Göstergeler ve finansallar değerleri"]},25084:e=>{e.exports=["Göstergeler ve finansallar adı"]},9654:e=>{e.exports=["Göstergelerin adı"]},99487:e=>{e.exports=["OHLC değerler"]},75991:e=>{e.exports=["Açık piyasa durumu"]},70500:e=>{e.exports=["Para"]},66653:e=>{e.exports=["Marjlar"]},42502:e=>{e.exports=["Örtüşme kapalı"]},74343:e=>{e.exports=["Navigasyon"]},43115:e=>{e.exports=["Ölçekler"]},53224:e=>{e.exports=["Ölçekleri yerleştirme"]},79194:e=>{e.exports=["Durum çizgisi"]},89053:e=>{e.exports=["Sembol"]},35383:e=>{e.exports=["Sembol Adı"]},27767:e=>{e.exports=["Sembol son fiyat"]},40847:e=>{e.exports=["Sembol önceki gün kapanış fiyatı"]},50446:e=>{e.exports=["Bölme"]},73908:e=>{e.exports=["Bölme ayırıcıları"]},36014:e=>{e.exports=["Yüzde"]},78621:e=>{e.exports=["Pip"]},74823:e=>{e.exports=["Piyasa Öncesi/Sonrası Fiyat"]},64859:e=>{e.exports=["Fiyat Ölçeği"]},76523:e=>{e.exports=["Fiyat ve yüzdelik değeri"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Filigran"]},67369:e=>{e.exports=["Başlık"]},31326:e=>{e.exports=["Başlıklar"]},23097:e=>{e.exports=["Sembol"]},82168:e=>{e.exports=["Sembol ve açıklama"]},43637:e=>{e.exports=["Zaman Ölçeği"]},97316:e=>{e.exports=["Saat biçimi"]},90801:e=>{e.exports=["İşlem"]},77534:e=>{e.exports=["Birim"]},1111:e=>{e.exports=["Hacim"]},80170:e=>{e.exports=["Ölçeğe göre değer"]},91322:e=>{e.exports=["Değerler"]},70353:e=>{e.exports=["Dikey kılavuz çizgileri"]},57889:e=>{e.exports=["OHLC değerlerinin görünürlüğünü değiştir"]},35646:e=>{e.exports=["gezinme düğmelerinin görünürlüğünü değiştir"]},18644:e=>{e.exports=["açık piyasa durumu görünürlüğünü değiştir"]},45110:e=>{e.exports=["çubuk değiştirme görünürlüğünü değiştir"]},10349:e=>{e.exports=["alt kenar boşluğunu değiştir"]},88161:e=>{e.exports=["para birimi ve birim etiketleri görünürlüğünü değiştir"]},79570:e=>{e.exports=["para birimi etiketi görünürlüğünü değiştir"]},99011:e=>{e.exports=["grafik arka plan rengini değiştir"]},72458:e=>{e.exports=["grafik arka plan türünü değiştir"]},37034:e=>{e.exports=["artı işareti genişliğini değiştir"]},29951:e=>{e.exports=["artı işareti rengini değiştir"]}, -92027:e=>{e.exports=["artı stilini değiştir"]},50457:e=>{e.exports=["tarih biçimini dğş"]},7104:e=>{e.exports=["zaman çizelgesi etiketlerinde haftanın gününü değiştir"]},88096:e=>{e.exports=["yatay ızgara çizgilerinin rengini değiştir"]},2523:e=>{e.exports=["yatay kılavuz çizgi stilini değiştir"]},31325:e=>{e.exports=["gösterge başlıklarının görünürlüğünü değiştir"]},99774:e=>{e.exports=["gösterge değerleri görünürlüğünü değiştir"]},96162:e=>{e.exports=["gösterge argümanlarının görünürlüğünü değiştir"]},59820:e=>{e.exports=["göstergeleri ve finansal isim etiketlerinin görünürlüğünü değiştir"]},90512:e=>{e.exports=["göstergeleri ve finansal değer etiketlerinin görünürlüğünü değiştir"]},97956:e=>{e.exports=["efsane arka plan şeffaflığını değiştir"]},61061:e=>{e.exports=["efsane arka plan görünürlüğünü değiştir"]},37730:e=>{e.exports=["bölme düğmelerinin görünürlüğünü değiştir"]},89032:e=>{e.exports=["bölme ayırıcıların rengini değiştir"]},35636:e=>{e.exports=["sağ kenar boşluğunu değiştir"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["sembol filigran rengini değiştir"]},87159:e=>{e.exports=["sembol filigran görünürlüğünü değiştir"]},26717:e=>{e.exports=["sembol açıklama görünürlüğünü değiştir"]},28741:e=>{e.exports=["sembol son değer modunu dğş"]},95071:e=>{e.exports=["sembol açıklama biçimini değiştir"]},35065:e=>{e.exports=["ölçek metin rengini değiştir"]},84382:e=>{e.exports=["ölçek yazı tipi boyutunu değiştir"]},12468:e=>{e.exports=["ölçek çizgi rengini değiştir"]},71589:e=>{e.exports=["oturumları aralık görünürlüğü değiştir"]},15035:e=>{e.exports=["oturum aralık genişliği değiştir"]},1579:e=>{e.exports=["oturum aralık rengini değiştir"]},21460:e=>{e.exports=["oturum aralık stilini değiştir"]},76991:e=>{e.exports=["saat biçimini değiştir"]},98905:e=>{e.exports=["üst kenar boşluğunu değiştir"]},7011:e=>{e.exports=["birim etiketi görünürlüğünü değiştir"]},22722:e=>{e.exports=["dikey ızgara çizgilerinin rengini değiştir"]},22867:e=>{e.exports=["dikey ızgara çizgileri stilini değiştir"]},9455:e=>{e.exports=["hacim değerleri görünürlüğünü değiştir"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/tr.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/tr.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..7b555f98 --- /dev/null +++ b/charting_library/bundles/tr.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports=["çubuklar"]},19648:e=>{e.exports=["12-saat"]},55838:e=>{e.exports=["24-saat"]},88364:e=>{e.exports=["Basit grafik stilleri"]},46720:e=>{e.exports=["Artı işareti"]},50985:e=>{e.exports=["Döviz"]},17319:e=>{e.exports=["Para Birimi ve Birim"]},19481:e=>{e.exports=["Görünüm"]},68791:e=>{e.exports=["Argümanlar"]},95036:e=>{e.exports=["Ortalama kapanış fiyatı"]},27331:e=>{e.exports=["Arkaplan"]},22519:e=>{e.exports=["Çubuk Değişim Değeri"]},87845:e=>{e.exports=["Tuşlar"]},25209:e=>{e.exports=["Tarih biçimi"]},55090:e=>{e.exports=["Zaman çizelgesi etiketlerinde haftanın günleri"]},29601:e=>{e.exports=["Açıklama"]},26897:e=>{e.exports=["Olaylar"]},95338:e=>{e.exports=["Yatay kılavuz çizgileri"]},60971:e=>{e.exports=["Yüksek ve düşük fiyat"]},61142:e=>{e.exports=["Göstergeler"]},34905:e=>{e.exports=["Gösterge değeri"]},29687:e=>{e.exports=["Göstergeler ve finansallar değerleri"]},25084:e=>{e.exports=["Göstergeler ve finansallar adı"]},9654:e=>{e.exports=["Göstergelerin adı"]},99487:e=>{e.exports=["OHLC değerler"]},75991:e=>{e.exports=["Açık piyasa durumu"]},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports=["Para"]},66653:e=>{e.exports=["Marjlar"]},42502:e=>{e.exports=["Örtüşme kapalı"]},74343:e=>{e.exports=["Navigasyon"]},43115:e=>{e.exports=["Ölçekler"]},53224:e=>{e.exports=["Ölçekleri yerleştirme"]},79194:e=>{e.exports=["Durum çizgisi"]},89053:e=>{e.exports=["Sembol"]},35383:e=>{e.exports=["Sembol Adı"]},27767:e=>{e.exports=["Sembol son fiyat"]},40847:e=>{e.exports=["Sembol önceki gün kapanış fiyatı"]},50446:e=>{e.exports=["Bölme"]},73908:e=>{e.exports=["Bölme ayırıcıları"]},36014:e=>{e.exports=["Yüzde"]},78621:e=>{e.exports=["Pip"]},74823:e=>{e.exports=["Piyasa Öncesi/Sonrası Fiyat"]},64859:e=>{e.exports=["Fiyat Ölçeği"]},76523:e=>{e.exports=["Fiyat ve yüzdelik değeri"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["Filigran"]},67369:e=>{e.exports=["Başlık"]},31326:e=>{e.exports=["Başlıklar"]},23097:e=>{e.exports=["Sembol"]},82168:e=>{e.exports=["Sembol ve açıklama"]},43637:e=>{e.exports=["Zaman Ölçeği"]},97316:e=>{e.exports=["Saat biçimi"]},90801:e=>{e.exports=["İşlem"]},77534:e=>{e.exports=["Birim"]},1111:e=>{e.exports=["Hacim"]},80170:e=>{e.exports=["Ölçeğe göre değer"]},91322:e=>{e.exports=["Değerler"]},70353:e=>{e.exports=["Dikey kılavuz çizgileri"]},57889:e=>{e.exports=["OHLC değerlerinin görünürlüğünü değiştir"]},35646:e=>{e.exports=["gezinme düğmelerinin görünürlüğünü değiştir"]},18644:e=>{e.exports=["açık piyasa durumu görünürlüğünü değiştir"]},45110:e=>{e.exports=["çubuk değiştirme görünürlüğünü değiştir"]},10349:e=>{e.exports=["alt kenar boşluğunu değiştir"]},88161:e=>{e.exports=["para birimi ve birim etiketleri görünürlüğünü değiştir"]},79570:e=>{e.exports=["para birimi etiketi görünürlüğünü değiştir"]},99011:e=>{e.exports=["grafik arka plan rengini değiştir"]},72458:e=>{e.exports=["grafik arka plan türünü değiştir"]},37034:e=>{e.exports=["artı işareti genişliğini değiştir"]},29951:e=>{ +e.exports=["artı işareti rengini değiştir"]},92027:e=>{e.exports=["artı stilini değiştir"]},50457:e=>{e.exports=["tarih biçimini dğş"]},7104:e=>{e.exports=["zaman çizelgesi etiketlerinde haftanın gününü değiştir"]},88096:e=>{e.exports=["yatay ızgara çizgilerinin rengini değiştir"]},2523:e=>{e.exports=["yatay kılavuz çizgi stilini değiştir"]},31325:e=>{e.exports=["gösterge başlıklarının görünürlüğünü değiştir"]},99774:e=>{e.exports=["gösterge değerleri görünürlüğünü değiştir"]},96162:e=>{e.exports=["gösterge argümanlarının görünürlüğünü değiştir"]},59820:e=>{e.exports=["göstergeleri ve finansal isim etiketlerinin görünürlüğünü değiştir"]},90512:e=>{e.exports=["göstergeleri ve finansal değer etiketlerinin görünürlüğünü değiştir"]},97956:e=>{e.exports=["efsane arka plan şeffaflığını değiştir"]},61061:e=>{e.exports=["efsane arka plan görünürlüğünü değiştir"]},37730:e=>{e.exports=["bölme düğmelerinin görünürlüğünü değiştir"]},89032:e=>{e.exports=["bölme ayırıcıların rengini değiştir"]},35636:e=>{e.exports=["sağ kenar boşluğunu değiştir"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["sembol filigran rengini değiştir"]},87159:e=>{e.exports=["sembol filigran görünürlüğünü değiştir"]},26717:e=>{e.exports=["sembol açıklama görünürlüğünü değiştir"]},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports=["sembol son değer modunu dğş"]},95071:e=>{e.exports=["sembol açıklama biçimini değiştir"]},35065:e=>{e.exports=["ölçek metin rengini değiştir"]},84382:e=>{e.exports=["ölçek yazı tipi boyutunu değiştir"]},12468:e=>{e.exports=["ölçek çizgi rengini değiştir"]},71589:e=>{e.exports=["oturumları aralık görünürlüğü değiştir"]},15035:e=>{e.exports=["oturum aralık genişliği değiştir"]},1579:e=>{e.exports=["oturum aralık rengini değiştir"]},21460:e=>{e.exports=["oturum aralık stilini değiştir"]},76991:e=>{e.exports=["saat biçimini değiştir"]},98905:e=>{e.exports=["üst kenar boşluğunu değiştir"]},7011:e=>{e.exports=["birim etiketi görünürlüğünü değiştir"]},22722:e=>{e.exports=["dikey ızgara çizgilerinin rengini değiştir"]},22867:e=>{e.exports=["dikey ızgara çizgileri stilini değiştir"]},9455:e=>{e.exports=["hacim değerleri görünürlüğünü değiştir"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/tr.6847.490ee46270bef6a878dd.js b/charting_library/bundles/tr.7257.089fbbc28bead9558b87.js similarity index 52% rename from charting_library/bundles/tr.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/tr.7257.089fbbc28bead9558b87.js index a7f018b8..eff73e1c 100644 --- a/charting_library/bundles/tr.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/tr.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports=["Cum"]},11268:e=>{e.exports=["Pzt"]},63331:e=>{e.exports=["Cmt"]},85954:e=>{e.exports=["Paz"]},26230:e=>{e.exports=["Çar"]},24793:e=>{e.exports=["Per"]},31533:e=>{e.exports=["Sal"]},89790:e=>{e.exports=["Pine kaynak kodu alınamadı."]},39589:e=>{e.exports=["Paneli kapat"]},38154:e=>{e.exports=["Nesneler Ağacı Kaldırmayı Onayla"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Ücretsiz bir hesap oluştur"]},69419:e=>{e.exports=["Her şey yolunda — Piyasa açık."]},97637:e=>{e.exports=["Nisan"]},86797:e=>{e.exports=["Ağustos"]},22519:e=>{e.exports=["Çubuk Değişim Değeri"]},52003:e=>{e.exports=["Çalışmayı ve tüm bağlı olanları silmek istediğinizden emin misiniz?"]},68854:e=>{e.exports=["Çift tıklama"]},97325:e=>{e.exports=["Veri sorunu"]},52916:e=>{e.exports=["Veriler, günde bir kez güncellenir."]},25978:e=>{e.exports=["Piyasada daha fazla güncelleme olsa bile, veriler saniyede bir güncellenir."]},57310:e=>{e.exports=["Veri gecikti"]},49321:e=>{e.exports=["Basic planımızdaki veriler, piyasada daha fazla güncelleme olsa bile saniyede bir güncellenir."]},55669:e=>{e.exports=["Aralık"]},83498:e=>{e.exports=["Bölmeyi sil"]},59315:e=>{e.exports=["Gün sonu verileri"]},82751:e=>{e.exports=["Hata"]},40519:e=>{e.exports=["Akşam. Piyasa, piyasa sonrası işleme açıktır."]},80227:e=>{e.exports=["Borsa saat dilimi"]},16467:e=>{e.exports=["Şubat"]},25046:e=>{e.exports=["Borsa Sözleşmelerini doldurun"]},93666:e=>{e.exports=["Sembolü işaretle"]},564:e=>{e.exports=["Cum"]},72970:e=>{e.exports=["Cuma"]},88958:e=>{e.exports=["Tatil"]},21686:e=>{e.exports=["Gösterge Bölmesini Gizle"]},26935:e=>{e.exports=["Gösterge Argümanları"]},26315:e=>{e.exports=["Göstergenin adı"]},84098:e=>{e.exports=["Gösterge değerleri"]},91459:e=>{e.exports=["Gerçek zamanlı verileri {listedExchange} istiyorsanız, bir Borsa Sözleşmesini tamamlamanız gerekir. Merak etmeyin, sadece birkaç tıklama alır"]},50634:e=>{e.exports=["{remainingTime} içinde piyasa sonrası işlemlere gidecek."]},74537:e=>{e.exports=["{remainingTime} içinde piyasa öncesi işlem açılacak."]},26910:e=>{e.exports=["Ocak"]},23230:e=>{e.exports=["Temmuz"]},49385:e=>{e.exports=["Haziran"]},99487:e=>{e.exports=["OHLC değerler"]},15815:e=>{e.exports=["Saniyede bir güncelleme"]},90784:e=>{e.exports=["Ekim"]},75991:e=>{e.exports=["Açık piyasa durumu"]},18429:e=>{e.exports=["Daha fazla öğren"]},39899:e=>{e.exports=["Bölmeyi aşağı taşı"]},70343:e=>{e.exports=["Bölmeyi yukarı taşı"]},83085:e=>{e.exports=["Pzt"]},61199:e=>{e.exports=["Pazartesi"]},41610:e=>{e.exports=["Daha Fazla"]},1653:e=>{e.exports=["Sabah. Piyasa, piyasa öncesi işleme açıktır."]},56470:e=>{e.exports=["Grafiği azami genişlet"]},19603:e=>{e.exports=["Bölmeyi azami genişlet"]},68327:e=>{e.exports="May"},35732:e=>{e.exports=["Bölmeleri yönet"]},84675:e=>{e.exports=["Mart"]},83949:e=>{e.exports=["Piyasa açık"]},35701:e=>{e.exports=["Piyasa {remainingTime} içinde açılır."]},95814:e=>{e.exports=["Piyasa kapalı"]},98105:e=>{ -e.exports=["Piyasa {remainingTime} içinde kapanır."]},87202:e=>{e.exports=["Market şu anda tatilde. Şanslılar."]},71194:e=>{e.exports=["Kasım"]},66324:e=>{e.exports=["Kaynak kodu"]},36835:e=>{e.exports=["Cmt"]},1144:e=>{e.exports=["Cumartesi"]},40653:e=>{e.exports=["Sola kaydır"]},26721:e=>{e.exports=["En son çubuğa kaydır"]},35809:e=>{e.exports=["Sağa kaydır"]},61132:e=>{e.exports=["Eylül"]},28705:e=>{e.exports=["Gösterge Bölmesini Göster"]},51072:e=>{e.exports=["Nesnelerin Ağacını Göster"]},37809:e=>{e.exports=["Aralık ayarlarını göster"]},39045:e=>{e.exports=["Çalışma Hatası"]},86577:e=>{e.exports=["Paz"]},72149:e=>{e.exports=["Pazar"]},39339:e=>{e.exports=["Sembol başlığı"]},29985:e=>{e.exports=["Kapanış-sonrası"]},28412:e=>{e.exports=["Ücretli planlar daha hızlı veri güncellemeleri içerir."]},56042:e=>{e.exports=["Açılış-öncesi"]},36015:e=>{e.exports=["{description} için gerçek-zamanlı veriler şu an sağlanamıyor. Gelecekte bunu destekleyebiliriz."]},6667:e=>{e.exports=["{symbolName} için gerçek zamanlı veriler, {exchange} borsası tarafından sağlanır."]},48293:e=>{e.exports=["Grafiği geri yükle"]},91029:e=>{e.exports=["Bölmeyi geri yükle"]},75094:e=>{e.exports=["Çar"]},7147:e=>{e.exports=["Çarşamba"]},52984:e=>{e.exports=["{description} 'a dair gerçek zamanlı veri almak için lütfen gerçek zamanlı veri paketini satın alın."]},9787:e=>{e.exports=["Per"]},7951:e=>{e.exports=["Perşembe"]},57918:e=>{e.exports=["Bu veriler gerçek zamanlıdır, ancak birincil bir borsa'nın resmiyetteki benzerlerinden biraz farklıdır."]},68025:e=>{e.exports=["Bu veriler gerçek zamanlıdır, ancak {exchange} 'den gelen resmi muadilinden biraz farklıdır."]},73717:e=>{e.exports=["Bu sembol mevcut değil, lütfen başka bir sembol seçin."]},57048:e=>{e.exports=["Yürüyüş zamanı — bu piyasa kapalı."]},94316:e=>{e.exports=["Sal"]},44979:e=>{e.exports=["Salı"]},8209:e=>{e.exports=["Sembol bayrağını kaldır"]},1111:e=>{e.exports=["Hacim"]},61311:e=>{e.exports=["Yaklaş"]},47602:e=>{e.exports=["Uzaklaş"]},57889:e=>{e.exports=["OHLC değerlerinin görünürlüğünü değiştir"]},18644:e=>{e.exports=["açık piyasa durumu görünürlüğünü değiştir"]},45110:e=>{e.exports=["çubuk değiştirme görünürlüğünü değiştir"]},31325:e=>{e.exports=["gösterge başlıklarının görünürlüğünü değiştir"]},99774:e=>{e.exports=["gösterge değerleri görünürlüğünü değiştir"]},96162:e=>{e.exports=["gösterge argümanlarının görünürlüğünü değiştir"]},26717:e=>{e.exports=["sembol açıklama görünürlüğünü değiştir"]},9455:e=>{e.exports=["hacim değerleri görünürlüğünü değiştir"]},39348:e=>{e.exports=["1 dakikadan az"]},87358:e=>{e.exports=["{title} göster"]},7827:e=>{e.exports=["{days} ve {hours}"]},7435:e=>{e.exports=["{originalExchange} tarafından {exchange}"]},19830:e=>{e.exports=["{hours} ve {minutes}"]},1084:e=>{e.exports=["{listedExchange} gerçek-zamanlı veriler, kayıtlı kullanıcılar tarafından ücretsiz olarak kullanılabilir."]},11155:e=>{e.exports=["{symbolName} verileri {time} dakika gecikti."]},77033:e=>{ -e.exports=["Piyasada daha fazla güncelleme olsa bile veriler her {amount} saniyede bir güncellenir.","Piyasada daha fazla güncelleme olsa bile veriler her {amount} saniyede bir güncellenir."]},2121:e=>{e.exports=["Temel planımızdaki veriler, piyasada daha fazla güncelleme olsa bile her {amount} saniyede bir güncellenir.","Temel planımızdaki veriler, piyasada daha fazla güncelleme olsa bile her {amount} saniyede bir güncellenir."]},5223:e=>{e.exports=["Her {amount} saniyede bir güncelleme","Her {amount} saniyede bir güncelleme"]},58609:e=>{e.exports=["{number} gün","{number} gün"]},24430:e=>{e.exports=["{number} saat","{number} saat"]},67151:e=>{e.exports=["{number} dakika","{number} dakika"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports=["Cum"]},11268:e=>{e.exports=["Pzt"]},63331:e=>{e.exports=["Cmt"]},85954:e=>{e.exports=["Paz"]},26230:e=>{e.exports=["Çar"]},24793:e=>{e.exports=["Per"]},31533:e=>{e.exports=["Sal"]},89790:e=>{e.exports=["Pine kaynak kodu alınamadı."]},39589:e=>{e.exports=["Paneli kapat"]},38154:e=>{e.exports=["Nesneler Ağacı Kaldırmayı Onayla"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["Ücretsiz bir hesap oluştur"]},69419:e=>{e.exports=["Her şey yolunda — Piyasa açık."]},97637:e=>{e.exports=["Nisan"]},86797:e=>{e.exports=["Ağustos"]},22519:e=>{e.exports=["Çubuk Değişim Değeri"]},52003:e=>{e.exports=["Çalışmayı ve tüm bağlı olanları silmek istediğinizden emin misiniz?"]},68854:e=>{e.exports=["Çift tıklama"]},97325:e=>{e.exports=["Veri sorunu"]},52916:e=>{e.exports=["Veriler, günde bir kez güncellenir."]},25978:e=>{e.exports=["Piyasada daha fazla güncelleme olsa bile, veriler saniyede bir güncellenir."]},57310:e=>{e.exports=["Veri gecikti"]},49321:e=>{e.exports=["Basic planımızdaki veriler, piyasada daha fazla güncelleme olsa bile saniyede bir güncellenir."]},55669:e=>{e.exports=["Aralık"]},83498:e=>{e.exports=["Bölmeyi sil"]},59315:e=>{e.exports=["Gün sonu verileri"]},82751:e=>{e.exports=["Hata"]},40519:e=>{e.exports=["Akşam. Piyasa, piyasa sonrası işleme açıktır."]},80227:e=>{e.exports=["Borsa saat dilimi"]},16467:e=>{e.exports=["Şubat"]},25046:e=>{e.exports=["Borsa Sözleşmelerini doldurun"]},93666:e=>{e.exports=["Sembolü işaretle"]},564:e=>{e.exports=["Cum"]},72970:e=>{e.exports=["Cuma"]},88958:e=>{e.exports=["Tatil"]},21686:e=>{e.exports=["Gösterge Bölmesini Gizle"]},26935:e=>{e.exports=["Gösterge Argümanları"]},26315:e=>{e.exports=["Göstergenin adı"]},84098:e=>{e.exports=["Gösterge değerleri"]},91459:e=>{e.exports=["Gerçek zamanlı verileri {listedExchange} istiyorsanız, bir Borsa Sözleşmesini tamamlamanız gerekir. Merak etmeyin, sadece birkaç tıklama alır"]},50634:e=>{e.exports=["{remainingTime} içinde piyasa sonrası işlemlere gidecek."]},74537:e=>{e.exports=["{remainingTime} içinde piyasa öncesi işlem açılacak."]},26910:e=>{e.exports=["Ocak"]},23230:e=>{e.exports=["Temmuz"]},49385:e=>{e.exports=["Haziran"]},99487:e=>{e.exports=["OHLC değerler"]},15815:e=>{e.exports=["Saniyede bir güncelleme"]},90784:e=>{e.exports=["Ekim"]},75991:e=>{e.exports=["Açık piyasa durumu"]},18429:e=>{e.exports=["Daha fazla öğren"]},39899:e=>{e.exports=["Bölmeyi aşağı taşı"]},70343:e=>{e.exports=["Bölmeyi yukarı taşı"]},83085:e=>{e.exports=["Pzt"]},61199:e=>{e.exports=["Pazartesi"]},41610:e=>{e.exports=["Daha Fazla"]},1653:e=>{e.exports=["Sabah. Piyasa, piyasa öncesi işleme açıktır."]},56470:e=>{e.exports=["Grafiği azami genişlet"]},19603:e=>{e.exports=["Bölmeyi azami genişlet"]},68327:e=>{e.exports="May"},35732:e=>{e.exports=["Bölmeleri yönet"]},84675:e=>{e.exports=["Mart"]},83949:e=>{e.exports=["Piyasa açık"]},35701:e=>{e.exports=["Piyasa {remainingTime} içinde açılır."]},95814:e=>{e.exports=["Piyasa kapalı"]},98105:e=>{ +e.exports=["Piyasa {remainingTime} içinde kapanır."]},87202:e=>{e.exports=["Market şu anda tatilde. Şanslılar."]},71194:e=>{e.exports=["Kasım"]},66324:e=>{e.exports=["Kaynak kodu"]},36835:e=>{e.exports=["Cmt"]},1144:e=>{e.exports=["Cumartesi"]},40653:e=>{e.exports=["Sola kaydır"]},26721:e=>{e.exports=["En son çubuğa kaydır"]},35809:e=>{e.exports=["Sağa kaydır"]},61132:e=>{e.exports=["Eylül"]},28705:e=>{e.exports=["Gösterge Bölmesini Göster"]},51072:e=>{e.exports=["Nesnelerin Ağacını Göster"]},37809:e=>{e.exports=["Aralık ayarlarını göster"]},39045:e=>{e.exports=["Çalışma Hatası"]},86577:e=>{e.exports=["Paz"]},72149:e=>{e.exports=["Pazar"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["Sembol başlığı"]},29985:e=>{e.exports=["Kapanış-sonrası"]},28412:e=>{e.exports=["Ücretli planlar daha hızlı veri güncellemeleri içerir."]},56042:e=>{e.exports=["Açılış-öncesi"]},36015:e=>{e.exports=["{description} için gerçek-zamanlı veriler şu an sağlanamıyor. Gelecekte bunu destekleyebiliriz."]},6667:e=>{e.exports=["{symbolName} için gerçek zamanlı veriler, {exchange} borsası tarafından sağlanır."]},48293:e=>{e.exports=["Grafiği geri yükle"]},91029:e=>{e.exports=["Bölmeyi geri yükle"]},75094:e=>{e.exports=["Çar"]},7147:e=>{e.exports=["Çarşamba"]},52984:e=>{e.exports=["{description} 'a dair gerçek zamanlı veri almak için lütfen gerçek zamanlı veri paketini satın alın."]},9787:e=>{e.exports=["Per"]},7951:e=>{e.exports=["Perşembe"]},57918:e=>{e.exports=["Bu veriler gerçek zamanlıdır, ancak birincil bir borsa'nın resmiyetteki benzerlerinden biraz farklıdır."]},68025:e=>{e.exports=["Bu veriler gerçek zamanlıdır, ancak {exchange} 'den gelen resmi muadilinden biraz farklıdır."]},73717:e=>{e.exports=["Bu sembol mevcut değil, lütfen başka bir sembol seçin."]},57048:e=>{e.exports=["Yürüyüş zamanı — bu piyasa kapalı."]},94316:e=>{e.exports=["Sal"]},44979:e=>{e.exports=["Salı"]},8209:e=>{e.exports=["Sembol bayrağını kaldır"]},1111:e=>{e.exports=["Hacim"]},61311:e=>{e.exports=["Yaklaş"]},47602:e=>{e.exports=["Uzaklaş"]},57889:e=>{e.exports=["OHLC değerlerinin görünürlüğünü değiştir"]},18644:e=>{e.exports=["açık piyasa durumu görünürlüğünü değiştir"]},45110:e=>{e.exports=["çubuk değiştirme görünürlüğünü değiştir"]},31325:e=>{e.exports=["gösterge başlıklarının görünürlüğünü değiştir"]},99774:e=>{e.exports=["gösterge değerleri görünürlüğünü değiştir"]},96162:e=>{e.exports=["gösterge argümanlarının görünürlüğünü değiştir"]},26717:e=>{e.exports=["sembol açıklama görünürlüğünü değiştir"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["hacim değerleri görünürlüğünü değiştir"]},39348:e=>{e.exports=["1 dakikadan az"]},87358:e=>{e.exports=["{title} göster"]},7827:e=>{e.exports=["{days} ve {hours}"]},7435:e=>{e.exports=["{originalExchange} tarafından {exchange}"]},19830:e=>{e.exports=["{hours} ve {minutes}"]},1084:e=>{e.exports=["{listedExchange} gerçek-zamanlı veriler, kayıtlı kullanıcılar tarafından ücretsiz olarak kullanılabilir."]},11155:e=>{e.exports=["{symbolName} verileri {time} dakika gecikti."]}, +77033:e=>{e.exports=["Piyasada daha fazla güncelleme olsa bile veriler her {amount} saniyede bir güncellenir.","Piyasada daha fazla güncelleme olsa bile veriler her {amount} saniyede bir güncellenir."]},2121:e=>{e.exports=["Temel planımızdaki veriler, piyasada daha fazla güncelleme olsa bile her {amount} saniyede bir güncellenir.","Temel planımızdaki veriler, piyasada daha fazla güncelleme olsa bile her {amount} saniyede bir güncellenir."]},5223:e=>{e.exports=["Her {amount} saniyede bir güncelleme","Her {amount} saniyede bir güncelleme"]},58609:e=>{e.exports=["{number} gün","{number} gün"]},24430:e=>{e.exports=["{number} saat","{number} saat"]},67151:e=>{e.exports=["{number} dakika","{number} dakika"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/vi.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/vi.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 223b43aa..00000000 --- a/charting_library/bundles/vi.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:t=>{t.exports=["thanh"]},19648:t=>{t.exports=["12-giờ"]},55838:t=>{t.exports=["24-giờ"]},88364:t=>{t.exports=["Kiểu cơ bản của biểu đồ"]},46720:t=>{t.exports=["Đường chữ thập"]},50985:t=>{t.exports=["Tiền tệ"]},17319:t=>{t.exports=["Tiền tệ và đơn vị"]},19481:t=>{t.exports=["Diện mạo"]},68791:t=>{t.exports=["Lập luận"]},95036:t=>{t.exports=["Giá đóng của trung bình"]},27331:t=>{t.exports=["Hình nền"]},22519:t=>{t.exports=["Các giá trị thay đổi thanh"]},87845:t=>{t.exports=["Nút"]},25209:t=>{t.exports=["Định dạng Ngày"]},55090:t=>{t.exports=["Ngày trong tuần trên nhãn"]},29601:t=>{t.exports=["Mô tả"]},26897:t=>{t.exports=["Các sự kiện"]},95338:t=>{t.exports=["Đường lưới ngang"]},60971:t=>{t.exports=["Giá cao và thấp"]},61142:t=>{t.exports=["Các chỉ báo"]},34905:t=>{t.exports=["Giá trị Chỉ báo"]},29687:t=>{t.exports=["Giá trị Chỉ báo và thông số tài chính"]},25084:t=>{t.exports=["Tên Chỉ báo và Thông số tài chính"]},9654:t=>{t.exports=["Tên chỉ báo"]},99487:t=>{t.exports=["Giá trị OHLC"]},75991:t=>{t.exports=["Trạng thái thị trường mở"]},70500:t=>{t.exports=["Tiền"]},66653:t=>{t.exports=["Ký quỹ"]},42502:t=>{t.exports=["Không chồng lấn"]},74343:t=>{t.exports=["Điều hướng"]},43115:t=>{t.exports=["Các tỷ lệ"]},53224:t=>{t.exports=["Vị trí căn chỉnh"]},79194:t=>{t.exports=["Dòng trạng thái"]},89053:t=>{t.exports=["Mã"]},35383:t=>{t.exports=["Tên Mã giao dịch"]},27767:t=>{t.exports=["Giá cuối cùng của mã"]},40847:t=>{t.exports=["Giá đóng cửa hôm trước của mã"]},50446:t=>{t.exports=["Ngăn"]},73908:t=>{t.exports=["Ngăn phân cách"]},36014:t=>{t.exports=["Tỷ lệ phần trăm"]},78621:t=>{t.exports="Pips"},74823:t=>{t.exports=["Giá Trước/Sau thị trường"]},64859:t=>{t.exports=["Thang Giá"]},76523:t=>{t.exports=["Giá trị Giá và Phần trăm"]},40187:t=>{t.exports="Right Margin"},77705:t=>{t.exports=["Chữ mờ"]},67369:t=>{t.exports=["Tiêu đề"]},31326:t=>{t.exports=["Tiêu đề"]},23097:t=>{t.exports="Ticker"},82168:t=>{t.exports=["Ticker và mô tả"]},43637:t=>{t.exports=["Thang Thời gian"]},97316:t=>{t.exports=["Định dạng thời gian"]},90801:t=>{t.exports=["Giao dịch"]},77534:t=>{t.exports=["Đơn vị"]},1111:t=>{t.exports=["Khối lượng"]},80170:t=>{t.exports=["Giá trị theo Tỷ lệ"]},91322:t=>{t.exports=["Giá trị"]},70353:t=>{t.exports=["Đường lưới dọc"]},57889:t=>{t.exports=["thay đổi trạng thái hiển thị giá trị OHLC"]},35646:t=>{t.exports=["thay đổi khả năng hiển thị của các nút điều hướng"]},18644:t=>{t.exports=["thay đổi trạng thái mở cửa thị trường"]},45110:t=>{t.exports=["thay đổi đếm ngược để thanh hiển thị đóng"]},10349:t=>{t.exports=["thay đổi lề dưới"]},88161:t=>{t.exports=["thay đổi đơn vị tiền tệ và khả năng hiển thị nhãn đơn vị"]},79570:t=>{t.exports=["thay đổi khả năng hiển thị nhãn tiền tệ"]},99011:t=>{t.exports=["thay đổi màu nền biểu đồ"]},72458:t=>{t.exports=["thay đổi loại nền biểu đồ"]},37034:t=>{t.exports=["thay đổi độ rộng đường chéo"]},29951:t=>{t.exports=["thay đổi màu đường chéo"]},92027:t=>{t.exports=["thay đổi kiểu chéo"]},50457:t=>{ -t.exports=["thay đổi định dạng ngày"]},7104:t=>{t.exports=["thay đổi ngày trong tuần trên nhãn"]},88096:t=>{t.exports=["thay đổi màu sắc đường lưới ngang"]},2523:t=>{t.exports=["thay đổi kiểu đường lưới ngang"]},31325:t=>{t.exports=["thay đổi trạng thái hiển thị tiêu đề chỉ số"]},99774:t=>{t.exports=["thay đổi trạng thái hiển thị giá trị chỉ số"]},96162:t=>{t.exports=["thay đổi trạng thái hiển thị các đối số của chỉ số"]},59820:t=>{t.exports=["thay đổi các chỉ số và tài chính tên nhãn khả năng hiển thị"]},90512:t=>{t.exports=["thay đổi các chỉ số và tài chính giá trị nhãn khả năng hiển thị"]},97956:t=>{t.exports=["thay đổi độ rõ ràng của nền chú thích"]},61061:t=>{t.exports=["thay đổi hiển thị nền chú thích"]},37730:t=>{t.exports=["thay đổi khả năng hiển thị của các nút ngăn"]},89032:t=>{t.exports=["thay đổi màu ngăn phân cách"]},35636:t=>{t.exports=["thay đổi lề phải"]},66601:t=>{t.exports="change right margin percentage"},25616:t=>{t.exports=["thay đổi màu sắc hình mờ của mã"]},87159:t=>{t.exports=["thay đổi mức hiển thị hình mờ của mã"]},26717:t=>{t.exports=["thay đổi tính năng mô tả biểu tượng"]},28741:t=>{t.exports=["thay đổi giá trị cuối cùng của mã"]},95071:t=>{t.exports=["thay đổi dạng chú thích mã"]},35065:t=>{t.exports=["thay đổi màu văn bản tỷ lệ"]},84382:t=>{t.exports=["thay đổi cỡ chữ tỷ lệ"]},12468:t=>{t.exports=["thay đổi màu của các đường tỉ lệ"]},71589:t=>{t.exports=["thay đổi khả năng hiển thị phiên"]},15035:t=>{t.exports=["thay đổi phiên làm gián đoạn độ rộng"]},1579:t=>{t.exports=["thay đổi phiên làm gián đoạn màu sắc"]},21460:t=>{t.exports=["thay đổi kiểu phiên"]},76991:t=>{t.exports=["đổi định dạng thời gian"]},98905:t=>{t.exports=["thay đổi lề trên"]},7011:t=>{t.exports=["thay đổi khả năng hiển thị nhãn đơn vị"]},22722:t=>{t.exports=["thay đổi màu đường lưới dọc"]},22867:t=>{t.exports=["thay đổi kiểu đường lưới dọc"]},9455:t=>{t.exports=["thay đổi trạng thái hiển thị khối lượng"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/vi.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/vi.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..03dd5303 --- /dev/null +++ b/charting_library/bundles/vi.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:t=>{t.exports=["thanh"]},19648:t=>{t.exports=["12-giờ"]},55838:t=>{t.exports=["24-giờ"]},88364:t=>{t.exports=["Kiểu cơ bản của biểu đồ"]},46720:t=>{t.exports=["Đường chữ thập"]},50985:t=>{t.exports=["Tiền tệ"]},17319:t=>{t.exports=["Tiền tệ và đơn vị"]},19481:t=>{t.exports=["Diện mạo"]},68791:t=>{t.exports=["Lập luận"]},95036:t=>{t.exports=["Giá đóng của trung bình"]},27331:t=>{t.exports=["Hình nền"]},22519:t=>{t.exports=["Các giá trị thay đổi thanh"]},87845:t=>{t.exports=["Nút"]},25209:t=>{t.exports=["Định dạng Ngày"]},55090:t=>{t.exports=["Ngày trong tuần trên nhãn"]},29601:t=>{t.exports=["Mô tả"]},26897:t=>{t.exports=["Các sự kiện"]},95338:t=>{t.exports=["Đường lưới ngang"]},60971:t=>{t.exports=["Giá cao và thấp"]},61142:t=>{t.exports=["Các chỉ báo"]},34905:t=>{t.exports=["Giá trị Chỉ báo"]},29687:t=>{t.exports=["Giá trị Chỉ báo và thông số tài chính"]},25084:t=>{t.exports=["Tên Chỉ báo và Thông số tài chính"]},9654:t=>{t.exports=["Tên chỉ báo"]},99487:t=>{t.exports=["Giá trị OHLC"]},75991:t=>{t.exports=["Trạng thái thị trường mở"]},96073:t=>{t.exports="Long Description"},70500:t=>{t.exports=["Tiền"]},66653:t=>{t.exports=["Ký quỹ"]},42502:t=>{t.exports=["Không chồng lấn"]},74343:t=>{t.exports=["Điều hướng"]},43115:t=>{t.exports=["Các tỷ lệ"]},53224:t=>{t.exports=["Vị trí căn chỉnh"]},79194:t=>{t.exports=["Dòng trạng thái"]},89053:t=>{t.exports=["Mã"]},35383:t=>{t.exports=["Tên Mã giao dịch"]},27767:t=>{t.exports=["Giá cuối cùng của mã"]},40847:t=>{t.exports=["Giá đóng cửa hôm trước của mã"]},50446:t=>{t.exports=["Ngăn"]},73908:t=>{t.exports=["Ngăn phân cách"]},36014:t=>{t.exports=["Tỷ lệ phần trăm"]},78621:t=>{t.exports="Pips"},74823:t=>{t.exports=["Giá Trước/Sau thị trường"]},64859:t=>{t.exports=["Thang Giá"]},76523:t=>{t.exports=["Giá trị Giá và Phần trăm"]},40187:t=>{t.exports="Right Margin"},77705:t=>{t.exports=["Chữ mờ"]},67369:t=>{t.exports=["Tiêu đề"]},31326:t=>{t.exports=["Tiêu đề"]},23097:t=>{t.exports="Ticker"},82168:t=>{t.exports=["Ticker và mô tả"]},43637:t=>{t.exports=["Thang Thời gian"]},97316:t=>{t.exports=["Định dạng thời gian"]},90801:t=>{t.exports=["Giao dịch"]},77534:t=>{t.exports=["Đơn vị"]},1111:t=>{t.exports=["Khối lượng"]},80170:t=>{t.exports=["Giá trị theo Tỷ lệ"]},91322:t=>{t.exports=["Giá trị"]},70353:t=>{t.exports=["Đường lưới dọc"]},57889:t=>{t.exports=["thay đổi trạng thái hiển thị giá trị OHLC"]},35646:t=>{t.exports=["thay đổi khả năng hiển thị của các nút điều hướng"]},18644:t=>{t.exports=["thay đổi trạng thái mở cửa thị trường"]},45110:t=>{t.exports=["thay đổi đếm ngược để thanh hiển thị đóng"]},10349:t=>{t.exports=["thay đổi lề dưới"]},88161:t=>{t.exports=["thay đổi đơn vị tiền tệ và khả năng hiển thị nhãn đơn vị"]},79570:t=>{t.exports=["thay đổi khả năng hiển thị nhãn tiền tệ"]},99011:t=>{t.exports=["thay đổi màu nền biểu đồ"]},72458:t=>{t.exports=["thay đổi loại nền biểu đồ"]},37034:t=>{t.exports=["thay đổi độ rộng đường chéo"]},29951:t=>{t.exports=["thay đổi màu đường chéo"]},92027:t=>{ +t.exports=["thay đổi kiểu chéo"]},50457:t=>{t.exports=["thay đổi định dạng ngày"]},7104:t=>{t.exports=["thay đổi ngày trong tuần trên nhãn"]},88096:t=>{t.exports=["thay đổi màu sắc đường lưới ngang"]},2523:t=>{t.exports=["thay đổi kiểu đường lưới ngang"]},31325:t=>{t.exports=["thay đổi trạng thái hiển thị tiêu đề chỉ số"]},99774:t=>{t.exports=["thay đổi trạng thái hiển thị giá trị chỉ số"]},96162:t=>{t.exports=["thay đổi trạng thái hiển thị các đối số của chỉ số"]},59820:t=>{t.exports=["thay đổi các chỉ số và tài chính tên nhãn khả năng hiển thị"]},90512:t=>{t.exports=["thay đổi các chỉ số và tài chính giá trị nhãn khả năng hiển thị"]},97956:t=>{t.exports=["thay đổi độ rõ ràng của nền chú thích"]},61061:t=>{t.exports=["thay đổi hiển thị nền chú thích"]},37730:t=>{t.exports=["thay đổi khả năng hiển thị của các nút ngăn"]},89032:t=>{t.exports=["thay đổi màu ngăn phân cách"]},35636:t=>{t.exports=["thay đổi lề phải"]},66601:t=>{t.exports="change right margin percentage"},25616:t=>{t.exports=["thay đổi màu sắc hình mờ của mã"]},87159:t=>{t.exports=["thay đổi mức hiển thị hình mờ của mã"]},26717:t=>{t.exports=["thay đổi tính năng mô tả biểu tượng"]},6091:t=>{t.exports="change symbol field visibility"},28741:t=>{t.exports=["thay đổi giá trị cuối cùng của mã"]},95071:t=>{t.exports=["thay đổi dạng chú thích mã"]},35065:t=>{t.exports=["thay đổi màu văn bản tỷ lệ"]},84382:t=>{t.exports=["thay đổi cỡ chữ tỷ lệ"]},12468:t=>{t.exports=["thay đổi màu của các đường tỉ lệ"]},71589:t=>{t.exports=["thay đổi khả năng hiển thị phiên"]},15035:t=>{t.exports=["thay đổi phiên làm gián đoạn độ rộng"]},1579:t=>{t.exports=["thay đổi phiên làm gián đoạn màu sắc"]},21460:t=>{t.exports=["thay đổi kiểu phiên"]},76991:t=>{t.exports=["đổi định dạng thời gian"]},98905:t=>{t.exports=["thay đổi lề trên"]},7011:t=>{t.exports=["thay đổi khả năng hiển thị nhãn đơn vị"]},22722:t=>{t.exports=["thay đổi màu đường lưới dọc"]},22867:t=>{t.exports=["thay đổi kiểu đường lưới dọc"]},9455:t=>{t.exports=["thay đổi trạng thái hiển thị khối lượng"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/vi.6847.490ee46270bef6a878dd.js b/charting_library/bundles/vi.7257.089fbbc28bead9558b87.js similarity index 56% rename from charting_library/bundles/vi.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/vi.7257.089fbbc28bead9558b87.js index ab6635fb..fe9ef114 100644 --- a/charting_library/bundles/vi.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/vi.7257.089fbbc28bead9558b87.js @@ -1,3 +1,3 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:t=>{t.exports="Fr"},11268:t=>{t.exports="Mo"},63331:t=>{t.exports="Sa"},85954:t=>{t.exports="Su"},26230:t=>{t.exports=["T4"]},24793:t=>{t.exports="Th"},31533:t=>{t.exports=["Thứ 3"]},89790:t=>{t.exports=["Không thể lấy mã nguồn Pine"]},39589:t=>{t.exports=["Ngăn thu gọn"]},38154:t=>{t.exports=["Xác nhận Xóa Cây Nghiên cứu"]},65636:t=>{t.exports="Cboe BZX"},36004:t=>{t.exports=["Tạo một tài khoản miễn phí"]},69419:t=>{t.exports=["Tất cả đều tốt - Thị trường mở cửa."]},97637:t=>{t.exports=["Tháng Tư"]},86797:t=>{t.exports=["Tháng Tám"]},22519:t=>{t.exports=["Các giá trị thay đổi thanh"]},52003:t=>{t.exports=["Bạn có thực sự muốn xóa nghiên cứu và tất cả thành phần của nó?"]},68854:t=>{t.exports=["Nhấp đúp"]},97325:t=>{t.exports=["Lỗi dữ liệu"]},52916:t=>{t.exports=["Dữ liệu được cập nhật mỗi ngày một lần."]},25978:t=>{t.exports=["Dữ liệu được cập nhật mỗi giây một lần, cho dù có nhiều biến động hơn trên thị trường."]},57310:t=>{t.exports=["Dữ liệu bị trì hoãn"]},49321:t=>{t.exports=["Dữ liệu cung cấp cho gói Cơ bản được cập nhật mỗi giây một lần, cho dù có nhiều biến động hơn trong thị trường."]},55669:t=>{t.exports=["Tháng Mười hai"]},83498:t=>{t.exports=["Xóa khung"]},59315:t=>{t.exports=["Dữ liệu Cuối ngày"]},82751:t=>{t.exports=["Lỗi"]},40519:t=>{t.exports=["Buổi tối. Thị trường mở cửa cho giao dịch sau giờ mở cửa."]},80227:t=>{t.exports=["Múi giờ giao dịch"]},16467:t=>{t.exports=["Tháng Hai"]},25046:t=>{t.exports=["Điền vào Exchange Agreements"]},93666:t=>{t.exports=["Gắn cờ Mã giao dịch"]},564:t=>{t.exports=["Thứ 6"]},72970:t=>{t.exports=["Thứ Sáu"]},88958:t=>{t.exports=["Ngày lễ"]},21686:t=>{t.exports=["Ẩn Chú thích Chỉ báo"]},26935:t=>{t.exports=["Các tham số Chỉ tiêu"]},26315:t=>{t.exports=["Tiêu đề Chỉ báo"]},84098:t=>{t.exports=["Giá trị Chỉ tiêu"]},91459:t=>{t.exports=["Nếu bạn muốn dữ liệu thời gian thực của {listedExchange}, bạn sẽ cần hoàn thành Exchange Agreement. Đừng lo lắng, chỉ mất một vài cú nhấp chuột"]},50634:t=>{t.exports=["Nó sẽ chuyển sang giao dịch sau giờ mở cửa trong {remainingTime}."]},74537:t=>{t.exports=["Nó sẽ mở cửa cho giao dịch trước giờ mở cửa trong {remainingTime}."]},26910:t=>{t.exports=["Tháng Một"]},23230:t=>{t.exports=["Tháng Bảy"]},49385:t=>{t.exports=["Tháng Sáu"]},99487:t=>{t.exports=["Giá trị OHLC"]},15815:t=>{t.exports=["Cập nhật mỗi giây"]},90784:t=>{t.exports=["Tháng Mười"]},75991:t=>{t.exports=["Trạng thái thị trường mở"]},18429:t=>{t.exports=["Tìm hiểu thêm"]},39899:t=>{t.exports=["Di chuyển khung xuống dưới"]},70343:t=>{t.exports=["Di chuyển khung lên trên"]},83085:t=>{t.exports=["Thứ 2"]},61199:t=>{t.exports=["Thứ Hai"]},41610:t=>{t.exports=["Thêm nữa"]},1653:t=>{t.exports=["Buổi sáng. Thị trường mở cho các giao dịch trước giờ mở cửa."]},56470:t=>{t.exports=["Mở rộng biểu đồ"]},19603:t=>{t.exports=["Mở rộng khung"]},68327:t=>{t.exports=["Tháng Năm"]},35732:t=>{t.exports=["Quản lý khung"]},84675:t=>{t.exports=["Tháng Ba"]},83949:t=>{t.exports=["Thị trường Mở"]},35701:t=>{ -t.exports=["Thị trường mở trong {remainingTime}."]},95814:t=>{t.exports=["Thị trường đóng cửa"]},98105:t=>{t.exports=["Thị trường đóng trong {remainingTime}."]},87202:t=>{t.exports=["Thị trường hiện đang trong kỳ nghỉ. May cho họ."]},71194:t=>{t.exports=["Tháng Mười một"]},66324:t=>{t.exports=["Mã nguồn"]},36835:t=>{t.exports=["Thứ 7"]},1144:t=>{t.exports=["Thứ Bảy"]},40653:t=>{t.exports=["Cuộn sang trái"]},26721:t=>{t.exports=["Cuộn sang thanh gần đây nhất"]},35809:t=>{t.exports=["Cuộn sang phải"]},61132:t=>{t.exports=["Tháng Chín"]},28705:t=>{t.exports=["Hiển thị Chú thích Chỉ báo"]},51072:t=>{t.exports=["Hiện Danh sách đối tượng"]},37809:t=>{t.exports=["Hiển thị cài đặt khoảng thời gian"]},39045:t=>{t.exports=["Lỗi Nghiên cứu"]},86577:t=>{t.exports=["CN"]},72149:t=>{t.exports=["Chủ nhật"]},39339:t=>{t.exports=["Tiêu đề mã"]},29985:t=>{t.exports=["Thị trường sau khi đóng cửa"]},28412:t=>{t.exports=["Gói trả phí có tính năng cập nhật dữ liệu nhanh hơn."]},56042:t=>{t.exports=["Thị trường trước giờ mở cửa"]},36015:t=>{t.exports=["Dữ liệu thời gian thực cho {description} không được hỗ trợ tại thời điểm này. Nó có thể được hỗ trợ trong tương lai."]},6667:t=>{t.exports=["Dữ liệu thời gian thực cho {symbolName} được cung cấp bởi sàn{exchange}."]},48293:t=>{t.exports=["Khôi phục lại biểu đồ"]},91029:t=>{t.exports=["Khôi phục khung"]},75094:t=>{t.exports=["Thứ 4"]},7147:t=>{t.exports=["Thứ tư"]},52984:t=>{t.exports=["Để nhận dữ liệu thời gian thực cho {description}, vui lòng mua gói dữ liệu thời gian thực."]},9787:t=>{t.exports=["Thứ 5"]},7951:t=>{t.exports=["Thứ năm"]},57918:t=>{t.exports=["Dữ liệu này là thời gian thực, nhưng nó hơi khác so với đối tác chính thức từ sàn giao dịch chính."]},68025:t=>{t.exports=["Dữ liệu này theo thời gian thực, nhưng hơi khác so với dữ liệu chính thức đến từ {exchange}."]},73717:t=>{t.exports=["Không có mã giao dịch này, vui lòng chọn mã khác."]},57048:t=>{t.exports=["Đã đến lúc đi dạo một vòng - thị trường này đã đóng cửa."]},94316:t=>{t.exports=["Thứ 3"]},44979:t=>{t.exports=["Thứ ba"]},8209:t=>{t.exports=["Bỏ gắn cờ cho Mã giao dịch"]},1111:t=>{t.exports=["Khối lượng"]},61311:t=>{t.exports=["Phóng to"]},47602:t=>{t.exports=["Thu nhỏ"]},57889:t=>{t.exports=["thay đổi trạng thái hiển thị giá trị OHLC"]},18644:t=>{t.exports=["thay đổi trạng thái mở cửa thị trường"]},45110:t=>{t.exports=["thay đổi đếm ngược để thanh hiển thị đóng"]},31325:t=>{t.exports=["thay đổi trạng thái hiển thị tiêu đề chỉ số"]},99774:t=>{t.exports=["thay đổi trạng thái hiển thị giá trị chỉ số"]},96162:t=>{t.exports=["thay đổi trạng thái hiển thị các đối số của chỉ số"]},26717:t=>{t.exports=["thay đổi tính năng mô tả biểu tượng"]},9455:t=>{t.exports=["thay đổi trạng thái hiển thị khối lượng"]},39348:t=>{t.exports=["chưa tới 1 phút"]},87358:t=>{t.exports=["hiện {title}"]},7827:t=>{t.exports=["{days} và {hours}"]},7435:t=>{t.exports=["{exchange} bởi {originalExchange}"]},19830:t=>{t.exports=["{hours} và {minutes}"]},1084:t=>{t.exports=["{listedExchange} dữ liệu thời gian thực sẵn có cho người dùng đăng ký miễn phí."]}, -11155:t=>{t.exports=["{symbolName} dữ liệu bị trì hoãn khoảng {time} phút."]},77033:t=>{t.exports=["Dữ liệu được cập nhật một lần mỗi {amount} giây, kể cả nếu thị trường có nhiều thông tin cập nhật hơn."]},2121:t=>{t.exports=["Dữ liệu trên gói Cơ sở của chúng tôi được cập nhật một lần mỗi {amount} giây, kể cả nếu thị trường có nhiều thông tin cập nhật hơn."]},5223:t=>{t.exports=["Cập nhật một lần mỗi {amount} giây"]},58609:t=>{t.exports=["{number} ngày"]},24430:t=>{t.exports=["{number} giờ"]},67151:t=>{t.exports=["{number} phút"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:t=>{t.exports="Fr"},11268:t=>{t.exports="Mo"},63331:t=>{t.exports="Sa"},85954:t=>{t.exports="Su"},26230:t=>{t.exports=["T4"]},24793:t=>{t.exports="Th"},31533:t=>{t.exports=["Thứ 3"]},89790:t=>{t.exports=["Không thể lấy mã nguồn Pine"]},39589:t=>{t.exports=["Ngăn thu gọn"]},38154:t=>{t.exports=["Xác nhận Xóa Cây Nghiên cứu"]},65636:t=>{t.exports="Cboe BZX"},36004:t=>{t.exports=["Tạo một tài khoản miễn phí"]},69419:t=>{t.exports=["Tất cả đều tốt - Thị trường mở cửa."]},97637:t=>{t.exports=["Tháng Tư"]},86797:t=>{t.exports=["Tháng Tám"]},22519:t=>{t.exports=["Các giá trị thay đổi thanh"]},52003:t=>{t.exports=["Bạn có thực sự muốn xóa nghiên cứu và tất cả thành phần của nó?"]},68854:t=>{t.exports=["Nhấp đúp"]},97325:t=>{t.exports=["Lỗi dữ liệu"]},52916:t=>{t.exports=["Dữ liệu được cập nhật mỗi ngày một lần."]},25978:t=>{t.exports=["Dữ liệu được cập nhật mỗi giây một lần, cho dù có nhiều biến động hơn trên thị trường."]},57310:t=>{t.exports=["Dữ liệu bị trì hoãn"]},49321:t=>{t.exports=["Dữ liệu cung cấp cho gói Cơ bản được cập nhật mỗi giây một lần, cho dù có nhiều biến động hơn trong thị trường."]},55669:t=>{t.exports=["Tháng Mười hai"]},83498:t=>{t.exports=["Xóa khung"]},59315:t=>{t.exports=["Dữ liệu Cuối ngày"]},82751:t=>{t.exports=["Lỗi"]},40519:t=>{t.exports=["Buổi tối. Thị trường mở cửa cho giao dịch sau giờ mở cửa."]},80227:t=>{t.exports=["Múi giờ giao dịch"]},16467:t=>{t.exports=["Tháng Hai"]},25046:t=>{t.exports=["Điền vào Exchange Agreements"]},93666:t=>{t.exports=["Gắn cờ Mã giao dịch"]},564:t=>{t.exports=["Thứ 6"]},72970:t=>{t.exports=["Thứ Sáu"]},88958:t=>{t.exports=["Ngày lễ"]},21686:t=>{t.exports=["Ẩn Chú thích Chỉ báo"]},26935:t=>{t.exports=["Các tham số Chỉ tiêu"]},26315:t=>{t.exports=["Tiêu đề Chỉ báo"]},84098:t=>{t.exports=["Giá trị Chỉ tiêu"]},91459:t=>{t.exports=["Nếu bạn muốn dữ liệu thời gian thực của {listedExchange}, bạn sẽ cần hoàn thành Exchange Agreement. Đừng lo lắng, chỉ mất một vài cú nhấp chuột"]},50634:t=>{t.exports=["Nó sẽ chuyển sang giao dịch sau giờ mở cửa trong {remainingTime}."]},74537:t=>{t.exports=["Nó sẽ mở cửa cho giao dịch trước giờ mở cửa trong {remainingTime}."]},26910:t=>{t.exports=["Tháng Một"]},23230:t=>{t.exports=["Tháng Bảy"]},49385:t=>{t.exports=["Tháng Sáu"]},99487:t=>{t.exports=["Giá trị OHLC"]},15815:t=>{t.exports=["Cập nhật mỗi giây"]},90784:t=>{t.exports=["Tháng Mười"]},75991:t=>{t.exports=["Trạng thái thị trường mở"]},18429:t=>{t.exports=["Tìm hiểu thêm"]},39899:t=>{t.exports=["Di chuyển khung xuống dưới"]},70343:t=>{t.exports=["Di chuyển khung lên trên"]},83085:t=>{t.exports=["Thứ 2"]},61199:t=>{t.exports=["Thứ Hai"]},41610:t=>{t.exports=["Thêm nữa"]},1653:t=>{t.exports=["Buổi sáng. Thị trường mở cho các giao dịch trước giờ mở cửa."]},56470:t=>{t.exports=["Mở rộng biểu đồ"]},19603:t=>{t.exports=["Mở rộng khung"]},68327:t=>{t.exports=["Tháng Năm"]},35732:t=>{t.exports=["Quản lý khung"]},84675:t=>{t.exports=["Tháng Ba"]},83949:t=>{t.exports=["Thị trường Mở"]},35701:t=>{ +t.exports=["Thị trường mở trong {remainingTime}."]},95814:t=>{t.exports=["Thị trường đóng cửa"]},98105:t=>{t.exports=["Thị trường đóng trong {remainingTime}."]},87202:t=>{t.exports=["Thị trường hiện đang trong kỳ nghỉ. May cho họ."]},71194:t=>{t.exports=["Tháng Mười một"]},66324:t=>{t.exports=["Mã nguồn"]},36835:t=>{t.exports=["Thứ 7"]},1144:t=>{t.exports=["Thứ Bảy"]},40653:t=>{t.exports=["Cuộn sang trái"]},26721:t=>{t.exports=["Cuộn sang thanh gần đây nhất"]},35809:t=>{t.exports=["Cuộn sang phải"]},61132:t=>{t.exports=["Tháng Chín"]},28705:t=>{t.exports=["Hiển thị Chú thích Chỉ báo"]},51072:t=>{t.exports=["Hiện Danh sách đối tượng"]},37809:t=>{t.exports=["Hiển thị cài đặt khoảng thời gian"]},39045:t=>{t.exports=["Lỗi Nghiên cứu"]},86577:t=>{t.exports=["CN"]},72149:t=>{t.exports=["Chủ nhật"]},46041:t=>{t.exports="Symbol price source"},39339:t=>{t.exports=["Tiêu đề mã"]},29985:t=>{t.exports=["Thị trường sau khi đóng cửa"]},28412:t=>{t.exports=["Gói trả phí có tính năng cập nhật dữ liệu nhanh hơn."]},56042:t=>{t.exports=["Thị trường trước giờ mở cửa"]},36015:t=>{t.exports=["Dữ liệu thời gian thực cho {description} không được hỗ trợ tại thời điểm này. Nó có thể được hỗ trợ trong tương lai."]},6667:t=>{t.exports=["Dữ liệu thời gian thực cho {symbolName} được cung cấp bởi sàn{exchange}."]},48293:t=>{t.exports=["Khôi phục lại biểu đồ"]},91029:t=>{t.exports=["Khôi phục khung"]},75094:t=>{t.exports=["Thứ 4"]},7147:t=>{t.exports=["Thứ tư"]},52984:t=>{t.exports=["Để nhận dữ liệu thời gian thực cho {description}, vui lòng mua gói dữ liệu thời gian thực."]},9787:t=>{t.exports=["Thứ 5"]},7951:t=>{t.exports=["Thứ năm"]},57918:t=>{t.exports=["Dữ liệu này là thời gian thực, nhưng nó hơi khác so với đối tác chính thức từ sàn giao dịch chính."]},68025:t=>{t.exports=["Dữ liệu này theo thời gian thực, nhưng hơi khác so với dữ liệu chính thức đến từ {exchange}."]},73717:t=>{t.exports=["Không có mã giao dịch này, vui lòng chọn mã khác."]},57048:t=>{t.exports=["Đã đến lúc đi dạo một vòng - thị trường này đã đóng cửa."]},94316:t=>{t.exports=["Thứ 3"]},44979:t=>{t.exports=["Thứ ba"]},8209:t=>{t.exports=["Bỏ gắn cờ cho Mã giao dịch"]},1111:t=>{t.exports=["Khối lượng"]},61311:t=>{t.exports=["Phóng to"]},47602:t=>{t.exports=["Thu nhỏ"]},57889:t=>{t.exports=["thay đổi trạng thái hiển thị giá trị OHLC"]},18644:t=>{t.exports=["thay đổi trạng thái mở cửa thị trường"]},45110:t=>{t.exports=["thay đổi đếm ngược để thanh hiển thị đóng"]},31325:t=>{t.exports=["thay đổi trạng thái hiển thị tiêu đề chỉ số"]},99774:t=>{t.exports=["thay đổi trạng thái hiển thị giá trị chỉ số"]},96162:t=>{t.exports=["thay đổi trạng thái hiển thị các đối số của chỉ số"]},26717:t=>{t.exports=["thay đổi tính năng mô tả biểu tượng"]},6091:t=>{t.exports="change symbol field visibility"},9455:t=>{t.exports=["thay đổi trạng thái hiển thị khối lượng"]},39348:t=>{t.exports=["chưa tới 1 phút"]},87358:t=>{t.exports=["hiện {title}"]},7827:t=>{t.exports=["{days} và {hours}"]},7435:t=>{t.exports=["{exchange} bởi {originalExchange}"]},19830:t=>{t.exports=["{hours} và {minutes}"]},1084:t=>{ +t.exports=["{listedExchange} dữ liệu thời gian thực sẵn có cho người dùng đăng ký miễn phí."]},11155:t=>{t.exports=["{symbolName} dữ liệu bị trì hoãn khoảng {time} phút."]},77033:t=>{t.exports=["Dữ liệu được cập nhật một lần mỗi {amount} giây, kể cả nếu thị trường có nhiều thông tin cập nhật hơn."]},2121:t=>{t.exports=["Dữ liệu trên gói Cơ sở của chúng tôi được cập nhật một lần mỗi {amount} giây, kể cả nếu thị trường có nhiều thông tin cập nhật hơn."]},5223:t=>{t.exports=["Cập nhật một lần mỗi {amount} giây"]},58609:t=>{t.exports=["{number} ngày"]},24430:t=>{t.exports=["{number} giờ"]},67151:t=>{t.exports=["{number} phút"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/zh.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/zh.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index e38024fc..00000000 --- a/charting_library/bundles/zh.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports=["根K线"]},19648:e=>{e.exports=["12小时"]},55838:e=>{e.exports=["24小时"]},88364:e=>{e.exports=["图表基本样式"]},46720:e=>{e.exports=["十字线"]},50985:e=>{e.exports=["货币"]},17319:e=>{e.exports=["货币和单位"]},19481:e=>{e.exports=["外观"]},68791:e=>{e.exports=["参数"]},95036:e=>{e.exports=["平均收盘价格"]},27331:e=>{e.exports=["背景"]},22519:e=>{e.exports=["K线变化值"]},87845:e=>{e.exports=["按钮"]},25209:e=>{e.exports=["日期格式"]},55090:e=>{e.exports=["标签上的星期几"]},29601:e=>{e.exports=["描述"]},26897:e=>{e.exports=["事件"]},95338:e=>{e.exports=["水平网格线"]},60971:e=>{e.exports=["最高和最低价格"]},61142:e=>{e.exports=["指标"]},34905:e=>{e.exports=["指标值"]},29687:e=>{e.exports=["指标和财务值"]},25084:e=>{e.exports=["指标和财务名称"]},9654:e=>{e.exports=["指标名称"]},99487:e=>{e.exports=["开高低收"]},75991:e=>{e.exports=["开市状态"]},70500:e=>{e.exports=["资金"]},66653:e=>{e.exports=["利润率"]},42502:e=>{e.exports=["无重叠"]},74343:e=>{e.exports=["导航"]},43115:e=>{e.exports=["坐标"]},53224:e=>{e.exports=["坐标放置"]},79194:e=>{e.exports=["状态行"]},89053:e=>{e.exports=["商品代码"]},35383:e=>{e.exports=["商品名称"]},27767:e=>{e.exports=["商品最新价格"]},40847:e=>{e.exports=["商品前一天收盘价"]},50446:e=>{e.exports=["窗格"]},73908:e=>{e.exports=["窗格分隔符"]},36014:e=>{e.exports=["百分比"]},78621:e=>{e.exports=["点数"]},74823:e=>{e.exports=["盘前/盘后价格"]},64859:e=>{e.exports=["价格坐标"]},76523:e=>{e.exports=["价格和百分比值"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["水印"]},67369:e=>{e.exports=["标题"]},31326:e=>{e.exports=["标题"]},23097:e=>{e.exports=["商品代码"]},82168:e=>{e.exports=["商品和描述"]},43637:e=>{e.exports=["时间坐标"]},97316:e=>{e.exports=["时间小时格式"]},90801:e=>{e.exports=["交易"]},77534:e=>{e.exports=["单位"]},1111:e=>{e.exports=["成交量"]},80170:e=>{e.exports=["根据坐标值"]},91322:e=>{e.exports=["数值"]},70353:e=>{e.exports=["垂直网格线"]},57889:e=>{e.exports=["更改OHLC值的可见性"]},35646:e=>{e.exports=["更改导航按钮可见性"]},18644:e=>{e.exports=["更改开市状态可见性"]},45110:e=>{e.exports=["更改K线涨跌可见性"]},10349:e=>{e.exports=["更改下边距"]},88161:e=>{e.exports=["更改货币和单位标签的可见性"]},79570:e=>{e.exports=["更改货币标签可见性"]},99011:e=>{e.exports=["更改图表背景颜色"]},72458:e=>{e.exports=["更改图表背景类型"]},37034:e=>{e.exports=["更改十字准线宽度"]},29951:e=>{e.exports=["更改十字准线颜色"]},92027:e=>{e.exports=["更改十字准线样式"]},50457:e=>{e.exports=["更改日期格式"]},7104:e=>{e.exports=["更改标签上的星期几"]},88096:e=>{e.exports=["更改水平网格线颜色"]},2523:e=>{e.exports=["更改水平网格线样式"]},31325:e=>{e.exports=["更改指标标题可见性"]},99774:e=>{e.exports=["更改指标值的可见性"]},96162:e=>{e.exports=["更改指标参数可见性"]},59820:e=>{e.exports=["更改指标和财务名称标签可见性"]},90512:e=>{e.exports=["更改指标和财务值标签可见性"]},97956:e=>{e.exports=["更改图例背景透明度"]},61061:e=>{e.exports=["更改图例背景可见性"]},37730:e=>{e.exports=["更改窗格按钮可见性"]},89032:e=>{e.exports=["更改窗格分隔符颜色"]},35636:e=>{e.exports=["更改右边距"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["更改商品水印颜色"]},87159:e=>{e.exports=["更改商品水印可见性"]},26717:e=>{e.exports=["更改商品描述可见性"]},28741:e=>{e.exports=["更改商品最新值模式"]},95071:e=>{e.exports=["更改商品图例格式"]},35065:e=>{e.exports=["更改坐标文本颜色"]},84382:e=>{e.exports=["更改坐标字体大小"]},12468:e=>{e.exports=["更改坐标线条颜色"]},71589:e=>{ -e.exports=["更改交易时段分隔可见性"]},15035:e=>{e.exports=["更改交易时段分隔宽度"]},1579:e=>{e.exports=["更改交易时段分隔颜色"]},21460:e=>{e.exports=["更改交易时段分隔样式"]},76991:e=>{e.exports=["更改时间小时格式"]},98905:e=>{e.exports=["更改上边距"]},7011:e=>{e.exports=["更改单位标签可见性"]},22722:e=>{e.exports=["更改垂直网格线颜色"]},22867:e=>{e.exports=["更改垂直网格线样式"]},9455:e=>{e.exports=["更改成交量值的可见性"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/zh.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/zh.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..ca4c17b3 --- /dev/null +++ b/charting_library/bundles/zh.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports=["根K线"]},19648:e=>{e.exports=["12小时"]},55838:e=>{e.exports=["24小时"]},88364:e=>{e.exports=["图表基本样式"]},46720:e=>{e.exports=["十字线"]},50985:e=>{e.exports=["货币"]},17319:e=>{e.exports=["货币和单位"]},19481:e=>{e.exports=["外观"]},68791:e=>{e.exports=["参数"]},95036:e=>{e.exports=["平均收盘价格"]},27331:e=>{e.exports=["背景"]},22519:e=>{e.exports=["K线变化值"]},87845:e=>{e.exports=["按钮"]},25209:e=>{e.exports=["日期格式"]},55090:e=>{e.exports=["标签上的星期几"]},29601:e=>{e.exports=["描述"]},26897:e=>{e.exports=["事件"]},95338:e=>{e.exports=["水平网格线"]},60971:e=>{e.exports=["最高和最低价格"]},61142:e=>{e.exports=["指标"]},34905:e=>{e.exports=["指标值"]},29687:e=>{e.exports=["指标和财务值"]},25084:e=>{e.exports=["指标和财务名称"]},9654:e=>{e.exports=["指标名称"]},99487:e=>{e.exports=["开高低收"]},75991:e=>{e.exports=["开市状态"]},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports=["资金"]},66653:e=>{e.exports=["利润率"]},42502:e=>{e.exports=["无重叠"]},74343:e=>{e.exports=["导航"]},43115:e=>{e.exports=["坐标"]},53224:e=>{e.exports=["坐标放置"]},79194:e=>{e.exports=["状态行"]},89053:e=>{e.exports=["商品代码"]},35383:e=>{e.exports=["商品名称"]},27767:e=>{e.exports=["商品最新价格"]},40847:e=>{e.exports=["商品前一天收盘价"]},50446:e=>{e.exports=["窗格"]},73908:e=>{e.exports=["窗格分隔符"]},36014:e=>{e.exports=["百分比"]},78621:e=>{e.exports=["点数"]},74823:e=>{e.exports=["盘前/盘后价格"]},64859:e=>{e.exports=["价格坐标"]},76523:e=>{e.exports=["价格和百分比值"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["水印"]},67369:e=>{e.exports=["标题"]},31326:e=>{e.exports=["标题"]},23097:e=>{e.exports=["商品代码"]},82168:e=>{e.exports=["商品和描述"]},43637:e=>{e.exports=["时间坐标"]},97316:e=>{e.exports=["时间小时格式"]},90801:e=>{e.exports=["交易"]},77534:e=>{e.exports=["单位"]},1111:e=>{e.exports=["成交量"]},80170:e=>{e.exports=["根据坐标值"]},91322:e=>{e.exports=["数值"]},70353:e=>{e.exports=["垂直网格线"]},57889:e=>{e.exports=["更改OHLC值的可见性"]},35646:e=>{e.exports=["更改导航按钮可见性"]},18644:e=>{e.exports=["更改开市状态可见性"]},45110:e=>{e.exports=["更改K线涨跌可见性"]},10349:e=>{e.exports=["更改下边距"]},88161:e=>{e.exports=["更改货币和单位标签的可见性"]},79570:e=>{e.exports=["更改货币标签可见性"]},99011:e=>{e.exports=["更改图表背景颜色"]},72458:e=>{e.exports=["更改图表背景类型"]},37034:e=>{e.exports=["更改十字准线宽度"]},29951:e=>{e.exports=["更改十字准线颜色"]},92027:e=>{e.exports=["更改十字准线样式"]},50457:e=>{e.exports=["更改日期格式"]},7104:e=>{e.exports=["更改标签上的星期几"]},88096:e=>{e.exports=["更改水平网格线颜色"]},2523:e=>{e.exports=["更改水平网格线样式"]},31325:e=>{e.exports=["更改指标标题可见性"]},99774:e=>{e.exports=["更改指标值的可见性"]},96162:e=>{e.exports=["更改指标参数可见性"]},59820:e=>{e.exports=["更改指标和财务名称标签可见性"]},90512:e=>{e.exports=["更改指标和财务值标签可见性"]},97956:e=>{e.exports=["更改图例背景透明度"]},61061:e=>{e.exports=["更改图例背景可见性"]},37730:e=>{e.exports=["更改窗格按钮可见性"]},89032:e=>{e.exports=["更改窗格分隔符颜色"]},35636:e=>{e.exports=["更改右边距"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["更改商品水印颜色"]},87159:e=>{e.exports=["更改商品水印可见性"]},26717:e=>{e.exports=["更改商品描述可见性"]},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports=["更改商品最新值模式"]},95071:e=>{e.exports=["更改商品图例格式"]},35065:e=>{e.exports=["更改坐标文本颜色"] +},84382:e=>{e.exports=["更改坐标字体大小"]},12468:e=>{e.exports=["更改坐标线条颜色"]},71589:e=>{e.exports=["更改交易时段分隔可见性"]},15035:e=>{e.exports=["更改交易时段分隔宽度"]},1579:e=>{e.exports=["更改交易时段分隔颜色"]},21460:e=>{e.exports=["更改交易时段分隔样式"]},76991:e=>{e.exports=["更改时间小时格式"]},98905:e=>{e.exports=["更改上边距"]},7011:e=>{e.exports=["更改单位标签可见性"]},22722:e=>{e.exports=["更改垂直网格线颜色"]},22867:e=>{e.exports=["更改垂直网格线样式"]},9455:e=>{e.exports=["更改成交量值的可见性"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/zh.6847.490ee46270bef6a878dd.js b/charting_library/bundles/zh.7257.089fbbc28bead9558b87.js similarity index 56% rename from charting_library/bundles/zh.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/zh.7257.089fbbc28bead9558b87.js index c0a48b94..c3cbbf39 100644 --- a/charting_library/bundles/zh.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/zh.7257.089fbbc28bead9558b87.js @@ -1,2 +1,2 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports=["周五"]},11268:e=>{e.exports=["周一"]},63331:e=>{e.exports=["周六"]},85954:e=>{e.exports=["周日"]},26230:e=>{e.exports=["周三"]},24793:e=>{e.exports=["周四"]},31533:e=>{e.exports=["周二"]},89790:e=>{e.exports=["无法获取Pine源代码。"]},39589:e=>{e.exports=["折叠窗格"]},38154:e=>{e.exports=["确定移除研究树"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["建立一个免费账户"]},69419:e=>{e.exports=["一切良好 — 市场开启。"]},97637:e=>{e.exports=["4月"]},86797:e=>{e.exports=["8月"]},22519:e=>{e.exports=["K线变化值"]},52003:e=>{e.exports=["确定删除研究树以及其全部子树?"]},68854:e=>{e.exports=["双击"]},97325:e=>{e.exports=["数据错误"]},52916:e=>{e.exports=["数据每天更新一次。"]},25978:e=>{e.exports=["即使市场上有更多的数据更新,数据也只会每秒更新一次。"]},57310:e=>{e.exports=["显示数据"]},49321:e=>{e.exports=["即使市场上有更多的数据更新,基本方案的数据也只会每秒更新一次。"]},55669:e=>{e.exports=["12月"]},83498:e=>{e.exports=["删除窗格"]},59315:e=>{e.exports=["盘后资讯"]},82751:e=>{e.exports=["错误"]},40519:e=>{e.exports=["晚安。盘后市场已开市。"]},80227:e=>{e.exports=["交易所时区"]},16467:e=>{e.exports=["2月"]},25046:e=>{e.exports=["填写交易协议"]},93666:e=>{e.exports=["标记商品"]},564:e=>{e.exports=["周五"]},72970:e=>{e.exports=["周五"]},88958:e=>{e.exports=["假日"]},21686:e=>{e.exports=["隐藏指标图例"]},26935:e=>{e.exports=["指标参数"]},26315:e=>{e.exports=["指标名称"]},84098:e=>{e.exports=["指标值"]},91459:e=>{e.exports=["如果您需要{listedExchange}实时数据,则需要完成交易协议。不用担心,只需点击几下"]},50634:e=>{e.exports=["它将在{remainingTime}后进入盘后交易。"]},74537:e=>{e.exports=["它将在{remainingTime}开市进行盘前交易。"]},26910:e=>{e.exports=["1月"]},23230:e=>{e.exports=["7月"]},49385:e=>{e.exports=["6月"]},99487:e=>{e.exports=["开高低收"]},15815:e=>{e.exports=["每秒更新一次"]},90784:e=>{e.exports=["10月"]},75991:e=>{e.exports=["开市状态"]},18429:e=>{e.exports=["了解更多"]},39899:e=>{e.exports=["下移窗格"]},70343:e=>{e.exports=["上移窗格"]},83085:e=>{e.exports=["周一"]},61199:e=>{e.exports=["周一"]},41610:e=>{e.exports=["更多"]},1653:e=>{e.exports=["早安。盘前市场已开市。"]},56470:e=>{e.exports=["最大化图表"]},19603:e=>{e.exports=["最大化窗格"]},68327:e=>{e.exports=["5月"]},35732:e=>{e.exports=["管理窗格"]},84675:e=>{e.exports=["3月"]},83949:e=>{e.exports=["开市"]},35701:e=>{e.exports=["市场在{remainingTime}后开盘。"]},95814:e=>{e.exports=["休市"]},98105:e=>{e.exports=["市场在{remainingTime}后收盘。"]},87202:e=>{e.exports=["市场目前正在放假。放松一下。"]},71194:e=>{e.exports=["11月"]},66324:e=>{e.exports=["原始码"]},36835:e=>{e.exports=["周六"]},1144:e=>{e.exports=["周六"]},40653:e=>{e.exports=["向左滚动"]},26721:e=>{e.exports=["滚动到最近的K线"]},35809:e=>{e.exports=["向右滚动"]},61132:e=>{e.exports=["9月"]},28705:e=>{e.exports=["显示指标图例"]},51072:e=>{e.exports=["显示对象树"]},37809:e=>{e.exports=["显示周期设置"]},39045:e=>{e.exports=["Study错误"]},86577:e=>{e.exports=["周日"]},72149:e=>{e.exports=["周日"]},39339:e=>{e.exports=["商品标题"]},29985:e=>{e.exports=["盘后时段"]},28412:e=>{e.exports=["付费方案的数据更新更快速。"]},56042:e=>{e.exports=["盘前时段"]},36015:e=>{e.exports=["目前不支持{description}的实时数据,可能会在未来支持。"]},6667:e=>{e.exports=["{symbolName}的即时数据由{exchange}交易所提供。"]},48293:e=>{e.exports=["还原图表"]},91029:e=>{e.exports=["还原窗格"]},75094:e=>{e.exports=["周三"]},7147:e=>{e.exports=["周三"]},52984:e=>{ -e.exports=["要获取{description}的即时数据,请购买即时数据包。"]},9787:e=>{e.exports=["周四"]},7951:e=>{e.exports=["周四"]},57918:e=>{e.exports=["这些数据是即时的,但与主要交易所的官方数据略有不同。"]},68025:e=>{e.exports=["这些数据是实时的,但与来自{exchange}的官方数据略有不同。"]},73717:e=>{e.exports=["无此商品,请选择另一个商品。"]},57048:e=>{e.exports=["该去散步了— 此市场已关闭。"]},94316:e=>{e.exports=["周二"]},44979:e=>{e.exports=["周二"]},8209:e=>{e.exports=["未标记商品"]},1111:e=>{e.exports=["成交量"]},61311:e=>{e.exports=["放大"]},47602:e=>{e.exports=["缩小"]},57889:e=>{e.exports=["更改OHLC值的可见性"]},18644:e=>{e.exports=["更改开市状态可见性"]},45110:e=>{e.exports=["更改K线涨跌可见性"]},31325:e=>{e.exports=["更改指标标题可见性"]},99774:e=>{e.exports=["更改指标值的可见性"]},96162:e=>{e.exports=["更改指标参数可见性"]},26717:e=>{e.exports=["更改商品描述可见性"]},9455:e=>{e.exports=["更改成交量值的可见性"]},39348:e=>{e.exports=["少于1分钟"]},87358:e=>{e.exports=["显示{title}"]},7827:e=>{e.exports=["{days}和{hours}"]},7435:e=>{e.exports=["来自{originalExchange}的{exchange}"]},19830:e=>{e.exports=["{hours}和{minutes}"]},1084:e=>{e.exports=["{listedExchange}即时数据可供注册用户免费使用。"]},11155:e=>{e.exports=["{symbolName}数据延迟{time}分钟。"]},77033:e=>{e.exports=["数据每{amount}秒更新一次,即使市场上有更多更新。"]},2121:e=>{e.exports=["我们Basic方案的数据每{amount}秒更新一次,即使市场上有更多更新也是如此。"]},5223:e=>{e.exports=["每{amount}秒更新一次"]},58609:e=>{e.exports=["{number} 天"]},24430:e=>{e.exports=["{number} 小时"]},67151:e=>{e.exports=["{number} 分"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports=["周五"]},11268:e=>{e.exports=["周一"]},63331:e=>{e.exports=["周六"]},85954:e=>{e.exports=["周日"]},26230:e=>{e.exports=["周三"]},24793:e=>{e.exports=["周四"]},31533:e=>{e.exports=["周二"]},89790:e=>{e.exports=["无法获取Pine源代码。"]},39589:e=>{e.exports=["折叠窗格"]},38154:e=>{e.exports=["确定移除研究树"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["建立一个免费账户"]},69419:e=>{e.exports=["一切良好 — 市场开启。"]},97637:e=>{e.exports=["4月"]},86797:e=>{e.exports=["8月"]},22519:e=>{e.exports=["K线变化值"]},52003:e=>{e.exports=["确定删除研究树以及其全部子树?"]},68854:e=>{e.exports=["双击"]},97325:e=>{e.exports=["数据错误"]},52916:e=>{e.exports=["数据每天更新一次。"]},25978:e=>{e.exports=["即使市场上有更多的数据更新,数据也只会每秒更新一次。"]},57310:e=>{e.exports=["显示数据"]},49321:e=>{e.exports=["即使市场上有更多的数据更新,基本方案的数据也只会每秒更新一次。"]},55669:e=>{e.exports=["12月"]},83498:e=>{e.exports=["删除窗格"]},59315:e=>{e.exports=["盘后资讯"]},82751:e=>{e.exports=["错误"]},40519:e=>{e.exports=["晚安。盘后市场已开市。"]},80227:e=>{e.exports=["交易所时区"]},16467:e=>{e.exports=["2月"]},25046:e=>{e.exports=["填写交易协议"]},93666:e=>{e.exports=["标记商品"]},564:e=>{e.exports=["周五"]},72970:e=>{e.exports=["周五"]},88958:e=>{e.exports=["假日"]},21686:e=>{e.exports=["隐藏指标图例"]},26935:e=>{e.exports=["指标参数"]},26315:e=>{e.exports=["指标名称"]},84098:e=>{e.exports=["指标值"]},91459:e=>{e.exports=["如果您需要{listedExchange}实时数据,则需要完成交易协议。不用担心,只需点击几下"]},50634:e=>{e.exports=["它将在{remainingTime}后进入盘后交易。"]},74537:e=>{e.exports=["它将在{remainingTime}开市进行盘前交易。"]},26910:e=>{e.exports=["1月"]},23230:e=>{e.exports=["7月"]},49385:e=>{e.exports=["6月"]},99487:e=>{e.exports=["开高低收"]},15815:e=>{e.exports=["每秒更新一次"]},90784:e=>{e.exports=["10月"]},75991:e=>{e.exports=["开市状态"]},18429:e=>{e.exports=["了解更多"]},39899:e=>{e.exports=["下移窗格"]},70343:e=>{e.exports=["上移窗格"]},83085:e=>{e.exports=["周一"]},61199:e=>{e.exports=["周一"]},41610:e=>{e.exports=["更多"]},1653:e=>{e.exports=["早安。盘前市场已开市。"]},56470:e=>{e.exports=["最大化图表"]},19603:e=>{e.exports=["最大化窗格"]},68327:e=>{e.exports=["5月"]},35732:e=>{e.exports=["管理窗格"]},84675:e=>{e.exports=["3月"]},83949:e=>{e.exports=["开市"]},35701:e=>{e.exports=["市场在{remainingTime}后开盘。"]},95814:e=>{e.exports=["休市"]},98105:e=>{e.exports=["市场在{remainingTime}后收盘。"]},87202:e=>{e.exports=["市场目前正在放假。放松一下。"]},71194:e=>{e.exports=["11月"]},66324:e=>{e.exports=["原始码"]},36835:e=>{e.exports=["周六"]},1144:e=>{e.exports=["周六"]},40653:e=>{e.exports=["向左滚动"]},26721:e=>{e.exports=["滚动到最近的K线"]},35809:e=>{e.exports=["向右滚动"]},61132:e=>{e.exports=["9月"]},28705:e=>{e.exports=["显示指标图例"]},51072:e=>{e.exports=["显示对象树"]},37809:e=>{e.exports=["显示周期设置"]},39045:e=>{e.exports=["Study错误"]},86577:e=>{e.exports=["周日"]},72149:e=>{e.exports=["周日"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["商品标题"]},29985:e=>{e.exports=["盘后时段"]},28412:e=>{e.exports=["付费方案的数据更新更快速。"]},56042:e=>{e.exports=["盘前时段"]},36015:e=>{e.exports=["目前不支持{description}的实时数据,可能会在未来支持。"]},6667:e=>{e.exports=["{symbolName}的即时数据由{exchange}交易所提供。"]},48293:e=>{e.exports=["还原图表"]},91029:e=>{e.exports=["还原窗格"]},75094:e=>{e.exports=["周三"]},7147:e=>{e.exports=["周三"] +},52984:e=>{e.exports=["要获取{description}的即时数据,请购买即时数据包。"]},9787:e=>{e.exports=["周四"]},7951:e=>{e.exports=["周四"]},57918:e=>{e.exports=["这些数据是即时的,但与主要交易所的官方数据略有不同。"]},68025:e=>{e.exports=["这些数据是实时的,但与来自{exchange}的官方数据略有不同。"]},73717:e=>{e.exports=["无此商品,请选择另一个商品。"]},57048:e=>{e.exports=["该去散步了— 此市场已关闭。"]},94316:e=>{e.exports=["周二"]},44979:e=>{e.exports=["周二"]},8209:e=>{e.exports=["未标记商品"]},1111:e=>{e.exports=["成交量"]},61311:e=>{e.exports=["放大"]},47602:e=>{e.exports=["缩小"]},57889:e=>{e.exports=["更改OHLC值的可见性"]},18644:e=>{e.exports=["更改开市状态可见性"]},45110:e=>{e.exports=["更改K线涨跌可见性"]},31325:e=>{e.exports=["更改指标标题可见性"]},99774:e=>{e.exports=["更改指标值的可见性"]},96162:e=>{e.exports=["更改指标参数可见性"]},26717:e=>{e.exports=["更改商品描述可见性"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["更改成交量值的可见性"]},39348:e=>{e.exports=["少于1分钟"]},87358:e=>{e.exports=["显示{title}"]},7827:e=>{e.exports=["{days}和{hours}"]},7435:e=>{e.exports=["来自{originalExchange}的{exchange}"]},19830:e=>{e.exports=["{hours}和{minutes}"]},1084:e=>{e.exports=["{listedExchange}即时数据可供注册用户免费使用。"]},11155:e=>{e.exports=["{symbolName}数据延迟{time}分钟。"]},77033:e=>{e.exports=["数据每{amount}秒更新一次,即使市场上有更多更新。"]},2121:e=>{e.exports=["我们Basic方案的数据每{amount}秒更新一次,即使市场上有更多更新也是如此。"]},5223:e=>{e.exports=["每{amount}秒更新一次"]},58609:e=>{e.exports=["{number} 天"]},24430:e=>{e.exports=["{number} 小时"]},67151:e=>{e.exports=["{number} 分"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/zh_TW.1626.e17efbef59ce9b4bc834.js b/charting_library/bundles/zh_TW.1626.e17efbef59ce9b4bc834.js deleted file mode 100644 index 4c3e554e..00000000 --- a/charting_library/bundles/zh_TW.1626.e17efbef59ce9b4bc834.js +++ /dev/null @@ -1,2 +0,0 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1626],{50831:e=>{e.exports=["根K棒"]},19648:e=>{e.exports=["12小時"]},55838:e=>{e.exports=["24小時"]},88364:e=>{e.exports=["圖表基本樣式"]},46720:e=>{e.exports=["十字準線"]},50985:e=>{e.exports=["貨幣"]},17319:e=>{e.exports=["貨幣和單位"]},19481:e=>{e.exports=["外觀"]},68791:e=>{e.exports=["參數"]},95036:e=>{e.exports=["平均收盤價"]},27331:e=>{e.exports=["背景"]},22519:e=>{e.exports=["K棒漲跌值"]},87845:e=>{e.exports=["按鈕"]},25209:e=>{e.exports=["日期格式"]},55090:e=>{e.exports=["標籤上的星期幾"]},29601:e=>{e.exports=["描述"]},26897:e=>{e.exports=["事件"]},95338:e=>{e.exports=["水平網格線"]},60971:e=>{e.exports=["高價和低價"]},61142:e=>{e.exports=["技術指標"]},34905:e=>{e.exports=["指標值"]},29687:e=>{e.exports=["指標和財務值"]},25084:e=>{e.exports=["指標和財務名稱"]},9654:e=>{e.exports=["指標名稱"]},99487:e=>{e.exports=["開高低收值"]},75991:e=>{e.exports=["開市狀態"]},70500:e=>{e.exports=["資金"]},66653:e=>{e.exports=["利益率"]},42502:e=>{e.exports=["無重疊"]},74343:e=>{e.exports=["導航"]},43115:e=>{e.exports=["刻度"]},53224:e=>{e.exports=["刻度放置"]},79194:e=>{e.exports=["狀態列"]},89053:e=>{e.exports=["商品代碼"]},35383:e=>{e.exports=["商品名稱"]},27767:e=>{e.exports=["商品最新價格"]},40847:e=>{e.exports=["商品前一天收盤價"]},50446:e=>{e.exports=["窗格"]},73908:e=>{e.exports=["窗格分隔符號"]},36014:e=>{e.exports=["百分比"]},78621:e=>{e.exports=["點數"]},74823:e=>{e.exports=["盤前/盤後市場價格"]},64859:e=>{e.exports=["價格刻度"]},76523:e=>{e.exports=["價格和百分比值"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["浮水印"]},67369:e=>{e.exports=["標題"]},31326:e=>{e.exports=["標題"]},23097:e=>{e.exports=["商品代碼"]},82168:e=>{e.exports=["商品和描述"]},43637:e=>{e.exports=["時間刻度"]},97316:e=>{e.exports=["時間小時格式"]},90801:e=>{e.exports=["交易"]},77534:e=>{e.exports=["單位"]},1111:e=>{e.exports=["成交量"]},80170:e=>{e.exports=["根據刻度值"]},91322:e=>{e.exports=["數值"]},70353:e=>{e.exports=["垂直網格線"]},57889:e=>{e.exports=["更改開高低收值可見性"]},35646:e=>{e.exports=["更改導航按鈕可見性"]},18644:e=>{e.exports=["更改開盤狀態可見性"]},45110:e=>{e.exports=["更改K線漲跌可見性"]},10349:e=>{e.exports=["更改下邊距"]},88161:e=>{e.exports=["更改貨幣和單位標籤的可見性"]},79570:e=>{e.exports=["更改貨幣標籤可見性"]},99011:e=>{e.exports=["更改圖表背景顏色"]},72458:e=>{e.exports=["更改圖表背景類型"]},37034:e=>{e.exports=["更改十字準線寬度"]},29951:e=>{e.exports=["更改十字準線顏色"]},92027:e=>{e.exports=["更改十字準線樣式"]},50457:e=>{e.exports=["更改日期格式"]},7104:e=>{e.exports=["更改標籤上的星期幾"]},88096:e=>{e.exports=["更改水平網格線顏色"]},2523:e=>{e.exports=["更改水平網格線樣式"]},31325:e=>{e.exports=["更改指標標題可見性"]},99774:e=>{e.exports=["更改指標值可見性"]},96162:e=>{e.exports=["更改指標參數可見性"]},59820:e=>{e.exports=["更改指標和財務名稱標籤可見性"]},90512:e=>{e.exports=["更改指標和財務值標籤可見性"]},97956:e=>{e.exports=["更改圖例背景透明度"]},61061:e=>{e.exports=["更改圖例背景可見性"]},37730:e=>{e.exports=["更改窗格按鈕可見性"]},89032:e=>{e.exports=["改變窗格分隔符號顏色"]},35636:e=>{e.exports=["更改右邊距"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["更改商品浮水印顏色"]},87159:e=>{e.exports=["更改商品浮水印可見性"]},26717:e=>{e.exports=["更改商品描述可見性"]},28741:e=>{e.exports=["更改商品最新值模式"]},95071:e=>{e.exports=["更改商品圖例格式"]},35065:e=>{e.exports=["更改刻度文字顏色"]},84382:e=>{e.exports=["更改刻度字體大小"]},12468:e=>{e.exports=["更改刻度線條顏色"]},71589:e=>{ -e.exports=["更改交易時段分隔可見性"]},15035:e=>{e.exports=["更改交易時段分隔寬度"]},1579:e=>{e.exports=["更改交易時段分隔顏色"]},21460:e=>{e.exports=["更改交易時段分隔樣式"]},76991:e=>{e.exports=["更改時間格式"]},98905:e=>{e.exports=["更改上邊距"]},7011:e=>{e.exports=["更改單位標籤可見性"]},22722:e=>{e.exports=["更改垂直網格線顏色"]},22867:e=>{e.exports=["更改垂直網格線樣式"]},9455:e=>{e.exports=["更改成交量值可見性"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/zh_TW.6444.4dd7c5a260f1ab2f3d47.js b/charting_library/bundles/zh_TW.6444.4dd7c5a260f1ab2f3d47.js new file mode 100644 index 00000000..6aca3293 --- /dev/null +++ b/charting_library/bundles/zh_TW.6444.4dd7c5a260f1ab2f3d47.js @@ -0,0 +1,2 @@ +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6444],{50831:e=>{e.exports=["根K棒"]},19648:e=>{e.exports=["12小時"]},55838:e=>{e.exports=["24小時"]},88364:e=>{e.exports=["圖表基本樣式"]},46720:e=>{e.exports=["十字準線"]},50985:e=>{e.exports=["貨幣"]},17319:e=>{e.exports=["貨幣和單位"]},19481:e=>{e.exports=["外觀"]},68791:e=>{e.exports=["參數"]},95036:e=>{e.exports=["平均收盤價"]},27331:e=>{e.exports=["背景"]},22519:e=>{e.exports=["K棒漲跌值"]},87845:e=>{e.exports=["按鈕"]},25209:e=>{e.exports=["日期格式"]},55090:e=>{e.exports=["標籤上的星期幾"]},29601:e=>{e.exports=["描述"]},26897:e=>{e.exports=["事件"]},95338:e=>{e.exports=["水平網格線"]},60971:e=>{e.exports=["高價和低價"]},61142:e=>{e.exports=["技術指標"]},34905:e=>{e.exports=["指標值"]},29687:e=>{e.exports=["指標和財務值"]},25084:e=>{e.exports=["指標和財務名稱"]},9654:e=>{e.exports=["指標名稱"]},99487:e=>{e.exports=["開高低收值"]},75991:e=>{e.exports=["開市狀態"]},96073:e=>{e.exports="Long Description"},70500:e=>{e.exports=["資金"]},66653:e=>{e.exports=["利益率"]},42502:e=>{e.exports=["無重疊"]},74343:e=>{e.exports=["導航"]},43115:e=>{e.exports=["刻度"]},53224:e=>{e.exports=["刻度放置"]},79194:e=>{e.exports=["狀態列"]},89053:e=>{e.exports=["商品代碼"]},35383:e=>{e.exports=["商品名稱"]},27767:e=>{e.exports=["商品最新價格"]},40847:e=>{e.exports=["商品前一天收盤價"]},50446:e=>{e.exports=["窗格"]},73908:e=>{e.exports=["窗格分隔符號"]},36014:e=>{e.exports=["百分比"]},78621:e=>{e.exports=["點數"]},74823:e=>{e.exports=["盤前/盤後市場價格"]},64859:e=>{e.exports=["價格刻度"]},76523:e=>{e.exports=["價格和百分比值"]},40187:e=>{e.exports="Right Margin"},77705:e=>{e.exports=["浮水印"]},67369:e=>{e.exports=["標題"]},31326:e=>{e.exports=["標題"]},23097:e=>{e.exports=["商品代碼"]},82168:e=>{e.exports=["商品和描述"]},43637:e=>{e.exports=["時間刻度"]},97316:e=>{e.exports=["時間小時格式"]},90801:e=>{e.exports=["交易"]},77534:e=>{e.exports=["單位"]},1111:e=>{e.exports=["成交量"]},80170:e=>{e.exports=["根據刻度值"]},91322:e=>{e.exports=["數值"]},70353:e=>{e.exports=["垂直網格線"]},57889:e=>{e.exports=["更改開高低收值可見性"]},35646:e=>{e.exports=["更改導航按鈕可見性"]},18644:e=>{e.exports=["更改開盤狀態可見性"]},45110:e=>{e.exports=["更改K線漲跌可見性"]},10349:e=>{e.exports=["更改下邊距"]},88161:e=>{e.exports=["更改貨幣和單位標籤的可見性"]},79570:e=>{e.exports=["更改貨幣標籤可見性"]},99011:e=>{e.exports=["更改圖表背景顏色"]},72458:e=>{e.exports=["更改圖表背景類型"]},37034:e=>{e.exports=["更改十字準線寬度"]},29951:e=>{e.exports=["更改十字準線顏色"]},92027:e=>{e.exports=["更改十字準線樣式"]},50457:e=>{e.exports=["更改日期格式"]},7104:e=>{e.exports=["更改標籤上的星期幾"]},88096:e=>{e.exports=["更改水平網格線顏色"]},2523:e=>{e.exports=["更改水平網格線樣式"]},31325:e=>{e.exports=["更改指標標題可見性"]},99774:e=>{e.exports=["更改指標值可見性"]},96162:e=>{e.exports=["更改指標參數可見性"]},59820:e=>{e.exports=["更改指標和財務名稱標籤可見性"]},90512:e=>{e.exports=["更改指標和財務值標籤可見性"]},97956:e=>{e.exports=["更改圖例背景透明度"]},61061:e=>{e.exports=["更改圖例背景可見性"]},37730:e=>{e.exports=["更改窗格按鈕可見性"]},89032:e=>{e.exports=["改變窗格分隔符號顏色"]},35636:e=>{e.exports=["更改右邊距"]},66601:e=>{e.exports="change right margin percentage"},25616:e=>{e.exports=["更改商品浮水印顏色"]},87159:e=>{e.exports=["更改商品浮水印可見性"]},26717:e=>{e.exports=["更改商品描述可見性"]},6091:e=>{e.exports="change symbol field visibility"},28741:e=>{e.exports=["更改商品最新值模式"]},95071:e=>{e.exports=["更改商品圖例格式"]},35065:e=>{ +e.exports=["更改刻度文字顏色"]},84382:e=>{e.exports=["更改刻度字體大小"]},12468:e=>{e.exports=["更改刻度線條顏色"]},71589:e=>{e.exports=["更改交易時段分隔可見性"]},15035:e=>{e.exports=["更改交易時段分隔寬度"]},1579:e=>{e.exports=["更改交易時段分隔顏色"]},21460:e=>{e.exports=["更改交易時段分隔樣式"]},76991:e=>{e.exports=["更改時間格式"]},98905:e=>{e.exports=["更改上邊距"]},7011:e=>{e.exports=["更改單位標籤可見性"]},22722:e=>{e.exports=["更改垂直網格線顏色"]},22867:e=>{e.exports=["更改垂直網格線樣式"]},9455:e=>{e.exports=["更改成交量值可見性"]}}]); \ No newline at end of file diff --git a/charting_library/bundles/zh_TW.6847.490ee46270bef6a878dd.js b/charting_library/bundles/zh_TW.7257.089fbbc28bead9558b87.js similarity index 56% rename from charting_library/bundles/zh_TW.6847.490ee46270bef6a878dd.js rename to charting_library/bundles/zh_TW.7257.089fbbc28bead9558b87.js index 60a2494a..93cfb279 100644 --- a/charting_library/bundles/zh_TW.6847.490ee46270bef6a878dd.js +++ b/charting_library/bundles/zh_TW.7257.089fbbc28bead9558b87.js @@ -1,2 +1,2 @@ -(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6847],{19801:e=>{e.exports=["周五"]},11268:e=>{e.exports=["周一"]},63331:e=>{e.exports=["周六"]},85954:e=>{e.exports=["周日"]},26230:e=>{e.exports=["周三"]},24793:e=>{e.exports=["周四"]},31533:e=>{e.exports=["周二"]},89790:e=>{e.exports=["無法取得Pine原始碼"]},39589:e=>{e.exports=["摺疊窗格"]},38154:e=>{e.exports=["確定移除研究樹"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["建立一個免費賬戶"]},69419:e=>{e.exports=["一切良好 — 市場開啟。"]},97637:e=>{e.exports=["四月"]},86797:e=>{e.exports=["八月"]},22519:e=>{e.exports=["K棒漲跌值"]},52003:e=>{e.exports=["確定要刪除研究及其所有子項目嗎?"]},68854:e=>{e.exports=["雙擊"]},97325:e=>{e.exports=["數據錯誤"]},52916:e=>{e.exports=["數據每天更新一次。"]},25978:e=>{e.exports=["即使市場上有更多的數據更新,數據也只會每秒更新一次。"]},57310:e=>{e.exports=["顯示數據"]},49321:e=>{e.exports=["即使市場上有更多的數據更新,基本方案的數據也只會每秒更新一次。"]},55669:e=>{e.exports=["十二月"]},83498:e=>{e.exports=["刪除窗格"]},59315:e=>{e.exports=["盤後資訊"]},82751:e=>{e.exports=["錯誤"]},40519:e=>{e.exports=["晚安。盤後市場已開市。"]},80227:e=>{e.exports=["交易所時區"]},16467:e=>{e.exports=["二月"]},25046:e=>{e.exports=["填寫交易協議"]},93666:e=>{e.exports=["標記商品"]},564:e=>{e.exports=["周五"]},72970:e=>{e.exports=["周五"]},88958:e=>{e.exports=["假日"]},21686:e=>{e.exports=["隱藏指標圖例"]},26935:e=>{e.exports=["指標參數"]},26315:e=>{e.exports=["指標名稱"]},84098:e=>{e.exports=["指標值"]},91459:e=>{e.exports=["如果您需要{listedExchange}即時數據,則需要完成交易協議。不用擔心,只需點擊幾下"]},50634:e=>{e.exports=["它將在{remainingTime}後進入盤後交易。"]},74537:e=>{e.exports=["盤前交易將在{remainingTime}後開盤。"]},26910:e=>{e.exports=["一月"]},23230:e=>{e.exports=["七月"]},49385:e=>{e.exports=["六月"]},99487:e=>{e.exports=["開高低收值"]},15815:e=>{e.exports=["每秒更新一次"]},90784:e=>{e.exports=["十月"]},75991:e=>{e.exports=["開市狀態"]},18429:e=>{e.exports=["了解更多"]},39899:e=>{e.exports=["下移窗格"]},70343:e=>{e.exports=["上移窗格"]},83085:e=>{e.exports=["周一"]},61199:e=>{e.exports=["周一"]},41610:e=>{e.exports=["更多"]},1653:e=>{e.exports=["早安。盤前市場已開市。"]},56470:e=>{e.exports=["最大化圖表"]},19603:e=>{e.exports=["最大化窗格"]},68327:e=>{e.exports=["五月"]},35732:e=>{e.exports=["管理窗格"]},84675:e=>{e.exports=["三月"]},83949:e=>{e.exports=["開市"]},35701:e=>{e.exports=["市場在{remainingTime}後開盤。"]},95814:e=>{e.exports=["休市"]},98105:e=>{e.exports=["市場在{remainingTime}後收盤。"]},87202:e=>{e.exports=["市場目前正在放假。放鬆一下。"]},71194:e=>{e.exports=["十一月"]},66324:e=>{e.exports=["原始碼"]},36835:e=>{e.exports=["周六"]},1144:e=>{e.exports=["周六"]},40653:e=>{e.exports=["向左滾動"]},26721:e=>{e.exports=["滾動到最近的欄位"]},35809:e=>{e.exports=["向右滾動"]},61132:e=>{e.exports=["九月"]},28705:e=>{e.exports=["顯示指標圖例"]},51072:e=>{e.exports=["顯示物件樹"]},37809:e=>{e.exports=["顯示周期設定"]},39045:e=>{e.exports=["Study錯誤"]},86577:e=>{e.exports=["周日"]},72149:e=>{e.exports=["周日"]},39339:e=>{e.exports=["商品標題"]},29985:e=>{e.exports=["盤後時段"]},28412:e=>{e.exports=["付費方案的數據更新更快速。"]},56042:e=>{e.exports=["盤前時段"]},36015:e=>{e.exports=["目前不支援{description}的即時數據,可能會在未來支援。"]},6667:e=>{e.exports=["{symbolName}的即時數據由{exchange}交易所提供。"]},48293:e=>{e.exports=["還原圖表"]},91029:e=>{e.exports=["還原窗格"]},75094:e=>{e.exports=["周三"]},7147:e=>{e.exports=["周三"]},52984:e=>{ -e.exports=["要獲取{description}的即時數據,請購買即時數據包。"]},9787:e=>{e.exports=["周四"]},7951:e=>{e.exports=["周四"]},57918:e=>{e.exports=["這些數據是即時的,但與主要交易所的官方數據略有不同。"]},68025:e=>{e.exports=["這些數據是即時的,但與來自{exchange}的官方數據略有不同。"]},73717:e=>{e.exports=["無此商品,請選擇另一個商品。"]},57048:e=>{e.exports=["該去散步了 — 此市場已關閉。"]},94316:e=>{e.exports=["周二"]},44979:e=>{e.exports=["周一"]},8209:e=>{e.exports=["取消標記商品"]},1111:e=>{e.exports=["成交量"]},61311:e=>{e.exports=["放大"]},47602:e=>{e.exports=["縮小"]},57889:e=>{e.exports=["更改開高低收值可見性"]},18644:e=>{e.exports=["更改開盤狀態可見性"]},45110:e=>{e.exports=["更改K線漲跌可見性"]},31325:e=>{e.exports=["更改指標標題可見性"]},99774:e=>{e.exports=["更改指標值可見性"]},96162:e=>{e.exports=["更改指標參數可見性"]},26717:e=>{e.exports=["更改商品描述可見性"]},9455:e=>{e.exports=["更改成交量值可見性"]},39348:e=>{e.exports=["少於一分鐘"]},87358:e=>{e.exports=["顯示{title}"]},7827:e=>{e.exports=["{days}和{hours}"]},7435:e=>{e.exports=["來自{originalExchange}的{exchange}"]},19830:e=>{e.exports=["{hours}和{minutes}"]},1084:e=>{e.exports=["{listedExchange}即時數據可供註冊用戶免費使用。"]},11155:e=>{e.exports=["{symbolName}數據延遲{time}分鐘。"]},77033:e=>{e.exports=["數據每{amount}秒更新一次,即使市場上有更多更新也是如此。"]},2121:e=>{e.exports=["我們基本方案的數據每{amount}秒更新一次,即使市場上有更多更新也是如此。"]},5223:e=>{e.exports=["每{amount}秒更新一次"]},58609:e=>{e.exports=["{number} 天"]},24430:e=>{e.exports=["{number} 小時"]},67151:e=>{e.exports=["{number} 分"]}}]); \ No newline at end of file +(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7257],{19801:e=>{e.exports=["周五"]},11268:e=>{e.exports=["周一"]},63331:e=>{e.exports=["周六"]},85954:e=>{e.exports=["周日"]},26230:e=>{e.exports=["周三"]},24793:e=>{e.exports=["周四"]},31533:e=>{e.exports=["周二"]},89790:e=>{e.exports=["無法取得Pine原始碼"]},39589:e=>{e.exports=["摺疊窗格"]},38154:e=>{e.exports=["確定移除研究樹"]},65636:e=>{e.exports="Cboe BZX"},36004:e=>{e.exports=["建立一個免費賬戶"]},69419:e=>{e.exports=["一切良好 — 市場開啟。"]},97637:e=>{e.exports=["四月"]},86797:e=>{e.exports=["八月"]},22519:e=>{e.exports=["K棒漲跌值"]},52003:e=>{e.exports=["確定要刪除研究及其所有子項目嗎?"]},68854:e=>{e.exports=["雙擊"]},97325:e=>{e.exports=["數據錯誤"]},52916:e=>{e.exports=["數據每天更新一次。"]},25978:e=>{e.exports=["即使市場上有更多的數據更新,數據也只會每秒更新一次。"]},57310:e=>{e.exports=["顯示數據"]},49321:e=>{e.exports=["即使市場上有更多的數據更新,基本方案的數據也只會每秒更新一次。"]},55669:e=>{e.exports=["十二月"]},83498:e=>{e.exports=["刪除窗格"]},59315:e=>{e.exports=["盤後資訊"]},82751:e=>{e.exports=["錯誤"]},40519:e=>{e.exports=["晚安。盤後市場已開市。"]},80227:e=>{e.exports=["交易所時區"]},16467:e=>{e.exports=["二月"]},25046:e=>{e.exports=["填寫交易協議"]},93666:e=>{e.exports=["標記商品"]},564:e=>{e.exports=["周五"]},72970:e=>{e.exports=["周五"]},88958:e=>{e.exports=["假日"]},21686:e=>{e.exports=["隱藏指標圖例"]},26935:e=>{e.exports=["指標參數"]},26315:e=>{e.exports=["指標名稱"]},84098:e=>{e.exports=["指標值"]},91459:e=>{e.exports=["如果您需要{listedExchange}即時數據,則需要完成交易協議。不用擔心,只需點擊幾下"]},50634:e=>{e.exports=["它將在{remainingTime}後進入盤後交易。"]},74537:e=>{e.exports=["盤前交易將在{remainingTime}後開盤。"]},26910:e=>{e.exports=["一月"]},23230:e=>{e.exports=["七月"]},49385:e=>{e.exports=["六月"]},99487:e=>{e.exports=["開高低收值"]},15815:e=>{e.exports=["每秒更新一次"]},90784:e=>{e.exports=["十月"]},75991:e=>{e.exports=["開市狀態"]},18429:e=>{e.exports=["了解更多"]},39899:e=>{e.exports=["下移窗格"]},70343:e=>{e.exports=["上移窗格"]},83085:e=>{e.exports=["周一"]},61199:e=>{e.exports=["周一"]},41610:e=>{e.exports=["更多"]},1653:e=>{e.exports=["早安。盤前市場已開市。"]},56470:e=>{e.exports=["最大化圖表"]},19603:e=>{e.exports=["最大化窗格"]},68327:e=>{e.exports=["五月"]},35732:e=>{e.exports=["管理窗格"]},84675:e=>{e.exports=["三月"]},83949:e=>{e.exports=["開市"]},35701:e=>{e.exports=["市場在{remainingTime}後開盤。"]},95814:e=>{e.exports=["休市"]},98105:e=>{e.exports=["市場在{remainingTime}後收盤。"]},87202:e=>{e.exports=["市場目前正在放假。放鬆一下。"]},71194:e=>{e.exports=["十一月"]},66324:e=>{e.exports=["原始碼"]},36835:e=>{e.exports=["周六"]},1144:e=>{e.exports=["周六"]},40653:e=>{e.exports=["向左滾動"]},26721:e=>{e.exports=["滾動到最近的欄位"]},35809:e=>{e.exports=["向右滾動"]},61132:e=>{e.exports=["九月"]},28705:e=>{e.exports=["顯示指標圖例"]},51072:e=>{e.exports=["顯示物件樹"]},37809:e=>{e.exports=["顯示周期設定"]},39045:e=>{e.exports=["Study錯誤"]},86577:e=>{e.exports=["周日"]},72149:e=>{e.exports=["周日"]},46041:e=>{e.exports="Symbol price source"},39339:e=>{e.exports=["商品標題"]},29985:e=>{e.exports=["盤後時段"]},28412:e=>{e.exports=["付費方案的數據更新更快速。"]},56042:e=>{e.exports=["盤前時段"]},36015:e=>{e.exports=["目前不支援{description}的即時數據,可能會在未來支援。"]},6667:e=>{e.exports=["{symbolName}的即時數據由{exchange}交易所提供。"]},48293:e=>{e.exports=["還原圖表"]},91029:e=>{e.exports=["還原窗格"]},75094:e=>{e.exports=["周三"]},7147:e=>{e.exports=["周三"]}, +52984:e=>{e.exports=["要獲取{description}的即時數據,請購買即時數據包。"]},9787:e=>{e.exports=["周四"]},7951:e=>{e.exports=["周四"]},57918:e=>{e.exports=["這些數據是即時的,但與主要交易所的官方數據略有不同。"]},68025:e=>{e.exports=["這些數據是即時的,但與來自{exchange}的官方數據略有不同。"]},73717:e=>{e.exports=["無此商品,請選擇另一個商品。"]},57048:e=>{e.exports=["該去散步了 — 此市場已關閉。"]},94316:e=>{e.exports=["周二"]},44979:e=>{e.exports=["周一"]},8209:e=>{e.exports=["取消標記商品"]},1111:e=>{e.exports=["成交量"]},61311:e=>{e.exports=["放大"]},47602:e=>{e.exports=["縮小"]},57889:e=>{e.exports=["更改開高低收值可見性"]},18644:e=>{e.exports=["更改開盤狀態可見性"]},45110:e=>{e.exports=["更改K線漲跌可見性"]},31325:e=>{e.exports=["更改指標標題可見性"]},99774:e=>{e.exports=["更改指標值可見性"]},96162:e=>{e.exports=["更改指標參數可見性"]},26717:e=>{e.exports=["更改商品描述可見性"]},6091:e=>{e.exports="change symbol field visibility"},9455:e=>{e.exports=["更改成交量值可見性"]},39348:e=>{e.exports=["少於一分鐘"]},87358:e=>{e.exports=["顯示{title}"]},7827:e=>{e.exports=["{days}和{hours}"]},7435:e=>{e.exports=["來自{originalExchange}的{exchange}"]},19830:e=>{e.exports=["{hours}和{minutes}"]},1084:e=>{e.exports=["{listedExchange}即時數據可供註冊用戶免費使用。"]},11155:e=>{e.exports=["{symbolName}數據延遲{time}分鐘。"]},77033:e=>{e.exports=["數據每{amount}秒更新一次,即使市場上有更多更新也是如此。"]},2121:e=>{e.exports=["我們基本方案的數據每{amount}秒更新一次,即使市場上有更多更新也是如此。"]},5223:e=>{e.exports=["每{amount}秒更新一次"]},58609:e=>{e.exports=["{number} 天"]},24430:e=>{e.exports=["{number} 小時"]},67151:e=>{e.exports=["{number} 分"]}}]); \ No newline at end of file diff --git a/charting_library/charting_library.cjs.js b/charting_library/charting_library.cjs.js index 1feeb46b..165c4f65 100644 --- a/charting_library/charting_library.cjs.js +++ b/charting_library/charting_library.cjs.js @@ -1 +1 @@ -"use strict";function t(e,n){const i={...e};for(const o in n)"object"!=typeof e[o]||null===e[o]||Array.isArray(e[o])?void 0!==n[o]&&(i[o]=n[o]):i[o]=t(e[o],n[o]);return i}Object.defineProperty(exports,"__esModule",{value:!0});const e={width:800,height:500,interval:"1D",timezone:"Etc/UTC",container:"",library_path:"",locale:"en",widgetbar:{details:!1,watchlist:!1,news:!1,datawindow:!1,watchlist_settings:{default_symbols:[]}},overrides:{"mainSeriesProperties.showCountdown":!1},studies_overrides:{},trading_customization:{position:{},order:{}},brokerConfig:{configFlags:{}},fullscreen:!1,autosize:!1,disabled_features:[],enabled_features:[],debug:!1,logo:{},time_frames:[{text:"5y",resolution:"1W"},{text:"1y",resolution:"1W"},{text:"6m",resolution:"120"},{text:"3m",resolution:"60"},{text:"1m",resolution:"30"},{text:"5d",resolution:"5"},{text:"1d",resolution:"1"}],client_id:"0",user_id:"0",charts_storage_api_version:"1.0",favorites:{intervals:[],chartTypes:[]}};let n=!1;function i(t){var e;const n=/\.woff(\d*)/.exec(t);return``}function o(t,e){const n=new URL(`${t||""}`,location.href).href,o=JSON.parse('["bundles/runtime.e08bdddf2e5e3f42ece6.js","bundles/__LANG__.7076.5055b5f097e7204685ed.js","bundles/7717.8f75bd75d4b6ed45f3ff.css","bundles/7717.8f75bd75d4b6ed45f3ff.rtl.css","bundles/4618.21b8783f87efce82d094.js","bundles/library.1ac08da24621d68cbd6c.js","bundles/EuclidCircular.be8f862db48c2976009f.woff2"]'),s=JSON.parse('[{"iso":"ar","dir":"rtl","language":"ar"},{"iso":"pt","dir":"ltr","language":"pt"},{"iso":"ca","dir":"ltr","language":"ca_ES"},{"iso":"cs","dir":"ltr","language":"cs"},{"iso":"de","dir":"ltr","language":"de"},{"iso":"en","dir":"ltr","language":"en"},{"iso":"es","dir":"ltr","language":"es"},{"iso":"fa","dir":"rtl","language":"fa"},{"iso":"fr","dir":"ltr","language":"fr"},{"iso":"he","dir":"rtl","language":"he_IL"},{"iso":"hu","dir":"ltr","language":"hu_HU"},{"iso":"id","dir":"ltr","language":"id_ID"},{"iso":"en","dir":"ltr","language":"en"},{"iso":"it","dir":"ltr","language":"it"},{"iso":"ja","dir":"ltr","language":"ja"},{"iso":"ko","dir":"ltr","language":"ko"},{"iso":"ms","dir":"ltr","language":"ms_MY"},{"iso":"pl","dir":"ltr","language":"pl"},{"iso":"ru","dir":"ltr","language":"ru"},{"iso":"sv","dir":"ltr","language":"sv"},{"iso":"th","dir":"ltr","language":"th"},{"iso":"tr","dir":"ltr","language":"tr"},{"iso":"vi","dir":"ltr","language":"vi"},{"iso":"zh-Hans","dir":"ltr","language":"zh"},{"iso":"zh-Hant","dir":"ltr","language":"zh_TW"},{"iso":"el","dir":"ltr","language":"el"},{"iso":"nl","dir":"ltr","language":"nl_NL"},{"iso":"ro","dir":"ltr","language":"ro"}]'),r=encodeURIComponent(e),a=s.find((t=>t.language===r)),d=`lang="${a.iso}" dir="${a.dir}"`,l=`\n${function(t,e,n){if(void 0===t)return"";const o=[],s=[],r=[],a=/\.css$/i,d=/\.rtl\.css$/i;for(const l of t)l.endsWith(".js")?s.push(`