PageSourceSearch

https://www.politico.eu/wp-content/themes/politico/dist/js/372.c7b11001f36ec746e4fc.chunk.js

js politico.eu collected 2026-09-24 06:04:20 UTC 3,013 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkpolitico_theme=self.webpackChunkpolitico_theme||[]).push([[372],{372:function(t,e){e.default=()=>{const t=document.querySelectorAll(".load-more button");if(!t)return!1;function e(t,e,s=!0){let{page:n}=t,o={post_types:t.contentTypes,page:n+=1,tags:t.contentTags,article_size:t.articleSize,columns:t.columns,show_image:t.showImage,show_excerpt:t.showExcerpt,newsletter_type:t?.newsletterType,display_as_horizontal:t?.displayAsHorizontal,show_author:t?.showAuthors,show_date:t?.showDateTime,show_reading_time:t?.showReadTime,show_primary_section:t?.showPrimarySection,date_position:t?.datePosition,posts_per_page:t?.contentLimitWithPagination??0};o=JSON.stringify(o);const a=e,r=document.querySelector(".load-more .button__icon");r&&r.classList.add("is-loading"),fetch(`${window.politicoJS.contentListingEndpoint}?args=${o}`,{method:"GET"}).then((t=>{const e=parseInt(t.headers.get("X-WP-TotalPages"),10),s=a.closest(".content-listing").getElementsByClassName("load-more")[0];return s&&(n>=e?s.style.display="none":s.style.removeProperty("display")),t.json()})).then((t=>{const e=t.html?t.html:t.messages.empty,n=a.querySelectorAll(".card").length;s?a.innerHTML+=e:a.innerHTML=e,r&&r.classList.remove("is-loading"),a.classList.remove("is-loading");const o=a.querySelectorAll(".card")[n-1];if(!o)return;const i=o.querySelector("a");i&&setTimeout((()=>{i.focus()}),100)}))}const s=t=>{t.preventDefault(),t.target.disabled=!0;const s=t.target.closest(".content-listing").getElementsByClassName("content-listing__wrapper")[0];if(!s.dataset.blockAttributes)return;const n=t.target.closest(".content-listing").getElementsByClassName("content-listing__content")[0],o=JSON.parse(s.dataset.blockAttributes);let a=parseInt(s.dataset.page,10);o.page=a,a+=1,t.target.closest(".content-listing").getElementsByClassName("content-listing__wrapper")[0].dataset.page=a,e(o,n),t.target.disabled=!1},n=t=>{t.preventDefault();const s=t.currentTarget,n=s.closest(".latest-news--has-filters");if(!n)return;const o=n.querySelector(".content-listing__wrapper");if(!o||!o.dataset.blockAttributes)return;const a=Array.from(n.querySelectorAll(".js-latest-news__filter-btn")),r=a[0],i=n.querySelector(".filters__button-text"),l=[];let c=r.textContent;if(s===r)a.forEach((t=>{t.ariaChecked=!1})),r.ariaChecked=!0;else{s.ariaChecked="false"===s.ariaChecked;const t=a.filter((t=>"true"===t.ariaChecked));r.ariaChecked=!t.length,t.forEach((t=>{t.dataset.filterId&&l.push(t.dataset.filterId)}))}const d=a.filter((t=>"true"===t.ariaChecked));1===d.length?c=d[0].textContent:d.length>1&&(c="Filter"),i.textContent=c;const g=o.querySelector(".content-listing__content"),u=JSON.parse(o.dataset.blockAttributes);l.length?u.contentTags=[...l]:delete u.contentTags,o.dataset.blockAttributes=JSON.stringify(u),o.dataset.page=1,u.page=0,e(u,g,!1)};return(()=>{if(t)for(const e of t)e.addEventListener("click",s);document.querySelectorAll(".js-latest-news__filter-btn").forEach((t=>{t.addEventListener("click",n)}))})(),!0}}}]);

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.