@kalamba/sdk 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.d.ts +6 -4
- package/dist/plugins.js +91 -89
- package/dist/wrapper.cjs +1 -1
- package/dist/wrapper.d.ts +2 -2
- package/dist/wrapper.js +1 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -200,7 +200,7 @@ export declare type OpenGameResponse = {
|
|
|
200
200
|
bet: {
|
|
201
201
|
available: Record<number, number[]>;
|
|
202
202
|
default: Bet;
|
|
203
|
-
max: number;
|
|
203
|
+
max: number | null;
|
|
204
204
|
last: Bet | null;
|
|
205
205
|
lastPaid: Bet | null;
|
|
206
206
|
};
|
|
@@ -231,6 +231,7 @@ export declare type OpenGameResponse = {
|
|
|
231
231
|
};
|
|
232
232
|
uiMessages: unknown[];
|
|
233
233
|
win: {
|
|
234
|
+
max: number | null;
|
|
234
235
|
round: number;
|
|
235
236
|
total: number;
|
|
236
237
|
};
|
|
@@ -436,7 +437,6 @@ export declare interface SdkConfig {
|
|
|
436
437
|
showUi: boolean;
|
|
437
438
|
};
|
|
438
439
|
language: string;
|
|
439
|
-
maximumBet?: number;
|
|
440
440
|
minimumSpinDuration: number;
|
|
441
441
|
requestTimeoutMs: number;
|
|
442
442
|
incompleteGameResolution: {
|
package/dist/plugins.cjs
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* BSD 3-Clause License
|
|
3
3
|
* Copyright (c) 2024, Kalamba Games Limited
|
|
4
4
|
*/
|
|
5
|
-
"use strict";var Qt=Object.defineProperty;var Jt=(s,t,e)=>t in s?Qt(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var p=(s,t,e)=>(Jt(s,typeof t!="symbol"?t+"":t,e),e),lt=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var y=(s,t,e)=>(lt(s,t,"read from private field"),e?e.call(s):t.get(s)),M=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},k=(s,t,e,i)=>(lt(s,t,"write to private field"),i?i.call(s,e):t.set(s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ne=require("./errors-358575c3.cjs"),ut=require("./noop-b3c54b76.cjs");function U(s,t){return(e,...i)=>{console.log(`[%c${s}\x1B[m] %s`,t,e,...i)}}function Dt(s,t){return Math.round(s*100/t)}class q{constructor(t,e){p(this,"config");p(this,"sdkConfig");this.config=t,this.sdkConfig=e}on(t,e,i){const n=function(a){a.data.message!==`kalamba:wrapper-casino:${t}`&&a.data.message!==`kalamba:wrapper:${t}`||e(a.data.payload)};window.addEventListener("message",n,i)}send(t,...[e]){window.postMessage({message:`kalamba:casino:${t}`,payload:e})}}const Yt=U("BasicPlugin","color:#000000;font-weight:bold;");class Zt extends q{constructor(...t){super(...t),this.registerToSdkEvents(),this.registerFromSdkEvents(),Yt("configured")}registerToSdkEvents(){window.addEventListener("message",t=>{try{const{type:e,payload:i}=t.data;switch(e){case"doAudioSettings":this.send("settings",{music:i==null?void 0:i.musicEnabled,sounds:i==null?void 0:i.soundEnabled});return;case"doBalanceUpdate":const{currency:n,coinValueInCents:o}=this.sdkConfig.api;i.currency===n&&typeof i.balanceInCurrency=="number"?this.send("balance",{balance:Dt(i.balanceInCurrency,o)}):(i.balanceInCoins,this.send("balance",{balance:i.balanceInCoins}));return;case"doGamePause":this.send("freeze");return;case"doGameResume":this.send("unfreeze");return;case"doGameSuspend":this.send("suspend");return;default:return}}catch{}})}registerFromSdkEvents(){this.on("close",()=>{if(this.sdkConfig.api.homeUrl)try{window.top.location=this.sdkConfig.api.homeUrl}catch{window.location=this.sdkConfig.api.homeUrl}else try{window.top.history.back()}catch{window.history.back()}})}}const E=U("▼ DebuggingPlugin IN ▼","color:#444444;font-weight:bold;"),ei=U("▲ DebuggingPlugin OUT ▲","color:#444444;font-weight:bold;");class ti extends q{constructor(...t){super(...t),this.registerDebugToSdkEvents(),this.registerSdkToDebugEvents()}registerDebugToSdkEvents(){window.DebuggingPlugin={balance:t=>this._send("balance",t),bet:t=>this._send("bet",t),choice:t=>this._send("choice",t),close:t=>this._send("close",t),help:t=>this._send("help",t),history:t=>this._send("history",t),freeze:t=>this._send("freeze",t),paytable:t=>this._send("paytable",t),settings:t=>this._send("settings",t),suspend:t=>this._send("suspend",t),unfreeze:t=>this._send("unfreeze",t)}}registerSdkToDebugEvents(){this.on("autoplay",t=>E("autoplay",t)),this.on("balance",t=>E("balance",t)),this.on("bet",t=>E("bet",t)),this.on("cashier",t=>E("cashier",t)),this.on("choice",t=>E("choice",t)),this.on("close",t=>E("close",t)),this.on("error",t=>E("error",t)),this.on("loadEnd",t=>E("loadEnd",t)),this.on("loadProgress",t=>E("loadProgress",t)),this.on("loadStart",t=>E("loadStart",t)),this.on("playCycleStart",t=>E("playCycleStart",t)),this.on("playCycleEnd",t=>E("playCycleEnd",t)),this.on("playEnd",t=>E("playEnd",t)),this.on("playError",t=>E("playError",t)),this.on("playReady",t=>E("playReady",t)),this.on("playStart",t=>E("playStart",t)),this.on("settings",t=>E("settings",t))}_send(...t){ei(...t),this.send(...t)}}const ii=U("GigPlugin","color:#000000;font-weight:bold;");class si extends q{constructor(...t){super(...t),this.registerToSdkEvents(),this.registerFromSdkEvents(),ii("configured")}postMessage(t){const e={event:t};window.top.postMessage(e,"*")}registerToSdkEvents(){window.addEventListener("message",t=>{try{const{data:e}=t;switch(e){case"STOP_AUTO_PLAY":this.send("suspend");return;case"BLOCK_BETS":this.send("freeze");return;case"UNBLOCK_BETS":this.send("unfreeze");return;default:return}}catch{}})}registerFromSdkEvents(){this.on("close",()=>{if(this.sdkConfig.api.homeUrl)try{window.top.location=this.sdkConfig.api.homeUrl}catch{window.location=this.sdkConfig.api.homeUrl}else try{window.top.history.back()}catch{window.history.back()}}),this.on("playReady",()=>{this.postMessage("GAME_READY")})}}const ni=U("OryxPlugin","color:#000000;font-weight:bold;");class ai extends q{constructor(...t){super(...t),this.registerToSdkEvents(),this.registerFromSdkEvents(),ni("configured")}registerToSdkEvents(){window.addEventListener("message",t=>{try{const{type:e,param:i}=t.data;switch(e){case"doBalanceUpdate":this.send("balance",{balance:i});return;case"doGamePause":this.send("freeze");return;case"doGameResume":this.send("unfreeze");return;case"doGameSuspend":this.send("suspend");return;default:return}}catch{}})}registerFromSdkEvents(){let t=0;this.on("close",()=>{window.top.postMessage({wpgaction:"close"},"*"),window.parent.postMessage({wpgaction:"close.parent"},"*")}),this.on("balance",({balance:e})=>{t!==e&&(t=e,window.top.postMessage({param:{},wpgaction:"balance"},"*"),window.parent.postMessage({param:{},wpgaction:"balance.parent"},"*"))}),this.on("loadStart",()=>{window.top.postMessage({wpgaction:"loadStart"},"*"),window.parent.postMessage({wpgaction:"loadStart.parent"},"*")}),this.on("loadEnd",()=>{window.top.postMessage({wpgaction:"loadEnd"},"*"),window.parent.postMessage({wpgaction:"loadEnd.parent"},"*")}),this.on("playStart",()=>{window.top.postMessage({wpgaction:"gameSpinStart"},"*"),window.parent.postMessage({wpgaction:"gameSpinStart.parent"},"*")}),this.on("playEnd",()=>{window.top.postMessage({wpgaction:"gameSpinEnd"},"*"),window.parent.postMessage({wpgaction:"gameSpinEnd.parent"},"*")}),this.on("cashier",({type:e})=>{switch(e){case"BALANCE_LOW":window.top.postMessage({wpgaction:"cashier"},"*"),window.parent.postMessage({wpgaction:"cashier.parent"},"*");break;case"BALANCE_INSUFFICIENT":window.top.postMessage({wpgaction:"errorOutOfMoney"},"*"),window.parent.postMessage({wpgaction:"errorOutOfMoney.parent"},"*");break}})}}const ht=U("PariplayPlugin","color:#000000;font-weight:bold;");function Ve(s){try{window.top.location=s}catch{window.location=s}}function ze(s,t){return new Promise(function(i,n){const o=new XMLHttpRequest;o.onload=function(){o.status>=200&&o.status<300?i(o.responseText):n(o.responseText)},o.open(s,t),o.send()})}function qe(){}function oi(s){return s.filter(function(e){return e.messageType.toUpperCase()==="DATA"})}function We(s){return s.filter(function(e){return["NOTIFICATION","POPUP"].includes(e.messageType.toUpperCase())})}function Ft(s){try{return JSON.parse(s.text)}catch{return{}}}function ri(s){return s.map(Ft).filter(Boolean).find(function(e){return e.betId!=null&&e.winId!=null})||{}}function ci(s){return s.map(Ft).filter(Boolean).find(function(e){return e.TotalBet!=null&&e.TotalWin!=null})||{}}class di extends q{constructor(...t){super(...t),this.registerToSdkEvents(),this.registerFromSdkEvents(),ht("configured")}postMessage(t,e){const i={lang:this.sdkConfig.ui.language,sender:this.sdkConfig.api.game,type:t};e!=null&&(i.data=e),ht("postMessage",i),window.parent.postMessage(i,"*")}coinsToCurrency(t){return t*this.sdkConfig.api.coinValueInCents/100}handleContinueButton(t,e){t.link&&ze("GET",t.link),e()}handleLinkButton(t,e){switch(t.linkType.toUpperCase()){case"AJAX":ze("GET",t.link),e();return;case"AJAXRESPONSE":ze("GET",t.link).then(()=>{e()});return;case"REDIRECT":Ve(t.link),e();return}}handleQuitButton(t,e){this.send("close"),e()}handleCashierButton(t,e){this.send("cashier",{type:"ON_DEMAND"}),e()}handleHistoryButton(t,e){this.send("history",{source:"casino"}),e()}get buttonActions(){return{CASHIER:this.handleCashierButton,CONTINUE:this.handleContinueButton,HISTORY:this.handleHistoryButton,LINK:this.handleLinkButton,QUIT:this.handleQuitButton}}processInfoUiMessages(t){return t.reduce((e,i)=>e.then(()=>new Promise(n=>{Object.assign({},i,{buttons:i.buttons.filter(o=>o.action.toUpperCase()==="CASHIER"?!!this.sdkConfig.api.cashierUrl:!0).map(o=>Object.assign({},o,{onRelease:()=>{const a=i.messageType.toUpperCase()==="POPUP"?qe:n,h=this.buttonActions[o.action.toUpperCase()];h?h(o,a):a()}}))})}).catch(qe)),Promise.resolve()).then(()=>{}).catch(qe)}registerToSdkEvents(){window.addEventListener("message",t=>{try{const{type:e}=t.data;switch(e){case"pause":case"disableSpin":this.send("freeze");return;case"resume":case"enableSpin":this.send("unfreeze");return;case"stopAutobet":this.send("suspend");return;default:return}}catch{}})}registerFromSdkEvents(){let t=0;this.on("openGameResponse",e=>{let i;try{const n=JSON.parse(JSON.parse(atob(this.sdkConfig.api.integrationData.token.split(".")[1])).token),o=JSON.parse(n.integrationSpecificAttributes.sessionData||"{}");i={ClientToken:n.integrationSpecificAttributes.clientToken,CurrencyCode:n.currency,PlayerTokenId:n.user,SessionData:o}}catch{i=void 0}this.postMessage("gameDataLoaded",{LoadGameData:i,success:!0});try{const n=We(e.contract.uiMessages);this.processInfoUiMessages(n)}catch{}}),this.on("balance",({balance:e})=>{t!==e&&(t=e,this.postMessage("balance",{amount:this.coinsToCurrency(e)}))}),this.on("close",()=>{if(this.sdkConfig.api.homeUrl)if(this.sdkConfig.api.homeUrl==="(back)")try{window.top.history.back()}catch{window.history.back()}else this.sdkConfig.api.homeUrl==="(api)"?this.postMessage("quit"):Ve(this.sdkConfig.api.homeUrl)}),this.on("playEnd",e=>{this.postMessage("roundEnded",{balanceAfter:this.coinsToCurrency(e.contract.balance.coins),win:this.coinsToCurrency(e.contract.win.round)});try{const i=We(e.contract.uiMessages);this.processInfoUiMessages(i)}catch{}}),this.on("playError",e=>{var i,n;this.postMessage("ticketReceived",{ErrorCode:(i=e.data)==null?void 0:i.code,ErrorMessage:"ERROR",Status:{ErrCode:(n=e.data)==null?void 0:n.code}})}),this.on("playResponse",e=>{this.postMessage("roundStarted",{balanceBefore:this.coinsToCurrency(e.contract.balance.coins+e.contract.bet.lastPaid.base*e.contract.bet.lastPaid.multiplier)});const i=["BaseGame","PaidSpin"].includes(e.contract.stateType.thisRound),n=oi(e.contract.uiMessages),o=We(e.contract.uiMessages),a=ri(n),h=ci(n);this.postMessage("ticketReceived",{Balance:this.coinsToCurrency(e.contract.balance.coins),BetAmount:i?this.coinsToCurrency(e.contract.bet.lastPaid.base*e.contract.bet.lastPaid.multiplier):0,CreditTransactionId:a.betId,DebitTransactionId:a.winId,Message:o,SessionData:h,Status:{ErrCode:0},WinAmount:this.coinsToCurrency(e.contract.win.round)})}),this.on("playStart",e=>{e.bet&&this.postMessage("roundStart",{totalBet:this.coinsToCurrency(e.bet.base*e.bet.multiplier)})}),this.on("loadEnd",()=>{this.postMessage("gameReady")}),this.on("loadStart",()=>{this.postMessage("onAppFrameReady")}),this.on("cashier",()=>{this.sdkConfig.api.cashierUrl&&(this.sdkConfig.api.cashierUrl==="(api)"?this.postMessage("cashier"):Ve(this.sdkConfig.api.cashierUrl))})}}const he=U("RelaxFEIMPlugin","color:#000000;font-weight:bold;");class li extends q{constructor(...e){super(...e);p(this,"VERSION","1.15.0");const i=document.createElement("script");i.src=`https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`,i.onload=()=>{he("loaded"),window.FEIM.configure({p2pConfig:{currency:this.sdkConfig.api.currency,launchParams:{homeurl:"homeUrl"}}}),he("configured"),this.registerToSdkEvents(),this.registerFromSdkEvents()},document.body.appendChild(i)}registerToSdkEvents(){window.FEIM.on.errorMessageDismissed(()=>this.send("unfreeze")),window.FEIM.on.errorMessageDisplayed(()=>this.send("freeze")),window.FEIM.on.exitingGame(()=>he("!!! NOT IMPLEMENTED: exitingGame !!!")),window.FEIM.on.freeze(()=>this.send("freeze")),window.FEIM.on.initialized(()=>he("!!! NOT IMPLEMENTED: initialized !!!")),window.FEIM.on.pauseAutoPlay(()=>this.send("suspend")),window.FEIM.on.refreshBalance(()=>he("!!! NOT IMPLEMENTED: refreshBalance !!!")),window.FEIM.on.toggleGameHelp(()=>{this.send("help",{})}),window.FEIM.on.togglePaytable(()=>{this.send("paytable",{})}),window.FEIM.on.unfreeze(()=>this.send("unfreeze")),window.FEIM.on.updateSettings(({payload:[e]})=>this.send("settings",{sounds:e.sounds,fastPlay:e.fastPlay}))}registerFromSdkEvents(){this.on("autoplay",({action:e})=>{switch(e){case"start":window.FEIM.send.autoPlayStarted();break;case"stop":window.FEIM.send.autoPlayFinished();break}}),this.on("balance",({balance:e})=>{window.FEIM.send.balanceUpdate(e)}),this.on("bet",({base:e,multiplier:i})=>{window.FEIM.send.betUpdate(e*i)}),this.on("error",({message:e})=>{window.FEIM.send.errorMessage(e)}),this.on("close",()=>{window.FEIM.send.exitGame()}),this.on("loadEnd",()=>{window.FEIM.send.gameLoadCompleted()}),this.on("loadProgress",({progress:e})=>{window.FEIM.send.gameLoadProgress(e)}),this.on("loadStart",()=>{window.FEIM.send.gameLoadStarted()}),this.on("cashier",()=>{window.FEIM.send.openQuickDeposit()}),this.on("playCycleEnd",e=>{const i={balance:e.contract.balance.coins,bet:e.contract.bet.lastPaid.base*e.contract.bet.lastPaid.multiplier,win:{win:e.contract.win.total}};window.FEIM.send.roundFinished(i)}),this.on("playResponse",e=>{const i={balance:e.contract.balance.coins,playResponse:e.data};window.FEIM.send.roundStarted(i)}),this.on("history",()=>{window.FEIM.send.showHistory()}),this.on("settings",e=>{window.FEIM.send.updateSettings(e)})}}const $e=U("TukoPlugin","color:#000000;font-weight:bold;");class ui extends q{constructor(...e){super(...e);p(this,"PING_INTERVAL",1e4);const n=new URLSearchParams(window.location.search).get("pingCallbackUrl");n&&window.setInterval(()=>{this.ping(n)},this.PING_INTERVAL),this.registerToSdkEvents(),this.registerFromSdkEvents(),$e("configured")}ping(e){const i=new XMLHttpRequest;i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&(i.status===0||i.status>=200&&i.status<400?$e("ping ok",i):$e("ping error",i))},i.open("GET",e),i.send()}registerToSdkEvents(){window.addEventListener("message",e=>{try{const{type:i,payload:n}=e.data;switch(i){case"doAudioSettings":this.send("settings",{music:n==null?void 0:n.musicEnabled,sounds:n==null?void 0:n.soundEnabled});return;case"doBalanceUpdate":const{currency:o,coinValueInCents:a}=this.sdkConfig.api;n.currency===o&&typeof n.balanceInCurrency=="number"?this.send("balance",{balance:Dt(n.balanceInCurrency,a)}):(n.balanceInCoins,this.send("balance",{balance:n.balanceInCoins}));return;case"doGamePause":this.send("freeze");return;case"doGameResume":this.send("unfreeze");return;case"doGameSuspend":this.send("suspend");return;default:return}}catch{}})}registerFromSdkEvents(){this.on("close",()=>{if(this.sdkConfig.api.homeUrl)try{window.top.location=this.sdkConfig.api.homeUrl}catch{window.location=this.sdkConfig.api.homeUrl}else try{window.top.history.back()}catch{window.history.back()}})}}var hi="2.0.0-beta.3",ce="",gt="?",et="function",V="undefined",de="object",tt="string",be="major",l="model",r="name",d="type",u="vendor",c="version",S="architecture",Y="console",b="mobile",f="tablet",I="smarttv",Re="wearable",pt="xr",it="embedded",mt="user-agent",st=500,ot="brands",$="formFactors",rt="fullVersionList",Z="platform",ct="platformVersion",Ge="bitness",W="sec-ch-ua",gi=W+"-full-version-list",pi=W+"-arch",mi=W+"-"+Ge,wi=W+"-form-factors",bi=W+"-"+b,fi=W+"-"+l,Nt=W+"-"+Z,yi=Nt+"-version",Gt=[ot,rt,b,l,Z,ct,S,$,Ge],P="browser",B="cpu",R="device",D="engine",A="os",ee="result",Ce="Amazon",ge="Apple",wt="ASUS",bt="BlackBerry",Me="Google",ft="Huawei",yt="Lenovo",je="LG",xe="Microsoft",kt="Motorola",Se="Samsung",vt="Sharp",Te="Sony",Ke="Xiaomi",Xe="Zebra",Q="Mobile ",J=" Browser",Ie="Chrome",ki="Edge",pe="Firefox",me="Opera",Et="Facebook",Ct="Sogou",nt="Windows",vi=typeof window!==V,T=vi&&window.navigator?window.navigator:void 0,G=T&&T.userAgentData?T.userAgentData:void 0,Ei=function(s,t){var e={},i=t;if(!Ue(t)){i={};for(var n in t)for(var o in t[n])i[o]=t[n][o].concat(i[o]?i[o]:[])}for(var a in s)e[a]=i[a]&&i[a].length%2===0?i[a].concat(s[a]):s[a];return e},He=function(s){for(var t={},e=0;e<s.length;e++)t[s[e].toUpperCase()]=s[e];return t},at=function(s,t){if(typeof s===de&&s.length>0){for(var e in s)if(z(s[e])==z(t))return!0;return!1}return le(s)?z(t).indexOf(z(s))!==-1:!1},Ue=function(s,t){for(var e in s)return/^(browser|cpu|device|engine|os)$/.test(e)||(t?Ue(s[e]):!1)},le=function(s){return typeof s===tt},Qe=function(s){if(s){for(var t=[],e=j(/\\?\"/g,s).split(","),i=0;i<e.length;i++)if(e[i].indexOf(";")>-1){var n=fe(e[i]).split(";v=");t[i]={brand:n[0],version:n[1]}}else t[i]=fe(e[i]);return t}},z=function(s){return le(s)?s.toLowerCase():s},Je=function(s){return le(s)?j(/[^\d\.]/g,s).split(".")[0]:void 0},F=function(s){for(var t in s){var e=s[t];typeof e==de&&e.length==2?this[e[0]]=e[1]:this[e]=void 0}return this},j=function(s,t){return le(t)?t.replace(s,ce):t},we=function(s){return j(/\\?\"/g,s)},fe=function(s,t){if(le(s))return s=j(/^\s\s*/,s),typeof t===V?s:s.substring(0,st)},Mt=function(s,t){if(!(!s||!t))for(var e=0,i,n,o,a,h,g;e<t.length&&!h;){var m=t[e],w=t[e+1];for(i=n=0;i<m.length&&!h&&m[i];)if(h=m[i++].exec(s),h)for(o=0;o<w.length;o++)g=h[++n],a=w[o],typeof a===de&&a.length>0?a.length===2?typeof a[1]==et?this[a[0]]=a[1].call(this,g):this[a[0]]=a[1]:a.length===3?typeof a[1]===et&&!(a[1].exec&&a[1].test)?this[a[0]]=g?a[1].call(this,g,a[2]):void 0:this[a[0]]=g?g.replace(a[1],a[2]):void 0:a.length===4&&(this[a[0]]=g?a[3].call(this,g.replace(a[1],a[2])):void 0):this[a]=g||void 0;e+=2}},Le=function(s,t){for(var e in t)if(typeof t[e]===de&&t[e].length>0){for(var i=0;i<t[e].length;i++)if(at(t[e][i],s))return e===gt?void 0:e}else if(at(t[e],s))return e===gt?void 0:e;return t.hasOwnProperty("*")?t["*"]:s},St={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Tt={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},It={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[c,[r,Q+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[c,[r,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[r,c],[/opios[\/ ]+([\w\.]+)/i],[c,[r,me+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[c,[r,me+" GX"]],[/\bopr\/([\w\.]+)/i],[c,[r,me]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[c,[r,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[r,c],[/\bddg\/([\w\.]+)/i],[c,[r,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[c,[r,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[c,[r,"WeChat"]],[/konqueror\/([\w\.]+)/i],[c,[r,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[c,[r,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[c,[r,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[c,[r,"Smart "+yt+J]],[/(avast|avg)\/([\w\.]+)/i],[[r,/(.+)/,"$1 Secure"+J],c],[/\bfocus\/([\w\.]+)/i],[c,[r,pe+" Focus"]],[/\bopt\/([\w\.]+)/i],[c,[r,me+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[c,[r,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[c,[r,"Dolphin"]],[/coast\/([\w\.]+)/i],[c,[r,me+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[c,[r,"MIUI"+J]],[/fxios\/([\w\.-]+)/i],[c,[r,Q+pe]],[/\bqihu|(qi?ho?o?|360)browser/i],[[r,"360"+J]],[/\b(qq)\/([\w\.]+)/i],[[r,/(.+)/,"$1Browser"],c],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[r,/(.+)/,"$1"+J],c],[/samsungbrowser\/([\w\.]+)/i],[c,[r,Se+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[r,/_/g," "],c],[/metasr[\/ ]?([\d\.]+)/i],[c,[r,Ct+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[r,Ct+" Mobile"],c],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[r,c],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[r],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[r,Et],c],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[r,c],[/\bgsa\/([\w\.]+) .*safari\//i],[c,[r,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[c,[r,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[c,[r,Ie+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[r,Ie+" WebView"],c],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[c,[r,"Android"+J]],[/chrome\/([\w\.]+) mobile/i],[c,[r,Q+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[r,c],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[c,[r,Q+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[r,Q+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[c,r],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[r,[c,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[r,c],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[r,Q+pe],c],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[r,"Netscape"],c],[/(wolvic)\/([\w\.]+)/i],[r,c],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[c,[r,pe+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[r,[c,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[r,[c,/[^\d\.]+./,ce]]],cpu:[[/\b(?:(amd|x|x86[-_]?|wow|win)64)\b/i],[[S,"amd64"]],[/(ia32(?=;))/i,/((?:i[346]|x)86)[;\)]/i],[[S,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[S,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[S,"armhf"]],[/windows (ce|mobile); ppc;/i],[[S,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[S,/ower/,ce,z]],[/(sun4\w)[;\)]/i],[[S,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[S,z]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[u,Se],[d,f]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[l,[u,Se],[d,b]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[l,[u,ge],[d,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[u,ge],[d,f]],[/(macintosh);/i],[l,[u,ge]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[u,vt],[d,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[u,ft],[d,f]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[u,ft],[d,b]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[l,/_/g," "],[u,Ke],[d,b]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[u,Ke],[d,f]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[u,"OPPO"],[d,b]],[/\b(opd2\d{3}a?) bui/i],[l,[u,"OPPO"],[d,f]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[u,"Vivo"],[d,b]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[l,[u,"Realme"],[d,b]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[l,[u,kt],[d,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[u,kt],[d,f]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[u,je],[d,f]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[u,je],[d,b]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[u,yt],[d,f]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[u,"Nokia"],[d,b]],[/(pixel c)\b/i],[l,[u,Me],[d,f]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[u,Me],[d,b]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[u,Te],[d,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[u,Te],[d,f]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[u,"OnePlus"],[d,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[u,Ce],[d,f]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[u,Ce],[d,b]],[/(playbook);[-\w\),; ]+(rim)/i],[l,u,[d,f]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[u,bt],[d,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[u,wt],[d,f]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[u,wt],[d,b]],[/(nexus 9)/i],[l,[u,"HTC"],[d,f]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[u,[l,/_/g," "],[d,b]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[u,"Acer"],[d,f]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[u,"Meizu"],[d,b]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[l,[u,"Ulefone"],[d,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,l,[d,b]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[u,l,[d,f]],[/(surface duo)/i],[l,[u,xe],[d,f]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[u,"Fairphone"],[d,b]],[/(shield[\w ]+) b/i],[l,[u,"Nvidia"],[d,f]],[/(sprint) (\w+)/i],[u,l,[d,b]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[u,xe],[d,b]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[u,Xe],[d,f]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[u,Xe],[d,b]],[/smart-tv.+(samsung)/i],[u,[d,I]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[u,Se],[d,I]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,je],[d,I]],[/(apple) ?tv/i],[u,[l,ge+" TV"],[d,I]],[/crkey/i],[[l,Ie+"cast"],[u,Me],[d,I]],[/droid.+aft(\w+)( bui|\))/i],[l,[u,Ce],[d,I]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[u,vt],[d,I]],[/(bravia[\w ]+)( bui|\))/i],[l,[u,Te],[d,I]],[/(mitv-\w{5}) bui/i],[l,[u,Ke],[d,I]],[/Hbbtv.*(technisat) (.*);/i],[u,l,[d,I]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[u,fe],[l,fe],[d,I]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,I]],[/(ouya)/i,/(nintendo) (\w+)/i],[u,l,[d,Y]],[/droid.+; (shield) bui/i],[l,[u,"Nvidia"],[d,Y]],[/(playstation \w+)/i],[l,[u,Te],[d,Y]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[u,xe],[d,Y]],[/((pebble))app/i],[u,l,[d,Re]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[l,[u,ge],[d,Re]],[/droid.+; (wt63?0{2,3})\)/i],[l,[u,Xe],[d,Re]],[/droid.+; (glass) \d/i],[l,[u,Me],[d,pt]],[/(quest( \d| pro)?)/i],[l,[u,Et],[d,pt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[d,it]],[/(aeobc)\b/i],[l,[u,Ce],[d,it]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[l,[d,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[d,f]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,f]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,b]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[c,[r,ki+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[c,[r,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[r,c],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[c,r]],os:[[/microsoft (windows) (vista|xp)/i],[r,c],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[r,[c,Le,St]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,Le,St],[r,nt]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[c,/_/g,"."],[r,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[r,"macOS"],[c,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[c,r],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[r,c],[/\(bb(10);/i],[c,[r,bt]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[c,[r,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[c,[r,pe+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[c,[r,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[c,[r,"watchOS"]],[/crkey\/([\d\.]+)/i],[c,[r,Ie+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[r,"Chrome OS"],c],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[r,c],[/(sunos) ?([\w\.\d]*)/i],[[r,"Solaris"],c],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[r,c]]},Pe=function(){var s={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return F.call(s.init,[[P,[r,c,be,d]],[B,[S]],[R,[d,l,u]],[D,[r,c]],[A,[r,c]]]),F.call(s.isIgnore,[[P,[c,be]],[D,[c]],[A,[c]]]),F.call(s.isIgnoreRgx,[[P,/ ?browser$/i],[A,/ ?os$/i]]),F.call(s.toString,[[P,[r,c]],[B,[S]],[R,[u,l]],[D,[r,c]],[A,[r,c]]]),s}(),Ci=function(s,t){var e=Pe.init[t],i=Pe.isIgnore[t]||0,n=Pe.isIgnoreRgx[t]||0,o=Pe.toString[t]||0;function a(){F.call(this,e)}return a.prototype.getItem=function(){return s},a.prototype.withClientHints=function(){return G?G.getHighEntropyValues(Gt).then(function(h){return s.setCH(new Ht(h,!1)).parseCH().get()}):s.parseCH().get()},a.prototype.withFeatureCheck=function(){return s.detectFeature().get()},t!=ee&&(a.prototype.is=function(h){var g=!1;for(var m in this)if(this.hasOwnProperty(m)&&!at(i,m)&&z(n?j(n,this[m]):this[m])==z(n?j(n,h):h)){if(g=!0,h!=V)break}else if(h==V&&g){g=!g;break}return g},a.prototype.toString=function(){var h=ce;for(var g in o)typeof this[o[g]]!==V&&(h+=(h?" ":ce)+this[o[g]]);return h||V}),G||(a.prototype.then=function(h){var g=this,m=function(){for(var v in g)g.hasOwnProperty(v)&&(this[v]=g[v])};m.prototype={is:a.prototype.is,toString:a.prototype.toString};var w=new m;return h(w),w}),new a};function Ht(s,t){if(s=s||{},F.call(this,Gt),t)F.call(this,[[ot,Qe(s[W])],[rt,Qe(s[gi])],[b,/\?1/.test(s[bi])],[l,we(s[fi])],[Z,we(s[Nt])],[ct,we(s[yi])],[S,we(s[pi])],[$,Qe(s[wi])],[Ge,we(s[mi])]]);else for(var e in s)this.hasOwnProperty(e)&&typeof s[e]!==V&&(this[e]=s[e])}function Pt(s,t,e,i){return this.get=function(n){return n?this.data.hasOwnProperty(n)?this.data[n]:void 0:this.data},this.set=function(n,o){return this.data[n]=o,this},this.setCH=function(n){return this.uaCH=n,this},this.detectFeature=function(){if(T&&T.userAgent==this.ua)switch(this.itemType){case P:T.brave&&typeof T.brave.isBrave==et&&this.set(r,"Brave");break;case R:!this.get(d)&&G&&G[b]&&this.set(d,b),this.get(l)=="Macintosh"&&T&&typeof T.standalone!==V&&T.maxTouchPoints&&T.maxTouchPoints>2&&this.set(l,"iPad").set(d,f);break;case A:!this.get(r)&&G&&G[Z]&&this.set(r,G[Z]);break;case ee:var n=this.data,o=function(a){return n[a].getItem().detectFeature().get()};this.set(P,o(P)).set(B,o(B)).set(R,o(R)).set(D,o(D)).set(A,o(A))}return this},this.parseUA=function(){return this.itemType!=ee&&Mt.call(this.data,this.ua,this.rgxMap),this.itemType==P&&this.set(be,Je(this.get(c))),this},this.parseCH=function(){var n=this.uaCH,o=this.rgxMap;switch(this.itemType){case P:var a=n[rt]||n[ot],h;if(a)for(var g in a){var m=j(/(Google|Microsoft) /,a[g].brand||a[g]),w=a[g].version;!/not.a.brand/i.test(m)&&(!h||/chrom/i.test(h)&&!/chromi/i.test(m))&&(this.set(r,m).set(c,w).set(be,Je(w)),h=m)}break;case B:var v=n[S];v&&(v&&n[Ge]=="64"&&(v+="64"),Mt.call(this.data,v+";",o));break;case R:if(n[b]&&this.set(d,b),n[l]&&this.set(l,n[l]),n[l]=="Xbox"&&this.set(d,Y).set(u,xe),n[$]){var N;if(typeof n[$]!="string")for(var K=0;!N&&K<n[$].length;)N=Le(n[$][K++],Tt);else N=Le(n[$],Tt);this.set(d,N)}break;case A:var X=n[Z];if(X){var L=n[ct];X==nt&&(L=parseInt(Je(L),10)>=13?"11":"10"),this.set(r,X).set(c,L)}this.get(r)==nt&&n[l]=="Xbox"&&this.set(r,"Xbox").set(c,void 0);break;case ee:var ue=this.data,O=function(_){return ue[_].getItem().setCH(n).parseCH().get()};this.set(P,O(P)).set(B,O(B)).set(R,O(R)).set(D,O(D)).set(A,O(A))}return this},F.call(this,[["itemType",s],["ua",t],["uaCH",i],["rgxMap",e],["data",Ci(this,s)]]),this}function x(s,t,e){if(typeof s===de?(Ue(s,!0)?(typeof t===de&&(e=t),t=s):(e=s,t=void 0),s=void 0):typeof s===tt&&!Ue(t,!0)&&(e=t,t=void 0),!(this instanceof x))return new x(s,t,e).getResult();var i=typeof s===tt?s:T&&T.userAgent?T.userAgent:e&&e[mt]?e[mt]:ce,n=new Ht(e,!0),o=t?Ei(It,t):It,a=function(h){return h==ee?function(){return new Pt(h,i,o,n).set("ua",i).set(P,this.getBrowser()).set(B,this.getCPU()).set(R,this.getDevice()).set(D,this.getEngine()).set(A,this.getOS()).get()}:function(){return new Pt(h,i,o[h],n).parseUA().get()}};return F.call(this,[["getBrowser",a(P)],["getCPU",a(B)],["getDevice",a(R)],["getEngine",a(D)],["getOS",a(A)],["getResult",a(ee)],["getUA",function(){return i}],["setUA",function(h){return le(h)&&(i=h.length>st?fe(h,st):h),this}]]).setUA(i),this}x.VERSION=hi;x.BROWSER=He([r,c,be,d]);x.CPU=He([S]);x.DEVICE=He([l,u,d,Y,b,I,f,Re,it]);x.ENGINE=x.OS=He([r,c]);class Vt{constructor(t,e){p(this,"config");p(this,"sdkConfig");this.config=t,this.sdkConfig=e}on(t,e,i){const n=function(a){a.data.message!==`kalamba:wrapper-rgs:${t}`&&a.data.message!==`kalamba:wrapper:${t}`||e(a.data.payload)};window.addEventListener("message",n,i)}send(t,...[e]){window.postMessage({message:`kalamba:rgs:${t}`,payload:e})}}class Mi{constructor(t){p(this,"socket",null);p(this,"webSocketUrl");p(this,"eventListeners",{close:[],error:[],message:[]});p(this,"connect",async()=>{const t=new WebSocket(this.webSocketUrl);return t.addEventListener("message",this.handleMessage),new Promise(e=>{t.addEventListener("open",i=>{this.handleOpen(i),e(this.socket)},{once:!0})})});p(this,"send",t=>{if(this.socket==null)throw new Error("Cannot send message, the WebSocket connection is not open");this.socket.send(t)});p(this,"close",()=>{if(this.socket==null)throw new Error("Cannot close the WebSocket connection that is not open");this.socket.close()});p(this,"handleClose",t=>{this.eventListeners.close.forEach(e=>{e(t)}),this.socket.removeEventListener("message",this.handleMessage),this.socket.removeEventListener("close",this.handleClose),this.socket.removeEventListener("error",this.handleError),this.socket=null});p(this,"handleError",t=>{this.eventListeners.error.forEach(e=>{e(t)})});p(this,"handleMessage",t=>{this.eventListeners.message.forEach(e=>{e(t)})});p(this,"handleOpen",t=>{const e=t.target;e.addEventListener("close",this.handleClose),e.addEventListener("error",this.handleError),this.socket=e});this.webSocketUrl=t}addEventListener(t,e){this.eventListeners[t].push(e)}removeEventListener(t,e){const i=this.eventListeners[t].indexOf(e);i!==-1&&this.eventListeners[t].splice(i,1)}}function Ae(s){return JSON.parse(s==null?void 0:s.data)}function Si(s){var t;return((t=s==null?void 0:s.header)==null?void 0:t.name)==="Ping"}function At(s){var t;return((t=s==null?void 0:s.header)==null?void 0:t.name)==="RealityCheck"}function _e(s){return s.header.name==="GameEvent"}function Ti(s){return _e(s)&&s.body.event==="OPEN_GAME"}function Ot(s){return s.header.code!==1}function Ii(s){return _e(s)&&s.body.event.includes("_RESULT")}var te,ye;class Pi extends Mi{constructor(e,i){const n=new URL(e.apiUrl);n.searchParams.set("cageCode",e.cageCode),n.searchParams.set("gameCode",e.gameCode),n.searchParams.set("operatorCode",e.operatorCode),n.searchParams.set("playMode",e.playMode),n.searchParams.set("token",e.token),n.searchParams.set("username",e.username);super(n.toString());p(this,"cId",0);p(this,"mId",0);p(this,"seqId",0);p(this,"gameCode");M(this,te,void 0);M(this,ye,void 0);p(this,"onMessage",e=>{const i=Ae(e);(_e(i)||Si(i)||At(i))&&this.sendAcknowledgement(i),At(i)&&this.handleRealityCheck(i)});this.eventListeners.realityCheck=[],this.gameCode=e.gameCode,k(this,te,i.requestTimeoutMs),k(this,ye,i.gameVersion??"unknown"),this.addEventListener("message",this.onMessage)}handleRealityCheck(e){this.eventListeners.realityCheck.forEach(i=>{i(e.body)})}addEventListener(e,i){super.addEventListener(e,i)}removeEventListener(e,i){super.removeEventListener(e,i)}buildHeader(e,i=null){return{cId:i??++this.cId,code:i!==null?1:void 0,mId:++this.mId,name:e}}buildPayload(e,i){return JSON.stringify({body:i,header:e})}getBodyExtras(e){return{action:e,seqId:++this.seqId}}request(e,i){const n=this.buildPayload(e,i);return new Promise((o,a)=>{setTimeout(()=>a({type:"timeout"}),y(this,te));const h=g=>{const m=Ae(g);try{e.cId===m.header.cId&&(this.removeEventListener("message",h),m.header.code===1?o(m):a({message:m,type:"error"}))}catch{a({message:m,type:"error"})}};this.addEventListener("message",h),this.send(n)})}freeRounds(e){const i=this.buildHeader("ActivateFreeRound");return this.request(i,e).then(n=>n.body).catch(n=>{var o;throw{data:(o=n==null?void 0:n.message)==null?void 0:o.body,type:n.type}})}async authenticate(e=!1){const i=this.buildHeader("Authenticate"),n={clientType:3,version:y(this,ye),reconnect:e};return this.request(i,n).then(o=>o.body).catch(o=>{var a;throw{data:(a=o==null?void 0:o.message)==null?void 0:a.body,type:o.type}})}async openGame(){const e=this.buildHeader("OpenGame"),i={gameCode:this.gameCode};return new Promise((n,o)=>{const a=h=>{const g=Ae(h);Ti(g)?(this.removeEventListener("message",a),n(g.body)):Ot(g)&&o({data:g.body,type:"error"})};this.addEventListener("message",a),this.request(e,i).catch(h=>{var g;return o({data:(g=h==null?void 0:h.message)==null?void 0:g.body,type:h.type})})})}sendAcknowledgement(e){const{name:i,cId:n}=e.header,o=this.buildHeader(i,n),a=this.buildPayload(o,{});this.send(a)}sendAction(e,i){const n=this.buildHeader("GameAction"),o={...this.getBodyExtras(e),data:i};return new Promise((a,h)=>{const g=m=>{const w=Ae(m);_e(w)&&o.seqId===w.body.correlationSeqId&&(this.removeEventListener("message",g),Ii(w)?a(w.body):Ot(w)&&h({data:w.body,type:"error"}))};this.addEventListener("message",g),this.request(n,o).catch(m=>{var w;return h({data:(w=m==null?void 0:m.message)==null?void 0:w.body,type:m.type})})})}setRequestTimeoutMs(e){k(this,te,e)}}te=new WeakMap,ye=new WeakMap;function zt(s){const t=s.contract;return t?{contract:{balance:{coins:t.balance,version:t.balanceVersion},coinValueInCents:t.coinValueInCents,country:t.countryCode,currency:t.currencyCode,jurisdiction:t.jurisdictionCode,uiMessages:t.uiMessages,username:t.username}}:{contract:{balance:{coins:s.balance,version:s.balanceVersion},coinValueInCents:s.coinValueInCents,country:s.countryCode,currency:s.currencyCode,jurisdiction:s.jurisdictionCode,uiMessages:s.uiMessages,username:s.username}}}function qt(s){var t,e;return{code:((t=s.data)==null?void 0:t.code)??Ne.RgsErrorCode.UNKNOWN,details:(e=s.data)==null?void 0:e.details}}function Wt(s,t){const e=t.contract;if(!e){const i=t.data;return{contract:{bet:{available:i.additionalConfigData.availableMultipliersPerBaseBet,default:{base:i.additionalConfigData.defaultBet.baseBet,multiplier:i.additionalConfigData.defaultBet.betMultiplier},max:i.additionalConfigData.maxAllowedOverallBetInCoins,last:i.gameState.betFromCurrentRound?{base:i.gameState.betFromCurrentRound.baseBet,multiplier:i.gameState.betFromCurrentRound.betMultiplier}:null,lastPaid:i.gameState.lastPlacedMainGameBet?{base:i.gameState.lastPlacedMainGameBet.baseBet,multiplier:i.gameState.lastPlacedMainGameBet.betMultiplier}:null},balance:{coins:t.balance,version:t.balanceVersion},freeRounds:(i.FREE_ROUNDS??[]).map(n=>({conf:{base:n.conf.baseBet,multiplier:n.conf.betMultiplier,numAwarded:n.conf.numAwarded},data:{numPlayed:n.data.numPlayed,win:n.data.winAmount,numLeft:n.data.numLeft},id:n.id,rejectable:n.rejectable,skippable:n.skippable,status:n.status,type:n.type})),gameModel:i.additionalConfigData.gameModelFile,metaData:i.gameConfigData.metaData,roundId:i.gameState.cycleId,serverTime:t.balanceVersion,sessionId:i.gameState.sessionId,stateType:{thisRound:i.gameState.stateTypeThisRound,nextRound:i.gameState.stateTypeNextRound},uiMessages:s.uiMessages,win:{round:i.gameState.totalWinFromCurrentRound,total:i.gameState.totalWinFromCurrentGameCycle}},data:i}}return{contract:{bet:{available:e.availableMultipliersPerBaseBet,default:{base:e.defaultBet.baseBet,multiplier:e.defaultBet.betMultiplier},max:e.maxBetInCoins,last:e.lastBet?{base:e.lastBet.baseBet,multiplier:e.lastBet.betMultiplier}:null,lastPaid:e.lastMainGameBet?{base:e.lastMainGameBet.baseBet,multiplier:e.lastMainGameBet.betMultiplier}:null},balance:{coins:e.balanceInCoins,version:e.balanceVersion},freeRounds:(e.freeRounds??[]).map(i=>({conf:{base:i.conf.baseBet,multiplier:i.conf.betMultiplier,numAwarded:i.conf.numAwarded},data:{numPlayed:i.data.numPlayed,win:i.data.winAmount,numLeft:i.data.numLeft},id:i.id,rejectable:i.rejectable,skippable:i.skippable,status:i.status,type:i.type})),gameModel:e.gameModelFile,metaData:e.metaData,roundId:e.roundId,serverTime:e.serverTime,sessionId:e.sessionId,stateType:{thisRound:e.stateTypeThisRound,nextRound:e.stateTypeNextRound},uiMessages:s.contract.uiMessages.concat(e.uiMessages),win:{round:e.roundWin,total:e.totalWin}},data:t.opaqueGameServerToUi}}function $t(s){var t,e;return{code:((t=s.data)==null?void 0:t.code)??Ne.RgsErrorCode.UNKNOWN,details:(e=s.data)==null?void 0:e.details}}function jt(s){const t=s.contract;if(!t){const e=s.data;return{contract:{bet:{last:e.gameState.betFromCurrentRound?{base:e.gameState.betFromCurrentRound.baseBet,multiplier:e.gameState.betFromCurrentRound.betMultiplier}:null,lastPaid:{base:e.gameState.lastPlacedMainGameBet.baseBet,multiplier:e.gameState.lastPlacedMainGameBet.betMultiplier}},balance:{coins:s.balance,version:s.balanceVersion},freeRounds:(e.FREE_ROUNDS??[]).map(i=>({conf:{base:i.conf.baseBet,multiplier:i.conf.betMultiplier,numAwarded:i.conf.numAwarded},data:{numPlayed:i.data.numPlayed,win:i.data.winAmount,numLeft:i.data.numLeft},id:i.id,rejectable:i.rejectable,skippable:i.skippable,status:i.status,type:i.type})),serverTime:s.balanceVersion,roundId:e.gameState.cycleId,stateType:{thisRound:e.gameState.stateTypeThisRound,nextRound:e.gameState.stateTypeNextRound},uiMessages:e.uiMessages,win:{round:e.gameState.totalWinFromCurrentRound,total:e.gameState.totalWinFromCurrentGameCycle}},data:e}}return{contract:{bet:{last:t.lastBet?{base:t.lastBet.baseBet,multiplier:t.lastBet.betMultiplier}:null,lastPaid:{base:t.lastMainGameBet.baseBet,multiplier:t.lastMainGameBet.betMultiplier}},balance:{coins:t.balanceInCoins,version:t.balanceVersion},freeRounds:(t.freeRounds??[]).map(e=>({conf:{base:e.conf.baseBet,multiplier:e.conf.betMultiplier,numAwarded:e.conf.numAwarded},data:{numPlayed:e.data.numPlayed,win:e.data.winAmount,numLeft:e.data.numLeft},id:e.id,rejectable:e.rejectable,skippable:e.skippable,status:e.status,type:e.type})),serverTime:t.serverTime,roundId:t.roundId,stateType:{thisRound:t.stateTypeThisRound,nextRound:t.stateTypeNextRound},uiMessages:t.uiMessages,win:{round:t.roundWin,total:t.totalWin}},data:s.opaqueGameServerToUi}}function Kt(s){var t,e;return{code:((t=s.data)==null?void 0:t.code)??Ne.RgsErrorCode.UNKNOWN,details:(e=s.data)==null?void 0:e.details}}const Ai={parseAuthenticateResponse:zt,parseAuthenticateError:qt,parseOpenGameResponse:Wt,parseOpenGameError:$t,parsePlayResponse:jt,parsePlayError:Kt},Oi={bul:"bg",chi:"zh",zho:"zh",hrv:"hr",cze:"cs",dan:"da",dut:"nl",eng:"en",est:"et",fin:"fi",fra:"fr",ger:"de",gre:"el",hun:"hu",ind:"id",ita:"it",jpn:"ja",kor:"ko",nor:"no",pol:"pl",por:"pt",rum:"ro",rus:"ru",srp:"sr",slo:"sk",spa:"es",swe:"sv",tha:"th",tur:"tr",ukr:"uk",vie:"vi"},{device:Ri}=x(navigator.userAgent),xi=U("KalambaBullseyePlugin","color:#000000;font-weight:bold;");class Ui extends Vt{constructor(...e){super(...e);p(this,"socket");this.on("openGame",async()=>{try{const i=await this.openGame();this.send("openGameResponse",i)}catch(i){this.send("openGameError",i)}}),this.on("play",async i=>{try{const n=await this.play(i);this.send("playResponse",n)}catch(n){this.send("playError",n)}}),this.on("freeRounds",async i=>{try{await this.socket.freeRounds(i),this.send("freeRoundsResponse",i)}catch(n){this.send("freeRoundsError",n)}}),this.on("configured",i=>{this.socket.setRequestTimeoutMs(i.ui.requestTimeoutMs)}),this.registerFromSdkEvents()}initialize(e){this.socket=new Pi(e,{gameVersion:this.config.gameVersion,requestTimeoutMs:this.sdkConfig.ui.requestTimeoutMs}),["deeprush","sharkstrike","fireboltroulette"].includes(e.gameCode)||(this.socket.addEventListener("close",i=>{i.code===1008?this.send("error",{type:"CLOSE",messageCode:"TOO_MANY_OPEN_GAMES",messageKey:"RgsError.TOO_MANY_OPEN_GAMES"}):i.code===1011||this.reconnect()}),["mobile","tablet"].includes(Ri.type??"")&&document.addEventListener("visibilitychange",async()=>{document.hidden||(this.socket.socket?this.socket.socket&&[WebSocket.CONNECTING,WebSocket.OPEN].includes(this.socket.socket.readyState)&&this.socket.close():this.reconnect())})),this.socket.addEventListener("error",i=>xi("error",i)),this.socket.addEventListener("realityCheck",i=>{this.send("realityCheck",i)})}async reconnect(){try{await this.socket.connect(),await this.socket.authenticate(!0),await this.socket.openGame()}catch{this.send("error",{type:"CLOSE",messageCode:"CONNECTION_ERROR",messageKey:"RgsError.CONNECTION_ERROR"})}}async openGame(){const e=new URLSearchParams(window.location.search),i=e.get("apiUrl"),n=e.get("cageCode"),o=e.get("gameCode"),a=e.get("operatorCode"),h=e.get("playMode"),g=e.get("token"),m=e.get("username"),w=e.get("gameHistoryUrl"),v=e.get("homeUrl")??void 0,N=e.get("cashierUrl")??void 0;this.initialize({apiUrl:i,cageCode:n,gameCode:o,operatorCode:a,playMode:h,token:g,username:m});try{await this.socket.connect()}catch{throw{type:"error",data:{code:Ne.RgsErrorCode.CONNECTION_ERROR}}}let K;try{K=await this.socket.authenticate()}catch(_){throw{type:_.type,data:_.type==="error"?qt(_.data):void 0}}let X;try{X=await this.socket.openGame()}catch(_){throw{type:_.type,data:_.type==="error"?$t(_.data):void 0}}const L=zt(K),ue=Wt(K,X);this.sdkConfig.api={brand:n,game:o,integration:a,jurisdiction:L.contract.jurisdiction,playMode:h,user:L.contract.username,integrationData:{token:g},country:L.contract.country,currency:L.contract.currency,coinValueInCents:L.contract.coinValueInCents,gameHistoryUrl:w,homeUrl:v,cashierUrl:N,sessionId:ue.contract.sessionId,lastRoundId:ue.contract.roundId};const O=e.get("languageCode");return O&&(this.sdkConfig.ui.language=O.length===3?Oi[O]??O:O),ue}async play(e){for(;!this.socket.socket;)await new Promise(v=>setTimeout(()=>v(),500));const{contract:{bet:i,forcedOutcomes:n,...o},extra:a,payloadToInject:h,actionType:g}=e,m={bet:i?{baseBet:i.base,betMultiplier:i.multiplier}:void 0,forcedOutcomes:n,...o,...h,opaqueUiToGameServer:a};let w;try{w=await this.socket.sendAction(g,m)}catch(v){throw{type:v.type,data:v.type==="error"?Kt(v.data):void 0}}return jt(w)}registerFromSdkEvents(){this.on("history",()=>{const{api:{game:e,integration:i,integrationData:n,jurisdiction:o,user:a,gameHistoryUrl:h},ui:{language:g}}=this.sdkConfig,m=a.replace(/^user_/,"").replace(new RegExp(`_${i}$`),""),w=new URL(h);w.searchParams.set("gameCode",e),w.searchParams.set("jurisdiction",o),w.searchParams.set("operatorCode",i),w.searchParams.set("token",n.token),w.searchParams.set("username",m),w.searchParams.set("languageCode",g),this.config.gameHistoryUrl&&w.searchParams.set("gameHistoryUrl",this.config.gameHistoryUrl),window.open(w.toString(),"_blank")})}}class Xt{constructor(t,e,i){p(this,"trackers");p(this,"config");p(this,"sdkConfig");this.trackers=t,this.config=e,this.sdkConfig=i}on(t,e,i){const n=function(a){a.data.message!==`kalamba:wrapper-telemetry:${t}`&&a.data.message!==`kalamba:wrapper:${t}`||e(a.data.payload)};window.addEventListener("message",n,i)}track(t,e){this.trackers.forEach(i=>i.track(t,e))}}function Rt(s){return s.reduce((t,e)=>t+e,0)}function Li(s){const t=s.length,e=Rt(s)/t,i=s.map(o=>Math.pow(o-e,2)),n=Rt(i)/t;return Math.sqrt(n)}class xt{constructor(){p(this,"rafId",-1);p(this,"startTime",0);p(this,"stopTime",0);p(this,"frames",[]);p(this,"calculateFPS",()=>{const t=Math.floor((this.stopTime-this.startTime)/1e3);return this.frames.map(e=>Math.floor((e-this.startTime)/1e3)).reduce((e,i,n,o)=>(o[n]!==o[n-1]?e.push(1):e[e.length-1]++,e),[]).slice(0,t)});p(this,"getReport",()=>{const t=this.calculateFPS(),e=Math.floor(this.frames.length/((this.stopTime-this.startTime)/1e3)),i=t.length>0?Math.max(...t):e,n=t.length>0?Math.min(...t):e,o=t.length>0?Li(t):0;return{fpsAvg:e,fpsMax:i,fpsMin:n,fpsStdDev:o}});p(this,"start",()=>{this.startTime=Date.now(),this.frames=[],this.trackFrames()});p(this,"stop",()=>{cancelAnimationFrame(this.rafId),this.stopTime=Date.now()});p(this,"trackFrames",()=>{this.frames.push(Date.now()),this.rafId=requestAnimationFrame(this.trackFrames)})}}const _i="landscape",Bi="portrait";function Di(){try{const s=document.createElement("canvas");return!!window.WebGLRenderingContext&&(s.getContext("webgl")||s.getContext("experimental-webgl"))instanceof WebGLRenderingContext}catch{return!1}}async function Fi(){if(!window.createImageBitmap)return!1;const e=await(await fetch("data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=")).blob();try{return await createImageBitmap(e),!0}catch{return!1}}function Ye(){return window.innerWidth>=window.innerHeight?_i:Bi}var Be,ie,se,ne,ke,De,ve,Fe;class Ni extends Xt{constructor(...e){super(...e);p(this,"FPS_SAMPLE_INTERVAL",1e4);M(this,Be,0);M(this,ie,void 0);M(this,se,void 0);M(this,ne,void 0);M(this,ke,!1);M(this,De,!1);M(this,ve,"");M(this,Fe,[]);k(this,se,{}),k(this,ne,this.deviceInfo()),k(this,ie,this.config.gameVersion),this.on("state",({balance:i})=>{k(this,Be,i)}),this.on("autoplay",({action:i})=>{["start","resume"].includes(i)?k(this,ke,!0):k(this,ke,!1)}),this.on("settings",({fastPlay:i})=>{i!==void 0&&k(this,De,i)}),this.registerEvents()}async registerEvents(){y(this,ne).then(e=>{this.track("Device Information",e)}),this.on("loadStart",()=>{this.track("Game Loading",{progress:0,step:"initial"})}),this.on("loadProgress",e=>{this.track("Game Loading",{progress:e.progress})}),this.on("loadEnd",()=>{this.track("Game Loading",{progress:100,step:"complete"})}),this.on("error",e=>{this.track("System Message",{systemMessageText:e.messageCode,systemMessageType:e.type})}),this.on("openGameResponse",async e=>{k(this,ve,e.contract.stateType.nextRound),k(this,se,{balanceInCoins:e.contract.balance.coins,clientVersion:y(this,ie),coinValueInCents:this.sdkConfig.api.coinValueInCents,coinValueInCentsFloat:this.sdkConfig.api.coinValueInCents,currency:this.sdkConfig.api.currency,defaultBaseBet:e.contract.bet.default.base,defaultBetMultiplier:e.contract.bet.default.multiplier,environment:"release",gameCode:this.sdkConfig.api.game,gameCodeServer:this.sdkConfig.api.game,gameModelFile:e.contract.gameModel,jurisdiction:this.sdkConfig.api.jurisdiction,languageCode:this.sdkConfig.ui.language,operatorName:"kalamba",partnerId:this.sdkConfig.api.brand,partnerParentId:this.sdkConfig.api.integration,platform:"WEB",playMode:this.sdkConfig.api.playMode,referrer:window.location.hostname,serverVersion:e.contract.metaData.version}),this.track("Game Open",y(this,se))}),this.on("playCycleEnd",async e=>{const i=await y(this,ne),{base:n,multiplier:o,specialAction:a}=e.contract.bet.lastPaid??{},h=e.contract.balance.coins,g=e.contract.bet.lastPaid.base*e.contract.bet.lastPaid.multiplier,m=e.contract.win.total,w=m-g,v=a||"spin",N=e.contract.roundId;this.track("Betting Activity",{balance:h-w,balanceAfter:h,baseBet:n,betMultiplier:o,betType:v,gameVersion:y(this,ie),coinValueInCents:this.sdkConfig.api.coinValueInCents,coinValueInCentsFloat:this.sdkConfig.api.coinValueInCents,currency:this.sdkConfig.api.currency,environment:"release",gameCode:this.sdkConfig.api.game,gameCodeServer:this.sdkConfig.api.game,isMobile:i.isMobile,netResult:w,operatorName:"kalamba",orientation:Ye(),partnerId:this.sdkConfig.api.brand,partnerParentId:this.sdkConfig.api.integration,platform:"WEB",playMode:this.sdkConfig.api.playMode,roundId:N,roundTypes:["BaseGame"],totalBet:g,totalWin:m}),k(this,Fe,[])}),this.on("telemetry.click",e=>{this.track("UI Interaction",{action:"click",...this.getExtraUiInteractionData(),...e})}),this.on("telemetry.orientationChange",()=>{this.track("UI Interaction",{action:"orientationChange",...this.getExtraUiInteractionData()})}),this.reportFpsSample(),this.reportFpsRound()}reportFpsSample(){const e=new xt,i=()=>{e.stop();const o=e.getReport();this.track("FPS Performance",{...o,fpsType:"sample"}),n()},n=async()=>{e.start(),setTimeout(i,this.FPS_SAMPLE_INTERVAL)};n()}reportFpsRound(){const e=new xt;this.on("playCycleStart",()=>{e.start()}),this.on("playCycleEnd",()=>{e.stop();const i=e.getReport();this.track("FPS Performance",{...i,fpsType:"playCycleStart->playCycleEnd"})})}getExtraUiInteractionData(){return{orientation:Ye(),stateType:y(this,ve)}}async deviceInfo(){var h;const{browser:e,device:i,os:n}=x(navigator.userAgent),o=Di(),a=await Fi();return{browserName:e.name,browserVersion:e.version,connection:(h=navigator.connection)==null?void 0:h.effectiveType,deviceName:i.model,deviceType:i.type,isMobile:["mobile","tablet"].includes(i.type??""),isWebGLSupported:o,isWebPSupported:a,manufacturer:i.vendor,operatingSystem:n.name,operatingSystemVersion:n.version,orientation:Ye(),pixelRatio:window.devicePixelRatio,screenHeight:window.screen.height,screenSize:`${window.screen.width}x${window.screen.height}`,screenWidth:window.screen.width,timezoneOffsetMinutes:new Date().getTimezoneOffset(),windowHeight:window.innerHeight,windowSize:`${window.innerWidth}x${window.innerHeight}`,windowWidth:window.innerWidth}}}Be=new WeakMap,ie=new WeakMap,se=new WeakMap,ne=new WeakMap,ke=new WeakMap,De=new WeakMap,ve=new WeakMap,Fe=new WeakMap;var C=[];for(var Ze=0;Ze<256;++Ze)C.push((Ze+256).toString(16).slice(1));function Gi(s,t=0){return(C[s[t+0]]+C[s[t+1]]+C[s[t+2]]+C[s[t+3]]+"-"+C[s[t+4]]+C[s[t+5]]+"-"+C[s[t+6]]+C[s[t+7]]+"-"+C[s[t+8]]+C[s[t+9]]+"-"+C[s[t+10]]+C[s[t+11]]+C[s[t+12]]+C[s[t+13]]+C[s[t+14]]+C[s[t+15]]).toLowerCase()}var Oe,Hi=new Uint8Array(16);function Vi(){if(!Oe&&(Oe=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Oe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Oe(Hi)}var zi=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Ut={randomUUID:zi};function Lt(s,t,e){if(Ut.randomUUID&&!t&&!s)return Ut.randomUUID();s=s||{};var i=s.random||(s.rng||Vi)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){e=e||0;for(var n=0;n<16;++n)t[e+n]=i[n];return t}return Gi(i)}class dt{constructor(t,e){p(this,"config");p(this,"sdkConfig");this.config=t,this.sdkConfig=e}}const _t=25,Bt=1e4;var ae,oe,re,H,Ee;class qi extends dt{constructor(...e){super(...e);M(this,ae,"https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");M(this,oe,void 0);M(this,re,void 0);M(this,H,[]);M(this,Ee,void 0);p(this,"processQueueForced");k(this,oe,new Date().getTime()),k(this,H,[]),k(this,Ee,Lt()),this.processQueueForced=this.processQueue.bind(this,!0),this.schedule(),fetch(y(this,ae),{method:"OPTIONS"}).catch(ut.noop),this.subscribe()}subscribe(){window.addEventListener("beforeunload",this.processQueueForced,!1),window.addEventListener("pagehide",this.processQueueForced,!1),window.addEventListener("visibilitychange",this.processQueueForced,!1)}schedule(){y(this,re)&&clearTimeout(y(this,re)),k(this,re,window.setTimeout(()=>this.processQueue(),Bt))}send(e){k(this,oe,new Date().getTime());try{navigator.sendBeacon(y(this,ae),JSON.stringify(e))}catch{fetch(y(this,ae),{body:JSON.stringify(e),method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0}).catch(ut.noop)}this.schedule()}addToQueue(e){y(this,H).push(e),this.processQueue()}processQueue(e=!1){if(!(this.sdkConfig==null||!this.sdkConfig.ui.feature.allowTelemetry)&&!(!e&&y(this,H).length<_t&&new Date().getTime()-y(this,oe)<Bt))for(;y(this,H).length;){const i=y(this,H).splice(0,_t).map(n=>({...n,sessionID:y(this,Ee),userID:this.sdkConfig.api.user}));this.send(i)}}track(e,i){this.addToQueue({eventName:e,eventParams:i,eventTimestamp:new Date().getTime(),eventUUID:Lt()})}}ae=new WeakMap,oe=new WeakMap,re=new WeakMap,H=new WeakMap,Ee=new WeakMap;const Wi=U("LoggingTracker","color:#000000;font-weight:bold;");class $i extends dt{track(t,e){Wi(`@${this.sdkConfig.api.user}`,`[${t}]`,e)}}exports.BasicPlugin=Zt;exports.CasinoPlugin=q;exports.DebuggingPlugin=ti;exports.GigPlugin=si;exports.KalambaBullseyeParsers=Ai;exports.KalambaBullseyePlugin=Ui;exports.KalambaStargazerPlugin=Ni;exports.KalambaStargazerTracker=qi;exports.LoggingTracker=$i;exports.OryxPlugin=ai;exports.PariplayPlugin=di;exports.RelaxFEIMPlugin=li;exports.RgsPlugin=Vt;exports.TelemetryPlugin=Xt;exports.Tracker=dt;exports.TukoPlugin=ui;
|
|
5
|
+
"use strict";var Qt=Object.defineProperty;var Jt=(s,t,e)=>t in s?Qt(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var p=(s,t,e)=>(Jt(s,typeof t!="symbol"?t+"":t,e),e),lt=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var y=(s,t,e)=>(lt(s,t,"read from private field"),e?e.call(s):t.get(s)),M=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},k=(s,t,e,i)=>(lt(s,t,"write to private field"),i?i.call(s,e):t.set(s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ne=require("./errors-358575c3.cjs"),ut=require("./noop-b3c54b76.cjs");function U(s,t){return(e,...i)=>{console.log(`[%c${s}\x1B[m] %s`,t,e,...i)}}function Ft(s,t){return Math.round(s*100/t)}class q{constructor(t,e){p(this,"config");p(this,"sdkConfig");this.config=t,this.sdkConfig=e}on(t,e,i){const n=function(a){a.data.message!==`kalamba:wrapper-casino:${t}`&&a.data.message!==`kalamba:wrapper:${t}`||e(a.data.payload)};window.addEventListener("message",n,i)}send(t,...[e]){window.postMessage({message:`kalamba:casino:${t}`,payload:e})}}const Yt=U("BasicPlugin","color:#000000;font-weight:bold;");class Zt extends q{constructor(...t){super(...t),this.registerToSdkEvents(),this.registerFromSdkEvents(),Yt("configured")}registerToSdkEvents(){window.addEventListener("message",t=>{try{const{type:e,payload:i}=t.data;switch(e){case"doAudioSettings":this.send("settings",{music:i==null?void 0:i.musicEnabled,sounds:i==null?void 0:i.soundEnabled});return;case"doBalanceUpdate":const{currency:n,coinValueInCents:o}=this.sdkConfig.api;i.currency===n&&typeof i.balanceInCurrency=="number"?this.send("balance",{balance:Ft(i.balanceInCurrency,o)}):(i.balanceInCoins,this.send("balance",{balance:i.balanceInCoins}));return;case"doGamePause":this.send("freeze");return;case"doGameResume":this.send("unfreeze");return;case"doGameSuspend":this.send("suspend");return;default:return}}catch{}})}registerFromSdkEvents(){this.on("close",()=>{if(this.sdkConfig.api.homeUrl)try{window.top.location=this.sdkConfig.api.homeUrl}catch{window.location=this.sdkConfig.api.homeUrl}else try{window.top.history.back()}catch{window.history.back()}})}}const E=U("▼ DebuggingPlugin IN ▼","color:#444444;font-weight:bold;"),ei=U("▲ DebuggingPlugin OUT ▲","color:#444444;font-weight:bold;");class ti extends q{constructor(...t){super(...t),this.registerDebugToSdkEvents(),this.registerSdkToDebugEvents()}registerDebugToSdkEvents(){window.DebuggingPlugin={balance:t=>this._send("balance",t),bet:t=>this._send("bet",t),choice:t=>this._send("choice",t),close:t=>this._send("close",t),help:t=>this._send("help",t),history:t=>this._send("history",t),freeze:t=>this._send("freeze",t),paytable:t=>this._send("paytable",t),settings:t=>this._send("settings",t),suspend:t=>this._send("suspend",t),unfreeze:t=>this._send("unfreeze",t)}}registerSdkToDebugEvents(){this.on("autoplay",t=>E("autoplay",t)),this.on("balance",t=>E("balance",t)),this.on("bet",t=>E("bet",t)),this.on("cashier",t=>E("cashier",t)),this.on("choice",t=>E("choice",t)),this.on("close",t=>E("close",t)),this.on("error",t=>E("error",t)),this.on("loadEnd",t=>E("loadEnd",t)),this.on("loadProgress",t=>E("loadProgress",t)),this.on("loadStart",t=>E("loadStart",t)),this.on("playCycleStart",t=>E("playCycleStart",t)),this.on("playCycleEnd",t=>E("playCycleEnd",t)),this.on("playEnd",t=>E("playEnd",t)),this.on("playError",t=>E("playError",t)),this.on("playReady",t=>E("playReady",t)),this.on("playStart",t=>E("playStart",t)),this.on("settings",t=>E("settings",t))}_send(...t){ei(...t),this.send(...t)}}const ii=U("GigPlugin","color:#000000;font-weight:bold;");class si extends q{constructor(...t){super(...t),this.registerToSdkEvents(),this.registerFromSdkEvents(),ii("configured")}postMessage(t){const e={event:t};window.top.postMessage(e,"*")}registerToSdkEvents(){window.addEventListener("message",t=>{try{const{data:e}=t;switch(e){case"STOP_AUTO_PLAY":this.send("suspend");return;case"BLOCK_BETS":this.send("freeze");return;case"UNBLOCK_BETS":this.send("unfreeze");return;default:return}}catch{}})}registerFromSdkEvents(){this.on("close",()=>{if(this.sdkConfig.api.homeUrl)try{window.top.location=this.sdkConfig.api.homeUrl}catch{window.location=this.sdkConfig.api.homeUrl}else try{window.top.history.back()}catch{window.history.back()}}),this.on("playReady",()=>{this.postMessage("GAME_READY")})}}const ni=U("OryxPlugin","color:#000000;font-weight:bold;");class ai extends q{constructor(...t){super(...t),this.registerToSdkEvents(),this.registerFromSdkEvents(),ni("configured")}registerToSdkEvents(){window.addEventListener("message",t=>{try{const{type:e,param:i}=t.data;switch(e){case"doBalanceUpdate":this.send("balance",{balance:i});return;case"doGamePause":this.send("freeze");return;case"doGameResume":this.send("unfreeze");return;case"doGameSuspend":this.send("suspend");return;default:return}}catch{}})}registerFromSdkEvents(){let t=0;this.on("close",()=>{window.top.postMessage({wpgaction:"close"},"*"),window.parent.postMessage({wpgaction:"close.parent"},"*")}),this.on("balance",({balance:e})=>{t!==e&&(t=e,window.top.postMessage({param:{},wpgaction:"balance"},"*"),window.parent.postMessage({param:{},wpgaction:"balance.parent"},"*"))}),this.on("loadStart",()=>{window.top.postMessage({wpgaction:"loadStart"},"*"),window.parent.postMessage({wpgaction:"loadStart.parent"},"*")}),this.on("loadEnd",()=>{window.top.postMessage({wpgaction:"loadEnd"},"*"),window.parent.postMessage({wpgaction:"loadEnd.parent"},"*")}),this.on("playStart",()=>{window.top.postMessage({wpgaction:"gameSpinStart"},"*"),window.parent.postMessage({wpgaction:"gameSpinStart.parent"},"*")}),this.on("playEnd",()=>{window.top.postMessage({wpgaction:"gameSpinEnd"},"*"),window.parent.postMessage({wpgaction:"gameSpinEnd.parent"},"*")}),this.on("cashier",({type:e})=>{switch(e){case"BALANCE_LOW":window.top.postMessage({wpgaction:"cashier"},"*"),window.parent.postMessage({wpgaction:"cashier.parent"},"*");break;case"BALANCE_INSUFFICIENT":window.top.postMessage({wpgaction:"errorOutOfMoney"},"*"),window.parent.postMessage({wpgaction:"errorOutOfMoney.parent"},"*");break}})}}const ht=U("PariplayPlugin","color:#000000;font-weight:bold;");function Ve(s){try{window.top.location=s}catch{window.location=s}}function ze(s,t){return new Promise(function(i,n){const o=new XMLHttpRequest;o.onload=function(){o.status>=200&&o.status<300?i(o.responseText):n(o.responseText)},o.open(s,t),o.send()})}function qe(){}function oi(s){return s.filter(function(e){return e.messageType.toUpperCase()==="DATA"})}function We(s){return s.filter(function(e){return["NOTIFICATION","POPUP"].includes(e.messageType.toUpperCase())})}function Dt(s){try{return JSON.parse(s.text)}catch{return{}}}function ri(s){return s.map(Dt).filter(Boolean).find(function(e){return e.betId!=null&&e.winId!=null})||{}}function ci(s){return s.map(Dt).filter(Boolean).find(function(e){return e.TotalBet!=null&&e.TotalWin!=null})||{}}class di extends q{constructor(...t){super(...t),this.registerToSdkEvents(),this.registerFromSdkEvents(),ht("configured")}postMessage(t,e){const i={lang:this.sdkConfig.ui.language,sender:this.sdkConfig.api.game,type:t};e!=null&&(i.data=e),ht("postMessage",i),window.parent.postMessage(i,"*")}coinsToCurrency(t){return t*this.sdkConfig.api.coinValueInCents/100}handleContinueButton(t,e){t.link&&ze("GET",t.link),e()}handleLinkButton(t,e){switch(t.linkType.toUpperCase()){case"AJAX":ze("GET",t.link),e();return;case"AJAXRESPONSE":ze("GET",t.link).then(()=>{e()});return;case"REDIRECT":Ve(t.link),e();return}}handleQuitButton(t,e){this.send("close"),e()}handleCashierButton(t,e){this.send("cashier",{type:"ON_DEMAND"}),e()}handleHistoryButton(t,e){this.send("history",{source:"casino"}),e()}get buttonActions(){return{CASHIER:this.handleCashierButton,CONTINUE:this.handleContinueButton,HISTORY:this.handleHistoryButton,LINK:this.handleLinkButton,QUIT:this.handleQuitButton}}processInfoUiMessages(t){return t.reduce((e,i)=>e.then(()=>new Promise(n=>{Object.assign({},i,{buttons:i.buttons.filter(o=>o.action.toUpperCase()==="CASHIER"?!!this.sdkConfig.api.cashierUrl:!0).map(o=>Object.assign({},o,{onRelease:()=>{const a=i.messageType.toUpperCase()==="POPUP"?qe:n,h=this.buttonActions[o.action.toUpperCase()];h?h(o,a):a()}}))})}).catch(qe)),Promise.resolve()).then(()=>{}).catch(qe)}registerToSdkEvents(){window.addEventListener("message",t=>{try{const{type:e}=t.data;switch(e){case"pause":case"disableSpin":this.send("freeze");return;case"resume":case"enableSpin":this.send("unfreeze");return;case"stopAutobet":this.send("suspend");return;default:return}}catch{}})}registerFromSdkEvents(){let t=0;this.on("openGameResponse",e=>{let i;try{const n=JSON.parse(JSON.parse(atob(this.sdkConfig.api.integrationData.token.split(".")[1])).token),o=JSON.parse(n.integrationSpecificAttributes.sessionData||"{}");i={ClientToken:n.integrationSpecificAttributes.clientToken,CurrencyCode:n.currency,PlayerTokenId:n.user,SessionData:o}}catch{i=void 0}this.postMessage("gameDataLoaded",{LoadGameData:i,success:!0});try{const n=We(e.contract.uiMessages);this.processInfoUiMessages(n)}catch{}}),this.on("balance",({balance:e})=>{t!==e&&(t=e,this.postMessage("balance",{amount:this.coinsToCurrency(e)}))}),this.on("close",()=>{if(this.sdkConfig.api.homeUrl)if(this.sdkConfig.api.homeUrl==="(back)")try{window.top.history.back()}catch{window.history.back()}else this.sdkConfig.api.homeUrl==="(api)"?this.postMessage("quit"):Ve(this.sdkConfig.api.homeUrl)}),this.on("playEnd",e=>{this.postMessage("roundEnded",{balanceAfter:this.coinsToCurrency(e.contract.balance.coins),win:this.coinsToCurrency(e.contract.win.round)});try{const i=We(e.contract.uiMessages);this.processInfoUiMessages(i)}catch{}}),this.on("playError",e=>{var i,n;this.postMessage("ticketReceived",{ErrorCode:(i=e.data)==null?void 0:i.code,ErrorMessage:"ERROR",Status:{ErrCode:(n=e.data)==null?void 0:n.code}})}),this.on("playResponse",e=>{this.postMessage("roundStarted",{balanceBefore:this.coinsToCurrency(e.contract.balance.coins+e.contract.bet.lastPaid.base*e.contract.bet.lastPaid.multiplier)});const i=["BaseGame","PaidSpin"].includes(e.contract.stateType.thisRound),n=oi(e.contract.uiMessages),o=We(e.contract.uiMessages),a=ri(n),h=ci(n);this.postMessage("ticketReceived",{Balance:this.coinsToCurrency(e.contract.balance.coins),BetAmount:i?this.coinsToCurrency(e.contract.bet.lastPaid.base*e.contract.bet.lastPaid.multiplier):0,CreditTransactionId:a.betId,DebitTransactionId:a.winId,Message:o,SessionData:h,Status:{ErrCode:0},WinAmount:this.coinsToCurrency(e.contract.win.round)})}),this.on("playStart",e=>{e.bet&&this.postMessage("roundStart",{totalBet:this.coinsToCurrency(e.bet.base*e.bet.multiplier)})}),this.on("loadEnd",()=>{this.postMessage("gameReady")}),this.on("loadStart",()=>{this.postMessage("onAppFrameReady")}),this.on("cashier",()=>{this.sdkConfig.api.cashierUrl&&(this.sdkConfig.api.cashierUrl==="(api)"?this.postMessage("cashier"):Ve(this.sdkConfig.api.cashierUrl))})}}const he=U("RelaxFEIMPlugin","color:#000000;font-weight:bold;");class li extends q{constructor(...e){super(...e);p(this,"VERSION","1.17.0");const i=document.createElement("script");i.src=`https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`,i.onload=()=>{he("loaded"),window.FEIM.configure({p2pConfig:{currency:this.sdkConfig.api.currency,launchParams:{homeurl:"homeUrl"}}}),he("configured"),this.registerToSdkEvents(),this.registerFromSdkEvents()},document.body.appendChild(i)}registerToSdkEvents(){window.FEIM.on.errorMessageDismissed(()=>this.send("unfreeze")),window.FEIM.on.errorMessageDisplayed(()=>this.send("freeze")),window.FEIM.on.exitingGame(()=>he("!!! NOT IMPLEMENTED: exitingGame !!!")),window.FEIM.on.freeze(()=>this.send("freeze")),window.FEIM.on.initialized(()=>he("!!! NOT IMPLEMENTED: initialized !!!")),window.FEIM.on.pauseAutoPlay(()=>this.send("suspend")),window.FEIM.on.refreshBalance(()=>he("!!! NOT IMPLEMENTED: refreshBalance !!!")),window.FEIM.on.toggleGameHelp(()=>{this.send("help",{})}),window.FEIM.on.togglePaytable(()=>{this.send("paytable",{})}),window.FEIM.on.unfreeze(()=>this.send("unfreeze")),window.FEIM.on.updateSettings(({payload:[e]})=>this.send("settings",{sounds:e.sounds,fastPlay:e.fastPlay}))}registerFromSdkEvents(){this.on("autoplay",({action:e})=>{switch(e){case"start":window.FEIM.send.autoPlayStarted();break;case"stop":window.FEIM.send.autoPlayFinished();break}}),this.on("balance",({balance:e})=>{window.FEIM.send.balanceUpdate(e)}),this.on("bet",({base:e,multiplier:i})=>{window.FEIM.send.betUpdate(e*i)}),this.on("error",({message:e})=>{window.FEIM.send.errorMessage(e)}),this.on("close",()=>{window.FEIM.send.exitGame()}),this.on("loadEnd",()=>{window.FEIM.send.gameLoadCompleted()}),this.on("loadProgress",({progress:e})=>{window.FEIM.send.gameLoadProgress(e)}),this.on("loadStart",()=>{window.FEIM.send.gameLoadStarted()}),this.on("cashier",()=>{window.FEIM.send.openQuickDeposit()}),this.on("playCycleEnd",e=>{const i={balance:e.contract.balance.coins,bet:e.contract.bet.lastPaid.base*e.contract.bet.lastPaid.multiplier,win:{win:e.contract.win.total}};window.FEIM.send.roundFinished(i)}),this.on("playResponse",e=>{const i={balance:e.contract.balance.coins,playResponse:e.data};window.FEIM.send.roundStarted(i)}),this.on("history",()=>{window.FEIM.send.showHistory()}),this.on("settings",e=>{window.FEIM.send.updateSettings(e)})}}const $e=U("TukoPlugin","color:#000000;font-weight:bold;");class ui extends q{constructor(...e){super(...e);p(this,"PING_INTERVAL",1e4);const n=new URLSearchParams(window.location.search).get("pingCallbackUrl");n&&window.setInterval(()=>{this.ping(n)},this.PING_INTERVAL),this.registerToSdkEvents(),this.registerFromSdkEvents(),$e("configured")}ping(e){const i=new XMLHttpRequest;i.onreadystatechange=function(){i.readyState===XMLHttpRequest.DONE&&(i.status===0||i.status>=200&&i.status<400?$e("ping ok",i):$e("ping error",i))},i.open("GET",e),i.send()}registerToSdkEvents(){window.addEventListener("message",e=>{try{const{type:i,payload:n}=e.data;switch(i){case"doAudioSettings":this.send("settings",{music:n==null?void 0:n.musicEnabled,sounds:n==null?void 0:n.soundEnabled});return;case"doBalanceUpdate":const{currency:o,coinValueInCents:a}=this.sdkConfig.api;n.currency===o&&typeof n.balanceInCurrency=="number"?this.send("balance",{balance:Ft(n.balanceInCurrency,a)}):(n.balanceInCoins,this.send("balance",{balance:n.balanceInCoins}));return;case"doGamePause":this.send("freeze");return;case"doGameResume":this.send("unfreeze");return;case"doGameSuspend":this.send("suspend");return;default:return}}catch{}})}registerFromSdkEvents(){this.on("close",()=>{if(this.sdkConfig.api.homeUrl)try{window.top.location=this.sdkConfig.api.homeUrl}catch{window.location=this.sdkConfig.api.homeUrl}else try{window.top.history.back()}catch{window.history.back()}})}}var hi="2.0.0-beta.3",ce="",gt="?",et="function",V="undefined",de="object",tt="string",be="major",l="model",r="name",d="type",u="vendor",c="version",S="architecture",Y="console",b="mobile",f="tablet",I="smarttv",xe="wearable",pt="xr",it="embedded",mt="user-agent",st=500,ot="brands",$="formFactors",rt="fullVersionList",Z="platform",ct="platformVersion",Ge="bitness",W="sec-ch-ua",gi=W+"-full-version-list",pi=W+"-arch",mi=W+"-"+Ge,wi=W+"-form-factors",bi=W+"-"+b,fi=W+"-"+l,Nt=W+"-"+Z,yi=Nt+"-version",Gt=[ot,rt,b,l,Z,ct,S,$,Ge],P="browser",B="cpu",x="device",F="engine",A="os",ee="result",Ce="Amazon",ge="Apple",wt="ASUS",bt="BlackBerry",Me="Google",ft="Huawei",yt="Lenovo",je="LG",Re="Microsoft",kt="Motorola",Se="Samsung",vt="Sharp",Te="Sony",Ke="Xiaomi",Xe="Zebra",Q="Mobile ",J=" Browser",Ie="Chrome",ki="Edge",pe="Firefox",me="Opera",Et="Facebook",Ct="Sogou",nt="Windows",vi=typeof window!==V,T=vi&&window.navigator?window.navigator:void 0,G=T&&T.userAgentData?T.userAgentData:void 0,Ei=function(s,t){var e={},i=t;if(!Ue(t)){i={};for(var n in t)for(var o in t[n])i[o]=t[n][o].concat(i[o]?i[o]:[])}for(var a in s)e[a]=i[a]&&i[a].length%2===0?i[a].concat(s[a]):s[a];return e},He=function(s){for(var t={},e=0;e<s.length;e++)t[s[e].toUpperCase()]=s[e];return t},at=function(s,t){if(typeof s===de&&s.length>0){for(var e in s)if(z(s[e])==z(t))return!0;return!1}return le(s)?z(t).indexOf(z(s))!==-1:!1},Ue=function(s,t){for(var e in s)return/^(browser|cpu|device|engine|os)$/.test(e)||(t?Ue(s[e]):!1)},le=function(s){return typeof s===tt},Qe=function(s){if(s){for(var t=[],e=j(/\\?\"/g,s).split(","),i=0;i<e.length;i++)if(e[i].indexOf(";")>-1){var n=fe(e[i]).split(";v=");t[i]={brand:n[0],version:n[1]}}else t[i]=fe(e[i]);return t}},z=function(s){return le(s)?s.toLowerCase():s},Je=function(s){return le(s)?j(/[^\d\.]/g,s).split(".")[0]:void 0},D=function(s){for(var t in s){var e=s[t];typeof e==de&&e.length==2?this[e[0]]=e[1]:this[e]=void 0}return this},j=function(s,t){return le(t)?t.replace(s,ce):t},we=function(s){return j(/\\?\"/g,s)},fe=function(s,t){if(le(s))return s=j(/^\s\s*/,s),typeof t===V?s:s.substring(0,st)},Mt=function(s,t){if(!(!s||!t))for(var e=0,i,n,o,a,h,g;e<t.length&&!h;){var m=t[e],w=t[e+1];for(i=n=0;i<m.length&&!h&&m[i];)if(h=m[i++].exec(s),h)for(o=0;o<w.length;o++)g=h[++n],a=w[o],typeof a===de&&a.length>0?a.length===2?typeof a[1]==et?this[a[0]]=a[1].call(this,g):this[a[0]]=a[1]:a.length===3?typeof a[1]===et&&!(a[1].exec&&a[1].test)?this[a[0]]=g?a[1].call(this,g,a[2]):void 0:this[a[0]]=g?g.replace(a[1],a[2]):void 0:a.length===4&&(this[a[0]]=g?a[3].call(this,g.replace(a[1],a[2])):void 0):this[a]=g||void 0;e+=2}},Le=function(s,t){for(var e in t)if(typeof t[e]===de&&t[e].length>0){for(var i=0;i<t[e].length;i++)if(at(t[e][i],s))return e===gt?void 0:e}else if(at(t[e],s))return e===gt?void 0:e;return t.hasOwnProperty("*")?t["*"]:s},St={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Tt={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},It={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[c,[r,Q+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[c,[r,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[r,c],[/opios[\/ ]+([\w\.]+)/i],[c,[r,me+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[c,[r,me+" GX"]],[/\bopr\/([\w\.]+)/i],[c,[r,me]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[c,[r,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[r,c],[/\bddg\/([\w\.]+)/i],[c,[r,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[c,[r,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[c,[r,"WeChat"]],[/konqueror\/([\w\.]+)/i],[c,[r,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[c,[r,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[c,[r,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[c,[r,"Smart "+yt+J]],[/(avast|avg)\/([\w\.]+)/i],[[r,/(.+)/,"$1 Secure"+J],c],[/\bfocus\/([\w\.]+)/i],[c,[r,pe+" Focus"]],[/\bopt\/([\w\.]+)/i],[c,[r,me+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[c,[r,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[c,[r,"Dolphin"]],[/coast\/([\w\.]+)/i],[c,[r,me+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[c,[r,"MIUI"+J]],[/fxios\/([\w\.-]+)/i],[c,[r,Q+pe]],[/\bqihu|(qi?ho?o?|360)browser/i],[[r,"360"+J]],[/\b(qq)\/([\w\.]+)/i],[[r,/(.+)/,"$1Browser"],c],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[r,/(.+)/,"$1"+J],c],[/samsungbrowser\/([\w\.]+)/i],[c,[r,Se+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[r,/_/g," "],c],[/metasr[\/ ]?([\d\.]+)/i],[c,[r,Ct+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[r,Ct+" Mobile"],c],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[r,c],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[r],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[r,Et],c],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[r,c],[/\bgsa\/([\w\.]+) .*safari\//i],[c,[r,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[c,[r,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[c,[r,Ie+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[r,Ie+" WebView"],c],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[c,[r,"Android"+J]],[/chrome\/([\w\.]+) mobile/i],[c,[r,Q+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[r,c],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[c,[r,Q+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[r,Q+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[c,r],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[r,[c,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[r,c],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[r,Q+pe],c],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[r,"Netscape"],c],[/(wolvic)\/([\w\.]+)/i],[r,c],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[c,[r,pe+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[r,[c,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[r,[c,/[^\d\.]+./,ce]]],cpu:[[/\b(?:(amd|x|x86[-_]?|wow|win)64)\b/i],[[S,"amd64"]],[/(ia32(?=;))/i,/((?:i[346]|x)86)[;\)]/i],[[S,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[S,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[S,"armhf"]],[/windows (ce|mobile); ppc;/i],[[S,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[S,/ower/,ce,z]],[/(sun4\w)[;\)]/i],[[S,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[S,z]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[u,Se],[d,f]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[l,[u,Se],[d,b]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[l,[u,ge],[d,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[u,ge],[d,f]],[/(macintosh);/i],[l,[u,ge]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[u,vt],[d,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[u,ft],[d,f]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[u,ft],[d,b]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[l,/_/g," "],[u,Ke],[d,b]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[u,Ke],[d,f]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[u,"OPPO"],[d,b]],[/\b(opd2\d{3}a?) bui/i],[l,[u,"OPPO"],[d,f]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[u,"Vivo"],[d,b]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[l,[u,"Realme"],[d,b]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[l,[u,kt],[d,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[u,kt],[d,f]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[u,je],[d,f]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[u,je],[d,b]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[u,yt],[d,f]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[u,"Nokia"],[d,b]],[/(pixel c)\b/i],[l,[u,Me],[d,f]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[u,Me],[d,b]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[u,Te],[d,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[u,Te],[d,f]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[u,"OnePlus"],[d,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[u,Ce],[d,f]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[u,Ce],[d,b]],[/(playbook);[-\w\),; ]+(rim)/i],[l,u,[d,f]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[u,bt],[d,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[u,wt],[d,f]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[u,wt],[d,b]],[/(nexus 9)/i],[l,[u,"HTC"],[d,f]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[u,[l,/_/g," "],[d,b]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[u,"Acer"],[d,f]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[u,"Meizu"],[d,b]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[l,[u,"Ulefone"],[d,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,l,[d,b]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[u,l,[d,f]],[/(surface duo)/i],[l,[u,Re],[d,f]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[u,"Fairphone"],[d,b]],[/(shield[\w ]+) b/i],[l,[u,"Nvidia"],[d,f]],[/(sprint) (\w+)/i],[u,l,[d,b]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[u,Re],[d,b]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[u,Xe],[d,f]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[u,Xe],[d,b]],[/smart-tv.+(samsung)/i],[u,[d,I]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[u,Se],[d,I]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,je],[d,I]],[/(apple) ?tv/i],[u,[l,ge+" TV"],[d,I]],[/crkey/i],[[l,Ie+"cast"],[u,Me],[d,I]],[/droid.+aft(\w+)( bui|\))/i],[l,[u,Ce],[d,I]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[u,vt],[d,I]],[/(bravia[\w ]+)( bui|\))/i],[l,[u,Te],[d,I]],[/(mitv-\w{5}) bui/i],[l,[u,Ke],[d,I]],[/Hbbtv.*(technisat) (.*);/i],[u,l,[d,I]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[u,fe],[l,fe],[d,I]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,I]],[/(ouya)/i,/(nintendo) (\w+)/i],[u,l,[d,Y]],[/droid.+; (shield) bui/i],[l,[u,"Nvidia"],[d,Y]],[/(playstation \w+)/i],[l,[u,Te],[d,Y]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[u,Re],[d,Y]],[/((pebble))app/i],[u,l,[d,xe]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[l,[u,ge],[d,xe]],[/droid.+; (wt63?0{2,3})\)/i],[l,[u,Xe],[d,xe]],[/droid.+; (glass) \d/i],[l,[u,Me],[d,pt]],[/(quest( \d| pro)?)/i],[l,[u,Et],[d,pt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[d,it]],[/(aeobc)\b/i],[l,[u,Ce],[d,it]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[l,[d,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[d,f]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,f]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,b]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[c,[r,ki+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[c,[r,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[r,c],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[c,r]],os:[[/microsoft (windows) (vista|xp)/i],[r,c],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[r,[c,Le,St]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c,Le,St],[r,nt]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[c,/_/g,"."],[r,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[r,"macOS"],[c,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[c,r],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[r,c],[/\(bb(10);/i],[c,[r,bt]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[c,[r,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[c,[r,pe+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[c,[r,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[c,[r,"watchOS"]],[/crkey\/([\d\.]+)/i],[c,[r,Ie+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[r,"Chrome OS"],c],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[r,c],[/(sunos) ?([\w\.\d]*)/i],[[r,"Solaris"],c],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[r,c]]},Pe=function(){var s={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return D.call(s.init,[[P,[r,c,be,d]],[B,[S]],[x,[d,l,u]],[F,[r,c]],[A,[r,c]]]),D.call(s.isIgnore,[[P,[c,be]],[F,[c]],[A,[c]]]),D.call(s.isIgnoreRgx,[[P,/ ?browser$/i],[A,/ ?os$/i]]),D.call(s.toString,[[P,[r,c]],[B,[S]],[x,[u,l]],[F,[r,c]],[A,[r,c]]]),s}(),Ci=function(s,t){var e=Pe.init[t],i=Pe.isIgnore[t]||0,n=Pe.isIgnoreRgx[t]||0,o=Pe.toString[t]||0;function a(){D.call(this,e)}return a.prototype.getItem=function(){return s},a.prototype.withClientHints=function(){return G?G.getHighEntropyValues(Gt).then(function(h){return s.setCH(new Ht(h,!1)).parseCH().get()}):s.parseCH().get()},a.prototype.withFeatureCheck=function(){return s.detectFeature().get()},t!=ee&&(a.prototype.is=function(h){var g=!1;for(var m in this)if(this.hasOwnProperty(m)&&!at(i,m)&&z(n?j(n,this[m]):this[m])==z(n?j(n,h):h)){if(g=!0,h!=V)break}else if(h==V&&g){g=!g;break}return g},a.prototype.toString=function(){var h=ce;for(var g in o)typeof this[o[g]]!==V&&(h+=(h?" ":ce)+this[o[g]]);return h||V}),G||(a.prototype.then=function(h){var g=this,m=function(){for(var v in g)g.hasOwnProperty(v)&&(this[v]=g[v])};m.prototype={is:a.prototype.is,toString:a.prototype.toString};var w=new m;return h(w),w}),new a};function Ht(s,t){if(s=s||{},D.call(this,Gt),t)D.call(this,[[ot,Qe(s[W])],[rt,Qe(s[gi])],[b,/\?1/.test(s[bi])],[l,we(s[fi])],[Z,we(s[Nt])],[ct,we(s[yi])],[S,we(s[pi])],[$,Qe(s[wi])],[Ge,we(s[mi])]]);else for(var e in s)this.hasOwnProperty(e)&&typeof s[e]!==V&&(this[e]=s[e])}function Pt(s,t,e,i){return this.get=function(n){return n?this.data.hasOwnProperty(n)?this.data[n]:void 0:this.data},this.set=function(n,o){return this.data[n]=o,this},this.setCH=function(n){return this.uaCH=n,this},this.detectFeature=function(){if(T&&T.userAgent==this.ua)switch(this.itemType){case P:T.brave&&typeof T.brave.isBrave==et&&this.set(r,"Brave");break;case x:!this.get(d)&&G&&G[b]&&this.set(d,b),this.get(l)=="Macintosh"&&T&&typeof T.standalone!==V&&T.maxTouchPoints&&T.maxTouchPoints>2&&this.set(l,"iPad").set(d,f);break;case A:!this.get(r)&&G&&G[Z]&&this.set(r,G[Z]);break;case ee:var n=this.data,o=function(a){return n[a].getItem().detectFeature().get()};this.set(P,o(P)).set(B,o(B)).set(x,o(x)).set(F,o(F)).set(A,o(A))}return this},this.parseUA=function(){return this.itemType!=ee&&Mt.call(this.data,this.ua,this.rgxMap),this.itemType==P&&this.set(be,Je(this.get(c))),this},this.parseCH=function(){var n=this.uaCH,o=this.rgxMap;switch(this.itemType){case P:var a=n[rt]||n[ot],h;if(a)for(var g in a){var m=j(/(Google|Microsoft) /,a[g].brand||a[g]),w=a[g].version;!/not.a.brand/i.test(m)&&(!h||/chrom/i.test(h)&&!/chromi/i.test(m))&&(this.set(r,m).set(c,w).set(be,Je(w)),h=m)}break;case B:var v=n[S];v&&(v&&n[Ge]=="64"&&(v+="64"),Mt.call(this.data,v+";",o));break;case x:if(n[b]&&this.set(d,b),n[l]&&this.set(l,n[l]),n[l]=="Xbox"&&this.set(d,Y).set(u,Re),n[$]){var N;if(typeof n[$]!="string")for(var K=0;!N&&K<n[$].length;)N=Le(n[$][K++],Tt);else N=Le(n[$],Tt);this.set(d,N)}break;case A:var X=n[Z];if(X){var L=n[ct];X==nt&&(L=parseInt(Je(L),10)>=13?"11":"10"),this.set(r,X).set(c,L)}this.get(r)==nt&&n[l]=="Xbox"&&this.set(r,"Xbox").set(c,void 0);break;case ee:var ue=this.data,O=function(_){return ue[_].getItem().setCH(n).parseCH().get()};this.set(P,O(P)).set(B,O(B)).set(x,O(x)).set(F,O(F)).set(A,O(A))}return this},D.call(this,[["itemType",s],["ua",t],["uaCH",i],["rgxMap",e],["data",Ci(this,s)]]),this}function R(s,t,e){if(typeof s===de?(Ue(s,!0)?(typeof t===de&&(e=t),t=s):(e=s,t=void 0),s=void 0):typeof s===tt&&!Ue(t,!0)&&(e=t,t=void 0),!(this instanceof R))return new R(s,t,e).getResult();var i=typeof s===tt?s:T&&T.userAgent?T.userAgent:e&&e[mt]?e[mt]:ce,n=new Ht(e,!0),o=t?Ei(It,t):It,a=function(h){return h==ee?function(){return new Pt(h,i,o,n).set("ua",i).set(P,this.getBrowser()).set(B,this.getCPU()).set(x,this.getDevice()).set(F,this.getEngine()).set(A,this.getOS()).get()}:function(){return new Pt(h,i,o[h],n).parseUA().get()}};return D.call(this,[["getBrowser",a(P)],["getCPU",a(B)],["getDevice",a(x)],["getEngine",a(F)],["getOS",a(A)],["getResult",a(ee)],["getUA",function(){return i}],["setUA",function(h){return le(h)&&(i=h.length>st?fe(h,st):h),this}]]).setUA(i),this}R.VERSION=hi;R.BROWSER=He([r,c,be,d]);R.CPU=He([S]);R.DEVICE=He([l,u,d,Y,b,I,f,xe,it]);R.ENGINE=R.OS=He([r,c]);class Vt{constructor(t,e){p(this,"config");p(this,"sdkConfig");this.config=t,this.sdkConfig=e}on(t,e,i){const n=function(a){a.data.message!==`kalamba:wrapper-rgs:${t}`&&a.data.message!==`kalamba:wrapper:${t}`||e(a.data.payload)};window.addEventListener("message",n,i)}send(t,...[e]){window.postMessage({message:`kalamba:rgs:${t}`,payload:e})}}class Mi{constructor(t){p(this,"socket",null);p(this,"webSocketUrl");p(this,"eventListeners",{close:[],error:[],message:[]});p(this,"connect",async()=>{const t=new WebSocket(this.webSocketUrl);return t.addEventListener("message",this.handleMessage),new Promise(e=>{t.addEventListener("open",i=>{this.handleOpen(i),e(this.socket)},{once:!0})})});p(this,"send",t=>{if(this.socket==null)throw new Error("Cannot send message, the WebSocket connection is not open");this.socket.send(t)});p(this,"close",()=>{if(this.socket==null)throw new Error("Cannot close the WebSocket connection that is not open");this.socket.close()});p(this,"handleClose",t=>{this.eventListeners.close.forEach(e=>{e(t)}),this.socket.removeEventListener("message",this.handleMessage),this.socket.removeEventListener("close",this.handleClose),this.socket.removeEventListener("error",this.handleError),this.socket=null});p(this,"handleError",t=>{this.eventListeners.error.forEach(e=>{e(t)})});p(this,"handleMessage",t=>{this.eventListeners.message.forEach(e=>{e(t)})});p(this,"handleOpen",t=>{const e=t.target;e.addEventListener("close",this.handleClose),e.addEventListener("error",this.handleError),this.socket=e});this.webSocketUrl=t}addEventListener(t,e){this.eventListeners[t].push(e)}removeEventListener(t,e){const i=this.eventListeners[t].indexOf(e);i!==-1&&this.eventListeners[t].splice(i,1)}}function Ae(s){return JSON.parse(s==null?void 0:s.data)}function Si(s){var t;return((t=s==null?void 0:s.header)==null?void 0:t.name)==="Ping"}function At(s){var t;return((t=s==null?void 0:s.header)==null?void 0:t.name)==="RealityCheck"}function _e(s){return s.header.name==="GameEvent"}function Ti(s){return _e(s)&&s.body.event==="OPEN_GAME"}function Ot(s){return s.header.code!==1}function Ii(s){return _e(s)&&s.body.event.includes("_RESULT")}var te,ye;class Pi extends Mi{constructor(e,i){const n=new URL(e.apiUrl);n.searchParams.set("cageCode",e.cageCode),n.searchParams.set("gameCode",e.gameCode),n.searchParams.set("operatorCode",e.operatorCode),n.searchParams.set("playMode",e.playMode),n.searchParams.set("token",e.token),n.searchParams.set("username",e.username);super(n.toString());p(this,"cId",0);p(this,"mId",0);p(this,"seqId",0);p(this,"gameCode");M(this,te,void 0);M(this,ye,void 0);p(this,"onMessage",e=>{const i=Ae(e);(_e(i)||Si(i)||At(i))&&this.sendAcknowledgement(i),At(i)&&this.handleRealityCheck(i)});this.eventListeners.realityCheck=[],this.gameCode=e.gameCode,k(this,te,i.requestTimeoutMs),k(this,ye,i.gameVersion??"unknown"),this.addEventListener("message",this.onMessage)}handleRealityCheck(e){this.eventListeners.realityCheck.forEach(i=>{i(e.body)})}addEventListener(e,i){super.addEventListener(e,i)}removeEventListener(e,i){super.removeEventListener(e,i)}buildHeader(e,i=null){return{cId:i??++this.cId,code:i!==null?1:void 0,mId:++this.mId,name:e}}buildPayload(e,i){return JSON.stringify({body:i,header:e})}getBodyExtras(e){return{action:e,seqId:++this.seqId}}request(e,i){const n=this.buildPayload(e,i);return new Promise((o,a)=>{setTimeout(()=>a({type:"timeout"}),y(this,te));const h=g=>{const m=Ae(g);try{e.cId===m.header.cId&&(this.removeEventListener("message",h),m.header.code===1?o(m):a({message:m,type:"error"}))}catch{a({message:m,type:"error"})}};this.addEventListener("message",h),this.send(n)})}freeRounds(e){const i=this.buildHeader("ActivateFreeRound");return this.request(i,e).then(n=>n.body).catch(n=>{var o;throw{data:(o=n==null?void 0:n.message)==null?void 0:o.body,type:n.type}})}async authenticate(e=!1){const i=this.buildHeader("Authenticate"),n={clientType:3,version:y(this,ye),reconnect:e};return this.request(i,n).then(o=>o.body).catch(o=>{var a;throw{data:(a=o==null?void 0:o.message)==null?void 0:a.body,type:o.type}})}async openGame(){const e=this.buildHeader("OpenGame"),i={gameCode:this.gameCode};return new Promise((n,o)=>{const a=h=>{const g=Ae(h);Ti(g)?(this.removeEventListener("message",a),n(g.body)):Ot(g)&&o({data:g.body,type:"error"})};this.addEventListener("message",a),this.request(e,i).catch(h=>{var g;return o({data:(g=h==null?void 0:h.message)==null?void 0:g.body,type:h.type})})})}sendAcknowledgement(e){const{name:i,cId:n}=e.header,o=this.buildHeader(i,n),a=this.buildPayload(o,{});this.send(a)}sendAction(e,i){const n=this.buildHeader("GameAction"),o={...this.getBodyExtras(e),data:i};return new Promise((a,h)=>{const g=m=>{const w=Ae(m);_e(w)&&o.seqId===w.body.correlationSeqId&&(this.removeEventListener("message",g),Ii(w)?a(w.body):Ot(w)&&h({data:w.body,type:"error"}))};this.addEventListener("message",g),this.request(n,o).catch(m=>{var w;return h({data:(w=m==null?void 0:m.message)==null?void 0:w.body,type:m.type})})})}setRequestTimeoutMs(e){k(this,te,e)}}te=new WeakMap,ye=new WeakMap;function zt(s){const t=s.contract;return t?{contract:{balance:{coins:t.balance,version:t.balanceVersion},coinValueInCents:t.coinValueInCents,country:t.countryCode,currency:t.currencyCode,jurisdiction:t.jurisdictionCode,uiMessages:t.uiMessages,username:t.username}}:{contract:{balance:{coins:s.balance,version:s.balanceVersion},coinValueInCents:s.coinValueInCents,country:s.countryCode,currency:s.currencyCode,jurisdiction:s.jurisdictionCode,uiMessages:s.uiMessages,username:s.username}}}function qt(s){var t,e;return{code:((t=s.data)==null?void 0:t.code)??Ne.RgsErrorCode.UNKNOWN,details:(e=s.data)==null?void 0:e.details}}function Wt(s,t){const e=t.contract;if(!e){const i=t.data;return{contract:{bet:{available:i.additionalConfigData.availableMultipliersPerBaseBet,default:{base:i.additionalConfigData.defaultBet.baseBet,multiplier:i.additionalConfigData.defaultBet.betMultiplier},max:i.additionalConfigData.maxAllowedOverallBetInCoins??null,last:i.gameState.betFromCurrentRound?{base:i.gameState.betFromCurrentRound.baseBet,multiplier:i.gameState.betFromCurrentRound.betMultiplier}:null,lastPaid:i.gameState.lastPlacedMainGameBet?{base:i.gameState.lastPlacedMainGameBet.baseBet,multiplier:i.gameState.lastPlacedMainGameBet.betMultiplier}:null},balance:{coins:t.balance,version:t.balanceVersion},freeRounds:(i.FREE_ROUNDS??[]).map(n=>({conf:{base:n.conf.baseBet,multiplier:n.conf.betMultiplier,numAwarded:n.conf.numAwarded},data:{numPlayed:n.data.numPlayed,win:n.data.winAmount,numLeft:n.data.numLeft},id:n.id,rejectable:n.rejectable,skippable:n.skippable,status:n.status,type:n.type})),gameModel:i.additionalConfigData.gameModelFile,metaData:i.gameConfigData.metaData,roundId:i.gameState.cycleId,serverTime:t.balanceVersion,sessionId:i.gameState.sessionId,stateType:{thisRound:i.gameState.stateTypeThisRound,nextRound:i.gameState.stateTypeNextRound},uiMessages:s.uiMessages,win:{max:i.maxWin??null,round:i.gameState.totalWinFromCurrentRound,total:i.gameState.totalWinFromCurrentGameCycle}},data:i}}return{contract:{bet:{available:e.availableMultipliersPerBaseBet,default:{base:e.defaultBet.baseBet,multiplier:e.defaultBet.betMultiplier},max:e.maxBetInCoins??null,last:e.lastBet?{base:e.lastBet.baseBet,multiplier:e.lastBet.betMultiplier}:null,lastPaid:e.lastMainGameBet?{base:e.lastMainGameBet.baseBet,multiplier:e.lastMainGameBet.betMultiplier}:null},balance:{coins:e.balanceInCoins,version:e.balanceVersion},freeRounds:(e.freeRounds??[]).map(i=>({conf:{base:i.conf.baseBet,multiplier:i.conf.betMultiplier,numAwarded:i.conf.numAwarded},data:{numPlayed:i.data.numPlayed,win:i.data.winAmount,numLeft:i.data.numLeft},id:i.id,rejectable:i.rejectable,skippable:i.skippable,status:i.status,type:i.type})),gameModel:e.gameModelFile,metaData:e.metaData,roundId:e.roundId,serverTime:e.serverTime,sessionId:e.sessionId,stateType:{thisRound:e.stateTypeThisRound,nextRound:e.stateTypeNextRound},uiMessages:s.contract.uiMessages.concat(e.uiMessages),win:{max:e.maxWinInCoins??null,round:e.roundWin,total:e.totalWin}},data:t.opaqueGameServerToUi}}function $t(s){var t,e;return{code:((t=s.data)==null?void 0:t.code)??Ne.RgsErrorCode.UNKNOWN,details:(e=s.data)==null?void 0:e.details}}function jt(s){const t=s.contract;if(!t){const e=s.data;return{contract:{bet:{last:e.gameState.betFromCurrentRound?{base:e.gameState.betFromCurrentRound.baseBet,multiplier:e.gameState.betFromCurrentRound.betMultiplier}:null,lastPaid:{base:(e.gameState.lastPlacedMainGameBet??e.gameState.betFromCurrentRound).baseBet,multiplier:(e.gameState.lastPlacedMainGameBet??e.gameState.betFromCurrentRound).betMultiplier}},balance:{coins:s.balance,version:s.balanceVersion},freeRounds:(e.FREE_ROUNDS??[]).map(i=>({conf:{base:i.conf.baseBet,multiplier:i.conf.betMultiplier,numAwarded:i.conf.numAwarded},data:{numPlayed:i.data.numPlayed,win:i.data.winAmount,numLeft:i.data.numLeft},id:i.id,rejectable:i.rejectable,skippable:i.skippable,status:i.status,type:i.type})),serverTime:s.balanceVersion,roundId:e.gameState.cycleId,stateType:{thisRound:e.gameState.stateTypeThisRound,nextRound:e.gameState.stateTypeNextRound},uiMessages:e.uiMessages,win:{round:e.gameState.totalWinFromCurrentRound,total:e.gameState.totalWinFromCurrentGameCycle}},data:e}}return{contract:{bet:{last:t.lastBet?{base:t.lastBet.baseBet,multiplier:t.lastBet.betMultiplier}:null,lastPaid:{base:t.lastMainGameBet.baseBet,multiplier:t.lastMainGameBet.betMultiplier}},balance:{coins:t.balanceInCoins,version:t.balanceVersion},freeRounds:(t.freeRounds??[]).map(e=>({conf:{base:e.conf.baseBet,multiplier:e.conf.betMultiplier,numAwarded:e.conf.numAwarded},data:{numPlayed:e.data.numPlayed,win:e.data.winAmount,numLeft:e.data.numLeft},id:e.id,rejectable:e.rejectable,skippable:e.skippable,status:e.status,type:e.type})),serverTime:t.serverTime,roundId:t.roundId,stateType:{thisRound:t.stateTypeThisRound,nextRound:t.stateTypeNextRound},uiMessages:t.uiMessages,win:{round:t.roundWin,total:t.totalWin}},data:s.opaqueGameServerToUi}}function Kt(s){var t,e;return{code:((t=s.data)==null?void 0:t.code)??Ne.RgsErrorCode.UNKNOWN,details:(e=s.data)==null?void 0:e.details}}const Ai={parseAuthenticateResponse:zt,parseAuthenticateError:qt,parseOpenGameResponse:Wt,parseOpenGameError:$t,parsePlayResponse:jt,parsePlayError:Kt},Oi={bul:"bg",chi:"zh",zho:"zh",hrv:"hr",cze:"cs",dan:"da",dut:"nl",eng:"en",est:"et",fin:"fi",fra:"fr",ger:"de",gre:"el",hun:"hu",ind:"id",ita:"it",jpn:"ja",kor:"ko",nor:"no",pol:"pl",por:"pt",rum:"ro",rus:"ru",srp:"sr",slo:"sk",spa:"es",swe:"sv",tha:"th",tur:"tr",ukr:"uk",vie:"vi"},{device:xi}=R(navigator.userAgent),Ri=U("KalambaBullseyePlugin","color:#000000;font-weight:bold;");class Ui extends Vt{constructor(...e){super(...e);p(this,"socket");this.on("openGame",async()=>{try{const i=await this.openGame();this.send("openGameResponse",i)}catch(i){this.send("openGameError",i)}}),this.on("play",async i=>{try{const n=await this.play(i);this.send("playResponse",n)}catch(n){this.send("playError",n)}}),this.on("freeRounds",async i=>{try{await this.socket.freeRounds(i),this.send("freeRoundsResponse",i)}catch(n){this.send("freeRoundsError",n)}}),this.on("configured",i=>{this.socket.setRequestTimeoutMs(i.ui.requestTimeoutMs)}),this.registerFromSdkEvents()}initialize(e){this.socket=new Pi(e,{gameVersion:this.config.gameVersion,requestTimeoutMs:this.sdkConfig.ui.requestTimeoutMs}),["deeprush","sharkstrike","fireboltroulette"].includes(e.gameCode)||(this.socket.addEventListener("close",i=>{i.code===1008?this.send("error",{type:"CLOSE",messageCode:"TOO_MANY_OPEN_GAMES",messageKey:"RgsError.TOO_MANY_OPEN_GAMES"}):i.code===1011||this.reconnect()}),["mobile","tablet"].includes(xi.type??"")&&document.addEventListener("visibilitychange",async()=>{document.hidden||(this.socket.socket?this.socket.socket&&[WebSocket.CONNECTING,WebSocket.OPEN].includes(this.socket.socket.readyState)&&this.socket.close():this.reconnect())})),this.socket.addEventListener("error",i=>Ri("error",i)),this.socket.addEventListener("realityCheck",i=>{this.send("realityCheck",i)})}async reconnect(){try{await this.socket.connect(),await this.socket.authenticate(!0),await this.socket.openGame()}catch{this.send("error",{type:"CLOSE",messageCode:"CONNECTION_ERROR",messageKey:"RgsError.CONNECTION_ERROR"})}}async openGame(){const e=new URLSearchParams(window.location.search),i=e.get("apiUrl"),n=e.get("cageCode"),o=e.get("gameCode"),a=e.get("operatorCode"),h=e.get("playMode"),g=e.get("token"),m=e.get("username"),w=e.get("gameHistoryUrl"),v=e.get("homeUrl")??void 0,N=e.get("cashierUrl")??void 0;this.initialize({apiUrl:i,cageCode:n,gameCode:o,operatorCode:a,playMode:h,token:g,username:m});try{await this.socket.connect()}catch{throw{type:"error",data:{code:Ne.RgsErrorCode.CONNECTION_ERROR}}}let K;try{K=await this.socket.authenticate()}catch(_){throw{type:_.type,data:_.type==="error"?qt(_.data):void 0}}let X;try{X=await this.socket.openGame()}catch(_){throw{type:_.type,data:_.type==="error"?$t(_.data):void 0}}const L=zt(K),ue=Wt(K,X);this.sdkConfig.api={brand:n,game:o,integration:a,jurisdiction:L.contract.jurisdiction,playMode:h,user:L.contract.username,integrationData:{token:g},country:L.contract.country,currency:L.contract.currency,coinValueInCents:L.contract.coinValueInCents,gameHistoryUrl:w,homeUrl:v,cashierUrl:N,sessionId:ue.contract.sessionId,lastRoundId:ue.contract.roundId};const O=e.get("languageCode");return O&&(this.sdkConfig.ui.language=O.length===3?Oi[O]??O:O),ue}async play(e){for(;!this.socket.socket;)await new Promise(v=>setTimeout(()=>v(),500));const{contract:{bet:i,forcedOutcomes:n,...o},extra:a,payloadToInject:h,actionType:g}=e,m={bet:i?{baseBet:i.base,betMultiplier:i.multiplier}:void 0,forcedOutcomes:n,...o,...h,opaqueUiToGameServer:a};let w;try{w=await this.socket.sendAction(g,m)}catch(v){throw{type:v.type,data:v.type==="error"?Kt(v.data):void 0}}return jt(w)}registerFromSdkEvents(){this.on("history",()=>{const{api:{game:e,integration:i,integrationData:n,jurisdiction:o,user:a,gameHistoryUrl:h},ui:{language:g}}=this.sdkConfig,m=a.replace(/^user_/,"").replace(new RegExp(`_${i}$`),""),w=new URL(h);w.searchParams.set("gameCode",e),w.searchParams.set("jurisdiction",o),w.searchParams.set("operatorCode",i),w.searchParams.set("token",n.token),w.searchParams.set("username",m),w.searchParams.set("languageCode",g),this.config.gameHistoryUrl&&w.searchParams.set("gameHistoryUrl",this.config.gameHistoryUrl),window.open(w.toString(),"_blank")})}}class Xt{constructor(t,e,i){p(this,"trackers");p(this,"config");p(this,"sdkConfig");this.trackers=t,this.config=e,this.sdkConfig=i}on(t,e,i){const n=function(a){a.data.message!==`kalamba:wrapper-telemetry:${t}`&&a.data.message!==`kalamba:wrapper:${t}`||e(a.data.payload)};window.addEventListener("message",n,i)}track(t,e){this.trackers.forEach(i=>i.track(t,e))}}function xt(s){return s.reduce((t,e)=>t+e,0)}function Li(s){const t=s.length,e=xt(s)/t,i=s.map(o=>Math.pow(o-e,2)),n=xt(i)/t;return Math.sqrt(n)}class Rt{constructor(){p(this,"rafId",-1);p(this,"startTime",0);p(this,"stopTime",0);p(this,"frames",[]);p(this,"calculateFPS",()=>{const t=Math.floor((this.stopTime-this.startTime)/1e3);return this.frames.map(e=>Math.floor((e-this.startTime)/1e3)).reduce((e,i,n,o)=>(o[n]!==o[n-1]?e.push(1):e[e.length-1]++,e),[]).slice(0,t)});p(this,"getReport",()=>{const t=this.calculateFPS(),e=Math.floor(this.frames.length/((this.stopTime-this.startTime)/1e3)),i=t.length>0?Math.max(...t):e,n=t.length>0?Math.min(...t):e,o=t.length>0?Li(t):0;return{fpsAvg:e,fpsMax:i,fpsMin:n,fpsStdDev:o}});p(this,"start",()=>{this.startTime=Date.now(),this.frames=[],this.trackFrames()});p(this,"stop",()=>{cancelAnimationFrame(this.rafId),this.stopTime=Date.now()});p(this,"trackFrames",()=>{this.frames.push(Date.now()),this.rafId=requestAnimationFrame(this.trackFrames)})}}const _i="landscape",Bi="portrait";function Fi(){try{const s=document.createElement("canvas");return!!window.WebGLRenderingContext&&(s.getContext("webgl")||s.getContext("experimental-webgl"))instanceof WebGLRenderingContext}catch{return!1}}async function Di(){if(!window.createImageBitmap)return!1;const e=await(await fetch("data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=")).blob();try{return await createImageBitmap(e),!0}catch{return!1}}function Ye(){return window.innerWidth>=window.innerHeight?_i:Bi}var Be,ie,se,ne,ke,Fe,ve,De;class Ni extends Xt{constructor(...e){super(...e);p(this,"FPS_SAMPLE_INTERVAL",1e4);M(this,Be,0);M(this,ie,void 0);M(this,se,void 0);M(this,ne,void 0);M(this,ke,!1);M(this,Fe,!1);M(this,ve,"");M(this,De,[]);k(this,se,{}),k(this,ne,this.deviceInfo()),k(this,ie,this.config.gameVersion),this.on("state",({balance:i})=>{k(this,Be,i)}),this.on("autoplay",({action:i})=>{["start","resume"].includes(i)?k(this,ke,!0):k(this,ke,!1)}),this.on("settings",({fastPlay:i})=>{i!==void 0&&k(this,Fe,i)}),this.registerEvents()}async registerEvents(){y(this,ne).then(e=>{this.track("Device Information",e)}),this.on("loadStart",()=>{this.track("Game Loading",{progress:0,step:"initial"})}),this.on("loadProgress",e=>{this.track("Game Loading",{progress:e.progress})}),this.on("loadEnd",()=>{this.track("Game Loading",{progress:100,step:"complete"})}),this.on("error",e=>{this.track("System Message",{systemMessageText:e.messageCode,systemMessageType:e.type})}),this.on("openGameResponse",async e=>{k(this,ve,e.contract.stateType.nextRound),k(this,se,{balanceInCoins:e.contract.balance.coins,clientVersion:y(this,ie),coinValueInCents:this.sdkConfig.api.coinValueInCents,coinValueInCentsFloat:this.sdkConfig.api.coinValueInCents,currency:this.sdkConfig.api.currency,defaultBaseBet:e.contract.bet.default.base,defaultBetMultiplier:e.contract.bet.default.multiplier,environment:"release",gameCode:this.sdkConfig.api.game,gameCodeServer:this.sdkConfig.api.game,gameModelFile:e.contract.gameModel,jurisdiction:this.sdkConfig.api.jurisdiction,languageCode:this.sdkConfig.ui.language,operatorName:"kalamba",partnerId:this.sdkConfig.api.brand,partnerParentId:this.sdkConfig.api.integration,platform:"WEB",playMode:this.sdkConfig.api.playMode,referrer:window.location.hostname,serverVersion:e.contract.metaData.version}),this.track("Game Open",y(this,se))}),this.on("playCycleEnd",async e=>{const i=await y(this,ne),{base:n,multiplier:o,specialAction:a}=e.contract.bet.lastPaid??{},h=e.contract.balance.coins,g=e.contract.bet.lastPaid.base*e.contract.bet.lastPaid.multiplier,m=e.contract.win.total,w=m-g,v=a||"spin",N=e.contract.roundId;this.track("Betting Activity",{balance:h-w,balanceAfter:h,baseBet:n,betMultiplier:o,betType:v,gameVersion:y(this,ie),coinValueInCents:this.sdkConfig.api.coinValueInCents,coinValueInCentsFloat:this.sdkConfig.api.coinValueInCents,currency:this.sdkConfig.api.currency,environment:"release",gameCode:this.sdkConfig.api.game,gameCodeServer:this.sdkConfig.api.game,isMobile:i.isMobile,netResult:w,operatorName:"kalamba",orientation:Ye(),partnerId:this.sdkConfig.api.brand,partnerParentId:this.sdkConfig.api.integration,platform:"WEB",playMode:this.sdkConfig.api.playMode,roundId:N,roundTypes:["BaseGame"],totalBet:g,totalWin:m}),k(this,De,[])}),this.on("telemetry.click",e=>{this.track("UI Interaction",{action:"click",...this.getExtraUiInteractionData(),...e})}),this.on("telemetry.orientationChange",()=>{this.track("UI Interaction",{action:"orientationChange",...this.getExtraUiInteractionData()})}),this.reportFpsSample(),this.reportFpsRound()}reportFpsSample(){const e=new Rt,i=()=>{e.stop();const o=e.getReport();this.track("FPS Performance",{...o,fpsType:"sample"}),n()},n=async()=>{e.start(),setTimeout(i,this.FPS_SAMPLE_INTERVAL)};n()}reportFpsRound(){const e=new Rt;this.on("playCycleStart",()=>{e.start()}),this.on("playCycleEnd",()=>{e.stop();const i=e.getReport();this.track("FPS Performance",{...i,fpsType:"playCycleStart->playCycleEnd"})})}getExtraUiInteractionData(){return{orientation:Ye(),stateType:y(this,ve)}}async deviceInfo(){var h;const{browser:e,device:i,os:n}=R(navigator.userAgent),o=Fi(),a=await Di();return{browserName:e.name,browserVersion:e.version,connection:(h=navigator.connection)==null?void 0:h.effectiveType,deviceName:i.model,deviceType:i.type,isMobile:["mobile","tablet"].includes(i.type??""),isWebGLSupported:o,isWebPSupported:a,manufacturer:i.vendor,operatingSystem:n.name,operatingSystemVersion:n.version,orientation:Ye(),pixelRatio:window.devicePixelRatio,screenHeight:window.screen.height,screenSize:`${window.screen.width}x${window.screen.height}`,screenWidth:window.screen.width,timezoneOffsetMinutes:new Date().getTimezoneOffset(),windowHeight:window.innerHeight,windowSize:`${window.innerWidth}x${window.innerHeight}`,windowWidth:window.innerWidth}}}Be=new WeakMap,ie=new WeakMap,se=new WeakMap,ne=new WeakMap,ke=new WeakMap,Fe=new WeakMap,ve=new WeakMap,De=new WeakMap;var C=[];for(var Ze=0;Ze<256;++Ze)C.push((Ze+256).toString(16).slice(1));function Gi(s,t=0){return(C[s[t+0]]+C[s[t+1]]+C[s[t+2]]+C[s[t+3]]+"-"+C[s[t+4]]+C[s[t+5]]+"-"+C[s[t+6]]+C[s[t+7]]+"-"+C[s[t+8]]+C[s[t+9]]+"-"+C[s[t+10]]+C[s[t+11]]+C[s[t+12]]+C[s[t+13]]+C[s[t+14]]+C[s[t+15]]).toLowerCase()}var Oe,Hi=new Uint8Array(16);function Vi(){if(!Oe&&(Oe=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Oe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Oe(Hi)}var zi=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Ut={randomUUID:zi};function Lt(s,t,e){if(Ut.randomUUID&&!t&&!s)return Ut.randomUUID();s=s||{};var i=s.random||(s.rng||Vi)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,t){e=e||0;for(var n=0;n<16;++n)t[e+n]=i[n];return t}return Gi(i)}class dt{constructor(t,e){p(this,"config");p(this,"sdkConfig");this.config=t,this.sdkConfig=e}}const _t=25,Bt=1e4;var ae,oe,re,H,Ee;class qi extends dt{constructor(...e){super(...e);M(this,ae,"https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");M(this,oe,void 0);M(this,re,void 0);M(this,H,[]);M(this,Ee,void 0);p(this,"processQueueForced");k(this,oe,new Date().getTime()),k(this,H,[]),k(this,Ee,Lt()),this.processQueueForced=this.processQueue.bind(this,!0),this.schedule(),fetch(y(this,ae),{method:"OPTIONS"}).catch(ut.noop),this.subscribe()}subscribe(){window.addEventListener("beforeunload",this.processQueueForced,!1),window.addEventListener("pagehide",this.processQueueForced,!1),window.addEventListener("visibilitychange",this.processQueueForced,!1)}schedule(){y(this,re)&&clearTimeout(y(this,re)),k(this,re,window.setTimeout(()=>this.processQueue(),Bt))}send(e){k(this,oe,new Date().getTime());try{navigator.sendBeacon(y(this,ae),JSON.stringify(e))}catch{fetch(y(this,ae),{body:JSON.stringify(e),method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0}).catch(ut.noop)}this.schedule()}addToQueue(e){y(this,H).push(e),this.processQueue()}processQueue(e=!1){if(!(this.sdkConfig==null||!this.sdkConfig.ui.feature.allowTelemetry)&&!(!e&&y(this,H).length<_t&&new Date().getTime()-y(this,oe)<Bt))for(;y(this,H).length;){const i=y(this,H).splice(0,_t).map(n=>({...n,sessionID:y(this,Ee),userID:this.sdkConfig.api.user}));this.send(i)}}track(e,i){this.addToQueue({eventName:e,eventParams:i,eventTimestamp:new Date().getTime(),eventUUID:Lt()})}}ae=new WeakMap,oe=new WeakMap,re=new WeakMap,H=new WeakMap,Ee=new WeakMap;const Wi=U("LoggingTracker","color:#000000;font-weight:bold;");class $i extends dt{track(t,e){Wi(`@${this.sdkConfig.api.user}`,`[${t}]`,e)}}exports.BasicPlugin=Zt;exports.CasinoPlugin=q;exports.DebuggingPlugin=ti;exports.GigPlugin=si;exports.KalambaBullseyeParsers=Ai;exports.KalambaBullseyePlugin=Ui;exports.KalambaStargazerPlugin=Ni;exports.KalambaStargazerTracker=qi;exports.LoggingTracker=$i;exports.OryxPlugin=ai;exports.PariplayPlugin=di;exports.RelaxFEIMPlugin=li;exports.RgsPlugin=Vt;exports.TelemetryPlugin=Xt;exports.Tracker=dt;exports.TukoPlugin=ui;
|
package/dist/plugins.d.ts
CHANGED
|
@@ -304,7 +304,8 @@ declare class KalambaWebSocketClient extends WebSocketClient {
|
|
|
304
304
|
baseBet: number;
|
|
305
305
|
betMultiplier: number;
|
|
306
306
|
} | undefined;
|
|
307
|
-
maxBetInCoins
|
|
307
|
+
maxBetInCoins?: number | undefined;
|
|
308
|
+
maxWinInCoins?: number | undefined;
|
|
308
309
|
metaData: {
|
|
309
310
|
rtpValues: {
|
|
310
311
|
key: string;
|
|
@@ -425,7 +426,8 @@ declare type OpenGameGameEvent = GameEvent<Record<string, unknown> & {
|
|
|
425
426
|
baseBet: number;
|
|
426
427
|
betMultiplier: number;
|
|
427
428
|
};
|
|
428
|
-
maxBetInCoins
|
|
429
|
+
maxBetInCoins?: number;
|
|
430
|
+
maxWinInCoins?: number;
|
|
429
431
|
metaData: {
|
|
430
432
|
rtpValues: {
|
|
431
433
|
key: string;
|
|
@@ -461,7 +463,7 @@ declare type OpenGameResponse = {
|
|
|
461
463
|
bet: {
|
|
462
464
|
available: Record<number, number[]>;
|
|
463
465
|
default: Bet;
|
|
464
|
-
max: number;
|
|
466
|
+
max: number | null;
|
|
465
467
|
last: Bet | null;
|
|
466
468
|
lastPaid: Bet | null;
|
|
467
469
|
};
|
|
@@ -492,6 +494,7 @@ declare type OpenGameResponse = {
|
|
|
492
494
|
};
|
|
493
495
|
uiMessages: unknown[];
|
|
494
496
|
win: {
|
|
497
|
+
max: number | null;
|
|
495
498
|
round: number;
|
|
496
499
|
total: number;
|
|
497
500
|
};
|
|
@@ -748,7 +751,6 @@ declare interface SdkConfig {
|
|
|
748
751
|
showUi: boolean;
|
|
749
752
|
};
|
|
750
753
|
language: string;
|
|
751
|
-
maximumBet?: number;
|
|
752
754
|
minimumSpinDuration: number;
|
|
753
755
|
requestTimeoutMs: number;
|
|
754
756
|
incompleteGameResolution: {
|
package/dist/plugins.js
CHANGED
|
@@ -43,7 +43,7 @@ class j {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
const Qt = U("BasicPlugin", "color:#000000;font-weight:bold;");
|
|
46
|
-
class
|
|
46
|
+
class Di extends j {
|
|
47
47
|
constructor(...t) {
|
|
48
48
|
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Qt("configured");
|
|
49
49
|
}
|
|
@@ -254,7 +254,7 @@ function We(s) {
|
|
|
254
254
|
return ["NOTIFICATION", "POPUP"].includes(e.messageType.toUpperCase());
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function Ft(s) {
|
|
258
258
|
try {
|
|
259
259
|
return JSON.parse(s.text);
|
|
260
260
|
} catch {
|
|
@@ -262,12 +262,12 @@ function Dt(s) {
|
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
function ti(s) {
|
|
265
|
-
return s.map(
|
|
265
|
+
return s.map(Ft).filter(Boolean).find(function(e) {
|
|
266
266
|
return e.betId != null && e.winId != null;
|
|
267
267
|
}) || {};
|
|
268
268
|
}
|
|
269
269
|
function ii(s) {
|
|
270
|
-
return s.map(
|
|
270
|
+
return s.map(Ft).filter(Boolean).find(function(e) {
|
|
271
271
|
return e.TotalBet != null && e.TotalWin != null;
|
|
272
272
|
}) || {};
|
|
273
273
|
}
|
|
@@ -454,7 +454,7 @@ const he = U("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
|
|
|
454
454
|
class zi extends j {
|
|
455
455
|
constructor(...e) {
|
|
456
456
|
super(...e);
|
|
457
|
-
g(this, "VERSION", "1.
|
|
457
|
+
g(this, "VERSION", "1.17.0");
|
|
458
458
|
const i = document.createElement("script");
|
|
459
459
|
i.src = `https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`, i.onload = () => {
|
|
460
460
|
he("loaded"), window.FEIM.configure({
|
|
@@ -586,7 +586,7 @@ class qi extends j {
|
|
|
586
586
|
});
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de = "object", tt = "string", be = "major", l = "model", r = "name", d = "type", u = "vendor", c = "version", S = "architecture", Y = "console", b = "mobile", f = "tablet", T = "smarttv", xe = "wearable", pt = "xr", it = "embedded", gt = "user-agent", st = 500, ot = "brands", W = "formFactors", rt = "fullVersionList", Z = "platform", ct = "platformVersion", Ge = "bitness", q = "sec-ch-ua", ni = q + "-full-version-list", ai = q + "-arch", oi = q + "-" + Ge, ri = q + "-form-factors", ci = q + "-" + b, di = q + "-" + l,
|
|
589
|
+
var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de = "object", tt = "string", be = "major", l = "model", r = "name", d = "type", u = "vendor", c = "version", S = "architecture", Y = "console", b = "mobile", f = "tablet", T = "smarttv", xe = "wearable", pt = "xr", it = "embedded", gt = "user-agent", st = 500, ot = "brands", W = "formFactors", rt = "fullVersionList", Z = "platform", ct = "platformVersion", Ge = "bitness", q = "sec-ch-ua", ni = q + "-full-version-list", ai = q + "-arch", oi = q + "-" + Ge, ri = q + "-form-factors", ci = q + "-" + b, di = q + "-" + l, Dt = q + "-" + Z, li = Dt + "-version", Nt = [ot, rt, b, l, Z, ct, S, W, Ge], A = "browser", B = "cpu", x = "device", F = "engine", P = "os", ee = "result", Ce = "Amazon", pe = "Apple", mt = "ASUS", wt = "BlackBerry", Me = "Google", bt = "Huawei", ft = "Lenovo", je = "LG", Re = "Microsoft", yt = "Motorola", Se = "Samsung", kt = "Sharp", Ie = "Sony", Xe = "Xiaomi", Ke = "Zebra", Q = "Mobile ", J = " Browser", Te = "Chrome", ui = "Edge", ge = "Firefox", me = "Opera", vt = "Facebook", Et = "Sogou", nt = "Windows", hi = typeof window !== V, I = hi && window.navigator ? window.navigator : void 0, G = I && I.userAgentData ? I.userAgentData : void 0, pi = function(s, t) {
|
|
590
590
|
var e = {}, i = t;
|
|
591
591
|
if (!Ue(t)) {
|
|
592
592
|
i = {};
|
|
@@ -628,7 +628,7 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
|
|
|
628
628
|
return le(s) ? s.toLowerCase() : s;
|
|
629
629
|
}, Je = function(s) {
|
|
630
630
|
return le(s) ? $(/[^\d\.]/g, s).split(".")[0] : void 0;
|
|
631
|
-
},
|
|
631
|
+
}, D = function(s) {
|
|
632
632
|
for (var t in s) {
|
|
633
633
|
var e = s[t];
|
|
634
634
|
typeof e == de && e.length == 2 ? this[e[0]] = e[1] : this[e] = void 0;
|
|
@@ -636,7 +636,7 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
|
|
|
636
636
|
return this;
|
|
637
637
|
}, $ = function(s, t) {
|
|
638
638
|
return le(t) ? t.replace(s, ce) : t;
|
|
639
|
-
},
|
|
639
|
+
}, we = function(s) {
|
|
640
640
|
return $(/\\?\"/g, s);
|
|
641
641
|
}, fe = function(s, t) {
|
|
642
642
|
if (le(s))
|
|
@@ -644,11 +644,11 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
|
|
|
644
644
|
}, Ct = function(s, t) {
|
|
645
645
|
if (!(!s || !t))
|
|
646
646
|
for (var e = 0, i, n, o, a, h, p; e < t.length && !h; ) {
|
|
647
|
-
var
|
|
648
|
-
for (i = n = 0; i <
|
|
649
|
-
if (h =
|
|
650
|
-
for (o = 0; o <
|
|
651
|
-
p = h[++n], a =
|
|
647
|
+
var m = t[e], w = t[e + 1];
|
|
648
|
+
for (i = n = 0; i < m.length && !h && m[i]; )
|
|
649
|
+
if (h = m[i++].exec(s), h)
|
|
650
|
+
for (o = 0; o < w.length; o++)
|
|
651
|
+
p = h[++n], a = w[o], typeof a === de && a.length > 0 ? a.length === 2 ? typeof a[1] == et ? this[a[0]] = a[1].call(this, p) : this[a[0]] = a[1] : a.length === 3 ? typeof a[1] === et && !(a[1].exec && a[1].test) ? this[a[0]] = p ? a[1].call(this, p, a[2]) : void 0 : this[a[0]] = p ? p.replace(a[1], a[2]) : void 0 : a.length === 4 && (this[a[0]] = p ? a[3].call(this, p.replace(a[1], a[2])) : void 0) : this[a] = p || void 0;
|
|
652
652
|
e += 2;
|
|
653
653
|
}
|
|
654
654
|
}, Le = function(s, t) {
|
|
@@ -708,17 +708,17 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
|
|
|
708
708
|
/opios[\/ ]+([\w\.]+)/i
|
|
709
709
|
// Opera mini on iphone >= 8.0
|
|
710
710
|
],
|
|
711
|
-
[c, [r,
|
|
711
|
+
[c, [r, me + " Mini"]],
|
|
712
712
|
[
|
|
713
713
|
/\bop(?:rg)?x\/([\w\.]+)/i
|
|
714
714
|
// Opera GX
|
|
715
715
|
],
|
|
716
|
-
[c, [r,
|
|
716
|
+
[c, [r, me + " GX"]],
|
|
717
717
|
[
|
|
718
718
|
/\bopr\/([\w\.]+)/i
|
|
719
719
|
// Opera Webkit
|
|
720
720
|
],
|
|
721
|
-
[c, [r,
|
|
721
|
+
[c, [r, me]],
|
|
722
722
|
[
|
|
723
723
|
// Mixed
|
|
724
724
|
/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
|
|
@@ -796,7 +796,7 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
|
|
|
796
796
|
/\bopt\/([\w\.]+)/i
|
|
797
797
|
// Opera Touch
|
|
798
798
|
],
|
|
799
|
-
[c, [r,
|
|
799
|
+
[c, [r, me + " Touch"]],
|
|
800
800
|
[
|
|
801
801
|
/coc_coc\w+\/([\w\.]+)/i
|
|
802
802
|
// Coc Coc Browser
|
|
@@ -811,7 +811,7 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
|
|
|
811
811
|
/coast\/([\w\.]+)/i
|
|
812
812
|
// Opera Coast
|
|
813
813
|
],
|
|
814
|
-
[c, [r,
|
|
814
|
+
[c, [r, me + " Coast"]],
|
|
815
815
|
[
|
|
816
816
|
/miuibrowser\/([\w\.]+)/i
|
|
817
817
|
// MIUI Browser
|
|
@@ -1224,16 +1224,16 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
|
|
|
1224
1224
|
/\(bb10; (\w+)/i
|
|
1225
1225
|
// BlackBerry 10
|
|
1226
1226
|
],
|
|
1227
|
-
[l, [u,
|
|
1227
|
+
[l, [u, wt], [d, b]],
|
|
1228
1228
|
[
|
|
1229
1229
|
// Asus
|
|
1230
1230
|
/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
|
|
1231
1231
|
],
|
|
1232
|
-
[l, [u,
|
|
1232
|
+
[l, [u, mt], [d, f]],
|
|
1233
1233
|
[
|
|
1234
1234
|
/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
|
|
1235
1235
|
],
|
|
1236
|
-
[l, [u,
|
|
1236
|
+
[l, [u, mt], [d, b]],
|
|
1237
1237
|
[
|
|
1238
1238
|
// HTC
|
|
1239
1239
|
/(nexus 9)/i
|
|
@@ -1575,7 +1575,7 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
|
|
|
1575
1575
|
/\(bb(10);/i
|
|
1576
1576
|
// BlackBerry 10
|
|
1577
1577
|
],
|
|
1578
|
-
[c, [r,
|
|
1578
|
+
[c, [r, wt]],
|
|
1579
1579
|
[
|
|
1580
1580
|
/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i
|
|
1581
1581
|
// Symbian
|
|
@@ -1659,30 +1659,30 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
|
|
|
1659
1659
|
]
|
|
1660
1660
|
}, Ae = function() {
|
|
1661
1661
|
var s = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
|
|
1662
|
-
return
|
|
1662
|
+
return D.call(s.init, [
|
|
1663
1663
|
[A, [r, c, be, d]],
|
|
1664
1664
|
[B, [S]],
|
|
1665
1665
|
[x, [d, l, u]],
|
|
1666
|
-
[
|
|
1666
|
+
[F, [r, c]],
|
|
1667
1667
|
[P, [r, c]]
|
|
1668
|
-
]),
|
|
1668
|
+
]), D.call(s.isIgnore, [
|
|
1669
1669
|
[A, [c, be]],
|
|
1670
|
-
[
|
|
1670
|
+
[F, [c]],
|
|
1671
1671
|
[P, [c]]
|
|
1672
|
-
]),
|
|
1672
|
+
]), D.call(s.isIgnoreRgx, [
|
|
1673
1673
|
[A, / ?browser$/i],
|
|
1674
1674
|
[P, / ?os$/i]
|
|
1675
|
-
]),
|
|
1675
|
+
]), D.call(s.toString, [
|
|
1676
1676
|
[A, [r, c]],
|
|
1677
1677
|
[B, [S]],
|
|
1678
1678
|
[x, [u, l]],
|
|
1679
|
-
[
|
|
1679
|
+
[F, [r, c]],
|
|
1680
1680
|
[P, [r, c]]
|
|
1681
1681
|
]), s;
|
|
1682
1682
|
}(), gi = function(s, t) {
|
|
1683
1683
|
var e = Ae.init[t], i = Ae.isIgnore[t] || 0, n = Ae.isIgnoreRgx[t] || 0, o = Ae.toString[t] || 0;
|
|
1684
1684
|
function a() {
|
|
1685
|
-
|
|
1685
|
+
D.call(this, e);
|
|
1686
1686
|
}
|
|
1687
1687
|
return a.prototype.getItem = function() {
|
|
1688
1688
|
return s;
|
|
@@ -1694,8 +1694,8 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
|
|
|
1694
1694
|
return s.detectFeature().get();
|
|
1695
1695
|
}, t != ee && (a.prototype.is = function(h) {
|
|
1696
1696
|
var p = !1;
|
|
1697
|
-
for (var
|
|
1698
|
-
if (this.hasOwnProperty(
|
|
1697
|
+
for (var m in this)
|
|
1698
|
+
if (this.hasOwnProperty(m) && !at(i, m) && z(n ? $(n, this[m]) : this[m]) == z(n ? $(n, h) : h)) {
|
|
1699
1699
|
if (p = !0, h != V)
|
|
1700
1700
|
break;
|
|
1701
1701
|
} else if (h == V && p) {
|
|
@@ -1709,30 +1709,30 @@ var si = "2.0.0-beta.3", ce = "", ht = "?", et = "function", V = "undefined", de
|
|
|
1709
1709
|
typeof this[o[p]] !== V && (h += (h ? " " : ce) + this[o[p]]);
|
|
1710
1710
|
return h || V;
|
|
1711
1711
|
}), G || (a.prototype.then = function(h) {
|
|
1712
|
-
var p = this,
|
|
1712
|
+
var p = this, m = function() {
|
|
1713
1713
|
for (var v in p)
|
|
1714
1714
|
p.hasOwnProperty(v) && (this[v] = p[v]);
|
|
1715
1715
|
};
|
|
1716
|
-
|
|
1716
|
+
m.prototype = {
|
|
1717
1717
|
is: a.prototype.is,
|
|
1718
1718
|
toString: a.prototype.toString
|
|
1719
1719
|
};
|
|
1720
|
-
var
|
|
1721
|
-
return h(
|
|
1720
|
+
var w = new m();
|
|
1721
|
+
return h(w), w;
|
|
1722
1722
|
}), new a();
|
|
1723
1723
|
};
|
|
1724
1724
|
function Gt(s, t) {
|
|
1725
|
-
if (s = s || {},
|
|
1726
|
-
|
|
1725
|
+
if (s = s || {}, D.call(this, Nt), t)
|
|
1726
|
+
D.call(this, [
|
|
1727
1727
|
[ot, Qe(s[q])],
|
|
1728
1728
|
[rt, Qe(s[ni])],
|
|
1729
1729
|
[b, /\?1/.test(s[ci])],
|
|
1730
|
-
[l,
|
|
1731
|
-
[Z,
|
|
1732
|
-
[ct,
|
|
1733
|
-
[S,
|
|
1730
|
+
[l, we(s[di])],
|
|
1731
|
+
[Z, we(s[Dt])],
|
|
1732
|
+
[ct, we(s[li])],
|
|
1733
|
+
[S, we(s[ai])],
|
|
1734
1734
|
[W, Qe(s[ri])],
|
|
1735
|
-
[Ge,
|
|
1735
|
+
[Ge, we(s[oi])]
|
|
1736
1736
|
]);
|
|
1737
1737
|
else
|
|
1738
1738
|
for (var e in s)
|
|
@@ -1761,7 +1761,7 @@ function Tt(s, t, e, i) {
|
|
|
1761
1761
|
var n = this.data, o = function(a) {
|
|
1762
1762
|
return n[a].getItem().detectFeature().get();
|
|
1763
1763
|
};
|
|
1764
|
-
this.set(A, o(A)).set(B, o(B)).set(x, o(x)).set(
|
|
1764
|
+
this.set(A, o(A)).set(B, o(B)).set(x, o(x)).set(F, o(F)).set(P, o(P));
|
|
1765
1765
|
}
|
|
1766
1766
|
return this;
|
|
1767
1767
|
}, this.parseUA = function() {
|
|
@@ -1773,8 +1773,8 @@ function Tt(s, t, e, i) {
|
|
|
1773
1773
|
var a = n[rt] || n[ot], h;
|
|
1774
1774
|
if (a)
|
|
1775
1775
|
for (var p in a) {
|
|
1776
|
-
var
|
|
1777
|
-
!/not.a.brand/i.test(
|
|
1776
|
+
var m = $(/(Google|Microsoft) /, a[p].brand || a[p]), w = a[p].version;
|
|
1777
|
+
!/not.a.brand/i.test(m) && (!h || /chrom/i.test(h) && !/chromi/i.test(m)) && (this.set(r, m).set(c, w).set(be, Je(w)), h = m);
|
|
1778
1778
|
}
|
|
1779
1779
|
break;
|
|
1780
1780
|
case B:
|
|
@@ -1804,10 +1804,10 @@ function Tt(s, t, e, i) {
|
|
|
1804
1804
|
var ue = this.data, O = function(_) {
|
|
1805
1805
|
return ue[_].getItem().setCH(n).parseCH().get();
|
|
1806
1806
|
};
|
|
1807
|
-
this.set(A, O(A)).set(B, O(B)).set(x, O(x)).set(
|
|
1807
|
+
this.set(A, O(A)).set(B, O(B)).set(x, O(x)).set(F, O(F)).set(P, O(P));
|
|
1808
1808
|
}
|
|
1809
1809
|
return this;
|
|
1810
|
-
},
|
|
1810
|
+
}, D.call(this, [
|
|
1811
1811
|
["itemType", s],
|
|
1812
1812
|
["ua", t],
|
|
1813
1813
|
["uaCH", i],
|
|
@@ -1829,16 +1829,16 @@ function R(s, t, e) {
|
|
|
1829
1829
|
)
|
|
1830
1830
|
), n = new Gt(e, !0), o = t ? pi(It, t) : It, a = function(h) {
|
|
1831
1831
|
return h == ee ? function() {
|
|
1832
|
-
return new Tt(h, i, o, n).set("ua", i).set(A, this.getBrowser()).set(B, this.getCPU()).set(x, this.getDevice()).set(
|
|
1832
|
+
return new Tt(h, i, o, n).set("ua", i).set(A, this.getBrowser()).set(B, this.getCPU()).set(x, this.getDevice()).set(F, this.getEngine()).set(P, this.getOS()).get();
|
|
1833
1833
|
} : function() {
|
|
1834
1834
|
return new Tt(h, i, o[h], n).parseUA().get();
|
|
1835
1835
|
};
|
|
1836
1836
|
};
|
|
1837
|
-
return
|
|
1837
|
+
return D.call(this, [
|
|
1838
1838
|
["getBrowser", a(A)],
|
|
1839
1839
|
["getCPU", a(B)],
|
|
1840
1840
|
["getDevice", a(x)],
|
|
1841
|
-
["getEngine", a(
|
|
1841
|
+
["getEngine", a(F)],
|
|
1842
1842
|
["getOS", a(P)],
|
|
1843
1843
|
["getResult", a(ee)],
|
|
1844
1844
|
["getUA", function() {
|
|
@@ -1854,7 +1854,7 @@ R.BROWSER = He([r, c, be, d]);
|
|
|
1854
1854
|
R.CPU = He([S]);
|
|
1855
1855
|
R.DEVICE = He([l, u, d, Y, b, T, f, xe, it]);
|
|
1856
1856
|
R.ENGINE = R.OS = He([r, c]);
|
|
1857
|
-
class
|
|
1857
|
+
class mi {
|
|
1858
1858
|
constructor(t, e) {
|
|
1859
1859
|
g(this, "config");
|
|
1860
1860
|
g(this, "sdkConfig");
|
|
@@ -1873,7 +1873,7 @@ class wi {
|
|
|
1873
1873
|
});
|
|
1874
1874
|
}
|
|
1875
1875
|
}
|
|
1876
|
-
class
|
|
1876
|
+
class wi {
|
|
1877
1877
|
constructor(t) {
|
|
1878
1878
|
g(this, "socket", null);
|
|
1879
1879
|
g(this, "webSocketUrl");
|
|
@@ -1957,7 +1957,7 @@ function yi(s) {
|
|
|
1957
1957
|
return _e(s) && s.body.event.includes("_RESULT");
|
|
1958
1958
|
}
|
|
1959
1959
|
var te, ye;
|
|
1960
|
-
class ki extends
|
|
1960
|
+
class ki extends wi {
|
|
1961
1961
|
constructor(e, i) {
|
|
1962
1962
|
const n = new URL(e.apiUrl);
|
|
1963
1963
|
n.searchParams.set("cageCode", e.cageCode), n.searchParams.set("gameCode", e.gameCode), n.searchParams.set("operatorCode", e.operatorCode), n.searchParams.set("playMode", e.playMode), n.searchParams.set("token", e.token), n.searchParams.set("username", e.username);
|
|
@@ -2037,11 +2037,11 @@ class ki extends mi {
|
|
|
2037
2037
|
return new Promise((o, a) => {
|
|
2038
2038
|
setTimeout(() => a({ type: "timeout" }), y(this, te));
|
|
2039
2039
|
const h = (p) => {
|
|
2040
|
-
const
|
|
2040
|
+
const m = Pe(p);
|
|
2041
2041
|
try {
|
|
2042
|
-
e.cId ===
|
|
2042
|
+
e.cId === m.header.cId && (this.removeEventListener("message", h), m.header.code === 1 ? o(m) : a({ message: m, type: "error" }));
|
|
2043
2043
|
} catch {
|
|
2044
|
-
a({ message:
|
|
2044
|
+
a({ message: m, type: "error" });
|
|
2045
2045
|
}
|
|
2046
2046
|
};
|
|
2047
2047
|
this.addEventListener("message", h), this.send(n);
|
|
@@ -2092,14 +2092,14 @@ class ki extends mi {
|
|
|
2092
2092
|
data: i
|
|
2093
2093
|
};
|
|
2094
2094
|
return new Promise((a, h) => {
|
|
2095
|
-
const p = (
|
|
2096
|
-
const
|
|
2097
|
-
_e(
|
|
2095
|
+
const p = (m) => {
|
|
2096
|
+
const w = Pe(m);
|
|
2097
|
+
_e(w) && o.seqId === w.body.correlationSeqId && (this.removeEventListener("message", p), yi(w) ? a(w.body) : Pt(w) && h({ data: w.body, type: "error" }));
|
|
2098
2098
|
};
|
|
2099
2099
|
this.addEventListener("message", p), this.request(n, o).catch(
|
|
2100
|
-
(
|
|
2101
|
-
var
|
|
2102
|
-
return h({ data: (
|
|
2100
|
+
(m) => {
|
|
2101
|
+
var w;
|
|
2102
|
+
return h({ data: (w = m == null ? void 0 : m.message) == null ? void 0 : w.body, type: m.type });
|
|
2103
2103
|
}
|
|
2104
2104
|
);
|
|
2105
2105
|
});
|
|
@@ -2159,7 +2159,7 @@ function zt(s, t) {
|
|
|
2159
2159
|
base: i.additionalConfigData.defaultBet.baseBet,
|
|
2160
2160
|
multiplier: i.additionalConfigData.defaultBet.betMultiplier
|
|
2161
2161
|
},
|
|
2162
|
-
max: i.additionalConfigData.maxAllowedOverallBetInCoins,
|
|
2162
|
+
max: i.additionalConfigData.maxAllowedOverallBetInCoins ?? null,
|
|
2163
2163
|
last: i.gameState.betFromCurrentRound ? {
|
|
2164
2164
|
base: i.gameState.betFromCurrentRound.baseBet,
|
|
2165
2165
|
multiplier: i.gameState.betFromCurrentRound.betMultiplier
|
|
@@ -2201,6 +2201,7 @@ function zt(s, t) {
|
|
|
2201
2201
|
},
|
|
2202
2202
|
uiMessages: s.uiMessages,
|
|
2203
2203
|
win: {
|
|
2204
|
+
max: i.maxWin ?? null,
|
|
2204
2205
|
round: i.gameState.totalWinFromCurrentRound,
|
|
2205
2206
|
total: i.gameState.totalWinFromCurrentGameCycle
|
|
2206
2207
|
}
|
|
@@ -2216,7 +2217,7 @@ function zt(s, t) {
|
|
|
2216
2217
|
base: e.defaultBet.baseBet,
|
|
2217
2218
|
multiplier: e.defaultBet.betMultiplier
|
|
2218
2219
|
},
|
|
2219
|
-
max: e.maxBetInCoins,
|
|
2220
|
+
max: e.maxBetInCoins ?? null,
|
|
2220
2221
|
last: e.lastBet ? {
|
|
2221
2222
|
base: e.lastBet.baseBet,
|
|
2222
2223
|
multiplier: e.lastBet.betMultiplier
|
|
@@ -2258,6 +2259,7 @@ function zt(s, t) {
|
|
|
2258
2259
|
},
|
|
2259
2260
|
uiMessages: s.contract.uiMessages.concat(e.uiMessages),
|
|
2260
2261
|
win: {
|
|
2262
|
+
max: e.maxWinInCoins ?? null,
|
|
2261
2263
|
round: e.roundWin,
|
|
2262
2264
|
total: e.totalWin
|
|
2263
2265
|
}
|
|
@@ -2285,8 +2287,8 @@ function Wt(s) {
|
|
|
2285
2287
|
multiplier: e.gameState.betFromCurrentRound.betMultiplier
|
|
2286
2288
|
} : null,
|
|
2287
2289
|
lastPaid: {
|
|
2288
|
-
base: e.gameState.lastPlacedMainGameBet.baseBet,
|
|
2289
|
-
multiplier: e.gameState.lastPlacedMainGameBet.betMultiplier
|
|
2290
|
+
base: (e.gameState.lastPlacedMainGameBet ?? e.gameState.betFromCurrentRound).baseBet,
|
|
2291
|
+
multiplier: (e.gameState.lastPlacedMainGameBet ?? e.gameState.betFromCurrentRound).betMultiplier
|
|
2290
2292
|
}
|
|
2291
2293
|
},
|
|
2292
2294
|
balance: {
|
|
@@ -2421,7 +2423,7 @@ const Wi = {
|
|
|
2421
2423
|
ukr: "uk",
|
|
2422
2424
|
vie: "vi"
|
|
2423
2425
|
}, { device: Ei } = R(navigator.userAgent), Ci = U("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
|
|
2424
|
-
class $i extends
|
|
2426
|
+
class $i extends mi {
|
|
2425
2427
|
constructor(...e) {
|
|
2426
2428
|
super(...e);
|
|
2427
2429
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -2475,8 +2477,8 @@ class $i extends wi {
|
|
|
2475
2477
|
}
|
|
2476
2478
|
}
|
|
2477
2479
|
async openGame() {
|
|
2478
|
-
const e = new URLSearchParams(window.location.search), i = e.get("apiUrl"), n = e.get("cageCode"), o = e.get("gameCode"), a = e.get("operatorCode"), h = e.get("playMode"), p = e.get("token"),
|
|
2479
|
-
this.initialize({ apiUrl: i, cageCode: n, gameCode: o, operatorCode: a, playMode: h, token: p, username:
|
|
2480
|
+
const e = new URLSearchParams(window.location.search), i = e.get("apiUrl"), n = e.get("cageCode"), o = e.get("gameCode"), a = e.get("operatorCode"), h = e.get("playMode"), p = e.get("token"), m = e.get("username"), w = e.get("gameHistoryUrl"), v = e.get("homeUrl") ?? void 0, N = e.get("cashierUrl") ?? void 0;
|
|
2481
|
+
this.initialize({ apiUrl: i, cageCode: n, gameCode: o, operatorCode: a, playMode: h, token: p, username: m });
|
|
2480
2482
|
try {
|
|
2481
2483
|
await this.socket.connect();
|
|
2482
2484
|
} catch {
|
|
@@ -2508,7 +2510,7 @@ class $i extends wi {
|
|
|
2508
2510
|
country: L.contract.country,
|
|
2509
2511
|
currency: L.contract.currency,
|
|
2510
2512
|
coinValueInCents: L.contract.coinValueInCents,
|
|
2511
|
-
gameHistoryUrl:
|
|
2513
|
+
gameHistoryUrl: w,
|
|
2512
2514
|
homeUrl: v,
|
|
2513
2515
|
cashierUrl: N,
|
|
2514
2516
|
sessionId: ue.contract.sessionId,
|
|
@@ -2525,7 +2527,7 @@ class $i extends wi {
|
|
|
2525
2527
|
extra: a,
|
|
2526
2528
|
payloadToInject: h,
|
|
2527
2529
|
actionType: p
|
|
2528
|
-
} = e,
|
|
2530
|
+
} = e, m = {
|
|
2529
2531
|
bet: i ? { baseBet: i.base, betMultiplier: i.multiplier } : void 0,
|
|
2530
2532
|
forcedOutcomes: n,
|
|
2531
2533
|
// TODO: get rid of contractRest - it' a legacy from old RGS
|
|
@@ -2533,21 +2535,21 @@ class $i extends wi {
|
|
|
2533
2535
|
...h,
|
|
2534
2536
|
opaqueUiToGameServer: a
|
|
2535
2537
|
};
|
|
2536
|
-
let
|
|
2538
|
+
let w;
|
|
2537
2539
|
try {
|
|
2538
|
-
|
|
2540
|
+
w = await this.socket.sendAction(p, m);
|
|
2539
2541
|
} catch (v) {
|
|
2540
2542
|
throw { type: v.type, data: v.type === "error" ? $t(v.data) : void 0 };
|
|
2541
2543
|
}
|
|
2542
|
-
return Wt(
|
|
2544
|
+
return Wt(w);
|
|
2543
2545
|
}
|
|
2544
2546
|
registerFromSdkEvents() {
|
|
2545
2547
|
this.on("history", () => {
|
|
2546
2548
|
const {
|
|
2547
2549
|
api: { game: e, integration: i, integrationData: n, jurisdiction: o, user: a, gameHistoryUrl: h },
|
|
2548
2550
|
ui: { language: p }
|
|
2549
|
-
} = this.sdkConfig,
|
|
2550
|
-
|
|
2551
|
+
} = this.sdkConfig, m = a.replace(/^user_/, "").replace(new RegExp(`_${i}$`), ""), w = new URL(h);
|
|
2552
|
+
w.searchParams.set("gameCode", e), w.searchParams.set("jurisdiction", o), w.searchParams.set("operatorCode", i), w.searchParams.set("token", n.token), w.searchParams.set("username", m), w.searchParams.set("languageCode", p), this.config.gameHistoryUrl && w.searchParams.set("gameHistoryUrl", this.config.gameHistoryUrl), window.open(w.toString(), "_blank");
|
|
2551
2553
|
});
|
|
2552
2554
|
}
|
|
2553
2555
|
}
|
|
@@ -2622,7 +2624,7 @@ async function Pi() {
|
|
|
2622
2624
|
function Ye() {
|
|
2623
2625
|
return window.innerWidth >= window.innerHeight ? Ii : Ti;
|
|
2624
2626
|
}
|
|
2625
|
-
var Be, ie, se, ne, ke,
|
|
2627
|
+
var Be, ie, se, ne, ke, Fe, ve, De;
|
|
2626
2628
|
class ji extends Mi {
|
|
2627
2629
|
constructor(...e) {
|
|
2628
2630
|
super(...e);
|
|
@@ -2633,15 +2635,15 @@ class ji extends Mi {
|
|
|
2633
2635
|
M(this, se, void 0);
|
|
2634
2636
|
M(this, ne, void 0);
|
|
2635
2637
|
M(this, ke, !1);
|
|
2636
|
-
M(this,
|
|
2638
|
+
M(this, Fe, !1);
|
|
2637
2639
|
M(this, ve, "");
|
|
2638
|
-
M(this,
|
|
2640
|
+
M(this, De, []);
|
|
2639
2641
|
k(this, se, {}), k(this, ne, this.deviceInfo()), k(this, ie, this.config.gameVersion), this.on("state", ({ balance: i }) => {
|
|
2640
2642
|
k(this, Be, i);
|
|
2641
2643
|
}), this.on("autoplay", ({ action: i }) => {
|
|
2642
2644
|
["start", "resume"].includes(i) ? k(this, ke, !0) : k(this, ke, !1);
|
|
2643
2645
|
}), this.on("settings", ({ fastPlay: i }) => {
|
|
2644
|
-
i !== void 0 && k(this,
|
|
2646
|
+
i !== void 0 && k(this, Fe, i);
|
|
2645
2647
|
}), this.registerEvents();
|
|
2646
2648
|
}
|
|
2647
2649
|
async registerEvents() {
|
|
@@ -2685,9 +2687,9 @@ class ji extends Mi {
|
|
|
2685
2687
|
// testVariants: '',
|
|
2686
2688
|
}), this.track("Game Open", y(this, se));
|
|
2687
2689
|
}), this.on("playCycleEnd", async (e) => {
|
|
2688
|
-
const i = await y(this, ne), { base: n, multiplier: o, specialAction: a } = e.contract.bet.lastPaid ?? {}, h = e.contract.balance.coins, p = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier,
|
|
2690
|
+
const i = await y(this, ne), { base: n, multiplier: o, specialAction: a } = e.contract.bet.lastPaid ?? {}, h = e.contract.balance.coins, p = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier, m = e.contract.win.total, w = m - p, v = a || "spin", N = e.contract.roundId;
|
|
2689
2691
|
this.track("Betting Activity", {
|
|
2690
|
-
balance: h -
|
|
2692
|
+
balance: h - w,
|
|
2691
2693
|
balanceAfter: h,
|
|
2692
2694
|
baseBet: n,
|
|
2693
2695
|
// baseBetIndex,
|
|
@@ -2701,7 +2703,7 @@ class ji extends Mi {
|
|
|
2701
2703
|
gameCode: this.sdkConfig.api.game,
|
|
2702
2704
|
gameCodeServer: this.sdkConfig.api.game,
|
|
2703
2705
|
isMobile: i.isMobile,
|
|
2704
|
-
netResult:
|
|
2706
|
+
netResult: w,
|
|
2705
2707
|
operatorName: "kalamba",
|
|
2706
2708
|
orientation: Ye(),
|
|
2707
2709
|
partnerId: this.sdkConfig.api.brand,
|
|
@@ -2713,8 +2715,8 @@ class ji extends Mi {
|
|
|
2713
2715
|
// roundTypes: [...this.#roundTypes],
|
|
2714
2716
|
roundTypes: ["BaseGame"],
|
|
2715
2717
|
totalBet: p,
|
|
2716
|
-
totalWin:
|
|
2717
|
-
}), k(this,
|
|
2718
|
+
totalWin: m
|
|
2719
|
+
}), k(this, De, []);
|
|
2718
2720
|
}), this.on("telemetry.click", (e) => {
|
|
2719
2721
|
this.track("UI Interaction", {
|
|
2720
2722
|
action: "click",
|
|
@@ -2781,7 +2783,7 @@ class ji extends Mi {
|
|
|
2781
2783
|
};
|
|
2782
2784
|
}
|
|
2783
2785
|
}
|
|
2784
|
-
Be = new WeakMap(), ie = new WeakMap(), se = new WeakMap(), ne = new WeakMap(), ke = new WeakMap(),
|
|
2786
|
+
Be = new WeakMap(), ie = new WeakMap(), se = new WeakMap(), ne = new WeakMap(), ke = new WeakMap(), Fe = new WeakMap(), ve = new WeakMap(), De = new WeakMap();
|
|
2785
2787
|
var C = [];
|
|
2786
2788
|
for (var Ze = 0; Ze < 256; ++Ze)
|
|
2787
2789
|
C.push((Ze + 256).toString(16).slice(1));
|
|
@@ -2886,7 +2888,7 @@ class Ki extends jt {
|
|
|
2886
2888
|
}
|
|
2887
2889
|
}
|
|
2888
2890
|
export {
|
|
2889
|
-
|
|
2891
|
+
Di as BasicPlugin,
|
|
2890
2892
|
j as CasinoPlugin,
|
|
2891
2893
|
Ni as DebuggingPlugin,
|
|
2892
2894
|
Gi as GigPlugin,
|
|
@@ -2898,7 +2900,7 @@ export {
|
|
|
2898
2900
|
Hi as OryxPlugin,
|
|
2899
2901
|
Vi as PariplayPlugin,
|
|
2900
2902
|
zi as RelaxFEIMPlugin,
|
|
2901
|
-
|
|
2903
|
+
mi as RgsPlugin,
|
|
2902
2904
|
Mi as TelemetryPlugin,
|
|
2903
2905
|
jt as Tracker,
|
|
2904
2906
|
qi as TukoPlugin
|
package/dist/wrapper.cjs
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* BSD 3-Clause License
|
|
3
3
|
* Copyright (c) 2024, Kalamba Games Limited
|
|
4
4
|
*/
|
|
5
|
-
"use strict";var Sa=Object.defineProperty;var Ta=(e,r,a)=>r in e?Sa(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a;var je=(e,r,a)=>(Ta(e,typeof r!="symbol"?r+"":r,a),a),Ue=(e,r,a)=>{if(!r.has(e))throw TypeError("Cannot "+a)};var _=(e,r,a)=>(Ue(e,r,"read from private field"),a?a.call(e):r.get(e)),E=(e,r,a)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,a)},U=(e,r,a,t)=>(Ue(e,r,"write to private field"),t?t.call(e,a):r.set(e,a),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const le=require("./errors-358575c3.cjs"),b=require("./noop-b3c54b76.cjs"),Be=()=>{},Ca=()=>{};var L,ee,R,O,M;class Aa{constructor({messagePort:r,plugins:a,sdkConfigManager:t}){E(this,L,void 0);E(this,ee,void 0);E(this,R,{gameName:"UNKNOWN",gameVersion:"unknown",showErrors:!0,showFreeRounds:!0,showRealityCheck:!0,showBars:!0,skipErrors:[]});E(this,O,{isSdkConfigured:!1,balance:0,bet:{base:0,multiplier:0},openGameResponse:void 0,lastPlayResponse:void 0,freeRoundId:void 0});E(this,M,void 0);U(this,L,r),U(this,M,new t),U(this,ee,{rgs:new a.rgs(this.config,this.sdkConfig),casino:a.casino.map(n=>new n(this.config,this.sdkConfig)),telemetry:a.telemetry.map(({plugin:n,trackers:s})=>new n(s.map(i=>new i(this.config,this.sdkConfig)),this.config,this.sdkConfig))}),this.on("balance",({balance:n})=>{this.setState(s=>({...s,balance:n}))}),this.on("bet",n=>{this.setState(s=>({...s,bet:n}))}),this.on("sdk:playCycleStart",()=>{this.setState(n=>({...n,balance:n.balance-n.bet.base*n.bet.multiplier}))}),this.on("sdk:play",n=>{this.send("play",{...n,payloadToInject:{freeRoundId:this.state.freeRoundId}})}),this.on("sdk:configure",n=>{Object.assign(_(this,R),n)}),this.on("freeRoundsPopup",()=>{var s;const n=(s=this.state.lastPlayResponse??this.state.openGameResponse)==null?void 0:s.contract.freeRounds[0];n&&this.state.freeRoundId&&this.send("freeRoundsInfo",n)}),this.on("rgs:openGameResponse",async n=>{this.setState(s=>({...s,openGameResponse:n,balance:n.contract.balance.coins})),this.on("playReady",()=>{this.handleFreeRounds(n)}),this.sdkConfig.ui=await _(this,M).getConfig(),this.setState(s=>({...s,isSdkConfigured:!0})),this.send("configured",this.sdkConfig)}),this.on("rgs:openGameError",async n=>{n.type==="timeout"&&!this.config.skipErrors.includes("TIMEOUT")&&this.send("error",{messageKey:"Error.TIMEOUT",messageCode:"TIMEOUT",type:"RELOAD"}),n.type==="error"&&!this.config.skipErrors.includes(n.data.code)&&this.send("error",{messageKey:`RgsError.${n.data.code}`,messageCode:n.data.code,type:le.RgsErrorAction[n.data.code]})}),this.on("rgs:playResponse",async n=>{this.setState(s=>({...s,lastPlayResponse:n}))}),this.on("playCycleEnd",()=>{this.handleFreeRounds(this.state.lastPlayResponse)}),this.on("rgs:playError",async n=>{n.type==="timeout"&&!this.config.skipErrors.includes("TIMEOUT")&&this.send("error",{messageKey:"Error.TIMEOUT",messageCode:"TIMEOUT",type:"RELOAD"}),n.type==="error"&&!this.config.skipErrors.includes(n.data.code)&&this.send("error",{messageKey:`RgsError.${n.data.code}`,messageCode:n.data.code,type:le.RgsErrorAction[n.data.code]})}),this.on("rgs:freeRoundsResponse",async n=>{var s;if(n.action==="ACCEPT"){const i=(s=this.state.lastPlayResponse??this.state.openGameResponse)==null?void 0:s.contract.freeRounds.find(o=>o.id===n.id);if(!i)return;this.setState(o=>({...o,freeRoundId:i.id})),this.send("legalBets",{[i.conf.base]:[i.conf.multiplier]}),this.send("bet",{base:i.conf.base,multiplier:i.conf.multiplier})}}),this.on("rgs:freeRoundsError",async n=>{n.type==="timeout"&&!this.config.skipErrors.includes("TIMEOUT")&&this.send("error",{messageKey:"Error.TIMEOUT",messageCode:"TIMEOUT",type:"RELOAD"}),n.type==="error"&&!this.config.skipErrors.includes(n.data.code)&&this.send("error",{messageKey:`RgsError.${n.data.code}`,messageCode:n.data.code,type:le.RgsErrorAction[n.data.code]})}),this.forwardMessages()}get state(){const r=this;return new Proxy({},{get(a,t){return Reflect.get(_(r,O),t)}})}setState(r){U(this,O,r(_(this,O))),this.send("state",_(this,O))}forwardMessages(){this.forwardToPlugins("casino",["sdk:autoplay","sdk:balance","sdk:bet","sdk:cashier","sdk:choice","sdk:close","sdk:error","sdk:history","sdk:loadEnd","sdk:loadProgress","sdk:loadStart","sdk:playCycleEnd","sdk:playCycleStart","sdk:playEnd","sdk:playStart","sdk:settings"]),this.forwardToPlugins("casino",["rgs:playResponse","rgs:openGameResponse"]),this.forwardToPlugins("rgs",["sdk:openGame","sdk:history"]),this.forwardToPlugins("rgs",["casino:play","casino:cashier","casino:close","casino:history"]),this.forwardToPlugins("telemetry",["sdk:autoplay","sdk:error","sdk:playCycleStart","sdk:playCycleEnd","sdk:loadStart","sdk:loadProgress","sdk:loadEnd","sdk:telemetry.click","sdk:telemetry.orientationChange"]),this.forwardToPlugins("telemetry",["rgs:openGameResponse","rgs:playResponse"]),this.forwardToSdk(["casino:balance","casino:bet","casino:choice","casino:freeze","casino:help","casino:paytable","casino:resume","casino:settings","casino:suspend","casino:unfreeze"]),this.forwardToSdk(["rgs:openGameError","rgs:openGameResponse","rgs:playError","rgs:playResponse","rgs:realityCheck"])}get config(){const r=this;return new Proxy({},{get(a,t){return Reflect.get(_(r,R),t)},set(a,t,n){return Reflect.set(_(r,R),t,n)}})}get sdkConfig(){return _(this,M).config}forwardToPlugins(r,a){a.forEach(t=>{const n=s=>{s.data.message===`kalamba:${t}`&&(Be("wrapper:forwardToPlugins",r,s.data.message.replace(/^kalamba:/,""),s.data.payload),window.postMessage({message:`kalamba:wrapper-${r}:${t.replace(/^(.+):/,"")}`,payload:s.data.payload}))};window.addEventListener("message",n)})}forwardToSdk(r){r.forEach(a=>{const t=n=>{n.data.message===`kalamba:${a}`&&(Ca("wrapper:forwardToSdk",n.data.message.replace(/^kalamba:/,""),n.data.payload),_(this,L).postMessage({message:`kalamba:wrapper:${a.replace(/^(.+):/,"")}`,payload:n.data.payload},"*"))};window.addEventListener("message",t)})}on(r,a,t){const n=function s(i){!new RegExp(`^kalamba:${r.includes(":")?"":"(.+):"}${r}$`).test(i.data.message)||new RegExp(`^kalamba:wrapper-(.+):${r}`).test(i.data.message)||new RegExp(`^kalamba:(.+)-wrapper:${r}`).test(i.data.message)||(Be("on",i.data.message.replace(/^kalamba:/,""),i.data.payload),a(i.data.payload),t!=null&&t.once&&window.removeEventListener("message",s))};window.addEventListener("message",n)}send(r,...[a]){window.postMessage({message:`kalamba:wrapper:${r}`,payload:a}),_(this,L).postMessage({message:`kalamba:wrapper:${r}`,payload:a},"*")}handleFreeRounds(r){const a=r.contract.freeRounds[0];if(a)switch(a.status){case"ACTIVE":this.setState(t=>({...t,freeRoundId:a.id})),this.send("legalBets",{[a.conf.base]:[a.conf.multiplier]}),this.send("bet",{base:a.conf.base,multiplier:a.conf.multiplier});break;case"PENDING":this.send("freeRoundsOffer",a);break;case"FINISHED":this.send("freeRoundsComplete",a),this.setState(t=>({...t,freeRoundId:void 0})),this.send("legalBets",this.state.openGameResponse.contract.bet.available),this.send("bet",this.state.openGameResponse.contract.bet.default);break}}}L=new WeakMap,ee=new WeakMap,R=new WeakMap,O=new WeakMap,M=new WeakMap;function Oa(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var w=Oa,Pa=w,Ke=Object.create,Ea=function(){function e(){}return function(r){if(!Pa(r))return{};if(Ke)return Ke(r);e.prototype=r;var a=new e;return e.prototype=void 0,a}}(),me=Ea;function La(){}var we=La,Ra=me,Ma=we;function z(e,r){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=void 0}z.prototype=Ra(Ma.prototype);z.prototype.constructor=z;var Se=z;function Ia(e,r){for(var a=-1,t=r.length,n=e.length;++a<t;)e[n+a]=r[a];return e}var kr=Ia,Fa=typeof b.commonjsGlobal=="object"&&b.commonjsGlobal&&b.commonjsGlobal.Object===Object&&b.commonjsGlobal,Nr=Fa,xa=Nr,Ga=typeof self=="object"&&self&&self.Object===Object&&self,Da=xa||Ga||Function("return this")(),$=Da,ka=$,Na=ka.Symbol,K=Na,He=K,jr=Object.prototype,ja=jr.hasOwnProperty,Ua=jr.toString,B=He?He.toStringTag:void 0;function Ba(e){var r=ja.call(e,B),a=e[B];try{e[B]=void 0;var t=!0}catch{}var n=Ua.call(e);return t&&(r?e[B]=a:delete e[B]),n}var Ka=Ba,Ha=Object.prototype,qa=Ha.toString;function Wa(e){return qa.call(e)}var za=Wa,qe=K,Qa=Ka,Va=za,Xa="[object Null]",Ya="[object Undefined]",We=qe?qe.toStringTag:void 0;function Za(e){return e==null?e===void 0?Ya:Xa:We&&We in Object(e)?Qa(e):Va(e)}var I=Za;function Ja(e){return e!=null&&typeof e=="object"}var S=Ja,et=I,rt=S,at="[object Arguments]";function tt(e){return rt(e)&&et(e)==at}var nt=tt,ze=nt,st=S,Ur=Object.prototype,it=Ur.hasOwnProperty,ot=Ur.propertyIsEnumerable,ut=ze(function(){return arguments}())?ze:function(e){return st(e)&&it.call(e,"callee")&&!ot.call(e,"callee")},re=ut,lt=Array.isArray,v=lt,Qe=K,ft=re,ct=v,Ve=Qe?Qe.isConcatSpreadable:void 0;function pt(e){return ct(e)||ft(e)||!!(Ve&&e&&e[Ve])}var ht=pt,dt=kr,gt=ht;function Br(e,r,a,t,n){var s=-1,i=e.length;for(a||(a=gt),n||(n=[]);++s<i;){var o=e[s];r>0&&a(o)?r>1?Br(o,r-1,a,t,n):dt(n,o):t||(n[n.length]=o)}return n}var Kr=Br,vt=Kr;function yt(e){var r=e==null?0:e.length;return r?vt(e,1):[]}var _t=yt;function $t(e,r,a){switch(a.length){case 0:return e.call(r);case 1:return e.call(r,a[0]);case 2:return e.call(r,a[0],a[1]);case 3:return e.call(r,a[0],a[1],a[2])}return e.apply(r,a)}var bt=$t,mt=bt,Xe=Math.max;function wt(e,r,a){return r=Xe(r===void 0?e.length-1:r,0),function(){for(var t=arguments,n=-1,s=Xe(t.length-r,0),i=Array(s);++n<s;)i[n]=t[r+n];n=-1;for(var o=Array(r+1);++n<r;)o[n]=t[n];return o[r]=a(i),mt(e,this,o)}}var Hr=wt;function St(e){return function(){return e}}var Tt=St,Ct=I,At=w,Ot="[object AsyncFunction]",Pt="[object Function]",Et="[object GeneratorFunction]",Lt="[object Proxy]";function Rt(e){if(!At(e))return!1;var r=Ct(e);return r==Pt||r==Et||r==Ot||r==Lt}var Te=Rt,Mt=$,It=Mt["__core-js_shared__"],Ft=It,fe=Ft,Ye=function(){var e=/[^.]+$/.exec(fe&&fe.keys&&fe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function xt(e){return!!Ye&&Ye in e}var Gt=xt,Dt=Function.prototype,kt=Dt.toString;function Nt(e){if(e!=null){try{return kt.call(e)}catch{}try{return e+""}catch{}}return""}var qr=Nt,jt=Te,Ut=Gt,Bt=w,Kt=qr,Ht=/[\\^$.*+?()[\]{}|]/g,qt=/^\[object .+?Constructor\]$/,Wt=Function.prototype,zt=Object.prototype,Qt=Wt.toString,Vt=zt.hasOwnProperty,Xt=RegExp("^"+Qt.call(Vt).replace(Ht,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Yt(e){if(!Bt(e)||Ut(e))return!1;var r=jt(e)?Xt:qt;return r.test(Kt(e))}var Zt=Yt;function Jt(e,r){return e==null?void 0:e[r]}var en=Jt,rn=Zt,an=en;function tn(e,r){var a=an(e,r);return rn(a)?a:void 0}var P=tn,nn=P,sn=function(){try{var e=nn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Wr=sn;function on(e){return e}var ae=on,un=Tt,Ze=Wr,ln=ae,fn=Ze?function(e,r){return Ze(e,"toString",{configurable:!0,enumerable:!1,value:un(r),writable:!0})}:ln,cn=fn,pn=800,hn=16,dn=Date.now;function gn(e){var r=0,a=0;return function(){var t=dn(),n=hn-(t-a);if(a=t,n>0){if(++r>=pn)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}var vn=gn,yn=cn,_n=vn,$n=_n(yn),zr=$n,bn=_t,mn=Hr,wn=zr;function Sn(e){return wn(mn(e,void 0,bn),e+"")}var Tn=Sn,Cn=P,An=$,On=Cn(An,"WeakMap"),Qr=On,Je=Qr,Pn=Je&&new Je,En=Pn,er=En,Ln=b.noop_1,Rn=er?function(e){return er.get(e)}:Ln,Vr=Rn,Mn={},In=Mn,rr=In,Fn=Object.prototype,xn=Fn.hasOwnProperty;function Gn(e){for(var r=e.name+"",a=rr[r],t=xn.call(rr,r)?a.length:0;t--;){var n=a[t],s=n.func;if(s==null||s==e)return n.name}return r}var Xr=Gn,Dn=me,kn=we,Nn=4294967295;function Q(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Nn,this.__views__=[]}Q.prototype=Dn(kn.prototype);Q.prototype.constructor=Q;var Ce=Q;function jn(e,r){var a=-1,t=e.length;for(r||(r=Array(t));++a<t;)r[a]=e[a];return r}var Yr=jn,Un=Ce,Bn=Se,Kn=Yr;function Hn(e){if(e instanceof Un)return e.clone();var r=new Bn(e.__wrapped__,e.__chain__);return r.__actions__=Kn(e.__actions__),r.__index__=e.__index__,r.__values__=e.__values__,r}var qn=Hn,Wn=Ce,ar=Se,zn=we,Qn=v,Vn=S,Xn=qn,Yn=Object.prototype,Zn=Yn.hasOwnProperty;function V(e){if(Vn(e)&&!Qn(e)&&!(e instanceof Wn)){if(e instanceof ar)return e;if(Zn.call(e,"__wrapped__"))return Xn(e)}return new ar(e)}V.prototype=zn.prototype;V.prototype.constructor=V;var Jn=V,es=Ce,rs=Vr,as=Xr,ts=Jn;function ns(e){var r=as(e),a=ts[r];if(typeof a!="function"||!(r in es.prototype))return!1;if(e===a)return!0;var t=rs(a);return!!t&&e===t[0]}var ss=ns,tr=Se,is=Tn,os=Vr,ce=Xr,us=v,nr=ss,ls="Expected a function",fs=8,cs=32,ps=128,hs=256;function ds(e){return is(function(r){var a=r.length,t=a,n=tr.prototype.thru;for(e&&r.reverse();t--;){var s=r[t];if(typeof s!="function")throw new TypeError(ls);if(n&&!i&&ce(s)=="wrapper")var i=new tr([],!0)}for(t=i?t:a;++t<a;){s=r[t];var o=ce(s),u=o=="wrapper"?os(s):void 0;u&&nr(u[0])&&u[1]==(ps|fs|cs|hs)&&!u[4].length&&u[9]==1?i=i[ce(u[0])].apply(i,u[3]):i=s.length==1&&nr(s)?i[o]():i.thru(s)}return function(){var l=arguments,f=l[0];if(i&&l.length==1&&us(f))return i.plant(f).value();for(var p=0,c=a?r[p].apply(this,l):f;++p<a;)c=r[p].call(this,c);return c}})}var gs=ds,vs=gs,ys=vs(),_s=ys;const $s=b.getDefaultExportFromCjs(_s);function bs(){this.__data__=[],this.size=0}var ms=bs;function ws(e,r){return e===r||e!==e&&r!==r}var F=ws,Ss=F;function Ts(e,r){for(var a=e.length;a--;)if(Ss(e[a][0],r))return a;return-1}var te=Ts,Cs=te,As=Array.prototype,Os=As.splice;function Ps(e){var r=this.__data__,a=Cs(r,e);if(a<0)return!1;var t=r.length-1;return a==t?r.pop():Os.call(r,a,1),--this.size,!0}var Es=Ps,Ls=te;function Rs(e){var r=this.__data__,a=Ls(r,e);return a<0?void 0:r[a][1]}var Ms=Rs,Is=te;function Fs(e){return Is(this.__data__,e)>-1}var xs=Fs,Gs=te;function Ds(e,r){var a=this.__data__,t=Gs(a,e);return t<0?(++this.size,a.push([e,r])):a[t][1]=r,this}var ks=Ds,Ns=ms,js=Es,Us=Ms,Bs=xs,Ks=ks;function x(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var t=e[r];this.set(t[0],t[1])}}x.prototype.clear=Ns;x.prototype.delete=js;x.prototype.get=Us;x.prototype.has=Bs;x.prototype.set=Ks;var ne=x,Hs=ne;function qs(){this.__data__=new Hs,this.size=0}var Ws=qs;function zs(e){var r=this.__data__,a=r.delete(e);return this.size=r.size,a}var Qs=zs;function Vs(e){return this.__data__.get(e)}var Xs=Vs;function Ys(e){return this.__data__.has(e)}var Zs=Ys,Js=P,ei=$,ri=Js(ei,"Map"),Ae=ri,ai=P,ti=ai(Object,"create"),se=ti,sr=se;function ni(){this.__data__=sr?sr(null):{},this.size=0}var si=ni;function ii(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var oi=ii,ui=se,li="__lodash_hash_undefined__",fi=Object.prototype,ci=fi.hasOwnProperty;function pi(e){var r=this.__data__;if(ui){var a=r[e];return a===li?void 0:a}return ci.call(r,e)?r[e]:void 0}var hi=pi,di=se,gi=Object.prototype,vi=gi.hasOwnProperty;function yi(e){var r=this.__data__;return di?r[e]!==void 0:vi.call(r,e)}var _i=yi,$i=se,bi="__lodash_hash_undefined__";function mi(e,r){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=$i&&r===void 0?bi:r,this}var wi=mi,Si=si,Ti=oi,Ci=hi,Ai=_i,Oi=wi;function G(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var t=e[r];this.set(t[0],t[1])}}G.prototype.clear=Si;G.prototype.delete=Ti;G.prototype.get=Ci;G.prototype.has=Ai;G.prototype.set=Oi;var Pi=G,ir=Pi,Ei=ne,Li=Ae;function Ri(){this.size=0,this.__data__={hash:new ir,map:new(Li||Ei),string:new ir}}var Mi=Ri;function Ii(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var Fi=Ii,xi=Fi;function Gi(e,r){var a=e.__data__;return xi(r)?a[typeof r=="string"?"string":"hash"]:a.map}var ie=Gi,Di=ie;function ki(e){var r=Di(this,e).delete(e);return this.size-=r?1:0,r}var Ni=ki,ji=ie;function Ui(e){return ji(this,e).get(e)}var Bi=Ui,Ki=ie;function Hi(e){return Ki(this,e).has(e)}var qi=Hi,Wi=ie;function zi(e,r){var a=Wi(this,e),t=a.size;return a.set(e,r),this.size+=a.size==t?0:1,this}var Qi=zi,Vi=Mi,Xi=Ni,Yi=Bi,Zi=qi,Ji=Qi;function D(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var t=e[r];this.set(t[0],t[1])}}D.prototype.clear=Vi;D.prototype.delete=Xi;D.prototype.get=Yi;D.prototype.has=Zi;D.prototype.set=Ji;var Oe=D,eo=ne,ro=Ae,ao=Oe,to=200;function no(e,r){var a=this.__data__;if(a instanceof eo){var t=a.__data__;if(!ro||t.length<to-1)return t.push([e,r]),this.size=++a.size,this;a=this.__data__=new ao(t)}return a.set(e,r),this.size=a.size,this}var so=no,io=ne,oo=Ws,uo=Qs,lo=Xs,fo=Zs,co=so;function k(e){var r=this.__data__=new io(e);this.size=r.size}k.prototype.clear=oo;k.prototype.delete=uo;k.prototype.get=lo;k.prototype.has=fo;k.prototype.set=co;var Pe=k,or=Wr;function po(e,r,a){r=="__proto__"&&or?or(e,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[r]=a}var Ee=po,ho=Ee,go=F;function vo(e,r,a){(a!==void 0&&!go(e[r],a)||a===void 0&&!(r in e))&&ho(e,r,a)}var Zr=vo;function yo(e){return function(r,a,t){for(var n=-1,s=Object(r),i=t(r),o=i.length;o--;){var u=i[e?o:++n];if(a(s[u],u,s)===!1)break}return r}}var _o=yo,$o=_o,bo=$o(),Jr=bo,X={exports:{}};X.exports;(function(e,r){var a=$,t=r&&!r.nodeType&&r,n=t&&!0&&e&&!e.nodeType&&e,s=n&&n.exports===t,i=s?a.Buffer:void 0,o=i?i.allocUnsafe:void 0;function u(l,f){if(f)return l.slice();var p=l.length,c=o?o(p):new l.constructor(p);return l.copy(c),c}e.exports=u})(X,X.exports);var mo=X.exports,wo=$,So=wo.Uint8Array,ea=So,ur=ea;function To(e){var r=new e.constructor(e.byteLength);return new ur(r).set(new ur(e)),r}var Co=To,Ao=Co;function Oo(e,r){var a=r?Ao(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}var Po=Oo;function Eo(e,r){return function(a){return e(r(a))}}var ra=Eo,Lo=ra,Ro=Lo(Object.getPrototypeOf,Object),aa=Ro,Mo=Object.prototype;function Io(e){var r=e&&e.constructor,a=typeof r=="function"&&r.prototype||Mo;return e===a}var Le=Io,Fo=me,xo=aa,Go=Le;function Do(e){return typeof e.constructor=="function"&&!Go(e)?Fo(xo(e)):{}}var ko=Do,No=9007199254740991;function jo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=No}var Re=jo,Uo=Te,Bo=Re;function Ko(e){return e!=null&&Bo(e.length)&&!Uo(e)}var N=Ko,Ho=N,qo=S;function Wo(e){return qo(e)&&Ho(e)}var zo=Wo,Y={exports:{}};function Qo(){return!1}var Vo=Qo;Y.exports;(function(e,r){var a=$,t=Vo,n=r&&!r.nodeType&&r,s=n&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===n,o=i?a.Buffer:void 0,u=o?o.isBuffer:void 0,l=u||t;e.exports=l})(Y,Y.exports);var Me=Y.exports,Xo=I,Yo=aa,Zo=S,Jo="[object Object]",eu=Function.prototype,ru=Object.prototype,ta=eu.toString,au=ru.hasOwnProperty,tu=ta.call(Object);function nu(e){if(!Zo(e)||Xo(e)!=Jo)return!1;var r=Yo(e);if(r===null)return!0;var a=au.call(r,"constructor")&&r.constructor;return typeof a=="function"&&a instanceof a&&ta.call(a)==tu}var su=nu,iu=I,ou=Re,uu=S,lu="[object Arguments]",fu="[object Array]",cu="[object Boolean]",pu="[object Date]",hu="[object Error]",du="[object Function]",gu="[object Map]",vu="[object Number]",yu="[object Object]",_u="[object RegExp]",$u="[object Set]",bu="[object String]",mu="[object WeakMap]",wu="[object ArrayBuffer]",Su="[object DataView]",Tu="[object Float32Array]",Cu="[object Float64Array]",Au="[object Int8Array]",Ou="[object Int16Array]",Pu="[object Int32Array]",Eu="[object Uint8Array]",Lu="[object Uint8ClampedArray]",Ru="[object Uint16Array]",Mu="[object Uint32Array]",h={};h[Tu]=h[Cu]=h[Au]=h[Ou]=h[Pu]=h[Eu]=h[Lu]=h[Ru]=h[Mu]=!0;h[lu]=h[fu]=h[wu]=h[cu]=h[Su]=h[pu]=h[hu]=h[du]=h[gu]=h[vu]=h[yu]=h[_u]=h[$u]=h[bu]=h[mu]=!1;function Iu(e){return uu(e)&&ou(e.length)&&!!h[iu(e)]}var Fu=Iu;function xu(e){return function(r){return e(r)}}var na=xu,Z={exports:{}};Z.exports;(function(e,r){var a=Nr,t=r&&!r.nodeType&&r,n=t&&!0&&e&&!e.nodeType&&e,s=n&&n.exports===t,i=s&&a.process,o=function(){try{var u=n&&n.require&&n.require("util").types;return u||i&&i.binding&&i.binding("util")}catch{}}();e.exports=o})(Z,Z.exports);var Gu=Z.exports,Du=Fu,ku=na,lr=Gu,fr=lr&&lr.isTypedArray,Nu=fr?ku(fr):Du,Ie=Nu;function ju(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var sa=ju,Uu=Ee,Bu=F,Ku=Object.prototype,Hu=Ku.hasOwnProperty;function qu(e,r,a){var t=e[r];(!(Hu.call(e,r)&&Bu(t,a))||a===void 0&&!(r in e))&&Uu(e,r,a)}var Wu=qu,zu=Wu,Qu=Ee;function Vu(e,r,a,t){var n=!a;a||(a={});for(var s=-1,i=r.length;++s<i;){var o=r[s],u=t?t(a[o],e[o],o,a,e):void 0;u===void 0&&(u=e[o]),n?Qu(a,o,u):zu(a,o,u)}return a}var Xu=Vu;function Yu(e,r){for(var a=-1,t=Array(e);++a<e;)t[a]=r(a);return t}var Zu=Yu,Ju=9007199254740991,el=/^(?:0|[1-9]\d*)$/;function rl(e,r){var a=typeof e;return r=r??Ju,!!r&&(a=="number"||a!="symbol"&&el.test(e))&&e>-1&&e%1==0&&e<r}var Fe=rl,al=Zu,tl=re,nl=v,sl=Me,il=Fe,ol=Ie,ul=Object.prototype,ll=ul.hasOwnProperty;function fl(e,r){var a=nl(e),t=!a&&tl(e),n=!a&&!t&&sl(e),s=!a&&!t&&!n&&ol(e),i=a||t||n||s,o=i?al(e.length,String):[],u=o.length;for(var l in e)(r||ll.call(e,l))&&!(i&&(l=="length"||n&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||il(l,u)))&&o.push(l);return o}var ia=fl;function cl(e){var r=[];if(e!=null)for(var a in Object(e))r.push(a);return r}var pl=cl,hl=w,dl=Le,gl=pl,vl=Object.prototype,yl=vl.hasOwnProperty;function _l(e){if(!hl(e))return gl(e);var r=dl(e),a=[];for(var t in e)t=="constructor"&&(r||!yl.call(e,t))||a.push(t);return a}var $l=_l,bl=ia,ml=$l,wl=N;function Sl(e){return wl(e)?bl(e,!0):ml(e)}var oa=Sl,Tl=Xu,Cl=oa;function Al(e){return Tl(e,Cl(e))}var Ol=Al,cr=Zr,Pl=mo,El=Po,Ll=Yr,Rl=ko,pr=re,hr=v,Ml=zo,Il=Me,Fl=Te,xl=w,Gl=su,Dl=Ie,dr=sa,kl=Ol;function Nl(e,r,a,t,n,s,i){var o=dr(e,a),u=dr(r,a),l=i.get(u);if(l){cr(e,a,l);return}var f=s?s(o,u,a+"",e,r,i):void 0,p=f===void 0;if(p){var c=hr(u),g=!c&&Il(u),d=!c&&!g&&Dl(u);f=u,c||g||d?hr(o)?f=o:Ml(o)?f=Ll(o):g?(p=!1,f=Pl(u,!0)):d?(p=!1,f=El(u,!0)):f=[]:Gl(u)||pr(u)?(f=o,pr(o)?f=kl(o):(!xl(o)||Fl(o))&&(f=Rl(u))):p=!1}p&&(i.set(u,f),n(f,u,t,s,i),i.delete(u)),cr(e,a,f)}var jl=Nl,Ul=Pe,Bl=Zr,Kl=Jr,Hl=jl,ql=w,Wl=oa,zl=sa;function ua(e,r,a,t,n){e!==r&&Kl(r,function(s,i){if(n||(n=new Ul),ql(s))Hl(e,r,i,a,ua,t,n);else{var o=t?t(zl(e,i),s,i+"",e,r,n):void 0;o===void 0&&(o=s),Bl(e,i,o)}},Wl)}var Ql=ua,Vl=ae,Xl=Hr,Yl=zr;function Zl(e,r){return Yl(Xl(e,r,Vl),e+"")}var la=Zl,Jl=F,ef=N,rf=Fe,af=w;function tf(e,r,a){if(!af(a))return!1;var t=typeof r;return(t=="number"?ef(a)&&rf(r,a.length):t=="string"&&r in a)?Jl(a[r],e):!1}var fa=tf,nf=la,sf=fa;function of(e){return nf(function(r,a){var t=-1,n=a.length,s=n>1?a[n-1]:void 0,i=n>2?a[2]:void 0;for(s=e.length>3&&typeof s=="function"?(n--,s):void 0,i&&sf(a[0],a[1],i)&&(s=n<3?void 0:s,n=1),r=Object(r);++t<n;){var o=a[t];o&&e(r,o,t,s)}return r})}var uf=of,lf=Ql,ff=uf,cf=ff(function(e,r,a){lf(e,r,a)}),pf=cf;const pe=b.getDefaultExportFromCjs(pf);function hf(e,r){for(var a=-1,t=e==null?0:e.length,n=Array(t);++a<t;)n[a]=r(e[a],a,e);return n}var ca=hf,df=I,gf=S,vf="[object Symbol]";function yf(e){return typeof e=="symbol"||gf(e)&&df(e)==vf}var oe=yf,_f=v,$f=oe,bf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mf=/^\w*$/;function wf(e,r){if(_f(e))return!1;var a=typeof e;return a=="number"||a=="symbol"||a=="boolean"||e==null||$f(e)?!0:mf.test(e)||!bf.test(e)||r!=null&&e in Object(r)}var xe=wf,pa=Oe,Sf="Expected a function";function Ge(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(Sf);var a=function(){var t=arguments,n=r?r.apply(this,t):t[0],s=a.cache;if(s.has(n))return s.get(n);var i=e.apply(this,t);return a.cache=s.set(n,i)||s,i};return a.cache=new(Ge.Cache||pa),a}Ge.Cache=pa;var Tf=Ge,Cf=Tf,Af=500;function Of(e){var r=Cf(e,function(t){return a.size===Af&&a.clear(),t}),a=r.cache;return r}var Pf=Of,Ef=Pf,Lf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rf=/\\(\\)?/g,Mf=Ef(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Lf,function(a,t,n,s){r.push(n?s.replace(Rf,"$1"):t||a)}),r}),If=Mf,gr=K,Ff=ca,xf=v,Gf=oe,Df=1/0,vr=gr?gr.prototype:void 0,yr=vr?vr.toString:void 0;function ha(e){if(typeof e=="string")return e;if(xf(e))return Ff(e,ha)+"";if(Gf(e))return yr?yr.call(e):"";var r=e+"";return r=="0"&&1/e==-Df?"-0":r}var kf=ha,Nf=kf;function jf(e){return e==null?"":Nf(e)}var Uf=jf,Bf=v,Kf=xe,Hf=If,qf=Uf;function Wf(e,r){return Bf(e)?e:Kf(e,r)?[e]:Hf(qf(e))}var da=Wf,zf=oe,Qf=1/0;function Vf(e){if(typeof e=="string"||zf(e))return e;var r=e+"";return r=="0"&&1/e==-Qf?"-0":r}var ue=Vf,Xf=da,Yf=ue;function Zf(e,r){r=Xf(r,e);for(var a=0,t=r.length;e!=null&&a<t;)e=e[Yf(r[a++])];return a&&a==t?e:void 0}var De=Zf,Jf="__lodash_hash_undefined__";function ec(e){return this.__data__.set(e,Jf),this}var rc=ec;function ac(e){return this.__data__.has(e)}var tc=ac,nc=Oe,sc=rc,ic=tc;function J(e){var r=-1,a=e==null?0:e.length;for(this.__data__=new nc;++r<a;)this.add(e[r])}J.prototype.add=J.prototype.push=sc;J.prototype.has=ic;var oc=J;function uc(e,r){for(var a=-1,t=e==null?0:e.length;++a<t;)if(r(e[a],a,e))return!0;return!1}var lc=uc;function fc(e,r){return e.has(r)}var cc=fc,pc=oc,hc=lc,dc=cc,gc=1,vc=2;function yc(e,r,a,t,n,s){var i=a&gc,o=e.length,u=r.length;if(o!=u&&!(i&&u>o))return!1;var l=s.get(e),f=s.get(r);if(l&&f)return l==r&&f==e;var p=-1,c=!0,g=a&vc?new pc:void 0;for(s.set(e,r),s.set(r,e);++p<o;){var d=e[p],y=r[p];if(t)var m=i?t(y,d,p,r,e,s):t(d,y,p,e,r,s);if(m!==void 0){if(m)continue;c=!1;break}if(g){if(!hc(r,function(T,C){if(!dc(g,C)&&(d===T||n(d,T,a,t,s)))return g.push(C)})){c=!1;break}}else if(!(d===y||n(d,y,a,t,s))){c=!1;break}}return s.delete(e),s.delete(r),c}var ga=yc;function _c(e){var r=-1,a=Array(e.size);return e.forEach(function(t,n){a[++r]=[n,t]}),a}var $c=_c;function bc(e){var r=-1,a=Array(e.size);return e.forEach(function(t){a[++r]=t}),a}var mc=bc,_r=K,$r=ea,wc=F,Sc=ga,Tc=$c,Cc=mc,Ac=1,Oc=2,Pc="[object Boolean]",Ec="[object Date]",Lc="[object Error]",Rc="[object Map]",Mc="[object Number]",Ic="[object RegExp]",Fc="[object Set]",xc="[object String]",Gc="[object Symbol]",Dc="[object ArrayBuffer]",kc="[object DataView]",br=_r?_r.prototype:void 0,he=br?br.valueOf:void 0;function Nc(e,r,a,t,n,s,i){switch(a){case kc:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case Dc:return!(e.byteLength!=r.byteLength||!s(new $r(e),new $r(r)));case Pc:case Ec:case Mc:return wc(+e,+r);case Lc:return e.name==r.name&&e.message==r.message;case Ic:case xc:return e==r+"";case Rc:var o=Tc;case Fc:var u=t&Ac;if(o||(o=Cc),e.size!=r.size&&!u)return!1;var l=i.get(e);if(l)return l==r;t|=Oc,i.set(e,r);var f=Sc(o(e),o(r),t,n,s,i);return i.delete(e),f;case Gc:if(he)return he.call(e)==he.call(r)}return!1}var jc=Nc,Uc=kr,Bc=v;function Kc(e,r,a){var t=r(e);return Bc(e)?t:Uc(t,a(e))}var Hc=Kc;function qc(e,r){for(var a=-1,t=e==null?0:e.length,n=0,s=[];++a<t;){var i=e[a];r(i,a,e)&&(s[n++]=i)}return s}var Wc=qc;function zc(){return[]}var Qc=zc,Vc=Wc,Xc=Qc,Yc=Object.prototype,Zc=Yc.propertyIsEnumerable,mr=Object.getOwnPropertySymbols,Jc=mr?function(e){return e==null?[]:(e=Object(e),Vc(mr(e),function(r){return Zc.call(e,r)}))}:Xc,ep=Jc,rp=ra,ap=rp(Object.keys,Object),tp=ap,np=Le,sp=tp,ip=Object.prototype,op=ip.hasOwnProperty;function up(e){if(!np(e))return sp(e);var r=[];for(var a in Object(e))op.call(e,a)&&a!="constructor"&&r.push(a);return r}var lp=up,fp=ia,cp=lp,pp=N;function hp(e){return pp(e)?fp(e):cp(e)}var ke=hp,dp=Hc,gp=ep,vp=ke;function yp(e){return dp(e,vp,gp)}var _p=yp,wr=_p,$p=1,bp=Object.prototype,mp=bp.hasOwnProperty;function wp(e,r,a,t,n,s){var i=a&$p,o=wr(e),u=o.length,l=wr(r),f=l.length;if(u!=f&&!i)return!1;for(var p=u;p--;){var c=o[p];if(!(i?c in r:mp.call(r,c)))return!1}var g=s.get(e),d=s.get(r);if(g&&d)return g==r&&d==e;var y=!0;s.set(e,r),s.set(r,e);for(var m=i;++p<u;){c=o[p];var T=e[c],C=r[c];if(t)var Ne=i?t(C,T,c,r,e,s):t(T,C,c,e,r,s);if(!(Ne===void 0?T===C||n(T,C,a,t,s):Ne)){y=!1;break}m||(m=c=="constructor")}if(y&&!m){var H=e.constructor,q=r.constructor;H!=q&&"constructor"in e&&"constructor"in r&&!(typeof H=="function"&&H instanceof H&&typeof q=="function"&&q instanceof q)&&(y=!1)}return s.delete(e),s.delete(r),y}var Sp=wp,Tp=P,Cp=$,Ap=Tp(Cp,"DataView"),Op=Ap,Pp=P,Ep=$,Lp=Pp(Ep,"Promise"),Rp=Lp,Mp=P,Ip=$,Fp=Mp(Ip,"Set"),xp=Fp,ve=Op,ye=Ae,_e=Rp,$e=xp,be=Qr,va=I,j=qr,Sr="[object Map]",Gp="[object Object]",Tr="[object Promise]",Cr="[object Set]",Ar="[object WeakMap]",Or="[object DataView]",Dp=j(ve),kp=j(ye),Np=j(_e),jp=j($e),Up=j(be),A=va;(ve&&A(new ve(new ArrayBuffer(1)))!=Or||ye&&A(new ye)!=Sr||_e&&A(_e.resolve())!=Tr||$e&&A(new $e)!=Cr||be&&A(new be)!=Ar)&&(A=function(e){var r=va(e),a=r==Gp?e.constructor:void 0,t=a?j(a):"";if(t)switch(t){case Dp:return Or;case kp:return Sr;case Np:return Tr;case jp:return Cr;case Up:return Ar}return r});var Bp=A,de=Pe,Kp=ga,Hp=jc,qp=Sp,Pr=Bp,Er=v,Lr=Me,Wp=Ie,zp=1,Rr="[object Arguments]",Mr="[object Array]",W="[object Object]",Qp=Object.prototype,Ir=Qp.hasOwnProperty;function Vp(e,r,a,t,n,s){var i=Er(e),o=Er(r),u=i?Mr:Pr(e),l=o?Mr:Pr(r);u=u==Rr?W:u,l=l==Rr?W:l;var f=u==W,p=l==W,c=u==l;if(c&&Lr(e)){if(!Lr(r))return!1;i=!0,f=!1}if(c&&!f)return s||(s=new de),i||Wp(e)?Kp(e,r,a,t,n,s):Hp(e,r,u,a,t,n,s);if(!(a&zp)){var g=f&&Ir.call(e,"__wrapped__"),d=p&&Ir.call(r,"__wrapped__");if(g||d){var y=g?e.value():e,m=d?r.value():r;return s||(s=new de),n(y,m,a,t,s)}}return c?(s||(s=new de),qp(e,r,a,t,n,s)):!1}var Xp=Vp,Yp=Xp,Fr=S;function ya(e,r,a,t,n){return e===r?!0:e==null||r==null||!Fr(e)&&!Fr(r)?e!==e&&r!==r:Yp(e,r,a,t,ya,n)}var _a=ya,Zp=Pe,Jp=_a,eh=1,rh=2;function ah(e,r,a,t){var n=a.length,s=n,i=!t;if(e==null)return!s;for(e=Object(e);n--;){var o=a[n];if(i&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++n<s;){o=a[n];var u=o[0],l=e[u],f=o[1];if(i&&o[2]){if(l===void 0&&!(u in e))return!1}else{var p=new Zp;if(t)var c=t(l,f,u,e,r,p);if(!(c===void 0?Jp(f,l,eh|rh,t,p):c))return!1}}return!0}var th=ah,nh=w;function sh(e){return e===e&&!nh(e)}var $a=sh,ih=$a,oh=ke;function uh(e){for(var r=oh(e),a=r.length;a--;){var t=r[a],n=e[t];r[a]=[t,n,ih(n)]}return r}var lh=uh;function fh(e,r){return function(a){return a==null?!1:a[e]===r&&(r!==void 0||e in Object(a))}}var ba=fh,ch=th,ph=lh,hh=ba;function dh(e){var r=ph(e);return r.length==1&&r[0][2]?hh(r[0][0],r[0][1]):function(a){return a===e||ch(a,e,r)}}var gh=dh,vh=De;function yh(e,r,a){var t=e==null?void 0:vh(e,r);return t===void 0?a:t}var _h=yh;function $h(e,r){return e!=null&&r in Object(e)}var bh=$h,mh=da,wh=re,Sh=v,Th=Fe,Ch=Re,Ah=ue;function Oh(e,r,a){r=mh(r,e);for(var t=-1,n=r.length,s=!1;++t<n;){var i=Ah(r[t]);if(!(s=e!=null&&a(e,i)))break;e=e[i]}return s||++t!=n?s:(n=e==null?0:e.length,!!n&&Ch(n)&&Th(i,n)&&(Sh(e)||wh(e)))}var Ph=Oh,Eh=bh,Lh=Ph;function Rh(e,r){return e!=null&&Lh(e,r,Eh)}var Mh=Rh,Ih=_a,Fh=_h,xh=Mh,Gh=xe,Dh=$a,kh=ba,Nh=ue,jh=1,Uh=2;function Bh(e,r){return Gh(e)&&Dh(r)?kh(Nh(e),r):function(a){var t=Fh(a,e);return t===void 0&&t===r?xh(a,e):Ih(r,t,jh|Uh)}}var Kh=Bh;function Hh(e){return function(r){return r==null?void 0:r[e]}}var qh=Hh,Wh=De;function zh(e){return function(r){return Wh(r,e)}}var Qh=zh,Vh=qh,Xh=Qh,Yh=xe,Zh=ue;function Jh(e){return Yh(e)?Vh(Zh(e)):Xh(e)}var ed=Jh,rd=gh,ad=Kh,td=ae,nd=v,sd=ed;function id(e){return typeof e=="function"?e:e==null?td:typeof e=="object"?nd(e)?ad(e[0],e[1]):rd(e):sd(e)}var od=id,ud=Jr,ld=ke;function fd(e,r){return e&&ud(e,r,ld)}var cd=fd,pd=N;function hd(e,r){return function(a,t){if(a==null)return a;if(!pd(a))return e(a,t);for(var n=a.length,s=r?n:-1,i=Object(a);(r?s--:++s<n)&&t(i[s],s,i)!==!1;);return a}}var dd=hd,gd=cd,vd=dd,yd=vd(gd),_d=yd,$d=_d,bd=N;function md(e,r){var a=-1,t=bd(e)?Array(e.length):[];return $d(e,function(n,s,i){t[++a]=r(n,s,i)}),t}var wd=md;function Sd(e,r){var a=e.length;for(e.sort(r);a--;)e[a]=e[a].value;return e}var Td=Sd,xr=oe;function Cd(e,r){if(e!==r){var a=e!==void 0,t=e===null,n=e===e,s=xr(e),i=r!==void 0,o=r===null,u=r===r,l=xr(r);if(!o&&!l&&!s&&e>r||s&&i&&u&&!o&&!l||t&&i&&u||!a&&u||!n)return 1;if(!t&&!s&&!l&&e<r||l&&a&&n&&!t&&!s||o&&a&&n||!i&&n||!u)return-1}return 0}var Ad=Cd,Od=Ad;function Pd(e,r,a){for(var t=-1,n=e.criteria,s=r.criteria,i=n.length,o=a.length;++t<i;){var u=Od(n[t],s[t]);if(u){if(t>=o)return u;var l=a[t];return u*(l=="desc"?-1:1)}}return e.index-r.index}var Ed=Pd,ge=ca,Ld=De,Rd=od,Md=wd,Id=Td,Fd=na,xd=Ed,Gd=ae,Dd=v;function kd(e,r,a){r.length?r=ge(r,function(s){return Dd(s)?function(i){return Ld(i,s.length===1?s[0]:s)}:s}):r=[Gd];var t=-1;r=ge(r,Fd(Rd));var n=Md(e,function(s,i,o){var u=ge(r,function(l){return l(s)});return{criteria:u,index:++t,value:s}});return Id(n,function(s,i){return xd(s,i,a)})}var Nd=kd,jd=Kr,Ud=Nd,Bd=la,Gr=fa,Kd=Bd(function(e,r){if(e==null)return[];var a=r.length;return a>1&&Gr(e,r[0],r[1])?r=[]:a>2&&Gr(r[0],r[1],r[2])&&(r=[r[0]]),Ud(e,jd(r,1),[])}),Hd=Kd;const qd=b.getDefaultExportFromCjs(Hd);var Wd=F;function zd(e,r){for(var a=-1,t=e.length,n=0,s=[];++a<t;){var i=e[a],o=r?r(i):i;if(!a||!Wd(o,u)){var u=o;s[n++]=i===0?0:i}}return s}var Qd=zd,Vd=Qd;function Xd(e){return e&&e.length?Vd(e):[]}var Yd=Xd;const Zd=b.getDefaultExportFromCjs(Yd);class ma{constructor(){je(this,"config");this.config={api:{brand:"",cashierUrl:void 0,coinValueInCents:1,country:"",currency:"",game:"",gameHistoryUrl:"",homeUrl:void 0,integration:"",jurisdiction:"",playMode:"FUN",user:"",sessionId:"",lastRoundId:void 0},ui:{autoplay:{enabled:!1,rounds:{enabled:!1,showNoLimit:!1,showCustomLimit:!1,options:[]},lossLimit:{enabled:!1,showNoLimit:!1,showCustomLimit:!1,options:[]},winLimit:{enabled:!1,showNoLimit:!1,showCustomLimit:!1,options:[]},simple:!1,stopOnFeature:!1},cashier:{enabled:!1,balanceThreshold:[0]},feature:{allowTelemetry:!1,allowFullscreen:!1,allowQuickStop:!1,showCashier:!1,showClock:!1,showCloseGame:!1,showCurrency:!0,showFastPlay:!1,showFeatureBuy:!1,showFeatureIntro:!1,showFeatureOutro:!1,showFunModeBanner:!1,showHistory:!1,showLowWinCelebration:!1,showMaximumWin:!1,showNetPosition:!1,showPaylineLines:!1,showPaytable:!1,showRoundId:!1,showRtp:!1,showRules:!1,showSessionDuration:!1,showUi:!0},language:"en",maximumBet:void 0,minimumSpinDuration:0,requestTimeoutMs:1e4,incompleteGameResolution:{type:"NONE"},realityCheck:{sessionDurationPeriodFormat:"minutes",showCloseGame:!1,showHistory:!1,showNetPosition:!1,showSessionDuration:!1,showSumBets:!1,showSumWins:!1},skipInsufficientFundsCheck:!1,skipSplash:!1}}}}var wa=(e=>(e.BG="BG",e.CA="CA",e.CO="CO",e.CW="CW",e.DE="DE",e.DK="DK",e.ES="ES",e.GR="GR",e.IM="IM",e.IT="IT",e.MT="MT",e.NL="NL",e.NOT_APPLICABLE="NOT_APPLICABLE",e.PT="PT",e.SE="SE",e.SK="SK",e.UK="UK",e.UNKNOWN="UNKNOWN",e.US="US",e.SOCIAL="SOCIAL",e))(wa||{});const Dr={CA_BC:"CA",CA_ON:"CA",GER:"DE",HR:"ES",US_CT:"US",US_MI:"US",US_NJ:"US",USA:"US"},Jd=e=>{const r=e&&e in wa,a=e&&e in Dr;return!e||!(r||a)?"UNKNOWN":Dr[e]??e};function eg(e,r){function a(t,{maxCount:n}){const s=u=>(u==null?void 0:u.filter(l=>l<=n))??[],i=u=>(u==null?void 0:u.map(l=>Number(l)))??[],o=[...t,n];return $s([i,s,qd,Zd])(o)}switch(r){case"BG":return{autoplay:{lossLimit:{enabled:!0,showNoLimit:!1},winLimit:{enabled:!0}},feature:{showFastPlay:!1,allowQuickStop:!1},minimumSpinDuration:3};case"CA":return{autoplay:{enabled:!1},feature:{showFastPlay:!1,allowQuickStop:!1,showFeatureBuy:!1},minimumSpinDuration:2.5};case"CO":return{autoplay:{rounds:{showNoLimit:!1,showCustomLimit:!1,options:a(e.autoplay.rounds.options,{maxCount:100})}},feature:{showFastPlay:!1,allowQuickStop:!1},minimumSpinDuration:3};case"DE":return{autoplay:{enabled:!1},feature:{showFastPlay:!1,allowQuickStop:!1,showFeatureBuy:!1},minimumSpinDuration:5};case"ES":return{autoplay:{rounds:{showNoLimit:!1,showCustomLimit:!1,options:a(e.autoplay.rounds.options,{maxCount:100})}},feature:{showFastPlay:!1,allowQuickStop:!1},minimumSpinDuration:3};case"GR":return{feature:{showFastPlay:!1,allowQuickStop:!1,showFeatureBuy:!1},minimumSpinDuration:3};case"IT":return{feature:{showPaylineLines:!0}};case"NL":return{autoplay:{enabled:!1},feature:{showFeatureBuy:!1}};case"PT":return{autoplay:{rounds:{showNoLimit:!1,showCustomLimit:!1,options:a(e.autoplay.rounds.options,{maxCount:100})}},feature:{showFastPlay:!1,allowQuickStop:!1},minimumSpinDuration:3};case"SE":return{autoplay:{rounds:{showNoLimit:!1,showCustomLimit:!1,options:a(e.autoplay.rounds.options,{maxCount:100})}},feature:{showFastPlay:!1,allowQuickStop:!1},minimumSpinDuration:3};case"UK":return{autoplay:{enabled:!1},feature:{showFastPlay:!1,allowQuickStop:!1,showFeatureBuy:!1},minimumSpinDuration:2.5};case"US":return{feature:{showPaylineLines:!0}};case"MT":return{feature:{showClock:!0}};case"SOCIAL":return{feature:{showGameHistory:!1}}}return{}}class rg extends ma{async getConfig(){let r=this.config.ui;const a=await this.fetchOperatorConfig();r=pe({},r,a);const t=new URLSearchParams(window.location.search),n=JSON.parse(t.get("badgeParameters")??"{}");r=pe({},r,n);const s=Jd(this.config.api.jurisdiction),i=eg(r,s);return r=pe({},r,i),r}get mappedIntegration(){const r=this.config.api.integration.toLowerCase(),a=this.config.api.brand.toLowerCase();if(r==="spinomenal"){if(a.startsWith("gg-"))return"groovegaming"}else if(r==="pariplay"){if(a.startsWith("8x1"))return"pariplay-8x1"}else{if(/openbox-.*/.test(r))return"openbox";if(/oryx-.*/.test(r))return"oryx";if(/relax-.*/.test(r))return"relax"}return r}get mappedBrand(){const r=this.config.api.integration.toLowerCase(),a=this.config.api.brand.toLowerCase();return r==="bspot"&&this.config.api.playMode.toLowerCase()==="fun"?"demo":a}mapUiConfig(r){return r?{autoplay:{enabled:r.badge.autoplayType!==5,rounds:{enabled:r.badge.autoplayType!==5,showNoLimit:!1,showCustomLimit:!1,options:r.badge.autoplayRounds??[5,10,25,75,100]},lossLimit:{enabled:r.badge.autoplayType===1||r.badge.autoplayType===4,showNoLimit:r.badge.autoplayType===1,showCustomLimit:r.badge.autoplayType!==6,options:[5,25,50]},winLimit:{enabled:r.badge.autoplayType===1||r.badge.autoplayType===4,showNoLimit:!0,showCustomLimit:r.badge.autoplayType!==6,options:[10,20,75]},simple:r.badge.autoplayType===3},cashier:{enabled:r.badge.showQuickDeposit,balanceThreshold:r.badge.quickDepositBalanceThresholds},feature:{allowTelemetry:!0,allowFullscreen:r.defaults.fullscreen==="true",allowQuickStop:r.badge.minimumSpinDuration===0,showCashier:r.badge.showQuickDeposit,showClock:r.badge.showClock,showCloseGame:r.badge.showCloseGameButton,showCurrency:r.badge.showCurrency,showFastPlay:r.badge.showTurboButton,showFeatureBuy:r.badge.showHyperBonus,showFunModeBanner:r.badge.showFunBanner,showHistory:r.badge.showGameHistory,showPaylineLines:r.badge.showPaylineLines,showRoundId:r.badge.showRoundId,showRules:r.badge.showGameRules,showSessionDuration:r.badge.realityCheckShowSessionDuration,showUi:r.badge.showGameUi},minimumSpinDuration:r.badge.minimumSpinDuration,requestTimeoutMs:r.badge.requestTimeoutMs,incompleteGameResolution:{daysToAutoResolution:r.badge.incompleteGamesResolutionType===3?r.badge.daysToAutoResolution??90:void 0,type:r.badge.incompleteGamesResolutionType===2?"MANUAL":r.badge.incompleteGamesResolutionType===3?"AUTOMATIC":void 0},realityCheck:{sessionDurationPeriodFormat:r.badge.realityCheckPeriodFormat,showCloseGame:r.badge.realityCheckShowCloseGame,showHistory:r.badge.realityCheckShowHistoryLink,showNetPosition:r.badge.realityCheckShowNetGamingActivity,showSessionDuration:r.badge.realityCheckShowSessionDuration,showSumBets:r.badge.realityCheckShowSumBets,showSumWins:r.badge.realityCheckShowSumWins},skipInsufficientFundsCheck:r.badge.skipInsufficientFundsCheck,skipSplash:r.badge.loaderAutoContinue}:{}}async fetchOperatorConfig(){const r="https://awscdn.kalamba.net/games/games/build/",a=this.mappedIntegration,t=this.mappedBrand;let n={};try{n=await fetch(`${r}config/${a}/cage/${t}.json`).then(s=>s.json())}catch{try{n=await fetch(`${r}config/${a}/operator.json`).then(i=>i.json())}catch{n=await fetch(`${r}config/fun/operator.json`).then(o=>o.json())}}return this.mapUiConfig(n)}}exports.KalambaSdkConfigManager=rg;exports.KalambaSdkWrapper=Aa;exports.SdkConfigManager=ma;
|
|
5
|
+
"use strict";var Sa=Object.defineProperty;var Ta=(e,r,a)=>r in e?Sa(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a;var je=(e,r,a)=>(Ta(e,typeof r!="symbol"?r+"":r,a),a),Ue=(e,r,a)=>{if(!r.has(e))throw TypeError("Cannot "+a)};var _=(e,r,a)=>(Ue(e,r,"read from private field"),a?a.call(e):r.get(e)),E=(e,r,a)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,a)},U=(e,r,a,t)=>(Ue(e,r,"write to private field"),t?t.call(e,a):r.set(e,a),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const le=require("./errors-358575c3.cjs"),b=require("./noop-b3c54b76.cjs"),Be=()=>{},Ca=()=>{};var L,ee,R,O,M;class Aa{constructor({messagePort:r,plugins:a,sdkConfigManager:t}){E(this,L,void 0);E(this,ee,void 0);E(this,R,{gameName:"UNKNOWN",gameVersion:"unknown",showErrors:!0,showFreeRounds:!0,showRealityCheck:!0,showBars:!0,skipErrors:[]});E(this,O,{isSdkConfigured:!1,balance:0,bet:{base:0,multiplier:0},openGameResponse:void 0,lastPlayResponse:void 0,freeRoundId:void 0});E(this,M,void 0);U(this,L,r),U(this,M,new t),U(this,ee,{rgs:new a.rgs(this.config,this.sdkConfig),casino:a.casino.map(n=>new n(this.config,this.sdkConfig)),telemetry:a.telemetry.map(({plugin:n,trackers:s})=>new n(s.map(i=>new i(this.config,this.sdkConfig)),this.config,this.sdkConfig))}),this.on("balance",({balance:n})=>{this.setState(s=>({...s,balance:n}))}),this.on("bet",n=>{this.setState(s=>({...s,bet:n}))}),this.on("sdk:playCycleStart",()=>{this.setState(n=>({...n,balance:n.balance-n.bet.base*n.bet.multiplier}))}),this.on("sdk:play",n=>{this.send("play",{...n,payloadToInject:{freeRoundId:this.state.freeRoundId}})}),this.on("sdk:configure",n=>{Object.assign(_(this,R),n)}),this.on("freeRoundsPopup",()=>{var s;const n=(s=this.state.lastPlayResponse??this.state.openGameResponse)==null?void 0:s.contract.freeRounds[0];n&&this.state.freeRoundId&&this.send("freeRoundsInfo",n)}),this.on("rgs:openGameResponse",async n=>{this.setState(s=>({...s,openGameResponse:n,balance:n.contract.balance.coins})),this.on("playReady",()=>{this.handleFreeRounds(n)}),this.sdkConfig.ui=await _(this,M).getConfig(),this.setState(s=>({...s,isSdkConfigured:!0})),this.send("configured",this.sdkConfig)}),this.on("rgs:openGameError",async n=>{n.type==="timeout"&&!this.config.skipErrors.includes("TIMEOUT")&&this.send("error",{messageKey:"Error.TIMEOUT",messageCode:"TIMEOUT",type:"RELOAD"}),n.type==="error"&&!this.config.skipErrors.includes(n.data.code)&&this.send("error",{messageKey:`RgsError.${n.data.code}`,messageCode:n.data.code,type:le.RgsErrorAction[n.data.code]})}),this.on("rgs:playResponse",async n=>{this.setState(s=>({...s,lastPlayResponse:n}))}),this.on("playCycleEnd",()=>{this.handleFreeRounds(this.state.lastPlayResponse)}),this.on("rgs:playError",async n=>{n.type==="timeout"&&!this.config.skipErrors.includes("TIMEOUT")&&this.send("error",{messageKey:"Error.TIMEOUT",messageCode:"TIMEOUT",type:"RELOAD"}),n.type==="error"&&!this.config.skipErrors.includes(n.data.code)&&this.send("error",{messageKey:`RgsError.${n.data.code}`,messageCode:n.data.code,type:le.RgsErrorAction[n.data.code]})}),this.on("rgs:freeRoundsResponse",async n=>{var s;if(n.action==="ACCEPT"){const i=(s=this.state.lastPlayResponse??this.state.openGameResponse)==null?void 0:s.contract.freeRounds.find(o=>o.id===n.id);if(!i)return;this.setState(o=>({...o,freeRoundId:i.id})),this.send("legalBets",{[i.conf.base]:[i.conf.multiplier]}),this.send("bet",{base:i.conf.base,multiplier:i.conf.multiplier})}}),this.on("rgs:freeRoundsError",async n=>{n.type==="timeout"&&!this.config.skipErrors.includes("TIMEOUT")&&this.send("error",{messageKey:"Error.TIMEOUT",messageCode:"TIMEOUT",type:"RELOAD"}),n.type==="error"&&!this.config.skipErrors.includes(n.data.code)&&this.send("error",{messageKey:`RgsError.${n.data.code}`,messageCode:n.data.code,type:le.RgsErrorAction[n.data.code]})}),this.forwardMessages()}get state(){const r=this;return new Proxy({},{get(a,t){return Reflect.get(_(r,O),t)}})}setState(r){U(this,O,r(_(this,O))),this.send("state",_(this,O))}forwardMessages(){this.forwardToPlugins("casino",["sdk:autoplay","sdk:balance","sdk:bet","sdk:cashier","sdk:choice","sdk:close","sdk:error","sdk:history","sdk:loadEnd","sdk:loadProgress","sdk:loadStart","sdk:playCycleEnd","sdk:playCycleStart","sdk:playEnd","sdk:playStart","sdk:settings"]),this.forwardToPlugins("casino",["rgs:playResponse","rgs:openGameResponse"]),this.forwardToPlugins("rgs",["sdk:openGame","sdk:history"]),this.forwardToPlugins("rgs",["casino:play","casino:cashier","casino:close","casino:history"]),this.forwardToPlugins("telemetry",["sdk:autoplay","sdk:error","sdk:playCycleStart","sdk:playCycleEnd","sdk:loadStart","sdk:loadProgress","sdk:loadEnd","sdk:telemetry.click","sdk:telemetry.orientationChange"]),this.forwardToPlugins("telemetry",["rgs:openGameResponse","rgs:playResponse"]),this.forwardToSdk(["casino:balance","casino:bet","casino:choice","casino:freeze","casino:help","casino:paytable","casino:resume","casino:settings","casino:suspend","casino:unfreeze"]),this.forwardToSdk(["rgs:openGameError","rgs:openGameResponse","rgs:playError","rgs:playResponse","rgs:realityCheck"])}get config(){const r=this;return new Proxy({},{get(a,t){return Reflect.get(_(r,R),t)},set(a,t,n){return Reflect.set(_(r,R),t,n)}})}get sdkConfig(){return _(this,M).config}forwardToPlugins(r,a){a.forEach(t=>{const n=s=>{s.data.message===`kalamba:${t}`&&(Be("wrapper:forwardToPlugins",r,s.data.message.replace(/^kalamba:/,""),s.data.payload),window.postMessage({message:`kalamba:wrapper-${r}:${t.replace(/^(.+):/,"")}`,payload:s.data.payload}))};window.addEventListener("message",n)})}forwardToSdk(r){r.forEach(a=>{const t=n=>{n.data.message===`kalamba:${a}`&&(Ca("wrapper:forwardToSdk",n.data.message.replace(/^kalamba:/,""),n.data.payload),_(this,L).postMessage({message:`kalamba:wrapper:${a.replace(/^(.+):/,"")}`,payload:n.data.payload},"*"))};window.addEventListener("message",t)})}on(r,a,t){const n=function s(i){!new RegExp(`^kalamba:${r.includes(":")?"":"(.+):"}${r}$`).test(i.data.message)||new RegExp(`^kalamba:wrapper-(.+):${r}`).test(i.data.message)||new RegExp(`^kalamba:(.+)-wrapper:${r}`).test(i.data.message)||(Be("on",i.data.message.replace(/^kalamba:/,""),i.data.payload),a(i.data.payload),t!=null&&t.once&&window.removeEventListener("message",s))};window.addEventListener("message",n)}send(r,...[a]){window.postMessage({message:`kalamba:wrapper:${r}`,payload:a}),_(this,L).postMessage({message:`kalamba:wrapper:${r}`,payload:a},"*")}handleFreeRounds(r){const a=r.contract.freeRounds[0];if(a)switch(a.status){case"ACTIVE":this.setState(t=>({...t,freeRoundId:a.id})),this.send("legalBets",{[a.conf.base]:[a.conf.multiplier]}),this.send("bet",{base:a.conf.base,multiplier:a.conf.multiplier});break;case"PENDING":this.send("freeRoundsOffer",a);break;case"FINISHED":this.send("freeRoundsComplete",a),this.setState(t=>({...t,freeRoundId:void 0})),this.send("legalBets",this.state.openGameResponse.contract.bet.available),this.send("bet",this.state.openGameResponse.contract.bet.default);break}}}L=new WeakMap,ee=new WeakMap,R=new WeakMap,O=new WeakMap,M=new WeakMap;function Oa(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var w=Oa,Pa=w,Ke=Object.create,Ea=function(){function e(){}return function(r){if(!Pa(r))return{};if(Ke)return Ke(r);e.prototype=r;var a=new e;return e.prototype=void 0,a}}(),me=Ea;function La(){}var we=La,Ra=me,Ma=we;function z(e,r){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=void 0}z.prototype=Ra(Ma.prototype);z.prototype.constructor=z;var Se=z;function Ia(e,r){for(var a=-1,t=r.length,n=e.length;++a<t;)e[n+a]=r[a];return e}var kr=Ia,Fa=typeof b.commonjsGlobal=="object"&&b.commonjsGlobal&&b.commonjsGlobal.Object===Object&&b.commonjsGlobal,Nr=Fa,xa=Nr,Ga=typeof self=="object"&&self&&self.Object===Object&&self,Da=xa||Ga||Function("return this")(),$=Da,ka=$,Na=ka.Symbol,K=Na,He=K,jr=Object.prototype,ja=jr.hasOwnProperty,Ua=jr.toString,B=He?He.toStringTag:void 0;function Ba(e){var r=ja.call(e,B),a=e[B];try{e[B]=void 0;var t=!0}catch{}var n=Ua.call(e);return t&&(r?e[B]=a:delete e[B]),n}var Ka=Ba,Ha=Object.prototype,qa=Ha.toString;function Wa(e){return qa.call(e)}var za=Wa,qe=K,Qa=Ka,Va=za,Xa="[object Null]",Ya="[object Undefined]",We=qe?qe.toStringTag:void 0;function Za(e){return e==null?e===void 0?Ya:Xa:We&&We in Object(e)?Qa(e):Va(e)}var I=Za;function Ja(e){return e!=null&&typeof e=="object"}var S=Ja,et=I,rt=S,at="[object Arguments]";function tt(e){return rt(e)&&et(e)==at}var nt=tt,ze=nt,st=S,Ur=Object.prototype,it=Ur.hasOwnProperty,ot=Ur.propertyIsEnumerable,ut=ze(function(){return arguments}())?ze:function(e){return st(e)&&it.call(e,"callee")&&!ot.call(e,"callee")},re=ut,lt=Array.isArray,v=lt,Qe=K,ft=re,ct=v,Ve=Qe?Qe.isConcatSpreadable:void 0;function pt(e){return ct(e)||ft(e)||!!(Ve&&e&&e[Ve])}var ht=pt,dt=kr,gt=ht;function Br(e,r,a,t,n){var s=-1,i=e.length;for(a||(a=gt),n||(n=[]);++s<i;){var o=e[s];r>0&&a(o)?r>1?Br(o,r-1,a,t,n):dt(n,o):t||(n[n.length]=o)}return n}var Kr=Br,vt=Kr;function yt(e){var r=e==null?0:e.length;return r?vt(e,1):[]}var _t=yt;function $t(e,r,a){switch(a.length){case 0:return e.call(r);case 1:return e.call(r,a[0]);case 2:return e.call(r,a[0],a[1]);case 3:return e.call(r,a[0],a[1],a[2])}return e.apply(r,a)}var bt=$t,mt=bt,Xe=Math.max;function wt(e,r,a){return r=Xe(r===void 0?e.length-1:r,0),function(){for(var t=arguments,n=-1,s=Xe(t.length-r,0),i=Array(s);++n<s;)i[n]=t[r+n];n=-1;for(var o=Array(r+1);++n<r;)o[n]=t[n];return o[r]=a(i),mt(e,this,o)}}var Hr=wt;function St(e){return function(){return e}}var Tt=St,Ct=I,At=w,Ot="[object AsyncFunction]",Pt="[object Function]",Et="[object GeneratorFunction]",Lt="[object Proxy]";function Rt(e){if(!At(e))return!1;var r=Ct(e);return r==Pt||r==Et||r==Ot||r==Lt}var Te=Rt,Mt=$,It=Mt["__core-js_shared__"],Ft=It,fe=Ft,Ye=function(){var e=/[^.]+$/.exec(fe&&fe.keys&&fe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function xt(e){return!!Ye&&Ye in e}var Gt=xt,Dt=Function.prototype,kt=Dt.toString;function Nt(e){if(e!=null){try{return kt.call(e)}catch{}try{return e+""}catch{}}return""}var qr=Nt,jt=Te,Ut=Gt,Bt=w,Kt=qr,Ht=/[\\^$.*+?()[\]{}|]/g,qt=/^\[object .+?Constructor\]$/,Wt=Function.prototype,zt=Object.prototype,Qt=Wt.toString,Vt=zt.hasOwnProperty,Xt=RegExp("^"+Qt.call(Vt).replace(Ht,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Yt(e){if(!Bt(e)||Ut(e))return!1;var r=jt(e)?Xt:qt;return r.test(Kt(e))}var Zt=Yt;function Jt(e,r){return e==null?void 0:e[r]}var en=Jt,rn=Zt,an=en;function tn(e,r){var a=an(e,r);return rn(a)?a:void 0}var P=tn,nn=P,sn=function(){try{var e=nn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Wr=sn;function on(e){return e}var ae=on,un=Tt,Ze=Wr,ln=ae,fn=Ze?function(e,r){return Ze(e,"toString",{configurable:!0,enumerable:!1,value:un(r),writable:!0})}:ln,cn=fn,pn=800,hn=16,dn=Date.now;function gn(e){var r=0,a=0;return function(){var t=dn(),n=hn-(t-a);if(a=t,n>0){if(++r>=pn)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}var vn=gn,yn=cn,_n=vn,$n=_n(yn),zr=$n,bn=_t,mn=Hr,wn=zr;function Sn(e){return wn(mn(e,void 0,bn),e+"")}var Tn=Sn,Cn=P,An=$,On=Cn(An,"WeakMap"),Qr=On,Je=Qr,Pn=Je&&new Je,En=Pn,er=En,Ln=b.noop_1,Rn=er?function(e){return er.get(e)}:Ln,Vr=Rn,Mn={},In=Mn,rr=In,Fn=Object.prototype,xn=Fn.hasOwnProperty;function Gn(e){for(var r=e.name+"",a=rr[r],t=xn.call(rr,r)?a.length:0;t--;){var n=a[t],s=n.func;if(s==null||s==e)return n.name}return r}var Xr=Gn,Dn=me,kn=we,Nn=4294967295;function Q(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Nn,this.__views__=[]}Q.prototype=Dn(kn.prototype);Q.prototype.constructor=Q;var Ce=Q;function jn(e,r){var a=-1,t=e.length;for(r||(r=Array(t));++a<t;)r[a]=e[a];return r}var Yr=jn,Un=Ce,Bn=Se,Kn=Yr;function Hn(e){if(e instanceof Un)return e.clone();var r=new Bn(e.__wrapped__,e.__chain__);return r.__actions__=Kn(e.__actions__),r.__index__=e.__index__,r.__values__=e.__values__,r}var qn=Hn,Wn=Ce,ar=Se,zn=we,Qn=v,Vn=S,Xn=qn,Yn=Object.prototype,Zn=Yn.hasOwnProperty;function V(e){if(Vn(e)&&!Qn(e)&&!(e instanceof Wn)){if(e instanceof ar)return e;if(Zn.call(e,"__wrapped__"))return Xn(e)}return new ar(e)}V.prototype=zn.prototype;V.prototype.constructor=V;var Jn=V,es=Ce,rs=Vr,as=Xr,ts=Jn;function ns(e){var r=as(e),a=ts[r];if(typeof a!="function"||!(r in es.prototype))return!1;if(e===a)return!0;var t=rs(a);return!!t&&e===t[0]}var ss=ns,tr=Se,is=Tn,os=Vr,ce=Xr,us=v,nr=ss,ls="Expected a function",fs=8,cs=32,ps=128,hs=256;function ds(e){return is(function(r){var a=r.length,t=a,n=tr.prototype.thru;for(e&&r.reverse();t--;){var s=r[t];if(typeof s!="function")throw new TypeError(ls);if(n&&!i&&ce(s)=="wrapper")var i=new tr([],!0)}for(t=i?t:a;++t<a;){s=r[t];var o=ce(s),u=o=="wrapper"?os(s):void 0;u&&nr(u[0])&&u[1]==(ps|fs|cs|hs)&&!u[4].length&&u[9]==1?i=i[ce(u[0])].apply(i,u[3]):i=s.length==1&&nr(s)?i[o]():i.thru(s)}return function(){var l=arguments,f=l[0];if(i&&l.length==1&&us(f))return i.plant(f).value();for(var p=0,c=a?r[p].apply(this,l):f;++p<a;)c=r[p].call(this,c);return c}})}var gs=ds,vs=gs,ys=vs(),_s=ys;const $s=b.getDefaultExportFromCjs(_s);function bs(){this.__data__=[],this.size=0}var ms=bs;function ws(e,r){return e===r||e!==e&&r!==r}var F=ws,Ss=F;function Ts(e,r){for(var a=e.length;a--;)if(Ss(e[a][0],r))return a;return-1}var te=Ts,Cs=te,As=Array.prototype,Os=As.splice;function Ps(e){var r=this.__data__,a=Cs(r,e);if(a<0)return!1;var t=r.length-1;return a==t?r.pop():Os.call(r,a,1),--this.size,!0}var Es=Ps,Ls=te;function Rs(e){var r=this.__data__,a=Ls(r,e);return a<0?void 0:r[a][1]}var Ms=Rs,Is=te;function Fs(e){return Is(this.__data__,e)>-1}var xs=Fs,Gs=te;function Ds(e,r){var a=this.__data__,t=Gs(a,e);return t<0?(++this.size,a.push([e,r])):a[t][1]=r,this}var ks=Ds,Ns=ms,js=Es,Us=Ms,Bs=xs,Ks=ks;function x(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var t=e[r];this.set(t[0],t[1])}}x.prototype.clear=Ns;x.prototype.delete=js;x.prototype.get=Us;x.prototype.has=Bs;x.prototype.set=Ks;var ne=x,Hs=ne;function qs(){this.__data__=new Hs,this.size=0}var Ws=qs;function zs(e){var r=this.__data__,a=r.delete(e);return this.size=r.size,a}var Qs=zs;function Vs(e){return this.__data__.get(e)}var Xs=Vs;function Ys(e){return this.__data__.has(e)}var Zs=Ys,Js=P,ei=$,ri=Js(ei,"Map"),Ae=ri,ai=P,ti=ai(Object,"create"),se=ti,sr=se;function ni(){this.__data__=sr?sr(null):{},this.size=0}var si=ni;function ii(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var oi=ii,ui=se,li="__lodash_hash_undefined__",fi=Object.prototype,ci=fi.hasOwnProperty;function pi(e){var r=this.__data__;if(ui){var a=r[e];return a===li?void 0:a}return ci.call(r,e)?r[e]:void 0}var hi=pi,di=se,gi=Object.prototype,vi=gi.hasOwnProperty;function yi(e){var r=this.__data__;return di?r[e]!==void 0:vi.call(r,e)}var _i=yi,$i=se,bi="__lodash_hash_undefined__";function mi(e,r){var a=this.__data__;return this.size+=this.has(e)?0:1,a[e]=$i&&r===void 0?bi:r,this}var wi=mi,Si=si,Ti=oi,Ci=hi,Ai=_i,Oi=wi;function G(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var t=e[r];this.set(t[0],t[1])}}G.prototype.clear=Si;G.prototype.delete=Ti;G.prototype.get=Ci;G.prototype.has=Ai;G.prototype.set=Oi;var Pi=G,ir=Pi,Ei=ne,Li=Ae;function Ri(){this.size=0,this.__data__={hash:new ir,map:new(Li||Ei),string:new ir}}var Mi=Ri;function Ii(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var Fi=Ii,xi=Fi;function Gi(e,r){var a=e.__data__;return xi(r)?a[typeof r=="string"?"string":"hash"]:a.map}var ie=Gi,Di=ie;function ki(e){var r=Di(this,e).delete(e);return this.size-=r?1:0,r}var Ni=ki,ji=ie;function Ui(e){return ji(this,e).get(e)}var Bi=Ui,Ki=ie;function Hi(e){return Ki(this,e).has(e)}var qi=Hi,Wi=ie;function zi(e,r){var a=Wi(this,e),t=a.size;return a.set(e,r),this.size+=a.size==t?0:1,this}var Qi=zi,Vi=Mi,Xi=Ni,Yi=Bi,Zi=qi,Ji=Qi;function D(e){var r=-1,a=e==null?0:e.length;for(this.clear();++r<a;){var t=e[r];this.set(t[0],t[1])}}D.prototype.clear=Vi;D.prototype.delete=Xi;D.prototype.get=Yi;D.prototype.has=Zi;D.prototype.set=Ji;var Oe=D,eo=ne,ro=Ae,ao=Oe,to=200;function no(e,r){var a=this.__data__;if(a instanceof eo){var t=a.__data__;if(!ro||t.length<to-1)return t.push([e,r]),this.size=++a.size,this;a=this.__data__=new ao(t)}return a.set(e,r),this.size=a.size,this}var so=no,io=ne,oo=Ws,uo=Qs,lo=Xs,fo=Zs,co=so;function k(e){var r=this.__data__=new io(e);this.size=r.size}k.prototype.clear=oo;k.prototype.delete=uo;k.prototype.get=lo;k.prototype.has=fo;k.prototype.set=co;var Pe=k,or=Wr;function po(e,r,a){r=="__proto__"&&or?or(e,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[r]=a}var Ee=po,ho=Ee,go=F;function vo(e,r,a){(a!==void 0&&!go(e[r],a)||a===void 0&&!(r in e))&&ho(e,r,a)}var Zr=vo;function yo(e){return function(r,a,t){for(var n=-1,s=Object(r),i=t(r),o=i.length;o--;){var u=i[e?o:++n];if(a(s[u],u,s)===!1)break}return r}}var _o=yo,$o=_o,bo=$o(),Jr=bo,X={exports:{}};X.exports;(function(e,r){var a=$,t=r&&!r.nodeType&&r,n=t&&!0&&e&&!e.nodeType&&e,s=n&&n.exports===t,i=s?a.Buffer:void 0,o=i?i.allocUnsafe:void 0;function u(l,f){if(f)return l.slice();var p=l.length,c=o?o(p):new l.constructor(p);return l.copy(c),c}e.exports=u})(X,X.exports);var mo=X.exports,wo=$,So=wo.Uint8Array,ea=So,ur=ea;function To(e){var r=new e.constructor(e.byteLength);return new ur(r).set(new ur(e)),r}var Co=To,Ao=Co;function Oo(e,r){var a=r?Ao(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}var Po=Oo;function Eo(e,r){return function(a){return e(r(a))}}var ra=Eo,Lo=ra,Ro=Lo(Object.getPrototypeOf,Object),aa=Ro,Mo=Object.prototype;function Io(e){var r=e&&e.constructor,a=typeof r=="function"&&r.prototype||Mo;return e===a}var Le=Io,Fo=me,xo=aa,Go=Le;function Do(e){return typeof e.constructor=="function"&&!Go(e)?Fo(xo(e)):{}}var ko=Do,No=9007199254740991;function jo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=No}var Re=jo,Uo=Te,Bo=Re;function Ko(e){return e!=null&&Bo(e.length)&&!Uo(e)}var N=Ko,Ho=N,qo=S;function Wo(e){return qo(e)&&Ho(e)}var zo=Wo,Y={exports:{}};function Qo(){return!1}var Vo=Qo;Y.exports;(function(e,r){var a=$,t=Vo,n=r&&!r.nodeType&&r,s=n&&!0&&e&&!e.nodeType&&e,i=s&&s.exports===n,o=i?a.Buffer:void 0,u=o?o.isBuffer:void 0,l=u||t;e.exports=l})(Y,Y.exports);var Me=Y.exports,Xo=I,Yo=aa,Zo=S,Jo="[object Object]",eu=Function.prototype,ru=Object.prototype,ta=eu.toString,au=ru.hasOwnProperty,tu=ta.call(Object);function nu(e){if(!Zo(e)||Xo(e)!=Jo)return!1;var r=Yo(e);if(r===null)return!0;var a=au.call(r,"constructor")&&r.constructor;return typeof a=="function"&&a instanceof a&&ta.call(a)==tu}var su=nu,iu=I,ou=Re,uu=S,lu="[object Arguments]",fu="[object Array]",cu="[object Boolean]",pu="[object Date]",hu="[object Error]",du="[object Function]",gu="[object Map]",vu="[object Number]",yu="[object Object]",_u="[object RegExp]",$u="[object Set]",bu="[object String]",mu="[object WeakMap]",wu="[object ArrayBuffer]",Su="[object DataView]",Tu="[object Float32Array]",Cu="[object Float64Array]",Au="[object Int8Array]",Ou="[object Int16Array]",Pu="[object Int32Array]",Eu="[object Uint8Array]",Lu="[object Uint8ClampedArray]",Ru="[object Uint16Array]",Mu="[object Uint32Array]",h={};h[Tu]=h[Cu]=h[Au]=h[Ou]=h[Pu]=h[Eu]=h[Lu]=h[Ru]=h[Mu]=!0;h[lu]=h[fu]=h[wu]=h[cu]=h[Su]=h[pu]=h[hu]=h[du]=h[gu]=h[vu]=h[yu]=h[_u]=h[$u]=h[bu]=h[mu]=!1;function Iu(e){return uu(e)&&ou(e.length)&&!!h[iu(e)]}var Fu=Iu;function xu(e){return function(r){return e(r)}}var na=xu,Z={exports:{}};Z.exports;(function(e,r){var a=Nr,t=r&&!r.nodeType&&r,n=t&&!0&&e&&!e.nodeType&&e,s=n&&n.exports===t,i=s&&a.process,o=function(){try{var u=n&&n.require&&n.require("util").types;return u||i&&i.binding&&i.binding("util")}catch{}}();e.exports=o})(Z,Z.exports);var Gu=Z.exports,Du=Fu,ku=na,lr=Gu,fr=lr&&lr.isTypedArray,Nu=fr?ku(fr):Du,Ie=Nu;function ju(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}var sa=ju,Uu=Ee,Bu=F,Ku=Object.prototype,Hu=Ku.hasOwnProperty;function qu(e,r,a){var t=e[r];(!(Hu.call(e,r)&&Bu(t,a))||a===void 0&&!(r in e))&&Uu(e,r,a)}var Wu=qu,zu=Wu,Qu=Ee;function Vu(e,r,a,t){var n=!a;a||(a={});for(var s=-1,i=r.length;++s<i;){var o=r[s],u=t?t(a[o],e[o],o,a,e):void 0;u===void 0&&(u=e[o]),n?Qu(a,o,u):zu(a,o,u)}return a}var Xu=Vu;function Yu(e,r){for(var a=-1,t=Array(e);++a<e;)t[a]=r(a);return t}var Zu=Yu,Ju=9007199254740991,el=/^(?:0|[1-9]\d*)$/;function rl(e,r){var a=typeof e;return r=r??Ju,!!r&&(a=="number"||a!="symbol"&&el.test(e))&&e>-1&&e%1==0&&e<r}var Fe=rl,al=Zu,tl=re,nl=v,sl=Me,il=Fe,ol=Ie,ul=Object.prototype,ll=ul.hasOwnProperty;function fl(e,r){var a=nl(e),t=!a&&tl(e),n=!a&&!t&&sl(e),s=!a&&!t&&!n&&ol(e),i=a||t||n||s,o=i?al(e.length,String):[],u=o.length;for(var l in e)(r||ll.call(e,l))&&!(i&&(l=="length"||n&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||il(l,u)))&&o.push(l);return o}var ia=fl;function cl(e){var r=[];if(e!=null)for(var a in Object(e))r.push(a);return r}var pl=cl,hl=w,dl=Le,gl=pl,vl=Object.prototype,yl=vl.hasOwnProperty;function _l(e){if(!hl(e))return gl(e);var r=dl(e),a=[];for(var t in e)t=="constructor"&&(r||!yl.call(e,t))||a.push(t);return a}var $l=_l,bl=ia,ml=$l,wl=N;function Sl(e){return wl(e)?bl(e,!0):ml(e)}var oa=Sl,Tl=Xu,Cl=oa;function Al(e){return Tl(e,Cl(e))}var Ol=Al,cr=Zr,Pl=mo,El=Po,Ll=Yr,Rl=ko,pr=re,hr=v,Ml=zo,Il=Me,Fl=Te,xl=w,Gl=su,Dl=Ie,dr=sa,kl=Ol;function Nl(e,r,a,t,n,s,i){var o=dr(e,a),u=dr(r,a),l=i.get(u);if(l){cr(e,a,l);return}var f=s?s(o,u,a+"",e,r,i):void 0,p=f===void 0;if(p){var c=hr(u),g=!c&&Il(u),d=!c&&!g&&Dl(u);f=u,c||g||d?hr(o)?f=o:Ml(o)?f=Ll(o):g?(p=!1,f=Pl(u,!0)):d?(p=!1,f=El(u,!0)):f=[]:Gl(u)||pr(u)?(f=o,pr(o)?f=kl(o):(!xl(o)||Fl(o))&&(f=Rl(u))):p=!1}p&&(i.set(u,f),n(f,u,t,s,i),i.delete(u)),cr(e,a,f)}var jl=Nl,Ul=Pe,Bl=Zr,Kl=Jr,Hl=jl,ql=w,Wl=oa,zl=sa;function ua(e,r,a,t,n){e!==r&&Kl(r,function(s,i){if(n||(n=new Ul),ql(s))Hl(e,r,i,a,ua,t,n);else{var o=t?t(zl(e,i),s,i+"",e,r,n):void 0;o===void 0&&(o=s),Bl(e,i,o)}},Wl)}var Ql=ua,Vl=ae,Xl=Hr,Yl=zr;function Zl(e,r){return Yl(Xl(e,r,Vl),e+"")}var la=Zl,Jl=F,ef=N,rf=Fe,af=w;function tf(e,r,a){if(!af(a))return!1;var t=typeof r;return(t=="number"?ef(a)&&rf(r,a.length):t=="string"&&r in a)?Jl(a[r],e):!1}var fa=tf,nf=la,sf=fa;function of(e){return nf(function(r,a){var t=-1,n=a.length,s=n>1?a[n-1]:void 0,i=n>2?a[2]:void 0;for(s=e.length>3&&typeof s=="function"?(n--,s):void 0,i&&sf(a[0],a[1],i)&&(s=n<3?void 0:s,n=1),r=Object(r);++t<n;){var o=a[t];o&&e(r,o,t,s)}return r})}var uf=of,lf=Ql,ff=uf,cf=ff(function(e,r,a){lf(e,r,a)}),pf=cf;const pe=b.getDefaultExportFromCjs(pf);function hf(e,r){for(var a=-1,t=e==null?0:e.length,n=Array(t);++a<t;)n[a]=r(e[a],a,e);return n}var ca=hf,df=I,gf=S,vf="[object Symbol]";function yf(e){return typeof e=="symbol"||gf(e)&&df(e)==vf}var oe=yf,_f=v,$f=oe,bf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mf=/^\w*$/;function wf(e,r){if(_f(e))return!1;var a=typeof e;return a=="number"||a=="symbol"||a=="boolean"||e==null||$f(e)?!0:mf.test(e)||!bf.test(e)||r!=null&&e in Object(r)}var xe=wf,pa=Oe,Sf="Expected a function";function Ge(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(Sf);var a=function(){var t=arguments,n=r?r.apply(this,t):t[0],s=a.cache;if(s.has(n))return s.get(n);var i=e.apply(this,t);return a.cache=s.set(n,i)||s,i};return a.cache=new(Ge.Cache||pa),a}Ge.Cache=pa;var Tf=Ge,Cf=Tf,Af=500;function Of(e){var r=Cf(e,function(t){return a.size===Af&&a.clear(),t}),a=r.cache;return r}var Pf=Of,Ef=Pf,Lf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rf=/\\(\\)?/g,Mf=Ef(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Lf,function(a,t,n,s){r.push(n?s.replace(Rf,"$1"):t||a)}),r}),If=Mf,gr=K,Ff=ca,xf=v,Gf=oe,Df=1/0,vr=gr?gr.prototype:void 0,yr=vr?vr.toString:void 0;function ha(e){if(typeof e=="string")return e;if(xf(e))return Ff(e,ha)+"";if(Gf(e))return yr?yr.call(e):"";var r=e+"";return r=="0"&&1/e==-Df?"-0":r}var kf=ha,Nf=kf;function jf(e){return e==null?"":Nf(e)}var Uf=jf,Bf=v,Kf=xe,Hf=If,qf=Uf;function Wf(e,r){return Bf(e)?e:Kf(e,r)?[e]:Hf(qf(e))}var da=Wf,zf=oe,Qf=1/0;function Vf(e){if(typeof e=="string"||zf(e))return e;var r=e+"";return r=="0"&&1/e==-Qf?"-0":r}var ue=Vf,Xf=da,Yf=ue;function Zf(e,r){r=Xf(r,e);for(var a=0,t=r.length;e!=null&&a<t;)e=e[Yf(r[a++])];return a&&a==t?e:void 0}var De=Zf,Jf="__lodash_hash_undefined__";function ec(e){return this.__data__.set(e,Jf),this}var rc=ec;function ac(e){return this.__data__.has(e)}var tc=ac,nc=Oe,sc=rc,ic=tc;function J(e){var r=-1,a=e==null?0:e.length;for(this.__data__=new nc;++r<a;)this.add(e[r])}J.prototype.add=J.prototype.push=sc;J.prototype.has=ic;var oc=J;function uc(e,r){for(var a=-1,t=e==null?0:e.length;++a<t;)if(r(e[a],a,e))return!0;return!1}var lc=uc;function fc(e,r){return e.has(r)}var cc=fc,pc=oc,hc=lc,dc=cc,gc=1,vc=2;function yc(e,r,a,t,n,s){var i=a&gc,o=e.length,u=r.length;if(o!=u&&!(i&&u>o))return!1;var l=s.get(e),f=s.get(r);if(l&&f)return l==r&&f==e;var p=-1,c=!0,g=a&vc?new pc:void 0;for(s.set(e,r),s.set(r,e);++p<o;){var d=e[p],y=r[p];if(t)var m=i?t(y,d,p,r,e,s):t(d,y,p,e,r,s);if(m!==void 0){if(m)continue;c=!1;break}if(g){if(!hc(r,function(T,C){if(!dc(g,C)&&(d===T||n(d,T,a,t,s)))return g.push(C)})){c=!1;break}}else if(!(d===y||n(d,y,a,t,s))){c=!1;break}}return s.delete(e),s.delete(r),c}var ga=yc;function _c(e){var r=-1,a=Array(e.size);return e.forEach(function(t,n){a[++r]=[n,t]}),a}var $c=_c;function bc(e){var r=-1,a=Array(e.size);return e.forEach(function(t){a[++r]=t}),a}var mc=bc,_r=K,$r=ea,wc=F,Sc=ga,Tc=$c,Cc=mc,Ac=1,Oc=2,Pc="[object Boolean]",Ec="[object Date]",Lc="[object Error]",Rc="[object Map]",Mc="[object Number]",Ic="[object RegExp]",Fc="[object Set]",xc="[object String]",Gc="[object Symbol]",Dc="[object ArrayBuffer]",kc="[object DataView]",br=_r?_r.prototype:void 0,he=br?br.valueOf:void 0;function Nc(e,r,a,t,n,s,i){switch(a){case kc:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case Dc:return!(e.byteLength!=r.byteLength||!s(new $r(e),new $r(r)));case Pc:case Ec:case Mc:return wc(+e,+r);case Lc:return e.name==r.name&&e.message==r.message;case Ic:case xc:return e==r+"";case Rc:var o=Tc;case Fc:var u=t&Ac;if(o||(o=Cc),e.size!=r.size&&!u)return!1;var l=i.get(e);if(l)return l==r;t|=Oc,i.set(e,r);var f=Sc(o(e),o(r),t,n,s,i);return i.delete(e),f;case Gc:if(he)return he.call(e)==he.call(r)}return!1}var jc=Nc,Uc=kr,Bc=v;function Kc(e,r,a){var t=r(e);return Bc(e)?t:Uc(t,a(e))}var Hc=Kc;function qc(e,r){for(var a=-1,t=e==null?0:e.length,n=0,s=[];++a<t;){var i=e[a];r(i,a,e)&&(s[n++]=i)}return s}var Wc=qc;function zc(){return[]}var Qc=zc,Vc=Wc,Xc=Qc,Yc=Object.prototype,Zc=Yc.propertyIsEnumerable,mr=Object.getOwnPropertySymbols,Jc=mr?function(e){return e==null?[]:(e=Object(e),Vc(mr(e),function(r){return Zc.call(e,r)}))}:Xc,ep=Jc,rp=ra,ap=rp(Object.keys,Object),tp=ap,np=Le,sp=tp,ip=Object.prototype,op=ip.hasOwnProperty;function up(e){if(!np(e))return sp(e);var r=[];for(var a in Object(e))op.call(e,a)&&a!="constructor"&&r.push(a);return r}var lp=up,fp=ia,cp=lp,pp=N;function hp(e){return pp(e)?fp(e):cp(e)}var ke=hp,dp=Hc,gp=ep,vp=ke;function yp(e){return dp(e,vp,gp)}var _p=yp,wr=_p,$p=1,bp=Object.prototype,mp=bp.hasOwnProperty;function wp(e,r,a,t,n,s){var i=a&$p,o=wr(e),u=o.length,l=wr(r),f=l.length;if(u!=f&&!i)return!1;for(var p=u;p--;){var c=o[p];if(!(i?c in r:mp.call(r,c)))return!1}var g=s.get(e),d=s.get(r);if(g&&d)return g==r&&d==e;var y=!0;s.set(e,r),s.set(r,e);for(var m=i;++p<u;){c=o[p];var T=e[c],C=r[c];if(t)var Ne=i?t(C,T,c,r,e,s):t(T,C,c,e,r,s);if(!(Ne===void 0?T===C||n(T,C,a,t,s):Ne)){y=!1;break}m||(m=c=="constructor")}if(y&&!m){var H=e.constructor,q=r.constructor;H!=q&&"constructor"in e&&"constructor"in r&&!(typeof H=="function"&&H instanceof H&&typeof q=="function"&&q instanceof q)&&(y=!1)}return s.delete(e),s.delete(r),y}var Sp=wp,Tp=P,Cp=$,Ap=Tp(Cp,"DataView"),Op=Ap,Pp=P,Ep=$,Lp=Pp(Ep,"Promise"),Rp=Lp,Mp=P,Ip=$,Fp=Mp(Ip,"Set"),xp=Fp,ve=Op,ye=Ae,_e=Rp,$e=xp,be=Qr,va=I,j=qr,Sr="[object Map]",Gp="[object Object]",Tr="[object Promise]",Cr="[object Set]",Ar="[object WeakMap]",Or="[object DataView]",Dp=j(ve),kp=j(ye),Np=j(_e),jp=j($e),Up=j(be),A=va;(ve&&A(new ve(new ArrayBuffer(1)))!=Or||ye&&A(new ye)!=Sr||_e&&A(_e.resolve())!=Tr||$e&&A(new $e)!=Cr||be&&A(new be)!=Ar)&&(A=function(e){var r=va(e),a=r==Gp?e.constructor:void 0,t=a?j(a):"";if(t)switch(t){case Dp:return Or;case kp:return Sr;case Np:return Tr;case jp:return Cr;case Up:return Ar}return r});var Bp=A,de=Pe,Kp=ga,Hp=jc,qp=Sp,Pr=Bp,Er=v,Lr=Me,Wp=Ie,zp=1,Rr="[object Arguments]",Mr="[object Array]",W="[object Object]",Qp=Object.prototype,Ir=Qp.hasOwnProperty;function Vp(e,r,a,t,n,s){var i=Er(e),o=Er(r),u=i?Mr:Pr(e),l=o?Mr:Pr(r);u=u==Rr?W:u,l=l==Rr?W:l;var f=u==W,p=l==W,c=u==l;if(c&&Lr(e)){if(!Lr(r))return!1;i=!0,f=!1}if(c&&!f)return s||(s=new de),i||Wp(e)?Kp(e,r,a,t,n,s):Hp(e,r,u,a,t,n,s);if(!(a&zp)){var g=f&&Ir.call(e,"__wrapped__"),d=p&&Ir.call(r,"__wrapped__");if(g||d){var y=g?e.value():e,m=d?r.value():r;return s||(s=new de),n(y,m,a,t,s)}}return c?(s||(s=new de),qp(e,r,a,t,n,s)):!1}var Xp=Vp,Yp=Xp,Fr=S;function ya(e,r,a,t,n){return e===r?!0:e==null||r==null||!Fr(e)&&!Fr(r)?e!==e&&r!==r:Yp(e,r,a,t,ya,n)}var _a=ya,Zp=Pe,Jp=_a,eh=1,rh=2;function ah(e,r,a,t){var n=a.length,s=n,i=!t;if(e==null)return!s;for(e=Object(e);n--;){var o=a[n];if(i&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++n<s;){o=a[n];var u=o[0],l=e[u],f=o[1];if(i&&o[2]){if(l===void 0&&!(u in e))return!1}else{var p=new Zp;if(t)var c=t(l,f,u,e,r,p);if(!(c===void 0?Jp(f,l,eh|rh,t,p):c))return!1}}return!0}var th=ah,nh=w;function sh(e){return e===e&&!nh(e)}var $a=sh,ih=$a,oh=ke;function uh(e){for(var r=oh(e),a=r.length;a--;){var t=r[a],n=e[t];r[a]=[t,n,ih(n)]}return r}var lh=uh;function fh(e,r){return function(a){return a==null?!1:a[e]===r&&(r!==void 0||e in Object(a))}}var ba=fh,ch=th,ph=lh,hh=ba;function dh(e){var r=ph(e);return r.length==1&&r[0][2]?hh(r[0][0],r[0][1]):function(a){return a===e||ch(a,e,r)}}var gh=dh,vh=De;function yh(e,r,a){var t=e==null?void 0:vh(e,r);return t===void 0?a:t}var _h=yh;function $h(e,r){return e!=null&&r in Object(e)}var bh=$h,mh=da,wh=re,Sh=v,Th=Fe,Ch=Re,Ah=ue;function Oh(e,r,a){r=mh(r,e);for(var t=-1,n=r.length,s=!1;++t<n;){var i=Ah(r[t]);if(!(s=e!=null&&a(e,i)))break;e=e[i]}return s||++t!=n?s:(n=e==null?0:e.length,!!n&&Ch(n)&&Th(i,n)&&(Sh(e)||wh(e)))}var Ph=Oh,Eh=bh,Lh=Ph;function Rh(e,r){return e!=null&&Lh(e,r,Eh)}var Mh=Rh,Ih=_a,Fh=_h,xh=Mh,Gh=xe,Dh=$a,kh=ba,Nh=ue,jh=1,Uh=2;function Bh(e,r){return Gh(e)&&Dh(r)?kh(Nh(e),r):function(a){var t=Fh(a,e);return t===void 0&&t===r?xh(a,e):Ih(r,t,jh|Uh)}}var Kh=Bh;function Hh(e){return function(r){return r==null?void 0:r[e]}}var qh=Hh,Wh=De;function zh(e){return function(r){return Wh(r,e)}}var Qh=zh,Vh=qh,Xh=Qh,Yh=xe,Zh=ue;function Jh(e){return Yh(e)?Vh(Zh(e)):Xh(e)}var ed=Jh,rd=gh,ad=Kh,td=ae,nd=v,sd=ed;function id(e){return typeof e=="function"?e:e==null?td:typeof e=="object"?nd(e)?ad(e[0],e[1]):rd(e):sd(e)}var od=id,ud=Jr,ld=ke;function fd(e,r){return e&&ud(e,r,ld)}var cd=fd,pd=N;function hd(e,r){return function(a,t){if(a==null)return a;if(!pd(a))return e(a,t);for(var n=a.length,s=r?n:-1,i=Object(a);(r?s--:++s<n)&&t(i[s],s,i)!==!1;);return a}}var dd=hd,gd=cd,vd=dd,yd=vd(gd),_d=yd,$d=_d,bd=N;function md(e,r){var a=-1,t=bd(e)?Array(e.length):[];return $d(e,function(n,s,i){t[++a]=r(n,s,i)}),t}var wd=md;function Sd(e,r){var a=e.length;for(e.sort(r);a--;)e[a]=e[a].value;return e}var Td=Sd,xr=oe;function Cd(e,r){if(e!==r){var a=e!==void 0,t=e===null,n=e===e,s=xr(e),i=r!==void 0,o=r===null,u=r===r,l=xr(r);if(!o&&!l&&!s&&e>r||s&&i&&u&&!o&&!l||t&&i&&u||!a&&u||!n)return 1;if(!t&&!s&&!l&&e<r||l&&a&&n&&!t&&!s||o&&a&&n||!i&&n||!u)return-1}return 0}var Ad=Cd,Od=Ad;function Pd(e,r,a){for(var t=-1,n=e.criteria,s=r.criteria,i=n.length,o=a.length;++t<i;){var u=Od(n[t],s[t]);if(u){if(t>=o)return u;var l=a[t];return u*(l=="desc"?-1:1)}}return e.index-r.index}var Ed=Pd,ge=ca,Ld=De,Rd=od,Md=wd,Id=Td,Fd=na,xd=Ed,Gd=ae,Dd=v;function kd(e,r,a){r.length?r=ge(r,function(s){return Dd(s)?function(i){return Ld(i,s.length===1?s[0]:s)}:s}):r=[Gd];var t=-1;r=ge(r,Fd(Rd));var n=Md(e,function(s,i,o){var u=ge(r,function(l){return l(s)});return{criteria:u,index:++t,value:s}});return Id(n,function(s,i){return xd(s,i,a)})}var Nd=kd,jd=Kr,Ud=Nd,Bd=la,Gr=fa,Kd=Bd(function(e,r){if(e==null)return[];var a=r.length;return a>1&&Gr(e,r[0],r[1])?r=[]:a>2&&Gr(r[0],r[1],r[2])&&(r=[r[0]]),Ud(e,jd(r,1),[])}),Hd=Kd;const qd=b.getDefaultExportFromCjs(Hd);var Wd=F;function zd(e,r){for(var a=-1,t=e.length,n=0,s=[];++a<t;){var i=e[a],o=r?r(i):i;if(!a||!Wd(o,u)){var u=o;s[n++]=i===0?0:i}}return s}var Qd=zd,Vd=Qd;function Xd(e){return e&&e.length?Vd(e):[]}var Yd=Xd;const Zd=b.getDefaultExportFromCjs(Yd);class ma{constructor(){je(this,"config");this.config={api:{brand:"",cashierUrl:void 0,coinValueInCents:1,country:"",currency:"",game:"",gameHistoryUrl:"",homeUrl:void 0,integration:"",jurisdiction:"",playMode:"FUN",user:"",sessionId:"",lastRoundId:void 0},ui:{autoplay:{enabled:!1,rounds:{enabled:!1,showNoLimit:!1,showCustomLimit:!1,options:[]},lossLimit:{enabled:!1,showNoLimit:!1,showCustomLimit:!1,options:[]},winLimit:{enabled:!1,showNoLimit:!1,showCustomLimit:!1,options:[]},simple:!1,stopOnFeature:!1},cashier:{enabled:!1,balanceThreshold:[0]},feature:{allowTelemetry:!1,allowFullscreen:!1,allowQuickStop:!1,showCashier:!1,showClock:!1,showCloseGame:!1,showCurrency:!0,showFastPlay:!1,showFeatureBuy:!1,showFeatureIntro:!1,showFeatureOutro:!1,showFunModeBanner:!1,showHistory:!1,showLowWinCelebration:!1,showMaximumWin:!1,showNetPosition:!1,showPaylineLines:!1,showPaytable:!1,showRoundId:!1,showRtp:!1,showRules:!1,showSessionDuration:!1,showUi:!0},language:"en",minimumSpinDuration:0,requestTimeoutMs:1e4,incompleteGameResolution:{type:"NONE"},realityCheck:{sessionDurationPeriodFormat:"minutes",showCloseGame:!1,showHistory:!1,showNetPosition:!1,showSessionDuration:!1,showSumBets:!1,showSumWins:!1},skipInsufficientFundsCheck:!1,skipSplash:!1}}}}var wa=(e=>(e.BG="BG",e.CA="CA",e.CO="CO",e.CW="CW",e.DE="DE",e.DK="DK",e.ES="ES",e.GR="GR",e.IM="IM",e.IT="IT",e.MT="MT",e.NL="NL",e.NOT_APPLICABLE="NOT_APPLICABLE",e.PT="PT",e.SE="SE",e.SK="SK",e.UK="UK",e.UNKNOWN="UNKNOWN",e.US="US",e.SOCIAL="SOCIAL",e))(wa||{});const Dr={CA_BC:"CA",CA_ON:"CA",GER:"DE",HR:"ES",US_CT:"US",US_MI:"US",US_NJ:"US",USA:"US"},Jd=e=>{const r=e&&e in wa,a=e&&e in Dr;return!e||!(r||a)?"UNKNOWN":Dr[e]??e};function eg(e,r){function a(t,{maxCount:n}){const s=u=>(u==null?void 0:u.filter(l=>l<=n))??[],i=u=>(u==null?void 0:u.map(l=>Number(l)))??[],o=[...t,n];return $s([i,s,qd,Zd])(o)}switch(r){case"BG":return{autoplay:{lossLimit:{enabled:!0,showNoLimit:!1},winLimit:{enabled:!0}},feature:{showFastPlay:!1,allowQuickStop:!1},minimumSpinDuration:3};case"CA":return{autoplay:{enabled:!1},feature:{showFastPlay:!1,allowQuickStop:!1,showFeatureBuy:!1},minimumSpinDuration:2.5};case"CO":return{autoplay:{rounds:{showNoLimit:!1,showCustomLimit:!1,options:a(e.autoplay.rounds.options,{maxCount:100})}},feature:{showFastPlay:!1,allowQuickStop:!1},minimumSpinDuration:3};case"DE":return{autoplay:{enabled:!1},feature:{showFastPlay:!1,allowQuickStop:!1,showFeatureBuy:!1},minimumSpinDuration:5};case"ES":return{autoplay:{rounds:{showNoLimit:!1,showCustomLimit:!1,options:a(e.autoplay.rounds.options,{maxCount:100})}},feature:{showFastPlay:!1,allowQuickStop:!1},minimumSpinDuration:3};case"GR":return{feature:{showFastPlay:!1,allowQuickStop:!1,showFeatureBuy:!1},minimumSpinDuration:3};case"IT":return{feature:{showPaylineLines:!0}};case"NL":return{autoplay:{enabled:!1},feature:{showFeatureBuy:!1}};case"PT":return{autoplay:{rounds:{showNoLimit:!1,showCustomLimit:!1,options:a(e.autoplay.rounds.options,{maxCount:100})}},feature:{showFeatureBuy:!1,showFastPlay:!1,allowQuickStop:!1},minimumSpinDuration:3};case"SE":return{autoplay:{rounds:{showNoLimit:!1,showCustomLimit:!1,options:a(e.autoplay.rounds.options,{maxCount:100})}},feature:{showFastPlay:!1,allowQuickStop:!1},minimumSpinDuration:3};case"UK":return{autoplay:{enabled:!1},feature:{showFastPlay:!1,allowQuickStop:!1,showFeatureBuy:!1},minimumSpinDuration:2.5};case"US":return{feature:{showPaylineLines:!0}};case"MT":return{feature:{showClock:!0}};case"SOCIAL":return{feature:{showGameHistory:!1}}}return{}}class rg extends ma{async getConfig(){let r=this.config.ui;const a=await this.fetchOperatorConfig();r=pe({},r,a);const t=new URLSearchParams(window.location.search),n=JSON.parse(t.get("badgeParameters")??"{}");r=pe({},r,n);const s=Jd(this.config.api.jurisdiction),i=eg(r,s);return r=pe({},r,i),r}get mappedIntegration(){const r=this.config.api.integration.toLowerCase(),a=this.config.api.brand.toLowerCase();if(r==="spinomenal"){if(a.startsWith("gg-"))return"groovegaming"}else if(r==="pariplay"){if(a.startsWith("8x1"))return"pariplay-8x1"}else{if(/openbox-.*/.test(r))return"openbox";if(/oryx-.*/.test(r))return"oryx";if(/relax-.*/.test(r))return"relax"}return r}get mappedBrand(){const r=this.config.api.integration.toLowerCase(),a=this.config.api.brand.toLowerCase();return r==="bspot"&&this.config.api.playMode.toLowerCase()==="fun"?"demo":a}mapUiConfig(r){return r?{autoplay:{enabled:r.badge.autoplayType!==5,rounds:{enabled:r.badge.autoplayType!==5,showNoLimit:!1,showCustomLimit:!1,options:r.badge.autoplayRounds??[5,10,25,75,100]},lossLimit:{enabled:r.badge.autoplayType===1||r.badge.autoplayType===4,showNoLimit:r.badge.autoplayType===1,showCustomLimit:r.badge.autoplayType!==6,options:[5,25,50]},winLimit:{enabled:r.badge.autoplayType===1||r.badge.autoplayType===4,showNoLimit:!0,showCustomLimit:r.badge.autoplayType!==6,options:[10,20,75]},simple:r.badge.autoplayType===3},cashier:{enabled:r.badge.showQuickDeposit,balanceThreshold:r.badge.quickDepositBalanceThresholds},feature:{allowTelemetry:!0,allowFullscreen:r.defaults.fullscreen==="true",allowQuickStop:r.badge.minimumSpinDuration===0,showCashier:r.badge.showQuickDeposit,showClock:r.badge.showClock,showCloseGame:r.badge.showCloseGameButton,showCurrency:r.badge.showCurrency,showFastPlay:r.badge.showTurboButton,showFeatureBuy:r.badge.showHyperBonus,showFunModeBanner:r.badge.showFunBanner,showHistory:r.badge.showGameHistory,showPaylineLines:r.badge.showPaylineLines,showRoundId:r.badge.showRoundId,showRules:r.badge.showGameRules,showSessionDuration:r.badge.realityCheckShowSessionDuration,showUi:r.badge.showGameUi},minimumSpinDuration:r.badge.minimumSpinDuration,requestTimeoutMs:r.badge.requestTimeoutMs,incompleteGameResolution:{daysToAutoResolution:r.badge.incompleteGamesResolutionType===3?r.badge.daysToAutoResolution??90:void 0,type:r.badge.incompleteGamesResolutionType===2?"MANUAL":r.badge.incompleteGamesResolutionType===3?"AUTOMATIC":void 0},realityCheck:{sessionDurationPeriodFormat:r.badge.realityCheckPeriodFormat,showCloseGame:r.badge.realityCheckShowCloseGame,showHistory:r.badge.realityCheckShowHistoryLink,showNetPosition:r.badge.realityCheckShowNetGamingActivity,showSessionDuration:r.badge.realityCheckShowSessionDuration,showSumBets:r.badge.realityCheckShowSumBets,showSumWins:r.badge.realityCheckShowSumWins},skipInsufficientFundsCheck:r.badge.skipInsufficientFundsCheck,skipSplash:r.badge.loaderAutoContinue}:{}}async fetchOperatorConfig(){const r="https://awscdn.kalamba.net/games/games/build/",a=this.mappedIntegration,t=this.mappedBrand;let n={};try{n=await fetch(`${r}config/${a}/cage/${t}.json`).then(s=>s.json())}catch{try{n=await fetch(`${r}config/${a}/operator.json`).then(i=>i.json())}catch{n=await fetch(`${r}config/fun/operator.json`).then(o=>o.json())}}return this.mapUiConfig(n)}}exports.KalambaSdkConfigManager=rg;exports.KalambaSdkWrapper=Aa;exports.SdkConfigManager=ma;
|
package/dist/wrapper.d.ts
CHANGED
|
@@ -166,7 +166,7 @@ declare type OpenGameResponse = {
|
|
|
166
166
|
bet: {
|
|
167
167
|
available: Record<number, number[]>;
|
|
168
168
|
default: Bet;
|
|
169
|
-
max: number;
|
|
169
|
+
max: number | null;
|
|
170
170
|
last: Bet | null;
|
|
171
171
|
lastPaid: Bet | null;
|
|
172
172
|
};
|
|
@@ -197,6 +197,7 @@ declare type OpenGameResponse = {
|
|
|
197
197
|
};
|
|
198
198
|
uiMessages: unknown[];
|
|
199
199
|
win: {
|
|
200
|
+
max: number | null;
|
|
200
201
|
round: number;
|
|
201
202
|
total: number;
|
|
202
203
|
};
|
|
@@ -388,7 +389,6 @@ declare interface SdkConfig {
|
|
|
388
389
|
showUi: boolean;
|
|
389
390
|
};
|
|
390
391
|
language: string;
|
|
391
|
-
maximumBet?: number;
|
|
392
392
|
minimumSpinDuration: number;
|
|
393
393
|
requestTimeoutMs: number;
|
|
394
394
|
incompleteGameResolution: {
|
package/dist/wrapper.js
CHANGED
|
@@ -1530,7 +1530,6 @@ class Jd {
|
|
|
1530
1530
|
showUi: !0
|
|
1531
1531
|
},
|
|
1532
1532
|
language: "en",
|
|
1533
|
-
maximumBet: void 0,
|
|
1534
1533
|
minimumSpinDuration: 0,
|
|
1535
1534
|
requestTimeoutMs: 1e4,
|
|
1536
1535
|
incompleteGameResolution: {
|
|
@@ -1685,6 +1684,7 @@ function rg(e, r) {
|
|
|
1685
1684
|
}
|
|
1686
1685
|
},
|
|
1687
1686
|
feature: {
|
|
1687
|
+
showFeatureBuy: !1,
|
|
1688
1688
|
showFastPlay: !1,
|
|
1689
1689
|
allowQuickStop: !1
|
|
1690
1690
|
},
|
|
@@ -1826,7 +1826,6 @@ class ig extends Jd {
|
|
|
1826
1826
|
showSessionDuration: r.badge.realityCheckShowSessionDuration,
|
|
1827
1827
|
showUi: r.badge.showGameUi
|
|
1828
1828
|
},
|
|
1829
|
-
// maximumBet: undefined,
|
|
1830
1829
|
minimumSpinDuration: r.badge.minimumSpinDuration,
|
|
1831
1830
|
requestTimeoutMs: r.badge.requestTimeoutMs,
|
|
1832
1831
|
incompleteGameResolution: {
|