1(()=>{"use strict";const e=(e,t="np_reader_activation_interaction")=>{if("function"==typeof window.gtag&&e){for(const t of Object.keys(e))"boolean"==typeof e[t]?e[t]=e[t]?"yes":"no":"true"===e[t]?e[t]="yes":"false"===e[t]&&(e[t]="no"),e[t]=e[t].toString();window.gtag("event",t,e)}};function t(e="log",...t){"true"===localStorage.getItem("newspack-reader-activation-debug")&&console["error"===e?"error":"log"](...t)}const n="np_gate_interaction",o="a[data-newspack-cta]";function a(e){"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",e):e())}const i={...newspack_content_gate.metadata,referrer:window.location.pathname};function r(e){return!!e&&e.offsetWidth>0&&e.offsetHeight>0}function c(e,t){return t&&(i.gate_has_donation_block=r(t.querySelector(".wp-block-newspack-blocks-donate"))?"yes":"no",i.gate_has_registration_block=r(t.querySelector(".newspack-registration"))?"yes":"no",i.gate_has_newsletter_block=r(t.querySelector(".newspack-newsletters-subscribe"))?"yes":"no",i.gate_has_checkout_button=r(t.querySelector(".wp-block-newspack-blocks-checkout-button"))?"yes":"no",i.gate_has_registration_link=r(t.querySelector('a[href="#register_modal"]'))?"yes":"no",i.gate_has_signin_link=r(t.querySelector('a[href="#signin_modal"]'))?"yes":"no",i.gate_has_checkout_link=r(t.querySelector(o))?"yes":"no"),((e={},t={})=>{const n={...e};return t?.newspack_popup_id&&(n.newspack_popup_id=t.newspack_popup_id),t?.gate_post_id&&(n.gate_post_id=t.gate_post_id),t?.sso&&(n.sso=t.sso),n})({...e,...i})}function s(t,o=!1){o&&(window.newspackRAS=window.newspackRAS||[],window.newspackRAS.push(function(e){const t=e.store.get("paywall_hits")||0;e.store.set("paywall_hits",t+1)})),function(t){[...document.querySelectorAll(".newspack-reader-auth form"),...t.querySelectorAll(".newspack-registration form"),...t.querySelectorAll(".wp-block-newspack-blocks-checkout-button form"),...t.querySelectorAll(".wp-block-newspack-blocks-donate form"),...t.querySelectorAll(".newspack-newsletters-subscribe form")].forEach(o=>{if(!o.querySelector('input[name="gate_post_id"]')){const a=document.createElement("input");a.type="hidden",a.name="gate_post_id",a.value=newspack_content_gate.metadata?.gate_post_id||"1",o.appendChild(a),o.addEventListener("submit",o=>function(t,o){if("function"!=typeof window.gtag)return;const a={action:"form_submission"},i=new FormData(t.target),r={};for(const e of i.entries())r[e[0]]=e[1];if(r["reader-activation-auth-form"]&&r.action&&(a.action_type="register"===r.action?"registration":"signin"),r.newspack_reader_registration&&(a.action_type="registration"),r.newspack_donate&&(a.action_type="donation",r.donation_currency&&(a.donation_currency=r.donation_currency),r.donation_frequency&&(a.donation_frequency=r.donation_frequency,r[`donation_value_${r.donation_frequency}`]&&(a.donation_amount=r[`donation_value_${r.donation_frequency}`],"other"===a.donation_amount&&r[`donation_value_${r.donation_frequency}_other`]&&(a.donation_amount=r[`donation_value_${r.donation_frequency}_other`])))),r.newspack_newsletters_subscribe&&(a.action_type="newsletters_subscription"),r.newspack_checkout){a.action_type="checkout_button";const e=t.target.getAttribute("data-checkout")?JSON.parse(t.target.getAttribute("data-checkout")):null;e&&Object.assign(a,e)}e(c(a,o),n)}(o,t))}})}(t),"function"==typeof window.gtag&&e(c({action:"seen"},t),n)}function d(){const e=document.querySelector(".newspack-content-gate__restricted-post-excerpt");if(!e)return;const t=e.querySelectorAll(".alignleft, .alignright");if(!t.length)return;const{bottom:n}=e.getBoundingClientRect();t.forEach(e=>{const{y:t,bottom:o}=e.getBoundingClientRect();o<=n||(t>n?e.style.display="none":(e.style.maxHeight=n-t+"px",e.style.overflow="hidden",["block","flex","grid"].includes(window.getComputedStyle(e).display)||(e.style.display="block")))})}a(()=>{try{!function(){if(window.self===window.top)return;const e=window.newspack_content_gate?.preview_param_names;if(!e?.length)return;const t=new URLSearchParams(window.location.search),n=e.filter(e=>t.has(e)).map(e=>[e,t.get(e)]);
1n.length&&document.querySelectorAll("a[href]").forEach(e=>{const t=e.getAttribute("href");if(t.startsWith("#"))return;let o;try{o=new URL(t,document.baseURI)}catch(e){return}if("http:"!==o.protocol&&"https:"!==o.protocol)return;if(o.origin!==window.location.origin)return;n.forEach(([e,t])=>o.searchParams.set(e,t));const a=/^(?:[a-z][a-z0-9+.-]*:)?\/\//i.test(t);e.setAttribute("href",a?o.toString():o.pathname+o.search+o.hash)})}()}catch(e){console.warn("Gate preview: could not propagate preview params.",e)}}),a(function(){const a=document.querySelector(".newspack-content-gate__gate");if(a)if(function(t){[...t.querySelectorAll(o)].forEach(o=>{o.addEventListener("click",()=>{if(function(e,t){if(!t)return!1;try{return window.sessionStorage.setItem("newspack_cta_attribution",JSON.stringify({v:1,type:e,id:String(t),ts:Date.now()})),!0}catch(e){return!1}}("gate",i.gate_post_id),"function"!=typeof window.gtag)return;const a={action:"clicked",action_value:o.getAttribute("href")||"",cta_intent:o.dataset.newspackCta||""};e(c(a,t),n)})})}(a),function(){const e=[...document.querySelectorAll(".newspack-content-gate__verification-prompt")];e.length&&(window.newspackRAS=window.newspackRAS||[],window.newspackRAS.push(function(t){let n=!1;const o=()=>{n||(n=!0,window.location.reload())};e.forEach(e=>{!function(e,{url:t,nonce:n,onSent:o,errorText:a}){const i=e?.querySelector("[data-send-otp]");if(!i||i.dataset.otpWired)return!1;i.dataset.otpWired="1";const r=t=>{i.disabled=!1,i.removeAttribute("aria-busy"),i.textContent=i.textContent.trim(),i.focus();const n=e.querySelector("[data-error-target]");if(!n)return;const o=t?.isServerMessage?t.message:a;o&&(n.textContent=o,n.hidden=!1)};i.addEventListener("click",()=>{i.disabled=!0,i.setAttribute("aria-busy","true"),function({url:e,nonce:t}){const n=new FormData;return n.set("action","newspack_reader_registration_verification"),n.set("nonce",t),fetch(e,{method:"POST",headers:{Accept:"application/json"},body:n}).then(e=>{if(!e.ok)throw new Error(e.statusText);return e.json()}).then(e=>{if(!e?.success){const t="string"==typeof e?.data&&!!e.data,n=new Error(t?e.data:"Failed to send verification code.");throw n.isServerMessage=t,n}return e})}({url:t,nonce:n}).then(()=>{"function"==typeof o&&!1===o()&&r()}).catch(r)})}(e,{url:e.dataset.verificationUrl,nonce:e.dataset.verificationNonce,errorText:e.dataset.errorMessage,onSent:()=>(t.setOTPTimer(),!("function"!=typeof t.openAuthModal||!document.querySelector(".newspack-reader-auth-modal .newspack-reader-auth")||(t.openAuthModal({skipAuthenticatedCheck:!0,skipNewslettersSignup:!0,backButtonClosesModal:!0,initialState:"otp",closeOnSuccess:!0,skipSuccess:!1,onSuccess:o,onClose:o}),0)))})})}))}(),t("log","[Gate] initReloadHandler called"),window.newspackRAS=window.newspackRAS||[],window.newspackRAS.push(function(o){t("log","[Gate] RAS initialized");let a=!1;const i=function(i){if(t("log","[Gate] refreshPage called with event:",i),t("log","[Gate] Event detail:",i?.detail),t("log","[Gate] Event detail action:",i?.detail?.action),t("log","[Gate] Pending checkout:",window?.newspackReaderActivation?.getPendingCheckout()),i?.detail?.action&&"reader_registered"===i.detail.action&&!window?.newspackReaderActivation?.getPendingCheckout()&&(t("log","[Gate] reader_registered action detected"),a=!0),i?.detail?.overlays&&i.detail.removed){const o=window?.newspackReaderActivation?.getActivities();t("log","[Gate] Overlay removed, activities:",o);const i=o?.[o.length-1]||{},r=["checkout_completed","reader_registered","reader_logged_in","newsletter_signup"];o.length&&r.includes(i.action)?(t("log","[Gate] Valid action detected:",i.action),a=!0,document.body.classList.add("newspack-content-gate__gate-passed")):(a=!1,"function"==typeof window.gtag&&e(c({action:"dismissed"}),n))}i?.detail?.action&&"reader_logged_in"===i.detail.action&&(t("log","[Gate] reader_logged_in action detected"),a=!0),setTimeout(()=>{const e=o.overlays.get(),n=window?.newspackReaderActivation?.getActivities();t("log","[Gate] Checking reload conditions - overlays:",e,"reload:",a),t("log","[Gate] Current activities:",n),!e.length&&a&&(t("log","[Gate] Reloading page!"),window.location.reload())},50)};o.on("overlay",i),o.on("activity",i)}),a.classList.contains("newspack-content-gate__overlay-gate"))!function(e){let t=document.querySelector(".entry-content");t||(t=document.querySelector("#content")||document.querySelector("main")),e.style.removeProperty("display");let n=!1;const o=()=>{let o=!1;(t?.getBoundingClientRect().top||0)-window.innerHeight/2<0&&(o=!0,n||s(e),n=!0),e.setAttribute("data-visible",o)};document.addEventListener("scroll",o),o()}(a);else{window.addEventListener("resize",d),d();let e=!1;const t=()=>{(a?.getBoundingClientRect().top||0)-window.innerHeight/2<0&&(s(a,!e),"function"==typeof window.gtag&&document.removeEventListener("scroll",t),e=!0)};document.addEventListener("scroll",t),t()}})})();
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.