"use strict";(self.webpackChunklauncher=self.webpackChunklauncher||[]).push([[7533,9873,3487,5914],{9873:(t,e,n)=>{n.r(e),n.d(e,{default:()=>p});var o=n(8416),u=n(5240),i=n.n(u),r=n(73),a=n.n(r),l=n(1100),s=n.n(l);function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,u,i,r,a=[],l=!0,s=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(a.push(o.value),a.length!==e);l=!0);}catch(t){s=!0,u=t}finally{try{if(!l&&null!=n.return&&(r=n.return(),Object(r)!==r))return}finally{if(s)throw u}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},e=t.soundUrl,n=void 0===e?"":e,u=t.soundObj,r=void 0===u?{}:u,l=t.musicUrl,d=void 0===l?"":l,p=t.musicObj,y=void 0===p?{}:p,b=a()(),m=c((0,o.useState)(null===(null===s()||void 0===s()?void 0:s().getItem(f))||"true"===(null===s()||void 0===s()?void 0:s().getItem(f))),2),S=m[0],g=m[1],h=c((0,o.useState)(null===(null===s()||void 0===s()?void 0:s().getItem(v))||"true"===(null===s()||void 0===s()?void 0:s().getItem(v))),2),A=h[0],O=h[1],B=c(i()(!S,n,r),3),I=B[0],C=B[1],E=B[2],x=c(i()(!A,d,y),3),P=x[0],k=x[1],w=x[2];return(0,o.useEffect)((function(){null===s()||void 0===s()||s().setItem(f,S)}),[S]),(0,o.useEffect)((function(){null===s()||void 0===s()||s().setItem(v,A)}),[A]),(0,o.useEffect)((function(){b&&(g("true"===(null===s()||void 0===s()?void 0:s().getItem(f))),O("true"===(null===s()||void 0===s()?void 0:s().getItem(v))))}),[b]),{sound:(0,o.useMemo)((function(){return{isLoaded:I,isOn:S,play:C,stop:E,setOn:g}}),[I,S,C,E,g]),music:(0,o.useMemo)((function(){return{isLoaded:P,isOn:A,play:k,stop:w,setOn:O}}),[P,A,k,w,O])}}},3487:(t,e,n)=>{n.r(e),n.d(e,{BASE_POPUP_NAMES:()=>o});var o=Object.freeze({RULES:"Rules",CASH_BACK:"CashBackPopup",CHECK_HASH_CODE:"CheckHashCode",ABOUT_HASH_CODE:"AboutHashCode",GAME_CONTROLS:"GameControls",BONUS_LIST:"BonusListPopup",KEYBOARD:"Keyboard",KEYBOARD_MINES:"KeyboardMines",GLOBAL_HISTORY:"GlobalHistory",GLOBAL_BONUS_HISTORY:"GlobalBonusHistory",MENU:"Menu",MAIN_MENU:"MainMenu",LEADER_BOARD:"LeaderBoard",LEADER_BOARD_HISTORY:"LeaderBoardHistory",BONUS_ASIDE:"BonusAside",CHAT_POPUP:"ChatPopup",CHAT_REGISTRY_POPUP:"ChatRegistryPopup",CASH_BACK_RULES:"CashbackRules"})},7533:(t,e,n)=>{n.r(e),n.d(e,{default:()=>G});var o=n(8416),u=n(5694),i=n(6606),r=n(1100),a=n.n(r),l=n(7156),s=n.n(l),c=n(6345),d=n(5914),f=n(3317),v=n(5192),p=n(3351),y=n(3665),b=n(3487);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function S(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function g(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,o=new Array(e);n0),Mt(t.isAutoBet&&t.autoBet>0),xt(t.autoBet),Lt(t.autoBet>0||t.autoCashout>1))}),[et.pending,et.current]),(0,o.useEffect)((function(){var t,e;switch(Ht({text:y.xf&&"999"!==y.xJ?it:rt,textSmall:at,value:"",type:k,halfValue:""}),q.enabled&&((null===(t=q.selected)||void 0===t?void 0:t.type)===c.BonusTypes.FreeBet?(null===et.current&&null===et.pending&&mt(q.selected.bet),Ht({text:"".concat(ct," (").concat(q.selected.remainingCount,")"),textSmall:at,value:"",type:w,halfValue:""})):(null===(e=q.selected)||void 0===e?void 0:e.type)===c.BonusTypes.FreeAmount&&Ht({text:lt,textSmall:at,value:"",type:w,halfValue:""})),W){case _:et.pending&&Ht({text:ut,textSmall:at,value:"",type:x,halfValue:""});break;case T:(et.current||et.pending)&&Ht({text:ut,textSmall:at,value:"",type:x,halfValue:""});break;case N:if(et.current){var n=(et.current.betInfo[0].win>0?et.current.betInfo[1].bet:et.current.bet)*(tt-(2===et.current.winType?1:0));Ht({text:st,textSmall:at,value:(G0))}),[et.current,W]),(0,o.useEffect)((function(){function t(t){var e,n;"emwindow"===(null==t||null===(e=t.data)||void 0===e?void 0:e.sender)&&"stopAutospins"===(null==t||null===(n=t.data)||void 0===n?void 0:n.name)&&(h(f.actions.updateStopAutoBets()),xt(0),Mt(!1))}return window.addEventListener("message",t),y.xf||I("GalaxsysStopAutoPlay",(function(){h(f.actions.updateStopAutoBets()),xt(0),Mt(!1)})),function(){window.removeEventListener("message",t),y.xf||E("GalaxsysStopAutoPlay")}}),[]),(0,o.useEffect)((function(){var t,e,n=et.current||{};((null===(t=n.betInfo)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.win)>0?(null===(e=n.betInfo)||void 0===e||null===(e=e[1])||void 0===e?void 0:e.bet)||0:n.bet)*(tt-(2===n.winType?1:0))>=G&&ft.current&&W===N&&(ft.current=!1,h(f.actions.addNotification((0,i.getNotificationById)($,998)))),W===T&&(ft.current=!0)}),[null===(r=et.current)||void 0===r?void 0:r.bet,G,tt,W]);var Kt=function(){var t=+(0,i.toNumberString)(bt),e=_t?+(0,i.toNumberString)(At):0;d.settings.playSound("bet");var n=(null==q?void 0:q.selected)||null,o=M(n);if(0!==e&&e<1.01)h(f.actions.addNotification((0,i.getNotificationById)($,11)));else if(y.xf&&X-t<0)h(f.actions.addNotification((0,i.getNotificationById)($,4)));else if(!t||tH)h(f.actions.addNotification((0,i.getNotificationById)($,12,H)));else{var r={gameId:Z,activeGameId:y.N2,partnerId:y.y_,token:Q,bet:t,combination:{autoCashout:e,isAutoBet:jt&&Et>0,index:S},betType:o,bonusId:(null==n?void 0:n.id)||0,autoBet:Et,index:S};if(h(f.actions.addPendingStake(r)),W===T)if(y.xf)(0,u.batch)((function(){h(f.actions.addNotification((0,i.getNotificationById)($,0))),h(f.actions.addDemoTicket({index:S}))}));else{h(f.actions.setPlayerPressed({index:S,pressed:!0}));var a=new v.Kb.AddStake(r);(0,p.requestToServer)(a)}}},Ft=function(t){var e;if(V){var n=(null===(e=et.current)||void 0===e?void 0:e.stakeId)||0;if(!n||y.xf){if(tt<1.01)return void h(f.actions.addNotification((0,i.getNotificationById)($,999)));h(f.actions.cashoutDemoTicket({index:S,cashoutType:t}))}else{h(f.actions.setPlayerPressed({index:S,pressed:!0,halfPressed:1===t}));var o=new v.Kb.StopStake({gameId:Z,stakeId:n,ping:z,token:Q,index:S,cashoutType:t});(0,p.requestToServer)(o)}}},Wt=function(){var t;if(V){d.settings.playSound("cancel");var e=M((null==q?void 0:q.selected)||null),n=(null===(t=et.current)||void 0===t?void 0:t.stakeId)||0;if(jt&&!D&&(D=!0,y.xf||C("GalaxsysAutoPlay",{state:"finish",remainingCount:Et})),null===a()||void 0===a()||a().removeItem("pending_autobet_".concat(S)),null===a()||void 0===a()||a().removeItem("autobet_count_".concat(S)),!n||y.xf)h(f.actions.cancelMyTicket({index:S,stakeId:n}));else{h(f.actions.setPlayerPressed({index:S,pressed:!0}));var o=new v.Kb.CancelStake({gameId:Z,stakeId:n,token:Q,index:S,bet:+(0,i.toNumberString)(bt),betType:e});(0,p.requestToServer)(o)}}},Yt=(0,o.useCallback)((function(){Ot(_t?0:2.5),Tt(!_t)}),[_t]),Vt=(0,o.useCallback)((function(){jt&&qt(),_t&&Yt(),Lt((function(t){return t&&(null===a()||void 0===a()||a().removeItem("autobet_count_".concat(S)),null===a()||void 0===a()||a().removeItem("pending_autobet_".concat(S))),!t}))}),[Ut,jt,_t]),qt=(0,o.useCallback)((function(){(W===T||W===N&&null===et.current)&&jt&&Wt(),Mt((function(t){return t?(null===a()||void 0===a()||a().removeItem("autobet_count_".concat(S)),null===a()||void 0===a()||a().removeItem("pending_autobet_".concat(S)),xt(0)):xt(10),!t}))}),[q,W,et.current,bt,jt,_t,At,S,pt.current,Z]),Xt=(0,o.useCallback)((function(t){var e;if((null==q||null===(e=q.selected)||void 0===e?void 0:e.type)!==c.BonusTypes.FreeBet){var n=t.currentTarget.dataset.quickbet;mt((function(t){var e=(0,i.sumWithPrecision)(+(0,i.toNumberString)(t),+n,K);return e>=H?H:e}))}}),[null==q||null===(l=q.selected)||void 0===l?void 0:l.type,K,H]),$t=(0,o.useCallback)((function(){var t,e;if(!q.enabled||(null===(t=q.selected)||void 0===t?void 0:t.type)!==c.BonusTypes.FreeBet)if(q.enabled&&(null===(e=q.selected)||void 0===e?void 0:e.type)===c.BonusTypes.FreeAmount){var n=q.selected.remainingBet;mt(n>=H?H:n)}else mt(X>=H?H:X)}),[null==q?void 0:q.enabled,null==q?void 0:q.selected,H,X]),Jt=(0,o.useCallback)((function(){var t=+(0,i.toNumberString)(bt);mt(2*t<=H?2*t:H)}),[bt,H]),Zt=(0,o.useCallback)((function(){h(f.actions.openPopup({name:b.BASE_POPUP_NAMES.KEYBOARD,args:{title:rt,getter:bt,setter:mt,config:{extended:!0,dot:!0}}}))}),[bt]),zt=(0,o.useCallback)((function(){h(f.actions.openPopup({name:b.BASE_POPUP_NAMES.KEYBOARD,args:{type:c.KEYBOARD_POPUP_NAMES.AUTO_CASHOUT,title:ot,getter:At,setter:Ot,config:{extended:!1,dot:!0}}}))}),[At]),Qt=(0,o.useCallback)((function(){h(f.actions.openPopup({name:b.BASE_POPUP_NAMES.KEYBOARD,args:{type:c.KEYBOARD_POPUP_NAMES.AUTO_BET,title:nt,getter:Et,setter:xt,config:{extended:!1,dot:!1}}}))}),[Et]),te=(0,o.useCallback)((function(){var t;switch(Gt.type){case k:case w:Kt();break;case P:Ft((null===(t=et.current)||void 0===t?void 0:t.betInfo[0].win)>0?v.AS.FullAfterPartial:v.AS.Full);break;case x:var e;jt&&null!==(e=et.current)&&void 0!==e&&e.stakeId&&xt(Et+1),Wt();break;default:Kt()}}),[S,Gt,bt,_t,At,et.current,q,jt,Et,X,Z,z,W]),ee=(0,o.useCallback)((function(){mt((function(t){var e=(0,i.sumWithPrecision)(+(0,i.toNumberString)(t),j,K),n=e>H?H:e;return(0,i.numberToSpacedStringLocal)(n,K)}))}),[H,K]),ne=(0,o.useCallback)((function(){mt((function(t){var e=(0,i.subtractWithPrecision)(+(0,i.toNumberString)(t),j,K),n=eG?v.AS.Full:v.AS.Partial;y.xf?tt>1?Ft(t):h(f.actions.addNotification((0,i.getNotificationById)($,999))):Ft(t)},handleButtonClick:te,handleIncrementBet:ee,handleDecrementBet:ne,handleBetInputChange:St,handleBetInputKey:gt,handleAutoCashoutInputChange:Bt,handleAutoCashoutInputKey:It,handleAutoBetInputChange:Pt,handleAutoBetInputKey:kt,resources:$}}},914:(t,e,n)=>{n.d(e,{X:()=>h,Z:()=>O});var o=n(5439),u=n.n(o),i=n(8416),r=n(5694),a=n(1100),l=n.n(a),s=n(73),c=n.n(s),d=n(613),f=n(9873),v=n(9767);function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n{n.r(e),n.d(e,{SettingsService:()=>o.Z,settings:()=>o.X});var o=n(914)}}]);