1import B from"./BxpL4bzW.js";import{q as b,m as E,y as s,a9 as L,f as v,s as V,z as M,a4 as T,a5 as G,o as g,c as p,b as h,i as I,a as t,w as D,T as O,p as P,A as x,V as $,k as j,t as F,F as U,v as W}from"#entry";import{S as w}from"./CB6UHAJl.js";import{_ as H}from"./DlAUqK2U.js";import"./Dq-Zfdob.js";import"./C-U63Z2r.js";import"./CoxxfZ2h.js";const J={class:"container relative z-30 grid grid-cols-1 md:grid-cols-2 2xl:grid-cols-3 gap-8 lg:gap-12 lg:gap-y-16"},K={class:"heading-text relative z-10 uppercase text-white font-bold text-2xl"},Q={key:0,class:"relative z-30 flex items-center justify-center mt-12"},X={__name:"GamesListing",props:{blok:{required:!0,type:Object}},setup(a){b.registerPlugin(w);const o=a,l=E(),z=j(),y=s(null),d=s(null),n=s([]),r=s(1),_=s([]),m=s(0);let i=null,c=null;const f=async()=>{const u=$();try{const e=await u.get("cdn/stories/",{version:z.public.SITE_ENV_VERSION,starts_with:"games/",excluding_slugs:"games/platforms/*",is_startpage:!1,sort_by:"first_published_at:desc",per_page:o.blok.per_page*r.value,resolve_relations:"game.developer"});_.value=e.data.stories,m.value=e.total}catch(e){console.error("Error fetching games:",e)}};L(()=>l.query,()=>{r.value=l.query.page?Number(l.query.page):1,f()}),v(()=>Math.ceil(m.value/Number(o.blok.per_page)));const S=v(()=>`section-style-${o.blok.section_style}`),C=v(()=>{if(o.blok.background_image)return{backgroundImage:`url(${o.blok.background_image.filename})`}}),A=(u,e)=>{b.fromTo(u,{autoAlpha:0,y:500},{duration:.9,autoAlpha:1,y:0,ease:"expo.out",onComplete:e})},N=()=>{r.value++,f()};return V(async()=>{r.value=l.query.page?Number(l.query.page):1,await f(),i=b.timeline(),c=w.create({trigger:y.value,start:"top bottom",end:"top center",pin:!1,scrub:1,once:!0,animation:i}),c.enable(),d.value&&i.from(d.value,{x:-500,autoAlpha:0,rotation:-35,ease:"expo.out"},"+=1"),n.value&&n.value.length&&i.from(n.value,{y:500,autoAlpha:0,stagger:.1,ease:"expo.in"},"-=.4")}),M(()=>{c&&c.disable()}),(u,e)=>{const q=B,R=G("editable");return T((g(),p("section",{ref_key:"section",ref:y,class:x(["section games-listing-section pt-20 pb-32 md:pt-10 md:pb-0",[S.value]])},[h(O,{css:!1,onEnter:A},{default:D(()=>[t("div",J,[t("h1",{ref_key:"title",ref:d,class:"heading px-10 py-8"},[t("span",K,F(a.blok.title?a.blok.title:"Our games"),1),e[0]||(e[0]=t("svg",{class:"heading-bg text-secondary-light absolute top-0 left-0 z-0 w-full h-full",preserveAspectRatio:"none",viewBox:"0 0 122 42"},[t("path",{d:"M0 5.454l6.168 35.91 106.93.15L121.309.002 0 5.454z",fill:"#a5b554"})],-1))],512),(g(!0),p(U,null,W(_.value,k=>(g(),p("div",{key:k.uuid,ref_for:!0,ref_key:"gameRefs",ref:n},[h(q,{blok:k},null,8,["blok"])]))),128))])]),_:1}),a.blok.per_page*r.value<m.value?(g(),p("div",Q,[t("button",{class:"btn btn--secondary py-3 px-8",onClick:N},[...e[1]||(e[1]=[t("span",{class:"btn-text"},"Load More",-1),t("svg",{class:"btn-bg absolute top-0 left-0 z-0 w-full h-full",preserveAspectRatio:"none",viewBox:"0 0 122.37 66.843"},[t("path",{d:"M122.36 63.943L114.9.876 8.35-.014 0 66.845z",fill:"
1currentColor","fill-rule":"evenodd"})],-1)])])])):I("",!0),t("div",{class:"games-listing-section-bg",style:P(C.value)},null,4),t("div",{class:x(["games-listing-section-color",`bg-${a.blok.background_color}`])},null,2)],2)),[[R,a.blok]])}}},le=H(X,[["__scopeId","data-v-dcd7db0f"]]);export{le 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.