PageSourceSearch

https://www.politico.eu/wp-content/themes/politico/dist/js/5263.020059c395c0e9dc3e73.chunk.js

js politico.eu collected 2026-09-24 06:04:27 UTC 18,746 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkpolitico_theme=self.webpackChunkpolitico_theme||[]).push([[5263],{5263:function(t,e,s){s.d(e,{default:function(){return p}});var a=s(1068),i=JSON.parse('{"dateTime":"%A %e %B %Y à %X","date":"%d/%m/%Y","time":"%H:%M:%S","periods":["AM","PM"],"days":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"shortDays":["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],"months":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],"shortMonths":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."]}'),n=s.t(i,2),o=JSON.parse('{"dateTime":"%A, der %e. %B %Y, %X","date":"%d.%m.%Y","time":"%H:%M:%S","periods":["AM","PM"],"days":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"shortDays":["So","Mo","Di","Mi","Do","Fr","Sa"],"months":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"shortMonths":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]}'),r=s.t(o,2),h=JSON.parse('{"dateTime":"%a %e %b %X %Y","date":"%d/%m/%Y","time":"%H:%M:%S","periods":["AM","PM"],"days":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"shortDays":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"months":["January","February","March","April","May","June","July","August","September","October","November","December"],"shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}'),d=s.t(h,2);const l={fr:{approve:"Approuvent",disapprove:"Désapprouvent",undecided:"Indécis","no opinion":"Sans opinion",yes:"Oui",no:"Non","show more":"Afficher plus","show less":"Afficher moins"},de:{approve:"Zustimmung",disapprove:"Ablehnung",undecided:"Unentschieden","no opinion":"Keine Meinung",yes:"Ja",no:"Nein","show more":"Mehr anzeigen","show less":"Weniger anzeigen"},es:{approve:"Aprobar",disapprove:"Desaprobar",undecided:"Indeciso","no opinion":"Sin opinión",yes:"Sí",no:"no","show more":"Mostrar más","show less":"Mostrar menos"},it:{approve:"Approvano",disapprove:"Disapprovano",undecided:"Indecisi","no opinion":"Senza opinione",yes:"Sì",no:"no","show more":"Mostra di più","show less":"Mostra di meno"},pl:{approve:"Zatwierdź",disapprove:"Odrzuć",undecided:"Nie zdecydowano","no opinion":"Bez opinii",yes:"Tak",no:"Nie","show more":"Pokaż więcej","show less":"Pokaż mniej"},pt:{approve:"Aprovar",disapprove:"Desaprovar",undecided:"Indeciso","no opinion":"Sem opinião",yes:"Sim",no:"Não","show more":"Mostrar mais","show less":"Mostrar menos"},ro:{approve:"Aproba",disapprove:"Respinge",undecided:"Indecis","no opinion":"Fără opinie",yes:"Da",no:"Nu","show more":"Arată mai mult","show less":"Arată mai puțin"},sv:{approve:"Godkänner",disapprove:"Ogodkänner",undecided:"Oavgjort","no opinion":"Ingen åsikt",yes:"Ja",no:"Nej","show more":"Visa mer","show less":"Visa mindre"},nl:{approve:"Goedkeuren",disapprove:"Afkeuren",undecided:"Onbeslist","no opinion":"Geen mening",yes:"Ja",no:"Nee","show more":"Meer weergeven","show less":"Minder weergeven"},hu:{approve:"Elfogad",disapprove:"Elutasít",undecided:"Határozatlan","no opinion":"Nincs vélemény",yes:"Igen",no:"Nem","show more":"Többet mutat","show less":"Kevesebbet mutat"},bg:{approve:"Одобряват",disapprove:"Не одобряват",undecided:"Не са решили","no opinion":"Без мнение",yes:"Да",no:"Не","show more":"Покажи повече","show less":"Покажи по-малко"},cs:{approve:"Schvalují",disapprove:"Neschvalují",undecided:"Nerozhodnuto","no opinion":"Bez názoru",yes:"Ano",no:"Ne","show more":"Zobrazit více","show less":"Zobrazit méně"},da:{approve:"Godkender",disapprove:"Afviser",undecided:"Ikke afgjort","no opinion":"Ingen mening",yes:"Ja",no:"Nej","show more":"Vis mere","show less":"Vis mindre"},et:{approve:"Heaks kiitma",disapprove:"Mitte heaks kiitma",undecided:"Otsustamata","no opinion":"Pole arvamust",yes:"Jah",no:"Ei","show more":"Näita rohkem","show less":"Näita vähem"},el:{approve:"Εγκρίνουν",disapprove:"Απορρίπτουν",undecided:"Αναποφάσιστοι","no opinion":"Χωρίς άποψη",yes:"Ναι",no:"Όχι","show more":"Εμφάνιση περισσότερων","show less":"Εμφάνιση λιγότερων"},fi:{approve:"Hyväksyvät",disapprove:"Hylkäävät",undecided:"Ei päätetty","no opinion":"Ei mielipidettä",yes:"Kyllä",no:"Ei","show more":"Näytä lisää","show less":"Näytä vähemmän"},ga:{approve:"Aontaíonn",disapprove:"Diúltaíonn",undecided:"Gan cinneadh","no opinion":"Gan tuairim",yes:"Sea",no:"Níl","show more":"Taispeáin níos mó","show less":"Taispeáin níos lú"},hr:{approve:"Odobravaju",disapprove:"Ne odobravaju",undecided:"Neodlučni","no opinion":"Bez mišljenja",yes:"Da",no:"Ne","show more":"Prikaži više","show less":"Prikaži manje"},lv:{approve:"Apstiprina",disapprove:"Noraida",undecided:"Nav izlemts","no opinion":"Nav viedokļa",yes:"Jā",no:"Nē","show more":"Rādīt vairāk","show less":"Rādīt mazāk"}};var p=()=>{const t={plots:{},lang:document.documentElement.lang??"en",getLocale(){switch(this.lang){case"fr":return a.cAw(n);case"de":return a.cAw(r);default:return a.cAw(d)}},defaultMargin:{top:30,right:40,bottom:50,left:40},parseTime:a.T6w("%Y-%m-%d"),minDist:18,getFormatForMeasure(t){return null===t?t=>t:"p"===t?t=>`${a.GPZ(".0f")(t)} %`:"d"===t?t=>`∆ ${a.GPZ(".0f")(t)}`:"s"===t&&a.GPZ(".0f")},init(s,a){const i=this.plots[s];i.initialized||(i.initialized=!0,t.getLocale(),i.plot=new e(s,i.div,i.month,a))},add(t,e,s){const a={initialized:!1,month:s,div:e,plot:null};this.plots[t]=a},destBetween(t,e){return e.y-t.y},monthBetween(t){const e=[t[0].getFullYear(),t[0].getMonth()],s=[t[1].getFullYear(),t[1].getMonth()];return 12*(s[0]-e[0])+(s[1]-e[1])},reposition(t,e,s){let a,i,n,o,r,h,d,l,p;const c=[...t],m=c.length;if(m>1){for(c.sort(s),a=0;a<m;a+=1)c[a].mean=c[a].y;for(;;){for(i=[],a=0;a<m-1;a+=1)n=s(c[a+1],c[a]),n<e-.01&&i.push(a);if(0===i.length)break;for(;i.length>0;){const[t]=i;let s=t;for(a=1;a<i.length&&i[a]===t+1;a+=1)s=i[a];for(o=t,r=s+1,a=o-1;a>=0&&c[a].mean===c[a+1].mean;a-=1)o=a;for(a=r+1;a<m&&c[a].mean===c[a-1].mean;a+=1)r=a;for(h=r-o+1,d=0,a=o;a<=r;a+=1)d+=c[a].y;for(d/=h,l=d-(h-1)*e/2,a=o;a<=r;a+=1)p=l+(r-a)*e,c[a].y=p,c[a].mean=d;for(a=t;a<=s;a+=1)i.splice(i.indexOf(a),1)}}}return c},switchTime(t,e){const s=document.querySelector(`.pop-d3-time-selection-${t}`);if(s){const t=s.querySelector(".active");t&&t.classList.remove("active")}if(this.plots[t].plot.showLastMonth(e),s){const t=s.querySelector(`[data-month="${e}"]`);t&&t.classList.add("active")}},switchTrend(t,e){const s=document.querySelector(`.pop-d3-trend-selection-${t}`);if(s){const t=s.querySelector(".active");t&&t.classList.remove("active")}if(this.plots[t].plot.switchTrend(e),s){const t=s.querySelector(`[data-trend="${e}"]`);t&&t.classList.add("active")}},drawDot(t,e,s,a){t.beginPath(),t.fillStyle=a,t.arc(e,s,2,0,2*Math.PI,!0),t.fill()},translate(e){const s=t.lang;return l[s]?.[e?.trim().toLowerCase()]??e}};function e(e,s,a,i){this.data={polls:[],results:[],trends:{},parties:[],events:[]},this.code=e,this.div=document.getElementById(s),this.div.innerHTML='<svg aria-hidden="true" focusable="false" role="img" class="pop-spinner" width="50" height="50" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<rect x="0" y="0" width="100" height="100" fill="none"></rect>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<circle class="pop-spinner-circle" cx="50" cy="50" r="40" stroke="#999999" fill="none" stroke-width="6" stroke-linecap="round"></circle>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</svg>',this.margin=t.defaultMargin,this.width=this.div.offsetWidth-this.margin.left-this.margin.right,this.height=this.div.offsetHeight-this.margin.top-this.margin.bottom,this.init(
1a,i)}e.prototype.init=function(e,s){this.x=a.w7C().range([0,this.width]),this.y=a.m4Y().range([this.height,0]),this.bisectDate=a.ylB((t=>t.date)).right,this.light=s,a.Pq9(window.pollOfPollData.endpoint+this.code).then((s=>{this.data.parties=s.parties,this.data.options=s.options;(0!==s.polls.length?s.polls:s.trends.kalmanSmooth).forEach((e=>{Object.keys(e.parties).forEach((s=>{"NA"!==e.parties[s]&&this.data.polls.push({date:t.parseTime(e.date),party:s,value:e.parties[s]})}))})),s.results?.forEach((e=>{Object.keys(e.parties).forEach((s=>{"NA"!==e.parties[s]&&this.data.results.push({date:t.parseTime(e.date),party:s,value:e.parties[s]})}))})),(s.events??[]).filter((t=>t.name_short)).filter((e=>{const s=t.monthBetween([new Date(e.date),new Date]);return null===e.visible_max_month||s<=e.visible_max_month})).forEach((e=>{this.data.events.push({date:t.parseTime(e.date),name_short:e.name_short})})),Object.keys(s.trends).forEach((t=>{this.trendType=t,this.data.trends[t]=this.prepareTrendData(s.trends[t])}));const a="kalmanSmooth";a in this.data.trends&&(this.trendType=a),this.showLastMonth(e)}))},e.prototype.prepareSvg=function(){this.div.textContent="",this.div.chartWrapper=document.getElementById("poll-of-polls-wrapper"),this.div.chartWrapper?this.svg=a.Ltv(this.div).append("svg").attr("viewBox",`0 0 ${this.width+this.margin.left+this.margin.right} ${this.height+this.margin.top+this.margin.bottom}`).attr("class","colorize").classed("svg-content",!0).append("g").attr("transform",`translate(${this.margin.left},${this.margin.top})`):this.svg=a.Ltv(this.div).append("svg").attr("width",this.width+this.margin.left+this.margin.right).attr("height",this.height+this.margin.top+this.margin.bottom).attr("class","colorize").append("g").attr("transform",`translate(${this.margin.left},${this.margin.top})`),this.canvas=a.Ltv(this.div).append("canvas").attr("width",this.width).attr("height",this.height).style("transform",`translate(${this.margin.left}px, -${this.height+2*this.margin.top}px`).attr("class",`canvas-plot canvas-time-${this.month}`),this.canvasContext=this.canvas.node().getContext("2d"),this.trend=this.svg.append("g").attr("class","trend"),this.events=this.svg.append("g").attr("class","events"),this.focus=this.svg.append("g").attr("class","focus"),this.focus.append("line").attr("class","line").classed("x",!0),this.focus.append("line").attr("class","line").classed("y",!0),this.focus.append("text").attr("class","date").attr("text-anchor","middle")},e.prototype.prepareTrendData=function(e){const s={lines:{},entries:[]};if(Object.keys(this.data.parties).forEach((t=>{Object.prototype.hasOwnProperty.call(this.data.parties,t)&&(s.lines[t]=[])})),this.light){const t=[];e.forEach((e=>{new Date(e.date)<new Date-31536e6||Object.keys(e.parties).forEach((s=>{e.parties[s]>=4&&t.push(s)}))})),Object.keys(s.lines).forEach((e=>{t.includes(e)||delete s.lines[e]}))}return e.forEach((e=>{const a={...e};a.date=t.parseTime(a.date),Object.keys(a.parties).forEach((t=>{Object.keys(s.lines).includes(t)||delete a.parties[t]})),s.entries.push(a),Object.keys(s.lines).forEach((t=>{t in a.parties&&!Number.isNaN(a.parties[t])&&s.lines[t].push({date:a.date,value:a.parties[t]})}))})),s},e.prototype.getDurationForMonth=function(t){let e;if("undefined"===typeof t||""===t||"-1"===t)return 0===this.data.polls?e=a.Xxv(this.data.trends[this.trendType].entries,(t=>t.date)):(e=a.Xxv(this.data.polls,(t=>t.date)),e[1].setDate(e[1].getDate()+3)),e;const s=new Date;s.setMonth(s.getMonth()-t);return[s,new Date]},e.prototype.showLastMonth=function(t){this.timeDomain=this.getDurationForMonth(t),this.month=t,this.plot()},e.prototype.switchTrend=function(t){this.trendType=t,t in this.data.trends?this.plot():a.Pq9(`${window.pollOfPollData.trend+this.code}/${this.trendType}`).then((e=>{this.data.trends[t]=this.prepareTrendData(e),this.plot()}))},e.prototype.plot=function(){let e,s;this.prepareSvg(),this.x.domain(this.timeDomain),e=null,s=null,0===this.data.polls.length?(e=this.data.trends[this.trendType].entries,s=t=>Math.max(Array.from(Object.values(t.parties)))):(e=this.data.polls,s=t=>t.value);const i=this.bisectDate(e,this.timeDomain[0],0,e.length-1);if(this.yDomain=[0,1.05*a.T9B(e.slice(i),s)],this.y.domain(this.yDomain),this.formatO=t.getFormatForMeasure(this.data.options.measure),this.formatY=t.getFormatForMeasure(this.data.options.measure),!this.light){const t=a.l78(this.x);t.tickFormat((function(t){return a.hed(t)<t?a.DCK("%b")(t):a.DCK("%Y")(t)})),this.svg.append("g").attr("transform",`translate(0,${this.height}
1)`).call(t).selectAll("text").attr("transform","rotate(-45)").style("text-anchor","end");const e=a.V4s(this.y);e.tickFormat(this.formatY),this.svg.append("g").call(e),this.plotPolls(),this.plotResults(),this.plotEvents()}this.plotTrend()},e.prototype.plotTrend=function(){const e=this,s=a.n8j().x((t=>this.x(t.date))).y((t=>this.y(t.value)));Object.keys(this.data.trends[this.trendType].lines).forEach((t=>{this.data.trends[this.trendType].lines[t].length>0&&this.trend.append("path").data([this.data.trends[this.trendType].lines[t]]).attr("class",`line trend-${t} stroke-${this.code}-${t}`).attr("d",s)})),Object.keys(this.data.parties).forEach((e=>{Object.prototype.hasOwnProperty.call(this.data.parties,e)&&(this.focus.append("text").attr("class",`trend-ov-name-${e} fill-${this.code}-${e}`).text(t.translate(this.data.parties[e])).attr("text-anchor","end"),this.focus.append("text").attr("class",`trend-ov-value-${e} fill-${this.code}-${e}`).attr("text-anchor","end"))}));const i=()=>{this.showTrend(this.data.trends[this.trendType].entries[this.data.trends[this.trendType].entries.length-1].date,"mi")};this.svg.append("rect").attr("class","overlay").attr("width",this.light?this.width+this.margin.left:this.width).attr("height",this.height).style("translate",`-${this.light?this.margin.left:0}px`).on("mouseout",i).on("touchend",i).on("mousemove",(t=>{const s=a.WnM(t),i=this.light?this.margin.left:0;e.showTrend(e.x.invert(s[0]-i))})).on("touchmove",(t=>{const s=a.WnM(t.touches[0],this),i=this.light?this.margin.left:0;e.showTrend(e.x.invert(s[0]-i))})),i()},e.prototype.plotPolls=function(){const e=this.data.polls.filter((e=>{const s=t.monthBetween([new Date(e.date),new Date]);return!(this.month>0)||s<=this.month})),s=e.map((t=>t.party)).filter(((t,e,s)=>s.indexOf(t)===e)),a={},i=document.querySelectorAll(".pop-d3");s.forEach((t=>{const e=t.trim().toLowerCase();i.forEach((t=>{const s=t.getAttribute(`data-${e}-color`);
1s&&(a[e]=s)}))})),e.forEach((e=>{t.drawDot(this.canvasContext,this.x(e.date),this.y(e.value),a[e.party.toLowerCase()]??"#6b6767")}))},e.prototype.plotResults=function(){if(!this.data.results)return;this.svg.selectAll("dot").data(this.data.results).enter().append("rect").attr("class",(t=>`poll-dot fill-${this.code}-${t.party} election`)).attr("x",(t=>this.x(t.date)-4)).attr("y",(t=>this.y(t.value)-4)).attr("width",8).attr("height",8)},e.prototype.plotEvents=function(){const t=this.y(this.yDomain[1]);let e,s,a,i,n,o=14*Math.max(0,this.data.events.length-1);Object.keys(this.data.events).forEach((r=>{if(Object.prototype.hasOwnProperty.call(this.data.events,r)){if(e=this.data.events[r],s=this.x(e.date),a=s+3,i=t-2+o,n=0,o-=14,s<=0)return;const h=5.5*e.name_short.length;let d="middle";a>=this.width-h/2&&(a=this.width-h,d="start"),a<=h/2&&a>0&&(a=0,d="start"),this.events.append("text").attr("class","date").attr("text-anchor",d).attr("x",a).text(e.name_short).attr("transform",`rotate(0 ${a} ${i})`).attr("y",i),this.events.append("line").attr("class","line").attr("x1",s-7).attr("x2",s+7).attr("y1",i+3).attr("y2",i+3),this.events.append("line").attr("class","line").attr("x1",s).attr("x2",s).attr("y1",this.y(0)).attr("y2",i+3)}}))},e.prototype.showTrend=function(e,s){let i,n,o;const r="undefined"!==typeof s?s:"mo";this.svg.attr("class",r);const h=this.bisectDate(this.data.trends[this.trendType].entries,e,0,this.data.trends[this.trendType].entries.length-1);i=[];const d=[];Object.keys(this.data.parties).forEach((t=>{t in this.data.trends[this.trendType].entries[h].parties?(n=this.data.trends[this.trendType].entries[h].parties[t],Number.isNaN(n)?d.push(t):(o=Math.round(100*this.y(n))/100,i.push({value:n,y:o,party:t}))):d.push(t)}));const l=this.data.trends[this.trendType].entries.reduce(((t,e)=>t.date>e.date?t:e));let p=this.x(l.date),c=this.x(e);const m={parties:{}},{results:u}=this.data;for(const t of u){const e=this.x(t.date);p=e>p?e:p,!this.light&&c>=e-4&&c<=e+4&&(c=e,m.date=t.date,m.parties[t.party]=t.value,i.map((e=>(e.party===t.party&&(e.value=t.value,e.y=Math.round(100*this.y(t.value))/100),e))))}c=Math.min(c,p),i=t.reposition(i,t.minDist,t.destBetween),i.forEac
1h((t=>{const e=this.light&&c<=(this.width-this.margin.left)/2;this.focus.select(`text.trend-ov-name-${t.party}`).attr("x",e?Math.max(c+4,4):Math.max(c-4,-4)).attr("y",t.y).attr("text-anchor",e?"start":"end").style("display",null),this.focus.select(`text.trend-ov-value-${t.party}`).attr("x",e?Math.max(c-4,-4):Math.max(c+4,4)).attr("y",t.y).attr("text-anchor",e?"end":"start").text(this.formatO(m.parties[t.party]??t.value)).style("display",null)})),d.forEach((t=>{this.focus.select(`text.trend-ov-name-${t}`).style("display","none"),this.focus.select(`text.trend-ov-value-${t}`).style("display","none")}));const v=this.y(this.yDomain[1]);this.focus.select("text.date").attr("x",Math.max(c,0)).text(a.DCK("%b %d, %Y")(m.date??this.data.trends[this.trendType].entries[h].date)).attr("y",v-20).style("display",null),this.focus.select("line.y").attr("x1",c-15).attr("x2",c+15).attr("y1",v-15).attr("y2",v-15),this.focus.select("line.x").attr("x1",c).attr("x2",c).attr("y1",this.y(0)).attr("y2",v-15)};document.querySelectorAll(".pop-d3").forEach((e=>{const s=e.getAttribute("data-code"),a=e.getAttribute("data-month"),i=e.getAttribute("data-light"),n=e.getAttribute("id");t.add(s,n,a),t.init(s,i)}));const s=e=>{e.preventDefault();const s=e.target.getAttribute("data-month"),a=e.target.parentNode.getAttribute("data-code");t.switchTime(a,s)};document.querySelectorAll(".pop-d3-time-selection a").forEach((t=>{t.addEventListener("click",s)}));const i=e=>{e.preventDefault();const s=e.target.getAttribute("data-trend"),a=e.target.parentNode.getAttribute("data-code");t.switchTrend(a,s)};document.querySelectorAll(".pop-d3-trend-selection a").forEach((t=>{t.addEventListener("click",i)}));const o=e=>{const{target:s}=e,a=s.parentNode.parentNode;s.classList.contains("is-toggled")?(s.textContent=t.translate("Show more"),s.classList.remove("is-toggled"),a.classList.remove("is-all-polls-shown")):(s.textContent=t.translate("Show less"),s.classList.add("is-toggled"),a.classList.add("is-all-polls-shown"))},h=document.querySelectorAll(".js-polls-details-show-more");h&&h.forEach((t=>{t.addEventListener("click",o)}))}}}]);

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.