/*! For license information please see 7438.8973ea74e3a1ed9711ab.js.LICENSE.txt */ "use strict";(self.webpackChunklauncher=self.webpackChunklauncher||[]).push([[7438],{7749:(t,e,r)=>{r.d(e,{LU:()=>n,c_:()=>o});var n="https://lobby-api.jdduuee-54rg78cw.com",o="https://nar-fg.cchhllpp.net/prd"},8718:(t,e,r)=>{r.d(e,{O:()=>n});var n={BonusHistory:"BonusHistory",BonusInfo:"BonusInfo",UpdateBonusInfo:"UpdateBonusInfo",FinishBonus:"FinishBonus"}},7438:(t,e,r)=>{r.r(e),r.d(e,{ConnectionService:()=>tt,featuresHubConnection:()=>V,hubConnection:()=>k,requestFeaturesToServer:()=>ot,requestToServer:()=>nt,useSignalR:()=>x});var n=r(4914),o=r(3444),i=r.n(o),a=r(5869),c=r.n(a),u=r(6295),s=r(678),l=r(3769),f=r(4021),h=r(5218),p=r(7749),y=r(8517);function v(t){return v="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},v(t)}function d(){d=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new F(n||[]);return o(a,"_invoke",{value:I(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",y="executing",m="completed",g={};function b(){}function w(){}function L(){}var k={};s(k,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(A([])));E&&E!==r&&n.call(E,a)&&(k=E);var O=L.prototype=b.prototype=Object.create(k);function S(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==v(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function I(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?m:p,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function m(t,e,r){var n;return n=function(t,e){if("object"!=v(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(e),(e="symbol"==v(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function g(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function b(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){g(i,n,o,a,c,"next",t)}function c(t){g(i,n,o,a,c,"throw",t)}a(void 0)}))}}function w(){return L.apply(this,arguments)}function L(){return(L=b(d().mark((function t(){var e;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(p.c_,"/fonts/index.css")).then((function(){return console.log("client connected via httprequest",p.c_),!0})).catch((function(t){return console.log(t),console.log("client disconnected via httprequest",p.c_),!1}));case 2:return e=t.sent,t.abrupt("return",e);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var k=null;function x(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=(0,s.useSelector)(h.selectHubIsConnected),i=(0,s.useDispatch)(),a=(0,n.useRef)(null),c=(0,n.useRef)(null),u=(0,n.useRef)(null);(0,n.useEffect)((function(){var t=function(){i(h.actions.setHubConnected(m({},e.name,!1))),c.current&&c.current.stop()};return window.addEventListener("offline",t),function(){window.removeEventListener("offline",t)}}),[]),(0,n.useEffect)((function(){return c.current=function(){var n=null,o=a.current;if(null!==o)return o;(n=y.isMessagePackEnabled?(new l.HubConnectionBuilder).withUrl(t,{skipNegotiation:!0,transport:l.HttpTransportType.WebSockets}).configureLogging(l.LogLevel.Information).withHubProtocol(new f.MessagePackHubProtocol).build():(new l.HubConnectionBuilder).withUrl(t,{skipNegotiation:!0,transport:l.HttpTransportType.WebSockets}).configureLogging(l.LogLevel.Information).build()).serverTimeoutInMilliseconds=e.serverTimeoutInMilliseconds||3e4,n.keepAliveIntervalInMilliseconds=e.keepAliveIntervalInMilliseconds||5e3,a.current=n;var c=function(){var t=b(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,w();case 2:if(t.t0=t.sent,!t.t0){t.next=5;break}t.t0=null===u.current;case 5:if(!t.t0){t.next=12;break}console.log("SignalR connected, waiting for actions"),i(h.actions.setHubConnected(m({},e.name,!0))),u.current=!0,null==r||r(n),t.next=14;break;case 12:console.log("Reloading..."),window.location.reload();case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),s=function(){var t=b(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log("Disconnected",Date.now()),i(h.actions.setHubConnected(m({},e.name,!1))),u.current=!1,n.dontReconnect){t.next=6;break}return t.next=6,p();case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();function p(){return v.apply(this,arguments)}function v(){return(v=b(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n.start();case 3:c(),t.next=10;break;case 6:t.prev=6,t.t0=t.catch(0),console.log(t.t0),setTimeout((function(){return p()}),e.reconnectTimeInMilliseconds||5e3);case 10:case"end":return t.stop()}}),t,null,[[0,6]])})))).apply(this,arguments)}return n.start().then(c).catch((function(t){console.log(t),i(h.actions.setHubConnected(m({},e.name,!1))),u.current=!1})),n.onClosed=function(t){console.log(t?"Connection closed with error: ".concat(t):"Disconnected"),i(h.actions.setHubConnected(m({},e.name,!1)))},n.onclose(s),k=n,n}(),function(){c.current=null}}),[o])}var E=r(629),O=r(5659),S=r(5393),j=r(1703),I=r.n(j),P=r(8718),T=function(t){return{id:t[0],remainingCount:t[1],remainingBet:t[2],bet:t[3],expireDate:t[4],type:t[5],currencyId:t[6],isGalaxsysBonus:t[7]}},_=function(t){return{id:t[0],remainingCount:t[1],remainingBet:t[2],bet:t[3],expireDate:t[4],type:t[5],currencyId:t[6],isGalaxsysBonus:t[7]}},F=function(t){return{playerBonusId:t[0]}},A=function(t){return{totalWin:t[0],bet:t[1],count:t[2],date:t[3],expireDate:t[4]}},C=r(6337);function B(t){return B="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},B(t)}function N(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function H(t){for(var e=1;e=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:_(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function U(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function R(t,e,r){var n;return n=function(t,e){if("object"!=G(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=G(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(e),(e="symbol"==G(n)?n:n+"")in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function W(t){return function(t){if(Array.isArray(t))return q(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return q(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?q(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,s.useDispatch)(),n=(0,h.shallowSelector)(h.selectResources);if(!V){var o;o=y.isFeatureMessagePackEnabled?(new l.HubConnectionBuilder).withUrl(t,{skipNegotiation:!0,transport:l.HttpTransportType.WebSockets}).configureLogging(l.LogLevel.Information).withHubProtocol(new f.MessagePackHubProtocol).build():(new l.HubConnectionBuilder).withUrl(t,{skipNegotiation:!0,transport:l.HttpTransportType.WebSockets}).configureLogging(l.LogLevel.Information).build();var i=function t(){o.start().then((function(){Y.forEach((function(t){o.on(t.name,(function(e){t.callback({data:e,dispatch:r})}))})),r(h.actions.setHubConnected(R({},e.name,!0))),$&&clearInterval($),$=setInterval((function(){o.invoke("UpdatePlayerSessions")}),5e3)})).catch((function(e){console.error(e),setTimeout(t,5e3)}))};o.serverTimeoutInMilliseconds=e.serverTimeoutInMilliseconds||3e4,o.keepAliveIntervalInMilliseconds=e.keepAliveIntervalInMilliseconds||5e3,i(),o.on("Error",(function(t){4001===(y.isFeatureMessagePackEnabled?t.error:t[0])&&(o.stop(),o.unauthorizedPlayer=!0,r(h.actions.setHubConnected(R({},e.name,!1))),$&&clearInterval($))})),o.on("OnRuleVersionReceive",(function(t){var e=y.isFeatureMessagePackEnabled?t.ruleVersion:t[0];(0,C.setRulesVersionInStorage)(e,(function(){r(h.actions.addNotification((0,u.getNotificationById)(n,116)))}))})),window.addEventListener("offline",(function(){r(h.actions.setHubConnected(R({},e.name,!1))),o&&o.stop()})),o.onclose(function(){var t,e=(t=D().mark((function t(e){return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log("Connection closed:",e),o.unauthorizedPlayer){t.next=4;break}return t.next=4,i();case 4:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){U(i,n,o,a,c,"next",t)}function c(t){U(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()),V=o}}((e="".concat(p.LU,"/features?"),r=X,n="",Object.keys(r).forEach((function(t){n.length>0&&(n+="&"),n+="".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(r[t]))})),e+n),{name:"features"}),x(d,{name:"game"},v),null}Z.defaultProps={gameName:"",socketListeners:function(){}},Z.propTypes={gameName:i().string,socketListeners:i().func};const tt=(0,n.memo)(Z);function et(t){return function(t){if(Array.isArray(t))return rt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return rt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rt(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r