1"use strict";(self.webpackChunkpolitico_theme=self.webpackChunkpolitico_theme||[]).push([[320],{320:function(t,o,e){var n=e(1083);o.default=()=>{document.cookie.includes("politico_handclap_posts")||(document.cookie="politico_handclap_posts=[]; path=/;");const t=document.querySelectorAll(".newsletter-share-icon.handclap");if(!t||0===t.length)return;if(!window.politico_handclap)return;const o=()=>{let t={};return document.cookie.split(";").forEach((o=>{if(o.includes("politico_handclap_posts")){const e=o.trim().split("=");"politico_handclap_posts"===e[0]&&(t=e[1])}})),JSON.parse(t)},e=t=>{const e=o();Object.keys(t).forEach((o=>{if(Object.prototype.hasOwnProperty.call(t,o)){const n=`${window.politico_handclap.post_id}#${o}`;let c="default";e.includes(n)&&(c="active");const i=document.querySelector(`h3[id="${o}"] .newsletter-share-icon.handclap .handclap-count`);i&&(i.textContent=t[o],i.style.color=window.politico_handclap.style[c].color);const l=document.querySelector(`h3[id="${o}"] .newsletter-share-icon.handclap img`);l&&(l.src=window.politico_handclap.style[c].icon)}}))},c=t=>{const{post_id:c}=window.politico_handclap;let i=o(),l="POST";const a=`${c}#${t}`;i.includes(a)?(l="DELETE",i=i.filter((function(t){return t!==a}))):i.push(a),document.cookie=`politico_handclap_posts=${JSON.stringify(i)}; path=/;`,(0,n.A)({method:l,url:window.politico_handclap.endpoint,data:{title:t}}).then((o=>{const{data:{success:n}}=o;n&&(window.politico_handclap.counts[t]||(window.politico_handclap.counts[t]=0),i.includes(a)?window.politico_handclap.counts[t]+=1:window.politico_handclap.counts[t]-=1,e((t=>{const o={};return Object.keys(t).forEach((e=>{if(Object.prototype.hasOwnProperty.call(t,e)){const n=parseInt(t[e],10);let c=1,i="";0===n?o[e]="":(n<1e3||(n<1e6?(c=1e3,i="k+"):n<1e9?(c=1e6,i="m+"):n<1e12&&(c=1e6,i="b+")),o[e]=parseFloat((n/c).toFixed(2))+i)}})),o})(window.politico_handclap.counts)))}))};n.A.get(window.politico_handclap.endpoint).then((t=>{const{data:{success:o,formatted:n}}=t;if(o&&(e(n),-1!==window.location.search.indexOf("hc=1"))){const t=window.location.hash.substring(1);if(null===document.getElementById(t))return;c(t)}})).catch();const i=t=>{t.preventDefault();const o=t.currentTarget.getAttribute("href");if(!o)return;const e=o.split("#");e.length<2||c(e[1])};function l(t){t.preventDefault();const o=this.getAttribute("href");window.open(o,"newsletterShare","height=540, width=550, toolbar=0, location=0, menubar=0, directories=0")}t.forEach((t=>{t.addEventListener("click",i)}));document.querySelectorAll("h3 .newsletter-share-icon:not(.handclap)").forEach((t=>{t.addEventListener("click",l)}))}}}]);
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.