1import{J as p,N as w,A as g,O as _,g as u}from"./DzmMXjjF.js";import{g as h}from"./CqxolwbF.js";import{g as D}from"./DzoEpPy7.js";import{u as d}from"./C_RBi3Co.js";import{a as v}from"./BJzQqtJO.js";import{u as y}from"./CjygX5Ih.js";const O=async()=>{const{currentLocale:e}=p(),t=await w();return{to:await h(t.eventOverviewPageId,e.id),title:g("events_link_title_label")}},S=e=>{if(!e.dateTo)return!1;const t=new Date().setHours(0,0,0,0),a=new Date(e.dateTo).setHours(0,0,0,0),o=new Date(a);return o.setDate(o.getDate()+1),o.getTime()>t},T=(e,t)=>({...e,headline:e.headline,description:e.description,location:e.location,dateFrom:e.dateFrom?.date,dateTo:e.dateTo?.date,link:{to:D(e),...t?{label:t}:{}}});function I(e){const{localEvents:t=[],globalEventsRemote:a=[],tags:o=[],previewId:i}=e,l=u(()=>g("specific_event_link_label")),c=t.length>0||a.length>0,{data:m}=d(`events-selected-${i}`,async()=>{const n=[...t,...a];if(!n.length)return[];const s=await _({references:n});return Array.isArray(s)?s.filter(r=>r.showInThisLanguage).map(r=>T(r,l.value)).filter(S).toSorted(v):[]}),{data:f}=d(`events-search-${i}`,async()=>((await y({templates:["local_data.tt_event","global_data.tt_event"],rows:3,initialTags:o.map(s=>s.name),sortDateProperty:"sortDateTo",sortDirection:"asc",initialDateQuery:"FS_publish_to_date_range:[NOW TO *]",linkLabel:l})).teasers.value||[]).toSorted(v),{immediate:!c});return{eventsToShow:u(()=>c?m.value||[]:f.value||[])}}export{O as g,I as u};
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.