@deriv-com/smartcharts-champion 1.9.11 → 1.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/DocSyncAI.yml +27 -1
- package/.github/workflows/README.md +1 -1
- package/.github/workflows/deploy-preview.yml +9 -9
- package/.github/workflows/publish-smart-charts.yml +12 -12
- package/CHANGELOG.md +9 -2
- package/README.md +1 -1
- package/dist/chart/flutter_bootstrap.js +1 -1
- package/dist/chart/flutter_service_worker.js +1 -1
- package/dist/chart/main.dart.js +1 -1
- package/dist/chart/main.dart.mjs +1 -1
- package/dist/chart/main.dart.wasm +0 -0
- package/dist/smartcharts.js +1 -1
- package/dist/smartcharts.js.map +1 -1
- package/package.json +3 -3
- package/release.config.cjs +1 -1
package/dist/smartcharts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-dom"),require("react-transition-group"),require("react"),require("dayjs"),require("mobx"),require("mobx-react-lite")):"function"==typeof define&&define.amd?define([,,,,,],e):"object"==typeof exports?exports.smartcharts=e(require("react-dom"),require("react-transition-group"),require("react"),require("dayjs"),require("mobx"),require("mobx-react-lite")):t.smartcharts=e(t.ReactDOM,t.ReactTransitionGroup,t.React,t.dayjs,t.mobx,t.mobxReactLite)}(self,(t,e,r,i,a,s)=>(()=>{var n,o,l,c,h={7231(t){t.exports=function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(i,a,s){var n=a.prototype;s.utc=function(t){return new a({date:t,utc:!0,args:arguments})},n.utc=function(e){var r=s(this.toDate(),{locale:this.$L,utc:!0});return e?r.add(this.utcOffset(),t):r},n.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var o=n.parse;n.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t)};var l=n.init;n.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else l.call(this)};var c=n.utcOffset;n.utcOffset=function(i,a){var s=this.$utils().u;if(s(i))return this.$u?0:s(this.$offset)?c.call(this):this.$offset;if("string"==typeof i&&(i=function(t){void 0===t&&(t="");var i=t.match(e);if(!i)return null;var a=(""+i[0]).match(r)||["-",0,0],s=a[0],n=60*+a[1]+ +a[2];return 0===n?0:"+"===s?n:-n}(i),null===i))return this;var n=Math.abs(i)<=16?60*i:i;if(0===n)return this.utc(a);var o=this.clone();if(a)return o.$offset=n,o.$u=!1,o;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(o=this.local().add(n+l,t)).$offset=n,o.$x.$localOffset=l,o};var h=n.format;n.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,e)},n.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},n.isUTC=function(){return!!this.$u},n.toISOString=function(){return this.toDate().toISOString()},n.toString=function(){return this.toDate().toUTCString()};var u=n.toDate;n.toDate=function(t){return"s"===t&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():u.call(this)};var d=n.diff;n.diff=function(t,e,r){if(t&&this.$u===t.$u)return d.call(this,t,e,r);var i=this.local(),a=s(t).local();return d.call(i,a,e,r)}}}()},12(t){"use strict";var e=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}();var r={emitDelay:10,strictMode:!1},i=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?r:arguments[0];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=void 0,a=void 0;i=e.hasOwnProperty("emitDelay")?e.emitDelay:r.emitDelay,this._emitDelay=i,a=e.hasOwnProperty("strictMode")?e.strictMode:r.strictMode,this._strictMode=a,this._listeners={},this.events=[]}return e(t,[{key:"_addListenner",value:function(t,e,r){if("function"!=typeof e)throw TypeError("listener must be a function");-1===this.events.indexOf(t)?(this._listeners[t]=[{once:r,fn:e}],this.events.push(t)):this._listeners[t].push({once:r,fn:e})}},{key:"on",value:function(t,e){this._addListenner(t,e,!1)}},{key:"once",value:function(t,e){this._addListenner(t,e,!0)}},{key:"off",value:function(t,e){var r,i,a=this,s=this.events.indexOf(t);t&&-1!==s&&(e?(r=[],(i=a._listeners[t]).forEach(function(t,i){t.fn===e&&r.unshift(i)}),r.forEach(function(t){i.splice(t,1)}),i.length||(a.events.splice(s,1),delete a._listeners[t])):(delete this._listeners[t],this.events.splice(s,1)))}},{key:"_applyEvents",value:function(t,e){var r=this._listeners[t];if(r&&r.length){var i=[];r.forEach(function(t,r){t.fn.apply(null,e),t.once&&i.unshift(r)}),i.forEach(function(t){r.splice(t,1)})}else if(this._strictMode)throw"No listeners specified for event: "+t}},{key:"emit",value:function(t){for(var e=this,r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];this._emitDelay?setTimeout(function(){e._applyEvents.call(e,t,i)},this._emitDelay):this._applyEvents(t,i)}},{key:"emitSync",value:function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];this._applyEvents(t,r)}},{key:"destroy",value:function(){this._listeners={},this.events=[]}}]),t}();t.exports=i},9829(t,e,r){"use strict";var i=r(6550);function a(){}function s(){}s.resetWarningCache=a,t.exports=function(){function t(t,e,r,a,s,n){if(n!==i){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function e(){return t}t.isRequired=t;var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:s,resetWarningCache:a};return r.PropTypes=r,r}},8713(t,e,r){t.exports=r(9829)()},6550(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7933(t,e,r){"use strict";var i=r(809),a=Symbol.for("react.element"),s=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,r){var i,s={},c=null,h=null;for(i in void 0!==r&&(c=""+r),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(h=e.ref),e)n.call(e,i)&&!l.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:a,type:t,key:c,ref:h,props:s,_owner:o.current}}e.Fragment=s,e.jsx=c,e.jsxs=c},7671(t,e,r){"use strict";t.exports=r(7933)},1045(t,e,r){"use strict";r.d(e,{AT:()=>x,Fp:()=>v,NI:()=>S,Os:()=>l,Sn:()=>C,Xv:()=>c,YH:()=>p,c4:()=>w,jY:()=>T,wx:()=>y});var i=r(1186),a=r(9585),s=r(1993),n=r(7671),o=r(9160).t;const l=()=>({horizontal:{id:"horizontal",text:o.translate("Horizontal line [num]"),icon:i.BT},line:{id:"line",text:o.translate("Trend line [num]"),icon:i.bV},vertical:{id:"vertical",text:o.translate("Vertical line [num]"),icon:i.zx}}),c=()=>[{category:"momentum",name:o.translate("Momentum"),icon:a.hy,items:[{flutter_chart_id:"AwesomeOscillator",name:o.translate("Awesome Oscillator"),short_name:o.translate("Awesome"),description:o.translate("The Awesome Oscillator is an indicator used to measure market momentum. AO calculates the difference of a 34 Period and 5 Period Simple Moving Averages. The Simple Moving Averages that are used are not calculated using closing price but rather each bar's midpoints. AO is generally used to affirm trends or to anticipate possible reversals."),icon:a.o2,isPrediction:!0},{flutter_chart_id:"dpo",name:o.translate("Detrended Price Oscillator"),short_name:o.translate("Detrended"),description:o.translate("The Detrended Price Oscillator (DPO) helps to identify price cycles without the influence of short- and long-term trends. The DPO compares a simple moving average to a historical pricenear the middle of a specified period. It also shows the peaks and drops over that particular period, making it easier to predict buy points."),icon:a.fT},{flutter_chart_id:"macd",name:o.translate("MACD"),short_name:o.translate("MACD"),description:o.translate("MACD is a trading indicator used in technical analysis of stock prices. It is supposed to reveal changes in the strength, direction, momentum, and duration of a trend in a stock's price."),icon:a.gE},{flutter_chart_id:"ROC",name:o.translate("Price Rate of Change"),short_name:o.translate("Price ROC"),description:o.translate("The Price Rate-of-Change (ROC) indicator displays the difference between the current price and the price x-time periods ago. The difference can be displayed in either points or as a percentage."),icon:a.nF},{flutter_chart_id:"RSI",name:o.translate("Relative Strength Index (RSI)"),short_name:o.translate("RSI"),description:o.translate("The Relative Strength Index (RSI) was published by J. Welles Wilder. The current price is normalized as a percentage between 0 and 100. The name of this oscillator is misleading because it does not compare the instrument relative to another instrument or set of instruments, but rather represents the current price relative to other recent prices within the selected lookback window length."),icon:a.nl},{flutter_chart_id:"StochasticOscillator",name:o.translate("Stochastic Oscillator"),short_name:o.translate("Stochastic"),description:o.translate("A technical momentum indicator that compares a security's closing price to its price range over a given time period. The oscillator's sensitivity to market movements can be reduced by adjusting the time period or by taking a moving average of the result."),icon:a.GA,isPrediction:!0},{flutter_chart_id:"SMI",name:o.translate("Stochastic Momentum Index"),short_name:o.translate("Stch Mtm"),description:o.translate("The Stochastic Momentum Index (SMI) helps to identify overbought or oversold conditions in the market and to predict bearish or bullish trends. It calculates the distance between the current closing price and the median of the high/low range, and displays 2 lines on the chart: the first (known as %K) represents the price movement while the second (known as %D) is a moving average of the first line. If the closing price is higher than the median of the high/low range, the SMI returns a positive value. If the closing price is lower than the average price, a negative value is returned. Values above 40 indicate a bullish trend while values below -40 indicate a bearish trend."),icon:a.Gi},{flutter_chart_id:"WilliamsR",name:o.translate("William's Percent Range"),short_name:o.translate("William's %R"),description:o.translate("Developed by Larry Williams, Williams %R is a momentum indicator that is the inverse of the Fast Stochastic Oscillator. Also referred to as %R, Williams %R reflects the level of the close relative to the highest high for the look-back period."),icon:a.tS,isPrediction:!0}]},{category:"trend",name:o.translate("Trend"),icon:a.KP,items:[{flutter_chart_id:"Aroon",name:o.translate("Aroon"),short_name:o.translate("Aroon"),description:o.translate("Developed by Tushar Chande in 1995, Aroon is an indicator system that determines whether a stock is trending or not and how strong the trend is. There are two separate indicators: Aroon-Up and Aroon-Down. A 25-day Aroon-Up measures the number of days since a 25-day high. A 25-day Aroon-Down measures the number of days since a 25-day low."),icon:a.Y8},{flutter_chart_id:"adx",name:o.translate("ADX/DMS"),short_name:o.translate("ADX"),description:o.translate("The Average Directional Movement Index index (ADX) was developed in 1978 by J. Welles Wilder as an indicator of trend strength in a series of prices of a financial instrument ADX will range between 0 and 100. Generally, ADX readings below 20 indicate trend weakness, and readings above 40 indicate trend strength."),icon:a.YF,isPrediction:!0},{flutter_chart_id:"commodity_channel_index",name:o.translate("Commodity Channel Index"),short_name:o.translate("CCI"),description:o.translate("The Commodity Channel Index (CCI) is a versatile indicator that can be used to identify a new trend or warn of extreme conditions."),icon:a.FZ,isPrediction:!0},{flutter_chart_id:"ichimoku",name:o.translate("Ichimoku Clouds"),short_name:o.translate("Ichimoku Clouds"),description:o.translate("The Ichimoku Cloud, also known as Ichimoku Kinko Hyo, is a versatile indicator that defines support and resistance, identifies trend direction, gauges momentum and provides trading signals. Ichimoku Kinko Hyo translates into “one look equilibrium chart”."),icon:a.kn,isPrediction:!0},{flutter_chart_id:"ParabolicSAR",name:o.translate("Parabolic SAR"),short_name:o.translate("PSAR"),description:o.translate("The parabolic SAR is calculated almost independently for each trend in the price. When the price is in an uptrend, the SAR emerges below the price and converges upwards towards it. Similarly, on a downtrend, the SAR emerges above the price and converges downwards. At each step within a trend, the SAR is calculated one period in advance."),icon:a.gt,isPrediction:!0},{flutter_chart_id:"zigzag",name:o.translate("Zig Zag"),short_name:o.translate("Zig Zag"),description:o.translate("Zig Zag helps to identify trend reversals and filters out relatively small price movements by determining the support and resistance levels of the market. It accepts a percentage of deviation as the input and displays a line if the price change is larger than the percentage of deviation. Zig Zag ignores any sideways movement and is useful to filter out “market noise”."),icon:a.Xu,isPrediction:!0}]},{category:"volatility",name:o.translate("Volatility"),icon:a.a_,items:[{flutter_chart_id:"bollinger_bands",name:o.translate("Bollinger Bands"),short_name:o.translate("Bollinger Bands"),description:o.translate("Bollinger Bands can be used to measure the highness or lowness of the price relative to previous trades."),icon:a.Ne},{flutter_chart_id:"donchian_channel",name:o.translate("Donchian Channel"),short_name:o.translate("Donchian Channel"),description:o.translate("The Donchian Channel is an indicator used in market trading developed by Richard Donchian. It is formed by taking the highest high and the lowest low of the last n periods. The area between the high and the low is the channel for the period chosen."),icon:a.jT,isPrediction:!0}]},{category:"moving-averages",name:o.translate("Moving averages"),icon:a.p3,items:[{flutter_chart_id:"moving_average",name:o.translate("Moving Average (MA)"),short_name:o.translate("MA"),description:o.translate("The Moving Average (MA) helps to identify the overall market trend by filtering out short-term price fluctuations. Using historical data, it calculates the average price over a specific period and plots a line on the chart. If the MA line moves upwards, it’s an indicator of an uptrend, a downtrend if it moves downwards. A buy signal occurs when the price moves above the MA line."),icon:a.Zp},{flutter_chart_id:"moving_envelope_average",name:o.translate("Moving Average Envelope"),short_name:o.translate("MA Env"),description:o.translate("The Moving Average Envelope (MAE) helps to identify strong price movement that indicates the start of a trend. The MAE creates a moving average line as well as 2 bands around it. In theory, when the market price touches the upper or lower bands, a trend reversal will occur, indicating a buy signal."),icon:a.Jb,isPrediction:!0},{flutter_chart_id:"rainbow",name:o.translate("Rainbow Moving Average"),short_name:o.translate("Rainbow MA"),description:o.translate("The Rainbow Moving Average (RMA) displays several moving average lines simultaneously. When the lines intersect, it’s an indicator of price reversal and the angle of the lines are helpful to predict the trend strength. The steeper the curve, the stronger the trend. When the price crosses the moving average lines from below, it signals an upward trend. When the price crosses the moving average lines from above, it signals a downward trend. The RMA is easier to use compared to using several different moving average indicators at once."),icon:a.Tz,isPrediction:!0}]},{category:"others",name:o.translate("Others"),icon:a.vn,items:[{flutter_chart_id:"alligator",name:o.translate("Alligator"),short_name:o.translate("Alligator"),description:o.translate("Bill Williams introduced the Alligator indicator in 1995. The Alligator is as much a metaphor as it is an indicator. It consists of three lines, overlaid on a pricing chart, that represent the jaw, the teeth and the lips of the beast, and was created to help the trader confirm the presence of a trend and its direction. The Alligator indicator can also help traders designate impulse and corrective wave formations, but the tool works best when combined with a momentum indicator."),icon:a.cZ,isPrediction:!0},{flutter_chart_id:"fcb",name:o.translate("Fractal Chaos Band"),short_name:o.translate("Fractal Chaos Band"),description:o.translate("Fractals are indicators on candlestick charts that identify reversal points in the market. Traders often use fractals to get an idea about the direction in which the price will develop. A fractal will form when a particular price pattern happens on a chart."),icon:a.aU,isPrediction:!0}]}],h={thickness:1,hasArea:!1},u=((0,s.o8)(h),()=>({config:{lineStyle:(0,s.o8)(h),pattern:"solid",color:"#000000",isOverlay:!0},parameters:[{path:"lineStyle",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"enableLabel",title:o.translate("Axis Label"),type:"switch",category:"parameters",defaultValue:!0}]})),d=()=>({config:{lineStyle:(0,s.o8)(h),pattern:"solid",color:"#000000",isOverlay:!0},parameters:[{path:"lineStyle",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"}]}),g=()=>({config:{lineStyle:(0,s.o8)(h),pattern:"solid",color:"#000000",isOverlay:!0},parameters:[{path:"lineStyle",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillStyle",title:o.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"}]}),m={vertical:u,line:d,ray:d,trend:g,channel:g,fibfan:g,rectangle:g,horizontal:u,continuous:d},p=t=>m[t](),f=()=>({open:o.translate("Open"),high:o.translate("High"),low:o.translate("Low"),close:o.translate("Close"),"Hl/2":o.translate("Hl/2"),"HlC/3":o.translate("Hlc/3"),"HlCC/4":o.translate("Hlcc/4"),"OHlC/4":o.translate("Ohlc/4")}),_=()=>({simple:o.translate("Simple"),exponential:o.translate("Exponential"),weighted:o.translate("Weighted"),hull:o.translate("Hull"),zeroLag:o.translate("Zero Lag"),timeSeries:o.translate("Time Series"),wellesWilder:o.translate("Welles Wilder"),variable:o.translate("Variable"),triangular:o.translate("Triangular"),doubleExponential:o.translate("2-Exponential"),tripleExponential:o.translate("3-Exponential")}),b={RSI:()=>({config:{lineStyle:(0,s.o8)(h),oscillatorLinesConfig:{overboughtStyle:(0,s.o8)(h),oversoldStyle:(0,s.o8)(h)},pinLabels:!1,pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()},{paths:{value:"oscillatorLinesConfig.overboughtValue",color:"oscillatorLinesConfig.overboughtStyle.color"},group_key:"over_bought",title:o.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:80,color:"#000000"}},{paths:{value:"oscillatorLinesConfig.oversoldValue",color:"oscillatorLinesConfig.oversoldStyle.color"},group_key:"over_sold",title:o.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:20,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:o.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),adx:()=>({config:{lineStyle:(0,s.o8)(h),positiveLineStyle:(0,s.o8)(h),negativeLineStyle:(0,s.o8)(h),pipSize:2,showLastIndicator:!0},parameters:[{path:"positiveLineStyle.color",title:o.translate("+DI"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"negativeLineStyle.color",title:o.translate("-DI"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"barStyle.bullishColor",title:o.translate("Positive Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:o.translate("Negative Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"smoothingPeriod",title:o.translate("Smoothing Period"),defaultValue:14,category:"inputs",type:"number"},{path:"showSeries",title:o.translate("Series"),type:"switch",category:"parameters",defaultValue:!0},{path:"showShading",title:o.translate("Shading"),type:"switch",category:"parameters",defaultValue:!1},{path:"showHistogram",title:o.translate("Histogram"),type:"switch",category:"parameters",defaultValue:!1}]}),AwesomeOscillator:()=>({config:{pipSize:2,showLastIndicator:!0},parameters:[{path:"barStyle.bullishColor",title:o.translate("Increasing Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:o.translate("Decreasing Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"}]}),dpo:()=>({config:{lineStyle:(0,s.o8)(h),isCentered:!0,pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()},{path:"movingAverageType",title:o.translate("Moving Average Type"),defaultValue:"simple",category:"inputs",type:"select",options:_()}]}),gator:()=>({config:{pipSize:2,showLastIndicator:!0},parameters:[{path:"barStyle.bullishColor",title:o.translate("Increasing Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:o.translate("Decreasing Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"jawPeriod",title:o.translate("Jaw Period"),defaultValue:13,category:"inputs",type:"number"},{path:"jawOffset",title:o.translate("Jaw Offset"),defaultValue:8,category:"inputs",type:"number"},{path:"teethPeriod",title:o.translate("Teeth Period"),defaultValue:8,category:"inputs",type:"number"},{path:"teethOffset",title:o.translate("Teeth Offset"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsPeriod",title:o.translate("Lips Period"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsOffset",title:o.translate("Lips Offset"),defaultValue:3,category:"inputs",type:"number"}]}),macd:()=>({config:{lineStyle:(0,s.o8)(h),signalLineStyle:(0,s.o8)(h),pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"signalLineStyle.color",title:o.translate("Signal"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"barStyle.bullishColor",title:o.translate("Increasing Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:o.translate("Decreasing Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"fastMAPeriod",title:o.translate("Fast MA Period"),defaultValue:12,category:"inputs",type:"number"},{path:"slowMAPeriod",title:o.translate("Slow MA Period"),defaultValue:26,category:"inputs",type:"number"},{path:"signalPeriod",title:o.translate("Signal Period"),defaultValue:9,category:"inputs",type:"number"}]}),ROC:()=>({config:{lineStyle:(0,s.o8)(h),pipSize:4,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()}]}),StochasticOscillator:()=>({config:{lineStyle:{...(0,s.o8)(h),color:"#FFFFFF"},fastLineStyle:(0,s.o8)(h),slowLineStyle:(0,s.o8)(h),oscillatorLinesConfig:{overboughtStyle:(0,s.o8)(h),oversoldStyle:(0,s.o8)(h)},pinLabels:!1,overBoughtPrice:80,overSoldPrice:20,pipSize:2,showLastIndicator:!0},parameters:[{path:"fastLineStyle.color",title:o.translate("Fast"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"slowLineStyle.color",title:o.translate("Slow"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()},{path:"isSmooth",title:o.translate("Smooth"),type:"switch",category:"parameters",defaultValue:!0},{paths:{value:"oscillatorLinesConfig.overboughtValue",color:"oscillatorLinesConfig.overboughtStyle.color"},group_key:"over_bought",title:o.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:80,color:"#000000"}},{paths:{value:"oscillatorLinesConfig.oversoldValue",color:"oscillatorLinesConfig.oversoldStyle.color"},group_key:"over_sold",title:o.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:20,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:o.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),SMI:()=>({config:{lineStyle:(0,s.o8)(h),signalLineStyle:(0,s.o8)(h),pipSize:2,showLastIndicator:!0,smiOscillatorLimits:{overboughtStyle:{...(0,s.o8)(h),color:"#626b73"},oversoldStyle:{...(0,s.o8)(h),color:"#626b73"}}},parameters:[{path:"lineStyle.color",group_key:"%k",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",group_key:"%k",title:o.translate("Period"),defaultValue:10,category:"inputs",type:"number"},{path:"smoothingPeriod",group_key:"%k",title:o.translate("Smoothing Period"),defaultValue:3,category:"inputs",type:"number"},{path:"doubleSmoothingPeriod",group_key:"%k",title:o.translate("Double Smoothing Period"),defaultValue:3,category:"inputs",type:"number"},{path:"signalLineStyle.color",group_key:"%d",title:o.translate("Color"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"signalPeriod",group_key:"%d",title:o.translate("Signal Period"),defaultValue:10,category:"inputs",type:"number"},{path:"maType",group_key:"%d",title:o.translate("Field"),defaultValue:"exponential",category:"inputs",type:"select",options:_()},{paths:{value:"smiOscillatorLimits.overboughtValue",color:"smiOscillatorLimits.overboughtStyle.color"},group_key:"over_bought",title:o.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:40,color:"#626b73"}},{paths:{value:"smiOscillatorLimits.oversoldValue",color:"smiOscillatorLimits.oversoldStyle.color"},group_key:"over_sold",title:o.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-40,color:"#626b73"}},{path:"showZones",group_key:"show_zones",title:o.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),WilliamsR:()=>({config:{lineStyle:(0,s.o8)(h),zeroHorizontalLinesStyle:{...(0,s.o8)(h),color:"0xFFF44336"},oscillatorLimits:{overboughtStyle:(0,s.o8)(h),oversoldStyle:(0,s.o8)(h)},pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{paths:{value:"oscillatorLimits.overboughtValue",color:"oscillatorLimits.overboughtStyle.color"},group_key:"over_bought",title:o.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-20,color:"#000000"}},{paths:{value:"oscillatorLimits.oversoldValue",color:"oscillatorLimits.oversoldStyle.color"},group_key:"over_sold",title:o.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-80,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:o.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),Aroon:()=>({config:{upLineStyle:(0,s.o8)(h),downLineStyle:(0,s.o8)(h),pipSize:2,showLastIndicator:!0},parameters:[{path:"upLineStyle.color",title:o.translate("Aroon Up"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"downLineStyle.color",title:o.translate("Aroon Down"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:14,category:"inputs",type:"number"}]}),commodity_channel_index:()=>({config:{lineStyle:(0,s.o8)(h),oscillatorLinesConfig:{overboughtStyle:(0,s.o8)(h),oversoldStyle:(0,s.o8)(h)},pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:20,category:"inputs",type:"number"},{paths:{value:"oscillatorLinesConfig.overboughtValue",color:"oscillatorLinesConfig.overboughtStyle.color"},group_key:"over_bought",title:o.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:100,color:"#000000"}},{paths:{value:"oscillatorLinesConfig.oversoldValue",color:"oscillatorLinesConfig.oversoldStyle.color"},group_key:"over_sold",title:o.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-100,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:o.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),ichimoku:()=>({config:{conversionLineStyle:(0,s.o8)(h),baseLineStyle:(0,s.o8)(h),spanALineStyle:(0,s.o8)(h),laggingLineStyle:(0,s.o8)(h),spanBLineStyle:(0,s.o8)(h),conversionLinePeriod:(0,s.o8)(h),showLastIndicator:!0},parameters:[{path:"conversionLineStyle.color",title:o.translate("Conversion Line"),defaultValue:"#0000FF",category:"inputs",type:"colorpicker"},{path:"baseLineStyle.color",title:o.translate("Base Line"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"spanALineStyle.color",title:o.translate("Leading Span A"),defaultValue:"#00FF00",category:"inputs",type:"colorpicker"},{path:"spanBLineStyle.color",title:o.translate("Leading Span B"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"laggingLineStyle.color",title:o.translate("Lagging Span"),defaultValue:"#808000",category:"inputs",type:"colorpicker"},{path:"conversionLinePeriod",title:o.translate("Conversion Line Period"),defaultValue:9,category:"inputs",type:"number"},{path:"baseLinePeriod",title:o.translate("Base Line Period"),defaultValue:26,category:"inputs",type:"number"},{path:"spanBPeriod",title:o.translate("Leading Span B Period"),defaultValue:52,category:"inputs",type:"number"},{path:"laggingSpanOffset",title:o.translate("Lagging Span Period"),defaultValue:-26,category:"inputs",type:"number",min:-100,max:0}]}),ParabolicSAR:()=>({config:{scatterStyle:{radius:1.5},showLastIndicator:!0},parameters:[{path:"scatterStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"minAccelerationFactor",title:o.translate("Minimum AF"),defaultValue:.02,category:"inputs",type:"number",step:.01},{path:"maxAccelerationFactor",title:o.translate("Maximum AF"),defaultValue:.2,category:"inputs",type:"number",step:.01}]}),zigzag:()=>({config:{lineStyle:(0,s.o8)(h),showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"distance",title:o.translate("Distance(%)"),defaultValue:10,category:"inputs",type:"number"}]}),bollinger_bands:()=>({config:{upperLineStyle:(0,s.o8)(h),middleLineStyle:(0,s.o8)(h),lowerLineStyle:(0,s.o8)(h),showLastIndicator:!0},parameters:[{path:"upperLineStyle.color",title:o.translate("Bollinger Bands Top"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"middleLineStyle.color",title:o.translate("Bollinger Bands Median"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowerLineStyle.color",title:o.translate("Bollinger Bands Bottom"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:o.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:20,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()},{path:"standardDeviation",title:o.translate("Standard Deviations"),defaultValue:2,category:"inputs",type:"number"},{path:"movingAverageType",title:o.translate("Moving Average Type"),defaultValue:"simple",category:"inputs",type:"select",options:_()},{path:"showChannelFill",title:o.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]}),donchian_channel:()=>({config:{upperLineStyle:(0,s.o8)(h),middleLineStyle:(0,s.o8)(h),lowerLineStyle:(0,s.o8)(h),showLastIndicator:!0},parameters:[{path:"upperLineStyle.color",title:o.translate("Donchian High"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"middleLineStyle.color",title:o.translate("Donchian Median"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowerLineStyle.color",title:o.translate("Donchian Low"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:o.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"highPeriod",title:o.translate("High Period"),defaultValue:20,category:"inputs",type:"number"},{path:"lowPeriod",title:o.translate("Low Period"),defaultValue:20,category:"inputs",type:"number"},{path:"showChannelFill",title:o.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]}),moving_average:()=>({config:{lineStyle:(0,s.o8)(h),isOverlay:!0,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:50,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()},{path:"movingAverageType",title:o.translate("Type"),defaultValue:"simple",category:"inputs",type:"select",options:_()},{path:"offset",title:o.translate("Offset"),defaultValue:0,category:"inputs",type:"number"}]}),moving_envelope_average:()=>({config:{upperLineStyle:(0,s.o8)(h),middleLineStyle:(0,s.o8)(h),lowerLineStyle:(0,s.o8)(h),showLastIndicator:!0},parameters:[{path:"upperLineStyle.color",title:o.translate("MA Env Top"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"middleLineStyle.color",title:o.translate("MA Env Median"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowerLineStyle.color",title:o.translate("MA Env Bottom"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:o.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:50,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()},{path:"shiftType",title:o.translate("Shift Type"),defaultValue:"percent",category:"inputs",type:"select",options:{percent:o.translate("Percent"),point:o.translate("Point")}},{path:"shift",title:o.translate("Shift"),defaultValue:5,category:"inputs",type:"number"},{path:"movingAverageType",title:o.translate("Type"),defaultValue:"simple",category:"inputs",type:"select",options:_()},{path:"showChannelFill",title:o.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]}),rainbow:()=>({config:{bandsCount:10,movingAverageType:"simple",rainbowLineStyles:[],showLastIndicator:!0},parameters:[{path:"period",title:o.translate("Period"),defaultValue:2,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()},{path:"rainbowLineStyles[0].color",title:o.translate("SMA1"),defaultValue:"#ff0000",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[1].color",title:o.translate("SMA2"),defaultValue:"#ff7f00",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[2].color",title:o.translate("SMA3"),defaultValue:"#ffff00",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[3].color",title:o.translate("SMA4"),defaultValue:"#7fff00",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[4].color",title:o.translate("SMA5"),defaultValue:"#00ff7f",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[5].color",title:o.translate("SMA6"),defaultValue:"#00ffff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[6].color",title:o.translate("SMA7"),defaultValue:"#007fff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[7].color",title:o.translate("SMA8"),defaultValue:"#0000ff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[8].color",title:o.translate("SMA9"),defaultValue:"#7f00ff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[9].color",title:o.translate("SMA10"),defaultValue:"#ff00ff",category:"inputs",type:"colorpicker"}]}),alligator:()=>({config:{jawLineStyle:(0,s.o8)(h),teethLineStyle:(0,s.o8)(h),lipsLineStyle:(0,s.o8)(h),showLastIndicator:!0},parameters:[{path:"jawLineStyle.color",title:o.translate("Jaw"),defaultValue:"#0000FF",category:"inputs",type:"colorpicker"},{path:"teethLineStyle.color",title:o.translate("Teeth"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"lipsLineStyle.color",title:o.translate("Lips"),defaultValue:"#00FF00",category:"inputs",type:"colorpicker"},{path:"showLines",title:o.translate("Show Lines"),type:"switch",category:"parameters",defaultValue:!0},{path:"jawPeriod",title:o.translate("Jaw Period"),defaultValue:13,category:"inputs",type:"number"},{path:"jawOffset",title:o.translate("Jaw Offset"),defaultValue:8,category:"inputs",type:"number"},{path:"teethPeriod",title:o.translate("Teeth Period"),defaultValue:8,category:"inputs",type:"number"},{path:"teethOffset",title:o.translate("Teeth Offset"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsPeriod",title:o.translate("Lips Period"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsOffset",title:o.translate("Lips Offset"),defaultValue:3,category:"inputs",type:"number"},{path:"showFractal",title:o.translate("Show Fractals"),type:"switch",category:"parameters",defaultValue:!1}]}),fcb:()=>({config:{highLineStyle:(0,s.o8)(h),lowLineStyle:(0,s.o8)(h),showLastIndicator:!0},parameters:[{path:"highLineStyle.color",title:o.translate("Fractal High"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowLineStyle.color",title:o.translate("Fractal Low"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:o.translate("Fractal Channel"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"showChannelFill",title:o.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]})},v=t=>b[t](),y=[{id:"line",text:o.translate("Area"),candleOnly:!1,icon:i.D3},{id:"candles",text:o.translate("Candle"),candleOnly:!0,icon:i.Fg},{id:"hollow",text:o.translate("Hollow"),candleOnly:!0,icon:i.H8},{id:"ohlc",text:o.translate("OHLC"),candleOnly:!0,icon:i.YM}],S=[{key:"tick",single:o.translate("tick"),items:[{interval:0,num:1}]},{key:"minute",single:o.translate("minute"),plural:o.translate("minutes"),items:[{interval:60,num:1},{interval:120,num:2},{interval:180,num:3},{interval:300,num:5},{interval:600,num:10},{interval:900,num:15},{interval:1800,num:30}]},{key:"hour",single:o.translate("hour"),plural:o.translate("hours"),items:[{interval:3600,num:1},{interval:7200,num:2},{interval:14400,num:4},{interval:28800,num:8}]},{key:"day",single:o.translate("day"),plural:o.translate("days"),items:[{interval:86400,num:1}]}],x=[{key:"en",name:"English",icon:(0,n.jsx)(i.zM.GBP,{})},{key:"bn",name:"বাংলা",icon:(0,n.jsx)(i.zM.Bangladesh,{})},{key:"de",name:"Deutsch",icon:(0,n.jsx)(i.zM.German,{})},{key:"ar",name:"العربية",icon:(0,n.jsx)(i.zM.Arabic,{})},{key:"fr",name:"French",icon:(0,n.jsx)(i.zM.French,{})},{key:"mn",name:"Монгол",icon:(0,n.jsx)(i.zM.Mongolian,{})},{key:"ru",name:"Русский",icon:(0,n.jsx)(i.zM.Russia,{})},{key:"si",name:"සිංහල",icon:(0,n.jsx)(i.zM.Srilanka,{})},{key:"sw",name:"Kiswahili",icon:(0,n.jsx)(i.zM.Kenya,{})},{key:"th",name:"Thai",icon:(0,n.jsx)(i.zM.Thailand,{})},{key:"id",name:"Indonesia",icon:(0,n.jsx)(i.zM.Indonesia,{})},{key:"vi",name:"Tiếng Việt",icon:(0,n.jsx)(i.zM.Vietnam,{})},{key:"it",name:"Italiano",icon:(0,n.jsx)(i.zM.Italy,{})},{key:"km",name:"ខ្មែរ",icon:(0,n.jsx)(i.zM.Cambodia,{})},{key:"ko",name:"한국어",icon:(0,n.jsx)(i.zM.Korean,{})},{key:"pt",name:"Português",icon:(0,n.jsx)(i.zM.Portugal,{})},{key:"tr",name:"Türkçe",icon:(0,n.jsx)(i.zM.Turkey,{})},{key:"uz",name:"O'zbek",icon:(0,n.jsx)(i.zM.Uzbekistan,{})},{key:"zh_cn",name:"简体中文",icon:(0,n.jsx)(i.zM.Chinese,{})},{key:"pl",name:"Polish",icon:(0,n.jsx)(i.zM.Poland,{})},{key:"zh_tw",name:"繁體中文",icon:(0,n.jsx)(i.zM.ChineseTraditional,{})},{key:"es",name:"espanyol",icon:(0,n.jsx)(i.zM.Spanish,{})}],w={CHART_MODE_MODAL_OPEN:"CHART_MODE_MODAL_OPEN",CHART_INTERVAL_CHANGE:"CHART_INTERVAL_CHANGE",CHART_TYPE_CHANGE:"CHART_TYPE_CHANGE",CHART_SWITCH_TOGGLE:"CHART_SWITCH_TOGGLE",MARKET_MENU_MODAL_TOGGLE:"MARKET_MENU_MODAL_TOGGLE",FAVORITE_MARKETS_TOGGLE:"FAVORITE_MARKETS_TOGGLE",INDICATOR_ADDED:"INDICATOR_ADDED",INDICATOR_DELETED:"INDICATOR_DELETED",INDICATOR_EDITED:"INDICATOR_EDITED",INDICATOR_INFO_TOGGLE:"INDICATOR_INFO_TOGGLE",INDICATOR_SEARCH:"INDICATOR_SEARCH",INDICATOR_SETTINGS_OPEN:"INDICATOR_SETTINGS_OPEN",INDICATORS_CLEAR_ALL:"INDICATORS_CLEAR_ALL",INDICATORS_MODAL_OPEN:"INDICATORS_MODAL_OPEN",INITIAL:"INITIAL",MARKET_SEARCH:"MARKET_SEARCH",MARKET_STATE_CHANGE:"MARKET_STATE_CHANGE",READY:"READY",SCROLL_TO_LEFT:"SCROLL_TO_LEFT",SYMBOL_CHANGE:"SYMBOL_CHANGE",DRAWING_TOOLS_OPEN:"DRAWING_TOOLS_OPEN",DRAWING_TOOLS_ADD:"DRAWING_TOOLS_ADD",DRAWING_TOOLS_DELETE:"DRAWING_TOOLS_DELETE",DRAWING_TOOLS_EDIT_PX:"DRAWING_TOOLS_EDIT_PX",DRAWING_TOOLS_EDIT_COLOR:"DRAWING_TOOLS_EDIT_COLOR",DRAWING_TOOLS_MODAL_OPEN:"DRAWING_TOOLS_MODAL_OPEN",CROSSHAIR_CLICK:"CROSSHAIR_CLICK"},C={predictionIndicator:o.translate("This indicator does not support 1-tick intervals. To use this indicator, change your chart time interval to 1 minute or more.")},T=t=>c().find(e=>e.items.some(e=>e.flutter_chart_id===t))?.category.replace("-"," ")??""},9160(t,e,r){"use strict";function i(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,{t:()=>s});const a={};const s=new class{constructor(t="en"){i(this,"lang",void 0),this.lang=t}setLanguage(t,e){a[t]||"en"===t?(this.lang=t,e?.()):r(8737)(`./${t}.json`).then(r=>{r?(a[t]=r.default,this.lang=t,e?.()):console.error("Unsupported language:",t)})}translate(...t){const e=a[this.lang],r=t[0].trim(),i=r.replace(/\\/g,"\\\\").replace(/"/g,'\\"');let s=r,n=!1;return e&&e[r]?s=e[r]:e&&e[i]&&(s=e[i],n=!0),t[1]&&Object.keys(t[1]).forEach(e=>{s=s.replace(`[${e}]`,t[1][e])}),n?s.replace(/\\\"/gi,'"'):s}}},1186(t,e,r){"use strict";r.d(e,{AD:()=>uo,BC:()=>el,BT:()=>rl,Br:()=>sl,CL:()=>lo,D3:()=>qo,F2:()=>_o,FT:()=>$o,FV:()=>ao,Fg:()=>Uo,Gu:()=>Mo,H8:()=>zo,HK:()=>No,Ik:()=>Co,Kx:()=>Vo,L0:()=>Fo,Lo:()=>So,Mz:()=>Qo,NR:()=>Ro,Np:()=>yo,PG:()=>mo,Qg:()=>Wo,RE:()=>ho,RP:()=>bo,Ri:()=>Ho,Sn:()=>Ao,U:()=>Bo,US:()=>go,W3:()=>oo,WI:()=>ko,YM:()=>Go,Z3:()=>Oo,Zt:()=>Yo,Zv:()=>so,_D:()=>Jo,ag:()=>ol,b1:()=>To,bC:()=>dl,bV:()=>il,d7:()=>vo,ee:()=>Do,fA:()=>Po,fK:()=>ll,fu:()=>cl,iQ:()=>Lo,kD:()=>Eo,kO:()=>Ko,kU:()=>fo,oX:()=>tl,qX:()=>Zo,rW:()=>po,s3:()=>Io,sM:()=>nl,sS:()=>wo,sY:()=>jo,sj:()=>no,x2:()=>co,x4:()=>xo,zM:()=>ul,zx:()=>al});r(809),r(7951);var i=r(7739),a=r.n(i),s=r(2979),n=r.n(s),o=r(6057),l=r.n(o),c=r(9955),h=r.n(c),u=r(242),d=r.n(u),g=r(267),m=r.n(g),p=r(4542),f=r.n(p),_=r(363),b=r.n(_),v=r(1811),y=r.n(v),S=r(5439),x=r.n(S),w=r(6240),C=r.n(w),T=r(1337),k=r.n(T),j=r(5829),N=r.n(j),E=r(4619),A=r.n(E),I=r(2910),D=r.n(I),O=r(7420),P=r.n(O),L=r(7885),M=r.n(L),R=r(9185),B=r.n(R),F=r(9289),V=r.n(F),H=r(204),$=r.n(H),q=r(3365),U=r.n(q),z=r(3031),G=r.n(z),W=r(9324),K=r.n(W),Q=r(9625),Y=r.n(Q),X=r(5833),Z=r.n(X),J=r(7463),tt=r.n(J),et=r(3211),rt=r.n(et),it=r(9707),at=r.n(it),st=r(4629),nt=r.n(st),ot=r(6331),lt=r.n(ot),ct=r(1891),ht=r.n(ct),ut=r(8983),dt=r.n(ut),gt=r(8093),mt=r.n(gt),pt=r(8927),ft=r.n(pt),_t=r(6667),bt=r.n(_t),vt=r(1278),yt=r.n(vt),St=r(1288),xt=r.n(St),wt=r(8310),Ct=r.n(wt),Tt=r(7528),kt=r.n(Tt),jt=r(2999),Nt=r.n(jt),Et=r(6456),At=r.n(Et),It=r(3522),Dt=r.n(It),Ot=r(6380),Pt=r.n(Ot),Lt=r(9317),Mt=r.n(Lt),Rt=r(6800),Bt=r.n(Rt),Ft=r(4333),Vt=r.n(Ft),Ht=r(9411),$t=r.n(Ht),qt=r(9307),Ut=r.n(qt),zt=r(4674),Gt=r.n(zt),Wt=r(6432),Kt=r.n(Wt),Qt=r(2327),Yt=r.n(Qt),Xt=r(6183),Zt=r.n(Xt),Jt=r(4497),te=r.n(Jt),ee=r(9212),re=r.n(ee),ie=r(4325),ae=r.n(ie),se=r(1320),ne=r.n(se),oe=r(8250),le=r.n(oe),ce=r(1041),he=r.n(ce),ue=r(3293),de=r.n(ue),ge=r(3775),me=r.n(ge),pe=r(1561),fe=r.n(pe),_e=r(1610),be=r.n(_e),ve=r(9429),ye=r.n(ve),Se=r(8584),xe=r.n(Se),we=r(7521),Ce=r.n(we),Te=r(4185),ke=r.n(Te),je=r(6776),Ne=r.n(je),Ee=r(9129),Ae=r.n(Ee),Ie=r(7249),De=r.n(Ie),Oe=r(9607),Pe=r.n(Oe),Le=r(9564),Me=r.n(Le),Re=r(4431),Be=r.n(Re),Fe=r(263),Ve=r.n(Fe),He=r(301),$e=r.n(He),qe=r(7414),Ue=r.n(qe),ze=r(3578),Ge=r.n(ze),We=r(3255),Ke=r.n(We),Qe=r(7625),Ye=r.n(Qe),Xe=r(3719),Ze=r.n(Xe),Je=r(1445),tr=r.n(Je),er=r(4056),rr=r.n(er),ir=r(1477),ar=r.n(ir),sr=r(3332),nr=r.n(sr),or=r(6902),lr=r.n(or),cr=r(9702),hr=r.n(cr),ur=r(1649),dr=r.n(ur),gr=r(1229),mr=r.n(gr),pr=r(2607),fr=r.n(pr),_r=r(7558),br=r.n(_r),vr=r(8901),yr=r.n(vr),Sr=r(5407),xr=r.n(Sr),wr=r(4236),Cr=r.n(wr),Tr=r(1795),kr=r.n(Tr),jr=r(7428),Nr=r.n(jr),Er=r(8217),Ar=r.n(Er),Ir=r(7038),Dr=r.n(Ir),Or=r(1069),Pr=r.n(Or),Lr=r(1089),Mr=r.n(Lr),Rr=r(6226),Br=r.n(Rr),Fr=r(5357),Vr=r.n(Fr),Hr=r(451),$r=r.n(Hr),qr=r(8457),Ur=r.n(qr),zr=r(2620),Gr=r.n(zr),Wr=r(3179),Kr=r.n(Wr),Qr=r(37),Yr=r.n(Qr),Xr=r(7256),Zr=r.n(Xr),Jr=r(5004),ti=r.n(Jr),ei=r(5729),ri=r.n(ei),ii=r(9876),ai=r.n(ii),si=r(3135),ni=r.n(si),oi=r(7451),li=r.n(oi),ci=r(9705),hi=r.n(ci),ui=r(3770),di=r.n(ui),gi=r(6681),mi=r.n(gi),pi=r(3785),fi=r.n(pi),_i=r(8341),bi=r.n(_i),vi=r(4298),yi=r.n(vi),Si=r(638),xi=r.n(Si),wi=r(194),Ci=r.n(wi),Ti=r(718),ki=r.n(Ti),ji=r(3864),Ni=r.n(ji),Ei=r(2502),Ai=r.n(Ei),Ii=r(6723),Di=r.n(Ii),Oi=r(1449),Pi=r.n(Oi),Li=r(9715),Mi=r.n(Li),Ri=r(5704),Bi=r.n(Ri),Fi=r(4046),Vi=r.n(Fi),Hi=r(10),$i=r.n(Hi),qi=r(1008),Ui=r.n(qi),zi=r(3292),Gi=r.n(zi),Wi=r(4579),Ki=r.n(Wi),Qi=r(7571),Yi=r.n(Qi),Xi=r(6033),Zi=r.n(Xi),Ji=r(2099),ta=r.n(Ji),ea=r(6489),ra=r.n(ea),ia=r(2821),aa=r.n(ia),sa=r(7213),na=r.n(sa),oa=r(1553),la=r.n(oa),ca=r(1085),ha=r.n(ca),ua=r(3751),da=r.n(ua),ga=r(148),ma=r.n(ga),pa=r(3562),fa=r.n(pa),_a=r(7358),ba=r.n(_a),va=r(3425),ya=r.n(va),Sa=r(2188),xa=r.n(Sa),wa=r(2839),Ca=r.n(wa),Ta=r(3010),ka=r.n(Ta),ja=r(5269),Na=r.n(ja),Ea=r(3265),Aa=r.n(Ea),Ia=r(2853),Da=r.n(Ia),Oa=r(3257),Pa=r.n(Oa),La=r(2167),Ma=r.n(La),Ra=r(4005),Ba=r.n(Ra),Fa=r(6617),Va=r.n(Fa),Ha=r(2048),$a=r.n(Ha),qa=r(8438),Ua=r.n(qa),za=r(7950),Ga=r.n(za),Wa=r(2788),Ka=r.n(Wa),Qa=r(7183),Ya=r.n(Qa),Xa=r(3344),Za=r.n(Xa),Ja=r(3297),ts=r.n(Ja),es=r(2913),rs=r.n(es),is=r(4748),as=r.n(is),ss=r(2588),ns=r.n(ss),os=r(2049),ls=r.n(os),cs=r(4065),hs=r.n(cs),us=r(9671),ds=r.n(us),gs=r(1071),ms=r.n(gs),ps=r(5187),fs=r.n(ps),_s=r(7823),bs=r.n(_s),vs=r(2405),ys=r.n(vs),Ss=r(8832),xs=r.n(Ss),ws=r(5317),Cs=r.n(ws),Ts=r(6669),ks=r.n(Ts),js=r(7764),Ns=r.n(js),Es=r(542),As=r.n(Es),Is=r(3119),Ds=r.n(Is),Os=r(6552),Ps=r.n(Os),Ls=r(5092),Ms=r.n(Ls),Rs=r(794),Bs=r.n(Rs),Fs=r(2092),Vs=r.n(Fs),Hs=r(3669),$s=r.n(Hs),qs=r(3747),Us=r.n(qs),zs=r(6244),Gs=r.n(zs),Ws=r(1345),Ks=r.n(Ws),Qs=r(1593),Ys=r.n(Qs),Xs=r(2532),Zs=r.n(Xs),Js=r(5038),tn=r.n(Js),en=r(1655),rn=r.n(en),an=r(9891),sn=r.n(an),nn=r(8451),on=r.n(nn),ln=r(6378),cn=r.n(ln),hn=r(963),un=r.n(hn),dn=r(3893),gn=r.n(dn),mn=r(9423),pn=r.n(mn),fn=r(416),_n=r.n(fn),bn=r(3273),vn=r.n(bn),yn=r(8414),Sn=r.n(yn),xn=r(1949),wn=r.n(xn),Cn=r(1722),Tn=r.n(Cn),kn=r(135),jn=r.n(kn),Nn=r(3544),En=r.n(Nn),An=r(6577),In=r.n(An),Dn=r(5126),On=r.n(Dn),Pn=r(3235),Ln=r.n(Pn),Mn=r(5692),Rn=r.n(Mn),Bn=r(3576),Fn=r.n(Bn),Vn=r(6706),Hn=r.n(Vn),$n=r(7365),qn=r.n($n),Un=r(4311),zn=r.n(Un),Gn=r(3385),Wn=r.n(Gn),Kn=r(7425),Qn=r.n(Kn),Yn=r(1134),Xn=r.n(Yn),Zn=r(2308),Jn=r.n(Zn),to=r(5477),eo=r.n(to),ro=r(7671);const io=t=>e=>{let{className:i,"tooltip-title":a,...s}=e;i=`ic-icon ${i||""}`;const n=t.viewBox?.split(" ").slice(2)||[];return(0,ro.jsxs)("span",{className:i,"tooltip-title":a,...s,children:[(0,ro.jsx)("svg",{width:n[0],height:n[1],children:(0,ro.jsx)("use",{xlinkHref:r.p+t.url})}),a&&(0,ro.jsxs)(ro.Fragment,{children:[(0,ro.jsx)("br",{}),(0,ro.jsx)("span",{className:"ic-subtitle",children:a})]})]})},ao=(io(Zt()),io(un())),so=io(gn()),no=io(te()),oo=io(re()),lo=io(yt()),co=io(de()),ho=(io(a()),io(n()),io(l()),io(h()),io(d()),io(m()),io(f()),io(y()),io(b()),io(x()),io(C()),io(k()),io(N()),io(D()),io(V())),uo=io(B()),go=io($()),mo=io(U()),po=io(G()),fo=io(K()),_o=(io(Y()),io(Z()),io(tt())),bo=io(rt()),vo=io(at()),yo=(io(nt()),io(lt()),io(le())),So=(io(ht()),io(dt())),xo=(io(A()),io(P())),wo=io(M()),Co=(io(mt()),io(he())),To=(io(ft()),io(bt())),ko=io(Vt()),jo=(io($t()),io($t())),No=io(Ut()),Eo=io(mt()),Ao=io(ae()),Io=io(ne()),Do=(io(ye()),io(Zs())),Oo=(io(Gt()),io(Kt()),io(Yt())),Po=io(xe()),Lo=io(Ce()),Mo=io(ke()),Ro=io(Ne()),Bo=io(tn()),Fo=io(rn()),Vo=io(sn()),Ho=io(on()),$o=io(cn()),qo=io(Ae()),Uo=io(De()),zo=io(Pe()),Go=io(Me()),Wo=io(Be()),Ko=io(Ve()),Qo=io($e()),Yo=io(Ue()),Xo=io(bi()),Zo=io(Ks()),Jo=io(Ys()),tl=io(Ge()),el=io(Ke()),rl=(io(Fn()),io(Hn()),io(qn()),io(zn())),il=io(Wn()),al=(io(Qn()),io(Xn()),io(Jn()),io(eo())),sl=(io(ye()),io(be()),io(me()),io(fe()),io(Ye())),nl={active:io(yt()),commodities:io(Ct()),cryptocurrency:io(xt()),favorite:io(mt()),forex:io(kt()),basket_index:io(Nt()),indices:io(Dt()),stocks:io(Pt()),volidx:io(Bt()),synthetic_index:io(Mt()),indicators:io(le())},ol={light:{normal:io(pn()),active:io(_n())},dark:{normal:io(vn()),active:io(Sn())}},ll={light:{normal:io(wn()),active:io(Tn())},dark:{normal:io(jn()),active:io(En())}},cl={light:{normal:io(In()),active:io(On())},dark:{normal:io(Ln()),active:io(Rn())}},hl={AUD:io(Ze()),CAD:io(tr()),CHF:io(rr()),EUR:io(ar()),GBP:io(nr()),JPY:io(lr()),MXN:io(hr()),NOK:io(dr()),NZD:io(mr()),PLN:io(fr()),SEK:io(br()),USD:io(yr()),XAU:io(xr()),HongKong:io(ai()),Dutch:io(li()),German:io(ri()),French:io(ni()),Spanish:io(hi()),WallStreet:io(di())},ul={USD:io(yr()),GBP:io(nr()),German:io(ri()),French:io(ni()),Russia:io(Cr()),Arabic:io(kr()),Bangladesh:io(Nr()),Cambodia:io(Ar()),Srilanka:io(Dr()),Mongolian:io(Pr()),Kenya:io(Mr()),Thailand:io(Br()),Turkey:io(Vr()),Indonesia:io($r()),Vietnam:io(Ur()),Italy:io(Gr()),Korean:io(Kr()),Portugal:io(Yr()),Chinese:io(Zr()),ChineseTraditional:io(ti()),Poland:io(fr()),Spanish:io(hi()),Uzbekistan:io(mi())},dl={SPC:hl.USD,AS51:hl.AUD,HSI:hl.HongKong,N225:hl.JPY,AEX:hl.Dutch,FCHI:hl.French,SSMI:hl.CHF,GDAXI:hl.German,frxBROUSD:io(fi()),frxXAUUSD:Xo,frxXPDUSD:Xo,frxXPTUSD:Xo,frxXAGUSD:Xo,R_10:io(yi()),R_25:io(xi()),R_50:io(Ci()),R_75:io(ki()),R_100:io(Ni()),"1HZ10V":io(Ai()),"1HZ25V":io(Di()),"1HZ50V":io(Pi()),"1HZ75V":io(Mi()),"1HZ100V":io(Bi()),"1HZ150V":io(Vi()),"1HZ200V":io($i()),"1HZ250V":io(Ui()),"1HZ300V":io(Gi()),BOOM300N:io(aa()),BOOM500:io(na()),BOOM600:io(la()),BOOM900:io(ha()),BOOM1000:io(da()),CRASH300N:io(Ki()),CRASH500:io(Yi()),CRASH600:io(Zi()),CRASH900:io(ta()),CRASH1000:io(ra()),RDBEAR:io(ma()),RDBULL:io(fa()),stpRNG:io(ba()),stpRNG2:io(ya()),stpRNG3:io(xa()),stpRNG4:io(Ca()),stpRNG5:io(ka()),JD10:io(Na()),JD25:io(Aa()),JD50:io(Da()),JD75:io(Pa()),JD100:io(Ma()),JD150:io(Ba()),JD200:io(Va()),cryBNBUSD:io($a()),cryBTCLTC:io(Ua()),cryIOTUSD:io(Ga()),cryNEOUSD:io(Ka()),cryOMGUSD:io(Ya()),cryTRXUSD:io(Za()),cryBTCETH:io(ns()),cryZECUSD:io(as()),cryXMRUSD:io(rs()),cryXLMUSD:io(ts()),cryDSHUSD:io(ls()),cryETHUSD:io(hs()),cryBCHUSD:io(ds()),cryLTCUSD:io(ms()),cryEOSUSD:io(fs()),cryXRPUSD:io(bs()),cryBTCUSD:io(ys()),OTC_AEX:io(Ds()),OTC_FTSE:io(Ns()),OTC_SX5E:io($s()),OTC_FCHI:io(Vs()),OTC_GDAXI:io(Bs()),OTC_N225:io(Ps()),OTC_SPC:io(xs()),OTC_DJI:io(ks()),OTC_NDX:io(Cs()),OTC_SSMI:io(As()),OTC_HSI:io(Ms()),OTC_AS51:io(Us())},gl=(t,e,r)=>i=>{const{className:a,...s}=i;return(0,ro.jsxs)("span",{className:`${r} ${a}`,...s,children:[(0,ro.jsx)(t,{}),(0,ro.jsx)(e,{})]})};function ml(t,e){const r=hl[t],i=hl[e];dl[`frx${t}${e}`]=gl(r,i,"ic-frx")}io(Gs());const pl=io(At());function fl(t){const e=hl[t];dl[`WLD${t}`]=gl(pl,e,"ic-wld")}fl("AUD"),fl("EUR"),fl("GBP"),fl("USD"),fl("XAU"),ml("AUD","JPY"),ml("AUD","USD"),ml("EUR","AUD"),ml("EUR","CHF"),ml("EUR","JPY"),ml("EUR","CAD"),ml("EUR","GBP"),ml("EUR","USD"),ml("GBP","AUD"),ml("GBP","JPY"),ml("GBP","USD"),ml("USD","CAD"),ml("USD","CHF"),ml("USD","JPY"),ml("AUD","CAD"),ml("AUD","CHF"),ml("AUD","NZD"),ml("AUD","PLN"),ml("EUR","NZD"),ml("GBP","CAD"),ml("GBP","CHF"),ml("GBP","NOK"),ml("GBP","NZD"),ml("GBP","PLN"),ml("NZD","JPY"),ml("NZD","USD"),ml("USD","MXN"),ml("USD","NOK"),ml("USD","PLN"),ml("USD","SEK")},9585(t,e,r){"use strict";r.d(e,{FZ:()=>wt,GA:()=>bt,Gi:()=>vt,Jb:()=>At,KP:()=>lt,Ne:()=>jt,Tz:()=>Ot,Xu:()=>kt,Y8:()=>St,YF:()=>xt,Zp:()=>Et,aU:()=>Dt,a_:()=>ht,cZ:()=>It,fT:()=>mt,gE:()=>pt,gt:()=>Tt,hy:()=>ot,jT:()=>Nt,kn:()=>Ct,nF:()=>ft,nl:()=>_t,o2:()=>gt,p3:()=>ut,qy:()=>ct,tS:()=>yt,vn:()=>dt});r(809),r(7951);var i=r(6583),a=r.n(i),s=r(7037),n=r.n(s),o=r(4575),l=r.n(o),c=r(3800),h=r.n(c),u=r(1908),d=r.n(u),g=r(9149),m=r.n(g),p=r(1077),f=r.n(p),_=r(155),b=r.n(_),v=r(9424),y=r.n(v),S=r(9442),x=r.n(S),w=r(9080),C=r.n(w),T=r(3417),k=r.n(T),j=r(7709),N=r.n(j),E=r(6661),A=r.n(E),I=r(1904),D=r.n(I),O=r(1108),P=r.n(O),L=r(1270),M=r.n(L),R=r(2421),B=r.n(R),F=r(5976),V=r.n(F),H=r(3982),$=r.n(H),q=r(1820),U=r.n(q),z=r(6537),G=r.n(z),W=r(5459),K=r.n(W),Q=r(5),Y=r.n(Q),X=r(3821),Z=r.n(X),J=r(8246),tt=r.n(J),et=r(3163),rt=r.n(et),it=r(9877),at=r.n(it),st=r(7671);const nt=t=>e=>{let{className:i,"tooltip-title":a,...s}=e;i=`ic-icon ${i||""}`;const n=t.viewBox?.split(" ").slice(2)||[];return(0,st.jsxs)("span",{className:i,"tooltip-title":a,...s,children:[(0,st.jsx)("svg",{width:n[0],height:n[1],children:(0,st.jsx)("use",{xlinkHref:r.p+t.url})}),a&&(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)("br",{}),(0,st.jsx)("span",{className:"ic-subtitle",children:a})]})]})},ot=nt(a()),lt=nt(n()),ct=nt(l()),ht=nt(h()),ut=nt(d()),dt=nt(m()),gt=nt(f()),mt=nt(b()),pt=(nt(y()),nt(x())),ft=nt(C()),_t=nt(k()),bt=nt(N()),vt=nt(A()),yt=nt(D()),St=nt(P()),xt=nt(M()),wt=nt(B()),Ct=nt(V()),Tt=nt($()),kt=nt(U()),jt=nt(G()),Nt=nt(K()),Et=nt(Y()),At=nt(Z()),It=nt(tt()),Dt=nt(rt()),Ot=nt(at())},1695(t,e,r){"use strict";r.d(e,{A:()=>c,F:()=>l});r(809);var i=r(7073),a=r.n(i),s=r(9751),n=r(8362),o=r(7671);const l=({children:t,className:e,enabled:r=!0,...i})=>(0,o.jsxs)("div",{className:a()("sc-inline-loader",e,{"sc-inline-loader--enable":r}),...i,children:[t,r&&(0,o.jsxs)("div",{className:"sc-inline-loader__inner",children:[(0,o.jsx)("span",{className:"sc-inline-loader__inner__bullet"}),(0,o.jsx)("span",{className:"sc-inline-loader__inner__bullet"}),(0,o.jsx)("span",{className:"sc-inline-loader__inner__bullet"}),(0,o.jsx)("span",{className:"sc-inline-loader__inner__bullet"})]})]}),c=(0,s.observer)(()=>{const{loader:t}=(0,n.gy)(),{isActive:e,currentState:r}=t;return(0,o.jsxs)("div",{className:a()("sc-loader",{show:e}),children:[(0,o.jsx)("div",{className:"sc-loader-spin"}),(0,o.jsx)("div",{className:"sc-loader-status",children:r})]})})},481(t,e,r){"use strict";r.d(e,{A:()=>S});var i=r(809),a=r.n(i),s=r(4511),n=r.n(s),o=r(9751),l=r(255),c=r(7073),h=r.n(c),u=r(8362),d=(r(1238),r(7671));const g=(0,o.observer)(({className:t,menu_element:e,portalNodeId:r,open:i,onClick:a})=>{const{chartSetting:s}=(0,u.gy)(),{theme:o}=s;if(document.body.style.overflow=i?"hidden":"",!r)return e;const l=document.getElementById(r);return l?n().createPortal((0,d.jsx)("div",{className:"smartcharts-portal "+(i?"smartcharts-portal--open":""),children:(0,d.jsx)("div",{className:`smartcharts smartcharts-${o}`,children:(0,d.jsx)("div",{className:"smartcharts-mobile",children:(0,d.jsx)("div",{className:`cq-modal-dropdown ${t||""} ${i?"stxMenuActive":""}`,children:(0,d.jsx)("div",{className:"cq-modal__overlay",onClick:a,children:e})})})})}),l):null});var m=r(7149),p=r(1186);r(4007);const f=(0,i.forwardRef)(({store:t,children:e,className:r="",title:a,customHead:s,enableTabular:n=!1,handleOverlayClick:o,handleCloseDialog:l},c)=>{const{updateCloseCallback:u,onContainerClick:g,updateOutsideClickCallback:m}=t;return(0,i.useEffect)(()=>{u(l),m(o)}),(0,d.jsxs)("div",{ref:c,className:h()("sc-dialog",r,{"sc-dialog--tabular":n}),onClick:g,children:[a&&(0,d.jsxs)("div",{className:"sc-dialog__head",children:[(0,d.jsx)("div",{className:"sc-dialog__head--title",children:a}),s&&(0,d.jsx)("div",{className:"sc-dialog__head--custom",children:s}),(0,d.jsx)("div",{className:"sc-dialog__head--action",children:(0,d.jsx)(p.US,{onClick:l})})]}),(0,d.jsx)("div",{className:"sc-dialog__body",children:e})]})});f.displayName="Dialog";const _=(0,o.observer)(f),b=({store:t,className:e,children:r,title:i,tooltip:s,portalNodeId:o,enabled:l=!0,onMouseEnter:c,onMouseLeave:f,enableTabular:b,customHead:y,emptyMenu:S,handleOverlayClick:x,modalMode:w})=>{const{open:C,dialogStatus:T,onTitleClick:k,handleCloseDialog:j,dialogStore:N}=t,{chartSetting:E,chart:A}=(0,u.gy)(),{theme:I}=E,{shouldRenderDialogs:D,isMobile:O,context:P}=A,L=t=>{"cq-modal__overlay"===t.target.className&&j()};if(!P)return null;const M=a().Children.map(r,(t,e)=>0===e?t:null),R=a().Children.map(r,(t,e)=>0!==e?t:null);if(w){const t=document.getElementById(o||"smartcharts_modal");if(!t)return null;const r=n().createPortal((0,d.jsx)("div",{className:`smartcharts-${I}`,children:(0,d.jsx)("div",{className:h()({"smartcharts-mobile":O,"smartcharts-desktop":!O}),children:(0,d.jsx)("div",{className:h()("cq-modal-dropdown",e,{stxMenuActive:C}),children:(0,d.jsx)("div",{className:"cq-modal__overlay",onClick:L,children:(0,d.jsx)(v,{dialogStatus:T,dialogStore:N,title:i,handleCloseDialog:j,enableTabular:b,customHead:y,handleOverlayClick:x,children:R})})})})}),t);return S?C?r:null:(0,d.jsxs)(m.A,{className:h()("ciq-menu",e||"",{stxMenuActive:l&&C,"ciq-enabled":l,"ciq-disabled":!l}),content:s,enabled:!!s,position:"right",children:[(0,d.jsx)("div",{className:"cq-menu-btn",onMouseEnter:c,onMouseLeave:f,onClick:l?k:()=>null,children:M}),l&&C&&r]})}const B=D?(0,d.jsxs)(_,{className:h()("cq-menu-dropdown",{"cq-menu-dropdown-enter-done":T}),store:N,children:[i&&(0,d.jsxs)("div",{className:"title",children:[(0,d.jsx)("div",{className:"title-text",children:i}),(0,d.jsx)(p.US,{className:"icon-close-menu",onClick:k})]}),R]}):null;return l&&(0,d.jsxs)("div",{className:h()("ciq-menu ciq-enabled",e,{stxMenuActive:C}),children:[(0,d.jsx)("div",{className:"cq-menu-btn",onMouseEnter:c,onMouseLeave:f,onClick:k,children:M}),O&&o&&(0,d.jsx)(g,{className:e,open:C,menu_element:B,portalNodeId:o,onClick:L})||B]})||(0,d.jsx)("div",{className:h()("ciq-menu ciq-disabled",e),children:(0,d.jsx)("div",{className:"cq-menu-btn",onMouseEnter:c,onMouseLeave:f,children:M})})},v=({dialogStatus:t,dialogStore:e,title:r,handleCloseDialog:i,enableTabular:s,customHead:n,handleOverlayClick:o,children:c})=>{const h=a().useRef(null);return(0,d.jsx)(l.CSSTransition,{appear:!0,in:t,timeout:300,classNames:"sc-dialog",unmountOnExit:!0,nodeRef:h,children:(0,d.jsx)(_,{ref:h,store:e,title:r,handleCloseDialog:i,enableTabular:s,customHead:n,handleOverlayClick:o,children:c})})},y=({children:t})=>(0,d.jsx)(d.Fragment,{children:t});b.Title=y,b.Body=y;const S=(0,o.observer)(b)},6213(t,e,r){"use strict";r.r(e),r.d(e,{default:()=>d});var i=r(7073),a=r.n(i),s=r(9751),n=r(8362),o=r(1186),l=r(1695),c=(r(79),r(481)),h=r(7671),u=r(9160).t;const d=(0,s.observer)(({portalNodeId:t})=>{const{share:e}=(0,n.gy)(),{menuStore:r,downloadCSV:i,downloadPNG:s,isLoadingPNG:d}=e,{open:g}=r.dialogStore;return(0,h.jsxs)(c.A,{store:r,className:"sc-download-menu",title:u.translate("Download"),tooltip:u.translate("Download"),modalMode:!0,isFullscreen:!0,portalNodeId:t,children:[(0,h.jsx)(c.A.Title,{children:(0,h.jsx)("div",{className:a()("sc-download__menu",{"sc-download__menu--active":g}),children:(0,h.jsx)(o.s3,{})})}),(0,h.jsx)(c.A.Body,{children:(0,h.jsxs)("div",{className:"sc-download",children:[(0,h.jsx)("p",{className:"sc-download__description",children:u.translate("Download your current chart view as a PNG or export the historical data for analysis as a CSV.")}),(0,h.jsxs)(l.F,{className:"sc-download__item",onClick:s,enabled:d,children:[(0,h.jsx)(o.x4,{}),(0,h.jsxs)("span",{className:"sc-download__item__label",children:[" ",u.translate("PNG")," "]})]}),(0,h.jsxs)("div",{className:"sc-download__item",onClick:i,children:[(0,h.jsx)(o.sS,{}),(0,h.jsxs)("span",{className:"sc-download__item__label",children:[" ",u.translate("CSV")]})]})]})})]})})},7149(t,e,r){"use strict";r.d(e,{A:()=>n});r(809);var i=r(7073),a=r.n(i),s=r(7671);const n=({children:t,className:e="",enabled:r=!1,content:i,position:n="top",...o})=>(0,s.jsxs)("div",{className:a()("sc-tooltip",e,{[`sc-tooltip--${n}`]:!!n,"sc-tooltip--enable":r}),...o,children:[t,(0,s.jsx)("div",{className:"sc-tooltip__inner",children:i})]})},7394(t,e,r){"use strict";function i(t){const e=document.createElement("div");return e.innerHTML=t,e.firstChild}function a(){let t=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1);return"__"+t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()+"__"}function s(t){const e=t.replace("#","0xff");return parseInt(e,16)}function n(t){return t&&"string"==typeof t?t.charAt(0).toUpperCase()+t.slice(1):""}function o(t){return`#${("000000"+(16777215&t).toString(16).toUpperCase()).slice(-6)}`}r.d(e,{Fh:()=>o,LP:()=>a,ZH:()=>n,n:()=>i,od:()=>s})},9758(){var t;HTMLCanvasElement.prototype.getContext=(t=HTMLCanvasElement.prototype.getContext,function(e,r){return(r=r||{}).preserveDrawingBuffer=!0,t.call(this,e,r)})},4916(t,e,r){"use strict";r.d(e,{A:()=>c});var i=r(12),a=r.n(i),s=r(8046),n=r(1993);function o(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class l{static get EVENT_FAVORITES_UPDATE(){return"EVENT_FAVORITES_UPDATE"}static getInstance(){return l.instance||(l.instance=new l),l.instance}constructor(){o(this,"favoritesMap",function(){const t=(0,n.s0)("cq-favorites");if(!t)return;const e={};for(const r in t){const i={};for(const e of t[r])i[e]=!0;e[r]=i}return e}()||{indicators:{},"chartTitle&Comparison":{}}),o(this,"_emitter",void 0),(0,s.makeObservable)(this,{favoritesMap:s.observable,isFavorite:s.action.bound,toggleFavorite:s.action.bound}),this._emitter=new(a())({emitDelay:0})}onFavoriteUpdate(t){this._emitter.on(l.EVENT_FAVORITES_UPDATE,t)}offFavoriteUpdate(t){this._emitter.off(l.EVENT_FAVORITES_UPDATE,t)}isFavorite(t,e){return e in this.favoritesMap[t]}toggleFavorite(t,e){const r=this.favoritesMap[t];r[e]?delete r[e]:r[e]=!0,this._emitter.emit(l.EVENT_FAVORITES_UPDATE,{category:t,id:e,value:r[e]||!1}),this.saveFavorites()}saveFavorites(){const t={};for(const e in this.favoritesMap){const r=[];for(const t in this.favoritesMap[e])r.push(t);t[e]=r}(0,n.lk)("cq-favorites",t)}}o(l,"instance",void 0);const c=l},8362(t,e,r){"use strict";r.d(e,{SD:()=>Ie,cA:()=>Ae,gy:()=>De});var i=r(809),a=r.n(i),s=r(8046);function n(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class o{get context(){return this.mainStore.chart.context}get state(){return this.mainStore.state}constructor(t){n(this,"mainStore",void 0),n(this,"bottom",30),n(this,"isReadyToShow",!1),n(this,"mainChartHeight",0),n(this,"totalHeight",0),n(this,"initial",()=>{this.isReadyToShow=!0}),n(this,"updateChartHeight",async()=>{setTimeout(()=>{if(!this.mainStore.chart.chartContainerHeight)return;const t=this.mainStore.chartAdapter,{bottomQuote:e}=t.quoteBounds,r=t.getYFromQuote(e),i=this.mainStore.chart.chartContainerHeight-r;this.bottom=this.mainStore.chartAdapter.isFeedLoaded&&i>80?i:30},300)}),(0,s.makeObservable)(this,{bottom:s.observable,isReadyToShow:s.observable,mainChartHeight:s.observable,totalHeight:s.observable,updateChartHeight:s.action.bound}),this.mainStore=t,(0,s.when)(()=>!!this.context,this.initial)}}var l=r(1045),c=r(1993),h=r(3457),u=r(6039),d=r(1109);function g(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}let m;class p{constructor(t){g(this,"mainStore",void 0),g(this,"open",!1),g(this,"onClose",()=>this.setOpen(!1)),g(this,"outsideClickCallback",()=>this.setOpen(!1)),g(this,"setOpen",(0,d.s)(t=>{this.openDialog(t)},10,{leading:!0,trailing:!1})),g(this,"handleClickOutside",t=>{let e=!1;"which"in t?e=3===t.which:"button"in t&&(e=2===t.button),t.isHandledByDialog||e||this.outsideClickCallback()}),g(this,"closeOnEscape",t=>{27===t.keyCode&&this.onClose()}),(0,s.makeObservable)(this,{open:s.observable,openDialog:s.action.bound,register:s.action.bound,unregister:s.action.bound,onContainerClick:s.action.bound,updateCloseCallback:s.action.bound,updateOutsideClickCallback:s.action.bound,outsideClickCallback:s.observable}),this.mainStore=t,(0,s.when)(()=>!!this.context,()=>{this.routingStore.registerDialog(this)})}get context(){return this.mainStore.chart.context}get routingStore(){return this.mainStore.routing}openDialog(t){this.open!==t&&(this.open=t,this.open?setTimeout(this.register,100):this.unregister(),!0===t?(m&&m.openDialog(!1),m=this):m=void 0)}updateOutsideClickCallback(t){void 0!==t&&(this.outsideClickCallback=t)}register(){document.addEventListener("click",this.handleClickOutside,!1),document.addEventListener("keydown",this.closeOnEscape,!1)}unregister(){document.removeEventListener("click",this.handleClickOutside),document.removeEventListener("keydown",this.closeOnEscape)}onContainerClick(t){t.nativeEvent.isHandledByDialog=!0}updateCloseCallback(t){void 0!==t&&(this.onClose=t)}}function f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class _{constructor(t,e){f(this,"dialogStore",void 0),f(this,"mainStore",void 0),f(this,"dialogStatus",!1),f(this,"route",""),(0,s.makeObservable)(this,{dialogStatus:s.observable,route:s.observable,open:s.computed,setOpen:s.action.bound,onTitleClick:s.action.bound,handleDialogStatus:s.action.bound,handleCloseDialog:s.action.bound}),this.mainStore=t,this.dialogStore=new p(t),(0,s.reaction)(()=>this.open,()=>this.blurInput()),e&&e.route&&(this.route=e.route)}get context(){return this.mainStore.chart.context}get routingStore(){return this.mainStore.routing}get open(){return this.dialogStore.open}setOpen(t){this.dialogStore.setOpen(t),this.routingStore.updateRoute(this.route,t)}blurInput(){setTimeout(this.handleDialogStatus,300)}onTitleClick(t){t&&t.stopPropagation(),this.setOpen(!this.open)}handleDialogStatus(){"indicators"===this.route&&this.open&&this.mainStore.state.stateChange(l.c4.INDICATORS_MODAL_OPEN,{is_open:this.open}),"draw-tool"===this.route&&this.open&&this.mainStore.state.stateChange(l.c4.DRAWING_TOOLS_MODAL_OPEN,{is_open:this.open}),"chart-title"===this.route&&this.open&&this.mainStore.state.stateChange(l.c4.MARKET_MENU_MODAL_TOGGLE,{is_open:this.open}),"chart-mode"===this.route&&this.open&&this.mainStore.state.stateChange(l.c4.CHART_MODE_MODAL_OPEN,{is_open:this.open}),this.dialogStatus=this.open}handleCloseDialog(){this.dialogStatus=!1,setTimeout(()=>this.setOpen(!1),300)}}function b(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class v{constructor({mainStore:t}){b(this,"dialogPortalNodeId",void 0),b(this,"mainStore",void 0),b(this,"menuStore",void 0),b(this,"scrollPanel",void 0),b(this,"cancelCallback",void 0),(0,s.makeObservable)(this,{dialogPortalNodeId:s.observable,open:s.computed,cancelCallback:s.observable,setOpen:s.action.bound,setCancel:s.action.bound,handleCancel:s.action.bound,handleContinue:s.action.bound}),this.mainStore=t,this.menuStore=new _(t,{route:"indicator-setting"})}get open(){return this.menuStore.open}setOpen(t){return t&&this.scrollPanel&&(this.scrollPanel.scrollTop=0),this.menuStore.setOpen(t)}handleCancel(){this.cancelCallback&&this.cancelCallback(),this.setOpen(!1),this.cancelCallback=null}setCancel(t){this.cancelCallback=t}handleContinue(){this.mainStore.timeperiod.setGranularity(0),this.mainStore.studies.deletePredictionStudies(),this.mainStore.studies.cleanupPredictionIndicator(),setTimeout(()=>{this.setOpen(!1)},100)}}function y(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const S={tick:"T",minute:"M",hour:"H",day:"D"},x={minute:60,hour:3600,day:86400};class w{constructor(t){y(this,"_serverTime",void 0),y(this,"mainStore",void 0),y(this,"portalNodeIdChanged",void 0),y(this,"predictionIndicator",void 0),y(this,"onGranularityChange",()=>null),y(this,"remain",null),y(this,"onDataInitialized",()=>{this.updateCountdown(),(0,s.reaction)(()=>[this.timeUnit,this.mainStore.chartSetting.countdown,this.mainStore.chartType.type,this.loader.currentState,this.isSymbolOpen],this.updateCountdown.bind(this)),(0,s.reaction)(()=>this.mainStore.state.granularity,t=>this.onGranularityChange(t))}),y(this,"countdownInterval",void 0),y(this,"remainLabelY",()=>{const t=this.mainStore.chart.currentClose;if(!t)return;return this.mainStore.chartAdapter.getYFromQuote(t)}),(0,s.makeObservable)(this,{changeGranularity:s.action.bound,portalNodeIdChanged:s.observable,setGranularity:s.action.bound,updateProps:s.action.bound,updatePortalNode:s.action.bound}),this.mainStore=t,this.predictionIndicator=new v({mainStore:t}),this._serverTime=u.A.getInstance(),(0,s.when)(()=>this.mainStore.chartAdapter.isFeedLoaded,this.onDataInitialized)}get loader(){return this.mainStore.loader}get isTick(){return"tick"===this.timeUnit}get isSymbolOpen(){return this.mainStore.chartTitle.isSymbolOpen}get timeUnit(){return(0,c.Ul)(this.mainStore.chart.granularity)}get display(){return void 0===this.mainStore.chart.granularity?"":`${0===this.mainStore.chart.granularity?1:this.mainStore.chart.granularity/x[this.timeUnit]} ${S[this.timeUnit]}`}clearCountdown(){this.countdownInterval&&clearInterval(this.countdownInterval),this.countdownInterval=void 0}updateCountdown(){this.remain=null,this.clearCountdown();const t=()=>{if(this.isTick||!this.isSymbolOpen)return void this.clearCountdown();const t=this.mainStore.chart?.feed?.quotes;if(t&&t.length){const e=[...t].filter(t=>t&&t.Close);if(e&&e.length){const t=e[e.length-1];if(t.DT){const e=this._serverTime?.getLocalDate()?.getTime(),r=e-t.DT.getTime(),i=1e3*(this.mainStore.chart.granularity||1),a=r>i?Math.floor(r/i)+1:1;this.remain=(0,c.pl)(a*i-r),this.mainStore.chartAdapter.flutterChart?.config.setRemainingTime(this.remain||"")}}}};this.mainStore.chartSetting.countdown&&!this.isTick&&(this.countdownInterval||(this.countdownInterval=setInterval(t,1e3),t()))}setGranularity(t){(0,h.$s)(h.dq.ChartControl,h.Cw.Interval,t?.toString()),this.onGranularityChange?this.onGranularityChange(t):this.mainStore.chart.changeSymbol(void 0,t)}updateProps(t){void 0!==this.mainStore.state.granularity&&(this.onGranularityChange=t)}changeGranularity(t){if(t){const e=l.wx.find(t=>t.id===this.mainStore.chartType.type.id)?.text??"";this.mainStore.state.stateChange(l.c4.CHART_INTERVAL_CHANGE,{time_interval_name:(0,c.mI)(t,l.NI),chart_type_name:"colored_bar"===this.mainStore.chartType.type.id?e:e.toLowerCase()})}0===t&&this.mainStore.studies.hasPredictionIndicator?(this.predictionIndicator.dialogPortalNodeId=this.portalNodeIdChanged,this.predictionIndicator.setOpen(!0)):this.onGranularityChange(t)}updatePortalNode(t){this.portalNodeIdChanged=t}}var C=r(7423),T=r.n(C),k=r(7231),j=r.n(k);T().extend(j());const N=T();function E(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class A{static get DEFAULT_COUNT(){return 1e3}constructor(t,e,r){E(this,"unsubscribeQuotes",void 0),E(this,"_getQuotes",void 0),E(this,"_subscribeQuotes",void 0),E(this,"streamRequests",{}),this.unsubscribeQuotes=t,this._getQuotes=e,this._subscribeQuotes=r}async getQuotes(t){if(this._getQuotes){const e=await this._getQuotes({symbol:t.symbol,granularity:t.granularity,count:"string"==typeof t.count?parseInt(t.count,10):t.count||A.DEFAULT_COUNT,start:"string"==typeof t.start?parseInt(t.start,10):t.start,end:"string"==typeof t.end?parseInt(t.end,10):t.end});if(t.granularity)return{candles:e.candles};if(e.history&&e.history.times&&e.history.prices){return{history:{times:e.history.times,prices:e.history.prices}}}throw new Error("Invalid tick history response format")}throw new Error("No getQuotes function provided")}subscribeQuotes(t,e){const r=this._getKey(t),i=A.createGetQuotesRequest({...t,subscribe:1});this.streamRequests[r]={request:i,callback:e},this._subscribeQuotes({symbol:t.symbol,granularity:t.granularity},e)}forget(t){const e=this._getKey(t);if(!this.streamRequests[e])return;const{request:r,callback:i}=this.streamRequests[e];return delete this.streamRequests[e],this.unsubscribeQuotes(r,i)}static createGetQuotesRequest({symbol:t,granularity:e,start:r,end:i,subscribe:a,adjust_start_time:s=1,count:n}){const o={symbol:t,style:e?"candles":"ticks",start:r,end:i,count:n||A.DEFAULT_COUNT};return e&&(o.granularity=+e),s&&(o.adjust_start_time=s),a&&(o.subscribe=1),r&&(delete o.count,o.start=r),i&&(o.end=i),o}_getKey({symbol:t,granularity:e}){return`${t}-${e}`}}var I=r(12),D=r.n(I),O=r(5877);function P(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class L{static get EVENT_MARKET_OPEN_CLOSE_CHANGE(){return"EVENT_MARKET_OPEN_CLOSE_CHANGE"}static get FEED_UNAVAILABLE(){return"chartonly"}constructor(t,e){P(this,"_api",void 0),P(this,"_emitter",void 0),P(this,"_params",void 0),P(this,"_serverTime",void 0),P(this,"_shouldFetchTradingTimes",void 0),P(this,"_tradingTimesMap",void 0),P(this,"_updateTimer",void 0),P(this,"lastUpdateDate",void 0),P(this,"isInitialized",!1),P(this,"tradingTimesPromise",(0,O.A)()),P(this,"timeUpdateCallback",void 0),this._params=e||{},this._shouldFetchTradingTimes=!1!==e?.shouldFetchTradingTimes,this._api=t,this._serverTime=u.A.getInstance(),this._emitter=new(D())({emitDelay:0})}destructor(){this._updateTimer&&clearTimeout(this._updateTimer)}async initialize(){if(await this._serverTime.init(this._api,()=>{"function"==typeof this.timeUpdateCallback&&this.timeUpdateCallback()}),this.isInitialized)return this.tradingTimesPromise;if(this.isInitialized=!0,this.lastUpdateDate=this._serverTime.getLocalDate().toISOString().substring(0,10),!this._tradingTimesMap&&this._shouldFetchTradingTimes){await this._updateTradeTimes(),this.tradingTimesPromise.resolve();const t=async()=>{const e=this._updateMarketOpenClosed();Object.keys(e).length>0&&this._emitter.emit(L.EVENT_MARKET_OPEN_CLOSE_CHANGE,e);let r=this._nextUpdateDate();if(!r){const t=this._serverTime.getLocalDate(),e=new Date(`${this.lastUpdateDate}T00:00:00Z`);e.setDate(e.getDate()+1),this.lastUpdateDate=(t>e?t:e).toISOString().substring(0,10);const i={};for(const t in this._tradingTimesMap)i[t]=!!this._tradingTimesMap[t].isOpened;await this._updateTradeTimes();for(const t in this._tradingTimesMap)this._tradingTimesMap[t].isOpened=i[t];r=e}const i=r-this._serverTime.getLocalDate();this._updateTimer=setTimeout(t,i)};await t()}}_updateMarketOpenClosed(){const t={};for(const e in this._tradingTimesMap){const r=this._calcIsMarketOpened(e);this._tradingTimesMap[e].isOpened!==r&&(this._tradingTimesMap[e].isOpened=r,t[e]=r)}return t}async _updateTradeTimes(){this._params.tradingTimes&&this._calculatingTradingTime(this._params.tradingTimes)}_calculatingTradingTime(t){if(!t)return;if(this._tradingTimesMap={},t){for(const e in t){const{isOpen:r,openTime:i,closeTime:a}=t[e];this._tradingTimesMap[e]={feed_license:void 0,isClosedToday:!r,holidays:[],closes_early:[],opens_late:[],delay_amount:0,times:i&&a?[{open:new Date(i),close:new Date(a)}]:void 0,isOpenAllDay:!1,isClosedAllDay:!1,isOpened:r}}return}const e=this._updateMarketOpenClosed();Object.keys(e).length>0&&this._emitter.emit(L.EVENT_MARKET_OPEN_CLOSE_CHANGE,e)}isFeedUnavailable(t){if(this._tradingTimesMap)return t in this._tradingTimesMap?this._tradingTimesMap[t]?.feed_license===L.FEED_UNAVAILABLE:(console.error("Symbol not in _tradingTimesMap:",t," trading map:",this._tradingTimesMap),!1)}getDelayedMinutes(t){return this._tradingTimesMap?.[t].delay_amount}isMarketOpened(t){if(this._tradingTimesMap)return t in this._tradingTimesMap?this._tradingTimesMap[t].isOpened:(console.error("Symbol not in _tradingTimesMap:",t," trading map:",this._tradingTimesMap),!1)}_calcIsMarketOpened(t){const e=this._serverTime.getLocalDate(),r=e.toISOString().substring(0,10);if(!this._tradingTimesMap)return;const{times:i,feed_license:a,isOpenAllDay:s,isClosedAllDay:n,holidays:o,closes_early:l,opens_late:c,isClosedToday:h}=this._tradingTimesMap[t];if(n||a===L.FEED_UNAVAILABLE||h||o.includes(r))return!1;const u=c.find(t=>t.date===r);if(u){const{open:t,close:r}=u;return!!(e>=t&&e<r)}const d=l.find(t=>t.date===r);if(d){const{open:t,close:r}=d;return!!(e>=t&&e<r)}if(s)return!0;if(i)for(const t of i){const{open:r,close:i}=t;if(e>=r&&e<i)return!0}return!1}_nextUpdateDate(){const t=this._serverTime.getLocalDate();let e;for(const r in this._tradingTimesMap){const{times:i,feed_license:a,isOpenAllDay:s,isClosedAllDay:n}=this._tradingTimesMap[r];if(!s&&!n&&a!==L.FEED_UNAVAILABLE&&i)for(const r of i){const{open:i,close:a}=r;i>t&&(!e||i<e)&&(e=i),a>t&&(!e||a<e)&&(e=a)}}return e}onMarketOpenCloseChanged(t){this._emitter.on(L.EVENT_MARKET_OPEN_CLOSE_CHANGE,t)}onTimeChanged(t){this.timeUpdateCallback=t}}const M=L;const R=t=>{const e=[],r=(i=(t,e)=>t.submarket_display_name.localeCompare(e.submarket_display_name),t.map((t,e)=>({item:t,index:e})).sort((t,e)=>{const r=i(t.item,e.item);return 0!==r?r:t.index-e.index}).map(({item:t})=>t));var i;for(const t of r)e.push({symbol:t.symbol,name:t.display_name,market:t.market,market_display_name:t.market_display_name,subgroup:t.subgroup,subgroup_display_name:t.subgroup_display_name,submarket_display_name:t.submarket_display_name,exchange_is_open:!!t.exchange_is_open,decimal_places:t.pip.toString().length-2});return e},B=t=>({enabled:!0,itemId:t.symbol,display:t.name,dataObject:t}),F=t=>({subcategoryName:t.submarket_display_name,data:[]}),V=(t,e)=>{let r=t.find(t=>t.categoryId===e.market);return r||(r=(t=>({categoryName:t.market_display_name,categoryId:t.market,hasSubcategory:!0,hasSubgroup:!(!t.subgroup||"none"===t.subgroup),data:[],subgroups:[]}))(e),t.push(r)),r},H=(t,e,r)=>{let i=r.get(e.submarket_display_name);return i||(i=F(e),r.set(e.submarket_display_name,i),t.data.push(i)),i},$=(t,e)=>{if(!t.hasSubgroup)return;const r=((t,e)=>{let r=t.subgroups?.find(t=>t.categoryId===e.subgroup);return r||(r=(t=>({data:[],categoryName:t.subgroup_display_name,categoryId:t.subgroup,hasSubcategory:!0,hasSubgroup:!1,subgroups:[]}))(e),t.subgroups?.push(r)),r})(t,e),i=((t,e)=>{let r=t.data.find(t=>t.subcategoryName===e.submarket_display_name);return r||(r=F(e),t.data.push(r)),r})(r,e);i.data.push(B(e))},q=t=>{if(!t.length)return[];const e=[],r=new Map;for(const i of t){const t=V(e,i);r.has(i.market)||r.set(i.market,new Map);const a=r.get(i.market),s=H(t,i,a);$(t,i),s.data.push(B(i))}return e};function U(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const z=class{constructor(t,e){U(this,"params",void 0),U(this,"topNode",void 0),this.params=e||{},this.topNode=t}};var G=r(8825);class W{static formatHistory(t){const{history:e,candles:r}=t;if(e){const{times:t=[],prices:r=[]}=e;return r.map((e,r)=>({Date:(0,c.Pu)(+t[r]),Close:+e}))}if(r){return r.map(t=>{const e=t;return{Date:(0,c.Pu)(+e.epoch),Open:+e.open,High:+e.high,Low:+e.low,Close:+e.close}})}}static formatQuote(t){if("tick"in t){const{tick:e}=t,r=e;return{Date:(0,c.Pu)(+r.epoch),Close:+r.quote,tick:e}}if("ohlc"in t){const{ohlc:e}=t;if(e)return{Date:(0,c.Pu)(+e.open_time),Open:+e.open,High:+e.high,Low:+e.low,Close:+e.close,ohlc:e}}}static formatAllQuotes(t){const e=e=>{const r=t?.[e+1],i=t?.[e-1];return i?.tick&&r?.tick?(0,c.Cc)(i?.tick,r?.tick,.5):r?.tick||i?.tick};return t?.map((t,r)=>({Date:(0,c.Pu)(+t.epoch),Close:+(t.tick||e(r))}))}static formatPOCQuote(t){const{tick_stream:e=[],underlying:r=""}=t||{};return e.length&&r?e.map(({epoch:t=0,tick:e,tick_display_value:i})=>({Date:(0,c.Pu)(t),Close:e||0,tick:{epoch:t,quote:e||0,symbol:r,pip_size:i?.split(".")[1]?.length||0}})):null}}function K(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Q{static get EVENT_CHART_DATA(){return"EVENT_CHART_DATA"}get contractInfo(){return this._mainStore.state.contractInfo}get shouldGetQuotes(){return this._mainStore.state.shouldGetQuotes||!1}constructor(t,e,r){K(this,"_binaryApi",void 0),K(this,"_emitter",void 0),K(this,"_request",void 0),K(this,"lastStreamEpoch",void 0),K(this,"_mainStore",void 0),this._binaryApi=e,this._request=t,this._emitter=new(D())({emitDelay:0}),this._mainStore=r}async initialFetch(){return await this._startSubscribe(this._request)}pause(){}async resume(){if(this.lastStreamEpoch){const t={...this._request,start:this.lastStreamEpoch};return await this._startSubscribe(t)}}forget(){this.lastStreamEpoch=void 0,this._emitter.off(Q.EVENT_CHART_DATA)}_startSubscribe(t){throw new Error("Please override!")}_processGetQuotesResponse(t){const e=W.formatHistory(t);if(!e){throw new Error(`Unexpected response: ${t}`)}return this.lastStreamEpoch=Q.getLatestEpoch(t),e}onChartData(t){this._emitter.on(Q.EVENT_CHART_DATA,t)}static getLatestEpoch({candles:t,history:e}){if(t)return t[t.length-1].epoch;if(e){const{times:t=[]}=e;return t[t.length-1]}}static getEpochFromTick(t){return"tick"in t&&t.tick?t.tick.epoch:t.ohlc?.open_time}}const Y=Q;function X(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Z=class extends Y{constructor(t,e,r,i){super(t,e,i),X(this,"_timerId",void 0),X(this,"UPDATE_INTERVAL",3e3),X(this,"onUpdateDelayedFeed",async()=>{if(this.lastStreamEpoch){const t={...this._request,start:this.lastStreamEpoch,adjust_start_time:0},e=await this._binaryApi.getQuotes(t),r=this._processGetQuotesResponse(e);this._emitter?.emit(Y.EVENT_CHART_DATA,r)}else console.error("Unable to update delayed feed without epoch from last tick"),this._endTimer()}),this._request={...this._request,start:this._request.start-60*r}}pause(){this._endTimer()}async _startSubscribe(t){const e=await this._binaryApi.getQuotes(t),r=this._processGetQuotesResponse(e);return this._startTimer(),{quotes:r,response:e}}forget(){this._endTimer(),super.forget()}_startTimer(){this._timerId||(this._timerId=setInterval(this.onUpdateDelayedFeed,this.UPDATE_INTERVAL))}_endTimer(){this._timerId&&(clearInterval(this._timerId),this._timerId=void 0)}};function J(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const tt=class extends Y{constructor(...t){super(...t),J(this,"_tickCallback",void 0)}pause(){this._tickCallback=void 0}async resume(){if(this._tickCallback)throw new Error("You cannot resume an active stream!");return super.resume()}async _startSubscribe(t){const e=this.contractInfo,r=await this._binaryApi.getQuotes(t),i=this._processGetQuotesResponse(r),a=t=>{(t.tick||t.ohlc)&&this._onTick(t)};if(!this.shouldGetQuotes&&e.tick_stream)this._binaryApi.subscribeQuotes(Object.assign(t,{count:e.tick_count}),a);else{const r=e.current_spot_time&&e.date_start?e.current_spot_time-e.date_start:0,i=1e3;this._binaryApi.subscribeQuotes(Object.assign(t,{count:r>i?r:i}),a)}return this._tickCallback=a,{quotes:i,response:r}}forget(){if(this._tickCallback){const{symbol:t,granularity:e}=this._request;this._binaryApi.forget({symbol:t,granularity:e}),this._tickCallback=void 0}super.forget()}_onTick(t){const e=t,r=Y.getEpochFromTick(e);void 0!==r&&(this.lastStreamEpoch=+r);const i=[W.formatQuote(e)];this._emitter.emit(Y.EVENT_CHART_DATA,i)}};function et(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class rt{static get EVENT_MASTER_DATA_UPDATE(){return"EVENT_MASTER_DATA_UPDATE"}static get EVENT_MASTER_DATA_REINITIALIZE(){return"EVENT_MASTER_DATA_REASSIGN"}static get EVENT_START_PAGINATION(){return"EVENT_START_PAGINATION"}static get EVENT_ON_PAGINATION(){return"EVENT_ON_PAGINATION"}get startEpoch(){return this._mainStore.state.startEpoch}get endEpoch(){return this._mainStore.state.endEpoch}get granularity(){return this._mainStore.chart.granularity}get allTicks(){return this._mainStore.state.allTicks}get shouldGetQuotes(){return this._mainStore.state.shouldGetQuotes||!1}get contractInfo(){return this._mainStore.state.contractInfo}get loader(){return this._mainStore.loader}get margin(){return this._mainStore.state.margin}get hasAlternativeSource(){return this._mainStore.state.shouldDrawTicksFromContractInfo}get paginationLoader(){return this._mainStore.paginationLoader}constructor(t,e,r){et(this,"_binaryApi",void 0),et(this,"_connectionClosedDate",void 0),et(this,"_emitter",void 0),et(this,"_mainStore",void 0),et(this,"_serverTime",void 0),et(this,"tickQueue",[]),et(this,"_tradingTimes",void 0),et(this,"quotes",[]),et(this,"_activeStreams",{}),et(this,"_isConnectionOpened",!0),et(this,"onRangeChanged",()=>{this._mainStore.state.setChartIsReady(!1),this._mainStore.state.saveLayout(),this._mainStore.state.setChartIsReady(!0)}),this._binaryApi=t,this._mainStore=e,this._serverTime=u.A.getInstance(),this._tradingTimes=r,(0,s.reaction)(()=>e.state.isConnectionOpened,this.onConnectionChanged.bind(this)),this._emitter=new(D())({emitDelay:0})}subscribe(){}unsubscribe({symbol:t,granularity:e}){const r=this._getKey({symbol:t,granularity:e});this._forgetStream(r)}_forgetStream(t){this._activeStreams[t]&&(this._activeStreams[t].forget(),delete this._activeStreams[t])}processQuotes(t){t.forEach(t=>{t.DT=new Date(`${t.Date}Z`)})}updateQuotes(t,e){this.processQuotes(t),e?this.quotes.unshift(...t):this.quotes=t}addQuote(t){this.processQuotes([t]),this.quotes.push(t)}getQuoteForEpoch(t){return this.quotes.find(e=>e.DT?.getTime()==t)}getQuoteIndexForEpoch(t){return this.quotes.findIndex(e=>e.DT?.getTime()==t)}getClosestValidEpoch(t,e){return Math.round(t/e)*e}getClosestQuoteForEpoch(t){const e=this.findEpochIndex(t);if(e<0)return this.quotes[0];if(e>this.quotes.length-1)return this.quotes[this.quotes.length-1];const r=this.quotes[Math.floor(e)],i=this.quotes[Math.ceil(e)];return t-r.DT.getTime()<=i.DT.getTime()-t?r:i}getClosestQuoteIndexForEpoch(t){const e=this.findEpochIndex(t);if(e<0)return this.quotes[0];if(e>this.quotes.length-1)return this.quotes[this.quotes.length-1];const r=this.quotes[Math.floor(e)],i=this.quotes[Math.ceil(e)];return t-r.DT.getTime()<=i.DT.getTime()-t?Math.floor(e):Math.ceil(e)}findEpochIndex(t){let e=-1,r=this.quotes.length;for(;r-e>1;){const i=Math.trunc((e+r)/2),a=this.quotes[i].DT?.getTime();if(!a)return i;if(t<a)r=i;else{if(!(t>a))return i;e=i}}return e>=0&&t==this.quotes[e].DT?.getTime()?e:r<this.quotes.length&&t==this.quotes[r].DT?.getTime()?r:(e+r)/2}getQuotesInterval(){if(this.quotes.length<=1)return 1;const t=this.quotes.reduce((t,e,r,i)=>{const a=e.DT?.getTime(),s=i[r-1]?.DT?.getTime();if(s&&a){return t+(a-s)/1e3}return t},0);return Math.round(t/(this.quotes.length-1))}async fetchInitialData(t,e,r){this.tickQueue=[],this.setHasReachedEndOfData(!1),this.paginationLoader.updateOnPagination(!0);const{granularity:i=0,symbolObject:a}=e,s=this._getKey({symbol:t,granularity:i}),n=this.margin&&this.startEpoch?this.startEpoch-this.margin:this.startEpoch,o=this.margin&&this.endEpoch?this.endEpoch+this.margin:this.endEpoch,l=a.name;if(this.loader.setState("chart-data"),this._tradingTimes.isFeedUnavailable(t)){this._mainStore.notifier.notifyFeedUnavailable(l);const t={quotes:[]};return this._mainStore.chart.setChartAvailability(!1),void r(t)}if(this.quotes&&this.quotes.length>0&&!this.shouldGetQuotes){const t=this._trimQuotes(this.quotes);return r({quotes:t}),this._emitDataUpdate(t,!0),void this.paginationLoader.updateOnPagination(!1)}const h={symbol:t,granularity:i,start:n,count:this.endEpoch?void 0:this._mainStore.lastDigitStats.count},u=this.contractInfo.validation_error_code;let d,g=!1;if(o)h.end=String(o),g=!0;else if("MarketIsClosed"!==u&&"MarketIsClosedTryVolatility"!==u){let e;const a=this._tradingTimes.getDelayedMinutes(t);a>0?(this._mainStore.notifier.notifyDelayedMarket(l,a),e=new Z(h,this._binaryApi,a,this._mainStore)):e=new tt(h,this._binaryApi,this._mainStore);try{const{quotes:t,response:r}=await e.initialFetch();d=t,this.endEpoch||this._mainStore.lastDigitStats.updateLastDigitStats(r)}catch(t){const{message:e}=t;return this._mainStore.notifier.notify({text:e,type:"error",category:"activesymbol"}),r({quotes:[]}),void this.paginationLoader.updateOnPagination(!1)}if(e.onChartData(e=>{t!==this._mainStore.chart.currentActiveSymbol?.symbol||i!==this._mainStore.chart.granularity||this.hasAlternativeSource||this._appendChartData(e,s)}),this._mainStore.chart.isDestroyed||this._mainStore.state.symbol&&this._mainStore.state.symbol!==t||i!==this._mainStore.chart.granularity)return r({quotes:[]}),void e.forget();this._activeStreams[s]=e}else this._mainStore.notifier.notifyMarketClose(l),g=!0;if(g)if(this._mainStore.state.getQuotes){const e=await this._mainStore.state.getQuotes({symbol:t,granularity:i,count:this.endEpoch?1e3:this._mainStore.lastDigitStats.count,start:n,end:o});if(e.candles)d=e.candles.map(t=>({Date:(0,c.Pu)(t.epoch),Open:t.open,High:t.high,Low:t.low,Close:t.close}));else if(e.history){const{times:t=[],prices:r=[]}=e.history;d=r.map((e,r)=>({Date:(0,c.Pu)(t[r]),Close:e}))}else d=[]}else if(this.shouldGetQuotes||!this.contractInfo.tick_stream){const t=await this._binaryApi.getQuotes(h);d=W.formatHistory(t)}else{const t=await new Promise(t=>{setTimeout(()=>t(this.allTicks),50)});d=W.formatAllQuotes(t)}d?(d=this._trimQuotes(d),r({quotes:d}),this._emitDataUpdate(d,!0),this.paginationLoader.updateOnPagination(!1)):r({quotes:[]})}async fetchPaginationData(t,e,r,i,a){this.paginationLoader.updateOnPagination(!0),this._emitter.emit(rt.EVENT_START_PAGINATION,{end:e}),await this._getPaginationData(t,i,r,e,a),this.paginationLoader.updateOnPagination(!1)}async _getPaginationData(t,e,r,i,a){if(this._mainStore.state.hasReachedEndOfData)return;if(this.startEpoch||this.endEpoch&&i>this.endEpoch)return a({moreAvailable:!1,quotes:[]}),this._emitter.emit(rt.EVENT_ON_PAGINATION,{end:i}),void this.setHasReachedEndOfData(!0);const s=this._serverTime.getEpoch()-Math.ceil(2.8*365*24*60*60);let n,o={quotes:[]};if(i>s)try{const l=await this._binaryApi.getQuotes({symbol:t,granularity:e,count:`${r}`,end:String(i)});if(n=rt.getFirstEpoch(l),void 0===n||n===i)return a({moreAvailable:!1,quotes:[]}),void this.setHasReachedEndOfData(!0);if(o.quotes=W.formatHistory(l),n<=s&&(a({moreAvailable:!1,quotes:[]}),this.setHasReachedEndOfData(!0)),o.quotes?.length&&o.quotes.length<r)return a({moreAvailable:!1,quotes:o.quotes}),void this.setHasReachedEndOfData(!0)}catch(t){console.error(t),o={error:t}}a(o);{const t=n&&i>n?n:i;this._emitter.emit(rt.EVENT_ON_PAGINATION,{end:t})}}setHasReachedEndOfData(t){this.paginationLoader.updateOnPagination(!1),this._mainStore.state.hasReachedEndOfData!==t&&(this._mainStore.state.hasReachedEndOfData=t)}unsubscribeAll(){for(const t of Object.keys(this._activeStreams))this._forgetStream(t)}_forgetIfEndEpoch(t){const e=this._activeStreams[t];let r=!0;if(!e)return;const i=e.lastStreamEpoch;return this.endEpoch&&void 0!==i&&void 0!==this.granularity&&i+this.granularity>this.endEpoch?(this._activeStreams[t]&&0===this.granularity&&!this._mainStore.state.isStaticChart&&(0,G.E)((0,c.Pu)(this.endEpoch)).valueOf()>=this.quotes.slice(-1)[0]?.Date.valueOf()&&(r=!1),this._forgetStream(t)):r=!1,r}_appendChartData(t,e,r=!1){if(!this._forgetIfEndEpoch(e)||this._activeStreams[e]){if((!this.hasAlternativeSource||r)&&r){if(!this.tickQueue.length)return void(this.tickQueue=[t[t.length-1]]);if(this.tickQueue[0].tick?.epoch===t[t.length-1].tick?.epoch)return;this.tickQueue=[t[t.length-1]],t=[t[t.length-1]]}this._emitDataUpdate(t)}else t=[]}appendChartDataFromPOCResponse(t){const e=W.formatPOCQuote(t);e&&this._appendChartData(e,e[0].tick.symbol,!0)}_emitDataUpdate(t,e=!1){const r=t[t.length-2],i=void 0!==r?r.Close:void 0,a={...t[t.length-1],prevClose:i};e?(this._emitter.emit(rt.EVENT_MASTER_DATA_REINITIALIZE),this._mainStore.chart.setChartAvailability(!0)):this._emitter.emit(rt.EVENT_MASTER_DATA_UPDATE,a)}static getFirstEpoch(t){if(t.candles&&t.candles.length>0)return t.candles[0].epoch;if(t.history&&t.history.times&&t.history.times.length>0){const{times:e}=t.history;return+e[0]}}onMasterDataUpdate(t){this._emitter.on(rt.EVENT_MASTER_DATA_UPDATE,t)}offMasterDataUpdate(t){this._emitter.off(rt.EVENT_MASTER_DATA_UPDATE,t)}onMasterDataReinitialize(t){this._emitter.on(rt.EVENT_MASTER_DATA_REINITIALIZE,t)}offMasterDataReinitialize(t){this._emitter.off(rt.EVENT_MASTER_DATA_REINITIALIZE,t)}onPagination(t){this._emitter.on(rt.EVENT_ON_PAGINATION,t)}offPagination(t){this._emitter.off(rt.EVENT_ON_PAGINATION,t)}onStartPagination(t){this._emitter.on(rt.EVENT_START_PAGINATION,t)}offStartPagination(t){this._emitter.off(rt.EVENT_START_PAGINATION,t)}onConnectionChanged(){const t=this._mainStore.state.isConnectionOpened;void 0!==t&&t!==this._isConnectionOpened&&(this._isConnectionOpened=t,t?this._onConnectionReopened():this._onConnectionClosed())}_onConnectionClosed(){for(const t in this._activeStreams)this._activeStreams[t].pause();this._connectionClosedDate=new Date}_onConnectionReopened(){0!==Object.keys(this._activeStreams).length&&(this._mainStore.chart.refreshChart(),this._connectionClosedDate=void 0)}_resumeStream(t){this._activeStreams[t].pause(),this._activeStreams[t].resume().then(e=>{const{quotes:r}=e;this._appendChartData(r,t)})}_getKey({symbol:t,granularity:e}){return`${t}-${e}`}_unpackKey(t){const[e,r]=t.split("-");return{symbol:e,granularity:+r}}_trimQuotes(t=[]){let e=null,r=null,i=t;if(!i.length)return[];if(this.startEpoch&&this.margin&&(e=i.findIndex(t=>(0,G.E)(t.Date)>=(0,G.E)((0,c.Pu)(this.startEpoch))),e>0&&(i=i.slice(e-1))),this.endEpoch&&this.margin&&(r=i.findIndex(t=>(0,G.E)(t.Date)>=(0,G.E)((0,c.Pu)(this.endEpoch))),r>-1)){const t=(0,G.E)(i[r].Date)===(0,G.E)((0,c.Pu)(this.endEpoch))?2:1;i=i.slice(0,r+t)}return i}}const it=rt;function at(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class st{constructor(t){at(this,"chartContainerHeight",void 0),at(this,"chartHeight",void 0),at(this,"chartId",void 0),at(this,"containerWidth",null),at(this,"context",null),at(this,"currentActiveSymbol",void 0),at(this,"currentLanguage",void 0),at(this,"cursorInChart",!1),at(this,"startWithDataFitMode",!1),at(this,"feed",void 0),at(this,"isBarrierDragging",!1),at(this,"isChartAvailable",!0),at(this,"isLive",!1),at(this,"isMobile",!1),at(this,"isScaledOneOne",!1),at(this,"mainStore",void 0),at(this,"networkStatus",void 0),at(this,"resizeObserver",void 0),at(this,"serverTime",void 0),at(this,"shouldRenderDialogs",!1),at(this,"leftMargin",void 0),at(this,"lastQuote",void 0),at(this,"_chartRequestId",0),at(this,"loaderTimeout",void 0),at(this,"processedSymbols",void 0),at(this,"symbolMap",{}),at(this,"categorizedSymbols",[]),at(this,"feedCall",{}),at(this,"RANGE_PADDING_PX",125),at(this,"contextPromise",(0,O.A)()),at(this,"rootNode",null),at(this,"api",null),at(this,"defaults",{granularity:0,chartType:"line"}),at(this,"granularity",void 0),at(this,"enableRouting",null),at(this,"chartNode",null),at(this,"chartControlsNode",null),at(this,"state",void 0),at(this,"onMessage",null),at(this,"_barriers",[]),at(this,"tradingTimes",void 0),at(this,"whitespace",void 0),at(this,"isDestroyed",!1),at(this,"currentCloseQuote",()=>{const t=this.mainStore.chart.feed?.quotes;let e=t?.[t.length-1];if(e&&!e.Close){const r=t?.filter(t=>t&&t.Close);if(r&&r.length)e=r[r.length-1];else{const r=t?.filter(t=>t&&t.Close);r&&r.length&&(e=r[r.length-1])}}return e}),at(this,"indicatorHeightRatio",t=>{let e={};if("function"==typeof this.stateStore.getIndicatorHeightRatio&&this.chartNode&&(e=this.stateStore.getIndicatorHeightRatio(this.chartNode.offsetHeight,t)),this.chartNode&&(!e||!e.height||!e.percent)){const r=this.chartNode.offsetHeight,i=r<780,a=t>=5?t:t+1,s=this.isMobile?160:320,n=Math.round((r-(s+(i?20:0)))/a);e={height:n,percent:n/r}}return e}),at(this,"init",(t,e)=>{this.loader.show(),this.mainStore.state.setChartIsReady(!1),this.loader.setState("chart-engine"),this.chartId=e.id||"base-chart",this._initChart(t,e)}),at(this,"setResizeEvent",()=>{const t=t=>{t.forEach(()=>{this.rootNode&&this.rootNode.clientWidth>0&&this.resizeScreen()})};"ResizeObserver"in window?(this.resizeObserver=new ResizeObserver(t),this.rootNode&&this.resizeObserver.observe(this.rootNode)):r.e(590).then(r.bind(r,4208)).then(({default:e})=>{window.ResizeObserver=e,this.rootNode&&(this.resizeObserver=new e(t),this.resizeObserver.observe(this.rootNode))})}),at(this,"onMarketOpenClosedChange",t=>{const e=this.processedSymbols||[];let r=!1;for(const{symbol:i,name:a}of e)i in t&&(t[i]?(r=!0,this.chartClosedOpenThemeChange(!1),this.mainStore.notifier.notifyMarketOpen(a)):(this.chartClosedOpenThemeChange(!0),this.mainStore.notifier.notifyMarketClose(a)));r&&this.refreshChart()}),at(this,"remainLabelY",()=>0),(0,s.makeObservable)(this,{chartContainerHeight:s.observable,chartHeight:s.observable,containerWidth:s.observable,context:s.observable,currentActiveSymbol:s.observable,currentLanguage:s.observable,cursorInChart:s.observable,isBarrierDragging:s.observable,isChartAvailable:s.observable,isMobile:s.observable,isScaledOneOne:s.observable,networkStatus:s.observable,serverTime:s.observable,shouldRenderDialogs:s.observable,xAxisHeight:s.computed,yAxisWidth:s.computed,lastQuote:s.observable,_initChart:s.action.bound,changeSymbol:s.action.bound,destroy:s.action.bound,granularity:s.observable,newChart:s.action.bound,onServerTimeChange:s.action.bound,openFullscreen:s.action.bound,pip:s.computed,refreshChart:s.action.bound,resizeScreen:s.action.bound,setChartAvailability:s.action.bound,updateCurrentActiveSymbol:s.action.bound,updateScaledOneOne:s.action.bound,processedSymbols:s.observable,symbolMap:s.observable,categorizedSymbols:s.observable}),this.mainStore=t}get loader(){return this.mainStore.loader}get routingStore(){return this.mainStore.routing}get stateStore(){return this.mainStore.state}get studiesStore(){return this.mainStore.studies}get pip(){return this.currentActiveSymbol?.decimal_places}get rootElement(){return this.chartId?document.getElementById(this.chartId):null}get currentClose(){return this.currentCloseQuote()?.Close}get xAxisHeight(){return window.flutterChart?.app.getXAxisHeight()||24}get yAxisWidth(){return window.flutterChart?.app.getYAxisWidth()||60}updateHeight(t){const e=this.mainStore.chartSetting.historical&&this.isMobile,r=t||this.mainStore.chartSetting.position;let i=0;this.stateStore.enabledChartFooter?i=32:"bottom"===r&&this.stateStore.chartControlsWidgets&&(i=40),this.chartHeight=this.chartNode?.offsetHeight,this.chartContainerHeight=(this.chartHeight||0)-i-(e?45:0)}resizeScreen(){this.rootNode&&this.rootNode.clientWidth>=1280?this.containerWidth=1280:this.rootNode&&this.rootNode.clientWidth>=900?this.containerWidth=900:this.containerWidth=480,this.updateHeight()}_initChart(t,e){this.rootNode=t,this.chartNode=this.rootNode?.querySelector(".ciq-chart-area"),this.chartControlsNode=this.rootNode?.querySelector(".cq-chart-controls");const{symbol:r,granularity:i,unsubscribeQuotes:a,getQuotes:n,subscribeQuotes:o,isMobile:c,enableRouting:h,onMessage:u,settings:d,onSettingsChange:g,chartData:m,feedCall:p,isLive:f,startWithDataFitMode:_,leftMargin:b}=e;this.feedCall=p||{},this.api=new A(a,n||(async()=>({candles:[],echo_req:{}})),o||(()=>()=>{})),this.currentLanguage=localStorage.getItem("current_chart_lang")??d?.language?.toLowerCase(),this.tradingTimes=st.tradingTimes||(st.tradingTimes=new M(this.api,{enable:this.feedCall.tradingTimes,shouldFetchTradingTimes:this.mainStore.state.shouldFetchTradingTimes,tradingTimes:m?.tradingTimes}));const v=m?.activeSymbols;if(v){const t=R(v);this.processedSymbols=t,this.categorizedSymbols=q(t),this.symbolMap={};for(const e of t)this.symbolMap[e.symbol]=e;st.processedSymbols=t,st.symbolMap=this.symbolMap,st.categorizedSymbols=this.categorizedSymbols}else this.currentLanguage===d?.language&&st.processedSymbols&&(this.processedSymbols=st.processedSymbols,this.symbolMap=st.symbolMap,this.categorizedSymbols=st.categorizedSymbols);const{chartSetting:y}=this.mainStore;y.setSettings(d),y.onSettingsChange=g,this.isMobile=c,this.whitespace=c?50:150,this.state=this.mainStore.state,this.mainStore.notifier.onMessage=u,this.granularity=void 0!==i?i:this.defaults.granularity,this.isLive=f||!1,this.startWithDataFitMode=_||!1,this.leftMargin=b,st.chartCount+=1,this.feed=new it(this.api,this.mainStore,this.tradingTimes),this.enableRouting=h,this.enableRouting&&this.routingStore.handleRouting();const S=new z(this.rootNode);this.stateStore.stateChange(l.c4.INITIAL),this.loader.setState("market-symbol"),this.loader.setState("trading-time"),this.tradingTimes?.initialize().then((0,s.action)(()=>{if(this.isDestroyed)return;this.startWithDataFitMode?this.state?.clearLayout():this.state?.restoreLayout();const t=this.state?.symbol||r;this.changeSymbol(t||this.symbolMap&&Object.keys(this.symbolMap)[0],this.granularity),this.context=S,this.chartClosedOpenThemeChange(!this.currentActiveSymbol?.exchange_is_open),this.mainStore.chart.tradingTimes?.onMarketOpenCloseChanged((0,s.action)(t=>{for(const e in t)this.currentActiveSymbol?.symbol===e&&this.chartClosedOpenThemeChange(!t[e])})),this.contextPromise?.resolve?.(this.context),this.resizeScreen(),(0,s.reaction)(()=>[this.state?.symbol,this.state?.granularity],()=>{void 0===this.state?.symbol&&void 0===this.state?.granularity||this.changeSymbol(this.state.symbol,this.state.granularity)}),this.tradingTimes?.onTimeChanged(this.onServerTimeChange),setTimeout((0,s.action)(()=>{this.shouldRenderDialogs=!0}),500)}))}chartClosedOpenThemeChange(t){this.mainStore.state.setChartClosed(t),this.mainStore.state.setChartTheme(this.mainStore.chartSetting.theme),this.mainStore.chartAdapter.setSymbolClosed(t)}onServerTimeChange(){this.tradingTimes?._serverTime&&(this.serverTime=N(1e3*this.tradingTimes._serverTime.getEpoch()).format("DD MMM YYYY HH:mm:ss [GMT]"))}updateCurrentActiveSymbol(t){this.currentActiveSymbol=t}setChartAvailability(t){this.isChartAvailable=t}changeSymbol(t,e,r=!1){"string"==typeof t&&(t=this.symbolMap[t]);t&&this.currentActiveSymbol&&t?.symbol===this.currentActiveSymbol?.symbol&&void 0!==e&&e===this.granularity&&!r||(this.newChart(t),void 0!==e&&(this.granularity=e),t&&this.updateCurrentActiveSymbol(t))}newChart(t=this.currentActiveSymbol){if(!t)return;this.currentActiveSymbol&&this.feed?.unsubscribe({symbol:this.currentActiveSymbol.symbol,granularity:this.granularity}),this.mainStore.state.setChartIsReady(!1);const e=++this._chartRequestId;clearTimeout(this.loaderTimeout),this.loaderTimeout=setTimeout(()=>{this.loader.setState("chart-data"),this.loader.show()},2500);const r=e=>{clearTimeout(this.loaderTimeout),this.loader.hide(),this.chartClosedOpenThemeChange(!t.exchange_is_open),this.mainStore.paginationLoader.updateOnPagination(!1),this.mainStore.state.setChartIsReady(!0)};this.feed?.fetchInitialData(t.symbol,{granularity:this.mainStore.state.granularity,symbolObject:t},async({quotes:t,error:i})=>{e===this._chartRequestId&&(await this.mainStore.chartAdapter.newChart(),await this.mainStore.chartAdapter.onTickHistory(t||[]),this.mainStore.chartAdapter.flutterChart?.app.scrollToLastTick(),this.mainStore.chart.feed?.offMasterDataUpdate(this.mainStore.chartAdapter.onTick),this.mainStore.chart.feed?.onMasterDataUpdate(this.mainStore.chartAdapter.onTick),r())})}updateScaledOneOne(t){this.isScaledOneOne=t}refreshChart(){this.newChart()}destroy(){st.chartCount-=1,this.isDestroyed=!0,clearTimeout(this.loaderTimeout),this.resizeObserver&&this.resizeObserver.disconnect(),this.tradingTimes&&0===st.chartCount&&(st.tradingTimes=null,this.tradingTimes.destructor()),this.feed&&(this.feed.unsubscribeAll(),this.feed=null),this.mainStore.drawTools.destructor(),this.currentActiveSymbol=null,this.contextPromise=null,this.context=null}openFullscreen(){const t={element:["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"],fnc_enter:["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],fnc_exit:["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"]},e=t.element.some(t=>document[t]&&null!==document[t]),r=e?document:document.documentElement,i=t[e?"fnc_exit":"fnc_enter"].find(t=>r[t]);i&&r[i]()?.catch(()=>{})}}at(st,"chartCount",0),at(st,"tradingTimes",void 0),at(st,"processedSymbols",void 0),at(st,"symbolMap",{}),at(st,"categorizedSymbols",[]);const nt=st;function ot(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class lt{constructor({getContext:t,getItems:e,onItemSelected:r}){ot(this,"getContext",void 0),ot(this,"getItems",void 0),ot(this,"onItemSelected",void 0),(0,s.makeObservable)(this,{onItemClick:s.action.bound}),this.getContext=t,this.getItems=e,this.onItemSelected=r}onItemClick(t,e){this.onItemSelected&&this.onItemSelected(e)}}function ct(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ht{get showTabs(){return!!this.description}constructor({mainStore:t,onChanged:e,onDeleted:r}){ct(this,"mainStore",void 0),ct(this,"menuStore",void 0),ct(this,"onChanged",void 0),ct(this,"onDeleted",void 0),ct(this,"items",[]),ct(this,"title",""),ct(this,"formTitle",""),ct(this,"formClassname",""),ct(this,"description",""),ct(this,"activeTab","settings"),ct(this,"scrollPanel",void 0),ct(this,"dialogPortalNodeId",void 0),ct(this,"freezeScroll",!1),ct(this,"id",""),ct(this,"flutter_chart_id",""),ct(this,"checkDropdownOpen",()=>{let t=!1;if(!this.scrollPanel)return;this.scrollPanel.querySelectorAll(".sc-color-picker, .sc-dropdown").forEach(e=>{-1!==e.className.indexOf("active")&&(t=!0)}),this.setFreezeScroll(t)}),(0,s.makeObservable)(this,{items:s.observable,title:s.observable,formTitle:s.observable,formClassname:s.observable,description:s.observable,activeTab:s.observable,showTabs:s.computed,scrollPanel:s.observable,dialogPortalNodeId:s.observable,freezeScroll:s.observable,open:s.computed,setFreezeScroll:s.action.bound,setOpen:s.action.bound,onResetClick:s.action.bound,onItemDelete:s.action.bound,onItemChange:s.action.bound,itemGroups:s.computed,setScrollPanel:s.action.bound}),this.mainStore=t,this.onChanged=e,this.onDeleted=r,this.menuStore=new _(t,{route:"indicator-setting"}),(0,s.reaction)(()=>this.open,()=>{if(!this.scrollPanel||!this.open)return;const t=this.scrollPanel.querySelectorAll(".sc-color-picker, .sc-dropdown");this.scrollPanel.addEventListener("click",()=>{this.setFreezeScroll(!1)}),t.forEach(t=>{t.addEventListener("click",()=>setTimeout(()=>this.checkDropdownOpen(),50))}),this.setFreezeScroll(!1)},{delay:300})}get context(){return this.mainStore.chart.context}get theme(){return this.mainStore.chartSetting.theme}get open(){return this.menuStore.open}setFreezeScroll(t){this.freezeScroll=t}setOpen(t){return t&&this.scrollPanel&&(this.scrollPanel.scrollTop=0),this.menuStore.setOpen(t)}onResetClick(){const t=this.items.map(t=>({...t,value:(0,c.o8)(t.defaultValue)}));this.items=t,this.onChanged(t)}onItemDelete(){this.menuStore.setOpen(!1),this.onDeleted&&this.onDeleted(this.id)}onItemChange(t,e){t&&t.value!==e&&(t.value=e,this.items=this.items.slice(0),this.onChanged(this.items))}get itemGroups(){const t=[],e=[];e.push({key:"%k",title:"%K",fields:[]}),e.push({key:"%d",title:"%D",fields:[]}),e.push({key:"over_bought",title:"Over Bought",fields:[]}),e.push({key:"over_sold",title:"OverSold",fields:[]}),e.push({key:"show_zones",title:"Show Zones",fields:[]});for(const r in this.items){const i=this.items[r],{group_key:a,title:s}=i,n=e.find(t=>a===t.key);n?(i.subtitle=s.replace(n.key,"").trim(),n.fields.push(i)):t.push(i)}return e.unshift({key:"others",title:this.formTitle||this.title,fields:t}),e}setScrollPanel(t){this.scrollPanel=t}}function ut(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const dt=[...l.wx].filter(t=>!t.candleOnly).map(t=>t.id);class gt{constructor(t){ut(this,"chartTypes",[]),ut(this,"listStore",void 0),ut(this,"mainStore",void 0),ut(this,"menuStore",void 0),ut(this,"settingsDialog",void 0),ut(this,"type",l.wx.find(t=>"line"===t.id)),ut(this,"onChartTypeChanged",void 0),ut(this,"onContextReady",()=>{this.chartTypes=[...l.wx]}),(0,s.makeObservable)(this,{type:s.observable,updateProps:s.action.bound,setChartType:s.action.bound,setType:s.action.bound,isTypeCandle:s.action.bound}),this.mainStore=t,(0,s.when)(()=>!!this.context,this.onContextReady),this.menuStore=new _(t,{route:"chart-type"}),this.listStore=new lt({getContext:()=>this.context,getItems:()=>this.types}),this.settingsDialog=new ht({mainStore:t,onChanged:()=>null}),(0,s.reaction)(()=>this.mainStore.state.chartType,()=>{void 0!==this.mainStore.state.chartType&&this.setType(this.mainStore.state.chartType)})}get context(){return this.mainStore.chart.context}get chartTypeProp(){return this.mainStore.state.chartType}get isCandle(){return!!this.type&&-1===dt.indexOf(this.type.id)}get isSpline(){return"spline"===this.type.id}setChartType(t){t&&this.setType(t)}setType(t){let e;(0,h.$s)(h.dq.ChartControl,h.Cw.ChartType,t),e="string"!=typeof(t=t||"line")?t:this.types.find(e=>e.id===t),e&&e.id!==this.type.id&&(this.type=e)}updateProps(t){this.onChartTypeChanged=t}get types(){const t=0===this.mainStore.chart.granularity;return void 0!==this.chartTypes&&0!==this.chartTypes.length||(this.chartTypes=[...l.wx]),this.chartTypes.map(e=>({...e,active:e.id===this.type.id,disabled:!!e.candleOnly&&t}))}isTypeCandle(t){return"string"==typeof t&&(t=this.types.find(e=>e.id===t)||this.types[0]),-1===dt.indexOf(t.id)}}function mt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class pt{constructor(t){mt(this,"mainStore",void 0),mt(this,"menuStore",void 0),this.mainStore=t,this.menuStore=new _(t,{route:"chart-mode"})}}var ft=r(7394),_t=r(9585),bt=r(9160).t;function vt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class yt{constructor(t){vt(this,"mainStore",void 0),vt(this,"menuStore",void 0),vt(this,"searchInput",void 0),vt(this,"settingsDialog",void 0),vt(this,"selectedTab",1),vt(this,"filterText",""),vt(this,"activeItems",[]),vt(this,"infoItem",null),vt(this,"portalNodeIdChanged",""),vt(this,"currentHoverIndex",null),vt(this,"previousHoverIndex",null),vt(this,"searchInputClassName",void 0),vt(this,"onContextReady",()=>{this.renderLegend()}),vt(this,"transform",t=>{if("string"==typeof t&&(t.startsWith("#")||t.toLowerCase().startsWith("0x")))return(0,ft.od)(t);if((0,c.Vh)(t)){const e=t;Object.keys(t).forEach(t=>{e[t]=this.transform(e[t])})}else if(Array.isArray(t))for(let e=0;e<t.length;e++)t[e]=this.transform(t[e]);return t}),vt(this,"addOrUpdateIndicator",(t,e)=>{const r=t.parameters.reduce((t,e)=>{const{path:r,paths:i,value:a}=e;if((0,c.Vh)(a)&&i){const e=a;Object.keys(e).forEach(r=>{(0,d.h)(t,i[r],e[r])})}else r&&(0,d.h)(t,r,a);return t},t.config||{}),i={id:t.id,name:t.flutter_chart_id,title:(t.short_name_and_index+(t.bars?` (${t.bars})`:"")).toUpperCase(),...this.transform(r)};this.mainStore.chartAdapter.flutterChart?.app.addOrUpdateIndicator(JSON.stringify(i),e)}),vt(this,"renderLegend",()=>{this.context&&this.updateStyle()}),vt(this,"getIndicatorProps",t=>(0,c.qI)((0,l.Xv)(),t=>t.items).find(e=>e?.flutter_chart_id===t)),(0,s.makeObservable)(this,{selectedTab:s.observable,filterText:s.observable,activeItems:s.observable,infoItem:s.observable,portalNodeIdChanged:s.observable,onSelectItem:s.action.bound,updateStyle:s.action.bound,updateProps:s.action.bound,editStudy:s.action.bound,editStudyByIndex:s.action.bound,deleteStudy:s.action.bound,deleteStudyById:s.action.bound,updateStudy:s.action.bound,deletePredictionStudies:s.action.bound,deleteAllStudies:s.action.bound,onSelectTab:s.action.bound,setFilterText:s.action.bound,onInfoItem:s.action.bound,updatePortalNode:s.action.bound,restoreStudies:s.action.bound,getItemById:s.action.bound,setIndicator:s.action.bound,highlightIndicator:s.action.bound,clearHoverItem:s.action.bound}),this.mainStore=t,(0,s.when)(()=>!!this.context,this.onContextReady),this.menuStore=new _(t,{route:"indicators"}),this.settingsDialog=new ht({mainStore:t,onDeleted:this.deleteStudyById,favoritesId:"indicators",onChanged:t=>this.updateStudy(t)}),this.searchInput=a().createRef(),(0,s.reaction)(()=>this.menuStore.open,()=>{this.menuStore.open||this.setFilterText(""),setTimeout(()=>{this.searchInput&&this.searchInput.current&&this.searchInput.current.focus()},400)})}get context(){return this.mainStore.chart.context}get items(){return[...(0,l.Xv)()].map(t=>("trend"===t.name&&(t.icon="light"===this.mainStore.chartSetting.theme?_t.KP:_t.qy),t))}get searchedItems(){return[...(0,l.Xv)()].map(t=>(t.foundItems=t.items.filter(t=>-1!==t.name.toLowerCase().indexOf(this.filterText.toLowerCase().trim())),t)).filter(t=>t.foundItems?.length)}get hasPredictionIndicator(){return(this.activeItems||[]).filter(t=>t.isPrediction).length>0}get maxAllowedItem(){return this.mainStore.chart.isMobile?2:5}onSelectItem(t){if(this.onInfoItem(null),this.activeItems.length>=this.maxAllowedItem)return;this.changeStudyPanelTitle(),(0,h.$s)(h.dq.ChartControl,h.Cw.Indicator,`Add ${t}`);const e=this.getIndicatorProps(t),{parameters:r,config:i}=(0,l.Fp)(t);if(e&&r){r.map(t=>t.value=(0,c.o8)(t.defaultValue));const t=(0,c.MQ)(this.settingsDialog.flutter_chart_id,r),a=this.findLastActiveItem(e.flutter_chart_id),s=a?a.group_length+1:0,n={...e,group_length:s,short_name_and_index:e.short_name+(s?` ${s}`:""),id:(0,ft.LP)(),config:i,parameters:r,bars:t.bars};(0,c.ay)(r,this.mainStore.chartSetting.theme),this.addOrUpdateIndicator(n),this.activeItems.push(n),this.mainStore.bottomWidgetsContainer.updateChartHeight(),this.mainStore.state.saveLayout()}}async restoreStudies(t){this.deleteAllStudies(),t.forEach((e,r)=>{const i=this.getIndicatorProps(e.flutter_chart_id);i?(this.addOrUpdateIndicator(e),Object.assign(e,i)):t.splice(r,1)}),this.activeItems=t,this.mainStore.bottomWidgetsContainer.updateChartHeight(),this.cleanupPredictionIndicator()}updateTheme(){this.activeItems.forEach((t,e)=>{(0,c.ay)(t.parameters,this.mainStore.chartSetting.theme),this.addOrUpdateIndicator(t,e)}),this.mainStore.state.saveLayout()}updateStyle(){const t=this.mainStore.studies.activeItems.length>2;this.mainStore.state.setShouldMinimiseLastDigit(t)}updateProps({searchInputClassName:t}){this.searchInputClassName=t}editStudyByIndex(t){const e=this.activeItems[t];e&&this.editStudy(e)}editStudy(t){(0,h.$s)(h.dq.ChartControl,h.Cw.Indicator,`Edit ${t.flutter_chart_id}`),this.settingsDialog.id=t.id,this.settingsDialog.flutter_chart_id=t.flutter_chart_id,this.settingsDialog.items=t.parameters,this.settingsDialog.title=t.name,this.settingsDialog.formTitle=bt.translate("Result"),this.settingsDialog.formClassname=`form--${t.id.toLowerCase().replace(/ /g,"-")}`,this.settingsDialog.description="",this.settingsDialog.dialogPortalNodeId=this.portalNodeIdChanged,this.settingsDialog.setOpen(!0)}deleteStudyById(t){const e=this.activeItems.findIndex(e=>e.id===t);this.mainStore.chartAdapter.flutterChart?.indicators.removeIndicator(e),this.deleteStudy(e)}deleteStudy(t){(0,h.$s)(h.dq.ChartControl,h.Cw.Indicator,`Remove ${t}`),this.mainStore.state.stateChange(l.c4.INDICATOR_DELETED,{indicator_type_name:this.activeItems[t].flutter_chart_id,indicators_category_name:(0,l.jY)(this.activeItems[t].flutter_chart_id)}),this.activeItems.splice(t,1),this.mainStore.bottomWidgetsContainer.updateChartHeight(),this.renderLegend(),this.mainStore.state.saveLayout()}updateStudy(t){this.changeStudyPanelTitle();const e=this.getIndicatorProps(this.settingsDialog.flutter_chart_id),{config:r}=(0,l.Fp)(this.settingsDialog.flutter_chart_id)||{};if(e&&t){const i=(0,c.MQ)(this.settingsDialog.flutter_chart_id,t),a=this.activeItems.findIndex(t=>t.id===this.settingsDialog.id),s=this.activeItems[a],n={...e,short_name_and_index:e.short_name+(s.group_length?` ${s.group_length}`:""),group_length:s.group_length,id:this.settingsDialog.id,bars:i.bars,parameters:t,config:r};this.activeItems[a]=n,this.mainStore.state.stateChange(l.c4.INDICATOR_EDITED,{indicator_type_name:n.flutter_chart_id,indicators_category_name:(0,l.jY)(n.flutter_chart_id)}),this.addOrUpdateIndicator(n,a),this.mainStore.state.saveLayout()}}changeStudyPanelTitle(){this.mainStore.chart.isMobile&&this.mainStore.state.saveLayout()}deletePredictionStudies(){const t=this.activeItems.filter(t=>t.isPrediction);t.length>0&&(t.forEach(t=>{this.mainStore.state.stateChange(l.c4.INDICATOR_DELETED),this.deleteStudyById(t.id)}),this.mainStore.state.saveLayout())}savePredictionStudies(){const t=this.activeItems.filter(t=>t.isPrediction);t.length>0&&(0,c.lk)("predictionIndicators",t)}cleanupPredictionIndicator(){localStorage.getItem("predictionIndicators")&&localStorage.removeItem("predictionIndicators")}deleteAllStudies(){this.activeItems=[],window.flutterChart?.indicators.clearIndicators(),this.mainStore.state.saveLayout()}onSelectTab(t){this.setFilterText(""),this.selectedTab=t,this.onInfoItem(null)}setFilterText(t){this.selectedTab=""!==t?0:1,this.filterText=t,this.mainStore.state.debouncedStateChange(l.c4.INDICATOR_SEARCH,{search_string:t})}onInfoItem(t){this.infoItem=t?{...t,disabledAddBtn:t.isPrediction&&this.mainStore.timeperiod.isTick}:t}setIndicator(t,e){this.addOrUpdateIndicator(t,e)}highlightIndicator(t){if(this.currentHoverIndex=t,this.previousHoverIndex!==this.currentHoverIndex){if("number"==typeof this.previousHoverIndex&&this.clearHoverItem(this.previousHoverIndex),null!=t){const e=(0,c.o8)(this.activeItems[t]);if(e&&e.config){for(const t in e.config)t.includes("Style")&&(e.config[t].thickness=2,"scatterStyle"===t&&(e.config[t].radius=2.5)),t.includes("Styles")&&e.config[t].forEach(t=>{t.thickness=2});this.setIndicator(e,t)}}this.previousHoverIndex=t}}clearHoverItem(t){const e=this.activeItems[t];e&&this.setIndicator(e,t)}updatePortalNode(t){this.portalNodeIdChanged=t}findLastActiveItem(t){for(let e=this.activeItems.length-1;e>=0;e--)if(this.activeItems[e].flutter_chart_id===t)return this.activeItems[e]}getItemById(t){return this.activeItems.find(e=>e.id===t)}}function St(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class xt{constructor(t){St(this,"_pervDrawingObjectCount",0),St(this,"_previousDrawingTools",[]),St(this,"mainStore",void 0),St(this,"menuStore",void 0),St(this,"settingsDialog",void 0),St(this,"activeToolsGroup",[]),St(this,"portalNodeIdChanged",void 0),St(this,"seletedDrawToolConfig",null),St(this,"selectedToolId",null),St(this,"showConfirmationToast",!1),St(this,"confirmationMessage",""),St(this,"showDeletionSnackbar",!1),St(this,"deletedToolName",""),St(this,"addingStateInfo",{currentStep:0,totalSteps:0,isFinished:!0}),St(this,"floatingMenuPosition",void 0),St(this,"getDrawToolsItems",()=>{const t=(0,l.Os)();return Object.keys(t).map(e=>t[e])}),St(this,"drawingToolsRepoArray",()=>this.mainStore.chartAdapter.flutterChart?.drawingTool.getDrawingToolsRepoItems().map(t=>(0,c.xL)(t)).filter(t=>t)),St(this,"onContextReady",()=>{document.addEventListener("keydown",this.closeOnEscape,!1),document.addEventListener("dblclick",this.doubleClick)}),St(this,"closeOnEscape",t=>{27===t.keyCode&&(this.mainStore.chartAdapter.flutterChart?.drawingTool.clearDrawingToolSelect(),this.seletedDrawToolConfig=null,this.drawingFinished())}),St(this,"doubleClick",()=>this.drawingFinished()),St(this,"transform",t=>{if("string"==typeof t&&(t.startsWith("#")||t.toLowerCase().startsWith("0x")))return(0,ft.od)(t);if((0,c.Vh)(t)){const e=t;Object.keys(t).forEach(t=>{e[t]=this.transform(e[t])})}else if(Array.isArray(t))for(let e=0;e<t.length;e++)t[e]=this.transform(t[e]);return t}),St(this,"updateFloatingMenuPosition",({x:t,y:e})=>{this.floatingMenuPosition={x:t,y:e},this.mainStore.chartAdapter.flutterChart?.drawingTool.updateFloatingMenuPosition(t,e)}),St(this,"setSelectedTool",t=>{this.selectedToolId=t,this.showConfirmationToast=!0}),St(this,"clearSelectedTool",()=>{this.selectedToolId=null,this.showConfirmationToast=!1}),St(this,"startAddingNewTool",t=>{this.setSelectedTool(t),this.menuStore.setOpen(!1),this.mainStore.chartAdapter.flutterChart?.drawingTool.startAddingNewTool(t)}),St(this,"cancelAddingNewTool",()=>{this.mainStore.chartAdapter.flutterChart?.drawingTool.cancelAddingNewTool(),this.hideDrawingConfirmation()}),St(this,"hideDrawingConfirmation",()=>{this.showConfirmationToast=!1,this.confirmationMessage="",this.resetAddingState(),this.clearSelectedTool()}),St(this,"hideDeletionSnackbar",()=>{this.showDeletionSnackbar=!1,this.deletedToolName=""}),St(this,"showDeletionSnackbarForDeletedTool",t=>{this.deletedToolName=t,this.showDeletionSnackbar=!0}),St(this,"cancelDrawingTool",()=>{this.hideDrawingConfirmation(),this.mainStore.chartAdapter.flutterChart?.drawingTool.clearDrawingToolSelect(),this.seletedDrawToolConfig=null,this.drawingFinished()}),St(this,"updateAddingState",(t,e)=>{this.addingStateInfo={currentStep:t,totalSteps:e,isFinished:t===e}}),St(this,"resetAddingState",()=>{this.addingStateInfo={currentStep:0,totalSteps:0,isFinished:!0}}),St(this,"updateProps",t=>{t.drawingToolFloatingMenuPosition&&this.updateFloatingMenuPosition(t.drawingToolFloatingMenuPosition)}),St(this,"handleStateChange",(t,e,r)=>{this.mainStore.state.stateChange(e,{drawing_tool_name:t,...r??{}})}),(0,s.makeObservable)(this,{activeToolsGroup:s.observable,portalNodeIdChanged:s.observable,selectedToolId:s.observable,showConfirmationToast:s.observable,confirmationMessage:s.observable,showDeletionSnackbar:s.observable,deletedToolName:s.observable,addingStateInfo:s.observable,floatingMenuPosition:s.observable,activeToolsNo:s.computed,destructor:s.action.bound,drawingFinished:s.action.bound,clearAll:s.action.bound,updateActiveToolsGroup:s.action.bound,onDeleted:s.action.bound,updatePortalNode:s.action.bound,onLoad:s.action.bound,onToolAdded:s.action.bound,hideDrawingConfirmation:s.action.bound,hideDeletionSnackbar:s.action.bound,showDeletionSnackbarForDeletedTool:s.action.bound,cancelDrawingTool:s.action.bound,updateAddingState:s.action.bound,resetAddingState:s.action.bound,updateProps:s.action.bound,updateFloatingMenuPosition:s.action.bound,setSelectedTool:s.action.bound,clearSelectedTool:s.action.bound}),this.mainStore=t,this.menuStore=new _(t,{route:"draw-tool"}),this.settingsDialog=new ht({mainStore:t,onDeleted:t=>{const e=this.drawingToolsRepoArray(),r=e?.findIndex(e=>e.configId===t);void 0!==r&&r>-1&&this.onDeleted(r)},onChanged:()=>{}}),(0,s.when)(()=>!!this.context,this.onContextReady)}get context(){return this.mainStore.chart.context}get stateStore(){return this.mainStore.state}get activeToolsNo(){return this.activeToolsGroup.reduce((t,e)=>t+e.items.length,0)}destructor(){document.removeEventListener("keydown",this.closeOnEscape),document.removeEventListener("dblclick",this.doubleClick)}updateTheme(){this.activeToolsGroup.forEach(t=>t.items.forEach(t=>{(0,c.ay)(t.parameters,this.mainStore.chartSetting.theme)}))}onLoad(t){this.activeToolsGroup=[],t.forEach(t=>{if("string"==typeof t&&(t=(0,c.xL)(t)),!t)return;const e=t.name.replace("dt_","");if(e){const r=this.processDrawTool(e);r.config=t,r.parameters.forEach(e=>{e.path&&(["lineStyle","fillStyle"].includes(e.path)?e.value=(0,ft.Fh)(t[e.path]?.color?.value??t[e.path]?.color):"enableLabel"===e.path&&(e.value=t[e.path]))}),this.updateActiveToolsGroup(r)}});const e=this.drawingToolsRepoArray();e&&(this._previousDrawingTools=JSON.parse(JSON.stringify(e)))}onToolAdded(t){t.lineStyle&&this.handleStateChange(t.name?.replace("dt_","")||"unknown",l.c4.DRAWING_TOOLS_ADD,{drawing_tool_name:t.name?.replace("dt_","")||"unknown",pxthickness:`default_${t.lineStyle.thickness}px`,color_name:`default_${(0,ft.Fh)(Number(t.lineStyle.color)).replace("#","")}`})}drawingFinished(){this.hideDrawingConfirmation()}clearAll(){this.activeToolsGroup=[],window.flutterChart?.drawingTool.clearDrawingTool(),(0,h.$s)(h.dq.ChartControl,h.Cw.DrawTools,"Clear All")}processDrawTool(t){const e=(0,l.Os)()[t],{parameters:r,config:i}=(0,l.YH)(t);(0,c.ay)(r,this.mainStore.chartSetting.theme),(0,c.ay)(i,this.mainStore.chartSetting.theme);let a=null;if(e&&r){r.map(t=>t.value=(0,c.o8)(t.defaultValue));const s={config:i,parameters:r,bars:"0",...e},n=s.parameters.reduce((t,e)=>{const{path:r,paths:i,value:a}=e;if((0,c.Vh)(a)&&i){const e=a;Object.keys(e).forEach(r=>{(0,d.h)(t,i[r],e[r])})}else r&&(0,d.h)(t,r,a);return t},s.config||{});a={...{id:s.id,name:`dt_${t}`,title:(0,ft.ZH)(s.id),...this.transform(n)},...(0,l.Os)()[t],parameters:r,index:this.activeToolsNo}}return a}onUpdate(){const t=this.drawingToolsRepoArray();if(t){if(this._previousDrawingTools&&this._previousDrawingTools.length===t.length)for(let e=0;e<t.length;e++)JSON.stringify(this._previousDrawingTools[e])!==JSON.stringify(t[e])&&this._identifyChanges(this._previousDrawingTools[e],t[e]);this._previousDrawingTools=JSON.parse(JSON.stringify(t)),this.onLoad(t)}}_identifyChanges(t,e){if(!t||!e)return"Complete replacement";Object.keys(e).forEach(r=>{["lineStyle","fillStyle"].includes(r)&&"object"==typeof e[r]&&null!==e[r]&&"object"==typeof t[r]&&null!==t[r]&&(e[r].color!==t[r].color&&this.handleStateChange(e.name?.replace("dt_","")||"unknown",l.c4.DRAWING_TOOLS_EDIT_COLOR,{drawing_tool_name:e.name?.replace("dt_","")||"unknown",color_name:`${(0,ft.Fh)(e[r].color).replace("#","")}`}),e[r].thickness!==t[r].thickness&&this.handleStateChange(e.name?.replace("dt_","")||"unknown",l.c4.DRAWING_TOOLS_EDIT_PX,{drawing_tool_name:e.name?.replace("dt_","")||"unknown",pxthickness:`${e[r].thickness}px`}))})}updateActiveToolsGroup(t){const e=[...this.activeToolsGroup],r=e.findIndex(e=>e.id===t.id);if(-1===r)e.push({id:t.id,items:[t]});else{const i=e[r];i.items.push({...t,num:i.items.length}),e[r]=i}this.activeToolsGroup=e}onDeleted(t){if(void 0!==t){const e=this.drawingToolsRepoArray(),r=e?e[t]:null;if(r){const e={...r};this.mainStore.chartAdapter.flutterChart?.drawingTool.removeDrawingTool(t),this.handleStateChange(e.name?.replace("dt_","")||"unknown",l.c4.DRAWING_TOOLS_DELETE,{pxthickness:e.lineStyle?.thickness?`${e.lineStyle.thickness}px`:void 0,color_name:e.lineStyle?.color?`${(0,ft.Fh)(Number(e.lineStyle.color)).replace("#","")}`:void 0})}t&&r&&(0,h.$s)(h.dq.ChartControl,h.Cw.DrawTools,`Remove ${t}`)}}updatePortalNode(t){this.portalNodeIdChanged=t}}function wt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Ct{constructor(){wt(this,"className",""),wt(this,"price",0),wt(this,"isIncrease",!1),wt(this,"status",""),wt(this,"oldPrice",0),(0,s.makeObservable)(this,{price:s.observable,isIncrease:s.observable,status:s.observable,setPrice:s.action.bound})}setPrice(t,e){const r=e||+this.oldPrice,i=+t;let a=!1;if(i>r)a=!0,this.status="up";else{if(!(i<r))return void(this.status="");this.status="down"}this.price=t,this.oldPrice=this.price,this.isIncrease=a}}var Tt=r(9160).t;function kt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class jt{constructor({getCategoricalItems:t,onSelectItem:e,getIsShown:r,placeholderText:i,favoritesId:n,mainStore:o,id:l,getCurrentActiveCategory:c,getCurrentActiveSubCategory:h,getCurrentActiveMarket:u,searchInputClassName:d}){kt(this,"activeMarket",void 0),kt(this,"activeSubCategory",""),kt(this,"categoryElements",void 0),kt(this,"favoritesId",void 0),kt(this,"getCategoricalItems",void 0),kt(this,"getCurrentActiveCategory",void 0),kt(this,"getCurrentActiveMarket",void 0),kt(this,"getCurrentActiveSubCategory",void 0),kt(this,"id",void 0),kt(this,"isInit",void 0),kt(this,"mainStore",void 0),kt(this,"onSelectItem",void 0),kt(this,"pauseScrollSpy",!1),kt(this,"searchInput",void 0),kt(this,"searchInputClassName",void 0),kt(this,"placeholderText",void 0),kt(this,"isShown",!1),kt(this,"scrollPanel",void 0),kt(this,"filterText",""),kt(this,"activeCategoryKey",""),kt(this,"focusedCategoryKey",null),kt(this,"isScrollingDown",!1),kt(this,"activeHeadKey",""),kt(this,"scrollTop",void 0),kt(this,"isUserScrolling",!0),kt(this,"lastFilteredItems",[]),kt(this,"activeCategories",[]),(0,s.makeObservable)(this,{isShown:s.observable,scrollPanel:s.observable,filterText:s.observable,activeCategoryKey:s.observable,focusedCategoryKey:s.observable,isScrollingDown:s.observable,activeHeadKey:s.observable,init:s.action.bound,favoritesCategoryData:s.computed,getFavorites:s.action.bound,filteredItems:s.computed,updateScrollSpy:s.action.bound,scrollUp:s.action.bound,scrollDown:s.action.bound,setCategoryElement:s.action.bound,setFilterText:s.action.bound,handleFilterClick:s.action.bound,setScrollPanel:s.action.bound,handleTitleClick:s.action.bound,scrollToActiveSymbol:s.action.bound}),(0,s.reaction)(()=>r&&r()&&this.scrollPanel,()=>{r()&&this.scrollPanel&&this.scrollToActiveSymbol()},{delay:200}),this.getCategoricalItems=t,this.onSelectItem=e,this.favoritesId=n,this.id=l,this.categoryElements={},this.mainStore=o,this.getCurrentActiveCategory=c,this.getCurrentActiveSubCategory=h,this.getCurrentActiveMarket=u,this.isInit=!1,this.searchInput=a().createRef(),this.searchInputClassName=d,this.placeholderText=i}get chart(){return this.mainStore.chart}get context(){return this.chart.context}get height(){return this.chart.chartContainerHeight?this.chart.chartContainerHeight-(this.chart.isMobile?0:120):0}init(){if(this.isInit=!0,""===this.activeCategoryKey&&this.filteredItems.length>0)for(const t of this.filteredItems){if(this.categoryElements[t.categoryId]){this.activeCategoryKey=t.categoryId;break}}}get favoritesCategoryData(){return Object.keys(this.mainStore.favorites.favoritesMap[this.favoritesId])||[]}getFavorites(){this.pauseScrollSpy=!0;const t={categoryName:Tt.translate("Favorites"),categoryId:"favorite",hasSubcategory:!1,hasSubgroup:!1,active:!0,subgroups:[],emptyDescription:Tt.translate("There are no favorites yet.")};return setTimeout(()=>{this.pauseScrollSpy=!1},20),t}get filteredItems(){let t=(0,c.yX)(this.getCategoricalItems());const e=this.activeCategories.length?this.activeCategories:[this.getCurrentActiveCategory?this.getCurrentActiveCategory():"favorite"];for(const r of t)if(e.includes(r.categoryId))r.active=!0;else if(r.hasSubgroup)for(const t of r.subgroups)e.includes(t.categoryId)&&(t.active=!0);if(this.favoritesId){const e={...this.getFavorites(),data:this.favoritesCategoryData},r=t=>{const i=[];return t.hasSubgroup&&"categoryName"in t?t.subgroups.forEach(t=>t.data.forEach(t=>{const e=r(t);i.push(...e)})):t.hasSubcategory?t.data.forEach(t=>{const e=r(t);i.push(...e)}):e.data.forEach(e=>{if("string"==typeof e){const r=t.data.find(t=>t.itemId===e);r&&i.push(r)}}),i},i=e.data.filter(t=>"string"!=typeof t);t.forEach(t=>{const e=r(t);i.push(...e)}),e.data=i.filter(t=>t),t.unshift(e)}if(""===this.filterText)return this.lastFilteredItems=t,t;let r=!1;const i=this.filterText.split(" ").filter(t=>""!==t).map(t=>t.toLowerCase().trim()),a=t=>{t.data=t.data.filter(t=>{return e=t.display||("object"==typeof t.dataObject?t.dataObject.symbol:""),i.reduce((t,r)=>e.toLowerCase().includes(r)&&t,!0);var e}),t.data.length&&(r=!0)};for(const e of t)if(e.active=!0,e.hasSubgroup){e.subgroups=(0,s.toJS)(e.subgroups);for(const t of e.subgroups){t.active=!0;for(const e of t.data)a(e)}}else if(e.hasSubcategory)for(const t of e.data)a(t);else a(e);return r||(t=this.lastFilteredItems),this.pauseScrollSpy||(this.lastFilteredItems=t),t}updateScrollSpy(){if(this.pauseScrollSpy||!this.scrollPanel)return;if(0===this.filteredItems.length)return;const t=this.scrollPanel.getBoundingClientRect().top;let e=null;for(const r of this.filteredItems){const i=this.categoryElements[r.categoryId],a=57;if(!i)return;const s=this.filteredItems.indexOf(r)*(r.hasSubgroup?r.subgroups.length+1*a:a),n=i.getBoundingClientRect();n.top-t-s<0&&(e=r.hasSubgroup?r.subgroups[r.subgroups.length>1?+(n.top<0):0]?.categoryId:r?.categoryId)}const r=this.scrollPanel.getBoundingClientRect().top;this.scrollTop&&this.scrollTop>r?this.scrollUp():this.scrollDown(),this.scrollTop=r,this.focusedCategoryKey=e||this.filteredItems[0].categoryId,this.activeHeadKey=0===this.scrollTop?null:this.focusedCategoryKey}scrollUp(){this.isScrollingDown=!1}scrollDown(){this.isScrollingDown=this.isUserScrolling,this.isUserScrolling=!0}setCategoryElement(t,e){this.categoryElements[e]=t}setFilterText(t){this.filterText=t,this.isUserScrolling=!1,this.updateScrollSpy(),""===t&&setTimeout(()=>this.scrollToActiveSymbol(),1),this.mainStore.state.debouncedStateChange(l.c4.MARKET_SEARCH,{search_string:t})}handleFilterClick(t){this.focusedCategoryKey="";const e=this.categoryElements[t],r=40*Object.keys(this.categoryElements).indexOf(t);e&&(this.pauseScrollSpy=!0,this.isUserScrolling=!1,this.scrollPanel&&(this.chart.isMobile?this.scrollPanel.scroll({top:e.offsetTop-95,left:0,behavior:"smooth"}):this.scrollPanel.scrollTop=e.offsetTop-r),this.focusedCategoryKey=t,this.activeHeadKey=null,setTimeout(()=>{this.pauseScrollSpy=!1},20))}setScrollPanel(t){this.scrollPanel=t}handleTitleClick(t){this.activeCategories=[];for(const e of this.filteredItems){if(e.hasSubgroup?e.subgroups?.filter(e=>e.categoryId===t).length>0:e.categoryId===t){if(e.hasSubgroup)for(const r of e.subgroups)r.categoryId===t&&(r.active=!r.active);e.active=!e.active,setTimeout(()=>this.handleFilterClick(e.categoryId),250)}if(e.active&&e.hasSubgroup)for(const t of e.subgroups)t.active&&this.activeCategories.push(t.categoryId);else e.active&&"favorite"!==e.categoryId&&this.activeCategories.push(e.categoryId)}setTimeout(()=>this.updateScrollSpy(),0)}scrollToActiveSymbol(){this.focusedCategoryKey=null,this.activeCategoryKey=this.getCurrentActiveCategory?this.getCurrentActiveCategory():"favorite",this.activeSubCategory=this.getCurrentActiveSubCategory?this.getCurrentActiveSubCategory():"",this.activeMarket=this.getCurrentActiveMarket?this.getCurrentActiveMarket():"";const t=this.categoryElements[this.activeCategoryKey],e=`.sc-mcd__category--${this.activeCategoryKey} .sc-mcd__category__content--${this.activeSubCategory}`,r=this.scrollPanel?.querySelector(e),i=`${e} .sc-mcd__item--${this.activeMarket}`,a=this.scrollPanel?.querySelector(i);if(this.scrollPanel?.querySelectorAll(".sc-mcd__item--market-selected").forEach(t=>{t.classList.remove("sc-mcd__item--market-selected")}),this.activeSubCategory&&this.activeCategoryKey){const t=this.scrollPanel?.querySelector(`.sc-mcd__category--${this.activeCategoryKey} .sc-mcd__item--${this.activeSubCategory}`);t&&t.classList.add("sc-mcd__item--market-selected")}if(this.activeHeadKey=this.activeCategoryKey||null,this.pauseScrollSpy=!0,this.isUserScrolling=!1,this.scrollPanel&&t&&this.scrollPanel)if(this.scrollPanel.scrollTop=t.offsetTop,a){const e=this.mainStore.chart.isMobile?100:40;this.scrollPanel.scrollTop=t.offsetTop+a.offsetTop-e}else if(r){const e=this.mainStore.chart.isMobile?100:0;this.scrollPanel.scrollTop=t.offsetTop+r.offsetTop-e}if(setTimeout(()=>{this.pauseScrollSpy=!1},20),this.isInit||this.init(),this.mainStore.chart.isMobile||setTimeout(()=>this.searchInput.current&&this.searchInput.current.focus(),0),!this.mainStore.chart.isMobile){const t=Object.keys(this.categoryElements),e=t.filter(t=>null!==this.categoryElements[t]),r=t[t.length-1],i=this.height-(64+40*(e.length-1)),a=this.categoryElements[r];a&&(a.style.minHeight=`${i}px`)}}}var Nt=r(9160).t;function Et(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class At{constructor(t){Et(this,"animatedPrice",void 0),Et(this,"categoricalDisplay",void 0),Et(this,"mainStore",void 0),Et(this,"menuStore",void 0),Et(this,"serverTime",void 0),Et(this,"todayChange",null),Et(this,"todayChangePercent",null),Et(this,"isVisible",!1),Et(this,"openMarket",{}),Et(this,"enableShowPrice",!1),Et(this,"searchInputClassName",void 0),Et(this,"onContextReady",()=>{this.chart.feed?.onMasterDataUpdate(this.update),this.update(),this.tradingTimes?.onMarketOpenCloseChanged((0,s.action)(t=>{for(const e in t)this.currentSymbol?.symbol===e&&(this.currentSymbol.exchange_is_open=t[e])}))}),Et(this,"onMouseEnter",()=>this.crosshairStore.setTemporaryDisabled(!0)),Et(this,"onMouseLeave",()=>this.crosshairStore.setTemporaryDisabled(!1)),(0,s.makeObservable)(this,{todayChange:s.observable,todayChangePercent:s.observable,isVisible:s.observable,openMarket:s.observable,currentSymbol:s.computed,isSymbolOpen:s.computed,decimalPlaces:s.computed,isShowChartPrice:s.computed,tradingTimes:s.computed,symbolOpenTime:s.computed,currentActiveCategory:s.computed,currentActiveSubCategory:s.computed,currentActiveMarket:s.computed,setSymbol:s.action.bound,update:s.action.bound,hidePrice:s.action.bound,updateProps:s.action.bound}),this.mainStore=t,(0,s.when)(()=>!!this.context,this.onContextReady),this.menuStore=new _(t,{route:"chart-title"}),this.animatedPrice=new Ct,this.categoricalDisplay=new jt({getCategoricalItems:()=>this.mainStore.chart.categorizedSymbols,getIsShown:()=>this.menuStore.open,placeholderText:Nt.translate("Search..."),favoritesId:"chartTitle&Comparison",mainStore:t,id:"market_dropdown",getCurrentActiveCategory:()=>this.currentActiveCategory,getCurrentActiveSubCategory:()=>this.currentActiveSubCategory,getCurrentActiveMarket:()=>this.currentActiveMarket,searchInputClassName:this.searchInputClassName}),this.serverTime=u.A.getInstance()}get chart(){return this.mainStore.chart}get context(){return this.mainStore.chart.context}get crosshairStore(){return this.mainStore.crosshair}get currentSymbol(){return this.mainStore.chart.currentActiveSymbol}get isSymbolOpen(){return this.currentSymbol?.exchange_is_open}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places||2}get isShowChartPrice(){return this.mainStore.chart.isChartAvailable}get tradingTimes(){return this.mainStore.chart.tradingTimes}get symbolOpenTime(){const t=this.tradingTimes?._tradingTimesMap&&this.tradingTimes._tradingTimesMap.length&&this.currentSymbol?this.tradingTimes._tradingTimesMap[this.currentSymbol.symbol].times:[],e=this.serverTime.getLocalDate().getTime();let r=t?t.find(t=>t.open.getTime()>e):null;return r instanceof Date||(r=null),{openTime:r}}get currentActiveCategory(){const t=this.mainStore.chart.currentActiveSymbol;return this.openMarket.category?this.openMarket.category:"none"!==t?.subgroup?t?.subgroup:t?t.market:"favorite"}get currentActiveSubCategory(){return this.openMarket.subcategory?this.openMarket.subcategory:this.mainStore.chart.currentActiveSymbol?this.mainStore.chart.currentActiveSymbol.symbol:""}get currentActiveMarket(){return this.openMarket.market?this.openMarket.market:null}setSymbol(t){void 0===this.mainStore.state.symbol?this.chart.changeSymbol(t):console.error("Changing symbol does nothing because symbol prop is being set. Consider overriding the onChange prop in <ChartTitle />")}update(t){if(!this.currentSymbol)return;const e=t||!this.isShowChartPrice;if(!e)return;let r=t?.Close;if(r){r=+r.toFixed(this.decimalPlaces);const e=t?.prevClose||this.animatedPrice.price;this.animatedPrice.setPrice(r,e),e&&(this.todayChange=Math.abs(r-e).toFixed(this.decimalPlaces),this.todayChangePercent=(Number(this.todayChange)/e*100).toFixed(2))}this.isVisible||!e||this.enableShowPrice?this.isVisible=e:this.enableShowPrice=!0}hidePrice(){this.isVisible=!1,this.enableShowPrice=!1}updateProps({open_market:t,open:e}){t&&(this.openMarket=t),e&&this.menuStore.setOpen(!0)}}function It(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Dt{constructor(t){It(this,"templateName",""),It(this,"currentRoute","main"),It(this,"isInputActive",!1),It(this,"views",(0,c.s0)("chart-views")||[]),It(this,"routes",{add:()=>this.saveViews(),main:()=>this.updateRoute("add"),cancel:()=>this.onCancel(),overwrite:()=>this.overwrite()}),It(this,"mainStore",void 0),It(this,"menuStore",void 0),(0,s.makeObservable)(this,{templateName:s.observable,currentRoute:s.observable,isInputActive:s.observable,routes:s.observable,views:s.observable,sortedItems:s.computed,onChange:s.action.bound,onSubmit:s.action.bound,onCancel:s.action.bound,updateRoute:s.action.bound,saveViews:s.action.bound,overwrite:s.action.bound,remove:s.action.bound,removeAll:s.action.bound,applyLayout:s.action.bound,onToggleNew:s.action.bound,inputRef:s.action.bound,onFocus:s.action.bound,onBlur:s.action.bound}),this.mainStore=t,this.menuStore=new _(t,{route:"templates"}),(0,s.reaction)(()=>this.menuStore.dialogStore.open,()=>{0===this.views.length?this.updateRoute("new"):this.updateRoute("main"),this.menuStore.dialogStore.open&&(this.templateName="")})}get context(){return this.mainStore.chart.context}get loader(){return this.mainStore.loader}get sortedItems(){return[...this.views].sort((t,e)=>t.name.toLowerCase()<e.name.toLowerCase()?-1:1)}updateLocalStorage(){localStorage.setItem("chart-views",JSON.stringify(this.views))}onChange(t){"overwrite"!==this.currentRoute&&(this.templateName=t.target.value)}onSubmit(t){13===t.keyCode&&(this.saveViews(),(0,h.$s)(h.dq.ChartControl,h.Cw.Template,"Save Template"))}onCancel(){this.templateName="",this.updateRoute("main")}updateRoute(t){this.currentRoute=t}getLayout(){return{chartType:this.mainStore.state.chartType,granularity:this.mainStore.state.granularity,timeUnit:this.mainStore.state.timeperiodStore.timeUnit,studyItems:this.mainStore.studies.activeItems,drawTools:this.mainStore.drawTools.activeToolsGroup,msPerPx:this.mainStore.chartAdapter.msPerPx}}saveViews(){this.views.some(t=>t.name.toLowerCase().trim()===this.templateName.toLowerCase().trim())?this.updateRoute("overwrite"):this.templateName.trim().length>0&&(this.updateRoute("main"),this.views.push({name:this.templateName.trim(),layout:(0,c.o8)(this.getLayout())}),this.updateLocalStorage(),this.templateName="")}overwrite(){const t=(0,c.o8)(this.getLayout()),e=this.views.findIndex(t=>t.name.toLowerCase()===this.templateName.toLowerCase());this.views[e].layout=t,this.views[e].name=this.templateName.trim(),this.updateLocalStorage(),this.updateRoute("main"),this.templateName=""}remove(t,e){this.views=this.sortedItems.filter((e,r)=>t!==r),e.nativeEvent.is_item_removed=!0,this.updateLocalStorage(),(0,h.$s)(h.dq.ChartControl,h.Cw.Template,"Remove Template")}removeAll(){this.views=[],this.updateLocalStorage(),(0,h.$s)(h.dq.ChartControl,h.Cw.Template,"Remove All Templates"),this.updateRoute("new")}applyLayout(t,e,r,i){if(e.nativeEvent.is_item_removed)return;this.mainStore.crosshair.setTemporaryDisabled(!0);const{layout:a}=this.sortedItems[t];r(a.granularity),i(a.chartType),this.restoreLayout((0,c.o8)(a)),(0,h.$s)(h.dq.ChartControl,h.Cw.Template,"Load Template")}async restoreLayout(t){this.loader&&this.loader.show(),this.mainStore.chartAdapter.msPerPx=t.msPerPx,this.mainStore.state.setChartIsReady(!1),void 0!==t.chartType&&this.mainStore.chartType.setChartType(t.chartType),this.menuStore.setOpen(!1),await(0,s.when)(()=>this.mainStore.chartAdapter.isChartLoaded),this.mainStore.studies.restoreStudies(t.studyItems||[]),(()=>{this.loader&&(this.loader.hide(),this.mainStore.paginationLoader.updateOnPagination(!1)),this.mainStore.state.setChartIsReady(!0),void 0!==t.granularity&&this.mainStore.timeperiod.setGranularity(t.granularity)})()}onToggleNew(){this.updateRoute("main")}inputRef(t){t&&(t.focus(),this.isInputActive=!0)}onFocus(){this.isInputActive=!0}onBlur(){this.isInputActive=!1}}function Ot(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Pt="is_crosshair_enabled";const Lt=class{constructor(t){Ot(this,"mainStore",void 0),Ot(this,"isEnabled",!0),Ot(this,"isTemporarilyDisabled",!1),Ot(this,"shouldPersist",!0),Ot(this,"updateEnabledState",t=>{this.isEnabled=t,this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive);try{this.shouldPersist&&"undefined"!=typeof window&&window.localStorage&&localStorage.setItem(Pt,t.toString())}catch{}this.stateChange(l.c4.CROSSHAIR_CLICK,{cta_name:t?"enable":"disable"})}),Ot(this,"setTemporaryDisabled",t=>{this.isTemporarilyDisabled=t,this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive)}),Ot(this,"setInitialEnabledState",t=>{this.shouldPersist=!1,this.isEnabled=t,this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive)}),Ot(this,"stateChange",(t,e={})=>{this.mainStore.state.stateChange(t,e)}),(0,s.makeObservable)(this,{isEnabled:s.observable,isTemporarilyDisabled:s.observable,isFunctionallyActive:s.computed}),this.mainStore=t;try{if("undefined"!=typeof window&&window.localStorage){const t=localStorage.getItem(Pt);null!==t&&(this.isEnabled="true"===t)}}catch{}(0,s.when)(()=>this.mainStore.chartAdapter.isChartLoaded,()=>{this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive)})}get isFunctionallyActive(){return this.isEnabled&&!this.isTemporarilyDisabled}};function Mt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Rt{constructor(t){Mt(this,"mainStore",void 0),Mt(this,"menuStore",void 0),Mt(this,"screenshotArea",void 0),Mt(this,"isLoadingPNG",!1),Mt(this,"onContextReady",()=>{this.screenshotArea=(this.context?.topNode).querySelector(".ciq-chart")}),(0,s.makeObservable)(this,{timeUnit:s.computed,timeperiodDisplay:s.computed,marketDisplayName:s.computed,decimalPlaces:s.computed,isLoadingPNG:s.observable,downloadPNG:s.action.bound,_onCanvasReady:s.action.bound,downloadCSV:s.action.bound}),this.mainStore=t,this.menuStore=new _(t,{route:"download"}),(0,s.when)(()=>!!this.context,this.onContextReady)}get context(){return this.mainStore.chart.context}get timeUnit(){return this.mainStore.timeperiod.timeUnit}get timeperiodDisplay(){return this.mainStore.timeperiod.display}get marketDisplayName(){return this.mainStore.chart.currentActiveSymbol?.name}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places}createNewTab(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)?window.open():null}downloadPNG(){this.isLoadingPNG=!0;const t=this.createNewTab();r.e(526).then(r.t.bind(r,2939,23)).then(e=>{this.screenshotArea?.classList.add("ciq-chart--screenshot");const r=[],i=[];(this.screenshotArea?.querySelectorAll("svg")||[]).forEach(t=>{const e=t.parentNode,a=document.createElement("canvas");a.width=Number(getComputedStyle(t).width.match(/[0-9]+/)),a.height=Number(getComputedStyle(t).height.match(/[0-9]+/));const s=a.getContext("2d"),n=getComputedStyle(t).fill;if(n){const e=n.split(",").map(t=>Number(t.replace(/\D+/g,"")).toString(16).padStart(2,"0")).join("");s&&e>"333333"&&(s.fillStyle=getComputedStyle(t).fill,s.fillRect(0,0,a.width,a.height),s.globalCompositeOperation="destination-in")}const o=new Image;o.src=t.querySelector("use")?.getAttribute?.("xlink:href")||"",o.onload=()=>{s&&s.drawImage(o,0,0),c.SN.Firefox()||c.SN.Safari()||(r.push({parent:e,child:t}),e?.removeChild(t),i.push({parent:e,child:a}),e?.appendChild(a))}}),setTimeout(()=>{e.default(this.screenshotArea).then(e=>{this._onCanvasReady(e,t),c.SN.Firefox()||c.SN.Safari()||(i.forEach(t=>{t?.parent?.contains(t.child)&&t.child instanceof HTMLCanvasElement&&t.parent?.removeChild?.(t.child)}),r.forEach(t=>{t.parent?.appendChild(t.child)}))})},100)}),(0,h.$s)(h.dq.ChartControl,h.Cw.Download,"Download PNG")}_onCanvasReady(t,e){const r=t.toDataURL("image/png");(0,c.SS)(`${(new Date).toUTCString()}.png`,r,"image/png;",e),this.isLoadingPNG=!1,this.screenshotArea?.classList.remove("ciq-chart--screenshot")}downloadCSV(){const t="tick"===this.timeUnit,e=[`Date,Time,${t?this.marketDisplayName:"Open,High,Low,Close"}`],r=this.mainStore.chart.feed?.quotes||[],i=r.length;(i<=100?r:r.slice(i-100,i)).forEach(({DT:r,Open:i,High:a,Low:s,Close:n})=>{if(!r)return;const o=r.getFullYear(),l=r.getMonth()+1,c=r.getDate(),h=r.getHours(),u=r.getMinutes(),d=r.getSeconds(),g=`${o}-${l>9?l:`0${l}`}-${c>9?c:`0${c}`}`,m=`${h>9?h:`0${h}`}:${u>9?u:`0${u}`}${t?d>9?`:${d}`:`:0${d}`:""}`;t&&n&&e.push(`${g},${m},${n}`),!t&&i&&a&&s&&n&&e.push([g,m,i.toFixed(this.decimalPlaces),a.toFixed(this.decimalPlaces),s.toFixed(this.decimalPlaces),n.toFixed(this.decimalPlaces)].join(","))}),(0,c.SS)(`${this.marketDisplayName} (${this.timeperiodDisplay}).csv`,e.join("\n"),"text/csv;charset=utf-8;",this.createNewTab()),(0,h.$s)(h.dq.ChartControl,h.Cw.Download,"Download CSV")}}var Bt=r(9160).t;function Ft(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Vt{constructor(t){Ft(this,"mainStore",void 0),Ft(this,"menuStore",void 0),Ft(this,"language",""),Ft(this,"position","bottom"),Ft(this,"theme","light"),Ft(this,"countdown",!1),Ft(this,"historical",!1),Ft(this,"isAutoScale",!0),Ft(this,"isHighestLowestMarkerEnabled",!0),Ft(this,"isSmoothChartEnabled",!0),Ft(this,"minimumLeftBars",void 0),Ft(this,"whitespace",void 0),Ft(this,"languages",[]),Ft(this,"defaultLanguage",{}),Ft(this,"onSettingsChange",void 0),(0,s.makeObservable)(this,{language:s.observable,position:s.observable,theme:s.observable,countdown:s.observable,historical:s.observable,isAutoScale:s.observable,isHighestLowestMarkerEnabled:s.observable,isSmoothChartEnabled:s.observable,minimumLeftBars:s.observable,updateActiveLanguage:s.action.bound,setLanguage:s.action.bound,setTheme:s.action.bound,setPosition:s.action.bound,showCountdown:s.action.bound,setHistorical:s.action.bound,setAutoScale:s.action.bound,setWhiteSpace:s.action.bound,toggleHighestLowestMarker:s.action.bound,toggleSmoothChart:s.action.bound,whitespace:s.observable}),this.defaultLanguage=this.languages[0],this.mainStore=t,this.menuStore=new _(t,{route:"setting"});const e=localStorage.getItem("is_smooth_chart_enabled");null!==e&&(this.isSmoothChartEnabled="true"===e),(0,s.reaction)(()=>this?.language?.key,()=>{t?.chart?.changeSymbol?.(t.state.symbol,t.state.granularity,!0)}),(0,s.when)(()=>!!this.context,()=>{this.setSettings(t.state.settings)})}get context(){return this.mainStore.chart.context}setSettings(t){if(void 0===t)return;const{countdown:e,historical:r,language:i,minimumLeftBars:a,position:s,isAutoScale:n,isHighestLowestMarkerEnabled:o,isSmoothChartEnabled:c,theme:h,activeLanguages:u,whitespace:d}=t;!u&&l.AT.every(t=>this.languages.find(e=>e.key===t.key))||u&&this.languages.length===u.length&&this.languages.every(t=>-1!==u.indexOf(t.key.toUpperCase()))||this.updateActiveLanguage(u),void 0!==h&&this.setTheme(h),void 0!==s&&this.setPosition(s),void 0!==e&&this.showCountdown(e),void 0!==i&&this.setLanguage(i),this.setMinimumLeftBars(a),void 0!==r&&this.setHistorical(r),void 0!==n&&this.setAutoScale(n),void 0!==o&&this.toggleHighestLowestMarker(o),void 0!==c&&this.toggleSmoothChart(c),this.setWhiteSpace(d)}saveSetting(){this.onSettingsChange&&this.language&&this.onSettingsChange({countdown:this.countdown,historical:this.historical,language:this.language?.key,position:this.position,isAutoScale:this.isAutoScale,isHighestLowestMarkerEnabled:this.isHighestLowestMarkerEnabled,isSmoothChartEnabled:this.isSmoothChartEnabled,minimumLeftBars:this.minimumLeftBars,theme:this.theme,whitespace:this.whitespace})}updateActiveLanguage(t){this.languages=t?t.map(t=>l.AT.find(e=>e.key.toUpperCase()===t)||"").filter(t=>t):l.AT,this.defaultLanguage=this.languages[0],(this.language&&!this.languages.find(t=>t.key===this.language?.key)||!this.language)&&this.setLanguage(this.languages[0].key)}setLanguage(t){if(!this.languages.length)return;const e=t.toLowerCase();if(this.language&&e===this.language.key)return;this.language=this.languages.find(t=>t.key===e)||this.defaultLanguage;const r=this.language.key;Bt.setLanguage(r,()=>{this?.mainStore?.loader?.hide?.()}),(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,`Change language to ${r}`),r!==localStorage.getItem("current_chart_lang")&&localStorage.setItem("current_chart_lang",r),r!==this.mainStore.chart.currentLanguage&&(this.mainStore.chart.currentLanguage=r,this.mainStore.state.saveLayout(),setTimeout(()=>{const t=this.mainStore.chart.currentActiveSymbol?.symbol;t&&window.flutterChart?.app.newChart({symbol:t,granularity:this.mainStore.chartAdapter.getGranularityInMs(),chartType:this.mainStore.state.chartType,isLive:this.mainStore.chart.isLive||!1,startWithDataFitMode:this.mainStore.chartAdapter.isDataFitModeEnabled,theme:this.theme,msPerPx:this.mainStore.chartAdapter.msPerPx,pipSize:this.mainStore.chart.pip,isMobile:this.mainStore.chart.isMobile||!1,isSmoothChartEnabled:this.isSmoothChartEnabled,yAxisMargin:this.mainStore.state.yAxisMargin})},100)),this.saveSetting()}setTheme(t){this.theme!==t&&(this.theme=t,this.mainStore.drawTools.updateTheme(),this.mainStore.chartAdapter.updateTheme(t),this.context&&this.mainStore.state.setChartTheme(t),this.mainStore.studies.updateTheme(),(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,`Change theme to ${t}`),this.saveSetting())}setPosition(t){this.position!==t&&(this.position=t,(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,"Change Position"),this.saveSetting(),setTimeout(()=>{this.mainStore.chart.resizeScreen()},10),this.menuStore.setOpen(!1))}showCountdown(t){this.countdown!==t&&(this.mainStore.chartAdapter.setShowInterval(t),this.countdown=t,(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,(t?"Show":"Hide")+" Countdown"),this.saveSetting())}setHistorical(t){this.historical!==t&&(this.historical=t,this.isHighestLowestMarkerEnabled=!t,this.saveSetting(),setTimeout(()=>{this.mainStore.chart.resizeScreen()},10))}setAutoScale(t){this.isAutoScale!==t&&(this.isAutoScale=t,(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,` Change AutoScale to ${t}`),this.saveSetting())}setMinimumLeftBars(t){this.minimumLeftBars!==t&&(this.minimumLeftBars=t,(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,` Change MinimumLeftBars to ${t}`),this.saveSetting())}setWhiteSpace(t){this.whitespace!==t&&(this.whitespace=t,(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,` Change Whitespace to ${t}`),this.saveSetting())}toggleHighestLowestMarker(t){this.isHighestLowestMarkerEnabled!==t&&(this.isHighestLowestMarkerEnabled=t,(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,` ${t?"Show":"Hide"} HighestLowestMarker.`),this.saveSetting())}toggleSmoothChart(t){if(this.isSmoothChartEnabled===t)return;this.isSmoothChartEnabled=t,localStorage.setItem("is_smooth_chart_enabled",t.toString()),(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,` ${t?"Enable":"Disable"} Smooth Chart.`);const e=this.mainStore.chartType.type,r=this.mainStore.state;this.mainStore.state.stateChange(l.c4.CHART_SWITCH_TOGGLE,{enable_smooth_chart:t?"enable":"disable",chart_type_name:"colored_bar"===e.id?e.text:e.text.toLowerCase(),time_interval_name:(0,c.mI)(r.granularity,l.NI)}),this.saveSetting(),this.mainStore.chart.refreshChart()}}var Ht=r(9160).t;function $t(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class qt{constructor(){$t(this,"isActive",!1),$t(this,"currentState",!1),$t(this,"states",{}),(0,s.makeObservable)(this,{isActive:s.observable,currentState:s.observable,setState:s.action.bound,show:s.action.bound,hide:s.action.bound}),this.states={"chart-engine":Ht.translate("Retrieving Chart Engine..."),"market-symbol":Ht.translate("Retrieving Market Symbols..."),"trading-time":Ht.translate("Retrieving Trading Times..."),"chart-data":Ht.translate("Retrieving Chart Data...")}}setState(t){this.states[t]?this.currentState=this.states[t]:console.error("Wrong state requested!")}show(){this.isActive=!0}hide(){this.isActive=!1}}var Ut=r(4916);function zt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Gt{constructor(t){zt(this,"mainStore",void 0),(0,s.makeObservable)(this,{updateChartState:s.action.bound,zoomIn:s.action.bound,zoomOut:s.action.bound}),this.mainStore=t}get state(){return this.mainStore.state}updateChartState(){this.mainStore.chart.updateScaledOneOne(!1)}zoomIn(){(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSize,"zoom In"),this.mainStore.chartAdapter.scale(1.25)}zoomOut(){(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSize,"zoom Out"),this.mainStore.chartAdapter.scale(.75)}}function Wt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Kt=[];class Qt{constructor(t){Wt(this,"mainStore",void 0),(0,s.makeObservable)(this,{handleRouting:s.action.bound,updateRoute:s.action.bound,registerDialog:s.action.bound,closeAll:s.action.bound}),this.mainStore=t}handleRouting(){window.addEventListener("hashchange",()=>{""===window.history.state.urlPath.replace("#","")&&this.closeAll()},!1)}updateRoute(t,e){const r=this.mainStore.chart.enableRouting;r&&e&&t?(window.history.replaceState({urlPath:"#"},"","#"),window.history.pushState({urlPath:`#${t}`},"",`#${t}`)):r&&!e&&t&&window.history.replaceState({urlPath:"#"},"","#")}registerDialog(t){Kt.push(t)}closeAll(){Kt.forEach(t=>t.setOpen(!1))}}const Yt=(t,e)=>typeof t==typeof e&&(Array.isArray(t)?Xt(t,e):t&&e&&"object"==typeof t?Zt(t,e):!("number"!=typeof t||"number"!=typeof e||!Number.isNaN(t)||!Number.isNaN(e))||t===e),Xt=(t,e)=>t===e||t.length===e.length&&t.every((t,r)=>Yt(t,e[r])),Zt=(t,e)=>t===e||Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>Yt(t[r],e[r]));var Jt=r(2592),te=r.n(Jt);function ee(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}let re=null;const ie=async()=>(re||(re=await r.e(937).then(r.t.bind(r,5581,23))),re);const ae=class{get context(){return this.chartStore.context}get chartTypeStore(){return this.mainStore.chartType}get timeperiodStore(){return this.mainStore.timeperiod}get loader(){return this.mainStore.loader}get rootElement(){return this.chartStore.rootElement}constructor(t){ee(this,"chartStore",void 0),ee(this,"getIndicatorHeightRatio",void 0),ee(this,"shouldDrawTicksFromContractInfo",!1),ee(this,"has_updated_settings",!1),ee(this,"isAnimationEnabled",void 0),ee(this,"isVerticalScrollEnabled",!0),ee(this,"mainStore",void 0),ee(this,"margin",void 0),ee(this,"granularity",void 0),ee(this,"chartType",void 0),ee(this,"startEpoch",void 0),ee(this,"endEpoch",void 0),ee(this,"symbol",void 0),ee(this,"heightFactor",void 0),ee(this,"isConnectionOpened",!1),ee(this,"isChartReady",!1),ee(this,"chartStatusListener",void 0),ee(this,"stateChangeListener",void 0),ee(this,"settings",void 0),ee(this,"showLastDigitStats",!1),ee(this,"scrollToEpoch",void 0),ee(this,"clearChart",void 0),ee(this,"isChartClosed",!1),ee(this,"shouldMinimiseLastDigits",!1),ee(this,"allowTickChartTypeOnly",void 0),ee(this,"isStaticChart",!1),ee(this,"shouldFetchTradingTimes",!0),ee(this,"shouldGetQuotes",!0),ee(this,"allTicks",[]),ee(this,"contractInfo",{}),ee(this,"refreshActiveSymbols",void 0),ee(this,"hasReachedEndOfData",!1),ee(this,"prevChartType",void 0),ee(this,"isChartScrollingToEpoch",!1),ee(this,"maxTick",void 0),ee(this,"enableScroll",!0),ee(this,"enableZoom",!0),ee(this,"yAxisMargin",{top:106,bottom:64}),ee(this,"tradingTimes",null),ee(this,"activeSymbols",null),ee(this,"masterData",null),ee(this,"getQuotes",void 0),ee(this,"chartControlsWidgets",void 0),ee(this,"enabledChartFooter",void 0),ee(this,"onContextReady",()=>{this.granularity=this.chartStore.granularity}),ee(this,"debouncedStateChange",(0,d.s)((t,e)=>{this.stateChange(t,e)},500)),(0,s.makeObservable)(this,{granularity:s.observable,chartType:s.observable,startEpoch:s.observable,endEpoch:s.observable,symbol:s.observable,has_updated_settings:s.observable,heightFactor:s.observable,isConnectionOpened:s.observable,isChartReady:s.observable,isVerticalScrollEnabled:s.observable,chartStatusListener:s.observable,debouncedStateChange:s.action.bound,stateChangeListener:s.observable,settings:s.observable,showLastDigitStats:s.observable,allowTickChartTypeOnly:s.observable,scrollToEpoch:s.observable,clearChart:s.observable,isChartClosed:s.observable,shouldMinimiseLastDigits:s.observable,isStaticChart:s.observable,shouldFetchTradingTimes:s.observable,shouldGetQuotes:s.observable,allTicks:s.observable,contractInfo:s.observable,refreshActiveSymbols:s.observable,shouldDrawTicksFromContractInfo:s.observable,hasReachedEndOfData:s.observable,prevChartType:s.observable,isChartScrollingToEpoch:s.observable,maxTick:s.observable,enableScroll:s.observable,enableZoom:s.observable,yAxisMargin:s.observable,updateProps:s.action.bound,setChartIsReady:s.action.bound,setChartClosed:s.action.bound}),this.mainStore=t,this.chartStore=t.chart,(0,s.when)(()=>!!this.context,this.onContextReady),window.addEventListener("beforeunload",()=>{this.saveLayout()}),(0,s.reaction)(()=>this.allowTickChartTypeOnly,t=>{t&&(this.mainStore.studies.savePredictionStudies(),this.mainStore.studies.deletePredictionStudies())})}updateProps({networkStatus:t,chartControlsWidgets:e,enabledChartFooter:r,chartStatusListener:i,shouldDrawTicksFromContractInfo:a,stateChangeListener:s,getIndicatorHeightRatio:n,chartType:o,clearChart:h,endEpoch:u,isAnimationEnabled:d=!0,isConnectionOpened:g,isStaticChart:m,isVerticalScrollEnabled:p=!0,granularity:f,margin:_=0,refreshActiveSymbols:b,scrollToEpoch:v,settings:y,shouldFetchTradingTimes:S=!0,shouldGetQuotes:x=!0,should_zoom_out_on_yaxis:w,allTicks:C=[],contractInfo:T={},showLastDigitStats:k=!1,allowTickChartTypeOnly:j=!1,startEpoch:N,symbol:E,zoom:A,maxTick:I,yAxisMargin:D,enableScroll:O=null,enableZoom:P=null,anchorChartToLeft:L=!1,chartData:M,isLive:B,startWithDataFitMode:F,leftMargin:V,drawingToolFloatingMenuPosition:H}){let $=!1,U=!1;if(M?.tradingTimes&&"object"==typeof M.tradingTimes&&JSON.stringify(M.tradingTimes)!==this.tradingTimes&&(this.mainStore.chart.tradingTimes?._calculatingTradingTime(M.tradingTimes),this.tradingTimes=JSON.stringify(M.tradingTimes)),M?.activeSymbols&&"object"==typeof M.activeSymbols&&JSON.stringify(M.activeSymbols)!==this.activeSymbols&&(this.activeSymbols=JSON.stringify(M.activeSymbols),this.mainStore.chart.processedSymbols&&M?.activeSymbols)){this.mainStore.chart.processedSymbols=R(M.activeSymbols),this.mainStore.chart.categorizedSymbols=q(this.mainStore.chart.processedSymbols),this.mainStore.chart.symbolMap={};for(const t of this.mainStore.chart.processedSymbols)this.mainStore.chart.symbolMap[t.symbol]=t}M?.masterData&&Array.isArray(M.masterData)&&JSON.stringify(M.masterData)!==this.masterData&&(this.masterData=JSON.stringify(M.masterData),this.mainStore.chart.feed&&(this.mainStore.chart.feed.updateQuotes(M.masterData,!1),this.shouldGetQuotes=!1)),this.chartStatusListener=i,this.stateChangeListener=s,this.isAnimationEnabled=d,this.isConnectionOpened=g,this.isStaticChart=m,this.isVerticalScrollEnabled=p,this.margin=_,this.has_updated_settings=!Yt(this.settings?.whitespace,y?.whitespace),this.settings=y,this.shouldFetchTradingTimes=S,this.shouldGetQuotes=x,this.allowTickChartTypeOnly=j,this.allTicks=C,this.contractInfo=T,this.showLastDigitStats=k,this.getIndicatorHeightRatio=n;const z=this.mainStore.chart.feed;if(a&&z&&T.tick_stream&&(this.shouldDrawTicksFromContractInfo=a,z.appendChartDataFromPOCResponse.call(z,T)),!t||this.mainStore.chart.networkStatus&&t.class===this.mainStore.chart.networkStatus.class||(this.mainStore.chart.networkStatus=t),e!==this.chartControlsWidgets&&(this.chartControlsWidgets=e),r!==this.enabledChartFooter&&(this.enabledChartFooter=r),E!==this.symbol&&(this.symbol=E,$=!0,M?.tradingTimes&&"object"==typeof M.tradingTimes&&(this.mainStore.chart.tradingTimes?._calculatingTradingTime(M.tradingTimes),this.tradingTimes=JSON.stringify(M.tradingTimes)),this.mainStore.chartTitle.hidePrice()),o&&o!==this.chartType&&("table"===o&&(this.prevChartType=this.chartTypeStore.type.id),this.setChartType(o)),void 0!==f&&f!==this.granularity&&(this.setChartGranularity(f),U=!0),b!==this.refreshActiveSymbols&&(this.refreshActiveSymbols=b,this.refreshActiveSymbols&&M?.activeSymbols)){const t=R(M.activeSymbols);this.mainStore.chart.processedSymbols=t,this.mainStore.chart.categorizedSymbols=q(t),this.mainStore.chart.symbolMap={};for(const e of t)this.mainStore.chart.symbolMap[e.symbol]=e}if(h!==this.clearChart&&(this.clearChart=h,this.cleanChart()),this.startEpoch===N&&this.endEpoch===u||(this.startEpoch=N,this.endEpoch=u,m&&this.granularity===this.mainStore.chart.granularity?this.mainStore.chart.newChart():this.mainStore.chart.feed&&(this.scrollToEpoch||$||U||this.mainStore.chart.feed.onRangeChanged())),m||v===this.scrollToEpoch||(this.scrollToEpoch=v,this.mainStore.chart&&this.mainStore.chart.feed&&!$&&!U&&(this.setIsChartScrollingToEpoch(!0),L?setTimeout(()=>this.stateChange(l.c4.SCROLL_TO_LEFT),900):this.stateChange(l.c4.SCROLL_TO_LEFT))),A&&(1===A?this.mainStore.chartSize.zoomIn():this.mainStore.chartSize.zoomOut()),this.mainStore.chartSetting.setSettings(this.settings),I&&this.maxTick!==I&&(this.maxTick=I),D&&"object"==typeof D&&(this.yAxisMargin={...this.yAxisMargin,...D}),w){const{height_factor:t,yaxis_margin:e}=(0,c._z)({is_contract_chart:a,is_mobile:this.mainStore.chart.isMobile,ticks_length:this.mainStore.chart.feed?.quotes.length,yaxis_height:this.mainStore.chart.chartContainerHeight});this.yAxisMargin={...this.yAxisMargin,...e},this.heightFactor=t}null!==O&&this.enableScroll!==O&&(this.enableScroll=O),null!==P&&this.enableZoom!==P&&(this.enableZoom=P),null!=B&&this.mainStore.chart.isLive!==B&&(this.mainStore.chart.isLive=B,this.mainStore.chartAdapter.updateLiveStatus(B)),null!=F&&this.mainStore.chart.startWithDataFitMode!==F&&(this.mainStore.chart.startWithDataFitMode=F),this.mainStore.chart.leftMargin!==V&&(this.mainStore.chart.leftMargin=V,this.mainStore.chartAdapter.updateLeftMargin(V)),this.mainStore.drawTools.updateProps({drawingToolFloatingMenuPosition:H})}setIsChartScrollingToEpoch(t){this.isChartScrollingToEpoch=t}setChartClosed(t){this.isChartClosed=t,this.stateChange(l.c4.MARKET_STATE_CHANGE,{symbol:this.symbol,isClosed:t})}setChartTheme(t){this.rootElement&&((this.rootElement?.querySelector(".chartContainer")).style.backgroundColor=te()[`${t}_chart_bg`])}stateChange(t,e){this.stateChangeListener&&"function"==typeof this.stateChangeListener&&this.stateChangeListener(t,e)}setChartIsReady(t){this.isChartReady!==t&&(this.isChartReady=t,t&&(this.chartStore.setResizeEvent(),this.stateChange(l.c4.READY)),this.chartStatusListener&&"function"==typeof this.chartStatusListener&&this.chartStatusListener(t))}setChartGranularity(t){const e="second"===(0,c.pg)(t).timeUnit,r=this.mainStore.chartType.isCandle||this.chartType&&this.mainStore.chartType.isTypeCandle(this.chartType);this.mainStore.chartAdapter.setMsPerPx(void 0),this.context&&e&&r&&this.setChartType("line"),this.granularity=null===t?void 0:t}setChartType(t){this.chartType=t,this.chartType&&this.mainStore.chartAdapter.updateChartStyle(this.chartType),this.chartTypeStore.onChartTypeChanged&&this.chartTypeStore.onChartTypeChanged(t)}setShouldMinimiseLastDigit(t){this.shouldMinimiseLastDigits=t}async saveLayout(){if(!this.chartStore.chartId)return;const t=this.mainStore.view.getLayout(),e=this.mainStore.chart.chartId,r=(await ie()).compress(JSON.stringify({studyItems:t.studyItems,msPerPx:t.msPerPx}));(0,c.lk)(`chart-layout-${e}`,r)}async restoreLayout(){const t=this.mainStore.chart.chartId,e=(0,c.s0)(`chart-layout-${t}`);let r=null;try{const t=await ie();r=JSON.parse(t.decompress(e??"")||"")}catch(t){r=e}return r?(this.mainStore.view.restoreLayout(r),!0):(this.clearLayout(),!1)}clearLayout(){window.flutterChart?.indicators.clearIndicators(),window.flutterChart?.drawingTool.clearDrawingTool()}async saveDrawings(){if(!this.chartStore.chartId)return;const t=this.mainStore.view.getLayout(),e=this.mainStore.chart.chartId,r=(await ie()).compress(JSON.stringify({studyItems:t.studyItems,msPerPx:t.msPerPx}));(0,c.lk)(`chart-layout-${e}`,r)}cleanChart(){this.clearChart&&this.isChartReady&&this.mainStore.studies.deleteAllStudies()}};var se=r(9160).t;function ne(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class oe{constructor(){ne(this,"onMessage",void 0)}static get CATEGORY_ACTIVE_SYMBOL(){return"activesymbol"}notify(t){this.onMessage&&this.onMessage({type:"warning",...t})}notifyMarketOpen(t){this.notify({text:se.translate("[symbol] market is now opened.",{symbol:t}),type:"info",category:oe.CATEGORY_ACTIVE_SYMBOL})}notifyMarketClose(t){this.notify({text:se.translate("[symbol] market is presently closed.",{symbol:t}),category:oe.CATEGORY_ACTIVE_SYMBOL})}notifyDelayedMarket(t,e){this.notify({text:se.translate("[symbol] feed is delayed by [delay] minutes",{symbol:t,delay:e}),category:oe.CATEGORY_ACTIVE_SYMBOL})}notifyFeedUnavailable(t){this.notify({text:se.translate("Streaming for [symbol] is not available due to license restrictions",{symbol:t}),type:"error",category:oe.CATEGORY_ACTIVE_SYMBOL})}}const le=oe;function ce(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class he{constructor(t){ce(this,"mainStore",void 0),ce(this,"bars",[]),ce(this,"lastTick",null),ce(this,"count",1e3),ce(this,"digits",[]),ce(this,"latestData",[]),ce(this,"lastSymbol",""),(0,s.makeObservable)(this,{bars:s.observable,lastTick:s.observable,decimalPlaces:s.computed,isVisible:s.computed,marketDisplayName:s.computed,shouldMinimiseLastDigits:s.computed,updateLastDigitStats:s.action.bound,onMasterDataUpdate:s.action.bound,updateBars:s.action.bound}),this.mainStore=t,(0,s.when)(()=>!!this.context,()=>{this.lastSymbol=this.marketDisplayName,this.mainStore.chart.feed?.onMasterDataUpdate(this.onMasterDataUpdate),this.mainStore.chart.feed?.onMasterDataReinitialize(()=>{this.context&&this.mainStore.chart.feed&&(this.mainStore.chart.feed.offMasterDataUpdate(this.onMasterDataUpdate),this.mainStore.chart.feed.onMasterDataUpdate(this.onMasterDataUpdate))})})}get context(){return this.mainStore.chart.context}get api(){return this.mainStore.chart.api}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places||2}get isVisible(){return this.mainStore.state.showLastDigitStats}get marketDisplayName(){return this.mainStore.chart.currentActiveSymbol?this.mainStore.chart.currentActiveSymbol.name:""}get shouldMinimiseLastDigits(){return this.mainStore.state.shouldMinimiseLastDigits}async updateLastDigitStats(t){if(!this.context||!this.mainStore.chart.currentActiveSymbol)return;this.digits=[],this.bars=[],this.latestData=[];for(let t=0;t<10;t++)this.digits.push(0),this.bars.push({height:0,cName:""});const e=t||await(this.api?.getQuotes({symbol:this.mainStore.chart.currentActiveSymbol.symbol,count:this.count}));this.latestData=e?.history?.prices?e.history.prices:[],this.context&&this.mainStore.chart.currentActiveSymbol&&(this.latestData.forEach(t=>{const e=(+t).toFixed(this.decimalPlaces).slice(-1);this.digits[+e]++}),this.updateBars())}onMasterDataUpdate({Close:t,tick:e}){if(this.context&&this.mainStore.chart.currentActiveSymbol&&this.mainStore.lastDigitStats.isVisible)if(this.lastTick=e,this.marketDisplayName!==this.lastSymbol)this.lastSymbol=this.marketDisplayName,this.updateLastDigitStats();else if(this.latestData.length){const e=(+this.latestData.shift()).toFixed(this.decimalPlaces).slice(-1),r=(+t).toFixed(this.decimalPlaces),i=r.slice(-1);this.latestData.push(+r),this.digits[+i]++,this.digits[+e]--,this.updateBars()}}updateBars(){const t=Math.min(...this.digits),e=Math.max(...this.digits);this.digits.forEach((r,i)=>{this.bars[i].height=100*r/this.count,this.bars[i].cName=r===t?"min":r===e?"max":""}),this.bars=this.bars.slice(0)}}function ue(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class de{get chart(){return this.mainStore.chart}get stateStore(){return this.mainStore.state}get crosshairStore(){return this.mainStore.crosshair}constructor(t){ue(this,"mainStore",void 0),ue(this,"mouse_in",!1),(0,s.makeObservable)(this,{mouse_in:s.observable,enableScale:s.computed,onMouseEnter:s.action.bound,onMouseLeave:s.action.bound}),this.mainStore=t}get enableScale(){return this.stateStore.startEpoch}onMouseEnter(){this.mouse_in=!0,this.crosshairStore.setTemporaryDisabled(!0)}onMouseLeave(){this.mouse_in=!1,this.crosshairStore.setTemporaryDisabled(!1)}}function ge(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const me=class{get feed(){return this.mainStore.chart.feed}get context(){return this.mainStore.chart.context}get isHighestLowestMarkerEnabled(){return this.mainStore.chartSetting.isHighestLowestMarkerEnabled}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places||2}constructor(t){ge(this,"highestRef",null),ge(this,"lowestRef",null),ge(this,"mainStore",void 0),ge(this,"highest",null),ge(this,"lowest",null),ge(this,"setHighestRef",t=>{this.highestRef=t,null!==this.highestRef&&null!==t&&(this.highestRef.value=t.div.querySelector(".spot__value"))}),ge(this,"setLowestRef",t=>{this.lowestRef=t,null!=this.lowestRef&&null!==t&&(this.lowestRef.value=t.div.querySelector(".spot__value"))}),ge(this,"calculateHighestLowestByNewData",()=>{if(!this.highestRef||!this.lowestRef)return;const t=this.mainStore.chart.feed?.quotes;if(t&&t.length&&(this.highest=null,this.lowest=null,t.forEach(t=>{t&&((!this.highest||this.highest.Close<=t.Close)&&(this.highest=t),(!this.lowest||this.lowest.Close>=t.Close)&&(this.lowest=t))})),!this.highest||!this.lowest||this.highest.Close===this.lowest.Close)return this.highestRef.setPosition({epoch:null,price:null}),void this.lowestRef.setPosition({epoch:null,price:null});if(this.highest){const t=this.highest.Close.toFixed(this.decimalPlaces);this.highestRef.setPosition({epoch:(0,c.YN)((0,G.E)(this.highest.Date)),price:+t}),this.highestRef.value.textContent=t}if(this.lowest){const t=this.lowest.Close.toFixed(this.decimalPlaces);this.lowestRef.setPosition({epoch:(0,c.YN)((0,G.E)(this.lowest.Date)),price:+t}),this.lowestRef.value.textContent=t}}),this.mainStore=t}};function pe(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const fe=class{get feed(){return this.mainStore.chart.feed}get context(){return this.mainStore.chart.context}constructor(t){pe(this,"mainStore",void 0),pe(this,"ref",null),pe(this,"isOnPagination",!1),pe(this,"paginationEndEpoch",null),pe(this,"onContextReady",()=>{this.feed?.onStartPagination(this.setOnPagination),this.feed?.onPagination(this.setOnPagination)}),pe(this,"setRef",t=>{this.ref=t,null!==this.ref&&this.ref.setPosition({epoch:this.paginationEndEpoch,price:0})}),pe(this,"setOnPagination",({end:t})=>{this.isOnPagination=!this.isOnPagination,this.paginationEndEpoch=this.isOnPagination?t:null,this.ref&&this.ref.setPosition({epoch:this.paginationEndEpoch,price:0})}),(0,s.makeObservable)(this,{isOnPagination:s.observable,updateOnPagination:s.action.bound,setOnPagination:s.action.bound}),this.mainStore=t,(0,s.when)(()=>!!this.context,this.onContextReady)}updateOnPagination(t){this.isOnPagination=t}};function _e(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class be{get crosshairStore(){return this.mainStore.crosshair}get chartStore(){return this.mainStore.chart}constructor(t){_e(this,"mainStore",void 0),(0,s.makeObservable)(this,{onMouseEnter:s.action.bound,onMouseLeave:s.action.bound}),this.mainStore=t,(0,s.reaction)(()=>[this.mainStore.chartMode.menuStore.open,this.mainStore.drawTools.menuStore.open,this.mainStore.studies.menuStore.open,this.mainStore.share.menuStore.open,this.mainStore.view.menuStore.open],()=>{this.mainStore.chartMode.menuStore.open||this.mainStore.drawTools.menuStore.open||this.mainStore.studies.menuStore.open||this.mainStore.share.menuStore.open||this.mainStore.view.menuStore.open||this.onMouseLeave()})}onMouseEnter(){this.crosshairStore.setTemporaryDisabled(!0)}onMouseLeave(){this.crosshairStore.setTemporaryDisabled(!1)}}function ve(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ye{constructor(){ve(this,"isHover",!1),ve(this,"scrollPanel",void 0),(0,s.makeObservable)(this,{isHover:s.observable,scrollPanel:s.observable,handleMouseOver:s.action.bound,handleMouseOut:s.action.bound,setScrollPanel:s.action.bound}),(0,s.reaction)(()=>this.scrollPanel,()=>{this.scrollPanel&&(this.scrollPanel.addEventListener("mouseover",this.handleMouseOver),this.scrollPanel.addEventListener("mouseout",this.handleMouseOut))})}handleMouseOver(){this.isHover||(this.isHover=!0)}handleMouseOut(){this.isHover&&(this.isHover=!1)}setScrollPanel(t){this.scrollPanel||(this.scrollPanel=t)}}const Se=()=>{const t=t=>{t.key&&t.code||t.stopImmediatePropagation()};window.addEventListener("keydown",t,!0),window.addEventListener("keyup",t,!0)},xe=()=>{window._flutter.initState.isMounted&&(window._flutter.appRunner?.runApp(),window._flutter.initState.isInitialRunCompleted=!0)};function we(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Ce{constructor(){we(this,"callbacks",[]),we(this,"_lerpedClose",null),we(this,"onPaint",(t,e)=>{this._lerpedClose=e??null,this.callbacks.forEach(e=>{e(t)})}),we(this,"registerCallback",t=>{this.callbacks.push(t)}),we(this,"unregisterCallback",t=>{const e=this.callbacks.findIndex(e=>e===t);-1!==e&&this.callbacks.splice(e,1)})}get lerpedClose(){return this._lerpedClose}}function Te(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ke{constructor(t){Te(this,"mainStore",void 0),Te(this,"isChartLoaded",!1),Te(this,"flutterChart",void 0),Te(this,"epochBounds",{leftEpoch:0,rightEpoch:0}),Te(this,"quoteBounds",{topQuote:0,bottomQuote:0}),Te(this,"isFeedLoaded",!1),Te(this,"msPerPx",void 0),Te(this,"isDataFitModeEnabled",!1),Te(this,"isXScrollBlocked",!1),Te(this,"painter",new Ce),Te(this,"drawingColor",0),Te(this,"isScaled",!1),Te(this,"touchValues",{multiTouch:!1,deltaXTotal:0,deltaYTotal:0,touchIds:[],x:0,y:0}),Te(this,"isOverFlutterCharts",!1),Te(this,"clearTouchDeltasTimer",void 0),Te(this,"enableXScrollTimer",void 0),Te(this,"enableYScrollTimer",void 0),Te(this,"checkIndicatorHover",(t,e,r)=>{const i=this.mainStore.chart.feed?.getClosestValidEpoch,a=this.mainStore.chartAdapter.getGranularityInMs(),s=this.flutterChart?.app.getIndicatorHoverIndex(t,e,i,a,r);this.isScaled?this.isScaled=!1:this.mainStore.studies.highlightIndicator(s)}),Te(this,"debouncedIndicatorHover",(0,d.s)(this.checkIndicatorHover,5)),Te(this,"onWheel",t=>{t.preventDefault(),t.stopPropagation();const e=this.mainStore.chart.chartNode;if(e&&!this.mainStore.state.isVerticalScrollEnabled){const r=e.offsetWidth-this.mainStore.chart.yAxisWidth,{left:i}=e.getBoundingClientRect(),a=t.deltaY&&0===t.deltaX;if(t.pageX-i<r&&a){if(this.enableYScrollTimer)return;return e.style.pointerEvents="none",void(this.enableYScrollTimer=setTimeout(()=>{e.style.pointerEvents="auto",this.enableYScrollTimer=void 0},300))}}if(0===t.deltaX&&0===t.deltaZ){const e=(100-Math.min(10,Math.max(-10,t.deltaY)))/100;this.scale(e)}else window.flutterChart?.app.scroll(t.deltaX);return!1}),Te(this,"onMouseMove",t=>{this.isOverFlutterCharts="flt-glass-pane"===t.target?.tagName?.toLowerCase()}),Te(this,"onDoubleClick",()=>{null!=this.mainStore.studies.currentHoverIndex&&(this.mainStore.studies.editStudyByIndex(this.mainStore.studies.currentHoverIndex),this.mainStore.studies.clearHoverItem(this.mainStore.studies.currentHoverIndex))}),Te(this,"newChart",async()=>{this.isFeedLoaded=!1,this.isDataFitModeEnabled=this.mainStore.chart.startWithDataFitMode||!1,await(0,s.when)(()=>this.isChartLoaded),this.flutterChart?.app.newChart({symbol:this.mainStore.chart.currentActiveSymbol?.symbol,granularity:this.getGranularityInMs(),chartType:this.mainStore.state.chartType,isLive:this.mainStore.chart.isLive||!1,startWithDataFitMode:this.isDataFitModeEnabled,theme:this.mainStore.chartSetting.theme,msPerPx:this.msPerPx,pipSize:this.mainStore.chart.pip,isMobile:this.mainStore.chart.isMobile||!1,isSmoothChartEnabled:this.mainStore.chartSetting.isSmoothChartEnabled,yAxisMargin:this.mainStore.state.yAxisMargin})}),Te(this,"toggleXScrollBlock",(t=!0,e)=>{this.isXScrollBlocked=t,e&&(t?(e.style.overflowY="scroll",e.style.overflowX="hidden",e.style.overscrollBehavior="contain",e.style.touchAction="pan-y"):this.allowScroll(e))}),Te(this,"allowScroll",t=>{let e,r=t.scrollTop,i=!1;const a=()=>{t.scrollTop!==r?(i=!0,r=t.scrollTop,clearTimeout(e),e=setTimeout(()=>{this.stopScroll(t)},200)):i=!1,i&&requestAnimationFrame(a)};requestAnimationFrame(a)}),Te(this,"stopScroll",t=>{t.style.removeProperty("overflow-y"),t.style.removeProperty("overflow-x"),t.style.removeProperty("touch-action")}),Te(this,"toggleDataFitMode",()=>{this.isDataFitModeEnabled=!this.isDataFitModeEnabled,window.flutterChart?.app.toggleDataFitMode(this.isDataFitModeEnabled)}),Te(this,"getInterpolatedPositionAndPrice",t=>{if(!t)return;const e=N.utc(t).toDate(),r=this.mainStore.chart.feed?.getClosestQuoteIndexForEpoch(t);let i=this.getXFromEpoch(t);if("number"==typeof r&&r>-1){const t=this.mainStore.chart.feed?.quotes[r];let a,s,n,o=t?t.Close:null;if(t&&t.DT<e){const l=this.mainStore.chart.feed?.quotes[r+1],c=r>0?this.mainStore.chart.feed?.quotes[r-1]:null;l&&l.Close&&l.DT>e?(a=this.getXFromEpoch(l.DT.getTime())-i,n=(e-t.DT.getTime())/(l.DT.getTime()-t.DT.getTime()),o&&(s=l.Close-o)):c&&c.Close&&(a=i-this.getXFromEpoch(c.DT.getTime()),n=(e-t.DT.getTime())/(t.DT.getTime()-c.DT.getTime()),o&&(s=o-c.Close))}return n&&(a&&(i+=n*a),o&&s&&(o+=n*s)),{x:i,price:o}}}),(0,s.makeObservable)(this,{clearTouchDeltasTimer:s.observable,onMount:s.action.bound,onTickHistory:s.action.bound,onTouch:s.action.bound,onChartLoad:s.action.bound,onTick:s.action.bound,loadHistory:s.action.bound,onVisibleAreaChanged:s.action.bound,onQuoteAreaChanged:s.action.bound,setMsPerPx:s.action.bound,newChart:s.action.bound,enableXScrollTimer:s.observable,enableYScrollTimer:s.observable,scale:s.action.bound,scrollableChartParent:s.computed,toggleDataFitMode:s.action.bound,toggleXScrollBlock:s.action.bound,touchValues:s.observable,isDataFitModeEnabled:s.observable,isChartLoaded:s.observable,epochBounds:s.observable.ref,quoteBounds:s.observable.ref,msPerPx:s.observable,isFeedLoaded:s.observable,cleanChart:s.action.bound}),this.mainStore=t,this.cleanChart(),this.initFlutterCharts()}initFlutterCharts(){window.jsInterop={onChartLoad:this.onChartLoad,onMainSeriesPaint:this.painter.onPaint,onVisibleAreaChanged:this.onVisibleAreaChanged,onQuoteAreaChanged:this.onQuoteAreaChanged,loadHistory:this.loadHistory,indicators:{onRemove:t=>{this.mainStore.studies.deleteStudy(t)},onEdit:t=>{this.mainStore.studies.editStudyByIndex(t)},onSwap:(t,e)=>{const{activeItems:r}=this.mainStore.studies;[r[t],r[e]]=[r[e],r[t]]}},drawingTool:{onUpdate:()=>{this.mainStore.drawTools.onUpdate()},onLoad:t=>{this.mainStore.drawTools.onLoad(t)},onToolAdded:t=>{const e=JSON.parse(t);this.mainStore.drawTools.onToolAdded(e)},onRemove:(t,e)=>{this.mainStore.state.stateChange(l.c4.DRAWING_TOOLS_DELETE,{drawing_tool_name:t.replace("dt_","")||"unknown",pxthickness:e?`${JSON.parse(e).lineStyle?.thickness}px`:void 0,color_name:e?`${(0,ft.Fh)(Number(JSON.parse(e).lineStyle?.color)).replace("#","")}`:void 0}),this.mainStore.drawTools.showDeletionSnackbarForDeletedTool(t)},onStateChanged:(t,e)=>{this.mainStore.drawTools.updateAddingState(t,e)}}},(({onChartLoad:t})=>{if(window.flutterChartElement)return void t();Se();const e=document.createElement("div");e.classList.add("flutter-chart"),window.flutterChartElement=e,window._flutter={initState:{isInitialRunCompleted:!1,isEngineInitialized:!1,isMounted:!1}};const i=r.p,a=r.p+"chart/",s=async t=>{window._flutter.appRunner=await t.initializeEngine({assetBase:i,hostElement:window.flutterChartElement}),window._flutter.initState.isEngineInitialized=!0,xe()};r.e(776).then(r.t.bind(r,5371,23)).then(()=>{window._flutter.buildConfig||(window._flutter.buildConfig={builds:[{compileTarget:"dart2wasm",renderer:"skwasm",mainWasmPath:"main.dart.wasm",jsSupportRuntimePath:"main.dart.mjs"},{compileTarget:"dart2js",renderer:"canvaskit",mainJsPath:"main.dart.js"}]}),window._flutter.loader.load({onEntrypointLoaded:s,config:{entryPointBaseUrl:a,assetBase:i,canvasKitBaseUrl:a+"canvaskit",hostElement:window.flutterChartElement}})})})({onChartLoad:this.onChartLoad})}onMount(t){t.appendChild(window.flutterChartElement);const e=window._flutter.initState;e.isMounted=!0,e.isEngineInitialized&&!e.isInitialRunCompleted&&xe(),window.flutterChartElement?.addEventListener("wheel",this.onWheel,{capture:!0}),window.flutterChartElement?.addEventListener("touchstart",this.onTouch,{capture:!0}),window.flutterChartElement?.addEventListener("touchmove",this.onTouch,{capture:!0}),window.flutterChartElement?.addEventListener("touchend",this.onTouch,{capture:!0}),window.flutterChartElement?.addEventListener("dblclick",this.onDoubleClick,{capture:!0}),window.addEventListener("mousemove",this.onMouseMove,{capture:!0})}onUnmount(){window._flutter.initState.isMounted=!1,window.flutterChartElement?.removeEventListener("wheel",this.onWheel,{capture:!0}),window.flutterChartElement?.removeEventListener("touchstart",this.onTouch,{capture:!0}),window.flutterChartElement?.removeEventListener("touchmove",this.onTouch,{capture:!0}),window.flutterChartElement?.removeEventListener("touchend",this.onTouch,{capture:!0}),window.flutterChartElement?.removeEventListener("dblclick",this.onDoubleClick,{capture:!0}),window.removeEventListener("mousemove",this.onMouseMove,{capture:!0}),clearTimeout(this.clearTouchDeltasTimer),clearTimeout(this.enableXScrollTimer),clearTimeout(this.enableYScrollTimer)}onChartLoad(){this.flutterChart=window.flutterChart,this.isChartLoaded=!0}cleanChart(){window.flutterChartElement&&(this.updateLeftMargin(),this.setShowInterval(!1),this.setSymbolClosed(!1))}onTouch(t){const e=this.mainStore.chart.chartNode,r=document.querySelector(".flutter-chart");if(e&&this.scrollableChartParent&&!this.mainStore.state.isVerticalScrollEnabled){if(this.touchValues.multiTouch)return void("touchend"===t.type&&(this.touchValues.touchIds=this.touchValues.touchIds?.filter(e=>e===t.changedTouches[0].identifier),this.touchValues={multiTouch:!!this.touchValues.touchIds?.length}));if(t.touches.length>1)return this.touchValues={multiTouch:!0},void(this.touchValues.touchIds=Array.from(t.touches).map(t=>t.identifier));const{pageX:i,pageY:a}=t.changedTouches[0];if(["touchmove","touchend"].includes(t.type)){const s=e.offsetWidth-this.mainStore.chart.yAxisWidth,n=e.offsetHeight-this.mainStore.chart.xAxisHeight,{top:o,left:l}=e.getBoundingClientRect(),c=i-l,h=c<s&&a-o<n,u=c>=s;if(this.touchValues.x&&this.touchValues.y){const e=this.touchValues.x-i,s=this.touchValues.y-a,n=(this.touchValues.deltaXTotal??0)+e,o=(this.touchValues.deltaYTotal??0)+s,l="touchend"===t.type?Math.abs(n):Math.abs(e),c=("touchend"===t.type?Math.abs(o):Math.abs(s))>l;this.touchValues={...this.touchValues,deltaXTotal:n,deltaYTotal:o},h&&c?this.isXScrollBlocked||this.toggleXScrollBlock(!0,r):!this.isXScrollBlocked&&u&&this.stopScroll(r)}this.touchValues={...this.touchValues,x:i,y:a},"touchend"===t.type&&this.isXScrollBlocked&&(this.enableXScrollTimer=setTimeout(()=>{this.toggleXScrollBlock(!1,r)},100))}["touchstart","touchend"].includes(t.type)&&(this.touchValues="touchstart"===t.type?{x:i,y:a}:{deltaYTotal:this.touchValues.deltaYTotal,deltaXTotal:this.touchValues.deltaXTotal})}}onVisibleAreaChanged(t,e){this.epochBounds.leftEpoch===t&&this.epochBounds.rightEpoch===e||(this.epochBounds={leftEpoch:t,rightEpoch:e})}onQuoteAreaChanged(t,e){this.quoteBounds={topQuote:t,bottomQuote:e}}getGranularityInMs(){return 1e3*(this.mainStore.state.granularity||1)}async onTickHistory(t){this.isFeedLoaded=!0,await(0,s.when)(()=>this.isChartLoaded),this.mainStore.chart.feed?.updateQuotes(t,!1),this.flutterChart?.feed.onTickHistory(t,!1)}async onTick(t){await(0,s.when)(()=>this.isChartLoaded);const e=this.mainStore.chart.feed?.quotes[this.mainStore.chart.feed?.quotes.length-1];e&&new Date(e.Date)>new Date(t.Date)||(this.mainStore.chart.feed?.addQuote(t),(0,s.runInAction)(()=>{this.mainStore.chart.lastQuote=t}),t.ohlc?this.flutterChart?.feed.onNewCandle(t):this.getGranularityInMs()<6e4&&this.flutterChart?.feed.onNewTick(t))}loadHistory(t){const{count:e,end:r}=t,{state:i,chart:a}=this.mainStore,{granularity:s}=i;a.feed?.fetchPaginationData(a.currentActiveSymbol?.symbol,r,e,s,({quotes:t})=>{this.mainStore.chart.feed?.updateQuotes(t||[],!0),this.flutterChart?.feed.onTickHistory(t||[],!0)})}updateChartStyle(t){this.flutterChart?.config.updateChartStyle(t)}async updateTheme(t){await(0,s.when)(()=>this.isChartLoaded),this.flutterChart?.config.updateTheme(t)}async updateLeftMargin(t){await(0,s.when)(()=>this.isChartLoaded),void 0!==t&&this.flutterChart?.config.updateLeftMargin(t)}async updateLiveStatus(t){await(0,s.when)(()=>this.isChartLoaded),this.flutterChart?.config.updateLiveStatus(t)}async setSymbolClosed(t){await(0,s.when)(()=>this.isChartLoaded),this.flutterChart?.config.setSymbolClosed(t)}async updateRightPadding(t){await(0,s.when)(()=>this.isChartLoaded),void 0!==t&&this.flutterChart?.config.updateRightPadding(t)}async setShowInterval(t){await(0,s.when)(()=>this.isChartLoaded),this.flutterChart?.config.toggleTimeIntervalVisibility(t)}scale(t){null!==this.mainStore.studies.currentHoverIndex&&(this.isScaled=!0),this.isDataFitModeEnabled=!1;const e=this.flutterChart?.app.scale(t);null!=e&&this.setMsPerPx(e)}async updateContracts(t){const e=t.filter(t=>t.markers?.length>0).map(t=>(t.markers.forEach(t=>{if(!t.quote){const{price:e}=this.getInterpolatedPositionAndPrice(1e3*t.epoch)||{};t.quote=e}}),t));await(0,s.when)(()=>this.isFeedLoaded),this.flutterChart?.config.updateContracts(e)}setMsPerPx(t){this.msPerPx=t,this.mainStore.state.saveLayout()}getXFromEpoch(t){return this.flutterChart?.app.getXFromEpoch(t)??0}getYFromQuote(t){return this.flutterChart?.app.getYFromQuote(t)??0}getEpochFromX(t){return this.flutterChart?.app.getEpochFromX(t)??0}getQuoteFromY(t){return this.flutterChart?.app.getQuoteFromY(t)??0}get scrollableChartParent(){const t=this.mainStore.chart.chartNode;if(!t)return;let e=t.parentElement;for(;e;){const{overflow:t}=window.getComputedStyle(e);if(t.split(" ").every(t=>"auto"===t||"scroll"===t))return e;e=e.parentElement}return document.documentElement}}function je(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Ne{constructor(){je(this,"notifier",new le),je(this,"favorites",Ut.A.getInstance()),je(this,"chart",new nt(this)),je(this,"state",new ae(this)),je(this,"chartAdapter",new ke(this)),je(this,"chartType",new gt(this)),je(this,"chartMode",new pt(this)),je(this,"studies",new yt(this)),je(this,"drawTools",new xt(this)),je(this,"chartTitle",new At(this)),je(this,"timeperiod",new w(this)),je(this,"view",new Dt(this)),je(this,"crosshair",new Lt(this)),je(this,"share",new Rt(this)),je(this,"chartSetting",new Vt(this)),je(this,"loader",new qt),je(this,"chartSize",new Gt(this)),je(this,"routing",new Qt(this)),je(this,"lastDigitStats",new he(this)),je(this,"bottomWidgetsContainer",new o(this)),je(this,"navigationWidget",new de(this)),je(this,"highestLowest",new me(this)),je(this,"paginationLoader",new fe(this)),je(this,"toolbarWidget",new be(this)),je(this,"scroll",new ye)}}let Ee;const Ae=()=>{const t=new Ne;Ee=a().createContext(t)},Ie=()=>Ee,De=()=>a().useContext(Ee)},5877(t,e,r){"use strict";function i(t=null){let e,r;const i=new Promise((t,i)=>{e=t,r=i});return i.resolve=t=>{i.isPending=!1,e(t)},i.reject=t=>{i.isPending=!1,r(t)},i.data=t,i}r.d(e,{A:()=>i})},6039(t,e,r){"use strict";r.d(e,{A:()=>l});var i=r(8825),a=r(1993),s=r(5877);function n(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class o{constructor(){n(this,"_api",void 0),n(this,"clientTimeAtRequest",void 0),n(this,"getTimeInterval",void 0),n(this,"onTimeUpdated",void 0),n(this,"serverTimeAtResponse",void 0),n(this,"updateTimeInterval",void 0),n(this,"clockStarted",!1),n(this,"clockStartedPromise",(0,s.A)()),n(this,"_timeResponse",t=>{if(!this.clockStarted)return void this.init();const e=t.time,r=(0,a.YN)(new Date);e&&this.clientTimeAtRequest&&(this.serverTimeAtResponse=e+(r-this.clientTimeAtRequest)/2);this.updateTimeInterval&&clearInterval(this.updateTimeInterval),this.updateTimeInterval=setInterval(()=>{this.serverTimeAtResponse&&(this.serverTimeAtResponse+=1),"function"==typeof this.onTimeUpdated&&this.onTimeUpdated()},1e3)})}async init(t,e){if(this._api=t,this.onTimeUpdated=e,this.clockStarted)return this.clockStartedPromise;this.clockStarted=!0,this.getTimeInterval&&clearInterval(this.getTimeInterval),await this.requestTime(),this.getTimeInterval=setInterval(this.requestTime.bind(this),3e4)}async requestTime(){this.clientTimeAtRequest=(0,a.YN)(new Date),this._timeResponse({time:Math.floor((new Date).getTime()/1e3)}),this.clockStartedPromise.resolve()}getEpoch(){return this.serverTimeAtResponse?this.serverTimeAtResponse:(0,a.YN)(new Date)}getLocalDate(){return(0,a.sg)(this.getEpoch())}getUTCDate(){return(0,i.E)((0,a.Pu)(this.getEpoch()))}static getInstance(){return this._instance||(this._instance=new o),this._instance}}n(o,"_instance",void 0);const l=o},8825(t,e,r){"use strict";r.d(e,{E:()=>a});const i=new RegExp("\\d{17}"),a=t=>{if(!t||t.getFullYear)return t;var e,r,a,n,o,l,c,h=[];if(12==t.length||14==t.length)return e=parseFloat(t.substring(0,4)),r=parseFloat(t.substring(4,6))-1,a=parseFloat(t.substring(6,8)),n=parseFloat(t.substring(8,10)),o=parseFloat(t.substring(10,12)),l=parseFloat(t.substring(12,14))||0,new Date(e,r,a,n,o,l,0);if(i.test(t))return e=parseFloat(t.substring(0,4)),r=parseFloat(t.substring(4,6))-1,a=parseFloat(t.substring(6,8)),n=parseFloat(t.substring(8,10)),o=parseFloat(t.substring(10,12)),l=parseFloat(t.substring(12,14)),c=parseFloat(t.substring(14,17)),new Date(e,r,a,n,o,l,c);var u=[t],d=t.indexOf("T");if(-1!=d){var g=t.substring(d);if(-1!=g.indexOf("Z")||-1!=g.indexOf("-")||-1!=g.indexOf("+"))return new Date(t);u=t.split("T")}else-1!=t.indexOf(" ")&&(u=t.split(" "));if(-1!=u[0].indexOf("/"))h=u[0].split("/");else{if(-1==u[0].indexOf("-"))return s(t);h=u[0].split("-")}var m=parseFloat(h[2]);if(h[0]&&4==h[0].length&&(m=parseFloat(h[0]),h[0]=h[1],h[1]=h[2]),u.length>1){var p=u[2];u=u[1].split(":"),p&&("12"==u[0]&&"AM"==p.toUpperCase()?u[0]=0:"12"!=u[0]&&"PM"==p.toUpperCase()&&(u[0]=parseInt(u[0],10)+12));var f=0,_=0;return 3==u.length&&(-1==u[2].indexOf(".")?f=parseInt(u[2],10):3==(f=u[2].split("."))[1].length&&(_=f[1],f=f[0])),new Date(m,h[0]-1,h[1],u[0],u[1],f,_)}return new Date(m,h[0]-1,h[1],0,0,0,0)},s=t=>{var e;if(-1!=t.indexOf("/"))e=t.split("/");else{if(-1==t.indexOf("-"))return t.length>=8?new Date(parseFloat(t.substring(0,4)),parseFloat(t.substring(4,6))-1,parseFloat(t.substring(6,8))):new Date;e=t.split("-")}if(e.length<3)return new Date;-1!=e[2].indexOf(" ")?e[2]=e[2].substring(0,e[2].indexOf(" ")):-1!=e[2].indexOf("T")&&(e[2]=e[2].substring(0,e[2].indexOf("T")));var r=parseFloat(e[2]);return r<20&&(r+=2e3),4==e[0].length&&(r=parseFloat(e[0]),e[0]=e[1],e[1]=e[2]),new Date(r,e[0]-1,e[1])}},3457(t,e,r){"use strict";r.d(e,{$s:()=>o,Cw:()=>a,D_:()=>n,dq:()=>i,h1:()=>s});const i=Object.freeze({ChartTitle:"Chart Title",CategoricalDisplay:"Categorical Display",ChartControl:"Chart Control"}),a=Object.freeze({MarketSelector:"Market Selector",Favorite:"Favorite",ChartSetting:"Chart Setting",ChartSize:"Chart Size",ChartType:"Chart Type",Comparison:"Comparison",DrawTools:"Draw Tools",Download:"Download",Indicator:"Indicator",Interval:"Interval",Template:"Template"});function s(){var t,e,r,i,a,s;window.isProductionWebsite&&(t=window,e=document,r="script",i="ga",t.GoogleAnalyticsObject=i,t[i]=t[i]||function(){(t[i].q=t[i].q||[]).push(arguments)},t[i].l=1*new Date,a=e.createElement(r),s=e.getElementsByTagName(r)[0],a.async=1,a.src="//www.google-analytics.com/analytics.js",s.parentNode.insertBefore(a,s),ga("create","UA-40877026-15","auto"))}function n(){window.isProductionWebsite&&window.ga&&ga("send","pageview",window.location.pathname)}function o(t,e,r){window.isProductionWebsite&&window.ga&&ga("send","event",t,e,r)}},1993(t,e,r){"use strict";function i(t){const e=localStorage.getItem(t);if(null!==e)try{return JSON.parse(e)}catch(t){return}}function a(t){try{return JSON.parse(t)}catch(t){return}}function s(t,e){const r=JSON.stringify(e);localStorage.setItem(t,r)}function n(t,e){return"string"==typeof t?t:t.toFixed(e)}r.d(e,{C1:()=>T,Cc:()=>N,Jn:()=>n,KC:()=>y,MQ:()=>C,Ou:()=>j,Pu:()=>m,RB:()=>l,SN:()=>h,SS:()=>u,Ul:()=>o,Vh:()=>D,X:()=>S,YN:()=>g,_J:()=>k,_z:()=>d,ay:()=>E,lk:()=>s,mI:()=>c,o8:()=>A,pg:()=>f,pl:()=>_,qI:()=>I,s0:()=>i,sg:()=>p,xL:()=>a,yX:()=>v});const o=t=>{if(void 0!==t)return 86400===t?"day":0===t?"tick":t>=60&&t<=1800?"minute":"hour"},l=t=>{const{market_display_name:e,submarket_display_name:r,subgroup:i}=t||{};if(!e)return"";const a=e.replace(" ","_"),s=r.replace(" ","_");return i&&"none"!==i?`${a}-${i}-${s}`.toLowerCase():`${a}-${s}`.toLowerCase()},c=(t,e)=>{const r=e.find(e=>e.items.some(e=>e.interval===t)),i=r?.items?.find(e=>e.interval===t)?.num,a=1===i?r?.single:r?.plural;return a?`${i} ${a}`:""},h={Chrome:()=>-1!==navigator.userAgent.indexOf("Chrome")&&!navigator.userAgent.match(/OPR|Opera|Chromium|Edg|Edge/i),Chromium:()=>-1!==navigator.userAgent.indexOf("Chromium"),Edge:()=>!!navigator.userAgent.match(/Edg|Edge/i)&&!document.documentMode,Firefox:()=>-1!==navigator.userAgent.indexOf("Firefox")&&-1===navigator.userAgent.indexOf("Seamonkey"),IE:()=>navigator.userAgent.match(/MSIE|Trident/i)||!!document.documentMode,Opera:()=>!!navigator.userAgent.match(/OPR|Opera/i),Safari:()=>-1!==navigator.userAgent.indexOf("Safari")&&!navigator.userAgent.match(/Chrome|Chromium/i),Seamonkey:()=>-1!==navigator.userAgent.indexOf("Seamonkey")};function u(t,e,r,i){const a=new Blob([e],{type:r});if(navigator.msSaveBlob)return void navigator.msSaveBlob(a,t);const s="image/png;"===r?e:URL.createObjectURL(a),n=document.createElement("a");if(void 0!==n.download)return n.setAttribute("href",s),n.setAttribute("download",t),n.style.visibility="hidden",document.body.appendChild(n),n.click(),void document.body?.removeChild?.(n);if(i)if("image/png;"===r)i.document.write(`<iframe src="${s}" frameborder="0" style="border:0; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%;" allowfullscreen></iframe>`);else{const t=e.split("\n");for(let e=0;e<t.length;e++)i.document.write(`${t[e]}<br/>`)}}const d=({is_contract_chart:t,is_mobile:e,ticks_length:r,yaxis_height:i})=>{let a,s;const n={height_factor:.8};if(!i)return n;if(t){if(r){a=s=e?i*(r<5?.3:.25):.27*i}}else a=s=e?.33*i:.27*i;return{...n,...a&&s?{yaxis_margin:{top:a,bottom:s}}:{}}};function g(t){return t.getTime()/1e3-60*t.getTimezoneOffset()|0}function m(t){return new Date(1e3*t).toISOString().substring(0,19)}function p(t){return new Date(1e3*t)}function f(t){let e=1,r="second";return 86400===t?r="day":t&&t>59&&(e=t/60,r="minute"),{interval:e,timeUnit:r}}function _(t){const e=t/1e3;if(e<=0)return null;const r=t=>`0${t}`.slice(-2),i=r(Math.trunc(e%60)),a=r(Math.trunc(e/60%60));let s=Math.trunc(e/3600%24);return s=s?`${s}:`:"",`${s}${a}:${i}`}function b(t,e=t=>t){const r=[],i={...t,data:r};if(t.hasSubcategory){for(const i of t.data)if("data"in i){const t=[],a={...i,data:t};for(const r of i.data)t.push(e(r));r.push(a)}}else for(const i of t.data)r.push(e(i));return i}function v(t,e=t=>t){const r=[];for(const i of t)if(i.hasSubgroup){const t=i.subgroups.map(t=>b(t,e));r.push({...i,subgroups:t})}else r.push(b(i,e));return r}const y=41,S=(Object.freeze({GREEN:"#4bb4b3",ORANGE:"#ff6444"}),Object.freeze({UP:"UP",DOWN:"DOWN"})),x={doubleExponential:"DEMA",exponential:"EMA",hull:"HMA",simple:"MA",timeSeries:"TSMA",triangular:"TMA",tripleExponential:"TEMA",variable:"VMA",weighted:"WMA",wellesWilder:"SMMA",zeroLag:"ZMA"},w={open:"O",high:"H",close:"C",low:"L","Hl/2":"Hl/2","HlC/3":"Hlc/3","HlCC/4":"Hlcc/4","OHlC/4":"Ohlc/4"},C=(t,e=[])=>{const r=e.filter(t=>["movingAverageType","maType","fieldType"].includes(t.path||"")||["number","switch"].includes(t.type)).map(t=>"movingAverageType"===t.path||"maType"===t.path?x[t.value]:"fieldType"===t.path?w[t.value]:"switch"===t.type?t.value?"Y":"N":t.value||t.defaultValue).join(",")||void 0;return{name:(i=t.replace(`(${r})`,"").replace("-"," "),(i.charAt(0).toUpperCase()+i.slice(1)).replace(/([a-z](?=[A-Z]))/g,"$1 ")).trim(),bars:r};var i},T=(t,e)=>{if(t.length>e){let r=t;const i=Math.floor(t.length/e);for(let t=1;t<=i;t++)r=`${r.slice(0,e*t)} ${r.slice(e*t,r.length)}`;return r}return t},k=t=>t.toLowerCase().replace(/[^\w ]+/g,"").replace(/ +/g,"-"),j=(t,e,{onDragStart:r,onDrag:i,onDragReleased:a})=>{t.addEventListener("mousedown",function(t){window.addEventListener("mousemove",n),e.addEventListener("mouseup",o),s=!0,r?.(t)});let s=!1;function n(t){s&&i?.(t)}function o(t){s=!1,a?.(t),window.removeEventListener("mousemove",n),e.removeEventListener("mouseup",o)}},N=(t,e,r)=>(t=t??0)*(1-r)+(e=e??0)*r,E=(t,e)=>{if("string"==typeof t&&(t.startsWith("#")||t.toLowerCase().startsWith("0x"))){return"light"===e&&"#FFFFFF"===t?"#000000":"dark"===e&&"#000000"===t?"#FFFFFF":t}if(D(t)){const r=t;Object.keys(t).forEach(t=>{r[t]=E(r[t],e)})}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=E(t[r],e);return t},A=t=>{let e;if(null==t||"object"!=typeof t)return t;if(t instanceof Date)return e=new Date,e.setTime(t.getTime()),e;if(t instanceof Array){e=[];for(let r=0,i=t.length;r<i;r++)e[r]=A(t[r]);return e}if(t instanceof Object){e={};for(const r in t)t.hasOwnProperty(r)&&(e[r]=A(t[r]));return e}throw t},I=(t,e)=>t.reduce((t,r)=>[...t,...e(r)],[]),D=function(t){return!!t&&t.constructor===Object}},1109(t,e,r){"use strict";function i(t,e=0,r={}){let i,a,s=null,n=null,o=null,l=0;const c=r.leading??!1,h=r.trailing??!0,u=e=>{const r=n,a=o;return n=null,o=null,l=e,i=t.apply(a,r),i},d=(t,e)=>{s=setTimeout(t,e)},g=t=>{const r=void 0===a?e:t-a;return void 0===a||r>=e||r<0||t-l>=e},m=t=>(s=null,h&&n?u(t):(n=null,o=null,i)),p=()=>{const t=Date.now();if(g(t))return void m(t);d(p,e-(void 0===a?0:t-a))},f=function(...t){const r=Date.now(),h=g(r);if(n=t,o=this,a=r,h){if(null===s)return(t=>(l=t,d(p,e),c?u(t):i))(r)}else null===s&&d(p,e);return i};return f.cancel=()=>{null!==s&&(clearTimeout(s),s=null),l=0,n=null,a=void 0,o=null},f.flush=()=>null===s?i:m(Date.now()),f}function a(t,e,r){if(null==t)return t;const i=Array.isArray(e)?e:function(t){const e=[],r=/[^.[\]]+|\[(?:([^"'][^[]*)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;return t.replace(r,(t,r,i,a)=>{let s=t;return i?s=a.replace(/\\(\\)?/g,"$1"):r&&(s=r.trim()),e.push(s),""}),e}(e);let a=t;const n=i.length,o=n-1;for(let t=0;t<n;t++){const e=i[t];if(t===o)a[e]=r;else{const r=a[e];if(null==r||"object"!=typeof r){const r=i[t+1];a[e]=s(r)?[]:{}}a=a[e]}}return t}function s(t){return/^\d+$/.test(t)}r.d(e,{h:()=>a,s:()=>i})},6853(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},2592(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},8449(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},8798(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1882(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},3955(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},5511(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},7808(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},6765(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},898(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},8258(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1849(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},4007(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},79(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},4001(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},4321(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},6271(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},7951(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1061(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},8272(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1238(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1104(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},273(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},4282(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},6351(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},2445(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},7209(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},931(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},2313(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},6238(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},7092(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},9671(t,e,r){t.exports={id:"ic-bchusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-bchusd-usage",toString:function(){return this.url}}},2048(t,e,r){t.exports={id:"ic-bnbusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-bnbusd-usage",toString:function(){return this.url}}},2588(t,e,r){t.exports={id:"ic-btceth-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-btceth-usage",toString:function(){return this.url}}},8438(t,e,r){t.exports={id:"ic-btcltc-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-btcltc-usage",toString:function(){return this.url}}},2405(t,e,r){t.exports={id:"ic-btcusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-btcusd-usage",toString:function(){return this.url}}},2049(t,e,r){t.exports={id:"ic-dshusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-dshusd-usage",toString:function(){return this.url}}},5187(t,e,r){t.exports={id:"ic-eosusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-eosusd-usage",toString:function(){return this.url}}},4065(t,e,r){t.exports={id:"ic-ethusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-ethusd-usage",toString:function(){return this.url}}},7950(t,e,r){t.exports={id:"ic-iotusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-iotusd-usage",toString:function(){return this.url}}},1071(t,e,r){t.exports={id:"ic-ltcusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-ltcusd-usage",toString:function(){return this.url}}},2788(t,e,r){t.exports={id:"ic-neousd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-neousd-usage",toString:function(){return this.url}}},7183(t,e,r){t.exports={id:"ic-omgusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-omgusd-usage",toString:function(){return this.url}}},3344(t,e,r){t.exports={id:"ic-trxusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-trxusd-usage",toString:function(){return this.url}}},3297(t,e,r){t.exports={id:"ic-xlmusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-xlmusd-usage",toString:function(){return this.url}}},2913(t,e,r){t.exports={id:"ic-xmrusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-xmrusd-usage",toString:function(){return this.url}}},7823(t,e,r){t.exports={id:"ic-xrpusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-xrpusd-usage",toString:function(){return this.url}}},4748(t,e,r){t.exports={id:"ic-zecusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-zecusd-usage",toString:function(){return this.url}}},3785(t,e,r){t.exports={id:"ic-oilusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-oilusd-usage",toString:function(){return this.url}}},6244(t,e,r){t.exports={id:"ic-otcbadge-usage",viewBox:"0 0 13 9",url:r.p+"sprite-c5754f.smartcharts.svg#ic-otcbadge-usage",toString:function(){return this.url}}},8341(t,e,r){t.exports={id:"ic-metal-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-metal-usage",toString:function(){return this.url}}},3747(t,e,r){t.exports={id:"ic-australian-200-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-australian-200-usage",toString:function(){return this.url}}},3669(t,e,r){t.exports={id:"ic-euro-50-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-euro-50-usage",toString:function(){return this.url}}},2092(t,e,r){t.exports={id:"ic-france-40-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-france-40-usage",toString:function(){return this.url}}},794(t,e,r){t.exports={id:"ic-germany-40-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-germany-40-usage",toString:function(){return this.url}}},5092(t,e,r){t.exports={id:"ic-hong-kong-50-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-hong-kong-50-usage",toString:function(){return this.url}}},6552(t,e,r){t.exports={id:"ic-japan-225-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-japan-225-usage",toString:function(){return this.url}}},3119(t,e,r){t.exports={id:"ic-netherland-25-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-netherland-25-usage",toString:function(){return this.url}}},542(t,e,r){t.exports={id:"ic-swiss-20-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-swiss-20-usage",toString:function(){return this.url}}},7764(t,e,r){t.exports={id:"ic-uk-100-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-uk-100-usage",toString:function(){return this.url}}},8832(t,e,r){t.exports={id:"ic-usd-500-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-usd-500-usage",toString:function(){return this.url}}},5317(t,e,r){t.exports={id:"ic-usd-tech-100-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-usd-tech-100-usage",toString:function(){return this.url}}},6669(t,e,r){t.exports={id:"ic-wallstreet-30-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-wallstreet-30-usage",toString:function(){return this.url}}},4298(t,e,r){t.exports={id:"ic-10-index-v-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-10-index-v-usage",toString:function(){return this.url}}},3864(t,e,r){t.exports={id:"ic-100-index-v-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-100-index-v-usage",toString:function(){return this.url}}},2502(t,e,r){t.exports={id:"ic-10-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-10-1s-index-usage",toString:function(){return this.url}}},5704(t,e,r){t.exports={id:"ic-100-1s-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-100-1s-index-usage",toString:function(){return this.url}}},4046(t,e,r){t.exports={id:"ic-150-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-150-1s-index-usage",toString:function(){return this.url}}},10(t,e,r){t.exports={id:"ic-200-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-200-1s-index-usage",toString:function(){return this.url}}},6723(t,e,r){t.exports={id:"light-25(1s)index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#light-25(1s)index-usage",toString:function(){return this.url}}},1008(t,e,r){t.exports={id:"ic-250-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-250-1s-index-usage",toString:function(){return this.url}}},3292(t,e,r){t.exports={id:"ic-300-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-300-1s-index-usage",toString:function(){return this.url}}},1449(t,e,r){t.exports={id:"light-50(1s) index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#light-50(1s) index-usage",toString:function(){return this.url}}},9715(t,e,r){t.exports={id:"light-75(1s) index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#light-75(1s) index-usage",toString:function(){return this.url}}},638(t,e,r){t.exports={id:"ic-25-index-v-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-25-index-v-usage",toString:function(){return this.url}}},194(t,e,r){t.exports={id:"ic-50-index-v-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-50-index-v-usage",toString:function(){return this.url}}},718(t,e,r){t.exports={id:"ic-75-index-v-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-75-index-v-usage",toString:function(){return this.url}}},148(t,e,r){t.exports={id:"ic-marketbear-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-marketbear-usage",toString:function(){return this.url}}},3751(t,e,r){t.exports={id:"boom1000 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#boom1000 index-usage",toString:function(){return this.url}}},2821(t,e,r){t.exports={id:"boom300 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#boom300 index-usage",toString:function(){return this.url}}},7213(t,e,r){t.exports={id:"boom500 index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#boom500 index-usage",toString:function(){return this.url}}},1553(t,e,r){t.exports={id:"boom600 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#boom600 index-usage",toString:function(){return this.url}}},1085(t,e,r){t.exports={id:"boom900 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#boom900 index-usage",toString:function(){return this.url}}},3562(t,e,r){t.exports={id:"ic-marketbull-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-marketbull-usage",toString:function(){return this.url}}},6489(t,e,r){t.exports={id:"crash1000 index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#crash1000 index-usage",toString:function(){return this.url}}},4579(t,e,r){t.exports={id:"crash300 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#crash300 index-usage",toString:function(){return this.url}}},7571(t,e,r){t.exports={id:"crash500 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#crash500 index-usage",toString:function(){return this.url}}},6033(t,e,r){t.exports={id:"crash600 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#crash600 index-usage",toString:function(){return this.url}}},2099(t,e,r){t.exports={id:"crash900 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#crash900 index-usage",toString:function(){return this.url}}},5269(t,e,r){t.exports={id:"ic-10-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-10-index-usage",toString:function(){return this.url}}},2167(t,e,r){t.exports={id:"ic-100-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-100-index-usage",toString:function(){return this.url}}},4005(t,e,r){t.exports={id:"ic-150-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-150-index-usage",toString:function(){return this.url}}},6617(t,e,r){t.exports={id:"ic-200-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-200-index-usage",toString:function(){return this.url}}},3265(t,e,r){t.exports={id:"ic-25-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-25-index-usage",toString:function(){return this.url}}},2853(t,e,r){t.exports={id:"ic-50-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-50-index-usage",toString:function(){return this.url}}},3257(t,e,r){t.exports={id:"ic-75-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-75-index-usage",toString:function(){return this.url}}},7358(t,e,r){t.exports={id:"step-100-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#step-100-index-usage",toString:function(){return this.url}}},3425(t,e,r){t.exports={id:"step-200-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#step-200-index-usage",toString:function(){return this.url}}},2188(t,e,r){t.exports={id:"step-300-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#step-300-index-usage",toString:function(){return this.url}}},2839(t,e,r){t.exports={id:"step-400-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#step-400-index-usage",toString:function(){return this.url}}},3010(t,e,r){t.exports={id:"step-500-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#step-500-index-usage",toString:function(){return this.url}}},1561(t,e,r){t.exports={id:"error-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#error-usage",toString:function(){return this.url}}},9429(t,e,r){t.exports={id:"info-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#info-usage",toString:function(){return this.url}}},1610(t,e,r){t.exports={id:"success-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#success-usage",toString:function(){return this.url}}},3775(t,e,r){t.exports={id:"warning-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#warning-usage",toString:function(){return this.url}}},3578(t,e,r){t.exports={id:"ic-arrow-green-usage",viewBox:"0 0 22 31",url:r.p+"sprite-c5754f.smartcharts.svg#ic-arrow-green-usage",toString:function(){return this.url}}},3255(t,e,r){t.exports={id:"ic-arrow-orange-usage",viewBox:"0 0 22 31",url:r.p+"sprite-c5754f.smartcharts.svg#ic-arrow-orange-usage",toString:function(){return this.url}}},2327(t,e,r){t.exports={id:"ic-back-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-back-usage",toString:function(){return this.url}}},7739(t,e,r){t.exports={id:"ic-baseline-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-baseline-normal-usage",toString:function(){return this.url}}},2979(t,e,r){t.exports={id:"ic-candle-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-candle-normal-usage",toString:function(){return this.url}}},6057(t,e,r){t.exports={id:"ic-dot-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-dot-normal-usage",toString:function(){return this.url}}},267(t,e,r){t.exports={id:"ic-hollowcandle-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-hollowcandle-normal-usage",toString:function(){return this.url}}},242(t,e,r){t.exports={id:"ic-heikin-ashi-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-heikin-ashi-normal-usage",toString:function(){return this.url}}},4542(t,e,r){t.exports={id:"ic-kagi-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-kagi-normal-usage",toString:function(){return this.url}}},1811(t,e,r){t.exports={id:"ic-linebreak-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-linebreak-normal-usage",toString:function(){return this.url}}},6240(t,e,r){t.exports={id:"ic-pointfigure-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-pointfigure-normal-usage",toString:function(){return this.url}}},1337(t,e,r){t.exports={id:"ic-rangebars-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-rangebars-normal-usage",toString:function(){return this.url}}},5829(t,e,r){t.exports={id:"ic-renko-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-renko-normal-usage",toString:function(){return this.url}}},9955(t,e,r){t.exports={id:"ic-linedot-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-linedot-normal-usage",toString:function(){return this.url}}},363(t,e,r){t.exports={id:"ic-line-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-line-normal-usage",toString:function(){return this.url}}},5439(t,e,r){t.exports={id:"ic-ohlc-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-ohlc-normal-usage",toString:function(){return this.url}}},4619(t,e,r){t.exports={id:"ic-spline-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-spline-normal-usage",toString:function(){return this.url}}},2910(t,e,r){t.exports={id:"table-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#table-usage",toString:function(){return this.url}}},5833(t,e,r){t.exports={id:"ic-comparison-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-comparison-normal-usage",toString:function(){return this.url}}},7463(t,e,r){t.exports={id:"ic-crosshair-off-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-crosshair-off-usage",toString:function(){return this.url}}},3211(t,e,r){t.exports={id:"ic-crosshair-on-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-crosshair-on-usage",toString:function(){return this.url}}},6331(t,e,r){t.exports={id:"ic-drawingtools-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-drawingtools-normal-usage",toString:function(){return this.url}}},6432(t,e,r){t.exports={id:"ic-position-bottom-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-position-bottom-usage",toString:function(){return this.url}}},4674(t,e,r){t.exports={id:"ic-position-left-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-position-left-usage",toString:function(){return this.url}}},9185(t,e,r){t.exports={id:"ic-zoomin-light-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-zoomin-light-usage",toString:function(){return this.url}}},8983(t,e,r){t.exports={id:"ic-zoomout-light-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-zoomout-light-usage",toString:function(){return this.url}}},4431(t,e,r){t.exports={id:"ic-area-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-area-grayscale-usage",toString:function(){return this.url}}},9129(t,e,r){t.exports={id:"ic-area-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-area-usage",toString:function(){return this.url}}},263(t,e,r){t.exports={id:"ic-candle-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-candle-grayscale-usage",toString:function(){return this.url}}},7249(t,e,r){t.exports={id:"ic-candle-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-candle-usage",toString:function(){return this.url}}},301(t,e,r){t.exports={id:"ic-hollow-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-hollow-grayscale-usage",toString:function(){return this.url}}},9607(t,e,r){t.exports={id:"ic-hollow-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-hollow-usage",toString:function(){return this.url}}},7414(t,e,r){t.exports={id:"ic-ohlc-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-ohlc-grayscale-usage",toString:function(){return this.url}}},9564(t,e,r){t.exports={id:"ic-ohlc-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-ohlc-usage",toString:function(){return this.url}}},4629(t,e,r){t.exports={id:"ic-clear-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-clear-usage",toString:function(){return this.url}}},9625(t,e,r){t.exports={id:"ic-close-bold-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-close-bold-usage",toString:function(){return this.url}}},9324(t,e,r){t.exports={id:"ic-close-circle-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-close-circle-usage",toString:function(){return this.url}}},3293(t,e,r){t.exports={id:"full-screen-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#full-screen-usage",toString:function(){return this.url}}},1278(t,e,r){t.exports={id:"ic-active-usage",viewBox:"0 0 15 15",url:r.p+"sprite-c5754f.smartcharts.svg#ic-active-usage",toString:function(){return this.url}}},9289(t,e,r){t.exports={id:"ic-add-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-add-usage",toString:function(){return this.url}}},9891(t,e,r){t.exports={id:"ic-charts-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-charts-usage",toString:function(){return this.url}}},6378(t,e,r){t.exports={id:"ic-checkbox-active-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-checkbox-active-usage",toString:function(){return this.url}}},8451(t,e,r){t.exports={id:"ic-checkbox-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-checkbox-usage",toString:function(){return this.url}}},204(t,e,r){t.exports={id:"ic-close-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-close-usage",toString:function(){return this.url}}},1320(t,e,r){t.exports={id:"ic-download-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-download-usage",toString:function(){return this.url}}},9212(t,e,r){t.exports={id:"ic-drawing-tool-mobile-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-drawing-tool-mobile-usage",toString:function(){return this.url}}},4497(t,e,r){t.exports={id:"ic-drawing-tool-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-drawing-tool-usage",toString:function(){return this.url}}},4325(t,e,r){t.exports={id:"ic-help-center-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-help-center-usage",toString:function(){return this.url}}},8250(t,e,r){t.exports={id:"ic-indicators-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-indicators-usage",toString:function(){return this.url}}},2532(t,e,r){t.exports={id:"ic-info-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-info-usage",toString:function(){return this.url}}},3365(t,e,r){t.exports={id:"ic-input-number-minus-usage",viewBox:"0 0 8 8",url:r.p+"sprite-c5754f.smartcharts.svg#ic-input-number-minus-usage",toString:function(){return this.url}}},3031(t,e,r){t.exports={id:"ic-input-number-plus-usage",viewBox:"0 0 8 8",url:r.p+"sprite-c5754f.smartcharts.svg#ic-input-number-plus-usage",toString:function(){return this.url}}},5038(t,e,r){t.exports={id:"ic-language-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-language-usage",toString:function(){return this.url}}},1041(t,e,r){t.exports={id:"ic-templates-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-templates-usage",toString:function(){return this.url}}},1655(t,e,r){t.exports={id:"ic-theme-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-theme-usage",toString:function(){return this.url}}},9707(t,e,r){t.exports={id:"ic-delete-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-delete-usage",toString:function(){return this.url}}},7885(t,e,r){t.exports={id:"ic-csv-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-csv-usage",toString:function(){return this.url}}},7420(t,e,r){t.exports={id:"ic-png-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-png-usage",toString:function(){return this.url}}},3576(t,e,r){t.exports={id:"ic-channel-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-channel-usage",toString:function(){return this.url}}},6706(t,e,r){t.exports={id:"ic-continuous-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-continuous-usage",toString:function(){return this.url}}},7365(t,e,r){t.exports={id:"ic-fibonacci-fan-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-fibonacci-fan-usage",toString:function(){return this.url}}},4311(t,e,r){t.exports={id:"ic-horizontal-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-horizontal-usage",toString:function(){return this.url}}},3385(t,e,r){t.exports={id:"ic-line-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-line-usage",toString:function(){return this.url}}},7425(t,e,r){t.exports={id:"ic-ray-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-ray-usage",toString:function(){return this.url}}},1134(t,e,r){t.exports={id:"ic-rectangle-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-rectangle-usage",toString:function(){return this.url}}},2308(t,e,r){t.exports={id:"ic-trend-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-trend-usage",toString:function(){return this.url}}},5477(t,e,r){t.exports={id:"ic-vertical-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-vertical-usage",toString:function(){return this.url}}},9307(t,e,r){t.exports={id:"ic-dropdown-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-dropdown-usage",toString:function(){return this.url}}},9411(t,e,r){t.exports={id:"ic-edit-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-edit-usage",toString:function(){return this.url}}},8093(t,e,r){t.exports={id:"ic-favorite-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-favorite-normal-usage",toString:function(){return this.url}}},1795(t,e,r){t.exports={id:"arabic-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#arabic-usage",toString:function(){return this.url}}},3719(t,e,r){t.exports={id:"aud-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#aud-usage",toString:function(){return this.url}}},7428(t,e,r){t.exports={id:"bangladesh-usage",viewBox:"0 0 24 17",url:r.p+"sprite-c5754f.smartcharts.svg#bangladesh-usage",toString:function(){return this.url}}},1445(t,e,r){t.exports={id:"cad-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#cad-usage",toString:function(){return this.url}}},8217(t,e,r){t.exports={id:"cambodia-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#cambodia-usage",toString:function(){return this.url}}},4056(t,e,r){t.exports={id:"chf-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#chf-usage",toString:function(){return this.url}}},5004(t,e,r){t.exports={id:"chinese-traditional-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#chinese-traditional-usage",toString:function(){return this.url}}},7256(t,e,r){t.exports={id:"chinese-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#chinese-usage",toString:function(){return this.url}}},7451(t,e,r){t.exports={id:"dutch-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#dutch-usage",toString:function(){return this.url}}},1477(t,e,r){t.exports={id:"eur-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#eur-usage",toString:function(){return this.url}}},3135(t,e,r){t.exports={id:"french-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#french-usage",toString:function(){return this.url}}},3332(t,e,r){t.exports={id:"gbp-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#gbp-usage",toString:function(){return this.url}}},5729(t,e,r){t.exports={id:"german-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#german-usage",toString:function(){return this.url}}},9876(t,e,r){t.exports={id:"hong kong-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#hong kong-usage",toString:function(){return this.url}}},451(t,e,r){t.exports={id:"indonesia-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#indonesia-usage",toString:function(){return this.url}}},2620(t,e,r){t.exports={id:"italy-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#italy-usage",toString:function(){return this.url}}},6902(t,e,r){t.exports={id:"jpy-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#jpy-usage",toString:function(){return this.url}}},1089(t,e,r){t.exports={id:"kenya-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#kenya-usage",toString:function(){return this.url}}},3179(t,e,r){t.exports={id:"korean-usage",viewBox:"0 0 36 24",url:r.p+"sprite-c5754f.smartcharts.svg#korean-usage",toString:function(){return this.url}}},1069(t,e,r){t.exports={id:"mongolian-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#mongolian-usage",toString:function(){return this.url}}},9702(t,e,r){t.exports={id:"mxn-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#mxn-usage",toString:function(){return this.url}}},1649(t,e,r){t.exports={id:"nok-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#nok-usage",toString:function(){return this.url}}},1229(t,e,r){t.exports={id:"nzd-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#nzd-usage",toString:function(){return this.url}}},2607(t,e,r){t.exports={id:"pln-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#pln-usage",toString:function(){return this.url}}},37(t,e,r){t.exports={id:"portugal-usage",viewBox:"0 0 24 17",url:r.p+"sprite-c5754f.smartcharts.svg#portugal-usage",toString:function(){return this.url}}},4236(t,e,r){t.exports={id:"russia-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#russia-usage",toString:function(){return this.url}}},7558(t,e,r){t.exports={id:"sek-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#sek-usage",toString:function(){return this.url}}},9705(t,e,r){t.exports={id:"spanish-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#spanish-usage",toString:function(){return this.url}}},7038(t,e,r){t.exports={id:"srilanka-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#srilanka-usage",toString:function(){return this.url}}},6226(t,e,r){t.exports={id:"thailand-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#thailand-usage",toString:function(){return this.url}}},5357(t,e,r){t.exports={id:"turkey-usage",viewBox:"0 0 24 17",url:r.p+"sprite-c5754f.smartcharts.svg#turkey-usage",toString:function(){return this.url}}},8901(t,e,r){t.exports={id:"usd-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#usd-usage",toString:function(){return this.url}}},6681(t,e,r){t.exports={id:"uzbekistan-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#uzbekistan-usage",toString:function(){return this.url}}},8457(t,e,r){t.exports={id:"vietnam-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#vietnam-usage",toString:function(){return this.url}}},3770(t,e,r){t.exports={id:"wallstreet-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#wallstreet-usage",toString:function(){return this.url}}},5407(t,e,r){t.exports={id:"xau-usage",viewBox:"0 0 8 8",url:r.p+"sprite-c5754f.smartcharts.svg#xau-usage",toString:function(){return this.url}}},1270(t,e,r){t.exports={id:"ic-adx-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-adx-usage",toString:function(){return this.url}}},8246(t,e,r){t.exports={id:"ic-alligator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-alligator-usage",toString:function(){return this.url}}},1108(t,e,r){t.exports={id:"ic-aroon-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-aroon-usage",toString:function(){return this.url}}},5(t,e,r){t.exports={id:"ic-averages-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-averages-usage",toString:function(){return this.url}}},1077(t,e,r){t.exports={id:"ic-awesome-oscillator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-awesome-oscillator-usage",toString:function(){return this.url}}},6537(t,e,r){t.exports={id:"ic-bollinger-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-bollinger-usage",toString:function(){return this.url}}},1908(t,e,r){t.exports={id:"ic-cat-averages-usage",viewBox:"0 0 17 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-cat-averages-usage",toString:function(){return this.url}}},2421(t,e,r){t.exports={id:"ic-commodity-channel-index-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-commodity-channel-index-usage",toString:function(){return this.url}}},5459(t,e,r){t.exports={id:"ic-donchian-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-donchian-usage",toString:function(){return this.url}}},155(t,e,r){t.exports={id:"ic-dtrended-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-dtrended-usage",toString:function(){return this.url}}},3821(t,e,r){t.exports={id:"ic-envelope-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-envelope-usage",toString:function(){return this.url}}},3163(t,e,r){t.exports={id:"ic-fractal-chaos-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-fractal-chaos-usage",toString:function(){return this.url}}},9424(t,e,r){t.exports={id:"ic-gator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-gator-usage",toString:function(){return this.url}}},5976(t,e,r){t.exports={id:"ic-ichimoku-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-ichimoku-usage",toString:function(){return this.url}}},9442(t,e,r){t.exports={id:"ic-macd-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-macd-usage",toString:function(){return this.url}}},6583(t,e,r){t.exports={id:"ic-momentum-usage",viewBox:"0 0 17 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-momentum-usage",toString:function(){return this.url}}},9149(t,e,r){t.exports={id:"ic-other-usage",viewBox:"0 0 17 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-other-usage",toString:function(){return this.url}}},3982(t,e,r){t.exports={id:"ic-parabolic-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-parabolic-usage",toString:function(){return this.url}}},9877(t,e,r){t.exports={id:"ic-rainbow-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-rainbow-usage",toString:function(){return this.url}}},9080(t,e,r){t.exports={id:"ic-rate-of-change-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-rate-of-change-usage",toString:function(){return this.url}}},3417(t,e,r){t.exports={id:"ic-rsi-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-rsi-usage",toString:function(){return this.url}}},6661(t,e,r){t.exports={id:"ic-stochastic-momentum-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-stochastic-momentum-usage",toString:function(){return this.url}}},7709(t,e,r){t.exports={id:"ic-stochastic-oscillator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-stochastic-oscillator-usage",toString:function(){return this.url}}},4575(t,e,r){t.exports={id:"ic-trend-dark-usage",viewBox:"0 0 17 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-trend-dark-usage",toString:function(){return this.url}}},7037(t,e,r){t.exports={id:"ic-trend-light-usage",viewBox:"0 0 17 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-trend-light-usage",toString:function(){return this.url}}},3800(t,e,r){t.exports={id:"ic-volatility-usage",viewBox:"0 0 17 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-volatility-usage",toString:function(){return this.url}}},1904(t,e,r){t.exports={id:"ic-william-percent-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-william-percent-usage",toString:function(){return this.url}}},1820(t,e,r){t.exports={id:"ic-zig-zag-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-zig-zag-usage",toString:function(){return this.url}}},1891(t,e,r){t.exports={id:"ic-measure-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-measure-usage",toString:function(){return this.url}}},8584(t,e,r){t.exports={id:"ic-home-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-home-usage",toString:function(){return this.url}}},7521(t,e,r){t.exports={id:"ic-scale-full-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-scale-full-usage",toString:function(){return this.url}}},4185(t,e,r){t.exports={id:"ic-zoomin-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-zoomin-usage",toString:function(){return this.url}}},6776(t,e,r){t.exports={id:"ic-zoomout-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-zoomout-usage",toString:function(){return this.url}}},6183(t,e,r){t.exports={id:"ic-pencil-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-pencil-usage",toString:function(){return this.url}}},7625(t,e,r){t.exports={id:"ic-placeholder-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-placeholder-usage",toString:function(){return this.url}}},4333(t,e,r){t.exports={id:"ic-search-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-search-normal-usage",toString:function(){return this.url}}},8414(t,e,r){t.exports={id:"ic-countdown-dark-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-countdown-dark-active-usage",toString:function(){return this.url}}},3273(t,e,r){t.exports={id:"ic-countdown-dark-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-countdown-dark-normal-usage",toString:function(){return this.url}}},416(t,e,r){t.exports={id:"ic-countdown-light-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-countdown-light-active-usage",toString:function(){return this.url}}},9423(t,e,r){t.exports={id:"ic-countdown-light-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-countdown-light-normal-usage",toString:function(){return this.url}}},5692(t,e,r){t.exports={id:"ic-highest-lowest-dark-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-highest-lowest-dark-active-usage",toString:function(){return this.url}}},3235(t,e,r){t.exports={id:"ic-highest-lowest-dark-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-highest-lowest-dark-normal-usage",toString:function(){return this.url}}},5126(t,e,r){t.exports={id:"ic-highest-lowest-light-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-highest-lowest-light-active-usage",toString:function(){return this.url}}},6577(t,e,r){t.exports={id:"ic-highest-lowest-light-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-highest-lowest-light-normal-usage",toString:function(){return this.url}}},3544(t,e,r){t.exports={id:"ic-historical-dark-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-historical-dark-active-usage",toString:function(){return this.url}}},135(t,e,r){t.exports={id:"ic-historical-dark-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-historical-dark-normal-usage",toString:function(){return this.url}}},1722(t,e,r){t.exports={id:"ic-historical-light-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-historical-light-active-usage",toString:function(){return this.url}}},1949(t,e,r){t.exports={id:"ic-historical-light-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-historical-light-normal-usage",toString:function(){return this.url}}},3893(t,e,r){t.exports={id:"ic-theme-dark-usage",viewBox:"0 0 236 180",url:r.p+"sprite-c5754f.smartcharts.svg#ic-theme-dark-usage",toString:function(){return this.url}}},963(t,e,r){t.exports={id:"ic-theme-light-usage",viewBox:"0 0 236 180",url:r.p+"sprite-c5754f.smartcharts.svg#ic-theme-light-usage",toString:function(){return this.url}}},1345(t,e,r){t.exports={id:"ic-empty-state-usage",viewBox:"0 0 96 96",url:r.p+"sprite-c5754f.smartcharts.svg#ic-empty-state-usage",toString:function(){return this.url}}},1593(t,e,r){t.exports={id:"ic-overwrite-state-usage",viewBox:"0 0 128 128",url:r.p+"sprite-c5754f.smartcharts.svg#ic-overwrite-state-usage",toString:function(){return this.url}}},6456(t,e,r){t.exports={id:"ic-basket-active-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-basket-active-usage",toString:function(){return this.url}}},2999(t,e,r){t.exports={id:"ic-basket-normal-usage",viewBox:"0 0 16 15",url:r.p+"sprite-c5754f.smartcharts.svg#ic-basket-normal-usage",toString:function(){return this.url}}},8310(t,e,r){t.exports={id:"ic-commodities-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-commodities-normal-usage",toString:function(){return this.url}}},1288(t,e,r){t.exports={id:"ic-cryptocurrency-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-cryptocurrency-normal-usage",toString:function(){return this.url}}},7528(t,e,r){t.exports={id:"ic-forex-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-forex-normal-usage",toString:function(){return this.url}}},3522(t,e,r){t.exports={id:"ic-indices-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-indices-normal-usage",toString:function(){return this.url}}},6380(t,e,r){t.exports={id:"ic-otc-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-otc-normal-usage",toString:function(){return this.url}}},9317(t,e,r){t.exports={id:"ic-synth-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-synth-normal-usage",toString:function(){return this.url}}},6800(t,e,r){t.exports={id:"ic-volatility-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-volatility-normal-usage",toString:function(){return this.url}}},8927(t,e,r){t.exports={id:"ic-tick-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-tick-usage",toString:function(){return this.url}}},6667(t,e,r){t.exports={id:"ic-time-usage",viewBox:"0 0 12 12",url:r.p+"sprite-c5754f.smartcharts.svg#ic-time-usage",toString:function(){return this.url}}},8737(t,e,r){var i={"./ar.json":[1405,[785]],"./bn.json":[8462,[50]],"./de.json":[393,[409]],"./es.json":[6870,[146]],"./fr.json":[9358,[826]],"./id.json":[87,[823]],"./it.json":[5191,[159]],"./km.json":[3926,[422]],"./ko.json":[2900,[800]],"./messages.json":[7730,[710]],"./mn.json":[3221,[521]],"./nl.json":[7840,[424]],"./pl.json":[6426,[634]],"./pt.json":[8082,[490]],"./ru.json":[3351,[191]],"./si.json":[3026,[834]],"./sw.json":[4500,[456]],"./th.json":[8106,[522]],"./tr.json":[2880,[28]],"./uz.json":[8201,[813]],"./vi.json":[9143,[935]],"./zh.json":[6424,[864]],"./zh_cn.json":[5988,[606]],"./zh_tw.json":[9524,[602]]};function a(t){if(!r.o(i,t))return Promise.resolve().then(()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e});var e=i[t],a=e[0];return r.e(e[1][0]).then(()=>r.t(a,19))}a.keys=()=>Object.keys(i),a.id=8737,t.exports=a},4511(e){"use strict";e.exports=t},255(t){"use strict";t.exports=e},809(t){"use strict";t.exports=r},7423(t){"use strict";t.exports=i},8046(t){"use strict";t.exports=a},9751(t){"use strict";t.exports=s},7073(t,e){var r;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var t="",e=0;e<arguments.length;e++){var r=arguments[e];r&&(t=n(t,s(r)))}return t}function s(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return a.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var r in t)i.call(t,r)&&t[r]&&(e=n(e,r));return e}function n(t,e){return e?t?t+" "+e:t+e:t}t.exports?(a.default=a,t.exports=a):void 0===(r=function(){return a}.apply(e,[]))||(t.exports=r)}()}},u={};function d(t){var e=u[t];if(void 0!==e)return e.exports;var r=u[t]={exports:{}};return h[t].call(r.exports,r,r.exports,d),r.exports}d.m=h,d.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return d.d(e,{a:e}),e},o=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,d.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var r=Object.create(null);d.r(r);var i={};n=n||[null,o({}),o([]),o(o)];for(var a=2&e&&t;("object"==typeof a||"function"==typeof a)&&!~n.indexOf(a);a=o(a))Object.getOwnPropertyNames(a).forEach(e=>i[e]=()=>t[e]);return i.default=()=>t,d.d(r,i),r},d.d=(t,e)=>{for(var r in e)d.o(e,r)&&!d.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},d.f={},d.e=t=>Promise.all(Object.keys(d.f).reduce((e,r)=>(d.f[r](t,e),e),[])),d.u=t=>({28:"tr-json",50:"bn-json",146:"es-json",159:"it-json",191:"ru-json",409:"de-json",422:"km-json",424:"nl-json",456:"sw-json",490:"pt-json",521:"mn-json",522:"th-json",526:"html2canvas",590:"resize-observer-polyfill",602:"zh_tw-json",606:"zh_cn-json",634:"pl-json",710:"messages-json",776:"flutter-chart-loader",785:"ar-json",800:"ko-json",813:"uz-json",823:"id-json",826:"fr-json",834:"si-json",864:"zh-json",935:"vi-json",937:"lz-string"}[t]+"-"+{28:"9b9028",50:"0d6eca",146:"85869d",159:"3a6a0a",191:"64ef7d",409:"b3239f",422:"6c33fb",424:"0b1291",456:"637b1d",490:"f62ac5",521:"324f5d",522:"0a9ace",526:"33f82f",590:"ca29ff",602:"891074",606:"06d50e",634:"408399",710:"dcf345",776:"b20830",785:"0f73c7",800:"6618e5",813:"bed401",823:"fd1066",826:"69f949",834:"da53eb",864:"bf1035",935:"86cd8b",937:"0c6be0"}[t]+".smartcharts.js"),d.miniCssF=t=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),d.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),l={},c="smartcharts:",d.l=(t,e,r,i)=>{if(l[t])l[t].push(e);else{var a,s;if(void 0!==r)for(var n=document.getElementsByTagName("script"),o=0;o<n.length;o++){var h=n[o];if(h.getAttribute("src")==t||h.getAttribute("data-webpack")==c+r){a=h;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",d.nc&&a.setAttribute("nonce",d.nc),a.setAttribute("data-webpack",c+r),a.src=t),l[t]=[e];var u=(e,r)=>{a.onerror=a.onload=null,clearTimeout(g);var i=l[t];if(delete l[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach(t=>t(r)),e)return e(r)},g=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),s&&document.head.appendChild(a)}},d.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},d.p="",(()=>{var t={792:0};d.f.j=(e,r)=>{var i=d.o(t,e)?t[e]:void 0;if(0!==i)if(i)r.push(i[2]);else{var a=new Promise((r,a)=>i=t[e]=[r,a]);r.push(i[2]=a);var s=d.p+d.u(e),n=new Error;d.l(s,r=>{if(d.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var a=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;n.message="Loading chunk "+e+" failed.\n("+a+": "+s+")",n.name="ChunkLoadError",n.type=a,n.request=s,i[1](n)}},"chunk-"+e,e)}};var e=(e,r)=>{var i,a,[s,n,o]=r,l=0;if(s.some(e=>0!==t[e])){for(i in n)d.o(n,i)&&(d.m[i]=n[i]);if(o)o(d)}for(e&&e(r);l<s.length;l++)a=s[l],d.o(t,a)&&t[a]&&t[a][0](),t[a]=0},r=self.webpackChunksmartcharts=self.webpackChunksmartcharts||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})();var g={};return(()=>{"use strict";d.d(g,{default:()=>Wr});var t=d(7073),e=d.n(t),r=d(9751),i=d(809),a=d.n(i),s=d(8046),n=d(5877),o=d(12),l=d.n(o),c=d(1993);function h(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class u{set zIndex(t){this._line&&t&&(this._line.style.zIndex=t.toString())}get pip(){return this.mainStore.chart.currentActiveSymbol?.decimal_places}constructor(t){h(this,"__top",0),h(this,"_emitter",void 0),h(this,"_line",void 0),h(this,"_priceConstrainer",0),h(this,"_startDragPrice","0"),h(this,"className",void 0),h(this,"hideBarrierLine",void 0),h(this,"hideOffscreenLine",void 0),h(this,"mainStore",void 0),h(this,"opacityOnOverlap",0),h(this,"showOffscreenArrows",!1),h(this,"_relative",!1),h(this,"draggable",!0),h(this,"isDragging",!1),h(this,"visible",!0),h(this,"_price","0"),h(this,"_dragPrice","0"),h(this,"offScreen",!1),h(this,"title",void 0),h(this,"isOverlapping",!1),h(this,"isOverlappingWithPriceLine",!1),h(this,"offScreenDirection",null),h(this,"disposeDrawReaction",void 0),h(this,"onChartLoaded",()=>{this.disposeDrawReaction=(0,s.reaction)(()=>[this.mainStore.chartAdapter.epochBounds,this.mainStore.chartAdapter.quoteBounds,this.mainStore.chart.lastQuote],()=>{this.isDragging||this._draw()}),this.mainStore.chartAdapter.painter.registerCallback(this.drawBarrier)}),h(this,"init",()=>{const t=(t,e)=>{this.visible&&this.draggable&&e.call(this,t)},e=document.querySelector(".ciq-chart-area");this._line&&e&&(0,c.Ou)(this._line,e,{onDragStart:e=>t(e,this._startDrag),onDrag:r=>t(r,t=>this._dragLine(t,e)),onDragReleased:e=>t(e,this._endDrag)})}),h(this,"_startDrag",()=>{this.isDragging=!0,this.mainStore.chart.isBarrierDragging=!0,this.dragPrice=this.price,this._startDragPrice=this._price}),h(this,"_dragLine",(t,e)=>{if(!this._line)return;const{top:r}=e.getBoundingClientRect(),i=t.pageY-r,a=i&&i+2;let s=a&&this._priceFromLocation(a);"function"==typeof this._priceConstrainer&&(s=this._priceConstrainer(s)),this.relative&&(s-=this.mainStore.chart.currentClose),this.dragPrice=`${s}`}),h(this,"_endDrag",()=>{this.isDragging=!1,this.mainStore.chart.isBarrierDragging=!1,Number(this._startDragPrice).toFixed(this.pip)!==Number(this.dragPrice).toFixed(this.pip)&&(this.price=this.dragPrice,this._emitter.emit(u.EVENT_DRAG_RELEASED,this._price))}),h(this,"_calculateTop",t=>{if(null===this.mainStore.chart.currentCloseQuote()||!this.mainStore.chartAdapter.isChartLoaded)return;let e=this._locationFromPrice(t||+this.realPrice);const r=window.flutterChartElement?.clientHeight||0;return e<0?(e<-2&&(this.offScreenDirection=c.X.UP),e=0):e+4>r?(e+4-r>2&&(this.offScreenDirection=c.X.DOWN),e=r-4):this.offScreenDirection=null,this.offScreen=!!this.offScreenDirection,e+30>r?e=r-30:e<10&&(e=10),this.offScreenDirection&&this.showOffscreenArrows&&(e+=this.offScreenDirection===c.X.UP?+c.KC:-c.KC),this.opacityOnOverlap&&(this.isOverlapping=this.overlapCheck(e)),this.isOverlappingWithPriceLine=this._distanceFromCurrentPrice()<25,0|Math.round(e)}),h(this,"_draw",()=>{this.visible&&this._line&&(this.top=this._calculateTop())}),(0,s.makeObservable)(this,{_dragPrice:s.observable,_price:s.observable,draggable:s.observable,isDragging:s.observable,isOverlapping:s.observable,isOverlappingWithPriceLine:s.observable,offScreen:s.observable,offScreenDirection:s.observable,title:s.observable,visible:s.observable,overlappedBarrierWidth:s.computed,pip:s.computed,priceDisplay:s.computed,_calculateTop:s.action.bound,_dragLine:s.action.bound,_endDrag:s.action.bound,_startDrag:s.action.bound,drawBarrier:s.action.bound,setDragLine:s.action.bound}),this.mainStore=t,this._emitter=new(l())({emitDelay:0}),(0,s.when)(()=>this.mainStore.chartAdapter.isChartLoaded,this.onChartLoaded)}drawBarrier(t){if(this.isDragging)return;const e=this.mainStore.chartAdapter.painter.lerpedClose;if(null===e)return void(this.top=this._calculateTop());const r=this._getPrice(e);this.top=this._calculateTop(r)}destructor(){this.disposeDrawReaction?.(),this.mainStore.chartAdapter.painter.unregisterCallback(this.drawBarrier)}static get EVENT_PRICE_CHANGED(){return"EVENT_PRICE_CHANGED"}static get EVENT_DRAG_RELEASED(){return"EVENT_DRAG_RELEASED"}get priceDisplay(){let t=this.isDragging?Number(this.dragPrice).toFixed(this.pip):this._price;return this.relative&&+this._price>0&&"+"!==t[0]&&(t=`+${t}`),t}get price(){return this._price}set price(t){t===this._price||this.isDragging||(this._price=t,this._draw(),this._emitter.emit(u.EVENT_PRICE_CHANGED,this._price))}get dragPrice(){return this._dragPrice}set dragPrice(t){t!=this._dragPrice&&(this._dragPrice=t,this._draw(),this._emitter.emit(u.EVENT_PRICE_CHANGED,this._dragPrice))}get relative(){return this._relative}set relative(t){if(this._relative===t)return;this._relative=t;const e=this.mainStore.chart.currentCloseQuote();let r=e?e.Close:0;this._relative&&(r=-r),this.price=(+this._price+r).toString()}get context(){return this.mainStore.chart.context}set priceConstrainer(t){this._priceConstrainer=t}get realPrice(){return this._getPrice(this.mainStore.chart.currentCloseQuote()?.Close).toString()}get priceLineWidth(){return window.flutterChart?.app.getCurrentTickWidth()||60}get overlappedBarrierWidth(){return 16}_getPrice(t){const e=this.isDragging?this.dragPrice:this.price;return this.relative?t+Number(e):Number(e)}setDragLine(t){this._line=t,this._line&&this._draw()}_locationFromPrice(t){return this.mainStore.chartAdapter.getYFromQuote(t)}_priceFromLocation(t){return this.mainStore.chartAdapter.getQuoteFromY(t)}_distanceFromCurrentPrice(){return Math.abs(this._locationFromPrice(+this.realPrice)-this._locationFromPrice(+this.realPrice-(this.isDragging?+this._dragPrice:+this._price)))}set top(t){this.__top=t,this._line&&(this._line.style.transform=`translateY(${this.top-13}px)`)}get top(){return this.__top}onPriceChanged(t){this._emitter.on(u.EVENT_PRICE_CHANGED,t)}onDragReleased(t){this._emitter.on(u.EVENT_DRAG_RELEASED,t)}overlapCheck(t){const{_barriers:e}=this.mainStore.chart,r=e.filter(t=>0!==+t._high_barrier.price),i=r.findIndex(t=>t._high_barrier===this);for(let e=0;e<r.length;e++){if(e===i)continue;const a=r[e],s=a._high_barrier.top&&Math.abs(a._high_barrier.top-t);if(s&&s<25)return!0}return!1}get isMobile(){return this.mainStore.chart.isMobile}}function m(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class p{constructor(t){m(this,"_div",null),m(this,"className",""),m(this,"visible",!1),m(this,"setPosition",({top:t,bottom:e,right:r})=>{if(this._div){let i=null;if(e&&t){i=`translate(${-r}px, ${(e+t)/2+60}px) scale(1, ${(e-t)/120})`}else e?i=`translate(${-r}px, ${e}px)`:t&&(i=`translate(${-r}px, ${t+120}px)`);this._div.style.transform=i}}),m(this,"setShadeRef",t=>{this._div=t}),(0,s.makeObservable)(this,{className:s.observable,visible:s.observable}),this.className=t}}function f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class _{static get SHADE_NONE_SINGLE(){return"SHADE_NONE_SINGLE"}static get SHADE_NONE_DOUBLE(){return"SHADE_NONE_DOUBLE"}static get SHADE_ABOVE(){return"SHADE_ABOVE"}static get SHADE_BELOW(){return"SHADE_BELOW"}static get SHADE_BETWEEN(){return"SHADE_BETWEEN"}static get SHADE_OUTSIDE(){return"SHADE_OUTSIDE"}static get BARRIER_CHANGED(){return"BARRIER_CHANGED"}get pip(){return this.mainStore.chart.currentActiveSymbol?.decimal_places}constructor(t){f(this,"_high_barrier",void 0),f(this,"_low_barrier",void 0),f(this,"aboveShadeStore",void 0),f(this,"belowShadeStore",void 0),f(this,"betweenShadeStore",void 0),f(this,"mainStore",void 0),f(this,"title",void 0),f(this,"shadeColor",void 0),f(this,"color",void 0),f(this,"foregroundColor",void 0),f(this,"backgroundColor",void 0),f(this,"isBetweenShadeVisible",!1),f(this,"isTopShadeVisible",!1),f(this,"isBottomShadeVisible",!1),f(this,"hidePriceLines",!1),f(this,"lineStyle",void 0),f(this,"isInitialized",!1),f(this,"initializePromise",(0,n.A)()),f(this,"hideBarrierLine",!1),f(this,"hideOffscreenLine",!1),f(this,"hideOffscreenBarrier",!1),f(this,"isSingleBarrier",!1),f(this,"_shadeState",""),f(this,"disposeDrawReaction",void 0),f(this,"onChartLoaded",()=>{this.init(),this.disposeDrawReaction=(0,s.reaction)(()=>[this.mainStore.chartAdapter.epochBounds,this.mainStore.chartAdapter.quoteBounds],this._drawShadedArea),this.mainStore.chartAdapter.painter.registerCallback(this._drawShadedArea)}),f(this,"_onBarrierChange",null),f(this,"_fireOnBarrierChange",()=>{const t=this._high_barrier.visible?Number(this._high_barrier.price).toFixed(this.pip):void 0,e=this._low_barrier.visible?Number(this._low_barrier.price).toFixed(this.pip):void 0;"function"==typeof this._onBarrierChange&&this._onBarrierChange({high:t,low:e})}),f(this,"_drawShadedArea",()=>{if(this.isInitialized&&(this._shadeState===_.SHADE_ABOVE?this._shadeAbove():this._shadeState===_.SHADE_BELOW?this._shadeBelow():this._shadeState===_.SHADE_BETWEEN?this._shadeBetween():this._shadeState===_.SHADE_OUTSIDE&&this._shadeOutside(),this._low_barrier.visible&&this._isBarriersOffScreen())){const t=0===this._high_barrier.top?null:101;this._high_barrier.zIndex=t}}),(0,s.makeObservable)(this,{backgroundColor:s.observable,color:s.observable,destructor:s.action.bound,foregroundColor:s.observable,hideBarrierLine:s.observable,hideOffscreenBarrier:s.observable,hideOffscreenLine:s.observable,hidePriceLines:s.observable,init:s.action.bound,initializePromise:s.observable,isBetweenShadeVisible:s.observable,isBottomShadeVisible:s.observable,isInitialized:s.observable,isSingleBarrier:s.observable,isTopShadeVisible:s.observable,lineStyle:s.observable,pip:s.computed,shadeColor:s.observable,updateProps:s.action.bound}),this.mainStore=t,this._high_barrier=new u(this.mainStore),this._low_barrier=new u(this.mainStore),this._high_barrier.onPriceChanged(this._drawShadedArea),this._low_barrier.onPriceChanged(this._drawShadedArea),this._high_barrier.onDragReleased(this._fireOnBarrierChange),this._low_barrier.onDragReleased(this._fireOnBarrierChange),this._setupConstrainBarrierPrices(),this.aboveShadeStore=new p("top-shade"),this.betweenShadeStore=new p("between-shade"),this.belowShadeStore=new p("bottom-shade"),this.shadeState=_.SHADE_NONE_SINGLE,(0,s.when)(()=>this.mainStore.chartAdapter.isChartLoaded,this.onChartLoaded),this.mainStore.chart._barriers.push(this)}init(){this.isInitialized=!0,this.initializePromise.resolve()}updateProps({color:t,foregroundColor:e,backgroundColor:r,shadeColor:i,shade:a,high:n,low:o,relative:l,draggable:h,onChange:u,hideBarrierLine:d,hideOffscreenBarrier:g,hideOffscreenLine:m,hidePriceLines:p,lineStyle:f,title:_,showOffscreenArrows:b,isSingleBarrier:v,opacityOnOverlap:y}){this.initializePromise.then((0,s.action)(()=>{if(t&&(this.color=t),e&&(this.foregroundColor=e),void 0!==r&&(this.backgroundColor=r),i&&(this.shadeColor=i),a&&(this.shadeState=`SHADE_${a}`.toUpperCase()),void 0!==l&&(this.relative=l),void 0!==h&&(this.draggable=h),void 0!==n){const t=(0,c.Jn)(n,this.pip);t!==this.high_barrier&&(this.high_barrier=t)}if(void 0!==o){const t=(0,c.Jn)(o,this.pip);t!==this.low_barrier&&(this.low_barrier=t)}u&&(this.onBarrierChange=u),_&&(this.title=_),this.lineStyle=f,this.hideBarrierLine=!!d,this.hidePriceLines=!!p,this.hideOffscreenLine=!!m,this.hideOffscreenBarrier=!!g,this.isSingleBarrier=!!v})),y&&(this.opacityOnOverlap=y),b&&(this.showOffscreenArrows=b)}destructor(){if(!this.context)return;this._high_barrier.destructor(),this._low_barrier.destructor(),this.disposeDrawReaction?.(),this.mainStore.chartAdapter.painter.unregisterCallback(this._drawShadedArea);const t=this.mainStore.chart._barriers.findIndex(t=>t===this);-1!==t&&this.mainStore.chart._barriers.splice(t,1)}get high_barrier(){return this._high_barrier.price}set high_barrier(t){this._high_barrier.price=t}get low_barrier(){return this._low_barrier.price}set low_barrier(t){this._low_barrier.price=t}_setupConstrainBarrierPrices(){this._high_barrier.priceConstrainer=t=>+(this._low_barrier.visible&&t<+this._low_barrier.realPrice?this._high_barrier.realPrice:t),this._low_barrier.priceConstrainer=t=>+(t>+this._high_barrier.realPrice?this._low_barrier.realPrice:t)}get context(){return this.mainStore.chart.context}set onBarrierChange(t){this._onBarrierChange!==t&&(this._onBarrierChange=t)}get shadeState(){return this._shadeState}set shadeState(t){if(this._shadeState===t)return;this._shadeState=t;if(this._shadeState===_.SHADE_NONE_SINGLE||this._shadeState===_.SHADE_NONE_DOUBLE)this.aboveShadeStore.visible=!1,this.betweenShadeStore.visible=!1,this.belowShadeStore.visible=!1;else{const t=this._shadeState===_.SHADE_ABOVE||this._shadeState===_.SHADE_OUTSIDE,e=this._shadeState===_.SHADE_BELOW||this._shadeState===_.SHADE_OUTSIDE,r=this._shadeState===_.SHADE_BETWEEN;this.aboveShadeStore.visible=t,this.betweenShadeStore.visible=r,this.belowShadeStore.visible=e,this._drawShadedArea()}const e=this._shadeState===_.SHADE_OUTSIDE||this._shadeState===_.SHADE_BETWEEN||this._shadeState===_.SHADE_NONE_DOUBLE,r=this._low_barrier.visible;this._low_barrier.visible=e,this.isInitialized&&e&&!r&&this._low_barrier.realPrice>=this._high_barrier.realPrice&&this.mainStore.chart.currentClose&&(this._low_barrier.price=(+this._high_barrier.price-this.mainStore.chart.currentClose).toString())}get relative(){return this._high_barrier.relative}set relative(t){this._high_barrier.relative=t,this._low_barrier.relative=t}get draggable(){return this._high_barrier.draggable}set draggable(t){this._high_barrier.draggable=t,this._low_barrier.draggable=t}get showOffscreenArrows(){return this._high_barrier.showOffscreenArrows}set showOffscreenArrows(t){this._high_barrier.showOffscreenArrows=t}get opacityOnOverlap(){return this._high_barrier.opacityOnOverlap}set opacityOnOverlap(t){this._high_barrier.opacityOnOverlap=t}_isBarriersOffScreen(){return this._high_barrier.offScreen&&this._low_barrier.offScreen}_shadeBetween(){this.betweenShadeStore.setPosition({top:this._high_barrier.top,bottom:this._low_barrier.top,right:this.mainStore.chart.yAxisWidth})}_shadeBelow(t=this._high_barrier){this.belowShadeStore.setPosition({top:t.top,bottom:0,right:this.mainStore.chart.yAxisWidth})}_shadeAbove(t=this._high_barrier){this.aboveShadeStore.setPosition({top:0,bottom:t.top,right:this.mainStore.chart.yAxisWidth})}_shadeOutside(){this._shadeAbove(this._high_barrier),this._shadeBelow(this._low_barrier)}}var b=d(8362),v=d(7671);const y=({StoreClass:t,...e})=>{const r=(0,b.gy)(),i=a().useRef();return(t=>{const e=a().useRef(!1);e.current||(t(),e.current=!0)})(()=>{i.current=new t(r)}),a().useEffect(()=>{i.current?.updateProps?.(e)}),a().useEffect(()=>()=>{i.current?.destructor?.()},[]),(0,v.jsx)(v.Fragment,{children:e.children(i.current)})},S=(t,e)=>({children:r,...i})=>(0,v.jsx)(y,{StoreClass:e,...i,children:e=>(0,v.jsx)(t,{store:e,...i,children:r})});var x=d(1186);const w=({offScreenDirection:t})=>{const e=t===c.X.UP?"23px":-c.KC+"px",r=t===c.X.DOWN?"rotate(180deg)":"";return t===c.X.UP?(0,v.jsx)(x.oX,{className:"arrow-icon",style:{top:e,transform:r}}):(0,v.jsx)(x.BC,{className:"arrow-icon",style:{top:e,transform:r}})},C=({color:t,yAxiswidth:e,title:r,opacity:i})=>(0,v.jsx)("div",{className:"title-wrapper",style:{color:t,right:e,opacity:i},children:(0,v.jsx)("span",{className:"title",children:r})}),T=({isOverlapping:t})=>(0,v.jsxs)("div",{className:e()("drag-icon",{"drag-icon--hidden":t}),children:[(0,v.jsx)("div",{className:e()({"drag-icon--hidden":t})}),(0,v.jsx)("div",{className:e()({"drag-icon--hidden":t})}),(0,v.jsx)("div",{className:e()({"drag-icon--hidden":t})})]}),k=(0,r.observer)(({lineStyle:t,backgroundColor:r,color:i,foregroundColor:s,hideOffscreenBarrier:n,opacityOnOverlap:o,hideOffscreenLine:l,hideBarrierLine:c,store:h,title:u})=>{const{className:d,draggable:g,init:m,isDragging:p,isMobile:f,isOverlapping:_,isOverlappingWithPriceLine:b,offScreen:y,offScreenDirection:S,overlappedBarrierWidth:x,priceDisplay:k,priceLineWidth:j,setDragLine:N,visible:E}=h,A=a().useMemo(()=>!(n&&y),[n,y]),I=a().useMemo(()=>!(c||l&&y||_),[c,l,y,_]),D=a().useMemo(()=>_?o:"",[_,o]);if(a().useEffect(()=>{m()},[m]),!A)return null;const O=j+18,P=f?20:3;return(0,v.jsx)("div",{className:e()("barrier-area",{"barrier-area--zero":b}),ref:N,hidden:!E,children:(0,v.jsxs)("div",{className:e()("chart-line","horizontal",d||"",{draggable:g,dragging:p}),style:{color:s},children:[I&&(0,v.jsx)("div",{className:e()("drag-line",{"drag-line--zero":b}),style:{borderTopColor:i,borderTopStyle:t,width:`calc(100% - ${O}px + ${f?0:x-4}px)`}}),(0,v.jsx)("div",{className:"draggable-area"}),(0,v.jsx)("div",{className:"draggable-area-wrapper",children:(0,v.jsxs)("div",{className:e()("drag-price",{"drag-price--narrow":b}),style:{backgroundColor:b?void 0:r,color:b?i:s,borderColor:i,width:g&&b?O+8:O-6,opacity:D,right:P},children:[(0,v.jsx)(T,{isOverlapping:b}),(0,v.jsx)("div",{className:e()("price",{"price--zero":b}),style:{color:b?i:"",right:b?x+6+8*k.length+(g?26:0):0},children:k}),(0,v.jsx)("div",{}),y&&S&&(0,v.jsx)(w,{offScreenDirection:S,color:i})]})}),u&&(0,v.jsx)(C,{color:i,title:u,yAxiswidth:O+P,opacity:D})]})})}),j=(0,r.observer)(({store:t})=>{const{visible:r,className:i,setShadeRef:a}=t;return(0,v.jsx)("div",{className:e()("shade",i,{hidden:!r}),ref:a,style:{top:-120}})}),N=S((0,r.observer)(({store:t,...r})=>{const{_high_barrier:i,_low_barrier:s,aboveShadeStore:n,belowShadeStore:o,betweenShadeStore:l,backgroundColor:c="#2C9AFF",color:h="#008832",foregroundColor:u="#ffffff",hideBarrierLine:d,hideOffscreenBarrier:g,hideOffscreenLine:m,hidePriceLines:p,isInitialized:f,isSingleBarrier:_,lineStyle:b,opacityOnOverlap:y,shadeColor:S="#008832"}=t,x=a().useRef(null);return a().useEffect(()=>{f&&x.current&&x.current.addEventListener("wheel",t=>{t.preventDefault()})},[f]),f?(0,v.jsxs)("div",{className:e()("barrier",{"hide-pricelines":p}),style:{"--shade-color":S},ref:x,children:[(0,v.jsx)(k,{store:i,lineStyle:b,backgroundColor:c,color:h,foregroundColor:u,hideOffscreenBarrier:g,hideOffscreenLine:m,hideBarrierLine:d,opacityOnOverlap:y,...r}),!_&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(k,{store:s,lineStyle:b,backgroundColor:c,color:h,foregroundColor:u,hideOffscreenBarrier:g,hideOffscreenLine:m,hideBarrierLine:d,opacityOnOverlap:y,...r}),(0,v.jsx)(j,{store:n}),(0,v.jsx)(j,{store:o}),(0,v.jsx)(j,{store:l})]})]}):null}),_);var E=d(1045),A=d(7149);d(8258),d(4282);const I=(0,r.observer)(({children:t,className:r,height:i,width:a,autoHide:s,freeze:n=!1,onScroll:o=()=>null,setPanel:l})=>{const{scroll:c}=(0,b.gy)(),{setScrollPanel:h,isHover:u}=c;return(0,v.jsx)("div",{ref:t=>{h(t),l&&l(t)},className:e()("sc-scrollbar",r,{"sc-scrollbar--freeze":n,"sc-scrollbar--auto-hide":s,"sc-scrollbar--hover":u}),onScroll:o,style:{maxHeight:i||"100%",maxWidth:a||"none"},children:t})});d(1849);const D=(0,r.observer)(({height:t,store:e,children:r})=>{const{getItems:i,onItemClick:a}=e,s="function"==typeof r?r:t=>t.text,n=t=>"ciq-list-item "+(t.disabled?"disabled":"")+" "+(t.active?"active":"");return(0,v.jsx)(I,{className:"ciq-list",autoHide:!0,height:t?`${t}px`:"",children:i().map((t,e)=>(0,v.jsx)("div",{className:n(t),onClick:()=>a(e,t),children:s(t)},t.id))})});var O=d(481),P=d(9160).t;const L=({Icon:t,...e})=>(0,v.jsx)(t,{...e}),M=(0,r.observer)(({enabled:t,newDesign:e,onChange:r})=>{const{chartType:i,chart:a,state:s,loader:n}=(0,b.gy)(),{listStore:o,setChartType:l,updateProps:h,types:u,type:d,menuStore:g}=i,{open:m,setOpen:p}=i.menuStore,{isActive:f}=n,{isMobile:_}=a,y=r||l;if(void 0===d)return null;return h(y),e?(0,v.jsx)("div",{className:"sc-chart-type",children:u.map(t=>{const e=t.icon;let r="sc-chart-type__item";r+=t.active&&!f?" sc-chart-type__item--active":"",r+=t.disabled||f?" sc-chart-type__item--disabled":"";return(0,v.jsxs)(A.A,{enabled:t.disabled&&!f&&!_,className:r,content:P.translate("Available only for non-tick time intervals."),onClick:()=>t.disabled||f?null:(t=>{d.id!==t.id&&(t.id&&s.stateChange(E.c4.CHART_TYPE_CHANGE,{chart_type_name:"colored_bar"===t.id?t.text:t.text.toLowerCase(),time_interval_name:(0,c.mI)(s.granularity,E.NI)}),y(t.id)),p(!1)})(t),children:[(0,v.jsx)(e,{}),(0,v.jsx)("span",{className:"text",children:P.translate(t.text)})]},t.id)})}):(0,v.jsxs)(O.A,{store:g,className:"ciq-display ciq-chart-types",enabled:t,title:P.translate("Chart types"),children:[(0,v.jsx)(O.A.Title,{children:(0,v.jsx)(L,{Icon:d.icon,className:"ic-icon-with-sub "+(m?"active":""),"tooltip-title":P.translate(d.text)})}),(0,v.jsx)(O.A.Body,{children:(0,v.jsx)("div",{className:"body",children:(0,v.jsx)(D,{height:260,store:o,children:t=>(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)("span",{className:"left",children:[(0,v.jsx)(L,{Icon:d.icon,className:"margin "+(t.active?"active":"")}),(0,v.jsx)("span",{className:"ciq-icon-text",children:t.text})]})})})})})]})});d(5511);var R=d(1109),B=(d(4321),d(809)),F=d(9160).t;const V=({title:t,type:e,children:r})=>(0,v.jsxs)("div",{className:"form__group "+(e?`form__group--${e}`:""),children:[t&&(0,v.jsx)("div",{className:"form__label",children:(0,v.jsxs)("span",{children:[" ",t," "]})}),(0,v.jsx)("div",{className:"form__control",children:r})]}),H=({id:t,label:e,checked:r,disabled:i,onChange:a})=>(0,v.jsx)("span",{onClick:()=>a(!r),children:(0,v.jsxs)("label",{htmlFor:t,className:`sc-checkbox ${r?"sc-checkbox--checked":""} ${i?"sc-checkbox--disabled":""}`,children:[r?(0,v.jsx)(x.FT,{className:"sc-checkbox__box"}):(0,v.jsx)(x.Ri,{className:"sc-checkbox__box"}),(0,v.jsx)("span",{className:"sc-checkbox__label",children:e})]})}),$=({min:t=1,max:e=10,step:r=1,value:i,onChange:a})=>{const s=B.useMemo(()=>{const r=Math.round(238*(i-t)/(e-t));return r<0?0:r},[i,t,e]),n=B.useCallback(t=>{let e=t.currentTarget.value;e.length>0&&a(Number(e))},[a]);return(0,v.jsxs)("div",{className:"sc-slider",children:[(0,v.jsxs)("div",{className:"sc-slider-range",children:[(0,v.jsx)("div",{className:"sc-slider-bar"}),(0,v.jsx)("div",{className:"sc-slider-active-bar",style:{width:s}}),(0,v.jsx)("input",{type:"range",min:t,max:e,step:r,onChange:n,value:i})]}),(0,v.jsx)("div",{className:"value",children:i})]})},q=t=>{const{subtitle:r,rows:i,children:a,value:s,onRowClick:n,className:o}=t,[l,c]=B.useState(!1),[h,u]=B.useState(0),[d,g]=B.useState(0),[m,p]=B.useState(),f=B.useRef(null),_=B.useRef(null),b=B.useCallback(()=>{const t=f.current?.getBoundingClientRect();u(l?void 0:t?.top),g(l?void 0:t?.left),p(t?.width),c(t=>!t)},[l,f]),y=B.useCallback(t=>{t.target!==_.current&&(c(!1),u(0),g(0))},[_]);return B.useEffect(()=>(document.addEventListener("click",y,!1),()=>{document.removeEventListener("click",y)}),[y]),(0,v.jsxs)("div",{className:e()(o,"sc-dropdown",{active:l}),ref:f,style:{left:d,top:h,width:m},children:[!!r&&(0,v.jsx)("div",{className:"subtitle",children:(0,v.jsx)("span",{children:r})}),(0,v.jsxs)("div",{className:e()("value",{active:l}),onClick:b,ref:_,children:[(0,v.jsx)("span",{className:"text",children:s}),(0,v.jsx)(x.HK,{})]}),(0,v.jsx)(I,{autoHide:!0,height:""+(l?"200px":"1px"),className:e()("dropdown",{active:l}),children:i.map((t,r)=>(0,v.jsx)("div",{className:e()("row",{"row--selected":t===s}),onClick:()=>n&&n(t),children:a(t)},r))})]})},U=({pattern:t,subtitle:e,lineWidth:r,onChange:i})=>(0,v.jsx)(q,{rows:[{width:1,pattern:"solid"},{width:3,pattern:"solid"},{width:5,pattern:"solid"},{width:1,pattern:"dotted"},{width:3,pattern:"dotted"},{width:5,pattern:"dotted"},{width:1,pattern:"dashed"},{width:3,pattern:"dashed"},{width:5,pattern:"dashed"},{width:0,pattern:"none"}],value:"none"!==t?(0,v.jsx)("span",{className:`option ${t}-${r}`}):(0,v.jsx)("span",{className:"none",children:"None"}),onRowClick:i,subtitle:e,children:t=>"none"!==t.pattern?(0,v.jsx)("span",{className:`option ${t.pattern}-${t.width}`}):(0,v.jsx)("span",{className:"none",children:"None"})}),z=({subtitle:t,color:r,theme:i,setColor:a})=>{const[s,n]=B.useState(!1),[o,l]=B.useState(0),[c,h]=B.useState(0),[u,d]=B.useState(),g=B.useRef(null),m=B.useRef(null),p=B.useMemo(()=>"auto"!==r?r:"light"===i?"#000000":"#ffffff",[r,i]),f=B.useCallback(()=>{const t=g.current?.getBoundingClientRect();l(s?void 0:t?.top),h(s?void 0:t?.left),d(t?.width),n(t=>!t)},[s,g]),_=B.useCallback(t=>{t.target!==m.current&&(n(!1),l(0),h(0))},[m]);return B.useEffect(()=>(document.addEventListener("click",_,!1),()=>{document.removeEventListener("click",_)}),[_]),(0,v.jsxs)("div",{ref:g,className:e()("sc-color-picker",{active:s}),style:{top:o,left:c,width:u},children:[!!t&&(0,v.jsx)("div",{className:"subtitle",children:(0,v.jsx)("span",{children:t})}),(0,v.jsxs)("div",{className:"value",onClick:f,ref:m,children:[(0,v.jsx)("div",{className:"sc-input-color",style:{backgroundColor:p}}),(0,v.jsx)(x.HK,{})]}),(0,v.jsx)("div",{className:e()("dropdown",{open:s}),children:[["#ffffff","#e1e1e1","#cccccc","#b7b7b7","#a0a0a5","#898989","#707070","#626262","#555555","#464646","#363636","#262626","#1d1d1d","#000000"],["#f4977c","#f7ac84","#fbc58d","#fff69e","#c4de9e","#85c99e","#7fcdc7","#75d0f4","#81a8d7","#8594c8","#8983bc","#a187bd","#bb8dbe","#f29bc1"],["#ef6c53","#f38d5b","#f8ae63","#fff371","#acd277","#43b77a","#2ebbb3","#00bff0","#4a8dc8","#5875b7","#625da6","#8561a7","#a665a7","#ee6fa9"],["#ea1d2c","#ee652e","#f4932f","#fff126","#8ec648","#00a553","#00a99c","#00afed","#0073ba","#0056a4","#323390","#66308f","#912a8e","#e9088c"],["#9b0b16","#9e4117","#a16118","#c6b920","#5a852d","#007238","#00746a","#0077a1","#004c7f","#003570","#1d1762","#441261","#62095f","#9c005d"],["#770001","#792e03","#7b4906","#817a0b","#41661e","#005827","#005951","#003b5c","#001d40","#000e35","#04002c","#19002b","#2c002a","#580028"]].map((t,e)=>(0,v.jsx)("div",{className:"row",children:t.map(t=>(0,v.jsx)("div",{className:"tile-color",style:{backgroundColor:t},onClick:()=>a(t)},t))},e))})]})},G=({value:t,onChange:e})=>(0,v.jsx)("div",{className:"sc-switch "+(t?"on":"off"),onClick:()=>e(!t),children:(0,v.jsx)("div",{className:"handle"})}),W=({id:t,label:e,value:r,onChange:i,noramIcon:a,activeIcon:s})=>{const n=r?s:a;return(0,v.jsxs)("div",{className:"sc-switch-icon",children:[(0,v.jsx)(n,{className:"sc-switch-icon__icon"}),(0,v.jsx)("div",{className:"sc-switch-icon__description",children:(0,v.jsx)(H,{id:t,label:e,checked:r,onChange:i})})]})},K=({subtitle:t,onChange:e,min:r,max:i,step:a,value:s})=>{const[n,o]=B.useState(""),l=(0,R.s)(()=>{const t=t=>{o(t),e(t)};void 0!==i&&+n>i?t(i):void 0!==r&&+n<r?t(r):e(n)},300,{leading:!0,trailing:!1});return B.useEffect(()=>{o(s)},[s]),(0,v.jsxs)("div",{className:"sc-numeric-input",children:[(0,v.jsx)("input",{type:"number",value:n,onBlur:l,onChange:t=>{t.persist(),o(t.target.valueAsNumber||"")},onKeyPress:t=>{["e","+","E"].includes(t.key)&&t.preventDefault(),"Enter"===t.key&&l()},min:r,max:i,step:a}),!!t&&(0,v.jsx)("div",{className:"subtitle",children:(0,v.jsx)("span",{children:t})}),(0,v.jsxs)("div",{className:"sc-numeric-input-buttons",children:[(0,v.jsx)(x.rW,{onClick:()=>{o(t=>+t+1),l()}}),(0,v.jsx)(x.PG,{onClick:()=>{o(t=>+t-1),l()}})]})]})},Q=({props:t,theme:e,onChange:r})=>{const{value:i,color:a}=t;return(0,v.jsxs)("span",{className:"sc-numbercolorpicker",children:[(0,v.jsx)(K,{value:i,subtitle:F.translate("Size"),onChange:t=>r({color:a,value:t})}),(0,v.jsx)(z,{color:a,theme:e,subtitle:F.translate("Color"),setColor:t=>r({color:t,value:i})})]})},Y=({className:t,children:e,active:r,onChange:i})=>(0,v.jsx)("div",{onClick:()=>i(!r),className:`${t||""} ${r?"active":""} sc-toggle`,children:e}),X=({onChange:t,value:e})=>{const r=r=>t({...e,...r}),{style:i,weight:a}=e;return(0,v.jsxs)("span",{className:"sc-fontsetting",children:[(0,v.jsx)(Y,{onChange:t=>r({weight:t?"bold":void 0}),active:!!a,children:(0,v.jsx)("div",{className:"sc-text-icon",children:(0,v.jsx)("b",{children:"B"})})}),(0,v.jsx)(Y,{active:!!i,onChange:t=>r({style:t?"italic":void 0}),children:(0,v.jsx)("div",{className:"sc-text-icon",children:(0,v.jsx)("i",{children:"i"})})}),(0,v.jsx)(q,{className:"sc-changefontsize",rows:[8,10,12,13,14,16,20,28,36,48,64],onRowClick:t=>r({size:`${t}px`}),children:t=>(0,v.jsx)("span",{className:"option",children:t})}),(0,v.jsx)(q,{className:"sc-changefontfamily",rows:["Default","Helvetica","Courier","Garamond","Palatino","Times New Roman"],onRowClick:t=>r({family:t}),children:t=>(0,v.jsx)("span",{className:"option",children:t})})]})};d(931);var Z=d(1695),J=d(9160).t;const tt=(0,r.observer)(({item:t,category:r,onClick:i,isLoading:s})=>{const{timeperiod:n,chartType:o,chart:l,state:c}=(0,b.gy)(),h=o.type.id,{allowTickChartTypeOnly:u}=c,{mainStore:d}=n,{granularity:g}=l,m=d.chart.isMobile,p=a().useMemo(()=>"tick"===r.key,[r]),f=a().useMemo(()=>((t,e,r)=>t&&e===r)(s,t.interval,g),[s,t,g]),_=a().useMemo(()=>((t,e,r)=>!t&&"line"!==r&&"tick"===e)(m,r.key,h),[m,r.key,h]),y=a().useMemo(()=>p&&"line"!==h||!p&&u,[p,h,u]),S=t.interval===g,x=a().useCallback(()=>i(h,r.key,t.interval),[h,r,t,i]);return(0,v.jsx)(A.A,{onClick:x,className:e()("sc-interval__item",{"sc-interval__item--active":S,"sc-interval__item--disabled":y||s,"pre-loading":f}),enabled:_,content:J.translate('Available only for "Area" chart type.'),children:(0,v.jsx)(Z.F,{enabled:f,children:(0,v.jsxs)("span",{children:[t.num," ",J.translate(1===t.num?r.single:r.plural)]})})},t.interval)}),et=(0,r.observer)(({portalNodeId:t,onChange:e})=>{const{timeperiod:r,loader:i}=(0,b.gy)(),{changeGranularity:s,setGranularity:n,updateProps:o,updatePortalNode:l}=r,{isActive:c}=i,h=e||n,u=(t,e,r)=>{c||"tick"===e&&"line"!==t||s(r)};return a().useEffect(()=>o(h)),l(t),(0,v.jsxs)("div",{className:"sc-interval",children:[(0,v.jsx)("div",{className:"sc-interval__head",children:(0,v.jsx)("strong",{children:J.translate("Time interval")})}),(0,v.jsx)("div",{className:"sc-interval__info",children:J.translate('Tick interval only available for "Area" Chart type.')}),(0,v.jsx)("div",{className:"sc-interval__content",children:E.NI.map(t=>t.items.map(e=>(0,v.jsx)(tt,{item:e,category:t,onClick:u,isLoading:c},e.interval)))})]})}),rt=({className:t="info-footnote",isMobile:r=!1,text:i})=>(0,v.jsx)("div",{className:e()(t,{[`${t}--mobile`]:r}),children:i}),it=a().memo(rt);var at=d(9160).t;const st={line:x.Qg,candles:x.kO,ohlc:x.Zt,hollow:x.Mz},nt=(0,r.observer)(({onChartType:t,onGranularity:r,portalNodeId:i=""})=>{const{chart:a,chartMode:s,chartType:n,timeperiod:o,state:l,chartSetting:c}=(0,b.gy)(),{menuStore:h}=s,{allowTickChartTypeOnly:u}=l,{isMobile:d}=a,{type:g}=n,{display:m}=o,{isSmoothChartEnabled:p,toggleSmoothChart:f}=c,_=s.menuStore.open,y=st[g.id];return(0,v.jsxs)(O.A,{className:"ciq-display sc-chart-mode",title:at.translate("Chart types"),tooltip:at.translate("Chart types"),modalMode:!0,isFullscreen:!0,portalNodeId:i,store:h,children:[(0,v.jsx)(O.A.Title,{children:(0,v.jsxs)("div",{className:e()("sc-chart-mode__menu",{"sc-chart-mode__menu--active":_}),children:[d&&(0,v.jsx)("span",{className:"sc-chart-mode__menu__duration",children:m}),!d&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("span",{className:"sc-chart-mode__menu__timeperiod",children:m}),(0,v.jsx)(y,{"tooltip-title":at.translate(g.text)})]})]})}),(0,v.jsxs)(O.A.Body,{children:[(0,v.jsxs)("div",{className:"sc-chart-mode__section",children:[(0,v.jsx)("div",{className:"sc-chart-mode__section__item",children:(0,v.jsx)(M,{newDesign:!0,onChange:t})}),(0,v.jsx)("div",{className:"sc-chart-mode__section__item",children:(0,v.jsx)(et,{newDesign:!0,portalNodeId:i,onChange:r})})]}),(0,v.jsx)("div",{className:"sc-chart-mode__smooth-toggle",children:(0,v.jsxs)("div",{className:"sc-chart-mode__smooth-toggle-content",children:[(0,v.jsxs)("div",{className:"sc-chart-mode__smooth-toggle-text",children:[(0,v.jsx)("div",{className:"sc-chart-mode__smooth-toggle-title",children:at.translate("Smooth chart movement")}),(0,v.jsx)("div",{className:"sc-chart-mode__smooth-toggle-description",children:at.translate("Performance may vary by device. Turn off if it lags.")})]}),(0,v.jsx)(G,{value:p,onChange:f})]})}),u&&(0,v.jsx)(it,{isMobile:d,text:at.translate("Only selected charts and time intervals are available for this trade type.")})]})]})});var ot=d(8713);function lt(t){return e=>!!e.type&&e.type.tabsRole===t}const ct=lt("Tab"),ht=lt("TabList"),ut=lt("TabPanel");function dt(t,e){return i.Children.map(t,t=>null===t?null:function(t){return ct(t)||ht(t)||ut(t)}(t)?e(t):t.props&&t.props.children&&"object"==typeof t.props.children?(0,i.cloneElement)(t,Object.assign({},t.props,{children:dt(t.props.children,e)})):t)}function gt(t,e){return i.Children.forEach(t,t=>{null!==t&&(ct(t)||ut(t)?e(t):t.props&&t.props.children&&"object"==typeof t.props.children&&(ht(t)&&e(t),gt(t.props.children,e)))})}function mt(t,e,r){let i,a=0,s=0,n=!1;const o=[];return gt(t[e],t=>{ht(t)&&(t.props&&t.props.children&&"object"==typeof t.props.children&>(t.props.children,t=>o.push(t)),n&&(i=new Error("Found multiple 'TabList' components inside 'Tabs'. Only one is allowed.")),n=!0),ct(t)?(n&&-1!==o.indexOf(t)||(i=new Error("Found a 'Tab' component outside of the 'TabList' component. 'Tab' components have to be inside the 'TabList' component.")),a++):ut(t)&&s++}),i||a===s||(i=new Error(`There should be an equal number of 'Tab' and 'TabPanel' in \`${r}\`. Received ${a} 'Tab' and ${s} 'TabPanel'.`)),i}function pt(t){var e,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=pt(t[e]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}const ft=function(){for(var t,e,r=0,i="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=pt(t))&&(i&&(i+=" "),i+=e);return i};function _t(t){let e=0;return gt(t,t=>{ct(t)&&e++}),e}const bt=["children","className","disabledTabClassName","domRef","focus","forceRenderTabPanel","onSelect","selectedIndex","selectedTabClassName","selectedTabPanelClassName","environment","disableUpDownKeys","disableLeftRightKeys"];function vt(t){return t&&"getAttribute"in t}function yt(t){return vt(t)&&t.getAttribute("data-rttab")}function St(t){return vt(t)&&"true"===t.getAttribute("aria-disabled")}let xt;const wt={className:"react-tabs",focus:!1},Ct={children:mt},Tt=t=>{(0,ot.checkPropTypes)(Ct,t,"prop","UncontrolledTabs");let e=(0,i.useRef)([]),r=(0,i.useRef)([]);const s=(0,i.useRef)();function n(e,r){if(e<0||e>=c())return;const{onSelect:i,selectedIndex:a}=t;i(e,a,r)}function o(t){const e=c();for(let r=t+1;r<e;r++)if(!St(h(r)))return r;for(let e=0;e<t;e++)if(!St(h(e)))return e;return t}function l(t){let e=t;for(;e--;)if(!St(h(e)))return e;for(e=c();e-- >t;)if(!St(h(e)))return e;return t}function c(){const{children:e}=t;return _t(e)}function h(t){return e.current[`tabs-${t}`]}function u(t){let e=t.target;do{if(d(e)){if(St(e))return;return void n([].slice.call(e.parentNode.children).filter(yt).indexOf(e),t)}}while(null!=(e=e.parentNode))}function d(t){if(!yt(t))return!1;let e=t.parentElement;do{if(e===s.current)return!0;if(e.getAttribute("data-rttabs"))break;e=e.parentElement}while(e);return!1}const g=Object.assign({},wt,t),{className:m,domRef:p}=g,f=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(g,bt);return a().createElement("div",Object.assign({},f,{className:ft(m),onClick:u,onKeyDown:function(e){const{direction:r,disableUpDownKeys:i,disableLeftRightKeys:a}=t;if(d(e.target)){let{selectedIndex:s}=t,d=!1,g=!1;"Space"!==e.code&&32!==e.keyCode&&"Enter"!==e.code&&13!==e.keyCode||(d=!0,g=!1,u(e)),(a||37!==e.keyCode&&"ArrowLeft"!==e.code)&&(i||38!==e.keyCode&&"ArrowUp"!==e.code)?(a||39!==e.keyCode&&"ArrowRight"!==e.code)&&(i||40!==e.keyCode&&"ArrowDown"!==e.code)?35===e.keyCode||"End"===e.code?(s=function(){let t=c();for(;t--;)if(!St(h(t)))return t;return null}(),d=!0,g=!0):36!==e.keyCode&&"Home"!==e.code||(s=function(){const t=c();for(let e=0;e<t;e++)if(!St(h(e)))return e;return null}(),d=!0,g=!0):(s="rtl"===r?l(s):o(s),d=!0,g=!0):(s="rtl"===r?o(s):l(s),d=!0,g=!0),d&&e.preventDefault(),g&&n(s,e)}},ref:t=>{s.current=t,p&&p(t)},"data-rttabs":!0}),function(){let s=0;const{children:n,disabledTabClassName:o,focus:l,forceRenderTabPanel:u,selectedIndex:d,selectedTabClassName:g,selectedTabPanelClassName:m,environment:p}=t;r.current=r.current||[];let f=r.current.length-c();const _=(0,i.useId)();for(;f++<0;)r.current.push(`${_}${r.current.length}`);return dt(n,t=>{let n=t;if(ht(t)){let s=0,c=!1;null==xt&&function(t){const e=t||("undefined"!=typeof window?window:void 0);try{xt=!(void 0===e||!e.document||!e.document.activeElement)}catch(t){xt=!1}}(p);const u=p||("undefined"!=typeof window?window:void 0);xt&&u&&(c=a().Children.toArray(t.props.children).filter(ct).some((t,e)=>u.document.activeElement===h(e))),n=(0,i.cloneElement)(t,{children:dt(t.props.children,t=>{const a=`tabs-${s}`,n=d===s,h={tabRef:t=>{e.current[a]=t},id:r.current[s],selected:n,focus:n&&(l||c)};return g&&(h.selectedClassName=g),o&&(h.disabledClassName=o),s++,(0,i.cloneElement)(t,h)})})}else if(ut(t)){const e={id:r.current[s],selected:d===s};u&&(e.forceRender=u),m&&(e.selectedClassName=m),s++,n=(0,i.cloneElement)(t,e)}return n})}())},kt=["children","defaultFocus","defaultIndex","focusTabOnClick","onSelect"];const jt={children:mt,onSelect:function(t,e,r,i,a){const s=t[e],n=a||e;let o=null;return s&&"function"!=typeof s?o=new Error(`Invalid ${i} \`${n}\` of type \`${typeof s}\` supplied to \`${r}\`, expected \`function\`.`):null!=t.selectedIndex&&null==s&&(o=new Error(`The ${i} \`${n}\` is marked as required in \`${r}\`, but its value is \`undefined\` or \`null\`.\n\`onSelect\` is required when \`selectedIndex\` is also set. Not doing so will make the tabs not do anything, as \`selectedIndex\` indicates that you want to handle the selected tab yourself.\nIf you only want to set the inital tab replace \`selectedIndex\` with \`defaultIndex\`.`)),o},selectedIndex:function(t,e,r,i,a){const s=t[e],n=a||e;let o=null;if(null!=s&&"number"!=typeof s)o=new Error(`Invalid ${i} \`${n}\` of type \`${typeof s}\` supplied to \`${r}\`, expected \`number\`.`);else if(null!=t.defaultIndex&&null!=s)return new Error(`The ${i} \`${n}\` cannot be used together with \`defaultIndex\` in \`${r}\`.\nEither remove \`${n}\` to let \`${r}\` handle the selected tab internally or remove \`defaultIndex\` to handle it yourself.`);return o}},Nt={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},Et=t=>{(0,ot.checkPropTypes)(jt,t,"prop","Tabs");const e=Object.assign({},Nt,t),{children:r,defaultFocus:s,defaultIndex:n,focusTabOnClick:o,onSelect:l}=e,c=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(e,kt),[h,u]=(0,i.useState)(s),[d]=(0,i.useState)((t=>null===t.selectedIndex?1:0)(c)),[g,m]=(0,i.useState)(1===d?n||0:null);if((0,i.useEffect)(()=>{u(!1)},[]),1===d){const t=_t(r);(0,i.useEffect)(()=>{if(null!=g){const e=Math.max(0,t-1);m(Math.min(g,e))}},[t])}let p=Object.assign({},t,c);return p.focus=h,p.onSelect=(t,e,r)=>{"function"==typeof l&&!1===l(t,e,r)||(o&&u(!0),1===d&&m(t))},null!=g&&(p.selectedIndex=g),delete p.defaultFocus,delete p.defaultIndex,delete p.focusTabOnClick,a().createElement(Tt,p,r)};Et.tabsRole="Tabs";const At=Et,It=["children","className"];const Dt={className:"react-tabs__tab-list"},Ot=t=>{const e=Object.assign({},Dt,t),{children:r,className:i}=e,s=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(e,It);return a().createElement("ul",Object.assign({},s,{className:ft(i),role:"tablist"}),r)};Ot.tabsRole="TabList";const Pt=Ot,Lt=["children","className","disabled","disabledClassName","focus","id","selected","selectedClassName","tabIndex","tabRef"];const Mt="react-tabs__tab",Rt={className:Mt,disabledClassName:`${Mt}--disabled`,focus:!1,id:null,selected:!1,selectedClassName:`${Mt}--selected`},Bt=t=>{let e=(0,i.useRef)();const r=Object.assign({},Rt,t),{children:s,className:n,disabled:o,disabledClassName:l,focus:c,id:h,selected:u,selectedClassName:d,tabIndex:g,tabRef:m}=r,p=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(r,Lt);return(0,i.useEffect)(()=>{u&&c&&e.current.focus()},[u,c]),a().createElement("li",Object.assign({},p,{className:ft(n,{[d]:u,[l]:o}),ref:t=>{e.current=t,m&&m(t)},role:"tab",id:`tab${h}`,"aria-selected":u?"true":"false","aria-disabled":o?"true":"false","aria-controls":`panel${h}`,tabIndex:g||(u?"0":null),"data-rttab":!0}),s)};Bt.tabsRole="Tab";const Ft=Bt,Vt=["children","className","forceRender","id","selected","selectedClassName"];const Ht="react-tabs__tab-panel",$t={className:Ht,forceRender:!1,selectedClassName:`${Ht}--selected`},qt=t=>{const e=Object.assign({},$t,t),{children:r,className:i,forceRender:s,id:n,selected:o,selectedClassName:l}=e,c=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(e,Vt);return a().createElement("div",Object.assign({},c,{className:ft(i,{[l]:o}),role:"tabpanel",id:`panel${n}`,"aria-labelledby":`tab${n}`}),s||o?r:null)};qt.tabsRole="TabPanel";const Ut=qt,zt=({notificationCount:t})=>t?(0,v.jsx)("span",{className:e()("sc-notification-badge",{x2:t>9}),children:t}):null;d(7209),d(6351);const Gt=(0,r.observer)(({placeholder:t,value:r,searchInput:i,searchInputClassName:a,onChange:s})=>(0,v.jsxs)("div",{className:e()("sc-search-input",{active:""!==r.trim()}),children:[(0,v.jsx)("input",{className:a,value:r,ref:i,onChange:t=>s(t.target.value),type:"text",spellCheck:"false",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",placeholder:t}),(0,v.jsx)(x.WI,{}),(0,v.jsx)(x.kU,{className:"icon-reset",onClick:()=>s("")})]}));var Wt=d(9160).t;const Kt=({Icon:t})=>(0,v.jsx)(t,{}),Qt=()=>(0,v.jsxs)("div",{className:"sc-studies--empty",children:[(0,v.jsx)(x.qX,{}),(0,v.jsx)("p",{children:Wt.translate("You have no active indicators yet.")})]}),Yt=({text:t})=>(0,v.jsxs)("div",{className:"sc-studies--empty",children:[(0,v.jsxs)("strong",{children:[Wt.translate("No results for")," “",t,"”"]}),(0,v.jsx)("p",{children:Wt.translate("Try checking your spelling or use a different term")})]}),Xt=({items:t,onSelectItem:r,onDeleteItem:i,onEditItem:a,onInfoItem:s,disableAll:n,isTick:o})=>(0,v.jsx)("div",{className:"sc-studies__list",children:t.map(t=>(0,v.jsx)("div",{className:e()("sc-studies__list__item ",{"sc-studies__list__item--disabled":n,"sc-studies__list__item--disabled-prediction":t.isPrediction&&o}),children:(0,v.jsxs)(A.A,{className:"sc-studies__list__item__box",enabled:!!((a||i)&&t.bars&&t.bars.length>30)||t.isPrediction&&o,content:t.isPrediction&&o?Wt.translate("This indicator does not support 1-tick intervals. To use this indicator, change your chart time interval to 1 minute or more."):`${t.name} ${t.bars?`(${t.bars})`:""}`,children:[(0,v.jsxs)("div",{className:"info",onClick:()=>r?.(t.flutter_chart_id),onTouchEnd:()=>r?.(t.flutter_chart_id),children:[(0,v.jsx)(Kt,{Icon:t.icon}),(0,v.jsxs)("div",{className:"text",children:[(0,v.jsx)("span",{children:i?t.short_name_and_index:t.name}),t.bars&&(0,v.jsxs)("small",{children:["(",t.bars,")"]})]})]}),(0,v.jsxs)("div",{className:"detail",children:[s&&(0,v.jsx)(x.ee,{className:"ic-info",onClick:()=>s(t)}),a&&(0,v.jsx)(x.sY,{onClick:()=>a(t)}),i&&(0,v.jsx)(x.d7,{onClick:()=>i(t.id)})]})]})},`item--${t.id||t.flutter_chart_id}`))}),Zt=({categories:t,onSelectItem:e,onInfoItem:r,disableAll:i,isTick:a})=>(0,v.jsx)(I,{autoHide:!0,children:t.map(t=>(0,v.jsxs)("div",{className:"sc-studies__category",children:[(0,v.jsx)("div",{className:"sc-studies__category__head",children:t.name}),(0,v.jsx)("div",{className:"sc-studies__category__body",children:(0,v.jsx)(Xt,{items:t.foundItems||[],onSelectItem:e,onInfoItem:r,disableAll:i,isTick:a})})]},t.name))}),Jt=({items:t,onDeleteItem:e,onEditItem:r,clearAll:i,isMobile:a})=>(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("div",{className:"sc-studies__panel__head",children:[(0,v.jsx)("p",{children:a?Wt.translate("Up to 2 active indicators allowed."):Wt.translate("Up to 5 active indicators allowed.")}),(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--sm sc-btn--outline-secondary",onClick:()=>i(),children:Wt.translate("Clear all")})]}),(0,v.jsx)("div",{className:"sc-studies__panel__content sc-studies__panel__content--active",children:(0,v.jsx)(Xt,{items:t,onDeleteItem:e,onEditItem:r})})]}),te=({onSelectTab:t,selectedTab:e,categories:r,searchedCategories:i,onSelectItem:a,onDeleteItem:s,onEditItem:n,onInfoItem:o,activeItems:l,clearAll:c,searchQuery:h,isMobile:u,maxAllowedItem:d,isTick:g})=>(0,v.jsxs)(At,{className:"tabs--vertical",selectedIndex:e,onSelect:t,children:[(0,v.jsxs)(Pt,{children:[(0,v.jsx)(Ft,{className:"hidden"},"hidden"),(0,v.jsxs)(Ft,{children:[(0,v.jsx)(x.CL,{}),(0,v.jsx)("span",{children:Wt.translate("Active")}),(0,v.jsx)(zt,{notificationCount:l.length})]},"active"),r.map(t=>(0,v.jsxs)(Ft,{children:[(0,v.jsx)(Kt,{Icon:t.icon}),(0,v.jsx)("span",{children:t.name})]},`tab--${t.name}`))]}),(0,v.jsx)(Ut,{children:(0,v.jsx)("div",{className:"sc-studies__panel sc-studies__panel--search",children:i.length?(0,v.jsx)(Zt,{categories:i,onSelectItem:a,onInfoItem:o,disableAll:l.length===(u?2:5),isTick:g}):(0,v.jsx)(Yt,{text:h})})},"panel--search"),(0,v.jsx)(Ut,{children:(0,v.jsx)("div",{className:"sc-studies__panel sc-studies__panel--active",children:l.length?(0,v.jsx)(Jt,{clearAll:c,items:l,onDeleteItem:s,onEditItem:n,isMobile:u}):(0,v.jsx)(Qt,{})})},"panel--active"),r.map(t=>(0,v.jsx)(Ut,{children:(0,v.jsxs)("div",{className:"sc-studies__panel",children:[(0,v.jsx)("h3",{children:t.name}),(0,v.jsx)(Xt,{onSelectItem:a,onInfoItem:o,items:t.items,disableAll:l.length===d,isTick:g})]})},`panel--${t.name}`))]}),ee=(0,r.observer)(({portalNodeId:t})=>{const{studies:e,chart:r,state:i,timeperiod:a}=(0,b.gy)(),{menuStore:s,deleteAllStudies:n,items:o,searchedItems:l,filterText:c,selectedTab:h,onSelectTab:u,onSelectItem:d,activeItems:g,deleteStudyById:m,editStudy:p,onInfoItem:f,infoItem:_,updatePortalNode:y,maxAllowedItem:S,setFilterText:w,searchInput:C}=e,{isTick:T}=a,{isMobile:k}=r,j=s.open,N=g.length;y(t);const D=(t,e,r)=>{i.stateChange(e,{indicator_type_name:t,indicators_category_name:(0,E.jY)(t),...r??{}})};return(0,v.jsxs)(O.A,{store:s,className:"sc-studies",title:Wt.translate("Indicators"),tooltip:Wt.translate("Indicators"),modalMode:!0,enableTabular:!0,portalNodeId:t,customHead:_?(0,v.jsxs)("div",{className:"sc-dialog__head--info",children:[(0,v.jsx)(x.Z3,{onClick:()=>{f(null),D(_.flutter_chart_id,E.c4.INDICATOR_INFO_TOGGLE)}}),_.flutter_chart_id]}):(0,v.jsx)("div",{className:"sc-dialog__head--search",children:(0,v.jsx)(Gt,{placeholder:Wt.translate("Search"),searchInputClassName:"searchInputClassName",value:c,onChange:w,searchInput:C})}),children:[(0,v.jsx)(O.A.Title,{children:(0,v.jsxs)("div",{className:"sc-studies__menu "+(j?"sc-studies__menu--active":""),children:[(0,v.jsx)(x.Np,{}),(0,v.jsx)(zt,{notificationCount:N})]})}),(0,v.jsxs)(O.A.Body,{children:[_&&(0,v.jsxs)("div",{className:"sc-studies__info",children:[(0,v.jsx)(I,{autoHide:!0,height:"360px",className:"sc-studies__info__content",children:(0,v.jsx)("p",{children:_?.description})}),(0,v.jsx)("div",{className:"sc-studies__info__footer",children:(0,v.jsx)(A.A,{enabled:_?.disabledAddBtn,content:E.Sn.predictionIndicator,children:(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary sc-btn--w100",onClick:()=>{d(_?.flutter_chart_id),D(_?.flutter_chart_id,E.c4.INDICATOR_ADDED,{is_info_open:!0})},disabled:_?.disabledAddBtn,children:Wt.translate("Add")})})})]}),(0,v.jsx)(te,{onSelectTab:u,selectedTab:h,categories:o,searchedCategories:l,onSelectItem:t=>{d(t),D(t,E.c4.INDICATOR_ADDED)},onDeleteItem:t=>{m(t)},onEditItem:t=>{p(t)},onInfoItem:t=>{f(t),D(t.flutter_chart_id,E.c4.INDICATOR_INFO_TOGGLE,{is_info_open:!0})},activeItems:g,clearAll:()=>{n(),i.stateChange(E.c4.INDICATORS_CLEAR_ALL)},searchQuery:c,isMobile:k,maxAllowedItem:S,isTick:T})]})]})});d(6238);var re=d(9160).t;const ie=({disabled:t=!1,view:r,remove:i,onClick:a})=>(0,v.jsxs)(A.A,{className:"sc-views__views__list__item",onClick:t?void 0:a,enabled:r.name.length>27,content:(0,c.C1)(r.name,26),children:[(0,v.jsx)("div",{className:e()("text",{"text--disabled":t}),children:r.name}),(0,v.jsx)(x.d7,{onClick:i})]}),ae=({onClick:t})=>(0,v.jsxs)("div",{className:"sc-views--empty",children:[(0,v.jsx)(x.qX,{}),(0,v.jsx)("p",{children:re.translate("You have no saved templates yet.")}),(0,v.jsxs)("button",{type:"button",className:"sc-btn",onClick:t,children:[(0,v.jsx)(x.RE,{}),re.translate("Add new template")]})]}),se=({templateName:t,onCancel:e,onOverwrite:r})=>(0,v.jsxs)("div",{className:"sc-views--overwrite",children:[(0,v.jsxs)("div",{className:"sc-views--overwrite__content",children:[(0,v.jsx)(x._D,{}),(0,v.jsxs)("p",{children:[`${t} ${re.translate("already exists.")}`,(0,v.jsx)("br",{}),re.translate("Would you like to overwrite it?")]})]}),(0,v.jsxs)("div",{className:"sc-views--overwrite__footer",children:[(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--outline-secondary",onClick:e,children:re.translate("Cancel")}),(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary",onClick:r,children:re.translate("Overwrite")})]})]}),ne=({allowTickChartTypeOnly:t,views:e,removeAll:r,applyLayout:i,remove:a,onGranularity:s,onChartType:n})=>{if(!e.length)return null;const o=e=>{const{chartType:r,timeUnit:i}=e??{};return t&&!("line"===r&&"tick"===i)};return(0,v.jsxs)("div",{className:"sc-views__views",children:[(0,v.jsxs)("div",{className:"sc-views__views__head",children:[(0,v.jsx)("h5",{children:re.translate("Saved templates")}),(0,v.jsx)("button",{type:"button",onClick:r,className:"sc-btn sc-btn--sm sc-btn--outline-secondary",children:re.translate("Clear all")})]}),(0,v.jsx)("div",{className:"sc-views__views__content",children:(0,v.jsx)("div",{className:"sc-views__views__list",children:e.map((t,e)=>(0,v.jsx)(ie,{disabled:o(t.layout),view:t,onClick:t=>i(e,t,s,n),remove:t=>a(e,t)},t.name))})})]})},oe=(0,r.observer)(({portalNodeId:t,onChartType:r,onGranularity:i})=>{const{view:a,state:s,chart:n}=(0,b.gy)(),{allowTickChartTypeOnly:o}=s,{isMobile:l}=n,{sortedItems:c,routes:{main:h,overwrite:u},onChange:d,remove:g,onSubmit:m,applyLayout:p,inputRef:f,currentRoute:_,templateName:y,onToggleNew:S,saveViews:w,removeAll:C,isInputActive:T,onFocus:k,onBlur:j,menuStore:N}=a,E=N.dialogStore.open,A=T||""!==y;return(0,v.jsxs)(O.A,{store:N,className:"sc-views-menu",title:re.translate("Templates"),tooltip:re.translate("Templates"),modalMode:!0,portalNodeId:t,children:[(0,v.jsx)(O.A.Title,{children:(0,v.jsx)("div",{className:e()("sc-views__menu",{"sc-views__menu--active":E}),children:(0,v.jsx)(x.Ik,{})})}),(0,v.jsxs)(O.A.Body,{children:[(0,v.jsx)("div",{className:"sc-views",children:"new"===_?(0,v.jsx)(ae,{onClick:S}):(0,v.jsxs)(v.Fragment,{children:["overwrite"!==_?"":(0,v.jsx)(se,{templateName:y,onCancel:h,onOverwrite:u}),(0,v.jsxs)(I,{autoHide:!0,children:[(0,v.jsx)("div",{className:"form form--sc-views",children:(0,v.jsx)("div",{className:"form__input-group",children:(0,v.jsx)("div",{className:"form__group",children:(0,v.jsx)("div",{className:"form__control",children:(0,v.jsxs)("div",{className:e()("form--sc-views__input",{"form--sc-views__input--active":A}),children:[(0,v.jsx)("div",{className:"subtitle",children:(0,v.jsx)("span",{children:re.translate("Add new templates")})}),(0,v.jsx)("input",{type:"text",className:e()("sc-input",{"sc-input--active":A}),placeholder:A?"":re.translate("Add new templates"),ref:f,value:y,onKeyUp:m,onChange:d,onFocus:k,onClick:k,onBlur:j}),(0,v.jsx)("button",{type:"button",onClick:w,className:e()("sc-btn","sc-btn--primary",{"sc-btn--primary--disabled":!A}),children:(0,v.jsx)(x.RE,{})})]})})})})}),(0,v.jsx)(ne,{allowTickChartTypeOnly:o,views:c,removeAll:C,applyLayout:p,remove:g,onChartType:r,onGranularity:i})]})]})}),o&&(0,v.jsx)(it,{isMobile:l,text:re.translate("Some of your templates may not work with this trade type.")})]})]})});var le=d(9160).t;const ce=(0,r.observer)(()=>{const{chart:t,crosshair:e}=(0,b.gy)(),{isMobile:r}=t,i=e.isEnabled?x.RP:x.F2,a=e.isEnabled?le.translate("Disable Crosshair"):le.translate("Enable Crosshair");return(0,v.jsx)(A.A,{content:a,enabled:!r,position:"right",children:(0,v.jsx)(Y,{active:e.isEnabled,onChange:t=>e.updateEnabledState(t),children:(0,v.jsx)(i,{})})})});d(6765);var he=d(9160).t;const ue=(0,r.observer)(()=>{const{chartSize:t}=(0,b.gy)(),{zoomIn:e,zoomOut:r}=t;return(0,v.jsxs)("div",{className:"ciq-menu sc-chart-size",children:[(0,v.jsx)("div",{className:"cq-menu-btn",children:(0,v.jsx)(x.Lo,{className:"ic-icon-with-sub cq-zoom-out","tooltip-title":he.translate("Zoom out"),onClick:r})}),(0,v.jsx)("div",{className:"cq-menu-btn",children:(0,v.jsx)(x.AD,{className:"ic-icon-with-sub cq-zoom-in","tooltip-title":he.translate("Zoom in"),onClick:e})})]})});d(4001);var de=d(7394),ge=d(9160).t;const me=({enabled:t,children:e})=>t?(0,v.jsxs)("div",{className:"sc-dtools--empty",children:[(0,v.jsx)(x.qX,{}),(0,v.jsx)("p",{children:ge.translate("You have no active drawings yet.")})]}):(0,v.jsx)(v.Fragment,{children:e}),pe=({Icon:t,text:e,num:r,bars:i})=>(0,v.jsxs)("div",{className:"info",children:[t?(0,v.jsx)(t,{className:"icon"}):"",(0,v.jsxs)("div",{className:"text",children:[(0,v.jsx)("span",{children:ge.translate(e,{num:r||" "})}),i?(0,v.jsxs)("small",{children:["(",i," bars)"]}):""]})]}),fe=({items:t,onClick:r})=>(0,v.jsx)("div",{className:"sc-dtools__list",children:t.map(t=>(0,v.jsx)("div",{className:e()("sc-dtools__list__item",`sc-dtools__${t.id}`),onClick:()=>r(t.id),children:(0,v.jsx)(pe,{Icon:t.icon,text:t.text})},t.id))}),_e=({item:t,onDelete:e})=>(0,v.jsxs)("div",{className:"sc-dtools__list__item",children:[(0,v.jsx)(pe,{Icon:t.icon,text:t.text,bars:t.bars,num:t.num}),(0,v.jsx)("div",{className:"actions",children:(0,v.jsx)(x.d7,{onClick:()=>e(t.index)})})]}),be=({group:t,onDelete:e})=>(0,v.jsxs)("div",{className:"sc-dtools__category",children:[(0,v.jsx)("div",{className:"sc-dtools__category__head",children:ge.translate((0,de.ZH)(t.id))}),(0,v.jsx)("div",{className:"sc-dtools__category__body",children:(0,v.jsx)("div",{className:"sc-dtools__list",children:t.items.map(t=>(0,v.jsx)(_e,{item:{...t},onDelete:e},t.index))})})]}),ve=({activeDrawToolsGroup:t,onDelete:e})=>{const r=t.sort((t,e)=>t.items.length<=1&&e.items.length<=1?0:t.items.length<=1?-1:e.items.length<=1?1:0);return(0,v.jsx)(I,{autoHide:!0,height:320,children:r.map(t=>t.items.length>1?(0,v.jsx)(be,{group:t,onDelete:e},t.id):t.items.map(t=>(0,v.jsx)(_e,{item:t,onDelete:e},t.index)))})},ye=(0,r.observer)(({portalNodeId:t})=>{const{drawTools:r,chart:i}=(0,b.gy)(),{isMobile:a}=i,{clearAll:s,startAddingNewTool:n,getDrawToolsItems:o,activeToolsNo:l,activeToolsGroup:c,onDeleted:h,updatePortalNode:u,menuStore:d}=r,g=o(),m=d.open;return u(t),(0,v.jsxs)(O.A,{store:d,className:"sc-dtools",title:ge.translate("Drawing tools"),tooltip:ge.translate("Drawing tools"),modalMode:!0,enableTabular:!0,portalNodeId:t,children:[(0,v.jsx)(O.A.Title,{children:(0,v.jsxs)("div",{className:e()("sc-dtools__menu",{"sc-dtools__menu--active":m}),children:[a?(0,v.jsx)(x.W3,{}):(0,v.jsx)(x.sj,{}),(0,v.jsx)(zt,{notificationCount:l})]})}),(0,v.jsx)(O.A.Body,{children:(0,v.jsxs)(At,{className:e()({"tabs--vertical":!a,"tabs--horizontal":a}),children:[" ",(0,v.jsxs)(Pt,{children:[(0,v.jsxs)(Ft,{children:[(0,v.jsx)(x.CL,{}),ge.translate("Active"),(0,v.jsx)(zt,{notificationCount:l})]}),(0,v.jsxs)(Ft,{children:[(0,v.jsx)(x.sj,{}),ge.translate("All drawings")]})]}),(0,v.jsx)(Ut,{children:(0,v.jsx)("div",{className:"sc-dtools__panel",children:(0,v.jsxs)(me,{enabled:!l,children:[(0,v.jsx)("div",{className:"sc-dtools__panel__head",children:(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--sm sc-btn--outline-secondary",onClick:s,children:(0,v.jsx)("span",{children:ge.translate("Clear all")})})}),(0,v.jsx)("div",{className:"sc-dtools__panel__content sc-dtools__panel__content--active",children:(0,v.jsx)(ve,{activeDrawToolsGroup:c,onDelete:h})})]})})}),(0,v.jsx)(Ut,{children:(0,v.jsx)("div",{className:"sc-dtools__panel",children:(0,v.jsx)("div",{className:"sc-dtools__panel__content",children:(0,v.jsx)(fe,{items:g,onClick:n})})})})]})})]})});d(7808);var Se=d(9160).t;const xe=({title:t,id:e,label:r,value:i,onChange:a,noramIcon:s,activeIcon:n})=>(0,v.jsx)(V,{title:t,type:e,children:(0,v.jsx)(W,{id:e,label:r,value:i,onChange:a,noramIcon:s,activeIcon:n})}),we=(0,r.observer)(()=>{const{chartSetting:t}=(0,b.gy)(),{menuStore:r,countdown:i,historical:a,isHighestLowestMarkerEnabled:s,languages:n,language:o,setHistorical:l,setLanguage:c,setTheme:h,showCountdown:u,theme:d,toggleHighestLowestMarker:g}=t,m=r.dialogStore.open;return(0,v.jsxs)(O.A,{store:r,className:"sc-chart-setting",title:Se.translate("Platform settings"),enableTabular:!0,modalMode:!0,children:[(0,v.jsx)(O.A.Title,{children:(0,v.jsx)(x.sY,{className:e()("ic-icon-with-sub",{active:m}),"tooltip-title":Se.translate("Settings")})}),(0,v.jsx)(O.A.Body,{children:(0,v.jsxs)(At,{className:"tabs--vertical",children:[(0,v.jsxs)(Pt,{children:[(0,v.jsxs)(Ft,{children:[(0,v.jsx)(x.L0,{}),Se.translate("Themes")]},"theme"),(0,v.jsxs)(Ft,{children:[(0,v.jsx)(x.U,{}),Se.translate("Language")]},"language"),(0,v.jsxs)(Ft,{children:[(0,v.jsx)(x.Kx,{}),Se.translate("Charts")]},"platform")]}),(0,v.jsx)(Ut,{children:(0,v.jsx)("div",{className:"sc-chart-setting__panel",children:(0,v.jsxs)(V,{title:Se.translate("Select theme"),type:"theme",children:[(0,v.jsxs)("div",{className:e()("form__group__item",{"form__group__item--active":"dark"===d}),onClick:()=>h("dark"),children:[(0,v.jsx)(x.Zv,{}),(0,v.jsx)("div",{className:"text",children:Se.translate("Dark")})]}),(0,v.jsxs)("div",{className:e()("form__group__item",{"form__group__item--active":"light"===d}),onClick:()=>h("light"),children:[(0,v.jsx)(x.FV,{}),(0,v.jsx)("div",{className:"text",children:Se.translate("Light")})]})]})})}),(0,v.jsx)(Ut,{children:(0,v.jsx)("div",{className:"sc-chart-setting__panel",children:(0,v.jsx)(V,{title:Se.translate("Select language"),type:"language",children:n.map(t=>(0,v.jsxs)("div",{onClick:()=>c(t.key),className:e()("form__group__item",{"form__group__item--active":o?.key===t.key}),children:[t.icon,(0,v.jsx)("span",{className:"text",children:t.name})]},t.key))})})}),(0,v.jsx)(Ut,{children:(0,v.jsxs)("div",{className:"sc-chart-setting__panel",children:[(0,v.jsx)(xe,{title:Se.translate("Interval duration"),id:"countdown",label:Se.translate("Display remaining time for each interval"),value:i,onChange:u,noramIcon:x.ag[d].normal,activeIcon:x.ag[d].active}),(0,v.jsx)(xe,{title:Se.translate("Historical data mode"),id:"historical",label:Se.translate("Display data for a specific date and time"),value:a,onChange:l,noramIcon:x.fK[d].normal,activeIcon:x.fK[d].active}),(0,v.jsx)(V,{title:Se.translate("Highest and lowest spot"),children:(0,v.jsx)(W,{id:"highestlowest",label:Se.translate("Display the highest and lowest spot price"),value:s,onChange:g,noramIcon:x.fu[d].normal,activeIcon:x.fu[d].active})})]})})]})})]})});var Ce=d(6213);d(6853);d(7092);var Te=d(3457),ke=(d(8272),d(9160).t);const je=({x:t,bar:e})=>(0,v.jsxs)("div",{className:`cq-bar ${e.cName}`,style:{height:5*e.height+"%",left:35*t},children:[(0,v.jsx)("div",{className:`cq-bar-value ${e.height&&"show"}`,children:`${e.height.toFixed(1)}%`}),(0,v.jsx)("span",{className:"cq-bar-title",children:t})]}),Ne=(0,r.observer)(()=>{const{lastDigitStats:t}=(0,b.gy)(),{isVisible:r,bars:i,marketDisplayName:a,shouldMinimiseLastDigits:s}=t;return(0,v.jsxs)("div",{className:e()("cq-last-digits",{show:r,minimised:s}),children:[(0,v.jsx)("div",{className:"cq-bars",children:i.map((t,e)=>(0,v.jsx)(je,{x:e,bar:t},`bar-${e}`))}),(0,v.jsx)("div",{className:"cq-bar-footer",children:ke.translate("Last digits stats for latest 1000 ticks on ")+a})]})}),Ee=(0,r.observer)(({bottomWidgets:t})=>{const{state:e,lastDigitStats:r}=(0,b.gy)(),{showLastDigitStats:i}=e,{digits:a,lastTick:n}=r,o=!t&&i?Ne:t;return o?(0,v.jsx)(o,{digits:a,tick:(0,s.toJS)(n)}):null});d(8449);const Ae=(0,r.observer)(({children:t})=>{const{bottomWidgetsContainer:e}=(0,b.gy)(),{bottom:r=0,isReadyToShow:i=!1}=e;if(!i)return null;const a={bottom:r};return(0,v.jsx)("div",{className:"cq-bottom-ui-widgets",style:a,children:t})});d(1882);const Ie=a().lazy(()=>Promise.resolve().then(d.bind(d,6213))),De=({isMobile:t})=>(0,v.jsxs)(v.Fragment,{children:[t?"":(0,v.jsx)(ce,{}),(0,v.jsx)(M,{}),(0,v.jsx)(et,{}),(0,v.jsx)(ee,{}),(0,v.jsx)(ye,{}),(0,v.jsx)(i.Suspense,{fallback:null,children:(0,v.jsx)(Ie,{})}),t?"":(0,v.jsx)(ue,{})]}),Oe=(0,r.observer)(({widgets:t})=>{const{chart:r,chartType:i,studies:a,drawTools:s,view:n,share:o,chartSetting:l}=(0,b.gy)(),{context:c,isMobile:h}=r,u=i.menuStore.open||a.menuStore.open||s.menuStore.open||n.menuStore.open||o.menuStore.open||l.menuStore.open,d=t||De;return(0,v.jsx)("div",{className:e()("cq-chart-controls",{active:u}),children:c?(0,v.jsx)(d,{isMobile:h}):null})});d(3955);var Pe=d(9160).t;const Le=a().memo(({networkStatus:t})=>(0,v.jsx)(A.A,{className:"sc-chart-footer__item sc-chart-footer__item--status",content:`${Pe.translate("Network status")}: ${t?Pe.translate(t.tooltip):""}`,enabled:!0,children:(0,v.jsx)("div",{className:`sc-chart__status sc-chart__status--${t?t.class:"offline"}`})})),Me=(0,r.observer)(()=>{const{chart:t}=(0,b.gy)(),{context:e,serverTime:r,networkStatus:i,openFullscreen:a}=t;return e?(0,v.jsxs)("div",{className:"sc-chart-footer",children:[(0,v.jsx)(Le,{networkStatus:i}),(0,v.jsx)("div",{className:"sc-chart-footer__item sc-chart-footer__item--time",children:(0,v.jsx)("span",{children:r})}),(0,v.jsx)("div",{className:"ciq-menu ciq-enabled",children:(0,v.jsx)("a",{href:"https://deriv.com/help-centre/",target:"_blank",rel:"noopener noreferrer",children:(0,v.jsx)("div",{className:"cq-menu-btn",children:(0,v.jsx)(x.Sn,{})})})}),(0,v.jsx)(we,{}),(0,v.jsx)("div",{className:"ciq-menu ciq-enabled",onClick:()=>a(),children:(0,v.jsx)("div",{className:"cq-menu-btn",children:(0,v.jsx)(x.x2,{})})})]}):null});var Re=d(4511),Be=d.n(Re),Fe=(d(898),d(8798),d(9160).t);function Ve(t){let e=0;if("categoryName"in t&&t.hasSubgroup)t.subgroups.forEach(t=>{for(const r of t.data)e+=r.data.length});else if("categoryName"in t&&t.hasSubcategory)for(const r of t.data)e+=r.data.length;else e+=t.data.length;return e}const He=a().memo(({category:t})=>(0,v.jsx)("div",{className:"sc-mcd__category__content",children:(0,v.jsx)("div",{className:"empty-category",children:Fe.translate(t.emptyDescription)})})),$e=a().memo(({isNestedList:t,category:r})=>{const i=x.sM[r.categoryId];return(0,v.jsxs)("span",{className:e()("category-title-left",{"category-title-left__subgroup":!i}),children:[t&&i?(0,v.jsx)(i,{className:`ic-${r.categoryId}`}):(0,v.jsx)("div",{className:"category-title-left__placeholder"}),Fe.translate(r.categoryName)]})}),qe=({category:t,activeHeadKey:r,isNestedList:i,handleTitleClick:a})=>(0,v.jsxs)("div",{className:e()("sc-mcd__category__head",{"has-subtitle":t.categorySubtitle,active:t.active}),onClick:()=>a(t.categoryId),children:[(0,v.jsx)($e,{isNestedList:i,category:t}),(t.categoryNamePostfixShowIfActive&&r===t.categoryId||!t.categoryNamePostfixShowIfActive)&&t.categoryNamePostfix&&(0,v.jsx)("span",{className:"category-name-postfix",children:t.categoryNamePostfix}),t.categorySubtitle&&(0,v.jsx)("div",{className:"category-subtitle",children:Fe.translate(t.categorySubtitle)}),!t.hasSubgroup&&i?(0,v.jsx)(x.HK,{className:"arrow"}):""]}),Ue=({category:t,categoryItemCount:r,ItemType:i,setCategoryElement:a,onSelectItem:s,activeHeadKey:n,disableAll:o,isNestedList:l,handleTitleClick:h,hasSubgroup:u,favoritesId:d})=>{const g=e=>{s?.(e,t.categoryId)};return(0,v.jsxs)("div",{className:e()("sc-mcd__category",`sc-mcd__category--${t.categoryId}`,{"sc-mcd__category--has-subtitle":t.categorySubtitle,"sc-mcd__category--active":t.active}),ref:e=>a(e,t.categoryId),children:[(l||!t.hasSubcategory)&&(0,v.jsx)(qe,{category:t,activeHeadKey:n,isNestedList:!!l,handleTitleClick:h,hasSubgroup:u}),!t.hasSubgroup&&t.hasSubcategory?t.data.filter(t=>Ve(t)>0).map(t=>(0,v.jsxs)("div",{className:e()("sc-mcd__category__content",`sc-mcd__category__content--${(0,c._J)(t.subcategoryName)}`,"sc-mcd__category--has-subgroup","sc-mcd__category__content--has-subcategory"),children:[(0,v.jsx)("div",{className:"subcategory",children:Fe.translate(t.subcategoryName)}),t.data.map(t=>(0,v.jsx)(i,{item:t,onSelectItem:g,disableAll:o,favoritesId:d},t.display))]},t.subcategoryName)):!t.hasSubgroup&&t.data.length>0&&(0,v.jsx)("div",{className:"sc-mcd__category__content",children:t.data.map(t=>(0,v.jsx)(i,{item:t,onSelectItem:g,disableAll:o,favoritesId:d},t.itemId))}),0===r&&t.emptyDescription&&(0,v.jsx)(He,{category:t})]})},ze=({filteredItems:t,onSelectItem:e,ItemType:r,setCategoryElement:i,activeHeadKey:s,disableAll:n,isNestedList:o,handleTitleClick:l,favoritesId:c})=>(0,v.jsx)(v.Fragment,{children:t.map(t=>{const h=Ve(t);return t.hasSubgroup?(h>0||t.emptyDescription)&&(0,v.jsxs)(a().Fragment,{children:[(0,v.jsx)(Ue,{ItemType:r,category:t,categoryItemCount:h,setCategoryElement:i,onSelectItem:e,activeHeadKey:s,disableAll:n,isNestedList:o,handleTitleClick:l,favoritesId:c},t.categoryId),t.subgroups?.map(t=>Ve(t)>0?(0,v.jsx)(Ue,{ItemType:r,category:t,categoryItemCount:h,setCategoryElement:i,onSelectItem:e,activeHeadKey:s,disableAll:n,isNestedList:o,handleTitleClick:l,hasSubgroup:!0,favoritesId:c},t.categoryId):null)]},t.categoryId):(h>0||t.emptyDescription)&&(0,v.jsx)(Ue,{ItemType:r,category:t,categoryItemCount:h,setCategoryElement:i,onSelectItem:e,activeHeadKey:s,disableAll:n,isNestedList:o,handleTitleClick:l,favoritesId:c},t.categoryId)})});var Ge=d(4916);const We=({category:t,id:r})=>{const{chart:i,state:s}=(0,b.gy)(),[n]=a().useState(Ge.A.getInstance()),[o,l]=a().useState(!1),h=a().useCallback(e=>{e.stopPropagation(),e.nativeEvent.isHandledByDialog=!0,n.toggleFavorite(t,r),s.stateChange(E.c4.FAVORITE_MARKETS_TOGGLE,{is_favorite:n.isFavorite(t,r),symbol:i.symbolMap[r]?.symbol,symbol_category:(0,c.RB)(i.symbolMap[r])})},[i,s,n,t,r]),u=a().useCallback(()=>{const e=n.isFavorite(t,r);e!==o&&(l(e),(0,Te.$s)(Te.dq.CategoricalDisplay,Te.Cw.Favorite,`${e?"Add ":"Remove "} ${r}`))},[n,t,r,o]);return a().useEffect(()=>(n&&n.onFavoriteUpdate&&(n.onFavoriteUpdate(u),l(n.isFavorite(t,r))),()=>{n&&n.offFavoriteUpdate(u)}),[n,t,r,u]),t&&r?(0,v.jsx)(x.kD,{onClick:h,className:e()("ciq-favorite",{"ciq-active-favorite":o})}):null};var Ke=d(9160).t;const Qe=a().memo(({id:t})=>{if(!t||!x.bC[t])return null;const e=x.bC[t];return(0,v.jsx)(e,{className:`ic-${t}`})}),Ye=a().memo(({item:{itemId:t,display:e}})=>(0,v.jsxs)("div",{className:"sc-mcd__item__name",children:[(0,v.jsx)(Qe,{id:t}),e]})),Xe=a().memo(({favoritesId:t,item:{dataObject:e,itemId:r}})=>(0,v.jsxs)("div",{className:"sc-mcd__item__detail",children:[e&&(void 0===e.exchange_is_open||e.exchange_is_open)?"":(0,v.jsx)("span",{className:"closed-market",children:Ke.translate("CLOSED")}),(0,v.jsx)(We,{category:t,id:r})]})),Ze=({onSelectItem:t,item:e,favoritesId:r})=>(0,v.jsxs)("div",{className:`sc-mcd__item sc-mcd__item--${e.itemId} ${e.selected?"sc-mcd__item--selected ":""}`,onClick:()=>e.enabled&&t?.(e.dataObject),children:[(0,v.jsx)(Ye,{item:e}),(0,v.jsx)(Xe,{item:e,favoritesId:r})]}),Je=a().memo(Ze);var tr=d(9160).t;const er=a().memo(({categoryId:t})=>{const e=x.sM[t];return e&&(0,v.jsx)(e,{className:`ic-${t}`})}),rr=a().memo(({focusedCategoryKey:t,activeCategoryKey:e,handleFilterClick:r,category:i,isSearching:a})=>{const s=t&&t.length?t===i.categoryId:e===i.categoryId;return(0,v.jsxs)("div",{className:"sc-mcd__filter__item "+(s&&!a?"sc-mcd__filter__item--selected":""),onClick:()=>r(i.categoryId),children:[(0,v.jsx)(er,{categoryId:i.categoryId}),tr.translate(i.categoryName)]})}),ir=a().memo(({focusedCategoryKey:t,activeCategoryKey:e,handleFilterClick:r,category:i,isSearching:s})=>{const[n,o]=a().useState(!1),[l,c]=a().useState(!1);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("div",{className:"sc-mcd__filter__item "+(n&&!s?"sc-mcd__filter__item--selected":""),onClick:()=>c(!l),children:[(0,v.jsx)(er,{categoryId:i.categoryId}),i.categoryName,(0,v.jsx)(x.HK,{className:`sc-mcd__filter__group-icon ${l&&"sc-mcd__filter__group-icon--open"}`})]}),(0,v.jsx)("div",{className:`sc-mcd__filter__subgroups ${l&&"sc-mcd__filter__subgroups--open"}`,children:i.subgroups.map(a=>{const l=t&&t.length?t===a.categoryId:e===a.categoryId,h=i.subgroups.filter(r=>r.categoryId===t||!t&&r.categoryId===e).length>0;return l&&h&&!n?(o(!0),c(!0)):!h&&n&&o(!1),(0,v.jsx)("div",{className:`sc-mcd__filter__subgroups-item ${n?"sc-mcd__filter__item--active":""} ${l&&!s?"sc-mcd__filter__item--selected":""}`,onClick:()=>r(a.categoryId),children:tr.translate(a.categoryName)},a?.categoryId)})})]})}),ar=(0,r.observer)(({filteredItems:t,handleFilterClick:e,focusedCategoryKey:r,activeCategoryKey:i,isSearching:a})=>(0,v.jsx)("div",{className:"sc-mcd__filter",children:t.map(t=>t.hasSubgroup?(0,v.jsx)(ir,{category:t,handleFilterClick:e,activeCategoryKey:i,focusedCategoryKey:r,isSearching:a},t.categoryId):(0,v.jsx)(rr,{category:t,handleFilterClick:e,activeCategoryKey:i,focusedCategoryKey:r,isSearching:a},t.categoryId))}));var sr=d(9160).t;const nr=(0,r.observer)(({store:t,id:e,searchInputClassName:r,disableAll:i,isNestedList:a,onSelectItem:s})=>{const{updateScrollSpy:n,setScrollPanel:o,setFilterText:l,searchInput:c,height:h,filterText:u,placeholderText:d,handleTitleClick:g,filteredItems:m,setCategoryElement:p,activeHeadKey:f,favoritesId:_,handleFilterClick:b,focusedCategoryKey:y,activeCategoryKey:S}=t,x=s||t.onSelectItem,{isMobile:w}=t.chart,C=(0,v.jsx)(ze,{onSelectItem:(t,e)=>{x?.(t,e),l("")},disableAll:i,isNestedList:a,handleTitleClick:g,filteredItems:m,setCategoryElement:p,activeHeadKey:f,ItemType:Je,favoritesId:_});return(0,v.jsxs)("div",{className:"sc-mcd "+(a?"sc-mcd--nested":""),style:{height:h},id:e,children:[!w&&(0,v.jsxs)("div",{className:"sc-mcd__tabs",children:[(0,v.jsx)("div",{className:"sc-mcd__tabs__head",children:sr.translate("Markets")}),(0,v.jsx)("div",{className:"sc-mcd__tabs__body",children:!a&&(0,v.jsx)(ar,{filteredItems:m,handleFilterClick:b,activeCategoryKey:S,focusedCategoryKey:y,isSearching:""!==u})})]}),(0,v.jsxs)("div",{className:"sc-mcd__content",children:[(0,v.jsx)("div",{className:"sc-mcd__content__head",children:(0,v.jsx)(Gt,{placeholder:d,searchInputClassName:r,value:u,onChange:l,searchInput:c})}),(0,v.jsx)("div",{className:"sc-mcd__content__body",children:w?(0,v.jsx)("div",{className:"sc-mcd__content__body__scroll",onScroll:n,ref:o,children:C}):(0,v.jsx)(I,{autoHide:!0,onScroll:n,setPanel:o,children:C})})]})]})});var or=d(6039);const lr=({symbolOpenTime:t})=>{const[e,r]=a().useState(0),i=a().useMemo(()=>{let r=null;const{openTime:i}=t||{};return i&&(r=(0,c.pl)(i.getTime()-e)),r},[t,e]);return a().useEffect(()=>{const t=or.A.getInstance(),e=setInterval(()=>r(t.getLocalDate().getTime()),1e3);return()=>clearInterval(e)},[]),(0,v.jsx)("span",{children:i})},cr=({isIncrease:t,price:r,className:i,decimalPlaces:a})=>(0,v.jsxs)(v.Fragment,{children:[!r&&(0,v.jsx)("span",{className:"cq-comparison-loader stx-show"}),(0,v.jsx)("div",{className:e()("cq-animated-price",i,{"cq-up":t,"cq-down":!t}),children:r.toFixed(a)})]});var hr=d(9160).t;const ur=(0,r.observer)(()=>{const{chartTitle:t}=(0,b.gy)(),{isShowChartPrice:r,isVisible:i,todayChange:a,todayChangePercent:s,animatedPrice:n,currentSymbol:o,isSymbolOpen:l,symbolOpenTime:c}=t,{status:h}=n;if(!o)return null;const u=x.bC[o.symbol]||x.Br,d=!l&&c.openTime,g=!l&&!c.openTime;return(0,v.jsxs)(v.Fragment,{children:[u&&(0,v.jsx)(u,{className:`ic-${o.symbol}`}),(0,v.jsxs)("div",{className:"cq-symbol-info",children:[(0,v.jsx)("div",{className:e()("cq-symbol",{"closed-no-opentime":g}),children:o.name}),l&&(0,v.jsx)(gr,{status:h,isVisible:i&&r,todayChange:a,todayChangePercent:s}),d&&(0,v.jsx)(mr,{symbolOpenTime:c})]})]})}),dr=(0,r.observer)(()=>{const{chartTitle:t}=(0,b.gy)(),{isSymbolOpen:e}=t;return(0,v.jsxs)("div",{className:"cq-symbol-select-btn",children:[(0,v.jsxs)("div",{className:"cq-symbol-select-btn__container",children:[(0,v.jsx)(ur,{}),!e&&(0,v.jsx)("div",{className:"cq-symbol-closed-text",children:hr.translate("CLOSED")})]}),(0,v.jsx)(x.HK,{className:"cq-symbol-dropdown"})]})}),gr=(0,r.observer)(({isVisible:t,status:r,todayChange:i,todayChangePercent:a})=>{const{chartTitle:s}=(0,b.gy)(),{animatedPrice:n,decimalPlaces:o}=s,{price:l,isIncrease:c}=n;return t?(0,v.jsxs)("div",{className:"cq-chart-price",children:[(0,v.jsx)(cr,{className:"cq-current-price",price:l,isIncrease:c,status:n.status,decimalPlaces:o}),(0,v.jsx)("div",{className:"divider",children:"-"}),(0,v.jsxs)("div",{className:e()("cq-change",r),children:[(0,v.jsx)("span",{className:"cq-todays-change",children:i||0}),(0,v.jsxs)("span",{className:"cq-todays-change-percent",children:["(",a,"%)"]})," "]})]}):null}),mr=({symbolOpenTime:t})=>(0,v.jsxs)("div",{className:"cq-chart-closed",children:[(0,v.jsx)(x.b1,{className:"cq-closed-icon"}),(0,v.jsxs)("div",{className:"cq-closed-opening",children:[hr.translate("Opens in:")," ",(0,v.jsx)("span",{className:"cq-closed-opening-time",children:(0,v.jsx)(lr,{symbolOpenTime:t})})]})]});var pr=d(9160).t;const fr=(0,r.observer)(t=>{const{chartTitle:e,chart:r,chartSetting:i,state:s}=(0,b.gy)(),{isMobile:n}=r,{theme:o}=i,{menuStore:l,currentSymbol:h,categoricalDisplay:u,setSymbol:d,onMouseEnter:g,onMouseLeave:m,updateProps:p}=e,f=t.onChange||d,_=l.setOpen,{containerId:y,enabled:S,portalNodeId:x,searchInputClassName:w,open:C,open_market:T,isNestedList:k}=t;if(a().useEffect(()=>{const{...e}=t;p(e)},[C,T]),!h)return null;const j=(0,v.jsxs)(O.A,{store:l,enabled:S,className:"cq-chart-title stx-show cq-symbols-display",isFullscreen:!0,portalNodeId:x,title:n?pr.translate("Markets"):"",onMouseEnter:g,onMouseLeave:m,children:[(0,v.jsx)(O.A.Title,{children:(0,v.jsx)(dr,{})}),(0,v.jsx)(O.A.Body,{children:(0,v.jsx)(nr,{store:u,isNestedList:k,searchInputClassName:w,onSelectItem:(t,e)=>{t.symbol!==h.symbol&&(f(t.symbol),s.stateChange(E.c4.SYMBOL_CHANGE,{symbol:t.symbol,symbol_category:"favorite"===e?"favorites":(0,c.RB)(t)})),_(!1)}})})]});return y?Be().createPortal((0,v.jsx)("div",{className:`smartcharts-${o}`,children:j}),document.getElementById(y)):j}),_r="horizontal",br="vertical";var vr=d(9160).t;const yr=(0,r.observer)(({className:t})=>{const{drawTools:r}=(0,b.gy)(),a=(0,i.useRef)(null),{showConfirmationToast:s,confirmationMessage:n,cancelAddingNewTool:o,hideDrawingConfirmation:l,addingStateInfo:c,selectedToolId:h}=r,u=(0,i.useCallback)(()=>{return(t=h)===_r||t===br?vr.translate("Click on the chart to place the line."):0===c.currentStep&&c.totalSteps>1?vr.translate("Click on the chart to confirm the start point."):1===c.currentStep&&c.totalSteps>1?vr.translate("Click on the chart to confirm the end point."):c.currentStep>1&&!c.isFinished?vr.translate("Click on the chart to confirm point {{step}}.",{step:(c.currentStep+1).toString()}):n;var t},[h,c,n]),d=(0,i.useCallback)(t=>{a.current&&!a.current.contains(t.target)&&l?.()},[l]),g=(0,i.useCallback)(t=>{"Escape"===t.key&&l?.()},[l]);return(0,i.useEffect)(()=>{if(s)return document.addEventListener("mousedown",d),document.addEventListener("keydown",g),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",g)}},[s,d,g]),!s||r.addingStateInfo.isFinished?null:(0,v.jsx)("div",{ref:a,className:e()("sc-drawing-toast",t),role:"alert","aria-live":"polite",children:(0,v.jsxs)("div",{className:"sc-drawing-toast__content",children:[(0,v.jsx)("span",{className:"sc-drawing-toast__message",children:u()}),(0,v.jsx)("button",{className:"sc-drawing-toast__cancel",onClick:o,"aria-label":vr.translate("Cancel"),type:"button",children:vr.translate("Cancel")})]})})});var Sr=d(9160).t;const xr=(0,r.observer)(({className:t})=>{const{drawTools:r}=(0,b.gy)(),a=(0,i.useRef)(null),s=(0,i.useRef)(null),{showDeletionSnackbar:n,deletedToolName:o,hideDeletionSnackbar:l}=r,c=(0,i.useCallback)(()=>{if(!o)return;const t=(0,E.Os)(),e=Object.values(t).find(t=>t.id===o.replace("dt_",""));if(e){return`${e.text.replace(" [num]","")} ${Sr.translate("removed")}`}},[o]);(0,i.useEffect)(()=>{if(n)return s.current=setTimeout(()=>{l?.()},4e3),()=>{s.current&&(clearTimeout(s.current),s.current=null)}},[n,l]);const h=(0,i.useCallback)(t=>{"Escape"===t.key&&l?.()},[l]);return(0,i.useEffect)(()=>{if(n)return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h)}},[n,h]),(0,i.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),n?(0,v.jsx)("div",{ref:a,className:e()("sc-deletion-snackbar",t),role:"alert","aria-live":"polite",children:(0,v.jsxs)("div",{className:"sc-deletion-snackbar__content",children:[(0,v.jsx)("span",{className:"sc-deletion-snackbar__message",children:c()}),(0,v.jsx)("button",{className:"sc-deletion-snackbar__close",onClick:l,"aria-label":Sr.translate("Close"),type:"button",children:(0,v.jsx)(x.US,{})})]})}):null}),wr=xr;var Cr=d(8825);const Tr=(0,r.observer)(t=>{const{chart:e,chartAdapter:r}=(0,b.gy)(),i=a().useRef(null),s=a().useRef(null),n=a().useRef(null),o=a().useRef(null),l=a().useRef(t);l.current=t,a().useEffect(()=>(r.painter.registerCallback(u),()=>{r.painter.unregisterCallback(u)}),[]),a().useEffect(()=>{u()},[r.epochBounds,r.quoteBounds,r.isFeedLoaded,r.isChartLoaded,e.lastQuote]),a().useEffect(()=>{const t=o.current?.querySelector(".chart-spot-label-profit");return t&&r.updateRightPadding(110),()=>{t&&r.updateRightPadding(0)}},[r]);const h=({epoch:t,price:e})=>{i.current=Number(e)||null,s.current=(0,Cr.E)((0,c.Pu)(t)),n.current=t?1e3*t:null,u()},u=()=>{if(!r.isFeedLoaded||!r.isChartLoaded)return;if(!o.current)return;if(!s.current)return void(o.current.style.visibility="hidden");const t=l.current.offsetTop||0,e=l.current.offsetLeft||0,a=o.current;let c=0,h=0,u=!0;if(n.current){const t=r.getXFromEpoch(n.current),e=i.current?r.getYFromQuote(i.current):0;t>0&&(null==i.current||e>0)?(c=+e,h=+t):u=!1}a.style.transform=`translate(${h+e}px, ${c+t}px)`,a.style.visibility=u?"visible":"hidden"},{children:d,className:g}=t;if(!r.isChartLoaded)return null;const{chartNode:m,yAxisWidth:p}=e,{overlap_y_axis:f=!0}=t,_=m&&!f?m.offsetWidth-p-50:"calc(100% - 50px)";return(0,v.jsx)("div",{className:"fast-marker",style:{maxWidth:_},children:(0,v.jsx)("div",{className:g,ref:t=>{o.current=t;const{markerRef:e}=l.current;e&&e(t?{div:t,setPosition:h}:null),null!==t&&u()},style:{position:"absolute"},children:d})})});d(6271);var kr=d(9160).t;const jr=(0,r.observer)(()=>{const{highestLowest:t}=(0,b.gy)(),{setHighestRef:e,setLowestRef:r}=t;return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(Tr,{markerRef:e,className:"sc-highlow sc-highlow--highest",offsetTop:-80,offsetLeft:-80,children:[(0,v.jsx)("span",{className:"spot__shape-circule spot__fill-blue"}),(0,v.jsxs)("span",{className:"spot__label","data-label-pos":"top",children:[(0,v.jsx)("span",{children:`${kr.translate("H")}: `}),(0,v.jsx)("span",{className:"spot__value"})]})]}),(0,v.jsxs)(Tr,{markerRef:r,className:"sc-highlow sc-highlow--lowest",offsetTop:-80,offsetLeft:-80,children:[(0,v.jsx)("span",{className:"spot__shape-circule spot__fill-red"}),(0,v.jsxs)("span",{className:"spot__label","data-label-pos":"bottom",children:[(0,v.jsx)("span",{children:`${kr.translate("L")} : `}),(0,v.jsx)("span",{className:"spot__value"})]})]})]})});d(1061);var Nr=d(9160).t;const Er=(0,r.observer)(()=>{const{timeperiod:t}=(0,b.gy)(),{menuStore:e,dialogPortalNodeId:r,handleCancel:i,handleContinue:a}=t.predictionIndicator;return(0,v.jsxs)(O.A,{store:e,className:"cq-dialog--indicator-prediction",modalMode:!0,emptyMenu:!0,portalNodeId:r,handleOverlayClick:i,children:[(0,v.jsx)(O.A.Title,{}),(0,v.jsx)(O.A.Body,{children:(0,v.jsxs)("div",{className:"cq-indicator-prediction",children:[(0,v.jsx)("strong",{children:Nr.translate("Are you sure?")}),(0,v.jsx)("p",{children:Nr.translate("Some of your active indicators don’t support 1-tick intervals. If you change to a 1-tick interval, these indicators will be removed from your chart.")}),(0,v.jsxs)("div",{className:"cq-indicator-prediction__footer",children:[(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--outline-secondary",onClick:i,children:Nr.translate("Cancel")}),(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary",onClick:a,children:Nr.translate("Continue")})]})]})})]})});d(1104);const Ar=(0,r.observer)(()=>{const{chart:t,chartSize:r,navigationWidget:i,chartSetting:a,chartAdapter:s}=(0,b.gy)(),{context:n,startWithDataFitMode:o}=t,{zoomIn:l,zoomOut:c}=r,{historical:h}=a,{onMouseEnter:u,onMouseLeave:d}=i,{isDataFitModeEnabled:g,toggleDataFitMode:m}=s;return n?(0,v.jsxs)("div",{className:e()("sc-navigation-widget",{"sc-navigation-widget__item--indent":h}),onMouseEnter:u,onMouseLeave:d,children:[(0,v.jsx)("div",{className:e()("sc-navigation-widget__item","sc-navigation-widget__item--scale",{"sc-navigation-widget__item--hidden":!o,"sc-navigation-widget__item--disabled":g}),onClick:m,children:(0,v.jsx)(x.iQ,{})}),(0,v.jsxs)("div",{className:"sc-navigation-widget__item sc-navigation-widget__item--zoom",children:[(0,v.jsx)(x.Gu,{onClick:l}),(0,v.jsx)(ce,{}),(0,v.jsx)(x.NR,{onClick:c})]})]}):null});d(273);const Ir=(0,r.observer)(()=>{const{paginationLoader:t}=(0,b.gy)(),{isOnPagination:e,setRef:r}=t;return e?(0,v.jsx)(Tr,{markerRef:r,className:"pagination",children:(0,v.jsx)("div",{className:"pagination__loader",children:(0,v.jsx)("div",{className:"pagination__loader-background"})})}):(0,v.jsx)(v.Fragment,{})}),Dr=(0,r.observer)(({at:t="holder",children:e})=>{const{chart:r,state:i}=(0,b.gy)(),{contextPromise:s}=r,{isChartReady:n}=i,[o,l]=a().useState();return a().useEffect(()=>{s?.then(e=>{const r=`cq-inchart-${t}`;let i=e.topNode?.querySelector(`.${r}`);i||(i=(0,de.n)(`<div class="${r}"></div>`)),l(i)})},[t,s]),n&&o?Be().createPortal(e,o):null});d(2445);var Or=d(9160).t;const Pr=({group:t,title:e,type:r,Field:i})=>(0,v.jsx)(V,{title:"select"===r||"pattern"===r||"colorpicker"===r||"numbercolorpicker"===r||"OverBought"===t||"OverSold"===t?null:e,type:r,children:i}),Lr=({title:t,items:e,theme:r,onItemChange:i})=>{const a={switch:t=>{const e=t;return(0,v.jsx)(G,{value:e.value,onChange:t=>i(e,t)})},colorpicker:t=>(0,v.jsx)(z,{theme:r,color:t.value,subtitle:t.subtitle||t.title,setColor:e=>i(t,e)}),pattern:t=>(0,v.jsx)(U,{pattern:t.value,lineWidth:"1",subtitle:t.title,onChange:e=>{i(t,e)}}),select:t=>{const e=t;return(0,v.jsx)(q,{rows:Object.values(e.options||{}),value:e.options[e.value],subtitle:e.subtitle||e.title,onRowClick:t=>{const[r]=Object.entries(e.options).find(([e,r])=>r===t);i(e,r)},children:t=>(0,v.jsx)("span",{children:t})})},number:t=>{const e=t;return(0,v.jsx)($,{min:e.min??1,step:e.step??1,max:e.max??100,value:e.value,onChange:t=>i(e,t)})},numericinput:t=>{const e=t;return(0,v.jsx)("span",{className:"ciq-num-input",children:(0,v.jsx)(K,{value:e.value,onChange:t=>i(e,t),min:e.min,step:e.step,max:e.max})})},numbercolorpicker:t=>{const e=t;return(0,v.jsx)(Q,{props:e.value,theme:r,onChange:t=>i(e,t)})},font:t=>{const e=t;return(0,v.jsx)(X,{value:e.value,onChange:t=>i(e,t)})}},s=`form__input-group--${(t||"").toLowerCase().replace(" ","-")}`;return(0,v.jsxs)("div",{className:`form__input-group ${s}`,children:["Show Zones"===t?"":(0,v.jsx)("h4",{children:t}),e.map(e=>a[e.type]&&(0,v.jsx)(Pr,{type:e.type,title:"Show Zones"===t?e.title:e.title.replace(t,""),Field:a[e.type](e)},e.title)),(0,v.jsx)(V,{type:"end"})]})},Mr=({onDelete:t,onReset:e,onDone:r})=>(0,v.jsxs)("div",{className:"buttons",children:[t&&(0,v.jsx)(x.d7,{className:"sc-btn--delete",onClick:t}),(0,v.jsxs)("div",{children:[(0,v.jsx)(Br,{onClick:e}),(0,v.jsx)(Fr,{onClick:r})]})]}),Rr=({itemGroups:t,theme:e,onItemChange:r,setScrollPanel:i,freezeScroll:a,formClassname:s})=>(0,v.jsx)("div",{className:`form form--indicator-setting ${s}`,children:(0,v.jsx)(I,{setPanel:i,freeze:a,autoHide:!0,height:"282px",children:t.map(t=>t.fields.length>0&&(0,v.jsx)(Lr,{title:t.title,items:t.fields,theme:e,onItemChange:r},t.key))})}),Br=({onClick:t})=>(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--outline-secondary sc-btn--reset",onClick:t,children:Or.translate("Reset")}),Fr=({onClick:t})=>(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary sc-btn--save",onClick:t,children:Or.translate("Done")}),Vr=(0,r.observer)(({store:t})=>{const{itemGroups:e,title:r,formClassname:i,description:a,showTabs:s,onResetClick:n,onItemChange:o,onItemDelete:l,menuStore:c,theme:h,setScrollPanel:u,dialogPortalNodeId:d,freezeScroll:g}=t,m=c.handleCloseDialog;return(0,v.jsxs)(O.A,{store:c,className:"cq-modal--settings",title:r,modalMode:!0,enableTabular:s,emptyMenu:!0,portalNodeId:d,children:[(0,v.jsx)(O.A.Title,{}),(0,v.jsx)(O.A.Body,{children:(0,v.jsx)("div",{className:"cq-chart-settings",children:s?(0,v.jsxs)(At,{className:"tabs--vertical",children:[(0,v.jsxs)(Pt,{children:[(0,v.jsx)(Ft,{children:"Settings"}),(0,v.jsx)(Ft,{children:"Description"})]}),(0,v.jsxs)(Ut,{children:[(0,v.jsx)(Rr,{itemGroups:e,theme:h,onItemChange:o,setScrollPanel:u,freezeScroll:g}),(0,v.jsx)(Mr,{onReset:n,onDone:m})]}),(0,v.jsx)(Ut,{children:a})]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(Rr,{itemGroups:e,theme:h,onItemChange:o,setScrollPanel:u,freezeScroll:g,formClassname:i}),(0,v.jsx)(Mr,{onDelete:l,onReset:n,onDone:m})]})})})]})}),Hr=(0,r.observer)(()=>{const{chart:t,chartAdapter:e}=(0,b.gy)(),{epochBounds:r,isFeedLoaded:i}=e,{feed:a}=t,s=a?.quotes;if(void 0===s||!1===i||0===s.length)return null;const n=s[s.length-1].DT?.getTime();return n?r.rightEpoch>n?null:(0,v.jsx)("div",{className:"scroll_to_recent",onClick:()=>{e.flutterChart?.app.scrollToLastTick()},children:(0,v.jsx)(x.fA,{})}):null});var $r=d(9160).t;const qr=a().forwardRef((t,r)=>{const{chart:s,drawTools:n,studies:o,chartSetting:l,chartType:h,state:u,loader:d,chartAdapter:g,timeperiod:m,crosshair:p}=(0,b.gy)(),{chartId:f,init:_,destroy:y,isChartAvailable:S,chartContainerHeight:x,containerWidth:w}=s,{settingsDialog:C,restoreStudies:T,activeItems:k}=o,{settingsDialog:j}=n,{settingsDialog:E,isCandle:A,isSpline:I}=h,{updateProps:D,isChartClosed:O}=u,{theme:P,position:L,isHighestLowestMarkerEnabled:M}=l,{isActive:R,show:B}=d,F=a().useRef(null),V=a().useRef(null);(0,i.useImperativeHandle)(r,()=>({hasPredictionIndicators:()=>null!==localStorage.getItem("predictionIndicators"),triggerPopup(t){m.predictionIndicator.dialogPortalNodeId="modal_root",m.predictionIndicator.setOpen(!0),m.predictionIndicator.setCancel(()=>{localStorage.getItem("predictionIndicators")&&(t(),T([...k,...(0,c.xL)(localStorage.getItem("predictionIndicators")||"")]))})}})),a().useEffect(()=>((0,Te.h1)(),(0,Te.D_)(),void 0!==t.crosshairEnabled&&p.setInitialEnabledState(t.crosshairEnabled),D(t),_(F.current,t),()=>{y()}),[]),a().useEffect(()=>{D(t)});const H=(t=>{const e=a().useRef();return a().useEffect(()=>{e.current=t},[t]),e.current})($r.lang);a().useEffect(()=>{H&&H!==$r.lang&&!R&&B?.()},[$r.lang]);const{id:$,isMobile:q=!1,barriers:U=[],children:z,chartControlsWidgets:G,topWidgets:W,bottomWidgets:K,enabledChartFooter:Q=!0,enabledNavigationWidget:Y=!0,toolbarWidget:X=()=>null,historical:J,contracts_array:tt=[]}=t,et=G&&L&&!q,rt=W||(()=>(0,v.jsx)(fr,{})),it=a().useCallback(X,[$r.lang]);return a().useEffect(()=>(g.onMount(V.current),()=>{g.onUnmount()}),[]),a().useEffect(()=>{g.updateContracts(tt)},[tt]),(0,v.jsx)("div",{id:$||f,className:e()("smartcharts",`smartcharts-${P}`,{"smartcharts--navigation-widget":Y,"smartcharts--loading":R,"smartcharts--has-markers":z&&a().Children.count(z)>0,[`smartcharts-${w}`]:!q}),children:(0,v.jsxs)("div",{className:e()({"smartcharts-mobile":q,"smartcharts-desktop":!q}),children:[(0,v.jsx)("div",{className:"cq-context",ref:F,children:(0,v.jsx)("div",{className:e()({[`cq-chart-control-${L}`]:et,"cq-chart-control-bottom":!et}),children:(0,v.jsxs)("div",{className:"ciq-chart-area",children:[(0,v.jsxs)("div",{className:e()("ciq-chart",{"closed-chart":O}),children:[(0,v.jsx)(Dr,{at:"subholder",children:U.map(({key:t,...e},r)=>(0,v.jsx)(N,{...e},`barrier-${r}`))}),(0,v.jsx)(Dr,{at:"subholder",children:!A&&!I&&M&&(0,v.jsx)(jr,{})}),(0,v.jsx)(Dr,{at:"subholder",children:z}),(0,v.jsx)(Dr,{at:"subholder",children:(0,v.jsx)(Ir,{})}),!d.isActive&&(0,v.jsx)("div",{className:"cq-top-ui-widgets",children:(0,v.jsx)(rt,{})}),(0,v.jsx)("div",{className:"chartContainer",ref:V,style:{height:J&&x&&q?x-30:x}}),Y&&(0,v.jsx)(Ar,{}),it&&(0,v.jsx)(it,{}),!S&&(0,v.jsx)("div",{className:"cq-chart-unavailable",children:$r.translate("Chart data is not available for this symbol.")}),(0,v.jsx)("div",{className:"cq-inchart-subholder"}),(0,v.jsx)(Ae,{children:(0,v.jsx)(Ee,{bottomWidgets:K})})]}),null!==G&&!Q&&(0,v.jsx)(Oe,{widgets:G}),(0,v.jsx)(Hr,{}),Q&&(0,v.jsx)(Me,{}),(0,v.jsx)(Z.A,{})]})})}),(0,v.jsx)(Vr,{store:j}),(0,v.jsx)(Vr,{store:E}),(0,v.jsx)(Vr,{store:C}),(0,v.jsx)(Er,{}),(0,v.jsx)(yr,{}),(0,v.jsx)(wr,{}),(0,v.jsx)("div",{id:"smartcharts_modal",className:"ciq-modal"})]})})}),Ur=(0,r.observer)(qr),zr=a().forwardRef(({children:t,...e},r)=>{const i=a().useRef(!1);i.current||((0,b.cA)(),i.current=!0);const s=(0,b.gy)(),n=(0,b.SD)().Provider;return(0,v.jsx)(n,{value:s,children:(0,v.jsx)(Ur,{...e,ref:r,children:t})})});d(2313);const Gr=(0,r.observer)(({position:t="top",children:r})=>{const{chart:i,toolbarWidget:a}=(0,b.gy)(),{context:s}=i,{onMouseEnter:n,onMouseLeave:o}=a;return s?(0,v.jsx)("div",{className:e()("sc-toolbar-widget",{[`sc-toolbar-widget--${t}`]:!!t}),onMouseEnter:n,onMouseLeave:o,children:r}):null});d(9758);const Wr={Barrier:N,ChartSetting:we,ChartSize:ue,ChartTitle:fr,ChartTypes:M,ChartMode:nt,createObjectFromLocalStorage:c.s0,CrosshairToggle:ce,DrawTools:ye,FastMarker:Tr,Marker:Tr,PendingPromise:n.A,setSmartChartsPublicPath:function(t){d.p=t},Share:Ce.default,SmartChart:zr,StudyLegend:ee,Timeperiod:et,Views:oe,ToolbarWidget:Gr,logEvent:Te.$s,LogCategories:Te.dq,LogActions:Te.Cw}})(),g=g.default})());
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react-dom"),require("react-transition-group"),require("react/jsx-runtime"),require("react"),require("dayjs"),require("mobx"),require("mobx-react-lite")):"function"==typeof define&&define.amd?define([,,,,,,],e):"object"==typeof exports?exports.smartcharts=e(require("react-dom"),require("react-transition-group"),require("react/jsx-runtime"),require("react"),require("dayjs"),require("mobx"),require("mobx-react-lite")):t.smartcharts=e(t.ReactDOM,t.ReactTransitionGroup,t.React,t.React,t.dayjs,t.mobx,t.mobxReactLite)}(self,(t,e,r,i,a,s,n)=>(()=>{var o,l,c,h,u={7231(t){t.exports=function(){"use strict";var t="minute",e=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(i,a,s){var n=a.prototype;s.utc=function(t){return new a({date:t,utc:!0,args:arguments})},n.utc=function(e){var r=s(this.toDate(),{locale:this.$L,utc:!0});return e?r.add(this.utcOffset(),t):r},n.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var o=n.parse;n.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t)};var l=n.init;n.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else l.call(this)};var c=n.utcOffset;n.utcOffset=function(i,a){var s=this.$utils().u;if(s(i))return this.$u?0:s(this.$offset)?c.call(this):this.$offset;if("string"==typeof i&&(i=function(t){void 0===t&&(t="");var i=t.match(e);if(!i)return null;var a=(""+i[0]).match(r)||["-",0,0],s=a[0],n=60*+a[1]+ +a[2];return 0===n?0:"+"===s?n:-n}(i),null===i))return this;var n=Math.abs(i)<=16?60*i:i;if(0===n)return this.utc(a);var o=this.clone();if(a)return o.$offset=n,o.$u=!1,o;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(o=this.local().add(n+l,t)).$offset=n,o.$x.$localOffset=l,o};var h=n.format;n.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,e)},n.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},n.isUTC=function(){return!!this.$u},n.toISOString=function(){return this.toDate().toISOString()},n.toString=function(){return this.toDate().toUTCString()};var u=n.toDate;n.toDate=function(t){return"s"===t&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():u.call(this)};var d=n.diff;n.diff=function(t,e,r){if(t&&this.$u===t.$u)return d.call(this,t,e,r);var i=this.local(),a=s(t).local();return d.call(i,a,e,r)}}}()},12(t){"use strict";var e=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}();var r={emitDelay:10,strictMode:!1},i=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?r:arguments[0];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=void 0,a=void 0;i=e.hasOwnProperty("emitDelay")?e.emitDelay:r.emitDelay,this._emitDelay=i,a=e.hasOwnProperty("strictMode")?e.strictMode:r.strictMode,this._strictMode=a,this._listeners={},this.events=[]}return e(t,[{key:"_addListenner",value:function(t,e,r){if("function"!=typeof e)throw TypeError("listener must be a function");-1===this.events.indexOf(t)?(this._listeners[t]=[{once:r,fn:e}],this.events.push(t)):this._listeners[t].push({once:r,fn:e})}},{key:"on",value:function(t,e){this._addListenner(t,e,!1)}},{key:"once",value:function(t,e){this._addListenner(t,e,!0)}},{key:"off",value:function(t,e){var r,i,a=this,s=this.events.indexOf(t);t&&-1!==s&&(e?(r=[],(i=a._listeners[t]).forEach(function(t,i){t.fn===e&&r.unshift(i)}),r.forEach(function(t){i.splice(t,1)}),i.length||(a.events.splice(s,1),delete a._listeners[t])):(delete this._listeners[t],this.events.splice(s,1)))}},{key:"_applyEvents",value:function(t,e){var r=this._listeners[t];if(r&&r.length){var i=[];r.forEach(function(t,r){t.fn.apply(null,e),t.once&&i.unshift(r)}),i.forEach(function(t){r.splice(t,1)})}else if(this._strictMode)throw"No listeners specified for event: "+t}},{key:"emit",value:function(t){for(var e=this,r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];this._emitDelay?setTimeout(function(){e._applyEvents.call(e,t,i)},this._emitDelay):this._applyEvents(t,i)}},{key:"emitSync",value:function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];this._applyEvents(t,r)}},{key:"destroy",value:function(){this._listeners={},this.events=[]}}]),t}();t.exports=i},9829(t,e,r){"use strict";var i=r(6550);function a(){}function s(){}s.resetWarningCache=a,t.exports=function(){function t(t,e,r,a,s,n){if(n!==i){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function e(){return t}t.isRequired=t;var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:s,resetWarningCache:a};return r.PropTypes=r,r}},8713(t,e,r){t.exports=r(9829)()},6550(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1045(t,e,r){"use strict";r.d(e,{AT:()=>x,Fp:()=>v,NI:()=>S,Os:()=>l,Sn:()=>C,Xv:()=>c,YH:()=>p,c4:()=>w,jY:()=>T,wx:()=>y});var i=r(1186),a=r(9585),s=r(1993),n=r(3095),o=r(9160).t;const l=()=>({horizontal:{id:"horizontal",text:o.translate("Horizontal line [num]"),icon:i.BT},line:{id:"line",text:o.translate("Trend line [num]"),icon:i.bV},vertical:{id:"vertical",text:o.translate("Vertical line [num]"),icon:i.zx}}),c=()=>[{category:"momentum",name:o.translate("Momentum"),icon:a.hy,items:[{flutter_chart_id:"AwesomeOscillator",name:o.translate("Awesome Oscillator"),short_name:o.translate("Awesome"),description:o.translate("The Awesome Oscillator is an indicator used to measure market momentum. AO calculates the difference of a 34 Period and 5 Period Simple Moving Averages. The Simple Moving Averages that are used are not calculated using closing price but rather each bar's midpoints. AO is generally used to affirm trends or to anticipate possible reversals."),icon:a.o2,isPrediction:!0},{flutter_chart_id:"dpo",name:o.translate("Detrended Price Oscillator"),short_name:o.translate("Detrended"),description:o.translate("The Detrended Price Oscillator (DPO) helps to identify price cycles without the influence of short- and long-term trends. The DPO compares a simple moving average to a historical pricenear the middle of a specified period. It also shows the peaks and drops over that particular period, making it easier to predict buy points."),icon:a.fT},{flutter_chart_id:"macd",name:o.translate("MACD"),short_name:o.translate("MACD"),description:o.translate("MACD is a trading indicator used in technical analysis of stock prices. It is supposed to reveal changes in the strength, direction, momentum, and duration of a trend in a stock's price."),icon:a.gE},{flutter_chart_id:"ROC",name:o.translate("Price Rate of Change"),short_name:o.translate("Price ROC"),description:o.translate("The Price Rate-of-Change (ROC) indicator displays the difference between the current price and the price x-time periods ago. The difference can be displayed in either points or as a percentage."),icon:a.nF},{flutter_chart_id:"RSI",name:o.translate("Relative Strength Index (RSI)"),short_name:o.translate("RSI"),description:o.translate("The Relative Strength Index (RSI) was published by J. Welles Wilder. The current price is normalized as a percentage between 0 and 100. The name of this oscillator is misleading because it does not compare the instrument relative to another instrument or set of instruments, but rather represents the current price relative to other recent prices within the selected lookback window length."),icon:a.nl},{flutter_chart_id:"StochasticOscillator",name:o.translate("Stochastic Oscillator"),short_name:o.translate("Stochastic"),description:o.translate("A technical momentum indicator that compares a security's closing price to its price range over a given time period. The oscillator's sensitivity to market movements can be reduced by adjusting the time period or by taking a moving average of the result."),icon:a.GA,isPrediction:!0},{flutter_chart_id:"SMI",name:o.translate("Stochastic Momentum Index"),short_name:o.translate("Stch Mtm"),description:o.translate("The Stochastic Momentum Index (SMI) helps to identify overbought or oversold conditions in the market and to predict bearish or bullish trends. It calculates the distance between the current closing price and the median of the high/low range, and displays 2 lines on the chart: the first (known as %K) represents the price movement while the second (known as %D) is a moving average of the first line. If the closing price is higher than the median of the high/low range, the SMI returns a positive value. If the closing price is lower than the average price, a negative value is returned. Values above 40 indicate a bullish trend while values below -40 indicate a bearish trend."),icon:a.Gi},{flutter_chart_id:"WilliamsR",name:o.translate("William's Percent Range"),short_name:o.translate("William's %R"),description:o.translate("Developed by Larry Williams, Williams %R is a momentum indicator that is the inverse of the Fast Stochastic Oscillator. Also referred to as %R, Williams %R reflects the level of the close relative to the highest high for the look-back period."),icon:a.tS,isPrediction:!0}]},{category:"trend",name:o.translate("Trend"),icon:a.KP,items:[{flutter_chart_id:"Aroon",name:o.translate("Aroon"),short_name:o.translate("Aroon"),description:o.translate("Developed by Tushar Chande in 1995, Aroon is an indicator system that determines whether a stock is trending or not and how strong the trend is. There are two separate indicators: Aroon-Up and Aroon-Down. A 25-day Aroon-Up measures the number of days since a 25-day high. A 25-day Aroon-Down measures the number of days since a 25-day low."),icon:a.Y8},{flutter_chart_id:"adx",name:o.translate("ADX/DMS"),short_name:o.translate("ADX"),description:o.translate("The Average Directional Movement Index index (ADX) was developed in 1978 by J. Welles Wilder as an indicator of trend strength in a series of prices of a financial instrument ADX will range between 0 and 100. Generally, ADX readings below 20 indicate trend weakness, and readings above 40 indicate trend strength."),icon:a.YF,isPrediction:!0},{flutter_chart_id:"commodity_channel_index",name:o.translate("Commodity Channel Index"),short_name:o.translate("CCI"),description:o.translate("The Commodity Channel Index (CCI) is a versatile indicator that can be used to identify a new trend or warn of extreme conditions."),icon:a.FZ,isPrediction:!0},{flutter_chart_id:"ichimoku",name:o.translate("Ichimoku Clouds"),short_name:o.translate("Ichimoku Clouds"),description:o.translate("The Ichimoku Cloud, also known as Ichimoku Kinko Hyo, is a versatile indicator that defines support and resistance, identifies trend direction, gauges momentum and provides trading signals. Ichimoku Kinko Hyo translates into “one look equilibrium chart”."),icon:a.kn,isPrediction:!0},{flutter_chart_id:"ParabolicSAR",name:o.translate("Parabolic SAR"),short_name:o.translate("PSAR"),description:o.translate("The parabolic SAR is calculated almost independently for each trend in the price. When the price is in an uptrend, the SAR emerges below the price and converges upwards towards it. Similarly, on a downtrend, the SAR emerges above the price and converges downwards. At each step within a trend, the SAR is calculated one period in advance."),icon:a.gt,isPrediction:!0},{flutter_chart_id:"zigzag",name:o.translate("Zig Zag"),short_name:o.translate("Zig Zag"),description:o.translate("Zig Zag helps to identify trend reversals and filters out relatively small price movements by determining the support and resistance levels of the market. It accepts a percentage of deviation as the input and displays a line if the price change is larger than the percentage of deviation. Zig Zag ignores any sideways movement and is useful to filter out “market noise”."),icon:a.Xu,isPrediction:!0}]},{category:"volatility",name:o.translate("Volatility"),icon:a.a_,items:[{flutter_chart_id:"bollinger_bands",name:o.translate("Bollinger Bands"),short_name:o.translate("Bollinger Bands"),description:o.translate("Bollinger Bands can be used to measure the highness or lowness of the price relative to previous trades."),icon:a.Ne},{flutter_chart_id:"donchian_channel",name:o.translate("Donchian Channel"),short_name:o.translate("Donchian Channel"),description:o.translate("The Donchian Channel is an indicator used in market trading developed by Richard Donchian. It is formed by taking the highest high and the lowest low of the last n periods. The area between the high and the low is the channel for the period chosen."),icon:a.jT,isPrediction:!0}]},{category:"moving-averages",name:o.translate("Moving averages"),icon:a.p3,items:[{flutter_chart_id:"moving_average",name:o.translate("Moving Average (MA)"),short_name:o.translate("MA"),description:o.translate("The Moving Average (MA) helps to identify the overall market trend by filtering out short-term price fluctuations. Using historical data, it calculates the average price over a specific period and plots a line on the chart. If the MA line moves upwards, it’s an indicator of an uptrend, a downtrend if it moves downwards. A buy signal occurs when the price moves above the MA line."),icon:a.Zp},{flutter_chart_id:"moving_envelope_average",name:o.translate("Moving Average Envelope"),short_name:o.translate("MA Env"),description:o.translate("The Moving Average Envelope (MAE) helps to identify strong price movement that indicates the start of a trend. The MAE creates a moving average line as well as 2 bands around it. In theory, when the market price touches the upper or lower bands, a trend reversal will occur, indicating a buy signal."),icon:a.Jb,isPrediction:!0},{flutter_chart_id:"rainbow",name:o.translate("Rainbow Moving Average"),short_name:o.translate("Rainbow MA"),description:o.translate("The Rainbow Moving Average (RMA) displays several moving average lines simultaneously. When the lines intersect, it’s an indicator of price reversal and the angle of the lines are helpful to predict the trend strength. The steeper the curve, the stronger the trend. When the price crosses the moving average lines from below, it signals an upward trend. When the price crosses the moving average lines from above, it signals a downward trend. The RMA is easier to use compared to using several different moving average indicators at once."),icon:a.Tz,isPrediction:!0}]},{category:"others",name:o.translate("Others"),icon:a.vn,items:[{flutter_chart_id:"alligator",name:o.translate("Alligator"),short_name:o.translate("Alligator"),description:o.translate("Bill Williams introduced the Alligator indicator in 1995. The Alligator is as much a metaphor as it is an indicator. It consists of three lines, overlaid on a pricing chart, that represent the jaw, the teeth and the lips of the beast, and was created to help the trader confirm the presence of a trend and its direction. The Alligator indicator can also help traders designate impulse and corrective wave formations, but the tool works best when combined with a momentum indicator."),icon:a.cZ,isPrediction:!0},{flutter_chart_id:"fcb",name:o.translate("Fractal Chaos Band"),short_name:o.translate("Fractal Chaos Band"),description:o.translate("Fractals are indicators on candlestick charts that identify reversal points in the market. Traders often use fractals to get an idea about the direction in which the price will develop. A fractal will form when a particular price pattern happens on a chart."),icon:a.aU,isPrediction:!0}]}],h={thickness:1,hasArea:!1},u=((0,s.o8)(h),()=>({config:{lineStyle:(0,s.o8)(h),pattern:"solid",color:"#000000",isOverlay:!0},parameters:[{path:"lineStyle",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"enableLabel",title:o.translate("Axis Label"),type:"switch",category:"parameters",defaultValue:!0}]})),d=()=>({config:{lineStyle:(0,s.o8)(h),pattern:"solid",color:"#000000",isOverlay:!0},parameters:[{path:"lineStyle",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"}]}),g=()=>({config:{lineStyle:(0,s.o8)(h),pattern:"solid",color:"#000000",isOverlay:!0},parameters:[{path:"lineStyle",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillStyle",title:o.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"}]}),m={vertical:u,line:d,ray:d,trend:g,channel:g,fibfan:g,rectangle:g,horizontal:u,continuous:d},p=t=>m[t](),f=()=>({open:o.translate("Open"),high:o.translate("High"),low:o.translate("Low"),close:o.translate("Close"),"Hl/2":o.translate("Hl/2"),"HlC/3":o.translate("Hlc/3"),"HlCC/4":o.translate("Hlcc/4"),"OHlC/4":o.translate("Ohlc/4")}),_=()=>({simple:o.translate("Simple"),exponential:o.translate("Exponential"),weighted:o.translate("Weighted"),hull:o.translate("Hull"),zeroLag:o.translate("Zero Lag"),timeSeries:o.translate("Time Series"),wellesWilder:o.translate("Welles Wilder"),variable:o.translate("Variable"),triangular:o.translate("Triangular"),doubleExponential:o.translate("2-Exponential"),tripleExponential:o.translate("3-Exponential")}),b={RSI:()=>({config:{lineStyle:(0,s.o8)(h),oscillatorLinesConfig:{overboughtStyle:(0,s.o8)(h),oversoldStyle:(0,s.o8)(h)},pinLabels:!1,pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()},{paths:{value:"oscillatorLinesConfig.overboughtValue",color:"oscillatorLinesConfig.overboughtStyle.color"},group_key:"over_bought",title:o.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:80,color:"#000000"}},{paths:{value:"oscillatorLinesConfig.oversoldValue",color:"oscillatorLinesConfig.oversoldStyle.color"},group_key:"over_sold",title:o.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:20,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:o.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),adx:()=>({config:{lineStyle:(0,s.o8)(h),positiveLineStyle:(0,s.o8)(h),negativeLineStyle:(0,s.o8)(h),pipSize:2,showLastIndicator:!0},parameters:[{path:"positiveLineStyle.color",title:o.translate("+DI"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"negativeLineStyle.color",title:o.translate("-DI"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"barStyle.bullishColor",title:o.translate("Positive Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:o.translate("Negative Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"smoothingPeriod",title:o.translate("Smoothing Period"),defaultValue:14,category:"inputs",type:"number"},{path:"showSeries",title:o.translate("Series"),type:"switch",category:"parameters",defaultValue:!0},{path:"showShading",title:o.translate("Shading"),type:"switch",category:"parameters",defaultValue:!1},{path:"showHistogram",title:o.translate("Histogram"),type:"switch",category:"parameters",defaultValue:!1}]}),AwesomeOscillator:()=>({config:{pipSize:2,showLastIndicator:!0},parameters:[{path:"barStyle.bullishColor",title:o.translate("Increasing Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:o.translate("Decreasing Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"}]}),dpo:()=>({config:{lineStyle:(0,s.o8)(h),isCentered:!0,pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()},{path:"movingAverageType",title:o.translate("Moving Average Type"),defaultValue:"simple",category:"inputs",type:"select",options:_()}]}),gator:()=>({config:{pipSize:2,showLastIndicator:!0},parameters:[{path:"barStyle.bullishColor",title:o.translate("Increasing Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:o.translate("Decreasing Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"jawPeriod",title:o.translate("Jaw Period"),defaultValue:13,category:"inputs",type:"number"},{path:"jawOffset",title:o.translate("Jaw Offset"),defaultValue:8,category:"inputs",type:"number"},{path:"teethPeriod",title:o.translate("Teeth Period"),defaultValue:8,category:"inputs",type:"number"},{path:"teethOffset",title:o.translate("Teeth Offset"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsPeriod",title:o.translate("Lips Period"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsOffset",title:o.translate("Lips Offset"),defaultValue:3,category:"inputs",type:"number"}]}),macd:()=>({config:{lineStyle:(0,s.o8)(h),signalLineStyle:(0,s.o8)(h),pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"signalLineStyle.color",title:o.translate("Signal"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"barStyle.bullishColor",title:o.translate("Increasing Bar"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"barStyle.bearishColor",title:o.translate("Decreasing Bar"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"fastMAPeriod",title:o.translate("Fast MA Period"),defaultValue:12,category:"inputs",type:"number"},{path:"slowMAPeriod",title:o.translate("Slow MA Period"),defaultValue:26,category:"inputs",type:"number"},{path:"signalPeriod",title:o.translate("Signal Period"),defaultValue:9,category:"inputs",type:"number"}]}),ROC:()=>({config:{lineStyle:(0,s.o8)(h),pipSize:4,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()}]}),StochasticOscillator:()=>({config:{lineStyle:{...(0,s.o8)(h),color:"#FFFFFF"},fastLineStyle:(0,s.o8)(h),slowLineStyle:(0,s.o8)(h),oscillatorLinesConfig:{overboughtStyle:(0,s.o8)(h),oversoldStyle:(0,s.o8)(h)},pinLabels:!1,overBoughtPrice:80,overSoldPrice:20,pipSize:2,showLastIndicator:!0},parameters:[{path:"fastLineStyle.color",title:o.translate("Fast"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"slowLineStyle.color",title:o.translate("Slow"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()},{path:"isSmooth",title:o.translate("Smooth"),type:"switch",category:"parameters",defaultValue:!0},{paths:{value:"oscillatorLinesConfig.overboughtValue",color:"oscillatorLinesConfig.overboughtStyle.color"},group_key:"over_bought",title:o.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:80,color:"#000000"}},{paths:{value:"oscillatorLinesConfig.oversoldValue",color:"oscillatorLinesConfig.oversoldStyle.color"},group_key:"over_sold",title:o.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:20,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:o.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),SMI:()=>({config:{lineStyle:(0,s.o8)(h),signalLineStyle:(0,s.o8)(h),pipSize:2,showLastIndicator:!0,smiOscillatorLimits:{overboughtStyle:{...(0,s.o8)(h),color:"#626b73"},oversoldStyle:{...(0,s.o8)(h),color:"#626b73"}}},parameters:[{path:"lineStyle.color",group_key:"%k",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",group_key:"%k",title:o.translate("Period"),defaultValue:10,category:"inputs",type:"number"},{path:"smoothingPeriod",group_key:"%k",title:o.translate("Smoothing Period"),defaultValue:3,category:"inputs",type:"number"},{path:"doubleSmoothingPeriod",group_key:"%k",title:o.translate("Double Smoothing Period"),defaultValue:3,category:"inputs",type:"number"},{path:"signalLineStyle.color",group_key:"%d",title:o.translate("Color"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"signalPeriod",group_key:"%d",title:o.translate("Signal Period"),defaultValue:10,category:"inputs",type:"number"},{path:"maType",group_key:"%d",title:o.translate("Field"),defaultValue:"exponential",category:"inputs",type:"select",options:_()},{paths:{value:"smiOscillatorLimits.overboughtValue",color:"smiOscillatorLimits.overboughtStyle.color"},group_key:"over_bought",title:o.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:40,color:"#626b73"}},{paths:{value:"smiOscillatorLimits.oversoldValue",color:"smiOscillatorLimits.oversoldStyle.color"},group_key:"over_sold",title:o.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-40,color:"#626b73"}},{path:"showZones",group_key:"show_zones",title:o.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),WilliamsR:()=>({config:{lineStyle:(0,s.o8)(h),zeroHorizontalLinesStyle:{...(0,s.o8)(h),color:"0xFFF44336"},oscillatorLimits:{overboughtStyle:(0,s.o8)(h),oversoldStyle:(0,s.o8)(h)},pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:14,category:"inputs",type:"number"},{paths:{value:"oscillatorLimits.overboughtValue",color:"oscillatorLimits.overboughtStyle.color"},group_key:"over_bought",title:o.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-20,color:"#000000"}},{paths:{value:"oscillatorLimits.oversoldValue",color:"oscillatorLimits.oversoldStyle.color"},group_key:"over_sold",title:o.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-80,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:o.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),Aroon:()=>({config:{upLineStyle:(0,s.o8)(h),downLineStyle:(0,s.o8)(h),pipSize:2,showLastIndicator:!0},parameters:[{path:"upLineStyle.color",title:o.translate("Aroon Up"),defaultValue:"#00DD00",category:"inputs",type:"colorpicker"},{path:"downLineStyle.color",title:o.translate("Aroon Down"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:14,category:"inputs",type:"number"}]}),commodity_channel_index:()=>({config:{lineStyle:(0,s.o8)(h),oscillatorLinesConfig:{overboughtStyle:(0,s.o8)(h),oversoldStyle:(0,s.o8)(h)},pipSize:2,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:20,category:"inputs",type:"number"},{paths:{value:"oscillatorLinesConfig.overboughtValue",color:"oscillatorLinesConfig.overboughtStyle.color"},group_key:"over_bought",title:o.translate("OverBought"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:100,color:"#000000"}},{paths:{value:"oscillatorLinesConfig.oversoldValue",color:"oscillatorLinesConfig.oversoldStyle.color"},group_key:"over_sold",title:o.translate("OverSold"),type:"numbercolorpicker",category:"parameters",defaultValue:{value:-100,color:"#000000"}},{path:"showZones",group_key:"show_zones",title:o.translate("Show Zones"),type:"switch",category:"parameters",defaultValue:!0}]}),ichimoku:()=>({config:{conversionLineStyle:(0,s.o8)(h),baseLineStyle:(0,s.o8)(h),spanALineStyle:(0,s.o8)(h),laggingLineStyle:(0,s.o8)(h),spanBLineStyle:(0,s.o8)(h),conversionLinePeriod:(0,s.o8)(h),showLastIndicator:!0},parameters:[{path:"conversionLineStyle.color",title:o.translate("Conversion Line"),defaultValue:"#0000FF",category:"inputs",type:"colorpicker"},{path:"baseLineStyle.color",title:o.translate("Base Line"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"spanALineStyle.color",title:o.translate("Leading Span A"),defaultValue:"#00FF00",category:"inputs",type:"colorpicker"},{path:"spanBLineStyle.color",title:o.translate("Leading Span B"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"laggingLineStyle.color",title:o.translate("Lagging Span"),defaultValue:"#808000",category:"inputs",type:"colorpicker"},{path:"conversionLinePeriod",title:o.translate("Conversion Line Period"),defaultValue:9,category:"inputs",type:"number"},{path:"baseLinePeriod",title:o.translate("Base Line Period"),defaultValue:26,category:"inputs",type:"number"},{path:"spanBPeriod",title:o.translate("Leading Span B Period"),defaultValue:52,category:"inputs",type:"number"},{path:"laggingSpanOffset",title:o.translate("Lagging Span Period"),defaultValue:-26,category:"inputs",type:"number",min:-100,max:0}]}),ParabolicSAR:()=>({config:{scatterStyle:{radius:1.5},showLastIndicator:!0},parameters:[{path:"scatterStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"minAccelerationFactor",title:o.translate("Minimum AF"),defaultValue:.02,category:"inputs",type:"number",step:.01},{path:"maxAccelerationFactor",title:o.translate("Maximum AF"),defaultValue:.2,category:"inputs",type:"number",step:.01}]}),zigzag:()=>({config:{lineStyle:(0,s.o8)(h),showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"distance",title:o.translate("Distance(%)"),defaultValue:10,category:"inputs",type:"number"}]}),bollinger_bands:()=>({config:{upperLineStyle:(0,s.o8)(h),middleLineStyle:(0,s.o8)(h),lowerLineStyle:(0,s.o8)(h),showLastIndicator:!0},parameters:[{path:"upperLineStyle.color",title:o.translate("Bollinger Bands Top"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"middleLineStyle.color",title:o.translate("Bollinger Bands Median"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowerLineStyle.color",title:o.translate("Bollinger Bands Bottom"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:o.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:20,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()},{path:"standardDeviation",title:o.translate("Standard Deviations"),defaultValue:2,category:"inputs",type:"number"},{path:"movingAverageType",title:o.translate("Moving Average Type"),defaultValue:"simple",category:"inputs",type:"select",options:_()},{path:"showChannelFill",title:o.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]}),donchian_channel:()=>({config:{upperLineStyle:(0,s.o8)(h),middleLineStyle:(0,s.o8)(h),lowerLineStyle:(0,s.o8)(h),showLastIndicator:!0},parameters:[{path:"upperLineStyle.color",title:o.translate("Donchian High"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"middleLineStyle.color",title:o.translate("Donchian Median"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowerLineStyle.color",title:o.translate("Donchian Low"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:o.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"highPeriod",title:o.translate("High Period"),defaultValue:20,category:"inputs",type:"number"},{path:"lowPeriod",title:o.translate("Low Period"),defaultValue:20,category:"inputs",type:"number"},{path:"showChannelFill",title:o.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]}),moving_average:()=>({config:{lineStyle:(0,s.o8)(h),isOverlay:!0,showLastIndicator:!0},parameters:[{path:"lineStyle.color",title:o.translate("Color"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:50,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()},{path:"movingAverageType",title:o.translate("Type"),defaultValue:"simple",category:"inputs",type:"select",options:_()},{path:"offset",title:o.translate("Offset"),defaultValue:0,category:"inputs",type:"number"}]}),moving_envelope_average:()=>({config:{upperLineStyle:(0,s.o8)(h),middleLineStyle:(0,s.o8)(h),lowerLineStyle:(0,s.o8)(h),showLastIndicator:!0},parameters:[{path:"upperLineStyle.color",title:o.translate("MA Env Top"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"middleLineStyle.color",title:o.translate("MA Env Median"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowerLineStyle.color",title:o.translate("MA Env Bottom"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:o.translate("Fill Color"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"period",title:o.translate("Period"),defaultValue:50,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()},{path:"shiftType",title:o.translate("Shift Type"),defaultValue:"percent",category:"inputs",type:"select",options:{percent:o.translate("Percent"),point:o.translate("Point")}},{path:"shift",title:o.translate("Shift"),defaultValue:5,category:"inputs",type:"number"},{path:"movingAverageType",title:o.translate("Type"),defaultValue:"simple",category:"inputs",type:"select",options:_()},{path:"showChannelFill",title:o.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]}),rainbow:()=>({config:{bandsCount:10,movingAverageType:"simple",rainbowLineStyles:[],showLastIndicator:!0},parameters:[{path:"period",title:o.translate("Period"),defaultValue:2,category:"inputs",type:"number"},{path:"fieldType",title:o.translate("Field"),defaultValue:"close",category:"inputs",type:"select",options:f()},{path:"rainbowLineStyles[0].color",title:o.translate("SMA1"),defaultValue:"#ff0000",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[1].color",title:o.translate("SMA2"),defaultValue:"#ff7f00",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[2].color",title:o.translate("SMA3"),defaultValue:"#ffff00",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[3].color",title:o.translate("SMA4"),defaultValue:"#7fff00",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[4].color",title:o.translate("SMA5"),defaultValue:"#00ff7f",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[5].color",title:o.translate("SMA6"),defaultValue:"#00ffff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[6].color",title:o.translate("SMA7"),defaultValue:"#007fff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[7].color",title:o.translate("SMA8"),defaultValue:"#0000ff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[8].color",title:o.translate("SMA9"),defaultValue:"#7f00ff",category:"inputs",type:"colorpicker"},{path:"rainbowLineStyles[9].color",title:o.translate("SMA10"),defaultValue:"#ff00ff",category:"inputs",type:"colorpicker"}]}),alligator:()=>({config:{jawLineStyle:(0,s.o8)(h),teethLineStyle:(0,s.o8)(h),lipsLineStyle:(0,s.o8)(h),showLastIndicator:!0},parameters:[{path:"jawLineStyle.color",title:o.translate("Jaw"),defaultValue:"#0000FF",category:"inputs",type:"colorpicker"},{path:"teethLineStyle.color",title:o.translate("Teeth"),defaultValue:"#FF0000",category:"inputs",type:"colorpicker"},{path:"lipsLineStyle.color",title:o.translate("Lips"),defaultValue:"#00FF00",category:"inputs",type:"colorpicker"},{path:"showLines",title:o.translate("Show Lines"),type:"switch",category:"parameters",defaultValue:!0},{path:"jawPeriod",title:o.translate("Jaw Period"),defaultValue:13,category:"inputs",type:"number"},{path:"jawOffset",title:o.translate("Jaw Offset"),defaultValue:8,category:"inputs",type:"number"},{path:"teethPeriod",title:o.translate("Teeth Period"),defaultValue:8,category:"inputs",type:"number"},{path:"teethOffset",title:o.translate("Teeth Offset"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsPeriod",title:o.translate("Lips Period"),defaultValue:5,category:"inputs",type:"number"},{path:"lipsOffset",title:o.translate("Lips Offset"),defaultValue:3,category:"inputs",type:"number"},{path:"showFractal",title:o.translate("Show Fractals"),type:"switch",category:"parameters",defaultValue:!1}]}),fcb:()=>({config:{highLineStyle:(0,s.o8)(h),lowLineStyle:(0,s.o8)(h),showLastIndicator:!0},parameters:[{path:"highLineStyle.color",title:o.translate("Fractal High"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"lowLineStyle.color",title:o.translate("Fractal Low"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"fillColor",title:o.translate("Fractal Channel"),defaultValue:"#000000",category:"inputs",type:"colorpicker"},{path:"showChannelFill",title:o.translate("Channel Fill"),type:"switch",category:"parameters",defaultValue:!0}]})},v=t=>b[t](),y=[{id:"line",text:o.translate("Area"),candleOnly:!1,icon:i.D3},{id:"candles",text:o.translate("Candle"),candleOnly:!0,icon:i.Fg},{id:"hollow",text:o.translate("Hollow"),candleOnly:!0,icon:i.H8},{id:"ohlc",text:o.translate("OHLC"),candleOnly:!0,icon:i.YM}],S=[{key:"tick",single:o.translate("tick"),items:[{interval:0,num:1}]},{key:"minute",single:o.translate("minute"),plural:o.translate("minutes"),items:[{interval:60,num:1},{interval:120,num:2},{interval:180,num:3},{interval:300,num:5},{interval:600,num:10},{interval:900,num:15},{interval:1800,num:30}]},{key:"hour",single:o.translate("hour"),plural:o.translate("hours"),items:[{interval:3600,num:1},{interval:7200,num:2},{interval:14400,num:4},{interval:28800,num:8}]},{key:"day",single:o.translate("day"),plural:o.translate("days"),items:[{interval:86400,num:1}]}],x=[{key:"en",name:"English",icon:(0,n.jsx)(i.zM.GBP,{})},{key:"bn",name:"বাংলা",icon:(0,n.jsx)(i.zM.Bangladesh,{})},{key:"de",name:"Deutsch",icon:(0,n.jsx)(i.zM.German,{})},{key:"ar",name:"العربية",icon:(0,n.jsx)(i.zM.Arabic,{})},{key:"fr",name:"French",icon:(0,n.jsx)(i.zM.French,{})},{key:"mn",name:"Монгол",icon:(0,n.jsx)(i.zM.Mongolian,{})},{key:"ru",name:"Русский",icon:(0,n.jsx)(i.zM.Russia,{})},{key:"si",name:"සිංහල",icon:(0,n.jsx)(i.zM.Srilanka,{})},{key:"sw",name:"Kiswahili",icon:(0,n.jsx)(i.zM.Kenya,{})},{key:"th",name:"Thai",icon:(0,n.jsx)(i.zM.Thailand,{})},{key:"id",name:"Indonesia",icon:(0,n.jsx)(i.zM.Indonesia,{})},{key:"vi",name:"Tiếng Việt",icon:(0,n.jsx)(i.zM.Vietnam,{})},{key:"it",name:"Italiano",icon:(0,n.jsx)(i.zM.Italy,{})},{key:"km",name:"ខ្មែរ",icon:(0,n.jsx)(i.zM.Cambodia,{})},{key:"ko",name:"한국어",icon:(0,n.jsx)(i.zM.Korean,{})},{key:"pt",name:"Português",icon:(0,n.jsx)(i.zM.Portugal,{})},{key:"tr",name:"Türkçe",icon:(0,n.jsx)(i.zM.Turkey,{})},{key:"uz",name:"O'zbek",icon:(0,n.jsx)(i.zM.Uzbekistan,{})},{key:"zh_cn",name:"简体中文",icon:(0,n.jsx)(i.zM.Chinese,{})},{key:"pl",name:"Polish",icon:(0,n.jsx)(i.zM.Poland,{})},{key:"zh_tw",name:"繁體中文",icon:(0,n.jsx)(i.zM.ChineseTraditional,{})},{key:"es",name:"espanyol",icon:(0,n.jsx)(i.zM.Spanish,{})}],w={CHART_MODE_MODAL_OPEN:"CHART_MODE_MODAL_OPEN",CHART_INTERVAL_CHANGE:"CHART_INTERVAL_CHANGE",CHART_TYPE_CHANGE:"CHART_TYPE_CHANGE",CHART_SWITCH_TOGGLE:"CHART_SWITCH_TOGGLE",MARKET_MENU_MODAL_TOGGLE:"MARKET_MENU_MODAL_TOGGLE",FAVORITE_MARKETS_TOGGLE:"FAVORITE_MARKETS_TOGGLE",INDICATOR_ADDED:"INDICATOR_ADDED",INDICATOR_DELETED:"INDICATOR_DELETED",INDICATOR_EDITED:"INDICATOR_EDITED",INDICATOR_INFO_TOGGLE:"INDICATOR_INFO_TOGGLE",INDICATOR_SEARCH:"INDICATOR_SEARCH",INDICATOR_SETTINGS_OPEN:"INDICATOR_SETTINGS_OPEN",INDICATORS_CLEAR_ALL:"INDICATORS_CLEAR_ALL",INDICATORS_MODAL_OPEN:"INDICATORS_MODAL_OPEN",INITIAL:"INITIAL",MARKET_SEARCH:"MARKET_SEARCH",MARKET_STATE_CHANGE:"MARKET_STATE_CHANGE",READY:"READY",SCROLL_TO_LEFT:"SCROLL_TO_LEFT",SYMBOL_CHANGE:"SYMBOL_CHANGE",DRAWING_TOOLS_OPEN:"DRAWING_TOOLS_OPEN",DRAWING_TOOLS_ADD:"DRAWING_TOOLS_ADD",DRAWING_TOOLS_DELETE:"DRAWING_TOOLS_DELETE",DRAWING_TOOLS_EDIT_PX:"DRAWING_TOOLS_EDIT_PX",DRAWING_TOOLS_EDIT_COLOR:"DRAWING_TOOLS_EDIT_COLOR",DRAWING_TOOLS_MODAL_OPEN:"DRAWING_TOOLS_MODAL_OPEN",CROSSHAIR_CLICK:"CROSSHAIR_CLICK"},C={predictionIndicator:o.translate("This indicator does not support 1-tick intervals. To use this indicator, change your chart time interval to 1 minute or more.")},T=t=>c().find(e=>e.items.some(e=>e.flutter_chart_id===t))?.category.replace("-"," ")??""},9160(t,e,r){"use strict";function i(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.d(e,{t:()=>s});const a={};const s=new class{constructor(t="en"){i(this,"lang",void 0),this.lang=t}setLanguage(t,e){a[t]||"en"===t?(this.lang=t,e?.()):r(8737)(`./${t}.json`).then(r=>{r?(a[t]=r.default,this.lang=t,e?.()):console.error("Unsupported language:",t)})}translate(...t){const e=a[this.lang],r=t[0].trim(),i=r.replace(/\\/g,"\\\\").replace(/"/g,'\\"');let s=r,n=!1;return e&&e[r]?s=e[r]:e&&e[i]&&(s=e[i],n=!0),t[1]&&Object.keys(t[1]).forEach(e=>{s=s.replace(`[${e}]`,t[1][e])}),n?s.replace(/\\\"/gi,'"'):s}}},1186(t,e,r){"use strict";r.d(e,{AD:()=>uo,BC:()=>el,BT:()=>rl,Br:()=>sl,CL:()=>lo,D3:()=>$o,F2:()=>_o,FT:()=>qo,FV:()=>ao,Fg:()=>Uo,Gu:()=>Mo,H8:()=>zo,HK:()=>No,Ik:()=>Co,Kx:()=>Vo,L0:()=>Fo,Lo:()=>So,Mz:()=>Qo,NR:()=>Ro,Np:()=>yo,PG:()=>mo,Qg:()=>Wo,RE:()=>ho,RP:()=>bo,Ri:()=>Ho,Sn:()=>Ao,U:()=>Bo,US:()=>go,W3:()=>oo,WI:()=>ko,YM:()=>Go,Z3:()=>Oo,Zt:()=>Yo,Zv:()=>so,_D:()=>Jo,ag:()=>ol,b1:()=>To,bC:()=>dl,bV:()=>il,d7:()=>vo,ee:()=>Do,fA:()=>Po,fK:()=>ll,fu:()=>cl,iQ:()=>Lo,kD:()=>Eo,kO:()=>Ko,kU:()=>fo,oX:()=>tl,qX:()=>Zo,rW:()=>po,s3:()=>Io,sM:()=>nl,sS:()=>wo,sY:()=>jo,sj:()=>no,x2:()=>co,x4:()=>xo,zM:()=>ul,zx:()=>al});r(809),r(7951);var i=r(7739),a=r.n(i),s=r(2979),n=r.n(s),o=r(6057),l=r.n(o),c=r(9955),h=r.n(c),u=r(242),d=r.n(u),g=r(267),m=r.n(g),p=r(4542),f=r.n(p),_=r(363),b=r.n(_),v=r(1811),y=r.n(v),S=r(5439),x=r.n(S),w=r(6240),C=r.n(w),T=r(1337),k=r.n(T),j=r(5829),N=r.n(j),E=r(4619),A=r.n(E),I=r(2910),D=r.n(I),O=r(7420),P=r.n(O),L=r(7885),M=r.n(L),R=r(9185),B=r.n(R),F=r(9289),V=r.n(F),H=r(204),q=r.n(H),$=r(3365),U=r.n($),z=r(3031),G=r.n(z),W=r(9324),K=r.n(W),Q=r(9625),Y=r.n(Q),X=r(5833),Z=r.n(X),J=r(7463),tt=r.n(J),et=r(3211),rt=r.n(et),it=r(9707),at=r.n(it),st=r(4629),nt=r.n(st),ot=r(6331),lt=r.n(ot),ct=r(1891),ht=r.n(ct),ut=r(8983),dt=r.n(ut),gt=r(8093),mt=r.n(gt),pt=r(8927),ft=r.n(pt),_t=r(6667),bt=r.n(_t),vt=r(1278),yt=r.n(vt),St=r(1288),xt=r.n(St),wt=r(8310),Ct=r.n(wt),Tt=r(7528),kt=r.n(Tt),jt=r(2999),Nt=r.n(jt),Et=r(6456),At=r.n(Et),It=r(3522),Dt=r.n(It),Ot=r(6380),Pt=r.n(Ot),Lt=r(9317),Mt=r.n(Lt),Rt=r(6800),Bt=r.n(Rt),Ft=r(4333),Vt=r.n(Ft),Ht=r(9411),qt=r.n(Ht),$t=r(9307),Ut=r.n($t),zt=r(4674),Gt=r.n(zt),Wt=r(6432),Kt=r.n(Wt),Qt=r(2327),Yt=r.n(Qt),Xt=r(6183),Zt=r.n(Xt),Jt=r(4497),te=r.n(Jt),ee=r(9212),re=r.n(ee),ie=r(4325),ae=r.n(ie),se=r(1320),ne=r.n(se),oe=r(8250),le=r.n(oe),ce=r(1041),he=r.n(ce),ue=r(3293),de=r.n(ue),ge=r(3775),me=r.n(ge),pe=r(1561),fe=r.n(pe),_e=r(1610),be=r.n(_e),ve=r(9429),ye=r.n(ve),Se=r(8584),xe=r.n(Se),we=r(7521),Ce=r.n(we),Te=r(4185),ke=r.n(Te),je=r(6776),Ne=r.n(je),Ee=r(9129),Ae=r.n(Ee),Ie=r(7249),De=r.n(Ie),Oe=r(9607),Pe=r.n(Oe),Le=r(9564),Me=r.n(Le),Re=r(4431),Be=r.n(Re),Fe=r(263),Ve=r.n(Fe),He=r(301),qe=r.n(He),$e=r(7414),Ue=r.n($e),ze=r(3578),Ge=r.n(ze),We=r(3255),Ke=r.n(We),Qe=r(7625),Ye=r.n(Qe),Xe=r(3719),Ze=r.n(Xe),Je=r(1445),tr=r.n(Je),er=r(4056),rr=r.n(er),ir=r(1477),ar=r.n(ir),sr=r(3332),nr=r.n(sr),or=r(6902),lr=r.n(or),cr=r(9702),hr=r.n(cr),ur=r(1649),dr=r.n(ur),gr=r(1229),mr=r.n(gr),pr=r(2607),fr=r.n(pr),_r=r(7558),br=r.n(_r),vr=r(8901),yr=r.n(vr),Sr=r(5407),xr=r.n(Sr),wr=r(4236),Cr=r.n(wr),Tr=r(1795),kr=r.n(Tr),jr=r(7428),Nr=r.n(jr),Er=r(8217),Ar=r.n(Er),Ir=r(7038),Dr=r.n(Ir),Or=r(1069),Pr=r.n(Or),Lr=r(1089),Mr=r.n(Lr),Rr=r(6226),Br=r.n(Rr),Fr=r(5357),Vr=r.n(Fr),Hr=r(451),qr=r.n(Hr),$r=r(8457),Ur=r.n($r),zr=r(2620),Gr=r.n(zr),Wr=r(3179),Kr=r.n(Wr),Qr=r(37),Yr=r.n(Qr),Xr=r(7256),Zr=r.n(Xr),Jr=r(5004),ti=r.n(Jr),ei=r(5729),ri=r.n(ei),ii=r(9876),ai=r.n(ii),si=r(3135),ni=r.n(si),oi=r(7451),li=r.n(oi),ci=r(9705),hi=r.n(ci),ui=r(3770),di=r.n(ui),gi=r(6681),mi=r.n(gi),pi=r(3785),fi=r.n(pi),_i=r(8341),bi=r.n(_i),vi=r(4298),yi=r.n(vi),Si=r(638),xi=r.n(Si),wi=r(194),Ci=r.n(wi),Ti=r(718),ki=r.n(Ti),ji=r(3864),Ni=r.n(ji),Ei=r(2502),Ai=r.n(Ei),Ii=r(6723),Di=r.n(Ii),Oi=r(1449),Pi=r.n(Oi),Li=r(9715),Mi=r.n(Li),Ri=r(5704),Bi=r.n(Ri),Fi=r(4046),Vi=r.n(Fi),Hi=r(10),qi=r.n(Hi),$i=r(1008),Ui=r.n($i),zi=r(3292),Gi=r.n(zi),Wi=r(4579),Ki=r.n(Wi),Qi=r(7571),Yi=r.n(Qi),Xi=r(6033),Zi=r.n(Xi),Ji=r(2099),ta=r.n(Ji),ea=r(6489),ra=r.n(ea),ia=r(2821),aa=r.n(ia),sa=r(7213),na=r.n(sa),oa=r(1553),la=r.n(oa),ca=r(1085),ha=r.n(ca),ua=r(3751),da=r.n(ua),ga=r(148),ma=r.n(ga),pa=r(3562),fa=r.n(pa),_a=r(7358),ba=r.n(_a),va=r(3425),ya=r.n(va),Sa=r(2188),xa=r.n(Sa),wa=r(2839),Ca=r.n(wa),Ta=r(3010),ka=r.n(Ta),ja=r(5269),Na=r.n(ja),Ea=r(3265),Aa=r.n(Ea),Ia=r(2853),Da=r.n(Ia),Oa=r(3257),Pa=r.n(Oa),La=r(2167),Ma=r.n(La),Ra=r(4005),Ba=r.n(Ra),Fa=r(6617),Va=r.n(Fa),Ha=r(2048),qa=r.n(Ha),$a=r(8438),Ua=r.n($a),za=r(7950),Ga=r.n(za),Wa=r(2788),Ka=r.n(Wa),Qa=r(7183),Ya=r.n(Qa),Xa=r(3344),Za=r.n(Xa),Ja=r(3297),ts=r.n(Ja),es=r(2913),rs=r.n(es),is=r(4748),as=r.n(is),ss=r(2588),ns=r.n(ss),os=r(2049),ls=r.n(os),cs=r(4065),hs=r.n(cs),us=r(9671),ds=r.n(us),gs=r(1071),ms=r.n(gs),ps=r(5187),fs=r.n(ps),_s=r(7823),bs=r.n(_s),vs=r(2405),ys=r.n(vs),Ss=r(8832),xs=r.n(Ss),ws=r(5317),Cs=r.n(ws),Ts=r(6669),ks=r.n(Ts),js=r(7764),Ns=r.n(js),Es=r(542),As=r.n(Es),Is=r(3119),Ds=r.n(Is),Os=r(6552),Ps=r.n(Os),Ls=r(5092),Ms=r.n(Ls),Rs=r(794),Bs=r.n(Rs),Fs=r(2092),Vs=r.n(Fs),Hs=r(3669),qs=r.n(Hs),$s=r(3747),Us=r.n($s),zs=r(6244),Gs=r.n(zs),Ws=r(1345),Ks=r.n(Ws),Qs=r(1593),Ys=r.n(Qs),Xs=r(2532),Zs=r.n(Xs),Js=r(5038),tn=r.n(Js),en=r(1655),rn=r.n(en),an=r(9891),sn=r.n(an),nn=r(8451),on=r.n(nn),ln=r(6378),cn=r.n(ln),hn=r(963),un=r.n(hn),dn=r(3893),gn=r.n(dn),mn=r(9423),pn=r.n(mn),fn=r(416),_n=r.n(fn),bn=r(3273),vn=r.n(bn),yn=r(8414),Sn=r.n(yn),xn=r(1949),wn=r.n(xn),Cn=r(1722),Tn=r.n(Cn),kn=r(135),jn=r.n(kn),Nn=r(3544),En=r.n(Nn),An=r(6577),In=r.n(An),Dn=r(5126),On=r.n(Dn),Pn=r(3235),Ln=r.n(Pn),Mn=r(5692),Rn=r.n(Mn),Bn=r(3576),Fn=r.n(Bn),Vn=r(6706),Hn=r.n(Vn),qn=r(7365),$n=r.n(qn),Un=r(4311),zn=r.n(Un),Gn=r(3385),Wn=r.n(Gn),Kn=r(7425),Qn=r.n(Kn),Yn=r(1134),Xn=r.n(Yn),Zn=r(2308),Jn=r.n(Zn),to=r(5477),eo=r.n(to),ro=r(3095);const io=t=>e=>{let{className:i,"tooltip-title":a,...s}=e;i=`ic-icon ${i||""}`;const n=t.viewBox?.split(" ").slice(2)||[];return(0,ro.jsxs)("span",{className:i,"tooltip-title":a,...s,children:[(0,ro.jsx)("svg",{width:n[0],height:n[1],children:(0,ro.jsx)("use",{xlinkHref:r.p+t.url})}),a&&(0,ro.jsxs)(ro.Fragment,{children:[(0,ro.jsx)("br",{}),(0,ro.jsx)("span",{className:"ic-subtitle",children:a})]})]})},ao=(io(Zt()),io(un())),so=io(gn()),no=io(te()),oo=io(re()),lo=io(yt()),co=io(de()),ho=(io(a()),io(n()),io(l()),io(h()),io(d()),io(m()),io(f()),io(y()),io(b()),io(x()),io(C()),io(k()),io(N()),io(D()),io(V())),uo=io(B()),go=io(q()),mo=io(U()),po=io(G()),fo=io(K()),_o=(io(Y()),io(Z()),io(tt())),bo=io(rt()),vo=io(at()),yo=(io(nt()),io(lt()),io(le())),So=(io(ht()),io(dt())),xo=(io(A()),io(P())),wo=io(M()),Co=(io(mt()),io(he())),To=(io(ft()),io(bt())),ko=io(Vt()),jo=(io(qt()),io(qt())),No=io(Ut()),Eo=io(mt()),Ao=io(ae()),Io=io(ne()),Do=(io(ye()),io(Zs())),Oo=(io(Gt()),io(Kt()),io(Yt())),Po=io(xe()),Lo=io(Ce()),Mo=io(ke()),Ro=io(Ne()),Bo=io(tn()),Fo=io(rn()),Vo=io(sn()),Ho=io(on()),qo=io(cn()),$o=io(Ae()),Uo=io(De()),zo=io(Pe()),Go=io(Me()),Wo=io(Be()),Ko=io(Ve()),Qo=io(qe()),Yo=io(Ue()),Xo=io(bi()),Zo=io(Ks()),Jo=io(Ys()),tl=io(Ge()),el=io(Ke()),rl=(io(Fn()),io(Hn()),io($n()),io(zn())),il=io(Wn()),al=(io(Qn()),io(Xn()),io(Jn()),io(eo())),sl=(io(ye()),io(be()),io(me()),io(fe()),io(Ye())),nl={active:io(yt()),commodities:io(Ct()),cryptocurrency:io(xt()),favorite:io(mt()),forex:io(kt()),basket_index:io(Nt()),indices:io(Dt()),stocks:io(Pt()),volidx:io(Bt()),synthetic_index:io(Mt()),indicators:io(le())},ol={light:{normal:io(pn()),active:io(_n())},dark:{normal:io(vn()),active:io(Sn())}},ll={light:{normal:io(wn()),active:io(Tn())},dark:{normal:io(jn()),active:io(En())}},cl={light:{normal:io(In()),active:io(On())},dark:{normal:io(Ln()),active:io(Rn())}},hl={AUD:io(Ze()),CAD:io(tr()),CHF:io(rr()),EUR:io(ar()),GBP:io(nr()),JPY:io(lr()),MXN:io(hr()),NOK:io(dr()),NZD:io(mr()),PLN:io(fr()),SEK:io(br()),USD:io(yr()),XAU:io(xr()),HongKong:io(ai()),Dutch:io(li()),German:io(ri()),French:io(ni()),Spanish:io(hi()),WallStreet:io(di())},ul={USD:io(yr()),GBP:io(nr()),German:io(ri()),French:io(ni()),Russia:io(Cr()),Arabic:io(kr()),Bangladesh:io(Nr()),Cambodia:io(Ar()),Srilanka:io(Dr()),Mongolian:io(Pr()),Kenya:io(Mr()),Thailand:io(Br()),Turkey:io(Vr()),Indonesia:io(qr()),Vietnam:io(Ur()),Italy:io(Gr()),Korean:io(Kr()),Portugal:io(Yr()),Chinese:io(Zr()),ChineseTraditional:io(ti()),Poland:io(fr()),Spanish:io(hi()),Uzbekistan:io(mi())},dl={SPC:hl.USD,AS51:hl.AUD,HSI:hl.HongKong,N225:hl.JPY,AEX:hl.Dutch,FCHI:hl.French,SSMI:hl.CHF,GDAXI:hl.German,frxBROUSD:io(fi()),frxXAUUSD:Xo,frxXPDUSD:Xo,frxXPTUSD:Xo,frxXAGUSD:Xo,R_10:io(yi()),R_25:io(xi()),R_50:io(Ci()),R_75:io(ki()),R_100:io(Ni()),"1HZ10V":io(Ai()),"1HZ25V":io(Di()),"1HZ50V":io(Pi()),"1HZ75V":io(Mi()),"1HZ100V":io(Bi()),"1HZ150V":io(Vi()),"1HZ200V":io(qi()),"1HZ250V":io(Ui()),"1HZ300V":io(Gi()),BOOM300N:io(aa()),BOOM500:io(na()),BOOM600:io(la()),BOOM900:io(ha()),BOOM1000:io(da()),CRASH300N:io(Ki()),CRASH500:io(Yi()),CRASH600:io(Zi()),CRASH900:io(ta()),CRASH1000:io(ra()),RDBEAR:io(ma()),RDBULL:io(fa()),stpRNG:io(ba()),stpRNG2:io(ya()),stpRNG3:io(xa()),stpRNG4:io(Ca()),stpRNG5:io(ka()),JD10:io(Na()),JD25:io(Aa()),JD50:io(Da()),JD75:io(Pa()),JD100:io(Ma()),JD150:io(Ba()),JD200:io(Va()),cryBNBUSD:io(qa()),cryBTCLTC:io(Ua()),cryIOTUSD:io(Ga()),cryNEOUSD:io(Ka()),cryOMGUSD:io(Ya()),cryTRXUSD:io(Za()),cryBTCETH:io(ns()),cryZECUSD:io(as()),cryXMRUSD:io(rs()),cryXLMUSD:io(ts()),cryDSHUSD:io(ls()),cryETHUSD:io(hs()),cryBCHUSD:io(ds()),cryLTCUSD:io(ms()),cryEOSUSD:io(fs()),cryXRPUSD:io(bs()),cryBTCUSD:io(ys()),OTC_AEX:io(Ds()),OTC_FTSE:io(Ns()),OTC_SX5E:io(qs()),OTC_FCHI:io(Vs()),OTC_GDAXI:io(Bs()),OTC_N225:io(Ps()),OTC_SPC:io(xs()),OTC_DJI:io(ks()),OTC_NDX:io(Cs()),OTC_SSMI:io(As()),OTC_HSI:io(Ms()),OTC_AS51:io(Us())},gl=(t,e,r)=>i=>{const{className:a,...s}=i;return(0,ro.jsxs)("span",{className:`${r} ${a}`,...s,children:[(0,ro.jsx)(t,{}),(0,ro.jsx)(e,{})]})};function ml(t,e){const r=hl[t],i=hl[e];dl[`frx${t}${e}`]=gl(r,i,"ic-frx")}io(Gs());const pl=io(At());function fl(t){const e=hl[t];dl[`WLD${t}`]=gl(pl,e,"ic-wld")}fl("AUD"),fl("EUR"),fl("GBP"),fl("USD"),fl("XAU"),ml("AUD","JPY"),ml("AUD","USD"),ml("EUR","AUD"),ml("EUR","CHF"),ml("EUR","JPY"),ml("EUR","CAD"),ml("EUR","GBP"),ml("EUR","USD"),ml("GBP","AUD"),ml("GBP","JPY"),ml("GBP","USD"),ml("USD","CAD"),ml("USD","CHF"),ml("USD","JPY"),ml("AUD","CAD"),ml("AUD","CHF"),ml("AUD","NZD"),ml("AUD","PLN"),ml("EUR","NZD"),ml("GBP","CAD"),ml("GBP","CHF"),ml("GBP","NOK"),ml("GBP","NZD"),ml("GBP","PLN"),ml("NZD","JPY"),ml("NZD","USD"),ml("USD","MXN"),ml("USD","NOK"),ml("USD","PLN"),ml("USD","SEK")},9585(t,e,r){"use strict";r.d(e,{FZ:()=>wt,GA:()=>bt,Gi:()=>vt,Jb:()=>At,KP:()=>lt,Ne:()=>jt,Tz:()=>Ot,Xu:()=>kt,Y8:()=>St,YF:()=>xt,Zp:()=>Et,aU:()=>Dt,a_:()=>ht,cZ:()=>It,fT:()=>mt,gE:()=>pt,gt:()=>Tt,hy:()=>ot,jT:()=>Nt,kn:()=>Ct,nF:()=>ft,nl:()=>_t,o2:()=>gt,p3:()=>ut,qy:()=>ct,tS:()=>yt,vn:()=>dt});r(809),r(7951);var i=r(6583),a=r.n(i),s=r(7037),n=r.n(s),o=r(4575),l=r.n(o),c=r(3800),h=r.n(c),u=r(1908),d=r.n(u),g=r(9149),m=r.n(g),p=r(1077),f=r.n(p),_=r(155),b=r.n(_),v=r(9424),y=r.n(v),S=r(9442),x=r.n(S),w=r(9080),C=r.n(w),T=r(3417),k=r.n(T),j=r(7709),N=r.n(j),E=r(6661),A=r.n(E),I=r(1904),D=r.n(I),O=r(1108),P=r.n(O),L=r(1270),M=r.n(L),R=r(2421),B=r.n(R),F=r(5976),V=r.n(F),H=r(3982),q=r.n(H),$=r(1820),U=r.n($),z=r(6537),G=r.n(z),W=r(5459),K=r.n(W),Q=r(5),Y=r.n(Q),X=r(3821),Z=r.n(X),J=r(8246),tt=r.n(J),et=r(3163),rt=r.n(et),it=r(9877),at=r.n(it),st=r(3095);const nt=t=>e=>{let{className:i,"tooltip-title":a,...s}=e;i=`ic-icon ${i||""}`;const n=t.viewBox?.split(" ").slice(2)||[];return(0,st.jsxs)("span",{className:i,"tooltip-title":a,...s,children:[(0,st.jsx)("svg",{width:n[0],height:n[1],children:(0,st.jsx)("use",{xlinkHref:r.p+t.url})}),a&&(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)("br",{}),(0,st.jsx)("span",{className:"ic-subtitle",children:a})]})]})},ot=nt(a()),lt=nt(n()),ct=nt(l()),ht=nt(h()),ut=nt(d()),dt=nt(m()),gt=nt(f()),mt=nt(b()),pt=(nt(y()),nt(x())),ft=nt(C()),_t=nt(k()),bt=nt(N()),vt=nt(A()),yt=nt(D()),St=nt(P()),xt=nt(M()),wt=nt(B()),Ct=nt(V()),Tt=nt(q()),kt=nt(U()),jt=nt(G()),Nt=nt(K()),Et=nt(Y()),At=nt(Z()),It=nt(tt()),Dt=nt(rt()),Ot=nt(at())},1695(t,e,r){"use strict";r.d(e,{A:()=>c,F:()=>l});r(809);var i=r(7073),a=r.n(i),s=r(9751),n=r(8362),o=r(3095);const l=({children:t,className:e,enabled:r=!0,...i})=>(0,o.jsxs)("div",{className:a()("sc-inline-loader",e,{"sc-inline-loader--enable":r}),...i,children:[t,r&&(0,o.jsxs)("div",{className:"sc-inline-loader__inner",children:[(0,o.jsx)("span",{className:"sc-inline-loader__inner__bullet"}),(0,o.jsx)("span",{className:"sc-inline-loader__inner__bullet"}),(0,o.jsx)("span",{className:"sc-inline-loader__inner__bullet"}),(0,o.jsx)("span",{className:"sc-inline-loader__inner__bullet"})]})]}),c=(0,s.observer)(()=>{const{loader:t}=(0,n.gy)(),{isActive:e,currentState:r}=t;return(0,o.jsxs)("div",{className:a()("sc-loader",{show:e}),children:[(0,o.jsx)("div",{className:"sc-loader-spin"}),(0,o.jsx)("div",{className:"sc-loader-status",children:r})]})})},481(t,e,r){"use strict";r.d(e,{A:()=>S});var i=r(809),a=r.n(i),s=r(4511),n=r.n(s),o=r(9751),l=r(255),c=r(7073),h=r.n(c),u=r(8362),d=(r(1238),r(3095));const g=(0,o.observer)(({className:t,menu_element:e,portalNodeId:r,open:i,onClick:a})=>{const{chartSetting:s}=(0,u.gy)(),{theme:o}=s;if(document.body.style.overflow=i?"hidden":"",!r)return e;const l=document.getElementById(r);return l?n().createPortal((0,d.jsx)("div",{className:"smartcharts-portal "+(i?"smartcharts-portal--open":""),children:(0,d.jsx)("div",{className:`smartcharts smartcharts-${o}`,children:(0,d.jsx)("div",{className:"smartcharts-mobile",children:(0,d.jsx)("div",{className:`cq-modal-dropdown ${t||""} ${i?"stxMenuActive":""}`,children:(0,d.jsx)("div",{className:"cq-modal__overlay",onClick:a,children:e})})})})}),l):null});var m=r(7149),p=r(1186);r(4007);const f=(0,i.forwardRef)(({store:t,children:e,className:r="",title:a,customHead:s,enableTabular:n=!1,handleOverlayClick:o,handleCloseDialog:l},c)=>{const{updateCloseCallback:u,onContainerClick:g,updateOutsideClickCallback:m}=t;return(0,i.useEffect)(()=>{u(l),m(o)}),(0,d.jsxs)("div",{ref:c,className:h()("sc-dialog",r,{"sc-dialog--tabular":n}),onClick:g,children:[a&&(0,d.jsxs)("div",{className:"sc-dialog__head",children:[(0,d.jsx)("div",{className:"sc-dialog__head--title",children:a}),s&&(0,d.jsx)("div",{className:"sc-dialog__head--custom",children:s}),(0,d.jsx)("div",{className:"sc-dialog__head--action",children:(0,d.jsx)(p.US,{onClick:l})})]}),(0,d.jsx)("div",{className:"sc-dialog__body",children:e})]})});f.displayName="Dialog";const _=(0,o.observer)(f),b=({store:t,className:e,children:r,title:i,tooltip:s,portalNodeId:o,enabled:l=!0,onMouseEnter:c,onMouseLeave:f,enableTabular:b,customHead:y,emptyMenu:S,handleOverlayClick:x,modalMode:w})=>{const{open:C,dialogStatus:T,onTitleClick:k,handleCloseDialog:j,dialogStore:N}=t,{chartSetting:E,chart:A}=(0,u.gy)(),{theme:I}=E,{shouldRenderDialogs:D,isMobile:O,context:P}=A,L=t=>{"cq-modal__overlay"===t.target.className&&j()};if(!P)return null;const M=a().Children.map(r,(t,e)=>0===e?t:null),R=a().Children.map(r,(t,e)=>0!==e?t:null);if(w){const t=document.getElementById(o||"smartcharts_modal");if(!t)return null;const r=n().createPortal((0,d.jsx)("div",{className:`smartcharts-${I}`,children:(0,d.jsx)("div",{className:h()({"smartcharts-mobile":O,"smartcharts-desktop":!O}),children:(0,d.jsx)("div",{className:h()("cq-modal-dropdown",e,{stxMenuActive:C}),children:(0,d.jsx)("div",{className:"cq-modal__overlay",onClick:L,children:(0,d.jsx)(v,{dialogStatus:T,dialogStore:N,title:i,handleCloseDialog:j,enableTabular:b,customHead:y,handleOverlayClick:x,children:R})})})})}),t);return S?C?r:null:(0,d.jsxs)(m.A,{className:h()("ciq-menu",e||"",{stxMenuActive:l&&C,"ciq-enabled":l,"ciq-disabled":!l}),content:s,enabled:!!s,position:"right",children:[(0,d.jsx)("div",{className:"cq-menu-btn",onMouseEnter:c,onMouseLeave:f,onClick:l?k:()=>null,children:M}),l&&C&&r]})}const B=D?(0,d.jsxs)(_,{className:h()("cq-menu-dropdown",{"cq-menu-dropdown-enter-done":T}),store:N,children:[i&&(0,d.jsxs)("div",{className:"title",children:[(0,d.jsx)("div",{className:"title-text",children:i}),(0,d.jsx)(p.US,{className:"icon-close-menu",onClick:k})]}),R]}):null;return l&&(0,d.jsxs)("div",{className:h()("ciq-menu ciq-enabled",e,{stxMenuActive:C}),children:[(0,d.jsx)("div",{className:"cq-menu-btn",onMouseEnter:c,onMouseLeave:f,onClick:k,children:M}),O&&o&&(0,d.jsx)(g,{className:e,open:C,menu_element:B,portalNodeId:o,onClick:L})||B]})||(0,d.jsx)("div",{className:h()("ciq-menu ciq-disabled",e),children:(0,d.jsx)("div",{className:"cq-menu-btn",onMouseEnter:c,onMouseLeave:f,children:M})})},v=({dialogStatus:t,dialogStore:e,title:r,handleCloseDialog:i,enableTabular:s,customHead:n,handleOverlayClick:o,children:c})=>{const h=a().useRef(null);return(0,d.jsx)(l.CSSTransition,{appear:!0,in:t,timeout:300,classNames:"sc-dialog",unmountOnExit:!0,nodeRef:h,children:(0,d.jsx)(_,{ref:h,store:e,title:r,handleCloseDialog:i,enableTabular:s,customHead:n,handleOverlayClick:o,children:c})})},y=({children:t})=>(0,d.jsx)(d.Fragment,{children:t});b.Title=y,b.Body=y;const S=(0,o.observer)(b)},6213(t,e,r){"use strict";r.r(e),r.d(e,{default:()=>d});var i=r(7073),a=r.n(i),s=r(9751),n=r(8362),o=r(1186),l=r(1695),c=(r(79),r(481)),h=r(3095),u=r(9160).t;const d=(0,s.observer)(({portalNodeId:t})=>{const{share:e}=(0,n.gy)(),{menuStore:r,downloadCSV:i,downloadPNG:s,isLoadingPNG:d}=e,{open:g}=r.dialogStore;return(0,h.jsxs)(c.A,{store:r,className:"sc-download-menu",title:u.translate("Download"),tooltip:u.translate("Download"),modalMode:!0,isFullscreen:!0,portalNodeId:t,children:[(0,h.jsx)(c.A.Title,{children:(0,h.jsx)("div",{className:a()("sc-download__menu",{"sc-download__menu--active":g}),children:(0,h.jsx)(o.s3,{})})}),(0,h.jsx)(c.A.Body,{children:(0,h.jsxs)("div",{className:"sc-download",children:[(0,h.jsx)("p",{className:"sc-download__description",children:u.translate("Download your current chart view as a PNG or export the historical data for analysis as a CSV.")}),(0,h.jsxs)(l.F,{className:"sc-download__item",onClick:s,enabled:d,children:[(0,h.jsx)(o.x4,{}),(0,h.jsxs)("span",{className:"sc-download__item__label",children:[" ",u.translate("PNG")," "]})]}),(0,h.jsxs)("div",{className:"sc-download__item",onClick:i,children:[(0,h.jsx)(o.sS,{}),(0,h.jsxs)("span",{className:"sc-download__item__label",children:[" ",u.translate("CSV")]})]})]})})]})})},7149(t,e,r){"use strict";r.d(e,{A:()=>n});r(809);var i=r(7073),a=r.n(i),s=r(3095);const n=({children:t,className:e="",enabled:r=!1,content:i,position:n="top",...o})=>(0,s.jsxs)("div",{className:a()("sc-tooltip",e,{[`sc-tooltip--${n}`]:!!n,"sc-tooltip--enable":r}),...o,children:[t,(0,s.jsx)("div",{className:"sc-tooltip__inner",children:i})]})},7394(t,e,r){"use strict";function i(t){const e=document.createElement("div");return e.innerHTML=t,e.firstChild}function a(){let t=()=>Math.floor(65536*(1+Math.random())).toString(16).substring(1);return"__"+t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()+"__"}function s(t){const e=t.replace("#","0xff");return parseInt(e,16)}function n(t){return t&&"string"==typeof t?t.charAt(0).toUpperCase()+t.slice(1):""}function o(t){return`#${("000000"+(16777215&t).toString(16).toUpperCase()).slice(-6)}`}r.d(e,{Fh:()=>o,LP:()=>a,ZH:()=>n,n:()=>i,od:()=>s})},9758(){var t;HTMLCanvasElement.prototype.getContext=(t=HTMLCanvasElement.prototype.getContext,function(e,r){return(r=r||{}).preserveDrawingBuffer=!0,t.call(this,e,r)})},4916(t,e,r){"use strict";r.d(e,{A:()=>c});var i=r(12),a=r.n(i),s=r(8046),n=r(1993);function o(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class l{static get EVENT_FAVORITES_UPDATE(){return"EVENT_FAVORITES_UPDATE"}static getInstance(){return l.instance||(l.instance=new l),l.instance}constructor(){o(this,"favoritesMap",function(){const t=(0,n.s0)("cq-favorites");if(!t)return;const e={};for(const r in t){const i={};for(const e of t[r])i[e]=!0;e[r]=i}return e}()||{indicators:{},"chartTitle&Comparison":{}}),o(this,"_emitter",void 0),(0,s.makeObservable)(this,{favoritesMap:s.observable,isFavorite:s.action.bound,toggleFavorite:s.action.bound}),this._emitter=new(a())({emitDelay:0})}onFavoriteUpdate(t){this._emitter.on(l.EVENT_FAVORITES_UPDATE,t)}offFavoriteUpdate(t){this._emitter.off(l.EVENT_FAVORITES_UPDATE,t)}isFavorite(t,e){return e in this.favoritesMap[t]}toggleFavorite(t,e){const r=this.favoritesMap[t];r[e]?delete r[e]:r[e]=!0,this._emitter.emit(l.EVENT_FAVORITES_UPDATE,{category:t,id:e,value:r[e]||!1}),this.saveFavorites()}saveFavorites(){const t={};for(const e in this.favoritesMap){const r=[];for(const t in this.favoritesMap[e])r.push(t);t[e]=r}(0,n.lk)("cq-favorites",t)}}o(l,"instance",void 0);const c=l},8362(t,e,r){"use strict";r.d(e,{SD:()=>Ie,cA:()=>Ae,gy:()=>De});var i=r(809),a=r.n(i),s=r(8046);function n(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class o{get context(){return this.mainStore.chart.context}get state(){return this.mainStore.state}constructor(t){n(this,"mainStore",void 0),n(this,"bottom",30),n(this,"isReadyToShow",!1),n(this,"mainChartHeight",0),n(this,"totalHeight",0),n(this,"initial",()=>{this.isReadyToShow=!0}),n(this,"updateChartHeight",async()=>{setTimeout(()=>{if(!this.mainStore.chart.chartContainerHeight)return;const t=this.mainStore.chartAdapter,{bottomQuote:e}=t.quoteBounds,r=t.getYFromQuote(e),i=this.mainStore.chart.chartContainerHeight-r;this.bottom=this.mainStore.chartAdapter.isFeedLoaded&&i>80?i:30},300)}),(0,s.makeObservable)(this,{bottom:s.observable,isReadyToShow:s.observable,mainChartHeight:s.observable,totalHeight:s.observable,updateChartHeight:s.action.bound}),this.mainStore=t,(0,s.when)(()=>!!this.context,this.initial)}}var l=r(1045),c=r(1993),h=r(3457),u=r(6039),d=r(1109);function g(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}let m;class p{constructor(t){g(this,"mainStore",void 0),g(this,"open",!1),g(this,"onClose",()=>this.setOpen(!1)),g(this,"outsideClickCallback",()=>this.setOpen(!1)),g(this,"setOpen",(0,d.s)(t=>{this.openDialog(t)},10,{leading:!0,trailing:!1})),g(this,"handleClickOutside",t=>{let e=!1;"which"in t?e=3===t.which:"button"in t&&(e=2===t.button),t.isHandledByDialog||e||this.outsideClickCallback()}),g(this,"closeOnEscape",t=>{27===t.keyCode&&this.onClose()}),(0,s.makeObservable)(this,{open:s.observable,openDialog:s.action.bound,register:s.action.bound,unregister:s.action.bound,onContainerClick:s.action.bound,updateCloseCallback:s.action.bound,updateOutsideClickCallback:s.action.bound,outsideClickCallback:s.observable}),this.mainStore=t,(0,s.when)(()=>!!this.context,()=>{this.routingStore.registerDialog(this)})}get context(){return this.mainStore.chart.context}get routingStore(){return this.mainStore.routing}openDialog(t){this.open!==t&&(this.open=t,this.open?setTimeout(this.register,100):this.unregister(),!0===t?(m&&m.openDialog(!1),m=this):m=void 0)}updateOutsideClickCallback(t){void 0!==t&&(this.outsideClickCallback=t)}register(){document.addEventListener("click",this.handleClickOutside,!1),document.addEventListener("keydown",this.closeOnEscape,!1)}unregister(){document.removeEventListener("click",this.handleClickOutside),document.removeEventListener("keydown",this.closeOnEscape)}onContainerClick(t){t.nativeEvent.isHandledByDialog=!0}updateCloseCallback(t){void 0!==t&&(this.onClose=t)}}function f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class _{constructor(t,e){f(this,"dialogStore",void 0),f(this,"mainStore",void 0),f(this,"dialogStatus",!1),f(this,"route",""),(0,s.makeObservable)(this,{dialogStatus:s.observable,route:s.observable,open:s.computed,setOpen:s.action.bound,onTitleClick:s.action.bound,handleDialogStatus:s.action.bound,handleCloseDialog:s.action.bound}),this.mainStore=t,this.dialogStore=new p(t),(0,s.reaction)(()=>this.open,()=>this.blurInput()),e&&e.route&&(this.route=e.route)}get context(){return this.mainStore.chart.context}get routingStore(){return this.mainStore.routing}get open(){return this.dialogStore.open}setOpen(t){this.dialogStore.setOpen(t),this.routingStore.updateRoute(this.route,t)}blurInput(){setTimeout(this.handleDialogStatus,300)}onTitleClick(t){t&&t.stopPropagation(),this.setOpen(!this.open)}handleDialogStatus(){"indicators"===this.route&&this.open&&this.mainStore.state.stateChange(l.c4.INDICATORS_MODAL_OPEN,{is_open:this.open}),"draw-tool"===this.route&&this.open&&this.mainStore.state.stateChange(l.c4.DRAWING_TOOLS_MODAL_OPEN,{is_open:this.open}),"chart-title"===this.route&&this.open&&this.mainStore.state.stateChange(l.c4.MARKET_MENU_MODAL_TOGGLE,{is_open:this.open}),"chart-mode"===this.route&&this.open&&this.mainStore.state.stateChange(l.c4.CHART_MODE_MODAL_OPEN,{is_open:this.open}),this.dialogStatus=this.open}handleCloseDialog(){this.dialogStatus=!1,setTimeout(()=>this.setOpen(!1),300)}}function b(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class v{constructor({mainStore:t}){b(this,"dialogPortalNodeId",void 0),b(this,"mainStore",void 0),b(this,"menuStore",void 0),b(this,"scrollPanel",void 0),b(this,"cancelCallback",void 0),(0,s.makeObservable)(this,{dialogPortalNodeId:s.observable,open:s.computed,cancelCallback:s.observable,setOpen:s.action.bound,setCancel:s.action.bound,handleCancel:s.action.bound,handleContinue:s.action.bound}),this.mainStore=t,this.menuStore=new _(t,{route:"indicator-setting"})}get open(){return this.menuStore.open}setOpen(t){return t&&this.scrollPanel&&(this.scrollPanel.scrollTop=0),this.menuStore.setOpen(t)}handleCancel(){this.cancelCallback&&this.cancelCallback(),this.setOpen(!1),this.cancelCallback=null}setCancel(t){this.cancelCallback=t}handleContinue(){this.mainStore.timeperiod.setGranularity(0),this.mainStore.studies.deletePredictionStudies(),this.mainStore.studies.cleanupPredictionIndicator(),setTimeout(()=>{this.setOpen(!1)},100)}}function y(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const S={tick:"T",minute:"M",hour:"H",day:"D"},x={minute:60,hour:3600,day:86400};class w{constructor(t){y(this,"_serverTime",void 0),y(this,"mainStore",void 0),y(this,"portalNodeIdChanged",void 0),y(this,"predictionIndicator",void 0),y(this,"onGranularityChange",()=>null),y(this,"remain",null),y(this,"onDataInitialized",()=>{this.updateCountdown(),(0,s.reaction)(()=>[this.timeUnit,this.mainStore.chartSetting.countdown,this.mainStore.chartType.type,this.loader.currentState,this.isSymbolOpen],this.updateCountdown.bind(this)),(0,s.reaction)(()=>this.mainStore.state.granularity,t=>this.onGranularityChange(t))}),y(this,"countdownInterval",void 0),y(this,"remainLabelY",()=>{const t=this.mainStore.chart.currentClose;if(!t)return;return this.mainStore.chartAdapter.getYFromQuote(t)}),(0,s.makeObservable)(this,{changeGranularity:s.action.bound,portalNodeIdChanged:s.observable,setGranularity:s.action.bound,updateProps:s.action.bound,updatePortalNode:s.action.bound}),this.mainStore=t,this.predictionIndicator=new v({mainStore:t}),this._serverTime=u.A.getInstance(),(0,s.when)(()=>this.mainStore.chartAdapter.isFeedLoaded,this.onDataInitialized)}get loader(){return this.mainStore.loader}get isTick(){return"tick"===this.timeUnit}get isSymbolOpen(){return this.mainStore.chartTitle.isSymbolOpen}get timeUnit(){return(0,c.Ul)(this.mainStore.chart.granularity)}get display(){return void 0===this.mainStore.chart.granularity?"":`${0===this.mainStore.chart.granularity?1:this.mainStore.chart.granularity/x[this.timeUnit]} ${S[this.timeUnit]}`}clearCountdown(){this.countdownInterval&&clearInterval(this.countdownInterval),this.countdownInterval=void 0}updateCountdown(){this.remain=null,this.clearCountdown();const t=()=>{if(this.isTick||!this.isSymbolOpen)return void this.clearCountdown();const t=this.mainStore.chart?.feed?.quotes;if(t&&t.length){const e=[...t].filter(t=>t&&t.Close);if(e&&e.length){const t=e[e.length-1];if(t.DT){const e=this._serverTime?.getLocalDate()?.getTime(),r=e-t.DT.getTime(),i=1e3*(this.mainStore.chart.granularity||1),a=r>i?Math.floor(r/i)+1:1;this.remain=(0,c.pl)(a*i-r),this.mainStore.chartAdapter.flutterChart?.config.setRemainingTime(this.remain||"")}}}};this.mainStore.chartSetting.countdown&&!this.isTick&&(this.countdownInterval||(this.countdownInterval=setInterval(t,1e3),t()))}setGranularity(t){(0,h.$s)(h.dq.ChartControl,h.Cw.Interval,t?.toString()),this.onGranularityChange?this.onGranularityChange(t):this.mainStore.chart.changeSymbol(void 0,t)}updateProps(t){void 0!==this.mainStore.state.granularity&&(this.onGranularityChange=t)}changeGranularity(t){if(t){const e=l.wx.find(t=>t.id===this.mainStore.chartType.type.id)?.text??"";this.mainStore.state.stateChange(l.c4.CHART_INTERVAL_CHANGE,{time_interval_name:(0,c.mI)(t,l.NI),chart_type_name:"colored_bar"===this.mainStore.chartType.type.id?e:e.toLowerCase()})}0===t&&this.mainStore.studies.hasPredictionIndicator?(this.predictionIndicator.dialogPortalNodeId=this.portalNodeIdChanged,this.predictionIndicator.setOpen(!0)):this.onGranularityChange(t)}updatePortalNode(t){this.portalNodeIdChanged=t}}var C=r(7423),T=r.n(C),k=r(7231),j=r.n(k);T().extend(j());const N=T();function E(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class A{static get DEFAULT_COUNT(){return 1e3}constructor(t,e,r){E(this,"unsubscribeQuotes",void 0),E(this,"_getQuotes",void 0),E(this,"_subscribeQuotes",void 0),E(this,"streamRequests",{}),this.unsubscribeQuotes=t,this._getQuotes=e,this._subscribeQuotes=r}async getQuotes(t){if(this._getQuotes){const e=await this._getQuotes({symbol:t.symbol,granularity:t.granularity,count:"string"==typeof t.count?parseInt(t.count,10):t.count||A.DEFAULT_COUNT,start:"string"==typeof t.start?parseInt(t.start,10):t.start,end:"string"==typeof t.end?parseInt(t.end,10):t.end});if(t.granularity)return{candles:e.candles};if(e.history&&e.history.times&&e.history.prices){return{history:{times:e.history.times,prices:e.history.prices}}}throw new Error("Invalid tick history response format")}throw new Error("No getQuotes function provided")}subscribeQuotes(t,e){const r=this._getKey(t),i=A.createGetQuotesRequest({...t,subscribe:1});this.streamRequests[r]={request:i,callback:e},this._subscribeQuotes({symbol:t.symbol,granularity:t.granularity},e)}forget(t){const e=this._getKey(t);if(!this.streamRequests[e])return;const{request:r,callback:i}=this.streamRequests[e];return delete this.streamRequests[e],this.unsubscribeQuotes(r,i)}static createGetQuotesRequest({symbol:t,granularity:e,start:r,end:i,subscribe:a,adjust_start_time:s=1,count:n}){const o={symbol:t,style:e?"candles":"ticks",start:r,end:i,count:n||A.DEFAULT_COUNT};return e&&(o.granularity=+e),s&&(o.adjust_start_time=s),a&&(o.subscribe=1),r&&(delete o.count,o.start=r),i&&(o.end=i),o}_getKey({symbol:t,granularity:e}){return`${t}-${e}`}}var I=r(12),D=r.n(I),O=r(5877);function P(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class L{static get EVENT_MARKET_OPEN_CLOSE_CHANGE(){return"EVENT_MARKET_OPEN_CLOSE_CHANGE"}static get FEED_UNAVAILABLE(){return"chartonly"}constructor(t,e){P(this,"_api",void 0),P(this,"_emitter",void 0),P(this,"_params",void 0),P(this,"_serverTime",void 0),P(this,"_shouldFetchTradingTimes",void 0),P(this,"_tradingTimesMap",void 0),P(this,"_updateTimer",void 0),P(this,"lastUpdateDate",void 0),P(this,"isInitialized",!1),P(this,"tradingTimesPromise",(0,O.A)()),P(this,"timeUpdateCallback",void 0),this._params=e||{},this._shouldFetchTradingTimes=!1!==e?.shouldFetchTradingTimes,this._api=t,this._serverTime=u.A.getInstance(),this._emitter=new(D())({emitDelay:0})}destructor(){this._updateTimer&&clearTimeout(this._updateTimer)}async initialize(){if(await this._serverTime.init(this._api,()=>{"function"==typeof this.timeUpdateCallback&&this.timeUpdateCallback()}),this.isInitialized)return this.tradingTimesPromise;if(this.isInitialized=!0,this.lastUpdateDate=this._serverTime.getLocalDate().toISOString().substring(0,10),!this._tradingTimesMap&&this._shouldFetchTradingTimes){await this._updateTradeTimes(),this.tradingTimesPromise.resolve();const t=async()=>{const e=this._updateMarketOpenClosed();Object.keys(e).length>0&&this._emitter.emit(L.EVENT_MARKET_OPEN_CLOSE_CHANGE,e);let r=this._nextUpdateDate();if(!r){const t=this._serverTime.getLocalDate(),e=new Date(`${this.lastUpdateDate}T00:00:00Z`);e.setDate(e.getDate()+1),this.lastUpdateDate=(t>e?t:e).toISOString().substring(0,10);const i={};for(const t in this._tradingTimesMap)i[t]=!!this._tradingTimesMap[t].isOpened;await this._updateTradeTimes();for(const t in this._tradingTimesMap)this._tradingTimesMap[t].isOpened=i[t];r=e}const i=r-this._serverTime.getLocalDate();this._updateTimer=setTimeout(t,i)};await t()}}_updateMarketOpenClosed(){const t={};for(const e in this._tradingTimesMap){const r=this._calcIsMarketOpened(e);this._tradingTimesMap[e].isOpened!==r&&(this._tradingTimesMap[e].isOpened=r,t[e]=r)}return t}async _updateTradeTimes(){this._params.tradingTimes&&this._calculatingTradingTime(this._params.tradingTimes)}_calculatingTradingTime(t){if(!t)return;if(this._tradingTimesMap={},t){for(const e in t){const{isOpen:r,openTime:i,closeTime:a}=t[e];this._tradingTimesMap[e]={feed_license:void 0,isClosedToday:!r,holidays:[],closes_early:[],opens_late:[],delay_amount:0,times:i&&a?[{open:new Date(i),close:new Date(a)}]:void 0,isOpenAllDay:!1,isClosedAllDay:!1,isOpened:r}}return}const e=this._updateMarketOpenClosed();Object.keys(e).length>0&&this._emitter.emit(L.EVENT_MARKET_OPEN_CLOSE_CHANGE,e)}isFeedUnavailable(t){if(this._tradingTimesMap)return t in this._tradingTimesMap?this._tradingTimesMap[t]?.feed_license===L.FEED_UNAVAILABLE:(console.error("Symbol not in _tradingTimesMap:",t," trading map:",this._tradingTimesMap),!1)}getDelayedMinutes(t){return this._tradingTimesMap?.[t].delay_amount}isMarketOpened(t){if(this._tradingTimesMap)return t in this._tradingTimesMap?this._tradingTimesMap[t].isOpened:(console.error("Symbol not in _tradingTimesMap:",t," trading map:",this._tradingTimesMap),!1)}_calcIsMarketOpened(t){const e=this._serverTime.getLocalDate(),r=e.toISOString().substring(0,10);if(!this._tradingTimesMap)return;const{times:i,feed_license:a,isOpenAllDay:s,isClosedAllDay:n,holidays:o,closes_early:l,opens_late:c,isClosedToday:h}=this._tradingTimesMap[t];if(n||a===L.FEED_UNAVAILABLE||h||o.includes(r))return!1;const u=c.find(t=>t.date===r);if(u){const{open:t,close:r}=u;return!!(e>=t&&e<r)}const d=l.find(t=>t.date===r);if(d){const{open:t,close:r}=d;return!!(e>=t&&e<r)}if(s)return!0;if(i)for(const t of i){const{open:r,close:i}=t;if(e>=r&&e<i)return!0}return!1}_nextUpdateDate(){const t=this._serverTime.getLocalDate();let e;for(const r in this._tradingTimesMap){const{times:i,feed_license:a,isOpenAllDay:s,isClosedAllDay:n}=this._tradingTimesMap[r];if(!s&&!n&&a!==L.FEED_UNAVAILABLE&&i)for(const r of i){const{open:i,close:a}=r;i>t&&(!e||i<e)&&(e=i),a>t&&(!e||a<e)&&(e=a)}}return e}onMarketOpenCloseChanged(t){this._emitter.on(L.EVENT_MARKET_OPEN_CLOSE_CHANGE,t)}onTimeChanged(t){this.timeUpdateCallback=t}}const M=L;const R=t=>{const e=[],r=(i=(t,e)=>t.submarket_display_name.localeCompare(e.submarket_display_name),t.map((t,e)=>({item:t,index:e})).sort((t,e)=>{const r=i(t.item,e.item);return 0!==r?r:t.index-e.index}).map(({item:t})=>t));var i;for(const t of r)e.push({symbol:t.symbol,name:t.display_name,market:t.market,market_display_name:t.market_display_name,subgroup:t.subgroup,subgroup_display_name:t.subgroup_display_name,submarket_display_name:t.submarket_display_name,exchange_is_open:!!t.exchange_is_open,decimal_places:t.pip.toString().length-2});return e},B=t=>({enabled:!0,itemId:t.symbol,display:t.name,dataObject:t}),F=t=>({subcategoryName:t.submarket_display_name,data:[]}),V=(t,e)=>{let r=t.find(t=>t.categoryId===e.market);return r||(r=(t=>({categoryName:t.market_display_name,categoryId:t.market,hasSubcategory:!0,hasSubgroup:!(!t.subgroup||"none"===t.subgroup),data:[],subgroups:[]}))(e),t.push(r)),r},H=(t,e,r)=>{let i=r.get(e.submarket_display_name);return i||(i=F(e),r.set(e.submarket_display_name,i),t.data.push(i)),i},q=(t,e)=>{if(!t.hasSubgroup)return;const r=((t,e)=>{let r=t.subgroups?.find(t=>t.categoryId===e.subgroup);return r||(r=(t=>({data:[],categoryName:t.subgroup_display_name,categoryId:t.subgroup,hasSubcategory:!0,hasSubgroup:!1,subgroups:[]}))(e),t.subgroups?.push(r)),r})(t,e),i=((t,e)=>{let r=t.data.find(t=>t.subcategoryName===e.submarket_display_name);return r||(r=F(e),t.data.push(r)),r})(r,e);i.data.push(B(e))},$=t=>{if(!t.length)return[];const e=[],r=new Map;for(const i of t){const t=V(e,i);r.has(i.market)||r.set(i.market,new Map);const a=r.get(i.market),s=H(t,i,a);q(t,i),s.data.push(B(i))}return e};function U(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const z=class{constructor(t,e){U(this,"params",void 0),U(this,"topNode",void 0),this.params=e||{},this.topNode=t}};var G=r(8825);class W{static formatHistory(t){const{history:e,candles:r}=t;if(e){const{times:t=[],prices:r=[]}=e;return r.map((e,r)=>({Date:(0,c.Pu)(+t[r]),Close:+e}))}if(r){return r.map(t=>{const e=t;return{Date:(0,c.Pu)(+e.epoch),Open:+e.open,High:+e.high,Low:+e.low,Close:+e.close}})}}static formatQuote(t){if("tick"in t){const{tick:e}=t,r=e;return{Date:(0,c.Pu)(+r.epoch),Close:+r.quote,tick:e}}if("ohlc"in t){const{ohlc:e}=t;if(e)return{Date:(0,c.Pu)(+e.open_time),Open:+e.open,High:+e.high,Low:+e.low,Close:+e.close,ohlc:e}}}static formatAllQuotes(t){const e=e=>{const r=t?.[e+1],i=t?.[e-1];return i?.tick&&r?.tick?(0,c.Cc)(i?.tick,r?.tick,.5):r?.tick||i?.tick};return t?.map((t,r)=>({Date:(0,c.Pu)(+t.epoch),Close:+(t.tick||e(r))}))}static formatPOCQuote(t){const{tick_stream:e=[],underlying:r=""}=t||{};return e.length&&r?e.map(({epoch:t=0,tick:e,tick_display_value:i})=>({Date:(0,c.Pu)(t),Close:e||0,tick:{epoch:t,quote:e||0,symbol:r,pip_size:i?.split(".")[1]?.length||0}})):null}}function K(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Q{static get EVENT_CHART_DATA(){return"EVENT_CHART_DATA"}get contractInfo(){return this._mainStore.state.contractInfo}get shouldGetQuotes(){return this._mainStore.state.shouldGetQuotes||!1}constructor(t,e,r){K(this,"_binaryApi",void 0),K(this,"_emitter",void 0),K(this,"_request",void 0),K(this,"lastStreamEpoch",void 0),K(this,"_mainStore",void 0),this._binaryApi=e,this._request=t,this._emitter=new(D())({emitDelay:0}),this._mainStore=r}async initialFetch(){return await this._startSubscribe(this._request)}pause(){}async resume(){if(this.lastStreamEpoch){const t={...this._request,start:this.lastStreamEpoch};return await this._startSubscribe(t)}}forget(){this.lastStreamEpoch=void 0,this._emitter.off(Q.EVENT_CHART_DATA)}_startSubscribe(t){throw new Error("Please override!")}_processGetQuotesResponse(t){const e=W.formatHistory(t);if(!e){throw new Error(`Unexpected response: ${t}`)}return this.lastStreamEpoch=Q.getLatestEpoch(t),e}onChartData(t){this._emitter.on(Q.EVENT_CHART_DATA,t)}static getLatestEpoch({candles:t,history:e}){if(t)return t[t.length-1].epoch;if(e){const{times:t=[]}=e;return t[t.length-1]}}static getEpochFromTick(t){return"tick"in t&&t.tick?t.tick.epoch:t.ohlc?.open_time}}const Y=Q;function X(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Z=class extends Y{constructor(t,e,r,i){super(t,e,i),X(this,"_timerId",void 0),X(this,"UPDATE_INTERVAL",3e3),X(this,"onUpdateDelayedFeed",async()=>{if(this.lastStreamEpoch){const t={...this._request,start:this.lastStreamEpoch,adjust_start_time:0},e=await this._binaryApi.getQuotes(t),r=this._processGetQuotesResponse(e);this._emitter?.emit(Y.EVENT_CHART_DATA,r)}else console.error("Unable to update delayed feed without epoch from last tick"),this._endTimer()}),this._request={...this._request,start:this._request.start-60*r}}pause(){this._endTimer()}async _startSubscribe(t){const e=await this._binaryApi.getQuotes(t),r=this._processGetQuotesResponse(e);return this._startTimer(),{quotes:r,response:e}}forget(){this._endTimer(),super.forget()}_startTimer(){this._timerId||(this._timerId=setInterval(this.onUpdateDelayedFeed,this.UPDATE_INTERVAL))}_endTimer(){this._timerId&&(clearInterval(this._timerId),this._timerId=void 0)}};function J(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const tt=class extends Y{constructor(...t){super(...t),J(this,"_tickCallback",void 0)}pause(){this._tickCallback=void 0}async resume(){if(this._tickCallback)throw new Error("You cannot resume an active stream!");return super.resume()}async _startSubscribe(t){const e=this.contractInfo,r=await this._binaryApi.getQuotes(t),i=this._processGetQuotesResponse(r),a=t=>{(t.tick||t.ohlc)&&this._onTick(t)};if(!this.shouldGetQuotes&&e.tick_stream)this._binaryApi.subscribeQuotes(Object.assign(t,{count:e.tick_count}),a);else{const r=e.current_spot_time&&e.date_start?e.current_spot_time-e.date_start:0,i=1e3;this._binaryApi.subscribeQuotes(Object.assign(t,{count:r>i?r:i}),a)}return this._tickCallback=a,{quotes:i,response:r}}forget(){if(this._tickCallback){const{symbol:t,granularity:e}=this._request;this._binaryApi.forget({symbol:t,granularity:e}),this._tickCallback=void 0}super.forget()}_onTick(t){const e=t,r=Y.getEpochFromTick(e);void 0!==r&&(this.lastStreamEpoch=+r);const i=[W.formatQuote(e)];this._emitter.emit(Y.EVENT_CHART_DATA,i)}};function et(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class rt{static get EVENT_MASTER_DATA_UPDATE(){return"EVENT_MASTER_DATA_UPDATE"}static get EVENT_MASTER_DATA_REINITIALIZE(){return"EVENT_MASTER_DATA_REASSIGN"}static get EVENT_START_PAGINATION(){return"EVENT_START_PAGINATION"}static get EVENT_ON_PAGINATION(){return"EVENT_ON_PAGINATION"}get startEpoch(){return this._mainStore.state.startEpoch}get endEpoch(){return this._mainStore.state.endEpoch}get granularity(){return this._mainStore.chart.granularity}get allTicks(){return this._mainStore.state.allTicks}get shouldGetQuotes(){return this._mainStore.state.shouldGetQuotes||!1}get contractInfo(){return this._mainStore.state.contractInfo}get loader(){return this._mainStore.loader}get margin(){return this._mainStore.state.margin}get hasAlternativeSource(){return this._mainStore.state.shouldDrawTicksFromContractInfo}get paginationLoader(){return this._mainStore.paginationLoader}constructor(t,e,r){et(this,"_binaryApi",void 0),et(this,"_connectionClosedDate",void 0),et(this,"_emitter",void 0),et(this,"_mainStore",void 0),et(this,"_serverTime",void 0),et(this,"tickQueue",[]),et(this,"_tradingTimes",void 0),et(this,"quotes",[]),et(this,"_activeStreams",{}),et(this,"_isConnectionOpened",!0),et(this,"onRangeChanged",()=>{this._mainStore.state.setChartIsReady(!1),this._mainStore.state.saveLayout(),this._mainStore.state.setChartIsReady(!0)}),this._binaryApi=t,this._mainStore=e,this._serverTime=u.A.getInstance(),this._tradingTimes=r,(0,s.reaction)(()=>e.state.isConnectionOpened,this.onConnectionChanged.bind(this)),this._emitter=new(D())({emitDelay:0})}subscribe(){}unsubscribe({symbol:t,granularity:e}){const r=this._getKey({symbol:t,granularity:e});this._forgetStream(r)}_forgetStream(t){this._activeStreams[t]&&(this._activeStreams[t].forget(),delete this._activeStreams[t])}processQuotes(t){t.forEach(t=>{t.DT=new Date(`${t.Date}Z`)})}updateQuotes(t,e){this.processQuotes(t),e?this.quotes.unshift(...t):this.quotes=t}addQuote(t){this.processQuotes([t]),this.quotes.push(t)}getQuoteForEpoch(t){return this.quotes.find(e=>e.DT?.getTime()==t)}getQuoteIndexForEpoch(t){return this.quotes.findIndex(e=>e.DT?.getTime()==t)}getClosestValidEpoch(t,e){return Math.round(t/e)*e}getClosestQuoteForEpoch(t){const e=this.findEpochIndex(t);if(e<0)return this.quotes[0];if(e>this.quotes.length-1)return this.quotes[this.quotes.length-1];const r=this.quotes[Math.floor(e)],i=this.quotes[Math.ceil(e)];return t-r.DT.getTime()<=i.DT.getTime()-t?r:i}getClosestQuoteIndexForEpoch(t){const e=this.findEpochIndex(t);if(e<0)return this.quotes[0];if(e>this.quotes.length-1)return this.quotes[this.quotes.length-1];const r=this.quotes[Math.floor(e)],i=this.quotes[Math.ceil(e)];return t-r.DT.getTime()<=i.DT.getTime()-t?Math.floor(e):Math.ceil(e)}findEpochIndex(t){let e=-1,r=this.quotes.length;for(;r-e>1;){const i=Math.trunc((e+r)/2),a=this.quotes[i].DT?.getTime();if(!a)return i;if(t<a)r=i;else{if(!(t>a))return i;e=i}}return e>=0&&t==this.quotes[e].DT?.getTime()?e:r<this.quotes.length&&t==this.quotes[r].DT?.getTime()?r:(e+r)/2}getQuotesInterval(){if(this.quotes.length<=1)return 1;const t=this.quotes.reduce((t,e,r,i)=>{const a=e.DT?.getTime(),s=i[r-1]?.DT?.getTime();if(s&&a){return t+(a-s)/1e3}return t},0);return Math.round(t/(this.quotes.length-1))}async fetchInitialData(t,e,r){this.tickQueue=[],this.setHasReachedEndOfData(!1),this.paginationLoader.updateOnPagination(!0);const{granularity:i=0,symbolObject:a}=e,s=this._getKey({symbol:t,granularity:i}),n=this.margin&&this.startEpoch?this.startEpoch-this.margin:this.startEpoch,o=this.margin&&this.endEpoch?this.endEpoch+this.margin:this.endEpoch,l=a.name;if(this.loader.setState("chart-data"),this._tradingTimes.isFeedUnavailable(t)){this._mainStore.notifier.notifyFeedUnavailable(l);const t={quotes:[]};return this._mainStore.chart.setChartAvailability(!1),void r(t)}if(this.quotes&&this.quotes.length>0&&!this.shouldGetQuotes){const t=this._trimQuotes(this.quotes);return r({quotes:t}),this._emitDataUpdate(t,!0),void this.paginationLoader.updateOnPagination(!1)}const h={symbol:t,granularity:i,start:n,count:this.endEpoch?void 0:this._mainStore.lastDigitStats.count},u=this.contractInfo.validation_error_code;let d,g=!1;if(o)h.end=String(o),g=!0;else if("MarketIsClosed"!==u&&"MarketIsClosedTryVolatility"!==u){let e;const a=this._tradingTimes.getDelayedMinutes(t);a>0?(this._mainStore.notifier.notifyDelayedMarket(l,a),e=new Z(h,this._binaryApi,a,this._mainStore)):e=new tt(h,this._binaryApi,this._mainStore);try{const{quotes:t,response:r}=await e.initialFetch();d=t,this.endEpoch||this._mainStore.lastDigitStats.updateLastDigitStats(r)}catch(t){const{message:e}=t;return this._mainStore.notifier.notify({text:e,type:"error",category:"activesymbol"}),r({quotes:[]}),void this.paginationLoader.updateOnPagination(!1)}if(e.onChartData(e=>{t!==this._mainStore.chart.currentActiveSymbol?.symbol||i!==this._mainStore.chart.granularity||this.hasAlternativeSource||this._appendChartData(e,s)}),this._mainStore.chart.isDestroyed||this._mainStore.state.symbol&&this._mainStore.state.symbol!==t||i!==this._mainStore.chart.granularity)return r({quotes:[]}),void e.forget();this._activeStreams[s]=e}else this._mainStore.notifier.notifyMarketClose(l),g=!0;if(g)if(this._mainStore.state.getQuotes){const e=await this._mainStore.state.getQuotes({symbol:t,granularity:i,count:this.endEpoch?1e3:this._mainStore.lastDigitStats.count,start:n,end:o});if(e.candles)d=e.candles.map(t=>({Date:(0,c.Pu)(t.epoch),Open:t.open,High:t.high,Low:t.low,Close:t.close}));else if(e.history){const{times:t=[],prices:r=[]}=e.history;d=r.map((e,r)=>({Date:(0,c.Pu)(t[r]),Close:e}))}else d=[]}else if(this.shouldGetQuotes||!this.contractInfo.tick_stream){const t=await this._binaryApi.getQuotes(h);d=W.formatHistory(t)}else{const t=await new Promise(t=>{setTimeout(()=>t(this.allTicks),50)});d=W.formatAllQuotes(t)}d?(d=this._trimQuotes(d),r({quotes:d}),this._emitDataUpdate(d,!0),this.paginationLoader.updateOnPagination(!1)):r({quotes:[]})}async fetchPaginationData(t,e,r,i,a){this.paginationLoader.updateOnPagination(!0),this._emitter.emit(rt.EVENT_START_PAGINATION,{end:e}),await this._getPaginationData(t,i,r,e,a),this.paginationLoader.updateOnPagination(!1)}async _getPaginationData(t,e,r,i,a){if(this._mainStore.state.hasReachedEndOfData)return;if(this.startEpoch||this.endEpoch&&i>this.endEpoch)return a({moreAvailable:!1,quotes:[]}),this._emitter.emit(rt.EVENT_ON_PAGINATION,{end:i}),void this.setHasReachedEndOfData(!0);const s=this._serverTime.getEpoch()-Math.ceil(2.8*365*24*60*60);let n,o={quotes:[]};if(i>s)try{const l=await this._binaryApi.getQuotes({symbol:t,granularity:e,count:`${r}`,end:String(i)});if(n=rt.getFirstEpoch(l),void 0===n||n===i)return a({moreAvailable:!1,quotes:[]}),void this.setHasReachedEndOfData(!0);if(o.quotes=W.formatHistory(l),n<=s&&(a({moreAvailable:!1,quotes:[]}),this.setHasReachedEndOfData(!0)),o.quotes?.length&&o.quotes.length<r)return a({moreAvailable:!1,quotes:o.quotes}),void this.setHasReachedEndOfData(!0)}catch(t){console.error(t),o={error:t}}a(o);{const t=n&&i>n?n:i;this._emitter.emit(rt.EVENT_ON_PAGINATION,{end:t})}}setHasReachedEndOfData(t){this.paginationLoader.updateOnPagination(!1),this._mainStore.state.hasReachedEndOfData!==t&&(this._mainStore.state.hasReachedEndOfData=t)}unsubscribeAll(){for(const t of Object.keys(this._activeStreams))this._forgetStream(t)}_forgetIfEndEpoch(t){const e=this._activeStreams[t];let r=!0;if(!e)return;const i=e.lastStreamEpoch;return this.endEpoch&&void 0!==i&&void 0!==this.granularity&&i+this.granularity>this.endEpoch?(this._activeStreams[t]&&0===this.granularity&&!this._mainStore.state.isStaticChart&&(0,G.E)((0,c.Pu)(this.endEpoch)).valueOf()>=this.quotes.slice(-1)[0]?.Date.valueOf()&&(r=!1),this._forgetStream(t)):r=!1,r}_appendChartData(t,e,r=!1){if(!this._forgetIfEndEpoch(e)||this._activeStreams[e]){if((!this.hasAlternativeSource||r)&&r){if(!this.tickQueue.length)return void(this.tickQueue=[t[t.length-1]]);if(this.tickQueue[0].tick?.epoch===t[t.length-1].tick?.epoch)return;this.tickQueue=[t[t.length-1]],t=[t[t.length-1]]}this._emitDataUpdate(t)}else t=[]}appendChartDataFromPOCResponse(t){const e=W.formatPOCQuote(t);e&&this._appendChartData(e,e[0].tick.symbol,!0)}_emitDataUpdate(t,e=!1){const r=t[t.length-2],i=void 0!==r?r.Close:void 0,a={...t[t.length-1],prevClose:i};e?(this._emitter.emit(rt.EVENT_MASTER_DATA_REINITIALIZE),this._mainStore.chart.setChartAvailability(!0)):this._emitter.emit(rt.EVENT_MASTER_DATA_UPDATE,a)}static getFirstEpoch(t){if(t.candles&&t.candles.length>0)return t.candles[0].epoch;if(t.history&&t.history.times&&t.history.times.length>0){const{times:e}=t.history;return+e[0]}}onMasterDataUpdate(t){this._emitter.on(rt.EVENT_MASTER_DATA_UPDATE,t)}offMasterDataUpdate(t){this._emitter.off(rt.EVENT_MASTER_DATA_UPDATE,t)}onMasterDataReinitialize(t){this._emitter.on(rt.EVENT_MASTER_DATA_REINITIALIZE,t)}offMasterDataReinitialize(t){this._emitter.off(rt.EVENT_MASTER_DATA_REINITIALIZE,t)}onPagination(t){this._emitter.on(rt.EVENT_ON_PAGINATION,t)}offPagination(t){this._emitter.off(rt.EVENT_ON_PAGINATION,t)}onStartPagination(t){this._emitter.on(rt.EVENT_START_PAGINATION,t)}offStartPagination(t){this._emitter.off(rt.EVENT_START_PAGINATION,t)}onConnectionChanged(){const t=this._mainStore.state.isConnectionOpened;void 0!==t&&t!==this._isConnectionOpened&&(this._isConnectionOpened=t,t?this._onConnectionReopened():this._onConnectionClosed())}_onConnectionClosed(){for(const t in this._activeStreams)this._activeStreams[t].pause();this._connectionClosedDate=new Date}_onConnectionReopened(){0!==Object.keys(this._activeStreams).length&&(this._mainStore.chart.refreshChart(),this._connectionClosedDate=void 0)}_resumeStream(t){this._activeStreams[t].pause(),this._activeStreams[t].resume().then(e=>{const{quotes:r}=e;this._appendChartData(r,t)})}_getKey({symbol:t,granularity:e}){return`${t}-${e}`}_unpackKey(t){const[e,r]=t.split("-");return{symbol:e,granularity:+r}}_trimQuotes(t=[]){let e=null,r=null,i=t;if(!i.length)return[];if(this.startEpoch&&this.margin&&(e=i.findIndex(t=>(0,G.E)(t.Date)>=(0,G.E)((0,c.Pu)(this.startEpoch))),e>0&&(i=i.slice(e-1))),this.endEpoch&&this.margin&&(r=i.findIndex(t=>(0,G.E)(t.Date)>=(0,G.E)((0,c.Pu)(this.endEpoch))),r>-1)){const t=(0,G.E)(i[r].Date)===(0,G.E)((0,c.Pu)(this.endEpoch))?2:1;i=i.slice(0,r+t)}return i}}const it=rt;function at(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class st{constructor(t){at(this,"chartContainerHeight",void 0),at(this,"chartHeight",void 0),at(this,"chartId",void 0),at(this,"containerWidth",null),at(this,"context",null),at(this,"currentActiveSymbol",void 0),at(this,"currentLanguage",void 0),at(this,"cursorInChart",!1),at(this,"startWithDataFitMode",!1),at(this,"feed",void 0),at(this,"isBarrierDragging",!1),at(this,"isChartAvailable",!0),at(this,"isLive",!1),at(this,"isMobile",!1),at(this,"isScaledOneOne",!1),at(this,"mainStore",void 0),at(this,"networkStatus",void 0),at(this,"resizeObserver",void 0),at(this,"serverTime",void 0),at(this,"shouldRenderDialogs",!1),at(this,"leftMargin",void 0),at(this,"lastQuote",void 0),at(this,"_chartRequestId",0),at(this,"loaderTimeout",void 0),at(this,"processedSymbols",void 0),at(this,"symbolMap",{}),at(this,"categorizedSymbols",[]),at(this,"feedCall",{}),at(this,"RANGE_PADDING_PX",125),at(this,"contextPromise",(0,O.A)()),at(this,"rootNode",null),at(this,"api",null),at(this,"defaults",{granularity:0,chartType:"line"}),at(this,"granularity",void 0),at(this,"enableRouting",null),at(this,"chartNode",null),at(this,"chartControlsNode",null),at(this,"state",void 0),at(this,"onMessage",null),at(this,"_barriers",[]),at(this,"tradingTimes",void 0),at(this,"whitespace",void 0),at(this,"isDestroyed",!1),at(this,"currentCloseQuote",()=>{const t=this.mainStore.chart.feed?.quotes;let e=t?.[t.length-1];if(e&&!e.Close){const r=t?.filter(t=>t&&t.Close);if(r&&r.length)e=r[r.length-1];else{const r=t?.filter(t=>t&&t.Close);r&&r.length&&(e=r[r.length-1])}}return e}),at(this,"indicatorHeightRatio",t=>{let e={};if("function"==typeof this.stateStore.getIndicatorHeightRatio&&this.chartNode&&(e=this.stateStore.getIndicatorHeightRatio(this.chartNode.offsetHeight,t)),this.chartNode&&(!e||!e.height||!e.percent)){const r=this.chartNode.offsetHeight,i=r<780,a=t>=5?t:t+1,s=this.isMobile?160:320,n=Math.round((r-(s+(i?20:0)))/a);e={height:n,percent:n/r}}return e}),at(this,"init",(t,e)=>{this.loader.show(),this.mainStore.state.setChartIsReady(!1),this.loader.setState("chart-engine"),this.chartId=e.id||"base-chart",this._initChart(t,e)}),at(this,"setResizeEvent",()=>{const t=t=>{t.forEach(()=>{this.rootNode&&this.rootNode.clientWidth>0&&this.resizeScreen()})};"ResizeObserver"in window?(this.resizeObserver=new ResizeObserver(t),this.rootNode&&this.resizeObserver.observe(this.rootNode)):r.e(590).then(r.bind(r,4208)).then(({default:e})=>{window.ResizeObserver=e,this.rootNode&&(this.resizeObserver=new e(t),this.resizeObserver.observe(this.rootNode))})}),at(this,"onMarketOpenClosedChange",t=>{const e=this.processedSymbols||[];let r=!1;for(const{symbol:i,name:a}of e)i in t&&(t[i]?(r=!0,this.chartClosedOpenThemeChange(!1),this.mainStore.notifier.notifyMarketOpen(a)):(this.chartClosedOpenThemeChange(!0),this.mainStore.notifier.notifyMarketClose(a)));r&&this.refreshChart()}),at(this,"remainLabelY",()=>0),(0,s.makeObservable)(this,{chartContainerHeight:s.observable,chartHeight:s.observable,containerWidth:s.observable,context:s.observable,currentActiveSymbol:s.observable,currentLanguage:s.observable,cursorInChart:s.observable,isBarrierDragging:s.observable,isChartAvailable:s.observable,isMobile:s.observable,isScaledOneOne:s.observable,networkStatus:s.observable,serverTime:s.observable,shouldRenderDialogs:s.observable,xAxisHeight:s.computed,yAxisWidth:s.computed,lastQuote:s.observable,_initChart:s.action.bound,changeSymbol:s.action.bound,destroy:s.action.bound,granularity:s.observable,newChart:s.action.bound,onServerTimeChange:s.action.bound,openFullscreen:s.action.bound,pip:s.computed,refreshChart:s.action.bound,resizeScreen:s.action.bound,setChartAvailability:s.action.bound,updateCurrentActiveSymbol:s.action.bound,updateScaledOneOne:s.action.bound,processedSymbols:s.observable,symbolMap:s.observable,categorizedSymbols:s.observable}),this.mainStore=t}get loader(){return this.mainStore.loader}get routingStore(){return this.mainStore.routing}get stateStore(){return this.mainStore.state}get studiesStore(){return this.mainStore.studies}get pip(){return this.currentActiveSymbol?.decimal_places}get rootElement(){return this.chartId?document.getElementById(this.chartId):null}get currentClose(){return this.currentCloseQuote()?.Close}get xAxisHeight(){return window.flutterChart?.app.getXAxisHeight()||24}get yAxisWidth(){return window.flutterChart?.app.getYAxisWidth()||60}updateHeight(t){const e=this.mainStore.chartSetting.historical&&this.isMobile,r=t||this.mainStore.chartSetting.position;let i=0;this.stateStore.enabledChartFooter?i=32:"bottom"===r&&this.stateStore.chartControlsWidgets&&(i=40),this.chartHeight=this.chartNode?.offsetHeight,this.chartContainerHeight=(this.chartHeight||0)-i-(e?45:0)}resizeScreen(){this.rootNode&&this.rootNode.clientWidth>=1280?this.containerWidth=1280:this.rootNode&&this.rootNode.clientWidth>=900?this.containerWidth=900:this.containerWidth=480,this.updateHeight()}_initChart(t,e){this.rootNode=t,this.chartNode=this.rootNode?.querySelector(".ciq-chart-area"),this.chartControlsNode=this.rootNode?.querySelector(".cq-chart-controls");const{symbol:r,granularity:i,unsubscribeQuotes:a,getQuotes:n,subscribeQuotes:o,isMobile:c,enableRouting:h,onMessage:u,settings:d,onSettingsChange:g,chartData:m,feedCall:p,isLive:f,startWithDataFitMode:_,leftMargin:b}=e;this.feedCall=p||{},this.api=new A(a,n||(async()=>({candles:[],echo_req:{}})),o||(()=>()=>{})),this.currentLanguage=localStorage.getItem("current_chart_lang")??d?.language?.toLowerCase(),this.tradingTimes=st.tradingTimes||(st.tradingTimes=new M(this.api,{enable:this.feedCall.tradingTimes,shouldFetchTradingTimes:this.mainStore.state.shouldFetchTradingTimes,tradingTimes:m?.tradingTimes}));const v=m?.activeSymbols;if(v){const t=R(v);this.processedSymbols=t,this.categorizedSymbols=$(t),this.symbolMap={};for(const e of t)this.symbolMap[e.symbol]=e;st.processedSymbols=t,st.symbolMap=this.symbolMap,st.categorizedSymbols=this.categorizedSymbols}else this.currentLanguage===d?.language&&st.processedSymbols&&(this.processedSymbols=st.processedSymbols,this.symbolMap=st.symbolMap,this.categorizedSymbols=st.categorizedSymbols);const{chartSetting:y}=this.mainStore;y.setSettings(d),y.onSettingsChange=g,this.isMobile=c,this.whitespace=c?50:150,this.state=this.mainStore.state,this.mainStore.notifier.onMessage=u,this.granularity=void 0!==i?i:this.defaults.granularity,this.isLive=f||!1,this.startWithDataFitMode=_||!1,this.leftMargin=b,st.chartCount+=1,this.feed=new it(this.api,this.mainStore,this.tradingTimes),this.enableRouting=h,this.enableRouting&&this.routingStore.handleRouting();const S=new z(this.rootNode);this.stateStore.stateChange(l.c4.INITIAL),this.loader.setState("market-symbol"),this.loader.setState("trading-time"),this.tradingTimes?.initialize().then((0,s.action)(()=>{if(this.isDestroyed)return;this.startWithDataFitMode?this.state?.clearLayout():this.state?.restoreLayout();const t=this.state?.symbol||r;this.changeSymbol(t||this.symbolMap&&Object.keys(this.symbolMap)[0],this.granularity),this.context=S,this.chartClosedOpenThemeChange(!this.currentActiveSymbol?.exchange_is_open),this.mainStore.chart.tradingTimes?.onMarketOpenCloseChanged((0,s.action)(t=>{for(const e in t)this.currentActiveSymbol?.symbol===e&&this.chartClosedOpenThemeChange(!t[e])})),this.contextPromise?.resolve?.(this.context),this.resizeScreen(),(0,s.reaction)(()=>[this.state?.symbol,this.state?.granularity],()=>{void 0===this.state?.symbol&&void 0===this.state?.granularity||this.changeSymbol(this.state.symbol,this.state.granularity)}),this.tradingTimes?.onTimeChanged(this.onServerTimeChange),setTimeout((0,s.action)(()=>{this.shouldRenderDialogs=!0}),500)}))}chartClosedOpenThemeChange(t){this.mainStore.state.setChartClosed(t),this.mainStore.state.setChartTheme(this.mainStore.chartSetting.theme),this.mainStore.chartAdapter.setSymbolClosed(t)}onServerTimeChange(){this.tradingTimes?._serverTime&&(this.serverTime=N(1e3*this.tradingTimes._serverTime.getEpoch()).format("DD MMM YYYY HH:mm:ss [GMT]"))}updateCurrentActiveSymbol(t){this.currentActiveSymbol=t}setChartAvailability(t){this.isChartAvailable=t}changeSymbol(t,e,r=!1){"string"==typeof t&&(t=this.symbolMap[t]);t&&this.currentActiveSymbol&&t?.symbol===this.currentActiveSymbol?.symbol&&void 0!==e&&e===this.granularity&&!r||(this.newChart(t),void 0!==e&&(this.granularity=e),t&&this.updateCurrentActiveSymbol(t))}newChart(t=this.currentActiveSymbol){if(!t)return;this.currentActiveSymbol&&this.feed?.unsubscribe({symbol:this.currentActiveSymbol.symbol,granularity:this.granularity}),this.mainStore.state.setChartIsReady(!1);const e=++this._chartRequestId;clearTimeout(this.loaderTimeout),this.loaderTimeout=setTimeout(()=>{this.loader.setState("chart-data"),this.loader.show()},2500);const r=e=>{clearTimeout(this.loaderTimeout),this.loader.hide(),this.chartClosedOpenThemeChange(!t.exchange_is_open),this.mainStore.paginationLoader.updateOnPagination(!1),this.mainStore.state.setChartIsReady(!0)};this.feed?.fetchInitialData(t.symbol,{granularity:this.mainStore.state.granularity,symbolObject:t},async({quotes:t,error:i})=>{e===this._chartRequestId&&(await this.mainStore.chartAdapter.newChart(),await this.mainStore.chartAdapter.onTickHistory(t||[]),this.mainStore.chartAdapter.flutterChart?.app.scrollToLastTick(),this.mainStore.chart.feed?.offMasterDataUpdate(this.mainStore.chartAdapter.onTick),this.mainStore.chart.feed?.onMasterDataUpdate(this.mainStore.chartAdapter.onTick),r())})}updateScaledOneOne(t){this.isScaledOneOne=t}refreshChart(){this.newChart()}destroy(){st.chartCount-=1,this.isDestroyed=!0,clearTimeout(this.loaderTimeout),this.resizeObserver&&this.resizeObserver.disconnect(),this.tradingTimes&&0===st.chartCount&&(st.tradingTimes=null,this.tradingTimes.destructor()),this.feed&&(this.feed.unsubscribeAll(),this.feed=null),this.mainStore.drawTools.destructor(),this.currentActiveSymbol=null,this.contextPromise=null,this.context=null}openFullscreen(){const t={element:["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"],fnc_enter:["requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen"],fnc_exit:["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"]},e=t.element.some(t=>document[t]&&null!==document[t]),r=e?document:document.documentElement,i=t[e?"fnc_exit":"fnc_enter"].find(t=>r[t]);i&&r[i]()?.catch(()=>{})}}at(st,"chartCount",0),at(st,"tradingTimes",void 0),at(st,"processedSymbols",void 0),at(st,"symbolMap",{}),at(st,"categorizedSymbols",[]);const nt=st;function ot(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class lt{constructor({getContext:t,getItems:e,onItemSelected:r}){ot(this,"getContext",void 0),ot(this,"getItems",void 0),ot(this,"onItemSelected",void 0),(0,s.makeObservable)(this,{onItemClick:s.action.bound}),this.getContext=t,this.getItems=e,this.onItemSelected=r}onItemClick(t,e){this.onItemSelected&&this.onItemSelected(e)}}function ct(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ht{get showTabs(){return!!this.description}constructor({mainStore:t,onChanged:e,onDeleted:r}){ct(this,"mainStore",void 0),ct(this,"menuStore",void 0),ct(this,"onChanged",void 0),ct(this,"onDeleted",void 0),ct(this,"items",[]),ct(this,"title",""),ct(this,"formTitle",""),ct(this,"formClassname",""),ct(this,"description",""),ct(this,"activeTab","settings"),ct(this,"scrollPanel",void 0),ct(this,"dialogPortalNodeId",void 0),ct(this,"freezeScroll",!1),ct(this,"id",""),ct(this,"flutter_chart_id",""),ct(this,"checkDropdownOpen",()=>{let t=!1;if(!this.scrollPanel)return;this.scrollPanel.querySelectorAll(".sc-color-picker, .sc-dropdown").forEach(e=>{-1!==e.className.indexOf("active")&&(t=!0)}),this.setFreezeScroll(t)}),(0,s.makeObservable)(this,{items:s.observable,title:s.observable,formTitle:s.observable,formClassname:s.observable,description:s.observable,activeTab:s.observable,showTabs:s.computed,scrollPanel:s.observable,dialogPortalNodeId:s.observable,freezeScroll:s.observable,open:s.computed,setFreezeScroll:s.action.bound,setOpen:s.action.bound,onResetClick:s.action.bound,onItemDelete:s.action.bound,onItemChange:s.action.bound,itemGroups:s.computed,setScrollPanel:s.action.bound}),this.mainStore=t,this.onChanged=e,this.onDeleted=r,this.menuStore=new _(t,{route:"indicator-setting"}),(0,s.reaction)(()=>this.open,()=>{if(!this.scrollPanel||!this.open)return;const t=this.scrollPanel.querySelectorAll(".sc-color-picker, .sc-dropdown");this.scrollPanel.addEventListener("click",()=>{this.setFreezeScroll(!1)}),t.forEach(t=>{t.addEventListener("click",()=>setTimeout(()=>this.checkDropdownOpen(),50))}),this.setFreezeScroll(!1)},{delay:300})}get context(){return this.mainStore.chart.context}get theme(){return this.mainStore.chartSetting.theme}get open(){return this.menuStore.open}setFreezeScroll(t){this.freezeScroll=t}setOpen(t){return t&&this.scrollPanel&&(this.scrollPanel.scrollTop=0),this.menuStore.setOpen(t)}onResetClick(){const t=this.items.map(t=>({...t,value:(0,c.o8)(t.defaultValue)}));this.items=t,this.onChanged(t)}onItemDelete(){this.menuStore.setOpen(!1),this.onDeleted&&this.onDeleted(this.id)}onItemChange(t,e){t&&t.value!==e&&(t.value=e,this.items=this.items.slice(0),this.onChanged(this.items))}get itemGroups(){const t=[],e=[];e.push({key:"%k",title:"%K",fields:[]}),e.push({key:"%d",title:"%D",fields:[]}),e.push({key:"over_bought",title:"Over Bought",fields:[]}),e.push({key:"over_sold",title:"OverSold",fields:[]}),e.push({key:"show_zones",title:"Show Zones",fields:[]});for(const r in this.items){const i=this.items[r],{group_key:a,title:s}=i,n=e.find(t=>a===t.key);n?(i.subtitle=s.replace(n.key,"").trim(),n.fields.push(i)):t.push(i)}return e.unshift({key:"others",title:this.formTitle||this.title,fields:t}),e}setScrollPanel(t){this.scrollPanel=t}}function ut(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const dt=[...l.wx].filter(t=>!t.candleOnly).map(t=>t.id);class gt{constructor(t){ut(this,"chartTypes",[]),ut(this,"listStore",void 0),ut(this,"mainStore",void 0),ut(this,"menuStore",void 0),ut(this,"settingsDialog",void 0),ut(this,"type",l.wx.find(t=>"line"===t.id)),ut(this,"onChartTypeChanged",void 0),ut(this,"onContextReady",()=>{this.chartTypes=[...l.wx]}),(0,s.makeObservable)(this,{type:s.observable,updateProps:s.action.bound,setChartType:s.action.bound,setType:s.action.bound,isTypeCandle:s.action.bound}),this.mainStore=t,(0,s.when)(()=>!!this.context,this.onContextReady),this.menuStore=new _(t,{route:"chart-type"}),this.listStore=new lt({getContext:()=>this.context,getItems:()=>this.types}),this.settingsDialog=new ht({mainStore:t,onChanged:()=>null}),(0,s.reaction)(()=>this.mainStore.state.chartType,()=>{void 0!==this.mainStore.state.chartType&&this.setType(this.mainStore.state.chartType)})}get context(){return this.mainStore.chart.context}get chartTypeProp(){return this.mainStore.state.chartType}get isCandle(){return!!this.type&&-1===dt.indexOf(this.type.id)}get isSpline(){return"spline"===this.type.id}setChartType(t){t&&this.setType(t)}setType(t){let e;(0,h.$s)(h.dq.ChartControl,h.Cw.ChartType,t),e="string"!=typeof(t=t||"line")?t:this.types.find(e=>e.id===t),e&&e.id!==this.type.id&&(this.type=e)}updateProps(t){this.onChartTypeChanged=t}get types(){const t=0===this.mainStore.chart.granularity;return void 0!==this.chartTypes&&0!==this.chartTypes.length||(this.chartTypes=[...l.wx]),this.chartTypes.map(e=>({...e,active:e.id===this.type.id,disabled:!!e.candleOnly&&t}))}isTypeCandle(t){return"string"==typeof t&&(t=this.types.find(e=>e.id===t)||this.types[0]),-1===dt.indexOf(t.id)}}function mt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class pt{constructor(t){mt(this,"mainStore",void 0),mt(this,"menuStore",void 0),this.mainStore=t,this.menuStore=new _(t,{route:"chart-mode"})}}var ft=r(7394),_t=r(9585),bt=r(9160).t;function vt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class yt{constructor(t){vt(this,"mainStore",void 0),vt(this,"menuStore",void 0),vt(this,"searchInput",void 0),vt(this,"settingsDialog",void 0),vt(this,"selectedTab",1),vt(this,"filterText",""),vt(this,"activeItems",[]),vt(this,"infoItem",null),vt(this,"portalNodeIdChanged",""),vt(this,"currentHoverIndex",null),vt(this,"previousHoverIndex",null),vt(this,"searchInputClassName",void 0),vt(this,"onContextReady",()=>{this.renderLegend()}),vt(this,"transform",t=>{if("string"==typeof t&&(t.startsWith("#")||t.toLowerCase().startsWith("0x")))return(0,ft.od)(t);if((0,c.Vh)(t)){const e=t;Object.keys(t).forEach(t=>{e[t]=this.transform(e[t])})}else if(Array.isArray(t))for(let e=0;e<t.length;e++)t[e]=this.transform(t[e]);return t}),vt(this,"addOrUpdateIndicator",(t,e)=>{const r=t.parameters.reduce((t,e)=>{const{path:r,paths:i,value:a}=e;if((0,c.Vh)(a)&&i){const e=a;Object.keys(e).forEach(r=>{(0,d.h)(t,i[r],e[r])})}else r&&(0,d.h)(t,r,a);return t},t.config||{}),i={id:t.id,name:t.flutter_chart_id,title:(t.short_name_and_index+(t.bars?` (${t.bars})`:"")).toUpperCase(),...this.transform(r)};this.mainStore.chartAdapter.flutterChart?.app.addOrUpdateIndicator(JSON.stringify(i),e)}),vt(this,"renderLegend",()=>{this.context&&this.updateStyle()}),vt(this,"getIndicatorProps",t=>(0,c.qI)((0,l.Xv)(),t=>t.items).find(e=>e?.flutter_chart_id===t)),(0,s.makeObservable)(this,{selectedTab:s.observable,filterText:s.observable,activeItems:s.observable,infoItem:s.observable,portalNodeIdChanged:s.observable,onSelectItem:s.action.bound,updateStyle:s.action.bound,updateProps:s.action.bound,editStudy:s.action.bound,editStudyByIndex:s.action.bound,deleteStudy:s.action.bound,deleteStudyById:s.action.bound,updateStudy:s.action.bound,deletePredictionStudies:s.action.bound,deleteAllStudies:s.action.bound,onSelectTab:s.action.bound,setFilterText:s.action.bound,onInfoItem:s.action.bound,updatePortalNode:s.action.bound,restoreStudies:s.action.bound,getItemById:s.action.bound,setIndicator:s.action.bound,highlightIndicator:s.action.bound,clearHoverItem:s.action.bound}),this.mainStore=t,(0,s.when)(()=>!!this.context,this.onContextReady),this.menuStore=new _(t,{route:"indicators"}),this.settingsDialog=new ht({mainStore:t,onDeleted:this.deleteStudyById,favoritesId:"indicators",onChanged:t=>this.updateStudy(t)}),this.searchInput=a().createRef(),(0,s.reaction)(()=>this.menuStore.open,()=>{this.menuStore.open||this.setFilterText(""),setTimeout(()=>{this.searchInput&&this.searchInput.current&&this.searchInput.current.focus()},400)})}get context(){return this.mainStore.chart.context}get items(){return[...(0,l.Xv)()].map(t=>("trend"===t.name&&(t.icon="light"===this.mainStore.chartSetting.theme?_t.KP:_t.qy),t))}get searchedItems(){return[...(0,l.Xv)()].map(t=>(t.foundItems=t.items.filter(t=>-1!==t.name.toLowerCase().indexOf(this.filterText.toLowerCase().trim())),t)).filter(t=>t.foundItems?.length)}get hasPredictionIndicator(){return(this.activeItems||[]).filter(t=>t.isPrediction).length>0}get maxAllowedItem(){return this.mainStore.chart.isMobile?2:5}onSelectItem(t){if(this.onInfoItem(null),this.activeItems.length>=this.maxAllowedItem)return;this.changeStudyPanelTitle(),(0,h.$s)(h.dq.ChartControl,h.Cw.Indicator,`Add ${t}`);const e=this.getIndicatorProps(t),{parameters:r,config:i}=(0,l.Fp)(t);if(e&&r){r.map(t=>t.value=(0,c.o8)(t.defaultValue));const t=(0,c.MQ)(this.settingsDialog.flutter_chart_id,r),a=this.findLastActiveItem(e.flutter_chart_id),s=a?a.group_length+1:0,n={...e,group_length:s,short_name_and_index:e.short_name+(s?` ${s}`:""),id:(0,ft.LP)(),config:i,parameters:r,bars:t.bars};(0,c.ay)(r,this.mainStore.chartSetting.theme),this.addOrUpdateIndicator(n),this.activeItems.push(n),this.mainStore.bottomWidgetsContainer.updateChartHeight(),this.mainStore.state.saveLayout()}}async restoreStudies(t){this.deleteAllStudies(),t.forEach((e,r)=>{const i=this.getIndicatorProps(e.flutter_chart_id);i?(this.addOrUpdateIndicator(e),Object.assign(e,i)):t.splice(r,1)}),this.activeItems=t,this.mainStore.bottomWidgetsContainer.updateChartHeight(),this.cleanupPredictionIndicator()}updateTheme(){this.activeItems.forEach((t,e)=>{(0,c.ay)(t.parameters,this.mainStore.chartSetting.theme),this.addOrUpdateIndicator(t,e)}),this.mainStore.state.saveLayout()}updateStyle(){const t=this.mainStore.studies.activeItems.length>2;this.mainStore.state.setShouldMinimiseLastDigit(t)}updateProps({searchInputClassName:t}){this.searchInputClassName=t}editStudyByIndex(t){const e=this.activeItems[t];e&&this.editStudy(e)}editStudy(t){(0,h.$s)(h.dq.ChartControl,h.Cw.Indicator,`Edit ${t.flutter_chart_id}`),this.settingsDialog.id=t.id,this.settingsDialog.flutter_chart_id=t.flutter_chart_id,this.settingsDialog.items=t.parameters,this.settingsDialog.title=t.name,this.settingsDialog.formTitle=bt.translate("Result"),this.settingsDialog.formClassname=`form--${t.id.toLowerCase().replace(/ /g,"-")}`,this.settingsDialog.description="",this.settingsDialog.dialogPortalNodeId=this.portalNodeIdChanged,this.settingsDialog.setOpen(!0)}deleteStudyById(t){const e=this.activeItems.findIndex(e=>e.id===t);this.mainStore.chartAdapter.flutterChart?.indicators.removeIndicator(e),this.deleteStudy(e)}deleteStudy(t){(0,h.$s)(h.dq.ChartControl,h.Cw.Indicator,`Remove ${t}`),this.mainStore.state.stateChange(l.c4.INDICATOR_DELETED,{indicator_type_name:this.activeItems[t].flutter_chart_id,indicators_category_name:(0,l.jY)(this.activeItems[t].flutter_chart_id)}),this.activeItems.splice(t,1),this.mainStore.bottomWidgetsContainer.updateChartHeight(),this.renderLegend(),this.mainStore.state.saveLayout()}updateStudy(t){this.changeStudyPanelTitle();const e=this.getIndicatorProps(this.settingsDialog.flutter_chart_id),{config:r}=(0,l.Fp)(this.settingsDialog.flutter_chart_id)||{};if(e&&t){const i=(0,c.MQ)(this.settingsDialog.flutter_chart_id,t),a=this.activeItems.findIndex(t=>t.id===this.settingsDialog.id),s=this.activeItems[a],n={...e,short_name_and_index:e.short_name+(s.group_length?` ${s.group_length}`:""),group_length:s.group_length,id:this.settingsDialog.id,bars:i.bars,parameters:t,config:r};this.activeItems[a]=n,this.mainStore.state.stateChange(l.c4.INDICATOR_EDITED,{indicator_type_name:n.flutter_chart_id,indicators_category_name:(0,l.jY)(n.flutter_chart_id)}),this.addOrUpdateIndicator(n,a),this.mainStore.state.saveLayout()}}changeStudyPanelTitle(){this.mainStore.chart.isMobile&&this.mainStore.state.saveLayout()}deletePredictionStudies(){const t=this.activeItems.filter(t=>t.isPrediction);t.length>0&&(t.forEach(t=>{this.mainStore.state.stateChange(l.c4.INDICATOR_DELETED),this.deleteStudyById(t.id)}),this.mainStore.state.saveLayout())}savePredictionStudies(){const t=this.activeItems.filter(t=>t.isPrediction);t.length>0&&(0,c.lk)("predictionIndicators",t)}cleanupPredictionIndicator(){localStorage.getItem("predictionIndicators")&&localStorage.removeItem("predictionIndicators")}deleteAllStudies(){this.activeItems=[],window.flutterChart?.indicators.clearIndicators(),this.mainStore.state.saveLayout()}onSelectTab(t){this.setFilterText(""),this.selectedTab=t,this.onInfoItem(null)}setFilterText(t){this.selectedTab=""!==t?0:1,this.filterText=t,this.mainStore.state.debouncedStateChange(l.c4.INDICATOR_SEARCH,{search_string:t})}onInfoItem(t){this.infoItem=t?{...t,disabledAddBtn:t.isPrediction&&this.mainStore.timeperiod.isTick}:t}setIndicator(t,e){this.addOrUpdateIndicator(t,e)}highlightIndicator(t){if(this.currentHoverIndex=t,this.previousHoverIndex!==this.currentHoverIndex){if("number"==typeof this.previousHoverIndex&&this.clearHoverItem(this.previousHoverIndex),null!=t){const e=(0,c.o8)(this.activeItems[t]);if(e&&e.config){for(const t in e.config)t.includes("Style")&&(e.config[t].thickness=2,"scatterStyle"===t&&(e.config[t].radius=2.5)),t.includes("Styles")&&e.config[t].forEach(t=>{t.thickness=2});this.setIndicator(e,t)}}this.previousHoverIndex=t}}clearHoverItem(t){const e=this.activeItems[t];e&&this.setIndicator(e,t)}updatePortalNode(t){this.portalNodeIdChanged=t}findLastActiveItem(t){for(let e=this.activeItems.length-1;e>=0;e--)if(this.activeItems[e].flutter_chart_id===t)return this.activeItems[e]}getItemById(t){return this.activeItems.find(e=>e.id===t)}}function St(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class xt{constructor(t){St(this,"_pervDrawingObjectCount",0),St(this,"_previousDrawingTools",[]),St(this,"mainStore",void 0),St(this,"menuStore",void 0),St(this,"settingsDialog",void 0),St(this,"activeToolsGroup",[]),St(this,"portalNodeIdChanged",void 0),St(this,"seletedDrawToolConfig",null),St(this,"selectedToolId",null),St(this,"showConfirmationToast",!1),St(this,"confirmationMessage",""),St(this,"showDeletionSnackbar",!1),St(this,"deletedToolName",""),St(this,"addingStateInfo",{currentStep:0,totalSteps:0,isFinished:!0}),St(this,"floatingMenuPosition",void 0),St(this,"getDrawToolsItems",()=>{const t=(0,l.Os)();return Object.keys(t).map(e=>t[e])}),St(this,"drawingToolsRepoArray",()=>this.mainStore.chartAdapter.flutterChart?.drawingTool.getDrawingToolsRepoItems().map(t=>(0,c.xL)(t)).filter(t=>t)),St(this,"onContextReady",()=>{document.addEventListener("keydown",this.closeOnEscape,!1),document.addEventListener("dblclick",this.doubleClick)}),St(this,"closeOnEscape",t=>{27===t.keyCode&&(this.mainStore.chartAdapter.flutterChart?.drawingTool.clearDrawingToolSelect(),this.seletedDrawToolConfig=null,this.drawingFinished())}),St(this,"doubleClick",()=>this.drawingFinished()),St(this,"transform",t=>{if("string"==typeof t&&(t.startsWith("#")||t.toLowerCase().startsWith("0x")))return(0,ft.od)(t);if((0,c.Vh)(t)){const e=t;Object.keys(t).forEach(t=>{e[t]=this.transform(e[t])})}else if(Array.isArray(t))for(let e=0;e<t.length;e++)t[e]=this.transform(t[e]);return t}),St(this,"updateFloatingMenuPosition",({x:t,y:e})=>{this.floatingMenuPosition={x:t,y:e},this.mainStore.chartAdapter.flutterChart?.drawingTool.updateFloatingMenuPosition(t,e)}),St(this,"setSelectedTool",t=>{this.selectedToolId=t,this.showConfirmationToast=!0}),St(this,"clearSelectedTool",()=>{this.selectedToolId=null,this.showConfirmationToast=!1}),St(this,"startAddingNewTool",t=>{this.setSelectedTool(t),this.menuStore.setOpen(!1),this.mainStore.chartAdapter.flutterChart?.drawingTool.startAddingNewTool(t)}),St(this,"cancelAddingNewTool",()=>{this.mainStore.chartAdapter.flutterChart?.drawingTool.cancelAddingNewTool(),this.hideDrawingConfirmation()}),St(this,"hideDrawingConfirmation",()=>{this.showConfirmationToast=!1,this.confirmationMessage="",this.resetAddingState(),this.clearSelectedTool()}),St(this,"hideDeletionSnackbar",()=>{this.showDeletionSnackbar=!1,this.deletedToolName=""}),St(this,"showDeletionSnackbarForDeletedTool",t=>{this.deletedToolName=t,this.showDeletionSnackbar=!0}),St(this,"cancelDrawingTool",()=>{this.hideDrawingConfirmation(),this.mainStore.chartAdapter.flutterChart?.drawingTool.clearDrawingToolSelect(),this.seletedDrawToolConfig=null,this.drawingFinished()}),St(this,"updateAddingState",(t,e)=>{this.addingStateInfo={currentStep:t,totalSteps:e,isFinished:t===e}}),St(this,"resetAddingState",()=>{this.addingStateInfo={currentStep:0,totalSteps:0,isFinished:!0}}),St(this,"updateProps",t=>{t.drawingToolFloatingMenuPosition&&this.updateFloatingMenuPosition(t.drawingToolFloatingMenuPosition)}),St(this,"handleStateChange",(t,e,r)=>{this.mainStore.state.stateChange(e,{drawing_tool_name:t,...r??{}})}),(0,s.makeObservable)(this,{activeToolsGroup:s.observable,portalNodeIdChanged:s.observable,selectedToolId:s.observable,showConfirmationToast:s.observable,confirmationMessage:s.observable,showDeletionSnackbar:s.observable,deletedToolName:s.observable,addingStateInfo:s.observable,floatingMenuPosition:s.observable,activeToolsNo:s.computed,destructor:s.action.bound,drawingFinished:s.action.bound,clearAll:s.action.bound,updateActiveToolsGroup:s.action.bound,onDeleted:s.action.bound,updatePortalNode:s.action.bound,onLoad:s.action.bound,onToolAdded:s.action.bound,hideDrawingConfirmation:s.action.bound,hideDeletionSnackbar:s.action.bound,showDeletionSnackbarForDeletedTool:s.action.bound,cancelDrawingTool:s.action.bound,updateAddingState:s.action.bound,resetAddingState:s.action.bound,updateProps:s.action.bound,updateFloatingMenuPosition:s.action.bound,setSelectedTool:s.action.bound,clearSelectedTool:s.action.bound}),this.mainStore=t,this.menuStore=new _(t,{route:"draw-tool"}),this.settingsDialog=new ht({mainStore:t,onDeleted:t=>{const e=this.drawingToolsRepoArray(),r=e?.findIndex(e=>e.configId===t);void 0!==r&&r>-1&&this.onDeleted(r)},onChanged:()=>{}}),(0,s.when)(()=>!!this.context,this.onContextReady)}get context(){return this.mainStore.chart.context}get stateStore(){return this.mainStore.state}get activeToolsNo(){return this.activeToolsGroup.reduce((t,e)=>t+e.items.length,0)}destructor(){document.removeEventListener("keydown",this.closeOnEscape),document.removeEventListener("dblclick",this.doubleClick)}updateTheme(){this.activeToolsGroup.forEach(t=>t.items.forEach(t=>{(0,c.ay)(t.parameters,this.mainStore.chartSetting.theme)}))}onLoad(t){this.activeToolsGroup=[],t.forEach(t=>{if("string"==typeof t&&(t=(0,c.xL)(t)),!t)return;const e=t.name.replace("dt_","");if(e){const r=this.processDrawTool(e);r.config=t,r.parameters.forEach(e=>{e.path&&(["lineStyle","fillStyle"].includes(e.path)?e.value=(0,ft.Fh)(t[e.path]?.color?.value??t[e.path]?.color):"enableLabel"===e.path&&(e.value=t[e.path]))}),this.updateActiveToolsGroup(r)}});const e=this.drawingToolsRepoArray();e&&(this._previousDrawingTools=JSON.parse(JSON.stringify(e)))}onToolAdded(t){t.lineStyle&&this.handleStateChange(t.name?.replace("dt_","")||"unknown",l.c4.DRAWING_TOOLS_ADD,{drawing_tool_name:t.name?.replace("dt_","")||"unknown",pxthickness:`default_${t.lineStyle.thickness}px`,color_name:`default_${(0,ft.Fh)(Number(t.lineStyle.color)).replace("#","")}`})}drawingFinished(){this.hideDrawingConfirmation()}clearAll(){this.activeToolsGroup=[],window.flutterChart?.drawingTool.clearDrawingTool(),(0,h.$s)(h.dq.ChartControl,h.Cw.DrawTools,"Clear All")}processDrawTool(t){const e=(0,l.Os)()[t],{parameters:r,config:i}=(0,l.YH)(t);(0,c.ay)(r,this.mainStore.chartSetting.theme),(0,c.ay)(i,this.mainStore.chartSetting.theme);let a=null;if(e&&r){r.map(t=>t.value=(0,c.o8)(t.defaultValue));const s={config:i,parameters:r,bars:"0",...e},n=s.parameters.reduce((t,e)=>{const{path:r,paths:i,value:a}=e;if((0,c.Vh)(a)&&i){const e=a;Object.keys(e).forEach(r=>{(0,d.h)(t,i[r],e[r])})}else r&&(0,d.h)(t,r,a);return t},s.config||{});a={...{id:s.id,name:`dt_${t}`,title:(0,ft.ZH)(s.id),...this.transform(n)},...(0,l.Os)()[t],parameters:r,index:this.activeToolsNo}}return a}onUpdate(){const t=this.drawingToolsRepoArray();if(t){if(this._previousDrawingTools&&this._previousDrawingTools.length===t.length)for(let e=0;e<t.length;e++)JSON.stringify(this._previousDrawingTools[e])!==JSON.stringify(t[e])&&this._identifyChanges(this._previousDrawingTools[e],t[e]);this._previousDrawingTools=JSON.parse(JSON.stringify(t)),this.onLoad(t)}}_identifyChanges(t,e){if(!t||!e)return"Complete replacement";Object.keys(e).forEach(r=>{["lineStyle","fillStyle"].includes(r)&&"object"==typeof e[r]&&null!==e[r]&&"object"==typeof t[r]&&null!==t[r]&&(e[r].color!==t[r].color&&this.handleStateChange(e.name?.replace("dt_","")||"unknown",l.c4.DRAWING_TOOLS_EDIT_COLOR,{drawing_tool_name:e.name?.replace("dt_","")||"unknown",color_name:`${(0,ft.Fh)(e[r].color).replace("#","")}`}),e[r].thickness!==t[r].thickness&&this.handleStateChange(e.name?.replace("dt_","")||"unknown",l.c4.DRAWING_TOOLS_EDIT_PX,{drawing_tool_name:e.name?.replace("dt_","")||"unknown",pxthickness:`${e[r].thickness}px`}))})}updateActiveToolsGroup(t){const e=[...this.activeToolsGroup],r=e.findIndex(e=>e.id===t.id);if(-1===r)e.push({id:t.id,items:[t]});else{const i=e[r];i.items.push({...t,num:i.items.length}),e[r]=i}this.activeToolsGroup=e}onDeleted(t){if(void 0!==t){const e=this.drawingToolsRepoArray(),r=e?e[t]:null;if(r){const e={...r};this.mainStore.chartAdapter.flutterChart?.drawingTool.removeDrawingTool(t),this.handleStateChange(e.name?.replace("dt_","")||"unknown",l.c4.DRAWING_TOOLS_DELETE,{pxthickness:e.lineStyle?.thickness?`${e.lineStyle.thickness}px`:void 0,color_name:e.lineStyle?.color?`${(0,ft.Fh)(Number(e.lineStyle.color)).replace("#","")}`:void 0})}t&&r&&(0,h.$s)(h.dq.ChartControl,h.Cw.DrawTools,`Remove ${t}`)}}updatePortalNode(t){this.portalNodeIdChanged=t}}function wt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Ct{constructor(){wt(this,"className",""),wt(this,"price",0),wt(this,"isIncrease",!1),wt(this,"status",""),wt(this,"oldPrice",0),(0,s.makeObservable)(this,{price:s.observable,isIncrease:s.observable,status:s.observable,setPrice:s.action.bound})}setPrice(t,e){const r=e||+this.oldPrice,i=+t;let a=!1;if(i>r)a=!0,this.status="up";else{if(!(i<r))return void(this.status="");this.status="down"}this.price=t,this.oldPrice=this.price,this.isIncrease=a}}var Tt=r(9160).t;function kt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class jt{constructor({getCategoricalItems:t,onSelectItem:e,getIsShown:r,placeholderText:i,favoritesId:n,mainStore:o,id:l,getCurrentActiveCategory:c,getCurrentActiveSubCategory:h,getCurrentActiveMarket:u,searchInputClassName:d}){kt(this,"activeMarket",void 0),kt(this,"activeSubCategory",""),kt(this,"categoryElements",void 0),kt(this,"favoritesId",void 0),kt(this,"getCategoricalItems",void 0),kt(this,"getCurrentActiveCategory",void 0),kt(this,"getCurrentActiveMarket",void 0),kt(this,"getCurrentActiveSubCategory",void 0),kt(this,"id",void 0),kt(this,"isInit",void 0),kt(this,"mainStore",void 0),kt(this,"onSelectItem",void 0),kt(this,"pauseScrollSpy",!1),kt(this,"searchInput",void 0),kt(this,"searchInputClassName",void 0),kt(this,"placeholderText",void 0),kt(this,"isShown",!1),kt(this,"scrollPanel",void 0),kt(this,"filterText",""),kt(this,"activeCategoryKey",""),kt(this,"focusedCategoryKey",null),kt(this,"isScrollingDown",!1),kt(this,"activeHeadKey",""),kt(this,"scrollTop",void 0),kt(this,"isUserScrolling",!0),kt(this,"lastFilteredItems",[]),kt(this,"activeCategories",[]),(0,s.makeObservable)(this,{isShown:s.observable,scrollPanel:s.observable,filterText:s.observable,activeCategoryKey:s.observable,focusedCategoryKey:s.observable,isScrollingDown:s.observable,activeHeadKey:s.observable,init:s.action.bound,favoritesCategoryData:s.computed,getFavorites:s.action.bound,filteredItems:s.computed,updateScrollSpy:s.action.bound,scrollUp:s.action.bound,scrollDown:s.action.bound,setCategoryElement:s.action.bound,setFilterText:s.action.bound,handleFilterClick:s.action.bound,setScrollPanel:s.action.bound,handleTitleClick:s.action.bound,scrollToActiveSymbol:s.action.bound}),(0,s.reaction)(()=>r&&r()&&this.scrollPanel,()=>{r()&&this.scrollPanel&&this.scrollToActiveSymbol()},{delay:200}),this.getCategoricalItems=t,this.onSelectItem=e,this.favoritesId=n,this.id=l,this.categoryElements={},this.mainStore=o,this.getCurrentActiveCategory=c,this.getCurrentActiveSubCategory=h,this.getCurrentActiveMarket=u,this.isInit=!1,this.searchInput=a().createRef(),this.searchInputClassName=d,this.placeholderText=i}get chart(){return this.mainStore.chart}get context(){return this.chart.context}get height(){return this.chart.chartContainerHeight?this.chart.chartContainerHeight-(this.chart.isMobile?0:120):0}init(){if(this.isInit=!0,""===this.activeCategoryKey&&this.filteredItems.length>0)for(const t of this.filteredItems){if(this.categoryElements[t.categoryId]){this.activeCategoryKey=t.categoryId;break}}}get favoritesCategoryData(){return Object.keys(this.mainStore.favorites.favoritesMap[this.favoritesId])||[]}getFavorites(){this.pauseScrollSpy=!0;const t={categoryName:Tt.translate("Favorites"),categoryId:"favorite",hasSubcategory:!1,hasSubgroup:!1,active:!0,subgroups:[],emptyDescription:Tt.translate("There are no favorites yet.")};return setTimeout(()=>{this.pauseScrollSpy=!1},20),t}get filteredItems(){let t=(0,c.yX)(this.getCategoricalItems());const e=this.activeCategories.length?this.activeCategories:[this.getCurrentActiveCategory?this.getCurrentActiveCategory():"favorite"];for(const r of t)if(e.includes(r.categoryId))r.active=!0;else if(r.hasSubgroup)for(const t of r.subgroups)e.includes(t.categoryId)&&(t.active=!0);if(this.favoritesId){const e={...this.getFavorites(),data:this.favoritesCategoryData},r=t=>{const i=[];return t.hasSubgroup&&"categoryName"in t?t.subgroups.forEach(t=>t.data.forEach(t=>{const e=r(t);i.push(...e)})):t.hasSubcategory?t.data.forEach(t=>{const e=r(t);i.push(...e)}):e.data.forEach(e=>{if("string"==typeof e){const r=t.data.find(t=>t.itemId===e);r&&i.push(r)}}),i},i=e.data.filter(t=>"string"!=typeof t);t.forEach(t=>{const e=r(t);i.push(...e)}),e.data=i.filter(t=>t),t.unshift(e)}if(""===this.filterText)return this.lastFilteredItems=t,t;let r=!1;const i=this.filterText.split(" ").filter(t=>""!==t).map(t=>t.toLowerCase().trim()),a=t=>{t.data=t.data.filter(t=>{return e=t.display||("object"==typeof t.dataObject?t.dataObject.symbol:""),i.reduce((t,r)=>e.toLowerCase().includes(r)&&t,!0);var e}),t.data.length&&(r=!0)};for(const e of t)if(e.active=!0,e.hasSubgroup){e.subgroups=(0,s.toJS)(e.subgroups);for(const t of e.subgroups){t.active=!0;for(const e of t.data)a(e)}}else if(e.hasSubcategory)for(const t of e.data)a(t);else a(e);return r||(t=this.lastFilteredItems),this.pauseScrollSpy||(this.lastFilteredItems=t),t}updateScrollSpy(){if(this.pauseScrollSpy||!this.scrollPanel)return;if(0===this.filteredItems.length)return;const t=this.scrollPanel.getBoundingClientRect().top;let e=null;for(const r of this.filteredItems){const i=this.categoryElements[r.categoryId],a=57;if(!i)return;const s=this.filteredItems.indexOf(r)*(r.hasSubgroup?r.subgroups.length+1*a:a),n=i.getBoundingClientRect();n.top-t-s<0&&(e=r.hasSubgroup?r.subgroups[r.subgroups.length>1?+(n.top<0):0]?.categoryId:r?.categoryId)}const r=this.scrollPanel.getBoundingClientRect().top;this.scrollTop&&this.scrollTop>r?this.scrollUp():this.scrollDown(),this.scrollTop=r,this.focusedCategoryKey=e||this.filteredItems[0].categoryId,this.activeHeadKey=0===this.scrollTop?null:this.focusedCategoryKey}scrollUp(){this.isScrollingDown=!1}scrollDown(){this.isScrollingDown=this.isUserScrolling,this.isUserScrolling=!0}setCategoryElement(t,e){this.categoryElements[e]=t}setFilterText(t){this.filterText=t,this.isUserScrolling=!1,this.updateScrollSpy(),""===t&&setTimeout(()=>this.scrollToActiveSymbol(),1),this.mainStore.state.debouncedStateChange(l.c4.MARKET_SEARCH,{search_string:t})}handleFilterClick(t){this.focusedCategoryKey="";const e=this.categoryElements[t],r=40*Object.keys(this.categoryElements).indexOf(t);e&&(this.pauseScrollSpy=!0,this.isUserScrolling=!1,this.scrollPanel&&(this.chart.isMobile?this.scrollPanel.scroll({top:e.offsetTop-95,left:0,behavior:"smooth"}):this.scrollPanel.scrollTop=e.offsetTop-r),this.focusedCategoryKey=t,this.activeHeadKey=null,setTimeout(()=>{this.pauseScrollSpy=!1},20))}setScrollPanel(t){this.scrollPanel=t}handleTitleClick(t){this.activeCategories=[];for(const e of this.filteredItems){if(e.hasSubgroup?e.subgroups?.filter(e=>e.categoryId===t).length>0:e.categoryId===t){if(e.hasSubgroup)for(const r of e.subgroups)r.categoryId===t&&(r.active=!r.active);e.active=!e.active,setTimeout(()=>this.handleFilterClick(e.categoryId),250)}if(e.active&&e.hasSubgroup)for(const t of e.subgroups)t.active&&this.activeCategories.push(t.categoryId);else e.active&&"favorite"!==e.categoryId&&this.activeCategories.push(e.categoryId)}setTimeout(()=>this.updateScrollSpy(),0)}scrollToActiveSymbol(){this.focusedCategoryKey=null,this.activeCategoryKey=this.getCurrentActiveCategory?this.getCurrentActiveCategory():"favorite",this.activeSubCategory=this.getCurrentActiveSubCategory?this.getCurrentActiveSubCategory():"",this.activeMarket=this.getCurrentActiveMarket?this.getCurrentActiveMarket():"";const t=this.categoryElements[this.activeCategoryKey],e=`.sc-mcd__category--${this.activeCategoryKey} .sc-mcd__category__content--${this.activeSubCategory}`,r=this.scrollPanel?.querySelector(e),i=`${e} .sc-mcd__item--${this.activeMarket}`,a=this.scrollPanel?.querySelector(i);if(this.scrollPanel?.querySelectorAll(".sc-mcd__item--market-selected").forEach(t=>{t.classList.remove("sc-mcd__item--market-selected")}),this.activeSubCategory&&this.activeCategoryKey){const t=this.scrollPanel?.querySelector(`.sc-mcd__category--${this.activeCategoryKey} .sc-mcd__item--${this.activeSubCategory}`);t&&t.classList.add("sc-mcd__item--market-selected")}if(this.activeHeadKey=this.activeCategoryKey||null,this.pauseScrollSpy=!0,this.isUserScrolling=!1,this.scrollPanel&&t&&this.scrollPanel)if(this.scrollPanel.scrollTop=t.offsetTop,a){const e=this.mainStore.chart.isMobile?100:40;this.scrollPanel.scrollTop=t.offsetTop+a.offsetTop-e}else if(r){const e=this.mainStore.chart.isMobile?100:0;this.scrollPanel.scrollTop=t.offsetTop+r.offsetTop-e}if(setTimeout(()=>{this.pauseScrollSpy=!1},20),this.isInit||this.init(),this.mainStore.chart.isMobile||setTimeout(()=>this.searchInput.current&&this.searchInput.current.focus(),0),!this.mainStore.chart.isMobile){const t=Object.keys(this.categoryElements),e=t.filter(t=>null!==this.categoryElements[t]),r=t[t.length-1],i=this.height-(64+40*(e.length-1)),a=this.categoryElements[r];a&&(a.style.minHeight=`${i}px`)}}}var Nt=r(9160).t;function Et(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class At{constructor(t){Et(this,"animatedPrice",void 0),Et(this,"categoricalDisplay",void 0),Et(this,"mainStore",void 0),Et(this,"menuStore",void 0),Et(this,"serverTime",void 0),Et(this,"todayChange",null),Et(this,"todayChangePercent",null),Et(this,"isVisible",!1),Et(this,"openMarket",{}),Et(this,"enableShowPrice",!1),Et(this,"searchInputClassName",void 0),Et(this,"onContextReady",()=>{this.chart.feed?.onMasterDataUpdate(this.update),this.update(),this.tradingTimes?.onMarketOpenCloseChanged((0,s.action)(t=>{for(const e in t)this.currentSymbol?.symbol===e&&(this.currentSymbol.exchange_is_open=t[e])}))}),Et(this,"onMouseEnter",()=>this.crosshairStore.setTemporaryDisabled(!0)),Et(this,"onMouseLeave",()=>this.crosshairStore.setTemporaryDisabled(!1)),(0,s.makeObservable)(this,{todayChange:s.observable,todayChangePercent:s.observable,isVisible:s.observable,openMarket:s.observable,currentSymbol:s.computed,isSymbolOpen:s.computed,decimalPlaces:s.computed,isShowChartPrice:s.computed,tradingTimes:s.computed,symbolOpenTime:s.computed,currentActiveCategory:s.computed,currentActiveSubCategory:s.computed,currentActiveMarket:s.computed,setSymbol:s.action.bound,update:s.action.bound,hidePrice:s.action.bound,updateProps:s.action.bound}),this.mainStore=t,(0,s.when)(()=>!!this.context,this.onContextReady),this.menuStore=new _(t,{route:"chart-title"}),this.animatedPrice=new Ct,this.categoricalDisplay=new jt({getCategoricalItems:()=>this.mainStore.chart.categorizedSymbols,getIsShown:()=>this.menuStore.open,placeholderText:Nt.translate("Search..."),favoritesId:"chartTitle&Comparison",mainStore:t,id:"market_dropdown",getCurrentActiveCategory:()=>this.currentActiveCategory,getCurrentActiveSubCategory:()=>this.currentActiveSubCategory,getCurrentActiveMarket:()=>this.currentActiveMarket,searchInputClassName:this.searchInputClassName}),this.serverTime=u.A.getInstance()}get chart(){return this.mainStore.chart}get context(){return this.mainStore.chart.context}get crosshairStore(){return this.mainStore.crosshair}get currentSymbol(){return this.mainStore.chart.currentActiveSymbol}get isSymbolOpen(){return this.currentSymbol?.exchange_is_open}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places||2}get isShowChartPrice(){return this.mainStore.chart.isChartAvailable}get tradingTimes(){return this.mainStore.chart.tradingTimes}get symbolOpenTime(){const t=this.tradingTimes?._tradingTimesMap&&this.tradingTimes._tradingTimesMap.length&&this.currentSymbol?this.tradingTimes._tradingTimesMap[this.currentSymbol.symbol].times:[],e=this.serverTime.getLocalDate().getTime();let r=t?t.find(t=>t.open.getTime()>e):null;return r instanceof Date||(r=null),{openTime:r}}get currentActiveCategory(){const t=this.mainStore.chart.currentActiveSymbol;return this.openMarket.category?this.openMarket.category:"none"!==t?.subgroup?t?.subgroup:t?t.market:"favorite"}get currentActiveSubCategory(){return this.openMarket.subcategory?this.openMarket.subcategory:this.mainStore.chart.currentActiveSymbol?this.mainStore.chart.currentActiveSymbol.symbol:""}get currentActiveMarket(){return this.openMarket.market?this.openMarket.market:null}setSymbol(t){void 0===this.mainStore.state.symbol?this.chart.changeSymbol(t):console.error("Changing symbol does nothing because symbol prop is being set. Consider overriding the onChange prop in <ChartTitle />")}update(t){if(!this.currentSymbol)return;const e=t||!this.isShowChartPrice;if(!e)return;let r=t?.Close;if(r){r=+r.toFixed(this.decimalPlaces);const e=t?.prevClose||this.animatedPrice.price;this.animatedPrice.setPrice(r,e),e&&(this.todayChange=Math.abs(r-e).toFixed(this.decimalPlaces),this.todayChangePercent=(Number(this.todayChange)/e*100).toFixed(2))}this.isVisible||!e||this.enableShowPrice?this.isVisible=e:this.enableShowPrice=!0}hidePrice(){this.isVisible=!1,this.enableShowPrice=!1}updateProps({open_market:t,open:e}){t&&(this.openMarket=t),e&&this.menuStore.setOpen(!0)}}function It(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Dt{constructor(t){It(this,"templateName",""),It(this,"currentRoute","main"),It(this,"isInputActive",!1),It(this,"views",(0,c.s0)("chart-views")||[]),It(this,"routes",{add:()=>this.saveViews(),main:()=>this.updateRoute("add"),cancel:()=>this.onCancel(),overwrite:()=>this.overwrite()}),It(this,"mainStore",void 0),It(this,"menuStore",void 0),(0,s.makeObservable)(this,{templateName:s.observable,currentRoute:s.observable,isInputActive:s.observable,routes:s.observable,views:s.observable,sortedItems:s.computed,onChange:s.action.bound,onSubmit:s.action.bound,onCancel:s.action.bound,updateRoute:s.action.bound,saveViews:s.action.bound,overwrite:s.action.bound,remove:s.action.bound,removeAll:s.action.bound,applyLayout:s.action.bound,onToggleNew:s.action.bound,inputRef:s.action.bound,onFocus:s.action.bound,onBlur:s.action.bound}),this.mainStore=t,this.menuStore=new _(t,{route:"templates"}),(0,s.reaction)(()=>this.menuStore.dialogStore.open,()=>{0===this.views.length?this.updateRoute("new"):this.updateRoute("main"),this.menuStore.dialogStore.open&&(this.templateName="")})}get context(){return this.mainStore.chart.context}get loader(){return this.mainStore.loader}get sortedItems(){return[...this.views].sort((t,e)=>t.name.toLowerCase()<e.name.toLowerCase()?-1:1)}updateLocalStorage(){localStorage.setItem("chart-views",JSON.stringify(this.views))}onChange(t){"overwrite"!==this.currentRoute&&(this.templateName=t.target.value)}onSubmit(t){13===t.keyCode&&(this.saveViews(),(0,h.$s)(h.dq.ChartControl,h.Cw.Template,"Save Template"))}onCancel(){this.templateName="",this.updateRoute("main")}updateRoute(t){this.currentRoute=t}getLayout(){return{chartType:this.mainStore.state.chartType,granularity:this.mainStore.state.granularity,timeUnit:this.mainStore.state.timeperiodStore.timeUnit,studyItems:this.mainStore.studies.activeItems,drawTools:this.mainStore.drawTools.activeToolsGroup,msPerPx:this.mainStore.chartAdapter.msPerPx}}saveViews(){this.views.some(t=>t.name.toLowerCase().trim()===this.templateName.toLowerCase().trim())?this.updateRoute("overwrite"):this.templateName.trim().length>0&&(this.updateRoute("main"),this.views.push({name:this.templateName.trim(),layout:(0,c.o8)(this.getLayout())}),this.updateLocalStorage(),this.templateName="")}overwrite(){const t=(0,c.o8)(this.getLayout()),e=this.views.findIndex(t=>t.name.toLowerCase()===this.templateName.toLowerCase());this.views[e].layout=t,this.views[e].name=this.templateName.trim(),this.updateLocalStorage(),this.updateRoute("main"),this.templateName=""}remove(t,e){this.views=this.sortedItems.filter((e,r)=>t!==r),e.nativeEvent.is_item_removed=!0,this.updateLocalStorage(),(0,h.$s)(h.dq.ChartControl,h.Cw.Template,"Remove Template")}removeAll(){this.views=[],this.updateLocalStorage(),(0,h.$s)(h.dq.ChartControl,h.Cw.Template,"Remove All Templates"),this.updateRoute("new")}applyLayout(t,e,r,i){if(e.nativeEvent.is_item_removed)return;this.mainStore.crosshair.setTemporaryDisabled(!0);const{layout:a}=this.sortedItems[t];r(a.granularity),i(a.chartType),this.restoreLayout((0,c.o8)(a)),(0,h.$s)(h.dq.ChartControl,h.Cw.Template,"Load Template")}async restoreLayout(t){this.loader&&this.loader.show(),this.mainStore.chartAdapter.msPerPx=t.msPerPx,this.mainStore.state.setChartIsReady(!1),void 0!==t.chartType&&this.mainStore.chartType.setChartType(t.chartType),this.menuStore.setOpen(!1),await(0,s.when)(()=>this.mainStore.chartAdapter.isChartLoaded),this.mainStore.studies.restoreStudies(t.studyItems||[]),(()=>{this.loader&&(this.loader.hide(),this.mainStore.paginationLoader.updateOnPagination(!1)),this.mainStore.state.setChartIsReady(!0),void 0!==t.granularity&&this.mainStore.timeperiod.setGranularity(t.granularity)})()}onToggleNew(){this.updateRoute("main")}inputRef(t){t&&(t.focus(),this.isInputActive=!0)}onFocus(){this.isInputActive=!0}onBlur(){this.isInputActive=!1}}function Ot(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Pt="is_crosshair_enabled";const Lt=class{constructor(t){Ot(this,"mainStore",void 0),Ot(this,"isEnabled",!0),Ot(this,"isTemporarilyDisabled",!1),Ot(this,"shouldPersist",!0),Ot(this,"updateEnabledState",t=>{this.isEnabled=t,this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive);try{this.shouldPersist&&"undefined"!=typeof window&&window.localStorage&&localStorage.setItem(Pt,t.toString())}catch{}this.stateChange(l.c4.CROSSHAIR_CLICK,{cta_name:t?"enable":"disable"})}),Ot(this,"setTemporaryDisabled",t=>{this.isTemporarilyDisabled=t,this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive)}),Ot(this,"setInitialEnabledState",t=>{this.shouldPersist=!1,this.isEnabled=t,this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive)}),Ot(this,"stateChange",(t,e={})=>{this.mainStore.state.stateChange(t,e)}),(0,s.makeObservable)(this,{isEnabled:s.observable,isTemporarilyDisabled:s.observable,isFunctionallyActive:s.computed}),this.mainStore=t;try{if("undefined"!=typeof window&&window.localStorage){const t=localStorage.getItem(Pt);null!==t&&(this.isEnabled="true"===t)}}catch{}(0,s.when)(()=>this.mainStore.chartAdapter.isChartLoaded,()=>{this.mainStore.chartAdapter.flutterChart?.config.updateCrosshairVisibility(this.isFunctionallyActive)})}get isFunctionallyActive(){return this.isEnabled&&!this.isTemporarilyDisabled}};function Mt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Rt{constructor(t){Mt(this,"mainStore",void 0),Mt(this,"menuStore",void 0),Mt(this,"screenshotArea",void 0),Mt(this,"isLoadingPNG",!1),Mt(this,"onContextReady",()=>{this.screenshotArea=(this.context?.topNode).querySelector(".ciq-chart")}),(0,s.makeObservable)(this,{timeUnit:s.computed,timeperiodDisplay:s.computed,marketDisplayName:s.computed,decimalPlaces:s.computed,isLoadingPNG:s.observable,downloadPNG:s.action.bound,_onCanvasReady:s.action.bound,downloadCSV:s.action.bound}),this.mainStore=t,this.menuStore=new _(t,{route:"download"}),(0,s.when)(()=>!!this.context,this.onContextReady)}get context(){return this.mainStore.chart.context}get timeUnit(){return this.mainStore.timeperiod.timeUnit}get timeperiodDisplay(){return this.mainStore.timeperiod.display}get marketDisplayName(){return this.mainStore.chart.currentActiveSymbol?.name}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places}createNewTab(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)?window.open():null}downloadPNG(){this.isLoadingPNG=!0;const t=this.createNewTab();r.e(526).then(r.t.bind(r,2939,23)).then(e=>{this.screenshotArea?.classList.add("ciq-chart--screenshot");const r=[],i=[];(this.screenshotArea?.querySelectorAll("svg")||[]).forEach(t=>{const e=t.parentNode,a=document.createElement("canvas");a.width=Number(getComputedStyle(t).width.match(/[0-9]+/)),a.height=Number(getComputedStyle(t).height.match(/[0-9]+/));const s=a.getContext("2d"),n=getComputedStyle(t).fill;if(n){const e=n.split(",").map(t=>Number(t.replace(/\D+/g,"")).toString(16).padStart(2,"0")).join("");s&&e>"333333"&&(s.fillStyle=getComputedStyle(t).fill,s.fillRect(0,0,a.width,a.height),s.globalCompositeOperation="destination-in")}const o=new Image;o.src=t.querySelector("use")?.getAttribute?.("xlink:href")||"",o.onload=()=>{s&&s.drawImage(o,0,0),c.SN.Firefox()||c.SN.Safari()||(r.push({parent:e,child:t}),e?.removeChild(t),i.push({parent:e,child:a}),e?.appendChild(a))}}),setTimeout(()=>{e.default(this.screenshotArea).then(e=>{this._onCanvasReady(e,t),c.SN.Firefox()||c.SN.Safari()||(i.forEach(t=>{t?.parent?.contains(t.child)&&t.child instanceof HTMLCanvasElement&&t.parent?.removeChild?.(t.child)}),r.forEach(t=>{t.parent?.appendChild(t.child)}))})},100)}),(0,h.$s)(h.dq.ChartControl,h.Cw.Download,"Download PNG")}_onCanvasReady(t,e){const r=t.toDataURL("image/png");(0,c.SS)(`${(new Date).toUTCString()}.png`,r,"image/png;",e),this.isLoadingPNG=!1,this.screenshotArea?.classList.remove("ciq-chart--screenshot")}downloadCSV(){const t="tick"===this.timeUnit,e=[`Date,Time,${t?this.marketDisplayName:"Open,High,Low,Close"}`],r=this.mainStore.chart.feed?.quotes||[],i=r.length;(i<=100?r:r.slice(i-100,i)).forEach(({DT:r,Open:i,High:a,Low:s,Close:n})=>{if(!r)return;const o=r.getFullYear(),l=r.getMonth()+1,c=r.getDate(),h=r.getHours(),u=r.getMinutes(),d=r.getSeconds(),g=`${o}-${l>9?l:`0${l}`}-${c>9?c:`0${c}`}`,m=`${h>9?h:`0${h}`}:${u>9?u:`0${u}`}${t?d>9?`:${d}`:`:0${d}`:""}`;t&&n&&e.push(`${g},${m},${n}`),!t&&i&&a&&s&&n&&e.push([g,m,i.toFixed(this.decimalPlaces),a.toFixed(this.decimalPlaces),s.toFixed(this.decimalPlaces),n.toFixed(this.decimalPlaces)].join(","))}),(0,c.SS)(`${this.marketDisplayName} (${this.timeperiodDisplay}).csv`,e.join("\n"),"text/csv;charset=utf-8;",this.createNewTab()),(0,h.$s)(h.dq.ChartControl,h.Cw.Download,"Download CSV")}}var Bt=r(9160).t;function Ft(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Vt{constructor(t){Ft(this,"mainStore",void 0),Ft(this,"menuStore",void 0),Ft(this,"language",""),Ft(this,"position","bottom"),Ft(this,"theme","light"),Ft(this,"countdown",!1),Ft(this,"historical",!1),Ft(this,"isAutoScale",!0),Ft(this,"isHighestLowestMarkerEnabled",!0),Ft(this,"isSmoothChartEnabled",!0),Ft(this,"minimumLeftBars",void 0),Ft(this,"whitespace",void 0),Ft(this,"languages",[]),Ft(this,"defaultLanguage",{}),Ft(this,"onSettingsChange",void 0),(0,s.makeObservable)(this,{language:s.observable,position:s.observable,theme:s.observable,countdown:s.observable,historical:s.observable,isAutoScale:s.observable,isHighestLowestMarkerEnabled:s.observable,isSmoothChartEnabled:s.observable,minimumLeftBars:s.observable,updateActiveLanguage:s.action.bound,setLanguage:s.action.bound,setTheme:s.action.bound,setPosition:s.action.bound,showCountdown:s.action.bound,setHistorical:s.action.bound,setAutoScale:s.action.bound,setWhiteSpace:s.action.bound,toggleHighestLowestMarker:s.action.bound,toggleSmoothChart:s.action.bound,whitespace:s.observable}),this.defaultLanguage=this.languages[0],this.mainStore=t,this.menuStore=new _(t,{route:"setting"});const e=localStorage.getItem("is_smooth_chart_enabled");null!==e&&(this.isSmoothChartEnabled="true"===e),(0,s.reaction)(()=>this?.language?.key,()=>{t?.chart?.changeSymbol?.(t.state.symbol,t.state.granularity,!0)}),(0,s.when)(()=>!!this.context,()=>{this.setSettings(t.state.settings)})}get context(){return this.mainStore.chart.context}setSettings(t){if(void 0===t)return;const{countdown:e,historical:r,language:i,minimumLeftBars:a,position:s,isAutoScale:n,isHighestLowestMarkerEnabled:o,isSmoothChartEnabled:c,theme:h,activeLanguages:u,whitespace:d}=t;!u&&l.AT.every(t=>this.languages.find(e=>e.key===t.key))||u&&this.languages.length===u.length&&this.languages.every(t=>-1!==u.indexOf(t.key.toUpperCase()))||this.updateActiveLanguage(u),void 0!==h&&this.setTheme(h),void 0!==s&&this.setPosition(s),void 0!==e&&this.showCountdown(e),void 0!==i&&this.setLanguage(i),this.setMinimumLeftBars(a),void 0!==r&&this.setHistorical(r),void 0!==n&&this.setAutoScale(n),void 0!==o&&this.toggleHighestLowestMarker(o),void 0!==c&&this.toggleSmoothChart(c),this.setWhiteSpace(d)}saveSetting(){this.onSettingsChange&&this.language&&this.onSettingsChange({countdown:this.countdown,historical:this.historical,language:this.language?.key,position:this.position,isAutoScale:this.isAutoScale,isHighestLowestMarkerEnabled:this.isHighestLowestMarkerEnabled,isSmoothChartEnabled:this.isSmoothChartEnabled,minimumLeftBars:this.minimumLeftBars,theme:this.theme,whitespace:this.whitespace})}updateActiveLanguage(t){this.languages=t?t.map(t=>l.AT.find(e=>e.key.toUpperCase()===t)||"").filter(t=>t):l.AT,this.defaultLanguage=this.languages[0],(this.language&&!this.languages.find(t=>t.key===this.language?.key)||!this.language)&&this.setLanguage(this.languages[0].key)}setLanguage(t){if(!this.languages.length)return;const e=t.toLowerCase();if(this.language&&e===this.language.key)return;this.language=this.languages.find(t=>t.key===e)||this.defaultLanguage;const r=this.language.key;Bt.setLanguage(r,()=>{this?.mainStore?.loader?.hide?.()}),(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,`Change language to ${r}`),r!==localStorage.getItem("current_chart_lang")&&localStorage.setItem("current_chart_lang",r),r!==this.mainStore.chart.currentLanguage&&(this.mainStore.chart.currentLanguage=r,this.mainStore.state.saveLayout(),setTimeout(()=>{const t=this.mainStore.chart.currentActiveSymbol?.symbol;t&&window.flutterChart?.app.newChart({symbol:t,granularity:this.mainStore.chartAdapter.getGranularityInMs(),chartType:this.mainStore.state.chartType,isLive:this.mainStore.chart.isLive||!1,startWithDataFitMode:this.mainStore.chartAdapter.isDataFitModeEnabled,theme:this.theme,msPerPx:this.mainStore.chartAdapter.msPerPx,pipSize:this.mainStore.chart.pip,isMobile:this.mainStore.chart.isMobile||!1,isSmoothChartEnabled:this.isSmoothChartEnabled,yAxisMargin:this.mainStore.state.yAxisMargin})},100)),this.saveSetting()}setTheme(t){this.theme!==t&&(this.theme=t,this.mainStore.drawTools.updateTheme(),this.mainStore.chartAdapter.updateTheme(t),this.context&&this.mainStore.state.setChartTheme(t),this.mainStore.studies.updateTheme(),(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,`Change theme to ${t}`),this.saveSetting())}setPosition(t){this.position!==t&&(this.position=t,(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,"Change Position"),this.saveSetting(),setTimeout(()=>{this.mainStore.chart.resizeScreen()},10),this.menuStore.setOpen(!1))}showCountdown(t){this.countdown!==t&&(this.mainStore.chartAdapter.setShowInterval(t),this.countdown=t,(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,(t?"Show":"Hide")+" Countdown"),this.saveSetting())}setHistorical(t){this.historical!==t&&(this.historical=t,this.isHighestLowestMarkerEnabled=!t,this.saveSetting(),setTimeout(()=>{this.mainStore.chart.resizeScreen()},10))}setAutoScale(t){this.isAutoScale!==t&&(this.isAutoScale=t,(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,` Change AutoScale to ${t}`),this.saveSetting())}setMinimumLeftBars(t){this.minimumLeftBars!==t&&(this.minimumLeftBars=t,(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,` Change MinimumLeftBars to ${t}`),this.saveSetting())}setWhiteSpace(t){this.whitespace!==t&&(this.whitespace=t,(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,` Change Whitespace to ${t}`),this.saveSetting())}toggleHighestLowestMarker(t){this.isHighestLowestMarkerEnabled!==t&&(this.isHighestLowestMarkerEnabled=t,(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,` ${t?"Show":"Hide"} HighestLowestMarker.`),this.saveSetting())}toggleSmoothChart(t){if(this.isSmoothChartEnabled===t)return;this.isSmoothChartEnabled=t,localStorage.setItem("is_smooth_chart_enabled",t.toString()),(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSetting,` ${t?"Enable":"Disable"} Smooth Chart.`);const e=this.mainStore.chartType.type,r=this.mainStore.state;this.mainStore.state.stateChange(l.c4.CHART_SWITCH_TOGGLE,{enable_smooth_chart:t?"enable":"disable",chart_type_name:"colored_bar"===e.id?e.text:e.text.toLowerCase(),time_interval_name:(0,c.mI)(r.granularity,l.NI)}),this.saveSetting(),this.mainStore.chart.refreshChart()}}var Ht=r(9160).t;function qt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class $t{constructor(){qt(this,"isActive",!1),qt(this,"currentState",!1),qt(this,"states",{}),(0,s.makeObservable)(this,{isActive:s.observable,currentState:s.observable,setState:s.action.bound,show:s.action.bound,hide:s.action.bound}),this.states={"chart-engine":Ht.translate("Retrieving Chart Engine..."),"market-symbol":Ht.translate("Retrieving Market Symbols..."),"trading-time":Ht.translate("Retrieving Trading Times..."),"chart-data":Ht.translate("Retrieving Chart Data...")}}setState(t){this.states[t]?this.currentState=this.states[t]:console.error("Wrong state requested!")}show(){this.isActive=!0}hide(){this.isActive=!1}}var Ut=r(4916);function zt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Gt{constructor(t){zt(this,"mainStore",void 0),(0,s.makeObservable)(this,{updateChartState:s.action.bound,zoomIn:s.action.bound,zoomOut:s.action.bound}),this.mainStore=t}get state(){return this.mainStore.state}updateChartState(){this.mainStore.chart.updateScaledOneOne(!1)}zoomIn(){(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSize,"zoom In"),this.mainStore.chartAdapter.scale(1.25)}zoomOut(){(0,h.$s)(h.dq.ChartControl,h.Cw.ChartSize,"zoom Out"),this.mainStore.chartAdapter.scale(.75)}}function Wt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Kt=[];class Qt{constructor(t){Wt(this,"mainStore",void 0),(0,s.makeObservable)(this,{handleRouting:s.action.bound,updateRoute:s.action.bound,registerDialog:s.action.bound,closeAll:s.action.bound}),this.mainStore=t}handleRouting(){window.addEventListener("hashchange",()=>{""===window.history.state.urlPath.replace("#","")&&this.closeAll()},!1)}updateRoute(t,e){const r=this.mainStore.chart.enableRouting;r&&e&&t?(window.history.replaceState({urlPath:"#"},"","#"),window.history.pushState({urlPath:`#${t}`},"",`#${t}`)):r&&!e&&t&&window.history.replaceState({urlPath:"#"},"","#")}registerDialog(t){Kt.push(t)}closeAll(){Kt.forEach(t=>t.setOpen(!1))}}const Yt=(t,e)=>typeof t==typeof e&&(Array.isArray(t)?Xt(t,e):t&&e&&"object"==typeof t?Zt(t,e):!("number"!=typeof t||"number"!=typeof e||!Number.isNaN(t)||!Number.isNaN(e))||t===e),Xt=(t,e)=>t===e||t.length===e.length&&t.every((t,r)=>Yt(t,e[r])),Zt=(t,e)=>t===e||Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>Yt(t[r],e[r]));var Jt=r(2592),te=r.n(Jt);function ee(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}let re=null;const ie=async()=>(re||(re=await r.e(937).then(r.t.bind(r,5581,23))),re);const ae=class{get context(){return this.chartStore.context}get chartTypeStore(){return this.mainStore.chartType}get timeperiodStore(){return this.mainStore.timeperiod}get loader(){return this.mainStore.loader}get rootElement(){return this.chartStore.rootElement}constructor(t){ee(this,"chartStore",void 0),ee(this,"getIndicatorHeightRatio",void 0),ee(this,"shouldDrawTicksFromContractInfo",!1),ee(this,"has_updated_settings",!1),ee(this,"isAnimationEnabled",void 0),ee(this,"isVerticalScrollEnabled",!0),ee(this,"mainStore",void 0),ee(this,"margin",void 0),ee(this,"granularity",void 0),ee(this,"chartType",void 0),ee(this,"startEpoch",void 0),ee(this,"endEpoch",void 0),ee(this,"symbol",void 0),ee(this,"heightFactor",void 0),ee(this,"isConnectionOpened",!1),ee(this,"isChartReady",!1),ee(this,"chartStatusListener",void 0),ee(this,"stateChangeListener",void 0),ee(this,"settings",void 0),ee(this,"showLastDigitStats",!1),ee(this,"scrollToEpoch",void 0),ee(this,"clearChart",void 0),ee(this,"isChartClosed",!1),ee(this,"shouldMinimiseLastDigits",!1),ee(this,"allowTickChartTypeOnly",void 0),ee(this,"isStaticChart",!1),ee(this,"shouldFetchTradingTimes",!0),ee(this,"shouldGetQuotes",!0),ee(this,"allTicks",[]),ee(this,"contractInfo",{}),ee(this,"refreshActiveSymbols",void 0),ee(this,"hasReachedEndOfData",!1),ee(this,"prevChartType",void 0),ee(this,"isChartScrollingToEpoch",!1),ee(this,"maxTick",void 0),ee(this,"enableScroll",!0),ee(this,"enableZoom",!0),ee(this,"yAxisMargin",{top:106,bottom:64}),ee(this,"tradingTimes",null),ee(this,"activeSymbols",null),ee(this,"masterData",null),ee(this,"getQuotes",void 0),ee(this,"chartControlsWidgets",void 0),ee(this,"enabledChartFooter",void 0),ee(this,"onContextReady",()=>{this.granularity=this.chartStore.granularity}),ee(this,"debouncedStateChange",(0,d.s)((t,e)=>{this.stateChange(t,e)},500)),(0,s.makeObservable)(this,{granularity:s.observable,chartType:s.observable,startEpoch:s.observable,endEpoch:s.observable,symbol:s.observable,has_updated_settings:s.observable,heightFactor:s.observable,isConnectionOpened:s.observable,isChartReady:s.observable,isVerticalScrollEnabled:s.observable,chartStatusListener:s.observable,debouncedStateChange:s.action.bound,stateChangeListener:s.observable,settings:s.observable,showLastDigitStats:s.observable,allowTickChartTypeOnly:s.observable,scrollToEpoch:s.observable,clearChart:s.observable,isChartClosed:s.observable,shouldMinimiseLastDigits:s.observable,isStaticChart:s.observable,shouldFetchTradingTimes:s.observable,shouldGetQuotes:s.observable,allTicks:s.observable,contractInfo:s.observable,refreshActiveSymbols:s.observable,shouldDrawTicksFromContractInfo:s.observable,hasReachedEndOfData:s.observable,prevChartType:s.observable,isChartScrollingToEpoch:s.observable,maxTick:s.observable,enableScroll:s.observable,enableZoom:s.observable,yAxisMargin:s.observable,updateProps:s.action.bound,setChartIsReady:s.action.bound,setChartClosed:s.action.bound}),this.mainStore=t,this.chartStore=t.chart,(0,s.when)(()=>!!this.context,this.onContextReady),window.addEventListener("beforeunload",()=>{this.saveLayout()}),(0,s.reaction)(()=>this.allowTickChartTypeOnly,t=>{t&&(this.mainStore.studies.savePredictionStudies(),this.mainStore.studies.deletePredictionStudies())})}updateProps({networkStatus:t,chartControlsWidgets:e,enabledChartFooter:r,chartStatusListener:i,shouldDrawTicksFromContractInfo:a,stateChangeListener:s,getIndicatorHeightRatio:n,chartType:o,clearChart:h,endEpoch:u,isAnimationEnabled:d=!0,isConnectionOpened:g,isStaticChart:m,isVerticalScrollEnabled:p=!0,granularity:f,margin:_=0,refreshActiveSymbols:b,scrollToEpoch:v,settings:y,shouldFetchTradingTimes:S=!0,shouldGetQuotes:x=!0,should_zoom_out_on_yaxis:w,allTicks:C=[],contractInfo:T={},showLastDigitStats:k=!1,allowTickChartTypeOnly:j=!1,startEpoch:N,symbol:E,zoom:A,maxTick:I,yAxisMargin:D,enableScroll:O=null,enableZoom:P=null,anchorChartToLeft:L=!1,chartData:M,isLive:B,startWithDataFitMode:F,leftMargin:V,drawingToolFloatingMenuPosition:H}){let q=!1,U=!1;if(M?.tradingTimes&&"object"==typeof M.tradingTimes&&JSON.stringify(M.tradingTimes)!==this.tradingTimes&&(this.mainStore.chart.tradingTimes?._calculatingTradingTime(M.tradingTimes),this.tradingTimes=JSON.stringify(M.tradingTimes)),M?.activeSymbols&&"object"==typeof M.activeSymbols&&JSON.stringify(M.activeSymbols)!==this.activeSymbols&&(this.activeSymbols=JSON.stringify(M.activeSymbols),this.mainStore.chart.processedSymbols&&M?.activeSymbols)){this.mainStore.chart.processedSymbols=R(M.activeSymbols),this.mainStore.chart.categorizedSymbols=$(this.mainStore.chart.processedSymbols),this.mainStore.chart.symbolMap={};for(const t of this.mainStore.chart.processedSymbols)this.mainStore.chart.symbolMap[t.symbol]=t}M?.masterData&&Array.isArray(M.masterData)&&JSON.stringify(M.masterData)!==this.masterData&&(this.masterData=JSON.stringify(M.masterData),this.mainStore.chart.feed&&(this.mainStore.chart.feed.updateQuotes(M.masterData,!1),this.shouldGetQuotes=!1)),this.chartStatusListener=i,this.stateChangeListener=s,this.isAnimationEnabled=d,this.isConnectionOpened=g,this.isStaticChart=m,this.isVerticalScrollEnabled=p,this.margin=_,this.has_updated_settings=!Yt(this.settings?.whitespace,y?.whitespace),this.settings=y,this.shouldFetchTradingTimes=S,this.shouldGetQuotes=x,this.allowTickChartTypeOnly=j,this.allTicks=C,this.contractInfo=T,this.showLastDigitStats=k,this.getIndicatorHeightRatio=n;const z=this.mainStore.chart.feed;if(a&&z&&T.tick_stream&&(this.shouldDrawTicksFromContractInfo=a,z.appendChartDataFromPOCResponse.call(z,T)),!t||this.mainStore.chart.networkStatus&&t.class===this.mainStore.chart.networkStatus.class||(this.mainStore.chart.networkStatus=t),e!==this.chartControlsWidgets&&(this.chartControlsWidgets=e),r!==this.enabledChartFooter&&(this.enabledChartFooter=r),E!==this.symbol&&(this.symbol=E,q=!0,M?.tradingTimes&&"object"==typeof M.tradingTimes&&(this.mainStore.chart.tradingTimes?._calculatingTradingTime(M.tradingTimes),this.tradingTimes=JSON.stringify(M.tradingTimes)),this.mainStore.chartTitle.hidePrice()),o&&o!==this.chartType&&("table"===o&&(this.prevChartType=this.chartTypeStore.type.id),this.setChartType(o)),void 0!==f&&f!==this.granularity&&(this.setChartGranularity(f),U=!0),b!==this.refreshActiveSymbols&&(this.refreshActiveSymbols=b,this.refreshActiveSymbols&&M?.activeSymbols)){const t=R(M.activeSymbols);this.mainStore.chart.processedSymbols=t,this.mainStore.chart.categorizedSymbols=$(t),this.mainStore.chart.symbolMap={};for(const e of t)this.mainStore.chart.symbolMap[e.symbol]=e}if(h!==this.clearChart&&(this.clearChart=h,this.cleanChart()),this.startEpoch===N&&this.endEpoch===u||(this.startEpoch=N,this.endEpoch=u,m&&this.granularity===this.mainStore.chart.granularity?this.mainStore.chart.newChart():this.mainStore.chart.feed&&(this.scrollToEpoch||q||U||this.mainStore.chart.feed.onRangeChanged())),m||v===this.scrollToEpoch||(this.scrollToEpoch=v,this.mainStore.chart&&this.mainStore.chart.feed&&!q&&!U&&(this.setIsChartScrollingToEpoch(!0),L?setTimeout(()=>this.stateChange(l.c4.SCROLL_TO_LEFT),900):this.stateChange(l.c4.SCROLL_TO_LEFT))),A&&(1===A?this.mainStore.chartSize.zoomIn():this.mainStore.chartSize.zoomOut()),this.mainStore.chartSetting.setSettings(this.settings),I&&this.maxTick!==I&&(this.maxTick=I),D&&"object"==typeof D&&(this.yAxisMargin={...this.yAxisMargin,...D}),w){const{height_factor:t,yaxis_margin:e}=(0,c._z)({is_contract_chart:a,is_mobile:this.mainStore.chart.isMobile,ticks_length:this.mainStore.chart.feed?.quotes.length,yaxis_height:this.mainStore.chart.chartContainerHeight});this.yAxisMargin={...this.yAxisMargin,...e},this.heightFactor=t}null!==O&&this.enableScroll!==O&&(this.enableScroll=O),null!==P&&this.enableZoom!==P&&(this.enableZoom=P),null!=B&&this.mainStore.chart.isLive!==B&&(this.mainStore.chart.isLive=B,this.mainStore.chartAdapter.updateLiveStatus(B)),null!=F&&this.mainStore.chart.startWithDataFitMode!==F&&(this.mainStore.chart.startWithDataFitMode=F),this.mainStore.chart.leftMargin!==V&&(this.mainStore.chart.leftMargin=V,this.mainStore.chartAdapter.updateLeftMargin(V)),this.mainStore.drawTools.updateProps({drawingToolFloatingMenuPosition:H})}setIsChartScrollingToEpoch(t){this.isChartScrollingToEpoch=t}setChartClosed(t){this.isChartClosed=t,this.stateChange(l.c4.MARKET_STATE_CHANGE,{symbol:this.symbol,isClosed:t})}setChartTheme(t){this.rootElement&&((this.rootElement?.querySelector(".chartContainer")).style.backgroundColor=te()[`${t}_chart_bg`])}stateChange(t,e){this.stateChangeListener&&"function"==typeof this.stateChangeListener&&this.stateChangeListener(t,e)}setChartIsReady(t){this.isChartReady!==t&&(this.isChartReady=t,t&&(this.chartStore.setResizeEvent(),this.stateChange(l.c4.READY)),this.chartStatusListener&&"function"==typeof this.chartStatusListener&&this.chartStatusListener(t))}setChartGranularity(t){const e="second"===(0,c.pg)(t).timeUnit,r=this.mainStore.chartType.isCandle||this.chartType&&this.mainStore.chartType.isTypeCandle(this.chartType);this.mainStore.chartAdapter.setMsPerPx(void 0),this.context&&e&&r&&this.setChartType("line"),this.granularity=null===t?void 0:t}setChartType(t){this.chartType=t,this.chartType&&this.mainStore.chartAdapter.updateChartStyle(this.chartType),this.chartTypeStore.onChartTypeChanged&&this.chartTypeStore.onChartTypeChanged(t)}setShouldMinimiseLastDigit(t){this.shouldMinimiseLastDigits=t}async saveLayout(){if(!this.chartStore.chartId)return;const t=this.mainStore.view.getLayout(),e=this.mainStore.chart.chartId,r=(await ie()).compress(JSON.stringify({studyItems:t.studyItems,msPerPx:t.msPerPx}));(0,c.lk)(`chart-layout-${e}`,r)}async restoreLayout(){const t=this.mainStore.chart.chartId,e=(0,c.s0)(`chart-layout-${t}`);let r=null;try{const t=await ie();r=JSON.parse(t.decompress(e??"")||"")}catch(t){r=e}return r?(this.mainStore.view.restoreLayout(r),!0):(this.clearLayout(),!1)}clearLayout(){window.flutterChart?.indicators.clearIndicators(),window.flutterChart?.drawingTool.clearDrawingTool()}async saveDrawings(){if(!this.chartStore.chartId)return;const t=this.mainStore.view.getLayout(),e=this.mainStore.chart.chartId,r=(await ie()).compress(JSON.stringify({studyItems:t.studyItems,msPerPx:t.msPerPx}));(0,c.lk)(`chart-layout-${e}`,r)}cleanChart(){this.clearChart&&this.isChartReady&&this.mainStore.studies.deleteAllStudies()}};var se=r(9160).t;function ne(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class oe{constructor(){ne(this,"onMessage",void 0)}static get CATEGORY_ACTIVE_SYMBOL(){return"activesymbol"}notify(t){this.onMessage&&this.onMessage({type:"warning",...t})}notifyMarketOpen(t){this.notify({text:se.translate("[symbol] market is now opened.",{symbol:t}),type:"info",category:oe.CATEGORY_ACTIVE_SYMBOL})}notifyMarketClose(t){this.notify({text:se.translate("[symbol] market is presently closed.",{symbol:t}),category:oe.CATEGORY_ACTIVE_SYMBOL})}notifyDelayedMarket(t,e){this.notify({text:se.translate("[symbol] feed is delayed by [delay] minutes",{symbol:t,delay:e}),category:oe.CATEGORY_ACTIVE_SYMBOL})}notifyFeedUnavailable(t){this.notify({text:se.translate("Streaming for [symbol] is not available due to license restrictions",{symbol:t}),type:"error",category:oe.CATEGORY_ACTIVE_SYMBOL})}}const le=oe;function ce(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class he{constructor(t){ce(this,"mainStore",void 0),ce(this,"bars",[]),ce(this,"lastTick",null),ce(this,"count",1e3),ce(this,"digits",[]),ce(this,"latestData",[]),ce(this,"lastSymbol",""),(0,s.makeObservable)(this,{bars:s.observable,lastTick:s.observable,decimalPlaces:s.computed,isVisible:s.computed,marketDisplayName:s.computed,shouldMinimiseLastDigits:s.computed,updateLastDigitStats:s.action.bound,onMasterDataUpdate:s.action.bound,updateBars:s.action.bound}),this.mainStore=t,(0,s.when)(()=>!!this.context,()=>{this.lastSymbol=this.marketDisplayName,this.mainStore.chart.feed?.onMasterDataUpdate(this.onMasterDataUpdate),this.mainStore.chart.feed?.onMasterDataReinitialize(()=>{this.context&&this.mainStore.chart.feed&&(this.mainStore.chart.feed.offMasterDataUpdate(this.onMasterDataUpdate),this.mainStore.chart.feed.onMasterDataUpdate(this.onMasterDataUpdate))})})}get context(){return this.mainStore.chart.context}get api(){return this.mainStore.chart.api}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places||2}get isVisible(){return this.mainStore.state.showLastDigitStats}get marketDisplayName(){return this.mainStore.chart.currentActiveSymbol?this.mainStore.chart.currentActiveSymbol.name:""}get shouldMinimiseLastDigits(){return this.mainStore.state.shouldMinimiseLastDigits}async updateLastDigitStats(t){if(!this.context||!this.mainStore.chart.currentActiveSymbol)return;this.digits=[],this.bars=[],this.latestData=[];for(let t=0;t<10;t++)this.digits.push(0),this.bars.push({height:0,cName:""});const e=t||await(this.api?.getQuotes({symbol:this.mainStore.chart.currentActiveSymbol.symbol,count:this.count}));this.latestData=e?.history?.prices?e.history.prices:[],this.context&&this.mainStore.chart.currentActiveSymbol&&(this.latestData.forEach(t=>{const e=(+t).toFixed(this.decimalPlaces).slice(-1);this.digits[+e]++}),this.updateBars())}onMasterDataUpdate({Close:t,tick:e}){if(this.context&&this.mainStore.chart.currentActiveSymbol&&this.mainStore.lastDigitStats.isVisible)if(this.lastTick=e,this.marketDisplayName!==this.lastSymbol)this.lastSymbol=this.marketDisplayName,this.updateLastDigitStats();else if(this.latestData.length){const e=(+this.latestData.shift()).toFixed(this.decimalPlaces).slice(-1),r=(+t).toFixed(this.decimalPlaces),i=r.slice(-1);this.latestData.push(+r),this.digits[+i]++,this.digits[+e]--,this.updateBars()}}updateBars(){const t=Math.min(...this.digits),e=Math.max(...this.digits);this.digits.forEach((r,i)=>{this.bars[i].height=100*r/this.count,this.bars[i].cName=r===t?"min":r===e?"max":""}),this.bars=this.bars.slice(0)}}function ue(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class de{get chart(){return this.mainStore.chart}get stateStore(){return this.mainStore.state}get crosshairStore(){return this.mainStore.crosshair}constructor(t){ue(this,"mainStore",void 0),ue(this,"mouse_in",!1),(0,s.makeObservable)(this,{mouse_in:s.observable,enableScale:s.computed,onMouseEnter:s.action.bound,onMouseLeave:s.action.bound}),this.mainStore=t}get enableScale(){return this.stateStore.startEpoch}onMouseEnter(){this.mouse_in=!0,this.crosshairStore.setTemporaryDisabled(!0)}onMouseLeave(){this.mouse_in=!1,this.crosshairStore.setTemporaryDisabled(!1)}}function ge(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const me=class{get feed(){return this.mainStore.chart.feed}get context(){return this.mainStore.chart.context}get isHighestLowestMarkerEnabled(){return this.mainStore.chartSetting.isHighestLowestMarkerEnabled}get decimalPlaces(){return this.mainStore.chart.currentActiveSymbol?.decimal_places||2}constructor(t){ge(this,"highestRef",null),ge(this,"lowestRef",null),ge(this,"mainStore",void 0),ge(this,"highest",null),ge(this,"lowest",null),ge(this,"setHighestRef",t=>{this.highestRef=t,null!==this.highestRef&&null!==t&&(this.highestRef.value=t.div.querySelector(".spot__value"))}),ge(this,"setLowestRef",t=>{this.lowestRef=t,null!=this.lowestRef&&null!==t&&(this.lowestRef.value=t.div.querySelector(".spot__value"))}),ge(this,"calculateHighestLowestByNewData",()=>{if(!this.highestRef||!this.lowestRef)return;const t=this.mainStore.chart.feed?.quotes;if(t&&t.length&&(this.highest=null,this.lowest=null,t.forEach(t=>{t&&((!this.highest||this.highest.Close<=t.Close)&&(this.highest=t),(!this.lowest||this.lowest.Close>=t.Close)&&(this.lowest=t))})),!this.highest||!this.lowest||this.highest.Close===this.lowest.Close)return this.highestRef.setPosition({epoch:null,price:null}),void this.lowestRef.setPosition({epoch:null,price:null});if(this.highest){const t=this.highest.Close.toFixed(this.decimalPlaces);this.highestRef.setPosition({epoch:(0,c.YN)((0,G.E)(this.highest.Date)),price:+t}),this.highestRef.value.textContent=t}if(this.lowest){const t=this.lowest.Close.toFixed(this.decimalPlaces);this.lowestRef.setPosition({epoch:(0,c.YN)((0,G.E)(this.lowest.Date)),price:+t}),this.lowestRef.value.textContent=t}}),this.mainStore=t}};function pe(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const fe=class{get feed(){return this.mainStore.chart.feed}get context(){return this.mainStore.chart.context}constructor(t){pe(this,"mainStore",void 0),pe(this,"ref",null),pe(this,"isOnPagination",!1),pe(this,"paginationEndEpoch",null),pe(this,"onContextReady",()=>{this.feed?.onStartPagination(this.setOnPagination),this.feed?.onPagination(this.setOnPagination)}),pe(this,"setRef",t=>{this.ref=t,null!==this.ref&&this.ref.setPosition({epoch:this.paginationEndEpoch,price:0})}),pe(this,"setOnPagination",({end:t})=>{this.isOnPagination=!this.isOnPagination,this.paginationEndEpoch=this.isOnPagination?t:null,this.ref&&this.ref.setPosition({epoch:this.paginationEndEpoch,price:0})}),(0,s.makeObservable)(this,{isOnPagination:s.observable,updateOnPagination:s.action.bound,setOnPagination:s.action.bound}),this.mainStore=t,(0,s.when)(()=>!!this.context,this.onContextReady)}updateOnPagination(t){this.isOnPagination=t}};function _e(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class be{get crosshairStore(){return this.mainStore.crosshair}get chartStore(){return this.mainStore.chart}constructor(t){_e(this,"mainStore",void 0),(0,s.makeObservable)(this,{onMouseEnter:s.action.bound,onMouseLeave:s.action.bound}),this.mainStore=t,(0,s.reaction)(()=>[this.mainStore.chartMode.menuStore.open,this.mainStore.drawTools.menuStore.open,this.mainStore.studies.menuStore.open,this.mainStore.share.menuStore.open,this.mainStore.view.menuStore.open],()=>{this.mainStore.chartMode.menuStore.open||this.mainStore.drawTools.menuStore.open||this.mainStore.studies.menuStore.open||this.mainStore.share.menuStore.open||this.mainStore.view.menuStore.open||this.onMouseLeave()})}onMouseEnter(){this.crosshairStore.setTemporaryDisabled(!0)}onMouseLeave(){this.crosshairStore.setTemporaryDisabled(!1)}}function ve(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ye{constructor(){ve(this,"isHover",!1),ve(this,"scrollPanel",void 0),(0,s.makeObservable)(this,{isHover:s.observable,scrollPanel:s.observable,handleMouseOver:s.action.bound,handleMouseOut:s.action.bound,setScrollPanel:s.action.bound}),(0,s.reaction)(()=>this.scrollPanel,()=>{this.scrollPanel&&(this.scrollPanel.addEventListener("mouseover",this.handleMouseOver),this.scrollPanel.addEventListener("mouseout",this.handleMouseOut))})}handleMouseOver(){this.isHover||(this.isHover=!0)}handleMouseOut(){this.isHover&&(this.isHover=!1)}setScrollPanel(t){this.scrollPanel||(this.scrollPanel=t)}}const Se=()=>{const t=t=>{t.key&&t.code||t.stopImmediatePropagation()};window.addEventListener("keydown",t,!0),window.addEventListener("keyup",t,!0)},xe=()=>{window._flutter.initState.isMounted&&(window._flutter.appRunner?.runApp(),window._flutter.initState.isInitialRunCompleted=!0)};function we(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Ce{constructor(){we(this,"callbacks",[]),we(this,"_lerpedClose",null),we(this,"onPaint",(t,e)=>{this._lerpedClose=e??null,this.callbacks.forEach(e=>{e(t)})}),we(this,"registerCallback",t=>{this.callbacks.push(t)}),we(this,"unregisterCallback",t=>{const e=this.callbacks.findIndex(e=>e===t);-1!==e&&this.callbacks.splice(e,1)})}get lerpedClose(){return this._lerpedClose}}function Te(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class ke{constructor(t){Te(this,"mainStore",void 0),Te(this,"isChartLoaded",!1),Te(this,"flutterChart",void 0),Te(this,"epochBounds",{leftEpoch:0,rightEpoch:0}),Te(this,"quoteBounds",{topQuote:0,bottomQuote:0}),Te(this,"isFeedLoaded",!1),Te(this,"msPerPx",void 0),Te(this,"isDataFitModeEnabled",!1),Te(this,"isXScrollBlocked",!1),Te(this,"painter",new Ce),Te(this,"drawingColor",0),Te(this,"isScaled",!1),Te(this,"touchValues",{multiTouch:!1,deltaXTotal:0,deltaYTotal:0,touchIds:[],x:0,y:0}),Te(this,"isOverFlutterCharts",!1),Te(this,"clearTouchDeltasTimer",void 0),Te(this,"enableXScrollTimer",void 0),Te(this,"enableYScrollTimer",void 0),Te(this,"checkIndicatorHover",(t,e,r)=>{const i=this.mainStore.chart.feed?.getClosestValidEpoch,a=this.mainStore.chartAdapter.getGranularityInMs(),s=this.flutterChart?.app.getIndicatorHoverIndex(t,e,i,a,r);this.isScaled?this.isScaled=!1:this.mainStore.studies.highlightIndicator(s)}),Te(this,"debouncedIndicatorHover",(0,d.s)(this.checkIndicatorHover,5)),Te(this,"onWheel",t=>{t.preventDefault(),t.stopPropagation();const e=this.mainStore.chart.chartNode;if(e&&!this.mainStore.state.isVerticalScrollEnabled){const r=e.offsetWidth-this.mainStore.chart.yAxisWidth,{left:i}=e.getBoundingClientRect(),a=t.deltaY&&0===t.deltaX;if(t.pageX-i<r&&a){if(this.enableYScrollTimer)return;return e.style.pointerEvents="none",void(this.enableYScrollTimer=setTimeout(()=>{e.style.pointerEvents="auto",this.enableYScrollTimer=void 0},300))}}if(0===t.deltaX&&0===t.deltaZ){const e=(100-Math.min(10,Math.max(-10,t.deltaY)))/100;this.scale(e)}else window.flutterChart?.app.scroll(t.deltaX);return!1}),Te(this,"onMouseMove",t=>{this.isOverFlutterCharts="flt-glass-pane"===t.target?.tagName?.toLowerCase()}),Te(this,"onDoubleClick",()=>{null!=this.mainStore.studies.currentHoverIndex&&(this.mainStore.studies.editStudyByIndex(this.mainStore.studies.currentHoverIndex),this.mainStore.studies.clearHoverItem(this.mainStore.studies.currentHoverIndex))}),Te(this,"newChart",async()=>{this.isFeedLoaded=!1,this.isDataFitModeEnabled=this.mainStore.chart.startWithDataFitMode||!1,await(0,s.when)(()=>this.isChartLoaded),this.flutterChart?.app.newChart({symbol:this.mainStore.chart.currentActiveSymbol?.symbol,granularity:this.getGranularityInMs(),chartType:this.mainStore.state.chartType,isLive:this.mainStore.chart.isLive||!1,startWithDataFitMode:this.isDataFitModeEnabled,theme:this.mainStore.chartSetting.theme,msPerPx:this.msPerPx,pipSize:this.mainStore.chart.pip,isMobile:this.mainStore.chart.isMobile||!1,isSmoothChartEnabled:this.mainStore.chartSetting.isSmoothChartEnabled,yAxisMargin:this.mainStore.state.yAxisMargin})}),Te(this,"toggleXScrollBlock",(t=!0,e)=>{this.isXScrollBlocked=t,e&&(t?(e.style.overflowY="scroll",e.style.overflowX="hidden",e.style.overscrollBehavior="contain",e.style.touchAction="pan-y"):this.allowScroll(e))}),Te(this,"allowScroll",t=>{let e,r=t.scrollTop,i=!1;const a=()=>{t.scrollTop!==r?(i=!0,r=t.scrollTop,clearTimeout(e),e=setTimeout(()=>{this.stopScroll(t)},200)):i=!1,i&&requestAnimationFrame(a)};requestAnimationFrame(a)}),Te(this,"stopScroll",t=>{t.style.removeProperty("overflow-y"),t.style.removeProperty("overflow-x"),t.style.removeProperty("touch-action")}),Te(this,"toggleDataFitMode",()=>{this.isDataFitModeEnabled=!this.isDataFitModeEnabled,window.flutterChart?.app.toggleDataFitMode(this.isDataFitModeEnabled)}),Te(this,"getInterpolatedPositionAndPrice",t=>{if(!t)return;const e=N.utc(t).toDate(),r=this.mainStore.chart.feed?.getClosestQuoteIndexForEpoch(t);let i=this.getXFromEpoch(t);if("number"==typeof r&&r>-1){const t=this.mainStore.chart.feed?.quotes[r];let a,s,n,o=t?t.Close:null;if(t&&t.DT<e){const l=this.mainStore.chart.feed?.quotes[r+1],c=r>0?this.mainStore.chart.feed?.quotes[r-1]:null;l&&l.Close&&l.DT>e?(a=this.getXFromEpoch(l.DT.getTime())-i,n=(e-t.DT.getTime())/(l.DT.getTime()-t.DT.getTime()),o&&(s=l.Close-o)):c&&c.Close&&(a=i-this.getXFromEpoch(c.DT.getTime()),n=(e-t.DT.getTime())/(t.DT.getTime()-c.DT.getTime()),o&&(s=o-c.Close))}return n&&(a&&(i+=n*a),o&&s&&(o+=n*s)),{x:i,price:o}}}),(0,s.makeObservable)(this,{clearTouchDeltasTimer:s.observable,onMount:s.action.bound,onTickHistory:s.action.bound,onTouch:s.action.bound,onChartLoad:s.action.bound,onTick:s.action.bound,loadHistory:s.action.bound,onVisibleAreaChanged:s.action.bound,onQuoteAreaChanged:s.action.bound,setMsPerPx:s.action.bound,newChart:s.action.bound,enableXScrollTimer:s.observable,enableYScrollTimer:s.observable,scale:s.action.bound,scrollableChartParent:s.computed,toggleDataFitMode:s.action.bound,toggleXScrollBlock:s.action.bound,touchValues:s.observable,isDataFitModeEnabled:s.observable,isChartLoaded:s.observable,epochBounds:s.observable.ref,quoteBounds:s.observable.ref,msPerPx:s.observable,isFeedLoaded:s.observable,cleanChart:s.action.bound}),this.mainStore=t,this.cleanChart(),this.initFlutterCharts()}initFlutterCharts(){window.jsInterop={onChartLoad:this.onChartLoad,onMainSeriesPaint:this.painter.onPaint,onVisibleAreaChanged:this.onVisibleAreaChanged,onQuoteAreaChanged:this.onQuoteAreaChanged,loadHistory:this.loadHistory,indicators:{onRemove:t=>{this.mainStore.studies.deleteStudy(t)},onEdit:t=>{this.mainStore.studies.editStudyByIndex(t)},onSwap:(t,e)=>{const{activeItems:r}=this.mainStore.studies;[r[t],r[e]]=[r[e],r[t]]}},drawingTool:{onUpdate:()=>{this.mainStore.drawTools.onUpdate()},onLoad:t=>{this.mainStore.drawTools.onLoad(t)},onToolAdded:t=>{const e=JSON.parse(t);this.mainStore.drawTools.onToolAdded(e)},onRemove:(t,e)=>{this.mainStore.state.stateChange(l.c4.DRAWING_TOOLS_DELETE,{drawing_tool_name:t.replace("dt_","")||"unknown",pxthickness:e?`${JSON.parse(e).lineStyle?.thickness}px`:void 0,color_name:e?`${(0,ft.Fh)(Number(JSON.parse(e).lineStyle?.color)).replace("#","")}`:void 0}),this.mainStore.drawTools.showDeletionSnackbarForDeletedTool(t)},onStateChanged:(t,e)=>{this.mainStore.drawTools.updateAddingState(t,e)}}},(({onChartLoad:t})=>{if(window.flutterChartElement)return void t();Se();const e=document.createElement("div");e.classList.add("flutter-chart"),window.flutterChartElement=e,window._flutter={initState:{isInitialRunCompleted:!1,isEngineInitialized:!1,isMounted:!1}};const i=r.p,a=r.p+"chart/",s=async t=>{window._flutter.appRunner=await t.initializeEngine({assetBase:i,hostElement:window.flutterChartElement}),window._flutter.initState.isEngineInitialized=!0,xe()};r.e(776).then(r.t.bind(r,5371,23)).then(()=>{window._flutter.buildConfig||(window._flutter.buildConfig={builds:[{compileTarget:"dart2wasm",renderer:"skwasm",mainWasmPath:"main.dart.wasm",jsSupportRuntimePath:"main.dart.mjs"},{compileTarget:"dart2js",renderer:"canvaskit",mainJsPath:"main.dart.js"}]}),window._flutter.loader.load({onEntrypointLoaded:s,config:{entryPointBaseUrl:a,assetBase:i,canvasKitBaseUrl:a+"canvaskit",hostElement:window.flutterChartElement}})})})({onChartLoad:this.onChartLoad})}onMount(t){t.appendChild(window.flutterChartElement);const e=window._flutter.initState;e.isMounted=!0,e.isEngineInitialized&&!e.isInitialRunCompleted&&xe(),window.flutterChartElement?.addEventListener("wheel",this.onWheel,{capture:!0}),window.flutterChartElement?.addEventListener("touchstart",this.onTouch,{capture:!0}),window.flutterChartElement?.addEventListener("touchmove",this.onTouch,{capture:!0}),window.flutterChartElement?.addEventListener("touchend",this.onTouch,{capture:!0}),window.flutterChartElement?.addEventListener("dblclick",this.onDoubleClick,{capture:!0}),window.addEventListener("mousemove",this.onMouseMove,{capture:!0})}onUnmount(){window._flutter.initState.isMounted=!1,window.flutterChartElement?.removeEventListener("wheel",this.onWheel,{capture:!0}),window.flutterChartElement?.removeEventListener("touchstart",this.onTouch,{capture:!0}),window.flutterChartElement?.removeEventListener("touchmove",this.onTouch,{capture:!0}),window.flutterChartElement?.removeEventListener("touchend",this.onTouch,{capture:!0}),window.flutterChartElement?.removeEventListener("dblclick",this.onDoubleClick,{capture:!0}),window.removeEventListener("mousemove",this.onMouseMove,{capture:!0}),clearTimeout(this.clearTouchDeltasTimer),clearTimeout(this.enableXScrollTimer),clearTimeout(this.enableYScrollTimer)}onChartLoad(){this.flutterChart=window.flutterChart,this.isChartLoaded=!0}cleanChart(){window.flutterChartElement&&(this.updateLeftMargin(),this.setShowInterval(!1),this.setSymbolClosed(!1))}onTouch(t){const e=this.mainStore.chart.chartNode,r=document.querySelector(".flutter-chart");if(e&&this.scrollableChartParent&&!this.mainStore.state.isVerticalScrollEnabled){if(this.touchValues.multiTouch)return void("touchend"===t.type&&(this.touchValues.touchIds=this.touchValues.touchIds?.filter(e=>e===t.changedTouches[0].identifier),this.touchValues={multiTouch:!!this.touchValues.touchIds?.length}));if(t.touches.length>1)return this.touchValues={multiTouch:!0},void(this.touchValues.touchIds=Array.from(t.touches).map(t=>t.identifier));const{pageX:i,pageY:a}=t.changedTouches[0];if(["touchmove","touchend"].includes(t.type)){const s=e.offsetWidth-this.mainStore.chart.yAxisWidth,n=e.offsetHeight-this.mainStore.chart.xAxisHeight,{top:o,left:l}=e.getBoundingClientRect(),c=i-l,h=c<s&&a-o<n,u=c>=s;if(this.touchValues.x&&this.touchValues.y){const e=this.touchValues.x-i,s=this.touchValues.y-a,n=(this.touchValues.deltaXTotal??0)+e,o=(this.touchValues.deltaYTotal??0)+s,l="touchend"===t.type?Math.abs(n):Math.abs(e),c=("touchend"===t.type?Math.abs(o):Math.abs(s))>l;this.touchValues={...this.touchValues,deltaXTotal:n,deltaYTotal:o},h&&c?this.isXScrollBlocked||this.toggleXScrollBlock(!0,r):!this.isXScrollBlocked&&u&&this.stopScroll(r)}this.touchValues={...this.touchValues,x:i,y:a},"touchend"===t.type&&this.isXScrollBlocked&&(this.enableXScrollTimer=setTimeout(()=>{this.toggleXScrollBlock(!1,r)},100))}["touchstart","touchend"].includes(t.type)&&(this.touchValues="touchstart"===t.type?{x:i,y:a}:{deltaYTotal:this.touchValues.deltaYTotal,deltaXTotal:this.touchValues.deltaXTotal})}}onVisibleAreaChanged(t,e){this.epochBounds.leftEpoch===t&&this.epochBounds.rightEpoch===e||(this.epochBounds={leftEpoch:t,rightEpoch:e})}onQuoteAreaChanged(t,e){this.quoteBounds={topQuote:t,bottomQuote:e}}getGranularityInMs(){return 1e3*(this.mainStore.state.granularity||1)}async onTickHistory(t){this.isFeedLoaded=!0,await(0,s.when)(()=>this.isChartLoaded),this.mainStore.chart.feed?.updateQuotes(t,!1),this.flutterChart?.feed.onTickHistory(t,!1)}async onTick(t){await(0,s.when)(()=>this.isChartLoaded);const e=this.mainStore.chart.feed?.quotes[this.mainStore.chart.feed?.quotes.length-1];e&&new Date(e.Date)>new Date(t.Date)||(this.mainStore.chart.feed?.addQuote(t),(0,s.runInAction)(()=>{this.mainStore.chart.lastQuote=t}),t.ohlc?this.flutterChart?.feed.onNewCandle(t):this.getGranularityInMs()<6e4&&this.flutterChart?.feed.onNewTick(t))}loadHistory(t){const{count:e,end:r}=t,{state:i,chart:a}=this.mainStore,{granularity:s}=i;a.feed?.fetchPaginationData(a.currentActiveSymbol?.symbol,r,e,s,({quotes:t})=>{this.mainStore.chart.feed?.updateQuotes(t||[],!0),this.flutterChart?.feed.onTickHistory(t||[],!0)})}updateChartStyle(t){this.flutterChart?.config.updateChartStyle(t)}async updateTheme(t){await(0,s.when)(()=>this.isChartLoaded),this.flutterChart?.config.updateTheme(t)}async updateLeftMargin(t){await(0,s.when)(()=>this.isChartLoaded),void 0!==t&&this.flutterChart?.config.updateLeftMargin(t)}async updateLiveStatus(t){await(0,s.when)(()=>this.isChartLoaded),this.flutterChart?.config.updateLiveStatus(t)}async setSymbolClosed(t){await(0,s.when)(()=>this.isChartLoaded),this.flutterChart?.config.setSymbolClosed(t)}async updateRightPadding(t){await(0,s.when)(()=>this.isChartLoaded),void 0!==t&&this.flutterChart?.config.updateRightPadding(t)}async setShowInterval(t){await(0,s.when)(()=>this.isChartLoaded),this.flutterChart?.config.toggleTimeIntervalVisibility(t)}scale(t){null!==this.mainStore.studies.currentHoverIndex&&(this.isScaled=!0),this.isDataFitModeEnabled=!1;const e=this.flutterChart?.app.scale(t);null!=e&&this.setMsPerPx(e)}async updateContracts(t){const e=t.filter(t=>t.markers?.length>0).map(t=>(t.markers.forEach(t=>{if(!t.quote){const{price:e}=this.getInterpolatedPositionAndPrice(1e3*t.epoch)||{};t.quote=e}}),t));await(0,s.when)(()=>this.isFeedLoaded),this.flutterChart?.config.updateContracts(e)}setMsPerPx(t){this.msPerPx=t,this.mainStore.state.saveLayout()}getXFromEpoch(t){return this.flutterChart?.app.getXFromEpoch(t)??0}getYFromQuote(t){return this.flutterChart?.app.getYFromQuote(t)??0}getEpochFromX(t){return this.flutterChart?.app.getEpochFromX(t)??0}getQuoteFromY(t){return this.flutterChart?.app.getQuoteFromY(t)??0}get scrollableChartParent(){const t=this.mainStore.chart.chartNode;if(!t)return;let e=t.parentElement;for(;e;){const{overflow:t}=window.getComputedStyle(e);if(t.split(" ").every(t=>"auto"===t||"scroll"===t))return e;e=e.parentElement}return document.documentElement}}function je(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Ne{constructor(){je(this,"notifier",new le),je(this,"favorites",Ut.A.getInstance()),je(this,"chart",new nt(this)),je(this,"state",new ae(this)),je(this,"chartAdapter",new ke(this)),je(this,"chartType",new gt(this)),je(this,"chartMode",new pt(this)),je(this,"studies",new yt(this)),je(this,"drawTools",new xt(this)),je(this,"chartTitle",new At(this)),je(this,"timeperiod",new w(this)),je(this,"view",new Dt(this)),je(this,"crosshair",new Lt(this)),je(this,"share",new Rt(this)),je(this,"chartSetting",new Vt(this)),je(this,"loader",new $t),je(this,"chartSize",new Gt(this)),je(this,"routing",new Qt(this)),je(this,"lastDigitStats",new he(this)),je(this,"bottomWidgetsContainer",new o(this)),je(this,"navigationWidget",new de(this)),je(this,"highestLowest",new me(this)),je(this,"paginationLoader",new fe(this)),je(this,"toolbarWidget",new be(this)),je(this,"scroll",new ye)}}let Ee;const Ae=()=>{const t=new Ne;Ee=a().createContext(t)},Ie=()=>Ee,De=()=>a().useContext(Ee)},5877(t,e,r){"use strict";function i(t=null){let e,r;const i=new Promise((t,i)=>{e=t,r=i});return i.resolve=t=>{i.isPending=!1,e(t)},i.reject=t=>{i.isPending=!1,r(t)},i.data=t,i}r.d(e,{A:()=>i})},6039(t,e,r){"use strict";r.d(e,{A:()=>l});var i=r(8825),a=r(1993),s=r(5877);function n(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class o{constructor(){n(this,"_api",void 0),n(this,"clientTimeAtRequest",void 0),n(this,"getTimeInterval",void 0),n(this,"onTimeUpdated",void 0),n(this,"serverTimeAtResponse",void 0),n(this,"updateTimeInterval",void 0),n(this,"clockStarted",!1),n(this,"clockStartedPromise",(0,s.A)()),n(this,"_timeResponse",t=>{if(!this.clockStarted)return void this.init();const e=t.time,r=(0,a.YN)(new Date);e&&this.clientTimeAtRequest&&(this.serverTimeAtResponse=e+(r-this.clientTimeAtRequest)/2);this.updateTimeInterval&&clearInterval(this.updateTimeInterval),this.updateTimeInterval=setInterval(()=>{this.serverTimeAtResponse&&(this.serverTimeAtResponse+=1),"function"==typeof this.onTimeUpdated&&this.onTimeUpdated()},1e3)})}async init(t,e){if(this._api=t,this.onTimeUpdated=e,this.clockStarted)return this.clockStartedPromise;this.clockStarted=!0,this.getTimeInterval&&clearInterval(this.getTimeInterval),await this.requestTime(),this.getTimeInterval=setInterval(this.requestTime.bind(this),3e4)}async requestTime(){this.clientTimeAtRequest=(0,a.YN)(new Date),this._timeResponse({time:Math.floor((new Date).getTime()/1e3)}),this.clockStartedPromise.resolve()}getEpoch(){return this.serverTimeAtResponse?this.serverTimeAtResponse:(0,a.YN)(new Date)}getLocalDate(){return(0,a.sg)(this.getEpoch())}getUTCDate(){return(0,i.E)((0,a.Pu)(this.getEpoch()))}static getInstance(){return this._instance||(this._instance=new o),this._instance}}n(o,"_instance",void 0);const l=o},8825(t,e,r){"use strict";r.d(e,{E:()=>a});const i=new RegExp("\\d{17}"),a=t=>{if(!t||t.getFullYear)return t;var e,r,a,n,o,l,c,h=[];if(12==t.length||14==t.length)return e=parseFloat(t.substring(0,4)),r=parseFloat(t.substring(4,6))-1,a=parseFloat(t.substring(6,8)),n=parseFloat(t.substring(8,10)),o=parseFloat(t.substring(10,12)),l=parseFloat(t.substring(12,14))||0,new Date(e,r,a,n,o,l,0);if(i.test(t))return e=parseFloat(t.substring(0,4)),r=parseFloat(t.substring(4,6))-1,a=parseFloat(t.substring(6,8)),n=parseFloat(t.substring(8,10)),o=parseFloat(t.substring(10,12)),l=parseFloat(t.substring(12,14)),c=parseFloat(t.substring(14,17)),new Date(e,r,a,n,o,l,c);var u=[t],d=t.indexOf("T");if(-1!=d){var g=t.substring(d);if(-1!=g.indexOf("Z")||-1!=g.indexOf("-")||-1!=g.indexOf("+"))return new Date(t);u=t.split("T")}else-1!=t.indexOf(" ")&&(u=t.split(" "));if(-1!=u[0].indexOf("/"))h=u[0].split("/");else{if(-1==u[0].indexOf("-"))return s(t);h=u[0].split("-")}var m=parseFloat(h[2]);if(h[0]&&4==h[0].length&&(m=parseFloat(h[0]),h[0]=h[1],h[1]=h[2]),u.length>1){var p=u[2];u=u[1].split(":"),p&&("12"==u[0]&&"AM"==p.toUpperCase()?u[0]=0:"12"!=u[0]&&"PM"==p.toUpperCase()&&(u[0]=parseInt(u[0],10)+12));var f=0,_=0;return 3==u.length&&(-1==u[2].indexOf(".")?f=parseInt(u[2],10):3==(f=u[2].split("."))[1].length&&(_=f[1],f=f[0])),new Date(m,h[0]-1,h[1],u[0],u[1],f,_)}return new Date(m,h[0]-1,h[1],0,0,0,0)},s=t=>{var e;if(-1!=t.indexOf("/"))e=t.split("/");else{if(-1==t.indexOf("-"))return t.length>=8?new Date(parseFloat(t.substring(0,4)),parseFloat(t.substring(4,6))-1,parseFloat(t.substring(6,8))):new Date;e=t.split("-")}if(e.length<3)return new Date;-1!=e[2].indexOf(" ")?e[2]=e[2].substring(0,e[2].indexOf(" ")):-1!=e[2].indexOf("T")&&(e[2]=e[2].substring(0,e[2].indexOf("T")));var r=parseFloat(e[2]);return r<20&&(r+=2e3),4==e[0].length&&(r=parseFloat(e[0]),e[0]=e[1],e[1]=e[2]),new Date(r,e[0]-1,e[1])}},3457(t,e,r){"use strict";r.d(e,{$s:()=>o,Cw:()=>a,D_:()=>n,dq:()=>i,h1:()=>s});const i=Object.freeze({ChartTitle:"Chart Title",CategoricalDisplay:"Categorical Display",ChartControl:"Chart Control"}),a=Object.freeze({MarketSelector:"Market Selector",Favorite:"Favorite",ChartSetting:"Chart Setting",ChartSize:"Chart Size",ChartType:"Chart Type",Comparison:"Comparison",DrawTools:"Draw Tools",Download:"Download",Indicator:"Indicator",Interval:"Interval",Template:"Template"});function s(){var t,e,r,i,a,s;window.isProductionWebsite&&(t=window,e=document,r="script",i="ga",t.GoogleAnalyticsObject=i,t[i]=t[i]||function(){(t[i].q=t[i].q||[]).push(arguments)},t[i].l=1*new Date,a=e.createElement(r),s=e.getElementsByTagName(r)[0],a.async=1,a.src="//www.google-analytics.com/analytics.js",s.parentNode.insertBefore(a,s),ga("create","UA-40877026-15","auto"))}function n(){window.isProductionWebsite&&window.ga&&ga("send","pageview",window.location.pathname)}function o(t,e,r){window.isProductionWebsite&&window.ga&&ga("send","event",t,e,r)}},1993(t,e,r){"use strict";function i(t){const e=localStorage.getItem(t);if(null!==e)try{return JSON.parse(e)}catch(t){return}}function a(t){try{return JSON.parse(t)}catch(t){return}}function s(t,e){const r=JSON.stringify(e);localStorage.setItem(t,r)}function n(t,e){return"string"==typeof t?t:t.toFixed(e)}r.d(e,{C1:()=>T,Cc:()=>N,Jn:()=>n,KC:()=>y,MQ:()=>C,Ou:()=>j,Pu:()=>m,RB:()=>l,SN:()=>h,SS:()=>u,Ul:()=>o,Vh:()=>D,X:()=>S,YN:()=>g,_J:()=>k,_z:()=>d,ay:()=>E,lk:()=>s,mI:()=>c,o8:()=>A,pg:()=>f,pl:()=>_,qI:()=>I,s0:()=>i,sg:()=>p,xL:()=>a,yX:()=>v});const o=t=>{if(void 0!==t)return 86400===t?"day":0===t?"tick":t>=60&&t<=1800?"minute":"hour"},l=t=>{const{market_display_name:e,submarket_display_name:r,subgroup:i}=t||{};if(!e)return"";const a=e.replace(" ","_"),s=r.replace(" ","_");return i&&"none"!==i?`${a}-${i}-${s}`.toLowerCase():`${a}-${s}`.toLowerCase()},c=(t,e)=>{const r=e.find(e=>e.items.some(e=>e.interval===t)),i=r?.items?.find(e=>e.interval===t)?.num,a=1===i?r?.single:r?.plural;return a?`${i} ${a}`:""},h={Chrome:()=>-1!==navigator.userAgent.indexOf("Chrome")&&!navigator.userAgent.match(/OPR|Opera|Chromium|Edg|Edge/i),Chromium:()=>-1!==navigator.userAgent.indexOf("Chromium"),Edge:()=>!!navigator.userAgent.match(/Edg|Edge/i)&&!document.documentMode,Firefox:()=>-1!==navigator.userAgent.indexOf("Firefox")&&-1===navigator.userAgent.indexOf("Seamonkey"),IE:()=>navigator.userAgent.match(/MSIE|Trident/i)||!!document.documentMode,Opera:()=>!!navigator.userAgent.match(/OPR|Opera/i),Safari:()=>-1!==navigator.userAgent.indexOf("Safari")&&!navigator.userAgent.match(/Chrome|Chromium/i),Seamonkey:()=>-1!==navigator.userAgent.indexOf("Seamonkey")};function u(t,e,r,i){const a=new Blob([e],{type:r});if(navigator.msSaveBlob)return void navigator.msSaveBlob(a,t);const s="image/png;"===r?e:URL.createObjectURL(a),n=document.createElement("a");if(void 0!==n.download)return n.setAttribute("href",s),n.setAttribute("download",t),n.style.visibility="hidden",document.body.appendChild(n),n.click(),void document.body?.removeChild?.(n);if(i)if("image/png;"===r)i.document.write(`<iframe src="${s}" frameborder="0" style="border:0; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%;" allowfullscreen></iframe>`);else{const t=e.split("\n");for(let e=0;e<t.length;e++)i.document.write(`${t[e]}<br/>`)}}const d=({is_contract_chart:t,is_mobile:e,ticks_length:r,yaxis_height:i})=>{let a,s;const n={height_factor:.8};if(!i)return n;if(t){if(r){a=s=e?i*(r<5?.3:.25):.27*i}}else a=s=e?.33*i:.27*i;return{...n,...a&&s?{yaxis_margin:{top:a,bottom:s}}:{}}};function g(t){return t.getTime()/1e3-60*t.getTimezoneOffset()|0}function m(t){return new Date(1e3*t).toISOString().substring(0,19)}function p(t){return new Date(1e3*t)}function f(t){let e=1,r="second";return 86400===t?r="day":t&&t>59&&(e=t/60,r="minute"),{interval:e,timeUnit:r}}function _(t){const e=t/1e3;if(e<=0)return null;const r=t=>`0${t}`.slice(-2),i=r(Math.trunc(e%60)),a=r(Math.trunc(e/60%60));let s=Math.trunc(e/3600%24);return s=s?`${s}:`:"",`${s}${a}:${i}`}function b(t,e=t=>t){const r=[],i={...t,data:r};if(t.hasSubcategory){for(const i of t.data)if("data"in i){const t=[],a={...i,data:t};for(const r of i.data)t.push(e(r));r.push(a)}}else for(const i of t.data)r.push(e(i));return i}function v(t,e=t=>t){const r=[];for(const i of t)if(i.hasSubgroup){const t=i.subgroups.map(t=>b(t,e));r.push({...i,subgroups:t})}else r.push(b(i,e));return r}const y=41,S=(Object.freeze({GREEN:"#4bb4b3",ORANGE:"#ff6444"}),Object.freeze({UP:"UP",DOWN:"DOWN"})),x={doubleExponential:"DEMA",exponential:"EMA",hull:"HMA",simple:"MA",timeSeries:"TSMA",triangular:"TMA",tripleExponential:"TEMA",variable:"VMA",weighted:"WMA",wellesWilder:"SMMA",zeroLag:"ZMA"},w={open:"O",high:"H",close:"C",low:"L","Hl/2":"Hl/2","HlC/3":"Hlc/3","HlCC/4":"Hlcc/4","OHlC/4":"Ohlc/4"},C=(t,e=[])=>{const r=e.filter(t=>["movingAverageType","maType","fieldType"].includes(t.path||"")||["number","switch"].includes(t.type)).map(t=>"movingAverageType"===t.path||"maType"===t.path?x[t.value]:"fieldType"===t.path?w[t.value]:"switch"===t.type?t.value?"Y":"N":t.value||t.defaultValue).join(",")||void 0;return{name:(i=t.replace(`(${r})`,"").replace("-"," "),(i.charAt(0).toUpperCase()+i.slice(1)).replace(/([a-z](?=[A-Z]))/g,"$1 ")).trim(),bars:r};var i},T=(t,e)=>{if(t.length>e){let r=t;const i=Math.floor(t.length/e);for(let t=1;t<=i;t++)r=`${r.slice(0,e*t)} ${r.slice(e*t,r.length)}`;return r}return t},k=t=>t.toLowerCase().replace(/[^\w ]+/g,"").replace(/ +/g,"-"),j=(t,e,{onDragStart:r,onDrag:i,onDragReleased:a})=>{t.addEventListener("mousedown",function(t){window.addEventListener("mousemove",n),e.addEventListener("mouseup",o),s=!0,r?.(t)});let s=!1;function n(t){s&&i?.(t)}function o(t){s=!1,a?.(t),window.removeEventListener("mousemove",n),e.removeEventListener("mouseup",o)}},N=(t,e,r)=>(t=t??0)*(1-r)+(e=e??0)*r,E=(t,e)=>{if("string"==typeof t&&(t.startsWith("#")||t.toLowerCase().startsWith("0x"))){return"light"===e&&"#FFFFFF"===t?"#000000":"dark"===e&&"#000000"===t?"#FFFFFF":t}if(D(t)){const r=t;Object.keys(t).forEach(t=>{r[t]=E(r[t],e)})}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=E(t[r],e);return t},A=t=>{let e;if(null==t||"object"!=typeof t)return t;if(t instanceof Date)return e=new Date,e.setTime(t.getTime()),e;if(t instanceof Array){e=[];for(let r=0,i=t.length;r<i;r++)e[r]=A(t[r]);return e}if(t instanceof Object){e={};for(const r in t)t.hasOwnProperty(r)&&(e[r]=A(t[r]));return e}throw t},I=(t,e)=>t.reduce((t,r)=>[...t,...e(r)],[]),D=function(t){return!!t&&t.constructor===Object}},1109(t,e,r){"use strict";function i(t,e=0,r={}){let i,a,s=null,n=null,o=null,l=0;const c=r.leading??!1,h=r.trailing??!0,u=e=>{const r=n,a=o;return n=null,o=null,l=e,i=t.apply(a,r),i},d=(t,e)=>{s=setTimeout(t,e)},g=t=>{const r=void 0===a?e:t-a;return void 0===a||r>=e||r<0||t-l>=e},m=t=>(s=null,h&&n?u(t):(n=null,o=null,i)),p=()=>{const t=Date.now();if(g(t))return void m(t);d(p,e-(void 0===a?0:t-a))},f=function(...t){const r=Date.now(),h=g(r);if(n=t,o=this,a=r,h){if(null===s)return(t=>(l=t,d(p,e),c?u(t):i))(r)}else null===s&&d(p,e);return i};return f.cancel=()=>{null!==s&&(clearTimeout(s),s=null),l=0,n=null,a=void 0,o=null},f.flush=()=>null===s?i:m(Date.now()),f}function a(t,e,r){if(null==t)return t;const i=Array.isArray(e)?e:function(t){const e=[],r=/[^.[\]]+|\[(?:([^"'][^[]*)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;return t.replace(r,(t,r,i,a)=>{let s=t;return i?s=a.replace(/\\(\\)?/g,"$1"):r&&(s=r.trim()),e.push(s),""}),e}(e);let a=t;const n=i.length,o=n-1;for(let t=0;t<n;t++){const e=i[t];if(t===o)a[e]=r;else{const r=a[e];if(null==r||"object"!=typeof r){const r=i[t+1];a[e]=s(r)?[]:{}}a=a[e]}}return t}function s(t){return/^\d+$/.test(t)}r.d(e,{h:()=>a,s:()=>i})},6853(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},2592(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},8449(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},8798(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1882(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},3955(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},5511(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},7808(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},6765(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},898(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},8258(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1849(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},4007(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},79(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},4001(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},4321(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},6271(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},7951(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1061(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},8272(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1238(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},1104(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},273(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},4282(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},6351(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},2445(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},7209(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},931(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},2313(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},6238(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},7092(t){t.exports={red:"#ff444f",light_chart_text:"#555975",dark_chart_text:"#999",light_chart_grid:"#f2f3f4",dark_chart_grid:"#1d1f20",light_chart_mountain_border:"#85acb0",light_chart_mountain_bg:"rgba(133,172,176,.16)",light_chart_mountain_bg_shade:"hsla(0,0%,100%,0)",light_chart_closed_mountain_border:"rgba(133,172,176,.32)",dark_chart_mountain_border:"#85acb0",dark_chart_mountain_bg:"hsla(0,0%,100%,.36)",dark_chart_mountain_bg_shade:"rgba(16,19,32,0)",dark_chart_closed_mountain_border:"hsla(0,0%,100%,.32)",chart_closed_candle_up:"rgba(133,172,176,.32)",chart_closed_candle_down:"rgba(255,68,79,.32)",chart_closed_candle_border:"rgba(24,28,37,.32)",chart_current_hr:"#ff444f",chart_closed_current_hr:"rgba(255,68,79,.32)",light_chart_bg:"#fff",dark_chart_bg:"#181c25"}},9671(t,e,r){t.exports={id:"ic-bchusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-bchusd-usage",toString:function(){return this.url}}},2048(t,e,r){t.exports={id:"ic-bnbusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-bnbusd-usage",toString:function(){return this.url}}},2588(t,e,r){t.exports={id:"ic-btceth-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-btceth-usage",toString:function(){return this.url}}},8438(t,e,r){t.exports={id:"ic-btcltc-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-btcltc-usage",toString:function(){return this.url}}},2405(t,e,r){t.exports={id:"ic-btcusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-btcusd-usage",toString:function(){return this.url}}},2049(t,e,r){t.exports={id:"ic-dshusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-dshusd-usage",toString:function(){return this.url}}},5187(t,e,r){t.exports={id:"ic-eosusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-eosusd-usage",toString:function(){return this.url}}},4065(t,e,r){t.exports={id:"ic-ethusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-ethusd-usage",toString:function(){return this.url}}},7950(t,e,r){t.exports={id:"ic-iotusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-iotusd-usage",toString:function(){return this.url}}},1071(t,e,r){t.exports={id:"ic-ltcusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-ltcusd-usage",toString:function(){return this.url}}},2788(t,e,r){t.exports={id:"ic-neousd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-neousd-usage",toString:function(){return this.url}}},7183(t,e,r){t.exports={id:"ic-omgusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-omgusd-usage",toString:function(){return this.url}}},3344(t,e,r){t.exports={id:"ic-trxusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-trxusd-usage",toString:function(){return this.url}}},3297(t,e,r){t.exports={id:"ic-xlmusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-xlmusd-usage",toString:function(){return this.url}}},2913(t,e,r){t.exports={id:"ic-xmrusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-xmrusd-usage",toString:function(){return this.url}}},7823(t,e,r){t.exports={id:"ic-xrpusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-xrpusd-usage",toString:function(){return this.url}}},4748(t,e,r){t.exports={id:"ic-zecusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-zecusd-usage",toString:function(){return this.url}}},3785(t,e,r){t.exports={id:"ic-oilusd-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-oilusd-usage",toString:function(){return this.url}}},6244(t,e,r){t.exports={id:"ic-otcbadge-usage",viewBox:"0 0 13 9",url:r.p+"sprite-c5754f.smartcharts.svg#ic-otcbadge-usage",toString:function(){return this.url}}},8341(t,e,r){t.exports={id:"ic-metal-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-metal-usage",toString:function(){return this.url}}},3747(t,e,r){t.exports={id:"ic-australian-200-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-australian-200-usage",toString:function(){return this.url}}},3669(t,e,r){t.exports={id:"ic-euro-50-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-euro-50-usage",toString:function(){return this.url}}},2092(t,e,r){t.exports={id:"ic-france-40-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-france-40-usage",toString:function(){return this.url}}},794(t,e,r){t.exports={id:"ic-germany-40-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-germany-40-usage",toString:function(){return this.url}}},5092(t,e,r){t.exports={id:"ic-hong-kong-50-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-hong-kong-50-usage",toString:function(){return this.url}}},6552(t,e,r){t.exports={id:"ic-japan-225-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-japan-225-usage",toString:function(){return this.url}}},3119(t,e,r){t.exports={id:"ic-netherland-25-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-netherland-25-usage",toString:function(){return this.url}}},542(t,e,r){t.exports={id:"ic-swiss-20-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-swiss-20-usage",toString:function(){return this.url}}},7764(t,e,r){t.exports={id:"ic-uk-100-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-uk-100-usage",toString:function(){return this.url}}},8832(t,e,r){t.exports={id:"ic-usd-500-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-usd-500-usage",toString:function(){return this.url}}},5317(t,e,r){t.exports={id:"ic-usd-tech-100-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-usd-tech-100-usage",toString:function(){return this.url}}},6669(t,e,r){t.exports={id:"ic-wallstreet-30-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-wallstreet-30-usage",toString:function(){return this.url}}},4298(t,e,r){t.exports={id:"ic-10-index-v-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-10-index-v-usage",toString:function(){return this.url}}},3864(t,e,r){t.exports={id:"ic-100-index-v-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-100-index-v-usage",toString:function(){return this.url}}},2502(t,e,r){t.exports={id:"ic-10-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-10-1s-index-usage",toString:function(){return this.url}}},5704(t,e,r){t.exports={id:"ic-100-1s-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-100-1s-index-usage",toString:function(){return this.url}}},4046(t,e,r){t.exports={id:"ic-150-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-150-1s-index-usage",toString:function(){return this.url}}},10(t,e,r){t.exports={id:"ic-200-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-200-1s-index-usage",toString:function(){return this.url}}},6723(t,e,r){t.exports={id:"light-25(1s)index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#light-25(1s)index-usage",toString:function(){return this.url}}},1008(t,e,r){t.exports={id:"ic-250-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-250-1s-index-usage",toString:function(){return this.url}}},3292(t,e,r){t.exports={id:"ic-300-1s-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-300-1s-index-usage",toString:function(){return this.url}}},1449(t,e,r){t.exports={id:"light-50(1s) index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#light-50(1s) index-usage",toString:function(){return this.url}}},9715(t,e,r){t.exports={id:"light-75(1s) index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#light-75(1s) index-usage",toString:function(){return this.url}}},638(t,e,r){t.exports={id:"ic-25-index-v-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-25-index-v-usage",toString:function(){return this.url}}},194(t,e,r){t.exports={id:"ic-50-index-v-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-50-index-v-usage",toString:function(){return this.url}}},718(t,e,r){t.exports={id:"ic-75-index-v-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-75-index-v-usage",toString:function(){return this.url}}},148(t,e,r){t.exports={id:"ic-marketbear-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-marketbear-usage",toString:function(){return this.url}}},3751(t,e,r){t.exports={id:"boom1000 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#boom1000 index-usage",toString:function(){return this.url}}},2821(t,e,r){t.exports={id:"boom300 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#boom300 index-usage",toString:function(){return this.url}}},7213(t,e,r){t.exports={id:"boom500 index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#boom500 index-usage",toString:function(){return this.url}}},1553(t,e,r){t.exports={id:"boom600 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#boom600 index-usage",toString:function(){return this.url}}},1085(t,e,r){t.exports={id:"boom900 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#boom900 index-usage",toString:function(){return this.url}}},3562(t,e,r){t.exports={id:"ic-marketbull-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-marketbull-usage",toString:function(){return this.url}}},6489(t,e,r){t.exports={id:"crash1000 index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#crash1000 index-usage",toString:function(){return this.url}}},4579(t,e,r){t.exports={id:"crash300 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#crash300 index-usage",toString:function(){return this.url}}},7571(t,e,r){t.exports={id:"crash500 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#crash500 index-usage",toString:function(){return this.url}}},6033(t,e,r){t.exports={id:"crash600 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#crash600 index-usage",toString:function(){return this.url}}},2099(t,e,r){t.exports={id:"crash900 index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#crash900 index-usage",toString:function(){return this.url}}},5269(t,e,r){t.exports={id:"ic-10-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-10-index-usage",toString:function(){return this.url}}},2167(t,e,r){t.exports={id:"ic-100-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-100-index-usage",toString:function(){return this.url}}},4005(t,e,r){t.exports={id:"ic-150-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-150-index-usage",toString:function(){return this.url}}},6617(t,e,r){t.exports={id:"ic-200-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-200-index-usage",toString:function(){return this.url}}},3265(t,e,r){t.exports={id:"ic-25-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-25-index-usage",toString:function(){return this.url}}},2853(t,e,r){t.exports={id:"ic-50-index-usage",viewBox:"0 0 33 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-50-index-usage",toString:function(){return this.url}}},3257(t,e,r){t.exports={id:"ic-75-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-75-index-usage",toString:function(){return this.url}}},7358(t,e,r){t.exports={id:"step-100-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#step-100-index-usage",toString:function(){return this.url}}},3425(t,e,r){t.exports={id:"step-200-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#step-200-index-usage",toString:function(){return this.url}}},2188(t,e,r){t.exports={id:"step-300-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#step-300-index-usage",toString:function(){return this.url}}},2839(t,e,r){t.exports={id:"step-400-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#step-400-index-usage",toString:function(){return this.url}}},3010(t,e,r){t.exports={id:"step-500-index-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#step-500-index-usage",toString:function(){return this.url}}},1561(t,e,r){t.exports={id:"error-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#error-usage",toString:function(){return this.url}}},9429(t,e,r){t.exports={id:"info-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#info-usage",toString:function(){return this.url}}},1610(t,e,r){t.exports={id:"success-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#success-usage",toString:function(){return this.url}}},3775(t,e,r){t.exports={id:"warning-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#warning-usage",toString:function(){return this.url}}},3578(t,e,r){t.exports={id:"ic-arrow-green-usage",viewBox:"0 0 22 31",url:r.p+"sprite-c5754f.smartcharts.svg#ic-arrow-green-usage",toString:function(){return this.url}}},3255(t,e,r){t.exports={id:"ic-arrow-orange-usage",viewBox:"0 0 22 31",url:r.p+"sprite-c5754f.smartcharts.svg#ic-arrow-orange-usage",toString:function(){return this.url}}},2327(t,e,r){t.exports={id:"ic-back-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-back-usage",toString:function(){return this.url}}},7739(t,e,r){t.exports={id:"ic-baseline-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-baseline-normal-usage",toString:function(){return this.url}}},2979(t,e,r){t.exports={id:"ic-candle-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-candle-normal-usage",toString:function(){return this.url}}},6057(t,e,r){t.exports={id:"ic-dot-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-dot-normal-usage",toString:function(){return this.url}}},267(t,e,r){t.exports={id:"ic-hollowcandle-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-hollowcandle-normal-usage",toString:function(){return this.url}}},242(t,e,r){t.exports={id:"ic-heikin-ashi-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-heikin-ashi-normal-usage",toString:function(){return this.url}}},4542(t,e,r){t.exports={id:"ic-kagi-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-kagi-normal-usage",toString:function(){return this.url}}},1811(t,e,r){t.exports={id:"ic-linebreak-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-linebreak-normal-usage",toString:function(){return this.url}}},6240(t,e,r){t.exports={id:"ic-pointfigure-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-pointfigure-normal-usage",toString:function(){return this.url}}},1337(t,e,r){t.exports={id:"ic-rangebars-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-rangebars-normal-usage",toString:function(){return this.url}}},5829(t,e,r){t.exports={id:"ic-renko-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-renko-normal-usage",toString:function(){return this.url}}},9955(t,e,r){t.exports={id:"ic-linedot-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-linedot-normal-usage",toString:function(){return this.url}}},363(t,e,r){t.exports={id:"ic-line-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-line-normal-usage",toString:function(){return this.url}}},5439(t,e,r){t.exports={id:"ic-ohlc-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-ohlc-normal-usage",toString:function(){return this.url}}},4619(t,e,r){t.exports={id:"ic-spline-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-spline-normal-usage",toString:function(){return this.url}}},2910(t,e,r){t.exports={id:"table-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#table-usage",toString:function(){return this.url}}},5833(t,e,r){t.exports={id:"ic-comparison-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-comparison-normal-usage",toString:function(){return this.url}}},7463(t,e,r){t.exports={id:"ic-crosshair-off-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-crosshair-off-usage",toString:function(){return this.url}}},3211(t,e,r){t.exports={id:"ic-crosshair-on-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-crosshair-on-usage",toString:function(){return this.url}}},6331(t,e,r){t.exports={id:"ic-drawingtools-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-drawingtools-normal-usage",toString:function(){return this.url}}},6432(t,e,r){t.exports={id:"ic-position-bottom-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-position-bottom-usage",toString:function(){return this.url}}},4674(t,e,r){t.exports={id:"ic-position-left-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-position-left-usage",toString:function(){return this.url}}},9185(t,e,r){t.exports={id:"ic-zoomin-light-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-zoomin-light-usage",toString:function(){return this.url}}},8983(t,e,r){t.exports={id:"ic-zoomout-light-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-zoomout-light-usage",toString:function(){return this.url}}},4431(t,e,r){t.exports={id:"ic-area-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-area-grayscale-usage",toString:function(){return this.url}}},9129(t,e,r){t.exports={id:"ic-area-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-area-usage",toString:function(){return this.url}}},263(t,e,r){t.exports={id:"ic-candle-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-candle-grayscale-usage",toString:function(){return this.url}}},7249(t,e,r){t.exports={id:"ic-candle-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-candle-usage",toString:function(){return this.url}}},301(t,e,r){t.exports={id:"ic-hollow-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-hollow-grayscale-usage",toString:function(){return this.url}}},9607(t,e,r){t.exports={id:"ic-hollow-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-hollow-usage",toString:function(){return this.url}}},7414(t,e,r){t.exports={id:"ic-ohlc-grayscale-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-ohlc-grayscale-usage",toString:function(){return this.url}}},9564(t,e,r){t.exports={id:"ic-ohlc-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-ohlc-usage",toString:function(){return this.url}}},4629(t,e,r){t.exports={id:"ic-clear-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-clear-usage",toString:function(){return this.url}}},9625(t,e,r){t.exports={id:"ic-close-bold-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-close-bold-usage",toString:function(){return this.url}}},9324(t,e,r){t.exports={id:"ic-close-circle-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-close-circle-usage",toString:function(){return this.url}}},3293(t,e,r){t.exports={id:"full-screen-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#full-screen-usage",toString:function(){return this.url}}},1278(t,e,r){t.exports={id:"ic-active-usage",viewBox:"0 0 15 15",url:r.p+"sprite-c5754f.smartcharts.svg#ic-active-usage",toString:function(){return this.url}}},9289(t,e,r){t.exports={id:"ic-add-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-add-usage",toString:function(){return this.url}}},9891(t,e,r){t.exports={id:"ic-charts-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-charts-usage",toString:function(){return this.url}}},6378(t,e,r){t.exports={id:"ic-checkbox-active-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-checkbox-active-usage",toString:function(){return this.url}}},8451(t,e,r){t.exports={id:"ic-checkbox-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-checkbox-usage",toString:function(){return this.url}}},204(t,e,r){t.exports={id:"ic-close-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-close-usage",toString:function(){return this.url}}},1320(t,e,r){t.exports={id:"ic-download-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-download-usage",toString:function(){return this.url}}},9212(t,e,r){t.exports={id:"ic-drawing-tool-mobile-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-drawing-tool-mobile-usage",toString:function(){return this.url}}},4497(t,e,r){t.exports={id:"ic-drawing-tool-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-drawing-tool-usage",toString:function(){return this.url}}},4325(t,e,r){t.exports={id:"ic-help-center-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-help-center-usage",toString:function(){return this.url}}},8250(t,e,r){t.exports={id:"ic-indicators-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-indicators-usage",toString:function(){return this.url}}},2532(t,e,r){t.exports={id:"ic-info-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-info-usage",toString:function(){return this.url}}},3365(t,e,r){t.exports={id:"ic-input-number-minus-usage",viewBox:"0 0 8 8",url:r.p+"sprite-c5754f.smartcharts.svg#ic-input-number-minus-usage",toString:function(){return this.url}}},3031(t,e,r){t.exports={id:"ic-input-number-plus-usage",viewBox:"0 0 8 8",url:r.p+"sprite-c5754f.smartcharts.svg#ic-input-number-plus-usage",toString:function(){return this.url}}},5038(t,e,r){t.exports={id:"ic-language-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-language-usage",toString:function(){return this.url}}},1041(t,e,r){t.exports={id:"ic-templates-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-templates-usage",toString:function(){return this.url}}},1655(t,e,r){t.exports={id:"ic-theme-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-theme-usage",toString:function(){return this.url}}},9707(t,e,r){t.exports={id:"ic-delete-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-delete-usage",toString:function(){return this.url}}},7885(t,e,r){t.exports={id:"ic-csv-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-csv-usage",toString:function(){return this.url}}},7420(t,e,r){t.exports={id:"ic-png-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-png-usage",toString:function(){return this.url}}},3576(t,e,r){t.exports={id:"ic-channel-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-channel-usage",toString:function(){return this.url}}},6706(t,e,r){t.exports={id:"ic-continuous-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-continuous-usage",toString:function(){return this.url}}},7365(t,e,r){t.exports={id:"ic-fibonacci-fan-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-fibonacci-fan-usage",toString:function(){return this.url}}},4311(t,e,r){t.exports={id:"ic-horizontal-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-horizontal-usage",toString:function(){return this.url}}},3385(t,e,r){t.exports={id:"ic-line-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-line-usage",toString:function(){return this.url}}},7425(t,e,r){t.exports={id:"ic-ray-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-ray-usage",toString:function(){return this.url}}},1134(t,e,r){t.exports={id:"ic-rectangle-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-rectangle-usage",toString:function(){return this.url}}},2308(t,e,r){t.exports={id:"ic-trend-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-trend-usage",toString:function(){return this.url}}},5477(t,e,r){t.exports={id:"ic-vertical-usage",viewBox:"0 0 24 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-vertical-usage",toString:function(){return this.url}}},9307(t,e,r){t.exports={id:"ic-dropdown-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-dropdown-usage",toString:function(){return this.url}}},9411(t,e,r){t.exports={id:"ic-edit-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-edit-usage",toString:function(){return this.url}}},8093(t,e,r){t.exports={id:"ic-favorite-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-favorite-normal-usage",toString:function(){return this.url}}},1795(t,e,r){t.exports={id:"arabic-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#arabic-usage",toString:function(){return this.url}}},3719(t,e,r){t.exports={id:"aud-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#aud-usage",toString:function(){return this.url}}},7428(t,e,r){t.exports={id:"bangladesh-usage",viewBox:"0 0 24 17",url:r.p+"sprite-c5754f.smartcharts.svg#bangladesh-usage",toString:function(){return this.url}}},1445(t,e,r){t.exports={id:"cad-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#cad-usage",toString:function(){return this.url}}},8217(t,e,r){t.exports={id:"cambodia-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#cambodia-usage",toString:function(){return this.url}}},4056(t,e,r){t.exports={id:"chf-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#chf-usage",toString:function(){return this.url}}},5004(t,e,r){t.exports={id:"chinese-traditional-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#chinese-traditional-usage",toString:function(){return this.url}}},7256(t,e,r){t.exports={id:"chinese-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#chinese-usage",toString:function(){return this.url}}},7451(t,e,r){t.exports={id:"dutch-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#dutch-usage",toString:function(){return this.url}}},1477(t,e,r){t.exports={id:"eur-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#eur-usage",toString:function(){return this.url}}},3135(t,e,r){t.exports={id:"french-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#french-usage",toString:function(){return this.url}}},3332(t,e,r){t.exports={id:"gbp-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#gbp-usage",toString:function(){return this.url}}},5729(t,e,r){t.exports={id:"german-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#german-usage",toString:function(){return this.url}}},9876(t,e,r){t.exports={id:"hong kong-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#hong kong-usage",toString:function(){return this.url}}},451(t,e,r){t.exports={id:"indonesia-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#indonesia-usage",toString:function(){return this.url}}},2620(t,e,r){t.exports={id:"italy-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#italy-usage",toString:function(){return this.url}}},6902(t,e,r){t.exports={id:"jpy-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#jpy-usage",toString:function(){return this.url}}},1089(t,e,r){t.exports={id:"kenya-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#kenya-usage",toString:function(){return this.url}}},3179(t,e,r){t.exports={id:"korean-usage",viewBox:"0 0 36 24",url:r.p+"sprite-c5754f.smartcharts.svg#korean-usage",toString:function(){return this.url}}},1069(t,e,r){t.exports={id:"mongolian-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#mongolian-usage",toString:function(){return this.url}}},9702(t,e,r){t.exports={id:"mxn-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#mxn-usage",toString:function(){return this.url}}},1649(t,e,r){t.exports={id:"nok-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#nok-usage",toString:function(){return this.url}}},1229(t,e,r){t.exports={id:"nzd-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#nzd-usage",toString:function(){return this.url}}},2607(t,e,r){t.exports={id:"pln-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#pln-usage",toString:function(){return this.url}}},37(t,e,r){t.exports={id:"portugal-usage",viewBox:"0 0 24 17",url:r.p+"sprite-c5754f.smartcharts.svg#portugal-usage",toString:function(){return this.url}}},4236(t,e,r){t.exports={id:"russia-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#russia-usage",toString:function(){return this.url}}},7558(t,e,r){t.exports={id:"sek-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#sek-usage",toString:function(){return this.url}}},9705(t,e,r){t.exports={id:"spanish-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#spanish-usage",toString:function(){return this.url}}},7038(t,e,r){t.exports={id:"srilanka-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#srilanka-usage",toString:function(){return this.url}}},6226(t,e,r){t.exports={id:"thailand-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#thailand-usage",toString:function(){return this.url}}},5357(t,e,r){t.exports={id:"turkey-usage",viewBox:"0 0 24 17",url:r.p+"sprite-c5754f.smartcharts.svg#turkey-usage",toString:function(){return this.url}}},8901(t,e,r){t.exports={id:"usd-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#usd-usage",toString:function(){return this.url}}},6681(t,e,r){t.exports={id:"uzbekistan-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#uzbekistan-usage",toString:function(){return this.url}}},8457(t,e,r){t.exports={id:"vietnam-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#vietnam-usage",toString:function(){return this.url}}},3770(t,e,r){t.exports={id:"wallstreet-usage",viewBox:"0 0 24 16",url:r.p+"sprite-c5754f.smartcharts.svg#wallstreet-usage",toString:function(){return this.url}}},5407(t,e,r){t.exports={id:"xau-usage",viewBox:"0 0 8 8",url:r.p+"sprite-c5754f.smartcharts.svg#xau-usage",toString:function(){return this.url}}},1270(t,e,r){t.exports={id:"ic-adx-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-adx-usage",toString:function(){return this.url}}},8246(t,e,r){t.exports={id:"ic-alligator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-alligator-usage",toString:function(){return this.url}}},1108(t,e,r){t.exports={id:"ic-aroon-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-aroon-usage",toString:function(){return this.url}}},5(t,e,r){t.exports={id:"ic-averages-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-averages-usage",toString:function(){return this.url}}},1077(t,e,r){t.exports={id:"ic-awesome-oscillator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-awesome-oscillator-usage",toString:function(){return this.url}}},6537(t,e,r){t.exports={id:"ic-bollinger-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-bollinger-usage",toString:function(){return this.url}}},1908(t,e,r){t.exports={id:"ic-cat-averages-usage",viewBox:"0 0 17 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-cat-averages-usage",toString:function(){return this.url}}},2421(t,e,r){t.exports={id:"ic-commodity-channel-index-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-commodity-channel-index-usage",toString:function(){return this.url}}},5459(t,e,r){t.exports={id:"ic-donchian-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-donchian-usage",toString:function(){return this.url}}},155(t,e,r){t.exports={id:"ic-dtrended-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-dtrended-usage",toString:function(){return this.url}}},3821(t,e,r){t.exports={id:"ic-envelope-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-envelope-usage",toString:function(){return this.url}}},3163(t,e,r){t.exports={id:"ic-fractal-chaos-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-fractal-chaos-usage",toString:function(){return this.url}}},9424(t,e,r){t.exports={id:"ic-gator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-gator-usage",toString:function(){return this.url}}},5976(t,e,r){t.exports={id:"ic-ichimoku-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-ichimoku-usage",toString:function(){return this.url}}},9442(t,e,r){t.exports={id:"ic-macd-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-macd-usage",toString:function(){return this.url}}},6583(t,e,r){t.exports={id:"ic-momentum-usage",viewBox:"0 0 17 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-momentum-usage",toString:function(){return this.url}}},9149(t,e,r){t.exports={id:"ic-other-usage",viewBox:"0 0 17 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-other-usage",toString:function(){return this.url}}},3982(t,e,r){t.exports={id:"ic-parabolic-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-parabolic-usage",toString:function(){return this.url}}},9877(t,e,r){t.exports={id:"ic-rainbow-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-rainbow-usage",toString:function(){return this.url}}},9080(t,e,r){t.exports={id:"ic-rate-of-change-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-rate-of-change-usage",toString:function(){return this.url}}},3417(t,e,r){t.exports={id:"ic-rsi-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-rsi-usage",toString:function(){return this.url}}},6661(t,e,r){t.exports={id:"ic-stochastic-momentum-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-stochastic-momentum-usage",toString:function(){return this.url}}},7709(t,e,r){t.exports={id:"ic-stochastic-oscillator-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-stochastic-oscillator-usage",toString:function(){return this.url}}},4575(t,e,r){t.exports={id:"ic-trend-dark-usage",viewBox:"0 0 17 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-trend-dark-usage",toString:function(){return this.url}}},7037(t,e,r){t.exports={id:"ic-trend-light-usage",viewBox:"0 0 17 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-trend-light-usage",toString:function(){return this.url}}},3800(t,e,r){t.exports={id:"ic-volatility-usage",viewBox:"0 0 17 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-volatility-usage",toString:function(){return this.url}}},1904(t,e,r){t.exports={id:"ic-william-percent-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-william-percent-usage",toString:function(){return this.url}}},1820(t,e,r){t.exports={id:"ic-zig-zag-usage",viewBox:"0 0 25 24",url:r.p+"sprite-c5754f.smartcharts.svg#ic-zig-zag-usage",toString:function(){return this.url}}},1891(t,e,r){t.exports={id:"ic-measure-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-measure-usage",toString:function(){return this.url}}},8584(t,e,r){t.exports={id:"ic-home-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-home-usage",toString:function(){return this.url}}},7521(t,e,r){t.exports={id:"ic-scale-full-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-scale-full-usage",toString:function(){return this.url}}},4185(t,e,r){t.exports={id:"ic-zoomin-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-zoomin-usage",toString:function(){return this.url}}},6776(t,e,r){t.exports={id:"ic-zoomout-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-zoomout-usage",toString:function(){return this.url}}},6183(t,e,r){t.exports={id:"ic-pencil-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-pencil-usage",toString:function(){return this.url}}},7625(t,e,r){t.exports={id:"ic-placeholder-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-placeholder-usage",toString:function(){return this.url}}},4333(t,e,r){t.exports={id:"ic-search-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-search-normal-usage",toString:function(){return this.url}}},8414(t,e,r){t.exports={id:"ic-countdown-dark-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-countdown-dark-active-usage",toString:function(){return this.url}}},3273(t,e,r){t.exports={id:"ic-countdown-dark-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-countdown-dark-normal-usage",toString:function(){return this.url}}},416(t,e,r){t.exports={id:"ic-countdown-light-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-countdown-light-active-usage",toString:function(){return this.url}}},9423(t,e,r){t.exports={id:"ic-countdown-light-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-countdown-light-normal-usage",toString:function(){return this.url}}},5692(t,e,r){t.exports={id:"ic-highest-lowest-dark-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-highest-lowest-dark-active-usage",toString:function(){return this.url}}},3235(t,e,r){t.exports={id:"ic-highest-lowest-dark-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-highest-lowest-dark-normal-usage",toString:function(){return this.url}}},5126(t,e,r){t.exports={id:"ic-highest-lowest-light-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-highest-lowest-light-active-usage",toString:function(){return this.url}}},6577(t,e,r){t.exports={id:"ic-highest-lowest-light-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-highest-lowest-light-normal-usage",toString:function(){return this.url}}},3544(t,e,r){t.exports={id:"ic-historical-dark-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-historical-dark-active-usage",toString:function(){return this.url}}},135(t,e,r){t.exports={id:"ic-historical-dark-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-historical-dark-normal-usage",toString:function(){return this.url}}},1722(t,e,r){t.exports={id:"ic-historical-light-active-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-historical-light-active-usage",toString:function(){return this.url}}},1949(t,e,r){t.exports={id:"ic-historical-light-normal-usage",viewBox:"0 0 160 120",url:r.p+"sprite-c5754f.smartcharts.svg#ic-historical-light-normal-usage",toString:function(){return this.url}}},3893(t,e,r){t.exports={id:"ic-theme-dark-usage",viewBox:"0 0 236 180",url:r.p+"sprite-c5754f.smartcharts.svg#ic-theme-dark-usage",toString:function(){return this.url}}},963(t,e,r){t.exports={id:"ic-theme-light-usage",viewBox:"0 0 236 180",url:r.p+"sprite-c5754f.smartcharts.svg#ic-theme-light-usage",toString:function(){return this.url}}},1345(t,e,r){t.exports={id:"ic-empty-state-usage",viewBox:"0 0 96 96",url:r.p+"sprite-c5754f.smartcharts.svg#ic-empty-state-usage",toString:function(){return this.url}}},1593(t,e,r){t.exports={id:"ic-overwrite-state-usage",viewBox:"0 0 128 128",url:r.p+"sprite-c5754f.smartcharts.svg#ic-overwrite-state-usage",toString:function(){return this.url}}},6456(t,e,r){t.exports={id:"ic-basket-active-usage",viewBox:"0 0 32 32",url:r.p+"sprite-c5754f.smartcharts.svg#ic-basket-active-usage",toString:function(){return this.url}}},2999(t,e,r){t.exports={id:"ic-basket-normal-usage",viewBox:"0 0 16 15",url:r.p+"sprite-c5754f.smartcharts.svg#ic-basket-normal-usage",toString:function(){return this.url}}},8310(t,e,r){t.exports={id:"ic-commodities-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-commodities-normal-usage",toString:function(){return this.url}}},1288(t,e,r){t.exports={id:"ic-cryptocurrency-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-cryptocurrency-normal-usage",toString:function(){return this.url}}},7528(t,e,r){t.exports={id:"ic-forex-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-forex-normal-usage",toString:function(){return this.url}}},3522(t,e,r){t.exports={id:"ic-indices-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-indices-normal-usage",toString:function(){return this.url}}},6380(t,e,r){t.exports={id:"ic-otc-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-otc-normal-usage",toString:function(){return this.url}}},9317(t,e,r){t.exports={id:"ic-synth-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-synth-normal-usage",toString:function(){return this.url}}},6800(t,e,r){t.exports={id:"ic-volatility-normal-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-volatility-normal-usage",toString:function(){return this.url}}},8927(t,e,r){t.exports={id:"ic-tick-usage",viewBox:"0 0 16 16",url:r.p+"sprite-c5754f.smartcharts.svg#ic-tick-usage",toString:function(){return this.url}}},6667(t,e,r){t.exports={id:"ic-time-usage",viewBox:"0 0 12 12",url:r.p+"sprite-c5754f.smartcharts.svg#ic-time-usage",toString:function(){return this.url}}},8737(t,e,r){var i={"./ar.json":[1405,[785]],"./bn.json":[8462,[50]],"./de.json":[393,[409]],"./es.json":[6870,[146]],"./fr.json":[9358,[826]],"./id.json":[87,[823]],"./it.json":[5191,[159]],"./km.json":[3926,[422]],"./ko.json":[2900,[800]],"./messages.json":[7730,[710]],"./mn.json":[3221,[521]],"./nl.json":[7840,[424]],"./pl.json":[6426,[634]],"./pt.json":[8082,[490]],"./ru.json":[3351,[191]],"./si.json":[3026,[834]],"./sw.json":[4500,[456]],"./th.json":[8106,[522]],"./tr.json":[2880,[28]],"./uz.json":[8201,[813]],"./vi.json":[9143,[935]],"./zh.json":[6424,[864]],"./zh_cn.json":[5988,[606]],"./zh_tw.json":[9524,[602]]};function a(t){if(!r.o(i,t))return Promise.resolve().then(()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e});var e=i[t],a=e[0];return r.e(e[1][0]).then(()=>r.t(a,19))}a.keys=()=>Object.keys(i),a.id=8737,t.exports=a},4511(e){"use strict";e.exports=t},255(t){"use strict";t.exports=e},3095(t){"use strict";t.exports=r},809(t){"use strict";t.exports=i},7423(t){"use strict";t.exports=a},8046(t){"use strict";t.exports=s},9751(t){"use strict";t.exports=n},7073(t,e){var r;!function(){"use strict";var i={}.hasOwnProperty;function a(){for(var t="",e=0;e<arguments.length;e++){var r=arguments[e];r&&(t=n(t,s(r)))}return t}function s(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return a.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var r in t)i.call(t,r)&&t[r]&&(e=n(e,r));return e}function n(t,e){return e?t?t+" "+e:t+e:t}t.exports?(a.default=a,t.exports=a):void 0===(r=function(){return a}.apply(e,[]))||(t.exports=r)}()}},d={};function g(t){var e=d[t];if(void 0!==e)return e.exports;var r=d[t]={exports:{}};return u[t].call(r.exports,r,r.exports,g),r.exports}g.m=u,g.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return g.d(e,{a:e}),e},l=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,g.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var r=Object.create(null);g.r(r);var i={};o=o||[null,l({}),l([]),l(l)];for(var a=2&e&&t;("object"==typeof a||"function"==typeof a)&&!~o.indexOf(a);a=l(a))Object.getOwnPropertyNames(a).forEach(e=>i[e]=()=>t[e]);return i.default=()=>t,g.d(r,i),r},g.d=(t,e)=>{for(var r in e)g.o(e,r)&&!g.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},g.f={},g.e=t=>Promise.all(Object.keys(g.f).reduce((e,r)=>(g.f[r](t,e),e),[])),g.u=t=>({28:"tr-json",50:"bn-json",146:"es-json",159:"it-json",191:"ru-json",409:"de-json",422:"km-json",424:"nl-json",456:"sw-json",490:"pt-json",521:"mn-json",522:"th-json",526:"html2canvas",590:"resize-observer-polyfill",602:"zh_tw-json",606:"zh_cn-json",634:"pl-json",710:"messages-json",776:"flutter-chart-loader",785:"ar-json",800:"ko-json",813:"uz-json",823:"id-json",826:"fr-json",834:"si-json",864:"zh-json",935:"vi-json",937:"lz-string"}[t]+"-"+{28:"9b9028",50:"0d6eca",146:"85869d",159:"3a6a0a",191:"64ef7d",409:"b3239f",422:"6c33fb",424:"0b1291",456:"637b1d",490:"f62ac5",521:"324f5d",522:"0a9ace",526:"33f82f",590:"ca29ff",602:"891074",606:"06d50e",634:"408399",710:"dcf345",776:"b20830",785:"0f73c7",800:"6618e5",813:"bed401",823:"fd1066",826:"69f949",834:"da53eb",864:"bf1035",935:"86cd8b",937:"0c6be0"}[t]+".smartcharts.js"),g.miniCssF=t=>{},g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),g.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),c={},h="smartcharts:",g.l=(t,e,r,i)=>{if(c[t])c[t].push(e);else{var a,s;if(void 0!==r)for(var n=document.getElementsByTagName("script"),o=0;o<n.length;o++){var l=n[o];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")==h+r){a=l;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",g.nc&&a.setAttribute("nonce",g.nc),a.setAttribute("data-webpack",h+r),a.src=t),c[t]=[e];var u=(e,r)=>{a.onerror=a.onload=null,clearTimeout(d);var i=c[t];if(delete c[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach(t=>t(r)),e)return e(r)},d=setTimeout(u.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=u.bind(null,a.onerror),a.onload=u.bind(null,a.onload),s&&document.head.appendChild(a)}},g.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},g.p="",(()=>{var t={792:0};g.f.j=(e,r)=>{var i=g.o(t,e)?t[e]:void 0;if(0!==i)if(i)r.push(i[2]);else{var a=new Promise((r,a)=>i=t[e]=[r,a]);r.push(i[2]=a);var s=g.p+g.u(e),n=new Error;g.l(s,r=>{if(g.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var a=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;n.message="Loading chunk "+e+" failed.\n("+a+": "+s+")",n.name="ChunkLoadError",n.type=a,n.request=s,i[1](n)}},"chunk-"+e,e)}};var e=(e,r)=>{var i,a,[s,n,o]=r,l=0;if(s.some(e=>0!==t[e])){for(i in n)g.o(n,i)&&(g.m[i]=n[i]);if(o)o(g)}for(e&&e(r);l<s.length;l++)a=s[l],g.o(t,a)&&t[a]&&t[a][0](),t[a]=0},r=self.webpackChunksmartcharts=self.webpackChunksmartcharts||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})();var m={};return(()=>{"use strict";g.d(m,{default:()=>Wr});var t=g(7073),e=g.n(t),r=g(9751),i=g(809),a=g.n(i),s=g(8046),n=g(5877),o=g(12),l=g.n(o),c=g(1993);function h(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class u{set zIndex(t){this._line&&t&&(this._line.style.zIndex=t.toString())}get pip(){return this.mainStore.chart.currentActiveSymbol?.decimal_places}constructor(t){h(this,"__top",0),h(this,"_emitter",void 0),h(this,"_line",void 0),h(this,"_priceConstrainer",0),h(this,"_startDragPrice","0"),h(this,"className",void 0),h(this,"hideBarrierLine",void 0),h(this,"hideOffscreenLine",void 0),h(this,"mainStore",void 0),h(this,"opacityOnOverlap",0),h(this,"showOffscreenArrows",!1),h(this,"_relative",!1),h(this,"draggable",!0),h(this,"isDragging",!1),h(this,"visible",!0),h(this,"_price","0"),h(this,"_dragPrice","0"),h(this,"offScreen",!1),h(this,"title",void 0),h(this,"isOverlapping",!1),h(this,"isOverlappingWithPriceLine",!1),h(this,"offScreenDirection",null),h(this,"disposeDrawReaction",void 0),h(this,"onChartLoaded",()=>{this.disposeDrawReaction=(0,s.reaction)(()=>[this.mainStore.chartAdapter.epochBounds,this.mainStore.chartAdapter.quoteBounds,this.mainStore.chart.lastQuote],()=>{this.isDragging||this._draw()}),this.mainStore.chartAdapter.painter.registerCallback(this.drawBarrier)}),h(this,"init",()=>{const t=(t,e)=>{this.visible&&this.draggable&&e.call(this,t)},e=document.querySelector(".ciq-chart-area");this._line&&e&&(0,c.Ou)(this._line,e,{onDragStart:e=>t(e,this._startDrag),onDrag:r=>t(r,t=>this._dragLine(t,e)),onDragReleased:e=>t(e,this._endDrag)})}),h(this,"_startDrag",()=>{this.isDragging=!0,this.mainStore.chart.isBarrierDragging=!0,this.dragPrice=this.price,this._startDragPrice=this._price}),h(this,"_dragLine",(t,e)=>{if(!this._line)return;const{top:r}=e.getBoundingClientRect(),i=t.pageY-r,a=i&&i+2;let s=a&&this._priceFromLocation(a);"function"==typeof this._priceConstrainer&&(s=this._priceConstrainer(s)),this.relative&&(s-=this.mainStore.chart.currentClose),this.dragPrice=`${s}`}),h(this,"_endDrag",()=>{this.isDragging=!1,this.mainStore.chart.isBarrierDragging=!1,Number(this._startDragPrice).toFixed(this.pip)!==Number(this.dragPrice).toFixed(this.pip)&&(this.price=this.dragPrice,this._emitter.emit(u.EVENT_DRAG_RELEASED,this._price))}),h(this,"_calculateTop",t=>{if(null===this.mainStore.chart.currentCloseQuote()||!this.mainStore.chartAdapter.isChartLoaded)return;let e=this._locationFromPrice(t||+this.realPrice);const r=window.flutterChartElement?.clientHeight||0;return e<0?(e<-2&&(this.offScreenDirection=c.X.UP),e=0):e+4>r?(e+4-r>2&&(this.offScreenDirection=c.X.DOWN),e=r-4):this.offScreenDirection=null,this.offScreen=!!this.offScreenDirection,e+30>r?e=r-30:e<10&&(e=10),this.offScreenDirection&&this.showOffscreenArrows&&(e+=this.offScreenDirection===c.X.UP?+c.KC:-c.KC),this.opacityOnOverlap&&(this.isOverlapping=this.overlapCheck(e)),this.isOverlappingWithPriceLine=this._distanceFromCurrentPrice()<25,0|Math.round(e)}),h(this,"_draw",()=>{this.visible&&this._line&&(this.top=this._calculateTop())}),(0,s.makeObservable)(this,{_dragPrice:s.observable,_price:s.observable,draggable:s.observable,isDragging:s.observable,isOverlapping:s.observable,isOverlappingWithPriceLine:s.observable,offScreen:s.observable,offScreenDirection:s.observable,title:s.observable,visible:s.observable,overlappedBarrierWidth:s.computed,pip:s.computed,priceDisplay:s.computed,_calculateTop:s.action.bound,_dragLine:s.action.bound,_endDrag:s.action.bound,_startDrag:s.action.bound,drawBarrier:s.action.bound,setDragLine:s.action.bound}),this.mainStore=t,this._emitter=new(l())({emitDelay:0}),(0,s.when)(()=>this.mainStore.chartAdapter.isChartLoaded,this.onChartLoaded)}drawBarrier(t){if(this.isDragging)return;const e=this.mainStore.chartAdapter.painter.lerpedClose;if(null===e)return void(this.top=this._calculateTop());const r=this._getPrice(e);this.top=this._calculateTop(r)}destructor(){this.disposeDrawReaction?.(),this.mainStore.chartAdapter.painter.unregisterCallback(this.drawBarrier)}static get EVENT_PRICE_CHANGED(){return"EVENT_PRICE_CHANGED"}static get EVENT_DRAG_RELEASED(){return"EVENT_DRAG_RELEASED"}get priceDisplay(){let t=this.isDragging?Number(this.dragPrice).toFixed(this.pip):this._price;return this.relative&&+this._price>0&&"+"!==t[0]&&(t=`+${t}`),t}get price(){return this._price}set price(t){t===this._price||this.isDragging||(this._price=t,this._draw(),this._emitter.emit(u.EVENT_PRICE_CHANGED,this._price))}get dragPrice(){return this._dragPrice}set dragPrice(t){t!=this._dragPrice&&(this._dragPrice=t,this._draw(),this._emitter.emit(u.EVENT_PRICE_CHANGED,this._dragPrice))}get relative(){return this._relative}set relative(t){if(this._relative===t)return;this._relative=t;const e=this.mainStore.chart.currentCloseQuote();let r=e?e.Close:0;this._relative&&(r=-r),this.price=(+this._price+r).toString()}get context(){return this.mainStore.chart.context}set priceConstrainer(t){this._priceConstrainer=t}get realPrice(){return this._getPrice(this.mainStore.chart.currentCloseQuote()?.Close).toString()}get priceLineWidth(){return window.flutterChart?.app.getCurrentTickWidth()||60}get overlappedBarrierWidth(){return 16}_getPrice(t){const e=this.isDragging?this.dragPrice:this.price;return this.relative?t+Number(e):Number(e)}setDragLine(t){this._line=t,this._line&&this._draw()}_locationFromPrice(t){return this.mainStore.chartAdapter.getYFromQuote(t)}_priceFromLocation(t){return this.mainStore.chartAdapter.getQuoteFromY(t)}_distanceFromCurrentPrice(){return Math.abs(this._locationFromPrice(+this.realPrice)-this._locationFromPrice(+this.realPrice-(this.isDragging?+this._dragPrice:+this._price)))}set top(t){this.__top=t,this._line&&(this._line.style.transform=`translateY(${this.top-13}px)`)}get top(){return this.__top}onPriceChanged(t){this._emitter.on(u.EVENT_PRICE_CHANGED,t)}onDragReleased(t){this._emitter.on(u.EVENT_DRAG_RELEASED,t)}overlapCheck(t){const{_barriers:e}=this.mainStore.chart,r=e.filter(t=>0!==+t._high_barrier.price),i=r.findIndex(t=>t._high_barrier===this);for(let e=0;e<r.length;e++){if(e===i)continue;const a=r[e],s=a._high_barrier.top&&Math.abs(a._high_barrier.top-t);if(s&&s<25)return!0}return!1}get isMobile(){return this.mainStore.chart.isMobile}}function d(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class p{constructor(t){d(this,"_div",null),d(this,"className",""),d(this,"visible",!1),d(this,"setPosition",({top:t,bottom:e,right:r})=>{if(this._div){let i=null;if(e&&t){i=`translate(${-r}px, ${(e+t)/2+60}px) scale(1, ${(e-t)/120})`}else e?i=`translate(${-r}px, ${e}px)`:t&&(i=`translate(${-r}px, ${t+120}px)`);this._div.style.transform=i}}),d(this,"setShadeRef",t=>{this._div=t}),(0,s.makeObservable)(this,{className:s.observable,visible:s.observable}),this.className=t}}function f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class _{static get SHADE_NONE_SINGLE(){return"SHADE_NONE_SINGLE"}static get SHADE_NONE_DOUBLE(){return"SHADE_NONE_DOUBLE"}static get SHADE_ABOVE(){return"SHADE_ABOVE"}static get SHADE_BELOW(){return"SHADE_BELOW"}static get SHADE_BETWEEN(){return"SHADE_BETWEEN"}static get SHADE_OUTSIDE(){return"SHADE_OUTSIDE"}static get BARRIER_CHANGED(){return"BARRIER_CHANGED"}get pip(){return this.mainStore.chart.currentActiveSymbol?.decimal_places}constructor(t){f(this,"_high_barrier",void 0),f(this,"_low_barrier",void 0),f(this,"aboveShadeStore",void 0),f(this,"belowShadeStore",void 0),f(this,"betweenShadeStore",void 0),f(this,"mainStore",void 0),f(this,"title",void 0),f(this,"shadeColor",void 0),f(this,"color",void 0),f(this,"foregroundColor",void 0),f(this,"backgroundColor",void 0),f(this,"isBetweenShadeVisible",!1),f(this,"isTopShadeVisible",!1),f(this,"isBottomShadeVisible",!1),f(this,"hidePriceLines",!1),f(this,"lineStyle",void 0),f(this,"isInitialized",!1),f(this,"initializePromise",(0,n.A)()),f(this,"hideBarrierLine",!1),f(this,"hideOffscreenLine",!1),f(this,"hideOffscreenBarrier",!1),f(this,"isSingleBarrier",!1),f(this,"_shadeState",""),f(this,"disposeDrawReaction",void 0),f(this,"onChartLoaded",()=>{this.init(),this.disposeDrawReaction=(0,s.reaction)(()=>[this.mainStore.chartAdapter.epochBounds,this.mainStore.chartAdapter.quoteBounds],this._drawShadedArea),this.mainStore.chartAdapter.painter.registerCallback(this._drawShadedArea)}),f(this,"_onBarrierChange",null),f(this,"_fireOnBarrierChange",()=>{const t=this._high_barrier.visible?Number(this._high_barrier.price).toFixed(this.pip):void 0,e=this._low_barrier.visible?Number(this._low_barrier.price).toFixed(this.pip):void 0;"function"==typeof this._onBarrierChange&&this._onBarrierChange({high:t,low:e})}),f(this,"_drawShadedArea",()=>{if(this.isInitialized&&(this._shadeState===_.SHADE_ABOVE?this._shadeAbove():this._shadeState===_.SHADE_BELOW?this._shadeBelow():this._shadeState===_.SHADE_BETWEEN?this._shadeBetween():this._shadeState===_.SHADE_OUTSIDE&&this._shadeOutside(),this._low_barrier.visible&&this._isBarriersOffScreen())){const t=0===this._high_barrier.top?null:101;this._high_barrier.zIndex=t}}),(0,s.makeObservable)(this,{backgroundColor:s.observable,color:s.observable,destructor:s.action.bound,foregroundColor:s.observable,hideBarrierLine:s.observable,hideOffscreenBarrier:s.observable,hideOffscreenLine:s.observable,hidePriceLines:s.observable,init:s.action.bound,initializePromise:s.observable,isBetweenShadeVisible:s.observable,isBottomShadeVisible:s.observable,isInitialized:s.observable,isSingleBarrier:s.observable,isTopShadeVisible:s.observable,lineStyle:s.observable,pip:s.computed,shadeColor:s.observable,updateProps:s.action.bound}),this.mainStore=t,this._high_barrier=new u(this.mainStore),this._low_barrier=new u(this.mainStore),this._high_barrier.onPriceChanged(this._drawShadedArea),this._low_barrier.onPriceChanged(this._drawShadedArea),this._high_barrier.onDragReleased(this._fireOnBarrierChange),this._low_barrier.onDragReleased(this._fireOnBarrierChange),this._setupConstrainBarrierPrices(),this.aboveShadeStore=new p("top-shade"),this.betweenShadeStore=new p("between-shade"),this.belowShadeStore=new p("bottom-shade"),this.shadeState=_.SHADE_NONE_SINGLE,(0,s.when)(()=>this.mainStore.chartAdapter.isChartLoaded,this.onChartLoaded),this.mainStore.chart._barriers.push(this)}init(){this.isInitialized=!0,this.initializePromise.resolve()}updateProps({color:t,foregroundColor:e,backgroundColor:r,shadeColor:i,shade:a,high:n,low:o,relative:l,draggable:h,onChange:u,hideBarrierLine:d,hideOffscreenBarrier:g,hideOffscreenLine:m,hidePriceLines:p,lineStyle:f,title:_,showOffscreenArrows:b,isSingleBarrier:v,opacityOnOverlap:y}){this.initializePromise.then((0,s.action)(()=>{if(t&&(this.color=t),e&&(this.foregroundColor=e),void 0!==r&&(this.backgroundColor=r),i&&(this.shadeColor=i),a&&(this.shadeState=`SHADE_${a}`.toUpperCase()),void 0!==l&&(this.relative=l),void 0!==h&&(this.draggable=h),void 0!==n){const t=(0,c.Jn)(n,this.pip);t!==this.high_barrier&&(this.high_barrier=t)}if(void 0!==o){const t=(0,c.Jn)(o,this.pip);t!==this.low_barrier&&(this.low_barrier=t)}u&&(this.onBarrierChange=u),_&&(this.title=_),this.lineStyle=f,this.hideBarrierLine=!!d,this.hidePriceLines=!!p,this.hideOffscreenLine=!!m,this.hideOffscreenBarrier=!!g,this.isSingleBarrier=!!v})),y&&(this.opacityOnOverlap=y),b&&(this.showOffscreenArrows=b)}destructor(){if(!this.context)return;this._high_barrier.destructor(),this._low_barrier.destructor(),this.disposeDrawReaction?.(),this.mainStore.chartAdapter.painter.unregisterCallback(this._drawShadedArea);const t=this.mainStore.chart._barriers.findIndex(t=>t===this);-1!==t&&this.mainStore.chart._barriers.splice(t,1)}get high_barrier(){return this._high_barrier.price}set high_barrier(t){this._high_barrier.price=t}get low_barrier(){return this._low_barrier.price}set low_barrier(t){this._low_barrier.price=t}_setupConstrainBarrierPrices(){this._high_barrier.priceConstrainer=t=>+(this._low_barrier.visible&&t<+this._low_barrier.realPrice?this._high_barrier.realPrice:t),this._low_barrier.priceConstrainer=t=>+(t>+this._high_barrier.realPrice?this._low_barrier.realPrice:t)}get context(){return this.mainStore.chart.context}set onBarrierChange(t){this._onBarrierChange!==t&&(this._onBarrierChange=t)}get shadeState(){return this._shadeState}set shadeState(t){if(this._shadeState===t)return;this._shadeState=t;if(this._shadeState===_.SHADE_NONE_SINGLE||this._shadeState===_.SHADE_NONE_DOUBLE)this.aboveShadeStore.visible=!1,this.betweenShadeStore.visible=!1,this.belowShadeStore.visible=!1;else{const t=this._shadeState===_.SHADE_ABOVE||this._shadeState===_.SHADE_OUTSIDE,e=this._shadeState===_.SHADE_BELOW||this._shadeState===_.SHADE_OUTSIDE,r=this._shadeState===_.SHADE_BETWEEN;this.aboveShadeStore.visible=t,this.betweenShadeStore.visible=r,this.belowShadeStore.visible=e,this._drawShadedArea()}const e=this._shadeState===_.SHADE_OUTSIDE||this._shadeState===_.SHADE_BETWEEN||this._shadeState===_.SHADE_NONE_DOUBLE,r=this._low_barrier.visible;this._low_barrier.visible=e,this.isInitialized&&e&&!r&&this._low_barrier.realPrice>=this._high_barrier.realPrice&&this.mainStore.chart.currentClose&&(this._low_barrier.price=(+this._high_barrier.price-this.mainStore.chart.currentClose).toString())}get relative(){return this._high_barrier.relative}set relative(t){this._high_barrier.relative=t,this._low_barrier.relative=t}get draggable(){return this._high_barrier.draggable}set draggable(t){this._high_barrier.draggable=t,this._low_barrier.draggable=t}get showOffscreenArrows(){return this._high_barrier.showOffscreenArrows}set showOffscreenArrows(t){this._high_barrier.showOffscreenArrows=t}get opacityOnOverlap(){return this._high_barrier.opacityOnOverlap}set opacityOnOverlap(t){this._high_barrier.opacityOnOverlap=t}_isBarriersOffScreen(){return this._high_barrier.offScreen&&this._low_barrier.offScreen}_shadeBetween(){this.betweenShadeStore.setPosition({top:this._high_barrier.top,bottom:this._low_barrier.top,right:this.mainStore.chart.yAxisWidth})}_shadeBelow(t=this._high_barrier){this.belowShadeStore.setPosition({top:t.top,bottom:0,right:this.mainStore.chart.yAxisWidth})}_shadeAbove(t=this._high_barrier){this.aboveShadeStore.setPosition({top:0,bottom:t.top,right:this.mainStore.chart.yAxisWidth})}_shadeOutside(){this._shadeAbove(this._high_barrier),this._shadeBelow(this._low_barrier)}}var b=g(8362),v=g(3095);const y=({StoreClass:t,...e})=>{const r=(0,b.gy)(),i=a().useRef();return(t=>{const e=a().useRef(!1);e.current||(t(),e.current=!0)})(()=>{i.current=new t(r)}),a().useEffect(()=>{i.current?.updateProps?.(e)}),a().useEffect(()=>()=>{i.current?.destructor?.()},[]),(0,v.jsx)(v.Fragment,{children:e.children(i.current)})},S=(t,e)=>({children:r,...i})=>(0,v.jsx)(y,{StoreClass:e,...i,children:e=>(0,v.jsx)(t,{store:e,...i,children:r})});var x=g(1186);const w=({offScreenDirection:t})=>{const e=t===c.X.UP?"23px":-c.KC+"px",r=t===c.X.DOWN?"rotate(180deg)":"";return t===c.X.UP?(0,v.jsx)(x.oX,{className:"arrow-icon",style:{top:e,transform:r}}):(0,v.jsx)(x.BC,{className:"arrow-icon",style:{top:e,transform:r}})},C=({color:t,yAxiswidth:e,title:r,opacity:i})=>(0,v.jsx)("div",{className:"title-wrapper",style:{color:t,right:e,opacity:i},children:(0,v.jsx)("span",{className:"title",children:r})}),T=({isOverlapping:t})=>(0,v.jsxs)("div",{className:e()("drag-icon",{"drag-icon--hidden":t}),children:[(0,v.jsx)("div",{className:e()({"drag-icon--hidden":t})}),(0,v.jsx)("div",{className:e()({"drag-icon--hidden":t})}),(0,v.jsx)("div",{className:e()({"drag-icon--hidden":t})})]}),k=(0,r.observer)(({lineStyle:t,backgroundColor:r,color:i,foregroundColor:s,hideOffscreenBarrier:n,opacityOnOverlap:o,hideOffscreenLine:l,hideBarrierLine:c,store:h,title:u})=>{const{className:d,draggable:g,init:m,isDragging:p,isMobile:f,isOverlapping:_,isOverlappingWithPriceLine:b,offScreen:y,offScreenDirection:S,overlappedBarrierWidth:x,priceDisplay:k,priceLineWidth:j,setDragLine:N,visible:E}=h,A=a().useMemo(()=>!(n&&y),[n,y]),I=a().useMemo(()=>!(c||l&&y||_),[c,l,y,_]),D=a().useMemo(()=>_?o:"",[_,o]);if(a().useEffect(()=>{m()},[m]),!A)return null;const O=j+18,P=f?20:3;return(0,v.jsx)("div",{className:e()("barrier-area",{"barrier-area--zero":b}),ref:N,hidden:!E,children:(0,v.jsxs)("div",{className:e()("chart-line","horizontal",d||"",{draggable:g,dragging:p}),style:{color:s},children:[I&&(0,v.jsx)("div",{className:e()("drag-line",{"drag-line--zero":b}),style:{borderTopColor:i,borderTopStyle:t,width:`calc(100% - ${O}px + ${f?0:x-4}px)`}}),(0,v.jsx)("div",{className:"draggable-area"}),(0,v.jsx)("div",{className:"draggable-area-wrapper",children:(0,v.jsxs)("div",{className:e()("drag-price",{"drag-price--narrow":b}),style:{backgroundColor:b?void 0:r,color:b?i:s,borderColor:i,width:g&&b?O+8:O-6,opacity:D,right:P},children:[(0,v.jsx)(T,{isOverlapping:b}),(0,v.jsx)("div",{className:e()("price",{"price--zero":b}),style:{color:b?i:"",right:b?x+6+8*k.length+(g?26:0):0},children:k}),(0,v.jsx)("div",{}),y&&S&&(0,v.jsx)(w,{offScreenDirection:S,color:i})]})}),u&&(0,v.jsx)(C,{color:i,title:u,yAxiswidth:O+P,opacity:D})]})})}),j=(0,r.observer)(({store:t})=>{const{visible:r,className:i,setShadeRef:a}=t;return(0,v.jsx)("div",{className:e()("shade",i,{hidden:!r}),ref:a,style:{top:-120}})}),N=S((0,r.observer)(({store:t,...r})=>{const{_high_barrier:i,_low_barrier:s,aboveShadeStore:n,belowShadeStore:o,betweenShadeStore:l,backgroundColor:c="#2C9AFF",color:h="#008832",foregroundColor:u="#ffffff",hideBarrierLine:d,hideOffscreenBarrier:g,hideOffscreenLine:m,hidePriceLines:p,isInitialized:f,isSingleBarrier:_,lineStyle:b,opacityOnOverlap:y,shadeColor:S="#008832"}=t,x=a().useRef(null);return a().useEffect(()=>{f&&x.current&&x.current.addEventListener("wheel",t=>{t.preventDefault()})},[f]),f?(0,v.jsxs)("div",{className:e()("barrier",{"hide-pricelines":p}),style:{"--shade-color":S},ref:x,children:[(0,v.jsx)(k,{store:i,lineStyle:b,backgroundColor:c,color:h,foregroundColor:u,hideOffscreenBarrier:g,hideOffscreenLine:m,hideBarrierLine:d,opacityOnOverlap:y,...r}),!_&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(k,{store:s,lineStyle:b,backgroundColor:c,color:h,foregroundColor:u,hideOffscreenBarrier:g,hideOffscreenLine:m,hideBarrierLine:d,opacityOnOverlap:y,...r}),(0,v.jsx)(j,{store:n}),(0,v.jsx)(j,{store:o}),(0,v.jsx)(j,{store:l})]})]}):null}),_);var E=g(1045),A=g(7149);g(8258),g(4282);const I=(0,r.observer)(({children:t,className:r,height:i,width:a,autoHide:s,freeze:n=!1,onScroll:o=()=>null,setPanel:l})=>{const{scroll:c}=(0,b.gy)(),{setScrollPanel:h,isHover:u}=c;return(0,v.jsx)("div",{ref:t=>{h(t),l&&l(t)},className:e()("sc-scrollbar",r,{"sc-scrollbar--freeze":n,"sc-scrollbar--auto-hide":s,"sc-scrollbar--hover":u}),onScroll:o,style:{maxHeight:i||"100%",maxWidth:a||"none"},children:t})});g(1849);const D=(0,r.observer)(({height:t,store:e,children:r})=>{const{getItems:i,onItemClick:a}=e,s="function"==typeof r?r:t=>t.text,n=t=>"ciq-list-item "+(t.disabled?"disabled":"")+" "+(t.active?"active":"");return(0,v.jsx)(I,{className:"ciq-list",autoHide:!0,height:t?`${t}px`:"",children:i().map((t,e)=>(0,v.jsx)("div",{className:n(t),onClick:()=>a(e,t),children:s(t)},t.id))})});var O=g(481),P=g(9160).t;const L=({Icon:t,...e})=>(0,v.jsx)(t,{...e}),M=(0,r.observer)(({enabled:t,newDesign:e,onChange:r})=>{const{chartType:i,chart:a,state:s,loader:n}=(0,b.gy)(),{listStore:o,setChartType:l,updateProps:h,types:u,type:d,menuStore:g}=i,{open:m,setOpen:p}=i.menuStore,{isActive:f}=n,{isMobile:_}=a,y=r||l;if(void 0===d)return null;return h(y),e?(0,v.jsx)("div",{className:"sc-chart-type",children:u.map(t=>{const e=t.icon;let r="sc-chart-type__item";r+=t.active&&!f?" sc-chart-type__item--active":"",r+=t.disabled||f?" sc-chart-type__item--disabled":"";return(0,v.jsxs)(A.A,{enabled:t.disabled&&!f&&!_,className:r,content:P.translate("Available only for non-tick time intervals."),onClick:()=>t.disabled||f?null:(t=>{d.id!==t.id&&(t.id&&s.stateChange(E.c4.CHART_TYPE_CHANGE,{chart_type_name:"colored_bar"===t.id?t.text:t.text.toLowerCase(),time_interval_name:(0,c.mI)(s.granularity,E.NI)}),y(t.id)),p(!1)})(t),children:[(0,v.jsx)(e,{}),(0,v.jsx)("span",{className:"text",children:P.translate(t.text)})]},t.id)})}):(0,v.jsxs)(O.A,{store:g,className:"ciq-display ciq-chart-types",enabled:t,title:P.translate("Chart types"),children:[(0,v.jsx)(O.A.Title,{children:(0,v.jsx)(L,{Icon:d.icon,className:"ic-icon-with-sub "+(m?"active":""),"tooltip-title":P.translate(d.text)})}),(0,v.jsx)(O.A.Body,{children:(0,v.jsx)("div",{className:"body",children:(0,v.jsx)(D,{height:260,store:o,children:t=>(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)("span",{className:"left",children:[(0,v.jsx)(L,{Icon:d.icon,className:"margin "+(t.active?"active":"")}),(0,v.jsx)("span",{className:"ciq-icon-text",children:t.text})]})})})})})]})});g(5511);var R=g(1109),B=(g(4321),g(809)),F=g(9160).t;const V=({title:t,type:e,children:r})=>(0,v.jsxs)("div",{className:"form__group "+(e?`form__group--${e}`:""),children:[t&&(0,v.jsx)("div",{className:"form__label",children:(0,v.jsxs)("span",{children:[" ",t," "]})}),(0,v.jsx)("div",{className:"form__control",children:r})]}),H=({id:t,label:e,checked:r,disabled:i,onChange:a})=>(0,v.jsx)("span",{onClick:()=>a(!r),children:(0,v.jsxs)("label",{htmlFor:t,className:`sc-checkbox ${r?"sc-checkbox--checked":""} ${i?"sc-checkbox--disabled":""}`,children:[r?(0,v.jsx)(x.FT,{className:"sc-checkbox__box"}):(0,v.jsx)(x.Ri,{className:"sc-checkbox__box"}),(0,v.jsx)("span",{className:"sc-checkbox__label",children:e})]})}),q=({min:t=1,max:e=10,step:r=1,value:i,onChange:a})=>{const s=B.useMemo(()=>{const r=Math.round(238*(i-t)/(e-t));return r<0?0:r},[i,t,e]),n=B.useCallback(t=>{let e=t.currentTarget.value;e.length>0&&a(Number(e))},[a]);return(0,v.jsxs)("div",{className:"sc-slider",children:[(0,v.jsxs)("div",{className:"sc-slider-range",children:[(0,v.jsx)("div",{className:"sc-slider-bar"}),(0,v.jsx)("div",{className:"sc-slider-active-bar",style:{width:s}}),(0,v.jsx)("input",{type:"range",min:t,max:e,step:r,onChange:n,value:i})]}),(0,v.jsx)("div",{className:"value",children:i})]})},$=t=>{const{subtitle:r,rows:i,children:a,value:s,onRowClick:n,className:o}=t,[l,c]=B.useState(!1),[h,u]=B.useState(0),[d,g]=B.useState(0),[m,p]=B.useState(),f=B.useRef(null),_=B.useRef(null),b=B.useCallback(()=>{const t=f.current?.getBoundingClientRect();u(l?void 0:t?.top),g(l?void 0:t?.left),p(t?.width),c(t=>!t)},[l,f]),y=B.useCallback(t=>{t.target!==_.current&&(c(!1),u(0),g(0))},[_]);return B.useEffect(()=>(document.addEventListener("click",y,!1),()=>{document.removeEventListener("click",y)}),[y]),(0,v.jsxs)("div",{className:e()(o,"sc-dropdown",{active:l}),ref:f,style:{left:d,top:h,width:m},children:[!!r&&(0,v.jsx)("div",{className:"subtitle",children:(0,v.jsx)("span",{children:r})}),(0,v.jsxs)("div",{className:e()("value",{active:l}),onClick:b,ref:_,children:[(0,v.jsx)("span",{className:"text",children:s}),(0,v.jsx)(x.HK,{})]}),(0,v.jsx)(I,{autoHide:!0,height:""+(l?"200px":"1px"),className:e()("dropdown",{active:l}),children:i.map((t,r)=>(0,v.jsx)("div",{className:e()("row",{"row--selected":t===s}),onClick:()=>n&&n(t),children:a(t)},r))})]})},U=({pattern:t,subtitle:e,lineWidth:r,onChange:i})=>(0,v.jsx)($,{rows:[{width:1,pattern:"solid"},{width:3,pattern:"solid"},{width:5,pattern:"solid"},{width:1,pattern:"dotted"},{width:3,pattern:"dotted"},{width:5,pattern:"dotted"},{width:1,pattern:"dashed"},{width:3,pattern:"dashed"},{width:5,pattern:"dashed"},{width:0,pattern:"none"}],value:"none"!==t?(0,v.jsx)("span",{className:`option ${t}-${r}`}):(0,v.jsx)("span",{className:"none",children:"None"}),onRowClick:i,subtitle:e,children:t=>"none"!==t.pattern?(0,v.jsx)("span",{className:`option ${t.pattern}-${t.width}`}):(0,v.jsx)("span",{className:"none",children:"None"})}),z=({subtitle:t,color:r,theme:i,setColor:a})=>{const[s,n]=B.useState(!1),[o,l]=B.useState(0),[c,h]=B.useState(0),[u,d]=B.useState(),g=B.useRef(null),m=B.useRef(null),p=B.useMemo(()=>"auto"!==r?r:"light"===i?"#000000":"#ffffff",[r,i]),f=B.useCallback(()=>{const t=g.current?.getBoundingClientRect();l(s?void 0:t?.top),h(s?void 0:t?.left),d(t?.width),n(t=>!t)},[s,g]),_=B.useCallback(t=>{t.target!==m.current&&(n(!1),l(0),h(0))},[m]);return B.useEffect(()=>(document.addEventListener("click",_,!1),()=>{document.removeEventListener("click",_)}),[_]),(0,v.jsxs)("div",{ref:g,className:e()("sc-color-picker",{active:s}),style:{top:o,left:c,width:u},children:[!!t&&(0,v.jsx)("div",{className:"subtitle",children:(0,v.jsx)("span",{children:t})}),(0,v.jsxs)("div",{className:"value",onClick:f,ref:m,children:[(0,v.jsx)("div",{className:"sc-input-color",style:{backgroundColor:p}}),(0,v.jsx)(x.HK,{})]}),(0,v.jsx)("div",{className:e()("dropdown",{open:s}),children:[["#ffffff","#e1e1e1","#cccccc","#b7b7b7","#a0a0a5","#898989","#707070","#626262","#555555","#464646","#363636","#262626","#1d1d1d","#000000"],["#f4977c","#f7ac84","#fbc58d","#fff69e","#c4de9e","#85c99e","#7fcdc7","#75d0f4","#81a8d7","#8594c8","#8983bc","#a187bd","#bb8dbe","#f29bc1"],["#ef6c53","#f38d5b","#f8ae63","#fff371","#acd277","#43b77a","#2ebbb3","#00bff0","#4a8dc8","#5875b7","#625da6","#8561a7","#a665a7","#ee6fa9"],["#ea1d2c","#ee652e","#f4932f","#fff126","#8ec648","#00a553","#00a99c","#00afed","#0073ba","#0056a4","#323390","#66308f","#912a8e","#e9088c"],["#9b0b16","#9e4117","#a16118","#c6b920","#5a852d","#007238","#00746a","#0077a1","#004c7f","#003570","#1d1762","#441261","#62095f","#9c005d"],["#770001","#792e03","#7b4906","#817a0b","#41661e","#005827","#005951","#003b5c","#001d40","#000e35","#04002c","#19002b","#2c002a","#580028"]].map((t,e)=>(0,v.jsx)("div",{className:"row",children:t.map(t=>(0,v.jsx)("div",{className:"tile-color",style:{backgroundColor:t},onClick:()=>a(t)},t))},e))})]})},G=({value:t,onChange:e})=>(0,v.jsx)("div",{className:"sc-switch "+(t?"on":"off"),onClick:()=>e(!t),children:(0,v.jsx)("div",{className:"handle"})}),W=({id:t,label:e,value:r,onChange:i,noramIcon:a,activeIcon:s})=>{const n=r?s:a;return(0,v.jsxs)("div",{className:"sc-switch-icon",children:[(0,v.jsx)(n,{className:"sc-switch-icon__icon"}),(0,v.jsx)("div",{className:"sc-switch-icon__description",children:(0,v.jsx)(H,{id:t,label:e,checked:r,onChange:i})})]})},K=({subtitle:t,onChange:e,min:r,max:i,step:a,value:s})=>{const[n,o]=B.useState(""),l=(0,R.s)(()=>{const t=t=>{o(t),e(t)};void 0!==i&&+n>i?t(i):void 0!==r&&+n<r?t(r):e(n)},300,{leading:!0,trailing:!1});return B.useEffect(()=>{o(s)},[s]),(0,v.jsxs)("div",{className:"sc-numeric-input",children:[(0,v.jsx)("input",{type:"number",value:n,onBlur:l,onChange:t=>{t.persist(),o(t.target.valueAsNumber||"")},onKeyPress:t=>{["e","+","E"].includes(t.key)&&t.preventDefault(),"Enter"===t.key&&l()},min:r,max:i,step:a}),!!t&&(0,v.jsx)("div",{className:"subtitle",children:(0,v.jsx)("span",{children:t})}),(0,v.jsxs)("div",{className:"sc-numeric-input-buttons",children:[(0,v.jsx)(x.rW,{onClick:()=>{o(t=>+t+1),l()}}),(0,v.jsx)(x.PG,{onClick:()=>{o(t=>+t-1),l()}})]})]})},Q=({props:t,theme:e,onChange:r})=>{const{value:i,color:a}=t;return(0,v.jsxs)("span",{className:"sc-numbercolorpicker",children:[(0,v.jsx)(K,{value:i,subtitle:F.translate("Size"),onChange:t=>r({color:a,value:t})}),(0,v.jsx)(z,{color:a,theme:e,subtitle:F.translate("Color"),setColor:t=>r({color:t,value:i})})]})},Y=({className:t,children:e,active:r,onChange:i})=>(0,v.jsx)("div",{onClick:()=>i(!r),className:`${t||""} ${r?"active":""} sc-toggle`,children:e}),X=({onChange:t,value:e})=>{const r=r=>t({...e,...r}),{style:i,weight:a}=e;return(0,v.jsxs)("span",{className:"sc-fontsetting",children:[(0,v.jsx)(Y,{onChange:t=>r({weight:t?"bold":void 0}),active:!!a,children:(0,v.jsx)("div",{className:"sc-text-icon",children:(0,v.jsx)("b",{children:"B"})})}),(0,v.jsx)(Y,{active:!!i,onChange:t=>r({style:t?"italic":void 0}),children:(0,v.jsx)("div",{className:"sc-text-icon",children:(0,v.jsx)("i",{children:"i"})})}),(0,v.jsx)($,{className:"sc-changefontsize",rows:[8,10,12,13,14,16,20,28,36,48,64],onRowClick:t=>r({size:`${t}px`}),children:t=>(0,v.jsx)("span",{className:"option",children:t})}),(0,v.jsx)($,{className:"sc-changefontfamily",rows:["Default","Helvetica","Courier","Garamond","Palatino","Times New Roman"],onRowClick:t=>r({family:t}),children:t=>(0,v.jsx)("span",{className:"option",children:t})})]})};g(931);var Z=g(1695),J=g(9160).t;const tt=(0,r.observer)(({item:t,category:r,onClick:i,isLoading:s})=>{const{timeperiod:n,chartType:o,chart:l,state:c}=(0,b.gy)(),h=o.type.id,{allowTickChartTypeOnly:u}=c,{mainStore:d}=n,{granularity:g}=l,m=d.chart.isMobile,p=a().useMemo(()=>"tick"===r.key,[r]),f=a().useMemo(()=>((t,e,r)=>t&&e===r)(s,t.interval,g),[s,t,g]),_=a().useMemo(()=>((t,e,r)=>!t&&"line"!==r&&"tick"===e)(m,r.key,h),[m,r.key,h]),y=a().useMemo(()=>p&&"line"!==h||!p&&u,[p,h,u]),S=t.interval===g,x=a().useCallback(()=>i(h,r.key,t.interval),[h,r,t,i]);return(0,v.jsx)(A.A,{onClick:x,className:e()("sc-interval__item",{"sc-interval__item--active":S,"sc-interval__item--disabled":y||s,"pre-loading":f}),enabled:_,content:J.translate('Available only for "Area" chart type.'),children:(0,v.jsx)(Z.F,{enabled:f,children:(0,v.jsxs)("span",{children:[t.num," ",J.translate(1===t.num?r.single:r.plural)]})})},t.interval)}),et=(0,r.observer)(({portalNodeId:t,onChange:e})=>{const{timeperiod:r,loader:i}=(0,b.gy)(),{changeGranularity:s,setGranularity:n,updateProps:o,updatePortalNode:l}=r,{isActive:c}=i,h=e||n,u=(t,e,r)=>{c||"tick"===e&&"line"!==t||s(r)};return a().useEffect(()=>o(h)),l(t),(0,v.jsxs)("div",{className:"sc-interval",children:[(0,v.jsx)("div",{className:"sc-interval__head",children:(0,v.jsx)("strong",{children:J.translate("Time interval")})}),(0,v.jsx)("div",{className:"sc-interval__info",children:J.translate('Tick interval only available for "Area" Chart type.')}),(0,v.jsx)("div",{className:"sc-interval__content",children:E.NI.map(t=>t.items.map(e=>(0,v.jsx)(tt,{item:e,category:t,onClick:u,isLoading:c},e.interval)))})]})}),rt=({className:t="info-footnote",isMobile:r=!1,text:i})=>(0,v.jsx)("div",{className:e()(t,{[`${t}--mobile`]:r}),children:i}),it=a().memo(rt);var at=g(9160).t;const st={line:x.Qg,candles:x.kO,ohlc:x.Zt,hollow:x.Mz},nt=(0,r.observer)(({onChartType:t,onGranularity:r,portalNodeId:i=""})=>{const{chart:a,chartMode:s,chartType:n,timeperiod:o,state:l,chartSetting:c}=(0,b.gy)(),{menuStore:h}=s,{allowTickChartTypeOnly:u}=l,{isMobile:d}=a,{type:g}=n,{display:m}=o,{isSmoothChartEnabled:p,toggleSmoothChart:f}=c,_=s.menuStore.open,y=st[g.id];return(0,v.jsxs)(O.A,{className:"ciq-display sc-chart-mode",title:at.translate("Chart types"),tooltip:at.translate("Chart types"),modalMode:!0,isFullscreen:!0,portalNodeId:i,store:h,children:[(0,v.jsx)(O.A.Title,{children:(0,v.jsxs)("div",{className:e()("sc-chart-mode__menu",{"sc-chart-mode__menu--active":_}),children:[d&&(0,v.jsx)("span",{className:"sc-chart-mode__menu__duration",children:m}),!d&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("span",{className:"sc-chart-mode__menu__timeperiod",children:m}),(0,v.jsx)(y,{"tooltip-title":at.translate(g.text)})]})]})}),(0,v.jsxs)(O.A.Body,{children:[(0,v.jsxs)("div",{className:"sc-chart-mode__section",children:[(0,v.jsx)("div",{className:"sc-chart-mode__section__item",children:(0,v.jsx)(M,{newDesign:!0,onChange:t})}),(0,v.jsx)("div",{className:"sc-chart-mode__section__item",children:(0,v.jsx)(et,{newDesign:!0,portalNodeId:i,onChange:r})})]}),(0,v.jsx)("div",{className:"sc-chart-mode__smooth-toggle",children:(0,v.jsxs)("div",{className:"sc-chart-mode__smooth-toggle-content",children:[(0,v.jsxs)("div",{className:"sc-chart-mode__smooth-toggle-text",children:[(0,v.jsx)("div",{className:"sc-chart-mode__smooth-toggle-title",children:at.translate("Smooth chart movement")}),(0,v.jsx)("div",{className:"sc-chart-mode__smooth-toggle-description",children:at.translate("Performance may vary by device. Turn off if it lags.")})]}),(0,v.jsx)(G,{value:p,onChange:f})]})}),u&&(0,v.jsx)(it,{isMobile:d,text:at.translate("Only selected charts and time intervals are available for this trade type.")})]})]})});var ot=g(8713);function lt(t){return e=>!!e.type&&e.type.tabsRole===t}const ct=lt("Tab"),ht=lt("TabList"),ut=lt("TabPanel");function dt(t,e){return i.Children.map(t,t=>null===t?null:function(t){return ct(t)||ht(t)||ut(t)}(t)?e(t):t.props&&t.props.children&&"object"==typeof t.props.children?(0,i.cloneElement)(t,Object.assign({},t.props,{children:dt(t.props.children,e)})):t)}function gt(t,e){return i.Children.forEach(t,t=>{null!==t&&(ct(t)||ut(t)?e(t):t.props&&t.props.children&&"object"==typeof t.props.children&&(ht(t)&&e(t),gt(t.props.children,e)))})}function mt(t,e,r){let i,a=0,s=0,n=!1;const o=[];return gt(t[e],t=>{ht(t)&&(t.props&&t.props.children&&"object"==typeof t.props.children&>(t.props.children,t=>o.push(t)),n&&(i=new Error("Found multiple 'TabList' components inside 'Tabs'. Only one is allowed.")),n=!0),ct(t)?(n&&-1!==o.indexOf(t)||(i=new Error("Found a 'Tab' component outside of the 'TabList' component. 'Tab' components have to be inside the 'TabList' component.")),a++):ut(t)&&s++}),i||a===s||(i=new Error(`There should be an equal number of 'Tab' and 'TabPanel' in \`${r}\`. Received ${a} 'Tab' and ${s} 'TabPanel'.`)),i}function pt(t){var e,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=pt(t[e]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}const ft=function(){for(var t,e,r=0,i="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=pt(t))&&(i&&(i+=" "),i+=e);return i};function _t(t){let e=0;return gt(t,t=>{ct(t)&&e++}),e}const bt=["children","className","disabledTabClassName","domRef","focus","forceRenderTabPanel","onSelect","selectedIndex","selectedTabClassName","selectedTabPanelClassName","environment","disableUpDownKeys","disableLeftRightKeys"];function vt(t){return t&&"getAttribute"in t}function yt(t){return vt(t)&&t.getAttribute("data-rttab")}function St(t){return vt(t)&&"true"===t.getAttribute("aria-disabled")}let xt;const wt={className:"react-tabs",focus:!1},Ct={children:mt},Tt=t=>{(0,ot.checkPropTypes)(Ct,t,"prop","UncontrolledTabs");let e=(0,i.useRef)([]),r=(0,i.useRef)([]);const s=(0,i.useRef)();function n(e,r){if(e<0||e>=c())return;const{onSelect:i,selectedIndex:a}=t;i(e,a,r)}function o(t){const e=c();for(let r=t+1;r<e;r++)if(!St(h(r)))return r;for(let e=0;e<t;e++)if(!St(h(e)))return e;return t}function l(t){let e=t;for(;e--;)if(!St(h(e)))return e;for(e=c();e-- >t;)if(!St(h(e)))return e;return t}function c(){const{children:e}=t;return _t(e)}function h(t){return e.current[`tabs-${t}`]}function u(t){let e=t.target;do{if(d(e)){if(St(e))return;return void n([].slice.call(e.parentNode.children).filter(yt).indexOf(e),t)}}while(null!=(e=e.parentNode))}function d(t){if(!yt(t))return!1;let e=t.parentElement;do{if(e===s.current)return!0;if(e.getAttribute("data-rttabs"))break;e=e.parentElement}while(e);return!1}const g=Object.assign({},wt,t),{className:m,domRef:p}=g,f=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(g,bt);return a().createElement("div",Object.assign({},f,{className:ft(m),onClick:u,onKeyDown:function(e){const{direction:r,disableUpDownKeys:i,disableLeftRightKeys:a}=t;if(d(e.target)){let{selectedIndex:s}=t,d=!1,g=!1;"Space"!==e.code&&32!==e.keyCode&&"Enter"!==e.code&&13!==e.keyCode||(d=!0,g=!1,u(e)),(a||37!==e.keyCode&&"ArrowLeft"!==e.code)&&(i||38!==e.keyCode&&"ArrowUp"!==e.code)?(a||39!==e.keyCode&&"ArrowRight"!==e.code)&&(i||40!==e.keyCode&&"ArrowDown"!==e.code)?35===e.keyCode||"End"===e.code?(s=function(){let t=c();for(;t--;)if(!St(h(t)))return t;return null}(),d=!0,g=!0):36!==e.keyCode&&"Home"!==e.code||(s=function(){const t=c();for(let e=0;e<t;e++)if(!St(h(e)))return e;return null}(),d=!0,g=!0):(s="rtl"===r?l(s):o(s),d=!0,g=!0):(s="rtl"===r?o(s):l(s),d=!0,g=!0),d&&e.preventDefault(),g&&n(s,e)}},ref:t=>{s.current=t,p&&p(t)},"data-rttabs":!0}),function(){let s=0;const{children:n,disabledTabClassName:o,focus:l,forceRenderTabPanel:u,selectedIndex:d,selectedTabClassName:g,selectedTabPanelClassName:m,environment:p}=t;r.current=r.current||[];let f=r.current.length-c();const _=(0,i.useId)();for(;f++<0;)r.current.push(`${_}${r.current.length}`);return dt(n,t=>{let n=t;if(ht(t)){let s=0,c=!1;null==xt&&function(t){const e=t||("undefined"!=typeof window?window:void 0);try{xt=!(void 0===e||!e.document||!e.document.activeElement)}catch(t){xt=!1}}(p);const u=p||("undefined"!=typeof window?window:void 0);xt&&u&&(c=a().Children.toArray(t.props.children).filter(ct).some((t,e)=>u.document.activeElement===h(e))),n=(0,i.cloneElement)(t,{children:dt(t.props.children,t=>{const a=`tabs-${s}`,n=d===s,h={tabRef:t=>{e.current[a]=t},id:r.current[s],selected:n,focus:n&&(l||c)};return g&&(h.selectedClassName=g),o&&(h.disabledClassName=o),s++,(0,i.cloneElement)(t,h)})})}else if(ut(t)){const e={id:r.current[s],selected:d===s};u&&(e.forceRender=u),m&&(e.selectedClassName=m),s++,n=(0,i.cloneElement)(t,e)}return n})}())},kt=["children","defaultFocus","defaultIndex","focusTabOnClick","onSelect"];const jt={children:mt,onSelect:function(t,e,r,i,a){const s=t[e],n=a||e;let o=null;return s&&"function"!=typeof s?o=new Error(`Invalid ${i} \`${n}\` of type \`${typeof s}\` supplied to \`${r}\`, expected \`function\`.`):null!=t.selectedIndex&&null==s&&(o=new Error(`The ${i} \`${n}\` is marked as required in \`${r}\`, but its value is \`undefined\` or \`null\`.\n\`onSelect\` is required when \`selectedIndex\` is also set. Not doing so will make the tabs not do anything, as \`selectedIndex\` indicates that you want to handle the selected tab yourself.\nIf you only want to set the inital tab replace \`selectedIndex\` with \`defaultIndex\`.`)),o},selectedIndex:function(t,e,r,i,a){const s=t[e],n=a||e;let o=null;if(null!=s&&"number"!=typeof s)o=new Error(`Invalid ${i} \`${n}\` of type \`${typeof s}\` supplied to \`${r}\`, expected \`number\`.`);else if(null!=t.defaultIndex&&null!=s)return new Error(`The ${i} \`${n}\` cannot be used together with \`defaultIndex\` in \`${r}\`.\nEither remove \`${n}\` to let \`${r}\` handle the selected tab internally or remove \`defaultIndex\` to handle it yourself.`);return o}},Nt={defaultFocus:!1,focusTabOnClick:!0,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1,disableLeftRightKeys:!1},Et=t=>{(0,ot.checkPropTypes)(jt,t,"prop","Tabs");const e=Object.assign({},Nt,t),{children:r,defaultFocus:s,defaultIndex:n,focusTabOnClick:o,onSelect:l}=e,c=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(e,kt),[h,u]=(0,i.useState)(s),[d]=(0,i.useState)((t=>null===t.selectedIndex?1:0)(c)),[g,m]=(0,i.useState)(1===d?n||0:null);if((0,i.useEffect)(()=>{u(!1)},[]),1===d){const t=_t(r);(0,i.useEffect)(()=>{if(null!=g){const e=Math.max(0,t-1);m(Math.min(g,e))}},[t])}let p=Object.assign({},t,c);return p.focus=h,p.onSelect=(t,e,r)=>{"function"==typeof l&&!1===l(t,e,r)||(o&&u(!0),1===d&&m(t))},null!=g&&(p.selectedIndex=g),delete p.defaultFocus,delete p.defaultIndex,delete p.focusTabOnClick,a().createElement(Tt,p,r)};Et.tabsRole="Tabs";const At=Et,It=["children","className"];const Dt={className:"react-tabs__tab-list"},Ot=t=>{const e=Object.assign({},Dt,t),{children:r,className:i}=e,s=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(e,It);return a().createElement("ul",Object.assign({},s,{className:ft(i),role:"tablist"}),r)};Ot.tabsRole="TabList";const Pt=Ot,Lt=["children","className","disabled","disabledClassName","focus","id","selected","selectedClassName","tabIndex","tabRef"];const Mt="react-tabs__tab",Rt={className:Mt,disabledClassName:`${Mt}--disabled`,focus:!1,id:null,selected:!1,selectedClassName:`${Mt}--selected`},Bt=t=>{let e=(0,i.useRef)();const r=Object.assign({},Rt,t),{children:s,className:n,disabled:o,disabledClassName:l,focus:c,id:h,selected:u,selectedClassName:d,tabIndex:g,tabRef:m}=r,p=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(r,Lt);return(0,i.useEffect)(()=>{u&&c&&e.current.focus()},[u,c]),a().createElement("li",Object.assign({},p,{className:ft(n,{[d]:u,[l]:o}),ref:t=>{e.current=t,m&&m(t)},role:"tab",id:`tab${h}`,"aria-selected":u?"true":"false","aria-disabled":o?"true":"false","aria-controls":`panel${h}`,tabIndex:g||(u?"0":null),"data-rttab":!0}),s)};Bt.tabsRole="Tab";const Ft=Bt,Vt=["children","className","forceRender","id","selected","selectedClassName"];const Ht="react-tabs__tab-panel",qt={className:Ht,forceRender:!1,selectedClassName:`${Ht}--selected`},$t=t=>{const e=Object.assign({},qt,t),{children:r,className:i,forceRender:s,id:n,selected:o,selectedClassName:l}=e,c=function(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;r[i]=t[i]}return r}(e,Vt);return a().createElement("div",Object.assign({},c,{className:ft(i,{[l]:o}),role:"tabpanel",id:`panel${n}`,"aria-labelledby":`tab${n}`}),s||o?r:null)};$t.tabsRole="TabPanel";const Ut=$t,zt=({notificationCount:t})=>t?(0,v.jsx)("span",{className:e()("sc-notification-badge",{x2:t>9}),children:t}):null;g(7209),g(6351);const Gt=(0,r.observer)(({placeholder:t,value:r,searchInput:i,searchInputClassName:a,onChange:s})=>(0,v.jsxs)("div",{className:e()("sc-search-input",{active:""!==r.trim()}),children:[(0,v.jsx)("input",{className:a,value:r,ref:i,onChange:t=>s(t.target.value),type:"text",spellCheck:"false",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",placeholder:t}),(0,v.jsx)(x.WI,{}),(0,v.jsx)(x.kU,{className:"icon-reset",onClick:()=>s("")})]}));var Wt=g(9160).t;const Kt=({Icon:t})=>(0,v.jsx)(t,{}),Qt=()=>(0,v.jsxs)("div",{className:"sc-studies--empty",children:[(0,v.jsx)(x.qX,{}),(0,v.jsx)("p",{children:Wt.translate("You have no active indicators yet.")})]}),Yt=({text:t})=>(0,v.jsxs)("div",{className:"sc-studies--empty",children:[(0,v.jsxs)("strong",{children:[Wt.translate("No results for")," “",t,"”"]}),(0,v.jsx)("p",{children:Wt.translate("Try checking your spelling or use a different term")})]}),Xt=({items:t,onSelectItem:r,onDeleteItem:i,onEditItem:a,onInfoItem:s,disableAll:n,isTick:o})=>(0,v.jsx)("div",{className:"sc-studies__list",children:t.map(t=>(0,v.jsx)("div",{className:e()("sc-studies__list__item ",{"sc-studies__list__item--disabled":n,"sc-studies__list__item--disabled-prediction":t.isPrediction&&o}),children:(0,v.jsxs)(A.A,{className:"sc-studies__list__item__box",enabled:!!((a||i)&&t.bars&&t.bars.length>30)||t.isPrediction&&o,content:t.isPrediction&&o?Wt.translate("This indicator does not support 1-tick intervals. To use this indicator, change your chart time interval to 1 minute or more."):`${t.name} ${t.bars?`(${t.bars})`:""}`,children:[(0,v.jsxs)("div",{className:"info",onClick:()=>r?.(t.flutter_chart_id),onTouchEnd:()=>r?.(t.flutter_chart_id),children:[(0,v.jsx)(Kt,{Icon:t.icon}),(0,v.jsxs)("div",{className:"text",children:[(0,v.jsx)("span",{children:i?t.short_name_and_index:t.name}),t.bars&&(0,v.jsxs)("small",{children:["(",t.bars,")"]})]})]}),(0,v.jsxs)("div",{className:"detail",children:[s&&(0,v.jsx)(x.ee,{className:"ic-info",onClick:()=>s(t)}),a&&(0,v.jsx)(x.sY,{onClick:()=>a(t)}),i&&(0,v.jsx)(x.d7,{onClick:()=>i(t.id)})]})]})},`item--${t.id||t.flutter_chart_id}`))}),Zt=({categories:t,onSelectItem:e,onInfoItem:r,disableAll:i,isTick:a})=>(0,v.jsx)(I,{autoHide:!0,children:t.map(t=>(0,v.jsxs)("div",{className:"sc-studies__category",children:[(0,v.jsx)("div",{className:"sc-studies__category__head",children:t.name}),(0,v.jsx)("div",{className:"sc-studies__category__body",children:(0,v.jsx)(Xt,{items:t.foundItems||[],onSelectItem:e,onInfoItem:r,disableAll:i,isTick:a})})]},t.name))}),Jt=({items:t,onDeleteItem:e,onEditItem:r,clearAll:i,isMobile:a})=>(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("div",{className:"sc-studies__panel__head",children:[(0,v.jsx)("p",{children:a?Wt.translate("Up to 2 active indicators allowed."):Wt.translate("Up to 5 active indicators allowed.")}),(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--sm sc-btn--outline-secondary",onClick:()=>i(),children:Wt.translate("Clear all")})]}),(0,v.jsx)("div",{className:"sc-studies__panel__content sc-studies__panel__content--active",children:(0,v.jsx)(Xt,{items:t,onDeleteItem:e,onEditItem:r})})]}),te=({onSelectTab:t,selectedTab:e,categories:r,searchedCategories:i,onSelectItem:a,onDeleteItem:s,onEditItem:n,onInfoItem:o,activeItems:l,clearAll:c,searchQuery:h,isMobile:u,maxAllowedItem:d,isTick:g})=>(0,v.jsxs)(At,{className:"tabs--vertical",selectedIndex:e,onSelect:t,children:[(0,v.jsxs)(Pt,{children:[(0,v.jsx)(Ft,{className:"hidden"},"hidden"),(0,v.jsxs)(Ft,{children:[(0,v.jsx)(x.CL,{}),(0,v.jsx)("span",{children:Wt.translate("Active")}),(0,v.jsx)(zt,{notificationCount:l.length})]},"active"),r.map(t=>(0,v.jsxs)(Ft,{children:[(0,v.jsx)(Kt,{Icon:t.icon}),(0,v.jsx)("span",{children:t.name})]},`tab--${t.name}`))]}),(0,v.jsx)(Ut,{children:(0,v.jsx)("div",{className:"sc-studies__panel sc-studies__panel--search",children:i.length?(0,v.jsx)(Zt,{categories:i,onSelectItem:a,onInfoItem:o,disableAll:l.length===(u?2:5),isTick:g}):(0,v.jsx)(Yt,{text:h})})},"panel--search"),(0,v.jsx)(Ut,{children:(0,v.jsx)("div",{className:"sc-studies__panel sc-studies__panel--active",children:l.length?(0,v.jsx)(Jt,{clearAll:c,items:l,onDeleteItem:s,onEditItem:n,isMobile:u}):(0,v.jsx)(Qt,{})})},"panel--active"),r.map(t=>(0,v.jsx)(Ut,{children:(0,v.jsxs)("div",{className:"sc-studies__panel",children:[(0,v.jsx)("h3",{children:t.name}),(0,v.jsx)(Xt,{onSelectItem:a,onInfoItem:o,items:t.items,disableAll:l.length===d,isTick:g})]})},`panel--${t.name}`))]}),ee=(0,r.observer)(({portalNodeId:t})=>{const{studies:e,chart:r,state:i,timeperiod:a}=(0,b.gy)(),{menuStore:s,deleteAllStudies:n,items:o,searchedItems:l,filterText:c,selectedTab:h,onSelectTab:u,onSelectItem:d,activeItems:g,deleteStudyById:m,editStudy:p,onInfoItem:f,infoItem:_,updatePortalNode:y,maxAllowedItem:S,setFilterText:w,searchInput:C}=e,{isTick:T}=a,{isMobile:k}=r,j=s.open,N=g.length;y(t);const D=(t,e,r)=>{i.stateChange(e,{indicator_type_name:t,indicators_category_name:(0,E.jY)(t),...r??{}})};return(0,v.jsxs)(O.A,{store:s,className:"sc-studies",title:Wt.translate("Indicators"),tooltip:Wt.translate("Indicators"),modalMode:!0,enableTabular:!0,portalNodeId:t,customHead:_?(0,v.jsxs)("div",{className:"sc-dialog__head--info",children:[(0,v.jsx)(x.Z3,{onClick:()=>{f(null),D(_.flutter_chart_id,E.c4.INDICATOR_INFO_TOGGLE)}}),_.flutter_chart_id]}):(0,v.jsx)("div",{className:"sc-dialog__head--search",children:(0,v.jsx)(Gt,{placeholder:Wt.translate("Search"),searchInputClassName:"searchInputClassName",value:c,onChange:w,searchInput:C})}),children:[(0,v.jsx)(O.A.Title,{children:(0,v.jsxs)("div",{className:"sc-studies__menu "+(j?"sc-studies__menu--active":""),children:[(0,v.jsx)(x.Np,{}),(0,v.jsx)(zt,{notificationCount:N})]})}),(0,v.jsxs)(O.A.Body,{children:[_&&(0,v.jsxs)("div",{className:"sc-studies__info",children:[(0,v.jsx)(I,{autoHide:!0,height:"360px",className:"sc-studies__info__content",children:(0,v.jsx)("p",{children:_?.description})}),(0,v.jsx)("div",{className:"sc-studies__info__footer",children:(0,v.jsx)(A.A,{enabled:_?.disabledAddBtn,content:E.Sn.predictionIndicator,children:(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary sc-btn--w100",onClick:()=>{d(_?.flutter_chart_id),D(_?.flutter_chart_id,E.c4.INDICATOR_ADDED,{is_info_open:!0})},disabled:_?.disabledAddBtn,children:Wt.translate("Add")})})})]}),(0,v.jsx)(te,{onSelectTab:u,selectedTab:h,categories:o,searchedCategories:l,onSelectItem:t=>{d(t),D(t,E.c4.INDICATOR_ADDED)},onDeleteItem:t=>{m(t)},onEditItem:t=>{p(t)},onInfoItem:t=>{f(t),D(t.flutter_chart_id,E.c4.INDICATOR_INFO_TOGGLE,{is_info_open:!0})},activeItems:g,clearAll:()=>{n(),i.stateChange(E.c4.INDICATORS_CLEAR_ALL)},searchQuery:c,isMobile:k,maxAllowedItem:S,isTick:T})]})]})});g(6238);var re=g(9160).t;const ie=({disabled:t=!1,view:r,remove:i,onClick:a})=>(0,v.jsxs)(A.A,{className:"sc-views__views__list__item",onClick:t?void 0:a,enabled:r.name.length>27,content:(0,c.C1)(r.name,26),children:[(0,v.jsx)("div",{className:e()("text",{"text--disabled":t}),children:r.name}),(0,v.jsx)(x.d7,{onClick:i})]}),ae=({onClick:t})=>(0,v.jsxs)("div",{className:"sc-views--empty",children:[(0,v.jsx)(x.qX,{}),(0,v.jsx)("p",{children:re.translate("You have no saved templates yet.")}),(0,v.jsxs)("button",{type:"button",className:"sc-btn",onClick:t,children:[(0,v.jsx)(x.RE,{}),re.translate("Add new template")]})]}),se=({templateName:t,onCancel:e,onOverwrite:r})=>(0,v.jsxs)("div",{className:"sc-views--overwrite",children:[(0,v.jsxs)("div",{className:"sc-views--overwrite__content",children:[(0,v.jsx)(x._D,{}),(0,v.jsxs)("p",{children:[`${t} ${re.translate("already exists.")}`,(0,v.jsx)("br",{}),re.translate("Would you like to overwrite it?")]})]}),(0,v.jsxs)("div",{className:"sc-views--overwrite__footer",children:[(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--outline-secondary",onClick:e,children:re.translate("Cancel")}),(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary",onClick:r,children:re.translate("Overwrite")})]})]}),ne=({allowTickChartTypeOnly:t,views:e,removeAll:r,applyLayout:i,remove:a,onGranularity:s,onChartType:n})=>{if(!e.length)return null;const o=e=>{const{chartType:r,timeUnit:i}=e??{};return t&&!("line"===r&&"tick"===i)};return(0,v.jsxs)("div",{className:"sc-views__views",children:[(0,v.jsxs)("div",{className:"sc-views__views__head",children:[(0,v.jsx)("h5",{children:re.translate("Saved templates")}),(0,v.jsx)("button",{type:"button",onClick:r,className:"sc-btn sc-btn--sm sc-btn--outline-secondary",children:re.translate("Clear all")})]}),(0,v.jsx)("div",{className:"sc-views__views__content",children:(0,v.jsx)("div",{className:"sc-views__views__list",children:e.map((t,e)=>(0,v.jsx)(ie,{disabled:o(t.layout),view:t,onClick:t=>i(e,t,s,n),remove:t=>a(e,t)},t.name))})})]})},oe=(0,r.observer)(({portalNodeId:t,onChartType:r,onGranularity:i})=>{const{view:a,state:s,chart:n}=(0,b.gy)(),{allowTickChartTypeOnly:o}=s,{isMobile:l}=n,{sortedItems:c,routes:{main:h,overwrite:u},onChange:d,remove:g,onSubmit:m,applyLayout:p,inputRef:f,currentRoute:_,templateName:y,onToggleNew:S,saveViews:w,removeAll:C,isInputActive:T,onFocus:k,onBlur:j,menuStore:N}=a,E=N.dialogStore.open,A=T||""!==y;return(0,v.jsxs)(O.A,{store:N,className:"sc-views-menu",title:re.translate("Templates"),tooltip:re.translate("Templates"),modalMode:!0,portalNodeId:t,children:[(0,v.jsx)(O.A.Title,{children:(0,v.jsx)("div",{className:e()("sc-views__menu",{"sc-views__menu--active":E}),children:(0,v.jsx)(x.Ik,{})})}),(0,v.jsxs)(O.A.Body,{children:[(0,v.jsx)("div",{className:"sc-views",children:"new"===_?(0,v.jsx)(ae,{onClick:S}):(0,v.jsxs)(v.Fragment,{children:["overwrite"!==_?"":(0,v.jsx)(se,{templateName:y,onCancel:h,onOverwrite:u}),(0,v.jsxs)(I,{autoHide:!0,children:[(0,v.jsx)("div",{className:"form form--sc-views",children:(0,v.jsx)("div",{className:"form__input-group",children:(0,v.jsx)("div",{className:"form__group",children:(0,v.jsx)("div",{className:"form__control",children:(0,v.jsxs)("div",{className:e()("form--sc-views__input",{"form--sc-views__input--active":A}),children:[(0,v.jsx)("div",{className:"subtitle",children:(0,v.jsx)("span",{children:re.translate("Add new templates")})}),(0,v.jsx)("input",{type:"text",className:e()("sc-input",{"sc-input--active":A}),placeholder:A?"":re.translate("Add new templates"),ref:f,value:y,onKeyUp:m,onChange:d,onFocus:k,onClick:k,onBlur:j}),(0,v.jsx)("button",{type:"button",onClick:w,className:e()("sc-btn","sc-btn--primary",{"sc-btn--primary--disabled":!A}),children:(0,v.jsx)(x.RE,{})})]})})})})}),(0,v.jsx)(ne,{allowTickChartTypeOnly:o,views:c,removeAll:C,applyLayout:p,remove:g,onChartType:r,onGranularity:i})]})]})}),o&&(0,v.jsx)(it,{isMobile:l,text:re.translate("Some of your templates may not work with this trade type.")})]})]})});var le=g(9160).t;const ce=(0,r.observer)(()=>{const{chart:t,crosshair:e}=(0,b.gy)(),{isMobile:r}=t,i=e.isEnabled?x.RP:x.F2,a=e.isEnabled?le.translate("Disable Crosshair"):le.translate("Enable Crosshair");return(0,v.jsx)(A.A,{content:a,enabled:!r,position:"right",children:(0,v.jsx)(Y,{active:e.isEnabled,onChange:t=>e.updateEnabledState(t),children:(0,v.jsx)(i,{})})})});g(6765);var he=g(9160).t;const ue=(0,r.observer)(()=>{const{chartSize:t}=(0,b.gy)(),{zoomIn:e,zoomOut:r}=t;return(0,v.jsxs)("div",{className:"ciq-menu sc-chart-size",children:[(0,v.jsx)("div",{className:"cq-menu-btn",children:(0,v.jsx)(x.Lo,{className:"ic-icon-with-sub cq-zoom-out","tooltip-title":he.translate("Zoom out"),onClick:r})}),(0,v.jsx)("div",{className:"cq-menu-btn",children:(0,v.jsx)(x.AD,{className:"ic-icon-with-sub cq-zoom-in","tooltip-title":he.translate("Zoom in"),onClick:e})})]})});g(4001);var de=g(7394),ge=g(9160).t;const me=({enabled:t,children:e})=>t?(0,v.jsxs)("div",{className:"sc-dtools--empty",children:[(0,v.jsx)(x.qX,{}),(0,v.jsx)("p",{children:ge.translate("You have no active drawings yet.")})]}):(0,v.jsx)(v.Fragment,{children:e}),pe=({Icon:t,text:e,num:r,bars:i})=>(0,v.jsxs)("div",{className:"info",children:[t?(0,v.jsx)(t,{className:"icon"}):"",(0,v.jsxs)("div",{className:"text",children:[(0,v.jsx)("span",{children:ge.translate(e,{num:r||" "})}),i?(0,v.jsxs)("small",{children:["(",i," bars)"]}):""]})]}),fe=({items:t,onClick:r})=>(0,v.jsx)("div",{className:"sc-dtools__list",children:t.map(t=>(0,v.jsx)("div",{className:e()("sc-dtools__list__item",`sc-dtools__${t.id}`),onClick:()=>r(t.id),children:(0,v.jsx)(pe,{Icon:t.icon,text:t.text})},t.id))}),_e=({item:t,onDelete:e})=>(0,v.jsxs)("div",{className:"sc-dtools__list__item",children:[(0,v.jsx)(pe,{Icon:t.icon,text:t.text,bars:t.bars,num:t.num}),(0,v.jsx)("div",{className:"actions",children:(0,v.jsx)(x.d7,{onClick:()=>e(t.index)})})]}),be=({group:t,onDelete:e})=>(0,v.jsxs)("div",{className:"sc-dtools__category",children:[(0,v.jsx)("div",{className:"sc-dtools__category__head",children:ge.translate((0,de.ZH)(t.id))}),(0,v.jsx)("div",{className:"sc-dtools__category__body",children:(0,v.jsx)("div",{className:"sc-dtools__list",children:t.items.map(t=>(0,v.jsx)(_e,{item:{...t},onDelete:e},t.index))})})]}),ve=({activeDrawToolsGroup:t,onDelete:e})=>{const r=t.sort((t,e)=>t.items.length<=1&&e.items.length<=1?0:t.items.length<=1?-1:e.items.length<=1?1:0);return(0,v.jsx)(I,{autoHide:!0,height:320,children:r.map(t=>t.items.length>1?(0,v.jsx)(be,{group:t,onDelete:e},t.id):t.items.map(t=>(0,v.jsx)(_e,{item:t,onDelete:e},t.index)))})},ye=(0,r.observer)(({portalNodeId:t})=>{const{drawTools:r,chart:i}=(0,b.gy)(),{isMobile:a}=i,{clearAll:s,startAddingNewTool:n,getDrawToolsItems:o,activeToolsNo:l,activeToolsGroup:c,onDeleted:h,updatePortalNode:u,menuStore:d}=r,g=o(),m=d.open;return u(t),(0,v.jsxs)(O.A,{store:d,className:"sc-dtools",title:ge.translate("Drawing tools"),tooltip:ge.translate("Drawing tools"),modalMode:!0,enableTabular:!0,portalNodeId:t,children:[(0,v.jsx)(O.A.Title,{children:(0,v.jsxs)("div",{className:e()("sc-dtools__menu",{"sc-dtools__menu--active":m}),children:[a?(0,v.jsx)(x.W3,{}):(0,v.jsx)(x.sj,{}),(0,v.jsx)(zt,{notificationCount:l})]})}),(0,v.jsx)(O.A.Body,{children:(0,v.jsxs)(At,{className:e()({"tabs--vertical":!a,"tabs--horizontal":a}),children:[" ",(0,v.jsxs)(Pt,{children:[(0,v.jsxs)(Ft,{children:[(0,v.jsx)(x.CL,{}),ge.translate("Active"),(0,v.jsx)(zt,{notificationCount:l})]}),(0,v.jsxs)(Ft,{children:[(0,v.jsx)(x.sj,{}),ge.translate("All drawings")]})]}),(0,v.jsx)(Ut,{children:(0,v.jsx)("div",{className:"sc-dtools__panel",children:(0,v.jsxs)(me,{enabled:!l,children:[(0,v.jsx)("div",{className:"sc-dtools__panel__head",children:(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--sm sc-btn--outline-secondary",onClick:s,children:(0,v.jsx)("span",{children:ge.translate("Clear all")})})}),(0,v.jsx)("div",{className:"sc-dtools__panel__content sc-dtools__panel__content--active",children:(0,v.jsx)(ve,{activeDrawToolsGroup:c,onDelete:h})})]})})}),(0,v.jsx)(Ut,{children:(0,v.jsx)("div",{className:"sc-dtools__panel",children:(0,v.jsx)("div",{className:"sc-dtools__panel__content",children:(0,v.jsx)(fe,{items:g,onClick:n})})})})]})})]})});g(7808);var Se=g(9160).t;const xe=({title:t,id:e,label:r,value:i,onChange:a,noramIcon:s,activeIcon:n})=>(0,v.jsx)(V,{title:t,type:e,children:(0,v.jsx)(W,{id:e,label:r,value:i,onChange:a,noramIcon:s,activeIcon:n})}),we=(0,r.observer)(()=>{const{chartSetting:t}=(0,b.gy)(),{menuStore:r,countdown:i,historical:a,isHighestLowestMarkerEnabled:s,languages:n,language:o,setHistorical:l,setLanguage:c,setTheme:h,showCountdown:u,theme:d,toggleHighestLowestMarker:g}=t,m=r.dialogStore.open;return(0,v.jsxs)(O.A,{store:r,className:"sc-chart-setting",title:Se.translate("Platform settings"),enableTabular:!0,modalMode:!0,children:[(0,v.jsx)(O.A.Title,{children:(0,v.jsx)(x.sY,{className:e()("ic-icon-with-sub",{active:m}),"tooltip-title":Se.translate("Settings")})}),(0,v.jsx)(O.A.Body,{children:(0,v.jsxs)(At,{className:"tabs--vertical",children:[(0,v.jsxs)(Pt,{children:[(0,v.jsxs)(Ft,{children:[(0,v.jsx)(x.L0,{}),Se.translate("Themes")]},"theme"),(0,v.jsxs)(Ft,{children:[(0,v.jsx)(x.U,{}),Se.translate("Language")]},"language"),(0,v.jsxs)(Ft,{children:[(0,v.jsx)(x.Kx,{}),Se.translate("Charts")]},"platform")]}),(0,v.jsx)(Ut,{children:(0,v.jsx)("div",{className:"sc-chart-setting__panel",children:(0,v.jsxs)(V,{title:Se.translate("Select theme"),type:"theme",children:[(0,v.jsxs)("div",{className:e()("form__group__item",{"form__group__item--active":"dark"===d}),onClick:()=>h("dark"),children:[(0,v.jsx)(x.Zv,{}),(0,v.jsx)("div",{className:"text",children:Se.translate("Dark")})]}),(0,v.jsxs)("div",{className:e()("form__group__item",{"form__group__item--active":"light"===d}),onClick:()=>h("light"),children:[(0,v.jsx)(x.FV,{}),(0,v.jsx)("div",{className:"text",children:Se.translate("Light")})]})]})})}),(0,v.jsx)(Ut,{children:(0,v.jsx)("div",{className:"sc-chart-setting__panel",children:(0,v.jsx)(V,{title:Se.translate("Select language"),type:"language",children:n.map(t=>(0,v.jsxs)("div",{onClick:()=>c(t.key),className:e()("form__group__item",{"form__group__item--active":o?.key===t.key}),children:[t.icon,(0,v.jsx)("span",{className:"text",children:t.name})]},t.key))})})}),(0,v.jsx)(Ut,{children:(0,v.jsxs)("div",{className:"sc-chart-setting__panel",children:[(0,v.jsx)(xe,{title:Se.translate("Interval duration"),id:"countdown",label:Se.translate("Display remaining time for each interval"),value:i,onChange:u,noramIcon:x.ag[d].normal,activeIcon:x.ag[d].active}),(0,v.jsx)(xe,{title:Se.translate("Historical data mode"),id:"historical",label:Se.translate("Display data for a specific date and time"),value:a,onChange:l,noramIcon:x.fK[d].normal,activeIcon:x.fK[d].active}),(0,v.jsx)(V,{title:Se.translate("Highest and lowest spot"),children:(0,v.jsx)(W,{id:"highestlowest",label:Se.translate("Display the highest and lowest spot price"),value:s,onChange:g,noramIcon:x.fu[d].normal,activeIcon:x.fu[d].active})})]})})]})})]})});var Ce=g(6213);g(6853);g(7092);var Te=g(3457),ke=(g(8272),g(9160).t);const je=({x:t,bar:e})=>(0,v.jsxs)("div",{className:`cq-bar ${e.cName}`,style:{height:5*e.height+"%",left:35*t},children:[(0,v.jsx)("div",{className:`cq-bar-value ${e.height&&"show"}`,children:`${e.height.toFixed(1)}%`}),(0,v.jsx)("span",{className:"cq-bar-title",children:t})]}),Ne=(0,r.observer)(()=>{const{lastDigitStats:t}=(0,b.gy)(),{isVisible:r,bars:i,marketDisplayName:a,shouldMinimiseLastDigits:s}=t;return(0,v.jsxs)("div",{className:e()("cq-last-digits",{show:r,minimised:s}),children:[(0,v.jsx)("div",{className:"cq-bars",children:i.map((t,e)=>(0,v.jsx)(je,{x:e,bar:t},`bar-${e}`))}),(0,v.jsx)("div",{className:"cq-bar-footer",children:ke.translate("Last digits stats for latest 1000 ticks on ")+a})]})}),Ee=(0,r.observer)(({bottomWidgets:t})=>{const{state:e,lastDigitStats:r}=(0,b.gy)(),{showLastDigitStats:i}=e,{digits:a,lastTick:n}=r,o=!t&&i?Ne:t;return o?(0,v.jsx)(o,{digits:a,tick:(0,s.toJS)(n)}):null});g(8449);const Ae=(0,r.observer)(({children:t})=>{const{bottomWidgetsContainer:e}=(0,b.gy)(),{bottom:r=0,isReadyToShow:i=!1}=e;if(!i)return null;const a={bottom:r};return(0,v.jsx)("div",{className:"cq-bottom-ui-widgets",style:a,children:t})});g(1882);const Ie=a().lazy(()=>Promise.resolve().then(g.bind(g,6213))),De=({isMobile:t})=>(0,v.jsxs)(v.Fragment,{children:[t?"":(0,v.jsx)(ce,{}),(0,v.jsx)(M,{}),(0,v.jsx)(et,{}),(0,v.jsx)(ee,{}),(0,v.jsx)(ye,{}),(0,v.jsx)(i.Suspense,{fallback:null,children:(0,v.jsx)(Ie,{})}),t?"":(0,v.jsx)(ue,{})]}),Oe=(0,r.observer)(({widgets:t})=>{const{chart:r,chartType:i,studies:a,drawTools:s,view:n,share:o,chartSetting:l}=(0,b.gy)(),{context:c,isMobile:h}=r,u=i.menuStore.open||a.menuStore.open||s.menuStore.open||n.menuStore.open||o.menuStore.open||l.menuStore.open,d=t||De;return(0,v.jsx)("div",{className:e()("cq-chart-controls",{active:u}),children:c?(0,v.jsx)(d,{isMobile:h}):null})});g(3955);var Pe=g(9160).t;const Le=a().memo(({networkStatus:t})=>(0,v.jsx)(A.A,{className:"sc-chart-footer__item sc-chart-footer__item--status",content:`${Pe.translate("Network status")}: ${t?Pe.translate(t.tooltip):""}`,enabled:!0,children:(0,v.jsx)("div",{className:`sc-chart__status sc-chart__status--${t?t.class:"offline"}`})})),Me=(0,r.observer)(()=>{const{chart:t}=(0,b.gy)(),{context:e,serverTime:r,networkStatus:i,openFullscreen:a}=t;return e?(0,v.jsxs)("div",{className:"sc-chart-footer",children:[(0,v.jsx)(Le,{networkStatus:i}),(0,v.jsx)("div",{className:"sc-chart-footer__item sc-chart-footer__item--time",children:(0,v.jsx)("span",{children:r})}),(0,v.jsx)("div",{className:"ciq-menu ciq-enabled",children:(0,v.jsx)("a",{href:"https://deriv.com/help-centre/",target:"_blank",rel:"noopener noreferrer",children:(0,v.jsx)("div",{className:"cq-menu-btn",children:(0,v.jsx)(x.Sn,{})})})}),(0,v.jsx)(we,{}),(0,v.jsx)("div",{className:"ciq-menu ciq-enabled",onClick:()=>a(),children:(0,v.jsx)("div",{className:"cq-menu-btn",children:(0,v.jsx)(x.x2,{})})})]}):null});var Re=g(4511),Be=g.n(Re),Fe=(g(898),g(8798),g(9160).t);function Ve(t){let e=0;if("categoryName"in t&&t.hasSubgroup)t.subgroups.forEach(t=>{for(const r of t.data)e+=r.data.length});else if("categoryName"in t&&t.hasSubcategory)for(const r of t.data)e+=r.data.length;else e+=t.data.length;return e}const He=a().memo(({category:t})=>(0,v.jsx)("div",{className:"sc-mcd__category__content",children:(0,v.jsx)("div",{className:"empty-category",children:Fe.translate(t.emptyDescription)})})),qe=a().memo(({isNestedList:t,category:r})=>{const i=x.sM[r.categoryId];return(0,v.jsxs)("span",{className:e()("category-title-left",{"category-title-left__subgroup":!i}),children:[t&&i?(0,v.jsx)(i,{className:`ic-${r.categoryId}`}):(0,v.jsx)("div",{className:"category-title-left__placeholder"}),Fe.translate(r.categoryName)]})}),$e=({category:t,activeHeadKey:r,isNestedList:i,handleTitleClick:a})=>(0,v.jsxs)("div",{className:e()("sc-mcd__category__head",{"has-subtitle":t.categorySubtitle,active:t.active}),onClick:()=>a(t.categoryId),children:[(0,v.jsx)(qe,{isNestedList:i,category:t}),(t.categoryNamePostfixShowIfActive&&r===t.categoryId||!t.categoryNamePostfixShowIfActive)&&t.categoryNamePostfix&&(0,v.jsx)("span",{className:"category-name-postfix",children:t.categoryNamePostfix}),t.categorySubtitle&&(0,v.jsx)("div",{className:"category-subtitle",children:Fe.translate(t.categorySubtitle)}),!t.hasSubgroup&&i?(0,v.jsx)(x.HK,{className:"arrow"}):""]}),Ue=({category:t,categoryItemCount:r,ItemType:i,setCategoryElement:a,onSelectItem:s,activeHeadKey:n,disableAll:o,isNestedList:l,handleTitleClick:h,hasSubgroup:u,favoritesId:d})=>{const g=e=>{s?.(e,t.categoryId)};return(0,v.jsxs)("div",{className:e()("sc-mcd__category",`sc-mcd__category--${t.categoryId}`,{"sc-mcd__category--has-subtitle":t.categorySubtitle,"sc-mcd__category--active":t.active}),ref:e=>a(e,t.categoryId),children:[(l||!t.hasSubcategory)&&(0,v.jsx)($e,{category:t,activeHeadKey:n,isNestedList:!!l,handleTitleClick:h,hasSubgroup:u}),!t.hasSubgroup&&t.hasSubcategory?t.data.filter(t=>Ve(t)>0).map(t=>(0,v.jsxs)("div",{className:e()("sc-mcd__category__content",`sc-mcd__category__content--${(0,c._J)(t.subcategoryName)}`,"sc-mcd__category--has-subgroup","sc-mcd__category__content--has-subcategory"),children:[(0,v.jsx)("div",{className:"subcategory",children:Fe.translate(t.subcategoryName)}),t.data.map(t=>(0,v.jsx)(i,{item:t,onSelectItem:g,disableAll:o,favoritesId:d},t.display))]},t.subcategoryName)):!t.hasSubgroup&&t.data.length>0&&(0,v.jsx)("div",{className:"sc-mcd__category__content",children:t.data.map(t=>(0,v.jsx)(i,{item:t,onSelectItem:g,disableAll:o,favoritesId:d},t.itemId))}),0===r&&t.emptyDescription&&(0,v.jsx)(He,{category:t})]})},ze=({filteredItems:t,onSelectItem:e,ItemType:r,setCategoryElement:i,activeHeadKey:s,disableAll:n,isNestedList:o,handleTitleClick:l,favoritesId:c})=>(0,v.jsx)(v.Fragment,{children:t.map(t=>{const h=Ve(t);return t.hasSubgroup?(h>0||t.emptyDescription)&&(0,v.jsxs)(a().Fragment,{children:[(0,v.jsx)(Ue,{ItemType:r,category:t,categoryItemCount:h,setCategoryElement:i,onSelectItem:e,activeHeadKey:s,disableAll:n,isNestedList:o,handleTitleClick:l,favoritesId:c},t.categoryId),t.subgroups?.map(t=>Ve(t)>0?(0,v.jsx)(Ue,{ItemType:r,category:t,categoryItemCount:h,setCategoryElement:i,onSelectItem:e,activeHeadKey:s,disableAll:n,isNestedList:o,handleTitleClick:l,hasSubgroup:!0,favoritesId:c},t.categoryId):null)]},t.categoryId):(h>0||t.emptyDescription)&&(0,v.jsx)(Ue,{ItemType:r,category:t,categoryItemCount:h,setCategoryElement:i,onSelectItem:e,activeHeadKey:s,disableAll:n,isNestedList:o,handleTitleClick:l,favoritesId:c},t.categoryId)})});var Ge=g(4916);const We=({category:t,id:r})=>{const{chart:i,state:s}=(0,b.gy)(),[n]=a().useState(Ge.A.getInstance()),[o,l]=a().useState(!1),h=a().useCallback(e=>{e.stopPropagation(),e.nativeEvent.isHandledByDialog=!0,n.toggleFavorite(t,r),s.stateChange(E.c4.FAVORITE_MARKETS_TOGGLE,{is_favorite:n.isFavorite(t,r),symbol:i.symbolMap[r]?.symbol,symbol_category:(0,c.RB)(i.symbolMap[r])})},[i,s,n,t,r]),u=a().useCallback(()=>{const e=n.isFavorite(t,r);e!==o&&(l(e),(0,Te.$s)(Te.dq.CategoricalDisplay,Te.Cw.Favorite,`${e?"Add ":"Remove "} ${r}`))},[n,t,r,o]);return a().useEffect(()=>(n&&n.onFavoriteUpdate&&(n.onFavoriteUpdate(u),l(n.isFavorite(t,r))),()=>{n&&n.offFavoriteUpdate(u)}),[n,t,r,u]),t&&r?(0,v.jsx)(x.kD,{onClick:h,className:e()("ciq-favorite",{"ciq-active-favorite":o})}):null};var Ke=g(9160).t;const Qe=a().memo(({id:t})=>{if(!t||!x.bC[t])return null;const e=x.bC[t];return(0,v.jsx)(e,{className:`ic-${t}`})}),Ye=a().memo(({item:{itemId:t,display:e}})=>(0,v.jsxs)("div",{className:"sc-mcd__item__name",children:[(0,v.jsx)(Qe,{id:t}),e]})),Xe=a().memo(({favoritesId:t,item:{dataObject:e,itemId:r}})=>(0,v.jsxs)("div",{className:"sc-mcd__item__detail",children:[e&&(void 0===e.exchange_is_open||e.exchange_is_open)?"":(0,v.jsx)("span",{className:"closed-market",children:Ke.translate("CLOSED")}),(0,v.jsx)(We,{category:t,id:r})]})),Ze=({onSelectItem:t,item:e,favoritesId:r})=>(0,v.jsxs)("div",{className:`sc-mcd__item sc-mcd__item--${e.itemId} ${e.selected?"sc-mcd__item--selected ":""}`,onClick:()=>e.enabled&&t?.(e.dataObject),children:[(0,v.jsx)(Ye,{item:e}),(0,v.jsx)(Xe,{item:e,favoritesId:r})]}),Je=a().memo(Ze);var tr=g(9160).t;const er=a().memo(({categoryId:t})=>{const e=x.sM[t];return e&&(0,v.jsx)(e,{className:`ic-${t}`})}),rr=a().memo(({focusedCategoryKey:t,activeCategoryKey:e,handleFilterClick:r,category:i,isSearching:a})=>{const s=t&&t.length?t===i.categoryId:e===i.categoryId;return(0,v.jsxs)("div",{className:"sc-mcd__filter__item "+(s&&!a?"sc-mcd__filter__item--selected":""),onClick:()=>r(i.categoryId),children:[(0,v.jsx)(er,{categoryId:i.categoryId}),tr.translate(i.categoryName)]})}),ir=a().memo(({focusedCategoryKey:t,activeCategoryKey:e,handleFilterClick:r,category:i,isSearching:s})=>{const[n,o]=a().useState(!1),[l,c]=a().useState(!1);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("div",{className:"sc-mcd__filter__item "+(n&&!s?"sc-mcd__filter__item--selected":""),onClick:()=>c(!l),children:[(0,v.jsx)(er,{categoryId:i.categoryId}),i.categoryName,(0,v.jsx)(x.HK,{className:`sc-mcd__filter__group-icon ${l&&"sc-mcd__filter__group-icon--open"}`})]}),(0,v.jsx)("div",{className:`sc-mcd__filter__subgroups ${l&&"sc-mcd__filter__subgroups--open"}`,children:i.subgroups.map(a=>{const l=t&&t.length?t===a.categoryId:e===a.categoryId,h=i.subgroups.filter(r=>r.categoryId===t||!t&&r.categoryId===e).length>0;return l&&h&&!n?(o(!0),c(!0)):!h&&n&&o(!1),(0,v.jsx)("div",{className:`sc-mcd__filter__subgroups-item ${n?"sc-mcd__filter__item--active":""} ${l&&!s?"sc-mcd__filter__item--selected":""}`,onClick:()=>r(a.categoryId),children:tr.translate(a.categoryName)},a?.categoryId)})})]})}),ar=(0,r.observer)(({filteredItems:t,handleFilterClick:e,focusedCategoryKey:r,activeCategoryKey:i,isSearching:a})=>(0,v.jsx)("div",{className:"sc-mcd__filter",children:t.map(t=>t.hasSubgroup?(0,v.jsx)(ir,{category:t,handleFilterClick:e,activeCategoryKey:i,focusedCategoryKey:r,isSearching:a},t.categoryId):(0,v.jsx)(rr,{category:t,handleFilterClick:e,activeCategoryKey:i,focusedCategoryKey:r,isSearching:a},t.categoryId))}));var sr=g(9160).t;const nr=(0,r.observer)(({store:t,id:e,searchInputClassName:r,disableAll:i,isNestedList:a,onSelectItem:s})=>{const{updateScrollSpy:n,setScrollPanel:o,setFilterText:l,searchInput:c,height:h,filterText:u,placeholderText:d,handleTitleClick:g,filteredItems:m,setCategoryElement:p,activeHeadKey:f,favoritesId:_,handleFilterClick:b,focusedCategoryKey:y,activeCategoryKey:S}=t,x=s||t.onSelectItem,{isMobile:w}=t.chart,C=(0,v.jsx)(ze,{onSelectItem:(t,e)=>{x?.(t,e),l("")},disableAll:i,isNestedList:a,handleTitleClick:g,filteredItems:m,setCategoryElement:p,activeHeadKey:f,ItemType:Je,favoritesId:_});return(0,v.jsxs)("div",{className:"sc-mcd "+(a?"sc-mcd--nested":""),style:{height:h},id:e,children:[!w&&(0,v.jsxs)("div",{className:"sc-mcd__tabs",children:[(0,v.jsx)("div",{className:"sc-mcd__tabs__head",children:sr.translate("Markets")}),(0,v.jsx)("div",{className:"sc-mcd__tabs__body",children:!a&&(0,v.jsx)(ar,{filteredItems:m,handleFilterClick:b,activeCategoryKey:S,focusedCategoryKey:y,isSearching:""!==u})})]}),(0,v.jsxs)("div",{className:"sc-mcd__content",children:[(0,v.jsx)("div",{className:"sc-mcd__content__head",children:(0,v.jsx)(Gt,{placeholder:d,searchInputClassName:r,value:u,onChange:l,searchInput:c})}),(0,v.jsx)("div",{className:"sc-mcd__content__body",children:w?(0,v.jsx)("div",{className:"sc-mcd__content__body__scroll",onScroll:n,ref:o,children:C}):(0,v.jsx)(I,{autoHide:!0,onScroll:n,setPanel:o,children:C})})]})]})});var or=g(6039);const lr=({symbolOpenTime:t})=>{const[e,r]=a().useState(0),i=a().useMemo(()=>{let r=null;const{openTime:i}=t||{};return i&&(r=(0,c.pl)(i.getTime()-e)),r},[t,e]);return a().useEffect(()=>{const t=or.A.getInstance(),e=setInterval(()=>r(t.getLocalDate().getTime()),1e3);return()=>clearInterval(e)},[]),(0,v.jsx)("span",{children:i})},cr=({isIncrease:t,price:r,className:i,decimalPlaces:a})=>(0,v.jsxs)(v.Fragment,{children:[!r&&(0,v.jsx)("span",{className:"cq-comparison-loader stx-show"}),(0,v.jsx)("div",{className:e()("cq-animated-price",i,{"cq-up":t,"cq-down":!t}),children:r.toFixed(a)})]});var hr=g(9160).t;const ur=(0,r.observer)(()=>{const{chartTitle:t}=(0,b.gy)(),{isShowChartPrice:r,isVisible:i,todayChange:a,todayChangePercent:s,animatedPrice:n,currentSymbol:o,isSymbolOpen:l,symbolOpenTime:c}=t,{status:h}=n;if(!o)return null;const u=x.bC[o.symbol]||x.Br,d=!l&&c.openTime,g=!l&&!c.openTime;return(0,v.jsxs)(v.Fragment,{children:[u&&(0,v.jsx)(u,{className:`ic-${o.symbol}`}),(0,v.jsxs)("div",{className:"cq-symbol-info",children:[(0,v.jsx)("div",{className:e()("cq-symbol",{"closed-no-opentime":g}),children:o.name}),l&&(0,v.jsx)(gr,{status:h,isVisible:i&&r,todayChange:a,todayChangePercent:s}),d&&(0,v.jsx)(mr,{symbolOpenTime:c})]})]})}),dr=(0,r.observer)(()=>{const{chartTitle:t}=(0,b.gy)(),{isSymbolOpen:e}=t;return(0,v.jsxs)("div",{className:"cq-symbol-select-btn",children:[(0,v.jsxs)("div",{className:"cq-symbol-select-btn__container",children:[(0,v.jsx)(ur,{}),!e&&(0,v.jsx)("div",{className:"cq-symbol-closed-text",children:hr.translate("CLOSED")})]}),(0,v.jsx)(x.HK,{className:"cq-symbol-dropdown"})]})}),gr=(0,r.observer)(({isVisible:t,status:r,todayChange:i,todayChangePercent:a})=>{const{chartTitle:s}=(0,b.gy)(),{animatedPrice:n,decimalPlaces:o}=s,{price:l,isIncrease:c}=n;return t?(0,v.jsxs)("div",{className:"cq-chart-price",children:[(0,v.jsx)(cr,{className:"cq-current-price",price:l,isIncrease:c,status:n.status,decimalPlaces:o}),(0,v.jsx)("div",{className:"divider",children:"-"}),(0,v.jsxs)("div",{className:e()("cq-change",r),children:[(0,v.jsx)("span",{className:"cq-todays-change",children:i||0}),(0,v.jsxs)("span",{className:"cq-todays-change-percent",children:["(",a,"%)"]})," "]})]}):null}),mr=({symbolOpenTime:t})=>(0,v.jsxs)("div",{className:"cq-chart-closed",children:[(0,v.jsx)(x.b1,{className:"cq-closed-icon"}),(0,v.jsxs)("div",{className:"cq-closed-opening",children:[hr.translate("Opens in:")," ",(0,v.jsx)("span",{className:"cq-closed-opening-time",children:(0,v.jsx)(lr,{symbolOpenTime:t})})]})]});var pr=g(9160).t;const fr=(0,r.observer)(t=>{const{chartTitle:e,chart:r,chartSetting:i,state:s}=(0,b.gy)(),{isMobile:n}=r,{theme:o}=i,{menuStore:l,currentSymbol:h,categoricalDisplay:u,setSymbol:d,onMouseEnter:g,onMouseLeave:m,updateProps:p}=e,f=t.onChange||d,_=l.setOpen,{containerId:y,enabled:S,portalNodeId:x,searchInputClassName:w,open:C,open_market:T,isNestedList:k}=t;if(a().useEffect(()=>{const{...e}=t;p(e)},[C,T]),!h)return null;const j=(0,v.jsxs)(O.A,{store:l,enabled:S,className:"cq-chart-title stx-show cq-symbols-display",isFullscreen:!0,portalNodeId:x,title:n?pr.translate("Markets"):"",onMouseEnter:g,onMouseLeave:m,children:[(0,v.jsx)(O.A.Title,{children:(0,v.jsx)(dr,{})}),(0,v.jsx)(O.A.Body,{children:(0,v.jsx)(nr,{store:u,isNestedList:k,searchInputClassName:w,onSelectItem:(t,e)=>{t.symbol!==h.symbol&&(f(t.symbol),s.stateChange(E.c4.SYMBOL_CHANGE,{symbol:t.symbol,symbol_category:"favorite"===e?"favorites":(0,c.RB)(t)})),_(!1)}})})]});return y?Be().createPortal((0,v.jsx)("div",{className:`smartcharts-${o}`,children:j}),document.getElementById(y)):j}),_r="horizontal",br="vertical";var vr=g(9160).t;const yr=(0,r.observer)(({className:t})=>{const{drawTools:r}=(0,b.gy)(),a=(0,i.useRef)(null),{showConfirmationToast:s,confirmationMessage:n,cancelAddingNewTool:o,hideDrawingConfirmation:l,addingStateInfo:c,selectedToolId:h}=r,u=(0,i.useCallback)(()=>{return(t=h)===_r||t===br?vr.translate("Click on the chart to place the line."):0===c.currentStep&&c.totalSteps>1?vr.translate("Click on the chart to confirm the start point."):1===c.currentStep&&c.totalSteps>1?vr.translate("Click on the chart to confirm the end point."):c.currentStep>1&&!c.isFinished?vr.translate("Click on the chart to confirm point {{step}}.",{step:(c.currentStep+1).toString()}):n;var t},[h,c,n]),d=(0,i.useCallback)(t=>{a.current&&!a.current.contains(t.target)&&l?.()},[l]),g=(0,i.useCallback)(t=>{"Escape"===t.key&&l?.()},[l]);return(0,i.useEffect)(()=>{if(s)return document.addEventListener("mousedown",d),document.addEventListener("keydown",g),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",g)}},[s,d,g]),!s||r.addingStateInfo.isFinished?null:(0,v.jsx)("div",{ref:a,className:e()("sc-drawing-toast",t),role:"alert","aria-live":"polite",children:(0,v.jsxs)("div",{className:"sc-drawing-toast__content",children:[(0,v.jsx)("span",{className:"sc-drawing-toast__message",children:u()}),(0,v.jsx)("button",{className:"sc-drawing-toast__cancel",onClick:o,"aria-label":vr.translate("Cancel"),type:"button",children:vr.translate("Cancel")})]})})});var Sr=g(9160).t;const xr=(0,r.observer)(({className:t})=>{const{drawTools:r}=(0,b.gy)(),a=(0,i.useRef)(null),s=(0,i.useRef)(null),{showDeletionSnackbar:n,deletedToolName:o,hideDeletionSnackbar:l}=r,c=(0,i.useCallback)(()=>{if(!o)return;const t=(0,E.Os)(),e=Object.values(t).find(t=>t.id===o.replace("dt_",""));if(e){return`${e.text.replace(" [num]","")} ${Sr.translate("removed")}`}},[o]);(0,i.useEffect)(()=>{if(n)return s.current=setTimeout(()=>{l?.()},4e3),()=>{s.current&&(clearTimeout(s.current),s.current=null)}},[n,l]);const h=(0,i.useCallback)(t=>{"Escape"===t.key&&l?.()},[l]);return(0,i.useEffect)(()=>{if(n)return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h)}},[n,h]),(0,i.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),n?(0,v.jsx)("div",{ref:a,className:e()("sc-deletion-snackbar",t),role:"alert","aria-live":"polite",children:(0,v.jsxs)("div",{className:"sc-deletion-snackbar__content",children:[(0,v.jsx)("span",{className:"sc-deletion-snackbar__message",children:c()}),(0,v.jsx)("button",{className:"sc-deletion-snackbar__close",onClick:l,"aria-label":Sr.translate("Close"),type:"button",children:(0,v.jsx)(x.US,{})})]})}):null}),wr=xr;var Cr=g(8825);const Tr=(0,r.observer)(t=>{const{chart:e,chartAdapter:r}=(0,b.gy)(),i=a().useRef(null),s=a().useRef(null),n=a().useRef(null),o=a().useRef(null),l=a().useRef(t);l.current=t,a().useEffect(()=>(r.painter.registerCallback(u),()=>{r.painter.unregisterCallback(u)}),[]),a().useEffect(()=>{u()},[r.epochBounds,r.quoteBounds,r.isFeedLoaded,r.isChartLoaded,e.lastQuote]),a().useEffect(()=>{const t=o.current?.querySelector(".chart-spot-label-profit");return t&&r.updateRightPadding(110),()=>{t&&r.updateRightPadding(0)}},[r]);const h=({epoch:t,price:e})=>{i.current=Number(e)||null,s.current=(0,Cr.E)((0,c.Pu)(t)),n.current=t?1e3*t:null,u()},u=()=>{if(!r.isFeedLoaded||!r.isChartLoaded)return;if(!o.current)return;if(!s.current)return void(o.current.style.visibility="hidden");const t=l.current.offsetTop||0,e=l.current.offsetLeft||0,a=o.current;let c=0,h=0,u=!0;if(n.current){const t=r.getXFromEpoch(n.current),e=i.current?r.getYFromQuote(i.current):0;t>0&&(null==i.current||e>0)?(c=+e,h=+t):u=!1}a.style.transform=`translate(${h+e}px, ${c+t}px)`,a.style.visibility=u?"visible":"hidden"},{children:d,className:g}=t;if(!r.isChartLoaded)return null;const{chartNode:m,yAxisWidth:p}=e,{overlap_y_axis:f=!0}=t,_=m&&!f?m.offsetWidth-p-50:"calc(100% - 50px)";return(0,v.jsx)("div",{className:"fast-marker",style:{maxWidth:_},children:(0,v.jsx)("div",{className:g,ref:t=>{o.current=t;const{markerRef:e}=l.current;e&&e(t?{div:t,setPosition:h}:null),null!==t&&u()},style:{position:"absolute"},children:d})})});g(6271);var kr=g(9160).t;const jr=(0,r.observer)(()=>{const{highestLowest:t}=(0,b.gy)(),{setHighestRef:e,setLowestRef:r}=t;return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(Tr,{markerRef:e,className:"sc-highlow sc-highlow--highest",offsetTop:-80,offsetLeft:-80,children:[(0,v.jsx)("span",{className:"spot__shape-circule spot__fill-blue"}),(0,v.jsxs)("span",{className:"spot__label","data-label-pos":"top",children:[(0,v.jsx)("span",{children:`${kr.translate("H")}: `}),(0,v.jsx)("span",{className:"spot__value"})]})]}),(0,v.jsxs)(Tr,{markerRef:r,className:"sc-highlow sc-highlow--lowest",offsetTop:-80,offsetLeft:-80,children:[(0,v.jsx)("span",{className:"spot__shape-circule spot__fill-red"}),(0,v.jsxs)("span",{className:"spot__label","data-label-pos":"bottom",children:[(0,v.jsx)("span",{children:`${kr.translate("L")} : `}),(0,v.jsx)("span",{className:"spot__value"})]})]})]})});g(1061);var Nr=g(9160).t;const Er=(0,r.observer)(()=>{const{timeperiod:t}=(0,b.gy)(),{menuStore:e,dialogPortalNodeId:r,handleCancel:i,handleContinue:a}=t.predictionIndicator;return(0,v.jsxs)(O.A,{store:e,className:"cq-dialog--indicator-prediction",modalMode:!0,emptyMenu:!0,portalNodeId:r,handleOverlayClick:i,children:[(0,v.jsx)(O.A.Title,{}),(0,v.jsx)(O.A.Body,{children:(0,v.jsxs)("div",{className:"cq-indicator-prediction",children:[(0,v.jsx)("strong",{children:Nr.translate("Are you sure?")}),(0,v.jsx)("p",{children:Nr.translate("Some of your active indicators don’t support 1-tick intervals. If you change to a 1-tick interval, these indicators will be removed from your chart.")}),(0,v.jsxs)("div",{className:"cq-indicator-prediction__footer",children:[(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--outline-secondary",onClick:i,children:Nr.translate("Cancel")}),(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary",onClick:a,children:Nr.translate("Continue")})]})]})})]})});g(1104);const Ar=(0,r.observer)(()=>{const{chart:t,chartSize:r,navigationWidget:i,chartSetting:a,chartAdapter:s}=(0,b.gy)(),{context:n,startWithDataFitMode:o}=t,{zoomIn:l,zoomOut:c}=r,{historical:h}=a,{onMouseEnter:u,onMouseLeave:d}=i,{isDataFitModeEnabled:g,toggleDataFitMode:m}=s;return n?(0,v.jsxs)("div",{className:e()("sc-navigation-widget",{"sc-navigation-widget__item--indent":h}),onMouseEnter:u,onMouseLeave:d,children:[(0,v.jsx)("div",{className:e()("sc-navigation-widget__item","sc-navigation-widget__item--scale",{"sc-navigation-widget__item--hidden":!o,"sc-navigation-widget__item--disabled":g}),onClick:m,children:(0,v.jsx)(x.iQ,{})}),(0,v.jsxs)("div",{className:"sc-navigation-widget__item sc-navigation-widget__item--zoom",children:[(0,v.jsx)(x.Gu,{onClick:l}),(0,v.jsx)(ce,{}),(0,v.jsx)(x.NR,{onClick:c})]})]}):null});g(273);const Ir=(0,r.observer)(()=>{const{paginationLoader:t}=(0,b.gy)(),{isOnPagination:e,setRef:r}=t;return e?(0,v.jsx)(Tr,{markerRef:r,className:"pagination",children:(0,v.jsx)("div",{className:"pagination__loader",children:(0,v.jsx)("div",{className:"pagination__loader-background"})})}):(0,v.jsx)(v.Fragment,{})}),Dr=(0,r.observer)(({at:t="holder",children:e})=>{const{chart:r,state:i}=(0,b.gy)(),{contextPromise:s}=r,{isChartReady:n}=i,[o,l]=a().useState();return a().useEffect(()=>{s?.then(e=>{const r=`cq-inchart-${t}`;let i=e.topNode?.querySelector(`.${r}`);i||(i=(0,de.n)(`<div class="${r}"></div>`)),l(i)})},[t,s]),n&&o?Be().createPortal(e,o):null});g(2445);var Or=g(9160).t;const Pr=({group:t,title:e,type:r,Field:i})=>(0,v.jsx)(V,{title:"select"===r||"pattern"===r||"colorpicker"===r||"numbercolorpicker"===r||"OverBought"===t||"OverSold"===t?null:e,type:r,children:i}),Lr=({title:t,items:e,theme:r,onItemChange:i})=>{const a={switch:t=>{const e=t;return(0,v.jsx)(G,{value:e.value,onChange:t=>i(e,t)})},colorpicker:t=>(0,v.jsx)(z,{theme:r,color:t.value,subtitle:t.subtitle||t.title,setColor:e=>i(t,e)}),pattern:t=>(0,v.jsx)(U,{pattern:t.value,lineWidth:"1",subtitle:t.title,onChange:e=>{i(t,e)}}),select:t=>{const e=t;return(0,v.jsx)($,{rows:Object.values(e.options||{}),value:e.options[e.value],subtitle:e.subtitle||e.title,onRowClick:t=>{const[r]=Object.entries(e.options).find(([e,r])=>r===t);i(e,r)},children:t=>(0,v.jsx)("span",{children:t})})},number:t=>{const e=t;return(0,v.jsx)(q,{min:e.min??1,step:e.step??1,max:e.max??100,value:e.value,onChange:t=>i(e,t)})},numericinput:t=>{const e=t;return(0,v.jsx)("span",{className:"ciq-num-input",children:(0,v.jsx)(K,{value:e.value,onChange:t=>i(e,t),min:e.min,step:e.step,max:e.max})})},numbercolorpicker:t=>{const e=t;return(0,v.jsx)(Q,{props:e.value,theme:r,onChange:t=>i(e,t)})},font:t=>{const e=t;return(0,v.jsx)(X,{value:e.value,onChange:t=>i(e,t)})}},s=`form__input-group--${(t||"").toLowerCase().replace(" ","-")}`;return(0,v.jsxs)("div",{className:`form__input-group ${s}`,children:["Show Zones"===t?"":(0,v.jsx)("h4",{children:t}),e.map(e=>a[e.type]&&(0,v.jsx)(Pr,{type:e.type,title:"Show Zones"===t?e.title:e.title.replace(t,""),Field:a[e.type](e)},e.title)),(0,v.jsx)(V,{type:"end"})]})},Mr=({onDelete:t,onReset:e,onDone:r})=>(0,v.jsxs)("div",{className:"buttons",children:[t&&(0,v.jsx)(x.d7,{className:"sc-btn--delete",onClick:t}),(0,v.jsxs)("div",{children:[(0,v.jsx)(Br,{onClick:e}),(0,v.jsx)(Fr,{onClick:r})]})]}),Rr=({itemGroups:t,theme:e,onItemChange:r,setScrollPanel:i,freezeScroll:a,formClassname:s})=>(0,v.jsx)("div",{className:`form form--indicator-setting ${s}`,children:(0,v.jsx)(I,{setPanel:i,freeze:a,autoHide:!0,height:"282px",children:t.map(t=>t.fields.length>0&&(0,v.jsx)(Lr,{title:t.title,items:t.fields,theme:e,onItemChange:r},t.key))})}),Br=({onClick:t})=>(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--outline-secondary sc-btn--reset",onClick:t,children:Or.translate("Reset")}),Fr=({onClick:t})=>(0,v.jsx)("button",{type:"button",className:"sc-btn sc-btn--primary sc-btn--save",onClick:t,children:Or.translate("Done")}),Vr=(0,r.observer)(({store:t})=>{const{itemGroups:e,title:r,formClassname:i,description:a,showTabs:s,onResetClick:n,onItemChange:o,onItemDelete:l,menuStore:c,theme:h,setScrollPanel:u,dialogPortalNodeId:d,freezeScroll:g}=t,m=c.handleCloseDialog;return(0,v.jsxs)(O.A,{store:c,className:"cq-modal--settings",title:r,modalMode:!0,enableTabular:s,emptyMenu:!0,portalNodeId:d,children:[(0,v.jsx)(O.A.Title,{}),(0,v.jsx)(O.A.Body,{children:(0,v.jsx)("div",{className:"cq-chart-settings",children:s?(0,v.jsxs)(At,{className:"tabs--vertical",children:[(0,v.jsxs)(Pt,{children:[(0,v.jsx)(Ft,{children:"Settings"}),(0,v.jsx)(Ft,{children:"Description"})]}),(0,v.jsxs)(Ut,{children:[(0,v.jsx)(Rr,{itemGroups:e,theme:h,onItemChange:o,setScrollPanel:u,freezeScroll:g}),(0,v.jsx)(Mr,{onReset:n,onDone:m})]}),(0,v.jsx)(Ut,{children:a})]}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(Rr,{itemGroups:e,theme:h,onItemChange:o,setScrollPanel:u,freezeScroll:g,formClassname:i}),(0,v.jsx)(Mr,{onDelete:l,onReset:n,onDone:m})]})})})]})}),Hr=(0,r.observer)(()=>{const{chart:t,chartAdapter:e}=(0,b.gy)(),{epochBounds:r,isFeedLoaded:i}=e,{feed:a}=t,s=a?.quotes;if(void 0===s||!1===i||0===s.length)return null;const n=s[s.length-1].DT?.getTime();return n?r.rightEpoch>n?null:(0,v.jsx)("div",{className:"scroll_to_recent",onClick:()=>{e.flutterChart?.app.scrollToLastTick()},children:(0,v.jsx)(x.fA,{})}):null});var qr=g(9160).t;const $r=a().forwardRef((t,r)=>{const{chart:s,drawTools:n,studies:o,chartSetting:l,chartType:h,state:u,loader:d,chartAdapter:g,timeperiod:m,crosshair:p}=(0,b.gy)(),{chartId:f,init:_,destroy:y,isChartAvailable:S,chartContainerHeight:x,containerWidth:w}=s,{settingsDialog:C,restoreStudies:T,activeItems:k}=o,{settingsDialog:j}=n,{settingsDialog:E,isCandle:A,isSpline:I}=h,{updateProps:D,isChartClosed:O}=u,{theme:P,position:L,isHighestLowestMarkerEnabled:M}=l,{isActive:R,show:B}=d,F=a().useRef(null),V=a().useRef(null);(0,i.useImperativeHandle)(r,()=>({hasPredictionIndicators:()=>null!==localStorage.getItem("predictionIndicators"),triggerPopup(t){m.predictionIndicator.dialogPortalNodeId="modal_root",m.predictionIndicator.setOpen(!0),m.predictionIndicator.setCancel(()=>{localStorage.getItem("predictionIndicators")&&(t(),T([...k,...(0,c.xL)(localStorage.getItem("predictionIndicators")||"")]))})}})),a().useEffect(()=>((0,Te.h1)(),(0,Te.D_)(),void 0!==t.crosshairEnabled&&p.setInitialEnabledState(t.crosshairEnabled),D(t),_(F.current,t),()=>{y()}),[]),a().useEffect(()=>{D(t)});const H=(t=>{const e=a().useRef();return a().useEffect(()=>{e.current=t},[t]),e.current})(qr.lang);a().useEffect(()=>{H&&H!==qr.lang&&!R&&B?.()},[qr.lang]);const{id:q,isMobile:$=!1,barriers:U=[],children:z,chartControlsWidgets:G,topWidgets:W,bottomWidgets:K,enabledChartFooter:Q=!0,enabledNavigationWidget:Y=!0,toolbarWidget:X=()=>null,historical:J,contracts_array:tt=[]}=t,et=G&&L&&!$,rt=W||(()=>(0,v.jsx)(fr,{})),it=a().useCallback(X,[qr.lang]);return a().useEffect(()=>(g.onMount(V.current),()=>{g.onUnmount()}),[]),a().useEffect(()=>{g.updateContracts(tt)},[tt]),(0,v.jsx)("div",{id:q||f,className:e()("smartcharts",`smartcharts-${P}`,{"smartcharts--navigation-widget":Y,"smartcharts--loading":R,"smartcharts--has-markers":z&&a().Children.count(z)>0,[`smartcharts-${w}`]:!$}),children:(0,v.jsxs)("div",{className:e()({"smartcharts-mobile":$,"smartcharts-desktop":!$}),children:[(0,v.jsx)("div",{className:"cq-context",ref:F,children:(0,v.jsx)("div",{className:e()({[`cq-chart-control-${L}`]:et,"cq-chart-control-bottom":!et}),children:(0,v.jsxs)("div",{className:"ciq-chart-area",children:[(0,v.jsxs)("div",{className:e()("ciq-chart",{"closed-chart":O}),children:[(0,v.jsx)(Dr,{at:"subholder",children:U.map(({key:t,...e},r)=>(0,v.jsx)(N,{...e},`barrier-${r}`))}),(0,v.jsx)(Dr,{at:"subholder",children:!A&&!I&&M&&(0,v.jsx)(jr,{})}),(0,v.jsx)(Dr,{at:"subholder",children:z}),(0,v.jsx)(Dr,{at:"subholder",children:(0,v.jsx)(Ir,{})}),!d.isActive&&(0,v.jsx)("div",{className:"cq-top-ui-widgets",children:(0,v.jsx)(rt,{})}),(0,v.jsx)("div",{className:"chartContainer",ref:V,style:{height:J&&x&&$?x-30:x}}),Y&&(0,v.jsx)(Ar,{}),it&&(0,v.jsx)(it,{}),!S&&(0,v.jsx)("div",{className:"cq-chart-unavailable",children:qr.translate("Chart data is not available for this symbol.")}),(0,v.jsx)("div",{className:"cq-inchart-subholder"}),(0,v.jsx)(Ae,{children:(0,v.jsx)(Ee,{bottomWidgets:K})})]}),null!==G&&!Q&&(0,v.jsx)(Oe,{widgets:G}),(0,v.jsx)(Hr,{}),Q&&(0,v.jsx)(Me,{}),(0,v.jsx)(Z.A,{})]})})}),(0,v.jsx)(Vr,{store:j}),(0,v.jsx)(Vr,{store:E}),(0,v.jsx)(Vr,{store:C}),(0,v.jsx)(Er,{}),(0,v.jsx)(yr,{}),(0,v.jsx)(wr,{}),(0,v.jsx)("div",{id:"smartcharts_modal",className:"ciq-modal"})]})})}),Ur=(0,r.observer)($r),zr=a().forwardRef(({children:t,...e},r)=>{const i=a().useRef(!1);i.current||((0,b.cA)(),i.current=!0);const s=(0,b.gy)(),n=(0,b.SD)().Provider;return(0,v.jsx)(n,{value:s,children:(0,v.jsx)(Ur,{...e,ref:r,children:t})})});g(2313);const Gr=(0,r.observer)(({position:t="top",children:r})=>{const{chart:i,toolbarWidget:a}=(0,b.gy)(),{context:s}=i,{onMouseEnter:n,onMouseLeave:o}=a;return s?(0,v.jsx)("div",{className:e()("sc-toolbar-widget",{[`sc-toolbar-widget--${t}`]:!!t}),onMouseEnter:n,onMouseLeave:o,children:r}):null});g(9758);const Wr={Barrier:N,ChartSetting:we,ChartSize:ue,ChartTitle:fr,ChartTypes:M,ChartMode:nt,createObjectFromLocalStorage:c.s0,CrosshairToggle:ce,DrawTools:ye,FastMarker:Tr,Marker:Tr,PendingPromise:n.A,setSmartChartsPublicPath:function(t){g.p=t},Share:Ce.default,SmartChart:zr,StudyLegend:ee,Timeperiod:et,Views:oe,ToolbarWidget:Gr,logEvent:Te.$s,LogCategories:Te.dq,LogActions:Te.Cw}})(),m=m.default})());
|