(()=>{"use strict";var o={d:(n,t)=>{for(var e in t)o.o(t,e)&&!o.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},o:(o,n)=>Object.prototype.hasOwnProperty.call(o,n)},n={};o.d(n,{default:()=>e});const t=()=>{var o,n;return null===(n=null===(o=window.location)||void 0===o?void 0:o.search)||void 0===n?void 0:n.includes("pianoDebug")},e={onetrustToPianoMapping:{C0001:{COMPOSER:1,DMP:1,ID:1,PA:1,VX:1,DL:1},C0002:{COMPOSER:1,DMP:2,ID:1,PA:1,VX:3,DL:1},C0003:{COMPOSER:3,DMP:2,ID:3,PA:3,VX:2,DL:1},C0004:{COMPOSER:2,DMP:3,ID:2,PA:2,VX:2,DL:2}},pianoProductModesConsentAll:{COMPOSER:3,DMP:3,ID:3,PA:3,VX:3,DL:3},pianoProductModes:{COMPOSER:1,DMP:1,ID:1,PA:1,VX:1,DL:1},pianoWeightsToModes:{1:"opt-out",2:"essential",3:"opt-in"},hookIntoOneTrust:function(){t()&&console.log("PMC: Piano:","Consent Initialization.."),window.pmc.hooks.add_action("pmc_onetrust_consent_data_ready",this.determinePianoProductModes.bind(this))},determinePianoProductModes:function({groupsConsentedTo:o}){const n=this;t()&&console.log("PMC: Piano:","pmc_onetrust_consent_data_ready","OneTrust groups consented to",o);const e={COMPOSER:[],DMP:[],ID:[],PA:[],VX:[],DL:[]};if(0{Object.keys(e).forEach((t=>{n.onetrustToPianoMapping[o]&&e[t].push(n.onetrustToPianoMapping[o][t])}))})),t()&&console.log("PMC: Piano:","pianoProductsWeights",e);const i=o.length>=Object.keys(n.onetrustToPianoMapping).length;Object.keys(e).forEach((o=>{n.pianoProductModes[o]=Math.max(...e[o],...i?[n.pianoProductModesConsentAll[o]]:[])})),t()&&console.log("PMC: Piano:","pianoProductModes",n.pianoProductModes)}window.tp=window.tp||[],window.tp.push(["init",n.setPianoProductModes.bind(n)])},setPianoProductModes:function(){var o,n,e,i,s,d;const a=this;window.pdl=window.pdl||{},window.pdl.requireConsent=!0,window.tp.consent.set("ESP",{mode:"opt-out"}),window.tp.consent.set("Social Flow",{mode:"opt-out"}),window.tp.consent.set("COMPOSER",{mode:null!==(o=a.pianoWeightsToModes[a.pianoProductModes.COMPOSER])&&void 0!==o?o:"opt-out"}),window.tp.consent.set("DMP",{mode:null!==(n=a.pianoWeightsToModes[a.pianoProductModes.DMP])&&void 0!==n?n:"opt-out"}),window.tp.consent.set("ID",{mode:null!==(e=a.pianoWeightsToModes[a.pianoProductModes.ID])&&void 0!==e?e:"opt-out"}),window.tp.consent.set("PA",{mode:null!==(i=a.pianoWeightsToModes[a.pianoProductModes.PA])&&void 0!==i?i:"opt-out"}),window.tp.consent.set("VX",{mode:null!==(s=a.pianoWeightsToModes[a.pianoProductModes.VX])&&void 0!==s?s:"opt-out"}),window.tp.consent.set("DL",{mode:null!==(d=a.pianoWeightsToModes[a.pianoProductModes.DL])&&void 0!==d?d:"opt-out"}),t()&&console.log("PMC: Piano:","tp.consent.get()",window.tp.consent.get())}};(window.pmcPianoConsent=window.pmcPianoConsent||{}).consent=n.default})();; (()=>{"use strict";var e={d:(o,n)=>{for(var t in n)e.o(n,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:n[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{pmcPiano:()=>m});const n="PMC: Piano: ",t=()=>{var e,o;return null===(o=null===(e=window.location)||void 0===e?void 0:e.search)||void 0===o?void 0:o.includes("pianoDebug")},i=e=>{let o=e.name.replace("bound","").trim();return o||(o="Anonymous"),o};var a=function(e,o,n,t){return new(n||(n=Promise))((function(i,a){function r(e){try{l(t.next(e))}catch(e){a(e)}}function s(e){try{l(t.throw(e))}catch(e){a(e)}}function l(e){var o;e.done?i(e.value):(o=e.value,o instanceof n?o:new n((function(e){e(o)}))).then(r,s)}l((t=t.apply(e,o||[])).next())}))};const r={callApi:(e,...o)=>a(void 0,[e,...o],void 0,(function*(e,o={}){return yield new Promise((n=>{window.tp.api.callApi(e,o,n)})).then((i=>(t()&&console.log(n,"pmcPianoApi.callApi",e,o,i),i))).catch((i=>{t()&&console.error(n,"pmcPianoApi.callApi",e,o,i)}))})),callProtectedApi:function(e){return a(this,void 0,void 0,(function*(){var o;const i=`${null===(o=window.pmcPianoData)||void 0===o?void 0:o.wordPressRestApiUri}${e}`;return yield fetch(i,{credentials:"include"}).then((e=>e.headers.get("content-type").includes("application/json")?e.json():e.text())).then((e=>(t()&&console.log(n,"pmcPianoApi.callProtectedApi",i,e),e))).catch((e=>{t()&&console.error(n,"pmcPianoApi.callProtectedApi",i,e)}))}))},getLicenseeData:e=>a(void 0,void 0,void 0,(function*(){return yield r.callProtectedApi(`/licensee/${e}`)})),getUserCustomFields:e=>a(void 0,void 0,void 0,(function*(){return yield r.callProtectedApi(`/user/custom-fields/${e}`)})),getAccessList:()=>a(void 0,void 0,void 0,(function*(){return yield r.callApi("/access/list").then((({data:e})=>e))})),getConversionList:()=>a(void 0,void 0,void 0,(function*(){return yield r.callApi("/conversion/list").then((({conversions:e})=>e))}))},s=(e={})=>{void 0!==e.knownUser&&window.tp.user.isUserValid()&&(t()&&console.log(n,"init","Firing known user callback",i(e.knownUser)),e.knownUser()),void 0===e.unknownUser||window.tp.user.isUserValid()||(t()&&console.log(n,"init","Firing unknown user callback",i(e.unknownUser)),e.unknownUser())},l=(e,o)=>{t()&&console.log(n,"loginSuccess","Firing callback",i(e),o),e(o)},c=e=>{t()&&console.log(n,"logout","Firing callback",i(e)),e()},d=(e,o)=>{t()&&console.log(n,"registrationSuccess","Firing callback",i(e),o),e(o)};var u=function(e,o,n,t){return new(n||(n=Promise))((function(i,a){function r(e){try{l(t.next(e))}catch(e){a(e)}}function s(e){try{l(t.throw(e))}catch(e){a(e)}}function l(e){var o;e.done?i(e.value):(o=e.value,o instanceof n?o:new n((function(e){e(o)}))).then(r,s)}l((t=t.apply(e,o||[])).next())}))};let p,w="";const m={api:r,callbacks:{onInit:e=>(window.tp=window.tp||[],window.tp.push(["init",s.bind(void 0,e)]),window.pmcPiano.callbacks),onKnownIP:e=>{var o;return null===(o=window.pmcPiano.ipAuth)||void 0===o||o.onKnownIP(e),window.pmcPiano.callbacks},onLogin:e=>(window.tp=window.tp||[],window.tp.push(["addHandler","loginSuccess",l.bind(void 0,e)]),window.pmcPiano.callbacks),onLogout:e=>(window.tp=window.tp||[],window.tp.push(["addHandler","logout",c.bind(void 0,e)]),window.pmcPiano.callbacks),onRegistration:e=>(window.tp=window.tp||[],window.tp.push(["addHandler","registrationSuccess",d.bind(void 0,e)]),window.pmcPiano.callbacks)},ipAuth:{callbacks:[],doCallbacks:function(){this.callbacks.forEach((e=>{t()&&console.log(n,"Running known IP callback",i(e)),e()}))},hasKnownIP:!1,onKnownIP:function(e){this.hasKnownIP?e():this.callbacks.push(e)},setKnownIP:function(){t()&&console.log(n,"User has a known IP Address"),this.hasKnownIP=!0,this.doCallbacks()}},piano:{loadSDK:function(){var e;if(!(null===(e=window.pmcPianoData)||void 0===e?void 0:e.sdkUri))return void console.error(n,"window.pmcPianoData.sdkUri not defined",window.pmcPianoData);const o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=window.pmcPianoData.sdkUri,document.head.appendChild(o)},prime:function(){var e,o,i,a,r,s,l,c,d;if(window.tp=window.tp||[],!(null===(e=window.pmcPianoData)||void 0===e?void 0:e.aid))return void console.error(n,"window.pmcPianoData.aid not defined",window.pmcPianoData);window.tp.push(["setAid",null===(o=window.pmcPianoData)||void 0===o?void 0:o.aid]),(null===(i=window.pmcPianoData)||void 0===i?void 0:i.cxSiteId)&&(t()&&console.log(n,"tp.push: [setCxenseSiteID="+window.pmcPianoData.cxSiteId+"]"),window.tp.push(["setCxenseSiteId",window.pmcPianoData.cxSiteId])),window.tp.push(["setSandbox",!!window.location.host.match(/test|pmcqa|go-vip|lndo.site/)]),window.tp.push(["setDebug",t()]),window.tp.push(["setUsePianoIdUserProvider",!0]),Object.entries(null!==(r=null===(a=window.pmcPianoData)||void 0===a?void 0:a.customVariables)&&void 0!==r?r:{}).forEach((([e,o])=>{t()&&console.log(n,"tp.push: [setCustomVariable, "+e+"="+o+"]"),window.tp.push(["setCustomVariable",e,o])}));const u=window.pmc.tracking.get_properties();if(window.tp.push(["setPageURL",window.location.href]),u.forEach((function(e){t()&&console.log(n,"tp.push: [setCustomVariable, pmc-"+e.name+"="+e.value+"]"),window.tp.push(["setCustomVariable","pmc-"+e.name,e.value])})),null===(s=window.pmcPianoData)||void 0===s?void 0:s.author){const e=[].concat(window.pmcPianoData.author).join(",");t()&&console.log(n,"tp.push: [setContentAuthor="+e+"]"),window.tp.push(["setContentAuthor",e])}(null===(l=window.pmcPianoData)||void 0===l?void 0:l.tags)&&0<(null===(c=window.pmcPianoData.tags)||void 0===c?void 0:c.length)&&(t()&&console.log(n,"tp.push: [setTags=]",window.pmcPianoData.tags),window.tp.push(["setTags",null!==(d=window.pmcPianoData.tags)&&void 0!==d?d:[]]))},setCallbacks:function(){var e,o;const n=()=>{window.pmcPiano.piano.setGA4Config(),window.tp.experience.execute()};null===(o=null===(e=window.pmcPiano)||void 0===e?void 0:e.callbacks)||void 0===o||o.onInit({knownUser:n,unknownUser:n}).onLogin((e=>{"PIANOID"===e.source&&!0!==e.registration&&window.pmcPiano.piano.reRenderExperiences()})).onLogout(this.reRenderExperiences.bind(this))},setGA4Config:function(){var e,o,i,a;const r=null===(e=window.tp.pianoId.getUser())||void 0===e?void 0:e.uid,s=null===(a=null===(i=null===(o=window.pmcPianoData)||void 0===o?void 0:o.trackingPixels)||void 0===i?void 0:i.ga)||void 0===a?void 0:a.measurement_id;if(!s)return void console.error(n,"GA4 measurement_id is undefined.",window.pmcPianoData);const l={send_page_view:!1,page_location:document.URL,page_title:document.title};r&&(l.user_id=r),window.tp.setGA4Config({measurementId:s,eventParameters:l}),t()&&console.log(n,"tp.setGA4Config measurement id",window.tp.ga4Service.getMeasurementId())},reRenderExperiences:function(){t()&&console.log(n,"Re-rendering Experiences"),window.tp.offer.close(),window.tp.offer.closeInline("#piano-paywall"),window.tp.offer.closeInline("#piano-right-rail"),window.tp.offer.closeInline("#piano-mid-river"),window.tp.offer.closeInline("#piano-sticky-footer"),window.tp.offer.closeInline("#piano-fly-out"),window.tp.offer.closeInline("#piano-module-header-link-vy"),window.tp.offer.closeInline("#piano-header-subscribe-button"),window.tp.offer.closeInline("#piano-header-sub-button");const e=document.querySelector(".pmc-paywall");e&&(e.classList.remove("a-article-cropped"),e.classList.remove("piano-truncate-content")),window.tp.experience.execute()}},reportingCookie:{cookieLabel:"pmc_piano_reporting",reporting:{entitlements:"",user_type:"ANONYMOUS",acct_id:null,acct_type:null,org_id:null,org_name:null,paywall_logged_in:!1},initialize:function(){var e;const o=this;t()&&console.log(n,"Initializing Piano Reporting Cookie"),null===(e=window.pmcPiano)||void 0===e||e.callbacks.onInit({knownUser:()=>{o.setDataForAuthUser()},unknownUser:()=>u(this,void 0,void 0,(function*(){o.hasReportingCookie()||(yield o.set(JSON.stringify(o.reporting)))}))}).onKnownIP((function(){o.reporting.acct_type="ip",o.reporting.user_type="KNOWN",o.set(JSON.stringify(o.reporting))})).onLogin((()=>{o.setDataForAuthUser()})).onLogout(o.delete.bind(o))},set:function(e){return u(this,void 0,void 0,(function*(){t()&&console.log(n,"Setting pmc_piano_reporting cookie",e),yield function(e){return o=this,n=arguments,i=function*(e,o=100){for(;!e();)yield new Promise((e=>setTimeout(e,o)))},new((t=void 0)||(t=Promise))((function(e,a){function r(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(o){var n;o.done?e(o.value):(n=o.value,n instanceof t?n:new t((function(e){e(n)}))).then(r,s)}l((i=i.apply(o,n||[])).next())}));var o,n,t,i}((()=>void 0!==window.OptanonActiveGroups)),window.pmc.cookie.set(this.cookieLabel,e,604800,"/","targeting",this.tld())}))},delete:function(){t()&&console.log(n,"Deleting pmc_piano_reporting cookie"),window.pmc.cookie.expire(this.cookieLabel,"/",this.tld())},getDataForAuthUser:function(){return u(this,void 0,void 0,(function*(){var e,o,i,a,r;let s=null!==(e=yield window.pmcPiano.api.getConversionList())&&void 0!==e?e:[];const l=null!==(o=s.sort(((e,o)=>o.create_date-e.create_date))[0])&&void 0!==o?o:void 0;s=s.filter((e=>{var o;return null===(o=null==e?void 0:e.user_access)||void 0===o?void 0:o.granted})),s=0>=s.length?[l]:(e=>{let o=[];return 1>=e.length?e:(["( |^)corporate","( |^)education","( |^)partner","( |^)agent","( |^)billboard member","( |^)employee","( |^)comp","( |^)(limited|registration)"].forEach((n=>{var t,i,a;let r=0;for(;r{var i,a;const r=e=>{var o,n;const t=null===(n=null===(o=null==e?void 0:e.term)||void 0===o?void 0:o.resource.name)||void 0===n?void 0:n.toLocaleLowerCase();return(null==t?void 0:t.match(/( |^)agent/))?"agent":(null==t?void 0:t.match(/( |^)(corporate|education|employee|partner)/))?"site_license":"individual"},s=r(e);if(1>=o.length)return s;const l=o.slice(1).map((e=>r(e))),c="individual"===s,d=l.includes("agent"),u=l.includes("site_license");return c&&d&&u?"individual|site_license|agent":c&&u&&!d?"individual|site_license":c&&d&&!u?"individual|agent":"site_license"===s&&d?"site_license|agent":(t()&&console.log(n,`User might have duplicate resources. userId: ${null===(a=null===(i=null==e?void 0:e.user_access)||void 0===i?void 0:i.user)||void 0===a?void 0:a.uid} accountType: ${s}`),s)})(s[0],s),d=Array.from(new Set(s.map((e=>{var o;return null===(o=null==e?void 0:e.term)||void 0===o?void 0:o.resource.name})))).join("|")||void 0,u=Array.from(new Set(s.map((e=>{var o;return null===(o=null==e?void 0:e.term)||void 0===o?void 0:o.name})))).join("|")||void 0,p=Array.from(new Set(s.map((e=>(null==e?void 0:e.user_access)||(null==e?void 0:e.term)?((e={})=>{const o=null==e?void 0:e.user_access,n=null==e?void 0:e.term,t=null==n?void 0:n.resource;return(null==t?void 0:t.name)&&""!==t.name?(null==o?void 0:o.granted)&&(/registration/i.exec(null==n?void 0:n.name)||"registration"===(null==n?void 0:n.type))?"REGISTERED":(null==o?void 0:o.granted)?"SUBSCRIBER":void 0:"KNOWN"})(e):void 0)))).sort(((e,o)=>e.localeCompare(o))).join("|")||void 0,w=[];for(const e of s)(null===(i=null==e?void 0:e.term)||void 0===i?void 0:i.term_id)&&(m=null==e?void 0:e.term)&&("email_domain_contract"===(null==m?void 0:m.type)||"specific_email_addresses_contract"===(null==m?void 0:m.type))&&w.push(yield window.pmcPiano.api.getLicenseeData(e.term.term_id));var m;const v=Array.from(new Set(w.map((e=>null==e?void 0:e.id)))).join("|")||void 0,g=Array.from(new Set(w.map((e=>null==e?void 0:e.name)))).join("|")||void 0;return{accessGrantedStatus:null!==(r=null===(a=s[0])||void 0===a?void 0:a.user_access.granted)&&void 0!==r&&r,accountTermType:c,resourceName:d,termName:u,orgId:v,orgName:g,userType:p}}))},setDataForAuthUser:function(){return u(this,void 0,void 0,(function*(){const e=this,o=window.tp.pianoId.getUser(),n=e.hasReportingCookie();if((null==n?void 0:n.acct_id)===o.uid)return Promise.resolve();const t=yield this.getDataForAuthUser(),i={acct_id:o.uid,acct_type:t.accountTermType,entitlements:t.resourceName,paywall_logged_in:t.accessGrantedStatus,user_type:t.userType,org_id:t.orgId||null,org_name:t.orgName||null};return this.reporting=Object.assign(Object.assign({},e.reporting),i),yield e.set(JSON.stringify(this.reporting)),Promise.resolve()}))},hasReportingCookie:function(){try{return JSON.parse(window.pmc.cookie.get("pmc_piano_reporting")||null)}catch(e){return t()&&console.log(n,"No reporting cookie",e.toString()),!1}},tld:function(){return new URL(window.location.href).hostname.split(/\./).slice(-2).join(".")}},wordPressThemes:{hookIntoPmcPiano:function(){var e,o,n,t;const i=this;null===(o=null===(e=window.pmcPiano)||void 0===e?void 0:e.callbacks)||void 0===o||o.onInit({knownUser:()=>{i.setAuthenticatedUserId(),i.maybeRenderMyAccountPage(),i.maybeRenderPasswordResetPage()},unknownUser:()=>{i.maybeRenderMyAccountPage(),i.maybeRenderPasswordResetPage()}}).onLogin((()=>{i.setAuthenticatedUserId(),i.maybeRenderMyAccountPage(),i.maybeRenderPasswordResetPage()})).onLogout(i.maybeRenderMyAccountPage.bind(i)).onRegistration(i.onRegistration.bind(i)),null===(n=window.tp)||void 0===n||n.push(["addHandler","checkoutComplete",function(){/reader_id=amp/gi.exec(window.location.search)&&window.close()}]),null===(t=window.tp)||void 0===t||t.push(["addHandler","externalCheckoutComplete",function(){location.reload()}]),window.addEventListener("message",i.reloadOfferModal.bind(i))},maybeRenderMyAccountPage:function(){const e=".js-subscription-my-account-component";document.querySelector(e)&&window.tp.myaccount.show({displayMode:"inline",containerSelector:e})},maybeRenderPasswordResetPage:function(){if(!document.querySelector(".js-subscription-password-reset-component"))return"password reset element missing";const e=window.location.search.match(/reset_token=([A-Za-z0-9]+)/);if(!e)return"invalid token";window.addEventListener("message",this.redirectHomeOnClosedMessage.bind(this)),window.tp.pianoId.show({resetPasswordToken:e[1],loggedIn:function(){window.location="/"}})},onRegistration:()=>{let e=!1;window.tp.push(["addHandler","checkoutClose",function(o){e||(e=!0,window.pmcPiano.piano.reRenderExperiences())}])},redirectHomeOnClosedMessage:function(e){if(!e.origin.endsWith("tinypass.com"))return!1;let o;try{o=JSON.parse(e.data)}catch(e){return!1}return!!(o.sender&&o.event&&o.sender.startsWith("piano-id")&&"closed"===o.event)&&(window.location="/",!0)},setAuthenticatedUserId:function(){const e=window.tp.pianoId.getUser(),o=window.blogherads||{};t()&&console.log(n,"wordPressThemes.setAuthenticatedUserId",e.uid),o.adq=o.adq||[],o.adq.push((function(){try{o.setAuthenticatedUserId(e.uid,"piano")}catch(e){}}))},registerStickyFooter:e=>{var o,n;const t=window.pmcPiano.wordPressThemes;null===(n=null===(o=window.pmcPiano)||void 0===o?void 0:o.callbacks)||void 0===n||n.onInit({unknownUser:(()=>{const o=document.querySelector(e.className||".js-subscription-sticky-footer");if(!o)return;const n=document.getElementsByClassName(e.targetClassName||"footer"),i=()=>{const e=()=>{const e=window.scrollY,t=window.innerHeight,i=n[0].offsetTop;return e+t+("static"===o.style.position?o.clientHeight:0)>i};setTimeout(function(){this.stickyFooterPrevTime=this.stickyFooterPrevTime||Date.now(),this.stickyFooterPrevTime&&500>Date.now()-this.stickyFooterPrevTime||(this.stickyFooterPrevTime=Date.now(),e()||"fixed"===o.style.position?e()&&"static"!==o.style.position&&(o.style.position="static"):(o.style.position="fixed",o.style.bottom="0px"))}.bind(t),500)};i(),window.addEventListener("load",i),window.addEventListener("scroll",i),window.addEventListener("resize",i)}).bind(t)})},reloadOfferModal:function(e){var o,n,t,i,a;if(!e.origin.endsWith("tinypass.com")||!(null===(n=null===(o=window.location)||void 0===o?void 0:o.pathname)||void 0===n?void 0:n.match(/^\/subscribe/))||!(null===(i=null===(t=window.location)||void 0===t?void 0:t.search)||void 0===i?void 0:i.match(/contractId=/)))return!1;let r;try{r=JSON.parse(e.data)}catch(e){return!1}return!(!(null===(a=null==r?void 0:r.sender)||void 0===a?void 0:a.startsWith("piano-id"))||"closed"!==(null==r?void 0:r.event)||window.tp.pianoId.isUserValid()||(window.tp.offer.reloadAll(),0))}},newsletterForm:{initialized:!1,setDataForNewsletter:!1,targetElements:{paywall:".pmc-paywall",paywallFade:"a-article-nl-fade",overlay:"div[id=piano-paywall] .tp-container-inner"},signupURLs:{aia:"https://cloud.email.artnews.com/aia-api",artforum:"https:/cloud.email.artforum.com/api",artnews:"https://cloud.email.artnews.com/artnews-api",billboard:"https://cloud.email.billboard.com/api/",deadline:"https://https://cloud.email.deadline.com/api",robbreport:"https://cloud.email.robbreport.com/api",rollingstone:"https://cloud.email.rollingstone.com/signup-api/",sourcingjournal:"https://cloud.email.sourcingjournal.com/api/",sportico:"https://cloud.email.sportico.com/api/",thr:"https://cloud.email.hollywoodreporter.com/api",variety:"https://cloud.email.variety.com/api/",wwd:"https://cloud.email.wwd.com/api/"},modal:!0,emailInputFocused:!1,prepareExactTargetFormData:e=>{const o=Object.assign({__contextName:"NewsletterFormPost",__executionContext:"Post"},e.data.formData),n=new FormData;for(const[e,t]of Object.entries(o))n.append(e,t);return n},sendSignupDataToExactTarget:e=>{const o=window.pmcPiano.newsletterForm,i=o.signupURLs[w];i||console.error(n,"Invaild brand for newsletter form submission",{brand:w,signupURLs:o.signupURLs}),fetch(i,{method:"POST",mode:"no-cors",body:e}).then((e=>{t()&&console.log(n,"POST request to ExactTarget successful:",e)})).catch((e=>{console.error(n,"Error sending formData to ExtactTarget:",e)}))},calculateTopOffset:()=>{var e,o,n,t;const i=(null===(e=document.querySelector("header"))||void 0===e?void 0:e.offsetHeight)||0,a=(null===(o=document.querySelector(".js-Header-contents"))||void 0===o?void 0:o.offsetHeight)||0,r=Math.min(Math.max(i,a)+20,100),s=null===(n=document.querySelector(".pmc-paywall > .jw-state-playing"))||void 0===n?void 0:n.offsetHeight,l=null===(t=document.querySelector(".live-event-banner > .banner-regular"))||void 0===t?void 0:t.offsetHeight;if(window.innerWidth<768){if(s>0)return r+s;if(l>0)return r+l}return r},stickyDismissableRegwall:()=>{const e=window.pmcPiano.newsletterForm,o=document.querySelector(e.targetElements.paywall),n=document.querySelector(`${e.targetElements.overlay} iframe`);o&&n?(o.classList.add(e.targetElements.paywallFade),window.addEventListener("scroll",(()=>{const n=document.querySelector(e.targetElements.overlay),t=o.getBoundingClientRect().top+window.scrollY,i=e.calculateTopOffset();n.style.top="0",n.style.zIndex="2",n.style.transition="top 0.1s ease 0s";const a=(o.getBoundingClientRect().top<=i?Math.min(Math.max(0,window.scrollY+i-t),o.clientHeight-n.clientHeight):0)+(e.emailInputFocused?-150:0);n.style.position="absolute",n.style.top=`${a}px`}))):setTimeout(e.stickyDismissableRegwall)},registerPostMessageListener:()=>{const e=window.pmcPiano.newsletterForm;window.addEventListener("message",(o=>{var i,a;if(o.origin.includes("tinypass.com")&&"string"==typeof o.type)switch(o.data.type){case"piano_template_newsletter_close_button_clicked":null===(i=document.querySelector(e.targetElements.paywall))||void 0===i||i.classList.remove(e.targetElements.paywallFade),null===(a=document.querySelector(e.targetElements.overlay))||void 0===a||a.classList.add("lrv-a-hidden");break;case"piano_template_newsletter_email_input":e.emailInputFocused=o.data.focused,window.dispatchEvent(new Event("scroll",{bubbles:!0}));break;case"piano_template_newsletter_submit_button_clicked":w=o.data.brand,p=e.prepareExactTargetFormData(o),e.sendSignupDataToExactTarget(p);break;case"piano_regwall_register_button_clicked":w=o.data.brand,p=e.prepareExactTargetFormData(o),e.setDataForNewsletter=!0,t()&&console.log(n,"Data Stored for Registration",p)}}))},registrationSuccess:function(e){const o=e.user.email;o&&this.setDataForNewsletter&&(this.setDataForNewsletter=!1,t()&&console.log(n,"Registration success",e),p.set("EmailAddress",o),setTimeout(this.sendSignupDataToExactTarget(p),1e3))},initialize:()=>{const e=window.pmcPiano.newsletterForm;e.initialized?t()&&console.log(n,"Newsletter Form is already initialized"):(t()&&console.log(n,"Initializing Newsletter Form"),e.modal&&e.stickyDismissableRegwall(),e.registerPostMessageListener(),window.pmcPiano.callbacks.onRegistration(e.registrationSuccess.bind(e)),e.initialized=!0)}}};window.tp=window.tp||[],m.piano.prime(),m.piano.loadSDK(),window.tp.push(["init",()=>{const e=window.pmcPiano;t()&&console.log(n,"PMC: Piano: Initializing Piano"),e.piano.setCallbacks(),e.reportingCookie.initialize(),e.wordPressThemes.hookIntoPmcPiano()}]);var v=window;for(var g in o)v[g]=o[g];o.__esModule&&Object.defineProperty(v,"__esModule",{value:!0})})();; function pmcMaybeRemoveTracking(){"undefined"==typeof _gaq&&"object"==typeof pmc&&"object"==typeof pmc.tracking&&"function"==typeof pmc.tracking.remove_from_browser_url&&pmc.tracking.remove_from_browser_url()}"loading"!==document.readyState?pmcMaybeRemoveTracking():document.addEventListener("DOMContentLoaded",pmcMaybeRemoveTracking);; (()=>{"use strict";var o={665:function(o,t,n){var e=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(t,"__esModule",{value:!0}),e(n(759)).default.init()},759:function(o,t,n){var e=this&&this.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsentCriteria=void 0;var i,u=e(n(60));!function(o){o.STRICTLY_NECESSARY="C0001",o.PERFORMANCE="C0002",o.FUNCTIONAL="C0003",o.TARGETING="C0004",o.SOCIAL="C0005"}(i||(t.ConsentCriteria=i={}));var a=[i.PERFORMANCE],d=function(){function o(){this.value=void 0}return o.prototype.init=function(){var o,t=this,n=(0,u.default)();(null===(o=null==n?void 0:n.hooks)||void 0===o?void 0:o.add_action)?n.hooks.add_action("pmc_onetrust_consent_data_ready",(function(o){var n,e,i,d,r=o.groupsConsentedTo;if(t.value=void 0,(null==r?void 0:r.length)&&a.every((function(o){return r.includes(o)}))){var l=null!==(i=null===(e=window.pmcFirstPartyCookie)||void 0===e?void 0:e.endpoint)&&void 0!==i?i:null;l?fetch(l,{credentials:"include"}).then((function(o){return o.json()})).then((function(o){(null==o?void 0:o.value)&&(t.value=o.value)})).catch((function(){})).finally((function(){var o;null===(o=(0,u.default)().hooks)||void 0===o||o.do_action("pmc_fpc_data_ready",t)})):null===(d=(0,u.default)().hooks)||void 0===d||d.do_action("pmc_fpc_data_ready",t)}else null===(n=(0,u.default)().hooks)||void 0===n||n.do_action("pmc_fpc_data_ready",t)})):console.log("PMC First Party Cookie: pmc.hooks.add_action is not defined")},o}();window.pmc_fpc=new d,t.default=window.pmc_fpc},60:(o,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=window;n.pmc=n.pmc||{},t.default=function(){return n.pmc}}},t={};!function n(e){var i=t[e];if(void 0!==i)return i.exports;var u=t[e]={exports:{}};return o[e].call(u.exports,u,u.exports,n),u.exports}(665)})();; (()=>{"use strict";var e={665:function(e,t,a){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=r(a(831)),i=r(a(865)),o=[{tag:"a",handler:n.default},{tag:"button",handler:i.default}];document.addEventListener("DOMContentLoaded",(function(){o.forEach((function(e){Array.from(document.getElementsByTagName(e.tag)).forEach((function(t){t.addEventListener("click",e.handler)}))}))}))},404:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.push1PDEvent=t.blogherads=void 0;var a=window;a.blogherads=a.blogherads||{},a.blogherads.adq=a.blogherads.adq||[],t.blogherads=a.blogherads,t.push1PDEvent=function(e,a){t.blogherads.adq.push((function(){t.blogherads.push1PDEvent(e,a)}))}},865:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formButtonClickHandler=void 0;var r=a(404);t.formButtonClickHandler=function(e){var t=e.currentTarget;if(t instanceof Element&&/(sign up|subscribe|newsletter)/.test(t.innerHTML.toLowerCase())){for(var a={source_id:t.className,source_value:t.innerHTML.trim(),email:""},n=t;n&&"FORM"!==n.tagName;)n=n.parentElement;n&&Array.from(n.children).forEach((function(e){var t,r;if(e instanceof HTMLInputElement||e instanceof HTMLSelectElement){var n=null===(t=e.getAttribute("name"))||void 0===t?void 0:t.toLowerCase(),i=null===(r=e.getAttribute("id"))||void 0===r?void 0:r.toLowerCase(),o=e.value;"source"===n&&(a.source_id=e.id,a.source_value=o),(n&&n.indexOf("email")>=0||i&&i.indexOf("email")>=0)&&(a.email=o)}})),(0,r.push1PDEvent)("newsletter_signup_click",a)}},t.default=t.formButtonClickHandler},831:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.linkClickHandler=void 0;var r=a(404);t.linkClickHandler=function(e){var t,a=e.currentTarget;if(a instanceof Element){var n=a.getAttribute("href"),i=a.getAttribute("data-xid");if(!i&&n){var o=/xid:([^&/])*/gm.exec(n);o&&(i=o[0])}i=(null==i?void 0:i.replace("xid:",""))||"";var d=a.hasAttribute("custom-ga-data")?JSON.parse(a.getAttribute("custom-ga-data")):{},l=!(!d["1pd"]&&!a.getAttribute("data-1pd")),u=d.product||{},c=u.category||a.getAttribute("data-category-name"),s=u.currency||a.getAttribute("data-currency")||"US",v=u.name||a.getAttribute("data-product-name"),f=u.price||a.getAttribute("data-price"),g=d.type||a.getAttribute("data-type"),p=d.partner||a.getAttribute("data-partner");if(!(null==p?void 0:p.length)&&(null==n?void 0:n.length)){var m=null===(t=a.hostname)||void 0===t?void 0:t.split(".");m&&(m.pop(),m.length>1&&m.shift(),p=m.join(),["amazon","amzn"].includes(p)&&(p="Amazon"))}(l||(null==i?void 0:i.length)>0||(null==v?void 0:v.length)>0||(null==g?void 0:g.length)>0)&&(0,r.push1PDEvent)("ecommerce_click",{href:n,xid:i,data_partner:p,data_price:f,data_product_name:v,data_product_category:c,data_product_currency:s,data_type:g})}},t.default=t.linkClickHandler}},t={};!function a(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,a),i.exports}(665)})();; (()=>{"use strict";const t=t=>new Promise((a=>{try{const a=__gpp("getGPPData");-1!==a.applicableSections&&null!==a&&(t.__gpp=a,window.pmc_onetrust.initialized.__gpp=!0)}catch{}a(t)})),a=t=>new Promise((a=>{"function"==typeof __uspapi&&"object"==typeof pmc_fastly_geo_data&&"US"===pmc_fastly_geo_data?.country&&__uspapi("getUSPData",1,((e,o)=>{var _;"1---"===e?.uspString&&a(t);let n=Array(4).fill(void 0);"string"==typeof e?.uspString&&4===e.uspString.length&&(n=e.uspString.split("")),t.__uspapi={...e,version:null!==(_=n[0])&&void 0!==_?_:e?.version,doNotSellDataOffered:"Y"===n[1],consentsToSellData:"N"===n[2],IABLSPA:"Y"===n[3]},window.pmc_onetrust.initialized.__uspapi=!0,a(t)}))})),e=t=>new Promise((a=>{try{!1===window.pmc_onetrust.initialized.__tcfapi&&__tcfapi("addEventListener",2,((e,o)=>{!o||"useractioncomplete"!==e.eventStatus&&"tcloaded"!==e.eventStatus||(e.purpose.consents[1]&&e.purpose.consents[8]&&e.purpose.consents[10]&&window.triggerGA?window.triggerGA(!0):window.triggerGA(!1),t.__tcfapi=e,window.pmc_onetrust.initialized.__tcfapi=!0,a(t))}))}catch{}})),o=t=>new Promise((a=>{Object.keys(t).length&&pmc.hooks.do_action("pmc_onetrust_consent_data_ready",{groupsConsentedTo:window.OptanonActiveGroups.split(",").filter((t=>t)),consentData:t}),a()}));window.pmc_onetrust={init:()=>{!function(){let _={};"object"==typeof pmc_fastly_geo_data&&"EU"!==pmc_fastly_geo_data?.continent&&"CA"!==pmc_fastly_geo_data?.region&&"US"!==pmc_fastly_geo_data?.country&&"CO"!==pmc_fastly_geo_data?.region&&"US"!==pmc_fastly_geo_data?.country&&"CT"!==pmc_fastly_geo_data?.region&&"US"!==pmc_fastly_geo_data?.country&&"DE"!==pmc_fastly_geo_data?.region&&"US"!==pmc_fastly_geo_data?.country&&"IA"!==pmc_fastly_geo_data?.region&&"US"!==pmc_fastly_geo_data?.country&&"MT"!==pmc_fastly_geo_data?.region&&"US"!==pmc_fastly_geo_data?.country&&"NE"!==pmc_fastly_geo_data?.region&&"US"!==pmc_fastly_geo_data?.country&&"NH"!==pmc_fastly_geo_data?.region&&"US"!==pmc_fastly_geo_data?.country&&"NJ"!==pmc_fastly_geo_data?.region&&"US"!==pmc_fastly_geo_data?.country&&"OR"!==pmc_fastly_geo_data?.region&&"US"!==pmc_fastly_geo_data?.country&&"TX"!==pmc_fastly_geo_data?.region&&"US"!==pmc_fastly_geo_data?.country&&"UT"!==pmc_fastly_geo_data?.region&&"US"!==pmc_fastly_geo_data?.country&&"VA"!==pmc_fastly_geo_data?.region&&"US"!==pmc_fastly_geo_data?.country&&document.querySelectorAll('script[class*="optanon-category"][type="text/plain"]').forEach((t=>function(t){const a=function(t){if(!t)return!1;const a=[...t.matchAll(/optanon-category-([a-zA-Z0-9]+)/g)];return!(!a||0===a.length)&&a.map((t=>t[1]))}(t.className);if(!a||0===a.length)return!1;let e=!0;for(const t of a)if(o=t,!("EU"!==pmc_fastly_geo_data?.continent||"string"==typeof OnetrustActiveGroups&&OnetrustActiveGroups.includes(o))){e=!1;break}var o;e&&function(t){const a=t.cloneNode(!0);a.setAttribute("type","text/javascript"),t.replaceWith(a)}(t)}(t))),t(_).then(a(_)).then(e(_)).then(o(_))}()},initialized:{__gpp:!1,__uspapi:!1,__tcfapi:!1}}})();; (()=>{var e={315:()=>{window.pmc_onetrust_helpers={getActiveConsentGroups:()=>(window.OptanonActiveGroups||"").split(",").filter(Boolean)}}},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var p=r[o]={exports:{}};return e[o](p,p.exports,t),p.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),(()=>{"use strict";t(315)})()})();;