PageSourceSearch

https://webtrader.cmsprime.com/web/assets/js/1110.chunk.2e9ffb96.js

js cmsprime.com collected 2026-09-24 13:09:49 UTC 95,535 bytes, 1 lines download raw bytes

1(self.webpackChunk_aqx_member_web=self.webpackChunk_aqx_member_web||[]).push([["1110"],{47978:function(e,t,n){var r=n(38145),o=n(69096),i=n(65239),l=n(78228),a=n(95920);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=l,c.prototype.set=a,e.exports=c},70131:function(e,t,n){var r=n(17168),o=n(66582),i=n(13867),l=n(59557),a=n(22726);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=l,c.prototype.set=a,e.exports=c},90278:function(e,t,n){var r=n(67076),o=n(2530),i=n(44858),l=n(96265),a=n(59909);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=l,c.prototype.set=a,e.exports=c},61124:function(e,t,n){var r=n(90278),o=n(96718),i=n(66996);function l(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}l.prototype.add=l.prototype.push=o,l.prototype.has=i,e.exports=l},4281:function(e,t,n){var r=n(70131),o=n(30560),i=n(58282),l=n(46638),a=n(94270),c=n(3229);function u(e){var t=this.__data__=new r(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=i,u.prototype.get=l,u.prototype.has=a,u.prototype.set=c,e.exports=u},5982:function(e,t,n){e.exports=n(70441).Uint8Array},69037:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var l=e[n];t(l,n,e)&&(i[o++]=l)}return i}},16222:function(e,t,n){var r=n(55092),o=n(86981),i=n(77236),l=n(98752),a=n(9840),c=n(14812),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),s=!n&&o(e),d=!n&&!s&&l(e),f=!n&&!s&&!d&&c(e),p=n||s||d||f,h=p?r(e.length,String):[],v=h.length;for(var b in e)(t||u.call(e,b))&&!(p&&("length"==b||d&&("offset"==b||"parent"==b)||f&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||a(b,v)))&&h.push(b);return h}},63848:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},44793:function(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},3833:function(e,t,n){var r=n(26530);e.exports=function(e,t){for(var n=e.length;n--;
1)if(r(e[n][0],t))return n;return -1}},39329:function(e,t,n){var r=n(63848),o=n(77236);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},31071:function(e,t,n){var r=n(67229),o=n(3387);e.exports=function e(t,n,i,l,a){return t===n||(null!=t&&null!=n&&(o(t)||o(n))?r(t,n,i,l,e,a):t!=t&&n!=n)}},67229:function(e,t,n){var r=n(4281),o=n(12503),i=n(6001),l=n(88784),a=n(26686),c=n(77236),u=n(98752),s=n(14812),d="[object Arguments]",f="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,b,g){var m=c(e),y=c(t),C=m?f:a(e),I=y?f:a(t);C=C==d?p:C,I=I==d?p:I;var _=C==p,x=I==p,P=C==I;if(P&&u(e)){if(!u(t))return!1;m=!0,_=!1}if(P&&!_)return g||(g=new r),m||s(e)?o(e,t,n,v,b,g):i(e,t,C,n,v,b,g);if(!(1&n)){var T=_&&h.call(e,"__wrapped__"),S=x&&h.call(t,"__wrapped__");if(T||S){var A=T?e.value():e,w=S?t.value():t;return g||(g=new r),b(A,w,n,v,g)}}return!!P&&(g||(g=new r),l(e,t,n,v,b,g))}},55092:function(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},30555:function(e){e.exports=function(e,t){return e.has(t)}},12503:function(e,t,n){var r=n(61124),o=n(44793),i=n(30555);e.exports=function(e,t,n,l,a,c){var u=1&n,s=e.length,d=t.length;if(s!=d&&!(u&&d>s))return!1;var f=c.get(e),p=c.get(t);if(f&&p)return f==t&&p==e;var h=-1,v=!0,b=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++h<s;){var g=e[h],m=t[h];if(l)var y=u?l(m,g,h,t,e,c):l(g,m,h,e,t,c);if(void 0!==y){if(y)continue;v=!1;break}if(b){if(!o(t,function(e,t){if(!i(b,t)&&(g===e||a(g,e,n,l,c)))return b.push(t)})){v=!1;break}}else if(!(g===m||a(g,m,n,l,c))){v=!1;break}}return c.delete(e),c.delete(t),v}},6001:function(e,t,n){var r=n(54690),o=n(5982),i=n(26530),l=n(12503),a=n(52876),c=n(66350),u=r?r.prototype:void 0,s=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,d,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!d(new o(e),new o(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var h=1&r;if(p||(p=c),e.size!=t.size&&!h)break;var v=f.get(e);if(v)return v==t;r|=2,f.set(e,t);var b=l(p(e),p(t),r,u,d,f);return f.delete(e),b;case"[object Symbol]":if(s)return s.call(e)==s.call(t)}return!1}},88784:function(e,t,n){var r=n(36094),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,l,a){var c=1&n,u=r(e),s=u.length;if(s!=r(t).length&&!c)return!1;for(var d=s;d--;){var f=u[d];if(!(c?f in t:o.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var v=!0;a.set(e,t),a.set(t,e);for(var b=c;++d<s;){var g=e[f=u[d]],m=t[f];if(i)var y=c?i(m,g,f,t,e,a):i(g,m,f,e,t,a);if(!(void 0===y?g===m||l(g,m,n,i,a):y)){v=!1;break}b||(b="constructor"==f)}if(v&&!b){var C=e.constructor,I=t.constructor;C!=I&&"constructor"in e&&"constructor"in t&&!("function"==typeof C&&C instanceof C&&"function"==typeof I&&I instanceof I)&&(v=!1)}return a.delete(e),a.delete(t),v}},36094:function(e,t,n){var r=n(39329),o=n(75904),i=n(52635);e.exports=function(e){return r(e,i,o)}},72907:function(e,t,n){var r=n(87620);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},75904:function(e,t,n){var r=n(69037),o=n(27471),i=Object.prototype.propertyIsEnumerable,l=Object.getOwnPropertySymbols;e.exports=l?function(e){return null==e?[]:r(l(e=Object(e)),function(t){return i.call(e,t)})}:o},38145:function(e,t,n){var r=n(75148);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},69096:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}},65239:function(e,t,n){var r=n(75148),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},78228:function(e,t,n){var r=n(75148),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},95920:function(e,t,n){var r=n(75148);e.exports=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},9840:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?0x1fffffffffffff:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},87620:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},17168:function(e){e.exports=function(){this.__data__=[],this.size=0}},66582:function(e,t,n){var r=n(3833),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},13867:function(e,t,n){var r=n(3833);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},59557:function(e,t,n){var r=n(3833);e.exports=function(e){return r(this.__data__,e)>-1}},22726:function(e,t,n){var r=n(3833);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},67076:function(e,t,n){var r=n(47978),o=n(70131),i=n(64438);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),str
1ing:new r}}},2530:function(e,t,n){var r=n(72907);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=!!t,t}},44858:function(e,t,n){var r=n(72907);e.exports=function(e){return r(this,e).get(e)}},96265:function(e,t,n){var r=n(72907);e.exports=function(e){return r(this,e).has(e)}},59909:function(e,t,n){var r=n(72907);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=+(n.size!=o),this}},52876:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},75148:function(e,t,n){e.exports=n(84457)(Object,"create")},96718:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},66996:function(e){e.exports=function(e){return this.__data__.has(e)}},66350:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},30560:function(e,t,n){var r=n(70131);e.exports=function(){this.__data__=new r,this.size=0}},58282:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},46638:function(e){e.exports=function(e){return this.__data__.get(e)}},94270:function(e){e.exports=function(e){return this.__data__.has(e)}},3229:function(e,t,n){var r=n(70131),o=n(64438),i=n(90278);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var l=n.__data__;if(!o||l.length<199)return l.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(l)}return n.set(e,t),this.size=n.size,this}},26530:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},89793:function(e,t,n){var r=n(31071);e.exports=function(e,t){return r(e,t)}},52635:function(e,t,n){var r=n(16222),o=n(78803),i=n(81580);e.exports=function(e){return i(e)?r(e):o(e)}},27471:function(e){e.exports=function(){return[]}},91038:function(e,t,n){var r=n(82109),o=n(48457);r({target:"Array",stat:!0,forced:!n(17072)(function(e){Array.from(e)})},{from:o})},9653:function(e,t,n){"use strict";var r=n(82109),o=n(31913),i=n(19781),l=n(17854),a=n(40857),c=n(1702),u=n(54705),s=n(92597),d=n(79587),f=n(47976),p=n(52190),h=n(57593),v=n(47293),b=n(8006).f,g=n(31236).f,m=n(3070).f,y=n(50863),C=n(53111).trim,I="Number",_=l[I],x=a[I],P=_.prototype,T=l.TypeError,S=c("".slice),A=c("".charCodeAt),w=function(e){var t=h(e,"number");return"bigint"==typeof t?t:O(t)},O=function(e){var t,n,r,o,i,l,a,c,u=h(e,"number");if(p(u))throw T("Cannot convert a Symbol value to a number");if("string"==typeof u&&u.length>2){if(43===(t=A(u=C(u),0))||45===t){if(88===(n=A(u,2))||120===n)return NaN}else if(48===t){switch(A(u,1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+u}for(a=0,l=(i=S(u,2)).length;a<l;a++)if((c=A(i,a))<48||c>o)return NaN;return parseInt(i,r)}}return+u},E=u(I,!_(" 0o1")||!_("0b1")||_("+0x1")),j=function(e){var t,n=arguments.length<1?0:_(w(e));return(t=this,f(P,t)&&v(function(){y(t)}))?d(Object(n),this,j):n};j.prototype=P,E&&!o&&(P.constructor=j),r({global:!0,constructor:!0,wrap:!0,forced:E},{Number:j});var k=function(e,t){for(var n,r=i?b(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;r.length>o;o++)s(t,n=r[o])&&!s(e,n)&&m(e,n,g(t,n))};o&&x&&k(a[I],x),(E||o)&&k(a[I],_)},27852:function(e,t,n){"use strict";var r,o=n(82109),i=n(21470),l=n(31236).f,a=n(17466),c=n(41340),u=n(3929),s=n(84488),d=n(84964),f=n(31913),p=i("".endsWith),h=i("".slice),v=Math.min,b=d("endsWith");o({target:"String",proto:!0,forced:!(!f&&!b&&(r=l(String.prototype,"endsWith"))&&!r.writable)&&!b},{endsWith:function(e){var t=c(s(this));u(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=void 0===n?r:v(a(n),r),i=c(e);return p?p(t,i,o):h(t,o-i.length,o)===i}})},32972:function(e,t,n){"use strict";n.d(t,{N:()=>i,r:()=>l}),n(52963),n(42295),n(68233);var r=n(66698),o=/^-?\d*(?:\.(\d+))?/,i=function(e){var t,n;return(null==(n=String(e).match(o))||null==(t=n[1])?void 0:t.length)||void 0},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!e||r.BigNumber.isBigNumber(e)&&!e.isFinite()||"number"==typeof e&&!isFinite(e))return"--";var n=r.BigNumber.isBigNumber(e)?e:new r.BigNumber(e);return n.gte(1e9)?"".concat(n.div(1e9).decimalPlaces(2,r.BigNumber.ROUND_FLOOR).toFormat(),"B"):n.gte(1e6)?"".concat(n.div(1e6).decimalPlaces(2,r.BigNumber.ROUND_FLOOR).toFormat(),"M"):n.gte(1e3)?"".concat(n.div(1e3).decimalPlaces(2,r.BigNumber.ROUND_FLOOR).toFormat(),"K"):n.decimalPlaces(t,r.BigNumber.ROUND_FLOOR).toFormat()}},37507:function(e,t,n){"use strict";n.d(t,{Z:()=>a}),n(92222);var r=n(74512),o=n(32735),i=n(10281),l=n(80199);let a=function(e){var t=e.isFolded,n=e.direction,i=e.onClick,a=(0,o.useMemo)(function(){switch(n){case"left":default:return l.Ro.ARROW_LEFT;case"right":return l.Ro.ARROW_RIGHT;case"top":return l.Ro.ARROW_UP;case"bottom":return l.Ro.ARROW_DOWN}},[n]);return(0,r.jsx)(c,{$direction:n,children:(0,r.jsx)(u,{$direction:n,onClick:i,children:(0,r.jsx)(s,{$isFolded:t,icon:a,size:l.sk.XS})})})};var c=i.ZP.div.withConfig({componentId:"sc-efb3d5d9-0"})(["box-sizing:border-box;display:flex;align-items:center;justify-content:center;background-color:",";"," ",""],function(e){return e.theme.themeColors.background.default},function(e){switch(e.$direction){case"left":case"right":default:return"\n          width: 8px;\n          height: 100%;\n        ";case"top":case"bottom":return"\n          width: 100%;\n          height: 8px;\n        "}},function(e){var t,n=e.$direction,r=e.theme;switch(n){case"left":default:t="right";break;case"right":t="left";break;case"top":t="bottom";break;case"bottom":t="top"}return"border-".concat(t,": 1px solid ").concat(r.themeColors.border.subtle,";")}),u=i.ZP.div.withConfig({componentId:"sc-efb3d5d9-1"})([""," background-color:",";flex-direction:",";cursor:pointer;display:flex;align-items:center;justify-content:center;"],function(e){switch(e.$direction){case"left":case"right":default:return"\n          width: 100%;\n          height: 99px;\n        ";case"top":case"bottom":return"\n          width: 99px;\n          height: 100%;\n        "}},function(e){return e.theme.themeColors.border.subtle},function(e){var t=e.$direction;return("left"===t||"right"===t)&&"column"}),s=(0,i.ZP)(l.ZP).withConfig({componentId:"sc-efb3d5d9-2"})(["",""],function(e){return e.$isFolded&&"transform: rotate(180deg);"})},69100:function(e,t,n){"use strict";n.d(t,{Z:()=>f}),n(27852),n(15306),n(74916),n(9653);var r=n(74512),o=n(32735),i=n(10281),l=n(62715),a=n(71225),c=n(18909),u=n(38074),s=n(6454),d=n(16672);let f=function(e){var t=e.title,n=e.value,i=e.type,a=e.placeholder,f=e.errorMessage,v=e.decimal,b=e.onChange,g=e.onBlur,m=e.maxDigits,y=e.formatThousands,C=void 0!==y&&y,I=e.disabled,_=(0,o.useMemo)(function(){return n&&i===s.nc.DECIMAL&&C&&!n.endsWith(".")&&"-"!==n?(0,d.ni)({value:parseFloat(null==n?void 0:n.replace(/,/g,""))}):n},[C,i,n]),x=(0,o.useMemo)(function(){switch(i){case s.nc.DECIMAL:return(0,d.dF)({maxDecimals:v,maxDigits:m});case s.nc.NUMBER:return(0,d.dF)({maxDecimals:0,maxDigits:m});default:return}},[v,m,i]),P=(0,o.useCallback)(function(e){if(""!==e&&"-"!==e&&"--"!==e){if(i===s.nc.NUMBER){var t=Number(e.replace(/,/g,""));return isNaN(t)?void 0:t}if(i===s.nc.DECIMAL){if(e.endsWith(".")||"-"===e)return e;var n=e.replace(/,/g,"");return isNaN(Number(n))?e:n}return e}},[i]),T=(0,o.useCallback)(function(e){var t=e.target.value;(!x||!t||x.test(t))&&b(P(t))},[x,P,b]),S=(0,o.useCallback)(function(e){var t=e.target.value;if(i===s.nc.DECIMAL&&t){var n=(0,d.TK)(t);if(n!==t)return void b(n)}(0,d.BJ)(t,i,b)},[b,i]);return(0,r.jsxs)(h,{children:[(0,r.jsx)(u.ZP,{typography:l.wZ.TEXT_M_REGULAR,children:t}),(0,r.jsx)(p,{children:(0,r.jsx)(c.ZP,{variant:c.Bv.BORDERED_TEXT,placeholder:a,value:_,onCh
1ange:T,onBlur:g||S,error:f,disabled:I})})]})};var p=i.ZP.div.withConfig({componentId:"sc-e6696636-0"})(["display:flex;flex-direction:column;font-size:","px;font-size:",";"],l.F6.TEXT_M,l.Yy.REGULAR),h=i.ZP.div.withConfig({componentId:"sc-e6696636-1"})(["display:flex;justify-content:space-between;align-items:center;gap:","px;"],a.A.M)},88399:function(e,t,n){"use strict";n.d(t,{Z:()=>s});var r=n(74512);n(32735);var o=n(10281),i=n(81182),l=n(38074),a=n(19367),c=n(18699),u=function(e,t){switch(e){case c.B9.BUY:return t.pnl.positive.default;case c.B9.SELL:default:return t.pnl.negative.default}};let s=function(e){var t=e.orderType,n=e.getTextFromOrderType,o=void 0===n?a.su:n,l=e.dataTestId,c=(0,i.$G)().i18n.language,u=(0,a.cj)(t);return(0,r.jsx)(d,{$buySellType:u,dataTestId:l,children:o(t,!1,c)})};var d=(0,o.zo)(l.ZP).withConfig({componentId:"sc-bea6ccfc-0"})(["color:",";"],function(e){return u(e.$buySellType,e.theme.themeColors)})},27451:function(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>n9});var r,o,i,l,a,c=n(74512),u=n(32735),s=n(10281),d=n(71225),f=n(61305),p=n(6454),h=n(74370),v=n(58688),b=n(37507),g=n(57694),m=n(13266),y=n(81182),C=n(62715),I=n(80199),_=n(38074),x=n(15226),P=n(479);let T=function(){var e=(0,y.$G)().t;return(0,c.jsx)(S,{onClick:h._.scrollToLatest,children:(0,c.jsx)(x.Z,{variant:x.q.BASE,content:(0,c.jsx)(A,{typography:C.wZ.TEXT_M_REGULAR,children:e("Return to the Latest Time")}),placement:"bottom",trigger:"mouseenter",popperOptions:{strategy:"fixed"},children:(0,c.jsx)(I.ZP,{icon:(0,P.dZ)()?I.Ro.LINE_ARROW_LEFT:I.Ro.LINE_ARROW_RIGHT,size:I.sk.L})})})};var S=s.ZP.div.withConfig({componentId:"sc-9338165-0"})(["display:flex;cursor:pointer;&:hover{svg{color:",";}}@media all and (max-width:1280px){svg{width:","px;height:","px;}}"],function(e){return e.theme.themeColors.text.default},I.sk.M,I.sk.M),A=(0,s.ZP)(_.ZP).withConfig({componentId:"sc-9338165-1"})(["display:flex;align-items:center;justify-content:center;padding:","px ","px;color:",";"],d.A.XXS,d.A.XS,function(e){return e.theme.themeColors.background.default}),w=n(82647),O=n(51008),E=n(71028),j=n(57753),k=n(43545),R=n(73407),M=n(81993),L=n(13462);function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(F=function(){return!!e})()}var J={isLoading:!1,selectedIndicatorTab:L.IC.INPUT,selectedIndicator:void 0},U=new(function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function t(){var e,n,r;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");return n=N(n=t),D(e=function(e,t){var n;if(t&&("object"==((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,F()?Reflect.construct(n,[],N(this).constructor):n.apply(this,r)),"setSelectedIndicator",function(t){e.context.selectedIndicator=t}),D(e,"setSelectedIndicatorTab",function(t){e.context.selectedIndicatorTab=t}),D(e,"setLoading",function(t){e.context.isLoading=t}),D(e,"resetContext",function(){e.context=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){D(e,t,n[t])})}return e}({},J)}),e.context=J,e}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Z(t,e),t}(M.default));function $(e,t,n,r,o,i,l){try{var a=e[i](l),c=a.value}catch(e){n(e);return}a.done?t(c):Promise.resolve(c).then(r,o)}function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var X=new function e(){if(!(this instanceof e))throw TypeError("Cannot call a class as a function");B(this,"setInitialModalInfo",function(e,t){U.setSelectedIndicator(e),t&&U.setSelectedIndicatorTab(t)}),B(this,"onChangeIndicator",function(e){U.setSelectedIndicator(e),U.setSelectedIndicatorTab(L.IC.INPUT)}),B(this,"setSelectedIndicatorTab",function(e){U.setSelectedIndicatorTab(e)}),B(this,"onCloseIndicatorConfigModal",function(){U.setSelectedIndicator(void 0)}),B(this,"updateTechnicalIndicator",function(e){var t;return(t=function(){var t,n;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(c){var u=[a,c];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(r){switch(r.label){case 0:return t=e.technicalIndicatorList,n=e.onComplete,U.setLoa
1ding(!0),[4,k.VM.updateTechnicalIndicator({technicalIndicatorList:t},{onSuccess:function(){null==n||n()},onError:function(e){var t=e.code,n=e.message;throw Error((0,R.yi)(t,n))},onFinally:function(){U.setLoading(!1)}})];case 1:return r.sent(),[2]}})},function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function l(e){$(i,r,o,l,a,"next",e)}function a(e){$(i,r,o,l,a,"throw",e)}l(void 0)})})()})};n(21249),n(73210);var G=n(84381),V=n(72140),z=n(10749),W=n(25932);n(69826),n(41539),n(92222);var H=n(74307),K=n(16689);let Y=function(e){var t=e.disabled,n=e.onClickTooltip,r=(0,y.$G)().t,o=(0,u.useCallback)(function(e){e.stopPropagation(),t||null==n||n()},[t,n]);return(0,c.jsx)(q,{className:"indicator-item-tooltip",children:(0,c.jsx)(x.Z,{variant:x.q.BASE,disabled:t,placement:"top",trigger:"mouseenter",content:(0,c.jsx)(ee,{children:(0,c.jsx)(et,{typography:C.wZ.TEXT_M_REGULAR,children:r("Click to view more")})}),children:(0,c.jsx)(Q,{onClick:o,$disabled:t,children:(0,c.jsx)(en,{icon:I.Ro.INFO,size:I.sk.SM,$disabled:t})})})})};var q=s.ZP.div.withConfig({componentId:"sc-7ca18b71-0"})(["display:none;"]),Q=s.ZP.div.withConfig({componentId:"sc-7ca18b71-1"})(["",""],function(e){return e.$disabled&&"cursor: not-allowed;"}),ee=s.ZP.div.withConfig({componentId:"sc-7ca18b71-2"})(["display:flex;padding-inline:","px;padding-block:","px;"],d.A.XS,d.A.XXS),et=(0,s.ZP)(_.ZP).withConfig({componentId:"sc-7ca18b71-3"})(["color:",";"],function(e){return e.theme.themeColors.background.default}),en=(0,s.ZP)(I.ZP).withConfig({componentId:"sc-7ca18b71-4"})(["&:active,&:focus{color:",";}"],function(e){var t=e.theme;return e.$disabled?"":t.themeColors.text.strong});let er=function(e){var t,n=e.indicator,r=e.disabled,o=e.isLoading,i=e.selectedIndicator,l=e.onClickTooltip,a=e.onClickIndicatorItem,s=(0,m.M8)(),d=(0,p.AK)().find(function(e){return e.type===n}),f=null!=(t=d&&d.enabled)&&t,v=(0,u.useMemo)(function(){return r||o},[o,r]),b=(0,u.useMemo)(function(){return!!a},[a]),g=(0,u.useCallback)(function(){v||h._.onSelectIndicator(n,null==s?void 0:s.symbol,function(e){(0,K.ur)({messageType:K.KK.ERROR,message:e})})},[v,n,null==s?void 0:s.symbol]),y=(0,u.useCallback)(function(){v||null==a||a(n)},[a,n,v]);return(0,c.jsxs)(eo,{onClick:y,$selected:i===n,$selectable:b,$disabled:v,children:[(0,c.jsx)(H.Z,{variant:H.Q.WITH_LABEL_DESCRIPTION,label:G.hM[n],checked:f,disabled:v,onClick:g}),l&&(0,c.jsx)(Y,{disabled:v,onClickTooltip:function(){return l(n)}})]})};var eo=s.ZP.div.withConfig({componentId:"sc-76853075-0"})(["display:flex;align-items:center;justify-content:space-between;gap:","px;padding-inline:","px;padding-block:","px;&:hover{background-color:",";.indicator-item-tooltip{display:block;}}.indicator-item-tooltip{","}"," ",""],d.A.XXS,d.A.L,d.A.XS,function(e){return e.theme.themeColors.background.active},function(e){return e.$disabled&&"cursor: not-allowed;"},function(e){var t=e.$selected,n=e.theme;return t&&"background-color: ".concat(n.themeColors.background.active,";")},function(e){var t=e.$selectable,n=e.$disabled;return t&&!n?"cursor: pointer;":n?"cursor: not-allowed;":""});let ei=function(e){var t=e.onClickTooltip,n=e.onClickIndicatorItem,r=e.selectedIndicator,o=e.searchTerm,i=void 0===o?"":o,l=(0,y.$G)().t,a=(0,p.L3)(["loading","selectedSeries"]),s=a.loading,d=a.selectedSeries===V.A.LINE_ASK,f=(0,u.useMemo)(function(){return(0,z.gW)(G.$C,i)},[i]),h=(0,u.useMemo)(function(){return(0,z.gW)(G.HY,i)},[i]);return(0,c.jsxs)(c.Fragment,{children:[f.length>0&&(0,c.jsxs)(el,{children:[(0,c.jsx)(ea,{typography:C.wZ.TEXT_M_REGULAR,children:l("Main Chart")}),(0,c.jsx)(ec,{children:f.map(function(e){return(0,c.jsx)(er,{indicator:e,isLoading:s,disabled:d,onClickIndicatorItem:n,selectedIndicator:r,onClickTooltip:t},e)})})]}),h.length>0&&(0,c.jsxs)(el,{children:[(0,c.jsx)(ea,{typography:C.wZ.TEXT_M_REGULAR,children:l("Sub Chart")}),(0,c.jsx)(ec,{children:h.map(function(e){return(0,c.jsx)(er,{indicator:e,isLoading:s,onClickIndicatorItem:n,selectedIndicator:r,onClickTooltip:t},e)})})]}),i.trim()&&0===f.length&&0===h.length&&(0,c.jsx)(W.Z,{variant:W.R.NO_DATA_TO_DISPLAY,label:l("No indicators found")})]})};var el=s.ZP.div.withConfig({componentId:"sc-fdd450db-0"})([""]),ea=(0,s.ZP)(_.ZP).withConfig({componentId:"sc-fdd450db-1"})(["display:block;padding-inline:","px;padding-block:","px;color:",";"],d.A.L,d.A.XS,function(e){return e.theme.themeColors.text.subtle}),ec=s.ZP.div.withConfig({componentId:"sc-fdd450db-2"})(["display:flex;flex-direction:column;"]),eu=n(78459),es=n(96838),ed=n(18909),ef=n(97186),ep=n(88651);n(37092),n(92274),n(68233),n(10086),n(13484),n(19975),n(65132),n(48868),n(54861),n(81874);var eh=n(89793),ev=n.n(eh);function eb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eg=(eb(r={},k.PJ.TI_MA,{firstPeriod:7,secondPeriod:25,thirdPeriod:99,firstColor:"#2194F3",secondColor:"#69DEDE",thirdColor:"#FF00FF"}),eb(r,k.PJ.TI_RSI,{period:24,color:"#8E1599"}),eb(r,k.PJ.TI_SD,{period:20,color:"#2194F3"}),eb(r,k.PJ.TI_EMA,{period:9,color:"#2194F3"}),eb(r,k.PJ.TI_WMA,{period:9,color:"#2194F3"}
1),eb(r,k.PJ.TI_ATR,{period:14,color:"#BA3033"}),eb(r,k.PJ.TI_CCI,{period:20,color:"#2194F3"}),eb(r,k.PJ.TI_SAR,{max:.2,step:.02,color:"#3A6CA8"}),eb(r,k.PJ.TI_BOLL,{stdDev:2,period:21,upperColor:"#00897B",middleColor:"#BA3033",lowerColor:"#00897B"}),eb(r,k.PJ.TI_MACD,{fastPeriod:12,slowPeriod:26,signalPeriod:9,lineColor:"#2194F3",signalLineColor:"#FF6B01"}),eb(r,k.PJ.TI_SO,{period:14,signalPeriod:3,periodColor:"#2194F3",signalPeriodColor:"#FF6B01"}),eb(r,k.PJ.TI_SSMACD,{fastEmaPeriod:12,slowEmaPeriod:26,signalPeriod:9,kPeriodShort:15,dPeriodShort:21,slowingShort:21,kPeriodLong:140,dPeriodLong:84,slowingLong:84,normalizeLookback:50,macdLineColor:"#FFFFFF",macdSignalLineColor:"#1E90FF",histogramRisingColor:"#689409",histogramFallingColor:"#DB0968",stochasticShortColor:"#FFD700",stochasticLongColor:"#DA70D6",levelLineColor:"#C0C0C0"}),r),em=n(36333),ey=n(56740),eC=n(7433),eI=function(){return(0,M.useService)(U,function(e){return e.selectedIndicator})};n(34994),n(42295),n(75654),n(66251),n(80153),n(79150),n(96752),n(27425),n(1818),n(86305),n(803);var e_=n(37918),ex=n(16672);function eP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var eT=(eP(o={},k.PJ.TI_MA,{inputFields:function(e){var t,n,r;return[{key:"firstPeriod",label:P.ag.t("Length"),value:(null==e||null==(t=e.firstPeriod)?void 0:t.toString())||"",defaultValue:eg[k.PJ.TI_MA].firstPeriod.toString(),type:p.nc.NUMBER},{key:"secondPeriod",label:P.ag.t("Length"),value:(null==e||null==(n=e.secondPeriod)?void 0:n.toString())||"",defaultValue:eg[k.PJ.TI_MA].secondPeriod.toString(),type:p.nc.NUMBER},{key:"thirdPeriod",label:P.ag.t("Length"),value:(null==e||null==(r=e.thirdPeriod)?void 0:r.toString())||"",defaultValue:eg[k.PJ.TI_MA].thirdPeriod.toString(),type:p.nc.NUMBER}]},styleFields:function(e){return[{key:"firstColor",label:"".concat(G.hM[k.PJ.TI_MA]).concat((null==e?void 0:e.firstPeriod)||eg[k.PJ.TI_MA].firstPeriod).toUpperCase(),value:(null==e?void 0:e.firstColor)||"",defaultValue:eg[k.PJ.TI_MA].firstColor,type:p.nc.TEXT},{key:"secondColor",label:"".concat(G.hM[k.PJ.TI_MA]).concat((null==e?void 0:e.secondPeriod)||eg[k.PJ.TI_MA].secondPeriod).toUpperCase(),value:(null==e?void 0:e.secondColor)||"",defaultValue:eg[k.PJ.TI_MA].secondColor,type:p.nc.TEXT},{key:"thirdColor",label:"".concat(G.hM[k.PJ.TI_MA]).concat((null==e?void 0:e.thirdPeriod)||eg[k.PJ.TI_MA].thirdPeriod).toUpperCase(),value:(null==e?void 0:e.thirdColor)||"",defaultValue:eg[k.PJ.TI_MA].thirdColor,type:p.nc.TEXT}]}}),eP(o,k.PJ.TI_BOLL,{inputFields:function(e){var t,n;return[{key:"period",label:P.ag.t("Length"),value:(null==e||null==(t=e.period)?void 0:t.toString())||"",defaultValue:eg[k.PJ.TI_BOLL].period.toString(),type:p.nc.NUMBER},{key:"stdDev",label:P.ag.t("Standard Deviation"),value:(null==e||null==(n=e.stdDev)?void 0:n.toString())||"",defaultValue:eg[k.PJ.TI_BOLL].stdDev.toString(),type:p.nc.DECIMAL}]},styleFields:function(e){return[{key:"upperColor",label:P.ag.t("Upper"),value:(null==e?void 0:e.upperColor)||"",defaultValue:eg[k.PJ.TI_BOLL].upperColor,type:p.nc.TEXT},{key:"middleColor",label:P.ag.t("Middle"),value:(null==e?void 0:e.middleColor)||"",defaultValue:eg[k.PJ.TI_BOLL].middleColor,type:p.nc.TEXT},{key:"lowerColor",label:P.ag.t("Lower"),value:(null==e?void 0:e.lowerColor)||"",defaultValue:eg[k.PJ.TI_BOLL].lowerColor,type:p.nc.TEXT}]}}),eP(o,k.PJ.TI_EMA,{inputFields:function(e){var t;return[{key:"period",label:P.ag.t("Length"),value:(null==e||null==(t=e.period)?void 0:t.toString())||"",defaultValue:eg[k.PJ.TI_EMA].period.toString(),type:p.nc.NUMBER}]},styleFields:function(e){return[{key:"color",label:"".concat(G.hM[k.PJ.TI_EMA]).concat((null==e?void 0:e.period)||eg[k.PJ.TI_EMA].period).toUpperCase(),value:(null==e?void 0:e.color)||"",defaultValue:eg[k.PJ.TI_EMA].color,type:p.nc.TEXT}]}}),eP(o,k.PJ.TI_SAR,{inputFields:function(e){var t,n;return[{key:"step",label:P.ag.t("Increment"),value:(null==e||null==(t=e.step)?void 0:t.toString())||"",defaultValue:eg[k.PJ.TI_SAR].step.toString(),type:p.nc.DECIMAL},{key:"max",label:P.ag.t("Max Value"),value:(null==e||null==(n=e.max)?void 0:n.toString())||"",defaultValue:eg[k.PJ.TI_SAR].max.toString(),type:p.nc.DECIMAL}]},styleFields:function(e){var t;return[{key:"color",label:null==(t=G.hM[k.PJ.TI_SAR])?void 0:t.toUpperCase(),value:(null==e?void 0:e.color)||"",defaultValue:eg[k.PJ.TI_SAR].color,type:p.nc.TEXT}]}}),eP(o,k.PJ.TI_WMA,{inputFields:function(e){var t;return[{key:"period",label:P.ag.t("Length"),value:(null==e||null==(t=e.period)?void 0:t.toString())||"",defaultValue:eg[k.PJ.TI_WMA].period.toString(),type:p.nc.NUMBER}]},styleFields:function(e){return[{key:"color",label:"".concat(G.hM[k.PJ.TI_WMA]).concat((null==e?void 0:e.period)||eg[k.PJ.TI_WMA].period).toUpperCase(),value:(null==e?void 0:e.color)||"",defaultValue:eg[k.PJ.TI_WMA].color,type:p.nc.TEXT}]}}),eP(o,k.PJ.TI_MACD,{inputFields:function(e){var t,n,r;return[{key:"fastPeriod",label:P.ag.t("Fast Length"),value:(null==e||null==(t=e.fastPeriod)?void 0:t.toString())||"",defaultValue:eg[k.PJ.TI_MACD].fastPeriod.toString(),type:p.nc.NUMBER},{key:"slowPeriod",label:P.ag.t("Slow Length"),value:(null==e||null==(n=e.slowPeriod)?void 0:n.toString())||"",defaultValue:eg[k.PJ.TI_MACD].slowPeriod.toString(),type:p.nc.NUMBER},{key:"signalPeriod",label:P.ag.t("Signal Smoothing"),value:(null==e||null==(r=e.signalPeriod)?void 0:r.toString())||"",defaultValue:eg[k.PJ.TI_MACD].signalPeriod.toString(),type:p.nc.NUMBER}]},styleFields:function(e){var t;return[{key:"lineColor",label:null==(t=G.hM[k.PJ.TI_MACD])?void 0:t.toUpperCase(),value:(null==e?void 0:e.lineColor)||"",defaultValue:eg[k.PJ.TI_MACD].lineColor,type:p.nc.TEXT},{key:"signalLineColor",label:P.ag.t("Signal"),value:(null==e?void 0:e.signalLineColor)||"",defaultValue:eg[k.PJ.TI_MACD].signalLineColor,type:p.nc.TEXT}]}}),eP(o,k.PJ.TI_ATR,{inputFields:function(e){var t;return[{key:"period",label:P.ag.t("Length"),value:(null==e||null==(t=e.period)?void 0:t.toString())||"",defaultValue:eg[k.PJ.TI_ATR].period.toString(),type:p.nc.NUMBER}]},styleFields:function(e){var t;return[{key:"color",label:null==(t=G.hM[k.PJ.TI_ATR])?void 0:t.toUpperCase(),value:(null==e?void 0:e.color)||"",defaultValue:eg[k.PJ.TI_ATR].color,type:p.nc.TEXT}]}}),eP(o,k.PJ.TI_CCI,{inputFields:function(e){var t;return[{key:"period",label:P.ag.t("Length"),value:(null==e||null==(t=e.period)?void 0:t.toString())||"",defaultValue:eg[k.PJ.TI_CCI].period.toString(),type:p.nc.NUMBER}]},styleFields:function(e){var t;return[{key:"color",label:null==(t=G.hM[k.PJ.TI_CCI])?void 0:t.toUpperCase(),value:(null==e?void 0:e.color)||"",defaultValue:eg[k.PJ.TI_CCI].color,type:p.nc.TEXT}]}}),eP(o,k.PJ.TI_RSI,{inputFields:function(e){var t;return[{key:"period",label:P.ag.t("Length"),value:(null==e||null==(t=e.period)?void 0:t.toString())||"",defaultValue:eg[k.PJ.TI_RSI].period.toString(),type:p.nc.NUMBER}]},styleFields:function(e){return[{key:"color",label:"".concat(G.hM[k.PJ.TI_RSI]).concat((null==e?void 0:e.period)||eg[k.PJ.TI_RSI].period).toUpperCase(),value:(null==e?void 0:e.color)||"",defaultValue:eg[k.PJ.TI_RSI].color,type:p.nc.TEXT}]}}),eP(o,k.PJ.TI_SD,{inputFields:function(e){var t;return[{key:"period",label:P.ag.t("Period"),value:(null==e||null==(t=e.period)?void 0:t.toString())||"",defaultValue:eg[k.PJ.TI_SD].period.toString(),type:p.nc.NUMBER}]},styleFields:function(e){return[{key:"color",label:"".concat(G.hM[k.PJ.TI_SD]).concat((null==e?void 0:e.period)||eg[k.PJ.TI_SD].period).toUpperCase(),value:(null==e?void 0:e.color)||"",defaultValue:eg[k.PJ.TI_SD].color,type:p.nc.TEXT}]}}),eP(o,k.PJ.TI_SO,{inputFields:function(e){var t,n;return[{key:"period",label:P.ag.t("Period"),value:(null==e||null==(t=e.period)?void 0:t.toString())||"",defaultValue:eg[k.PJ.TI_SO].period.toString(),type:p.nc.NUMBER},{key:"signalPeriod",label:P.ag.t("Signal Period"),value:(null==e||null==(n=e.signalPeriod)?void 0:n.toString())||"",defaultValue:eg[k.PJ.TI_SO].signalPeriod.toString(),type:p.nc.NUMBER}]},styleFields:function(e){return[{key:"periodColor",label:P.ag.t("Period"),value:(null==e?void 0:e.periodColor)||"",defaultValue:eg[k.PJ.TI_SO].periodColor,type:p.nc.TEXT},{key:"signalPeriodColor",label:P.ag.t("Signal Period"),value:(null==e?void 0:e.signalPeriodColor)||"",defaultValue:eg[k.PJ.TI_SO].signalPeriodColor,type:p.nc.TEXT}]}}),eP(o,k.PJ.TI_SSMACD,{inputFields:function(e){var t=eg[k.PJ.TI_SSMACD];return[{key:"fastEmaPeriod",label:P.ag.t("MACD Fast Length")},{key:"slowEmaPeriod",label:P.ag.t("MACD Slow Length")},{key:"signalPeriod",label:P.ag.t("MACD Signal Smoothing")},{key:"kPeriodShort",label:P.ag.t("Short Stochastic %K")},{key:"dPeriodShort",label:P.ag.t("Short Stochastic %D")},{key:"slowingShort",label:P.ag.t("Short Stochastic Slowing")},{key:"kPeriodLong",label:P.ag.t("Long Stochastic %K")},{key:"dPeriodLong",label:P.ag.t("Long Stochastic %D")},{key:"slowingLong",label:P.ag.t("Long Stochastic Slowing")},{key:"normalizeLookback",label:P.ag.t("Normalization Lookback")}].map(function(n){var r=n.key;return{key:r,label:n.label,value:ej(null==e?void 0:e[r]),defaultValue:t[r].toString(),type:p.nc.NUMBER,readOnly:!0}})},styleFields:function(e){var t=eg[k.PJ.TI_SSMACD];return[{key:"macdLineColor",label:P.ag.t("MACD Line")},{key:"macdSignalLineColor",label:P.ag.t("MACD Signal")},{key:"histogramRisingColor",label:P.ag.t("Histogram Rising")},{key:"histogramFallingColor",label:P.ag.t("Histogram Falling")},{key:"stochasticShortColor",label:P.ag.t("Short Stochastic")},{key:"stochasticLongColor",label:P.ag.t("Long Stochastic")},{key:"levelLineColor",label:P.ag.t("Level Lines")}].map(function(n){var r=n.key;return{key:r,label:n.label,value:(null==e?void 0:e[r])||"",defaultValue:t[r],type:p.nc.TEXT,readOnly:!0}})}}),o),eS={input:(eP(i={},k.PJ.TI_MA,["firstPeriod","secondPeriod","thirdPeriod"]),eP(i,k.PJ.TI_BOLL,["stdDev","period"]),eP(i,k.PJ.TI_SAR,["max","step"]),eP(i,k.PJ.TI_MACD,["fastPeriod","slowPeriod","signalPeriod"]),eP(i,k.PJ.TI_SO,["period","signalPeriod"]),eP(i,k.PJ.TI_RSI,["period"]),eP(i,k.PJ.TI_EMA,["period"]),eP(i,k.PJ.TI_WMA,["period"]),eP(i,k.PJ.TI_ATR,["period"]),eP(i,k.PJ.TI_CCI,["period"]),eP(i,k.PJ.TI_SD,["period"]),eP(i,k.PJ.TI_SSMACD,["fastEmaPeriod","slowEmaPeriod","signalPeriod","kPeriodShort","dPeriodShort","slowingShort","kPeriodLong","dPeriodLong","slowingLong","normalizeLookback"]),i),style:(eP(l={},k.PJ.TI_MA,["firstColor","secondColor","thirdColor"]),eP(l,k.PJ.TI_BOLL,["upperColor","middleColor","lowerColor"]),eP(l,k.PJ.TI_MACD,["lineColor","signalLineColor","barPositiveColor","barNegativeColor"]),eP(l,k.PJ.TI_SO,["periodColor","signalPeriodColor"]),eP(l,k.PJ.TI_SAR,["color"]),eP(l,k.PJ.TI_RSI,["color"]),eP(l,k.PJ.TI_EMA,["color"]),eP(l,k.PJ.TI_WMA,["color"]),eP(l,k.PJ.TI_ATR,["color"]),eP(l,k.PJ.TI_CCI,["color"]),eP(l,k.PJ.TI_SD,["color"]),eP(l,k.PJ.TI_SSMACD,["macdLineColor","macdSignalLineColor","histogramRisingColor","histogramFallingColor","stochasticShortColor","stochasticLongColor","levelLineColor"]),l)};function eA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}
1function ew(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ew(e,t,n[t])})}return e}var eE=function(e){return e.replace(/rgba\(\s*(\d+)\s+(\d+)\s+(\d+)\s*\/\s*([\d.]+)\s*\)/,"rgba($1, $2, $3, $4)").replace(/rgb\(\s*(\d+)\s+(\d+)\s+(\d+)\s*\)/,"rgb($1, $2, $3)")},ej=function(e){return(null==e?void 0:e.toString())||""},ek=function(e){if(!e)return[];try{return JSON.parse(e).map(eE)}catch(e){return[]}},eR=function(e){if(void 0!==e)return"number"==typeof e?e:""===e.trim()||isNaN(Number(e))?e.startsWith("#")||e.startsWith("rgb")?(0,e_.aQ)((0,e_.My)(e,"hex")):e:Number(e)},eM=function(e){if(e)return Object.fromEntries(Object.entries(e).map(function(e){var t=function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return eA(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eA(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return[t[0],eR(t[1])]}))},eL=function(e){var t=eg[e];if(t)return eM(t)},eD=function(e,t,n){var r=eO({},t),o=e.split(",");return n.forEach(function(e,n){if(void 0!==o[n]&&e in r){var i=parseFloat(o[n])||t[e];r[e]=i}}),r},eN=function(e,t){var n={},r=ek(e);return t.forEach(function(e,t){void 0!==r[t]&&(n[e]=r[t])}),n},eZ=(ew(a={},k.PJ.TI_MA,function(e,t){var n=eO({},t);if(null==e?void 0:e.value){var r=eS.input[k.PJ.TI_MA]||[];n=eD(e.value,n,r)}if(null==e?void 0:e.colors){var o=eS.style[k.PJ.TI_MA]||[];n=eO({},n,eN(e.colors,o))}return n}),ew(a,k.PJ.TI_BOLL,function(e,t){var n=eO({},t);if(null==e?void 0:e.value){var r=eS.input[k.PJ.TI_BOLL]||[];n=eD(e.value,n,r)}if(null==e?void 0:e.colors){var o=eS.style[k.PJ.TI_BOLL]||[];n=eO({},n,eN(e.colors,o))}return n}),ew(a,k.PJ.TI_SAR,function(e,t){var n=eO({},t);if(null==e?void 0:e.value){var r=eS.input[k.PJ.TI_SAR]||[];n=eD(e.value,n,r)}if(null==e?void 0:e.colors){var o=eS.style[k.PJ.TI_SAR]||[];n=eO({},n,eN(e.colors,o))}return n}),ew(a,k.PJ.TI_MACD,function(e,t){var n=eO({},t);if(null==e?void 0:e.value){var r=eS.input[k.PJ.TI_MACD]||[];n=eD(e.value,n,r)}if(null==e?void 0:e.colors){var o=eS.style[k.PJ.TI_MACD]||[];n=eO({},n,eN(e.colors,o))}return n}),ew(a,k.PJ.TI_SO,function(e,t){var n=eO({},t);if(null==e?void 0:e.value){var r=eS.input[k.PJ.TI_SO]||[];n=eD(e.value,n,r)}if(null==e?void 0:e.colors){var o=eS.style[k.PJ.TI_SO]||[];n=eO({},n,eN(e.colors,o))}return n}),ew(a,k.PJ.TI_RSI,function(e,t){var n=eO({},t);if(null==e?void 0:e.value){var r=eS.input[k.PJ.TI_RSI]||[];n=eD(e.value,n,r)}if(null==e?void 0:e.colors){var o=eS.style[k.PJ.TI_RSI]||[];n=eO({},n,eN(e.colors,o))}return n}),ew(a,k.PJ.TI_EMA,function(e,t){var n=eO({},t);if(null==e?void 0:e.value){var r=eS.input[k.PJ.TI_EMA]||[];n=eD(e.value,n,r)}if(null==e?void 0:e.colors){var o=eS.style[k.PJ.TI_EMA]||[];n=eO({},n,eN(e.colors,o))}return n}),ew(a,k.PJ.TI_WMA,function(e,t){var n=eO({},t);if(null==e?void 0:e.value){var r=eS.input[k.PJ.TI_WMA]||[];n=eD(e.value,n,r)}if(null==e?void 0:e.colors){var o=eS.style[k.PJ.TI_WMA]||[];n=eO({},n,eN(e.colors,o))}return n}),ew(a,k.PJ.TI_ATR,function(e,t){var n=eO({},t);if(null==e?void 0:e.value){var r=eS.input[k.PJ.TI_ATR]||[];n=eD(e.value,n,r)}if(null==e?void 0:e.colors){var o=eS.style[k.PJ.TI_ATR]||[];n=eO({},n,eN(e.colors,o))}return n}),ew(a,k.PJ.TI_CCI,function(e,t){var n=eO({},t);if(null==e?void 0:e.value){var r=eS.input[k.PJ.TI_CCI]||[];n=eD(e.value,n,r)}if(null==e?void 0:e.colors){var o=eS.style[k.PJ.TI_CCI]||[];n=eO({},n,eN(e.colors,o))}return n}),ew(a,k.PJ.TI_SD,function(e,t){var n=eO({},t);if(null==e?void 0:e.value){var r=eS.input[k.PJ.TI_SD]||[];n=eD(e.value,n,r)}if(null==e?void 0:e.colors){var o=eS.style[k.PJ.TI_SD]||[];n=eO({},n,eN(e.colors,o))}return n}),ew(a,k.PJ.TI_SSMACD,function(e,t){return eO({},t)}),a),eF=function(e,t){var n=eg[e];return(0,eZ[e])(t,n)},eJ=function(e,t){var n=eT[e];return{inputFields:n.inputFields(t),styleFields:n.styleFields(t)}},eU=function(e,t){var n=eS.input[e]||[],r=t.reduce(function(e,t){return e[t.key]=(0,ex.BJ)(t.value,t.type),e},{});return n.map(function(e){return r[e]||""}).join(",")},e$=function(e,t){var n=eS.style[e]||[],r=t.reduce(function(e,t){return e[t.key]=(0,e_.My)(t.value,"hex"),e},{});return n.map(function(e){return r[e]||""})},eB=function(e,t,n){var r,o=eJ(e,t),i=(null==(r=o.inputFields)?void 0:r.map(function(e){var t,n;return t=eO({},e),n=n={value:(0,ex.BJ)(e.value,e.type)},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t}))||[],l=o.styleFields||[],a=eU(e,i),c=e$(e,l);return a&&c?{type:e,value:a,colors:JSON.stringify(c),enabled:null==n||n}:null};function eX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eG(e,t,n,r,o,i,l){try{var a=e[i](l),c=a.value}catch(e){n(e);return}a.done?t(c):Promise.resolve(c).then(r,o)}function eV(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function l(e){eG(i,r,o,l,a,"next",e)}function a(e){eG(i,r,o,l,a,"throw",e)}l(void 0)})}}function ez(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eW(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(c){var u=[a,c];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}var eH=function(e){var t=(0,y.$G)().t,n=(0,v.AK)(),r=eI(),o=(0,em.w)({defaultValues:{}}),i=o.watch,l=o.setValue,a=o.handleSubmit,c=i(),s=(0,u.useCallback)(function(e){if(!c[e]){var t=n.find(function(t){return t.type===e}),r=eF(e,t);l(e,r)}},[c,n,l]),d=(0,u.useCallback)(function(e){return c[e]},[c]),f=(0,u.useCallback)(function(e,t){if(e&&r){var n,o,i=d(r);i&&l(r,(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){ez(e,t,n[t])})}return e}({},i),o=null!=(o=ez({},e,eR(t)))?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n))}},[d,r,l]),b=(0,u.useCallback)(function(e){return eV(function(){var r,o,i,a;return eW(this,function(c){switch(c.label){case 0:if(r=null==n?void 0:n.find(function(t){return t.type===e}),o=eL(e),i=eg[e],l(e,o),!(a=eB(e,i,!!(null==r?void 0:r.enabled))))return[3,2];return[4,X.updateTechnicalIndicator({technicalIndicatorList:[a],onComplete:function(){h._.dispatchUpdateIndicatorEvent({type:p.a1.UPDATE_INDICATOR_CONFIG,data:a}),h._.getAllTechnicalIndicators(),ey.Yu.showAlert({message:"".concat(G.hM[e]," ")+t("has been reset to default"),messageType:ey.KK.SUCCESS})}})];case 1:c.sent(),c.label=2;case 2:return[2]}})})()},[n,l,t]),g=(0,u.useMemo)(function(){if(!r)return!0;var e=c[r],t=eL(r);return ev()(e,t)},[c,r]),m=(0,u.useCallback)(function(){return eV(function(){var t,r,o,i,l,a,u;return eW(this,function(s){switch(s.label){case 0:t=[],r=!0,o=!1,i=void 0;try{for(l=function(){var e,r=(e=u.value,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(e,2)||function(e,t){if(e){if("string"==typeof e)return eX(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eX(e,t)}}
1(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=r[0],i=r[1];if(!i)return"continue";var l=null==n?void 0:n.find(function(e){return e.type===o}),a=eF(o,l);if(ev()(i,a))return"continue";var c=!!(null==l?void 0:l.enabled),s=eB(o,i,c);s&&t.push(s)},a=Object.entries(c)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0)l()}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}if(0===t.length)return null==e||e(),[2];return[4,X.updateTechnicalIndicator({technicalIndicatorList:t,onComplete:function(){t.forEach(function(e){h._.dispatchUpdateIndicatorEvent({type:p.a1.UPDATE_INDICATOR_CONFIG,data:e})}),h._.getAllTechnicalIndicators(),null==e||e()}})];case 1:return s.sent(),[2]}})})()},[c,e,n]);return{formMethods:o,formData:c,initializeIndicatorFormData:s,onChange:f,resetIndicator:b,isDisableResetBtn:g,handleSubmit:a(m)}},eK=n(81468),eY=n(69100),eq=n(7803),eQ=s.ZP.div.withConfig({componentId:"sc-f3a7347f-0"})(["display:flex;align-self:flex-end;gap:","px;padding:","px;"],d.A.S,d.A.L),e0=s.ZP.div.withConfig({componentId:"sc-f3a7347f-1"})(["min-height:100px;width:376px;display:flex;flex-direction:column;"]);d.A.M;let e1=(0,u.memo)(function(e){var t=e.indicatorFields,n=e.indicator,r=e.onChange,o=(0,y.$G)().t,i=(0,M.useService)(U,function(e){return e.selectedIndicatorTab}),l=(0,u.useMemo)(function(){var e,i,l=[];return(null==t?void 0:t.inputFields)&&(null==(e=t.inputFields)?void 0:e.length)>0&&l.push({label:o("Input"),value:L.IC.INPUT,content:(0,c.jsx)(e8,{children:t.inputFields.map(function(e){return(0,c.jsx)(eY.Z,{title:e.label,value:e.value,type:e.type,onChange:function(t){return r(e.key,t)},maxDigits:p.B6,formatThousands:!0,disabled:e.readOnly},e.key)})})}),(null==t?void 0:t.styleFields)&&(null==(i=t.styleFields)?void 0:i.length)>0&&l.push({label:o("Style"),value:L.IC.STYLE,content:(0,c.jsx)(e6,{children:t.styleFields.map(function(e){return(0,c.jsx)(eq.Em,{title:e.label,value:e.value,onChange:function(t){return r(e.key,t)},disabled:e.readOnly},e.key)})})}),l.push({label:o("Description"),value:L.IC.DESCRIPTION,content:(0,c.jsx)(_.ZP,{typography:C.wZ.TEXT_M_REGULAR,children:(0,z.uk)(n)})}),l},[n,o,t,r]),a=(0,u.useMemo)(function(){return l.map(function(e){return{label:e.label,value:e.value}})},[l]),s=(0,u.useMemo)(function(){var e=l.find(function(e){return e.value===i});return(null==e?void 0:e.content)||null},[l,i]);return(0,u.useEffect)(function(){l.some(function(e){return e.value===i})||X.setSelectedIndicatorTab(l[0].value)},[i,l]),(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)(e0,{children:[(0,c.jsx)(e2,{children:(0,c.jsx)(eK.Z,{variant:eK.N.UNDERLINED,stretch:!0,tabList:a,selectedValue:i,onClick:function(e){return X.setSelectedIndicatorTab(e)}})}),(0,c.jsx)(e3,{children:s})]})})});var e2=s.zo.div.withConfig({componentId:"sc-8dde1fce-0"})(["display:flex;border-inline-end:1px solid ",";"],function(e){return e.theme.themeColors.border.subtle}),e3=s.zo.div.withConfig({componentId:"sc-8dde1fce-1"})(["padding-inline:","px;padding-block:","px;max-height:290px;overflow-y:auto;"],d.A.L,d.A.XL),e8=s.zo.div.withConfig({componentId:"sc-8dde1fce-2"})(["display:flex;flex-direction:column;gap:","px;"],d.A.M),e6=(0,s.zo)(e8).withConfig({componentId:"sc-8dde1fce-3"})(["width:70%;"]);let e9=function(e){var t,n=e.onCancel,r=e.onSubmit,o=(0,y.$G)().t,i=(t=["isLoading"],(0,M.useService)(U,function(e){return(0,eC.j$)(e||{},t)})).isLoading;return(0,c.jsxs)(eQ,{children:[(0,c.jsx)(es.ZP,{variant:es.eF.OUTLINED_THEMED,onClick:n,children:o("Cancel")}),(0,c.jsx)(es.ZP,{variant:es.eF.FILLED_THEMED,onClick:r,loading:i,children:o("Confirm")})]})};function e7(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function e5(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function e4(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}
1)(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var te=function(e){var t,n=e.onClose,r=(0,y.$G)().t,o=eI(),i=(t=(0,u.useState)(""),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return e7(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e7(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=i[0],a=i[1],s=eH(n),d=s.formMethods,f=s.formData,p=s.initializeIndicatorFormData,h=s.onChange,v=s.resetIndicator,b=s.isDisableResetBtn,g=s.handleSubmit,m=(0,u.useCallback)(function(){o&&v(o)},[o,v]),x=(0,u.useCallback)(function(){null==n||n()},[n]);(0,u.useEffect)(function(){o&&p(o)},[o,p]),(0,u.useEffect)(function(){return function(){X.onCloseIndicatorConfigModal(),X.setSelectedIndicatorTab(L.IC.INPUT)}},[]);var P=(0,u.useCallback)(function(e){X.onChangeIndicator(e)},[]),T=(0,u.useCallback)(function(e){a(e.target.value)},[]),S=(0,u.useMemo)(function(){if(o){var e=f[o];return eJ(o,e)}},[o,f]);return(0,c.jsx)(eu.RV,e4(e5({},d),{children:(0,c.jsxs)(ef.ZP,{variant:ef.KH.CONFIRMATION,modalTitle:r("Indicators Setting"),footer:(0,c.jsx)(c.Fragment,{}),children:[(0,c.jsxs)(tn,{children:[(0,c.jsxs)(to,{children:[(0,c.jsxs)(tr,{children:[(0,c.jsx)(tl,{icon:I.Ro.SEARCH}),(0,c.jsx)(ts,{placeholder:r("Search"),value:l,onChange:T})]}),(0,c.jsx)(ti,{children:(0,c.jsx)(ei,{selectedIndicator:o,onClickIndicatorItem:P,searchTerm:l})})]}),(0,c.jsx)(ta,{children:o&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(tc,{children:[(0,c.jsx)(_.ZP,{typography:C.wZ.TEXT_L_MEDIUM,children:G.hM[o]}),(0,c.jsx)(tu,{variant:es.eF.TEXT_ONLY,onClick:m,disabled:b,uppercase:!0,children:r("Reset to Default")})]}),(0,c.jsx)(e1,{indicatorFields:S,indicator:o,onChange:h})]})})]}),(0,c.jsx)(e9,{onCancel:x,onSubmit:g})]})}))},tt=function(e){(0,ep.ZP)(function(t){return(0,c.jsx)(te,e4(e5({},e),{onClose:t}))})},tn=s.ZP.div.withConfig({componentId:"sc-a1d869e-0"})(["display:flex;border-bottom:1px solid ",";"],function(e){return e.theme.themeColors.border.subtle}),tr=s.ZP.div.withConfig({componentId:"sc-a1d869e-1"})(["display:flex;align-items:center;padding-inline:","px;border-bottom:1px solid ",";"],d.A.L,function(e){return e.theme.themeColors.border.subtle}),to=s.ZP.div.withConfig({componentId:"sc-a1d869e-2"})(["display:flex;flex-direction:column;flex-basis:200px;flex-shrink:0;"]),ti=s.ZP.div.withConfig({componentId:"sc-a1d869e-3"})(["height:384px;overflow-y:auto;"]),tl=(0,s.ZP)(I.ZP).withConfig({componentId:"sc-a1d869e-4"})(["margin-right:-","px;"],d.A.XXXS),ta=s.ZP.div.withConfig({componentId:"sc-a1d869e-5"})(["flex:1;display:flex;flex-direction:column;border-inline-start:1px solid ",";"],function(e){return e.theme.themeColors.border.subtle}),tc=s.ZP.div.withConfig({componentId:"sc-a1d869e-6"})(["display:flex;justify-content:space-between;padding-inline:","px;padding-block:","px;border-bottom:1px solid ",";"],d.A.L,d.A.S,function(e){return e.theme.themeColors.border.subtle}),tu=(0,s.ZP)(es.ZP).withConfig({componentId:"sc-a1d869e-7"})(["font-size:","px !important;font-weight:"," !important;color:",";"],C.F6.TEXT_S,C.Yy.REGULAR,function(e){return e.theme.themeColors.primary}),ts=(0,s.ZP)(ed.ZP).withConfig({componentId:"sc-a1d869e-8"})(["background-color:",";"],function(e){return e.theme.themeColors.background.default});let td=function(){var e=(0,y.$G)().t;return(0,c.jsxs)(tf,{children:[(0,c.jsx)(tp,{typography:C.wZ.TEXT_L_MEDIUM,children:e("Indicators")}),(0,c.jsx)(ei,{onClickTooltip:function(e){X.setInitialModalInfo(e,L.IC.DESCRIPTION),tt()}})]})};var tf=s.ZP.div.withConfig({componentId:"sc-10e7f6a8-0"}
1)(["height:326px;overflow-y:auto;scrollbar-gutter:stable;"]),tp=(0,s.ZP)(_.ZP).withConfig({componentId:"sc-10e7f6a8-1"})(["display:block;padding-inline:","px;padding-block:","px;border-bottom:1px solid ",";"],d.A.L,d.A.S,function(e){return e.theme.themeColors.border.subtle});function th(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}let tv=(0,u.memo)(function(e){var t,n=e.selectedSymbol,r=(0,y.$G)().t,o=(0,p.rg)(),i=(0,u.useRef)(null),l=(t=(0,u.useState)(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return th(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return th(e,t)}}(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=l[0],s=l[1],d=function(){s(function(e){return!e})},f=(0,u.useCallback)(function(){s(!1)},[]);return(0,c.jsxs)(tb,{ref:i,children:[(0,c.jsxs)(tg,{onClick:function(){var e;E.q.page.actionClick({action:j.pW.INDICATORS_CLICKED,symbol:null!=(e=null==n?void 0:n.symbol)?e:"-"}),o===p.zj.ORIGINAL?d():h._.toggleTVIndicators()},children:[(0,c.jsx)(ty,{icon:I.Ro.INDICATORS,size:I.sk.S}),(0,c.jsx)(tm,{typography:C.wZ.TEXT_S_REGULAR,children:r("Indicator")})]}),(0,c.jsx)(w.ZP,{isVisible:a,parentRef:i,onClose:f,dropdownWidth:"200px",dropdownPlacement:w.s1.BOTTOM_START,shadow:O.G.MEDIUM,children:(0,c.jsx)(td,{})})]})});var tb=s.ZP.div.withConfig({componentId:"sc-57c73c8a-0"})(["display:flex;align-items:center;position:relative;color:",";&:hover{color:",";}"],function(e){return e.theme.themeColors.text.muted},function(e){return e.theme.themeColors.primary}),tg=s.ZP.div.withConfig({componentId:"sc-57c73c8a-1"})(["cursor:pointer;display:flex;align-items:center;gap:","px;position:relative;"],d.A.XXS),tm=(0,s.ZP)(_.ZP).withConfig({componentId:"sc-57c73c8a-2"})(["color:inherit;"]),ty=(0,s.ZP)(I.ZP).withConfig({componentId:"sc-57c73c8a-3"})(["color:inherit;"]),tC=n(52487),tI=n(6807),t_=n(98900),tx=n(1403),tP=n(39690),tT=n(45954),tS=function(e){var t=(0,p.L3)(["candlestickPreference"]).candlestickPreference,n=(0,tx.GZ)(),r=n.positive,o=n.negative,i=(0,u.useMemo)(function(){return{positive:r,negative:o}},[r,o]),l=(0,u.useMemo)(function(){return{positive:(0,e_.My)(t.positive,"hex"),negative:(0,e_.My)(t.negative,"hex")}},[t]),a=(0,em.w)({defaultValues:l,mode:"onChange"}),c=a.reset;(0,u.useEffect)(function(){c(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},l))},[l,c]);var s=(0,u.useCallback)(function(t){var n=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=t.positive===i.positive,o=t.negative===i.negative;h._.updateCandlestickColorUserPreference({value:t,onSuccess:function(){n&&(null==e||e()),h._.getCandlestickColorUserPreference(!1)},onError:function(e){ey.Yu.showAlert({message:e,messageType:ey.KK.ERROR})},sameAsDefault:r&&o})},[i.positive,i.negative,e]);return{formMethods:a,handleSubmitForm:(0,u.useCallback)(function(e){s(e,!0)},[s]),handleResetAndSubmit:(0,u.useCallback)(function(){c(i),s(i,!1)},[c,i,s])}};let tA=function(){var e=(0,y.$G)().t,t=(0,eu.Gc)(),n=t.watch,r=t.setValue,o=(0,u.useCallback)(function(e,t){r(e,t||"",{shouldDirty:!0,shouldTouch:!0})},[r]),i=n("positive"),l=n("negative");return(0,c.jsxs)(tw,{children:[(0,c.jsx)(eq.Em,{title:e("Positive"),value:i,onChange:function(e){return o("positive",e)}}
1),(0,c.jsx)(eq.Em,{title:e("Negative"),value:l,onChange:function(e){return o("negative",e)}})]})};var tw=s.ZP.div.withConfig({componentId:"sc-309301b1-0"})(["display:flex;flex-direction:column;gap:","px;"],d.A.XS);let tO=function(e){var t=e.onClickReseToDefault,n=e.onCancel,r=(0,y.$G)().t,o=(0,p.L3)(["isCandlestickUpdating"]).isCandlestickUpdating;return(0,c.jsxs)(tk,{children:[(0,c.jsx)(tj,{variant:es.eF.TEXT_ONLY_THEMED,htmlType:"button",onClick:t,disabled:o,loading:o,children:r("Reset to Default")}),(0,c.jsx)(tE,{variant:es.eF.OUTLINED_THEMED,onClick:n,children:r("Cancel")}),(0,c.jsx)(tE,{htmlType:"submit",loading:o,disabled:o,variant:es.eF.FILLED_THEMED,children:r("Confirm")})]})};var tE=(0,s.ZP)(es.ZP).withConfig({componentId:"sc-61a5ff4b-0"})([""]),tj=(0,s.ZP)(tE).withConfig({componentId:"sc-61a5ff4b-1"})(["margin-right:auto;"]),tk=s.ZP.div.withConfig({componentId:"sc-61a5ff4b-2"})(["box-sizing:border-box;width:100%;display:flex;gap:","px;padding:","px;"],d.A.XS,d.A.L),tR=function(e){var t,n,r=e.onClose,o=(0,y.$G)().t,i=tS(r),l=i.formMethods,a=i.handleSubmitForm,s=i.handleResetAndSubmit,d=(0,p.L3)(["isCandlestickFetching"]).isCandlestickFetching,f=(0,u.useCallback)(function(){null==r||r()},[r]);return(0,c.jsx)(eu.RV,(t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},l),n=n={children:(0,c.jsx)(tN,{onSubmit:l.handleSubmit(a),children:(0,c.jsx)(ef.ZP,{variant:ef.KH.CONFIRMATION,modalTitle:o("Candlestick Color Setting"),footer:(0,c.jsx)(c.Fragment,{}),children:(0,c.jsxs)(tL,{children:[(0,c.jsxs)(tD,{children:[(0,c.jsx)(tZ,{typography:C.wZ.TEXT_M_REGULAR,children:o("Custom Color of Candlestick")}),(0,c.jsx)(tA,{})]}),(0,c.jsx)(tO,{onClickReseToDefault:s,onCancel:f}),(0,c.jsx)(tT.ZP,{absolute:!0,visible:d})]})})})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))},tM=function(){(0,ep.ZP)(function(e){return(0,c.jsx)(tR,{onClose:e})})},tL=s.ZP.div.withConfig({componentId:"sc-b661667e-0"})(["position:relative;"]),tD=s.ZP.div.withConfig({componentId:"sc-b661667e-1"})(["box-sizing:border-box;display:flex;flex-direction:column;gap:","px;min-width:376px;width:100%;padding-inline:","px;padding-top:","px;padding-bottom:","px;"],d.A.XS,d.A.L,d.A.XL,d.A.XXS),tN=s.ZP.form.withConfig({componentId:"sc-b661667e-2"})([""]),tZ=(0,s.ZP)(_.ZP).withConfig({componentId:"sc-b661667e-3"})(["color:",";"],function(e){return e.theme.themeColors.text.subtle});let tF=function(e){var t=e.onClose,n=e.isContextMenu,r=(0,y.$G)().t,o=(0,m.M8)(),i=(0,p.XO)(),l=(0,p.Jw)(),a=(0,p.MS)(),s=(0,tx.rW)(),d=(0,u.useMemo)(function(){return(0,tP.z)(s)},[s]).hasPriceAlertAccess,f=(0,u.useMemo)(function(){return a===V.A.LINE_ASK},[a]),v=(0,u.useCallback)(function(e,t){var r;E.q.chart.chartSettingItemsClicked({action:e,symbol:null!=(r=null==o?void 0:o.symbol)?r:"-",source:n?j.IX.RIGHT_CLICK:j.IX.CHART_SETTINGS,isEnabled:t})},[n,null==o?void 0:o.symbol]),b=(0,u.useCallback)(function(){t&&t()},[t]),g=(0,u.useCallback)(function(){b(),v(j.af.CHART_COLOR_SETTING),tM()},[b,v]),C=(0,u.useCallback)(function(){f||(h._.onToggleAskPriceVisible(),v(j.af.ASK_PRICE_ON_Y_AXIS,!i),b())},[i,b,v,f]),I=(0,u.useCallback)(function(){h._.onTogglePriceAlertsVisible(),v(j.af.PRICE_ALERTS,!l),b()},[b,v,l]),_=(0,u.useCallback)(function(){h._.cleanAllOrderTrackers(),v(j.af.CLEAR_ALL_TRACK_DETAILS),b()},[b,v]),x=(0,u.useCallback)(function(){b(),v(j.af.RESET_CHART),h._.resetChart()},[b,v]),P=(0,u.useCallback)(function(){b(),v(j.af.REMOVE_ALL_INDICATORS),h._.resetIndicator()},[b,v]),T=(0,u.useCallback)(function(){b(),v(j.af.REMOVE_ALL_DRAWINGS),h._.resetDrawing()},[b,v]),S=(0,u.useCallback)(function(){b(),v(j.af.REMOVE_ALL_INDICATORS_DRAWINGS),h._.resetDrawing(),h._.resetIndicator()},[b,v]);return(0,c.jsxs)(tJ,{children:[(0,c.jsx)(tU,{label:r("Candlestick Color Setting"),onClick:g,dataTestId:tI.Of["".concat((0,t_.DQ)(n),"_").concat(tI.DF.CHART_COLOR_SETTING)]}),(0,c.jsx)(tU,{label:r("Remove all Drawing"),onClick:T,dataTestId:tI.Of["".concat((0,t_.DQ)(n),"_").concat(tI.DF.REMOVE_ALL_DRAWING)]}),(0,c.jsx)(tU,{label:r("Remove all Indicators"),onClick:P,dataTestId:tI.Of["".concat((0,t_.DQ)(n),"_").concat(tI.DF.REMOVE_ALL_INDICATORS)]}),(0,c.jsx)(tU,{label:r("Remove all Indicators & Drawing"),onClick:S,dataTestId:tI.Of["".concat((0,t_.DQ)(n),"_").concat(tI.DF.REMOVE_ALL_INDICATORS_AND_DRAWINGS)]}),d&&(0,c.jsx)(tU,{label:r(l?"Hide All Price Alerts":"Show All Price Alerts"),onClick:I,dataTestId:tI.Of["".concat((0,t_.DQ)(n),"_").concat(l?tI.DF.HIDE_ALL_PRICE_ALERTS:tI.DF.SHOW_ALL_PRICE_ALERTS)]}),(0,c.jsx)(tU,{$disabled:f,label:r(i?"Hide Ask Price on Y-axis":"Show Ask Price on Y-axis"),onClick:C,"data-testid":tI.Of["".concat((0,t_.DQ)(n),"_").concat(i?tI.DF.HIDE_ASK_PRICE_ON_Y_AXIS:tI.DF.SHOW_ASK_PRICE_ON_Y_AXIS)]}),(0,c.jsx)(tU,{label:r("Clear All Track Details"),onClick:_,dataTestId:tI.Of["".concat((0,t_.DQ)(n),"_").concat(tI.DF.CLEAR_ALL_TRACK_DETAILS)]}),(0,c.jsx)(tU,{label:r("Reset Chart"),onClick:x,dataTestId:tI.Of["".concat((0,t_.DQ)(n),"_").concat(tI.DF.RESET_CHART)]})]})};var tJ=s.ZP.div.withConfig({componentId:"sc-453633c0-0"})(["display:flex;flex-direction:column;font-size:14px;flex:1;"]),tU=(0,s.ZP)(tC.Z).withConfig({componentId:"sc-453633c0-1"})(["color:",";cursor:",";"],function(e){var t=e.$disabled,n=e.theme;return t?n.themeColors.text.disabled:n.themeColors.text.default},function(e){return e.$disabled?"not-allowed":"pointer"});function t$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}let tB=function(e){var t,n=e.selectedSymbol,r=(t=(0,u.useState)(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return t$(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t$(e,t)}}
1(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=r[0],i=r[1],l=(0,u.useRef)(null),a=(0,u.useCallback)(function(){E.q.page.actionClick({action:j.pW.CHART_SETTING_CLICKED,symbol:null==n?void 0:n.symbol}),i(function(e){return!e})},[null==n?void 0:n.symbol]),s=(0,u.useCallback)(function(){i(!1)},[]);return(0,c.jsxs)(tX,{ref:l,children:[(0,c.jsx)(tG,{onClick:a,children:(0,c.jsx)(I.ZP,{icon:I.Ro.MORE_VERTICAL,size:I.sk.M})}),(0,c.jsx)(w.ZP,{isVisible:o,parentRef:l,onClose:s,dropdownWidth:"200px",dropdownPlacement:(0,P.dZ)()?w.s1.BOTTOM_START:w.s1.BOTTOM_END,shadow:O.G.MEDIUM,children:(0,c.jsx)(tF,{onClose:s,selectedSymbol:n})})]})};var tX=s.ZP.div.withConfig({componentId:"sc-92a482a4-0"})(["position:relative;"]),tG=s.ZP.div.withConfig({componentId:"sc-92a482a4-1"})(["cursor:pointer;&:hover{svg{color:",";}}@media all and (max-width:1280px){svg{width:","px;height:","px;}}"],function(e){return e.theme.themeColors.text.default},I.sk.M,I.sk.M);n(26699),n(32023);var tV=n(86151),tz=n(25951),tW=n(41805);let tH=function(e){var t=e.onSelectPeriod,n=(0,y.$G)().t,r=(0,p.eB)(),o=(0,u.useMemo)(function(){return(0,z.lB)(r)},[r]),i=(0,u.useMemo)(function(){return[{key:tW.J.MINUTES,label:n("Minutes"),periods:tz.dt.map(function(e){return{value:e,label:(0,z.BM)(e)}}),dataTestId:tI.Of.CHART_TIMEFRAME_MINUTES_DROPDOWN},{key:tW.J.HOURS,label:n("Hours"),periods:tz.zJ.map(function(e){return{value:e,label:(0,z.BM)(e)}}),dataTestId:tI.Of.CHART_TIMEFRAME_HOURS_DROPDOWN},{key:tW.J.DAYS,label:n("Days"),periods:tz.$e.map(function(e){return{value:e,label:(0,z.BM)(e)}}),dataTestId:tI.Of.CHART_TIMEFRAME_DAYS_DROPDOWN}]},[n]),l=function(e){t(e)};return(0,c.jsx)(tK,{children:i.map(function(e){return(0,c.jsx)(tV.Z,{variant:tV.y.BASE,defaultExpanded:e.key===o,selector:(0,c.jsx)(tY,{children:(0,c.jsx)(tq,{typography:C.wZ.TEXT_M_MEDIUM,children:e.label})}),dataTestId:e.dataTestId,children:e.periods.map(function(e){return(0,c.jsx)(tQ,{label:e.label,$selected:r===e.value,onClick:function(){return l(e.value)},dataTestId:"".concat(tI.Of.CHART_PERIOD_OPTION,"-").concat(e.value)},e.value)})},e.key)})})};var tK=s.ZP.div.withConfig({componentId:"sc-233706b3-0"})(["height:352px;overflow-y:auto;scrollbar-gutter:stable;"]),tY=s.ZP.div.withConfig({componentId:"sc-233706b3-1"})(["box-sizing:border-box;width:100%;padding-inline:","px;padding-block:","px;border-top:1px solid ",";"],d.A.S,d.A.XS,function(e){return e.theme.themeColors.border.subtle}),tq=(0,s.ZP)(_.ZP).withConfig({componentId:"sc-233706b3-2"})(["color:",";"],function(e){return e.theme.themeColors.text.strong}),tQ=(0,s.ZP)(tC.Z).withConfig({componentId:"sc-233706b3-3"})(["cursor:pointer;padding-inline:","px;padding-block:","px;color:",";background-color:",";transition:all 0.2s ease-in-out;&:hover{background-color:",";}&:first-child{border-top:1px solid ",";}"],d.A.S,d.A.XS,function(e){var t=e.theme;return e.$selected?t.themeColors.background.default:"inherit"},function(e){var t=e.theme;return e.$selected?t.themeColors.primary:"transparent"},function(e){var t=e.theme;return e.$selected?t.themeColors.primary:t.themeColors.background.active},function(e){return e.theme.themeColors.border.subtle});function t0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}let t1=(0,u.memo)(function(e){var t,n=e.selectedSymbol,r=e.onSelectPeriod,o=(0,y.$G)().i18n,i=(0,tx.$X)(),l=(0,p.eB)(),a=(0,u.useRef)(null),s=(t=(0,u.useState)(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return t0(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t0(e,t)}}
1(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=s[0],f=s[1],h=function(){return f(!1)},v=(0,u.useMemo)(function(){return(0,z.Q$)(i).includes(l)?null:(0,z.cc)(l,!0,o.language)},[i,l,o.language]);return(0,c.jsxs)(t2,{ref:a,children:[(0,c.jsxs)(t3,{onClick:function(){var e;E.q.page.actionClick({action:j.pW.TIMEFRAME_DROPDOWN_CLICKED,symbol:null!=(e=null==n?void 0:n.symbol)?e:"-"}),f(function(e){return!e})},"data-testid":tI.Of.CHART_TIMEFRAME_DROPDOWN,children:[v&&(0,c.jsx)(t6,{typography:C.wZ.TEXT_M_MEDIUM,children:v}),(0,c.jsx)(t8,{icon:I.Ro.CHEVRON_DOWN,size:I.sk.S})]}),(0,c.jsx)(w.ZP,{isVisible:d,parentRef:a,onClose:h,dropdownWidth:"140px",dropdownPlacement:w.s1.BOTTOM_START,shadow:O.G.HIGH,children:(0,c.jsx)(tH,{onSelectPeriod:function(e){r(e),h()}})})]})});var t2=s.ZP.div.withConfig({componentId:"sc-b50e6959-0"})(["display:flex;align-items:center;position:relative;"]),t3=s.ZP.div.withConfig({componentId:"sc-b50e6959-1"})(["cursor:pointer;display:flex;align-items:center;flex-wrap:nowrap;"]),t8=(0,s.ZP)(I.ZP).withConfig({componentId:"sc-b50e6959-2"})(["&:hover{color:",";}"],function(e){return e.theme.themeColors.primary}),t6=(0,s.ZP)(_.ZP).withConfig({componentId:"sc-b50e6959-3"})(["color:",";"],function(e){return e.theme.themeColors.primary});let t9=(0,u.memo)(function(e){var t=e.selectedSymbol,n=(0,y.$G)().i18n,r=(0,p.eB)(),o=(0,tx.$X)(),i=function(e){var n;E.q.chart.timeframeSelected({symbol:null!=(n=null==t?void 0:t.symbol)?n:"-",timeframe:e}),h._.onSelectPeriod(e)},l=(0,u.useMemo)(function(){return(0,z.Q$)(o)},[o]);return(0,c.jsxs)(t7,{children:[l.map(function(e){return(0,c.jsx)(t5,{onClick:function(){return i(e)},children:(0,c.jsx)(t4,{$selected:e===r,typography:C.wZ.TEXT_S_REGULAR,dataTestId:"".concat(tI.Of.CHART_PERIOD_OPTION,"-").concat(e),children:(0,z.cc)(e,!0,n.language)})},e)}),o&&G.HR[o]&&(0,c.jsx)(t1,{selectedSymbol:t,onSelectPeriod:i})]})});var t7=s.ZP.div.withConfig({componentId:"sc-33db561a-0"})(["display:flex;align-items:center;justify-content:flex-start;gap:","px;"],d.A.REGULAR),t5=s.ZP.div.withConfig({componentId:"sc-33db561a-1"})(["cursor:pointer;"]),t4=(0,s.ZP)(_.ZP).withConfig({componentId:"sc-33db561a-2"})(["color:",";&:hover{color:",";}"],function(e){var t=e.$selected,n=e.theme;return t?n.themeColors.primary:n.themeColors.text.subtle},function(e){return e.theme.themeColors.primary});let ne=function(){var e=(0,y.$G)().t,t=(0,p.rg)(),n=(0,tx.ag)(),r=(0,u.useMemo)(function(){var t=[{source:p.zj.ORIGINAL,label:e("Original")}];return n&&t.push({source:p.zj.TRADING_VIEW,label:e("Trading View")}),t},[e,n]);return(0,c.jsx)(nt,{children:r.map(function(e){var n=e.source,r=e.label;return(0,c.jsx)(nn,{$selected:t===n,onClick:function(){return h._.onSelectChartProvider(n)},children:(0,c.jsx)(nr,{typography:C.wZ.TEXT_S_REGULAR,children:r})},n)})})};var nt=s.ZP.div.withConfig({componentId:"sc-7b213390-0"})(["display:flex;align-items:center;gap:","px;"],d.A.XS),nn=s.ZP.div.withConfig({componentId:"sc-7b213390-1"})(["cursor:pointer;color:",";"],function(e){var t=e.theme;return e.$selected?t.themeColors.primary:t.themeColors.text.muted}),nr=(0,s.ZP)(_.ZP).withConfig({componentId:"sc-7b213390-2"})(["color:inherit;"]),no=n(86653);function ni(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nl=function(e,t){var n;return(ni(n={},V.A.CANDLESTICK,j.Co.CANDLESTICK),ni(n,V.A.LINE,t===no.wS.METATRADER5?j.Co.LINE_BID:j.Co.LINE),ni(n,V.A.LINE_ASK,j.Co.LINE_ASK),n)[e]};function na(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var nc=function(e){var t;return[{type:V.A.CANDLESTICK,label:function(){return P.ag.t("Candlestick")},icon:I.Ro.CANDLESTICK_CHART}].concat(function(e){if(Array.isArray(e))return na(e)}(t=e===no.wS.METATRADER5?[{label:function(){return P.ag.t("Line")},icon:I.Ro.LINE_CHART,children:[{type:V.A.LINE,label:function(){return P.ag.t("Bid")}},{type:V.A.LINE_ASK,label:function(){return P.ag.t("Bid and Ask")}}]}]:[{type:V.A.LINE,label:function(){return P.ag.t("Line")},icon:I.Ro.LINE_CHART}
1])||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return na(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return na(e,t)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())};let nu=function(e){var t=e.selectedSeries,n=e.option,r=e.onOptionSelect,o=n.type,i=n.label,l=n.children,a=n.icon;if(l){var u=l.some(function(e){return e.type===t});return(0,c.jsxs)(ns,{children:[(0,c.jsxs)(nv,{$selected:u,children:[(0,c.jsxs)(ng,{children:[a&&(0,c.jsx)(I.ZP,{icon:a,size:I.sk.M}),(0,c.jsx)(nb,{typography:C.wZ.TEXT_M_REGULAR,children:i()})]}),(0,c.jsx)(I.ZP,{icon:I.Ro.CHEVRON_RIGHT,size:I.sk.M})]}),(0,c.jsx)(nd,{className:"dropdown-wrapper",children:(0,c.jsx)(nf,{className:"dropdown",children:(0,c.jsx)(nm,{selectedSeries:t,options:l,onOptionSelect:r})})})]})}var s=o===t;return(0,c.jsx)(np,{onClick:function(){return r(n)},$selected:s,children:(0,c.jsxs)(ng,{children:[a&&(0,c.jsx)(I.ZP,{icon:a,size:I.sk.M}),(0,c.jsx)(nh,{$selected:s,typography:C.wZ.TEXT_M_REGULAR,children:i()})]})})};var ns=s.ZP.div.withConfig({componentId:"sc-301d952a-0"})(["display:flex;width:100%;&:hover > .dropdown-wrapper > .dropdown{display:block;}"]),nd=s.ZP.div.withConfig({componentId:"sc-301d952a-1"})(["position:relative;"]),nf=s.ZP.div.withConfig({componentId:"sc-301d952a-2"})(["position:absolute;display:none;width:90px;border:1px solid ",";border-radius:3px;box-shadow:0 4px 10px 2px rgba(10,20,30,0.15);background-color:",";"],function(e){return e.theme.themeColors.border.default},function(e){return e.theme.themeColors.background.default}),np=s.ZP.div.withConfig({componentId:"sc-301d952a-3"})(["cursor:pointer;padding-inline:","px;padding-block:","px;flex:1;&:hover{","}",""],d.A.S,d.A.XS,function(e){var t=e.theme;return!e.$selected&&"background-color: ".concat(t.themeColors.background.active,";")},function(e){var t=e.$selected,n=e.theme;return t&&"\n    color: ".concat(n.themeColors.white,";\n    background-color: ").concat(n.themeColors.primary,";\n\n    svg {\n      color: ").concat(n.themeColors.white,";\n    }\n  ")}),nh=(0,s.ZP)(_.ZP).withConfig({componentId:"sc-301d952a-4"})(["",""],function(e){var t=e.$selected,n=e.theme;return t&&"color: ".concat(n.themeColors.white,";")}),nv=s.ZP.div.withConfig({componentId:"sc-301d952a-5"})(["display:flex;align-items:center;justify-content:space-between;padding-inline:","px;padding-block:","px;width:100%;cursor:pointer;color:",";&:hover{background-color:",";}",""],d.A.S,d.A.XS,function(e){return e.theme.themeColors.text.strong},function(e){var t=e.theme;return e.$selected?"":t.themeColors.background.active},function(e){var t=e.$selected,n=e.theme;return t&&"\n    color: ".concat(n.themeColors.white,";\n    background-color: ").concat(n.themeColors.primary,";\n\n    svg {\n      color: ").concat(n.themeColors.white,";\n    }\n  ")}),nb=(0,s.ZP)(_.ZP).withConfig({componentId:"sc-301d952a-6"})(["color:inherit;"]),ng=s.ZP.div.withConfig({componentId:"sc-301d952a-7"})(["display:flex;align-items:center;gap:","px;"],d.A.XS);let nm=function(e){var t=e.selectedSeries,n=e.options,r=e.onOptionSelect,o=n.map(function(e){var n=e.type,o=e.children,i=o?o[0].type:n;return(0,c.jsx)(nu,{selectedSeries:t,option:e,onOptionSelect:r},i)});return(0,c.jsx)(c.Fragment,{children:o})};function ny(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}let nC=(0,u.memo)(function(e){var t,n=e.selectedSymbol,r=(0,y.$G)().t,o=(0,p.MS)(),i=(0,tx.$X)(),l=(0,u.useRef)(null),a=(t=(0,u.useState)(!1),function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(t,2)||function(e,t){if(e){if("string"==typeof e)return ny(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ny(e,t)}}
1(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],d=a[1],f=function(){return d(!1)},v=(0,u.useMemo)(function(){return{seriesOptions:nc(i)}},[i]).seriesOptions;return(0,c.jsxs)(nI,{ref:l,children:[(0,c.jsx)(n_,{onClick:function(){var e;E.q.page.actionClick({action:j.pW.CHART_TYPE_CLICKED,symbol:null!=(e=null==n?void 0:n.symbol)?e:"-"}),d(function(e){return!e})},children:(0,c.jsx)(x.Z,{variant:x.q.BASE,content:(0,c.jsx)(nP,{typography:C.wZ.TEXT_M_REGULAR,children:r("Line Style")}),placement:"bottom",trigger:"mouseenter",popperOptions:{strategy:"fixed"},children:(0,c.jsxs)(nS,{$isFocus:s,children:[(0,c.jsx)(nT,{icon:I.Ro.CANDLESTICK_CHART}),(0,c.jsx)(nT,{icon:I.Ro.CHEVRON_DOWN,size:I.sk.S})]})})}),(0,c.jsx)(w.ZP,{isVisible:s,parentRef:l,onClose:f,dropdownWidth:"144px",dropdownPlacement:w.s1.BOTTOM_START,shadow:O.G.MEDIUM,style:{overflow:"initial"},children:(0,c.jsx)(nx,{children:(0,c.jsx)(nm,{selectedSeries:o,options:v,onOptionSelect:function(e){var t;e.type&&(E.q.chart.chartTypeSelected({symbol:null!=(t=null==n?void 0:n.symbol)?t:"-",chartType:nl(e.type,i)}),h._.onSelectSeries(e.type),f())}})})})]})});var nI=s.ZP.div.withConfig({componentId:"sc-d475e43e-0"})(["display:flex;align-items:center;position:relative;"]),n_=s.ZP.div.withConfig({componentId:"sc-d475e43e-1"})(["cursor:pointer;display:flex;align-items:center;"]),nx=s.ZP.div.withConfig({componentId:"sc-d475e43e-2"})(["display:flex;flex-direction:column;flex:1;"]),nP=(0,s.ZP)(_.ZP).withConfig({componentId:"sc-d475e43e-3"})(["display:flex;align-items:center;justify-content:center;padding:","px ","px;color:",";"],d.A.XXS,d.A.XS,function(e){return e.theme.themeColors.background.default}),nT=(0,s.ZP)(I.ZP).withConfig({componentId:"sc-d475e43e-4"})(["color:inherit;"]),nS=s.ZP.div.withConfig({componentId:"sc-d475e43e-5"})(["display:flex;align-items:center;flex-wrap:nowrap;color:",";&:hover{color:",";}",""],function(e){return e.theme.themeColors.text.muted},function(e){return e.theme.themeColors.primary},function(e){var t=e.$isFocus,n=e.theme;return t&&"color: ".concat(n.themeColors.primary,";")});let nA=function(){var e=(0,m.M8)(),t=(0,p.rg)()===p.zj.ORIGINAL;return(0,c.jsxs)(nw,{children:[(0,c.jsxs)(nO,{children:[(0,c.jsx)(t9,{selectedSymbol:e}),(0,c.jsx)(nj,{}),(0,c.jsx)(nC,{selectedSymbol:e}),(0,c.jsx)(tv,{selectedSymbol:e}),(0,c.jsx)(nj,{})]}),(0,c.jsxs)(nE,{children:[(0,c.jsx)(ne,{}),t&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(tB,{selectedSymbol:e}),(0,c.jsx)(T,{})]})]})]})};var nw=s.ZP.div.withConfig({componentId:"sc-e600d4b7-0"})(["display:flex;align-items:center;height:30px;padding-inline:","px;border-bottom:1px solid ",";@media all and (max-width:1440px){height:26px;padding-inline:","px;}@media all and (max-width:1280px){height:22px;padding-inline:","px;}"],d.A.REGULAR,function(e){return e.theme.themeColors.border.subtle},d.A.XS,d.A.XS),nO=s.ZP.div.withConfig({componentId:"sc-e600d4b7-1"})(["display:flex;align-items:center;flex:1;gap:","px;"],d.A.XS),nE=s.ZP.div.withConfig({componentId:"sc-e600d4b7-2"})(["display:flex;align-items:center;gap:","px;"],d.A.XS),nj=s.ZP.span.withConfig({componentId:"sc-e600d4b7-3"})(["border:none;height:","px;background-color:",";width:1px;"],d.A.M,function(e){return e.theme.themeColors.border.default}),nk=n(92891),nR=n(52218);n(88674);var nM=n(20787),nL=n(3082),nD=n(68415),nN=n(41174),nZ=n(81653),nF=n(16183),nJ=n(76898),nU=n(33007),n$=n(82100),nB=n(57475),nX=n(76991),nG=n(30216),nV=n(23582);function nz(e,t,n,r,o,i,l){try{var a=e[i](l),c=a.value}catch(e){n(e);return}a.done?t(c):Promise.resolve(c).then(r,o)}function nW(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nH=new function e(){var t=this;if(!(this instanceof e))throw TypeError("Cannot call a class as a function");nW(this,"remoteChart",void 0),nW(this,"init",function(e){var r;return(r=function(){var t,r,o,i;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(c){var u=[a,c];if(n)throw TypeError("Generator is already executing.");for(;l&&(l=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(l){switch(l.label){case 0:t=this,l.label=1;case 1:return l.trys.push([1,3,,4]),[4,n.e("5645").then(n.t.bind(n,74363,23))];case 2:return r=l.sent(),[3,4];case 3:return console.warn("Remote chart module not available:",l.sent()),[2];case 4:return o=new r.default,h._.setRemoteChart(o),(i=h._.getSelectedSymbol())&&h._.setSymbol(i,!0),o&&(null==o||o.init({token:nJ.Z.getItem(nJ.V.TOKEN),type:nZ.zm.MARKET,metaTraderGroup:nJ.Z.getItem(nJ.V.META_TRADER_GROUP),marketSubscription:nJ.Z.getItem(nJ.V.MARKET_SUBSCRIPTION),utcOffset:nL._.getUTCOffsetForChart(),onReceiveMessage:function(n){return t.onReceiveMessage(n,e)},colors:nU.MQ.context.theme.themeColors,series:h._.getSeries()})),this.remoteChart=o,[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function l(e){nz(i,n,o,l,a,"next",e)}function a(e){nz(i,n,o,l,a,"throw",e)}l(void 0)})}).call(t)}),nW(this,"handleMixpanelTrack",function(e){var t=m.yY.context.symbolDetail,n=(null==t?void 0:t.symbol)||"-";switch(e.type){case nF.a.OPEN_CONTEXT_MENU:E.q.page.actionClick({action:j.pW.CHART_RIGHT_CLICKED,symbol:n});break;case nF.a.SELECT_DRAWING_TOOL:E.q.chart.chartDrawToolSelected({symbol
1:n,drawingTool:e.data});break;case nF.a.COMPLETE_DRAWING:E.q.chart.chartDrawingCompleted({symbol:n,drawingTool:e.data});break;case nF.a.DELETE_DRAWING:E.q.chart.chartDeleteDrawingClicked({symbol:n,drawingTool:e.data})}}),nW(this,"onReceiveMessage",function(e,n){var r=nM.j.getIsOneClickTradingEnabled();switch(t.handleMixpanelTrack(e),e.type){case nF.a.STATUS:e.data&&t.remoteChart&&h._.handleChartStatus();break;case nF.a.OPEN_CONTEXT_MENU:null==n||null==(c=n.current)||c.open(e.data.x,e.data.y);break;case nF.a.INDICATOR:var o=m.yY.context.symbolDetail;h._.onSelectIndicator(e.data,null==o?void 0:o.symbol,function(e){(0,K.ur)({messageType:K.KK.ERROR,message:e})});break;case nF.a.OPEN_INDICATOR_CONFIG:X.setInitialModalInfo(e.data.indicator),tt();break;case nF.a.CHART_FETCH_MORE:if(e.data){var i=e.data,l=i.latestFrom,a=i.latestTo;h._.fetchMoreChartData(l,a)}break;case nF.a.CLOSE_ORDER:var c,u,s=null!=(u=e.data)?u:{},d=s.isPendingOrder,f=void 0!==d&&d,p=s.orderId,v=s.SLTPType,b=nN.$.getOrderById(String(p),f);nD.Z.chartRemovedSetClicked({symbol:b.symbol,orderId:p,orderType:b.orderType,SLTPType:v});var g="close-".concat(r?"oct":"normal","-").concat(f?"pending":"opening","-order");"close-oct-opening-order"===g?(0,nG.w)({positionId:p}):"close-oct-pending-order"===g?(0,nV.h)({symbol:null==b?void 0:b.symbol,orderId:p,id:null==b?void 0:b.id}):"close-normal-opening-order"===g?(0,n$.K)({positionId:p}):"close-normal-pending-order"===g&&(0,n$.a)({orderId:p});break;case nF.a.EDIT_TRACK_ORDER_PRICE:var y,C=null!=(y=e.data)?y:{},I=C.isPendingOrder,_=void 0!==I&&I,x=C.orderId,P=C.stopLoss,T=C.takeProfit,S=C.entryPrices,A=C.SLTPType,w=C.isRemoveTracking,O=nN.$.getOrderById(x,_);nD.Z.chartTrackedOrModifiedOrRemoveClicked({symbol:O.symbol,orderId:x,orderType:O.orderType,SLTPType:A,isRemoveTracking:w}),_?(0,nB.B)({orderId:x,stopLoss:P,takeProfit:T,entryPrices:S,onCancel:function(){h._.revertEditTrackOrderPrice({orderId:x,isPendingOrder:!0})},skipConfirmation:r}):(0,nX.Z)({orderId:String(x),stopLoss:P,takeProfit:T,onCancel:function(){h._.revertEditTrackOrderPrice({orderId:x,isPendingOrder:!1})},skipConfirmation:r});break;case nF.a.ENQUEUE_SNACKBAR:e.data&&(0,K.ur)({messageType:K.KK.ERROR,message:e.data})}}),nW(this,"reset",function(){var e;null==(e=t.remoteChart)||e.reset(),h._.reset(),t.remoteChart=void 0}),nW(this,"resetRemoteChart",function(){var e;null==(e=t.remoteChart)||e.reset(),t.remoteChart=void 0})};n(32564);var nK=n(39848);function nY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nq(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,a=!1;try{for(o=o.call(e);!(l=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);l=!0);}catch(e){a=!0,r=e}finally{try{l||null==o.return||o.return()}finally{if(a)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return nY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nY(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var nQ=(0,u.forwardRef)(function(e,t){var n=e;if(null==n)throw TypeError("Cannot destructure "+n);var r=nq((0,u.useState)(!1),2),o=r[0],i=r[1],l=nq((0,u.useState)({x:0,y:0}),2),a=l[0],s=l[1],d=(0,u.useRef)(null),f=(0,u.useRef)(null),p=function(e,t){i(!0),setTimeout(function(){var n,r,o=null==(n=d.current)?void 0:n.getBoundingClientRect(),i=null==(r=f.current)?void 0:r.getBoundingClientRect();if(o&&i){var l=e,a=t;e>o.width/2&&(l=e-i.width),t>o.height/2&&(a=t-i.height),s({x:l=Math.max(0,Math.min(l,o.width-i.width)),y:a=Math.max(0,Math.min(a,o.height-i.height))})}else s({x:e,y:t})},0)},h=(0,u.useCallback)(function(){o&&v()},[o]);(0,u.useEffect)(function(){return document.addEventListener("click",h),function(){document.removeEventListener("click",h)}}
1,[h]);var v=function(){i(!1)},b=function(e){e.preventDefault(),i(!1)};return(0,u.useImperativeHandle)(t,function(){return{open:p,close:v}}),(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(n0,{ref:d,children:o&&(0,c.jsx)(n1,{onContextMenu:b,onClick:b,$isVisible:o,children:(0,c.jsx)(n2,{ref:f,style:{top:a.y,left:a.x},shadow:O.G.LOW,children:(0,c.jsx)(tF,{onClose:v})})})})})}),n0=s.ZP.div.withConfig({componentId:"sc-1ffe083b-0"})(["position:absolute;width:calc(100% - 31px);height:100%;right:0;pointer-events:none;& > *{pointer-events:auto;}"]),n1=s.ZP.div.withConfig({componentId:"sc-1ffe083b-1"})(["position:absolute;width:100%;height:100%;z-index:9998;background-color:'transparent';",";"],function(e){return e.$isVisible&&(0,s.iv)(["z-index:9998;"])}),n2=(0,s.ZP)(nK.Z).withConfig({componentId:"sc-1ffe083b-2"})(["position:absolute;z-index:9999;min-width:200px;background-color:",";border:1px solid ",";border-radius:","px;"],function(e){return e.theme.themeColors.background.default},function(e){return e.theme.themeColors.border.subtle},d.A.XXS);let n3=function(e){var t=e.chartRef,n=(0,u.useRef)(null),r=(0,f.cE)(["isFullScreen","showTradeForm"]).showTradeForm,o=(0,m.M8)(),i=(0,p.QK)(),l=(0,v.rg)(),a=(0,tx.rW)(),s=(0,u.useMemo)(function(){return(0,tP.z)(a)},[a]).hasPriceAlertAccess;return(0,u.useEffect)(function(){nH.init(n),h._.getAllTechnicalIndicators(!0),h._.initCandlestickPreference();var e=t.current,r=new ResizeObserver((0,nk.debounce)(function(){h._.resizeChart()}));return e&&r.observe(e),function(){var t=nR.F.getSelectedProvider()!==p.zj.ORIGINAL;h._.reset({skipResetTrack:t}),nH.resetRemoteChart(),e&&(r.unobserve(e),r.disconnect())}},[t]),(0,u.useEffect)(function(){return(null==o?void 0:o.symbol)&&!i&&s&&l===p.zj.ORIGINAL&&h._.initPriceAlerts({symbol:null==o?void 0:o.symbol}),function(){h._.cleanAllPriceAlerts()}},[s,i,l,null==o?void 0:o.symbol]),(0,u.useEffect)(function(){h._.resizeChart()},[r]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{id:"sidebar"}),(0,c.jsx)("div",{id:"chart-root","data-testid":tI.Of.CHART_ROOT}),(0,c.jsx)(nQ,{ref:n}),(0,c.jsx)("div",{id:"modal-overlap"}),(0,c.jsx)("div",{id:"float-container"})]})},n8=function(e){var t=e;if(null==t)throw TypeError("Cannot destructure "+t);var n=(0,u.useRef)(null);return(0,u.useEffect)(function(){return n.current&&(h._.initTV(n.current),window.addEventListener("message",function(e){var t=e.data;t&&h._.onReceiveIframeMessage(t)})),function(){h._.resetTV()}},[n]),(0,c.jsx)(n6,{ref:n,src:h._.getTradingViewUrl(),onLoad:h._.initChartToken})};var n6=s.ZP.iframe.withConfig({componentId:"sc-17407ae-0"})(["flex:1;border:none;"]);let n9=function(){var e=(0,u.useRef)(null),t=(0,v.rg)(),n=(0,f.cE)(["isFullScreen","showTradeForm"]),r=n.isFullScreen,o=n.showTradeForm,i=(0,f.GR)(),l=i.leftPanelState,a=i.rightPanelState,s=i.bottomPanelState,d=(0,u.useMemo)(function(){return t===p.zj.ORIGINAL},[t]),m=(0,u.useCallback)(function(){return r?null:(0,c.jsx)(b.Z,{isFolded:!f.Pw.isExpandState(l),onClick:f.Pw.toggleLeftPanel,direction:"left"})},[r,l]),y=(0,u.useCallback)(function(){return r?null:(0,c.jsx)(b.Z,{isFolded:!f.Pw.isExpandState(a),onClick:f.Pw.toggleRightPanel,direction:"right"})},[r,a]),C=(0,u.useCallback)(function(){return r?null:(0,c.jsx)(b.Z,{isFolded:!f.Pw.isExpandState(s),onClick:f.Pw.toggleBottomPanel,direction:"bottom"})},[s,r]);return(0,u.useEffect)(function(){return h._.initSocketReconnectionListener(),function(){h._.removeSocketReconnectionListener(),h._.reset()}},[]),(0,c.jsxs)(n7,{ref:e,children:[(0,c.jsx)(nA,{}),(0,c.jsxs)(n5,{$showTradeForm:o,dir:"ltr",children:[m(),d?(0,c.jsx)(n3,{chartRef:e}):(0,c.jsx)(n8,{}),r&&o&&(0,c.jsx)(g.Z,{isFullScreen:!0}),y()]}),C()]})};var n7=s.ZP.div.withConfig({componentId:"sc-c7bcfe3a-0"})(["flex:1;display:flex;flex-direction:column;min-height:400px;background-color:",";"],function(e){return e.theme.themeColors.background.default}),n5=s.ZP.div.withConfig({componentId:"sc-c7bcfe3a-1"})(["flex:1;display:flex;flex-direction:row;min-height:400px;position:relative;background-color:",";#chart-root{.tv-lightweight-charts,.tv-lightweight-charts table{width:calc(100vw - ",") !important;}margin-right:","px;}"],function(e){var t=e.theme;return e.$showTradeForm?t.themeColors.background.base:t.themeColors.background.default},function(e){return e.$showTradeForm?"279px":"31px"},function(e){return e.$showTradeForm?d.A.XS:0})}}]);

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.