1import{C as e,D as a,E as t,Gt as l,J as s,Lt as o,M as i,N as r,Nt as m,T as c,Tt as n,Y as d,_ as u,fn as p,hn as f,it as g,st as y,w as h}from"./B8XHxhss.js";import{Et as w,F as b,Ht as x,J as B,_ as N,d as j,yt as v}from"#entry";import{t as _}from"./DnRsJ2ze.js";import{t as k}from"./Dcux_0w4.js";import{t as I}from"./B67sZZXI.js";import{t as S}from"./Dj0ALB3g.js";import{t as E}from"./BEcyyOxX.js";import{t as A}from"./CqvLaLzd.js";import{t as z}from"./nmS8ks872.js";import{t as V}from"./DCaAQXrX2.js";import{t as U}from"./CY4OPj1K.js";var C=j("node_modules/@limbo-works/citi-core/components/NewsCard.vue",()=>v(()=>import("./DDwxR-zc.js").then(e=>e.default||e),[],import.meta.url)),L={class:"d-news-list"},O=Object.assign({inheritAttrs:!1},{__name:"NewsList",props:{content:String,image:Object,title:String,teaser:String,items:Array,name:String,header:Object,contentElements:Array,settings:Object,search:Object,feedback:{type:Object,default:void 0},hideFeedback:{type:Boolean,default:!1},showImages:{type:Boolean,default:!0}},setup(j){S();const v=j,O=w(),D=o(null),R=o(E(v.search,{populate:O.query})),H=o(R.value.fieldByName.text?.value??"");function T(e=!1){e&&(R.value.fieldByName.text.value=H.value),d(()=>{D.value?.submit()})}const F=e(()=>D.value?.hasActiveFilters);function P(e){if(e?.length)return e.reduce((e,a)=>{let t=A(a.newsDate,{month:"long",year:"numeric"});t=t.charAt(0).toUpperCase()+t.slice(1);const l=e.find(e=>e.title===t)??{title:t,items:[]};return l.items.push(a),e.includes(l)||e.push(l),e},[])}return(e,o)=>{const d=z,w=I,v=V,S=C,E=_,A=k,O=U,W=b;return g(),a("article",L,[r(W,{name:"list-page-layout","block-list":j.contentElements},{afterHeader:n(()=>[l(R)?(g(),c(v,{key:0,role:"search",action:l(R).endpointUrl,method:l(R).method,class:"max-w-layout-max px-layout-margin mx-auto mt-lg relative flex flex-col >=656:flex-row >=656:flex-wrap >=656:items-end >=656:justify-start gap-x-gutter gap-y-xs mb-beforeBlocks",onSubmit:o[6]||(o[6]=x(()=>{},["prevent"]))},{default:n(()=>[l(R).fieldByName.categories?(g(),c(d,{key:0,modelValue:l(R).fieldByName.categories.value,"onUpdate:modelValue":o[0]||(o[0]=e=>l(R).fieldByName.categories.value=e),name:l(R).fieldByName.categories.name,placeholder:l(R).fieldByName.categories.placeholder,color:"surface",label:l(R).fieldByName.categories.label,items:l(R).fieldByName.categories.items,onChange:o[1]||(o[1]=e=>T())},null,8,["modelValue","name","placeholder","label","items"])):t("",!0),l(R).fieldByName.types?(g(),c(d,{key:1,modelValue:l(R).fieldByName.types.value,"onUpdate:modelValue":o[2]||(o[2]=e=>l(R).fieldByName.types.value=e),name:l(R).fieldByName.types.name,placeholder:l(R).fieldByName.types.placeholder,color:"surface",label:l(R).fieldByName.types.label,items:l(R).fieldByName.types.items,onChange:o[3]||(o[3]=e=>T())},null,8,["modelValue","name","placeholder","label","items"])):t("",!0),l(R).fieldByName.text?(g(),c(w,{key:2,modelValue:l(H),"onUpdate:modelValue":o[4]||(o[4]=e=>m(H)?H.value=e:null),type:"search",name:l(R).fieldByName.text.name,placeholder:l(R).fieldByName.text.placeholder,"aria-label":l(R).fieldByName.text.placeholder||("localize"in e?e.localize:l(N))("SEARCH_FIELD",{capitalize:!0}),"show-clear":!!l(H)||!!l(R).fieldByName.text?.value,class:">=656:ml-auto flex-shrink flex-grow >=960:max-w-7/12col >=1280:max-w-5/12col",onSubmit:o[5]||(o[5]=e=>T(!0))},null,8,["modelValue","name","placeholder","aria-label","show-clear"])):t("",!0)]),_:1},8,["action","method"])):t("",!0)]),default:n(()=>[r(O,{ref_key:"searchManager",ref:D,class:"mb-afterBlocks","search-filters":l(R),"result-noun":{singular:("localize"in e?e.localize:l(N))("NEWS_SINGULAR"),plural:("localize"in e?e.localize:l(N))("NEWS_PLURAL")},"show-all":!1,"mcp-tool-name":"news-search","mcp-tool-description":("localize"in e?e.localize:l(N))("PHRASE_SEARCH_NEWS")},{default:n(t=>[h("div",{class:p(["grid grid-cols-1 >=656:grid-cols-2 >=960:grid-cols-3 >=1280:grid-cols-4 gap-x-gutter",{"items-start gap-y-betweenBlocks":j.showImages&&l(F),"items-stretch gap-y-gutter":!j.showImages&&l(F)}])},[l(F)?(g(!0),a(u,{key:0},y(t.data,a=>(g(),c(S,s({id:a.id,key:a.id,"hydrate-on-visible":""},{ref_for:!0},{showImage:j.showImages,color:j.showImages?"transparent":"surface",...("objectSome"in e?e.objectSome:l(B))(a,["url","image","t
1itle","teaser"]),type:a.details?.type??a.newsType,date:a.details?.date??a.newsDate,hasfilter:l(F)}),null,16,["id"]))),128)):(g(!0),a(u,{key:1},y(P(t.data),(t,o)=>(g(),a("section",{key:t.title,class:p(["col-span-full",{"pt-betweenBlocks":o&&j.showImages,"pb-betweenBlocks":j.showImages,"pt-xl":o&&!j.showImages,"pb-xl":!j.showImages}])},[r(E,{class:"text-display-xs text-strong mb-1em"},{default:n(()=>[i(f(t.title),1)]),_:2},1024),r(A,{tag:"div",class:p(["grid grid-cols-1 >=656:grid-cols-2 >=960:grid-cols-3 >=1280:grid-cols-4 gap-x-gutter",{"items-start gap-y-betweenBlocks":j.showImages,"items-stretch gap-y-gutter":!j.showImages}])},{default:n(()=>[(g(!0),a(u,null,y(t.items,a=>(g(),c(S,s({id:a.id,key:a.id,"hydrate-on-visible":""},{ref_for:!0},{showImage:j.showImages,color:j.showImages?"transparent":"surface",...("objectSome"in e?e.objectSome:l(B))(a,["url","image","title","teaser"]),type:a.details?.type??a.newsType,date:a.details?.date??a.newsDate}),null,16,["id"]))),128))]),_:2},1032,["class"])],2))),128))],2)]),_:1},8,["search-filters","result-noun","mcp-tool-description"])]),_:1},8,["block-list"])])}}});export{O 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.