PageSourceSearch

https://www.politico.eu/wp-content/themes/politico/dist/js/politico-fe-wizard.e1d5038f9648956e9c15.chunk.js

js politico.eu collected 2026-09-24 06:04:08 UTC 4,558 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkpolitico_theme=self.webpackChunkpolitico_theme||[]).push([[8716],{9514:function(e,t,n){n.d(t,{$O:function(){return c},Ho:function(){return l},bb:function(){return u}});var r=n(8987);const i="plnlreg",a=e=>btoa(e),o=(e,t)=>{if(!e.length)return!1;if("function"!==typeof window.btoa||"object"!==typeof s)return!1;const n=r.A.get(i);if(void 0===n)return!0;const o=a(e),d=JSON.parse(n);return!d||!d.id||d.id!==o||(!d.events||!Array.isArray(d.events)||!d.events.includes(t))},d=(e,t)=>{if("function"!==typeof window.btoa)return;const n=a(e),s={id:n},o=r.A.get(i);if(void 0===o)s.events=[t];else{const e=JSON.parse(o);e&&e.events&&Array.isArray(e.events)&&n===e.id?(e.events.push(t),s.events=e.events):s.events=[t]}r.A.set(i,JSON.stringify(s),{expires:30})},c=(e,t)=>{o(e,t)&&(s.events=t,s.tl(!0,"o","User Registration"),d(e,t))},l=(e,t)=>{let n=null;switch(t){case 1:n="event15";break;case 2:n="event16";break;case 3:n="event17";break;case 4:n="event18";break;default:n=t>=25&&t<=29?`event${t}`:null}n&&!o(e,n)||(s.events=n,s.tl(!0,"o","User Registration"),d(e,n))},u=()=>{const e=new URLSearchParams(window.location.search).get("newsletter"),t={newsletters:"",filteredNewsletters:"",count:0};if(e&&e.length){t.newsletters=e;const n=e.split(",");t.count=n.length,t.filteredNewsletters=n.filter((e=>!e.includes("ealert"))).sort(),t.count=t.filteredNewsletters.length,t.filteredNewsletters=t.filteredNewsletters.join(",")}return t}},7648:function(e,t,n){var s=n(9514),r=n(939);t.default=()=>{const e=document.querySelector(`.${r.j}`);if(!e)throw new Error("Wizard container not found");const t=document.querySelector('input[name="politico-registration[email]"]'),n=document.querySelector(".wizard__controls"),i=document.getElementById("go-forward"),a=document.getElementById("go-back"),o=document.getElementById("wizard-progress"),d=document.getElementById("active-step"),c=window.location.search,l=new URLSearchParams(c),u=parseInt(l.get("step"),10)||1,p=e.querySelectorAll(".wizard__step"),w="wizard__step--is-active",f=document.querySelector("#count"),g=1===parseInt(l.get("account-activated"),10),h=document.getElementById("finish-activation"),b=p[0],m=p[p.length-1];let v=p[u-1];v===b&&a&&(a.disabled=!0),v===m&&n&&!g&&n.setAttribute("aria-hidden","true");const y=e=>{if(!e)return[];const t=window.location.search,n=new URLSearchParams(t).get(e);let s=[];return n&&(s=n.split(",")),s},A=()=>{const e=v.previousElementSibling,{step:t,type:n}=e.dataset;e&&(v.setAttribute("aria-hidden",!0),v.classList.remove(w),e.setAttribute("aria-hidden",!1),e.classList.add(w),window.history.pushState({},"",`?step=${t}`),window.scrollTo(0,0),d.innerHTML=t,o.style.width=t*(1/p.length*100)+"%",a.disabled=t===b.dataset.step,i.disabled=t===m.dataset.step,f.innerHTML=window.signUpPreferences.getLabel(n),window.signUpPreferences[n].length?f.parentElement.setAttribute("aria-hidden","false"):f.parentElement.setAttribute("aria-hidden","true")),v=e},E=()=>{const e=v.nextElementSibling,{step:r,type:c}=e.dataset;e&&(v.classList.remove(w),v.setAttribute("aria-hidden",!0),e.classList.add(w),e.setAttribute("aria-hidden",!1),window.history.pushState({},"",`?step=${r}`),window.scrollTo(0,0),d.innerHTML=r,o.style.width=r*(1/p.length*100)+"%",a.disabled=r===b.dataset.step,i.disabled=r===m.dataset.step,r!==m.dataset.step?(f.innerHTML=window.signUpPreferences.getLabel(c),window.signUpPreferences[c].length?f.parentElement.setAttribute("aria-hidden","false"):f.parentElement.setAttribute("aria-hidden","true")):(n.setAttribute("aria-hidden","true"),f.parentElement.setAttribute("aria-hidden","true"))),t&&v.dataset.step&&(0,s.Ho)(t.value,parseInt(v.dataset.step,10)),v=e};i&&i.addEventListener("click",E),a&&a.addEventListener("click",A),window.signUpPreferences={newsletter:y("newsletter"),podcast:y("podcast"),"policy-area":[],pushPreference:(e,t)=>{e&&t&&window.signUpPreferences[t].push(e)},popPreference:(e,t)=>{if(!e||!t)return;const n=window.signUpPreferences[t].indexOf(e);n>-1&&window.signUpPreferences[t].splice(n,1)},getLabel:e=>{let t="";const n=window.signUpPreferences[e]?.length;switch(e){case"newsletter":t=`${n} ${n>1?"newsletters":"newsletter"}`;break;case"podcast":t=`${n} ${n>1?"podcasts":"podcast"}`;break;case"policy-area":t=`${n} ${n>1?"policy areas":"policy area"}`;break;default:t=""}return t}},h&&g&&h.addEventListener("click",(()=>{const e=document.getElementById("js-sign-up-flow");
1if(e){const t=document.querySelector('input[name="politico_account_activation_email"]');t&&t.value&&(0,s.Ho)(t.value,29),e.submit()}}))}}}]);

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.