PageSourceSearch

https://variety.com/wp-content/plugins/pmc-plugins/pmc-newsletter/build/frontend.js?ver=1790225061

js variety.com collected 2026-09-24 06:03:33 UTC 9,375 bytes, 1 lines download raw bytes

1(()=>{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="",r="",o="";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&&(r=!0===n.consentData.__tcfapi.gdprApplies?"1":"0",o=n.consentData.__tcfapi.tcString||"",console.log("[Zeta Pixel] GDPR Extracted:",r,"Consent:",o)),t(e,a,i,r,o)}(e,n):t(e,"","","","")}).catch(()=>{t(e,"","","","")})}))}function t(e,t,n,a,i){const r=`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)}`,o=document.createElement("script");o.async=!0,o.type="text/javascript",o.src=r,document.body.appendChild(o)}["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 r=t[a]={exports:{}};return e[a](r,r.exports,n),r.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);let a=null;function i(){return window}function r(){return i().pmcRecaptcha}function o(e=15e3){return new Promise((t,n)=>{const a=setTimeout(()=>n(new Error("enterprise_ready_timeout")),e),r=e=>{clearTimeout(a),e?n(e):t()},o=i().grecaptcha?.enterprise;o?"function"!=typeof o.ready?r("function"==typeof o.execute?void 0:new Error("enterprise_ready_api_missing")):o.ready(()=>r("function"==typeof o.execute?void 0:new Error("execute_missing_after_ready"))):r(new Error("grecaptcha_enterprise_missing"))})}const s="pmc-recaptcha-token";!function(){const n=window.pmcNewsletterSubscribe;function c(){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(c){const l=c.target;if(!(l instanceof HTMLFormElement))return;
1if(!(l.matches(".lrv-js-EmailCapture")||l.closest(".nova-js-newsletter-capture")||l.matches(".mega-menu__sign-up-form")))return;if(c.preventDefault(),c.stopImmediatePropagation(),"true"===l.dataset.submitting)return;l.dataset.submitting="true";const u=l.querySelector('input[type="email"]'),d=u?.value||"";if(!d)return void alert("Missing Email address. Please enter an email address and try again.");const p=n.nonce||l.dataset.nonce||"";if(!p)return void alert("Subscription could not be secured. Please refresh the page and try again.");const m=new Set(["action","nonce",s]),w=u?.name?.toLowerCase()||"",f={email:d,source_url:window.location.href};for(const e of Array.from(l.querySelectorAll('input[type="hidden"]'))){var g;if(!(e instanceof HTMLInputElement))continue;const t=e.name;if(!t||m.has(t))continue;const n=t.toLowerCase();"email"!==n&&n!==w&&(f[t]=null!==(g=e.value)&&void 0!==g?g:"")}if(Boolean(r()?.enterprise?.siteKey)){const e=await async function(e){const t=r()?.enterprise?.siteKey;if(!t)return null;try{await function(){if("function"==typeof i().grecaptcha?.enterprise?.execute)return o();if(a)return a;const e=r()?.enterprise?.src;return e?(a=new Promise((t,n)=>{if(document.querySelector('script[src*="recaptcha/enterprise.js"]'))return void o().then(t).catch(n);const i=document.createElement("script");i.src=e,i.async=!0,i.onload=()=>{o().then(t).catch(e=>{a=null,n(e)})},i.onerror=()=>{a=null,n(new Error("recaptcha_load_failed"))},document.body.appendChild(i)}),a):Promise.reject(new Error("recaptcha_src_missing"))}()}catch{return null}try{const n=i().grecaptcha?.enterprise?.execute;return"function"!=typeof n?null:await n(t,{action:e})||null}catch{return null}}("newsletter_signup");e&&(f[s]=e)}const y=await async function(e,t,n,a={},i=3e4){const r=new FormData;r.append("action",t),r.append("nonce",n);for(const[e,t]of Object.entries(a))r.append(e,String(t));const o=new AbortController,s=setTimeout(()=>o.abort(),i);try{const t=await fetch(e,{method:"POST",body:r,signal:o.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",p,f);y.success?("1"===window.pmcNewsletterPixel?.trackingEnabled&&(e("subscribe: successful — sending identity to Zeta",{email:d}),t(t=>{t("updateUser",{email:d,contacts:[{type:"email",value:d,status:"active"}]}),e('subscribe: bt("updateUser") called with active contact',{email:d})})),y.data.success_url?window.open(y.data.success_url,"_blank"):alert(y.data.message||n.i18n.subscribeSuccess||"Subscription successful!")):alert(y.data.message||n.i18n.subscribeFailed||"Failed to subscribe."),l.dataset.submitting="false"},!0)}n?.ajaxUrl&&(n?.newsletterCutoverEnabled||("loading"===document.readyState?document.addEventListener("DOMContentLoaded",c):c()))}();let c=!1;function l(){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 u(n,a){e(`sendIdentity (source: ${a})`,{email:n}),t(t=>{t("updateUser",{email:n}),e('bt("updateUser") called',{email:n,source:a})})}function d(n,a,i){if(c)return void e(`trackPaywallEncountered: already tracked this page load — skipping (${i})`);c=!0;const r={PageUrl:n,SiteId:a,page_referrer:document.referrer||""};e(`trackPaywallEncountered (trigger: ${i}): queuing bt("track") call`,r),t(t=>{t("track","paywall_encountered",r),e('bt("track", "paywall_encountered") called',r)})}function p(){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?u(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&&u(t.email,"piano:loginSuccess")}]),function(t){t.userEmail?(e("identifyUserViaPhpFallback: WP user found in pmcNewsletterPixel"),u(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),l()?e("showOffer: regwall page — skipping Zeta event"):d(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"),l()?e("setupPaywallObserver: regwall page — skipping Zeta event"):d(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 i=new MutationObserver(e=>{for(const t of e)if(t.addedNodes.length>0){i.disconnect(),a();break}});i.observe(n,{childList:!0})}(t),e("init: setup complete")):e("init: trackingEnabled is not set — skipping user identity and paywall event setup")}
1["complete","interactive"].indexOf(document.readyState)>=0?p():window.addEventListener("DOMContentLoaded",p)})()})();

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.