PageSourceSearch

https://www.stjernen.no/assets/EmbeddedGamesListSection-DZtzG7Dn.js

js stjernen.no collected 2026-10-02 22:09:40 UTC 1,870 bytes, 1 lines download raw bytes

1import{ab as U,bR as B,b4 as w,w as y,j as _,r as C,z as k,B as h,C as v,I as S}from"./index-BO6Ka_k5.js";import{M as P}from"./MultipleUpcomingGames-DDcNknaw.js";import{n as u,e as T}from"./embedded-article-sections.tools-Bdvdlk7v.js";import{E as $}from"./EmbeddedSectionEmpty-ChKCwdKg.js";import{u as I,a as L}from"./ArticleHtmlRenderer-CQxpH-c-.js";import{u as M}from"./useEmbeddedSiteTeams-Bhz3obOy.js";import"./SingleGameBox-DCQMy67n.js";import"./TeamNameIcon-DlkAhuz7.js";import"./legacy-style-scoping-DLBkiVNm.js";import"./useListAdSlots-C7nMdGEr.js";const x=U({name:"EmbeddedGamesListSection",components:{MultipleUpcomingGames:P,EmbeddedSectionEmpty:$},setup(){const s=B(),n=w(),{sectionConfig:c,identifier:p}=I(),{resolvedPayload:d}=L(),{embeddedSiteTeams:l}=M(),a=C([]);let o=0;const G=e=>e.map(t=>T(t,l.value));y([d,c],async([e,t])=>{const E=++o;if(u(e).length>0){a.value=[];return}const i=typeof(t==null?void 0:t.teamUuid)=="string"?t.teamUuid.trim():"",f=typeof(t==null?void 0:t.limit)=="number"&&t.limit>0?t.limit:5;if(!i){a.value=[];return}try{let r;if(p.value==="stat-results"){const m=await n.getPlayedGamesByTeamId(i);r=u(m).slice(0,f)}else{const m=await n.getUpcomingGamesV2(i);r=((m==null?void 0:m.upcomingGames)??[]).slice(0,f)}if(E!==o)return;a.value=G(r)}catch{a.value=[]}},{immediate:!0,deep:!0});const b=_(()=>{const e=G(u(d.value));return e.length>0?e:a.value}),g=_(()=>b.value.map(e=>e==null?void 0:e.uuid).filter(Boolean).join(","));return y(g,e=>{e&&s.setGameMetadataByGameUuidsInFeaturedNewsUpcomingGames(e.split(",")).catch(()=>{})},{immediate:!0}),{embeddedGames:b}}});function z(s,n,c,p,d,l){const a=h("multiple-upcoming-games"),o=h("embedded-section-empty");return s.embeddedGames.length>0?(v(),S(a,{key:0,"upcoming-games":s.embeddedGames},null,8,["upcoming-games"])):(v(),S(o,{key:1}))}const O=k(x,[["render",z]]);export{O 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.