1function init(){}document.addEventListener("DOMContentLoaded",init),document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".exhibitions").forEach(function(a,s){{var g=a;let e="exhibition-"+(a=s),d=g.querySelector(".exhibitions-grid"),r=g.querySelector(".exhibitions-pagination"),c=g.querySelector(".prev-page"),p=g.querySelector(".next-page"),h=g.querySelector(".pagination-numbers"),f=g.querySelector("#exhibitions-loading"),u=g.querySelector("#no-exhibitions-message"),t=(d&&(d.id=e+"-grid"),r&&(r.id=e+"-pagination"),c&&(c.id=e+"-prev-page"),p&&(p.id=e+"-next-page"),h&&(h.id=e+"-pagination-numbers"),f&&(f.id=e+"-loading"),u&&(u.id=e+"-no-message"),1),x=1,i=g.dataset.exhibitionType||"current",n=g.dataset.lang||"fi";function o(t,e="fi",o=1,l=!1){f&&(f.style.display="block"),d&&(d.style.display="none"),u&&(u.style.display="none"),r&&r.classList.add("hidden");let i=exhibitions_data.rest_url;var n=[];t&&n.push("type="+encodeURIComponent(t)),e&&n.push("lang="+encodeURIComponent(e)),1<o&&n.push("page="+encodeURIComponent(o)),0<n.length&&(i+="?"+n.join("&")),fetch(i,{method:"GET",headers:{"Content-Type":"application/json","X-WP-Nonce":exhibitions_data.nonce}}).then(e=>{if(e.ok)return e.json();throw new Error("Network response was not ok")}).then(e=>{if(f&&(f.style.display="none"),l||((n=new URL(window.location)).searchParams.set("page",o),n.searchParams.set("type",t),window.history.pushState({},"",n)),e&&e.exhibitions&&0<e.exhibitions.length){if(d){for(;d.firstChild;)d.removeChild(d.firstChild);e.exhibitions.forEach(function(e){e=(e=>{let t=e.acf.place??"",i=e.acf.start_date??"",n=e.acf.end_date??"",a=e.acf.extra_title??"",s="serlachius-black",o="serlachius-beige-dark",l='<a href="'+e.permalink+'" class="flex flex-col h-full no-underline group hover:no-underline">';l=(l+='<div class="flex flex-col justify-end min-h-2xl mb-contents"><div class="flex justify-between items-end w-full">')+'<p class="text-body text-'+s+'">'+e.post_title+"</p>",t&&(l+='<p class="text-caption text-'+o+' text-right ml-2">'+t+"</p>"),l+="</div></div>";var d=e.acf.grid_listing_image?e.acf.grid_listing_image.url:e.featured_media_url;return l=(l+='<div class="relative w-full overflow-hidden aspect-[3/2]">')+(d?'<img src="'+d+'" class="object-cover w-full h-full" alt="'+e.post_title+'" />':'<div class="w-full h-full bg-serlachius-grey"></div>')+'</div><div class="flex justify-between items-start mt-contents">',i||n?(l+='<div class="flex flex-col">',i&&(l+='<p class="whitespace-nowrap text-caption text-'+o+'">'+i+"</p>"),n&&(l+='<p class="whitespace-nowrap text-caption text-'+o+'">â'+n+"</p>"),l+="</div>"):l+="<div></div>",a&&(l+='<h3 class="mt-0 text-right text-body text-'+s+'">'+a+"</h3>"),l+="</div></a>"})(e);d.insertAdjacentHTML("beforeend",e)}),d.style.display="grid"}if((n=e.pagination)&&r&&c&&p&&h){var{current_page:i,total_pages:n}=n;if(1<(x=n)){for(r.classList.remove("hidden"),c.disabled=i<=1,p.disabled=n<=i;h.firstChild;)h.removeChild(h.firstChild);let t=Math.max(1,i-2);var a,s=Math.min(n,t+4);1<(t=s-t<4?Math.max(1,s-4):t)&&(h.insertAdjacentHTML("beforeend",b(1,1===i)),2<t)&&((a=document.createElement("span")).className="text-caption",a.textContent="...",h.appendChild(a));for(let e=t;e<=s;e++)h.insertAdjacentHTML("beforeend",b(e,i===e));s<n&&(s<n-1&&((a=document.createElement("span")).className="text-caption",a.textContent="...",h.appendChild(a)),h.insertAdjacentHTML("beforeend",b(n,i===n)))}else r.classList.add("hidden")}l||(e=document.querySelector("header")?.offsetHeight||0,window.scrollTo({top:g.offsetTop-e,behavior:"smooth"}))}else u&&(u.style.display="block"),d&&(d.style.display="none"),r&&r.classList.add("hidden")}).catch(e=>{console.error("Failed to fetch exhibition data:",e),f&&(f.style.display="none"),u&&(u.textContent="Error loading exhibitions. Please try again later.",u.style.display="block"),d&&(d.style.display="none"),r&&r.classList.add("hidden")})}function b(e,t){return`<button class="page-number w-[40px] h-[40px] flex items-center justify-center ${t?"border border-serlachius-black-fade rounded-[4px] text-serlachius-black-fade":""} text-caption" data-page="${e}">${e}</button>`}o(i=g.dataset.exhibitionType?g.dataset.exhibitionType:i,n,t,!0),c&&c.addEventListener("click",function(){1<t&&(t--,o(i,n,t,!1))}),p&&p.addEventListener("click",function(){t<x&&(t++,o(i,n,t,!1))}),h&&h.addEventListener("click",function(e){e.target.classList.contains("page-number")&&(t=parseInt(e.target.dataset.page),o(i,n,t,!1))})}})})
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.