PageSourceSearch

https://artbrut.ch/_nuxt/D_G0gJJ3.js

js artbrut.ch collected 2026-10-01 11:28:28 UTC 3,714 bytes, 1 lines download raw bytes

1import{X as x,l as o}from"#entry";const I=()=>{const r=x(),l=async()=>{const{find:t}=o("events"),s=await t({populate:{seo:{populate:"*"},cover:!0,children:{populate:["resources","resources.medias","resources.medium"],sort:["start:desc"]},parent:!0,event_type:!0,resources:{populate:"*"},tags:!0}});return{data:s.data.map(a),meta:s.meta}},m=async t=>{const{find:s}=o("events"),e=new Date().toISOString().split("T")[0],n=await s({filters:{start:{$lte:e},end:{$gte:e},event_type:{documentId:{$in:[r.refs.event_types.exposition_permanente,r.refs.event_types.exposition_temporaire]}}},locale:t,sort:["start:asc"],populate:{seo:{populate:"*"},cover:!0,children:!0,parent:!0,event_type:!0,resources:{populate:"*"},tags:!0,slots:!0}});return{data:n.data.map(a).sort((p,i)=>p.event_type?.documentId.localeCompare(i.event_type?.documentId||"")||0),meta:n.meta}},f=async(t,s)=>{const{find:e}=o("events"),n=new Date().toISOString(),p=await e({filters:{end:{$lte:n},event_type:{documentId:{$in:[r.refs.event_types.exposition_permanente,r.refs.event_types.exposition_temporaire]}}},locale:t,sort:["start:desc"],populate:{seo:{populate:"*"},cover:!0,children:!0,parent:!0,event_type:!0,resources:{populate:"*"},tags:!0},...s});return{data:p.data.map(a),meta:p.meta}},v=async t=>{const{find:s}=o("events"),e=new Date().toISOString(),n=await s({filters:{start:{$gte:e},event_type:{documentId:{$in:[r.refs.event_types.exposition_permanente,r.refs.event_types.exposition_temporaire]}}},locale:t,sort:["start:asc"],populate:{seo:{populate:"*"},cover:!0,children:!0,parent:!0,event_type:!0,resources:{populate:"*"},tags:!0}});return{data:n.data.map(a),meta:n.meta}},_=async t=>{const{find:s}=o("events/find-agenda"),e=await s({sort:["start:asc"],populate:{seo:{populate:"*"},cover:!0,children:!0,parent:!0,event_type:!0,resources:{populate:"*"},tags:{populate:{tag_type:!0}},slots:!0},...t});return{data:u(e.data.map(a)),meta:e.meta}},y=async(t,s)=>{const{findOne:e}=o("events"),n=await e(t,{...s,populate:{seo:{populate:"*"},cover:!0,children:{populate:"*",sort:["start:desc"]},parent:!0,event_type:!0,resources:{populate:"*"},posts:{populate:"*"},artists:{populate:["resources","resources.medias","resources.medium"]},partenaires:{populate:"*"},slots:!0,tags:{populate:{tag_type:!0}},localizations:{populate:"*"},main:{on:{"shared.text":{populate:"*"},"shared.detail":{populate:"*"},"shared.resource":{populate:{resources:{populate:"*"}}},"shared.form":{populate:{form:{populate:["input","input.options"]}}}}}}});return n.data.children=u(n.data.children.map(a)),{data:a(n.data)}},g=async t=>{const{find:s}=o("event-types");return await s({sort:["name:asc"],locale:t,populate:"*"})},a=t=>{const s=t.resources.find(e=>e.medium&&(e.medium.documentId===r.refs.medium.affiches||e.medium.documentId===r.refs.medium.oeuvres));return{...t,isExpo:c(t),isPermanent:d(t),thumbnail:t?.cover??s??null}},c=t=>[r.refs.event_types.exposition_permanente,r.refs.event_types.exposition_temporaire].includes(t.event_type?.documentId),d=t=>t.event_type?.documentId===r.refs.event_types.exposition_permanente,u=t=>{const s=Date.now();return t.filter(e=>e.end?new Date(e.end).getTime()>=s:e.start?new Date(e.start).getTime()+864e5>=s:!0).sort((e,n)=>{const p=new Date(e.start).getTime(),i=new Date(n.start).getTime();return p-i})};return{isExpo:c,isPermanent:d,find:l,findOne:y,findCurrentExpos:m,findNextsExpo:v,findTypes:g,findNextEvents:_,findArchiveExpos:f,slotMapper:(t,s)=>{const e=t.slots.find(n=>n.id==s);return e?{...t,start:e.start,...e.end&&{end:e.end},...e.tickets_title&&{tickets_title:e.tickets_title},...e.tickets&&{tickets:e.tickets},...e.sold_out&&{sold_out:e.sold_out},...e.seats&&{seats:e.seats}}:t},getUpcomingSlots:u}};export{I as u};

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.