/*! * version: {"ads":"3.1.278 ver3","pwa":"3.1.278","core":"3.1.278","bundler":"3.1.278"} - env: prod - bundle date: 2024-07-26T05:17:37.208Z * */(()=>{"use strict";var __webpack_modules__={8:(t,e,i)=>{i.d(e,{A:()=>d});var s=i(335),n=i(284),o=i(456),r=i(101),a=i(862);class d{constructor(t){this.gpt=t,this.randomSuffix=1,this.divIdSuffix="-recovery",this.detectIds=["ats-insert_ads"],this.disconnectTime=3e5,this.delayTime=5e3,this.observers={},this.instances={},this.enableAdRecovery=!1,this.siteId=0,this.init=t=>{this.enableAdRecovery=t.enableAdRecovery,this.siteId=t.siteId},this.createFastlyLog=t=>{fetch(`https://anymind360.com/collect/ad_recovery?siteId=${this.siteId}&adUnitPath=${t}`,{headers:{"Content-Type":"text/plain"}}).then((()=>{s.vF.log("logged ad recovery")}))},this.removeAd=(t,e)=>{for(;t.firstChild;)s.vF.log("remove nodes",t.firstChild),t.removeChild(t.firstChild);this.observers[e].forEach((t=>t.disconnect())),this.executeAd(e)},this.executeAd=t=>{const e=this.instances[t];let i;switch(e.adInstance.adType){case"skyscraper":i=new n.G(this.gpt,e.settings,t,this);break;case"insert_ads":i=new o.W(this.gpt,e.settings,t,this);break;case"overlay":i=new r.h(this.gpt,e.settings,t,this);break;case"parallax":i=new a.k(this.gpt,e.settings,t,this);break;default:i=null}i&&(e.adInstance.dispose(),i.execute(document,!0),this.createFastlyLog(e.settings.adUnitPath))},this.createAdObserver=(t,e)=>{if(!this.enableAdRecovery)return;const i=JSON.parse(JSON.stringify(t));i.divIDs=i.divIDs.map((t=>t.includes(this.divIdSuffix)?t.split(this.divIdSuffix)[0]+this.divIdSuffix+this.randomSuffix++:t+this.divIdSuffix+this.randomSuffix++)),this.instances[e.instanceCount]={settings:i,adInstance:e}},this.shouldReplace=t=>"string"==typeof t&&!this.detectIds.some((e=>t.includes(e))),this.mutationCallback=(t,e)=>(i,s)=>{for(const n of i)if("childList"===n.type){const i=Array.from(n.addedNodes);if(i.length>0)for(const n of i){const i=n.id;if(this.shouldReplace(i))return this.removeAd(t,e),void s.disconnect()}}},this.mutationCallback1=(t,e)=>(i,s)=>{for(const n of i)if("childList"===n.type){const i=n.removedNodes,o=Array.from(i).some((e=>t===e)),r=Array.from(n.addedNodes);o&&(r.forEach((t=>t.remove())),this.executeAd(e),s.disconnect())}},this.dispose=()=>{Object.keys(this.observers).forEach((t=>{this.observers[t].forEach((t=>t.disconnect()))}))},this.observe=(t,e)=>{this.enableAdRecovery&&setTimeout((()=>{const i={childList:!0,subtree:!0},n=new MutationObserver(this.mutationCallback(t,e));let o=null;t.parentNode&&(o=new MutationObserver(this.mutationCallback1(t,e))),n.observe(t,i),this.observers[e]=[],this.observers[e].push(n),o&&t.parentNode&&(o.observe(t.parentNode,i),this.observers[e].push(o)),s.vF.log("start observe node: ",t),setTimeout((()=>{n.disconnect(),o&&o.disconnect(),s.vF.log("disconnect from observation of node: ",t)}),this.disconnectTime)}),this.delayTime)}}}},139:(t,e,i)=>{i.d(e,{jC:()=>a,rG:()=>d});var s=i(939),n=i(335);const o=window.sas=window.sas||{};o.cmd=o.cmd||[];const r=t=>(...e)=>{o.cmd.push((()=>t(...e)))};class a{constructor(){this.isCalled=!1,this.insertSasScript=t=>{(0,s.nL)(!0,`//ced.sascdn.com/tag/${t}/smart.js`)},this.setUpAndCall=(t,e,i)=>{this.isCalled||(this.isCalled=!0,o.setup({networkid:t,domain:"//www18.smartadserver.com",async:!0}),o.call("onecall",{siteId:e,pageId:i.pageId,formats:i.formats}))},this.render=t=>{n.vF.log("apm: render format id:",t),o.render(t)},this.setUpAndCall=r(this.setUpAndCall),this.render=r(this.render)}}a.sasDivIdPrefix="sas_";const d=new a},114:(t,e,i)=>{i.d(e,{m:()=>c});var s=i(335),n=i(939);const o=["interstitial","insert_ads","overlay","skyscraper","parallax","replace_ads","slider"],r=["interstitial","insert_ads","overlay","skyscraper","parallax","slider"],a=["overlay"],d=["insert_ads","skyscraper","parallax","replace_ads","slider"],l=["interstitial","overlay"];class c{constructor(t){this.originalConfig=t,this.siteSetting=this.originalConfig.siteSetting,this.configsForCurrentPage=[],this.apmConfig={pageId:null,formats:[]},this.gptOutOfPageSettings=[],this.separateRequestDivIds=[],this.prebidOnlySlotsDivIds=[],this.prebidAnalyticsConfig={adUnitIdPathMapping:{},amPrebidBidderMap:this.originalConfig.amPrebidBidderMap},this.gptSlotConfigsForSRA=[],this.gptSlotConfigs=[],this.referrerHistory=[],this.inIframe=()=>window!==window.parent,this.filterConfig=()=>{if(s.vF.log("device: ",this.userDeviceType),s.vF.log("url path: ",this.currentUrlPath),this.configsForCurrentPage.splice(0),this.apmConfig.pageId=null,this.apmConfig.formats.splice(0),this.gptOutOfPageSettings.splice(0),this.separateRequestDivIds.splice(0),this.prebidOnlySlotsDivIds.splice(0),this.prebidAnalyticsConfig.adUnitIdPathMapping={},this.originalConfig.configs.some((t=>t.enableReferrerTargeting&&t.enableKeepingReferrer&&t.domainList))){const t=(0,n.yz)(this.siteSetting.hostNames,location.hostname),e=(0,n.kU)(t,this.referrerHostName);this.referrerHistory.splice(0),this.referrerHistory.push(...(0,n.P7)(t,"ats_ads_referrer_history",this.referrerHostName,e))}const t=this.originalConfig.configs.filter((t=>!(a.some((e=>t.type===e))&&this.inIframe())&&(0,n.G)(t,this.currentUrlPath)&&(0,n.FC)(t.device,this.userDeviceType)&&(0,n.oj)(t,this.referrerHostName)&&(0,n.k3)(t,this.referrerHistory))),e=[];for(const i of t){if(o.some((t=>i.type===t))){const{adUnitPath:t,divIDs:e}=i.settings;e.forEach((e=>{this.gptSlotConfigs.push({adUnitPath:t,divId:e})}))}if(this.siteSetting.enableGamSingleRequest||this.siteSetting.enablePrebid||!(0,n.ze)(this.siteSetting.keywordsBlock)){let t=this.siteSetting.enableSeparateRequest?l:r;const n="functionTrigger"in i.settings&&i.settings.useFunctionTrigger;if("overlay"==i.type&&n&&(t=t.filter((t=>"overlay"!==t)),d.push("overlay")),t.some((t=>i.type===t))&&(i.active||s.vF.isDev)){const{adUnitPath:t,divIDs:e,setCollapseEmptyDiv:s,sizeMappingGroup:n,setTargetingConfigs:o,enableSetForceSafeFrameForSlot:r}=i.settings;e.forEach((e=>{this.gptSlotConfigsForSRA.push({adUnitPath:t,sizes:[[300,250]],divId:e,setCollapseEmptyDiv:s,sizeMappingGroup:n,setTargetingConfigs:o,enableSetForceSafeFrameForSlot:r})}))}if(this.siteSetting.enableSeparateRequest&&d.some((t=>i.type===t))&&(i.active||s.vF.isDev)){const{divIDs:t}=i.settings;this.separateRequestDivIds.push(...t)}if("prebid_only"===i.type&&(i.active||s.vF.isDev)){const{divID:t}=i.settings;e.push(t),this.prebidAnalyticsConfig.adUnitIdPathMapping[t]={id:i.settings.adUnitId,path:i.settings.adUnitPath}}"adx_inst"===i.type&&(i.active||s.vF.isDev)&&this.gptOutOfPageSettings.push(i.settings),"adx_overlay"===i.type&&(i.active||s.vF.isDev)&&this.gptOutOfPageSettings.push(i.settings)}if("apm"===i.type&&(this.apmConfig.formats.push({id:i.settings.formatId}),this.apmConfig.pageId=i.settings.pageId),this.configsForCurrentPage.push(i),i.breakPoint&&(i.active||s.vF.isDev)){s.vF.log("this is break point, config: ",i);break}}this.prebidOnlySlotsDivIds=e.filter((t=>!this.gptSlotConfigs.some((e=>e.divId===t))))}}get currentUrl(){const t=document.location.pathname+document.location.search+document.location.hash;return decodeURIComponent(t)}get currentUrlPath(){return decodeURIComponent(window.location.pathname)}get referrerHostName(){return""!==document.referrer?new URL(document.referrer).hostname:""}get userDeviceType(){return(0,n.gE)()}get filteredPrebidOnlySettings(){return this.configsForCurrentPage.filter((t=>"prebid_only"===t.type))}get filteredTamSettings(){return this.configsForCurrentPage.filter((t=>"tam"===t.type))}}},348:(t,e,i)=>{i.d(e,{Cu:()=>s.Cu,KB:()=>s.KB,sp:()=>s.sp});var s=i(78)},472:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{O:()=>functionTargeting});var _Logger__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(335);const throttle=(t,e)=>{let i=!1;return function(s,n){i||(t(s,n),i=!0,setTimeout((function(){i=!1}),e))}};class FunctionTargeting{constructor(){this.MUTATION_TIMEOUT=1e4,this.mutationObserverList={},this.mutationConfig={childList:!0,subtree:!0},this.callback=(key,functionTrigger,resolve)=>(_mutationsList,observer)=>{let result;try{result=eval(functionTrigger)}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.error("[functionTrigger]",key,t)}result&&(_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log(key+": find target"),resolve(!0),observer.disconnect())},this.waitForConditionMet=async(parentElm,instanceCount,functionTrigger,adUnitPath)=>new Promise((resolve=>{const key=instanceCount+adUnitPath;let result;try{result=eval(functionTrigger)}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.error("[functionTrigger]",key,t)}if(result)_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log(key+": find target"),resolve(!0);else{const t=new MutationObserver(throttle(this.callback(key,functionTrigger,resolve),50));this.mutationObserverList[key]=t,t.observe(parentElm,this.mutationConfig),setTimeout((()=>t.disconnect()),this.MUTATION_TIMEOUT)}})),this.dispose=()=>{Object.keys(this.mutationObserverList).forEach((t=>{this.mutationObserverList[t].disconnect()}))}}}const functionTargeting=new FunctionTargeting},554:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Ay:()=>Gpt,_7:()=>withGptAsync});var _Logger__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(335),_core_utils_util__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(939);const CHECK_INTERVAL_TIME=1e3,THROTTLE_TIME=200,PPID_COOKIE_NAME="am_FPID",PPID_JS_COOKIE_NAME="am_FPID_JS",GPT_URL="https://securepubads.g.doubleclick.net/tag/js/gpt.js";let googletag=window.googletag=window.googletag||{};function throttle(t,e){let i=!1;return function(){i||(t(),i=!0,setTimeout((function(){i=!1}),e))}}googletag.cmd=googletag.cmd||[];class GptLogger{constructor(t=_Logger__WEBPACK_IMPORTED_MODULE_0__.vF){this.logger=t,this.log=(...t)=>{this.logger.log("gpt:",...t)},this.error=(...t)=>{this.logger.error("gpt:",...t)}}}const gptLogger=new GptLogger,withGptAsync=t=>(...e)=>{googletag.cmd.push((()=>t(...e)))};class Gpt{get ppid(){return this._ppid}constructor(tagServices,prebid,aps){this.tagServices=tagServices,this.prebid=prebid,this.aps=aps,this.isSRAEnabled=!1,this.atsSlots=[],this.definedAtsSlots={},this.atsSlotsWithVisibility=[],this.callbacksOnSlotRenderEnded=[],this.refreshedSlots=[],this.outOfPageSlots=[],this.enableSeparateRequest=!1,this.destroyAtsSlotsOnly=!1,this.enableAdRecovery=!1,this.separateRequestDivIds=[],this.lazyLoadCallbacks={},this.prebidOnlySlotsDivIds=[],this.addGoogletagEventListner=()=>{withGptAsync((()=>{googletag.pubads().addEventListener("slotRenderEnded",(t=>{for(const e of this.callbacksOnSlotRenderEnded)e(t)})),googletag.pubads().addEventListener("slotVisibilityChanged",(t=>{for(const e of this.atsSlotsWithVisibility)t.slot===e.slot&&(e.visibilityPercentage=t.inViewPercentage)})),googletag.pubads().addEventListener("impressionViewable",(t=>{for(const e of this.atsSlotsWithVisibility)t.slot===e.slot&&(e.isViewable=!0)}))}))()},this.insertGptTag=()=>{(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_1__.nL)(!0,GPT_URL)},this.setForceSafeFrameForSlot=(t,e)=>{t.setForceSafeFrame(e)},this.setTargetingForEachSlot=(slot,setTargetingConfigs)=>{setTargetingConfigs.forEach((setTargetingConfig=>{if(setTargetingConfig.isActive){const keyConfig=setTargetingConfig.key;let valueConfig=setTargetingConfig.value;try{valueConfig=eval(valueConfig)+""}catch(t){gptLogger.error("setTargeting failed",t)}slot.setTargeting(keyConfig,valueConfig)}}))},this.setTargeting=(t,e)=>{googletag.pubads().setTargeting(t,e)},this.setPPID=async(url,customScript)=>{if(!url&&!customScript)return;const label="[PPID]",_getPPID=()=>{const t=(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_1__.Ri)();return t[PPID_COOKIE_NAME]||t[PPID_JS_COOKIE_NAME]},_setPPID=t=>{this._ppid=t,(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_1__.TV)(PPID_JS_COOKIE_NAME,t,2555),googletag.cmd.push((()=>{googletag.pubads().setPublisherProvidedId(t),gptLogger.log(label,`set ${t}`)}))},ppid=_getPPID();if(ppid)return gptLogger.log(label,`has ${ppid}`),void _setPPID(ppid);if(gptLogger.log(label,"no PPID"),url)await fetch(url,{mode:"cors",credentials:"include"}).then((t=>{if(!t.ok)return void gptLogger.error(label,`The request to ${url} failed`);gptLogger.log(label,`The request to ${url} was successful`);const e=_getPPID();e?_setPPID(e):gptLogger.error(label,"no ppid in cookie")}),(t=>{gptLogger.error(label,`The request to ${url} failed by ${t}`)}));else if(customScript)try{await eval(customScript)}catch(t){gptLogger.error(label,"Fail custom script",t)}},this.refreshAds=(t,e,i=!0)=>{e||(t=t.filter((t=>!this.refreshedSlots.some((e=>t===e))))),0({slotId:t.getSlotElementId(),adUnitPath:t.getAdUnitPath()})))),googletag.pubads().refresh(t,{changeCorrelator:i}),t.forEach((t=>!this.refreshedSlots.some((e=>t===e))&&this.refreshedSlots.push(t)))):gptLogger.log("no refresh")},this.trackConfirmedClick=()=>{const{confirmedClickRatio:t,siteId:e,prebidSettings:{rendererJsURL:i}}=this.configManager.siteSetting;if(t<=Math.random())return;const s=new URL(i).host;let n,o=!1;const r=()=>{if(o)return;const i=window.frames,r="[Confirmed Click]",a="#confirmedClickVisible";let d=[];for(let t=0;td.push(t))),gptLogger.log(r,0{const n=i.replace(/google_ads_iframe_(.*)_\d+/,"$1"),o={siteId:e,frameName:i};o.ratio=t;const a=this.tagServices.getAdUnitId(n);a&&(o.ad_unit_id=a),o.ad_unit_path=n;const d=new XMLHttpRequest;d.open("GET",`//${s}/json/confirmed_click_log.json?`+Object.keys(o).map((t=>t+"="+encodeURIComponent(o[t]))).join("&")),d.onload=()=>gptLogger.log(r,"Logged",i),d.send()})),o=!0,clearInterval(n))},a=()=>{n=window.setInterval(r,1e4)};"loading"!==document.readyState?a():document.addEventListener("DOMContentLoaded",a),window.addEventListener("beforeunload",r)},this.checkIfEnableRefreshAd=(t,e,i,s)=>new Promise((n=>{const o=setInterval((()=>{(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_1__.ze)(i)||i[t].shouldStopRefresh?(clearInterval(o),n()):(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_1__.pr)()&&this.isSlotViewable(e,s)&&(gptLogger.log(`auto refresh for ${t}`),clearInterval(o),n())}),CHECK_INTERVAL_TIME)})),this.isSlotViewable=(t,e)=>{const i=this.atsSlotsWithVisibility.find((e=>e.slot===t));return void 0===i||!!i.isViewable&&(i.visibilityPercentage>=e&&(i.isViewable=!1,!0))},this.intervalRefreshAds=(t,e,i,s,n,o=0,r=[])=>{const a=n[s];a.isGPTRefreshCalled=!0;let d=!0;const l=a.adSenseReplacementClient&&a.adSenseReplacementSlot;let c=i;const h=async()=>{if(!a.shouldStopRefresh){if(await new Promise((t=>setTimeout(t,1e3*e))),void 0===t[0]||!n)return;a.shouldStopRefresh||(d&&(d=!1,await this.checkIfEnableRefreshAd(s,t[0],n,o)),l||(d=!0),"number"!=typeof c||0t.getSlotElementId()))}`))}};h()},this.replaceAdSense=({slot:t,adSenseReplacementClient:e,adSenseReplacementSlot:i})=>{if(!e||!i)return;gptLogger.log("Replace adsense",t.id,e,i),t.textContent="";const s=document.createElement("script");s.async=!0,s.src=`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${e}`,s.setAttribute("crossorigin","anonymous"),t.appendChild(s);const n=document.createElement("ins");n.classList.add("adsbygoogle"),n.style.display="block",n.setAttribute("data-ad-client",e),n.setAttribute("data-ad-slot",i),n.setAttribute("data-ad-format","auto"),n.setAttribute("data-full-width-responsive","true"),t.appendChild(n),(window.adsbygoogle=window.adsbygoogle||[]).push({})},this.executeBasicTargetings=()=>{const t=window.location.search.substring(1),e=window.document.referrer?document.referrer.split("/")[2]:"null",i=window.location.pathname;if(googletag.pubads().setTargeting("url",[i]),googletag.pubads().setTargeting("ref",[e]),t){const e=t.split("&");for(let t=0;t{googletag.pubads().isInitialLoadDisabled()||googletag.pubads().disableInitialLoad()},this.enableSingleRequest=()=>{this.isSRAEnabled=!0,googletag.pubads().enableSingleRequest()},this.collapseEmptyDivs=()=>{googletag.pubads().collapseEmptyDivs()},this.setKeyValuesToSlots=(t,e,i)=>{t.forEach((t=>{t.setTargeting(e,i)}))},this.enableGamLazyload=t=>{googletag.pubads().enableLazyLoad({fetchMarginPercent:t.gamLazyloadFetchMarginPercent,renderMarginPercent:t.gamLazyloadRenderMarginPercent,mobileScaling:t.gamLazyloadMobileScaling})},this.enableServices=()=>{googletag.pubadsReady?gptLogger.log("already gpt service is enabled"):googletag.enableServices()},this.forceHB=async t=>{if(t.length<=0)return;const e=[],i=[],s=[];for(const n of t){const t=n.getAdUnitPath(),o=n.getSlotElementId();e.push(o);for(const e of this.configManager.configsForCurrentPage)if("prebid_only"===e.type&&e.settings.adUnitPath===t){const t=JSON.parse(JSON.stringify(e));t.settings.divID=o,i.push(t)}else if("tam"===e.type){const i=JSON.parse(JSON.stringify(e));i.settings.tamAdUnits=i.settings.tamAdUnits.filter((({slot:e})=>(e.slotID=o,e.adUnitPath===t))),0t.code)))&&n.forEach((t=>this.prebid.setTargetingForEachSlot(t.code)))}if(0{!Array.isArray(t)||t.length<0?gptLogger.error("[infinite hb] not correct input"):(await this.callHb(t),googletag.pubads().isInitialLoadDisabled()&&this.refreshAds(t))},this.callHb=async(t,e=!1,i=[])=>{if(0!==t.length&&(this.prebid.isCalled||this.aps.isCalled)){const s=[],n=[],o=[];if(t.forEach((t=>{e&&(t.clearTargeting(),this.setTargetingForEachSlot(t,i));const r=t.getSlotElementId(),a=t.getAdUnitPath(),d=this.prebid.adUnitsDict[a]?this.prebid.adUnitsDict[a].prebidAdUnits:null,l=this.prebid.adUnitsDict[a]?this.prebid.adUnitsDict[a].code:null;d&&l&&(this.prebid.removeAdUnit(l),d.forEach((t=>{t.code=r,s.push(t)})),n.push(r));const c=this.aps.slotsDict[a];void 0!==c&&(c.slotID=r,o.push(c))})),s.length>0){await this.prebid.sendBids(s,n)&&n.forEach((t=>this.prebid.setTargetingForEachSlot(t)))}if(o.length>0){await this.aps.fetchApsBids(o)&&this.aps.setTargeting()}}},this.callOutOfPageSlot=async({adUnitPath:t,position:e,setTargetingConfigs:i},s)=>{if(await this.setPPIDPromise,this.isSRAEnabled){const t=e=>{e?.target?.removeEventListener(e.type,t),this.outOfPageSlots.forEach((({slot:t,config:e})=>{googletag.display(t),0{if(i.slot===t){if(gptLogger.log(`render slot \npath: ${t.getAdUnitPath()}`),!i.isEmpty)return;googletag.destroySlots([i.slot]);let s=!1;e.autoAdUnitPaths.reduce(((t,i,n,o)=>t.then((async()=>{if(!s){const t={...e,adUnitPath:i},r=await this.callOutOfPageSlotforMulticall(t);r&&(r.isEmpty&&n{t.slot===n&&(gptLogger.log(`render slot \npath: ${n.getAdUnitPath()}`),s(t))})))}},this.defineATSSlotsForSRA=async(t,e)=>{if(t.forEach((t=>this.defineSlot(t.adUnitPath,[[300,250]],t.divId,t.sizeMappingGroup,t.setCollapseEmptyDiv,t.enableSetForceSafeFrameForSlot,t.setTargetingConfigs))),await this.setPPIDPromise,e.forEach((t=>{const{adUnitPath:e,position:i,setTargetingConfigs:s}=t;gptLogger.log(`call defineOutOfPageSlot adUnitPath: ${e}, position: ${i}`);const n=googletag.defineOutOfPageSlot(e,googletag.enums.OutOfPageFormat[i]);n&&(n.addService(googletag.pubads()),this.setTargetingForEachSlot(n,s),this.outOfPageSlots.push({slot:n,config:t}),this.atsSlots.push(n))})),await this.tagServices.shouldBlockRefresh)return void gptLogger.error("not refresh ads because of keyword block");await this.prebid.onFirstPrebidResponseEnded&&this.prebid.setTargeting();if(await this.aps.onFirstApsResponseEnded&&this.aps.setTargeting(),googletag.pubads().isInitialLoadDisabled()){const t=googletag.pubads().getSlots(),e=1===this.gamAdsRefreshMode?t.filter((t=>!this.separateRequestDivIds.some((e=>e===t.getSlotElementId())))):this.atsSlots.filter((t=>!this.separateRequestDivIds.some((e=>e===t.getSlotElementId())))).concat(t.filter((t=>this.prebidOnlySlotsDivIds.some((e=>e===t.getSlotElementId())))));this.refreshAds(e)}},this.defineSlot=(t,e,i,s,n,o,r)=>{gptLogger.log(`call defineSlot with divId: ${i}, adUnitPath: ${t}`);const a=googletag.defineSlot(t,e,i);if(!a)throw new Error(`Fail to googletag.defineSlot(${t}, ${e}, ${i})`);let d=[];if(s.forEach((t=>{const e=googletag.sizeMapping().addSize(t.deviceSizes,t.sizes).build();e&&(d=d.concat(e))})),a.defineSizeMapping(d),this.setForceSafeFrameForSlot(a,o),n)switch(n){case"none":a.setCollapseEmptyDiv(!1);break;case"after_fetch":a.setCollapseEmptyDiv(!0);break;case"before_fetch":a.setCollapseEmptyDiv(!0,!0)}return a.addService(googletag.pubads()),r&&this.setTargetingForEachSlot(a,r),this.definedAtsSlots[i]=a,this.atsSlots.push(a),this.atsSlotsWithVisibility.push({slot:a,visibilityPercentage:0,isViewable:!1}),a},this.fetchAd=async({adUnitPath:t,sizes:e,divId:i,sizeMappingGroup:s,setCollapseEmptyDiv:n,setTargetingConfigs:o,onAfterGptRendered:r,onAfterGptFetched:a,enableLazyLoad:d,lazyLoadMode:l,lazyLoadConfig:c,enableSetForceSafeFrameForSlot:h,infinite:p,slotWrapperDiv:_,instanceCount:g})=>{let u;if(u=!this.isSRAEnabled||p||this.enableSeparateRequest&&this.separateRequestDivIds.some((t=>t===i))?this.defineSlot(t,e,i,s,n,h,o):this.definedAtsSlots[i],d&&await this.waitDisplaySlot(i,c,l),await this.setPPIDPromise,gptLogger.log("call display for: ",i),googletag.display(i),r&&this.callbacksOnSlotRenderEnded.push((e=>{e.slot===u&&(gptLogger.log(`render slot \npath: ${t} \nslotId: ${i}`),r(e))})),p)await this.infiniteHb([u]);else if(googletag.pubads().isInitialLoadDisabled()&&this.isSRAEnabled&&this.enableSeparateRequest){if(await this.tagServices.shouldBlockRefresh)return void gptLogger.error("not refresh ads because of keyword block");await this.prebid.onFirstPrebidResponseEnded&&this.prebid.setTargetingForEachSlot(i);await this.aps.onFirstApsResponseEnded&&this.aps.setTargeting(),this.refreshAds([u],!1,!1)}if(this.enableAdRecovery&&this.tagServices.adObserver.observe(_,g),a)try{a(u)}catch(t){gptLogger.error(t)}},this.lazyLoadCallback=(t,e,i,s,n,o)=>()=>{o||window.requestAnimationFrame((()=>{const r=e.getBoundingClientRect(),a=r.top-window.innerHeight,d=r.bottom,l=this.calcDistance(s,n,e);this.shouldCallDisplay(a,d,l)&&(t(),window.removeEventListener("scroll",this.lazyLoadCallbacks[i])),o=!1})),o=!0},this.waitDisplaySlot=async(t,e,i)=>await new Promise((s=>{const n=document.querySelector(`#${t}`);gptLogger.log(`waiting display ad slots:${t}`);const o=throttle(this.lazyLoadCallback((()=>{s()}),n,t,i,e,!1),THROTTLE_TIME);this.lazyLoadCallbacks[t]=o,window.addEventListener("scroll",o)})),this.shouldCallDisplay=(t,e,i)=>Math.abs(t)2===t?window.innerHeight*e:i.offsetTop*e/100,this.getVastUrl=t=>{const e=t.sz?t.sz.map((t=>t.join("x"))).join("|"):"320x180",i=t.ciu_szs?t.ciu_szs.map((t=>t.join("x"))).join(","):"",s={...t,sz:e,ciu_szs:i};return"https://securepubads.g.doubleclick.net/gampad/ads?"+new URLSearchParams(s).toString()},this.reset=t=>{try{t?0{googletag=window.googletag=window.googletag||{},googletag.cmd=googletag.cmd||[],this.addGoogletagEventListner()}),1e4);const e=t.siteSetting.publisherProvidedSignal;e&&this.setTargeting(e.key,e.value),this.setPPIDPromise=this.setPPID(t.siteSetting.ppidServerUrl,t.siteSetting.ppidCustomJs)}async callOutOfPageSlotWrapper(t){const e=[t.adUnitPath,...t.autoAdUnitPaths];if(1==e.length)this.callOutOfPageSlot(t);else{const i=e.values();let s=i.next();for(;s.value;){const e=await new Promise((e=>{const i={...t,adUnitPath:s.value};this.callOutOfPageSlot(i,(t=>{e(t)}))}));if(s=i.next(),!e.isEmpty||s.done)break;googletag.destroySlots([e.slot])}}}async callOutOfPageSlotforMulticall({adUnitPath:t,position:e,setTargetingConfigs:i}){gptLogger.log(`call defineOutOfPageSlot adUnitPath: ${t}, position: ${e}`);const s=googletag.defineOutOfPageSlot(t,googletag.enums.OutOfPageFormat[e]);if(s)return this.atsSlots.push(s),s.addService(googletag.pubads()),this.setTargetingForEachSlot(s,i),googletag.display(s),googletag.pubads().isInitialLoadDisabled()&&this.refreshAds([s]),new Promise((t=>{this.callbacksOnSlotRenderEnded.push((e=>{e.slot===s&&(gptLogger.log(`render slot \npath: ${s.getAdUnitPath()}`),t(e))}))}))}get extractAtsSlots(){const t=[];return googletag.pubads().getSlots().forEach((e=>{const i=e.getSlotElementId(),s=e.getAdUnitPath();(this.configManager.gptSlotConfigs.some((t=>t.divId===i))||this.configManager.gptOutOfPageSettings.some((t=>t.adUnitPath===s)))&&t.push(e)})),t}}},335:(t,e,i)=>{i.d(e,{vF:()=>a});var s=i(581),n=i(348);const o="ats_pbjs_debug";class r extends s.V{constructor(t,e){super(t,e),this.enableLog=n.sp,this.isDev=n.Cu,this.getSlotInfo=(t,e)=>{this.log(t,`adUnitPath: ${e.getAdUnitPath()}\n slotElementId: ${e.getSlotElementId()}`)},this.setPrebidLog=(t=!this.enablePrebidLog)=>{t?window.sessionStorage?.setItem(o,"true"):window.sessionStorage?.removeItem(o),location.reload()},this.enablePrebidLog="true"===window.sessionStorage?.getItem(o)}}const a=new r("Ads",n.sp)},903:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{h:()=>TagServices});var _libs_SiteSettings__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(332),_libs_ads_InsertAds__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(456),_libs_ads_Overlay__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(101),_libs_ads_Interstitial__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(463),_libs_ads_Skyscraper__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(284),_libs_ads_AdxInterstitial__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(840),_libs_ads_AdxOverlay__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(404),_Logger__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(335),_libs_Prebid__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(326),_libs_Aps__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(34),_Gpt__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(554),_TargetObserver__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(356),_AdObserver__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(8),_ConfigManager__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(114),_Debug__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(348),_core_utils_util__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(939),_libs_WaitUntilJSLoaded__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(197),_libs_ads_Parallax__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(862),_libs_ads_ReplaceAds__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(67),_libs_ads_Slider__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(476),_FunctionTargeting__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(472),_libs_ads_InsertVideo__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(389),_VideoManager__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(561),_config_thirdPartyVideoPlayer__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(641);const queFunc=t=>{try{t()}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.error(t)}},callFnAfterDomContentLoaded=t=>{if("loading"!==document.readyState)t();else{const e=()=>{document.removeEventListener("DOMContentLoaded",e),t()};document.addEventListener("DOMContentLoaded",e)}};class TagServices{constructor(originalConfigs){this.originalConfigs=originalConfigs,this.INTERSTITIAL_BLOCK_AD_INSTANCE_COUNT=1e4,this.atsLogger=_Logger__WEBPACK_IMPORTED_MODULE_7__.vF,this.setDev=_Debug__WEBPACK_IMPORTED_MODULE_14__.KB,this.run=!1,this.que={push:queFunc},this.infinite={},this.shouldCallKeywordBlock=!1,this.instances=[],this.shouldBlockRefresh=!1,this.disposed=!1,this.loaded=!0,this.start=async()=>{if(this.disposed=!0,this.siteSettings.browsersBlock())return void _Logger__WEBPACK_IMPORTED_MODULE_7__.vF.log("browser block");if(this.siteSettingsConfig.enableUrlBlock&&(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_15__.UW)(this.siteSettingsConfig.blockedUrls,this.configManager.currentUrl))return void _Logger__WEBPACK_IMPORTED_MODULE_7__.vF.log("url Block");this.waitUntilJSLoaded=(0,_libs_WaitUntilJSLoaded__WEBPACK_IMPORTED_MODULE_16__.A)(this.siteSettingsConfig),this.configManager.filterConfig(),_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.log("config: ",this.configManager);const{enablePrebid,prebidSettings}=this.siteSettingsConfig;_VideoManager__WEBPACK_IMPORTED_MODULE_22__.f.registerVideoUrls(this.siteSettingsConfig.videoJsUrl,this.siteSettingsConfig.videoCssUrl),this.adObserver.init(this.siteSettingsConfig),this.gpt.init(this.configManager),enablePrebid&&(this.prebid.init(this.configManager.filteredPrebidOnlySettings,this.waitUntilJSLoaded),prebidSettings.prebidTamPubId&&this.aps.init(this.configManager.filteredTamSettings,this.waitUntilJSLoaded));const shouldCallGPTDisableInitialLoad=this.prebid.isCalled&&!this.prebid.noAdUnits||this.aps.isCalled&&!this.aps.noSlots||this.shouldCallKeywordBlock||this.siteSettingsConfig.enableGamDisableInitialLoad;this.siteSettings.callSiteLevelSetting(shouldCallGPTDisableInitialLoad,this.configManager.apmConfig,this.configManager.gptSlotConfigsForSRA,this.configManager.gptOutOfPageSettings,this.waitUntilJSLoaded),this.gpt.trackConfirmedClick();const shouldBlockCallAtsAds=await this.checkKeywordBlock();if(shouldBlockCallAtsAds)return;await this.callAdsFunctions(this.configManager.configsForCurrentPage);const customScriptAfterATSRun=this.siteSettingsConfig.customScript;if(customScriptAfterATSRun)try{eval(customScriptAfterATSRun)}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.error("Site settings custom script failed",t)}},this.getRandomInteger=()=>Math.floor(100*Math.random())+1,this.choosePlayer=(t,e,i)=>{const s=this.getRandomInteger();return s<=t?1:s<=t+e?2:s<=t+e+i?3:4},this.waitAdsBlockInterstitial=async(t,e=!1)=>{const i=t.find((t=>!e&&"interstitial"===t.type&&(t.active||_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.isDev)&&t.settings.blockWithoutAds));return i&&await new Promise((t=>{this.executeInterstitial(i.settings,this.INTERSTITIAL_BLOCK_AD_INSTANCE_COUNT,t)})),t.filter((t=>t!==i))},this.callAdsFunctions=async(newConfigs,element=document,infinite=!1,keys=[])=>{const configs=await this.waitAdsBlockInterstitial(newConfigs,infinite);configs.forEach(((config,index)=>{if(infinite||"interstitial"!==config.type||!config.active&&!_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.isDev||this.executeInterstitial(config.settings,index),!infinite&&"overlay"===config.type&&(config.active||_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.isDev)){const t=new _libs_ads_Overlay__WEBPACK_IMPORTED_MODULE_2__.h(this.gpt,config.settings,index,this.adObserver);this.instances.push(t),callFnAfterDomContentLoaded((()=>{t.execute()}))}if("skyscraper"===config.type&&(config.active||_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.isDev)){const{selector:t,targetType:e,adUnitPath:i}=config.settings;if(!this.infinite[i]){const t=new _libs_ads_Skyscraper__WEBPACK_IMPORTED_MODULE_4__.G(this.gpt,config.settings,index,this.adObserver);this.instances.push(t),this.infinite[i]=t}infinite&&(0==keys.length||keys.includes(i))?this.infinite[i].execute(element,infinite):infinite||_TargetObserver__WEBPACK_IMPORTED_MODULE_11__.c.waitForElement(t,e,(t=>{this.infinite[i].execute(t)}))}if("insert_ads"===config.type&&(config.active||_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.isDev)){const{selector:t,targetType:e,adUnitPath:i}=config.settings;if(!this.infinite[i]){const t=new _libs_ads_InsertAds__WEBPACK_IMPORTED_MODULE_1__.W(this.gpt,config.settings,index,this.adObserver);this.instances.push(t),this.infinite[i]=t}infinite&&(0==keys.length||keys.includes(i))?this.infinite[i].execute(element,infinite):infinite||_TargetObserver__WEBPACK_IMPORTED_MODULE_11__.c.waitForElement(t,e,(t=>{this.infinite[i].execute(t)}))}if(!infinite&&"insert_video"===config.type&&(config.active||_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.isDev)){const{thirdPartyVideoPlayerSettings:t,youtubeChannelFeedUrl:e,videoSource:i,divIDs:s,amVideoFeed:n,rssFeedJsonUrl:o,selector:r,insertPosition:a,targetType:d}=config.settings,l=t[1]?.frequency||0,c=t[2]?.frequency||0,h=t[3]?.frequency||0,p=this.choosePlayer(l,c,h);if(1===p){if(config.settings.adUnitPath){1===i&&e?_VideoManager__WEBPACK_IMPORTED_MODULE_22__.f.fetchYTVideoFeed(e):2===i&&n?_VideoManager__WEBPACK_IMPORTED_MODULE_22__.f.registerAMVideoFeed(n,s[0]):3!==i&&4!==i||!o||_VideoManager__WEBPACK_IMPORTED_MODULE_22__.f.fetchRssVideoFeed(o);const t=new _libs_ads_InsertVideo__WEBPACK_IMPORTED_MODULE_21__.b(this.gpt,config.settings,this.prebid);this.instances.push(t),this.infinite[config.settings.adUnitPath]=t,_TargetObserver__WEBPACK_IMPORTED_MODULE_11__.c.waitForElement(r,d,(e=>{t.execute(e,!1)}))}}else _TargetObserver__WEBPACK_IMPORTED_MODULE_11__.c.waitForElement(r,d,(()=>{const e=new _config_thirdPartyVideoPlayer__WEBPACK_IMPORTED_MODULE_23__.k(p,d,r,a,t[p].width||360,t[p].slot||"");e.insertThirdPartyVideoPlayer(),this.instances.push(e);const i=t[p].custom_css;i&&(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_15__.TD)(i)}))}if("replace_ads"===config.type&&(config.active||_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.isDev)){const{selector:t,targetType:e,adUnitPath:i}=config.settings;if(infinite&&(0==keys.length||keys.includes(i))){if(!this.infinite[i]){const t=new _libs_ads_ReplaceAds__WEBPACK_IMPORTED_MODULE_18__.N(this.gpt,config.settings,index,this.adObserver);this.instances.push(t),this.infinite[i]=t}this.infinite[i].lazyExecute(config.settings.replaceTime,element,infinite)}else if(!infinite){const s=new _libs_ads_ReplaceAds__WEBPACK_IMPORTED_MODULE_18__.N(this.gpt,config.settings,index,this.adObserver);this.instances.push(s),this.infinite[i]=s,_TargetObserver__WEBPACK_IMPORTED_MODULE_11__.c.waitForElement(t,e,(t=>{s.lazyExecute(config.settings.replaceTime,t,!0)}))}}if("parallax"===config.type&&(config.active||_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.isDev)){const{selector:t,targetType:e,adUnitPath:i}=config.settings;if(!this.infinite[i]){const t=new _libs_ads_Parallax__WEBPACK_IMPORTED_MODULE_17__.k(this.gpt,config.settings,index,this.adObserver);this.instances.push(t),this.infinite[i]=t}infinite&&(0==keys.length||keys.includes(i))?this.infinite[i].execute(element,infinite):infinite||_TargetObserver__WEBPACK_IMPORTED_MODULE_11__.c.waitForElement(t,e,(t=>{this.infinite[i].execute(t)}))}if(!infinite&&"slider"===config.type&&(config.active||_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.isDev)){const t=new _libs_ads_Slider__WEBPACK_IMPORTED_MODULE_19__.A(this.gpt,config.settings,index,this.adObserver);this.instances.push(t);const{selector:e,targetType:i}=config.settings;_TargetObserver__WEBPACK_IMPORTED_MODULE_11__.c.waitForElement(e,i,(e=>{t.execute(e)}))}if(!infinite&&"adx_inst"===config.type&&(config.active||_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.isDev)){const t=new _libs_ads_AdxInterstitial__WEBPACK_IMPORTED_MODULE_5__.A(this.gpt);this.instances.push(t),t.execute(config.settings)}if(!infinite&&"adx_overlay"===config.type&&(config.active||_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.isDev)){const t=new _libs_ads_AdxOverlay__WEBPACK_IMPORTED_MODULE_6__.A(this.gpt);this.instances.push(t),t.execute(config.settings)}if(!infinite&&"apm"===config.type&&(config.active||_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.isDev)){const t=new _libs_ads_InsertAds__WEBPACK_IMPORTED_MODULE_1__.W(this.gpt,config.settings,index,this.adObserver),{selector:e,targetType:i}=config.settings;_TargetObserver__WEBPACK_IMPORTED_MODULE_11__.c.waitForElement(e,i,(e=>{t.execute(e)}))}if(!infinite&&"custom"===config.type&&(config.active||_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.isDev)){if(config.settings.script)try{eval(config.settings.script)}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.error("custom script failed",t)}config.settings.style&&(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_15__.TD)(config.settings.style)}}))},this.executeInterstitial=(interstitialSetting,instanceCount,resolve)=>{const interstitial=new _libs_ads_Interstitial__WEBPACK_IMPORTED_MODULE_3__.R(this.gpt,interstitialSetting,instanceCount,resolve);if(this.instances.push(interstitial),callFnAfterDomContentLoaded((()=>{interstitial.execute()})),interstitialSetting.script)try{eval(interstitialSetting.script)}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.error("inst: custom script failed",t)}},this.getAdUnitId=t=>{const e=this.originalConfigs.configs.find((e=>"adUnitId"in e.settings&&"adUnitPath"in e.settings&&e.settings.adUnitPath===t));if(e&&"adUnitId"in e.settings)return e.settings.adUnitId},this.executeInfinite=async(t,e=[])=>{this.configManager.filterConfig(),await this.checkKeywordBlock(t)||this.callAdsFunctions(this.configManager.configsForCurrentPage,t,!0,e)},this.dispose=t=>{this.instances.forEach((t=>t.dispose())),this.instances.splice(0);for(const t in this.infinite)delete this.infinite[t];this.gpt.reset(t),this.prebid.reset(),this.aps.reset(),_TargetObserver__WEBPACK_IMPORTED_MODULE_11__.c.reset(),_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.reset(),this.shouldBlockRefresh=!1,this.disposed=!1,_FunctionTargeting__WEBPACK_IMPORTED_MODULE_20__.O.dispose(),_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.log("disposed")},_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.log("original config: ",originalConfigs),this.configManager=new _ConfigManager__WEBPACK_IMPORTED_MODULE_13__.m(originalConfigs),this.siteSettingsConfig=this.configManager.siteSetting;const{keywordsBlock}=this.siteSettingsConfig;this.shouldCallKeywordBlock=!(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_15__.ze)(keywordsBlock),this.prebid=new _libs_Prebid__WEBPACK_IMPORTED_MODULE_8__.A(this.siteSettingsConfig.prebidSettings,this.siteSettingsConfig.siteId,this.siteSettingsConfig.parentAccountSiteDomain,this.configManager.prebidAnalyticsConfig),this.aps=new _libs_Aps__WEBPACK_IMPORTED_MODULE_9__.A(this.siteSettingsConfig.prebidSettings.prebidTimeout,this.siteSettingsConfig.prebidSettings.prebidTamPubId,this.siteSettingsConfig.siteId,this.siteSettingsConfig.parentAccountSiteDomain),this.gpt=new _Gpt__WEBPACK_IMPORTED_MODULE_10__.Ay(this,this.prebid,this.aps),this.siteSettings=new _libs_SiteSettings__WEBPACK_IMPORTED_MODULE_0__.p(this.gpt,this.siteSettingsConfig),this.instances.push(this.siteSettings),this.hb=this.gpt.infiniteHb,this.forceHB=this.gpt.forceHB,this.adObserver=new _AdObserver__WEBPACK_IMPORTED_MODULE_12__.A(this.gpt)}async checkKeywordBlock(t){const{keywordsBlock:e}=this.siteSettingsConfig;if(this.shouldCallKeywordBlock){const i=e.keywordsCountry;return this.shouldBlockRefresh=i&&i.length>0?this.siteSettings.fetchKeywordJson(t):this.siteSettings.callKeywordBlocks(t),this.shouldBlockRefresh.then((t=>(_Logger__WEBPACK_IMPORTED_MODULE_7__.vF.log(t?"[BLOCK]":"[UN-BLOCK]"),t)))}return!1}}},356:(t,e,i)=>{i.d(e,{c:()=>r});var s=i(939),n=i(335);const o={childList:!0,subtree:!0};const r=new class{constructor(){this.MUTATION_OBSERVER_TIMEOUT=12e5,this.mutationObserver=null,this.elementListeners=[],this.connect=()=>{this.mutationObserver=(0,s.l9)(this.check.bind(this),50),this.mutationObserver.observe(document,o),this.disconnectTimeoutId=window.setTimeout(this.disconnect.bind(this),this.MUTATION_OBSERVER_TIMEOUT),this.check()},this.disconnect=()=>{null!==this.mutationObserver&&(this.mutationObserver.disconnect(),n.vF.log("MutationObserver disconnected"),this.mutationObserver=null,this.disconnectTimeoutId&&(window.clearTimeout(this.disconnectTimeoutId),delete this.disconnectTimeoutId),this.check())},this.check=()=>{if(0!==this.elementListeners.length){const t=this.elementListeners.slice();for(let e=t.length-1;e>=0;e--){const{selector:i,targetType:o,fn:r}=t[e],a=(0,s.EW)(window.document,i,o);if(null!=a){try{r(window.document)}catch(t){n.vF.error(t)}this.elementListeners.splice(e,1)}}}},this.waitForElement=(t,e,i)=>{this.elementListeners.push({selector:t,targetType:e,fn:i}),this.mutationObserver||this.connect()},this.reset=()=>{try{this.disconnect(),delete this.disconnectTimeoutId;for(let t=0;t{i.d(e,{f:()=>o});var s=i(335);class n extends Error{constructor(t,e){super(t),this.res=e,this.errorHandler=()=>{switch(this.res.status){case 404:s.vF.error("no file");break;case 403:s.vF.error("no permission");break;default:s.vF.log(this.res)}},s.vF.log(e),this.errorHandler()}}const o=new class{constructor(){this.videoJs="",this.videoCss="",this.ytFeedJson={},this.amFeedJson={},this.rssFeedJson={},this.selectedVideoFeedJson={},this.insertedVideoTag=!1,this.registerVideoUrls=(t,e)=>{this.videoJs=t,this.videoCss=e},this.registerSelectedVideos=(t,e)=>{this.selectedVideoFeedJson[e]=t},this.chooseVideoRandomlyFromSelected=async(t,e)=>{const i=this.selectedVideoFeedJson[t][Math.floor(Math.random()*this.selectedVideoFeedJson[t].length)];return(await this.ytFeedJson[e]).videos[i.video_id]},this.fetchYTVideoFeed=t=>{this.ytFeedJson[t]||(this.ytFeedJson[t]=fetch(t).then((t=>{if(!t.ok)throw new n("fetch error",t);return t.json()})).catch((()=>"")))},this.fetchRssVideoFeed=t=>{this.rssFeedJson[t]||(this.rssFeedJson[t]=fetch(t).then((t=>{if(!t.ok)throw new n("fetch error",t);return t.json()})).catch((()=>"")))},this.registerAMVideoFeed=(t,e)=>{this.amFeedJson[e]=t},this.chooseAMVideoEntry=t=>this.amFeedJson[t][Math.floor(Math.random()*this.amFeedJson[t].length)],this.chooseLatestPublishedYTVideoEntry=t=>this.ytFeedJson[t].then((t=>Object.keys(t.videos).map((e=>t.videos[e])).reduce(((t,e)=>e.published_at?Date.parse(t.published_at)>Date.parse(e.published_at)?t:e:t)))),this.chooseRandomYTVideoEntry=t=>this.ytFeedJson[t].then((t=>{const e=Object.keys(t.videos).map((e=>t.videos[e]));return e[Math.floor(Math.random()*e.length)]})),this.chooseRssFeedVideoEntry=(t,e)=>this.rssFeedJson[t].then((t=>Object.keys(t.videos).filter((t=>e.some((e=>t==e)))).map((e=>({id:e,entry:t.videos[e]})))[0])),this.insertVideoTag=async()=>{if(this.insertedVideoTag)return;const t=(t,e)=>new Promise((i=>{if("style"===t){const t=document.createElement("link");t.href=e,t.rel="stylesheet",t.setAttribute("ats-videojs","true"),t.onload=()=>i(),document.head.append(t)}else{const t=document.createElement("script");t.src=e,t.setAttribute("ats-videojs","true"),t.onload=()=>i(),document.head.append(t)}}));await Promise.all([t("style",this.videoCss),t("script","https://imasdk.googleapis.com/js/sdkloader/ima3.js"),t("script",this.videoJs)]),this.insertedVideoTag=!0}}}},292:(t,e,i)=>{i.d(e,{L1:()=>r,PI:()=>d,X1:()=>l,ap:()=>s,fX:()=>n,yN:()=>a,z1:()=>o});const s={USD:{USD:1,HKD:7.75,JPY:110,PHP:51.22,SGD:1.4,CNY:6.9,THB:34,MYR:4.24,IDR:14710,EUR:.9}},n=[{bidder:"criteo"},{bidder:"ix",versions:[5]},{bidder:"openx"}],o={buckets:[{precision:2,min:0,max:4,increment:.01},{precision:2,min:4,max:20,increment:.1}]},r={adgeneration:{bidCpmAdjustment:t=>.85*t},standard:{storageAllowed:!0}},a={alwaysUseBid:!0,sendStandardTargeting:!1,suppressEmptyKeys:!0,adserverTargeting:[{key:"adt",val:t=>t.adt},{key:"alc",val:t=>t.alc},{key:"dlm",val:t=>t.dlm},{key:"drg",val:t=>t.drg},{key:"hat",val:t=>t.hat},{key:"off",val:t=>t.off},{key:"vio",val:t=>t.vio},{key:"fr",val:t=>t.fr},{key:"id",val:t=>t.slots[t.adUnitCode].id},{key:"vw",val:t=>t.slots[t.adUnitCode].vw},{key:"grm",val:t=>t.slots[t.adUnitCode].grm},{key:"pub",val:t=>t.slots[t.adUnitCode].pub},{key:"vw05",val:t=>t.slots[t.adUnitCode].vw05},{key:"vw10",val:t=>t.slots[t.adUnitCode].vw10},{key:"vw15",val:t=>t.slots[t.adUnitCode].vw15},{key:"vw30",val:t=>t.slots[t.adUnitCode].vw30}]},d=["criteo","pubmatic","unruly","ix"],l={maxTopicCaller:2,bidders:[{bidder:"pubmatic",iframeURL:"https://ads.pubmatic.com/AdServer/js/topics/topics_frame.html",expiry:7},{bidder:"yandex",iframeURL:"https://yandex.ru/ads/prebid/topics_frame.html",expiry:7}]}},641:(t,e,i)=>{i.d(e,{k:()=>o});var s=i(939),n=i(335);class o{constructor(t,e,i,o,r,a){this.type=t,this.targetType=e,this.selector=i,this.insertPos=o,this.width=r,this.srcUrl=a,this.className="ats-select-media-wrapper",this.id="ats-third-party-wrapper",this.insertThirdPartyVideoPlayer=()=>{const t=(0,s.EW)(document,this.selector,this.targetType);if(t){switch(n.vF.log("insert third party player"),this.type){case 2:this.className="ats-trvd-wrapper";break;case 3:this.className="ats-glia-wrapper"}this.createWrapper(this.type,this.className,this.width,this.srcUrl,this.insertPos,t)}},this.createWrapper=(t,e,i,s,n,o)=>{const r=document.createElement("div");if(this.wrapDiv=r,r.className=e,r.id=this.id,r.style.width=`${i}px`,r.style.margin="20px auto",3==t){const t=document.createElement("div");t.className="gliaplayer-container",t.dataset.slot=s,r.append(t),s=`https://player.gliacloud.com/player/${s}`}const a=document.createElement("script");a.src=s,a.type="text/javascript",a.async=!0,2==t&&(a.dataset.cfasync="false"),r.append(a),o.insertAdjacentElement(n,r)},this.dispose=()=>{this.wrapDiv&&this.wrapDiv.remove()}}}},69:(t,e,i)=>{i.d(e,{K:()=>o});var s=i(939);window.adloox_pubint=window.adloox_pubint||{cmd:[]};const n=window.googletag=window.googletag||{};n.cmd=n.cmd||[];const o=new class{constructor(){this.ADLOOX_URL="//p.adlooxtracking.com/gpt/a.js",this.isCalled=!1,this.init=(t,e)=>{t&&this.reducer(e,(()=>{this.isCalled=!0,(0,s.nL)(!0,this.ADLOOX_URL),window.adloox_pubint.cmd.push((function(){window.adloox_pubint.init({clientid:152,platformid:238,tagid:1095})})),n.cmd.push((function(){window.adloox_pubint.cmd.push((function(){window.adloox_pubint.gpt_js(n)})),setTimeout((function(){window.adloox_pubint.cmd.push((function(){window.adloox_pubint.gpt(n,(()=>{}))}))}),2e3)}))}))},this.reducer=(t,e)=>{Math.random(){__webpack_require__.d(__webpack_exports__,{A:()=>AmazonPublisherService});var _Logger__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(335),_core_utils_util__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(939);const REGEX_TAM_PUB_ID=/^\d{4}$/;class AmazonPublisherService{constructor(timeout,apsPubId,siteId,parentAccountSiteDomain){this.timeout=timeout,this.apsPubId=apsPubId,this.siteId=siteId,this.parentAccountSiteDomain=parentAccountSiteDomain,this.isCalled=!1,this.noSlots=!1,this.onFirstApsResponseEnded=null,this.slotsDict={},this.configs=[],this.init=(t,e)=>{this.configs=t,this.waitUntilJSLoaded=e,this.isCalled||(this.isCalled=!0,this.loadAps()),REGEX_TAM_PUB_ID.test(this.apsPubId)?window.apstag.init({pubID:this.apsPubId,adServer:"googletag"}):window.apstag.init({pubID:this.apsPubId,adServer:"googletag",schain:this.getSchain()});const i=this.createParameters(this.configs,!1);if(0===i.length)return this.noSlots=!0,void _Logger__WEBPACK_IMPORTED_MODULE_0__.vF.error("aps: no slots");this.onFirstApsResponseEnded=this.fetchApsBids(i)},this.getSchain=()=>({complete:1,ver:"1.0",nodes:[{asi:this.parentAccountSiteDomain,sid:`${this.siteId}`,hp:1}]}),this.callExternalScript=()=>{const t=t=>{try{t()}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.error(t)}};window.anymindTSApstag=window.anymindTSApstag||{cmd:[]},window.anymindTSApstag.cmd.forEach(t),window.anymindTSApstag.cmd.splice(0),window.anymindTSApstag.cmd.push=t},this.loadAps=()=>{this.insertApsScriptTag("apstag",window,document,"script","//c.amazon-adsystem.com/aax2/apstag.js")},this.setTargeting=()=>{_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("aps: setTargeting"),window.apstag.setDisplayBids()},this.fetchApsBids=t=>new Promise((e=>{window.apstag.fetchBids({slots:t,timeout:this.timeout},(t=>{_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("aps return bids",t),e(!0)}))})),this.createParameters=(configs,force)=>{const slots=[];for(const config of configs)if(force||config.active||_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.isDev)for(const tamAdUnit of config.settings.tamAdUnits)if((0,_core_utils_util__WEBPACK_IMPORTED_MODULE_1__.hg)(tamAdUnit.deviceSizes)){let slotID=tamAdUnit.slot.slotID;try{slotID="Function"===tamAdUnit.slot.divIDType&&eval(slotID)||slotID}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.error("aps: The script to find the target failed.",t);continue}const apsAdSlot={slotID,slotName:tamAdUnit.slot.slotName,sizes:tamAdUnit.slot.sizes.filter((t=>t.enable||_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.isDev)).reduce(((t,e)=>{for(const[i,s]of e.sizes)t.push([i,s]);return t}),[])};if(apsAdSlot.sizes.length<=0)continue;this.slotsDict[apsAdSlot.slotName]=apsAdSlot,slots.push(apsAdSlot);break}return _Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("aps: slots",slots),_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("aps: slots dict",this.slotsDict),slots},this.reset=()=>{this.onFirstApsResponseEnded=null,this.noSlots=!1}}async insertApsScriptTag(t,e,i,s,n){if(e[t])return;function o(i,s){e[t]._Q.push([i,s])}e[t]={init:function(){o("i",arguments)},fetchBids:function(){o("f",arguments)},setDisplayBids:function(){},targetingKeys:function(){return[]},dpa:function(){o("di",arguments)},rpa:function(){o("ri",arguments)},upa:function(){o("ui",arguments)},_Q:[]},this.callExternalScript();await this.waitUntilJSLoaded,(()=>{const t=i.createElement(s);t.async=!0,t.src=n;const e=i.getElementsByTagName(s)[0];e.parentNode?.insertBefore(t,e)})()}}},326:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>Prebid});var _Logger__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(335),_core_utils_util__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(939),_config_prebid__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(292),_Gpt__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(554);class Prebid{constructor(prebidSettings,siteId,parentAccountSiteDomain,prebidAnalyticsConfig){this.prebidSettings=prebidSettings,this.siteId=siteId,this.parentAccountSiteDomain=parentAccountSiteDomain,this.prebidAnalyticsConfig=prebidAnalyticsConfig,this.isCalled=!1,this.noAdUnits=!1,this.onFirstPrebidResponseEnded=null,this.adUnitsDict={},this.adUnitsCodeDict={},this.configs=[],this.init=async(configs,waitUntilJSLoaded)=>{this.configs=configs,this.noAdUnits=!1,this.isCalled||(this.isCalled=!0,await waitUntilJSLoaded,(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_1__.nL)(!0,this.prebidSettings.prebidJsURL)),this.prebidSettings.prebidUseAtspbjs?this.pbjs=window.atspbjs=window.atspbjs||{que:[]}:this.pbjs=window.pbjs=window.pbjs||{que:[]};const intentIQ=this.prebidSettings.intentIQ;intentIQ&&(this.waitIntentIQ=this.callIntentIQ(intentIQ)),this.pbjs.que.push((()=>{_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log(this.prebidSettings.prebidUseAtspbjs?"atspbjs":"pbjs","Prebid.js",this.pbjs.version),this.prebidSettings.enableSchain&&this.setSchain(this.configs,!1),this.pbjs.aliasBidder("appnexus","dg"),this.pbjs.aliasBidder("appnexus","xandr"),this.pbjs.aliasBidder("microad","microad_wipe"),this.pbjs.aliasBidder("microad","microad_irs"),this.pbjs.bidderSettings=_config_prebid__WEBPACK_IMPORTED_MODULE_2__.L1;const prebidConfig=this.createPrebidConfig(this.prebidSettings);if(this.enableFledgeModule(),this.pbjs.setConfig(prebidConfig),this.configs.some((({settings:t})=>t.prebidAdUnits.some((({deviceSizes:t,atsPrebidAdUnits:e})=>(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_1__.hg)(t)&&e.some((({bids:t})=>t.some((({bidder:t})=>"ias"===t))))))))&&(this.pbjs.bidderSettings.ias=_config_prebid__WEBPACK_IMPORTED_MODULE_2__.yN),this.prebidSettings.prebidCustomScript)try{eval(this.prebidSettings.prebidCustomScript)}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.error("custom script for prebid",t)}this.prebidSettings.prebidUseAtspbjs&&this.modifyKeyValue(prebidConfig.priceGranularity),this.prebidSettings.enableAnalytics&&this.enableAnyMindPrebidAnalytics(this.prebidAnalyticsConfig.adUnitIdPathMapping,this.prebidAnalyticsConfig.amPrebidBidderMap,this.prebidSettings.analyticsSamplingRate,this.prebidSettings.ampaEndPoint)}));const adUnits=this.createParamaters(this.configs,!1);if(0===adUnits.length)return _Logger__WEBPACK_IMPORTED_MODULE_0__.vF.error("pbjs: no adunits"),void(this.noAdUnits=!0);const adUnitCodes=adUnits.map((t=>t.code));await this.waitIntentIQ,this.onFirstPrebidResponseEnded=this.sendBids(adUnits,adUnitCodes)},this.callIntentIQ=async t=>{if(t&&t.jsURL){const e=t.jsURL;delete t.jsURL,_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("setup IntentIQ"),await new Promise((i=>{(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_1__.nL)(!0,e,(()=>{const e={callback:t=>{_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("IntentIQ eids",t,this.iiq?.getIntentIqData()),i()},pbjs:this.pbjs,domainName:new URL(location.href).hostname,...t};_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("IntentIQ params",e),this.iiq=new window.IntentIqObject(e),googletag.cmd.push((()=>{try{googletag.pubads().setTargeting("intent_iq_group",this.iiq?.intentIqConfig.abTesting.currentTestGroup||"U")}catch(t){googletag.pubads().setTargeting("intent_iq_group","N")}}))}))}))}},this.enableAnyMindPrebidAnalytics=(t,e,i,s)=>{this.pbjs.enableAnalytics([{provider:"anymind",options:{sampling:i,siteId:this.siteId,adUnitIdPathMappings:t,amPrebidBidderMap:e,endpoint:s}}])},this.enableFledgeModule=()=>{this.pbjs.setBidderConfig({bidders:_config_prebid__WEBPACK_IMPORTED_MODULE_2__.PI,config:{fledgeEnabled:!0,defaultForSlots:1}})},this.removeAdUnit=t=>{this.pbjs.removeAdUnit(t)},this.setTargeting=()=>{_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("pbjs: setTargeting for all"),this.pbjs.setTargetingForGPTAsync()},this.setTargetingForEachSlot=t=>{_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("pbjs: setTargeting for ",t),this.pbjs.setTargetingForGPTAsync(t)},this.buildVideoUrl=(t,e)=>{const i={adUnit:t,params:e};return this.pbjs.adServers.dfp.buildVideoUrl(i)},this.modifyKeyValue=t=>{var e,i,s;const n="object"==typeof t?"custom":t;(e=this.pbjs).bidderSettings??(e.bidderSettings={}),(i=this.pbjs.bidderSettings).standard??(i.standard={}),(s=this.pbjs.bidderSettings.standard).adserverTargeting??(s.adserverTargeting=[]),this.pbjs.bidderSettings.standard.adserverTargeting.push({key:"ats_hb_bidder",val:t=>t.bidderCode},{key:"hb_size",val:t=>t.size},{key:"hb_adid",val:t=>t.adId},{key:"hb_source",val:t=>t.source},{key:"hb_format",val:t=>t.mediaType},{key:"ats_hb_pb",val:t=>{switch(n){case"medium":default:return t.pbMg;case"high":return t.pbHg;case"custom":return t.pbCg}}},{key:"ats_hb_bid",val:()=>"true"},{key:"hb_uuid",val:t=>t.videoCacheKey}),this.pbjs.bidderSettings.standard.adserverTargeting=this.pbjs.bidderSettings.standard.adserverTargeting.filter(((t,e,i)=>i.findIndex((e=>e.key===t.key))===e))},this.createPrebidConfig=({prebidCurrency,prebidPriceGranularity,prebidTimeout,prebidUserSyncScript,prebidVersion,userIds})=>{var _a;const config={enableTIDs:!0,debug:_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.enablePrebidLog,rubicon:{singleRequest:!0},criteo:{fastBidVersion:"latest"},enableSendAllBids:!1,...(()=>{try{if(prebidUserSyncScript)return{userSync:eval(prebidUserSyncScript)}}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.error("Prebid userSync Script",t)}})(),currency:{adServerCurrency:prebidCurrency,granularityMultiplier:_config_prebid__WEBPACK_IMPORTED_MODULE_2__.ap.USD[prebidCurrency],conversionRateFile:"https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json",defaultRates:_config_prebid__WEBPACK_IMPORTED_MODULE_2__.ap},priceGranularity:"custom"==prebidPriceGranularity?_config_prebid__WEBPACK_IMPORTED_MODULE_2__.z1:prebidPriceGranularity,cache:{url:"https://prebid.adnxs.com/pbc/v1/cache"},bidderTimeout:prebidTimeout,paapi:{enabled:!0,bidders:_config_prebid__WEBPACK_IMPORTED_MODULE_2__.PI,defaultForSlots:1}};if(prebidVersion>=8&&(config.topics=_config_prebid__WEBPACK_IMPORTED_MODULE_2__.X1),0t.name===e.name))||t.push(e)}return config},this.sendBids=(t,e)=>new Promise((i=>{const s=(0,_Gpt__WEBPACK_IMPORTED_MODULE_3__._7)((()=>{const t=this.pbjs.getHighestCpmBids()[0];if(_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("IntentIQ winningBid",t),t&&this.iiq){const e={biddingPlatformId:1,partnerAuctionId:t.auctionId,bidderCode:t.bidder,prebidAuctionId:t.auctionId,cpm:t.cpm,currency:t.currency||"USD",originalCpm:t.originalCpm,originalCurrency:t.originalCurrency||"USD",status:t.status||"rendered",placementId:t.adUnitCode};_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.table("IntentIQ reportData",e),this.iiq.reportExternalWin(e)}i(!0)}));this.pbjs.que.push((()=>{this.pbjs.addAdUnits(t),this.pbjs.requestBids({timeout:this.prebidSettings.prebidTimeout,adUnitCodes:e,bidsBackHandler:s})}))})),this.renderer=t=>({backupOnly:!0,url:t,render:t=>{_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log(`execute OutStream Renderer ${t.bidderCode} ${t.mediaType}`),void 0!==t.ad&&null!==t.ad||void 0===t.vastUrl||null===t.vastUrl||(_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("Bid object contains bid.vastUrl with value: "+t.vastUrl),t.ad=t.vastUrl);const e={vastTimeout:5e3,maxAllowedVastTagRedirects:3,allowVpaid:!0,autoPlay:!1,preload:!0,mute:!0};t.width&&(e.width=t.width),t.height&&(e.height=t.height),t.renderer.push((()=>{try{window.outstreamPlayer&&window.outstreamPlayer.player(t,t.adUnitCode,e)}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.error(t),_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("Error in ad rendering!")}}))}}),this.createParamaters=(configs,force=!1)=>{const adUnits=[];for(const config of configs){if(!force&&!config.active&&!_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.isDev)continue;const{adUnitPath,prebidAdUnits}=config.settings;let divID=config.settings.divID;try{divID="Function"===config.settings.divIDType&&eval(divID)||divID}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.error("pbjs: The script to find the target failed.",t);continue}const _prebidAdUnits=[];for(const prebidAdUnit of prebidAdUnits)if((0,_core_utils_util__WEBPACK_IMPORTED_MODULE_1__.hg)(prebidAdUnit.deviceSizes)){for(const atsPrebidAdunit of prebidAdUnit.atsPrebidAdUnits){const adUnit={code:divID,bids:atsPrebidAdunit.bids.reduce(((accumulator,{bidder,params,script})=>{try{accumulator.push({bidder,params:script?eval(script):params})}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.error("[Error in Prebid params]",t)}return accumulator}),[]),mediaTypes:{},...(()=>{const t=config.settings.adUnitPath+(/^ats-insert_ads_flexible-\d+-\d+$/.test(divID)?`#${divID}`:"");return{ortb2Imp:{ext:{gpid:t,ae:1,data:{adserver:{name:"gam",adslot:t}}}}}})()};adUnit.bids.length<=0||((0,_core_utils_util__WEBPACK_IMPORTED_MODULE_1__.ze)(atsPrebidAdunit.mediaTypes.banner)||(adUnit.mediaTypes.banner=atsPrebidAdunit.mediaTypes.banner),(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_1__.ze)(atsPrebidAdunit.mediaTypes.video)||(adUnit.mediaTypes.video=atsPrebidAdunit.mediaTypes.video,this.prebidSettings&&"outstream"===adUnit.mediaTypes.video?.context&&adUnit.bids.some((({bidder:t})=>_config_prebid__WEBPACK_IMPORTED_MODULE_2__.fX.some((({bidder:e,versions:i})=>e===t&&(!i||i.includes(this.prebidSettings.prebidVersion))))))&&(adUnit.mediaTypes.video.renderer=this.renderer(this.prebidSettings.rendererJsURL))),(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_1__.ze)(atsPrebidAdunit.mediaTypes.native)||(adUnit.mediaTypes.native=atsPrebidAdunit.mediaTypes.native),adUnits.push(adUnit),_prebidAdUnits.push(adUnit))}this.adUnitsDict[adUnitPath]={prebidAdUnits:_prebidAdUnits,code:divID},this.adUnitsCodeDict[divID]={prebidAdUnits:_prebidAdUnits,adUnitPath};break}}return _Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("pbjs: adUnits",adUnits),_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("pbjs: adunits dict",this.adUnitsDict),adUnits},this.setSchain=(t,e=!1)=>{this.pbjs.que.push((()=>{const i=new Set;if(t.forEach((t=>{e||!t.active&&!_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.isDev||t.settings.prebidAdUnits.forEach((t=>{t.atsPrebidAdUnits.forEach((({bids:e})=>{e.forEach((e=>{e.includeSchain&&(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_1__.hg)(t.deviceSizes)&&i.add(e.bidder)}))}))}))})),i.size>0){const t=[];i.forEach((e=>t.push(e))),this.pbjs.setBidderConfig({bidders:t,config:{schain:{validation:"relaxed",config:{ver:"1.0",complete:1,nodes:[{asi:this.parentAccountSiteDomain,sid:`${this.prebidSettings.sellerId}`,hp:1}]}}}})}}))},this.reset=()=>{try{this.pbjs&&this.pbjs.que.push((()=>{this.pbjs.removeAdUnit()})),this.onFirstPrebidResponseEnded=null,this.configs=[],this.noAdUnits=!1;for(const t in this.adUnitsDict)delete this.adUnitsDict[t]}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.error(t)}}}}},332:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{p:()=>SiteSettings});var _Logger__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(335),_Apm__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(139),_Adloox__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(69),_core_utils_util__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(939);class SiteSettings{constructor(gpt,config){this.gpt=gpt,this.config=config,this.countryKeywordsJson={},this.callSiteLevelSetting=(t,e,i,s,n)=>{const{enableBasicSetTargetings:o,enableGamLazyload:r,enableGamSingleRequest:a,enableCollapseEmptyDivs:d,enableApm:l,apmNetworkId:c,apmSiteId:h,enableAdloox:p,adlooxRequestRatio:_,enableGptScript:g}=this.config;g&&(n?n.then((()=>{this.gpt.insertGptTag()})):this.gpt.insertGptTag()),o&&this.gpt.executeBasicTargetings(),!(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_3__.ze)(r)&&this.gpt.enableGamLazyload(r),d&&this.gpt.collapseEmptyDivs(),t&&this.gpt.disableInitialLoad(),(a||t)&&(this.gpt.defineATSSlotsForSRA(i,s),this.gpt.enableSingleRequest()),this.gpt.enableServices(),l&&c&&h&&(_Apm__WEBPACK_IMPORTED_MODULE_1__.rG.insertSasScript(c),_Apm__WEBPACK_IMPORTED_MODULE_1__.rG.setUpAndCall(c,h,e)),_Adloox__WEBPACK_IMPORTED_MODULE_2__.K.init(p,_)},this.fetchKeywordJson=async t=>"countryKeywordsJsonUrl"in this.config.keywordsBlock&&"string"==typeof this.config.keywordsBlock.countryKeywordsJsonUrl&&fetch(this.config.keywordsBlock.countryKeywordsJsonUrl,{mode:"cors",method:"GET",headers:{"Content-Type":"application/json"}}).then((t=>t.json())).then((e=>(this.countryKeywordsJson=e,this.callKeywordBlocks(t))),(t=>(_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.error(t),!1))),this.callKeywordBlocks=async t=>("loading"===document.readyState&&await new Promise((t=>{const e=()=>{document.removeEventListener("DOMContentLoaded",e),t()};document.addEventListener("DOMContentLoaded",e)})),this.keywordsBlock(t)),this.isMatchedWithRegex=(t,e)=>{if(0===e.length)return _Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("no keywords"),!1;const i=e.map((t=>(["\\","*","+",".","?","{","}","(",")","[","]","^","$","|"].forEach((e=>{t=t.replace(e,`\\${e}`)})),t))).join("|"),s=new RegExp(i);return s.test(t)?(_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("block by keyword"),_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log(t.match(s)),!0):(_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("regex unblock"),!1)},this.keywordsBlock=async(t=document)=>{if(!("keywordsContainers"in this.config.keywordsBlock))return!1;const{keywordsContainers:e,keywords:i=[],keywordsCountry:s=[]}=this.config.keywordsBlock;s.length>0&&s.forEach((t=>{this.countryKeywordsJson[t]&&this.countryKeywordsJson[t].forEach((t=>i.push(t.toLowerCase())))})),_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.log("keywords for block: ",i);const n=e.length>0?e.map((e=>t.querySelector(e)?.innerText||"")).join(" "):"innerText"in t?t.innerText:t.body.innerText;return this.isMatchedWithRegex(n.toLowerCase(),i)},this.browsersBlock=()=>{if(this.config.browsersBlock)for(const fnc of this.config.browsersBlock)try{if(eval(`(${fnc})(navigator.userAgent)`))return!0}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_0__.vF.error("browsersBlock script",t)}return!1},this.dispose=()=>{}}}},197:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>waitUntilJSLoaded});var _core_utils_util__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(939),_Logger__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(335);const LIVE_LAMP_SCRIPT_URL="https://launchpad.privacymanager.io/1/launchpad.bundle.js",waitUntilJSLoaded=({enablePrebid,enableIdentityHub,identityHubPublisherId,identityHubProfileId,enableLiveRamp,liveRampJsURL,liveRampScript})=>{if(enablePrebid&&enableLiveRamp&&liveRampJsURL&&(_Logger__WEBPACK_IMPORTED_MODULE_1__.vF.log("enable LiveRamp"),window.setTimeout((()=>{if(/.*launchpad-wrapper\.privacymanager\.io\/.*/.test(liveRampJsURL)){const t=document.createElement("link");t.setAttribute("rel","preload"),t.setAttribute("href",LIVE_LAMP_SCRIPT_URL),t.setAttribute("as","script"),document.head.appendChild(t)}(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.nL)(!1,liveRampJsURL,(()=>{_Logger__WEBPACK_IMPORTED_MODULE_1__.vF.log("LiveRamp loaded");try{liveRampScript&&eval(liveRampScript)}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_1__.vF.error("LiveRamp error",t)}}))}))),enablePrebid&&enableIdentityHub&&identityHubPublisherId&&identityHubProfileId)return new Promise((t=>{_Logger__WEBPACK_IMPORTED_MODULE_1__.vF.log("enable PWT");let e=!1;const i=()=>{e||(e=!0,_Logger__WEBPACK_IMPORTED_MODULE_1__.vF.log("PWT loaded"),t())};window.PWT=window.PWT||{},window.PWT.jsLoaded=()=>{location.hostname.match(/proxypy.org|printwhatyoulike.com/)||i()},setTimeout((()=>{_Logger__WEBPACK_IMPORTED_MODULE_1__.vF.log("PWT timeout"),i()}),500);const s=window.location.href;let n="";if(s.indexOf("pwtv=")>0){const t=/pwtv=(.*?)(&|$)/g.exec(s);t&&t.length>=2&&t[1].length>0&&(n="/"+t[1])}(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.nL)(!0,`//ads.pubmatic.com/AdServer/js/pwt/${identityHubPublisherId}/${identityHubProfileId}${n}/pwt.js`)}))}},840:(t,e,i)=>{i.d(e,{A:()=>n});var s=i(335);class n{constructor(t){this.gpt=t,this.isCalled=!1,this.config=null,this.execute=t=>{this.config=t,!this.isCalled&&this.config?(this.gpt.callOutOfPageSlotWrapper(this.config),this.isCalled=!0):s.vF.error("adx inst must be called once")},this.dispose=()=>{this.isCalled=!1}}}},404:(t,e,i)=>{i.d(e,{A:()=>n});var s=i(335);class n{constructor(t){this.gpt=t,this.isCalled=!1,this.config=null,this.execute=t=>{this.config=t,!this.isCalled&&this.config?(this.gpt.callOutOfPageSlotWrapper(this.config),this.isCalled=!0):s.vF.error("adx overlay must be called once")},this.dispose=()=>{this.isCalled=!1}}}},599:(t,e,i)=>{i.d(e,{x:()=>r});var s=i(139),n=i(472),o=i(335);class r{constructor(t,e,i,r,a){this.gpt=t,this.config=e,this.AD_NAME=i,this.instanceCount=r,this.adType=a,this.RENDERED="rendered",this.UNRENDERED="unrendered",this.NOT_DISPLAYED="not-displayed",this.SHOW_ADVERTISEMENT="show_advertisement",this.ENABLE_STICKY="enable_sticky",this.ABSOLUTE="absolute",this.STICKY="sticky",this.ADVERTISEMENT_TEXT="ADVERTISEMENT",this.slots={},this.infinite=!1,this.CLASS_NAME="",this.execute=async(t,e)=>{this.config.useFunctionTrigger&&this.config.functionTrigger&&(o.vF.log("use functionTrigger:"+this.config.adUnitPath),await n.O.waitForConditionMet(t||document,this.instanceCount,this.config.functionTrigger,this.config.adUnitPath));const i=this._execute(t,e),r=this._findTarget(i);if(null===r)return;r.map((t=>{const e=this._buildSlot(t,i);return null!==e&&(this.config.formatId?this.slots[e].slot.id=s.jC.sasDivIdPrefix+this.config.formatId:this.slots[e].slot.id=e),{divId:e,target:t}})).forEach((t=>{if(null!==t.divId)if(this.config.formatId){const t=this.config.formatId;s.rG.render(t)}else{const e=this._getFetchAdConfig(t.divId,t.target,this.infinite);this.gptFetchAd(e.gpt)}}))},this.makeReplaceAdSenseParams=()=>({adSenseReplacementClient:this.config.adSenseReplacementClient,adSenseReplacementSlot:this.config.adSenseReplacementSlot}),this._init(),this._addStyle()}async gptFetchAd(t){let e=t.divId;const i=document.getElementById(e),s=[t.adUnitPath,...this.config.autoAdUnitPaths||[]];if(1==s.length)await this.gpt.fetchAd(t);else{const n=t.onAfterGptFetched,r=t.onAfterGptRendered;let a=i;for(const d of s){const s=await new Promise((i=>{const s={...t,adUnitPath:d,divId:a.id,onAfterGptFetched:t=>{o.vF.log("fake onAfterGptFetched",t)},onAfterGptRendered:t=>{o.vF.log("fake onAfterGptRendered",t),i(t)}};o.vF.log("div.id",a.id,"divId",e,"adUnitPath",s.adUnitPath,"config",s),this.gpt.fetchAd(s)}));if(!s.isEmpty){n(s.slot),r(s);break}a.style.display="none",a=document.createElement("div"),a.id=e+="-a",i.parentNode?.appendChild(a)}}}}},456:(t,e,i)=>{i.d(e,{W:()=>a});var s=i(939),n=i(599),o=i(335);const r="2147483647";class a extends n.x{constructor(t,e,i,n){super(t,e,"insert_ads",i,"insert_ads"),this.executeCallCount=0,this.requestAnimationFrameId=0,this.currentNumOfAds=0,this._execute=(t,e=!1)=>(this.infinite=e,this.executeCallCount++,this.currentNumOfAds=0,t),this.choosePositions=t=>{let e=this.config.selector;"Function"===this.config.targetType&&(e=(0,s.ab)(t).join(">"));const i=this.config.targetFirstLevelOnly?this.config.selectors.map((t=>`${e}>${t}`)).join(","):this.config.selectors.join(",");let n=Array.prototype.map.call(t.querySelectorAll(i),(t=>t));if(this.config.exclusiveSelectors&&0`${t}+*`)).join(",");n=n.filter((e=>!e.matches(t)))}return n},this.selectPositions=(t,e)=>{const i=window.innerHeight,s=t.getBoundingClientRect(),n=s.top+window.pageYOffset,r=s.bottom+window.pageYOffset;if(s.height{const e=t.getBoundingClientRect(),s=e.top+window.pageYOffset,d=e.bottom+window.pageYOffset;return!(s-n{const{selector:e,targetType:i,isFlexible:n}=this.config,r=(0,s.EW)(t,e,i);if(null==r)return null;const a=[],d=[];if(n?(a.push(...this.choosePositions(r)),d.push(...this.selectPositions(r,a))):(a.push(r),d.push(r)),o.vF.enableLog)for(let t=0;t

${t}

`);return d.length<=0?(o.vF.error("i flex: no position"),null):d},this._buildSlot=(t,e)=>{const{showAdvertisement:i,customShowAdsText:s,insertPosition:n="afterbegin",isFlexible:o,divIDs:r}=this.config;if(this.currentNumOfAds++,this.currentNumOfAds>this.config.numOfAds)return null;const a=r[this.currentNumOfAds-1]+(this.infinite?`-${this.executeCallCount}`:""),d=document.createElement("div"),l=document.createElement("p"),c=document.createTextNode(s||this.ADVERTISEMENT_TEXT);l.appendChild(c);const h=document.createElement("div");h.classList.add("ats-slot"),d.appendChild(l),d.appendChild(h);const p=document.createElement("div");p.id=`${a}-wrapper`,p.classList.add(this.AD_NAME,this.CLASS_NAME),i&&p.classList.add(this.SHOW_ADVERTISEMENT),p.appendChild(d);const _=o?"beforebegin":n;return t.insertAdjacentElement(_,p),this.slots[a]={baseElement:e,adUnitPath:this.config.adUnitPath,divId:a,slotWrapper:p,slot:h,isGPTRefreshCalled:!1,shouldStopRefresh:!1,...this.makeReplaceAdSenseParams()},a},this._getFetchAdConfig=(t,e,i)=>{const{setCollapseEmptyDiv:s,sizeMappingGroup:n,setTargetingConfigs:o,enableLazyLoad:r,lazyLoadConfig:a,lazyLoadMode:d,enableSetForceSafeFrameForSlot:l}=this.config,c=this.slots[t];return{gpt:{slotWrapperDiv:c.slotWrapper,instanceCount:this.instanceCount,adUnitPath:c.adUnitPath,sizes:[[300,250]],divId:c.divId,setCollapseEmptyDiv:s,sizeMappingGroup:n,setTargetingConfigs:o,onAfterGptRendered:this._onAfterGptRendered(t),onAfterGptFetched:this._onAfterGptFetched(t),enableSetForceSafeFrameForSlot:l,enableLazyLoad:r,lazyLoadConfig:a,lazyLoadMode:d,infinite:i}}},this._onAfterGptFetched=t=>e=>{const i=this.slots[t];i.googletagSlot=e,i.dispose=()=>{i.shouldStopRefresh=!0,googletag.destroySlots([e]),i.slotWrapper.remove()}},this._onAfterGptRendered=t=>e=>{const{isFlexible:i,isSticky:s,refreshInterval:n,refreshLimit:o,inViewRate:r,setTargetingConfigs:a}=this.config,d=this.slots[t];n>0&&!d.isGPTRefreshCalled&&this.gpt.intervalRefreshAds([e.slot],n,o,t,this.slots,r,a),e.slot===d.googletagSlot&&(e.isEmpty?d.slotWrapper.classList.add(this.UNRENDERED):(d.eventSize=Array.isArray(e.size)?[e.size[0],e.size[1]]:[0,0],d.slotWrapper.classList.add(this.RENDERED),!i&&s&&(this.initializeStyle(d.slotWrapper),this.handleSticky(d))))},this.handleSticky=t=>{if(!t.baseElement)return;const{slotWrapper:e,eventSize:i}=t,{stickyStopTarget:n,stickyStopTargetType:r,stickySizes:a,overrideMargin:d=!1,overrideMarginBottom:l=0,overrideMarginTop:c=0}=this.config,[h]=t.eventSize||[0],p=e.children[0],_=window.getComputedStyle(p),g=e.offsetHeight,{marginTop:u,marginBottom:f,marginLeft:m}=_,E=parseFloat(u)||0,b=parseFloat(f)||0,v=parseFloat(m)||0,y=d?c:parseFloat(u)||0,A=d?l:parseFloat(f)||0,D=(()=>{let t=!1;if(a&&a.length>0)for(let e=0;e{S||(S=!0,D?t.requestAnimationFrameId=window.requestAnimationFrame((()=>{this.handleScroll(h,v,y,A,g,t,p,P),S=!1})):(S=!0,t.requestAnimationFrameId&&window.cancelAnimationFrame(t.requestAnimationFrameId)))};e.classList.contains(this.ENABLE_STICKY)||(window.addEventListener("scroll",C),t.removeScrollEventListener=()=>{window.cancelAnimationFrame(this.requestAnimationFrameId),window.removeEventListener("scroll",C)},e.classList.add(this.ENABLE_STICKY))},this.handleScroll=(t,e,i,s,n,o,r,a)=>{const{slotWrapper:d}=o,{overrideMargin:l=!1,overrideMarginBottom:c=0,overrideMarginTop:h=0}=this.config;d.classList.remove(this.STICKY,this.ABSOLUTE),r.style.top="",r.style.marginLeft="";const p=(r.offsetWidth-t)/2+e,_=a?a.getBoundingClientRect().top:document.body.getBoundingClientRect().bottom,g=a?a.offsetTop:_+window.pageYOffset,u=d.getBoundingClientRect(),f=0{const e=t.children[0];t.classList.remove(this.ENABLE_STICKY),t.classList.remove(this.ABSOLUTE),t.classList.remove(this.STICKY),t.style.height="",e.style.marginLeft="",e.style.marginTop="",e.style.marginBottom=""},this.dispose=()=>{try{o.vF.log("i: dispose");for(const t in this.slots){const e=this.slots[t];e.removeScrollEventListener&&e.removeScrollEventListener(),e.dispose&&e.dispose(),delete this.slots[t]}}catch(t){o.vF.error(t)}},n.createAdObserver(this.config,this)}_init(){this.CLASS_NAME=`${this.AD_NAME}-${this.instanceCount}`}_addStyle(){(0,s.TD)([`div.${this.AD_NAME}.${this.UNRENDERED},`,`div.${this.AD_NAME}.${this.UNRENDERED} > div,`,`div.${this.AD_NAME}.${this.UNRENDERED} > div > div,`,`div.${this.AD_NAME}.${this.UNRENDERED} > div > div > div,`,`div.${this.AD_NAME}.${this.UNRENDERED} > div > div > div > iframe {`,"height: 1px;","}",`div.${this.AD_NAME},`,`div.${this.AD_NAME} > div,`,`div.${this.AD_NAME} > div > div,`,`div.${this.AD_NAME} > div > div > div,`,`div.${this.AD_NAME} > div > div > div > iframe {`,"text-align: center;","}",`div.${this.AD_NAME}.${this.RENDERED}.${this.SHOW_ADVERTISEMENT} > div > p {`,"color: #8a9299;","font-size: 10px;","margin-bottom: 3px;","margin-top: 3px;","text-transform: uppercase;","text-align: center;","}",`div.${this.AD_NAME}:not(.${this.RENDERED}) > div > p,`,`div.${this.AD_NAME}:not(.${this.SHOW_ADVERTISEMENT}) > div > p {`,"display: none;","}",`div.${this.AD_NAME}.${this.RENDERED}.${this.ENABLE_STICKY}.${this.ABSOLUTE} > div {`,"position: absolute;",`z-index: ${r};`,"}",`div.${this.AD_NAME}.${this.RENDERED}.${this.ENABLE_STICKY}.${this.STICKY} > div {`,"position: fixed;",`z-index: ${r};`,"top: 0px;","}"].join("")+(o.vF.enableLog?[`div.${this.AD_NAME}-debug {`,"height: 1px;","margin: 0 auto;","padding: 0;","position: relative;","}",`div.${this.AD_NAME}-debug > p {`,"background-color: rgba(225, 0, 80, 0.5);","color: #212121;","font-size: 7px;","height: 16px;","margin: 0 auto;","text-align: center;","top: 0;","width: 16px;","}"].join(""):""),this.AD_NAME),(0,s.TD)([`div.${this.CLASS_NAME}.${this.AD_NAME} > div {`,this.config.customCss,"}",`div.${this.CLASS_NAME}.${this.AD_NAME}.${this.RENDERED}.${this.SHOW_ADVERTISEMENT} > div {`,this.config.customCssForShowAdvertisement,"}"].join("")+(this.config.isSticky?[`div.${this.CLASS_NAME}.${this.AD_NAME}.${this.RENDERED}.${this.ENABLE_STICKY}.${this.ABSOLUTE} > div {`,"background-color: inherit;","}",`div.${this.CLASS_NAME}.${this.AD_NAME}.${this.RENDERED}.${this.ENABLE_STICKY}.${this.STICKY} > div {`,"top: 0px;","background-color: inherit;","}"].join(""):""),this.CLASS_NAME)}}},389:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{b:()=>InsertVideoAds});var _core_utils_util__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(939),_Logger__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(335),_VideoManager__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(561);const Z_INDEX_MAX_VALUE="2147483647",defaultSizes169=[[640,360],[320,180]],defaultSizes43=[[640,480],[480,360],[320,240]],defaultSizes916=[[360,640],[180,320]],defaultSizes34=[[480,640],[360,480],[240,320]],defaultSizes11=[[300,300],[250,250]],DEFAULT_PLAYER_CONTROL_Z_INDEX=999,DEFAULT_PLAYER_AD_CONTAINER_Z_INDEX=998;class VjsLogger{constructor(t=_Logger__WEBPACK_IMPORTED_MODULE_1__.vF){this.logger=t,this.log=(...t)=>{this.logger.log("video:",...t)},this.error=(...t)=>{this.logger.error("video:",...t)}}}const vjsLogger=new VjsLogger;class InsertVideoAds{constructor(gpt,config,prebid){this.gpt=gpt,this.config=config,this.prebid=prebid,this.RENDERED="rendered",this.HIDE="hide",this.executeCallCount=0,this.infinite=!1,this.divId="",this.closeButtonId="",this.wrapperClassName="ats-insert-video-wrapper",this.divClassName="ats-insert-video",this.closeButton=document.createElement("button"),this.wrapperId="",this.originVideoWidth=0,this.originVideoHeight=0,this.videoStickyWrapperId="ats-insert-video-sticky-wrapper",this.isAutoPlayed=!1,this.stickyOrAnchoring=!1,this.observer=null,this.anchoringClass="",this.topStickyClass=this.wrapperClassName+"-top-sticky",this.poster="",this.deviceType=(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.gE)(),this.isPlaying=!1,this.isFirstPlay=!1,this.testUrl=window.sessionStorage.getItem("ats_test_video_url")||"",this.testAdTagUrl=window.sessionStorage.getItem("ats_test_ad_tag_url")||"",this.MAX_RETRY=30,this.counter_retry=1,this.REFRESH_INTERVAL=32e3,this.rssArticleLinkId="rss-article-link",this.rssArticleLinks=[],this.topStickyCloseButton=document.createElement("a"),this.topStickyCloseButtonId="top-sticky-close-button",this.showTopStickyVideoCloseButton=!1,this.rssFeedArticles=[],this.scrollCallbacks=[],this.onceInView=!1,this.autoplayInNext=!1,this.autoAdUnitPaths=[],this.videoLoadingCount=0,this.userStopAnchor=!1,this.anchorCallbackWhenAdLoaded=null,this.showCloseButton=!1,this.videoLength=0,this.isAdPlaying=!1,this.isAdPaused=!1,this.adDisplayContainerInitialized=!1,this.allAdsCompleted=!1,this.contentEnded=!1,this.hlsConfig={maxBufferLength:5,maxMaxBufferLength:10,backBufferLength:1/0,maxBufferSize:2e5,maxBufferHole:.5,highBufferWatchdogPeriod:2},this.PC_PLAYLIST_HEIGHT=180,this.SP_PLAYLIST_HEIGHT=90,this.numOfPlaylists=0,this.RSS_VIDEO_LENGTH=30,this.NON_LINEAR_ADS_CLASS_NAME="non-linear_ats_ima_ad_container",this.convertedRssFeeds={},this.DEFAULT_RSS_LINK_BUT_TEXT="Read Article",this.onAdEvent=t=>e=>{this.counter_retry=1;const i=window.google;if(vjsLogger.log(`ads event: ${e.type}`),e.type==i.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED)this.player.pause(),this.showAdDisplayContainer(),this.isAdPlaying=!0,this.disablePlaylist(),this.rssArticleLink&&(this.rssArticleLink.style.display="none");else if(e.type==i.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED)this.hideAdDisplayContainer(),this.isAdPaused=!1,this.isAdPlaying=!1,this.contentEnded||(this.play(),this.rssArticleLink&&(this.rssArticleLink.style.display="block"));else if(e.type==i.ima.AdEvent.Type.AD_BREAK_READY)vjsLogger.log("ad break ready");else if(e.type==i.ima.AdEvent.Type.STARTED){if(vjsLogger.log("ad started"),this.currentAd=e.getAd(),this.currentAd.isLinear()&&(this.countdownTimer=setInterval(this.trackLinearAd,250),this.showImaControlBar()),this.adMuteButton=document.querySelector("#ats-ad-container button.plyr__control[data-plyr='mute']"),this.adsManager.getVolume()>0?this.adMuteButton.classList.add("plyr__control--not-pressed"):this.adMuteButton.classList.add("plyr__control--pressed"),this.adMuteButton.addEventListener("click",this.onAdMuteClick),this.userStopAnchor||this.enableAdAnchoredPlayback){let t=!1;this.anchorCallback();const e=()=>{t||(window.requestAnimationFrame((()=>{this.anchorCallback(),t=!1})),t=!0)};document.addEventListener("scroll",e),this.scrollCallbacks.push(e),this.anchorCallbackWhenAdLoaded=e,this.closeButton.addEventListener("click",(()=>{document.removeEventListener("scroll",e),this.stopElmAnchoring()}))}}else if(e.type==i.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED){const t=e.ad.data.skippable?e.ad.data.skipTimeOffset:0;vjsLogger.log(t),t>0&&(this.showCloseButton=!0,this.stickyOrAnchoring&&(this.closeButton.style.visibility="visible"))}else if(e.type==i.ima.AdEvent.Type.LOADED){e.getAd().isLinear()?(vjsLogger.log("linear ads"),this.adDisplayContainerElm.classList.remove(this.NON_LINEAR_ADS_CLASS_NAME)):(vjsLogger.log("non-linear ads"),this.adDisplayContainerElm.classList.add(this.NON_LINEAR_ADS_CLASS_NAME),this.player?.play())}else e.type!=i.ima.AdEvent.Type.ALL_ADS_COMPLETED&&e.type!=i.ima.AdEvent.Type.USER_CLOSE&&e.type!=i.ima.AdEvent.Type.COMPLETE&&e.type!=i.ima.AdEvent.Type.SKIPPED&&e.type!=i.ima.AdErrorEvent.Type.AD_ERROR||(this.enablePlaylist(),this.hideImaControlBar(),this.initAdUIElement(),vjsLogger.log("ads finish or error event type: ",e.type),clearInterval(this.countdownTimer),this.isAdPlaying=!1,this.isAdPaused=!1,this.showCloseButton=!1,this.userStopAnchor&&this.anchorCallbackWhenAdLoaded&&(document.removeEventListener("scroll",this.anchorCallbackWhenAdLoaded),this.anchorCallbackWhenAdLoaded=null,this.stopElmAnchoring()),this.enableAdAnchoredPlayback&&(this.anchorCallbackWhenAdLoaded&&document.removeEventListener("scroll",this.anchorCallbackWhenAdLoaded),this.stopElmAnchoring(),this.player?.play()));if(e.type===i.ima.AdEvent.Type.ALL_ADS_COMPLETED||e.type==i.ima.AdErrorEvent.Type.AD_ERROR){this.hideAdDisplayContainer(),vjsLogger.log(e),this.resizeObserver?.disconnect(),this.adsManager.destroy();const i=this.videoLoadingCount;vjsLogger.log("call ads after 30 sec"),setTimeout((()=>{this.refreshAds(t,i)}),this.REFRESH_INTERVAL),this.isPlaying=!0,this.allAdsCompleted=!0}if(e.type==i.ima.AdEvent.Type.LOG){const t=e.getAdData();t.adError&&vjsLogger.error("Non-fatal error occurred: "+t.adError.getMessage())}},this.execute=async(t,e=!1)=>{this.videoLoadingCount+=1,this.infinite=e,this.executeCallCount++,await _VideoManager__WEBPACK_IMPORTED_MODULE_2__.f.insertVideoTag();const i=this.findTarget(t);i&&(await this.gpt.setPPIDPromise,this.buildVideo(i)),this.workaroundForBFCache()},this.workaroundForBFCache=()=>{const t=e=>{e.persisted&&(this.dispose(),vjsLogger.log("persisted"),window.removeEventListener("pageshow",t),this.execute(document))};window.addEventListener("pageshow",t)},this.findTarget=t=>{const{selector:e,targetType:i}=this.config,s=(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.EW)(t,e,i);if(null!=s)return s},this.applyInsertVideoCss=()=>{(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.TD)(`\n #ats-ad-container * {\n margin: 0;\n }\n #${this.divId} {\n margin: 0 auto;\n }\n \n .ats-insert-video-wrapper {\n position: relative\n }\n \n .ats-insert-video-wrapper * {\n box-shadow: none;\n }\n \n #${this.rssArticleLinkId} {\n background-color: #3892E5;\n color: white;\n display: block;\n padding: 6px 32px 6px 20px;\n position: absolute;\n top: 20px;\n right: 25px;\n text-align: center;\n text-decoration:none;\n visibility: hidden;\n border: 2px solid transparent;\n border-radius: 5px;\n font-size: small;\n z-index: ${DEFAULT_PLAYER_CONTROL_Z_INDEX} !important\n }\n\n #${this.rssArticleLinkId}::after {\n content: ' ';\n position: absolute;\n top: 10px;\n right: 16px;\n display: block;\n width: 3px;\n height: 3px;\n border: solid #FFF;\n border-width: 0 2px 2px 0;\n padding: 2px;\n transform: rotate(-45deg);\n -webkit-transform: rotate(-45deg);\n }\n .${this.wrapperClassName}-anchoring #${this.rssArticleLinkId} {\n padding: 3px 14px 3px 6px;\n top: 5px;\n right: 5px;\n max-width: 125px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .${this.wrapperClassName}-anchoring #${this.rssArticleLinkId}::after {\n top: 6px;\n right: 6px;\n }\n @media only screen and (max-width: 600px) {\n #${this.rssArticleLinkId} {\n padding: 6px 22px 6px 10px;\n top: 10px;\n right: 10px;\n }\n #${this.rssArticleLinkId}::after {\n right: 12px;\n }\n \n .${this.wrapperClassName}-anchoring #${this.rssArticleLinkId} {\n font-size: 11px;\n }\n .${this.wrapperClassName}-anchoring #${this.rssArticleLinkId}::after {\n top: 5px;\n border-width: 0 1px 1px 0;\n width: 3px;\n height: 3px\n }\n }\n \n .${this.wrapperClassName}-anchoring {\n z-index: ${Z_INDEX_MAX_VALUE};\n }\n .${this.wrapperClassName}-non-anchoring {\n z-index: ${Z_INDEX_MAX_VALUE};\n }\n .${this.wrapperClassName}-right {\n position: fixed;\n bottom: 16px;\n right: 16px;\n width: 256px;\n }\n .${this.wrapperClassName}-left {\n position: fixed;\n bottom: 16px;\n left: 16px;\n width: 256px;\n }\n .${this.topStickyClass} {\n z-index: ${Z_INDEX_MAX_VALUE};\n position: fixed;\n top: 0;\n }\n .${this.wrapperClassName} {\n background-color: rgba(57, 127, 195, .1);\n }\n #${this.topStickyCloseButtonId} {\n visibility: hidden;\n position: absolute;\n display: block;\n top: 0px;\n right: -24px;\n width: 24px;\n height: 34px;\n border: 0px !important;\n border-radius: 0 7px 7px 0;\n text-align: center;\n background: #00000066;\n }\n #${this.closeButtonId} {\n visibility: hidden;\n position: absolute;\n right: 0px;\n display: block;\n top: -24px;\n width: 34px;\n height: 24px;\n border: 0px !important;\n border-radius: 7px 7px 0 0;\n text-align: center;\n background: #00000066;\n }\n #${this.closeButtonId}::after, \n #${this.closeButtonId}::before, \n #${this.topStickyCloseButtonId}::after, \n #${this.topStickyCloseButtonId}::before {\n content: "";\n position: absolute;\n top: 50%;\n left: 50%;\n width: 2px;\n height: 15px;\n background: #fff; \n }\n #${this.closeButtonId}::before,\n #${this.topStickyCloseButtonId}::before {\n transform: translate(-50%,-50%) rotate(45deg);\n }\n #${this.closeButtonId}::after,\n #${this.topStickyCloseButtonId}::after {\n transform: translate(-50%,-50%) rotate(-45deg);\n }\n #ats-ad-container {\n position: absolute;\n z-index: ${DEFAULT_PLAYER_AD_CONTAINER_Z_INDEX};\n display: none;\n height: 100%;\n top: 0;\n width: 100%;\n }\n .${this.NON_LINEAR_ADS_CLASS_NAME} {\n top: auto!important;\n bottom: 0;\n margin-bottom: 40px;\n max-height: 100px!important;\n overflow: hidden;\n }\n .${this.NON_LINEAR_ADS_CLASS_NAME} > div, .${this.NON_LINEAR_ADS_CLASS_NAME} > div > iframe {\n max-height: 100px!important;\n }\n #${this.videoStickyWrapperId} .plyr__volume input[type=range] {\n max-width: 60px;\n min-width: 45px;\n }\n #${this.videoStickyWrapperId} .plyr {\n display: none;\n }\n #${this.videoStickyWrapperId}{\n --plyr-color-main: rgba(0,0,0,0.3);\n }\n .plyr--full-ui input[type=range] {\n --plyr-color-main: red;\n }\n div.plyr > button.plyr__control[data-plyr='play'] svg {\n --plyr-control-icon-size: 32px;\n }\n #${this.videoStickyWrapperId} .plyr .plyr__controls {\n padding-top: calc(var(--plyr-control-spacing, 10px)* 1);\n --plyr-control-spacing: 8px;\n }\n .plyr__control svg {\n --plyr-control-icon-size: 14px;\n }\n #${this.videoStickyWrapperId} .plyr__time--current{\n font-family: sans-serif;\n --plyr-font-size-time: 12px;\n }\n .ats-ima-control-play {\n width: 30px;\n height: 10px;\n background-color: red;\n }\n .plyr__control--overlaid, .plyr__control {\n transition: none;\n }\n .ats-ima-control-bar.plyr__controls {\n border-bottom-left-radius: inherit;\n border-bottom-right-radius: inherit;\n bottom: 0;\n color: #fff;\n color: var(--plyr-video-control-color, #fff);\n left: 0;\n position: absolute;\n right: 0;\n transition: opacity .4s ease-in-out, transform .4s ease-in-out;\n z-index: ${DEFAULT_PLAYER_CONTROL_Z_INDEX};\n flex-direction: column;\n display: block;\n }\n #ats_ads_progress_bar {\n position: relative;\n width: 100%;\n height: 4px;\n background-color: rgba(0, 0, 0, 0.5);\n }\n #ats_ads_progress_bar-progress {\n position: relative;\n width: 0%;\n height: 100%;\n background-color: yellow;\n }\n #ads_countdown {\n font-family: sans-serif;\n font-size: 11px;\n padding: 3px 2px;\n min-width: 48px;\n text-align: left;\n }\n #ats-ad-container button[data-plyr='mute']{\n --plyr-control-spacing: 3px;\n padding-left: 10px;\n padding-right: 10px;\n }\n button[data-plyr='play'].ats-ima-control{\n --plyr-control-spacing: 7px;\n padding-left: 8px;\n }\n .plyr__progress .plyr__tooltip{\n font-family: sans-serif;\n }\n .ats-video-playlist {\n position: relative;\n margin: 0px auto;\n }\n .ats-video-playlist-button-left {\n z-index: 1;\n position: absolute;\n top: 100px;\n width: 28px;\n height: 28px;\n left: 6px;\n background-color: white;\n border-radius: 14px;\n border: none;\n }\n .ats-video-playlist-button-left::after {\n content: '';\n position: absolute;\n left:11px;\n top: 50%;\n width: 7px;\n height: 7px;\n border-top: 2px solid #333;\n border-right: 2px solid #333;\n transform: translate(0, -50%) rotate(225deg);\n }\n .ats-video-playlist-button-right {\n z-index: 1;\n position: absolute;\n top: 100px;\n width: 28px;\n height: 28px;\n right: 6px;\n background-color: white;\n border-radius: 14px;\n border: none;\n }\n .ats-video-playlist-button-right::after {\n content: '';\n position: absolute;\n right: 11px;\n top: 50%;\n width: 7px;\n height: 7px;\n border-top: 2px solid #333;\n border-right: 2px solid #333;\n transform: translate(0, -50%) rotate(45deg);\n }\n .ats-video-playlist-container {\n display: flex;\n overflow-y: hidden;\n overflow-x: scroll;\n height: ${"sp"===this.deviceType?this.SP_PLAYLIST_HEIGHT:this.PC_PLAYLIST_HEIGHT}px;\n background-color: black;\n }\n .ats-video-playlist-mask {\n z-index: 1;\n display: none;\n background: rgba(255, 255, 255, 0.8);\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n }\n .ats-playlist-item {\n position: relative;\n height: calc(100% - ${"sp"===this.deviceType?8:16}px);\n padding: 0;\n margin: ${"sp"===this.deviceType?4:8}px;\n }\n .ats-playlist-item:hover:after {\n box-sizing: border-box;\n content: '';\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0px;\n left: 0px;\n background-color: rgba(0, 0, 0, 0.2);\n border: 1px dotted rgba(144,128,64);\n }\n .ats-playlist-item > img {\n height: 100%;\n max-width:260px;\n margin: 0;\n padding: 0;\n }\n .ats-playlist-item > div{\n padding: 0;\n width: 80%;\n position: absolute;\n bottom: 0;\n margin: 0;\n overflow: hidden;\n background-color: rgba(0, 0, 0, 0.4);\n }\n .ats-playlist-item > div > p {\n display: -webkit-box;\n margin: 0;\n font-family: sans-serif;\n line-height: ${"sp"===this.deviceType?12:16}px;\n font-size: ${"sp"===this.deviceType?11:14}px;\n color: white;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n max-height: ${"sp"===this.deviceType?24:32}px;\n }\n .ats-ima-control-container {\n display: flex;\n align-items: center;\n position: absolute;\n top: -24px;\n background-color: rgba(0, 0, 0, 0.9);\n height: 24px;\n }\n #ats-ad-container .plyr__controls__item.plyr__progress__container {\n width: 100%;\n padding-left: 0;\n background: rgba(0, 0, 0, 0.6);\n }\n #ats-insert-video-sticky-wrapper .plyr__controls button.plyr__control, #ats-insert-video-sticky-wrapper .ats-ima-control-bar button.plyr__control {\n opacity: 1;\n transition: none;\n padding: 4px 8px;\n margin: auto;\n height: 24px;\n color: white;\n }\n .plyr .plyr__controls, .plyr__control--overlaid[data-plyr="play"] {\n z-index: ${DEFAULT_PLAYER_CONTROL_Z_INDEX}\n }\n}\n `,`${this.divId}`)},this.onClickAdPlayButton=()=>{this.adsManager&&(this.isAdPaused?(this.isAdPaused=!1,this.adsManager.resume(),this.adPlayButton.classList.add("plyr__control--pressed")):(this.isAdPaused=!0,this.adsManager.pause(),this.adPlayButton.classList.remove("plyr__control--pressed")))},this.buildVideo=async t=>{const{insertPosition:e="afterbegin",scrollEffect:i,adOutputFormat:s="vast",enableVastContinuousAds:n,numberOfRepeatedAds:o,aspectRatio:r="16:9",maxWidth:a,maxHeight:d}=this.config;this.applyInsertVideoCss(),(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.TD)(`#${this.wrapperId} {${this.config.customWrapperCss}}`);const l=document.createElement("video");this.videoTag=l,l.id=this.divId,l.className=this.divClassName,this.videoStickyWrapper=document.createElement("div"),this.videoWrapper=document.createElement("div"),this.videoWrapper.className=this.wrapperClassName,this.videoWrapper.id=this.wrapperId,l.setAttribute("controls","true"),l.setAttribute("playsinline","true"),l.setAttribute("webkit-playsinline","true"),l.setAttribute("preload","auto");const c=document.createElement("div");c.id="ats-ad-container",this.adDisplayContainerElm=c,a&&(this.videoWrapper.style.maxWidth=`${a}px`),d&&(this.videoWrapper.style.maxHeight=`${d}px`),this.videoWrapper.style.margin="0 auto",this.closeButton.id=this.closeButtonId,3===i&&this.videoStickyWrapper.appendChild(this.closeButton),this.videoStickyWrapper.appendChild(l),this.videoStickyWrapper.appendChild(c),this.videoWrapper.appendChild(this.videoStickyWrapper),t.insertAdjacentElement(e,this.videoWrapper),this.createImaControls(),this.adPlayButton=document.querySelector("button[data-plyr='play'].ats-ima-control"),this.adPlayButton?.addEventListener("click",this.onClickAdPlayButton),this.prebid.adUnitsCodeDict[this.divId]?await this.prebid.onFirstPrebidResponseEnded&&this.prebidAdUnits&&this.prebidAdUnit&&this.invokeVideoPlayer(this.prebid.buildVideoUrl(this.prebidAdUnit,this.createVastParams(this.prebidAdUnits.adUnitPath,s,n,o)),this.divId):this.invokeVideoPlayer(this.config.adUnitPath?this.gpt.getVastUrl(this.createVastParams(this.config.adUnitPath,s,n,o,this.createAdSizes(r))):"",this.divId)},this.createAdSizes=t=>{let e=defaultSizes169;switch(t){case"9:16":e=defaultSizes916;break;case"4:3":e=defaultSizes43;break;case"3:4":e=defaultSizes34;break;case"1:1":e=defaultSizes11}return e},this.createVastParams=(t,e,i,s,n)=>{const o={iu:t,plcmt:"2",description_url:location.href,gdfp_req:"1",output:e,unviewed_position_start:"1",env:"vp",impl:"s",vid_d:"vmap"===e&&this.videoLength>0?this.videoLength.toString():"",..."vmap"===e?{ad_rule:"1"}:i?{ad_rule:"0",pmad:s?s.toString():"5",pmnd:"0",pmxd:"180000"}:{ad_rule:"0"},...this.gpt.ppid?{ppid:this.gpt.ppid}:{}};n&&(o.sz=n);const r=this.getCustomVastParam();return Object.assign(o,r),o},this.getCustomVastParam=()=>{const{customVastParams}=this.config;return customVastParams.reduce(((current,value)=>{let valueConfig;try{valueConfig=eval(value.value)+""}catch(t){vjsLogger.error("error in eval: ",value.value)}return current[value.key]=valueConfig,current}),{})},this.createPlaylist=(t,e)=>{t.length<5&&vjsLogger.error("not enough playlist items, should be 5 or more");const i=document.createElement("div"),s=document.createElement("div"),n=document.createElement("div");if(i.classList.add("ats-video-playlist"),i.style.width=this.originVideoWidth+"px",s.classList.add("ats-video-playlist-container"),n.classList.add("ats-video-playlist-mask"),this.playlistMask=n,t.forEach((t=>{const i=document.createElement("div"),n=document.createElement("img"),o=document.createElement("div"),r=document.createElement("p");i.classList.add("ats-playlist-item"),r.textContent=t.title,n.src=t.thumbnail,o.appendChild(r),i.appendChild(n),i.appendChild(o),this.registerPlayListItemClickEvent(i,t,e),s.appendChild(i)})),i.appendChild(s),i.appendChild(n),this.numOfPlaylists=t.length,"pc"===this.deviceType){const t=document.createElement("button"),e=document.createElement("button");t.classList.add("ats-video-playlist-button-left"),e.classList.add("ats-video-playlist-button-right"),s.appendChild(t),s.appendChild(e),t.addEventListener("click",this.onClickLeftPlaylist),e.addEventListener("click",this.onClickRightPlaylist)}return i},this.disablePlaylist=()=>{this.playlistMask&&(this.playlistMask.style.display="block")},this.enablePlaylist=()=>{this.playlistMask&&(this.playlistMask.style.display="")},this.onClickLeftPlaylist=()=>{const t=document.querySelector(".ats-video-playlist-container");t&&(t.scrollLeft=t.scrollLeft-t.scrollWidth/this.numOfPlaylists)},this.onClickRightPlaylist=()=>{const t=document.querySelector(".ats-video-playlist-container");t&&(t.scrollLeft=t.scrollLeft+t.scrollWidth/this.numOfPlaylists)},this.registerPlayListItemClickEvent=(t,e,i)=>{t.addEventListener("click",this.onClickPlaylist(e,i))},this.onClickPlaylist=(t,e)=>()=>{const{videoSource:i}=this.config;this.resetAdObj(),this.loadVideo(t.hls),this.changePoster(t.thumbnail),this.initIMA(e),3!==i&&4!==i||!t.articles||(this.rssArticleLinks=t.articles.map((t=>t.link)),this.rssArticleLink&&(this.rssArticleLink.text=t.buttonText||this.DEFAULT_RSS_LINK_BUT_TEXT)),this.player.play()},this.loadVideo=t=>{this.hls.loadSource(t),this.hls.attachMedia(this.videoTag)},this.resetAdObj=()=>{this.hideAdDisplayContainer(),this.hideImaControlBar(),this.adDisplayContainerInitialized=!1,this.adsManager&&this.adsManager.destroy(),this.adsLoader&&this.adsLoader.destroy(),this.adDisplayContainer&&this.adDisplayContainer.destroy(),this.adsRequest=null,this.allAdsCompleted=!1,this.isAdPlaying=!1,clearInterval(this.intervalTimer),clearInterval(this.countdownTimer),clearTimeout(this.refreshTimer),this.isAdPaused=!1,this.contentEnded=!1},this.changePoster=t=>{this.player.poster=t},this.refreshAds=async(t,e)=>{e===this.videoLoadingCount&&(await this.waitUntilHasFocus(),this.player&&!this.isAdPlaying&&(this.adsManager&&this.adsManager.destroy(),this.adsLoader&&this.adsLoader.contentComplete(),this.adDisplayContainer.initialize(),vjsLogger.log("try to refresh ads"),this.imaRequestAds(t)))},this.waitUntilHasFocus=()=>new Promise((t=>{document.hasFocus()&&t(!0),this.hasFocusTimer=setInterval((()=>{document.hasFocus()&&(clearInterval(this.hasFocusTimer),t(!0))}),100)})),this.waitUntilFP=()=>!!this.isFirstPlay||new Promise((t=>{const e=setInterval((()=>{this.isFirstPlay&&(t(!0),clearInterval(e))}),50)})),this.createImaControls=()=>{this.adDisplayContainerElm.insertAdjacentHTML("afterbegin",'\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
'),this.countdownDiv=document.querySelector("#ads_countdown"),this.progressDiv=document.querySelector("#ats_ads_progress_bar-progress"),this.imaControlBar=document.querySelector(".ats-ima-control-bar")},this.hideImaControlBar=()=>{this.imaControlBar.style.visibility="hidden"},this.showImaControlBar=()=>{this.imaControlBar.style.visibility="visible"},this.waitUntilInView=()=>new Promise((t=>{(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.TG)(this.videoStickyWrapper)&&t(!0);let e=!1;const i=()=>{e||(window.requestAnimationFrame((()=>{(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.TG)(this.videoStickyWrapper)&&(document.removeEventListener("scroll",i),t(!0)),e=!1})),e=!0)};this.scrollCallbacks.push(i),document.addEventListener("scroll",i)})),this.onAdsErrorCallback=async t=>{const e=t.getError().data.errorCode;vjsLogger.error(`${this.divId}: error code: ${e}`,t.getError().data);const i=this.videoLoadingCount;await this.multiCallAds(i)},this.multiCallAds=async t=>{if(vjsLogger.log("multi call ads"),this.autoAdUnitPaths[this.counter_retry-1]&&this.counter_retry<=this.MAX_RETRY){let e;e=this.prebidAdUnits&&this.prebidAdUnit&&await this.prebid.onFirstPrebidResponseEnded?this.prebid.buildVideoUrl(this.prebidAdUnit,this.createVastParams(this.autoAdUnitPaths[this.counter_retry-1]||"",this.config.adOutputFormat,this.config.enableVastContinuousAds,this.config.numberOfRepeatedAds)):this.gpt.getVastUrl(this.createVastParams(this.autoAdUnitPaths[this.counter_retry-1]||"",this.config.adOutputFormat,this.config.enableVastContinuousAds,this.config.numberOfRepeatedAds,this.createAdSizes(this.config.aspectRatio))),await this.refreshAds(e,t),vjsLogger.log("retry count",this.counter_retry),this.counter_retry++}else{this.counter_retry=1,vjsLogger.log("all retry is fail, call ads after some seconds");const t=this.videoLoadingCount;this.refreshTimer=setTimeout((()=>{this.refreshAds(this.config.adUnitPath?this.gpt.getVastUrl(this.createVastParams(this.config.adUnitPath,this.config.adOutputFormat,this.config.enableVastContinuousAds,this.config.numberOfRepeatedAds,this.createAdSizes(this.config.aspectRatio))):"",t)}),this.REFRESH_INTERVAL)}},this.initIMA=t=>{const e=window.google;e.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.createAdDisplayContainer();const i=new e.ima.AdsLoader(this.adDisplayContainer);this.adsLoader=i,i.addEventListener(e.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.onAdsManagerLoaded,!1),i.addEventListener(e.ima.AdErrorEvent.Type.AD_ERROR,this.onAdsErrorCallback,!1),this.imaRequestAds(t)},this.contentEndedListener=()=>{this.contentEnded=!0,this.adsLoader.contentComplete()},this.shouldMutePlayer=()=>!this.config.sound||1===this.config.playerMode&&("sp"==this.deviceType||(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.Sw)()),this.imaRequestAds=t=>{const e=new window.google.ima.AdsRequest;this.adsRequest=e,e.adTagUrl=this.testAdTagUrl?this.testAdTagUrl:t,e.linearAdSlotWidth=this.originVideoWidth,e.linearAdSlotHeight=this.originVideoHeight,e.nonLinearAdSlotWidth=this.originVideoWidth,e.nonLinearAdSlotHeight=this.originVideoHeight/3,this.shouldMutePlayer()?e.setAdWillPlayMuted(!0):e.setAdWillPlayMuted(!1),vjsLogger.log("request ads"),this.adsLoader.requestAds(e)},this.createAdDisplayContainer=()=>{this.adDisplayContainer=new window.google.ima.AdDisplayContainer(this.adDisplayContainerElm,this.videoTag)},this.initializeAdDisplayContainer=()=>{this.adDisplayContainer&&(this.adDisplayContainerInitialized||(this.adDisplayContainer.initialize(),this.adDisplayContainerInitialized=!0))},this.showAdDisplayContainer=()=>{this.initAdUIElement(),this.adDisplayContainerElm.style.display="block"},this.hideAdDisplayContainer=()=>{this.initAdUIElement(),this.adDisplayContainerElm.style.display="none"},this.initAdUIElement=()=>{this.progressDiv.style.width="0%",this.countdownDiv.innerHTML=""},this.onAdsManagerLoaded=(t,e)=>{vjsLogger.log("ads manager loaded");const i=window.google,s=new i.ima.AdsRenderingSettings;s.restoreCustomPlaybackStateOnAdBreakComplete=!0;const n=t.getAdsManager(this.videoTag,s);this.adsManager=n,this.resizeObserver=new ResizeObserver((t=>{this.adsManager.resize(this.videoTag.clientWidth,this.videoTag.clientHeight,i.ima.ViewMode.NORMAL)})),this.resizeObserver.observe(this.videoTag);const o=[i.ima.AdEvent.Type.STARTED,i.ima.AdErrorEvent.Type.AD_ERROR,i.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,i.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,i.ima.AdEvent.Type.ALL_ADS_COMPLETED,i.ima.AdEvent.Type.LOADED,i.ima.AdEvent.Type.COMPLETE,i.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,i.ima.AdEvent.Type.SKIPPED,i.ima.AdEvent.Type.USER_CLOSE,i.ima.AdEvent.Type.LOG,i.ima.AdEvent.Type.AD_BREAK_READY];for(const t of o)n.addEventListener(t,this.onAdEvent(e));this.playAdBreaks()},this.onAdMuteClick=()=>{this.adMuteButton.classList.contains("plyr__control--pressed")?(this.adMuteButton.classList.add("plyr__control--not-pressed"),this.adMuteButton.classList.remove("plyr__control--pressed"),this.adsManager.setVolume(1)):(this.adMuteButton.classList.add("plyr__control--pressed"),this.adMuteButton.classList.remove("plyr__control--not-pressed"),this.adsManager.setVolume(0))},this.trackLinearAd=()=>{const t=this.currentAd.getDuration()>=0?this.currentAd.getDuration():0,e=this.adsManager.getRemainingTime()>0?this.adsManager.getRemainingTime():t;let i=t-e;i=i>=0?i:0;let s,n=0;this.currentAd.getAdPodInfo()&&(s=this.currentAd.getAdPodInfo().getAdPosition(),n=this.currentAd.getAdPodInfo().getTotalAds()),this.updateAdUi(i,e,t,s,n)},this.updateAdUi=(t,e,i,s,n)=>{const o=Math.floor(e/60),r=Math.floor(e%60);let a="";r.toString().length<2?a="0"+r:a+=r;let d=": ";n>1&&(d=" ("+s+"/"+n+") "),this.countdownDiv.innerHTML="Ad"+d+o+":"+a;let l=0;i>0&&(l=t/i);const c=100*l;this.progressDiv.style.width=c+"%"},this.initAdsManager=()=>{this.adsManager.init(this.videoTag.clientWidth,this.videoTag.clientHeight,window.google.ima.ViewMode.NORMAL),this.initializeAdDisplayContainer()},this.playAdBreaks=async()=>{this.userStopAnchor||await this.waitUntilInView(),await this.waitUntilFP(),this.initAdsManager(),this.showAdDisplayContainer(),this.hideImaControlBar();try{vjsLogger.log("play ads"),this.adsManager.start()}catch(t){vjsLogger.log(t),this.player.play()}},this.invokeVideoPlayer=async(t,e)=>{const{aspectRatio:i,scrollEffect:s,youtubeChannelFeedUrl:n,videoSource:o,selectedYoutubeVideos:r,rssFeedJsonUrl:a,rssFeeds:d=[],enablePlaylist:l=!1}=this.config;let c="";if(1===o&&n){if(r.length>0?this.videoFeedEntry=await _VideoManager__WEBPACK_IMPORTED_MODULE_2__.f.chooseVideoRandomlyFromSelected(e,n):this.videoFeedEntry=await _VideoManager__WEBPACK_IMPORTED_MODULE_2__.f.chooseLatestPublishedYTVideoEntry(n),this.videoFeed=await _VideoManager__WEBPACK_IMPORTED_MODULE_2__.f.ytFeedJson[n],!this.videoFeedEntry)return this.videoWrapper.style.display="none",void vjsLogger.error("iv: fail to download video");this.videoLength=this.videoFeedEntry.video_length||0,c=this.useMP4?this.videoFeedEntry.mp4.low:this.videoFeedEntry.hls.manifest,this.poster=this.videoFeedEntry.thumbnail}else if(2===o){const t=_VideoManager__WEBPACK_IMPORTED_MODULE_2__.f.chooseAMVideoEntry(this.divId);c=this.useMP4?t.mp4.low:t.hls.manifest,this.poster=_VideoManager__WEBPACK_IMPORTED_MODULE_2__.f.chooseAMVideoEntry(this.divId).thumbnail,this.videoFeed=_VideoManager__WEBPACK_IMPORTED_MODULE_2__.f.amFeedJson[this.divId]}else if((3===o||4===o)&&a&&d.length>0){const t=d.map((t=>t.rssFeedUrl)),e=await _VideoManager__WEBPACK_IMPORTED_MODULE_2__.f.chooseRssFeedVideoEntry(a,t);if(this.videoFeed=await _VideoManager__WEBPACK_IMPORTED_MODULE_2__.f.rssFeedJson[a],!e)return this.videoWrapper.style.display="none",void vjsLogger.error("iv: fail to download video");c=this.useMP4?e.entry.mp4.low:e.entry.hls.manifest,this.convertedRssFeeds=d.reduce(((t,e)=>(t[e.rssFeedUrl]=e,t)),{}),this.poster=this.convertedRssFeeds[e.id].rssFeedThumbnail,this.rssFeedArticles=e.entry.articles,this.videoLength=this.RSS_VIDEO_LENGTH}if(this.videoLength>0&&"vmap"===this.config.adOutputFormat){const e=new URL(t);e.searchParams.get("vid_d")||(e.searchParams.set("vid_d",this.videoLength.toString()),t=e.toString())}this.useMP4?this.videoTag.src=c:(this.hls=new window.atsHls(this.hlsConfig),this.hls.loadSource(c),this.hls.attachMedia(this.videoTag));const h={controls:["play-large","play","progress","current-time","mute","volume"],ratio:i};this.videoTag.setAttribute("data-poster",this.poster);const p=new window.atsPlyr(`#${e}`,h);this.player=p,this.initIMA(t),this.shouldMutePlayer()?(vjsLogger.log("mute video sound"),p.volume=0,p.muted=!0):p.volume=1;const{height:_,width:g}=this.videoWrapper.getBoundingClientRect();if(this.videoWrapper.style.height=_+"px",this.videoWrapper.style.width=g+"px",this.videoStickyWrapper.style.width=g+"px",this.originVideoWidth=g,this.originVideoHeight=_,l){const e=[];if(1===o){const t=this.videoFeed.videos;let i=Object.keys(t);if(r.length>0){const t=r.map((t=>t.video_id));i=t.filter((t=>i.some((e=>e===t))))}i.forEach((i=>{e.push({thumbnail:t[i].thumbnail,title:t[i].title,hls:t[i].hls.manifest,mp4:t[i].mp4.low})}))}else if(3===o||4===o){let t=[];this.config.rssFeeds&&this.config.rssFeeds.length>0&&(t=this.config.rssFeeds.map((t=>t.rssFeedUrl)));const i=this.videoFeed.videos;Object.keys(i).forEach((s=>{t.some((t=>t===s))&&e.push({thumbnail:i[s].articles[0].bg,title:i[s].articles[0].title,hls:i[s].hls.manifest,mp4:i[s].mp4.low,articles:i[s].articles,buttonText:this.convertedRssFeeds[s].rssFeedButtonText})}))}else 2===o&&this.videoFeed.forEach((t=>{e.push({thumbnail:t.thumbnail,title:t.title,hls:t.hls.manifest,mp4:t.mp4.low})}));this.playlist=this.createPlaylist(e,t),this.playlist&&this.videoWrapper.insertAdjacentElement("afterend",this.playlist)}this.videoStickyWrapper.id=this.videoStickyWrapperId,p.on("ready",(()=>{p.elements.container.style.display="block"})),p.on("play",(()=>{this.isPlaying=!0,this.isFirstPlay||(this.isFirstPlay=!0)})),p.on("ended",(async()=>{this.contentEndedListener(),await new Promise((t=>{const e=setInterval((()=>{this.allAdsCompleted&&(clearInterval(e),t(!0))}),300)})),this.dispose(),await this.execute(document)})),this.autoplayInNext&&3===s&&this.autoplay();let u=!1;(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.TG)(this.videoStickyWrapper)&&(this.onceInView=!0);const f=()=>{u||(window.requestAnimationFrame((()=>{(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.TG)(this.videoStickyWrapper)&&(this.onceInView=!0,document.removeEventListener("scroll",f)),u=!1})),u=!0)};if(document.addEventListener("scroll",f),this.scrollCallbacks.push(f),this.rssFeedArticles.length>0&&d.length>0?(this.rssArticleLink=document.createElement("a"),this.rssArticleLink.id=this.rssArticleLinkId,this.rssArticleLink.text=d[0].rssFeedButtonText||this.DEFAULT_RSS_LINK_BUT_TEXT,this.videoStickyWrapper.appendChild(this.rssArticleLink),this.rssArticleLinks=this.rssFeedArticles.map((t=>t.link)),p.on("timeupdate",(()=>{const t=Math.floor(p.currentTime/6),e=this.rssArticleLinks[t];e&&this.rssArticleLink&&(this.rssArticleLink.href=e,this.rssArticleLink.style.visibility="visible")}))):this.rssArticleLink&&(this.rssArticleLink.style.visibility="hidden"),3!==s||this.userStopAnchor||this.enableAdAnchoredPlayback)if(2===s){let t=!1;this.topStickyCallback();const e=()=>{t||(window.requestAnimationFrame((()=>{this.topStickyCallback(),t=!1})),t=!0)};this.scrollCallbacks.push(e),document.addEventListener("scroll",e),this.showTopStickyVideoCloseButton&&(this.topStickyCloseButton.id=this.topStickyCloseButtonId,this.topStickyCloseButton.onclick=()=>{this.videoStickyWrapper.classList.remove(this.topStickyClass)},this.videoStickyWrapper.appendChild(this.topStickyCloseButton))}else 1===s?(this.observer=new IntersectionObserver(this.staticCallback,{root:document,rootMargin:"0px",threshold:1}),this.observer.observe(this.videoWrapper)):3===s&&this.enableAdAnchoredPlayback&&(this.anchorCallback(),this.autoplay());else{let t=!1;this.anchorCallback();const e=()=>{t||(window.requestAnimationFrame((()=>{this.anchorCallback(),t=!1})),t=!0)};document.addEventListener("scroll",e),this.scrollCallbacks.push(e),this.closeButton.addEventListener("click",(()=>{this.userStopAnchor=!0,document.removeEventListener("scroll",e),this.stopElmAnchoring()}))}},this.startElmAnchoring=()=>{this.stickyOrAnchoring||(this.stickyOrAnchoring=!0,this.videoStickyWrapper.classList.remove(`${this.wrapperClassName}-non-anchoring`),this.videoStickyWrapper.classList.add(`${this.wrapperClassName}-anchoring`),this.videoStickyWrapper.classList.add(this.anchoringClass),this.userStopAnchor&&!this.showCloseButton||(this.closeButton.style.visibility="visible"),this.player.elements.inputs.volume&&(this.player.elements.inputs.volume.style.display="none"),this.videoStickyWrapper.style.width="")},this.stopElmAnchoring=()=>{this.stickyOrAnchoring=!1,this.videoStickyWrapper.classList.remove(`${this.wrapperClassName}-anchoring`),this.videoStickyWrapper.classList.remove(this.anchoringClass),this.videoStickyWrapper.classList.add(`${this.wrapperClassName}-non-anchoring`),this.videoStickyWrapper.style.width=this.originVideoWidth+"px",this.player.elements.inputs.volume&&(this.player.elements.inputs.volume.style.display="block"),this.closeButton.style.visibility="hidden"},this.anchorCallback=()=>{const{top:t,height:e}=this.videoWrapper.getBoundingClientRect();e/2+t-window.innerHeight<0&&this.autoplay(),!this.userStopAnchor&&!this.onceInView||(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.TG)(this.videoWrapper)?this.stickyOrAnchoring&&this.stopElmAnchoring():this.startElmAnchoring()},this.topStickyCallback=()=>{const t=this.videoWrapper.getBoundingClientRect().height,e=this.videoWrapper.getBoundingClientRect().top,i=this.videoWrapper.getBoundingClientRect().left;t/2+e-window.innerHeight<0&&this.autoplay(),e<0?this.stickyOrAnchoring||(this.stickyOrAnchoring=!0,this.videoStickyWrapper.classList.add(this.topStickyClass),this.videoStickyWrapper.style.width="",this.videoStickyWrapper.style.left=i+"px",this.videoStickyWrapper.style.width=this.originVideoWidth+"px",this.topStickyCloseButton.style.visibility="visible"):this.stickyOrAnchoring&&(this.stickyOrAnchoring=!1,this.videoStickyWrapper.classList.remove(this.topStickyClass),this.videoStickyWrapper.style.width=this.originVideoWidth+"px",this.topStickyCloseButton.style.visibility="hidden")},this.staticCallback=t=>{t[0].intersectionRatio>.5&&(this.observer?.disconnect(),this.autoplay())},this.autoplay=()=>{this.isAutoPlayed||this.isAdPlaying||1!==this.config.playerMode||this.config.sound&&!_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.Zu||(vjsLogger.log("interacted: ",_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.Zu),this.isAutoPlayed=!0,vjsLogger.log("auto play video"),this.player?.play())},this.play=async()=>{await this.waitUntilInView(),await this.waitUntilFP(),vjsLogger.log("play video"),this.player?.play()},this.dispose=()=>{vjsLogger.log("dispose"),this.scrollCallbacks=this.scrollCallbacks.reduce(((t,e)=>(document.removeEventListener("scroll",e),t)),[]),this.counter_retry=1,this.isAutoPlayed=!1,this.stickyOrAnchoring=!1,this.isPlaying=!1,this.isFirstPlay=!1,this.autoplayInNext=!0,this.showCloseButton=!1,this.hls?.detachMedia(),this.hls=null,this.player&&(this.player.destroy(),this.videoWrapper?.remove(),this.resetAdObj()),this.rssArticleLink&&(this.rssArticleLink.style.visibility="hidden"),this.playlist?.remove()},this.divId=this.config.divIDs[0],this.closeButtonId=`${this.divId}-close-button`,this.closeButton.type="button",this.wrapperId=`${this.divId}-wrapper`;const{sizeMappingGroup,selectedYoutubeVideos,scrollEffect,enableAdAnchoredPlayback,anchorPosition=1,autoAdUnitPaths=[],showTopStickyVideoCloseButton}=this.config;this.autoAdUnitPaths=autoAdUnitPaths,this.prebidAdUnits=this.prebid.adUnitsCodeDict[this.divId],this.prebidAdUnit=this.prebidAdUnits?this.prebidAdUnits.prebidAdUnits.filter((t=>"instream"===t.mediaTypes.video?.context))[0]:void 0;const sizeMapping=sizeMappingGroup.find((t=>(0,_core_utils_util__WEBPACK_IMPORTED_MODULE_0__.hg)(t.deviceSizes)));this.vastSizes=sizeMapping?sizeMapping.sizes[0]:[300,250],2===anchorPosition?this.anchoringClass=`${this.wrapperClassName}-left`:1===anchorPosition&&(this.anchoringClass=`${this.wrapperClassName}-right`),this.enableAdAnchoredPlayback=enableAdAnchoredPlayback&&3==scrollEffect,this.showTopStickyVideoCloseButton=showTopStickyVideoCloseButton,_VideoManager__WEBPACK_IMPORTED_MODULE_2__.f.registerSelectedVideos(selectedYoutubeVideos,this.divId)}get useMP4(){return!window.atsHls.isSupported()}}},463:(t,e,i)=>{i.d(e,{R:()=>a});var s=i(939),n=i(554),o=i(335),r=i(599);class a extends r.x{constructor(t,e,i,r){super(t,e,"ats-interstitial",i,"interstitial"),this.resolve=r,this._execute=()=>{},this._findTarget=()=>[document.body],this._buildSlot=t=>{const e=this.config.divIDs[0];return this.slots[e]={slotWrapper:this.createDiv(`${this.AD_NAME}-root`),slot:document.createElement("div"),divId:e,adUnitPath:this.config.adUnitPath,isGPTRefreshCalled:!1,shouldStopRefresh:!1},this.backdrop=this.createDiv(`${this.AD_NAME}-backdrop`),this.container=this.createDiv(`${this.AD_NAME}-container`),this.paper=this.createDiv(`${this.AD_NAME}-paper`),this.paper.appendChild(this.slots[e].slot),this.container.appendChild(this.paper),this.slots[e].slotWrapper.appendChild(this.backdrop),this.slots[e].slotWrapper.appendChild(this.container),this.slots[e].slotWrapper.appendChild(this.closeButton),this.setCustomStyle(),t.insertAdjacentElement("beforeend",this.slots[e].slotWrapper),e},this._getFetchAdConfig=t=>{const{adUnitPath:e,sizeMappingGroup:i,setCollapseEmptyDiv:s,setTargetingConfigs:n,enableSetForceSafeFrameForSlot:o}=this.config;return{gpt:{slotWrapperDiv:this.slots[t].slotWrapper,instanceCount:this.instanceCount,adUnitPath:e,sizes:[[300,250]],divId:t,sizeMappingGroup:i,setCollapseEmptyDiv:s,setTargetingConfigs:n,enableSetForceSafeFrameForSlot:o,onAfterGptRendered:this._onAfterGptRendered(t),onAfterGptFetched:this._onAfterGptFetched(t),infinite:!1}}},this._onAfterGptFetched=t=>e=>{this.dispose=()=>{try{this.close(e,t)}catch(t){o.vF.error(t)}},this.closeButton.onclick=()=>this.close(e,t)},this._onAfterGptRendered=t=>e=>{try{if(e.isEmpty)throw new Error(e.slot+" isEmpty");const[i,s]=Array.isArray(e.size)?e.size:[0,0];this.show(i,s,t)}catch(t){this.dispose()}},this.setCloseButtonPosition=()=>{let t=`#${this.AD_NAME}-button {\n top: 112px;\n bottom: auto!important;\n right: 56px;\n }`;switch(this.config.closeButtonPosition){case"topleft":t=`#${this.AD_NAME}-button {\n top: 112px;\n bottom: auto!important;\n left: 56px;\n }`;break;case"topright":t=`#${this.AD_NAME}-button {\n top: 112px;\n bottom: auto!important;\n right: 56px;\n }`;break;case"topmiddle":t=`#${this.AD_NAME}-button {\n top: 112px;\n bottom: auto!important;\n left: 50%;\n transform: translateX(-50%);\n padding: 8px 32px;\n }`;break;case"bottomleft":t=`#${this.AD_NAME}-button {\n bottom: 112px;\n top: auto!important;\n left: 56px;\n }`;break;case"bottomright":t=`#${this.AD_NAME}-button {\n bottom: 112px;\n top: auto!important;\n right: 56px;\n }`;break;case"bottommiddle":t=`#${this.AD_NAME}-button {\n bottom: 112px;\n top: auto!important;\n left: 50%;\n transform: translateX(-50%);\n padding: 8px 32px;\n }`}(0,s.TD)(t,`${this.AD_NAME}-override-position`)},this.setCustomStyle=()=>{this.config.useCloseButtonXIcon&&(0,s.TD)(`#${this.AD_NAME}-button::before {content: '×';font-size: inherit;${this.config.closeButtonText?"margin-right: 8px;":""}color: inherit}`,`${this.AD_NAME}-close-button-x-icon`),this.setCloseButtonPosition(),this.config.useCustomCss&&this.config.customCss&&(0,s.TD)(this.config.customCss,`${this.AD_NAME}-override`)},this.createDiv=t=>{const e=document.createElement("div");return e.id=t,e},this.createCloseButton=(t,e)=>{const i=document.createElement("button"),s=document.createTextNode(e);return i.appendChild(s),i.id=t,i},this.show=(t,e,i)=>{this.slots[i].slotWrapper.style.visibility="visible",this.slots[i].slotWrapper.style.opacity="1",this.paper.style.width=`${t}px`,this.paper.style.height=`${e}px`,this.closeButton.style.display="none";const s=this.slots[i].slot.querySelector("iframe");s&&s.addEventListener("load",(()=>{setTimeout((()=>{this.closeButton.style.display="inline-block"}),window.anymindTS_TIME_HIDE_INTERSTITIAL_CLOSE_BUTTON??300)}))},this.close=(t,e)=>{this.slots[e].slotWrapper.style.opacity="0",(0,n._7)((()=>{t&&(googletag.destroySlots([t]),document.body.removeChild(this.slots[e].slotWrapper))}))(),this.resolve&&(o.vF.log("is: close"),this.resolve())},this.dispose=()=>{},this.backdrop=this.createDiv(`${this.AD_NAME}-backdrop`),this.container=this.createDiv(`${this.AD_NAME}-container`),this.paper=this.createDiv(`${this.AD_NAME}-paper`),this.closeButton=this.createCloseButton(`${this.AD_NAME}-button`,this.config.closeButtonText||"")}_init(){}_addStyle(){(0,s.TD)(`\n #${this.AD_NAME}-root {\n visibility: hidden;\n opacity: 0;\n will-change: opacity;\n transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n box-sizing: border-box;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1500;\n position: fixed;\n }\n #${this.AD_NAME}-backdrop {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: -1;\n position: fixed;\n touch-action: none;\n background-color: rgba(0, 0, 0, 0.5);\n -webkit-tap-highlight-color: transparent;\n }\n #${this.AD_NAME}-container {\n height: 100%;\n outline: none;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n #${this.AD_NAME}-paper {\n flex: 0 1 auto;\n max-width: 1000px;\n max-height: calc(100% - 96px);\n margin: 0;\n display: flex;\n position: relative;\n overflow-y: auto;\n flex-direction: column;\n box-shadow: 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12);\n border-radius: 4px;\n background-color: rgba(50, 50, 50, 0.4);\n box-sizing: inherit;\n }\n #${this.AD_NAME}-button {\n position: fixed;\n top: 112px;\n right: 56px;\n color: ${this.config.closeButtonTextColor||"#fff"};\n background-color: ${this.config.closeButtonBackgroundColor||"#000000"};\n padding: 8px 16px;\n font-size: 1rem;\n min-width: 64px;\n box-sizing: border-box;\n min-height: 36px;\n font-weight: ${this.config.closeButtonBoldText?600:500};\n line-height: 1.5;\n border: none;\n border-radius: 8px;\n letter-spacing: 0.02857em;\n white-space: nowrap;\n }\n #${this.AD_NAME}-button:focus {\n outline: none !important;\n }\n`,this.AD_NAME)}}},101:(t,e,i)=>{i.d(e,{h:()=>a});var s,n=i(939),o=i(335),r=i(599);!function(t){t[t.NORMAL=1]="NORMAL",t[t.AMP_LIKE=2]="AMP_LIKE",t[t.ADSENSE_LIKE=3]="ADSENSE_LIKE"}(s||(s={}));class a extends r.x{constructor(t,e,i,n){super(t,e,`ats-overlay-${e.anchorPosition}`,i,"overlay"),this.isOpen=!0,this._execute=(t,e=!1)=>(this.infinite=e,t),this._findTarget=()=>[document.body],this._buildSlot=t=>{const e=this.config.divIDs[0];this.slots[e]={slotWrapper:document.createElement("div"),slot:document.createElement("div"),divId:e,adUnitPath:this.config.adUnitPath,isGPTRefreshCalled:!1,shouldStopRefresh:!1,...this.makeReplaceAdSenseParams()},this.slots[e].slotWrapper.classList.add(`${this.AD_NAME}-wrapper-${this.UNRENDERED}`);const i=document.createElement("div");i.className=`${this.AD_NAME}-padding-block-top`;const n=document.createElement("div");return n.className=`${this.AD_NAME}-padding-block-bottom`,this.slots[e].slotWrapper.appendChild(i),this.config.overlayDesign===s.AMP_LIKE||this.config.overlayDesign===s.ADSENSE_LIKE?(this.config.overlayDesign===s.ADSENSE_LIKE&&(this.slots[e].slotWrapper.style.transition="bottom 1s ease-in-out, top 1s ease-in-out"),"bottom"===this.config.anchorPosition?(n.classList.add(`${this.AD_NAME}-${this.NOT_DISPLAYED}`),this.slots[e].slotWrapper.appendChild(this.closeButton),this.slots[e].slotWrapper.appendChild(this.slots[e].slot),this.slots[e].slotWrapper.appendChild(n)):(i.classList.add(`${this.AD_NAME}-${this.NOT_DISPLAYED}`),this.slots[e].slotWrapper.appendChild(this.slots[e].slot),this.slots[e].slotWrapper.appendChild(n),this.slots[e].slotWrapper.appendChild(this.closeButton))):(n.classList.add(`${this.AD_NAME}-${this.NOT_DISPLAYED}`),i.classList.add(`${this.AD_NAME}-${this.NOT_DISPLAYED}`),this.slots[e].slotWrapper.appendChild(this.slots[e].slot),this.slots[e].slotWrapper.appendChild(n)),t.insertAdjacentElement("afterbegin",this.slots[e].slotWrapper),e},this.deleteOverlay=(t,e)=>()=>{t&&googletag.destroySlots([t]),this.slots[e].shouldStopRefresh=!0,this.slots[e].slotWrapper.remove()},this.handleClickAdSenseLike=t=>()=>{const{anchorPosition:e}=this.config;if(this.isOpen){this.isOpen=!1,this.closeButton.style.backgroundImage="bottom"===this.config.anchorPosition?this.upArrowSvgUrl:this.downArrowSvgUrl,this.slots[t].shouldStopRefresh=!0;const i=this.slots[t].slotWrapper.getBoundingClientRect().height;"bottom"===e?this.slots[t].slotWrapper.style.bottom=`-${i}px`:this.slots[t].slotWrapper.style.top=`-${i}px`}else this.isOpen=!0,this.closeButton.style.backgroundImage="bottom"===this.config.anchorPosition?this.downArrowSvgUrl:this.upArrowSvgUrl,this.slots[t].shouldStopRefresh=!1,"bottom"===e?this.slots[t].slotWrapper.style.bottom="0px":this.slots[t].slotWrapper.style.top="0px"},this._getFetchAdConfig=t=>{const{adUnitPath:e,sizeMappingGroup:i,setCollapseEmptyDiv:s,setTargetingConfigs:n,enableSetForceSafeFrameForSlot:o}=this.config;return{gpt:{slotWrapperDiv:this.slots[t].slotWrapper,instanceCount:this.instanceCount,adUnitPath:e,sizes:[[300,250]],divId:t,enableSetForceSafeFrameForSlot:o,sizeMappingGroup:i,setCollapseEmptyDiv:s,setTargetingConfigs:n,onAfterGptRendered:this._onAfterGptRendered(t),onAfterGptFetched:this._onAfterGptFetched(t),infinite:this.infinite}}},this._onAfterGptFetched=t=>e=>{const{overlayDesign:i}=this.config;i===s.AMP_LIKE?this.closeButton.onclick=this.deleteOverlay(e,t):i===s.ADSENSE_LIKE&&(this.closeButton.onclick=this.handleClickAdSenseLike(t)),this.dispose=()=>{try{this.deleteOverlay(e,t)(),o.vF.log("o: dispose")}catch(t){o.vF.error(t)}}},this._onAfterGptRendered=t=>e=>{const i=this.slots[t];if(this.config.refreshInterval>0&&!1===i.isGPTRefreshCalled&&this.gpt.intervalRefreshAds([e.slot],this.config.refreshInterval,this.config.refreshLimit,t,this.slots,0,this.config.setTargetingConfigs),!e.size)return i.slotWrapper.classList.remove(`${this.AD_NAME}-wrapper-${this.RENDERED}`),void i.slotWrapper.classList.add(`${this.AD_NAME}-wrapper-${this.UNRENDERED}`);i.slotWrapper.classList.add(`${this.AD_NAME}-wrapper-${this.RENDERED}`),i.slotWrapper.classList.remove(`${this.AD_NAME}-wrapper-${this.UNRENDERED}`),i.eventSize=Array.isArray(e.size)?[e.size[0],e.size[1]]:[0,0];const s=e.size.join("x");"0x0"!==s&&"1x1"!==s&&(i.slot.style.width=e.size[0]+"px",i.slot.style.height=e.size[1]+"px")},this.dispose=()=>{o.vF.log("o: dispose. (Not overwritten yet)")},n.createAdObserver(this.config,this),this.closeButton=document.createElement("button"),this.closeButton.classList.add(`${this.AD_NAME}-close-button`)}_init(){this.initialArrowDown="bottom"===this.config.anchorPosition,this.upArrowSvgUrl="url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='21' height='12' viewBox='0 0 21 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.646454 11.6465L10.6465 1.64645L20.6465 11.6465' stroke='black' stroke-opacity='0.8'/%3E%3C/svg%3E%0A\")",this.downArrowSvgUrl="url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='22' height='12' viewBox='0 0 22 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 1L11 11L1 1' stroke='black' stroke-opacity='0.8'/%3E%3C/svg%3E%0A\")",this.ampLikeSvg="url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='13' height='13' viewBox='341 8 13 13' fill='black' fill-opacity='0.6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M354 9.31L352.69 8l-5.19 5.19L342.31 8 341 9.31l5.19 5.19-5.19 5.19 1.31 1.31 5.19-5.19 5.19 5.19 1.31-1.31-5.19-5.19z' fill-rule='evenodd'/%3E%3C/svg%3E\")"}_addStyle(){const t=`\n display: block !important;\n height: auto !important;\n visibility: visible;\n opacity: 1;\n will-change: opacity;\n width: 100%;\n position: fixed;\n left: 0;\n right: 0;\n ${this.config.anchorPosition}: 0;\n box-sizing: border-box;\n z-index: 2147483647;\n box-shadow: ${"bottom"===this.config.anchorPosition?"rgba(0, 0, 0, 0.4) 0px -4px 6px -3px":"rgba(0, 0, 0, 0.4) -2px 2px 6px -3px"};\n background: ${this.config.overlayDesign===s.NORMAL?this.config.backgroundCss||"rgba(0,0,0,0.8)":"#fff"};\n `;let e="";this.config.overlayDesign===s.AMP_LIKE?e=`\n display: block !important;\n background-image: ${this.ampLikeSvg};\n background-size: 13px 13px;\n background-position: center;\n background-color: #fff;\n background-repeat: no-repeat;\n border: none;\n height: 28px;\n width: 28px;\n padding: 0;\n margin: 0;\n position: absolute;\n right: 0;\n `+("top"===this.config.anchorPosition?"\n bottom: -27px;\n box-shadow: -1px 1px 1px 0 rgba(0,0,0,0.1);\n border-radius: 0 0 0 12px;\n ":"\n top: -27px;\n box-shadow: 0 -1px 1px 0 rgba(0,0,0,0.2);\n border-radius: 12px 0 0 0;\n "):this.config.overlayDesign===s.ADSENSE_LIKE&&(e=`\n display: block !important;\n background-image: ${this.initialArrowDown?this.downArrowSvgUrl:this.upArrowSvgUrl};\n background-size: 16px 16px;\n background-position: center;\n background-color: #fff;\n background-repeat: no-repeat;\n border: none;\n height: 28px;\n width: 56px;\n padding: 0;\n margin: 0;\n position: absolute;\n right: 0;\n `+("top"===this.config.anchorPosition?"\n bottom: -27px;\n box-shadow: -1px 1px 1px 0 rgba(0,0,0,0.1);\n border-radius: 0 0 6px 6px;\n ":"\n top: -27px;\n box-shadow: 0 -1px 1px 0 rgba(0,0,0,0.2);\n border-radius: 6px 6px 0 0;\n "));const i='\n position: absolute;\n content: "";\n '+("top"===this.config.anchorPosition?"\n top: 0px;\n right: 0;\n left: -20px;\n bottom: -20px;\n ":"\n top: -20px;\n right: 0;\n left: -20px;\n bottom: 0;\n ");(0,n.TD)(`\n .${this.AD_NAME}-wrapper-${this.UNRENDERED} {\n height: 1px;\n visibility: hidden;\n opacity: 0;\n will-change: opacity;\n transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n box-sizing: border-box;\n }\n \n .${this.AD_NAME}-wrapper-${this.RENDERED} {\n ${t}\n }\n \n \n .${this.AD_NAME}-wrapper-${this.RENDERED} > div,\n .${this.AD_NAME}-wrapper-${this.RENDERED} > div > div,\n .${this.AD_NAME}-wrapper-${this.RENDERED} > div > div > iframe {\n margin: 0 auto;\n text-align: center;\n }\n \n .${this.AD_NAME}-close-button::before {\n ${i}\n }\n \n .${this.AD_NAME}-close-button {\n ${e}\n }\n \n .${this.AD_NAME}-close-button:focus {\n outline: none;\n }\n \n .${this.AD_NAME}-padding-block-top {\n height: 4px;\n }\n \n .${this.AD_NAME}-padding-block-bottom {\n height: 4px;\n }\n \n .${this.AD_NAME}-${this.NOT_DISPLAYED} {\n display: none;\n }\n \n .${this.AD_NAME}-wrapper-${this.RENDERED} {\n ${this.config.customCss||""}\n }\n `,this.AD_NAME)}}},862:(t,e,i)=>{i.d(e,{k:()=>r});var s=i(939),n=i(599),o=i(335);class r extends n.x{constructor(t,e,i,n){super(t,e,"ats-parallax",i,"parallax"),this.executeCount=0,this._execute=(t,e=!1)=>(this.infinite=e,this.executeCount++,t),this._findTarget=t=>{const{selector:e,targetType:i}=this.config,n=(0,s.EW)(t,e,i);return null==n?null:[n]},this._buildSlot=(t,e)=>{const{divIDs:i,insertPosition:s,centerAd:n,headerText:o,footerText:r}=this.config,a=i[0]+this.executeCountSuffix(),d=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div"),h=document.createElement("div"),p=document.createElement("div"),_=document.createElement("div"),g=document.createElement("div"),u=document.createElement("div");if(d.append(l),l.append(c),l.append(p),l.append(h),p.append(_),_.append(g),g.append(u),d.classList.add(`${this.AD_NAME}-container`),l.classList.add(`${this.AD_NAME}-clipper`),c.classList.add(`${this.AD_NAME}-header`),h.classList.add(`${this.AD_NAME}-footer`),p.classList.add(`${this.AD_NAME}-position-relative`),n?(g.classList.add(`${this.AD_NAME}-ad-wrapper-center`),_.classList.add(`${this.AD_NAME}-content-center`)):(g.classList.add(`${this.AD_NAME}-ad-wrapper`),_.classList.add(`${this.AD_NAME}-content`)),o){const t=document.createTextNode(o);c.appendChild(t)}else c.classList.add(`${this.AD_NAME}-${this.NOT_DISPLAYED}`);if(r){const t=document.createTextNode(r);h.appendChild(t)}else h.classList.add(`${this.AD_NAME}-${this.NOT_DISPLAYED}`);return d.classList.add(`${this.AD_NAME}-${this.NOT_DISPLAYED}`),t.insertAdjacentElement(s,d),this.slots[a]={baseElement:e,slotWrapper:d,adUnitPath:this.config.adUnitPath,divId:a,slot:u,isGPTRefreshCalled:!1,shouldStopRefresh:!1,...this.makeReplaceAdSenseParams()},a},this._getFetchAdConfig=(t,e,i)=>{const{setCollapseEmptyDiv:s,sizeMappingGroup:n,setTargetingConfigs:o,enableSetForceSafeFrameForSlot:r}=this.config,a=this.slots[t];return{gpt:{slotWrapperDiv:a.slotWrapper,instanceCount:this.instanceCount,adUnitPath:a.adUnitPath,sizes:[[300,250]],divId:a.divId,setCollapseEmptyDiv:s,sizeMappingGroup:n,setTargetingConfigs:o,enableSetForceSafeFrameForSlot:r,onAfterGptRendered:this._onAfterGptRendered(t),onAfterGptFetched:this._onAfterGptFetched(t),infinite:i}}},this._onAfterGptFetched=t=>e=>{const i=this.slots[t];i.googletagSlot=e,i.dispose=()=>{i.shouldStopRefresh=!0,googletag.destroySlots([e]),i.slotWrapper.remove()}},this._onAfterGptRendered=t=>e=>{const{refreshInterval:i,refreshLimit:s,inViewRate:n,setTargetingConfigs:o}=this.config,r=this.slots[t];i>0&&!1===r.isGPTRefreshCalled&&this.gpt.intervalRefreshAds([e.slot],i,s,t,this.slots,n,o),e.slot===r.googletagSlot&&(e.isEmpty||(r.eventSize=Array.isArray(e.size)?[e.size[0],e.size[1]]:[0,0],r.slotWrapper.classList.remove(`${this.AD_NAME}-${this.NOT_DISPLAYED}`)))},this.dispose=()=>{try{o.vF.log("p: dispose");for(const t in this.slots){const e=this.slots[t];e.removeScrollEventListener&&e.removeScrollEventListener(),e.dispose&&e.dispose(),delete this.slots[t]}}catch(t){o.vF.error(t)}},n.createAdObserver(this.config,this)}_init(){}_addStyle(){const{marginTop:t,centerAd:e,containerMargin:i,containerHeight:n,containerWidthType:o,contentWidth:r,backgroundColor:a,customCss:d}=this.config,l=e?"100%":r,c=i||"0",h=e?0:t,p=n>360?n:361;(0,s.TD)(`\n .${this.AD_NAME}-container {\n width: 100${o};\n height: 100vh;\n max-height: ${p}px;\n min-height: 350px;\n position: relative;\n margin: ${c};\n }\n\n .${this.AD_NAME}-clipper {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n overflow: hidden;\n clip-path: inset(0px);\n clip: rect(0px auto auto 0px);\n background: ${a||"#ccc"}\n }\n\n .${this.AD_NAME}-header {\n position: absolute;\n z-index: 1;\n top: 0px;\n font-size: 12px;\n text-align: center;\n width: 100%;\n line-height: normal;\n padding: 4px 0px;\n background-color: #000;\n color: #fff;\n letter-spacing: 3px;\n font-family: Arial;\n }\n\n .${this.AD_NAME}-footer {\n position: absolute;\n z-index: 1;\n bottom: 0px;\n font-size: 9pt;\n text-align: center;\n width: 100%;\n line-height: normal;\n padding: 4px 0px;\n background-color: #000;\n color: #fff;\n letter-spacing: 3px;\n font-family: Arial;\n }\n\n .${this.AD_NAME}-position-relative {\n height: 100%;\n position: relative;\n width: 100%;\n margin: 0 auto;\n text-align: center;\n z-index: -1;\n }\n\n .${this.AD_NAME}-content {\n position: fixed;\n margin-top: ${h}px;\n top: 0;\n width: ${l};\n z-index: -1;\n }\n \n .${this.AD_NAME}-content-center {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100vh;\n margin: 0;\n padding: 0px;\n bottom: 0;\n transform: translateZ(0px);\n z-index: -1;\n }\n\n .${this.AD_NAME}-ad-wrapper {\n text-align: center;\n z-index: -1;\n }\n \n .${this.AD_NAME}-ad-wrapper-center {\n width: 100%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateY(-50%) translateX(-50%);\n -webkit-transform: translateY(-50%) translateX(-50%);\n }\n \n .${this.AD_NAME}-${this.NOT_DISPLAYED} {\n display: none;\n }\n`,`${this.AD_NAME}`),d&&(0,s.TD)(d,`${this.AD_NAME}-override`)}executeCountSuffix(){return this.infinite?"_"+this.executeCount.toString():""}}},67:(t,e,i)=>{i.d(e,{N:()=>r});var s=i(456),n=i(939),o=i(335);class r extends s.W{constructor(t,e,i,s){super(t,e,i,s),this.waitUntilInView=(t,e,i)=>new Promise((s=>{const o=(0,n.EW)(t,e,i);o&&(this.checkInViewTimer=setInterval((()=>{(0,n.TG)(o)&&(clearInterval(this.checkInViewTimer),s(!0))}),200))})),this.sleep=t=>new Promise((e=>setTimeout((()=>{e(!0)}),1e3*t))),this.lazyExecute=async(t,e,i)=>{const{selector:s,targetType:n}=this.config;await this.waitUntilInView(e,s,n),o.vF.log(`replace: wait ${t} second to replace with ${this.config.adUnitPath}`),await this.sleep(t),await this.execute(e,i)},this._findTarget=t=>{const{selector:e,targetType:i}=this.config,s=(0,n.EW)(t,e,i);return null==s?null:(o.vF.log("Replace target",s),[s])},this._buildSlot=(t,e)=>{const{showAdvertisement:i,customShowAdsText:s,divIDs:n}=this.config;if(this.currentNumOfAds++,this.currentNumOfAds>this.config.numOfAds)return null;const o=n[this.currentNumOfAds-1]+(this.infinite?`-${this.executeCallCount}`:""),r=document.createElement("div"),a=document.createElement("p"),d=document.createTextNode(s||this.ADVERTISEMENT_TEXT);a.appendChild(d);const l=document.createElement("div");l.classList.add("ats-slot"),r.appendChild(a),r.appendChild(l);const c=document.createElement("div"),h=`${o}-wrapper`;return c.id=h,c.classList.add(this.AD_NAME,this.CLASS_NAME),i&&c.classList.add(this.SHOW_ADVERTISEMENT),c.appendChild(r),t.insertAdjacentElement("beforebegin",c),t.remove(),this.slots[o]={baseElement:e,adUnitPath:this.config.adUnitPath,divId:o,slotWrapper:c,slot:l,isGPTRefreshCalled:!1,shouldStopRefresh:!1,...this.makeReplaceAdSenseParams()},o}}}},284:(t,e,i)=>{i.d(e,{G:()=>r});var s=i(939),n=i(335),o=i(599);class r extends o.x{constructor(t,e,i,o){super(t,e,"ats-skyscraper",i,"skyscraper"),this.executeCount=0,this.adSizes=null,this.maxAdSizes=[300,250],this._execute=(t,e=!1)=>(this.infinite=e,this.executeCount++,t),this._findTarget=t=>{if(null===this.adSizes)return null;const{adUnitPath:e,targetType:i,selector:o,anchorPosition:r}=this.config,a=(0,s.EW)(t,o,i);if(!a)return null;const d=a.getBoundingClientRect(),l=d.width,c="left"===r?d[r]:window.innerWidth-d[r],h=l+this.marginSide+this.extractMaxAdSize(this.adSizes)[0];return window.innerWidth{const{sizeMappingGroup:s,setCollapseEmptyDiv:n,setTargetingConfigs:o,enableSetForceSafeFrameForSlot:r}=this.config;return{gpt:{slotWrapperDiv:this.slots[t].slotWrapper,instanceCount:this.instanceCount,adUnitPath:this.slots[t].adUnitPath,sizes:[[300,250]],divId:t,sizeMappingGroup:s,setCollapseEmptyDiv:n,setTargetingConfigs:o,enableSetForceSafeFrameForSlot:r,onAfterGptFetched:this._onAfterGptFetched(t),onAfterGptRendered:this._onAfterGptRendered(t,e),infinite:i}}},this._onAfterGptFetched=t=>e=>{this.slots[t].googletagSlot=e,this.slots[t].dispose=()=>{googletag.destroySlots([e]),this.slots[t].slotWrapper.remove()}},this._onAfterGptRendered=(t,e)=>i=>{if(null===i.size)return;const{isSticky:s,anchorPosition:o,refreshInterval:r,refreshLimit:a,inViewRate:d,setTargetingConfigs:l,showAdsText:c}=this.config,h=this.slots[t];r>0&&!1===h.isGPTRefreshCalled&&this.gpt.intervalRefreshAds([i.slot],r,a,t,this.slots,d,l),h.eventSize=Array.isArray(i.size)?[i.size[0],i.size[1]]:[0,0],c&&h.slot.classList.add(this.RENDERED);const p=e.getBoundingClientRect().width,_=h.slotWrapper,g=i.size;_.style[o]=`calc(50% - ${p/2+g[0]+this.marginSide}px)`,g[0](t.sort(((t,e)=>e[1]-t[1])),t.sort(((t,e)=>e[0]-t[0])),t[0]),this.stickyNodes=(t,e,i)=>{let s;const n=()=>{s&&window.cancelAnimationFrame(s),s=window.requestAnimationFrame((()=>{const s=t.getBoundingClientRect();s.top>0?(this.setWrapperStyle(e,"position","absolute"),this.setWrapperStyle(e,"top",`${this.marginTop+s.top+window.pageYOffset}px`)):s.top+s.height-i[1]-this.marginTop-this.marginBottom<0?(this.setWrapperStyle(e,"position","absolute"),this.setWrapperStyle(e,"top",s.top+window.pageYOffset+s.height-i[1]-this.marginBottom+"px")):(this.setWrapperStyle(e,"position","fixed"),this.setWrapperStyle(e,"top",this.marginTop+"px"))}))};this.slots[e].removeScrollEventListener=()=>{s&&window.cancelAnimationFrame(s),window.removeEventListener("scroll",n)},window.addEventListener("scroll",n)},this.dispose=()=>{try{for(const t in this.slots)if(Object.prototype.hasOwnProperty.call(this.slots,t)){const e=this.slots[t];e.shouldStopRefresh=!0,e.removeScrollEventListener&&e.removeScrollEventListener(),e.dispose&&e.dispose()}}catch(t){n.vF.error(t)}},o.createAdObserver(this.config,this);const{margin:r,sizeMappingGroup:a,anchorPosition:d}=this.config,l=r.split(" ").map((t=>parseInt(t.slice(0,-2))));this.marginSide="left"===d?l[1]:l[3],this.marginTop=l[0],this.marginBottom=l[2];for(let t=0;t"fluid"!==t));this.adSizes=t,this.maxAdSizes=this.extractMaxAdSize(this.adSizes);break}}}_init(){}_addStyle(){const{customCssForShowAdsText:t,customShowAdsText:e,showAdsText:i,divIDs:n}=this.config,o=n[0];let r=`\n .${this.AD_NAME}-wrapper {\n position: absolute;\n }\n `;i&&(r=r.concat(`div[id^=${o}].${this.RENDERED} ::before {\n content: "${e||"ADVERTISEMENT"}";\n color: #8a9299;\n font-size: 11px;\n position: relative;\n top: -4px;\n text-align: center;\n display: block;\n font-family: sans-serif;\n letter-spacing: 0.6px;\n width: 120px;\n }`),t&&(r=r.concat(`div[id^=${o}].${this.RENDERED} ::before {${t}}`))),(0,s.TD)(r,o)}_buildSlot(t){const e=this.config.divIDs[0]+this.executeCountSuffix,i=t.getBoundingClientRect().top+window.pageYOffset,s=document.createElement("div");s.classList.add(`${this.AD_NAME}-wrapper`),s.style.top=`${this.marginTop+i}px`;const n=document.createElement("div");return n.classList.add(this.AD_NAME),this.slots[e]={slotWrapper:s,adUnitPath:this.config.adUnitPath,divId:e,slot:n,isGPTRefreshCalled:!1,shouldStopRefresh:!1,...this.makeReplaceAdSenseParams()},s.appendChild(n),window.document.body.appendChild(s),e}get executeCountSuffix(){return this.infinite?"_"+this.executeCount.toString():""}setWrapperStyle(t,e,i){this.slots[t].slotWrapper.style[e]=i}}},476:(t,e,i)=>{i.d(e,{A:()=>r});var s=i(939),n=i(599),o=i(335);class r extends n.x{constructor(t,e,i,n){super(t,e,"ats-slider",i,"slider"),this.sliderCloseButton=document.createElement("button"),this.slider=document.createElement("div"),this.wrapperClassName="ats-slider-wrapper",this.sliderClassName="ats-slider",this.buttonClassName="ats-slider-button",this.wrapperId=this.wrapperClassName+"-"+this.instanceCount,this.sliderDivId=this.sliderClassName+"-div-"+this.instanceCount,this.buttonId=this.buttonClassName+"-"+this.instanceCount,this._execute=t=>(this.addStyle(),t),this._findTarget=t=>{const{selector:e,targetType:i}=this.config,n=(0,s.EW)(t,e,i);return null==n?null:[n]},this._buildSlot=(t,e)=>{const{divIDs:i,insertPosition:s}=this.config,n=i[0],o=document.createElement("div");o.setAttribute("id",this.wrapperId),o.classList.add(this.wrapperClassName),this.slider.setAttribute("id",this.sliderDivId),this.slider.classList.add(this.sliderClassName),this.slider.classList.add(this.UNRENDERED),o.append(this.slider),this.sliderCloseButton.setAttribute("id",this.buttonId),this.sliderCloseButton.classList.add(this.buttonClassName),this.sliderCloseButton.classList.add(this.UNRENDERED),this.slider.append(this.sliderCloseButton);const r=document.createElement("div"),a=document.createElement("div");a.classList.add(this.sliderClassName+"-wrapper-paper");const d=document.createElement("div");return d.classList.add(this.sliderClassName+"-wrapper"),d.append(r),a.append(d),this.slider.append(a),t.insertAdjacentElement(s,o),this.slots[n]={baseElement:e,slotWrapper:o,adUnitPath:this.config.adUnitPath,divId:n,slot:r,isGPTRefreshCalled:!1,shouldStopRefresh:!1,...this.makeReplaceAdSenseParams()},n},this._getFetchAdConfig=(t,e,i)=>{const{setCollapseEmptyDiv:s,sizeMappingGroup:n,setTargetingConfigs:o,enableSetForceSafeFrameForSlot:r}=this.config,a=this.slots[t];return{gpt:{slotWrapperDiv:a.slotWrapper,instanceCount:this.instanceCount,adUnitPath:a.adUnitPath,sizes:[[300,250]],divId:a.divId,setCollapseEmptyDiv:s,sizeMappingGroup:n,setTargetingConfigs:o,enableSetForceSafeFrameForSlot:r,onAfterGptRendered:this._onAfterGptRendered(t),onAfterGptFetched:this._onAfterGptFetched(t),infinite:i}}},this._onAfterGptFetched=t=>e=>{this.sliderCloseButton.onclick=this.onClose(e,t),this.dispose=()=>{try{this.onClose(e,t)(),o.vF.log("o: dispose")}catch(t){o.vF.error(t)}}},this._onAfterGptRendered=t=>e=>{const{refreshInterval:i,refreshLimit:s,inViewRate:n,setTargetingConfigs:o}=this.config,r=this.slots[t];if(i>0&&!r.isGPTRefreshCalled&&this.gpt.intervalRefreshAds([e.slot],i,s,t,this.slots,n,o),!e.isEmpty){if("0x0"===e.size.join("x"))return;this.slider.classList.remove(this.UNRENDERED),this.slider.classList.add(this.RENDERED),this.sliderCloseButton.classList.remove(this.UNRENDERED),this.sliderCloseButton.classList.add(this.RENDERED)}},this.onClose=(t,e)=>()=>{t&&googletag.destroySlots([t]),this.slots[e].shouldStopRefresh=!0,this.slots[e].slotWrapper.remove()},this.dispose=()=>{try{o.vF.log("s: dispose");for(const t in this.slots){const e=this.slots[t];e.removeScrollEventListener&&e.removeScrollEventListener(),e.dispose&&e.dispose(),delete this.slots[t]}}catch(t){o.vF.error(t)}},n.createAdObserver(this.config,this)}_init(){}_addStyle(){}addStyle(){const{customCss:t,sliderScale:e,sliderPosition:i}=this.config;(0,s.TD)(`\n #${this.sliderDivId}.${this.RENDERED} {\n text-align: center;\n position: fixed;\n ${1===i?"left: 0":"right: 0"};\n bottom: 0;\n transform: scale(${e/100});\n z-index: 9999;\n }\n #${this.sliderDivId}.${this.RENDERED} {\n ${t}\n }\n #${this.buttonId}.${this.RENDERED} {\n display: block !important;\n background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='338 4 16 18' fill='black' fill-opacity='0.6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M354 9.31L352.69 8l-5.19 5.19L342.31 8 341 9.31l5.19 5.19-5.19 5.19 1.31 1.31 5.19-5.19 5.19 5.19 1.31-1.31-5.19-5.19z' fill-rule='evenodd'/%3E%3C/svg%3E");\n background-size: 20px 20px;\n background-position: center;\n background-color: #fff;\n background-repeat: no-repeat;\n border: none;\n height: 40px;\n width: 40px;\n padding: 0;\n margin: 0;\n position: absolute;\n right: 0;\n box-shadow: 0 -1px 1px 0 rgba(0,0,0,0.2);\n border-radius: 12px 0 0 0;\n top: -35px;\n }\n #${this.buttonId}.${this.RENDERED}::before {\n position: absolute;\n content: "";\n top: -20px;\n right: 0;\n left: -20px;\n bottom: 0;\n }\n #${this.buttonId}.${this.UNRENDERED} {\n visibility: hidden;\n }\n .${this.sliderClassName+"-wrapper-paper"} {\n position: relative;\n border: 15px solid #fff;\n }\n .${this.sliderClassName+"-wrapper"} {\n margin: auto;\n }\n`,`${this.AD_NAME}`)}}},78:(t,e,i)=>{i.d(e,{Cu:()=>s,KB:()=>o,sp:()=>n});const s=-1!==(sessionStorage?.getItem("ats_debug")||"").indexOf("true")||-1!==location.search.slice(1).split("&").indexOf("ats_debug=true"),n=s||/only_log|enable_log/.test(sessionStorage?.getItem("ats_debug")||"")||-1!==location.search.slice(1).split("&").indexOf("ats_debug=only_log"),o=(t="true"!==window.sessionStorage.getItem("ats_debug"))=>{t?window.sessionStorage.setItem("ats_debug","true"):window.sessionStorage.removeItem("ats_debug"),location.reload()}},581:(t,e,i)=>{i.d(e,{A:()=>r,V:()=>n});var s=i(78);class n{constructor(t,e=!1){this._enableLog=e,this.measurePerformance=t=>{try{performance.mark("start")}catch(t){}const e=t();try{performance.mark("end"),performance.measure("test","start","end");const t=performance.getEntriesByName("test");this.log(t[0])}catch(t){}return e},this.reset=()=>{};const i=(t,e)=>`display: inline-block; color: ${t}; background: ${e}; padding: 1px 4px; border-radius: 3px;`;this.decorate=[`%cATS%c${t}`,i("#fff","#2196f3"),i("#000","#aaa")]}log(...t){try{if(!this._enableLog)return;console.log(...this.decorate,"LOG:",...t)}catch(e){this.log(...t)}}info(...t){try{if(!this._enableLog)return;console.info(...this.decorate,"INFO:",...t)}catch(e){this.log(...t)}}warn(...t){try{if(!this._enableLog)return;console.warn(...this.decorate,"WARN:",...t)}catch(e){this.log(...t)}}error(...t){try{if(!this._enableLog)return;console.error(...this.decorate,"ERROR:",...t)}catch(e){this.log(...t)}}table(t,e,i){try{if(!this._enableLog)return;this.log(t),console.table(e,i)}catch(s){this.log(t,e,i)}}}const o=new n("Core",s.sp),r=o;if(s.sp)try{const t=e=>{e?.target?.removeEventListener(e.type,t);const i=window.performance.timing;i&&o.log("Page Performance",{dns:i.domainLookupEnd-i.domainLookupStart,tcp:i.connectEnd-i.connectStart,request:i.responseStart-i.requestStart,response:i.responseEnd-i.responseStart,interactive:i.domInteractive-i.domLoading,domContentLoaded:i.domContentLoadedEventStart-i.domLoading,domComplete:i.domComplete-i.domLoading,load:i.loadEventEnd-i.loadEventStart,untilResponseStart:i.responseStart-i.navigationStart,untilLoadComplete:i.loadEventEnd-i.navigationStart})};"complete"===document.readyState?t():window.addEventListener("load",t)}catch(t){}},939:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{EW:()=>getTarget,FC:()=>isMatchedDevice,G:()=>isMatchedPath,P7:()=>updateArray,Ri:()=>getCookie,Sw:()=>isSafariPC,TD:()=>addStyle,TG:()=>isInView,TV:()=>setCookie,UW:()=>isMatchedBlockedUrl,Zu:()=>isUserInteractedOnDocument,ab:()=>getSelectorFromElement,gE:()=>getUserDeviceType,hg:()=>isCorrectSizes,k3:()=>isMatchedReferrerHistory,kU:()=>isInflow,l9:()=>debouncedMutationObserver,nL:()=>insertScriptTag,oj:()=>isMatchedReferrer,pr:()=>checkWindow,yz:()=>getHostName,ze:()=>isEmptyObj});var _Logger__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(581);const addStyle=(t,e)=>{if(!document.querySelector(`style[data-css-${e}]`)){const i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",s.appendChild(document.createTextNode(t)),e&&s.setAttribute(`data-css-${e}`,""),i.appendChild(s)}},checkWindow=()=>document.hasFocus();let isUserInteractedOnDocument=!1;window.document.addEventListener("click",(()=>{isUserInteractedOnDocument=!0})),window.document.addEventListener("touchstart",(()=>{isUserInteractedOnDocument=!0}));const isSafariPC=()=>{const t=navigator.userAgent,e=navigator.vendor;return/Safari/i.test(t)&&/Apple Computer/.test(e)&&!/Mobi|Android/i.test(t)},debounce=(t,e,...i)=>{let s;return()=>{const n=i;s&&clearTimeout(s),s=window.setTimeout((function(){s=null,t(n)}),e)}},getTarget=(atsElm,selector,targetType)=>{let element;try{element="Function"===targetType?eval(selector):atsElm.querySelector(selector)}catch(t){element=null}return element},debouncedMutationObserver=(t,e)=>new MutationObserver(debounce(t,e)),isCorrectSizes=t=>t[0]null==t||!Object.keys(t).length,insertScriptTag=(t=!1,e,i)=>{const s=document.createElement("script"),n=document.getElementsByTagName("script")[0];i&&(s.onload=i),s.async=t,s.src=e,n?.parentNode?.insertBefore(s,n)},getSelectorFromElement=t=>{const e=[];if(!(t instanceof Element))return e;const i=(t,e)=>{let i=1,s=t;for(;s=s.previousElementSibling;)s.nodeName.toLowerCase()===e&&++i;return i};for(;t&&t.nodeType===Node.ELEMENT_NODE;){let s=t.nodeName.toLowerCase();if(t.id){s+=`#${t.id}`,e.unshift(s);break}const n=i(t,s);1{let e=!1;return[deviceRegex,deviceRegex2].forEach((i=>{e=e||i.test(t)})),e?MOBILE_NAME:DESKTOP_NAME},CURRENT_USER_DEVICE_TYPE=getUserDeviceType(),isMatchedPath=({regex:t},e)=>{let i;try{i=new RegExp(t)}catch(t){return _Logger__WEBPACK_IMPORTED_MODULE_0__.A.error(`regex is not correct: ${i}: ${t}`),!1}return i.test(e)},isMatchedReferrer=(t,e)=>{if(!t.enableReferrerTargeting||t.enableKeepingReferrer||!t.domainList)return!0;const i=t.domainList.some((t=>t===e));return"include"===t.filteringRule?i:!i},getHostName=(t,e)=>{t=t.sort(((t,e)=>t.length-e.length));for(const i of t)if(-1!==e.indexOf(i))return i;return e},isInflow=(t,e)=>-1===e.indexOf(t),setCookie=(t,e,i)=>{let s="";if(i){const t=new Date;t.setTime(t.getTime()+24*i*60*60*1e3),s="; expires="+t.toUTCString()}document.cookie=t+"="+(e||"")+s+"; path=/"},eraseCookie=t=>{document.cookie=t+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"},getCookie=()=>document.cookie.split(/;\s*/).reduce(((t,e)=>{const[i,s]=e.split("=");let n="temp";try{s&&(n=decodeURIComponent(s))}catch(t){}return i&&(t[i]=n),t}),{}),updateArray=(t,e,i,s)=>{let n=s?[]:JSON.parse(getCookie()[e]||"[]");return n.push(i),n=n.filter(((t,e,i)=>i.indexOf(t)===e)),document.cookie=`${e}=${encodeURIComponent(JSON.stringify(n))}; Domain=${t}; Path=/; max-age=3600; SameSite=Strict;`,n},isMatchedReferrerHistory=(t,e)=>{if(!t.enableReferrerTargeting||!t.enableKeepingReferrer||!t.domainList)return!0;const i=e.some((e=>t.domainList?.some((t=>t===e))));return"include"===t.filteringRule?i:!i},isMatchedBlockedUrl=(t,e)=>t.some((t=>decodeURIComponent(t)===e&&(_Logger__WEBPACK_IMPORTED_MODULE_0__.A.log(`blocked with url = ${t}`),!0))),isMatchedDevice=(t,e)=>t===e||t===RESPONSIVE_NAME,inViewPercentage=50,isInView=t=>{const{top:e,bottom:i,height:s}=t.getBoundingClientRect();return window.innerHeight-e-s*(inViewPercentage/100)>0&&i-s*(inViewPercentage/100)>0}},974:t=>{t.exports=JSON.parse('{"siteSetting":{"enableAds":true,"enableGptScript":false,"parentAccountSiteDomain":"fourm.jp","siteId":8257,"enableAdloox":false,"adlooxRequestRatio":0.08,"confirmedClickRatio":0,"enableIpBlocking":false,"enableBasicSetTargetings":false,"enableCollapseEmptyDivs":true,"enableGamSingleRequest":true,"enableSeparateRequest":false,"enableGamDisableInitialLoad":false,"enableGamLazyload":{},"gamAdsRefresh":2,"enablePrebid":false,"prebidSettings":{"prebidVersion":8,"prebidTimeout":2000,"prebidTamPubId":"","prebidUserSyncScript":"(function () {\\n return {\\n syncDelay: 6000, // Default = 3000\\n syncsPerBidder: 10, // Default = 5\\n filterSettings: {\\n all: {\\n bidders: \\"*\\",\\n filter: \\"include\\",\\n },\\n },\\n // https://publisherdocs.criteotilt.com/rtus/prebid/\\n userIds: [\\n {\\n name: \\"criteo\\",\\n },\\n ],\\n };\\n})();","prebidCustomScript":"","prebidCoreGamNetworkId":83555300,"prebidCurrency":"USD","prebidPriceGranularity":"custom","prebidJsURL":"https://anymind360.com/js/8257/prebid_2024_7_25_20_17_37.js","rendererJsURL":"https://anymind360.com/js/bundle.js","prebidUseAtspbjs":false,"enableAnalytics":false,"ampaEndPoint":"https://storage.googleapis.com/prod-ampa-collect/collect","analyticsSamplingRate":0.05,"userIds":[],"enableSchain":false,"sellerId":"A1281"},"enableIdentityHub":false,"identityHubPublisherId":null,"identityHubProfileId":null,"enableLiveRamp":false,"liveRampJsURL":"https://ats.rlcdn.com/ats.js","liveRampScript":"","enablePwa":false,"keywordsBlock":{},"isSPA":false,"enableAdRecovery":false,"destroyAtsSlotsOnly":false,"enableUrlBlock":true,"blockedUrls":["/articles/2914408","/articles/1065450","/articles/2848908","/articles/2885468","/articles/2916503","/articles/2916960","/articles/2927902"],"hostNames":["trilltrill.jp"],"enableApm":false,"videoCssUrl":"https://anymind360.com/video/css/bundle_ver20240507.css","videoJsUrl":"https://anymind360.com/video/js/bundle_ver20240507.js","useAsyncJsTrigger":false,"asyncJsTrigger":""},"configs":[{"regex":"/terms","device":"pc","breakPoint":true,"enableReferrerTargeting":false,"enableKeepingReferrer":false,"filteringRule":"include","domainList":[],"active":false,"type":"custom","settings":{"script":"","style":""}},{"regex":"/articles/2996628","device":"pc","breakPoint":false,"enableReferrerTargeting":false,"enableKeepingReferrer":false,"filteringRule":"include","domainList":[],"active":false,"type":"custom","settings":{"script":"try{\\ndocument.addEventListener(\\"DOMContentLoaded\\", function() { \\nvar newNode2 = document.createElement(\'div\');\\nnewNode2.setAttribute(\\"id\\", \\"sliderBox\\"); \\nnewNode2.classList.add(\\"floatSlider\\");\\nvar newNode5 = document.createElement(\'div\');\\nnewNode5.setAttribute(\\"id\\", \\"sliderDiv\\"); \\nnewNode2.append(newNode5);\\nvar newButton = document.createElement(\'button\');\\nnewButton.setAttribute(\\"class\\", \\"closeAd\\"); \\nnewButton.setAttribute(\\"onclick\\", \\"toggleAd()\\"); \\nnewButton.innerHTML=\\"x\\";\\nnewNode5.append(newButton);\\nvar referenceNode2 = document.querySelector(\'body\');\\n// Insert the new node before the reference node\\nreferenceNode2.prepend(newNode2);\\nconsole.log(\'running!!\');\\n\\n});\\n}catch(e){}","style":""}},{"regex":"/articles/2996628","device":"pc","breakPoint":false,"enableReferrerTargeting":false,"enableKeepingReferrer":false,"filteringRule":"include","domainList":[],"active":false,"type":"custom","settings":{"script":"try{\\ndocument.addEventListener(\\"DOMContentLoaded\\", function() { \\n\\n\\nwindow.addEventListener(\'scroll\', function(ev) {\\n var someDiv = document.querySelector(\'#sliderBox\');\\nvar btnToggle = document.querySelector(\\"#sliderDiv > button\\");\\nif (document.querySelector(\'#sliderBox iframe\').width != 1 ) {\\n btnToggle.style.visibility = \\"visible\\";\\n}\\ndocument.querySelector(\'.closeAd\').onclick = function() { var x = document.querySelector(\\"#sliderDiv > div\\");\\n var y = document.querySelector(\\"#sliderDiv > button\\");\\n var z = document.querySelector(\\"#sliderDiv\\");\\n\\n if (x.style.display === \\"none\\") {\\n x.style.display = \\"block\\";\\n y.style.transform = \\"translateY(21px)\\"; \\n } else {\\n x.style.display = \\"none\\";\\n y.style.transform = \\"translateY(-20px)\\";\\n }\\n};\\n }); \\n\\n});\\n}catch(e){}","style":"#sliderBox>div{text-align: center; transition: all .3s;} \\n .floatSlider > div{ position: fixed; right: 0!important; bottom: 0!important; transform: scale(.65); z-index: 9999; text-align: left!important;}\\n .closeAd{visibility: hidden; position: absolute; left: 0px; top: -30px; width: 40px; height: 40px; border-radius: 0!important; text-align: center; background: #ddd;}\\n .floatSlider > .closeAd{visibility: visible;}\\n @media only screen and (max-width: 600px) {\\n .floatSlider > div{ transform: scale(.45) translate(220px,50px);}\\n .closeAd{left: -5px;}\\n }\\n.trvd_video_player{bottom: 230px !important;}"}},{"regex":".*","device":"pc","breakPoint":true,"enableReferrerTargeting":false,"enableKeepingReferrer":false,"filteringRule":"include","domainList":[],"active":false,"type":"custom","settings":{"script":"try{\\n!(function(l) {\\n\\tfunction e() {\\n var ivsWrapper = document.createElement(\'div\');\\n ivsWrapper.id = \'ivs-wrapper\';\\n ivsWrapper.style.cssText = \'width: 100%; margin: 25px 0 0 0; display: flex; justify-content: center;\';\\n var ivsContainer = document.createElement(\'div\');\\n ivsContainer.id = \'ivs-player-001\';\\n ivsContainer.style.width = \'640px\';\\n ivsContainer.style.height = \'360px\';\\n var titleTxt = document.createElement(\'div\');\\n\\t\\ttitleTxt.className = \'aside.articleDetail-RelatedArticles\';\\n\\t\\tivsContainer.appendChild(titleTxt);\\n\\t\\tvar ivsPlayer = document.createElement(\'ivs-player\');\\n\\t\\tivsPlayer.dataset.ivsKey = \'6c8a77f654151721b6b7e2e16d169637\';\\n\\t\\tivsPlayer.dataset.ivsSpid = \'3002545\';\\n\\t\\tivsPlayer.dataset.ivsWid = \'f8a8f577-2415\';\\n\\t\\tivsPlayer.dataset.ivsFloatcond = \'after\';\\n\\t\\tivsContainer.appendChild(ivsPlayer);\\n\\t\\tivsWrapper.appendChild(ivsContainer);\\n\\t\\tvar ivsScript = document.createElement(\'script\');\\n\\t\\tivsScript.src = \'https://player.ivideosmart.com/ivsplayer/v4/dist/js/loader.js\';\\n\\t\\tvar pos = document.querySelector(\'.articleDetail-RelatedArticles\');\\n\\t\\tpos.style.padding = \'25px 0 0 0\';\\n\\t\\tpos.insertAdjacentElement(\'beforebegin\', ivsScript);\\n\\t\\tpos.insertAdjacentElement(\'beforebegin\', ivsWrapper);\\n\\t}\\n if (\'loading\' !== l.readyState) e();\\n else l.addEventListener(\'DOMContentLoaded\', e);\\n})(document);\\n}catch(e){}","style":""}},{"regex":".*","device":"pc","breakPoint":false,"enableReferrerTargeting":false,"enableKeepingReferrer":false,"filteringRule":"include","domainList":[],"active":false,"type":"custom","settings":{"script":"try{\\n!(function(l) {\\n\\tfunction e() {\\n\\t\\tvar ivsContainer = document.createElement(\'div\');\\n\\t\\tivsContainer.id = \'ivs-player-001\';\\n\\t\\tivsContainer.style.margin = \'20px 0 25px 0\';\\n var titleTxt = document.createElement(\'div\');\\n\\t\\ttitleTxt.className = \'aside.articleDetail-RelatedArticles\';\\n\\t\\tivsContainer.appendChild(titleTxt);\\n\\t\\tvar ivsPlayer = document.createElement(\'ivs-player\');\\n\\t\\tivsPlayer.dataset.ivsKey = \'6c8a77f654151721b6b7e2e16d169637\';\\n\\t\\tivsPlayer.dataset.ivsSpid = \'3002545\';\\n\\t\\tivsPlayer.dataset.ivsWid = \'f8a8f577-2415\';\\n\\t\\tivsPlayer.dataset.ivsFloatcond = \'after\';\\n\\t\\tivsContainer.appendChild(ivsPlayer);\\n\\t\\tvar ivsScript = document.createElement(\'script\');\\n\\t\\tivsScript.src = \'https://player.ivideosmart.com/ivsplayer/v4/dist/js/loader.js\';\\n\\t\\tvar pos = document.querySelector(\'div.sideBar-TopicKeywords\');\\n\\t\\tpos.insertAdjacentElement(\'beforebegin\', ivsScript);\\n\\t\\tpos.insertAdjacentElement(\'beforebegin\', ivsContainer);\\n\\t}\\n if (\'loading\' !== l.readyState) e();\\n else l.addEventListener(\'DOMContentLoaded\', e);\\n})(document);\\n}catch(e){}","style":""}}],"information":{"env":"prod","buildDate":"2024-07-26T05:17:37.208Z","versions":{"ads":"3.1.278 ver3","pwa":"3.1.278","core":"3.1.278","bundler":"3.1.278"}},"amPrebidBidderMap":{}}')}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var i=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](i,i.exports,__webpack_require__),i.exports}__webpack_require__.d=(t,e)=>{for(var i in e)__webpack_require__.o(e,i)&&!__webpack_require__.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var __webpack_exports__={},_TagServices__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(903),_Logger__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(335);const anymindTS=window.anymindTS=window.anymindTS||{que:[]};let originalQue=[];Array.isArray(anymindTS.que)&&(originalQue=anymindTS.que.slice(),anymindTS.que.splice(0));const iterateAndCallFuncInQue=t=>{t.length>0&&t.forEach(((t,e)=>{try{t()}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_1__.vF.error(`anymindTS.que[${e}]`,t)}}))};class ATSManager{constructor(config){this.config=config,this.startAnymindTS=async()=>{if(this.tagServices.disposed)_Logger__WEBPACK_IMPORTED_MODULE_1__.vF.error("Must execute 'window.anymindTS.dispose();'");else{if(this.config.siteSetting.useAsyncJsTrigger&&this.config.siteSetting.asyncJsTrigger)try{const result=await eval(this.config.siteSetting.asyncJsTrigger);if(_Logger__WEBPACK_IMPORTED_MODULE_1__.vF.log("asyncJsTrigger result: ",result),!result)return}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_1__.vF.log(t)}this.tagServices.start()}},this.run=async()=>{this.tagServices.run=!0,_Logger__WEBPACK_IMPORTED_MODULE_1__.vF.log(`\nenv: ${this.config.information.env}\nversion: ${this.config.information.versions.ads}\nbuild date: ${this.config.information.buildDate}\nsite id: ${this.config.siteSetting.siteId}`),this.config.siteSetting.isSPA||this.startAnymindTS(),iterateAndCallFuncInQue(originalQue),originalQue.splice(0)},window.startAnymindTS=window.startAnyMindTS=this.startAnymindTS,this.tagServices=window.anymindTS=new _TagServices__WEBPACK_IMPORTED_MODULE_0__.h(config)}}try{const t=__webpack_require__(974);if(window.anymindTS.loaded)_Logger__WEBPACK_IMPORTED_MODULE_1__.vF.error("already ats.js is loaded");else{const e=new ATSManager(t);e.run()}}catch(t){_Logger__WEBPACK_IMPORTED_MODULE_1__.vF.error(t)}})();