PageSourceSearch

https://futurism.com/wp-content/themes/recurrent-base/js/app.js?ver=1790183986

js futurism.com collected 2026-09-24 06:58:30 UTC 50,081 bytes, 4 lines download raw bytes

1(()=>{var Me=Object.defineProperty;var me=Object.getOwnPropertySymbols;var Re=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable;var pe=n=>{throw TypeError(n)};var U=(n,e,t)=>e in n?Me(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ge=(n,e)=>{for(var t in e||(e={}))Re.call(e,t)&&U(n,t,e[t]);if(me)for(var t of me(e))_e.call(e,t)&&U(n,t,e[t]);return n};var be=(n,e,t)=>U(n,typeof e!="symbol"?e+"":e,t),qe=(n,e,t)=>e.has(n)||pe("Cannot "+t);var we=(n,e,t)=>e.has(n)?pe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t);var N=(n,e,t)=>(qe(n,e,"access private method"),t);function Be(n){return n!=null&&n===n.window}function g(n,e){if(e===void 0&&(e=null),n instanceof HTMLElement||n instanceof Node||Be(n))return[n];if(n instanceof NodeList)return[].slice.call(n);if(typeof n=="string"){var t=e?g(e)[0]:document;return[].slice.call(t.querySelectorAll(n))}return[]}function v(n,e){if(Array.isArray(n))return n.forEach(function(i){return v(i,e)});var t=g(n);if(t.length){var s=[].concat(e);return t.forEach(function(i){s.forEach(function(r){i.classList.add(r)})}),t}}function m(n,e,t,s){if(Array.isArray(n)){n.forEach(function(a){return m(a,e,t,s)});return}var i={};typeof s=="boolean"?i.capture=s:typeof s=="object"&&(i=Object.assign({},s));var r={cb:t,options:i};window._domassistevents||(window._domassistevents={}),window._domassistevents["_"+e]=r;var o=g(n);o.length&&o.forEach(function(a){a.addEventListener(e,t,i)})}function S(n,e){var t=g(n,e);return t.length?t[0]:null}function De(){try{var n=new CustomEvent("t",{detail:{a:"b"}});return n.type==="t"&&n.detail.a==="b"}catch(e){return!1}}var Ue=function(e,t){var s=document.createEvent("CustomEvent");return t?s.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):s.initCustomEvent(e,!1,!1,void 0),s},H=!1;function F(n,e,t){if(t===void 0&&(t={}),Array.isArray(n))return n.forEach(function(i){return F(i,e,t)});H||(H=De()?CustomEvent:Ue);var s=g(n);if(s.length)return t.bubbles!==!1&&(t.bubbles=!0),s.forEach(function(i){var r=new H(e,t);i.dispatchEvent(r)}),s}function ye(n,e){Array.isArray(n)&&n.forEach(function(i){return ye(i,e)}),window._domassistevents||(window._domassistevents={});var t=window._domassistevents["_"+e];if(t){var s=g(n);s.length&&s.forEach(function(i){i.removeEventListener(e,t.cb,t.options)})}}function ve(n,e,t,s){s===void 0&&(s=!1),m(n,e,function(i){ye(n,e),t(i)},s)}function x(n,e){if(Array.isArray(n))return n.forEach(function(i){return x(i,e)});var t=g(n);if(t.length){var s=[].concat(e);return t.forEach(function(i){s.forEach(function(r){i.classList.remove(r)})}),t}}function w(n,e){if(Array.isArray(n))return n.forEach(function(i){return w(i,e)});var t=g(n);if(t.length){var s=[].concat(e);return t.forEach(function(i){s.forEach(function(r){i.classList.toggle(r)})}),t}}var Ne=function(e){return function(t){e.push(t);function s(){for(;e.length;){var r=e.shift();typeof r=="function"&&r()}}function i(){document.removeEventListener("DOMContentLoaded",i),s()}setTimeout(function(){if(document.readyState!=="loading")return s()},0),document.addEventListener("DOMContentLoaded",i)}},Ee=Ne([]);function k(n,e){if(Array.isArray(n))return n.forEach(function(s){return k(s,e)});var t=g(n);return t.length&&t.forEach(function(s){Object.keys(e).forEach(function(i){i in s?s[i]=e[i]:s.dataset[i]=e[i]})}),t}function W(n,e){Array.isArray(n)&&n.forEach(function(r){return W(r,e)});var t=g(n);if(t.length)for(var s=t.length,i=0;i<s;i+=1)t[i].innerHTML=e}function $(n,e){if(Array.isArray(n))return n.forEach(function(s){return $(s,e)});var t=g(n,e);t.length&&t.forEach(function(s){s.prototype&&s.prototype.remove?s.remove():s.parentNode&&s.parentNode.removeChild(s)})}function He(n,e){var t={};return Object.keys(e.dataset).forEach(function(s){if(s.match(new RegExp("^"+n))&&s!==n){var i=s.replace(n,""),r=!1;i.match(/^Global/)&&(i=i.replace("Global",""),r=!0),i=""+i[0].toLowerCase()+i.slice(1),r?t[i]=window[e.dataset[s]]:t[i]=e.dataset[s],(typeof t[i]=="undefined"||t[i]==="")&&(t[i]=!0)}}),t}var j=He;function z(){return z=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)({}).hasOwnProperty.call(t,s)&&(n[s]=t[s])}return n},z.apply(null,arguments)}function Fe(n){var e=(function(t){if(typeof t!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var i=s.call(t,"string");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)})(n);return typeof e=="symbol"?e:e+""}function K(n,e){return e===void 0&&(e="module"),n.parentElement?n.parentElement.dataset[e]?n.parentElement:K(n.parentElement):n}var Se="[data-action]",A={find:g,findOne:S,on:m},l=(function(){function n(i,r){var o=this;return this.el=void 0,this.options=void 0,this.moduleName=void 0,this.els=void 0,this.setUps=void 0,this.id=void 0,this.actionRouter=function(a){var c=a.currentTarget,p=n.parseAction(c).name,d=j("action",c);
1p&&o[p].call(o,c,a,d)},this.log("Beginning setup"),this.el=i,this.options=z({},this.defaults,j("module",this.el)),this.moduleName=r||this.el.dataset.module||"",this.els={},this.setUps={},this.id="",this.preInit(),this.generateUuid(),this.storeRef(),this.setupActions(),this.setupNamed(),this.verifyRequired(),this.postInit(),this.log("Initalized"),this}var e,t,s=n.prototype;return s.preInit=function(){this.log("No preInit() actions included.")},s.postInit=function(){this.log("No postInit() actions included.")},s.generateUuid=function(){this.id="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){var r=16*Math.random()|0;return(i==="x"?r:3&r|8).toString(16)})},s.storeRef=function(){if(window.domorefs===void 0&&(window.domorefs={}),window.domorefs[this.el.dataset.moduleUid||"undefined"])return!1;this.el.dataset.moduleUid=this.id,window.domorefs[this.el.dataset.moduleUid]=this},s.setupActions=function(){var i=this;this.setupAction(this.el),this.find(Se).forEach(function(r){K(r)===i.el&&i.setupAction(r)})},s.setupAction=function(i){if(i.dataset.domoduleActionProcessed!=="true"){var r=n.parseAction(i),o=r.name,a=r.type;o&&(typeof this[o]=="function"?(this.log(o+" bound"),this.storeSetUp(o,"actions"),A.on(i,a,this.actionRouter),i.dataset.domoduleActionProcessed="true"):this.log(o+" was registered, but there is no function set up"))}},s.setupNamed=function(){var i=this;this.find("[data-name]").forEach(function(r){if(r.dataset.name){var o=r.dataset.name;K(r)===i.el&&(r.dataset.domoduleNameProcessed||(i.els[o]?Array.isArray(i.els[o])?i.els[o].push(r):i.els[o]=[i.els[o],r]:i.els[o]=r,i.storeSetUp(r.dataset.name,"named"),r.dataset.domoduleNameProcessed="true",r.dataset.domoduleOwner=i.id))}})},s.storeSetUp=function(i,r){this.setUps[r]===void 0&&(this.setUps[r]=[]),this.setUps[r].indexOf(i)<0&&this.setUps[r].push(i)},s.verifyRequired=function(){var i,r=this;return(i=this.required)!=null&&(i=i.options)!=null&&i.length&&(this.setUps.options=Object.keys(this.options)),Object.keys(this.required).forEach(function(o){r.required[o].forEach(function(a){if(r.setUps[o].indexOf(a)<0)throw new Error(a+" is required as "+o+" for "+r.moduleName+", but is missing!")})}),this},s.find=function(i){return A.find(i,this.el)},s.findOne=function(i){return A.findOne(i,this.el)},s.findByName=function(i){return this.els[i]},s.getOption=function(i){return this.options[i]},s.destroy=function(){var i,r=this;A.find(Se,(i=this.el.parentElement)!=null?i:void 0).forEach(function(o){if(o.dataset.domoduleActionProcessed==="true"){var a=n.parseAction(o);o.removeEventListener(a.type,r.actionRouter),o.dataset.domoduleActionProcessed="false"}})},s.log=function(i){n.log(this.constructor.name+": "+i)},s.error=function(i){n.error(this.constructor.name+": "+i)},n.parseAction=function(i){var r;
1return{name:i.dataset.action,type:(r=i.dataset.actionType)!=null?r:"click"}},n.getInstance=function(i){return i.dataset.moduleUid&&window.domorefs?window.domorefs[i.dataset.moduleUid]:(n.log("The dataset of "+(i.getAttribute("id")||"NO ID")+" has no UID."),!1)},n.register=function(i,r){if(typeof i!="string")i=(r=i).prototype.constructor.name;else if(typeof i=="string"&&r===void 0)throw new Error("No Domodule class instance was provided in either parameter.");window.domodules||(window.domodules={}),n.log("Registering "+i),window.domodules[i]=r},n.discover=function(i){if(i===void 0&&(i="body"),n.log("Discovering modules..."),window.domodules){var r;r=i instanceof Element?[i]:Array.isArray(i)?i:A.find(i);var o=[];return r.forEach(function(a){A.find("[data-module]",a).forEach(function(c){var p=c.dataset.module;if(p&&window.domodules&&typeof window.domodules[p]=="function"){if(typeof window.domorefs=="object"&&c.dataset.moduleUid&&window.domorefs[c.dataset.moduleUid]!==void 0)return;n.log(p+" found");var d=window.domodules[p];o.push(new d(c))}})}),o}n.log("No modules found")},n.log=function(i){n.debug&&console.log("[DOMODULE] "+i)},n.error=function(i){console.error("[DOMODULE] "+i)},e=n,(t=[{key:"required",get:function(){return{}}},{key:"defaults",get:function(){return{}}}])&&(function(i,r){for(var o=0;o<r.length;o++){var a=r[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(i,Fe(a.key),a)}})(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e})();l.autoDiscover=void 0,l.debug=void 0,l.debug=typeof window.localStorage=="object"&&window.localStorage.getItem("DomoduleDebug"),l.autoDiscover=!0,window.addEventListener("DOMContentLoaded",function(){l.autoDiscover&&l.discover()});var V=class extends l{postInit(){m(this.els.SourcesToggle,"click",()=>{let e=this.els.SourcesToggle.getAttribute("aria-expanded")==="true"?"false":"true";this.els.SourcesToggle.setAttribute("aria-expanded",e),w(this.els.SourcesContent,"show")})}};l.register("ArticleSourcesBlock",V);var Q=class extends l{postInit(){this.player=this.el,this.audioEl=this.el.querySelector(".element"),this.playBtn=this.el.querySelector(".play"),this.pauseBtn=this.el.querySelector(".pause"),this.current=this.el.querySelector(".progress .current-time"),this.total=this.el.querySelector(".progress .total-time"),this.slider=this.el.querySelector(".progress .slider"),this.pauseProgressUpdate=!1,this.reachedMilestones=new Set,this.setupListeners()}setupListeners(){this.playBtn.addEventListener("click",()=>this.audioEl.play()),this.pauseBtn.addEventListener("click",()=>this.audioEl.pause()),this.audioEl.addEventListener("timeupdate",e=>this.handleTimeUpdate(e)),this.slider.addEventListener("change",e=>this.handleProgressBarChange(e)),this.slider.addEventListener("mousedown",()=>this.pauseUpdates()),this.slider.addEventListener("touchstart",()=>this.pauseUpdates()),this.slider.addEventListener("mouseup",()=>this.resumeUpdates()),this.slider.addEventListener("touchend",()=>this.resumeUpdates()),this.audioEl.addEventListener("play",()=>this.showPlayButton()),this.audioEl.addEventListener("pause",()=>this.showPauseButton())}handleTimeUpdate(e){if(this.pauseProgressUpdate)return;let{duration:t,currentTime:s}=e.target,i=new Date(s*1e3).toISOString().substring(14,19),r=new Date(t*1e3).toISOString().substring(14,19);this.slider.value=(s/t*100).toFixed(1),i!==this.current.textContent&&(this.current.textContent=i),r!==this.total.textContent&&(this.total.textContent=r),this.checkMilestones(s,t)}checkMilestones(e,t){if(Number.isNaN(t)||Number.isNaN(e)||!Number.isFinite(t)||!Number.isFinite(e)||t===0)return;let s=Math.floor(e/t*10)*10;s=Math.min(Math.max(0,s),100),s!==0&&(this.reachedMilestones.has(s)||(this.reachedMilestones.add(s),this.pushEvent(`article_audio_playing_${s}`)))}showPlayButton(){this.player.classList.add("playing","played"),this.pushEvent("article_audio_play")}showPauseButton(){this.player.classList.remove("playing"),this.pushEvent("article_audio_pause")}pushEvent(e){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:e})}handleProgressBarChange(e){let{duration:t}=this.audioEl;this.audioEl.currentTime=e.target.value/100*t,this.pushEvent("article_audio_seek")}resumeUpdates(){this.pauseProgressUpdate=!1}pauseUpdates(){this.pauseProgressUpdate=!0}};l.register("ArticleAudioPlayer",Q);var G=class extends l{toggleShelf(){w(this.els.dropdownContent,"hide-dropdown"),this.els.dropdownButton.getAttribute("aria-expanded")==="true"?(this.els.dropdownButton.setAttribute("aria-expanded","fal
1se"),this.els.dropdownButton.setAttribute("toggle-icon","+")):(this.els.dropdownButton.setAttribute("aria-expanded","true"),this.els.dropdownButton.setAttribute("toggle-icon","-"))}};l.register("Dropdown",G);Ee(()=>{let n=g(".schema-faq-section");k(n,{module:"YoastFAQ"}),l.discover()});var Y=class extends l{postInit(){let e=this.findOne(".schema-faq-question"),t=e.innerHTML;W(e,`<span class="schema-faq-question-text">${t}</span>
2			<button type="button" class="schema-faq-question-button" aria-label="Show Answer"/>`),m(this.findOne(".schema-faq-question-button"),"click",()=>{w(this.el,"show-answer"),w(this.el,"minus-icon")}),this.maybeOpenFirstQuestion()}maybeOpenFirstQuestion(){let e=this.el.parentElement;if(!e||!e.classList.contains("FaqFirstOpen"))return!1;let t=e.querySelectorAll(".schema-faq-section").item(0);if(!t||t.dataset.moduleUid!==this.el.dataset.moduleUid)return!1;let s=this.findOne(".schema-faq-question-button");return s?(s.click(),!0):!1}};l.register("YoastFAQ",Y);function We(n){let e={};if(typeof n=="string"&&n==="meta"?e=t():typeof n=="string"&&n==="custom"?e=s():e=n,Object.keys(e).length===0)throw new Error("No breakpoints defined");function t(){let d=document.createElement("meta");d.classList.add("breakpoint-helper"),document.getElementsByTagName("head")[0].appendChild(d);let f=window.getComputedStyle(d).getPropertyValue("font-family");return f.length<=0?{}:(f=f.replace(/'|"/g,"").split("&"),f.reduce((h,u)=>{let[b,E]=u.split("=");return h[b]=E,h},{}))}function s(){return[...Array.from(document.styleSheets).filter(h=>{var u;return((u=h==null?void 0:h.href)==null?void 0:u.indexOf(window.location.origin))!==-1})].reduce((h,u)=>(Array.from(u.cssRules).forEach(b=>{b instanceof CSSStyleRule&&b.selectorText===":root"&&b.cssText.split("{")[1].replace("}","").split(";").forEach(R=>{let[L,T]=R.split(":");L.indexOf("--bph-")!==-1&&(h[L.replace("--bph-","").trim()]=T.trim())})}),h),{})}function i(d,f=!1){let h=[];return d.forEach(u=>{a(u,f)&&h.push(u)}),f?h:h.reverse()}function r(){return e}function o(d,f=!1){if(Array.isArray(d)){let[u,b]=d;return`${o(u)} and ${o(b,!0)}`}let h=e[d];if(typeof h=="undefined")throw new Error(`"${d}" does not seem to be a breakpoint name`);if(f){let u=parseFloat(h),b=h.replace(u,"");return`(max-width: ${u-(b==="em"?.0635:1)}${b})`}return`(min-width: ${h})`}function a(d,f=!1){return window.matchMedia(o(d,f)).matches}function c(d,f){let h=null,u={name:"",useMax:!1,immediate:!0};typeof d=="string"||Array.isArray(d)?u.name=d:(u.name=d.name,u.useMax=d.useMax||!1,u.immediate=typeof d.immediate=="undefined"?!0:d.immediate);function b(){h=window.matchMedia(o(u.name,u.useMax)),u.immediate&&f(h),h.addEventListener("change",f)}b();function E(){h&&(h.removeEventListener("change",f),h=null)}return{on:b,off:E}}function p(d,f={}){let h=Object.keys(e),u=[],b=h;if(h.length===0)return{on:()=>{},off:()=>{}};let{useMax:E,immediate:R,listenTo:L}=f,T={useMax:E||!1,immediate:typeof R=="undefined"?!0:R};L&&(b=L.sort((I,D)=>parseInt(e[I],10)-parseInt(e[D],10)));let ue=()=>{d(i(b,T.useMax))};function fe(){b.forEach(I=>{let D=c({name:I,useMax:T.useMax,immediate:!1},ue);u.push(D)}),T.immediate&&ue()}fe();function Oe(){u.length&&(u.forEach(I=>I.off()),u=[])}return{on:fe,off:Oe}}
2return{getBreakpoints:r,getMediaQuery:o,isMatching:a,listen:c,listenAll:p}}var xe=We;var $e={xs:"320px",sm:"640px",md:"768px",lg:"1024px",xl:"1280px","1.5xl":"1384px","2xl":"1536px"},je=xe($e),{getBreakpoints:Ae,getMediaQuery:Bt,isMatching:Dt,listen:Ut,listenAll:Ce}=je;var ze={debug:(...n)=>console.debug(...n),info:(...n)=>console.info(...n),warn:(...n)=>console.warn(...n),error:(...n)=>console.error(...n)},y=ze;var J=class extends l{postInit(){var e;this.config={sm:{paddedCount:0},md:{paddedCount:2}},this.paddedCount=this.config.md.paddedCount,this.paginationItems=this.find(".page-numbers:not(.prev):not(.next)"),this.currentPageEl=this.findOne(".page-numbers.current"),this.currentPageEl||(this.currentPageEl=(e=this.paginationItems)==null?void 0:e[0]),this.currentPageEl||y.warn("No pagination items found"),this.currentPage=parseInt(this.currentPageEl.textContent,10),this.totalPages=this.paginationItems.length,this.listener=Ce(this.checkBreakpoint.bind(this),{useMax:!0})}checkBreakpoint(e){var i;let t=e[0],s=((i=this.config)==null?void 0:i[t])||this.config.md;this.paddedCount=s.paddedCount,this.reset()}reset(){var e,t,s,i;if(x(this.paginationItems,"hidden"),$(this.find(".page-numbers.dots")),this.currentPage-this.paddedCount>this.paddedCount){for(let r=1;r<this.currentPage-1-this.paddedCount;r++)v((e=this.paginationItems)==null?void 0:e[r],"hidden");this.currentPage>2&&((t=this.paginationItems)==null||t[Math.min(1,this.currentPage-(this.paddedCount?2:1)-this.paddedCount)].insertAdjacentHTML("afterend",'<button type="button" class="page-numbers dots" data-action="show" aria-label="Show all pages">&hellip;</button>'))}if(this.currentPage<this.totalPages-1-this.paddedCount){for(let r=this.currentPage+this.paddedCount;r<this.totalPages-1;r++)v((s=this.paginationItems)==null?void 0:s[r],"hidden");(i=this.paginationItems)==null||i[this.currentPage+this.paddedCount].insertAdjacentHTML("afterend",'<button type="button" class="page-numbers dots" data-action="show" aria-label="Show all pages">&hellip;</button>')}v(this.hideList,"hidden"),this.setupActions()}show(){x(this.paginationItems,"hidden"),v(this.find(".dots"),"hidden")}};l.register("PaginateSEO",J);var Ke=function(e,t,s){var i;return function(){var r=this,o=arguments,a=function(){i=null,s||e.apply(r,o)},c=s&&!i;clearTimeout(i),i=setTimeout(a,t),c&&e.apply(r,o)}},_=Ke;var P=[];m(window,"scroll",function(n){P.forEach(function(e){return e.handler.call(null,n)})});var Ve={on:function(e,t,s){var i=e;t&&(i=_(e,t,s)),P.push({handler:i,callback:e,wait:t,immediate:s})},off:function(e,t,s){e?P=P.filter(function(i){return i.callback!==e&&i.wait!==t&&i.immediate!==s}):P.length=0}},Le=Ve;var X=class extends l{postInit(){this.originalUrl=window.location.href;let e=new URLSearchParams(window.location.search);this.debug=e.get("_secondscroll_debug"),this.overrideNextPostId=e.get("_secondscroll"),this.configuredNextPostId=window.recurrentSecondScroll&&window.recurrentSecondScroll.nextPostId||null,this.article=this.findOne("article"),this.loaded=!1,this.analytisTriggered=!1,this.eventQueue=[],this.lastScrollFiredPercent=Math.ceil(window.scrollY/(this.article.offsetHeight-window.innerHeight)*100)||0,this.initialScroll=this.lastScrollFiredPercent,this.showingIndex=1,this.articleMeta=null,this.originalPageTitle=document.title,this.secondArticleContainer=null,ve(window,"SecondScroll:trigger",this.loadPost.bind(this)),m(window,"SecondScroll:loaded",()=>{this.log("Second scroll loaded");let t=S("[data-meta]",this.secondArticleContainer);try{this.articleMeta=JSON.parse(t.dataset.meta);let s=t.dataset.permalink;affilimate_options.analytics_affilimate_enable==="1"&&affilimate_options.analytics_affilimate_id&&typeof affilimate!="undefined"&&(this.log("Affilimate track area",this.secondArticleContainer,s),affilimate.getInstance(affilimate_options.analytics_affilimate_id).then(i=>{i.trackArea({el:t,url:s})}).catch(()=>{this.log("Unable to instance the affilimate")}))}catch(s){this.log("Error parsing article meta",s,t.dataset.meta)}}),m(window,"SecondScroll:ready",()=>{this.secondArticleContainer=this.el.nextElementSibling,this.log("Second scroll ready"),this.log("Second article container",this.secondArticleContainer),new IntersectionObserver(s=>
2{s.forEach(i=>{i.isIntersecting&&this.showingIndex===1&&this.fire("SecondScroll:show")})}).observe(this.secondArticleContainer)}),m(window,"SecondScroll:reset",()=>{this.log("Second scroll reset"),this.showingIndex=1,document.title=this.originalPageTitle,history.pushState(null,null,this.originalUrl)}),m(window,"SecondScroll:show",()=>{var i;this.log("Second scroll show"),this.showingIndex=2,this.lastScrollFiredPercent=100;let t=S("[data-permalink]",this.secondArticleContainer),s=((i=this.articleMeta)==null?void 0:i["SEO Title"])||S("h1",t).innerText;if(document.title=s,history.pushState(null,null,t.dataset.permalink+"?utm_medium=direct&utm_source=second-scroll"),!this.analytisTriggered&&this.articleMeta)try{window.dataLayer.push(this.articleMeta),this.analytisTriggered=!0,this.log("Pushed to dataLayer",this.articleMeta)}catch(r){this.log("Error pushing to dataLayer",r)}}),Le.on(()=>{if(this.article){let t=this.article.offsetHeight,s=window.innerHeight,i=window.scrollY,r=Math.ceil(i/(t-s)*100);this.log(`Scrolled: ${r}%`,`Last fired: ${this.lastScrollFiredPercent?this.lastScrollFiredPercent:"never"}`),r>=80&&this.lastScrollFiredPercent<80?(this.lastScrollFiredPercent=r,this.fire("SecondScroll:ready")):r<100&&this.lastScrollFiredPercent>=100&&(this.lastScrollFiredPercent=r,this.fire("SecondScroll:reset"))}},16,!0),this.debug&&this.overrideNextPostId?window.dispatchEvent(new CustomEvent("SecondScroll:trigger",{detail:{nextPostId:this.overrideNextPostId}})):this.configuredNextPostId&&this.observeAuthorBlock(),this.initialScroll>=80&&this.fire("SecondScroll:ready")}observeAuthorBlock(){let e=document.getElementById("author-widgets");if(!e){this.log("No author block found; second scroll will not fire");return}new IntersectionObserver((s,i)=>{s.forEach(r=>{r.isIntersecting&&(i.disconnect(),window.dispatchEvent(new CustomEvent("SecondScroll:trigger",{detail:{nextPostId:String(this.configuredNextPostId)}})))})},{threshold:.05}).observe(e)}loadPost({detail:{nextPostId:e}}){if(!e){y.error("SecondScroll:trigger event missing nextPost");return}this.log("Loading second scroll post",e);let t=`/wp-json/recurrent/v1/post/${e}/content`;fetch(t).then(s=>s.json()).then(s=>{s.content&&(this.el.insertAdjacentHTML("afterend",`<div data-nosnippet>${s.content}</div>`),this.secondArticleContainer=this.el.nextElementSibling,this.loaded=!0,this.fire("SecondScroll:loaded"))})}fire(e){this.eventQueue.push(e),this.loaded&&(this.eventQueue.forEach(t=>{F(window,t)}),this.eventQueue=[])}log(...e){this.debug&&y.debug("[Sec. Scroll]",...e)}};l.register("SecondScroll",X);var Qe="show-more",Ge="collapsible-summary--expanded",Z=class extends l{postInit(){if(this.init(),!this.els.TocContent||!this.els.TocToggle)return;let e=parseInt(this.el.dataset.tocHiddenCount||"0",10);if(e===0)return;let t=this.els.TocContent.querySelectorAll(".toc-hidden"),s=this.els.TocContent.querySelectorAll(".toc-item-hidden"),i=`SHOW ${e} MORE`,r=`HIDE ${e}`;m(this.els.TocToggle,"click",()=>{let a=!(this.els.TocToggle.getAttribute("aria-expanded")==="true");this.els.TocToggle.setAttribute("aria-expanded",String(a)),w(this.els.TocContent,Qe),w(this.el,Ge),a?(t.forEach(c=>{c.removeAttribute("tabIndex")}),s.forEach(c=>{c.classList.remove("toc-item-hidden"),c.classList.add("toc-item-revealed")}),this.els.TocToggleText.innerText=r):(t.forEach(c=>{c.setAttribute("tabIndex","-1")}),s.forEach(c=>{c.classList.remove("toc-item-revealed"),c.classList.add("toc-item-hidden")}),this.els.TocToggleText.innerText=i)})}init(e=null){if(!e){g("[data-toc]").forEach(t=>this.init(t));return}g('a[href^="#"]',e).forEach(t=>{let s=document.getElementById(t.hash.substring(1));s&&(s.hasAttribute("tabindex")||(s.tabIndex=-1),t.hash===window.location.hash&&requestAnimationFrame(()=>s.focus({preventScroll:!0})))})}};l.register("TableOfContents",Z);var Ye=".wp-block-yoast-seo-ai-summarize, .wp-block-recurrent-key-takeaways";function Je(n){let e=n.querySelector(".ai-summary-toggle");if(!e)return;let t=e.querySelector(".ai-summary-toggle-text"),s=n.querySelectorAll(".ai-summary-item-hidden"),i=parseInt(e.dataset.hiddenCount,10),r=n.classList.contains("collapsible-summary")?"collapsible-summary--expanded":"ai-summary-expanded";m(e,"click",()=>{let a=!(e.getAttribute("aria-expanded")==="true");
2e.setAttribute("aria-expanded",String(a)),w(n,r),s.forEach(c=>{c.classList.toggle("ai-summary-item-hidden",!a),c.classList.toggle("ai-summary-item-revealed",a)}),t.textContent=a?`HIDE ${i}`:`SHOW ${i} MORE`})}function Xe(){document.querySelectorAll(Ye).forEach(Je)}Xe();var Ze=".click-to-reveal__trigger";function et(n,e){return e?n.getAttribute("aria-pressed")==="true":n.classList.contains("is-revealed")}function tt(n,e,t){t&&n.setAttribute("aria-pressed",String(e)),n.classList.toggle("is-revealed",e),e&&!t?(n.classList.add("is-done"),n.disabled=!0,n.dataset.revealedLabel&&n.setAttribute("aria-label",n.dataset.revealedLabel)):(n.classList.remove("is-done"),n.disabled=!1)}function it(n){n.addEventListener("click",()=>{let e=n.dataset.reBlur==="1",t=et(n,e);if(t&&!e)return;tt(n,e?!t:!0,e)})}function Te(){document.querySelectorAll(Ze).forEach(it)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Te):Te();var st=".recurrent-nsfw-gate",nt={twitter:"https://platform.twitter.com/widgets.js"},ee={};function rt(n){return ee[n]||(ee[n]=new Promise((e,t)=>{let s=document.createElement("script");s.src=n,s.async=!0,s.onload=e,s.onerror=t,document.body.appendChild(s)})),ee[n]}function ke(n,e){let t=s=>{if(s.source!==n.contentWindow)return;let i="";try{i=new URL(s.origin).hostname}catch(a){return}if(i!==e&&!i.endsWith(`.${e}`))return;let r=s.data;if(typeof r=="string")try{r=JSON.parse(r)}catch(a){return}let o=r&&(r.height||r.details&&r.details.height);o&&(n.style.height=`${o}px`,window.removeEventListener("message",t))};window.addEventListener("message",t),setTimeout(()=>window.removeEventListener("message",t),15e3)}function ot(n,e){let t=n.querySelector("[data-tweet-id]"),s=t&&t.getAttribute("data-tweet-id")||e.tweetId;if(!s)return null;let i=document.createElement("div");i.className="twitter-tweet-container",t?t.replaceWith(i):(n.textContent="",n.appendChild(i));let r=()=>window.twttr.widgets.createTweet(s,i);return window.twttr&&window.twttr.widgets?r():rt(nt.twitter).then(r)}function at(n){let e=(n||"").match(/instagram\.com\/(?:p|reel|reels|tv)\/([A-Za-z0-9_-]+)/i);return e?`https://www.instagram.com/p/${e[1]}/`:null}function lt(n,e){let t=n.querySelector(".instagram-media"),s=at(e.embedUrl||t&&t.getAttribute("data-instgrm-permalink")||"");if(!s)return;let i=document.createElement("iframe");i.src=`${s}embed/captioned/`,i.className="recurrent-nsfw-instagram",i.title="Instagram post",i.setAttribute("scrolling","no"),i.setAttribute("allowfullscreen",""),i.setAttribute("referrerpolicy","no-referrer"),n.textContent="",n.appendChild(i),ke(i,"instagram.com")}function ct(n,e){let t=e.videoId;if(!t){let o=(e.embedUrl||"").match(/\/video\/(\d+)/);t=o?o[1]:""}if(!t)return;let s=document.createElement("iframe");s.src=`https://www.tiktok.com/embed/v2/${t}`,s.title="TikTok video",s.setAttribute("allowfullscreen",""),s.setAttribute("scrolling","no"),s.style.cssText="width:100%;height:740px;max-height:740px;display:block;border:0;";let i=document.createElement("blockquote");i.className="tiktok-embed",i.style.maxWidth="605px",i.style.minWidth="325px",i.appendChild(s);let r=document.createElement("div");r.className="wp-block-embed__wrapper",r.appendChild(i),n.textContent="",n.appendChild(r),ke(s,"tiktok.com")}var dt={twitter:ot,instagram:lt,tiktok:ct};function ht(n){n.classList.add("recurrent-nsfw-loading-host");let e=document.createElement("div");e.className="recurrent-nsfw-loading",e.setAttribute("role","status"),e.setAttribute("aria-label","Loading content"),n.appendChild(e);let t=!1;return()=>{t||(t=!0,e.remove(),n.classList.remove("recurrent-nsfw-loading-host"),n.querySelector("iframe")&&n.classList.add("embed-loaded"))}}function ut(n,e){let t=!1,s=()=>{t||(t=!0,e())},i=a=>{a.addEventListener("load",s,{once:!0}),setTimeout(s,4e3)},r=n.querySelector("iframe");if(r){i(r);return}let o=new MutationObserver(()=>{let a=n.querySelector("iframe");a&&(o.disconnect(),i(a))});o.observe(n,{childList:!0,subtree:!0}),setTimeout(()=>{o.disconnect(),s()},1e4)}function ft(n){let e=n.querySelector("template.recurrent-nsfw-payload"),t=n.parentNode;if(!e||!t)return;let s=ge({},n.dataset),i=e.content.cloneNode(!0),r=Array.from(i.childNodes);t.insertBefore(i,n),n.remove();let o=r.find(d=>d.nodeType===1);if(!o)return;let a=dt[s.provider],c=a?a(o,s):null,p=ht(o);c&&typeof c.then=="function"?(c.then(()=>p(),()=>p()),setTimeout(p,1e4)):ut(o,p)}function mt(n){let e=n.querySelector(".recurrent-nsfw-button");e&&e.addEventListener("click",()=>ft(n))}function Ie(){document.querySelectorAll(st).forEach(mt)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Ie):Ie();var te=class extends l{postInit(){if(!this.els.TagContent||!this.els.TagToggle)return;let e=this.els.TagContent.querySelectorAll(".tag-hidden"),t=this.els.TagToggleText.textContent.trim();m(this.els.TagToggle,"click",()=>{let s=this.els.TagToggle.getAttribute("aria-expanded")==="true";this.els.TagToggle.setAttribute("aria-expanded",String(!s)),e.forEach(i=>
2{i.classList.toggle("hidden",s)}),this.els.TagToggleText.innerText=s?t:"Hide",this.els.TagToggleIcon.innerText=s?"+":"-"})}};l.register("TagList",te);if(window!=null&&window._amznTag&&(window!=null&&window._amznParam))try{let n=document.querySelectorAll('main article a[href*="amazon."], main article a[href*="amazn."]'),e=window._amznParam,t=new Date,s=t.getDate().toString().padStart(2,0)+t.getHours().toString().padStart(2,0),i=window.innerWidth.toString().substring(0,4).padStart(4,0),r=window.innerHeight.toString().substring(0,4).padStart(4,0),o=encodeURI(e.substring(0,17)+i+r+e.substring(25,35)+s);n.forEach(a=>{let c=new URL(a.getAttribute("href"));c.searchParams.has("tag")||c.searchParams.set("tag",window._amznTag),c.searchParams.has("asc_source")||c.searchParams.set("asc_source","browser"),c.searchParams.has("asc_refurl")||c.searchParams.set("asc_refurl",new URL(window.location.pathname,window.location.origin).href),c.searchParams.has("ascsubtag")||c.searchParams.set("ascsubtag",o);let{asin:p,tag:d}=pt(c.href),f=d||window._amznTag,h=o;p&&a.setAttribute("data-aps-asin",p),f&&a.setAttribute("data-aps-asc-tag",f),h&&a.setAttribute("data-aps-asc-subtag",h),a.setAttribute("href",c.href)})}catch(n){y.error("Amazon Tag Error:",n)}function pt(n){let e=/(?:dp|gp\/product|gp\/offer-listing|gp\/aw|gp\/video)\/([A-Z0-9]{10})(?:.*?[?&]tag=([^&]+))?/,t=n.match(e);return t?{asin:t[1],tag:t[2]||null}:{asin:null,tag:null}}function gt(){document.querySelectorAll(".wp-block-columns").forEach(e=>{if(e.querySelectorAll(".wp-block-image").length>1){let s=e.querySelectorAll("img"),i=Array.from(s).map(r=>new Promise(o=>{r.complete?o():r.addEventListener("load",o,{once:!0})}));Promise.all(i).then(()=>{let r=s.values().reduce((o,a)=>Math.min(o,a.naturalWidth/a.naturalHeight),Number.MAX_SAFE_INTEGER);s.forEach(o=>{o.style["aspect-ratio"]=r,o.style["object-fit"]="cover",o.style.height="auto"})})}})}gt();var ie=class extends l{postInit(){this.breakpoints=Ae(),this.block=this.el.querySelector(".wp-block-table"),this.table=this.el.querySelector("table"),this.figure=this.el.querySelector("figure"),this.tableControls=null,this.tableExpandBtn=null,this.tableCollapseBtn=null,this.el.id||(this.el.id=`table-${this.el.hasAttribute("data-module-uid")?this.el.getAttribute("data-module-uid"):Math.random().toString(16).slice(2)}`),this.eventHandlers={checkWidth:_(this.checkWidth.bind(this),10),scroll:this.logScroll.bind(this),expand:this.expandTable.bind(this),collapse:this.collapseTable.bind(this),resize:this.setupExpandCollapse.bind(this)},window.addEventListener("resize",this.eventHandlers.resize),this.setupExpandCollapse(),!this.enhanceTable()&&this.enableScrollableTable()}destroy(){var e;window.removeEventListener("resize",this.eventHandlers.resize),window.removeEventListener("resize",this.eventHandlers.checkWidth),(e=this.figure)==null||e.removeEventListener("scroll",this.eventHandlers.scroll),this.removeTableControlEvents()}setupExpandCollapse(){if(!window.matchMedia(`(max-width: ${this.breakpoints.md})`).matches||!this.block||!this.table){this.notCollapsibleTable();return}let s=window.innerHeight*.6;if(this.table.scrollHeight<=s){this.notCollapsibleTable();return}this.el.classList.add("table-collapsible"),this.el.classList.remove("table-no-collapse"),this.tableControls=this.el.querySelector(".table-toggle-buttons"),this.tableControls||(this.tableControls=document.createElement("span"),this.tableControls.className="table-toggle-buttons",this.tableExpandBtn=document.createElement("button"),this.tableExpandBtn.className="table-expand",this.tableExpandBtn.textContent="Show more",this.tableCollapseBtn=document.createElement("button"),this.tableCollapseBtn.className="table-collapse",this.tableCollapseBtn.textContent="Show less",this.tableExpandBtn.setAttribute("aria-controls",this.el.id),this.tableCollapseBtn.setAttribute("aria-controls",this.el.id),this.tableExpandBtn.setAttribute("aria-pressed","false"),this.tableCollapseBtn.setAttribute("aria-pressed","true"),this.tableControls.appendChild(this.tableExpandBtn),this.tableControls.appendChild(this.tableCollapseBtn),this.block.after(this.tableControls)),this.removeTableControlEvents(),this.tableExpandBtn.addEventListener("click",this.eventHandlers.expand),this.tableCollapseBtn.addEventListener("click",this.eventHandlers.collapse),this.el.setAttribute("aria-expanded","fal
2se")}notCollapsibleTable(){var e;this.el.classList.add("table-no-collapse"),this.el.classList.remove("table-collapsible"),this.el.removeAttribute("aria-expanded"),this.removeTableControlEvents(),(e=this.tableControls)==null||e.remove()}removeTableControlEvents(){var e,t;(e=this.tableExpandBtn)==null||e.removeEventListener("click",this.eventHandlers.expand),(t=this.tableCollapseBtn)==null||t.removeEventListener("click",this.eventHandlers.collapse)}expandTable(e){var t;this.el.classList.add("table-expanded"),this.el.setAttribute("aria-expanded","true"),e.target.setAttribute("aria-pressed","true"),(t=this.tableCollapseBtn)==null||t.setAttribute("aria-pressed","false")}collapseTable(e){var t;this.el.classList.remove("table-expanded"),this.el.scrollIntoView({behavior:"smooth",block:"start"}),this.el.setAttribute("aria-expanded","false"),e.target.setAttribute("aria-pressed","true"),(t=this.tableExpandBtn)==null||t.setAttribute("aria-pressed","false")}enhanceTable(){let e=window.recurrentCoreTable||{};if(!this.block||this.block.classList.contains("classic-mobile-table")||!this.table)return!1;let t=this.getHeaderCells(this.block);if(!t||t.length===0||this.hasColspanOrRowspan(this.block))return!1;let s=e.columnMin||2;return t.length<s?!1:(this.table.classList.add("enhanced-mobile-table"),t.forEach((i,r)=>{this.block.querySelectorAll(`tbody tr td:nth-child(${r+1})`).forEach(o=>{k(o,{beforeContent:i.innerText})})}),!0)}enableScrollableTable(){this.figure&&this.figure.classList.add("classic-mobile-table"),window.addEventListener("resize",this.eventHandlers.checkWidth),this.checkWidth()}checkWidth(){if(!this.table||!this.figure)return;let e=this.table.offsetWidth,t=this.el.offsetWidth;e>t?(this.el.classList.add("wider"),this.figure.addEventListener("scroll",this.eventHandlers.scroll)):(this.el.classList.remove("wider"),this.figure.removeEventListener("scroll",this.eventHandlers.scroll))}logScroll(e){let{scrollLeft:t}=e.target,s=e.target.scrollWidth-e.target.clientWidth;t>=s-5?this.el.classList.remove("wider"):this.el.classList.add("wider")}getHeaderCells(e){let t=e.querySelector("thead");if(t){let i=t.querySelectorAll("th");if(i.length>0)return i;let r=t.querySelectorAll("td");if(r.length>0)return r}let s=e.querySelector("tbody tr:first-child");if(s){let i=s.querySelectorAll("th");if(i.length>0)return i;let r=s.querySelectorAll("td");if(r.length>0)return r}return null}hasColspanOrRowspan(e){let t=e.querySelectorAll("th, td");return Array.from(t).some(s=>{let i=parseInt(s.getAttribute("colspan"),10)||1,r=parseInt(s.getAttribute("rowspan"),10)||1;return i>1||r>1})}};l.register("TableMobileWrapper",ie);var bt=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),wt="(max-width: 1279px)",se=class n extends l{postInit(){this.publish=this.publish.bind(this),this.onChange=this.onChange.bind(this),this.onKeydown=this.onKeydown.bind(this),typeof ResizeObserver=="function"&&(this.observer=new ResizeObserver(this.publish),this.observer.observe(this.el)),this.toggle=this.el.querySelector(".hamburger-menu-checkbox"),this.searchToggles=[...this.el.querySelectorAll(".search-toggle")],this.el.addEventListener("change",this.onChange),document.addEventListener("keydown",this.onKeydown),this.publish()}destroy(){var e;(e=this.observer)==null||e.disconnect(),this.el.removeEventListener("change",this.onChange),document.removeEventListener("keydown",this.onKeydown),super.destroy()}onChange(e){let{target:t}=e;t===this.toggle&&this.publish(),this.stops=null,t===this.toggle?this.onHamburger():t.classList.contains("search-toggle")&&this.onSearch(t)}onHamburger(){var t;let e=this.panel();if(!this.toggle.checked){let s=e==null?void 0:e.ownerDocument.activeElement;s&&e.contains(s)&&this.toggle.focus();return}this.searchToggles.forEach(s=>this.close(s)),(t=this.tabStops()[1])==null||t.focus({preventScroll:!0})}onSearch(e){var t,s;e.checked&&(e.closest(".hamburger-menu-wrapper, .main-nav--membership")||this.close(this.toggle),!n.isMobileNav()&&((s=(t=e.closest(".search-wrapper"))==null?void 0:t.querySelector(".search-field"))==null||s.focus()))}onKeydown(e){var r,o;
2if(e.key==="Escape"){let a=(r=this.toggle)!=null&&r.checked?this.toggle:this.searchToggles.find(c=>c.checked);a&&(this.close(a),a.focus());return}if(e.key!=="Tab"||!((o=this.toggle)!=null&&o.checked))return;let t=this.tabStops();if(t.length<2)return;let s=t.indexOf(this.el.ownerDocument.activeElement),i=e.shiftKey?-1:1;e.preventDefault(),t[(s+i+t.length)%t.length].focus()}close(e){!e||!e.checked||(e.checked=!1,e.dispatchEvent(new Event("change",{bubbles:!0})))}panel(){let e=this.el.querySelector(".main-nav--membership");return e&&n.isMobileNav()?e:this.el.querySelector(".hamburger-menu-wrapper")}tabStops(){if(!this.stops){let e=this.panel();this.stops=e?[this.toggle,...[...e.querySelectorAll(bt)].filter(t=>t.getClientRects().length>0)]:[]}return this.stops}publish(){let{bottom:e}=this.el.getBoundingClientRect();this.set("--site-header-bottom",Math.max(0,Math.round(e))),this.set("--site-content-left",this.contentLeft())}contentLeft(){let e=this.el.querySelector(".hamburger-menu-wrapper"),t=e&&e.offsetParent;return t?Math.max(0,Math.round(t.getBoundingClientRect().left)):0}set(e,t){document.documentElement.style.setProperty(e,`${t}px`)}static isMobileNav(){return window.matchMedia(wt).matches}};l.register("SiteHeader",se);var ne=class extends l{postInit(){let e=document.querySelector(".header-wrapper");if(!e)return;let t=document.querySelector(".content-wrapper > p"),s=t?t.offsetTop:window.innerHeight;setTimeout(()=>{document.addEventListener("scroll",()=>{window.scrollY+e.offsetHeight>s?v(e,"unsticky"):x(e,"unsticky")})},2e3)}};l.register("PlaywireStickyHeader",ne);var re=class n{constructor(e,t){be(this,"maxRetries",3);if(n.getSiteKey()){if(!e||!t)throw new Error("RecaptchaService requires a form element and an action");this.form=e,this.action=t,e.addEventListener("input",()=>this.preloadRecaptchaV3(),{once:!0})}}static getSiteKey(){var e,t;return(t=(e=window==null?void 0:window.recaptcha)==null?void 0:e.site_key_v3)!=null?t:null}preloadRecaptchaV3(){return this._recaptchaV3Promise||(this._recaptchaV3Promise=this.loadAndReadyRecaptchaWithRetry(0).catch(()=>{this.reset()})),this._recaptchaV3Promise}loadAndReadyRecaptchaWithRetry(e){return this.loadAndReadyRecaptcha().catch(t=>{if(++e<this.maxRetries)return this.loadAndReadyRecaptchaWithRetry(e);throw t})}async loadAndReadyRecaptcha(){let e=n.getSiteKey();return e?this.loadRecaptcha(e).then(()=>{var s;if(typeof((s=window.grecaptcha)==null?void 0:s.ready)!="function")throw new Error("reCAPTCHA v3 not available");let{grecaptcha:t}=window;return new Promise(i=>{t.ready(()=>i({grecaptcha:t,siteKey:e}))})}):Promise.reject(new Error("reCAPTCHA site key not available"))}loadRecaptcha(e){return new Promise((t,s)=>{if(this.isRecaptchaReady())return t();if(document.querySelector('script[src*="recaptcha/api.js?render="]')){let o=0,a=()=>{if(this.isRecaptchaReady())return t();if(o>=5e3)return s(new Error("reCAPTCHA v3 not available"));o+=50,setTimeout(a,50)};a()}else{let i=document.createElement("script");i.src=`https://www.google.com/recaptcha/api.js?render=${e}`,i.async=!0,i.onload=()=>t(),i.onerror=()=>{i.remove(),s(new Error("Failed to load reCAPTCHA v3"))},document.head.appendChild(i)}})}isRecaptchaReady(){var e;return typeof((e=window.grecaptcha)==null?void 0:e.execute)=="function"}execute(){return this.preloadRecaptchaV3().then(async e=>{if(e&&e.grecaptcha&&e.siteKey){let t=await e.grecaptcha.execute(e.siteKey,{action:this.action});return this.appendReCaptcha(t)}throw new Error("An error occurred. Please try again.")})}appendReCaptcha(e,t="scoreToken"){if(!e)throw new Error("reCAPTCHA token is not valid");this.form.querySelectorAll(`[name="${t}"]`).forEach(r=>r.remove());let i=document.createElement("input");i.type="hidden",i.name=t,i.className=t,i.value=e,this.form.appendChild(i)}reset(){this._recaptchaV3Promise=null}},C=re;var O={MISSING_FORM_OR_URL_ACTION:"Form or action URL is missing.",ERROR_OCCURRED:"An error occurred. Please try again.",SUBMISSION_FAILED:"Submission failed.",INVALID_EMAIL:"Please enter a valid email address."},q={SUCCESS:".newsletter-signup-success",SUBMIT:".submit-with-recaptcha",EMAIL_INPUT:'input[type="email"]',ERROR_MSG:".newsletter-signup-error"},yt=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,oe=class extends l{postInit(){var e,t;if(this.form=this.el,this.submitButton=this.form.querySelector(q.SUBMIT),this.successMessageElement=this.form.querySelector(q.SUCCESS),this.emailInput=this.form.querySelector(q.EMAIL_INPUT),this.errorMsg=this.form.querySelector(q.ERROR_MSG),this.apiUrl=this.form.getAttribute("action"),this.submitButtonOriginalContent=(t=(e=this.submitButton)==null?void 0:e.textContent)!=null?t:"",!this.form||!this.apiUrl||!this.submitButton||!this.emailInput||!this.errorMsg){y.error(O.MISSING_FORM_OR_URL_ACTION);return}this.recaptchaService=new C(this.form,"newsletter_submission"),this.form.addEventListener("submit",s=>this.handleSubmit(s)),this.emailInput.addEventListener("input",()=>this.resetError())}async handleSubmit(e){var s,i,r;if(e.preventDefault(),this.isLoading())return;let t=this.emailInput.value.trim();if(!yt.test(t)){this.logAndAlertError(`Invalid email: ${t}`,O.INVALID_EMAIL),this.emailInput.focus();return}this.setLoadingState();try{this.storeEmail(t),C.getSiteKey()&&await this.recaptchaService.execute();let o=await this.sendEmail();if(o.success&&this.successMessageElement)this.successMessageElement.style.display="flex";else if(!o.success){let a=((s=o.data)==null?void 0:s.message)||O.SUBMISSION_FAILED,c=((i=o.data)==null?void 0:i.code)==="recaptcha_v3_failed"&&((r=o.data)!=null&&r.message)?o.data.message:O.ERROR_OCCURRED;this.logAndAlertError(`Failed to submit form: ${a}`,c)}}catch(o){this.logAndAlertError(`Failed to submit form: ${o.message}`,O.ERROR_OCCURRED,o)}finally{this.resetLoadingState()}}setLoadingState(){this.resetError(),this.submitButton.disabled=!0,this.submitButton.textContent="Sending..."}
2resetLoadingState(){this.submitButton.disabled=!1,this.submitButton.textContent=this.submitButtonOriginalContent,this.recaptchaService.reset()}isLoading(){return this.submitButton.disabled}sendEmail(){return fetch(this.apiUrl,{method:"POST",credentials:"same-origin",body:new FormData(this.form)}).then(e=>{if(!e.ok)throw new Error(`Server error: ${e.status}`);return e.json()})}storeEmail(e){var o;let s=new TextEncoder().encode(e),i=String.fromCharCode.apply(null,s),r=btoa(i);window.localStorage.setItem("recurrent_user_eid",r),typeof((o=window==null?void 0:window.ramp)==null?void 0:o.setUserProfile)!="undefined"&&window.ramp.setUserProfile({eid:r,format:"EUP1"})}logAndAlertError(e,t,s){e&&y.error(e,s),t&&this.setError(t)}setError(e){this.emailInput.setAttribute("aria-invalid","true"),this.errorMsg.innerText=e}resetError(){this.emailInput.setAttribute("aria-invalid","false"),this.errorMsg.innerText=""}};l.register("NewsletterModule",oe);var vt=["a[href]","button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),ae=class extends l{postInit(){this.handleEscape=this.handleEscape.bind(this),this.handleOutside=this.handleOutside.bind(this),this.handleTab=this.handleTab.bind(this),this.handleFocusIn=this.handleFocusIn.bind(this),this.panel=this.el.querySelector(".header-user-menu__panel"),this.focusedEl=null,document.addEventListener("keydown",this.handleEscape),document.addEventListener("click",this.handleOutside),this.el.addEventListener("keydown",this.handleTab),this.el.addEventListener("focusin",this.handleFocusIn)}destroy(){document.removeEventListener("keydown",this.handleEscape),document.removeEventListener("click",this.handleOutside),this.el.removeEventListener("keydown",this.handleTab),this.el.removeEventListener("focusin",this.handleFocusIn)}handleFocusIn(e){this.focusedEl=e.target}toggle(e,t){t.stopPropagation();let s=t.detail===0;this.setOpen(!this.isOpen(),s)}isOpen(){return this.els.trigger.getAttribute("aria-expanded")==="true"}setOpen(e,t=!1){this.el.classList.toggle("is-open",e),this.els.trigger.setAttribute("aria-expanded",e?"true":"false"),e&&t&&this.focusFirst()}getFocusable(){return this.panel?Array.from(this.panel.querySelectorAll(vt)).filter(e=>!e.hasAttribute("disabled")&&e.offsetParent!==null):[]}focusFirst(){let e=this.getFocusable();e.length>0&&e[0].focus()}handleEscape(e){e.key!=="Escape"||!this.isOpen()||(this.setOpen(!1),this.els.trigger.focus())}handleOutside(e){this.el.contains(e.target)||!this.isOpen()||this.setOpen(!1)}handleTab(e){if(e.key!=="Tab"||!this.isOpen())return;let t=this.getFocusable();if(t.length===0)return;let s=t[0],i=t[t.length-1],r=this.focusedEl;e.shiftKey&&(r===s||r===this.els.trigger)?(e.preventDefault(),i.focus()):!e.shiftKey&&r===i&&(e.preventDefault(),s.focus())}};l.register("UserMenu",ae);var B=class extends l{supportsDialog(){var e;return typeof((e=this.els.modal)==null?void 0:e.showModal)=="function"}open(e,t){var i,r,o,a;t==null||t.preventDefault(),this.els.confirm&&(this.els.confirm.href=e.dataset.cancelUrl||"#");let s=e.dataset.nextBilling;if(this.els.billingDate&&(this.els.billingDate.textContent=s||""),this.els.promptWithDate&&(this.els.promptWithDate.hidden=!s),this.els.promptNoDate&&(this.els.promptNoDate.hidden=!!s),!this.supportsDialog()){let c=this.els.confirm,p=((r=(i=this.els.title)==null?void 0:i.textContent)==null?void 0:r.trim())||"",d=((a=(o=s?this.els.promptWithDate:this.els.promptNoDate)==null?void 0:o.textContent)==null?void 0:a.trim())||"",f=[p,d].filter(Boolean).join(`
3
4`);c&&window.confirm(f)&&window.location.assign(c.href);return}this.els.modal.showModal()}close(){this.supportsDialog()&&this.els.modal.close()}backdropClose(e,t){!this.supportsDialog()||t.target!==this.els.modal||this.els.modal.close()}};l.register("MemberPressCancelModal",B);var Pe=document.querySelector("#mepr-account-content:has(.mepr-subscriptions-card)");Pe&&new MutationObserver(n=>{for(let{addedNodes:e}of n)for(let t of e){if(t.nodeType!==Node.ELEMENT_NODE)continue;(t.matches('[data-module="MemberPressCancelModal"]')?[t]:[...t.querySelectorAll('[data-module="MemberPressCancelModal"]')]).filter(i=>
4!i.dataset.moduleUid).forEach(i=>new B(i))}}).observe(Pe,{childList:!0,subtree:!0});var le=class extends l{postInit(){if(new URLSearchParams(window.location.search).get("print")!=="1")return;let t=this.el.dataset.allowedReferrer;if(!(!t||!document.referrer.startsWith(t))){if(document.readyState==="complete"){window.print();return}window.addEventListener("load",()=>window.print(),{once:!0})}}print(){window.print()}};l.register("MemberPressPrintReceipt",le);var ce=class extends l{dismiss(){this.el.classList.contains("mepr-banner--welcome")&&this.stripWelcomeQuery(),this.el.remove()}stripWelcomeQuery(){let e=new URL(window.location.href);if(!e.searchParams.has("welcome"))return;e.searchParams.delete("welcome");let t=e.searchParams.toString(),s=`${e.pathname}${t?`?${t}`:""}${e.hash}`;window.history.replaceState(window.history.state,"",s)}ctaClick(e,t){if(e.getAttribute("aria-busy")==="true"){t.preventDefault();return}e.setAttribute("aria-busy","true"),e.setAttribute("aria-disabled","true"),e.classList.add("is-loading")}};l.register("MemberPressBannerDismiss",ce);var M,he,de=class extends l{constructor(){super(...arguments);we(this,M)}postInit(){this.form=this.el,this.fetching=!1,this.replaying=!1;let t=this.getOption("recaptchaAction")||"mepr_login";if(!C.getSiteKey())return;this.recaptchaService=new C(this.form,t);let s=this.form.querySelector(".mepr-submit");s?(this.submitButton=s,s.addEventListener("click",i=>this.handleCheckoutClick(i),!0)):(this.submitButton=this.form.querySelector('[type="submit"]'),this.form.addEventListener("submit",i=>this.handleLoginSubmit(i)))}async handleLoginSubmit(t){this.replaying||this.fetching||(t.preventDefault(),await N(this,M,he).call(this,()=>{typeof this.form.requestSubmit=="function"?this.form.requestSubmit():this.form.submit()}))}async handleCheckoutClick(t){if(this.replaying||this.fetching)return;t.preventDefault(),t.stopImmediatePropagation();let s=t.currentTarget;await N(this,M,he).call(this,()=>s.click())}};M=new WeakSet,he=async function(t){if(!(this.replaying||this.fetching)){this.fetching=!0,this.submitButton&&(this.submitButton.disabled=!0);try{await this.recaptchaService.execute().catch(()=>{})}finally{this.fetching=!1,this.submitButton&&(this.submitButton.disabled=!1)}try{this.replaying=!0,t()}finally{this.replaying=!1}}};l.register("MemberPressAuthModule",de);})();

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.