1import{u as S}from"./CkX2swtM.js";import{C as b,d as x,p as N,D as I,E as R,e as A,w as B,v as m,h as r,f as g,G as w,g as G,m as L,H as M,k as n,o as y,I as O}from"./DRREkx-t.js";import{A as U}from"./UG8pIHQv.js";import{r as $,a as q}from"./5fMN4MKw.js";import{u as F}from"./BMq9mDWV.js";import{c as H}from"./B2eE2O7_.js";const _=b.entryTypeMapping??{},V=H("craft-cms"),f=_.pages_Entry??"div",j=()=>({resolveEntryType:s=>{if(!s)return f;const o=_[s]??f;return o||(V.warn(`No entry type mapping found for ${s}`),"div")}}),Z=x({__name:"[...slug]",async setup(v){let s,o;const p=N(),d=S(),h=I(),l=L().public.USE_CMS==="true",{resolveEntryType:C}=j(),{trimmedPath:E,pageRequestParams:i}=R(p),t=M(null),P=n(()=>{const e=t.value?.__typename;if(e!=="listing_Entry"&&e!=="author_Entry")return 1;const a=p.path.match(/\/page\/(\d+)\/?$/),u=parseInt(a?.[1]??"1",10);return Number.isFinite(u)&&u>0?u:1}),T=n(()=>{const e=t.value;return e?{...e,socialImage:q(e),ogType:$(e.__typename),paginationPage:P.value}:null});if(A(T),l){const e=([s,o]=B(()=>F("page",{uri:()=>i.value.uri,site:()=>i.value.site})),s=await s,o(),s);t.value=e.value,m(e,a=>{t.value=a})}const k=n(()=>t.value?.__typename??"pages_Entry"),c=n(()=>C(t.value?.__typename));return m(t,e=>{e&&(h.setPageOverrides(e.__typename,e.buttonLinks),d.addPage({uri:i.value.uri,title:e.title??"",ancestors:(e.ancestors??[]).map(a=>({title:a.title??void 0,url:a.url??void 0})),type:e.__typename,siteName:e.siteName??""}))},{immediate:!0}),(e,a)=>r(t)&&r(c)&&l?(y(),g(w(r(c)),{"page-data":r(t),key:r(E),type:r(k)},null,8,["page-data","type"])):(y(),g(U,{key:1,class:"flow"},{default:G(()=>[...a[0]||(a[0]=[O("div",{class:"spacer",style:{height:"200px"}},null,-1)])]),_:1}))}});export{Z 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.