;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="4e9eab52-4c7e-8630-a0e1-c8968e1ed49e")}catch(e){}}(); (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,43481,e=>{"use strict";let t={src:e.i(658533).default,width:49,height:49,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABE0lEQVR42gEIAff+AEdwTABZfU4Qoa9ZZ9nUXLbjyiTAuK4fhm2FPSVJcUsBAFl9TxHDxlyW++VJ9f/bI///uQb//rwA/OHBDcN4izkxAKWxW2375Un2/9cJ///RAf//rAH//6AA//+3AP7bwBG4AN/ZYb7/3SL//90g///hMf//xhH//7QA//+oAP/+ywH5AOngYcv/3Bz//+Au///vYv//2hf//8QA//+lAP//yQD+AMPGXpf+4jX9/9gO///bI///vAj//6sA//+tAP/wyAjeAHKOUi/j21zP/98q/v/UCv//rgH//6wA//bDBO2enyhnAElxTAF+llQ95t5hx//pUfz/zxH/9ssG4qSkKmpPdUgJwM2gF1uqWYIAAAAASUVORK5CYII="};e.s(["default",0,t])},533460,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(207670),r=e.i(519130),n=e.i(942196),i=e.i(535057),l=e.i(152039),o=e.i(940799),s=e.i(988088),c=e.i(747562),d=e.i(154033),u=e.i(540672),h=e.i(319727);function p(e){return(0,h.default)("PrivateSwitchBase",e)}(0,u.default)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var m=e.i(348106),y=e.i(843476);let g=(0,o.styled)(d.default,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),f=(0,o.styled)("input",{name:"MuiSwitchBase",shouldForwardProp:l.default})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),w=t.forwardRef(function(e,t){let{autoFocus:a,checked:i,checkedIcon:l,defaultChecked:o,disabled:d,disableFocusRipple:u=!1,edge:h=!1,icon:w,id:x,inputProps:b,inputRef:S,name:v,onBlur:C,onChange:k,onFocus:j,readOnly:A,required:I=!1,tabIndex:U,type:B,value:D,slots:W={},slotProps:T={},...R}=e,[$,E]=(0,s.default)({controlled:i,default:!!o,name:"SwitchBase",state:"checked"}),F=(0,c.default)(),z=d;F&&void 0===z&&(z=F.disabled);let P="checkbox"===B||"radio"===B,M={...e,checked:$,disabled:z,disableFocusRipple:u,edge:h},_=(e=>{let{classes:t,checked:a,disabled:i,edge:l}=e,o={root:["root",a&&"checked",i&&"disabled",l&&`edge${(0,n.default)(l)}`],input:["input"]};return(0,r.default)(o,p,t)})(M),N={slots:W,slotProps:{input:b,...T}},[O,L]=(0,m.default)("root",{ref:t,elementType:g,className:_.root,shouldForwardComponentProp:!0,externalForwardedProps:{...N,component:"span",...R},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),j&&j(t),F&&F.onFocus&&F.onFocus(t)},onBlur:t=>{e.onBlur?.(t),C&&C(t),F&&F.onBlur&&F.onBlur(t)}}),ownerState:M,additionalProps:{centerRipple:!0,focusRipple:!u,disabled:z,role:void 0,tabIndex:null}}),[H,K]=(0,m.default)("input",{ref:S,elementType:f,className:_.input,externalForwardedProps:N,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented||A)return;let t=e.target.checked;E(t),k&&k(e,t)})(t)}}),ownerState:M,additionalProps:{autoFocus:a,checked:i,defaultChecked:o,disabled:z,id:P?x:void 0,name:v,readOnly:A,required:I,tabIndex:U,type:B,..."checkbox"===B&&void 0===D?{}:{value:D}}});return(0,y.jsxs)(O,{...L,children:[(0,y.jsx)(H,{...K}),$?l:w]})});var x=e.i(75149),b=e.i(594425);function S(e){return(0,h.default)("MuiSwitch",e)}let v=(0,u.default)("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),C=(0,o.styled)("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:a}=e;return[t.root,a.edge&&t[`edge${(0,n.default)(a.edge)}`],t[`size${(0,n.default)(a.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${v.thumb}`]:{width:16,height:16},[`& .${v.switchBase}`]:{padding:4,[`&.${v.checked}`]:{transform:"translateX(16px)"}}}}]}),k=(0,o.styled)(w,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{let{ownerState:a}=e;return[t.switchBase,{[`& .${v.input}`]:t.input},"default"!==a.color&&t[`color${(0,n.default)(a.color)}`]]}})((0,x.default)(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${v.checked}`]:{transform:"translateX(20px)"},[`&.${v.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${v.checked} + .${v.track}`]:{opacity:.5},[`&.${v.disabled} + .${v.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${"light"===e.palette.mode?.12:.2}`},[`& .${v.input}`]:{left:"-100%",width:"300%"}})),(0,x.default)(({theme:e})=>({"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter((0,i.default)(["light"])).map(([t])=>({props:{color:t},style:{[`&.${v.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${v.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.55)}`}},[`&.${v.checked} + .${v.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),j=(0,o.styled)("span",{name:"MuiSwitch",slot:"Track"})((0,x.default)(({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${"light"===e.palette.mode?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${"light"===e.palette.mode?.38:.3}`}))),A=(0,o.styled)("span",{name:"MuiSwitch",slot:"Thumb"})((0,x.default)(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),I=t.forwardRef(function(e,t){let i=(0,b.useDefaultProps)({props:e,name:"MuiSwitch"}),{className:l,color:o="primary",edge:s=!1,size:c="medium",sx:d,slots:u={},slotProps:h={},...p}=i,g={...i,color:o,edge:s,size:c},f=(e=>{let{classes:t,edge:a,size:i,color:l,checked:o,disabled:s}=e,c={root:["root",a&&`edge${(0,n.default)(a)}`,`size${(0,n.default)(i)}`],switchBase:["switchBase",`color${(0,n.default)(l)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},d=(0,r.default)(c,S,t);return{...t,...d}})(g),w={slots:u,slotProps:h},[x,v]=(0,m.default)("root",{className:(0,a.default)(f.root,l),elementType:C,externalForwardedProps:w,ownerState:g,additionalProps:{sx:d}}),[I,U]=(0,m.default)("thumb",{className:f.thumb,elementType:A,externalForwardedProps:w,ownerState:g}),B=(0,y.jsx)(I,{...U}),[D,W]=(0,m.default)("track",{className:f.track,elementType:j,externalForwardedProps:w,ownerState:g});return(0,y.jsxs)(x,{...v,children:[(0,y.jsx)(k,{type:"checkbox",icon:B,checkedIcon:B,ref:t,ownerState:g,...p,classes:{...f,root:f.switchBase},slots:{...u.switchBase&&{root:u.switchBase},...u.input&&{input:u.input}},slotProps:{...h.switchBase&&{root:"function"==typeof h.switchBase?h.switchBase(g):h.switchBase},input:{role:"switch"},...h.input&&{input:"function"==typeof h.input?h.input(g):h.input}}}),(0,y.jsx)(D,{...W})]})});e.s(["Switch",0,I],533460)},289590,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(207670),r=e.i(519130),n=e.i(884364),i=e.i(940799),l=e.i(75149),o=e.i(594425),s=e.i(540672),c=e.i(319727);function d(e){return(0,c.default)("MuiSkeleton",e)}(0,s.default)("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);var u=e.i(843476);let h=n.keyframes` 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } `,p=n.keyframes` 0% { transform: translateX(-100%); } 50% { /* +0.5s of delay between each loop */ transform: translateX(100%); } 100% { transform: translateX(100%); } `,m="string"!=typeof h?n.css` animation: ${h} 2s ease-in-out 0.5s infinite; `:null,y="string"!=typeof p?n.css` &::after { animation: ${p} 2s linear 0.5s infinite; } `:null,g=(0,i.styled)("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:a}=e;return[t.root,t[a.variant],!1!==a.animation&&t[a.animation],a.hasChildren&&t.withChildren,a.hasChildren&&!a.width&&t.fitContent,a.hasChildren&&!a.height&&t.heightAuto]}})((0,l.default)(({theme:e})=>{let t=String(e.shape.borderRadius).match(/[\d.\-+]*\s*(.*)/)[1]||"px",a=parseFloat(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:e.alpha(e.palette.text.primary,"light"===e.palette.mode?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${a}${t}/${Math.round(a/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:e})=>e.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:e})=>e.hasChildren&&!e.width,style:{maxWidth:"fit-content"}},{props:({ownerState:e})=>e.hasChildren&&!e.height,style:{height:"auto"}},{props:{animation:"pulse"},style:m||{animation:`${h} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient( 90deg, transparent, ${(e.vars||e).palette.action.hover}, transparent )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:y||{"&::after":{animation:`${p} 2s linear 0.5s infinite`}}}]}})),f=t.forwardRef(function(e,t){let n=(0,o.useDefaultProps)({props:e,name:"MuiSkeleton"}),{animation:i="pulse",className:l,component:s="span",height:c,style:h,variant:p="text",width:m,...y}=n,f={...n,animation:i,component:s,variant:p,hasChildren:!!y.children},w=(e=>{let{classes:t,variant:a,animation:n,hasChildren:i,width:l,height:o}=e;return(0,r.default)({root:["root",a,n,i&&"withChildren",i&&!l&&"fitContent",i&&!o&&"heightAuto"]},d,t)})(f);return(0,u.jsx)(g,{as:s,ref:t,className:(0,a.default)(w.root,l),ownerState:f,...y,style:{width:m,height:c,...h}})});e.s(["Skeleton",0,f],289590)},637201,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(776552),n=e.i(234251),i=e.i(829850),l=e.i(227581),o=e.i(563745),s=e.i(421417),c=e.i(149721),d=e.i(645141),u=e.i(155487),h=e.i(618566),p=e.i(473297),m=e.i(724569),y=e.i(24185),g=e.i(733370),f=e.i(41185),w=e.i(318247),x=e.i(643174),b=e.i(42996),S=e.i(766265),v=e.i(242338),C=e.i(289590),k=e.i(866796),j=e.i(359883);let A=({lang:e,currency:r,secondaryCurrency:n,playerWalletCurrency:i,filter:l})=>{let s=i?.balance,c=l?.showSecondaryCurrency&&r!==n;return(0,t.jsx)(o.Stack,{width:1,direction:"row",sx:{gap:1},children:(0,t.jsx)(a.Suspense,{children:void 0!==s?(0,t.jsxs)(a.Fragment,{children:[(0,t.jsx)(j.default,{currency:r,size:"Small",lang:e}),(0,t.jsxs)(o.Stack,{sx:{alignItems:"flex-start",justifyContent:"center",gap:"2px"},children:[(0,t.jsx)(I,{filter:l,currency:r,playerWalletCurrency:i}),c&&n&&(0,t.jsx)(U,{lang:e,currency:r,secondaryCurrency:n,playerWalletCurrency:i})]})]}):(0,t.jsx)(a.Fragment,{children:(0,t.jsxs)(a.Fragment,{children:[(0,t.jsx)(C.Skeleton,{variant:"circular",animation:"wave",sx:{minWidth:20,my:"2px"},width:20,height:20}),(0,t.jsxs)(o.Stack,{width:1,sx:{alignItems:"flex-start",justifyContent:"center",gap:"2px"},children:[(0,t.jsx)(C.Skeleton,{variant:"rounded",animation:"wave",width:"100%",height:12}),c&&(0,t.jsx)(C.Skeleton,{variant:"rounded",animation:"wave",width:"100%",height:10})]})]})})})})},I=({currency:e,playerWalletCurrency:a,filter:r})=>{let n=r?.showInUSD?a?.inUSD:a?.balance;return(0,t.jsx)(k.Typography,{dir:"rtl",className:"wallet-select-main-amount",variant:"smallBold",sx:{lineHeight:1,textWrap:"nowrap"},children:(0,S.formatAmountWithCurrency)(n,r?.showInUSD?"USD":e,!0)})},U=({currency:e,secondaryCurrency:r,playerWalletCurrency:n})=>{let[i,l]=(0,a.useState)(null),o=async(e,t,a)=>{try{if(!t||!a)return 0;let r=await (0,v.getCurrencyIndexedDB)([t,a]);if(!r)return 0;return b.alienClient?.convertAmountByCurrencyV3({amount:e,fromCurrencyCode:t,toCurrencyCode:a,currencies:r})||0}catch{return 0}};(0,a.useEffect)(()=>{let t=async()=>{let t=n?.balance||0;l(await o(t,e,r))};t();let a=setInterval(()=>{t()},3e4);return()=>{clearInterval(a)}},[e,r,n]);let s=(0,S.formatAmountWithCurrency)("USD"===r?n?.inUSD:i||0,r);return(0,t.jsx)(k.Typography,{width:1,dir:"rtl",className:"wallet-select-sub-amount",variant:"xSmall",sx:{display:"flex",color:"text.secondary",lineHeight:1,textWrap:"nowrap"},children:null!==i?s:(0,t.jsx)(C.Skeleton,{variant:"rounded",animation:"wave",width:"100%",height:10})})};var B=e.i(533460);e.i(785269);var D=e.i(322831),W=e.i(641044),W=W,T=e.i(486989);let R=({lang:e,secondaryCurrency:r,setSecondaryCurrency:i})=>{let{t:l}=(0,D.useTranslation)(),[s,c]=(0,a.useState)(null),{secondaryCurrencies:d}=(0,m.useAppSelector)(T.getUiSlice),{playerWallet:u}=(0,m.useAppSelector)(y.getWalletSlice);if(!u)return null;let h=()=>{c(null)};return(0,t.jsxs)(a.Fragment,{children:[(0,t.jsx)(n.Button,{title:r,size:"small",variant:"contained",onClick:e=>{c(e.currentTarget)},sx:{px:1,minWidth:"auto",width:40,fontSize:10,height:32},children:r}),(0,t.jsxs)(W.default,{id:s?"simple-popover":void 0,open:!!s,anchorEl:s,onClose:h,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},sx:{".MuiPaper-root":{p:3,display:"flex",flexDirection:"column",alignItems:"center",maxWidth:336,textAlign:"center",gap:1}},children:[(0,t.jsx)(k.Typography,{variant:"small",children:l("wallet_exchange_rate_disclaimer")}),(0,t.jsx)(o.Stack,{direction:"row",sx:{alignItems:"center",justifyContent:"center",flexWrap:"wrap",gap:1},children:d?.map(a=>(0,t.jsx)(n.Button,{title:a,color:"default",size:"small",variant:"contained",onClick:()=>{a!==r&&i(a),h()},sx:{px:2,minWidth:"auto",height:28},children:(0,t.jsx)(j.default,{currency:a,lang:e,showIcon:!1,showCode:!0,size:"XSmall"})},a))})]})]})},$=({lang:e,filter:r,setFilter:n,secondaryCurrency:l,setSecondaryCurrency:s,allowedCurrenciesToPlay:c})=>{let{secondaryCurrencies:d}=(0,m.useAppSelector)(T.getUiSlice),{t:u}=(0,D.useTranslation)();return(0,t.jsxs)(a.Fragment,{children:[(0,t.jsx)(i.Divider,{flexItem:!0,sx:{opacity:.5}}),!(c?.length===1&&c?.includes("USD"))&&(0,t.jsxs)(o.Stack,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",gap:2},children:[(0,t.jsx)(k.Typography,{variant:"xSmall",children:u("show_in_usd")}),(0,t.jsx)(B.Switch,{name:"showInUSD",checked:r?.showInUSD,onChange:()=>{n({...r,showInUSD:!r?.showInUSD})}})]}),l&&(0,t.jsxs)(o.Stack,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",gap:2},children:[(0,t.jsx)(k.Typography,{variant:"xSmall",children:u("show_secondary_value")}),(0,t.jsx)(B.Switch,{name:"showSecondaryValue",checked:r?.showSecondaryCurrency,onChange:()=>{n({...r,showSecondaryCurrency:!r?.showSecondaryCurrency})}})]}),r?.showSecondaryCurrency&&l&&d&&d?.length>1&&(0,t.jsxs)(o.Stack,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between",gap:2},children:[(0,t.jsx)(k.Typography,{variant:"xSmall",children:u("secondary_currency")}),(0,t.jsx)(R,{lang:e,secondaryCurrency:l,setSecondaryCurrency:s})]})]})};var E=e.i(511458);let F=({lang:e,filter:r,activeCurrency:n,secondaryCurrency:i,currency:l,playerWalletCurrency:s})=>{let c=(0,S.externalFormatCurrency)(l),[d,u]=(0,a.useState)(0),h=r.showInUSD?s?.inUSD:s?.balance;(0,a.useEffect)(()=>{let e=async()=>{let e=s?.balance||0;if(!l||!i)return;let t=await (0,v.getCurrencyIndexedDB)([l,i]);t?u(await b.alienClient?.convertAmountByCurrencyV3({amount:e,fromCurrencyCode:l,toCurrencyCode:i||"USD",currencies:t})??0):u(0)};r?.showSecondaryCurrency&&l!==i&&e()},[s?.balance,l,i,r?.showSecondaryCurrency]);let p=n===l,m=r?.showSecondaryCurrency&&(l!==i||r.showInUSD),y=!!r.showInUSD;return(0,t.jsxs)(o.Stack,{className:"wallet-select-menu-currency-block",direction:"row",sx:{width:1,alignItems:"center",justifyContent:"space-between",gap:1,borderRadius:2},children:[(0,t.jsxs)(o.Stack,{className:"menu-currency-main-wrap",direction:"row",sx:{alignItems:"center",gap:2},children:[(0,t.jsx)(j.default,{className:"menu-currency-main-icon",lang:e,currency:l}),(0,t.jsx)(k.Typography,{className:"menu-currency-main-currency",variant:"largeBold",sx:{color:p?"text.primary":"text.secondary",lineHeight:"120%"},children:c})]}),(0,t.jsxs)(o.Stack,{className:"menu-currency-main-amount",sx:{alignItems:"flex-end",textAlign:"right",lineHeight:"120%"},children:[(0,t.jsx)(k.Typography,{dir:"rtl",variant:"largeBold",children:(0,S.formatAmountWithCurrency)(h,y?"USD":void 0,y)}),m&&i&&(0,t.jsx)(k.Typography,{dir:"rtl",className:"menu-currency-sub-amount",variant:"small",sx:{color:"text.secondary",lineHeight:"120%"},children:(0,S.formatAmountWithCurrency)("USD"===i?s?.inUSD:i===l?s?.balance:d,i)})]})]})};var z=e.i(939882),P=e.i(210557);let M=({lang:e,id:r,type:i})=>{let{t:l}=(0,D.useTranslation)(),[o,d]=(0,a.useState)(!1);(0,a.useEffect)(()=>d(!0),[]);let u="wallet_deposit",h=o?l(u):u,m=(0,P.useTheme)(),y=(0,z.useMediaQuery)(m.breakpoints.up("md"));return(0,t.jsx)(n.Button,{title:h,id:r,className:"wallet-button-open-modal gradient",variant:"contained",color:"primary",size:"small",fullWidth:!0,onClick:()=>{x.default.dispatch((0,f.setWindow)({window:p.WindowEnum.WALLET,tab:p.TabEnum.DEPOSIT}))},sx:{minWidth:"auto",width:"fit-content",...!y&&{width:32}},children:(0,t.jsx)(c.FontAwesomeIcon,{icon:s.faWallet,fontSize:16})})},_=({lang:e,id:a,extraOnClick:r,...i})=>{let{t:l}=(0,D.useTranslation)(),{web3Supported:o}=(0,m.useAppSelector)(T.getUiSlice),s=o===p.Web3Enum.MINIPAY;return(0,t.jsx)(n.Button,{id:a,title:l(s?"wallet_deposit_with_mini_pay":"deposit_and_play"),...i,onClick:()=>{x.default.dispatch((0,f.setWindow)({window:p.WindowEnum.WALLET,tab:p.TabEnum.DEPOSIT})),r&&r()},children:l(s?"wallet_deposit_with_mini_pay":"deposit_and_play")})};var N=e.i(551757),O=e.i(43481);let L=({lang:e,currency:a,amount:r,title:n,img:i})=>{let{t:l}=(0,D.useTranslation)();return(0,t.jsxs)(o.Stack,{className:"wallet-bonus-currency-block",direction:"row",sx:{width:1,alignItems:"center",justifyContent:"space-between",gap:1,borderRadius:2},children:[(0,t.jsxs)(o.Stack,{className:"menu-currency-main-wrap",direction:"row",sx:{position:"relative",alignItems:"center",gap:2},children:[(0,t.jsx)(N.CustomImg,{src:i||O.default.src,style:{width:24,height:24}}),(0,t.jsx)(k.Typography,{className:"menu-currency-main-currency",variant:"largeBold",sx:{color:"text.secondary"},children:l(n||"bonus_wallet")})]}),(0,t.jsxs)(o.Stack,{className:"menu-currency-main-amount bonus-currency",direction:"row",typography:"largeBold",sx:{alignItems:"center",gap:2,textAlign:"right",svg:{mb:"1px"}},children:[(0,S.formatAmountWithCurrency)(r,a||"USD",!0),(0,t.jsx)(c.FontAwesomeIcon,{icon:s.faLock,fontSize:14,style:{WebkitFilter:"drop-shadow(0px 0px 6px #FF6B00BF)",filter:"drop-shadow(0px 0px 6px #FF6B00BF)"}})]})]})};var H=e.i(549510),K=e.i(33986),X=e.i(888173);e.s(["WalletSelect",0,({lang:e,className:S,size:C="small",hideDepositBtn:k=!1})=>{let{t:j}=(0,D.useTranslation)(),I=(0,u.useDispatch)(),U=(0,h.usePathname)();(0,h.useRouter)();let B=(0,m.useAppSelector)(e=>e.ui.auth),W=(0,m.useAppSelector)(e=>e.ui.secondaryCurrencies),T=(0,m.useAppSelector)(e=>e.ui.allowedCurrenciesToPlay),{activeCurrency:R,playerWallet:z,playerWalletBonus:P,playerWalletAffiliate:N,playerWalletCashback:O}=(0,m.useAppSelector)(y.getWalletSlice),{futureFeatures:V}=(0,m.useAppSelector)(g.getFutureFeaturesSlice),[Q,Y]=(0,a.useState)(!1),G=(0,a.useRef)(null),[q,J]=(0,a.useState)({}),[Z,ee]=(0,a.useState)(null),[et,ea]=(0,a.useState)(),[er,en]=(0,a.useState)(),ei=(0,a.useRef)(R),el=(0,a.useMemo)(()=>(W??[]).join("|"),[W]);(0,a.useEffect)(()=>{let e,t,a=(e=localStorage.getItem("WalletFilterShowInUSD"),(t=localStorage.getItem("WalletFilterShowSecondaryCurrency"))?{showInUSD:"true"===e,showSecondaryCurrency:"true"===t}:{showInUSD:!1,showSecondaryCurrency:!0});J(e=>e.showInUSD===a.showInUSD&&e.showSecondaryCurrency===a.showSecondaryCurrency?e:a);let r=(0,X.getWalletSecondaryCurrencyLocal)(),n=(W??[]).includes(r||"")?r:W?.[0]||null;ee(e=>e===n?e:n)},[el]),(0,a.useEffect)(()=>{0!==Object.keys(q).length&&(e=>{for(let[t,a]of Object.entries({WalletFilterShowInUSD:e.showInUSD?"true":"false",WalletFilterShowSecondaryCurrency:e.showSecondaryCurrency?"true":"false"}))localStorage.setItem(t,a)})(q)},[q]),(0,a.useEffect)(()=>{(0,X.setWalletSecondaryCurrencyLocal)(Z)},[Z]),(0,a.useEffect)(()=>{void 0!==ei.current&&R!==ei.current&&R&&(U?.includes(`${e}/game/`)||U?.includes("/sports"))&&(window.location.reload(),x.default.dispatch((0,w.setRealoadGameService)(!0))),ei.current=R},[R]);let eo=()=>Y(!1),es=(0,a.useCallback)(async e=>{try{if(eo(),!B)return;I((0,y.setActiveCurrency)(e)),b.alienClient?.setActiveCurrency({currency:e},{uuid:(0,K.uuidv4)(),meta:{activeCurrency:e,browserId:(0,K.getUniqID)("browserId"),tabId:(0,K.getUniqID)("tabId")}})}catch{}},[B,I]),ec=(0,a.useCallback)(async e=>{let t=R?.toUpperCase();try{if(null==e)return null;if(!t||"USD"===t)return e;let a=await (0,v.getCurrencyIndexedDB)(["USD",t]);if(!a)return e;return await b.alienClient?.convertAmountByCurrencyV3({amount:e,fromCurrencyCode:"USD",toCurrencyCode:t,currencies:a})??e}catch{return e??null}},[R]);return(0,a.useEffect)(()=>{let e=!1;return(async()=>{let[t,a]=await Promise.all([ec(N?.balanceInUsd),ec(O?.balanceInUsd)]);e||(ea(t??N?.balanceInUsd),en(a??O?.balanceInUsd))})(),()=>{e=!0}},[R,N?.balanceInUsd,O?.balanceInUsd,ec]),(0,t.jsxs)(o.Stack,{component:"div",ref:G,className:`wallet-select ${S||""}`,sx:{gap:1,flexDirection:"rtl"===(0,d.dir)(e)?"row-reverse":"row",justifyContent:"center",alignItems:"center"},children:[(0,t.jsxs)(n.Button,{title:j("button_wallet_select"),id:"btn-wallet-select",className:"buttonSelect wallet-button-select",size:C,color:"default",variant:"outlined","aria-controls":Q?"wallet-select-menu":void 0,"aria-haspopup":"true","aria-expanded":Q?"true":void 0,onClick:()=>Y(e=>!e),sx:{minWidth:{xs:120,sm:130},width:1,direction:(0,d.dir)(e),alignItems:"center",justifyContent:"space-between",bgcolor:"grey.100",border:"1px solid",borderColor:"grey.100",padding:3,gap:1,borderRadius:1,overflow:"hidden","&:hover, &:focus":{border:"1px solid",borderColor:"grey.100"},"&.MuiButton-sizeLarge":{height:48,padding:3,borderRadius:3},"&.MuiButton-sizeMedium":{height:40,padding:2,borderRadius:2},"&.MuiButton-sizeSmall":{height:32,padding:1,borderRadius:1},".select-wrap-container":{gap:2},".selected-item":{borderRadius:1,padding:1,gap:1},"&.seclect-button-badge":{padding:0,alignItems:"center",justifyContent:"center"},"&.wallet-button-select":{bgcolor:"background.default",paddingLeft:2,paddingRight:2,"&:hover":{bgcolor:"background.default"}}},children:[(0,t.jsx)(A,{lang:e,currency:R||"",secondaryCurrency:Z,playerWalletCurrency:z?.byCurrency?.[R||""],filter:q}),(0,t.jsx)(r.Box,{sx:{width:15},children:(0,t.jsx)(c.FontAwesomeIcon,{icon:Q?s.faChevronUp:s.faChevronDown})})]}),!k&&(0,t.jsx)(M,{lang:e,type:"badge",id:"btn-wallet-select-bage-deposit"}),(0,t.jsxs)(l.Menu,{className:"wallet-select-menu",anchorEl:G.current,open:Q,onClose:eo,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},MenuListProps:{"aria-labelledby":"basic-button",sx:{minWidth:300,display:"flex",flexDirection:"column",gap:2}},sx:{top:3,".MuiPaper-root":{mx:"auto",p:2,borderRadius:2}},children:[!k&&!!V?.bonusGames&&!!P?.byCurrency&&(0,t.jsx)(H.AdaptiveButton,{title:j("bonus_wallet"),varButton:"button",variant:"text",link:`/${e}/bonus`,fullWidth:!0,sx:{display:"flex",p:2,gap:1,direction:(0,d.dir)(e)},onClick:()=>{eo(),x.default.dispatch((0,f.setWindow)({window:p.WindowEnum.BONUS,tab:p.TabEnum.BONUS}))},children:(0,t.jsx)(L,{lang:e,currency:P?.byCurrency?.[R]?.currency,amount:P?.byCurrency?.[R]?.balance})}),!k&&!!V?.affiliate&&(!!N?.balanceInUsd||N?.balanceInUsd===0)&&(0,t.jsx)(H.AdaptiveButton,{title:j("affiliate_wallet"),varButton:"button",variant:"text",link:`/${e}/bonus`,fullWidth:!0,sx:{display:"flex",p:2,gap:1,direction:(0,d.dir)(e)},onClick:()=>{eo(),x.default.dispatch((0,f.setWindow)({window:p.WindowEnum.AFFILIATE,tab:p.TabEnum.REFERRAL}))},children:(0,t.jsx)(L,{lang:e,title:"affiliate_wallet",currency:R||"USD",amount:et??N?.balanceInUsd})}),!k&&!!V?.cashback&&(!!O?.balanceInUsd||O?.balanceInUsd===0)&&(0,t.jsx)(H.AdaptiveButton,{title:j("cashback_wallet"),varButton:"button",variant:"text",link:`/${e}/bonus`,fullWidth:!0,sx:{display:"flex",p:2,gap:1,direction:(0,d.dir)(e)},onClick:()=>{eo(),x.default.dispatch((0,f.setWindow)({window:p.WindowEnum.CASHBACK,tab:p.TabEnum.CASHBACK}))},children:(0,t.jsx)(L,{lang:e,title:"cashback_wallet",currency:R||"USD",amount:er??O?.balanceInUsd})}),(0,t.jsx)(o.Stack,{sx:{gap:1,direction:(0,d.dir)(e)},children:((e,a,r,n,i,l,o)=>{let s=[];if(!i||0===i.length||!o||!o.byCurrency)return null;let c=i.filter(e=>Object.keys(o.byCurrency)?.includes(e));return[...c.filter(e=>"USD"!==e),...c.filter(e=>"USD"===e)].forEach((i,c)=>{s.push((0,t.jsx)(E.MenuItem,{value:i,sx:{flex:1},onClick:()=>r(i),children:(0,t.jsx)(F,{lang:e,filter:a,currency:i,activeCurrency:l,secondaryCurrency:n,playerWalletCurrency:o.byCurrency[i]})},c))}),s})(e,q,es,Z,T,R,z)}),(0,t.jsx)(o.Stack,{sx:{gap:2},children:(0,t.jsx)($,{lang:e,filter:q,setFilter:J,secondaryCurrency:Z,setSecondaryCurrency:ee,allowedCurrenciesToPlay:T})}),!k&&(0,t.jsx)(i.Divider,{flexItem:!0,sx:{opacity:.5}}),!k&&(0,t.jsx)(_,{lang:e,id:"btn-wallet-select-menu-deposit",variant:"contained",color:"primary",size:"large",fullWidth:!0,extraOnClick:eo})]})]})}],637201)}]); //# debugId=4e9eab52-4c7e-8630-a0e1-c8968e1ed49e //# sourceMappingURL=c7c4c2aecf700d1b.js.map