
©2022 Averie Cooks. Design by Purr.
=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?”Object is not iterable.”:”Symbol.iterator is not defined.”)}function o(t,e){var n=”function”==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),a=[];try{for(;(void 0===e||e– >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function r(){for(var t=[],e=0;e1)throw new Error(“Invalid probability”);return Math.random()=e?”desktop”:n>=t?”tablet”:”phone”}(i,o),this._config=new _(t),this._clsOptions.enabledLocations=this._config.enabledLocations}return t.prototype.start=function(){var t,e,n,i=this;try{!function(t){var e=document.body,n=”adthrive-device-“+t;if(!e.classList.contains(n))try{e.classList.add(n)}catch(t){document.createElement(“_”)}}(this._device);var o=(t=this._device,e=this._clsOptions.siteAds.adUnits,n=new b,e.filter((function(t){return void 0!==t.dynamic&&t.dynamic.enabled})).map((function(e){var i=e.location.replace(/s+/g,”_”);return{auctionPriority:S.get(i)||8,location:i,sequence:s(e.sequence,1),sizes:A(e.adSizes).filter((function(i){return O(e.location,i,t,n)})),devices:e.devices,pageSelector:s(e.dynamic.pageSelector,””).trim(),elementSelector:s(e.dynamic.elementSelector,””).trim(),position:s(e.dynamic.position,”beforebegin”),min:Math.floor(s(e.dynamic.min,0)),max:Math.floor(s(e.dynamic.max,0)),spacing:s(e.dynamic.spacing,0),skip:Math.floor(s(e.dynamic.skip,0)),every:Math.max(Math.floor(s(e.dynamic.every,1)),1),classNames:e.dynamic.classNames||[],sticky:”Footer”===e.location||e.sticky,stickyOverlapSelector:s(e.stickyOverlapSelector,””).trim(),autosize:e.autosize,special:s(e.targeting,[]).filter((function(t){return”special”===t.key})).reduce((function(t,e){return t.concat.apply(t,r(e.value))}),[]),lazy:s(e.dynamic.lazy,!1),lazyMax:s(e.dynamic.lazyMax,2),lazyMaxDefaulted:0!==e.dynamic.lazyMax&&!e.dynamic.lazyMax}}))).filter((function(t){return i._locationEnabled(t)})).filter((function(t){return function(t,e){return-1!==t.devices.indexOf(e)}(t,i._device)})).filter((function(t){return 0===(e=t).pageSelector.length||null!==document.querySelector(e.pageSelector);var e}));this.inject(o).forEach((function(t){return i._clsOptions.setInjectedSlots(t)}))}catch(t){}},t.prototype.inject=function(t,e){void 0===e&&(e=document);var n=this.targetDensityExperiment.result,i=t.filter((function(t){return n?”Content”!==t.location:t})),o=t.filter((function(t){return n?”Content”===t.location:null}));return r(i.length?this._injectNonDensitySlots(i,e):[],o.length?this._injectDensitySlots(o,e):[])},t.prototype._injectNonDensitySlots=function(t,e){var n,o,a=this;void 0===e&&(e=document);var l=[],s=[];try{for(var u=i(t),d=u.next();!d.done;d=u.next()){var p=d.value,h=0,y=0,f=0;p.spacing>0&&(y=h=window.innerHeight*p.spacing);var m=this._repeatDynamicAds(p),_=this.getElements(p.elementSelector,e);p.skip;for(var g=p.skip;gm.length);g+=p.every){var v=_[g];if(h>0){var b=c(v).bottom;if(b<=y)continue;y=b+h}var P=g1&&(h=0);for(var S=function(){var t=m[f],n=t.location+"_"+t.sequence;if(l.some((function(t){return t.name===n})))return f+=1,"continue";var i=A.getDynamicElementId(t),o="adthrive-"+p.location.replace("_","-").toLowerCase(),a=r([o,o+"-"+p.sequence],p.classNames),c=A.addAd(v,i,p.position,a);if(c){var u=E(t,c);if(u.length){var d={clsDynamicAd:p,dynamicAd:t,element:c,sizes:u,name:n,infinite:e!==document};l.push(d),s.push({location:t.location,element:c}),"Recipe"===p.location&&++A._recipeCount,f+=1}v=c}},A=this;P>0;P–)S()}}}catch(t){n={error:t}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}return s.forEach((function(t){var e=t.location;t.element.style.minHeight=a.locationToMinHeight[e]})),l},t.prototype._shouldTargetAllElgibile=function(t){return t===this._densityMax},t.prototype._injectDensitySlots=function(t,e){var n,o,l=this;void 0===e&&(e=document);try{this._calculateMainContentHeightAndAllElements(t)}catch(t){return[]}this._densityDevice=”desktop”===this._device?a.Desktop:a.Mobile;var s=[],c=this._getDensitySettings(),u=c.adDensity,d=c.onePerViewport,p=this._shouldTargetAllElgibile(u),h=this._getTargetDensityUnits(u),y=this._getCombinedMax(t),f=Math.min.apply(Math,r([this._totalAvailableElements,h],y>0?[y]:[]));if(this._pubLog={onePerViewport:d,targetDensity:u,targetDensityUnits:h,combinedMax:y},!f)return[];var m=0,_=0,g=function(t){var n=v.getElements(t.elementSelector,e),i=v._getInsertEvery(f,d);v._logDensityInfo(n,t.elementSelector,i);var o=function(n){var o,r,a=null;o=l._attemptInsertion({dynamicAd:t,element:n,insertNext:_,onePerViewport:d,contentInsertedThisPage:m,target:e,insertEvery:i,targetAll:p}),_=o.insertNext,r=o.slot,a=o.adElement,r&&a&&(s.push(r),++m,a.style.minHeight=l.locationToMinHeight[t.location])};t.skip;for(var r=t.skip;r=v._mainContentHeight&&v._totalAvailableElements>1)){if(!(m=Math.max(i.min,i.max)});d=(e=this._addContentAd(o,i,h,s,c)).insertedSlot,r=e.insertNext,p=e.adElement}return{insertNext:r,slot:d,adElement:p}},t.prototype._isElementSpacedCorrectly=function(t,e,n,i,o,r){var a=”beforebegin”===i.position||”beforeend”===i.position,l=o||this._isElementFarEnough(n,t,e,i,r),s=this._isElementNotInRow(t,a),c=l&&s;return c&&(this._lastElement=t,this._lastAdPosition=”beforebegin”===i.position||”afterbegin”===i.position?”top”:”bottom”),c},t.prototype._getMinimumSpacingByLastInjection=function(t){return this._lastAdPosition&&”bottom”===this._lastAdPosition&&tn&&(0===s||u-s>=o+l)},t.prototype._isElementNotInRow=function(t,e){var n=t.previousElementSibling,i=t.nextElementSibling,o=e?!n&&i||n&&t.tagName!==n.tagName?i:n:i;return!(!o||0!==t.getBoundingClientRect().height)||(!o||t.getBoundingClientRect().top!==o.getBoundingClientRect().top)},t.prototype._calculateMainContentHeightAndAllElements=function(t){var e=this._setMainContentAndElements(t),n=e.mainContentDiv,i=e.firstContentDiv;this._mainContentDiv=n,this._firstContentDiv=i;var o=this._mainContentDiv.querySelector(“div #comments, section .comments”);this._mainContentHeight=o?this._mainContentDiv.offsetHeight-o.offsetHeight:this._mainContentDiv.offsetHeight},t.prototype._setMainContentAndElements=function(t){var e=this._getPotentialElements(t);if(0===e.length)throw Error(“No Main Content Elements Found”);return{mainContentDiv:Array.from(e).reduce((function(t,e){return e.offsetHeight>t.offsetHeight?e:t}))||document.body,firstContentDiv:Array.from(e).reduce((function(t,e){return c(e).top1.5*window.innerHeight?e:null},t.prototype._getSelectors=function(t){return t.indexOf(“,”)>-1?t.split(“,”):[t]},t.prototype._addContentAd=function(t,e,n,i,o){void 0===i&&(i=document);var a=null,l=”adthrive-“+e.location.replace(“_”,”-“).toLowerCase(),s=l+”-“+e.sequence,c=this.addAd(t,this.getDynamicElementId(n),n.position,r([l,s],e.classNames)),u=this._getNextInsertPosition(n.position,c,o);if(c){var d=E(n,c);if(d.length)a={clsDynamicAd:e,dynamicAd:n,element:c,sizes:d,name:n.location+”_”+n.sequence,infinite:i!==document},++this._totalContentInserted}return{insertedSlot:a,insertNext:u,adElement:c}},t.prototype._getNextInsertPosition=function(t,e,n){var i=e.getBoundingClientRect(),o=window.pageYOffset;return(“beforebegin”===t||”afterbegin”===t?i.top:i.bottom)+o+n+this._minDivHeight},t.prototype.getDynamicElementId=function(t){return”AdThrive_”+t.location+”_”+t.sequence+”_”+this._device},t.prototype.getElements=function(t,e){return void 0===e&&(e=document),e.querySelectorAll(t)},t.prototype.addAd=function(t,e,n,i){if(void 0===i&&(i=[]),!document.getElementById(e)){var o=’]]>’;t.insertAdjacentHTML(n,o)}return document.getElementById(e)},t.prototype._repeatDynamicAds=function(t){for(var e=[],i=t.lazy?s(this.locationMaxLazySequence.get(t.location),0):0,o=Math.max(t.min,t.max),r=0===i&&t.lazy?o+t.lazyMax:Math.min(Math.max(i-t.sequence+1,0),o+t.lazyMax),a=Math.max(o,r),l=0;l=o;e.push(n(n({},t),{sequence:c,lazy:u}))}return e},t.prototype._locationEnabled=function(t){var e=-1!==this._clsOptions.enabledLocations.indexOf(t.location),n=this._clsOptions.disableAds&&this._clsOptions.disableAds.all||document.body.classList.contains(“adthrive-disable-all”),i=!document.body.classList.contains(“adthrive-disable-content”)&&!this._clsOptions.disableAds.reasons.has(“content_plugin”);return e&&!n&&i},t}(),w=function(){function t(){}return t.getScrollTop=function(){return(window.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0)},t.shufflePlaylist=function(t){for(var e,n,i=t.length;0!==i;)n=Math.floor(Math.random()*t.length),e=t[i-=1],t[i]=t[n],t[n]=e;return t},t.getPlacementElement=function(t){var e=d(t.pageSelector),n=u(t.elementSelector);return e.valid?t.pageSelector&&!e.elements.length?null:n.valid&&n.elements.length>t.skip?n.elements[t.skip]:null:null},t.createQueryString=function(t){return Object.keys(t).map((function(e){return e+”=”+t[e]})).join(“&”)},t.createEncodedQueryString=function(t){return Object.keys(t).map((function(e){return e+”=”+encodeURIComponent(t[e])})).join(“&”)},t}();!function(t){t.Video_Collapse_Autoplay_SoundOff=”Video_Collapse_Autoplay_SoundOff”,t.Video_Individual_Autoplay_SOff=”Video_Individual_Autoplay_SOff”,t.Video_Coll_SOff_Smartphone=”Video_Coll_SOff_Smartphone”,t.Video_In_Post_ClicktoPlay_SoundOn=”Video_In-Post_ClicktoPlay_SoundOn”}(g||(g={})),function(t){t.StickySekindo=”stickySekindo”,t.StaticSekindo=”staticSekindo”,t.None=”none”}(v||(v={}));var C,k=function(t){function n(){var e=t.call(this)||this;return e.key=”sekho”,e._result=!1,e._choices=[{choice:!0},{choice:!1}],e._result=e.run(),e.setExperimentKey(),e}return e(n,t),Object.defineProperty(n.prototype,”result”,{get:function(){return this._result},enumerable:!1,configurable:!0}),n.prototype.run=function(){return new l(.05).get()},n}(h),M=function(){function t(t,e){var n=this;this._config=t,this._clsOptions=e,this._stickyRelatedOnPage=!1,this._IN_POST_SELECTOR=”.adthrive-video-player”,this._contextualMediaIds=[],this._WRAPPER_BAR_HEIGHT=36,this._playersAddedFromPlugin=[],this._device=/Windows NT|Macintosh/i.test(navigator.userAgent)?”desktop”:”mobile”,this._sekindoHoldoutExperiment=new k;var i={stickyRelated:[],stickyPlaylist:[],sekindo:[],stationaryRelated:[]};this._potentialPlayerMap=i,this._potentialPlayerMap=this._config.videoAdOptions.players.length?this._config.videoAdOptions.players.filter((function(t){var e;return(null===(e=t.devices)||void 0===e?void 0:e.indexOf(n._device))>-1})).reduce((function(t,e){return t[e.type]||(t[e.type]=[]),e.enabled&&(n._sekindoHoldoutExperiment.result&&”sekindo”===e.type||t[e.type].push(e)),t}),i):i;var o=this._config.videoAdOptions.players.filter((function(t){return”stationaryRelated”===t.type&&t.enabled}));this._potentialPlayerMap.stationaryRelated=o}return t.prototype.init=function(){this._initializePlayers()},t.prototype._wrapJWPlayerWithCLS=function(t,e,n){if(void 0===n&&(n=0),t.parentNode){var i=t.offsetWidth*(9/16),o=this._createGenericCLSWrapper(i,e,n);t.parentNode.insertBefore(o,t),o.appendChild(t)}},t.prototype._createSekindoCLSWrapper=function(t,e){var n=this._getTitleHeight(document.createElement(“h4”));return this._createGenericCLSWrapper(t,e,n)},t.prototype._createGenericCLSWrapper=function(t,e,n){var i=document.createElement(“div”);return i.id=”cls-video-container-“+e,i.className=”adthrive”,i.style.minHeight=t+n+”px”,i},t.prototype._getTitleHeight=function(t){t.innerText=”Title”,t.style.visibility=”hidden”,document.body.appendChild(t);var e=window.getComputedStyle(t),n=parseInt(e.height,10),i=parseInt(e.marginTop,10),o=parseInt(e.marginBottom,10);return document.body.removeChild(t),Math.min(n+o+i,50)},t.prototype._initializePlayers=function(){var t=document.querySelectorAll(this._IN_POST_SELECTOR);t.length&&this._initializeRelatedPlayers(t),this._shouldRunAutoplayPlayers()&&this._determineAutoplayPlayers()},t.prototype._checkPlayerSelectorOnPage=function(t){var e=this._potentialPlayerMap[t].map((function(t){return{player:t,playerElement:w.getPlacementElement(t)}}));return e.length?e[0]:{player:null,playerElement:null}},t.prototype._initializeRelatedPlayers=function(t){for(var e=0;e div”)||e,this._createStickyRelatedPlayer(n(n({},a),{mediaId:t}),e))},t.prototype._createStaticPlayer=function(t,e){if(this._potentialPlayerMap.stationaryRelated.length&&this._potentialPlayerMap.stationaryRelated[0].playerId){var i=this._potentialPlayerMap.stationaryRelated[0];this._createStationaryRelatedPlayer(n(n({},i),{mediaId:t}),e)}},t.prototype._getOverrideElement=function(t,e,n){if(t&&e){var i=document.createElement(“div”);e.insertAdjacentElement(t.position,i),n=i}else{var o=this._checkPlayerSelectorOnPage(“stickyPlaylist”),r=o.player,a=o.playerElement;if(r&&a){i=document.createElement(“div”);a.insertAdjacentElement(r.position,i),n=i}}return n},t.prototype._getEmbeddedPlayerType=function(t){var e=t.getAttribute(“data-player-type”);return e&&”default”!==e||(e=this._config.contextualSettings?this._config.contextualSettings.defaultPlayerType:”static”),this._stickyRelatedOnPage&&(e=”static”),e},t.prototype._shouldOverrideElement=function(t){var e=t.getAttribute(“override-embed”);return”true”===e||”false”===e?”true”===e:!!this._config.contextualSettings&&this._config.contextualSettings.overrideEmbedLocation},t.prototype._createStationaryRelatedPlayer=function(t,e){this._device,g.Video_In_Post_ClicktoPlay_SoundOn,e&&t.mediaId&&(this._wrapJWPlayerWithCLS(e,t.mediaId),this._playersAddedFromPlugin.push(t.mediaId))},t.prototype._createStickyRelatedPlayer=function(t,e){if(this._device,g.Video_Individual_Autoplay_SOff,this._stickyRelatedOnPage=!0,this._config.mobileStickyPlayerOnPage=”mobile”===this._device,e&&t.position&&t.mediaId){var n=document.createElement(“div”);e.insertAdjacentElement(t.position,n);var i=document.createElement(“h3″);i.style.margin=”10px 0”;var o=this._getTitleHeight(i);this._wrapJWPlayerWithCLS(n,t.mediaId,this._WRAPPER_BAR_HEIGHT+o),this._playersAddedFromPlugin.push(t.mediaId)}},t.prototype._determineAutoplayPlayers=function(){if(!this._stickyRelatedOnPage){var t=this._checkPlayerSelectorOnPage(“stickyPlaylist”),e=t.player,n=t.playerElement,i=this._checkPlayerSelectorOnPage(“sekindo”),o=i.player,r=i.playerElement;e&&e.playerId&&e.playlistId&&n?this._createPlaylistPlayer(e,n):o&&o.playlistId&&r&&this._createSekindoPlayer(o,r)}},t.prototype._createSekindoPlayer=function(t,e){var i=t.playlistId;n(n({},t),{classNames:[]});var o=”mobile”===this._device?{width:340,height:260}:{width:320,height:250},r=this._createSekindoCLSWrapper(o.height,i);e.insertAdjacentElement(t.position,r),this._playersAddedFromPlugin.push(i)},t.prototype._createPlaylistPlayer=function(t,e){var n=t.playlistId;this._config.mobileStickyPlayerOnPage=!0;var i=document.createElement(“div”);e.insertAdjacentElement(t.position,i),this._wrapJWPlayerWithCLS(i,n,this._WRAPPER_BAR_HEIGHT),this._playersAddedFromPlugin.push(“playlist-“+n)},t.prototype._isVideoAllowedOnPage=function(){var t=this._clsOptions.disableAds;return t&&t.video?(t.reasons.has(“video_tag”)||t.reasons.has(“video_plugin”)||t.reasons.has(“video_page”),!1):!this._clsOptions.videoDisabledFromPlugin},t.prototype._shouldRunAutoplayPlayers=function(){return!(!this._isVideoAllowedOnPage()||!(this._potentialPlayerMap.stickyRelated.length||this._potentialPlayerMap.stickyPlaylist.length||this._potentialPlayerMap.sekindo.length))},t}();(C=new p)&&C.enabled&&(new x(C,new y).start(),window.adthriveVideosInjected||new M(new m(C),C).init())}(); ]]>
0||rocketlazy_count>0){lazyLoadInstance.update()}});var b=document.getElementsByTagName(“body”)[0];var config={childList:!0,subtree:!0};observer.observe(b,config)}},!1)]]>
Source