1import{d as z,B as A,w as D,a5 as F,o as e,f as s,g as m,Y as I,c as o,h as c,i as y,F as g,v as x,D as U,E as j,z as G,j as M,a6 as f,a2 as R,a4 as Q,s as O,t as W,l as Y,a7 as p,a8 as q,a9 as H}from"./BJT07f2_.js";import J from"./DsuKUKxM.js";import{_ as K}from"./cmsW9fXT.js";import{_ as X,a as Z}from"./CLFosihr.js";import ee from"./etoBUxY_.js";import{_ as te}from"./BMVjks06.js";import{s as ae}from"./DU9Mn7ZW.js";import{u as se}from"./BFlfCZNa.js";import"./CZcu0t5R.js";import"./C5Ctl_n6.js";import"./BfhheuB8.js";import"./DthHTbKD.js";import"./Bn7UrF56.js";import"./CJn-Rygv.js";import"./8uD2K01B.js";import"./DgZZqbTD.js";const le={key:2},oe={key:0,class:"rpl-grid"},re={class:"rpl-col-12 rpl-col-8-m"},ne={key:2,class:"rpl-type-label rpl-type-weight-bold rpl-u-margin-t-6"},pe="--local-grid-cols: 12",ce=z({__name:"ContentCollection",props:{description:{},link:{},searchQuery:{},display:{},hasSidebar:{type:Boolean}},async setup(r){let u,h;const _=r,v=Y(()=>_.hasSidebar?"rpl-col-12 rpl-col-6-s":"rpl-col-12 rpl-col-6-s rpl-col-4-m"),{$app_origin:b,$config:S}=A(),w=t=>{const l=p(t._source?.changed),n=p(t._source?.field_media_image_absolute_path);return{id:t._id,result:t._source,props:{el:"li",title:p(t._source?.title),url:H(p(t._source?.url),b||""),image:_.display.style==="thumbnail"&&n?{src:ae(n,S.public?.tide?.baseUrl)}:null,updated:l?q(l):"",type:p(t._source?.type)},slots:{default:p(t._source?.field_landing_page_summary)}}},k=f(null),C=f(!1),i=f(null),{data:B,error:d}=([u,h]=D(()=>se({body:_.searchQuery,transform:t=>t.hits?.hits?.map(w)})),u=await u,h(),u);return d.value?(F(d.value),k.value=d.value):i.value=B.value,C.value=!0,(t,l)=>{const n=I,P=J,$=K,L=Z,N=X,T=ee,V=te,E=G;return e(),s("div",null,[m(n,{class:"rpl-type-p rpl-u-margin-b-4",html:r.description},null,8,["html"]),k.value?(e(),o(n,{key:0},{default:c(()=>[...l[0]||(l[0]=[y("p",null,"Sorry! Something went wrong. Please try again later.",-1)])]),_:1})):C.value&&!i.value.length?(e(),o(n,{key:1},{default:c(()=>[...l[1]||(l[1]=[y("p",null,"Sorry! We couldn't find any matches.",-1)])]),_:1})):(e(),s("div",le,[r.display.type==="list"?(e(),s("div",oe,[y("div",re,[m(N,null,{default:c(()=>[(e(!0),s(g,null,x(i.value,a=>(e(),o(L,{key:a.id},{default:c(()=>[a.props.type==="grant"?(e(),o(P,{key:0,result:a.result,"data-type":"grant-result"},null,8,["result"])):(e(),o($,R({key:1,ref_for:!0},a.props,{content:a.slots.default,"data-type":"search-result"}),null,16,["content"]))]),_:2},1024))),128))]),_:1})])])):(e(),s("ul",{key:1,class:"rpl-grid",style:pe},[(e(!0),s(g,null,x(i.value,a=>(e(),s(g,{key:a.id},[a.props.type==="grant"?(e(),o(T,{key:0,result:a.result,"display-image":r.display.style==="thumbnail",class:Q(v.value),"data-type":"grant-card"},null,8,["result","display-image","class"])):(e(),o(V,R({key:1,class:v.value},{ref_for:!0},a.props,{"data-type":"promo-card"}),{default:c(()=>[O(W(a.slots.default),1)]),_:2},1040,["class"]))],64))),128))])),r.link?.url?(e(),s("div",ne,[m(E,U(j(r.link)),null,16)])):M("",!0)]))])}}}),we=Object.assign(ce,{__name:"TideLandingPageContentCollection"});export{we 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.