1import{_ as v,R as b,ar as $,aq as f,bI as E,u as G,dS as I,dT as L,br as A,N,X as T}from"../../static/js/app.js";import{U as m,J as o,X as l,ah as d,W as p,ag as H,aw as k,c as S,a9 as _,H as c,K as O,V as C,af as M,aj as w,aF as W,an as V,aa as B,ad as P,ae as R,ai as K}from"./vendor.js";import{G as D,a as x,_ as z,b as U}from"./chunk-oOkYaobb.js";import{G as F,h as y}from"./chunk-Dx_3WdUE.js";import"./chunk-96IbgH39.js";import"./chunk-CvFyI2Yl.js";import"./chunk-tLDyQ-Oe.js";import"./chunk-CwIp_4np.js";import"./chunk-DC2CSWyy.js";import"./chunk-CB8p_VJi.js";import"./chunk-BaEurUi0.js";import"./chunk-Dj-454N8.js";import"./chunk-DlPpj1hg.js";const j={name:"casino-search-box",setup(){const{isPortrait:e}=E(),{isMobile:a}=G();return{isPortrait:e,isMobile:a}},data(){return{search:""}},computed:{getSearchValue(){return this.$store.state.casino.searchValue}},watch:{search:window._.debounce(function(e){const a=e.toLowerCase();this.$nextTick(function(){this.$store.commit(`casino/${f.SET_SEARCH_VALUE}`,a),a.length>2&&(this.searchGamesByTitle(a),window.UILogger.logEvent(window.UILogger.eventNames.Casino.search_casino_games,{search_term:a}))})},500,!1),getSearchValue:function(e){e||(this.search="")}},mounted(){this.$refs.searchGame.focus(),this.search=this.getSearchValue},methods:{onKeyPress(e){e.keyCode==13&&(e.preventDefault(),e.target.blur())},clearSearchValue(){this.search="",$().remove("casino-search-mode"),this.$store.commit(`casino/${f.SET_SEARCH_VALUE}`,""),this.$store.commit(`casino/${f.SET_CASINO_SEARCH_MODE}`,!1)},searchGamesByTitle(e){this.$store.dispatch(`casino/${b.SEARCH_GAMES_BY_TITLE}`,{text:e})}}},Y={class:"casino-search-bar d-flex align-items-center"},q={class:"container container-games-grid d-flex align-items-center"},X={class:"input-group-prepend"},J=["value","placeholder"];function Q(e,a,r,n,i,t){return o(),m("div",Y,[l("div",q,[l("div",{class:d(["input-group casino-search-box d-flex align-items-center",{"flex-row-reverse":n.isMobile}])},[l("div",X,[l("i",{class:"ds-icon-material search-icon clear-search-icon d-flex align-items-center justify-content-center",onClick:a[0]||(a[0]=(...s)=>t.clearSearchValue&&t.clearSearchValue(...s))},` 2 close 3 `)]),a[3]||(a[3]=p()),l("input",{ref:"searchGame",type:"text",name:"search_game",value:i.search,class:d(["form-control noSpecialCharts noPasteSpecialCharts rounded-0 casino-search-input",{landscape:!n.isPortrait&&n.isMobile}]),placeholder:e.$translation("_localizer.CASINO.search"),maxlength:"100",onInput:a[1]||(a[1]=s=>i.search=s.target.value),onKeyup:a[2]||(a[2]=H((...s)=>t.onKeyPress&&t.onKeyPress(...s),["enter"]))},null,42,J)],2)])])}const Z=v(j,[["render",Q],["__scopeId","data-v-8ae04f61"]]),ee=k({__name:"PlainGamesGridItem",props:{game:{},isVisible:{type:Boolean},isPopularGames:{type:Boolean,default:!1},hasGOTW:{type:Boolean,default:!1},originComponent:{}},setup(e){const{isPortrait:a}=E(),{isCasinoCarouselGameCards:r,isMobile:n,isNewLayout:i}=G(),t=S(()=>n?`col-${a.value?6:2}`:"col-2");return(s,u)=>_(r)?(o(),m("div",{key:0,class:d(t.value)},[s.isVisible?(o(),c(D,{key:0,game:s.game,"is-popular":s.isPopularGames,class:"game-card-item","origin-component":s.originComponent},null,8,["game","is-popular","origin-component"])):(o(),c(x,{key:1}))],2)):(o(),m("div",{key:1,class:d(t.value)},[s.isVisible?(o(),c(F,{key:0,game:s.game,index:Number(s.game.id),"display-featured":!1,"is-popular":s.isPopularGames,"has-g-o-t-w":s.hasGOTW,"additional-class":"w-100","has-game-card-info":!_(i)&&!1,"origin-component":s.originComponent},{default:O(()=>[_(i)?(o(),c(z,{key:0,game:s.game,class:"game-thumb-info-new-layout"},null,8,["game"])):C("",!0)]),_:1},8,["game","index","is-popular","has-g-o-t-w","has-game-card-info","origin-component"])):(o(),c(U,{key:1}))],2))}}),ae=v(ee,[["__scopeId","data-v-ab4cea28"]]),se={key:0,class:"games-grid-popular-wrapper"},te={class:"games-grid-popular-title"},oe={key:1,class:"games-grid-title"},re=k({__name:"PlainGamesGridTitle",props:{title:{},isPopularGames:{type:Boolean,default:!1}},setup(e){return(a,r)=>{const n=W("view-loader");return a.isPopularGames?(o(),m("div",se,[l("h2",te,w(a.title),1)])):M((o(),m("div",oe,[p(w(a.title),1)])),[[n,{loaderName:_(b).SEARCH_GAMES_BY_TITLE,loaderClass:"loading"}]])}}}),ie=k({__name:"PlainGamesGrid",props:{casinoGames:{},gridTitle:{},isPopularGames:{type:Boolean},indexOfChunk:{},isLastChunk:{type:Boolean},originComponent:{},hasGOTW:{type:Boolean}},setup(e){const{isCasinoCarouselGameCards:a}=G(),r=e,n=S(()=>r.isPopularGames||r.indexOfChunk===0),i=S(()=>{var s;return(s=r.hasGOTW)!=null?s:y(r.casinoGames)}),t=s=>a.value?"row":`games-grid d-flex flex-wrap ${s?"":"game-grid-item-placeholder"}`;return(s,u)=>(o(),c(I,{"lazy-load-trigger":s.casinoGames},{default:O(({visible:h})=>[l("div",{class:d(["plain-games-grid-wrapper",{"mb-0":!s.isLastChunk}])},[n.value?(o(),c(re,{key:0,title:s.gridTitle,"is-popular-games":s.isPopularGames},null,8,["title","is-popular-games"])):C("",!0),u[0]||(u[0]=p()),l("div",{class:d(t(h))},[(o(!0),m(B,null,V(s.casinoGames,g=>(o(),c(ae,{key:g.casino_game_id,game:g,"is-visible":h,"is-popular-games":s.isPopularGames,"has-g-o-t-w":i.value,"origin-component":s.originComponent},null,8,["game","is-visible","is-popular-games","has-g-o-t-w","origin-component"]))),128))],2)],2)
3]),_:1},8,["lazy-load-trigger"]))}}),ne={name:"casino-search-area",components:{CasinoSearchBar:Z,PlainGamesGrid:ie},setup(){const{isNewLayout:e,isSportOrientedLayout:a}=G();return{isNewLayout:e,isSportOrientedLayout:a}},data(){return{originComponentSearch:T.search,originComponentSearchPopularGames:T.search_popular_games}},computed:{getBottomNavHeight(){var e;return((e=document.getElementById("navigation-bottom"))==null?void 0:e.offsetHeight)||0},getSearchValue(){return this.$store.state.casino.searchValue},displaySearchResults(){var e;return((e=this.getSearchValue)==null?void 0:e.length)>1},getPopularGames(){return this.isNewLayout&&this.isSportOrientedLayout&&this.$route.name==="CasinoHome"?[]:this.$store.getters["casino/getCasinoPopularGames"]},getIsLoading(){return this.$store.state.network.activeActions.some(e=>e.name===N.SEARCH_GAMES_BY_TITLE)},getSearchCasinoGames(){let e=[];if(this.getSearchValue!==""){const a=this.$store.getters["casino/getClosedLiveTableKeys"];e=this.$store.state.casino.casinoFoundGames;const r=e.map(i=>i.casino_game_id),n=[...new Set(r)];r.length!==n.length&&(e=n.map(i=>e.find(t=>t.casino_game_id===i))),e=A(e,a)}return e}
3,getSearchGridTitle(){return`${this.getSearchCasinoGames.length} ${this.$translation("CASINO.games_found")}`},getPopularTitle(){return this.$translation("CASINO.popular_games")},getChunkedSearchGames(){return L(this.getSearchCasinoGames,this.isMobile?6:12)},getPopularGamesHasGOTW(){return y(this.getPopularGames)}},watch:{"$route.path":{handler:function(){this.disableSearchMode()},deep:!0}},methods:{disableSearchMode(){this.$store.commit(`casino/${f.SET_CASINO_SEARCH_MODE}`,!1),$().remove("casino-search-mode")},getHasGOTW(e){return y(e)},getSearchChunkKey(e,a){return e!=null&&e.length?`${a}-${e.map(r=>r.casino_game_id).join("|")}`:`search-chunk-${a}`}}},le={class:"casino-search-results"},ce={class:"container container-games-grid"};function me(e,a,r,n,i,t){const s=P("casino-search-bar"),u=P("plain-games-grid");return o(),m("div",{class:"casino-search-area d-flex flex-column",style:K({"padding-bottom":`${t.getBottomNavHeight}px`})},[R(s),a[1]||(a[1]=p()),l("div",le,[l("div",ce,[t.displaySearchResults?(o(!0),m(B,{key:0},V(t.getChunkedSearchGames,(h,g)=>(o(),c(u,{key:t.getSearchChunkKey(h,g),"casino-games":h,"grid-title":t.getSearchGridTitle,"is-popular-games":!1,"index-of-chunk":g,"is-last-chunk":g===t.getChunkedSearchGames.length-1,"origin-component":i.originComponentSearch,"has-g-o-t-w":t.getHasGOTW(h)},null,8,["casino-games","grid-title","index-of-chunk","is-last-chunk","origin-component","has-g-o-t-w"]))),128)):C("",!0),a[0]||(a[0]=p()),t.getPopularGames.length?(o(),c(u,{key:1,"casino-games":t.getPopularGames,"grid-title":t.getPopularTitle,"is-popular-games":"","index-of-chunk":0,"origin-component":i.originComponentSearchPopularGames,"is-last-chunk":"","has-g-o-t-w":t.getPopularGamesHasGOTW},null,8,["casino-games","grid-title","origin-component","has-g-o-t-w"])):C("",!0)])])],4)}const Te=v(ne,[["render",me]]);export{Te as default};
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.