(()=>{var e={732(){function e(){if("undefined"==typeof pmcNewsletterPixel)return;const e=pmcNewsletterPixel;e.siteId&&(window.pmc_onetrust=window.pmc_onetrust||{},window.pmc_onetrust.cmd=window.pmc_onetrust.cmd||[],window.pmc_onetrust.cmd.push(()=>{window.pmc_onetrust.ready().then(n=>{n&&n.consentData?function(e,n){console.log("[Zeta Pixel] Consent Payload:",n),console.log("[Zeta Pixel] GPP Data:",n.consentData.__gpp),console.log("[Zeta Pixel] TCF Data:",n.consentData.__tcfapi);let a="",i="",o="",r="";n.consentData.__gpp&&(a=n.consentData.__gpp.gppString||"",i=(n.consentData.__gpp.sectionList||n.consentData.__gpp.applicableSections||[]).join(","),console.log("[Zeta Pixel] GPP Extracted:",a,"Sections:",i)),n.consentData.__tcfapi&&(o=!0===n.consentData.__tcfapi.gdprApplies?"1":"0",r=n.consentData.__tcfapi.tcString||"",console.log("[Zeta Pixel] GDPR Extracted:",o,"Consent:",r)),t(e,a,i,o,r)}(e,n):t(e,"","","","")}).catch(()=>{t(e,"","","","")})}))}function t(e,t,n,a,i){const o=`https://live.rezync.com/sync?c=16b6410431b6374e780104abb0443ca8&p=${e.pValue||""}&k=${e.kValue||e.siteId.replace(/^pmc-/,"")+"-universal-pixel"}&gpp=${t}&gpp_sid=${n}&gdpr=${a}&gdpr_consent=${i}&zmpID=${e.siteId}&cache_buster=${Date.now().toString()}&PageUrl=${encodeURIComponent(e.pageUrl).replace(/[!'()~]/g,encodeURIComponent).replace(/\*/g,"%2A")}&categoryID=${encodeURIComponent(e.categoryId)}`,r=document.createElement("script");r.async=!0,r.type="text/javascript",r.src=o,document.body.appendChild(r)}["complete","interactive"].indexOf(document.readyState)>=0?e():window.addEventListener("DOMContentLoaded",()=>{e()})}},t={};function n(a){var i=t[a];if(void 0!==i)return i.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,n),o.exports}(()=>{"use strict";function e(...e){console.log("[Zeta]",...e)}function t(t){const n=Date.now();e("waitForBt: polling for bt availability…"),function a(){const i=window.bt;if("function"==typeof i)return e("bt (p13n.js) is available — firing queued call"),void t(i);Date.now()-n>=15e3?e("waitForBt timed out after 15000ms — bt never became available (no consent or pixel not loaded)"):setTimeout(a,200)}()}n(732),function(){const n=window.pmcNewsletterSubscribe;function a(){document.querySelectorAll("form.lrv-js-EmailCapture, .nova-js-newsletter-capture form, form.mega-menu__sign-up-form").forEach(e=>{e.removeAttribute("action"),e.removeAttribute("target"),e.removeAttribute("method")}),document.addEventListener("submit",async function(a){const i=a.target;if(!(i instanceof HTMLFormElement))return;if(!(i.matches(".lrv-js-EmailCapture")||i.closest(".nova-js-newsletter-capture")||i.matches(".mega-menu__sign-up-form")))return;if(a.preventDefault(),a.stopImmediatePropagation(),"true"===i.dataset.submitting)return;i.dataset.submitting="true";const o=i.querySelector('input[type="email"]'),r=o?.value||"";if(!r)return void alert("Missing Email address. Please enter an email address and try again.");const s=n.nonce||i.dataset.nonce||"";if(!s)return void alert("Subscription could not be secured. Please refresh the page and try again.");const c=new Set(["action","nonce"]),l=o?.name?.toLowerCase()||"",d={email:r,source_url:window.location.href};for(const e of Array.from(i.querySelectorAll('input[type="hidden"]'))){var p;if(!(e instanceof HTMLInputElement))continue;const t=e.name;if(!t||c.has(t))continue;const n=t.toLowerCase();"email"!==n&&n!==l&&(d[t]=null!==(p=e.value)&&void 0!==p?p:"")}const u=await async function(e,t,n,a={},i=3e4){const o=new FormData;o.append("action",t),o.append("nonce",n);for(const[e,t]of Object.entries(a))o.append(e,String(t));const r=new AbortController,s=setTimeout(()=>r.abort(),i);try{const t=await fetch(e,{method:"POST",body:o,signal:r.signal});if(clearTimeout(s),!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return await t.json()}catch(e){clearTimeout(s);let t="An unknown error occurred.";return e instanceof Error&&(t="AbortError"===e.name?"The request is taking longer than expected. Please check Status Page before trying again.":e.message),{success:!1,data:{message:t}}}}(n.ajaxUrl,"pmc_newsletter_subscribe",s,d);u.success?("1"===window.pmcNewsletterPixel?.trackingEnabled&&(e("subscribe: successful — sending identity to Zeta",{email:r}),t(t=>{t("updateUser",{email:r,contacts:[{type:"email",value:r,status:"active"}]}),e('subscribe: bt("updateUser") called with active contact',{email:r})})),u.data.success_url?window.open(u.data.success_url,"_blank"):alert(u.data.message||n.i18n.subscribeSuccess||"Subscription successful!")):alert(u.data.message||n.i18n.subscribeFailed||"Failed to subscribe."),i.dataset.submitting="false"})}n?.ajaxUrl&&(n?.newsletterCutoverEnabled||("loading"===document.readyState?document.addEventListener("DOMContentLoaded",a):a()))}();let a=!1;function i(){const t=window.pmcPianoData?.customVariables?.["pmc-show-regwall"];return e(`isRegwall check: pmcPianoData.customVariables['pmc-show-regwall'] = "${null!=t?t:"(not set)"}"`),"yes"===t}function o(n,a){e(`sendIdentity (source: ${a})`,{email:n}),t(t=>{t("updateUser",{email:n}),e('bt("updateUser") called',{email:n,source:a})})}function r(n,i,o){if(a)return void e(`trackPaywallEncountered: already tracked this page load — skipping (${o})`);a=!0;const r={PageUrl:n,SiteId:i,page_referrer:document.referrer||""};e(`trackPaywallEncountered (trigger: ${o}): queuing bt("track") call`,r),t(t=>{t("track","paywall_encountered",r),e('bt("track", "paywall_encountered") called',r)})}function s(){if(e("init: paywall-events module initializing"),"undefined"==typeof pmcNewsletterPixel||!pmcNewsletterPixel.siteId)return void e("init: pmcNewsletterPixel not configured — aborting");const t=pmcNewsletterPixel;e("init: pmcNewsletterPixel data:",{siteId:t.siteId,pageUrl:t.pageUrl,hasUserEmail:!!t.userEmail,userId:t.userId||"(none)"}),e("init: pmcPianoData customVariables:",window.pmcPianoData?.customVariables),"1"===t.trackingEnabled?(e("identifyUserViaPiano: registering Piano init + loginSuccess handlers"),window.tp=window.tp||[],window.tp.push(["addHandler","init",()=>{e("Piano init fired");const t=window.tp?.user?.isUserValid?.();if(e(`Piano tp.user.isUserValid() = ${t}`),t){const t=window.tp?.pianoId?.getUser?.();e("Piano tp.pianoId.getUser() =",t),t?.email?o(t.email,"piano:init"):e("Piano user valid but no email returned")}else e("Piano user not logged in — skipping identity call")}]),window.tp.push(["addHandler","loginSuccess",()=>{e("Piano loginSuccess fired");const t=window.tp?.pianoId?.getUser?.();e("Piano tp.pianoId.getUser() after login =",t),t?.email&&o(t.email,"piano:loginSuccess")}]),function(t){t.userEmail?(e("identifyUserViaPhpFallback: WP user found in pmcNewsletterPixel"),o(t.userEmail,"php:wp_user")):e("identifyUserViaPhpFallback: no userEmail in pmcNewsletterPixel — skipping")}(t),function(t){e("setupShowOfferHandler: registering Piano showOffer handler"),window.tp=window.tp||[],window.tp.push(["addHandler","showOffer",n=>{e("Piano showOffer fired:",n),i()?e("showOffer: regwall page — skipping Zeta event"):r(t.pageUrl,t.siteId,"piano:showOffer")}])}(t),function(t){const n=document.getElementById("piano-paywall");if(!n)return void e("setupPaywallObserver: #piano-paywall not found in DOM — observer not set up");function a(){e("setupPaywallObserver: Piano rendered content into #piano-paywall"),i()?e("setupPaywallObserver: regwall page — skipping Zeta event"):r(t.pageUrl,t.siteId,"observer:#piano-paywall")}if(e("setupPaywallObserver: watching #piano-paywall for rendered content"),n.children.length>0)return e("setupPaywallObserver: #piano-paywall already has content — checking now"),void a();const o=new MutationObserver(e=>{for(const t of e)if(t.addedNodes.length>0){o.disconnect(),a();break}});o.observe(n,{childList:!0})}(t),e("init: setup complete")):e("init: trackingEnabled is not set — skipping user identity and paywall event setup")}["complete","interactive"].indexOf(document.readyState)>=0?s():window.addEventListener("DOMContentLoaded",s)})()})();