"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1876],{61547:function(e,t,n){n.r(t),t.default={src:"/_next/static/media/login_failed.5b9e43aa.svg",height:160,width:161,blurWidth:0,blurHeight:0}},25472:function(e,t,n){n.d(t,{Q:function(){return DashedDivider}});var a=n(85893),l=n(45697),i=n.n(l),s=n(7739);let DashedDivider=e=>{let{className:t}=e;return(0,a.jsx)("div",{className:(0,s.cn)("bbDashDark my-8",t)})};DashedDivider.propTypes={className:i().string}},57197:function(e,t,n){var a=n(85893),l=n(28677),i=n(45697),s=n.n(i),o=n(67294),r=n(7739);function AccountTag(e){let{slug:t,className:n,idx:i}=e,{t:s}=(0,l.$G)("common"),c=(0,o.useMemo)(()=>{switch(t){case"live":return{bg:"bg-basicYellow",label:s("general.live")};case"demo":return{bg:"bg-basicGreen",label:s("general.demo")};default:return{bg:"",label:""}}},[t,s]),d={root:"w-[46px] h-[20px] flex items-center justify-center rounded-[4px]",label:(0,r.cn)("text-[10px] text-white font-medium text-center w-max whitespace-nowrap px-2","live"===t&&"text-black")};return(0,a.jsx)("div",{id:"label-".concat(t,"-").concat(i),className:(0,r.cn)("badgeAccNo",d.root,c.bg,n),children:(0,a.jsx)("p",{className:d.label,children:c.label})})}AccountTag.propTypes={slug:s().string,className:s().string,idx:s().oneOfType([s().number,s().string])},AccountTag.defaultProps={slug:"",className:""},t.Z=AccountTag},91133:function(e,t,n){n.d(t,{aG:function(){return Breadcrumb},aR:function(){return BreadcrumbMobile}});var a=n(85893),l=n(11163),i=n(45697),s=n.n(i),o=n(17527),r=n(9473);let BreadArrowIcon=e=>{let{className:t,active:n}=e;return(0,a.jsx)("div",{className:t,children:(0,a.jsx)("svg",{width:"7",height:"9",viewBox:"0 0 7 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M0.627314 0.105721L6.59223 4.29418L0.627314 8.48264L0.627314 0.105721Z",fill:n?"#3C82BD":"#677186"})})})};BreadArrowIcon.propTypes={active:s().bool,className:s().string};var c=n(7739),d=n(75160);let u={activeLink:"cursor-pointer text-basicGreen",link:"text-menuText text-[17px] font-bold"},Breadcrumb=e=>{let{breadcrumbLinks:t=[],breadcrumbIcon:n="",className:i}=e,s=(0,l.useRouter)(),{t:m}=(0,o.$G)("common"),v=(0,r.v9)(e=>e.authState),renderLinkName=e=>{let{translate:t=!0}=e;if((null==e?void 0:e.slug)==="account_number"){var n,a;return null==v?void 0:null===(a=v.accountSelection)||void 0===a?void 0:null===(n=a.selectedAccount)||void 0===n?void 0:n.account}return t?m("common:".concat(null==e?void 0:e.name)):null==e?void 0:e.name};return(null==t?void 0:t.length)===0?null:(0,a.jsxs)("div",{className:(0,c.cn)("hidden items-center","lg:flex lg:mt-4",i),children:[(0,a.jsx)("div",{className:"cursor-pointer",onClick:()=>s.back(),children:(0,a.jsx)(d.Z,{src:"/static/assets/arrow-left.svg",alt:"arrow-left",className:"w-3 h-3",onClick:()=>s.back()})}),n?(0,a.jsx)(d.Z,{className:"w-6 h-6 mx-2",src:n,alt:"breadcrumb-icon"}):null,null==t?void 0:t.map((e,n)=>(0,a.jsxs)("button",{onClick:()=>(null==e?void 0:e.href)?s.push(null==e?void 0:e.href):null,className:"flex items-center",children:[(0,a.jsx)("p",{className:(0,c.cn)(u.link,n===(null==t?void 0:t.length)-1&&u.activeLink),children:renderLinkName(e)}),n<(null==t?void 0:t.length)-1?(0,a.jsx)(BreadArrowIcon,{className:"px-4",active:n===(null==t?void 0:t.length)-1}):null]},n))]})},BreadcrumbMobile=e=>{let{breadcrumbLinks:t=[]}=e,n=(0,l.useRouter)(),{t:i}=(0,o.$G)("common"),s=(0,r.v9)(e=>e.authState),renderLinkName=e=>{if((null==e?void 0:e.slug)==="account_number"){var t,n;return null==s?void 0:null===(n=s.accountSelection)||void 0===n?void 0:null===(t=n.selectedAccount)||void 0===t?void 0:t.account}return i("common:".concat(null==e?void 0:e.name))};function BreadcrumbItem(e){let{link:l,index:i}=e;return(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(d.Z,{src:"/static/assets/breadcrumb/mobile-arrow.svg",className:"w-4 h-4"}),(0,a.jsx)("p",{className:(0,c.cn)("font-normal whitespace-nowrap",i===(null==t?void 0:t.length)-1&&"font-bold text-basicGreen"),onClick:()=>(null==l?void 0:l.href)?n.push(null==l?void 0:l.href):null,children:renderLinkName(l)})]})}return Array.isArray(t)&&(null==t?void 0:t.length)!==0?(0,a.jsxs)("div",{className:(0,c.cn)("flex items-center bg-blue-900 px-4 pb-3 overflow-x-auto","md:hidden"),children:[(0,a.jsx)(d.Z,{src:"/static/assets/VT-breadcrumb.svg",className:"w-5 h-5 mr-4"}),(0,a.jsx)("div",{className:"flex items-center gap-4",children:Array.isArray(t)&&(null==t?void 0:t.length)>=3?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(d.Z,{src:"/static/assets/breadcrumb/mobile-arrow.svg",className:"w-4 h-4"}),(0,a.jsx)("p",{className:"font-normal",children:"..."})]}),null==t?void 0:t.map((e,n)=>{if(n>=(null==t?void 0:t.length)-2)return(0,a.jsx)(BreadcrumbItem,{link:e,index:n},n)})]}):null==t?void 0:t.map((e,t)=>(0,a.jsx)(BreadcrumbItem,{link:e,index:t},t))})]}):null};BreadcrumbMobile.propTypes={breadcrumbLinks:s().array},Breadcrumb.propTypes={breadcrumbLinks:s().array,breadcrumbIcon:s().string,className:s().string}},95740:function(e,t,n){n.d(t,{Z:function(){return Button}});var a=n(85893),l=n(41664),i=n.n(l),s=n(45697),o=n.n(s),r=n(37415),c=n(7739);let d={btnSide:"mr-2"};function Button(e){let renderLeft=()=>(null==e?void 0:e.renderLeft)&&"function"==typeof(null==e?void 0:e.renderLeft)?(0,a.jsx)("div",{className:d.btnSide,children:e.renderLeft()}):null,ContentButton=()=>(0,a.jsx)("button",{type:null==e?void 0:e.type,className:(0,c.cn)("btn",null==e?void 0:e.btnMode,null==e?void 0:e.className,(null==e?void 0:e.disabled)&&(null==e?void 0:e.btnMode)!=="text-button"&&"disabled",(null==e?void 0:e.fullWidth)?"w-full":""),onClick:null==e?void 0:e.onClick,disabled:null==e?void 0:e.disabled,id:null==e?void 0:e.id,children:(null==e?void 0:e.isLoading)?(0,a.jsx)(r.$j,{className:"!m-0"}):(0,a.jsxs)(a.Fragment,{children:[renderLeft(),(0,a.jsx)("p",{className:(0,c.cn)("btnText text-center whitespace-nowrap font-bold",(null==e?void 0:e.btnMode)==="disabled"&&"text-[#677186]",(null==e?void 0:e.btnMode)==="text-button"&&"text-basicGreen",e.labelClassName),children:null==e?void 0:e.label})]})});return(null==e?void 0:e.href)?(0,a.jsx)(i(),{href:e.href,target:null==e?void 0:e.target,className:(0,c.cn)(null==e?void 0:e.className,(null==e?void 0:e.fullWidth)?"w-full":""),rel:(null==e?void 0:e.target)==="_blank"?"noopener noreferrer":"",children:(0,a.jsx)(ContentButton,{})}):(0,a.jsx)(ContentButton,{})}Button.defaultProps={btnMode:"gradient-green",type:"button"},Button.propTypes={href:o().string,label:o().oneOfType([o().string,o().object]),className:o().string,labelClassName:o().string,btnMode:o().oneOf(["gradient-green","gradient","outline","fill","fill-green","fill-blue","fill-yellow","fill-green","text-button","disabled","outline-yellow","outline-green","gradient-green","highlight-green"]),renderLeft:o().func,onClick:o().func,isLoading:o().bool,fullWidth:o().bool,id:o().string,disabled:o().bool,type:o().string,target:o().string}},75160:function(e,t,n){var a=n(85893),l=n(25675),i=n.n(l),s=n(45697),o=n.n(s);function AppImage(e){let{src:t,className:n,alt:l,priority:s,id:o}=e;return(0,a.jsx)(i(),{id:null!=o?o:l,src:t,width:0,height:0,className:n,alt:l,priority:s})}AppImage.defaultProps={alt:"image"},AppImage.propTypes={src:o().string,className:o().string,alt:o().string,priority:o().bool,id:o().string},t.Z=AppImage},28943:function(e,t,n){n.d(t,{Z:function(){return Z}});var a=n(85893),l=n(11163),i=n(28677),s=n(45697),o=n.n(s),r=n(67294),c=n(26070),d=n(9473),u=n(86970),m=n(21517),v=n(37747),h=n(72104),p=n(7739),g=n(25675),x=n.n(g),b=n(95740);function MarketEmptyState(e){let{t,handleTagClick:n}=e;return(0,a.jsxs)("div",{className:"flex flex-col gap-6 justify-center w-full h-full",children:[(0,a.jsx)(x(),{className:"mx-auto",src:"/static/assets/empty-state-chart.svg",alt:"empty",height:150,width:150}),(0,a.jsx)("p",{className:"text-[18px] font-bold text-white",children:t("empty_favorite")}),(0,a.jsx)("p",{className:"!mx-[4vw] text-center",children:t("add_products_desc")}),(0,a.jsx)(b.Z,{className:"mx-auto",label:t("add_products"),onClick:()=>n("FOREX")})]})}MarketEmptyState.propTypes={t:o().func,handleTagClick:o().func};var f=n(36111),y=n(91811),j=n(41664),w=n.n(j),N=n(17527),k=n(17121),_=n(87492),S=n(7551),L=n(75160);let T={root:"w-full px-[15px] py-[16px] bg-blue-900 rounded-[10px] mb-[10px]",flagSection:"flex items-center",img:"w-[68.3px] h-[44px] object-contain",productName:"text-[12px] font-medium text-white",nameContainer:"ml-[6px]",priceContainer:"flex items-center mt-[4px]",arrowImg:"h-[16px] w-[16px] object-contain",lightText:"font-light",rowPrice:"flex items-center ml-[5px]",iconStyle:"h-[36px] w-[36px]",iconSection:"ml-auto cursor-pointer",priceSection:"flex items-center mt-[12px] ml-[6px] w-full",bidAsk:"grid grid-cols-2 flex-1",sec:"flex flex-col whitespace-nowrap",priceText:"text-[12px] font-medium",spreadContainer:"flex items-center flex-1 justify-end",spreadBox:"py-[4px] px-[7px] bg-[#11151C] flex items-center rounded-[5px]",icoSpread:"h-[10px] w-[10px] object-contain",spreadText:"text-[10px]",bgActive:"bg-[#148558] !bg-opacity-5 border-[1px] border-basicGreen",fav:"text-basicRed"};function MarketItem(e){let{t}=(0,N.$G)(["market"]),{item:n,ws:l,activeSymbol:i}=e,[s,o]=(0,r.useState)(n.is_favorite),[c,u]=(0,r.useState)(!1),g=(0,k._M)(l,n.hash),x=(0,d.I0)(),b=(0,d.v9)(e=>e.marketData.tradeableSymbols),j=(0,r.useRef)(null);(0,m.D)(()=>{let e=b.findIndex(e=>e.symbol===n.symbol);-1!==e&&o(b[e].is_favorite)},[b]);let C=(0,r.useMemo)(()=>{var e,n,l,i,s,o,r,c;return{displayPrice:(null==g?void 0:g.total_poin_usd)||"-",displayVolume:"0.1",displayBid:(null==g?void 0:g.bid)||"--",displayAsk:(null==g?void 0:g.ask)||"--",displayLow:(null==g?void 0:g.low)||"--",displayHigh:(null==g?void 0:g.high)||"--",displaySpread:(null==g?void 0:g.spread)||"--",displaySentimentLabel:(null==g?void 0:null===(e=g.sentiment)||void 0===e?void 0:e.percentage_sell)>(null==g?void 0:null===(n=g.sentiment)||void 0===n?void 0:n.percentage_buy)?t("sell"):t("buy"),displaySentimentBg:(null==g?void 0:null===(l=g.sentiment)||void 0===l?void 0:l.percentage_sell)>(null==g?void 0:null===(i=g.sentiment)||void 0===i?void 0:i.percentage_buy)?"bg-[#E24E6F]":"bg-[#4E7DB6]",displaySentiment:(null==g?void 0:null===(s=g.sentiment)||void 0===s?void 0:s.percentage_sell)>(null==g?void 0:null===(o=g.sentiment)||void 0===o?void 0:o.percentage_buy)?null==g?void 0:null===(r=g.sentiment)||void 0===r?void 0:r.percentage_sell:(null==g?void 0:null===(c=g.sentiment)||void 0===c?void 0:c.percentage_buy)||"-",displayDirection:(null==g?void 0:g.poin_direction)==="up"?(0,a.jsx)(L.Z,{src:"/static/assets/menu-icon/bullish-arrow.svg",className:T.arrowImg}):(0,a.jsx)(L.Z,{src:"/static/assets/menu-icon/bearish-arrow.svg",className:T.arrowImg})}},[g,t]),Z=(0,r.useMemo)(()=>i===n.alias?T.bgActive:null,[i,n.alias]);(0,r.useEffect)(()=>{if(Z){let e=j.current.offsetTop-_.yf.MARKET_LIST_HEIGHT,t=document.getElementsByClassName("market-scrollbar"),n=t[0];n.scrollTo({top:e})}},[Z]);let M=(0,r.useMemo)(()=>s?(0,a.jsx)(f.Z,{className:(0,p.cn)(T.iconStyle,T.fav)}):(0,a.jsx)(y.Z,{className:T.iconStyle}),[s]);return(0,a.jsx)(w(),{href:"".concat(h.ZE.market.link,"/").concat(n.alias),children:(0,a.jsxs)("div",{className:(0,p.cn)(T.root,Z),ref:j,children:[(0,a.jsxs)("div",{className:T.flagSection,children:[(0,a.jsx)("img",{src:n.icon_symbol_url,className:T.img,alt:"product"}),(0,a.jsxs)("div",{className:T.nameContainer,children:[(0,a.jsx)("p",{className:T.productName,children:n.alias}),(0,a.jsxs)("div",{className:T.priceContainer,children:[C.displayDirection,(0,a.jsx)("div",{className:T.rowPrice,children:(0,a.jsxs)("p",{children:["$".concat(C.displayPrice),(0,a.jsx)("span",{className:T.lightText,children:" / ".concat(C.displayVolume," Lot")})]})})]})]}),(0,a.jsx)("div",{className:T.iconSection,onClick:e=>{if(e.preventDefault(),!c){u(!0);let e={symbol:n.symbol};(0,S.MD)(e).then(e=>{let t=JSON.parse(JSON.stringify(b)),a=t.findIndex(e=>e.symbol===n.symbol);-1!==a&&(t[a].is_favorite=e.data.is_favorite,o(e.data.is_favorite),x((0,v.XA)([...t]))),u(!1)}).catch(()=>{u(!1)})}},children:M})]}),(0,a.jsxs)("div",{className:T.priceSection,children:[(0,a.jsxs)("div",{className:T.bidAsk,children:[(0,a.jsxs)("div",{className:(0,p.cn)(T.sec),children:[(0,a.jsx)("p",{className:(0,p.cn)(T.priceText,"font-medium"),children:"".concat(t("bid"),": ")}),(0,a.jsx)("span",{className:"font-light text-white text-[12px]",children:C.displayBid})]}),(0,a.jsxs)("div",{className:T.sec,children:[(0,a.jsx)("p",{className:(0,p.cn)(T.priceText,"font-medium"),children:"".concat(t("ask"),": ")}),(0,a.jsx)("span",{className:"font-light text-white text-[12px]",children:C.displayAsk})]}),(0,a.jsx)("div",{className:T.sec,children:(0,a.jsxs)("p",{className:(0,p.cn)(T.priceText,"font-light"),children:["".concat(t("l"),": "),(0,a.jsx)("span",{children:C.displayLow})]})}),(0,a.jsx)("div",{className:T.sec,children:(0,a.jsxs)("p",{className:(0,p.cn)(T.priceText,"font-light"),children:["".concat(t("h"),": "),(0,a.jsx)("span",{children:C.displayHigh})]})})]}),(0,a.jsxs)("div",{className:T.spreadContainer,children:[(0,a.jsxs)("div",{className:T.spreadBox,children:[(0,a.jsx)(L.Z,{src:"/static/assets/ico_spread.svg",className:T.icoSpread}),(0,a.jsx)("p",{className:T.spreadText,children:C.displaySpread})]}),(0,a.jsx)("div",{className:(0,p.cn)(T.spreadBox,"ml-[10px]",C.displaySentimentBg),children:(0,a.jsx)("p",{className:(0,p.cn)(T.spreadText,"text-white font-bold"),children:"".concat(C.displaySentimentLabel," ").concat(C.displaySentiment,"%")})})]})]})]})})}MarketItem.propTypes={item:o().object.isRequired,price:o().string,volume:o().string,bid:o().string,ask:o().string,low:o().string,high:o().string,spread:o().string,sentiment:o().string,ws:o().any,activeSymbol:o().string,handleScroll:o().func},MarketItem.defaultProps={item:{},price:"",volume:"",bid:"",ask:"",low:"",high:"",spread:"",sentiment:"",ws:null,activeSymbol:""};var C=n(37415);function MarketItemList(e){var t;let{searchValue:n,showLoader:s,tagRowClasses:o,tagItemClasses:g}=e,{ws:x}=(0,r.useContext)(u.J),{t:b}=(0,i.$G)(["market"]),f=(0,l.useRouter)(),y=(0,d.v9)(e=>e.marketData),j=(0,d.I0)(),[w,N]=(0,r.useState)(y.selectedFilter),[k,_]=(0,r.useState)(!1),S=f.pathname.startsWith(h.ZE.market.link)?f.query.slug:"",L={root:(0,p.cn)("rounded-tl-3xl w-[360px] bg-blue-500 hidden overflow-hidden p-[30px] h-screen","md:block"),tagRow:"flex items-center overflow-y-auto",tagItem:"px-[15px] h-[30px] bg-[#21242B] flex items-center justify-center mr-[10px] rounded-[4px] cursor-pointer",tagActive:"bg-basicGreen",tagText:"text-[12px] font-medium text-subtitleColor whitespace-nowrap",tagActiveText:"text-white",productListContainer:"mt-[15px] h-full pb-[30px] overflow-y-auto",textNotFound:"text-[14px] font-medium text-subtitleColor text-center capitalize"};(0,m.D)(()=>{N(y.selectedFilter),_(!0),setTimeout(()=>{_(!1)},1e3)},[y.selectedFilter]);let T=(0,r.useMemo)(()=>{let e=y.tradeableSymbols;return e.filter(e=>e.is_favorite)},[y.tradeableSymbols]),Z=(0,r.useMemo)(()=>{let e=y.tradeableSymbols;return e.filter(e=>"FOREX"===e.type)},[y.tradeableSymbols]),M=(0,r.useMemo)(()=>{let e=y.tradeableSymbols;return e.filter(e=>"COMMODITY"===e.type)},[y.tradeableSymbols]),I=(0,r.useMemo)(()=>{let e=y.tradeableSymbols;return e.filter(e=>"INDEX"===e.type)},[y.tradeableSymbols]),E=(0,r.useMemo)(()=>n?y.tradeableSymbols.filter(e=>e.alias.toLowerCase().includes(n.toLowerCase())):[],[n,y.tradeableSymbols]),A=(0,r.useMemo)(()=>[{slug:"FAVORITE",label:b("favorite"),items:T},{slug:"FOREX",label:b("forex"),items:Z},{slug:"COMMODITY",label:b("commodity"),items:M},{slug:"INDEX",label:b("index"),items:I}],[T,I,M,Z,b]),R=(0,r.useMemo)(()=>{var e;if((null==E?void 0:E.length)>0)return E;if(n&&(null==E?void 0:E.length)===0)return[];let t=A.findIndex(e=>e.slug===w);return null===(e=A[t])||void 0===e?void 0:e.items},[w,A,E]),D=(0,r.useCallback)(e=>({tagItem:w===e.slug?L.tagActive:"",tagText:w===e.slug?L.tagActiveText:""}),[w]);(0,r.useEffect)(()=>{var e;null===(e=document.getElementById(w))||void 0===e||e.scrollIntoView({block:"center"})}),(0,m.D)(()=>{var e;if(null==f?void 0:null===(e=f.query)||void 0===e?void 0:e.slug){let e=y.tradeableSymbols,t=e.find(e=>{var t;return e.symbol===(null==f?void 0:null===(t=f.query)||void 0===t?void 0:t.slug)});(null==t?void 0:t.is_favorite)?j((0,v.MD)("FAVORITE")):j((0,v.MD)(null==t?void 0:t.type))}},[null==f?void 0:null===(t=f.query)||void 0===t?void 0:t.slug]);let handleSlugOnChangeTab=e=>{var t,n;let a=A.findIndex(t=>t.slug===e),l=null===(t=A[a])||void 0===t?void 0:t.items,i=null===(n=l[0])||void 0===n?void 0:n.alias;if(i)return f.push({pathname:f.pathname,query:{slug:i}})},handleTagClick=e=>{j((0,v.MD)(e)),handleSlugOnChangeTab(e)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Z,{className:(0,p.cn)(L.tagRow,o),children:null==A?void 0:A.map((e,t)=>(0,a.jsx)("div",{id:e.slug,className:(0,p.cn)(L.tagItem,g,D(e).tagItem),onClick:()=>{handleTagClick(e.slug)},children:(0,a.jsx)("p",{className:(0,p.cn)(L.tagText,D(e).tagText),children:e.label})},t.toString()))}),k||s?(0,a.jsx)(C.ZP,{className:"mx-auto mt-[40px]"}):(0,a.jsx)("div",{className:(0,p.cn)(L.productListContainer,"hide-scrollbar","market-scrollbar"),children:x?(null==R?void 0:R.length)>0?null==R?void 0:R.map((e,t)=>(0,a.jsx)(MarketItem,{activeSymbol:S,ws:x,item:e},t.toString())):(0,a.jsx)(MarketEmptyState,{t:b,marketState:y,handleTagClick:handleTagClick}):null})]})}MarketItemList.propTypes={searchValue:o().string,showLoader:o().bool,tagRowClasses:o().string,tagItemClasses:o().string},MarketItem.defaultProps={searchValue:"",showLoader:!1,tagRowClasses:"",tagItemClasses:""};var Z=MarketItemList},18506:function(e,t,n){n.d(t,{j:function(){return YouNeedToHaveLiveAccountModal}});var a=n(85893),l=n(11163),i=n(45697),s=n.n(i),o=n(17527),r=n(9473),c=n(95740),d=n(75160),u=n(96442),m=n(72104);let YouNeedToHaveLiveAccountModal=e=>{let{title:t,desc:n,onClickBack:i,onClick:s}=e,{t:v}=(0,o.$G)("common"),h=(0,l.useRouter)(),p=(0,r.I0)(),g=t||v("modal_cla.default.title");return(0,a.jsxs)("div",{class:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-[#222e3b] min-w-[360px] max-w-[420px] h-4/12 p-12 rounded-xl overflow-y-auto gap-5 flex flex-col items-center justify-center",children:[(0,a.jsx)(d.Z,{src:"/static/assets/add-live-account.svg",alt:"illust-create-live-account",className:"w-36 h-36"}),(0,a.jsx)("p",{className:"text-center font-bold text-white text-lg",children:g}),(0,a.jsx)("p",{className:"text-center font-normal",children:n||""}),(0,a.jsxs)("div",{className:"flex flex-col w-full gap-5",children:[(0,a.jsx)(c.Z,{onClick:s||(()=>h.push("".concat(m.py.createLive.link))),fullWidth:!0,className:"h-[45px]",label:v("dashboard_navbar.cla")}),(0,a.jsx)(c.Z,{fullWidth:!0,onClick:i||(()=>p((0,u.HX)())),label:v("back"),btnMode:"text-button"})]})]})};YouNeedToHaveLiveAccountModal.propTypes={title:s().string,desc:s().string,onClick:s().func,onClickBack:s().func}},48709:function(e,t,n){n.d(t,{f:function(){return PercentageBar}});var a=n(85893),l=n(45697),i=n.n(l),s=n(67294),o=n(7739);let PercentageBar=e=>{let{value:t,className:n}=e,l=(0,s.useMemo)(()=>Math.floor(80*t/100),[t]);return(0,a.jsxs)("div",{className:(0,o.cn)("relative flex items-center w-[80px]",n),children:[(0,a.jsx)("div",{style:{width:l},className:"h-3 rounded-lg bg-lightBlue ring-grayBlue z-10"}),(0,a.jsx)("div",{className:"h-3 rounded-lg bg-basicRed w-full absolute"})]})};PercentageBar.propTypes={value:i().number,className:i().string}},23370:function(e,t,n){n.d(t,{O:function(){return Skeleton}});var a=n(85893),l=n(45697),i=n.n(l),s=n(7739);let Skeleton=e=>{let{className:t,dark:n}=e;return(0,a.jsx)("div",{className:(0,s.cn)("w-full h-full rounded-lg animate-pulse",n?"skeleton-dark":"skeleton",t)})};Skeleton.propTypes={className:i().string,dark:i().bool},Skeleton.defultProps={dark:!1},t.Z=Skeleton},15313:function(e,t,n){n.d(t,{F:function(){return a},y:function(){return l}});let a={login:"Login",login_sso:"Login via SSO",logout:"Logout",accountSelection:"Account Selection"},l={success:"SUCCESS",failed:"FAILED",attempt:"ATTEMPT"}},86970:function(e,t,n){n.d(t,{J:function(){return l}});var a=n(67294);let l=(0,a.createContext)(void 0)},21876:function(e,t,n){n.d(t,{Z:function(){return hooks_WithLayout}});var a=n(85893),l=n(11163),i=n(4298),s=n.n(i),o=n(67294),r=n(17527),c=n(9473),d=n(9008),u=n.n(d),m=n(45697),v=n.n(m);function DefaultMeta(e){let{title:t,description:n}=e;return(0,a.jsxs)(u(),{children:[(0,a.jsx)("meta",{name:"author",content:"Valutrades Limited"}),(0,a.jsx)("meta",{name:"description",content:n}),(0,a.jsx)("title",{children:t}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"57x57",href:"/favicon/apple-icon-57x57.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"60x60",href:"/favicon/apple-icon-60x60.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"72x72",href:"/favicon/apple-icon-72x72.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"76x76",href:"/favicon/apple-icon-76x76.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"114x114",href:"/favicon/apple-icon-114x114.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"120x120",href:"/favicon/apple-icon-120x120.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"144x144",href:"/favicon/apple-icon-144x144.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"152x152",href:"/favicon/apple-icon-152x152.png"}),(0,a.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/favicon/apple-icon-180x180.png"}),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"192x192",href:"/favicon/android-icon-192x192.png"}),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/favicon/favicon-32x32.png"}),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"96x96",href:"/favicon/favicon-96x96.png"}),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/favicon/favicon-16x16.png"}),(0,a.jsx)("meta",{name:"theme-color",content:"#18232f"}),(0,a.jsx)("meta",{charSet:"utf-8"}),(0,a.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"}),(0,a.jsx)("meta",{property:"og:title",content:t}),(0,a.jsx)("meta",{property:"og:description",content:n}),(0,a.jsx)("meta",{name:"twitter:title",content:t}),(0,a.jsx)("meta",{name:"twitter:description",content:n})]})}DefaultMeta.propTypes={title:v().string,description:v().string};let HiddenValue=e=>{let{value:t,cssId:n}=e;return(0,a.jsx)("p",{style:{display:"none"},className:n,children:t})};HiddenValue.propTypes={value:v().string,cssId:v().string};let GTMElements=()=>{let{fullProfile:e,gtm:t}=(0,c.v9)(e=>null==e?void 0:e.authState),n=[{value:null==e?void 0:e.person_id,cssId:"personId"},{value:null==t?void 0:t.loginVia,cssId:"loginVia"},{value:null==t?void 0:t.lastLoginDate,cssId:"lastLoginDate"},{value:null==t?void 0:t.lastLoginTime,cssId:"lastLoginTime"}];return(0,a.jsx)(a.Fragment,{children:null==n?void 0:n.map(e=>(0,a.jsx)(HiddenValue,{cssId:e.cssId,value:null==e?void 0:e.value},e.cssId))})};var h=n(54658),p=n(7739),g=n(95740),x=n(75160),b=n(25675),f=n.n(b);function ModalDefaultHead(e){var t;let{title:n,description:l,icon:i,iconStyle:s,titleClassName:o}=e;return(0,a.jsxs)("div",{className:"flex flex-col justify-center items-center mb-6",children:[i&&(0,a.jsx)(f(),{disabledEffect:!0,objectFit:"contain",width:90,height:90,src:null!==(t=i.src)&&void 0!==t?t:i.default.src,alt:"alert",className:s}),(0,a.jsxs)("div",{className:"mt-7 text-center",children:[(0,a.jsx)("p",{className:(0,p.cn)("text-lg font-medium text-white mb-2",o),children:n}),(0,a.jsx)("p",{className:"body",children:l})]})]})}function GlobalModal(){var e;let t=(0,c.v9)(e=>e.modalState),{middleComponent:n,actions:l,isOpen:i,bgColor:s,maxWidth:o,bottomClassName:r}=t;return i&&(0,a.jsx)("div",{className:"fixed top-0 left-0 right-0 z-[1000] w-full p-4 overflow-x-hidden overflow-y-auto md:inset-0 h-modal h-full flex justify-center items-center bg-black bg-opacity-40",children:(0,a.jsx)("div",{className:"relative w-full h-full  ".concat(o||"max-w-sm"," md:h-auto flex items-center justify-center"),children:(0,a.jsxs)("div",{className:"relative ".concat(s||"bg-basicGray"," w-full rounded-lg shadow"),children:[(null==t?void 0:t.showCloseButton)&&(0,a.jsx)("div",{className:"w-full flex justify-end mb-2",children:(0,a.jsx)(g.Z,{btnMode:"text-button",label:(0,a.jsx)(x.Z,{src:"/static/assets/close.svg",className:"w-3 h-3 object-contain"}),onClick:()=>{(0,h.M)(),(null==t?void 0:t.onClose)&&(null==t||t.onClose())}})}),(0,a.jsxs)("div",{className:(0,p.cn)("px-8 md:px-10",(null==t?void 0:t.showCloseButton)?"pb-8":"py-8"),children:[null!==(e=null==t?void 0:t.customHeader)&&void 0!==e?e:(0,a.jsx)(ModalDefaultHead,{...t}),n?n():null,(null==l?void 0:l.length)?(0,a.jsx)("div",{className:r,children:null==l?void 0:l.map((e,t)=>(0,a.jsx)(g.Z,{...e,className:"".concat(e.className," mt-2"),fullWidth:!0},t.toString()))}):null]})]})})})}function GlobalToast(){let e=(0,c.v9)(e=>e.toastState),{isOpen:t,toastType:n,content:l}=e,[i,s]=(0,o.useState)("");return(0,o.useEffect)(()=>{t&&setTimeout(()=>{s("opacity-100 translate-y-4")},100)},[t]),t&&(0,a.jsxs)("div",{id:"toast-default",className:(0,p.cn)("transition-all duration-300 opacity-0 ease-in-out z-[1000] fixed top-5 lg:top-40 left-1/2 transform -translate-x-1/2 mx-auto flex items-center w-[80vw] max-w-max py-4 px-5 text-gray-500 bg-white rounded-full shadow dark:text-gray-400 dark:bg-gray-800",i),role:"alert",children:["success"===n?(0,a.jsx)(x.Z,{src:"/static/assets/check-circle.svg",className:"w-5 h-5 object-contain"}):(0,a.jsx)(x.Z,{src:"/static/assets/remove-circle.svg",className:"w-5 h-5 object-contain"}),(0,a.jsx)("div",{id:"toast-msg",className:"ml-3 text-sm font-bold",children:l})]})}function BaseLayout(e){return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("main",{className:"flex flex-col justify-start min-h-screen",children:e.children})})}ModalDefaultHead.propTypes={title:v().string,description:v().string,icon:v().any,iconStyle:v().string,titleClassName:v().string},v().string,v().string,v().bool,BaseLayout.propTypes={children:v().node};var y=n(87357),j=n(91133),w=n(60181),N=n(23508),k=n(47041),_=n(41664),S=n.n(_),L=n(28677),T=n(37415),C=n(34055),Z=n(15313),M=n(10953),I=n(96772),E=n(23898),A=n(72104),R=n(49753),D=n(91386),B=n(23726),P=n(8323),G=n(31938);let getDisclaimerCopy=()=>(0,G.Z)({baseURL:"/api",url:"api/v1/cms/public/copywriting/disclaimer",method:"GET"});var O=n(17547);let U={root:(0,p.cn)("py-2.5 px-4 greenGradientBg hidden flex-row justify-between","md:flex "),mobImg:"h-4 w-4 object-contain mr-3",langImg:"h-5 w-5 object-contain",disclaimerContainer:"bg-[#2D4158] w-screen py-3 lg:py-3 text-white px-5",disclaimerText:"text-center sm:text-base font-300 lg:px-8 text-sm"},LanguageSelect=e=>{let{value:t,setValue:n,list:l}=e,[i,s]=(0,o.useState)(!1);return(0,a.jsxs)("div",{className:"group",children:[(0,a.jsxs)("button",{className:"flex flex-row items-center gap-2",onClick:()=>s(!i),children:[(0,a.jsx)(x.Z,{className:"w-4",src:"/static/assets/globe.svg"}),(0,a.jsx)("p",{className:"text-white",children:t}),(0,a.jsx)(x.Z,{className:"fill-white w-2",src:"/static/assets/arrow_dropdown.svg"})]}),(0,a.jsx)("div",{className:(0,p.cn)("rounded absolute bg-gray-800 px-4 lg:p-0 lg:min-w-[5.5rem] -ml-1 lg:ml-0 mt-2 opacity-0 hidden","".concat(i&&"opacity-100 inline"),"duration-500 ease-in-out transform z-10"),children:(0,a.jsx)("div",{className:"flex flex-col justify-start [&>*:not(:last-child)]:border-gray-700 [&>*:not(:last-child)]:border-b-2 [&>*:not(:last-child)]:lg:border-0 [&>*:not(:last-child)]:border-dotted",children:null==l?void 0:l.map((e,t)=>(0,a.jsx)("button",{children:(0,a.jsx)("p",{className:"lg:rounded py-4 lg:p-2 cursor-pointer text-left text-white",onClick:()=>n({label:null==e?void 0:e.label,value:null==e?void 0:e.value}),children:e.label})},t))})})]})};LanguageSelect.propTypes={value:v().string,setValue:v().func,list:v().array};let F=(0,o.forwardRef)(e=>{var t,n;let{disclaimerState:i}=e,[s,r]=(0,o.useState)([]),{isMobile:d}=(0,E.Z)(),{t:u,i18n:m}=(0,L.$G)(),v=(0,l.useRouter)(),{pathname:h,asPath:p,query:g}=v,b=(0,c.v9)(e=>e.settings),f=(0,c.v9)(e=>e.authState),y=(0,I.n)(),j=(0,I.U)(),[_,G]=(0,o.useState)({label:"",value:""}),[F,H]=i,[z,W]=(0,o.useState)({title:"",description:""}),[q,V]=(0,o.useState)(!0),$=null==f?void 0:null===(n=f.fullProfile)||void 0===n?void 0:null===(t=n.permissions)||void 0===t?void 0:t.includes(M.iR.guest);(0,o.useEffect)(()=>{let initialize=async()=>{var e,t;let n=b.listLanguages,a=null==n?void 0:null===(e=n.filter(e=>{var t,n;return null==m?void 0:null===(n=m.options)||void 0===n?void 0:null===(t=n.locales)||void 0===t?void 0:t.find(t=>t===e.language_code)}))||void 0===e?void 0:e.map(e=>({label:e.language,value:e.language_code})),l=null==a?void 0:a.find(e=>(null==e?void 0:e.value)===v.locale);if(r(a),G(l),(null==z?void 0:null===(t=z.description)||void 0===t?void 0:t.length)===0){let{data:e}=await getDisclaimerCopy();e&&W(null==e?void 0:e.disclaimer),V(!1)}};initialize()},[]);let handleClickLanguage=async e=>{if($)return;let{value:t}=e||{};if(v.locale!==t)return y&&await (0,O.setLanguage)({language_code:t}),G(e),(0,k.setCookie)(C.cookiesKey.siteLang,t,{domain:(0,D.p7)(window.location.hostname),secure:!0,sameSite:"strict"}),v.push({pathname:h,query:g},p,{locale:t})},handleLogout=async()=>{let e=await (0,P.m$)();if(e){var t,n;(0,R.i)({action:Z.F.logout,action_type:Z.y.success}),(null==e?void 0:null===(n=e.headersMobile)||void 0===n?void 0:null===(t=n.clientType)||void 0===t?void 0:t.length)>0?v.push(A.py.loginWebview.link):v.push(A.py.login.link),(0,B.FZ)()}},handleHeaderShown=e=>{H(e)};return(0,a.jsxs)("header",{children:[(0,a.jsx)(()=>{if("/login"!==v.pathname)return;let e=(null==z?void 0:z.description)||"",t=(null==z?void 0:z.title)||"";return(0,a.jsx)("div",{className:U.disclaimerContainer,children:q?(0,a.jsx)(T.ZP,{}):d?(0,a.jsx)(a.Fragment,{children:F?(0,a.jsxs)("div",{className:"grid items-center",children:[(0,a.jsx)(L.cC,{children:(0,a.jsx)("div",{className:U.disclaimerText,children:e})}),(0,a.jsx)(w.Z,{className:"w-fit m-auto",fontSize:"small",onClick:()=>handleHeaderShown(!1)})]}):(0,a.jsxs)("div",{className:"grid justify-items-center",children:[(0,a.jsx)("p",{className:U.disclaimerText,onClick:()=>H(!0),children:(0,a.jsx)(L.cC,{children:(0,a.jsx)("div",{className:"text-gray-200",children:t})})}),(0,a.jsx)(N.Z,{className:"w-fit  m-auto",fontSize:"small",onClick:()=>handleHeaderShown(!0)})]})}):(0,a.jsx)(L.cC,{children:(0,a.jsx)("div",{className:U.disclaimerText,children:e})})})},{}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"hidden md:flex flex-row justify-end items-center py-2 px-5 greenGradientBg text-white font-medium",children:(0,a.jsxs)("div",{className:"flex flex-row gap-7",children:[(0,a.jsx)(LanguageSelect,{value:null==_?void 0:_.label,setValue:handleClickLanguage,list:s}),(0,a.jsxs)(S(),{href:"".concat(C.url.supportCenter,"/").concat((0,D.mC)(v.locale)),target:"_blank",rel:"noopener noreferrer",className:"flexRowCenter",children:[(0,a.jsx)(x.Z,{className:"".concat(U.langImg," navHeaderPager"),src:"/static/assets/bx_bxs-help-circle.svg",alt:"question"}),(0,a.jsx)("p",{className:"text-white",children:u("dashboard_header.support_center")})]}),(0,a.jsxs)("div",{className:"flexRowCenter",children:[(0,a.jsx)(x.Z,{className:"".concat(U.langImg," navHeaderPager"),src:"/static/assets/phone.svg",alt:"phone"}),(0,a.jsx)("p",{className:"text-white",children:u("dashboard_header.contact_number")})]}),(()=>{if(y){var e;return(0,a.jsxs)("div",{className:"flexRowCenter",children:[(0,a.jsxs)("div",{className:"flexRowCenter",children:[(0,a.jsx)(x.Z,{className:"".concat(U.langImg," navHeaderPager"),src:"/static/assets/menu-icon/login-user.svg",alt:"login-icon"}),(0,a.jsx)("p",{className:"userfname text-white",children:null===(e=j.profile)||void 0===e?void 0:e.first_name})]}),(0,a.jsx)("div",{className:"w-[1px] h-[14px] bg-[#fff] mx-[4px]"}),(0,a.jsx)("div",{id:"btn-logout",className:"cursor-pointer",onClick:handleLogout,children:(0,a.jsx)("p",{className:"text-white",children:u("dashboard_header.logout")})})]})}return(0,a.jsxs)(S(),{href:A.ym,className:"flexRowCenter",children:[(0,a.jsx)(x.Z,{className:"".concat(U.langImg," navHeaderPager"),src:"/static/assets/menu-icon/login-user.svg",alt:"login-icon"}),(0,a.jsx)("p",{className:"text-white",children:u("dashboard_header.login")})]})})()]})})})]})});F.propTypes={disclaimerState:v().bool};let H=[A.ym,A.bk,A.th,A.lP,A.MC,A.py.forgotPassword.expired.link,A.py.forgotPassword.createNewPassword.link];A.ZE.affiliate.link,A.V;let z=[A.py.corporate.createPassword.link,A.ZE.reuploadDocument.link,A.ym,A.lP,A.py.forgotPassword.expired.link,A.py.forgotPassword.createNewPassword.link],isGuestAreaPages=e=>H.some(t=>{if((null==t?void 0:t.includes("affiliate"))===!1)return null==e?void 0:e.includes(t)}),isWithoutSidebarPages=e=>z.some(t=>null==e?void 0:e.includes(t)),W={root:(0,p.cn)("h-full w-[119px] bg-blue-900 pt-9 hidden flex-col","md:flex"),menuContainer:"mt-24 flex flex-col gap-4",menuItem:(0,p.cn)("h-16 w-full flex justify-center items-center flex-col"),icon:"h-5 w-5 object-contain",menuText:"text-menuText mt-2.5",activeMenuText:"text-basicGreen mt-2.5"},q=(0,o.forwardRef)(()=>{let{t:e}=(0,L.$G)(),{isMobile:t,isTablet:n}=(0,E.Z)(),i=(0,l.useRouter)(),s=isGuestAreaPages(i.pathname),r=(0,c.v9)(e=>e.marketData),d=(0,I.n)(),u=(0,o.useMemo)(()=>i.pathname===A.ZE.home.link||i.pathname===A.ZE.tradingSignal.link||i.pathname.startsWith(A.ZE.topMover.link),[i.pathname]),m=(0,o.useMemo)(()=>{var e;return null===(e=i.pathname)||void 0===e?void 0:e.includes("/client-area/market")},[i.pathname]),v=(0,o.useMemo)(()=>i.pathname.startsWith(["/client-area/more"]),[i.pathname]),h=(0,o.useMemo)(()=>{if(d){var e;return t?"".concat(A.ZE.marketList.link):"".concat(A.ZE.market.link,"/").concat(null===(e=r.tradeableSymbols[0])||void 0===e?void 0:e.symbol)}return"/"},[d,t,r.tradeableSymbols]),g=(0,o.useMemo)(()=>d?t||n?"".concat(A.ZE.sidebar.link):A.py.more.link:"/",[d,t,n]),b=[{icon:"/static/assets/menu-icon/home.svg",icon_active:"/static/assets/menu-icon/home-active.svg",label:e("dashboard_sidebar.home"),url:A.ZE.home.link,active:u,id:"menu-leftbar-home-btn"},{icon:"/static/assets/menu-icon/market.svg",icon_active:"/static/assets/menu-icon/market-active.svg",label:e("dashboard_sidebar.market"),url:h,active:m,id:"menu-leftbar-market-btn"},{icon:"/static/assets/menu-icon/more.svg",icon_active:"/static/assets/menu-icon/more-active.svg",label:e("dashboard_sidebar.more"),url:g,active:v,id:"menu-leftbar-more-btn"}];return isWithoutSidebarPages(i.pathname)?null:(0,a.jsxs)("aside",{children:[(0,a.jsx)("div",{className:W.root,children:(!s||d)&&i.pathname!==A.ZE.pending.link&&i.pathname!==A.py.login.link&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:W.menuContainer,children:null==b?void 0:b.map(e=>(0,a.jsxs)(S(),{href:e.url,id:e.id,locale:i.locale,className:"flex items-center",children:[e.active&&(0,a.jsx)("div",{className:"min-w-[5px] bg-green-400 h-[40px] rounded-r"}),(0,a.jsxs)("div",{className:W.menuItem,children:[(0,a.jsx)(x.Z,{src:e.active?e.icon_active:e.icon,className:W.icon,alt:"home"}),(0,a.jsx)("p",{className:e.active?W.activeMenuText:W.menuText,children:e.label})]})]},e.label))})})}),(!s||d)&&i.pathname!==A.ZE.pending.link&&(0,a.jsx)("div",{className:(0,p.cn)("w-screen flex justify-between absolute bottom-0 bg-blue-900","md:hidden"),children:null==b?void 0:b.map(e=>(0,a.jsx)(S(),{href:e.url,className:"flex-1",children:(0,a.jsxs)("div",{className:W.menuItem,children:[(0,a.jsx)(x.Z,{src:e.active?e.icon_active:e.icon,className:W.icon,alt:e.label}),(0,a.jsx)("p",{className:e.active?W.activeMenuText:W.menuText,children:e.label})]})},e.label))})]})});var V=n(57197),$=n(36747),J=n(85703),Y=n(19617),K=n(23370),X=n(84538),Q=n(51526),ee=n(77938);let DashboardNavbarMobile=e=>{var t,n,i,s,r;let{breadcrumbLinks:d,notInGuestAreaPages:u}=e,{t:m,i18n:v}=(0,L.$G)("common"),h=(0,l.useRouter)(),b=(0,I.n)(),f=(0,I.U)(),{pathname:y,asPath:w,query:N}=h,_=(0,c.v9)(e=>e.settings),[T,Z]=(0,o.useState)([]),[E,R]=(0,o.useState)(!1),[P,G]=(0,o.useState)(!1),[O,U]=(0,o.useState)({label:"",value:""}),F=(0,c.v9)(e=>e.authState),H=F.accountSelection.selectedAccount,z=null==F?void 0:null===(n=F.fullProfile)||void 0===n?void 0:null===(t=n.permissions)||void 0===t?void 0:t.includes(M.iR.guest),{isWebview:W}=(0,ee.n)(window.navigator.userAgent),{urlWeb:q}=(0,$.Y)(window.location.hostname);(0,o.useEffect)(()=>{let initialize=async()=>{var e;let t=_.listLanguages,n=null==t?void 0:null===(e=t.filter(e=>{var t,n;return null==v?void 0:null===(n=v.options)||void 0===n?void 0:null===(t=n.locales)||void 0===t?void 0:t.find(t=>t===e.language_code)}))||void 0===e?void 0:e.map(e=>({label:e.language,value:e.language_code})),a=null==n?void 0:n.find(e=>(null==e?void 0:e.value)===h.locale);Z(n),U(a)};initialize()},[]);let handleClickLanguage=async e=>{if(z)return;let{value:t}=e||{};if(h.locale!==t)return U(e),(0,k.setCookie)(C.cookiesKey.siteLang,t,{domain:(0,D.p7)(window.location.hostname),secure:!0,sameSite:"strict"}),h.push({pathname:y,query:N},w,{locale:t})},J={open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},Y=[{label:m("dashboard_navbar.product"),children:[{headline:m("dashboard_navbar.product_menu_children.account_headline"),body:m("dashboard_navbar.product_menu_children.account_body"),href:q.accountType},{headline:m("dashboard_navbar.product_menu_children.fund_headline"),body:m("dashboard_navbar.product_menu_children.fund_body"),href:q.fundSafetyAndRegulation},{headline:m("dashboard_navbar.product_menu_children.contract_headline"),body:m("dashboard_navbar.product_menu_children.contract_body"),href:q.contractSpecification},{headline:m("dashboard_navbar.product_menu_children.calendar_headline"),body:m("dashboard_navbar.product_menu_children.calendar_body"),href:q.calendar},{headline:m("dashboard_navbar.product_menu_children.tools_headline"),body:m("dashboard_navbar.product_menu_children.tools_body"),href:q.tradingTools},{headline:m("dashboard_navbar.product_menu_children.method_headline"),body:m("dashboard_navbar.product_menu_children.method_body"),href:q.fundingMethod}]},{label:m("dashboard_navbar.download"),href:q.download},{label:m("dashboard_navbar.about_us"),href:q.aboutUs},{label:m("dashboard_navbar.affiliate"),href:q.affiliate}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(X.E.nav,{initial:"closed",animate:E?"opened":"closed",className:(0,p.cn)("flex bg-blue-900 min-h-[52px] flex-col justify-end","md:hidden"),children:[(0,a.jsxs)("div",{className:"flex justify-between p-4",children:[(0,a.jsx)(S(),{href:A.V,children:u&&b?(0,a.jsx)(x.Z,{src:"/static/assets/VT-logo-mini.svg",className:"mt-[3px] w-5 h-5 object-contain",alt:"vt-logo"}):(0,a.jsx)(x.Z,{src:"/static/assets/VT-logo.svg",className:"mt-[3px] w-auto h-[18px] object-contain",alt:"vt-logo"})}),u&&b?(0,a.jsxs)("div",{className:"flex gap-4 items-center",onClick:()=>{(0,B.dW)(z)},children:[(0,a.jsx)("p",{className:"text-titleColor text-base",children:null==H?void 0:H.account}),(0,a.jsx)(V.Z,{slug:null==H?void 0:H.badge_label}),(0,a.jsx)(x.Z,{src:"/static/assets/arrow_dropdown.svg",alt:"drop",className:"h-3 w-3 object-contain"})]}):null,u&&b?(0,a.jsxs)("button",{className:"flex items-center justify-center relative",onClick:()=>h.push(A.ZE.notifications.link),children:[F.notificationCount>0&&(0,a.jsx)("div",{className:"absolute -right-[6px] p-[4px] bottom-3 w-4 h-4 flex items-center justify-center bg-[#C4183C] rounded-full",children:(0,a.jsx)("p",{className:"text-white text-sm",children:F.notificationCount})}),(0,a.jsx)(x.Z,{className:"w-5 h-5",src:"/static/assets/bell.svg",alt:"bell"})]}):null,W?null:(0,a.jsx)("button",{onClick:()=>R(!0),children:(0,a.jsx)(x.Z,{src:"/static/assets/menu-icon/menu-navbar-mobile.svg",className:"w-6 h-6",alt:"menu-icon"})}),(0,a.jsxs)(X.E.div,{variants:{opened:{x:"0%",transition:{duration:.5,ease:"easeInOut"}},closed:{x:"-100%",transition:{duration:.5,ease:"easeInOut"}}},className:"fixed top-0 left-0 w-screen h-screen bg-blue-900",children:[(0,a.jsxs)("div",{className:"w-full flex flex-col px-6",children:[(0,a.jsxs)("div",{className:"w-full flex justify-between items-center my-8",children:[(0,a.jsx)(x.Z,{src:"/static/assets/VT-logo.svg",className:"mt-[3px] min-w-[100px] w-auto h-[18px] object-contain",alt:"vt-logo"}),(0,a.jsx)(LanguageSelect,{value:null==O?void 0:O.label,setValue:handleClickLanguage,list:T}),(0,a.jsxs)("div",{className:"flex items-center gap-8",children:[(0,a.jsxs)("button",{className:"flex items-center gap-2",onClick:()=>{b?h.push(A.ZE.profile.link):h.push(A.py.login.link)},children:[(0,a.jsx)("p",{className:"text-titleColor text-right",children:b?null===(i=f.profile)||void 0===i?void 0:i.first_name:"Login"}),(0,a.jsx)(x.Z,{className:"w-4 h-4",src:"/static/assets/menu-icon/login-user.svg",alt:"login-icon"})]}),(0,a.jsx)("button",{onClick:()=>R(!E),children:(0,a.jsx)(x.Z,{src:"/static/assets/close.svg",className:"w-4 h-4",alt:"close-icon"})})]})]}),(0,a.jsx)("div",{className:"flex flex-col gap-6",children:null==Y?void 0:Y.map((e,t)=>{var n,l;return(null==e?void 0:null===(n=e.children)||void 0===n?void 0:n.length)>0?(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex gap-2 items-center -mb-1 cursor-pointer",onClick:()=>G(!P),children:[(0,a.jsx)("p",{className:"text-white text-lg font-bold",children:e.label}),(0,a.jsx)("div",{className:"w-11 h-11 flex items-center justify-center",children:(0,a.jsx)(x.Z,{src:P?"/static/assets/arrow_dropdown_up.svg":"/static/assets/arrow_dropdown.svg",className:(0,p.cn)(P?"w-9 h-9":"w-4 h-4"),alt:"dropdown-icon"})})]}),(0,a.jsx)(Q.M,{initial:!1,children:P&&(0,a.jsx)(X.E.div,{initial:"collapsed",animate:"open",exit:"collapsed",variants:J,transition:{duration:.3,ease:[.24,.42,.63,.98]},className:"flex flex-col gap-5 my-6 ml-6",children:null==e?void 0:null===(l=e.children)||void 0===l?void 0:l.map((e,t)=>(0,a.jsx)(S(),{href:e.href,children:(0,a.jsx)(X.E.p,{className:"text-md",children:null==e?void 0:e.headline},e.name)},t))})})]},t):(0,a.jsx)(S(),{href:e.href,className:"text-white text-lg font-bold cursor-pointer",children:e.label},t)})})]}),(0,a.jsxs)("div",{className:"fixed transform w-full bottom-0 mt-4 px-4",children:[(0,a.jsx)(g.Z,{onClick:()=>h.push(A.py.createLive.link),className:"mb-4",fullWidth:!0,label:m("dashboard_navbar.cla")}),(0,a.jsx)(g.Z,{onClick:()=>h.push(A.py.createDemo.link),className:"mb-4",fullWidth:!0,btnMode:"outline-green",label:m("dashboard_navbar.cda")})]})]})]}),!Array.isArray(d)&&h.pathname!==A.V&&h.pathname!==A.ym&&(0,a.jsxs)(S(),{href:(null==d?void 0:d.previousLink)?null==d?void 0:d.previousLink:(h.pathname===A.py.createDemo.link||h.pathname===A.py.createLive.link)&&(null===(s=h.query)||void 0===s?void 0:s.step)!=="1"?"".concat(h.pathname,"?step=").concat((null===(r=h.query)||void 0===r?void 0:r.step)-1):A.V,className:"flex items-center pb-4",children:[(0,a.jsx)(x.Z,{src:"/static/assets/arrow-left.svg",className:"w-4 h-4 object-contain ml-4 mr-2",alt:"vt-logo"}),(0,a.jsx)("p",{className:"text-sm",children:m("general.back")})]})]}),(0,a.jsx)(j.aR,{breadcrumbLinks:d})]})};DashboardNavbarMobile.propTypes={breadcrumbLinks:v().array,notInGuestAreaPages:v().bool};let et={root:(0,p.cn)("w-full h-[84px] hidden flex-row bg-blue-900 justify-end px-7 py-5","md:flex"),menuList:"flexRowCenter gap-7 lg:pr-14 md:pr-2 md:max-lg:ml-3",menuItem:"relative group flex flex-col items-end",menuItemButton:"flexRowCenter cursor-pointer",megaMenuArrowIcon:"rotate-180 fill-white w-7 mt-7 absolute translate-y-0 opacity-0 invisible duration-100 ease-in-out",megaMenuBody:"pt-7 gap-0 mt-3 min-w-[50rem] -mr-[30em] xl:-mr-[20em] absolute opacity-0 invisible duration-100 ease-in-out",megaMenuContainer:"relative p-5 bg-white rounded-xl shadow-xl w-full",megaMenuSubContainer:"flex flex-wrap text-[#202832]",megaMenuItem:"flex flex-col gap-1 p-5 w-1/3 rounded-xl hover:bg-[#E3ECF3] text-lightGray cursor-pointer",megaMenuItemHeadline:"text-base font-[500] color-grey-900",megaMenuItemBody:"font-light m-0 p-0 text-sm",menuText:"text-white text-base",img:"h-3 w-3 object-contain ml-3",liveSection:"flex flex-col justify-start cursor-pointer",liveTag:"pl-3 pr-3 pt-1 pb-1 bg-mediumBlue flex self-start rounded mt-1",liveTagText:"font-light text-white",bell:"pl-5 flexRowCenter relative cursor-pointer",bellImg:"h-5 w-5 object-contain",imgLogo:"min-w-[100px] w-auto md:w-[120px] lg:w-[170px] h-[30px] object-contain",imgContainer:"mr-auto self-center",demoBtn:"ml-4",icnStyle:"h-[12px] w-[12px] ml-[8px]"},en=(0,o.forwardRef)((e,t)=>{var i,s,r;let{t:d}=(0,L.$G)(),u=(0,l.useRouter)(),m=(0,I.n)(),v=(0,c.I0)(),h=(0,c.v9)(e=>e.authState),b=h.accountSelection.selectedAccount,f=isGuestAreaPages(u.pathname),y=null==h?void 0:null===(s=h.fullProfile)||void 0===s?void 0:null===(i=s.permissions)||void 0===i?void 0:i.includes(M.iR.guest),[j,w]=(0,o.useState)(!1),{urlWeb:k}=(0,$.Y)(window.location.hostname);(0,o.useEffect)(()=>{let initialize=async()=>{let e=await n.e(1926).then(n.bind(n,51926));try{let{data:e}=await (0,Y.Jq)({page:1,per_page:10});e&&v((0,J.wU)(null==e?void 0:e.total_unread))}catch(n){var t;e.openToast({content:(null==n?void 0:null===(t=n.data)||void 0===t?void 0:t.message)||(null==n?void 0:n.message),toastType:"failed"})}};m&&!isWithoutSidebarPages(u.pathname)&&initialize()},[]);let _=[{label:d("dashboard_navbar.product"),children:[{headline:d("dashboard_navbar.product_menu_children.account_headline"),body:d("dashboard_navbar.product_menu_children.account_body"),href:k.accountType},{headline:d("dashboard_navbar.product_menu_children.fund_headline"),body:d("dashboard_navbar.product_menu_children.fund_body"),href:k.fundSafetyAndRegulation},{headline:d("dashboard_navbar.product_menu_children.contract_headline"),body:d("dashboard_navbar.product_menu_children.contract_body"),href:k.contractSpecification},{headline:d("dashboard_navbar.product_menu_children.calendar_headline"),body:d("dashboard_navbar.product_menu_children.calendar_body"),href:k.calendar},{headline:d("dashboard_navbar.product_menu_children.tools_headline"),body:d("dashboard_navbar.product_menu_children.tools_body"),href:k.tradingTools},{headline:d("dashboard_navbar.product_menu_children.method_headline"),body:d("dashboard_navbar.product_menu_children.method_body"),href:k.fundingMethod},{headline:d("dashboard_navbar.product_menu_children.blog_headline"),body:d("dashboard_navbar.product_menu_children.blog_body"),href:k.blog}]},{label:d("dashboard_navbar.download"),href:k.download},{label:d("dashboard_navbar.about_us"),href:k.aboutUs},{label:d("dashboard_navbar.affiliate"),href:k.affiliate}];return(0,a.jsxs)("nav",{ref:t,children:[(0,a.jsxs)("div",{className:et.root,children:[(0,a.jsx)("button",{className:et.imgContainer,onClick:()=>{m?u.push(A.V):u.push(A.py.login.link)},children:(0,a.jsx)(x.Z,{className:et.imgLogo,src:"/static/assets/VT-logo.svg",alt:"VT-logo",priority:!0})}),(0,a.jsx)("ul",{className:et.menuList,children:null==_?void 0:_.map(e=>{var t,n,l;return(0,a.jsxs)("li",{className:et.menuItem,children:[(0,a.jsx)("button",{className:et.menuItemButton,onClick:()=>w(!j),children:(null===(t=e.children)||void 0===t?void 0:t.length)>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:et.menuText,children:e.label}),(0,a.jsx)(x.Z,{src:"/static/assets/arrow_dropdown.svg",alt:"drop",className:et.img})]}):(0,a.jsx)(S(),{href:e.href,children:(0,a.jsx)("p",{className:et.menuText,children:e.label})})}),(null===(n=e.children)||void 0===n?void 0:n.length)>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.Z,{className:(0,p.cn)(et.megaMenuArrowIcon,j&&"opacity-100 visible transform"),src:"/static/assets/arrow_dropdown.svg"}),(0,a.jsx)("div",{className:(0,p.cn)(et.megaMenuBody,j&&"opacity-100 visible transform"),children:(0,a.jsx)("div",{className:et.megaMenuContainer,children:(0,a.jsx)("ul",{className:et.megaMenuSubContainer,children:null===(l=e.children)||void 0===l?void 0:l.map((e,t)=>(0,a.jsxs)(S(),{href:e.href,className:et.megaMenuItem,children:[(0,a.jsx)("h5",{className:et.megaMenuItemHeadline,children:e.headline}),(0,a.jsx)("h6",{className:et.megaMenuItemBody,children:e.body})]},t))})})})]})]},e.label)})}),(0,a.jsx)("div",{className:"brDashDark mx-2"}),(0,a.jsx)(g.Z,{href:A.py.createLive.link,label:d("dashboard_navbar.cla"),id:"btn-create-live",className:"mx-3"}),f?(0,a.jsx)(g.Z,{id:"btn-create-demo",href:A.py.createDemo.link,label:d("dashboard_navbar.cda"),btnMode:"outline-green",className:"mx-3"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"".concat(et.menuList," ").concat(et.ph20),children:[(0,a.jsxs)("div",{className:et.liveSection,onClick:()=>{(0,B.dW)(y)},children:[(0,a.jsx)("div",{className:et.menuText,children:null!==(r=null==b?void 0:b.account)&&void 0!==r?r:(0,a.jsx)(K.Z,{className:"h-3 mb-2"})}),(0,a.jsx)(V.Z,{slug:null==b?void 0:b.badge_label})]}),(0,a.jsx)("div",{id:"btn-acc-picker",className:"cursor-pointer",onClick:()=>{(0,B.dW)(y)},children:(0,a.jsx)(N.Z,{className:et.icnStyle})})]}),(0,a.jsxs)("button",{className:et.bell,onClick:()=>u.push(A.ZE.notifications.link),children:[h.notificationCount>0&&(0,a.jsx)("div",{className:"absolute -right-[10px] p-[10px] top-0 w-4 h-4 flex items-center justify-center bg-[#C4183C] rounded-full",children:(0,a.jsx)("p",{className:"text-white",children:h.notificationCount})}),(0,a.jsx)(x.Z,{className:et.bellImg,src:"/static/assets/bell.svg",alt:"bell"})]})]})]}),(0,a.jsx)(DashboardNavbarMobile,{notInGuestAreaPages:!f,breadcrumbLinks:null==e?void 0:e.breadcrumbLinks})]})});en.propTypes={breadcrumbLinks:v().array};var ea=n(5152),el=n.n(ea),ei=n(55975),es=n(96442);let eo={root:"p-4 rounded-[20px]",balanceHeaderContainer:"flex flex-row items-start justify-start pt-1.5 pb-1.5 pl-1.5 pr-1.5 rounded-xl gap-4",item:"flex flex-row items-center flex-1",itemCol:"flex flex-col",itemImg:"h-6 w-6 object-contain mr-4",itemTitle:"text-grayBlue",itemText:"text-basicGreen font-bold text-[10px] h-[10px]",emptyText:"text-basicRed",btnDeposit:"mt-4 mb-4 w-full",btnImg:"h-6 w-8 object-contain",btnRow:"flexRowCenter",mr:"mr-1.5 w-full"},er=n(61547),DashboardUserInformation=e=>{var t;let{accountData:i,selectedAccount:s,profile:r}=e,{t:d}=(0,L.$G)(),u=(0,l.useRouter)(),m=(0,c.I0)(),{isLoading:v,startLoading:b,stopLoading:y}=(0,ei.Z)(),{isLoading:j,startLoading:w,stopLoading:N}=(0,ei.Z)(),{isLoading:k,startLoading:_,stopLoading:S}=(0,ei.Z)(),T=(0,o.useMemo)(()=>(null==s?void 0:s.badge_label)==="demo",[s]),Z=(0,o.useMemo)(()=>(null==s?void 0:s.creation_status)===C.CREATION_STATUS.PROCCESS||(null==s?void 0:s.creation_status)===C.CREATION_STATUS.FAILED,[s]),I=(null==r?void 0:null===(t=r.avatar)||void 0===t?void 0:t.image)||"/static/assets/default_ava.svg",E=(0,o.useMemo)(()=>{var e,t,n,l,s,o,c,d,u;return{fullname:"".concat((null==r?void 0:null===(e=r.profile)||void 0===e?void 0:e.full_name)||(null==r?void 0:null===(t=r.profile)||void 0===t?void 0:t.first_name)+(null==r?void 0:null===(n=r.profile)||void 0===n?void 0:n.last_name)||""),balance:!Z&&(null==i?void 0:i.balance)?"".concat(null==i?void 0:null===(l=i.currency)||void 0===l?void 0:l.symbol).concat(null==i?void 0:i.balance):(0,a.jsx)(K.Z,{}),equity:!Z&&(null==i?void 0:i.equity)?"".concat(null==i?void 0:null===(s=i.currency)||void 0===s?void 0:s.symbol).concat(null==i?void 0:i.equity):(0,a.jsx)(K.Z,{}),margin:(null==i?void 0:i.margin)?"".concat(null==i?void 0:null===(o=i.currency)||void 0===o?void 0:o.symbol).concat(null==i?void 0:i.margin):(0,a.jsx)(K.Z,{}),free_margin:(null==i?void 0:i.free_margin)?"".concat(null==i?void 0:null===(c=i.currency)||void 0===c?void 0:c.symbol).concat(null==i?void 0:i.free_margin):(0,a.jsx)(K.Z,{}),margin_level:(null==i?void 0:i.margin_level)?"".concat(null==i?void 0:null===(d=i.currency)||void 0===d?void 0:d.symbol).concat(null==i?void 0:i.margin_level):(0,a.jsx)(K.Z,{}),credits:(null==i?void 0:i.credits)?"".concat(null==i?void 0:null===(u=i.currency)||void 0===u?void 0:u.symbol).concat(null==i?void 0:i.credits):(0,a.jsx)(K.Z,{}),empty:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(0===e)return t||eo.emptyText}}},[r,s,d,eo.emptyText,i]),openDemoBalanceModal=async()=>{var e;let t=el()(()=>n.e(4541).then(n.bind(n,57815)),{loadableGenerated:{webpack:()=>[57815]}});m((0,es.ri)({renderContent:(0,a.jsx)(t,{account_number:s.account,currency_id:null===(e=s.currency)||void 0===e?void 0:e.id})}))},checkingMaintenance=async e=>{var t,n,a;let{startLoading:l,serviceKey:i,stopLoading:s,path:o}=e;l();let r=await (0,O.getMaintenance)(),c=(null==r?void 0:null===(a=r.data)||void 0===a?void 0:null===(n=a.data)||void 0===n?void 0:null===(t=n.find(e=>e.service===i))||void 0===t?void 0:t.is_maintenance)||!1;return(s(),c)?(0,h.h)({icon:er,title:d("common:maintenance.modal_title"),description:d("common:maintenance.modal_desc"),actions:[{label:d("common:general.understand"),onClick:()=>(0,h.M)()}]}):u.push(o)},handleClickDeposit=async()=>{let e=A.ZE.deposit.link;return checkingMaintenance({startLoading:b,serviceKey:M.OJ.DEPOSIT,stopLoading:y,path:e})},handleClickWithdraw=async()=>{let e=A.ZE.withdraw.link;return checkingMaintenance({startLoading:w,serviceKey:M.OJ.WITHDRAWAL,stopLoading:N,path:e})},handleClickTransfer=async()=>{let e=A.ZE.transfer.home.link;return checkingMaintenance({startLoading:_,serviceKey:M.OJ.TRANSFER,stopLoading:S,path:e})},R=(0,o.useMemo)(()=>T?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(g.Z,{onClick:openDemoBalanceModal,btnMode:"outline-green",className:eo.btnDeposit,label:d("general.change_demo_balance")})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.Z,{renderLeft:()=>(0,a.jsx)(x.Z,{src:"/static/assets/ico_Deposit_Line.svg",className:eo.btnImg,alt:"dep"}),className:eo.btnDeposit,label:d("general.deposit"),onClick:handleClickDeposit,id:"more-deposit-btn"}),(0,a.jsxs)("div",{className:eo.btnRow,children:[(0,a.jsx)(g.Z,{renderLeft:()=>(0,a.jsx)(x.Z,{src:"/static/assets/ico_Withdraw_Line.svg",className:eo.btnImg,alt:"dep"}),className:"".concat(eo.mr),label:d("general.withdraw"),btnMode:"outline-green",onClick:handleClickWithdraw,id:"more-withdraw-btn"}),(0,a.jsx)(g.Z,{renderLeft:()=>(0,a.jsx)(x.Z,{src:"/static/assets/ico_Overbook_Line.svg",className:eo.btnImg,alt:"dep"}),label:d("general.overbook"),btnMode:"outline-green",className:"w-full",onClick:handleClickTransfer,id:"more-transfer-btn"})]})]}),[T,d,v,j,k]);return(0,a.jsxs)("div",{className:eo.root,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("div",{className:"relative w-16 h-16 cursor-pointer",onClick:B.KF,children:[(0,a.jsx)(f(),{width:500,height:500,src:I,className:"w-14 h-14 rounded-full",alt:"profile-picture"}),(0,a.jsx)(x.Z,{src:"/static/assets/camera.svg",className:"w-6 h-6 bottom-1.5 right-1.5 absolute"})]}),(0,a.jsx)("p",{className:"font-bold text-white text-[16px] max-w-[180px] break-words",children:null==E?void 0:E.fullname})]}),(0,a.jsxs)("div",{className:eo.balanceHeaderContainer,children:[(0,a.jsxs)("div",{className:"".concat(eo.item," ").concat(eo.border),children:[(0,a.jsx)(x.Z,{src:"/static/assets/balance.svg",className:eo.itemImg}),(0,a.jsxs)("div",{className:eo.itemCol,children:[(0,a.jsx)("p",{className:eo.itemTitle,children:d("general.balance")}),(0,a.jsx)("div",{id:"sidebar-amount-balance",className:(0,p.cn)(eo.itemText,E.empty((null==i?void 0:i.balance)||(null==s?void 0:s.balance))),children:E.balance})]})]}),(0,a.jsxs)("div",{className:eo.item,children:[(0,a.jsx)(x.Z,{src:"/static/assets/equity.svg",className:eo.itemImg}),(0,a.jsxs)("div",{className:eo.itemCol,children:[(0,a.jsx)("p",{className:eo.itemTitle,children:d("general.equity")}),(0,a.jsx)("div",{id:"sidebar-amount-equity",className:(0,p.cn)(eo.itemText,E.empty((null==i?void 0:i.equity)||s.last_equity)),children:E.equity})]})]})]}),R]})};DashboardUserInformation.propTypes={accountData:v().object,selectedAccount:v().object,profile:v().object};var ec=n(58137),ed=n(57843);let useMetaBalanceEquity=async e=>{let metaBalanceEquity=async e=>{var t,a,l,i,s;let o=await n.e(1926).then(n.bind(n,51926));try{let n=await (0,ed.Is)({account:null==e?void 0:e.account}),s={selectedAccount:{...e,floating_profit_loss:null==n?void 0:null===(t=n.data)||void 0===t?void 0:t.floating_profit_loss,win_trades:null==n?void 0:null===(a=n.data)||void 0===a?void 0:a.win_trades,balance:null==n?void 0:null===(l=n.data)||void 0===l?void 0:l.balance,equity:null==n?void 0:null===(i=n.data)||void 0===i?void 0:i.equity}};(0,ec.WI)((0,J.gZ)(s))}catch(e){o.openToast({content:null==e?void 0:null===(s=e.data)||void 0===s?void 0:s.message,toastType:"failed"})}};(0,o.useEffect)(()=>{metaBalanceEquity(e)},[])};var eu=n(32839),em=n(17121),ev=n(25472),eh=n(48709);let SummaryInfo=e=>{let{label:t,value:n,lastItem:l,render:i,renderValue:s}=e;return i||(0,a.jsxs)("div",{className:"flex justify-between w-26",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[10px] w-20",children:t}),s||(0,a.jsx)("div",{className:"text-titleColor text-[12px] pr-2",children:n})]}),l?null:(0,a.jsx)("div",{className:"mr-4 border-r-[1px] border-divider h-8"})]},t)},DashboardUserAccountSummary=e=>{var t,n,l,i,s,r;let{accountData:c,selectedAccount:d}=e,{t:u}=(0,L.$G)(),m=(0,o.useMemo)(()=>(null==d?void 0:d.creation_status)===C.CREATION_STATUS.PROCCESS||(null==d?void 0:d.creation_status)===C.CREATION_STATUS.FAILED,[d]),v=(0,o.useMemo)(()=>{if(null==d?void 0:d.floating_profit_loss){let e=parseFloat(null==d?void 0:d.floating_profit_loss).toFixed(2),t=0>parseFloat(null==d?void 0:d.floating_profit_loss);return{displayedPL:e,isNegative:t}}return{displayedPL:"0",isNegative:!1}},[null==d?void 0:d.floating_profit_loss]),h=[{label:u("account_summary.margin"),value:!m&&(null==c?void 0:c.margin)?"".concat(null==c?void 0:null===(t=c.currency)||void 0===t?void 0:t.symbol).concat(null==c?void 0:c.margin):(0,a.jsx)(K.Z,{className:"h-3"})},{label:u("account_summary.free_margin"),value:!m&&(null==c?void 0:c.free_margin)?"".concat(null==c?void 0:null===(n=c.currency)||void 0===n?void 0:n.symbol).concat(null==c?void 0:c.free_margin):(0,a.jsx)(K.Z,{className:"h-3"})},{label:u("account_summary.margin_level"),value:!m&&(null==c?void 0:c.margin_level)?"".concat(null==c?void 0:c.margin_level,"%"):(0,a.jsx)(K.Z,{className:"h-3"})},{label:u("account_summary.credit"),value:!m&&(null==c?void 0:c.credits)?"".concat(null==c?void 0:null===(l=c.currency)||void 0===l?void 0:l.symbol).concat(null==c?void 0:c.credits):(0,a.jsx)(K.Z,{className:"h-3"})},{label:u("account_summary.floating_pl"),renderValue:!m&&(null==c?void 0:c.margin)?(0,a.jsx)("p",{className:(0,p.cn)("text-lightBlue font-bold",v.isNegative?"text-basicRed":""),children:"".concat(null==c?void 0:null===(i=c.currency)||void 0===i?void 0:i.symbol).concat(v.displayedPL||0)}):(0,a.jsx)("div",{className:"pr-2",children:(0,a.jsx)(K.Z,{className:"h-3 mr-2"})})},{label:u("account_summary.win_trades"),render:(0,a.jsx)("div",{className:"flex justify-between w-26",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-[10px]",children:[u("account_summary.win_trades")," ",(0,a.jsx)("span",{className:"text-lightBlue",children:!m&&(null==c?void 0:c.margin)?"".concat((null==d?void 0:d.win_trades)||0,"%"):"--"})]}),!m&&(null==c?void 0:c.margin)?(0,a.jsx)(eh.f,{className:"mt-[3.2px]",value:(null==d?void 0:d.win_trades)||0}):(0,a.jsx)(K.Z,{className:"h-3"})]})},"win-trades")}];return(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsx)("p",{className:"font-bold text-titleColor",children:u("dashboard_user.account_summary")}),(0,a.jsx)("div",{className:"w-full flex-start flex mt-4",children:null===(s=h.slice(0,3))||void 0===s?void 0:s.map((e,t)=>(0,a.jsx)(SummaryInfo,{label:e.label,value:e.value,lastItem:2===t,renderValue:e.renderValue,render:e.render},e.label))}),(0,a.jsx)("div",{className:"border-b-[1px] border-divider w-full my-3"}),(0,a.jsx)("div",{className:"w-full flex-start flex mt-4",children:null===(r=h.slice(3,6))||void 0===r?void 0:r.map((e,t)=>(0,a.jsx)(SummaryInfo,{label:e.label,value:e.value,lastItem:t===(null==h?void 0:h.length),renderValue:e.renderValue,render:e.render},e.label))})]})};DashboardUserAccountSummary.propTypes={accountData:v().object,selectedAccount:v().object},SummaryInfo.propTypes={label:v().string,value:v().string,lastItem:v().bool,render:v().object,renderValue:v().object};let ep={root:(0,p.cn)("rounded-tl-3xl w-[360px] bg-[#121A21] hidden overflow-hidden p-[30px] pr-0 h-full","md:block")};var dashboard_user=function(){let{t:e}=(0,L.$G)(),{mainMenu:t,programsMenu:n}=(0,eu.r)(),{ws:i,resolveState:s}=(0,em.ux)(),o=(0,em.iP)(i,s),r=(0,c.v9)(e=>{var t,n;return null===(n=e.authState)||void 0===n?void 0:null===(t=n.accountSelection)||void 0===t?void 0:t.selectedAccount}),d=(0,c.v9)(e=>{var t;return null===(t=e.authState)||void 0===t?void 0:t.fullProfile});useMetaBalanceEquity(r);let{urlWeb:u}=(0,$.Y)(window.location.hostname),m=(0,l.useRouter)();return(0,a.jsxs)("div",{className:ep.root,children:[(0,a.jsxs)("div",{className:"mr-[30px]",children:[(0,a.jsx)(DashboardUserInformation,{accountData:o,selectedAccount:r,profile:d}),(0,a.jsx)(DashboardUserAccountSummary,{accountData:o,selectedAccount:r}),(0,a.jsx)(ev.Q,{})]}),(0,a.jsx)("h1",{className:"text-[16px] font-bold text-titleColor",children:e("dashboard_user.program")}),null==n?void 0:n.map(e=>{var t,n,l;return(0,a.jsxs)(S(),{href:e.url,className:(0,p.cn)("flex items-center my-2 p-4",(null===(t=m.pathname)||void 0===t?void 0:t.includes(e.url))&&"btnBlack rounded-l-lg"),children:[(0,a.jsx)(x.Z,{src:(null===(n=m.pathname)||void 0===n?void 0:n.includes(e.url))?e.activeIcon:e.icon,alt:e.label,className:"w-6 h-6"}),(0,a.jsx)("p",{className:(0,p.cn)("text-[14px] font-bold ml-4",(null===(l=m.pathname)||void 0===l?void 0:l.includes(e.url))?"text-basicGreen":"text-titleColor"),children:e.label})]},e.label)}),(0,a.jsx)("div",{className:"mr-[30px]",children:(0,a.jsx)(ev.Q,{})}),null==t?void 0:t.map(e=>{var t;let n=null===(t=m.pathname)||void 0===t?void 0:t.includes(e.url),l=(0,p.cn)("flex items-center my-2 p-4",n&&"btnBlack rounded-l-lg"),i=(0,p.cn)("text-[14px] font-bold ml-4",n?"text-basicGreen":"text-titleColor"),s=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.Z,{src:n?e.activeIcon:e.icon,alt:e.label,className:"w-6 h-6"}),(0,a.jsx)("p",{className:i,children:e.label})]});return e.onClick?(0,a.jsx)("div",{className:(0,p.cn)(l,"cursor-pointer"),onClick:()=>{let t=e.onClick();t&&m.push(e.url)},children:s},e.label):(0,a.jsx)(S(),{href:e.url,className:l,children:s},e.label)}),(0,a.jsx)("div",{className:"mr-[30px]",children:(0,a.jsx)(ev.Q,{})}),(0,a.jsxs)("div",{className:"mr-[30px]",children:[(0,a.jsx)("h1",{className:"text-[16px] font-bold text-titleColor",children:e("dashboard_user.help")}),(0,a.jsxs)(S(),{className:"flex items-center mt-4",href:"".concat(u.supportCenter,"/").concat((0,D.mC)(m.locale)),target:"_blank",rel:"noopener noreferrer",children:[(0,a.jsx)(x.Z,{src:"/static/assets/menu-icon/valutrades/support-center.svg",alt:"support-center-icon",className:"w-6 h-6"}),(0,a.jsxs)("div",{className:"ml-6",children:[(0,a.jsx)("p",{className:"text-titleColor text-base font-bold",children:e("dashboard_user.support_center")}),(0,a.jsx)("p",{className:"font-light",children:e("dashboard_user.find_answers")})]})]}),(0,a.jsx)(ev.Q,{}),(0,a.jsx)(g.Z,{fullWidth:!0,btnMode:"outline-green",onClick:()=>m.push(A.ZE.settings.setting.link),label:e("dashboard_user.download_activity_log")})]})]})},eg=n(28943);let ex={root:(0,p.cn)("rounded-tl-3xl w-[360px] bg-userBg overflow-hidden p-[20px] h-screen fixed z-10 pb-[220px]"),tagRow:"flex items-center overflow-y-auto",tagItem:"px-[15px] h-[30px] bg-[#21242B] flex items-center justify-center mr-[10px] rounded-[4px] cursor-pointer",tagActive:"bg-activeBtn",tagText:"text-[12px] font-medium text-subtitleColor",tagActiveText:"text-white",productListContainer:"mt-[15px] h-full pb-[30px] overflow-y-auto"};var market_box=function(){let{isMobile:e}=(0,E.Z)();return e?null:(0,a.jsx)("div",{className:ex.root,children:(0,a.jsx)(eg.Z,{})})},eb=n(86970),ef=n(87492),ey=n(37833);let ej={main:"flex flex-col justify-start bg-blue-900",container:"flex flex-1 flex-row overflow-auto rounded-tl-[12px]",corner:(0,p.cn)("h-auto "),sider:(0,p.cn)("min-h-screen bg-appBackground h-auto w-full py-5 flex overflow-hidden justify-center md:rounded-tl-2xl","lg:px-8")},DashboardContent=e=>{let{breadcrumbLinks:t,disclaimerDetailState:n}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed h-full pt-12 z-[999] bg-blue-900",children:(0,a.jsx)(q,{})}),(0,a.jsxs)("div",{className:"fixed w-full z-[999]",children:[(0,a.jsx)(F,{disclaimerState:n}),(0,a.jsx)(en,{breadcrumbLinks:null==t?void 0:t.mobile})]})]})},SideDashboardUser=e=>{let{withSidebarUser:t,withMarketBox:n,headerHeight:l}=e;return(0,a.jsxs)(y.Z,{sx:{[ey.$.breakpoints.up("md")]:{marginLeft:"".concat(ef.jy.DESKTOP_HEIGHT,"px"),marginTop:"".concat(l,"px")}},className:ej.corner,children:[t&&(0,a.jsx)(dashboard_user,{}),n&&(0,a.jsx)(market_box,{})]})},MainContent=e=>{var t,n;let{headerHeight:l,noPadding:i,children:s,breadcrumbLinks:o,withMarketBox:r,className:c,cleanPage:d,disclaimerState:u}=e,[m]=u,{isMobile:v}=(0,E.Z)();return(0,a.jsx)(y.Z,{sx:{marginTop:d||v?"0px":"".concat(l,"px"),paddingTop:v?"".concat(l+(m?80:0),"px"):"20px",[ey.$.breakpoints.down("xl")]:i?{}:{paddingLeft:"16px",paddingRight:"16px",paddingBottom:"80px"}},className:(0,p.cn)(ej.sider,i&&"py-0",r?"md:ml-[360px]":"",c),children:(0,a.jsxs)("div",{className:"w-full max-w-[1400px]",children:[(0,a.jsx)(j.aG,{breadcrumbLinks:null==o?void 0:null===(t=o.desktop)||void 0===t?void 0:t.links,breadcrumbIcon:null==o?void 0:null===(n=o.desktop)||void 0===n?void 0:n.icon}),s]})})};function DashboardLayout(e){let t=function(){let e=(0,l.useRouter)(),{pathname:t}=e;return"/login"!==t?ef.yf.DESKTOP_HEIGHT:ef.yf.DESKTOP_HEIGHT+ef.yf.DISCLAIMER_HEIGHT}(),n=(0,o.useState)(!1),i=(0,em.sV)(e.withMarketTick);return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("main",{className:ej.main,children:(0,a.jsx)("div",{className:"".concat(ej.container),children:(0,a.jsxs)(eb.J.Provider,{value:{ws:i},children:[(null==e?void 0:e.cleanPage)?null:(0,a.jsx)(DashboardContent,{disclaimerDetailState:n,breadcrumbLinks:e.breadcrumbLinks}),(null==e?void 0:e.cleanPage)?null:(0,a.jsx)(SideDashboardUser,{headerHeight:t,withSidebarUser:e.withSidebarUser,withMarketBox:e.withMarketBox}),(0,a.jsx)(MainContent,{headerHeight:(null==e?void 0:e.cleanPage)?null:t,disclaimerState:n,noPadding:null==e?void 0:e.noPadding,children:null==e?void 0:e.children,breadcrumbLinks:(null==e?void 0:e.breadcrumbLinks)||[],className:(null==e?void 0:e.withSidebarUser)||(null==e?void 0:e.withMarketBox)?"md:rounded-none":"",withMarketBox:e.withMarketBox,cleanPage:null==e?void 0:e.cleanPage})]})})})})}DashboardContent.propTypes={refs:v().object,breadcrumbLinks:v().object,disclaimerDetailState:v().bool},SideDashboardUser.propTypes={withSidebarUser:v().bool,withMarketBox:v().bool,headerHeight:v().oneOfType([v().string,v().number])},MainContent.propTypes={children:v().node,breadcrumbLinks:v().object,ws:v().any,headerHeight:v().oneOfType([v().string,v().number]),noPadding:v().bool,withMarketBox:v().bool,className:v().string,cleanPage:v().bool,disclaimerState:v().bool},DashboardLayout.propTypes={children:v().node,breadcrumbLinks:v().object,withSidebarUser:v().bool,withMarketBox:v().bool,withMarketTick:v().bool,noPadding:v().bool,cleanPage:v().bool};let slugToTitleCase=e=>{let t=e.split("-");for(let e=0;e<(null==t?void 0:t.length);e++){let n=t[e];t[e]=n.charAt(0).toUpperCase()+n.slice(1)}return t.join(" ")},getBreadcrumbLinks=e=>{let{currentBreadcrumbLinks:t,query:n}=e,{queryName:a}=t,l=slugToTitleCase(n[a]);if(t.desktop){var i;let e=t.desktop.links[(null===(i=t.desktop.links)||void 0===i?void 0:i.length)-1];e&&(e.name=l)}return t},Template=(e,t)=>{var i;let d=(0,l.useRouter)(),{query:u}=d,m=(0,c.I0)(),v=(0,c.v9)(e=>e.settings),h=(0,c.v9)(e=>{var t;return null==e?void 0:null===(t=e.authState.accountSelection.selectedAccount)||void 0===t?void 0:t.account}),p=(0,c.v9)(e=>null==e?void 0:e.authState.fullProfile.uuid),{t:g}=(0,r.$G)();(0,o.useEffect)(()=>{let handleInitial=async()=>{var e,a;if((null==v?void 0:null===(e=v.listLanguages)||void 0===e?void 0:e.length)===0||(null==v?void 0:null===(a=v.accountTypeList)||void 0===a?void 0:a.length)===0){let e=[Promise.resolve().then(n.bind(n,17547)),Promise.resolve().then(n.bind(n,73139))],[t,a]=await Promise.all(e),l=[t.getLanguageList({types:"client_area"}),t.getAccountType()],[i,s]=await Promise.all(l);m(a.dspSetListLanguages(i.data)),m(a.dspSetAccountTypeList(s.data))}(null==t?void 0:t.isEmptyToken)&&(0,B.FZ)()};handleInitial()},[]);let x=(null==e?void 0:null===(i=e.breadcrumbLinks)||void 0===i?void 0:i.usingDynamicRoutes)?getBreadcrumbLinks({currentBreadcrumbLinks:null==e?void 0:e.breadcrumbLinks,query:u}):null==e?void 0:e.breadcrumbLinks;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(DefaultMeta,{title:g("meta.default.title",{ns:"common"}),description:g("meta.default.description",{ns:"common"})}),(0,a.jsx)(s(),{id:"gtmScript","data-ue-trid":p,"data-no-account":h}),(0,a.jsx)(GTMElements,{}),(0,a.jsxs)(e=>{let{children:t,...n}=e;return a.Fragment,"/"!==d.pathname?(0,a.jsx)(DashboardLayout,{...n,children:t}):(0,a.jsx)(BaseLayout,{...n,children:t})},{breadcrumbLinks:x||{},withSidebarUser:null==e?void 0:e.withSidebarUser,withMarketBox:e.withMarketBox,withMarketTick:e.withMarketTick,noPadding:null==e?void 0:e.noPadding,cleanPage:(null==e?void 0:e.cleanPage)||(null==t?void 0:t.isMobileApp),children:[(0,a.jsx)(e,{...t}),(0,a.jsx)(GlobalModal,{}),(0,a.jsx)(GlobalToast,{})]})]})};var hooks_WithLayout=e=>t=>Template(e,t)},96772:function(e,t,n){n.d(t,{U:function(){return useProfile},n:function(){return useIsLoggedIn}});var a=n(9473);function useIsLoggedIn(){let e=(0,a.v9)(e=>e.authState.isLoggedIn);return e}function useProfile(){let e=(0,a.v9)(e=>e.authState.fullProfile);return e}},36747:function(e,t,n){n.d(t,{Y:function(){return useGetDomain}});var a=n(11163),l=n(67294),i=n(78047),s=n(91386);let useGetDomain=e=>{let{locale:t}=(0,a.useRouter)(),n="".concat("wss://api.valu-sh.io","/websocket:443/app/").concat("m2-production"),o="".concat("wss://api.").concat((0,s.p7)(e),"/websocket:443/app/").concat("m2-production"),r=(0,i.OQ)(e)?"https://www.valu-sh.io":"https://www."+(0,s.p7)(e),c=(0,i.OQ)(e)?"https://api.valu-sh.io":"https://api."+(0,s.p7)(e),d=(0,i.OQ)(e)?n:o,[u]=(0,l.useState)({home:r,accountType:r+"/".concat(t,"/product/account-types"),fundSafetyAndRegulation:r+"/".concat(t,"/product/fund-safety-and-regulation"),contractSpecification:r+"/".concat(t,"/product/contract-specification"),calendar:r+"/".concat(t,"/product/calendar"),tradingTools:r+"/".concat(t,"/product/trading-tools"),fundingMethod:r+"/".concat(t,"/product/funding-method"),blog:r+"/".concat(t,"/product/blog"),download:r+"/".concat(t,"/download"),aboutUs:r+"/".concat(t,"/about-us"),maintenance:r+"/".concat(t,"/maintenance"),affiliate:r+"/".concat(t,"/affiliate"),404:r+"/".concat(t,"/404"),429:r+"/".concat(t,"/429"),500:r+"/".concat(t,"/500"),supportCenter:"https://valutrades.zendesk.com/hc"});return{urlWeb:u,apiDomain:c,wssDomain:d}}},55975:function(e,t,n){var a=n(67294);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],[t,n]=(0,a.useState)(e);return{isLoading:t,startLoading:()=>{n(!0)},stopLoading:()=>{n(!1)}}}},32839:function(e,t,n){n.d(t,{r:function(){return usePageAccess}});var a=n(85893),l=n(11163),i=n(28677),s=n(67294),o=n(9473),r=n(18506),c=n(34055),d=n(10953),u=n(85703),m=n(96442),v=n(58137),h=n(72104),p=n(8323);function usePageAccess(){let e=(0,l.useRouter)(),{t}=(0,i.$G)(),n=(0,o.v9)(e=>e.authState.accountList),g=(0,o.v9)(e=>e.authState.accountSelection.selectedAccount),x=null==n?void 0:n.filter(e=>"live"===e.badge_label),b=(null==x?void 0:x.length)===0&&(null==g?void 0:g.badge_label)!=="live",[f,y]=(0,s.useState)([{icon:"/static/assets/menu-icon/valutrades/profile.svg",activeIcon:"/static/assets/menu-icon/valutrades/active/profile.svg",label:t("dashboard_user.profile"),url:h.ZE.profile.link},{icon:"/static/assets/menu-icon/valutrades/my-account.svg",activeIcon:"/static/assets/menu-icon/valutrades/active/my-account.svg",label:t("dashboard_user.my_account"),url:h.ZE.myAccount.link},{icon:"/static/assets/menu-icon/valutrades/bank-info.svg",activeIcon:"/static/assets/menu-icon/valutrades/active/bank-info.svg",label:t("dashboard_user.bank_info"),url:h.ZE.bankInformation.bankInfo.link,onClick:()=>!b||((0,v.WI)((0,m.ri)({renderContent:(0,a.jsx)(r.j,{title:t("modal_cla.bank_information.title"),desc:t("modal_cla.bank_information.desc"),onClickBack:()=>(0,v.WI)((0,m.HX)())})})),!1)},{icon:"/static/assets/menu-icon/valutrades/settings.svg",activeIcon:"/static/assets/menu-icon/valutrades/active/settings.svg",label:t("dashboard_user.settings"),url:h.ZE.settings.setting.link},{icon:"/static/assets/menu-icon/valutrades/download.svg",activeIcon:"/static/assets/menu-icon/valutrades/active/download.svg",label:t("dashboard_user.download"),url:h.ZE.download.link},{icon:"/static/assets/menu-icon/valutrades/change-password.svg",activeIcon:"/static/assets/menu-icon/valutrades/active/change-password.svg",label:t("dashboard_user.change_password"),url:h.ZE.changePassword.link}]),j=[{icon:"/static/assets/menu-icon/valutrades/affiliate.svg",activeIcon:"/static/assets/menu-icon/valutrades/active/affiliate.svg",label:t("dashboard_user.affiliate"),url:h.ZE.affiliate.link}],w=[{icon:"/static/assets/menu-icon/valutrades/support-center.svg",activeIcon:"/static/assets/menu-icon/valutrades/active/support-center.svg",label:t("dashboard_user.support_center"),subLabel:t("dashboard_user.find_answers"),url:c.url.supportCenter}];return(0,s.useLayoutEffect)(()=>{let initialize=async()=>{let n=await (0,p.Ai)();(0,v.WI)((0,u.YK)(n.data)),function(n){var a;let l=null==n?void 0:n.permissions,i=[];if(!Array.isArray(l))return;if((null===(a=e.pathname)||void 0===a?void 0:a.includes(h.ZE.paymentAgent.link))&&!(null==l?void 0:l.includes(d.iR.paymentAgent)))return e.push({pathname:h.ZE.myAccount.link});if(null==l?void 0:l.includes(d.iR.paymentAgent)){let e={icon:"/static/assets/menu-icon/valutrades/payment-agent.svg",activeIcon:"/static/assets/menu-icon/valutrades/active/payment-agent.svg",label:t("dashboard_user.payment_agent"),url:h.ZE.paymentAgent.newDeposit.link};i.push(e)}let s=[...f,...i];y(s)}(null==n?void 0:n.data)};initialize()},[]),{mainMenu:f,programsMenu:j,helpMenu:w}}},23898:function(e,t,n){n.d(t,{F:function(){return useResponsive}});var a=n(67294),l=n(87492);let useResponsive=()=>{let[e,t]=(0,a.useState)(!1),[n,i]=(0,a.useState)(!1),[s,o]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{let handleResize=()=>{let e=window.innerWidth,n=window.innerHeight,a=n>e;t(e<=l.ld.sm),i(e>l.ld.sm&&e<=l.ld.md||a),o(e>l.ld.md)};return handleResize(),window.addEventListener("resize",handleResize),()=>{window.removeEventListener("resize",handleResize)}},[]),{isMobile:e,isTablet:n,isDesktop:s}};t.Z=useResponsive},17121:function(e,t,n){n.d(t,{iP:function(){return useBalanceEquitySubscriber},ux:function(){return useBalanceSocket},_M:function(){return usePriceSubscriber},sV:function(){return useSocket}});var a=n(67294),l=n(9473);n(78047);let i={connectionEstablished:"pusher:connection_established",subscribe:"pusher:subscribe"},s={pricetick:"private-pricetick",balancequity:"private-balance-and-equity",creationStatus:"private-account-creation",verifyEmail:"private-client.registration.verification-email"},createChannel=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(e){case s.pricetick:return"".concat(s.pricetick,".").concat(t.metaserver).concat(t.hash?".".concat(t.hash):"");case s.balancequity:return"".concat(s.balancequity,".").concat(null==t?void 0:t.account);case s.creationStatus:return"".concat(s.creationStatus,".").concat(null==t?void 0:t.clientId);case s.verifyEmail:return"".concat(s.verifyEmail,".").concat(null==t?void 0:t.clientId);default:return null}};var o=n(7551),r=n(36747);let useBalanceSocket=()=>{let e=(0,a.useRef)(null),[t,n]=(0,a.useState)(!1),c=(0,l.v9)(e=>e.authState),{wssDomain:d="/"}=(0,r.Y)(window.location.hostname);return((0,a.useEffect)(()=>{if(c.accountSelection.selectedAccount.account)return t||(e.current=new WebSocket(d),e.current.addEventListener("open",()=>{}),e.current.addEventListener("message",t=>{let a=JSON.parse(t.data||"{}");if(a.event){if(a.event!==i.connectionEstablished)return;{let t=JSON.parse(a.data),l=createChannel(s.balancequity,{account:c.accountSelection.selectedAccount.account}),r={socket_id:t.socket_id,channel_name:l};(0,o.BE)(r).then(t=>{let a={event:i.subscribe,data:{auth:t.auth,channel:l}};e.current.send(JSON.stringify(a)),n(!0)})}}})),()=>{e.current&&e.current.close()}},[]),e.current)?{ws:e.current,resolveState:t}:{ws:null,resolveState:!1}},useSocket=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{wssDomain:t="/"}=(0,r.Y)(window.location.hostname),n=(0,a.useRef)(null),c=(0,l.v9)(e=>e.authState);return((0,a.useEffect)(()=>{if(e)return n.current=new WebSocket(t),n.current.addEventListener("open",()=>{}),n.current.addEventListener("message",e=>{let t=JSON.parse(e.data||"{}");if(t.event){if(t.event!==i.connectionEstablished)return;{let e=JSON.parse(t.data),a=createChannel(s.pricetick,{metaserver:c.accountSelection.selectedAccount.meta_server}),l={socket_id:e.socket_id,channel_name:a};(0,o.BE)(l).then(e=>{let t={event:i.subscribe,data:{auth:e.auth,channel:a}};n.current.send(JSON.stringify(t))})}}}),()=>{n.current&&n.current.close()}},[]),n.current)?n.current:null},usePriceSubscriber=(e,t)=>{let[n,l]=(0,a.useState)({});return(0,a.useEffect)(()=>{let handler=e=>{let n=JSON.parse(e.data||"{}");if(n.event){var a;if(null===(a=n.event)||void 0===a?void 0:a.includes("PricetickSymbol-".concat(t))){let e=JSON.parse(n.data);l(e);return}}};return e&&e.addEventListener("message",handler),()=>{e&&e.removeEventListener("message",handler)}},[e]),n},useBalanceEquitySubscriber=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],[n,l]=(0,a.useState)({});return(0,a.useEffect)(()=>{let handler=e=>{let t=JSON.parse(e.data||"{}");if(t.event){var n;if(null===(n=t.event)||void 0===n?void 0:n.includes("BalanceAndEquity")){let e=JSON.parse(t.data);l(e);return}}};return e&&t&&e.addEventListener("message",handler),()=>{e&&e.removeEventListener("message",handler)}},[e,t]),n}},78047:function(e,t,n){n.d(t,{OQ:function(){return isLocalNetwork}}),n(2890),n(34055),n(64050),n(91386),n(27240),new RegExp(/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/);let a=/((http([s]){0,1}:\/\/){0,1}(localhost|127.0.0.1){1}(([:]){0,1}[\0-9]{4}){0,1}\/{0,1}){1}/;function isLocalNetwork(e){return a.test(e)}},49753:function(e,t,n){n.d(t,{i:function(){return addActivityLog}});var a=n(20483),l=n(58137);function addActivityLog(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,l.WI)((0,a.o)(e))}},77938:function(e,t,n){n.d(t,{n:function(){return detectDeviceFromUserAgent}});let detectDeviceFromUserAgent=e=>{let t=e.toLowerCase(),n=!!(null==e?void 0:e.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i)),a=/ip(ad|hone|od)/.test(t),l=/android/.test(t),i=/safari/.test(t),s=/chrome/.test(t),o=l&&/; wv\)/.test(t)||a&&!i&&!s;return{isMobile:n,isIOS:a,isAndroid:l,isWebview:o,isSafari:i}}},54658:function(e,t,n){n.d(t,{M:function(){return closeModal},h:function(){return openModal}});var a=n(64659),l=n(58137);function openModal(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l.h.dispatch((0,a.p1)({isOpen:!0,...e}))}function closeModal(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;l.h.dispatch((0,a.r4)()),setTimeout(()=>{l.h.dispatch((0,a.KN)())},e)}},7551:function(e,t,n){n.d(t,{BE:function(){return openSocketConnection},Ey:function(){return getBanners},MD:function(){return submitFavorite},RO:function(){return getTradingSignalsSymbol},aj:function(){return getSignals}});var a=n(85e3),l=n(31938),i=n(91386);let getSignals=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,a.DX)(e),s=(0,i.rS)(e);return(0,l.Z)({baseURL:s,url:"/api/v1/meta/client/product/trading-signal/list",method:"GET",params:t,headers:n})},openSocketConnection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.Z)({baseURL:"/api",url:"/api/v1/notification/external/socket/broadcasting/auth",method:"POST",data:e})},getTradingSignalsSymbol=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,l.Z)({baseURL:"/api",url:"/api/v1/meta/client/product/trading-signal/".concat(e,"/detail"),method:"GET",params:t})},submitFavorite=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.Z)({baseURL:"/api",url:"/api/v1/product/client/product-symbol/favorite",method:"POST",data:e})},getBanners=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,a.DX)(e),s=(0,i.rS)(e);return(0,l.Z)({baseURL:s,url:"/api/v1/banner/client/banner/list",method:"GET",params:t,headers:n})}},19617:function(e,t,n){n.d(t,{Jq:function(){return getNotificationList},ZR:function(){return storeTokenNotification},iG:function(){return readNotification},qw:function(){return readAllNotification},uy:function(){return getNotificationDetail}});var a=n(31938);let getNotificationList=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"/api/v1/notification/general/notification",method:"GET",params:e})},readNotification=e=>(0,a.Z)({baseURL:"/api",url:"/api/v1/notification/general/notification/".concat(e,"/read"),method:"POST"}),readAllNotification=()=>(0,a.Z)({baseURL:"/api",url:"/api/v1/notification/general/notification/read-all",method:"POST"}),storeTokenNotification=e=>(0,a.Z)({baseURL:"/api",url:"/api/v1/notification/general/notification",method:"POST",data:{token:e,application:"web"}}),getNotificationDetail=e=>(0,a.Z)({baseURL:"/api",url:"/api/v1/notification/general/notification/".concat(e),method:"GET"})},17547:function(e,t,n){n.r(t),n.d(t,{getAccountCurrency:function(){return getAccountCurrency},getAccountMeta:function(){return getAccountMeta},getAccountType:function(){return getAccountType},getCity:function(){return getCity},getCountry:function(){return getCountry},getCurrencyByCode:function(){return getCurrencyByCode},getIdentity:function(){return getIdentity},getIdentityMultiple:function(){return getIdentityMultiple},getLanguageList:function(){return getLanguageList},getLeverage:function(){return getLeverage},getListProductSymbols:function(){return getListProductSymbols},getMaintenance:function(){return getMaintenance},getMaintenanceServer:function(){return getMaintenanceServer},getMarkup:function(){return getMarkup},getProvince:function(){return getProvince},getRegion:function(){return getRegion},getSelfieExample:function(){return getSelfieExample},setLanguage:function(){return setLanguage},toogleAllowSingleLogin:function(){return toogleAllowSingleLogin}});var a=n(31938),l=n(85e3),i=n(91386);let getRegion=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"api/v1/client/general/region",method:"GET",params:e})},getCountry=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"api/v1/client/general/country",method:"GET",params:e})},getLanguageList=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"api/v1/cms/public/language",method:"GET",params:e})},setLanguage=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"/api/v1/client/set-language",method:"POST",data:e})},getProvince=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"api/v1/client/general/province",method:"GET",params:e})},getCity=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"api/v1/client/general/city",method:"GET",params:e})},getAccountType=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"api/v1/client/general/account-type",method:"GET",params:e})},getAccountMeta=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"api/v1/client/general/account-meta",method:"GET",params:e})},getAccountCurrency=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"api/v1/client/general/currency",method:"GET",params:e})},getCurrencyByCode=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"api/v1/client/general/currency/find-by-code",method:"GET",params:e})},getMarkup=()=>(0,a.Z)({baseURL:"/api",url:"/api/v1/client/general/markup",method:"GET"}),getLeverage=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"api/v1/client/general/leverage/registration",method:"GET",params:e})},getListProductSymbols=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"/api/v1/product/client/product-symbol",method:"GET",params:e})},toogleAllowSingleLogin=e=>(0,a.Z)({baseURL:"/api",url:"/api/v1/client/multiple-login",method:"POST",data:e}),getMaintenance=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"/api/v1/client/general/maintenance",method:"GET",params:e})},getMaintenanceServer=e=>{let t=(0,l.DX)(e),n=(0,i.rS)(e);return(0,a.Z)({baseURL:n,url:"/api/v1/client/general/maintenance",method:"GET",headers:t})},getSelfieExample=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"/api/v1/client/public/registration/photo-selfie",method:"GET",params:e})},getIdentity=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"/api/v1/client/kyc-registration/identity-type",method:"GET",params:e})},getIdentityMultiple=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)({baseURL:"/api",url:"/api/v1/client/kyc/identity-type",method:"GET",params:e})}}}]);