1import{t as m,J as f,K as h,L as A,R as v,l as _,M as w,P as D,Q as p,T as b,N as C,S as T,d as N,a as P,U as x,w as S,V as B,f as y,g as I,m as $,b as O,h as d,j as L,o as g}from"./CHz7KWu6.js";import U from"./CjRHpBfd.js";import{A as M}from"./9eeO0ups.js";import{C as E}from"./BmnpE1lZ.js";import{e as F,c as H}from"./BUa1f-qr.js";import{f as R}from"./BIE0HhE2.js";import{B as z}from"./BIpIsHNp.js";import{a as V}from"./5fMN4MKw.js";import{c as j}from"./B2eE2O7_.js";import{A as G}from"./CXGNQ2dX.js";import"./9Gx73rbP.js";import"./CY05TT2u.js";import"./B7kRK2Lv.js";import"./CeNqNSHc.js";import"./BSt6N3C0.js";import"./CUE8i9IC.js";import"./xEvW5A2n.js";import"./5Fi3Koay.js";import"./Hfm2hmmT.js";const J=/\b(online|virtual|webinar|remote|livestream|live stream|zoom|on[- ]demand)\b/i;class K extends z{constructor(e){super(e)}get channelSelect(){return this.pageData.sectionHandle??"events"}async init(){return this}format(){const e=this.pageData,t=this.channelSelect,s=E[t],o=F(e),n=e.articleContentArea?.length?new M(e.articleContentArea[0]):void 0,r=H(o,{linkBuilder:a=>`${s?.uri??"/events"}?category=${a?.slug??""}`}),i={id:e.id,backLink:{link:{url:s?.uri},text:m(s?.title)},header:{articleTags:{tagsBlock:{tags:r}},heading:e.title,eventInfo:{dateFrom:e.date,dateTo:e.date2,location:e.plainText}},asset:e.asset?.[0]?new f(e.asset?.[0]):void 0,contentArea:n,speakers:e.speakers?.[0]?{heading:m("Meet the speakers"),speakers:e.speakers.map((a,c)=>{const l=a?.image?.[0]||a?.asset?.[0];return{id:`speaker-${c}`,asset:l?new f(l):void 0,name:a?.title??"",position:a?.plainText??""}})}:void 0,shareBlock:{heading:m("Share"),colour:"dark",links:[]},form:R(e.form?.[0])};return this.prune(i)}getSchemaContribution(){const e=this.pageData,t=h(e.url),s=A(e.url),o=v(e.date);if(!t)return null;const n=E[this.channelSelect],r=n?.uri?h(_(n.uri,e.siteHandle),s??void 0):void 0,i=n?.title&&r?[{name:m(n.title),item:r}]:[];if(!o)return{breadcrumbAncestors:i};const a=typeof e.plainText=="string"?e.plainText.trim():"",c=!a||J.test(a),l=v(e.date2);return{nodes:[w({"@type":"Event","@id":`${t}#event`,name:e.title,url:t,startDate:o,endDate:l,eventStatus:"https://schema.org/EventScheduled",eventAttendanceMode:c?"https://schema.org/OnlineEventAttendanceMode":"https://schema.org/OfflineEventAttendanceMode",location:c?{"@type":"VirtualLocation",url:t}:{"@type":"Place",name:a,address:{"@type":"PostalAddress",name:a}},image:V(e)?p(T(t)):void 0,organizer:p(C(s)),performer:this.speakerNames().map(k=>({"@type":"Person",name:k})),mainEntityOfPage:p(b(t)),inLanguage:D(e.siteHandle)})],breadcrumbAncestors:i,webPageProps:{mainEntity:p(`${t}#event`)}}}speakerNames(){return(this.pageData.speakers??[]).map(t=>t?.title).filter(t=>typeof t=="string"&&!!t)}}const Q={key:1},q=N({name:"event-page",__name:"event-entry-type",props:{pageData:{}},async setup(u){let e,t;const s=u,o=P(),n=new K(s.pageData);x(`event-${s.pageData.id}`,()=>n.getSchemaContribution());const{data:r}=([e,t]=S(async()=>O(`event-formatted-${o}-${s.pageData.id}`,async()=>(await n.init(),n.format()))),e=await e,t(),e);if(!r.value)throw new Error("No formatted event data available");const i=$(),a=j("craft-cms");return i.public.DEBUG==="true"&&B(()=>a.log("Formatted event: ",r.value)),(c,l)=>(g(),y(G,{class:"flow"},{default:I(()=>[d(r)?(g(),y(U,{key:`module-${d(n).pageData.id}`,module:d(r)},null,8,["module"])):(g(),L("div",Q))]),_:1}))}}),he=Object.assign(q,{__name:"EventEntryType"});export{he 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.