PageSourceSearch

https://assets.www.handelsblatt.com/frontend/1039.efe64e2ea7390ffb.js

js handelsblatt.com collected 2026-10-01 08:32:34 UTC 905,550 bytes, 1 lines download raw bytes

1(self.webpackChunkhbApp=self.webpackChunkhbApp||[]).push([[1039],{81137(cr,dr,qe){var Fn;self,Fn=r=>(()=>{var Fn={757:(At,ot,ee)=>{At.exports=ee(760)},417:(At,ot,ee)=>{"use strict";function wt(m){return(wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(m)}var It=ee(825),tt=ee(489),Pt=ee(344),F=ee(616),lt=ee(620);"object"===(typeof window>"u"?"undefined":wt(window))&&window&&(window.Buffer=void 0);var b={ADL:{code:"ADL",name:"Advance/Decline Line",calculateFunc:"getADL",defaultParams:{}},ADLINE:{code:"ADLINE",name:"Accumulation/Distribution Line",calculateFunc:"getADLINE",defaultParams:{}},ALPHA:{code:"ALPHA",name:"Alpha",calculateFunc:"getALPHA",defaultParams:{period1:3}},AROONOSC:{code:"AROONOSC",name:"Aroon Oscillator",calculateFunc:"getAroonOsc",defaultParams:{period1:14,type:"HIGHLOW"}},AROON:{code:"AROON",name:"Aroon Up/Down",calculateFunc:"getAroon",defaultParams:{period1:14,type:"HIGHLOW"}},ADX:{code:"ADX",name:"Average Directional Index (ADX)",calculateFunc:"getADX",defaultParams:{period1:14,smoothingSL:"EMA",signalLinePeriod:13,highLevel:30,lowLevel:10}},ATR:{code:"ATR",name:"Average True Range",calculateFunc:"getATR",defaultParams:{period1:14}},BETA:{code:"BETA",name:"Beta",calculateFunc:"getBETA",defaultParams:{period1:14}},BB:{code:"BB",name:"Bollinger Bands",calculateFunc:"getBB",defaultParams:{period1:20,width:2,smoothing:"SMA"}},BBB:{code:"BBB",name:"Bollinger Bands B",calculateFunc:"getBBB",defaultParams:{period1:20,width:2,smoothing:"SMA"}},BBW:{code:"BBW",name:"Bollinger Width",calculateFunc:"getBBW",defaultParams:{period1:20,width:2,smoothing:"SMA"}},COG:{code:"COG",name:"Centre of Gravity",calculateFunc:"getCOG",defaultParams:{period1:10,period2:3}},COSZ:{code:"COSZ",name:"Chaikin Oscillator",calculateFunc:"getCOSZ",defaultParams:{period1:10,period2:10}},CVOL:{code:"CVOL",name:"Chaikin Volatility",calculateFunc:"getCVOL",defaultParams:{period1:10,period2:10,smoothing:"EMA"}},CLV:{code:"CLV",name:"Close Location Value",calculateFunc:"getCLV",defaultParams:{}},CCI:{code:"CCI",name:"Commodity Channel Index (CCI)",calculateFunc:"getCCI",defaultParams:{period1:20,smoothing:"SMA"}},COP:{code:"COP",name:"Coppock Curve",calculateFunc:"getCOP",defaultParams:{period1:14,period2:11,period3:10}},COR:{code:"COR",name:"Correlation",calculateFunc:"getCOR",defaultParams:{period1:30}},COV:{code:"COV",name:"Covariance",calculateFunc:"getCOV",defaultParams:{period1:30}},DPO:{code:"DPO",name:"Detrended Price Oscillator",calculateFunc:"getDPO",defaultParams:{period1:20}},DMI:{code:"DMI",name:"Directional Movement Indicator (DMI)",calculateFunc:"getDMI",defaultParams:{period1:14}},DC:{code:"DC",name:"Donchian Channel",calculateFunc:"getDC",defaultParams:{period1:20}},DCW:{code:"DCW",name:"Donchian Width",calculateFunc:"getDCW",defaultParams:{period1:20}},DEMA:{code:"DEMA",name:"Double Exponential Moving Average",calculateFunc:"getDEMA",defaultParams:{period1:50}},DSS:{code:"DSS",name:"Double Smoothed Stochastic",calculateFunc:"getDSS",defaultParams:{period1:5,period2:7,period3:3,upperBand:80,lowerBand:20,smoothing1:"EMA",smoothing2:"EMA",smoothingSL:"SMA",signalLinePeriod:13}},DYMOI:{code:"DYMOI",name:"Dynamic Momentum Index",calculateFunc:"getDYMOI",defaultParams:{period1:10,period2:5,period3:14,upperBand:70,lowerBand:30}},EMV:{code:"EMV",name:"Ease of Movement (EMV)",calculateFunc:"getEMV",defaultParams:{period1:9}},ERI:{code:"ERI",name:"Elder Ray Index",calculateFunc:"getERI",defaultParams:{period1:13,period2:13,smoothing:"SMA"}},EMA:{code:"EMA",name:"Exponential Moving Average",calculateFunc:"getEMA",defaultParams:{period1:38}},FSTOCH:{code:"FSTOCH",name:"Fast Stochastic",calculateFunc:"getFastStochastic",defaultParams:{period1:14,period2:3,overBought:80,overSold:20,smoothing:"SMA"}},FI:{code:"FI",name:"Force Index",calculateFunc:"getFI",defaultParams:{period1:13}},HEIKINASHI:{code:"HEIKINASHI",name:"Heikin-Ashi Candlesticks",calculateFunc:"getHEIKINASHI",defaultParams:{}},KST:{code:"KST",name:"Know Sure Thing",calculateFunc:"getKST",defaultParams:{ROCPer1:10,ROCPer2:15,ROCPer3:20,ROCPer4:30,ROCPer1Weight:1,ROCPer2Weight:2,ROCPer3Weight:3,ROCPer4Weight:4,SROCPer1:10,SROCPer2:10,SROCPer3:10,SROCPer4:15,SROCPer1Smoothing:"SMA",SROCPer2Smoothing:"SMA",SROCPer3Smoothing:"SMA",SROCPer4Smoothing:"SMA",signalLine:9,signalLineSmoothing:"SMA"}},MACD:{code:"MACD",name:"MACD",calculateFunc:"getMACD",defaultParams:{period1:12,period2:26,signalLinePeriod:9,smoothing1:"EMA",smoothing2:"EMA",smoothingSL:"EMA"}},MDX:{code:"MDX",name:"Mass Index (MDX)",calculateFunc:"getMDX",defaultParams:{period1:9,period2:25,signalLinePeriod:9,smoothing1:"EMA",smoothing2:"EMA",smoothingSL:"EMA"}},MODB:{code:"MODB",name:"MODB",calculateFunc:"getMODB",defaultParams:{factor1:1,data1:"close",factor2:1,data2:"close",operator:"-"}},MOM:{code:"MOM",name:"Momentum",calculateFunc:"getMomentum",defaultParams:{period1:14,period2:14,smoothing:"SMA"}},NVI:{code:"NVI",name:"Negative Volume Index (NVI)",calculateFunc:"getNVI",defaultParams:{period1:14}},NOT:{code:"NOT",name:"Notis %V (NOT)",calculateFunc:"getNOT",defaultParams:{period1:14,smoothing:"EMA"}},OBV:{code:"OBV",name:"On Balance Volume",calculateFunc:"getOBV",defaultParams:{period2:20}}
1,OUTPERFORMANCE:{code:"OUTPERFORMANCE",name:"Outperformance",calculateFunc:"getOutperformance",defaultParams:{}},PSAR:{code:"PSAR",name:"Parabolic SAR (PSAR)",calculateFunc:"getPSAR",defaultParams:{step:.02,max:.2}},PERFORMANCE:{code:"PERFORMANCE",name:"Performance",calculateFunc:"getPerformance",defaultParams:{}},PVI:{code:"PVI",name:"Positive Volume Index (PVI)",calculateFunc:"getPVI",defaultParams:{period1:14}},PVT:{code:"PVT",name:"Price Volume Trend",calculateFunc:"getPVT",defaultParams:{period1:14}},RR:{code:"RR",name:"R squared",calculateFunc:"getRR",defaultParams:{period1:14}},RAVI:{code:"RAVI",name:"Rapid Adaptive Variance Indicator",calculateFunc:"getRAVI",defaultParams:{period1:7,period2:65,maxZone:24,highZone:3,smoothing:"SMA"}},ROC:{code:"ROC",name:"Rate of Change",calculateFunc:"getROC",defaultParams:{period1:16,smoothingSL:"EMA",signalLinePeriod:9}},RSC:{code:"RSC",name:"Relative Strength Comparison",calculateFunc:"getRSC",defaultParams:{}},RSL:{code:"RSL",name:"Relative Strength Levy",calculateFunc:"getRSL",defaultParams:{period1:27,smoothing:"SMA"}},RSI:{code:"RSI",name:"Relative Strength Index",calculateFunc:"getRSI",defaultParams:{period1:14,upperBand:70,lowerBand:30}},RVI:{code:"RVI",name:"Relative Volatility Index",calculateFunc:"getRVI",defaultParams:{period1:10,period2:14}},SMA:{code:"SMA",name:"Simple Moving Average",calculateFunc:"getSMA",defaultParams:{period1:38}},SSTOCH:{code:"SSTOCH",name:"Slow Stochastic",calculateFunc:"getSlowStochastic",defaultParams:{period1:14,period2:3,period3:3,overBought:80,overSold:20,smoothing1:"EMA",smoothing2:"EMA"}},SROC:{code:"SROC",name:"Smoothed Rate of Change Indicator",calculateFunc:"getSROC",defaultParams:{period1:13,period2:21,smoothing:"EMA",smoothingSL:"SMA",signalLinePeriod:9}},STDDEV:{code:"STDDEV",name:"Standard Deviation",calculateFunc:"getStdDev",defaultParams:{period1:12}},STOCHRSI:{code:"STOCHRSI",name:"Stochastic RSI",calculateFunc:"getStochRSI",defaultParams:{period1:14}},TCI:{code:"TCI",name:"Trend Confirmation Indicator",calculateFunc:"getTCI",defaultParams:{period1:5,period2:10,smoothing1:"SMA",smoothing2:"SMA"}},TRIX:{code:"TRIX",name:"TRIX",calculateFunc:"getTrix",defaultParams:{period1:15,period2:9}},TSF:{code:"TSF",name:"Time Series Forecast",calculateFunc:"getTSF",defaultParams:{period1:20}},TSI:{code:"TSI",name:"True Strength Index",calculateFunc:"getTSI",defaultParams:{period1:25,period2:13,signalLinePeriod:7,upperBand:25,lowerBand:-25,smoothing1:"EMA",smoothing2:"EMA",smoothingSL:"EMA"}},UO:{code:"UO",name:"Ultimate Oscillator",calculateFunc:"getUO",defaultParams:{period1:7,period2:14,period3:28,median:50,weight1:4,weight2:2,weight3:1}},VAR:{code:"VAR",name:"Value at Risk",calculateFunc:"getVAR",defaultParams:{period1:200,percent:5}},VOLA:{code:"VOLA",name:"Volatility",calculateFunc:"getVolatility",defaultParams:{period1:90,period2:250}},VR:{code:"VR",name:"Volatility Ratio",calculateFunc:"getVR",defaultParams:{period1:14}},VOL:{code:"VOL",name:"Volume",calculateFunc:"getVolume",defaultParams:{}},VO:{code:"VO",name:"Volume Oscillator",calculateFunc:"getVO",defaultParams:{period1:14,period2:28,signalLinePeriod:0,smoothing1:"SMA",smoothing2:"SMA",smoothingSL:"SMA"}},WMA:{code:"WMA",name:"Weighted Moving Average",calculateFunc:"getWMA",defaultParams:{period1:38}},WAD:{code:"WAD",name:"Williams Accumulation/Distribution Indicator",calculateFunc:"getWAD",defaultParams:{}},WSL:{code:"WSL",name:"Williams Shadow Line",calculateFunc:"getWSL",defaultParams:{period1:10,shadowDelay:5,smoothing:"SMA"}},WVAD:{code:"WVAD",name:"Williams Variable Accumulation Distribution Index",calculateFunc:"getWVAD",defaultParams:{period1:20,smoothing:"SMA"}},WILLIAMSR:{code:"WILLIAMSR",name:"WilliamsR",calculateFunc:"getWilliamR",defaultParams:{period1:14,range:30}},ZIGZAG:{code:"ZIGZAG",name:"ZigZag",calculateFunc:"getZigZag",defaultParams:{percentage:5}}};function V(m){var A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=[],O=[],M=[],D=[],T=[],R=[],y=[],L=[],H=[],G=[],J=[],Z=[];if(void 0===A)for(var nt,W=0,z=m.length;nt=m[W],W<z;W++)O.push(nt.open),M.push(nt.high),_.push(nt.low),D.push(nt.close),T.push(nt.volume),R.push(nt.date),L.push(null),H.push(null),y.push(null),G.push(null),J.push(null),Z.push(null);else{for(var q,at=0,st=m.length;q=m[at],at<st;at++)O.push(q.open),M.push(q.high),_.push(q.low),D.push(q.close),T.push(q.volume),R.push(q.date);for(var vt,Nt=0,St=A.length;vt=A[Nt],Nt<St;Nt++)L.push(vt.open),H.push(vt.high),y.push(vt.low),G.push(vt.close),J.push(vt.volume),Z.push(vt.date)}return this.data=m,this.open=O,this.high=M,this.low=_,this.close=D,this.volume=T,this.date=R,this.data2=A,this.open2=L,this.high2=H,this.low2=y,this.close2=G,this.volume2=J,this.date2=Z,this.dayDiff=Math.floor((new Date(this.date[m.length-1])-new Date(this.date[0]))/864e5),this}function kt(m,A){var _=It(m.close),O=F.mmin(m.low,A),M=F.mmax(m.high,A);return F.subtract(M,O),_.splice(0,A-1),F.subtract(_,O),F.divide(_,M),F.multiply(_,100),_}function dt(m,A){for(var _=2/(m+1),O=0,M=0;M<m;M++)O+=A[M];var D=[];D.push(O/=m);for(var T=1,R=A.length-m;T<=R;T++)D[T]=_*(A[T+m-1]-D[T-1])+D[T-1];return D}function pt(m,A,_){var O=[];if("SMA"===m)O=new tt.SMA({period:A,values:_}).getResult();else if("EMA"===m)O=dt(A,_);else if("WMA"===m)O=new tt.WMA({period:A,values:_}).getResult();else if("COG"===m)O=function(T,R){for(var y=[],L=0,H=R.length-T;L<=H;L++){for(var G=0,J=0,Z=1;Z<=T;Z++)G+=Z*R[Z-1+L],J+=R[Z-1+L];y[L]=G/J*-1}return y}(A,_);else for(var M=0,D=_.length-1;M<D;M++)O[M]=null;return O}function yt(m){var _=m.high,O=m.low,M=It(m.close);M.unshift(0),M.pop();var D=It(_);F.subtract(D,O);for(var T=D[0],R=1,y=_.length;R<y;R++){var L=Math.abs(_[R]-M[R]);L>D[R]&&(D[R]=L),(L=Math.abs(M[R]-O[R]))>D[R]&&(D[R]=L)}return D[0]=T,D}function Ht(m,A){for(var _=[],O=0,M=m.length-A;O<=M;O++)_.push(F.sum(m.slice(O,O+A)));return _}function Et(m,A){var O,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;O=It(void 0===_||"HIGHLOW"===_?m.high:m.close);for(var M=Array(O.length),D=0,T=O.length;D<T;D++){var R=O[D];if(0===R)M[D]=0;else{for(var y=D,L=A,H=A;H>0&&y>=H;){var G=O[y-=1];null!==G&&(H-=1,G>R&&(R=G,L=H))}M[D]=H>0?0:100*L/A}}return M}function Be(m,A){var O,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;O=It(void 0===_||"HIGHLOW"===_?m.low:m.close);for(var M=Array(O.length),D=0,T=O.length;D<T;D++){var R=O[D];if(0===R)M[D]=0;else{for(var y=D,L=A,H=A;H>0&&y>=H;){var G=O[y-=1];null!==G&&(H-=1,G<R&&(R=G,L=H))}M[D]=H>0?0:100*L/A}}return M}function Ee(m,A,_,O){var M=F.mean(m),D=F.mean(A),T=It(m);F.subtract(T,M);var R=It(A);F.subtract(R,D);var y=lt(_.concat(O)).sort(function(J,Z){return new Date(J).getTime()-new Date(Z).getTime()}),L=-1,H=-1,G=[];return y.map(function(J){var Z=null,nt=_.indexOf(J),W=O.indexOf(J);
1if(nt>-1&&(L=nt),W>-1&&(H=W),L>-1&&H>-1){var z=T[L],q=R[H];void 0!==z&&void 0!==q&&(Z=z*q)}G.push(Z)}),m.length?F.sum(G)/m.length:null}function ce(m){var A=F.mean(m),_=It(m);F.subtract(_,A);for(var O=0,M=_.length;O<M;O++)_[O]=_[O]*_[O];return m.length?F.sum(_)/m.length:null}V.prototype.getVAR=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=this.date,O=this.close;void 0===m&&(m=b.VAR.defaultParams.period1),void 0===A&&(A=b.VAR.defaultParams.percent);var M=It(O);if(M.unshift(0),M.pop(),O.length<m)return[];for(var D=Math.floor(m*A/100),T=m*A/100-D,R=D+1,y=[],L=1,H=O.length-m;L<H;L++){var J=It(O).splice(L,m),Z=[];Z[0]=0;for(var nt=1,W=J.length;nt<W;nt++)Z[nt]=(J[nt]-J[nt-1])/J[nt-1];Z.sort();var q=Z[R];y.push(q+T*(Z[D]-q))}for(var st=0;st<=m;st++)y.splice(0,0,null);for(var vt,Nt,St=[],Ft=0,Vt=_.length;vt=y[Ft],Nt=_[Ft],Ft<Vt;Ft++)St.push({date:Nt,var:vt});return St},V.prototype.getVR=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date,O=this.high,M=this.low;void 0===m&&(m=b.VR.defaultParams.period1);var D=It(this.close);D.unshift(0),D.pop();for(var T=[],R=[],y=[],L=0,H=A.length;L<H;L++)0!==L?(T[L]=O[L]>D[L]?O[L]:D[L],R[L]=M[L]<D[L]?M[L]:D[L]):(T[L]=O[L],R[L]=M[L]),y[L]=T[L]-R[L];for(var G=F.mmean(y,m),J=[],Z=0,nt=G.length;Z<nt;Z++)J[Z]=y[Z+m-1]/G[Z];for(var W=1;W<=m-1;W++)J.splice(0,0,null);for(var z,q,at=[],st=0,vt=A.length;z=J[st],q=A[st],st<vt;st++)at.push({date:q,vr:z});return at},V.prototype.getRR=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date,_=this.date2,O=this.close,M=this.close2;void 0===m&&(m=b.RR.defaultParams.period1);for(var y,L,H,G,J,D=[],T=[],R=[],Z=0,nt=O.length;Z<nt;Z++)T[Z]=O[Z]*O[Z],R[Z]=M[Z]*M[Z];var W=lt(A.concat(_)).sort(function(ge,Oe){return new Date(ge).getTime()-new Date(Oe).getTime()}),z=-1,q=-1;W.map(function(ge){var Oe=null,Xe=A.indexOf(ge),pn=A.indexOf(ge);if(Xe>-1&&(z=Xe),pn>-1&&(q=pn),z>-1&&q>-1){var Me=O[z],Vn=M[q];void 0!==Me&&void 0!==Vn&&(Oe=Me*Vn)}D.push(Oe)}),y=F.msum(O,m),L=F.msum(M,m),H=F.msum(D,m),G=F.msum(T,m),J=F.msum(R,m);for(var at=[],st=0,vt=H.length;st<vt;st++){var Nt=H[st]-1/m*y[st]*L[st];Nt/=Math.sqrt((G[st]-1/m*y[st]*y[st])*(J[st]-1/m*L[st]*L[st])),at[st]=Nt*Nt}for(var St=1,Ft=m-1;St<=Ft;St++)at.splice(0,0,null);for(var Vt,xt,$t=[],ne=lt(A.concat(_)).sort(function(ge,Oe){return new Date(ge).getTime()-new Date(Oe).getTime()}),ae=0,oe=ne.length;Vt=at[ae],xt=ne[ae],ae<oe;ae++)$t.push({date:xt,rr:Vt});return $t},V.prototype.getOutperformance=function(){var m=this.date,A=this.date2,_=this.close,O=this.close2,M=It(_);M.unshift(0),M.pop();var D=It(O);D.unshift(0),D.pop();var T=[],R=[];T[0]=null,R[0]=null;var y=m.slice(1),L=A.slice(1),H=lt(y.concat(L)).sort(function(vt,Nt){return new Date(vt).getTime()-new Date(Nt).getTime()}),G=-1,J=-1;H.map(function(vt){var Nt=null,St=null,Ft=m.indexOf(vt),Vt=m.indexOf(vt);if(Ft>-1&&(G=Ft),Vt>-1&&(J=Vt),G>0&&J>0){var xt=_[G],$t=O[J],ne=_[G-1],ae=O[J-1];void 0!==xt&&void 0!==$t&&void 0!==ne&&void 0!==ae&&(Nt=xt-ne+1-($t-ae),St=100+100*(xt-ne)/ne-100*($t-ae)/ae)}T.push(Nt),R.push(St)});for(var Z,nt,W,z=[],q=lt(m.concat(A)).sort(function(vt,Nt){return new Date(vt).getTime()-new Date(Nt).getTime()}),at=0,st=q.length;Z=T[at],nt=R[at],W=q[at],at<st;at++)z.push({date:W,opAbs:Z,opPerc:nt});return z},V.prototype.getALPHA=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date,_=this.date2,O=this.close,M=this.close2;void 0===m&&(m=b.ALPHA.defaultParams.period1);for(var D=[],T=[],R=[],y=m,L=A.length;y<L;y++)D[y-m]=100*(O[y]-O[y-m])/O[y-m],T[y-m]=100*(M[y]-M[y-m])/M[y-m];var H=A.slice(m),G=_.slice(m),J=lt(H.concat(G)).sort(function(St,Ft){return new Date(St).getTime()-new Date(Ft).getTime()}),Z=-1,nt=-1;J.map(function(St){var Ft=null,Vt=H.indexOf(St),xt=G.indexOf(St);if(Vt>-1&&(Z=Vt),xt>-1&&(nt=xt),Z>-1&&nt>-1){var $t=D[Z],ne=T[nt];void 0!==$t&&void 0!==ne&&(Ft=$t-ne)}R.push(Ft)});for(var W=0;W<m;W++)R.splice(0,0,null);for(var z,q,at=[],st=lt(A.concat(_)).sort(function(St,Ft){return new Date(St).getTime()-new Date(Ft).getTime()}),vt=0,Nt=st.length;z=R[vt],q=st[vt],vt<Nt;vt++)at.push({date:q,alpha:z});return at},V.prototype.getBETA=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date,_=this.date2,O=this.close,M=this.close2;void 0===m&&(m=b.BETA.defaultParams.period1);var D=It(O);D.unshift(0),D.pop();var T=It(M);T.unshift(0),T.pop();for(var R=[],y=[],L=1,H=O.length-1;L<=H;L++)R[L-1]=100*(O[L]-D[L])/D[L];for(var G=1,J=M.length-1;G<=J;G++)y[G-1]=100*(M[G]-T[G])/T[G];var Z=A.slice(1),nt=_.slice(1),W=[];if(W.push(A.length>=_.length?{date:A[0],beta:null}:{date:_[0],beta:null}),Z.length>m||nt.length>m)if(Z.length>=nt.length){for(var z=0,q=m-1;z<q;z++)W.push({date:Z[z],beta:null});for(var at=0,st=Z.length-m+1;at<st;at++){var vt=R.slice(at,m+at),Nt=y.slice(at,m+at),Vt=Ee(vt,Nt,Z.slice(at,m+at),nt.slice(at,m+at)),xt=ce(Nt),$t=null;xt&&($t=Vt/xt),W.push({date:Z[m+at-1],beta:$t})}}else{for(var ne=0,ae=m-1;ne<ae;ne++)W.push({date:nt[ne],beta:null});for(var oe=0,ge=nt.length-m+1;oe<ge;oe++){var Oe=R.slice(oe,m+oe),Xe=y.slice(oe,m+oe),Vn=Ee(Oe,Xe,Z.slice(oe,m+oe),nt.slice(oe,m+oe)),Gt=ce(Xe),un=null;Gt&&(un=Vn/Gt),W.push({date:nt[m+oe-1],beta:un})}}return W},V.prototype.getRSC=function(){var m=this.date,_=this.close,O=this.close2,M=lt(m.concat(this.date2)).sort(function(R,y){return new Date(R).getTime()-new Date(y).getTime()}),D=-1,T=-1;return M.map(function(R){var y=null,L=m.indexOf(R),H=m.indexOf(R);if(L>-1&&(D=L),H>-1&&(T=H),D>-1&&T>-1){var G=_[D],J=O[T];void 0!==G&&void 0!==J&&0!==J&&(y=G/J)}return{date:R,rsc:y}})},V.prototype.getCOR_old=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date,_=this.date2,O=this.close,M=this.close2;void 0===m&&(m=b.COR.defaultParams.period1);for(var D=this.getCOV(m),T=[],R=0,y=D.length;R<y;R++)T[R]=D[R].date;var L=F.mstdev(O,m),H=F.mstdev(M,m),G=A.slice(O.length-L.length),J=_.slice(M.length-H.length),Z=lt(G.concat(J)).sort(function(xt,$t){return new Date(xt).getTime()-new Date($t).getTime()}),nt=-1,W=-1,z=[];Z.map(function(xt){var $t=null,ne=G.indexOf(xt),ae=J.indexOf(xt),oe=T.indexOf(xt);if(ne>-1&&(nt=ne),ae>-1&&(W=ae),nt>-1&&W>-1){var ge=L[nt],Oe=H[W];ge&&Oe&&null!=D[oe].cov&&($t=D[oe].cov/(ge*Oe))}z.push($t)}
1);for(var q=0,at=m-1;q<at;q++)z.splice(0,0,null);for(var st,vt,Nt=[],St=lt(A.concat(_)).sort(function(xt,$t){return new Date(xt).getTime()-new Date($t).getTime()}),Ft=0,Vt=St.length;st=z[Ft],vt=St[Ft],Ft<Vt;Ft++)Nt.push({date:vt,r:st});return Nt},V.prototype.getCOR=function(){for(var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date,_=this.close,O=this.close2,M=Ht(_,m),D=Ht(O,m),T=[],R=[],y=[],L=0,H=_.length;L<H;L++)T[L]=_[L]*O[L],R[L]=_[L]*_[L],y[L]=O[L]*O[L];for(var G=Ht(T,m),J=Ht(R,m),Z=Ht(y,m),nt=[],W=0,z=m-1;W<z;W++)nt.push({date:A[W],r:null});for(var q=0,at=G.length;q<at;q++){var st=m*G[q]-M[q]*D[q],vt=Math.sqrt((m*J[q]-M[q]*M[q])*(m*Z[q]-D[q]*D[q]));nt.push({date:A[q+m-1],r:st/vt})}return nt},V.prototype.getCOV=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.close,_=this.close2,O=this.date,M=this.date2;void 0===m&&(m=b.COV.defaultParams.period1);var D=[];if(O.length>m||M.length>m)if(O.length>=M.length){for(var T=0,R=m-1;T<R;T++)D.push({date:O[T],cov:null});for(var y=0,L=O.length-m+1;y<L;y++){var nt=Ee(A.slice(y,m+y),_.slice(y,m+y),O.slice(y,m+y),M.slice(y,m+y));D.push({date:O[m+y-1],cov:nt})}}else{for(var W=0,z=m-1;W<z;W++)D.push({date:M[W],cov:null});for(var q=0,at=M.length-m+1;q<at;q++){var Ft=Ee(A.slice(q,m+q),_.slice(q,m+q),O.slice(q,m+q),M.slice(q,m+q));D.push({date:M[m+q-1],cov:Ft})}}return D},V.prototype.getWVAD=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=this.date,O=this.open,M=this.high,D=this.low,T=this.close,R=this.volume;void 0===m&&(m=b.WVAD.defaultParams.period1),void 0===A&&(A=b.WVAD.defaultParams.smoothing);for(var y=[],L=0,H=_.length;L<H;L++)y[L]=(T[L]-O[L])/(M[L]-D[L])*R[L];for(var G=pt(A,m,y),J=0,Z=m-1;J<Z;J++)G.splice(0,0,null);for(var nt,W,z,q=[],at=0,st=_.length;nt=y[at],W=G[at],z=_[at],at<st;at++)q.push({date:z,wvad:nt,signalLine:W});return q},V.prototype.getTSF=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date,_=this.close;void 0===m&&(m=b.TSF.defaultParams.period1);for(var O=0,M=0,D=0,T=0,R=1/m,y=0,L=m-1;y<L;++y)O+=y+1,M+=(y+1)*(y+1),T+=_[y]*(y+1),D+=_[y];for(var H=1/(m*(M+=m*m)-(O+=m)*O),G=[],J=m-1,Z=_.length;J<Z;++J){var nt=(m*(T+=_[J]*m)-O*(D+=_[J]))*H;G.push((D-nt*O)*R+nt*(m+1)),T-=D,D-=_[J-m+1]}for(var z=1,q=m-1;z<=q;z++)G.splice(0,0,null);for(var at,st,vt=[],Nt=0,St=A.length;at=G[Nt],st=A[Nt],Nt<St;Nt++)vt.push({date:st,tsf:at});return vt},V.prototype.getTCI=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=this.date,D=this.close;void 0===m&&(m=b.TCI.defaultParams.period1),void 0===A&&(A=b.TCI.defaultParams.period2),void 0===_&&(_=b.TCI.defaultParams.smoothing1),void 0===O&&(O=b.TCI.defaultParams.smoothing2);for(var T=pt(_,m,D),R=pt(O,A,D),y=1,L=m-1;y<=L;y++)T.splice(0,0,null);for(var H=1,G=A-1;H<=G;H++)R.splice(0,0,null);var J=It(T);F.divide(J,R),F.multiply(J,100);for(var Z,nt,W=[],z=0,q=M.length;Z=J[z],nt=M[z],z<q;z++)W.push({date:nt,tci:Z});return W},V.prototype.getWSL=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=this.date,M=this.close;void 0===m&&(m=b.WSL.defaultParams.period1),void 0===A&&(A=b.WSL.defaultParams.shadowDelay),void 0===_&&(_=b.WSL.defaultParams.smoothing);for(var D=new tt.SMA({period:m,values:M}).getResult(),T=pt(_,m,M),R=It(T),y=1,L=m-1;y<=L;y++)D.splice(0,0,null),T.splice(0,0,null);for(var H=1,G=m+A-1;H<=G;H++)R.splice(0,0,null);for(var J,Z,nt,W,z=[],q=0,at=O.length;J=D[q],Z=R[q],W=O[q],nt=T[q],q<at;q++)z.push({date:W,sma:J,smoothing:nt,wsl:Z});return z},V.prototype.getRAVI=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=this.date,T=this.close;void 0===m&&(m=b.RAVI.defaultParams.period1),void 0===A&&(A=b.RAVI.defaultParams.period2),void 0===_&&(_=b.RAVI.defaultParams.maxZone),void 0===O&&(O=b.RAVI.defaultParams.highZone),void 0===M&&(M=b.RAVI.defaultParams.smoothing);for(var R=pt(M,m,T),y=pt(M,A,T),L=1,H=m-1;L<=H;L++)R.splice(0,0,null);for(var G=1,J=A-1;G<=J;G++)y.splice(0,0,null);var Z=It(R);F.subtract(Z,y),F.divide(Z,y),F.multiply(Z,100);for(var nt=0,W=Z.length;nt<W;nt++)Z[nt]=Math.abs(Z[nt]),(isNaN(Z[nt])||Z[nt]===1/0)&&(Z[nt]=null);for(var z,q,at=[],st=0,vt=D.length;z=Z[st],q=D[st],st<vt;st++)at.push({date:q,ravi:z,max_zone:_,high_zone:O});return at},V.prototype.getHEIKINASHI=function(){for(var m,A,_,O,M,D=this.date,R=new tt.HeikinAshi({open:this.open,high:this.high,low:this.low,close:this.close}).getResult(),y=[],L=0,H=D.length;m=R.open[L],A=R.high[L],_=R.low[L],O=R.close[L],M=D[L],L<H;L++)y.push({date:M,ha_open:m,ha_high:A,ha_low:_,ha_close:O});return y},V.prototype.getWAD=function(){var m=this.date,A=this.high,_=this.low,O=this.close,M=It(O);M.unshift(0),M.pop();var D=[],T=[],R=[],y=[];D[0]=A[0],T[0]=_[0],R[0]=O[0]-T[0],y[0]=R[0];for(var L=1,H=A.length;L<H;L++)D[L]=A[L]>M[L]?A[L]:M[L],T[L]=_[L]<M[L]?_[L]:M[L],R[L]=O[L]>M[L]?O[L]-T[L]:O[L]<M[L]?O[L]-D[L]:0,y[L]=R[L]+y[L-1];for(var G,J,Z=[],nt=0,W=m.length;G=m[nt],J=y[nt],nt<W;nt++)Z.push({date:G,wad:J});return Z},V.prototype.getVO=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,T=this.date,R=this.volume;void 0===m&&(m=b.VO.defaultParams.period1),void 0===A&&(A=b.VO.defaultParams.period2),void 0===_&&(_=b.VO.defaultParams.signalLinePeriod),void 0===O&&(O=b.VO.defaultParams.smoothing1),void 0===M&&(M=b.VO.defaultParams.smoothing2),void 0===D&&(D=b.VO.defaultParams.smoothingSL);var y=pt(O,m,R),L=pt(M,A,R);y.splice(0,A-m);for(var H=[],G=[],J=0,Z=y.length;J<Z;J++)H[J]=100*(y[J]-L[J])/L[J],0===_&&(G[J]=null);
1if(0!==_){G=pt(D,_,H);for(var nt=0,W=_-1;nt<W;nt++)G.splice(0,0,null)}for(var z=0,q=A-1;z<q;z++)H.splice(0,0,null),G.splice(0,0,null);for(var at,st,vt,Nt=[],St=0,Ft=T.length;at=T[St],st=H[St],vt=G[St],St<Ft;St++)Nt.push({date:at,vo:st,signalLine:vt});return Nt},V.prototype.getFI=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date,_=this.close,O=this.volume;void 0===m&&(m=b.FI.defaultParams.period1);var M=It(_);M.unshift(0),M.pop();var D=It(_);F.subtract(D,M),F.multiply(D,O),D.shift();for(var T=dt(m,D),R=0;R<m;R++)T.splice(0,0,null);for(var y,L,H=[],G=0,J=A.length;y=A[G],L=T[G],G<J;G++)H.push({date:y,fi:L});return H},V.prototype.getRVI=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=this.date,O=this.close;void 0===m&&(m=b.RVI.defaultParams.period1),void 0===A&&(A=b.RVI.defaultParams.period2);for(var M=F.mstdev(O,m),D=[],T=[],R=0,y=M.length;R<y;R++)D[R]=O[R+m]>O[R+m-1]?M[R]:0,T[R]=O[R+m]<O[R+m-1]?M[R]:0;var L=F.msum(D,A),H=F.msum(T,A);F.divide(L,A),F.divide(H,A);for(var G=[],J=0,Z=L.length;J<Z;J++)G[J]=100*L[J]/(L[J]+H[J]);for(var nt=0,W=m+A-2;nt<W;nt++)G.splice(0,0,null);for(var z,q,at=[],st=0,vt=_.length;z=_[st],q=G[st],st<vt;st++)at.push({date:z,rvi:q});return at},V.prototype.getNOT=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=this.date,M=this.low,D=this.close;void 0===m&&(m=b.NOT.defaultParams.period1),void 0===A&&(A=b.NOT.defaultParams.smoothing);var T=It(this.high);F.subtract(T,D);var R=It(D);F.subtract(R,M);for(var y=pt(A,m,T),L=pt(A,m,R),H=0,G=m-1;H<G;H++)y.splice(0,0,null),L.splice(0,0,null);for(var J,Z,nt,W=[],z=0,q=_.length;J=_[z],Z=y[z],nt=L[z],z<q;z++)W.push({date:J,uvlt:void 0===Z?null:100*Z,dvlt:void 0===nt?null:100*nt});return W},V.prototype.getDYMOI=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=this.date,T=this.close;void 0===m&&(m=b.DYMOI.defaultParams.period1),void 0===A&&(A=b.DYMOI.defaultParams.period2),void 0===_&&(_=b.DYMOI.defaultParams.period3),void 0===O&&(O=b.DYMOI.defaultParams.upperBand),void 0===M&&(M=b.DYMOI.defaultParams.lowerBand);for(var R=F.mstdev(T,A),y=new tt.SMA({period:m,values:R}).getResult(),L=1,H=m-1;L<=H;L++)y.splice(0,0,null);var G=It(R);F.divide(G,y);for(var J=0,Z=G.length-1;J<=Z;J++)G[J]=Math.round(_/G[J]),0===G[J]?G[J]=null:(G[J]<5&&(G[J]=5),G[J]>30&&(G[J]=30));for(var nt=[],W=m-1,z=D.length-A+1;W<z;W++){for(var q=[],at=W+A-1;at>=0;at--)q[at]=T[at];var st=G[W];q.length>st?q.splice(0,q.length-st-1):st=q.length-1;var vt=new tt.RSI({values:q,period:st}).getResult();nt.push(vt[0])}for(var Nt=1,St=A+m-2;Nt<=St;Nt++)nt.splice(0,0,null);for(var Ft,Vt,xt=[],$t=0,ne=D.length;Ft=D[$t],Vt=nt[$t],$t<ne;$t++)xt.push({date:Ft,dmi:Vt,upperBand:O,lowerBand:M});return xt},V.prototype.getTSI=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,T=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,R=arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0,y=this.date,L=this.close;void 0===m&&(m=b.TSI.defaultParams.period1),void 0===A&&(A=b.TSI.defaultParams.period2),void 0===_&&(_=b.TSI.defaultParams.signalLinePeriod),void 0===O&&(O=b.TSI.defaultParams.upperBand),void 0===M&&(M=b.TSI.defaultParams.lowerBand),void 0===D&&(D=b.TSI.defaultParams.smoothing1),void 0===T&&(T=b.TSI.defaultParams.smoothing2),void 0===R&&(R=b.TSI.defaultParams.smoothingSL);var H=It(L);H.unshift(0),H.pop(),F.subtract(L,H),L.shift();
1for(var G=pt(D,m,L),J=pt(T,A,G),Z=It(L),nt=0,W=Z.length;nt<W;nt++)Z[nt]=Math.abs(Z[nt]);var z=pt(D,m,Z),q=pt(T,A,z);F.divide(J,q);var at=It(J);F.multiply(at,100);for(var st=pt(R,_,at),vt=1,Nt=m+A-1;vt<=Nt;vt++)at.splice(0,0,null),st.splice(0,0,null);for(var St=1,Ft=_-1;St<=Ft;St++)st.splice(0,0,null);for(var Vt,xt,$t,ne=[],ae=0,oe=y.length;Vt=y[ae],xt=at[ae],$t=st[ae],ae<oe;ae++)ne.push({date:Vt,tsi:xt,signalLine:$t,upperBand:O,lowerBand:M});return ne},V.prototype.getCVOL=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=this.date,D=this.low;void 0===m&&(m=b.CVOL.defaultParams.period1),void 0===A&&(A=b.CVOL.defaultParams.period2),void 0===_&&(_=b.CVOL.defaultParams.smoothing);var T=It(this.high);F.subtract(T,D);for(var R=pt(_,m,T),y=new tt.ROC({period:A,values:R}).getResult(),L=1,H=m+A-1;L<=H;L++)y.splice(0,0,null);for(var G,J,Z=[],nt=0,W=O.length;G=O[nt],J=y[nt],nt<W;nt++)Z.push({date:G,cvol:J});return Z},V.prototype.getSROC=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=this.date;void 0===m&&(m=b.SROC.defaultParams.period1),void 0===A&&(A=b.SROC.defaultParams.period2),void 0===_&&(_=b.SROC.defaultParams.smoothing),void 0===O&&(O=b.SROC.defaultParams.smoothingSL),void 0===M&&(M=b.SROC.defaultParams.signalLinePeriod);for(var R=pt(_,m,this.close),y=new tt.ROC({period:A,values:R}).getResult(),L=pt(O,M,y),H=1,G=m+A-1;H<=G;H++)y.splice(0,0,null),L.splice(0,0,null);for(var J=1,Z=M-1;J<=Z;J++)L.splice(0,0,null);for(var nt,W,z,q=[],at=0,st=D.length;nt=D[at],W=y[at],z=L[at],at<st;at++)q.push({date:nt,sroc:W,signalLine:z});return q},V.prototype.getERI=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=this.date,D=this.high,T=this.low;void 0===m&&(m=b.ERI.defaultParams.period1),void 0===A&&(A=b.ERI.defaultParams.period2),void 0===_&&(_=b.ERI.defaultParams.smoothing);for(var R=pt("EMA",m,this.close),y=It(T),L=It(D),H=0,G=m-1;H<G;H++)y.shift(),L.shift();F.subtract(y,R),F.subtract(L,R);for(var J=pt(_,A,y),Z=pt(_,A,L),nt=1,W=m-1;nt<=W;nt++)y.splice(0,0,null),L.splice(0,0,null),J.splice(0,0,null),Z.splice(0,0,null);for(var z=0,q=A-1;z<q;z++)J.splice(0,0,null),Z.splice(0,0,null);for(var at,st,vt,Nt,St,Ft=[],Vt=0,xt=O.length;at=O[Vt],st=y[Vt],vt=L[Vt],Nt=J[Vt],St=Z[Vt],Vt<xt;Vt++)Ft.push({date:at,bearPower:st,bullPower:vt,signalLineBear:Nt,signalLineBull:St});return Ft},V.prototype.getKST=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,T=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,R=arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0,y=arguments.length>8&&void 0!==arguments[8]?arguments[8]:void 0,L=arguments.length>9&&void 0!==arguments[9]?arguments[9]:void 0,H=arguments.length>10&&void 0!==arguments[10]?arguments[10]:void 0,G=arguments.length>11&&void 0!==arguments[11]?arguments[11]:void 0,J=arguments.length>12&&void 0!==arguments[12]?arguments[12]:void 0,Z=arguments.length>13&&void 0!==arguments[13]?arguments[13]:void 0,nt=arguments.length>14&&void 0!==arguments[14]?arguments[14]:void 0,W=arguments.length>15&&void 0!==arguments[15]?arguments[15]:void 0,z=arguments.length>16&&void 0!==arguments[16]?arguments[16]:void 0,q=arguments.length>17&&void 0!==arguments[17]?arguments[17]:void 0,st=It(this).date;void 0===m&&(m=b.KST.defaultParams.ROCPer1),void 0===A&&(A=b.KST.defaultParams.ROCPer2),void 0===_&&(_=b.KST.defaultParams.ROCPer3),void 0===O&&(O=b.KST.defaultParams.ROCPer4),void 0===M&&(M=b.KST.defaultParams.ROCPer1Weight),void 0===D&&(D=b.KST.defaultParams.ROCPer2Weight),void 0===T&&(T=b.KST.defaultParams.ROCPer3Weight),void 0===R&&(R=b.KST.defaultParams.ROCPer4Weight),void 0===y&&(y=b.KST.defaultParams.SRO
1CPer1),void 0===L&&(L=b.KST.defaultParams.SROCPer2),void 0===H&&(H=b.KST.defaultParams.SROCPer3),void 0===G&&(G=b.KST.defaultParams.SROCPer4),void 0===J&&(J=b.KST.defaultParams.SROCPer1Smoothing),void 0===Z&&(Z=b.KST.defaultParams.SROCPer2Smoothing),void 0===nt&&(nt=b.KST.defaultParams.SROCPer3Smoothing),void 0===W&&(W=b.KST.defaultParams.SROCPer4Smoothing),void 0===z&&(z=b.KST.defaultParams.signalLine),void 0===q&&(q=b.KST.defaultParams.signalLineSmoothing);for(var vt=this.getROC(m,J,y),Nt=this.getROC(A,Z,L),St=this.getROC(_,nt,H),Ft=this.getROC(O,W,G),Vt=[],xt=0,$t=0,ne=st.length;xt<ne;xt++)null!==Ft[xt].signalLine&&(Vt[$t]=Number(M*vt[xt].signalLine)+D*Nt[xt].signalLine+T*St[xt].signalLine+R*Ft[xt].signalLine,$t++);for(var ae=pt(q,z,Vt),oe=1,ge=O+G-1;oe<=ge;oe++)Vt.splice(0,0,null),ae.splice(0,0,null);for(var Oe=1,Xe=z-1;Oe<=Xe;Oe++)ae.splice(0,0,null);for(var pn,Me,Vn,Gt=[],un=0,rn=st.length;pn=st[un],Me=Vt[un],Vn=ae[un],un<rn;un++)Gt.push({date:pn,kst:Me,signalLine:Vn});return Gt},V.prototype.getKST_old=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,T=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,R=arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0,y=arguments.length>8&&void 0!==arguments[8]?arguments[8]:void 0,L=It(this),H=L.date;void 0===m&&(m=b.KST.defaultParams.ROCPer1),void 0===A&&(A=b.KST.defaultParams.ROCPer2),void 0===_&&(_=b.KST.defaultParams.ROCPer3),void 0===O&&(O=b.KST.defaultParams.ROCPer4),void 0===M&&(M=b.KST.defaultParams.SMAROCPer1),void 0===D&&(D=b.KST.defaultParams.SMAROCPer2),void 0===T&&(T=b.KST.defaultParams.SMAROCPer3),void 0===R&&(R=b.KST.defaultParams.SMAROCPer4),void 0===y&&(y=b.KST.defaultParams.signalLinePeriod);for(var Z=new tt.KST({values:L.close,ROCPer1:m,ROCPer2:A,ROCPer3:_,ROCPer4:O,SMAROCPer1:M,SMAROCPer2:D,SMAROCPer3:T,SMAROCPer4:R,signalPeriod:y}).getResult(),nt=1,W=M+D+T+R-1;nt<=W;nt++)Z.splice(0,0,{kst:null,signal:null});for(var z,q,at=[],st=0,vt=0,Nt=H.length;z=H[st],q=Z[st],st<Nt;st++,vt++)at.push({date:z,kst:q.kst,signalLine:q.signal||null});return at},V.prototype.getDSS=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,T=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,R=arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0,y=arguments.length>8&&void 0!==arguments[8]?arguments[8]:void 0,L=It(this),H=L.date,G=L.close,J=L.high;void 0===m&&(m=b.DSS.defaultParams.period1),void 0===A&&(A=b.DSS.defaultParams.period2),void 0===_&&(_=b.DSS.defaultParams.period3),void 0===O&&(O=b.DSS.defaultParams.upperBand),void 0===M&&(M=b.DSS.defaultParams.lowerBand),void 0===D&&(D=b.DSS.defaultParams.smoothing1),void 0===T&&(T=b.DSS.defaultParams.smoothing2),void 0===R&&(R=b.DSS.defaultParams.smoothingSL),void 0===y&&(y=b.DSS.defaultParams.signalLinePeriod);for(var nt=F.mmin(L.low,m),W=F.mmax(J,m),z=It(G),q=It(W),at=0,st=m-1;at<st;at++)z.shift();F.subtract(z,nt),F.subtract(q,nt);var vt=pt(D,A,z),Nt=pt(D,A,q),St=pt(T,_,vt),Ft=pt(T,_,Nt),Vt=It(St);F.divide(Vt,Ft),F.multiply(Vt,100);for(var xt=pt(R,y,Vt),$t=1,ne=m+A+_-3;$t<=ne;$t++)Vt.splice(0,0,null),xt.splice(0,0,null);for(var ae=1,oe=y-1;ae<=oe;ae++)xt.splice(0,0,null);for(var ge,Oe,Xe,pn=[],Me=0,Vn=0,Gt=H.length;ge=H[Me],Oe=Vt[Me],Xe=xt[Me],Me<Gt;Me++,Vn++)pn.push({date:ge,dss:Oe,upperBand:O,lowerBand:M,signalLine:Xe});return pn},V.prototype.getCOP=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=It(this),M=O.date,D=O.close;void 0===m&&(m=b.COP.defaultParams.period1),void 0===A&&(A=b.COP.defaultParams.period2),void 0===_&&(_=b.COP.defaultParams.period3);for(var T=new tt.ROC({period:m,values:D}).getResult(),R=0,y=m-1;R<=y;R++)T.splice(0,0,null);for(var L=new tt.ROC({period:A,values:D}).getResult(),H=It(T),G=0,J=A-1;G<=J;G++)L.splice(0,0,null);F.add(H,L);for(var Z=pt("WMA",_,H),nt=0,W=_-1;nt<W;nt++)Z.splice(0,0,null);for(var z,q,at=[],st=0,vt=0,Nt=M.length;z=M[st],q=Z[st],st<Nt;st++,vt++)at.push({date:z,cop:q});return at},V.prototype.getNVI=function(){var m,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,_=It(this),O=_.date,M=_.volume,D=_.close,T=100;void 0===A&&(A=b.NVI.defaultParams.period1);for(var R=[],y=0,L=M.length;y<L;y++)R.push(0===y?T:M[y]<M[y-1]?T+T*(D[y]-m)/m:T),T=R[y],m=D[y];for(var H=new tt.SMA({period:A,values:R}).getResult(),G=1,J=A-1;G<=J;G++)H.splice(0,0,null);for(var Z,nt,W,z=[],q=0,at=0,st=O.length;Z=O[q],nt=R[q],W=H[at],q<st;q++,at++)z.push({date:Z,nvi:nt,signalLine:W});return z},V.prototype.getPVI=function(){var m,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,_=It(this),O=_.date,M=_.volume,D=_.close,T=100;void 0===A&&(A=b.PVI.defaultParams.period1);for(var R=[],y=0,L=M.length;y<L;y++)R.push(0===y?T:M[y]>M[y-1]?T+T*(D[y]-m)/m:T),T=R[y],m=D[y];for(var H=new tt.SMA({period:A,values:R}).getResult(),G=1,J=A-1;G<=J;G++)H.splice(0,0,null);for(var Z,nt,W,z=[],q=0,at=0,st=O.length;Z=O[q],nt=R[q],W=H[at],q<st;q++,at++)z.push({date:Z,pvi:nt,signalLine:W});return z},V.prototype.getADX=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=It(this),T=D.date;void 0===m&&(m=b.ADX.defaultParams.period1),void 0===A&&(A=b.ADX.defaultParams.smoothingSL),void 0===_&&(_=b.ADX.defaultParams.signalLinePeriod),void 0===O&&(O=b.ADX.defaultParams.highLevel),void 0===M&&(M=b.ADX.defaultParams.lowLevel);for(var G=new tt.ADX({period:m,high:D.high,low:D.low,close:D.close}).getResult(),J=[],Z=0,nt=G.length;Z<nt;Z++)J[Z]=G[Z].adx;for(var W=pt(A,_,J),z=0,q=2*m-1;z<q;z++)G.splice(0,0,null),W.splice(0,0,null);for(var at=1;at<_;at++)W.splice(0,0,null);for(var st,vt,Nt,St=[],Ft=0,Vt=T.length;st=T[Ft],vt=G[Ft],Nt=W[Ft],Ft<Vt;Ft++)St.push({date:st,adx:vt,signalLine:Nt,highLevel:O,lowLevel:M});return St},V.prototype.getPSAR=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=It(this),O=_.date;void 0===m&&(m=b.PSAR.defaultParams.step),void 0===A&&(A=b.PSAR.defaultParams.max);for(var T,R,L=new tt.PSAR({high:_.high,low:_.low,step:m,max:A}).getResult(),H=[],G=0,J=O.length;T=O[G],R=L[G],G<J;G++)H.push({date:T,psar:R});return H},V.prototype.getVolatility=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=It(this),O=_.date,M=_.close;void 0===m&&(m=b.VOLA.defaultParams.period1),void 0===A&&(A=b.VOLA.defaultParams.period2);var D=[];D.push(0);for(var T=1,R=O.length;T<R;T++)D.push(Math.log(M[T]/M[T-1]));for(var y=[],L=1,H=O.length-m;L<H;L++)y.push(F.stdev(D.slice(L,L+m)));for(var G=0;G<=m;G++)y.splice(0,0,null);for(var J,Z,nt=[],W=0,z=O.length;J=O[W],Z=y[W],W<z;W++)nt.push({date:J,vola:Z*Math.sqrt(A)*100});return nt},V.prototype.getDMI=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=It(this),_=A.date,O=A.high,M=A.low;void 0===m&&(m=b.DMI.defaultParams.period1);var D=[];D[0]=0;for(var T=1,R=_.length;T<R;T++)D[T]=0,O[T]-O[T-1]>M[T-1]-M[T]&&O[T]-O[T-1]>0&&(D[T]=O[T]-O[T-1]);var y=[];y[0]=0;for(var L=1,H=_.length;L<H;L++)y[L]=0,M[L-1]-M[L]>O[L]-O[L-1]&&M[L-1]-M[L]>0&&(y[L]=M[L-1]-M[L]);var G=yt(A),J=It(D),Z=It(y);F.divide(J,G),F.divide(Z,G),G.shift(),D.shift(),y.shift();var nt=[],W=[],z=[];nt[0]=0,W[0]=0,z[0]=0;for(var q=0,at=G.length;q<at;q++)q<m?(nt[0]+=D[q],W[0]+=y[q],z[0]+=G[q]):(nt[q-(m-1)]=nt[q-(m-1)-1]-nt[q-(m-1)-1]/m+D[q],W[q-(m-1)]=W[q-(m-1)-1]-W[q-(m-1)-1]/m+y[q],z[q-(m-1)]=z[q-(m-1)-1]-z[q-(m-1)-1]/m+G[q]);var st=It(nt);F.divide(st,z);var vt=It(W);F.divide(vt,z),F.multiply(st,100),F.multiply(vt,100);var Nt=It(st);F.subtract(Nt,vt),F.abs(Nt);var St=It(st);F.add(St,vt);var Ft=It(Nt);F.divide(Ft,St),F.multiply(Ft,100);for(var Vt=0,xt=m-1;Vt<=xt;
1Vt++)Ft.splice(0,0,null),st.splice(0,0,null),vt.splice(0,0,null);for(var $t,ne,ae,oe,ge=[],Oe=0,Xe=Ft.length;$t=_[Oe],ne=Ft[Oe],ae=st[Oe],oe=vt[Oe],Oe<Xe;Oe++)ge.push({date:$t,dmi:ne,dmiPos:ae,dmiNeg:oe});return ge},V.prototype.getDMI_old=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=It(this),_=A.date,O=A.high,M=A.low;void 0===m&&(m=b.DMI.defaultParams.period1);for(var D,T=[],R=0,y=_.length;D=O[R],R<y;R++)T.push(0===R?0:D-O[R-1]>0?D-O[R-1]:0);for(var L,H=[],G=0,J=_.length;L=M[G],G<J;G++)H.push(0===G?0:-1*(L-M[G-1])>0?-1*(L-M[G-1]):0);var z,q,at,Z=yt(A),nt=It(T),W=It(H);F.divide(nt,Z),F.divide(W,Z),z=Ht(T,m),q=Ht(H,m),at=Ht(Z,m);var st=It(z);F.divide(st,at);var vt=It(q);F.divide(vt,at),F.multiply(st,100),F.multiply(vt,100);var Nt=It(st);F.subtract(Nt,vt),F.abs(Nt);var St=It(st);F.add(St,vt);var Ft=It(Nt);F.divide(Ft,St),F.multiply(Ft,100);for(var Vt,xt,$t,ne,ae=[],oe=0,ge=Ft.length;Vt=_[oe],xt=Ft[oe],$t=st[oe],ne=vt[oe],oe<ge;oe++)ae.push({date:Vt,dmi:xt,dmiPos:$t,dmiNeg:ne});return ae},V.prototype.getUO=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,T=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,R=It(this),y=R.date,H=It(R.close);void 0===m&&(m=b.UO.defaultParams.period1),void 0===A&&(A=b.UO.defaultParams.period2),void 0===_&&(_=b.UO.defaultParams.period3),void 0===O&&(O=b.UO.defaultParams.median),void 0===M&&(M=b.UO.defaultParams.weight1),void 0===D&&(D=b.UO.defaultParams.weight2),void 0===T&&(T=b.UO.defaultParams.weight3);var G=function ct(m){var _=m.low,O=It(m.close);O.unshift(null),O.pop();var M=new Array(_.length).fill(0);M[0]=_[0];for(var D=1,T=_.length;D<T;D++)M[D]=_[D]<O[D]?_[D]:O[D];return M}(R);F.subtract(H,G);var J=yt(R),Z=new tt.SMA({period:m,values:H}).getResult(),nt=It(Z),W=new tt.SMA({period:m,values:J}).getResult();F.divide(nt,W),F.multiply(nt,M);for(var z=1,q=m-1;z<=q;z++)nt.splice(0,0,null);var at=It(nt),st=new tt.SMA({period:A,values:H}).getResult(),vt=It(st),Nt=new tt.SMA({period:A,values:J}).getResult();F.divide(vt,Nt),F.multiply(vt,D);for(var St=1,Ft=A-1;St<=Ft;St++)vt.splice(0,0,null);var Vt=new tt.SMA({period:_,values:H}).getResult(),xt=It(Vt),$t=new tt.SMA({period:_,values:J}).getResult();F.divide(xt,$t),F.multiply(vt,T);for(var ne=1,ae=_-1;ne<=ae;ne++)xt.splice(0,0,null);F.add(at,vt),F.add(at,xt),F.multiply(at,14.285714285714286);for(var oe,ge,Oe=[],Xe=0,pn=y.length;oe=y[Xe],ge=at[Xe],Xe<pn;Xe++)Oe.push({date:oe,uo:0===ge?null:ge,median:O});return Oe},V.prototype.getCOSZ=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=this.date,O=this.high;void 0===m&&(m=b.COSZ.defaultParams.period1),void 0===A&&(A=b.COSZ.defaultParams.period2),F.subtract(O,this.low);for(var D=pt("EMA",m,O),T=1;T<m;T++)D.splice(0,0,null);for(var R,y,L=[],H=[],G=0,J=_.length;R=_[G],y=D[G],G<J;G++)H.push(G<=9?0:100*(y/D[G-10]-1)),L.push({date:R,cosz:H[G]});return L},V.prototype.getMDX=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,T=this.date,y=this.low;void 0===m&&(m=b.MDX.defaultParams.period1),void 0===A&&(A=b.MDX.defaultParams.period2),void 0===_&&(_=b.MDX.defaultParams.signalLinePeriod),void 0===O&&(O=b.MDX.defaultParams.smoothing1),void 0===M&&(M=b.MDX.defaultParams.smoothing2),void 0===D&&(D=b.MDX.defaultParams.smoothingSL);var L=It(this.high);F.subtract(L,y);
1for(var H=pt(O,m,L),G=pt(O,m,L),J=pt(O,m,G),Z=1,nt=m-1;Z<=nt;Z++)J.splice(0,0,null);var W=It(H);F.divide(W,J),W=W.map(function(ge){return ge===1/0?1:ge});var z=F.mmean(W,A);F.multiply(z,A);for(var q=pt(D,_,z),at=1,st=m+A-2;at<=st;at++)z.splice(0,0,null),q.splice(0,0,null);for(var vt=1,Nt=_-1;vt<=Nt;vt++)q.splice(0,0,null);for(var St=1,Ft=m-1;St<=Ft;St++)H.splice(0,0,null),J.splice(0,0,null),W.splice(0,0,null);for(var Vt,xt,$t,ne=[],ae=0,oe=T.length;Vt=T[ae],xt=z[ae],$t=q[ae],ae<oe;ae++)ne.push({date:Vt,mdx:xt,signalLine:$t});return ne},V.prototype.getEMV=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date,_=this.high,O=this.low,M=this.volume;void 0===m&&(m=b.EMV.defaultParams.period1),F.divide(M,1e6);var D=It(_),T=It(_);F.subtract(D,O),F.divide(D,M),F.add(T,O),F.divide(T,2);for(var R,y=[],L=0,H=A.length;R=T[L],L<H;L++)y.push(0===L?0:R-T[L-1]);F.multiply(y,D);for(var G,J,Z,nt=F.mmean(y,m),W=[],z=0,q=A.length;G=A[z],J=y[z],Z=nt[z],z<q;z++)W.push({date:G,emv:J,emv9:Z});return W},V.prototype.getCCI=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=this.date,M=this.high,D=this.low;void 0===m&&(m=b.CCI.defaultParams.period1),void 0===A&&(A=b.CCI.defaultParams.smoothing);var T=It(this.close);F.add(T,M),F.add(T,D),F.divide(T,3);for(var R=pt(A,m,T),y=Array(R.length),L=Array(R.length),H=0,G=R.length;H<G;H++){for(var J=0,Z=0;Z<m;Z++)J+=Math.abs(R[H]-T[Z+H]);y[H]=J/m,L[H]=(T[H+m-1]-R[H])/(.015*y[H])}for(var nt=1,W=m-1;nt<=W;nt++)R.splice(0,0,null),y.splice(0,0,null),L.splice(0,0,null);for(var z,q,at=[],st=0,vt=_.length;z=_[st],q=L[st],st<vt;st++)at.push({date:z,data:q,upperBand:100,lowerBand:-100});return at},V.prototype.getCCI_old=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=this.date,D=this.high,T=this.low;void 0===m&&(m=b.CCI.defaultParams.period1),void 0===A&&(A=b.CCI.defaultParams.period2),void 0===_&&(_=b.CCI.defaultParams.smoothing);var R=It(this.close);F.add(R,D),F.add(R,T),F.divide(R,3);for(var y=pt(_,m,R),L=Array(y.length),H=0,G=y.length;H<G;H++){var J=y[H];if(0===J)L[H]=null;else{for(var Z=H,nt=m-1,W=0;nt>=0&&Z>=nt;){var z=R[Z];Z-=1,0!==z&&(nt-=1,W+=Math.abs(J-z))}L[H]=nt>0?null:W/m}}for(var q=1,at=m-1;q<=at;q++)y.splice(0,0,null),L.splice(0,0,null);F.subtract(R,y),F.divide(R,L),F.divide(R,.015),R=R.map(function(oe){return isFinite(oe)?oe:0});for(var st=new tt.SMA({period:A,values:R}).getResult(),vt=1,Nt=A-1;vt<=Nt;vt++)st.splice(0,0,null);for(var St,Ft,Vt,xt=[],$t=0,ne=O.length;St=O[$t],Ft=R[$t],Vt=st[$t],$t<ne;$t++){var ae;ae=0===$t?0:isFinite(R[$t-1])&&isFinite(R[$t])?R[$t-1]>100&&R[$t]<100?-1:R[$t-1]<-100&&R[$t]>-100?1:0:0,xt.push({date:St,data:Ft,signalLine:Vt,buySellSignal:ae,upperBand:100,lowerBand:-100})}return xt},V.prototype.getAroonOsc=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=It(this),O=this.date;void 0===m&&(m=b.AROONOSC.defaultParams.period1),void 0===A&&(A=b.AROONOSC.defaultParams.type);var M=Et(_,m,A),D=Be(_,m,A);F.subtract(M,D);for(var T,R,y=[],L=0,H=O.length;T=O[L],R=M[L],L<H;L++)y.push({date:T,data:R});return y},V.prototype.getAroon=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=It(this),O=this.date;void 0===m&&(m=b.AROON.defaultParams.period1),void 0===A&&(A=b.AROON.defaultParams.type);for(var M,D,T,R=Et(_,m,A),y=Be(_,m,A),L=[],H=0,G=O.length;M=O[H],D=R[H],T=y[H],H<G;H++)L.push({date:M,dataUp:D,dataDown:T});return L},V.prototype.getCLV=function(){var m=this.date,A=this.close,_=this.high,O=this.low,M=It(_);F.subtract(M,O),F.multiply(A,2),F.subtract(A,O),F.subtract(A,_),F.divide(A,M);for(var D,T,R=[],y=0,L=A.length;D=m[y],T=A[y],y<L;y++)R.push({date:D,data:T});return R},V.prototype.getADLINE=function(){for(var m,A,_=It(this),O=_.date,T=new tt.ADL({high:_.high,low:_.low,close:_.close,volume:_.volume}).getResult(),R=[],y=0,L=O.length;m=O[y],A=T[y],y<L;y++)R.push({date:m,adline:A});return R},V.prototype.getPVT=function(){for(var m,A,_,O=this.date,M=this.close,D=this.volume,T=[],R=[],y=0,L=O.length;m=O[y],A=M[y],_=D[y],y<L;y++)R.push(0===y?_:(A/M[y-1]-1)*_),T.push({date:m,pvt:0===y?R[y]:F.sum(R)});return T},V.prototype.getDPO=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date,_=this.close;void 0===m&&(m=b.DPO.defaultParams.period1);for(var O=F.mmean(_,m),M=m/2+1,D=1,T=m-1;D<=T;D++)O.splice(0,0,null);O.splice(-M);for(var R=1;R<=M;R++)O.splice(0,0,null);F.subtract(O,_),F.multiply(O,-1);for(var y,L,H=[],G=0,J=A.length;y=A[G],L=O[G],G<J;G++)H.push({date:y,data:L});return H},V.prototype.getStochRSI=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=It(this),_=A.date;if(void 0===m&&(m=b.STOCHRSI.defaultParams.period1),this.dayDiff<m&&_.length<m)return[];for(var M=new tt.RSI({values:A.close,period:m}).getResult(),D=0;D<m;D++)M.splice(0,0,null);var T=F.mmin(M,m),R=F.mmax(M,m);F.subtract(R,T);for(var y=0,L=m-1;y<L;y++)T.splice(0,0,null),R.splice(0,0,null);F.subtract(M,T),F.divide(M,R),F.multiply(M,100);for(var H,G,J=[],Z=0,nt=_.length;H=_[Z],G=M[Z],Z<nt;Z++)J.push({date:H,data:G});return J},V.prototype.getDC=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date,_=this.high;void 0===m&&(m=b.DC.defaultParams.period1);for(var M=F.mmin(this.low,m),D=F.mmax(_,m),T=1,R=m-1;T<=R;T++)M.splice(0,0,null),D.splice(0,0,null);for(var y,L,H,G=[],J=0,Z=A.length;y=A[J],L=M[J],H=D[J],J<Z;J++)G.push({date:y,data1:L,data2:H});return G},V.prototype.getDCW=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date,_=this.high;void 0===m&&(m=b.DCW.defaultParams.period1);var M=F.mmin(this.low,m),D=F.mmax(_,m);F.subtract(D,M);for(var T=M,R=1,y=m-1;R<=y;R++)T.splice(0,0,null);for(var L,H,G=[],J=0,Z=A.length;L=A[J],H=T[J],J<Z;J++)G.push({date:L,dcw:H});return G},V.prototype.getBB_old=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=this.date;void 0===m&&(m=b.BB.defaultParams.period1),void 0===A&&(A=b.BB.defaultParams.width);for(var D=new tt.BollingerBands({period:m,values:this.close,stdDev:A}).getResult(),T=1,R=m-1;T<=R;T++)D.splice(0,0,{lower:null,middle:null,upper:null});for(var y,L=[],H=0,G=_.length;y=_[H],H<G;H++)L.push({date:y,lower:D[H].lower,middle:D[H].middle,upper:D[H].upper});return L},V.prototype.getBB=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=this.date,M=this.close;void 0===m&&(m=b.BB.defaultParams.period1),void 0===A&&(A=b.BB.defaultParams.width),void 0===_&&(_=b.BB.defaultParams.smoothing);var D=pt(_,m,M),T=F.mstdev(M,m);F.multiply(T,A);var R=It(D);F.subtract(R,T);var y=It(D);F.add(y,T);for(var L=1,H=m-1;L<=H;L++)D.splice(0,0,null),R.splice(0,0,null),y.splice(0,0,null);for(var G,J=[],Z=0,nt=O.length;G=O[Z],Z<nt;Z++)J.push({date:G,lower:R[Z],middle:D[Z],upper:y[Z]});return J},V.prototype.getBBW_old=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=this.date;void 0===m&&(m=b.BBW.defaultParams.period1),void 0===A&&(A=b.BBW.defaultParams.width);var M=F.mstdev(this.close,m);F.multiply(M,2*A);for(var D=1,T=m-1;D<=T;D++)M.splice(0,0,null);for(var R,y,L=[],H=0,G=_.length;R=_[H],y=M[H],H<G;H++)L.push({date:R,bbw:y});return L},V.prototype.getBBW=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=this.date;void 0===m&&(m=b.BBW.defaultParams.period1),void 0===A&&(A=b.BBW.defaultParams.width),void 0===_&&(_=b.BBW.defaultParams.smoothing);for(var M,D=this.getBB(m,A,_),T=[],R=0,y=O.length;M=O[R],R<y;R++){var L=0;0!==D[R].middle&&(L=(D[R].upper-D[R].lower)/D[R].middle*100),T.push({date:M,bbw:L})}return T},V.prototype.getBBB_old=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=this.date,O=this.close;void 0===m&&(m=b.BBB.defaultParams.period1),void 0===A&&(A=b.BBB.defaultParams.width);for(var D=new tt.BollingerBands({period:m,values:O,stdDev:A}).getResult(),T=1,R=m-1;T<=R;T++)D.splice(0,0,{lower:null,middle:null,upper:null});for(var y,L,H=[],G=0,J=_.length;y=_[G],L=O[G],G<J;G++){var Z=0;D[G].upper!==D[G].lower&&0!==G&&(Z=(L-D[G].lower)/(D[G].upper-D[G].lower)),H.push({date:y,bbb:Z})}return H},V.prototype.getBBB=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=this.date,M=this.close;void 0===m&&(m=b.BBB.defaultParams.period1),void 0===A&&(A=b.BBB.defaultParams.width),void 0===_&&(_=b.BBB.defaultParams.smoothing);for(var D,T,R=this.getBB(m,A,_),y=[],L=0,H=O.length;
1D=O[L],T=M[L],L<H;L++){var G=0;R[L].upper!==R[L].lower&&0!==L&&(G=(T-R[L].lower)/(R[L].upper-R[L].lower)),y.push({date:D,bbb:G})}return y},V.prototype.getStdDev=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date;if(void 0===m&&(m=b.STDDEV.defaultParams.period1),this.dayDiff<m&&A.length<m)return[];for(var O=F.mstdev(this.close,m),M=1,D=m-1;M<=D;M++)O.splice(0,0,null);for(var T,R,y=[],L=0,H=A.length;T=A[L],R=O[L],L<H;L++)y.push({date:T,stdDev:R});return y},V.prototype.getPerformance=function(){for(var m,A,_=this.date,O=this.close,M=[],D=0,T=_.length;m=_[D],A=O[D],D<T;D++)M.push({date:m,perf:0===D?0:100*(A/O[D-1]-1)});return M},V.prototype.getVolume=function(){for(var m,A,_=this.date,O=this.volume,M=[],D=0,T=_.length;m=_[D],A=O[D],D<T;D++)M.push({date:m,volume:A});return M},V.prototype.getOBV=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date;void 0===m&&(m=b.OBV.defaultParams.period2);var M=new tt.OBV({volume:this.volume,close:this.close}).getResult();M.splice(0,0,null);for(var D=new tt.SMA({period:m,values:M}).getResult(),T=0,R=m-1;T<R;T++)D.splice(0,0,null);for(var y,L,H,G=[],J=0,Z=A.length;y=A[J],L=M[J],H=D[J],J<Z;J++)G.push({date:y,obv:void 0===L?null:L,signalLine:H});return G},V.prototype.getTrix=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=this.date;if(void 0===m&&(m=b.TRIX.defaultParams.period1),void 0===A&&(A=b.TRIX.defaultParams.period2),this.dayDiff<m&&_.length<m)return[];for(var M=new tt.TRIX({period:m,values:this.close}).getResult(),D=pt("EMA",A,M),T=1,R=3*m-2;T<=R;T++)M.splice(0,0,null),D.splice(0,0,null);for(var y=1,L=A-1;y<=L;y++)D.splice(0,0,null);for(var H,G,J,Z=[],nt=0,W=_.length;H=_[nt],G=M[nt],J=D[nt],nt<W;nt++)Z.push({date:H,trix:void 0===G?null:G,signalLine:J});return Z},V.prototype.getWilliamR=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=this.date;if(void 0===m&&(m=b.WILLIAMSR.defaultParams.period1),void 0===A&&(A=b.WILLIAMSR.defaultParams.range),this.dayDiff<m&&_.length<m)return[];for(var R=new tt.WilliamsR({period:m,high:this.high,low:this.low,close:this.close}).getResult(),y=1,L=m-1;y<=L;y++)R.splice(0,0,null);for(var H,G,J=[],Z=0,nt=_.length;H=_[Z],G=R[Z],Z<nt;Z++)J.push({date:H,williamsR:G,signalHigh:-50+A,signalLow:-50-A});return J},V.prototype.getROC=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=this.date;if(void 0===m&&(m=b.ROC.defaultParams.period1),void 0===A&&(A=b.ROC.defaultParams.smoothingSL),void 0===_&&(_=b.ROC.defaultParams.signalLinePeriod),this.dayDiff<m&&O.length<m)return[];for(var D=new tt.ROC({period:m,values:this.close}).getResult(),T=pt(A,_,D),R=1;R<=m;R++)D.splice(0,0,null),T.splice(0,0,null);for(var y=1,L=_-1;y<=L;y++)T.splice(0,0,null);for(var H,G,J,Z=[],nt=0,W=O.length;H=O[nt],G=D[nt],J=T[nt],nt<W;nt++)Z.push({date:H,roc:G,signalLine:J});return Z},V.prototype.getATR=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date;if(void 0===m&&(m=b.ATR.defaultParams.period1),this.dayDiff<m&&A.length<m)return[];for(var T=new tt.ATR({period:m,high:this.high,low:this.low,close:this.close}).getResult(),R=1;R<=m;R++)T.splice(0,0,null);for(var y=new tt.SMA({period:m,values:T}).getResult(),L=1,H=m-1;L<=H;L++)y.splice(0,0,null);for(var G,J,Z,nt=[],W=0,z=0,q=A.length;G=A[W],J=T[W],Z=y[z],W<q;W++,z++)nt.push({date:G,atr:J,signalLine:Z});return nt},V.prototype.getSMA=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date;if(void 0===m&&(m=38),this.dayDiff<m&&A.length<m)return[];for(var O=new tt.SMA({period:m,values:this.close}).getResult(),M=1,D=m-1;M<=D;M++)O.splice(0,0,null);for(var T,R,y=[],L=0,H=A.length;T=A[L],R=O[L],L<H;L++)y.push({date:T,sma:R});return y},V.prototype.getEMA=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date;if(void 0===m&&(m=38),this.dayDiff<m&&A.length<m)return[];for(var O=pt("EMA",m,this.close),M=1,D=m-1;M<=D;M++)O.splice(0,0,null);for(var T,R,y=[],L=0,H=A.length;T=A[L],R=O[L],L<H;L++)y.push({date:T,ema:R});return y},V.prototype.getEMA_old=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date;if(void 0===m&&(m=38),this.dayDiff<m&&A.length<m)return[];for(var O=new tt.EMA({period:m,values:this.close}).getResult(),M=1,D=m-1;M<=D;M++)O.splice(0,0,null);for(var T,R,y=[],L=0,H=A.length;T=A[L],R=O[L],L<H;L++)y.push({date:T,ema:R});return console.log(O.length,A.length),y},V.prototype.getWMA=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date;if(void 0===m&&(m=38),this.dayDiff<m&&A.length<m)return[];for(var O=new tt.WMA({period:m,values:this.close}).getResult(),M=1,D=m-1;M<=D;M++)O.splice(0,0,null);for(var T,R,y=[],L=0,H=A.length;T=A[L],R=O[L],L<H;L++)y.push({date:T,wma:R});return y},V.prototype.getCOG=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=this.date;if(void 0===m&&(m=b.COG.defaultParams.period1),void 0===A&&(A=b.COG.defaultParams.period2),this.dayDiff<m&&_.length<m)return[];for(var M=pt("COG",m,this.close),D=pt("SMA",A,M),T=1,R=m-1;T<=R;T++)M.splice(0,0,null),D.splice(0,0,null);for(var y=1,L=A-1;y<=L;y++)D.splice(0,0,null);for(var H,G,J,Z=[],nt=0,W=_.length;H=_[nt],G=M[nt],J=D[nt],nt<W;nt++)Z.push({date:H,cog:G,signalLine:J});return Z},V.prototype.getDEMA=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=It(this),_=A.date;if(void 0===m&&(m=b.DEMA.defaultParams.period1),this.dayDiff<m&&_.length<m)return[];var M=pt("EMA",m,A.close),D=pt("EMA",m,M);F.multiply(M,2);for(var T=1,R=m-1;T<=R;T++)M.splice(0,0,null);for(var y=1,L=2*(m-1);y<=L;y++)D.splice(0,0,null);if(M.length!==D.length)return[];F.subtract(M,D);for(var H,G,J=[],Z=0,nt=_.length;H=_[Z],G=M[Z],Z<nt;Z++)J.push({date:H,dema:0===G?null:G});return J},V.prototype.getMomentum=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=this.date,M=this.close;if(void 0===m&&(m=b.MOM.defaultParams.period1),void 0===A&&(A=b.MOM.defaultParams.period2),void 0===_&&(_=b.MOM.defaultParams.smoothing),this.dayDiff<m&&O.length<m)return[];for(var D,T=[],R=0,y=O.length;D=M[R],R<y;R++)T.push(R-m<0?0:D-M[R-m]);for(var L=pt(_,A,T),H=0,G=m-1;H<G;H++)L.splice(0,0,null);for(var J,Z,nt,W=[],z=0,q=O.length;J=O[z],Z=T[z],nt=L[z],z<q;z++)W.push({date:J,momentum:Z,signalLine:nt});return W},V.prototype.getRSL=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=this.date,O=this.close;void 0===m&&(m=b.RSL.defaultParams.period1),void 0===A&&(A=b.RSL.defaultParams.smoothing);for(var M=0,D=[],T=[],R=_.length-1;R>=0;R--){var y=Pt(new Date(_[R]),{weekStartsOn:1,firstWeekContainsDate:4});M!==y?(D[R]=O[R],T.unshift(O[R]),M=y):D[R]=null}for(var L=pt(A,m,T),H=0,G=m-1;H<G;H++)L.splice(0,0,null);if(T.length<L.length)return[];F.divide(T,L);for(var J=[],Z=T.length-1,nt=_.length-1;nt>=0;nt--)null!==D[nt]&&0!==Z?(J[nt]=T[Z]!==1/0?T[Z]:null,Z-=1):J[nt]=null;for(var W,z,q=[],at=0,st=_.length;W=_[at],z=J[at],at<st;at++)q.push({date:W,rsl:z});return q},V.prototype.getRSI=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=this.date;if(void 0===m&&(m=b.RSI.defaultParams.period1),void 0===A&&(A=b.RSI.defaultParams.upperBand),void 0===_&&(_=b.RSI.defaultParams.lowerBand),this.dayDiff<m&&O.length<m)return[];for(var D=new tt.RSI({period:m,values:this.close}).getResult(),T=0;T<m;T++)D.splice(0,0,null);for(var R,y,L=[],H=0,G=O.length;R=O[H],y=D[H],H<G;H++)L.push({date:R,rsi:y,upperBand:A,lowerBand:_});return L},V.prototype.getMACD=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,T=this.date,R=this.close;if(void 0===m&&(m=b.MACD.defaultParams.period1),void 0===A&&(A=b.MACD.defaultParams.period2),void 0===_&&(_=b.MACD.defaultParams.signalLinePeriod),void 0===O&&(O=b.MACD.defaultParams.smoothing1),void 0===M&&(M=b.MACD.defaultParams.smoothing2),void 0===D&&(D=b.MACD.defaultParams.smoothingSL),this.dayDiff<A&&T.length<A)return[];for(var y=pt(O,m,R),L=pt(M,A,R),H=0,G=m+1;H<=G;H++)L.splice(0,0,null);F.subtract(y,L),y.splice(0,A-m);for(var J=pt(D,_,y),Z=1,nt=_-1;Z<=nt;Z++)J.splice(0,0,null);var W=It(y);F.subtract(W,J),W.splice(0,_-1);for(var z=0,q=A-1;z<q;z++)y.splice(0,0,null),J.splice(0,0,null),W.splice(0,0,null);for(var at=0,st=_-1;at<st;at++)W.splice(0,0,null);for(var vt,Nt,St,Ft,Vt=[],xt=0,$t=T.length;vt=T[xt],Nt=y[xt],St=W[xt],Ft=J[xt],xt<$t;xt++)Vt.push({date:vt,macd:Nt,histogram:St,signalLine:Ft});return Vt},V.prototype.getMACD_old=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=this.date;if(void 0===m&&(m=b.MACD.defaultParams.period1),void 0===A&&(A=b.MACD.defaultParams.period2),void 0===_&&(_=b.MACD.defaultParams.period3),void 0===O&&(O=b.MACD.defaultParams.osci),void 0===M&&(M=b.MACD.defaultParams.signal),this.dayDiff<A&&D.length<A)return[];for(var y=new tt.MACD({values:this.close,fastPeriod:m,slowPeriod:A,signalPeriod:_,SimpleMAOscillator:O,SimpleMASignal:M}).getResult(),L=1,H=A-1;L<=H;L++)y.splice(0,0,{MACD:null,histogram:null,signal:null});for(var G=A-1,J=A+_-2;G<J;G++)void 0===y[G].histogram&&(y[G].histogram=null),void 0===y[G].signal&&(y[G].signal=null);for(var Z,nt=[],W=0,z=D.length;Z=D[W],W<z;W++)nt.push({date:Z,macd:y[W].MACD,histogram:y[W].histogram,signal:y[W].signal});return nt},V.prototype.getSlowStochastic=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,T=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,R=It(this),y=this.date;if(void 0===m&&(m=b.SSTOCH.defaultParams.period1),void 0===A&&(A=b.SSTOCH.defaultParams.period2),void 0===_&&(_=b.SSTOCH.defaultParams.period3),void 0===O&&(O=b.SSTOCH.defaultParams.overBought),void 0===M&&(M=b.SSTOCH.defaultParams.overSold),void 0===D&&(D=b.SSTOCH.defaultParams.smoothing1),void 0===T&&(T=b.SSTOCH.defaultParams.smoothing2),this.dayDiff<m+A+_-3&&y.length<m+A+_-3)return[];
1for(var H=pt(D,A,kt(R,m)),G=pt(T,_,H),J=1,Z=m+A-2;J<=Z;J++)H.splice(0,0,null),G.splice(0,0,null);for(var nt=1,W=_-1;nt<=W;nt++)G.splice(0,0,null);for(var z,q,at,st=[],vt=0,Nt=y.length;z=y[vt],q=H[vt],at=G[vt],vt<Nt;vt++)st.push({date:z,data1:q,data2:at,overBought:O,overSold:M});return st},V.prototype.getSlowStochastic_old=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,T=It(this),R=this.date;if(void 0===m&&(m=b.SSTOCH.defaultParams.period1),void 0===A&&(A=b.SSTOCH.defaultParams.period2),void 0===_&&(_=b.SSTOCH.defaultParams.overBought),void 0===O&&(O=b.SSTOCH.defaultParams.overSold),void 0===M&&(M=b.SSTOCH.defaultParams.smoothingSL),void 0===D&&(D=b.SSTOCH.defaultParams.signalLinePeriod),this.dayDiff<m+A+A-3&&R.length<m+A+A-3)return[];for(var y=kt(T,m),L=F.mmean(y,A),H=F.mmean(L,A),G=pt(M,D,L),J=1,Z=m+A
1-2;J<=Z;J++)L.splice(0,0,null),H.splice(0,0,null),G.splice(0,0,null);for(var nt=1,W=A-1;nt<=W;nt++)H.splice(0,0,null);for(var z=1,q=D-1;z<=q;z++)G.splice(0,0,null);for(var at,st,vt,Nt,St=[],Ft=0,Vt=R.length;at=R[Ft],st=L[Ft],vt=H[Ft],Nt=G[Ft],Ft<Vt;Ft++)St.push({date:at,data1:st,data2:vt,signalLine:Nt,overBought:_,overSold:O});return St},V.prototype.getFastStochastic=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=It(this),T=this.date;if(void 0===m&&(m=b.FSTOCH.defaultParams.period1),void 0===A&&(A=b.FSTOCH.defaultParams.period2),void 0===_&&(_=b.FSTOCH.defaultParams.overBought),void 0===O&&(O=b.FSTOCH.defaultParams.overSold),void 0===M&&(M=b.FSTOCH.defaultParams.smoothing),this.dayDiff<m+A-2&&T.length<m+A-2)return[];for(var R=kt(D,m),y=pt(M,A,R),L=1,H=m-1;L<=H;L++)R.splice(0,0,null),y.splice(0,0,null);for(var G=1,J=A-1;G<=J;G++)y.splice(0,0,null);for(var Z,nt,W,z=[],q=0,at=T.length;Z=T[q],nt=R[q],W=y[q],q<at;q++)z.push({date:Z,data1:nt,data2:W,overBought:_,overSold:O});return z},V.prototype.getFastStochastic_old=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,T=It(this),R=this.date;if(void 0===m&&(m=b.FSTOCH.defaultParams.period1),void 0===A&&(A=b.FSTOCH.defaultParams.period2),void 0===_&&(_=b.FSTOCH.defaultParams.overBought),void 0===O&&(O=b.FSTOCH.defaultParams.overSold),void 0===M&&(M=b.FSTOCH.defaultParams.smoothingSL),void 0===D&&(D=b.FSTOCH.defaultParams.signalLinePeriod),this.dayDiff<m+A-2&&R.length<m+A-2)return[];for(var y=kt(T,m),L=F.mmean(y,A),H=pt(M,D,y),G=1,J=m-1;G<=J;G++)y.splice(0,0,null),L.splice(0,0,null),H.splice(0,0,null);for(var Z=1,nt=A-1;Z<=nt;Z++)L.splice(0,0,null);for(var W=1,z=D-1;W<=z;W++)H.splice(0,0,null);for(var q,at,st,vt,Nt=[],St=0,Ft=R.length;q=R[St],at=y[St],st=L[St],vt=H[St],St<Ft;St++)Nt.push({date:q,data1:at,data2:st,signalLine:vt,overBought:_,overSold:O});return Nt},V.prototype.getZigZag=function(){var m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=this.date,_=this.close;void 0===m&&(m=5);var O=[];O[0]=_[0];for(var M=_[0],D=_[0],T=0,R=0,y=0,L=-1,H=1,G=_.length;H<G;H++)O[H]=null,T>0&&1===L&&_[H]>=O[T]?(O[H]=_[H],D=_[H],O[T]=null,T=H,L=1):T>0&&0===L&&_[H]<=O[T]?(O[H]=_[H],M=_[H],O[T]=null,T=H,L=0):(R=(_[H]-M)/(M/100),y=(_[H]-D)/(D/100),Math.abs(R)>=m&&_[H]>=O[T]&&(D=_[H],T=H,O[H]=_[H],L=1,y=0),Math.abs(y)>=m&&_[H]<=O[T]&&(M=_[H],T=H,O[H]=_[H],L=0,R=0));O[_.length-1]=_[_.length-1];for(var J,Z,nt=[],W=0,z=A.length;J=A[W],Z=O[W],W<z;W++)nt.push({date:J,zigzag:Z});return nt},V.prototype.getMODB=function(){var R,y,m=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,_=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,O=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,M=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,D=this.date,T=this.date2;void 0===m&&(m=b.MODB.defaultParams.factor1),A=void 0===A?b.MODB.defaultParams.data1:A.toLowerCase(),void 0===_&&(_=b.MODB.defaultParams.factor2),O=void 0===O?b.MODB.defaultParams.data2:O.toLowerCase(),void 0===M&&(M=b.MODB.defaultParams.operator),R="open"===A?this.open:"high"===A?this.high:"low"===A?this.low:this.close,y="open"===O?this.open2:"high"===O?this.high2:"low"===O?this.low2:this.close2;var L=lt(D.concat(T)).sort(function(Z,nt){return new Date(Z).getTime()-new Date(nt).getTime()}),H=-1,G=-1;return L.map(function(Z){var nt=null,W=D.indexOf(Z),z=T.indexOf(Z);if(W>-1&&(H=W),z>-1&&(G=z),H>-1&&G>-1){var q=R[H],at=y[G];void 0!==q&&void 0!==at&&("-"===M?nt=m*q-_*at:"+"===M?nt=m*q+_*at:"*"===M?nt=m*q*_*at:_*at!=0&&(nt=m*q/(_*at)))}return{date:Z,data:nt}})},V.prototype.getADL=function(){var m=this.date,A=this.high,_=this.low,O=[];O[0]=A[0]-_[0];for(var M=1,D=m.length;M<D;M++)O[M]=A[M]-_[M]+O[M-1];for(var T,R,y=[],L=0,H=m.length;T=m[L],R=O[L],L<H;L++)y.push({date:T,adl:R});return y},At.exports=V,V.getIndicatorList=function(){return[b.ADL,b.ADLINE,b.ALPHA,b.AROONOSC,b.AROON,b.ADX,b.ATR,b.BETA,b.BB,b.BBB,b.BBW,b.COG,b.COSZ,b.CVOL,b.CLV,b.CCI,b.COP,b.COR,b.COV,b.DPO,b.DMI,b.DC,b.DCW,b.DEMA,b.DSS,b.DYMOI,b.EMV,b.ERI,b.EMA,b.FSTOCH,b.FI,b.HEIKINASHI,b.KST,b.MACD,b.MDX,b.MODB,b.MOM,b.NVI,b.NOT,b.OBV,b.OUTPERFORMANCE,b.PSAR,b.PERFORMANCE,b.PVI,b.PVT,b.RR,b.RAVI,b.ROC,b.RSC,b.RSL,b.RSI,b.RVI,b.SMA,b.SSTOCH,b.SROC,b.STDDEV,b.STOCHRSI,b.TSF,b.TCI,b.TRIX,b.TSI,b.UO,b.VAR,b.VOLA,b.VR,b.VOL,b.VO,b.WMA,b.WAD,b.WSL,b.WVAD,b.WILLIAMSR,b.ZIGZAG]}},620:At=>{"use strict";At.exports=function(ot){if(!Array.isArray(ot))throw new TypeError("array-unique expects an array.");for(var ee=ot.length,wt=-1;wt++<ee;)for(var It=wt+1;It<ot.length;++It)ot[wt]===ot[It]&&ot.splice(It--,1);return ot},At.exports.immutable=function(ot){if(!Array.isArray(ot))throw new TypeError("array-unique expects an array.");for(var ee=ot.length,wt=new Array(ee),It=0;It<ee;It++)wt[It]=ot[It];return At.exports(wt)}},682:(At,ot)=>{"use strict";
1Object.defineProperty(ot,"__esModule",{value:!0}),ot.default=function(ee,wt){if(wt.length<ee)throw new TypeError(ee+" argument"+(ee>1?"s":"")+" required, but only "+wt.length+" present")},At.exports=ot.default,At.exports.default=ot.default},394:(At,ot)=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0}),ot.default=function(ee){if(null===ee||!0===ee||!1===ee)return NaN;var wt=Number(ee);return isNaN(wt)?wt:wt<0?Math.ceil(wt):Math.floor(wt)},At.exports=ot.default,At.exports.default=ot.default},344:(At,ot,ee)=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0}),ot.default=function(b,V){(0,Pt.default)(1,arguments);var kt=(0,tt.default)(b),dt=(0,wt.default)(kt,V).getTime()-(0,It.default)(kt,V).getTime();return Math.round(dt/lt)+1};var wt=F(ee(401)),It=F(ee(807)),tt=F(ee(327)),Pt=F(ee(682));function F(b){return b&&b.__esModule?b:{default:b}}var lt=6048e5;At.exports=ot.default,At.exports.default=ot.default},112:(At,ot,ee)=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0}),ot.default=function(lt,b){var V,kt;(0,Pt.default)(1,arguments);var dt=(0,It.default)(lt),pt=dt.getFullYear(),yt=null==b||null===(V=b.locale)||void 0===V||null===(kt=V.options)||void 0===kt?void 0:kt.firstWeekContainsDate,Ht=null==yt?1:(0,tt.default)(yt),ct=null==b?.firstWeekContainsDate?Ht:(0,tt.default)(b.firstWeekContainsDate);if(!(ct>=1&&ct<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Et=new Date(0);Et.setFullYear(pt+1,0,ct),Et.setHours(0,0,0,0);var Be=(0,wt.default)(Et,b),Ee=new Date(0);Ee.setFullYear(pt,0,ct),Ee.setHours(0,0,0,0);var ce=(0,wt.default)(Ee,b);return dt.getTime()>=Be.getTime()?pt+1:dt.getTime()>=ce.getTime()?pt:pt-1};var wt=F(ee(401)),It=F(ee(327)),tt=F(ee(394)),Pt=F(ee(682));function F(lt){return lt&&lt.__esModule?lt:{default:lt}}At.exports=ot.default,At.exports.default=ot.default},401:(At,ot,ee)=>{"use strict";
1Object.defineProperty(ot,"__esModule",{value:!0}),ot.default=function(F,lt){(0,tt.default)(1,arguments);var b=lt||{},V=b.locale,kt=V&&V.options&&V.options.weekStartsOn,dt=null==kt?0:(0,It.default)(kt),pt=null==b.weekStartsOn?dt:(0,It.default)(b.weekStartsOn);if(!(pt>=0&&pt<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var yt=(0,wt.default)(F),Ht=yt.getDay(),ct=(Ht<pt?7:0)+Ht-pt;return yt.setDate(yt.getDate()-ct),yt.setHours(0,0,0,0),yt};var wt=Pt(ee(327)),It=Pt(ee(394)),tt=Pt(ee(682));function Pt(F){return F&&F.__esModule?F:{default:F}}At.exports=ot.default,At.exports.default=ot.default},807:(At,ot,ee)=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0}),ot.default=function(lt,b){(0,Pt.default)(1,arguments);var V=b||{},kt=V.locale,dt=kt&&kt.options&&kt.options.firstWeekContainsDate,pt=null==dt?1:(0,tt.default)(dt),yt=null==V.firstWeekContainsDate?pt:(0,tt.default)(V.firstWeekContainsDate),Ht=(0,wt.default)(lt,b),ct=new Date(0);return ct.setFullYear(Ht,0,yt),ct.setHours(0,0,0,0),(0,It.default)(ct,b)};var wt=F(ee(112)),It=F(ee(401)),tt=F(ee(394)),Pt=F(ee(682));function F(lt){return lt&&lt.__esModule?lt:{default:lt}}At.exports=ot.default,At.exports.default=ot.default},327:(At,ot,ee)=>{"use strict";
1Object.defineProperty(ot,"__esModule",{value:!0}),ot.default=function(Pt){(0,It.default)(1,arguments);var F=Object.prototype.toString.call(Pt);return Pt instanceof Date||"object"===tt(Pt)&&"[object Date]"===F?new Date(Pt.getTime()):"number"==typeof Pt||"[object Number]"===F?new Date(Pt):("string"!=typeof Pt&&"[object String]"!==F||typeof console>"u"||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))};var wt,It=(wt=ee(682))&&wt.__esModule?wt:{default:wt};function tt(Pt){return(tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(F){return typeof F}:function(F){return F&&"function"==typeof Symbol&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F})(Pt)}At.exports=ot.default,At.exports.default=ot.default},760:(At,ot,ee)=>{"use strict";function wt(tt){return(wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(Pt){return typeof Pt}:function(Pt){return Pt&&"function"==typeof Symbol&&Pt.constructor===Symbol&&Pt!==Symbol.prototype?"symbol":typeof Pt})(tt)}var It=function(tt){var Pt,F=Object.prototype,lt=F.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},V=b.iterator||"@@iterator",kt=b.asyncIterator||"@@asyncIterator",dt=b.toStringTag||"@@toStringTag";function pt(W,z,q){return Object.defineProperty(W,z,{value:q,enumerable:!0,configurable:!0,writable:!0}),W[z]}try{pt({},"")}catch{pt=function(z,q,at){return z[q]=at}}function yt(W,z,q,at){var vt=Object.create((z&&z.prototype instanceof m?z:m).prototype),Nt=new J(at||[]);return vt._invoke=function(St,Ft,Vt){var xt=ct;return function($t,ne){if(xt===Be)throw new Error("Generator is already running");if(xt===Ee){if("throw"===$t)throw ne;return nt()}for(Vt.method=$t,Vt.arg=ne;;){var ae=Vt.delegate;if(ae){var oe=L(ae,Vt);if(oe){if(oe===ce)continue;return oe}}if("next"===Vt.method)Vt.sent=Vt._sent=Vt.arg;else if("throw"===Vt.method){if(xt===ct)throw xt=Ee,Vt.arg;Vt.dispatchException(Vt.arg)}else"return"===Vt.method&&Vt.abrupt("return",Vt.arg);xt=Be;var ge=Ht(St,Ft,Vt);if("normal"===ge.type){if(xt=Vt.done?Ee:Et,ge.arg===ce)continue;return{value:ge.arg,done:Vt.done}}"throw"===ge.type&&(xt=Ee,Vt.method="throw",Vt.arg=ge.arg)}}}(W,q,Nt),vt}function Ht(W,z,q){try{return{type:"normal",arg:W.call(z,q)}}catch(at){return{type:"throw",arg:at}}}tt.wrap=yt;var ct="suspendedStart",Et="suspendedYield",Be="executing",Ee="completed",ce={};function m(){}function A(){}function _(){}var O={};O[V]=function(){return this};var M=Object.getPrototypeOf,D=M&&M(M(Z([])));D&&D!==F&&lt.call(D,V)&&(O=D);var T=_.prototype=m.prototype=Object.create(O);function R(W){["next","throw","return"].forEach(function(z){pt(W,z,function(q){return this._invoke(z,q)})})}function y(W,z){function q(st,vt,Nt,St){var Ft=Ht(W[st],W,vt);if("throw"!==Ft.type){var Vt=Ft.arg,xt=Vt.value;return xt&&"object"===wt(xt)&&lt.call(xt,"__await")?z.resolve(xt.__await).then(function($t){q("next",$t,Nt,St)},function($t){q("throw",$t,Nt,St)}):z.resolve(xt).then(function($t){Vt.value=$t,Nt(Vt)},function($t){return q("throw",$t,Nt,St)})}St(Ft.arg)}var at;this._invoke=function(st,vt){function Nt(){return new z(function(St,Ft){q(st,vt,St,Ft)})}return at=at?at.then(Nt,Nt):Nt()}}function L(W,z){var q=W.iterator[z.method];if(q===Pt){if(z.delegate=null,"throw"===z.method){if(W.iterator.return&&(z.method="return",z.arg=Pt,L(W,z),"throw"===z.method))return ce;z.method="throw",z.arg=new TypeError("The iterator does not provide a 'throw' method")}return ce}var at=Ht(q,W.iterator,z.arg);if("throw"===at.type)return z.method="throw",z.arg=at.arg,z.delegate=null,ce;var st=at.arg;return st?st.done?(z[W.resultName]=st.value,z.next=W.nextLoc,"return"!==z.method&&(z.method="next",z.arg=Pt),z.delegate=null,ce):st:(z.method="throw",z.arg=new TypeError("iterator result is not an object"),z.delegate=null,ce)}function H(W){var z={tryLoc:W[0]};1 in W&&(z.catchLoc=W[1]),2 in W&&(z.finallyLoc=W[2],z.afterLoc=W[3]),this.tryEntries.push(z)}function G(W){var z=W.completion||{};z.type="normal",delete z.arg,W.completion=z}function J(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(H,this),this.reset(!0)}function Z(W){if(W){var z=W[V];if(z)return z.call(W);if("function"==typeof W.next)return W;if(!isNaN(W.length)){var q=-1,at=function st(){for(;++q<W.length;)if(lt.call(W,q))return st.value=W[q],st.done=!1,st;return st.value=Pt,st.done=!0,st};return at.next=at}}return{next:nt}}function nt(){return{value:Pt,done:!0}}return A.prototype=T.constructor=_,_.constructor=A,A.displayName=pt(_,dt,"GeneratorFunction"),tt.isGeneratorFunction=function(W){var z="function"==typeof W&&W.constructor;return!!z&&(z===A||"GeneratorFunction"===(z.displayName||z.name))},tt.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,_):(W.__proto__=_,pt(W,dt,"GeneratorFunction")),W.prototype=Object.create(T),W},tt.awrap=function(W){return{__await:W}},R(y.prototype),y.prototype[kt]=function(){return this},tt.AsyncIterator=y,tt.async=function(W,z,q,at,st){void 0===st&&(st=Promise);var vt=new y(yt(W,z,q,at),st);return tt.isGeneratorFunction(z)?vt:vt.next().then(function(Nt){return Nt.done?Nt.value:vt.next()})},R(T),pt(T,dt,"Generator"),T[V]=function(){return this},T.toString=function(){return"[object Generator]"},tt.keys=function(W){var z=[];for(var q in W)z.push(q);return z.reverse(),function at(){for(;z.length;){var st=z.pop();if(st in W)return at.value=st,at.done=!1,at}return at.done=!0,at}},tt.values=Z,J.prototype={constructor:J,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=Pt,this.done=!1,this.delegate=null,this.method="next",this.arg=Pt,this.tryEntries.forEac
vendor: 5,207 bytes, line 1
1h(G),!W)for(var z in this)"t"===z.charAt(0)&&lt.call(this,z)&&!isNaN(+z.slice(1))&&(this[z]=Pt)},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if("throw"===W.type)throw W.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var z=this;function q(Ft,Vt){return vt.type="throw",vt.arg=W,z.next=Ft,Vt&&(z.method="next",z.arg=Pt),!!Vt}for(var at=this.tryEntries.length-1;at>=0;--at){var st=this.tryEntries[at],vt=st.completion;if("root"===st.tryLoc)return q("end");if(st.tryLoc<=this.prev){var Nt=lt.call(st,"catchLoc"),St=lt.call(st,"finallyLoc");if(Nt&&St){if(this.prev<st.catchLoc)return q(st.catchLoc,!0);if(this.prev<st.finallyLoc)return q(st.finallyLoc)}else if(Nt){if(this.prev<st.catchLoc)return q(st.catchLoc,!0)}else{if(!St)throw new Error("try statement without catch or finally");if(this.prev<st.finallyLoc)return q(st.finallyLoc)}}}},abrupt:function(W,z){for(var q=this.tryEntries.length-1;q>=0;--q){var at=this.tryEntries[q];if(at.tryLoc<=this.prev&&lt.call(at,"finallyLoc")&&this.prev<at.finallyLoc){var st=at;break}}st&&("break"===W||"continue"===W)&&st.tryLoc<=z&&z<=st.finallyLoc&&(st=null);var vt=st?st.completion:{};return vt.type=W,vt.arg=z,st?(this.method="next",this.next=st.finallyLoc,ce):this.complete(vt)},complete:function(W,z){if("throw"===W.type)throw W.arg;return"break"===W.type||"continue"===W.type?this.next=W.arg:"return"===W.type?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):"normal"===W.type&&z&&(this.next=z),ce},finish:function(W){for(var z=this.tryEntries.length-1;z>=0;--z){var q=this.tryEntries[z];if(q.finallyLoc===W)return this.complete(q.completion,q.afterLoc),G(q),ce}},catch:function(W){for(var z=this.tryEntries.length-1;z>=0;--z){var q=this.tryEntries[z];if(q.tryLoc===W){var at=q.completion;if("throw"===at.type){var st=at.arg;G(q)}return st}}throw new Error("illegal catch attempt")},delegateYield:function(W,z,q){return this.delegate={iterator:Z(W),resultName:z,nextLoc:q},"next"===this.method&&(this.arg=Pt),ce}},tt}("object"===wt(At=ee.nmd(At))?At.exports:{});try{regeneratorRuntime=It}catch{Function("r","regeneratorRuntime = r")(It)}},489:(At,ot,ee)=>{"use strict";function wt(p){return(wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(E){return typeof E}:function(E){return E&&"function"==typeof Symbol&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(p)}var It,tt=(It=ee(757))&&It.__esModule?It:{default:It};function Pt(p){return function(E){if(Array.isArray(E))return b(E)}(p)||function(E){if(typeof Symbol<"u"&&null!=E[Symbol.iterator]||null!=E["@@iterator"])return Array.from(E)}(p)||lt(p)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(p,E){var f=typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(!f){if(Array.isArray(p)||(f=lt(p))||E&&p&&"number"==typeof p.length){f&&(p=f);var c=0,v=function(){};return{s:v,n:function(){return c>=p.length?{done:!0}:{done:!1,value:p[c++]}},e:function(j){throw j},f:v}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var U,P=!0,$=!1;return{s:function(){f=f.call(p)},n:function(){var j=f.next();return P=j.done,j},e:function(j){$=!0,U=j},f:function(){try{P||null==f.return||f.return()}finally{if($)throw U}}}}function lt(p,E){if(p){if("string"==typeof p)return b(p,E);var f=Object.prototype.toString.call(p).slice(8,-1);return"Object"===f&&p.constructor&&(f=p.constructor.name),"Map"===f||"Set"===f?Array.from(p):"Arguments"===f||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?b(p,E):void 0}}function b(p,E){(null==E||E>p.length)&&(E=p.length);for(var f=0,c=new Array(E);f<E;f++)c[f]=p[f];return c}function V(p,E){if("function"!=typeof E&&null!==E)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(E&&E.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),Object.defineProperty(p,"prototype",{writable:!1}),E&&kt(p,E)}function kt(p,E){return(kt=Object.setPrototypeOf||function(f,c){return f.__proto__=c,f})(p,E)}function dt(p){var E=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var f,c=yt(p);if(E){var v=yt(this).constructor;f=Reflect.construct(c,arguments,v)}else f=c.apply(this,arguments);return pt(this,f)}}function pt(p,E){if(E&&("object"===wt(E)||"function"==typeof E))return E;if(void 0!==E)throw new TypeError("Derived constructors may only return object or undefined");return function(f){if(void 0===f)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}(p)}function yt(p){return(yt=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)})(p)}function Ht(p,E){for(var f=0;f<E.length;f++){var c=E[f];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(p,c.
1key,c)}}function ct(p,E,f){return E&&Ht(p.prototype,E),f&&Ht(p,f),Object.defineProperty(p,"prototype",{writable:!1}),p}function Et(p,E){if(!(p instanceof E))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ot,"__esModule",{value:!0});var Be=ct(function p(E,f,c){Et(this,p),this.next=c,c&&(c.prev=this),this.prev=f,f&&(f.next=this),this.data=E}),Ee=function(){function p(){Et(this,p),this._length=0}return ct(p,[{key:"head",get:function(){return this._head&&this._head.data}},{key:"tail",get:function(){return this._tail&&this._tail.data}},{key:"current",get:function(){return this._current&&this._current.data}},{key:"length",get:function(){return this._length}},{key:"push",value:function(E){this._tail=new Be(E,this._tail),0===this._length&&(this._head=this._tail,this._current=this._head,this._next=this._head),this._length++}},{key:"pop",value:function(){var E=this._tail;if(0!==this._length)return this._length--,0===this._length?(this._head=this._tail=this._current=this._next=void 0,E.data):(this._tail=E.prev,this._tail.next=void 0,this._current===E&&(this._current=this._tail,this._next=void 0),E.data)}},{key:"shift",value:function(){var E=this._head;if(0!==this._length)return this._length--,0===this._length?(this._head=this._tail=this._current=this._next=void 0,E.data):(this._head=this._head.next,this._current===E&&(this._current=this._head,this._next=this._current.next),E.data)}},{key:"unshift",value:function(E){this._head=new Be(E,void 0,this._head),0===this._length&&(this._tail=this._head,this._next=this._head),this._length++}},{key:"unshiftCurrent",value:function(){var E=this._current;return E===this._head||this._length<2?E&&E.data:(E===this._tail?(this._tail=E.prev,this._tail.next=void 0,this._current=this._tail):(E.next.prev=E.prev,E.prev.next=E.next,this._current=E.prev),this._next=this._current.next,E.next=this._head,E.prev=void 0,this._head.prev=E,this._head=E,E.data)}},{key:"removeCurrent",value:function(){var E=this._current;if(0!==this._length)return this._length--,0===this._length?(this._head=this._tail=this._current=this._next=void 0,E.data):(E===this._tail?(this._tail=E.prev,this._tail.next=void 0,this._current=this._tail):E===this._head?(this._head=E.next,this._head.prev=void 0,this._current=this._head):(E.next.prev=E.prev,E.prev.next=E.next,this._current=E.prev),this._next=this._current.next,E.data)}},{key:"resetCursor",value:function(){return this._current=this._next=this._head,this}},{key:"next",value:function(){var E=this._next;if(void 0!==E)return this._next=E.next,this._current=E,E.data}}]),p}(),ce=function(p){V(f,p);var E=dt(f);function f(c,v,U,P){var $;if(Et(this,f),($=E.call(this)).size=c,$.maintainHigh=v,$.maintainLow=U,$.maintainSum=P,$.totalPushed=0,$.periodHigh=0,$.periodLow=1/0,$.periodSum=0,!c||"number"!=typeof c)throw"Size required and should be a number.";return $._push=$.push,$.push=function(j){this.add(j),this.totalPushed++},$}return ct(f,[{key:"add",value:function(c){this.length===this.size?(this.lastShift=this.shift(),this._push(c),this.maintainHigh&&this.lastShift==this.periodHigh&&this.calculatePeriodHigh(),this.maintainLow&&this.lastShift==this.periodLow&&this.calculatePeriodLow(),this.maintainSum&&(this.periodSum=this.periodSum-this.lastShift)):this._push(c),this.maintainHigh&&this.periodHigh<=c&&(this.periodHigh=c),this.maintainLow&&this.periodLow>=c&&(this.periodLow=c),this.maintainSum&&(this.periodSum=this.periodSum+c)}},{key:"iterator",value:tt.default.mark(function c(){return tt.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:this.resetCursor();case 1:if(!this.next()){v.next=6;break}return v.next=4,this.current;case 4:v.next=1;break;case 6:case"end":return v.stop()}},c,this)})},{key:"calculatePeriodHigh",value:function(){for(this.resetCursor(),this.next()&&(this.periodHigh=this.current);this.next();)this.periodHigh<=this.current&&(this.periodHigh=this.current)}},{key:"calculatePeriodLow",value:function(){for(this.resetCursor(),this.next()&&(this.periodLow=this.current);this.next();)this.periodLow>=this.current&&(this.periodLow=this.current)}}]),f}(Ee),m=ct(function p(){Et(this,p)}),A=ct(function p(){Et(this,p),this.open=[],this.high=[],this.low=[],this.close=[],this.volume=[],this.timestamp=[]}),_={};function O(p){return _[p]}function M(p){var E=O("precision");return E?parseFloat(p.toPrecision(E)):p}var D=ct(function p(){Et(this,p)}),T=function(){function p(E){Et(this,p),this.format=E.format||M}return ct(p,[{key:"getResult",value:function(){return this.result}}],[{key:"reverseInputs",value:function(E){E.reversedInput&&(E.values&&E.values.reverse(),E.open&&E.open.reverse(),E.high&&E.high.reverse(),E.low&&E.low.reverse(),E.close&&E.close.reverse(),E.volume&&E.volume.reverse(),E.timestamp&&E.timestamp.reverse())}}]),p}(),R=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),(v=E.call(this,c)).period=c.period,v.price=c.values;var U=tt.default.mark(function P($){var j,X,B,w,Q;return tt.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return j=new Ee,X=0,B=1,void(K.next=5);case 5:w=K.sent,j.push(0);case 7:return B<$?(B++,j.push(w),X+=w):(X=X-j.shift()+w,Q=X/$,j.push(w)),K.next=11,Q;case 11:w=K.sent,K.next=7;break;case 14:case"end":return K.stop()}},P)});return v.generator=U(v.period),v.generator.next(),v.result=[],v.price.forEach(function(P){var $=v.generator.next(P);void 0!==$.value&&v.result.push(v.format($.value))}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c).value;if(null!=v)return this.format(v)}}]),f}(T);function y(p){T.reverseInputs(p);var E=new R(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}R.calculate=y;var L=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U,P=c.period,$=c.values,j=2/(P+1);v.result=[],U=new R({period:P,values:[]});var X=tt.default.mark(function B(){var w,Q;return tt.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return void(K.next=2);case 2:w=K.sent;case 3:if(void 0===Q||void 0===w){K.next=11;break}return Q=(w-Q)*j+Q,K.next=8,Q;case 8:w=K.sent,K.next=19;break;case 11:return void(K.next=13);case 13:if(!(Q=U.nextValue(w=K.sent))){K.next=19;break}return K.next=18,Q;case 18:w=K.sent;case 19:K.next=3;break;case 21:case"end":return K.stop()}},B)});return v.generator=X(),v.generator.next(),v.generator.next(),$.forEach(function(B){var w=v.generator.next(B);null!=w.value&&v.result.push(v.format(w.value))}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c).value;if(null!=v)return this.format(v)}}]),f}(T);function H(p){T.reverseInputs(p);var E=new L(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}L.calculate=H;var G=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.period,P=c.values;return v.result=[],v.generator=tt.default.mark(function $(){var j,X,B,w,Q;return tt.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:j=new Ee,X=U*(U+1)/2;case 2:if(!(j.length<U)){K.next=11;break}return K.t0=j,void(K.next=7);case 7:K.t1=K.sent,K.t0.push.call(K.t0,K.t1),K.next=19;break;case 11:for(j.resetCursor(),B=0,w=1;w<=U;w++)B+=j.next()*w/X;return K.next=16,B;
1case 16:Q=K.sent,j.shift(),j.push(Q);case 19:K.next=2;break;case 21:case"end":return K.stop()}},$)})(),v.generator.next(),P.forEach(function($,j){var X=v.generator.next($);null!=X.value&&v.result.push(v.format(X.value))}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c).value;if(null!=v)return this.format(v)}}]),f}(T);function J(p){T.reverseInputs(p);var E=new G(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}G.calculate=J;var Z=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U,P=c.period,$=c.values,j=1/P;v.result=[],U=new R({period:P,values:[]});var X=tt.default.mark(function B(){var w,Q;return tt.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return void(K.next=2);case 2:w=K.sent;case 3:if(void 0===Q||void 0===w){K.next=11;break}return Q=(w-Q)*j+Q,K.next=8,Q;case 8:w=K.sent,K.next=19;break;case 11:return void(K.next=13);case 13:if(void 0===(Q=U.nextValue(w=K.sent))){K.next=19;break}return K.next=18,Q;case 18:w=K.sent;case 19:K.next=3;break;case 21:case"end":return K.stop()}},B)});return v.generator=X(),v.generator.next(),v.generator.next(),$.forEach(function(B){var w=v.generator.next(B);null!=w.value&&v.result.push(v.format(w.value))}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c).value;if(null!=v)return this.format(v)}}]),f}(T);function nt(p){T.reverseInputs(p);var E=new Z(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Z.calculate=nt;var W=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.SimpleMAOscillator?R:L,P=c.SimpleMASignal?R:L,$=new U({period:c.fastPeriod,values:[],format:function(w){return w}}),j=new U({period:c.slowPeriod,values:[],format:function(w){return w}}),X=new P({period:c.signalPeriod,values:[],format:function(w){return w}}),B=v.format;return v.result=[],v.generator=tt.default.mark(function w(){var Q,K,ut,_t,ft,bt,Ut;return tt.default.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:Q=0;case 1:if(!(Q<c.slowPeriod)){Mt.next=10;break}return void(Mt.next=5);case 5:return bt=$.nextValue(K=Mt.sent),Ut=j.nextValue(K),Q++,Mt.abrupt("continue",1);case 10:return bt&&Ut&&(_t=X.nextValue(ut=bt-Ut)),ft=ut-_t,Mt.next=14,{MACD:B(ut),signal:_t?B(_t):void 0,histogram:isNaN(ft)?void 0:B(ft)};case 14:bt=$.nextValue(K=Mt.sent),Ut=j.nextValue(K),Mt.next=1;break;case 19:case"end":return Mt.stop()}},w)})(),v.generator.next(),c.values.forEach(function(w){var Q=v.generator.next(w);null!=Q.value&&v.result.push(Q.value)}),v}return ct(f,[{key:"nextValue",value:function(c){return this.generator.next(c).value}}]),f}(T);function z(p){T.reverseInputs(p);var E=new W(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}W.calculate=z;var q=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.values,P=c.period,$=v.format;return v.generator=tt.default.mark(function j(X){var B,w,Q,K,ut,_t;return tt.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return void(ft.next=2);case 2:return w=1,Q=0,_t=B=ft.sent,void(ft.next=8);case 8:B=ft.sent;case 9:return(ut=(ut=B-_t)>0?ut:0)>0&&(Q+=ut),w<X?w++:K=void 0===K?Q/X:(K*(X-1)+ut)/X,_t=B,K=void 0!==K?$(K):void 0,ft.next=18,K;case 18:B=ft.sent,ft.next=9;break;case 21:case"end":return ft.stop()}},j)})(P),v.generator.next(),v.result=[],U.forEach(function(j){var X=v.generator.next(j);void 0!==X.value&&v.result.push(X.value)}),v}return ct(f,[{key:"nextValue",value:function(c){return this.generator.next(c).value}}]),f}(T);function at(p){T.reverseInputs(p);var E=new q(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}q.calculate=at;var st=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.values,P=c.period,$=v.format;return v.generator=tt.default.mark(function j(X){var B,w,Q,K,ut,_t;return tt.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return void(ft.next=2);case 2:return w=1,Q=0,_t=B=ft.sent,void(ft.next=8);case 8:B=ft.sent;case 9:return(ut=(ut=_t-B)>0?ut:0)>0&&(Q+=ut),w<X?w++:K=void 0===K?Q/X:(K*(X-1)+ut)/X,_t=B,K=void 0!==K?$(K):void 0,ft.next=18,K;case 18:B=ft.sent,ft.next=9;break;case 21:case"end":return ft.stop()}},j)}
1)(P),v.generator.next(),v.result=[],U.forEach(function(j){var X=v.generator.next(j);void 0!==X.value&&v.result.push(X.value)}),v}return ct(f,[{key:"nextValue",value:function(c){return this.generator.next(c).value}}]),f}(T);function vt(p){T.reverseInputs(p);var E=new st(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}st.calculate=vt;var Nt=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.period,P=c.values,$=new q({period:U,values:[]}),j=new st({period:U,values:[]});return v.generator=tt.default.mark(function X(B){var w,Q,K,ut,_t;return tt.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return void(ft.next=2);case 2:w=ft.sent;case 3:return Q=$.nextValue(w),K=j.nextValue(w),void 0!==Q&&void 0!==K&&(0===K?_t=100:0===Q?_t=0:(ut=Q/K,ut=isNaN(ut)?0:ut,_t=parseFloat((100-100/(1+ut)).toFixed(2)))),ft.next=10,_t;case 10:w=ft.sent,ft.next=3;break;case 13:case"end":return ft.stop()}},X)})(U),v.generator.next(),v.result=[],P.forEach(function(X){var B=v.generator.next(X);void 0!==B.value&&v.result.push(B.value)}),v}return ct(f,[{key:"nextValue",value:function(c){return this.generator.next(c).value}}]),f}(T);function St(p){T.reverseInputs(p);var E=new Nt(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Nt.calculate=St;var Ft=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.period,P=c.values,$=new R({period:U,values:[],format:function(j){return j}});return v.result=[],v.generator=tt.default.mark(function j(){var X,B,w,Q,K,ut,_t;return tt.default.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return w=new ce(U),void(bt.next=3);case 3:X=bt.sent;case 4:if(w.push(X),B=$.nextValue(X)){K=0,ut=F(w.iterator());try{for(ut.s();!(_t=ut.n()).done;)K+=Math.pow(_t.value-B,2)}catch(Ut){ut.e(Ut)}finally{ut.f()}Q=Math.sqrt(K/U)}return bt.next=10,Q;case 10:X=bt.sent,bt.next=4;break;case 13:case"end":return bt.stop()}},j)})(),v.generator.next(),P.forEach(function(j){var X=v.generator.next(j);null!=X.value&&v.result.push(v.format(X.value))}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(null!=v.value)return this.format(v.value)}}]),f}(T);function Vt(p){T.reverseInputs(p);var E=new Ft(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Ft.calculate=Vt;var xt=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U,P,$=c.period,j=c.values,X=c.stdDev,B=v.format;return v.result=[],U=new R({period:$,values:[],format:function(w){return w}}),P=new Ft({period:$,values:[],format:function(w){return w}}),v.generator=tt.default.mark(function w(){var Q,K,ut,_t,ft,bt,Ut,Mt;return tt.default.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return void(Jt.next=2);case 2:K=Jt.sent;case 3:return ut=U.nextValue(K),_t=P.nextValue(K),ut&&(ft=B(ut),bt=B(ut+_t*X),Ut=B(ut-_t*X),Mt=B((K-Ut)/(bt-Ut)),Q={middle:ft,upper:bt,lower:Ut,pb:Mt}),Jt.next=9,Q;case 9:K=Jt.sent,Jt.next=3;break;case 12:case"end":return Jt.stop()}},w)})(),v.generator.next(),j.forEach(function(w){var Q=v.generator.next(w);null!=Q.value&&v.result.push(Q.value)}),v}return ct(f,[{key:"nextValue",value:function(c){return this.generator.next(c).value}}]),f}(T);function $t(p){T.reverseInputs(p);var E=new xt(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}xt.calculate=$t;var ne=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),(v=E.call(this,c)).period=c.period,v.price=c.values;var U=tt.default.mark(function P($){var j,X,B,w;return tt.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return new Ee,j=0,X=1,void(Q.next=5);case 5:B=Q.sent,w=0;case 7:return X<$?(X++,j+=B,w=void 0):X==$?(X++,w=j+=B):w=w-w/$+B,Q.next=11,w;case 11:B=Q.sent,Q.next=7;break;case 14:case"end":return Q.stop()}},P)});return v.generator=U(v.period),v.generator.next(),v.result=[],v.price.forEach(function(P){var $=v.generator.next(P);null!=$.value&&v.result.push(v.format($.value))}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c).value;if(null!=v)return this.format(v)}}]),f}(T);ne.calculate=function(p){T.reverseInputs(p);var E=new ne(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E};var ae=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.low,P=c.high,$=v.format;if(U.length!=P.length)throw"Inputs(low,high) not of equal size";return v.result=[],v.generator=tt.default.mark(function j(){var X,B,w,K;return tt.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return void(ut.next=2);case 2:B=ut.sent;case 3:return w&&(X=$((K=w.low-B.low)>B.high-w.high&&K>0?K:0)),w=B,ut.next=8,X;case 8:B=ut.sent,ut.next=3;break;case 11:case"end":return ut.stop()}},j)}
1)(),v.generator.next(),U.forEach(function(j,X){var B=v.generator.next({high:P[X],low:U[X]});void 0!==B.value&&v.result.push(B.value)}),v}return ct(f,[{key:"nextValue",value:function(c){return this.generator.next(c).value}}],[{key:"calculate",value:function(c){T.reverseInputs(c);var v=new f(c).result;return c.reversedInput&&v.reverse(),T.reverseInputs(c),v}}]),f}(T),oe=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.low,P=c.high,$=v.format;if(U.length!=P.length)throw"Inputs(low,high) not of equal size";return v.result=[],v.generator=tt.default.mark(function j(){var X,B,w,Q;return tt.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return void(ut.next=2);case 2:B=ut.sent;case 3:return w&&(X=$((Q=B.high-w.high)>w.low-B.low&&Q>0?Q:0)),w=B,ut.next=8,X;case 8:B=ut.sent,ut.next=3;break;case 11:case"end":return ut.stop()}},j)})(),v.generator.next(),U.forEach(function(j,X){var B=v.generator.next({high:P[X],low:U[X]});void 0!==B.value&&v.result.push(B.value)}),v}return ct(f,[{key:"nextValue",value:function(c){return this.generator.next(c).value}}],[{key:"calculate",value:function(c){T.reverseInputs(c);var v=new f(c).result;return c.reversedInput&&v.reverse(),T.reverseInputs(c),v}}]),f}(T),ge=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.low,P=c.high,$=c.close,j=v.format;if(U.length!=P.length)throw"Inputs(low,high) not of equal size";return v.result=[],v.generator=tt.default.mark(function X(){var B,w,Q;return tt.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return void(K.next=2);case 2:B=K.sent;case 3:if(void 0!==w){K.next=9;break}return w=B.close,K.next=8,Q;case 8:B=K.sent;case 9:return Q=Math.max(B.high-B.low,isNaN(Math.abs(B.high-w))?0:Math.abs(B.high-w),isNaN(Math.abs(B.low-w))?0:Math.abs(B.low-w)),w=B.close,null!=Q&&(Q=j(Q)),K.next=14,Q;case 14:B=K.sent,K.next=3;break;case 17:case"end":return K.stop()}},X)})(),v.generator.next(),U.forEach(function(X,B){var w=v.generator.next({high:P[B],low:U[B],close:$[B]});null!=w.value&&v.result.push(w.value)}),v}return ct(f,[{key:"nextValue",value:function(c){return this.generator.next(c).value}}]),f}(T);function Oe(p){T.reverseInputs(p);var E=new ge(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}ge.calculate=Oe;var Xe=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.low,P=c.high,$=c.close,j=c.period,X=v.format,B=new oe({high:[],low:[]}),w=new ae({high:[],low:[]}),Q=new ne({period:j,values:[],format:function(bt){return bt}}),K=new ne({period:j,values:[],format:function(bt){return bt}}),ut=new ne({period:j,values:[],format:function(bt){return bt}}),_t=new Z({period:j,values:[],format:function(bt){return bt}}),ft=new ge({low:[],high:[],close:[]});if(U.length!==P.length||P.length!==$.length)throw"Inputs(low,high, close) not of equal size";return v.result=[],v.generator=tt.default.mark(function bt(){var Ut,Mt,Jt,Mn,ie,Re,We,Ne,en,ve,Ti;return tt.default.wrap(function(Ln){for(;;)switch(Ln.prev=Ln.next){case 0:return void(Ln.next=2);case 2:Ut=Ln.sent;case 7:if(ie=ft.nextValue(Ut),Re=B.nextValue(Ut),We=w.nextValue(Ut),void 0!==ie){Ln.next=16;break}return void(Ln.next=14);case 14:return Ut=Ln.sent,Ln.abrupt("continue",7);case 16:return Ne=ut.nextValue(ie),en=Q.nextValue(Re),ve=K.nextValue(We),null!=Ne&&null!=en&&null!=ve&&(Mt=100*en/Ne,Jt=100*ve/Ne,Ti=Math.abs(Mt-Jt),Mn=_t.nextValue(Ti/(Mt+Jt)*100)),Ln.next=22,{adx:Mn,pdi:Mt,mdi:Jt};case 22:Ut=Ln.sent,Ln.next=7;break;case 25:case"end":return Ln.stop()}},bt)})(),v.generator.next(),U.forEach(function(bt,Ut){var Mt=v.generator.next({high:P[Ut],low:U[Ut],close:$[Ut]});null!=Mt.value&&null!=Mt.value.adx&&v.result.push({adx:X(Mt.value.adx),pdi:X(Mt.value.pdi),mdi:X(Mt.value.mdi)})}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c).value;if(null!=v&&null!=v.adx)return{adx:this.format(v.adx),pdi:this.format(v.pdi),mdi:this.format(v.mdi)}}}]),f}(T);function pn(p){T.reverseInputs(p);var E=new Xe(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Xe.calculate=pn;var Me=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.low,P=c.high,$=c.close,j=c.period,X=v.format;if(U.length!==P.length||P.length!==$.length)throw"Inputs(low,high, close) not of equal size";var B=new ge({low:[],high:[],close:[]}),w=new Z({period:j,values:[],format:function(Q){return Q}});return v.result=[],v.generator=tt.default.mark(function Q(){var K,ut,_t;return tt.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return void(ft.next=2);case 2:K=ft.sent;case 3:return _t=B.nextValue({low:K.low,high:K.high,close:K.close}),ut=void 0===_t?void 0:w.nextValue(_t),ft.next=8,ut;case 8:K=ft.sent,ft.next=3;break;case 11:case"end":return ft.stop()}},Q)}
1)(),v.generator.next(),U.forEach(function(Q,K){var ut=v.generator.next({high:P[K],low:U[K],close:$[K]});void 0!==ut.value&&v.result.push(X(ut.value))}),v}return ct(f,[{key:"nextValue",value:function(c){return this.generator.next(c).value}}]),f}(T);function Vn(p){T.reverseInputs(p);var E=new Me(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Me.calculate=Vn;var Gt=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.period,P=c.values;return v.result=[],v.generator=tt.default.mark(function $(){var j,X,B,w;return tt.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return j=1,X=new ce(U),void(Q.next=4);case 4:B=Q.sent;case 5:return X.push(B),j<U?j++:w=(B-X.lastShift)/X.lastShift*100,Q.next=10,w;case 10:B=Q.sent,Q.next=5;break;case 13:case"end":return Q.stop()}},$)})(),v.generator.next(),P.forEach(function($){var j=v.generator.next($);null==j.value||isNaN(j.value)||v.result.push(v.format(j.value))}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(null!=v.value&&!isNaN(v.value))return this.format(v.value)}}]),f}(T);function un(p){T.reverseInputs(p);var E=new Gt(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Gt.calculate=un;var rn=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.values,P=c.ROCPer1,$=c.ROCPer2,j=c.ROCPer3,X=c.ROCPer4,B=c.SMAROCPer1,w=c.SMAROCPer2,Q=c.SMAROCPer3,K=c.SMAROCPer4,ut=c.signalPeriod,_t=new Gt({period:P,values:[]}),ft=new Gt({period:$,values:[]}),bt=new Gt({period:j,values:[]}),Ut=new Gt({period:X,values:[]}),Mt=new R({period:B,values:[],format:function(Ne){return Ne}}),Jt=new R({period:w,values:[],format:function(Ne){return Ne}}),Qe=new R({period:Q,values:[],format:function(Ne){return Ne}}),Mn=new R({period:K,values:[],format:function(Ne){return Ne}}),ie=new R({period:ut,values:[],format:function(Ne){return Ne}}),Re=v.format;v.result=[];var We=Math.max(P+B,$+w,j+Q,X+K);return v.generator=tt.default.mark(function Ne(){var en,ve,Ti,Ln,zn,Se,Ui,Rt,dn,Hn,jn,Li,di;return tt.default.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:return en=1,void(Xn.next=3);case 3:ve=Xn.sent;case 4:return Hn=_t.nextValue(ve),jn=ft.nextValue(ve),Li=bt.nextValue(ve),di=Ut.nextValue(ve),Ln=void 0!==Hn?Mt.nextValue(Hn):void 0,zn=void 0!==jn?Jt.nextValue(jn):void 0,Se=void 0!==Li?Qe.nextValue(Li):void 0,Ui=void 0!==di?Mn.nextValue(di):void 0,en<We?en++:Ti=1*Ln+2*zn+3*Se+4*Ui,Rt=void 0!==Ti?ie.nextValue(Ti):void 0,dn=void 0!==Ti?{kst:Re(Ti),signal:Rt?Re(Rt):void 0}:void 0,Xn.next=18,dn;case 18:ve=Xn.sent,Xn.next=4;break;case 21:case"end":return Xn.stop()}},Ne)})(),v.generator.next(),U.forEach(function(Ne){var en=v.generator.next(Ne);null!=en.value&&v.result.push(en.value)}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(null!=v.value)return v.value}}]),f}(T);function Dn(p){T.reverseInputs(p);var E=new rn(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}rn.calculate=Dn;var Pe=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.high||[],P=c.low||[],$=tt.default.mark(function j(X,B){var w,Q,K,ut,_t,ft,bt;return tt.default.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return _t=!0,ft=X,void(Ut.next=4);case 4:bt=Ut.sent;case 5:return w?(K+=ft*(Q-K),_t?(K=Math.min(K,ut.low,bt.low),w.high>Q&&(Q=w.high,ft=Math.min(ft+X,B))):(K=Math.max(K,ut.high,bt.high),w.low<Q&&(Q=w.low,ft=Math.min(ft+X,B))),(_t&&w.low<K||!_t&&w.high>K)&&(ft=X,K=Q,Q=(_t=!_t)?w.high:w.low)):(K=bt.low,Q=bt.high),ut=bt,w&&(bt=w),Ut.next=11,K;case 11:w=Ut.sent,Ut.next=5;break;case 14:case"end":return Ut.stop()}},j)});return v.result=[],v.generator=$(c.step,c.max),v.generator.next(),P.forEach(function(j,X){var B=v.generator.next({high:U[X],low:P[X]});void 0!==B.value&&v.result.push(B.value)}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(void 0!==v.value)return v.value}}]),f}(T);function se(p){T.reverseInputs(p);var E=new Pe(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Pe.calculate=se;var Qt=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.low,P=c.high,$=c.close,j=c.period,X=c.signalPeriod,B=v.format;if(U.length!==P.length||P.length!==$.length)throw"Inputs(low,high, close) not of equal size";return v.result=[],v.generator=tt.default.mark(function w(){var Q,K,ut,_t,ft,bt,Ut,Mt;return tt.default.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return Q=1,K=new ce(j,!0,!1),ut=new ce(j,!1,!0),_t=new R({period:X,values:[],format:function(Qe){return Qe}}),void(Jt.next=6);case 6:Ut=Jt.sent;case 7:if(K.push(Ut.high),ut.push(Ut.low),!(Q<j)){Jt.next=16;break}return Q++,void(Jt.next=14);case 14:return Ut=Jt.sent,Jt.abrupt("continue",7);case 16:return ft=(Ut.close-(Mt=ut.periodLow))/(K.periodHigh-Mt)*100,ft=isNaN(ft)?0:ft,bt=_t.nextValue(ft),Jt.next=22,{k:B(ft),d:void 0!==bt?B(bt):void 0};case 22:Ut=Jt.sent,Jt.next=7;break;case 25:case"end":return Jt.stop()}},w)}
1)(),v.generator.next(),U.forEach(function(w,Q){var K=v.generator.next({high:P[Q],low:U[Q],close:$[Q]});void 0!==K.value&&v.result.push(K.value)}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(void 0!==v.value)return v.value}}]),f}(T);function an(p){T.reverseInputs(p);var E=new Qt(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Qt.calculate=an;var Rn=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.low,P=c.high,$=c.close,j=c.period,X=v.format;if(U.length!==P.length||P.length!==$.length)throw"Inputs(low,high, close) not of equal size";return v.result=[],v.generator=tt.default.mark(function B(){var w,Q,K,_t,ft,bt;return tt.default.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return w=1,Q=new ce(j,!0,!1),K=new ce(j,!1,!0),void(Ut.next=5);case 5:ft=Ut.sent;case 6:if(Q.push(ft.high),K.push(ft.low),!(w<j)){Ut.next=15;break}return w++,void(Ut.next=13);case 13:return ft=Ut.sent,Ut.abrupt("continue",6);case 15:return bt=X(((_t=Q.periodHigh)-ft.close)/(_t-K.periodLow)*-100),Ut.next=20,bt;case 20:ft=Ut.sent,Ut.next=6;break;case 23:case"end":return Ut.stop()}},B)})(),v.generator.next(),U.forEach(function(B,w){var Q=v.generator.next({high:P[w],low:U[w],close:$[w]});void 0!==Q.value&&v.result.push(Q.value)}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(null!=v.value)return this.format(v.value)}}]),f}(T);function Nn(p){T.reverseInputs(p);var E=new Rn(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Rn.calculate=Nn;var Bn=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.high,P=c.low,$=c.close,j=c.volume;if(P.length!==U.length||U.length!==$.length||U.length!==j.length)throw"Inputs(low,high, close, volumes) not of equal size";return v.result=[],v.generator=tt.default.mark(function X(){var B,w,Q;return tt.default.wrap(function(ut){for(;;)switch(ut.prev=ut.next){case 0:return B=0,void(ut.next=3);case 3:w=ut.sent;case 4:return Q=(w.close-w.low-(w.high-w.close))/(w.high-w.low),Q=isNaN(Q)?1:Q,B+=Q*w.volume,ut.next=11,Math.round(B);case 11:w=ut.sent,ut.next=4;break;case 14:case"end":return ut.stop()}},X)})(),v.generator.next(),U.forEach(function(X,B){var Q=v.generator.next({high:X,low:P[B],close:$[B],volume:j[B]});null!=Q.value&&v.result.push(Q.value)}),v}return ct(f,[{key:"nextValue",value:function(c){return this.generator.next(c).value}}]),f}(T);function yn(p){T.reverseInputs(p);var E=new Bn(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Bn.calculate=yn;var ni=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.close,P=c.volume;return v.result=[],v.generator=tt.default.mark(function $(){var j,X,B;return tt.default.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return j=0,void(w.next=3);case 3:if(!(X=w.sent).close||"number"!=typeof X.close){w.next=9;break}return B=X.close,void(w.next=8);case 8:X=w.sent;case 9:return B<X.close?j+=X.volume:X.close<B&&(j-=X.volume),B=X.close,w.next=14,j;case 14:X=w.sent,w.next=9;break;case 17:case"end":return w.stop()}},$)})(),v.generator.next(),U.forEach(function($,j){var B=v.generator.next({close:U[j],volume:P[j]});null!=B.value&&v.result.push(B.value)}),v}return ct(f,[{key:"nextValue",value:function(c){return this.generator.next(c).value}}]),f}(T);function Ai(p){T.reverseInputs(p);var E=new ni(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}ni.calculate=Ai;var Zn=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.values,P=c.period,$=v.format,j=new L({period:P,values:[],format:function(Q){return Q}}),X=new L({period:P,values:[],format:function(Q){return Q}}),B=new L({period:P,values:[],format:function(Q){return Q}}),w=new Gt({period:1,values:[],format:function(Q){return Q}});return v.result=[],v.generator=tt.default.mark(function Q(){var K,ut,_t,ft,bt;return tt.default.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return void(Ut.next=2);case 2:K=Ut.sent;case 3:return ut=j.nextValue(K),_t=ut?X.nextValue(ut):void 0,ft=_t?B.nextValue(_t):void 0,bt=ft?w.nextValue(ft):void 0,Ut.next=10,bt?$(bt):void 0;case 10:K=Ut.sent,Ut.next=3;break;case 13:case"end":return Ut.stop()}},Q)}
1)(),v.generator.next(),U.forEach(function(Q){var K=v.generator.next(Q);void 0!==K.value&&v.result.push(K.value)}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(void 0!==v.value)return v.value}}]),f}(T);function pi(p){T.reverseInputs(p);var E=new Zn(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Zn.calculate=pi;var Ii=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.close,P=c.volume;if(P.length!==U.length)throw"Inputs(volume, close) not of equal size";var j=new L({values:[],period:c.period||1});return v.result=[],v.generator=tt.default.mark(function X(){var B,w,Q;return tt.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return void(K.next=2);case 2:return B=K.sent,void(K.next=5);case 5:w=K.sent;case 6:return Q=(w.close-B.close)*w.volume,B=w,K.next=11,j.nextValue(Q);case 11:w=K.sent,K.next=6;break;case 14:case"end":return K.stop()}},X)})(),v.generator.next(),P.forEach(function(X,B){var w=v.generator.next({close
1:U[B],volume:P[B]});null!=w.value&&v.result.push(w.value)}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c).value;if(null!=v)return v}}]),f}(T);function yi(p){T.reverseInputs(p);var E=new Ii(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Ii.calculate=yi;var ji=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.low,P=c.high,$=c.close,j=c.period,X=new ce(j),B=new R({period:j,values:[],format:function(w){return w}});if(U.length!==P.length||P.length!==$.length)throw"Inputs(low,high, close) not of equal size";return v.result=[],v.generator=tt.default.mark(function w(){var Q,K,ut,_t,ft,bt,Ut;return tt.default.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return void(Jt.next=2);case 2:Q=Jt.sent;case 3:if(X.push(K=(Q.high+Q.low+Q.close)/3),ut=B.nextValue(K),_t=void 0,ft=0,null!=ut){bt=F(X.iterator());try{for(bt.s();!(Ut=bt.n()).done;)ft+=Math.abs(Ut.value-ut)}catch(Qe){bt.e(Qe)}finally{bt.f()}_t=(K-ut)/(ft/j*.015)}return Jt.next=13,_t;case 13:Q=Jt.sent,Jt.next=3;break;case 16:case"end":return Jt.stop()}},w)})(),v.generator.next(),U.forEach(function(w,Q){var K=v.generator.next({high:P[Q],low:U[Q],close:$[Q]});null!=K.value&&v.result.push(K.value)}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c).value;if(null!=v)return v}}]),f}(T);function pe(p){T.reverseInputs(p);var E=new ji(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}ji.calculate=pe;var xe=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.high,P=c.low,$=c.fastPeriod,X=new R({values:[],period:c.slowPeriod}),B=new R({values:[],period:$});return v.result=[],v.generator=tt.default.mark(function w(){var Q,K,ut,_t,ft;return tt.default.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return void(bt.next=2);case 2:K=bt.sent;case 3:return _t=X.nextValue(ut=(K.high+K.low)/2),ft=B.nextValue(ut),void 0!==_t&&void 0!==ft&&(Q=ft-_t),bt.next=10,Q;case 10:K=bt.sent,bt.next=3;break;case 13:case"end":return bt.stop()}},w)})(),v.generator.next(),U.forEach(function(w,Q){var ut=v.generator.next({high:w,low:P[Q]});null!=ut.value&&v.result.push(v.format(ut.value))}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(null!=v.value)return this.format(v.value)}}]),f}(T);function Mi(p){T.reverseInputs(p);var E=new xe(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}xe.calculate=Mi;var hr=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.low,P=c.high,$=c.close,j=c.volume;if(U.length!==P.length||P.length!==$.length)throw"Inputs(low,high, close) not of equal size";return v.result=[],v.generator=tt.default.mark(function X(){var B,w,Q;return tt.default.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return void(_t.next=2);case 2:B=_t.sent,w=0,Q=0;case 5:return w+=B.volume*((B.high+B.low+B.close)/3),Q+=B.volume,_t.next=12,w/Q;case 12:B=_t.sent,_t.next=5;break;case 15:case"end":return _t.stop()}},X)})(),v.generator.next(),U.forEach(function(X,B){var w=v.generator.next({high:P[B],low:U[B],close:$[B],volume:j[B]});null!=w.value&&v.result.push(w.value)}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c).value;if(null!=v)return v}}]),f}(T);function ht(p){T.reverseInputs(p);var E=new hr(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}hr.calculate=ht;var Pi=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.high,P=c.low,$=c.close,j=c.open,X=c.volume,B=c.noOfBars;if(P.length!==U.length||U.length!==$.length||U.length!==X.length)throw"Inputs(low,high, close, volumes) not of equal size";v.result=[];for(var w,Q,K=Math.max.apply(Math,Pt(U).concat(Pt(P),Pt($),Pt(j))),ut=Math.min.apply(Math,Pt(U).concat(Pt(P),Pt($),Pt(j))),_t=(K-ut)/B,ft=ut,bt=0;bt<B;bt++){var Ut=ft,Mt=Ut+_t;ft=Mt;for(var Jt=0,Qe=0,Mn=0,ie=0;ie<U.length;ie++){var ve=X[ie];((w=Ut)<=(Q=P[ie])&&Mt>=Q||Q<=w&&U[ie]>=w)&&(Mn+=ve,j[ie]>$[ie]?Qe+=ve:Jt+=ve)}v.result.push({rangeStart:Ut,rangeEnd:Mt,bullishVolume:Jt,bearishVolume:Qe,totalVolume:Mn})}return v}return ct(f,[{key:"nextValue",value:function(c){throw"Next value not supported for volume profile"}}]),f}(T);function Xi(p){T.reverseInputs(p);var E=new Pi(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Pi.calculate=Xi;var gr=function(p){V(f,p);var E=dt(f);function f(c){var v;return Et(this,f),(v=E.call(this,c)).result=[],v.generator=tt.default.mark(function U(){var P;return tt.default.wrap(function($){for(;;)switch($.prev=$.next){case 0:return void($.next=2);
1case 2:P=$.sent;case 3:return $.next=6,(P.high+P.low+P.close)/3;case 6:P=$.sent,$.next=3;break;case 9:case"end":return $.stop()}},U)})(),v.generator.next(),c.low.forEach(function(U,P){var $=v.generator.next({high:c.high[P],low:c.low[P],close:c.close[P]});v.result.push($.value)}),v}return ct(f,[{key:"nextValue",value:function(c){return this.generator.next(c).value}}]),f}(T);gr.calculate=function(p){T.reverseInputs(p);var E=new gr(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E};var vr=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.high,P=c.low,$=c.close,j=c.volume,X=c.period,B=new gr({low:[],high:[],close:[]}),w=new ce(X,!1,!1,!0),Q=new ce(X,!1,!1,!0);if(P.length!==U.length||U.length!==$.length||U.length!==j.length)throw"Inputs(low,high, close, volumes) not of equal size";return v.result=[],v.generator=tt.default.mark(function K(){var ut,_t,ft,bt,Ut,Mt,Jt,Qe,Mn,We,Ne,en;return tt.default.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return bt=0,Mt=null,Jt=null,void(ve.next=5);case 5:return _t=ve.sent,void(ve.next=9);case 9:_t=ve.sent;case 10:return Mn=(Qe=_t).high,We=Qe.volume,Ne=0,en=0,Mt=B.nextValue({high:Mn,low:Qe.low,close:Qe.close}),bt=Mt*We,null!=Mt&&null!=Jt&&(Mt>Jt?Ne=bt:en=bt,w.push(Ne),Q.push(en),ft=w.periodSum,Ut=Q.periodSum,w.totalPushed>=X&&w.totalPushed>=X&&(ut=100-100/(1+ft/Ut))),Jt=Mt,ve.next=20,ut;case 20:_t=ve.sent,ve.next=10;break;case 23:case"end":return ve.stop()}},K)})(),v.generator.next(),U.forEach(function(K,ut){var ft=v.generator.next({high:K,low:P[ut],close:$[ut],volume:j[ut]});null!=ft.value&&v.result.push(parseFloat(ft.value.toFixed(2)))}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(null!=v.value)return parseFloat(v.value.toFixed(2))}}]),f}(T);function In(p){T.reverseInputs(p);var E=new vr(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}vr.calculate=In;var cn=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.values,P=c.rsiPeriod,$=c.stochasticPeriod,j=c.kPeriod,X=c.dPeriod;return v.result=[],v.generator=tt.default.mark(function B(){var w,Q,K,ut,_t,ft,bt,Ut;return tt.default.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return w=new Nt({period:P,values:[]}),Q=new Qt({period:$,high:[],low:[],close:[],signalPeriod:j}),K=new R({period:X,values:[],format:function(Qe){return Qe}}),void(Jt.next=6);case 6:Ut=Jt.sent;case 7:return void 0!==(ut=w.nextValue(Ut))&&void 0!==(_t=Q.nextValue({high:ut,low:ut,close:ut}))&&void 0!==_t.d&&void 0!==(ft=K.nextValue(_t.d))&&(bt={stochRSI:_t.k,k:_t.d,d:ft}),Jt.next=12,bt;case 12:Ut=Jt.sent,Jt.next=7;break;case 15:case"end":return Jt.stop()}},B)})(),v.generator.next(),U.forEach(function(B,w){var Q=v.generator.next(B);void 0!==Q.value&&v.result.push(Q.value)}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(void 0!==v.value)return v.value}}]),f}(T);function xi(p){T.reverseInputs(p);var E=new cn(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}cn.calculate=xi;var Ei=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.values,P=c.period;v.result=[];var $=new ce(P,!0,!1,!1);return v.generator=tt.default.mark(function j(){var X,B;return tt.default.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return void(w.next=2);case 2:X=w.sent;case 3:return $.push(X),$.totalPushed>=P&&(B=$.periodHigh),w.next=8,B;case 8:X=w.sent,w.next=3;break;case 11:case"end":return w.stop()}},j)})(),v.generator.next(),U.forEach(function(j,X){var B=v.generator.next(j);null!=B.value&&v.result.push(B.value)}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(null!=v.value)return v.value}}]),f}(T);function $i(p){T.reverseInputs(p);var E=new Ei(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Ei.calculate=$i;var mr=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.values,P=c.period;v.result=[];var $=new ce(P,!1,!0,!1);return v.generator=tt.default.mark(function j(){var X,B;return tt.default.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return void(w.next=2);case 2:X=w.sent;case 3:return $.push(X),$.totalPushed>=P&&(B=$.periodLow),w.next=8,B;case 8:X=w.sent,w.next=3;break;case 11:case"end":return w.stop()}},j)}
1)(),v.generator.next(),U.forEach(function(j,X){var B=v.generator.next(j);null!=B.value&&v.result.push(B.value)}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(null!=v.value)return v.value}}]),f}(T);function kr(p){T.reverseInputs(p);var E=new mr(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}mr.calculate=kr;var pr=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.values,P=c.period;v.result=[];var $=new ce(P,!1,!1,!0);return v.generator=tt.default.mark(function j(){var X,B;return tt.default.wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return void(w.next=2);case 2:X=w.sent;case 3:return $.push(X),$.totalPushed>=P&&(B=$.periodSum),w.next=8,B;case 8:X=w.sent,w.next=3;break;case 11:case"end":return w.stop()}},j)})(),v.generator.next(),U.forEach(function(j,X){var B=v.generator.next(j);null!=B.value&&v.result.push(B.value)}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(null!=v.value)return v.value}}]),f}(T);function Ir(p){T.reverseInputs(p);var E=new pr(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}pr.calculate=Ir;var Er=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var P=c.brickSize||0;if(c.useATR){var $=Vn(Object.assign({},c));P=$[$.length-1]}if(v.result=new A,0===P)return console.error("Not enough data to calculate brickSize for renko when using ATR"),pt(v);var j=0,X=0,B=1/0,w=0,Q=0;return v.generator=tt.default.mark(function K(){var ut,_t,ft,bt,Ut;return tt.default.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return void(Mt.next=2);case 2:ut=Mt.sent;case 3:if(0!==j){Mt.next=15;break}return j=ut.close,X=ut.high,B=ut.low,w=ut.close,Q=ut.volume,void(Mt.next=13);case 13:return ut=Mt.sent,Mt.abrupt("continue",3);case 15:if(_t=Math.abs(ut.close-w),ft=Math.abs(ut.close-j),!(_t>=P&&ft>=P)){Mt.next=30;break}return Ut={open:bt=_t>ft?j:w,high:X>ut.high?X:ut.high,low:B<ut.Low?B:ut.low,close:bt>ut.close?bt-P:bt+P,volume:Q+ut.volume,timestamp:ut.timestamp},j=Ut.open,X=Ut.close,B=Ut.close,w=Ut.close,Q=0,Mt.next=27,Ut;case 27:ut=Mt.sent,Mt.next=37;break;case 30:return X=X>ut.high?X:ut.high,B=B<ut.Low?B:ut.low,Q+=ut.volume,void(Mt.next=36);case 36:ut=Mt.sent;case 37:Mt.next=3;break;case 39:case"end":return Mt.stop()}},K)})(),v.generator.next(),c.low.forEach(function(K,ut){var _t=v.generator.next({open:c.open[ut],high:c.high[ut],low:c.low[ut],close:c.close[ut],volume:c.volume[ut],timestamp:c.timestamp[ut]});_t.value&&(v.result.open.push(_t.value.open),v.result.high.push(_t.value.high),v.result.low.push(_t.value.low),v.result.close.push(_t.value.close),v.result.volume.push(_t.value.volume),v.result.timestamp.push(_t.value.timestamp))}),v}return ct(f,[{key:"nextValue",value:function(c){return console.error("Cannot calculate next value on Renko, Every value has to be recomputed for every change, use calcualte method"),null}}]),f}(T);function fr(p){T.reverseInputs(p);var E=new Er(p).result;return p.reversedInput&&(E.open.reverse(),E.high.reverse(),E.low.reverse(),E.close.reverse(),E.volume.reverse(),E.timestamp.reverse()),T.reverseInputs(p),E}Er.calculate=fr;var qi=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),(v=E.call(this,c)).result=new A;var U=null,j=0;return v.generator=tt.default.mark(function X(){var B,w,Q,K,ut,_t;return tt.default.wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:return void(ft.next=2);case 2:B=ft.sent,w=null;case 4:return null===U?w={open:U=(B.close+B.open)/2,high:B.high,low:B.low,close:j=(B.close+B.open+B.high+B.low)/4,volume:B.volume||0,timestamp:B.timestamp||0}:(Q=(B.close+B.open+B.high+B.low)/4,K=(U+j)/2,ut=Math.max(K,Q,B.high),_t=Math.min(B.low,K,Q),w={close:Q,open:K,high:ut,low:_t,volume:B.volume||0,timestamp:B.timestamp||0},j=Q,U=K),ft.next=8,w;case 8:B=ft.sent,ft.next=4;break;case 11:case"end":return ft.stop()}},X)})(),v.generator.next(),c.low.forEach(function(X,B){var w=v.generator.next({open:c.open[B],high:c.high[B],low:c.low[B],close:c.close[B],volume:c.volume?c.volume[B]:c.volume,timestamp:c.timestamp?c.timestamp[B]:c.timestamp});w.value&&(v.result.open.push(w.value.open),v.result.high.push(w.value.high),v.result.low.push(w.value.low),v.result.close.push(w.value.close),v.result.volume.push(w.value.volume),v.result.timestamp.push(w.value.timestamp))}),v}return ct(f,[{key:"nextValue",value:function(c){return this.generator.next(c).value}}]),f}(T);function Zi(p){T.reverseInputs(p);var E=new qi(p).result;return p.reversedInput&&(E.open.reverse(),E.high.reverse(),E.low.reverse(),E.close.reverse(),E.volume.reverse(),E.timestamp.reverse()),T.reverseInputs(p),E}qi.calculate=Zi;var Bt=function(){function p(){Et(this,p)}return ct(p,[{key:"approximateEqual",value:function(E,f){return 1*parseFloat(Math.abs(E-f).toPrecision(4))<=1*parseFloat((.001*E).toPrecision(4))}},{key:"logic",value:function(E){throw"this has to be implemented"}},{key:"getAllPatternIndex",value:function(E){var f=this;if(E.close.length<this.requiredCount)return console.warn("Data count less than data required for the strategy ",this.name),[];E.reversedInput&&(E.open.reverse(),E.high.reverse(),E.low.reverse(),E.close.reverse());var c=this.logic;return this._generateDataForCandleStick(E).map(function(v,U){return c.call(f,v)?U:void 0}).filter(function(v){return v})}},{key:"hasPattern",value:function(E){return E.close.length<this.requiredCount?(console.warn("Data count less than data required for the strategy ",this.name),!1):(E.reversedInput&&(E.open.reverse(),E.high.reverse(),E.low.reverse(),E.close.reverse()),this.logic.call(this,this._getLastDataForCandleStick(E)))}},{key:"_getLastDataForCandleStick",value:function(E){var f=this.requiredCount;if(E.close.length===f)return E;for(var c={open:[],high:[],low:[],close:[]},v=0,U=E.close.length-f;v<f;)c.open.push(E.open[U+v]),c.high.push(E.high[U+v]),c.low.push(E.low[U+v]),c.close.push(E.close[U+v]),v
1++;return c}},{key:"_generateDataForCandleStick",value:function(E){var f=this.requiredCount;return E.close.map(function(c,v){for(var U=0,P={open:[],high:[],low:[],close:[]};U<f;)P.open.push(E.open[v+U]),P.high.push(E.high[v+U]),P.low.push(E.low[v+U]),P.close.push(E.close[v+U]),U++;return P}).filter(function(c,v){return v<=E.close.length-f})}}]),p}(),En=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="MorningStar",c.requiredCount=3,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],P=c.low[0],j=c.high[1],X=c.low[1],B=c.open[2],w=c.close[2];return U<v&&P>X&&P>j&&j<P&&X<P&&B>j&&c.close[1]<B&&B<w&&w>(v+U)/2}}]),f}(Bt),Qi=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="BullishEngulfingPattern",c.requiredCount=2,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],P=c.open[1];return U<v&&v>P&&U>P&&v<c.close[1]}}]),f}(Bt),Cr=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).requiredCount=2,c.name="BullishHarami",c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],$=c.open[1];return v>$&&U<$&&U<c.close[1]&&v>c.low[1]&&c.high[0]>c.high[1]}}]),f}(Bt),Tr=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).requiredCount=2,c.name="BullishHaramiCross",c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],$=c.open[1],j=c.close[1],w=v>$&&U<$&&U<j&&v>c.low[1]&&c.high[0]>c.high[1],Q=this.approximateEqual($,j);return w&&Q}}]),f}(Bt),fn=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="Doji",c.requiredCount=1,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],P=c.high[0],$=c.low[0],j=this.approximateEqual(v,U),X=j&&this.approximateEqual(v,P),B=j&&this.approximateEqual(U,$);return j&&X==B}}]),f}(Bt),Oi=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="MorningDojiStar",c.requiredCount=3,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],P=c.low[0],$=c.open[1],j=c.close[1],X=c.high[1],B=c.low[1],w=c.open[2],Q=c.close[2],K=(v+U)/2,ut=U<v,_t=(new fn).hasPattern({open:[$],close:[j],high:[X],low:[B]});return ut&&_t&&w<Q&&X<P&&B<P&&w>X&&j<w&&Q>K}}]),f}(Bt),Hr=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).requiredCount=3,c.name="DownsideTasukiGap",c}return ct(f,[{key:"logic",value:function(c){var U=c.close[0],$=c.open[1],j=c.close[1],B=c.open[2],w=c.close[2];return U<c.open[0]&&j<$&&w>B&&c.high[1]<c.low[0]&&$>B&&j<B&&w>$&&w<U}}]),f}(Bt),tn=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="BullishMarubozu",c.requiredCount=1,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],P=c.high[0],$=c.low[0];return this.approximateEqual(U,P)&&this.approximateEqual($,v)&&v<U&&v<P}}]),f}(Bt),Gr=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).requiredCount=2,c.name="PiercingLine",c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],P=c.low[0],$=c.open[1],j=c.close[1];return c.low[1]<P&&U<v&&P>$&&j>(v+U)/2&&j>$}}]),f}(Bt),Yr=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="ThreeWhiteSoldiers",c.requiredCount=3,c}return ct(f,[{key:"logic",value:function(c){var U=c.close[0],P=c.high[0],$=c.open[1],j=c.close[1],X=c.high[1],B=c.open[2];return X>P&&c.high[2]>X&&c.open[0]<U&&$<j&&B<c.close[2]&&U>$&&$<P&&X>B&&B<j}}]),f}(Bt),li=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="BullishHammerStick",c.requiredCount=1,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],$=c.low[0],j=U>v;return(j=j&&this.approximateEqual(U,c.high[0]))&&U-v<=2*(v-$)}}]),f}(Bt);function Ue(p){return(new li).hasPattern(p)}var On=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="BullishInvertedHammerStick",c.requiredCount=1,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],P=c.high[0],j=U>v;return(j=j&&this.approximateEqual(v,c.low[0]))&&U-v<=2*(P-U)}}]),f}(Bt);function kn(p){return(new On).hasPattern(p)}var Wr=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="BearishHammerStick",c.requiredCount=1,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],$=c.low[0],j=v>U;return(j=j&&this.approximateEqual(v,c.high[0]))&&v-U<=2*(U-$)}}]),f}(Bt);function Fe(p){return(new Wr).hasPattern(p)}var Kr=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="BearishInvertedHammerStick",c.requiredCount=1,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],P=c.high[0],j=v>U;return(j=j&&this.approximateEqual(U,c.low[0]))&&v-U<=2*(P-v)}}]),f}(Bt);function Sr(p){return(new Kr).hasPattern(p)}var ui=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="HammerPattern",c.requiredCount=5,c}return ct(f,[{key:"logic",value:function(c){var v=this.downwardTrend(c);return(v=v&&this.includesHammer(c))&&this.hasConfirmation(c)}},{key:"downwardTrend",value:function(c){var U=arguments.length>
11&&void 0!==arguments[1]&&!arguments[1]?4:3,P=at({values:c.close.slice(0,U),period:U-1});return vt({values:c.close.slice(0,U),period:U-1})>P}},{key:"includesHammer",value:function(c){var v=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],U=v?3:4,P=v?4:void 0,$={open:c.open.slice(U,P),close:c.close.slice(U,P),low:c.low.slice(U,P),high:c.high.slice(U,P)},j=Fe($);return(j=(j=j||Sr($))||Ue($))||kn($)}},{key:"hasConfirmation",value:function(c){var P=c.close[4];return c.open[4]<P&&c.close[3]<P}}]),f}(Bt),Qn=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="HammerPatternUnconfirmed",c}return ct(f,[{key:"logic",value:function(c){return this.downwardTrend(c,!1)&&this.includesHammer(c,!1)}}]),f}(ui),zr=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="TweezerBottom",c.requiredCount=5,c}return ct(f,[{key:"logic",value:function(c){return this.downwardTrend(c)&&c.low[3]==c.low[4]}},{key:"downwardTrend",value:function(c){var v=at({values:c.close.slice(0,3),period:2});return vt({values:c.close.slice(0,3),period:2})>v}}]),f}(Bt),jr=[new Qi,new Hr,new Cr,new Tr,new Oi,new En,new tn,new Gr,new Yr,new li,new On,new ui,new Qn,new zr],Ae=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="Bullish Candlesticks",c}return ct(f,[{key:"hasPattern",value:function(c){return jr.reduce(function(v,U){var P=U.hasPattern(c);return v||P},!1)}}]),f}(Bt),_r=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="BearishEngulfingPattern",c.requiredCount=2,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],P=c.open[1];return U>v&&v<P&&U<P&&v>c.close[1]}}]),f}(Bt),Ar=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).requiredCount=2,c.name="BearishHarami",c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],$=c.open[1];return v<$&&U>$&&U>c.close[1]&&v<c.low[1]&&c.high[0]>c.high[1]}}]),f}(Bt),Zt=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).requiredCount=2,c.name="BearishHaramiCross",c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],$=c.open[1],j=c.close[1],w=v<$&&U>$&&U>j&&v<c.low[1]&&c.high[0]>c.high[1],Q=this.approximateEqual($,j);return w&&Q}}]),f}(Bt),Or=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="EveningDojiStar",c.requiredCount=3,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],P=c.high[0],$=c.open[1],j=c.close[1],X=c.high[1],B=c.low[1],w=c.open[2],Q=c.close[2],K=(v+U)/2,ut=U>v,_t=(new fn).hasPattern({open:[$],close:[j],high:[X],low:[B]});return ut&&_t&&X>P&&B>P&&w<B&&j>w&&w>Q&&Q<K}}]),f}(Bt),ii=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="EveningStar",c.requiredCount=3,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],P=c.high[0],j=c.high[1],X=c.low[1],B=c.open[2],w=c.close[2];return U>v&&P<X&&P<j&&j>P&&X>P&&B<X&&c.close[1]>B&&B>w&&w<(v+U)/2}}]),f}(Bt),Dt=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="BearishMarubozu",c.requiredCount=1,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],$=c.low[0];return this.approximateEqual(v,c.high[0])&&this.approximateEqual($,U)&&v>U&&v>$}}]),f}(Bt),jt=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="ThreeBlackCrows",c.requiredCount=3,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],$=c.open[1],j=c.close[1],X=c.low[1],B=c.open[2];return c.low[0]>X&&X>c.low[2]&&v>U&&$>j&&B>c.close[2]&&v>$&&$>U&&$>B&&B>j}}]),f}(Bt),Ji=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="HangingMan",c.requiredCount=5,c}return ct(f,[{key:"logic",value:function(c){var v=this.upwardTrend(c);return(v=v&&this.includesHammer(c))&&this.hasConfirmation(c)}},{key:"upwardTrend",value:function(c){var U=arguments.length>
11&&void 0!==arguments[1]&&!arguments[1]?4:3;return at({values:c.close.slice(0,U),period:U-1})>vt({values:c.close.slice(0,U),period:U-1})}},{key:"includesHammer",value:function(c){var v=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],U=v?3:4,P=v?4:void 0,$={open:c.open.slice(U,P),close:c.close.slice(U,P),low:c.low.slice(U,P),high:c.high.slice(U,P)};return Fe($)||Ue($)}},{key:"hasConfirmation",value:function(c){var P=c.close[4];return c.open[4]>P&&c.close[3]>P}}]),f}(Bt),br=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="HangingManUnconfirmed",c}return ct(f,[{key:"logic",value:function(c){return this.upwardTrend(c,!1)&&this.includesHammer(c,!1)}}]),f}(Ji),tr=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="ShootingStar",c.requiredCount=5,c}return ct(f,[{key:"logic",value:function(c){var v=this.upwardTrend(c);return(v=v&&this.includesHammer(c))&&this.hasConfirmation(c)}},{key:"upwardTrend",value:function(c){var U=arguments.length>
11&&void 0!==arguments[1]&&!arguments[1]?4:3;return at({values:c.close.slice(0,U),period:U-1})>vt({values:c.close.slice(0,U),period:U-1})}},{key:"includesHammer",value:function(c){var v=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],U=v?3:4,P=v?4:void 0,$={open:c.open.slice(U,P),close:c.close.slice(U,P),low:c.low.slice(U,P),high:c.high.slice(U,P)};return Sr($)||kn($)}},{key:"hasConfirmation",value:function(c){var P=c.close[4];return c.open[4]>P&&c.close[3]>P}}]),f}(Bt),bn=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="ShootingStarUnconfirmed",c}return ct(f,[{key:"logic",value:function(c){return this.upwardTrend(c,!1)&&this.includesHammer(c,!1)}}]),f}(tr),Lr=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="TweezerTop",c.requiredCount=5,c}return ct(f,[{key:"logic",value:function(c){return this.upwardTrend(c)&&c.high[3]==c.high[4]}},{key:"upwardTrend",value:function(c){return at({values:c.close.slice(0,3),period:2})>vt({values:c.close.slice(0,3),period:2})}}]),f}(Bt),Xr=[new _r,new Ar,new Zt,new Or,new ii,new Dt,new jt,new Wr,new Kr,new Ji,new br,new tr,new bn,new Lr],$r=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="Bearish Candlesticks",c}return ct(f,[{key:"hasPattern",value:function(c){return Xr.reduce(function(v,U){return v||U.hasPattern(c)},!1)}}]),f}(Bt),Sa=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="AbandonedBaby",c.requiredCount=3,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],P=c.low[0],$=c.open[1],j=c.close[1],X=c.high[1],B=c.low[1],w=c.open[2],Q=c.close[2],K=c.high[2],ut=c.low[2],_t=c.close[0]<v,ft=(new fn).hasPattern({open:[$],close:[j],high:[X],low:[B]});return _t&&ft&&X<P&&ut>X&&Q>w&&K<v}}]),f}(Bt),_a=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="DarkCloudCover",c.requiredCount=2,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],$=c.open[1],j=c.close[1];return U>v&&j<$&&$>c.high[0]&&j<(U+v)/2&&j>v}}]),f}(Bt),fi=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).requiredCount=1,c.name="DragonFlyDoji",c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],P=c.high[0],$=c.low[0],j=this.approximateEqual(v,U),X=j&&this.approximateEqual(v,P),B=j&&this.approximateEqual(U,$);return j&&X&&!B}}]),f}(Bt),Aa=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).requiredCount=1,c.name="GraveStoneDoji",c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],P=c.high[0],$=c.low[0],j=this.approximateEqual(v,U),X=j&&this.approximateEqual(v,P),B=j&&this.approximateEqual(U,$);return j&&B&&!X}}]),f}(Bt),Oa=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="BullishSpinningTop",c.requiredCount=1,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],U=c.close[0],P=c.high[0],$=c.low[0],j=Math.abs(U-v),X=Math.abs(P-U),B=Math.abs(v-$);return j<X&&j<B}}]),f}(Bt),qr=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.call(this)).name="BearishSpinningTop",c.requiredCount=1,c}return ct(f,[{key:"logic",value:function(c){var v=c.open[0],P=c.high[0],$=c.low[0],j=Math.abs(c.close[0]-v),X=Math.abs(P-v),B=Math.abs(P-$);return j<X&&j<B}}]),f}(Bt),er=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),(v=E.call(this,c)).result=[];var U=Object.assign({},{conversionPeriod:9,basePeriod:26,spanPeriod:52,displacement:26},c),P=new ce(2*U.conversionPeriod,!0,!0,!1),$=new ce(2*U.basePeriod,!0,!0,!1),j=new ce(2*U.spanPeriod,!0,!0,!1);return v.generator=tt.default.mark(function X(){var B,w,Q,K,ut,_t;return tt.default.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return Q=Math.max(U.conversionPeriod,U.basePeriod,U.spanPeriod,U.displacement),K=1,void(Ut.next=4);case 4:w=Ut.sent;case 5:return P.push(w.high),P.push(w.low),$.push(w.high),$.push(w.low),j.push(w.high),j.push(w.low),K<Q?K++:B={conversion:ut=(P.periodHigh+P.periodLow)/2,base
1:_t=($.periodHigh+$.periodLow)/2,spanA:(ut+_t)/2,spanB:(j.periodHigh+j.periodLow)/2},Ut.next=15,B;case 15:w=Ut.sent,Ut.next=5;break;case 18:case"end":return Ut.stop()}},X)})(),v.generator.next(),c.low.forEach(function(X,B){var w=v.generator.next({high:c.high[B],low:c.low[B]});w.value&&v.result.push(w.value)}),v}return ct(f,[{key:"nextValue",value:function(c){return this.generator.next(c).value}}]),f}(T);function ci(p){T.reverseInputs(p);var E=new er(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}er.calculate=ci;var Zr=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.apply(this,arguments)).maPeriod=20,c.atrPeriod=10,c.useSMA=!1,c.multiplier=1,c}return ct(f)}(D),bi=function(p){V(f,p);var E=dt(f);function f(){return Et(this,f),E.apply(this,arguments)}return ct(f)}(D),Ze=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U,P=new(c.useSMA?R:L)({period:c.maPeriod,values:[],format:function(j){return j}}),$=new Me({period:c.atrPeriod,high:[],low:[],close:[],format:function(j){return j}});return v.result=[],v.generator=tt.default.mark(function j(){var X,w,Q;return tt.default.wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return void(K.next=2);case 2:U=K.sent;case 3:return w=P.nextValue(U.close),Q=$.nextValue(U),null!=w&&null!=Q&&(X={middle:w,upper:w+c.multiplier*Q,lower:w-c.multiplier*Q}),K.next=10,X;case 10:U=K.sent,K.next=3;break;case 13:case"end":return K.stop()}},j)})(),v.generator.next(),c.high.forEach(function(j,X){var w=v.generator.next({high:j,low:c.low[X],close:c.close[X]});null!=w.value&&v.result.push(w.value)}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(null!=v.value)return v.value}}]),f}(T);function Ci(p){T.reverseInputs(p);var E=new Ze(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Ze.calculate=Ci;var Qr=function(p){V(f,p);var E=dt(f);function f(){var c;return Et(this,f),(c=E.apply(this,arguments)).period=22,c.multiplier=3,c}return ct(f)}(D),h=function(p){V(f,p);var E=dt(f);function f(){return Et(this,f),E.apply(this,arguments)}return ct(f)}(D),Yt=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),v=E.call(this,c);var U=c.high,P=c.low,$=c.close;v.result=[];var j=new Me({period:c.period,high:[],low:[],close:[],format:function(B){return B}}),X=new ce(2*c.period,!0,!0,!1);return v.generator=tt.default.mark(function B(){var w,Q,K,ut,_t,ft;return tt.default.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:return void(bt.next=2);case 2:Q=bt.sent;case 3:return _t=(ut=Q).high,ft=ut.low,X.push(_t),X.push(ft),K=j.nextValue(Q),X.totalPushed>=2*c.period&&null!=K&&(w={exitLong:X.periodHigh-K*c.multiplier,exitShort:X.periodLow+K*c.multiplier}),bt.next=11,w;case 11:Q=bt.sent,bt.next=3;break;case 14:case"end":return bt.stop()}},B)})(),v.generator.next(),U.forEach(function(B,w){var K=v.generator.next({high:B,low:P[w],close:$[w]});null!=K.value&&v.result.push(K.value)}),v}return ct(f,[{key:"nextValue",value:function(c){var v=this.generator.next(c);if(null!=v.value)return v.value}}]),f}(T);function Le(p){T.reverseInputs(p);var E=new Yt(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Yt.calculate=Le;var Jr=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),(v=E.call(this,c)).lineA=c.lineA,v.lineB=c.lineB;var U=[],P=[],$=tt.default.mark(function j(){var X,B,w;return tt.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return void(Q.next=2);case 2:X=Q.sent,B=!1;case 4:for(U.unshift(X.valueA),P.unshift(X.valueB),B=X.valueA>X.valueB,w=1;!0===B&&U[w]>=P[w];)U[w]>P[w]?B=!1:U[w]<P[w]?B=!0:U[w]===P[w]&&(w+=1);return!0===B&&(U=[X.valueA],P=[X.valueB]),Q.next=13,B;case 13:X=Q.sent,Q.next=4;break;case 16:case"end":return Q.stop()}},j)});return v.generator=$(),v.generator.next(),v.result=[],v.lineA.forEach(function(j,X){var B=v.generator.next({valueA:v.lineA[X],valueB:v.lineB[X]});void 0!==B.value&&v.result.push(B.value)}),v}return ct(f,[{key:"nextValue",value:function(c,v){return this.generator.next({valueA:c,valueB:v}).value}}],[{key:"reverseInputs",value:function(c){c.reversedInput&&(c.lineA&&c.lineA.reverse(),c.lineB&&c.lineB.reverse())}}]),f}(T);function me(p){T.reverseInputs(p);var E=new Jr(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}Jr.calculate=me;var $e=function(p){V(f,p);var E=dt(f);function f(c){var v;Et(this,f),(v=E.call(this,c)).lineA=c.lineA,v.lineB=c.lineB;var U=[],P=[],$=tt.default.mark(function j(){var X,B,w;return tt.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return void(Q.next=2);case 2:X=Q.sent,B=!1;case 4:for(U.unshift(X.valueA),P.unshift(X.valueB),B=X.valueA<X.valueB,w=1;!0===B&&U[w]<=P[w];)U[w]<P[w]?B=!1:U[w]>P[w]?B=!0:U[w]===P[w]&&(w+=1);return!0===B&&(U=[X.valueA],P=[X.valueB]),Q.next=13,B;case 13:X=Q.sent,Q.next=4;break;case 16:case"end":return Q.stop()}},j)});return v.generator=$(),v.generator.next(),v.result=[],v.lineA.forEach(function(j,X){var B=v.generator.next({valueA:v.lineA[X],valueB:v.lineB[X]});void 0!==B.value&&v.result.push(B.value)}),v}return ct(f,[{key:"nextValue",value:function(c,v){return this.generator.next({valueA:c,valueB:v}).value}}],[{key:"reverseInputs",value:function(c){c.reversedInput&&(c.lineA&&c.lineA.reverse(),c.lineB&&c.lineB.reverse())}}]),f}(T);function Ot(p){T.reverseInputs(p);var E=new $e(p).result;return p.reversedInput&&E.reverse(),T.reverseInputs(p),E}function ri(){var p=[];return p.push("sma"),p.push("ema"),p.push("wma"),p.push("wema"),p.push("macd"),p.push("rsi"),p.push("bollingerbands"),p.push("adx"),p.push("atr"),p.push("truerange"),p.push("roc"),p.push("kst"),p.push("psar"),p.push("stochastic"),p.push("williamsr"),p.push("adl"),p.push("obv"),p.push("trix"),p.push("cci"),p.push("awesomeoscillator"),p.push("forceindex"),p.push("vwap"),p.push("volumeprofile"),p.push("renko"),p.push("heikinashi"),p.push("stochasticrsi"),p.push("mfi"),p.push("averagegain"),p.push("averageloss"),p.push("highe
1st"),p.push("lowest"),p.push("sum"),p.push("FixedSizeLinkedList"),p.push("sd"),p.push("bullish"),p.push("bearish"),p.push("abandonedbaby"),p.push("doji"),p.push("bearishengulfingpattern"),p.push("bullishengulfingpattern"),p.push("darkcloudcover"),p.push("downsidetasukigap"),p.push("dragonflydoji"),p.push("gravestonedoji"),p.push("bullishharami"),p.push("bearishharami"),p.push("bullishharamicross"),p.push("bearishharamicross"),p.push("eveningdojistar"),p.push("eveningstar"),p.push("morningdojistar"),p.push("morningstar"),p.push("bullishmarubozu"),p.push("bearishmarubozu"),p.push("piercingline"),p.push("bullishspinningtop"),p.push("bearishspinningtop"),p.push("threeblackcrows"),p.push("threewhitesoldiers"),p.push("bullishhammerstick"),p.push("bearishhammerstick"),p.push("bullishinvertedhammerstick"),p.push("bearishinvertedhammerstick"),p.push("hammerpattern"),p.push("hammerpatternunconfirmed"),p.push("hangingman"),p.push("hangingmanunconfirmed"),p.push("shootingstar"),p.push("shootingstarunconfirmed"),p.push("tweezertop"),p.push("tweezerbottom"),p.push("ichimokucloud"),p.push("keltnerchannels"),p.push("chandelierexit"),p.push("crossup"),p.push("crossdown"),p.push("crossover"),p}$e.calculate=Ot;var de=ri();ot.getAvailableIndicators=ri,ot.AvailableIndicators=de,ot.FixedSizeLinkedList=ce,ot.CandleData=m,ot.CandleList=A,ot.sma=y,ot.SMA=R,ot.ema=H,ot.EMA=L,ot.wma=J,ot.WMA=G,ot.wema=nt,ot.WEMA=Z,ot.macd=z,ot.MACD=W,ot.rsi=St,ot.RSI=Nt,ot.bollingerbands=$t,ot.BollingerBands=xt,ot.adx=pn,ot.ADX=Xe,ot.atr=Vn,ot.ATR=Me,ot.truerange=Oe,ot.TrueRange=ge,ot.roc=un,ot.ROC=Gt,ot.kst=Dn,ot.KST=rn,ot.psar=se,ot.PSAR=Pe,ot.stochastic=an,ot.Stochastic=Qt,ot.williamsr=Nn,ot.WilliamsR=Rn,ot.adl=yn,ot.ADL=Bn,ot.obv=Ai,ot.OBV=ni,ot.trix=pi,ot.TRIX=Zn,ot.forceindex=yi,ot.ForceIndex=Ii,ot.cci=pe,ot.CCI=ji,ot.awesomeoscillator=Mi,ot.AwesomeOscillator=xe,ot.vwap=ht,ot.VWAP=hr,ot.volumeprofile=Xi,ot.VolumeProfile=Pi,ot.mfi=In,ot.MFI=vr,ot.stochasticrsi=xi,ot.StochasticRSI=cn,ot.averagegain=at,ot.AverageGain=q,ot.averageloss=vt,ot.AverageLoss=st,ot.sd=Vt,ot.SD=Ft,ot.highest=$i,ot.Highest=Ei,ot.lowest=kr,ot.Lowest=mr,ot.sum=Ir,ot.Sum=pr,ot.renko=fr,ot.HeikinAshi=qi,ot.heikinashi=Zi,ot.bullish=function(p){return(new Ae).hasPattern(p)},ot.bearish=function(p){return(new $r).hasPattern(p)},ot.abandonedbaby=function(p){return(new Sa).hasPattern(p)},ot.doji=function(p){return(new fn).hasPattern(p)},ot.bearishengulfingpattern=function(p){return(new _r).hasPattern(p)},ot.bullishengulfingpattern=function(p){return(new Qi).hasPattern(p)},ot.darkcloudcover=function(p){return(new _a).hasPattern(p)},ot.downsidetasukigap=function(p){return(new Hr).hasPattern(p)},ot.dragonflydoji=function(p){return(new fi).hasPattern(p)},ot.gravestonedoji=function(p){return(new Aa).hasPattern(p)},ot.bullishharami=function(p){return(new Cr).hasPattern(p)},ot.bearishharami=function(p){return(new Ar).hasPattern(p)},ot.bullishharamicross=function(p){return(new Tr).hasPattern(p)},ot.bearishharamicross=function(p){return(new Zt).hasPattern(p)},ot.eveningdojistar=function(p){return(new Or).hasPattern(p)},ot.eveningstar=function(p){return(new ii).hasPattern(p)},ot.morningdojistar=function(p){return(new Oi).hasPattern(p)},ot.morningstar=function(p){return(new En).hasPattern(p)},ot.bullishmarubozu=function(p){return(new tn).hasPattern(p)},ot.bearishmarubozu=function(p){return(new Dt).hasPattern(p)},ot.piercingline=function(p){return(new Gr).hasPattern(p)},ot.bullishspinningtop=function(p){return(new Oa).hasPattern(p)},ot.bearishspinningtop=function(p){return(new qr).hasPattern(p)},ot.threeblackcrows=function(p){return(new jt).hasPattern(p)},ot.threewhitesoldiers=function(p){return(new Yr).hasPattern(p)},ot.bullishhammerstick=Ue,ot.bearishhammerstick=Fe,ot.bullishinvertedhammerstick=kn,ot.bearishinvertedhammerstick=Sr,ot.hammerpattern=function(p){return(new ui).hasPattern(p)},ot.hammerpatternunconfirmed=function(p){return(new Qn).hasPattern(p)},ot.hangingman=function(p){return(new Ji).hasPattern(p)},ot.hangingmanunconfirmed=function(p){return(new br).hasPattern(p)},ot.shootingstar=function(p){return(new tr).hasPattern(p)},ot.shootingstarunconfirmed=function(p){return(new bn).hasPattern(p)},ot.tweezertop=function(p){return(new Lr).hasPattern(p)},ot.tweezerbottom=function(p){return(new zr).hasPattern(p)},ot.fibonacciretracement=function(p,E){return[0,23.6,38.2,50,61.8,78.6,100,127.2,161.8,261.8,423.6].map(p<E?function(c){var v=E-Math.abs(p-E)*c/100;return v>0?v:0}:function(c){var v=E+Math.abs(p-E)*c/100;return v>0?v:0}
1)},ot.ichimokucloud=ci,ot.IchimokuCloud=er,ot.keltnerchannels=Ci,ot.KeltnerChannels=Ze,ot.KeltnerChannelsInput=Zr,ot.KeltnerChannelsOutput=bi,ot.chandelierexit=Le,ot.ChandelierExit=Yt,ot.ChandelierExitInput=Qr,ot.ChandelierExitOutput=h,ot.crossUp=me,ot.CrossUp=Jr,ot.crossDown=Ot,ot.CrossDown=$e,ot.setConfig=function(p,E){_[p]=E},ot.getConfig=O},616:At=>{"use strict";function ot(F){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(lt){return typeof lt}:function(lt){return lt&&"function"==typeof Symbol&&lt.constructor===Symbol&&lt!==Symbol.prototype?"symbol":typeof lt})(F)}function ee(F){return F&&"[object Function]"==={}.toString.call(F)}function wt(F){return"object"===ot(F)&&null!==F}function It(F){var lt=Math.floor(Number(String(F||"")));return lt!==1/0&&lt===F&&lt>0}function tt(F){return null!=F&&"boolean"==typeof F}var Pt={abs:function(F){if(!Array.isArray(F))throw new TypeError("abs()::invalid input argument. Must provide an array.");for(var lt,b=F.length,V=0;V<b;V++)(lt=F[V])<0?F[V]=-lt:0===lt&&(F[V]=0)},add:function(F,lt){var b,V,kt=Array.isArray(lt);if(!Array.isArray(F))throw new TypeError("add()::invalid input argument. Must provide an array.");if(b=F.length,!kt&&("number"!=typeof lt||lt!=lt))throw new TypeError("add()::invalid input argument. Second argument must be either an array or a scalar.");if(kt){if(b!==lt.length)throw new Error("add()::invalid input argument. Arrays must be of equal length.");for(V=0;V<b;V++)F[V]+=lt[V]}else for(V=0;V<b;V++)F[V]+=lt},divide:function(F,lt){var b,V,kt=Array.isArray(lt);if(!Array.isArray(F))throw new TypeError("divide()::invalid input argument. Must provide an array.");if(b=F.length,!kt&&("number"!=typeof lt||lt!=lt))throw new TypeError("divide()::invalid input argument. Second argument must be either an array or a scalar.");if(kt){if(b!==lt.length)throw new Error("divide()::invalid input argument. Arrays must be of equal length.");for(V=0;V<b;V++)F[V]/=lt[V]}else for(V=0;V<b;V++)F[V]/=lt},mean:function(F){if(!Array.isArray(F))throw new TypeError("mean()::invalid input argument. Must provide an array.");for(var lt=F.length,b=0,V=0,kt=0;kt<lt;kt++)V+=(F[kt]-V)/(b+=1);return V},mmax:function(F,lt){if(!Array.isArray(F))throw new TypeError("mmax()::invalid input argument. Must provide an array.");if("number"!=typeof lt||lt!=lt)throw new TypeError("mmax()::invalid input argument. Window must be numeric.");if(Math.floor(lt)!==lt||lt<1)throw new TypeError("mmax()::invalid input argument. Window must be a positive integer.");if(lt>F.length)throw new TypeError("mmax()::invalid input argument. Window cannot exceed array length.");var b,V,kt,dt,pt,yt=F.length,Ht=new Array(yt-lt+1),ct=F[0];for(V=1;V<lt;V++)(b=F[V])>ct&&(ct=b);for(Ht[0]=ct,kt=lt;kt<yt;kt++){if(dt=kt-lt,(b=F[kt])>ct)ct=b;else if(F[dt]===ct&&b<ct)for(ct=F[dt+1],pt=dt+2;pt<=kt;pt++)(b=F[pt])>ct&&(ct=b);Ht[dt+1]=ct}return Ht},mmean:function(F,lt,b){var V,kt=!0;if(!Array.isArray(F))throw new TypeError("mmean()::invalid input argument. Must provide an array. Value: `"+F+"`.");if(!It(lt))throw new TypeError("mmean()::invalid input argument. Window must be a positive integer. Value: `"+lt+"`.");if(arguments.length>2){if(!wt(b))throw new TypeError("mmean()::invalid input argument. Options must be an object. Value: `"+b+"`.");if(b.hasOwnProperty("accessor")&&!ee(V=b.accessor))throw new TypeError("mmean()::invalid option. Accessor option must be a function. Value: `"+V+"`.");if(b.hasOwnProperty("copy")&&!tt(kt=b.copy))throw new TypeError("mmean()::invalid option. Copy option must be a boolean primitive. Value: `"+kt+"`.")}if(lt>F.length)throw new Error("mmean()::invalid input argument. Window cannot exceed the array length.");var dt,pt=F.length,yt=0,Ht=0;if(kt&&!V){pt=pt-lt+1,dt=new Array(pt);for(var ct=0;ct<lt;ct++)yt+=(F[ct]-yt)/(ct+1);dt[0]=yt;for(var Et=0;Et<pt-1;Et++)dt[Et+1]=yt+=(F[Et+lt]-F[Et])/lt;return dt}if(V)if(kt){dt=new Array(pt);for(var Be=0;Be<pt;Be++)dt[Be]=V(F[Be])}else{dt=F;for(var Ee=0;Ee<pt;Ee++)dt[Ee]=V(F[Ee])}else dt=F;pt=pt-lt+1;for(var ce=0;ce<lt;ce++)yt+=(dt[ce]-yt)/(ce+1);Ht=dt[0],dt[0]=yt;for(var m=1;m<pt;m++)yt+=(dt[m+lt-1]-Ht)/lt,Ht=dt[m],dt[m]=yt;return dt.length=pt,dt},mmin:function(F,lt){if(!Array.isArray(F))throw new TypeError("mmin()::invalid input argument. Must provide an array.");if("number"!=typeof lt||lt!=lt)throw new TypeError("mmin()::invalid input argument. Window must be numeric.");if(Math.floor(lt)!==lt||lt<1)throw new TypeError("mmin()::invalid input argument. Window must be a positive integer.");if(lt>F.length)throw new TypeError("mmin()::invalid input argument. Window cannot exceed array length.");var b,V,kt,dt,pt,yt=F.length,Ht=new Array(yt-lt+1),ct=F[0];for(V=1;V<lt;
1V++)(b=F[V])<ct&&(ct=b);for(Ht[0]=ct,kt=lt;kt<yt;kt++){if(dt=kt-lt,(b=F[kt])<ct)ct=b;else if(F[dt]===ct&&b>ct)for(ct=F[dt+1],pt=dt+2;pt<=kt;pt++)(b=F[pt])<ct&&(ct=b);Ht[dt+1]=ct}return Ht},mstdev:function(F,lt){if(!Array.isArray(F))throw new TypeError("mstdev()::invalid input argument. Must provide an array.");if("number"!=typeof lt||lt!=lt)throw new TypeError("mstdev()::invalid input argument. Window must be numeric.");if(lt%1!=0||lt<1)throw new TypeError("mstdev()::invalid input argument. Window must be a positive integer.");if(lt>F.length)throw new TypeError("mstdev()::invalid input argument. Window cannot exceed the array length.");var b,V,kt,dt,pt,yt=F.length,Ht=new Array(yt-lt+1),ct=lt-1,Et=0,Be=0;if(1===lt){for(dt=0;dt<Ht.length;dt++)Ht[dt]=0;return Ht}for(dt=0;dt<lt;dt++)Be+=(b=(V=F[dt])-Et)*(V-(Et+=b/(dt+1)));for(Ht[0]=Math.sqrt(Be/ct),pt=lt;pt<yt;pt++)V=F[dt=pt-lt],Be+=(b=(kt=F[pt])-V)*(V-Et+(kt-(Et+=b/lt))),Ht[dt+1]=Math.sqrt(Be/ct);return Ht},msum:function(F,lt,b){var V,kt,dt,pt,yt,Ht,ct=!0;if(!Array.isArray(F))throw new TypeError("msum()::invalid input argument. Must provide an array. Value: `"+F+"`.");if(!It(lt))throw new TypeError("msum()::invalid input argument. Window must be a positive integer. Value: `"+lt+"`.");if(arguments.length>2){if(!wt(b))throw new TypeError("msum()::invalid input argument. Options must be an object. Value: `"+b+"`.");if(b.hasOwnProperty("accessor")&&!ee(V=b.accessor))throw new TypeError("msum()::invalid option. Accessor option must be a function. Value: `"+V+"`.");if(b.hasOwnProperty("copy")&&!tt(ct=b.copy))throw new TypeError("msum()::invalid option. Copy option must be a boolean primitive. Value: `"+ct+"`.")}if(lt>F.length)throw new Error("msum()::invalid input argument. Window cannot exceed the array length.");if(kt=F.length,dt=0,ct&&!V){for(kt=kt-lt+1,yt=new Array(kt),Ht=0;Ht<lt;Ht++)dt+=F[Ht];for(yt[0]=dt,Ht=0;Ht<kt-1;Ht++)yt[Ht+1]=dt+=F[Ht+lt]-F[Ht];return yt}if(V)if(ct)for(yt=new Array(kt),Ht=0;Ht<kt;Ht++)yt[Ht]=V(F[Ht]);else for(yt=F,Ht=0;Ht<kt;Ht++)yt[Ht]=V(F[Ht]);else yt=F;for(kt=kt-lt+1,Ht=0;Ht<lt;Ht++)dt+=yt[Ht];for(pt=yt[0],yt[0]=dt,Ht=1;Ht<kt;Ht++)dt+=yt[Ht+lt-1]-pt,pt=yt[Ht],yt[Ht]=dt;return yt.length=kt,yt},multiply:function(F,lt){var b,V,kt=Array.isArray(lt);if(!Array.isArray(F))throw new TypeError("multiply()::invalid input argument. Must provide an array.");if(b=F.length,!kt&&("number"!=typeof lt||lt!=lt))throw new TypeError("multiply()::invalid input argument. Second argument must be either an array or a scalar.");if(kt){if(b!==lt.length)throw new Error("multiply()::invalid input argument. Arrays must be of equal length.");for(V=0;V<b;V++)F[V]*=lt[V]}else for(V=0;V<b;V++)F[V]*=lt},stdev:function(F){if(!Array.isArray(F))throw new TypeError("stdev()::invalid input argument. Must provide an array.");var lt=F.length,b=0,V=0,kt=0,dt=0;if(lt<2)return 0;for(var pt=0;pt<lt;pt++)V+=(dt=F[pt]-V)/(b+=1),kt+=dt*(F[pt]-V);return Math.sqrt(kt/(b-1))},subtract:function(F,lt){var b,V,kt=Array.isArray(lt);if(!Array.isArray(F))throw new TypeError("subtract()::invalid input argument. Must provide an array.");if(b=F.length,!kt&&("number"!=typeof lt||lt!=lt))throw new TypeError("subtract()::invalid input argument. Second argument must be either an array or a scalar.");if(kt){if(b!==lt.length)throw new Error("subtract()::invalid input argument. Arrays must be of equal length.");for(V=0;V<b;V++)F[V]-=lt[V]}else for(V=0;V<b;V++)F[V]-=lt},sum:function(F,lt){if(!Array.isArray(F))throw new TypeError("sum()::invalid input argument. Must provide an array. Value: `"+F+"`.");if(arguments.length>1&&"function"!=typeof lt)throw new TypeError("sum()::invalid input argument. Accessor must be a function. Value: `"+lt+"`.");var b,V=F.length,kt=0;if(!V)return null;if(lt)for(b=0;b<V;b++)kt+=lt(F[b]);else for(b=0;b<V;b++)kt+=F[b];return kt}};At.exports=Pt},825:At=>{"use strict";At.exports=r}},ei={};function qt(At){var ot=ei[At];if(void 0!==ot)return ot.exports;var ee=ei[At]={id:At,loaded:!1,exports:{}};return Fn[At](ee,ee.exports,qt),ee.loaded=!0,ee.exports}return qt.nmd=At=>(At.paths=[],At.children||(At.children=[]),At),qt(616),qt(417)})(),cr.exports=Fn(qe(27248))},27248(cr){var dr=function(){"use strict";function qe(tt,Pt){return null!=Pt&&tt instanceof Pt}var r,Fn,ei;try{r=Map}catch{r=function(){}}try{Fn=Set}catch{Fn=function(){}}try{ei=Promise}catch{ei=function(){}}function qt(tt,Pt,F,lt,b){"object"==typeof Pt&&(F=Pt.depth,lt=Pt.prototype,b=Pt.includeNonEnumerable,Pt=Pt.circular);var V=[],kt=[],dt=typeof Buffer<"u";return typeof Pt>"u"&&(Pt=!0),typeof F>"u"&&(F=1/0),function pt(yt,Ht){if(null===yt)return null;if(0===Ht)return yt;var ct,Et;if("object"!=typeof yt)return yt;if(qe(yt,r))ct=new r;
1else if(qe(yt,Fn))ct=new Fn;else if(qe(yt,ei))ct=new ei(function(D,T){yt.then(function(R){D(pt(R,Ht-1))},function(R){T(pt(R,Ht-1))})});else if(qt.__isArray(yt))ct=[];else if(qt.__isRegExp(yt))ct=new RegExp(yt.source,It(yt)),yt.lastIndex&&(ct.lastIndex=yt.lastIndex);else if(qt.__isDate(yt))ct=new Date(yt.getTime());else{if(dt&&Buffer.isBuffer(yt))return ct=Buffer.allocUnsafe?Buffer.allocUnsafe(yt.length):new Buffer(yt.length),yt.copy(ct),ct;qe(yt,Error)?ct=Object.create(yt):typeof lt>"u"?(Et=Object.getPrototypeOf(yt),ct=Object.create(Et)):(ct=Object.create(lt),Et=lt)}if(Pt){var Be=V.indexOf(yt);if(-1!=Be)return kt[Be];V.push(yt),kt.push(ct)}for(var Ee in qe(yt,r)&&yt.forEach(function(D,T){var R=pt(T,Ht-1),y=pt(D,Ht-1);ct.set(R,y)}),qe(yt,Fn)&&yt.forEach(function(D){var T=pt(D,Ht-1);ct.add(T)}),yt){var ce;Et&&(ce=Object.getOwnPropertyDescriptor(Et,Ee)),(!ce||null!=ce.set)&&(ct[Ee]=pt(yt[Ee],Ht-1))}if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(yt);for(Ee=0;Ee<m.length;Ee++){var A=m[Ee];(_=Object.getOwnPropertyDescriptor(yt,A))&&!_.enumerable&&!b||(ct[A]=pt(yt[A],Ht-1),_.enumerable||Object.defineProperty(ct,A,{enumerable:!1}))}}if(b){var O=Object.getOwnPropertyNames(yt);for(Ee=0;Ee<O.length;Ee++){var _,M=O[Ee];(_=Object.getOwnPropertyDescriptor(yt,M))&&_.enumerable||(ct[M]=pt(yt[M],Ht-1),Object.defineProperty(ct,M,{enumerable:!1}))}}return ct}(tt,F)}function At(tt){return Object.prototype.toString.call(tt)}function It(tt){var Pt="";return tt.global&&(Pt+="g"),tt.ignoreCase&&(Pt+="i"),tt.multiline&&(Pt+="m"),Pt}return qt.clonePrototype=function(Pt){if(null===Pt)return null;var F=function(){};return F.prototype=Pt,new F},qt.__objToStr=At,qt.__isDate=function ot(tt){return"object"==typeof tt&&"[object Date]"===At(tt)},qt.__isArray=function ee(tt){return"object"==typeof tt&&"[object Array]"===At(tt)},qt.__isRegExp=function wt(tt){return"object"==typeof tt&&"[object RegExp]"===At(tt)},qt.__getRegExpFlags=It,qt}();cr.exports&&(cr.exports=dr)},61039(cr,dr,qe){"use strict";qe.r(dr),qe.d(dr,{ABS_POS_WRAPPER_CLASSES:()=>Xa,AnnotationType:()=>jt,AxisType:()=>se,BASELINE_COLOR:()=>Zi,BID_DATA_TYPE_CLASSIFICATION:()=>os,BooleanRepresentation:()=>yi,CHART_FIELDS_FORMAT_MAPPING:()=>Ga,CHART_GLOBAL_RELOAD_DATA_PARAMS:()=>oe,CHART_GLOBAL_SAVE_BLACKLIST:()=>ge,CHART_GLOBAL_USER_PARAMS:()=>ae,CHART_INSTRUMENT_RELOAD_DATA_PARAMS:()=>Xe,CHART_INSTRUMENT_SYMBOL_FIELDS:()=>pn,CHART_INSTRUMENT_USER_PARAMS:()=>Oe,COLLAPSABLE:()=>En,CONTRAST_COLOR:()=>$i,CandlestickChartTypes:()=>Me,ChartCache:()=>xs,ChartColor:()=>Bt,ChartCurrency:()=>ii,ChartData:()=>Jn,ChartDataStatus:()=>sn,ChartDataType:()=>Xt,ChartDropDown:()=>ui,ChartEvents:()=>pu,ChartInstrument:()=>ga,ChartInstrumentList:()=>ao,ChartMenuElementCreator:()=>Di,ChartPeriod:()=>ot,ChartResolution:()=>ei,ChartSearch:()=>Fs,ChartStorage:()=>so,ChartTemplateType:()=>V,ChartTemplates:()=>ro,ChartTimeSeries:()=>Nr,ChartType:()=>wt,ChartWidget:()=>mu,ChartWidgetConstants:()=>ht,ChartWidgetOptions:()=>Xr,CompanyEventType:()=>an,CompanyHistory:()=>ls,Crossrates:()=>Ws,Currency:()=>Zt,CurrencyToIconTranslation:()=>Or,CurrencyType:()=>It,CursorType:()=>Nn,Custom:()=>Us,CustomInstrument:()=>$r,DEFAULT_CHART_FIELDS:()=>Ul,DEFAULT_HIGH_COLOR:()=>fr,DEFAULT_INDICATOR_COLOR:()=>Ir,DEFAULT_LOW_COLOR:()=>qi,DEFAULT_PREV_CLOSE_COLOR:()=>Er,DROPDOWN_CLASSES:()=>za,DataTypeBidAsk:()=>ys,DataTypePerformance:()=>Ms,Decimals:()=>hs,DecimalsGlobalChartSettingsAbsKey:()=>Wn,DecimalsGlobalChartSettingsCallbackKey:()=>on,DecimalsGlobalChartSettingsKey:()=>Pn,DecimalsGlobalChartSettingsPctKey:()=>Gn,DecimalsType:()=>Cn,DropDownPosition:()=>li,FIELD_FALLBACK_KEY:()=>Ha,Feed:()=>La,FieldNameMapping:()=>ho,FinancialCalendar:()=>Ys,GENERAL_CLASSES:()=>Wa,GROUP_TAG:()=>"group_",GridType:()=>Rn,GroupedChartDropDown:()=>Qn,HighchartsFormatter:()=>ze,HighchartsSeriesType:()=>ee,HighchartsTooltip:()=>Ce,HistoricalPeriod:()=>At,HistoricalResolution:()=>Pt,ITEM_CLASSES:()=>Si,Icon:()=>Ae,IndicatorType:()=>Dt,InstrumentHeader:()=>oo,IntradayPeriod:()=>qt,IntradayResolution:()=>tt,IntradaySupportType:()=>b,LegendItemClickType:()=>Bn,LogoPosition:()=>Ai,LogoType:()=>ni,MAX_COMPARE_INSTRUMENT_STORAGE_LIMIT:()=>hu,MenuClass:()=>Ue,MenuClassList:()=>zr,NEGATIVE_COLOR:()=>cn,NEGATIVE_COLOR_OLD:()=>vr,NEUTRAL_COLOR:()=>xi,NewCompareDropDown:()=>$a,NewCompareDropDownOptions:()=>Ar,NewCompareDropDownUserOptions:()=>_r,OhlcChartTypes:()=>Vn,OrdinateScaling:()=>Pe,OrdinateType:()=>Dn,POSITIVE_COLOR:()=>In,POSITIVE_COLOR_OLD:()=>gr,Period:()=>lt,PrevCloseType:()=>Zn,QuoteType:()=>un,RESULT_CONTANER_CLASSES:()=>ja,ROW_CLASSES:()=>Ka,Resolution:()=>F,SEPARATOR_CLASSES:()=>xr,SecondaryColorType:()=>pi,SelectableDataType:()=>Gt,SeparatorMenuClassList:()=>jr,SeriesTypePrefix:()=>Qt,StateFalseyClassModifier:()=>Xi,StateTruthyClassModifier:()=>Pi,Symbol:()=>Pa,SymbolBaseType:()=>Ii,ToggleMenu:()=>pe,Trades:()=>Ro,UNDEFINED_COLOR_LIST:()=>Ei,UNGROUPED_KEY:()=>Iu,UserParamsNavigationItem:()=>xe,VolumeType:()=>rn,WatermarkType:()=>yn,isCompareInstrument:()=>Ya,isCompareSeparator:()=>Ki,isOfTypeChartMenuItem:()=>Mi,isOfTypeChartMenuSeparator:()=>hr,isOfTypeSelectableItem:()=>Qi,isOfTypeSelectableOptionFolder:()=>Tr,isOfTypeSelectableOptions:()=>Cr,isSelectableNewCompareFolder:()=>co,isSelectableNewCompareInstrument:()=>uo});var ei,qt,At,a,r=qe(50029),Fn=qe(47803);(a=ei||(ei={}))[a.TICKS=0]="TICKS",a[a.SECONDS=1]="SECONDS",a[a.MINUTES=2]="MINUTES",a[a.DAYS=3]="DAYS",a[a.WEEKS=4]="WEEKS",a[a.MONTHS=5]="MONTHS",a[a.AUTO=6]="AUTO",function(a){a[a.SECOND=1]="SECOND",a[a.ONE_DAY=2]="ONE_DAY",a[a.PERIOD_24H=3]="PERIOD_24H",a[a.TWO_DAYS=4]="TWO_DAYS",a[a.THREE_DAYS=5]="THREE_DAYS",a[a.FIVE_DAYS=6]="FIVE_DAYS",a[a.TEN_DAYS=7]="TEN_DAYS",a[a.THIRTY_DAYS=8]="THIRTY_DAYS",a[a.NINETY_DAYS=9]="NINETY_DAYS"}(qt||(qt={})),function(a){a[a.ONE_WEEK=1e3]="ONE_WEEK",a[a.ONE_MONTH=1001]="ONE_MONTH",a[a.THREE_MONTHS=1002]="THREE_MONTHS",a[a.S
1IX_MONTHS=1003]="SIX_MONTHS",a[a.NINE_MONTHS=1004]="NINE_MONTHS",a[a.ONE_YEAR=1005]="ONE_YEAR",a[a.TWO_YEARS=1006]="TWO_YEARS",a[a.THREE_YEARS=1007]="THREE_YEARS",a[a.FIVE_YEARS=1008]="FIVE_YEARS",a[a.TEN_YEARS=1009]="TEN_YEARS",a[a.LYTD=1010]="LYTD",a[a.YTD=1011]="YTD",a[a.ALL=1012]="ALL",a[a.CUSTOM=2e3]="CUSTOM"}(At||(At={}));const ot=Object.assign(Object.assign({},qt),At);var ee,wt,It,tt,Pt;(function(a){a[a.line=0]="line",a[a.area=1]="area",a[a.areaRange=2]="areaRange",a[a.areaSpline=3]="areaSpline",a[a.areaSplineRange=4]="areaSplineRange",a[a.candlestick=5]="candlestick",a[a.column=6]="column",a[a.columnRange=7]="columnRange",a[a.flags=8]="flags",a[a.ohlc=9]="ohlc",a[a.polygon=10]="polygon",a[a.scatter=11]="scatter",a[a.spline=12]="spline"})(ee||(ee={})),function(a){a.AREA="area",a.CANDLESTICK="candlestick",a.LINE="line",a.OHLC="ohlc",a.BASELINE="baseline",a.HEIKINASHI="heikinashi",a.HOLLOWCANDLESTICK="hollowcandlestick",a.POINTS="points"}(wt||(wt={})),function(a){a.NOK="NOK",a.SEK="SEK",a.USD="USD"}(It||(It={})),function(a){a.ONE_SECOND="1s",a.ONE_MINUTE="1m",a.TWO_MINUTES="2m",a.THREE_MINUTES="3m",a.FOUR_MINUTES="4m",a.FIVE_MINUTES="5m",a.TEN_MINUTES="10m",a.FIFTEEN_MINUTES="15m",a.TWENTY_MINUTES="20m",a.THIRTY_MINUTES="30m",a.SIXTY_MINUTES="1h",a.FOUR_HOURS="4h"}(tt||(tt={})),function(a){a.AUTO="auto",a.ONE_DAY="1D",a.THREE_DAYS="3D",a.FIVE_DAYS="5D",a.ONE_WEEK="1W",a.ONE_MONTH="1M",a.THREE_MONTHS="3M"}(Pt||(Pt={}));const F=Object.assign(Object.assign({},tt),Pt),lt=Object.assign(Object.assign({},qt),At);var b,V;function kt(a){var t;return!(null===(t=a.match(/^#[a-f\d]{8}/gi))||void 0===t||!t.length)}function dt(a){const t=Ht(a);return"#"+[0,1,2,3].map(e=>yt(t[e])).join("").toUpperCase().substr(0,8)}function pt(a){const t=Ht(a);return"#"+[0,1,2].map(e=>yt(t[e])).join("").toUpperCase().substr(0,6)}function yt(a,t="ff"){return null==a||isNaN(+a)?t:("0"+a.toString(16)).slice(-2)}function Ht(a){const t=document.createElement("canvas");t.height=1,t.width=1;const e=t.getContext("2d");return e.fillStyle=a,e.fillRect(0,0,1,1),e.getImageData(0,0,1,1).data}function ct(a,t,e){return a*t+(1-a)*e}function Et(a,t){const e=Ht(a),n=Ht(t),i=e[3]/255;return pt(`rgb(${[ct(i,e[0],n[0]),ct(i,e[1],n[1]),ct(i,e[2],n[2])].join(",")})`)}function Be(a,t){return a?.startsWith("#")&&[7,9].includes(a.length)?(9===a.length&&(a=a.substr(0,7)),`${a}${t}`.toUpperCase()):a}function ce(a,t){var e,n,i,s;if(null==t)return t;const o=null===(e=a?.getChartWrapper())||void 0===e?void 0:e.getHighcharts();return null!==(s=null===(i=null===(n=o?.SVGRenderer)||void 0===n?void 0:n.prototype)||void 0===i?void 0:i.getContrast(pt(t)))&&void 0!==s?s:t}function m(a,t){const e=a?.getGlobalChartSettings();if(!e||!t)return;const n=Be(t,e.ordinateLabelsOutside?e.labelOutsideAlpha:e.labelAlpha),i=Et(n,a.getMainBackgroundColor()),s=e.ordinateLabelsOutside?e.labelTextOutsideAlpha:e.labelTextAlpha;return{backgroundColor:n,textColor:Be(ce(a,i),s)}}(function(a){a.MAIN_INSTRUMENT="main",a.ANY_INSTRUMENT="any"})(b||(b={})),function(a){a.DEFAULT="default",a.TEN_MINUTES_VWAP="tenMinutesVwap",a.FIFTEEN_MINUTES_TA="fifteenMinutesTA",a.ONE_HOUR_TA="oneHourTA",a.DAILY_TA="dailyTA",a.WEEKLY_TA="weeklyTA",a.MONTHLY_TA="monthlyTA",a.STOCHASTIC_BB="stochasticBB",a.CANDLESTICK_VOLUME="candlestickVolume",a.SAVE_AS_DEFAULT="saveAsDefault",a.RESET_DEFAULT="resetDefault"}(V||(V={}));let A=(()=>{class a{static getHighchartsColorListFromCss(e,n="highcharts-color",i="color"){const s=[],o=document.createElement("style");o.type="text/css",o.textContent=`.highchartsColorListFromCssDefaultColor { ${i}: #12345678; }`,e.appendChild(o);const l=document.createElement("div");l.style.display="none",l.className="cell-w-chart-nextgen",e.appendChild(l);const u=document.createElement("div");l.appendChild(u),u.className="highchartsColorListFromCssDefaultColor";const d=getComputedStyle(u).getPropertyValue(i);for(let g=0;g<100;g++){u.className=`highchartsColorListFromCssDefaultColor ${n}-${g}`;const I=getComputedStyle(u).getPropertyValue(i);if(I===d)break;s.push(kt(I)?I:dt(I))}return l.parentNode.removeChild(l),o.parentNode.removeChild(o),s}
1static getHighchartsBackgroundColorFromCss(e,n="highcharts-background",i="background-color"){let s;const o=document.createElement("div");return o.style.display="none",o.className="cell-w-chart-nextgen",e.appendChild(o),s=getComputedStyle(o).getPropertyValue(i),s=kt(s)?s:dt(s),o.parentNode.removeChild(o),s}}return a.getContrastColor=ce,a})();var _=qe(1689),O=qe(33618),M=qe(91016),D=qe(76133);const R=Object.freeze(["bottom","top"]);var y,L;function H(a,t,e,n,i=y.DOWN,s=!1,o=L.OUTER){R.forEach(C=>{t.style[C]=""});const l=e.getBoundingClientRect(),u=n.getBoundingClientRect();let d;if(n===document.body){const C=getComputedStyle(n);d={left:`calc(${l.left-u.left}px + ${C.marginLeft})`,top:`calc(${l.top-u.top}px + ${C.marginTop})`,bottom:`calc(${l.bottom-u.top}px + ${C.marginTop})`,position:"absolute"}}else d={left:l.left-u.left+"px",top:l.top-u.top+"px",bottom:l.bottom-u.top+"px",position:"absolute"};a.style.left=d.left,a.style.position=d.position,G(a,e,d,i);const g=document.body.getBoundingClientRect(),I=t.getBoundingClientRect();if(g.x>I.x?t.style.left=parseFloat(t.style.left)+(g.x-I.x)+"px":g.right<I.right&&(t.style.left=parseFloat(t.style.left)-(I.right-g.right)+"px"),0>I.top&&i===y.UP&&G(a,e,d,y.DOWN),s){const C=window.innerHeight,S=window.scrollY,N=I.top,k=I.bottom;if(a.style.maxHeight=C-10+"px",a.style.overflowY="unset",k>C){const x=k-C;N>5&&N-5>x?a.style.top=S+N-5-x+"px":(a.style.top=`${S+5}px`,a.style.overflowY="overlay")}}}function G(a,t,e,n){n===y.DOWN?(a.style.top=e.bottom,t.style.bottom=""):(a.style.top=e.top,t.style.bottom="5px")}(function(a){a[a.DOWN=0]="DOWN",a[a.UP=1]="UP"})(y||(y={})),function(a){a[a.OUTER=0]="OUTER",a[a.INNER=1]="INNER"}(L||(L={})),document;const nt={schedule:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" class="wtk-icon-svg">\n            <path d="m31.35 33.65 2.25-2.25-7.95-8V13.35h-3V24.6ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 24t1.575-7.75q1.575-3.65 4.3-6.375 2.725-2.725 6.375-4.3Q19.9 4 24 4t7.75 1.575q3.65 1.575 6.375 4.3 2.725 2.725 4.3 6.375Q44 19.9 44 24t-1.575 7.75q-1.575 3.65-4.3 6.375-2.725 2.725-6.375 4.3Q28.1 44 24 44Zm0-20Zm0 17q7 0 12-5t5-12q0-7-5-12T24 7q-7 0-12 5T7 24q0 7 5 12t12 5Z"/>\n        </svg>',"bar-chart":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" class="wtk-icon-svg">\n            <path d="M640-160v-280h160v280H640Zm-240 0v-640h160v640H400Zm-240 0v-440h160v440H160Z"/>\n        </svg>',cross:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" class="wtk-icon-svg">\n            <path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/>\n        </svg>',calendar:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" class="wtk-icon-svg">\n            <path d="M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Zm0 0v-80 80Z"/>\n        </svg>',info:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n        </svg>',"content-copy":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" class="wtk-icon-svg">\n            <path d="M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"/>\n        </svg>',lightbulb:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n             <path d="M0 0h24v24H0z" fill="none"/><path d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1l-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z"/>\n        </svg>'},W={lock:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/>\n        </svg>',folder:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/>\n        </svg>',check_box:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>\n        </svg>'},z={schedule:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" class="wtk-icon-svg">\n            <path d="m31.35 33.65 2.25-2.25-7.95-8V13.35h-3V24.6ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 24t1.575-7.75q1.575-3.65 4.3-6.375 2.725-2.725 6.375-4.3Q19.9 4 24 4t7.75 1.575q3.65 1.575 6.375 4.3 2.725 2.725 4.3 6.375Q44 19.9 44 24t-1.575 7.75q-1.575 3.65-4.3 6.375-2.725 2.725-6.375 4.3Q28.1 44 24 44Zm0-20Zm0 17q7 0 12-5t5-12q0-7-5-12T24 7q-7 0-12 5T7 24q0 7 5 12t12 5Z"/>\n        </svg>',info:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n        </svg>',payments:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M19 14V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zm-2 0H3V6h14v8zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm13 0v11c0 1.1-.9 2-2 2H4v-2h17V7h2z"/>\n        </svg>',account_balance:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M6.5 10h-2v7h2v-7zm6 0h-2v7h2v-7zm8.5 9H2v2h19v-2zm-2.5-9h-2v7h2v-7zm-7-6.74L16.71 6H6.29l5.21-2.74m0-2.26L2 6v2h19V6l-9.5-5z"/>\n        </svg>',lock:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"/>\n        </svg>',drag_handle:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M20 9H4v2h16V9zM4 15h16v-2H4v2z"/>\n        </svg>',edit:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M14.06 9.02l.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z"/>\n        </svg>',delete:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"/>\n        </svg>',view_column:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">
1\n            <path d="M3,5v14h18V5H3z M8.33,17H5V7h3.33V17z M13.67,17h-3.33V7h3.33V17z M19,17h-3.33V7H19V17z"/>\n        </svg>',add:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>\n        </svg>',save:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm2 16H5V5h11.17L19 7.83V19zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zM6 6h9v4H6z"/>\n        </svg>',pending:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g>\n                <g>\n                    <path d="M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10s10-4.48,10-10C22,6.48,17.52,2,12,2z M12,20c-4.42,0-8-3.58-8-8 c0-4.42,3.58-8,8-8s8,3.58,8,8C20,16.42,16.42,20,12,20z"/><circle cx="7" cy="12" r="1.5"/><circle cx="12" cy="12" r="1.5"/><circle cx="17" cy="12" r="1.5"/>\n                </g>\n            </g>\n        </svg>',star:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g>\n                <path d="M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27z"/>\n            </g>\n        </svg>',star_border:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"/>\n        </svg>',calendar_today:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"/>\n        </svg>',refresh:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/>\n        </svg>',format_list_bulleted:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z"/>\n        </svg>',check_box_outline_blank:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/>\n        </svg>',check_box:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM17.99 9l-1.41-1.42-6.59 6.59-2.58-2.57-1.42 1.41 4 3.99z"/>\n        </svg>',more_vert:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/>\n        </svg>',open_in_new:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"/>\n        </svg>',light_bulb:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1l-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z"/>\n        </svg>',bar_chart:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><g><rect height="11" width="4" x="4" y="9"/><rect height="7" width="4" x="16" y="13"/><rect height="16" width="4" x="10" y="4"/></g></g>\n        </svg>',warning_amber:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M12 5.99 19.53 19H4.47L12 5.99M12 2 1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"/>\n        </svg>',bolt:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><path d="M11,21h-1l1-7H7.5c-0.88,0-0.33-0.75-0.31-0.78C8.48,10.94,10.42,7.54,13.01,3h1l-1,7h3.51c0.4,0,0.62,0.19,0.4,0.66 C12.97,17.55,11,21,11,21z"/></g>\n        </svg>',shopping_basket:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M22 9h-4.79l-4.38-6.56c-.19-.28-.51-.42-.83-.42s-.64.14-.83.43L6.79 9H2c-.55 0-1 .45-1 1 0 .09.01.
118.04.27l2.54 9.27c.23.84 1 1.46 1.92 1.46h13c.92 0 1.69-.62 1.93-1.46l2.54-9.27L23 10c0-.55-.45-1-1-1zM12 4.8L14.8 9H9.2L12 4.8zM18.5 19l-12.99.01L3.31 11H20.7l-2.2 8zM12 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/>\n        </svg>',tv:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12z"/>\n        </svg>',local_gas_station:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="m19.77 7.23.01-.01-3.72-3.72L15 4.56l2.11 2.11c-.94.36-1.61 1.26-1.61 2.33 0 1.38 1.12 2.5 2.5 2.5.36 0 .69-.08 1-.21v7.21c0 .55-.45 1-1 1s-1-.45-1-1V14c0-1.1-.9-2-2-2h-1V5c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v16h10v-7.5h1.5v5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V9c0-.69-.28-1.32-.73-1.77zM12 13.5V19H6v-7h6v1.5zm0-3.5H6V5h6v5zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/>\n        </svg>',local_hospital:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M19 3H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-8.5-2h3v-3.5H17v-3h-3.5V7h-3v3.5H7v3h3.5z"/>\n        </svg>',factory:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><path d="M22,22H2V10l7-3v2l5-2l0,3h3l1-8h3l1,8V22z M12,9.95l-5,2V10l-3,1.32V20h16v-8h-8L12,9.95z M11,18h2v-4h-2V18z M7,18h2v-4 H7V18z M17,14h-2v4h2V14z"/></g>\n        </svg>',construction:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><g><rect height="8.48" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -6.8717 17.6255)" width="3" x="16.34" y="12.87"/><path d="M17.5,10c1.93,0,3.5-1.57,3.5-3.5c0-0.58-0.16-1.12-0.41-1.6l-2.7,2.7L16.4,6.11l2.7-2.7C18.62,3.16,18.08,3,17.5,3 C15.57,3,14,4.57,14,6.5c0,0.41,0.08,0.8,0.21,1.16l-1.85,1.85l-1.78-1.78l0.71-0.71L9.88,5.61L12,3.49 c-1.17-1.17-3.07-1.17-4.24,0L4.22,7.03l1.41,1.41H2.81L2.1,9.15l3.54,3.54l0.71-0.71V9.15l1.41,1.41l0.71-0.71l1.78,1.78 l-7.41,7.41l2.12,2.12L16.34,9.79C16.7,9.92,17.09,10,17.5,10z"/></g></g>\n        </svg>',apartment:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><path d="M17,11V3H7v4H3v14h8v-4h2v4h8V11H17z M7,19H5v-2h2V19z M7,15H5v-2h2V15z M7,11H5V9h2V11z M11,15H9v-2h2V15z M11,11H9V9h2 V11z M11,7H9V5h2V7z M15,15h-2v-2h2V15z M15,11h-2V9h2V11z M15,7h-2V5h2V7z M19,19h-2v-2h2V19z M19,15h-2v-2h2V15z"/></g>\n        </svg>',computer:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"/>\n        </svg>',cell_tower:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><g><path d="M7.3,14.7l1.2-1.2c-1-1-1.5-2.3-1.5-3.5c0-1.3,0.5-2.6,1.5-3.5L7.3,5.3c-1.3,1.3-2,3-2,4.7S6,13.4,7.3,14.7z"/><path d="M19.1,2.9l-1.2,1.2c1.6,1.6,2.4,3.8,2.4,5.9c0,2.1-0.8,4.3-2.4,5.9l1.2,1.2c2-2,2.9-4.5,2.9-7.1C22,7.4,21,4.9,19.1,2.9z"/><path d="M6.1,4.1L4.9,2.9C3,4.9,2,7.4,2,10c0,2.6,1,5.1,2.9,7.1l1.2-1.2c-1.6-1.6-2.4-3.8-2.4-5.9C3.7,7.9,4.5,5.7,6.1,4.1z"/><path d="M16.7,14.7c1.3-1.3,2-3,2-4.7c-0.1-1.7-0.7-3.4-2-4.7l-1.2,1.2c1,1,1.5,2.3,1.5,3.5c0,1.3-0.5,2.6-1.5,3.5L16.7,14.7z"/><path d="M14.5,10c0-1.38-1.12-2.5-2.5-2.5S9.5,8.62,9.5,10c0,0.76,0.34,1.42,0.87,1.88L7,22h2l0.67-2h4.67L15,22h2l-3.37-10.12 C14.16,11.42,14.5,10.76,14.5,10z M10.33,18L12,13l1.67,5H10.33z"/></g></g>\n        </svg>',electric_bolt:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><g><path d="M14.69,2.21L4.33,11.49c-0.64,0.58-0.28,1.65,0.58,1.73L13,14l-4.85,6.76c-0.22,0.31-0.19,0.74,0.08,1.01h0 c0.3,0.3,0.77,0.31,1.08,0.02l10.36-9.28c0.64-0.58,0.28-1.65-0.58-1.73L11,10l4.85-6.76c0.22-0.31,0.19-0.74-0.08-1.01l0,0 C15.47,1.93,15,1.92,14.69,2.21z"/></g></g>\n        </svg>',gas_meter:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><g><path d="M16,4h-1V2h-2v2h-2V2H9v2H8C5.79,4,4,5.79,4,8v10c0,2.21,1.79,4,4,4h8c2.21,0,4-1.79,4-4V8C20,5.79,18.21,4,16,4z M18,18 c0,1.1-0.9,2-2,2H8c-1.1,0-2-0.9-2-2V8c0-1.1,0.9-2,2-2h8c1.1,0,2,0.9,2,2V18z"/><path d="M9.5,15.54C9.5,16.9,10.62,18,12,18s2.5-1.1,2.5-2.46c0-1.09-0.45-1.41-2.5-3.79C9.93,14.15,9.5,14.46,9.5,15.54z"/><rect height="2" width="8" x="8" y="8"/></g></g>\n        </svg>',hub:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <rect fill="none" height="24" width="24"/><path d="M21,6.5c-1.66,0-3,1.34-3,3c0,0.07,0,0.14,0.01,0.21l-2.03,0.68c-0.64-1.21-1.82-2.09-3.22-2.32V5.91 C14.04,5.57,15,4.4,15,3c0-1.
166-1.34-3-3-3S9,1.34,9,3c0,1.4,0.96,2.57,2.25,2.91v2.16c-1.4,0.23-2.58,1.11-3.22,2.32L5.99,9.71 C6,9.64,6,9.57,6,9.5c0-1.66-1.34-3-3-3s-3,1.34-3,3s1.34,3,3,3c1.06,0,1.98-0.55,2.52-1.37l2.03,0.68 c-0.2,1.29,0.17,2.66,1.09,3.69l-1.41,1.77C6.85,17.09,6.44,17,6,17c-1.66,0-3,1.34-3,3s1.34,3,3,3s3-1.34,3-3 c0-0.68-0.22-1.3-0.6-1.8l1.41-1.77c1.36,0.76,3.02,0.75,4.37,0l1.41,1.77C15.22,18.7,15,19.32,15,20c0,1.66,1.34,3,3,3s3-1.34,3-3 s-1.34-3-3-3c-0.44,0-0.85,0.09-1.23,0.26l-1.41-1.77c0.93-1.04,1.29-2.4,1.09-3.69l2.03-0.68c0.53,0.82,1.46,1.37,2.52,1.37 c1.66,0,3-1.34,3-3S22.66,6.5,21,6.5z M3,10.5c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C4,10.05,3.55,10.5,3,10.5z M6,21 c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C7,20.55,6.55,21,6,21z M11,3c0-0.55,0.45-1,1-1s1,0.45,1,1c0,0.55-0.45,1-1,1 S11,3.55,11,3z M12,15c-1.38,0-2.5-1.12-2.5-2.5c0-1.38,1.12-2.5,2.5-2.5s2.5,1.12,2.5,2.5C14.5,13.88,13.38,15,12,15z M18,19 c0.55,0,1,0.45,1,1c0,0.55-0.45,1-1,1s-1-0.45-1-1C17,19.45,17.45,19,18,19z M21,10.5c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1 s1,0.45,1,1C22,10.05,21.55,10.5,21,10.5z"/>\n        </svg>',water_drop:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <rect fill="none" height="24" width="24"/><path d="M12,2c-5.33,4.55-8,8.48-8,11.8c0,4.98,3.8,8.2,8,8.2s8-3.22,8-8.2C20,10.48,17.33,6.55,12,2z M12,20c-3.35,0-6-2.57-6-6.2 c0-2.34,1.95-5.44,6-9.14c4.05,3.7,6,6.79,6,9.14C18,17.43,15.35,20,12,20z M7.83,14c0.37,0,0.67,0.26,0.74,0.62 c0.41,2.22,2.28,2.98,3.64,2.87c0.43-0.02,0.79,0.32,0.79,0.75c0,0.4-0.32,0.73-0.72,0.75c-2.13,0.13-4.62-1.09-5.19-4.12 C7.01,14.42,7.37,14,7.83,14z"/>\n        </svg>',eco:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><path d="M6.05,8.05c-2.73,2.73-2.73,7.17,0,9.9C7.42,19.32,9.21,20,11,20s3.58-0.68,4.95-2.05C19.43,14.47,20,4,20,4 S9.53,4.57,6.05,8.05z M14.54,16.54C13.59,17.48,12.34,18,11,18c-0.89,0-1.73-0.25-2.48-0.68c0.92-2.88,2.62-5.41,4.88-7.32 c-2.63,1.36-4.84,3.46-6.37,6c-1.48-1.96-1.35-4.75,0.44-6.54C9.21,7.72,14.04,6.65,17.8,6.2C17.35,9.96,16.28,14.79,14.54,16.54z"/></g>\n        </svg>',local_grocery_store:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-1.45-5c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6z"/>\n        </svg>',restaurant:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 6v8h3v8h2V2c-2.76 0-5 2.24-5 4zm-5 3H9V2H7v7H5V2H3v7c0 2.21 1.79 4 4 4v9h2v-9c2.21 0 4-1.79 4-4V2h-2v7z"/>\n        </svg>',local_bar:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M14.77 9L12 12.11 9.23 9h5.54M21 3H3v2l8 9v5H6v2h12v-2h-5v-5l8-9V3zM7.43 7L5.66 5h12.69l-1.78 2H7.43z"/>\n        </svg>',cleaning_services:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><g><path d="M16,11h-1V3c0-1.1-0.9-2-2-2h-2C9.9,1,9,1.9,9,3v8H8c-2.76,0-5,2.24-5,5v7h18v-7C21,13.24,18.76,11,16,11z M11,3h2v8h-2V3 z M19,21h-2v-3c0-0.55-0.45-1-1-1s-1,0.45-1,1v3h-2v-3c0-0.55-0.45-1-1-1s-1,0.45-1,1v3H9v-3c0-0.55-0.45-1-1-1s-1,0.45-1,1v3H5 v-5c0-1.65,1.35-3,3-3h8c1.65,0,3,1.35,3,3V21z"/></g></g>\n        </svg>',directions_car:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.85 7h10.29l1.08 3.11H5.77L6.85 7zM19 17H5v-5h14v5z"/><circle cx="7.5" cy="14.5" r="1.5"/><circle cx="16.5" cy="14.5" r="1.5"/>\n        </svg>',store:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M18.36 9l.6 3H5.04l.6-3h12.72M20 4H4v2h16V4zm0 3H4l-1 5v2h1v6h10v-6h4v6h2v-6h1v-2l-1-5zM6 18v-4h6v4H6z"/>\n        </svg>',travel_explore:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <rect fill="none" height="24" width="24"/><path d="M19.3,16.9c0.4-0.7,0.7-1.5,0.7-2.4c0-2.5-2-4.5-4.5-4.5S11,12,11,14.5s2,4.5,4.5,4.5c0.9,0,1.7-0.3,2.4-0.7l3.2,3.2 l1.4-1.4L19.3,16.9z M15.5,17c-1.4,0-2.5-1.1-2.5-2.5s1.1-2.5,2.5-2.5s2.5,1.1,2.5,2.5S16.9,17,15.5,17z M12,20v2 C6.48,22,2,17.52,2,12C2,6.48,6.48,2,12,2c4.84,0,8.87,3.44,9.8,8h-2.07c-0.64-2.46-2.4-4.47-4.73-5.41V5c0,1.1-0.9,2-2,2h-2v2 c0,0.55-0.45,1-1,1H8v2h2v3H9l-4.79-4.79C4.08,10.79,4,11.38,4,12C4,16.41,7.59,20,12,20z"/>\n        </svg>',newspaper:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><path d="M22,3l-1.67,1.67L18.67,3L17,4.67L15.33,3l-1.66,1.67L12,3l-1.67,1.67L8.67,3L7,4.67L5.33,3L3.67,4.67L2,3v16 c0,1.1,0.9,2,2,2l16,0c1.1,0,2-0.9,2-2V3z M11,19H4v-6h7V19z M20,19h-7v-2h7V19z M20,15h-7v-2h7V15z M20,11H4V8h16V11z"/></g>\n        </svg>',engineering:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><g><path d="M9,15c-2.67,0-8,1.34-8,4v2h16v-2C17,16.34,11.67,15,9,15z M3,19c0.22-0.72,3.31-2,6-2c2.7,0,5.8,1.29,6,2H3z"/><path d="M4.74,9H5c0,2.21,1.79,4,4,4s4-1.79,4-4h0.26c0.27,0,0.49-0.22,0.49-0.49V8.49c0-0.27-0.22-0.49-0.49-0.49H13 c0-1.48-0.81-2.75-2-3.45V5.5C11,5.78,10.78,6,10.5,6S10,5.78,10,5.5V4.14C9.68,4.06,9.35,4,9,4S8.32,4.06,8,4.14V5.5 C8,5.78,7.78,6,7.5,6S7,5.78,7,5.5V4.55C5.81,5.25,5,6.52,5,8H4.74C4.47,8,4.25,8.22,4.25,8.49v0.03C4.25,8.78,4.47,9,4.74,9z M11,9c0,1.1-0.9,2-2,2s-2-0.9-2-2H11z"/><path d="M21.98,6.23l0.93-0.83l-0.75-1.3l-1.19,0.39c-0.14-0.11-0.3-0.2-0.47-0.27L20.25,3h-1.5L18.5,4.22 c-0.17,0.07-0.33,0.16-0.48,0.27L16.84,4.1l-0.75,1.3l0.93,0.83C17,6.4,17,6.58,17.02,6.75L16.09,7.6l0.75,1.3l1.2-0.38 c0.13,0.1,0.28,0.18,0.43,0.25L18.75,10h1.5l0.27-1.22c0.16-0.07,0.3-0.
115,0.44-0.25l1.19,0.38l0.75-1.3l-0.93-0.85 C22,6.57,21.99,6.4,21.98,6.23z M19.5,7.75c-0.69,0-1.25-0.56-1.25-1.25s0.56-1.25,1.25-1.25s1.25,0.56,1.25,1.25 S20.19,7.75,19.5,7.75z"/><path d="M19.4,10.79l-0.85,0.28c-0.1-0.08-0.21-0.14-0.33-0.19L18.04,10h-1.07l-0.18,0.87c-0.12,0.05-0.24,0.12-0.34,0.19 l-0.84-0.28l-0.54,0.93l0.66,0.59c-0.01,0.13-0.01,0.25,0,0.37l-0.66,0.61l0.54,0.93l0.86-0.27c0.1,0.07,0.2,0.13,0.31,0.18 L16.96,15h1.07l0.19-0.87c0.11-0.05,0.22-0.11,0.32-0.18l0.85,0.27l0.54-0.93l-0.66-0.61c0.01-0.13,0.01-0.25,0-0.37l0.66-0.59 L19.4,10.79z M17.5,13.39c-0.49,0-0.89-0.4-0.89-0.89c0-0.49,0.4-0.89,0.89-0.89s0.89,0.4,0.89,0.89 C18.39,12.99,17.99,13.39,17.5,13.39z"/></g></g>\n        </svg>',security:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/>\n        </svg>',trending_up:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6h-6z"/>\n        </svg>',medication:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><path d="M0,0h24v24H0V0z" fill="none"/></g><g><g><path d="M10.5,15H8v-3h2.5V9.5h3V12H16v3h-2.5v2.5h-3V15z M19,8v11c0,1.1-0.9,2-2,2H7c-1.1,0-2-0.9-2-2V8c0-1.1,0.9-2,2-2h10 C18.1,6,19,6.9,19,8z M17,8H7v11h10V8z M18,3H6v2h12V3z"/></g></g>\n        </svg>',medical_services:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><g><path d="M20,6h-4V4c0-1.1-0.9-2-2-2h-4C8.9,2,8,2.9,8,4v2H4C2.9,6,2,6.9,2,8v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8 C22,6.9,21.1,6,20,6z M10,4h4v2h-4V4z M20,20H4V8h16V20z"/><polygon points="13,10 11,10 11,13 8,13 8,15 11,15 11,18 13,18 13,15 16,15 16,13 13,13"/></g></g>\n        </svg>',precision_manufacturing:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><path d="M19.93,8.35l-3.6,1.68L14,7.7V6.3l2.33-2.33l3.6,1.68c0.38,0.18,0.82,0.01,1-0.36c0.18-0.38,0.01-0.82-0.36-1l-3.92-1.83 c-0.38-0.18-0.83-0.1-1.13,0.2L13.78,4.4C13.6,4.16,13.32,4,13,4c-0.55,0-1,0.45-1,1v1H8.82C8.4,4.84,7.3,4,6,4C4.34,4,3,5.34,3,7 c0,1.1,0.6,2.05,1.48,2.58L7.08,18H6c-1.1,0-2,0.9-2,2v1h13v-1c0-1.1-0.9-2-2-2h-1.62L8.41,8.77C8.58,8.53,8.72,8.28,8.82,8H12v1 c0,0.55,0.45,1,1,1c0.32,0,0.6-0.16,0.78-0.4l1.74,1.74c0.3,0.3,0.75,0.38,1.13,0.2l3.92-1.83c0.38-0.18,0.54-0.62,0.36-1 C20.75,8.34,20.31,8.17,19.93,8.35z M6,8C5.45,8,5,7.55,5,7c0-0.55,0.45-1,1-1s1,0.45,1,1C7,7.55,6.55,8,6,8z M11.11,18H9.17 l-2.46-8h0.1L11.11,18z"/></g>\n        </svg>',electrical_services:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><g><path d="M21,14c0-0.55-0.45-1-1-1h-2v2h2C20.55,15,21,14.55,21,14z"/><path d="M20,17h-2v2h2c0.55,0,1-0.45,1-1C21,17.45,20.55,17,20,17z"/><path d="M12,14h-2v4h2c0,1.1,0.9,2,2,2h3v-8h-3C12.9,12,12,12.9,12,14z"/><path d="M5,13c0-1.1,0.9-2,2-2h1.5c1.93,0,3.5-1.57,3.5-3.5S10.43,4,8.5,4H5C4.45,4,4,4.45,4,5c0,0.55,0.45,1,1,1h3.5 C9.33,6,10,6.67,10,7.5S9.33,9,8.5,9H7c-2.21,0-4,1.79-4,4c0,2.21,1.79,4,4,4h2v-2H7C5.9,15,5,14.1,5,13z"/></g></g>\n        </svg>',category:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 2l-5.5 9h11L12 2zm0 3.84L13.93 9h-3.87L12 5.84zM17.5 13c-2.49 0-4.5 2.01-4.5 4.5s2.01 4.5 4.5 4.5 4.5-2.01 4.5-4.5-2.01-4.5-4.5-4.5zm0 7c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zM3 21.5h8v-8H3v8zm2-6h4v4H5v-4z"/>\n        </svg>',handyman:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><g><g><path d="M21.67,18.17l-5.3-5.3h-0.99l-2.54,2.54v0.99l5.3,5.3c0.39,0.39,1.02,0.39,1.41,0l2.12-2.12 C22.06,19.2,22.06,18.56,21.67,18.17z M18.84,19.59l-4.24-4.24l0.71-0.71l4.24,4.24L18.84,19.59z"/></g><g><path d="M17.34,10.19l1.41-1.41l2.12,2.12c1.17-1.17,1.17-3.07,0-4.24l-3.54-3.54l-1.41,1.41V1.71L15.22,1l-3.54,3.54l0.71,0.71 h2.83l-1.41,1.41l1.06,1.06l-2.89,2.89L7.85,6.48V5.06L4.83,2.04L2,4.87l3.03,3.03h1.41l4.13,4.13l-0.85,0.85H7.6l-5.3,5.3 c-0.39,0.39-0.39,1.02,0,1.41l2.12,2.12c0.39,0.39,1.02,0.39,1.41,0l5.3-5.3v-2.12l5.15-5.15L17.34,10.19z M9.36,15.34 l-4.24,4.24l-0.71-0.71l4.24-4.24l0,0L9.36,15.34L9.36,15.34z"/></g></g></g>\n        </svg>',local_shipping:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zm-.5 1.5l1.96 2.5H17V9.5h2.5zM6 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2.22-3c-.55-.61-1.33-1-2.22-1s-1.67.39-2.22 1H3V6h12v9H8.22zM18 18c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/>\n        </svg>
1',foundation:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <rect fill="none" height="24" width="24"/><path d="M19,12h3L12,3L2,12h3v3H3v2h2v3h2v-3h4v3h2v-3h4v3h2v-3h2v-2h-2V12z M7,15v-4.81l4-3.6V15H7z M13,15V6.59l4,3.6V15H13z"/>\n        </svg>',science:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><path d="M13,11.33L18,18H6l5-6.67V6h2 M15.96,4H8.04C7.62,4,7.39,4.48,7.65,4.81L9,6.5v4.17L3.2,18.4C2.71,19.06,3.18,20,4,20h16 c0.82,0,1.29-0.94,0.8-1.6L15,10.67V6.5l1.35-1.69C16.61,4.48,16.38,4,15.96,4L15.96,4z"/></g>\n        </svg>',forest:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><g><path d="M24,18l-3.86-6H22L15,2l-3,4.29L9,2L2,12h1.86L0,18h7v4h4v-4h2v4h4v-4H24z M15,5.49L18.16,10h-1.68l3.86,6h-3.62l-2.57-4 H16l-2.78-3.97L15,5.49z M3.66,16l3.86-6H5.84L9,5.49L12.16,10h-1.68l3.86,6H3.66z"/></g></g>\n        </svg>',hardware:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24" y="0"/></g><g><g><path d="M18,3l-3,3V3H9C6.24,3,4,5.24,4,8h5v12c0,0.55,0.45,1,1,1h4c0.55,0,1-0.45,1-1V8l3,3h2V3H18z M13,19h-2v-6h2V19z M11,11V6 H6.77C7.32,5.39,8.11,5,9,5h4v6H11z"/></g></g>\n        </svg>',diamond:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><path d="M19,3H5L2,9l10,12L22,9L19,3z M9.62,8l1.5-3h1.76l1.5,3H9.62z M11,10v6.68L5.44,10H11z M13,10h5.56L13,16.68V10z M19.26,8 h-2.65l-1.5-3h2.65L19.26,8z M6.24,5h2.65l-1.5,3H4.74L6.24,5z"/></g>\n        </svg>',corporate_fare:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <rect fill="none" height="24" width="24"/><path d="M12,7V3H2v18h20V7H12z M10,19H4v-2h6V19z M10,15H4v-2h6V15z M10,11H4V9h6V11z M10,7H4V5h6V7z M20,19h-8V9h8V19z M18,11h-4v2 h4V11z M18,15h-4v2h4V15z"/>\n        </svg>',real_estate_agent:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <rect fill="none" height="24" width="24"/><path d="M21,6.5V14h-2V7.5L14,4L9,7.5V9H7V6.5l7-5L21,6.5z M15.5,7h-1v1h1V7z M13.5,7h-1v1h1V7z M15.5,9h-1v1h1V9z M13.5,9h-1v1h1V9 z M19,16h-2c0-1.2-0.75-2.28-1.87-2.7L8.97,11H1v11h6v-1.44l7,1.94l8-2.5v-1C22,17.34,20.66,16,19,16z M3,20v-7h2v7H3z M13.97,20.41 L7,18.48V13h1.61l5.82,2.17C14.77,15.3,15,15.63,15,16c0,0-1.99-0.05-2.3-0.15l-2.38-0.79l-0.63,1.9l2.38,0.79 c0.51,0.17,1.04,0.26,1.58,0.26H19c0.39,0,0.74,0.23,0.9,0.56L13.97,20.41z"/>\n        </svg>',home_work:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><g><path d="M1,11v10h6v-5h2v5h6V11L8,6L1,11z M13,19h-2v-5H5v5H3v-6.97l5-3.57l5,3.57V19z"/><rect height="2" width="2" x="17" y="7"/><rect height="2" width="2" x="17" y="11"/><rect height="2" width="2" x="17" y="15"/><polygon points="10,3 10,4.97 12,6.4 12,5 21,5 21,19 17,19 17,21 23,21 23,3"/></g></g>\n        </svg>',memory:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M15 9H9v6h6V9zm-2 4h-2v-2h2v2zm8-2V9h-2V7c0-1.1-.9-2-2-2h-2V3h-2v2h-2V3H9v2H7c-1.1 0-2 .9-2 2v2H3v2h2v2H3v2h2v2c0 1.1.9 2 2 2h2v2h2v-2h2v2h2v-2h2c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2zm-4 6H7V7h10v10z"/>\n        </svg>',code:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"/>\n        </svg>',devices:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z"/>\n        </svg>',list:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g fill="none"><path d="M0 0h24v24H0V0z"/><path d="M0 0h24v24H0V0z" opacity=".87"/></g><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"/>\n        </svg>',show_chart:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M3.5 18.49l6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99l1.5 1.5z"/>\n        </svg>',search:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" class="wtk-icon-svg">\n            <path d="M39.8 41.95 26.65 28.8q-1.5 1.3-3.5 2.025-2 .725-4.25.725-5.4 0-9.15-3.75T6 18.75q0-5.3 3.75-9.05 3.75-3.75 9.1-3.75 5.3 0 9.025 3.75 3.725 3.75 3.725 9.05 0 2.15-.7 4.15-.7 2-2.1 3.75L42 39.75Zm-20.95-13.4q4.05 0 6.9-2.875Q28.6 22.8 28.6 18.75t-2.85-6.925Q22.9 8.95 18.85 8.95q-4.1 0-6.975 2.875T9 18.75q0 4.05 2.875 6.925t6.975 2.875Z"/>\n        </svg>',attach_money:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"/>\n        </svg>',receipt_long:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0,0h24v24H0V0z" fill="none"/><g><path d="M19.5,3.5L18,2l-1.5,1.5L15,2l-1.5,1.5L12,2l-1.5,1.5L9,2L7.5,3.5L6,2v14H3v3c0,1.66,1.34,3,3,3h12c1.66,0,3-1.34,3-3V2 L19.5,3.5z M15,20H6c-0.55,0-1-0.45-1-1v-1h10V20z M19,19c0,0.55-0.45,1-1,1s-1-0.45-1-1v-3H8V5h11V19z"/><rect height="2" width="6" x="9" y="7"/><rect height="2" width="2" x="16" y="7"/><rect height="2" width="6" x="9" y="10"/><rect height="2" width="2" x="16" y="10"/></g>\n        </svg>',point_of_sale:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <rect fill="none" height="24" width="24"/><path d="M17,2H7C5.9,2,5,2.9,5,4v2c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V4C19,2.9,18.1,2,17,2z M17,6H7V4h10V6z M20,22H4 c-1.1,0-2-0.9-2-2v-1h20v1C22,21.1,21.1,22,20,22z M18.53,10.19C18.21,9.47,17.49,9,16.7,9H7.3c-0.79,0-1.51,0.47-1.83,1.19L2,18 h20L18.53,10.19z M9.5,16h-1C8.22,16,8,15.78,8,15.5C8,15.22,8.22,15,8.5,15h1c0.28,0,0.5,0.22,0.5,0.5C10,15.78,9.78,16,9.5,16z M9.5,14h-1C8.22,14,8,13.78,8,13.5C8,13.22,8.22,13,8.5,13h1c0.28,0,0.5,0.22,0.5,0.5C10,13.78,9.78,14,9.5,14z M9.5,12h-1 C8.22,12,8,11.78,8,11.5C8,11.22,8.22,11,8.5,11h1c0.28,0,0.5,0.22,0.5,0.5C10,11.78,9.78,12,9.5,12z M12.5,16
1h-1 c-0.28,0-0.5-0.22-0.5-0.5c0-0.28,0.22-0.5,0.5-0.5h1c0.28,0,0.5,0.22,0.5,0.5C13,15.78,12.78,16,12.5,16z M12.5,14h-1 c-0.28,0-0.5-0.22-0.5-0.5c0-0.28,0.22-0.5,0.5-0.5h1c0.28,0,0.5,0.22,0.5,0.5C13,13.78,12.78,14,12.5,14z M12.5,12h-1 c-0.28,0-0.5-0.22-0.5-0.5c0-0.28,0.22-0.5,0.5-0.5h1c0.28,0,0.5,0.22,0.5,0.5C13,11.78,12.78,12,12.5,12z M15.5,16h-1 c-0.28,0-0.5-0.22-0.5-0.5c0-0.28,0.22-0.5,0.5-0.5h1c0.28,0,0.5,0.22,0.5,0.5C16,15.78,15.78,16,15.5,16z M15.5,14h-1 c-0.28,0-0.5-0.22-0.5-0.5c0-0.28,0.22-0.5,0.5-0.5h1c0.28,0,0.5,0.22,0.5,0.5C16,13.78,15.78,14,15.5,14z M15.5,12h-1 c-0.28,0-0.5-0.22-0.5-0.5c0-0.28,0.22-0.5,0.5-0.5h1c0.28,0,0.5,0.22,0.5,0.5C16,11.78,15.78,12,15.5,12z"/>\n        </svg>',price_change:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><path d="M0,0h24v24H0V0z" fill="none"/></g><g><g><path d="M8,17h2v-1h1c0.55,0,1-0.45,1-1v-3c0-0.55-0.45-1-1-1H8v-1h4V8h-2V7H8v1H7C6.45,8,6,8.45,6,9v3c0,0.55,0.45,1,1,1h3v1H6v2 h2V17z M20,4H4C2.89,4,2.01,4.89,2.01,6L2,18c0,1.11,0.89,2,2,2h16c1.11,0,2-0.89,2-2V6C22,4.89,21.11,4,20,4z M20,18H4V6h16V18z M14,10l2-2l2,2 M18,14.25l-2,2l-2-2"/></g></g>\n        </svg>',currency_exchange:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><path d="M12.89,11.1c-1.78-0.59-2.64-0.96-2.64-1.9c0-1.02,1.11-1.39,1.81-1.39c1.31,0,1.79,0.99,1.9,1.34l1.58-0.67 C15.39,8.03,14.72,6.56,13,6.24V5h-2v1.26C8.52,6.82,8.51,9.12,8.51,9.22c0,2.27,2.25,2.91,3.35,3.31 c1.58,0.56,2.28,1.07,2.28,2.03c0,1.13-1.05,1.61-1.98,1.61c-1.82,0-2.34-1.87-2.4-2.09L8.1,14.75c0.63,2.19,2.28,2.78,2.9,2.96V19 h2v-1.24c0.4-0.09,2.9-0.59,2.9-3.22C15.9,13.15,15.29,11.93,12.89,11.1z M3,21H1v-6h6v2l-2.48,0c1.61,2.41,4.36,4,7.48,4 c4.97,0,9-4.03,9-9h2c0,6.08-4.92,11-11,11c-3.72,0-7.01-1.85-9
1-4.67L3,21z M1,12C1,5.92,5.92,1,12,1c3.72,0,7.01,1.85,9,4.67L21,3 h2v6h-6V7l2.48,0C17.87,4.59,15.12,3,12,3c-4.97,0-9,4.03-9,9H1z"/></g>\n        </svg>',calculate:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><g><path d="M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M19,19H5V5h14V19z"/><rect height="1.5" width="5" x="6.25" y="7.72"/><rect height="1.5" width="5" x="13" y="15.75"/><rect height="1.5" width="5" x="13" y="13.25"/><polygon points="8,18 9.5,18 9.5,16 11.5,16 11.5,14.5 9.5,14.5 9.5,12.5 8,12.5 8,14.5 6,14.5 6,16 8,16"/><polygon points="14.09,10.95 15.5,9.54 16.91,10.95 17.97,9.89 16.56,8.47 17.97,7.06 16.91,6 15.5,7.41 14.09,6 13.03,7.06 14.44,8.47 13.03,9.89"/></g></g>\n        </svg>',handshake:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><path d="M12.22,19.85c-0.18,0.18-0.5,0.21-0.71,0c-0.18-0.18-0.21-0.5,0-0.71l3.39-3.39l-1.41-1.41l-3.39,3.39 c-0.19,0.2-0.51,0.19-0.71,0c-0.21-0.21-0.18-0.53,0-0.71l3.39-3.39l-1.41-1.41l-3.39,3.39c-0.18,0.18-0.5,0.21-0.71,0 c-0.19-0.19-0.19-0.51,0-0.71l3.39-3.39L9.24,10.1l-3.39,3.39c-0.18,0.18-0.5,0.21-0.71,0c-0.19-0.2-0.19-0.51,0-0.71L9.52,8.4 l1.87,1.86c0.95,0.95,2.59,0.94,3.54,0c0.98-0.98,0.98-2.56,0-3.54l-1.86-1.86l0.28-0.28c0.78-0.78,2.05-0.78,2.83,0l4.24,4.24 c0.78,0.78,0.78,2.05,0,2.83L12.22,19.85z M21.83,13.07c1.56-1.56,1.56-4.09,0-5.66l-4.24-4.24c-1.56-1.56-4.09-1.56-5.66,0 l-0.28,0.28l-0.28-0.28c-1.56-1.56-4.09-1.56-5.66,0L2.17,6.71c-1.42,1.42-1.55,3.63-0.4,5.19l1.45-1.45 C2.83,9.7,2.96,8.75,3.59,8.12l3.54-3.54c0.78-0.78,2.05-0.78,2.83,0l3.56,3.56c0.18,0.18,0.21,0.5,0,0.71 c-0.21,0.21-0.53,0.18-0.71,0L9.52,5.57l-5.8,5.79c-0.98,0.97-0.98,2.56,0,3.54c0.39,0.39,0.89,0.63,1.42,0.7 c0.07,0.52,0.3,1.02,0.7,1.42c0.4,0.4,0.9,0.63,1.42,0.7c0.07,0.52,0.3,1.02,0.7,1.42c0.4,0.4,0.9,0.63,1.42,0.7 c0.07,0.54,0.31,1.03,0.7,1.42c0.47,0.47,1.1,0.73,1.77,0.73c0.67,0,1.3-0.26,1.77-0.73L21.83,13.07z"/></g>\n        </svg>',church:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><rect fill="none" height="24" width="24"/></g><g><g><path d="M18,12.22V9l-5-2.5V5h2V3h-2V1h-2v2H9v2h2v1.5L6,9v3.22L2,14v8h9v-4c0-0.55,0.45-1,1-1s1,0.45,1,1v4h9v-8L18,12.22z M20,20h-5v-2.04c0-1.69-1.35-3.06-3-3.06c-1.65,0-3,1.37-3,3.06V20H4v-4.79l4-1.81v-3.35L12,8l4,2.04v3.35l4,1.81V20z"/><circle cx="12" cy="12" r="1.5"/></g></g>\n        </svg>',price_check:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <g><path d="M0,0h24v24H0V0z" fill="none"/></g><g><g><path d="M11,13V9c0-0.55-0.45-1-1-1H6V6h5V4H8.5V3h-2v1H5C4.45,4,4,4.45,4,5v4c0,0.55,0.45,1,1,1h4v2H4v2h2.5v1h2v-1H10 C10.55,14,11,13.55,11,13z"/><polygon points="19.59,12.52 13.93,18.17 11.1,15.34 9.69,16.76 13.93,21 21,13.93"/></g></g>\n        </svg>',call_split:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M14 4l2.29 2.29-2.88 2.88 1.42 1.42 2.88-2.88L20 10V4h-6zm-4 0H4v6l2.29-2.29 4.71 4.7V20h2v-8.41l-5.29-5.3L10 4z"/>\n        </svg>',money_off:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M12.5 6.9c1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-.39.08-.75.21-1.1.36l1.51 1.51c.32-.08.69-.13 1.09-.13zM5.47 3.92L4.06 5.33 7.5 8.77c0 2.08 1.56 3.22 3.91 3.91l3.51 3.51c-.34.49-1.05.91-2.42.91-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c.96-.18 1.83-.55 2.46-1.12l2.22 2.22 1.41-1.41L5.47 3.92z"/>\n        </svg>',trending_down:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 18l2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6h-6z"/>\n        </svg>',swap_vert:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"/>\n        </svg>',note:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 4H4c-1.1 0-2 .9-2 2v12.01c0 1.1.9 1.99 2 1.99h16c1.1 0 2-.9 2-2v-8l-6-6zM4 18.01V6h11v5h5v7.01H4z"/>\n        </svg>',trophy:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n            <rect fill="none" height="24" width="24"/><path d="M19,5h-2V3H7v2H5C3.9,5,3,5.9,3,7v1c0,2.55,1.92,4.63,4.39,4.94c0.63,1.5,1.98,2.63,3.61,2.96V19H7v2h10v-2h-4v-3.1 c1.63-0.33,2.98-1.46,3.61-2.96C19.08,12.63,21,10.55,21,8V7C21,5.9,20.1,5,19,5z M5,8V7h2v3.82C5.84,10.4,5,9.3,5,8z M12,14 c-1.65,0-3-1.35-3-3V5h6v6C15,12.65,13.65,14,12,14z M19,8c0,1.3-0.84,2.4-2,2.82V7h2V8z"/>\n        </svg>',pause:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960">\n            <path d="M520-200v-560h240v560zm-320 0v-560h240v560zm400-80h80v-400h-80zm-320 0h80v-400h-80zm0-400v400zm320 0v400z"/>\n        </svg>',close:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960">\n            <path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/>\n        </svg>'},q={},at={},st={};Object.keys(nt),Object.keys(W),Object.keys(z),Object.keys(st),Object.keys(at),Object.keys(q);class St{static getSvgIcon(t,e="default"){switch(e){case"material_outlined":return z[t]||"";case"material_filled":return W[t]||"";case"material_two_toned":return st[t]||"";case"material_sharp":return at[t]||"";case"material_rounded":return q[t]||"";default:return nt[t]||""}}
1static getSvgIconHTML({svgIcon:t,width:e,height:n,color:i,className:s,svgIconType:o}){let l=St.getSvgIconElement(t,e,n,i,s,o);return l||(l=St.getSvgIconElement("schedule",e,n,i,s),console.warn(`SVG icon "${t}" not found for type "${o}". Falling back to default icon.`)),l.outerHTML}static getSvgIconInnerHTML({svgIcon:t,width:e,height:n,color:i,className:s,svgIconType:o}){let l=St.getSvgIconElement(t,e,n,i,s,o);return l||(l=St.getSvgIconElement("schedule",e,n,i,s),console.warn(`SVG icon "${t}" not found for type "${o}". Falling back to default icon.`)),l.innerHTML}static getSvgIconElement(t,e,n,i,s,o="default"){var l,u,d,g,I,C;let S;switch(o){case"material_outlined":S=(null===(l=St.svgMaterialOutlinedElementsMap[t])||void 0===l?void 0:l.cloneNode(!0))||null;break;case"material_filled":S=(null===(u=St.svgMaterialFilledElementsMap[t])||void 0===u?void 0:u.cloneNode(!0))||null;break;case"material_two_toned":S=(null===(d=St.svgMaterialTwoTonedElementsMap[t])||void 0===d?void 0:d.cloneNode(!0))||null;break;case"material_sharp":S=(null===(g=St.svgMaterialSharpElementsMap[t])||void 0===g?void 0:g.cloneNode(!0))||null;break;case"material_rounded":S=(null===(I=St.svgMaterialRoundedElementsMap[t])||void 0===I?void 0:I.cloneNode(!0))||null;break;default:S=(null===(C=St.svgElementsMap[t])||void 0===C?void 0:C.cloneNode(!0))||null}return null!=S&&(null!=e&&(S.style.width=e+"px"),null!=n&&(S.style.height=n+"px"),null!=i&&""!==i.trim()&&(S.style.fill=i),null!=s&&""!==s.trim()&&S.classList.add(...s.trim().split(/\s+/)),S.classList.contains("wtk-icon-svg")||S.classList.add("wtk-icon-svg")),S}static convertToElement(t){const e={},n=new DOMParser;return Object.keys(t).forEach(i=>{const s=n.parseFromString(t[i],"image/svg+xml").documentElement;e[i]=s}),e}constructor(){}}St.svgElementsMap=St.convertToElement(nt),St.svgMaterialOutlinedElementsMap=St.convertToElement(z),St.svgMaterialFilledElementsMap=St.convertToElement(W),St.svgMaterialTwoTonedElementsMap=St.convertToElement(st),St.svgMaterialSharpElementsMap=St.convertToElement(at),St.svgMaterialRoundedElementsMap=St.convertToElement(q);const Ft=new DOMParser;var xt;!function(a){a.GLOBAL="Global",a.CODE_0="Global",a.WO="Global",a.AF="Afghanistan",a.AFG="Afghanistan",a.AX="Aland",a.ALA="Aland",a.AL="Albania",a.ALB="Albania",a.DZ="Algeria",a.DZA="Algeria",a.AS="American-Samoa",a.ASAM="American-Samoa",a.AD="Andorra",a.AND="Andorra",a.AO="Angola",a.AGO="Angola",a.AI="Anguilla",a.AIA="Anguilla",a.AQ="Antarctica",a.ATA="Antarctica",a.AG="Antigua-and-Barbuda",a.ATG="Antigua-and-Barbuda",a.AR="Argentina",a.ARG="Argentina",a.ARGENTINA="Argentina",a.CODE_54="Argentina",a.AM="Armenia",a.ARM="Armenia",a.AW="Aruba",a.ABW="Aruba",a.AU="Australia",a.AUS="Australia",a.AUSTRALIA="Australia",a.CODE_61="Australia",a.AT="Austria",a.AUT="Austria",a.AUSTRIA="Austria",a.CODE_43="Austria",a.AZ="Azerbaijan",a.AZB="Azerbaijan",a.BS="Bahamas",a.BHS="Bahamas",a.BH="Bahrain",a.BHR="Bahrain",a.BD="Bangladesh",a.BGD="Bangladesh",a.BB="Barbados",a.BRB="Barbados",a.BY="Belarus",a.BLR="Belarus",a.BE="Belgium",a.BEL="Belgium",a.BELGIUM="Belgium",a.CODE_32="Belgium",a.BZ="Belize",a.BLZ="Belize",a.BJ="Benin",a.BEN="Benin",a.BM="Bermuda",a.BMU="Bermuda",a.BT="Bhutan",a.BTN="Bhutan",a.BO="Bolivia",a.BOL="Bolivia",a.BA="Bosnia-and-Herzegovina",a.BIH="Bosnia-and-Herzegovina",a.BW="Botswana",a.BWA="Botswana",a.BOTSWANA="Botswana",a.CODE_267="Botswana",a.BR="Brazil",a.BRA="Brazil",a.BRAZIL="Brazil",a.CODE_55="Brazil",a.IO="British-Antarctic-Territory",a.IOT="British-Antarctic-Territory",a.VG="British-Virgin-Islands",a.VGB="British-Virgin-Islands",a.BN="Brunei",a.BRN="Brunei",a.BG="Bulgaria",a.BGR="Bulgaria",a.BULGARIA="Bulgaria",a.CODE_359="Bulgaria",a.BF="Burkina-Faso",a.BFA="Burkina-Faso",a.BI="Burundi",a.BDI="Burundi",a.KH="Cambodia",a.KHM="Cambodia",a.CM="Cameroon",a.CMR="Cameroon",a.CA="Canada",a.CAN="Canada",a.CANADA="Canada",a.CODE_2="Canada",a.CV="Cape-Verde",a.CPV="Cape-Verde",a.KY="Cayman-Islands",a.CYM="Cayman-Islands",a.CF="Central-African-Republic",a.CAF="Central-African-Republic",a.TD="Chad",a.TCD="Chad",a.CL="Chile",a.CHL="Chile",a.CHILE="Chile",a.CODE_56="Chile",a.CN="China",a.CHN="China",a.CHINA="China",a.CODE_86="China",a.CX="Christmas-Island",a.CXR="Christmas-Island",a.CC="Cocos-Keeling-Islands",a.CCK="Cocos-Keeling-Islands",a.CO="Colombia",a.COL="Colombia",a.KM="Comoros",a.COM="Comoros",a.CK="Cook-Islands",a.COK="Cook-Islands",a.CR="Costa-Rica",a.CRI="Costa-Rica",a.CI="Cote-dIvoire",a.CIV="Cote-dIvoire",a.HR="Croatia",a.HRV="Croatia",a.CROATIA="Croatia",a.CODE_385="Croatia",a.CU="Cuba",a.CUB="Cuba",a.CW="Curacao",a.CUW="Curacao",a.CY="Cyprus",a.CYP="Cyprus",a.CZ="Czech-Republic",a.CZE="Czech-Republic",a.CZECH_REPUBLIC="Czech-Republic",a.CODE_420="Czech-Republic",a.CD="Democratic-Republic-of-the-Congo",a.COD="Democratic-Republic-of-the-Congo",a.DK="Denmark",a.DNK="Denmark",a.DENMARK="Denmark",a.CODE_45="Denmark",a.DJ="Djibouti",a.DJI="Djibouti",a.DM="Dominica",a.DMA="Dominica",a.DO="Dominican-Republic",a.DOM="Dominican-Republic",a.TL="East-Timor",a.TLS="East-Timor",a.EC="Ecuador",a.ECU="Ecuador",a.EG="Egypt",a.EGY="Egypt",a.EGYPT="Egypt",a.CODE_20="Egypt",a.SV="El-Salvador",a.SLV="El-Salvador",a.GQ="Equatorial
1-Guinea",a.GNQ="Equatorial-Guinea",a.ER="Eritrea",a.ERI="Eritrea",a.EE="Estonia",a.EST="Estonia",a.ESTONIA="Estonia",a.CODE_372="Estonia",a.ET="Ethiopia",a.ETH="Ethiopia",a.EU="European-Union",a.FK="Falkland-Islands",a.FLK="Falkland-Islands",a.FO="Faroes",a.FRO="Faroes",a.FJ="Fiji",a.FJI="Fiji",a.FI="Finland",a.FIN="Finland",a.FINLAND="Finland",a.CODE_358="Finland",a.FR="France",a.FRA="France",a.FRANCE="France",a.CODE_33="France",a.PF="French-Polynesia",a.PYF="French-Polynesia",a.TF="French-Southern-Territories",a.ATF="French-Southern-Territories",a.GA="Gabon",a.GAV="Gabon",a.GM="Gambia",a.GMB="Gambia",a.GE="Georgia",a.GEO="Georgia",a.DE="Germany",a.DEU="Germany",a.CODE_49="Germany",a.GH="Ghana",a.GHA="Ghana",a.GHANA="Ghana",a.CODE_233="Ghana",a.GI="Gibraltar",a.GIB="Gibraltar",a.GR="Greece",a.GRC="Greece",a.GREECE="Greece",a.CODE_30="Greece",a.GL="Greenland",a.GRL="Greenland",a.GD="Grenada",a.GRD="Grenada",a.GU="Guam",a.GUM="Guam",a.GT="Guatemala",a.GTM="Guatemala",a.GG="Guernsey",a.GGY="Guernsey",a.GN="Guinea",a.GIN="Guinea",a.GW="Guinea-Bissau",a.GNB="Guinea-Bissau",a.GY="Guyana",a.GUY="Guyana",a.HT="Haiti",a.HTI="Haiti",a.HN="Honduras",a.HND="Honduras",a.HK="Hong-Kong",a.HKG="Hong-Kong",a.HONG_KONG="Hong-Kong",a.CODE_852="Hong-Kong",a.HU="Hungary",a.HUN="Hungary",a.HUNGARY="Hungary",a.CODE_36="Hungary",a.IS="Iceland",a.ISL="Iceland",a.ICELAND="Iceland",a.CODE_354="Iceland",a.IN="India",a.IND="India",a.INDIA="India",a.CODE_91="India",a.ID="Indonesia",a.IDN="Indonesia",a.INDONESIA="Indonesia",a.CODE_62="Indonesia",a.IR="Iran",a.IRN="Iran",a.IQ="Iraq",a.IRQ="Iraq",a.IE="Ireland",a.IRL="Ireland",a.IRELAND="Ireland",a.CODE_353="Ireland",a.IM="Isle-of-Man",a.IMN="Isle-of-Man",a.IL="Israel",a.ISR="Israel",a.ISRAEL="Israel",a.CODE_972="Israel",a.IT="Italy",a.ITA="Italy",a.ITALY="Italy",a.CODE_39="Italy",a.JM="Jamaica",a.JAM="Jamaica",a.JP="Japan",a.JPN="Japan",a.JAPAN="Japan",a.CODE_81="Japan",a.JE="Jersey",a.JEY="Jersey",a.JO="Jordan",a.JOR="Jordan",a.KZ="Kazakhstan",a.KAZ="Kazakhstan",a.KE="Kenya",a.KEN="Kenya",a.KENYA="Kenya",a.CODE_254="Kenya",a.KI="Kiribati",a.KIR="Kiribati",a.KW="Kuwait",a.KWT="Kuwait",a.KG="Kyrgyzstan",a.KGZ="Kyrgyzstan",a.KYRGYZSTAN="Kyrgyzstan",a.CODE_996="Kyrgyzstan",a.LA="Laos",a.LAO="Laos",a.LV="Latvia",a.LVA="Latvia",a.LATVIA="Latvia",a.CODE_371="Latvia",a.LB="Lebanon",a.LBN="Lebanon",a.LS="Lesotho",a.LSO="Lesotho",a.LR="Liberia",a.LBR="Liberia",a.LY="Libya",a.LBY="Libya",a.LI="Liechtenstein",a.LIE="Liechtenstein",a.LT="Lithuania",a.LTU="Lithuania",a.LITHUANIA="Lithuania",a.CODE_370="Lithuania",a.LU="Luxembourg",a.LUX="Luxembourg",a.LUXEMBOURG="Luxembourg",a.CODE_352="Luxembourg",a.MO="Macau",a.MAC="Macau",a.MK="Macedonia",a.MKD="Macedonia",a.MG="Madagascar",a.MDG="Madagascar",a.MW="Malawi",a.MWI="Malawi",a.MALAWI="Malawi",a.CODE_265="Malawi",a.MY="Malaysia",a.MYS="Malaysia",a.MALAYSIA="Malaysia",a.CODE_60="Malaysia",a.MV="Maldives",a.MDV="Maldives",a.ML="Mali",a.MLI="Mali",a.MT="Malta",a.MLT="Malta",a.MALTA="Malta",a.CODE_356="Malta",a.MH="Marshall-Islands",a.MHL="Marshall-Islands",a.MQ="Martinique",a.MTQ="Martinique",a.MR="Mauritania",a.MRT="Mauritania",a.MU="Mauritius",a.MUS="Mauritius",a.MAURITIUS="Mauritius",a.CODE_230="Mauritius",a.YT="Mayotte",a.MYT="Mayotte",a.MX="Mexico",a.MEX="Mexico",a.MEXICO="Mexico",a.CODE_52="Mexico",a.FM="Micronesia",a.FSM="Micronesia",a.MD="Moldova",a.MDA="Moldova",a.MC="Monaco",a.MCO="Monaco",a.MN="Mongolia",a.MNG="Mongolia",a.ME="Montenegro",a.MNE="Montenegro",a.MS="Montserrat",a.MSR="Montserrat",a.MA="Morocco",a.MAR="Morocco",a.MOROCCO="Morocco",a.CODE_212="Morocco",a.MZ="Mozambique",a.MOZ="Mozambique",a.MOZAMBIQUE="Mozambique",a.CODE_258="Mozambique",a.MM="Myanmar",a.MMR="Myanmar",a.NA="Namibia",a.NAM="Namibia",a.NAMIBIA="Namibia",a.CODE_264="Namibia",a.NR="Nauru",a.NRU="Nauru",a.NP="Nepal",a.NPL="Nepal",a.NL="Netherlands",a.NLD="Netherlands",a.NETHERLANDS="Netherlands",a.CODE_31="Netherlands",a.NC="New-Caledonia",a.NCL="New-Caledonia",a.NZ="New-Zealand",a.NZL="New-Zealand",a.NEW_ZEALAND="New-Zealand",a.CODE_64="New-Zealand",a.NI="Nicaragua",a.NIC="Nicaragua",a.NE="Niger",a.NER="Niger",a.NG="Nigeria",a.NGA="Nigeria",a.NIGERIA="Nigeria",a.CODE_234="Nigeria",a.NU="Niue",a.NIU="Niue",a.NF="Norfolk-Island",a.NFK="Norfolk-Island",a.MP="Northern-Mariana-Islands",a.MNP="Northern-Mariana-Islands",a.KP="North-Korea",a.PRK="North-Korea",a.NO="Norway",a.NOR="Norway",a.NORWAY="Norway",a.CODE_47="Norway",a.OM="Oman",a.OMN="Oman",a.PK="Pakistan",a.PAK="Pakistan",a.PAKISTAN="Pakistan",a.CODE_92="Pakistan",a.PW="Palau",a.PLW="Palau",a.PS="Palestine",a.PSE="Palestine",a.PA="Panama",a.PAN="Panama",a.PG="Papua-New-Guinea",a.PNG="Papua-New-Guinea",a.PY="Paraguay",a.PRY="Paraguay",a.PE="Peru",a.PER="Peru",a.PH="Philippines",a.PHL="Philippines",a.PHILIPPINES="Philippines",a.CODE_63="Philippines",a.PN="Pitcairn-Islands",a.PCN="Pitcairn-Islands",a.PL="Poland",a.POL="Poland",a.POLAND="Poland",a.CODE_48="Poland",a.PT="Portugal",a.PRT="Portugal",a.PORTUGAL="Portugal",a.CODE_351="Portugal",a.PR="Puerto-Rico",a.PRI="Puerto-Rico",a.QA="Qatar",a.QAT="Qatar",a.CG="Republic-of-the-Congo",a.COG="Republic-of-the-Congo",a.RO="Romania",a.ROU="Romania",a.ROMANIA="Romania",a.CODE_40="Romania",a.RU="Russia",a.RUS="Russia",a.RUSSIAN_FEDERATION="Russia",a.CODE_7="Russia",a.RW="Rwanda",a.RWA="Rwanda",a.RWANDA="Rwanda",a.CODE_250="Rwanda",a.BL="Saint-Barthelemy",a.BLM="Saint-Barthelemy",a.SH="Saint-Helena",a.SHN="Saint-Helena",a.KN="Saint-Kitts-and-Nevis",a.KNA="Saint-Kitts-and-Nevis",a.LC="Saint-Lucia",a.LCA="Saint-Lucia",a.MF="Saint-Martin",a.MAF="Saint-Martin",a.VC="Saint-Vincent-and-the-Grenadines",a.VCT="Saint-Vincent-and-the-Grenadines",a.WS="Samoa",a.WSM="Samoa",a.SM="San-Marino",a.SMR="San-Marino",a.ST="Sao-Tome-and-Principe",a.STP="Sao-Tome-and-Principe",a.SA="Saudi-Arabia",a.SAU="Saudi-Arabia",a.SN="Senegal",a.SEN="Senegal",a.RS="Serb
1ia",a.SRB="Serbia",a.SC="Seychelles",a.SYC="Seychelles",a.SL="Sierra-Leone",a.SLE="Sierra-Leone",a.SG="Singapore",a.SGP="Singapore",a.SINGAPORE="Singapore",a.CODE_65="Singapore",a.SK="Slovakia",a.SVK="Slovakia",a.SI="Slovenia",a.SVN="Slovenia",a.SB="Solomon-Islands",a.SLB="Solomon-Islands",a.SO="Somalia",a.SOM="Somalia",a.ZA="South-Africa",a.ZAF="South-Africa",a.SOUTH_AFRICA="South-Africa",a.CODE_27="South-Africa",a.GS="South-Georgia-and-the-South-Sandwich-Islands",a.SGS="South-Georgia-and-the-South-Sandwich-Islands",a.KR="South-Korea",a.KOR="South-Korea",a.KOREA_REPUBLIC_OF="South-Korea",a.CODE_82="South-Korea",a.SS="South-Sudan",a.SSD="South-Sudan",a.ES="Spain",a.ESP="Spain",a.SPAIN="Spain",a.CODE_34="Spain",a.LK="Sri-Lanka",a.LKA="Sri-Lanka",a.SD="Sudan",a.SDN="Sudan",a.SR="Suriname",a.SUR="Suriname",a.SZ="Swaziland",a.SZK="Swaziland",a.SWAZILAND="Swaziland",a.CODE_268="Swaziland",a.SE="Sweden",a.SWE="Sweden",a.SWEDEN="Sweden",a.CODE_46="Sweden",a.CH="Switzerland",a.CHE="Switzerland",a.SWITZERLAND="Switzerland",a.CODE_41="Switzerland",a.SY="Syria",a.SYR="Syria",a.TW="Taiwan",a.TWN="Taiwan",a.TAIWAN_PROVINCE_OF_CHINA="Taiwan",a.CODE_886="Taiwan",a.TJ="Tajikistan",a.TJK="Tajikistan",a.TZ="Tanzania",a.TZA="Tanzania",a.TANZANIA_UNITED_REPUBLIC_OF="Tanzania",a.CODE_255="Tanzania",a.TH="Thailand",a.THA="Thailand",a.THAILAND="Thailand",a.CODE_66="Thailand",a.TG="Togo",a.TGO="Togo",a.TK="Tokelau",a.TKL="Tokelau",a.TO="Tonga",a.TON="Tonga",a.TT="Trinidad-and-Tobago",a.TTO="Trinidad-and-Tobago",a.TN="Tunisia",a.TUN="Tunisia",a.TUNISIA="Tunisia",a.CODE_216="Tunisia",a.TR="Turkey",a.TUR="Turkey",a.TURKEY="Turkey",a.CODE_90="Turkey",a.TM="Turkmenistan",a.TKM="Turkmenistan",a.TC="Turks-and-Caicos-Islands",a.TCA="Turks-and-Caicos-Islands",a.TV="Tuvalu",a.TUV="Tuvalu",a.UG="Uganda",a.UGA="Uganda",a.UGANDA="Uganda",a.CODE_256="Uganda",a.UA="Ukraine",a.UKR="Ukraine",a.UKRAINE="Ukraine",a.CODE_380="Ukraine",a.AE="United-Arab-Emirates",a.ARE="United-Arab-Emirates",a.GB="United-Kingdom",a.GBR="United-Kingdom",a.UNITED_KINGDOM="United-Kingdom",a.CODE_44="United-Kingdom",a.UN="United-Nations",a.US="United-States",a.USA="United-States",a.UNITED_STATES="United-States",a.CODE_1="United-States",a.UNKNOWN="Unknown",a.CODE_99="Unknown",a.INFRONT_997="Unknown",a.UY="Uruguay",a.URY="Uruguay",a.VI="US-Virgin-Islands",a.VIR="US-Virgin-Islands",a.UZ="Uzbekistan",a.UZB="Uzbekistan",a.VU="Vanuatu",a.VUT="Vanuatu",a.VA="Vatican-City",a.VAT="Vatican-City",a.VE="Venezuela",a.VEN="Venezuela",a.VENEZUELA_BOLIVARIAN_REPUBLIC_OF="Venezuela",a.CODE_58="Venezuela",a.VN="Vietnam",a.VNM="Vietnam",a.VIETNAM="Vietnam",a.CODE_84="Vietnam",a.WF="Wallis-And-Futuna",a.WLF="Wallis-And-Futuna",a.EH="Western-Sahara",a.ESH="Western-Sahara",a.YE="Yemen",a.YEM="Yemen",a.ZM="Zambia",a.ZMB="Zambia",a.ZAMBIA="Zambia",a.CODE_260="Zambia",a.ZW="Zimbabwe",a.ZWE="Zimbabwe",a.ZIMBABWE="Zimbabwe",a.CODE_263="Zimbabwe"}(xt||(xt={}));const $t=Object.values(xt),ne="group_",ae=[`${ne}Intraday`,`${ne}Cursor`,`${ne}Display`,`${ne}PriceAdjustments`,"watermarkType","watermarkCustomText","gridType","showAlternateGridColor","mainOnTop","showNavigator","showLegend","showTooltip","streaming","caching","showHighLow","showHigh","showLow","showPrevClose","isPrevCloseCompareValue","prevCloseType","cursorSnapX","cursorSnapY","cursorType","ordinateScaling","ordinateCompareBase","showOrdinate","showOppositeOrdinate","ordinateType","ordinateLabelsOutside","showSeriesLabels","showSplits","showDividends","showCalendar","calendarFeeds","showNews","
1showReleases","adjustSplits","adjustDividends"],oe=["streaming","caching","adjustDividends","adjustSplits","targetCurrency","calendarFeeds"],ge=["element","source","showTopToolbar","showBottomToolbar","availableCalendarFeeds","currentResolutionList","tooltipOffsets"],Oe=[`${ne}VolumeBars`,`${ne}VolumeUnderlay`,`${ne}VolumeCommon`,`${ne}Display`,`${ne}PriceAdjustments`,"visible","targetCurrency","chartType","dataType","color","upWickColor","wickColor","upColor","downColor","negativeColor","lineColor","lineWidth","showVolume","volumeUseUpDownColors","showVolumeUnderlay","volumeUnderlayUseUpDownColors","volumeType","volumePositiveColor","volumeNegativeColor","volumeColor","showSplits","showDividends","showCalendar","showNews","showReleases","adjustSplits","adjustDividends"],Xe=["showCalendar","adjustSplits","adjustDividends","targetCurrency"],pn=[r.InfrontSDK.SymbolField.FullName,r.InfrontSDK.SymbolField.PreDisplayTicker,r.InfrontSDK.SymbolField.SymbolSubType,r.InfrontSDK.SymbolField.SymbolType,r.InfrontSDK.SymbolField.SymbolClassification,r.InfrontSDK.SymbolField.Ticker,r.InfrontSDK.SymbolField.Currency,r.InfrontSDK.SymbolField.Decimals,r.InfrontSDK.SymbolField.Last,r.InfrontSDK.SymbolField.YesterdayClose,r.InfrontSDK.SymbolField.AccumulatedVolume,r.InfrontSDK.SymbolField.Turnover],Me=[wt.CANDLESTICK,wt.HOLLOWCANDLESTICK,wt.HEIKINASHI],Vn=[...Me,wt.OHLC];var Gt,un,rn,Dn,Pe,se,Qt,an,Rn,Nn,Bn,yn,ni,Ai,Zn,pi,Ii,yi,ji,pe,xe;function Mi(a){return!["selected"].some(t=>void 0===a[t])}function hr(a){return!["isOpen","items"].some(t=>void 0===a[t])}(function(a){a.AUTO="automatic",a.OPEN="open",a.HIGH="high",a.LOW="low",a.CLOSE="close",a.BID="bid",a.ASK="ask",a.MID="mid",a.BID_ASK="bidask",a.PERFORMANCE="performance"})(Gt||(Gt={})),function(a){a.OHLC="OHLC",a.CLOSE="CLOSE"}(un||(un={})),function(a){a.VOLUME="VOLUME",a.TURNOVER="TURNOVER"}(rn||(rn={})),function(a){a.LINEAR="linear",a.LOGARITHMIC="logarithmic"}(Dn||(Dn={})),function(a){a.AUTO="automatic",a.RELATIVE="relative",a.ABSOLUTE="absolute",a.REBASE_ON_MAIN="rebaseOnMain"}(Pe||(Pe={})),function(a){a.ABSCISSA="abscissa",a.ORDINATE="ordinate",a.OPPOSITE="oppositeOrdinate",a.OSCILLATOR="oscillator",a.GHOST="ghost"}(se||(se={})),function(a){a.MAIN="main-",a.INSTRUMENT="instrument-",a.UNDERLYING="underlying-",a.INDICATOR="indicator-",a.OSCILLATOR="oscillator-",a.VOLUME_UNDERLAY="volumeUnderlay-",a.TURNOVER_UNDERLAY="turnoverUnderlay-",a.VOLUME="volume-",a.TURNOVER="turnover-",a.LOW="low-",a.HIGH="high-",a.PREV_CLOSE="prevClose-",a.GHOST="ghost-",a.GHOST_VOLUME="ghostVolume-",a.GHOST_TURNOVER="ghostTurnover-",a.ANNOTATION="annotation-",a.SPLIT="split-",a.DIVIDEND="dividend-",a.CALENDAR="calendar-",a.PLOTLINE_BASELINE="plotlineBaseline-",a.PLOTLINE_PREV_CLOSE="plotlinePrevClose-"}(Qt||(Qt={})),function(a){a.SPLIT="SPLIT",a.DIVIDEND="DIVIDEND",a.CALENDAR="CALENDAR"}(an||(an={})),function(a){a.NONE="none",a.GRID="grid",a.VERTICAL="vertical",a.HORIZONTAL="horizontal"}(Rn||(Rn={})),function(a){a.VERTICAL="verticalLine",a.CROSSHAIR="crosshair",a.ARROW="arrow"}(Nn||(Nn={})),function(a){a.NONE="none",a.HIDE_SERIES="hide",a.EDIT_SERIES="edit",a.REMOVE_SERIES="remove",a.EDIT_REMOVE_SERIES="edit-remove"}(Bn||(Bn={})),function(a){a.NONE="none",a.SYMBOL="symbol",a.DESCRIPTION="description",a.CUSTOM="custom"}(yn||(yn={})),function(a){a.COLOR="color",a.BLACK="black",a.WHITE="white"}(ni||(ni={})),function(a){a.BOTTOM_LEFT="bottom-left",a.BOTTOM_RIGHT="bottom-right"}(Ai||(Ai={})),function(a){a.LINE="line",a.DOT="dot"}(Zn||(Zn={})),function(a){a.ORIGINAL="original",a.NEXT="next"}(pi||(pi={})),function(a){a[a.CLASSIFICATION=0]="CLASSIFICATION",a[a.TYPE=1]="TYPE"}(Ii||(Ii={})),function(a){a.CHECKBOX="checkBox",a.RADIO="radioButton",a.TOGGLE="toggleButton"}(yi||(yi={})),function(a){a.ITEM="item",a.SEPARATOR="separator",a.TOGGLE="toggle"}(ji||(ji={})),function(a){a.TOP_CHART_TYPE="openChartTypeMenu",a.TOP_PERIOD="openPeriodMenu",a.TOP_RESOLUTION="openResolutionMenu",a.TOP_INDICATOR="openIndicatorMenu",a.TOP_ANNOTATION="openAnnotationMenu",a.TOP_TEMPLATE="openTemplateMenu",a.TOP_COMPARE="openCompareMenu",a.TOP_NEW_COMPARE="openNewCompareMenu",a.TOP_CURRENCY="openCurrencyMenu",a.BOTTOM_PERIOD="openBottomPeriodMenu",a.BOTTOM_RESOLUTION="openBottomResolutionMenu"}(pe||(pe={})),function(a){a.DISPLAY="nav_Display",a.AXIS="nav_Axis",a.EVENTS="nav_Events",a.LINE="nav_Line",a.VOLUME="nav_Volume",a.DATE_RANGE="nav_DateRange",a.PERIOD="nav_Period"}(xe||(xe={}));class ht{}ht.kLanguageKey="chartNg",ht.kLanguageKeySetting="chartNg_setting",ht.kLanguageKeyIndicator="chartNg_indicator",ht.kLanguageKeyIndicatorSetting="chartNg_indicatorSetting",ht.kLanguageKeyAnnotation="chartNg_annotation",ht.kLanguageKeyAnnotationSetting="chartNg_annotationSetting",ht.kLanguageKeyTemplate="chartNg_template",ht.kLanguageKeyTooltip="chartNg_tooltip",ht.kLanguageKeyPeriod="chartNg_period",ht.kLanguageKeyPeriodShort="chartNg_periodShort",ht.kLanguageKeyCustomPeriod="chartNg_customPeriod",ht.kLanguageKeyResolution="chartNg_resolution",ht.kLanguageKeyResolutionShort="chartNg_resolutionShort",ht.kLanguageKeyCurrency="chartNg_currency",ht.kLanguageKeyCompare="chartNg_c
1ompare",ht.kLanguageKeyInstrumentHeader="chartNg_instrumentHeader",ht.kClassNameChartContainer="cell-w-chart-nextgen-container",ht.kClassNameChartLogo="chart-nextgen-logo",ht.kXAxisId="mainXAxis",ht.kMainYAxisId="mainYAxis",ht.kOppositeYAxisId="oppositeYAxis",ht.kOscillatorYAxisId="oscillatorYAxis-",ht.kVolumeYAxisId="volumeYAxis",ht.kGhostVolumeYAxisId="ghostVolumeYAxis",ht.kFlagsXAxisId="flagsXAxis",ht.kDefaultChartType=wt.LINE,ht.kChartInformationTimeout=2e3,ht.kChartDataTimeout=5e3;const Pi="--state-true",Xi="--state-false",gr="#008000",vr="#FF0000",In="#4DC46D",cn="#E95C3B",xi="#999999",Ei=["#00000000","#00000001"],$i="#FFFFFF01",mr=["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"],kr=["#F08200","#BBCB56","#0F7CBD","#FBBE0D","#E47CFF","#53C973","#009292","#AA0A3C"],pr=["#000000","#9999FF","#ABABAB","#FF0000"],Ir="#AD44FF",Er="#FF7F50",fr="#7D7D7D",qi="#7D7D7D",Zi="#AAAAAA";class Bt{constructor(){}static getColorOrUndefined(t){return Ei.includes(t)?void 0:t}static getChartBackgroundColor(t){return A.getHighchartsBackgroundColorFromCss(t,ht.kClassNameChartContainer)}static getInstrumentColorList(t,e){const n=Array.isArray(e)&&e?.length?[...e]:A.getHighchartsColorListFromCss(t,"highcharts-color");return n.length?n:mr}static getIndicatorColorList(t,e){const n=Array.isArray(e)&&e?.length?[...e]:A.getHighchartsColorListFromCss(t,"highcharts-indicator-color");return n.length?n:kr}static getAnnotationColorList(t,e){const n=Array.isArray(e)&&e?.length?[...e]:A.getHighchartsColorListFromCss(t,"highcharts-annotation-color");return n.length?n:pr}static getAnnotationColorHexAlphaOrSpecial(t){return(t=this.isHexAlpha(t)?t:this.convertColorToHexAlpha(t))===Ei[1]?"none":t?.toUpperCase()===$i?"contrast":t}static getAnnotationColorHexAlpha(t){return"none"===t?Ei[1]:"contrast"===t?$i:this.isHexAlpha(t)?t:this.convertColorToHexAlpha(t)}static getOhlcDefaultColors(){return{upColor:In,downColor:cn}}static getCandleStickDefaultColors(){return{upColor:In,downColor:cn,upWickColor:void 0,wickColor:void 0}}static getColorMatrixColor(t,e){const n=this.colorPickerMatrix[t%this.getColorMatrixHeight()][e%this.getColorMatrixWidth()];return this.isHexAlpha(n)?n:this.convertColorToHexAlpha(n)}static getColorMatrixHeight(){var t;return(null===(t=this.colorPickerMatrix)||void 0===t?void 0:t.length)||0}static getColorMatrixWidth(){var t,e;return(null===(e=null===(t=this.colorPickerMatrix)||void 0===t?void 0:t[0])||void 0===e?void 0:e.length)||0}static isValidColorMatrix(){var t,e,n;const i=null===(e=null===(t=this.colorPickerMatrix)||void 0===t?void 0:t[0])||void 0===e?void 0:e.length;return!(!i||null!==(n=this.colorPickerMatrix)&&void 0!==n&&n.filter(s=>s?.length!==i).length)}static convertHexToRangeValue(t,e=1,n=2){const i=this.convertHexToByte(t),s=Math.pow(10,n);return Math.round((i?1-(255-i)/255:0)*e*s)/s}static convertRangeValueToHex(t,e=1,n="ff"){if(null==t||isNaN(+t))return n;const i=Math.round(+t/e*255);return this.convertByteToHex(i)}static convertHexToByte(t){return parseInt(t.substr(0,2),16)}static isRgba(t){return t?.toLowerCase().startsWith("rgba")}}var En;function Qi(a){return!["item"].some(t=>void 0===a[t])}function Cr(a){return!["list","collapsable"].some(t=>void 0===a[t])}function Tr(a){return!["name","items"].some(t=>void 0===a[t])}Bt.colorPickerMatrix=[["rgb(255, 255, 255)","rgb(209, 212, 220)","rgb(178, 181, 190)","rgb(149, 152, 161)","rgb(120, 123, 134)","rgb(93, 96, 107)","rgb(67, 70, 81)","rgb(42, 46, 57)","rgb(19, 23, 34)","rgb(0, 0, 0)"],["rgb(244, 67, 54)","rgb(255, 152, 0)","rgb(255, 235, 59)","rgb(76, 175, 80)","rgb(0, 150, 136)","rgb(0, 188, 212)","rgb(41, 98, 255)","rgb(103, 58, 183)","rgb(156, 39, 176)","rgb(233, 30, 99)"],["rgb(255, 205, 210)","rgb(255, 224, 178)","rgb(255, 249, 196)","rgb(200, 230, 201)","rgb(178, 223, 219)","rgb(178, 235, 242)","rgb(187, 217, 251)","rgb(209, 196, 233)","rgb(225, 190, 231)","rgb(248, 187, 208)"],["rgb(239, 154, 154)","rgb(255, 204, 128)","rgb(255, 245, 157)","rgb(165, 214, 16
17)","rgb(128, 203, 196)","rgb(128, 222, 234)","rgb(144, 191, 249)","rgb(179, 157, 219)","rgb(206, 147, 216)","rgb(244, 143, 177)"],["rgb(229, 115, 115)","rgb(255, 183, 77)","rgb(255, 241, 118)","rgb(129, 199, 132)","rgb(77, 182, 172)","rgb(77, 208, 225)","rgb(91, 156, 246)","rgb(149, 117, 205)","rgb(186, 104, 200)","rgb(240, 98, 146)"],["rgb(239, 83, 80)","rgb(255, 167, 38)","rgb(255, 238, 88)","rgb(102, 187, 106)","rgb(38, 166, 154)","rgb(38, 198, 218)","rgb(49, 121, 245)","rgb(126, 87, 194)","rgb(171, 71, 188)","rgb(236, 64, 122)"],["rgb(211, 47, 47)","rgb(245, 124, 0)","rgb(251, 192, 45)","rgb(56, 142, 60)","rgb(0, 121, 107)","rgb(0, 151, 167)","rgb(24, 72, 204)","rgb(81, 45, 168)","rgb(123, 31, 162)","rgb(194, 24, 91)"],["rgb(183, 28, 28)","rgb(230, 81, 0)","rgb(245, 127, 23)","rgb(27, 94, 32)","rgb(0, 77, 64)","rgb(0, 96, 100)","rgb(12, 50, 153)","rgb(49, 27, 146)","rgb(74, 20, 140)","rgb(136, 14, 79)"]],Bt.getHexAlphaColor=Be,Bt.getHexAlphaColorByFactor=function Ee(a,t=.5){var e,n;if(!a?.startsWith("#")||![7,9].includes(a.length))return a;let i="FF";return 9===a.length&&(i=a.substr(7,2),a=a.substr(0,7)),i=(null===(n=null===(e=parseInt(i,16)*t)||void 0===e?void 0:e.toString(16))||void 0===n?void 0:n.substr(0,2))||i,`${a}${i}`.toUpperCase()},Bt.convertColorToRGBA=Ht,Bt.convertByteToHex=yt,Bt.convertColorToHex=pt,Bt.convertColorToHexAlpha=dt,Bt.isHexAlpha=kt,Bt.getForegroundBackgroundBlendColor=Et,function(a){a[a.CLOSED=1]="CLOSED",a[a.OPEN=2]="OPEN",a[a.FIRST=3]="FIRST"}(En||(En={}));var li,Ue,fn=r.InfrontUtil.ClassBinding,Oi=r.InfrontUtil.BindingFactory,Hr=r.InfrontUtil.ArrayBinding,tn=r.InfrontUtil.InitialUpdate,Gr=r.InfrontUtil.InlineRowFactory,On=r.InfrontUtil.ClassBinding,kn=r.InfrontUtil.BindingFactory,Wr=r.InfrontUtil.ArrayBinding,Fe=r.InfrontUtil.InitialUpdate,Kr=r.InfrontUtil.InlineRowFactory;!function(a){a[a.DOWN=0]="DOWN",a[a.UP=1]="UP"}(li||(li={}));class ui{constructor(t,e,n,i,s,o,l,u,d,g,I,C,S,N,k){this.onPopupStateChange=k,s?.get()&&(this.positionElement=t,this.appendToElement=e||document.body,this.list=l,this.dropDownElements=this.getElements(t,i,s,o,l,u,d,g,I,C,S,N),this.position=n,this.showDropDown=o,this.init())}init(){this.setupAbsoluteWrapper();const t=this.getShowResultObserver();this.showDropDown.observe(t),this.setupScrollbarObservers()}setupScrollbarObservers(){var t;const e=this.dropDownElements.scrollContainer,n=parseInt(null===(t=getComputedStyle(e))||void 0===t?void 0:t.maxHeight)||0;this.scrollbarResizeObserver=new ResizeObserver(i=>{var s,o;(null===(o=null===(s=i?.[0])||void 0===s?void 0:s.contentRect)||void 0===o?void 0:o.height)>=n?this.showScrollbar.set(!0):this.showScrollbar.set(!1)}),this.scrollbarResizeObserver.observe(e,{box:"border-box"})}getShowResultObserver(){return r.Infront.BindingFactory.createInlineBinding(t=>{var e;this.absolutePosWrapper.style.display=t?"block":"none",null===(e=this.onPopupStateChange)||void 0===e||e.call(this,t),t&&(H(this.absolutePosWrapper,this.dropDownElements.dropDownContainer,this.positionElement,this.appendToElement,this.position),this.dropDownElements.openDropDownElement.blur())})}setupAbsoluteWrapper(){this.absolutePosWrapper=document.createElement("div"),this.absolutePosWrapper.style.position="fixed"==this.dropDownElements.openDropDownElement.style.position?"fixed":"absolute",this.absolutePosWrapper.className="cell-w-chart-nextgen-dropdown-container cell-super-absolute",this.absolutePosWrapper.appendChild(this.dropDownElements.dropDownContainer),this.absolutePosWrapper.style.left="0px",this.absolutePosWrapper.style.right="unset",this.appendToElement.appendChild(this.absolutePosWrapper)}getElements(t,e,n,i,s,o,l,u,d,g,I,C){return function Yr(a,t,e,n,i,s,o,l,u,d,g,I,C,S){var N=document.createElement("div");a.appendChild(N),N.className="cell-dropdown-list",N.setAttribute("tabIndex","-1"),r.InfrontUtil.addEventListener(N,"click",zt=>{zt.stopPropagation(),l(zt)}),N.setAttribute("role","button"),r.InfrontUtil.addEventListener(N,"keyup",zt=>{var ye=zt.which||zt.keyCode;13!==ye&&32!==ye||l(zt)}),N.setAttribute("tabindex","0"),r.InfrontUtil.addClassName(N,d?"cell-dropdown-list--"+d:"");var k=Oi.createHTMLAttributeBinding(N,"style",zt=>"display:"+(zt?"block":"none"));e.observe(k);var x=new fn(N,"cell-dropdown-list__wrapper--active",zt=>1==zt);n.observe(x,tn.Synchronous),_.W.unbindingManager.registerUnbind(N,()=>{e.unbind(k),n.unbind(x)});var Y=document.createElement("div");
1if(N.appendChild(Y),Y.className="cell-noselect cell-dropdown-list__label",1==o){var et=document.createElement("span");Y.appendChild(et),et.className="cell-dropdown-list__label-icon";var rt=Oi.createValueBinding(et,"innerHTML");s.observe(rt,tn.Synchronous),_.W.unbindingManager.registerUnbind(et,()=>{s.unbind(rt)})}if(0==o){var it=document.createElement("span");Y.appendChild(it);var gt=Oi.createValueBinding(it,"innerHTML");s.observe(gt,tn.Synchronous),_.W.unbindingManager.registerUnbind(it,()=>{s.unbind(gt)})}var mt=document.createElement("div");N.appendChild(mt),mt.className="cell-dropdown-list__content cell-dropdown-list__content--adjusted",mt.setAttribute("tabindex","0");var Ct=new fn(mt,"scrollbar-hidden",zt=>0==zt);if(S.observe(Ct,tn.Synchronous),_.W.unbindingManager.registerUnbind(mt,()=>{S.unbind(Ct)}),g){var Tt=document.createElement("div");mt.appendChild(Tt),Tt.className="cell-dropdown-list__content-selector";var Wt=new fn(Tt,"cell-dropdown-list__content-selector--selected",zt=>1==zt);I.observe(Wt,tn.Synchronous),_.W.unbindingManager.registerUnbind(Tt,()=>{I.unbind(Wt)});var Kt=document.createElement("div");Tt.appendChild(Kt),Kt.className="cell-dropdown-list__content-selector-label",r.InfrontUtil.addEventListener(Kt,"click",zt=>{u(g)}),Kt.setAttribute("role","button"),r.InfrontUtil.addEventListener(Kt,"keyup",zt=>{var ye=zt.which||zt.keyCode;13!==ye&&32!==ye||u(g)});var te=(0,M.a)(null,Kt,"innerHTML");g.observe(te,tn.Synchronous);var le=new fn(Kt,"cell-dropdown-list__content-selector-label--selected",zt=>1==zt);I.observe(le,tn.Synchronous),_.W.unbindingManager.registerUnbind(Kt,()=>{g.unbind(te),I.unbind(le)})}var Ie=document.createElement("ul");mt.appendChild(Ie),Ie.className="cell-list-block";var Je=new Hr(Ie,new Gr((zt,ye)=>{var He=document.createElement("foreach-row"),he=new fn(He,"cell-display-none",Te=>0==Te);if(zt.available.observe(he,tn.Synchronous),_.W.unbindingManager.registerUnbind(He,()=>{zt.available.unbind(he)}),zt.state){var Ge=document.createElement("li");He.appendChild(Ge),Ge.className="cell-dropdown-list__content-item",r.InfrontUtil.addEventListener(Ge,"click",Te=>{u(zt)}),r.InfrontUtil.addEventListener(Ge,"keyup",Te=>{var wn=Te.which||Te.keyCode;13!==wn&&32!==wn||u(zt)});var Lt=Oi.createHTMLAttributeBinding(Ge,"aria-hidden",Te=>(1==Te).toString());I.observe(Lt,tn.Synchronous);var je=new fn(Ge,"cell-dropdown-list__content-item--state-true",Te=>1==Te);zt.state.observe(je,tn.Synchronous);var gn=new fn(Ge,"cell-dropdown-list__content-item--state-false",Te=>0==Te);zt.state.observe(gn,tn.Synchronous),r.InfrontUtil.addClassName(Ge,zt.name);var _n=new fn(Ge,"cell-dropdown-list__content-item--selected",Te=>1==Te);zt.selected.observe(_n,tn.Synchronous),r.InfrontUtil.addClassName(Ge,zt.rowClass?zt.rowClass:"");var we=new fn(Ge,"cell-dropdown-list__content-item-label--selected",Te=>1==Te&&1==t);if(zt.selected.observe(we,tn.Synchronous),_.W.unbindingManager.registerUnbind(Ge,()=>{I.unbind(Lt),zt.state.unbind(je),zt.state.unbind(gn),zt.selected.unbind(_n),zt.selected.unbind(we)}),zt.icon){var si=document.createElement("span");Ge.appendChild(si),si.className="cell-dropdown-list__content-item-icon",si.innerHTML=zt.icon}var vn=document.createElement("span");Ge.appendChild(vn),vn.className="cell-dropdown-list__content-item-label",vn.setAttribute("tabindex","0"),(0,O.s)(vn,"innerHTML",zt.label),1==t&&r.InfrontUtil.addClassName(vn,"cell-dropdown-list__content-item-label");var oi=new fn(vn,"cell-dropdown-list__content-item-label--selected",Te=>1==Te&&1==t);zt.selected.observe(oi,tn.Synchronous),_.W.unbindingManager.registerUnbind(vn,()=>{zt.selected.unbind(oi)})}if(!zt.state){var ln=document.createElement("li");He.appendChild(ln),ln.className="cell-dropdown-list__content-item",r.InfrontUtil.addEventListener(ln,"click",Te=>{u(zt)}),r.InfrontUtil.addEventListener(ln,"keyup",Te=>{var wn=Te.which||Te.keyCode;13!==wn&&32!==wn||u(zt)});var vi=Oi.createHTMLAttributeBinding(ln,"aria-hidden",Te=>(1==Te).toString());I.observe(vi,tn.Synchronous),r.InfrontUtil.addClassName(ln,zt.name);var mn=new fn(ln,"cell-dropdown-list__content-item--selected",Te=>1==Te);zt.selected.observe(mn,tn.Synchronous),r.InfrontUtil.addClassName(ln,zt.rowClass?zt.rowClass:"");var ti=new fn(ln,"cell-dropdown-list__content-item-label--selected",Te=>1==Te&&1==t);if(zt.selected.observe(ti,tn.Synchronous),_.W.unbindingManager.registerUnbind(ln,()=>{I.unbind(vi),zt.selected.unbind(mn),zt.selected.unbind(ti)}),zt.icon){var Yn=document.createElement("span");
1ln.appendChild(Yn),Yn.className="cell-dropdown-list__content-item-icon",Yn.innerHTML=zt.icon}var An=document.createElement("span");ln.appendChild(An),An.className="cell-dropdown-list__content-item-label",An.setAttribute("tabindex","0"),(0,O.s)(An,"innerHTML",zt.label),1==t&&r.InfrontUtil.addClassName(An,"cell-dropdown-list__content-item-label");var mi=new fn(An,"cell-dropdown-list__content-item-label--selected",Te=>1==Te&&1==t);zt.selected.observe(mi,tn.Synchronous),_.W.unbindingManager.registerUnbind(An,()=>{zt.selected.unbind(mi)})}return He}),null);return i.observe(Je),_.W.unbindingManager.registerUnbind(Ie,()=>{i.unbind(Je)}),{openDropDownElement:N,dropDownContainer:mt,scrollContainer:Ie}}(t,e,n,i,s,o.value,o.isIcon,l,u,d,g,I,0,this.showScrollbar=new r.InfrontUtil.Observable(!1))}hide(){this.showDropDown.set(!1)}destroy(){var t,e,n,i;!(null===(t=this.absolutePosWrapper)||void 0===t)&&t.parentElement&&this.absolutePosWrapper.parentElement.removeChild(this.absolutePosWrapper),null===(e=this.showDropDown)||void 0===e||e.unbindAll(),null===(n=this.scrollbarResizeObserver)||void 0===n||n.disconnect(),null===(i=this.showScrollbar)||void 0===i||i.unbindAll()}}class Qn{constructor(t,e,n,i,s,o,l,u,d,g,I,C,S,N,k,x){this.onPopupStateChange=x,s?.get()&&(this.separatorClicked=this.separatorClicked.bind(this),this.positionElement=t,this.appendToElement=e||document.body,this.list=l,this.position=n,this.showDropDown=o,this.dropDownElements=this.getElements(t,i,s,o,l,u,d,g,I,C,S,N,k),this.init())}init(){this.setActions(),this.setupAbsoluteWrapper();const t=this.getShowResultObserver();this.showDropDown.observe(t),this.setupScrollbarObservers()}setActions(){var t,e;this.actions={openAction:[]},null===(e=null===(t=this.list)||void 0===t?void 0:t.get())||void 0===e||e.forEach(n=>{Mi(n)&&n.actions&&n.actions.openAction&&this.actions.openAction.push(n.actions.openAction.updateAction)})}setupScrollbarObservers(){var t;const e=this.dropDownElements.scrollContainer,n=parseInt(null===(t=getComputedStyle(e))||void 0===t?void 0:t.maxHeight)||0;this.scrollbarResizeObserver=new ResizeObserver(i=>{var s,o;(null===(o=null===(s=i?.[0])||void 0===s?void 0:s.contentRect)||void 0===o?void 0:o.height)>=n?this.showScrollbar.set(!0):this.showScrollbar.set(!1)}),this.scrollbarResizeObserver.observe(e,{box:"border-box"})}getShowResultObserver(){return r.Infront.BindingFactory.createInlineBinding(t=>{var e;this.absolutePosWrapper.style.display=t?"block":"none",null===(e=this.onPopupStateChange)||void 0===e||e.call(this,t),t&&(H(this.absolutePosWrapper,this.dropDownElements.dropDownContainer,this.positionElement,this.appendToElement,this.position),this.dropDownElements.openDropDownElement.blur())})}setupAbsoluteWrapper(){this.absolutePosWrapper=document.createElement("div"),this.absolutePosWrapper.style.position="fixed"==this.dropDownElements.openDropDownElement.style.position?"fixed":"absolute",this.absolutePosWrapper.className="cell-w-chart-nextgen-dropdown-container cell-super-absolute",this.absolutePosWrapper.appendChild(this.dropDownElements.dropDownContainer),this.absolutePosWrapper.style.left="0px",this.absolutePosWrapper.style.right="unset",this.appendToElement.appendChild(this.absolutePosWrapper)}separatorClicked(t){var e,n,i;if(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("Menu/GroupedChartDropDown (separatorClicked):","chartMenuSeparator=",t),null===(e=t?.isOpen)||void 0===e||e.set(!t.isOpen.get()),!t.isOpen){const s=null===(n=this.list)||void 0===n?void 0:n.get();for(let o=0;o<s?.length&&(t.id!==s[o].groupName||(s[o].available.set(!s[o].available.get()),t.id===(null===(i=s?.[o+1])||void 0===i?void 0:i.groupName)));o++);}}getElements(t,e,n,i,s,o,l,u,d,g,I,C,S){const N=function Sr(a,t,e,n,i,s,o,l,u,d,g,I,C,S,N,k){var x=document.createElement("div");a.appendChild(x),x.className="cell-dropdown-list cell-dropdown-list--multi-selection",x.setAttribute("tabIndex","-1"),r.InfrontUtil.addEventListener(x,"click",Lt=>{Lt.stopPropagation(),l(Lt)}),x.setAttribute("role","button"),r.InfrontUtil.addEventListener(x,"keyup",Lt=>{var je=Lt.which||Lt.keyCode;
113!==je&&32!==je||l(Lt)}),x.setAttribute("tabindex","0"),r.InfrontUtil.addClassName(x,d?"cell-heading-dropdown--"+d:"");var Y=kn.createHTMLAttributeBinding(x,"style",Lt=>"display:"+(Lt?"block":"none"));e.observe(Y);var et=new On(x,"cell-dropdown-list__selector--active",Lt=>1==Lt);n.observe(et,Fe.Synchronous),_.W.unbindingManager.registerUnbind(x,()=>{e.unbind(Y),n.unbind(et)});var rt=document.createElement("div");if(x.appendChild(rt),rt.className="cell-noselect cell-dropdown-list__label",1==o){var it=document.createElement("span");rt.appendChild(it),it.className="cell-dropdown-list__label-icon";var gt=kn.createValueBinding(it,"innerHTML");s.observe(gt,Fe.Synchronous),_.W.unbindingManager.registerUnbind(it,()=>{s.unbind(gt)})}if(0==o){var mt=document.createElement("span");rt.appendChild(mt);var Ct=kn.createValueBinding(mt,"innerHTML");s.observe(Ct,Fe.Synchronous),_.W.unbindingManager.registerUnbind(mt,()=>{s.unbind(Ct)})}var Tt=document.createElement("div");x.appendChild(Tt),Tt.className="cell-dropdown-list__content cell-dropdown-list__content--adjusted",Tt.setAttribute("tabindex","0"),r.InfrontUtil.addClassName(Tt,d?"cell-dropdown-list__selector-wrapper--"+d:"");var Wt=new On(Tt,"scrollbar-hidden",Lt=>0==Lt);if(k.observe(Wt,Fe.Synchronous),_.W.unbindingManager.registerUnbind(Tt,()=>{k.unbind(Wt)}),g){var Kt=document.createElement("div");Tt.appendChild(Kt),Kt.className="cell-dropdown-list__content-selector highcharts-bindings-container";var te=new On(Kt,"cell-dropdown-list__content-selector--selected",Lt=>1==Lt);I.observe(te,Fe.Synchronous),_.W.unbindingManager.registerUnbind(Kt,()=>{I.unbind(te)});var le=document.createElement("label");Kt.appendChild(le),le.className="cell-dropdown-list__content-selector-label",r.InfrontUtil.addEventListener(le,"click",Lt=>{u(g)}),r.InfrontUtil.addEventListener(le,"keyup",Lt=>{var je=Lt.which||Lt.keyCode;13!==je&&32!==je||u(g)});var Ie=kn.createValueBinding(le,"innerHTML");g.observe(Ie,Fe.Synchronous);var Je=new On(le,"cell-dropdown-list__content-selector-label--selected",Lt=>1==Lt);if(I.observe(Je,Fe.Synchronous),r.InfrontUtil.addClassName(le,g.itemClass?g.itemClass:""),_.W.unbindingManager.registerUnbind(le,()=>{g.unbind(Ie),I.unbind(Je)}),N){var zt=document.createElement("button");Kt.appendChild(zt),zt.className="cell-dropdown-list__content-selector-button cell-dropdown-list__content-selector-button__reset-button",zt.type="button",r.InfrontUtil.addEventListener(zt,"click",Lt=>{u(N)}),r.InfrontUtil.addClassName(zt,N.itemClass?N.itemClass:"")}}var ye=document.createElement("div");Tt.appendChild(ye),ye.className="cell-dropdown-list__selector cell-dropdown-list__selector__search-container";var He=document.createElement("div");Tt.appendChild(He),He.className="cell-dropdown-list__selector cell-dropdown-list__selector-scrollarea highcharts-bindings-container";var he=document.createElement("ul");He.appendChild(he),he.className="cell-list-block";var Ge=new Wr(he,new Kr((Lt,je)=>{var gn=document.createElement("foreach-row"),_n=new On(gn,"cell-display-none",_e=>0==_e);if(Lt.available.observe(_n,Fe.Synchronous),_.W.unbindingManager.registerUnbind(gn,()=>{Lt.available.unbind(_n)}),0==Lt.isSeparator){if(Lt.state){var we=document.createElement("li");gn.appendChild(we),we.className="cell-dropdown-list__content-item",r.InfrontUtil.addEventListener(we,"click",_e=>{u(Lt)}),r.InfrontUtil.addEventListener(we,"keyup",_e=>{var Ni=_e.which||_e.keyCode;13!==Ni&&32!==Ni||u(Lt)});var si=kn.createHTMLAttributeBinding(we,"aria-hidden",_e=>(1==_e).toString());I.observe(si,Fe.Synchronous);var vn=new On(we,"cell-dropdown-list__content-item--state-true",_e=>1==_e);Lt.state.observe(vn,Fe.Synchronous);var oi=new On(we,"cell-dropdown-list__content-item--state-false",_e=>0==_e);Lt.state.observe(oi,Fe.Synchronous),r.InfrontUtil.addClassName(we,Lt.name),null!=Lt.groupName&&r.InfrontUtil.addClassName(we,"cell-custom-dropdown-selector__item--group");var ln=new On(we,"cell-custom-dropdown-selector__item--selected",_e=>1==_e);Lt.selected.observe(ln,Fe.Synchronous);var vi=new On(we,"cell-custom-dropdown-selector__item__label--selected",_e=>1==_e&&1==t);if(Lt.selected.observe(vi,Fe.Synchronous),r.InfrontUtil.addClassName(we,Lt.rowClass?Lt.rowClass:""),_.W.unbindingManager.registerUnbind(we,()=>{I.unbind(si),Lt.state.unbind(vn),Lt.state.unbind(oi),Lt.selected.unbind(ln),Lt.selected.unbind(vi)}),Lt.icon){if(Lt.icon.primitive){var mn=document.createElement("span");
1we.appendChild(mn),mn.className="cell-dropdown-list__content-item-icon",mn.innerHTML=Lt.icon.primitive}if(Lt.icon.observable){var ti=document.createElement("span");we.appendChild(ti),ti.className="cell-dropdown-list__content-item-icon";var Yn=kn.createValueBinding(ti,"innerHTML");Lt.icon.observable.observe(Yn,Fe.Synchronous),_.W.unbindingManager.registerUnbind(ti,()=>{Lt.icon.observable.unbind(Yn)})}}if(Lt.iconAfter){if(Lt.iconAfter.primitive){var An=document.createElement("span");we.appendChild(An),An.className="cell-dropdown-list__content-item-icon",An.innerHTML=Lt.iconAfter.primitive}if(Lt.iconAfter.observable){var mi=document.createElement("span");we.appendChild(mi),mi.className="cell-dropdown-list__content-item-icon";var Te=kn.createValueBinding(mi,"innerHTML");Lt.iconAfter.observable.observe(Te,Fe.Synchronous),_.W.unbindingManager.registerUnbind(mi,()=>{Lt.iconAfter.observable.unbind(Te)})}}var wn=document.createElement("span");we.appendChild(wn),wn.className="cell-dropdown-list__content-item-label",wn.innerHTML=Lt.label,1==t&&r.InfrontUtil.addClassName(wn,"cell-dropdown-list__selector__item-label");var ur=new On(wn,"cell-dropdown-list__selector__item--selected",_e=>1==_e);Lt.selected.observe(ur,Fe.Synchronous),r.InfrontUtil.addClassName(wn,Lt.itemClass?Lt.itemClass:""),_.W.unbindingManager.registerUnbind(wn,()=>{Lt.selected.unbind(ur)})}if(!Lt.state){var Ye=document.createElement("li");gn.appendChild(Ye),Ye.className="cell-dropdown-list__content-item",r.InfrontUtil.addEventListener(Ye,"click",_e=>{u(Lt)}),r.InfrontUtil.addEventListener(Ye,"keyup",_e=>{var Ni=_e.which||_e.keyCode;13!==Ni&&32!==Ni||u(Lt)});var Fr=kn.createHTMLAttributeBinding(Ye,"aria-hidden",_e=>(1==_e).toString());I.observe(Fr,Fe.Synchronous),r.InfrontUtil.addClassName(Ye,Lt.name),null!=Lt.groupName&&r.InfrontUtil.addClassName(Ye,"cell-custom-dropdown-selector__item--group");var Vr=new On(Ye,"cell-custom-dropdown-selector__item--selected",_e=>1==_e);Lt.selected.observe(Vr,Fe.Synchronous);var Br=new On(Ye,"cell-custom-dropdown-selector__item__label--selected",_e=>1==_e&&1==t);if(Lt.selected.observe(Br,Fe.Synchronous),r.InfrontUtil.addClassName(Ye,Lt.rowClass?Lt.rowClass:""),_.W.unbindingManager.registerUnbind(Ye,()=>{I.unbind(Fr),Lt.selected.unbind(Vr),Lt.selected.unbind(Br)}),Lt.icon){if(Lt.icon.primitive){var De=document.createElement("span");Ye.appendChild(De),De.className="cell-dropdown-list__content-item-icon",De.innerHTML=Lt.icon.primitive}if(Lt.icon.observable){var qn=document.createElement("span");Ye.appendChild(qn),qn.className="cell-dropdown-list__content-item-icon";var Eo=kn.createValueBinding(qn,"innerHTML");Lt.icon.observable.observe(Eo,Fe.Synchronous),_.W.unbindingManager.registerUnbind(qn,()=>{Lt.icon.observable.unbind(Eo)})}}if(Lt.iconAfter){if(Lt.iconAfter.primitive){var Qa=document.createElement("span");Ye.appendChild(Qa),Qa.className="cell-dropdown-list__content-item-icon",Qa.innerHTML=Lt.iconAfter.primitive}if(Lt.iconAfter.observable){var Ca=document.createElement("span");Ye.appendChild(Ca),Ca.className="cell-dropdown-list__content-item-icon";var fo=kn.createValueBinding(Ca,"innerHTML");Lt.iconAfter.observable.observe(fo,Fe.Synchronous),_.W.unbindingManager.registerUnbind(Ca,()=>{Lt.iconAfter.observable.unbind(fo)})}}var zi=document.createElement("span");Ye.appendChild(zi),zi.className="cell-dropdown-list__content-item-label",zi.innerHTML=Lt.label,1==t&&r.InfrontUtil.addClassName(zi,"cell-dropdown-list__selector__item-label");var Co=new On(zi,"cell-dropdown-list__selector__item--selected",_e=>1==_e);Lt.selected.observe(Co,Fe.Synchronous),r.InfrontUtil.addClassName(zi,Lt.itemClass?Lt.itemClass:""),_.W.unbindingManager.registerUnbind(zi,()=>{Lt.selected.unbind(Co)})}}if(1==Lt.isSeparator){var _i=document.createElement("li");gn.appendChild(_i),_i.className="cell-dropdown-list__content-item cell-dropdown-list__content-item--separator",r.InfrontUtil.addEventListener(_i,"click",_e=>{S(Lt)}),r.InfrontUtil.addEventListener(_i,"keyup",_e=>{var Ni=_e.which||_e.keyCode;13!==Ni&&32!==Ni||S(Lt)});var To=new On(_i,"cell-dropdown-list__content-item--expanded",_e=>1==_e);Lt.isOpen.observe(To,Fe.Synchronous),_.W.unbindingManager.registerUnbind(_i,()=>{Lt.isOpen.unbind(To)});var Ja=document.createElement("span");
1if(_i.appendChild(Ja),Ja.className="cell-dropdown-list__content-item--separator-label",(0,O.s)(Ja,"innerHTML",Lt.label),Lt.iconAfter){if(Lt.iconAfter.primitive){var ts=document.createElement("span");_i.appendChild(ts),ts.className="cell-dropdown-list__content-item-icon",ts.innerHTML=Lt.iconAfter.primitive}if(Lt.iconAfter.observable){var Ta=document.createElement("span");_i.appendChild(Ta),Ta.className="cell-dropdown-list__content-item-icon";var So=kn.createValueBinding(Ta,"innerHTML");Lt.iconAfter.observable.observe(So,Fe.Synchronous),_.W.unbindingManager.registerUnbind(Ta,()=>{Lt.iconAfter.observable.unbind(So)})}}}return gn}),null);return i.observe(Ge),_.W.unbindingManager.registerUnbind(he,()=>{i.unbind(Ge)}),{openDropDownElement:x,dropDownContainer:Tt,resetButton:zt,scrollContainer:He,searchContainer:ye}}(t,e,n,i,s,o.value,o.isIcon,l,u,d,g,I,0,this.separatorClicked,S,this.showScrollbar=new r.InfrontUtil.Observable(!1));return this.searchContainer=N.searchContainer,N}openAction(){var t;(0,D.h)(null===(t=this.actions)||void 0===t?void 0:t.openAction)}getSearchContainer(){return this.searchContainer}destroy(){var t,e,n,i;!(null===(t=this.absolutePosWrapper)||void 0===t)&&t.parentElement&&this.absolutePosWrapper.parentElement.removeChild(this.absolutePosWrapper),null===(e=this.showDropDown)||void 0===e||e.unbindAll(),null===(n=this.scrollbarResizeObserver)||void 0===n||n.disconnect(),null===(i=this.showScrollbar)||void 0===i||i.unbindAll()}}!function(a){a.CHART_TYPE="chart-type",a.RESOLUTION="resolution",a.PERIOD="period",a.MATRIX_PERIOD="time-period",a.INDICATOR="indicator",a.ANNOTATION="annotation",a.TEMPLATE="template",a.COMPARE="compare",a.NEW_COMPARE="new-compare",a.CURRENCY="currency"}(Ue||(Ue={}));const zr=[Ue.CHART_TYPE,Ue.RESOLUTION,Ue.PERIOD,Ue.MATRIX_PERIOD],jr=[Ue.INDICATOR,Ue.ANNOTATION,Ue.TEMPLATE,Ue.COMPARE,Ue.NEW_COMPARE,Ue.CURRENCY];class Ae{constructor(){this.LINE="line",this.CANDLESTICKS="candlestick"}static getSvgIcon(t){return Ae.svgMap[t||""]||""}static getSvgIconElement(t,e,n){var i;
1const s=(null===(i=Ae.svgElementsMap[t])||void 0===i?void 0:i.cloneNode(!0))||null;return null!=s&&(s.style.width=e+"px",s.style.height=n+"px"),s}static convertToElement(){const t={};return Object.keys(Ae.svgMap).forEach(e=>{t[e]=function Vt(a){return Ft.parseFromString(a,"image/svg+xml").documentElement}(Ae.svgMap[e])}),t}}Ae.svgMap={ohlc:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <path d="M13.0392693,2 L13.0389721,4.375 L17.5220279,4.37596456 L17.5220279,6.44493008 L13.0389721,6.444 L13.0392693,22 L10.9703038,22 L10.9699721,19.064 L6.47797206,19.0642678 L6.47797206,16.9953022 L10.9699721,16.995 L10.9703038,2 L13.0392693,2 Z"/>\n                </svg>',candlestick:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <path d="M17.750512,2 L17.7501655,12.065 L19.8058345,12.0659416 L19.8058345,19.8127944 L17.7501655,19.812 L17.750512,22 L15.6951896,22 L15.6951655,19.812 L13.6398672,19.8127944 L13.6398672,12.0659416 L15.6951655,12.065 L15.6951896,2 L17.750512,2 Z M8.81864099,2 L8.81816552,4.086 L11.387794,4.08618119 L11.387794,14.6306288 L8.81816552,14.63 L8.81864099,22 L6.76331856,22 L6.76316552,14.63 L4.19416552,14.6306288 L4.19416552,4.08618119 L6.76316552,4.086 L6.76331856,2 L8.81864099,2 Z M9.33247159,6.14113214 L6.24948795,6.14113214 L6.24948795,12.5749764 L9.33247159,12.5749764 L9.33247159,6.14113214 Z"/>\n                </svg>',hollowcandlestick:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <path d="M17.750512,2 L17.7501655,12.065 L19.8058345,
112.0659416 L19.8058345,19.8127944 L17.7501655,19.812 L17.750512,22 L15.6951896,22 L15.6951655,19.812 L13.6398672,19.8127944 L13.6398672,12.0659416 L15.6951655,12.065 L15.6951896,2 L17.750512,2 Z M8.81864099,2 L8.81816552,4.086 L11.387794,4.08618119 L11.387794,14.6306288 L8.81816552,14.63 L8.81864099,22 L6.76331856,22 L6.76316552,14.63 L4.19416552,14.6306288 L4.19416552,4.08618119 L6.76316552,4.086 L6.76331856,2 L8.81864099,2 Z M9.33247159,6.14113214 L6.24948795,6.14113214 L6.24948795,12.5749764 L9.33247159,12.5749764 L9.33247159,6.14113214 Z"/>\n                </svg>',heikinashi:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <path d="M19.8734483,2 L19.8727586,6.366 L21.5972414,6.36689655 L21.5972414,19.3648276 L19.8727586,19.364 L19.8734483,22 L17.8044828,22 L17.8037586,19.364 L16.08,19.3648276 L16.08,6.36689655 L17.8037586,6.366 L17.8044828,2 L19.8734483,2 Z M8.95448276,2 L8.95375862,4.413 L13.4372414,4.4137931 L13.4372414,17.5172414 L8.95375862,17.517 L8.95448276,22 L6.88551724,22 L6.88475862,17.517 L2.40275862,17.5172414 L2.40275862,4.4137931 L6.88475862,4.413 L6.88551724,2 L8.95448276,2 Z M11.3682759,6.48206897 L4.47137931,6.48206897 L4.47137931,15.447931 L11.3682759,15.447931 L11.3682759,6.48206897 Z"/>\n                </svg>',columns:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <path fill-rule="evenodd" d="M22,12.3572462 L22,18.8222899 L12.0060251,18.8222899 L12.0060251,12.3572462 L22,12.3572462 Z M11.9920716,5.17771013 L11.9920716,18.8222899 L2,18.8222899 L2,5.17771013 L11.9920716,5.17771013 Z M9.73603324,7.43274788 L4.25542015,7.43274788 L4.25542015,16.5661005 L9.73603324,16.5661005 L9.73603324,7.43274788 Z"/>\n                </svg>',line:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <polygon points="20.56 5.998 22 7.256 14.796 15.497 8.899 11.52 3.466 18.002 2 16.774 8.54 8.971 14.466 12.968"/>\n                </svg>',area:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <polygon fill-rule="evenodd" points="2 19.556 2 16.154 8.677 9.149 14.499 12.636 22 4.444 22 19.556"/>\n                </svg>',baseline:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <polygon points="20.56 5.998 22 7.256 14.796 15.497 8.899 11.52 3.466 18.002 2 16.774 8.54 8.971 14.466 12.968" />\n                    <path stroke-width="1" d="m 1.727542,13.525723 20.951929,0.202792" />\n                </svg>',points:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" class="wtk-icon-svg">\n                    <g fill-rule="evenodd" transform="translate(12 15.5)">\n                        <rect width="4" height="4" y="16.414"/>\n                        <rect width="4" height="4" x="6" y="4"/>\n                        <rect width="4" height="4" x="16" y="12.414"/>\n                        <rect width="4" height="4" x="21.5"/>\n                    </g>\n                </svg>',chart:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <polygon points="20.483 5.734 22 7.004 16.584 13.473 14.113 11.015 10.52 16.201 7.578 13.16 3.554 18.266 2 17.041 7.426 10.158 10.266 13.093 13.834 7.945 16.451 10.549"/>\n                </svg>',cursor:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" class="wtk-icon-svg">\n                    <path d="m26.729 18.58q0.54853 0.53084 0.24772 1.2209-0.3008 0.70777-1.044 0.70777h-6.7593l3.5566 8.4226q0.17695 0.44236 0 0.86704-0.17695 0.42467-0.60161 0.61931l-3.1319 1.3271q-0.44236 0.17695-0.86704 0-0.42466-0.17695-0.61931-0.60161l-3.3796-7.9979-5.5207 5.5207q-0.3362 0.3362-0.79625 0.3362-0.21233 0-0.42467-0.08848-0.70779-0.3008-0.70779-1.044v-26.612q0-0.74317 0.70779-1.044 0.21233-0.088473 0.42467-0.088473 0.47776 0 0.79625 0.3362z" stroke-width=".017695"/>\n                </svg>',cog:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">\n                    <path fill="none" d="M0 0h20v20H0V0z"/>\n                    <path d="M15.95 10.78c.03-.25.05-.51.05-.78s-.02-.53-.06-.78l1.69-1.32c.15-.12.19-.34.1-.51l-1.6-2.77c-.1-.18-.31-.24-.49-.18l-1.99.8c-.42-.32-.86-.58-1.35-.78L12 2.34c-.03-.2-.2
1-.34-.4-.34H8.4c-.2 0-.36.14-.39.34l-.3 2.12c-.49.2-.94.47-1.35.78l-1.99-.8c-.18-.07-.39 0-.49.18l-1.6 2.77c-.1.18-.06.39.1.51l1.69 1.32c-.04.25-.07.52-.07.78s.02.53.06.78L2.37 12.1c-.15.12-.19.34-.1.51l1.6 2.77c.1.18.31.24.49.18l1.99-.8c.42.32.86.58 1.35.78l.3 2.12c.04.2.2.34.4.34h3.2c.2 0 .37-.14.39-.34l.3-2.12c.49-.2.94-.47 1.35-.78l1.99.8c.18.07.39 0 .49-.18l1.6-2.77c.1-.18.06-.39-.1-.51l-1.67-1.32zM10 13c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"/>\n                </svg>',template:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <path d="M0 0h24v24H0z" fill="none"/>\n                    <path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"/>\n                </svg>',closeFullScreen:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n                    <path d="M15 2h2v5h7v2h-9v-7zm9 13v2h-7v5h-2v-7h9zm-15 7h-2v-5h-7v-2h9v7zm-9-13v-2h7v-5h2v7h-9z"/>\n                </svg>',openFullScreen:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n                    <path d="M24 9h-2v-7h-7v-2h9v9zm-9 15v-2h7v-7h2v9h-9zm-15-9h2v7h7v2h-9v-9zm9-15v2h-7v7h-2v-9h9z"/>\n                </svg>',dropDownCollapseArrow:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <path d="M15.5158569,9.82100792 C15.8908565,9.41555293 16.52354,9.39086396 16.928995,9.76586355 C17.3032611,10.112017 17.3530876,10.6777354 17.0635913,11.0816221 L16.9841394,11.1790016 L12.8221529,15.6790016 C12.4597379,16.07085 11.8605792,16.104766 11.457425,15.7762756 L11.3680657,15.6940349 L7.03005217,11.1940349 C6.64674993,10.7964197 6.65835286,10.163361 7.05596805,9.78005877 C7.42299746,9.42624132 7.99064141,9.40891111 8.37727707,9.72107364 L8.46994414,9.80597465 L12.0719982,13.5436713 L15.5158569,9.82100792 Z"/>\n                </svg>',calendar:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <path d="M7.15,2 C7.70228475,2 8.15,2.44771525 8.15,3 L8.15,4.85714286 L15.95,4.85714286 L15.95,3 C15.95,2.44771525 16.3977153,2 16.95,2 L18.1,2 C18.6522847,2 19.1,2.44771525 19.1,3 L19.1,4.85714286 L20.2857143,4.85714286 C20.837999,4.85714286 21.2857143,5.30485811 21.2857143,5.85714286 L21.2857143,21 C21.2857143,21.5522847 20.837999,22 20.2857143,22 L3.71428571,22 C3.16200096,22 2.71428571,21.5522847 2.71428571,21 L2.71428571,5.85714286 C2.71428571,5.30485811 3.16200096,4.85714286 3.71428571,4.85714286 L4.8,4.85714286 L4.8,3 C4.8,2.44771525 5.24771525,2 5.8,2 L7.15,2 Z M19.8562857,16.298 L15.1861345,16.2982277 L15.1861345,20.4472277 L19.6857645,20.4482773 C19.790787,20.3566187 19.8571429,20.2217728 19.8571429,20.0714286 L19.8562857,16.298 Z M8.82313455,16.2982277 L4.14228571,16.298 L4.14285714,20.0714286 C4.14285714,20.2217728 4.20921296,20.3566187 4.31423548,20.4482773 L8.82313455,20.4472277 L8.82313455,16.2982277 Z M14.3511345,16.2982277 L9.65813455,16.2982277 L9.65813455,20.4472277 L14.3511345,20.4472277 L14.3511345,16.2982277 Z M14.3511345,11.3322277 L9.65813455,11.3322277 L9.65813455,15.4812277 L14.3511345,15.4812277 L14.3511345,11.3322277 Z M19.8562857,11.332 L15.1861345,11.3322277 L15.1861345,15.4812277 L19.8562857,15.481 L19.8562857,11.332 Z M8.82313455,11.3322277 L4.14228571,11.332 L4.14228571,15.481 L8.82313455,15.4812277 L8.82313455,11.3322277 Z M14.3502857,6.382 L9.65728571,6.382 L9.65813455,10.5152277 L14.3511345,10.5152277 L14.3502857,6.382 Z M17.8800429,3 L17.1657572,3 C17.0615905,3 16.976025,3.03337882 16.9090607,3.10013647 C16.8420965,3.16689412 16.8086143,3.25219556 16.8086143,3.35604079 L16.8062857,6.382 L15.1852857,6.382 L15.1861345,10.5152277 L19.8562857,10.515 L19.8571429,6.88207583 C19.8571429,6.60593346 19.6332852,6.38207583 19.3571429,6.38207583 L18.2352857,6.382 L18.2371857,3.35604079 C18.2371857,3.25219556 18.2037036,3.16689412 18.1367393,3.10013647 C18.069775,3.03337882 17.9842096,3 17.8800429,3 Z M5.78728571,6.382 L4.64285714,6.38207583 C4.36671477,6.38207583 4.14285714,6.60593346 4.14285714,6.88207583 L4.14228571,10.515 L8.82313455,10.5152277 L8.82228571,6.382 L7.21628571,6.382 L7.21628571,7.16631128 L7.29761905,7.16666667 C7.52773769,7.16666667 7.71428571,7.35321469 7.71428571,7.58333333 C7.71428571,7.81345198 7.52773769,8 7.29761905,8 L5.63095238,8 C5.40083374,8 5.21428571,7.81345198 5.21428571,7.58333333 C5.21428571,7.35321469 5.40083374,7.16666667 5.63095238,7.16666667 L5.78728571,7.16631128 L5.78728571,6.382 Z M18.2354199,6.38348366 L18.2353765,7.17048366 L18.3167098,7.17070745 C18.5468285,7.17070745 18.7333765,7.35725547 18.7333765,7.58737412 C18.7333765,7.81749276 18.54
168285,8.00404078 18.3167098,8.00404078 L16.6500431,8.00404078 C16.4199245,8.00404078 16.2333765,7.81749276 16.2333765,7.58737412 C16.2333765,7.35725547 16.4199245,7.17070745 16.6500431,7.17070745 L16.8063765,7.17048366 L16.8068484,6.38348366 L18.2354199,6.38348366 Z M6.85918625,3 L6.14490054,3 C6.04073387,3 5.95516839,3.03284966 5.88820411,3.09854897 C5.82123982,3.16424829 5.78775768,3.24819741 5.78775768,3.35039635 L5.78775768,6.37901976 L7.21632911,6.37901976 L7.21632911,3.35039635 C7.21632911,3.24819741 7.18284696,3.16424829 7.11588268,3.09854897 C7.04891839,3.03284966 6.96335292,3 6.85918625,3 Z"/>\n                </svg>',checkBoxOn:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>\n                </svg>',checkBoxOff:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/>\n                </svg>',radioButtonOn:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/>\n                </svg>',radioButtonOff:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/>\n                </svg>',toggleButtonOn:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <path d="M17 7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h10c2.76 0 5-2.24 5-5s-2.24-5-5-5zm0 8c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"/>\n                </svg>',toggleButtonOff:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="wtk-icon-svg">\n                    <path d="M17 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6zm0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4zM7 9c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/>\n                </svg>'},Ae.svgElementsMap=Ae.convertToElement();class _r{constructor(){this.position=li.DOWN,this.hasSelectIndication=!0,this.fieldConfig={Unknown:["COUNTRY_FLAG_16","DISPLAY_TICKER","FEED_EXCHANGE","FEED_ACCESS_DESC_ICON"],Fund:["FULL_NAME","FEED_EXCHANGE","FEED_ACCESS_DESC_ICON"]},this.initialListFieldConfig={Unknown:["COUNTRY_FLAG_16","DISPLAY_TICKER","FEED_ACCESS_DESC_ICON"],Fund:["FULL_NAME","FEED_ACCESS_DESC_ICON"]},this.tooltipFieldConfig={Unknown:["TICKER","FEED","FEED_ACCESS_DESC"],Fund:[["TICKER","FEED","FEED_ACCESS_DESC"],["FULL_NAME"]]},this.sharedStorageKey="GLOBAL~SDK~CHARTWIDGET",this.storageLimit=10}}class Ar extends Fn.b{constructor(){super(...arguments),this.position=li.DOWN,this.hasSelectIndication=!0,this.dropDownCssClass=Ue.NEW_COMPARE,this.openDropDownElementLabel={label:new r.InfrontUtil.Observable(Ae.getSvgIcon("chart")),isIcon:!0},this.resetInputOnClose=!0,this.sharedStorageKey="GLOBAL~SDK~CHARTWIDGET",this.storageLimit=10}}var Zt;!function(a){a[a.DEFAULT=1]="DEFAULT",a[a.MULTIPLE=2]="MULTIPLE",a[a.EUR=100]="EUR",a[a.GBP=101]="GBP",a[a.USD=102]="USD",a[a.JPY=103]="JPY",a[a.CHF=104]="CHF",a[a.AUD=105]="AUD",a[a.CAD=106]="CAD",a[a.SEK=107]="SEK",a[a.DKK=108]="DKK",a[a.NOK=109]="NOK",a[a.CZK=110]="CZK",a[a.HUF=111]="HUF",a[a.PLN=112]="PLN",a[a.RON=113]="RON",a[a.RUB=200]="RUB",a[a.CNY=201]="CNY",a[a.HKD=202]="HKD",a[a.SGD=203]="SGD",a[a.ISK=204]="ISK",a[a.BGN=205]="BGN",a[a.HRK=206]="HRK",a[a.NZD=207]="NZD",a[a.ZAR=208]="ZAR"}(Zt||(Zt={}));const Or={EUR:"&euro;",USD:"&#36;",JPY:"&#165;",GBP:"&#163;",CHF:"&#8355;",TRY:"&#8356;",KRW:"&#8361;"};class ii{static isDefaultCurrency(t){return null==t||t===Zt[Zt.DEFAULT]}static isRealCurrency(t){return![Zt.DEFAULT,Zt.MULTIPLE].includes(Zt[t])}static getTargetCurrency(t,e){return(Zt[e?.targetCurrency]||0)>Zt.MULTIPLE?e.targetCurrency:(Zt[t.targetCurrency]||0)>Zt.MULTIPLE?t.targetCurrency:null}}var Dt,jt;(function(a){a.TOGGLE_VOLUME="toggleVolume",a.TOGGLE_VOLUME_UNDERLAY="toggleVolumeUnderlay",a.TOGGLE_VOLUME_BY_PRICE="toggleVbp",a.VOLUME_BY_PRICE="vbp",a.SMA="sma",a.EMA="ema",a.WMA="wma",a.BOLLINGER_BANDS="bb",a.VWAP="vwapPerDay",a.MACD="macd",a.MOMENTUM="momentum",a.RSI="rsi",a.RVI="rvi",a.STDDEV="stddev",a.STOCHASTIC="stochastic",a.STOCHASTIC_SLOW="stochasticslow",a.STOCHASTIC_FAST="stochasticfast",a.ATR="atr",a.TOGGLE_INDICATORS="toggleIndicators",a.DELETE_ALL_INDICATORS="deleteAllIndicators",a.DELETE_ALL_OSCILLATORS="deleteAllOscillators"})(Dt||(Dt={})),function(a){a.SEGMENT="segment",a.INFINITY_LINE="infinityLine",a.VERTICAL_LINE="verticalLine",a.HORIZONTAL_LINE="horizontalLine",a.PARALLEL_CHANNEL="parallelChannel",a.FIBONACCI="fibonacci",a.PARALLEL_CHANNEL_HORIZONTAL="parallelChannelHorizontal",a.FIBONACCI_VERTICAL="fibonacciVertical",a.FIBONACCI_HORIZONTAL="fibonacciHorizontal",a.FIBONACCI_FAN="fibonacciFan",a.FIBONACCI_TIME_ZONES="fibonacciTimeZonesCustom",a.FIBONACCI_CIRCLE="fibonacciCircle",a.STATISTIC_LINE="statisticLine",a.ARROW_SEGMNENT="arrowSegment",a.RAY="ray",a.ARROW_RAY="arrowRay",a.CROOKED3="crooked3",a.CROOKED5="crooked5",a.ELLIOTT3="elliott3",a.ELLIOTT5="elliott5",a.CIRCLE_ANNOTATION="circle",a.PITCHFORK="pitchfork",a.LABEL_ANNOTATION="labelAnnotation",a.TOGGLE_ANNOTATIONS="toggleAnnotations",a.DELETE_ALL_ANNOTATIONS="deleteAllAnnotations"}(jt||(jt={}));const br={subscribe:!1},tr=[r.InfrontSDK.SearchResultField.Ticker,r.InfrontSDK.SearchResultField.Feed,r.InfrontSDK.SearchResultField.SymbolType,r.InfrontSDK.SearchResultField.SymbolSubType,r.InfrontSDK.SearchResultField.SymbolClassification];var bn;!function(a){a[a.DATA=0]="DATA",a[a.CACHE=1]="CACHE",a[a.STORAGE=2]="STORAGE",a[a.INITIAL=3]="INITIAL"}(bn||(bn={}));class Lr{set searchRequestOptions(t){const e=r.InfrontUtil.deepCopy(t);null!=e.limit&&(e.limit=r.InfrontUtil.getValueWithinMinMax(e.limit,1,50)),!e.searchType.symbol&&e.searchType||(Array.isArray(e.fields)?e.fields.push(...tr):e.fields=[...tr]),t.onFeedScoreAdjustment&&(e.onFeedScoreAdjustment=t.onFeedScoreAdjustment),this._searchRequestOptions=e}get searchRequestOptions(){return this._searchRequestOptions}set requestDebounceMs(t){this._requestDebounceMs=r.InfrontUtil.getValueWithinMinMax(t,30,250)}get requestDebounceMs(){return this._requestDebounceMs}set cacheOptions(t){this._cacheOptions={enabled:t.enabled,expirationTime:t.expirationTime<0?72e5:t.expirationTime}}get cacheOptions(){return this._cacheOptions}constructor(){this._requestDebounceMs=50,this._cacheOptions={enabled:!0,expirationTime:72e5},this.hasResetButton=!1,this.hasSearchHistory=!0,this.searchRequestOptions={parameters:{SearchFreeTextFields:["Ticker","FullName","ISIN"]},fields:[r.InfrontSDK.SearchResultField.Country,r.InfrontSDK.SearchResultField.CountryOfIncorporation,r.InfrontSDK.SearchResultField.FullName],searchType:{symbol:!0},limit:10}}}class Xr extends Fn.b{constructor(){super(...arguments),this.labelAlpha="CC",this.labelOutsideAlpha="CC",this.labelTextAlp
1ha="B3",this.labelTextOutsideAlpha="B3",this.legendAlpha="55",this.secondaryColorType=pi.ORIGINAL,this.secondaryColorTransparency=.5,this.chartType=ht.kDefaultChartType,this.cursorType=Nn.CROSSHAIR,this.cursorSnapX=!0,this.cursorSnapY=!1,this.cursorEventsEnabled=!0,this.showHigh=!1,this.showHighLow=!1,this.showLow=!1,this.prevCloseType=Zn.LINE,this.showPrevClose=!0,this.isPrevCloseCompareValue=!0,this.mainOnTop=!0,this.showLegend=!0,this.showTooltip=!0,this.showVolume=!1,this.showVolumeUnderlay=!1,this.volumeType=rn.TURNOVER,this.volumePositiveColor=Bt.getHexAlphaColor(In,"DD"),this.volumeNegativeColor=Bt.getHexAlphaColor(cn,"DD"),this.volumeAlpha="AA",this.mainDataType=Gt.AUTO,this.dataTypePreferOhlcOnShortage=!1,this.streaming=!1,this.caching=!1,this.adjustDividends=!1,this.adjustSplits=!0,this.adjustStartDate=!0,this.loadIntradayIndicatorsExtraData=!1,this.showSplits=!1,this.showDividends=!1,this.showCalendar=!1,this.calendarFeeds=[],this.showNews=!1,this.showReleases=!1,this.companyEventSmallDots=!1,this.watermarkType=yn.NONE,this.watermarkMaxFontSize=140,this.watermarkMaxHeightPercent=30,this.watermarkMaxWidthPercent=70,this.showLogo=!1,this.showOrdinate=!0,this.showOppositeOrdinate=!1,this.ordinateType=Dn.LINEAR,this.ordinateScaling=Pe.AUTO,this.ordinateCompareBase=0,this.showSeriesLabels=!0,this.ordinateLabelsOutside=!1,this.gridType=Rn.GRID,this.showAlternateGridColor=!1,this.decimals=void 0,this.topToolbar={searchBox:!1,chartTypeMenu:!1,periodMenu:!1,resolutionMenu:!1,indicatorMenu:!1,annotationMenu:!1,templateMenu:!1,cursorTypeMenu:!1,compareMenu:!1,newCompareMenu:!1,cursorEventsButton:!1,currencyMenu:!1,settingsMenu:!1,instrumentHeader:!1,fullScreenButton:!1},this.bottomToolbar={periodButtons:!1,periodMenu:!1,resolutionMenu:!1},this.showNavigator=!1,this.navigatorHeight=16,this.navigatorMargin=10,this.navigatorHandlesEnabled=!0,this.navigatorHandlesSymbols=["navigator-handle","navigator-handle"],this.navigatorHandlesHeight=15,this.navigatorHandlesWidth=8,this.navigatorScrollFactor=.2,this.hasNavigatorScroll=!0,this.updateTimeout=300,this.redrawTimeout=300,this.reflowTimeout=50,this.legendItemClick=Bn.EDIT_REMOVE_SERIES,this.useNativeAnnotationSettings=!1,this.generalDropDownOptions={booleanRepresentation:yi.CHECKBOX},this.chartTypes=[wt.AREA,wt.CANDLESTICK,wt.LINE,wt.OHLC,wt.BASELINE,wt.HEIKINASHI,wt.HOLLOWCANDLESTICK,wt.POINTS],this.selectableCompare={list:[{name:"Major Indices",translate:!0,items:[{item:new r.Infront.Instrument(2087,"NDX"),name:"Nasdaq 100",iconAfter:"US"},{item:new r.Infront.Instrument(2087,"COMP"),name:"Nasdaq Composite",iconAfter:"US"},{item:new r.Infront.Instrument(6092,"DIA"),name:"Dow Jones (ETF)",iconAfter:"US"},{item:new r.Infront.Instrument(6092,"SPY"),name:"S&P 500 (ETF)",iconAfter:xt.US},{item:new r.Infront.Instrument(6092,"QWLD"),name:"MSCI World (ETF)",iconAfter:xt.GLOBAL},{item:new r.Infront.Instrument(2098,"DAX"),name:"DAX Index",iconAfter:"DE"},{item:new r.Infront.Instrument(2089,"PX1"),name:"CAC40",iconAfter:"FRA"},{item:new r.Infront.Instrument(2161,"SX5E"),name:"EURO STOXX 50",iconAfter:"EU"},{item:new r.Infront.Instrument(2161,"SXXP"),name:"STOXX EUROPE 600",iconAfter:"EU"}]},{name:"Nordic Indices",translate:!0,items:[{item:new r.Infront.Instrument(18177,"OSEBX"),name:"OSEBX",iconAfter:"NO"},{item:new r.Infront.Instrument(18177,"OBX"),name:"OBX",iconAfter:"NOR"},{item:new r.Infront.Instrument(17921,"OMXS30"),name:"OMXS30",iconAfter:"SE"},{item:new r.Infront.Instrument(17665,"OMXC25"),name:"OMXC25",iconAfter:"DK"},{item:new r.Infront.Instrument(100,"OMXH25"),name:"OMXH25",iconAfter:"FI"}]},{name:"Commodities",translate:!0,items:[{item:new r.Infront.Instrument(2229,"BRT"),name:"Brent Spot",iconAfter:xt.GLOBAL},{item:new r.Infront.Instrument(2229,"WTI"),name:"WTI Spot",iconAfter:xt.CODE_0},{item:new r.Infront.Instrument(2159,"GLDSPOT"),name:"Gold Spot",iconAfter:xt.CODE_0},{item:new r.Infront.Instrument(2159,"SLVSPOT"),name:"Silver Spot",iconAfter:xt.GLOBAL},{item:new r.Infront.Instrument(2264,"SPOT"),name:"Fresh Salmon Spot 3-6KG",iconAfter:xt.GLOBAL}]},{name:"Major Futures",translate:!0,items:[{item:new r.Infront.Instrument(2101,"YMFUT1"),name:"Dow Jones (mini)",iconAfter:xt.CODE_1},{item:new r.Infront.Instrument(21,"NQFUT1"),name:"Nasdaq 100 (mini)",iconAfter:xt.CODE_1},{item:new r.Infront.Instrument(21,"ESFUT1"),name:"S&P500 (mini)",iconAfter:xt.CODE_1},{item:new r.Infront.Instrument(6330,"VIX"),name:"VIX Volatility Index",iconAfter:xt.CODE_1}]}],collapsable:En.FIRST},this.newCompareDropDownOptions=new _r,this.sdkSearchBoxOptions=new Lr,this.selectableNewCompare={list:[{name:"Major Indices",translate:!0,items:[{instrument:new r.Infront.Instrument(2087,"NDX"),overrides:{DISPLAY_TICKER:"Nasdaq 100"}},{instrument:new r.Infront.Instrument(2087,"COMP"),overrides:{DISPLAY_TICKER:"Nasdaq Composite"}},{instrument:new r.Infront.Instrument(6092,"DIA"),overrides:{DISPLAY_TICKER:"Dow Jones (ETF)"}},{instrument:new r.Infront.Instrument(6092,"SPY"),overrides:{DISPLAY_TICKER:"S&P 500 (ETF)"}},{instrument:new r.Infront.Instrument(6092,"QWLD"),overrides:{DISPLAY_TICKER:"MSCI World (ETF)",COUNTRY_FLAG_16:"Global"}},{instrument:new r.Infront.Instrument(2098,"DAX"),overrides:{DISPLAY_TICKER:"DAX Index"}},{instrument:new r.Infront.Instrument(2089,"PX1"),overrides:{DISPLAY_TICKER:"CAC40"}},{instrument:new r.Infront.Instrument(2161,"SX5E"),overrides:{DISPLAY_TICKER:"EURO STOXX 50",COUNTRY_FLAG_16:"EU"}},{instrument:new r.Infront.Instrument(2161,"SXXP"),overrides:{DISPLAY_TICKER:"STOXX EUROPE 600",COUNTRY_FLAG_16:"EU"}}]},{name:"Nordic Indices",translate:!0,items:[{instrument:new r.Infront.Instrument(18177,"OSEBX"),overrides:{DISPLAY_TICKER:"OSEBX"}},{instrument:new r.Infront.Instrument(18177,"OBX"),overrides:{DISPLAY_TICKER:"OBX"}},{instrument:new r.Infront.Instrument(17921,"OMXS30"),overrides:{DISPLAY_TICKER:"OMXS30"}},{instrument:new r.Infront.Instrument(17665,"OMXC25"),overrides:{DISPLAY_TICKER:"OMXC25"}},{instrument:new r.Infront.Instrument(100,"OMXH25"),overrides:{DISPLAY_TICKER:"OMXH25"}}]},{name:"Commodities",translate:!0,items:[{instrument:new r.Infront.Instrument(2229,"BRT"),overrides:{DISPLAY_TICKER:"Brent Spot"}},{instrument:new r.Infront.Instrument(2229,"WTI"),overrides:{DISPLAY_TICKER:"WTI Spot"}}
1,{instrument:new r.Infront.Instrument(2159,"GLDSPOT"),overrides:{DISPLAY_TICKER:"Gold Spot"}},{instrument:new r.Infront.Instrument(2159,"SLVSPOT"),overrides:{DISPLAY_TICKER:"Silver Spot"}},{instrument:new r.Infront.Instrument(2264,"SPOT"),overrides:{DISPLAY_TICKER:"Fresh Salmon Spot 3-6KG",COUNTRY_FLAG_16:"Global"}}]},{name:"Major Futures",translate:!0,items:[{instrument:new r.Infront.Instrument(2101,"YMFUT1"),overrides:{DISPLAY_TICKER:"Dow Jones (mini)"}},{instrument:new r.Infront.Instrument(21,"NQFUT1"),overrides:{DISPLAY_TICKER:"Nasdaq 100 (mini)"}},{instrument:new r.Infront.Instrument(21,"ESFUT1"),overrides:{DISPLAY_TICKER:"S&P500 (mini)"}},{instrument:new r.Infront.Instrument(6330,"VIX"),overrides:{DISPLAY_TICKER:"VIX Volatility Index"}}]}],collapsable:En.FIRST},this.selectableCurrencies={list:[{name:"mainCurrencies",translate:!0,items:[Zt.EUR,Zt.GBP,Zt.USD,Zt.CHF,Zt.JPY,Zt.AUD,Zt.CAD,Zt.SEK,Zt.DKK,Zt.NOK,Zt.CZK,Zt.HUF,Zt.PLN,Zt.RON]},{name:"exoticCurrencies",translate:!0,items:[Zt.RUB,Zt.CNY,Zt.HKD,Zt.SGD,Zt.ISK,Zt.BGN,Zt.HRK,Zt.NZD,Zt.ZAR]}],collapsable:En.CLOSED},this.defaultCurrency=Zt.DEFAULT,this.selectablePeriods=["S","1D","2D","5D","10D","30D","90D","1M","3M","6M","9M","1Y","2Y","3Y","5Y","LYTD","YTD","ALL","CUSTOM"],this.defaultPeriod="5D",this.autoResolution=!0,this.defaultResolutions={[qt.SECOND]:tt.ONE_SECOND,[qt.ONE_DAY]:tt.ONE_MINUTE,[qt.PERIOD_24H]:tt.ONE_MINUTE,[qt.TWO_DAYS]:tt.ONE_MINUTE,[qt.THREE_DAYS]:tt.FIVE_MINUTES,[At.FIVE_YEARS]:Pt.ONE_WEEK,[At.ALL]:Pt.ONE_WEEK},this.selectableHistoricalResolutions=[Pt.AUTO,Pt.ONE_DAY,Pt.ONE_WEEK,Pt.ONE_MONTH],this.topToolbarLabels={},this.bottomToolbarLabels={},this.instrumentHeader={chartFields:!0,quoteFields:!0,symbolBaseType:Ii.CLASSIFICATION},this.instrumentHeaderChartFields={Unknown:[{name:"currentPeriod",label:!1},{name:"absChange",label:!1,enableStatusColors:!0},{name:"pctChange",label:!1,enableStatusColors:!0}]},this.instrumentHeaderQuoteFields={Unknown:[{name:"VWAP",label:!0},{name:"LAST",label:!0},{name:"PCT_CHANGE",label:!0,enableStatusColors:!0}],Stock:[{name:"VWAP",label:!0},{name:"LAST",label:!0},{name:"PCT_CHANGE",label:!0,enableStatusColors:!0}],Index:[{name:"VWAP",label:!0},{name:"LAST",label:!0},{name:"PCT_CHANGE",label:!0,enableStatusColors:!0}],ETF:[{name:"VWAP",label:!0},{name:"LAST",label:!0},{name:"PCT_CHANGE",label:!0,enableStatusColors:!0}],Future:[{name:"VWAP",label:!0},{name:"LAST",label:!0},{name:"PCT_CHANGE",label:!0,enableStatusColors:!0}],Fund:[{name:"LAST_TRADE_DATE_SHORT",label:!0},{name:"LAST_VALID",label:!0},{name:"PCT_CHANGE",label:!0,enableStatusColors:!0}],Bond:[{name:"CURRENT_COUPON",label:!0,enableStatusColors:!0},{name:"YIELD",label:!0},{name:"BID",label:!0},{name:"ASK",label:!0}],Commodity:[{name:"LAST",label:!0},{name:"PCT_CHANGE",label:!0,enableStatusColors:!0}],Certificate:[{name:"BID",label:!0},{name:"ASK",label:!0},{name:"LAST",label:!0},{name:"PCT_CHANGE",label:!0,enableStatusColors:!0}],Derivative:[{name:"BID",label:!0},{name:"ASK",label:!0},{name:"LAST",label:!0},{name:"PCT_CHANGE",label:!0,enableStatusColors:!0}],CFD:[{name:"BID",label:!0},{name:"ASK",label:!0},{name:"LAST",label:!0},{name:"PCT_CHANGE",label:!0,enableStatusColors:!0}],Forex:[{name:"LAST",label:!0},{name:"PCT_CHANGE",label:!0,enableStatusColors:!0}],Indicator:[{name:"LAST",label:!0},{name:"PCT_CHANGE",label:!0,enableStatusColors:!0}]},this.selectableIndicators={list:[Dt.TOGGLE_VOLUME_BY_PRICE,Dt.TOGGLE_VOLUME,Dt.TOGGLE_VOLUME_UNDERLAY,{name:"Indicators",translate:!0,items:[Dt.SMA,Dt.EMA,Dt.WMA,Dt.BOLLINGER_BANDS,Dt.VWAP]},{name:"Oscillators",translate:!0,items:[Dt.MACD,Dt.MOMENTUM,Dt.RSI,Dt.RVI,Dt.STDDEV,Dt.STOCHASTIC_SLOW,Dt.STOCHASTIC_FAST,Dt.ATR]},Dt.TOGGLE_INDICATORS,Dt.DELETE_ALL_INDICATORS,Dt.DELETE_ALL_OSCILLATORS],collapsable:En.CLOSED},this.indicatorsBasedOnResolution=!1,this.selectableAnnotations={list:[{name:"group_lines",translate:!0,items:[jt.SEGMENT,jt.ARROW_SEGMNENT,jt.RAY,jt.ARROW_RAY,jt.INFINITY_LINE,jt.HORIZONTAL_LINE,jt.VERTICAL_LINE,jt.STATISTIC_LINE]},{name:"group_crookedLines",translate:!0,items:[jt.CROOKED3,jt.CROOKED5,jt.ELLIOTT3,jt.ELLIOTT5]},{name:"group_advanced",translate:!0,items:[jt.PARALLEL_CHANNEL,jt.PARALLEL_CHANNEL_HORIZONTAL,jt.FIBONACCI,jt.FIBONACCI_CIRCLE,jt.FIBONACCI_FAN,jt.FIBONACCI_HORIZONTAL,jt.FIBONACCI_VERTICAL,jt.FIBONACCI_TIME_ZONES,jt.CIRCLE_ANNOTATION,jt.PITCHFORK,jt.LABEL_ANNOTATION]},jt.TOGGLE_ANNOTATIONS,jt.DELETE_ALL_ANNOTATIONS],collapsable:En.CLOSED},this.selectableTemplates={list:[V.DEFAULT,V.TEN_MINUTES_VWAP,V.FIFTEEN_MINUTES_TA,V.ONE_HOUR_TA,V.DAILY_TA,V.WEEKLY_TA,V.MONTHLY_TA,V.STOCHASTIC_BB,V.CANDLESTICK_VOLUME,V.SAVE_AS_DEFAULT,V.RESET_DEFAULT],collapsable:En.CLOSED},this.availableCustomTemplates={}}}class $r extends r.Infront.Instrument{constructor(t,e,n){super(null,t,null),(null==e||r.InfrontUtil.isString(e))&&(this.full_name=e),this.jsonConfig=null!=e&&r.InfrontUtil.isObject(e)?e:n}}var Sa=qe(64402),_a=qe(81137),fi=qe(31635),Aa=qe(48361);const er=xt.GLOBAL,ci={};class Zr{static getCountryFlag(t,e,n=!0,i=er){var s,o;const l=new Image(e,e);let u="";const d=this.getCountryFileName(t,n,i);if(!d)return;const g=`${d}~${e}`,I=ci[g];
1if(l.className="cell-country-flag",I)l.src=I;else{const C=null===(o=null===(s=(0,D.a)())||void 0===s?void 0:s.options)||void 0===o?void 0:o.imageRootPath;C?u=C+(C.endsWith("/")?"":"/")+"flags/"+e+"/":"release"===r.Infront.LibraryConstants.kBuildType&&(u=`//wtk.infrontservices.com/img/flags/${e}/`),l.onerror=function(){this.onerror=null,r.Infront.DEBUG&&r.Infront.DEBUG_UNHANDLED_TAGS&&r.Infront.log("CountryFlag.getCountryFlag() - no entry found for",t),this.src=u+er+".png"},l.src=u+d+".png";const S=new URL(l.src);location.origin===S.origin?(function(N,k){if(ci[N])return;const x=new Image;x.onload=()=>{const Y=document.createElement("canvas");Y.width=x.width,Y.height=x.height;const et=Y.getContext("2d");et?.drawImage(x,0,0),ci[N]||(ci[N]=Y.toDataURL("image/png"))},x.src=k}(g,l.src),ci[g]&&(l.src=ci[g])):ci[g]=S.href}return l}static getCountryFlagBySymbolDataItem(t,e,n=!1){const i=t.get(r.InfrontSDK.SymbolField.CountryOfIncorporation)||t.get(r.InfrontSDK.SymbolField.Country)||t.get(r.InfrontSDK.SymbolField.FeedCountry);if(n||i)return this.getCountryFlag(i,e,n)}static getCountryFileName(t,e=!0,n=xt.GLOBAL){let i;if("string"==typeof t)if($t.includes(t))i=t;else{const s=new RegExp(/\s/,"g"),o=new RegExp(/[^A-z0-9_]/,"g");i=xt[t]||xt[t.toUpperCase().replace(s,"_").replace(o,"")]}else"number"==typeof t&&(i=xt["CODE_"+t]);return!i&&e&&(i=n),i}}var Ze,Ci,Qr,h,Yt,Le,bi=qe(69475);(function(a){a[a.Neutral=0]="Neutral",a[a.UpDown=1]="UpDown",a[a.UpDownSame=2]="UpDownSame",a[a.UpDownFlash=3]="UpDownFlash",a[a.Percent=4]="Percent",a[a.None=5]="None"})(Ze||(Ze={})),function(a){a[a.Default=1e3]="Default",a[a.Short=500]="Short",a[a.Long=2e3]="Long",a[a.VeryLong=5e3]="VeryLong",a[a.Sustained=0]="Sustained"}(Ci||(Ci={})),function(a){a[a.NONE=0]="NONE",a[a.ASC=1]="ASC",a[a.DESC=2]="DESC"}(Qr||(Qr={})),function(a){a[a.Boolean=0]="Boolean",a[a.Numeric=1]="Numeric",a[a.Integer=2]="Integer",a[a.Volume=3]="Volume",a[a.ID=4]="ID",a[a.Percent=5]="Percent",a[a.Text=6]="Text",a[a.Enum=7]="Enum",a[a.DateTime=8]="DateTime",a[a.DateOnly=9]="DateOnly",a[a.DateShort=10]="DateShort",a[a.Time=11]="Time",a[a.DOM=12]="DOM",a[a.IndicatorArrow=13]="IndicatorArrow",a[a.IdsDate=14]="IdsDate"}(h||(h={})),function(a){a[a.Unknown=0]="Unknown",a[a.Instrument=1]="Instrument",a[a.Snapshot=2]="Snapshot",a[a.Historical=3]="Historical",a[a.Brokerstats=4]="Brokerstats",a[a.IntradayTrades=5]="IntradayTrades",a[a.Position=6]="Position",a[a.Order=7]="Order",a[a.OrderAlgo=8]="OrderAlgo",a[a.Trade=9]="Trade",a[a.Fund=10]="Fund",a[a.Portfolio=11]="Portfolio",a[a.Market=12]="Market",a[a.CalculatedHistory=13]="CalculatedHistory",a[a.TopEntities=14]="TopEntities",a[a.Forex=15]="Forex",a[a.SmeFundamental=16]="SmeFundamental",a[a.AdditionalData=17]="AdditionalData",a[a.CompanyMetadata=18]="CompanyMetadata",a[a.SDK=19]="SDK",a[a.Computed=20]="Computed"}(Yt||(Yt={})),function(a){a[a.Normal=0]="Normal",a[a.Computed=1]="Computed",a[a.Custom=2]="Custom",a[a.Converted=3]="Converted"}(Le||(Le={}));class me{constructor(t,e,n,i=h.Text,s=!1,o=!1,l=!0){var u,d;this.name="",this.type=Le.Normal,this.sortable=!0,this.sortUsingOriginalValue=!1,this.subscribeFieldName="",this.dataType=h.Text,this.blinkDuration=Ci.Default,this.visible=new r.Infront.OverridableObservable,this.processedLocale=!1,this.name=t,this.tagSet=e,this.tag=n,this.lowerCaseName=t.toLowerCase(),this.fieldClassName=this.lowerCaseName.replace(/_/g,"-"),this.dataType=i,this.shorten=s,this.allowZero=l,this.visible.set(!0),this.supportsBackgroundFlash=(null===(d=null===(u=(0,D.a)())||void 0===u?void 0:u.options)||void 0===d?void 0:d.enableHighlightUpDownChanges)&&o}getFieldSpec(){return[this.lowerCaseName]}setTag(t){this.tag=t}getFieldTag(){return this.tag}getTagName(){return"string"==typeof this.tag?this.tag:r.Infront.tagToStr(this.tagSet,this.tag)}getSubscriptionFieldNames(){const t=[],e=this.getDependentFields();for(const n of e)n.subscribeFieldName&&-1===t.indexOf(n.subscribeFieldName)&&t.push(n.subscribeFieldName);return t}getDependentFields(){let t=[];if(t.push(this),this.type===Le.Computed&&this.computeFields)for(let e=0;e<this.computeFields.length;e++)t=t.concat(this.computeFields[e].getDependentFields());else this.type===Le.Converted&&(t=t.concat(this.sourceField.getDependentFields()));return this.hover&&this.hover.name!==this.name&&(t=t.concat(this.hover.getDependentFields())),t}getFieldClassName(){return this.fieldClassName}isValid(){return this.type===Le.Normal||"string"==typeof this.name}applySpecAndDefaults(t,e){r.InfrontUtil.isObject(t)&&this.applySpec(t),this.applyDefaults(t,e)}applyDefaults(t,e){switch(e&&(this.languageHandler=e),this.dataType){case h.Integer:case h.Numeric:case h.Percent:this.genericClass=O.C.kCellNumeric,this.blinkType=this.supportsBackgroun
1dFlash?Ze.UpDownFlash:Ze.UpDown;break;case h.DateOnly:case h.DateTime:case h.DateShort:case h.Volume:case h.IdsDate:this.genericClass=O.C.kCellNumeric,this.blinkType=Ze.Neutral;break;case h.ID:case h.Time:this.genericClass=O.C.kCellNumeric,this.blinkType=Ze.None;break;case h.Boolean:case h.DOM:case h.Enum:case h.Text:this.genericClass=O.C.kCellText,this.blinkType=Ze.None;break;case h.IndicatorArrow:this.genericClass=O.C.kCellArrow,this.blinkDuration=Ci.Sustained,this.blinkType=Ze.UpDownSame}if(this.specificClass=this.genericClass+"--"+this.getFieldClassName(),this.dataType!=h.Enum||this.translate||(this.translate=(n,i)=>r.InfrontUtil.formatEnumString(i)),this.languageHandler&&void 0===this.heading&&(this.heading=this.languageHandler.get(me.kFieldsLanguageKey,this.name)),this.languageHandler&&void 0===this.headingHover){const n=this.name+me.kFieldsHeadingHoverSuffix,i=this.languageHandler.get(me.kFieldsLanguageKey,n);n!==i&&(this.headingHover=i)}this.locale&&!this.processedLocale&&this.setTag(r.InfrontUtil.fixLocaleTag(this.getTagName(),this.locale)),r.InfrontUtil.isObject(t)&&!0===t.alwaysVisible?this.forceVisible():!0===this.hidden&&this.forceHidden(),"VOLUME_ADV_PCT"===this.name&&(this.blinkType=Ze.Percent),t.targetCurrency&&(this.convertedTag=this.tag,this.tag=`${this.getTagName()}_${this.targetCurrency}`)}applySpec(t){r.InfrontUtil.isObject(t)&&(this.specToProp(t,"hover",ke.isValidSpec,!0),this.specToProp(t,"heading",r.InfrontUtil.isStringOrNull),this.specToProp(t,"headingHover",r.InfrontUtil.isString),this.specToProp(t,"className",r.InfrontUtil.isString),this.specToProp(t,"translate",r.InfrontUtil.isFunction),this.specToProp(t,"sortable",r.InfrontUtil.isBoolean),this.specToProp(t,"shorten",r.InfrontUtil.isBoolean),this.specToProp(t,"decimals",r.InfrontUtil.isNumber),this.specToProp(t,"hidden",r.InfrontUtil.isBoolean),this.specToProp(t,"footer",ke.isValidFooter),this.specToProp(t,"showExtra",r.InfrontUtil.isBoolean),this.specToProp(t,"onClick",r.InfrontUtil.isFunction),this.specToProp(t,"flag",r.InfrontUtil.isBoolean),this.specToProp(t,"flag",r.InfrontUtil.isString),this.specToProp(t,"footerStrategy",r.InfrontUtil.isNumber),this.specToProp(t,"weight",r.InfrontUtil.isString),this.specToProp(t,"url",r.InfrontUtil.isString),this.specToProp(t,"dataType",r.InfrontUtil.isNumber),this.specToProp(t,"highlightChange",r.InfrontUtil.isBoolean),this.specToProp(t,"blinkDuration",r.InfrontUtil.isNumber),this.specToProp(t,"toggleExpanded",r.InfrontUtil.isBoolean),this.specToProp(t,"visible",r.InfrontUtil.Observable.isObservable),this.specToProp(t,"targetCurrency",r.InfrontUtil.isString),this.specToProp(t,"locale",r.InfrontUtil.isString))}isValidSpecProp(t,e,n){return Object.hasOwn(t,e)&&n(t[e])}specToProp(t,e,n,i=!1){if(this.isValidSpecProp(t,e,n))if(i){const s=ke.createFieldFromSpec(t[e],this.languageHandler,[this.source,Yt.Unknown]);s&&(s.forceHidden(),this[e]=s)}else this[e]=t[e];else Object.hasOwn(t,e)&&t[e]&&r.Infront.DEBUG_COLUMNS&&r.InfrontUtil.errorLog("Warning: Invalid prop "+e+" when creating field "+this.name,t)}forceVisible(){this.visible.override(!0)}forceHidden(){this.visible.override(!1)}isSortable(){return this.sortable}equals(t){return null!=t&&t.name===this.name&&t.heading===this.heading&&t.nodeIndex===this.nodeIndex}isSameField(t){return null!=t&&t.name===this.name&&t.source===this.source}getValueFromObject(t){let e=null;const n=this.name.toLowerCase();let i;if(i=this.source===Yt.Instrument?t[r.Infront.MWSConstants.instrument]:this.source===Yt.Historical?t[r.Infront.MWSConstants.hist_performance]:t,i&&Object.hasOwn(i,n))e=i[n];else for(const s in i)if(s.toLowerCase()===n){e=i[s];break}return e}getComputedFieldTypeSDKValue(t,e){var n;const i=[];return void 0!==e?Array.isArray(e)?e.forEach(s=>{i.push(s)}):r.InfrontUtil.isPrimitive(e)&&i.push(e):null===(n=this.computeFields)||void 0===n||n.forEach(s=>{const o=r.InfrontSDK.tagToSymbolField(s.tag);i.push(o?t.get(o):void 0)}),this.compute(t,i,null)}getSDKValue(t,e){if(this.tagSet!==r.Infront.TagSet.Realtime)return;let n;if(this.type===Le.Computed)n=this.getComputedFieldTypeSDKValue(t,e);else if(void 0!==e)n=e;else if(this.tag){const i=r.InfrontSDK.tagToSymbolField(this.tag);i&&(n=t.get(i))}return r.InfrontUtil.isFunction(this.translate)&&(n=this.translate(t,n)),n}objectHasValue(t){const e=this.getFieldSpec();let n=!0,i=t;for(let s=0;s<e.length;s++){if(!Object.hasOwn(i,e[s])){n=!1;break}i=i[e[s]]}return n}createValueBinding(t,e,n,i,s){let o;return null==s&&(s=r.InfrontUtil.formatSettings.allowZero),"innerHTML"===n&&this.dataType!==h.Text&&this.dataType!==h.DOM&&"function"!=typeof this.translate&&(n="textContent"),o=this.translate?(0,M.c)(null,e,l=>this.translate(t,l),n):this.dataType===h.DateTime?r.InfrontUtil.BindingFactory.createTimestampBinding(e,!0,n):this.dataType===h.Volume&&this.shorten?r.InfrontUtil.BindingFactory.createShortenNumberBinding(e,n,s):this.dataType===h.Volume?r.InfrontUtil.BindingFactory.createV
1olumeNumberBinding(e,n,s):this.dataType===h.DateOnly?r.InfrontUtil.BindingFactory.createDateBinding(e,n):this.dataType===h.DateShort?r.InfrontUtil.BindingFactory.createDateShortBinding(e,n):this.dataType===h.Percent?r.InfrontUtil.BindingFactory.createPercentBinding(e,null!=this.decimals?this.decimals:2,n,s):this.dataType===h.Integer&&this.shorten?r.InfrontUtil.BindingFactory.createShortenNumberBinding(e,n,s):this.dataType===h.Integer?r.InfrontUtil.BindingFactory.createNumberFormatValueBinding(e,n,0,s):this.dataType===h.ID?r.InfrontUtil.BindingFactory.createIDBinding(e,n):this.dataType===h.DOM?r.InfrontUtil.BindingFactory.createDOMElementBinding(e):this.dataType===h.IdsDate?r.InfrontUtil.BindingFactory.createIdsDateBinding(e,n):this.dataType===h.Boolean?r.InfrontUtil.BindingFactory.createTranslateBinding(e,l=>l?me.Yes:me.No,n):this.dataType===h.Text?(0,M.a)(null,e,n):r.InfrontUtil.BindingFactory.createNumberFormatValueBinding(e,n,i,s),o}getCompareFunction(t,e=!1,n){let i=null;switch(this.dataType){case h.Integer:case h.Numeric:case h.Percent:case h.ID:case h.Volume:case h.Boolean:i=t===O.S.Desc?r.Infront.CompareFunctions.compareNumberDesc:r.Infront.CompareFunctions.compareNumberAsc;break;case h.DateShort:case h.DateOnly:case h.DateTime:i=t===O.S.Desc?r.Infront.CompareFunctions.compareDateStringsDesc:r.Infront.CompareFunctions.compareDateStringsAsc;break;case h.Time:i=t===O.S.Desc?r.Infront.CompareFunctions.compareTimeStringsDesc:r.Infront.CompareFunctions.compareTimeStringsAsc;break;default:i=e?t===O.S.Desc?r.Infront.CompareFunctions.compareStringsInsensitiveDesc(n):r.Infront.CompareFunctions.compareStringsInsensitiveAsc(n):t===O.S.Desc?r.Infront.CompareFunctions.compareStringsDesc:r.Infront.CompareFunctions.compareStringsAsc}return i}updateCustomContent(t,e,n){const i=s=>{let o="";switch(this.dataType){case h.Text:o=""+e;break;case h.Numeric:o=r.InfrontUtil.formatNumber(Number(e),s);break;case h.Percent:o=r.InfrontUtil.formatPercent(Number(e),s);break;case h.DateOnly:o=r.InfrontUtil.formatDate(e);break;case h.DateTime:o=r.InfrontUtil.formatStandardTimestamp(e,!0);break;case h.Integer:o=this.shorten?r.InfrontUtil.formatAndShortenInteger(e):r.InfrontUtil.formatNumber(e,0);break;case h.ID:o=r.InfrontUtil.formatID(e);break;default:o=""+e}t.innerText=o};r.InfrontUtil.isNumber(n)?i(n):r.InfrontUtil.Observable.isObservable(n)&&n.onetimeBind(s=>i(s))}}me.kFieldsLanguageKey="columns",me.kFieldsHeadingHoverSuffix="__HOVER",me.Yes="Yes",me.No="No";class $e{static getField(t){return Object.hasOwn(this,t)?this[t]():null}}class Ot extends me{constructor(t,e,n=h.Text,i=!1,s=!1){super(t,r.Infront.TagSet.Realtime,e,n,i,s),this.subscribeFieldName=r.InfrontConstants.Fields.LAST,this.source=Yt.Instrument}getFieldSpec(){return[r.Infront.MWSConstants.instrument,this.lowerCaseName]}}class ri extends $e{static BOND_FACE_VALUE(){return new Ot("BOND_FACE_VALUE",r.Infront.RealtimeTags.BondFaceValue)}static TICKER(){return new Ot("TICKER",r.Infront.RealtimeTags.Symbol)}static DISPLAY_TICKER(){return new Ot("DISPLAY_TICKER",r.Infront.RealtimeTags._displayTicker)}static INSTRUMENT_FULL_NAME(){return new Ot("INSTRUMENT_FULL_NAME",r.Infront.RealtimeTags.FullName)}static DISPLAY_FULL_NAME(){return new Ot("DISPLAY_FULL_NAME",r.Infront.RealtimeTags._displayFullName)}static FULL_NAME(){return new Ot("FULL_NAME",r.Infront.RealtimeTags._displayFullName)}static ISIN(){return new Ot("ISIN",r.Infront.RealtimeTags.ISIN)}static CURRENCY(){return new Ot("CURRENCY",r.Infront.RealtimeTags.Currency)}static CFI(){return new Ot("CFI",r.Infront.RealtimeTags.CFI)}static MARKET(){return new Ot("MARKET",r.Infront.RealtimeTags.Market)}static MIC(){return new Ot("MIC",r.Infront.RealtimeTags.MIC)}static PRIMARY_MIC(){return new Ot("PRIMARY_MIC",r.Infront.RealtimeTags.PrimaryMIC)}static SYMBOL_CLASSIFICATION(){return new Ot("SYMBOL_CLASSIFICATION",r.Infront.RealtimeTags._symbolClassificationStr,h.Enum)}static INSTRUMENT_TYPE(){return new Ot("INSTRUMENT_TYPE",r.Infront.RealtimeTags._symbolType,h.Enum)}static INSTRUMENT_SUBTYPE(){return new Ot("INSTRUMENT_SUBTYPE",r.Infront.RealtimeTags._symbolSubType,h.Enum)}static STRIKE_PRICE(){return new Ot("STRIKE_PRICE",r.Infront.RealtimeTags.Strike,h.Numeric)}static STRIKE(){return new Ot("STRIKE",r.Infront.RealtimeTags.Strike,h.Numeric)}static EXPIRY_DATE(){return new Ot("EXPIRY_DATE",r.Infront.RealtimeTags.Expiry,h.IdsDate)}static PAY_DAY(){return new Ot("PAY_DAY",r.Infront.RealtimeTags.PayDay,h.IdsDate)}static START_PRICE(){return new Ot("START_PRICE",r.Infront.RealtimeTags.StartPrice,h.Numeric)}static EXPIRY(){return new Ot("EXPIRY",r.Infront.RealtimeTags.Expiry,h.IdsDate)}static OPEN_INTEREST(){return new Ot("OPEN_INTEREST",r.Infront.RealtimeTags.OpenInterest,h.Volume)}static MIN_ICEBERG_SIZE(){return new Ot("MIN_ICEBERG_SIZE",r.Infront.RealtimeTags.MinimumIcebergSize,h.Integer)}static COMPANY_URL(){const t=new Ot("COMPANY_URL",r.Infront.RealtimeTags.CompanyURL);return t.translate=(e,n)=>{const i=0===n.indexOf("http://")?n.substring(7):0===n.indexOf("https://")?n.substring(8):n;return'<a href="'+n+'" target="_blank">'+i+"</a>"},t}static VWD_KEY(){return new Ot("VWD_KEY",r.Infront.RealtimeTags.VwdKey)}static ISSUER(){return new Ot("ISSUER",r.Infront.RealtimeTags.Issuer)}static ISSUER_FULL_NAME(){return new Ot("ISSUER_FULL_NAME",r.Infront.RealtimeTags.IssuerFullName)}static SORT_NU(){return new Ot("SORT_NU",r.Infront.RealtimeTags.SortNu,h.Integer)}static EUSIPA_CODE(){return new Ot("EUSIPA_CODE",r.Infront.RealtimeTags.EusipaCode,h.Text)}static IS_TRADEABLE(){return new Ot("IS_TRADABLE",r.Infront.RealtimeTags.IsTradable)}static IS_TRADABLE(){return new Ot("IS_TRADABLE",r.Infront.RealtimeTags.IsTradable)}static BID_DMM(){return new Ot("BID_DMM",r.Infront.RealtimeTags.BidDMM,h.Numeric)}static BID_ZSPD(){return new Ot("BID_ZSPD",r.Infront.RealtimeTags.BidZSPD,h.Numeric)}static PRIIPS_SRI(){return new Ot("PRIIPS_SRI",r.Infront.RealtimeTags.PriipsSri,h.Integer)}static PRIIPS_ONGOING_COST_ACTUAL(){return new Ot("PRIIPS_ONGOING_COST_ACTUAL",r.Infront.RealtimeTags.PriipsOngoingCostActual,h.Numeric)}static PRIIPS_TRANSACTION_FEE_EST(){return new Ot("PRIIPS_TRANSACTION_FEE_EST",r.Infront.RealtimeTags.PriipsTransactionFeeEstimated,h.Numeric)}static PRIIPS_TRANSACTION_FEE_ACTUAL(){return new Ot("PRIIPS_TRANSACTION_FEE_ACTUAL",r.Infront.RealtimeTags.PriipsTransactionFeeActual,h.Numeric)}
1static PRIIPS_PERFORMANCE_FEE_EST(){return new Ot("PRIIPS_PERFORMANCE_FEE_EST",r.Infront.RealtimeTags.PriipsPerformanceFeeEstimated,h.Numeric)}static PRIIPS_ONGOING_COST_EST(){return new Ot("PRIIPS_ONGOING_COST_EST",r.Infront.RealtimeTags.PriipsOngoingCostEstimated,h.Numeric)}static CONTRIBUTED_ID(){return new Ot("CONTRIBUTED_ID",r.Infront.RealtimeContributedFundTags.Id,h.Integer)}static CONTRIBUTED_FUND_MANAGER(){return new Ot("CONTRIBUTED_FUND_MANAGER",r.Infront.RealtimeContributedFundTags.FundManager,h.Text)}static CONTRIBUTED_SUSTAINABILITY(){return new Ot("CONTRIBUTED_SUSTAINABILITY",r.Infront.RealtimeContributedFundTags.Sustainability,h.Text)}static CONTRIBUTED_BUY_BUTTON(){return new Ot("CONTRIBUTED_BUY_BUTTON",r.Infront.RealtimeContributedFundTags.BuyButton,h.Boolean)}static CONTRIBUTED_FEE(){return new Ot("CONTRIBUTED_FEE",r.Infront.RealtimeContributedFundTags.Fee,h.Text)}static CONTRIBUTED_RISK(){return new Ot("CONTRIBUTED_RISK",r.Infront.RealtimeContributedFundTags.Risk,h.Integer)}static CONTRIBUTED_RECOMMENDATION(){return new Ot("CONTRIBUTED_RECOMMENDATION",r.Infront.RealtimeContributedFundTags.Recommendation,h.Text)}static CONTRIBUTED_MAIN_SUPPLY(){return new Ot("CONTRIBUTED_MAIN_SUPPLY",r.Infront.RealtimeContributedFundTags.MainSupply,h.Integer)}static CONTRIBUTED_FUND_TEXT(){return new Ot("CONTRIBUTED_FUND_TEXT",r.Infront.RealtimeContributedFundTags.FundText,h.Text)}static CONTRIBUTED_STANDARD_TEXTS(){return new Ot("CONTRIBUTED_STANDARD_TEXTS",r.Infront.RealtimeContributedFundTags.StandardTexts,h.Text)}static CONTRIBUTED_CURRENCY(){return new Ot("CONTRIBUTED_CURRENCY",r.Infront.RealtimeContributedFundTags.Currency,h.Text)}static CONTRIBUTED_RECOMMENDATION_TEXTS(){return new Ot("CONTRIBUTED_RECOMMENDATION_TEXTS",r.Infront.RealtimeContributedFundTags.RecommendationTexts,h.Text)}static CONTRIBUTED_PRODUCTS(){return new Ot("CONTRIBUTED_PRODUCTS",r.Infront.RealtimeContributedFundTags.Products,h.Text)}static CONTRIBUTED_LINKS(){return new Ot("CONTRIBUTED_LINKS",r.Infront.RealtimeContributedFundTags.Links,h.Text)}static CONTRIBUTED_MINIMUM_SUSTAINABLE_INVESTMENTS(){return new Ot("CONTRIBUTED_MINIMUM_SUSTAINABLE_INVESTMENTS",r.Infront.RealtimeContributedFundTags.MinimumSustainableInvestments,h.Numeric)}static CONTRIBUTED_MINIMUM_INVESTMENTS_TAXONOMY_ALIGNED(){return new Ot("CONTRIBUTED_MINIMUM_INVESTMENTS_TAXONOMY_ALIGNED",r.Infront.RealtimeContributedFundTags.MinimumInvestmentsTaxonomyAligned,h.Numeric)}static CONTRIBUTED_METADATA_00(){return new Ot("CONTRIBUTED_METADATA_00",r.Infront.RealtimeContributedFundTags.MetaData_00,h.Text)}static CONTRIBUTED_METADATA_01(){return new Ot("CONTRIBUTED_METADATA_01",r.Infront.RealtimeContributedFundTags.MetaData_01,h.Text)}static CONTRIBUTED_METADATA_02(){return new Ot("CONTRIBUTED_METADATA_02",r.Infront.RealtimeContributedFundTags.MetaData_02,h.Text)}static CONTRIBUTED_METADATA_03(){return new Ot("CONTRIBUTED_METADATA_03",r.Infront.RealtimeContributedFundTags.MetaData_03,h.Text)}static CONTRIBUTED_METADATA_04(){return new Ot("CONTRIBUTED_METADATA_04",r.Infront.RealtimeContributedFundTags.MetaData_04,h.Text)}static CONTRIBUTED_METADATA_05(){return new Ot("CONTRIBUTED_METADATA_05",r.Infront.RealtimeContributedFundTags.MetaData_05,h.Text)}static CONTRIBUTED_METADATA_06(){return new Ot("CONTRIBUTED_METADATA_06",r.Infront.RealtimeContributedFundTags.MetaData_06,h.Text)}static CONTRIBUTED_METADATA_07(){return new Ot("CONTRIBUTED_METADATA_07",r.Infront.RealtimeContributedFundTags.MetaData_07,h.Text)}static CONTRIBUTED_METADATA_08(){return new Ot("CONTRIBUTED_METADATA_08",r.Infront.RealtimeContributedFundTags.MetaData_08,h.Text)}static CONTRIBUTED_METADATA_09(){return new Ot("CONTRIBUTED_METADATA_09",r.Infront.RealtimeContributedFundTags.MetaData_09,h.Text)}static CONTRIBUTED_METADATA_10(){return new Ot("CONTRIBUTED_METADATA_10",r.Infront.RealtimeContributedFundTags.MetaData_10,h.Text)}static CONTRIBUTED_METADATA_11(){return new Ot("CONTRIBUTED_METADATA_11",r.Infront.RealtimeContributedFundTags.MetaData_11,h.Text)}static CONTRIBUTED_METADATA_12(){return new Ot("CONTRIBUTED_METADATA_12",r.Infront.RealtimeContributedFundTags.MetaData_12,h.Text)}static CONTRIBUTED_METADATA_13(){return new Ot("CONTRIBUTED_METADATA_13",r.Infront.RealtimeContributedFundTags.MetaData_13,h.Text)}static CONTRIBUTED_METADATA_14(){return new Ot("CONTRIBUTED_METADATA_14",r.Infront.RealtimeContributedFundTags.MetaData_14,h.Text)}static CONTRIBUTED_METADATA_15(){return new Ot("CONTRIBUTED_METADATA_15",r.Infront.RealtimeContributedFundTags.MetaData_15,h.Text)}static CONTRIBUTED_METADATA_16(){return new Ot("CONTRIBUTED_METADATA_16",r.Infront.RealtimeContributedFundTags.MetaData_16,h.Text)}static CONTRIBUTED_METADATA_17(){return new Ot("CONTRIBUTED_METADATA_17",r.Infront.RealtimeContributedFundTags.MetaData_17,h.Text)}static CONTRIBUTED_METADATA_18(){return new Ot("CONTRIBUTED_METADATA_18",r.Infront.RealtimeContributedFundTags.MetaData_18,h.Text)}static CONTRIBUTED_METADATA_19(){return new Ot("CONTRIBUTED_METADATA_19",r.Infront.RealtimeContributedFundTags.MetaData_19,h.Text)}static CONTRIBUTED_METADATA_20(){return new Ot("CONTRIBUTED_METADATA_20",r.Infront.RealtimeContributedFundTags.MetaData_20,h.Text)}static CONTRIBUTED_METADATA_21(){return new Ot("CONTRIBUTED_METADATA_21",r.Infront.RealtimeContributedFundTags.MetaData_21,h.Text)}static CONTRIBUTED_METADATA_22(){return new Ot("CONTRIBUTED_METADATA_22",r.Infront.RealtimeContributedFundTags.MetaData_22,h.Text)}static CONTRIBUTED_METADATA_23(){return new Ot("CONTRIBUTED_METADATA_23",r.Infront.RealtimeContributedFundTags.MetaData_23,h.Text)}static CONTRIBUTED_METADATA_24(){return new Ot("CONTRIBUTED_METADATA_24",r.Infront.RealtimeContributedFundTags.MetaData_24,h.Text)}static CONTRIBUTED_METADATA_25(){return new Ot("CONTRIBUTED_METADATA_25",r.Infront.RealtimeContributedFundTags.MetaData_25,h.Text)}static CONTRIBUTED_METADATA_26(){return new Ot("CONTRIBUTED_METADATA_26",r.Infront.RealtimeContributedFundTags.MetaData_26,h.Text)}static CONTRIBUTED_METADATA_27(){return new Ot("CONTRIBUTED_METADATA_27",r.Infront.RealtimeContributedFundTags.MetaData_27,h.Text)}static CONTRIBUTED_METADATA_28(){return new Ot("CONTRIBUTED_METADATA_28",r.Infront.RealtimeContributedFundTags.MetaData_28,h.Text)}static CONTRIBUTED_METADATA_29(){return new Ot("CONTRIBUTED_METADATA_29",r.Infront.RealtimeContributedFundTags.MetaData_29,h.Text)}static CONTRIBUTED_METADATA_30(){return new Ot("CONTRIBUTED_METADATA_30",r.Infront.RealtimeContributedFundTags.MetaData_30,h.Text)}static CONTRIBUTED_METADATA_31(){return new Ot("CONTRIBUTED_METADATA_31",r.Infront.RealtimeContributedFundTags.MetaData_31,h.Text)}static ONE_D_PERF(){return new Ot("ONE_D_PERF",r.Infront.RealtimeTags.PERF_1D,h.Percent)}static ONE_W_PERF(){return new Ot("ONE_W_PERF",r.Infront.RealtimeTags.PERF_1W,h.Percent)}static ONE_M_PERF(){return new Ot("ONE_M_PERF",r.Infront.RealtimeTags.PERF_1M,h.Percent)}static THREE_M_PERF(){return new Ot("THREE_M_PERF",r.Infront.RealtimeTags.PERF_3M,h.Percent)}static SIX_M_PERF(){return new Ot("SIX_M_PERF",r.Infront.RealtimeTags.PERF_6M,h.Percent)}static ONE_Y_PERF(){return new Ot("ONE_Y_PERF",r.Infront.RealtimeTags.PERF_1Y,h.Percent)}static TWO_Y_PERF(){return new Ot("TWO_Y_PERF",r.Infront.RealtimeTags.PERF_2Y,h.Percent)}static THREE_Y_PERF(){return new Ot("THREE_Y_PERF",r.Infront.RealtimeTags.PERF_3Y,h.Percent)}static FOUR_Y_PERF(){return new Rt("FOUR_Y_PERF",r.Infront.RealtimeTags.PERF_4Y,h.Percent)}static FIVE_Y_PERF(){return new Ot("FIVE_Y_PERF",r.Infront.RealtimeTags.PERF_5Y,h.Percent)}static TEN_Y_PERF(){return new Ot("TEN_Y_PERF",r.Infront.RealtimeTags.PERF_10Y,h.Percent)}static YTD_PERF(){return new Ot("YTD_PERF",r.Infront.RealtimeTags.PERF_SOY,h.Percent)}static PERF_SINCE_INCEPTION(){return new Ot("PERF_SINCE_INCEPTION",r.Infront.RealtimeTags.PERF_SINCE_INCEPTION,h.Percent)}static DATE(){return new Ot("DATE",r.Infront.RealtimeDateTime.Date,h.DateOnly)}static BOND_MINIMUMDENOMINATION(){return new Ot("BOND_MINIMUMDENOMINATION",r.Infront.RealtimeTags.BondMinDenomination,h.Integer)}static YYLAST(){return new Ot("YYLAST",r.Infront.RealtimeTags.YyLast,h.Numeric)}static MARKET_PHASE(){return new Ot("MARKET_PHASE",r.Infront.RealtimeTags._marketPhase,h.Text)}static DISPLAY_SYMBOL_STATUS(){return new Ot("DISPLAY_SYMBOL_STATUS",r.Infront.RealtimeTags._displaySymbolStatus,h.Text)}static PRICE_DECIMALS(){return new Ot("PRICE_DECIMALS",r.Infront.RealtimeTags._decimals,h.Integer)}static LEGAL_ENTITY_IDENTIFIER(){return new Ot("LEGAL_ENTITY_IDENTIFIER",r.Infront.RealtimeTags.LegalEntityIndentifier)}}class de extends me{constructor(t,e,n=h.Text,i=!1,s=!1){super(t,r.Infront.TagSet.Realtime,e,n,i,s),this.source=Yt.CalculatedHistory,this.subscribeFieldName=t,r.Infront.calcHistFields.push(t)}}class p extends $e{static MOVING_AVERAGE50(){return new de("MOVING_AVERAGE50",r.Infront.RealtimeTags._movingAverage50,h.Numeric)}static MOVING_AVERAGE100(){return new de("MOVING_AVERAGE100",r.Infront.RealtimeTags._movingAverage100,h.Numeric)}static MOVING_AVERAGE200(){return new de("MOVING_AVERAGE200",r.Infront.RealtimeTags._movingAverage200,h.Numeric)}static MOVING_AVERAGE_PREV_CLOSE50(){return new de("MOVING_AVERAGE_PREV_CLOSE50",r.Infront.RealtimeTags._movingAveragePrevClose50,h.Numeric)}static MOVING_AVERAGE_PREV_CLOSE100(){return new de("MOVING_AVERAGE_PREV_CLOSE100",r.Infront.RealtimeTags._movingAveragePrevClose100,h.Numeric)}static MOVING_AVERAGE_PREV_CLOSE200(){return new de("MOVING_AVERAGE_PREV_CLOSE200",r.Infront.RealtimeTags._movingAveragePrevClose200,h.Numeric)}static EXPONENTIAL_MOVING_AVERAGE10(){return new de("EXPONENTIAL_MOVING_AVERAGE10",r.Infront.RealtimeTags._exponentialMovingAverage10,h.Numeric)}static EXPONENTIAL_MOVING_AVERAGE12(){return new de("EXPONENTIAL_MOVING_AVERAGE12",r.Infront.RealtimeTags._exponentialMovingAverage12,h.Numeric)}static EXPONENTIAL_MOVING_AVERAGE26(){return new de("EXPONENTIAL_MOVING_AVERAGE26",r.Infront.RealtimeTags._exponentialMovingAverage26,h.Numeric)}static VOLUME_WEIGHTED_AVERAGE_PRICE30(){return new de("VOLUME_WEIGHTED_AVERAGE_PRICE30",r.Infront.RealtimeTags._volumeWeightedAveragePrice30,h.Numeric)}static VOLUME_WEIGHTED_AVERAGE_PRICE60(){return new de("VOLUME_WEIGHTED_AVERAGE_PRICE60",r.Infront.RealtimeTags._volumeWeightedAveragePrice60,h.Numeric)}static VOLUME_WEIGHTED_AVERAGE_PRICE90(){return new de("VOLUME_WEIGHTED_AVERAGE_PRICE90",r.Infront.RealtimeTags._volumeWeightedAveragePrice90,h.Numeric)}static AVERAGE_DAILY_VOLUME(){return new de("AVERAGE_DAILY_VOLUME",r.Infront.RealtimeTags._averageDailyVolume,h.Volume,!0)}static ADV_FACTOR(){const t=new de("ADV_FACTOR",r.Infront.RealtimeTags._AverageDailyVolumeFactor);return t.translate=(e,n)=>n?`${r.InfrontUtil.formatNumber(n,1)}x`:"",t}static ADV_FACTOR_PCT(){return new de("ADV_FACTOR_PCT",r.Infront.RealtimeTags._AverageDailyVolumeFactorPct,h.Percent,!0)}static STD_DEV_OF_DAILY_VOLUME(){return new de("STD_DEV_OF_DAILY_VOLUME",r.Infront.RealtimeTags._stdDevOfDailyVolume,h.Volume,!0)}static AVERAGE_DAILY_EXCHANGE_VOLUME(){return new de("AVERAGE_DAILY_EXCHANGE_VOLUME",r.Infront.RealtimeTags._averageDailyExchangeVolume,h.Volume,!0)}static STD_DEV_OF_EXCHANGE_VOLUME(){return new de("STD_DEV_OF_EXCHANGE_VOLUME",r.Infront.RealtimeTags._stdDevOfExchangeVolume,h.Volume,!0)}static LINEAR_REGRESSION_SLOPE_OF_LAST_PRICE(){return new de("LINEAR_REGRESSION_SLOPE_OF_LAST_PRICE",r.Infront.RealtimeTags._linearRegressionSlopeOfLastPrice,h.Numeric)}static STD_DEV_OF_LAST_PRICE(){return new de("STD_DEV_OF_LAST_PRICE",r.Infront.RealtimeTags._stdDevOfLastPrice,h.Numeric)}static SIMPLE_AVG_OF_LAST_PRICE(){return new de("SIMPLE_AVG_OF_LAST_PRICE",r.Infront.RealtimeTags._simpleAvgOfLastPrice,h.Numeric)}static STD_DEV_OF_DAILY_CHANGE(){return new de("STD_DEV_OF_DAILY_CHANGE",r.Infront.RealtimeTags._stdDevOfDailyChange,h.Numeric)}static AVERAGE_DAILY_CHANGE(){return new de("AVERAGE_DAILY_CHANGE",r.Infront.RealtimeTags._avgDailyChange,h.Numeric)}static LINEAR_REGRESSION_SLOPE_OF_LAST_STDERR(){return new de("LINEAR_REGRESSION_SLOPE_OF_LAST_STDERR",r.Infront.RealtimeTags._linearRegressionSlopeOfLastStderr,h.Numeric)}static LINEAR_REGRESSION_SLOPE_OF_LAST_PREDICT(){return new de("LINEAR_REGRESSION_SLOPE_OF_LAST_PREDICT",r.Infront.RealtimeTags._linearRegressionSlopeOfLastPredict,h.Numeric)}static VOLATILITY30(){return new de("VOLATILITY30",r.Infront.RealtimeTags._lastVolatility30,h.Numeric)}static VOLATILITY60(){return new de("VOLATILITY60",r.Infront.RealtimeTags._lastVolatility60,h.Numeric)}static VOLATILITY90(){return new de("VOLATILITY90",r.Infront.RealtimeTags._lastVolatility90,h.Numeric)}static LN_RETURN_COUNT30(){return new de("LN_RETURN_COUNT30",r.Infront.RealtimeTags._lnReturnCount30,h.Numeric)}static LN_RETURN_COUNT60(){return new de("LN_RETURN_COUNT60",r.Infront.RealtimeTags._lnReturnCount60,h.Numeric)}static LN_RETURN_COUNT90(){return new de("LN_RETURN_COUNT90",r.Infront.RealtimeTags._lnReturnCount90,h.Numeric)}static LN_RETURN_SUM30(){return new de("LN_RETURN_SUM30",r.Infront.RealtimeTags._lnReturnSum30,h.Numeric)}static LN_RETURN_SUM60(){return new de("LN_RETURN_SUM60",r.Infront.RealtimeTags._lnReturnSum60,h.Numeric)}static LN_RETURN_SUM90(){return new de("LN_RETURN_SUM90",r.Infront.RealtimeTags._lnReturnSum90,h.Numeric)}static LN_RETURN_SQUARE_SUM30(){return new de("LN_RETURN_SQUARE_SUM30",r.Infront.RealtimeTags._lnReturnSquareSum30,h.Numeric)}static LN_RETURN_SQUARE_SUM60(){return new de("LN_RETURN_SQUARE_SUM60",r.Infront.RealtimeTags._lnReturnSquareSum60,h.Numeric)}static LN_RETURN_SQUARE_SUM90(){return new de("LN_RETURN_SQUARE_SUM90",r.Infront.RealtimeTags._lnReturnSquareSum90,h.Numeric)}static AVERAGE_TRUE_RANGE(){return new de("AVERAGE_TRUE_RANGE",r.Infront.RealtimeTags._avgTrueRange,h.Numeric)}static AVERAGE_BID(){return new de("AVERAGE_BID",r.Infront.RealtimeTags._avgBid,h.Numeric)}static AVERAGE_ASK(){return new de("AVERAGE_ASK",r.Infront.RealtimeTags._avgAsk,h.Numeric)}static AVERAGE_TURNOVER(){return new de("AVERAGE_TURNOVER",r.Infront.RealtimeTags._avgTurnover,h.Numeric)}static AVERAGE_DIV_YIELD_FACTOR(){return new de("AVERAGE_DIV_YIELD_FACTOR",r.Infront.RealtimeTags._avgDivYieldFactor,h.Numeric)}}class E extends me{constructor(t,e,n=h.Text,i=!1,s=!1,o=!0){super(t,r.Infront.TagSet.Realtime,e,n,i,s,o),this.source=Yt.Snapshot,this.subscribeFieldName=t}}class f extends r.InfrontUtil.NumberFormatter{constructor(t,e,n,i){super(n,i),this.languageHandler=t,this.prefix=e}format(t){var e,n,i,s;const o=r.InfrontUtil.roundFloat(t,2);return 9999.99===o?null!==(n=null===(e=this.languageHandler)||void 0===e?void 0:e.get("
1columns",`${this.prefix}_AT_MARKET`))&&void 0!==n?n:"At Market":9999.98===o?null!==(s=null===(i=this.languageHandler)||void 0===i?void 0:i.get("columns",`${this.prefix}_AT_OPEN`))&&void 0!==s?s:"At Open":super.format(t)}}class c extends r.InfrontUtil.DynamicNumberFormatter{constructor(t,e,n){super(e,n),this.languageHandler=t}}c.prototype.format=f.prototype.format;class v extends E{constructor(t,e,n=h.Text,i=!1,s=!1,o=!0){super(t,e,n,i,s,o)}createValueBinding(t,e,n,i,s){null!=s||(s=r.InfrontUtil.formatSettings.allowZero),"innerHTML"===n&&(n="textContent");const o=i instanceof r.InfrontUtil.Observable?new c(this.languageHandler,i,s):new f(this.languageHandler,this.name,i,s);return new r.InfrontUtil.GenericBinding(e,new r.InfrontUtil.FieldTransmitter(n),o)}}class U extends $e{static FEED_COUNTRY_CODE(){return new E("FEED_COUNTRY_CODE",r.Infront.RealtimeTags._feedCountryCode,h.Integer)}static FEED_COUNTRY(){return new E("FEED_COUNTRY",r.Infront.RealtimeTags._feedCountry)}static FEED_COUNTRY3(){return new E("FEED_COUNTRY3",r.Infront.RealtimeTags._feedCountry3)}static FEED_COUNTRY_NAME(){return new E("FEED_COUNTRY_NAME",r.Infront.RealtimeTags._feedCountryName)}static FEED_EXCHANGE(){return new E("FEED_EXCHANGE",r.Infront.RealtimeTags._feedExchange)}static FEED_MAIN_INDEX(){return new E("FEED_MAIN_INDEX",r.Infront.RealtimeTags._feedMainIndex)}static FEED_DESC(){return new E("FEED_DESC",r.Infront.RealtimeTags._feedDesc)}static FEED_MARKET_CODE(){return new E("FEED_MARKET_CODE",r.Infront.RealtimeTags._feedMarketCode)}static FEED_ACCESS(){return new E("FEED_ACCESS",r.Infront.RealtimeTags._feedAccess)}static FEED_ACCESS_DESC(){const t=new E("FEED_ACCESS_DESC",r.Infront.RealtimeTags._feedAccessDesc);return t.translate=(e,n)=>{if(!t.languageHandler)return n;const i=n.split(" ",2).map(s=>s.toLowerCase());if(0===i.length)return n;if(2===i.length){let s=`${i[0]} ${t.languageHandler.get(t.name,i[1])}`;return"1 day"==`${i[0]} ${i[1]}`&&(s=t.languageHandler.get(t.name,"eod")),s}return t.languageHandler.get(t.name,i[0])},t}static FEED_ACCESS_DESC_ICON(){const t=new E("FEED_ACCESS_DESC_ICON",r.Infront.RealtimeTags._feedAccessDesc);return t.translate=(e,n)=>{const i=n.split(" ",2).map(l=>l.toLowerCase());if(0===i.length)return n;const s=St.getSvgIconElement("schedule");let o="wtk-icon-svg__schedule";if(s.classList.add(o),2===i.length){if("no access"===i.toString())return"";const u=["day","days","week","weeks"];["second","seconds","minute","minutes","hour","hours"].includes(i[1])?o+="--delayed":u.includes(i[1])&&(o+="--eod")}
1else{if("realtime"!==i?.[0])return"";o+="--realtime"}return s.classList.add(o),s.outerHTML},t}static FEED_ACCESS_STR(){return new E("FEED_ACCESS_STR",r.Infront.RealtimeTags._feedAccessStr)}static ACC_VOLUME(){return new E("ACC_VOLUME",r.Infront.RealtimeTags.AcVolume,h.Volume,!0)}static TURNOVER(){return new E("TURNOVER",r.Infront.RealtimeTags.Turnover,h.Volume,!0)}static ONEXCH_VOLUME(){return new E("ONEXCH_VOLUME",r.Infront.RealtimeTags.OnExchVolume,h.Volume,!0)}static ONEXCH_TURNOVER(){return new E("ONEXCH_TURNOVER",r.Infront.RealtimeTags.OnExchTurnover,h.Volume,!0)}static BID(){return new v("BID",r.Infront.RealtimeTags.Bid,h.Numeric,!1,!0,!1)}static ASK(){return new v("ASK",r.Infront.RealtimeTags.Ask,h.Numeric,!1,!0,!1)}static MID(){return new E("MID",r.Infront.RealtimeTags.Mid,h.Numeric,!1,!0,!1)}static BID_SIZE(){return new E("BID_SIZE",r.Infront.RealtimeTags.BidSize,h.Integer,!0)}static ASK_SIZE(){return new E("ASK_SIZE",r.Infront.RealtimeTags.AskSize,h.Integer,!0)}static NUM_BIDS(){return new E("NUM_BIDS",r.Infront.RealtimeTags.NuBids,h.Integer)}static NUM_ASKS(){return new E("NUM_ASKS",r.Infront.RealtimeTags.NuAsks,h.Integer)}static BID_TIME(){return new E("BID_TIME",r.Infront.RealtimeDateTime.BidTime,h.DateTime)}static ASK_TIME(){return new E("ASK_TIME",r.Infront.RealtimeDateTime.AskTime,h.DateTime)}static ORDERBOOK(){return new E("ORDERBOOK",null)}static INDIC_PRICE(){return new E("INDIC_PRICE",r.Infront.AuctionTags.Auction1Price,h.Numeric)}static INDIC_VOLUME(){return new E("INDIC_VOLUME",r.Infront.AuctionTags.Auction1Volume,h.Integer,!0)}static TRADING_STATUS(){return new E("TRADING_STATUS",r.Infront.RealtimeTags.SymbolStatusText)}static VWAP(){return new E("VWAP",r.Infront.RealtimeTags._vwap,h.Numeric)}static AVG_VOLUME(){return new E("AVG_VOLUME","AVG_VOLUME")}static AVG_VALUE(){return new E("AVG_VALUE","AVG_VALUE")}static OPEN(){return new E("OPEN",r.Infront.RealtimeTags.Open,h.Numeric,!1,!1,!1)}static HIGH(){return new E("HIGH",r.Infront.RealtimeTags.High,h.Numeric,!1,!0,!1)}static LOW(){return new E("LOW",r.Infront.RealtimeTags.Low,h.Numeric,!1,!0,!1)}static LAST(){return new E("LAST",r.Infront.RealtimeTags.Last,h.Numeric,!1,!0,!1)}static NET_ASSET_VALUE(){return new E("NET_ASSET_VALUE",r.Infront.RealtimeTags.NetAssetValue,h.Numeric)}static LAST_VALID(){return new E("LAST_VALID",r.Infront.RealtimeTags._lastTradedAt,h.Numeric,!1,!0)}static LAST_5_MINS_AGO(){return new E("LAST_5_MINS_AGO",r.Infront.RealtimeTags.Last5MinsAgo,h.Numeric,!1,!0,!1)}static LAST_VALID_HIST(){return new E("LAST_VALID_HIST",r.Infront.RealtimeTags._lastTradedAt,h.Numeric)}static PREVIOUS_CLOSE(){return new E("PREVIOUS_CLOSE",r.Infront.RealtimeTags.YestClose,h.Numeric)}static TIME(){return new E("TIME",r.Infront.RealtimeDateTime.TradeTime,h.DateTime)}static LAST_VALID_DATE(){return new E("LAST_VALID_DATE",r.Infront.RealtimeTags._lastTradeDate,h.DateOnly)}static PAY_DAY(){return new E("PAY_DAY",r.Infront.RealtimeTags.PayDay,h.DateOnly)}static NUM_TRADES(){return new E("NUM_TRADES",r.Infront.RealtimeTags.TradeMoves,h.Numeric)}static CHANGE(){const t=new E("CHANGE",r.Infront.RealtimeTags.Change,h.Numeric);return t.highlightChange=!0,t}static PCT_CHANGE(){const t=new E("PCT_CHANGE",r.Infront.RealtimeTags.ChangePct,h.Percent);return t.highlightChange=!0,t}static EPS(){return new E("EPS",r.Infront.RealtimeTags.Eps,h.Numeric,!0)}static NUM_SHARES(){return new E("NUM_SHARES",r.Infront.RealtimeTags.NuShares,h.Integer,!0)}static CONTRACT_SIZE(){return new E("CONTRACT_SIZE",r.Infront.RealtimeTags.ContractSize,h.Volume)}static MULTIPLIER(){return new E("MULTIPLIER",r.Infront.RealtimeTags.Multiplier,h.Numeric)}static MARGIN_RATE(){const t=new E("MARGIN_RATE",r.Infront.RealtimeTags._marginRate,h.Numeric);return t.translate=(e,n)=>r.InfrontUtil.formatPercent(100*n),t}static IS_SHORTABLE(){return new E("IS_SHORTABLE",r.Infront.RealtimeTags._isShortable,h.Boolean)}static SEGMENT(){return new E("SEGMENT",r.Infront.RealtimeTags.PrimarySegment)}static SECONDARY_SEGMENT(){return new E("SECONDARY_SEGMENT",r.Infront.RealtimeTags.SecondarySegment)}static COUNTRY_OF_INCORPORATION(){return new E("COUNTRY_OF_INCORPORATION",r.Infront.RealtimeTags.CountryOfIncorporation)}static START_PRICE(){return new E("START_PRICE",r.Infront.RealtimeTags.StartPrice)}static SEGMENT_DESCRIPTION(){return new E("SEGMENT_DESCRIPTION",r.Infront.RealtimeTags.PrimarySegmentDescription)}static SECTOR(){return new E("SECTOR",r.Infront.RealtimeTags.InfrontSector)}static SECTOR_NAME(){return new E("SECTOR_NAME",r.Infront.RealtimeTags.InfrontSectorName)}static COUNTRY(){return new E("COUNTRY",r.Infront.RealtimeTags.Country)}static COUNTRY_FLAG(){return new E("COUNTRY_FLAG",r.Infront.RealtimeTags._countryFlag)}static FEED(){return new E("FEED",r.Infront.RealtimeTags.Feed)}static SERVICE(){return new E("SERVICE",r.Infront.RealtimeTags.Type)}static PHYSICAL_UNIT(){return new E("PHYSICAL_UNIT",r.Infront.RealtimeTags.PhysicalUnit)}static INDIC_TRADE(){return new E("INDIC_TRADE",r.Infront.RealtimeTags.IndicTrade)}static INDIC_INCVOL(){return new E("INDIC_INCVOL",r.Infront.RealtimeTags.IndicIncVol,h.Volume)}static INDIC_HIGH(){return new E("INDIC_HIGH",r.Infront.RealtimeTags.IndicHigh,h.Numeric)}static INDIC_LOW(){return new E("INDIC_LOW",r.Infront.RealtimeTags.IndicLow,h.Numeric)}static NMS(){return new E("NMS",r.Infront.RealtimeTags.Nms)}static INDIC_OPEN(){return new E("INDIC_OPEN",r.Infront.RealtimeTags.IndicOpen,h.Numeric)}static INDIC_OPEN_VOL(){return new E("INDIC_OPEN_VOL",r.Infront.RealtimeTags.IndicOpenVol,h.Numeric)}static ESMA_ADV(){return new E("ESMA_ADV",r.Infront.RealtimeTags.ESMAAdv)}static INFRONT_SECTOR(){return new E("INFRONT_SECTOR",r.Infront.RealtimeTags.InfinancialsSector,h.Text)}static MATURITY_DATE(){return new E("MATURITY_DATE",r.Infront.RealtimeDateTime.MaturityDate,h.DateOnly)}static ISSUE_DATE(){return new E("ISSUE_DATE",r.Infront.RealtimeDateTime.IssueDate,h.DateOnly)}static START_OF_INDEX_PERIOD(){return new E("START_OF_INDEX_PERIOD",r.Infront.RealtimeDateTime.StartOfIndexPeriod,h.DateOnly)}static END_OF_INDEX_PERIOD(){return new E("END_OF_INDEX_PERIOD",r.Infront.RealtimeDateTime.EndOfIndexPeriod,h.DateOnly)}static PARTICIPATION_LEVEL(){return new E("PARTICIPATION_LEVEL",r.Infront.RealtimeTags.ParticipationLevel,h.Percent)}static BREAK_EVEN(){return new E("BREAK_EVEN",r.Infront.RealtimeTags.BreakEven,h.Volume)}static ASIAN_AVERAGE(){return new E("ASIAN_AVERAGE",r.Infront.RealtimeTags.AsianAverage,h.Volume)}static DELTA(){return new E("DELTA",r.Infront.RealtimeTags.Delta,h.Numeric)}static ELAST(){return new E("ELAST",r.Infront.RealtimeTags.Elast,h.Numeric)}static NAV(){return new E("NAV",r.Infront.RealtimeTags.NetAssetValue,h.Numeric)}static BOND_FACE_VALUE(){return new E("BOND_FACE_VALUE",r.Infront.RealtimeTags.BondFaceValue,h.Integer)}static BOND_MINIMUMDENOMINATION(){return new E("BOND_MINIMUMDENOMINATION",r.Infront.RealtimeTags.BondMinDenomination,h.Integer)}static UNDER_DESCR(){return new E("UNDER_DESCR",r.Infront.RealtimeTags.UnderlyingDescr)}static UNDER_TICKER(){return new E("UNDER_TICKER",r.Infront.RealtimeTags.UnderlyingTicker)}static UNDER_FEED(){return new E("UNDER_FEED",r.Infront.RealtimeTags.UnderlyingFeed)}static UNDER_PRICE(){return new E("UNDER_PRICE",r.Infront.RealtimeContributedFundTags.UnderlyingPrice,h.Numeric)}static MARKET(){return new E("MARKET",r.Infront.RealtimeTags.Market)}static LEVERAGE(){return new E("LEVERAGE",r.Infront.RealtimeTags.Leverage,h.Numeric)}static THEORETICAL(){return new E("THEORETICAL",r.Infront.RealtimeTags.Theoretical,h.Numeric)}static NEXT_COUPON_DATE(){return new E("NEXT_COUPON_DATE",r.Infront.RealtimeDateTime.NextCouponDate,h.DateOnly)}static COUPON_RATE(){return new E("COUPON_RATE",r.Infront.RealtimeTags.CouponRate,h.Percent)}
1static COUPONS_PER_YEAR(){return new E("COUPONS_PER_YEAR",r.Infront.RealtimeTags.CouponsPerYear,h.Numeric)}static CURRENT_COUPON(){return new E("CURRENT_COUPON",r.Infront.RealtimeTags.CurrentCoupon,h.Percent)}static YIELD(){return new E("YIELD",r.Infront.RealtimeTags.Yield,h.Numeric)}static BID_YIELD(){return new E("BID_YIELD",r.Infront.RealtimeTags.BidYield,h.Numeric)}static ASK_YIELD(){return new E("ASK_YIELD",r.Infront.RealtimeTags.AskYield,h.Numeric)}static RECOMMENDATION_TYPE(){return new E("RECOMMENDATION_TYPE",r.Infront.RealtimeTags.RecommendationType,h.Numeric)}static SHARE_CAP(){return new E("SHARE_CAP",r.Infront.RealtimeTags._shareCap,h.Numeric)}static YESTERDAY_SHARE_CAP(){return new E("YESTERDAY_SHARE_CAP",r.Infront.RealtimeTags._yesterdayShareCap,h.Numeric)}static SHARE_CAP_CHANGE(){return new E("SHARE_CAP_CHANGE",r.Infront.RealtimeTags._shareCapChange,h.Numeric)}static DEGREE_OF_CAPITAL_PROTECTION(){return new E("DEGREE_OF_CAPITAL_PROTECTION",r.Infront.RealtimeTags.DegreeOfCapitalProtection,h.Numeric)}static MINIMUM_REPAYMENT_AMOUNT(){return new E("MINIMUM_REPAYMENT_AMOUNT",r.Infront.RealtimeTags.MinimumRepaymentAmount,h.Numeric)}static ESMA_TYPE(){const t=new E("ESMA_TYPE",r.Infront.RealtimeTags.ESMAType);return t.translate=(e,n)=>{switch(n){case r.Infront.ESMATypes.Liquid:return"Liquid";case r.Infront.ESMATypes.NoneLiquid:return"Non Liquid";default:return"Undefined"}},t}static BULLBEAR_COMPARISON(){return new E("BULLBEAR_COMPARISON",r.Infront.RealtimeTags.BullBearComparison,h.Numeric)}static BULLBEAR_GEARING(){return new E("BULLBEAR_GEARING",r.Infront.RealtimeTags.BullBearGearing,h.Numeric)}static REALTIME_MANAGEMENT_FEE(){return new E("REALTIME_MANAGEMENT_FEE",r.Infront.RealtimeTags.ManagementFee,h.Numeric)}static LEVERAGE_TURBOS(){return new E("LEVERAGE_TURBOS",r.Infront.RealtimeTags.LeverageForTurbos,h.Numeric)}static ONE_D_PERF_SEK(){return new E("ONE_D_PERF_SEK",r.Infront.MorningstarSEKPerformanceTags.SEK_PERF_1D,h.Percent)}static ONE_W_PERF_SEK(){return new E("ONE_W_PERF_SEK",r.Infront.MorningstarSEKPerformanceTags.SEK_PERF_1W,h.Percent)}static ONE_M_PERF_SEK(){return new E("ONE_M_PERF_SEK",r.Infront.MorningstarSEKPerformanceTags.SEK_PERF_1M,h.Percent)}static THREE_M_PERF_SEK(){return new E("THREE_M_PERF_SEK",r.Infront.MorningstarSEKPerformanceTags.SEK_PERF_3M,h.Percent)}static SIX_M_PERF_SEK(){return new E("SIX_M_PERF_SEK",r.Infront.MorningstarSEKPerformanceTags.SEK_PERF_6M,h.Percent)}static ONE_Y_PERF_SEK(){return new E("ONE_Y_PERF_SEK",r.Infront.MorningstarSEKPerformanceTags.SEK_PERF_1Y,h.Percent)}static TWO_Y_PERF_SEK(){return new E("TWO_Y_PERF_SEK",r.Infront.MorningstarSEKPerformanceTags.SEK_PERF_2Y,h.Percent)}static THREE_Y_PERF_SEK(){return new E("THREE_Y_PERF_SEK",r.Infront.MorningstarSEKPerformanceTags.SEK_PERF_3Y,h.Percent)}static FIVE_Y_PERF_SEK(){return new E("FIVE_Y_PERF_SEK",r.Infront.MorningstarSEKPerformanceTags.SEK_PERF_5Y,h.Percent)}static TEN_Y_PERF_SEK(){return new E("TEN_Y_PERF_SEK",r.Infront.MorningstarSEKPerformanceTags.SEK_PERF_10Y,h.Percent)}static YTD_PERF_SEK(){return new E("YTD_PERF_SEK",r.Infront.MorningstarSEKPerformanceTags.SEK_PERF_SOY,h.Percent)}static PERF_SINCE_INCEPTION_SEK(){return new E("PERF_SINCE_INCEPTION_SEK",r.Infront.MorningstarSEKPerformanceTags.SEK_PERF_SINCE_INCEPTION,h.Percent)}static RT_ADV(){return new E("RT_ADV",r.Infront.RealtimeTags._rtADVMean,h.Volume,!0)}static RT_ADV_FACTOR(){const t=new E("RT_ADV_FACTOR",r.Infront.RealtimeTags._rtADVFactor);return t.translate=(e,n)=>n?`${r.InfrontUtil.formatNumber(n,1)}x`:"",t}static REMAINING_RT_ADV_MEAN(){return new E("REMAINING_RT_ADV_MEAN",r.Infront.RealtimeTags._remainingRtADVMean,h.Volume,!0)}static GAP(){return new E("GAP",r.Infront.RealtimeTags._gap,h.Numeric)}static GAP_PCT(){return new E("GAP_PCT",r.Infront.RealtimeTags._gapPct,h.Percent)}static RANGE(){return new E("RANGE",r.Infront.RealtimeTags._range,h.Numeric)}static RANGE_PCT(){return new E("RANGE_PCT",r.Infront.RealtimeTags._rangePct,h.Percent)}static OFF_HIGH_PCT(){return new E("OFF_HIGH_PCT",r.Infront.RealtimeTags._offHighPct,h.Percent)}static OFF_LOW_PCT(){return new E("OFF_LOW_PCT",r.Infront.RealtimeTags._offLowPct,h.Percent)}static OPEN_CHANGE(){return new E("OPEN_CHANGE",r.Infront.RealtimeTags._openChange,h.Numeric)}static OPEN_CHANGE_PCT(){return new E("OPEN_CHANGE_PCT",r.Infront.RealtimeTags._openChangePct,h.Percent)}static PERCENT_TRADED(){return new E("PERCENT_TRADED",r.Infront.RealtimeTags._percentTraded,h.Percent)}static CHANGE_INTRADAY(){return new E("CHANGE_INTRADAY",r.Infront.RealtimeTags._changeIntraday,h.Numeric)}static CHANGE_INTRADAY_PCT(){return new E("CHANGE_INTRADAY_PCT",r.Infront.RealtimeTags._changeIntradayPct,h.Percent)}static CHANGE_STATUS(){return new E("CHANGE_STATUS",r.Infront.RealtimeTags._changeStatus,h.Enum)}static CALENDAR_EVENTS_DESCRIPTION(){return new E("CALENDAR_EVENTS_DESCRIPTION",r.Infront.RealtimeTags._calendarEventDescription,h.Text)}static CALENDAR_EVENTS_DETAILS(){const t=new E("CALENDAR_EVENTS_DETAILS",r.Infront.RealtimeTags._calendarEventDetails,h.Text);return t.translate=(e,n)=>r.InfrontUtil.isString(n)?n.split(";").join("\n"):n,t}static CALENDAR_EVENTS_DISPLAY_LABEL(){const t=new E("CALENDAR_EVENTS_DISPLAY_LABEL",r.Infront.RealtimeTags._calendarEventDisplayLabel,h.Text);return t.hover=U.CALENDAR_EVENTS_DETAILS(),t}}class P extends me{getFieldSpec(){return[r.Infront.MWSConstants.hist_performance,this.lowerCaseName]}constructor(t,e,n=h.Text,i=!1){super(t,r.Infront.TagSet.Realtime,e,n),this.subscribeFieldName=r.InfrontConstants.FieldGroups.HIST_PERFORMANCE,this.source=Yt.Historical,this.highlightChange=i}}class $ extends $e{static YTD_CLOSE(){return new P("YTD_CLOSE",r.Infront.PerformanceTags.LAST_SOY,h.Numeric)}static ONE_W_CLOSE(){return new P("ONE_W_CLOSE",r.Infront.PerformanceTags.LAST_1W,h.Numeric)}static ONE_M_CLOSE(){return new P("ONE_M_CLOSE",r.Infront.PerformanceTags.LAST_1M,h.Numeric)}static THREE_M_CLOSE(){return new P("THREE_M_CLOSE",r.Infront.PerformanceTags.LAST_3M,h.Numeric)}static SIX_M_CLOSE(){return new P("SIX_M_CLOSE",r.Infront.PerformanceTags.LAST_6M,h.Numeric)}static ONE_Y_CLOSE(){return new P("ONE_Y_CLOSE",r.Infront.PerformanceTags.LAST_1Y,h.Numeric)}static TWO_Y_CLOSE(){return new P("TWO_Y_CLOSE",r.Infront.PerformanceTags.LAST_2Y,h.Numeric)}static THREE_Y_CLOSE(){return new P("THREE_Y_CLOSE",r.Infront.PerformanceTags.LAST_3Y,h.Numeric)}static FIVE_Y_CLOSE(){return new P("FIVE_Y_CLOSE",r.Infront.PerformanceTags.LAST_5Y,h.Numeric)}static YESTERDAY_CHANGE(){return new P("YESTERDAY_CHANGE",r.Infront.RealtimeTags._yestChange,h.Numeric,!0)}static YTD_CHANGE(){return new P("YTD_CHANGE",r.Infront.RealtimeTags._ytd_change,h.Numeric,!0)}static ONE_W_CHANGE(){return new P("ONE_W_CHANGE",r.Infront.RealtimeTags._one_w_change,h.Numeric,!0)}static ONE_M_CHANGE(){return new P("ONE_M_CHANGE",r.Infront.RealtimeTags._one_m_change,h.Numeric,!0)}static THREE_M_CHANGE(){return new P("THREE_M_CHANGE",r.Infront.RealtimeTags._three_m_change,h.Numeric,!0)}static SIX_M_CHANGE(){return new P("SIX_M_CHANGE",r.Infront.RealtimeTags._six_m_change,h.Numeric,!0)}static ONE_Y_CHANGE(){return new P("ONE_Y_CHANGE",r.Infront.RealtimeTags._one_y_change,h.Numeric,!0)}static TWO_Y_CHANGE(){return new P("TWO_Y_CHANGE",r.Infront.RealtimeTags._two_y_change,h.Numeric,!0)}static THREE_Y_CHANGE(){return new P("THREE_Y_CHANGE",r.Infront.RealtimeTags._three_y_change,h.Numeric,!0)}static FIVE_Y_CHANGE(){return new P("FIVE_Y_CHANGE",r.Infront.RealtimeTags._five_y_change,h.Numeric,!0)}static YESTERDAY_PCT_CHANGE(){return new P("YESTERDAY_PCT_CHANGE",r.Infront.RealtimeTags._yestChangePct,h.Percent,!0)}static YTD_PCT_CHANGE(){return new P("YTD_PCT_CHANGE",r.Infront.RealtimeTags._ytd_changePct,h.Percent,!0)}static ONE_W_PCT_CHANGE(){return new P("ONE_W_PCT_CHANGE",r.Infront.RealtimeTags._one_w_changePct,h.Percent,!0)}static ONE_M_PCT_CHANGE(){return new P("ONE_M_PCT_CHANGE",r.Infront.RealtimeTags._one_m_changePct,h.Percent,!0)}static THREE_M_PCT_CHANGE(){return new P("THREE_M_PCT_CHANGE",r.Infront.RealtimeTags._three_m_changePct,h.Percent,!0)}static SIX_M_PCT_CHANGE(){return new P("SIX_M_PCT_CHANGE",r.Infront.RealtimeTags._six_m_changePct,h.Percent,!0)}static ONE_Y_PCT_CHANGE(){return new P("ONE_Y_PCT_CHANGE",r.Infront.RealtimeTags._one_y_changePct,h.Percent,!0)}static TWO_Y_PCT_CHANGE(){return new P("TWO_Y_PCT_CHANGE",r.Infront.RealtimeTags._two_y_changePct,h.Percent,!0)}static THREE_Y_PCT_CHANGE(){return new P("THREE_Y_PCT_CHANGE",r.Infront.RealtimeTags._three_y_changePct,h.Percent,!0)}static FIVE_Y_PCT_CHANGE(){return new P("FIVE_Y_PCT_CHANGE",r.Infront.RealtimeTags._five_y_changePct,h.Percent,!0)}static ONE_W_TOTAL_RETURN_CHANGE(){return new P("ONE_W_TOTAL_RETURN_CHANGE",r.Infront.RealtimeTags._totalReturnChange1W,h.Numeric,!0)}static ONE_M_TOTAL_RETURN_CHANGE(){return new P("ONE_M_TOTAL_RETURN_CHANGE",r.Infront.RealtimeTags._totalReturnChange1M,h.Numeric,!0)}static THREE_M_TOTAL_RETURN_CHANGE(){return new P("THREE_M_TOTAL_RETURN_CHANGE",r.Infront.RealtimeTags._totalReturnChange3M,h.Numeric,!0)}static SIX_M_TOTAL_RETURN_CHANGE(){return new P("SIX_M_TOTAL_RETURN_CHANGE",r.Infront.RealtimeTags._totalReturnChange6M,h.Numeric,!0)}static YTD_TOTAL_RETURN_CHANGE(){return new P("YTD_TOTAL_RETURN_CHANGE",r.Infront.RealtimeTags._totalReturnChangeYTD,h.Numeric,!0)}static ONE_Y_TOTAL_RETURN_CHANGE(){return new P("ONE_Y_TOTAL_RETURN_CHANGE",r.Infront.RealtimeTags._totalReturnChange1Y,h.Numeric,!0)}static TWO_Y_TOTAL_RETURN_CHANGE(){return new P("TWO_Y_TOTAL_RETURN_CHANGE",r.Infront.RealtimeTags._totalReturnChange2Y,h.Numeric,!0)}static THREE_Y_TOTAL_RETURN_CHANGE(){return new P("THREE_Y_TOTAL_RETURN_CHANGE",r.Infront.RealtimeTags._totalReturnChange3Y,h.Numeric,!0)}static FIVE_Y_TOTAL_RETURN_CHANGE(){return new P("FIVE_Y_TOTAL_RETURN_CHANGE",r.Infront.RealtimeTags._totalReturnChange5Y,h.Numeric,!0)}static ONE_W_TOTAL_RETURN_PCT_CHANGE(){return new P("ONE_W_TOTAL_RETURN_PCT_CHANGE",r.Infront.RealtimeTags._totalReturnChangePct1W,h.Percent,!1)}static ONE_M_TOTAL_RETURN_PCT_CHANGE(){return new P("ONE_M_TOTAL_RETURN_PCT_CHANGE",r.Infront.RealtimeTags._totalReturnChangePct1M,h.Percent,!1)}static THREE_M_TOTAL_RETURN_PCT_CHANGE(){return new P("THREE_M_TOTAL_RETURN_PCT_CHANGE",r.Infront.RealtimeTags._totalReturnChangePct3M,h.Percent,!1)}static SIX_M_TOTAL_RETURN_PCT_CHANGE(){return new P("SIX_M_TOTAL_RETURN_PCT_CHANGE",r.Infront.RealtimeTags._totalReturnChangePct6M,h.Percent,!1)}static YTD_TOTAL_RETURN_PCT_CHANGE(){return new P("YTD_TOTAL_RETURN_PCT_CHANGE",r.Infront.RealtimeTags._totalReturnChangePctYTD,h.Percent,!1)}static ONE_Y_TOTAL_RETURN_PCT_CHANGE(){return new P("ONE_Y_TOTAL_RETURN_PCT_CHANGE",r.Infront.RealtimeTags._totalReturnChangePct1Y,h.Percent,!1)}static TWO_Y_TOTAL_RETURN_PCT_CHANGE(){return new P("TWO_Y_TOTAL_RETURN_PCT_CHANGE",r.Infront.RealtimeTags._totalReturnChangePct2Y,h.Percent,!1)}static THREE_Y_TOTAL_RETURN_PCT_CHANGE(){return new P("THREE_Y_TOTAL_RETURN_PCT_CHANGE",r.Infront.RealtimeTags._totalReturnChangePct3Y,h.Percent,!1)}static FIVE_Y_TOTAL_RETURN_PCT_CHANGE(){return new P("FIVE_Y_TOTAL_RETURN_PCT_CHANGE",r.Infront.RealtimeTags._totalReturnChangePct5Y,h.Percent,!1)}static YTD_HIGH(){return new P("YTD_HIGH",r.Infront.PerformanceTags.HIGH_SOY,h.Numeric)}static ONE_W_HIGH(){return new P("ONE_W_HIGH",r.Infront.PerformanceTags.HIGH_1W,h.Numeric)}static ONE_M_HIGH(){return new P("ONE_M_HIGH",r.Infront.PerformanceTags.HIGH_1M,h.Numeric)}static THREE_M_HIGH(){return new P("THREE_M_HIGH",r.Infront.PerformanceTags.HIGH_3M,h.Numeric)}static SIX_M_HIGH(){return new P("SIX_M_HIGH",r.Infront.PerformanceTags.HIGH_6M,h.Numeric)}static ONE_Y_HIGH(){return new P("ONE_Y_HIGH",r.Infront.PerformanceTags.HIGH_1Y,h.Numeric)}static TWO_Y_HIGH(){return new P("TWO_Y_HIGH",r.Infront.PerformanceTags.HIGH_2Y,h.Numeric)}static THREE_Y_HIGH(){return new P("THREE_Y_HIGH",r.Infront.PerformanceTags.HIGH_3Y,h.Numeric)}static FIVE_Y_HIGH(){return new P("FIVE_Y_HIGH",r.Infront.PerformanceTags.HIGH_5Y,h.Numeric)}static YTD_LOW(){return new P("YTD_LOW",r.Infront.PerformanceTags.LOW_SOY,h.Numeric)}static ONE_W_LOW(){return new P("ONE_W_LOW",r.Infront.PerformanceTags.LOW_1W,h.Numeric)}static ONE_M_LOW(){return new P("ONE_M_LOW",r.Infront.PerformanceTags.LOW_1M,h.Numeric)}static THREE_M_LOW(){return new P("THREE_M_LOW",r.Infront.PerformanceTags.LOW_3M,h.Numeric)}static SIX_M_LOW(){return new P("SIX_M_LOW",r.Infront.PerformanceTags.LOW_6M,h.Numeric)}static ONE_Y_LOW(){return new P("ONE_Y_LOW",r.Infront.PerformanceTags.LOW_1Y,h.Numeric)}static TWO_Y_LOW(){return new P("TWO_Y_LOW",r.Infront.PerformanceTags.LOW_2Y,h.Numeric)}static THREE_Y_LOW(){return new P("THREE_Y_LOW",r.Infront.PerformanceTags.LOW_3Y,h.Numeric)}static FIVE_Y_LOW(){return new P("FIVE_Y_LOW",r.Infront.PerformanceTags.LOW_5Y,h.Numeric)}static LAST_TRADE(){return new P("LAST_TRADE",r.Infront.PerformanceTags.LAST_TRADE,h.DateTime)}static ONE_W_LAST_DIV(){return new P("ONE_W_LAST_DIV",r.Infront.PerformanceTags.LAST_1W_DIV,h.Numeric)}static ONE_M_LAST_DIV(){return new P("ONE_M_LAST_DIV",r.Infront.PerformanceTags.LAST_1M_DIV,h.Numeric)}static THREE_M_LAST_DIV(){return new P("THREE_M_LAST_DIV",r.Infront.PerformanceTags.LAST_3M_DIV,h.Numeric)}static SIX_M_LAST_DIV(){return new P("SIX_M_LAST_DIV",r.Infront.PerformanceTags.LAST_6M_DIV,h.Numeric)}static ONE_Y_LAST_DIV(){return new P("ONE_Y_LAST_DIV",r.Infront.PerformanceTags.LAST_1Y_DIV,h.Numeric)}static YTD_LAST_DIV(){return new P("YTD_LAST_DIV",r.Infront.PerformanceTags.LAST_SOY_DIV,h.Numeric)}static VOL_1M(){return new P("VOL_1M",r.Infront.PerformanceTags.VOL_1M,h.Numeric)}static DAYCOUNT_1M(){return new P("DAYCOUNT_1M",r.Infront.PerformanceTags.DAYCOUNT_1M,h.Numeric)}static LAST_TRADE_DATE(){return new P("LAST_TRADE_DATE",r.Infront.RealtimeTags._lastTradeDate,h.DateOnly)}static LAST_TRADE_DATE_SHORT(){return new P("LAST_TRADE_DATE",r.Infront.RealtimeTags._lastTradeDate,h.DateShort)}static RELATIVE_STRENGTH_INDEX(){return new P("RELATIVE_STRENGTH_INDEX",r.Infront.RealtimeTags._relativeStrengthIndex,h.Numeric)}static RSI14(){return new P("RSI14",r.Infront.RealtimeTags._relativeStrengthIndex,h.Numeric)}}class j extends me{constructor(t,e,n=h.Text,i=!1,s=!1,o=!0){super(t,r.Infront.TagSet.Realtime,r.InfrontSDK.symbolFieldToTag(e),n,i,s,o),this.source=Yt.CompanyMetadata,this.type=Le.Custom,this.content=(l,u,d,g,I)=>{var C;if(this.locale&&!this.field.endsWith(this.locale.toUpperCase())){const N=`${this.field}${this.locale.toUpperCase()}`;this.field=r.InfrontSDK.CompanyMetadataField[N]}const S=null===(C=(0,D.g)())||void 0===C?void 0:C.get(r.InfrontSDK.symbolData({id:{feed:u?.feed,ticker:u?.ticker},fields:[this.field],onData:N=>{N.get(this.field,k=>this.updateCustomContent(d,k,g))}}));return I?.(S),null},this.field=e}}class X extends $e{static COMPANY_WEBSITE(){return new j("COMPANY_WEBSITE",r.InfrontSDK.CompanyMetadataField.CompanyWebsite,h.Text)}static COMPANY_EMAIL(){return new j("COMPANY_EMAIL",r.InfrontSDK.CompanyMetadataField.CompanyEmail,h.Text)}static COMPANY_PHONE(){return new j("COMPANY_PHONE",r.InfrontSDK.CompanyMetadataField.CompanyPhone,h.Text)}static COMPANY_ADDRESS(){return new j("COMPANY_ADDRESS",r.InfrontSDK.CompanyMetadataField.CompanyAddress,h.Text)}static COMPANY_FOUNDATION_YEAR(){return new j("COMPANY_FOUNDATION_YEAR",r.InfrontSDK.CompanyMetadataField.CompanyFoundationYear,h.Text)}static COMPANY_DESCRIPTION(){return new j("COMPANY_DESCRIPTION",r.InfrontSDK.CompanyMetadataField.CompanyDescription,h.Text)}static COMPANY_CHAIRMAN(){return new j("COMPANY_CHAIRMAN",r.InfrontSDK.CompanyMetadataField.CompanyChairman,h.Text)}static COMPANY_VICE_CHAIRMAN(){return new j("COMPANY_VICE_CHAIRMAN",r.InfrontSDK.CompanyMetadataField.CompanyViceChairman,h.Text)}static COMPANY_CEO(){return new j("COMPANY_CEO",r.InfrontSDK.CompanyMetadataField.CompanyCEO,h.Text)}static COMPANY_CFO(){return new j("COMPANY_CFO",r.InfrontSDK.CompanyMetadataField.CompanyCFO,h.Text)}static COMPANY_CHRO(){return new j("COMPANY_CHRO",r.InfrontSDK.CompanyMetadataField.CompanyCHRO,h.Text)}static COMPANY_SECTOR(){return new j("COMPANY_SECTOR",r.InfrontSDK.CompanyMetadataField.CompanySector,h.Text)}static COMPANY_SUB_SECTOR(){return new j("COMPANY_SUB_SECTOR",r.InfrontSDK.CompanyMetadataField.CompanySubSector,h.Text)}}const B={};class w extends me{constructor(t,e,n,i=h.Text,s=!1,o=!1,l=!0){var u,d;super(t,r.Infront.TagSet.Realtime,r.Inf
1rontSDK.symbolFieldToTag(e),i,s,o,l),this.source=Yt.SDK,this.type=Le.Custom,this.content=(g,I,C,S,N)=>{var k;const x=null===(k=(0,D.g)())||void 0===k?void 0:k.get(r.InfrontSDK.symbolData({id:{feed:I?.feed,ticker:I?.ticker},fields:B[this.fieldKey],onData:Y=>{Y.get(this.field,et=>this.updateCustomContent(C,et,S))}}));return N?.(x),null},this.field=e,this.fieldKey=n,null!==(u=B[d=this.fieldKey])&&void 0!==u||(B[d]=[]),B[this.fieldKey].push(this.field)}destroy(){}}class Q extends $e{static ESG_TOTAL_SCORE(){return new w("ESG_TOTAL_SCORE",r.InfrontSDK.EsgField.EsgTotalScore,"esg",h.Numeric)}static ESG_TOTAL_RELEVANCE(){return new w("ESG_TOTAL_RELEVANCE",r.InfrontSDK.EsgField.EsgTotalRelevance,"esg",h.Percent)}static ESG_ENVIRONMENTAL_SCORE(){return new w("ESG_ENVIRONMENTAL_SCORE",r.InfrontSDK.EsgField.EsgEnvironmentalScore,"esg",h.Numeric)}static ESG_ENVIRONMENTAL_RELEVANCE(){return new w("ESG_ENVIRONMENTAL_RELEVANCE",r.InfrontSDK.EsgField.EsgEnvironmentalRelevance,"esg",h.Percent)}static ESG_RESOURCE_USE_SCORE(){return new w("ESG_RESOURCE_USE_SCORE",r.InfrontSDK.EsgField.EsgResourceUseScore,"esg",h.Numeric)}static ESG_RESOURCE_USE_RELEVANCE(){return new w("ESG_RESOURCE_USE_RELEVANCE",r.InfrontSDK.EsgField.EsgResourceUseRelevance,"esg",h.Percent)}static ESG_EMISSIONS_SCORE(){return new w("ESG_EMISSIONS_SCORE",r.InfrontSDK.EsgField.EsgEmissionsScore,"esg",h.Numeric)}static ESG_EMISSIONS_RELEVANCE(){return new w("ESG_EMISSIONS_RELEVANCE",r.InfrontSDK.EsgField.EsgEmissionsRelevance,"esg",h.Percent)}static ESG_ENVIRONMENTAL_FOOTPRINT_OF_SUPPLY_CHAIN_SCORE(){return new w("ESG_ENVIRONMENTAL_FOOTPRINT_OF_SUPPLY_CHAIN_SCORE",r.InfrontSDK.EsgField.EsgEnvironmentalFootprintOfSupplyChainScore,"esg",h.Numeric)}static ESG_ENVIRONMENTAL_FOOTPRINT_OF_SUPPLY_CHAIN_RELEVANCE(){return new w("ESG_ENVIRONMENTAL_FOOTPRINT_OF_SUPPLY_CHAIN_RELEVANCE",r.InfrontSDK.EsgField.EsgEnvironmentalFootprintOfSupplyChainRelevance,"esg",h.Percent)}static ESG_ENVIRONMENTAL_FOOTPRINT_OF_PRODUCTS_SCORE(){return new w("ESG_ENVIRONMENTAL_FOOTPRINT_OF_PRODUCTS_SCORE",r.InfrontSDK.EsgField.EsgEnvironmentalFootprintOfProductsScore,"esg",h.Numeric)}static ESG_ENVIRONMENTAL_FOOTPRINT_OF_PRODUCTS_RELEVANCE(){return new w("ESG_ENVIRONMENTAL_FOOTPRINT_OF_PRODUCTS_RELEVANCE",r.InfrontSDK.EsgField.EsgEnvironmentalFootprintOfProductsRelevance,"esg",h.Percent)}static ESG_ENVIRONMENTAL_GOVERNANCE_AND_PROCESSES_SCORE(){return new w("ESG_ENVIRONMENTAL_GOVERNANCE_AND_PROCESSES_SCORE",r.InfrontSDK.EsgField.EsgEnvironmentalGovernanceAndProcessesScore,"esg",h.Numeric)}static ESG_ENVIRONMENTAL_GOVERNANCE_AND_PROCESSES_RELEVANCE(){return new w("ESG_ENVIRONMENTAL_GOVERNANCE_AND_PROCESSES_RELEVANCE",r.InfrontSDK.EsgField.EsgEnvironmentalGovernanceAndProcessesRelevance,"esg",h.Percent)}static ESG_GOVERNANCE_RESOURCE_USE_SCORE(){return new w("ESG_GOVERNANCE_RESOURCE_USE_SCORE",r.InfrontSDK.EsgField.EsgGovernanceResourceUseScore,"esg",h.Numeric)}static ESG_GOVERNANCE_RESOURCE_USE_RELEVANCE(){return new w("ESG_GOVERNANCE_RESOURCE_USE_RELEVANCE",r.InfrontSDK.EsgField.EsgGovernanceResourceUseRelevance,"esg",h.Percent)}static ESG_GOVERNANCE_EMISSIONS_SCORE(){return new w("ESG_GOVERNANCE_EMISSIONS_SCORE",r.InfrontSDK.EsgField.EsgGovernanceEmissionsScore,"esg",h.Numeric)}static ESG_GOVERNANCE_EMISSIONS_RELEVANCE(){return new w("ESG_GOVERNANCE_EMISSIONS_RELEVANCE",r.InfrontSDK.EsgField.EsgGovernanceEmissionsRelevance,"esg",h.Percent)}static ESG_GOVERNANCE_ENVIRONMENTAL_EXTERNALITIES_SCORE(){return new w("ESG_GOVERNANCE_ENVIRONMENTAL_EXTERNALITIES_SCORE",r.InfrontSDK.EsgField.EsgGovernanceEnvironmentalExternalitiesScore,"esg",h.Numeric)}static ESG_GOVERNANCE_ENVIRONMENTAL_EXTERNALITIES_RELEVANCE(){return new w("ESG_GOVERNANCE_ENVIRONMENTAL_EXTERNALITIES_RELEVANCE",r.InfrontSDK.EsgField.EsgGovernanceEnvironmentalExternalitiesRelevance,"esg",h.Percent)}static ESG_SOCIAL_SCORE(){return new w("ESG_SOCIAL_SCORE",r.InfrontSDK.EsgField.EsgSocialScore,"esg",h.Numeric)}static ESG_SOCIAL_RELEVANCE(){return new w("ESG_SOCIAL_RELEVANCE",r.InfrontSDK.EsgField.EsgSocialRelevance,"esg",h.Percent)}static ESG_EMPLOYEES_SCORE(){return new w("ESG_EMPLOYEES_SCORE",r.InfrontSDK.EsgField.EsgEmployeesScore,"esg",h.Numeric)}static ESG_EMPLOYEES_RELEVANCE(){return new w("ESG_EMPLOYEES_RELEVANCE",r.InfrontSDK.EsgField.EsgEmployeesRelevance,"esg",h.Percent)}static ESG_CUSTOMERS_AND_PRODUCTS_SCORE(){return new w("ESG_CUSTOMERS_AND_PRODUCTS_SCORE",r.InfrontSDK.EsgField.Esg
1CustomersAndProductsScore,"esg",h.Numeric)}static ESG_CUSTOMERS_AND_PRODUCTS_RELEVANCE(){return new w("ESG_CUSTOMERS_AND_PRODUCTS_RELEVANCE",r.InfrontSDK.EsgField.EsgCustomersAndProductsRelevance,"esg",h.Percent)}static ESG_SUPPLIERS_SCORE(){return new w("ESG_SUPPLIERS_SCORE",r.InfrontSDK.EsgField.EsgSuppliersScore,"esg",h.Numeric)}static ESG_SUPPLIERS_RELEVANCE(){return new w("ESG_SUPPLIERS_RELEVANCE",r.InfrontSDK.EsgField.EsgSuppliersRelevance,"esg",h.Percent)}static ESG_COMMUNITY_AND_SOCIETY_SCORE(){return new w("ESG_COMMUNITY_AND_SOCIETY_SCORE",r.InfrontSDK.EsgField.EsgCommunityAndSocietyScore,"esg",h.Numeric)}static ESG_COMMUNITY_AND_SOCIETY_RELEVANCE(){return new w("ESG_COMMUNITY_AND_SOCIETY_RELEVANCE",r.InfrontSDK.EsgField.EsgCommunityAndSocietyRelevance,"esg",h.Percent)}static ESG_GOVERNANCE_HUMAN_CAPITAL_SCORE(){return new w("ESG_GOVERNANCE_HUMAN_CAPITAL_SCORE",r.InfrontSDK.EsgField.EsgGovernanceHumanCapitalScore,"esg",h.Numeric)}static ESG_GOVERNANCE_HUMAN_CAPITAL_RELEVANCE(){return new w("ESG_GOVERNANCE_HUMAN_CAPITAL_RELEVANCE",r.InfrontSDK.EsgField.EsgGovernanceHumanCapitalRelevance,"esg",h.Percent)}static ESG_GOVERNANCE_PHYSICAL_CAPITAL_SCORE(){return new w("ESG_GOVERNANCE_PHYSICAL_CAPITAL_SCORE",r.InfrontSDK.EsgField.EsgGovernancePhysicalCapitalScore,"esg",h.Numeric)}static ESG_GOVERNANCE_PHYSICAL_CAPITAL_RELEVANCE(){return new w("ESG_GOVERNANCE_PHYSICAL_CAPITAL_RELEVANCE",r.InfrontSDK.EsgField.EsgGovernancePhysicalCapitalRelevance,"esg",h.Percent)}static ESG_GOVERNANCE_TECHNOLOGY_SCORE(){return new w("ESG_GOVERNANCE_TECHNOLOGY_SCORE",r.InfrontSDK.EsgField.EsgGovernanceTechnologyScore,"esg",h.Numeric)}static ESG_GOVERNANCE_TECHNOLOGY_RELEVANCE(){return new w("ESG_GOVERNANCE_TECHNOLOGY_RELEVANCE",r.InfrontSDK.EsgField.EsgGovernanceTechnologyRelevance,"esg",h.Percent)}static ESG_GOVERNANCE_SCORE(){return new w("ESG_GOVERNANCE_SCORE",r.InfrontSDK.EsgField.EsgGovernanceScore,"esg",h.Numeric)}static ESG_GOVERNANCE_RELEVANCE(){return new w("ESG_GOVERNANCE_RELEVANCE",r.InfrontSDK.EsgField.EsgGovernanceRelevance,"esg",h.Percent)}static ESG_CORPORATE_GOVERNANCE_SCORE(){return new w("ESG_CORPORATE_GOVERNANCE_SCORE",r.InfrontSDK.EsgField.EsgCorporateGovernanceScore,"esg",h.Numeric)}static ESG_CORPORATE_GOVERNANCE_RELEVANCE(){return new w("ESG_CORPORATE_GOVERNANCE_RELEVANCE",r.InfrontSDK.EsgField.EsgCorporateGovernanceRelevance,"esg",h.Percent)}static ESG_CORPORATE_ETHICS_AND_BEHAVIOR_SCORE(){return new w("ESG_CORPORATE_ETHICS_AND_BEHAVIOR_SCORE",r.InfrontSDK.EsgField.EsgCorporateEthicsAndBehaviorScore,"esg",h.Numeric)}static ESG_CORPORATE_ETHICS_AND_BEHAVIOR_RELEVANCE(){return new w("ESG_CORPORATE_ETHICS_AND_BEHAVIOR_RELEVANCE",r.InfrontSDK.EsgField.EsgCorporateEthicsAndBehaviorRelevance,"esg",h.Percent)}static ESG_CSR_AND_GOVERNANCE_FOR_SUSTAINABILITY_SCORE(){return new w("ESG_CSR_AND_GOVERNANCE_FOR_SUSTAINABILITY_SCORE",r.InfrontSDK.EsgField.EsgCsrAndGovernanceForSustainabilityScore,"esg",h.Numeric)}static ESG_CSR_AND_GOVERNANCE_FOR_SUSTAINABILITY_RELEVANCE(){return new w("ESG_CSR_AND_GOVERNANCE_FOR_SUSTAINABILITY_RELEVANCE",r.InfrontSDK.EsgField.EsgCsrAndGovernanceForSustainabilityRelevance,"esg",h.Percent)}static ESG_PARTNERSHIPS_MEMBERSHIPS_AWARDS_AND_CERTIFICATIONS_SCORE(){return new w("ESG_PARTNERSHIPS_MEMBERSHIPS_AWARDS_AND_CERTIFICATIONS_SCORE",r.InfrontSDK.EsgField.EsgPartnershipsMembershipsAwardsAndCertificationsScore,"esg",h.Numeric)}static ESG_PARTNERSHIPS_MEMBERSHIPS_AWARDS_AND_CERTIFICATIONS_RELEVANCE(){return new w("ESG_PARTNERSHIPS_MEMBERSHIPS_AWARDS_AND_CERTIFICATIONS_RELEVANCE",r.InfrontSDK.EsgField.EsgPartnershipsMembershipsAwardsAndCertificationsRelevance,"esg",h.Percent)}static ESG_GOVERNANCE_FORMAL_INSTITUTIONS_SCORE(){return new w("ESG_GOVERNANCE_FORMAL_INSTITUTIONS_SCORE",r.InfrontSDK.EsgField.EsgGovernanceFormalInstitutionsScore,"esg",h.Numeric)}static ESG_GOVERNANCE_FORMAL_INSTITUTIONS_RELEVANCE(){return new w("ESG_GOVERNANCE_FORMAL_INSTITUTIONS_RELEVANCE",r.InfrontSDK.EsgField.EsgGovernanceFormalInstitutionsRelevance,"esg",h.Percent)}static ESG_GOVERNANCE_INFORMAL_INSTITUTIONS_SCORE(){return new w("ESG_GOVERNANCE_INFORMAL_INSTITUTIONS_SCORE",r.InfrontSDK.EsgField.EsgGovernanceInformalInstitutionsScore,"esg",h.Numeric)}static ESG_GOVERNANCE_INFORMAL_INSTITUTIONS_RELEVANCE(){return new w("ESG_GOVERNANCE_INFORMAL_INSTITUTIONS_RELEVANCE",r.InfrontSDK.EsgField.EsgGovernanceInformalInstitutionsRelevance,"esg",h.Percent)}static ESG_GOVERNANCE_STABILITY_SCORE(){return new w("ESG_GOVERNANCE_STABILITY_SCORE",r.InfrontSDK.EsgField.EsgGovernanceStabilityScore,"esg",h.Numeric)}static ESG_GOVERNANCE_STABILITY_RELEVANCE(){return new w("ESG_GOVERNANCE_STABILITY_RELEVANCE",r.InfrontSDK.EsgField.EsgGovernanceStabilityRelevance,"esg",h.Percent)}static LAST_DIVIDEND_DATE(){return new w("LAST_DIVIDEND_DATE",r.InfrontSDK.CdapiCorporateActionsField.LastDividendDate,"ca",h.DateOnly)}static LAST_DIVIDEND_EX_DATE(){return new w("LAST_DIVIDEND_EX_DATE",r.InfrontSDK.CdapiCorporateActionsField.LastDividendExDate,"ca",h.DateOnly)}static LAST_DIVIDEND_RECORD_DATE(){return new w("LAST_DIVIDEND_RECORD_DATE",r.InfrontSDK.CdapiCorporateActionsField.LastDividendRecordDate,"ca",h.DateOnly)}static LAST_DIVIDEND_PAYMENT_DATE(){return new w("LAST_DIVIDEND_PAYMENT_DATE",r.InfrontSDK.SymbolField.LastDividendPaymentDate,"ca",h.DateOnly)}static LAST_DIVIDEND_CURRENCY(){return new w("LAST_DIVIDEND_CURRENCY",r.InfrontSDK.CdapiCorporateActionsField.LastDividendCurrency,"ca",h.Text)}static LAST_DIVIDEND_VALUE(){return new w("LAST_DIVIDEND_VALUE",r.InfrontSDK.CdapiCorporateActionsField.LastDividendValue,"ca",h.Numeric)}static NEXT_DIVIDEND_DATE(){return new w("NEXT_DIVIDEND_DATE",r.InfrontSDK.CdapiCorporateActionsField.NextDividendDate,"ca",h.DateOnly)}static NEXT_DIVIDEND_EX_DATE(){return new w("NEXT_DIVIDEND_EX_DATE",r.InfrontSDK.CdapiCorporateActionsField.NextDividendExDate,"ca",h.DateOnly)}static NEXT_DIVIDEND_RECORD_DATE(){return new w("NEXT_DIVIDEND_RECORD_DATE",r.InfrontSDK.CdapiCorporateActionsField.NextDividendRecordDate,"ca",h.DateOnly)}static NEXT_DIVIDEND_PAYMENT_DATE(){return new w("NEXT_DIVIDEND_PAYMENT_DATE",r.InfrontSDK.CdapiCorporateActionsField.NextDividendPaymentDate,"ca",h.DateOnly)}static NEXT_DIVIDEND_CURRENCY(){return new w("NEXT_DIVIDEND_CURRENCY",r.InfrontSDK.CdapiCorporateActionsField.NextDividendCurrency,"ca",h.Text)}static NEXT_DIVIDEND_VALUE(){return new w("NEXT_DIVIDEND_VALUE",r.InfrontSDK.CdapiCorporateActionsField.NextDividendValue,"ca",h.Numeric)}static PERF_SINCE_START(){return new w("PERF_SINCE_START",r.InfrontSDK.ListingDetailsField.PerformanceSinceStart,"listingDetails",h.Percent)}static NEXT_DECLARED_DIVIDEND_DATE(){return new w("NEXT_DECLARED_DIVIDEND_DATE",r.InfrontSDK.CdapiCorporateActionsField.NextDeclaredDividendDate,"ca",h.DateOnly)}static NEXT_DECLARED_DIVIDEND_CURRENCY(){return new w("NEXT_DECLARED_DIVIDEND_CURRENCY",r.InfrontSDK.CdapiCorporateActionsField.NextDeclaredDividendCurrency,"ca",h.Text)}static NEXT_DECLARED_DIVIDEND_VALUE(){return new w("NEXT_DECLARED_DIVIDEND_VALUE",r.InfrontSDK.CdapiCorporateActionsField.NextDeclaredDividendValue,"ca",h.Numeric)}}class K extends me{constructor(t,e,n=h.Text,i=!1){super(t,r.Infront.TagSet.Realtime,e,n,i),this.source=Yt.Brokerstats}}class ut extends $e{static NAME(){return new K("NAME",r.Infront.BrokerStatTags.broker)}static FULLNAME(){return new K("FULLNAME",r.Infront.BrokerStatTags._fullName)}static TIME(){return new K("TIME",r.Infront.BrokerStatTags._time,h.Time)}static BUYS(){return new K("BUYS",r.Infront.BrokerStatTags._buys,h.Integer,!0)}static SELLS(){return new K("SELLS",r.Infront.BrokerStatTags._sells,h.Integer,!0)}static INT_TRADES(){return new K("INT_TRADES",r.Infront.BrokerStatTags._intTrades,h.Integer,!0)}static BUY_VOLUME(){return new K("BUY_VOLUME",r.Infront.BrokerStatTags._buyVolume,h.Volume,!0)}static SELL_VOLUME(){return new K("SELL_VOLUME",r.Infront.BrokerStatTags._sellVolume,h.Volume,!0)}static INT_VOLUME(){return new K("INT_VOLUME",r.Infront.BrokerStatTags._intV
1olume,h.Volume,!0)}static TOTAL_VOLUME(){return new K("TOTAL_VOLUME",r.Infront.BrokerStatTags._totalVolume,h.Volume,!0)}static BUY_VALUE(){return new K("BUY_VALUE",r.Infront.BrokerStatTags._buyValue,h.Integer,!0)}static SELL_VALUE(){return new K("SELL_VALUE",r.Infront.BrokerStatTags._sellValue,h.Integer,!0)}static INT_VALUE(){return new K("INT_VALUE",r.Infront.BrokerStatTags._intValue,h.Integer,!0)}static AVG_BUY(){return new K("AVG_BUY",r.Infront.BrokerStatTags._avgBuy,h.Numeric)}static AVG_SELL(){return new K("AVG_SELL",r.Infront.BrokerStatTags._avgSell,h.Numeric)}static NET_BUY_VALUE(){return new K("NET_BUY_VALUE",r.Infront.BrokerStatTags._netBuyValue,h.Integer,!0)}static HIT_VALUE(){return new K("HIT_VALUE",r.Infront.BrokerStatTags._hitValue,h.Integer,!0)}static HIT_VALUE_PCT(){return new K("HIT_VALUE_PCT",r.Infront.BrokerStatTags._hitValuePct,h.Percent)}static TAKE_VALUE(){return new K("TAKE_VALUE",r.Infront.BrokerStatTags._takeValue,h.Integer,!0)}static TAKE_VALUE_PCT(){return new K("TAKE_VALUE_PCT",r.Infront.BrokerStatTags._takeValuePct,h.Percent)}static TOTAL_VALUE(){return new K("TOTAL_VALUE",r.Infront.BrokerStatTags._totalValue,h.Integer,!0)}static TOTAL_VALUE_PCT(){return new K("TOTAL_VALUE_PCT",r.Infront.BrokerStatTags._totalValuePct,h.Percent)}static TRADES(){return new K("TRADES",r.Infront.BrokerStatTags._trades,h.Integer)}static SYM_TURN(){return new K("SYM_TURN",r.Infront.RealtimeTags.Turnover,h.Integer,!0)}static SYM_TURN_PCT(){return new K("SYM_TURN_PCT",r.Infront.BrokerStatTags._symTurnPct,h.Percent)}}class _t extends me{constructor(t,e=h.Text,n=!1){super(t,r.Infront.TagSet.Realtime,t,e,n),this.source=Yt.Market}}class ft extends $e{static FLAG(){return new _t("FLAG")}static FEED(){return new _t("FEED")}static SERVICE(){return new _t("SERVICE")}}class bt extends me{constructor(t,e=h.Text,n=!1){super(t,r.Infront.TagSet.Realtime,t,e,n),this.subscribeFieldName=r.Infront.QuoteFields.TRADES,this.source=Yt.IntradayTrades}}class Ut extends $e{static OPEN(){return new bt("OPEN",h.Numeric)}static LAST(){return new bt("LAST",h.Numeric)}static HIGH(){return new bt("HIGH",h.Numeric)}static LOW(){return new bt("LOW",h.Numeric)}static BID(){return new bt("BID",h.Numeric)}static ASK(){return new bt("ASK",h.Numeric)}static VOLUME(){return new bt("VOLUME",h.Integer)}static TURNOVER(){return new bt("TURNOVER",h.Integer,!0)}static BUYER(){return new bt("BUYER")}static SELLER(){return new bt("SELLER")}static BUYER_FULL(){return new bt("BUYER_FULL")}static SELLER_FULL(){return new bt("SELLER_FULL")}static MARKET(){return new bt("MARKET")}static TYPE(){return new bt("TYPE")}static SEQ_ID(){return new bt("SEQ_ID",h.ID)}static TIME(){return new bt("TIME",h.DateTime)}}class Mt extends me{constructor(t,e,n,i=!1){super(t,r.Infront.TagSet.OrderEntry,e||t,n,i),this.source=Yt.Position}}class Jt extends $e{static ERROR_CODE(){return new Mt("ERROR_CODE",r.Infront.TradingTag.FailCode,h.ID)}static ERROR_MESSAGE(){return new Mt("ERROR_MESSAGE",r.Infront.TradingTag.FailDescription,h.Text)}static PORTFOLIO(){return new Mt("PORTFOLIO",r.Infront.TradingTag.Portfolio,h.Text)}static INVESTED(){return new Mt("INVESTED",r.Infront.TradingTag._displayInvested,h.Numeric)}static VOLUME(){return new Mt("VOLUME",r.Infront.TradingTag.Volume,h.Volume)}static AMOUNT(){return new Mt("AMOUNT",r.Infront.TradingTag.Invested,h.Numeric)}static MULTIPLIER(){return new Mt("MULTIPLIER",r.Infront.TradingTag.Multiplier,h.Numeric)}static COLLATERAL(){return new Mt("COLLATERAL",r.Infront.TradingTag.Collateral,h.Integer)}static LOAN_TO_VALUE_RATIO(){return new Mt("LOAN_TO_VALUE_RATIO",r.Infront.TradingTag.LoanToValueRatio,h.Numeric)}static PROFIT(){return new Mt("PROFIT",null,h.Numeric)}static BASE_CURRENCY(){return new Mt("BASE_CURRENCY",r.Infront.TradingTag.BaseCurrency,h.Text)}static BASE_INVESTED(){return new Mt("BASE_INVESTED",r.Infront.TradingTag._displayBaseInvested,h.Numeric)}static YTD_BASE_INVESTED(){return new Mt("YTD_BASE_INVESTED",null,h.Numeric)}static BASE_VALUE(){return new Mt("BASE_VALUE",null,h.Numeric)}static AVG_PRICE(){return new Mt("AVG_PRICE",r.Infront.TradingTag._avgPrice,h.Numeric)}static S_AVG_PRICE(){return new Mt("S_AVG_PRICE",null,h.Numeric)}static MARKET_PRICE(){return new Mt("MARKET_PRICE",r.Infront.TradingTag.PositionPrice,h.Numeric)}static MARKET_VALUE(){return new Mt("MARKET_VALUE",r.Infront.TradingTag._marketValue,h.Integer)}static BASE_MARKET_VALUE(){return new Mt("BASE_MARKET_VALUE",r.Infront.TradingTag._baseMarketValue,h.Integer)}static PL_TODAY(){return new Mt("PL_TODAY",r.Infront.TradingTag._profitLossToday,h.Numeric)}static PL_TODAY_PCT(){return new Mt("PL_TODAY_PCT",r.Infront.TradingTag._profitLossTodayPct,h.Percent)}static BASE_PL_TODAY(){return new Mt("BASE_PL_TODAY",r.Infront.TradingTag._baseProfitLossToday,h.Numeric)}static BASE_PL_TODAY_PCT(){return new Mt("BASE_PL_TODAY_PCT",r.Infront.TradingTag._baseProfitLossTodayPct,h.Percent)}static RESULT(){return new Mt("RESULT",r.Infront.TradingTag._result,h.Integer)}static RESULT_PCT(){return new Mt("RESULT_PCT",r.Infront.TradingTag._resultPct,h.Percent)}static BASE_RESULT(){return new Mt("BASE_RESULT",r.Infront.TradingTag._baseResult,h.Numeric)}static BASE_RESULT_PCT(){return new Mt("BASE_RESULT_PCT",r.Infront.TradingTag._baseResultPct,h.Percent)}static BASE_CURRENCY_RESULT(){return new Mt("BASE_CURRENCY_RESULT",null,h.Numeric)}static S_POS_CURRENCY(){return new Mt("S_POS_CURRENCY",r.Infront.TradingTag.Currency,h.Text)}static TOTAL_BASE_PL_TODAY_PCT(){return new Mt("PL_TODAY_PCT",null,h.Percent)}static OWN_CAPITAL_CHANGE_PERCENT(){return new Mt("PL_TODAY_PCT",null,h.Percent)}static BASE_COLLATERAL(){return new Mt("BASE_COLLATERAL",r.Infront.TradingTag._baseCollateral,h.Integer)}static SYMBOL_STATUS(){return new Mt("SYMBOL_STATUS",r.Infront.TradingTag._symbolStatusStr,h.Text)}static SYMBOL_MAPPING_DEBUG(){const t=new Mt("SYMBOL_MAPPING_DEBUG",r.Infront.TradingTag._symbolMappingDebug,h.Text);return t.translate=(e,n)=>n&&n.split("|").join("<br/>"),t}static FULL_NAME_HOVER(){const t=new Mt("FULL_NAME_HOVER",r.Infront.TradingTag._fullNameDebug,h.Text);return t.translate=(e,n)=>r.InfrontUtil.isString(n)?n.split("|").join("\n"):n,t}}class Qe extends me{constructor(t,e=h.Text,n=!1){super(t,r.Infront.TagSet.Realtime,t,e,n),this.source=Yt.Portfolio}}class Mn extends $e{static VALUE(){return new Qe("VALUE",h.Integer)}static TRADING_POWER(){return new Qe("TRADING_POWER",h.Integer)}static BASE_TRADING_POWER(){return new Qe("BASE_TRADING_POWER",h.Integer)}}
1class ie extends me{constructor(t,e,n=h.Text,i=null,s=!1){super(t,r.Infront.TagSet.OrderEntry,e||t,n,s),this.source=Yt.Order,this.subId=i}}const Re={CUSTOM_DATE_FIELDS:2,TRIGGER_PRICE:0,CLIENT_SPOT:16,LOAN_TRANS_ACC:17,FORWARD_DATE:14,DISC_PREMIUM:12,FREETXT:18,INT_DEPOT_NUM:20,FORWARD_PRICE:21};class We extends $e{static ORDER_ID(){const t=new ie("ORDER_ID",r.Infront.TradingTag.OrderId,h.ID);return t.genericClass=O.C.kCellText,t}static ALGO_ID(){return new ie("ALGO_ID",r.Infront.TradingTag.AlgoId)}static FAIL_CODE(){return new ie("FAIL_CODE",r.Infront.TradingTag.FailCode,h.ID)}static ERROR_MESSAGE(){return new ie("ERROR_MESSAGE",r.Infront.TradingTag.FailDescription)}static PORTFOLIO(){return new ie("PORTFOLIO",r.Infront.TradingTag.Portfolio)}static CUSTOMER_ID(){return new ie("CUSTOMER_ID",r.Infront.TradingTag.CustomerId)}static BUY_OR_SELL(){const t=new ie("BUY_OR_SELL",r.Infront.TradingTag.BuyOrSell,h.Enum);return t.translate=(e,n)=>t.languageHandler.get("global",r.Infront.Position[n]),t}static PRICE(){return new ie("PRICE",r.Infront.TradingTag._price,h.Numeric)}static S_AVG_PRICE(){return new ie("AVG_PRICE",r.Infront.TradingTag._avgPrice,h.Numeric)}static AVG_PRICE_CLEAN(){return new ie("AVG_PRICE_CLEAN",r.Infront.TradingTag._avgPriceClean,h.Numeric)}static VOLUME(){return new ie("VOLUME",r.Infront.TradingTag.Volume,h.Integer)}static OPEN_VOLUME(){return new ie("OPEN_VOLUME",r.Infront.TradingTag.OpenVolume,h.Integer)}static ORDER_TYPE(){const t=new ie("ORDER_TYPE",r.Infront.TradingTag.OrderType);return t.translate=(e,n)=>t.languageHandler.get("orderEntry",r.Infront.orderTypeToStr(n)),t}static CREATED(){return new ie("CREATED",r.Infront.TradingTag._created,h.DateTime)}static CHANGED(){return new ie("CHANGED",r.Infront.TradingTag._changed,h.DateTime)}static VALID_UNTIL(){return new ie("VALID_UNTIL",r.Infront.TradingTag.ValidDate,h.DateOnly)}static ORDER_STATUS(){const t=new ie("ORDER_STATUS",r.Infront.TradingTag._displayOrderStatusStr);return t.translate=(e,n)=>{const i=n.split(" ");return i.forEach((s,o,l)=>{l[o]=!t.languageHandler||s.includes("_")&&!t.languageHandler.hasTranslation("orderStatus",s)?r.InfrontUtil.formatEnumString(s):t.languageHandler.get("orderStatus",s)}),i.join(" ")},t}static VOLUME_FILLED(){return new ie("VOLUME_FILLED",r.Infront.TradingTag.VolumeFilled,h.Integer)}static COMMENT(){return new ie("COMMENT",r.Infront.TradingTag.Comment)}static ACCUMULATED_TRADED(){return new ie("ACCUMULATED_TRADED",r.Infront.TradingTag.AccFilled,h.Integer)}static TRANSACTION_ID(){return new ie("TRANSACTION_ID",r.Infront.TradingTag.TransactionId)}static EXCHANGE_ORDER_ID(){return new ie("EXCHANGE_ORDER_ID",r.Infront.TradingTag.ExchOrderId)}static READ_ONLY(){return new ie("READ_ONLY",r.Infront.TradingTag._readOnly)}static ORDER_ORIGIN(){return new ie("ORDER_ORIGIN",r.Infront.TradingTag.OrderOrigin)}static ORDER_APP_NUMBER(){return new ie("ORDER_APP_NUMBER",r.Infront.TradingTag.AppNu)}static ORDER_APP_VERSION(){return new ie("ORDER_APP_VERSION",r.Infront.TradingTag.AppVersion)}static ORDER_APP_USER(){return new ie("ORDER_APP_USER",r.Infront.TradingTag.AppUser)}static ORDER_APP_ID(){return new ie("ORDER_APP_ID",r.Infront.TradingTag.AppId)}static S_ORDER_VALUE(){return new ie("S_ORDER_VALUE",r.Infront.TradingTag._orderValue,h.Numeric,null,!0)}static MONETARY_AMOUNT(){return new ie("MONETARY_AMOUNT",r.Infront.TradingTag.MonetaryAmount,h.Numeric)}static SETTLEMENT_CURRENCY(){return new ie("SETTLEMENT_CURRENCY",r.Infront.TradingTag.SettlementCurrency,h.Text)}static CUSTOM_TAGS(){return new ie("CUSTOM_TAGS",r.Infront.TradingTag._customTags,h.Text)}static CUSTOM_DATE_FIELDS(){const t="CUSTOM_DATE_FIELDS";return new ie(t,r.Infront.TradingTag._customField,h.Text,Re[t]??2)}static TRIGGER_PRICE(){const t="TRIGGER_PRICE";return new ie(t,r.Infront.TradingTag._customField,h.Text,Re[t]??0)}static CLIENT_SPOT(){const t="CLIENT_SPOT";return new ie(t,r.Infront.TradingTag._customField,h.Text,Re[t]??16)}static LOAN_TRANS_ACC(){const t="LOAN_TRANS_ACC";return new ie(t,r.Infront.TradingTag._customField,h.Text,Re[t]??17)}static FORWARD_DATE(){const t="FORWARD_DATE";return new ie(t,r.Infront.TradingTag._customField,h.Text,Re[t]??14)}static DISC_PREMIUM(){const t="DISC_PREMIUM";return new ie(t,r.Infront.TradingTag._customField,h.Text,Re[t]??12)}static FREETXT(){const t="FREETXT";return new ie(t,r.Infront.TradingTag._customField,h.Text,Re[t]??18)}static INT_DEPOT_NUM(){const t="INT_DEPOT_NUM";return new ie(t,r.Infront.TradingTag._customField,h.Text,Re[t]??20)}static FORWARD_PRICE(){const t="FORWARD_PRICE";return new ie(t,r.Infront.TradingTag._customField,h.Text,Re[t]??21)}}class Ne extends me{constructor(t,e,n=h.Text,i=!1){super(t,r.Infront.TagSet.Realtime,e||t,n,i),this.source=Yt.Forex}}class en extends $e{static FX_MATURITY_DATE(){return new Ne("FX_MATURITY_DATE",r.Infront.TradingTag.FxMaturityDate,h.DateOnly)}static FX_NDF_FIXING(){return new Ne("FX_NDF_FIXING",r.Infront.TradingTag.FxNdfFixing)}static FX_BASE_CURRENCY(){return new Ne("FX_BASE_CURRENCY",r.Infront.TradingTag.FxCurrency1)}static FX_COUNTER_CURRENCY(){return new Ne("FX_COUNTER_CURRENCY",r.Infront.TradingTag.FxCurrency2)}}class ve extends me{constructor(t,e=h.Text,n=null,i=!1){super(t,r.Infront.TagSet.OrderEntry,r.Infront.TradingTag._algoField,e,i),this.source=Yt.OrderAlgo,this.subId=n}getFieldSpec(){return[r.Infront.MWSConstants.algo_params,this.lowerCaseName]}}const Ln={LIMIT_PRICE:"OrderLimitPx"};class zn extends $e{static LIMIT_PRICE(){const t="LIMIT_PRICE";return new ve(t,h.Numeric,Ln[t])}static TRIGGERCOND(){return new ve("TRIGGERCOND",h.Text,"TRIGGERCOND")}static TRIGGERPX(){return new ve("TRIGGERPX",h.Text,"TRIGGERPX")}static ORDERLIMITPX(){return new ve("ORDERLIMITPX",h.Text,"ORDERLIMITPX")}static TRIGGERVALID(){return new ve("TRIGGERVALID",h.Text,"TRIGGERVALID")}static TRAILLIMIT(){return new ve("TRAILLIMIT",h.Text,"TRAILLIMIT")}static PCTFROMLAST(){return new ve("PCTFROMLAST",h.Text,["PCTFROMTRIGGER","PCTFROMLAST"])}static PCTFROMTRIGGER(){return new ve("PCTFROMTRIGGER",h.Text,["PCTFROMTRIGGER","PCTFROMLAST"])}static TICKSFROMLAST(){return new ve("TICKSFROMLAST",h.Text,["TICKSFROMTRIGGER","TICKSFROMLAST"])}static TICKSFROMTRIGGER(){return new ve("TICKSFROMTRIGGER",h.Text,["TICKSFROMTRIGGER","TICKSFROMLAST"])}static BESTPX(){return new ve("-BESTPX",h.Text,"-BESTPX")}
1static ENTRYPX(){return new ve("-ENTRYPX",h.Text,"-ENTRYPX")}static FORETGTPX(){return new ve("-FORETGTPX",h.Text,"-FORETGTPX")}static TRIGGERATPX(){return new ve("-TRIGGERATPX",h.Text,"-TRIGGERATPX")}static INFRONTPRICEFIELD(){const t=new ve("INFRONTPRICEFIELD",h.Text,"__INFRONTPRICEFIELD__");return t.translate=(e,n)=>r.InfrontUtil.isNumeric(n)?r.InfrontUtil.formatNumber(Number(n),3):n,t}}class Se extends me{constructor(t,e,n=h.Text,i=null,s=!1){super(t,r.Infront.TagSet.Realtime,e||t,n,s),this.source=Yt.Trade,this.subId=i}}class Ui extends $e{static TRADE_ID(){const t=new Se("TRADE_ID",r.Infront.TradingTag.TradeId,h.ID);return t.genericClass=O.C.kCellText,t}static ERROR_CODE(){return new Se("ERROR_CODE",r.Infront.TradingTag.FailCode)}static ERROR_MESSAGE(){return new Se("ERROR_MESSAGE",r.Infront.TradingTag.FailDescription)}static ORDER_ID(){const t=new Se("ORDER_ID",r.Infront.TradingTag.OrderId,h.ID);return t.genericClass=O.C.kCellText,t}static PORTFOLIO(){return new Se("PORTFOLIO",r.Infront.TradingTag.Portfolio)}static CUSTOMER_ID(){return new Se("CUSTOMER_ID",r.Infront.TradingTag.CustomerId)}static BUY_OR_SELL(){const t=new Se("BUY_OR_SELL",r.Infront.TradingTag.BuyOrSell,h.Enum);return t.translate=(e,n)=>t.languageHandler.get("global",r.Infront.Position[n]),t}static INSTRUMENT_TYPE(){const t=new Se("INSTRUMENT_TYPE",r.Infront.TradingTag.InstrType,h.Text);return t.translate=(e,n)=>r.Infront.Symbol.SymbolTypeToStr(n),t}static INSTRUMENT_SUBTYPE(){const t=new Se("INSTRUMENT_SUBTYPE",r.Infront.TradingTag.InstrSubType,h.Text);return t.translate=(e,n)=>r.Infront.Symbol.SymbolSubTypeToStr(n),t}static PRICE(){return new Se("PRICE",r.Infront.TradingTag.Price,h.Numeric)}static VOLUME(){return new Se("VOLUME",r.Infront.TradingTag.Volume,h.Integer)}static TRADE_TIME(){return new Se("TRADE_TIME",r.Infront.TradingTag._traded,h.DateTime)}static FEE(){return new Se("FEE",r.Infront.TradingTag.Fee,h.Numeric)}static FOREX_RATE(){return new Se("FOREX_RATE",r.Infront.TradingTag.FxRate,h.Numeric)}static INVESTED(){return new Se("INVESTED",r.Infront.TradingTag.Invested,h.Integer,null,!0)}static EXCHANGE_ORDER_ID(){return new Se("EXCHANGE_ORDER_ID",r.Infront.TradingTag.ExchOrderId)}static EXCHANGE_TRADE_ID(){return new Se("EXCHANGE_TRADE_ID",r.Infront.TradingTag.ExchTradeId)}static EXCHANGE_TRADE_ID2(){return new Se("EXCHANGE_TRADE_ID2",r.Infront.TradingTag.ExchTradeId2)}static DELETED_TRADE(){return new Se("DELETED_TRADE",r.Infront.TradingTag.DeletedTrade)}static VERIFIED_TRADE(){return new Se("VERIFIED_TRADE",r.Infront.TradingTag.VerifiedTrade)}static EXEC_MARKET(){return new Se("EXEC_MARKET",r.Infront.TradingTag.ExecutionMarket)}static FX_CURRENCY_PAIR(){return new Se("FX_CURRENCY_PAIR",r.Infront.TradingTag._fxCurrencyPair)}static S_EXPIRY_DATE(){return new Se("S_EXPIRY_DATE",r.Infront.TradingTag.ExpiryDate,h.IdsDate)}static CUSTOM_DATE_FIELDS(){const t="CUSTOM_DATE_FIELDS";return new Se(t,r.Infront.TradingTag._customField,h.Text,Re[t]??2)}static TRIGGER_PRICE(){const t="TRIGGER_PRICE";return new Se(t,r.Infront.TradingTag._customField,h.Text,Re[t]??0)}static CLIENT_SPOT(){const t="CLIENT_SPOT";return new Se(t,r.Infront.TradingTag._customField,h.Text,Re[t]??16)}static LOAN_TRANS_ACC(){const t="LOAN_TRANS_ACC";return new Se(t,r.Infront.TradingTag._customField,h.Text,Re[t]??17)}static FORWARD_DATE(){const t="FORWARD_DATE";return new Se(t,r.Infront.TradingTag._customField,h.Text,Re[t]??14)}static DISC_PREMIUM(){const t="DISC_PREMIUM";return new Se(t,r.Infront.TradingTag._customField,h.Text,Re[t]??12)}static FREETXT(){const t="FREETXT";return new Se(t,r.Infront.TradingTag._customField,h.Text,Re[t]??18)}static INT_DEPOT_NUM(){const t="INT_DEPOT_NUM";return new Se(t,r.Infront.TradingTag._customField,h.Text,Re[t]??20)}static FORWARD_PRICE(){const t="FORWARD_PRICE";return new Se(t,r.Infront.TradingTag._customField,h.Text,Re[t]??21)}}class Rt extends me{constructor(t,e,n=h.Text,i=!1,s=!1){super(t,r.Infront.TagSet.Realtime,e,n,i,s),this.source=Yt.Fund,this.subscribeFieldName=r.InfrontConstants.FieldGroups.REF_DATA_DETAILS}}class dn extends me{constructor(t,e=null,n=h.Text,i=!1){super(t,r.Infront.TagSet.Realtime,e||t,n,i),this.source=Yt.Fund,this.subscribeFieldName=r.InfrontConstants.FieldGroups.FUND_DETAILS,this.cacheBinding=r.InfrontConstants.FundDetailsMap[t]}getFieldSpec(){return this.cacheBinding.slice()}}class Hn extends $e{static FUND_PORTFOLIO_MANAGER(){return new Rt("FUND_PORTFOLIO_MANAGER",r.Infront.RealtimeTags.FundPortfolioManager)}static FUND_TYPE(){return new Rt("FUND_TYPE",r.Infront.RealtimeTags.FundType)}static FUND_TOTAL_EXPENSE(){return new Rt("FUND_TOTAL_EXPENSE",r.Infront.RealtimeTags.FundTotalExpense,h.Percent)}static FUND_TOTAL_ASSETS(){return new Rt("FUND_TOTAL_ASSETS",r.Infront.RealtimeTags.FundTotalAssets,h.Integer,!0)}static FUND_SHARPE_RATIO(){return new Rt("FUND_SHARPE_RATIO",r.Infront.RealtimeFundTags.SharpeRatio,h.Numeric)}static FUND_PROSPECTIVE_DIVIDEND_YIELD(){return new Rt("FUND_PROSPECTIVE_DIVIDEND_YIELD",r.Infront.RealtimeTags.Dividend,h.Numeric)}static FUND_PROSPECTIVE_BOOK_VALUE_YIELD(){return new Rt("FUND_PROSPECTIVE_BOOK_VALUE_YIELD",r.Infront.RealtimeTags.FundPros
1pectiveBookValueYield,h.Numeric)}static RISK_LEVEL(){return new Rt("RISK_LEVEL",r.Infront.RealtimeTags.FundRiskMeasure,h.Integer)}static STAR_RATING(){return new Rt("STAR_RATING",r.Infront.RealtimeTags.MorningstarRating,h.Integer)}static STAR_RATING_3Y(){return new Rt("STAR_RATING_3Y",r.Infront.RealtimeTags.MorningstarRating3Y,h.Integer)}static FUND_ONGOING_CHARGE(){return new Rt("FUND_ONGOING_CHARGE",r.Infront.RealtimeTags.FundOngoingCharge,h.Percent)}static FUND_ANNUAL_REPORT_DATE(){return new Rt("FUND_ANNUAL_REPORT_DATE",r.Infront.RealtimeTags.FundAnnualReportDate,h.IdsDate)}static FUND_SUSTAINABILITY_RATING(){return new Rt("FUND_SUSTAINABILITY_RATING",r.Infront.RealtimeFundTags.SustainabilityRating,h.Integer)}static FUND_SUSTAINABILITY_RATING_DATE(){return new Rt("FUND_SUSTAINABILITY_RATING_DATE",r.Infront.RealtimeDateTime.SustainabilityRatingDate,h.IdsDate)}static FUND_MANAGEMENT_FEE(){return new Rt("FUND_MANAGEMENT_FEE",r.Infront.RealtimeTags.FundManagementFee)}static FUND_ACTUAL_MANAGEMENT_FEE(){return new Rt("FUND_ACTUAL_MANAGEMENT_FEE",r.Infront.RealtimeTags.FundActualManagementFee)}static ANALYST_RATING(){return new dn("ANALYST_RATING",r.Infront.RealtimeFundTags.AnalystRating)}static FUND_NAME_SWEDISH(){return new Rt("FUND_NAME_SWEDISH",r.Infront.RealtimeTags.FundNameSwedish)}static FUND_REFERENCE_FEED(){return new Rt("FUND_REFERENCE_FEED",r.Infront.RealtimeFundTags.ReferenceFeed,h.Integer)}static FUND_REFERENCE_SYMBOL(){return new Rt("FUND_REFERENCE_SYMBOL",r.Infront.RealtimeFundTags.ReferenceSymbol)}static FUND_REFERENCE_PRICE(){return new Rt("FUND_REFERENCE_PRICE",r.Infront.RealtimeFundTags.ReferencePrice,h.Numeric)}static MS_PORTFOLIO_SUSTAINABILITY_SCORE(){return new Rt("MS_PORTFOLIO_SUSTAINABILITY_SCORE",r.Infront.RealtimeFundTags.MsPortfolioSustainabilityScore,h.Numeric)}static ESG_HISTORICAL_SUSTAINABILITY_SCORE(){return new Rt("ESG_HISTORICAL_SUSTAINABILITY_SCORE",r.Infront.RealtimeFundTags.EsgHistoricalSustainabilityScore,h.Numeric)}static ESG_HISTORICAL_SUSTAINABILITY_SCORE_GLOBAL_CATEGORY_AVERAGE(){return new Rt("ESG_HISTORICAL_SUSTAINABILITY_SCORE_GLOBAL_CATEGORY_AVERAGE",r.Infront.RealtimeFundTags.EsgHistoricalSustainabilityScoreGlobalCategoryAverage,h.Numeric)}static ESG_SOVEREIGN_PORTFOLIO_SUSTAINABILITY_SCORE(){return new Rt("ESG_SOVEREIGN_PORTFOLIO_SUSTAINABILITY_SCORE",r.Infront.RealtimeFundTags.EsgSovereignPortfolioSustainabilityScore,h.Numeric)}static ESG_PORTFOLIO_ENVIRONMENTAL_SCORE(){return new Rt("ESG_PORTFOLIO_ENVIRONMENTAL_SCORE",r.Infront.RealtimeFundTags.EsgPortfolioEnvironmentalScore,h.Numeric)}static ESG_PORTFOLIO_GOVERNANCE_SCORE(){return new Rt("ESG_PORTFOLIO_GOVERNANCE_SCORE",r.Infront.RealtimeFundTags.EsgPortfolioGovernanceScore,h.Numeric)}static ESG_PORTFOLIO_SOCIAL_SCORE(){return new Rt("ESG_PORTFOLIO_SOCIAL_SCORE",r.Infront.RealtimeFundTags.EsgPortfolioSocialScore,h.Numeric)}static ESG_ENVIRONMENTAL_RISK_GLOBAL_CATEGORY_AVERAGE(){return new Rt("ESG_ENVIRONMENTAL_RISK_GLOBAL_CATEGORY_AVERAGE",r.Infront.RealtimeFundTags.EsgEnvironmentalRiskGlobalCategoryAverage,h.Numeric)}static ESG_SOCIAL_RISK_GLOBAL_CATEGORY_AVERAGE(){return new Rt("ESG_SOCIAL_RISK_GLOBAL_CATEGORY_AVERAGE",r.Infront.RealtimeFundTags.EsgSocialRiskGlobalCategoryAverage,h.Numeric)}static ESG_GOVERNANCE_RISK_GLOBAL_CATEGORY_AVERAGE(){return new Rt("ESG_GOVERNANCE_RISK_GLOBAL_CATEGORY_AVERAGE",r.Infront.RealtimeFundTags.EsgGovernanceRiskGlobalCategoryAverage,h.Numeric)}static ESG_PORTFOLIO_UNALLOCATED_RISK_SCORE(){return new Rt("ESG_PORTFOLIO_UNALLOCATED_RISK_SCORE",r.Infront.RealtimeFundTags.EsgPortfolioUnallocatedRiskScore,h.Numeric)}static ESG_PERCENT_OF_AUM_COVERED_CONTROVERSY(){return new Rt("ESG_PERCENT_OF_AUM_COVERED_CONTROVERSY",r.Infront.RealtimeFundTags.EsgPercentOfAumCoveredControversy,h.Numeric)}static ESG_PERCENT_OF_AUM_WITH_SEVERE_CONTROVERSIES(){return new Rt("ESG_PERCENT_OF_AUM_WITH_SEVERE_CONTROVERSIES",r.Infront.RealtimeFundTags.EsgPercentOfAumWithSevereControversies,h.Numeric)}static ESG_PERCENT_OF_AUM_WITH_HIGH_AND_SEVERE_CONTROVERSIES(){return new Rt("ESG_PERCENT_OF_AUM_WITH_HIGH_AND_SEVERE_CONTROVERSIES",r.Infront.RealtimeFundTags.EsgPercentOfAumWithHighAndSevereControversies,h.Numeric)}static ESG_PERCENT_OF_AUM_WITH_NO_CONTROVERSIES(){return new Rt("ESG_PERCENT_OF_AUM_WITH_NO_CONTROVERSIES",r.Infront.RealtimeFundTags.EsgPercentOfAumWithNoControversies,h.Numeric)}static FUND_UCITS(){return new Rt("FUND_UCITS",r.Infront.RealtimeTags.FundUcits,h.Boolean)}static FUND_PPM_CODE(){return new Rt("FUND_PPM_CODE",r.Infront.RealtimeTags.FundPpmCode,h.Numeric)}static FUND_PERFORMANCE_FEE(){return new Rt("FUND_PERFORMANCE_FEE",r.Infront.RealtimeTags.FundPerformanceFee,h.Numeric)}static FUND_MINIMUM_INITIAL_PAYMENT(){return new Rt("FUND_MINIMUM_INITIAL_PAYMENT",r.Infront.RealtimeTags.FundMinimumInitialPayment,h.Numeric)}static FUND_MINIMUM_PURCHASE_AMOUNT(){return new Rt("FUND_MINIMUM_PURCHASE_AMOUNT",r.Infront.RealtimeTags.FundMinimumPurchaseAmount,h.Numeric)}static FUND_PURCHASE_FEE(){return new Rt("FUND_PURCHASE_FEE",r.Infront.RealtimeTags.FundPurchaseFee,h.Numeric)}static FUND_KIID_URL(){return new Rt("FUND_KIID_URL",r.Infront.RealtimeTags.FundKIIDUrl,h.Text)}static COMPANY_POSTAL_CODE(){return new Rt("COMPANY_POSTAL_CODE",r.Infront.RealtimeTags.CompanyPostalCode)}static COMPANY_CITY(){return new Rt("COMPANY_CITY",r.Infront.RealtimeTags.CompanyCity)}static EMAIL(){return new Rt("EMAIL",r.Infront.RealtimeTags.CompanyEmail)}static COMPANY_ADDRESS(){return new Rt("COMPANY_ADDRESS",r.Infront.RealtimeTags.CompanyAddress)}static COMPANY_STATE(){return new Rt("COMPANY_STATE",r.Infront.RealtimeTags.CompanyState)}static COMPANY_PHONE(){return new Rt("COMPANY_PHONE",r.Infront.RealtimeTags.CompanyPhone)}static FUND_BENCHMARK(){return new Rt("FUND_BENCHMARK",r.Infront.RealtimeTags.FundBenchmark)}static FUND_TUNNEL_PERIOD(){return new Rt("FUND_TUNNEL_PERIOD",r.Infront.RealtimeTags.FundTunnelPeriod,h.Integer)}static FUND_INCEPTION_DATE(){return new Rt("FUND_INCEPTION_DATE",r.Infront.RealtimeDateTime.FundInceptionDate,h.DateOnly)}static FUND_TOP_HOLDING_DATE(){return new Rt("FUND_TOP_HOLDING_DATE",r.Infront.RealtimeDateTime.FundTopHoldingDate,h.DateOnly)}static FUND_SHARPE_RATIO_1Y(){return new Rt("FUND_SHARPE_RATIO_1Y",r.Infront.RealtimeTags.FundSharpeRatio1Y,h.Numeric)}static FUND_SHARPE_RATIO_3Y(){return new Rt("FUND_SHARPE_RATIO_3Y",r.Infront.RealtimeTags.FundSharpeRatio3Y,h.Numeric)}static FUND_SHARPE_RATIO_5Y(){return new Rt("FUND_SHARPE_RATIO_5Y",r.Infront.RealtimeTags.FundSharpeRatio5Y,h.Numeric)}static FUND_SORTINO_RATIO_1Y(){return new Rt("FUND_SORTINO_RATIO_1Y",r.Infront.RealtimeTags.FundSortinoRatio1Y,h.Numeric)}static FUND_SORTINO_RATIO_3Y(){return new Rt("FUND_SORTINO_RATIO_3Y",r.Infront.RealtimeTags.FundSortinoRatio3Y,h.Numeric)}static FUND_SORTINO_RATIO_5Y(){return new Rt("FUND_SORTINO_RATIO_5Y",r.Infront.RealtimeTags.FundSortinoRatio5Y,h.Numeric)}static FUND_DOWNSIDE_RISK_1Y(){return new Rt("FUND_DOWNSIDE_RISK_1Y",r.Infront.RealtimeTags.FundDownsideRisk1Y,h.Numeric)}static FUND_DOWNSIDE_RISK_3Y(){return new Rt("FUND_DOWNSIDE_RISK_3Y",r.Infront.RealtimeTags.FundDownsideRisk3Y,h.Numeric)}static FUND_DOWNSIDE_RISK_5Y(){return new Rt("FUND_DOWNSIDE_RISK_5Y",r.Infront.RealtimeTags.FundDownsideRisk5Y,h.Numeric)}static FUND_ASSOGESTIONI_RATING(){return new Rt("FUND_ASSOGESTIONI_RATING",r.Infront.RealtimeTags.FundAssogestioniRating,h.Numeric)}static FUND_ASSOGESTIONI_RATING_DATE(){return new Rt("FUND_ASSOGESTIONI_RATING_DATE",r.Infront.RealtimeDateTime.FundAssogestioniRatingDate,h.DateOnly)}static FUND_NET_ASSETS_DATE(){return new Rt("FUND_NET_ASSETS_DATE",r.Infront.RealtimeDateTime.FundNetAssetsDate,h.DateOnly)}static PAYMENT_DATE(){return new Rt("PAYMENT_DATE",r.Infront.RealtimeDateTime.PaymentDate,h.DateOnly)}static DIV_DATE(){return new Rt("DIV_DATE",r.Infront.RealtimeDateTime.DivDate,h.DateOnly)}static FUND_BULL_3Y(){return new Rt("FUND_BULL_3Y",r.Infront.RealtimeTags.FundBull3Y,h.Percent)}static FUND_BENCHMARK_BULL_3Y(){return new Rt("FUND_BENCHMARK_BULL_3Y",r.Infront.RealtimeTags.FundBenchmarkBull3Y,h.Percent)}static FUND_BEAR_3Y(){return new Rt("FUND_BEAR_3Y",r.Infront.RealtimeTags.FundBear3Y,h.Percent)}static FUND_BENCHMARK_BEAR_3Y(){return new Rt("FUND_BENCHMARK_BEAR_3Y",r.Infront.RealtimeTags.FundBenchmarkBear3Y,h.Percent)}static FUND_ASSOGESTIONI_SCORE(){return new Rt("FUND_ASSOGESTIONI_SCORE",r.Infront.RealtimeTags.FundAssogestioniScore,h.Numeric)}static FUND_QUARTILE_1Y(){return new Rt("FUND_QUARTILE_1Y",r.Infront.RealtimeTags.FundQuartile1Y,h.Numeric)}static FUND_QUARTILE_3Y(){return new Rt("FUND_QUARTILE_3Y",r.Infront.RealtimeTags.FundQuartile3Y,h.Numeric)}static FUND_ADMINISTRATIVE_FEE(){return new Rt("FUND_ADMINISTRATIVE_FEE",r.Infront.RealtimeTags.FundAdministrativeFee,h.Percent)}static FUND_EXTRA_FEE(){return new Rt("FUND_EXTRA_FEE",r.Infront.RealtimeTags.FundExtraFee,h.Percent)}static FUND_ENTRY_FEE_MAX(){return new Rt("FUND_ENTRY_FEE_MAX",r.Infront.RealtimeTags.FundEntryFeeMax,h.Percent)}static FUND_ENTRY_FEE_MIN(){return new Rt("FUND_ENTRY_FEE_MIN",r.Infront.RealtimeTags.FundEntryFeeMin,h.Percent)}static FUND_REDEMPTION_FEE(){return new Rt("FUND_REDEMPTION_FEE",r.Infront.RealtimeTags.FundRedemptionFee,h.Percent)}static FUND_EXCHANGE_FEE(){return new Rt("FUND_EXCHANGE_FEE",r.Infront.RealtimeTags.FundExchangeFee,h.Percent)}static FUND_STD_DEV_1Y(){return new Rt("FUND_STD_DEV_1Y",r.Infront.RealtimeTags.FundStdDev1Year,h.Numeric)}static FUND_STD_DEV_3Y(){return new Rt("FUND_STD_DEV_3Y",r.Infront.RealtimeTags.FundStdDev3Years,h.Numeric)}static FUND_STD_DEV_5Y(){return new Rt("FUND_STD_DEV_5Y",r.Infront.RealtimeTags.FundStdDev5Years,h.Numeric)}static FUND_R_SQUARED(){return new Rt("FUND_R_SQUARED",r.Infront.RealtimeTags.FundRSquared,h.Numeric)}static FUND_REVENUE(){return new Rt("FUND_REVENUE",r.Infront.RealtimeTags.FundRevenue,h.Numeric)}static FUND_LEGAL_STATUS(){return new Rt("FUND_LEGAL_STATUS",r.Infront.RealtimeTags.FundLegalStatus,h.Text)}static FUND_NET_ASSETS(){return new Rt("FUND_NET_ASSETS",r.Infront.RealtimeTags.FundNetAssets,h.Numeric)}static FUND_PREV_NAV(){return new Rt("FUND_PREV_NAV",r.Infront.RealtimeTags.FundPrevNav,h.Numeric)}static FUND_CAP_DURATION(){return new Rt("FUND_CAP_DURATION",r.Infront.RealtimeTags.FundCapDuration,h.Text)}static FUND_MIN_INITIAL_AMOUNT_CAP(){return new Rt("FUND_MIN_INITIAL_AMOUNT_CAP",r.Infront.RealtimeTags.FundMinInitialAmountCap,h.Numeric)}static FUND_HOLDING_COMPANY_NAME(){return new Rt("FUND_HOLDING_COMPANY_NAME",r.Infront.RealtimeTags.FundHoldingCompanyName,h.Text)}static FUND_REDEMPTION_FEE_LIST(){return new Rt("FUND_REDEMPTION_FEE_LIST",r.Infront.RealtimeTags.FundRedemptionFeeList,h.Text)}static FUND_EXCHANGE_FEE_LIST(){return new Rt("FUND_EXCHANGE_FEE_LIST",r.Infront.RealtimeTags.FundExchangeFeeList,h.Text)}static FUND_SFDR_CLASSIFICATION(){return new Rt("FUND_SFDR_CLASSIFICATION",r.Infront.RealtimeTags.FundSFDRClassification,h.Numeric)}static FUND_ALPHA_3Y(){return new Rt("FUND_ALPHA_3Y",r.Infront.RealtimeTags.FundAlpha3Y,h.Numeric)}static FUND_BETA_3Y(){return new Rt("FUND_BETA_3Y",r.Infront.RealtimeTags.FundBeta3Y,h.Numeric)}static FUND_MAX_LOSS_3Y(){return new Rt("FUND_MAX_LOSS_3Y",r.Infront.RealtimeTags.FundMaxLoss3Y,h.Numeric)}static FUND_TRACKING_ERROR_3Y(){return new Rt("FUND_TRACKING_ERROR_3Y",r.Infront.RealtimeTags.FundTrackingError3Y,h.Numeric)}static FUND_TREYNOR_RATIO_3Y(){return new Rt("FUND_TREYNOR_RATIO_3Y",r.Infront.RealtimeTags.FundTreynorRatio3Y,h.Numeric)}static FUND_IS_INDEX(){return new Rt("FUND_IS_INDEX",r.Infront.RealtimeTags.FundIsIndex,h.Boolean)}static FUND_BRANDING_COMPANY_NAME(){return new Rt("FUND_BRANDING_COMPANY_NAME",r.Infront.RealtimeTags.FundBrandingCompanyName,h.Text)}static FUND_STYLEBOX(){return new dn(r.InfrontConstants.FundDetailField.FUND_STYLEBOX)}static FUND_LAST_UPDATE_HOLDINGS(){return new dn(r.InfrontConstants.FundDetailField.FUND_LA
1ST_UPDATE_HOLDINGS,null,h.DateOnly)}static MIN_INIT_INVESTMENT(){return new dn(r.InfrontConstants.FundDetailField.MIN_INIT_INVESTMENT,null,h.Integer)}static START_DATE(){return new dn(r.InfrontConstants.FundDetailField.START_DATE,null,h.DateOnly)}static INVESTMENT_MANDATE(){return new dn(r.InfrontConstants.FundDetailField.INVESTMENT_MANDATE)}static INVESTMENT_STRATEGY(){return new dn(r.InfrontConstants.FundDetailField.INVESTMENT_STRATEGY,null,h.Text)}static PROSPECTIVE_BOOK_VALUE_YIELD(){return new dn(r.InfrontConstants.FundDetailField.PROSPECTIVE_BOOK_VALUE_YIELD,r.Infront.RealtimeTags.FundProspectiveBookValueYield,h.Numeric)}static PROSPECTIVE_EARNINGS_YIELD(){return new dn(r.InfrontConstants.FundDetailField.PROSPECTIVE_EARNINGS_YIELD,r.Infront.RealtimeTags.Pe,h.Numeric)}static HOMEPAGE(){return new dn(r.InfrontConstants.FundDetailField.HOMEPAGE,null,h.Text)}static FUND_MANAGER(){const t=new dn(r.InfrontConstants.FundDetailField.FUND_MANAGER,null,h.Text);return t.translate=Hn.fundManagerTranslate,t}static FOR_SALE_IN(){const t=new dn(r.InfrontConstants.FundDetailField.FOR_SALE_IN);return t.translate=Hn.forSaleInTranslate,t}static FOR_SALE_IN_SHORT(){const t=new dn(r.InfrontConstants.FundDetailField.FOR_SALE_IN_SHORT);return t.translate=Hn.forSaleInShortTranslate,t}static FOR_SALE_IN_COUNT(){const t=new dn(r.InfrontConstants.FundDetailField.FOR_SALE_IN_COUNT);return t.translate=Hn.forSaleInCountTranslate,t}static TRACKING_ERROR(){return new dn(r.InfrontConstants.FundDetailField.TRACKING_ERROR,null,h.Numeric)}static ACTIVE_SHARE(){return new dn(r.InfrontConstants.FundDetailField.ACTIVE_SHARE,null,h.Numeric)}static fundManagerTranslate(t,e){let n="";for(let i=0;i<e.length;i++)n+=e[i],i!==e.length-1&&(n+=", ");return n}static forSaleInTranslate(t,e){let n="";for(let i=0;i<e.length;i++)n+=e[i].name,i!==e.length-1&&(n+=", ");return n}static forSaleInShortTranslate(t,e){let n="";for(let i=0;i<e.length;i++)n+=e[i].code;return n}static forSaleInCountTranslate(t,e){return e.length.toString()}}class jn extends me{constructor(t,e=h.Text,n=!1){super(t,r.Infront.TagSet.Realtime,t,e,n),this.source=Yt.TopEntities}}class Li extends jn{constructor(t,e){super(t,h.Percent),this.source=Yt.TopEntities,this.type=Le.Custom,this.content=n=>{const i=document.createElement("div"),s=this.getValueFromObject(n);return s>=0&&(i.className=this.containerClassName,r.InfrontUtil.addInlineStyle(i,"width:"+s+"%;")),i},this.containerClassName=e}}class di extends jn{constructor(t,e=h.Numeric,n,i=!1){super(t,e),this.type=Le.Custom,this.content=s=>{const o=document.createElement("div"),l=this.getValueFromObject(s);return r.InfrontUtil.isNumber(l)&&(o.innerText=di.formatAndShortenToSignificantFigures(l,this.significantFigures),this.highlightChange&&(l>0?o.className=O.C.kStatusPositive:l<0&&(o.className=O.C.kStatusNegative))),o},this.highlightChange=i,this.significantFigures=n}static formatAndShortenToSignificantFigures(t,e){const n=Math.abs(t);if(r.InfrontUtil.formatSettings.useKiloMegaFormat){if(n>1e7){const i=Math.max(e-Math.floor(this.logBase10(n/1e6))-1,0);return r.InfrontUtil.formatNumber(t/1e6,i)+r.InfrontUtil.formatSettings.mega}if(n>1e5){const i=Math.max(e-Math.floor(this.logBase10(n/1e3))-1,0);return r.InfrontUtil.formatNumber(t/1e3,i)+r.InfrontUtil.formatSettings.kilo}}return r.InfrontUtil.formatNumber(t,0)}static logBase10(t){return Math.log(t)*Math.LOG10E}}class Xn extends $e{static RANK(){return new jn("RANK",h.Integer)}static INVESTOR(){return new jn("INVESTOR",h.Text)}static HOLDING(){return new jn("HOLDING",h.Text)}static NUM_SHARES(){return new di("NUM_SHARES",h.Integer,4)}static PCT_OWNERSHIP(){return new jn("PCT_OWNERSHIP",h.Percent)}static PCT_WEIGHTED_OWNERSHIP(){return new Li("PCT_WEIGHTED_OWNERSHIP","cell-w-top-entities__table-pct-weighted-ownership")}static PCT_WEIGHTED_VALUE(){return new Li("PCT_WEIGHTED_VALUE","cell-w-top-entities__table-pct-weighted-value")}static MAX_RANK(){return new jn("MAX_RANK",h.Integer)}static MAX_NUM_SHARES(){return new di("MAX_NUM_SHARES",h.Integer,4)}static PCT_MAX_OWNERSHIP(){return new jn("PCT_MAX_OWNERSHIP",h.Percent)}static MAX_VALUE(){return new di("MAX_VALUE",h.Numeric,5)}static PCT_MAX_WEIGHTED_OWNERSHIP(){return new Li("PCT_MAX_WEIGHTED_OWNERSHIP","cell-w-top-entities__table-pct-max-weighted-ownership")}static PCT_MAX_WEIGHTED_VALUE(){return new Li("PCT_MAX_WEIGHTED_VALUE","cell-w-top-entities__table-pct-max-weighted-value")}static NUM_SHARES_CHANGE(){return new di("NUM_SHARES_CHANGE",h.Integer,4,!0)}static PCT_NUM_SHARES_CHANGE(){const t=new jn("PCT_NUM_SHARES_CHANGE",h.Percent);return t.highlightChange=!0,t}}class Ve extends me{constructor(t,e=null,n=h.Numeric,i=!1){super(t,r.Infront.TagSet.Realtime,e,n,i),this.source=Yt.SmeFundamental}}class nr extends $e{static SME_EBIT(){return new Ve("SME_EBIT",r.Infront.FundamentalLevelOneTags._smeEBIT)}static SME_NET_SALES(){return new Ve("SME_NET_SALES",r.Infront.FundamentalLevelOneTags._smeNetSales)}static SME_PRETAX(){return new Ve("SME_PRETAX",r.Infront.FundamentalLevelOneTags._smePretax)}static SME_EBITDA(){return new Ve("SME_EBITDA",r.Infront.FundamentalLevelOneTags._smeEBITDA)}static SME_NET_PROFIT(){return new Ve("SME_NET_PROFIT",r.Infront.FundamentalLevelOneTags._smeNetProfit)}static SME_EPS(){return new Ve("SME_EPS",r.Infront.FundamentalLevelOneTags._smeEps)}static SME_EPS_ESTIMATE(){return new Ve("SME_EPS_ESTIMATE",r.Infront.FundamentalLevelOneTags._smeEpsEstimate)}static SME_EPS_CHANGE(){return new Ve("SME_EPS_CHANGE",r.Infront.FundamentalLevelOneTags._smeEpsChange)}static SME_EPS_CHANGE_PCT(){return new Ve("SME_EPS_CHANGE_PCT",r.Infront.FundamentalLevelOneTags._smeEpsChangePct,h.Percent)}static SME_DPS(){return new Ve("SME_DPS",r.Infront.FundamentalLevelOneTags._smeDps)}static SME_DPS_ESTIMATE(){return new Ve("SME_DPS_ESTIMATE",r.Infront.FundamentalLevelOneTags._smeDpsEstimate)}static SME_PE(){return new Ve("SME_PE",r.Infront.FundamentalLevelOneTags._smePe)}static SME_PE_ESTIMATE(){return new Ve("SME_PE_ESTIMATE",r.Infront.FundamentalLevelOneTags._smePeEstimate)}static SME_PE_CHANGE(){return new Ve("SME_PE_CHANGE",r.Infront.FundamentalLevelOneTags._smePeChange)}static SME_PE_CHANGE_PCT(){return new Ve("SME_PE_CHANGE_PCT",r.Infront.FundamentalLevelOneTags._smePeChangePct,h.Percent)}static SME_YIELD(){return new Ve("SME_YIELD",r.Infront.FundamentalLevelOneTags._smeYield)}static SME_YIELD_ESTIMATE(){return new Ve("SME_YIELD_ESTIMATE",r.Infront.FundamentalLevelOneTags._smeYieldEstimate)}static SME_YIELD_CHANGE(){return new Ve("SME_YIELD_CHANGE",r.Infront.FundamentalLevelOneTags._smeYieldChange)}static SME_YIELD_CHANGE_PCT(){return new Ve("SME_YIELD_CHANGE_PCT",r.Infront.FundamentalLevelOneTags._smeYieldChangePct,h.Percent)}static SME_EARNINGS_YIELD(){return new Ve("SME_EARNINGS_YIELD",r.Infront.FundamentalLevelOneTags._smeEarningsYield)}static SME_EARNINGS_YIELD_ESTIMATE(){return new Ve("SME_EARNINGS_YIELD_ESTIMATE",r.Infront.FundamentalLevelOneTags._smeEarningsYieldEstimate)}static SME_EARNINGS_YIELD_CHANGE(){return new Ve("SME_EARNINGS_YIELD_CHANGE",r.Infront.FundamentalLevelOneTags._smeEarningsYieldChange)}static SME_EARNINGS_YIELD_CHANGE_PCT(){return new Ve("SME_EARNINGS_YIELD_CHANGE_PCT",r.Infront.FundamentalLevelOneTags._smeEarningsYieldChangePct,h.Percent)}static SME_RECOMMENDATIONS_STRONG_BUY(){return new Ve("SME_RECOMMENDATIONS_STRONG_BUY",r.Infront.FundamentalLevelOneTags._smeRecommendationStrongBuy)}static SME_RECOMMENDATIONS_BUY(){return new Ve("SME_RECOMMENDATIONS_BUY",r.Infront.FundamentalLevelOneTags._smeRecommendationBuy)}static SME_RECOMMENDATIONS_HOLD(){return new Ve("SME_RECOMMENDATIONS_HOLD",r.Infront.FundamentalLevelOneTags._smeRecommendationHold)}static SME_RECOMMENDATIONS_SELL(){return new Ve("SME_RECOMMENDATIONS_SELL",r.Infront.FundamentalLevelOneTags._smeRecommendationSell)}static SME_RECOMMENDATIONS_STRONG_SELL(){return new Ve("SME_RECOMMENDATIONS_STRONG_SELL",r.Infront.FundamentalLevelOneTags._smeRecommendationStrongSell)}}class es extends me{constructor(t,e=null,n=h.Numeric,i=!1){super(t,r.Infront.TagSet.Realtime,e,n,i),this.source=Yt.AdditionalData,this.subscribeFieldName=t}}class ta extends $e{static BROKER_COLLATERAL_PCT(){return new es("BROKER_COLLATERAL_PCT",r.Infront.RealtimeTags.CollateralPct)}static BROKER_IS_SHORTABLE(){return new es("BROKER_IS_SHORTABLE",r.Infront.RealtimeTags.IsShortable,h.Boolean)}}class be extends me{constructor(t,e=h.Numeric,n=Yt.Unknown,i=!1,s=!1){super(t,r.Infront.TagSet.Realtime,t,e,i,s),this.type=Le.Computed,this.computeFields=[],this.source=n}hideComputedFields(){if(this.computeFields)for(const t of this.computeFields)be.isComputedField(t)&&(t.hideComputedFields(),r.InfrontUtil.errorLog("Warning: Nested computed field not yet supported",this)),t.forceHidden()}static isComputedField(t){return t.type===Le.Computed}applySpec(t){if(super.applySpec(t),this.isValidSpecProp(t,"computeFields",r.InfrontUtil.isArray))for(const n of t.computeFields)if(ke.isValidSpec(n)){const i=ke.createFieldFromSpec(n,null,[this.source,Yt.Unknown]);if(!i){r.InfrontUtil.errorLog(`Warning: Could not resolve computeField "${n}" for computed field.`,t);continue}Object.hasOwn(t,"dataType")||i.dataType===this.dataType||(this.dataType=i.dataType),this.computeFields.push(i)}this.isValidSpecProp(t,"compute",r.InfrontUtil.isFunction)?this.compute=t.compute:this.compute||r.InfrontUtil.errorLog("Warning: Creating computed-field without valid compute function.",t)}applyDefaults(t,e){super.applyDefaults(t,e),this.hideComputedFields()}}class hn extends $e{static orderSupportsPrice(t){let e=!0;return t&&(e=this.orderTypesWithoutPrice.indexOf(t)<0),e}static COUNTRY_FLAG(t=16){const e=new be(`COUNTRY_FLAG_${t}`,h.Text);return e.computeFields=[U.COUNTRY_FLAG()],e.compute=(n,i,s)=>Zr.getCountryFlag(i[0],t).outerHTML,e}static COUNTRY_FLAG_16(){return hn.COUNTRY_FLAG(16)}static COUNTRY_FLAG_24(){return hn.COUNTRY_FLAG(24)}static COUNTRY_FLAG_32(){return hn.COUNTRY_FLAG(32)}static COUNTRY_FLAG_48(){return hn.COUNTRY_FLAG(48)}static COUNTRY_FLAG_64(){return hn.COUNTRY_FLAG(64)}static OFF_HIGH(){const t=new be("OFF_HIGH",h.Percent);return t.computeFields=[U.HIGH(),U.LAST()],t.compute=hn.calcPct,t}static OFF_LOW(){const t=new be("OFF_LOW",h.Percent);return t.computeFields=[U.LOW(),U.LAST()],t.compute=(e,n)=>Math.abs(hn.calcPct(e,n)),t}static GAP_PCT(){const t=new be("GAP_PCT",h.Percent);return t.computeFields=[U.PREVIOUS_CLOSE(),U.OPEN()],t.compute=hn.calcPct,t}static OPEN_LAST_CHANGE_PCT(){const t=new be("OPEN_LAST_CHANGE_PCT",h.Percent);return t.computeFields=[U.LAST(),U.OPEN()],t.compute=hn.calcPct,t}static LAST_5_MINS_CHANGE(){const t=new be("LAST_5_MINS_CHANGE",h.Numeric);return t.computeFields=[U.LAST_5_MINS_AGO(),U.LAST()],t.compute=(e,n)=>{if(n[0]&&n[1])return n[0]-n[1]},t}static LAST_5_MINS_CHANGE_PCT(){const t=new be("LAST_5_MINS_CHANGE_PCT",h.Percent);return t.computeFields=[U.LAST_5_MINS_AGO(),U.LAST()],t.compute=hn.calcPct,t}static NET_VOLUME(){const t=new be("NET_VOLUME",h.Integer);return t.shorten=!0,t.computeFields=[ut.BUY_VOLUME(),ut.SELL_VOLUME()],t.compute=(e,n)=>n[0]-n[1],t}static ATR30(){const t=new be("ATR30",h.Numeric);
1return t.computeFields=[p.AVERAGE_TRUE_RANGE()],t.compute=(e,[n])=>n,t}static ADV(){const t=new be("ADV",h.Volume,Yt.Unknown,!0);return t.computeFields=[p.AVERAGE_DAILY_VOLUME()],t.compute=(e,[n])=>n,t}static VOLUME_ADV_PCT(){const t=new be("VOLUME_ADV_PCT",h.Percent);return t.computeFields=[p.ADV_FACTOR_PCT()],t.compute=(e,[n])=>n,t}static MOVING_AVERAGE_CONVERGENCE_DIVERGENCE(){const t=new be("MOVING_AVERAGE_CONVERGENCE_DIVERGENCE",h.Numeric);return t.computeFields=[p.EXPONENTIAL_MOVING_AVERAGE12(),p.EXPONENTIAL_MOVING_AVERAGE26()],t.compute=(e,[n,i])=>n&&i?n-i:null,t}static S_DATETIME(){const t=new be("S_DATETIME",h.DateTime);return t.computeFields=[U.TIME(),$.LAST_TRADE_DATE()],t.compute=(e,n)=>{if(n[0]||n[1]){if(!n[0])return n[1];const i=new Date(n[0]?n[0]:n[1]);if(i&&!isNaN(i.getDate()))return i.getSeconds()+60*i.getMinutes()+3600*i.getHours()+60*i.getTimezoneOffset()!=0?i:n[1]}return null},t}static PCT_SPREAD(){const t=new be("PCT_SPREAD",h.Percent);return t.computeFields=[U.BID(),U.ASK()],t.compute=(e,n)=>null!==n[0]&&null!==n[1]?Math.abs(100*(n[0]-n[1])/n[1]):null,t}static S_MARKET_PRICE(){const t=new be("S_MARKET_PRICE",h.Numeric);return t.computeFields=[U.LAST(),U.BID(),U.ASK(),U.PREVIOUS_CLOSE()],t.shorten=!0,t.compute=(e,n)=>{let i;if(i=n[0]||0,!i){const s=n[1],o=n[2];i=s&&o?(s+o)/2:n[3]||0}return 0===i&&(i=null),i},t}static S_TRADED_VALUE(){const t=new be("S_TRADED_VALUE",h.Integer);return t.computeFields=[We.S_AVG_PRICE(),We.VOLUME_FILLED()],t.shorten=!0,t.compute=(e,n)=>isNaN(n[0])||isNaN(n[1])?null:n[0]*n[1],t}static ComputeShareCapital(t,e,n){if(null!==t&&null!==e){let i=1;return-1!=this.centCurrencies.indexOf(n)&&(i=.01),t*e*i}return null}static Y_SHARE_CAPITAL(){const t=new be("Y_SHARE_CAPITAL",h.Integer);return t.computeFields=[U.PREVIOUS_CLOSE(),U.NUM_SHARES(),ri.CURRENCY()],t.shorten=!0,t.compute=(e,n)=>this.ComputeShareCapital(n[0],n[1],n[2]),t}static SHARE_CAPITAL(){const t=new be("SHARE_CAPITAL",h.Integer);return t.computeFields=[U.LAST(),U.NUM_SHARES(),ri.CURRENCY(),U.PREVIOUS_CLOSE(),U.LAST_VALID()],t.shorten=!0,t.compute=(e,n)=>{let i=n[0];return i||(i=n[3],i||(i=n[4])),this.ComputeShareCapital(i,n[1],n[2])},t}static S_MIXED_DEVIATION(){const t=new be("S_MIXED_DEVIATION",h.Numeric,Yt.OrderAlgo);return t.computeFields=[We.ALGO_ID(),zn.PCTFROMLAST(),zn.TICKSFROMLAST()],t.compute=(e,n)=>"InfrontCondor_TrailTick"===n[0]?r.InfrontUtil.formatNumber(n[2],2):"InfrontCondor_TrailPct"===n[0]?r.InfrontUtil.formatPercent(n[1]):"",t}static S_POS_LAST(){const t=new be("S_POS_LAST",h.Numeric);return t.computeFields=[Jt.MARKET_PRICE(),U.LAST_VALID()],t.compute=(e,n)=>r.InfrontUtil.isNumber(n[1])?n[1]:n[0],t}static S_COLLATERAL(){const t=new be("S_COLLATERAL",h.Integer);return t.computeFields=[Jt.COLLATERAL(),new Mt("LOAN_TO_VALUE_RATIO",r.Infront.TradingTag.LoanToValueRatio,h.Text),new Mt("MARKET_VALUE",null,h.Text)],t.compute=(e,n)=>"number"==typeof n[1]&&"number"==typeof n[2]?n[1]*n[2]:"number"==typeof n[0]?n[0]:null,t}static S_VALID_UNTIL(){const t=new be("S_VALID_UNTIL",h.Text);return t.computeFields=[We.VALID_UNTIL(),We.CUSTOM_DATE_FIELDS(),We.CUSTOM_TAGS()],t.compute=(e,[n,i,s],o)=>{var l;let u=null;if(i&&s){let d;for(const g in s)if((null===(l=s[g])||void 0===l?void 0:l.value)===i){d=s[g];break}u=d?.label}if(!u&&n)try{u=r.InfrontUtil.formatDate(new Date(n))}catch{r.InfrontUtil.errorLog(`Unable to parse validity date ${n}`)}return u},t}static S_TRIGGER_PRICE(){const t=new be("S_TRIGGER_PRICE",h.Numeric);return t.computeFields=[We.CUSTOM_TAGS(),zn.TRIGGERPX(),zn.TRIGGERATPX()],t.compute=(e,n)=>{const i=n[0];if(i)for(const[s,o]of Object.entries(i))if(o.id===Re.TRIGGER_PRICE)return o.label;for(let s=1;s<n.length;s++)if(n[s]){const o=(""+n[s]).split("=");return 2===o.length&&"xs:99"===o[0].toLowerCase()?r.InfrontUtil.isNumeric(o[1])?Number(o[1]):o[1]||null:r.InfrontUtil.isNumeric(n[s])?Number(n[s]):n[s]}return null},t}static RANGE(){const t=new be("RANGE",h.Numeric);return t.computeFields=[Ut.HIGH(),Ut.LOW()],t.compute=(e,n)=>isNaN(n[0])||isNaN(n[1])?null:n[0]-n[1],t}static B_CLIENT_SPOT(){const t=new be("B_CLIENT_SPOT",h.Numeric);return t.computeFields=[We.CLIENT_SPOT()],t.compute=(e,n)=>{for(let i=0;i<n.length;i++)if(n[i]){const s=(""+n[i]).split("=");return 2===s.length&&"xs:99"===s[0].toLowerCase()?s[1]||"":n[i]}return null},t}static S_FORWARD_PRICE(){const t=new be("S_FORWARD_PRICE",h.Numeric);return t.computeFields=[We.FORWARD_PRICE()],t.compute=(e,n)=>{for(let i=0;i<n.length;i++)if(n[i]){const s=(""+n[i]).split("=");return 2===s.length&&"xs:5008"===s[0].toLowerCase()?s[1]||"":n[i]}return null},t}static B_LOAN_TRANS_ACC(){const t=new be("B_LOAN_TRANS_ACC",h.Text);return t.computeFields=[We.LOAN_TRANS_ACC()],t.compute=(e,n)=>{for(let i=0;i<n.length;i++)if(n[i]){const s=(""+n[i]).split("=");return 2===s.length&&"xs:99"===s[0].toLowerCase()?s[1]||"":n[i]}return null},t}static B_FORWARD_DATE(){const t=new be("B_FORWARD_DATE",h.Text);return t.computeFields=[We.FORWARD_DATE()],t.compute=(e,n)=>{for(let i=0;i<n.length;i++)if(n[i]){const s=(""+n[i]).split("=");return 2===s.length&&"xs:64"===s[0].toLowerCase()?s[1]||"":n[i]}return null},t}static B_DISC_PREMIUM(){const t=new be("B_DISC_PREMIUM",h.Numeric);return t.computeFields=[We.DISC_PREMIUM(),zn.TRIGGERPX(),zn.TRIGGERATPX()],t.compute=(e,n)=>{for(let i=0;i<n.length;i++)if(n[i]){const s=(""+n[i]).split("=");return 2===s.length&&"xs:5007"===s[0].toLowerCase()?s[1]||"":n[i]}return null},t}static calcPct(t,e){return e[1]&&e[0]?(e[0]-e[1])/e[0]*100:null}}hn.orderTypesWithoutPrice=r.Infront.OrderType.QUOTE_ORDER+r.Infront.OrderType.MARKET+r.Infront.OrderType.AT_MARKET+r.Infront.OrderType.BEST_POSSIBLE+r.Infront.OrderType.AT_MARKET_AND_KILL+r.Infront.OrderType.MARKET_TO_LIMIT+r.Infront.OrderType.STOP_LOSS+r.Infront.OrderType.BEST_TO_LIMIT+r.Infront.OrderType.STRATEGY+r.Infront.OrderType.MARKET_FOK+r.Infront.OrderType.MARKET_FAK,hn.centCurrencies=["GBX","USX","ZAC"];class ea extends me{constructor(t,e,n=h.Text,i=!1,s=!1){super(t,r.Infront.TagSet.Realtime,e,n,i,s),this.type=Le.Custom}applySpec(t){super.applySpec(t),this.isValidSpecProp(t,"content",e=>(0,O.a)(e)||r.InfrontUtil.isFunction(e))?this.content=t.content:r.InfrontUtil.errorLog("Warning: Creating custom-field without valid content.",t)}}class na{static createArrowSpec(t){const e="ARROW_"+r.Infront.tagToStr(r.Infront.TagSet.Realtime,t).toUpperCase(),n=new ea(e,t,h.IndicatorArrow);return n.className=O.C.kUpdateNone,n.content=new bi.xo('<span class="cell-table__arrow-indicator"></span>'),n}static ARROW_BID(){return this.createArrowSpec(r.Infront.RealtimeTags.Bid)}static ARROW_ASK(){return this.createArrowSpec(r.Infront.RealtimeTags.Ask)}static ARROW_LAST(){return this.createArrowSpec(r.Infront.RealtimeTags.Last)}}class _o extends me{constructor(t,e,n=h.Text,i=!1,s=!1){super(t,r.Infront.TagSet.Realtime,e,n,i,s),this.type=Le.Converted}applySpec(t){super.applySpec(t),this.specToProp(t,"sourceField",ke.isValidSpec,!0),this.specToProp(t,"currency",r.InfrontUtil.isString),this.sourceField||r.InfrontUtil.errorLog("Warning: Creating converted-field without valid source.",t),this.currency||r.InfrontUtil.errorLog("Warning: Creating converted-field without valid currency.",t)}}class ke{static getFieldInfoFromSpec(t,e){const n={heading:"",fieldName:"",headingHover:""};let i;if(t instanceof me)return i=t,n.fieldName=i.name,n.heading=i.heading,n.headingHover=i.headingHover,n;let s="";r.InfrontUtil.isString(t)?s=t:r.InfrontUtil.isObject(t)&&Object.hasOwn(t,"name")&&(s=t.name),s=s.toUpperCase();const o=[Yt.Unknown];return i=ke.fieldFromNameAndType(s,o,Le.Normal),!i&&o.length>0&&!o[0]&&(i=new ea(s,s)),i&&(i.applySpecAndDefaults(t,e),n.fieldName=i.name,n.heading=i.heading,n.headingHover=i.headingHover),n}static createFieldFromSpec(t,e,n=[Yt.Unknown]){let i;if(t instanceof me)i=t;else{let s="";r.InfrontUtil.isString(t)?s=t:r.InfrontUtil.isObject(t)&&Object.hasOwn(t,"name")&&(s=t.name),s=s.toUpperCase();const o=r.InfrontUtil.isObject(t)&&Object.hasOwn(t,"type")?t.type:"";let l=Le.Normal;""!==o&&(o===ke.kCustomType||o===Le.Custom?l=Le.Custom:o===ke.kConvertedType||o===Le.Converted?l=Le.Converted:o!==ke.kComputedType&&o!==Le.Computed||(l=Le.Computed)),i=ke.fieldFromNameAndType(s,n,l),!i&&n.length>0&&!n[0]&&(i=new ea(s,s))}return i?(i.applySpecAndDefaults(t,e),i):null}static createFieldsFromNames(t,e=[Yt.Unknown],n){const i=[];for(const s of t){let o=null;for(let l=0;l<e.length&&!o;l++)o=ke.fieldFromSource(s,e[l]);o&&n instanceof Aa.L&&(o.languageHandler=n),i.push(o)}return i}static isValidSpec(t){return r.InfrontUtil.isString(t)||r.InfrontUtil.isObject(t)&&(Object.hasOwn(t,"name")||Object.hasOwn(t,"type")&&t.type===ke.kCustomType)}static isValidFooter(t){return r.InfrontUtil.isString(t)||r.InfrontUtil.isObject(t)&&Object.hasOwn(t,"type")&&t.type===ke.kComputedType}static getSubscriptionFieldsArray(t){const e=[];
1if(t)for(const n of t){const i=n.getSubscriptionFieldNames();for(const s of i)-1===e.indexOf(s)&&e.push(s)}return e}static fieldFromName(t){return"-"===t.charAt(0)&&(t=t.substr(1)),Object.hasOwn(U,t)?U[t]():Object.hasOwn(hn,t)?hn[t]():Object.hasOwn(ut,t)?ut[t]():Object.hasOwn(Ut,t)?Ut[t]():Object.hasOwn($,t)?$[t]():Object.hasOwn(ri,t)?ri[t]():Object.hasOwn(Jt,t)?Jt[t]():Object.hasOwn(We,t)?We[t]():Object.hasOwn(zn,t)?zn[t]():Object.hasOwn(Ui,t)?Ui[t]():Object.hasOwn(Hn,t)?Hn[t]():Object.hasOwn(Mn,t)&&r.InfrontUtil.isFunction(Mn[t])?Mn[t]():Object.hasOwn(na,t)?na[t]():Object.hasOwn(p,t)?p[t]():Object.hasOwn(Xn,t)?Xn[t]():Object.hasOwn(nr,t)?nr[t]():Object.hasOwn(ta,t)?ta[t]():Object.hasOwn(en,t)?en[t]():Object.hasOwn(X,t)?X[t]():Object.hasOwn(Q,t)?Q[t]():null}static fieldFromSource(t,e){switch(e){case Yt.Unknown:return ke.fieldFromName(t);case Yt.Instrument:return ri.getField(t);case Yt.Snapshot:return U.getField(t);case Yt.Historical:return $.getField(t);case Yt.Brokerstats:return ut.getField(t);case Yt.IntradayTrades:return Ut.getField(t);case Yt.Position:return Jt.getField(t);case Yt.Order:return We.getField(t);case Yt.OrderAlgo:return zn.getField(t);case Yt.Trade:return Ui.getField(t);case Yt.Fund:return Hn.getField(t);case Yt.Portfolio:return Mn.getField(t);case Yt.Market:return ft.getField(t);case Yt.TopEntities:return Xn.getField(t);case Yt.SmeFundamental:return nr.getField(t);case Yt.AdditionalData:return ta.getField(t);case Yt.CompanyMetadata:return X.getField(t);case Yt.SDK:return Q.getField(t);case Yt.Forex:return en.getField(t);default:return null}}static fieldFromNameAndType(t,e,n){"-"===t.charAt(0)&&(t=t.substr(1));let i=null;for(let s=0;s<e.length&&!i;s++)switch(n){case Le.Normal:i=ke.fieldFromSource(t,e[s]);break;case Le.Computed:i=hn.getField(t)||new be(t,h.Numeric,e[s]);break;case Le.Custom:i=new ea(t,t);break;case Le.Converted:i=new _o(t,t);break;default:i=null}if(!i){const s=t.substring(0,t.lastIndexOf("_")),o=t.substring(t.lastIndexOf("_")+1);2===o?.length&&(i=ke.fieldFromNameAndType(s,e,n)),i&&i instanceof me&&(i.setTag(r.InfrontUtil.fixLocaleTag(i.getTagName(),o)),i.locale=o,i.processedLocale=!0)}return i}}ke.kCustomType="custom",ke.kComputedType="computed",ke.kConvertedType="converted";const hi=a=>(t=>{const e={};return t?.forEach(n=>{null!=n&&(e[n]=n)}),e})(Object.getOwnPropertyNames(a).filter(t=>t.toUpperCase()===t));var ns;Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},hi(ri)),hi(U)),hi(hn)),hi($)),hi(p)),hi(na)),hi(Hn)),hi(X)),hi(Q)),hi(nr)),function(a){a.Instrument="Instrument",a.Snapshot="Snapshot",a.Computed="Computed",a.Historical="Historical",a.CalculatedHistory="CalculatedHistory",a.Custom="Custom",a.Fund="Fund",a.SMEFundamental="SMEFundamental"}(ns||(ns={}));class is{constructor(t,e,n=Ze.Neutral){this.clearCallback=()=>{},this.boundEl=t,this.blinkType=n,this.duration=e,this.initialized=!1,this.lastValue=null,this.upClassName=O.C.kUpdateUp,this.downClassName=O.C.kUpdateDown,this.neutralClassName=O.C.kUpdateNeutral,this.upFlashClassName=O.C.kUpdateFlashUp,this.downFlashClassName=O.C.kUpdateFlashDown}valueUpdated(t){if(this.initialized){this.hasUpdated||(r.InfrontUtil.removeClassName(this.boundEl,O.C.kUpdateNone),this.hasUpdated=!0),clearTimeout(this.timeoutHandle),this.clearCallback();let e=null;if(this.blinkType==Ze.Neutral)e=this.neutralClassName;else if(this.blinkType==Ze.UpDown&&"number"==typeof t)e=t==this.lastValue?void 0:t>this.lastValue?this.upClassName:this.downClassName;else if(this.blinkType==Ze.UpDownSame&&"number"==typeof t)e=t==this.lastValue?this.neutralClassName:t>this.lastValue?this.upClassName:this.downClassName;else if(this.blinkType==Ze.UpDownFlash&&"number"==typeof t)e=t==this.lastValue?this.neutralClassName:t>this.lastValue?this.upFlashClassName:this.downFlashClassName;else if(this.blinkType==Ze.Percent){this.duration=0;const n=t/2;r.InfrontUtil.addInlineStyle(this.boundEl,t>=100?"background:linear-gradient(90deg, rgba(59, 231, 103, 0.4) "+n+"%, transparent "+n+"%);":"background:linear-gradient(90deg, rgba(255, 90, 90, 0.4) "+n+"%, transparent "+n+"%);")}e&&(r.InfrontUtil.addClassName(this.boundEl,e),this.clearCallback=()=>{r.InfrontUtil.removeClassName(this.boundEl,e)},this.duration&&(this.timeoutHandle=setTimeout(this.clearCallback,this.duration)))}this.lastValue=t,this.initialized=!0}}
1class ba extends Fn.f{constructor(){super(...arguments),this.rootElement="div",this.currencyField="currency"}}class rs extends Fn.S{constructor(t,e,n){var i,s,o,l,u;super(t,e,"valueWidget",n),this.rowId=null,this.valueUnbinds=[],this.languageHandler=e.languageHandler,this.column=this.options.column?this.options.column instanceof me?this.options.column:ke.createFieldFromSpec(this.options.column,this.languageHandler):ke.createFieldFromSpec(this.options,this.languageHandler),r.Infront.additionalDataFieldKind(this.column.getFieldTag())&&(this.contentEnum|=r.Infront.SymbolContentEnum.AdditionalData);for(const d of this.column.getSubscriptionFieldNames())if(d===r.Infront.QuoteFields.FUND_DATA_DETAILS||d===r.Infront.QuoteFields.FUND_DETAILS)this.contentEnum|=r.Infront.SymbolContentEnum.FundDetails|r.Infront.SymbolContentEnum.FundDataDetails;else if(r.Infront.HistPerformanceTag(d))this.contentEnum|=r.Infront.SymbolContentEnum.HistPerformance;else if(r.Infront.isCalculatedHistoryField(d)){this.contentEnum|=r.Infront.SymbolContentEnum.CalculatedHist;const g=r.Infront.fieldToTag(d);if(g){const{type:I,period:C}=r.Infront.CalculatedHistoryManager.tagToType[g];I&&(this.contentExtras[I+"|"+C]=!0)}}if(null!=(null===(i=this.options)||void 0===i?void 0:i.blinkDuration)&&(this.column.blinkDuration=null===(s=this.options)||void 0===s?void 0:s.blinkDuration),null!=(null===(o=this.options)||void 0===o?void 0:o.blinkType)&&(this.column.blinkType=null===(l=this.options)||void 0===l?void 0:l.blinkType),this.column&&this.decimals.set(this.column.decimals),this.value=new r.Infront.Value,this.dataItem=this.options.dataItem,this.dataItem&&this.column&&!(this.column.source in[Yt.Instrument,Yt.Snapshot,Yt.Historical,Yt.Market])){const d=this.tagConverter?this.tagConverter(this.options.dataItem,this.column):this.column.getFieldTag();this.baseValue=r.InfrontUtil.isNumber(d)?this.dataItem.getValueItem(d,!0):this.dataItem.getComputedValueItem(d,!0)}this.valueBinding=r.Infront.BindingFactory.createInlineBinding(d=>{d&&this.column.locale&&(d=r.InfrontUtil.localizedValue(d,this.column.locale)),this.value.set(d),null!=d&&this.setHasContent(!r.InfrontUtil.isEmptyValue(d,this.options.allowZero),d)}),null===(u=this.baseValue)||void 0===u||u.observe(this.valueBinding,r.Infront.InitialUpdate.Always),this.subscribes.addFields(this.column.getSubscriptionFieldNames())}returnDefaultWidgetOptions(){return new ba}assignValue(t){var e;null===(e=this.baseValue)||void 0===e||e.unbind(this.valueBinding),this.baseValue=t,t&&this.baseValue.observe(this.valueBinding,r.Infront.InitialUpdate.Always)}onetimeBind(t){this.value.onetimeBind(t)}onSymbolCreated(t){this.dataItem=t}newInit(){super.newInit()}updateComputedValue(t,e){const n=t?.getComputedValueItem(e.name,!0);if(!n?.NoReferences())return;const i=e.computeFields.map(s=>{const o=this.dataItemConverter?this.dataItemConverter(t,s):t,l=this.tagConverter?this.tagConverter(o,s):s.getFieldTag();return t.getValueItem(l,!0)});n.UpdateReferences(i,s=>e.compute(t.getKey(),s,t.getInstrument()))}newBuildUI(){var t,e;this.rootEl=document.createElement(this.options.rootElement),this.column.className&&r.InfrontUtil.addClassName(this.rootEl,this.column.className),this.column.specificClass&&r.InfrontUtil.addClassName(this.rootEl,this.column.specificClass),r.InfrontUtil.addClassName(this.rootEl,"cell-w-single-value cell-w-single-value--value"),null!=this.column.onClick&&null!=this.options.instrument&&this.addEventListener(this.rootEl,"click",i=>{i.stopPropagation(),this.column.onClick(this.rowId,this.dataItem,{target:this.rootEl,instrument:this.options.instrument})});const n=be.isComputedField(this.column);if(this.column.hover&&this.dataItem){const i=this.column.hover;if(null!=i&&i.type===Le.Normal){const s=this.dataItemConverter?this.dataItemConverter(this.dataItem,i):this.dataItem,o=this.tagConverter?this.tagConverter(s,i):i.getFieldTag();if(o){const l=i.createValueBinding(this.rowId,this.rootEl,"title",this.decimals);s&&this.valueUnbinds.push(s.bind(o,l))}}}if(this.column.type===Le.Custom)(0,O.i)(this.infrontUI,this.rootEl,"function"==typeof this.column.content?this.column.content(this.rowId,this.options.instrument,this.rootEl,this.decimals,i=>this.valueUnbinds.push(i)):this.column.content||"");else if(n){this.updateComputedValue(this.dataItem,this.column);const i=this.column.getTagName(),s=this.column.createValueBinding(this.rowId,this.rootEl,"innerHTML",this.decimals,!0===this.column.allowZero);this.valueUnbinds.push(null===(t=this.dataItem)||void 0===t?void 0:t.advancedBind(i,this.column.subId,s)),this.valueUnbinds.push(null===(e=this.dataItem)||void 0===e?void 0:e.b
1ind(i,r.InfrontUtil.BindingFactory.createInlineBinding(o=>this.setHasContent(!!o,o))))}else{const i=this.column.createValueBinding(this.rowId,this.rootEl,"innerHTML",this.decimals,this.options.allowZero);if(this.valueUnbinds.push(this.value.bind(i)),this.column.blinkType!==Ze.None){const s=new is(this.rootEl,this.column.blinkDuration,this.column.blinkType);this.valueUnbinds.push(this.value.bind(s))}if(this.options.enableChangeStatusColors){const s=new r.Infront.ClassBinding(this.rootEl,O.C.kStatusPositive,u=>parseFloat(u)>0);this.valueUnbinds.push(this.value.bind(s));const o=new r.Infront.ClassBinding(this.rootEl,O.C.kStatusNeutral,u=>0===parseFloat(u));this.valueUnbinds.push(this.value.bind(o));const l=new r.Infront.ClassBinding(this.rootEl,O.C.kStatusNegative,u=>parseFloat(u)<0);this.valueUnbinds.push(this.value.bind(l))}}if(this.options.showCurrency&&this.currencyValue){const i=this.currencyValue,s=document.createElement(this.options.rootElement);this.options.currencyClassName&&r.InfrontUtil.addClassName(s,this.options.currencyClassName),r.InfrontUtil.addClassName(s,"cell-w-single-value cell-w-single-value--currency");const o=new r.Infront.ClassBinding(s,"cell-5-padding-right",u=>null!=u);i.observe(o),this.valueUnbinds.push(()=>{i.unbind(o)});const l=r.InfrontUtil.BindingFactory.createValueBinding(s,"textContent");i.observe(l),this.valueUnbinds.push(()=>{i.unbind(l)}),this.element.appendChild(s)}this.element.appendChild(this.rootEl),super.newBuildUI()}unbindValues(){var t;this.valueUnbinds.forEach(e=>{e?.()}),this.valueUnbinds=[],null===(t=this.baseValue)||void 0===t||t.unbind(this.valueBinding)}newDestroyUI(){super.newDestroyUI()}finalize(){this.unbindValues(),super.finalize()}}class as extends ba{constructor(){super(...arguments),this.name="LAST"}}class Oo extends rs{constructor(t,e,n){super(t,e,n),this.rowId=this.options.instrument}returnDefaultWidgetOptions(){return new as}onSymbolCreated(t){var e;if(super.onSymbolCreated(t),t){this.rowId=this.options.instrument;const n=this.column.getFieldTag(),i=r.InfrontUtil.isString(n)?t.getComputedValueItem(n,!0):t.getValueItem(n,!0);null!==(e=this.options.column)&&void 0!==e&&e.targetCurrency?t.asyncGetValue(r.Infront.RealtimeTags.Currency,s=>{const o=r.Infront.Value.getConvertedValue(i,s,this.column.targetCurrency,this.infront);this.assignValue(o)}):this.assignValue(i)}}}var ia=qe(76766);let bo=(()=>{class a{constructor(e,n,i){this.searchResultsCache={},this.singleSearchResultsCache={},this.onFocusIn=s=>{const o=this.searchBoxInputField.value,l=this.base64.encode(o);o?this.hasValidCacheEntry(this.searchResultsCache,l)?this.options.onSearchResultCallback(this.searchResultsCache[l].searchResults,o,bn.CACHE):this.search():this.options.onSearchResultCallback(void 0,void 0,bn.STORAGE)},this.onFocusOut=s=>{this.searchBoxInputField.value||this.options.onSearchResultCallback(void 0,void 0,bn.INITIAL)},this.onInput=s=>{const o=this.searchBoxInputField.value,l=this.base64.encode(o);if(this.hasValidCacheEntry(this.searchResultsCache,l))return this.tryTimeoutReset(),void this.options.onSearchResultCallback(this.searchResultsCache[l].searchResults,o,bn.CACHE);this.searchDebounce&&clearTimeout(this.searchDebounce),this.searchDebounce=setTimeout(()=>{this.search()},this.options.requestDebounceMs)},this.onKeyDownEnter=s=>{"Enter"!==s.key&&13!==s.keyCode||!this.searchDebounce||this.search()},this.onReset=s=>{this.searchBoxInputField.value="",this.options.onSearchResultCallback(void 0,void 0,bn.STORAGE)},this.element=e,this.ui=n,this.language=n.languageHandler,this.sdk=n.sdk,this.storage=n.getStorage(),this.options=i,this.init()}init(){this.base64=new r.InfrontUtil.Base64,this.searchBoxInputFieldEventListeners={input:this.onInput,focusin:this.onFocusIn,focusout:this.onFocusOut,keydown:this.onKeyDownEnter},this.resetButtonEventListeners={click:this.onReset},this.createSearchInputField(),this.options.hasResetButton&&this.createResetButton()}createSearchInputField(){this.searchBoxInputField=document.createElement("input"),this.searchBoxInputField.type="text",this.searchBoxInputField.className="
1cell-input cell-sdk-search-box";const e=i=>{this.searchBoxInputField.placeholder=this.language.get(a.kLanguageKey,i)},n=this.options.searchRequestOptions.searchType;r.InfrontUtil.objectHasSingleTruthyProperty(n,"symbol")?e("symbol"):r.InfrontUtil.objectHasSingleTruthyProperty(n,"market")?e("market"):r.InfrontUtil.objectHasSingleTruthyProperty(n,"news")?e("news"):e("all"),Object.entries(this.searchBoxInputFieldEventListeners).forEach(i=>{this.searchBoxInputField.addEventListener(i[0],i[1])}),this.element.appendChild(this.searchBoxInputField)}createResetButton(){this.resetButton=document.createElement("button"),Object.entries(this.resetButtonEventListeners).forEach(e=>{this.resetButton.addEventListener(e[0],e[1])}),this.element.appendChild(this.resetButton)}search(){var e;const n=this.searchBoxInputField.value,i=this.base64.encode(n);this.tryTimeoutReset(),n?this.hasValidCacheEntry(this.searchResultsCache,i)?this.options.onSearchResultCallback(this.searchResultsCache[i].searchResults,n,bn.CACHE):(this.unsubscribe&&(null===(e=this.unsubscribe)||void 0===e||e.call(this),this.unsubscribe=null),this.startSearchRequest(n).then(s=>{var o;null===(o=this.unsubscribe)||void 0===o||o.call(this),this.unsubscribe=null,this.searchResultsCache[i]={searchResults:s,timestamp:new Date},this.searchBoxInputField.value===n&&this.options.onSearchResultCallback(this.searchResultsCache[i].searchResults,n,bn.DATA)}).catch(s=>{console.error(s)})):this.options.onSearchResultCallback(void 0,void 0,bn.STORAGE)}startSearchRequest(e){return new Promise((n,i)=>{let s;const o=Object.assign(Object.assign(Object.assign({},br),this.options.searchRequestOptions),{parameters:"object"==typeof this.options.searchRequestOptions.parameters?Object.assign(Object.assign({},this.options.searchRequestOptions.parameters),{SearchFreeText:e}):this.options.searchRequestOptions.parameters,onData:l=>{s=l},onStatus:(l,u,d)=>{u===r.InfrontSDK.RequestStatus.Done&&n(s)},onError:l=>{l.type===r.InfrontSDK.ErrorType.System&&(8e3===l.parameters.code?r.InfrontUtil.errorLog("SDKSearchBox startSearchRequest(), error:",l):i())}});this.unsubscribe=this.sdk.get(r.InfrontSDK.symbolSearch(o))})}getSingleItemBySearchRequest(e,n){return new Promise((i,s)=>{let o,l;switch(e){case r.InfrontSDK.SearchType.Symbol:o=`${n.Ticker}~${n.Feed}`;break;case r.InfrontSDK.SearchType.Market:o=`${n.Feed}`}this.hasValidCacheEntry(this.singleSearchResultsCache,o)&&i(r.InfrontUtil.deepCopyObservableArray(this.singleSearchResultsCache[o].searchResults));const u=Object.assign(Object.assign(Object.assign({},br),this.options.searchRequestOptions),{limit:1,parameters:n,onData:d=>{l=d},onStatus:(d,g,I)=>{g===r.InfrontSDK.RequestStatus.Done&&(this.buildSingleSearchRequestCacheEntry(l,o),i(r.InfrontUtil.deepCopyObservableArray(l)))},onError:d=>{d.type===r.InfrontSDK.ErrorType.System&&(8e3===d.parameters.code?r.InfrontUtil.errorLog("SDKSearchBox startSearchRequest(), error:",d):s())}});this.sdk.get(r.InfrontSDK.symbolSearch(u))()})}buildSingleSearchRequestCacheEntry(e,n){var i;const s=null===(i=e?.get())||void 0===i?void 0:i[0];if(s){if(!n){const o=s.get(r.InfrontSDK.SearchResultField.Ticker),l=s.get(r.InfrontSDK.SearchResultField.Feed);if(o&&null!=l)n=`${o}~${l}`;else{if(null==l)return;n=l.toString()}}this.singleSearchResultsCache[n]={searchResults:r.InfrontUtil.deepCopyObservableArray(e),timestamp:new Date}}}hasValidCacheEntry(e,n,i=!0){var s;return!(!this.options.cacheOptions.enabled||!n)&&!!(e[n=i?n:this.base64.encode(n)]&&(null===(s=e[n])||void 0===s?void 0:s.timestamp)instanceof Date)&&(new Date).getTime()-e[n].timestamp.getTime()<this.options.cacheOptions.expirationTime}tryTimeoutReset(){this.searchDebounce&&(clearTimeout(this.searchDebounce),this.searchDebounce=null)}getSearchInputField(){return this.searchBoxInputField}destroy(){var e,n,i;null===(e=this.unsubscribe)||void 0===e||e.call(this),Object.entries(null!==(n=this.searchBoxInputFieldEventListeners)&&void 0!==n?n:[]).forEach(s=>{var o;null===(o=this.searchBoxInputField)||void 0===o||o.removeEventListener(s[0],s[1])}),Object.entries(null!==(i=this.resetButtonEventListeners)&&void 0!==i?i:[]).forEac
1h(s=>{var o;null===(o=this.resetButton)||void 0===o||o.removeEventListener(s[0],s[1])}),this.element&&r.InfrontUtil.removeAllChildNodes(this.element)}}return a.kLanguageKey="sdkSearchBox",a})();class ss{static getFormatDigits(t){if(null==t)return 0;let e=0;const n=""+t,i=n.indexOf(".");return i>-1&&n.length&&(e=n.length-i-1),e}}var Xt;!function(a){a.OHLC="ohlcData",a.LAST="lastData",a.BID="bidData",a.ASK="askData",a.MID="midData",a.VOLUME="volumeData",a.TURNOVER="turnoverData",a.SPLIT="splitData",a.DIVIDEND="dividendData",a.CALENDAR="calendarData"}(Xt||(Xt={}));const os=[r.InfrontSDK.SymbolClassification.Bond,r.InfrontSDK.SymbolClassification.Certificate,r.InfrontSDK.SymbolClassification.Derivative];var sn,Cn,Wn,Gn,on;!function(a){a.INITIALIZED="initialized",a.CHART_WILL_CHANGE="chart-will-change",a.DATA_WILL_CHANGE="data-will-change",a.DATA_LOADING="data-loading",a.DATA_LOADED="data-loaded",a.AFTER_CREATE_CHART="after-create-chart"}(sn||(sn={}));class Jn{constructor(){this.hasData={},this.companyEventDataTypes=[Xt.SPLIT,Xt.DIVIDEND,Xt.CALENDAR],this.availableChartDataTypes=[...Jn.timeSeriesDataTypes,...this.companyEventDataTypes],this.availableChartDataTypes.forEach(t=>{this[t]=[],this.hasData[t]=null}),this.status=sn.INITIALIZED}get(){return this}getChartData(t){var e;return null!==(e=this.availableChartDataTypes)&&void 0!==e&&e.includes(t)?this[t]:null}getChartDataLength(t){var e;return null!==(e=this.availableChartDataTypes)&&void 0!==e&&e.includes(t)?this[t].length:0}getChartDataPointValKey(t,e){if(t===Xt.OHLC&&[Gt.OPEN,Gt.HIGH,Gt.LOW].includes(e))return e}getChartDataType(t,e){const n=t?.getInstrumentSettings();if(!n)return null;const i=this.getDataType(t,e),s=t.isOhlcInstrument();if(i!==Gt.CLOSE)if(this.canUseChartData(i,n.chartType,s))switch(i){case Gt.BID:return Xt.BID;case Gt.ASK:return Xt.ASK;case Gt.MID:return Xt.MID}else n.dataType=Gt.CLOSE;return null==s?null:s?Xt.OHLC:Xt.LAST}getDataType(t,e,n){const i=t?.getInstrumentSettings();return(n=n??i?.dataType)===Gt.AUTO?this.isDataTypeFocusLine(t,e)?Gt.BID:Gt.CLOSE:n??Gt.CLOSE}isDataTypeFocusLine(t,e){const n=t?.getSymbolData(r.InfrontSDK.SymbolField.SymbolClassification);return!0===e?.isIntraday&&os.includes(n)&&this.hasData[Xt.BID]}canUseChartData(t,e,n){return!(![wt.AREA,wt.LINE,wt.BASELINE].includes(e)&&![Gt.CLOSE].includes(t)||!n&&[Gt.OPEN,Gt.HIGH,Gt.LOW].includes(t)||!this.hasData[Xt.BID]&&[Gt.BID,Gt.BID_ASK].includes(t)||!this.hasData[Xt.ASK]&&[Gt.ASK,Gt.BID_ASK].includes(t)||!this.hasData[Xt.MID]&&[Gt.MID].includes(t))}canUseChartType(t,e,n){return!(!n&&[...Me,wt.OHLC].includes(t)||[Gt.BID,Gt.ASK,Gt.MID].includes(e)&&[...Me,wt.OHLC,wt.BASELINE].includes(t))}setChartData(t,e,n,i){var s;this.setChartDataFromTimeSeries(n),this.status=sn.DATA_LOADED,null!=n&&null!==(s=t?.getGlobalChartSettings())&&void 0!==s&&s.caching&&t.getChartCache().storeChartDataForInstrument(e,i)}setChartDataFromCache(t){var e;null===(e=Object.keys(t))||void 0===e||e.forEach(n=>{var i,s,o;this[n]=r.InfrontUtil.deepCopy(null!==(s=null===(i=t[n])||void 0===i?void 0:i.data)&&void 0!==s?s:[]),this.hasData[n]=!1,null===(o=this[n])||void 0===o||o.forEach(l=>{this.setHasData(n,l)})})}setChartDataFromCustomData(t,e){const n=t?.[e];null!=n&&this.availableChartDataTypes.forEach(i=>{var s;this[i]=[],this.hasData[i]=!1,null!==(s=n[i])&&void 0!==s&&s.length&&(this[i]=n[i],this.hasData[i]=!0)})}setChartDataFromTimeSeries(t){Jn.timeSeriesDataTypes.forEach(e=>{this[e]=[],this.hasData[e]=!1}),r.Infront.DEBUG_WIDGET_CHART_NG&&(r.Infront.log("[Data/Data] tsdata",t?.length),console.time("[Data/Data] timing setChartDataFromTimeSeries")),t?.forEach(e=>{const n=this.getEpocheTimeFromString(this.getDateTimeStringFromTimeseriesItem(e));n&&Jn.timeSeriesDataTypes.forEach(i=>{if(this[i]){const s=this.getChartDataItemFromTimeSeriesItem(e,i,n);-1===s.findIndex(o=>null==o||Number.isNaN(o))?(this.setHasData(i,s),this[i].push(s)):r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&[Xt.OHLC,Xt.LAST,Xt.VOLUME,Xt.TURNOVER].includes(i)&&r.InfrontUtil.errorLog(`ChartData (setChartDataFromTimeSeries) skipped invalid data item for "${i}": [${s}]`)}})}),r.Infront.DEBUG_WIDGET_CHART_NG&&console.timeEnd("[Data/Data] timing setChartDataFromTimeSeries"),Jn.timeSeriesDataTypes.forEac
1h(e=>this.sortChartData(this[e]))}setHasData(t,e){this.hasData[t]||(this.hasData[t]=t===Xt.OHLC?null!=e[1]||null!=e[2]||null!=e[3]:!!e[1])}sortChartData(t){t?.length&&t.sort((e,n)=>e[0]-n[0])}setSplitData(t){var e;this.hasData[Xt.SPLIT]=!1,null!==(e=t?.splits)&&void 0!==e&&e.length&&(this.splitData=t.splits.map(n=>{const i=this.getEpocheTimeFromString(this.getDateTimeStringFromTimeseriesItem({date:n.date,time:null}));return{x:i,text:`<strong> ${r.InfrontUtil.formatDate(new Date(i))} </strong><br/><strong>Factor</strong> ${r.InfrontUtil.formatNumber(n.factor,ss.getFormatDigits(n.factor))}`}}),this.hasData[Xt.SPLIT]=!!this.splitData.length)}setDividendData(t){var e;this.hasData[Xt.DIVIDEND]=!1,null!==(e=t?.dividends)&&void 0!==e&&e.length&&(this.dividendData=t.dividends.map(n=>{const i=this.getEpocheTimeFromString(this.getDateTimeStringFromTimeseriesItem({date:n.date,time:null}));return{x:i,text:`<strong> ${r.InfrontUtil.formatDate(new Date(i))} </strong><br/><strong>Dividend</strong> ${r.InfrontUtil.formatNumber(n.amount,ss.getFormatDigits(n.amount))} ${n.currency}`,dividend:n.amount}}),this.hasData[Xt.DIVIDEND]=!!this.dividendData.length)}setCalendarEventData(t){this.hasData[Xt.CALENDAR]=!1,t?.length&&(this.calendarData=t.map(e=>({x:this.getEpocheTimeFromString(this.getDateTimeStringFromTimeseriesItem({date:e.dateTime,time:null})),text:e.description,feed:e.feed,id:e.id})),this.combineCalendarEventDataSameDay(),this.hasData[Xt.CALENDAR]=!!this.calendarData.length)}combineCalendarEventDataSameDay(){const t=this.calendarData.length-1;if(t>0)for(let e=t;e>0;e--){const n=this.calendarData[e],i=this.calendarData[e-1];n.x===i.x?(i.text=`${n.text}<br/>${i.text}`,this.calendarData.splice(e,1)):(e===t&&(n.text=`<strong> ${r.InfrontUtil.formatDate(new Date(n.x))} </strong><br/>${n.text}`),i.text=`<strong> ${r.InfrontUtil.formatDate(new Date(i.x))} </strong><br/>${i.text}`)}}getChartDataItemFromTimeSeriesItem(t,e,n=this.getEpocheTimeFromString(this.getDateTimeStringFromTimeseriesItem(t))){switch(e){case Xt.OHLC:return[n,t.open,t.high,t.low,t.last];case Xt.LAST:return[n,t.last];case Xt.BID:return[n,t.bid];case Xt.ASK:return[n,t.ask];case Xt.MID:return[n,t.mid||(null!=t.bid&&null!=t.ask?(t.bid+t.ask)/2:null)];case Xt.VOLUME:return[n,t.volume];case Xt.TURNOVER:return[n,t.turnover]}}getEpocheTimeFromString(t){if(t?.length)try{const e=new Date(t).getTime();if(isNaN(e))throw new Error("Invalid date string");return e}catch(e){r.InfrontUtil.errorLog("ChartData (getEpocheTimeFromString)",e)}return null}getDateTimeStringFromTimeseriesItem(t){return r.InfrontUtil.isDate(t?.date)?`${this.getDateString(t.date)}T${this.getTimeString(t.time)}${t.date.toTimeString().slice(12,17)}`:null}getDateString(t){const e=t.getDate().toString().padStart(2,"0"),n=(t.getMonth()+1).toString().padStart(2,"0");return`${t.getFullYear().toString()}-${n}-${e}`}getTimeString(t){return r.InfrontUtil.isDate(t)?`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}:${t.getSeconds().toString().padStart(2,"0")}`:"00:00:00"}destroy(){}static getDataValueForPointValKey(t,e){if(Array.isArray(t)){if(null!=e&&4===t?.length){const n=["open","high","low","close"].indexOf(e);return n>-1?t[n]:null}return t?.length?t[t.length-1]:null}return t}}Jn.timeSeriesDataTypes=[Xt.OHLC,Xt.LAST,Xt.BID,Xt.ASK,Xt.MID,Xt.VOLUME,Xt.TURNOVER];class ls{constructor(){}get(){return this}getCompanyHistoryData(){return this.companyHistoryData}searchCompanyHistoryData(t,e,n){if(!t||!e?.getInstrument()||null!=this.companyHistoryData)return void n();const i=e.getInstrumentSettings(),s=new Date,o=r.InfrontUtil.addDays(s,-1),l={id:e.getInstrument(),from:o,to:s,targetCurrency:ii.getTargetCurrency(t,i)},u=t.source;u?.getCompanyHistoryData(l,d=>{r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("Data/SDK/CompanyHistory (searchCompanyHistoryData, callback):","companyHistoryData=",d,"instrument=",e.getInstrument(),"options=",l),this.companyHistoryData=d,n()})}destroy(){}}class La{constructor(){}get(){return this}getMetaData(){return this.metaData}getCalendarFeedList(){return this.calendarFeedList}searchMetaData(t,e,n){if(!t||null==e?.feed||null!=this.metaData)return void n();const i={feed:e.feed,infoType:r.InfrontSDK.FeedInfoType.MetaData},s=t?.source;s?.getFeedInfoData(i,o=>{r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("Data/SDK/Feed (searchMetaData, callback):","metaData=",o,"instrument=",e,"options=",i),this.metaData=o,n()})}searchCalendarFeedListData(t,e){if(!t||null!=this.calendarFeedList)return void e();const n={serviceTypes:{Calendar:!0},feedInfo:!0},i=t?.source;i?.getFeedListData(n,s=>{r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("Data/SDK/Feed (searchCalendarFeedListData, callback):","calendarFeedList=",s,"options=",n),this.calendarFeedList=s,e()})}initCalendarFeedList(t){this.searchCalendarFeedListData(t,()=>{t.availableCalendarFeeds=this.calendarFeedList})}filterValidCalendarFeeds(t){var e;const n=null===(e=t.calendarFeeds)||void 0===e?void 0:e.filter(i=>Number.isInteger(i)&&i>0);return n?.length?[...n]:[]}destroy(){}}class us{static getSeriesOptions(t,e,n=2){const i=t?.getGlobalChartSettings(),s=e?.getInstrumentSettings();return i&&s?s.chartType!==wt.POINTS?{}:{lineWidth:0,marker:{enabled:!0,radius:n,hover:{enabled:!1}}}:{}}static getColorOptions(t,e=t.color){return{color:e,fillColor:Bt.getHexAlphaColor(e,"99"),lineColor:"#00000000",lineWidth:0,style:{color:"#00000000"},states:{hover:{fillColor:Bt.getHexAlphaColor(e,"FF"),halo:null,lineColor:"#00000000",lineWidth:0,lineWidthPlus:0}}}}}function ir(a){return a?.showOrdinate||a?.showOppositeOrdinate?a?.ordinateLabelsOutside?3:6:0}function cs(a){return Fi(a)===Pe.RELATIVE}function Fi(a){var t;if(!a)return;const e=null===(t=a.getMainInstrument())||void 0===t?void 0:t.getInstrumentSettings(),n=a.getLength()>1||e?.showUnderlying;let i;const s=a.getGlobalChartSettings();return s?.areaStacking?Pe.ABSOLUTE:(i=s?.chartType===wt.BASELINE?Pe.REBASE_ON_MAIN:s?.ordinateScaling===Pe.AUTO?n?s?.showOppositeOrdinate?Pe.REBASE_ON_MAIN:Pe.RELATIVE:Pe.ABSOLUTE:s?.ordinateScaling||Pe.ABSOLUTE,i)}function Vi(a){return[Pe.RELATIVE,Pe.REBASE_ON_MAIN].includes(a)}function ds(a){const t=a?.getGlobalChartSettings(),e=!!t?.showOppositeOrdinate;return t?.ordinateScaling===Pe.AUTO&&e||t?.ordinateScaling===Pe.REBASE_ON_MAIN}
1(function(a){a.FIX="fix",a.MINIMUM="min",a.MAXIMUM="max"})(Cn||(Cn={})),function(a){a.DECIMALS="decimals",a.TOOLTIP_DECIMALS="tooltipDecimals",a.Y_AXIS_LABEL_DECIMALS="yAxisLabelDecimals",a.OPPOSITE_Y_AXIS_LABEL_DECIMALS="oppositeYAxisLabelDecimals",a.SERIES_LABEL_DECIMALS="seriesLabelDecimals",a.OPPOSITE_SERIES_LABEL_DECIMALS="oppositeSeriesLabelDecimals",a.CROSSHAIR_LABEL_DECIMALS="crosshairLabelDecimals",a.OPPOSITE_CROSSHAIR_LABEL_DECIMALS="oppositeCrosshairLabelDecimals"}(Wn||(Wn={})),function(a){a.DECIMALS_PERCENTAGE="decimalsPercentage",a.TOOLTIP_DECIMALS_PERCENTAGE="tooltipDecimalsPercentage",a.Y_AXIS_LABEL_DECIMALS_PERCENTAGE="yAxisLabelDecimalsPercentage",a.OPPOSITE_Y_AXIS_LABEL_DECIMALS_PERCENTAGE="oppositeYAxisLabelDecimalsPercentage",a.SERIES_LABEL_DECIMALS_PERCENTAGE="seriesLabelDecimalsPercentage",a.OPPOSITE_SERIES_LABEL_DECIMALS_PERCENTAGE="oppositeSeriesLabelDecimalsPercentage",a.CROSSHAIR_LABEL_DECIMALS_PERCENTAGE="crosshairLabelDecimalsPercentage",a.OPPOSITE_CROSSHAIR_LABEL_DECIMALS_PERCENTAGE="oppositeCrosshairLabelDecimalsPercentage"}(Gn||(Gn={})),function(a){a.DECIMALS_CALLBACK="decimalsCallback",a.TOOLTIP_DECIMALS_CALLBACK="tooltipDecimalsCallback",a.Y_AXIS_LABEL_DECIMALS_CALLBACK="yAxisLabelDecimalsCallback",a.OPPOSITE_Y_AXIS_LABEL_DECIMALS_CALLBACK="oppositeYAxisLabelDecimalsCallback",a.SERIES_LABEL_DECIMALS_CALLBACK="seriesLabelDecimalsCallback",a.OPPOSITE_SERIES_LABEL_DECIMALS_CALLBACK="oppositeSeriesLabelDecimalsCallback",a.CROSSHAIR_LABEL_DECIMALS_CALLBACK="crosshairLabelDecimalsCallback",a.OPPOSITE_CROSSHAIR_LABEL_DECIMALS_CALLBACK="oppositeCrosshairLabelDecimalsCallback"}(on||(on={}));const Lo=Object.entries(Gn).reduce((a,[t,e])=>(a[t]=e,a[e]=t,a),{}),wo={[Wn.DECIMALS]:on.DECIMALS_CALLBACK,[Wn.TOOLTIP_DECIMALS]:on.TOOLTIP_DECIMALS_CALLBACK,[Wn.Y_AXIS_LABEL_DECIMALS]:on.Y_AXIS_LABEL_DECIMALS_CALLBACK,[Wn.OPPOSITE_Y_AXIS_LABEL_DECIMALS]:on.OPPOSITE_Y_AXIS_LABEL_DECIMALS_CALLBACK,[Wn.SERIES_LABEL_DECIMALS]:on.SERIES_LABEL_DECIMALS_CALLBACK,[Wn.OPPOSITE_SERIES_LABEL_DECIMALS]:on.OPPOSITE_SERIES_LABEL_DECIMALS_CALLBACK,[Wn.CROSSHAIR_LABEL_DECIMALS]:on.CROSSHAIR_LABEL_DECIMALS_CALLBACK,[Wn.OPPOSITE_CROSSHAIR_LABEL_DECIMALS]:on.OPPOSITE_CROSSHAIR_LABEL_DECIMALS_CALLBACK,[Gn.DECIMALS_PERCENTAGE]:on.DECIMALS_CALLBACK,[Gn.TOOLTIP_DECIMALS_PERCENTAGE]:on.TOOLTIP_DECIMALS_CALLBACK,[Gn.Y_AXIS_LABEL_DECIMALS_PERCENTAGE]:on.Y_AXIS_LABEL_DECIMALS_CALLBACK,[Gn.OPPOSITE_Y_AXIS_LABEL_DECIMALS_PERCENTAGE]:on.OPPOSITE_Y_AXIS_LABEL_DECIMALS_CALLBACK,[Gn.SERIES_LABEL_DECIMALS_PERCENTAGE]:on.SERIES_LABEL_DECIMALS_CALLBACK,[Gn.OPPOSITE_SERIES_LABEL_DECIMALS_PERCENTAGE]:on.OPPOSITE_SERIES_LABEL_DECIMALS_CALLBACK,[Gn.CROSSHAIR_LABEL_DECIMALS_PERCENTAGE]:on.CROSSHAIR_LABEL_DECIMALS_CALLBACK,[Gn.OPPOSITE_CROSSHAIR_LABEL_DECIMALS_PERCENTAGE]:on.OPPOSITE_CROSSHAIR_LABEL_DECIMALS_CALLBACK},Pn=Object.assign(Object.assign(Object.assign({},Wn),Gn),on);class hs{constructor(t){this.chartInstrumentList=t,this.decimalsSettingsCache={}}getDecimals(t,e){var n;const i=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getGlobalChartSettings();if(!i)return;const s=this.getDecimalsSetting(e,i);return"function"==typeof s?s(t,this.isPercentage(e)):s}getDecimalsSetting(t,e){const n=this.decimalsSettingsCache[t];if(void 0!==n)return n;let i=this.getDecimalsSettingByKey(t,e);return void 0!==i?(this.decimalsSettingsCache[t]=i,i):t===Wn.DECIMALS||t===Gn.DECIMALS_PERCENTAGE?(this.decimalsSettingsCache[t]=null,i):(i=this.getDecimalsSettingByKey(this.isPercentage(t)?Gn.DECIMALS_PERCENTAGE:Wn.DECIMALS,e),this.decimalsSettingsCache[t]=i??null,i)}getDecimalsSettingByKey(t,e){var n;return null!==(n=e[t])&&void 0!==n?n:e[wo[t]]}isPercentage(t){return!!Lo[t]}}function gs(a,t){const e=t?.getSymbolData(r.InfrontSDK.SymbolField.YesterdayClose);if(null==e)return;const n=a?.getChartCrossrates(),i=n?.getYesterdayCrossrateValue(t);return null!=i?e*i:void 0}function vs(a,t=b.MAIN_INSTRUMENT){var e,n;let i=!0;if(t===b.ANY_INSTRUMENT){if(a)for(const o of a.get())if(o.hasIntradaySupport()){i=!1;break}}else t===b.MAIN_INSTRUMENT&&!0===(null===(e=a?.getMainInstrument())||void 0===e?void 0:e.hasIntradaySupport())&&(i=!1);
1const s=a?.getWidgetPeriods();null===(n=s?.data)||void 0===n||n.forEach(o=>{o.available.set(!(o.id<1e3&&i))})}function ra(a){return Object.values(At).includes(a)}function wa(a){return Object.values(qt).includes(a)}class Kn{static getXData(t){return this.getXDataInternal(t,!1)}static getProcessedXData(t){return this.getXDataInternal(t,!0)}static getYData(t){return this.getYDataInternal(t,!1)}static getProcessedYData(t){return this.getYDataInternal(t,!0)}static getXDataInternal(t,e){return r.InfrontUtil.isFunction(t?.getColumn)?t.getColumn("x",e)||[]:(e?t?.processedXData:t?.xData)||[]}static getYDataInternal(t,e){var n;if(r.InfrontUtil.isFunction(t?.getColumn)){const i=t.pointArrayMap;if(i?.length){const s=i.map(u=>t.getColumn(u,e)||[]),o=(null===(n=s[0])||void 0===n?void 0:n.length)||0,l=[];for(let u=0;u<o;u++)l.push(s.map(d=>d[u]));return l}return t.getColumn(t.pointValKey||"y",e)||[]}return(e?t?.processedYData:t?.yData)||[]}}function ms(a){const t=a?.getGlobalChartSettings(),e=Fi(a);return t?{compare:Vi(e)?"percent":null,compareBase:t?.ordinateCompareBase,compareStart:!0}:{}}function ps(a){var t,e,n,i,s;if(null==a)return null;let o=null;const l=null===(n=null===(e=null===(t=a.chart)||void 0===t?void 0:t.options)||void 0===e?void 0:e.infront)||void 0===n?void 0:n.chartInstrumentList,u=l?.getGlobalChartSettings();if(u&&u.isOneDayUntouched&&u.isPrevCloseCompareValue){const d=l.getChartInstrumentById(null===(i=a.options)||void 0===i?void 0:i.id);d&&(o=gs(l,d))}if(null==o){const d=!0===(null===(s=a.options)||void 0===s?void 0:s.compareStart)?0:1,g=Kn.getProcessedYData(a);if(a.xAxis&&g?.length){const I=Kn.getProcessedXData(a),C=g.length;for(let S=0;S<C-d;S++){const N=Is(g[S]);if(r.InfrontUtil.isNumber(N)&&0!==N&&I[S+d]>=a.xAxis.min){o=N;break}}}}return o}function Is(a){if(a&&r.InfrontUtil.isArray(a)){if(a.length)return a[a.length-1]}else if(!isNaN(a))return a;return null}function aa(a,t){var e,n,i;const s=a?.getChart(),o=t?.getId(),l=s?.get(o),u=t?.getInstrumentSettings();return(null===(n=null===(e=l?.onSeries)||void 0===e?void 0:e.options)||void 0===n?void 0:n.color)||(null===(i=l?.onSeries)||void 0===i?void 0:i.color)||u?.color}function Da(a){var t,e;return null===(e=null===(t=a?.getChart())||void 0===t?void 0:t.options)||void 0===e?void 0:e.series}function Ra(a){var t;return null===(t=Da(a))||void 0===t?void 0:t.filter(e=>wi(e.id))}function Es(a,t){var e;return null===(e=Ra(a))||void 0===e?void 0:e.findIndex(n=>n.id===t)}function sa(a){var t;return 1===(null===(t=Ra(a))||void 0===t?void 0:t.length)}function oa(a){return!!a?.startsWith(Qt.MAIN)}function fs(a){return!!a?.startsWith(Qt.GHOST)}function wi(a){return oa(a)||!!a?.startsWith(Qt.INSTRUMENT)}function Cs(a){return la(a)||Dr(a)}function la(a){return!!a?.startsWith(Qt.VOLUME)||!!a?.startsWith(Qt.TURNOVER)}function Dr(a){return!!a?.startsWith(Qt.VOLUME_UNDERLAY)||!!a?.startsWith(Qt.TURNOVER_UNDERLAY)}function Rr(a){return Ts(a)||Ss(a)}function Ts(a){return!!a?.startsWith(Qt.INDICATOR)}function Ss(a){return!!a?.startsWith(Qt.OSCILLATOR)}function ua(a){return!!a?.startsWith(Qt.SPLIT)||!!a?.startsWith(Qt.DIVIDEND)||!!a?.startsWith(Qt.CALENDAR)}function Bi(a){return!!a?.startsWith(Qt.PREV_CLOSE)}function Na(a){return a?.startsWith(Qt.VOLUME_UNDERLAY)?a.replace(Qt.VOLUME_UNDERLAY,""):a?.startsWith(Qt.TURNOVER_UNDERLAY)?a.replace(Qt.TURNOVER_UNDERLAY,""):a?.startsWith(Qt.VOLUME)?a.replace(Qt.VOLUME,""):a?.startsWith(Qt.TURNOVER)?a.replace(Qt.TURNOVER,""):null}function _s(a){return a?.startsWith(Qt.PREV_CLOSE)?a.replace(Qt.PREV_CLOSE,""):null}function As(a,t){var e;if(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("HighchartsSeries: removeSeriesById","id=",t),!a||null==t)return;const n=a.getGlobalChartSettings(),i=a.getChartIndicators();let s=!1;if(wi(t))a.removeById(t),s=!0;else if(Rr(t))i?.removeIndicatorById(t),s=!0;else if(la(t))ya(a,t),n.showVolume=!1,a.setMainInstrumentShowVolume("showVolume",!1),s=!0;else if(Dr(t)){ya(a,t),n.showVolumeUnderlay=!1,a.setMainInstrumentShowVolume("showVolumeUnderlay",!1);const o=a.getChartInstrumentById(Na(t)),l=o?.getInstrumentSettings();l&&(l.showVolumeUnderlay=!1),s=!0}
1s&&(null===(e=a.getChartWrapper())||void 0===e||e.requestUpdateChart(),vs(a))}function ya(a,t){var e,n,i;if(!a||null==t)return;const s=a.getChart(),o=a.getChartIndicators();let l;l=null!=s?null===(n=null===(e=s.options)||void 0===e?void 0:e.series)||void 0===n?void 0:n.filter(u=>u.linkedTo===t):o.getLinkedIndicators(t),l.forEach(u=>{var d;o.removeIndicatorById(u.id),null===(d=s?.get(u.id))||void 0===d||d.remove(!1)}),null===(i=a.getChartWrapper())||void 0===i||i.requestRedrawChart()}function Os(a,t,e,n=null,i=Cn.FIX,s){const o=ds(e),l=cs(e);return ws(a=bs(a,t,e,o),e,l,n,i,!0,s).replace(" ","\xa0")}function ki(a,t,e){var n;const i=t?.getGlobalChartSettings(),s=t?.getChart();e||(e=null===(n=t?.getMainInstrument())||void 0===n?void 0:n.getId());const o=s?.get(e),l=o?.compareValue;return null!=a&&l&&(a=a/l*100,a-=100-(i?.ordinateCompareBase||0)),a}function gi(a){var t,e;const n=null===(t=a?.getChartWrapper())||void 0===t?void 0:t.getHighcharts();return null!==(e=null==r.InfrontUtil?void 0:r.InfrontUtil.formatNumber)&&void 0!==e?e:n?.numberFormat}function bs(a,t,e,n=!1){const i=Fi(e);return n&&Vi(i)&&(a=Ls(a,t,e)),a}function Ls(a,t,e){var n,i,s;const o=(null===(i=null===(n=t?.series)||void 0===n?void 0:n[0])||void 0===i?void 0:i.compareValue)||ps(null===(s=t?.series)||void 0===s?void 0:s[0]),l=e?.getGlobalChartSettings();return null!=o?(1+(a-l?.ordinateCompareBase||0)/100)*o:a}function ws(a,t,e=!1,n=null,i=Cn.FIX,s=!1,o){var l;if(o){const I=null===(l=t?.getChartDecimals())||void 0===l?void 0:l.getDecimals(a,o);null!=I&&(n=I,i!==Cn.FIX&&(i=Cn.FIX),s&&(s=!1))}const u=s?Ds(a,t):null;if(null!=u)return`${u}${e?"%":""}`;let d=""+Math.round(100*(a+Number.EPSILON))/100;const g=gi(t);if(null==g)return d;if(0===a)d=g(a,0);else if(null!=n&&i===Cn.FIX)d=g(a,n);else{let I=Rs(t,e);null==I?d=Math.abs(a)>=1e4?g(a,0):Math.abs(a)>=1e3?g(a,1):Math.abs(a)<.01?g(a,4):Math.abs(a)<.1?g(a,3):g(a,2):(null!=n&&(i===Cn.MINIMUM?I=Math.max(I,n):i===Cn.MAXIMUM&&(I=Math.min(I,n))),d=g(a,I))}return`${d}${e?"%":""}`}function Ds(a,t){let e=null;const n=gi(t);return null!=n&&Math.abs(a)>=1e5&&(e=Math.abs(a)>=1e12?n(a/1e12,1)+"T":Math.abs(a)>=1e9?n(a/1e9,1)+"G":Math.abs(a)>=1e6?n(a/1e6,1)+"M":n(a/1e3,1)+"k"),e}function Rs(a,t=!1){var e;let n=null;const i=a?.getChart(),s=null===(e=i?.get(ht.kMainYAxisId))||void 0===e?void 0:e.getExtremes();if(r.InfrontUtil.isNumber(s?.min)&&r.InfrontUtil.isNumber(s?.max)){const o=Math.abs(t?ki(s?.max,a)-ki(s?.min,a):s?.max-s?.min);n=o>20?0:o>2?1:o>.2?2:o>.02?3:o>.002?4:5}return n}function Hi(a,t,e=!1,n=null,i=!1,s){var o;if(s){const g=null===(o=t?.getChartDecimals())||void 0===o?void 0:o.getDecimals(a,s);null!=g&&(n=g,i&&(i=!1))}const l=i?Ds(a,t):null;if(null!=l)return`${l}${e?"%":""}`;let u=""+Math.round(100*(a+Number.EPSILON))/100;const d=gi(t);if(null==d)return u;if(null==n){const g=Rs(t,e);u=null==g?Math.abs(a)<.01?d(a,4):Math.abs(a)<.1?d(a,3):d(a,2):d(a,Math.max(2,g))}else u=d(a,n);return`${u}${e?"%":""}`}function Ma(a,t,e,n,i=null,s=!1){var o,l,u;const d=null===(o=a?.getLanguageHandler)||void 0===o?void 0:o.call(a);return`${null!==(u=null===(l=d?.get)||void 0===l?void 0:l.call(d,ht.kLanguageKey,e))&&void 0!==u?u:""} ${s?Os(t,n,a,i):Hi(t,a)}`.trim()}function ca(a){const t=a?.getLanguageHandler();return{openLabel:t.get(ht.kLanguageKeyTooltip,"open"),highLabel:t.get(ht.kLanguageKeyTooltip,"high"),lowLabel:t.get(ht.kLanguageKeyTooltip,"low"),closeLabel:t.get(ht.kLanguageKeyTooltip,"close"),bidLabel:t.get(ht.kLanguageKeyTooltip,"bid"),askLabel:t.get(ht.kLanguageKeyTooltip,"ask"),midLabel:t.get(ht.kLanguageKeyTooltip,"mid"),volumeLabel:t.get(ht.kLanguageKeyTooltip,"volume"),turnoverLabel:t.get(ht.kLanguageKeyTooltip,"turnover"),prevCloseLabel:t.get(ht.kLanguageKeyTooltip,"prevClose")}}function Do(a,t,e=ca(a)){const n=gi(a);if(null==n)return{};const i=t?.getInstrumentSettings(),s=i?.decimals;return{pointFormatter:function(){var o,l;if(Bi(null===(l=null===(o=this.series)||void 0===o?void 0:o.options)||void 0===l?void 0:l.id)){const u=aa(a,t);return(null!=u?`<span style="color:${u}">\u25cf</span> `:"")+`<strong>${e.prevCloseLabel}</strong> ${n(this.y,s)}`}}}}const Ns="navigator";let da=(()=>{class a{static setMainPrevClose(e,n){if(!a.showPrevClose(e,n))return a.removeMainPrevClosePlotline(e),void a.hidePrevCloseSeries(e);const i=e?.getGlobalChartSettings();i?.prevCloseType===Zn.LINE?a.addMainPrevClosePlotline(e,n):i?.prevCloseType===Zn.DOT&&a.showPrevCloseSeries(e)}static showPrevClose(e,n){const i=e?.getGlobalChartSettings();return!!i&&(n===Ns&&(i.isOneDayUntouched=!1),i.showPrevClose&&i.isOneDayUntouched&&i.currentPeriod===lt.ONE_DAY)}static removeMainPrevClosePlotline(e){const n=e?.getChart();if(!n)return;
1const i=n.get(ht.kMainYAxisId),s=e?.getMainInstrument(),o=s?.getId();n&&i&&o&&i.removePlotLine(Qt.PLOTLINE_PREV_CLOSE+o)}static addMainPrevClosePlotline(e,n){var i;const s=e?.getChart(),o=e?.getGlobalChartSettings();if(!s||!o)return;const l=s.get(ht.kMainYAxisId),u=e?.getMainInstrument(),d=u?.getInstrumentSettings(),g=u?.getId();if(!s||!l||!g)return;const I=Qt.PLOTLINE_PREV_CLOSE+g;l.removePlotLine(I);let C=a.getPrevCloseValue(e,u);if(null==C)return;Vi(Fi(e))&&(C=ki(C,e,g));const S=a.getPrevCloseColor(e,u);l.addPlotLine({id:I,value:C,color:S,width:2,dashStyle:"Dot",zIndex:99,label:{text:Ma(e,C,"prevClose",s,d?.decimals),x:50,y:-5,style:{color:S},useHTML:!1,align:"center",verticalAlign:"top"},alwaysVisible:!0}),"afterCreateChart"===n&&(null===(i=e.getChartWrapper())||void 0===i||i.requestRedrawChart())}static getPrevCloseColor(e,n){return aa(e,n)??Er}static hidePrevCloseSeries(e,n=e?.getMainInstrument()){var i;const s=e?.getChart(),o=Qt.PREV_CLOSE+(n?.getId()||""),l=s?.get(o);l?.update({visible:!1},!1),null===(i=e?.getChartWrapper())||void 0===i||i.requestRedrawChart()}static showPrevCloseSeries(e,n=e?.getMainInstrument()){var i;const s=a.getPrevCloseSeriesDataItem(e,n);if(null==s)return;const o=e?.getChart(),l=Qt.PREV_CLOSE+(n?.getId()||""),u=o?.get(l);u.options.data=[s],u?.update({visible:!0},!1),null===(i=e?.getChartWrapper())||void 0===i||i.requestRedrawChart()}static getPrevCloseSeriesDataItem(e,n){const i=a.getPrevCloseValue(e,n);if(null==i)return;const s=e?.getChart(),o=s?.get(ht.kXAxisId),l=s.plotLeft+Math.floor(2.5),u=o.toValue(l);return null!=u?[u,i]:void 0}static getPrevCloseSeries(e,n){const i=e?.getGlobalChartSettings();if(!i)return null;const s=n?.getInstrumentSettings();if(!s?.instrument||!s?.id)return null;const o=Qt.PREV_CLOSE+s.id,l=ca(e),u=a.getPrevCloseColor(e,n);return Object.assign(Object.assign(Object.assign({type:"scatter",id:o,yAxis:ht.kMainYAxisId,visible:!1,showInLegend:!1,enableMouseTracking:!!i?.cursorEventsEnabled,showInNavigator:!1,animation:!1,name:o,data:[],marker:{enabled:!0,radius:5,hover:{enabled:!1}},dataLabels:{enabled:!1}},us.getColorOptions(s,u)),ms(e)),{pointPlacement:"on",tooltip:Do(e,n,l),zIndex:99})}static setPrevCloseSeriesColor(e){var n;const i=e?.getChart();null===(n=i?.series)||void 0===n||n.forEach(s=>{var o;const l=null===(o=s.options)||void 0===o?void 0:o.id;if(!Bi(l))return;const u=_s(l);if(!u)return;const d=e.getChartInstrumentById(u),g=d?.getInstrumentSettings();g&&s.update({color:g.color},!1)})}}return a.getPrevCloseValue=gs,a})();class Ke{static isHistoricalResolution(t){return Object.values(Pt).includes(t)}static isIntradayResolution(t){return Object.values(tt).includes(t)}static isValidDefaultResolutions(t){if(!t)return!1;const e=Object.keys(t).filter(i=>!wa(+i)&&!ra(+i)),n=Object.values(t).filter(i=>!this.isIntradayResolution(i)&&!this.isHistoricalResolution(i));return e.length+n.length===0}static getDefaultResolutionForPeriodId(t){return this.DEFAULT_RESOLUTIONS[t]||Pt.ONE_DAY}
1static getResolutionKeyListForPeriodId(t){return ra(t)?[At.ONE_WEEK].includes(t)?["AUTO","ONE_DAY","THREE_DAYS"]:[At.ONE_MONTH,At.THREE_MONTHS,At.SIX_MONTHS,At.NINE_MONTHS].includes(t)?["AUTO","ONE_DAY","THREE_DAYS","FIVE_DAYS","ONE_WEEK"]:this.getOrderedHistoricalResolutionKeyList():[qt.SECOND].includes(t)?["AUTO","ONE_SECOND"]:[qt.ONE_DAY,qt.PERIOD_24H].includes(t)||[qt.TWO_DAYS,qt.THREE_DAYS,qt.FIVE_DAYS].includes(t)?["AUTO","ONE_MINUTE","TWO_MINUTES","THREE_MINUTES","FOUR_MINUTES","FIVE_MINUTES","TEN_MINUTES","FIFTEEN_MINUTES","TWENTY_MINUTES","THIRTY_MINUTES","SIXTY_MINUTES"]:[qt.TEN_DAYS].includes(t)?["AUTO","FIVE_MINUTES","TEN_MINUTES","FIFTEEN_MINUTES","TWENTY_MINUTES","THIRTY_MINUTES","SIXTY_MINUTES"]:["AUTO","FIVE_MINUTES","TEN_MINUTES","FIFTEEN_MINUTES","TWENTY_MINUTES","THIRTY_MINUTES","SIXTY_MINUTES","FOUR_HOURS"]}static getOrderedIntradayResolutionKeyList(t=!0){return tt&&[...t?["AUTO"]:[],...Object.keys(tt)]}static getOrderedHistoricalResolutionKeyList(t=!0){return Pt&&Object.keys(Pt).filter(e=>!t||"AUTO"!==Pt[e])}static getOrderedResolutionKeyList(){return[...this.getOrderedIntradayResolutionKeyList(),...this.getOrderedHistoricalResolutionKeyList()]}static setResolution(t,e,n=null){if(!t)return;null==n||this.isValidResolution(n,t)||(n=this.getDefaultResolution(t));const i=t.dataResolution;t.currentResolution=n??(null!=e?.defaultResolution?e.defaultResolution:this.getDefaultResolution(t)),t.dataResolution=this.getDataResolution(t),t.dataResolution!==i&&(t.needDataReload=!0)}static getDataResolution(t){var e,n;if(!t)return;let i=this.getCurrentResolution(t);return"SDK"===(null===(n=null===(e=t.source)||void 0===e?void 0:e.constructor)||void 0===n?void 0:n.name)&&(i=t.isIntraday?i:F.ONE_DAY),i}static getCurrentResolution(t){if(t)return t.currentResolution===F.AUTO?this.getDefaultResolution(t):t.currentResolution}static getDefaultResolution(t){const e=t?.currentResolution,n=t?.currentPeriod;return null==n?e:Ke.getDefaultResolutionForPeriodId(n)||e}static createResolutions(t,e,n=null,i=null){if(!t)return;t.currentResolutionList.clear();const s=t?.currentPeriod;if(null==s)return;
1const o=this.getResolutionKeyListForPeriodId(s);o?.forEach(l=>{this.isSelectableResolution(s,l,n,i)&&t.currentResolutionList.push(this.getResolutionElementFromKey(l,t,e))})}static isSelectableResolution(t,e,n=null,i=null){return ra(t)?!i?.length||i.includes(Pt[e]):!!wa(t)&&(!n?.length||n.includes(tt[e]))}static isValidResolution(t,e){var n,i;return!(null===(i=null===(n=e?.currentResolutionList)||void 0===n?void 0:n.data)||void 0===i||!i.length||!e.currentResolutionList.data.find(s=>s.id===t))}static getResolutionElementFromKey(t,e,n){const i=F[t];return{id:i,name:i,label:this.getResolutionLabel(t,e,n),selected:new r.InfrontUtil.Observable,available:new r.InfrontUtil.Observable}}static getResolutionLabel(t,e,n){const i=e?.currentPeriod;if(null==i)return"";const s=this.getDefaultResolutionForPeriodId(i),o=n.get(ht.kLanguageKeyResolution,s),l=n.get(ht.kLanguageKeyResolution,F[t]);return F[t]===F.AUTO?`${n.get(ht.kLanguageKeyResolution,"auto")} (${o})`:l}static getResolutionShortLabel(t,e,n){const i=e?.currentPeriod;if(null==i)return"";const s=this.getDefaultResolutionForPeriodId(i),o=n.get(ht.kLanguageKeyResolutionShort,s),l=n.get(ht.kLanguageKeyResolutionShort,t);return t===F.AUTO?o:l}}Ke.RESOLUTION_LIST={[tt.ONE_SECOND]:{unit:r.InfrontSDK.Unit.Second,value:1},[tt.ONE_MINUTE]:{unit:r.InfrontSDK.Unit.Minute,value:1},[tt.TWO_MINUTES]:{unit:r.InfrontSDK.Unit.Minute,value:2},[tt.THREE_MINUTES]:{unit:r.InfrontSDK.Unit.Minute,value:3},[tt.FOUR_MINUTES]:{unit:r.InfrontSDK.Unit.Minute,value:4},[tt.FIVE_MINUTES]:{unit:r.InfrontSDK.Unit.Minute,value:5},[tt.TEN_MINUTES]:{unit:r.InfrontSDK.Unit.Minute,value:10},[tt.FIFTEEN_MINUTES]:{unit:r.InfrontSDK.Unit.Minute,value:15},[tt.TWENTY_MINUTES]:{unit:r.InfrontSDK.Unit.Minute,value:20},[tt.THIRTY_MINUTES]:{unit:r.InfrontSDK.Unit.Minute,value:30},[tt.SIXTY_MINUTES]:{unit:r.InfrontSDK.Unit.Hour,value:1},[tt.FOUR_HOURS]:{unit:r.InfrontSDK.Unit.Hour,value:4},[Pt.ONE_DAY]:{unit:r.InfrontSDK.Unit.Day,value:1},[Pt.THREE_DAYS]:{unit:r.InfrontSDK.Unit.Day,value:3},[Pt.FIVE_DAYS]:{unit:r.InfrontSDK.Unit.Day,value:5},[Pt.ONE_WEEK]:{unit:r.InfrontSDK.Unit.Day,value:7},[Pt.ONE_MONTH]:{unit:r.InfrontSDK.Unit.Day,value:30},[Pt.THREE_MONTHS]:{unit:r.InfrontSDK.Unit.Day,value:90}},Ke.DEFAULT_RESOLUTIONS={[qt.ONE_DAY]:tt.ONE_MINUTE,[qt.PERIOD_24H]:tt.ONE_MINUTE,[qt.TWO_DAYS]:tt.ONE_MINUTE,[qt.THREE_DAYS]:tt.SIXTY_MINUTES,[qt.FIVE_DAYS]:tt.SIXTY_MINUTES,[qt.TEN_DAYS]:tt.SIXTY_MINUTES,[qt.THIRTY_DAYS]:tt.SIXTY_MINUTES,[qt.NINETY_DAYS]:tt.SIXTY_MINUTES},Ke.INTRADAY_RESOLUTION_TO_DAYS_BACK={[tt.ONE_SECOND]:1e3/288e5,[tt.ONE_MINUTE]:6e4/288e5,[tt.TWO_MINUTES]:12e4/288e5,[tt.THREE_MINUTES]:.00625,[tt.FOUR_MINUTES]:24e4/288e5,[tt.FIVE_MINUTES]:3e5/288e5,[tt.TEN_MINUTES]:6e5/288e5,[tt.FIFTEEN_MINUTES]:.03125,[tt.TWENTY_MINUTES]:12e5/288e5,[tt.THIRTY_MINUTES]:.0625,[tt.SIXTY_MINUTES]:.125,[tt.FOUR_HOURS]:.5};class ys{static cloneChartInstrument(t,e){var n,i;if(!t?.getLength()||null==e)return;const s=t.getGlobalChartSettings(),o=e.getInstrumentSettings();o.dataType=Gt.BID;const l=t.getNextChartInstrumentIndex(),u=new ga(e.getInstrument(),l,t.getGlobalChartSettings());Object.keys(e).forEach(I=>{["index","isMainInstrument","instrumentSettings","globalChartSettings"].includes(I)||(u[I]=e[I])});const d=u.getInstrumentSettings();u.setId(u.newChartInstrumentId()),d.dataType=Gt.ASK,d.chartType=null!==(n=s?.secondaryChartType)&&void 0!==n?n:o.chartType,d.color=o.color,s?.secondaryColorType===pi.NEXT&&(d.color=null!==(i=s.instrumentColorList)&&void 0!==i&&i.length?s.instrumentColorList[l%s.instrumentColorList.length]:null);const g=s?.secondaryColorTransparency;null!=g&&d.color&&(d.color=Bt.getHexAlphaColorByFactor(d.color,g)),t.get().push(u)}}class Ms{static cloneChartInstrument(t,e){var n,i;if(!t?.getLength()||null==e)return;const s=t.getGlobalChartSettings(),o=e.getInstrumentSettings();o.dataType=Gt.CLOSE,o.adjustSplits=!0,o.adjustDividends=!1,o.showDividends=!1;const l=t.getNextChartInstrumentIndex(),u=new ga(e.getInstrument(),l,t.getGlobalChartSettings()),d=u.getInstrumentSettings();Object.keys(o).forEach(I=>{["id"].includes(I)||(d[I]=o[I])}),u.setId(u.newChartInstrumentId()),d.adjustSplits=!0,d.adjustDividends=!0,d.showDividends=!0,d.chartType=null!==(n=s?.secondaryChartType)&&void 0!==n?n:o.chartType,d.color=o.color,s?.secondaryColorType===pi.NEXT&&(d.color=null!==(i=s.instrumentColorList)&&void 0!==i&&i.length?s.instrumentColorList[l%s.instrumentColorList.length]:null);const g=s?.secondaryColorTransparency;null!=g&&d.color&&(d.color=Bt.getHexAlphaColorByFactor(d.color,g)),t.get().push(u)}}class Pa{constructor(){}get(){return this}getSymbolData(){return this.symbolData}searchSymbolData(t,e,n){if(!t||null==e?.feed||null==e?.ticker||null!=this.symbolData)return void n();const i={id:e,fields:pn,interactive:!1},s=t?.source;s?.getSymbolData(i,o=>{r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("Data/SDK/Symbol (searchSymbolData, callback):","symbolData=",o?.inspect(),"instrument=",e,"options=",i),this.symbolData=o,n()})}destroy(){}}let Nr=(()=>{class a{constructor(){this.unbindList=[],this.unbindListStreaming=[]}get(){return this}getTimeSeries(){return this.timeSeries$}getTimeSeriesStreaming(){return this.timeSeriesStreaming$}setTimeSeriesData(e){this.timeSeriesData=e}getTimeSeriesData(){return this.timeSeriesData}getSearchOptions(e,n){var i,s;const o=n.getInstrumentSettings();n.setChartDataStatus(sn.DATA_LOADING);const l={};if(l.resolution=Ke.RESOLUTION_LIST[e.dataResolution||Ke.getDefaultResolution(e)],e.isIntraday){const g=fe.getIntradayDaysBack(e);l.daysBack=Math.min(g,a.MAX_INTRADAY_DAYS_BACK)}else if(e.currentPeriod!==At.ALL){const g=null===(i=e.dataStartDate)||void 0===i?void 0:i.getTime(),I=null===(s=e.dataEndDate)||void 0===s?void 0:s.getTime();if(isNaN(g)||isNaN(I))return void r.InfrontUtil.errorLog(`ChartTimeSeries: invali
1d startTime ${g} and/or endTime ${I}!`);l.from=new Date(g),l.to=new Date(I),l.adjustFromDate=e.adjustStartDate}const u=null!=o?.adjustDividends?!!o.adjustDividends:!!e.adjustDividends,d=null!=o?.adjustSplits?!!o.adjustSplits:!!e.adjustSplits;return Object.assign(Object.assign({id:n.getInstrument()},l),{targetCurrency:ii.getTargetCurrency(e,o),adjustDividends:u,adjustSplits:d,fields:[r.InfrontSDK.SymbolField.Bid,r.InfrontSDK.SymbolField.Ask],subscribe:!1})}allowSearchTimeSeries(e,n){return e&&n?.getInstrument()&&n?.isHistoricalPeriodOrHasIntradaySupport()}searchTimeSeries(e,n,i){if(this.unbindTimeSeries(),!this.allowSearchTimeSeries(e,n))return void i([]);const s=this.getSearchOptions(e,n);if(null==s)return void i([]);const o=e.source;o?.getTimeSeriesData(s,l=>{r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("Data/SDK/TimeSeries (searchTimeSeries, callback):","timeSeries$=",l,"options=",s),this.timeSeries$=l,this.unbindList.push(this.timeSeries$.observe({reInit:u=>{r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("Data/SDK/TimeSeries (searchTimeSeries, reInit):","tsData=",u,"options=",s),i(u)}}))}),e.needDataReload=!1}searchTimeSeriesStreaming(e,n,i,s=null){if(this.unbindStreaming(),!this.allowSearchTimeSeries(e,n)||!e.streaming||null==s)return void i();const o=this.getSearchOptions(e,n);if(null==o)return void i();delete o.targetCurrency,delete o.daysBack,o.from=new Date,o.to=new Date(o.from),o.subscribe=!0;const l=e.source;l?.getTimeSeriesData(o,u=>{r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("Data/SDK/TimeSeries (searchTimeSeriesStreaming, callback):","timeSeriesStreaming$=",u,"options=",o),this.timeSeriesStreaming$=u,this.unbindListStreaming.push(this.timeSeriesStreaming$.observe({itemAdded:(d,g)=>{s(n,d)},itemChanged:(d,g)=>{s(n,d)}})),i()})}unbindTimeSeries(){null!=this.unbindList&&(this.unbindList.forEach(e=>{e&&e(),e=null}),this.unbindList.length=0)}unbindStreaming(){null!=this.unbindListStreaming&&(this.unbindListStreaming.forEach(e=>{e&&e(),e=null}),this.unbindListStreaming.length=0)}unbindAll(){this.unbindTimeSeries(),this.unbindStreaming()}destroy(){this.unbindAll()}}return a.MAX_INTRADAY_DAYS_BACK=89,a})();class Ro{constructor(){this.unbindList=[]}get(){return this}getTrades(){return this.trades$}searchTradesData(t,e,n,i=null){this.unbindAll();const s=e?.getInstrument();if(!t?.streaming||null==s?.feed||null==s?.ticker)return void n();const o={id:s,limit:1,subscribe:!0},l=t?.source;l?.getTradesData(o,u=>{r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("Data/SDK/Trades (searchTradesData, callback):","trade$s=",u,"instrument=",s,"options=",o),this.trades$=u,this.unbindList.push(this.trades$.observe(Object.assign({reInit:d=>{r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("Data/SDK/Trades (searchTradesData, reInit):","trades=",d,"instrument=",s,"options=",o)}},null!=i?{itemAdded:(d,g)=>i(e,d)}:{}))),n()})}unbindAll(){null!=this.unbindList&&(this.unbindList.forEach(t=>{t&&t(),t=null}),this.unbindList.length=0)}destroy(){this.unbindAll()}}class rr{static getCurrentResolutionInMs(t){var e,n,i;const s=t?.getGlobalChartSettings(),o=t?.getChart(),l=null===(n=null===(e=o?.series)||void 0===e?void 0:e[0])||void 0===n?void 0:n.closestPointRange,u=Ke.getCurrentResolution(s),d=this.HIGHCHARTS_AGGREGATION_OPTIONS[u];let g;switch(d?.[0]){case"second":g=1e3;break;case"minute":g=6e4;break;case"hour":g=36e5;break;case"day":g=864e5;break;case"week":g=6048e5;break;case"month":g=2592e6}return null!=g&&r.InfrontUtil.isNumber(null===(i=d?.[1])||void 0===i?void 0:i[0])?g*d[1][0]:l}static getTimeWithResolution(t,e){const n=this.getCurrentResolutionInMs(t);return n?e-(e-6e4*new Date(e).getTimezoneOffset())%n:e}}rr.HIGHCHARTS_AGGREGATION_OPTIONS={[tt.ONE_SECOND]:["second",[1]],[tt.ONE_MINUTE]:["minute",[1]],[tt.TWO_MINUTES]:["minute",[2]],[tt.THREE_MINUTES]:["minute",[3]],[tt.FOUR_MINUTES]:["minute",[4]],[tt.FIVE_MINUTES]:["minute",[5]],[tt.TEN_MINUTES]:["minute",[10]],[tt.FIFTEEN_MINUTES]:["minute",[15]],[tt.TWENTY_MINUTES]:["minute",[20]],[tt.THIRTY_MINUTES]:["minute",[30]],[tt.SIXTY_MINUTES]:["hour",[1]],[tt.FOUR_HOURS]:["hour",[4]],[Pt.ONE_DAY]:["day",[1]],[Pt.THREE_DAYS]:["day",[3]],[Pt.FIVE_DAYS]:["day",[5]],[Pt.ONE_WEEK]:["week",[1]],[Pt.ONE_MONTH]:["month",[1]],[Pt.THREE_MONTHS]:["month",[3]]};const No=new Date(-864e12).getTime();class xs{constructor(t){this.chartInstrumentList=t,this.globalChartSettings=t.getGlobalChartSettings(),this.chartDataCache={}}getCacheKey(t,e,n){null==n&&(n=this.buildCacheKeyGlobalChartSettings());const i=this.buildCacheKeyInstrument(t),s=this.buildCacheKeyInstrumentSettings(t,e);return null!=i&&null!=n&&null!=s?`${n}~${i}~${s}`:null}buildCacheKeyGlobalChartSettings(){var t;const e=Ke.getDataResolution(this.globalChartSettings);return null!=(null===(t=this.globalChartSettings)||void 0===t?void 0:t.isIntraday)&&null!=e?`${this.globalChartSettings.isIntraday}~${e}`:null}buildCacheKeyInstrument(t){const e=t.getInstrument();return null!=e?.ticker&&null!=e?.feed?`${e.ticker}~${e.feed}`:null}buildCacheKeyInstrumentSettings(t,e){const n=t.getInstrumentSettings(),i=ii.isRealCurrency(n?.targetCurrency)?n.targetCurrency:n.homeCurrency;return e&&void 0!==i&&null!=n?.adjustDividends&&null!=n?.adjustSplits?`${e}~${i}~${n.adjustDividends}~${n?.adjustSplits}`:null}getCacheDataByCacheKey(t){var e;return null!=t?null===(e=this.chartDataCache)||void 0===e?void 0:e[t]:null}getCacheDataByInstrument(t,e){const n=this.getCacheKey(t,e);return this.getCacheDataByCacheKey(n)}storeChartDataForInstrument(t,e,n){null==n&&(n=this.buildCacheKeyGlobalChartSettings()),Jn.timeSeriesDataTypes.forEac
1h(i=>{var s,o;const l=t.getChartDataByType(i),u=this.getCacheKey(t,i,n);if(null!=u)if(this.chartDataCache[u]={data:r.InfrontUtil.deepCopy(l),snapTime:e},null===(s=this.globalChartSettings)||void 0===s?void 0:s.isIntraday)this.chartDataCache[u]=Object.assign(Object.assign({},this.chartDataCache[u]),{daysBack:fe.getIntradayDaysBack(this.globalChartSettings)});else{const d=this.getDataStartTime(this.globalChartSettings),g=null===(o=this.globalChartSettings.dataEndDate)||void 0===o?void 0:o.getTime();if(null==d||null==g)return;this.chartDataCache[u]=Object.assign(Object.assign({},this.chartDataCache[u]),{dataStartTime:d,dataEndTime:g})}})}getValidCacheDataByInstrument(t,e,n){const i=this.getCacheDataByInstrument(t,n);return this.isStillValidCacheData(i,e)?i:null}getValidCacheDataByCacheKey(t,e){const n=this.getCacheDataByCacheKey(t);return this.isStillValidCacheData(n,e)?n:null}isStillValidCacheData(t,e){var n,i;if(null==t)return!1;let s=rr.getCurrentResolutionInMs(this.chartInstrumentList);if(null!==(n=this.globalChartSettings)&&void 0!==n&&n.isIntraday){const o=fe.getIntradayDaysBack(this.globalChartSettings);return t.snapTime+s>=e&&t.daysBack>=o}return s=s<=144e4?s:144e4,t.snapTime+s>=e&&t.dataStartTime<=this.getDataStartTime(this.globalChartSettings)&&t.dataEndTime>=(null===(i=this.globalChartSettings.dataEndDate)||void 0===i?void 0:i.getTime())}getDataStartTime(t){var e;return t.currentPeriod===lt.ALL?No:null===(e=t.dataStartDate)||void 0===e?void 0:e.getTime()}cacheDataExists(t){return[Xt.LAST,Xt.ASK,Xt.BID].some(e=>{var n,i;return!(null===(i=null===(n=t?.[e])||void 0===n?void 0:n.data)||void 0===i||!i.length)})}updateCache(t,e,n){t.data.push(n),t.snapTime=e}}var yo=globalThis&&globalThis.__awaiter||function(a,t,e,n){return new(e||(e=Promise))(function(i,s){function o(d){try{u(n.next(d))}catch(g){s(g)}}function l(d){try{u(n.throw(d))}catch(g){s(g)}}function u(d){var g;d.done?i(d.value):(g=d.value,g instanceof e?g:new e(function(I){I(g)})).then(o,l)}u((n=n.apply(a,t||[])).next())})};class Us{constructor(){}static asyncLoadCustomData(t){return yo(this,arguments,void 0,function*(e,n={}){var i;if(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("Chart.Data.Custom: loadCustomData","chartInstrumentList.getCustom()=",e?.getCustomInstrumentList(),"customData=",n),null===(i=e?.getCustomInstrumentList())||void 0===i||!i.length)return;const s=[],o=[];e.getCustomInstrumentList().forEach(u=>{var d,g;const I=null===(d=u.getInstrument())||void 0===d?void 0:d.ticker,C=null===(g=u.getInstrument())||void 0===g?void 0:g.jsonConfig;null!=I&&null!=C&&(Array.isArray(C)?C:[C]).forEach(S=>{null!=S.url&&(s.push(I),o.push(this.getJsonPromise(S.url,S.dataType)))})});const l=yield Promise.all(o);r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("Chart.Data.Custom: loadCustomData","data=",l),s.forEach((u,d)=>{n[u]=Object.assign(Object.assign({},n[u]),l[d])}),e.getCustomInstrumentList().forEach(u=>{var d,g;const I=null===(d=u.getInstrument())||void 0===d?void 0:d.ticker;null===(g=u.getChartData())||void 0===g||g.setChartDataFromCustomData(n,I)})})}static getJsonPromise(t,e){return new Promise((n,i)=>{this.getJSON(t,(s,o)=>{if(s)return i(s);n("dividendData"!==e?"splitData"!==e?"calendarData"!==e?this.getCustomDataJsonTimeseriesResult(o):this.getCustomDataJsonCalendarResult(o):this.getCustomDataJsonSplitResult(o):this.getCustomDataJsonDividendResult(o))})})}static getCustomDataJsonTimeseriesResult(t){const e={};return e.ohlcData=(t=t||[]).filter(n=>null!=n[0]&&null!=n[1]&&null!=n[2]&&null!=n[3]&&null!=n[4]).map(n=>[n[0],n[1],n[2],n[3],n[4]]),e.lastData=t.filter(n=>null!=n[0]&&null!=n[4]).map(n=>[n[0],n[4]]),e.volumeData=t.filter(n=>null!=n[0]&&null!=n[5]).map(n=>[n[0],n[5]]),e.turnoverData=t.filter(n=>null!=n[0]&&null!=n[6]).map(n=>[n[0],n[6]]),t.length>7&&(e.bidData=t.filter(n=>null!=n[0]&&null!=n[7]).map(n=>[n[0],n[7]])),t.length>8&&(e.askData=t.filter(n=>null!=n[0]&&null!=n[8]).map(n=>[n[0],n[8]])),t.length>9&&(e.midData=t.filter(n=>null!=n[0]&&null!=n[9]).map(n=>[n[0],n[9]])),e}static getCustomDataJsonDividendResult(t){const e={};return e.dividendData=(t=t||[]).filter(n=>null!=n[0]&&null!=n[1]).map(n=>({x:n[0],dividend:n[1],text:n[2]})),e}static getCustomDataJsonSplitResult(t){const e={};return e.splitData=(t=t||[]).filter(n=>null!=n[0]).map(n=>({x:n[0],text:n[1]})),e}static getCustomDataJsonCalendarResult(t){const e={};return e.calendarData=(t=t||[]).filter(n=>null!=n[0]).map(n=>({x:n[0],text:n[1]})),e}static getJSON(t,e){const n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="json",n.onload=()=>{const i=n.status;e(200===i?null:i,n.response)},n.send()}}class Fs{constructor(t){this.chartInstrumentList=t,this.globalChartSettings=t?.getGlobalChartSettings()}searchAllChartData(t,e){this.searchChartBasicData(t,e)}searchChartBasicData(t,e){var n,i;if(!this.globalChartSettings)return;t?.start(),this.globalChartSettings.stopExtremesUpdate=!0;const s=fe.depositSettings(this.globalChartSettings);let o=!1;const l=()=>{o||(o=!0,fe.depositedSettingsDiffer(this.globalChartSettings,s)||(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("ChartWidget: getChartBasicData (final callback)","chartInstrumentList=",this.chartInstrumentList.get()),r.InfrontUtil.setZeroTimeout(()=>{this.globalChartSettings.stopExtremesUpdate=!1,t?.stop(),this.searchChartData(t,s,e)})))};null!==(n=this.chartInstrumentList.getSearchInstrumentList())&&void 0!==n&&n.length||l();const u=setTimeout(l,ht.kChartInformationTimeout),d=new r.InfrontUtil.MultiCallbackHandler(()=>{clearTimeout(u),l()}),g=[];null===(i=this.chartInstrumentList.getSearchInstrumentList())||void 0===i||i.forEac
1h(I=>{r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: getChartBasicData (instrument loop)","chartInstrument=",I);const C=d.addCallback(()=>{}),S=d.addCallback(()=>{I.setInstrumentSettings({homeCurrency:I.getSymbolData(r.InfrontSDK.BasicField.Currency),decimals:I.getSymbolData(r.InfrontSDK.SymbolField.Decimals)})});g.push(()=>{I.getFeed().searchMetaData(this.globalChartSettings,I.getInstrument(),C),I.getSymbol().searchSymbolData(this.globalChartSettings,I.getInstrument(),S)})}),g.forEach(I=>I())}searchChartData(t,e,n){var i,s;if(!this.globalChartSettings)return;r.Infront.DEBUG_WIDGET_CHART_NG&&console.time("[Data/Search] timing searchChartData"),t?.start(),this.globalChartSettings.stopExtremesUpdate=!0,e=e??fe.depositSettings(this.globalChartSettings);const o={};let l=!1;const u=()=>{var C,S,N;l||(l=!0,r.Infront.DEBUG_WIDGET_CHART_NG&&console.timeEnd("[Data/Search] timing searchChartData"),fe.depositedSettingsDiffer(this.globalChartSettings,e)||(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("ChartWidget: getChartData (final callback)","chartInstrumentList=",this.chartInstrumentList.get()),null===(C=this.chartInstrumentList.getSearchInstrumentList())||void 0===C||C.forEach(k=>{if(!k.isFromCache){const x=o[k.getId()];k.setChartData(this.chartInstrumentList,x,e.snapTime)}k.setCompanyEventData(),k.setCalendarEventData()}),null===(S=this.chartInstrumentList.getChartCrossrates())||void 0===S||S.setCrossrates(),fe.showHidePeriods(this.chartInstrumentList),r.InfrontUtil.isFunction(n)&&n(),this.globalChartSettings.stopExtremesUpdate=!1,t?.stop(),null===(N=this.chartInstrumentList.getChartWrapper())||void 0===N||N.requestUpdateChart()))};null!==(i=this.chartInstrumentList.getSearchInstrumentList())&&void 0!==i&&i.length||u();const d=setTimeout(u,ht.kChartDataTimeout),g=new r.InfrontUtil.MultiCallbackHandler(()=>{clearTimeout(d),u()}),I=[];null===(s=this.chartInstrumentList.getSearchInstrumentList())||void 0===s||s.forEach(C=>{this.searchChartDataForInstrument(C,g,I,e.snapTime,o)}),I.forEach(C=>C())}searchChartDataForInstrument(t,e,n,i,s){var o;if(this.globalChartSettings){if(t.isFromCache=!1,this.searchChartGeneralData(t,e,n),null===(o=this.globalChartSettings)||void 0===o?void 0:o.caching){const l=this.chartInstrumentList.getChartCache(),u={};Jn.timeSeriesDataTypes.forEach(d=>{u[d]=l.getValidCacheDataByInstrument(t,i,d)}),l.cacheDataExists(u)&&(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: setChartDataFromCache (instrument loop)","chartInstrument=",t),t.isFromCache=!0,t.setChartDataFromCache(u))}t.isFromCache||(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: searchChartDataFromTimeSeries (instrument loop)","chartInstrument=",t),this.searchChartDataFromTimeseries(t,e,s,n))}}searchChartGeneralData(t,e,n){if(!this.globalChartSettings)return;const i=e.addCallback(()=>{}),s=e.addCallback(()=>{}),o=e.addCallback(()=>{});n.push(()=>{var l;t.getTimeSeries().searchTimeSeriesStreaming(this.globalChartSettings,t,i,null===(l=this.chartInstrumentList.getChartStreaming())||void 0===l?void 0:l.getTimeSeriesStreamingCallback()),t.getCompanyHistory().searchCompanyHistoryData(this.globalChartSettings,t,s),t.getFinancialCalendar().searchEventData(this.globalChartSettings,t,o)})}searchChartDataFromTimeseries(t,e,n,i){if(!this.globalChartSettings)return;const s=e.addCallback(o=>{n[t.getId()]=o});i.push(()=>{t.getTimeSeries().searchTimeSeries(this.globalChartSettings,t,s)})}}class fe{static getPeriodFromSelectablePeriod(t){return"string"==typeof t?fe.kPeriodIds[t]:this.isIntradayPeriod(t)||this.isHistoricalPeriod(t)?t:null}static getSelectablePeriodList(t){const e=t?.map(n=>this.getPeriodFromSelectablePeriod(n));return this.sortUniqPeriodList(e)}static sortUniqPeriodList(t){if(t)return(t=t.filter(e=>null!=e)).sort((e,n)=>null==e&&null!=n?-1:null!=e&&null==n?1:null==e&&null==n?0:e<n?-1:e>n?1:0),t=t.filter((e,n)=>t.indexOf(e)===n)}static getLastPeriodSettings(t){return{lastPeriod:t.currentPeriod,lastDataResolution:Ke.getDataResolution(t),lastDataEndDate:Hs(t.dataEndDate),lastDataStartDate:Hs(t.dataStartDate),lastIsIntraday:!!t.isIntraday,lastHasAllData:!!t.hasAllData}}static setPeriod(t,e,n,i){if(!t)return;
1const s=this.getLastPeriodSettings(t);switch(t.currentPeriod=e,t.currentEndDate.set(new Date),t.currentStartDate.set(null),t.isIntraday=this.isIntradayPeriod(e),t.isOneDayUntouched=!1,t.isHistoryPeriodUntouched=!1,t.isAfterSetPeriod=!0,t.hasAllData=!1,t.needDataReload=!1,e){case qt.SECOND:case qt.PERIOD_24H:case qt.ONE_DAY:t.currentStartDate.set(new Date),t.isOneDayUntouched=!0;break;case qt.TWO_DAYS:t.currentStartDate.set(r.InfrontUtil.addWeekdayDays(t.currentEndDate.get(),-1));break;case qt.THREE_DAYS:t.currentStartDate.set(r.InfrontUtil.addWeekdayDays(t.currentEndDate.get(),-2));break;case qt.FIVE_DAYS:t.currentStartDate.set(r.InfrontUtil.addWeekdayDays(t.currentEndDate.get(),-4));break;case qt.TEN_DAYS:t.currentStartDate.set(r.InfrontUtil.addWeekdayDays(t.currentEndDate.get(),-9));break;case qt.THIRTY_DAYS:t.currentStartDate.set(r.InfrontUtil.addMonths(t.currentEndDate.get(),-1));break;case qt.NINETY_DAYS:t.currentStartDate.set(r.InfrontUtil.addMonths(t.currentEndDate.get(),-3));break;case At.ONE_WEEK:t.currentStartDate.set(r.InfrontUtil.addDays(t.currentEndDate.get(),-7)),t.isHistoryPeriodUntouched=!0;break;case At.ONE_MONTH:t.currentStartDate.set(ar(t.currentEndDate.get(),1)),t.isHistoryPeriodUntouched=!0;break;case At.THREE_MONTHS:t.currentStartDate.set(ar(t.currentEndDate.get(),3)),t.isHistoryPeriodUntouched=!0;break;case At.SIX_MONTHS:t.currentStartDate.set(ar(t.currentEndDate.get(),6)),t.isHistoryPeriodUntouched=!0;break;case At.NINE_MONTHS:t.currentStartDate.set(ar(t.currentEndDate.get(),9)),t.isHistoryPeriodUntouched=!0;break;case At.ONE_YEAR:t.currentStartDate.set($n(t.currentEndDate.get(),1)),t.isHistoryPeriodUntouched=!0;break;case At.TWO_YEARS:t.currentStartDate.set($n(t.currentEndDate.get(),2)),t.isHistoryPeriodUntouched=!0;break;case At.THREE_YEARS:t.currentStartDate.set($n(t.currentEndDate.get(),3)),t.isHistoryPeriodUntouched=!0;break;case At.FIVE_YEARS:t.currentStartDate.set($n(t.currentEndDate.get(),5)),t.isHistoryPeriodUntouched=!0;break;case At.TEN_YEARS:t.currentStartDate.set($n(t.currentEndDate.get(),10)),t.isHistoryPeriodUntouched=!0;break;case At.LYTD:t.currentStartDate.set($n(new Date,1)),ks(t.currentStartDate,1),Bs(t.currentStartDate,0),t.isHistoryPeriodUntouched=!0;break;case At.YTD:t.currentStartDate.set(new Date),ks(t.currentStartDate,1),Bs(t.currentStartDate,0),t.isHistoryPeriodUntouched=!0;break;case At.ALL:t.currentStartDate.set(null),t.isHistoryPeriodUntouched=!0;break;case At.CUSTOM:t.currentStartDate.set(new Date(n)),t.currentEndDate.set(new Date(i));break;default:t.currentStartDate.set(new Date)}this.setDataStartEndDate(t,s)}static setDataStartEndDate(t,e){if(!t)return;let n=!1;null!=t.currentStartDate.get()&&Vs(t.currentStartDate,0,0,0,0),null!=t.currentEndDate.get()&&Vs(t.currentEndDate,23,59,59,999);const i=ha(t.currentEndDate.get()),s=ha(t.currentStartDate.get()),o=e.lastIsIntraday!==t.isIntraday,l=e.lastDataResolution!==Ke.getDataResolution(t);if(t.isIntraday)!e.lastHasAllData||o||l?e.lastPeriod<t.currentPeriod&&(n=!0):(t.hasAllData=!0,n=!1);else{null==i?r.InfrontUtil.errorLog("ChartPeriod: Request historical period, but end data is not set. This is a bug, please fix!"):(null==e.lastDataEndDate||e.lastDataEndDate.getTime()<i)&&(t.dataEndDate=new Date(i),n=!0);const u=this.getExtendedDataStartTime(t),d=null!=u?Math.min(u,s):s;!e.lastHasAllData||o||l?null==s?(t.dataStartDate=null,t.hasAllData=!0,n=!0):(null==e.lastDataStartDate||e.lastDataStartDate.getTime()>d)&&(t.dataStartDate=new Date(d),n=!0):(t.hasAllData=!0,n=!1)}(o||l)&&(t.hasAllData=!1,n=!0),t.needDataReload||(t.needDataReload=n)}static setIntradayDataStartEndDate(t){var e;const n=t?.getGlobalChartSettings();if(!n?.isIntraday)return;const i=null===(e=t.get())||void 0===e?void 0:e.map(s=>{var o;const l=s.getInstrumentSettings();if(!l?.visible)return;const u=s.getChartDataType(),d=s.getChartDataByType(u);return null===(o=d?.[0])||void 0===o?void 0:o[0]}).filter(s=>s);n.dataEndDate=new Date,n.dataStartDate=i?.length?new Date(Math.min(...i)):n.dataEndDate}static adjustCurrentStartDateFromChartData(t){const e=t?.getMainInstrument(),n=t?.getGlobalChartSettings();e&&n?.currentStartDate&&(n.isIntraday?fe.adjustIntradayCurrentStartDate(e,n):fe.adjustHistoryCurrentStartDate(e,n))}static adjustIntradayCurrentStartDate(t,e){var n;if(e.currentPeriod===qt.ONE_DAY&&!e.isOneDayUntouched||[qt.THIRTY_DAYS,qt.NINETY_DAYS].includes(e.currentPeriod))return;const i=null===(n=e.currentStartDate.get())||void 0===n?void 0:n.getTime(),s=t.getChartDataType(),o=t.getChartDataByType(s),l=o.findIndex(u=>u[0]>=i);l>0&&e.currentStartDate.set(new Date(o[l][0]))}static adjustHistoryCurrentStartDate(t,e){var n;if(!e.adjustStartDate||!e.isHistoryPeriodUntouched||[At.ALL,At.CUSTOM].includes(e.currentPeriod))return;const i=null===(n=e.currentStartDate.get())||void 0===n?void 0:n.getTime(),s=t.getChartDataType(),o=t.getChartDataByType(s),l=o.findIndex(u=>u[0]>=i);l>0&&e.currentStartDate.set(new Date(o[l-1][0]))}static getExtendedDataStartTime(t){const e=Math.min(ha(this.getNavigatorExtendedDataStartDate(t))||1/0,ha(this.getIndicatorExtendedDataStartDate(t))||1/0);return e!==1/0?e:null}static getNavigatorExtendedDataStartDate(t){if(!t.showNavigator)return null;const e=t?.currentPeriod,n=t?.dataEndDate;if(!e||!n)return null;let i;switch(e){case At.ONE_MONTH:case At.THREE_MONTHS:case At.SIX_MONTHS:case At.NINE_MONTHS:i=$n(n,2);break;case At.ONE_YEAR:case At.TWO_YEARS:i=$n(n,3);break;case At.THREE_YEARS:i=$n(n,5);break;case At.FIVE_YEARS:i=$n(n,10);break;case At.LYTD:case At.YTD:i=$n(n,3);break;default:i=null}return i}static getIndicatorExtendedDataStartDate(t){var e;const n=null===(e=t?.currentStartDate)||void 0===e?void 0:e.get();if(!n)return null;let i;return t.maxIndicatorsPeriod&&(i=Gs(n,2.5*t.maxIndicatorsPeriod)),i}static setHistoryPeriodUntouched(t,e){const n=t?.getGlobalChartSettings();n&&e===Ns&&(n.isHistoryPeriodUntouched=!1)}static getIntradayDaysBack(t){let e=0;return e+=this.getIntradayDaysBackForPeriodId(t.currentPeriod),!t.isOneDayUntouched&&t.loadIntradayIndicatorsExtraData&&(e+=this.getIntradayIndicatorAdditionalDaysBack(t)),Math.min(e,Nr.MAX_INTRADAY_DAYS_BACK)}static getIntradayIndicatorAdditionalDaysBack(t){let e=0;const n=t.maxIndicatorsPeriod;if(n>0){const i=Ke.getCurrentResolution(t),s=Ke.INTRADAY_RESOLUTION_TO_DAYS_BACK[i];s&&(e=Math.max(5,Math.ceil(s*n*2.5)))}return Math.min(e,Nr.MAX_INTRADAY_DAYS_BACK)}static getIntradayDaysBackForPeriodId(t){let e=0;switch(t){case qt.SECOND:case qt.PERIOD_24H:case qt.ONE_DAY:e=0;break;case qt.TWO_DAYS:e=1;break;case qt.THREE_DAYS:e=2;break;case qt.FIVE_DAYS:e=4;break;case qt.TEN_DAYS:e=9;break;case qt.THIRTY_DAYS:e=29;break;case qt.NINETY_DAYS:e=89}return Math.min(e,Nr.MAX_INTRADAY_DAYS_BACK)}
1static createPeriods(t,e,n,i){t&&e&&(t.clear(),e.forEach((s,o)=>{const l={id:s,name:this.getLabelForPeriod(s,n,"Short"),label:this.getLabelForPeriod(s,n),separator:i.includes(o),selected:new r.InfrontUtil.Observable,available:new r.InfrontUtil.Observable,icon:s===lt.CUSTOM?Ae.getSvgIcon("calendar"):void 0};t.push(l)}))}static createPeriodButtonSeparatorList(t,e,n){const i=[];if(n?.length){if(e&&fe.hasMixedPeriods(n)||t){const s=fe.getIndexMaxIntradayPeriod(n);null!=s&&i.push(s)}if(e&&n.includes(lt.CUSTOM)||t){const s=fe.getIndexMaxHistoricalPeriod(n);null!=s&&i.push(s)}n.length>1&&t&&i.push(n.length-1)}return i}static hasMixedPeriods(t){let e=!1,n=!1;return t?.forEach(i=>{fe.isIntradayPeriod(i)&&(e=!0),fe.isHistoricalPeriod(i)&&(n=!0)}),e&&n}static getIndexMaxIntradayPeriod(t){const e=t.filter(n=>n<1e3).map(n=>n);return e.length?e.indexOf(Math.max(...e)):null}static getIndexMaxHistoricalPeriod(t){const e=t.filter(n=>n!==lt.CUSTOM).map(n=>n);return e.length?e.indexOf(Math.max(...e)):null}static getLabelForPeriod(t,e,n=""){return null!=lt[t]?e.get(ht.kLanguageKeyPeriod+n,lt[t]):null}static depositSettings(t){var e,n,i,s;return{snapTime:(new Date).getTime(),currentPeriod:t?.currentPeriod,currentStartTime:null===(n=null===(e=t?.currentStartDate)||void 0===e?void 0:e.get())||void 0===n?void 0:n.getTime(),currentEndTime:null===(s=null===(i=t?.currentEndDate)||void 0===i?void 0:i.get())||void 0===s?void 0:s.getTime()}}static depositedSettingsDiffer(t,e){var n,i,s,o;return!t.isIntraday&&(t.currentPeriod!==e.currentPeriod||(null===(i=null===(n=t.currentStartDate)||void 0===n?void 0:n.get())||void 0===i?void 0:i.getTime())!==e.currentStartTime||(null===(o=null===(s=t.currentEndDate)||void 0===s?void 0:s.get())||void 0===o?void 0:o.getTime())!==e.currentEndTime)}}function Vs(a,t,e,n,i){const s=a.get();e=e??s.getMinutes(),n=n??s.getSeconds(),i=i??s.getMilliseconds(),a.set(new Date(s.setHours(t,e,n,i)))}function Bs(a,t,e){const n=a.get();e=e??n.getDate(),a.set(new Date(n.setMonth(t,e)))}function ks(a,t){const e=a.get();a.set(new Date(e.setDate(t)))}function ha(a){return null!=a&&r.InfrontUtil.isDate(a)?a.getTime():null}function Hs(a){return null!=a&&r.InfrontUtil.isDate(a)?new Date(a.getTime()):null}function Gs(a,t){const e=new Date(a);return e.setDate(e.getDate()-t),e.setHours(0,0,0,0),e}function Mo(a,t){return Gs(a,7*t)}function ar(a,t){const e=new Date(a);return e.setMonth(e.getMonth()-t),e.setHours(0,0,0,0),e}function Po(a,t){return ar(a,3*t)}function $n(a,t){const e=new Date(a);return e.setFullYear(e.getFullYear()-t),e.setHours(0,0,0,0),e}function yr(a,t=null,e=null){var n;let i=!1;try{i=!!a&&!isNaN(null===(n=new Date(a))||void 0===n?void 0:n.getTime())}catch{}if(i&&null!=t&&null!=e&&yr(t)&&yr(e)){const s=new Date(a);i=s.getTime()>=t.getTime()||s.getTime()<=e.getTime()}return i}fe.kPeriodIds={S:qt.SECOND,"1D":qt.ONE_DAY,"24H":qt.PERIOD_24H,"2D":qt.TWO_DAYS,"3D":qt.THREE_DAYS,"5D":qt.FIVE_DAYS,"10D":qt.TEN_DAYS,"30D":qt.THIRTY_DAYS,"90D":qt.NINETY_DAYS,"1W":At.ONE_WEEK,"1M":At.ONE_MONTH,"3M":At.THREE_MONTHS,"6M":At.SIX_MONTHS,"9M":At.NINE_MONTHS,"1Y":At.ONE_YEAR,"2Y":At.TWO_YEARS,"3Y":At.THREE_YEARS,"5Y":At.FIVE_YEARS,"10Y":At.TEN_YEARS,LYTD:At.LYTD,YTD:At.YTD,ALL:At.ALL,CUSTOM:At.CUSTOM},fe.isHistoricalPeriod=ra,fe.isIntradayPeriod=wa,fe.showHidePeriods=vs;class Ys{constructor(){}get(){return this}getEventData(){return this.eventData}searchEventData(t,e,n){if(!t||!e?.getInstrument()||!t.showCalendar||null!=this.eventData)return void n();const i=new Date,s=$n(i,20),o={source:e.getInstrument(),from:s,to:i,limit:100},l=t.source;l?.getCalendarEventData(o,u=>{r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("Data/SDK/FinancialCalendar (searchEventData, callback):","eventData=",u,"instrument=",e.getInstrument(),"options=",o),this.eventData=u,n()})}destroy(){}}class ga{constructor(t,e,n){this.isMainInstrument=!1,this.isFromCache=!1,this.isOhlcType=null,this.globalChartSettings=n,this.index=e,this.isMainInstrument=0===e,this.add(t)}add(t,e=!0){this.init(e),this.setInstrument(t)}replace(t,e=!1){this.add(t,e)}init(t=!0){var e;
1if(this.isFromCache=!1,this.isOhlcType=null,this.globalChartSettings.needDataReload=!0,this.chartData&&this.chartData.destroy(),this.chartData=new Jn,this.timeSeries&&this.timeSeries.destroy(),this.timeSeries=new Nr,this.feed&&this.feed.destroy(),this.feed=new La,this.symbol&&this.symbol.destroy(),this.symbol=new Pa,this.companyHistory&&this.companyHistory.destroy(),this.companyHistory=new ls,this.financialCalendar&&this.financialCalendar.destroy(),this.financialCalendar=new Ys,t||null==this.instrumentSettings){this.instrumentSettings={},this.setId(this.newChartInstrumentId()),this.setInitialChartType();const n=null!==(e=this.globalChartSettings.instrumentColorList)&&void 0!==e&&e.length?this.globalChartSettings.instrumentColorList[this.index%this.globalChartSettings.instrumentColorList.length]:null;this.setInstrumentSettings(Object.assign(Object.assign({dataType:Gt.AUTO,visible:!0,lineWidth:2},Bt.getCandleStickDefaultColors()),{color:n,volumeColor:this.getFollowingVolumeColor(n),showVolume:!!this.isMainInstrument&&!!this.globalChartSettings.showVolume,volumeUseUpDownColors:!1,showVolumeUnderlay:!!this.isMainInstrument&&!!this.globalChartSettings.showVolumeUnderlay,volumeUnderlayUseUpDownColors:!0,volumeType:this.globalChartSettings.volumeType,volumePositiveColor:this.globalChartSettings.volumePositiveColor,volumeNegativeColor:this.globalChartSettings.volumeNegativeColor,adjustSplits:!!this.globalChartSettings.adjustSplits,adjustDividends:!!this.globalChartSettings.adjustDividends,showSplits:!!this.globalChartSettings.showSplits,showDividends:!!this.globalChartSettings.showDividends,showCalendar:!!this.globalChartSettings.showCalendar,showNews:!!this.globalChartSettings.showNews,showReleases:!!this.globalChartSettings.showReleases,companyEventSmallDots:!!this.globalChartSettings.companyEventSmallDots})),this.setTargetCurrency(this.globalChartSettings.targetCurrency)}}newChartInstrumentId(){return(this.isMainInstrument?Qt.MAIN:Qt.INSTRUMENT)+r.InfrontUtil.makeUUID()}get(){return this}setId(t){this.instrumentSettings?this.instrumentSettings.id=t:r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartInstrument (setId): instrumentSettings not initialized")}getId(){var t;return null===(t=this.instrumentSettings)||void 0===t?void 0:t.id}getIndex(){return this.index}setInstrument(t){this.instrumentSettings?this.instrumentSettings.instrument=t:r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartInstrument: setInstrument, instrumentSettings not initialized")}getInstrument(){var t;return null===(t=this.instrumentSettings)||void 0===t?void 0:t.instrument}getInstrumentSettings(){return this.instrumentSettings}setInstrumentSettings(t){var e,n,i;if(!t)return;let s=!1;Object.keys(t).forEach(o=>{this.instrumentSettings[o]!==t[o]&&(s=s||Xe.includes(o)&&(!Array.isArray(t[o])&&this.instrumentSettings[o]!==t[o]||Array.isArray(t[o])&&!r.InfrontUtil.arraysAreEqual(this.instrumentSettings[o],t[o])),this.instrumentSettings[o]=t[o])}),this.isMainInstrument&&(this.globalChartSettings.chartType=null!==(e=this.instrumentSettings.chartType)&&void 0!==e?e:this.globalChartSettings.chartType,this.globalChartSettings.showVolume=null!==(n=this.instrumentSettings.showVolume)&&void 0!==n?n:this.globalChartSettings.showVolume,this.globalChartSettings.showVolumeUnderlay=null!==(i=this.instrumentSettings.showVolumeUnderlay)&&void 0!==i?i:this.globalChartSettings.showVolumeUnderlay),s&&(this.globalChartSettings.needDataReload=s)}getInstrumentParams(){const t={};return Oe.forEach(e=>{t[e]=this.instrumentSettings[e]}),t}getInstrumentName(){var t;return this.getSymbolData(r.InfrontSDK.SymbolField.PreDisplayTicker)||this.getSymbolData(r.InfrontSDK.SymbolField.Ticker)||(null===(t=this.getInstrument())||void 0===t?void 0:t.ticker)||null}getInstrumentFullName(){var t;return this.getSymbolData(r.InfrontSDK.SymbolField.FullName)||(null===(t=this.getInstrument())||void 0===t?void 0:t.full_name)||null}getTimeSeries(){return this.timeSeries.get()}getFeed(){return this.feed.get()}getMetaData(){var t,e;return(null===(e=null===(t=this.feed.get())||void 0===t?void 0:t.getMetaData())||void 0===e?void 0:e[0])||{}}getSymbol(){return this.symbol.get()}getSymbolData(t){var e;return null===(e=this.symbol.getSymbolData())||void 0===e?void 0:e.get(t)}getCompanyHistory(){return this.companyHistory.get()}
1getFinancialCalendar(){return this.financialCalendar.get()}hasIntradaySupport(){return 86400!==this.getMetaData().minDelaySecs}isHistoricalPeriodOrHasIntradaySupport(){var t;return!(null!==(t=this.globalChartSettings)&&void 0!==t&&t.isIntraday)||this.hasIntradaySupport()}getSeriesVisible(){var t;return(this.isMainInstrument||this.isHistoricalPeriodOrHasIntradaySupport()||!(null!==(t=this.globalChartSettings)&&void 0!==t&&t.isIntraday))&&!!this.instrumentSettings.visible}setTimeSeriesData(t){var e;null===(e=this.timeSeries)||void 0===e||e.setTimeSeriesData(t)}getTimeSeriesData(){var t;null===(t=this.timeSeries)||void 0===t||t.getTimeSeriesData()}setChartData(t,e,n){var i;this.timeSeries&&(null!=e&&this.setTimeSeriesData(e),null===(i=this.chartData)||void 0===i||i.setChartData(t,this,this.timeSeries.getTimeSeriesData(),n))}setChartDataFromCache(t){this.chartData.setChartDataFromCache(t)}getChartData(){return this.chartData}setChartDataStatus(t){null!=this.chartData&&(this.chartData.status=t)}getChartDataStatus(){var t;return null===(t=this.chartData)||void 0===t?void 0:t.status}getChartDataByType(t){var e;return null===(e=this.chartData)||void 0===e?void 0:e.getChartData(t)}getChartDataPointValKey(t){var e,n;return null===(e=this.chartData)||void 0===e?void 0:e.getChartDataPointValKey(t,null===(n=this.instrumentSettings)||void 0===n?void 0:n.dataType)}getChartDataType(){var t;return null===(t=this.chartData)||void 0===t?void 0:t.getChartDataType(this,this.globalChartSettings)}getDataType(t){var e;return null===(e=this.chartData)||void 0===e?void 0:e.getDataType(this,this.globalChartSettings,t)}canUseChartData(t,e){var n;return null===(n=this.chartData)||void 0===n?void 0:n.canUseChartData(t,e,this.isOhlcInstrument())}canUseChartType(t,e){var n;return null===(n=this.chartData)||void 0===n?void 0:n.canUseChartType(t,e,this.isOhlcInstrument())}setCompanyEventData(){this.chartData.setSplitData(this.companyHistory.getCompanyHistoryData()),this.chartData.setDividendData(this.companyHistory.getCompanyHistoryData())}setCalendarEventData(){this.chartData.setCalendarEventData(this.financialCalendar.getEventData())}setInitialChartType(){var t;let e=ht.kDefaultChartType;this.isMainInstrument&&(e=(null===(t=this.globalChartSettings)||void 0===t?void 0:t.chartType)||e),this.setChartType(e)}setDataType(t){this.instrumentSettings?this.instrumentSettings.dataType=t:r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartInstrument: setDataType, instrumentSettings not initialized")}setChartType(t){this.instrumentSettings?this.instrumentSettings.chartType=t:r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartInstrument: setChartType, instrumentSettings not initialized"),t===wt.BASELINE&&this.setChartTypeBaseline()}setChartTypeBaseline(){this.globalChartSettings.showOrdinate=!0,this.globalChartSettings.showOppositeOrdinate=!0,this.globalChartSettings.ordinateScaling=Pe.AUTO}getQuoteType(t=this.getChartDataType()){return t===Xt.OHLC?un.OHLC:un.CLOSE}isOhlcInstrument(){var t,e,n,i;if(null==this.chartData.hasData[Xt.OHLC])return null;const s=`~${this.globalChartSettings.adjustDividends}~${this.globalChartSettings.adjustSplits}~${this.globalChartSettings.adjustStartDate}~${this.globalChartSettings.currentPeriod}~${null===(t=this.globalChartSettings.dataStartDate)||void 0===t?void 0:t.getTime()}~${null===(e=this.globalChartSettings.dataEndDate)||void 0===e?void 0:e.getTime()}~${this.globalChartSettings.dataResolution}~${this.globalChartSettings.targetCurrency}`;if(null==(null===(n=this.isOhlcType)||void 0===n?void 0:n[s])){const o=!this.hasIntradaySupport();let l=!1;if(this.chartData.hasData[Xt.OHLC]&&!this.globalChartSettings.dataTypePreferOhlcOnShortage){const u=this.chartData.getChartDataLength(Xt.OHLC),d=this.chartData.getChartDataLength(Xt.LAST);l=d>10&&u<.8*d}null!==(i=this.isOhlcType)&&void 0!==i||(this.isOhlcType={}),this.isOhlcType[s]=!o&&!l}return this.chartData.hasData[Xt.OHLC]&&!!this.isOhlcType[s]}hasData(t){return!!this.chartData.hasData[t]}getColor(){var t;return null===(t=this.instrumentSettings)||void 0===t?void 0:t.color}getLabelColor(){var t;return null===(t=this.instrumentSettings)||void 0===t?void 0:t.labelColor}getLabelTextColor(){var t;return null===(t=this.instrumentSettings)||void 0===t?void 0:t.labelTextColor}
1getFollowingVolumeColor(t,e){var n,i,s,o,l;if(void 0===t&&(t=null===(n=this.instrumentSettings)||void 0===n?void 0:n.color),void 0===e&&(e=null!==(s=null===(i=this.instrumentSettings)||void 0===i?void 0:i.volumeColor)&&void 0!==s?s:Bt.getHexAlphaColor("#000000",null!==(l=null===(o=this.globalChartSettings)||void 0===o?void 0:o.volumeAlpha)&&void 0!==l?l:"AA")),t)return Bt.getHexAlphaColor(t,e.substr(-2))}setTargetCurrency(t){Zt[t]&&t!==Zt[Zt.MULTIPLE]&&(this.instrumentSettings.targetCurrency=t)}isSearchInstrument(){return!this.isCustomInstrument()}isCustomInstrument(){return this.getInstrument()instanceof $r}destroy(){this.timeSeries.destroy()}}class Ws{constructor(t){this.crossrates={},this.chartInstrumentList=t}getHomeCurrency(t){var e;return null===(e=t?.getInstrumentSettings())||void 0===e?void 0:e.homeCurrency}getTargetCurrency(t){var e;return null===(e=t?.getInstrumentSettings())||void 0===e?void 0:e.targetCurrency}needCrossrateConversion(t,e=this.getHomeCurrency(t),n=this.getTargetCurrency(t)){return!(!ii.isRealCurrency(n)||!ii.isRealCurrency(e))&&Zt[n]!==Zt[e]}getCrossrateKey(t){const e=this.getHomeCurrency(t),n=this.getTargetCurrency(t);return this.needCrossrateConversion(t,e,n)?`${e}${n}`:null}setCrossrates(){var t,e;const n=this.chartInstrumentList.getGlobalChartSettings();n&&(this.clearCrossrates(),null===(e=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.get())||void 0===e||e.forEach(i=>{var s;const o=this.getCrossrateKey(i);null!=o&&(this.crossrates[o]=new Pa,null===(s=this.crossrates[o].get())||void 0===s||s.searchSymbolData(n,new r.Infront.Instrument(12,o),()=>{}))}))}getCrossrateValue(t,e=!1){var n;if(!this.needCrossrateConversion(t))return 1;const i=this.getCrossrateKey(t);if(null==this.crossrates[i])return;const s=this.crossrates[i];return null===(n=s?.getSymbolData())||void 0===n?void 0:n.get(e?r.InfrontSDK.SymbolField.YesterdayClose:r.InfrontSDK.SymbolField.Last)}getYesterdayCrossrateValue(t){return this.getCrossrateValue(t,!0)}clearCrossrates(){var t;null===(t=Object.keys(this.crossrates))||void 0===t||t.forEach(e=>{var n;r.InfrontUtil.isFunction(null===(n=this.crossrates[e])||void 0===n?void 0:n.destroy)&&this.crossrates[e].destroy()}),this.crossrates={}}destroy(){this.clearCrossrates()}}class xo{static add(t){null!=t&&(t.SVGRenderer.prototype.getStyle=function(e){return this.style=t.extend({fontFamily:"inherit",fontSize:"12px"},e),this.style})}}class Uo{static add(t){t?.wrap(t.Pointer.prototype,"onContainerClick",function(e,n){if(this&&this.chart)return e.call(this,n)})}}const Ks="highcharts-legend-group-",xa="legend-wrapper",Ua="legend-delete-series",Fo=[Bn.EDIT_SERIES,Bn.EDIT_REMOVE_SERIES],zs=[Bn.REMOVE_SERIES,Bn.EDIT_REMOVE_SERIES];class Vo{constructor(t){this.chartInstrumentList=t}getLegendOptions(){var t;const e=this,n=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getGlobalChartSettings();return{floating:!0,x:0+(n?.showOppositeOrdinate&&!n?.ordinateLabelsOutside?50:0),y:-ir(n),align:"left",verticalAlign:"top",itemDistance:10,itemMarginTop:0,itemMarginBottom:0,symbolPadding:0,symbolWidth:0,symbolHeight:0,squareSymbol:!1,useHTML:!0,labelFormatter:function(){return e.getLegendItemLabel(this)},split:!0}}getLegendItemLabel(t,e=!1){var n,i;const s=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getGlobalChartSettings();if(!t||!s)return"";const o=(null===(i=t.options)||void 0===i?void 0:i.id)||"",l=`\n                background: ${this.getSeriesLabelBackground(t,o)};\n                border-bottom-color: ${this.chartInstrumentList.getSeriesColor(t,o)};
1\n                border-bottom-style: ${this.getSeriesLabelBottomStyle(o)};\n            `,u=this.getLegendItemDeleteButton(t,e);return`\n                <div class="${s.legendItemClick===Bn.NONE?`${xa} legend-wrapper--nopointer`:u?`${xa} legend-wrapper--delete`:xa} ${t.visible?"":"legend-wrapper--hidden"}" style="${l}">\n                    <span class="legend-label-series">${this.getSeriesLabel(t,o)}</span>\n                    ${u}\n                </div>\n            `}getSeriesLabel(t,e){var n,i,s;void 0===e&&(e=null===(n=t?.options)||void 0===n?void 0:n.id);const o=null===(i=this.chartInstrumentList)||void 0===i?void 0:i.getChartInstrumentById(e),l=o?.getInstrumentSettings(),u=l?.dataType,d=null===(s=this.chartInstrumentList)||void 0===s?void 0:s.getLanguageHandler();let g=t?.name||"n/a";if(null!=u){let I="";const C=u===Gt.AUTO?o?.getDataType(u):u;C!==Gt.CLOSE&&(I=d?.get(ht.kLanguageKey,"legend_"+C)),I.length&&(g=`${g} ${I}`)}if(o&&!o.isCustomInstrument()){let I="";l?.adjustDividends&&(I+=d?.get(ht.kLanguageKey,"legend_DividendIndicator")),ii.isDefaultCurrency(l?.targetCurrency)||(I+=(I.length?", ":"")+l.targetCurrency),I.length&&(g=`${g} (${I})`)}return g}getSeriesLabelBackground(t,e){var n,i,s;void 0===e&&(e=null===(n=t?.options)||void 0===n?void 0:n.id);let o="transparent";if(wi(e)){const l=null===(i=this.chartInstrumentList)||void 0===i?void 0:i.getGlobalChartSettings(),u=null===(s=this.chartInstrumentList)||void 0===s?void 0:s.getChartInstrumentById(e),d=u?.getColor();o=Bt.getHexAlphaColor(d??t.color,l.legendAlpha)}return o}getSeriesLabelBottomStyle(t){let e="solid";return(t.startsWith(Qt.INDICATOR)||la(t))&&(e="dashed"),e}getLegendItemDeleteButton(t,e=!1){var n,i;const s=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getGlobalChartSettings();if(!t||!s)return"";const o=(null===(i=t.options)||void 0===i?void 0:i.id)||"";let l=!1;return e||(l=!oa(o)&&zs.includes(s.legendItemClick)),l?`<span class="${Ua} ${Ua}-${o}">&#10799;</span>`:""}getLegendItemClickEvent(t,e){var n,i,s,o,l,u,d,g,I,C;const S=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getGlobalChartSettings();if(!e||!S)return;const N=null===(i=null==(t=t||e.target)?void 0:t.options)||void 0===i?void 0:i.id,k=null===(s=this.chartInstrumentList)||void 0===s?void 0:s.getChartLabels();if(k&&k.removeSeriesLabels(t),((null===(d=null===(u=null===(l=null===(o=e.browserEvent)||void 0===o?void 0:o.target)||void 0===l?void 0:l.classList)||void 0===u?void 0:u.value)||void 0===d?void 0:d.split(" "))||[]).includes(`${Ua}-${N}`))return e.preventDefault(),zs.includes(S.legendItemClick)&&As(this.chartInstrumentList,N),!1;if(Fo.includes(S.legendItemClick)){const x=Cs(N);if(wi(N)||x){const Y=null===(g=this.chartInstrumentList)||void 0===g?void 0:g.getWidgetOpenInstrumentSettings();Y?.(x?Na(N):N,x),e.preventDefault()}if(Rr(N)){const Y=null===(I=t?.options)||void 0===I?void 0:I.type,et=null===(C=this.chartInstrumentList)||void 0===C?void 0:C.getWidgetOpenIndicatorSettings();Y&&null!=et&&et(N,Y),e.preventDefault()}}else S.legendItemClick!==Bn.HIDE_SERIES&&e.preventDefault()}}class Ce{static disableTooltipPointerEvents(t){var e,n;r.InfrontUtil.isFunction(null===(n=null===(e=t.Tooltip)||void 0===e?void 0:e.prototype)||void 0===n?void 0:n.getLabel)&&t.wrap(t.Tooltip.prototype,"getLabel",function(i){const s=i.apply(this,Array.prototype.slice.call(arguments,1));return s?.css({pointerEvents:"none"}),s})}static getGlobalTooltipOptions(t){return{split:!0,shared:!1,shape:"rect",headerShape:"callout",headerFormat:"",borderWidth:0,shadow:!1,animation:!1,useHTML:!0,padding:0,positioner:function(e,n,i){return Ce.getPositioner(this,t,e,n,i)}}}static getVolumeTooltipOptions(t,e){return e?{pointFormatter:function(){return`${Hi(this.y,t,!1,2,!1,Pn.TOOLTIP_DECIMALS)}`}}:{pointFormat:""}}static getPrevCloseTooltipOptions(t,e,n=Ce.getTooltipLabels(t)){const i=gi(t);if(null==i)return{};const s=e?.getInstrumentSettings(),o=s?.decimals;return{pointFormatter:function(){var l,u;if(Bi(null===(u=null===(l=this.series)||void 0===l?void 0:l.options)||void 0===u?void 0:u.id)){const d=aa(t,e);return(null!=d?`<span style="color:${d}">\u25cf</span> `:"")+`<strong>${n.prevCloseLabel}</strong> ${i(this.y,o)}`}}}}static getOscillatorTooltipOptions(t,e){var n,i,s,o,l;if(null===(n=e?.getChartIndicators())||void 0===n||!n.isOscillator(t))return{};const u=null===(i=e?.getChartWrapper())||void 0===i?void 0:i.getHighcharts(),d=(null===(l=null===(o=null===(s=u?.defaultOptions)||void 0===s?void 0:s.plotOptions)||void 0===o?void 0:o[t.type])||void 0===l?void 0:l.tooltip)||{},g=d?.pointFormat;let I='<span style="color:{point.color}">{point.y}</span>';return g&&/<br\s*\/*>/gim.test(g)&&(I=g.replace(/[\n\r]*/gim,""),I=I.replace(/^.*?<br\s*\/*>(.*)$/gim,"$1"),I=I.replace(/<br\s*\/*>*/gim," "),t.type===Dt.MACD&&(I='<span style="color:{point.color}">\u25cf</span> '+I)),{tooltip:Object.assign(Object.assign({},d),{pointFormat:I})}}static getPositioner(t,e,n,i,s){var o,l,u,d,g,I;const C=t.chart,S=e?.getGlobalChartSettings(),N=s?.series,k=null===(o=N?.options)||void 0===o?void 0:o.id;if(!(wi(k)||Rr(k)||Dr(k)||ua(k)||Bi(k)))return{x:0,y:0};let x,Y=(null===(u=null===(l=S.tooltipOffsets)||void 0===l?void 0:l[k])||void 0===u?void 0:u.left)||8;const et=(null===(g=null===(d=S.tooltipOffsets)||void 0===d?void 0:d[k])||void 0===g?void 0:g.to
1p)||5;if(wi(k)||ua(k)||Bi(k))Y=S?.showOppositeOrdinate&&!S?.ordinateLabelsOutside?Y+50:Y;else if((Dr(k)||Rr(k))&&!Y){const rt=null===(I=N?.options)||void 0===I?void 0:I.name;Y=8*(rt?.length||12)}return x=s.isHeader?{x:0,y:0}:{x:C.plotLeft+Y,y:N.yAxis.top-C.plotTop+et},x}static setAllSeriesTooltipOffsets(t){var e,n,i;const s=t?.getGlobalChartSettings(),o=t?.getChart(),l=Da(t);if(!s||!o||!l?.length)return;s.tooltipOffsets||(s.tooltipOffsets={});const u=null===(e=s?.element)||void 0===e?void 0:e.querySelectorAll("div.highcharts-legend-item.highcharts-line-series, div.highcharts-legend-item.highcharts-area-series, div.highcharts-legend-item.highcharts-column-series"),d=u?.length>1?null===(n=u[u.length-1])||void 0===n?void 0:n.offsetTop:3,g=t.get();g?.forEach(C=>{const S=C.getId(),N=Es(t,S),k=sa(t)?2:0,x=N>-1?21*N:0,Y=25-ir(s)+d+k+x;s.tooltipOffsets[S]={top:Y,left:8}});const I=[...t?.getVolumeUnderlayList()||[],...t?.getOscillatorList()||[]];I?.forEach(C=>{var S,N,k;const Y=`${Ks}${ht.kOscillatorYAxisId}${C.id}`;let et;const rt=null===(S=s?.element)||void 0===S?void 0:S.querySelectorAll(`div.highcharts-legend.${Y}`),it=null===(N=rt?.[0])||void 0===N?void 0:N.querySelectorAll("div.highcharts-legend-item");if(it?.length){const mt=it[0];let Ct;if(it.length>1)for(let Kt=it.length-1;Kt>0;Kt--){const te=it[Kt];if((te.offsetTop||0)===(mt.offsetTop||0)){Ct=te;break}}Ct=Ct??mt;const Tt=Ct?.offsetLeft,Wt=null===(k=Ct?.lastChild)||void 0===k?void 0:k.offsetWidth;null!=Tt&&null!=Wt&&(et=Tt+Wt)}
1s.tooltipOffsets[C.id]={top:5,left:8+(et||0)}}),null===(i=o.series)||void 0===i||i.forEach(C=>{var S;const N=null===(S=C?.options)||void 0===S?void 0:S.id;(ua(N)||Bi(N))&&(s.tooltipOffsets[N]={top:28,left:8})})}static getPricesRows(t,e,n=Ce.getTooltipLabels(e),i=Ce.getTooltipLabelsMap(n)){const s=e?.getMainInstrument(),o=s?.getInstrumentSettings(),l=o?.dataType,u=o?.decimals;if(!s?.isOhlcInstrument()||[Gt.BID,Gt.ASK,Gt.MID].includes(l)){const g=Hi(t?.y,e,!1,u,!1,Pn.TOOLTIP_DECIMALS);return`<tr><td>${i[l]||n.closeLabel}:</td><td>${g}</td></tr>`}let d="";return[{label:n.openLabel,point:t?.open},{label:n.highLabel,point:t?.high},{label:n.lowLabel,point:t?.low},{label:n.closeLabel,point:t?.close}].forEach(g=>{d+=`\n                    <tr>\n                        <td>\n                            ${g.label}:\n                        </td>\n                        <td>\n                            ${Hi(g?.point,e,!1,u,!1,Pn.TOOLTIP_DECIMALS)}\n                        </td>\n                    </tr>\n                `}),d}static getDataTypeAddon(t,e,n=Ce.getTooltipLabels(e),i=Ce.getTooltipLabelsMap(n)){var s;const o=e?.getChartInstrumentById(t),l=null===(s=o?.getInstrumentSettings())||void 0===s?void 0:s.dataType;let u="";return[Gt.OPEN,Gt.HIGH,Gt.LOW,Gt.BID,Gt.ASK,Gt.MID].includes(l)&&(u=` ${i[l]}`||""),u}static getPointFormatter(t,e,n=Ce.getTooltipLabels(e),i=Ce.getTooltipLabelsMap(n)){var s;const o=t?.series;if(!o)return"";if(sa(e)){const g=e?.getMainInstrument();return`<table><span style="color:${t.color}">\u25cf</span> <strong> ${o.name} </strong>${Ce.getPctChangeText(t,o,e)}<br/>`+this.getPricesRows(t,e,n,i)+Ce.getGhostVolumeText(t,e,g?.hasData(Xt.VOLUME),n.volumeLabel,0,rn.VOLUME)+Ce.getGhostVolumeText(t,e,g?.hasData(Xt.TURNOVER),n.turnoverLabel,0,rn.TURNOVER)+"</table>"}let l="";const u=Ce.getDataTypeAddon(null===(s=o.options)||void 0===s?void 0:s.id,e,n,i);return l+=`<span style="color:${t.color}">\u25cf</span> <strong> ${o.name}${u} </strong>${Ce.getPctChangeText(t,o,e)}`,l}static getGlobalFormatter(t,e,n=Ce.getTooltipLabels(e),i=Ce.getTooltipLabelsMap(n)){var s,o,l;let u;if(!(null===(s=t.points)||void 0===s)&&s.length&&(u=t.points.filter(g=>{var I,C;return wi(null===(C=null===(I=g.series)||void 0===I?void 0:I.options)||void 0===C?void 0:C.id)})),!u?.length)return"";if(sa(e)){const I=u[0],C=null===(o=u[0])||void 0===o?void 0:o.series,S=e?.getMainInstrument();return`<table><span style="color:${I.color}">\u25cf</span> <strong> ${C.name} </strong>${Ce.getPctChangeText(I,C,e)}<br/>`+this.getPricesRows(I,e,n,i)+Ce.getGhostVolumeText(I,e,S?.hasData(Xt.VOLUME),n.volumeLabel,0,rn.VOLUME)+Ce.getGhostVolumeText(I,e,S?.hasData(Xt.TURNOVER),n.turnoverLabel,0,rn.TURNOVER)+"</table>"}let d="";for(const g of u){const I=g,C=g.series,S=Ce.getDataTypeAddon(null===(l=C.options)||void 0===l?void 0:l.id,e,n,i);d+=`<tr><td><span style="color:${I.color}">\u25cf</span> <strong> ${C.name}${S} </strong></td><td>${Ce.getPctChangeText(I,C,e)}</td></tr>`}return"<table>"+d+"</table>"}static getGhostVolumeText(t,e,n,i,s=0,o=rn.VOLUME){var l;if(!n)return"";const u=e.getChartInstrumentByIndex(s),d=e.getChart().get(Qt["GHOST_"+o]+u.getId()),g=d?.cropStart||0,I=null!=t?.index?t.index-g:-1,C=null===(l=Kn.getProcessedYData(d))||void 0===l?void 0:l.length;if(!C||I<0)return"";let S=null;return I<C&&(S=Ce.getProcessedValueAtIndex(d,I,"y")),`<tr><td>${i}:</td><td>${Hi(S,e,!1,2,!0,Pn.TOOLTIP_DECIMALS)}</td></tr>`}static getPctChangeText(t,e,n){if(!t||!e)return"";const i=this.getNeighbourCompareValue(t,e);if(!i)return"";const s=(t?.y-i)/i*100,o=Hi(s,n,!0,null,!1,Pn.TOOLTIP_DECIMALS_PERCENTAGE);return s>0?`<span style="color:${In}">+${o}</span>`:s<0?`<span style="color:${cn}">${o}</span>`:`${o}`}static getProcessedValueAtIndex(t,e,n){if(e<0)return null;const i=Kn.getProcessedYData(t);return Jn.getDataValueForPointValKey(i?.[e],n)}static getNeighbourCompareValue(t,e){const n=e?.cropStart||0;return Ce.getProcessedValueAtIndex(e,null!=t?.index&&t.index>0?t.index-n-1:0,e?.pointValKey)}static getFullRangeCompareValue(t){return t?.compareValue}}Ce.getTooltipLabels=ca,Ce.getTooltipLabelsMap=function(a){return{[Gt.OPEN]:a.openLabel,[Gt.HIGH]:a.highLabel,[Gt.LOW]:a.lowLabel,[Gt.BID]:a.bidLabel,[Gt.ASK]:a.askLabel,[Gt.MID]:a.midLabel}};const va_getNavigatorOverrides=a=>a?.areaStacking?{series:{stacking:null}}:{};class ma{static getSeriesOptions(t,e){const n=t?.getGlobalChartSettings(),i=e?.getInstrumentSettings();if(!n||!i)return{};if(n.chartType!==wt.BASELINE)return{};const s=e.isMainInstrument?In:i.color||null,o=e.isMainInstrument?cn:i.color||null,l=n.mainBackgroun
1dColor||null,u=null!=s?{fillColor:{linearGradient:{x1:0,x2:0,y1:0,y2:1},stops:[[0,s],[1,l??s]]}}:{},d=null!=o?{negativeFillColor:{linearGradient:{x1:0,x2:0,y1:0,y2:1},stops:[[0,l??o],[1,o]]}}:{};return Object.assign(Object.assign({threshold:e.isMainInstrument?n?.ordinateCompareBase:null,color:s,negativeColor:o},u),d)}static setMainBaselinePlotline(t){var e,n,i;const s=t?.getChart(),o=t?.getGlobalChartSettings();if(!s||!o)return;const l=null===(e=s.yAxis)||void 0===e?void 0:e[0],u=null===(n=t?.getMainInstrument())||void 0===n?void 0:n.getId();if(!s||!l||!u)return;const d=Qt.PLOTLINE_BASELINE+u;l.removePlotLine(d);const g=s.get(u),I=g?.compareValue,C=null===(i=g?.options)||void 0===i?void 0:i.compare;null!=I&&o.chartType===wt.BASELINE&&l.addPlotLine({id:d,value:"percent"===C?0:I,color:Zi,width:2,dashStyle:"Dash"})}static shouldApplyBaselineLogic(t,e){var n;return t===wt.BASELINE&&oa(null===(n=e?.options)||void 0===n?void 0:n.id)}static getBaselineLabelData(t,e,n){var i;const s=n?.compareValue;if(!this.shouldApplyBaselineLogic(e,n)||null==s)return[];const o="percent"===(null===(i=n?.options)||void 0===i?void 0:i.compare)?0:s,l=n?.yAxis,u=[],d=m(t,Zi);return u.push({value:o,plotY:l.toPixels(o,!1),backgroundColor:d.backgroundColor,textColor:d.textColor}),u}}class re{static getSeries(t){if(!t?.getLength())return[];const e=[],n=t.getGlobalChartSettings(),i=t.getChartIndicators();if(t.get().forEach((s,o)=>{const l=s.getInstrumentSettings(),u=this.getInstrumentSeries(t,s,o);if(null!=u&&e.push(u),l.showVolume&&s.isMainInstrument){const I=this.getVolumeSeries(t,s,null,!1);null!=I&&e.push(I);const C=i.getSeriesOptionsForSeriesId(I?.id);C?.forEach(S=>{this.shouldAddIndicatorSeries(n,S)&&e.push(S)})}let d=null;if(s.isMainInstrument||i.isVolumeBasedIndicatorLinkedTo(s)){const I=this.getGhostVolumeSeries(s,rn.VOLUME);if(null!=I&&(e.push(I),d=I.id),s.isMainInstrument){const C=this.getGhostVolumeSeries(s,rn.TURNOVER);null!=C&&e.push(C)}}if(l.showVolumeUnderlay){const I=this.getVolumeSeries(t,s,null,!0);null!=I&&e.push(I);const C=i.getSeriesOptionsForSeriesId(I?.id);C?.forEach(S=>{this.shouldAddIndicatorSeries(n,S)&&e.push(S)})}const g=i.getSeriesOptionsForChartInstrument(s,d);if(g?.forEach(I=>{this.shouldAddIndicatorSeries(n,I)&&e.push(I)}),[["showSplits",an.SPLIT],["showDividends",an.DIVIDEND],["showCalendar",an.CALENDAR]].forEach(([I,C])=>{if(l?.[I]){const S=this.getCompanyEventSeries(t,s,an[C]);null!=S&&e.push(S)}}),s.isMainInstrument){const I=da.getPrevCloseSeries(t,s);null!=I&&e.push(I)}}),n?.showOppositeOrdinate){const s=this.getOppositeLabelGhostSeries(t);null!=s&&e.push(s)}return e}static getInstrumentSeries(t,e,n){var i;const s=t?.getGlobalChartSettings(),o=e?.getInstrumentSettings();if(!s||!o?.instrument||!o?.id)return null;const l=t.getLength()+t.getAllIndicatorListLength(),u=e.getChartDataType(),d=this.getSeriesChartType(t,e),g=ca(t),I=Ce.getTooltipLabelsMap(g);this.setSeriesLabelColors(t,e);const C=null===(i=t.getGlobalChartSettings())||void 0===i?void 0:i.onPointMouseOver;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({type:d,id:o.id,yAxis:ht.kMainYAxisId,visible:e.getSeriesVisible(),showInLegend:!0,enableMouseTracking:!!s?.cursorEventsEnabled,showInNavigator:e.isMainInstrument,animation:!1,name:e.getInstrumentName(),data:e.getChartDataByType(u),pointValKey:e.getChartDataPointValKey(u),lineWidth:this.getInstrumentSeriesLineWidth(o)},this.getInstrumentSeriesColorOptions(s,e,n)),this.getSeriesCompareOptions(t)),{pointPlacement:null,tooltip:{pointFormatter:function(){return Ce.getPointFormatter(this,t,g,I)}},infront:{quoteType:e.getQuoteType(u)},zIndex:5+(s.mainOnTop?l-n:n)}),ma.getSeriesOptions(t,e)),us.getSeriesOptions(t,e)),s.areaStacking?{}:{dataGrouping:{enabled:!0}}),((a,t)=>a?.areaStacking?Object.assign({type:"area",stacking:a.areaStacking,threshold:0,dataGrouping:{enabled:!1}},t===Xt.OHLC?{pointValKey:"y"}:{}):{})(s,u)),s.areaStacking&&u===Xt.OHLC?{data:e.getChartDataByType(Xt.LAST)}:{}),{point:{events:{mouseOver:function(){C?.(this)}}}})}static getOppositeLabelGhostSeries(t){const e=t?.getGlobalChartSettings(),n=t?.getMainInstrument(),i=n?.getInstrumentSettings();if(!e||!i?.instrument||!i?.id)return null;const s=n.getChartDataType(),o=this.getSeriesChartType(t,n);return Object.assign(Object.assign({type:o,id:Qt.GHOST+i.id,yAxis:ht.kOppositeYAxisId,visible:!1,showInLegend:!1,enableMouseTracking:!1,showInNavigator:!1,animation:!1,data:n.getChartDataByType(s),pointValKey:n.getChartDataPointValKey(s),colorIndex:0}
1,this.getSeriesCompareOptions(t)),{pointPlacement:null,tooltip:{pointFormat:""},infront:{quoteType:n.getQuoteType(s)},zIndex:-100})}static getVolumeName(t,e=null,n=!1){return n?`Volume (${t.getInstrumentName()})`:"Vol"}static getVolumeSeriesId(t,e=null,n=!1){return e=e||this.getValidVolumeType(t.volumeType),Qt[e+(n?"_UNDERLAY":"")]+t.id}static getVolumeColorOptions(t,e=!1){const n=t?.getInstrumentSettings(),i=n?.color?{color:t.getFollowingVolumeColor()}:{colorIndex:0},s=!e&&n?.volumeUseUpDownColors||e&&n?.volumeUnderlayUseUpDownColors?{colors:[n?.volumePositiveColor,n?.volumeNegativeColor,n?.volumeNegativeColor]}:{colors:null};return Object.assign(Object.assign({},i),s)}static getValidVolumeType(t){return null!=rn[t]?t:rn.VOLUME}static getVolumeSeries(t,e,n=null,i=!1){const s=t?.getGlobalChartSettings(),o=e?.getInstrumentSettings();if(!s||!o?.instrument||!o?.id)return null;n=n||this.getValidVolumeType(o.volumeType);const l=this.getVolumeSeriesId(o,n,i);return Object.assign(Object.assign({type:"column",id:l,yAxis:i?ht.kOscillatorYAxisId+l:ht.kVolumeYAxisId,visible:!0,showInLegend:!0,enableMouseTracking:!!s?.cursorEventsEnabled,showInNavigator:!1,animation:!1,name:this.getVolumeName(e,n,i),data:e.getChartDataByType(Xt[n])},this.getVolumeColorOptions(e,i)),{pointPlacement:null,tooltip:Ce.getVolumeTooltipOptions(t,i),zIndex:4})}static getGhostVolumeSeries(t,e=null){const n=t?.getInstrumentSettings();if(!n?.instrument||!n?.id)return null;e=e||this.getValidVolumeType(n.volumeType);const i=Qt["GHOST_"+e]+n.id;return{type:"column",id:i,yAxis:ht.kGhostVolumeYAxisId,visible:!1,showInLegend:!1,enableMouseTracking:!1,showInNavigator:!1,animation:!1,name:i,data:t.getChartDataByType(Xt[e]),colorIndex:0,pointPlacement:null,tooltip:{pointFormat:""},zIndex:-100}}static getCompanyEventSeries(t,e,n=an.SPLIT){const i=t?.getGlobalChartSettings();if(!i||!e.hasData(Xt[n]))return null;const s=e?.getInstrumentSettings();if(!s?.instrument||!s?.id)return null;const o=Qt[n]+s.id;return Object.assign(Object.assign(Object.assign({type:"flags",shape:"circlepin",id:o,xAxis:ht.kFlagsXAxisId,yAxis:ht.kMainYAxisId,visible:!0,showInLegend:!1,linkedTo:s.id,onSeries:s.id,allowOverlapX:!0,enableMouseTracking:!!i?.cursorEventsEnabled,showInNavigator:!1,animation:!1,name:o,data:this.getCompanyEventData(t,e,n)},this.getCompanyEventSeriesDot(e,n)),this.getCompanyEventColorOptions(t,n)),{pointPlacement:null,tooltip:{pointFormatter:function(){var l,u;const d=null===(u=null===(l=this.series)||void 0===l?void 0:l.options)||void 0===u?void 0:u.id;if(re.isCompanyEventSeries(d)){const g=re.getOnSeriesColor(t,e);return(null!=g?`<span style="color:${g}">\u25cf</span> `:"")+this.options.text}return""}},zIndex:99})}static getCompanyEventSeriesDot(t,e=an.SPLIT){const n=t?.getInstrumentSettings(),i=!!n?.companyEventSmallDots,s=i?2:10;let o=" ";return i||(e===an.SPLIT?o="S":e===an.DIVIDEND?o="D":e===an.CALENDAR&&(o="C")),{title:o,height:s,width:s,y:-5}}static getCompanyEventData(t,e,n=an.SPLIT){var i;const s=t?.getGlobalChartSettings();let o=e.getChartDataByType(Xt[n]);return n===an.CALENDAR&&!(null===(i=s?.calendarFeeds)||void 0===i)&&i.length&&(o=o?.filter(l=>s.calendarFeeds.includes(l.feed))),this.getCompanyEventDataForDateRange(t,o)}static getCompanyEventDataForDateRange(t,e){var n,i;const s=t?.getGlobalChartSettings();if(!s||!e?.length)return[];let o,l;return s.currentPeriod!==At.ALL&&(o=null===(n=s.dataStartDate)||void 0===n?void 0:n.getTime(),l=null===(i=s.dataEndDate)||void 0===i?void 0:i.getTime()),isNaN(o)||isNaN(l)?e:e.filter(u=>u.x>=o&&u.x<=l)}static getSeriesChartType(t,e){const n=t?.getGlobalChartSettings(),i=e?.getInstrumentSettings();if(!n||!i)return wt.LINE;let s=i.chartType||n.chartType||wt.LINE;return s===wt.BASELINE?s=wt.AREA:s===wt.POINTS&&(s=wt.LINE),s}static getInstrumentSeriesLineWidth(t){return Me.includes(t?.chartType)?1:t.lineWidth||null}static setSeriesLabelColors(t,e){const n=this.calculateSeriesLabelColors(t,e.getColor());e.setInstrumentSettings({labelColor:n.backgroundColor,labelTextColor:n.textColor})}static getInstrumentSeriesColorOptions(t,e,n){const i=e?.getInstrumentSettings();return i?Object.assign(Object.assign(Object.assign(Object.assign({color:i.color||null,colorIndex:i.color?null:n},this.getOhlcColorsOptions(i)),this.getCandlestickColorsOptions(i)),this.getAreaFillColorOptions(t,i)),this.getMarkerColorsOptions(i)):{}}static getAreaFillColorOptions(t,e){var n;return e?.chartType===wt.AREA&&null!=e?.color?{fillColor:{linearGradient:{x1:0,x2:0,y1:0,y2:1}
1,stops:[[0,e.color],[1,null!==(n=t?.mainBackgroundColor)&&void 0!==n?n:e.color]]}}:{}}static getOhlcColorsOptions(t){const e=t.upColor||null,n=t.downColor||t.color||null;return[wt.OHLC].includes(t?.chartType)?{color:n,upColor:e}:{}}static getCandlestickColorsOptions(t){const e=t.downColor||t.color||void 0,n=t.upColor||void 0,i=[wt.CANDLESTICK].includes(t?.chartType)?{lineColor:t.wickColor||e,upLineColor:t.upWickColor||n}:{};return Me.includes(t?.chartType)?Object.assign({color:e,upColor:n},i):{}}static getMarkerColorsOptions(t){return{states:{hover:{halo:{attributes:Object.assign({},null!=t?.color?{fill:t.color,stroke:t.color}:{}),opacity:.25,size:8}}},marker:{states:{hover:{fillColor:t?.color||null,lineColor:t?.color||null}}}}}static getCompanyEventColorOptions(t,e){let i;if(e===an.SPLIT)i="#F0C030";else if(e===an.DIVIDEND)i="#009C0D";else{if(e!==an.CALENDAR)return{};i="#ff0000"}const s=i+"99",o=Et(s,t.getMainBackgroundColor());return{color:i,fillColor:s,lineColor:"#00000000",lineWidth:0,style:{color:A.getContrastColor(t,o)},states:{hover:{fillColor:i+"FF",halo:null,lineColor:"#00000000",lineWidth:0,lineWidthPlus:0}}}}static getHighchartsSeriesVolumeNameIdList(t){const e=[];return(this.getHighchartsSeriesList(t)||[]).filter(n=>this.isAnyVolumeSeries(n.id)).forEach(n=>{const i=n.name||"--",s=n.id;null!=i&&null!=s&&e.push([i,s])}),e}static getModifyValue(t,e,n=void 0){var i,s;return r.InfrontUtil.isFunction(null===(i=t?.dataModify)||void 0===i?void 0:i.modifyValue)?null===(s=t.dataModify)||void 0===s?void 0:s.modifyValue(e,n):r.InfrontUtil.isFunction(t?.modifyValue)?t?.modifyValue(e,n):e}static shouldAddIndicatorSeries(t,e){return e.type!==Dt.VOLUME_BY_PRICE||t.ordinateType!==Dn.LOGARITHMIC}}re.getSeriesCompareOptions=ms,re.calculateSeriesLabelColors=m,re.getOnSeriesColor=aa,re.getHighchartsSeriesList=Da,re.getInstrumentSeriesList=Ra,re.getInstrumentSeriesIndexById=Es,re.getMainSeriesIdFromGhostSeries=function(a){var t,e;if(fs(null===(t=a.options)||void 0===t?void 0:t.id))return null===(e=a.options)||void 0===e?void 0:e.id.replace(Qt.GHOST,"")},re.getSeriesCompareValue=ps,re.getCloseFromHighchartsValueOrArray=Is,re.isSeriesVisible=function(a){var t,e;return!!(null!==(t=a?.visible)&&void 0!==t?t:null!==(e=a?.options)&&void 0!==e&&e.visible)},re.isSingleInstrument=sa,re.isMainSeries=oa,re.isOppositeLabelGhostSeries=fs,re.isInstrumentSeries=wi,re.isAnyVolumeSeries=Cs,re.isVolumeSeries=la,re.isVolumeUnderlaySeries=Dr,re.isAnyIndicatorSeries=Rr,re.isIndicatorSeries=Ts,re.isOscillatorSeries=Ss,re.isCompanyEventSeries=ua,re.isPrevCloseSeries=Bi,re.getInstrumentSeriesIdForVolumeId=Na,re.getInstrumentSeriesIdForPrevCloseId=_s,re.removeSeriesById=As,re.removeLinkedSeries=ya;class Bo{static add(t){if(null==t)return;const e=t.merge,n=t.wrap,i=t.pick,s=t.seriesTypes.ohlc.prototype;n(t.Series.prototype,"init",function(o,l,u){var d;(null===(d=u?.infront)||void 0===d?void 0:d.quoteType)===un.OHLC&&(e(!0,u,{dataGrouping:{approximation:"ohlc"}}),[...Me,wt.OHLC].includes(u.type)||u.stacking||(this.pointArrayMap=i(u.pointArrayMap,s.pointArrayMap),this.pointValKey=i(u.pointValKey,s.pointValKey),this.keys=i(u.keys,s.keys),this.toYData=i(u.toYData,s.toYData))),o.apply(this,Array.prototype.slice.call(arguments,1))}),n(t.Series.prototype,"translate",function(o){var l,u;const d=this;let g,I,C;if(o.apply(this,Array.prototype.slice.call(arguments,1)),(null===(u=null===(l=this.options)||void 0===l?void 0:l.infront)||void 0===u?void 0:u.quoteType)===un.OHLC&&this.type.match(/^area|column/))for(g=d.points,I=g.length,C=0;C<I;C++)g[C].yBottom=null}),n(t.Series.prototype,"processData",function(o){var l,u;const d=this;o.apply(this,Array.prototype.slice.call(arguments,1)),null!=(null===(u=null===(l=d.options)||void 0===l?void 0:l.infront)||void 0===u?void 0:u.quoteType)&&(d.compareValue=re.getSeriesCompareValue(d))})}}class ko{static add(t){null!=t?.AxisResizer&&(t.AxisResizer.prototype.onMouseUp=function(e){this.hasDragged&&(this.updateAxes(this.axis.chart.pointer.normalize(e).chartY-this.options.y),t.fireEvent(this.axis.chart,"onPaneSizeChangeEnd",this.axis)),this.grabbed=this.hasDragged=this.axis.chart.activeResizer=null})}}class Ho{static add(t){t?.addEvent(t.Axis,"afterInit",function(){var e,n;const i=this.logarithmic;i&&null!==(n=null===(e=this.options)||void 0===e?void 0:e.infront)&&void 0!==n&&n.allowNegativeLog&&(this.positiveValuesOnly=!1,i.log2lin=s=>{const o=s<0;let l=Math.abs(s);t.isNumber(this.dataMin)&&this.dataMin<0&&l<10&&(l+=(10-l)/10);const u=Math.log(l)/Math.LN10;return o?-u:u},i.lin2log=s=>{const o=s<0,l=Math.abs(s);let u=Math.pow(10,l);return t.isNumber(this.dataMin)&&this.dataMin<0&&u<10&&(u=10*(u-1)/9),o?-u:u})})}}class ze{static getOscillatorOrdinateFormattedValue(t,e){return this.getAxisFormattedValue(t,e,!1,null,Cn.FIX,!0).replace(" ","&nbsp;")}static getOppositeOrdinateFormattedValueEnsureRelative(t,e,n,i=null,s=Cn.FIX,o){return Vi(Fi(n))||(t=ki(t,n)),this.getOppositeOrdinateFormattedValue(t,e,n,i,s,o)}static getOppositeOrdinateFormattedValue(t,e,n,i=null,s=Cn.FIX,o){return t=this.getOrdinateLabelValue(t,e,n,!1),this.getAxisFormattedValue(t,n,!0,i,s,!0,o).replace(" ","&nbsp;")}static getInstrumentDecimalsById(t,e){const n=t?.getChartInstrumentById(e);return this.getInstrumentDecimals(n)}static getInstrumentDecimals(t){const e=t?.getInstrumentSettings();return e?.decimals}}ze.getOrdinateFormattedValue=Os,ze.getOrdinateLabelValue=bs,ze.getPercentValue=ki,ze.getRebaseValue=Ls,ze.getAxisFormattedValue=ws,ze.getTooltipFormattedValue=Hi,ze.getNumberFormat=gi;class pa{static removeHighLowPlotlines(t){const e=t?.getChart(),n=t?.getMainInstrument(),i=n?.getId(),s=e?.get(ht.kMainYAxisId
1);s&&i&&(s.removePlotLine(Qt.HIGH+i),s.removePlotLine(Qt.LOW+i))}static setHighLowPlotlines(t){var e,n,i,s,o,l,u,d,g,I;const C=t?.getGlobalChartSettings(),S=t?.getChart();if(!S||!C)return;pa.removeHighLowPlotlines(t);const N=S?.get(ht.kMainYAxisId),k=t?.getMainInstrument(),x=k?.getId();if(!N||!x)return;const Y=Fi(t);let et,rt,it=[];const gt=null===(e=S.series)||void 0===e?void 0:e.find(Tt=>{var Wt;return(null===(Wt=Tt.options)||void 0===Wt?void 0:Wt.id)===x});if(!gt)return;const mt=S.get(ht.kXAxisId),Ct=mt?.getExtremes();if(it=(null!==(n=gt.points)&&void 0!==n?n:[]).filter(Tt=>Tt.x>=Ct.min&&Tt.x<=Ct.max&&"number"==typeof Tt.y).map(Tt=>Tt.y),!it.length){const Tt=Kn.getProcessedYData(gt);Array.isArray(Tt)&&(it=Tt.filter(Wt=>"number"==typeof Wt))}if(it.length){if(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: setHighLowPlotlines",{mainId:x,scaling:Y,lastPrices:it,seriesLength:it.length}),et=Math.max(...it),rt=Math.min(...it),Vi(Y)&&(et=ki(et,t,x),rt=ki(rt,t,x)),r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: setHighLowPlotlines",{high:et,low:rt,scalingMode:Vi(Y)?"relative":"absolute"}),C.showHighLow||C.showHigh){const Tt=null!==(i=C.highColor)&&void 0!==i?i:fr,Wt=null!==(s=C.highFontSize)&&void 0!==s?s:"11px",Kt={id:Qt.HIGH+x,value:et,color:Tt,width:2,dashStyle:"Dot",zIndex:98,label:{text:Ma(t,et,"highLine",S,null),style:{color:Tt,fontSize:Wt},align:"right",verticalAlign:"top",x:-70}},te=Object.assign(Object.assign({},Kt),null!==(o=C.highPlotlineOptions)&&void 0!==o?o:{});!(null===(l=C.highPlotlineOptions)||void 0===l)&&l.label&&(te.label=Object.assign(Object.assign({},Kt.label),C.highPlotlineOptions.label)),N.addPlotLine(te)}if(C.showHighLow||C.showLow){const Tt=null!==(u=C.lowColor)&&void 0!==u?u:qi,Wt=null!==(d=C.lowFontSize)&&void 0!==d?d:"11px",Kt={id:Qt.LOW+x,value:rt,color:Tt,width:2,dashStyle:"Dot",zIndex:98,label:{text:Ma(t,rt,"lowLine",S,null),style:{color:Tt,fontSize:Wt},align:"right",verticalAlign:"top",x:-70}},te=Object.assign(Object.assign({},Kt),null!==(g=C.lowPlotlineOptions)&&void 0!==g?g:{});!(null===(I=C.lowPlotlineOptions)||void 0===I)&&I.label&&(te.label=Object.assign(Object.assign({},Kt.label),C.lowPlotlineOptions.label)),N.addPlotLine(te)}}}}const Go={millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e %b",week:"%e %b",month:"%b '%y",year:"%Y"};class ue{static getAxisId(t){var e;return null===(e=t?.options)||void 0===e?void 0:e.id}static isAxisWithLegend(t){const e=ue.getAxisId(t);return e===ht.kMainYAxisId||e?.startsWith(ht.kOscillatorYAxisId)}static isOscillatorYAxis(t){const e=ue.getAxisId(t);return e?.startsWith(ht.kOscillatorYAxisId)}static getAxisById(t,e){var n;return null===(n=t?.axes)||void 0===n?void 0:n.find(i=>{var s;return e===(null===(s=i?.options)||void 0===s?void 0:s.id)})}static getAxisTypeForAxis(t){if(ue.isOscillatorYAxis(t))return se.OSCILLATOR;const e=ue.getAxisId(t);return e?.startsWith(ht.kMainYAxisId)?se.ORDINATE:e?.startsWith(ht.kOppositeYAxisId)?se.OPPOSITE:e?.startsWith(ht.kXAxisId)?se.ABSCISSA:void 0}static getYAxisOptions(t){const e=this.getMainYAxisOptions(t),n=this.getOppositeYAxisOptions(t),i=this.getVolumeYAxisOptions(t),s=this.getGhostVolumeYAxisOptions(t),o=this.getAllOscillatorsYAxisOptions(t);this.configureDragPanes(e,[e.id,n.id,i.id],o);const l=[];return e&&l.push(e),n&&l.push(n),i&&l.push(i),s&&l.push(s),o&&l.push(...o),l}static getMainYAxisOptions(t){const e=t?.getGlobalChartSettings();if(!e)return;const n=ht.kMainYAxisId;return Object.assign(Object.assign({id:n,type:this.getOrdinateType(e?.ordinateType),labels:{align:e?.ordinateLabelsOutside?"left":"right",x:e?.ordinateLabelsOutside?5:-5,y:3-ue.getYAxisLabelYOffset(e),formatter:function(){return ze.getOrdinateFormattedValue(Number(this.value),this.chart,t,null,void 0,Pn.Y_AXIS_LABEL_DECIMALS)}},showFirstLabel:!0,showLastLabel:!0,crosshair:!!e?.showOrdinate&&this.getCrosshairOptions(t,se.ORDINATE),opposite:!0,visible:!!e?.showOrdinate,tickWidth:e?.ordinateLabelsOutside?1:0,lineWidth:e?.ordinateLabelsOutside?1:0,tickLength:e?.ordinateLabelsOutside?5:0,gridLineWidth:this.showGridY(e)?1:0,minorGridLineWidth:0,endOnTick:!1,startOnTick:!1,tickPixelInterval:60},(a=>a?.areaStacking?Object.assign({min:0},"percent"===a.areaStacking?{max:100}:{}):{})(e)),{top:ue.getPaneYAxisTopPercent(t,0,n),height:ue.getPaneYAxisHeightPercent(t,0,n),offset:0,resize:{enabled:!1},infront:{allowNegativeLog:!0}})}static getOppositeYAxisOptions(t){const e=t?.getGlobalChartSettings();if(!e)return;const n=ht.kOppositeYAxisId;return Object.assign({id:n,linkedTo:0,type:this.getOrdinateType(e?.ordinateType),labels:{align:e?.ordinateLabelsOutside?"right":"left",x:e?.ordinateLabelsOutside?-5:5,y:3-ue.getYAxisLabelYOffset(e),formatter:function(){return ze.getOppositeOrdinateFormattedValueEnsureRelative(Number(this.value),this.chart,t,null,void 0,Pn.OPPOSITE_Y_AXIS_LABEL_DECIMALS_PERCENTAGE)}},showFirstLabel:!0,showLastLabel:!0,crosshair:!!e?.showOppositeOrdinate&&this.getCrosshairOptions(t,se.OPPOSITE),opposite:!1,visible:!!e?.showOppositeOrdinate,tickWidth:e?.ordinateLabelsOutside?1:0,lineWidth:e?.ordinateLabelsOutside?1:0,tickLength:e?.ordinateLabelsOutside?5:0,gridLineWidth:!e?.showOrdinate&&this.showGridY(e)?1:0,minorGridLineWidth:0,endOnTick:!1,startOnTick:!1,tickPixelInterval:60,top:ue.getPaneYAxisTopPercent(t,0,n),height:ue.getPaneYAxisHeightPercent(t,0,n),offset:0,resize:{enabled:!1},infront:{allowNegativeLog:!0}},(a=>
1a?.areaStacking?{visible:!1,crosshair:!1}:{})(e))}static getVolumeYAxisOptions(t){const e=ht.kVolumeYAxisId;return{id:e,type:Dn.LINEAR,labels:{align:"right"},crosshair:!1,opposite:!1,visible:!1,gridLineWidth:0,minorGridLineWidth:0,maxPadding:2,top:ue.getPaneYAxisTopPercent(t,0,e),height:ue.getPaneYAxisHeightPercent(t,0,e),offset:0,resize:{enabled:!1}}}static getGhostVolumeYAxisOptions(t){return{id:ht.kGhostVolumeYAxisId,type:Dn.LINEAR,crosshair:!1,visible:!1,height:"0%",offset:0,resize:{enabled:!1}}}static getAllOscillatorsYAxisOptions(t){const e=t?.getGlobalChartSettings(),n=[...t?.getVolumeUnderlayList()||[],...t?.getOscillatorList()||[]];if(!e||!n?.length)return;const i=[];return n.forEach((s,o)=>{const l=ht.kOscillatorYAxisId+s.id;i.push({id:l,type:Dn.LINEAR,labels:{align:e?.ordinateLabelsOutside?"left":"right",x:e?.ordinateLabelsOutside?5:-5,y:e?.ordinateLabelsOutside?0:-3,formatter:function(){return ze.getOscillatorOrdinateFormattedValue(Number(this.value),t)}},showFirstLabel:!0,crosshair:!!e?.showOrdinate&&this.getCrosshairOptions(t,se.OSCILLATOR),opposite:!0,visible:!!e?.showOrdinate,tickWidth:e?.ordinateLabelsOutside?1:0,lineWidth:e?.ordinateLabelsOutside?1:0,tickLength:e?.ordinateLabelsOutside?5:0,gridLineWidth:this.showGridY(e)?1:0,minorGridLineWidth:0,maxPadding:.05,endOnTick:!1,startOnTick:!1,tickPixelInterval:40,top:ue.getPaneYAxisTopPercent(t,o+1,l),height:ue.getPaneYAxisHeightPercent(t,o+1,l),offset:0,resize:{enabled:!1}})}),i}static getXAxisOptions(t){const e=this.getMainXAxisOptions(t),n=this.getFlagsXAxisOptions(t),i=[];return e&&i.push(e),n&&i.push(n),i}static getMainXAxisOptions(t){var e;const n=t?.getGlobalChartSettings();if(!n)return;const i=null!==(e=n.axisDateTimeLabelFormats)&&void 0!==e?e:Go;let s;return Object.assign(Object.assign({id:ht.kXAxisId,gridLineWidth:this.showGridX(n)?1:0,minorGridLineWidth:0,alternateGridColor:n.showAlternateGridColor?"#FFFFFF":null,showFirstLabel:!0,showLastLabel:!0,crosshair:this.getCrosshairOptions(t,se.ABSCISSA),visible:!0,dateTimeLabelFormats:i,ordinal:!0,overscroll:0,labels:{distance:8}},this.getXAxisTickPositionerFix()),{endOnTick:!1,startOnTick:!1,events:{afterSetExtremes:function(o){s&&clearTimeout(s),n&&(s=setTimeout(()=>{var l,u,d,g;r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("HighchartsAxis: getXAxisOptions, afterSetExtremes","event=",o,"startDate=",n.currentStartDate.get(),"endDate=",n.currentEndDate.get(),"stopExtremesUpdate=",n.stopExtremesUpdate),n.stopExtremesUpdate||(o.min&&(null===(l=n.currentStartDate)||void 0===l||l.set(new Date(o.min))),o.max&&(null===(u=n.currentEndDate)||void 0===u||u.set(new Date(o.max))),da.setMainPrevClose(t,o.trigger),pa.setHighLowPlotlines(t),fe.setHistoryPeriodUntouched(t,o.trigger)),n.stopExtremesUpdate=!1,null!==(d=t?.getWidgetChartStorage())&&void 0!==d&&d.getAllowStorageUpdate()||null===(g=t.getWidgetChartStorage())||void 0===g||g.setAllowStorageUpdate(!0)},100))}}})}static getFlagsXAxisOptions(t){return{id:ht.kFlagsXAxisId,linkedTo:0,visible:!1,gridLineWidth:0,minorGridLineWidth:0,alternateGridColor:null,crosshair:!1,ordinal:!0,overscroll:0,labels:{enabled:!1}}}static getXAxisTickPositionerFix(){return{tickPositioner:function(){let t=this.tickPositions;t=ue.filterOutsideXAxisTicks(this,t),t=ue.filterOutsideXAxisGridlines(this,t);const e=[...t];return e.info=this.tickPositions.info,e}}}static filterOutsideXAxisGridlines(t,e){const n=t.chart,i=n.plotLeft,s=i+n.plotWidth;return e?.filter(o=>{const l=t.toPixels(o,!1);return l>=i&&l<=s})||[]}static filterOutsideXAxisTicks(t,e){const n=t.dataMin,i=t.dataMax;return e?.filter((s,o,l)=>!(0===o&&null!=n&&s<n||o===l.length-1&&null!=i&&s>i))||[]}static getCrosshairOptions(t,e=se.ABSCISSA){const n="Dash",i="rect",s=t?.getGlobalChartSettings(),o=fe.isIntradayPeriod(s?.currentPeriod);if(e===se.ABSCISSA)return{snap:!!s.cursorSnapX,dashStyle:n,label:{enabled:!!s.cursorEventsEnabled&&[Nn.VERTICAL,Nn.CROSSHAIR].includes(s?.cursorType),shape:i,padding:4,formatter:function(l){return ue.isCrosshairBeyondMax(this)?"":o?r.InfrontUtil.formatDateTime(new Date(l),r.InfrontUtil.formatSettings.dateTimeFormat,t?.getLanguageHandler()):r.InfrontUtil.formatDate(new Date(l))}},width:s.cursorEventsEnabled&&[Nn.VERTICAL,Nn.CROSSHAIR].includes(s?.curs
1orType)?1:0};if([se.ORDINATE,se.OPPOSITE,se.OSCILLATOR].includes(e)){const l=e===se.ORDINATE?ze.getInstrumentDecimals(t?.getMainInstrument()):null,u=!!s.cursorSnapY;return{snap:u,dashStyle:n,label:{enabled:!!s.cursorEventsEnabled&&[Nn.CROSSHAIR].includes(s?.cursorType)&&!(u&&e===se.ORDINATE&&ue.isOrdinatePercentAxis(t)),shape:i,align:e===se.OPPOSITE?"right":"left",padding:4,formatter:function(d){return e===se.OPPOSITE?ze.getOppositeOrdinateFormattedValueEnsureRelative(d,this.chart,t,2,Cn.MINIMUM,Pn.OPPOSITE_CROSSHAIR_LABEL_DECIMALS_PERCENTAGE):e===se.OSCILLATOR?ze.getOscillatorOrdinateFormattedValue(d,t):(d=ue.getSnapYCorrectedValue(d,t,this),ue.isOrdinatePercentAxis(t)?ze.getOrdinateFormattedValue(d,this.chart,t,2,Cn.MINIMUM,Pn.CROSSHAIR_LABEL_DECIMALS_PERCENTAGE):ze.getOrdinateFormattedValue(d,this.chart,t,l,Cn.FIX,Pn.CROSSHAIR_LABEL_DECIMALS))}},width:s.cursorEventsEnabled&&[Nn.CROSSHAIR].includes(s?.cursorType)?1:0}}return!1}static getSnapYCorrectedValue(t,e,n){var i,s,o,l,u,d,g,I,C;const S=e?.getGlobalChartSettings();if(!0===S?.cursorSnapY){const N=ue.getOrdinateScaling(e);if(ue.isOrdinateScalingRelative(N)){const k=null===(s=null===(i=n.chart)||void 0===i?void 0:i.series)||void 0===s?void 0:s.filter(gt=>{var mt;return re.isSeriesVisible(gt)&&re.isInstrumentSeries(null===(mt=gt.options)||void 0===mt?void 0:mt.id)}),x=null===(l=null===(o=n.cross)||void 0===o?void 0:o.e)||void 0===l?void 0:l.chartX,Y=null===(d=null===(u=n.cross)||void 0===u?void 0:u.e)||void 0===d?void 0:d.chartY,et=null===(I=null===(g=n.chart)||void 0===g?void 0:g.pointer)||void 0===I?void 0:I.findNearestKDPoint(k,!0,{chartX:x,chartY:Y}),rt=et?.series,it=null===(C=rt?.options)||void 0===C?void 0:C.id;null!=it&&(t=ze.getPercentValue(t,e,it))}}return t}static isCrosshairBeyondMax(t){var e,n,i;const s=null===(n=null===(e=t.cross)||void 0===e?void 0:e.e)||void 0===n?void 0:n.chartX;if(null!=s){const o=null===(i=t.ordinal)||void 0===i?void 0:i.positions,l=o?.length?o[o.length-1]:null;if(null!=l){const u=t.toPixels(l,!1);if(!isNaN(u)&&s>u)return!0}}return!1}static showGridX(t){return[Rn.GRID,Rn.VERTICAL].includes(t?.gridType)}static showGridY(t){return[Rn.GRID,Rn.HORIZONTAL].includes(t?.gridType)}static setYAxisPanePositions(t){var e,n;const i=t?.getGlobalChartSettings(),s=t?.getChart();if(!i||!s)return;const o={};null===(e=s.yAxis)||void 0===e||e.forEach(l=>{var u;const d=null===(u=l.options)||void 0===u?void 0:u.id;this.isPaneRelevantYAxis(d)&&(o[d]={top:l.options.top||"0%",height:l.options.height})}),i.yAxisPanePositions=o,null===(n=t.getWidgetChartStorage())||void 0===n||n.updateStorage()}static isPaneRelevantYAxis(t){return[ht.kMainYAxisId,ht.kOppositeYAxisId,ht.kVolumeYAxisId].includes(t)||t?.startsWith(ht.kOscillatorYAxisId)}static resetPanes(t){const e=t?.getGlobalChartSettings();null!=e?.yAxisPanePositions&&(null==e||delete e.yAxisPanePositions)}static needPaneReset(t){const e=t?.getGlobalChartSettings();if(!e)return;const n=Object.keys(e?.yAxisPanePositions||{}).filter(i=>i?.startsWith(ht.kOscillatorYAxisId)).length;return this.getPaneCount(t)!==n}static getPaneCount(t){return t.getVolumeUnderlayListLength()+t.getOscillatorListLength()}static getPaneFactors(t){const e=this.getPaneCount(t);if(e>0){const n=100/(e+1)*1.5;return[n,(100-n)/e]}return[100,0]}static getPaneYAxisTop(t,e){const[n,i]=this.getPaneFactors(t);let s=0;return e>0&&(s=n+(e-1)*i),s}static getPaneYAxisTopPercent(t,e,n){var i,s;const o=t?.getGlobalChartSettings();return this.needPaneReset(t)||null==(null===(s=null===(i=o?.yAxisPanePositions)||void 0===i?void 0:i[n])||void 0===s?void 0:s.top)?`${this.getPaneYAxisTop(t,e)}%`:o.yAxisPanePositions[n].top}static getPaneYAxisHeight(t,e){const[n,i]=this.getPaneFactors(t);let s=n;return e>0&&(s=i),s}static getPaneYAxisHeightPercent(t,e,n){var i,s;const o=t?.getGlobalChartSettings();return this.needPaneReset(t)||null==(null===(s=null===(i=o?.yAxisPanePositions)||void 0===i?void 0:i[n])||void 0===s?void 0:s.height)?`${this.getPaneYAxisHeight(t,e)}%`:o.yAxisPanePositions[n].height}static configureDragPanes(t,e,n){if(!t?.id||!e?.length||!n?.length)return;const i=n?.map(s=>s.id);i?.length&&(t.resize={enabled:!0,controlledAxis:{next:[i[0]],prev:e}}
1,n.forEach((s,o)=>{s.resize={enabled:o+1<i.length,controlledAxis:{next:o+1>i.length?[i[o+1]]:[],prev:[i[o]]}}}))}}ue.getYAxisLabelYOffset=ir,ue.getOrdinateScaling=Fi,ue.isOrdinateScalingRelative=Vi,ue.isOrdinatePercentAxis=cs,ue.getOrdinateType=function(a){return[Dn.LINEAR,Dn.LOGARITHMIC].includes(a)?a:Dn.LINEAR},ue.isRebaseOnMain=ds;class Yo{static add(t){if(null==t)return;const e=t.defined,n=t.merge,i=t.pick,s=t.wrap;function o(u){const d=u.chart,g=d.options.legend;return new t.Legend(d,n(g,{axis:u.options.id,className:`highcharts-no-tooltip ${Ks}${u.options.id}`},g.positions?g.positions[u.options.id]:{}))}function l(u){var d;const g=u.options;g.legend&&!0===g.legend.split&&(null===(d=u.yAxis)||void 0===d||d.forEach(I=>{I.legend&&(I.legend.box&&(I.legend.box.isNew=!0),I.legend.render())}))}s(t.Legend.prototype,"render",function(u){var d,g;const I=this,C=I.chart,S=I.options,N=S.axis&&C.get(S.axis);if(ue.isOscillatorYAxis(N)&&(S.width=I?.offsetWidth||0),u.call(this),ue.isAxisWithLegend(N)){if(I.group.placed=!1,"function"==typeof S.legendPositioner&&S.legendPositioner.call(this))return;const k={x:C.plotLeft,y:N.top,width:C.plotWidth,height:N.height};if(ue.isOscillatorYAxis(N)){const x=null===(g=null===(d=C?.options)||void 0===d?void 0:d.infront)||void 0===g?void 0:g.chartInstrumentList,Y=x?.getGlobalChartSettings();k.x=k.x+(Y?.showOppositeOrdinate&&!Y?.ordinateLabelsOutside?-50:0),k.y=k.y+ir(Y)}I.group.align(t.extend({width:I.legendWidth,height:I.legendHeight},S),!0,k)}}),s(t.Legend.prototype,"getAllItems",function(u){var d;const g=this,I=this.chart,C=I.options,S=this.options,N=S.axis&&I.get(S.axis);let k=[];if(!C.legend||!0!==C.legend.split)return u.apply(this,Array.prototype.slice.call(arguments,1));if(N?.series&&ue.isAxisWithLegend(N)){const x=[];let Y;null===(d=I.series)||void 0===d||d.forEach(et=>
1{const rt=et.yAxis.top===N.top;!Y&&rt&&(Y=et.yAxis.legend),rt&&g===Y&&x.push(et)}),x?.forEach(et=>{if(et){const rt=et.options;et&&i(rt.showInLegend,!e(rt.linkedTo)&&void 0,!0)&&(k=k.concat(et.legendItems||("point"===rt.legendType?et.data:et)))}})}return k}),s(t.Axis.prototype,"init",function(u,d,g){const I=this,C=d.options;u.apply(this,Array.prototype.slice.call(arguments,1)),!I.isXAxis&&C.legend&&C.legend.enabled&&!0===C.legend.split&&(I.legend=o(I),void 0===I.top&&I.setAxisSize())}),s(t.Axis.prototype,"redraw",function(u){const d=this,g=d.chart.options.legend;g&&!0===g.split&&(g.enabled&&!d.legend?d.legend=o(d):!g.enabled&&d.legend&&(d.legend.destroy(),d.legend=null)),u.apply(this,Array.prototype.slice.call(arguments,1))}),s(t.Axis.prototype,"destroy",function(u){this.legend&&(this.legend.destroy(),this.legend=null),u.apply(this,Array.prototype.slice.call(arguments,1))}),s(t.Chart.prototype,"redraw",function(u){u.apply(this,Array.prototype.slice.call(arguments,1)),l(this)}),s(t.Chart.prototype,"init",function(u){return t.addEvent(this,"load",function(){l(this)}),t.addEvent(this,"afterPlotLineLabelsPositioned",function(){l(this)}),u.apply(this,Array.prototype.slice.call(arguments,1))})}}class Wo{static add(t){t?.addEvent(t.Axis,"foundExtremes",function(){const e=this;e.isLog||e.plotLinesAndBands&&e.plotLinesAndBands.length&&t.isNumber(e.min)&&t.isNumber(e.max)&&e.plotLinesAndBands.forEach(n=>{const i=Number(n.options.value);!0===n.options.alwaysVisible&&(e.max<i?e.max=i:e.min>i&&(e.min=i))})})}}class Ko{static add(t){null!=t&&(t.Series.prototype.buildKDTree=function(e){this.buildingKdTree=!0;const n=this,i=n.options.findNearestPointBy.indexOf("y")>-1?2:1;function s(o,l,u){const d=o&&o.length;let g,I;if(d)return g=n.kdAxisArray[l%u],o.sort(function(C,S){return C[g]-S[g]}),I=Math.floor(d/2),{point:o[I],left:s(o.slice(0,I),l+1,u),right:s(o.slice(I+1),l+1,u)}}delete n.kdTree,t.syncTimeout(function(){n.kdTree=s(n.getValidPoints(null,!n.directTouch),i,i),n.buildingKdTree=!1,t.fireEvent(n,"afterKDTreeBuild")},n.options.kdNow||e&&"touchstart"===e.type?0:1)})}}class zo{static add(t){t?.wrap(t.seriesTypes.column.prototype,"pointAttribs",function(e,n){const i=this,s=i.options,o=i.points,l=e.apply(this,Array.prototype.slice.call(arguments,1));if(re.isAnyVolumeSeries(i.options.id)&&s.colors&&o){const u=this.chart,d=o.indexOf(n),g=s.colors[0]||In,I=s.colors[1]||cn,C=s.colors[2]||xi,S=re.getInstrumentSeriesIdForVolumeId(i.options.id);let N,k,x;if(t.isNumber(S)?k=u.series[S]:S&&u.series.forEach(Y=>{var et;(null===(et=Y?.options)||void 0===et?void 0:et.id)===S&&(k=Y)}),k&&(x=k.points,x)){const{currentPoint:Y,index:et}=function(rt,it,gt){const mt=it.x;for(;rt[gt]&&rt[gt].x<mt;)gt++;for(;rt[gt]&&rt[gt].x>mt;)gt--;return{currentPoint:rt[gt],index:gt}}(x,o[d],d);if(N=C,Y&&Y.x===o[d].x)if(t.isNumber(Y.close)&&t.isNumber(Y.open))Y.open<Y.close?N=g:Y.open>Y.close&&(N=I);else{const rt=x[et-1];rt&&t.isNumber(Y.y)&&t.isNumber(rt.y)&&(Y.y>rt.y?N=g:Y.y<rt.y&&(N=I))}l.fill=N}}return l})}}class jo{static add(t){if(null==t)return;const e=t.Series.prototype.groupData;t.Series.prototype.groupData=function(n,i,s,o){const l=e.bind(this)(n,i,s,o);return this.groupAllData={groupedXData:l.groupedXData,groupedYData:l.groupedYData},t.fireEvent(this,"dataOrDataGroupingChanged"),l},t.wrap(t.Series.prototype,"destroyGroupedData",function(n){this.groupAllData&&delete this.groupAllData,n.apply(this,Array.prototype.slice.call(arguments,1))}),t.wrap(t.Series.prototype,"init",function(n){n.apply(this,Array.prototype.slice.call(arguments,1)),t.addEvent(this,"updatedData",function(){if(!this.groupAllData)try{t.fireEvent(this,"dataOrDataGroupingChanged",{series:this})}catch{}})})}}class Xo{static applyAll(t){null!=t&&(xo.add(t),Uo.add(t),Bo.add(t),ko.add(t),Ho.add(t),Yo.add(t),Wo.add(t),Ko.add(t),zo.add(t),jo.add(t),Ce.disableTooltipPointerEvents(t))}}class xn{static get(t,e){var n;return null===(n=t?._modules)||void 0===n?void 0:n[e]}}class $o{static applyAll(t){null!=t&&(this.fixScatterFlagsSeriesTooltip(t),this.fixUndefinedGetIndexOfPoint(t))}static fixScatterFlagsSeriesTooltip(t){var e;if(null==t||parseInt(t?.version,10)>=12)return;const n=null!==(e=xn.get(t,"Core/Color/Palette.js"))&&void 0!==e?e:{neutralColor60:"#666666"};t.Tooltip.prototype.refresh=function(i,s){const o=this,l=this.chart,u=o.options,d=t.splat(i),g=d[0],I=[],C=u.formatter||o.defaultFormatter,S=o.shared,N=l.styledMode;let k={};if(!u.enabled)return;clearTimeout(this.hideTimer),o.followPointer=!o.split&&g.series.tooltipOptions.followPointer;const x=o.getAnchor(i,s),Y=x[0],et=x[1];!S||!t.isArray(i)&&i.series&&i.series.noSharedTooltip?k=g.getLabelConfig():(l.pointer.applyInactiveState(d),d.forEach(function(gt){gt.setState("hover"),I.push(gt.getLabelConfig())}),k={x:g.category,y:g.y},k.points=I),this.len=I.length;const rt=C.call(k,o),it=g.series;if(this.distance=t.pick(it.tooltipOptions.distance,16),!1===rt)this.hide();else{if(o.split)this.renderSplit(rt,d);else{let gt=Y,mt=et;if(s&&l.pointer.isDirectTouch&&(gt=s.chartX-l.plotLeft,mt=s.chartY-l.plotTop),!l.polar&&!1!==it.options.clip&&!it.shouldShowTooltip(gt,mt))return void o.hide();{const Ct=o.getLabel();u.style.width&&!N||Ct.css({width:this.chart.spacingBox.width+"px"}),Ct.attr({text:rt&&rt.join?rt.join(""):rt}),Ct.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+t.pick(g.colorIndex,it.colorIndex)),N||Ct.attr({stroke:u.borderColor||g.color||it.color||n.neutralColor60}),o.updatePosition({plotX:Y,plotY:et,negative:g.negative,ttBelow:g.ttBelow,h:x[2]||0})}}o.isHidden&&o.label&&o.label.attr({opacity:1}).show(),o.isHidden=!1}t.fireEvent(this,"refresh")}}static fixUndefinedGetIndexOfPoint(t){if(!["9.2.0","9.2.1","9.2.2"].includes(t?.version))return;const e=t._modules["Core/Axis/OrdinalAxis.js"];null!=e&&(e.Additions.prototype.getIndexOfPoint=function(n,i){const s=this,o=s.axis,l=s.positions?s.positions[0]:0;let u=o.series[0].points&&o.series[0].points[0]&&o.series[0].points[0].plotX||o.minPixelPadding;o.series.length>
11&&o.series.forEach(function(I){t.defined(I.points)&&t.defined(I.points[0])&&t.defined(I.points[0].plotX)&&I.points[0].plotX<u&&(u=I.points[0].plotX)});const g=(n-u)/(o.translationSlope*(s.slope||o.closestPointRange||s.overscrollPointsRange));return e.Additions.findIndexOf(i,l)+g})}}class Tn{static closePopup(t){var e;const n=null===(e=t?.getChartWrapper())||void 0===e?void 0:e.getHighcharts(),i=t?.getChart(),s=i?.navigationBindings;n?.fireEvent(s,"closePopup")}static wrapPopupPrototype(t,e){var n,i;if(null==t||null===(n=e.getChartWrapper())||void 0===n||!n.isAnnotationFeatureAvailable())return;const s=null!==(i=t.Popup)&&void 0!==i?i:xn.get(t,"Extensions/Annotations/Popup/Popup.js");null!=s?(t.wrap(s.prototype,"showForm",function(l,u,d,g,I,C){var S,N;if(!d)return;const k=null===(N=null===(S=d.options)||void 0===S?void 0:S.infront)||void 0===N?void 0:N.chartInstrumentList;if("annotation-toolbar"===u&&(this.showPopup(),this.annotations.addToolbar.call(this,d,g,I,C)),"annotation-edit"===u&&(this.showPopup(),this.annotations.addForm.call(this,d,g,I,C)),"annotation-edit-modal"===u){const x=k?.getChartAnnotations();x?.openAnnotationSettings(C?.annotation,g)}this.formType=u,this.container.style.height=this.container.offsetHeight+"px"}),t.wrap(s.prototype.annotations,"addToolbar",function(l,u,d,g,I){var C,S;const N=null===(S=null===(C=u.options)||void 0===C?void 0:C.infront)||void 0===S?void 0:S.chartInstrumentList,k=this,x=this.showForm;Tn.renderAnnotationToolbar(t,this,u,d,g,function(){var Y;const et=null!==(Y=N?.getGlobalChartSettings())&&void 0!==Y&&Y.useNativeAnnotationSettings?"annotation-edit":"annotation-edit-modal";x.call(k,et,u,d,g,I)})}),t.wrap(s.prototype,"function"==typeof s.prototype.addCloseButton?"addCloseButton":"addCloseBtn",function(l){return Tn.renderCloseButton(t,this)})):Tn.patchNativePopupOnFirstChartLoad(t)}static patchNativePopupOnFirstChartLoad(t){if(Tn.nativePopupPatchListenerRegistered)return;Tn.nativePopupPatchListenerRegistered=!0;const e=t.addEvent(t.Chart,"load",function(){Tn.patchNativePopupNow(t,this)&&e()})}static patchNativePopupNow(t,e){var n,i,s,o,l,u;const d=e?.navigationBindings;if(null==d)return!1;const g=null!==(n=(u=e.options).navigation)&&void 0!==n?n:u.navigation={},I=g.iconsURL;g.iconsURL="./",t.fireEvent(d,"showPopup",{formType:"__wtkPopupWarmup__",options:{},onSubmit:()=>{}}),g.iconsURL=I;const C=d.popup,S=null===(i=C?.constructor)||void 0===i?void 0:i.prototype;return null===(s=C?.closePopup)||void 0===s||s.call(C),null!=(null===(o=S?.annotations)||void 0===o?void 0:o.addToolbar)&&null!=S?.showForm&&(Tn.assignNativeShowForm(S),Tn.assignNativeAddToolbar(t,S.annotations),Tn.assignNativeAddCloseButton(t,S),null===(l=C.closeButton)||void 0===l||l.remove(),C.closeButton=Tn.renderCloseButton(t,C),!0)}static assignNativeShowForm(t){t.showForm=function(e,n,i,s){var o,l,u;if(!n)return;const d=null===(l=null===(o=n.options)||void 0===o?void 0:o.infront)||void 0===l?void 0:l.chartInstrumentList;if("annotation-toolbar"===e&&(this.showPopup(),this.annotations.addToolbar.call(this,n,i,s)),"annotation-edit"===e&&(this.showPopup(),this.annotations.addForm.call(this,n,i,s)),"annotation-edit-modal"===e){const g=d?.getChartAnnotations(),I=null===(u=n?.navigationBindings)||void 0===u?void 0:u.activeAnnotation;g?.openAnnotationSettings(I,i)}this.formType=e,this.type=e,this.container.style.height=this.container.offsetHeight+"px"}}static assignNativeAddToolbar(t,e){e.addToolbar=function(n,i,s){var o,l;const u=null===(l=null===(o=n.options)||void 0===o?void 0:o.infront)||void 0===l?void 0:l.chartInstrumentList,d=this,g=this.show
1Form;Tn.renderAnnotationToolbar(t,this,n,i,s,function(){var I;const C=null!==(I=u?.getGlobalChartSettings())&&void 0!==I&&I.useNativeAnnotationSettings?"annotation-edit":"annotation-edit-modal";g.call(d,C,n,i,s)})}}static assignNativeAddCloseButton(t,e){e.addCloseButton=function(){return Tn.renderCloseButton(t,this)}}static renderCloseButton(t,e){const n=t.createElement("div",{className:"highcharts-popup-close"},null,e.container);return["click","touchstart"].forEach(function(i){t.addEvent(n,i,function(){e.closePopup()})}),n}static renderAnnotationToolbar(t,e,n,i,s,o){var l,u,d;const g="highcharts-",I=null===(u=null===(l=n.options)||void 0===l?void 0:l.infront)||void 0===u?void 0:u.chartInstrumentList,C=I.getGlobalChartSettings(),S=e.lang,N=e.container;let x;N.classList.add(g+"annotation-toolbar");const Y=ir(C);N.style.top=n.plotTop+10-Y+"px";const et=I.getChartOptions();N.style.right=Tn.marginRight+50-(null!==(d=et.getChartSpacing("right"))&&void 0!==d?d:0)+"px";const rt=(it,gt,mt,Ct,Tt)=>["9.2.0","9.2.1","9.2.2"].includes(t?.version)?e.addButton(it,gt,mt,Tt,Ct):e.addButton(it,gt,mt,Ct,Tt);t.createElement("span",{textContent:t.pick(S[i.langKey]||i.langKey,i.shapes&&i.shapes[0].type)},null,N),x=rt(N,S.removeButton||"remove","remove",N,s),x.classList.add(g+"annotation-remove-button"),x=rt(N,S.editButton||"edit","edit",N,o),x.classList.add(g+"annotation-edit-button")}}Tn.marginRight=8,Tn.nativePopupPatchListenerRegistered=!1;class Mr{static getInlineSvgIcon(t){return Mr.fixInlineSvg(Mr.getSvgIcon(t))}static fixInlineSvg(t){return t?t.replace(/\"/g,"'").replace(/[\r\n]/g," ").replace(/#/g,"%23"):""}static getSvgIcon(t,e,n){return{annotations:'<svg xmlns="http://www.w3.org/2000/svg" height="15" viewBox="0 0 24 24" class="wtk-icon-svg">\n          <path d="M7.31287129,19.4792079 L8.39405941,18.3980198 L5.6019802,15.6059406 L4.52079208,16.6871287 L4.52079208,17.9584158 L6.04158416,17.9584158 L6.04158416,19.4792079 L7.31287129,19.4792079 Z M13.5267327,8.45346535 C13.5267327,8.27920792 13.439604,8.19207921 13.2653465,8.19207921 C13.1861386,8.19207921 13.1188119,8.21980198 13.0633663,8.27524752 L6.62376238,14.7148515 C6.56831683,14.770297 6.54059406,14.8376238 6.54059406,14.9168317 C6.54059406,15.0910891 6.62772277,15.1782178 6.8019802,15.1782178 C6.88118812,15.1782178 6.94851485,15.150495 7.0039604,15.0950495 L13.4435644,8.65544554 C13.4990099,8.6 13.5267327,8.53267327 13.5267327,8.45346535 Z M12.8851485,6.17227723 L17.8277228,11.1148515 L7.94257426,21 L3,21 L3,16.0574257 L12.8851485,6.17227723 Z M21,7.31287129 C21,7.73267327 20.8534653,8.08910891 20.560396,8.38217822 L18.5881188,10.3544554 L13.6455446,5.41188119 L15.6178218,3.45148515 C15.9029703,3.15049505 16.2594059,3 16.6871287,3 C17.1069307,3 17.4673267,3.15049505 17.7683168,3.45148515 L20.560396,6.23168317 C20.8534653,6.54059406 21,6.9009901 21,7.31287129 Z"/>\n        </svg>',edit:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="wtk-icon-svg">\n          <path d="M7.31287129,19.4792079 L8.39405941,18.3980198 L5.6019802,15.6059406 L4.52079208,16.6871287 L4.52079208,17.9584158 L6.04158416,17.9584158 L6.04158416,19.4792079 L7.31287129,19.4792079 Z M13.5267327,8.45346535 C13.5267327,8.27920792 13.439604,8.19207921 13.2653465,8.19207921 C13.1861386,8.19207921 13.1188119,8.21980198 13.0633663,8.27524752 L6.62376238,14.7148515 C6.56831683,14.770297 6.54059406,14.8376238 6.54059406,14.9168317 C6.54059406,15.0910891 6.62772277,15.1782178 6.8019802,15.1782178 C6.88118812,15.1782178 6.94851485,15.150495 7.0039604,15.0950495 L13.4435644,8.65544554 C13.4990099,8.6 13.5267327,8.53267327 13.5267327,8.45346535 Z M12.8851485,6.17227723 L17.8277228,11.1148515 L7.94257426,21 L3,21 L3,16.0574257 L12.8851485,6.17227723 Z M21,7.31287129 C21,7.73267327 20.8534653,8.08910891 20.560396,8.38217822 L18.5881188,10.3544554 L13.6455446,5.41188119 L15.6178218,3.45148515 C15.9029703,3.15049505 16.2594059,3 16.6871287,3 C17.1069307,3 17.4673267,3.15049505 17.7683168,3.45148515 L20.560396,6.23168317 C20.8534653,6.54059406 21,6.9009901 21,7.31287129 Z"/>\n        </svg>',destroy:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="wtk-icon-svg">
1\n          <path d="M6,14.625 L6,6.375 C6,6.265625 5.96484375,6.17578125 5.89453125,6.10546875 C5.82421875,6.03515625 5.734375,6 5.625,6 L4.875,6 C4.765625,6 4.67578125,6.03515625 4.60546875,6.10546875 C4.53515625,6.17578125 4.5,6.265625 4.5,6.375 L4.5,14.625 C4.5,14.734375 4.53515625,14.8242188 4.60546875,14.8945312 C4.67578125,14.9648438 4.765625,15 4.875,15 L5.625,15 C5.734375,15 5.82421875,14.9648438 5.89453125,14.8945312 C5.96484375,14.8242188 6,14.734375 6,14.625 Z M9,14.625 L9,6.375 C9,6.265625 8.96484375,6.17578125 8.89453125,6.10546875 C8.82421875,6.03515625 8.734375,6 8.625,6 L7.875,6 C7.765625,6 7.67578125,6.03515625 7.60546875,6.10546875 C7.53515625,6.17578125 7.5,6.265625 7.5,6.375 L7.5,14.625 C7.5,14.734375 7.53515625,14.8242188 7.60546875,14.8945312 C7.67578125,14.9648438 7.765625,15 7.875,15 L8.625,15 C8.734375,15 8.82421875,14.9648438 8.89453125,14.8945312 C8.96484375,14.8242188 9,14.734375 9,14.625 Z M12,14.625 L12,6.375 C12,6.265625 11.9648438,6.17578125 11.8945313,6.10546875 C11.8242188,6.03515625 11.734375,6 11.625,6 L10.875,6 C10.765625,6 10.6757813,6.03515625 10.6054688,6.10546875 C10.5351563,6.17578125 10.5,6.265625 10.5,6.375 L10.5,14.625 C10.5,14.734375 10.5351563,14.8242188 10.6054688,14.8945312 C10.6757813,14.9648438 10.765625,15 10.875,15 L11.625,15 C11.734375,15 11.8242188,14.9648438 11.8945313,14.8945312 C11.9648438,14.8242188 12,14.734375 12,14.625 Z M5.625,3 L10.875,3 L10.3125,1.62890625 C10.2578125,1.55859375 10.1914062,1.515625 10.1132812,1.5 L6.3984375,1.5 C6.3203125,1.515625 6.25390625,1.55859375 6.19921875,1.62890625 L5.625,3 Z M16.5,3.375 L16.5,4.125 C16.5,4.234375 16.4648437,4.32421875 16.3945312,4.39453125 C16.3242187,4.46484375 16.234375,4.5 16.125,4.5 L15,4.5 L15,15.609375 C15,16.2578125 14.8164062,16.8183594 14.4492187,17.2910156 C14.0820312,17.7636719 13.640625,18 13.125,18 L3.375,18 C2.859375,18 2.41796875,17.7714844 2.05078125,17.3144531 C1.68359375,16.8574219 1.5,16.3046875 1.5,15.65625 L1.5,4.5 L0.375,4.5 C0.265625,4.5 0.17578125,4.46484375 0.10546875,4.39453125 C0.03515625,4.32421875 0,4.234375 0,4.125 L0,3.375 C0,3.265625 0.03515625,3.17578125 0.10546875,3.10546875 C0.17578125,3.03515625 0.265625,3 0.375,3 L3.99609375,3 L4.81640625,1.04296875 C4.93359375,0.75390625 5.14453125,0.5078125 5.44921875,0.3046875 C5.75390625,0.1015625 6.0625,0 6.375,0 L10.125,0 C10.4375,0 10.7460937,0.1015625 11.0507812,0.3046875 C11.3554687,0.5078125 11.5664062,0.75390625 11.6835937,1.04296875 L12.5039062,3 L16.125,3 C16.234375,3 16.3242187,3.03515625 16.3945312,3.10546875 C16.4648437,3.17578125 16.5,3.265625 16.5,3.375 Z" transform="translate(3.75 3)"/>\n        </svg>',close:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="wtk-icon-svg">\n          <path d="M20,11.8409091 L20,12.1590909 C20,12.4621212 19.8939394,12.719697 19.6818182,12.9318182 C19.469697,13.1439394 19.2121212,13.25 18.9090909,13.25 L13.27,13.25 L13.27,18.9090909 C13.27,19.2121212 13.1639394,19.469697 12.9518182,19.6818182 C12.739697,19.8939394 12.4821212,20 12.1790909,20 L11.8626146,20 C11.5595843,20 11.3020086,19.8939394 11.0898874,19.6818182 C10.8777661,19.469697 10.7717055,19.2121212 10.7717055,18.9090909 L10.7717055,13.25 L5.09090909,13.25 C4.78787879,13.25 4.53030303,13.1439394 4.31818182,12.9318182 C4.10606061,12.719697 4,12.4621212 4,12.1590909 L4,11.8409091 C4,11.5378788 4.10606061,11.2803031 4.31818182,11.0681819 C4.53030303,10.8560606 4.78787879,10.75 5.09090909,10.75 L10.7717055,10.75 L10.7717055,5.09090909 C10.7717055,4.78787879 10.8777661,4.53030303 11.0898874,4.31818182 C11.3020086,4.10606061 11.5143133,4 11.8173436,4 L12.1790909,4 C12.4821212,4 12.739697,4.10606061 12.9518182,4.31818182 C13.1639394,4.53030303 13.27,4.78787879 13.27,5.09090909 L13.27,10.75 L18.9090909,10.75 C19.2121212,10.75 19.469697,10.8560606 19.6818182,11.0681819 C19.8939394,11.2803031 20,11.5378788 20,11.8409091 Z" transform="rotate(45 12 12)"/>\n        </svg>',"close-lg":'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="wtk-icon-svg">\n          <path d="M20,16.8754209 C20,17.2345679 19.8742985,17.5398429 19.6228956,17.7912458 L17.7912458,19.6228956 C17.5398429,19.8742985 17.2345679,20 16.8754209,20 C16.5162738,20 16.2109989,19.8742985 15.959596,19.6228956 L12,15.6632997 L8.04040404,19.6228956 C7.78900112,19.8742985 7.48372615,20 7.12457912,20 C6.7654321,20 6.46015713,19.8742985 6.20875421,19.6228956 L4.37710438,17.7912458 C4.12570146,17.5398429 4,17.2345679 4,16.8754209 C4,16.5162738 4.12570146,16.2109989 4.37710438,15.959596 L8.33670034,12 L4.37710438,8.04040404 C4.12570146,7.78900112 4,7.48372615 4,7.12457912 C4,6.7654321 4.12570146,6.46015713 4.37710438,6.20875421 L6.20875421,4.37710438 C6.4601
15713,4.12570146 6.7654321,4 7.12457912,4 C7.48372615,4 7.78900112,4.12570146 8.04040404,4.37710438 L12,8.33670034 L15.959596,4.37710438 C16.2109989,4.12570146 16.5162738,4 16.8754209,4 C17.2345679,4 17.5398429,4.12570146 17.7912458,4.37710438 L19.6228956,6.20875421 C19.8742985,6.46015713 20,6.7654321 20,7.12457912 C20,7.48372615 19.8742985,7.78900112 19.6228956,8.04040404 L15.6632997,12 L19.6228956,15.959596 C19.8742985,16.2109989 20,16.5162738 20,16.8754209 Z"/>\n        </svg>',"highcharts-edit":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="32px" height="32px" viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">\n          <path fill="#4B4B4D" d="M22.125,3.814L5.817,20.122l-1.818,7.879l7.879-1.818L28.186,9.875L22.125,3.814z M26.064,9.875\n          l-1.439,1.439l-3.939-3.939l1.439-1.439L26.064,9.875z M10.186,22.875l9.939-9.939l1.439,1.439l-9.939,9.939L10.186,22.875z\n          M7.686,20.375l9.939-9.939l1.439,1.439l-9.939,9.939L7.686,20.375z M18.686,9.375l0.939-0.939l3.939,3.939l-0.939,0.939\n          L18.686,9.375z M6.974,21.784l3.242,3.242l-4.215,0.973L6.974,21.784z"/>\n        </svg>',"highcharts-destroy":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="32px" height="32px" viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">\n          <g>\n            <rect x="12.75" y="14" fill="#4B4B4D" width="1.5" height="10"/>\n            <rect x="17.75" y="14" fill="#4B4B4D" width="1.5" height="10"/>\n            <path fill="#4B4B4D" d="M25.25,10.5c0-1.517-1.233-2.75-2.75-2.75h-3.25V7c0-1.24-1.01-2.25-2.25-2.25h-2\n            c-1.24,0-2.25,1.01-2.25,2.25v0.75H9.5c-1.517,0-2.75,1.233-2.75,2.75v1.751h2V27.25h14.5V12.251h2V10.5z M14.25,7\n            c0-0.413,0.337-0.75,0.75-0.75h2c0.413,0,0.75,0.337,0.75,0.75v0.75h-3.5V7z M21.75,25.75h-11.5V12.251h11.5V25.75z M23.75,10.751\n            H8.25V10.5c0-0.689,0.561-1.25,1.25-1.25h13c0.689,0,1.25,0.561,1.25,1.25V10.751z"/>\n          </g>\n        </svg>',"highcharts-close":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="32px" height="32px" viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">\n          <polygon fill="#4B4B4D" points="24.308,8.756 23.248,7.695 16.002,14.941 8.757,7.695 7.695,8.754 14.941,16.001 7.696,23.246\n          8.755,24.308 16.002,17.061 23.247,24.307 24.308,23.248 17.062,16.001 "/>\n        </svg>',segment:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <path  d="M24.5,5.625c-1.035,0-1.875,0.84-1.875,1.875c0,0.241,0.05,0.47,0.133,0.682L8.182,22.758\n          c-0.212-0.083-0.44-0.133-0.682-0.133c-1.035,0-1.875,0.84-1.875,1.875s0.84,1.875,1.875,1.875s1.875-0.84,1.875-1.875\n          c0-0.241-0.05-0.47-0.133-0.682L23.818,9.242c0.212,0.083,0.44,0.133,0.682,0.133c1.035,0,1.875-0.84,1.875-1.875\n          S25.535,5.625,24.5,5.625z"/>\n        </svg>',arrowSegment:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <g>\n            <circle  cx="24.5" cy="7.5" r="1.875"/>\n            <path  d="M19.684,11.256L8.182,22.758c-0.212-0.083-0.44-0.133-0.682-0.133c-1.035,0-1.875,0.84-1.875,1.875\n            s0.84,1.875,1.875,1.875s1.875-0.84,1.875-1.875c0-0.241-0.05-0.47-0.133-0.682l11.502-11.502l0.935,0.934L23,9l-4.25,1.321 L19.684,11.256z"/>\n          </g>\n        </svg>',infinityLine:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <path  d="M27.03,6.03L25.97,4.97l-3.788,3.788c-0.212-0.083-0.44-0.133-0.682-0.133c-1.035,0-1.875,0.84-1.875,1.875\n          c0,0.241,0.05,0.47,0.133,0.682l-8.576,8.576c-0.212-0.083-0.44-0.133-0.682-0.133c-1.035,0-1.875,0.84-1.875,1.875\n          c0,0.241,0.05,0.47,0.133,0.682L4.97,25.97L6.03,27.03l3.788-3.788c0.212,0.083,0.44,0.133,0.682,0.133\n          c1.035,0,1.875-0.84,1.875-1.875c0-0.241-0.05-0.47-0.133-0.682l8.576-8.576c0.212,0.083,0.44,0.133,0.682,0.133\n          c1.035,0,1.875-0.84,1.875-1.875c0-0.241-0.05-0.47-0.133-0.682L27.03,6.03z"/>\n        </svg>',ray:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <path  d="M27.03,6.03L25.97,4.97l-7.788,7.788c-0.212-0.083-0.44-0.133-0.682-0.133c-1.035,0-1.875,0.84-1.875,1.875\n          c0,0.241,0.05,0.47,0.133,0.682l-7.576,7.576c-0.212-0.083-0.44-0.133-0.682-0.133c-1.035,0-1.875,0.84-1.875,1.875\n          s0.84,1.875,1.875,1.875s1.875-0.84,1.875-1.875c0-0.241-0.05-0.47-0.133-0.682l7.576-7.576c0.212,0.083,0.44,0.133,0.682,0.133\n          c1.035,0,1.875-0.84,1.875-1.875c0-0.241-0.05-0.47-0.133-0.682L27.03,6.03z"/>\n        </svg>',arrowRay:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <path  d="M25.429,9.5L27,5l-4.5,1.571l0.934,0.935l-5.252,5.252c-0.212-0.083-0.44-0.133-0.682-0.133\n          c-1.035,0-1.875,0.84-1.875,1.875c0,0.241,0.05,0.47,0.133,0.682l-7.576,7.576c-0.212-0.083-0.44-0.133-0.682-0.133\n          c-1.035,0-1.875,0.84-1.875,1.875s0.84,1.875,1.875,1.875s1.875-0.84,1.875-1.875c0-0.241-0.05-0.47-0.133-0.682l7.576-7.576 c0.212,0.083,0.44,0.133,0.682,0.133c1.035,0,1.875-0.84,1.875-1.875c0-0.241-0.05-0.47-0.133-0.682l5.252-5.252L25.429,9.5z"/>\n        </svg>',verticalLine:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <path  d="M17.375,18.574c0-0.769-0.463-1.427-1.124-1.716V5h-1.5v11.856c-0.663,0.29-1.126,0.949-1.126,1.718\n          c0,0.771,0.463,1.429,1.126,1.718V27h1.5v-6.709C16.912,20.001,17.375,19.344,17.375,18.574z"/>\n        </svg>',horizontalLine:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <path  d="M27,14.751H15.143c-0.289-0.663-0.948-1.126-1.718-1.126s-1.429,0.463-1.718,1.126H5v1.5h6.709\n          c0.289,0.661,0.947,1.124,1.716,1.124s1.427-0.463,1.716-1.124H27V14.751z"/>\n        </svg>',parallelChannel:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <g>\n            <path  d="M17.258,7.802C17.487,7.896,17.737,7.95,18,7.95c1.077,0,1.95-0.873,1.95-1.95S19.077,4.05,18,4.05\n            c-1.076,0-1.95,0.873-1.95,1.95c0,0.263,0.054,0.513,0.147,0.742l-9.455,9.456C6.513,16.104,6.263,16.05,6,16.05\n            c-1.076,0-1.95,0.873-1.95,1.95S4.924,19.95,6,19.95c1.077,0,1.95-0.873,1.95-1.95c0-0.263-0.054-0.513-0.147-0.742L17.258,7.802z"/>\n            <path  d="M28.03,13.03L26.97,11.97l-6.228,6.228C20.513,18.104,20.263,18.05,20,18.05c-1.077,0-1.95,0.873-1.95,1.95\n            c0,0.263,0.054,0.513,0.147,0.742L11.97,26.97l1.061,1.061l6.228-6.228c0.229,0.094,0.479,0.147,0.742,0.147\n            c1.077,0,1.95-0.873,1.95-1.95c0-0.263-0.054-0.513-0.147-0.742L28.03,13.03z"/>\n          </g>\n        </svg>',parallelChannelHorizontal:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <g transform="rotate(45,16.000343,16.000344)">\n            <path d="M 17.258,7.802 C 17.487,7.896 17.737,7.95 18,7.95 19.077,7.95 19.95,7.077 19.95,6 19.95,4.923 19.077,4.05 18,4.05 c -1.076,0 -1.95,0.873 -1.95,1.95 0,0.263 0.054,0.513 0.147,0.742 L 6.742,16.198 C 6.513,16.104 6.263,16.05 6,16.05 c -1.076,0 -1.95,0.873 -1.95,1.95 0,1.077 0.874,1.95 1.95,1.95 1.077,0 1.95,-0.873 1.95,-1.95 0,-0.263 -0.054,-0.513 -0.147,-0.742 z"/>\n            <path d="m 28.03,13.03 -1.06,-1.06 -6.228,6.228 C 20.513,18.104 20.263,18.05 20,18.05 c -1.077,0 -1.95,0.873 -1.95,1.95 0,0.263 0.054,0.513 0.147,0.742 l -6.227,6.228 1.061,1.061 6.228,-6.228 c 0.229,0.094 
10.479,0.147 0.742,0.147 1.077,0 1.95,-0.873 1.95,-1.95 0,-0.263 -0.054,-0.513 -0.147,-0.742 z"/>\n          </g>\n        </svg>',fibonacci:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <g>\n            <rect x="19.5" y="19.75"  width="3" height="1.5"/>\n            <rect x="24.5" y="19.75"  width="3" height="1.5"/>\n            <rect x="9.5" y="19.75"  width="3" height="1.5"/>\n            <rect x="14.5" y="19.75"  width="3" height="1.5"/>\n            <rect x="4.5" y="19.75"  width="3" height="1.5"/>\n            <rect x="19.5" y="15.75"  width="3" height="1.5"/>\n            <rect x="24.5" y="15.75"  width="3" height="1.5"/>\n            <rect x="9.5" y="15.75"  width="3" height="1.5"/>\n            <rect x="14.5" y="15.75"  width="3" height="1.5"/>\n            <rect x="4.5" y="15.75"  width="3" height="1.5"/>\n            <rect x="19.5" y="10.75"  width="3" height="1.5"/>\n            <rect x="24.5" y="10.75"  width="3" height="1.5"/>\n            <rect x="9.5" y="10.75"  width="3" height="1.5"/>\n            <rect x="14.5" y="10.75"  width="3" height="1.5"/>\n            <rect x="4.5" y="10.75"  width="3" height="1.5"/>\n            <rect x="4" y="4.75"  width="24" height="1.5"/>\n            <rect x="4" y="25.75"  width="24" height="1.5"/>\n          </g>\n        </svg>',fibonacciFan:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <path d="m 25.785181,7.8972282 -1.06,-1.06 -7.788,7.7879998 c -0.212,-0.083 -0.44,-0.133 -0.682,-0.133 -1.035,0 -1.875,0.84 -1.875,1.875 0,0.241 0.05,0.47 0.133,0.682 l -7.5759998,7.576 c -0.212,-0.083 -0.44,-0.133 -0.682,-0.133 -1.035,0 -1.875,0.84 -1.875,1.875 0,1.035 0.84,1.875 1.875,1.875 1.035,0 1.875,-0.84 1.875,-1.875 0,-0.241 -0.05,-0.47 -0.133,-0.682 l 7.5759998,-7.576 c 0.212,0.083 0.44,0.133 0.682,0.133 1.035,0 1.875,-0.84 1.875,-1.875 0,-0.241 -0.05,-0.47 -0.133,-0.682 z"/>\n          <path d="M 20.655179,3.8114715 19.370228,3.0393952 C 14.075905,11.824185 11.514693,16.113201 6.4139159,24.602321 c -0.225782,-0.02925 -0.459106,-0.0226 -0.693918,0.03594 -1.004256,0.250389 -1.61609,1.268652 -1.3657,2.272908 0.250389,1.004256 1.268651,1.61609 2.272908,1.365701 1.004256,-0.25039 1.61609,-1.268652 1.365701,-2.272908 -0.0583,-0.233842 -0.162219,-0.443943 -0.294041,-0.629567 C 12.961586,16.889317 15.524296,12.757114 20.655179,3.8114715 Z"/>\n          <path d="m 29.700974,13.210832 -0.772076,-1.284951 c -8.284214,4.86639 -13.407576,8.056085 -21.5629239,12.956314 -0.185624,-0.131822 -0.394755,-0.235495 -0.629566,-0.29404 -1.004257,-0.25039 -2.022519,0.361444 -2.272909,1.3657 -0.250389,1.004257 0.361445,2.022519 1.365701,2.272908 1.004256,0.25039 2.022519,-0.361444 2.272908,-1.3657 0.0583,-0.233842 0.06519,-0.468136 0.03594,-0.693918 C 16.317611,21.296042 21.401967,18.15576 29.700974,13.210832 Z"/>\n        </svg>',fibonacciVertical:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <path d="m8.875,18.074c0,-0.769 -0.463,-1.427 -1.124,-1.716l0,-11.858l-1.5,0l0,11.856c-0.663,0.29 -1.126,0.949 -1.126,1.718c0,0.771 0.463,1.429 1.126,1.718l0,6.708l1.5,0l0,-6.709c0.661,-0.29 1.124,-0.947 1.124,-1.717z"/>\n          <path d="m27.64375,18.72752c0,-0.769 -0.463,-1.427 -1.124,-1.716l0,-11.858l-1.5,0l0,11.856c-0.663,0.29 -1.126,0.949 -1.126,1.718c0,0.771 0.463,1.429 1.126,1.718l0,6.708l1.5,0l0,-6.709c0.661,-0.29 1.124,-0.947 1.124,-1.717z" transform="rotate(179.538, 25.7695, 16.1523)"/>\n          <rect height="21.8" width="1.7" x="15.45" y="5.05"/>\n        </svg>',fibonacciHorizontal:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <g>\n            <rect x="19.5" y="19.75"  width="3" height="1.5"/>\n            <rect x="24.5" y="19.75"  width="3" height="1.5"/>\n            <rect x="9.5" y="19.75"  width="3" height="1.5"/>\n            <rect x="14.5" y="19.75"  width="3" height="1.5"/>\n            <rect x="4.5" y="19.75"  width="3" height="1.5"/>\n            <rect x="19.5" y="15.75"  width="3" height="1.5"/>\n            <rect x="24.5" y="15.75"  width="3" height="1.5"/>\n            <rect x="9.5" y="15.75"  width="3" height="1.5"/>\n            <rect x="14.5" y="15.75"  width="3" height="1.5"/>\n            <rect x="4.5" y="15.75"  width="3" height="1.5"/>\n            <rect x="19.5" y="10.75"  width="3" height="1.5"/>\n            <rect x="24.5" y="10.75"  width="3" height="1.5"/>\n            <rect x="9.5" y="10.75"  width="3" height="1.5"/>\n            <rect x="14.5" y="10.75"  width="3" height="1.5"/>\n            <rect x="4.5" y="10.75"  width="3" height="1.5"/>\n            <rect x="4" y="4.75"  width="24" height="1.5"/>\n            <rect x="4" y="25.75"  width="24" height="1.5"/>\n          </g>\n        </svg>',fibonacciTimeZonesCustom:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <path d="m8.875,18.074c0,-0.769 -0.463,-1.427 -1.124,-1.716l0,-11.858l-1.5,0l0,11.856c-0.663,0.29 -1.126,0.949 -1.126,1.718c0,0.771 0.463,1.429 1.126,1.718l0,6.708l1.5,0l0,-6.709c0.661,-0.29 1.124,-0.947 1.124,-1.717z"/>\n          <path d="m27.64375,18.72752c0,-0.769 -0.463,-1.427 -1.124,-1.716l0,-11.858l-1.5,0l0,11.856c-0.663,0.29 -1.126,0.949 -1.126,1.718c0,0.771 0.463,1.429 1.126,1.718l0,6.708l1.5,0l0,-6.709c0.661,-0.29 1.124,-0.947 1.124,-1.717z" transform="rotate(179.538, 25.7695, 16.1523)"/>\n          <rect height="21.8" width="1.7" x="15.45" y="5.05"/>\n        </svg>',fibonacciCircle:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n            <path d="M26.249,15.999c0.001-2.737-1.065-5.312-3.002-7.248C21.312,6.815,18.737,5.749,16,5.75\n            c-2.738,0-5.312,1.065-7.248,3.002C6.816,10.688,5.75,13.262,5.75,16c0,2.736,1.065,5.312,3.002,7.248\n            c1.937,1.935,4.511,3.001,7.249,3.001c1.993,0,3.898-0.572,5.536-1.628c0.864,0.73,2.154,0.697,2.968-0.116\n            c0.815-0.815,0.849-2.104,0.117-2.97C25.678,19.897,26.25,17.993,26.249,15.999z M9.813,22.186C8.16,20.533,7.25,18.336,7.25,16\n            c-0.001-2.337,0.909-4.534,2.562-6.188c1.652-1.652,3.851-2.563,6.188-2.563c2.336,0,4.533,0.91,6.186,2.563\n            c1.653,1.653,2.563,3.85,2.564,6.187c-0.001,1.727-0.501,3.376-1.427,4.787c-0.682-0.115-1.406,0.084-1.931,0.609\n            s-0.726,1.249-0.608,1.929c-1.41,0.926-3.059,1.426-4.784,1.426C13.663,24.749,11.466,23.839,9.813,22.186z"/>\n            <circle cx="16" cy="16" r="4"/>\n        </svg>',measureXY:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <g>\n            <g>\n              <rect x="26.75" y="19"  width="1.5" height="3"/>\n              <rect x="26.75" y="14"  width="1.5" height="3"/>\n              <rect x="26.75" y="9"  width="1.5" height="3"/>\n              <rect x="20" y="25.75"  width="3" height="1.5"/>\n              <rect x="15" y="25.75"  width="3" height="1.5"/>\n              <rect x="10" y="25.75"  width="3" height="1.5"/>\n              <rect x="4.75" y="9.001"  width="1.5" height="2.999"/>\n              <rect x="4.75" y="14.001"  width="1.5" height="2.999"/>\n              <rect x="4.75" y="19.001"  width="1.5" height="2.999"/>\n              <rect x="10" y="3.751"  width="3" height="1.5"/>\n              <rect x="15" y="3.751"  width="3" height="1.5"/>\n              <rect x="20" y="3.751"  width="3" height="1.5"/>\n            </g>\n            <polygon  points="25,3.75 25,5.25 26.75,5.25 26.75,7 28.25,7 28.25,3.75 \t"/>\n            <polygon  points="4.75,7 6.25,7 6.25,5.25 8,5.25 8,3.75 4.75,3.75 \t"/>\n            <polygon  points="8,27.25 8,25.75 6.25,25.75 6.25,24 4.75,24 4.75,27.25 \t"/>\n            <polygon  points="28.25,24 26.75,24 26.75,25.75 25,25.75 25,27.25 28.25,27.25 \t"/>\n            <polygon  points="16.5,6.535 14.5,10 16,10 16,21 14.5,21 16.5,24.465 18.5,21 17,21 17,10 18.5,10 \t"/>\n            <polygon  points="25.465,15.5 22,13.5 22,15 11,15 11,13.5 7.535,15.5 11,17.5 11,16 22,16 22,17.5 \t"/>\n          </g>\n        </svg>',circle:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <path  d="M26.249,15.999c0.001-2.737-1.065-5.312-3.002-7.248C21.312,6.815,18.737,5.749,16,5.75\n          c-2.738,0-5.312,1.065-7.248,3.002C6.816,10.688,5.75,13.262,5.75,16c0,2.736,1.065,5.312,3.002,7.248\n          c1.937,1.935,4.511,3.001,7.249,3.001c1.993,0,3.898-0.572,5.536-1.628c0.864,0.73,2.154,0.697,2.968-0.116\n          c0.815-0.815,0.849-2.104,0.117-2.97C25.678,19.897,26.25,17.993,26.249,15.999z M9.813,22.186C8.16,20.533,7.25,18.336,7.25,16\n          c-0.001-2.337,0.909-4.534,2.562-6.188c1.652-1.652,3.851-2.563,6.188-2.563c2.336,0,4.533,0.91,6.186,2.563\n          c1.653,1.653,2.563,3.85,2.564,6.187c-0.001,1.727-0.501,3.376-1.427,4.787c-0.682-0.115-1.406,0.084-1.931,0.609\n          s-0.726,1.249-0.608,1.929c-1.41,0.926-3.059,1.426-4.784,1.426C13.663,24.749,11.466,23.839,9.813,22.186z"/>\n        </svg>',pitchfork:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">
1\n          <path  d="M28.057,15.006l-1.059-1.062l-7.865,7.863c-0.212-0.083-0.441-0.133-0.683-0.133\n          c-0.243,0-0.474,0.05-0.687,0.134l-3.254-3.255l8.548-8.548l-1.06-1.061l-8.549,8.548l-3.257-3.259\n          c0.083-0.213,0.133-0.442,0.133-0.685c0-0.241-0.05-0.47-0.132-0.682l7.863-7.862l-1.059-1.061l-7.865,7.862\n          c-0.212-0.083-0.441-0.133-0.683-0.133c-1.036,0-1.875,0.839-1.875,1.875s0.839,1.875,1.875,1.875c0.241,0,0.47-0.05,0.681-0.132\n          l3.26,3.26l-5.206,5.205c-0.213-0.083-0.442-0.133-0.685-0.133c-1.036,0-1.875,0.84-1.875,1.875c0,1.036,0.839,1.875,1.875,1.875\n          s1.875-0.839,1.875-1.875c0-0.24-0.049-0.469-0.132-0.681l5.207-5.206l3.257,3.257c-0.082,0.211-0.132,0.439-0.132,0.68\n          c0,1.036,0.839,1.875,1.875,1.875s1.875-0.839,1.875-1.875c0-0.241-0.05-0.47-0.132-0.682L28.057,15.006z"/>\n        </svg>',crooked3:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <g>\n          \t<g>\n          \t\t<path  d="M5.048,22.258c-0.234,0-0.464-0.109-0.61-0.312c-0.241-0.338-0.164-0.806,0.173-1.047l14.468-10.37\n          \t\t\tl7.497,7.447c0.294,0.292,0.296,0.767,0.004,1.061c-0.292,0.296-0.767,0.294-1.061,0.004l-6.597-6.553l-13.438,9.63\n          \t\t\tC5.352,22.213,5.199,22.258,5.048,22.258z"/>\n          \t</g>\n          </g>\n        </svg>',crooked5:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <g>\n          \t<path  d="M27.53,14.03c0.293-0.293,0.293-0.768,0-1.061l-5.064-5.064l-7.5,8.5L10.461,11.9l-7.027,8.109\n          \t\tc-0.271,0.313-0.238,0.786,0.075,1.058C3.65,21.189,3.825,21.25,4,21.25c0.21,0,0.419-0.088,0.566-0.259l5.973-6.891l4.495,4.495\n          \t\tl7.5-8.5l3.936,3.936C26.763,14.323,27.237,14.323,27.53,14.03z"/>\n          </g>\n      </svg>',elliott3:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <g>\n          \t<g>\n          \t\t<path  d="M5.048,22.258c-0.234,0-0.464-0.109-0.61-0.312c-0.241-0.338-0.164-0.806,0.173-1.047l14.468-10.37\n          \t\t\tl7.497,7.447c0.294,0.292,0.296,0.767,0.004,1.061c-0.292,0.296-0.767,0.294-1.061,0.004l-6.597-6.553l-13.438,9.63\n          \t\t\tC5.352,22.213,5.199,22.258,5.048,22.258z"/>\n          \t</g>\n          \t<g>\n          \t\t<g>\n          \t\t\t<path  d="M6.483,24.807c0.35,0.532,0.524,1.266,0.524,2.201s-0.175,1.67-0.524,2.201\n          \t\t\t\tC6.134,29.742,5.64,30.008,5,30.008c-0.646,0-1.144-0.266-1.496-0.799c-0.353-0.531-0.527-1.266-0.527-2.201\n          \t\t\t\ts0.175-1.669,0.527-2.201C3.856,24.273,4.354,24.008,5,24.008C5.64,24.008,6.134,24.273,6.483,24.807z M5.976,27.693\n          \t\t\t\tc0.026-0.221,0.04-0.449,0.04-0.686s-0.014-0.467-0.04-0.689s-0.074-0.455-0.141-0.697c-0.068-0.242-0.173-0.438-0.315-0.585\n          \t\t\t\tS5.204,24.814,5,24.814c-0.205,0-0.379,0.074-0.524,0.222c-0.145,0.147-0.252,0.343-0.322,0.585\n          \t\t\t\tc-0.069,0.242-0.119,0.475-0.146,0.697s-0.04,0.453-0.04,0.689c0,0.231,0.014,0.459,0.04,0.686\n          \t\t\t\tc0.026,0.226,0.076,0.459,0.146,0.697c0.07,0.24,0.178,0.432,0.322,0.576C4.621,29.112,4.795,29.186,5,29.186\n          \t\t\t\tc0.204,0,0.377-0.073,0.52-0.219c0.143-0.145,0.247-0.338,0.315-0.58C5.901,28.145,5.949,27.914,5.976,27.693z"/>\n          \t\t\t<path  d="M5,30.058c-0.659,0-1.177-0.276-1.538-0.82c-0.355-0.536-0.535-1.286-0.535-2.229\n          \t\t\t\tc0-0.942,0.18-1.692,0.535-2.229c0.361-0.544,0.879-0.82,1.538-0.82c0.654,0,1.167,0.276,1.525,0.821\n          \t\t\t\tc0.354,0.538,0.532,1.288,0.532,2.229c0,0.941-0.179,1.691-0.532,2.229C6.167,29.781,5.654,30.058,5,30.058z M5,24.058\n          \t\t\t\tc-0.633,0-1.108,0.254-1.454,0.776c-0.345,0.52-0.52,1.252-0.52,2.174c0,0.923,0.175,1.654,0.52,2.174\n          \t\t\t\tC3.892,29.704,4.367,29.958,5,29.958c0.618,0,1.104-0.261,1.441-0.776c0.343-0.521,0.517-1.252,0.517-2.174\n          \t\t\t\tc0-0.921-0.174-1.652-0.517-2.174C6.104,24.318,5.618,24.058,5,24.058z M5,29.235c-0.217,0-0.404-0.078-0.56-0.232\n          \t\t\t\tc-0.15-0.151-0.263-0.352-0.335-0.598c-0.072-0.249-0.121-0.485-0.147-0.706c-0.026-0.23-0.04-0.463-0.04-0.691\n          \t\t\t\tc0-0.234,0.014-0.469,0.04-0.695c0.026-0.22,0.074-0.451,0.147-0.705c0.072-0.249,0.185-0.453,0.334-0.606\n          \t\t\t\tC4.595,24.844,4.783,24.765,5,24.765s0.404,0.079,0.556,0.237c0.146,0.152,0.257,0.355,0.327,0.605\n          \t\t\t\tc0.07,0.254,0.116,0.484,0.143,0.705c0.026,0.227,0.04,0.461,0.04,0.695s-0.014,0.468-0.04,0.691\n          \t\t\t\tc-0.026,0.219-0.072,0.447-0.143,0.701c-0.07,0.25-0.181,0.453-0.327,0.602C5.403,29.157,5.216,29.235,5,29.235z M5,24.864\n          \t\t\t\tc-0.192,0-0.352,0.067-0.488,0.207c-0.139,0.142-0.243,0.331-0.311,0.563c-0.071,0.25-0.118,0.475-0.144,0.689\n          \t\t\t\tc-0.026,0.223-0.04,0.453-0.04,0.684c0,0.225,0.014,0.454,0.04,0.68c0.025,0.215,0.073,0.447,0.144,0.689\n          \t\t\t\tc0.067,0.23,0.172,0.416,0.31,0.555C4.648,29.068,4.809,29.136,5,29.136s0.35-0.067,0.483-0.204\n          \t\t\t\tc0.136-0.137,0.237-0.324,0.304-0.559C5.854,28.125,5.9,27.9,5.926,27.688c0.026-0.221,0.04-0.449,0.04-0.68\n          \t\t\t\ts-0.014-0.461-0.04-0.684c-0.025-0.217-0.071-0.441-0.139-0.69C5.721,25.4,5.619,25.211,5.483,25.07\n          \t\t\t\tC5.35,24.932,5.191,24.864,5,24.864z"/>\n          \t\t</g>\n          \t</g>\n          \t<g>\n          \t\t<g>\n          \t\t\t<path  d="M24,27.008v-6h2.339c0.508,0,0.942,0.125,1.301,0.373s0.538,0.627,0.538,1.135\n          \t\t\t\tc0,0.328-0.093,0.605-0.28,0.831c-0.186,0.226-0.44,0.388-0.762,0.483v0.017c0.39,0.051,0.703,0.201,0.94,0.449\n          \t\t\t\tc0.237,0.249,0.355,0.57,0.355,0.966c0,0.311-0.063,0.584-0.19,0.818s-0.301,0.416-0.521,0.547\n          \t\t\t\tc-0.22,0.129-0.46,0.226-0.72,0.287c-0.26,0.062-0.54,0.094-0.839,0.094H24z M25.067,21.889v1.561h0.95\n          \t\t\t\tc0.355,0,0.627-0.071,0.812-0.213c0.187-0.141,0.279-0.342,0.279-0.602c0-0.266-0.095-0.456-0.287-0.572\n          \t\t\t\tc-0.192-0.115-0.491-0.174-0.898-0.174H25.067z M25.067,24.363v1.746h0.958c0.893,0,1.339-0.299,1.339-0.898\n          \t\t\t\tc0-0.305-0.104-0.522-0.313-0.652s-0.537-0.195-0.982-0.195H25.067z"/>\n          \t\t</g>\n          \t</g>\n          \t<g>\n          \t\t<g>\n          \t\t\t<path  d="M15.958,9.008l2.61-6h0.924l2.584,6h-1.221l-0.559-1.373h-2.602l-0.542,1.373H15.958z M18.06,6.72h1.864\n          \t\t\t\tL19,4.279L18.06,6.72z"/>\n          \t\t</g>\n          \t</g>\n          </g>\n        </svg>',elliott5:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n          <g>\n          \t<path  d="M27.53,14.03c0.293-0.293,0.293-0.768,0-1.061l-5.064-5.064l-7.5,8.5L10.461,11.9l-7.027,8.109\n          \t\tc-0.271,0.313-0.238,0.786,0.075,1.058C3.65,21.189,3.825,21.25,4,21.25c0.21,0,0.419-0.088,0.566-0.259l5.973-6.891l4.495,4.495\n          \t\tl7.5-8.5l3.936,3.936C26.763,14.323,27.237,14.323,27.53,14.03z"/>\n          \t<path  d="M3.999,22.9c-0.569,0-1.017,0.238-1.327,0.709c-0.304,0.459-0.457,1.096-0.457,1.891\n          \t\tc0,0.796,0.153,1.432,0.457,1.891C2.982,27.861,3.43,28.1,3.999,28.1c0.567,0,1.011-0.238,1.319-0.709\n          \t\tc0.301-0.457,0.501-1.094,0.501-1.891s-0.2-1.433-0.501-1.891C5.01,23.139,4.566,22.9,3.999,22.9z M4.692,26.039\n          \t\tc-0.021,0.17-0.058,0.354-0.111,0.543c-0.05,0.178-0.126,0.321-0.229,0.426c-0.098,0.1-0.212,0.146-0.353,0.146\n          \t\tc-0.139,0-0.255-0.048-0.355-0.146c-0.104-0.105-0.183-0.247-0.234-0.424c-0.055-0.186-0.092-0.369-0.113-0.545\n          \t\tc-0.021-0.177-0.032-0.357-0.032-0.539c0-0.186,0.011-0.367,0.032-0.542c0.021-0.174,0.059-0.357,0.113-0.546\n          \t\tc0.052-0.178,0.131-0.322,0.235-0.43c0.101-0.101,0.216-0.15,0.354-0.15c0.14,0,0.255,0.049,0.352,0.15\n          \t\tc0.104,0.106,0.18,0.251,0.229,0.43c0.054,0.188,0.09,0.372,0.111,0.546c0.021,0.175,0.032,0.356,0.032,0.542\n          \t\tS4.714,25.867,4.692,26.039z"/>\n          \t<path  d="M9.522,9.9h1.952l0.448,1.1h1.19l-2.129-4.941L10.959,6h-0.867l-2.116,4.864L7.917,11h1.171L9.522,9.9z\n          \t\t M10.5,7.337l0.639,1.686H9.851L10.5,7.337z"/>\n          \t<path  d="M16.416,22.34c0.151-0.079,0.279-0.182,0.383-0.307c0.163-0.198,0.246-0.443,0.246-0.729\n          \t\tc0-0.438-0.158-0.771-0.473-0.988C16.27,20.106,15.899,20,15.475,20h-1.97v5h1.827c0.248,0,0.482-0.025,0.695-0.078\n          \t\tc0.216-0.051,0.42-0.133,0.604-0.241c0.191-0.112,0.344-0.272,0.453-0.476c0.109-0.201,0.164-0.437,0.164-0.7\n          \t\tc0-0.341-0.104-0.624-0.312-0.841C16.795,22.516,16.62,22.406,16.416,22.34z M14.553,20.9h0.59c0.307,0,0.531,0.042,0.669,0.125\n          \t\tc0.124,0.075,0.185,0.197,
10.185,0.375s-0.062,0.311-0.187,0.404c-0.131,0.1-0.33,0.15-0.593,0.15h-0.664V20.9z M15.224,24.086\n          \t\th-0.671v-1.203h0.705c0.338,0,0.585,0.047,0.736,0.141c0.139,0.086,0.206,0.23,0.206,0.44C16.2,23.617,16.2,24.086,15.224,24.086z"/>\n          \t<path  d="M22.539,7c0.78,0,1.401-0.282,1.845-0.837l0.062-0.077l-0.808-0.568l-0.055,0.073\n          \t\tc-0.242,0.331-0.582,0.492-1.038,0.492c-0.447,0-0.794-0.144-1.061-0.438c-0.266-0.293-0.4-0.684-0.4-1.159\n          \t\tc0-0.453,0.141-0.834,0.419-1.134c0.276-0.298,0.638-0.449,1.074-0.449c0.186,0,0.37,0.038,0.551,0.113\n          \t\tc0.176,0.073,0.315,0.182,0.416,0.321l0.058,0.079l0.768-0.608l-0.055-0.072c-0.183-0.242-0.438-0.427-0.762-0.552\n          \t\tC23.233,2.062,22.905,2,22.577,2c-0.741,0-1.362,0.229-1.846,0.682C20.245,3.136,20,3.744,20,4.487c0,0.734,0.24,1.343,0.713,1.811\n          \t\tC21.187,6.764,21.801,7,22.539,7z"/>\n          \t<path  d="M29.075,17.328c-0.163-0.338-0.386-0.604-0.66-0.792c-0.271-0.185-0.563-0.321-0.871-0.407\n          \t\tC27.237,16.043,26.908,16,26.567,16h-1.8v5h1.8c0.335,0,0.664-0.05,0.976-0.146c0.314-0.098,0.609-0.246,0.877-0.439\n          \t\tc0.272-0.195,0.493-0.463,0.655-0.792c0.162-0.327,0.243-0.706,0.243-1.122C29.318,18.057,29.237,17.662,29.075,17.328z\n          \t\t M28.103,19.134c-0.069,0.184-0.16,0.331-0.269,0.441c-0.112,0.111-0.248,0.205-0.404,0.279c-0.159,0.075-0.321,0.129-0.482,0.159\n          \t\tc-0.163,0.03-0.336,0.045-0.515,0.045h-0.617v-3.131h0.617c1.194,0,1.776,0.514,1.776,1.573\n          \t\tC28.209,18.736,28.173,18.949,28.103,19.134z"/>\n          </g>\n        </svg>',label:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n            <g>\n            <path  d="M3.75,7.749v14.5h7.939L16,26.561l4.31-4.312h7.94v-14.5H3.75z M26.75,20.749h-7.062L16,24.439l-3.689-3.69\n              H5.25v-11.5h21.5V20.749z"/>\n            <polygon  points="9.291,18 10.735,18 10.735,13.251 12.426,13.251 12.426,12.018 7.601,12.018 7.601,13.251\n              9.291,13.251 "/>\n            <polygon  points="14.712,18 15.971,15.888 17.28,18 19.063,18 16.9,14.84 18.793,12.018 17.111,12.018\n              16.013,13.876 14.897,12.018 13.157,12.018 15.084,14.84 12.988,18 \t"/>\n            <polygon  points="21.265,18 22.709,18 22.709,13.251 24.399,13.251 24.399,12.018 19.574,12.018 19.574,13.251\n              21.265,13.251 "/>\n            </g>\n        </svg>',verticalLabel:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="wtk-icon-svg">\n            <g>\n            <polygon  points="16.251,11 14.751,11 14.751,23.244 13,23.244 15.5,28 18,23.243 16.251,23.243 "/>\n            <polygon  points="8.5,5.066 9.899,5.066 9.899,9 11.097,9 11.097,5.066 12.497,5.066 12.497,4.044 8.5,4.044 "/>\n            <polygon  points="17.813,4.044 16.421,4.044 15.511,5.584 14.587,4.044 13.145,4.044 14.74,6.382 13.005,9 14.433,9\n            15.476,7.25 16.561,9 18.037,9 16.245,6.382 "/>\n            <polygon  points="18.504,4.044 18.504,5.066 19.903,5.066 19.903,9 21.101,9 21.101,5.066 22.501,5.066\n            22.501,4.044 "/>\n            </g>\n        </svg>'}[t||""]||""}}class Di{static createItems(t,e,n,i,s,o,l){this.separatorList=[],t&&(Array.isArray(t)&&t?.length?this.createItemsFromArray(t,e,n,i,s,o,l):Cr(t)&&(this.createItemsFromObject(t,e,n,i,s,o,l),t?.collapsable&&this.applyCollapseOption(t.collapsable,e)))}static createItemsFromArray(t,e,n,i,s,o,l){t.forEach(u=>{this.pushItem(e,l,u,n,i,s,o)})}static createItemsFromObject(t,e,n,i,s,o,l){t.list.forEach(u=>{var d,g,I,C;if("object"==typeof u){if(Tr(u)){let S;this.pushSeparatorItem(e,u,i,s),!(null===(d=e?.get())||void 0===d)&&d.length&&(S=null===(g=e?.get())||void 0===g?void 0:g[(null===(I=e.get())||void 0===I?void 0:I.length)-1],this.separatorList.push(S)),null===(C=u.items)||void 0===C||C.forEach(N=>{this.pushItem(e,l,N,n,i,s,o,S)}),this.observeSeparatorOpenClose(S)}}else this.pushItem(e,l,u,n,i,s,o)})}static observeSeparatorOpenClose(t){t?.isOpen.observe({valueUpdated:e=>{var n;null===(n=t.items)||void 0===n||n.forEach(i=>{i.available.set(e)})}})}static getChartMenuItem(t,e,n,i,s,o){var l;let u,d;if(d=Qi(e)?e.item:e,null==n||(u=r.InfrontUtil.getKeyOrValueFromEnum(n,d),null!=u))return{value:d,id:""+d,label:Di.getLabel(e,i,s,u),name:""+d,selected:new r.InfrontUtil.Observable(t?.get()===d),available:new r.InfrontUtil.Observable((null===(l=o?.isOpen)||void 0===l?void 0:l.get())||!0),isSeparator:!1,groupName:o?.name}}static pushItem(t,e,n,i,s,o,l,u){var d;const g=this.getChartMenuItem(e,n,i,s,o,u);r.InfrontUtil.isFunction(l)&&l(g,n),t.push(g),null===(d=u?.items)||void 0===d||d.push(g)}static getLabel(t,e,n,i){var s;return Qi(t)?t?.translate?e.get(n,t?.name):null!==(s=t?.name)&&void 0!==s?s:""+t?.item:e.get(n,"string"==typeof t?t:i??""+t)}static pushSeparatorItem(t,e,n,i){const s={id:e.name,label:e?.translate?n.get(i,e.name):e.name,name:e.name,available:new r.InfrontUtil.Observable(!0),isSeparator:!0,isOpen:new r.InfrontUtil.Observable(!1),iconAfter:{primitive:Ae.getSvgIcon("dropDownCollapseArrow")},items:[]};t.push(s)}static unshiftItem(t,e,n,i,s,o,l,u){const d=this.getChartMenuItem(e,n,i,s,o,u);r.InfrontUtil.isFunction(l)&&l(d,n),t.unshift(d)}static applyCollapseOption(t,e){var n,i;const s=e?.get();if(s?.length)switch(t){case En.OPEN:this.separatorList.forEach(o=>{o.isOpen.set(!0)});break;case En.CLOSED:this.separatorList.forEach(o=>{o.isOpen.set(!1)});break;case En.FIRST:null===(i=null===(n=this.separatorList)||void 0===n?void 0:n[0])||void 0===i||i.isOpen.set(!0)}}}class Un{static getFullDefaultOptions(t,e,n){var i,s,o,l,u,d,g;if(Object.prototype.hasOwnProperty.call(null!==(i=e?.prototype)&&void 0!==i?i:{},"defaultOptions"))return e.prototype.defaultOptions;const I=t.Annotation,C=null===(d=null===(u=null===(l=null===(o=(s=t).getOptions)||void 0===o?void 0:o.call(s))||void 0===l?void 0:l.annotations)||void 0===u?void 0:u.types)||void 0===d?void 0:d[n];return t.merge(null===(g=I?.prototype)||void 0===g?void 0:g.defaultOptions,C)}static ensureOwnDefaultOptions(t,e,n){var i;return Object.prototype.hasOwnProperty.call(null!==(i=e?.prototype)&&void 0!==i?i:{},"defaultOptions")||(e.prototype.defaultOptions=Un.getFullDefaultOptions(t,e,n)),e.prototype.defaultOptions}static refreshTypeColors(t,e,n,i,s,o){var l,u,d,g,I,C;const S=null===(u=null===(l=t?.Annotation)||void 0===l?void 0:l.types)||void 0===u?void 0:u[n],N=null===(d=S?.prototype)||void 0===d?void 0:d.defaultOptions;if(null==N)return;const k=null===(g=e?.getGlobalChartSettings())||void 0===g?void 0:g.annotationColorList,x=null!==(I=k?.[i])&&void 0!==I?I:s;N.shapeOptions.fill=N.shapeOptions.stroke=x,N.labelOptions.style.color=null!==(C=k?.[1])&&void 0!==C?C:"#ABABAB",o?.(N,x)}}class Xs{static setDefaultColors(t,e){var n,i,s,o,l,u,d,g,I,C,S;if(null==t||null===(n=e.getChartWrapper())||void 0===n||!n.isAnnotationFeatureAvailable())return;const N=t.Annotation,k=e?.getGlobalChartSettings();if(!N||!k)return;const x=k.annotationColorList,Y=Un.ensureOwnDefaultOptions(t,N.types.fibonacci,"fibonacci"),et=Un.ensureOwnDefaultOptions(t,N.types.crookedLine,"crookedLine"),rt=Un.ensureOwnDefaultOptions(t,N.types.infinityLine,"infinityLine"),it=Un.ensureOwnDefaultOptions(t,N.types.pitchfork,"pitchfork"),gt=Un.ensureOwnDefaultOptions(t,N.types.elliottWave,"elliottWave"),mt=Un.ensureOwnDefaultOptions(t,N.types.tunnel,"tunnel"),Ct=Un.ensureOwnDefaultOptions(t,N.types.basicAnnotation,"basicAnnotation");Y.typeOptions.backgroundColors=["rgba(130, 170, 255, 0.4)","rgba(139, 191, 216, 0.4)","rgba(150, 216, 192, 0.4)","rgba(156, 229, 161, 0.4)","rgba(162, 241, 130, 0.4)","rgba(169, 255, 101, 0.4)"],Y.labelOptions.style.color=null!==(i=x?.[1])&&void 0!==i?i:"#ababab",et.shapeOptions.fill=et.shapeOptions.stroke=null!==(s=x?.[0])&&void 0!==s?s:"#9999ff",rt.shapeOptions.fill=rt.shapeOptions.stroke=null!==(o=x?.[0])&&void 0!==o?o:"#9999ff",rt.labelOptions.style.color=null!==(l=x?.[1])&&void 0!==l?l:"#ababab",it.shapeOptions.fill=it.shapeOptions.stroke=null!==(u=x?.[0])&&void 0!==u?u:"#9999ff",gt.shapeOptions.fill=gt.shapeOptions.stroke=null!==(d=x?.[0])&&void 0!==d?d:"#9999ff",gt.labelOptions.style.color=null!==(g=x?.[1])&&void 0!==g?g:"#ababab",mt.shapeOptions.fill=mt.shapeOptions.stroke=null!==(I=x?.[0])&&void 0!==I?I:"#9999ff",Ct.shapeOptions.fill=Ct.shapeOptions.stroke=null!==(C=x?.[0])&&void 0!==C?C:"#9999ff",Ct.labelOptions.style.color=null!==(S=x?.[1])&&void 0!==S?S:"#ababab"}}class sr{static updateNthPoint(t){return function(e,n){const i=n.options.typeOptions,s="number"==typeof i.xAxis&&this.chart.xAxis[i.xAxis],o="number"==typeof i.yAxis&&this.chart.yAxis[i.yAxis];
1s&&o&&(i.points.forEach((l,u)=>{u>=t&&(l.x=s.toValue(e[s.horiz?"chartX":"chartY"]),l.y=o.toValue(e[o.horiz?"chartX":"chartY"]))}),n.update({typeOptions:{points:i.points}}))}}static updateHeight(t,e){const n=e.options.typeOptions,i="number"==typeof n.yAxis&&this.chart.yAxis[n.yAxis];i&&n.points&&e.update({typeOptions:{height:i.toValue(t[i.horiz?"chartX":"chartY"])-(n.points[1].y||0)}})}static getFieldType(t,e){const n={backgroundColor:"color",backgroundColors:"color",borderColor:"color",borderRadius:"string",color:"color",fill:"color",fontSize:"string",labels:"string",name:"string",stroke:"color",title:"string"}[t];let i=typeof e;return null!=n&&(i=n),{string:"text",number:"number",boolean:"checkbox",color:"color"}[i]}}class $s{static add(t,e){var n;if(null==t||null===(n=e.getChartWrapper())||void 0===n||!n.isAnnotationFeatureAvailable())return;const i=t.Annotation,s=i.types.crookedLine,o=i.types.tunnel;function l(...u){return/^class\s/.test(Function.prototype.toString.call(o))?Reflect.construct(o,u,this.constructor||l):o.apply(this,u)||this}(0,fi.C6)(l,o),l.prototype.defaultOptions=Un.getFullDefaultOptions(t,o,"tunnel"),l.prototype.getPointsOptions=function(){const u=s.prototype.getPointsOptions.call(this);return u[2]=this.heightPointOptions(u[1]),u[3]=this.heightPointOptions(u[0]),u[1].y=u[0].y,u[3].y=u[2].y,u},l.prototype.translateSide=function(u,d,g){const I=Number(g),C=0===I?3:2,S=1-I;this.translatePoint(u,0,I),this.translatePoint(u,0,C),this.translatePoint(0,d,I),this.translatePoint(0,d,S)},i.types.parallelChannelHorizontal=l}static getNavigationBinding(t){var e,n,i,s,o;const l=null===(i=null===(n=null!==(e=xn.get(t,"Extensions/Annotations/NavigationBindings.js"))&&void 0!==e?e:t.NavigationBindings)||void 0===n?void 0:n.prototype)||void 0===i?void 0:i.utils,u=xn.get(t,"Stock/StockTools/StockToolsUtilities.js"),d=r.InfrontUtil.isFunction(l?.updateNthPoint)?l.updateNthPoint:null!==(s=u?.updateNthPoint)&&void 0!==s?s:sr.updateNthPoint,g=r.InfrontUtil.isFunction(l?.updateHeight)?l.updateHeight:null!==(o=u?.updateHeight)&&void 0!==o?o:sr.updateHeight;return{className:"highcharts-parallelChannelHorizontal",start:function(I){const C=this.chart.pointer.getCoordinates(I),S=this.chart.options.navigation,N=t.merge({langKey:"parallelChannelHorizontal",type:"parallelChannelHorizontal",typeOptions:{points:[{x:C.xAxis[0].value,y:C.yAxis[0].value},{x:C.xAxis[0].value,y:C.yAxis[0].value}]}},S.annotationsOptions,S.bindings.parallelChannel.annotationsOptions);return this.chart.addAnnotation(N)},steps:[d(1),g]}}}const qs=function(){return function(){const a=this.anchor(this.annotation.points[0]).absolutePosition,t=this.anchor(this.annotation.points[1]).absolutePosition;return["M",Math.round(a.x),Math.round(a.y),"L",Math.round(t.x),Math.round(t.y)]}};class or{static getFibonnaciLevels(){const t=[];for(let e=0;e<11;e++)t.push(e+0,e+.236,e+.382,e+.5,e+.618,e+.786);return t}static add(t,e){var n,i,s,o,l;if(null==t||null===(n=e.getChartWrapper())||void 0===n||!n.isAnnotationFeatureAvailable())return;const u=e.getGlobalChartSettings(),d=u?.annotationColorList,g=t.Annotation,I=g.MockPoint,C=g.types.crookedLine,S=gi(e),N=this.getFibonnaciLevels();function k(...x){return/^class\s/.test(Function.prototype.toString.call(C))?Reflect.construct(C,x,this.constructor||k):C.apply(this,x)||this}(0,fi.C6)(k,C),k.prototype.linkPoints=function(){C.prototype.linkPoints.call(this),this.linkRetracementsPoints()},k.prototype.linkRetracementsPoints=function(){const x=this.points,Y=this.chart.xAxis[0],et=this.chart.yAxis[0],rt=x[1].plotX-x[0].plotX,it=this.chart.plotTop+this.chart.plotHeight-1,gt=et.toValue(0),mt=et.toValue(it);this.startRetracements=this.startRetracements||[],this.endRetracements=this.endRetracements||[],N.forEach((Ct,Tt)=>{const Wt=Y.toPixels(x[0].x,!1)+rt*Ct,Kt=Y.toValue(Wt);this.linkRetracementPoint(Tt,Kt,gt,this.startRetracements),this.linkRetracementPoint(Tt,Kt,mt,this.endRetracements)})},k.prototype.linkRetracementPoint=function(x,Y,et,rt){var it;const gt=rt[x],mt=null===(it=this.options)||void 0===it?void 0:it.typeOptions;gt?(gt.options.x=Y,gt.options.y=et,gt.refresh()):rt[x]=new I(this.chart,this,{x:Y,
1y:et,xAxis:mt.xAxis,yAxis:mt.yAxis})},k.prototype.addShapes=function(){this.initShape({type:"path",d:qs()},!1),N.forEach((x,Y)=>{var et;const rt=[0,1].includes(x)?{stroke:null!==(et=d?.[2])&&void 0!==et?et:"#ff0000"}:{};var it;this.initShape(Object.assign(Object.assign({},rt),{type:"path",d:(it=Y,function(){const gt=this.annotation,mt=this.anchor(gt.startRetracements[it]).absolutePosition,Ct=this.anchor(gt.endRetracements[it]).absolutePosition;return["M",Math.round(mt.x),Math.round(mt.y),"L",Math.round(Ct.x),Math.round(Ct.y)]})}),!1)})},k.prototype.addLabels=function(){var x;const Y=this.points,et=Y[0].x<Y[1].x?"left":"right",rt=null===(x=this.options)||void 0===x?void 0:x.typeOptions,it=this.initLabel(t.merge(rt.labels[0],{point:function(gt){return I.pointToOptions(gt.annotation.points[0])},text:"",align:"left"===et?"right":"left"}));rt.labels[0]=it.options,N.forEach((gt,mt)=>{const Ct=this.initLabel(t.merge(rt.labels[mt+1],{point:function(Tt){return{x:Tt.annotation.endRetracements[mt].x,y:Tt.annotation.points[1].plotY-15,xAxis:0}},text:gt.toString(),align:et}));rt.labels[mt+1]=Ct.options})},k.prototype.redrawItems=function(x,Y){if(x===this.labels){const et=this.points,rt=et[0].x<et[1].x?"left":"right",it="right"===rt?"left":"right";x.forEach((gt,mt)=>{var Ct,Tt,Wt,Kt,te,le;if(0===mt){const Ie=S(et[0].y,3);t.merge(!0,gt.options,{align:it,style:{display:null!==(Tt=null===(Ct=this.options)||void 0===Ct?void 0:Ct.typeOptions)&&void 0!==Tt&&Tt.showLabelStart?"inline":"none"},text:Ie})}else{let Ie;if(null!==(Kt=null===(Wt=this.options)||void 0===Wt?void 0:Wt.typeOptions)&&void 0!==Kt&&Kt.percentageLabels)Ie=S(100*N[mt-1],1)+"%";else{const Je=this.options.seriesId,zt=Je&&this.chart.get(Je)||this.chart.series[0];let ye;if(zt){const He=zt.options.data.findIndex(he=>he[0]>this.endRetracements[mt-1].x);ye=He>0?zt.options.data[He-1]:null}if(ye){let He=ye[ye.length-1];He=re.getModifyValue(zt,He),Ie=S(He,3)}}t.merge(!0,gt.options,{align:rt,style:{display:null!==(le=null===(te=this.options)||void 0===te?void 0:te.typeOptions)&&void 0!==le&&le.showLabels?"inline":"none"},text:Ie})}})}C.prototype.redrawItems.call(this,x,Y)},k.prototype.translate=function(x,Y){return(this.points[0].plotX+x<0||this.points[1].plotX+x<0)&&(x=-Math.min(this.points[0].plotX,this.points[1].plotX)),C.prototype.translate.call(this,x,Y)},k.prototype.defaultOptions=t.merge(Un.getFullDefaultOptions(t,C,"crookedLine"),{shapeOptions:{fill:null!==(i=d?.[0])&&void 0!==i?i:"#9999FF",stroke:null!==(s=d?.[0])&&void 0!==s?s:"#9999FF"},typeOptions:{height:2,lineColor:null!==(o=d?.[0])&&void 0!==o?o:"#9999FF",lineColors:[],labels:[],showLabelStart:!0,showLabels:!0,percentageLabels:!0},labelOptions:{allowOverlap:!0,align:"right",backgroundColor:"none",borderWidth:0,crop:!1,overflow:"none",shape:"rect",style:{color:null!==(l=d?.[1])&&void 0!==l?l:"#ABABAB"},verticalAlign:"middle",y:0,rotation:-90,rotationOriginX:0,rotationOriginY:0}}),g.types.fibonacciVertical=k}static refreshColors(t,e){Un.refreshTypeColors(t,e,"fibonacciVertical",0,"#9999FF",(n,i)=>{n.typeOptions.lineColor=i})}static getNavigationBinding(t){var e,n,i,s;const o=null===(i=null===(n=null!==(e=xn.get(t,"Extensions/Annotations/NavigationBindings.js"))&&void 0!==e?e:t.NavigationBindings)||void 0===n?void 0:n.prototype)||void 0===i?void 0:i.utils,l=xn.get(t,"Stock/StockTools/StockToolsUtilities.js");return{className:"highcharts-fibonacciVertical",start:function(u){const d=this.chart.xAxis[0].toValue(u.chartX),g=this.chart.yAxis[0].toValue(u.chartY),I="fibonacciVertical",C=this.chart.options.navigation,S=C?.bindings,N=t.merge({langKey:"fibonacciVertical",type:I,typeOptions:{points:[{x:d,y:g},{x:d,y:g}]}},C.annotationsOptions,S[I]&&S[I].annotationsOptions);return this.chart.addAnnotation(N)},steps:[(r.InfrontUtil.isFunction(o?.updateNthPoint)?o.updateNthPoint:null!==(s=l?.updateNthPoint)&&void 0!==s?s:sr.updateNthPoint)(1)]}}}class Zs{static add(t,e){var n;if(null==t||null===(n=e.getChartWrapper())||void 0===n||!n.isAnnotationFeatureAvailable())return;const i=t.Annotation,s=i.MockPoint,o=i.types.crookedLine,l=i.types.fibonacciVertical,u=ze.getNumberFormat(e),d=or.getFibonnaciLevels();function g(...I){return l.apply(this,I)||this}(0,fi.C6)(g,l),g.prototype.linkRetracementsPoints=function(){const I=this.points,C=this.chart.xAxis[0],S=I[1].y-I[0].y,N=this.chart.plotLeft+this.chart.plotWidth-1,k=C.toValue(0),x=C.toValue(N);this.startRetracements=this.startRetracements||[],this.endRetracements=this.endRetracements||[],d.forEach((Y,et)=>{const rt=I[0].y+S*Y;this.linkRetracementPoint(et,k,rt,this.startRetracements),this.linkRetracementPoint(et,x,rt,this.endRetracements)})},g.prototype.addLabels=function(){var I;const C=this.points,S=C[0].y<C[1].y?"top":"bottom",N=null===(I=this.options)||void 0===I?void 0:I.typeOptions,k=this.initLabel(t.merge(N.labels[0],{point:function(x){return s.pointToOptions(x.annotation.points[0])},text:"",verticalAlign:S}));N.labels[0]=k.options,d.forEach((x,Y)=>{const et=this.initLabel(t.merge(N.labels[Y+1],{point:function(rt){return{x:rt.annotation.points[1].plotX,y:rt.annotation.endRetracements[Y].y,yAxis:0}},text:x.toString(),verticalAlign:S}));N.labels[Y+1]=et.options})},g.prototype.redrawItems=function(I,C){if(I===this.labels){const S=this.points,N=S[0].x<S[1].x?"left":"right",k="right"===N?"left":"right";I.forEach((x,Y)=>{var et,rt,it,gt,mt,Ct;if(0===Y){const Tt=u(S[0].y,3);t.merge(!0,x.options,{align:k,style:{display:null!==(rt=null===(et=this.options)||void 0===et?void 0:et.typeOptions)&&void 0!==rt&&rt.showLabelStart?"inline":"none"},text:Tt})}else{let Tt;Tt=null!==(gt=null===(it=this.options)||void 0===it?void 0:it.typeOptions)&&void 0!==gt&&gt.percentageLabels?u(100*d[Y-1],1)+"%":u(this.endRetracements[Y-1].y,3),t.merge(!0,x.options,{align:N,style:{display:null!==(Ct=null===(mt=this.options)||void 0===mt?void 0:mt.typeOptions)&&void 0!==Ct&&Ct.showLabels?"inline":"none"},text:Tt})}})}
1o.prototype.redrawItems.call(this,I,C)},g.prototype.defaultOptions=t.merge(l.prototype.defaultOptions,{typeOptions:{lineColors:[],labels:[]},labelOptions:{rotation:0}}),i.types.fibonacciHorizontal=g}static getNavigationBinding(t){return Object.assign(Object.assign({},or.getNavigationBinding(t)),{className:"highcharts-fibonacciHorizontal",start:function(e){const n=this.chart.xAxis[0].toValue(e.chartX),i=this.chart.yAxis[0].toValue(e.chartY),s="fibonacciHorizontal",o=this.chart.options.navigation,l=o?.bindings,u=t.merge({langKey:"fibonacciHorizontal",type:s,typeOptions:{points:[{x:n,y:i},{x:n,y:i}]}},o.annotationsOptions,l[s]&&l[s].annotationsOptions);return this.chart.addAnnotation(u)}})}}class Fa{static add(t,e){var n,i;if(null==t||null===(n=e.getChartWrapper())||void 0===n||!n.isAnnotationFeatureAvailable())return;const s=e.getGlobalChartSettings(),o=s?.annotationColorList,l=t.Annotation,u=l.MockPoint,d=l.types.crookedLine,g=l.types.fibonacciVertical,I=gi(e),C=[0,.236,.382,.5,.618,.786,1];function S(...N){return g.apply(this,N)||this}(0,fi.C6)(S,g),S.prototype.linkRetracementsPoints=function(){const N=this.points,k=N[0].y-N[1].y,x=N[0].x,Y=N[0].y,et=N[1].x;this.startRetracements=this.startRetracements||[],this.endRetracements=this.endRetracements||[],C.forEach((rt,it)=>{const gt=N[0].y-k*rt;this.linkRetracementPoint(it,x,Y,this.startRetracements),this.linkRetracementPoint(it,et,gt,this.endRetracements)})},S.prototype.addShapes=function(){C.forEach((N,k)=>{var x;this.initShape({type:"path",d:(x=k,function(){var Y,et,rt,it,gt,mt,Ct,Tt;const Wt=this.annotation,Kt=this.anchor(Wt.startRetracements[x]).absolutePosition,te=this.anchor(Wt.endRetracements[x]).absolutePosition,le=null!==(et=null===(Y=Wt?.options)||void 0===Y?void 0:Y.typeOptions)&&void 0!==et&&et.infiniteStart?Kt.x-1e3*(te.x-Kt.x):Kt.x,Ie=null!==(it=null===(rt=Wt?.options)||void 0===rt?void 0:rt.typeOptions)&&void 0!==it&&it.infiniteStart?Kt.y-1e3*(te.y-Kt.y):Kt.y,Je=null!==(mt=null===(gt=Wt?.options)||void 0===gt?void 0:gt.typeOptions)&&void 0!==mt&&mt.infiniteEnd?te.x+1e3*(te.x-Kt.x):te.x,zt=null!==(Tt=null===(Ct=Wt?.options)||void 0===Ct?void 0:Ct.typeOptions)&&void 0!==Tt&&Tt.infiniteEnd?te.y+1e3*(te.y-Kt.y):te.y;return["M",Math.round(le),Math.round(Ie),"L",Math.round(Je),Math.round(zt)]})},!1)})},S.prototype.addLabels=function(){var N;const k=this.points,x=k[0].x<k[1].x?"left":"right",Y=null===(N=this.options)||void 0===N?void 0:N.typeOptions,et=this.initLabel(t.merge(Y.labels[0],{point:function(rt){return u.pointToOptions(rt.annotation.startRetracements[0])},text:"",align:"left"===x?"right":"left"}));Y.labels[0]=et.options,C.forEach((rt,it)=>{const gt=this.initLabel(t.merge(Y.labels[it+1],{point:function(mt){return u.pointToOptions(mt.annotation.endRetracements[it])},text:rt.toString(),align:x}));Y.labels[it+1]=gt.options})},S.prototype.redrawItems=function(N,k){if(N===this.labels){const x=this.points,Y=x[0].x<x[1].x?"left":"right",et="right"===Y?"left":"right";N.forEach((rt,it)=>{var gt,mt,Ct,Tt,Wt,Kt;const te=null!==(mt=null===(gt=this.options)||void 0===gt?void 0:gt.typeOptions)&&void 0!==mt&&mt.percentageLabels?I(100*(0===it?C[it]:C[it-1]),3):I(0===it?this.startRetracements[0].y:this.endRetracements[it-1].y,3);t.merge(!0,rt.options,{align:0===it?et:Y,style:{display:0===it?null!==(Tt=null===(Ct=this.options)||void 0===Ct?void 0:Ct.typeOptions)&&void 0!==Tt&&Tt.showLabelStart?"inline":"none":null!==(Kt=null===(Wt=this.options)||void 0===Wt?void 0:Wt.typeOptions)&&void 0!==Kt&&Kt.showLabels?"inline":"none"},text:te})})}d.prototype.redrawItems.call(this,N,k)},S.prototype.defaultOptions=t.merge(g.prototype.defaultOptions,{typeOptions:{height:2,lineColors:[],labels:[],showLabelStart:!0,showLabels:!0,infiniteStart:!1,infiniteEnd:!1,percentageLabels:!1},labelOptions:{allowOverlap:!0,align:"right",backgroundColor:"none",borderWidth:0,crop:!1,overflow:"none",shape:"rect",style:{color:null!==(i=o?.[1])&&void 0!==i?i:"#ABABAB"},verticalAlign:"middle",y:0,rotation:0}}),l.types.fibonacciFan=S}static refreshColors(t,e){Un.refreshTypeColors(t,e,"fibonacciFan",0,"#9999FF")}static getNavigationBinding(t){var e,n,i,s;const o=null===(i=null===(n=null!==(e=xn.get(t,"Extensions/Annotations/NavigationBindings.js"))&&void 0!==e?e:t.NavigationBindings)||void 0===n?void 0:n.prototype)||void 0===i?void 0:i.utils,l=xn.get(t,"Stock/StockTools/StockToolsUtilities.js");return{className:"highcharts-fibonacciFan",start:function(u){const d=this.chart.xAxis[0].toValue(u.chartX),g=this.chart.yAxis[0].toValue(u.chartY),I="fibonacciFan",C=this.chart.options.navigation,S=C?.bindings,N=t.merge({langKey:"fibonacciFan",type:I,typeOptions:{points:[{x:d,y:g},{x:d,y:g}]}},C.annotationsOptions,S[I]&&S[I].annotationsOptions);return this.chart.addAnnotation(N)},steps:[(r.InfrontUtil.isFunction(o?.updateNthPoint)?o.updateNthPoint:null!==(s=l?.updateNthPoint)&&void 0!==s?s:sr.updateNthPoint)(1)]}}}class Va{static add(t,e){var n,i;if(null==t||null===(n=e.getChartWrapper())||void 0===n||!n.isAnnotationFeatureAvailable())return;const s=e.getGlobalChartSettings(),o=s?.annotationColorList,l=t.Annotation,u=l.types.crookedLine,d=l.types.fibonacciVertical,g=gi(e),I=[0,1,2];for(let S=0;S<30;S++)I.push(I[I.length-2]+I[I.length-1]);function C(...S){return d.apply(this,S)||this}(0,fi.C6)(C,d),C.prototype.linkRetracementsPoints=function(){const S=this.points,N=this.chart.xAxis[0],k=this.chart.yAxis[0],x=this.chart.plotTop+this.chart.plotHeight-1,Y=k.toValue(0),et=k.toValue(x);let rt=N.closestPointRange;const it=this.options.seriesId,gt=it&&this.chart.get(it)||this.chart.series[0];gt&&(rt=gt.currentDataGrouping?gt.currentDataGrouping.unitRange*gt.currentDataGrouping.count:gt.closestPointRange),this.startRetracements=this.startRetracements||[],this.endRetracements=this.endRetracements||[],I.forEach((mt,Ct)=>{const Tt=S[0].x+rt*mt;this.linkRetracementPoint(Ct,Tt,Y,this.startRetracements),this.linkRetracementPoint(Ct,Tt,et,this.endRetracements)})},C.prototype.addShapes=function(){I.forEach((S,N)=>{var k;this.initShape({type:"path",d:(k=N,function(){const x=this.annotation,Y=this.anchor(x.startRetracements[k]).absolutePosition,et=this.anchor(x.endRetracements[k]).absolutePosition;return["M",Math.round(Y.x),Math.round(Y.y),"L",Math.round(et.x),Math.round(et.y)]})},!1)})},C.prototype.addLabels=function(){var S;const N=null===(S=this.options)||void 0===S?void 0:S.typeOptions;I.forEach((k,x)=>{const Y=this.initLabel(t.merge(N.labels[x],{point:function(et){return{x:et.annotation.endRetracements[x].x,y:et.annotation.points[0].plotY-15,xAxis:0}},align:"right",text:k.toString()}));N.labels[x]=Y.options})},C.prototype.redrawItems=function(S,N){S===this.labels&&S.forEac
1h((k,x)=>{var Y,et;const rt=g(I[x],0);t.merge(!0,k.options,{style:{display:(0===x||this.startRetracements[x].plotX-this.startRetracements[x-1].plotX>10)&&null!==(et=null===(Y=this.options)||void 0===Y?void 0:Y.typeOptions)&&void 0!==et&&et.showLabels?"inline":"none"},text:rt})}),u.prototype.redrawItems.call(this,S,N)},C.prototype.translate=function(S,N){return this.points[0].plotX+S<0&&(S=-this.points[0].plotX),u.prototype.translate.call(this,S,N)},C.prototype.defaultOptions=t.merge(d.prototype.defaultOptions,{typeOptions:{lineColors:[],labels:[],showLabels:!0,showLabelStart:void 0,percentageLabels:void 0},labelOptions:{allowOverlap:!0,align:"right",backgroundColor:"none",borderWidth:0,crop:!1,overflow:"none",shape:"rect",style:{color:null!==(i=o?.[1])&&void 0!==i?i:"#ABABAB"},verticalAlign:"middle",y:0,rotation:-90,rotationOriginX:0,rotationOriginY:0}}),l.types.fibonacciTimeZonesCustom=C}static refreshColors(t,e){Un.refreshTypeColors(t,e,"fibonacciTimeZonesCustom",0,"#9999FF")}static getNavigationBinding(t){return{className:"highcharts-fibonacciTimeZonesCustom",start:function(e){const n=this.chart.xAxis[0].toValue(e.chartX),i=this.chart.yAxis[0].toValue(e.chartY),s="fibonacciTimeZonesCustom",o=this.chart.options.navigation,l=o?.bindings,u=t.merge({langKey:"fibonacciTimeZonesCustom",type:s,typeOptions:{points:[{x:n,y:i}]}},o.annotationsOptions,l[s]&&l[s].annotationsOptions);return this.chart.addAnnotation(u)}}}}class Qs{static add(t,e){var n;if(null==t||null===(n=e.getChartWrapper())||void 0===n||!n.isAnnotationFeatureAvailable())return;const i=t.Annotation,s=i.MockPoint,o=i.types.crookedLine,l=i.types.fibonacciVertical,u=gi(e),d=[.382,.5,.618,1];function g(...I){return l.apply(this,I)||this}(0,fi.C6)(g,l),g.prototype.linkRetracementsPoints=function(){},g.prototype.addShapes=function(){this.initShape({type:"path",d:qs()},!1),d.forEach(I=>{const C=Math.sqrt(Math.pow(this.points[1].plotY-this.points[0].plotY,2)+Math.pow(this.points[1].plotX-this.points[0].plotX,2))*I;this.initShape({type:"circle",r:C,points:[this.points[0]],fill:"transparent"},!1)})},g.prototype.addLabels=function(){const I=this.points,N=this.options.typeOptions,k=this.initLabel(t.merge(N.labels[0],{point:function(x){return s.pointToOptions(x.annotation.points[1])},text:"",align:I[0].x<I[1].x?"left":"right",verticalAlign:I[0].y<I[1].y?"top":"bottom"}));N.labels[0]=k.options,d.forEach((x,Y)=>{const et=this.initLabel(t.merge(N.labels[Y+1],{point:function(rt){return{x:rt.annotation.points[0].plotX,y:rt.annotation.points[0].plotY+rt.annotation.shapes[Y+1].options.r-5}},text:x.toString(),align:"center",verticalAlign:"top"}));N.labels[Y+1]=et.options})},g.prototype.redrawItems=function(I,C){if(I===this.labels){const S=this.points;I.forEach((N,k)=>{if(0===k){const x=u(S[1].y,3);t.merge(!0,N.options,{style:{display:this.options.typeOptions.showLabelEnd?"inline":"none"},text:x,align:S[0].x<S[1].x?"left":"right",verticalAlign:S[0].y<S[1].y?"bottom":"top"})}else{let x;x=this.options.typeOptions.percentageLabels?u(100*d[k-1],1)+"%":u(this.chart.yAxis[0].toValue(this.shapes[k].points[0].plotY+this.shapes[k].options.r,!1),3),t.merge(!0,N.options,{style:{display:this.options.typeOptions.showLabels?"inline":"none"},text:x})}})}else d.forEach((S,N)=>{I[N+1].options.r=Math.sqrt(Math.pow(this.points[1].plotY-this.points[0].plotY,2)+Math.pow(this.points[1].plotX-this.points[0].plotX,2))*S});o.prototype.redrawItems.call(this,I,C)},g.prototype.defaultOptions=t.merge(l.prototype.defaultOptions,{typeOptions:{lineColors:[],labels:[],showLabelEnd:!0,showLabelStart:void 0},labelOptions:{rotation:0}}),i.types.fibonacciCircle=g}static getNavigationBinding(t){return Object.assign(Object.assign({},or.getNavigationBinding(t)),{className:"highcharts-fibonacciCircle",start:function(e){const n=this.chart.xAxis[0].toValue(e.chartX),i=this.chart.yAxis[0].toValue(e.chartY),s="fibonacciCircle",o=this.chart.options.navigation,l=o&&o.bindings,u=t.merge({langKey:"fibonacciCircle",type:s,typeOptions:{points:[{x:n,y:i},{x:n,y:i}]}},o.annotationsOptions,l[s]&&l[s].annotationsOptions);return this.chart.addAnnotation(u)}})}}class ai{static add(t,e){var n,i,s,o;if(null==t||null===(n=e.getChartWrapper())||void 0===n||!n.isAnnotationFeatureAvailable())return;const l=e.getGlobalChartSettings(),u=l?.annotationColorList,d=t.Annotation,g=d.types.crookedLine;function I(...C){return/^class\s/.test(Function.prototype.toString.call(g))?Reflect.construct(g,C,this.constructor||I):g.apply(this,C)||this}(0,fi.C6)(I,g),I.prototype.addLabels=function(){this.getPointsOptions().forEac
1h((C,S)=>{if(1!==S)return;const k=this.initLabel(t.merge(C.label,{text:this.options.typeOptions.labels[S],point:function(x){return x.annotation.points[S]}}),!1);C.label=k.options})},I.prototype.defaultOptions=t.merge(Un.getFullDefaultOptions(t,g,"crookedLine"),{shapeOptions:{fill:null!==(i=u?.[3])&&void 0!==i?i:"#000000",stroke:null!==(s=u?.[3])&&void 0!==s?s:"#000000"},typeOptions:{labels:[]},labelOptions:{align:"left",verticalAlign:"middle",allowOverlap:!0,crop:!1,overflow:"justify",type:"rect",backgroundColor:"none",borderWidth:0,style:{color:null!==(o=u?.[1])&&void 0!==o?o:"#ABABAB"},formatter:function(){return ai.labelFormatter(this)}}}),d.types.statisticLine=I}static refreshColors(t,e){Un.refreshTypeColors(t,e,"statisticLine",3,"#000000")}static redraw(t){var e;const n=null===(e=t?.chart)||void 0===e?void 0:e.annotations;null!=t.kdTree&&n?.length&&n.forEach(i=>{var s;"statisticLine"===(null===(s=i.options)||void 0===s?void 0:s.type)&&i.redraw(!1)})}static labelFormatter(t){var e,n,i,s,o,l,u,d,g,I,C,S,N,k,x,Y,et,rt,it,gt,mt,Ct,Tt,Wt,Kt;const te=null===(e=t.series)||void 0===e?void 0:e.chart,le=null===(n=te?.series)||void 0===n?void 0:n.filter(Yn=>{var An;return re.isSeriesVisible(Yn)&&re.isInstrumentSeries(null===(An=Yn.options)||void 0===An?void 0:An.id)}),Ie=null===(s=null===(i=te?.options)||void 0===i?void 0:i.infront)||void 0===s?void 0:s.chartInstrumentList,Je=Ie?.getGlobalChartSettings(),zt=Ie?.getLanguageHandler();if(!Je||!zt||!le?.length)return ai.getLabelText();const ye=null===(o=t.target)||void 0===o?void 0:o.controlPoints,He=null===(u=null===(l=ye?.[0])||void 0===l?void 0:l.graphic)||void 0===u?void 0:u.x,he=null===(g=null===(d=ye?.[0])||void 0===d?void 0:d.graphic)||void 0===g?void 0:g.y,Ge=null===(C=null===(I=ye?.[1])||void 0===I?void 0:I.graphic)||void 0===C?void 0:C.x,Lt=null===(N=null===(S=ye?.[1])||void 0===S?void 0:S.graphic)||void 0===N?void 0:N.y;if(null==He||null==he||null==Ge||null==Lt)return ai.getLabelText("-");const je=null===(k=te?.pointer)||void 0===k?void 0:k.findNearestKDPoint(le,!0,{chartX:He,chartY:he});if(null==je){const Yn=null===(Tt=null===(Ct=null===(mt=null===(gt=null===(it=null===(rt=null===(et=null===(Y=null===(x=t.target)||void 0===x?void 0:x.graphic)||void 0===Y?void 0:Y.element)||void 0===et?void 0:et.children)||void 0===rt?void 0:rt[1])||void 0===it?void 0:it.children)||void 0===gt?void 0:gt[0])||void 0===mt?void 0:mt.children)||void 0===Ct?void 0:Ct[1])||void 0===Tt?void 0:Tt.textContent;if(null!=Yn)return Yn}const gn=je?.series;if(null==gn)return ai.getLabelText("-");const _n=null===(Wt=te?.pointer)||void 0===Wt?void 0:Wt.findNearestKDPoint([gn],!0,{chartX:Ge,chartY:Lt});if(null==je?.x||null==_n?.x||!je?.y||!_n?.y)return ai.getLabelText("-");const we=gn?.name,si=Ce.getDataTypeAddon(null===(Kt=gn?.options)||void 0===Kt?void 0:Kt.id,Ie),vn=Math.abs(_n.index-je.index)+1,oi=_n.y-je.y,ln=r.InfrontUtil.formatNumber(oi,2),vi=r.InfrontUtil.formatNumber(oi/je.y*100,2),mn=Je.isIntraday?r.InfrontUtil.formatDateTime(new Date(je.x),r.InfrontUtil.formatSettings.dateTimeFormat,zt):r.InfrontUtil.formatDate(new Date(je.x)),ti=Je.isIntraday?r.InfrontUtil.formatDateTime(new Date(_n.x),r.InfrontUtil.formatSettings.dateTimeFormat,zt):r.InfrontUtil.formatDate(new Date(_n.x));return ai.getLabelText(we+si,mn,ti,""+vn,ln,vi)}static getLabelText(t=null,e="-",n="-",i="-",s="-",o="-"){let l="";return t&&(l+=`<strong>${t}</strong><br>`),l+=`Start date: ${e}<br>`,l+=`End date: ${n}<br>`,l+=`Points: ${i}<br>`,l+=`Change: ${s}<br>`,l+=`Change %: ${o}<br>`,l}static getNavigationBinding(t){var e,n,i,s;const o=null===(i=null===(n=null!==(e=xn.get(t,"Extensions/Annotations/NavigationBindings.js"))&&void 0!==e?e:t.NavigationBindings)||void 0===n?void 0:n.prototype)||void 0===i?void 0:i.utils,l=xn.get(t,"Stock/StockTools/StockToolsUtilities.js");return{className:"highcharts-statisticLine",start:function(u){const d=this.chart.pointer.getCoordinates(u),g=this.utils.getAssignedAxis(d.xAxis),I=this.utils.getAssignedAxis(d.yAxis),C="statisticLine",S=this.chart.options.navigation;if(!g||!I)return;const N=S?.bindings,k=t.merge({langKey:"statisticLine",type:C,typeOptions:{line:{dashStyle:"Dash",markerEnd:"arrow",zIndex:100},xAxis:this.chart.xAxis.indexOf(g.axis),yAxis:this.chart.yAxis.indexOf(I.axis),points:[{x:g.value,y:I.value},{x:g.value,y:I.value}]}},S.annotationsOptions,N[C]&&N[C].annotationsOptions);return this.chart.addAnnotation(k)},steps:[(r.InfrontUtil.isFunction(o?.updateNthPoint)?o.updateNthPoint:null!==(s=l?.updateNthPoint)&&void 0!==s?s:sr.updateNthPoint)(1)]}}}class qo{static add(t,e){var n,i,s;if(null==t||null===(n=e.getChartWrapper())||void 0===n||!n.isAnnotationFeatureAvailable())return;t.Chart.prototype.addAnnotation=function(u,d){const g=Qt.ANNOTATION+r.InfrontUtil.makeUUID(),I=Object.assign({id:g},u),C=this.initAnnotation(I);return this.options.annotations.push(C.options),t.pick(d,!0)&&(C.redraw(),C.graphic.attr({opacity:1})),C},t.Chart.prototype.removeAnnotation=function(u){const d=this.annotations,g="annotations"===u.coll?u:t.find(d,function(I){return I.options.id===u});if(g){t.erase(this.options.annotations,g.options);const I=this.annotations.findIndex("annotations"===u.coll?C=>C===g:C=>{var S;return(null===(S=C?.options)||void 0===S?void 0:S.id)===u});I>-1&&this.options.annotations.splice(I,1),t.erase(d,g),t.fireEvent(g,"remove"),g.destroy()}};const o=null!==(i=xn.get(t,"Extensions/Annotations/NavigationBindings.js"))&&void 0!==i?i:t.NavigationBindings;if(null==o)return;const l=null!==(s=t.Popup)&&void 0!==s?s:xn.get(t,"Extensions/Annotations/Popup/Popup.js");null!=l&&(t.removeEvent(o,"showPopup"),t.addEvent(o,"showPopup",function(u){this.popup||(this.popup=new l(this.chart.container,this.chart.options.navigation.iconsURL||this.chart.options.stockTools&&this.chart.options.stockTools.gui.iconsURL||"",this.chart)),this.popup.showForm(u.formType,this.chart,u.options,u.onSubmit,u)})),o.annotationsEditable={nestedOptions:{labelOptions:["style","format","backgroundColor"],labels:["style"],label:["style"],style:["fontSize","color"],background:["fill","strokeWidth","stroke"],innerBackgroun
1d:["fill","strokeWidth","stroke"],outerBackground:["fill","strokeWidth","stroke"],shapeOptions:["fill","strokeWidth","stroke"],shapes:["fill","strokeWidth","stroke"],line:["strokeWidth","stroke"],backgroundColors:[!0],connector:["fill","strokeWidth","stroke"],crosshairX:["strokeWidth","stroke"],crosshairY:["strokeWidth","stroke"],showLabelStart:[!0],showLabelEnd:[!0],showLabels:[!0],infiniteStart:[!0],infiniteEnd:[!0],infiniteStartRollOver:[!0],infiniteEndRollOver:[!0],percentageLabels:[!0],showLabelsOnInfiniteLinesSelect:[]},circle:["shapes"],verticalLine:[],label:["labelOptions"],measure:["background","crosshairY","crosshairX"],fibonacci:["shapeOptions"],tunnel:["background","line","height"],pitchfork:["innerBackground","outerBackground"],rect:["shapes"],crookedLine:[],basicAnnotation:["shapes","labelOptions"],ellipsis:["shapeOptions"],fibonacciTimeZonesCustom:["showLabels","shapeOptions"]},o.annotationsNonEditable={rectangle:["crosshairX","crosshairY","label"],fibonacci:["line","background"],fibonacciTimeZonesCustom:["percentageLabels","showLabelStart","showLabelEnd","line"]},o.prototype.annotationToFields=function(u){var d;const g=xn.get(t,"Extensions/Annotations/NavigationBindingsUtilities.js"),I=u.options,C=o.annotationsEditable,S=C.nestedOptions,N=r.InfrontUtil.isFunction(null===(d=this.utils)||void 0===d?void 0:d.getFieldType)?(rt,it)=>this.utils.getFieldType(it):(rt,it)=>{var gt;return(null!==(gt=g?.getFieldType)&&void 0!==gt?gt:sr.getFieldType)(rt,it)},k=t.pick(I.type,I.shapes&&I.shapes[0]&&I.shapes[0].type,I.labels&&I.labels[0]&&I.labels[0].itemType,"label"),x=o.annotationsNonEditable[I.langKey]||[],Y={langKey:I.langKey,type:k};function et(rt,it,gt,mt,Ct){let Tt;gt&&null!=rt&&-1===x.indexOf(it)&&((gt.indexOf&&gt.indexOf(it))>=0||gt[it]||!0===gt)&&(t.isArray(rt)?(mt[it]=[],rt.forEach(function(Wt,Kt){t.isObject(Wt)?(mt[it][Kt]={},t.objectEach(Wt,function(te,le){et(te,le,S[it],mt[it][Kt],it)})):et(Wt,0,S[it],mt[it],it)})):t.isObject(rt)?(Tt={},t.isArray(mt)?(mt.push(Tt),Tt[it]={},Tt=Tt[it]):mt[it]=Tt,t.objectEach(rt,function(Wt,Kt){et(Wt,Kt,0===it?gt:S[it],Tt,it)})):"format"===it?mt[it]=[t.format(rt,u.labels[0].points[0]).toString(),"text"]:t.isArray(mt)?mt.push([rt,N(Ct,rt)]):mt[it]=[rt,N(it,rt)])}return t.objectEach(I,function(rt,it){"typeOptions"===it?(Y[it]={},t.objectEach(I[it],function(gt,mt){et(gt,mt,S,Y[it],mt)})):et(rt,it,C[k],Y,it)}),Y}}}const Zo=[jt.TOGGLE_ANNOTATIONS,jt.DELETE_ALL_ANNOTATIONS],Qo=["tunnel","parallelChannelHorizontal","fibonacci"],Jo=["infinityLine","tunnel","parallelChannelHorizontal","pitchfork"],tl=[{controlPointOptions:["events","positioner"]},{labelOptions:["formatter"]},{shapeOptions:["points"]},{typeOptions:[{points:[{controlPoint:["events","positioner"]}]},{labels:[{controlPointOptions:["events","positioner"]},"formatter","point"]},{background:["points"]},{line:["points"]},{heightControlPoint:["events","positioner"]},{innerBackground:["points",{controlPointOptions:["events","positioner"]}]},{outerBackground:["points",{controlPointOptions:["events","positioner"]}]}]},"events"];class Gi{constructor(t){this.annotationList=[],this.annotationListVisible=!0,this.chartInstrumentList=t,this.uuid=r.InfrontUtil.makeUUID()}init(t){this.setAnnotationList(t)}setAnnotationList(t){var e;this.annotationList=r.InfrontUtil.deepCopy(t)||[],null===(e=this.chartInstrumentList.getWidgetChartStorage())||void 0===e||e.updateStorage()}getAnnotationList(){return this.annotationList||[]}clearAnnotationList(){this.annotationList.length=0}getAnotationsListVisible(){return this.annotationListVisible}setAnnotationListVisible(t){this.annotationListVisible=t}toggleAnnotations(t){var e,n,i,s,o,l;this.annotationListVisible=t??!this.annotationListVisible,this.annotationList.forEach(d=>d.visible=this.annotationListVisible);const u=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getChart();null===(n=u?.annotations)||void 0===n||n.forEach(d=>{d.setVisibility(this.annotationListVisible)}),null===(s=null===(i=u?.options)||void 0===i?void 0:i.annotations)||void 0===s||s.forEach(d=>{d.visible=this.annotationListVisible}),null===(l=null===(o=this.chartInstrumentList)||void 0===o?void 0:o.getWidgetChartStorage())||void 0===l||l.updateStorage()}removeAllAnnotations(){var t,e,n;const i=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getChart(),s=i?.navigationBindings;if(null!=s?.selectedButton)return void r.InfrontUtil.errorLog("HighchartsAnnotations (removeAllAnnotations): Please complete current annotation configuration!");Tn.closePopup(this.chartInstrumentList);const o=i?.annotations;if(o?.length){for(let l=o.length-1;l>-1;--l){const u=null===(n=null===(e=o[l])||void 0===e?void 0:e.options)||void 0===n?void 0:n.id;i.removeAnnotation(u)}o.length=0,this.clearAnnotationList()}}createAvailableAnnotations(t,e){if(!t)return;const n=this.chartInstrumentList.getLanguageHandler();t.clear(),Di.createItems(e?.selectableAnnotations,t,jt,n,ht.kLanguageKeyAnnotation,i=>{const s=i.name;i.rowClass=Zo.includes(s)?null:`highcharts-${""+s}-button-${this.uuid}`,i.icon={primitive:Mr.getSvgIcon(this.getIconName(s))},i.value===jt.TOGGLE_ANNOTATIONS&&(i.state=new r.InfrontUtil.Observable,i.iconAfter={observable:new r.InfrontUtil.Observable},i.actions={openAction:{getActionValue:o=>(i.state.set(o),Ae.getSvgIcon(o?`${e.generalDropDownOptions.booleanRepresentation}On`:`${e.generalDropDownOptions.booleanRepresentation}Off`)),updateAction:()=>{i.iconAfter.observable.set(i.actions.openAction.getActionValue(this.annotationListVisible))}}},i.actions.openAction.updateAction())})}getIconName(t){return t===jt.INFINITY_LINE?"ray":t===jt.STATISTIC_LINE?"measureXY":t===jt.LABEL_ANNOTATION?"label":t}getStockToolOptions(){return{stockTools:{gui:{enabled:!1}}}}getNavigationOptions(){var t,e,n,i,s,o;const l=null===(e=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getChartWrapper())||void 0===e?void 0:e.getHighcharts();if(null==l.Annotation||null===(i=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getChartWrapper())||void 0===i||!i.isAnnotationFeatureAvailable())return;const u=this.chartInstrumentList.getGlobalChartSettings(),d=u?.annotationColorList;return{navigation:{bindings:{segment:{className:`highcharts-segment-button-${this.uuid}`},arrowSegment:{className:`highcharts-arrowSegment-button-${this.uuid}`},ray:{className:`highcharts-ray-button-${this.uuid}`},arrowRay:{className:`highcharts-arrowRay-button-${this.uuid}`},infinityLine:{className:`highcharts-infinityLine-button-${this.uuid}`},horizontalLine:{className:`highcharts-horizontalLine-button-${this.uuid}`},verticalLine:{className:`highcharts-verticalLine-button-${this.uuid}`},crooked3:{className:`highcharts-crooked3-button-${this.uuid}`},crooked5:{className:`highcharts-crooked5-button-${this.uuid}`},elliott3:{className:`highcharts-elliott3-button-${this.uuid}`},elliott5:{className:`highcharts-elliott5-button-${this.uuid}`},fibonacci:{className:`highcharts-fibonacci-button-${this.uuid}`},fibonacciVertical:Object.assign(Object.assign({},or.getNavigationBinding(l)),{className:`highcharts-fibonacciVertical-button-${this.uuid}`}),fibonacciHorizontal:Object.assign(Object.assign({},Zs.getNavigationBinding(l)),{className:`highcharts-fibonacciHorizontal-button-${this.uuid}`}),fibonacciFan:Object.assign(Object.assign({},Fa.getNavigationBinding(l)),{className:`highcharts-fibonacciFan-button-${this.uuid}`}),fibonacciTimeZonesCustom:Object.assign(Object.assign({},Va.getNavigationBinding(l)),{className:`highcharts-fibonacciTimeZonesCustom-button-${this.uuid}`}),fibonacciCircle:Object.assign(Object.assign({},Qs.getNavigationBinding(l)),{className:`highcharts-fibonacciCircle-button-${this.uuid}`}),pitchfork:{className:`highcharts-pitchfork-button-${this.uuid}`},parallelChannel:{className:`highcharts-parallelChannel-button-${this.uuid}`},parallelChannelHorizontal:Object.assign(Object.assign({},$s.getNavigationBinding(l)),{className:`highcharts-parallelChannelHorizontal-button-${this.uuid}`}),statisticLine:Object.assign(Object.assign({},ai.getNavigationBinding(l)),{className:`highcharts-statisticLine-button-${this.uuid}`}),circleAnnotation:{className:`highcharts-circle-button-${this.uuid}`,annotationsOptions:{shapeOptions:{fill:"transparent"}}},labelAnnotation:{className:`highcharts-labelAnnotation-button-${this.uuid}`,annotationsOptions:{labelOptions:{backgroundColor:"transparent",borderColor:null!==(s=d?.[0])&&void 0!==s?s:"#9999FF",style:{color:null!==(o=d?.[3])&&void 0!==o?o:"#000000"}}}},measureXY:{className:`highcharts-measureXY-button-${this.uuid}`},measureX:{className:`highcharts-measureX-button-${this.uuid}`},measureY:{className:`highcharts-measureY-button-${this.uuid}`}},bindingsClassName:"highcharts-bindings-container"}}}openAnnotationSettings(t,e){var n;r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("ChartAnnotations: openAnnotationSettings","annotation=",t,"options=",e);const i=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getWidgetOpenAnnotationSettings();null==t||null==e||null==i||i([s=>{this.annotationSettingsCallback(t,e,s)},e])}annotationSettingsCallback(t,e,n){var i,s,o,l;if(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("ChartAnnotations: annotationSettingsCallback","annotation=",t,"options=",e,"formParams=",n),null==t||null==e||null==n)return;const u=(null===(s=null===(i=e.typeOptions)||void 0===i?void 0:i.labels)||void 0===s?void 0:s.length)||0,d=Object.keys((null===(o=e.labelOptions)||void 0===o?void 0:o.style)||{});e.typeOptions={},e.labelOptions={},null!=e.shapes&&(e.shapes=[]),null!=e.shapeOptions&&delete e.shapeOptions;const g=e.typeOptions,I=e.labelOptions,C=e.shapes;let S=!1;null===(l=Object.keys(n))||void 0===l||l.forEach(N=>{var k;const[x,Y]=N.split("~");if("flatparams"===x)g[Y]=n[N],S=!0;else if("labelOptions"===x){const et=n[N];d?.includes(Y)?(I.style=I.style||{},I.style[Y]=et):I[Y]="format"===Y?""+et:et}else if("labelStyle"===x){u>0&&(g.labels=[]);for(let et=0;et<u;et++)g.labels.push({style:{color:n[`${x}~color`],fontSize:n[`${x}~fontSize`]}})}else{let et=null!==(k=n[N])&&void 0!==k?k:"none";["labels","backgroundColors"].includes(x)?(et="labels"===x?""+et:et,g[x]=g[x]||[],g[x][Y]=et):(g[x]=g[x]||{},g[x][Y]=et)}}),null!=C&&null!=g.shapes0Ref&&(C[0]=r.InfrontUtil.deepCopy(g.shapes0Ref),delete g.shapes0Ref),delete g.labelOptions,delete g.labelStyle,r.InfrontUtil.isEmptyObject(e.typeOptions)&&r.InfrontUtil.isEmptyObject(e.labelOptions)&&r.InfrontUtil.isEmptyObject(e.shapes)||(t?.update(e),S&&r.InfrontUtil.setZeroTimeout(()=>t?.update({})))}getAnnotationSettingsHeader(t){var e,n;return(null===(n=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getLanguageHandler())||void 0===n?void 0:n.get(ht.kLanguageKeyAnnotation,t?.langKey))||"Highcharts.Annotation"}getAnnotationNameKey(t){return"crookedLine"===t?jt.CROOKED5:"label"===t?jt.LABEL_ANNOTATION:t}optionsToTypeOptions(t){var e,n,i,s;t.typeOptions=t?.typeOptions||{};const o=t.typeOptions;return null!=(null===(e=t?.shapes)||void 0===e?void 0:e[0])&&(o.shapes0Ref=t.shapes[0]),null!=t?.labelOptions&&(o.labelOptions=Object.assign(Object.assign({},t.labelOptions),(null===(n=t.labelOptions)||void 0===n?void 0:n.style)||{}),delete o.labelOptions.style),null!=(null===(s=null===(i=o?.labels)||void 0===i?void 0:i[0])||void 0===s?void 0:s.style)&&(o.labelStyle=o.labels[0].style),o}setAnnotationSettingsParams(t,e){var n,i;const s=this.optionsToTypeOptions(t),o=this.getAnnotationNameKey(t?.langKey);null===(n=this.getAnnotationSettingsGroup(o))||void 0===n||n.forEac
1h(l=>{const u=this.getAnnotationParamsBlacklist(l,o),d=Object.keys(s?.[l]||{}).filter(g=>!u.includes(g));d.sort((g,I)=>this.sortAnnotationSettingsParams(g,I)),d.forEach((g,I)=>{var C,S;if(0===I&&(e[`group_${l}`]=!0),"labels"===l&&I>0&&o===jt.ELLIOTT3&&!isNaN(+g)&&+g>3)return;const N=null===(S=null===(C=s[l])||void 0===C?void 0:C[g])||void 0===S?void 0:S[0];e[`${l}~${g}`]=this.isAnnotationSettingsInputColorKey(`${l}~${g}`)?Bt.getAnnotationColorHexAlpha(N):N})}),null===(i=this.getAnnotationSettingsFlatParams(o))||void 0===i||i.forEach((l,u)=>{var d;const g="flatparams";0===u&&(e[`group_${g}`]=!0);const I=null===(d=s[l])||void 0===d?void 0:d[0];e[`${g}~${l}`]=I})}isAnnotationSettingsInputColorKey(t){var e;return["stroke","fill","color","backgroundColor"].includes(null===(e=t?.split("~"))||void 0===e?void 0:e[1])||t?.startsWith("backgroundColors")}getAnnotationSettingsGroup(t){switch(t){case jt.ELLIOTT3:case jt.ELLIOTT5:return["line","labels"];case jt.PARALLEL_CHANNEL:case jt.PARALLEL_CHANNEL_HORIZONTAL:return["line","background"];case jt.FIBONACCI:return["backgroundColors","labelStyle"];case jt.FIBONACCI_CIRCLE:case jt.FIBONACCI_FAN:case jt.FIBONACCI_HORIZONTAL:case jt.FIBONACCI_VERTICAL:case jt.FIBONACCI_TIME_ZONES:return["labelStyle"];case jt.CIRCLE_ANNOTATION:return["shapes0Ref"];case jt.PITCHFORK:return["innerBackground","outerBackground"];case jt.LABEL_ANNOTATION:return["labelOptions"]}return["line"]}getAnnotationSettingsFlatParams(t){switch(t){case jt.FIBONACCI_CIRCLE:return["showLabelEnd","showLabels","percentageLabels"];case jt.FIBONACCI_FAN:return["showLabelStart","showLabels","infiniteStart","infiniteEnd","percentageLabels"];case jt.FIBONACCI_HORIZONTAL:case jt.FIBONACCI_VERTICAL:return["showLabelStart","showLabels","percentageLabels"];case jt.FIBONACCI_TIME_ZONES:return["showLabels"]}return[]}getAnnotationParamsBlacklist(t,e){switch(e){case jt.SEGMENT:case jt.RAY:case jt.INFINITY_LINE:case jt.HORIZONTAL_LINE:case jt.VERTICAL_LINE:case jt.FIBONACCI_CIRCLE:case jt.FIBONACCI_FAN:case jt.FIBONACCI_HORIZONTAL:case jt.FIBONACCI_VERTICAL:case jt.FIBONACCI_TIME_ZONES:return["fill"];case jt.FIBONACCI:return["fill","strokeWidth"];case jt.PARALLEL_CHANNEL:case jt.PARALLEL_CHANNEL_HORIZONTAL:case jt.PITCHFORK:if("line"===t)return["fill"];if(["background","innerBackground","outerBackground"].includes(t))return["stroke"]}return[]}sortAnnotationSettingsParams(t,e){return"format"===t?-1:"format"===e?1:"fontSize"===t?-1:"fontSize"===e?1:"stroke"===t?-1:"stroke"===e?1:"color"===t?-1:"color"===e?1:"backgroundColor"===t?-1:"backgroundColor"===e?1:"fill"===t?-1:"fill"===e?1:"strokeWidth"===t?-1:"strokeWidth"===e?1:0}static getBlackListItem(t,e){const n={index:-1,isBlacklisted:!1};for(let i=0;i<t?.length;i++){const s=t[i];
1if(r.InfrontUtil.isPrimitive(s)){if(s===e){n.index=i,n.isBlacklisted=!0;break}}else if(r.InfrontUtil.isObject(s)&&Object.keys(s).includes(e)){n.index=i;break}}return n}static fixAnnotationsOptionsBeforeSaveByBlacklist(t,e,n){Object.entries(t).forEach(i=>{const s=this.getBlackListItem(e,i[0]);if(!s.isBlacklisted)switch(!0){case null==i[1]:case r.InfrontUtil.isPrimitive(i[1]):n[i[0]]=i[1];break;case r.InfrontUtil.isArray(i[1]):n[i[0]]=[],i[1].forEach((o,l)=>{r.InfrontUtil.isObject(o)?(n[i[0]].push({}),s.index>-1?this.fixAnnotationsOptionsBeforeSaveByBlacklist(t[i[0]][l],e[s.index][i[0]],n[i[0]][l]):n[i[0]][l]=r.InfrontUtil.deepCopy(i[1][l])):(r.InfrontUtil.isPrimitive(o)||r.InfrontUtil.isFunction(o))&&n[i[0]].push(o)});break;case r.InfrontUtil.isObject(i[1]):n[i[0]]={},s.index>-1?this.fixAnnotationsOptionsBeforeSaveByBlacklist(t[i[0]],e[s.index][i[0]],n[i[0]]):n[i[0]]=r.InfrontUtil.deepCopy(i[1])}})}static fixTunnelAnnotationsHeight(t){var e,n,i,s,o;Qo.includes(null===(e=t.options)||void 0===e?void 0:e.type)&&(null===(i=null===(n=t.options)||void 0===n?void 0:n.typeOptions)||void 0===i?void 0:i.height)!==(null===(o=null===(s=t.userOptions)||void 0===s?void 0:s.typeOptions)||void 0===o?void 0:o.height)&&(t.userOptions.typeOptions.height=t.options.typeOptions.height)}static setAnnotationListFromOptions(t){var e,n,i,s;if(null===(e=t?.getWidgetChartStorage())||void 0===e||!e.getAllowStorageUpdate())return;const o=t.getChart();if(null==o)return;const l=[];null===(i=null===(n=o?.options)||void 0===n?void 0:n.annotations)||void 0===i||i.forEach(u=>{let d={};Jo.includes(u?.type)?this.fixAnnotationsOptionsBeforeSaveByBlacklist(u,tl,d):d=u,d=r.InfrontUtil.deepCopy(d),this.deactivateControlPoints(d),l.push(d)}),null===(s=t.getChartAnnotations())||void 0===s||s.setAnnotationList(l)}static deactivateControlPoints(t){var e,n,i;if(null!=(null===(e=t?.controlPointOptions)||void 0===e?void 0:e.visible)&&(t.controlPointOptions.visible=!1),t?.typeOptions){const s=t.typeOptions;!(null===(n=s?.heightControlPoint)||void 0===n)&&n.visible&&(s.heightControlPoint.visible=!1),null===(i=s.points)||void 0===i||i.forEach(o=>{var l;null!==(l=o?.controlPoint)&&void 0!==l&&l.visible&&(o.controlPoint.visible=!1)})}}static wrapAnnotationPrototypes(t,e){var n,i;if(null==t?.Annotation||null===(n=e.getChartWrapper())||void 0===n||!n.isAnnotationFeatureAvailable())return;qo.add(t,e),t.wrap(t.Annotation.prototype,"init",function(o,l,u){var d;o.apply(this,Array.prototype.slice.call(arguments,1)),null!=u&&(null==u.events&&(u.events={}),u.visible=!(null===(d=e?.getChartAnnotations())||void 0===d||!d.annotationListVisible),this.options.events.add=function(g){Gi.setAnnotationListFromOptions(e)},this.options.events.afterUpdate=function(g){Gi.fixTunnelAnnotationsHeight(g.target),Gi.setAnnotationListFromOptions(e)},this.options.events.remove=function(g){Gi.setAnnotationListFromOptions(e)})}),t.wrap(t.Annotation.prototype,"onDrag",function(o,l){var u;const d=this.clipXAxis||ue.getAxisById(this.chart,ht.kXAxisId),g=d?.ordinal,I=g?.positions,C=I?.length-1;if(null==I?.length)return;const S=this.mouseMoveToTranslation(l);for(let N=0;N<(null===(u=null==this?void 0:this.points)||void 0===u?void 0:u.length);N++){const k=this.points[N].plotX+S.x,x=g?.getIndexOfPoint(k,I);if(x<0||x>C)return}o.apply(this,Array.prototype.slice.call(arguments,1))});const s=null===(i=xn.get(t,"Extensions/Annotations/Controllables/ControllableLabel.js"))||void 0===i?void 0:i.attrsMap;if(null!=s)s.rotation="rotation",s.rotationOriginX="rotationOriginX",s.rotationOriginY="rotationOriginY";else{let o=!1;t.wrap(t.Annotation.prototype,"initLabel",function(l){var u;const d=l.apply(this,Array.prototype.slice.call(arguments,1));return!o&&!(null===(u=d?.constructor)||void 0===u)&&u.attrsMap&&(d.constructor.attrsMap.rotation="rotation",d.constructor.attrsMap.rotationOriginX="rotationOriginX",d.constructor.attrsMap.rotationOriginY="rotationOriginY",o=!0),d})}Tn.wrapPopupPrototype(t,e),Xs.setDefaultColors(t,e),$s.add(t,e),or.add(t,e),Zs.add(t,e),Fa.add(t,e),Va.add(t,e),Qs.add(t,e),ai.add(t,e)}}class Js{static raise(t){var e,n,i;if(null===(e=t?.getChartWrapper())||void 0===e||!e.isAnnotationFeatureAvailable())return;const s=t.getChart();s&&(null===(n=s.controlPointsGroup)||void 0===n||n.attr({zIndex:9e3}
1),null===(i=s.annotations)||void 0===i||i.forEach(o=>{var l;null===(l=o?.graphic)||void 0===l||l.attr({zIndex:9e3})}))}}class Yi{static compose(t,e){var n,i,s,o;if(null==t)return;const l=xn.get(t,"Mixins/MultipleLines.js");if(l)t.extend(null===(i=null===(n=t.seriesTypes)||void 0===n?void 0:n[e])||void 0===i?void 0:i.prototype,{drawGraph:l.drawGraph,getTranslatedLinesNames:l.getTranslatedLinesNames,translate:l.translate,toYData:l.toYData});else{const u=null!==(s=xn.get(t,"Stock/Indicators/MultipleLinesComposition.js"))&&void 0!==s?s:t.MultipleLinesComposition;u?.compose(null===(o=t.seriesTypes)||void 0===o?void 0:o[e])}}}class el{static add(t,e){var n;if(null==t)return;const i=null===(n=e?.getChartWrapper())||void 0===n?void 0:n.getLibChartIndicator();null!=i&&(t.seriesType("bb","sma",{params:{period:20,smoothingMethod:"SMA",standardDeviation:2},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b><br/>\n                            Top: {point.upper}<br/>\n                            Middle: {point.y}<br/>\n                            Bottom: {point.lower}<br/>'},dataGrouping:{approximation:"averages"},upper:{styles:{lineWidth:1}},lower:{styles:{lineWidth:1}}},{getValues:function(s,o){return this.calculateBB(s.options.data,o.index,o.period,o.standardDeviation,o.smoothingMethod||"SMA")},calculateBB:(s,o,l,u,d)=>{const g=s.map(C=>({date:C[0],close:C[o+1]})),I=new i(g).getBB(l,u,d).filter(C=>null!=C.middle&&null!=C.upper&&null!=C.lower);return{values:I.map(C=>[C.date,C.middle,C.upper,C.lower]),xData:I.map(C=>C.date),yData:I.map(C=>[C.middle,C.upper,C.lower])}},nameBase:"BB",nameComponents:["period","standardDeviation","smoothingMethod"],pointArrayMap:["y","upper","lower"],pointValKey:"y",linesApiNames:["upper","lower"]}),Yi.compose(t,"bb"))}}class nl{static add(t,e){null!=t&&(t.getOptions().plotOptions.ema.params.period=50)}}class il{static add(t,e){var n,i,s,o;if(null==t)return;const l=t.getOptions(),u=Bt.getHexAlphaColor(In,"33"),d=Bt.getHexAlphaColor(cn,"33");t.merge(!0,l,{plotOptions:{vbp:{params:{ranges:20,color:u,negativeColor:d},zoneLines:{enabled:!1},volumeDivision:{enabled:!0},dataLabels:{enabled:!1},pointPadding:0,crisp:!0,dataGrouping:{enabled:!1}}}}),null===(o=null===(s=null===(i=null===(n=t.defaultOptions)||void 0===n?void 0:n.plotOptions)||void 0===i?void 0:i.vbp)||void 0===s?void 0:s.params)||void 0===o||delete o.period}}class rl{static add(t,e){var n,i,s,o;null!=t&&(t.seriesType("vwapPerDay","sma",{params:{index:void 0,volumeSeriesID:"volume"}},{getValues:function(l,u){const d=l.chart,g=Kn.getXData(l),I=Kn.getYData(l);let C,S=!0;if(C=d.get(u.volumeSeriesID))return t.isArray(I[0])||(S=!1),this.calculateVWAPValues(S,g,I,C);t.error("Series "+u.volumeSeriesID+" not found! Check `volumeSeriesID`.",!0,d)},calculateVWAPValues:function(l,u,d,g){const I=Kn.getYData(g),C=Kn.getXData(g).length,S=u.length,N=[],k=[],x=[],Y=[],et=[],rt=S<=C?S:C;let it;for(let gt=0,mt=0;gt<rt;gt++){it=it??u[gt];let Ct=l?(d[gt][1]+d[gt][2]+d[gt][3])/3:d[gt];Ct*=I[gt];const Tt=mt?N[gt-1]+Ct:Ct,Wt=mt?k[gt-1]+I[gt]:I[gt];N.push(Tt),k.push(Wt),et.push([u[gt],Tt/Wt]),x.push(et[gt][0]),Y.push(et[gt][1]),mt++,u[gt]-it>432e5&&(mt=0,it=u[gt])}return{values:et,xData:x,yData:Y}}}),null===(o=null===(s=null===(i=null===(n=t.defaultOptions)||void 0===n?void 0:n.plotOptions)||void 0===i?void 0:i.vwapPerDay)||void 0===s?void 0:s.params)||void 0===o||delete o.period)}}class al{static add(t,e){if(null==t)return;const n=t.getOptions();n.plotOptions.macd.params.colorSignalLine=null,n.plotOptions.macd.params.colorLowerzone=void 0,n.plotOptions.macd.params.colorHigherzone=void 0,t.wrap(t.seriesTypes.macd.prototype,"init",function(i,s,o){return o.macdLine={styles:{lineColor:o.color}},s.options.plotOptions.macd.zones&&(o.zones=JSON.parse(JSON.stringify(s.options.plotOptions.macd.zones)),o.params.colorLowerzone&&(o.zones[0].color=o.params.colorLowerzone),o.params.colorHigherzone&&(o.zones[1].color=o.params.colorHigherzone)),i.apply(this,Array.prototype.slice.call(arguments,1))})}}class sl{static add(t,e){var n;if(null==t)return;const i=null===(n=e?.getChartWrapper())||void 0===n?void 0:n.getLibChartIndicator();null!=i&&(t.seriesType("momentum","sma",{params:{period:14,signal:14,smoothingMethod:"SMA",colorSignal:void 0},signal:{styles:{lineWidth:1}},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b><br/>\n                            Momentum: {point.y}<br/>\n                            Signal: {point.signal}<br/>'},dataGrouping:{approximation:"averages"}},{getValues:function(s,o){return this.calculateMomentum(s.options.data,o.index,o.period,o.signal,o.smoothingMethod||"SMA")},calculateMomentum:(s,o,l,u,d)=>{const g=s.map(C=>({date:C[0],close:C[o+1]})),I=new i(g).getMomentum(l,u,d);return{values:I.map(C=>[C.date,C.momentum,C.signalLine]),xData:I.map(C=>C.date),yData:I.map(C=>[C.momentum,C.signalLine])}},nameBase:"Momentum",nameComponents:["period","signal"],pointArrayMap:["y","signal"],pointV
1alKey:"y",linesApiNames:["signal"]}),Yi.compose(t,"momentum"))}}class ol{static add(t,e){var n;if(null==t)return;const i=null===(n=e?.getChartWrapper())||void 0===n?void 0:n.getLibChartIndicator();null!=i&&(t.seriesType("rsi","sma",{params:{period:14,togglePercentRsi:!0,overbought:70,oversold:30,colorOverbought:void 0,colorOversold:void 0},overbought:{styles:{lineWidth:1}},oversold:{styles:{lineWidth:1}},dataGrouping:{approximation:"averages"}},{getValues:function(s,o){return this.calculateRSI(s.options.data,o.index,o.period,o.overbought,o.oversold,o.togglePercentRsi)},calculateRSI:(s,o,l,u,d,g)=>{const I=s.map(S=>({date:S[0],close:S[o+1]})),C=new i(I).getRSI(l,u,d);return{values:C.map(S=>[S.date,g?S.rsi:S.rsi/100,S.upperBand,S.lowerBand]),xData:C.map(S=>S.date),yData:C.map(S=>[g?S.rsi:S.rsi/100,S.upperBand,S.lowerBand])}},nameBase:"RSI",nameComponents:["period","togglePercentRsi","overbought","oversold"],pointArrayMap:["y","overbought","oversold"],pointValKey:"y",linesApiNames:["overbought","oversold"]}),Yi.compose(t,"rsi"))}}class ll{static add(t,e){var n,i,s,o,l;if(null==t)return;const u=null===(n=e?.getChartWrapper())||void 0===n?void 0:n.getLibChartIndicator();null!=u&&(t.seriesType("rvi","sma",{params:{stddevPeriod:10,smoothingPeriod:14},dataGrouping:{approximation:"averages"}},{getValues:function(d,g){return this.getRvi(d.options.data,g.stddevPeriod,g.smoothingPeriod,g.index)},getRvi:(d,g,I,C)=>{const S=d.map(k=>({date:k[0],close:k[C+1]})),N=new u(S).getRVI(g,I);return{values:N.map(k=>[k.date,k.rvi]),xData:N.map(k=>k.date),yData:N.map(k=>k.rvi)}},nameBase:"RVI",nameComponents:["stddevPeriod","smoothingPeriod"],pointArrayMap:["y"],pointValKey:"y",linesApiNames:[]}),Yi.compose(t,"rvi"),null===(l=null===(o=null===(s=null===(i=t.defaultOptions)||void 0===i?void 0:i.plotOptions)||void 0===s?void 0:s.rvi)||void 0===o?void 0:o.params)||void 0===l||delete l.period)}}class ul{static add(t,e){var n,i,s,o,l;if(null==t)return;const u=null===(n=e?.getChartWrapper())||void 0===n?void 0:n.getLibChartIndicator();null!=u&&(t.seriesType("stddev","sma",{params:{periodObservation:90,periodExtrapolation:250},dataGrouping:{approximation:"averages"}},{getValues:function(d,g){return this.getVola(d.options.data,g.periodObservation,g.periodExtrapolation,g.index)},getVola:(d,g,I,C)=>{const S=d.map(k=>({date:k[0],close:k[C+1]})),N=new u(S).getVolatility(g,I);return{values:N.map(k=>[k.date,k.vola]),xData:N.map(k=>k.date),yData:N.map(k=>k.vola)}},nameBase:"Vola",nameComponents:["periodObservation","periodExtrapolation"],pointArrayMap:["y"],pointValKey:"y",linesApiNames:[]}),Yi.compose(t,"stddev"),null===(l=null===(o=null===(s=null===(i=t.defaultOptions)||void 0===i?void 0:i.plotOptions)||void 0===s?void 0:s.stddev)||void 0===o?void 0:o.params)||void 0===l||delete l.period)}}class cl{static add(t,e){var n,i,s,o;null!=t&&(null===(o=null===(s=null===(i=null===(n=t.defaultOptions)||void 0===n?void 0:n.plotOptions)||void 0===i?void 0:i.stochastic)||void 0===s?void 0:s.params)||void 0===o||delete o.period)}}class dl{static add(t,e){var n,i,s,o,l;if(null==t)return;const u=null===(n=e?.getChartWrapper())||void 0===n?void 0:n.getLibChartIndicator();null!=u&&(t.seriesType("stochasticfast","sma",{params:{stochPeriod:14,dPeriod:3,smoothingMethodD:"SMA",overbought:20,oversold:80,colorSignalLine:void 0,colorOverbought:void 0,colorOversold:void 0},dataGrouping:{approximation:"averages"},signalLine:{styles:{lineWidth:1}},overbought:{styles:{lineWidth:1}},oversold:{styles:{lineWidth:1}},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b><br/>\n                            %K: {point.y}<br/>\n                            %D: {point.signalLine}<br/>'}},{getValues:function(d,g){return this.calculateFastStochastic(d.options.data,g.stochPeriod,g.dPeriod,g.overbought,g.oversold,g.smoothingMethodD)},calculateFastStochastic:(d,g,I,C,S,N)=>{const k=d.map(Y=>({date:Y[0],open:Y[1],high:Y[2],low:Y[3],close:Y[4],volume:null})),x=new u(k).getFastStochastic(g,I,C,S,N);return{values:x.map(Y=>[Y.date,Y.data1,Y.overBought,Y.overSold,Y.data2]),xData:x.map(Y=>Y.date),yData:x.map(Y=>[Y.data1,Y.overBought,Y.overSold,Y.data2])}},nameBase:"Stochastic Fast",nameComponents:["stochPeriod","dPeriod","smoothingMethodD","overbought","oversold"],pointArrayMap:["y","overbought","oversold","signalLine"],pointV
1alKey:"y",linesApiNames:["overbought","oversold","signalLine"]}),Yi.compose(t,"stochasticfast"),null===(l=null===(o=null===(s=null===(i=t.defaultOptions)||void 0===i?void 0:i.plotOptions)||void 0===s?void 0:s.stochasticfast)||void 0===o?void 0:o.params)||void 0===l||delete l.period)}}class hl{static add(t,e){var n,i,s,o,l;if(null==t)return;const u=null===(n=e?.getChartWrapper())||void 0===n?void 0:n.getLibChartIndicator();null!=u&&(t.seriesType("stochasticslow","sma",{params:{stochPeriod:14,dPeriod:3,smoothingMethodD:"SMA",slowdPeriod:3,smoothingMethodslowD:"SMA",overbought:20,oversold:80,colorSignalLine:void 0,colorOverbought:void 0,colorOversold:void 0},dataGrouping:{approximation:"averages"},signalLine:{styles:{lineWidth:1}},overbought:{styles:{lineWidth:1}},oversold:{styles:{lineWidth:1}},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b><br/>\n                            slow %K: {point.y}<br/>\n                            slow %D: {point.signalLine}<br/>'}},{getValues:function(d,g){return this.calculateSlowStochastic(d.options.data,g.stochPeriod,g.dPeriod,g.slowdPeriod,g.overbought,g.oversold,g.smoothingMethodD,g.smoothingMethodslowD)},calculateSlowStochastic:(d,g,I,C,S,N,k,x)=>{const Y=d[0]&&5===d[0].length?4:1,et=d.map(it=>({date:it[0],open:it[1],high:4===Y?it[2]:it[1],low:4===Y?it[3]:it[1],close:4===Y?it[4]:it[1],volume:null})),rt=new u(et).getSlowStochastic(g,I,C,S,N,k,x);return{values:rt.map(it=>[it.date,it.data1,it.overBought,it.overSold,it.data2]),xData:rt.map(it=>it.date),yData:rt.map(it=>[it.data1,it.overBought,it.overSold,it.data2])}},nameBase:"Stochastic Slow",nameComponents:["stochPeriod","dPeriod","smoothingMethodD","slowdPeriod","smoothingMethodslowD","overbought","oversold"],pointArrayMap:["y","overbought","oversold","signalLine"],pointValKey:"y",linesApiNames:["overbought","oversold","signalLine"]}),Yi.compose(t,"stochasticslow"),null===(l=null===(o=null===(s=null===(i=t.defaultOptions)||void 0===i?void 0:i.plotOptions)||void 0===s?void 0:s.stochasticslow)||void 0===o?void 0:o.params)||void 0===l||delete l.period)}}const to=["sma","ema","wma"],Ba=["sma"],gl=["vbp"],eo=["vbp"],vl=[12,13,2095],ml=["spread","modified-benchmark","rsc","vbp","ultimateoscillator","zigzag","ad","chaikin","cmf","mfi","vpt","average-directional-index","commodity-channel-index","double-smoothed-stochastic","elderraybear","elderraybull","williamsr"],Ia=[Dt.VOLUME_BY_PRICE,Dt.SMA,Dt.EMA,Dt.WMA,Dt.BOLLINGER_BANDS,Dt.VWAP],Ea=[Dt.MACD,Dt.MOMENTUM,Dt.RSI,Dt.RVI,Dt.STDDEV,Dt.STOCHASTIC,Dt.STOCHASTIC_SLOW,Dt.STOCHASTIC_FAST,Dt.ATR],no=[Dt.TOGGLE_VOLUME,Dt.TOGGLE_VOLUME_UNDERLAY,Dt.TOGGLE_VOLUME_BY_PRICE,Dt.TOGGLE_INDICATORS,Dt.DELETE_ALL_INDICATORS,Dt.DELETE_ALL_OSCILLATORS];class pl{static add(t,e){var n,i,s,o,l;if(null==t)return;const u=t.getOptions();u.plotOptions.sma.params.period=38,u.plotOptions.sma.params.index=void 0;for(const d in t.seriesTypes)if(t.seriesTypes.hasOwnProperty(d)&&("sma"===d||(null===(n=t.seriesTypes[d])||void 0===n?void 0:n.prototype)instanceof t.seriesTypes.sma)){let g={};["vbp","heikinashi"].includes(d)||(g={color:void 0}),t.merge(!0,u,{plotOptions:{[d]:{params:Object.assign(Object.assign({},g),{index:void 0})}}}),"macd"===d||(null===(i=t.seriesTypes[d])||void 0===i?void 0:i.prototype)instanceof t.seriesTypes.macd||(t.seriesTypes[d].prototype.destroy=function(){this.dataEventsToUnbind.forEach(function(I){I()}),t.Series.prototype.destroy.apply(this,arguments)}),t.wrap(null===(s=t.seriesTypes[d])||void 0===s?void 0:s.prototype,"init",function(I,C,S){var N;const k=this;null!==(N=S?.params)&&void 0!==N&&N.color&&(S.color=S.params.color);for(const rt in S?.params)if(S.params.hasOwnProperty(rt)){const it=rt.match(/^color(.+)$/);if(it){const gt=(x=it[1]).substr(0,1).toLowerCase()+x.substring(1);t.merge(!0,S,{[gt]:{styles:{lineColor:S.params[rt]||Ir}}})}}var x;const Y=I.apply(k,Array.prototype.slice.call(arguments,1));if(!k.linkedParent){const rt=t.addEvent(C,"afterAddSeries",it=>{var gt,mt,Ct;null!=(null===(gt=k.options)||void 0===gt?void 0:gt.linkedTo)&&(null===(Ct=null===(mt=it.series)||void 0===mt?void 0:mt.options)||void 0===Ct?void 0:Ct.id)===k.options.linkedTo&&(k.update({},!1),rt())})}const et=t.addEvent(C,"afterLinkSeries",()=>{var rt;null!=k.linkedParent&&(eo.includes(null===(rt=k.options)||void 0===rt?void 0:rt.type)||k.dataEventsToUnbind.push(t.addEvent(k.linkedParent,"dataOrDataGroupingChanged",function(){k.recalculateValues(),k.processData()})),et())});return Y}),t.wrap(null===(o=t.seriesTypes[d])||void 0===o?void 0:o.prototype,"getValues",function(I,C,S){var N;const x=Kn.getYData(C);return t.isArray(x)&&t.isArray(x[0])?(S.index=to.includes(d)&&t.isNumber(S.index)&&S.index<x[0].length?S.index:x[0].length-1,[Dt.STOCHASTIC].includes(null===(N=this.options)||void 0===N?void 0:N.type)&&(S.index=0)):S.index=0,I.apply(this,Array.prototype.slice.call(arguments,1
1))}),eo.includes(d)||t.wrap(null===(l=t.seriesTypes[d])||void 0===l?void 0:l.prototype,"getValues",function(I,C,S){var N,k,x,Y,et,rt;try{let it=(null===(N=C.options)||void 0===N?void 0:N.data)||[],gt=Kn.getXData(C),mt=Kn.getYData(C);const Ct=null===(Y=null===(x=null===(k=C.chart)||void 0===k?void 0:k.options)||void 0===x?void 0:x.infront)||void 0===Y?void 0:Y.chartInstrumentList,Tt=Ct?.getGlobalChartSettings();return Tt?.indicatorsBasedOnResolution&&(it=C.groupAllData?C.groupAllData.groupedYData.map((Wt,Kt)=>{const te=t.splat(Wt);return[C.groupAllData.groupedXData[Kt],...te]}):(null===(et=C.options)||void 0===et?void 0:et.data)||[],gt=C.groupAllData?C.groupAllData.groupedXData:gt,mt=C.groupAllData?C.groupAllData.groupedYData:mt),!(null===(rt=C.options)||void 0===rt)&&rt.virtualPoints&&C.options.virtualPoints.forEach(Wt=>{const Kt=gt.indexOf(Wt.date);Kt>=0&&(it=it.filter((te,le)=>le!==Kt),gt=gt.filter((te,le)=>le!==Kt),mt=mt.filter((te,le)=>le!==Kt))}),I.call(this,Object.assign(Object.assign({},C),{options:Object.assign(Object.assign({},C.options||{}),{data:it}),xData:gt,yData:mt}),S)}catch(it){return console.error(`Indicator ${d.toUpperCase()} calculation:`,it),{values:[],xData:[],yData:[]}}})}}}class io{constructor(t){this.indicatorList=[],this.indicatorListVisible=!0,this.indicatorIndex=-1,this.chartInstrumentList=t}init(t){var e;const n=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getGlobalChartSettings();n&&(this.indicatorList=[],t?.forEach((i,s)=>{var o,l,u;if(!this.isIndicator(i?.type)&&!this.isOscillator(i?.type))return void r.InfrontUtil.errorLog("HighchartIndicators (init): invalid indicator type:"+i);null==i.linkedTo||isNaN(+i.linkedTo)?"volume"===i.linkedTo&&n.showVolume&&Ba.includes(i.type)?i.linkedTo=this.getLinkedToVolumeId():"volumeUnderlay"===i.linkedTo&&n.showVolumeUnderlay&&Ba.includes(i.type)&&(i.linkedTo=this.getLinkedToVolumeId("volumeUnderlay")):i.linkedTo=null===(l=null===(o=this.chartInstrumentList)||void 0===o?void 0:o.getChartInstrumentByIndex(+i.linkedTo))||void 0===l?void 0:l.getId(),i.params=i.params||{},i.params.color=(null===(u=i.params)||void 0===u?void 0:u.color)||this.getIndicatorColor(this.getNextIndicatorIndex());const d=Object.assign(Object.assign({},this.getNewIndicatorDefaultSettings(i.type,i.id||null,i.linkedTo)),{params:Object.assign(Object.assign({},this.getIndicatorParamsByType(i.type)),i.params)});d.linkedTo&&d.id&&this.addIndicator(d)}))}getNextIndicatorIndex(){return this.indicatorIndex++,this.indicatorIndex}getIndicatorColor(t){const e=this.chartInstrumentList.getGlobalChartSettings(),n=e?.indicatorColorList||[],i=n[t%(n.length||1)];return Bt.isHexAlpha(i)?i:Bt.convertColorToHexAlpha(i)}getLinkedToVolumeId(t="volume"){var e,n,i;const s=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getGlobalChartSettings(),o=null===(i=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getMainInstrument())||void 0===i?void 0:i.getId();return s&&o?Qt[s.volumeType+("volumeUnderlay"===t?"_UNDERLAY":"")]+o:null}createAvailableIndicators(t,e){if(!t)return;const n=this.chartInstrumentList.getLanguageHandler();t.clear(),Di.createItems(e?.selectableIndicators,t,Dt,n,ht.kLanguageKeyIndicator,i=>{switch(i.value){case Dt.TOGGLE_VOLUME:i.state=new r.InfrontUtil.Observable,i.iconAfter={observable:new r.InfrontUtil.Observable},i.actions={openAction:{getActionValue:s=>(i.state.set(s),Ae.getSvgIcon(s?`${e.generalDropDownOptions.booleanRepresentation}On`:`${e.generalDropDownOptions.booleanRepresentation}Off`)),updateAction:()=>{var s;i.iconAfter.observable.set(i.actions.openAction.getActionValue(null===(s=this.chartInstrumentList)||void 0===s?void 0:s.getGlobalChartSettings().showVolume))}}},i.actions.openAction.updateAction();break;case Dt.TOGGLE_VOLUME_BY_PRICE:i.state=new r.InfrontUtil.Observable,i.iconAfter={observable:new r.InfrontUtil.Observable},i.actions={openAction:{getActionValue:s=>(i.state.set(s),Ae.getSvgIcon(s?`${e.generalDropDownOptions.booleanRepresentation}On`:`${e.generalDropDownOptions.booleanRepresentation}Off`)),updateAction:()=>{i.iconAfter.observable.set(i.actions.openAction.getActionValue(this.indicatorExistsByType(
1Dt.VOLUME_BY_PRICE)))}}},i.actions.openAction.updateAction();break;case Dt.TOGGLE_VOLUME_UNDERLAY:i.state=new r.InfrontUtil.Observable,i.iconAfter={observable:new r.InfrontUtil.Observable},i.actions={openAction:{getActionValue:s=>(i.state.set(s),Ae.getSvgIcon(s?`${e.generalDropDownOptions.booleanRepresentation}On`:`${e.generalDropDownOptions.booleanRepresentation}Off`)),updateAction:()=>{var s;i.iconAfter.observable.set(i.actions.openAction.getActionValue(null===(s=this.chartInstrumentList)||void 0===s?void 0:s.getGlobalChartSettings().showVolumeUnderlay))}}},i.actions.openAction.updateAction();break;case Dt.TOGGLE_INDICATORS:i.state=new r.InfrontUtil.Observable,i.iconAfter={observable:new r.InfrontUtil.Observable},i.actions={openAction:{getActionValue:s=>(i.state.set(s),Ae.getSvgIcon(s?`${e.generalDropDownOptions.booleanRepresentation}On`:`${e.generalDropDownOptions.booleanRepresentation}Off`)),updateAction:()=>{i.iconAfter.observable.set(i.actions.openAction.getActionValue(this.indicatorListVisible))}}},i.actions.openAction.updateAction()}})}isIndicator(t){return Ia.includes(t?.type?t?.type:t)}isOscillator(t){return Ea.includes(t?.type?t?.type:t)}isSpecial(t){return no.includes(t?.type?t?.type:t)}getIndicatorParamsByType(t){var e,n,i,s;const o=(null===(n=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getChartWrapper())||void 0===n?void 0:n.getHighcharts()).getOptions(),l=null===(s=null===(i=o?.plotOptions)||void 0===i?void 0:i[t])||void 0===s?void 0:s.params;return this.injectParamLinkedTo(l),l||{}}getIndicatorParamsById(t){var e,n,i,s;const o=null===(n=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getChart())||void 0===n?void 0:n.get(t),l=null===(i=o?.options)||void 0===i?void 0:i.params;return this.injectParamLinkedTo(l,null===(s=o?.options)||void 0===s?void 0:s.linkedTo),l||{}}injectParamLinkedTo(t,e=null){t.linkedTo=t.linkedTo||e}getIndicatorListVisible(){return this.indicatorListVisible}setIndicatorListVisible(t){this.indicatorListVisible=t}getAllIndicatorList(){return this.indicatorList||[]}getIndicatorList(){var t;return(null===(t=this.indicatorList)||void 0===t?void 0:t.filter(e=>this.isIndicator(e)))||[]}getOscillatorList(){var t;return(null===(t=this.indicatorList)||void 0===t?void 0:t.filter(e=>this.isOscillator(e)))||[]}getIndicatorById(t){return this.indicatorList.find(e=>e.id===t)||null}getIndicatorListByType(t){return this.indicatorList.filter(e=>e.type===t)||null}indicatorExistsByType(t){var e;return!(null===(e=this.getIndicatorListByType(t))||void 0===e||!e.length)}getLinkedIndicators(t){return this.indicatorList.filter(e=>e.linkedTo===t)||null}addIndicator(t){this.indicatorList.push(t),this.setMaxIndicatorsPeriod()}editIndicator(t){var e;if(null==t?.id||null===(e=this.indicatorList)||void 0===e||!e.length)return;const n=this.indicatorList.findIndex(i=>i.id===t.id);n>-1&&n<this.indicatorList.length&&(this.indicatorList[n]=r.InfrontUtil.deepCopy(t),this.setMaxIndicatorsPeriod())}preRemoveIndicator(t){re.removeLinkedSeries(this.chartInstrumentList,t),t?.startsWith(Qt.OSCILLATOR)&&ue.resetPanes(this.chartInstrumentList)}removeIndicatorById(t){this.preRemoveIndicator(t);const e=this.indicatorList.findIndex(n=>n.id===t);e>-1&&(this.indicatorList.splice(e,1),this.setMaxIndicatorsPeriod())}removeIndicatorByLinkedToId(t){this.preRemoveIndicator(t),this.indicatorList=this.indicatorList.filter(e=>e.linkedTo!==t),this.setMaxIndicatorsPeriod()}removeIndicatorsByType(t){var e;null===(e=this.getIndicatorListByType(t))||void 0===e||e.forEach(n=>{const i=n.id;i&&this.removeIndicatorById(i)})}toggleIndicatorList(){this.indicatorListVisible=!this.indicatorListVisible,this.indicatorList.forEach(t=>{this.isIndicator(t)&&(t.visible=this.indicatorListVisible)})}clearIndicatorList(t){const e="Indicator"===t?this.isIndicator:this.isOscillator;let n=!1;for(let i=this.indicatorList.length-1;i>-1;i--)e(this.indicatorList[i])&&(this.indicatorList.splice(i,1),n||(n=!0));n&&this.setMaxIndicatorsPeriod()}getAllIndicatorsMaxPeriod(){var t;return null!==(t=this.indicatorList)&&void 0!==t&&t.length?Math.max.apply(Math,this.indicatorList.map(e=>{var n,i,s,o,l,u,d,g,I,C;return Math.max((null===(n=e.params)||void 0===n?void 0:n.period)||0,(null===(i=e.params)||void 0===i?void 0:i.period1)||0,(null===(s=e.params)||void 0===s?void 0:s.period2)||0,(null===(o=e.params)||void 0===o?void 0:o.period3)||0,(null===(l=e.params)||void 0===l?void 0:l.stddevPeriod)||0,(null===(u=e.params)||void 0===u?void 0:u.smoothingPerio
1d)||0,(null===(d=e.params)||void 0===d?void 0:d.stochPeriod)||0,(null===(g=e.params)||void 0===g?void 0:g.dPeriod)||0,(null===(I=e.params)||void 0===I?void 0:I.slowdPeriod)||0,(null===(C=e.params)||void 0===C?void 0:C.periodObservation)||0)})):0}setMaxIndicatorsPeriod(t){var e,n;void 0===t&&(t=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getGlobalChartSettings());const i=this.getAllIndicatorsMaxPeriod();(null!==(n=t.maxIndicatorsPeriod)&&void 0!==n?n:0)<i&&(t.needDataReload=!0),t.maxIndicatorsPeriod=i;const s=fe.getLastPeriodSettings(t);fe.setDataStartEndDate(t,s)}isVolumeBasedIndicatorLinkedTo(t){return!!this.indicatorList.filter(e=>e.linkedTo===t?.getId()).find(e=>this.isVolumeBasedIndicator(e))}isVolumeBasedIndicator(t){var e;return!(null===(e=t?.params)||void 0===e||!e.hasOwnProperty("volumeSeriesID"))}getSeriesOptions(){return r.InfrontUtil.deepCopy(this.indicatorList.map(t=>this.getSeriesOptionsForIndicator(t)))}getSeriesOptionsForChartInstrument(t,e){return this.getSeriesOptionsForSeriesId(t?.getId(),e)}getSeriesOptionsForSeriesId(t,e){var n;if(!t||null===(n=this.indicatorList)||void 0===n||!n.length)return null;const i=this.indicatorList.filter(s=>s.linkedTo===t&&(!this.isVolumeBasedIndicator(s)||null!=e));return i?.length?i.map(s=>this.getSeriesOptionsForIndicator(s,e)):null}getIndicatorYAxis(t,e){return re.isVolumeUnderlaySeries(t.linkedTo)?ht.kOscillatorYAxisId+t.linkedTo:this.isIndicator(t)?e?ht.kVolumeYAxisId:ht.kMainYAxisId:ht.kOscillatorYAxisId+t.id}getCompareToMain(t){const e=ue.getOrdinateScaling(this.chartInstrumentList);return"vbp"!==t.type||!ue.isOrdinateScalingRelative(e)}getIndicatorVisible(t){var e;let n=!!t.visible;if(gl.includes(t.type)){const i=ue.getOrdinateScaling(this.chartInstrumentList);ue.isOrdinateScalingRelative(i)&&(n=!1)}if(t.type===Dt.VWAP){const i=this.chartInstrumentList.getGlobalChartSettings(),s=this.chartInstrumentList.getChartInstrumentById(t.linkedTo),o=null===(e=s?.getInstrument())||void 0===e?void 0:e.feed;i.isIntraday&&!vl.includes(o)||(n=!1)}return n}getSeriesOptionsForIndicator(t,e){if(!t)return{};t.params=t.params||{};const n=this.chartInstrumentList.getGlobalChartSettings(),i=re.isAnyVolumeSeries(t.linkedTo),s=this.getIndicatorYAxis(t,i),o=Object.assign(Object.assign({},re.getSeriesCompareOptions(this.chartInstrumentList)),{compareToMain:this.getCompareToMain(t)}),l=i||this.isOscillator(t)?{}:o;this.isVolumeBasedIndicator(t)&&(t.params.volumeSeriesID=e);const u=Ce.getOscillatorTooltipOptions(t,this.chartInstrumentList);this.adjustIndicatorParams(t);const d=r.InfrontUtil.deepCopy(t.params);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({id:t.id,type:t.type,linkedTo:t.linkedTo,yAxis:s,params:d,visible:this.getIndicatorVisible(t),color:d.color||null},this.getIndicatorSpecialOptions(t)),l),{name:this.getIndicatorName(t),showInLegend:!0,showInNavigator:!1,enableMouseTracking:this.isOscillator(t)&&!!n?.cursorEventsEnabled,animation:!1,pointPlacement:"on"}),u),{marker:{enabled:!1,symbol:"triangle",states:{hover:{enabled:!1}}},infront:{chartInstrumentList:this.chartInstrumentList}})}adjustIndicatorParams(t){var e,n;null!==(e=t.params.periods)&&void 0!==e&&e.includes(",")&&(t.params.periods=null===(n=t.params.periods.split(","))||void 0===n?void 0:n.map(i=>+i))}getIndicatorSpecialOptions(t){var e,n;const i={};if(t?.type===Dt.VOLUME_BY_PRICE){const s=Bt.getColorOrUndefined(null===(e=t?.params)||void 0===e?void 0:e.color),o=Bt.getColorOrUndefined(null===(n=t?.params)||void 0===n?void 0:n.negativeColor);i.volumeDivision={enabled:s!==o,styles:{positiveColor:s,negativeColor:o}}}return i}getIndicatorName(t){var e,n,i,s,o;const l=null===(n=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getChartWrapper())||void 0===n?void 0:n.getHighcharts();if(!t?.type||!l)return;const u=this.chartInstrumentList.getLanguageHandler();let d=u.get(ht.kLanguageKeyIndicator,"shortName_"+t.type),g=[];const I=l.seriesTypes[t.type].prototype.nameComponents,C=l.getOptions();if(t.linkedTo){const S=this.chartInstrumentList.getChartInstrumentById(t.linkedTo);if(this.isOscillator(t)?S&&g.push(S.getInstrumentName()):this.isIndicator(t)&&(!(null===(i=t.linkedTo)||void 0===i)&&i.startsWith(Qt.VOLUME)||!(null===(s=t.linkedTo)||void 0===s)&&s.startsWith(Qt.TURNOVER))&&g.push(re.getVolumeName(S,null,!1)),this.shouldAddOhlcHint(t.type,S)){const k=null===(o=t.params)||void 0===o?void 0:o.index;
1null!=k&&k>-1&&k<3&&g.push(["O","H","L","C"][k])}else{const N=S?.getInstrumentSettings(),k=N?.dataType;[Gt.BID,Gt.ASK,Gt.MID].includes(k)&&g.push(u.get(ht.kLanguageKeySetting,"dataType_"+k))}}return I&&I.forEach(S=>{let N=l.pick(t.params[S],C.plotOptions[t.type].params[S]);"togglePercentRsi"===S&&(N=!0===N?"%":""),g.push(N)}),g=g.filter(S=>S),g.length&&(d+=` (${g.join(", ")})`),d}shouldAddOhlcHint(t,e){const n=e?.getInstrumentSettings();return to.includes(t)&&e?.isOhlcInstrument()&&(null==n?.dataType||[Gt.OPEN,Gt.HIGH,Gt.LOW,Gt.CLOSE,Gt.AUTO].includes(n?.dataType))}getIndicatorPlotOptions(){return{macd:{zones:[{value:0,color:"rgba(255, 0, 0, 0.6)"},{color:"rgba(0, 255, 0, 0.6)"}]}}}getNewIndicatorDefaultSettings(t,e=null,n=null){var i,s;return n=n||(null===(s=null===(i=this.chartInstrumentList)||void 0===i?void 0:i.getMainInstrument())||void 0===s?void 0:s.getId()),null==t||null==n?null:{id:this.getIndicatorId(t,e),type:t,linkedTo:n,visible:this.indicatorListVisible}}getIndicatorId(t,e=null){return e||(this.isOscillator(t)?Qt.OSCILLATOR:Qt.INDICATOR)+r.InfrontUtil.makeUUID()}static wrapIndicatorPrototypes(t,e){null!=t&&(el.add(t,e),nl.add(t,e),il.add(t,e),rl.add(t,e),al.add(t,e),sl.add(t,e),ol.add(t,e),ll.add(t,e),ul.add(t,e),cl.add(t,e),dl.add(t,e),hl.add(t,e),pl.add(t,e))}}class Il{static setHighchartsLanguage(t){var e;const n=null===(e=t?.getChartWrapper())||void 0===e?void 0:e.getHighcharts(),i=t?.getLanguageHandler();n&&i&&n.setOptions({global:{useUTC:!1},time:{useUTC:!1},lang:{weekdays:[i.get("time","sunday"),i.get("time","monday"),i.get("time","tuesday"),i.get("time","wednesday"),i.get("time","thursday"),i.get("time","friday"),i.get("time","saturday")],shortWeekdays:[i.get("timeShort","sunday"),i.get("timeShort","monday"),i.get("timeShort","tuesday"),i.get("timeShort","wednesday"),i.get("timeShort","thursday"),i.get("timeShort","friday"),i.get("timeShort","saturday")],months:[i.get("time","january"),i.get("time","february"),i.get("time","march"),i.get("time","april"),i.get("time","may"),i.get("time","june"),i.get("time","july"),i.get("time","august"),i.get("time","september"),i.get("time","october"),i.get("time","november"),i.get("time","december")],shortMonths:[i.get("timeShort","january"),i.get("timeShort","february"),i.get("timeShort","march"),i.get("timeShort","april"),i.get("timeShort","may"),i.get("timeShort","june"),i.get("timeShort","july"),i.get("timeShort","august"),i.get("timeShort","september"),i.get("timeShort","october"),i.get("timeShort","november"),i.get("timeShort","december")],navigation:{popup:{segment:i.get(ht.kLanguageKeyAnnotation,"segment"),"infinity-line":i.get(ht.kLanguageKeyAnnotation,"infinity-line"),"vertical-line":i.get(ht.kLanguageKeyAnnotation,"vertical-line"),"horizontal-line":i.get(ht.kLanguageKeyAnnotation,"horizontal-line"),"parallel-channel":i.get(ht.kLanguageKeyAnnotation,"parallel-channel"),parallelChannelHorizontal:i.get(ht.kLanguageKeyAnnotation,"parallelChannelHorizontal"),"measure-xy":i.get(ht.kLanguageKeyAnnotation,"measure-xy"),"measure-x":i.get(ht.kLanguageKeyAnnotation,"measure-x"),"measure-y":i.get(ht.kLanguageKeyAnnotation,"measure-y"),"show-annotations":i.get(ht.kLanguageKeyAnnotation,"show-annotations"),fibonacci:i.get(ht.kLanguageKeyAnnotation,"fibonacci"),fibonacciFan:i.get(ht.kLanguageKeyAnnotation,"fibonacciFan"),fibonacciVertical:i.get(ht.kLanguageKeyAnnotation,"fibonacciVertical"),fibonacciHorizontal:i.get(ht.kLanguageKeyAnnotation,"fibonacciHorizontal"),fibonacciTimeZonesCustom:i.get(ht.kLanguageKeyAnnotation,"fibonacciTimeZonesCustom"),fibonacciCircle:i.get(ht.kLanguageKeyAnnotation,"fibonacciCircle"),"arrow-segment":i.get(ht.kLanguageKeyAnnotation,"arrow-segment"),ray:i.get(ht.kLanguageKeyAnnotation,"ray"),"arrow-ray":i.get(ht.kLanguageKeyAnnotation,"arrow-ray"),crooked3:i.get(ht.kLanguageKeyAnnotation,"crooked3"),crooked5:i.get(ht.kLanguageKeyAnnotation,"crooked5"),crookedLine:i.get(ht.kLanguageKeyAnnotation,"crooked5"),elliott3:i.get(ht.kLanguageKeyAnnotation,"elliott3"),elliott5:i.get(ht.kLanguageKeyAnnotation,"elliott5"),circle:i.get(ht.kLanguageKeyAnnotation,"circle"),pitchfork:i.get(ht.kLanguageKeyAnnotation,"pitchfork"),statisticLine:i.get(ht.kLanguageKeyAnnotation,"statisticLine"),label:i.get(ht.kLanguageKeyAnnotation,"label")}}}})}}class El{constructor(){}static addEventsAfterChartCreation(t){var e,n;const i=null===(e=t?.getChartWrapper())||void 0===e?void 0:e.getHighcharts(),s=t?.getChart();if(null==i||null==s)return;const o=t?.getChartLabels(),l=t?.getChartWatermark(),u=t?.getChartLogo();o?.addSeriesLabelEvent(),i.addEvent(s,"render",function g(){i.removeEvent(s,"render",g),o?.refreshLabels()}),i.addEvent(s,"render",function(){const g=s.get(ht.kOppositeYAxisId),I=g?.ticks;
1I&&Object.keys(I).forEach(C=>{var S;const N=null===(S=I[C])||void 0===S?void 0:S.label,k=N?.element;if(!k)return;const x=ze.getOppositeOrdinateFormattedValueEnsureRelative(Number(C),s,t,null,void 0,Pn.OPPOSITE_Y_AXIS_LABEL_DECIMALS_PERCENTAGE).replace(/&nbsp;/g," ");if(k.textContent!==x){for(;k.firstChild;)k.removeChild(k.firstChild);x&&k.appendChild(document.createTextNode(x))}})}),Ce.setAllSeriesTooltipOffsets(t),i.addEvent(s,"redraw",function(){var g;null===(g=t?.getChartStreaming())||void 0===g||g.hideAllPushMarkers(),o?.refreshLabels(),l?.recreateWatermarkOnResize(),u?.positionLogo(),pa.setHighLowPlotlines(t),r.InfrontUtil.setZeroTimeout(()=>Ce.setAllSeriesTooltipOffsets(t)),Js.raise(t)});const d=null===(n=s.series)||void 0===n?void 0:n[0];if(d){const g=s.get(ht.kXAxisId);i.addEvent(d,"dataOrDataGroupingChanged",function(I){var C,S,N;const k=I.series;if(!re.isMainSeries(null===(C=k?.options)||void 0===C?void 0:C.id)||!t?.getGlobalChartSettings())return;const x=rr.getCurrentResolutionInMs(t);if((null===(S=d?.xData)||void 0===S?void 0:S[(null===(N=d.xData)||void 0===N?void 0:N.length)-1])>g.max+x)return;const Y=t?.getWidgetInstrumentHeader();Y?.updateChange()})}i.addEvent(s,"onPaneSizeChangeEnd",function(){ue.setYAxisPanePositions(t),Ce.setAllSeriesTooltipOffsets(t)}),i.addEvent(i.Series,"afterKDTreeBuild",function(){ai.redraw(this)}),i.addEvent(s,"update-storage",function(){var g;null===(g=t.getWidgetChartStorage())||void 0===g||g.updateStorage()})}}var Sn;!function(a){a[a.HIGHCHARTS=1]="HIGHCHARTS",a[a.HIGHSTOCKS=2]="HIGHSTOCKS",a[a.ANNOTATIONS=3]="ANNOTATIONS",a[a.STOCK_TOOLS=4]="STOCK_TOOLS",a[a.INDICATORS=5]="INDICATORS",a[a.LIB_CHART_INDICATOR=6]="LIB_CHART_INDICATOR",a[a.HEIKINASHI=7]="HEIKINASHI",a[a.HOLLOWCANDLESTICK=8]="HOLLOWCANDLESTICK"}(Sn||(Sn={}));class fl{constructor(t){this.chartInstrumentList=t,this.globalChartSettings=t?.getGlobalChartSettings(),this.loadedFeatures=[],this.resizeObserver=new ResizeObserver(e=>{for(const n of e)n.target!==this.globalChartSettings.element&&n.target!==this.topToolbarElement&&n.target!==this.bottomToolbarElement||this.requestReflowChart()})}init(t,e){var n;this.Highcharts=globalThis?.Highcharts,null==this.Highcharts?r.InfrontUtil.errorLog("HighchartsWrapper: Highcharts not available in globalThis.Highcharts!"):(this.loadedFeatures.push(Sn.HIGHCHARTS),this.addHighstockFeature()),Xo.applyAll(this.Highcharts),$o.applyAll(this.Highcharts),this.LibChartIndicator=null!==(n=globalThis?.InfrontLibChartIndicator)&&void 0!==n?n:_a,r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("HighchartsWrapper: LibChartIndicator","getIndicatorList=",this.LibChartIndicator.getIndicatorList()),this.isHighstockAvailable()&&(e&&this.addAnnotationFeature(),t&&this.addIndicatorFeature
1())}onReadyGlobalChartSettings(){this.isAnnotationFeatureAvailable()&&Gi.wrapAnnotationPrototypes(this.Highcharts,this.chartInstrumentList),this.isIndicatorFeatureAvailable()&&io.wrapIndicatorPrototypes(this.Highcharts,this.chartInstrumentList)}destroy(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.destroyChart()}getHighcharts(){return this.Highcharts}getLibChartIndicator(){return this.LibChartIndicator}getChart(){return this.chart}setChartElements(t){this.chartContainer=t?.chartContainer,this.topToolbarElement=t?.topToolbar,this.bottomToolbarElement=t?.bottomToolbar}getChartContainer(){return this.chartContainer}getTopToolbarElement(){return this.topToolbarElement}getBottomToolbarElement(){return this.bottomToolbarElement}initChart(){var t;Il.setHighchartsLanguage(this.chartInstrumentList);const e=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getChartOptions();e.init(),e?.setSeries([]),this.newChart(e)}createChart(){var t,e,n,i,s,o;const l=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getChartOptions();if(!this.chartContainer||!l||!this.globalChartSettings)return;l.setChartOptions(),this.newChart(l);const u=null===(e=this.chart.xAxis)||void 0===e?void 0:e[0];let d=null===(i=null===(n=this.globalChartSettings.currentStartDate)||void 0===n?void 0:n.get())||void 0===i?void 0:i.getTime(),g=null===(o=null===(s=this.globalChartSettings.currentEndDate)||void 0===s?void 0:s.get())||void 0===o?void 0:o.getTime();if(this.globalChartSettings.isOneDayUntouched){const I=u?.dataMin;I&&r.InfrontUtil.isToday(new Date(I))&&(d=Math.max(d,I));const C=u?.dataMax;C&&r.InfrontUtil.isToday(new Date(C))&&(g=Math.min(g,C))}u?.setExtremes(d,g,!1,!1,{trigger:"afterCreateChart"}),this.requestRedrawChart(!0),this.afterCreateChart()}newChart(t){this.destroyChart();const e=t.get();this.chart=new this.Highcharts.StockChart(this.chartContainer,Object.assign(Object.assign({},e),{infront:null})),this.chart.options.infront=e.infront}destroyChart(){this.chart&&(this.chart.container.onmousemove=()=>{},this.chart.destroy(),this.chart=null)}afterCreateChart(){var t,e,n,i;El.addEventsAfterChartCreation(this.chartInstrumentList),da.setPrevCloseSeriesColor(this.chartInstrumentList),null===(t=this.chartInstrumentList.getChartWatermark())||void 0===t||t.setWatermark(),null===(e=this.chartInstrumentList.getChartLogo())||void 0===e||e.setLogo(),ma.setMainBaselinePlotline(this.chartInstrumentList),Js.raise(this.chartInstrumentList),null===(n=this.chartInstrumentList.getChartStreaming())||void 0===n||n.addAllPushMarkers(),this.chartInstrumentList.setAllChartDataStatus(sn.AFTER_CREATE_CHART),this.resizeObserver.disconnect(),null!=(null===(i=this.globalChartSettings)||void 0===i?void 0:i.element)&&this.resizeObserver.observe(this.globalChartSettings.element),null!=this.topToolbarElement&&this.resizeObserver.observe(this.topToolbarElement),null!=this.bottomToolbarElement&&this.resizeObserver.observe(this.bottomToolbarElement)}requestUpdateChart(t=!1){fe.setIntradayDataStartEndDate(this.chartInstrumentList),this.globalChartSettings.isAfterSetPeriod&&fe.adjustCurrentStartDateFromChartData(this.chartInstrumentList),this.globalChartSettings.isAfterSetPeriod=!1,t?this.updateChart():(null==this.throttledUpdateChart&&(this.throttledUpdateChart=r.InfrontUtil.throttle(this.updateChart,this.globalChartSettings.updateTimeout)),this.throttledUpdateChart())}updateChart(){var t,e;if(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.log("HighchartsWrapper: updateChart","chartInstrumentList=",this.chartInstrumentList),null===(t=this.chartInstrumentList)||void 0===t||!t.getLength())return void this.createChart();const n=re.getSeries(this.chartInstrumentList);(null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getChartOptions()).setSeries(n),this.createChart()}requestUpdateChartOptions(t,e=!1){var n;const i=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getChart();if(!i)return;const s=this.chartInstrumentList.getChartIndicators();s?.indicatorExistsByType(Dt.VOLUME_BY_PRICE)?this.requestUpdateChart():(i.update(r.InfrontUtil.deepCopy(t),!1,!1,!1),this.requestRedrawChart(e))}requestRedrawChart(t=!1,e=!1){t?this.redrawChart(e):(null==this.throttledRedrawChart&&(this.throttledRedrawChart=r.InfrontUtil.throttle(this.redrawChart,this.globalChartSettings.redrawTimeout)),this.throttledRedrawChart())}redrawChart(t=!1){var e;const n=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getChart();r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("HighchartsWrapper: redrawChart","chart=",n,"animation=",t),n?.redraw(t)}requestReflowChart(t=!1){t?this.reflowChart():(null==this.throttledReflowChart&&(this.throttledReflowChart=r.InfrontUtil.throttle(this.reflowChart,this.globalChartSettings.reflowTimeout)),this.throttledReflowChart())}reflowChart(){var t,e;const n=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getChart(),i=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getChartOptions();r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("HighchartsWrapper: reflowChart","chart=",n,"chartOptions=",i),n?.update({chart:{height:i?.getCurrentChartHe
1ight()}},!0,!1,!1),n?.reflow()}getLoadedFeatures(){return this.loadedFeatures}isHighstockAvailable(){return this.loadedFeatures.includes(Sn.HIGHCHARTS)&&this.loadedFeatures.includes(Sn.HIGHSTOCKS)}isHeikinashiFeatureAvailable(){return this.loadedFeatures.includes(Sn.HEIKINASHI)}isHollowCandlestickFeatureAvailable(){return this.loadedFeatures.includes(Sn.HOLLOWCANDLESTICK)}isAnnotationFeatureAvailable(){return this.loadedFeatures.includes(Sn.ANNOTATIONS)&&this.loadedFeatures.includes(Sn.STOCK_TOOLS)}isIndicatorFeatureAvailable(){return this.loadedFeatures.includes(Sn.INDICATORS)&&this.loadedFeatures.includes(Sn.LIB_CHART_INDICATOR)}hasHighchartsModule(t,e){var n;const i=null===(n=this.Highcharts)||void 0===n?void 0:n._modules;return null!=i?Object.keys(i).includes(t):e()}addHighstockFeature(){this.hasHighchartsModule("masters/highstock.src.js",()=>"function"==typeof this.Highcharts.stockChart)?this.loadedFeatures.push(Sn.HIGHSTOCKS):r.InfrontUtil.errorLog('HighchartsWrapper: Highstocks not available. Please load "highstock.js"'),this.hasHighchartsModule("masters/modules/heikinashi.src.js",()=>{var t;return null!=(null===(t=this.Highcharts.seriesTypes)||void 0===t?void 0:t.heikinashi)})?this.loadedFeatures.push(Sn.HEIKINASHI):r.InfrontUtil.errorLog('HighchartsWrapper: Highstocks "Heikin-Ashi" module not available. Please load "modules/heikinashi.js" after "highstock.js"'),this.hasHighchartsModule("masters/modules/hollowcandlestick.src.js",()=>{var t;return null!=(null===(t=this.Highcharts.seriesTypes)||void 0===t?void 0:t.hollowcandlestick)})?this.loadedFeatures.push(Sn.HOLLOWCANDLESTICK):r.InfrontUtil.errorLog('HighchartsWrapper: Highstocks "Hollow Candlestick" module not available. Please load "modules/hollowcandlestick.js" after "highstock.js"')}addAnnotationFeature(){this.hasHighchartsModule("masters/modules/annotations-advanced.src.js",()=>{var t,e;return null!=(null===(e=null===(t=this.Highcharts.Annotation)||void 0===t?void 0:t.types)||void 0===e?void 0:e.crookedLine)})?this.loadedFeatures.push(Sn.ANNOTATIONS):r.InfrontUtil.errorLog('HighchartsWrapper: Highcharts "Annotations-Advanced" module not available. Please load "modules/annotations-advanced.js" after "highstock.js"'),this.hasHighchartsModule("masters/modules/stock-tools.src.js",()=>"function"==typeof this.Highcharts.Toolbar)?this.loadedFeatures.push(Sn.STOCK_TOOLS):r.InfrontUtil.errorLog('HighchartsWrapper: Highcharts "Stock-Tools" module not available. Please load "modules/stock-tools.js" after "highstock.js" and "modules/annotations-advanced.js"')}
1addIndicatorFeature(){this.hasHighchartsModule("masters/indicators/indicators-all.src.js",()=>{var t;return null!=(null===(t=this.Highcharts.seriesTypes)||void 0===t?void 0:t.sma)})?this.loadedFeatures.push(Sn.INDICATORS):r.InfrontUtil.errorLog('HighchartsWrapper: Highcharts "Indicators-All" module not available. Please load "indicators/indicators-all.js" after "highstock.js"'),null==this.LibChartIndicator?r.InfrontUtil.errorLog('HighchartsWrapper: Infront "ChartIndicator" library not available in globalThis.InfrontLibChartIndicator.'):this.loadedFeatures.push(Sn.LIB_CHART_INDICATOR)}}class ka{constructor(t){this.chartInstrumentList=t,this.scrollListener=(()=>{var e;const n=null===(e=this.chartInstrumentList.getChartWrapper())||void 0===e?void 0:e.getHighcharts();let i,s,o,l,u,d,g;return I=>{var C;const S=this.chartInstrumentList.getGlobalChartSettings();i=S?.navigatorScrollFactor;const N=S?.hasNavigatorScroll;if(s=null===(C=this.chartInstrumentList.getChart())||void 0===C?void 0:C.scrollbar,s&&i&&N){if(I.preventDefault(),o=s.from,l=s.to,u=l-o,d=u*i,I.deltaY<0){if(1===l)return;l+d>1?s.setRange(1-u,1):s.setRange(o+d,l+d)}else{if(0===o)return;o-d<0?s.setRange(0,0+u):s.setRange(o-d,l-d)}null!=g&&clearTimeout(g),g=setTimeout(()=>{n.fireEvent(s,"changed",{from:s.from,to:s.to,trigger:"scrollbar"})},50)}}})()}static getNavigatorOptions(t){var e,n,i,s;const o=t.getGlobalChartSettings();return{adaptToUpdatedData:!1,height:null!==(e=o?.navigatorHeight)&&void 0!==e?e:16,margin:null!==(n=o?.navigatorMargin)&&void 0!==n?n:10,outlineWidth:0,handles:Object.assign(Object.assign({enabled:!!o?.navigatorHandlesEnabled},null!=o?.navigatorHandlesSymbols?{symbols:o?.navigatorHandlesSymbols}:{}),{height:null!==(i=o?.navigatorHandlesHeight)&&void 0!==i?i:15,width:null!==(s=o?.navigatorHandlesWidth)&&void 0!==s?s:8})}}static getScrollbarOptions(){return{liveRedraw:void 0,height:0,margin:0,trackBorderWidth:0}}setMouseWheelScrollEvent(t=this.chartInstrumentList.getChart()){var e;const n=null===(e=this.chartInstrumentList.getChartWrapper())||void 0===e?void 0:e.getHighcharts(),i=t?.container;if(!(i instanceof HTMLElement)||null==n)return;const s=this.chartInstrumentList.getGlobalChartSettings(),o=s?.navigatorScrollFactor;s?.hasNavigatorScroll&&o>0?i.addEventListener("wheel",this.scrollListener,{passive:!1}):i.removeEventListener("wheel",this.scrollListener)}destroy(){var t;const e=null===(t=this.chartInstrumentList.getChart())||void 0===t?void 0:t.container;e instanceof HTMLElement&&e.removeEventListener("wheel",this.scrollListener)}}class Wi{constructor(t,e){this.fullscreenEnabled=e,this.chartInstrumentList=t,this.fullscreenEventHandler=this.fullscreenEventHandler.bind(this),this.addFullscreenEvents()}static isFullscreen(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}addFullscreenEvents(){document.addEventListener&&(document.addEventListener("fullscreenchange",this.fullscreenEventHandler,!1),document.addEventListener("webkitfullscreenchange",this.fullscreenEventHandler,!1),document.addEventListener("mozfullscreenchange",this.fullscreenEventHandler,!1),document.addEventListener("MSFullscreenChange",this.fullscreenEventHandler,!1))}fullscreenEventHandler(){var t,e,n,i;"function"==typeof(null===(t=this.fullscreenEnabled)||void 0===t?void 0:t.set)&&this.fullscreenEnabled.set(!!Wi.isFullscreen());const s=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getGlobalChartSettings(),o=s?.element;o?.style&&(o.style.height=Wi.isFullscreen()?screen.height+"px":this.originalElementHeight||null),null===(i=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getChartWrapper())||void 0===i||i.requestReflowChart()}toggleFullscreen(){var t,e;const n=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getGlobalChartSettings(),i=n?.element;this.originalElementHeight||Wi.isFullscreen()||(this.originalElementHeight=null===(e=i?.style)||void 0===e?void 0:e.height),Wi.isFullscreen()?document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen():i?.requestFullscreen?i.requestFullscreen():i?.mozRequestFullScreen?i.mozRequestFullScreen():i?.webkitRequestFullscreen?i.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):i?.msRequestFullscreen&&i.msRequestFullscreen()}destroy(){document.removeEventListener&&(document.removeEventListener("fullscreenchange",this.fullscreenEventHandler,!1),document.removeEventListener("webkitfullscreenchange",this.fullscreenEventHandler,!1),document.removeEventListener("mozfullscreenchange",this.fullscreenEventHandler,!1),document.removeEventListener("MSFullscreenChange",this.fullscreenEventHandler,!1))}}class Cl{constructor(t){this.chartInstrumentList=t}init(){this.chartOptions=this.initHighchartOptions()}get(){return this.chartOptions}initHighchartOptions(){var t,e,n,i;if(null==this.chartInstrumentList)return;const s=this.chartInstrumentList.getGlobalChartSettings(),o=this.chartInstrumentList.getChartLegend(),l=this,u=null===(t=(0,D.d)())||void 0===t?void 0:t.navigation;return Object.assign(Object.assign({chart:{className:ht.kClassNameChartContainer,styledMode:!1,animation:!0,height:this.getCurrentChartHe
1ight(),margin:this.getCurrentChartMargin(),spacing:this.getCurrentChartSpacing(),panning:{enabled:!1},events:{render:function(){},load:function(){var d;null===(d=l.chartInstrumentList.getChartNavigator())||void 0===d||d.setMouseWheelScrollEvent(this)}}},navigation:Object.assign(Object.assign(Object.assign({},null===(n=null===(e=this.chartInstrumentList.getChartAnnotations())||void 0===e?void 0:e.getNavigationOptions())||void 0===n?void 0:n.navigation),u?.iconsURL?{iconsURL:u.iconsURL}:{}),{annotationsOptions:{zIndex:9e3}}),xAxis:ue.getXAxisOptions(this.chartInstrumentList),yAxis:ue.getYAxisOptions(this.chartInstrumentList),series:[],credits:{enabled:!1},rangeSelector:{enabled:!1},navigator:Object.assign(Object.assign({enabled:!!s?.showNavigator},ka.getNavigatorOptions(this.chartInstrumentList)),va_getNavigatorOverrides(s)),scrollbar:Object.assign({enabled:!!s?.showNavigator},ka.getScrollbarOptions()),legend:Object.assign({enabled:!!s?.showLegend},o.getLegendOptions()),tooltip:Object.assign({enabled:!!s?.showTooltip&&!!s?.cursorEventsEnabled},Ce.getGlobalTooltipOptions(this.chartInstrumentList)),infront:{chartInstrumentList:this.chartInstrumentList},annotations:[]},null===(i=this.chartInstrumentList.getChartAnnotations())||void 0===i?void 0:i.getStockToolOptions()),{plotOptions:Object.assign(Object.assign({line:{dataGrouping:{approximation:"close"}},area:{threshold:null,dataGrouping:{approximation:"close"}}},this.chartInstrumentList.getChartIndicators().getIndicatorPlotOptions()),{series:{dataGrouping:this.getDataGroupingOptions(),getExtremesFromAll:!1,states:this.getSeriesStatesOptions(),marker:this.getSeriesMarkerOptions(),enableMouseTracking:!!s?.cursorEventsEnabled,events:{legendItemClick:function(d){return o.getLegendItemClickEvent(this,d)},hide:function(d){l.chartInstrumentList.refreshChartLabels()},show:function(d){l.chartInstrumentList.refreshChartLabels()}}}}),responsive:{rules:[{condition:{maxWidth:800},chartOptions:{rangeSelector:{inputEnabled:!1}}}]}})}setChartOptions(){this.chartOptions&&(this.setChartHeight(),this.setMargin(),this.setResolution(),this.setXAxis(),this.setYAxis())}setSeries(t=[]){this.chartOptions&&(this.chartOptions.series=t)}setXAxis(){this.chartOptions&&(this.chartOptions.xAxis=ue.getXAxisOptions(this.chartInstrumentList))}setYAxis(){this.chartOptions&&(this.chartOptions.yAxis=ue.getYAxisOptions(this.chartInstrumentList))}setResolution(){var t,e;null!==(e=null===(t=this.chartOptions)||void 0===t?void 0:t.plotOptions)&&void 0!==e&&e.series&&(this.chartOptions.plotOptions.series.dataGrouping=this.getDataGroupingOptions())}setCursor(){var t,e,n,i,s,o;const l=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getChart(),u=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getGlobalChartSettings();if(!l||!u)return;const d=[l.get(ht.kXAxisId)];null===(n=l.yAxis)||void 0===n||n.forEach(C=>{var S,N,k;([ht.kMainYAxisId,ht.kOppositeYAxisId].includes(null===(S=C.options)||void 0===S?void 0:S.id)||null!==(k=null===(N=C.options)||void 0===N?void 0:N.id)&&void 0!==k&&k.startsWith(ht.kOscillatorYAxisId))&&d.push(C)}),d.forEach(C=>{const S=ue.getAxisTypeForAxis(C);S&&C?.update({crosshair:!!u?.showOrdinate&&ue.getCrosshairOptions(this.chartInstrumentList,S)},!1)}),null===(i=l.series)||void 0===i||i.filter(C=>{var S;return re.isOscillatorSeries(null===(S=C.options)||void 0===S?void 0:S.id)}).forEach((C,S,N)=>
1{C.update({enableMouseTracking:!!u.cursorEventsEnabled},!1),S===N.length-1&&l.redraw(!1)});const g={states:this.getSeriesStatesOptions(),marker:this.getSeriesMarkerOptions(),enableMouseTracking:!!u.cursorEventsEnabled};null===(s=l.series)||void 0===s||s.filter(C=>{var S,N,k;return re.isInstrumentSeries(null===(S=C.options)||void 0===S?void 0:S.id)||re.isAnyVolumeSeries(null===(N=C.options)||void 0===N?void 0:N.id)||re.isCompanyEventSeries(null===(k=C.options)||void 0===k?void 0:k.id)}).forEach(C=>{C.update(r.InfrontUtil.deepCopy(g),!1)});const I={tooltip:{enabled:!!u?.showTooltip&&!!u.cursorEventsEnabled},plotOptions:{series:g}};this.chartOptions=Object.assign(Object.assign({},this.chartOptions),{tooltip:Object.assign(Object.assign({},this.chartOptions.tooltip),I.tooltip),plotOptions:Object.assign(Object.assign({},this.chartOptions.plotOptions),{series:Object.assign(Object.assign({},this.chartOptions.plotOptions.series),I.plotOptions.series)})}),null===(o=this.chartInstrumentList.getChartWrapper())||void 0===o||o.requestUpdateChartOptions(I)}updateResolution(){var t,e,n;const i=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getChart(),s=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getGlobalChartSettings();i&&s&&(null===(n=this.chartInstrumentList.getChartWrapper())||void 0===n||n.requestUpdateChartOptions({plotOptions:{series:{dataGrouping:this.getDataGroupingOptions()}}}))}getDataGroupingOptions(){var t;const e=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getGlobalChartSettings();if(!e)return;const n=e.currentResolution===F.AUTO?Ke.getDefaultResolution(e):e.currentResolution;return{forced:!0,units:[rr.HIGHCHARTS_AGGREGATION_OPTIONS[n]],groupAll:!0}}getSeriesStatesOptions(){const t=this.chartInstrumentList.getGlobalChartSettings();return{inactive:{enabled:!1},hover:{enabled:!!t?.cursorEventsEnabled,lineWidthPlus:0}}}getSeriesMarkerOptions(){const t=this.chartInstrumentList.getGlobalChartSettings();return{enabled:!1,symbol:"circle",states:{hover:{enabled:!!t?.cursorEventsEnabled}}}}getAnnotations(){var t;return(null===(t=this.chartOptions)||void 0===t?void 0:t.annotations)||[]}setShowNavigator(t){this.chartOptions&&(this.chartOptions.navigator.enabled=!!t)}setShowTooltip(t){this.chartOptions&&(this.chartOptions.tooltip.enabled=!!t)}setLegendOptions(t={}){const e=this.chartInstrumentList.getGlobalChartSettings(),n=this.chartInstrumentList.getChartLegend();this.chartOptions&&e&&n&&(this.chartOptions.legend=Object.assign(Object.assign({enabled:!!e?.showLegend},n.getLegendOptions()),t))}setChartHeight(){var t;null!==(t=this.chartOptions)&&void 0!==t&&t.chart&&(this.chartOptions.chart.height=this.getCurrentChartHe
1ight())}setMargin(){var t;null!==(t=this.chartOptions)&&void 0!==t&&t.chart&&(this.chartOptions.chart.margin=this.getCurrentChartMargin())}getCurrentChartMargin(){var t;const e=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getGlobalChartSettings(),n=e?.showOppositeOrdinate&&e?.ordinateLabelsOutside?50:5,i=e?.showOrdinate&&e?.ordinateLabelsOutside?50:5;return[ir(e),i,null,n]}getCurrentChartSpacing(){var t;const e=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getGlobalChartSettings();return[0,0,e?.showNavigator?0:5,0]}getChartSpacing(t){var e,n;const i=null===(e=this.chartOptions)||void 0===e?void 0:e.chart;if(null==i)return;let s;switch(typeof t){case"string":s=["top","right","bottom","left"].indexOf(t);break;case"number":s=t;break;default:return}return null!==(n=i?.[["spacingTop","spacingRight","spacingBottom","spacingLeft"][s]])&&void 0!==n?n:(o=>{var l;switch(null===(l=i?.spacing)||void 0===l?void 0:l.length){case 1:return i.spacing[0];case 2:switch(o){case 0:case 2:return i.spacing[0];case 1:case 3:return i.spacing[1];default:return}case 3:switch(o){case 0:return i.spacing[0];case 1:case 3:return i.spacing[1];case 2:return i.spacing[2];default:return}case 4:return i.spacing[o];default:return}})(s)}
1getCurrentChartHeight(){var t;const e=this.chartInstrumentList.getGlobalChartSettings(),n=null===(t=e?.element)||void 0===t?void 0:t.querySelectorAll(".cell-w-chart-nextgen"),i=n?.[0],s=i?.offsetHeight;return(Wi.isFullscreen()?screen.height:s)-this.getCurrentTopToolbarHeight()-this.getCurrentTopSubToolbarHeight()-this.getCurrentBottomToolbarHeight()+"px"}getCurrentTopToolbarHeight(){var t,e,n;const i=this.chartInstrumentList.getGlobalChartSettings(),s=null===(t=this.chartInstrumentList.getTopToolbarElement())||void 0===t?void 0:t.parentElement;return null!==(e=i?.showTopToolbar)&&void 0!==e&&e.get()?null!==(n=s?.offsetHeight)&&void 0!==n?n:30:0}getCurrentTopSubToolbarHeight(){return 0}getCurrentBottomToolbarHeight(){var t,e,n;const i=this.chartInstrumentList.getGlobalChartSettings(),s=null===(t=this.chartInstrumentList.getBottomToolbarElement())||void 0===t?void 0:t.parentElement;return null!==(e=i?.showBottomToolbar)&&void 0!==e&&e.get()?null!==(n=s?.offsetHeight)&&void 0!==n?n:30:0}}class Tl{constructor(t){this.chartInstrumentList=t,this.seriesLabelEventHandler=this.seriesLabelEventHandler.bind(this)}addSeriesLabelEvent(){var t,e,n;const i=null===(e=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getChartWrapper())||void 0===e?void 0:e.getChartContainer();if(!i)return;i.removeEventListener("mousemove",this.seriesLabelEventHandler),i.removeEventListener("mouseleave",this.seriesLabelEventHandler);const s=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getGlobalChartSettings();s?.showSeriesLabels&&!s?.areaStacking&&(s.cursorEventsEnabled&&(i.addEventListener("mousemove",this.seriesLabelEventHandler),i.addEventListener("mouseleave",this.seriesLabelEventHandler)),this.addLastPriceSeriesLabels(s?.showOrdinate,s?.showOppositeOrdinate))}refreshLabels(){var t,e;const n=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getChart();if(!n)return;null==this.lastEvent&&n.series.forEach(s=>{this.removeSeriesLabels(s,se.ORDINATE),this.removeSeriesLabels(s,se.OPPOSITE)});const i=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getGlobalChartSettings();i?.showSeriesLabels&&!i?.areaStacking&&(null==this.lastEvent?this.addLastPriceSeriesLabels(i?.showOrdinate,i?.showOppositeOrdinate):this.seriesLabelEventHandler(this.lastEvent))}seriesLabelEventHandler(t){var e,n,i,s,o;if(!["mousemove","mouseleave"].includes(t?.type))return;const l=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getChart(),u=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getGlobalChartSettings();let d=u?.showOrdinate,g=u?.showOppositeOrdinate;const I=null===(s=null===(i=l?.container)||void 0===i?void 0:i.querySelector(".highcharts-plot-background"))||void 0===s?void 0:s.getBoundingClientRect(),C=t.clientX>=I?.left&&t.clientX<=I?.right&&t.clientY>=I?.top&&t.clientY<=I?.bottom;"mousemove"===t.type&&C&&u.cursorEventsEnabled?(this.lastEvent=this.getLastEvent(t),u?.showOppositeOrdinate&&(this.addMovingSeriesLabels(t,se.OPPOSITE),g=!1),u?.showOrdinate&&ue.getOrdinateScaling(this.chartInstrumentList)===Pe.RELATIVE&&(this.addMovingSeriesLabels(t,se.ORDINATE),d=!1)):"mouseleave"!==t.type&&C||(this.lastEvent=null,null===(o=l?.series)||void 0===o||o.forEach(S=>{this.removeSeriesLabels(S,se.ORDINATE),this.removeSeriesLabels(S,se.OPPOSITE)})),this.addLastPriceSeriesLabels(d,g)}getLastEvent(t){return{type:t.type,clientX:t.clientX,clientY:t.clientY}}addMovingSeriesLabels(t,e=se.ORDINATE){var n,i,s;const o=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getChart(),l=null===(i=this.chartInstrumentList)||void 0===i?void 0:i.getGlobalChartSettings(),u=o?.pointer,d=null===(s=o?.series)||void 0===s?void 0:s.filter(g=>this.isSeriesLabelSeries(g));o&&u&&d?.length&&(l?.mainOnTop&&d.reverse(),d.forEach(g=>{var I,C;const S=u.findNearestKDPoint([g],!0,t);let N,k;if(e===se.ORDINATE){const x=S?.change;N=x??S?.y,k=Pn.SERIES_LABEL_DECIMALS}else{if(e!==se.OPPOSITE)return;N=ze.getPercentValue(S?.y,this.chartInstrumentList,null===(I=g?.options)||void 0===I?void 0:I.id),k=Pn.OPPOSITE_SERIES_LABEL_DECIMALS_PERCENTAGE}if(null!=N){const x=this.chartInstrumentList.getChartInstrumentById(null===(C=g?.options)||void 0===C?void 0:C.id),Y=[{value:N,plotY:S?.plotY,backgroundColor:this.getBackgroun
1dColor(x,g,N),textColor:x?.getLabelTextColor()}];this.renderSeriesLabels(g,Y,e,null,k)}}))}addLastPriceSeriesLabels(t,e){var n,i,s;if(!t&&!e)return;const o=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getChart(),l=null===(i=this.chartInstrumentList)||void 0===i?void 0:i.getGlobalChartSettings(),u=o?.pointer,d=null===(s=o?.series)||void 0===s?void 0:s.filter(g=>this.isSeriesLabelSeries(g));o&&u&&d?.length&&(l?.mainOnTop&&d.reverse(),d.forEach(g=>{var I;if(t){const C=[...ma.getBaselineLabelData(this.chartInstrumentList,l?.chartType,g),...this.getLastData(g,se.ORDINATE)],S=ze.getInstrumentDecimalsById(this.chartInstrumentList,null===(I=g?.options)||void 0===I?void 0:I.id);this.renderSeriesLabels(g,C,se.ORDINATE,S,Pn.SERIES_LABEL_DECIMALS)}if(e){const C=this.getLastData(g,se.OPPOSITE);this.renderSeriesLabels(g,C,se.OPPOSITE,null,Pn.OPPOSITE_SERIES_LABEL_DECIMALS_PERCENTAGE)}}))}isSeriesLabelSeries(t){var e;return re.isSeriesVisible(t)&&re.isInstrumentSeries(null===(e=t?.options)||void 0===e?void 0:e.id)}removeSeriesLabels(t,e=se.ORDINATE){const n=t?.[e];n&&(n.destroy(),t[e]=null)}renderSeriesLabels(t,e,n=se.ORDINATE,i=null,s){var o;if(!e?.length)return;const l=t?.chart,u=null===(o=this.chartInstrumentList)||void 0===o?void 0:o.getGlobalChartSettings(),d=l?.renderer,g=this.getYAxisForAxisType(l,n);if(!l||!d||!g)return;const I=(n===se.ORDINATE&&u?.ordinateLabelsOutside||n===se.OPPOSITE&&!u?.ordinateLabelsOutside?"M0 0 L8 -8 L50 -8 L50 8 L8 8 Z":"M50 0 L42 -8 L2 -8 L2 8 L42 8 Z").split(" "),C=this.calculatePosX(l,n);this.removeSeriesLabels(t,n),t[n]=d.g("seriesLabels").attr({zIndex:1}).add(g.labelGroup),e.forEach(S=>{var N,k;const x=S.plotY,Y=this.calculatePosX(l,n);d.path(I).attr({fill:S.backgroundColor}).translate(Y,x).add(t[n]);const et=this.getFormattedValueForAxisType(S.value,l,n,i,s);d.text(et,C+(n===se.ORDINATE?5:44),x+4).attr({align:n===se.ORDINATE?"left":"right"}).css({color:S.textColor,fontSize:(null===(k=null===(N=l.userOptions)||void 0===N?void 0:N[n])||void 0===k?void 0:k.fontSize)||"11px"}).add(t[n])})}getFormattedValueForAxisType(t,e,n=se.ORDINATE,i=null,s){let o=""+t;return n===se.ORDINATE?o=ue.isOrdinatePercentAxis(this.chartInstrumentList)?ze.getOrdinateFormattedValue(t,e,this.chartInstrumentList,2,Cn.MINIMUM,s):ze.getOrdinateFormattedValue(t,e,this.chartInstrumentList,i,void 0,s):n===se.OPPOSITE&&(o=ze.getOppositeOrdinateFormattedValue(t,e,this.chartInstrumentList,2,Cn.MINIMUM,s)),o}getYAxisForAxisType(t,e=se.ORDINATE){const n=e===se.ORDINATE?ht.kMainYAxisId:ht.kOppositeYAxisId;return t?.get(n)}calculatePosX(t,e=se.ORDINATE){var n;const i=t?.chartWidth,s=this.getYAxisForAxisType(t,e),o=Number(s?.offset||0),l=e===se.ORDINATE;if(null==i||null==o||null==l)return 0;const u=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getGlobalChartSettings();let d;return d=l?u?.ordinateLabelsOutside?t.plotLeft+t.plotWidth+o+1:i-55:u?.ordinateLabelsOutside?t.plotLeft+o-52:5,d}
1getLastData(t,e=se.ORDINATE){var n,i;const s=[],o=Kn.getProcessedYData(t);if(!o?.length)return s;const l=Kn.getProcessedXData(t);let u=1;l[l.length-1]>t.xAxis.max&&(u=2);let d=o[o.length-u];if(Array.isArray(d)&&(d=Jn.getDataValueForPointValKey(d,t.pointValKey)),d=re.getModifyValue(t,d),r.InfrontUtil.isNumber(d)&&t.yAxis&&r.InfrontUtil.isNumber(t.yAxis.min)&&r.InfrontUtil.isNumber(t.yAxis.max)&&d<=t.yAxis.max&&d>=t.yAxis.min){const g=ue.getOrdinateScaling(this.chartInstrumentList),I=t?.yAxis,C=g===Pe.ABSOLUTE&&e===se.OPPOSITE?ze.getPercentValue(d,this.chartInstrumentList,null===(n=t?.options)||void 0===n?void 0:n.id):d,S=this.chartInstrumentList.getChartInstrumentById(null===(i=t?.options)||void 0===i?void 0:i.id);s.push({value:C,plotY:I.toPixels(d,!1),backgroundColor:this.getBackgroundColor(S,t,d),textColor:S?.getLabelTextColor()})}return s}getBackgroundColor(t,e,n){var i,s;const o=t?.getInstrumentSettings(),l=o?.chartType;let u=null!==(i=t?.getLabelColor())&&void 0!==i?i:"black";return ma.shouldApplyBaselineLogic(l,e)&&null!=n&&(u=null!==(s=t?.getLabelColor())&&void 0!==s?s:u),u}}class Sl{constructor(t){this.chartInstrumentList=t,this.languageHandler=t?.getLanguageHandler()}setWatermark(t=null){this.watermarkText=t??this.watermarkText,this.setWatermarkText(),this.createWatermark()}setWatermarkText(t=null){var e;if(null===(e=this.chartInstrumentList)||void 0===e||!e.hasAnyData())return void(this.watermarkText=this.languageHandler.get(ht.kLanguageKey,"noChartDataText"));if(null!=t)return void(this.watermarkText=t);const n=this.chartInstrumentList.getGlobalChartSettings(),i=this.chartInstrumentList.getMainInstrument();if(n)switch(n.watermarkType){case yn.NONE:return this.watermarkText=null,void this.removeWatermark();case yn.SYMBOL:this.watermarkText=i?.getInstrumentName();break;case yn.DESCRIPTION:this.watermarkText=i?.getInstrumentFullName();break;case yn.CUSTOM:this.watermarkText=n.watermarkCustomText}}createWatermark(){var t,e;const n=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getGlobalChartSettings(),i=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getChart();if(!n||!i||(this.removeWatermark(),null==this.watermarkText))return;const s=n.watermarkMaxFontSize||140;this.watermark=i.renderer.label(this.watermarkText,0,0,null,null,null,!1,!0,"chart-watermark"),this.watermark.attr({zIndex:1}).add(),this.setWatermarkFontSize(s),this.positionWatermark()}setWatermarkFontSize(t){var e,n,i;const s=null===(n=null===(e=this.watermark)||void 0===e?void 0:e.text)||void 0===n?void 0:n.element;null===(i=s?.style)||void 0===i||i.setProperty("font-size",t+"px","important"),this.watermark.css({fontSize:t+"px !important"})}recreateWatermarkOnResize(){var t;const e=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getChart();if(!e)return;const n=e.plotHeight,i=e.chartWidth;this.oldCanvasHeight===n&&this.oldCanvasWidth===i||(this.oldCanvasHeight=n,this.oldCanvasWidth=i,this.createWatermark())}positionWatermark(){var t,e;if(!this.watermark)return;const n=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getGlobalChartSettings(),i=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getChart();if(!n||!i)return;const s=this.watermark.getBBox().width,o=this.watermark.getBBox().height,l=i.chartWidth,u=i.plotHeight,d=n.watermarkMaxFontSize||140;let g=d,I=o,C=s,S=!1;const N=Math.floor(100-(l-s)/l*100),k=n.watermarkMaxWidthPercent||70;if(N>k){const it=k/N;g=d*it,I=o*it,C=s*it,S=!0}const x=Math.floor(100-(u-o)/u*100),Y=n.watermarkMaxHeightPercent||30;if(x>Y){const it=Y/x;g=Math.min(g,d*it),I=Math.min(I,o*it),C=Math.min(C,s*it),S=!0}S&&this.setWatermarkFontSize(g),this.watermark.attr({x:l/2-C/2,y:u/2-I/2+8})}removeWatermark(){var t;null===(t=this.watermark)||void 0===t||t.destroy(),this.watermark=void 0}}class _l{constructor(t){this.infrontLogoSrcList={[ni.COLOR]:"//wtk.infrontservices.com/themes/light-latest/infront-logo-color-cmyk.svg",[ni.BLACK]:"//wtk.infrontservices.com/themes/light-latest/infront-logo-mono-dark.svg",[ni.WHITE]:"//wtk.infrontservices.com/themes/light-latest/infront-logo-mono-light.svg"},this.defaultLogo={infrontLogo:ni.BLACK,position:Ai.BOTTOM_LEFT,offset:10,opacity:.4,width:128,height:25,className:ht.kClassNameChartLogo},this.chartInstrumentList=t}setLogo(){this.setlogoParams(),this.createLogo()}setlogoParams(){const t=this.chartInstrumentList.getGlobalChartSettings();t&&(this.logo=Object.assign(Object.assign({},this.defaultLogo),t.logo||{}),null==this.logo.src&&(this.logo.src=this.infrontLogoSrcList[this.logo.infrontLogo]))}createLogo(){var t,e,n;const i=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getGlobalChartSettings(),s=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getChart();i&&s&&(this.removeLogo(),i.showLogo&&null!=(null===(n=this.logo)||void 0===n?void 0:n.src)&&(this.logoElement=s.renderer.image(this.logo.src,0,0,this.logo.width,this.logo.height),this.logoElement.attr({zIndex:99}).addClass(this.logo.className).css({opacity:this.logo.opacity}).add(),this.positionLogo()))}positionLogo(){var t,e,n,i;if(!this.logoElement||null==(null===(t=this.logo)||void 0===t?void 0:t.src))return;const s=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getGlobalChartSettings(),o=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getChart(),l=o?.get(ht.kXAxisId);
1if(!s||!l||!o)return;const u=this.logo.position===Ai.BOTTOM_LEFT?50+this.logo.offset:o.chartWidth-this.logoElement.getBBox().width-50-this.logo.offset,d=l.height-this.logoElement.getBBox().height-this.logo.offset;null===(i=this.logoElement)||void 0===i||i.attr({x:u,y:d})}removeLogo(){var t;null===(t=this.logoElement)||void 0===t||t.destroy(),this.logoElement=void 0}}const Al={chartType:wt.AREA,period:lt.ONE_YEAR,resolution:F.AUTO,showVolume:!0,volumeUseUpDownColors:!1,showVolumeUnderlay:!1,volumeUnderlayUseUpDownColors:!0,indicatorList:[]},Ol={chartType:wt.CANDLESTICK,period:lt.ONE_YEAR,resolution:F.ONE_DAY,showVolume:!0,volumeUseUpDownColors:!1,showVolumeUnderlay:!1,indicatorList:[{type:Dt.VOLUME_BY_PRICE,params:{color:Bt.getHexAlphaColor(In,"33"),negativeColor:Bt.getHexAlphaColor(cn,"33")}},{type:Dt.SMA,linkedTo:"volume",params:{period:20}}]},bl={chartType:wt.CANDLESTICK,period:lt.ONE_YEAR,resolution:F.ONE_DAY,showVolume:!0,volumeUseUpDownColors:!1,showVolumeUnderlay:!1,indicatorList:[{type:Dt.EMA,params:{period:10}},{type:Dt.EMA,params:{period:50}},{type:Dt.EMA,params:{period:100}},{type:Dt.EMA,params:{period:200}},{type:Dt.VOLUME_BY_PRICE,params:{color:Bt.getHexAlphaColor(In,"33"),negativeColor:Bt.getHexAlphaColor(cn,"33")}},{type:Dt.SMA,linkedTo:"volume",params:{period:20}},{type:Dt.RSI,params:{period:14}}]},Ll={chartType:wt.CANDLESTICK,period:lt.TEN_DAYS,resolution:F.FIFTEEN_MINUTES,showVolume:!0,volumeUseUpDownColors:!1,showVolumeUnderlay:!1,indicatorList:[{type:Dt.SMA,params:{period:13}},{type:Dt.WMA,params:{period:130}},{type:Dt.VOLUME_BY_PRICE,params:{color:Bt.getHexAlphaColor(In,"33"),negativeColor:Bt.getHexAlphaColor(cn,"33")}},{type:Dt.RSI,params:{period:14}}]},wl={chartType:wt.CANDLESTICK,period:lt.FIVE_YEARS,resolution:F.ONE_MONTH,showVolume:!0,volumeUseUpDownColors:!1,showVolumeUnderlay:!1,indicatorList:[{type:Dt.SMA,params:{period:10}},{type:Dt.RSI,params:{period:14}}]},Dl={chartType:wt.CANDLESTICK,period:lt.THIRTY_DAYS,resolution:F.SIXTY_MINUTES,showVolume:!0,volumeUseUpDownColors:!1,showVolumeUnderlay:!1,indicatorList:[{type:Dt.EMA,params:{period:7}},{type:Dt.SMA,params:{period:23}},{type:Dt.SMA,params:{period:230}},{type:Dt.VOLUME_BY_PRICE,params:{color:Bt.getHexAlphaColor(In,"33"),negativeColor:Bt.getHexAlphaColor(cn,"33")}},{type:Dt.RSI,params:{period:14}}]},Rl={chartType:wt.AREA,period:lt.ONE_YEAR,resolution:F.ONE_DAY,indicatorList:[{type:Dt.STOCHASTIC_FAST},{type:Dt.BOLLINGER_BANDS}]},Nl={chartType:wt.LINE,period:lt.TEN_DAYS,resolution:F.TEN_MINUTES,showVolume:!0,volumeUseUpDownColors:!1,showVolumeUnderlay:!1,indicatorList:[{type:Dt.VWAP},{type:Dt.VOLUME_BY_PRICE,params:{color:Bt.getHexAlphaColor(In,"33"),negativeColor:Bt.getHexAlphaColor(cn,"33")}}]},yl={chartType:wt.CANDLESTICK,period:lt.FIVE_YEARS,resolution:F.ONE_WEEK,showVolume:!0,volumeUseUpDownColors:!1,showVolumeUnderlay:!1,indicatorList:[{type:Dt.EMA,params:{period:52}},{type:Dt.EMA,params:{period:104}},{type:Dt.EMA,params:{period:156}},{type:Dt.VOLUME_BY_PRICE,params:{color:Bt.getHexAlphaColor(In,"33"),negativeColor:Bt.getHexAlphaColor(cn,"33")}},{type:Dt.RSI,params:{period:14}}]},Ml={[V.TEN_MINUTES_VWAP]:Nl,[V.FIFTEEN_MINUTES_TA]:Ll,[V.ONE_HOUR_TA]:Dl,[V.DAILY_TA]:bl,[V.WEEKLY_TA]:yl,[V.MONTHLY_TA]:wl,[V.STOCHASTIC_BB]:Rl,[V.CANDLESTICK_VOLUME]:Ol};class ro{constructor(t){this.chartInstrumentList=t,this.setDefaultTemplate()}getDefaultTemplate(){return this.defaultTemplate}setDefaultTemplate(t=Al){this.defaultTemplate=r.InfrontUtil.deepCopy(t)}getChartTemplateByType(t){var e;const n=this.chartInstrumentList.getGlobalChartSettings();if(!n)return null;const i=this.getCombinedTemplateTypeAsObject(),s=i[r.InfrontUtil.getKeyOrValueFromEnum(i,t)];switch(s){case V.SAVE_AS_DEFAULT:return this.saveDefaultTemplate(),null;case V.RESET_DEFAULT:return this.restoreDefaultTemplate(),null}const o=s===V.DEFAULT?this.defaultTemplate:null!==(e=Ml[s])&&void 0!==e?e:n.availableCustomTemplates[s];return null!=o&&(this.setMainInstrumentSettings(o),this.setGlobalChartSettings(o)),o}setMainInstrumentSettings(t){var e,n,i;null===(e=this.chartInstrumentList.get())||void 0===e||e.forEach(l=>{const u=l.getInstrumentSettings();u.showVolume=!1,u.showVolumeUnderlay=!1});const s=this.chartInstrumentList.getMainInstrument(),o=s?.getInstrumentSettings();o&&(o.volumeUseUpDownColors=null!==(n=t.volumeUseUpDownColors)&&void 0!==n?n:o.volumeUseUpDownColors,o.volumeUnderlayUseUpDownColors=null!==(i=t.volumeUnderlayUseUpDownColors)&&void 0!==i?i:o.volumeUnderlayUseUpDownColors)}setGlobalChartSettings(t){var e;const n=this.chartInstrumentList.getGlobalChartSettings();if(!n)return null;n.currentResolution=null!==(e=t.resolution)&&void 0!==e?e:n.currentResolution,null!=t.showVolume&&(n.showVolume=!t.showVolume,this.chartInstrumentList.toggleVolume("showVolume")),null!=t.showVolumeUnderlay&&(n.showVolumeUnderlay=!t.showVolumeUnderlay,this.chartInstrumentList.toggleVolume("showVolumeUnderlay"))}restoreDefaultTemplate(){var t;this.setDefaultTemplate(),null===(t=this.chartInstrumentList.getWidgetChartStorage())||void 0===t||t.updateStorage()}saveDefaultTemplate(t=this.getChartTemplateFromCurrent()){var e;r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("Templates: saveDefaultTemplate","chartTemplate=",t),this.setDefaultTemplate(t),null===(e=this.chartInstrumentList.getWidgetChartStorage())||void 0===e||e.updateStorage()}getChartTemplateFromCurrent(){var t,e;const n=this.chartInstrumentList.getGlobalChartSettings(),i=this.chartInstrumentList.getMainInstrument(),s=i?.getInstrumentSettings();return n&&s?{chartType:n.chartType,period:n.currentPeriod,resolution:n.currentResolution,showVolume:n.showVolume,volumeUseUpDownColors:s.volumeUseUpDownColors,showVolumeUnderlay:n.showVolumeUnderlay,volumeUnderlayUseUpDownColors:s.volumeUnderlayUseUpDownColors,indicatorList:r.InfrontUtil.deepCopy(null!==(e=null===(t=this.chartInstrumentList.getChartIndicators())||void 0===t?void 0:t.getAllIndicatorList())&&void 0!==e?e:[])}:null}createAvailableTemplates(t,e){if(!t)return;const n=this.chartInstrumentList.getLanguageHandler();t.clear(),Di.createItems(e,t,this.getCombinedTemplateTypeAsObject(),n,ht.kLanguageKeyTemplate,()=>{})}getCombinedTemplateTypeAsObject(){var t;const e=this.chartInstrumentList.getGlobalChartSettings(),n={};return Object.keys(null!==(t=e?.availableCustomTemplates)&&void 0!==t?t:{}
1).forEach(i=>{n[i]=i}),Object.assign(Object.assign({},V),n)}}class Pl{constructor(t){this.chartInstrumentList=t}getTradeStreamingCallback(){return(t,e)=>{const n=Object.assign(Object.assign({},e),{accItemOpen:null,accItemHigh:null,accItemLow:null,accItemVolume:null,accItemTurnover:null});this.getStreamingCallback()(t,n)}}getTimeSeriesStreamingCallback(){return(t,e)=>{var n,i,s,o,l,u,d,g,I,C,S,N,k,x;if(!r.InfrontUtil.isDate(null===(n=e.latestTrade)||void 0===n?void 0:n.dateTime))return;const Y={dateTime:new Date(null===(i=e.latestTrade)||void 0===i?void 0:i.dateTime),price:null!==(o=null===(s=e.latestTrade)||void 0===s?void 0:s.last)&&void 0!==o?o:e.last,bid:null!==(u=null===(l=e.latestTrade)||void 0===l?void 0:l.bid)&&void 0!==u?u:e.bid,ask:null!==(g=null===(d=e.latestTrade)||void 0===d?void 0:d.ask)&&void 0!==g?g:e.ask,mid:null!==(C=null===(I=e.latestTrade)||void 0===I?void 0:I.mid)&&void 0!==C?C:e.mid,volume:null!==(N=null===(S=e.latestTrade)||void 0===S?void 0:S.volume)&&void 0!==N?N:0,turnover:null!==(x=null===(k=e.latestTrade)||void 0===k?void 0:k.turnover)&&void 0!==x?x:0,accItemOpen:e.open,accItemHigh:e.high,accItemLow:e.low,accItemVolume:e.volume,accItemTurnover:e.turnover};this.getStreamingCallback()(t,Y)}}getStreamingCallback(){return(t,e)=>{var n,i,s;r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("Vendor/HighchartsStream (getStreamCallback):","chartInstrument=",t,"chartDataStatus=",t?.getChartDataStatus(),"trade=",e);const o=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getGlobalChartSettings();if(!o||!t||!e||o.areaStacking||t.getChartDataStatus()!==sn.AFTER_CREATE_CHART)return;const l=t.getChartDataType();if(!this.isValidStreamingChartDataType(l))return;const u=this.chartInstrumentList.getChart(),d=u?.get(t.getId());if(!d)return;const g=null===(i=d?.options)||void 0===i?void 0:i.data,I=g?.length?g[g.length-1][0]:null,C=(null===(s=e.dateTime)||void 0===s?void 0:s.getTime())||-1;if(C<(I||0))return;if(!I||fe.isIntradayPeriod(o.currentPeriod))return void this.addPoints(t,l,e);const S=this.isPushTimeSameDayAsLastTime(t,C,I);this.addPoints(t,l,e,S)}}isValidStreamingChartDataType(t){return[Xt.OHLC,Xt.LAST,Xt.BID,Xt.ASK,Xt.MID].includes(t)}getPushFieldFromChartDataType(t){return t===Xt.OHLC||t===Xt.LAST?"price":t===Xt.BID?"bid":t===Xt.ASK?"ask":t===Xt.MID?"mid":void 0}isPushTimeSameDayAsLastTime(t,e,n){if(!e||!n)return!1;const i=t.getMetaData(),[s,o]=this.getExchangeOpenCloseTimeList(i?.startTime,i?.endTime);return s<=n&&n<=o&&s<=e&&e<=o}addPoint(t,e,n=!1){var i,s;if(!e?.length)return;const o=null===(s=null===(i=t?.options)||void 0===i?void 0:i.data)||void 0===s?void 0:s.length;n&&o&&(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("Vendor/HighchartsStream (addPoint, removeBeforeAdd):","series=",t,"dataLength=",o),t?.removePoint(o-1,!1)),r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("Vendor/HighchartsStream (addPoint):","series=",t,"dataLength=",o,"point=",e),t?.addPoint(e,!1),re.isSeriesVisible(t)&&(t.xAxis.isDirty=!0)}addPointToCache(t,e,n,i=!1){var s;if(!n?.length)return;const o=this.chartInstrumentList.getGlobalChartSettings(),l=this.chartInstrumentList.getChartCache();if(!(o.caching&&t&&l&&e))return;const u=l.getCacheDataByInstrument(t,e);if(null==u||!Array.isArray(u.data))return;const d=null===(s=t.getChartData())||void 0===s?void 0:s.getChartData(e);if(u.data===d||u.data[0]&&u.data[0].length!==n.length)return;const g=u.data.length;i&&g&&(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("Vendor/HighchartsStream (addPointToCache, removeBeforeAdd):","chartInstrument=",t,"chartDataType=",e,"cacheDataLength=",g),u.data.pop()),r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("Vendor/HighchartsStream (addPointToCache):","chartInstrument=",t,"chartDataType=",e,"cacheDataLength=",g,"point=",n),u.data.push(n),u.snapTime=(new Date).getTime()}addPoints(t,e,n,i=!1){var s,o,l,u;const d=this.chartInstrumentList.getGlobalChartSettings(),g=null===(s=this.chartInstrumentList)||void 0===s?void 0:s.getChart(),I=null===(o=this.chartInstrumentList)||void 0===o?void 0:o.getChartCrossrates(),C=null===(l=n.dateTime)||void 0===l?void 0:l.getTime();if(!d||!r.InfrontUtil.isNumber(C))return;const S=g?.get(ht.kXAxisId),N=S?.getExtremes();let k=!0;
1if(null!=N&&(k=rr.getTimeWithResolution(this.chartInstrumentList,S?.dataMax||(new Date).getTime())<=N.max),["","TURNOVER","VOLUME"].forEach(x=>{var Y,et;const rt=I?.getCrossrateValue(t);if(null==rt)return;const it=(x?.length?Qt[x]:"")+t.getId(),gt=g?.get(it);let mt;if(""===x)mt=this.getPushPoint(t,gt,d.areaStacking&&e===Xt.OHLC?Xt.LAST:e,n,rt);else if("TURNOVER"===x){const Ct=(d.isIntraday?n.turnover:null!==(Y=n.accItemTurnover)&&void 0!==Y?Y:t.getSymbolData(r.InfrontSDK.SymbolField.Turnover))*rt;r.InfrontUtil.isNumber(Ct)&&(mt=[C,Ct])}else{if("VOLUME"!==x)return;{const Ct=d.isIntraday?n.volume:null!==(et=n.accItemVolume)&&void 0!==et?et:t.getSymbolData(r.InfrontSDK.SymbolField.AccumulatedVolume);r.InfrontUtil.isNumber(Ct)&&(mt=[C,Ct])}}if(mt?.length)if(null!=gt&&this.addPoint(gt,mt,i),this.addPointToCache(t,this.getChartDataTypeFromSeriesType(x,e),mt,i),""===x){const Ct=g.get(Qt.GHOST+t.getId());Ct?.update({},!1)}else{const Ct=g?.get(Qt[x+"_UNDERLAY"]+t.getId());null==gt?this.addPoint(Ct,mt,i):0===Ct?.dataMin&&0===Ct?.dataMax&&0===mt[1]||null==Ct||Ct.update({},!1);const Tt=g.get(Qt["GHOST_"+x]+t.getId());null==gt&&null==Ct?this.addPoint(Tt,mt,i):Tt?.update({},!1)}}),null!=N){const x=rr.getTimeWithResolution(this.chartInstrumentList,C);x>N.max&&k?S?.setExtremes(N.min,x,!1,!1,{trigger:"streamingUpdate"}):this.hideAllPushMarkers()}null===(u=this.chartInstrumentList.getChartWrapper())||void 0===u||u.requestRedrawChart(),k&&this.blinkAllPushMarkers()}getPushPoint(t,e,n,i,s){var o;const l=this.getPushFieldFromChartDataType(n);if(!l||!e)return;const u=null===(o=i.dateTime)||void 0===o?void 0:o.getTime(),d=null!=i[l]?i[l]*s:i[l];return r.InfrontUtil.isNumber(u)&&r.InfrontUtil.isNumber(d)?n===Xt.OHLC?null!=i.accItemOpen&&null!=i.accItemHigh&&null!=i.accItemLow?[u,i.accItemOpen*s,i.accItemHigh*s,i.accItemLow*s,d]:this.getSelfCalculatedOhlcDataFromSeriesData(t,e,u,d):[u,d]:void 0}getSelfCalculatedOhlcDataFromSeriesData(t,e,n,i){var s;const o=null===(s=e?.options)||void 0===s?void 0:s.data,l=o?.length?o[o.length-1]:null;if(this.isPushTimeSameDayAsLastTime(t,n,l?l[0]:null)){const d=l?.[1];let g=l?.[2];null==g&&(g=d??i);let I=l?.[3];return null==I&&(I=d??i),[n,d??i,Math.max(g,i),Math.min(I,i),i]}return[n,i,i,i,i]}getChartDataTypeFromSeriesType(t,e){return"TURNOVER"===t?Xt.TURNOVER:"VOLUME"===t?Xt.VOLUME:e}getBlinkColor(t){var e;const n=null===(e=t?.options)||void 0===e?void 0:e.data,i=(n?.length||0)>1?n[n.length-2]:null,s=n?.length?n[n.length-1]:null;if(!i?.length||!s?.length)return xi;const o=i[i.length-1],l=s[s.length-1];return l===o?xi:l>o?In:cn}getExchangeOpenCloseTimeList(t,e){var n,i;const s=null===(n=t?.split(":"))||void 0===n?void 0:n.map(Number),o=null===(i=e?.split(":"))||void 0===i?void 0:i.map(Number);if(s.every(l=>Number.isInteger(l))&&o.every(l=>Number.isInteger(l))){const l=new Date;l.setHours(+s[0],+s[1],0,0);const u=new Date;return u.setHours(+o[0],+o[1],0,0),l.valueOf()>u.valueOf()&&l.setDate(l.getDate()-1),[l.getTime(),u.getTime()]}return[]}blinkAllPushMarkers(){var t,e;const n=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getChart();n&&(null===(e=this.chartInstrumentList.getSearchInstrumentList())||void 0===e||e.forEach(i=>{const s=n.get(i.getId());this.blinkPushMarker(s)}))}blinkPushMarker(t){var e,n,i,s,o,l,u;if(!t)return;const d=null===(n=null===(e=t?.options)||void 0===e?void 0:e.infront)||void 0===n?void 0:n.pushMarkerGraphic,g=this.getBlinkColor(t),I=null===(i=t.points)||void 0===i?void 0:i[t.points.length-1],C=null!==(s=this.getPlotRightValue(t))&&void 0!==s?s:I?.plotX,S=I?.plotY;d&&I&&r.InfrontUtil.isNumber(C)&&r.InfrontUtil.isNumber(S)&&(d.attr({fill:g,r:6,x:C,y:S}).show(),!0===(null===(u=null===(l=null===(o=t.chart)||void 0===o?void 0:o.options)||void 0===l?void 0:l.chart)||void 0===u?void 0:u.animation)?d.animate({r:2},{duration:400}):(d.animateTimer&&clearTimeout(d.animateTimer),d.animateTimer=setTimeout(()=>{d?.attr({r:2})},400)))}getPlotRightValue(t){var e;return null===(e=t?.chart)||void 0===e?void 0:e.plotWidth}addAllPushMarkers(){var t,e;const n=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getChart();n&&(null===(e=this.chartInstrumentList.get())||void 0===e||e.forEach(i=>
1{var s;const o=n.get(i.getId()),l=null===(s=o?.options)||void 0===s?void 0:s.infront;l&&null==l.pushMarkerGraphic&&(l.pushMarkerGraphic=n.renderer.circle(0,0,4).attr({class:"pushMarker",zIndex:3}).hide().add(o.markerGroup))}))}hideAllPushMarkers(){var t,e,n;null!==(t=this.chartInstrumentList)&&void 0!==t&&t.getChart()&&(null===(n=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.get())||void 0===n||n.forEach(i=>{this.hidePushMarker(i)}))}hidePushMarker(t){var e,n,i;const s=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getChart();if(!s)return;const o=s.get(t.getId()),l=null===(n=o?.options)||void 0===n?void 0:n.infront;null===(i=l?.pushMarkerGraphic)||void 0===i||i.hide()}stopStreaming(){var t,e;this.hideAllPushMarkers(),null===(e=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.get())||void 0===e||e.forEach(n=>{const i=n.getTimeSeries();i?.unbindStreaming()})}}class ao{constructor(t,e,n){this.chartInstrumentList=[],this.chartInstrumentIndex=-1,this.widget={},this.languageHandler=t,this.globalChartSettings={},this.chartWrapper=new fl(this),this.chartWrapper.init(e,n),this.chartOptions=new Cl(this),this.chartLabels=new Tl(this),this.chartLegend=new Vo(this),this.chartWatermark=new Sl(this),this.chartLogo=new _l(this),this.chartAnnotations=new Gi(this),this.chartIndicators=new io(this),this.chartTemplates=new ro(this),this.chartStreaming=new Pl(this),this.chartCrossrates=new Ws(this),this.chartCache=new xs(this),this.chartSearch=new Fs(this),this.chartDecimals=new hs(this),this.chartNavigator=new ka(this)}init(t,e){return this.clearInstrumentList(),t?.forEach(n=>{this.addInstrument(n)}),this.chartIndicators.init(e),this.chartInstrumentList}getNextChartInstrumentIndex(){return this.chartInstrumentIndex++,this.chartInstrumentIndex}addInstrument(t,e=!0){var n;if(e||!this.hasInstrument(t)){const i=new ga(t,this.getNextChartInstrumentIndex(),this.globalChartSettings);this.chartInstrumentList.push(i),i.isMainInstrument&&this.handleMainDataTypeSpecial(i,null===(n=this.globalChartSettings)||void 0===n?void 0:n.mainDataType,!0)}}replace(t,e,n=!1){var i;this.chartInstrumentList.length?null===(i=this.chartInstrumentList[t])||void 0===i||i.replace(e,n):0===t&&this.addInstrument(e)}hasInstrument(t){return this.chartInstrumentList.some(e=>{const n=e.getInstrument();return null!=n?.ticker&&null!=n?.feed&&n.ticker===t?.ticker&&n.feed===t?.feed})}clearInstrumentList(){this.chartInstrumentList.length=0,this.chartInstrumentIndex=-1}get(){return this.chartInstrumentList}getSearchInstrumentList(){var t;return null===(t=this.chartInstrumentList)||void 0===t?void 0:t.filter(e=>e.isSearchInstrument())}getCustomInstrumentList(){var t;return null===(t=this.chartInstrumentList)||void 0===t?void 0:t.filter(e=>e.isCustomInstrument())}getLength(){var t;return(null===(t=this.chartInstrumentList)||void 0===t?void 0:t.length)||0}getAllIndicatorListLength(){var t,e;return(null===(e=null===(t=this.chartIndicators)||void 0===t?void 0:t.getAllIndicatorList())||void 0===e?void 0:e.length)||0}getIndicatorListLength(){var t,e;return(null===(e=null===(t=this.chartIndicators)||void 0===t?void 0:t.getIndicatorList())||void 0===e?void 0:e.length)||0}getOscillatorList(){var t;return null===(t=this.chartIndicators)||void 0===t?void 0:t.getOscillatorList()}getOscillatorListLength(){var t,e;return(null===(e=null===(t=this.chartIndicators)||void 0===t?void 0:t.getOscillatorList())||void 0===e?void 0:e.length)||0}getVolumeUnderlayList(){const t=[];return this.chartInstrumentList.forEach(e=>{const n=e.getInstrumentSettings(),i=re.getVolumeSeriesId(n,null,!0);n.showVolumeUnderlay&&t.push({id:i,type:"volumeUnderlay",linkedTo:e.getId()})}),t}getVolumeUnderlayListLength(){var t;return(null===(t=this.getVolumeUnderlayList())||void 0===t?void 0:t.length)||0}getMainInstrument(){var t;return null===(t=this.chartInstrumentList)||void 0===t?void 0:t[0]}getChartInstrumentByInstrument(t,e=!1){return this.chartInstrumentList.find(n=>{var i,s;return!(!e&&n.isMainInstrument||(null===(i=n.getInstrument())||void 0===i?void 0:i.ticker)!==t?.ticker||(null===(s=n.getInstrument())||void 0===s?void 0:s.feed)!==t?.feed)})}getChartInstrumentByIndex(t){var e;return null===(e=this.chartInstrumentList)||void 0===e?void 0:e[t]}getChartInstrumentById(t){return this.chartInstrumentList.find(e=>e?.getId()===t)}getChartInstrumentIndexById(t){return this.chartInstrumentList.findIndex(e=>e?.getId()===t)}removeByIndex(t){var e;const n=null===(e=this.chartInstrumentList)||void 0===e?void 0:e[t];n&&!n.isMainInstrument&&(re.removeLinkedSeries(this,n.getId()),n.destroy(),this.chartInstrumentList.splice(t,1)
1)}removeById(t){var e;const n=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.findIndex(i=>i?.getId()===t);this.removeByIndex(n)}removeByInstrument(t){const e=this.getInstrumentIndex(t);e>=0&&this.removeByIndex(e)}toggleInstrument(t){const e=this.getInstrumentIndex(t);e>=0?this.removeByIndex(e):this.addInstrument(t)}getInstrumentIndex(t){return this.chartInstrumentList.findIndex(e=>{var n;return(null===(n=e.getInstrument())||void 0===n?void 0:n.ticker)===t.ticker})}toggleVolume(t){var e,n;if(this.globalChartSettings[t]){const i="showVolume"===t?re.isVolumeSeries:re.isVolumeUnderlaySeries,s=null===(n=null===(e=this.getChart())||void 0===e?void 0:e.series)||void 0===n?void 0:n.filter(o=>{var l;return i(null===(l=o.options)||void 0===l?void 0:l.id)}).map(o=>o.options.id);s?.forEach(o=>re.removeLinkedSeries(this,o))}this.globalChartSettings[t]=!this.globalChartSettings[t],this.setMainInstrumentShowVolume(t,this.globalChartSettings[t])}getInstrumentNameIdList(){const t=[];return this.chartInstrumentList.forEach(e=>{const n=e.getInstrumentName(),i=e.getId();null!=n&&null!=i&&t.push([n,i])}),t}getVolumeNameIdList(){return re.getHighchartsSeriesVolumeNameIdList(this)}getGlobalChartSettings(){return this.globalChartSettings}setMainChartType(t){var e;this.globalChartSettings.chartType=t,null===(e=this.getMainInstrument())||void 0===e||e.setChartType(t)}setMainInstrumentShowVolume(t,e){var n;const i=null===(n=this.getMainInstrument())||void 0===n?void 0:n.getInstrumentSettings();i&&(i[t]=e)}getChartWrapper(){return this.chartWrapper}getChart(){var t;return null===(t=this.chartWrapper)||void 0===t?void 0:t.getChart()}getTopToolbarElement(){var t;return null===(t=this.chartWrapper)||void 0===t?void 0:t.getTopToolbarElement()}getBottomToolbarElement(){var t;return null===(t=this.chartWrapper)||void 0===t?void 0:t.getBottomToolbarElement()}getChartOptions(){return this.chartOptions}getChartAnnotations(){return this.chartAnnotations}getChartIndicators(){return this.chartIndicators}getChartTemplates(){return this.chartTemplates}getChartLabels(){return this.chartLabels}refreshChartLabels(){var t;null===(t=this.chartLabels)||void 0===t||t.refreshLabels()}getChartLegend(){return this.chartLegend}getChartWatermark(){return this.chartWatermark}getChartLogo(){return this.chartLogo}getChartStreaming(){return this.chartStreaming}getChartCrossrates(){return this.chartCrossrates}getChartCache(){return this.chartCache}getChartSearch(){return this.chartSearch}getChartDecimals(){return this.chartDecimals}getChartNavigator(){return this.chartNavigator}getLanguageHandler(){return this.languageHandler}getMainBackgroundColor(){return this.globalChartSettings.mainBackgroundColor}getSeriesColor(t,e){var n;void 0===e&&(e=null===(n=t?.options)||void 0===n?void 0:n.id);const i=this.getChartInstrumentById(e);return i?.getColor()||t.color}getGlobalParams(){const t={};return ae.forEach(e=>{t[e]=this.globalChartSettings[e]}),t}setGlobalChartSettings(t){if(!t)return;let e=!1;Object.keys(t).forEach(n=>{if(this.globalChartSettings[n]!==t[n])switch(e=e||oe.includes(n)&&(!Array.isArray(t[n])&&this.globalChartSettings[n]!==t[n]||Array.isArray(t[n])&&!r.InfrontUtil.arraysAreEqual(this.globalChartSettings[n],t[n])),this.globalChartSettings[n]=t[n],n){case"adjustSplits":case"adjustDividends":this.getSearchInstrumentList().forEach(i=>{i.setInstrumentSettings({[n]:!!t[n]})});break;case"showSplits":case"showDividends":case"showCalendar":this.chartInstrumentList.forEach(i=>{i.setInstrumentSettings({[n]:!!t[n]})});break;case"showNavigator":this.chartOptions.setShowNavigator(t[n]);break;case"showTooltip":this.chartOptions.setShowTooltip(t[n]);break;case"showLegend":case"showOppositeOrdinate":case"ordinateLabelsOutside":this.chartOptions.setLegendOptions();break;case"showSeriesLabels":case"cursorEventsEnabled":this.chartLabels.addSeriesLabelEvent();break;case"targetCurrency":if(!Zt[t[n]]||t[n]===Zt[Zt.MULTIPLE])return;this.getSearchInstrumentList().forEach(i=>{i.setTargetCurrency(t[n])})}}),e&&(this.globalChartSettings.needDataReload=e)}setCursorEventsEnabled(t){var e,n;this.globalChartSettings.cursorEventsEnabled=t,this.chartOptions.setCursor(),null===(e=this.getWidgetChartStorage())||void 0===e||e.updateStorage(),null===(n=this.getChartLabels())||void 0===n||n.addSeriesLabelEvent()}setNavigatorScrollFactor(t){var e;"number"==typeof t||isNaN(t)||(t=+t),this.globalChartSettings.navigatorScrollFactor!==t&&(t>1?t=1:t<0&&(t=0),this.globalChartSettings.navigatorScrollFactor=t,this.chartNavigator.setMouseWheelScrollEvent(this.getChart()),null===(e=this.getWidgetChartStorage())||void 0===e||e.updateStorage())}
1getInstrumentParamsById(t){var e;return(null===(e=this.getChartInstrumentById(t))||void 0===e?void 0:e.getInstrumentParams())||{}}setAllAdjustDividends(t){var e;this.globalChartSettings.adjustDividends=!!t,null!==(e=this.chartInstrumentList)&&void 0!==e&&e.length&&this.chartInstrumentList.forEach(n=>{n.setInstrumentSettings({adjustDividends:!!t})})}setAllAdjustSplits(t){var e;this.globalChartSettings.adjustSplits=!!t,null!==(e=this.chartInstrumentList)&&void 0!==e&&e.length&&this.chartInstrumentList.forEach(n=>{n.setInstrumentSettings({adjustSplits:!!t})})}isValidDataType(t){var e;return Gt&&(null===(e=Object.values(Gt))||void 0===e?void 0:e.includes(t))}handleMainDataTypeSpecial(t,e,n=!1){t&&this.isValidDataType(e)&&(e===Gt.BID_ASK?ys.cloneChartInstrument(this,t):e===Gt.PERFORMANCE?Ms.cloneChartInstrument(this,t):n&&t?.setDataType(e))}hasAnyData(){let t=!1;for(const e of this.chartInstrumentList){const n=e.getChartDataType();if(n&&e.hasData(n)){t=!0;break}}return t}setAllChartDataStatus(t){this.chartInstrumentList.forEach(e=>{e.setChartDataStatus(t)})}setWidgetPeriods(t){this.widget.periods=t}getWidgetPeriods(){return this.widget.periods}setWidgetOpenInstrumentSettings(t){this.widget.openInstrumentSettings=t}getWidgetOpenInstrumentSettings(){return this.widget.openInstrumentSettings}setWidgetOpenIndicatorSettings(t){this.widget.openIndicatorSettings=t}getWidgetOpenIndicatorSettings(){return this.widget.openIndicatorSettings}setWidgetOpenAnnotationSettings(t){this.widget.openAnnotationSettings=t}getWidgetOpenAnnotationSettings(){return this.widget.openAnnotationSettings}setWidgetChartStorage(t){this.widget.chartStorage=t}getWidgetChartStorage(){return this.widget.chartStorage}getWidgetInstrumentHeader(){return this.widget.instrumentHeader}setWidgetInstrumentHeader(t){this.widget.instrumentHeader=t}destroy(){this.chartNavigator.destroy()}}class so{constructor(t,e){this.restoreCache={},this.storeCache={},this.allowStorageUpdate=!1,this.chartWidget=t,this.chartInstrumentList=e}getAllowStorageUpdate(){return this.allowStorageUpdate}setAllowStorageUpdate(t){var e,n,i,s;if(!this.allowStorageUpdate&&t){const o=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getChart(),l=r.InfrontUtil.deepCopy(null===(i=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getChartAnnotations())||void 0===i?void 0:i.getAnnotationList());l?.forEach(u=>{r.InfrontUtil.isFunction(o?.addAnnotation)&&o.addAnnotation(u,!1)}),null===(s=this.chartInstrumentList.getChartWrapper())||void 0===s||s.requestRedrawChart(!0),this.allowStorageUpdate=t}}getSaveGlobalSettings(){const t={};return this.store(this.chartInstrumentList.getGlobalChartSettings(),t,ge),t}restoreGlobalSettings(t){r.InfrontUtil.isEmptyObject(t)||this.restore(t,this.chartInstrumentList.getGlobalChartSettings(),"globalChartSettings")}getSaveInstrumentSettings(){var t;const e=[];return null===(t=this.chartInstrumentList.get())||void 0===t||t.forEach(n=>{const i={};this.store(n.getInstrumentSettings(),i),e.push(i)}),e}restoreInstrumentSettings(t){var e,n;if(!t?.length)return;const i=t.map(o=>o.instrument),s=r.InfrontUtil.deepCopy(null===(e=this.chartInstrumentList.getChartIndicators())||void 0===e?void 0:e.getAllIndicatorList());this.chartInstrumentList.init(i,s),null===(n=this.chartInstrumentList.get())||void 0===n||n.forEach((o,l)=>{this.restore(t[l],o.getInstrumentSettings(),"instrumentSettings")})}getSaveIndicatorSettings(){var t,e;return r.InfrontUtil.deepCopy({indicatorList:null===(t=this.chartInstrumentList.getChartIndicators())||void 0===t?void 0:t.getAllIndicatorList(),indicatorListVisible:null===(e=this.chartInstrumentList.getChartIndicators())||void 0===e?void 0:e.getIndicatorListVisible()})}restoreIndicatorSettings(t){var e,n;r.InfrontUtil.isEmptyObject(t)||(null===(e=this.chartInstrumentList.getChartIndicators())||void 0===e||e.init(t.indicatorList),null===(n=this.chartInstrumentList.getChartIndicators())||void 0===n||n.setIndicatorListVisible(t.indicatorListVisible))}getSaveAnnotationsSettings(){var t,e;return{annotationList:r.InfrontUtil.deepCopy(null===(t=this.chartInstrumentList.getChartAnnotations())||void 0===t?void 0:t.getAnnotationList()),annotationListVisible:!(null===(e=this.chartInstrumentList.getChartAnnotations())||void 0===e||!e.getAnotationsListVisible())}}restoreAnnotationsSettings(t){var e,n;r.InfrontUtil.isEmptyObject(t)||(null===(e=this.chartInstrumentList.getChartAnnotations())||void 0===e||e.init(t.annotationList),null===(n=this.chartInstrumentList.getChartAnnotations())||void 0===n||n.setAnnotationListVisible(t.annotationListVisible))}getSaveTemplateSettings(){var t;return r.InfrontUtil.deepCopy({defaultTemplate:null===(t=this.chartInstrumentList.getChartTemplates())||void 0===t?void 0:t.getDefaultTemplate()})}restoreTemplateSettings(t){var e;null===(e=this.chartInstrumentList.getChartTemplates())||void 0===e||e.setDefaultTemplate(t?.defaultTemplate)}updateStorage(t=!1){this.allowStorageUpdate&&(this.updateStorageTimeout&&clearTimeout(this.updateStorageTimeout),t?this.saveSettingsToStorage():this.updateStorageTimeout=setTimeout(()=>{this.saveSettingsToStorage()},700))}saveSettingsToStorage(){const t=this.getSaveGlobalSettings(),e=this.getSaveInstrumentSettings(),n=this.getSaveIndicatorSettings(),i=this.getSaveAnnotationsSettings(),s=this.getSaveTemplateSettings();r.InfrontUtil.isEmptyObject(t)||this.chartWidget._store("globalChartSettings",t),e?.length&&this.chartWidget._store("instrumentSettings",e),r.InfrontUtil.isEmptyObject(n)||this.chartWidget._store("indicatorSettings",n),r.InfrontUtil.isEmptyObject(i)||this.chartWidget._store("annotationsSettings",i),r.InfrontUtil.isEmptyObject(s)||this.chartWidget._store("templateSettings",s)}restoreSettingsFromStorage(){const t=this.chartWidget._getStoredValue("globalChartSettings"),e=this.chartWidget._getStoredValue("instrumentSettings"),n=this.chartWidget._getStoredValue("indicatorSettings"),i=this.chartWidget._getStoredValue("annotationsSettings"),s=this.chartWidget._getStoredValue("templateSettings");t?.currentPeriod===qt.ONE_DAY&&t?.isOneDayUntouched&&delete t.currentEndDate,this.restoreGlobalSettings(t),this.restoreIndicatorSettings(n),this.restoreInstrumentSettings(e),this.restoreAnnotationsSettings(i),this.restoreTemplateSettings(s)}store(t,e,n){var i;
1null===(i=Object.keys(t))||void 0===i||i.forEach(s=>{n?.includes(s)||(e[s]=this.getEvalProperty(t[s]))})}getEvalProperty(t){switch(!0){case t instanceof r.InfrontUtil.Observable:case t instanceof r.InfrontUtil.ObservableArray:return this.getEvalProperty(t.get());case t instanceof Date:return t.getTime();case Array.isArray(t):return t.map(e=>this.getEvalProperty(e));case"object"==typeof t:return r.InfrontUtil.deepCopy(t);case r.InfrontUtil.isPrimitive(t):return t;default:return}}restore(t,e,n){var i,s;!(null===(i=this.restoreCache)||void 0===i)&&i[n]||(this.restoreCache[n]={}),null===(s=Object.keys(t))||void 0===s||s.forEach(o=>{var l;if(null!==(l=this.restoreCache[n])&&void 0!==l&&l[o])this.restoreCache[n][o](e,t,o);else{switch(!0){case e[o]instanceof r.InfrontUtil.Observable:case e[o]instanceof r.InfrontUtil.ObservableArray:"object"==typeof e[o].get()?this.restoreCache[n][o]=e[o].get()instanceof Date?(u,d,g)=>{u[g].get().setTime(d[g])}:(u,d,g)=>{u[g].set(r.InfrontUtil.deepCopy(d[g]))}:r.InfrontUtil.isPrimitive(e[o].get())&&(this.restoreCache[n][o]=(u,d,g)=>{u[g].set(d[g])});break;case e[o]instanceof Date:this.restoreCache[n][o]=(u,d,g)=>{u[g].setTime(d[g])};break;case"object"==typeof e[o]:this.restoreCache[n][o]=(u,d,g)=>{u[g]=r.InfrontUtil.deepCopy(d[g])};break;case r.InfrontUtil.isPrimitive(e[o]):default:this.restoreCache[n][o]=(u,d,g)=>{u[g]=d[g]}}this.restoreCache[n][o](e,t,o)}})}}class xl{constructor(t){this.sdk=t,this.unsubscribeList=[]}onUpdate(){}getTimeSeriesData(t,e){r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartSource SDK: getTimeSeriesData","options=",t);const n=this.sdk.get(r.InfrontSDK.timeSeries(Object.assign(Object.assign({},t),{onData:i=>{e(i)},onError:i=>{r.InfrontUtil.errorLog("ChartSource SDK: getTimeSeriesData",i)}})));this.unsubscribeList.push(n)}getTradesData(t,e){const n=this.sdk.get(r.InfrontSDK.trades(Object.assign(Object.assign({},t),{onData:i=>{e(i)},onError:i=>{r.InfrontUtil.errorLog("ChartSource SDK: getTradesData",i)}})));this.unsubscribeList.push(n)}getFeedInfoData(t,e){const n=this.sdk.get(r.InfrontSDK.feedInfo(Object.assign(Object.assign({},t),{onData:i=>{e(i)},onError:i=>{r.InfrontUtil.errorLog("ChartSource SDK: getFeedInfoData",i)}})));this.unsubscribeList.push(n)}getFeedListData(t,e){const n=this.sdk.get(r.InfrontSDK.feedList(Object.assign(Object.assign({},t),{onData:i=>{e(i)},onError:i=>{r.InfrontUtil.errorLog("ChartSource SDK: getFeedListData",i)}})));this.unsubscribeList.push(n)}getSymbolData(t,e){const n=this.sdk.get(r.InfrontSDK.symbolData(Object.assign(Object.assign({},t),{onData:i=>{e(i)},onError:i=>{r.InfrontUtil.errorLog("ChartSource SDK: getSymbolData",i)}})));this.unsubscribeList.push(n)}getCompanyHistoryData(t,e){const n=this.sdk.get(r.InfrontSDK.history(Object.assign(Object.assign({},t),{onData:i=>{e(i)},onError:i=>{r.InfrontUtil.errorLog("ChartSource SDK: getCompanyHistoryData",i)}})));this.unsubscribeList.push(n)}getCalendarEventData(t,e){const n=this.sdk.get(r.InfrontSDK.financialCalendar(Object.assign(Object.assign({},t),{onData:i=>{e(i)},onError:i=>{r.InfrontUtil.errorLog("ChartSource SDK: getCalendarEventData",i)}})));this.unsubscribeList.push(n)}destroy(){null!=this.unsubscribeList&&(this.unsubscribeList.forEach(t=>{t&&t(),t=null}),this.unsubscribeList.length=0)}}const Ha="Unknown",Ga={absChange:a=>r.InfrontUtil.formatNumber(a,2),pctChange:a=>r.InfrontUtil.formatPercent(a)},Ul={};let oo=(()=>{class a{constructor(e,n,i,s,o){var l,u,d;this.updateChangeThrottled=r.InfrontUtil.throttle(this._updateChange),this.container=e,this.chartInstrumentList=n,this.infrontUI=s,this.languageHandler=o,this.init(null===(l=i.instrumentHeader)||void 0===l?void 0:l.symbolBaseType),!(null===(u=i?.instrumentHeader)||void 0===u)&&u.chartFields&&this.initChartFieldList(i?.instrumentHeaderChartFields),!(null===(d=i?.instrumentHeader)||void 0===d)&&d.quoteFields&&this.initQuoteFieldList(i?.instrumentHeaderQuoteFields),this.instrumentHeaderElements=this.buildInstrumentHeaderUI()}init(e){var n,i;this.mainInstrument=new r.InfrontUtil.Observable,this.symbolBaseType=e,this.symbolBaseType===Ii.CLASSIFICATION?(this.symbolBase={topBase:new r.InfrontUtil.Observable},this.updateSymbolBase=this.updateSymbolClassification):(this.symbolBase={topBase:new r.InfrontUtil.Observable,subBase:new r.InfrontUtil.Observable},this.updateSymbolBase=this.updateSymbolType),this.hasFieldsSeparator=new r.InfrontUtil.Observable(!1),this.chartFieldBindings=[],this.chartFields={currentPeriod:new r.InfrontUtil.Observable,currentStartDate:new r.InfrontUtil.Observable,currentEndDate:new r.InfrontUtil.Observable,lastValidDate:new r.InfrontUtil.Observable,lastValidTime:new r.InfrontUtil.Observable,absChange:new r.InfrontUtil.Observable,pctChange:new r.InfrontUtil.Observable};const s=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getGlobalChartSettings();null===(i=s?.callbackChartFields)||void 0===i||i.call(s,this.chartFields)}initChartFieldList(e){this.chartFieldList={},r.InfrontUtil.isEmptyObject(e)||(this.chartFieldList=e)}initQuoteFieldList(e){this.quoteFieldList={},r.InfrontUtil.isEmptyObject(e)||(this.quoteFieldList=e)}buildInstrumentHeaderUI(){return function(e){var n=document.createElement("div");
1e.appendChild(n),n.className="cell-w-chart-nextgen__toolbar__instrument_header__chart-fields cell-flex-column cell-flex-shrink";var i=document.createElement("div");return e.appendChild(i),i.className="cell-w-chart-nextgen__toolbar__instrument_header__quote-fields cell-flex-column cell-flex-shrink",{chartFieldsContainer:n,quoteFieldsContainer:i}}(this.container)}update(){var e,n;this.mainInstrument.set(null===(n=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getMainInstrument())||void 0===n?void 0:n.getInstrument()),this.updateSymbolBase()}updateSymbolClassification(){var e,n,i;null===(e=this.symbolBase.topBase)||void 0===e||e.set(null===(i=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getMainInstrument())||void 0===i?void 0:i.getSymbolData(r.InfrontSDK.SymbolField.SymbolClassification))}updateSymbolType(){var e,n,i,s,o,l;null===(e=this.symbolBase.topBase)||void 0===e||e.set(null===(i=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getMainInstrument())||void 0===i?void 0:i.getSymbolData(r.InfrontSDK.SymbolField.SymbolType)),null===(s=this.symbolBase.subBase)||void 0===s||s.set(null===(l=null===(o=this.chartInstrumentList)||void 0===o?void 0:o.getMainInstrument())||void 0===l?void 0:l.getSymbolData(r.InfrontSDK.SymbolField.SymbolSubType))}onUpdate(){this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{var e,n;this.destroyChartFields(),this.createFields(this.chartFieldList,this.createChartFields),this.destroyQuoteFieldWidgets(),this.createFields(this.quoteFieldList,this.createQuoteFieldWidgets),this.hasFieldsSeparator.set((null===(e=this.instrumentHeaderElements)||void 0===e?void 0:e.chartFieldsContainer.hasChildNodes())&&(null===(n=this.instrumentHeaderElements)||void 0===n?void 0:n.quoteFieldsContainer.hasChildNodes()))},50)}createFields(e,n){var i,s;if(r.InfrontUtil.isEmptyObject(e))return;let o;const l=null===(i=this.symbolBase.subBase)||void 0===i?void 0:i.get(),u=null===(s=this.symbolBase.topBase)||void 0===s?void 0:s.get();Object.keys(e).includes(l)?o=e[this.symbolBase.subBase.get()]:Object.keys(e).includes(u)?o=e[u]:e?.[Ha]&&(o=e[Ha]),n.call(this,o)}destroyChartFields(){[this.chartFields.currentPeriod,this.chartFields.lastValidDate,this.chartFields.lastValidTime].forEach(e=>{e.unbindAll()}),this.chartFieldBindings=[],r.InfrontUtil.removeAllChildNodes(this.instrumentHeaderElements.chartFieldsContainer)}createChartFields(e){var n;null!==(n=this.instrumentHeaderElements)&&void 0!==n&&n.chartFieldsContainer&&e?.forEach(i=>{var s;const o=document.createElement("div");o.className="cell-mininav cell-mininav__label",this.addFieldLabelSpan(o,i);const l=document.createElement("span");if(o.appendChild(l),null===(s=this.chartFields)||void 0===s?void 0:s[i.name]){let u,d;i?.blinkType!=Ze.None&&(u=new is(l,i?.blinkDuration||Ci.Default,i.blinkType),this.chartFieldBindings.push(u)),i?.enableStatusColors&&(d=[],d.push(new r.InfrontUtil.ClassBinding(l,O.C.kStatusPositive,g=>parseFloat(g)>0)),d.push(new r.InfrontUtil.ClassBinding(l,O.C.kStatusNeutral,g=>
10===parseFloat(g))),d.push(new r.InfrontUtil.ClassBinding(l,O.C.kStatusNegative,g=>parseFloat(g)<0)),this.chartFieldBindings.push(...d)),this.chartFields[i.name].observe({valueUpdated:g=>{null==g?l.textContent=r.InfrontUtil.formatSettings.emptyValuePlaceholder:"number"==typeof g?l.textContent=Ga?.[i.name](g)||""+g:(0,O.i)(this.infrontUI,l,g),u?.valueUpdated(g),d?.forEach(I=>{I.valueUpdated(g)})}})}this.instrumentHeaderElements.chartFieldsContainer.appendChild(o)})}initObservers(e){var n,i,s,o,l;null===(n=this.mainInstrument)||void 0===n||n.observe({valueUpdated:u=>{this.onUpdate()}}),null===(i=this.symbolBase.topBase)||void 0===i||i.observe({valueUpdated:u=>{this.onUpdate()}}),null===(s=this.symbolBase.subBase)||void 0===s||s.observe({valueUpdated:u=>{this.onUpdate()}}),null===(o=this.chartFields.currentStartDate)||void 0===o||o.observe({valueUpdated:u=>{var d,g;null===(d=this.chartFields.currentPeriod)||void 0===d||d.set(u&&null!==(g=this.chartFields.currentEndDate)&&void 0!==g&&g.get()?`${u} - ${this.chartFields.currentEndDate.get()}`:null)}}),null===(l=this.chartFields.currentEndDate)||void 0===l||l.observe({valueUpdated:u=>{var d,g;null===(d=this.chartFields.currentPeriod)||void 0===d||d.set(u&&null!==(g=this.chartFields.currentStartDate)&&void 0!==g&&g.get()?`${this.chartFields.currentStartDate.get()} - ${u}`:null)}}),e.currentStartDate.observe({valueUpdated:u=>{var d;null===(d=this.chartFields.currentStartDate)||void 0===d||d.set(r.InfrontUtil.formatDate(u)),this.updateChange()}}),e.currentEndDate.observe({valueUpdated:u=>{var d;null===(d=this.chartFields.currentEndDate)||void 0===d||d.set(r.InfrontUtil.formatDate(u)),this.updateChange()}}),this.hasFieldsSeparator.observe({valueUpdated:u=>{var d;const g=null===(d=this.instrumentHeaderElements)||void 0===d?void 0:d.quoteFieldsContainer;g&&(u&&g?.hasChildNodes()&&!r.InfrontUtil.hasClass(g,"cell-w-chart-nextgen__toolbar-separator-left")?g.classList.add("cell-w-chart-nextgen__toolbar-separator-left"):r.InfrontUtil.hasClass(g,"cell-w-chart-nextgen__toolbar-separator-left")&&g.classList.remove("cell-w-chart-nextgen__toolbar-separator-left"))}})}updateChange(e){e?this._updateChange():this.updateChangeThrottled()}_updateChange(){var e,n,i,s,o,l,u,d,g;const I=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getGlobalChartSettings();if(!I)return;const C=null===(n=I.currentStartDate)||void 0===n?void 0:n.get(),S=null===(i=I.currentEndDate)||void 0===i?void 0:i.get();if(null==C||null==S)return;const N=null===(l=null===(o=null===(s=this.chartInstrumentList.getChart())||void 0===s?void 0:s.series)||void 0===o?void 0:o[0])||void 0===l?void 0:l.points;if(N?.length){let k,x;const Y=N.length-1,et=Math.min(N.length/2-1,a.maxPointIterations),rt=null===(u=this.chartInstrumentList)||void 0===u?void 0:u.getGlobalChartSettings();rt?.isOneDayUntouched&&rt.isPrevCloseCompareValue&&(k=da.getPrevCloseValue(this.chartInstrumentList,this.chartInstrumentList.getMainInstrument()));for(let it=0;it<et;it++){const gt=mt=>{var Ct,Tt;return null!==(Tt=null===(Ct=N[mt])||void 0===Ct?void 0:Ct.y)&&void 0!==Tt?Tt:void 0};if(null==k&&!(null===(d=N?.[it])||void 0===d)&&d.isInside&&(k=gt(it)),null==x&&!(null===(g=N?.[Y-it])||void 0===g)&&g.isInside&&(x=gt(Y-it)),null!=k&&null!=x)break}null!=k&&null!=x?(this.chartFields.absChange.set(x-k),this.chartFields.pctChange.set(0!==k?(x-k)/Math.abs(k)*100:null)):(this.chartFields.absChange.set(null),this.chartFields.pctChange.set(null))}}setLastValid(e){var n,i,s;const o=e?.length?null===(n=e[e.length-1])||void 0===n?void 0:n.date:null;null===(i=this.chartFields)||void 0===i||i.lastValidDate.set(r.InfrontUtil.formatDate(new Date(o))),null===(s=this.chartFields)||void 0===s||s.lastValidTime.set(r.InfrontUtil.formatDateTime(new Date(o),r.InfrontUtil.formatSettings.timeFormat))}createQuoteFieldWidgets(e){var n,i,s;const o=null===(i=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getMainInstrument())||void 0===i?void 0:i.getInstrument();o&&null!==(s=this.instrumentHeaderElements)&&void 0!==s&&s.quoteFieldsContainer&&(this.quoteWidgets=[],e.forEach(l=>{const u=document.createElement("div");
1u.className="cell-mininav cell-mininav__label",this.addFieldLabelSpan(u,l),this.instrumentHeaderElements.quoteFieldsContainer.appendChild(u);const d=new as;d.showCurrency=!0,d.rootElement="span",d.allowZero=!1,d.instrument=o,d.name=l.name,d.enableChangeStatusColors=!!l?.enableStatusColors,d.blinkDuration=l?.blinkDuration||Ci.Default,d.blinkType=l?.blinkType||Ze.None,this.quoteWidgets.push(new Oo(u,this.infrontUI,d))}))}getFieldLabel(e,n){let i;return i="string"==typeof n?n:this.languageHandler.get(ht.kLanguageKeyInstrumentHeader,e),i?.length?`${i}: `:null}addFieldLabelSpan(e,n){if(n?.label){const i=document.createElement("span");i.textContent=this.getFieldLabel(n.name,n.label),i.textContent&&e.appendChild(i)}}destroyQuoteFieldWidgets(){var e;for(let n=(null===(e=this.quoteWidgets)||void 0===e?void 0:e.length)-1||-1;n>-1;n--)this.quoteWidgets[n].destroy(),this.quoteWidgets.splice(n,1);r.InfrontUtil.removeAllChildNodes(this.instrumentHeaderElements.quoteFieldsContainer)}destroy(){this.destroyChartFields(),this.destroyQuoteFieldWidgets()}}return a.maxPointIterations=10,a})();class Pr{constructor(t,e=!0){this.navigation=[],this.outsideClickListener=n=>{this.clickInDateSelector(n)||n.target==this.editBox||this.editBox.contains(n.target)||this.remove()},this.parentElement=t,e&&this.init()}init(t=null){var e,n,i;this.navigationSelected=0,this.navigationTabs=null,this.colorMatrixElementList=[],this.isVisible=!0,this.overlay=document.createElement("div"),this.overlay.className="cell-w-chart-nextgen__edit-modal-overlay",this.parentElement.appendChild(this.overlay),this.editBox=document.createElement("div"),this.editBox.className="cell-w-chart-nextgen__edit-modal cell-content cell-content--raised",null!=t&&(this.editBox.className=`${this.editBox.className} ${t}`),this.parentElement.appendChild(this.editBox),null===(i=null===(n=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getGlobalChartSettings())||void 0===n?void 0:n.onPopupStateChange)||void 0===i||i.call(n,!0),r.InfrontUtil.setZeroTimeout(()=>{r.InfrontUtil.addEventListener(document,"click",this.outsideClickListener)})}appendChild(t){this.editBox.appendChild(t)}addHeader(t,e=this.editBox,n="cell-w-chart-nextgen__edit-modal-header"){const i=document.createElement("h4");i.className=n,(0,O.i)(null,i,t),e.appendChild(i)}getGroupText(t,e=this.languageKey){return this.languageHandler.get(e,t)||t}getLabelText(t,e=this.languageKey){var n;return this.languageHandler.get(e,(null===(n=t.split("~"))||void 0===n?void 0:n[1])||t)||t}addNavigation(t=null){var e;const n=document.createElement("div"),i=document.createElement("div");r.InfrontUtil.addClassName(n,"cell-w-chart-nextgen__edit-modal-navigation"),r.InfrontUtil.addClassName(i,"cell-flex-row"),this.navigationTabs=[],null===(e=this.navigation)||void 0===e||e.forEach((s,o)=>{var l;const u=document.createElement("div"),d=document.createElement("span"),g=(null===(l=this.languageHandler)||void 0===l?void 0:l.get(this.languageKey,s))||s;(0,O.i)(null,d,g),r.InfrontUtil.addClassName(u,"cell-flex-column cell-noselect cell-tabs__horizontal__tab"),o===this.navigationSelected&&u.classList.add("cell-tabs__horizontal__tab--selected"),u.onclick=I=>{I.stopPropagation(),this.navigationSelected=o,this.navigationTabs.forEach(C=>{C.classList.remove("cell-tabs__horizontal__tab--selected")}),u.classList.add("cell-tabs__horizontal__tab--selected"),t?.(this.navigation[o])},u.appendChild(d),this.navigationTabs.push(u),i.appendChild(u)}),n.appendChild(i),this.appendChild(n)}addForm(t,e,n,i=null){var s;null===(s=this.form)||void 0===s||s.remove(),this.colorMatrixElementList=[],this.form=document.createElement("form"),this.form.action="",this.form.onsubmit=o=>{o.preventDefault(),this.modalCallback(this.getFormParams(e)),this.remove()},(i||Object.keys(n)).forEach(o=>{var l,u,d,g,I,C,S,N,k,x,Y,et,rt;const it=this.getLabelText(o),gt=(null==t||(null===(l=this.userParamsViewGroups[t])||void 0===l?void 0:l.includes(o)))&&this.showKeySpecialCases(o);if(gt&&null!==(u=this.userParamsSkipped)&&void 0!==u&&u.includes(o))return;if(gt){if(o.startsWith("group_"))return void this.addHeader(this.getGroupText(o),this.form,"cell-w-chart-nextgen__edit-modal-subheader");const Ct=null===(d=this.userParamsExtraLabels)||void 0===d?void 0:d[o];if(null!=Ct&&this.addHeader(Ct(),this.form,"cell-w-chart-nextgen__edit-modal-subheader"),null===(g=this.userParamsHidden)||void 0===g?void 0:g.includes(o))return void this.createHiddenInput(n,o,this.form,e);if(null!==(I=this.userParamsDropdowns)&&void 0!==I&&I.includes(o))return void this.createSelect(this.form,e,n,o);if(null!==(C=this.userParamsDateSelector)&&void 0!==C&&C.includes(o))return void this.createInputDate(this.form,e,n,o);if(this.isInputColorKey(o))return void this.createInputColor(this.form,e,n,o);if(this.isInputColorAlphaKey(o))return void this.createInputColor(this.form,e,n,o,!1,!0,!1)}let mt;mt=null!=(null===(S=this.userParamsMultiCheckbox)||void 0===S?void 0:S[o])?this.createInputMultiCheckbox(this.form,gt,n,o,!(null===(N=this.userParamsOptional)||void 0===N||!N.length||this.userParamsOptional.includes(o)),!(null===(k=this.userParamsDisabled)||void 0===k||!k.includes(o))):"boolean"==typeof n[o]?this.createInputCheckbox(this.form,gt,o,it,!!n[o],!(null===(x=this.userParamsOptional)||void 0===x||!x.length||this.userParamsOptional.includes(o)),!(null===(Y=this.userParamsDisabled)||void 0===Y||!Y.includes(o))):this.createInputTextbox(this.form,o,gt,it,this.getValueForKey(n,o),!(null===(et=this.userParamsOptional)||void 0===et||!et.length||this.userParamsOptional.includes(o)),!(null===(rt=this.userParamsDisabled)||void 0===rt||!rt.includes(o))),e[o
1]=mt}),this.addClearDiv(this.form),this.addSubmitButton(this.form),this.addCancelButton(this.form),this.appendChild(this.form),this.positionCheck(),this.setElementFocus(e,i||Object.keys(n),this.userParamsViewGroups,this.userParamsDisabled)}addClearDiv(t){const e=document.createElement("div");e.className="clear",t.appendChild(e)}addSubmitButton(t){var e;const n=document.createElement("input");n.type="submit",n.setAttribute("value",(null===(e=this.languageHandler)||void 0===e?void 0:e.get(this.languageKey,"btn_submit"))||"submit"),r.InfrontUtil.addClassName(n,"cell-button cell-button--confirm"),t.appendChild(n)}addCancelButton(t){var e;const n=document.createElement("input");n.type="button",n.setAttribute("value",(null===(e=this.languageHandler)||void 0===e?void 0:e.get(this.languageKey,"btn_cancel"))||"cancel"),n.onclick=i=>{i.stopPropagation(),this.remove()},r.InfrontUtil.addClassName(n,"cell-button cell-button--cancel"),t.appendChild(n)}createInputMultiCheckbox(t,e,n,i,s=!1,o=!1){var l,u,d,g;const I=document.createElement("div"),C=document.createElement("div"),S=document.createElement("span"),N=document.createElement("fieldset"),k=document.createElement("legend"),x=r.InfrontUtil.makeUUID(),Y="cell-flex-column",et=Y+Pi,rt=Y+Xi,it=null===(l=this.userParamsMultiCheckbox)||void 0===l?void 0:l[i],gt=it&&(null===(d=null===(u=this.chartInstrumentList)||void 0===u?void 0:u.getGlobalChartSettings())||void 0===d?void 0:d[it.availableKey]),mt=n[i]||[];if(!it||!gt?.length)return;I.className="cell-flex-row cell-flex-collapse cell-w-chart-nextgen__edit-modal-fields",C.className=`${Y} ${r.InfrontUtil.removeWhitespaces(i)}`,e||(I.style.display="none"),S.className="cell-w-chart-nextgen__edit-modal-multi-select",S.onclick=()=>{N.style.display="none"===N.style.display?"block":"none"},C.appendChild(S);const Ct=null===(g=this.languageHandler)||void 0===g?void 0:g.get(this.languageKey,"filter_"+i);return Ct&&(k.appendChild(document.createTextNode(Ct)),k.className="cell-w-chart-nextgen__edit-modal-multi-checkbox-legend",N.appendChild(k)),gt.forEach(Tt=>{if(null==Tt[it.value]||null==Tt[it.name])return;const Wt=r.InfrontUtil.makeUUID(),Kt=!!mt?.includes(Tt[it.value]),te=document.createElement("div");te.className=`${Y} ${r.InfrontUtil.removeWhitespaces(Tt[it.name])} ${Kt?rt:et}`;const le=document.createElement("input");le.name=x,le.id=Wt,le.type="checkbox",le.required=s,le.value=""+Tt[it.value],le.checked=Kt,le.className="cell-w-chart-nextgen__edit-modal-multi-checkbox",le.addEventListener("change",function(){r.InfrontUtil.toggleClasses(te,le.checked,rt,et)}),o&&le.setAttribute("disabled","disabled");const Ie=document.createElement("label");Ie.setAttribute("for",Wt),Ie.className="cell-w-chart-nextgen__edit-modal-checkbox-label",Ie.textContent=Tt[it.name],te.appendChild(le),te.appendChild(Ie),N.appendChild(te)}),N.id=x,N.style.display="none",N.className=`cell-w-chart-nextgen__edit-modal-fieldset ${r.InfrontUtil.removeWhitespaces(i)}`,C.appendChild(N),I.appendChild(C),t.appendChild(I),N}createInputCheckbox(t,e,n,i,s,o=!1,l=!1){s=!!s;const u=document.createElement("div"),d=document.createElement("div"),g=document.createElement("input"),I=document.createElement("label"),C=r.InfrontUtil.makeUUID(),S="cell-flex-column",N=S+Xi,k=S+Pi;return u.className="cell-flex-row cell-flex-collapse cell-w-chart-nextgen__edit-modal-item",d.className=`${S} ${s?k:N} ${r.InfrontUtil.removeWhitespaces(n)}`,e||(u.style.display="none"),(0,O.i)(null,I,i),I.setAttribute("for",C),I.className="cell-w-chart-nextgen__edit-modal-checkbox-label",g.type="checkbox",g.id=C,g.required=o,g.checked=s,g.className="cell-w-chart-nextgen__edit-modal-checkbox",g.addEventListener("change",function(){r.InfrontUtil.toggleClasses(d,g.checked,k,N)}),l&&g.setAttribute("disabled","disabled"),d.appendChild(g),d.appendChild(I),u.appendChild(d),t.appendChild(u),g}createInputTextbox(t,e,n,i,s,o=!1,l=!1){const u=document.createElement("div"),d=document.createElement("div"),g=document.createElement("div"),I=document.createElement("input"),C=document.createElement("label"),S=r.InfrontUtil.makeUUID();return u.className=`cell-flex-row cell-flex-collapse ${r.InfrontUtil.removeWhitespace
1s(e)}`,n||(u.style.display="none"),d.className="cell-flex-column ",g.className="cell-flex-column ",(0,O.i)(null,C,i),C.setAttribute("for",S),C.className="cell-w-chart-nextgen__edit-modal-text-label",d.appendChild(C),I.type="text",I.id=S,I.required=o,I.value=s,I.className="cell-input cell-w-chart-nextgen__edit-modal-text",g.appendChild(I),u.appendChild(d),u.appendChild(g),t.appendChild(u),I}createInputColor(t,e,n,i,s=!0,o=!0,l=!0,u=!1){const d=document.createElement("div"),g=document.createElement("div"),I=document.createElement("div"),C=document.createElement("div"),S=document.createElement("div"),N=document.createElement("span"),k=document.createElement("input"),x=document.createElement("label"),Y=r.InfrontUtil.makeUUID();d.className=`cell-flex-row cell-flex-collapse ${r.InfrontUtil.removeWhitespaces(i)}`,g.className="cell-flex-column",I.className="cell-flex-column ",C.className="cell-flex-row cell-flex-collapse",S.className="cell-flex-column     ";const et=this.getValueForKey(n,i),rt=this.getLabelText(i),it=et?et.substr(0,7):"white",gt=9===et.length?et.substr(7,2):"ff",mt=Tt=>{N.style.backgroundColor=k.value+Bt.convertByteToHex(+Ct.value)},Ct=this.createAlphaPicker(gt,mt);return x.appendChild(document.createTextNode(rt)),x.setAttribute("for",Y),x.className="cell-w-chart-nextgen__edit-modal-color-label",g.appendChild(x),k.type="color",k.value=it,s?k.oninput=mt:k.setAttribute("disabled","disabled"),N.className="cell-w-chart-nextgen__edit-modal-color-box",N.style.backgroundColor=it+gt,N.id=Y,N.appendChild(k),S.appendChild(N),o&&S.appendChild(Ct),C.appendChild(S),l&&this.createColorMatrix(C,Wt=>{var Kt,te;const le=null===(te=null===(Kt=Wt?.target)||void 0===Kt?void 0:Kt.style)||void 0===te?void 0:te.backgroundColor;if(!le)return;const Ie=Bt.convertColorToHex(le),Je=Bt.convertByteToHex(+Ct.value);N.style.backgroundColor=Ie+Je,k.value=Ie}),I.appendChild(C),d.appendChild(g),d.appendChild(I),t.appendChild(d),e[i]=N,u||this.addAfterElementForKey(d,e,i),k}createAlphaPicker(t,e){const n=document.createElement("input");return n.type="range",r.InfrontUtil.setZeroTimeout(()=>n.setAttribute("value",""+Bt.convertHexToByte(t))),n.setAttribute("min","1"),n.setAttribute("max","255"),n.setAttribute("step","1"),n.oninput=e,n.className="cell-w-chart-nextgen__edit-modal-color-alpha",n}createColorMatrix(t,e,n=!0){const i=document.createElement("div"),s=document.createElement("div"),o=document.createElement("div");i.className="cell-flex-column cell-flex-small-2";const l=document.createElement("div");l.className="cell-w-chart-nextgen__edit-modal-color-picker",i.appendChild(l),i.onclick=()=>{"none"===o.style.display?(this.colorMatrixElementList.forEach(u=>{u.style.display="none"}),o.style.display="block"):o.style.display="none"},o.className="cell-w-chart-nextgen__edit-modal-color-matrix",s.className="cell-flex-column cell-flex-small-12";for(let u=0;u<Bt.getColorMatrixHeight();u++){const d=document.createElement("div");d.style.float="left",d.style.paddingBottom=n?1===u?"4px":"1px":1===u?"5px":"0px";for(let g=0;g<Bt.getColorMatrixWidth();g++){const I=document.createElement("div");I.style.float="left",I.style.height=n?"11px":"12px",I.style.width=n?"11px":"12px",I.style.marginRight=n?"1px":"0px",I.style.backgroundColor=Bt.getColorMatrixColor(u,g),I.onclick=e,d.appendChild(I)}o.appendChild(d)}o.style.display="none",s.appendChild(o),t.appendChild(i),t.appendChild(s)}createInputDate(t,e,n,i,s=()=>this.viewChangeCallback(i)){const o=document.createElement("div"),l=document.createElement("div"),u=document.createElement("div"),d=document.createElement("input"),g=document.createElement("label"),I=r.InfrontUtil.makeUUID();o.className=`cell-flex-row cell-flex-collapse ${r.InfrontUtil.removeWhitespaces(i)}`,l.className="cell-flex-column",u.className="cell-flex-column";const C=new Date(this.getValueForKey(n,i)),S=this.getLabelText(i);g.appendChild(document.createTextNode(S)),g.setAttribute("for",I),g.className="cell-w-chart-nextgen__edit-modal-date-label",l.appendChild(g);const N=k=>{var x;yr(null===(x=k?.target)||void 0===x?void 0:x.value,this.getInputDateMin(i),this.getInputDateMax(i))&&s()};return d.type="date",d.value=this.getInputDateString(C),d.setAttribute("min",this.getInputDateString(this.getInputDateMin(i))),d.setAttribute("max",this.getInputDateString(this.getInputDateMax(i))),d.onchange=N,d.onkeypress=k=>
1{d.onchange=null,d.onblur=x=>{d.onblur=null,d.onchange=N,yr(C,this.getInputDateMin(i),this.getInputDateMax(i))&&s()}},d.className="cell-input cell-w-chart-nextgen__edit-modal-date",d.id=I,u.appendChild(d),o.appendChild(l),o.appendChild(u),t.appendChild(o),e[i]=d,d}getInputDateString(t){return yr(t)?t.toLocaleDateString("en-CA"):null}getInputDateMin(t){return new Date(0)}getInputDateMax(t){return new Date}createSelect(t,e,n,i,s=null,o=!1,l=this.viewChangeCallback){const u=this.getSelectListForKey(i);u?.length&&(s=s||document.createElement("div"),e[i]=this.createSelectElement(t,s,i,this.getLabelText(i),u,this.getSelectedItem(u,i,n),!o,l),o||this.addAfterElementForKey(s,e,i))}createSelectElement(t,e,n,i,s,o,l=!0,u){const d=document.createElement("div"),g=document.createElement("div"),I=document.createElement("label"),C=r.InfrontUtil.makeUUID();e.className="cell-flex-row cell-flex-collapse cell-flex-align-middle",d.className="cell-flex-column",g.className="cell-flex-column",l&&(I.textContent=i),I.setAttribute("for",C),I.className="cell-w-chart-nextgen__edit-modal-select-label",d.appendChild(I);const S=this.createSelectList(n,s,o,u);return S.className=`cell-input cell-w-chart-nextgen__edit-modal-select ${r.InfrontUtil.removeWhitespaces(n)}`,S.id=C,g.appendChild(S),e.appendChild(d),e.appendChild(g),t.appendChild(e),S}createSelectElementAfter(t,e,n,i,s){const o=r.InfrontUtil.makeUUID(),l=this.createSelectList(e,n,i,s);return l.className=`cell-input cell-w-chart-nextgen__edit-modal-select ${r.InfrontUtil.removeWhitespaces(e)}`,l.id=o,t.appendChild(l),l}createSelectList(t,e,n,i){const s=document.createElement("select");i&&s.addEventListener("change",function(){i(t,this.value)});for(const o of e){const l=document.createElement("option");l.text=o[0],l.value=o[1],l.selected=o[1]===n,s.appendChild(l)}return s}getSelectDefaultItem(t,e){return["index"].includes(e)?t[t.length-1][1]:t[0][1]}getSelectedItem(t,e,n){const i=this.getSelectDefaultItem(t,e);return null!=n[e]?""+n[e]:i}showKeySpecialCases(t){return!0}getSelectListForKey(t){return[]}addAfterElementForKey(t,e,n){}addResetButton(t,e="btn_reset",n){const i=document.createElement("button");i.type="button",i.className="cell-w-chart-nextgen__edit-modal-reset",null!=n&&(i.onclick=s=>{s.stopPropagation(),n()}),t.appendChild(i)}getLastFloatingDiv(t){const e=t.querySelectorAll("div.cell-flex-column");return e?.length?e[e?.length-1]:null}createHiddenInput(t,e,n,i){const s=document.createElement("div"),o=document.createElement("input");o.type="hidden",o.required=!0,o.value=null!=t[e]?""+t[e]:"",i[e]=o,s.appendChild(o),n.appendChild(s)}setElementFocus(t,e,n,i){var s;const o=null!==(s=this.navigation)&&void 0!==s&&s.length?n[this.navigation[this.navigationSelected]]:e,l=e?.find(d=>null!=t[d]&&o?.includes(d)&&!i?.includes(d)),u=null!=l?t[l]:null;null!=u&&(u.setAttribute("tabindex","0"),u.focus())}getValueForKey(t,e){return null!=t[e]?""+t[e]:""}getFormParams(t){if(null==t)return;const e={};return Object.keys(t).forEach(n=>{var i,s,o;const l=t[n].type;if(null!=(null===(i=this.userParamsMultiCheckbox)||void 0===i?void 0:i[n])){const u=t[n].id;if(null!=u){const d=t[n].querySelectorAll(`input[name="${u}"]:checked`),g=[];d?.forEach(I=>{null==I.value||isNaN(+I.value)||g.push(+I.value)}),e[n]=g}}else if("checkbox"===l)e[n]=!!t[n].checked;else if(this.isInputColorKey(n)||this.isInputColorAlphaKey(n))if("text"===l)e[n]=""+t[n].value;else{const u=null===(s=t[n].style)||void 0===s?void 0:s.backgroundColor,d=u?Bt.getColorOrUndefined(Bt.convertColorToHexAlpha(""+u)):null;e[n]=d}else if(null!==(o=this.userParamsDateSelector)&&void 0!==o&&o.includes(n)){const u=t[n].value;let d;null!=u&&(d=isNaN(new Date(u).getTime())?null:new Date(u)),e[n]=d??new Date}else{const u=t[n].value,d=""===u||isNaN(+u)?""+u:+u;e[n]=d}}),e}isInputColorKey(t){return!this.isInputColorAlphaKey(t)&&(t.toLowerCase().endsWith("color")||t.toLowerCase().startsWith("color"))}isInputColorAlphaKey(t){return!1}getSortArrayFromUserParamsViewGroups(){return[].concat.apply([],this.navigation.map(t=>this.userParamsViewGroups[t]))}getSortedParamsKeysFromUserParamsViewGroups(t){const e=this.getSortArrayFromUserParamsViewGroups(),n=[...t];return n.sort((i,s)=>e.indexOf(i)-e.indexOf(s)),n}clickInDateSelector(t){var e;let n=!1;const i=s=>(s.parentElement?i(s.parentElement):[]).concat([s]);for(const s of[t.target,...i(t.target)]){if(null===(e=s.classList)||void 0===e||!e.length)return;if(Array.from(s.classList).filter(o=>/cell-w-date-selector/.test(o)).length){n=!0;break}}return n}positionCheck(){var t;const e=this.parentElement.getBoundingClientRect(),n=this.editBox.getBoundingClientRect();let i=(null===(t=this.chartInstrumentList.getChartOptions())||void 0===t?void 0:t.getCurrentTopToolbarHeight())+30;const s=n.width>=e.width?0:(e.width-n.width)/2;
1if(r.InfrontUtil.isMobileDevice()){const o=document.body.getBoundingClientRect();i+30+n.height>o.bottom&&(i=Math.max(75,o.bottom-n.height-30)),this.editBox.style.top=i-o.top+"px",this.editBox.style.left=.3*o.width/2+"px",this.editBox.style.width="70%"}else this.editBox.style.top=i+"px",this.editBox.style.left=s+"px"}remove(){var t,e,n,i,s,o,l;null===(n=null===(e=null===(t=this.chartInstrumentList)||void 0===t?void 0:t.getGlobalChartSettings())||void 0===e?void 0:e.onPopupStateChange)||void 0===n||n.call(e,!1),r.InfrontUtil.removeEventListener(document,"click",this.outsideClickListener),null===(s=null===(i=this.editBox)||void 0===i?void 0:i.parentElement)||void 0===s||s.removeChild(this.editBox),null===(l=null===(o=this.overlay)||void 0===o?void 0:o.parentElement)||void 0===l||l.removeChild(this.overlay),this.isVisible=!1}}var Ri;!function(a){a.WEEK="week",a.MONTH="month",a.QUARTER="quarter",a.YEAR="year"}(Ri||(Ri={}));const lo={week:53,month:12,quarter:4,year:99},Fl={[xe.DATE_RANGE]:["startDateSelector","endDateSelector"],[xe.PERIOD]:["startDate","endDate","periodType","period"]},Vl=["periodType"],Bl=["startDate","endDate"],kl=["period"],Hl=["startDateSelector","endDateSelector"];class Gl extends Pr{constructor(t,e){var n,i;super(t,!1),this.leftSideFloatingSizeClass="floating_div_24",this.rightSideFloatingSizeClass="floating_div_75",this.chartInstrumentList=e,this.globalChartSettings=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getGlobalChartSettings(),this.languageHandler=null===(i=this.chartInstrumentList)||void 0===i?void 0:i.getLanguageHandler(),this.languageKey=ht.kLanguageKeyCustomPeriod,this.navigation=[xe.DATE_RANGE,xe.PERIOD]}initUserParams(){this.userParamsSkipped=[...Vl],this.userParamsHidden=[...Bl],this.userParamsDropdowns=[...kl],this.userParamsDateSelector=[...Hl],this.userParamsViewGroups=r.InfrontUtil.deepCopy(Fl),this.userParamsExtraLabels={period:()=>this.getFromToDateHtml()}}openModal(t){var e,n,i,s,o,l,u,d,g,I,C;this.initUserParams(),this.params={startDate:(null===(n=null===(e=this.globalChartSettings)||void 0===e?void 0:e.currentStartDate)||void 0===n?void 0:n.get())||(null===(s=null===(i=this.globalChartSettings)||void 0===i?void 0:i.currentEndDate)||void 0===s?void 0:s.get())||new Date,endDate:(null===(l=null===(o=this.globalChartSettings)||void 0===o?void 0:o.currentEndDate)||void 0===l?void 0:l.get())||new Date,startDateSelector:null===(d=null===(u=this.globalChartSettings)||void 0===u?void 0:u.currentStartDate)||void 0===d?void 0:d.get(),endDateSelector:null===(I=null===(g=this.globalChartSettings)||void 0===g?void 0:g.currentEndDate)||void 0===I?void 0:I.get(),period:1,periodType:Ri.MONTH},this.modalCallback=t,null!=this.params&&!(null===(C=Object.keys(this.params))||void 0===C)&&C.length||this.modalCallback(null),this.init("custom-period"),this.addHeader(this.languageHandler.get(this.languageKey,"customPeriod"));const S={};this.viewChangeCallback=N=>{var k,x,Y,et,rt;this.params=this.getFormParams(S),this.navigationSelected!==(null===(k=this.navigation)||void 0===k?void 0:k.findIndex(it=>it===xe.PERIOD))||Object.values(xe).includes(N)?this.navigationSelected!==(null===(x=this.navigation)||void 0===x?void 0:x.findIndex(it=>it===xe.DATE_RANGE))||Object.values(xe).includes(N)||this.onChangeDateSelector(N):this.onChangePeriodType(),this.params.startDateSelector=new Date(null===(Y=this.params)||void 0===Y?void 0:Y.startDate)||new Date(null===(et=this.params)||void 0===et?void 0:et.endDate)||new Date,this.params.endDateSelector=new Date(null===(rt=this.params)||void 0===rt?void 0:rt.endDate)||new Date,this.addForm(this.navigation[this.navigationSelected],S,this.params)},this.addNavigation(this.viewChangeCallback),this.addForm(this.navigation[this.navigationSelected],S,this.params)}onChangePeriodType(){let t;switch(this.params.periodType){case Ri.WEEK:t=Mo;break;case Ri.MONTH:t=ar;break;case Ri.QUARTER:t=Po;break;case Ri.YEAR:t=$n}this.params.startDate=t(this.params.endDate,this.params.period)}onChangeDateSelector(t){switch(t){case"startDateSelector":this.params.startDate=new Date(this.params.startDateSelector);break;case"endDateSelector":this.params.endDate=new Date(this.params.endDateSelector)}}getInputDateMax(t){return"startDateSelector"===t?new Date(this.params.endDateSelector):new Date}getSelectListForKey(t){var e;const n=[];
1switch(t){case"periodType":Object.values(Ri).filter(i=>isNaN(+i)).forEach(i=>{n.push([this.languageHandler.get(this.languageKey,"periodType_"+i),i])});break;case"period":this.getPeriodSelectList(n,null===(e=this.params)||void 0===e?void 0:e.periodType)}return n}getPeriodSelectList(t,e){const n=lo?.[e];for(let i=1;i<=n;i++)t.push([""+i,""+i])}addAfterElementForKey(t,e,n){if("period"===n){const i="periodType",s=this.getLastFloatingDiv(t);if(s){const o=this.getSelectListForKey(i);e[i]=this.createSelectElementAfter(s,i,o,this.getSelectedItem(o,i,this.params),this.viewChangeCallback)}}}getFromToDateHtml(){var t,e;const n=(0,bi.Me)(this.languageHandler.get(this.languageKey,"startDate")),i=(0,bi.Me)(this.languageHandler.get(this.languageKey,"endDate")),s=this.languageHandler.get(this.languageKey,"dateNotSet"),o=(0,bi.Me)(null!==(t=this.params)&&void 0!==t&&t.startDate?r.InfrontUtil.formatDate(new Date(this.params.startDate)):s),l=(0,bi.Me)(null!==(e=this.params)&&void 0!==e&&e.endDate?r.InfrontUtil.formatDate(new Date(this.params.endDate)):s);return new bi.xo(`<strong>${n}:</strong> ${o} <strong>${i}:</strong> ${l}`)}}const Yl={[xe.DISPLAY]:["watermarkType","watermarkCustomText","gridType","showAlternateGridColor","mainOnTop","showHighLow","showNavigator","showLegend","showTooltip","group_Intraday","showPrevClose","isPrevCloseCompareValue","prevCloseType","group_Cursor","cursorType"],[xe.AXIS]:["ordinateScaling","ordinateCompareBase","showOrdinate","showOppositeOrdinate","ordinateType","ordinateLabelsOutside","showSeriesLabels"],[xe.EVENTS]:["group_Display","showSplits","showDividends","showCalendar","calendarFeeds","group_PriceAdjustments","adjustSplits","adjustDividends"]}
1,Wl=[],Kl=[],zl=["showNews","showReleases"],jl=["watermarkType","gridType","cursorType","prevCloseType","ordinateType","ordinateScaling","ordinateCompareBase"],Xl={calendarFeeds:{availableKey:"availableCalendarFeeds",name:"description",value:"feed"}};class $l extends Pr{constructor(t,e){var n,i;super(t,!1),this.chartInstrumentList=e,this.globalChartSettings=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getGlobalChartSettings(),this.languageHandler=null===(i=this.chartInstrumentList)||void 0===i?void 0:i.getLanguageHandler(),this.languageKey=ht.kLanguageKeySetting,this.navigation=this.globalChartSettings.globalSettingsNavigation?r.InfrontUtil.deepCopy(this.globalChartSettings.globalSettingsNavigation):[xe.DISPLAY,xe.AXIS,xe.EVENTS]}initUserParams(){this.userParamsSkipped=[...Wl],this.userParamsHidden=[...Kl],this.userParamsDisabled=[...zl],this.userParamsDropdowns=[...jl],this.userParamsMultiCheckbox=r.InfrontUtil.deepCopy(Xl),this.userParamsViewGroups=r.InfrontUtil.deepCopy(this.globalChartSettings.globalSettingsViewGroup?this.globalChartSettings.globalSettingsViewGroup:Yl)}openModal(t){var e,n;this.initUserParams(),this.params=null===(e=this.chartInstrumentList)||void 0===e?void 0:e.getGlobalParams(),this.modalCallback=t,r.Infront.DEBUG_WIDGETS_MODALS&&r.Infront.log("Modal/GlobalSettings (openModal):","params=",this.params),null!=this.params&&!(null===(n=Object.keys(this.params))||void 0===n)&&n.length||this.modalCallback(null),this.init("global-settings"),this.addHeader(this.languageHandler.get(this.languageKey,"globalSettings"));const i=this.getSortedParamsKeysFromUserParamsViewGroups(Object.keys(this.params)),s={};this.viewChangeCallback=()=>{this.params=this.getFormParams(s),this.addForm(this.navigation[this.navigationSelected],s,this.params,i)},this.addNavigation(this.viewChangeCallback),this.addForm(this.navigation[this.navigationSelected],s,this.params,i)}showKeySpecialCases(t){return!0}isInputColorKey(t){return!["showAlternateGridColor"].includes(t)&&super.isInputColorKey(t)}getSelectListForKey(t){const e=[];switch(t){case"watermarkType":[yn.NONE,yn.SYMBOL,yn.DESCRIPTION,yn.CUSTOM].forEach(n=>{e.push([this.languageHandler.get(this.languageKey,"watermarkType_"+n),n])}),this.hideShowWatermarkCustomText();break;case"gridType":[Rn.GRID,Rn.VERTICAL,Rn.HORIZONTAL,Rn.NONE].forEach(n=>{e.push([this.languageHandler.get(this.languageKey,"gridType_"+n),n])});break;case"cursorType":[Nn.ARROW,Nn.VERTICAL,Nn.CROSSHAIR].forEach(n=>{e.push([this.languageHandler.get(this.languageKey,"cursorType_"+n),n])});break;case"prevCloseType":[Zn.LINE,Zn.DOT].forEach(n=>{e.push([this.languageHandler.get(this.languageKey,"prevCloseType_"+n),n])});break;case"ordinateType":[Dn.LINEAR,Dn.LOGARITHMIC].forEach(n=>{e.push([this.languageHandler.get(this.languageKey,"ordinateType_"+n),n])});break;case"ordinateScaling":[Pe.AUTO,Pe.RELATIVE,Pe.ABSOLUTE,Pe.REBASE_ON_MAIN].forEach(n=>{var i;(null===(i=this.globalChartSettings)||void 0===i?void 0:i.chartType)===wt.BASELINE&&n!==Pe.REBASE_ON_MAIN||e.push([this.languageHandler.get(this.languageKey,"ordinateScaling_"+n),n])});break;case"ordinateCompareBase":e.push(["0%","0"],["100%","100"])}return e}hideShowWatermarkCustomText(){const t="watermarkCustomText";let e=this.userParamsHidden.indexOf(t);for(;e>-1;)this.userParamsHidden.splice(e,1),e=this.userParamsHidden.indexOf(t);this.params.watermarkType!==yn.CUSTOM&&this.userParamsHidden.push(t)}}const ql={[xe.LINE]:["visible","targetCurrency","chartType","dataType","color","upWickColor","wickColor","upColor","downColor","lineWidth"],[xe.VOLUME]:["group_VolumeBars","showVolume","volumeUseUpDownColors","group_VolumeUnderlay","showVolumeUnderlay","volumeUnderlayUseUpDownColors","group_VolumeCommon","volumePositiveColor","volumeNegativeColor","volumeColor"],[xe.EVENTS]:["group_Display","showSplits","showDividends","showCalendar","group_PriceAdjustments","adjustSplits","adjustDividends"]}
1,Zl=[],Ql=[],Jl=["showNews","showReleases"],tu=["targetCurrency","chartType","dataType","volumeType"];class eu extends Pr{constructor(t,e){var n;super(t,!1),this.chartInstrumentList=e,this.globalChartSettings=null===(n=this.chartInstrumentList)||void 0===n?void 0:n.getGlobalChartSettings(),this.languageHandler=this.chartInstrumentList.getLanguageHandler(),this.languageKey=ht.kLanguageKeySetting,this.navigation=this.globalChartSettings.instrumentSettingsNavigation?r.InfrontUtil.deepCopy(this.globalChartSettings.instrumentSettingsNavigation):[xe.LINE,xe.VOLUME,xe.EVENTS]}initUserParams(){this.userParamsSkipped=[...Zl],this.userParamsHidden=[...Ql],this.userParamsDisabled=[...Jl],this.userParamsDropdowns=[...tu],this.userParamsViewGroups=r.InfrontUtil.deepCopy(this.globalChartSettings.instrumentSettingsViewGroup?this.globalChartSettings.instrumentSettingsViewGroup:ql)}openModal(t,e=null,n=!1){var i,s,o,l,u;this.initUserParams(),this.chartInstrument=null===(i=this.chartInstrumentList)||void 0===i?void 0:i.getChartInstrumentById(e),this.params=null===(s=this.chartInstrument)||void 0===s?void 0:s.getInstrumentParams(),this.modalCallback=t,r.Infront.DEBUG_WIDGETS_MODALS&&r.Infront.log("Modal/InstrumentSettings (openModal):","instrumentId=",e,"params=",this.params),null!=this.params&&!(null===(o=Object.keys(this.params))||void 0===o)&&o.length||this.modalCallback(null),!(null===(l=this.chartInstrument)||void 0===l)&&l.isMainInstrument||(this.userParamsSkipped.push("group_VolumeBars"),this.userParamsHidden.push("showVolume"),this.userParamsHidden.push("volumeUseUpDownColors")),this.setInstrumentFollowingVolumeColor(),this.init("instrument-settings"),this.addHeader(this.languageHandler.get(this.languageKey,"instrumentSettings")+" "+this.chartInstrument.getInstrumentName());const d=this.getSortedParamsKeysFromUserParamsViewGroups(Object.keys(this.params)),g={};if(this.viewChangeCallback=()=>{this.params=this.getFormParams(g),this.setInstrumentFollowingVolumeColor(),this.addForm(this.navigation[this.navigationSelected],g,this.params,d)},n){const I=null===(u=this.navigation)||void 0===u?void 0:u.indexOf(xe.VOLUME);this.navigationSelected=I>-1?I:this.navigationSelected}this.addNavigation(this.viewChangeCallback),this.addForm(this.navigation[this.navigationSelected],g,this.params,d)}showKeySpecialCases(t){if([wt.CANDLESTICK].includes(this.params.chartType)){if(["color","lineWidth"].includes(t))return!1}else if([wt.HOLLOWCANDLESTICK,wt.HEIKINASHI].includes(this.params.chartType)){if(["color","upWickColor","wickColor","lineWidth"].includes(t))return!1}else if([wt.OHLC].includes(this.params.chartType)){if(["color","upWickColor","wickColor"].includes(t))return!1}else if(["upWickColor","wickColor","upColor","downColor"].includes(t))return!1;return!0}isInputColorAlphaKey(t){return["volumeColor"].includes(t)}getSelectListForKey(t){var e,n,i,s;const o=[];switch(t){case"targetCurrency":o.push([this.languageHandler.get(this.languageKey,"default"),""+Zt[Zt.DEFAULT]]),null===(e=Object.values(Zt))||void 0===e||e.forEach(l=>{Zt[l]&&l>2&&o.push([""+Zt[l],""+Zt[l]])});break;case"chartType":null===(n=Object.values(wt))||void 0===n||n.forEach(l=>{var u,d;null!==(u=this.chartInstrument)&&void 0!==u&&u.canUseChartType(l,this.params.dataType)&&(l!==wt.BASELINE||null!==(d=this.chartInstrument)&&void 0!==d&&d.isMainInstrument)&&o.push([this.languageHandler.get(this.languageKey,"chartType_"+l),l])});break;case"dataType":null===(i=Object.values(Gt))||void 0===i||i.forEach(l=>{var u,d;if(null===(u=this.chartInstrument)||void 0===u||!u.canUseChartData(l,this.params.chartType))return;const g=l===Gt.AUTO,I=g?null===(d=this.chartInstrument)||void 0===d?void 0:d.getDataType(l):l;let C=this.languageHandler.get(this.languageKey,"dataType_"+I);g&&(C=`${this.languageHandler.get(this.languageKey,"dataType_automatic")} (${C})`),o.push([C,l])});break;case"volumeType":null===(s=Object.values(rn))||void 0===s||s.forEach(l=>{o.push([this.languageHandler.get(this.languageKey,"volumeType_"+l),l])})}return o}addAfterElementForKey(t,e,n){if("targetCurrency"===n){const i=this.getLastFloatingDiv(t);i&&this.addResetButton(i,"btn_reset",()=>{const o=e[n];o&&(o.value=""+Zt[Zt.DEFAULT],this.viewChangeCallback())})}else if("dataType"===n){const i=this.params.chartType;if([...Me,wt.OHLC].includes(i)){const s=this.getLastFloatingDiv(t);s&&this.addResetButton(s,"btn_colorreset",()=>{var l;const u=i===wt.OHLC?Bt.getOhlcDefaultColors():Bt.getCandleStickDefaultColors();null===(l=Object.keys(u))||void 0===l||l.forEach(d=>{const g=e[d];g&&(g.style.backgroundColor=u[d]||Ei[1])}),this.viewChangeCallback()})}}}
1setInstrumentFollowingVolumeColor(){this.params.volumeColor=this.chartInstrument.getFollowingVolumeColor(this.params.color,this.params.volumeColor)}}const nu={},iu=["color","colorSignal","colorSignalLine","colorLowerzone","colorHigherzone","colorOverbought","colorOversold","negativeColor","togglePercentRsi"],ru=["index"],au=["volumeSeriesID"],su=[],ou=["linkedTo","smoothingMethod","smoothingMethodD","smoothingMethodslowD"],lu=["period","periods","shortPeriod","longPeriod","signalPeriod","signal","stddevPeriod","smoothingPeriod","periodObservation","periodExtrapolation"];class uu extends Pr{constructor(t,e){super(t,!1),this.chartInstrumentList=e,this.languageHandler=this.chartInstrumentList.getLanguageHandler(),this.languageKey=ht.kLanguageKeyIndicatorSetting,this.navigation=[]}initUserParams(){this.userParamsOptional=[...iu],this.userParamsSkipped=[...ru],this.userParamsHidden=[...au],this.userParamsDisabled=[...su],this.userParamsDropdowns=[...ou],this.userParamsViewGroups=r.InfrontUtil.deepCopy(nu)}openModal(t,e,n=null){var i,s,o;this.initUserParams(),this.indicatorType=e,this.indicatorId=n,this.chartIndicators=this.chartInstrumentList.getChartIndicators(),this.params=null!=this.indicatorId?null===(i=this.chartIndicators)||void 0===i?void 0:i.getIndicatorParamsById(this.indicatorId):null===(s=this.chartIndicators)||void 0===s?void 0:s.getIndicatorParamsByType(this.indicatorType),this.modalCallback=t,r.Infront.DEBUG_WIDGETS_MODALS&&r.Infront.log("Modal/IndicatorSettings (openModal):","indicatorType=",this.indicatorType,"indicatorId=",this.indicatorId,"params=",this.params),null!=this.params&&!(null===(o=Object.keys(this.params))||void 0===o)&&o.length||t(null),this.init("indicator-settings"),this.addHeader(this.languageHandler.get(ht.kLanguageKeyIndicator,e));const l=Object.keys(this.params);l.sort((d,g)=>this.sortIndicatorParams(d,g));const u={};this.viewChangeCallback=d=>{this.params=this.getFormParams(u),"linkedTo"===d&&(this.params.index=null),this.addForm(this.navigation[this.navigationSelected],u,this.params,l)},this.addForm(this.navigation[this.navigationSelected],u,this.params,l)}getLabelText(t,e=this.languageKey){var n;let i=this.languageHandler.get(e,(null===(n=t.split("~"))||void 0===n?void 0:n[1])||t)||t;const s=this.getInfoForKey(t);return s&&(i=`${i} [${s}]`),i}getInfoForKey(t){const e=this.chartInstrumentList.getGlobalChartSettings();if(!e||!lu.includes(t))return"";if(e.indicatorsBasedOnResolution||e.isIntraday){const n=Ke.getCurrentResolution(e);return Ke.getResolutionShortLabel(n,e,this.languageHandler)}return Ke.getResolutionShortLabel(Pt.ONE_DAY,e,this.languageHandler)}getValueForKey(t,e){var n;let i="";return"color"===e&&(i=this.chartIndicators.getIndicatorColor(null===(n=this.chartIndicators)||void 0===n?void 0:n.getNextIndicatorIndex())),null!=t[e]?""+t[e]:i}getSelectListForKey(t){var e,n,i;const s=[];
1switch(t){case"linkedTo":const o=this.chartInstrumentList.getInstrumentNameIdList(),l=Ba.includes(this.indicatorType)?this.chartInstrumentList.getVolumeNameIdList():[];ml.includes(this.indicatorType)||s.push(...o,...l);break;case"index":const u=null===(n=null===(e=this.selectedChartInstrument)||void 0===e?void 0:e.getInstrumentSettings())||void 0===n?void 0:n.dataType,d=null!==(i=this.chartIndicators)&&void 0!==i&&i.shouldAddOhlcHint(this.indicatorType,this.selectedChartInstrument)?[[this.languageHandler.get(ht.kLanguageKeySetting,"open"),"0"],[this.languageHandler.get(ht.kLanguageKeySetting,"high"),"1"],[this.languageHandler.get(ht.kLanguageKeySetting,"low"),"2"],[this.languageHandler.get(ht.kLanguageKeySetting,"close"),"3"]]:[[this.languageHandler.get(ht.kLanguageKeySetting,u||"close"),"0"]];s.push(...d);break;case"smoothingMethod":case"smoothingMethodD":case"smoothingMethodslowD":s.push([this.languageHandler.get(this.languageKey,"smoothingMethodSma"),"SMA"],[this.languageHandler.get(this.languageKey,"smoothingMethodEma"),"EMA"],[this.languageHandler.get(this.languageKey,"smoothingMethodWma"),"WMA"])}return s}addAfterElementForKey(t,e,n){var i;if("linkedTo"===n){const s="index",o=this.getSelectListForKey(n),l=this.getSelectedItem(o,n,this.params);if(null==l)return;this.selectedChartInstrument=this.chartInstrumentList.getChartInstrumentById(l);const u=this.getLastFloatingDiv(t);if(u){const d=this.getSelectListForKey(s);e[s]=this.createSelectElementAfter(u,s,d,this.getSelectedItem(d,s,this.params),this.viewChangeCallback)}null!==(i=e[s])&&void 0!==i&&i.style&&(e[s].style.display=this.selectedChartInstrument?"inline":"none")}}sortIndicatorParams(t,e){return"linkedTo"===t?-1:"linkedTo"===e?1:"primarySeriesId"===t?-1:"primarySeriesId"===e?1:"primaryFactor"===t?-1:"primaryFactor"===e?1:"operator"===t?-1:"operator"===e?1:"secondarySeriesId"===t?-1:"secondarySeriesId"===e?1:"secondaryFactor"===t?-1:"secondaryFactor"===e?1:"period"===t?-1:"period"===e?1:"togglePercentRsi"===t?-1:"togglePercentRsi"===e?1:"shortPeriod"===t?-1:"shortPer
1iod"===e?1:"smoothingPeriodLongTSI"===t?-1:"smoothingPeriodLongTSI"===e?1:"weightShort"===t?-1:"weightShort"===e?1:"smoothingMethodShort"===t?-1:"smoothingMethodShort"===e?1:"smoothingMethodLongTSI"===t?-1:"smoothingMethodLongTSI"===e?1:"middlePeriod"===t?-1:"middlePeriod"===e?1:"weightMiddle"===t?-1:"weightMiddle"===e?1:"longPeriod"===t?-1:"longPeriod"===e?1:"smoothingPeriodShortTSI"===t?-1:"smoothingPeriodShortTSI"===e?1:"weightLong"===t?-1:"weightLong"===e?1:"smoothingMethodLong"===t?-1:"smoothingMethodLong"===e?1:"smoothingMethodShortTSI"===t?-1:"smoothingMethodShortTSI"===e||t.match(/color.+/)?1:e.match(/color.+/)?-1:"negativeColor"===t?1:"negativeColor"===e?-1:"color"===t?1:"color"===e?-1:0}}const cu={};class du extends Pr{constructor(t,e){super(t,!1),this.chartInstrumentList=e,this.chartAnnotations=this.chartInstrumentList.getChartAnnotations(),this.languageHandler=this.chartInstrumentList.getLanguageHandler(),this.languageKey=ht.kLanguageKeyAnnotationSetting,this.navigation=[]}initUserParams(){this.userParamsViewGroups=r.InfrontUtil.deepCopy(cu)}openModal(t,e){var n;this.initUserParams(),this.params={},this.chartAnnotations.setAnnotationSettingsParams(e,this.params),this.modalCallback=t,r.Infront.DEBUG_WIDGETS_MODALS&&r.Infront.log("Modal/AnnotationSettings (openModal):","options=",e,"params=",this.params),null!=this.params&&!(null===(n=Object.keys(this.params))||void 0===n)&&n.length||t(null),this.init("annotation-settings"),this.addHeader(this.chartAnnotations.getAnnotationSettingsHeader(e));const i={};this.viewChangeCallback=s=>{this.params=this.getFormParams(i),this.addForm(this.navigation[this.navigationSelected],i,this.params)},this.addForm(this.navigation[this.navigationSelected],i,this.params)}isInputColorKey(t){return this.chartAnnotations.isAnnotationSettingsInputColorKey(t)}getFormParams(t){if(null==t)return;const e={};return Object.entries(t).forEach(([n,i])=>{var s;if(!i)return;const o=i.type;if(this.isInputColorKey(n)){const l=null===(s=i.style)||void 0===s?void 0:s.backgroundColor,u=l?Bt.getAnnotationColorHexAlphaOrSpecial(""+l):null;e[n]=u}else if("checkbox"===o)e[n]=!!t[n].checked;else{const l=t[n].value,u=""===l||isNaN(+l)?""+l:+l;e[n]=u}}),e}}function uo(a){return a.hasOwnProperty("instrument")}function co(a){return a.hasOwnProperty("name")&&a.hasOwnProperty("items")}function Ki(a){return a.hasOwnProperty("isSeparator")}function Ya(a){return a.hasOwnProperty("ticker")&&a.hasOwnProperty("feed")}const ho={FULL_NAME:"INSTRUMENT_FULL_NAME"},Wa={lastItem:"cell-dropdown-list__content-item--last"},Si={item:"cell-dropdown-list__content-item",indexSuffix:"cell-dropdown-list__content-item--",selected:"cell-custom-dropdown-selector__item--selected",group:" cell-custom-dropdown-selector__item--group",classificationSuffix:"cell-dropdown-list__content-item__symbol-classification--",separator:"cell-dropdown-list__content-item--separator"},Ka={row:"cell-dropdown-list__row"},za={hasResults:"cell-dropdown-list__selector-scrollarea--has-search-results"},ja={usesInitialListfieldConfig:"cell-dropdown-list__selector__result-container--initial-list-field-config"},xr={label:"cell-dropdown-list__content-item--separator-label",icon:"cell-dropdown-list__content-item-icon",expanded:"cell-dropdown-list__content-item--expanded"},Xa={container:"cell-w-chart-nextgen-dropdown-container",abs:"cell-super-absolute"},hu=50;var go=r.InfrontUtil.BindingFactory;class vo{constructor(){this.popupOffset=0,this.disableSearchOnEnter=!1,this.rightAlignDropDown=!1,this.hiddenLabel=!1}}class nn{constructor(t,e,n){this.currentSearchId=0,this.lastReturnedSearchId=0,this.tabbedOutBeforeResult=!1,this.instrumentHasBeenSelected=!1,this.outsideClickCheckKeyboard=s=>{(s.which||s.keyCode)===r.InfrontUtil.TextInputBinding.kKeycodeEscape&&this.outsideClickCheck(s)},this.outsideClickCheck=s=>{s.target!==this.element&&!this.element.contains(s.target)&&(this.options.showAfterSelect===nn.kShowEmpty&&this.textObserver.set("",!1),this.showResults.set(!1),s)&&s.keyCode===r.InfrontUtil.TextInputBinding.kKeycodeEscape&&this.textObserver.requestFocus()},r.Infront.DEBUG_WIDGET_SEARCHBOX&&r.Infront.log("SearchBox","Create search box widget ...");const i=this.createDefaults();this.options=r.InfrontUtil.mergeRecursive(i,n),"string"==typeof n.popupContainer?this.popupContainer=document.getElementById(n.popupContainer.replace("#","")):"object"==typeof n.popupContainer?this.popupContainer=n.popupContainer:n.popupContainer in O.W&&(n.popupContainer===O.W.BODY&&(this.popupContainer=document.body),this.popupParentType=n.popupContainer),this.resetPopupPosition=n.resetPopupPosition,this.infront=e,this.element=t,this.init()}init(){this.textObserver=new r.InfrontUtil.TextInputBinding;const t=r.InfrontUtil.debounce(e=>this.searchTextUpdated(e),300,!1);this.textObserver.observe(e=>{r.Infront.DEBUG_WIDGET_SEARCHBOX&&r.Infront.log("SearchBox, search text changed",e),this.tabbedOutBeforeResult=!1,t(e)}),this.textObserver.observeSpecialKeys([r.InfrontUtil.TextInputBinding.kKeycodeDownArrow,r.InfrontUtil.TextInputBinding.kKeycodeUpArrow,r.InfrontUtil.TextInputBinding.kKeycodeEscape,r.InfrontUtil.TextInputBinding.kKeycodeEnter,r.InfrontUtil.TextInputBinding.kKeycodeTab,r.InfrontUtil.TextInputBinding.kKeycodeBackspace],e=>this.keyPressed(e)),this.searchResults=new r.InfrontUtil.ObservableArray,this.showResults=new r.InfrontUtil.Observable,this.showResults.set(!1),this.selectedResult=new r.InfrontUtil.Observable,this.selectedResult.set(-1),this.instrumentTypeClassMap={},this.instrumentTypeClassMap[r.InfrontConstants.InstrumentType.STOCK]=O.C.kSearchResultEquity,this.instrumentTypeClassMap[r.InfrontConstants.InstrumentType.INDEX]=O.C.kSearchResultIndex,this.instrumentTypeClassMap[r.InfrontConstants.InstrumentType.FOREX]=O.C.kSearchResultForex,this.instrumentTypeClassMap[r.InfrontConstants.InstrumentType.FUND]=O.C.kSearchResultFund,this.instrumentTypeClassMap[r.InfrontConstants.InstrumentType.FUTURES]=O.C.kSearchResultFuture,this.instrumentTypeClassMap[r.InfrontConstants.InstrumentType.BOND]=O.C.kSearchResultBond,this.instrumentTypeClassMap[r.InfrontConstants.InstrumentType.OPTION]=O.C.kSearchResultOption,this.instrumentTypeClassMap[r.InfrontConstants.InstrumentType.US_OPTION]=O.C.kSearchResultOption,this.instrumentTypeClassMap[r.InfrontConstants.InstrumentType.EURO_OPTION]=O.C.kSearchResultOption,this.instrumentTypeClassMap[r.InfrontConstants.InstrumentType.CERTIFICATE]=O.C.kSearchResultCertificate,this.instrumentItemTypeClassMap={},this.instrumentItemTypeClassMap[r.InfrontConstants.InstrumentType.STOCK]="type-stock",this.instrumentItemTypeClassMap[r.InfrontConstants.InstrumentType.INDEX]="type-index",this.instrumentItemTypeClassMap[r.InfrontConstants.InstrumentType.FOREX]="type-forex",this.instrumentItemTypeClassMap[r.InfrontConstants.InstrumentType.FUND]="type-fund",this.instrumentItemTypeClassMap[r.InfrontConstants.InstrumentType.FUTURES]="type-futures",this.instrumentItemTypeClassMap[r.InfrontConstants.InstrumentType.BOND]="type-bond",this.instrumentItemTypeClassMap[r.InfrontConstants.InstrumentType.OPTION]="type-option",this.instrumentItemTypeClassMap[r.InfrontConstants.InstrumentType.US_OPTION]="type-option",this.instrumentItemTypeClassMap[r.InfrontConstants.InstrumentType.EURO_OPTION]="type-option",this.instrumentItemTypeClassMap[r.InfrontConstants.InstrumentType.CERTIFICATE]="type-certificate",this.selectLastElement=new r.InfrontUtil.Observable,this.selectLastElement.set(!1),this.options.enableMultiSelect?(this.currentElements=new r.InfrontUtil.ObservableArray,this.options.preselectedInstruments&&this.currentElements.replaceWith(this.options.preselectedInstruments)):(r.InfrontUtil.isArray(this.options.preselectedInstruments)||(this.options.preselectedInstruments=[this.options.preselectedInstruments]),this.options.preselectedInstruments.length>0&&(this.textObserver.set(this.getShowAfterSelect({type:r.InfrontConstants.SearchItemType.INSTRUMENT,instrument:this.options.preselectedInstruments[0]}),!1),this.options.instrumentInfoCallback&&this.options.instrumentInfoCallback(!0),this.instrumentHasBeenSelected=!0)),this.targetManager=new r.InfrontUtil.LinkTargetManager,this.buildUI()}createDefaults(){const t=new vo;return t.searchThreshold=3,t.maxResults=5,t.placeholder="",t.showAfterSelect=nn.kShowEmpty,t.fields=["full_name","ticker"],t.autoselectAfterTab=!1,t.searchTickersOnly=!1,t.enableMultiSelect=!1,t.preselectedInstruments=[],t.popupPosition="absolute",t}buildUI(){const t=n=>this.removeElement(n),e=n=>this.textObserver.requestFocus();if("function"==typeof this.options.searchResultCallback){const n=(0,ia.d)(this.element,this.textObserver,this.options.enableMultiSelect,this.currentElements,this.selectLastElement,t,e);this.options.tabIndex&&n.setAttribute("tabindex",this.options.tabIndex+""),this.options.inputWi
1dth&&(n.style.width=this.options.inputWidth),n.placeholder=this.options.placeholder;const i={};i.reInit=i.itemAdded=i.itemRemoved=i.itemMoved=(o,l,u)=>{this.options.searchResultCallback(this.searchResults.get())},this.searchResults.observe(i);const s=r.InfrontUtil.BindingFactory.createInlineBinding(o=>{o||this.options.searchResultCallback([])});this.showResults.observe(s)}else{const n=(0,ia.e)(this.element,this.textObserver,this.searchResults,this.options.fields,this.selectedResult,this.showResults,this.options.enableMultiSelect,this.currentElements,this.selectLastElement,t,e);this.searchField=n.searchfield,this.dropDownEl=n.dropdownContainer,this.dropDownEl.style.position="relative";const i=document.createElement("label");i.textContent=this.options.placeholder,this.searchField.setAttribute("aria-label",this.options.placeholder),this.searchField.setAttribute("id",r.InfrontUtil.makeUUID()),this.searchField.setAttribute("aria-live","polite"),this.options.tabIndex&&this.searchField.setAttribute("tabindex",this.options.tabIndex+""),this.options.inputWi
1dth&&(this.searchField.style.width=this.options.inputWidth),null!=this.options.role&&this.searchField.setAttribute("role",this.options.role),this.searchField.placeholder=this.options.placeholder,new D.S(this.searchField,i,"hide",this.searchField.id,this.options.placeholder);const s=window.getComputedStyle(n.dropdownContainer);this.absolutePosWrapper=document.createElement("div"),this.absolutePosWrapper.style.position=this.options.popupPosition||("fixed"===s.position?"fixed":"absolute"),this.absolutePosWrapper.className="cell-super-absolute",this.absolutePosWrapper.appendChild(n.dropdownContainer),this.popupParentType===O.W.FIRST_PARENT?this.searchField.parentElement.appendChild(this.absolutePosWrapper):this.popupContainer?this.popupContainer.appendChild(this.absolutePosWrapper):document.body.appendChild(this.absolutePosWrapper);const o=r.InfrontUtil.BindingFactory.createInlineBinding(u=>{if(u?r.InfrontUtil.removeClassName(n.dropdownContainer,"cell-display-none"):r.InfrontUtil.addClassName(n.dropdownContainer,"cell-display-none"),u){if(this.searchField.setAttribute("aria-label","Result box open, please press arrow-key down to explore serach results."),!this.resetPopupPosition){const d=this.textObserver.getElement().getBoundingClientRect(),g=document.body.getBoundingClientRect(),C="fixed"===this.absolutePosWrapper.style.position?0:g.left;if(this.absolutePosWrapper.style.top=d.bottom-("fixed"===this.absolutePosWrapper.style.position?0:g.top)+"px",this.options.rightAlignDropDown){const S=this.textObserver.getElement().getBoundingClientRect().width,N=n.dropdownContainer.getBoundingClientRect().width;this.absolutePosWrapper.style.left=d.left-C-(N-S)-this.options.popupOffset+"px"}else this.absolutePosWrapper.style.left=d.left+this.options.popupOffset-C+"px"}r.InfrontUtil.addEventListener(document,"keyup",this.outsideClickCheckKeyboard),r.InfrontUtil.addEventListener(document,"click",this.outsideClickCheck),this.perfectScrollbar&&this.perfectScrollbar.update()}else this.searchField.removeAttribute("aria-label")});if(this.showResults.observe(o),!this.options.enableMultiSelect&&this.options.preselectedInstruments.length>0&&r.InfrontUtil.addClassName(this.textObserver.getElement(),O.C.kInputConfirmed),this.options.dropdownUpdatedCallback){const u=r.InfrontUtil.BindingFactory.createInlineBinding(()=>this.options.dropdownUpdatedCallback(n.dropdownContainer));this.searchResults.lengthObservable.observe(u)}r.Infront.PerfectScrollbar&&(void 0!==this.options.usePerfectScrollbar?this.options.usePerfectScrollbar:r.InfrontUtil.formatSettings.usePerfectScrollbar)&&(this.perfectScrollbar=new r.Infront.PerfectScrollbar(n.dropdownContainer,{suppressScrollX:!0,wheelPropagation:!1}))}}searchTextUpdated(t){this.tabbedOutBeforeResult||this.textObserver.requestFocus(),this.noSearchResultSelected();let e=[];
1if(this.options.processSearch&&(e=this.options.processSearch(t)),t.length>=this.options.searchThreshold){const n=this.currentSearchId,i=new r.Infront.SearchOptions;i.maxResults=this.options.maxResults,i.freeTextTagMustMatch=this.options.matchOnlyOnTags,this.options.itemTypes&&(i.itemTypes=this.options.itemTypes),this.options.instrumentTypes&&(i.instrumentTypes=this.options.instrumentTypes),this.options.feeds&&(i.feeds=this.options.feeds),i.ticker=!0===this.options.searchTickersOnly,this.options.limitToFeeds&&(i.limitToFeeds=this.options.limitToFeeds),this.options.limitToChains&&(i.limitToChains=this.options.limitToChains),i.onError=(s,o)=>{this.lastReturnedSearchId=n,r.Infront.DEBUG_WIDGET_SEARCHBOX&&r.Infront.log("SearchBox, error search",s+" - "+o)},i.onData=s=>{this.lastReturnedSearchId=n,n===this.currentSearchId&&this.processSearchResult(s,e)},this.infront.search(t,i)}else this.showResults.set(!1);this.selectedResult.set(-1),this.selectLastElement.set(!1)}processSearchResult(t,e=[]){var n,i,s,o;r.Infront.DEBUG_WIDGET_SEARCHBOX&&r.Infront.log("SearchBox","Process search results",{data:t});const l=t;let u=[];const d=[];let g,I,C=0;const S=void 0===this.options.flagSource?r.InfrontUtil.formatSettings.flagSource:this.options.flagSource;for(let x=0;x<l.length;x++)if(l[x][r.Infront.MWSConstants.instrument]){const Y=l[x],et=Y[r.Infront.MWSConstants.instrument][r.Infront.MWSConstants.feed];if(!et)continue;Y[r.Infront.MWSConstants.country]&&(Y[r.Infront.MWSConstants.country]=r.Infront.Countries.ensureAlpha2(Y[r.Infront.MWSConstants.country])),"FEED_COUNTRY"!==S&&Y[r.Infront.MWSConstants.country]||(Y[r.Infront.MWSConstants.country]=null===(i=null===(n=this.infront.feedHandler.getFeedMetaData(et))||void 0===n?void 0:n.isoCountry)||void 0===i?void 0:i.toLowerCase()),-1!==d.indexOf(et)||Y[r.Infront.MWSConstants.country]||d.push(et);let rt=Y[r.Infront.MWSConstants.instrument][r.Infront.MWSConstants.instrument_type];4504!==et&&4502!==et||(rt=r.InfrontConstants.InstrumentType.FUND),Y[nn.kClassTypeProperty]=this.instrumentTypeClassMap.hasOwnProperty(rt)?this.instrumentTypeClassMap[rt]:O.C.kSearchResultOther,Y[nn.kItemClassTypeProperty]=this.instrumentItemTypeClassMap.hasOwnProperty(rt)?"cell-search-result__item--"+this.instrumentItemTypeClassMap[rt]:"cell-search-result__item--type-other",Y[r.Infront.MWSConstants.country]&&(Y[r.Infront.MWSConstants.country]="cell-flag  cell-flag-"+Y[r.Infront.MWSConstants.country].toLowerCase()),(null===(s=Y[r.Infront.MWSConstants.instrument][r.Infront.MWSConstants.ticker])||void 0===s?void 0:s.toUpperCase())===(null===(o=this.textObserver.get())||void 0===o?void 0:o.toUpperCase())&&(C++,I||(I=Y),g=Y),Y[r.Infront.MWSConstants.instrument][r.Infront.MWSConstants.full_name]||(Y[r.Infront.MWSConstants.instrument][r.Infront.MWSConstants.full_name]=Y[r.Infront.MWSConstants.ticker]),Y[r.Infront.MWSConstants.instrument][r.Infront.MWSConstants.isin]||(Y[r.Infront.MWSConstants.instrument][r.Infront.MWSConstants.isin]=Y[r.Infront.MWSConstants.isin]),this.options.filter&&!this.options.filter(Y)||u.push(Y)}else if(l[x][r.Infront.MWSConstants.chain]){const Y=l[x][r.Infront.MWSConstants.chain][r.Infront.MWSConstants.feed];-1===d.indexOf(Y)&&d.push(Y);const et=l[x];et[r.Infront.MWSConstants.type]===nn.kTypeChain&&(et[nn.kClassTypeProperty]=O.C.kSearchResultChain),this.options.filter&&!this.options.filter(et)||u.push(et)}r.Infront.DEBUG_WIDGET_SEARCHBOX&&r.Infront.log("SearchBox","Is tab selected: ",this.tabbedOutBeforeResult,this.searchTextOnTab,this.textObserver.get());const N=this.searchTextOnTab,k=r.InfrontUtil.debounce(()=>{if(this.options.autoselectAfterTab&&this.tabbedOutBeforeResult&&C>=1&&N===this.searchTextOnTab&&(r.Infront.DEBUG_WIDGET_SEARCHBOX&&r.Infront.log("SearchBox","Tab selected",N,this.searchTextOnTab,I),this.searchResultSelected(I),I=null,g=null,C=0),this.options.customSortResult&&(u=this.options.customSortResult(u)),this.options.autoselectAfterTab&&this.tabbedOutBeforeResult&&1===C)this.searchResultSelected(g);else{r.Infront.DEBUG_WIDGET_SEARCHBOX&&r.Infront.log("SearchBox","Normal search",{tabbedOutBeforeResult:this.tabbedOutBeforeResult,preciseTickerMatches:C});const et=e.concat(u);this.searchResults.replaceWith(et),this.selectedResult.set(0),this.showResults.set(!0),this.perfectScrollbar&&(this.perfectScrollbar.element.scrollTop=0,this.perfectScrollbar.update(
1))}if(!this.dropDownEl)return;const x=this.dropDownEl?Array.prototype.slice.call(this.dropDownEl.childNodes):[],Y=(et,rt)=>{et.preventDefault(),this.searchResultSelected(this.searchResults.data[rt]),this.showResults.set(!1)};x.forEach((et,rt)=>{r.InfrontUtil.isMobileDevice()?et.addEventListener("touchend",it=>Y(it,rt)):et.addEventListener("click",it=>this.searchResultSelected(this.searchResults.data[rt]))})},300,!1);return d.length>0&&!(this.options.autoselectAfterTab&&this.tabbedOutBeforeResult&&C>=1)?this.infront.getFeedHandler().getFeeds(d,x=>{const Y=[];for(const et of x)Y.push(et.feed);r.Infront.DEBUG_WIDGET_SEARCHBOX&&r.Infront.log("SearchBox","Feed meta data:",Y);for(let et=0;et<u.length;et++)for(let rt=0;rt<x.length;rt++)x[rt].isoCountry&&(u[et][r.Infront.MWSConstants.instrument]?u[et][r.Infront.MWSConstants.instrument][r.Infront.MWSConstants.feed]===x[rt].feed&&(u[et][r.Infront.MWSConstants.country]||(u[et][r.Infront.MWSConstants.country]="cell-flag  cell-flag-"+x[rt].isoCountry.toLowerCase())):u[et][r.Infront.MWSConstants.chain]&&u[et][r.Infront.MWSConstants.chain][r.Infront.MWSConstants.feed]===x[rt].feed&&(u[et][r.Infront.MWSConstants.country]||(u[et][r.Infront.MWSConstants.country]="cell-flag  cell-flag-"+x[rt].isoCountry.toLowerCase())));k()}):k(),!0}keyPressed(t){switch(t){case r.InfrontUtil.TextInputBinding.kKeycodeUpArrow:this.selectedResult.set(this.selectedResult.get()-1),this.selectedResult.get()<0&&this.selectedResult.set(this.searchResults.length()-1);break;case r.InfrontUtil.TextInputBinding.kKeycodeDownArrow:this.selectedResult.set(this.selectedResult.get()+1),this.selectedResult.get()>=this.searchResults.length()&&this.selectedResult.set(0);break;case r.InfrontUtil.TextInputBinding.kKeycodeTab:this.tabbedOutBeforeResult=!0,this.searchTextOnTab=this.textObserver.get(),r.Infront.DEBUG_WIDGET_SEARCHBOX&&r.Infront.log("SearchBox","tab before search. Search text:",this.textObserver.get()),this.searchResults.length()&&this.selectedResult.get()>=0&&this.searchResultSelected(this.searchResults.item(this.selectedResult.get()));break;case r.InfrontUtil.TextInputBinding.kKeycodeEnter:if(this.options.disableSearchOnEnter)break;this.searchResults.length()>0&&this.selectedResult.get()>=0?this.searchResultSelected(this.searchResults.item(this.selectedResult.get())):!this.searchResults.length()&&this.options.emptyResultSelected&&this.options.emptyResultSelected(this.textObserver.get());break;case r.InfrontUtil.TextInputBinding.kKeycodeEscape:this.textObserver.set("");break;case r.InfrontUtil.TextInputBinding.kKeycodeBackspace:this.options.enableMultiSelect&&!this.textObserver.get().length&&this.currentElements.length()&&(this.selectLastElement.get()?(this.removeElement(this.currentElements.lastItem()),this.selectLastElement.set(!1)):this.selectLastElement.set(!0))}}getShowAfterSelect(t){let e;return t[r.Infront.MWSConstants.type]===r.InfrontConstants.SearchItemType.CHAIN||this.options.showAfterSelect===nn.kShowEmpty?e="":this.options.showAfterSelect===nn.kShowTicker?e=t[r.Infront.MWSConstants.instrument][r.Infront.MWSConstants.ticker]:this.options.showAfterSelect===nn.kShowName?e=t[r.Infront.MWSConstants.full_name]:this.options.showAfterSelect===nn.kShowTickerAndFeedCode?(e=t[r.Infront.MWSConstants.instrument][r.Infront.MWSConstants.ticker],e+=" ["+t[r.Infront.MWSConstants.instrument].feed_code+"]"):r.InfrontUtil.isFunction(this.options.showAfterSelect)&&(e=this.options.showAfterSelect(t[r.Infront.MWSConstants.instrument])),e}searchResultSelected(t){if(this.textObserver.set(this.getShowAfterSelect(t),!1),this.showResults.set(!1),this.tabbedOutBeforeResult&&this.textObserver.requestFocus(),t[r.Infront.MWSConstants.type]===r.InfrontConstants.SearchItemType.INSTRUMENT){if(r.InfrontUtil.addClassName(this.textObserver.getElement(),O.C.kInputConfirmed),this.instrumentHasBeenSelected=!0,this.options.instrumentInfoCallback&&this.options.instrumentInfoCallback(!0),t[r.Infront.MWSConstants.type]===r.InfrontConstants.SearchItemType.INSTRUMENT&&this.options.instrumentSelected){const e=r.InfrontUtil.mergeRecursive(new r.Infront.Instrument(t[r.Infront.MWSConstants.instrument][r.Infront.MWSConstants.feed],t[r.Infront.MWSConstants.instrument][r.Infront.MWSConstants.ticker]),t[r.Infront.MWSConstants.instrument]);this.options.instrumentSelected(e)}this.options.instrumentAdded&&this.options.instrumentAdded(t[r.Infront.MWSConstants.instrument]),this.options.enableMultiSelect&&(this.currentElements.push(t[r.Infront.MWSConstants.instrument]),this.targetManager.isLinked()&&this.targetManager.updateTargets(r.InterLibraryLink.DataType.infrontInstrument,t[r.Infront.MWSConstants.instrument]))}else t[r.Infront.MWSConstants.type]===r.InfrontConstants.SearchItemType.CHAIN&&this.options.chainSelected&&this.options.chainSelected(t[r.Infront.MWSConstants.chain])}noSearchResultSelected(){r.InfrontUtil.removeClassName(this.textObserver.getElement(),O.C.kInputConfirmed),this.options.instrumentSelected&&this.instrumentHasBeenSelected&&this.options.instrumentSelected(null),this.options.instrumentInfoCallback&&this.options.instrumentInfoCallback(!1),this.instrumentHasBeenSelected=!1}removeElement(t){this.currentElements.remove(t),this.options.instrumentRemoved&&this.options.instrumentRemoved(t),this.targetManager.isLinked()&&this.targetManager.updateTargets(r.InterLibraryLink.DataType.removeInfrontInstrument,t)}focus(){this.textObserver.requestFocus()}clear(t=!0){this.textObserver.set("",t),this.noSearchResultSelected()}setText(t,e=!0){this.textObserver.set(t,e)}setEnabled(t){this.textObserver.setEnabled(t)}modify(t){this.destroy(),this.options=r.InfrontUtil.mergeRecursive(this.createDefaults(),t),this.init()}destroy(){var t;r.InfrontUtil.removeEventListener(document,"keyup",this.outsideClickCheckKeyboard),r.InfrontUtil.removeEventListener(document,"click",this.outsideClickCheck),this.perfectScrollbar&&this.perfectScrollbar.destroy(),_.W.unbindAll(this.absolutePosWrapper),_.W.unbindAll(this.element),r.InfrontUtil.removeAllChildNodes(this.element),null!==(t=this.absolutePosWrapper)&&void 0!==t&&t.parentElement&&this.absolutePosWrapper.parentElement.removeChild(this.absolutePosWrapper)}link(t){r.InterLibraryLink.targetSupportsType(t,r.InterLibraryLink.DataType.infrontInstrument)&&this.targetManager.addTarget(t)}unlink(t){this.targetManager.removeTarget(t)}}nn.kShowTicker="TICKER",nn.kShowName="FULL_NAME",nn.kShowEmpty="EMPTY",nn.kShowTickerAndFeedCode="NAME+FEEDCODE",nn.kTypeChain="CHAIN",nn.kTypeForex="FOREX",nn.kTypeInstrument="INSTRUMENT",nn.kClassTypeProperty="_typeclass",nn.kItemClassTypeProperty="_itemTypeClass";var mo=r.InfrontUtil.ClassBinding,po=r.InfrontUtil.BindingFactory,fa=r.InfrontUtil.InitialUpdate;class $a{set lastItemElement(t){this._lastItemElement&&r.InfrontUtil.removeClassName(this._lastItemElement,Wa.lastItem),this._lastItemElement=t,this._lastItemElement&&r.InfrontUtil.addClassName(this._lastItemElement,Wa.lastItem)}get lastItemElement(){return this._lastItemElement}constructor(t){var e,n;this.languageModule=ht.kLanguageKeyCompare,this.searchResultItemCache={},this.showScrollbar=new r.InfrontUtil.Observable(!1),null!==(e=t.hasMenu)&&void 0!==e&&e.get()&&(this.positionElement=t.positionElement,this.appendToElement=t.appendToElement||document.body,this.options=t,this.languageHandler=null===(n=t.infrontUI)||void 0===n?void 0:n.languageHandler,this.sharedStorageKey=t.sharedStorageKey,this.dropDownElements=this.getBuildUIElements(),this.init())}init(){this.fieldConfig=this.getFieldConfig(this.options.fieldConfig),this.options.initialListFieldConfig&&(this.initialListFieldConfig=this.getFieldConfig(this.options.initialListFieldConfig)),this.options.tooltipFieldConfig&&(this.tooltipFieldConfig=this.getFieldConfig(this.options.tooltipFieldConfig)),this.initLists(),this.setupAbsoluteWrapper(),this.options.showDropDown.observe(this.getDropDownBinding()),this.setupScrollbarObservers()}getFieldConfig(t){var e;let n;return Array.isArray(t)?(n=[],t.forEach(i=>
1{if(Array.isArray(i)){const s=ke.createFieldsFromNames(this.getAdjustFields(i),[Yt.Unknown],this.languageHandler);n.push(s)}else n.push(...ke.createFieldsFromNames(this.getAdjustFields([i]),[Yt.Unknown],this.languageHandler))}),n):(n={},null===(e=Object.entries(t))||void 0===e||e.forEach(i=>{var s,o,l;Array.isArray(null===(s=i[1])||void 0===s?void 0:s[0])?(n[i[0]]=[],null===(o=i[1])||void 0===o||o.forEach(u=>{n[i[0]].push(ke.createFieldsFromNames(this.getAdjustFields(u),[Yt.Unknown],this.languageHandler))})):r.InfrontUtil.isString(null===(l=i[1])||void 0===l?void 0:l[0])&&(n[i[0]]=[ke.createFieldsFromNames(this.getAdjustFields(i[1]),[Yt.Unknown],this.languageHandler)])}),n)}getAdjustFields(t){return t.map(e=>ho[e]||e)}initLists(){this.resultList=new r.InfrontUtil.ObservableArray,this.resultList.observe({reInit:(t,e)=>{var n,i;this.hasResultsBinding(t),this.resetResultList(e),this.scopeResultContainerStyling(),this.unbindSeparatorIsOpenBindings(),this.createResultListElements(t,this.activeFieldConfig).forEach(s=>this.dropDownElements.resultContainer.appendChild(s)),null===(i=(n=this.options).updateAllSelected)||void 0===i||i.call(n,t,this.addSelected,this.removeSelected)}},r.InfrontUtil.InitialUpdate.None),this.searchList=new r.InfrontUtil.ObservableArray,this.initialList=[],this.storageList=[]}updateResultList(t,e=this.fieldConfig,n=this.tooltipFieldConfig){const i=t?.get();this.addListToCache(i);const s=this.getCompareInstrumentList(i,e,n);this.activeFieldConfig=e,this.resultList.replaceWith(s)}setupAbsoluteWrapper(){this.absolutePosWrapper=document.createElement("div"),this.absolutePosWrapper.style.position="fixed"==this.dropDownElements.openDropDownElement.style.position?"fixed":"absolute",r.InfrontUtil.addClassName(this.absolutePosWrapper,`${Xa.container} ${Xa.abs}`),this.absolutePosWrapper.appendChild(this.dropDownElements.dropDownContainer),this.absolutePosWrapper.style.left="0px",this.absolutePosWrapper.style.right="unset",this.appendToElement.appendChild(this.absolutePosWrapper)}getDropDownBinding(){return r.InfrontUtil.BindingFactory.createInlineBinding(t=>{var e,n,i,s,o,l;if(this.absolutePosWrapper.style.display=t?"block":"none",null===(n=(e=this.options).onPopupStateChange)||void 0===n||n.call(e,t),t){null===(s=(i=this.options).updateAllSelected)||void 0===s||s.call(i,null===(o=this.resultList)||void 0===o?void 0:o.get(),this.addSelected,this.removeSelected);const u=this.appendToElement.getBoundingClientRect(),d=this.positionElement.getBoundingClientRect(),g={left:d.left-u.left,top:d.top-u.top,bottom:d.bottom-u.top};this.absolutePosWrapper.style.left=g.left+"px",this.dropDownElements.dropDownContainer.style.left="0px",this.options.position===li.UP?(this.absolutePosWrapper.style.top=g.top+"px",this.dropDownElements.dropDownContainer.style.bottom="5px"):this.absolutePosWrapper.style.top=g.bottom+"px";const I=document.body.getBoundingClientRect(),C=this.dropDownElements.dropDownContainer.getBoundingClientRect();I.x>C.x?this.dropDownElements.dropDownContainer.style.left=parseFloat(this.dropDownElements.dropDownContainer.style.left)+(I.x-C.x)+"px":I.right<C.right&&(this.dropDownElements.dropDownContainer.style.left=parseFloat(this.dropDownElements.dropDownContainer.style.left)-(C.right-I.right)+"px"),I.top>C.top&&(this.dropDownElements.dropDownContainer.style.top=I.top+"px"),this.dropDownElements.openDropDownElement.blur()}else{const u=null===(l=this.SDKSearchBox)||void 0===l?void 0:l.getSearchInputField();this.options.resetInputOnClose&&u&&(u.value="")}})}setupScrollbarObservers(){var t;const e=this.dropDownElements.scrollContainer,n=parseInt(null===(t=getComputedStyle(e))||void 0===t?void 0:t.maxHeight)||0;this.scrollbarResizeObserver=new ResizeObserver(i=>{var s,o;(null===(o=null===(s=i?.[0])||void 0===s?void 0:s.contentRect)||void 0===o?void 0:o.height)>=n?this.showScrollbar.set(!0):this.showScrollbar.set(!1)}),this.scrollbarResizeObserver.observe(e,{box:"border-box"})}separatorClicked(t){t.isOpen.set(!t.isOpen.get())}addListToCache(t){t?.forEach(e=>{const n=e?.get(r.InfrontSDK.SearchResultField.Ticker),i=e?.get(r.InfrontSDK.SearchResultField.Feed);n&&i&&(this.searchResultItemCache[`${n}~${i}`]=e)})}hasResultsBinding(t){t?.length?r.InfrontUtil.addClassName(this.dropDownElements.scrollContainer,za.hasResults):r.InfrontUtil.removeClassName(this.dropDownElements.scrollContainer,za.hasResults)}scopeResultContainerStyling(){this.activeFieldConfig===this.initialListFieldConfig?r.InfrontUtil.addClassName(this.dropDownElements.resultContainer,ja.usesInitialListfieldConfig):r.InfrontUtil.removeClassName(this.dropDownElements.resultContainer,ja.usesInitialListfieldConfig)}
1resetResultList(t){t?.forEach(e=>{Ki(e)&&e.isOpen.unbindAll()}),r.InfrontUtil.removeAllChildNodes(this.dropDownElements.resultContainer)}getCompareInstrumentList(t,e=this.fieldConfig,n=this.tooltipFieldConfig,i){const s=[];for(let o=0;o<t.length;o++){const l=t[o],u=i?.[o];s.push(u?this.getCompareInstrument(l,e,n,u):this.getCompareInstrument(l,e,n))}return s}getCompareInstrument(t,e=this.fieldConfig,n=this.tooltipFieldConfig,i){const s={symbolClassification:t.get(r.InfrontSDK.SearchResultField.SymbolClassification),ticker:t.get(r.InfrontSDK.SearchResultField.Ticker),feed:t.get(r.InfrontSDK.SearchResultField.Feed)};return i&&(s.overrides=i),[e?.[t.get(r.InfrontSDK.SearchResultField.SymbolClassification)]||e?.[r.InfrontSDK.SymbolClassification.Unknown]||e,n?.[t.get(r.InfrontSDK.SearchResultField.SymbolClassification)]||n?.[r.InfrontSDK.SymbolClassification.Unknown]||n].forEach(o=>{o?.forEach(l=>{Array.isArray(l)?l.forEach(u=>{this.assignItemFieldValue(s,u,t)}):this.assignItemFieldValue(s,l,t)})}),s}assignItemFieldValue(t,e,n){var i;t[e.name]=null!==(i=t?.overrides)&&void 0!==i&&i.hasOwnProperty(e?.name)?e.getSDKValue(n,t.overrides[e.name]):e.getSDKValue(n)}selectItem(t){var e,n,i,s,o;t.ticker&&t.feed&&(null===(n=(e=this.options).resultListItemSelected)||void 0===n||n.call(e,t),this.setStorageList(t),this.options.hasSelectIndication&&(null===(s=(i=this.options).updateAllSelected)||void 0===s||s.call(i,null===(o=this.resultList)||void 0===o?void 0:o.get(),this.addSelected,this.removeSelected)))}expandSeparatorIcon(t){r.InfrontUtil.addClassName(t?.element,xr.expanded)}collapseSeparatorIcon(t){r.InfrontUtil.removeClassName(t?.element,xr.expanded)}addSelected(t){r.InfrontUtil.addClassName(t?.element,Si.selected)}removeSelected(t){r.InfrontUtil.removeClassName(t?.element,Si.selected)}createResultListElements(t,e=this.fieldConfig,n=this.tooltipFieldConfig){const i=[];if(t.length){let s;t.forEach(o=>{var l,u;const d=document.createElement("li");if(d.style.outline="none",d.tabIndex=-1,Ya(o)){const g=e?.[o.symbolClassification]?o.symbolClassification:r.InfrontSDK.SymbolClassification.Unknown;r.InfrontUtil.addClassName(d,`${Si.item} ${Si.group} ${Si.classificationSuffix}${g}`),d.addEventListener("mousedown",()=>{this.selectItem(o)});let C,S=document.createElement("span");r.InfrontUtil.addClassName(S,Ka.row),Array.isArray(e)?C=e:r.InfrontUtil.isObject(e)&&(C=e?.[g]);let N=0;const k=C?.length-1;if(C?.forEach((x,Y)=>{Array.isArray(x)?(S=document.createElement("span"),r.InfrontUtil.addClassName(S,Ka.row),x?.forEach(et=>{this.createInstrumentFieldSpan(et,o,S,N),N++}),d.appendChild(S)):(this.createInstrumentFieldSpan(x,o,S,N),N++,Y===k&&d.appendChild(S))}),n){let x,Y="";if(Array.isArray(n))x=n;else if(r.InfrontUtil.isObject(n)){const et=n?.[o.symbolClassification]?o.symbolClassification:r.InfrontSDK.SymbolClassification.Unknown;x=n?.[et]}x?.forEach((et,rt)=>{var it;Array.isArray(et)?(0!==rt&&(Y+="\n"),et.forEach((gt,mt)=>{var Ct;Y+=(0!==mt?" ":"")+(null!==(Ct=o[gt.name])&&void 0!==Ct?Ct:"")})):Y+=(0!==rt?" ":"")+(null!==(it=o[et.name])&&void 0!==it?it:"")}),S.title=Y}null===(u=null===(l=o.separator)||void 0===l?void 0:l.elements)||void 0===u||u.push(d)}else Ki(o)&&(r.InfrontUtil.addClassName(d,`${Si.item} ${Si.separator}`),d.addEventListener("mousedown",()=>{this.separatorClicked(o)}),this.addSeparatorSpan(o,d),o.elements=[]);o.element=d,i.push(d)});for(let o=t.length-1||0;o>-1;o--){const l=t[o];l&&Ki(l)&&(s?this.addSeparatorIsOpenBinding(l):(s=l,this.addSeparatorIsOpenBinding(l,!0)))}s||(this.lastItemElement=t[t.length-1].element)}return i}createInstrumentFieldSpan(t,e,n,i){const s=document.createElement("span");return null!=e[t.name]?(0,O.i)(null,s,e[t.name]):(s.textContent=r.InfrontUtil.formatSettings.emptyValuePlaceholder,s.style.textAlign="center"),r.InfrontUtil.addClassName(s,`${Si.indexSuffix}${i}`),n.appendChild(s),s}addSeparatorSpan(t,e){const n=document.createElement("span");n.className=`${xr.label}`,n.textContent=t?.translate?this.languageHandler.get(this.languageModule,t.name):t.name;const i=document.createElement("span");i.className=`${xr.icon}`;const s=Ae.getSvgIconElement("dropDownCollapseArrow");i.appendChild(s),e.appendChild(n),e.appendChild(i)}getBuildUIElements(){return function(t,e,n){var i=document.createElement("div");
1t.appendChild(i),i.className="cell-dropdown-list cell-dropdown-list--multi-selection",r.InfrontUtil.addEventListener(i,"click",x=>{x.stopPropagation(),e.openDropDown()}),i.setAttribute("role","button"),r.InfrontUtil.addEventListener(i,"keyup",x=>{var Y=x.which||x.keyCode;13!==Y&&32!==Y||e.openDropDown()}),i.setAttribute("tabindex","0"),r.InfrontUtil.addClassName(i,e.dropDownCssClass?"cell-heading-dropdown--"+e.dropDownCssClass:""),i.setAttribute("style","display:"+(e.hasMenu?"block":"none"));var s=new mo(i,"cell-dropdown-list__selector--active",x=>1==x);e.showDropDown.observe(s,fa.Synchronous),_.W.unbindingManager.registerUnbind(i,()=>{e.showDropDown.unbind(s)});var o=document.createElement("div");if(i.appendChild(o),o.className="cell-noselect cell-dropdown-list__label",1==e.openDropDownElementLabel.isIcon){var l=document.createElement("span");o.appendChild(l),l.className="cell-dropdown-list__label-icon";var u=po.createValueBinding(l,"innerHTML");e.openDropDownElementLabel.label.observe(u,fa.Synchronous),_.W.unbindingManager.registerUnbind(l,()=>{e.openDropDownElementLabel.label.unbind(u)})}if(0==e.openDropDownElementLabel.isIcon){var d=document.createElement("span");o.appendChild(d);var g=po.createValueBinding(d,"innerHTML");e.openDropDownElementLabel.label.observe(g,fa.Synchronous),_.W.unbindingManager.registerUnbind(d,()=>{e.openDropDownElementLabel.label.unbind(g)})}var I=document.createElement("div");i.appendChild(I),I.className="cell-dropdown-list__content cell-dropdown-list__content--adjusted",I.setAttribute("tabindex","0"),r.InfrontUtil.addClassName(I,e.dropDownCssClass?"cell-dropdown-list__selector-wrapper--"+e.dropDownCssClass:"");var C=new mo(I,"scrollbar-hidden",x=>0==x);n.observe(C,fa.Synchronous),_.W.unbindingManager.registerUnbind(I,()=>{n.unbind(C)});var S=document.createElement("div");I.appendChild(S),S.className="cell-dropdown-list__selector cell-dropdown-list__selector__search-container";var N=document.createElement("div");I.appendChild(N),N.className="cell-dropdown-list__selector cell-dropdown-list__selector-scrollarea";var k=document.createElement("ul");return N.appendChild(k),k.className="cell-list-block cell-dropdown-list__selector__result-container",{openDropDownElement:i,dropDownContainer:I,searchContainer:S,scrollContainer:N,resultContainer:k}}(this.positionElement,this.options,this.showScrollbar)}getSearchContainer(){var t;return null===(t=this.dropDownElements)||void 0===t?void 0:t.searchContainer}getResultContainer(){var t;return null===(t=this.dropDownElements)||void 0===t?void 0:t.resultContainer}addSDKSearchBox(t){this.SDKSearchBox=t,this.convertInitialList()}showSearchList(t){this.searchList=t,this.updateResultList(this.searchList)}convertInitialList(){var t,e;const n=this.options.initialList,i=[],s=null!==(t=this.initialListFieldConfig)&&void 0!==t?t:this.fieldConfig;null===(e=n?.list)||void 0===e||e.forEach(o=>{var l;if(co(o)){const u={name:o.name,translate:o.translate,isSeparator:!0,isOpen:new r.InfrontUtil.Observable(!1),instruments:[]},d=new Promise(g=>g(u));i.push(d),null===(l=o.items)||void 0===l||l.forEach(g=>{i.push(this.createCompareInstrumentPromise({ticker:g.instrument.ticker,feed:g.instrument.feed,overrides:g.overrides,separator:u},s))})}uo(o)&&i.push(this.createCompareInstrumentPromise({ticker:o.instrument.ticker,feed:o.instrument.feed,overrides:o.overrides},s))}),Promise.allSettled(i).then(o=>{this.initialList=r.InfrontUtil.getFulfilledPromiseValues(o),this.applyCollapseOption(n?.collapsable,this.initialList),this.activeFieldConfig=this.initialListFieldConfig,this.resultList.replaceWith(this.initialList)})}createCompareInstrumentPromise(t,e=this.fieldConfig,n=this.tooltipFieldConfig){return new Promise((i,s)=>this.SDKSearchBox.getSingleItemBySearchRequest(r.InfrontSDK.SearchType.Symbol,{Ticker:t.ticker,Feed:t.feed}).then(l=>{var u;const d=null===(u=l?.get())||void 0===u?void 0:u[0];if(d){let g;g=t?.overrides?this.getCompareInstrument(d,e,n,t.overrides):this.getCompareInstrument(d,e,n),t.separator&&(g.separator=t.separator),i(g)}s("NewCompareDropDown.createCompareInstrumentPromise - no resultItem")}))}applyCollapseOption(t,e){switch(t){default:case En.CLOSED:break;case En.OPEN:e?.forEach(n=>{Ki(n)&&n.isOpen.set(!0)});break;case En.FIRST:e?.find(n=>Ki(n)).isOpen.set(!0)}}
1addSeparatorIsOpenBinding(t,e=!1){t.isOpen.observe({valueUpdated:n=>{var i;let s;if(n){if(s=o=>r.InfrontUtil.removeClassName(o,O.C.kHiddenClass),e){const o=t.elements;this.lastItemElement=o.length?o[o.length-1]:t.element}}else s=o=>r.InfrontUtil.addClassName(o,O.C.kHiddenClass),e&&(this.lastItemElement=t.element);null===(i=t.elements)||void 0===i||i.forEach(o=>s(o)),n?this.expandSeparatorIcon(t):this.collapseSeparatorIcon(t)}})}showInitialList(){var t,e;this.SDKSearchBox&&null!==(t=this.initialList)&&void 0!==t&&t.length?(this.activeFieldConfig=null!==(e=this.initialListFieldConfig)&&void 0!==e?e:this.fieldConfig,this.resultList.replaceWith(this.initialList)):this.resultList.replaceWith([])}showStorageList(){if(!this.SDKSearchBox)return void this.resultList.replaceWith([]);const t=this.getStorageList();if(!this.listHasChanged(this.storageList,t))return void this.resultList.replaceWith(this.storageList);const e=[];t?.forEach(n=>{var i;const s=null===(i=this.searchResultItemCache)||void 0===i?void 0:i[`${n.ticker}~${n.feed}`];if(s){const o=new Promise(l=>{const u=new r.InfrontUtil.ObservableArray;u.push(s),l(u)});e.push(o)}else{const o=this.SDKSearchBox.getSingleItemBySearchRequest(r.InfrontSDK.SearchType.Symbol,{Ticker:n.ticker,Feed:n.feed});e.push(o)}}),Promise.allSettled(e).then(n=>{const i=r.InfrontUtil.getFulfilledPromiseValues(n),s=r.InfrontUtil.flattenArrayOfObservableArrays(i);this.storageList=this.getCompareInstrumentList(s?.get()),this.activeFieldConfig=this.fieldConfig,this.resultList.replaceWith(this.storageList)})}listHasChanged(t,e){var n,i;const s=Math.max(null!==(n=e?.length)&&void 0!==n?n:0,null!==(i=t?.length)&&void 0!==i?i:0);for(let o=0;o<s;o++){const l=t?.[o],u=e?.[o];if(!u||!l||null==u.ticker||null==u.feed||null==l.ticker||null==l.feed||u.ticker!==l.ticker||u.feed!==l.feed)return!0}return!1}setStorageList(t){var e,n;const i=this.getStorageList()||[],s=i?.findIndex(o=>null!=o?.ticker&&null!=o?.feed&&o.ticker===t.ticker&&o.feed===t.feed);if(s<0)i.unshift({ticker:t.ticker,feed:t.feed}),i.length>50&&(i.length=50);else{if(!(s>0))return;i.splice(s,1),i.unshift({ticker:t.ticker,feed:t.feed})}null===(n=(e=this.options).setGlobalStorage)||void 0===n||n.call(e,this.sharedStorageKey,i)}getStorageList(){var t,e;return null===(e=(t=this.options).getGlobalStorage)||void 0===e?void 0:e.call(t,this.sharedStorageKey)}unbindSeparatorIsOpenBindings(){var t,e;null===(e=null===(t=this.resultList)||void 0===t?void 0:t.get())||void 0===e||e.forEach(n=>{var i;Ki(n)&&(null===(i=n.isOpen)||void 0===i||i.unbindAll())})}destroy(){var t,e,n,i,s,o,l;!(null===(t=this.absolutePosWrapper)||void 0===t)&&t.parentElement&&this.absolutePosWrapper.parentElement.removeChild(this.absolutePosWrapper),this.unbindSeparatorIsOpenBindings(),null===(e=this.searchList)||void 0===e||e.unbindAll(),null===(n=this.resultList)||void 0===n||n.unbindAll(),null===(s=null===(i=this.options)||void 0===i?void 0:i.showDropDown)||void 0===s||s.unbindAll(),null===(o=this.scrollbarResizeObserver)||void 0===o||o.disconnect(),null===(l=this.showScrollbar)||void 0===l||l.unbindAll()}}var Ur=r.InfrontUtil.ClassBinding,gu=r.InfrontUtil.BindingFactory,lr=r.InfrontUtil.InitialUpdate,qa=r.InfrontUtil.ClassBinding,Za=r.InfrontUtil.InitialUpdate;const Io=">=9.1.0 <=9.3.3 || 10.3.3 || 11.4.8 || 12.6.0";class mu extends Fn.W{constructor(t,e,n){super(t,e,"chartwidget",n),this.chartDropDowns={topToolbar:{},bottomToolbar:{}},this.toggleMenuList=Object.values(pe),this.toggleMenuListToDropDownMapping={[pe.TOP_CHART_TYPE]:{toolbar:"topToolbar",dropDown:"chartTypeMenu"},[pe.TOP_PERIOD]:{toolbar:"topToolbar",dropDown:"periodMenu"},[pe.TOP_RESOLUTION]:{toolbar:"topToolbar",dropDown:"resolutionMenu"},[pe.TOP_INDICATOR]:{toolbar:"topToolbar",dropDown:"indicatorMenu"},[pe.TOP_COMPARE]:{toolbar:"topToolbar",dropDown:"compareMenu"},[pe.TOP_NEW_COMPARE]:{toolbar:"topToolbar",dropDown:"newCompareMenu"},[pe.TOP_ANNOTATION]:{toolbar:"topToolbar",dropDown:"annotationMenu"},[pe.TOP_TEMPLATE]:{toolbar:"topToolbar",dropDown:"templateMenu"},[pe.TOP_CURRENCY]:{toolbar:"topToolbar",dropDown:"currencyMenu"},[pe.BOTTOM_PERIOD]:{toolbar:"bottomToolbar",dropDown:"periodMenu"},[pe.BOTTOM_RESOLUTION]:{toolbar:"bottomToolbar",dropDown:"resolutionMenu"}},this.isAuto=new r.InfrontUtil.Observable(!1),this.openGlobalSettings=this.openGlobalSettings.bind(this),this.openInstrumentSettings=this.openInstrumentSettings.bind(this),this.openIndicatorSettings=this.openIndicatorSettings.bind(this),this.openAnnotationSettings=this.openAnnotationSettings.bind(this),this.initChecks(t,e,n),this.constructFromOptions(t,e,n),this.chartStorage.restoreSettingsFromStorage(),this.syncGlobalChartSettings(),this.initObservers(),this.chartInstrumentList.getLength()||this.chartInstrumentList.init(n.instruments,n.indicators),this.globalChartSettings.needDataReload=!0,this.updateChart(!1)}initChecks(t,e,n){var i,s;
1const o=null===(i=globalThis?.Highcharts)||void 0===i?void 0:i.version;r.Infront.DEBUG_WIDGET_CHART_NG&&(r.Infront.log(`ChartWidget: SDK version ${null===(s=e?.sdk)||void 0===s?void 0:s.version()}`),r.Infront.log(`ChartWidget: Highcharts version ${o}`)),(0,D.j)(o,Io)||r.InfrontUtil.errorLog(`ChartWidget: Highcharts version "${o}" is not supported!`,{SUPPORTED_HIGHCHARTS_VERSIONS:Io}),Bt.isValidColorMatrix()||r.InfrontUtil.errorLog("ChartWidget: ChartColor has invalid color matrix, please fix!")}shouldRequestIndicatorFeature(t){var e,n,i;return!!t.topToolbar.indicatorMenu||!(null===(e=t.indicators)||void 0===e||!e.length)||!(null===(i=null===(n=this.getStoredValue("indicatorSettings"))||void 0===n?void 0:n.indicatorList)||void 0===i||!i.length)}shouldRequestAnnotationFeature(t){var e,n;return!!t.topToolbar.annotationMenu||!(null===(n=null===(e=this.getStoredValue("annotationsSettings"))||void 0===e?void 0:e.annotationList)||void 0===n||!n.length)}initChartObjects(t){this.chartInstrumentList=new ao(this.languageHandler,this.shouldRequestIndicatorFeature
1(t),this.shouldRequestAnnotationFeature(t)),this.globalChartSettings=this.chartInstrumentList.getGlobalChartSettings(),this.chartStorage=new so(this,this.chartInstrumentList),this.chartInstrumentList.setWidgetChartStorage(this.chartStorage),this.chartWrapper=this.chartInstrumentList.getChartWrapper(),this.chartOptions=this.chartInstrumentList.getChartOptions(),this.chartLegend=this.chartInstrumentList.getChartLegend()}constructFromOptions(t,e,n){const i=new La;if(this.initChartObjects(n),this.globalChartSettings.element=t,this.globalChartSettings.ownsSource&&this.globalChartSettings.source.destroy(),n.source?(this.globalChartSettings.ownsSource=!1,this.globalChartSettings.source=n.source):(this.globalChartSettings.ownsSource=!0,this.globalChartSettings.source=new xl(e?.sdk)),this.globalChartSettings.chartType=n.chartType,this.globalChartSettings.cursorType=n.cursorType,this.globalChartSettings.cursorSnapX=!!n.cursorSnapX,this.globalChartSettings.cursorSnapY=!!n.cursorSnapY,this.globalChartSettings.cursorEventsEnabled=!!n.cursorEventsEnabled,this.globalChartSettings.showHighLow=!!n.showHighLow,this.globalChartSettings.showHigh=!!n.showHigh,this.globalChartSettings.highColor=n.highColor,this.globalChartSettings.highFontSize=n.highFontSize,this.globalChartSettings.highPlotlineOptions=n.highPlotlineOptions,this.globalChartSettings.showLow=!!n.showLow,this.globalChartSettings.lowColor=n.lowColor,this.globalChartSettings.lowFontSize=n.lowFontSize,this.globalChartSettings.lowPlotlineOptions=n.lowPlotlineOptions,this.globalChartSettings.prevCloseType=n.prevCloseType,this.globalChartSettings.showPrevClose=!!n.showPrevClose,this.globalChartSettings.isPrevCloseCompareValue=!!n.isPrevCloseCompareValue,this.globalChartSettings.showNavigator=!!n.showNavigator,this.globalChartSettings.navigatorHeight=n.navigatorHeight,this.globalChartSettings.navigatorMargin=n.navigatorMargin,this.globalChartSettings.navigatorHandlesEnabled=!!n.navigatorHandlesEnabled,this.globalChartSettings.navigatorHandlesSymbols=n.navigatorHandlesSymbols,this.globalChartSettings.navigatorHandlesHeight=n.navigatorHandlesHeight,this.globalChartSettings.navigatorHandlesWidth=n.navigatorHandlesWidth,this.globalChartSettings.navigatorScrollFactor=n.navigatorScrollFactor,this.globalChartSettings.hasNavigatorScroll=!1!==n.hasNavigatorScroll,this.globalChartSettings.showVolume=!!n.showVolume,this.globalChartSettings.showVolumeUnderlay=!!n.showVolumeUnderlay,this.globalChartSettings.volumeType=n.volumeType,this.globalChartSettings.volumeAlpha=n.volumeAlpha,this.globalChartSettings.volumePositiveColor=n.volumePositiveColor,this.globalChartSettings.volumeNegativeColor=n.volumeNegativeColor,this.globalChartSettings.mainDataType=this.chartInstrumentList.isValidDataType(n.mainDataType)?n.mainDataType:Gt.CLOSE,this.globalChartSettings.secondaryChartType=n.secondaryChartType,this.globalChartSettings.secondaryColorType=n.secondaryColorType,this.globalChartSettings.secondaryColorTransparency=n.secondaryColorTransparency,this.globalChartSettings.dataTypePreferOhlcOnShortage=!!n.dataTypePreferOhlcOnShortage,this.globalChartSettings.streaming=!!n.streaming,this.globalChartSettings.caching=!!n.caching,this.globalChartSettings.adjustDividends=!!n.adjustDividends,this.globalChartSettings.adjustSplits=!!n.adjustSplits,this.globalChartSettings.adjustStartDate=!!n.adjustStartDate,this.globalChartSettings.loadIntradayIndicatorsExtraData=!!n.loadIntradayIndicatorsExtraData,this.globalChartSettings.mainOnTop=!!n.mainOnTop,this.globalChartSettings.showLegend=!!n.showLegend,this.globalChartSettings.showTooltip=!!n.showTooltip,this.globalChartSettings.showSplits=!!n.showSplits,this.globalChartSettings.showDividends=!!n.showDividends,this.globalChartSettings.showCalendar=!!n.showCalendar,this.globalChartSettings.calendarFeeds=i.filterValidCalendarFeeds(n),this.globalChartSettings.showNews=!!n.showNews,this.globalChartSettings.showReleases=!!n.showReleases,this.globalChartSettings.companyEventSmallDots=!!n.companyEventSmallDots,this.globalChartSettings.watermarkType=n.watermarkType,this.globalChartSettings.watermarkCustomText=n.watermarkCustomText,this.globalChartSettings.watermarkMaxFontSize=isNaN(n.watermarkMaxFontSize)?void 0:n.watermarkMaxFontSize,this.globalChartSettings.watermarkMaxHeightPercent=isNaN(n.watermarkMaxHeightPercent)?void 0:n.watermarkMaxHeightPercent,this.globalChartSettings.watermarkMaxWidthPercent=isNaN(n.watermarkMaxWidthPercent)?void 0:n.watermarkMaxWidthPercent,this.globalChartSettings.showLogo=!!n.showLogo,this.globalChartSettings.logo=n.logo,this.globalChartSettings.indicatorsBasedOnResolution=!!n.indicatorsBasedOnResolution,this.globalChartSettings.useNativeAnnotationSettings=!!n.useNativeAnnotationSettings,this.globalChartSettings.showOrdinate=!!n.showOrdinate,this.globalChartSettings.ordinateType=n.ordinateType,this.globalChartSettings.ordinateScaling=n.ordinateScaling,this.globalChartSettings.areaStacking=n.areaStacking,this.globalChartSettings.ordinateCompareBase=n.ordinateCompareBase,this.globalChartSettings.showOppositeOrdinate=!!n.showOppositeOrdinate,this.globalChartSettings.showSeriesLabels=!!n.showSeriesLabels,this.globalChartSettings.ordinateLabelsOutside=!!n.ordinateLabelsOutside,this.globalChartSettings.gridType=n.gridType,this.globalChartSettings.showAlternateGridColor=!!n.showAlternateGridColor,this.globalChartSettings.axisDateTimeLabelFormats=n.axisDateTimeLabelFormats,this.globalChartSettings.decimals=n.decimals,this.globalChartSettings.decimalsPercentage=n.decimalsPercentage,this.globalChartSettings.tooltipDecimals=n.tooltipDecimals,this.globalChartSettings.tooltipDecimalsPercentage=n.tooltipDecimalsPercentage,this.globalChartSettings.yAxisLabelDecimals=n.yAxisLabelDecimals,this.globalChartSettings.yAxisLabelDecimalsPercentage=n.yAxisLabelDecimalsPercentage,this.globalChartSettings.oppositeYAxisLabelDecimals=n.oppositeYAxisLabelDecimals,this.globalChartSettings.oppositeYAxisLabelDecimalsPercentage=n.oppositeYAxisLabelDecimalsPercentage,this.globalChartSettings.seriesLabelDecimals=n.seriesLabelDecimals,this.globalChartSettings.seriesLabelDecimalsPercentage=n.seriesLabelDecimalsPercentage,this.globalChartSettings.oppositeSeriesLabelDecimals=n.oppositeSeriesLabelDecimals,this.globalChartSettings.oppositeSeriesLabelDecimalsPercentage=n.oppositeSeriesLabelDecimalsPercentage,this.globalChartSettings.crosshairLabelDecimals=n.crosshairLabelDecimals,this.globalChartSettings.crosshairLabelDecimalsPercentage=n.crosshairLabelDecimalsPercentage,this.globalChartSettings.oppositeCrosshairLabelDecimals=n.oppositeCrosshairLabelDecimals,this.globalChartSettings.oppositeCrosshairLabelDecimalsPercentage=n.oppositeCrosshairLabelDecimalsPercentage,this.globalChartSettings.callbackChartFields=n.callbackChartFields,this.globalChartSettings.decimalsCallback=n.decimalsCallback,this.globalChartSettings.tooltipDecimalsCallback=n.tooltipDecimalsCallback,this.globalChartSettings.yAxisLabelDecimalsCallback=n.yAxisLabelDecimalsCallback,this.globalChartSettings.seriesLabelDecimalsCallback=n.seriesLabelDecimalsCallback,this.globalChartSettings.oppositeSeriesLabelDecimalsCallback=n.oppositeSeriesLabelDecimalsCallback,this.globalChartSettings.oppositeYAxisLabelDecimalsCallback=n.oppositeYAxisLabelDecimalsCallback,this.globalChartSettings.crosshairLabelDecimalsCallback=n.crosshairLabelDecimalsCallback,this.globalChartSettings.oppositeCrosshairLabelDecimalsCallback=n.oppositeCrosshairLabelDecimalsCallback,this.globalChartSettings.onPopupStateChange=n.onPopupStateChange,this.globalChartSettings.onPointMouseOver=n.onPointMouseOver,this.globalChartSettings.globalSettingsNavigation=n.globalSettingsNavigation,this.globalChartSettings.globalSettingsViewGroup=n.globalSettingsViewGroup,this.globalChartSettings.instrumentSettingsNavigation=n.instrumentSettingsNavigation,this.globalChartSettings.instrumentSettingsViewGroup=n.instrumentSettingsViewGroup,this.globalChartSettings.showTopToolbar=ne
1w r.InfrontUtil.Observable(!!Object.values(n.topToolbar).find(s=>!0===s)),this.globalChartSettings.showBottomToolbar=new r.InfrontUtil.Observable(!!Object.values(n.bottomToolbar).find(s=>!0===s)),this.globalChartSettings.topToolbarLabels=n.topToolbarLabels,this.globalChartSettings.bottomToolbarLabels=n.bottomToolbarLabels,this.globalChartSettings.legendItemClick=n.legendItemClick||Bn.EDIT_REMOVE_SERIES,this.globalChartSettings.currentStartDate=new r.InfrontUtil.Observable,this.globalChartSettings.currentEndDate=new r.InfrontUtil.Observable,this.globalChartSettings.dataStartDate=new Date,this.globalChartSettings.dataEndDate=new Date,i.initCalendarFeedList(this.globalChartSettings),this.progressIndicator=new Sa.P(this.element),this.initColors(n),this.initThrottleTimes(n),this.initThemeChangeObserver(),this.initSearchBox(n),this.initChartTypeMenu(n),this.initPeriodResolution(n),this.initIndicatorMenu(n),this.initAnnotationMenu(n),this.initTemplateMenu(n),this.initCompareMenu(n),this.initNewCompareMenu(n),this.initCursorMenu(n),this.initCurrencyMenu(n),this.initSettingsMenu(n),this.initInstrumentHeader(n),this.initFullScreenButton(n),n.startDate&&n.endDate)this.setSelectedPeriod(lt.CUSTOM,n.startDate,n.endDate);else{const s=fe.getPeriodFromSelectablePeriod(n.defaultPeriod);this.setSelectedPeriod(s)}this.chartWrapper.onReadyGlobalChartSettings()}initColors(t){var e,n,i,s,o;this.globalChartSettings.mainBackgroundColor=Bt.getChartBackgroundColor(this.element),this.globalChartSettings.instrumentColorList=Bt.getInstrumentColorList(this.element,t.colors),this.globalChartSettings.indicatorColorList=Bt.getIndicatorColorList(this.element,t.indicatorColors),this.globalChartSettings.annotationColorList=Bt.getAnnotationColorList(this.element,t.annotationColors),this.globalChartSettings.labelAlpha=null!==(e=t.labelAlpha)&&void 0!==e?e:"FF",this.globalChartSettings.labelOutsideAlpha=null!==(n=t.labelOutsideAlpha)&&void 0!==n?n:"FF",this.globalChartSettings.labelTextAlpha=null!==(i=t.labelTextAlpha)&&void 0!==i?i:"FF",this.globalChartSettings.labelTextOutsideAlpha=null!==(s=t.labelTextOutsideAlpha)&&void 0!==s?s:"FF",this.globalChartSettings.legendAlpha=null!==(o=t.legendAlpha)&&void 0!==o?o:"FF"}initThemeChangeObserver(){this.throttledOnThemeMaybeChanged=r.InfrontUtil.throttle(this.onThemeMaybeChanged.bind(this),this.globalChartSettings.updateTimeout),this.disconnectThemeChangeObserver=function(t,e){const n=new MutationObserver(e),i={attributes:!0,attributeFilter:["class"]};for(let s=t;null!=s;s=s.parentElement)n.observe(s,i);return()=>n.disconnect()}(this.element,this.throttledOnThemeMaybeChanged),this.disconnectStylesheetChangeObserver=function(t){const e=new MutationObserver(n=>{for(const i of n)"attributes"===i.type&&i.target instanceof HTMLLinkElement?i.target.addEventListener("load",t,{once:!0}):"childList"===i.type&&i.addedNodes.forEach(s=>{s instanceof HTMLLinkElement?s.addEventListener("load",t,{once:!0}):s instanceof HTMLStyleElement&&t()})});return e.observe(document.head,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["href"]}),()=>e.disconnect()}(this.throttledOnThemeMaybeChanged)}onThemeMaybeChanged(){const t=JSON.stringify([this.globalChartSettings.mainBackgroundColor,this.globalChartSettings.instrumentColorList,this.globalChartSettings.indicatorColorList,this.globalChartSettings.annotationColorList]);if(this.initColors(this.options),t!==JSON.stringify([this.globalChartSettings.mainBackgroundColor,this.globalChartSettings.instrumentColorList,this.globalChartSettings.indicatorColorList,this.globalChartSettings.annotationColorList])){const e=this.chartWrapper.getHighcharts();null!=e&&this.chartWrapper.isAnnotationFeatureAvailable()&&(Xs.setDefaultColors(e,this.chartInstrumentList),ai.refreshColors(e,this.chartInstrumentList),or.refreshColors(e,this.chartInstrumentList),Va.refreshColors(e,this.chartInstrumentList),Fa.refreshColors(e,this.chartInstrumentList)),this.chartWrapper.requestUpdateChart(!0)}}initThrottleTimes(t){this.globalChartSettings.updateTimeout=!r.InfrontUtil.isNumber(t.updateTimeout)||t.updateTimeout<50?300:t.updateTimeout,this.globalChartSettings.redrawTimeout=!r.InfrontUtil.isNumber(t.redrawTimeout)||t.redrawTimeout<50?300:t.redrawTimeout,this.globalChartSettings.reflowTimeout=!r.InfrontUtil.isNumber(t.reflowTimeout)||t.reflowTimeout<5?50:t.reflowTimeout}initSearchBox(t){this.hasSearchBox=new r.InfrontUtil.Observable(!!t.topToolbar.searchBox
1)}initChartTypeMenu(t){this.hasChartTypeMenu=new r.InfrontUtil.Observable(!!t.topToolbar.chartTypeMenu),this.selectedChartType=new r.InfrontUtil.Observable(t.chartType),this.selectedChartTypeIcon=new r.InfrontUtil.Observable,this.openChartTypeMenu=new r.InfrontUtil.Observable(!1),this.chartTypes=new r.InfrontUtil.ObservableArray,this.selectedChartType.observe({valueUpdated:i=>{this.selectedChartTypeIcon.set(Ae.getSvgIcon(i))}});const e=this.chartWrapper.isHeikinashiFeatureAvailable(),n=this.chartWrapper.isHollowCandlestickFeatureAvailable();t.chartTypes.forEach(i=>{if(!e&&i===wt.HEIKINASHI||!n&&i===wt.HOLLOWCANDLESTICK)return;const s={id:i,label:this.languageHandler.get(ht.kLanguageKey,i),name:i,selected:new r.InfrontUtil.Observable(this.selectedChartType.get()===i),icon:Ae.getSvgIcon(i),available:new r.InfrontUtil.Observable};this.chartTypes.push(s)})}initPeriodResolution(t){this.globalChartSettings.currentResolution=t.autoResolution?F.AUTO:t.defaultResolution,this.options.selectablePeriods=fe.getSelectablePeriodList(this.options.selectablePeriods),this.periods=new r.InfrontUtil.ObservableArray,this.chartInstrumentList.setWidgetPeriods(this.periods),this.selectedPeriodName=new r.InfrontUtil.Observable,this.hasPeriodMenu=new r.InfrontUtil.Observable(!!t.topToolbar.periodMenu),this.openPeriodMenu=new r.InfrontUtil.Observable(!1),this.hasBottomPeriodMenu=new r.InfrontUtil.Observable(!!t.bottomToolbar.periodMenu),this.openBottomPeriodMenu=new r.InfrontUtil.Observable(!1),this.selectedPeriodId=new r.InfrontUtil.Observable,this.hasBottomPeriodButtons=new r.InfrontUtil.Observable(!!t.bottomToolbar.periodButtons),Ke.isValidDefaultResolutions(t.defaultResolutions)?Ke.DEFAULT_RESOLUTIONS=Object.assign(Object.assign({},Ke.DEFAULT_RESOLUTIONS),t.defaultResolutions):null!=t.defaultResolutions&&r.InfrontUtil.errorLog("ChartWidget: Invalid options.defaultResolutions!"),this.globalChartSettings.currentResolutionList=new r.InfrontUtil.ObservableArray,this.selectedResolutionName=new r.InfrontUtil.Observable,this.hasResolutionMenu=new r.InfrontUtil.Observable(!!t.topToolbar.resolutionMenu),this.openResolutionMenu=new r.InfrontUtil.Observable(!1),this.hasBottomResolutionMenu=new r.InfrontUtil.Observable(!!t.bottomToolbar.resolutionMenu),this.openBottomResolutionMenu=new r.InfrontUtil.Observable(!1)}initIndicatorMenu(t){const e=this.chartWrapper.isIndicatorFeatureAvailable();this.hasIndicatorMenu=new r.InfrontUtil.Observable(!!t.topToolbar.indicatorMenu&&e),this.openIndicatorMenu=new r.InfrontUtil.Observable(!1),this.indicators=new r.InfrontUtil.ObservableArray,this.chartInstrumentList.getChartIndicators().createAvailableIndicators(this.indicators,t)}initAnnotationMenu(t){const e=this.chartWrapper.isAnnotationFeatureAvailable();this.hasAnnotationMenu=new r.InfrontUtil.Observable(!!t.topToolbar.annotationMenu&&e),this.openAnnotationMenu=new r.InfrontUtil.Observable(!1),this.annotations=new r.InfrontUtil.ObservableArray,this.chartInstrumentList.getChartAnnotations().createAvailableAnnotations(this.annotations,t)}initTemplateMenu(t){var e;this.globalChartSettings.availableCustomTemplates=null!==(e=t.availableCustomTemplates)&&void 0!==e?e:{};const n=this.chartWrapper.isIndicatorFeatureAvailable();this.hasTemplateMenu=new r.InfrontUtil.Observable(!!t.topToolbar.templateMenu&&n),this.openTemplateMenu=new r.InfrontUtil.Observable(!1),this.templates=new r.InfrontUtil.ObservableArray,this.chartInstrumentList.getChartTemplates().createAvailableTemplates(this.templates,t?.selectableTemplates)}initCompareMenu(t){this.hasCompareMenu=new r.InfrontUtil.Observable(!!t.topToolbar.compareMenu),this.openCompareMenu=new r.InfrontUtil.Observable(!1),this.compareList=new r.InfrontUtil.ObservableArray,Di.createItems(t.selectableCompare,this.compareList,null,this.languageHandler,ht.kLanguageKeyCompare,(e,n)=>{var i;e.id=JSON.stringify(n.item),e.name=null===(i=n.item)||void 0===i?void 0:i.ticker,["icon","iconAfter"].forEach(s=>{if(null!=n?.[s])if(r.InfrontUtil.isPrimitive(n[s])){const o=Zr.getCountryFlag(n[s],16);r.InfrontUtil.addClassName(o,"icon-image"),e[s]={primitive:o.outerHTML}}else[SVGElement,HTMLImageElement].some(o=>n[s]instanceof o)&&(e[s]={primitive:n[s].outerHTML})})})}initNewCompareMenu(t){this.hasNewCompareMenu=new r.InfrontUtil.Observable(!!t.topToolbar.newCompareMenu),this.openNewCompareMenu=new r.InfrontUtil.Observable(!1)}initCursorMenu(t){this.hasCursorEventsButton=new r.InfrontUtil.Observable(!!t.topToolbar.cursorEventsButton),this.cursorEventsEnabled=new r.InfrontUtil.Observable(!!this.globalChartSettings.cursorEventsEnabled),this.hasCursorTypeMenu=new r.InfrontUtil.Observable(!!t.topToolbar.cursorTypeMenu),this.selectedCursorType=new r.InfrontUtil.Observable(this.globalChartSettings.cursorType),this.openCursorTypeMenu=new r.InfrontUtil.Observable(!1)}initCurrencyMenu(t){this.globalChartSettings.targetCurrency=Zt[t.defaultCurrency]||Zt[Zt.DEFAULT],this.hasCurrencyMenu=new r.InfrontUtil.Observable(!!t.topToolbar.currencyMenu),this.openCurrencyMenu=new r.InfrontUtil.Observable(!1),this.selectedCurrencyAutoLabel=new r.InfrontUtil.Observable,this.selectedCurrency=new r.InfrontUtil.Observable(Zt[t.defaultCurrency]&&Zt[t.defaultCurrency]!==Zt.MULTIPLE?t.defaultCurrency:Zt.DEFAULT),this.selectedCurrency.observe({valueUpdated:e=>{this.selectedCurrencyAutoLabel.set(`${this.languageHandler.get(ht.kLanguageKey,"selected")} ${Zt[e]}`)}}),this.currencies=new r.InfrontUtil.ObservableArray,Di.createItems(t.selectableCurrencies,this.currencies,Zt,this.languageHandler,ht.kLanguageKeyCurrency,void 0,this.selectedCurrency)}initSettingsMenu(t){this.hasSettingsMenu=new r.InfrontUtil.Observable(!!t.topToolbar.settingsMenu)}initInstrumentHeader(t){this.hasInstrumentHeader=new r.InfrontUtil.Observable(!!t.topToolbar.instrumentHeader)}initFullScreenButton(t){this.hasFullScreenButton=new r.InfrontUtil.Observable(!!t.topToolbar.fullScreenButton),this.fullScreenEnabled=new r.InfrontUtil.Observable(!1),this.fullScreenIcon=new r.InfrontUtil.Observable,this.fullScreenEnabled.observe({valueUpdated:e=>{this.fullScreenIcon.set(Ae.getSvgIcon(e?"closeFullScreen":"openFullScreen"))}}),this.fullscreen=new Wi(this.chartInstrumentList,this.fullScreenEnabled)}syncGlobalChartSettings(){var t,e;!(null===(t=this.globalChartSettings)||void 0===t)&&t.targetCurrency&&this.selectedCurrency.set(Zt[this.globalChartSettings.targetCurrency]),null!=(null===(e=this.globalChartSettings)||void 0===e?void 0:e.cursorEventsEnabled)&&(this.cursorEventsEnabled.set(this.globalChartSettings.cursorEventsEnabled),this.chartOptions.setCursor())}initObservers(){const t={valueUpdated:()=>{this.chartStorage.updateStorage()}};this.globalChartSettings.currentEndDate.observe(t),this.globalChartSettings.currentStartDate.observe(t)}chartTypeSelected(t){const e=this._chartTypeSelected(t);return this.chartStorage.updateStorage(),e}_chartTypeSelected(t){r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: chartTypeSelected","chartTypeElement=",t),this.setSelectedChartType(t.id),this.updateChart()}setSelectedChartType(t){var e,n;this.selectedChartType.set(t),this.chartInstrumentList.setMainChartType(t),null===(n=null===(e=this.chartTypes)||void 0===e?void 0:e.data)||void 0===n||n.forEac
1h(i=>i.selected.set(i.id===t))}showHideChartTypes(t=this.chartInstrumentList,e=this.chartTypes){var n;const i=t?.getMainInstrument(),s=i?.getInstrumentSettings();null===(n=e?.data)||void 0===n||n.forEach(o=>{i?.canUseChartType(o.id,s.dataType)?o.available.set(!0):o.available.set(!1)})}compareClicked(){this.compareUpdateItems(this.chartInstrumentList),this.toggleMenu(pe.TOP_COMPARE)}compareUpdateItems(t){var e,n;t&&(null===(n=null===(e=this.compareList)||void 0===e?void 0:e.get())||void 0===n||n.forEach(i=>{var s,o;Mi(i)&&(t.hasInstrument({ticker:null===(s=i?.value)||void 0===s?void 0:s.ticker,feed:null===(o=i?.value)||void 0===o?void 0:o.feed})?i.selected.set(!0):i.selected.set(!1))}))}compareSelected(t){const e=this._compareSelected(t);return this.chartStorage.updateStorage(),e}_compareSelected(t){r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: compareSelected","item=",t),this.chartInstrumentList.addInstrument(new r.Infront.Instrument(t.value.feed,t.value.ticker)),this.compareUpdateItems(this.chartInstrumentList),this.toggleMenu(pe.TOP_COMPARE),this.updateChart()}newCompareClicked(){this.toggleMenu(pe.TOP_NEW_COMPARE)}newCompareSelected(t){const e=this._newCompareSelected(t);return this.chartStorage.updateStorage(),e}newCompareUpdateAllSelected(t,e,n){t?.forEach(i=>{var s;Ya(i)&&(null!==(s=this.chartInstrumentList)&&void 0!==s&&s.hasInstrument(i)?e(i):n(i))})}_newCompareSelected(t){r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: newCompareSelected","item=",t),this.chartInstrumentList.addInstrument(new r.Infront.Instrument(t.feed,t.ticker)),this.toggleMenu(pe.TOP_NEW_COMPARE),this.updateChart()}periodSelected(t){const e=this._periodSelected(t);return this.chartStorage.updateStorage(),e}_periodSelected(t){var e;let n;if(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: periodSelected","period=",t,"needDataReload=",this.globalChartSettings.needDataReload),"object"==typeof t){if(null===(e=t?.available)||void 0===e||!e.get())return;n=t?.id}else n=t;n!==lt.CUSTOM?(this.setSelectedPeriod(n),this.updateChart()):this.customPeriodSelected()}customPeriodSelected(){var t;if(null!==(t=this.modalCustomPeriod)&&void 0!==t&&t.isVisible)return;const e=n=>{r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("ChartWidget: customPeriodCallback","dateParams=",n),this.setSelectedPeriod(lt.CUSTOM,n?.startDate,n?.endDate),this.updateChart()};this.closeAllDropdowns(),this.modalCustomPeriod.openModal(n=>e(n))}setSelectedPeriod(t,e,n){fe.setPeriod(this.globalChartSettings,t,e,n),this.resolutionSelected(this.globalChartSettings.currentResolution,!0,!1),this.setSelectedPeriodUiElements(t)}setSelectedPeriodUiElements(t){var e,n;this.selectedPeriodId.set(t),this.selectedPeriodName.set(fe.getLabelForPeriod(t,this.languageHandler,"Short")),null===(n=null===(e=this.periods)||void 0===e?void 0:e.data)||void 0===n||n.forEach(i=>i.selected.set(i.id===t))}resolutionSelected(t=null,e=!1,n=!0){const i=this._resolutionSelected(t,e,n);return this.chartStorage.updateStorage(),i}_resolutionSelected(t=null,e=!1,n=!0){r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: resolutionSelected","resolution=",t,"update=",n,"needDataReload=",this.globalChartSettings.needDataReload),e&&Ke.createResolutions(this.globalChartSettings,this.languageHandler,this.options.selectableIntradayResolutions,this.options.selectableHistoricalResolutions),this.setSelectedResolution(t),n&&(this.globalChartSettings.needDataReload?this.updateChart():this.chartOptions.updateResolution())}setSelectedResolution(t=null){Ke.setResolution(this.globalChartSettings,this.options,t),t=Ke.isValidResolution(t,this.globalChartSettings)?t:this.globalChartSettings.currentResolution,this.setSelectedResolutionUiElements(t)}setSelectedResolutionUiElements(t){var e,n;const i=Ke.getResolutionShortLabel(t,this.globalChartSettings,this.languageHandler);this.selectedResolutionName.set(i),null===(n=null===(e=this.globalChartSettings.currentResolutionList)||void 0===e?void 0:e.data)||void 0===n||n.forEac
1h(s=>s.selected.set(s.id===t))}openGlobalSettings(t){this.closeAllDropdowns(),this.modalGlobalSettings.openModal(e=>this.globalSettingsCallback(e))}globalSettingsCallback(t){r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("ChartWidget: globalSettingsCallback","formParams=",t),null!=t&&(this.chartInstrumentList.setGlobalChartSettings(t),this.updateChart())}openInstrumentSettings(t,e=!1){null!=t&&(this.closeAllDropdowns(),this.modalInstrumentSettings.openModal(n=>this.instrumentSettingsCallback(n,t),t,e))}instrumentSettingsCallback(t,e=null){var n;r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("ChartWidget: instrumentSettingsCallback","formParams=",t,"id=",e);const i=this.chartInstrumentList.getChartInstrumentById(e);null!=t&&null!=i&&(t.dataType!==(null===(n=i.getInstrumentSettings())||void 0===n?void 0:n.dataType)&&(this.chartInstrumentList.handleMainDataTypeSpecial(i,t.dataType),t.dataType===Gt.BID_ASK?t.dataType=Gt.BID:t.dataType===Gt.PERFORMANCE&&(t.dataType=Gt.CLOSE)),i.setInstrumentSettings(t),this.instrumentSettingsCallbackWidgetLevelHandler(t,e),this.updateChart())}instrumentSettingsCallbackWidgetLevelHandler(t,e=null){const n=this.chartInstrumentList.getChartInstrumentById(e);null!=t&&null!=n&&(null!=t?.chartType&&this.selectedChartType.get()!==t?.chartType&&n?.isMainInstrument&&this.setSelectedChartType(t.chartType),ii.isDefaultCurrency(t?.targetCurrency)||this.selectedCurrency.set(Zt.MULTIPLE))}openIndicatorSettings(t,e){null!=t&&[...Ia,...Ea].includes(e)&&(this.closeAllDropdowns(),this.modalIndicatorSettings.openModal(n=>this.indicatorSettingsCallback(n,e,t),e,t))}indicatorSettingsCallback(t,e,n=null){r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("ChartWidget: indicatorSettingsCallback","formParams=",t,"indicatorType=",e,"id=",n);const i=this.chartInstrumentList.getChartIndicators();if(null==t||null==i)return;const s={};["linkedTo"].forEach(l=>{null!=t[l]&&(s[l]=t[l],delete t[l])}),r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("ChartWidget: indicatorSettingsCallback","formParams=",t,"outerParams=",s);const o=Object.assign(Object.assign(Object.assign({}
1,i.getNewIndicatorDefaultSettings(e,n)),s),{params:Object.assign(Object.assign({},i.getIndicatorParamsByType(e)),t)});null==n?i.addIndicator(o):i.editIndicator(o),this.updateChart()}indicatorSelected(t){const e=this._indicatorSelected(t);return this.chartStorage.updateStorage(),e}_indicatorSelected(t){r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: indicatorSelected","indicatorItem=",t);const e=Dt[r.InfrontUtil.getKeyOrValueFromEnum(Dt,t?.value)];if(!e)return;const n=this.chartInstrumentList.getChartIndicators();if(n){if([Dt.TOGGLE_VOLUME,Dt.TOGGLE_VOLUME_UNDERLAY,Dt.TOGGLE_INDICATORS,Dt.DELETE_ALL_INDICATORS,Dt.DELETE_ALL_OSCILLATORS].includes(e)){switch(e){case Dt.TOGGLE_VOLUME:this.chartInstrumentList.toggleVolume("showVolume");break;case Dt.TOGGLE_VOLUME_UNDERLAY:this.chartInstrumentList.toggleVolume("showVolumeUnderlay");break;case Dt.TOGGLE_INDICATORS:n.toggleIndicatorList();break;case Dt.DELETE_ALL_INDICATORS:n.clearIndicatorList("Indicator");break;case Dt.DELETE_ALL_OSCILLATORS:n.clearIndicatorList("Oscillator")}return this.updateChart(),void this.refreshToggleMenu(pe.TOP_INDICATOR)}if(e!==Dt.VOLUME_BY_PRICE||!n.indicatorExistsByType(Dt.VOLUME_BY_PRICE))return e===Dt.TOGGLE_VOLUME_BY_PRICE?(n.indicatorExistsByType(Dt.VOLUME_BY_PRICE)?(n.removeIndicatorsByType(Dt.VOLUME_BY_PRICE),this.updateChart()):this.indicatorSettingsCallback({},Dt.VOLUME_BY_PRICE),void this.refreshToggleMenu(pe.TOP_INDICATOR)):[...Ia,...Ea].includes(e)?(this.closeAllDropdowns(),void this.modalIndicatorSettings.openModal(i=>this.indicatorSettingsCallback(i,e),e,null)):void this.toggleMenu(pe.TOP_INDICATOR)}}openAnnotationSettings(t){r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: openAnnotationSettings","modalParams=",t),2===t?.length&&(this.closeAllDropdowns(),this.modalAnnotationSettings.openModal(t[0],t[1]))}annotationSelected(t){const e=this._annotationSelected(t);return this.chartStorage.updateStorage(),e}_annotationSelected(t){var e,n,i;switch(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: annotationSelected","annotationItem=",t),jt[r.InfrontUtil.getKeyOrValueFromEnum(jt,t?.id)]){case jt.TOGGLE_ANNOTATIONS:return null===(e=this.chartInstrumentList.getChartAnnotations())||void 0===e||e.toggleAnnotations(),void this.refreshToggleMenu(pe.TOP_ANNOTATION);case jt.DELETE_ALL_ANNOTATIONS:return void(null===(n=this.chartInstrumentList.getChartAnnotations())||void 0===n||n.removeAllAnnotations());default:null!==(i=this.chartInstrumentList.getChartAnnotations())&&void 0!==i&&i.getAnotationsListVisible()||this.chartInstrumentList.getChartAnnotations().toggleAnnotations(!0)}this.toggleMenu(pe.TOP_ANNOTATION)}templateSelected(t){return this._templateSelected(t)}_templateSelected(t){r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: templateSelected","templateItem=",t);const e=this.chartInstrumentList.getChartIndicators(),n=this.chartInstrumentList.getChartTemplates(),i=n?.getChartTemplateByType(t?.id);null!=i&&(this.setSelectedChartType(i.chartType),this.setSelectedPeriod(i.period),e.init(i.indicatorList),this.updateChart()),this.toggleMenu(pe.TOP_TEMPLATE)}currencySelected(t){const e=this._currencySelected(t);return this.chartStorage.updateStorage(),e}_currencySelected(t){var e;if(null==t?.id)return;const n=t.id;this.selectedCurrency.set(n),this.chartInstrumentList.setGlobalChartSettings({targetCurrency:Zt[n]}),this.currencies.get().forEach(i=>{var s;Mi(i)&&(null===(s=i.selected)||void 0===s||s.set(!1))}),null===(e=t?.selected)||void 0===e||e.set(!0),n!==Zt.MULTIPLE&&(this.globalChartSettings.needDataReload=!0,this.updateChart()),this.toggleMenu(pe.TOP_CURRENCY)}currencyClicked(){this.toggleMenu(pe.TOP_CURRENCY)}updateChart(t=!0){var e,n;const i=this.globalChartSettings.needDataReload;i?(this.chartInstrumentList.setAllChartDataStatus(sn.DATA_WILL_CHANGE),null===(e=this.chartInstrumentList.getChartStreaming())||void 0===e||e.stopStreaming()):(this.chartInstrumentList.setAllChartDataStatus(sn.CHART_WILL_CHANGE),null===(n=this.chartInstrumentList.getChartStreaming())||void 0===n||n.hideAllPushMarkers()),t&&this.chartStorage.updateStorage(),i?this.searchAllChartData():this.chartWrapper.requestUpdate
1Chart()}searchAllChartData(){r.Infront.DEBUG_WIDGET_CHART_NG&&console.time("[ChartWidget] timing searchAllChartData");const t=()=>{var e,n;r.Infront.DEBUG_WIDGET_CHART_NG&&console.timeEnd("[ChartWidget] timing searchAllChartData"),null===(e=this.chartInstrumentList.get())||void 0===e||e.forEach(i=>{this.setInstrumentHeaderData(i)}),null===(n=this.instrumentHeader)||void 0===n||n.update()};Us.asyncLoadCustomData(this.chartInstrumentList,this.options.customData).then(()=>{var e;null===(e=this.chartInstrumentList.getChartSearch())||void 0===e||e.searchAllChartData(this.progressIndicator,t)})}setInstrumentHeaderData(t){t?.isMainInstrument&&this.instrumentHeader&&(this.instrumentHeader.setLastValid(t.getTimeSeriesData()),this.instrumentHeader.updateChange(!0))}toggleFullScreen(){this.fullscreen.toggleFullscreen()}returnDefaultWidgetOptions(){return new Xr}newInit(){var t,e;this.clearDropdowns(),fe.createPeriods(this.periods,this.options.selectablePeriods,this.languageHandler,fe.createPeriodButtonSeparatorList(this.hasBottomToolbarAnyDropdown(),this.hasBottomPeriodButtons.get(),this.options.selectablePeriods)),fe.showHidePeriods(this.chartInstrumentList),Ke.createResolutions(this.globalChartSettings,this.languageHandler,this.options.selectableIntradayResolutions,this.options.selectableHistoricalResolutions),this.setSelectedPeriodUiElements(null===(t=this.globalChartSettings)||void 0===t?void 0:t.currentPeriod),this.setSelectedResolutionUiElements(null===(e=this.globalChartSettings)||void 0===e?void 0:e.currentResolution),super.newInit()}hasBottomToolbarAnyDropdown(){return this.hasBottomPeriodMenu.get()||this.hasBottomResolutionMenu.get()}newBuildUI(){this.addEventListener(document.body,"click",e=>this.windowClicked(e)),this.addEventListener(document.body,"keyup",e=>this.windowClickedKeyboard(e)),this.chartWidgetElement=function(e,n,i){var s=document.createElement("div");e.appendChild(s),s.className="cell-w-chart-nextgen";var o=document.createElement("div");s.appendChild(o),o.className="cell-w-chart-nextgen__toolbar cell-w-chart-nextgen__toolbar-top";var l=go.createHTMLAttributeBinding(o,"style",N=>"display:"+(N?"block":"none"));n.observe(l),_.W.unbindingManager.registerUnbind(o,()=>{n.unbind(l)});var u=document.createElement("div");o.appendChild(u),u.className="cell-flex-row cell-flex-collapse";var d=document.createElement("div");s.appendChild(d),d.className="cell-w-chart-nextgen__wrapper";var g=document.createElement("div");d.appendChild(g),g.className="cell-flex-row";var I=document.createElement("div");s.appendChild(I),I.className="cell-w-chart-nextgen__toolbar cell-w-chart-nextgen__toolbar-bottom";var C=go.createHTMLAttributeBinding(I,"style",N=>"display:"+(N?"block":"none"));i.observe(C),_.W.unbindingManager.registerUnbind(I,()=>{i.unbind(C)});var S=document.createElement("div");return I.appendChild(S),S.className="cell-flex-row cell-flex-collapse cell-flex-align-middle",{chartWidget:s,topToolbar:u,chartWrapper:d,chartContainer:g,bottomToolbar:S}}(this.element,this.globalChartSettings.showTopToolbar,this.globalChartSettings.showBottomToolbar);const t=this.chartWidgetElement.chartWrapper;null!=t&&(this.modalCustomPeriod=new Gl(t,this.chartInstrumentList),this.modalGlobalSettings=new $l(t,this.chartInstrumentList),this.modalInstrumentSettings=new eu(t,this.chartInstrumentList),this.modalIndicatorSettings=new uu(t,this.chartInstrumentList),this.modalAnnotationSettings=new du(t,this.chartInstrumentList),this.chartInstrumentList.setWidgetOpenInstrumentSettings(this.openInstrumentSettings),this.chartInstrumentList.setWidgetOpenIndicatorSettings(this.openIndicatorSettings),this.chartInstrumentList.setWidgetOpenAnnotationSettings(this.openAnnotationSettings)),this.chartWrapper.setChartElements(this.chartWidgetElement),this.chartWrapper.initChart(),this.buildTopToolbarUI(this.chartWidgetElement.topToolbar),this.buildBottomToolbarUI(this.chartWidgetElement.bottomToolbar),super.newBuildUI()}buildTopToolbarUI(t){var e;this.topToolbar=this.initTopMenu(t),!0===this.hasInstrumentHeader.get()&&(this.instrumentHeader=new oo(this.topToolbar.instrumentHeaderContainer,this.chartInstrumentList,this.options,this.infrontUI,this.languageHandler),this.instrumentHeader.initObservers(this.globalChartSettings),null===(e=this.chartInstrumentList)||void 0===e||e.setWidgetInstrumentHeader(this.instrumentHeader)),!0===this.globalChartSettings.showTopToolbar.get()&&(this.addSearchDialog(this.topToolbar),this.initializeDropDowns(this.topToolbar),this.initTopToolbarButtons(this.topToolbar))}addSearchDialog(t){var e;
1if(null===(e=this.hasSearchBox)||void 0===e||!e.get())return;const n=new ia.a;n.placeholder=this.languageHandler.get(ht.kLanguageKey,"searchPlaceholder"),n.maxResults=30,n.searchThreshold=2,n.enableMultiSelect=!1,n.itemTypes=["INSTRUMENT"],n.instrumentSelected=i=>{null!=i&&(this.chartInstrumentList.addInstrument(i),this.globalChartSettings.needDataReload=!0,this.updateChart())},n.instrumentAdded=i=>{t.searchContainer.getElementsByTagName("input")[0].blur()},t?.searchContainer&&(this.searchWidget=new ia.S(t.searchContainer,this.infrontUI,n))}addCompareSearchDialog(t){if(null==t)return;const e=new vo;e.inputWidth="100%",e.placeholder=this.languageHandler.get(ht.kLanguageKey,"searchPlaceholder"),e.maxResults=30,e.searchThreshold=2,e.enableMultiSelect=!1,e.itemTypes=["INSTRUMENT"],e.instrumentSelected=n=>{null!=n&&(this.chartInstrumentList.addInstrument(n),this.globalChartSettings.needDataReload=!0,this.updateChart())},e.instrumentAdded=n=>{t.getElementsByTagName("input")[0].blur()},this.compareSearchWidget=new nn(t,this.infront,e)}addNewCompareSearchDialog(t){if(!(t instanceof HTMLElement))return;const e=this.chartDropDowns.topToolbar.newCompareMenu,n=Object.assign(new Lr,this.options.sdkSearchBoxOptions);n.onSearchResultCallback=(i,s,o)=>{switch(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_CALLBACKS&&r.Infront.log("SDKSearchBox SearchResultCallBack","\n","query:",s,"\n","searchResults:",i,"\n","sourceType:",o),o){case bn.INITIAL:e.showInitialList();break;case bn.STORAGE:e.showStorageList();break;default:e.updateResultList(i)}},this.sdkSearchBox=new bo(t,this.infrontUI,n),e.addSDKSearchBox(this.sdkSearchBox
1)}initTopMenu(t){return function vu(a,t,e,n,i,s,o,l,u,d,g,I,C,S,N,k,x,Y,et,rt,it,gt,mt,Ct,Tt){if(t){var Kt=document.createElement("div");a.appendChild(Kt),Kt.className="cell-w-chart-nextgen__toolbar__search-box cell-flex-column cell-flex-shrink";var te=document.createElement("div");Kt.appendChild(te)}if(e||n||i){var le=document.createElement("div");a.appendChild(le),le.className="cell-w-chart-nextgen__toolbar__general-settings cell-flex-column cell-flex-shrink";var Ie=document.createElement("ul");if(le.appendChild(Ie),Ie.className="cell-list-flex",e){var Je=document.createElement("li");Ie.appendChild(Je)}if(n){var zt=document.createElement("li");Ie.appendChild(zt)}if(i){var ye=document.createElement("li");Ie.appendChild(ye)}}if(s||u||d||o){var He=document.createElement("div");a.appendChild(He),He.className="cell-w-chart-nextgen__toolbar__analytic-settings cell-flex-column cell-flex-shrink";var he=document.createElement("ul");if(He.appendChild(he),he.className="cell-list-flex",!0!==e&&!0!==n&&!0!==i||r.InfrontUtil.addClassName(he,"cell-w-chart-nextgen__toolbar-separator-left"),s){var Ge=document.createElement("li");he.appendChild(Ge)}if(u){var Lt=document.createElement("li");he.appendChild(Lt)}if(d){var je=document.createElement("li");he.appendChild(je)}if(o){var gn=document.createElement("li");he.appendChild(gn)}}if(N||l||S||g||C){var _n=document.createElement("div");a.appendChild(_n),_n.className="cell-w-chart-nextgen__toolbar__advanced-settings cell-flex-column cell-flex-shrink";var we=document.createElement("ul");if(_n.appendChild(we),we.className="cell-list-flex cell-list-flex--collapse",!0!==e&&!0!==n&&!0!==i&&!0!==s&&!0!==u&&!0!==d&&!0!==o||r.InfrontUtil.addClassName(we,"cell-w-chart-nextgen__toolbar-separator-left"),N){var si=document.createElement("li");we.appendChild(si);var vn=document.createElement("div");si.appendChild(vn),vn.className="cell-mininav cell-mininav__btn cell-mininav__btn-icon cell-mininav__btn-icon-settings",r.InfrontUtil.addEventListener(vn,"click",De=>{Ct(De)}),vn.setAttribute("role","button"),r.InfrontUtil.addEventListener(vn,"keyup",De=>{var qn=De.which||De.keyCode;13!==qn&&32!==qn||Ct(De)})}if(l){var oi=document.createElement("li");we.appendChild(oi)}if(S){var ln=document.createElement("li");we.appendChild(ln)}if(g){var vi=document.createElement("li");we.appendChild(vi);var mn=document.createElement("div");vi.appendChild(mn),mn.className="cell-mininav cell-mininav__btn cell-mininav__btn-icon cell-mininav__btn-icon-cursorEventsButton",r.InfrontUtil.addEventListener(mn,"click",De=>{mt(De)}),mn.setAttribute("role","button"),r.InfrontUtil.addEventListener(mn,"keyup",De=>{var qn=De.which||De.keyCode;13!==qn&&32!==qn||mt(De)});var ti=new Ur(mn,"cell-mininav__btn--selected",De=>!0===De);I.observe(ti,lr.Synchronous);var Yn=new Ur(mn,"cell-mininav__btn--state-true",De=>!0===De);I.observe(Yn,lr.Synchronous);var An=new Ur(mn,"cell-mininav__btn--state-false",De=>!1===De);I.observe(An,lr.Synchronous),_.W.unbindingManager.registerUnbind(mn,()=>{I.unbind(ti),I.unbind(Yn),I.unbind(An)})}if(C){var mi=document.createElement("li");we.appendChild(mi)}}if(k||x){var Te=document.createElement("div");if(a.appendChild(Te),Te.className="cell-w-chart-nextgen__toolbar__instrument_header cell-flex-column cell-flex-column-pull-right cell-flex-shrink",k){var wn=document.createElement("div");Te.appendChild(wn),wn.className="cell-flex-row"}var ur=document.createElement("div");if(a.appendChild(ur),ur.className="cell-w-chart-nextgen__toolbar__full-screen-button cell-flex-column cell-flex-shrink",x){var Ye=document.createElement("div");ur.appendChild(Ye),Ye.className="cell-mininav cell-mininav__btn cell-mininav__btn-icon cell-mininav__btn-icon-expand",r.InfrontUtil.addEventListener(Ye,"click",De=>{Tt(De)}),Ye.setAttribute("role","button"),r.InfrontUtil.addEventListener(Ye,"keyup",De=>{var qn=De.which||De.keyCode;13!==qn&&32!==qn||Tt(De)});var Fr=gu.createValueBinding(Ye,"innerHTML");et.observe(Fr,lr.Synchronous);var Vr=new Ur(Ye,"cell-mininav__btn--state-true",De=>1==De);Y.observe(Vr,lr.Synchronous);var Br=new Ur(Ye,"cell-mininav__btn--state-false",De=>0==De);Y.observe(Br,lr.Synchronous),_.W.unbindingManager.registerUnbind(Ye,()=>{et.unbind(Fr),Y.unbind(Vr),Y.unbind(Br)})}}return{searchContainer:te,chartTypeMenu:Je,periodMenu:zt,resolutionMenu:ye,indicatorMenu:Ge,annotationsMenu:gn,templateMenu:oi,compareMenu:Lt,newCompareMenu:je,cursorTypeMenu:mi,cursorEventsButton:mn,currencyMenu:ln,settingsMenu:vn,instrumentHeaderContainer:wn,fullScreenButton:Ye}}(t,this.hasSearchBox.get(),this.hasChartTypeMenu.get(),this.hasPeriodMenu.get(),this.hasResolutionMenu.get(),this.hasIndicatorMenu.get(),this.hasAnnotationMenu.get(),this.hasTemplateMenu.get(),this.hasCompareMenu.get(),this.hasNewCompareMenu.get(),this.hasCursorEventsButton.get(),this.cursorEventsEnabled,this.hasCursorTypeMenu.get(),this.hasCurrencyMenu.get(),this.hasSettingsMenu.get(),this.hasInstrumentHeader.get(),this.hasFullScreenButton.get(),this.fullScreenEnabled,this.fullScreenIcon,0,0,0,()=>{this.chartInstrumentList.setCursorEventsEnabled(!this.globalChartSettings.cursorEventsEnabled),this.cursorEventsEnabled.set(!this.cursorEventsEnabled.get())},this.openGlobalSettings,()=>{this.toggleFullScreen()})}initializeDropDowns(t){var e,n,i,s,o,l,u,d,g,I,C,S,N,k,x,Y,et,rt,it,gt;const mt=this,Ct=new ui(t.chartTypeMenu,this.chartWidgetElement.chartWidget,y.DOWN,!1,this.hasChartTypeMenu,this.openChartTypeMenu,this.chartTypes,(null===(n=null===(e=this.globalChartSettings)||void 0===e?void 0:e.topToolbarLabels)||void 0===n?void 0:n.chartTypeMenu)||{isIcon:!0,value:this.selectedChartTypeIcon},()=>this.toggleMenu(pe.TOP_CHART_TYPE),he=>this.chartTypeSelected(he),Ue.CHART_TYPE,void 0,this.isAuto,!0,this.globalChartSettings.onPopupStateChange);null!=Ct&&(this.chartDropDowns.topToolbar.chartTypeMenu=Ct);const Tt=new Qn(t.compareMenu,this.chartWidgetElement.chartWidget,y.DOWN,!1,this.hasCompareMenu,this.openCompareMenu,this.compareList,(null===(s=null===(i=this.globalChartSettings)||void 0===i?void 0:i.topToolbarLabels)||void 0===s?void 0:s.compareMenu)||{isIcon:!0,value:new r.InfrontUtil.Observable(Ae.getSvgIcon("chart"))},()=>this.compareClicked(),he=>this.compareSelected(he),Ue.COMPARE,void 0,new r.InfrontUtil.Observable(!1),!0,null,this.globalChartSettings.onPopupStateChange);Tt instanceof Qn&&(this.chartDropDowns.topToolbar.compareMenu=Tt,this.addCompareSearchDialog(Tt.getSearchContainer()));const Wt=Object.assign(new Ar,this.options.newCompareDropDownOptions);Wt.positionElement=this.topToolbar.newCompareMenu,Wt.appendToElement=this.chartWidgetElement.chartWidget,Wt.infrontUI=this.infrontUI,Wt.onPopupStateChange=this.globalChartSettings.onPopupStateChange,Wt.hasMenu=this.hasNewCompareMenu,Wt.showDropDown=this.openNewCompareMenu,Wt.initialList=this.options.selectableNewCompare,Wt.resultListItemSelected=he=>this.newCompareSelected(he),Wt.updateAllSelected=(he,Ge,Lt)=>{this.newCompareUpdateAllSelected(he,Ge,Lt)},Wt.openDropDown=()=>this.newCompareClicked(),Wt.getGlobalStorage=he=>mt.getStoredGlobalValue(he),Wt.setGlobalStorage=(he,Ge)=>{mt.storeGlobal(he,Ge)},null!==(l=null===(o=this.globalChartSettings)||void 0===o?void 0:o.topToolbarLabels)&&void 0!==l&&l.newCompareMenu&&(Wt.openDropDownElementLabel={isIcon:null===(u=this.globalChartSettings.topToolbarLabels.newCompareMenu)||void 0===u?void 0:u.isIcon,label:null===(d=this.globalChartSettings.topToolbarLabels.newCompareMenu)||void 0===d?void 0:d.value});
1const Kt=new $a(Wt);Kt instanceof $a&&(this.chartDropDowns.topToolbar.newCompareMenu=Kt,this.addNewCompareSearchDialog(Kt.getSearchContainer()));const te=new ui(t.periodMenu,this.chartWidgetElement.chartWidget,y.DOWN,!1,this.hasPeriodMenu,this.openPeriodMenu,this.periods,(null===(I=null===(g=this.globalChartSettings)||void 0===g?void 0:g.topToolbarLabels)||void 0===I?void 0:I.periodMenu)||{isIcon:!1,value:this.selectedPeriodName},()=>this.toggleMenu(pe.TOP_PERIOD),he=>this.periodSelected(he),Ue.PERIOD,void 0,this.isAuto,!1,this.globalChartSettings.onPopupStateChange);null!=te&&(this.chartDropDowns.topToolbar.periodMenu=te);const le=new ui(t.resolutionMenu,this.chartWidgetElement.chartWidget,y.DOWN,!1,this.hasResolutionMenu,this.openResolutionMenu,this.globalChartSettings.currentResolutionList,(null===(S=null===(C=this.globalChartSettings)||void 0===C?void 0:C.topToolbarLabels)||void 0===S?void 0:S.resolutionMenu)||{isIcon:!1,value:this.selectedResolutionName},()=>this.toggleMenu(pe.TOP_RESOLUTION),he=>this.resolutionSelected(he.id),Ue.RESOLUTION,void 0,this.isAuto,!1,this.globalChartSettings.onPopupStateChange);null!=le&&(this.chartDropDowns.topToolbar.resolutionMenu=le);const Ie=new Qn(t.indicatorMenu,this.chartWidgetElement.chartWidget,y.DOWN,!1,this.hasIndicatorMenu,this.openIndicatorMenu,this.indicators,(null===(k=null===(N=this.globalChartSettings)||void 0===N?void 0:N.topToolbarLabels)||void 0===k?void 0:k.indicatorMenu)||{isIcon:!1,value:new r.InfrontUtil.Observable(this.languageHandler.get(ht.kLanguageKeyIndicator,"label"))},()=>this.toggleMenu(pe.TOP_INDICATOR),he=>this.indicatorSelected(he),Ue.INDICATOR,void 0,this.isAuto,!1,null,this.globalChartSettings.onPopupStateChange);null!=Ie&&(this.chartDropDowns.topToolbar.indicatorMenu=Ie);const Je=new Qn(t.annotationsMenu,this.chartWidgetElement.chartWidget,y.DOWN,!1,this.hasAnnotationMenu,this.openAnnotationMenu,this.annotations,(null===(Y=null===(x=this.globalChartSettings)||void 0===x?void 0:x.topToolbarLabels)||void 0===Y?void 0:Y.annotationMenu)||{isIcon:!0,value:new r.InfrontUtil.Observable(Mr.getSvgIcon("annotations"))},()=>this.toggleMenu(pe.TOP_ANNOTATION),he=>this.annotationSelected(he),Ue.ANNOTATION,void 0,this.isAuto,!0,null,this.globalChartSettings.onPopupStateChange);null!=Je&&(this.chartDropDowns.topToolbar.annotationMenu=Je);const zt=new Qn(t.templateMenu,this.chartWidgetElement.chartWidget,y.DOWN,!1,this.hasTemplateMenu,this.openTemplateMenu,this.templates,(null===(rt=null===(et=this.globalChartSettings)||void 0===et?void 0:et.topToolbarLabels)||void 0===rt?void 0:rt.templateMenu)||{isIcon:!0,value:new r.InfrontUtil.Observable(Ae.getSvgIcon("template"))},()=>this.toggleMenu(pe.TOP_TEMPLATE),he=>this.templateSelected(he),Ue.TEMPLATE,void 0,this.isAuto,!0,null,this.globalChartSettings.onPopupStateChange);null!=zt&&(this.chartDropDowns.topToolbar.templateMenu=zt);const ye={id:Zt.DEFAULT,label:this.languageHandler.get(ht.kLanguageKey,"reset")},He=new Qn(t.currencyMenu,this.chartWidgetElement.chartWidget,y.DOWN,!1,this.hasCurrencyMenu,this.openCurrencyMenu,this.currencies,(null===(gt=null===(it=this.globalChartSettings)||void 0===it?void 0:it.to
1pToolbarLabels)||void 0===gt?void 0:gt.currencyMenu)||{isIcon:!1,value:new r.InfrontUtil.Observable(Or.EUR)},()=>this.currencyClicked(),he=>this.currencySelected(he),Ue.CURRENCY,this.selectedCurrencyAutoLabel,this.isAuto,!1,ye,this.globalChartSettings.onPopupStateChange);null!=He&&(this.chartDropDowns.topToolbar.currencyMenu=He)}initTopToolbarButtons(t){null!=t?.cursorEventsButton&&(t.cursorEventsButton.innerHTML=Ae.getSvgIcon("cursor")),null!=t?.settingsMenu&&(t.settingsMenu.innerHTML=Ae.getSvgIcon("cog"))}initBottomToolbarButtons(t){null!=t?.customPeriodButtonElement&&(t.customPeriodButtonElement.innerHTML=Ae.getSvgIcon("calendar"))}buildBottomToolbarUI(t){var e,n;this.bottomToolbar=function(i,s,o,l,u,d,g,I){if(s&&u.length){var C=document.createElement("div");i.appendChild(C),C.className="cell-w-chart-nextgen__toolbar__period-buttons cell-flex-column cell-flex-shrink";var S=document.createElement("ul");C.appendChild(S),S.className="cell-list-flex";for(var N=(it,gt)=>{var mt=document.createElement("li"),Ct=new qa(mt,"cell-mininav__btn--unavailable",Kt=>0==Kt);it.available.observe(Ct,Za.Synchronous),_.W.unbindingManager.registerUnbind(mt,()=>{it.available.unbind(Ct)});var Tt=document.createElement("button");mt.appendChild(Tt),Tt.className="cell-mininav cell-mininav__btn",Tt.type="button",r.InfrontUtil.addEventListener(Tt,"click",Kt=>{I(it)}),Tt.setAttribute("tabindex","0"),Tt.setAttribute("role","button"),(0,O.s)(Tt,"innerHTML",it.name);var Wt=new qa(Tt,"cell-mininav__btn--selected",Kt=>Kt===it.id);return g.observe(Wt,Za.Synchronous),!0===it.separator&&r.InfrontUtil.addClassName(Tt,"cell-w-chart-nextgen__toolbar-separator-right"),_.W.unbindingManager.registerUnbind(Tt,()=>{g.unbind(Wt)}),mt},k=0;k<u.length;k++)S.appendChild(N(u[k]))}if(o||l){var x=document.createElement("div");i.appendChild(x),x.className="cell-w-chart-nextgen__toolbar__period-dropdown cell-flex-column cell-flex-shrink"}if(s&&d){var Y=document.createElement("div");i.appendChild(Y),Y.className="cell-w-chart-nextgen__toolbar__period-custom cell-flex-column cell-flex-shrink",!0===d.separator&&r.InfrontUtil.addClassName(Y,"cell-w-chart-nextgen__toolbar-separator-left");var et=document.createElement("button");Y.appendChild(et),et.className="cell-mininav cell-mininav__btn cell-mininav__btn-icon cell-mininav__btn-icon-calendar",et.type="button",r.InfrontUtil.addEventListener(et,"click",it=>{I(d)}),et.setAttribute("tabindex","0"),et.setAttribute("role","button");var rt=new qa(et,"cell-mininav__btn--selected",it=>it===d.id);g.observe(rt,Za.Synchronous),_.W.unbindingManager.registerUnbind(et,()=>{g.unbind(rt)})}return{dropDownContainer:x,customPeriodButtonElement:et}}(t,this.hasBottomPeriodButtons.get(),this.hasBottomPeriodMenu.get(),this.hasBottomResolutionMenu.get(),null===(e=this.periods.get())||void 0===e?void 0:e.filter(i=>i.id!==At.CUSTOM),null===(n=this.periods.get())||void 0===n?void 0:n.find(i=>i.id===At.CUSTOM),this.selectedPeriodId,i=>this.periodSelected(i)),!0===this.globalChartSettings.showBottomToolbar.get()&&(this.initBottomToolbarButtons(this.bottomToolbar),this.initializeBottomDropDowns(this.bottomToolbar.dropDownContainer))}initializeBottomDropDowns(t){var e,n,i,s;if(this.hasBottomPeriodMenu.get()){const u=new ui(t,this.chartWidgetElement.chartWidget,y.UP,!1,this.hasBottomPeriodMenu,this.openBottomPeriodMenu,this.periods,(null===(n=null===(e=this.globalChartSettings)||void 0===e?void 0:e.bottomToolbarLabels)||void 0===n?void 0:n.periodMenu)||{isIcon:!1,value:this.selectedPeriodName},()=>this.toggleMenu(pe.BOTTOM_PERIOD),d=>this.periodSelected(d),Ue.MATRIX_PERIOD,void 0,this.isAuto,!1,this.globalChartSettings.onPopupStateChange);this.chartDropDowns.bottomToolbar.periodMenu=u}if(this.hasBottomResolutionMenu.get()){const u=new ui(t,this.chartWidgetElement.chartWidget,y.UP,!1,this.hasBottomResolutionMenu,this.openBottomResolutionMenu,this.globalChartSettings.currentResolutionList,(null===(s=null===(i=this.globalChartSettings)||void 0===i?void 0:i.bottomToolbarLabels)||void 0===s?void 0:s.resolutionMenu)||{isIcon:!1,value:this.selectedResolutionName},()=>this.toggleMenu(pe.BOTTOM_RESOLUTION),d=>this.resolutionSelected(d.id),Ue.RESOLUTION,void 0,this.isAuto,!1,this.globalChartSettings.onPopupStateChange);this.chartDropDowns.bottomToolbar.resolutionMenu=u}}clearDropdowns(){var t;null===(t=Object?.keys(this.chartDropDowns))||void 0===t||t.forEach(e
1=>{var n;null===(n=Object?.values(this.chartDropDowns[e]))||void 0===n||n.forEach(i=>{i.destroy()})})}toggleMenu(t){if(!this.toggleMenuList.includes(t)||!this[t])return;t===pe.TOP_CHART_TYPE&&this.showHideChartTypes(),this.toggleMenuList.forEach(i=>{this[i]&&t!==i&&this[i].set(!1)}),this[t].set(!this[t].get());const e=this.toggleMenuListToDropDownMapping[t],n=this.chartDropDowns[e.toolbar][e.dropDown];n instanceof Qn&&n.openAction()}refreshToggleMenu(t){const e=this.toggleMenuListToDropDownMapping[t],n=this.chartDropDowns[e.toolbar][e.dropDown];n instanceof Qn&&n.openAction()}windowClickedKeyboard(t){t.keyCode===r.InfrontUtil.TextInputBinding.kKeycodeEscape&&this.windowClicked(t)}windowClicked(t){t.composedPath().some(e=>{if(e instanceof HTMLElement)return Object.values(jr).some(n=>e.className.includes(n))})||this.toggleMenuList.forEach(e=>{this[e]&&this[e].set(!1)})}closeAllDropdowns(){this.toggleMenuList.forEach(t=>{this[t]&&this[t].set(!1)})}newDestroyUI(){var t,e,n,i,s,o,l,u,d,g;null===(t=this.disconnectThemeChangeObserver)||void 0===t||t.call(this),null===(e=this.disconnectStylesheetChangeObserver)||void 0===e||e.call(this),null===(i=null===(n=this.globalChartSettings)||void 0===n?void 0:n.source)||void 0===i||i.destroy(),null===(s=this.fullscreen)||void 0===s||s.destroy(),this.clearDropdowns(),null===(o=this.searchWidget)||void 0===o||o.destroy(),null===(l=this.compareSearchWidget)||void 0===l||l.destroy(),null===(u=this.sdkSearchBox
1)||void 0===u||u.destroy(),null===(d=this.chartInstrumentList)||void 0===d||d.destroy(),null===(g=this.instrumentHeader)||void 0===g||g.destroy(),super.newDestroyUI()}_store(t,e){this.store(t,e)}_getStoredValue(t){return this.getStoredValue(t)}setMainInstrument(t,e=!1){const n=this.chartInstrumentList.getMainInstrument(),i=n?.getChartDataStatus();r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: setMainInstrument","mainInstrument=",n,"dataStatus=",i,"instrument=",t,"resetInstrumentSettings=",e),(null==n||i===sn.AFTER_CREATE_CHART)&&t?.feed&&t?.ticker&&(this.chartInstrumentList.replace(0,{feed:t.feed,ticker:t.ticker},e),this.globalChartSettings.needDataReload=!0,this.updateChart())}addCompareInstrument(t){const e=this.chartInstrumentList.getMainInstrument(),n=e?.getChartDataStatus();r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: addInstrument","mainInstrument=",e,"dataStatus=",n,"instrument=",t),n===sn.AFTER_CREATE_CHART&&(this.chartInstrumentList.addInstrument(t,!1),this.chartStorage.updateStorage(),this.updateChart())}removeCompareInstrument(t){const e=this.chartInstrumentList.getMainInstrument(),n=e?.getChartDataStatus();r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: removeCompareInstrument","mainInstrument=",e,"dataStatus=",n,"instrument=",t),n===sn.AFTER_CREATE_CHART&&(this.chartInstrumentList.removeByInstrument(t),this.chartStorage.updateStorage(),this.updateChart())}addIndicator(t,e){const n=this.chartInstrumentList.getMainInstrument(),i=n?.getChartDataStatus();if(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: addIndicator","mainInstrument=",n,"dataStatus=",i,"type=",t,"params=",e),i!==sn.AFTER_CREATE_CHART)return;const s=this.chartInstrumentList.getChartIndicators();if(null==s)return;const o=Object.assign(Object.assign({},s.getNewIndicatorDefaultSettings(t)),{params:Object.assign(Object.assign({color:s.getIndicatorColor(s.getNextIndicatorIndex())},s.getIndicatorParamsByType(t)),e)});s.addIndicator(o),this.chartStorage.updateStorage(),this.updateChart()}removeIndicator(t,e){var n,i;const s=this.chartInstrumentList.getMainInstrument(),o=s?.getChartDataStatus();if(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: removeIndicator","mainInstrument=",s,"dataStatus=",o,"type=",t,"index=",e),o!==sn.AFTER_CREATE_CHART)return;const l=this.chartInstrumentList.getChartIndicators();if(null!=l){if(null!=e){const u=null===(i=null===(n=l.getIndicatorListByType(t))||void 0===n?void 0:n[e])||void 0===i?void 0:i.id;null!=u&&l.removeIndicatorById(u)}else l.removeIndicatorsByType(t);this.chartStorage.updateStorage(),this.updateChart()}}setShowVolume(t){const e=this.chartInstrumentList.getMainInstrument(),n=e?.getChartDataStatus();r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: setShowVolume","mainInstrument=",e,"dataStatus=",n,"show=",t),n===sn.AFTER_CREATE_CHART&&(this.globalChartSettings.showVolume!==t&&this.chartInstrumentList.toggleVolume("showVolume"),this.chartStorage.updateStorage(),this.updateChart())}setMainPerformance(t){var e;const n=this.chartInstrumentList.getMainInstrument(),i=n?.getChartDataStatus(),s=n?.getInstrument();if(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: setMainPerformance","mainInstrument=",n,"dataStatus=",i,"instrument=",s,"isPerformance=",t),null==s||i!==sn.AFTER_CREATE_CHART)return;const o=null===(e=this.chartInstrumentList.get())||void 0===e?void 0:e.findIndex(l=>{var u,d,g,I;return!l.isMainInstrument&&(null===(u=l.getInstrument())||void 0===u?void 0:u.ticker)===s?.ticker&&(null===(d=l.getInstrument())||void 0===d?void 0:d.feed)===s?.feed&&(null===(g=l.getInstrumentSettings())||void 0===g?void 0:g.adjustDividends)&&(null===(I=l.getInstrumentSettings())||void 0===I?void 0:I.showDividends)});o>0&&this.chartInstrumentList.removeByIndex(o),this.globalChartSettings.mainDataType=t?Gt.PERFORMANCE:Gt.CLOSE,this.globalChartSettings.mainDataType===Gt.PERFORMANCE&&this.chartInstrumentList.handleMainDataTypeSpecial(n,this.globalChartSettings.mainDataType,!0),this.updateChart()}setPeriod(t){const e=this.chartInstrumentList.getMainInstrument(),n=e?.getChartDataStatus(),i=fe.getPeriodFromSelectablePerio
1d(t);r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: setPeriod","mainInstrument=",e,"dataStatus=",n,"periodStr=",t,"period=",i),n===sn.AFTER_CREATE_CHART&&this.periodSelected(i)}setNavigatorScrollFactor(t){this.chartInstrumentList.setNavigatorScrollFactor(t)}setChartType(t){const e=this.chartInstrumentList.getMainInstrument(),n=e?.getChartDataStatus();r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: setChartType","mainInstrument=",e,"dataStatus=",n,"chartType=",t),n===sn.AFTER_CREATE_CHART&&(this.setSelectedChartType(t),this.updateChart())}setAreaStacking(t){const e=this.chartInstrumentList.getMainInstrument(),n=e?.getChartDataStatus();r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: setAreaStacking","mainInstrument=",e,"dataStatus=",n,"areaStacking=",t),n===sn.AFTER_CREATE_CHART&&(this.globalChartSettings.areaStacking=t,this.updateChart())}accepts(){return[r.InterLibraryLink.DataType.infrontInstrument,r.InterLibraryLink.DataType.removeInfrontInstrument]}receiveMessage(t){t.type===r.InterLibraryLink.DataType.infrontInstrument?(r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: receiveMessage","msg=",t),this.setMainInstrument(t.value,!1)):t.type===r.InterLibraryLink.DataType.removeInfrontInstrument&&r.Infront.DEBUG_WIDGET_CHART_NG&&r.Infront.DEBUG_VERBOSE&&r.Infront.log("ChartWidget: receiveMessage (remove)","msg=",t)}}class pu{constructor(){this.stopPropagationEventTypeListener=[]}addStopPropagationEvents(t){const e=[{classes:["highcharts-navigator-handle","highcharts-navigator-mask-inside"],eventTypes:["mousemove"]},{classes:["highcharts-control-points"],eventTypes:["mousemove"]}];["mouseout","mousemove"].forEach(n=>{const i=s=>{var o,l;let u,d=!1;if(s?.target instanceof Element){u=s.target;for(let g=0;g<s?.composedPath().length&&g<10&&!u?.classList.length&&u?.parentElement!==t;g++)u=u.parentElement}if(u?.classList.length)for(let g=0;g<e?.length;g++){if(0===(null===(o=e[g].eventTypes)||void 0===o?void 0:o.length)||e[g].eventTypes.includes(s.type))for(let I=0;I<(null===(l=e[g].classes)||void 0===l?void 0:l.length);I++)if(u?.classList.contains(e[g].classes[I])){d=!0;break}if(d)break}d||s.stopPropagation()};this.stopPropagationEventTypeListener.push({eventType:n,listener:i}),t.addEventListener(n,i,!0)})}removeStopPropagationEvents(t){this.stopPropagationEventTypeListener&&(this.stopPropagationEventTypeListener.forEach(e=>{t.removeEventListener(e.eventType,e.listener,!0)}),this.stopPropagationEventTypeListener=[])}}const Iu="ungrouped"}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.