1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="39256a42-13ce-47c8-9b5a-0b53af812977",e._sentryDebugIdIdentifier="sentry-dbid-39256a42-13ce-47c8-9b5a-0b53af812977")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"3e585579c72cb3b8e5a502488fd94ec8006ecf9d"},(self.webpackChunknew_ec=self.webpackChunknew_ec||[]).push([[5653],{8034:(e,t,a)=>{a.r(t),a.d(t,{getAllGames:()=>getAllGames,getFavoriteGamesCollections:()=>getFavoriteGamesCollections,getGamesCollections:()=>getGamesCollections,getGamesData:()=>getGamesData,getLastPlayedGamesCollections:()=>getLastPlayedGamesCollections,getSelectedGames:()=>getSelectedGames,getSelectedGames_Tags:()=>getSelectedGames_Tags});var n=a(5109);function asyncGeneratorStep(e,t,a,n,l,s,o){try{var r=e[s](o),i=r.value}catch(e){return void a(e)}r.done?t(i):Promise.resolve(i).then(n,l)}function _asyncToGenerator(e){return function(){var t=this,a=arguments;return new Promise((function(n,l){var s=e.apply(t,a);function _next(e){asyncGeneratorStep(s,n,l,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(s,n,l,_next,_throw,"throw",e)}_next(void 0)}))}}function getAllGames(){return _getAllGames.apply(this,arguments)}function _getAllGames(){return _getAllGames=_asyncToGenerator((function*(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=yield Promise.all([a.e(4121),a.e(3672)]).then(a.bind(a,3672)),n=_CMS_MOBILE?_CMS_USERIP+"-allGamesM":_CMS_USERIP+"-allGamesD",l=_CMS_MOBILE?"mobile":"desktop",s="api/game-collections-v2/all-games/?country=".concat(_CMS_USERIP,"&device=").concat(l),o=t.getWalletURL(s);if(t.checkLocalStorage(n,e?1:43200)){if(e)return!0;var r=t.getFromLocalStorage(n)}else{if(yield t.startFetch(n))return yield getAllGames(e);r=yield t.getJSON(o);if(t.stopFetch(n),r.items)r={games:r.items,timestamp:(new Date).getTime()},t.setLocalStorageItem(n,r);else try{r=JSON.parse(localStorage.getItem(n))}catch(e){r={games:[]}}}return!!r.games&&(!e&&("pl"!=_CMS_USERIP||document.body.classList.contains("bf-bypass")?r.games:r.games.filter((e=>{var{provider:t}=e;return"bf games"!=t&&"bf-games"!=t}))))})),_getAllGames.apply(this,arguments)}function getGamesCollections(){return _getGamesCollections.apply(this,arguments)}function _getGamesCollections(){return _getGamesCollections=_asyncToGenerator((function*(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=yield Promise.all([a.e(4121),a.e(3672)]).then(a.bind(a,3672)),l=_CMS_MOBILE?_CMS_USERIP+"-gamesCollectionsM":_CMS_USERIP+"-gamesCollectionsD",s=_CMS_MOBILE?"mobile":"desktop",o="api/game-collections-v2/?country=".concat(_CMS_USERIP,"&device=").concat(s),r=n.getWalletURL(o);if(n.checkLocalStorage(l,t?1:43200))return!!t||n.getFromLocalStorage(l).collections;if(yield n.startFetch(l))return yield getGamesCollections(t);var i=yield n.getJSON(r);if(n.stopFetch(l),(null===(e=i)||void 0===e?void 0:e.length)>0)i={collections:i,timestamp:(new Date).getTime()},n.setLocalStorageItem(l,i);else try{i=JSON.parse(localStorage.getItem(l))}catch(e){i={games:[]}}return!t&&i.collections})),_getGamesCollections.apply(this,arguments)}function getLastPlayedGamesCollections(){return _getLastPlayedGamesCollections.apply(this,arguments)}function _getLastPlayedGamesCollections(){return(_getLastPlayedGamesCollections=_asyncToGenerator((function*(){var e=new n.o;if(!(yield e.isLoggedAsync()))return!1;var t=yield Promise.all([a.e(4121),a.e(3672)]).then(a.bind(a,3672)),l=t.getWalletURL("api/user/last-games/"),s=yield t.getJSON(l,void 0,[403]);return!(!s||0==s.length)&&{items:s=s.map((e=>e.id))}}))).apply(this,arguments)}function getFavoriteGamesCollections(){return _getFavoriteGamesCollections.apply(this,arguments)}function _getFavoriteGamesCollections(){return(_getFavoriteGamesCollections=_asyncToGenerator((function*(){var e=new n.o;if(!(yield e.isLoggedAsync()))return[];var t="favourite-games";if(window[t])return window[t];var l=yield Promise.all([a.e(4121),a.e(3672)]).then(a.bind(a,3672)),s=l.getWalletURL("user/get_favorite_games/","user"),o=yield l.getJSON(s,void 0,[404]);if(null==o||!o.games)return{items:[]};var r={items:o.games.map((e=>parseInt(e)))};return window[t]=r,r}))).apply(this,arguments)}function getSelectedGames(){return _getSelectedGames.apply(this,arguments)}function _getSelectedGames(){return(_getSelectedGames=_asyncToGenerator((function*(){try{if("1"!=_CMS_USER_SESSION_ACTIVE)return!1;var e=new Map,[t,n]=yield Promise.all([getLastPlayedGamesCollections(),getAllGames()]);if(null==t||!t.items||!n)return{items:[]};var{boosted:l,blocked:s}=(yield getSelectedGames_Tags())||{},{removeGamesIfNotInArraySortDefault:o}=yield Promise.all([a.e(4121),a.e(9442)]).then(a.bind(a,7313)),r=o(n,t.items);if(!r.length)return{items:[]};var i=n.filter((e=>!e.tags.some((e=>s.includes(e))))),c=new Map;r.forEach((t=>{var{tags:a}=t;a.forEach((t=>{if(!s.includes(t)){if(!e.has(t)){var a=i.filter((e=>e.tags.includes(t)));e.set(t,a.slice(0,20))}c.set(t,e.get(t))}}))}));var g={};
1Array.from(c.values()).forEach((e=>{e.forEach((e=>{var t=e.provider;g[t]||(g[t]=[]),g[t].push(e)}))}));for(var d=Object.keys(g),m=Array.from(c.values()).flat().length,u=[],f=0;f<m;f++){var _=d[f%d.length],y=g[_].shift();y&&!t.items.includes(y.id)&&u.push(y)}return l&&(u=((e,t)=>{var a=e.filter((e=>{var{tags:a}=e;return a.includes(t)}));if(a.length>=2){var n=a.splice(0,2);e.slice(0,6).filter((e=>n.includes(e))).length<2&&(e=e.filter((e=>!n.includes(e))),n.forEach(((t,a)=>{e.splice(Math.floor(3*Math.random())+3*a,0,t)})))}return e})(u,l)),{items:[...new Set(u.map((e=>{var{id:t}=e;return t})))].splice(0,24)}}catch(e){return console.error("An error occurred:",e),{items:[]}}}))).apply(this,arguments)}function getSelectedGames_Tags(){return _getSelectedGames_Tags.apply(this,arguments)}function _getSelectedGames_Tags(){return(_getSelectedGames_Tags=_asyncToGenerator((function*(){var{getAPIURL:e,getJSON:t}=yield Promise.all([a.e(4121),a.e(3672)]).then(a.bind(a,3672)),n=e("".concat(_CMS_LANGUAGE,"/json/selected-for-you-tags.json"),null,!0);return yield t(n)}))).apply(this,arguments)}function getGamesData(e){return _getGamesData.apply(this,arguments)}function _getGamesData(){return(_getGamesData=_asyncToGenerator((function*(e){var{getAPIURL:t,getJSON:n}=yield Promise.all([a.e(4121),a.e(3672)]).then(a.bind(a,3672)),l=t("".concat(_CMS_LANGUAGE,"/json/games-data/").concat(e),null,!0);return yield n(l)}))).apply(this,arguments)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.