@everymatrix/casino-my-games 1.19.6 → 1.20.0

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.
@@ -1307,7 +1307,7 @@ return 65541&t[0]&&(G=null),/*gamefavorite, isLoggedIn, favorites*/65541&t[0]&&(
1307
1307
  // Case mobile
1308
1308
  Pr(ce)&&"true"==ie?window.postMessage({type:"OpenGameFrame",gameId:e,gamefunmode:W,gamepagemodalurl:J,isMobile:Pr(ce),source:"GameThumbnail",identifier:"Lobby"},window.location.href):Pr(ce)&&"false"==ie&&window.postMessage({type:"ShowGameModal",gameId:e,isMobile:Pr(ce)},window.location.href),
1309
1309
  // Case desktop
1310
- Pr(ce)||"true"!=re?Pr(ce)||"false"!=re||window.postMessage({type:"ShowGameModal",gameId:e,isMobile:Pr(ce)},window.location.href):window.postMessage({type:"OpenGameFrame",gameId:e,gamefunmode:W,gamepagemodalurl:J,isMobile:Pr(ce),identifier:"Lobby"},window.location.href)},xe=e=>{let t="thumbnail";V?window.postMessage({type:"SetUnfavoredGame",id:e,triggerFactor:t},window.location.href):window.postMessage({type:"SetFavoredGame",id:e,triggerFactor:t},window.location.href)},_e=()=>{var e;e=I,hr.set(e)},Se=()=>{ee&&EventSource&&!l&&U&&Y&&(l=new EventSource(`${Q}/encoder/lobby/updates/${U}/${Y}`),l.addEventListener("message",Fe))},$e=()=>{l&&(l.close(),l=void 0)},Fe=async e=>{const{type:t,data:r}=e;let i;if("message"===t){if(r)try{i=JSON.parse(r)}catch(e){
1310
+ Pr(ce)||"true"!=re?Pr(ce)||"false"!=re||window.postMessage({type:"ShowGameModal",gameId:e,isMobile:Pr(ce)},window.location.href):window.postMessage({type:"OpenGameFrame",gameId:e,gamefunmode:W,gamepagemodalurl:J,isMobile:Pr(ce),identifier:"Lobby"},window.location.href)},xe=e=>{let t="thumbnail";V?window.postMessage({type:"SetUnfavoredGame",id:e,triggerFactor:t},window.location.href):window.postMessage({type:"SetFavoredGame",id:e,triggerFactor:t},window.location.href)},_e=()=>{var e;e=I,hr.set(e)},Se=()=>{ee&&EventSource&&!l&&U&&Y&&(l=new EventSource(`${Q}/v1/encoder/lobby/updates/${U}/${Y}`),l.addEventListener("message",Fe))},$e=()=>{l&&(l.close(),l=void 0)},Fe=async e=>{const{type:t,data:r}=e;let i;if("message"===t){if(r)try{i=JSON.parse(r)}catch(e){
1311
1311
  // eslint-disable-next-line no-console
1312
1312
  console.error("MESSAGE PARSING ERROR: ",e)}if(i){const{InternalTableId:e,MessageType:t,Results:// TakenSeats,
1313
1313
  r,Seats:// Roads, // for baccarat
@@ -1350,7 +1350,7 @@ return e[10]?xi:/*isLoading*/e[9]?void 0:wi}let i=r(t),a=i&&i(t);return{c(){n=f(
1350
1350
  // end custom styling area
1351
1351
  w[h]&&(w={[h]:[]});const F=()=>{n(4,g=!g),window.postMessage({type:"FilterOpened"},window.location.href)},C=e=>{let t=localStorage.getItem("vendorFiltersByCategory");e.isFilterSelected=!e.isFilterSelected,b.length&&0!=b.filter((t=>t.name===e.name)).length?n(6,b=b.filter((t=>t.name!==e.name))):b.push(e),null==t?localStorage.setItem("vendorFiltersByCategory",JSON.stringify(w={[h]:b.map((e=>e.id))})):(t=JSON.parse(t),t[h]=b.map((e=>e.id)),localStorage.setItem("vendorFiltersByCategory",JSON.stringify(t))),window.postMessage({type:"ApplyFilters",origin:"filters"},window.location.href),E()},E=()=>{
1352
1352
  // update filters value
1353
- n(7,x=b.length===v.length||0==b.length),n(8,_=b.length)},M=()=>{const e=new URL(`${a}/casino/vendors`);n(4,g=!1),e.searchParams.append("fields","id,name,logo,subVendors,games"),e.searchParams.append("language",o),e.searchParams.append("datasource",s),e.searchParams.append("platform",Ir(y)),(h.match(/\$/g)||[]).length>1?(e.searchParams.append("filter",`games(subGroups=${h})`),e.searchParams.append("subVendors",`games(subGroups=${h})`)):e.searchParams.append("filter",`games(groups=${h})`),(e=>{n(9,S=!0),new Promise(((t,r)=>{fetch(e).then((e=>e.json())).then((e=>{e=e.items,t(e.items),n(6,b=[]);let r=JSON.parse(localStorage.getItem("vendorFiltersByCategory"));e.forEach((e=>{var t;r||(r={currentCategoryId:[]}),(null===(t=r[h])||void 0===t?void 0:t.indexOf(e.id))>=0?(e.isFilterSelected=!0,b.push(e)):e.isFilterSelected=!1})),n(5,v=e),
1353
+ n(7,x=b.length===v.length||0==b.length),n(8,_=b.length)},M=()=>{const e=new URL(`${a}/v1/casino/vendors`);n(4,g=!1),e.searchParams.append("fields","id,name,logo,subVendors,games"),e.searchParams.append("language",o),e.searchParams.append("datasource",s),e.searchParams.append("platform",Ir(y)),(h.match(/\$/g)||[]).length>1?(e.searchParams.append("filter",`games(subGroups=${h})`),e.searchParams.append("subVendors",`games(subGroups=${h})`)):e.searchParams.append("filter",`games(groups=${h})`),(e=>{n(9,S=!0),new Promise(((t,r)=>{fetch(e).then((e=>e.json())).then((e=>{e=e.items,t(e.items),n(6,b=[]);let r=JSON.parse(localStorage.getItem("vendorFiltersByCategory"));e.forEach((e=>{var t;r||(r={currentCategoryId:[]}),(null===(t=r[h])||void 0===t?void 0:t.indexOf(e.id))>=0?(e.isFilterSelected=!0,b.push(e)):e.isFilterSelected=!1})),n(5,v=e),
1354
1354
  // needed to force the update of the filters value
1355
1355
  E()})).catch((e=>{console.error(e),n(10,$=!0),r(e)})).finally((()=>{n(9,S=!1)}))}))})(e)},L=()=>{n(6,b=[]),localStorage.setItem("vendorFiltersByCategory",JSON.stringify(w={[h]:b.map((e=>e.id))})),v.forEach((e=>e.isFilterSelected=!1)),
1356
1356
  // this reassignation of the pointer value is required in order to have Svelte trigger a re-render
@@ -1469,7 +1469,7 @@ let he=new IntersectionObserver((e=>{e.forEach((async e=>{let t=e.target.gameid,
1469
1469
  e.isIntersecting?(1.2*r>q&&fe(C),n(36,le[t]=1,le)):n(36,le[t]=0,le)}))}));
1470
1470
  // Start favored games section
1471
1471
  const me=(e,t,r)=>{n(21,j=!0);let i="",a="",s=JSON.parse(localStorage.getItem("vendorFiltersByCategory")),o=JSON.parse(localStorage.getItem("vendorSortingBy")),c=g.replace(/.$/,"2");// @TODO remove after we migrate with all endpoints to v2 - hack for the endpoint since the filtering of categories functionality was developed only for the v2 api
1472
- return(C.match(/\$/g)||[]).length>1?(i=C.split("$").slice(0,2).join("$"),a=new URL(`${c}/casino/groups/${y}/${i}/subGroups`)):a=new URL(`${c}/casino/groups/${y}/${C}`),new Promise(((e,i)=>{if(a.searchParams.delete("pagination"),a.searchParams.append("expand","games(vendor)"),a.searchParams.append("fields","id,name,games"),a.searchParams.append("platform",Ir(Z)),a.searchParams.append("pagination",`games(offset=${t},limit=${r})`),a.searchParams.append("language",v),
1472
+ return(C.match(/\$/g)||[]).length>1?(i=C.split("$").slice(0,2).join("$"),a=new URL(`${c}/v2/casino/groups/${y}/${i}/subGroups`)):a=new URL(`${c}/v2/casino/groups/${y}/${C}`),new Promise(((e,i)=>{if(a.searchParams.delete("pagination"),a.searchParams.append("expand","games(vendor)"),a.searchParams.append("fields","id,name,games"),a.searchParams.append("platform",Ir(Z)),a.searchParams.append("pagination",`games(offset=${t},limit=${r})`),a.searchParams.append("language",v),
1473
1473
  // if vendor filters are active, get filtered games
1474
1474
  window.postMessage({type:"CategoryVendors",categoryid:C},window.location.href),s&&s[C])if(s[C].length&&!1===V&&!1===ae){let e="";n(30,ne=!0),s[C].forEach((t=>{e+=e?`,games(vendor(id=${t}))`:`games(vendor(id=${t}))`})),a.searchParams.append("filter",(s&&s[C].length<2?"$and":"$or")+`(${e})`)}else n(30,ne=!1);o&&(o[C]?o[C]&&"All"!=o[C]&&("isNew"==o[C]||"advancedTags(name(hot))"==o[C]?(a.searchParams.append("sortedField",`games(${o[C]})`),a.searchParams.append("orderBy","DES")):a.searchParams.append("sortedField",`games(${o[C]})`)):ue&&"All"!=ue&&("advancedTags(name(hot))"==ue||"isNew"==ue?(a.searchParams.append("sortedField",`games(${ue})`),a.searchParams.append("orderBy","DES")):a.searchParams.append("sortedField",`games(${ue})`))),fetch(a).then((e=>e.json())).then((t=>{n(21,j=!1),(C.match(/\$/g)||[]).length>1&&(t=t.items.filter((e=>{if(e.id==C)return e}))[0]),n(52,p=!0),n(22,W=!1),l=t.games.total,e(t)}),(e=>{n(22,W=!0),console.error(e),i(e)}))}))},pe=e=>{if(e.data)switch(e.data.type){case"MostPlayedData":"MOSTPLAYED"==C&&(n(27,J=!1),n(23,V=!1),n(26,X=!1),n(25,K=e.data.mostPlayedGames),n(24,s={id:"MOSTPLAYED",name:"Most Played Games",games:{count:e.data.mostPlayedGames.length,total:e.data.mostPlayedGames.length,items:e.data.mostPlayedGames}})),n(21,j=!1);break;case"LastPlayedData":"LASTPLAYED"==C&&(n(27,J=!1),n(23,V=!1),n(26,X=!1),n(25,K=e.data.lastPlayedGames),n(24,s={id:"LASTPLAYED",name:"Last Played Games",games:{count:e.data.lastPlayedGames.length,total:e.data.lastPlayedGames.length,items:e.data.lastPlayedGames}})),n(21,j=!1);break;case"CustomOperatorData":e.data.operatordetail;break;case"RecentSearchData":n(27,J=!0),n(28,Q=!0),e.data.searchData.length>0?(n(25,K=e.data.searchData),n(31,re=!0),K&&K.forEach((e=>{e.isFavorite=ge(e.id)}))):(n(25,K=[]),n(31,re=!1));break;case"OutOfRecentSearches":n(27,J=!1),n(28,Q=!1);break;case"SearchData":n(27,J=!0),n(28,Q=!1),n(25,K=e.data.searchData.items||[]),n(29,te=!0),e.data.receivedFavoriteResults&&(d=e.data.receivedFavoriteResults.items),K&&K.forEach((e=>{e.isFavorite=ge(e.id)}));break;case`CategoryData_${C}`:n(27,J=!1),n(23,V=!0),n(1,D="false"),n(2,O="false"),n(26,X=!0),n(29,te=!1),se=!1,e.data.receivedFavoriteResults&&(d=e.data.receivedFavoriteResults.items),me(e.data.categoryId,0,e.data.visiblegames).then((e=>{n(24,s=e),n(25,K=s.games.items),K&&K.forEach((e=>{e.isFavorite=ge(e.id)}))}));break;case"CategoryChange":q=20;break;case"ApplySorter":n(0,C=e.data.itemId),ue=e.data.sortBy,me(0,0,q).then((e=>{n(24,s=e),n(25,K=s.games.items),n(26,X=!1)}));break;case"CategoryUpdate":n(27,J=!1),n(23,V=!1),n(29,te=!1),se=!0,n(0,C=e.data.itemId),"MOSTPLAYED"!==C&&n(26,X=!1),"true"!==A&&me(0,0,q).then((t=>{n(24,s=t),s.games.items.forEach((e=>{e.isFavorite=ge(e.id)})),n(25,K=s.games.items),n(26,X=!1),
1475
1475
  // @TODO: replace this quick fix - when there are only a few category games, the view scrolls to the footer
@@ -1477,7 +1477,7 @@ K.length<10&&0==e.data.origin&&(ee=!0,setTimeout((()=>{window.postMessage({type:
1477
1477
  // separate favorites array into mobile and desktop favorites
1478
1478
  function(e,t){let n=window.navigator.userAgent;
1479
1479
  // make sure to display favored games specific to the platform used
1480
- return Pr(n)?e.filter((e=>{if(e.gameModel&&(e.gameModel.platform.includes("iPad")||e.gameModel.platform.includes("iPhone")||e.gameModel.platform.includes("Android")))return e})):e.filter((e=>{if(e.gameModel&&e.gameModel.platform.includes("PC"))return e}))}(t,de.items),de),n(38,de.name="Favorites",de),n(35,ae=!0),n(21,j=!1));break;case"UserSessionID":i=e.data.session,a=e.data.userID,"true"==x&&a&&a.length&&i&&i.length>0&&((e,t)=>{n(21,j=!0);let r={method:"GET",headers:{"X-SessionID":t}};new Promise(((t,i)=>{fetch(e,r).then((e=>e.json())).then((e=>{n(21,j=!1),d=e?e.items:[],K.forEach((e=>{e.isFavorite=ge(e.id)}));let r=K;n(25,K=void 0),n(25,K=r),t(d)})).catch((e=>{console.error(e),i(e)}))}))})(`${g}/player/${a}/favorites/`,i)}},fe=e=>{q+=1,n(32,ie=!0),q<=l&&me(0,0,q).then((e=>{n(24,s=e),
1480
+ return Pr(n)?e.filter((e=>{if(e.gameModel&&(e.gameModel.platform.includes("iPad")||e.gameModel.platform.includes("iPhone")||e.gameModel.platform.includes("Android")))return e})):e.filter((e=>{if(e.gameModel&&e.gameModel.platform.includes("PC"))return e}))}(t,de.items),de),n(38,de.name="Favorites",de),n(35,ae=!0),n(21,j=!1));break;case"UserSessionID":i=e.data.session,a=e.data.userID,"true"==x&&a&&a.length&&i&&i.length>0&&((e,t)=>{n(21,j=!0);let r={method:"GET",headers:{"X-SessionID":t}};new Promise(((t,i)=>{fetch(e,r).then((e=>e.json())).then((e=>{n(21,j=!1),d=e?e.items:[],K.forEach((e=>{e.isFavorite=ge(e.id)}));let r=K;n(25,K=void 0),n(25,K=r),t(d)})).catch((e=>{console.error(e),i(e)}))}))})(`${g}/v1/player/${a}/favorites/`,i)}},fe=e=>{q+=1,n(32,ie=!0),q<=l&&me(0,0,q).then((e=>{n(24,s=e),
1481
1481
  // @TODO categoryData type fix
1482
1482
  /**
1483
1483
  * This check is needed to prevent requests with less items
@@ -1497,7 +1497,7 @@ function $a(t){let n,r,a,s,o;return{c(){n=f("div"),r=f("casino-games-category-se
1497
1497
  /*div_binding*/t[18](n),s||(u=a=/*getFavoredGames*/t[16].call(null,r,(/*endpoint*/t[2],/*userid*/t[1],/*session*/t[0],/*userid*/t[1])),o=u&&i(u.destroy)?u.destroy:e,s=!0)},p(e,[t]){/*session*/1&t&&_(r,"session",/*session*/e[0]),/*userid*/2&t&&_(r,"userid",/*userid*/e[1]),/*endpoint*/4&t&&_(r,"endpoint",/*endpoint*/e[2]),/*datasource*/8&t&&_(r,"datasource",/*datasource*/e[3]),/*lang*/32&t&&_(r,"lang",/*lang*/e[5]),/*currency*/16&t&&_(r,"currency",/*currency*/e[4]),/*favorites*/8192&t&&_(r,"favorites",/*favorites*/e[13]),/*clientstyling*/64&t&&_(r,"clientstyling",/*clientstyling*/e[6]),/*clientstylingurl*/128&t&&_(r,"clientstylingurl",/*clientstylingurl*/e[7]),/*livecasino*/256&t&&_(r,"livecasino",/*livecasino*/e[8]),/*visiblegames*/4096&t&&_(r,"visiblegames",/*visiblegames*/e[12]),/*gamepagemodalurl*/2048&t&&_(r,"gamepagemodalurl",/*gamepagemodalurl*/e[11]),/*integratedgameframedesktop*/1024&t&&_(r,"integratedgameframedesktop",/*integratedgameframedesktop*/e[10]),/*integratedgameframemobile*/512&t&&_(r,"integratedgameframemobile",/*integratedgameframemobile*/e[9]),/*casinomygames*/16384&t&&_(r,"casinomygames",/*casinomygames*/e[14]),a&&i(a.update)&&/*endpoint, userid, session*/7&t&&a.update.call(null,(/*endpoint*/e[2],/*userid*/e[1],/*session*/e[0],/*userid*/e[1]))},i:e,o:e,d(e){e&&m(n)
1498
1498
  /*div_binding*/,t[18](null),s=!1,o()}}}function Fa(e,t,n){let r,i,{endpoint:a=""}=t,{datasource:s=""}=t,{currency:o=""}=t,{lang:l=""}=t,{session:c=""}=t,{userid:u=""}=t,{clientstyling:d=""}=t,{clientstylingurl:h=""}=t,{livecasino:m="false"}=t,{integratedgameframemobile:p="false"}=t,{integratedgameframedesktop:f="false"}=t,{gamepagemodalurl:g="false"}=t,{visiblegames:y=""}=t,{favorites:v=""}=t,{categoryid:b=""}=t,{casinomygames:w="false"}=t,x=[];!function({withLocale:e,translations:t}){hr.subscribe((n=>{null==n&&(Bn.set(t),hr.set(e))}));// maybe we will need this to make sure that the i18n is set up only once
1499
1499
  /*dictionary.set(translations);
1500
- locale.set(_locale);*/}({withLocale:"en",translations:{}});const _=e=>{if(e.data)switch(e.data.type){case"UserSessionID":n(0,c=e.data.session),n(1,u=e.data.userID),u&&u.length&&c&&c.length>0&&S(a,c,u);break;case"SetUnfavoredGame":F(`${a}/player/${u}/favorites`,c,u,e.data.id,e.data.triggerFactor);break;case"SetFavoredGame":$(`${a}/player/${u}/favorites`,c,u,e.data.id,e.data.triggerFactor);break;case"GetFavoredGame":u&&u.length&&c&&c.length>0&&S(a,c,u)}};let S=(e,t,n)=>{if("true"==v&&c&&n){fetch(`${e}/player/${n}/favorites/`,{method:"GET",headers:{"X-SessionID":t}}).then((e=>e.json())).then((e=>(i=e,i&&(E(),window.postMessage({type:"UpdateCategoryFavoriteGames",receivedFavoriteResults:i,favStadalone:!0},window.location.href),M(i.items)),i))).then((e=>e)).catch((e=>{console.error(e)}))}},$=(e,t,n,r,i)=>{
1500
+ locale.set(_locale);*/}({withLocale:"en",translations:{}});const _=e=>{if(e.data)switch(e.data.type){case"UserSessionID":n(0,c=e.data.session),n(1,u=e.data.userID),u&&u.length&&c&&c.length>0&&S(a,c,u);break;case"SetUnfavoredGame":F(`${a}/v1/player/${u}/favorites`,c,u,e.data.id,e.data.triggerFactor);break;case"SetFavoredGame":$(`${a}/v1/player/${u}/favorites`,c,u,e.data.id,e.data.triggerFactor);break;case"GetFavoredGame":u&&u.length&&c&&c.length>0&&S(a,c,u)}};let S=(e,t,n)=>{if("true"==v&&c&&n){fetch(`${e}/player/${n}/favorites/`,{method:"GET",headers:{"X-SessionID":t}}).then((e=>e.json())).then((e=>(i=e,i&&(E(),window.postMessage({type:"UpdateCategoryFavoriteGames",receivedFavoriteResults:i,favStadalone:!0},window.location.href),M(i.items)),i))).then((e=>e)).catch((e=>{console.error(e)}))}},$=(e,t,n,r,i)=>{
1501
1501
  // When adding new favored games, the api requires an array with all the current favored games due to the fact that it overwrites the old ones with the ones found in the body of the POST request
1502
1502
  x.includes(r)||x.push(r);let a={items:x},s={method:"POST",headers:{"X-SessionID":t,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(a)};fetch(e,s).then((e=>e.json())).then((()=>{window.postMessage({type:`AddFavoriteThumbnail_${r}`},window.location.href),C(e,t)})).catch((e=>{console.error("Err",e)}))};const F=(e,t,n,r,i)=>{x.includes(r)&&(x=x.filter((e=>e!=r))),fetch(`${e}/${r}`,{method:"DELETE",headers:{"X-SessionID":t}}).then((e=>e.json())).then((()=>{window.postMessage({type:`RemoveFavoriteThumbnail_${r}`},window.location.href),C(e,t)}))};let C=(e,t)=>{fetch(e,{method:"GET",headers:{"X-SessionID":t}}).then((e=>e.json())).then((e=>(i=e,E(),i&&window.postMessage({type:"UpdateCategoryFavoriteGames",receivedFavoriteResults:i,favStadalone:!0},window.location.href),i))).catch((e=>{console.error(e)}))};const E=()=>{window.postMessage({type:"ShowFavoriteSection",receivedFavoriteResults:i},window.location.href)},M=(e=[])=>(
1503
1503
  // construct favorite array used to check if game id is not already present in fav list
@@ -1507,13 +1507,13 @@ x=[],e.length>0&&e.forEach((e=>{x.push(e.id)})),x);return G((()=>(window.addEven
1507
1507
  function ka(e){let t,n,r=/*$_*/e[17]("noRecentGames")+"";return{c(){t=f("p"),n=y(r),x(t,"class","SearchLoading")},m(e,r){h(e,t,r),d(t,n)},p(e,t){/*$_*/131072&t[0]&&r!==(r=/*$_*/e[17]("noRecentGames")+"")&&S(n,r)},d(e){e&&m(t)}}}function Ma(t){let n,r;function i(e,t){/*lastPlayedEmpty*/
1508
1508
  return e[16]?ka:Ea}let a=i(t),s=a(t);return{c(){n=f("div"),r=f("div"),s.c(),this.c=e,x(r,"class","CasinoLastPlayedSection"),x(n,"class","CasinoGamesCategorySectionContainer")},m(e,i){h(e,n,i),d(n,r),s.m(r,null),
1509
1509
  /*div1_binding*/t[23](n)},p(e,t){a===(a=i(e))&&s?s.p(e,t):(s.d(1),s=a(e),s&&(s.c(),s.m(r,null)))},i:e,o:e,d(e){e&&m(n),s.d(),
1510
- /*div1_binding*/t[23](null)}}}function La(e,t,n){let r;u(e,Tr,(e=>n(17,r=e)));let i,a,{endpoint:s=""}=t,{datasource:o=""}=t,{currency:l=""}=t,{lang:c=""}=t,{session:d=""}=t,{userid:h=""}=t,{clientstyling:m=""}=t,{clientstylingurl:p=""}=t,{translationurl:f=""}=t,{livecasino:g="false"}=t,{integratedgameframemobile:y="false"}=t,{integratedgameframedesktop:v="false"}=t,{gamepagemodalurl:b="false"}=t,{visiblegames:w=""}=t,{favorites:x=""}=t,{lastplayedperiod:_="Last30Days"}=t,{lastplayedorder:S=""}=t,{lastplayedlimit:$=""}=t,{casinomygames:F="false"}=t,{lastplayedunique:C="true"}=t,G=window.navigator.userAgent,E=!1,M=[];Object.keys(Ga).forEach((e=>{Ca(e,Ga[e])}));const L=()=>{new Promise(((e,t)=>{let n=new URL(`${s}/player/${h}/games/last-played`);n.searchParams.append("unique",C),n.searchParams.append("limit",$),n.searchParams.append("order",S),n.searchParams.append("period",_),"PC"===Ir(G)?n.searchParams.append("device","Desktop"):n.searchParams.append("device","Mobile"),i=g?n:n.href,fetch(i).then((e=>e.json())).then((t=>{t.items=t.items.filter((e=>{let n=!0;return"OddsMatrix2"==e.gameCode&&(t.count--,n=!1),n})),e(t),window.postMessage({type:"AddNewCategory",category:{name:"Last Played",id:"LASTPLAYED"}},window.location.href),window.postMessage({type:"LastPlayedGames",data:t},window.location.href)})).catch((e=>{console.error(e),t(e)}))})).then((e=>{if(window.postMessage({type:"GetFavoredGame"},window.location.href),e.count>0){let t=[];e.items.forEach((e=>{let n=new URL(`${s}/casino/games/${e.gameId}`);n.searchParams.append("datasource",o),t.push(fetch(n.href).then((e=>e.json())))})),Promise.all(t).then((e=>{M=e.filter((e=>!("error"in e))).map((e=>e[0])),"true"===F&&(M=M.slice(0,JSON.parse(w))),window.postMessage({type:"LastPlayedData",lastPlayedGames:M},window.location.href)}))}else n(16,E=!0)}))},T=()=>{var e;e=c,hr.set(e)};return e.$$set=e=>{"endpoint"in e&&n(0,s=e.endpoint),"datasource"in e&&n(1,o=e.datasource),"currency"in e&&n(2,l=e.currency),"lang"in e&&n(3,c=e.lang),"session"in e&&n(4,d=e.session),"userid"in e&&n(5,h=e.userid),"clientstyling"in e&&n(6,m=e.clientstyling),"clientstylingurl"in e&&n(7,p=e.clientstylingurl),"translationurl"in e&&n(18,f=e.translationurl),"livecasino"in e&&n(8,g=e.livecasino),"integratedgameframemobile"in e&&n(9,y=e.integratedgameframemobile),"integratedgameframedesktop"in e&&n(10,v=e.integratedgameframedesktop),"gamepagemodalurl"in e&&n(11,b=e.gamepagemodalurl),"visiblegames"in e&&n(12,w=e.visiblegames),"favorites"in e&&n(13,x=e.favorites),"lastplayedperiod"in e&&n(19,_=e.lastplayedperiod),"lastplayedorder"in e&&n(20,S=e.lastplayedorder),"lastplayedlimit"in e&&n(21,$=e.lastplayedlimit),"casinomygames"in e&&n(14,F=e.casinomygames),"lastplayedunique"in e&&n(22,C=e.lastplayedunique)},e.$$.update=()=>{/*endpoint, userid, lang*/41&e.$$.dirty[0]&&s&&h&&c&&L(),/*translationurl*/262144&e.$$.dirty[0]&&f&&fetch(f).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Ca(t,e[t])}))})).catch((e=>{console.log(e)})),/*clientstyling, customStylingContainer*/32832&e.$$.dirty[0]&&m&&a&&(()=>{let e=document.createElement("style");e.innerHTML=m,a.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/32896&e.$$.dirty[0]&&p&&a&&(()=>{let e=document.createElement("style");fetch(new URL(p)).then((e=>e.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{a.appendChild(e)}),1)}))})(),/*lang*/8&e.$$.dirty[0]&&c&&T()},[s,o,l,c,d,h,m,p,g,y,v,b,w,x,F,a,E,r,f,_,S,$,C,function(e){k[e?"unshift":"push"]((()=>{a=e,n(15,a)}))}]}function Ta(e,t){zn(e,t)}!customElements.get("casino-last-played-section")&&customElements.define("casino-last-played-section",class extends z{constructor(e){super();const t=document.createElement("style");t.textContent="*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CasinoLastPlayedSection{background:var(--emfe-w-casino-color-bg, var(--emfe-w-color-background, #07072A));color:var(--emfe-w-casino-typography, var(--emfe-w-color-white, #FFFFFF))}",this.shadowRoot.appendChild(t),Y(this,{target:this.shadowRoot,props:F(this.attributes),customElement:!0},La,Ma,a,{endpoint:0,datasource:1,currency:2,lang:3,session:4,userid:5,clientstyling:6,clientstylingurl:7,translationurl:18,livecasino:8,integratedgameframemobile:9,integratedgameframedesktop:10,gamepagemodalurl:11,visiblegames:12,favorites:13,lastplayedperiod:19,lastplayedorder:20,lastplayedlimit:21,casinomygames:14,lastplayedunique:22},null,[-1,-1]),e&&(e.target&&h(e.target,this,e.anchor),e.props&&(this.$set(e.props),R()))}static get observedAttributes(){return["endpoint","datasource","currency","lang","session","userid","clientstyling","clientstylingurl","translationurl","livecasino","integratedgameframemobile","integratedgameframedesktop","gamepagemodalurl","visiblegames","favorites","lastplayedperiod","lastplayedorder","lastplayedlimit","casinomygames","lastplayedunique"]}get endpoint(){return this.$$.ctx[0]}set endpoint(e){this.$$set({endpoint:e}),R()}get datasource(){return this.$$.ctx[1]}set datasource(e){this.$$set({datasource:e}),R()}get currency(){return this.$$.ctx[2]}set currency(e){this.$$set({currency:e}),R()}get lang(){return this.$$.ctx[3]}set lang(e){this.$$set({lang:e}),R()}get session(){return this.$$.ctx[4]}set session(e){this.$$set({session:e}),R()}get userid(){return this.$$.ctx[5]}set userid(e){this.$$set({userid:e}),R()}get clientstyling(){return this.$$.ctx[6]}set clientstyling(e){this.$$set({clientstyling:e}),R()}get clientstylingurl(){return this.$$.ctx[7]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),R()}get translationurl(){return this.$$.ctx[18]}set translationurl(e){this.$$set({translationurl:e}),R()}get livecasino(){return this.$$.ctx[8]}set livecasino(e){this.$$set({livecasino:e}),R()}get integratedgameframemobile(){return this.$$.ctx[9]}set integratedgameframemobile(e){this.$$set({integratedgameframemobile:e}),R()}get integratedgameframedesktop(){return this.$$.ctx[10]}set integratedgameframedesktop(e){this.$$set({integratedgameframedesktop:e}),R()}get gamepagemodalurl(){return this.$$.ctx[11]}set gamepagemodalurl(e){this.$$set({gamepagemodalurl:e}),R()}get visiblegames(){return this.$$.ctx[12]}set visiblegames(e){this.$$set({visiblegames:e}),R()}get favorites(){return this.$$.ctx[13]}set favorites(e){this.$$set({favorites:e}),R()}get lastplayedperiod(){return this.$$.ctx[19]}set lastplayedperiod(e){this.$$set({lastplayedperiod:e}),R()}get lastplayedorder(){return this.$$.ctx[20]}set lastplayedorder(e){this.$$set({lastplayedorder:e}),R()}get lastplayedlimit(){return this.$$.ctx[21]}set lastplayedlimit(e){this.$$set({lastplayedlimit:e}),R()}get casinomygames(){return this.$$.ctx[14]}set casinomygames(e){this.$$set({casinomygames:e}),R()}get lastplayedunique(){return this.$$.ctx[22]}set lastplayedunique(e){this.$$set({lastplayedunique:e}),R()}});const Pa={en:{noGames:"No games in most played"},"zh-hk":{noGames:"No games in most played"},de:{noGames:"No games in most played"},it:{noGames:"No games in most played"},fr:{noGames:"No games in most played"},es:{noGames:"No hay juegos en más jugados."},tr:{noGames:"No games in most played"},ru:{noGames:"No games in most played"},ro:{noGames:"No games in most played"},hr:{noGames:"No games in most played"},hu:{noGames:"No games in most played"},pl:{noGames:"No games in most played"},pt:{noGames:"No games in most played"},sl:{noGames:"No games in most played"},sr:{noGames:"No games in most played"}};
1510
+ /*div1_binding*/t[23](null)}}}function La(e,t,n){let r;u(e,Tr,(e=>n(17,r=e)));let i,a,{endpoint:s=""}=t,{datasource:o=""}=t,{currency:l=""}=t,{lang:c=""}=t,{session:d=""}=t,{userid:h=""}=t,{clientstyling:m=""}=t,{clientstylingurl:p=""}=t,{translationurl:f=""}=t,{livecasino:g="false"}=t,{integratedgameframemobile:y="false"}=t,{integratedgameframedesktop:v="false"}=t,{gamepagemodalurl:b="false"}=t,{visiblegames:w=""}=t,{favorites:x=""}=t,{lastplayedperiod:_="Last30Days"}=t,{lastplayedorder:S=""}=t,{lastplayedlimit:$=""}=t,{casinomygames:F="false"}=t,{lastplayedunique:C="true"}=t,G=window.navigator.userAgent,E=!1,M=[];Object.keys(Ga).forEach((e=>{Ca(e,Ga[e])}));const L=()=>{new Promise(((e,t)=>{let n=new URL(`${s}/v1/player/${h}/games/last-played`);n.searchParams.append("unique",C),n.searchParams.append("limit",$),n.searchParams.append("order",S),n.searchParams.append("period",_),"PC"===Ir(G)?n.searchParams.append("device","Desktop"):n.searchParams.append("device","Mobile"),i=g?n:n.href,fetch(i).then((e=>e.json())).then((t=>{t.items=t.items.filter((e=>{let n=!0;return"OddsMatrix2"==e.gameCode&&(t.count--,n=!1),n})),e(t),window.postMessage({type:"AddNewCategory",category:{name:"Last Played",id:"LASTPLAYED"}},window.location.href),window.postMessage({type:"LastPlayedGames",data:t},window.location.href)})).catch((e=>{console.error(e),t(e)}))})).then((e=>{if(window.postMessage({type:"GetFavoredGame"},window.location.href),e.count>0){let t=[];e.items.forEach((e=>{let n=new URL(`${s}/v1/casino/games/${e.gameId}`);n.searchParams.append("datasource",o),t.push(fetch(n.href).then((e=>e.json())))})),Promise.all(t).then((e=>{M=e.filter((e=>!("error"in e))).map((e=>e[0])),"true"===F&&(M=M.slice(0,JSON.parse(w))),window.postMessage({type:"LastPlayedData",lastPlayedGames:M},window.location.href)}))}else n(16,E=!0)}))},T=()=>{var e;e=c,hr.set(e)};return e.$$set=e=>{"endpoint"in e&&n(0,s=e.endpoint),"datasource"in e&&n(1,o=e.datasource),"currency"in e&&n(2,l=e.currency),"lang"in e&&n(3,c=e.lang),"session"in e&&n(4,d=e.session),"userid"in e&&n(5,h=e.userid),"clientstyling"in e&&n(6,m=e.clientstyling),"clientstylingurl"in e&&n(7,p=e.clientstylingurl),"translationurl"in e&&n(18,f=e.translationurl),"livecasino"in e&&n(8,g=e.livecasino),"integratedgameframemobile"in e&&n(9,y=e.integratedgameframemobile),"integratedgameframedesktop"in e&&n(10,v=e.integratedgameframedesktop),"gamepagemodalurl"in e&&n(11,b=e.gamepagemodalurl),"visiblegames"in e&&n(12,w=e.visiblegames),"favorites"in e&&n(13,x=e.favorites),"lastplayedperiod"in e&&n(19,_=e.lastplayedperiod),"lastplayedorder"in e&&n(20,S=e.lastplayedorder),"lastplayedlimit"in e&&n(21,$=e.lastplayedlimit),"casinomygames"in e&&n(14,F=e.casinomygames),"lastplayedunique"in e&&n(22,C=e.lastplayedunique)},e.$$.update=()=>{/*endpoint, userid, lang*/41&e.$$.dirty[0]&&s&&h&&c&&L(),/*translationurl*/262144&e.$$.dirty[0]&&f&&fetch(f).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Ca(t,e[t])}))})).catch((e=>{console.log(e)})),/*clientstyling, customStylingContainer*/32832&e.$$.dirty[0]&&m&&a&&(()=>{let e=document.createElement("style");e.innerHTML=m,a.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/32896&e.$$.dirty[0]&&p&&a&&(()=>{let e=document.createElement("style");fetch(new URL(p)).then((e=>e.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{a.appendChild(e)}),1)}))})(),/*lang*/8&e.$$.dirty[0]&&c&&T()},[s,o,l,c,d,h,m,p,g,y,v,b,w,x,F,a,E,r,f,_,S,$,C,function(e){k[e?"unshift":"push"]((()=>{a=e,n(15,a)}))}]}function Ta(e,t){zn(e,t)}!customElements.get("casino-last-played-section")&&customElements.define("casino-last-played-section",class extends z{constructor(e){super();const t=document.createElement("style");t.textContent="*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CasinoLastPlayedSection{background:var(--emfe-w-casino-color-bg, var(--emfe-w-color-background, #07072A));color:var(--emfe-w-casino-typography, var(--emfe-w-color-white, #FFFFFF))}",this.shadowRoot.appendChild(t),Y(this,{target:this.shadowRoot,props:F(this.attributes),customElement:!0},La,Ma,a,{endpoint:0,datasource:1,currency:2,lang:3,session:4,userid:5,clientstyling:6,clientstylingurl:7,translationurl:18,livecasino:8,integratedgameframemobile:9,integratedgameframedesktop:10,gamepagemodalurl:11,visiblegames:12,favorites:13,lastplayedperiod:19,lastplayedorder:20,lastplayedlimit:21,casinomygames:14,lastplayedunique:22},null,[-1,-1]),e&&(e.target&&h(e.target,this,e.anchor),e.props&&(this.$set(e.props),R()))}static get observedAttributes(){return["endpoint","datasource","currency","lang","session","userid","clientstyling","clientstylingurl","translationurl","livecasino","integratedgameframemobile","integratedgameframedesktop","gamepagemodalurl","visiblegames","favorites","lastplayedperiod","lastplayedorder","lastplayedlimit","casinomygames","lastplayedunique"]}get endpoint(){return this.$$.ctx[0]}set endpoint(e){this.$$set({endpoint:e}),R()}get datasource(){return this.$$.ctx[1]}set datasource(e){this.$$set({datasource:e}),R()}get currency(){return this.$$.ctx[2]}set currency(e){this.$$set({currency:e}),R()}get lang(){return this.$$.ctx[3]}set lang(e){this.$$set({lang:e}),R()}get session(){return this.$$.ctx[4]}set session(e){this.$$set({session:e}),R()}get userid(){return this.$$.ctx[5]}set userid(e){this.$$set({userid:e}),R()}get clientstyling(){return this.$$.ctx[6]}set clientstyling(e){this.$$set({clientstyling:e}),R()}get clientstylingurl(){return this.$$.ctx[7]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),R()}get translationurl(){return this.$$.ctx[18]}set translationurl(e){this.$$set({translationurl:e}),R()}get livecasino(){return this.$$.ctx[8]}set livecasino(e){this.$$set({livecasino:e}),R()}get integratedgameframemobile(){return this.$$.ctx[9]}set integratedgameframemobile(e){this.$$set({integratedgameframemobile:e}),R()}get integratedgameframedesktop(){return this.$$.ctx[10]}set integratedgameframedesktop(e){this.$$set({integratedgameframedesktop:e}),R()}get gamepagemodalurl(){return this.$$.ctx[11]}set gamepagemodalurl(e){this.$$set({gamepagemodalurl:e}),R()}get visiblegames(){return this.$$.ctx[12]}set visiblegames(e){this.$$set({visiblegames:e}),R()}get favorites(){return this.$$.ctx[13]}set favorites(e){this.$$set({favorites:e}),R()}get lastplayedperiod(){return this.$$.ctx[19]}set lastplayedperiod(e){this.$$set({lastplayedperiod:e}),R()}get lastplayedorder(){return this.$$.ctx[20]}set lastplayedorder(e){this.$$set({lastplayedorder:e}),R()}get lastplayedlimit(){return this.$$.ctx[21]}set lastplayedlimit(e){this.$$set({lastplayedlimit:e}),R()}get casinomygames(){return this.$$.ctx[14]}set casinomygames(e){this.$$set({casinomygames:e}),R()}get lastplayedunique(){return this.$$.ctx[22]}set lastplayedunique(e){this.$$set({lastplayedunique:e}),R()}});const Pa={en:{noGames:"No games in most played"},"zh-hk":{noGames:"No games in most played"},de:{noGames:"No games in most played"},it:{noGames:"No games in most played"},fr:{noGames:"No games in most played"},es:{noGames:"No hay juegos en más jugados."},tr:{noGames:"No games in most played"},ru:{noGames:"No games in most played"},ro:{noGames:"No games in most played"},hr:{noGames:"No games in most played"},hu:{noGames:"No games in most played"},pl:{noGames:"No games in most played"},pt:{noGames:"No games in most played"},sl:{noGames:"No games in most played"},sr:{noGames:"No games in most played"}};
1511
1511
  /* ../casino-most-played-section/src/CasinoMostPlayedSection.svelte generated by Svelte v3.59.2 */function Ia(e){let t;return{c(){t=f("casino-games-category-section"),_(t,"session",/*session*/e[4]),_(t,"userid",/*userid*/e[5]),_(t,"endpoint",/*endpoint*/e[0]),_(t,"datasource",/*datasource*/e[1]),_(t,"lang",/*lang*/e[3]),_(t,"currency",/*currency*/e[2]),_(t,"favorites",/*favorites*/e[13]),_(t,"categoryid","MOSTPLAYED"),_(t,"categoryindex","1"),_(t,"categorygames","9"),_(t,"class","CategoryContainer"),_(t,"clientstyling",/*clientstyling*/e[6]),_(t,"clientstylingurl",/*clientstylingurl*/e[7]),_(t,"livecasino",/*livecasino*/e[8]),_(t,"visiblegames",/*visiblegames*/e[12]),_(t,"gamepagemodalurl",/*gamepagemodalurl*/e[11]),_(t,"integratedgameframedesktop",/*integratedgameframedesktop*/e[10]),_(t,"integratedgameframemobile",/*integratedgameframemobile*/e[9]),_(t,"casinomygames",/*casinomygames*/e[14])},m(e,n){h(e,t,n)},p(e,n){/*session*/16&n[0]&&_(t,"session",/*session*/e[4]),/*userid*/32&n[0]&&_(t,"userid",/*userid*/e[5]),/*endpoint*/1&n[0]&&_(t,"endpoint",/*endpoint*/e[0]),/*datasource*/2&n[0]&&_(t,"datasource",/*datasource*/e[1]),/*lang*/8&n[0]&&_(t,"lang",/*lang*/e[3]),/*currency*/4&n[0]&&_(t,"currency",/*currency*/e[2]),/*favorites*/8192&n[0]&&_(t,"favorites",/*favorites*/e[13]),/*clientstyling*/64&n[0]&&_(t,"clientstyling",/*clientstyling*/e[6]),/*clientstylingurl*/128&n[0]&&_(t,"clientstylingurl",/*clientstylingurl*/e[7]),/*livecasino*/256&n[0]&&_(t,"livecasino",/*livecasino*/e[8]),/*visiblegames*/4096&n[0]&&_(t,"visiblegames",/*visiblegames*/e[12]),/*gamepagemodalurl*/2048&n[0]&&_(t,"gamepagemodalurl",/*gamepagemodalurl*/e[11]),/*integratedgameframedesktop*/1024&n[0]&&_(t,"integratedgameframedesktop",/*integratedgameframedesktop*/e[10]),/*integratedgameframemobile*/512&n[0]&&_(t,"integratedgameframemobile",/*integratedgameframemobile*/e[9]),/*casinomygames*/16384&n[0]&&_(t,"casinomygames",/*casinomygames*/e[14])},d(e){e&&m(t)}}}
1512
1512
  // (152:4) {#if mostPlayedEmpty}
1513
1513
  function Aa(e){let t,n,r=/*$_*/e[17]("noGames")+"";return{c(){t=f("p"),n=y(r),x(t,"class","SearchLoading")},m(e,r){h(e,t,r),d(t,n)},p(e,t){/*$_*/131072&t[0]&&r!==(r=/*$_*/e[17]("noGames")+"")&&S(n,r)},d(e){e&&m(t)}}}function Da(t){let n,r;function i(e,t){/*mostPlayedEmpty*/
1514
1514
  return e[16]?Aa:Ia}let a=i(t),s=a(t);return{c(){n=f("div"),r=f("div"),s.c(),this.c=e,x(r,"class","casino-most-played-section"),x(n,"class","CasinoGamesCategorySectionContainer")},m(e,i){h(e,n,i),d(n,r),s.m(r,null),
1515
1515
  /*div1_binding*/t[22](n)},p(e,t){a===(a=i(e))&&s?s.p(e,t):(s.d(1),s=a(e),s&&(s.c(),s.m(r,null)))},i:e,o:e,d(e){e&&m(n),s.d(),
1516
- /*div1_binding*/t[22](null)}}}function Oa(e,t,n){let r;u(e,Tr,(e=>n(17,r=e)));let{endpoint:i=""}=t,{datasource:a=""}=t,{currency:s=""}=t,{lang:o=""}=t,{session:l=""}=t,{userid:c=""}=t,{clientstyling:d=""}=t,{clientstylingurl:h=""}=t,{livecasino:m="false"}=t,{integratedgameframemobile:p="false"}=t,{integratedgameframedesktop:f="false"}=t,{gamepagemodalurl:g="false"}=t,{visiblegames:y}=t,{favorites:v=""}=t,{lastPlayedEmpty:b=""}=t,{translationurl:w=""}=t,{casinomygames:x="false"}=t,{mostplayedperiod:_="Last30Days"}=t,{mostplayedrounds:S="10"}=t,$=window.navigator.userAgent;Object.keys(Pa).forEach((e=>{Ta(e,Pa[e])}));let F,C,G=[],E=!1;const M=()=>{(e=>{let t=new URL(`${i}/player/${c}/games/most-played`);e.limit&&t.searchParams.append("limit",e.limit),e.order&&t.searchParams.append("order",e.order),t.searchParams.append("expand","games"),t.searchParams.append("period",_);let n=e.device;return n?"PC"===n?t.searchParams.append("device","Desktop"):t.searchParams.append("device","Mobile"):t.searchParams.append("device","All"),e.rounds&&t.searchParams.append("rounds",e.rounds),F=m?t:t.href,new Promise(((e,t)=>{fetch(F).then((e=>e.json())).then((t=>{t.items=t.items.filter((e=>{let n=!0;return"OddsMatrix2"==e.gameCode&&(t.count--,n=!1),n})),e(t)})).catch((e=>{console.error(e),t(e)}))}))})({limit:100,device:Ir($),rounds:S}).then((e=>{if(window.postMessage({type:"GetFavoredGame"},window.location.href),e.count>0){let t=[];e.items.forEach((e=>{let n=new URL(`${i}/casino/games/${e.gameId}`);n.searchParams.append("datasource",a),t.push(fetch(n.href).then((e=>e.json())))})),Promise.all(t).then((e=>{G=e.filter((e=>!("error"in e))).map((e=>e[0])),"true"===x&&(G=G.slice(0,JSON.parse(y))),window.postMessage({type:"MostPlayedData",mostPlayedGames:G},window.location.href)}))}else n(16,E=!0)}))},L=()=>{var e;e=o,hr.set(e)};return e.$$set=e=>{"endpoint"in e&&n(0,i=e.endpoint),"datasource"in e&&n(1,a=e.datasource),"currency"in e&&n(2,s=e.currency),"lang"in e&&n(3,o=e.lang),"session"in e&&n(4,l=e.session),"userid"in e&&n(5,c=e.userid),"clientstyling"in e&&n(6,d=e.clientstyling),"clientstylingurl"in e&&n(7,h=e.clientstylingurl),"livecasino"in e&&n(8,m=e.livecasino),"integratedgameframemobile"in e&&n(9,p=e.integratedgameframemobile),"integratedgameframedesktop"in e&&n(10,f=e.integratedgameframedesktop),"gamepagemodalurl"in e&&n(11,g=e.gamepagemodalurl),"visiblegames"in e&&n(12,y=e.visiblegames),"favorites"in e&&n(13,v=e.favorites),"lastPlayedEmpty"in e&&n(18,b=e.lastPlayedEmpty),"translationurl"in e&&n(19,w=e.translationurl),"casinomygames"in e&&n(14,x=e.casinomygames),"mostplayedperiod"in e&&n(20,_=e.mostplayedperiod),"mostplayedrounds"in e&&n(21,S=e.mostplayedrounds)},e.$$.update=()=>{/*endpoint, userid, lang*/41&e.$$.dirty[0]&&i&&c&&o&&M(),/*clientstyling, customStylingContainer*/32832&e.$$.dirty[0]&&d&&C&&(()=>{let e=document.createElement("style");e.innerHTML=d,C.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/32896&e.$$.dirty[0]&&h&&C&&(()=>{let e=document.createElement("style");fetch(new URL(h)).then((e=>e.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{C.appendChild(e)}),1)}))})(),/*translationurl*/524288&e.$$.dirty[0]&&w&&fetch(w).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Ta(t,e[t])}))})).catch((e=>{console.log(e)})),/*lang*/8&e.$$.dirty[0]&&o&&L()},[i,a,s,o,l,c,d,h,m,p,f,g,y,v,x,C,E,r,b,w,_,S,function(e){k[e?"unshift":"push"]((()=>{C=e,n(15,C)}))}]}
1516
+ /*div1_binding*/t[22](null)}}}function Oa(e,t,n){let r;u(e,Tr,(e=>n(17,r=e)));let{endpoint:i=""}=t,{datasource:a=""}=t,{currency:s=""}=t,{lang:o=""}=t,{session:l=""}=t,{userid:c=""}=t,{clientstyling:d=""}=t,{clientstylingurl:h=""}=t,{livecasino:m="false"}=t,{integratedgameframemobile:p="false"}=t,{integratedgameframedesktop:f="false"}=t,{gamepagemodalurl:g="false"}=t,{visiblegames:y}=t,{favorites:v=""}=t,{lastPlayedEmpty:b=""}=t,{translationurl:w=""}=t,{casinomygames:x="false"}=t,{mostplayedperiod:_="Last30Days"}=t,{mostplayedrounds:S="10"}=t,$=window.navigator.userAgent;Object.keys(Pa).forEach((e=>{Ta(e,Pa[e])}));let F,C,G=[],E=!1;const M=()=>{(e=>{let t=new URL(`${i}/v1/player/${c}/games/most-played`);e.limit&&t.searchParams.append("limit",e.limit),e.order&&t.searchParams.append("order",e.order),t.searchParams.append("expand","games"),t.searchParams.append("period",_);let n=e.device;return n?"PC"===n?t.searchParams.append("device","Desktop"):t.searchParams.append("device","Mobile"):t.searchParams.append("device","All"),e.rounds&&t.searchParams.append("rounds",e.rounds),F=m?t:t.href,new Promise(((e,t)=>{fetch(F).then((e=>e.json())).then((t=>{t.items=t.items.filter((e=>{let n=!0;return"OddsMatrix2"==e.gameCode&&(t.count--,n=!1),n})),e(t)})).catch((e=>{console.error(e),t(e)}))}))})({limit:100,device:Ir($),rounds:S}).then((e=>{if(window.postMessage({type:"GetFavoredGame"},window.location.href),e.count>0){let t=[];e.items.forEach((e=>{let n=new URL(`${i}/v1/casino/games/${e.gameId}`);n.searchParams.append("datasource",a),t.push(fetch(n.href).then((e=>e.json())))})),Promise.all(t).then((e=>{G=e.filter((e=>!("error"in e))).map((e=>e[0])),"true"===x&&(G=G.slice(0,JSON.parse(y))),window.postMessage({type:"MostPlayedData",mostPlayedGames:G},window.location.href)}))}else n(16,E=!0)}))},L=()=>{var e;e=o,hr.set(e)};return e.$$set=e=>{"endpoint"in e&&n(0,i=e.endpoint),"datasource"in e&&n(1,a=e.datasource),"currency"in e&&n(2,s=e.currency),"lang"in e&&n(3,o=e.lang),"session"in e&&n(4,l=e.session),"userid"in e&&n(5,c=e.userid),"clientstyling"in e&&n(6,d=e.clientstyling),"clientstylingurl"in e&&n(7,h=e.clientstylingurl),"livecasino"in e&&n(8,m=e.livecasino),"integratedgameframemobile"in e&&n(9,p=e.integratedgameframemobile),"integratedgameframedesktop"in e&&n(10,f=e.integratedgameframedesktop),"gamepagemodalurl"in e&&n(11,g=e.gamepagemodalurl),"visiblegames"in e&&n(12,y=e.visiblegames),"favorites"in e&&n(13,v=e.favorites),"lastPlayedEmpty"in e&&n(18,b=e.lastPlayedEmpty),"translationurl"in e&&n(19,w=e.translationurl),"casinomygames"in e&&n(14,x=e.casinomygames),"mostplayedperiod"in e&&n(20,_=e.mostplayedperiod),"mostplayedrounds"in e&&n(21,S=e.mostplayedrounds)},e.$$.update=()=>{/*endpoint, userid, lang*/41&e.$$.dirty[0]&&i&&c&&o&&M(),/*clientstyling, customStylingContainer*/32832&e.$$.dirty[0]&&d&&C&&(()=>{let e=document.createElement("style");e.innerHTML=d,C.appendChild(e)})(),/*clientstylingurl, customStylingContainer*/32896&e.$$.dirty[0]&&h&&C&&(()=>{let e=document.createElement("style");fetch(new URL(h)).then((e=>e.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{C.appendChild(e)}),1)}))})(),/*translationurl*/524288&e.$$.dirty[0]&&w&&fetch(w).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{Ta(t,e[t])}))})).catch((e=>{console.log(e)})),/*lang*/8&e.$$.dirty[0]&&o&&L()},[i,a,s,o,l,c,d,h,m,p,f,g,y,v,x,C,E,r,b,w,_,S,function(e){k[e?"unshift":"push"]((()=>{C=e,n(15,C)}))}]}
1517
1517
  /* src/CasinoMyGames.svelte generated by Svelte v3.59.2 */
1518
1518
  function Na(e,t,n){const r=e.slice();return r[42]=t[n],r}
1519
1519
  // (113:4) {#if casinomygames}