1import{_}from"./DvR3v518.js";import{u as k}from"./BPctP0MR.js";import{j as C,T as $,az as p,n as f,p as v,o as q,f as A,s as M,v as n,a9 as N}from"./-1zjGLeH.js";import{u as T}from"./CWEtnKaA.js";import"./qVsTELv-.js";import"./Bkw3kgpN.js";import"./0femyjSb.js";import"./7JICTxpt.js";import"./CRFg-YkS.js";import"./DeC6fnQj.js";import"./1WFP_eP6.js";import"./CIRx1xN5.js";import"./DRhrThAR.js";import"./CDFOVAVM.js";import"./DY0JdvRW.js";import"./-ct8vmJR.js";import"./BhOmvyS8.js";import"./akrcbl44.js";import"./3ePl0tU_.js";import"./DjLPlln0.js";import"./D36Sy10y.js";import"./Dow2e-p7.js";import"./cxedowXA.js";import"./BZmFqDWF.js";import"./CHdmDcqG.js";import"./Blmw96Do.js";import"./BMnEI3yF.js";import"./C6_8irzy.js";import"./5YikrUVJ.js";const E="media_relations_contact",st=C({__name:"[slug]",async setup(I){let o,s;const e=$(),{fetchObjectWithLinkedItems:y}=k(),i=n(()=>String(e.params.year||"")),c=n(()=>String(e.params.slug||""));function a(t){if(Array.isArray(t)){const r=t[0];return typeof r=="string"&&r.trim()?r:void 0}return typeof t=="string"&&t.trim()?t:void 0}if(!/^\d{4}$/.test(i.value)||!c.value)throw p({statusCode:404,statusMessage:"Not Found"});const u=n(()=>c.value.toLowerCase());c.value!==u.value&&([o,s]=f(()=>N({path:`/news-stories/newsroom/${i.value}/${u.value}`,query:e.query,hash:e.hash},{})),await o,s());const l=n(()=>e.query.preview==="true"),d=n(()=>`/news-stories/newsroom/${i.value}/${u.value}`);async function g(){try{return await y(E,{preview:l.value,depth:2,kontentToken:a(e.query.kontentToken),language:a(e.query.language)})}catch(t){return console.error("[newsContact] Error fetching News contact:",t),{item:null,linkedItemMap:{}}}}async function w(){return await $fetch("/api/articles/resolve-by-path",{query:{fullPath:d.value,preview:l.value?"true":void 0,kontentToken:a(e.query.kontentToken),language:a(e.query.language)}})}const{data:m,pending:h}=([o,s]=f(async()=>T(()=>`news-article:${i.value}:${u.value}:${l.value?"preview":"live"}:${a(e.query.language)||"default"}`,async()=>{const[t,r]=await Promise.all([w(),g()]);return t?{...t,newsContact:r.item,linkedItemMap:{...t.linkedItemMap,...r.linkedItemMap}}:null},{watch:[()=>e.fullPath],server:!0})),o=await o,s(),o);if(!h.value&&!m.value)throw p({statusCode:404,statusMessage:"Not Found"});return(t,r)=>v(m)?(q(),A(_,{key:0,content:v(m)},null,8,["content"])):M("",!0)}});export{st 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.