PageSourceSearch

https://www.esmmagazine.com/build/assets/app-2oeBcuBS.js

js esmmagazine.com collected 2026-10-01 08:37:34 UTC 9,273 bytes, 1 lines download raw bytes

1var u=function(t){var e=e||{};window.googletag=e,e.cmd=e.cmd||[];var i=document.createElement("script");i.async=!0,i.type="text/javascript";var s=document.location.protocol=="https:";i.src=(s?"https:":"http:")+"//securepubads.g.doubleclick.net/tag/js/gpt.js",window.googletag.cmd.push(t);var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(i,a)};const d={objToArray:function(t){return Object.entries(t).map(([e,i])=>({key:e,value:i}))},isHidden:function(t){return t.offsetParent===null},scrollPosition(){var t=window.pageYOffset,e=window.innerHeight,i=document.body.offsetHeight;return Math.max(i-(t+e),0)},distanceFromBottom(t){return 0-Math.floor(window.innerHeight-t.offsetTop)},throttle:function(t,e,i){e||(e=100);var s,a;return function(){var o=i||this,n=+new Date,l=arguments;s&&n<s+e?(clearTimeout(a),a=setTimeout(function(){s=n,t.apply(o,l)},e)):(s=n,t.apply(o,l))}},intersect:function({element:t,rootMargin:e,handler:i,fallback:s}){if(!window.IntersectionObserver)return;new IntersectionObserver((o,n)=>{o.forEach(l=>{l.isIntersecting?i.call():typeof s=="function"&&s.call()})},{rootMargin:e}).observe(t)}},r={data:{settings:{lazyLoading:!1,vanillaLazyLoading:{top:"-200px",bottom:"-200px"},targets:{}},slotContainers:[],slotUnits:[]},loadConfig(t={}){this.data.settings={...this.data.settings,...t}},boot:function(t={}){this.loadConfig(t),u(()=>{Array.from(document.querySelectorAll("meta[data-dfp-targeting]")).forEach(i=>{this.data.settings.targets[i.getAttribute("name")]=i.getAttribute("content")});for(const i in this.data.settings.targets)window.googletag.pubads().setTargeting(i,this.data.settings.targets[i]);var e=document.querySelectorAll('div[data-dfp]:not([data-displayed="true"])');this.loadSlotContainers(e),this.buildSlotUnits(),this.bindDfpEvents(),this.configureGoogleTagService()})},init:function(t={}){this.boot(t),this.enableServices()},asyncLoading(){var t=document.querySelectorAll('div[data-dfp]:not([data-displayed="true"])');this.loadSlotContainers(t),this.buildSlotUnits(),this.loadAds()},loadSlotContainers(t){const e=new Date;var i=0;t.forEach(s=>{if(i++,s.getAttribute("id")!=null)return;const a=s.dataset.dfp+"_"+e.getTime()+"_"+(Math.floor(Math.random()*100)+1)+i;s.setAttribute("id",a);const o={id:a,name:s.dataset.dfp,hasAdUnit:!1,displayed:!1,node:s,isLazy:s.getAttribute("data-lazyload")=="true"};d.isHidden(s)||this.data.slotContainers.push(o)})},setTargeting(t,e){this.data.settings.targets[t]=e},buildSlotUnits(){this.data.slotContainers.forEach(t=>{if(t.hasAdUnit===!0)return;const e=this.data.settings.units[t.name],i=d.objToArray(this.data.settings.screens);let s=window.googletag.sizeMapping();i.forEach(o=>{if(e.sizes[o.key]===!1)return null;e.sizes[o.key]!=null?s.addSize(o.value,e.sizes[o.key]):s.addSize(o.value,this.data.settings.sizeMappings[o.key])});let a;if(e.outOfPage?a=window.googletag.defineOutOfPageSlot(e.slotPath,t.id).addService(window.googletag.pubads()):a=window.googletag.defineSlot(e.slotPath,[1,1],t.id).defineSizeMapping(s.build()).addService(window.googletag.pubads()),t.node.dataset.targeting!==void 0){const o=JSON.parse(t.node.dataset.targeting);Object.keys(o).forEach(n=>{a=a.setTargeting(n,o[n])})}this.data.slotUnits[t.id]=a,t.hasAdUnit=!0})},bindDfpEvents(){var t=d.objToArray(this.data.settings.events);t.forEach(e=>{window.googletag.pubads().addEventListener(e.key,i=>e.value(i))})},configureGoogleTagService(){this.data.settings.global.collapseEmptyDivs===!0&&this.data.settings.lazyLoading===!1&&window.googletag.pubads().collapseEmptyDivs(),this.data.settings.global.setRefreshUnfilledSlots===!0&&window.googletag.companionAds().setRefreshUnfilledSlots(!0),this.data.settings.global.forceSafeFrame===!0&&window.googletag.pubads().setForceSafeFrame(!0),this.data.settings.global.enableSingleRequest===!0&&window.googletag.pubads().enableSingleRequest(),this.data.settings.global.setRequestNonPersonalizedAds===!0&&window.googletag.pubads().setPrivacySettings({nonPersonalizedAds:!0,restrictDataProcessing:!0})},enableServices(){window.googletag.cmd.push(()=>{window.googletag.pubads().enableSingleRequest(),window.googletag.pubads().disableInitialLoad(),this.data.settings.lazyLoading!=!1&&window.googletag.pubads().enableLazyLoad(this.data.settings.lazyLoading),window.googletag.enableServices()})},loadAds(){this.data.slotContainers.filter(t=>
1t.displayed===!1).forEach(t=>this.displayAd(t))},displayAd(t){if(d.isHidden(t.node))return;const e=()=>{t.displayed&&this.data.settings.autoRefresh===!1||(window.googletag.cmd.push(()=>{window.googletag.display(t.id),window.googletag.pubads().refresh([this.data.slotUnits[t.id]])}),t.displayed=!0,t.node.setAttribute("data-displayed","true"))};if(document.getElementById(t.id).dataset.sticky||this.data.settings.lazyLoading!=!1&&this.data.settings.vanillaLazyLoading===!1?e():d.intersect({element:document.getElementById(t.id),handler:e,rootMargin:`${this.data.settings.vanillaLazyLoading.top} 0px ${this.data.settings.vanillaLazyLoading.bottom} 0px`}),typeof this.data.settings.autoRefresh=="object"&&this.data.settings.autoRefresh.enabled){const a=this.data.settings.autoRefresh.time?this.data.settings.autoRefresh.time:3e4;var s;const o=this.data.slotUnits[t.id];d.intersect({element:document.getElementById(t.id),rootMargin:"0px 0px 0px 0px",handler:function(){s||(s=setInterval(()=>{document.visibilityState==="visible"&&window.googletag.pubads().refresh([o])},a))},fallback:function(){clearInterval(s)}})}},refreshAds(){document.visibilityState==="visible"&&window.googletag.cmd.push(()=>{window.googletag.pubads().refresh()})}},f={enabled:!0,time:3e4},m=!1,b={top:"-200px",bottom:"-200px"},p={},h={collapseEmptyDivs:!1,setRefreshUnfilledSlots:!1,forceSafeFrame:!1,enableSingleRequest:!0,setRequestNonPersonalizedAds:0},w={mobile:[320,480],tablet:[769,600],desktop:[1024,600]},y={mobile:[[300,250]],tablet:[[300,250],[728,90]],desktop:[[300,250],[728,90]]},v={tracking_pixel:{type:"doubleclick",sizes:{mobile:[[1,1]],tablet:[[1,1]],desktop:[[1,1]]},slotPath:"/50108823/ESM_1_x_1"},leaderboard:{type:"doubleclick",sizes:{mobile:[[300,250]],tablet:[[728,90],[468,60]],desktop:[[728,90],[970,250]]},slotPath:"/50108823/esm_bottom"},billboard:{type:"doubleclick",sizes:{mobile:[[0,0]],tablet:[[728,90]],desktop:[[728,90],[970,250]]},slotPath:"/50108823/esm_bottom"},leaderboard_sticky:{type:"doubleclick",sizes:{mobile:[[300,50],[320,50]],tablet:[[0,0]],desktop:[[0,0]]},slotPath:"/50108823/esm_bottom"},mpu:{type:"doubleclick",sizes:{mobile:[[300,250]],tablet:[[300,250]],desktop:[[300,250]]},slotPath:"/50108823/esm_bottom"},mobile_top:{type:"doubleclick",sizes:{mobile:[[300,250]],tablet:[[300,250]],desktop:[[300,250]]},slotPath:"/50108823/esm_bottom"},sidebar_mpu:{type:"doubleclick",sizes:{mobile:[[300,250]],tablet:[[200,200]],desktop:[[300,250]]},slotPath:"/50108823/esm_bottom"},grid_mpu:{type:"doubleclick",sizes:{mobile:[[300,250]],tablet:[[200,200]],desktop:[[300,250]]},slotPath:"/50108823/esm_bottom"},sidebar:{type:"doubleclick",sizes:{mobile:[[300,250]],tablet:[[300,250]],desktop:[[300,600]]},slotPath:"/50108823/esm_side"},mid_article:{type:"doubleclick",sizes:{mobile:[[300,250]],tablet:[[0,0]],desktop:[[0,0]]},slotPath:"/50108823/esm_bottom"}},S=[],z={autoRefresh:f,lazyLoading:m,vanillaLazyLoading:b,events:p,global:h,screens:w,sizeMappings:y,units:v,targets:S};r.loadAds=function(){const t=document.querySelector('meta[name="dfp-clear-targeting"]');t&&t.getAttribute("content")==="true"&&window.googletag.pubads().clearTargeting(),Array.from(document.querySelectorAll("meta[data-dfp-targeting]")).forEach(e=>{window.googletag.pubads().setTargeting(e.getAttribute("name"),e.getAttribute("content"))}),this.data.slotContainers.filter(e=>e.displayed===!1).forEach(e=>{this.displayAd(e)})};const g={initialized:!1,getTargetsConfigFromDocument(){return document.querySelectorAll("meta[data-dfp-targeting]")},loadTargetsFromDocument(t){const e=this.getTargetsConfigFromDocument();return e!==null&&e.forEach(i=>{t.targets[i.getAttribute("name")]=i.getAttribute("content")}),t},init(t,e={}){var i={...z,...e};i=this.loadTargetsFromDocument(i),r.boot(i),window.googletag.cmd.push(()=>{this.initialized=!0,r.enableServices(),r.asyncLoading(),typeof t=="function"&&t.call()})}},c={init(){this.registerTimeoutAlert(),this.registerDismissAlertHandler()},registerTimeoutAlert(){setTimeout(()=>this.shouldNotify()?this.notify():!1,3e3)},registerDismissAlertHandler(){window.addEventListener("subscription-alert-dismiss",()=>this.storeItem("notified_to_subscribe","1"))},shouldNotify(){return this.getItem("notified_to_subscribe")!=="1"},notify(){window.dispatchEvent(new Event("subscription-alert"))},reset(){window.localStorage.removeItem("notified_to_subscribe"),this.registerTimeoutAlert()},storeItem(t,e){const a={value:e,expiry:new Date().getTime()+864e5};window.localStorage.setItem(t,JSON.stringify(a))},getItem(t){const e=window.localStorage.getItem(t);if(!e)return null;const i=JSON.parse(e);return new Date().getTime()>i.expiry?(window.localStorage.removeItem(t),null):i.value}};window.adManager=g;window.smartBanner=c;window.addEventListener("display-ads",function(){window.location.href.includes("?noads")===!1&&g.init(()=>console.log("adManager script initialized"))});(function(){c.init()})();

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.